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
|
@@ -3,56 +3,58 @@ var y = (t) => {
|
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
5
|
var C = (t, s, e) => s in t ? w(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var _ = (t, s, e) => C(t, typeof s != "symbol" ? s + "" : s, e), v = (t, s, e) => s.has(t) || y("Cannot " + e);
|
|
7
|
+
var a = (t, s, e) => (v(t, s, "read from private field"), e ? e.call(t) : s.get(t)), i = (t, s, e) => s.has(t) ? y("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), r = (t, s, e, c) => (v(t, s, "write to private field"), c ? c.call(t, e) : s.set(t, e), e);
|
|
8
8
|
import { B as g } from "./Base.js";
|
|
9
|
-
import { s as
|
|
9
|
+
import { s as x } from "../css/ea-alert.style.js";
|
|
10
10
|
import { t as b } from "../utils/timeout.js";
|
|
11
|
-
var
|
|
11
|
+
var l, d, u, m, p, f, n, o, h;
|
|
12
12
|
class L extends g {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
15
15
|
/** @type {HTMLElement} */
|
|
16
|
-
i(this,
|
|
16
|
+
i(this, l);
|
|
17
17
|
/** @type {HTMLElement} */
|
|
18
|
-
i(this,
|
|
18
|
+
i(this, d);
|
|
19
19
|
/** @type {HTMLElement} */
|
|
20
|
-
i(this,
|
|
20
|
+
i(this, u);
|
|
21
|
+
/** @type {HTMLSlotElement} */
|
|
22
|
+
i(this, m);
|
|
21
23
|
/** @type {HTMLElement} */
|
|
22
24
|
i(this, p);
|
|
23
25
|
/** @type {HTMLElement} */
|
|
24
|
-
i(this,
|
|
26
|
+
i(this, f);
|
|
25
27
|
/** @type {HTMLElement} */
|
|
26
|
-
i(this, l);
|
|
27
|
-
/** @type {AbortController} */
|
|
28
28
|
i(this, n);
|
|
29
|
-
|
|
29
|
+
/** @type {AbortController} */
|
|
30
|
+
i(this, o);
|
|
31
|
+
_(this, "state", this.properties({
|
|
30
32
|
title: {
|
|
31
33
|
type: String,
|
|
32
34
|
default: "",
|
|
33
35
|
observer: (e) => {
|
|
34
|
-
|
|
36
|
+
a(this, p).innerHTML = e;
|
|
35
37
|
}
|
|
36
38
|
},
|
|
37
39
|
description: {
|
|
38
40
|
type: String,
|
|
39
41
|
default: "",
|
|
40
42
|
observer: (e) => {
|
|
41
|
-
|
|
43
|
+
a(this, f).innerHTML = e || "<slot></slot>";
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
46
|
type: {
|
|
45
47
|
type: ["primary", "info", "success", "warning", "error"],
|
|
46
48
|
default: "info",
|
|
47
49
|
observer: (e) => {
|
|
48
|
-
|
|
50
|
+
this.updateContainerClasslist();
|
|
49
51
|
}
|
|
50
52
|
},
|
|
51
53
|
effect: {
|
|
52
54
|
type: ["light", "dark"],
|
|
53
55
|
default: "light",
|
|
54
56
|
observer: (e) => {
|
|
55
|
-
|
|
57
|
+
this.updateContainerClasslist();
|
|
56
58
|
}
|
|
57
59
|
},
|
|
58
60
|
"close-text": {
|
|
@@ -60,7 +62,7 @@ class L extends g {
|
|
|
60
62
|
default: "",
|
|
61
63
|
observer: (e) => {
|
|
62
64
|
try {
|
|
63
|
-
|
|
65
|
+
a(this, n).textContent = e;
|
|
64
66
|
} catch {
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -69,36 +71,39 @@ class L extends g {
|
|
|
69
71
|
type: Boolean,
|
|
70
72
|
default: !0,
|
|
71
73
|
observer: (e) => {
|
|
72
|
-
|
|
74
|
+
var c;
|
|
75
|
+
(c = a(this, o)) == null || c.abort(), a(this, n).innerHTML = e ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon" name="xmark" part="close-icon"></ea-icon>' : "", e && (r(this, o, new AbortController()), a(this, n).addEventListener("click", a(this, h), {
|
|
76
|
+
signal: a(this, o).signal
|
|
77
|
+
}));
|
|
73
78
|
}
|
|
74
79
|
},
|
|
75
80
|
"show-icon": {
|
|
76
81
|
type: Boolean,
|
|
77
82
|
default: !1,
|
|
78
|
-
observer: (
|
|
79
|
-
const
|
|
80
|
-
primary: "info",
|
|
81
|
-
success: "
|
|
82
|
-
info: "info",
|
|
83
|
-
warning: "
|
|
84
|
-
error: "
|
|
85
|
-
}
|
|
86
|
-
|
|
83
|
+
observer: () => {
|
|
84
|
+
const e = {
|
|
85
|
+
primary: "circle-info",
|
|
86
|
+
success: "circle-check",
|
|
87
|
+
info: "circle-info",
|
|
88
|
+
warning: "triangle-exclamation",
|
|
89
|
+
error: "circle-xmark"
|
|
90
|
+
};
|
|
91
|
+
a(this, d).innerHTML = `<ea-icon class="ea-alert__icon" name="${e[this.type]}" part="icon"></ea-icon>`;
|
|
87
92
|
}
|
|
88
93
|
},
|
|
89
94
|
center: {
|
|
90
95
|
type: Boolean,
|
|
91
96
|
default: !1,
|
|
92
97
|
observer: () => {
|
|
93
|
-
|
|
98
|
+
this.updateContainerClasslist();
|
|
94
99
|
}
|
|
95
100
|
},
|
|
96
101
|
"show-after": {
|
|
97
102
|
type: Number,
|
|
98
103
|
default: 0,
|
|
99
104
|
observer: (e) => {
|
|
100
|
-
e = Math.abs(e),
|
|
101
|
-
this.emit("open"),
|
|
105
|
+
e = Math.abs(e), a(this, l).classList.toggle("ea-alert--hide", e > 0), b(() => {
|
|
106
|
+
this.emit("open"), a(this, l).classList.remove("ea-alert--hide");
|
|
102
107
|
}, e);
|
|
103
108
|
}
|
|
104
109
|
},
|
|
@@ -112,26 +117,29 @@ class L extends g {
|
|
|
112
117
|
type: Number,
|
|
113
118
|
default: 0,
|
|
114
119
|
observer: (e) => {
|
|
115
|
-
e && this.isMounted && b(() =>
|
|
120
|
+
e && this.isMounted && b(() => a(this, h).call(this), this["auto-close"]);
|
|
116
121
|
}
|
|
117
122
|
}
|
|
118
123
|
}));
|
|
119
|
-
|
|
124
|
+
/**
|
|
125
|
+
* 关闭事件
|
|
126
|
+
*/
|
|
127
|
+
i(this, h, () => {
|
|
120
128
|
b(() => {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
);
|
|
129
|
+
a(this, l).classList.add("ea-alert--before-close");
|
|
130
|
+
const e = () => {
|
|
131
|
+
this.emit("close", {
|
|
132
|
+
detail: {
|
|
133
|
+
visible: !1
|
|
134
|
+
}
|
|
135
|
+
}), this.remove();
|
|
136
|
+
};
|
|
137
|
+
a(this, l).addEventListener("transitionend", e, {
|
|
138
|
+
once: !0
|
|
139
|
+
});
|
|
132
140
|
}, this["hide-after"]);
|
|
133
141
|
});
|
|
134
|
-
this.$render(), this.stylesheet =
|
|
142
|
+
this.$render(), this.stylesheet = x;
|
|
135
143
|
}
|
|
136
144
|
static get observedAttributes() {
|
|
137
145
|
return [
|
|
@@ -154,11 +162,12 @@ class L extends g {
|
|
|
154
162
|
* @return {string} 属性值
|
|
155
163
|
*/
|
|
156
164
|
updateContainerClasslist() {
|
|
157
|
-
|
|
165
|
+
const e = this.computedClasslist("ea-alert", {
|
|
158
166
|
["--" + this.type]: this.type,
|
|
159
167
|
["--" + this.effect]: this.effect,
|
|
160
168
|
"--center": this.center
|
|
161
169
|
});
|
|
170
|
+
return a(this, l).className = e, e;
|
|
162
171
|
}
|
|
163
172
|
$render() {
|
|
164
173
|
this.shadowRoot.innerHTML = `
|
|
@@ -167,29 +176,37 @@ class L extends g {
|
|
|
167
176
|
<slot name='icon'></slot>
|
|
168
177
|
</span>
|
|
169
178
|
<div class="ea-alert__content" part='content-wrap'>
|
|
170
|
-
<span class="ea-alert__title" part='title'
|
|
179
|
+
<span class="ea-alert__title" part='title'>
|
|
180
|
+
<slot name="title"></slot>
|
|
181
|
+
</span>
|
|
171
182
|
<p class="ea-alert__description" part='description'>
|
|
172
183
|
<slot></slot>
|
|
173
184
|
</p>
|
|
174
185
|
<span class="ea-alert__close-btn" part="close-btn">
|
|
175
|
-
${this.closable ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon"
|
|
186
|
+
${this.closable ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon" name="xmark" part="close-icon"></ea-icon>' : ""}
|
|
176
187
|
</span>
|
|
177
188
|
</div>
|
|
178
189
|
</div>
|
|
179
|
-
`, r(this,
|
|
180
|
-
".ea-
|
|
181
|
-
)), r(this,
|
|
190
|
+
`, r(this, l, this.shadowRoot.querySelector(".ea-alert")), r(this, d, this.shadowRoot.querySelector(
|
|
191
|
+
".ea-alert__icon-wrap slot[name=icon]"
|
|
192
|
+
)), r(this, u, this.shadowRoot.querySelector(".ea-alert__content")), r(this, p, this.shadowRoot.querySelector(
|
|
193
|
+
".ea-alert__title slot[name=title]"
|
|
194
|
+
)), r(this, f, this.shadowRoot.querySelector(
|
|
195
|
+
".ea-alert__description slot"
|
|
196
|
+
)), r(this, n, this.shadowRoot.querySelector(".ea-alert__close-btn"));
|
|
182
197
|
}
|
|
183
198
|
connectedCallback() {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
199
|
+
var e;
|
|
200
|
+
super.connectedCallback(), (e = a(this, o)) == null || e.abort(), this.closable && (r(this, o, new AbortController()), a(this, n).addEventListener("click", a(this, h), {
|
|
201
|
+
signal: a(this, o).signal
|
|
202
|
+
}));
|
|
187
203
|
}
|
|
188
204
|
$beforeUnmounted() {
|
|
189
|
-
|
|
205
|
+
var e;
|
|
206
|
+
(e = a(this, o)) == null || e.abort();
|
|
190
207
|
}
|
|
191
208
|
}
|
|
192
|
-
|
|
209
|
+
l = new WeakMap(), d = new WeakMap(), u = new WeakMap(), m = new WeakMap(), p = new WeakMap(), f = new WeakMap(), n = new WeakMap(), o = new WeakMap(), h = new WeakMap();
|
|
193
210
|
window.customElements.get("ea-alert") || window.customElements.define("ea-alert", L);
|
|
194
211
|
export {
|
|
195
212
|
L as EaAlert
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
2
|
var v = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var g = (e,
|
|
6
|
-
var f = (e,
|
|
7
|
-
var r = (e,
|
|
8
|
-
import { B as
|
|
9
|
-
import { E as
|
|
10
|
-
import { s as
|
|
11
|
-
const
|
|
5
|
+
var g = (e, s, t) => s in e ? m(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var f = (e, s, t) => g(e, typeof s != "symbol" ? s + "" : s, t), p = (e, s, t) => s.has(e) || v("Cannot " + t);
|
|
7
|
+
var r = (e, s, t) => (p(e, s, "read from private field"), t ? t.call(e) : s.get(e)), n = (e, s, t) => s.has(e) ? v("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), h = (e, s, t, a) => (p(e, s, "write to private field"), a ? a.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { B as y } from "./Base.js";
|
|
9
|
+
import { E as b } from "../utils/Utils.js";
|
|
10
|
+
import { s as w } from "../css/ea-avatar.style.js";
|
|
11
|
+
const u = `
|
|
12
12
|
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<defs>
|
|
14
14
|
<clipPath id="a">
|
|
@@ -28,44 +28,44 @@ const b = `
|
|
|
28
28
|
<path d="M55 45L40 70h5 30z" fill="#c0c4cc" />
|
|
29
29
|
</svg>
|
|
30
30
|
`;
|
|
31
|
-
var
|
|
32
|
-
class C extends
|
|
31
|
+
var o, i;
|
|
32
|
+
class C extends y {
|
|
33
33
|
constructor() {
|
|
34
34
|
super();
|
|
35
35
|
/** @type {HTMLElement} */
|
|
36
|
-
n(this,
|
|
36
|
+
n(this, o);
|
|
37
37
|
/** @type {AbortController} */
|
|
38
|
-
n(this,
|
|
38
|
+
n(this, i);
|
|
39
39
|
f(this, "state", this.properties({
|
|
40
40
|
icon: {
|
|
41
41
|
type: String,
|
|
42
42
|
default: "",
|
|
43
43
|
observer: (t) => {
|
|
44
|
-
r(this,
|
|
44
|
+
t ? r(this, o).innerHTML = `<ea-icon class="ea-avatar__icon" name="${t}" part="icon-avatar"></ea-icon>` : r(this, o).innerHTML = `<slot>${u}</slot>`;
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
shape: {
|
|
48
48
|
type: ["circle", "square"],
|
|
49
49
|
default: "circle",
|
|
50
50
|
observer: () => {
|
|
51
|
-
|
|
51
|
+
this.updateContainerClasslist();
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
size: {
|
|
55
55
|
type: String,
|
|
56
56
|
default: "default",
|
|
57
57
|
observer: (t) => {
|
|
58
|
-
const
|
|
58
|
+
const a = b.Enum.hasEnum(
|
|
59
59
|
["default", "small", "large"],
|
|
60
60
|
t
|
|
61
61
|
), c = CSS.supports("width", t);
|
|
62
|
-
if (!
|
|
62
|
+
if (!a && !c)
|
|
63
63
|
return this.size = "default", console.warn(
|
|
64
64
|
"[ea-avatar] Please set size to one of [default, small, large] or a valid CSS width value"
|
|
65
65
|
);
|
|
66
66
|
this.style.setProperty(
|
|
67
67
|
"--ea-avatar-size",
|
|
68
|
-
|
|
68
|
+
a ? `var(--ea-avatar-size-${t})` : t
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -74,23 +74,23 @@ class C extends m {
|
|
|
74
74
|
default: "",
|
|
75
75
|
observer: (t) => {
|
|
76
76
|
var c;
|
|
77
|
-
(c = r(this,
|
|
78
|
-
const
|
|
79
|
-
|
|
77
|
+
(c = r(this, i)) == null || c.abort(), h(this, i, new AbortController());
|
|
78
|
+
const a = new Image();
|
|
79
|
+
a.src = t, a.addEventListener(
|
|
80
80
|
"load",
|
|
81
81
|
() => {
|
|
82
|
-
var
|
|
83
|
-
r(this,
|
|
82
|
+
var l;
|
|
83
|
+
r(this, o).innerHTML = `<img class="ea-avatar__img" src="${t}" alt="${this.alt}" srcset="${this["src-set"]}" part="img-avatar" />`, (l = r(this, i)) == null || l.abort();
|
|
84
84
|
},
|
|
85
|
-
{ signal: r(this,
|
|
86
|
-
),
|
|
85
|
+
{ signal: r(this, i).signal }
|
|
86
|
+
), a.addEventListener(
|
|
87
87
|
"error",
|
|
88
88
|
() => {
|
|
89
89
|
var d;
|
|
90
|
-
const
|
|
91
|
-
|
|
90
|
+
const l = r(this, o).querySelector("slot");
|
|
91
|
+
l && (l.innerHTML = S), this.emit("error"), (d = r(this, i)) == null || d.abort();
|
|
92
92
|
},
|
|
93
|
-
{ signal: r(this,
|
|
93
|
+
{ signal: r(this, i).signal }
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
},
|
|
@@ -98,16 +98,16 @@ class C extends m {
|
|
|
98
98
|
type: String,
|
|
99
99
|
default: "",
|
|
100
100
|
observer: (t) => {
|
|
101
|
-
const
|
|
102
|
-
|
|
101
|
+
const a = this.shadowRoot.querySelector(".ea-avatar__img");
|
|
102
|
+
a && (a.srcset = t);
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
alt: {
|
|
106
106
|
type: String,
|
|
107
107
|
default: "",
|
|
108
108
|
observer: (t) => {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const a = this.shadowRoot.querySelector(".ea-avatar__img");
|
|
110
|
+
a && (a.alt = t);
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
fit: {
|
|
@@ -118,7 +118,7 @@ class C extends m {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}));
|
|
121
|
-
this.stylesheet =
|
|
121
|
+
this.stylesheet = w, this.$render();
|
|
122
122
|
}
|
|
123
123
|
static get observedAttributes() {
|
|
124
124
|
return [
|
|
@@ -137,22 +137,27 @@ class C extends m {
|
|
|
137
137
|
* @return {string} 属性值
|
|
138
138
|
*/
|
|
139
139
|
updateContainerClasslist() {
|
|
140
|
-
|
|
140
|
+
const t = this.computedClasslist("ea-avatar", {
|
|
141
141
|
["--" + this.shape]: this.shape
|
|
142
142
|
});
|
|
143
|
+
return r(this, o).className = t, t;
|
|
143
144
|
}
|
|
144
145
|
$render() {
|
|
145
146
|
this.shadowRoot.innerHTML = `
|
|
146
147
|
<div class="ea-avatar" part='container'>
|
|
147
|
-
<slot>${
|
|
148
|
+
<slot>${u}</slot>
|
|
148
149
|
</div>
|
|
149
|
-
`, h(this,
|
|
150
|
+
`, h(this, o, this.shadowRoot.querySelector(".ea-avatar")), this.updateContainerClasslist();
|
|
150
151
|
}
|
|
151
152
|
connectedCallback() {
|
|
152
|
-
super.connectedCallback()
|
|
153
|
+
super.connectedCallback();
|
|
154
|
+
}
|
|
155
|
+
$beforeUnmounted() {
|
|
156
|
+
var t;
|
|
157
|
+
(t = r(this, i)) == null || t.abort();
|
|
153
158
|
}
|
|
154
159
|
}
|
|
155
|
-
|
|
160
|
+
o = new WeakMap(), i = new WeakMap();
|
|
156
161
|
window.customElements.get("ea-avatar") || window.customElements.define("ea-avatar", C);
|
|
157
162
|
export {
|
|
158
163
|
C as EaAvatar
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
2
|
var S = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var y = (t,
|
|
6
|
-
var f = (t,
|
|
7
|
-
var
|
|
8
|
-
import { B as
|
|
5
|
+
var y = (t, r, e) => r in t ? E(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
6
|
+
var f = (t, r, e) => y(t, typeof r != "symbol" ? r + "" : r, e), w = (t, r, e) => r.has(t) || S("Cannot " + e);
|
|
7
|
+
var s = (t, r, e) => (w(t, r, "read from private field"), e ? e.call(t) : r.get(t)), a = (t, r, e) => r.has(t) ? S("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, e), i = (t, r, e, n) => (w(t, r, "write to private field"), n ? n.call(t, e) : r.set(t, e), e);
|
|
8
|
+
import { B as C } from "./Base.js";
|
|
9
9
|
import { s as v } from "../css/ea-breadcrumb.style.js";
|
|
10
10
|
import { s as R } from "../css/ea-breadcrumb-item.style.js";
|
|
11
11
|
import { E as _ } from "../utils/Utils.js";
|
|
12
|
-
var c, d,
|
|
13
|
-
class
|
|
12
|
+
var l, c, d, b, p;
|
|
13
|
+
class $ extends C {
|
|
14
14
|
constructor() {
|
|
15
15
|
super();
|
|
16
16
|
/** @type {HTMLElement} */
|
|
17
|
-
a(this,
|
|
17
|
+
a(this, l);
|
|
18
18
|
/** @type {HTMLSlotElement} */
|
|
19
|
-
a(this,
|
|
19
|
+
a(this, c);
|
|
20
20
|
/** @type {AbortController} */
|
|
21
|
-
a(this,
|
|
21
|
+
a(this, d, new AbortController());
|
|
22
22
|
f(this, "state", this.properties({
|
|
23
23
|
separator: {
|
|
24
24
|
type: String,
|
|
@@ -41,10 +41,10 @@ class q extends E {
|
|
|
41
41
|
*/
|
|
42
42
|
a(this, p, () => {
|
|
43
43
|
const n = [...this.shadowRoot.querySelector("#defaultSlot").assignedElements()].filter(
|
|
44
|
-
(
|
|
45
|
-
), o =
|
|
46
|
-
n.forEach((
|
|
47
|
-
g < n.length - 1 && !
|
|
44
|
+
(m) => m.tagName.toLowerCase() === "ea-breadcrumb-item"
|
|
45
|
+
), o = s(this, b).call(this, this.separator);
|
|
46
|
+
n.forEach((m, g) => {
|
|
47
|
+
g < n.length - 1 && !m.querySelector("[slot='separator']") && m.appendChild(o.cloneNode(!0));
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
this.stylesheet = v, this.$render();
|
|
@@ -60,7 +60,7 @@ class q extends E {
|
|
|
60
60
|
const e = this.computedClasslist("ea-breadcrumb", {
|
|
61
61
|
// ['--' + this.type]: this.type,
|
|
62
62
|
});
|
|
63
|
-
return
|
|
63
|
+
return s(this, l).className = e, e;
|
|
64
64
|
}
|
|
65
65
|
$render() {
|
|
66
66
|
this.shadowRoot.innerHTML = `
|
|
@@ -68,34 +68,34 @@ class q extends E {
|
|
|
68
68
|
<slot id="defaultSlot"></slot>
|
|
69
69
|
</nav>
|
|
70
70
|
<slot id="separatorSlot" name="separator"></slot>
|
|
71
|
-
`,
|
|
71
|
+
`, i(this, l, this.shadowRoot.querySelector(".ea-breadcrumb")), i(this, c, this.shadowRoot.querySelector("#defaultSlot"));
|
|
72
72
|
}
|
|
73
73
|
connectedCallback() {
|
|
74
|
-
super.connectedCallback(),
|
|
75
|
-
signal:
|
|
74
|
+
super.connectedCallback(), s(this, c).addEventListener("slotchange", s(this, p), {
|
|
75
|
+
signal: s(this, d).signal
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
$beforeUnmounted() {
|
|
79
79
|
var e;
|
|
80
|
-
(e =
|
|
80
|
+
(e = s(this, d)) == null || e.abort();
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
window.customElements.get("ea-breadcrumb") || window.customElements.define("ea-breadcrumb",
|
|
85
|
-
var
|
|
86
|
-
class
|
|
83
|
+
l = new WeakMap(), c = new WeakMap(), d = new WeakMap(), b = new WeakMap(), p = new WeakMap();
|
|
84
|
+
window.customElements.get("ea-breadcrumb") || window.customElements.define("ea-breadcrumb", $);
|
|
85
|
+
var u, h;
|
|
86
|
+
class q extends C {
|
|
87
87
|
constructor() {
|
|
88
88
|
super();
|
|
89
89
|
/** @type {HTMLElement} */
|
|
90
|
-
a(this,
|
|
90
|
+
a(this, u);
|
|
91
91
|
/** @type {HTMLElement} */
|
|
92
|
-
a(this,
|
|
92
|
+
a(this, h);
|
|
93
93
|
f(this, "state", this.properties({
|
|
94
94
|
href: {
|
|
95
95
|
type: String,
|
|
96
96
|
default: "",
|
|
97
97
|
observer: (e) => {
|
|
98
|
-
|
|
98
|
+
this.$render(), s(this, h).href = this.getAttribute("href");
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}));
|
|
@@ -112,7 +112,7 @@ class A extends E {
|
|
|
112
112
|
const e = this.computedClasslist("ea-breadcrumb-item", {
|
|
113
113
|
// ['--' + this.type]: this.type,
|
|
114
114
|
});
|
|
115
|
-
return
|
|
115
|
+
return s(this, u).className = e, e;
|
|
116
116
|
}
|
|
117
117
|
$render() {
|
|
118
118
|
const e = _.EaElement.h(
|
|
@@ -132,17 +132,17 @@ class A extends E {
|
|
|
132
132
|
<slot name="separator"></slot>
|
|
133
133
|
</span>
|
|
134
134
|
</div>
|
|
135
|
-
`,
|
|
135
|
+
`, i(this, u, this.shadowRoot.querySelector(".ea-breadcrumb-item")), i(this, h, this.shadowRoot.querySelector(
|
|
136
136
|
".ea-breadcrumb-item__content"
|
|
137
|
-
));
|
|
137
|
+
)), this.updateContainerClasslist();
|
|
138
138
|
}
|
|
139
139
|
connectedCallback() {
|
|
140
140
|
super.connectedCallback();
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
window.customElements.get("ea-breadcrumb-item") || window.customElements.define("ea-breadcrumb-item",
|
|
143
|
+
u = new WeakMap(), h = new WeakMap();
|
|
144
|
+
window.customElements.get("ea-breadcrumb-item") || window.customElements.define("ea-breadcrumb-item", q);
|
|
145
145
|
export {
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
$ as EaBreadcrumb,
|
|
147
|
+
q as EaBreadcrumbItem
|
|
148
148
|
};
|