easy-component-ui 3.0.11 → 3.0.13
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/README.md +162 -162
- package/dist/assets/icon.css +1 -1
- package/dist/components/Base.js +190 -188
- package/dist/components/ea-alert.js +71 -54
- package/dist/components/ea-avatar.js +42 -37
- package/dist/components/ea-breadcrumb.js +33 -33
- package/dist/components/ea-button.js +53 -52
- package/dist/components/ea-card.js +63 -27
- package/dist/components/ea-carousel.js +2 -2
- package/dist/components/ea-collapse.js +93 -73
- package/dist/components/ea-color-picker.js +221 -221
- package/dist/components/ea-container.js +90 -61
- package/dist/components/ea-countdown.js +77 -56
- package/dist/components/ea-date-picker.js +1 -1
- package/dist/components/ea-descriptions.js +133 -70
- package/dist/components/ea-dialog.js +4 -4
- package/dist/components/ea-drawer.js +93 -71
- package/dist/components/ea-empty.js +31 -23
- package/dist/components/ea-icon.js +122 -32
- package/dist/components/ea-image-preview.js +237 -193
- package/dist/components/ea-image.js +69 -44
- package/dist/components/ea-input-number.js +9 -9
- package/dist/components/ea-input.js +15 -15
- package/dist/components/ea-layout.js +10 -3
- package/dist/components/ea-link.js +1 -1
- package/dist/components/ea-menu.js +69 -53
- package/dist/components/ea-message-box.js +73 -73
- package/dist/components/ea-message.js +184 -121
- package/dist/components/ea-notification.js +80 -80
- package/dist/components/ea-overlay.js +41 -34
- package/dist/components/ea-page-header.js +5 -5
- package/dist/components/ea-pagination.js +6 -5
- package/dist/components/ea-popconfirm.js +133 -78
- package/dist/components/ea-popover.js +35 -11
- package/dist/components/ea-popper.js +9 -9
- package/dist/components/ea-progress.js +88 -71
- package/dist/components/ea-rate.js +1 -1
- package/dist/components/ea-result.js +20 -20
- package/dist/components/ea-select.js +119 -108
- package/dist/components/ea-skeleton.js +99 -82
- package/dist/components/ea-slider.js +88 -79
- package/dist/components/ea-splitter.js +34 -18
- package/dist/components/ea-statistic.js +72 -4
- package/dist/components/ea-steps.js +108 -74
- package/dist/components/ea-table.js +562 -434
- package/dist/components/ea-tabs.js +28 -28
- package/dist/components/ea-tag.js +37 -43
- package/dist/components/ea-time-picker.js +2 -6
- package/dist/components/ea-timeline.js +11 -12
- package/dist/components/ea-tooltip.js +63 -23
- package/dist/components/ea-tour.js +21 -21
- package/dist/components/ea-transfer.js +2 -2
- package/dist/components/ea-tree.js +1 -1
- package/dist/components/index.js +1 -2
- package/dist/css/ea-card.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-container.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-footer.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-switch.style.js +1 -1
- package/dist/css/ea-tab.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-tabs.style.js +1 -1
- package/dist/css/ea-tag.style.js +1 -1
- package/dist/css/ea-time-picker.style.js +1 -1
- package/dist/css/ea-timeline-item.style.js +1 -1
- package/dist/utils/Variables.js +10 -17
- package/dist/utils/parseTime.js +73 -0
- package/package.json +302 -304
- package/dist/components/ea-loading.js +0 -151
- 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)), o = (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, m, b, S, A;
|
|
12
|
+
class I extends R {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
15
|
-
|
|
15
|
+
o(this, l);
|
|
16
16
|
/** @type {HTMLElement} */
|
|
17
|
-
|
|
17
|
+
o(this, u);
|
|
18
18
|
/** @type {HTMLElement} */
|
|
19
|
-
|
|
19
|
+
o(this, C);
|
|
20
20
|
/** @type {HTMLElement} */
|
|
21
|
-
|
|
21
|
+
o(this, c);
|
|
22
22
|
/** @type {HTMLElement} */
|
|
23
|
-
|
|
23
|
+
o(this, m);
|
|
24
24
|
/** @type {HTMLElement} */
|
|
25
|
-
|
|
25
|
+
o(this, b);
|
|
26
26
|
/** @type {AbortController} */
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
o(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, m).textContent = t;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
description: {
|
|
37
37
|
type: String,
|
|
38
38
|
default: "",
|
|
39
39
|
observer: (t) => {
|
|
40
|
-
|
|
40
|
+
e(this, b).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("name", 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
|
+
o(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("name", "check"), e(this, c).textContent = "") : (e(this, c).setAttribute("name", ""), e(this, c).textContent = this.index + 1);
|
|
104
|
+
});
|
|
105
|
+
this.stylesheet = N, this.$render();
|
|
99
106
|
}
|
|
100
107
|
static get observedAttributes() {
|
|
101
108
|
return [
|
|
@@ -124,14 +131,14 @@ class $ extends _ {
|
|
|
124
131
|
icon: this.icon,
|
|
125
132
|
simple: this.simple,
|
|
126
133
|
last: (() => {
|
|
127
|
-
var
|
|
128
|
-
const r = (
|
|
134
|
+
var a;
|
|
135
|
+
const r = (a = e(this, l, p)) == null ? void 0 : a.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, m, this.shadowRoot.querySelector('slot[name="title"]')), n(this, b, 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(), m = new WeakMap(), b = 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
|
-
|
|
190
|
+
o(this, f);
|
|
191
|
+
/** @type {HTMLSlotElement} */
|
|
192
|
+
o(this, y);
|
|
184
193
|
/** @type {AbortController} */
|
|
185
|
-
|
|
186
|
-
|
|
194
|
+
o(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
|
-
|
|
258
|
-
[...this.querySelectorAll("ea-step")].forEach((
|
|
259
|
-
|
|
248
|
+
o(this, v, (t) => {
|
|
249
|
+
[...this.querySelectorAll("ea-step")].forEach((a) => {
|
|
250
|
+
a.index < t ? a.setAttribute("status", this["finish-status"]) : a.index > t ? a.setAttribute("status", "wait") : a.setAttribute("status", this["process-status"]);
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
/**
|
|
254
|
+
* 更新简单步骤状态
|
|
255
|
+
* @param {boolean} isSimple
|
|
256
|
+
*/
|
|
257
|
+
o(this, w, (t = this.simple) => {
|
|
258
|
+
const r = [...this.querySelectorAll("ea-step")];
|
|
259
|
+
t ? r.forEach((a) => {
|
|
260
|
+
var d;
|
|
261
|
+
try {
|
|
262
|
+
(d = a.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("name", "angle-right"), g.part = "simple-arrow", a.appendChild(g);
|
|
268
|
+
} catch {
|
|
269
|
+
}
|
|
270
|
+
}) : r.forEach((a) => {
|
|
271
|
+
var d;
|
|
272
|
+
try {
|
|
273
|
+
(d = a.querySelector('[slot="simple-arrow"]')) == null || d.remove();
|
|
274
|
+
} catch {
|
|
275
|
+
}
|
|
260
276
|
});
|
|
261
277
|
});
|
|
262
|
-
|
|
278
|
+
/**
|
|
279
|
+
* 处理 slot 变化
|
|
280
|
+
* 更新所有子 ea-step 组件的 index、first、last 状态和 status
|
|
281
|
+
*/
|
|
282
|
+
o(this, _, () => {
|
|
283
|
+
const t = [...this.querySelectorAll("ea-step")];
|
|
284
|
+
t.forEach((r, a) => {
|
|
285
|
+
r.index = a, r.toggleAttribute("first", a === 0), r.toggleAttribute("last", a === 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
|
};
|