easy-component-ui 3.0.10 → 3.0.12
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/components/Base.js +187 -186
- package/dist/components/ea-breadcrumb.js +33 -33
- package/dist/components/ea-carousel.js +71 -70
- package/dist/components/ea-collapse.js +100 -80
- package/dist/components/ea-color-picker.js +199 -196
- package/dist/components/ea-countdown.js +77 -56
- package/dist/components/ea-descriptions.js +133 -70
- package/dist/components/ea-drawer.js +87 -70
- package/dist/components/ea-empty.js +31 -23
- package/dist/components/ea-menu.js +68 -52
- package/dist/components/ea-overlay.js +35 -29
- package/dist/components/ea-pagination.js +1 -0
- package/dist/components/ea-popconfirm.js +132 -77
- package/dist/components/ea-popper.js +9 -9
- package/dist/components/ea-progress.js +81 -64
- package/dist/components/ea-result.js +22 -22
- package/dist/components/ea-select.js +110 -99
- package/dist/components/ea-skeleton.js +99 -82
- package/dist/components/ea-statistic.js +72 -4
- package/dist/components/ea-steps.js +104 -70
- package/dist/components/ea-table.js +514 -397
- package/dist/components/ea-tag.js +37 -43
- package/dist/components/ea-timeline.js +10 -11
- package/dist/components/index.js +1 -1
- package/dist/css/ea-card.style.js +1 -1
- package/dist/css/ea-carousel.style.js +2 -2
- package/dist/css/ea-collapse-item.style.js +1 -1
- package/dist/css/ea-color-picker-panel.style.js +1 -1
- package/dist/css/ea-descriptions-item.style.js +2 -2
- package/dist/css/ea-descriptions.style.js +1 -1
- package/dist/css/ea-empty.style.js +1 -1
- package/dist/css/ea-progress.style.js +1 -1
- package/dist/css/ea-skeleton.style.js +1 -1
- package/dist/css/ea-step.style.js +1 -1
- package/dist/css/ea-table-column.style.js +4 -0
- package/dist/css/ea-table.style.js +1 -1
- package/dist/css/ea-timeline-item.style.js +1 -1
- package/dist/utils/Variables.js +5 -12
- package/dist/utils/parseTime.js +73 -0
- package/package.json +1 -1
- package/dist/components/ea-statistic2.js +0 -83
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var $ = Object.defineProperty;
|
|
2
|
+
var q = (s) => {
|
|
3
|
+
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { B as
|
|
9
|
-
import { s as
|
|
10
|
-
import { s as
|
|
11
|
-
var
|
|
12
|
-
class
|
|
5
|
+
var B = (s, i, t) => i in s ? $(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t;
|
|
6
|
+
var x = (s, i, t) => B(s, typeof i != "symbol" ? i + "" : i, t), E = (s, i, t) => i.has(s) || q("Cannot " + t);
|
|
7
|
+
var e = (s, i, t) => (E(s, i, "read from private field"), t ? t.call(s) : i.get(s)), a = (s, i, t) => i.has(s) ? q("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), n = (s, i, t, r) => (E(s, i, "write to private field"), r ? r.call(s, t) : i.set(s, t), t);
|
|
8
|
+
import { B as R } from "./Base.js";
|
|
9
|
+
import { s as N } from "../css/ea-step.style.js";
|
|
10
|
+
import { s as k } from "../css/ea-steps.style.js";
|
|
11
|
+
var l, p, u, C, c, b, m, S, A;
|
|
12
|
+
class I extends R {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
15
|
-
a(this,
|
|
15
|
+
a(this, l);
|
|
16
16
|
/** @type {HTMLElement} */
|
|
17
|
-
a(this,
|
|
17
|
+
a(this, u);
|
|
18
18
|
/** @type {HTMLElement} */
|
|
19
|
-
a(this,
|
|
19
|
+
a(this, C);
|
|
20
20
|
/** @type {HTMLElement} */
|
|
21
|
-
a(this,
|
|
21
|
+
a(this, c);
|
|
22
22
|
/** @type {HTMLElement} */
|
|
23
|
-
a(this,
|
|
23
|
+
a(this, b);
|
|
24
24
|
/** @type {HTMLElement} */
|
|
25
25
|
a(this, m);
|
|
26
26
|
/** @type {AbortController} */
|
|
27
|
-
a(this,
|
|
28
|
-
|
|
27
|
+
a(this, S, new AbortController());
|
|
28
|
+
x(this, "state", this.properties({
|
|
29
29
|
title: {
|
|
30
30
|
type: String,
|
|
31
31
|
default: "",
|
|
32
32
|
observer: (t) => {
|
|
33
|
-
|
|
33
|
+
e(this, b).textContent = t;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
description: {
|
|
37
37
|
type: String,
|
|
38
38
|
default: "",
|
|
39
39
|
observer: (t) => {
|
|
40
|
-
|
|
40
|
+
e(this, m).textContent = t;
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
icon: {
|
|
44
44
|
type: String,
|
|
45
45
|
default: "",
|
|
46
46
|
observer: (t) => {
|
|
47
|
-
|
|
47
|
+
e(this, c).setAttribute("icon", t);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
status: {
|
|
51
51
|
type: ["", "wait", "process", "finish", "error", "success"],
|
|
52
52
|
default: "",
|
|
53
53
|
observer: (t) => {
|
|
54
|
-
|
|
55
|
-
this.updateContainerClasslist(), !this.icon && (t === ((r = i(this, n, p)) == null ? void 0 : r.getAttribute("finish-status")) ? (i(this, l).setAttribute("icon", "icon-ok"), i(this, l).textContent = "") : (i(this, l).setAttribute("icon", ""), i(this, l).textContent = this.index + 1));
|
|
54
|
+
this.updateContainerClasslist(), !this.icon && e(this, A).call(this, t);
|
|
56
55
|
}
|
|
57
56
|
},
|
|
58
57
|
index: {
|
|
59
58
|
type: Number,
|
|
60
59
|
default: () => {
|
|
61
60
|
var r;
|
|
62
|
-
const t = (r =
|
|
61
|
+
const t = (r = e(this, l, p)) == null ? void 0 : r.querySelectorAll("ea-step");
|
|
63
62
|
return t ? Array.from(t).indexOf(this) : 0;
|
|
64
63
|
},
|
|
65
64
|
observer: () => {
|
|
@@ -69,7 +68,7 @@ class $ extends _ {
|
|
|
69
68
|
type: Boolean,
|
|
70
69
|
default: () => {
|
|
71
70
|
var t;
|
|
72
|
-
return !!((t =
|
|
71
|
+
return !!((t = e(this, l, p)) != null && t.hasAttribute("simple"));
|
|
73
72
|
},
|
|
74
73
|
observer: () => {
|
|
75
74
|
}
|
|
@@ -78,7 +77,7 @@ class $ extends _ {
|
|
|
78
77
|
type: Boolean,
|
|
79
78
|
default: () => {
|
|
80
79
|
var t;
|
|
81
|
-
return !!((t =
|
|
80
|
+
return !!((t = e(this, l, p)) != null && t.hasAttribute("align-center"));
|
|
82
81
|
},
|
|
83
82
|
observer: () => {
|
|
84
83
|
this.updateContainerClasslist();
|
|
@@ -88,14 +87,22 @@ class $ extends _ {
|
|
|
88
87
|
type: ["vertical", "horizontal"],
|
|
89
88
|
default: () => {
|
|
90
89
|
var t;
|
|
91
|
-
return ((t =
|
|
90
|
+
return ((t = e(this, l, p)) == null ? void 0 : t.getAttribute("direction")) || "horizontal";
|
|
92
91
|
},
|
|
93
92
|
observer: () => {
|
|
94
93
|
this.updateContainerClasslist();
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
96
|
}));
|
|
98
|
-
|
|
97
|
+
/**
|
|
98
|
+
* 更新步骤状态
|
|
99
|
+
* @param {string} status 活动步骤状态
|
|
100
|
+
*/
|
|
101
|
+
a(this, A, (t = this.status) => {
|
|
102
|
+
var r;
|
|
103
|
+
t === ((r = e(this, l, p)) == null ? void 0 : r.getAttribute("finish-status")) ? (e(this, c).setAttribute("icon", "icon-ok"), e(this, c).textContent = "") : (e(this, c).setAttribute("icon", ""), e(this, c).textContent = this.index + 1);
|
|
104
|
+
});
|
|
105
|
+
this.stylesheet = N, this.$render();
|
|
99
106
|
}
|
|
100
107
|
static get observedAttributes() {
|
|
101
108
|
return [
|
|
@@ -125,13 +132,13 @@ class $ extends _ {
|
|
|
125
132
|
simple: this.simple,
|
|
126
133
|
last: (() => {
|
|
127
134
|
var o;
|
|
128
|
-
const r = (o =
|
|
135
|
+
const r = (o = e(this, l, p)) == null ? void 0 : o.querySelectorAll("ea-step");
|
|
129
136
|
return r ? r.length - 1 === this.index : !1;
|
|
130
137
|
})(),
|
|
131
138
|
first: this.index === 0
|
|
132
139
|
}
|
|
133
140
|
);
|
|
134
|
-
return
|
|
141
|
+
return e(this, u) && (e(this, u).className = t), t;
|
|
135
142
|
}
|
|
136
143
|
$render() {
|
|
137
144
|
this.shadowRoot.innerHTML = `
|
|
@@ -156,7 +163,7 @@ class $ extends _ {
|
|
|
156
163
|
<slot name="simple-arrow"></slot>
|
|
157
164
|
</span>
|
|
158
165
|
</div>
|
|
159
|
-
`,
|
|
166
|
+
`, n(this, u, this.shadowRoot.querySelector(".ea-step")), n(this, C, this.shadowRoot.querySelector('slot[name="icon"]')), n(this, c, this.shadowRoot.querySelector(".ea-step__icon")), n(this, b, this.shadowRoot.querySelector('slot[name="title"]')), n(this, m, this.shadowRoot.querySelector(
|
|
160
167
|
'slot[name="description"]'
|
|
161
168
|
)), this.updateContainerClasslist();
|
|
162
169
|
}
|
|
@@ -164,26 +171,28 @@ class $ extends _ {
|
|
|
164
171
|
super.connectedCallback();
|
|
165
172
|
}
|
|
166
173
|
$beforeUnmounted() {
|
|
167
|
-
|
|
174
|
+
e(this, S).abort();
|
|
168
175
|
}
|
|
169
176
|
}
|
|
170
|
-
|
|
177
|
+
l = new WeakSet(), p = function() {
|
|
171
178
|
try {
|
|
172
179
|
return this.closest("ea-steps");
|
|
173
180
|
} catch {
|
|
174
181
|
return null;
|
|
175
182
|
}
|
|
176
|
-
},
|
|
177
|
-
window.customElements.get("ea-step") || window.customElements.define("ea-step",
|
|
178
|
-
var
|
|
179
|
-
class
|
|
183
|
+
}, u = new WeakMap(), C = new WeakMap(), c = new WeakMap(), b = new WeakMap(), m = new WeakMap(), S = new WeakMap(), A = new WeakMap();
|
|
184
|
+
window.customElements.get("ea-step") || window.customElements.define("ea-step", I);
|
|
185
|
+
var f, y, h, v, w, _;
|
|
186
|
+
class L extends R {
|
|
180
187
|
constructor() {
|
|
181
188
|
super();
|
|
182
189
|
/** @type {HTMLElement} */
|
|
183
|
-
a(this,
|
|
190
|
+
a(this, f);
|
|
191
|
+
/** @type {HTMLSlotElement} */
|
|
192
|
+
a(this, y);
|
|
184
193
|
/** @type {AbortController} */
|
|
185
|
-
a(this,
|
|
186
|
-
|
|
194
|
+
a(this, h, new AbortController());
|
|
195
|
+
x(this, "state", this.properties({
|
|
187
196
|
space: {
|
|
188
197
|
type: String,
|
|
189
198
|
default: "50%",
|
|
@@ -203,7 +212,7 @@ class B extends _ {
|
|
|
203
212
|
type: Number,
|
|
204
213
|
default: 0,
|
|
205
214
|
observer: (t) => {
|
|
206
|
-
|
|
215
|
+
e(this, v).call(this, t);
|
|
207
216
|
}
|
|
208
217
|
},
|
|
209
218
|
"process-status": {
|
|
@@ -228,25 +237,7 @@ class B extends _ {
|
|
|
228
237
|
type: Boolean,
|
|
229
238
|
default: !1,
|
|
230
239
|
observer: (t) => {
|
|
231
|
-
|
|
232
|
-
t ? r.forEach((o) => {
|
|
233
|
-
var u;
|
|
234
|
-
try {
|
|
235
|
-
(u = o.querySelector('[slot="simple-arrow"]')) == null || u.remove();
|
|
236
|
-
} catch {
|
|
237
|
-
}
|
|
238
|
-
try {
|
|
239
|
-
const f = document.createElement("ea-icon");
|
|
240
|
-
f.setAttribute("slot", "simple-arrow"), f.setAttribute("icon", "icon-angle-right"), f.part = "simple-arrow", o.appendChild(f);
|
|
241
|
-
} catch {
|
|
242
|
-
}
|
|
243
|
-
}) : r.forEach((o) => {
|
|
244
|
-
var u;
|
|
245
|
-
try {
|
|
246
|
-
(u = o.querySelector('[slot="simple-arrow"]')) == null || u.remove();
|
|
247
|
-
} catch {
|
|
248
|
-
}
|
|
249
|
-
}), this.updateContainerClasslist();
|
|
240
|
+
e(this, w).call(this, t), this.updateContainerClasslist();
|
|
250
241
|
}
|
|
251
242
|
}
|
|
252
243
|
}));
|
|
@@ -254,12 +245,47 @@ class B extends _ {
|
|
|
254
245
|
* 更新步骤状态
|
|
255
246
|
* @param {number} active
|
|
256
247
|
*/
|
|
257
|
-
a(this,
|
|
248
|
+
a(this, v, (t) => {
|
|
258
249
|
[...this.querySelectorAll("ea-step")].forEach((o) => {
|
|
259
250
|
o.index < t ? o.setAttribute("status", this["finish-status"]) : o.index > t ? o.setAttribute("status", "wait") : o.setAttribute("status", this["process-status"]);
|
|
260
251
|
});
|
|
261
252
|
});
|
|
262
|
-
|
|
253
|
+
/**
|
|
254
|
+
* 更新简单步骤状态
|
|
255
|
+
* @param {boolean} isSimple
|
|
256
|
+
*/
|
|
257
|
+
a(this, w, (t = this.simple) => {
|
|
258
|
+
const r = [...this.querySelectorAll("ea-step")];
|
|
259
|
+
t ? r.forEach((o) => {
|
|
260
|
+
var d;
|
|
261
|
+
try {
|
|
262
|
+
(d = o.querySelector('[slot="simple-arrow"]')) == null || d.remove();
|
|
263
|
+
} catch {
|
|
264
|
+
}
|
|
265
|
+
try {
|
|
266
|
+
const g = document.createElement("ea-icon");
|
|
267
|
+
g.setAttribute("slot", "simple-arrow"), g.setAttribute("icon", "icon-angle-right"), g.part = "simple-arrow", o.appendChild(g);
|
|
268
|
+
} catch {
|
|
269
|
+
}
|
|
270
|
+
}) : r.forEach((o) => {
|
|
271
|
+
var d;
|
|
272
|
+
try {
|
|
273
|
+
(d = o.querySelector('[slot="simple-arrow"]')) == null || d.remove();
|
|
274
|
+
} catch {
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
/**
|
|
279
|
+
* 处理 slot 变化
|
|
280
|
+
* 更新所有子 ea-step 组件的 index、first、last 状态和 status
|
|
281
|
+
*/
|
|
282
|
+
a(this, _, () => {
|
|
283
|
+
const t = [...this.querySelectorAll("ea-step")];
|
|
284
|
+
t.forEach((r, o) => {
|
|
285
|
+
r.index = o, r.toggleAttribute("first", o === 0), r.toggleAttribute("last", o === t.length - 1);
|
|
286
|
+
}), e(this, v).call(this, this.active), e(this, w).call(this);
|
|
287
|
+
});
|
|
288
|
+
this.stylesheet = k, this.$render();
|
|
263
289
|
}
|
|
264
290
|
static get observedAttributes() {
|
|
265
291
|
return [
|
|
@@ -288,25 +314,33 @@ class B extends _ {
|
|
|
288
314
|
"align-center": this["align-center"]
|
|
289
315
|
}
|
|
290
316
|
);
|
|
291
|
-
return
|
|
317
|
+
return e(this, f).className = t, t;
|
|
292
318
|
}
|
|
293
319
|
$render() {
|
|
294
320
|
this.shadowRoot.innerHTML = `
|
|
295
321
|
<div class='ea-steps' part='container'>
|
|
296
322
|
<slot></slot>
|
|
297
323
|
</div>
|
|
298
|
-
`,
|
|
324
|
+
`, n(this, f, this.shadowRoot.querySelector(".ea-steps")), n(this, y, this.shadowRoot.querySelector("slot"));
|
|
299
325
|
}
|
|
300
326
|
connectedCallback() {
|
|
301
|
-
|
|
327
|
+
var t;
|
|
328
|
+
super.connectedCallback(), (t = e(this, h)) == null || t.abort(), n(this, h, new AbortController()), e(this, y).addEventListener(
|
|
329
|
+
"slotchange",
|
|
330
|
+
() => {
|
|
331
|
+
e(this, _).call(this);
|
|
332
|
+
},
|
|
333
|
+
{ signal: e(this, h).signal }
|
|
334
|
+
);
|
|
302
335
|
}
|
|
303
336
|
$beforeUnmounted() {
|
|
304
|
-
|
|
337
|
+
var t;
|
|
338
|
+
(t = e(this, h)) == null || t.abort();
|
|
305
339
|
}
|
|
306
340
|
}
|
|
307
|
-
|
|
308
|
-
window.customElements.get("ea-steps") || window.customElements.define("ea-steps",
|
|
341
|
+
f = new WeakMap(), y = new WeakMap(), h = new WeakMap(), v = new WeakMap(), w = new WeakMap(), _ = new WeakMap();
|
|
342
|
+
window.customElements.get("ea-steps") || window.customElements.define("ea-steps", L);
|
|
309
343
|
export {
|
|
310
|
-
|
|
311
|
-
|
|
344
|
+
I as EaStep,
|
|
345
|
+
L as EaSteps
|
|
312
346
|
};
|