stimulus-clipboard
Advanced tools
Comparing version 3.2.2 to 3.3.0
@@ -9,2 +9,15 @@ # Changelog | ||
## [3.3.0] - 2022-12-23 | ||
### Added | ||
- Adding `name` in library export to use the package with CDN, Sprockets and `import-maps`. | ||
### Chore | ||
- Upgrading to Node `18`. | ||
- Bump dependencies. | ||
- Upgrading to Vite `4.x`. | ||
- Docs new UI | ||
## [3.2.2] | ||
@@ -11,0 +24,0 @@ |
@@ -1,1 +0,1 @@ | ||
(function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t(require("@hotwired/stimulus")):typeof define=="function"&&define.amd?define(["@hotwired/stimulus"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,e["stimulus-clipboard"]=t(e.Stimulus))})(this,function(e){"use strict";class t extends e.Controller{connect(){!this.hasButtonTarget||(this.originalContent=this.buttonTarget.innerHTML)}copy(i){i.preventDefault();const s=this.sourceTarget.innerHTML||this.sourceTarget.value;navigator.clipboard.writeText(s).then(()=>this.copied())}copied(){!this.hasButtonTarget||(this.timeout&&clearTimeout(this.timeout),this.buttonTarget.innerText=this.data.get("successContent"),this.timeout=setTimeout(()=>{this.buttonTarget.innerHTML=this.originalContent},this.successDurationValue))}}return t.targets=["button","source"],t.values={successDuration:{type:Number,default:2e3}},t}); | ||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t(require("@hotwired/stimulus")):typeof define=="function"&&define.amd?define(["@hotwired/stimulus"],t):(e=typeof globalThis<"u"?globalThis:e||self,e.StimulusClipboard=t(e.Stimulus))})(this,function(e){"use strict";class t extends e.Controller{connect(){this.hasButtonTarget&&(this.originalContent=this.buttonTarget.innerHTML)}copy(i){i.preventDefault();const s=this.sourceTarget.innerHTML||this.sourceTarget.value;navigator.clipboard.writeText(s).then(()=>this.copied())}copied(){this.hasButtonTarget&&(this.timeout&&clearTimeout(this.timeout),this.buttonTarget.innerText=this.data.get("successContent"),this.timeout=setTimeout(()=>{this.buttonTarget.innerHTML=this.originalContent},this.successDurationValue))}}return t.targets=["button","source"],t.values={successDuration:{type:Number,default:2e3}},t}); |
{ | ||
"name": "stimulus-clipboard", | ||
"version": "3.2.2", | ||
"version": "3.3.0", | ||
"description": "A Stimulus controller to copy text to clipboard.", | ||
@@ -21,3 +21,3 @@ "keywords": [ | ||
"main": "dist/stimulus-clipboard.umd.js", | ||
"module": "dist/stimulus-clipboard.es.js", | ||
"module": "dist/stimulus-clipboard.mjs", | ||
"scripts": { | ||
@@ -33,15 +33,18 @@ "format": "prettier-standard '**/*.{ts,css,html}' --format", | ||
"devDependencies": { | ||
"@babel/core": "7.19.6", | ||
"@babel/core": "7.20.7", | ||
"@babel/plugin-syntax-class-properties": "7.12.13", | ||
"@babel/preset-env": "^7.19.4", | ||
"@babel/preset-env": "^7.20.2", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@hotwired/stimulus": "^3.1.0", | ||
"@hotwired/stimulus": "^3.2.1", | ||
"autoprefixer": "^10.4.13", | ||
"np": "^7.6.2", | ||
"postcss": "^8.4.20", | ||
"prettier-standard": "16.4.1", | ||
"typescript": "^4.8.4", | ||
"vite": "^2.9.12" | ||
"tailwindcss": "^3.2.4", | ||
"typescript": "^4.9.4", | ||
"vite": "^4.0.3" | ||
}, | ||
"peerDependencies": { | ||
"@hotwired/stimulus": "^3.1.0" | ||
"@hotwired/stimulus": "^3.2.1" | ||
} | ||
} |
@@ -7,3 +7,2 @@ # Stimulus Clipboard | ||
[![](https://img.shields.io/github/license/stimulus-components/stimulus-clipboard.svg)](https://github.com/stimulus-components/stimulus-clipboard) | ||
[![Netlify Status](https://api.netlify.com/api/v1/badges/80f85acb-2a15-4326-9bd1-92a461e53c22/deploy-status)](https://stimulus-clipboard.netlify.com) | ||
@@ -10,0 +9,0 @@ ## Getting started |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6803
12
30
23