easy-component-ui 3.0.13 → 3.0.14
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/package.json +8 -2
- package/dist/assets/icon.css +0 -1
- package/dist/components/Base.js +0 -874
- package/dist/components/ea-alert.js +0 -213
- package/dist/components/ea-avatar.js +0 -164
- package/dist/components/ea-backtop.js +0 -136
- package/dist/components/ea-badge.js +0 -144
- package/dist/components/ea-breadcrumb.js +0 -148
- package/dist/components/ea-button.js +0 -266
- package/dist/components/ea-calendar.js +0 -10
- package/dist/components/ea-calendar2.js +0 -673
- package/dist/components/ea-card.js +0 -121
- package/dist/components/ea-carousel.js +0 -415
- package/dist/components/ea-checkbox.js +0 -446
- package/dist/components/ea-collapse.js +0 -313
- package/dist/components/ea-color-picker.js +0 -888
- package/dist/components/ea-container.js +0 -206
- package/dist/components/ea-countdown.js +0 -142
- package/dist/components/ea-date-picker.js +0 -649
- package/dist/components/ea-descriptions.js +0 -474
- package/dist/components/ea-dialog.js +0 -249
- package/dist/components/ea-drawer.js +0 -216
- package/dist/components/ea-dropdown.js +0 -228
- package/dist/components/ea-empty.js +0 -93
- package/dist/components/ea-icon.js +0 -158
- package/dist/components/ea-image-preview.js +0 -532
- package/dist/components/ea-image.js +0 -327
- package/dist/components/ea-infinite-scroll.js +0 -109
- package/dist/components/ea-input-number.js +0 -367
- package/dist/components/ea-input.js +0 -588
- package/dist/components/ea-layout.js +0 -132
- package/dist/components/ea-link.js +0 -101
- package/dist/components/ea-menu.js +0 -433
- package/dist/components/ea-message-box.js +0 -624
- package/dist/components/ea-message.js +0 -314
- package/dist/components/ea-notification.js +0 -331
- package/dist/components/ea-overlay.js +0 -168
- package/dist/components/ea-page-header.js +0 -108
- package/dist/components/ea-pagination.js +0 -481
- package/dist/components/ea-popconfirm.js +0 -275
- package/dist/components/ea-popover.js +0 -147
- package/dist/components/ea-popper.js +0 -203
- package/dist/components/ea-progress.js +0 -286
- package/dist/components/ea-radio.js +0 -364
- package/dist/components/ea-rate.js +0 -241
- package/dist/components/ea-result.js +0 -100
- package/dist/components/ea-scrollbar.js +0 -235
- package/dist/components/ea-segmented.js +0 -215
- package/dist/components/ea-select.js +0 -609
- package/dist/components/ea-skeleton.js +0 -263
- package/dist/components/ea-slider.js +0 -430
- package/dist/components/ea-space.js +0 -123
- package/dist/components/ea-splitter.js +0 -233
- package/dist/components/ea-statistic.js +0 -74
- package/dist/components/ea-steps.js +0 -346
- package/dist/components/ea-switch.js +0 -271
- package/dist/components/ea-table.js +0 -1135
- package/dist/components/ea-tabs.js +0 -501
- package/dist/components/ea-tag.js +0 -228
- package/dist/components/ea-text.js +0 -113
- package/dist/components/ea-time-picker.js +0 -510
- package/dist/components/ea-timeline.js +0 -185
- package/dist/components/ea-tooltip.js +0 -161
- package/dist/components/ea-tour.js +0 -544
- package/dist/components/ea-transfer.js +0 -949
- package/dist/components/ea-tree.js +0 -1125
- package/dist/components/index.js +0 -60
- package/dist/core/FormBase.js +0 -238
- package/dist/css/ea-alert.style.js +0 -4
- package/dist/css/ea-aside.style.js +0 -4
- package/dist/css/ea-avatar.style.js +0 -4
- package/dist/css/ea-backtop.style.js +0 -4
- package/dist/css/ea-badge.style.js +0 -4
- package/dist/css/ea-breadcrumb-item.style.js +0 -4
- package/dist/css/ea-breadcrumb.style.js +0 -4
- package/dist/css/ea-button-group.style.js +0 -4
- package/dist/css/ea-button.style.js +0 -4
- package/dist/css/ea-calendar.style.js +0 -4
- package/dist/css/ea-card.style.js +0 -4
- package/dist/css/ea-carousel-item.style.js +0 -4
- package/dist/css/ea-carousel.style.js +0 -4
- package/dist/css/ea-check-tag.style.js +0 -4
- package/dist/css/ea-checkbox-group.style.js +0 -4
- package/dist/css/ea-checkbox.style.js +0 -4
- package/dist/css/ea-col.style.js +0 -4
- package/dist/css/ea-collapse-item.style.js +0 -4
- package/dist/css/ea-collapse.style.js +0 -4
- package/dist/css/ea-color-picker-panel.style.js +0 -4
- package/dist/css/ea-color-picker.style.js +0 -4
- package/dist/css/ea-container.style.js +0 -4
- package/dist/css/ea-date-picker.style.js +0 -4
- package/dist/css/ea-descriptions-item.style.js +0 -4
- package/dist/css/ea-descriptions.style.js +0 -4
- package/dist/css/ea-dialog.style.js +0 -4
- package/dist/css/ea-drawer.style.js +0 -4
- package/dist/css/ea-dropdown-item.style.js +0 -4
- package/dist/css/ea-dropdown-menu.style.js +0 -4
- package/dist/css/ea-dropdown.style.js +0 -4
- package/dist/css/ea-empty.style.js +0 -4
- package/dist/css/ea-footer.style.js +0 -4
- package/dist/css/ea-header.style.js +0 -4
- package/dist/css/ea-icon.style.js +0 -4
- package/dist/css/ea-image-preview.style.js +0 -4
- package/dist/css/ea-image.style.js +0 -4
- package/dist/css/ea-infinite-scroll.style.js +0 -4
- package/dist/css/ea-input-number.style.js +0 -4
- package/dist/css/ea-input.style.js +0 -4
- package/dist/css/ea-link.style.js +0 -4
- package/dist/css/ea-main.style.js +0 -4
- package/dist/css/ea-menu-item-group.style.js +0 -4
- package/dist/css/ea-menu-item.style.js +0 -4
- package/dist/css/ea-menu.style.js +0 -4
- package/dist/css/ea-message-box.style.js +0 -4
- package/dist/css/ea-message.style.js +0 -4
- package/dist/css/ea-notification.style.js +0 -4
- package/dist/css/ea-option-gropu.style.js +0 -4
- package/dist/css/ea-option.style.js +0 -4
- package/dist/css/ea-overlay.style.js +0 -4
- package/dist/css/ea-page-header.style.js +0 -4
- package/dist/css/ea-pagination.style.js +0 -4
- package/dist/css/ea-popconfirm.style.js +0 -4
- package/dist/css/ea-popover.style.js +0 -4
- package/dist/css/ea-popper.style.js +0 -4
- package/dist/css/ea-progress.style.js +0 -4
- package/dist/css/ea-radio-group.style.js +0 -4
- package/dist/css/ea-radio.style.js +0 -4
- package/dist/css/ea-rate.style.js +0 -4
- package/dist/css/ea-result.style.js +0 -4
- package/dist/css/ea-row.style.js +0 -4
- package/dist/css/ea-scrollbar.style.js +0 -4
- package/dist/css/ea-segmented.style.js +0 -4
- package/dist/css/ea-select.style.js +0 -4
- package/dist/css/ea-skeleton-item.style.js +0 -4
- package/dist/css/ea-skeleton.style.js +0 -4
- package/dist/css/ea-slider.style.js +0 -4
- package/dist/css/ea-space.style.js +0 -4
- package/dist/css/ea-splitter-bar.style.js +0 -4
- package/dist/css/ea-splitter-panel.style.js +0 -4
- package/dist/css/ea-splitter.style.js +0 -4
- package/dist/css/ea-statistic.style.js +0 -4
- package/dist/css/ea-step.style.js +0 -4
- package/dist/css/ea-steps.style.js +0 -4
- package/dist/css/ea-sub-menu.style.js +0 -4
- package/dist/css/ea-switch.style.js +0 -4
- package/dist/css/ea-tab-panel.style.js +0 -4
- package/dist/css/ea-tab.style.js +0 -4
- package/dist/css/ea-table-column.style.js +0 -4
- package/dist/css/ea-table.style.js +0 -4
- package/dist/css/ea-tabs.style.js +0 -4
- package/dist/css/ea-tag.style.js +0 -4
- package/dist/css/ea-text.style.js +0 -4
- package/dist/css/ea-time-picker.style.js +0 -4
- package/dist/css/ea-timeline-item.style.js +0 -4
- package/dist/css/ea-timeline.style.js +0 -4
- package/dist/css/ea-tooltip.style.js +0 -4
- package/dist/css/ea-tour-step.style.js +0 -4
- package/dist/css/ea-tour.style.js +0 -4
- package/dist/css/ea-transfer.style.js +0 -5
- package/dist/css/ea-tree.style.js +0 -6
- package/dist/css/ea-ui-component.style.js +0 -4
- package/dist/favicon.ico +0 -0
- package/dist/utils/Color.js +0 -439
- package/dist/utils/I18nManager.js +0 -218
- package/dist/utils/Utils.js +0 -65
- package/dist/utils/Variables.js +0 -12
- package/dist/utils/parseTime.js +0 -73
- package/dist/utils/timeout.js +0 -9
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var n = (t) => {
|
|
3
|
-
throw TypeError(t);
|
|
4
|
-
};
|
|
5
|
-
var b = (t, s, e) => s in t ? m(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
6
|
-
var p = (t, s, e) => b(t, typeof s != "symbol" ? s + "" : s, e), c = (t, s, e) => s.has(t) || n("Cannot " + e);
|
|
7
|
-
var u = (t, s, e) => (c(t, s, "read from private field"), e ? e.call(t) : s.get(t)), d = (t, s, e) => s.has(t) ? n("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), h = (t, s, e, a) => (c(t, s, "write to private field"), a ? a.call(t, e) : s.set(t, e), e);
|
|
8
|
-
import { B as g } from "./Base.js";
|
|
9
|
-
import { s as y } from "../css/ea-space.style.js";
|
|
10
|
-
var r;
|
|
11
|
-
class v extends g {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
/** @type {HTMLElement} */
|
|
15
|
-
d(this, r);
|
|
16
|
-
p(this, "state", this.properties({
|
|
17
|
-
wrap: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: !1,
|
|
20
|
-
observer: (e) => {
|
|
21
|
-
this.style.setProperty("--ea-space-wrap", e ? "wrap" : "nowrap");
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
alignment: {
|
|
25
|
-
type: ["", "center", "flex-start", "flex-end", "baseline", "stretch"],
|
|
26
|
-
default: "",
|
|
27
|
-
observer: (e) => {
|
|
28
|
-
if (!CSS.supports("align-items", e))
|
|
29
|
-
return console.warn(`[ea-space] Invalid alignment value ${e}`);
|
|
30
|
-
this.style.setProperty("--ea-space-alignment", e);
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
direction: {
|
|
34
|
-
type: ["vertical", "horizontal"],
|
|
35
|
-
default: "horizontal",
|
|
36
|
-
observer: () => {
|
|
37
|
-
this.updateContainerClasslist();
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: "default",
|
|
43
|
-
observer: (e) => {
|
|
44
|
-
if (["large", "small", "default"].includes(e))
|
|
45
|
-
this.updateContainerClasslist();
|
|
46
|
-
else {
|
|
47
|
-
if (!CSS.supports("gap", e))
|
|
48
|
-
return console.warn("[ea-space] Invalid size value");
|
|
49
|
-
this.style.setProperty("--ea-space-gap", e);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
spacer: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: "",
|
|
56
|
-
observer: (e) => {
|
|
57
|
-
if (this.querySelectorAll('[part="spacer"]').forEach((i) => i.remove()), !e) return;
|
|
58
|
-
const o = [...this.children];
|
|
59
|
-
o.forEach((i, f) => {
|
|
60
|
-
if (f < o.length - 1) {
|
|
61
|
-
const l = document.createElement("span");
|
|
62
|
-
l.innerText = e, l.part = "spacer", this.insertBefore(l, i.nextSibling);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
fill: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: !1,
|
|
70
|
-
observer: () => {
|
|
71
|
-
this.updateContainerClasslist();
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"fill-ratio": {
|
|
75
|
-
type: Number,
|
|
76
|
-
default: 100,
|
|
77
|
-
observer: (e) => {
|
|
78
|
-
Number.isNaN(Number(e)) || this.toggleAttribute("fill", !0), this.style.setProperty("--ea-space-fill-ratio", `${e}%`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}));
|
|
82
|
-
this.stylesheet = y, this.$render();
|
|
83
|
-
}
|
|
84
|
-
static get observedAttributes() {
|
|
85
|
-
return [
|
|
86
|
-
...super.observedAttributes,
|
|
87
|
-
"wrap",
|
|
88
|
-
"direction",
|
|
89
|
-
"size",
|
|
90
|
-
"spacer",
|
|
91
|
-
"alignment",
|
|
92
|
-
"fill",
|
|
93
|
-
"fill-ratio"
|
|
94
|
-
];
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* 获取 classlist 列表
|
|
98
|
-
* @return {string} 属性值
|
|
99
|
-
*/
|
|
100
|
-
updateContainerClasslist() {
|
|
101
|
-
const e = this.computedClasslist("ea-space", {
|
|
102
|
-
[`--${this.size}`]: !CSS.supports("gap", this.size),
|
|
103
|
-
["--" + this.direction]: this.direction,
|
|
104
|
-
"--fill": this.fill
|
|
105
|
-
});
|
|
106
|
-
return u(this, r).className = e, e;
|
|
107
|
-
}
|
|
108
|
-
$render() {
|
|
109
|
-
this.shadowRoot.innerHTML = `
|
|
110
|
-
<div class="ea-space" part="container">
|
|
111
|
-
<slot></slot>
|
|
112
|
-
</div>
|
|
113
|
-
`, h(this, r, this.shadowRoot.querySelector(".ea-space")), this.updateContainerClasslist();
|
|
114
|
-
}
|
|
115
|
-
connectedCallback() {
|
|
116
|
-
super.connectedCallback();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
r = new WeakMap();
|
|
120
|
-
window.customElements.get("ea-space") || window.customElements.define("ea-space", v);
|
|
121
|
-
export {
|
|
122
|
-
v as EaSpace
|
|
123
|
-
};
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
var $ = Object.defineProperty;
|
|
2
|
-
var W = (e) => {
|
|
3
|
-
throw TypeError(e);
|
|
4
|
-
};
|
|
5
|
-
var k = (e, s, t) => s in e ? $(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
-
var f = (e, s, t) => k(e, typeof s != "symbol" ? s + "" : s, t), L = (e, s, t) => s.has(e) || W("Cannot " + t);
|
|
7
|
-
var n = (e, s, t) => (L(e, s, "read from private field"), t ? t.call(e) : s.get(e)), c = (e, s, t) => s.has(e) ? W("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), b = (e, s, t, i) => (L(e, s, "write to private field"), i ? i.call(e, t) : s.set(e, t), t);
|
|
8
|
-
import { B as N } from "./Base.js";
|
|
9
|
-
import { s as I } from "../css/ea-splitter.style.js";
|
|
10
|
-
import { s as M } from "../css/ea-splitter-panel.style.js";
|
|
11
|
-
import { s as q } from "../css/ea-splitter-bar.style.js";
|
|
12
|
-
const d = (e) => e.endsWith("px") ? parseInt(e.replace("px", "")) : e.endsWith("%") ? Number(e.replace("%", "")) / 100 : parseInt(e);
|
|
13
|
-
var a, m, h, y, v;
|
|
14
|
-
class D extends N {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
/** @type {HTMLElement} */
|
|
18
|
-
c(this, a);
|
|
19
|
-
/** @type {AbortController} */
|
|
20
|
-
c(this, m);
|
|
21
|
-
f(this, "state", this.properties({
|
|
22
|
-
layout: {
|
|
23
|
-
type: ["horizontal", "vertical"],
|
|
24
|
-
default: "horizontal",
|
|
25
|
-
observer: (t) => {
|
|
26
|
-
n(this, a).style.setProperty(
|
|
27
|
-
"--ea-splitter-direction",
|
|
28
|
-
t === "vertical" ? "column" : "row"
|
|
29
|
-
), n(this, a).className = this.updateContainerClasslist();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}));
|
|
33
|
-
/**
|
|
34
|
-
* 派发 resizeStart 事件
|
|
35
|
-
* @param {string} eventName 事件名称
|
|
36
|
-
*/
|
|
37
|
-
c(this, h, (t) => {
|
|
38
|
-
this.dispatchEvent(
|
|
39
|
-
new CustomEvent(t, {
|
|
40
|
-
detail: {
|
|
41
|
-
size: [...this.children].filter((i) => i.tagName === "EA-SPLITTER-PANEL").map(
|
|
42
|
-
(i) => {
|
|
43
|
-
var o;
|
|
44
|
-
return (o = i.getBoundingClientRect()) == null ? void 0 : o[this.layout === "vertical" ? "height" : "width"];
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
);
|
|
50
|
-
});
|
|
51
|
-
/**
|
|
52
|
-
* `layout="horizontal"` 时的 `resize` 事件监听
|
|
53
|
-
* @param {MouseEvent} e
|
|
54
|
-
*/
|
|
55
|
-
c(this, y, (t) => {
|
|
56
|
-
t.preventDefault(), t.stopPropagation();
|
|
57
|
-
const i = new AbortController(), o = Number(t.target.getAttribute("data-index")), r = this.children[o - 1], l = this.children[o + 1], R = t.clientX, z = r.getBoundingClientRect().width, P = l.getBoundingClientRect().width;
|
|
58
|
-
n(this, h).call(this, "panel-resize-start");
|
|
59
|
-
const S = (H) => {
|
|
60
|
-
t.preventDefault(), t.stopPropagation();
|
|
61
|
-
const g = H.clientX - R, C = z + g, w = P - g;
|
|
62
|
-
let p = 0, u = 0;
|
|
63
|
-
r.min.endsWith("%") ? (p = n(this, a).clientWidth * d(r.min), u = n(this, a).clientWidth * d(l.min)) : r.min.endsWith("px") && (p = d(r.min), u = d(l.min)), !(C <= p || w <= u) && (r.size = C + "px", l.size = w + "px", n(this, h).call(this, "panel-resize"));
|
|
64
|
-
}, A = () => {
|
|
65
|
-
i.abort(), n(this, h).call(this, "panel-resize-end");
|
|
66
|
-
};
|
|
67
|
-
window.addEventListener("mousemove", S, {
|
|
68
|
-
signal: i.signal
|
|
69
|
-
}), window.addEventListener("mouseup", A, {
|
|
70
|
-
signal: i.signal
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
/**
|
|
74
|
-
* `layout="vertical"` 时的 `resize` 事件监听
|
|
75
|
-
* @param {MouseEvent} e
|
|
76
|
-
*/
|
|
77
|
-
c(this, v, (t) => {
|
|
78
|
-
t.preventDefault(), t.stopPropagation();
|
|
79
|
-
const i = new AbortController(), o = Number(t.target.getAttribute("data-index")), r = this.children[o - 1], l = this.children[o + 1], R = t.clientY, z = r.getBoundingClientRect().height, P = l.getBoundingClientRect().height;
|
|
80
|
-
n(this, h).call(this, "resize-start");
|
|
81
|
-
const S = (H) => {
|
|
82
|
-
t.preventDefault(), t.stopPropagation();
|
|
83
|
-
const g = H.clientY - R, C = z + g, w = P - g;
|
|
84
|
-
let p = 0, u = 0;
|
|
85
|
-
r.min.endsWith("%") ? (p = n(this, a).clientHeight * d(r.min), u = n(this, a).clientHeight * d(l.min)) : r.min.endsWith("px") && (p = d(r.min), u = d(l.min)), !(C <= p || w <= u) && (r.size = C + "px", l.size = w + "px", n(this, h).call(this, "panel-resize"));
|
|
86
|
-
}, A = () => {
|
|
87
|
-
i.abort(), n(this, h).call(this, "panel-resize-end");
|
|
88
|
-
};
|
|
89
|
-
window.addEventListener("mousemove", S, {
|
|
90
|
-
signal: i.signal
|
|
91
|
-
}), window.addEventListener("mouseup", A, {
|
|
92
|
-
signal: i.signal
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
this.stylesheet = I, this.$render();
|
|
96
|
-
}
|
|
97
|
-
static get observedAttributes() {
|
|
98
|
-
return ["layout"];
|
|
99
|
-
}
|
|
100
|
-
$render() {
|
|
101
|
-
this.shadowRoot.innerHTML = `
|
|
102
|
-
<div class="ea-splitter" part="container">
|
|
103
|
-
<slot></slot>
|
|
104
|
-
</div>
|
|
105
|
-
`, b(this, a, this.shadowRoot.querySelector(".ea-splitter"));
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* 获取 classlist 列表
|
|
109
|
-
* @return {string} 属性值
|
|
110
|
-
*/
|
|
111
|
-
updateContainerClasslist() {
|
|
112
|
-
return this.computedClasslist("ea-splitter", {
|
|
113
|
-
["--" + this.layout]: !!(this.layout || this.layout === "")
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
connectedCallback() {
|
|
117
|
-
super.connectedCallback(), b(this, m, new AbortController()), queueMicrotask(() => {
|
|
118
|
-
let t = [...this.children];
|
|
119
|
-
[...this.children].forEach((i, o) => {
|
|
120
|
-
if (i.tagName === "EA-SPLITTER-PANEL" && (i.layout = this.layout, i.setAttribute("data-panel-index", o), o < t.length - 1)) {
|
|
121
|
-
const r = document.createElement("ea-splitter-bar");
|
|
122
|
-
this.insertBefore(r, i.nextSibling);
|
|
123
|
-
}
|
|
124
|
-
}), t = [...this.children], t.forEach((i, o) => {
|
|
125
|
-
i.tagName === "EA-SPLITTER-BAR" && (i.setAttribute("data-index", o), i.layout = this.layout, i.addEventListener(
|
|
126
|
-
"mousedown",
|
|
127
|
-
this.layout === "horizontal" ? n(this, y) : n(this, v),
|
|
128
|
-
{ signal: n(this, m).signal }
|
|
129
|
-
));
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
$beforeUnmounted() {
|
|
134
|
-
var t;
|
|
135
|
-
(t = n(this, m)) == null || t.abort();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
a = new WeakMap(), m = new WeakMap(), h = new WeakMap(), y = new WeakMap(), v = new WeakMap();
|
|
139
|
-
window.customElements.get("ea-splitter") || window.customElements.define("ea-splitter", D);
|
|
140
|
-
var E;
|
|
141
|
-
class X extends N {
|
|
142
|
-
constructor() {
|
|
143
|
-
super();
|
|
144
|
-
/** @type {HTMLElement} */
|
|
145
|
-
c(this, E);
|
|
146
|
-
f(this, "state", this.properties({
|
|
147
|
-
size: {
|
|
148
|
-
type: String,
|
|
149
|
-
default: "",
|
|
150
|
-
observer: (t) => {
|
|
151
|
-
CSS.supports("width", t) && this.style.setProperty("--ea-splitter-panel-size", t);
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
min: {
|
|
155
|
-
type: String,
|
|
156
|
-
default: "",
|
|
157
|
-
observer: (t) => {
|
|
158
|
-
CSS.supports("width", t) && this.style.setProperty("--ea-splitter-panel-min-size", t);
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
layout: {
|
|
162
|
-
type: ["vertical", "horizontal"],
|
|
163
|
-
default: "horizontal",
|
|
164
|
-
observer: (t) => {
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}));
|
|
168
|
-
this.stylesheet = M, this.$render();
|
|
169
|
-
}
|
|
170
|
-
static get observedAttributes() {
|
|
171
|
-
return ["size", "min", "layout"];
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* 获取 classlist 列表
|
|
175
|
-
* @return {string} 属性值
|
|
176
|
-
*/
|
|
177
|
-
updateContainerClasslist() {
|
|
178
|
-
return this.computedClasslist("ea-splitter-panel", {
|
|
179
|
-
// ['--' + this.state.type]: this.state.type,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
$render() {
|
|
183
|
-
this.shadowRoot.innerHTML = `
|
|
184
|
-
<div class="ea-splitter-panel" part="container">
|
|
185
|
-
<slot></slot>
|
|
186
|
-
</div>
|
|
187
|
-
`, b(this, E, this.shadowRoot.querySelector(".ea-splitter-panel"));
|
|
188
|
-
}
|
|
189
|
-
connectedCallback() {
|
|
190
|
-
super.connectedCallback();
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
E = new WeakMap();
|
|
194
|
-
window.customElements.get("ea-splitter-panel") || window.customElements.define("ea-splitter-panel", X);
|
|
195
|
-
var x;
|
|
196
|
-
class Y extends N {
|
|
197
|
-
constructor() {
|
|
198
|
-
super();
|
|
199
|
-
/** @type {HTMLElement} */
|
|
200
|
-
c(this, x);
|
|
201
|
-
f(this, "state", this.properties({
|
|
202
|
-
layout: {
|
|
203
|
-
type: ["vertical", "horizontal"],
|
|
204
|
-
default: "",
|
|
205
|
-
observer: (t) => {
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}));
|
|
209
|
-
this.stylesheet = q, this.$render();
|
|
210
|
-
}
|
|
211
|
-
static get observedAttributes() {
|
|
212
|
-
return ["layout"];
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* 获取 classlist 列表
|
|
216
|
-
* @return {string} 属性值
|
|
217
|
-
*/
|
|
218
|
-
updateContainerClasslist() {
|
|
219
|
-
return this.computedClasslist("ea-splitter-bar", {
|
|
220
|
-
// ['--' + this.state.type]: this.state.type,
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
$render() {
|
|
224
|
-
this.shadowRoot.innerHTML = `
|
|
225
|
-
<div class="ea-splitter-bar" part="container"></div>
|
|
226
|
-
`, b(this, x, this.shadowRoot.querySelector(".ea-splitter-bar"));
|
|
227
|
-
}
|
|
228
|
-
connectedCallback() {
|
|
229
|
-
super.connectedCallback();
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
x = new WeakMap();
|
|
233
|
-
window.customElements.get("ea-splitter-bar") || window.customElements.define("ea-splitter-bar", Y);
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var p = (t) => {
|
|
3
|
-
throw TypeError(t);
|
|
4
|
-
};
|
|
5
|
-
var _ = (t, e, s) => e in t ? m(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
|
-
var d = (t, e, s) => _(t, typeof e != "symbol" ? e + "" : e, s), f = (t, e, s) => e.has(t) || p("Cannot " + s);
|
|
7
|
-
var h = (t, e, s) => (f(t, e, "read from private field"), s ? s.call(t) : e.get(t)), a = (t, e, s) => e.has(t) ? p("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), i = (t, e, s, u) => (f(t, e, "write to private field"), u ? u.call(t, s) : e.set(t, s), s);
|
|
8
|
-
import { B as x } from "./Base.js";
|
|
9
|
-
import { s as b } from "../css/ea-statistic.style.js";
|
|
10
|
-
var n, r, o, c, l;
|
|
11
|
-
class w extends x {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
/** @type {HTMLElement} */
|
|
15
|
-
a(this, n);
|
|
16
|
-
/** @type {HTMLElement} */
|
|
17
|
-
a(this, r);
|
|
18
|
-
/** @type {HTMLElement} */
|
|
19
|
-
a(this, o);
|
|
20
|
-
/** @type {HTMLElement} */
|
|
21
|
-
a(this, c);
|
|
22
|
-
/** @type {HTMLElement} */
|
|
23
|
-
a(this, l);
|
|
24
|
-
d(this, "state", this.properties({
|
|
25
|
-
title: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "",
|
|
28
|
-
observer: (s) => {
|
|
29
|
-
h(this, r).textContent = s;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
value: {
|
|
33
|
-
type: Number,
|
|
34
|
-
default: 0,
|
|
35
|
-
/** @param {Number} newVal */
|
|
36
|
-
observer: (s) => {
|
|
37
|
-
h(this, o).textContent = s.toLocaleString();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}));
|
|
41
|
-
this.stylesheet = b, this.$render();
|
|
42
|
-
}
|
|
43
|
-
static get observedAttributes() {
|
|
44
|
-
return [...super.observedAttributes, "title", "value"];
|
|
45
|
-
}
|
|
46
|
-
$render() {
|
|
47
|
-
this.shadowRoot.innerHTML = `
|
|
48
|
-
<div class='ea-statistic' part='container'>
|
|
49
|
-
<header class='ea-statistic__header' part='title'>
|
|
50
|
-
<slot name='title'></slot>
|
|
51
|
-
</header>
|
|
52
|
-
<main class='ea-statistic__content' part='content'>
|
|
53
|
-
<span class='ea-statistic__prefix' part='prefix'>
|
|
54
|
-
<slot name='prefix'></slot>
|
|
55
|
-
</span>
|
|
56
|
-
<span class='ea-statistic__number' part='number'>
|
|
57
|
-
<slot></slot>
|
|
58
|
-
</span>
|
|
59
|
-
<span class='ea-statistic__suffix' part='suffix'>
|
|
60
|
-
<slot name='suffix'></slot>
|
|
61
|
-
</span>
|
|
62
|
-
</main>
|
|
63
|
-
</div>
|
|
64
|
-
`, i(this, n, this.shadowRoot.querySelector(".ea-statistic")), i(this, r, this.shadowRoot.querySelector(".ea-statistic__header slot")), i(this, o, this.shadowRoot.querySelector(".ea-statistic__number")), i(this, c, this.shadowRoot.querySelector(".ea-statistic__prefix slot")), i(this, l, this.shadowRoot.querySelector(".ea-statistic__suffix slot"));
|
|
65
|
-
}
|
|
66
|
-
connectedCallback() {
|
|
67
|
-
super.connectedCallback();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
n = new WeakMap(), r = new WeakMap(), o = new WeakMap(), c = new WeakMap(), l = new WeakMap();
|
|
71
|
-
window.customElements.get("ea-statistic") || window.customElements.define("ea-statistic", w);
|
|
72
|
-
export {
|
|
73
|
-
w as EaStatistic
|
|
74
|
-
};
|