@digital-realty/ix-timer 3.2.31 → 3.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ix-timer.min.js +1 -0
- package/package.json +8 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LitElement,html,css}from"lit";import{__decorate}from"tslib";import{asyncReplace}from"lit/directives/async-replace.js";import{property,state}from"lit/decorators.js";import"@digital-realty/ix-icon/ix-icon.js";async function*countDownAsync(e,t){let i=e;for(;0<i;)yield--i,await new Promise(e=>setTimeout(e,1e3));null!=t&&t()}class IxTimer extends LitElement{constructor(){super(),this.label="",this.duration=10,this.onFinished=()=>{}}connectedCallback(){super.connectedCallback(),this.timer=countDownAsync(this.duration,this.onFinished)}render(){return html`<div class="timer-container"><ix-icon>timer</ix-icon>${this.label} ${this.timer?asyncReplace(this.timer):""}s</div>`}}__decorate([property({type:String})],IxTimer.prototype,"label",void 0),__decorate([property({type:Number})],IxTimer.prototype,"duration",void 0),__decorate([property({attribute:!1})],IxTimer.prototype,"onFinished",void 0),__decorate([state()],IxTimer.prototype,"timer",void 0);class IxTimerStyled extends IxTimer{}IxTimerStyled.styles=css`.timer-container{display:flex;justify-content:center;align-items:center}ix-icon{font-size:16px;margin-top:4px}`,window.customElements.define("ix-timer",IxTimerStyled);export{IxTimerStyled};
|
package/package.json
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
"description": "Webcomponent ix-timer following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "3.2.
|
|
6
|
+
"version": "3.2.32",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/index.js",
|
|
12
12
|
"./ix-timer.js": "./dist/ix-timer.js",
|
|
13
|
+
"./ix-timer.min.js": "./dist/ix-timer.min.js",
|
|
13
14
|
"./IxTimer": "./dist/react/IxTimer.js"
|
|
14
15
|
},
|
|
15
16
|
"publishConfig": {
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
"scripts": {
|
|
19
20
|
"analyze": "cem analyze --litelement",
|
|
20
21
|
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
21
|
-
"build": "tsc && npm run analyze -- --exclude dist",
|
|
22
|
+
"build": "tsc && npm run analyze -- --exclude dist && rollup -c",
|
|
22
23
|
"prepublish": "tsc && npm run analyze -- --exclude dist",
|
|
23
24
|
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
24
25
|
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@digital-realty/ix-icon": "^1.0.
|
|
30
|
+
"@digital-realty/ix-icon": "^1.0.36",
|
|
30
31
|
"@lit/react": "^1.0.2",
|
|
31
32
|
"lit": "^2.0.2",
|
|
32
33
|
"react": "^18.2.0"
|
|
@@ -46,6 +47,9 @@
|
|
|
46
47
|
"husky": "^4.3.8",
|
|
47
48
|
"lint-staged": "^10.5.4",
|
|
48
49
|
"prettier": "^2.4.1",
|
|
50
|
+
"rollup-plugin-minify-html-literals": "^1.2.6",
|
|
51
|
+
"rollup-plugin-summary": "^2.0.0",
|
|
52
|
+
"rollup-plugin-uglify": "^6.0.4",
|
|
49
53
|
"tslib": "^2.3.1",
|
|
50
54
|
"typescript": "^5.1.6"
|
|
51
55
|
},
|
|
@@ -102,5 +106,5 @@
|
|
|
102
106
|
"README.md",
|
|
103
107
|
"LICENSE"
|
|
104
108
|
],
|
|
105
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "c7668fda980293ca038c0dd061ebe350fa88ee60"
|
|
106
110
|
}
|