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.
Files changed (168) hide show
  1. package/README.md +162 -162
  2. package/package.json +8 -2
  3. package/dist/assets/icon.css +0 -1
  4. package/dist/components/Base.js +0 -874
  5. package/dist/components/ea-alert.js +0 -213
  6. package/dist/components/ea-avatar.js +0 -164
  7. package/dist/components/ea-backtop.js +0 -136
  8. package/dist/components/ea-badge.js +0 -144
  9. package/dist/components/ea-breadcrumb.js +0 -148
  10. package/dist/components/ea-button.js +0 -266
  11. package/dist/components/ea-calendar.js +0 -10
  12. package/dist/components/ea-calendar2.js +0 -673
  13. package/dist/components/ea-card.js +0 -121
  14. package/dist/components/ea-carousel.js +0 -415
  15. package/dist/components/ea-checkbox.js +0 -446
  16. package/dist/components/ea-collapse.js +0 -313
  17. package/dist/components/ea-color-picker.js +0 -888
  18. package/dist/components/ea-container.js +0 -206
  19. package/dist/components/ea-countdown.js +0 -142
  20. package/dist/components/ea-date-picker.js +0 -649
  21. package/dist/components/ea-descriptions.js +0 -474
  22. package/dist/components/ea-dialog.js +0 -249
  23. package/dist/components/ea-drawer.js +0 -216
  24. package/dist/components/ea-dropdown.js +0 -228
  25. package/dist/components/ea-empty.js +0 -93
  26. package/dist/components/ea-icon.js +0 -158
  27. package/dist/components/ea-image-preview.js +0 -532
  28. package/dist/components/ea-image.js +0 -327
  29. package/dist/components/ea-infinite-scroll.js +0 -109
  30. package/dist/components/ea-input-number.js +0 -367
  31. package/dist/components/ea-input.js +0 -588
  32. package/dist/components/ea-layout.js +0 -132
  33. package/dist/components/ea-link.js +0 -101
  34. package/dist/components/ea-menu.js +0 -433
  35. package/dist/components/ea-message-box.js +0 -624
  36. package/dist/components/ea-message.js +0 -314
  37. package/dist/components/ea-notification.js +0 -331
  38. package/dist/components/ea-overlay.js +0 -168
  39. package/dist/components/ea-page-header.js +0 -108
  40. package/dist/components/ea-pagination.js +0 -481
  41. package/dist/components/ea-popconfirm.js +0 -275
  42. package/dist/components/ea-popover.js +0 -147
  43. package/dist/components/ea-popper.js +0 -203
  44. package/dist/components/ea-progress.js +0 -286
  45. package/dist/components/ea-radio.js +0 -364
  46. package/dist/components/ea-rate.js +0 -241
  47. package/dist/components/ea-result.js +0 -100
  48. package/dist/components/ea-scrollbar.js +0 -235
  49. package/dist/components/ea-segmented.js +0 -215
  50. package/dist/components/ea-select.js +0 -609
  51. package/dist/components/ea-skeleton.js +0 -263
  52. package/dist/components/ea-slider.js +0 -430
  53. package/dist/components/ea-space.js +0 -123
  54. package/dist/components/ea-splitter.js +0 -233
  55. package/dist/components/ea-statistic.js +0 -74
  56. package/dist/components/ea-steps.js +0 -346
  57. package/dist/components/ea-switch.js +0 -271
  58. package/dist/components/ea-table.js +0 -1135
  59. package/dist/components/ea-tabs.js +0 -501
  60. package/dist/components/ea-tag.js +0 -228
  61. package/dist/components/ea-text.js +0 -113
  62. package/dist/components/ea-time-picker.js +0 -510
  63. package/dist/components/ea-timeline.js +0 -185
  64. package/dist/components/ea-tooltip.js +0 -161
  65. package/dist/components/ea-tour.js +0 -544
  66. package/dist/components/ea-transfer.js +0 -949
  67. package/dist/components/ea-tree.js +0 -1125
  68. package/dist/components/index.js +0 -60
  69. package/dist/core/FormBase.js +0 -238
  70. package/dist/css/ea-alert.style.js +0 -4
  71. package/dist/css/ea-aside.style.js +0 -4
  72. package/dist/css/ea-avatar.style.js +0 -4
  73. package/dist/css/ea-backtop.style.js +0 -4
  74. package/dist/css/ea-badge.style.js +0 -4
  75. package/dist/css/ea-breadcrumb-item.style.js +0 -4
  76. package/dist/css/ea-breadcrumb.style.js +0 -4
  77. package/dist/css/ea-button-group.style.js +0 -4
  78. package/dist/css/ea-button.style.js +0 -4
  79. package/dist/css/ea-calendar.style.js +0 -4
  80. package/dist/css/ea-card.style.js +0 -4
  81. package/dist/css/ea-carousel-item.style.js +0 -4
  82. package/dist/css/ea-carousel.style.js +0 -4
  83. package/dist/css/ea-check-tag.style.js +0 -4
  84. package/dist/css/ea-checkbox-group.style.js +0 -4
  85. package/dist/css/ea-checkbox.style.js +0 -4
  86. package/dist/css/ea-col.style.js +0 -4
  87. package/dist/css/ea-collapse-item.style.js +0 -4
  88. package/dist/css/ea-collapse.style.js +0 -4
  89. package/dist/css/ea-color-picker-panel.style.js +0 -4
  90. package/dist/css/ea-color-picker.style.js +0 -4
  91. package/dist/css/ea-container.style.js +0 -4
  92. package/dist/css/ea-date-picker.style.js +0 -4
  93. package/dist/css/ea-descriptions-item.style.js +0 -4
  94. package/dist/css/ea-descriptions.style.js +0 -4
  95. package/dist/css/ea-dialog.style.js +0 -4
  96. package/dist/css/ea-drawer.style.js +0 -4
  97. package/dist/css/ea-dropdown-item.style.js +0 -4
  98. package/dist/css/ea-dropdown-menu.style.js +0 -4
  99. package/dist/css/ea-dropdown.style.js +0 -4
  100. package/dist/css/ea-empty.style.js +0 -4
  101. package/dist/css/ea-footer.style.js +0 -4
  102. package/dist/css/ea-header.style.js +0 -4
  103. package/dist/css/ea-icon.style.js +0 -4
  104. package/dist/css/ea-image-preview.style.js +0 -4
  105. package/dist/css/ea-image.style.js +0 -4
  106. package/dist/css/ea-infinite-scroll.style.js +0 -4
  107. package/dist/css/ea-input-number.style.js +0 -4
  108. package/dist/css/ea-input.style.js +0 -4
  109. package/dist/css/ea-link.style.js +0 -4
  110. package/dist/css/ea-main.style.js +0 -4
  111. package/dist/css/ea-menu-item-group.style.js +0 -4
  112. package/dist/css/ea-menu-item.style.js +0 -4
  113. package/dist/css/ea-menu.style.js +0 -4
  114. package/dist/css/ea-message-box.style.js +0 -4
  115. package/dist/css/ea-message.style.js +0 -4
  116. package/dist/css/ea-notification.style.js +0 -4
  117. package/dist/css/ea-option-gropu.style.js +0 -4
  118. package/dist/css/ea-option.style.js +0 -4
  119. package/dist/css/ea-overlay.style.js +0 -4
  120. package/dist/css/ea-page-header.style.js +0 -4
  121. package/dist/css/ea-pagination.style.js +0 -4
  122. package/dist/css/ea-popconfirm.style.js +0 -4
  123. package/dist/css/ea-popover.style.js +0 -4
  124. package/dist/css/ea-popper.style.js +0 -4
  125. package/dist/css/ea-progress.style.js +0 -4
  126. package/dist/css/ea-radio-group.style.js +0 -4
  127. package/dist/css/ea-radio.style.js +0 -4
  128. package/dist/css/ea-rate.style.js +0 -4
  129. package/dist/css/ea-result.style.js +0 -4
  130. package/dist/css/ea-row.style.js +0 -4
  131. package/dist/css/ea-scrollbar.style.js +0 -4
  132. package/dist/css/ea-segmented.style.js +0 -4
  133. package/dist/css/ea-select.style.js +0 -4
  134. package/dist/css/ea-skeleton-item.style.js +0 -4
  135. package/dist/css/ea-skeleton.style.js +0 -4
  136. package/dist/css/ea-slider.style.js +0 -4
  137. package/dist/css/ea-space.style.js +0 -4
  138. package/dist/css/ea-splitter-bar.style.js +0 -4
  139. package/dist/css/ea-splitter-panel.style.js +0 -4
  140. package/dist/css/ea-splitter.style.js +0 -4
  141. package/dist/css/ea-statistic.style.js +0 -4
  142. package/dist/css/ea-step.style.js +0 -4
  143. package/dist/css/ea-steps.style.js +0 -4
  144. package/dist/css/ea-sub-menu.style.js +0 -4
  145. package/dist/css/ea-switch.style.js +0 -4
  146. package/dist/css/ea-tab-panel.style.js +0 -4
  147. package/dist/css/ea-tab.style.js +0 -4
  148. package/dist/css/ea-table-column.style.js +0 -4
  149. package/dist/css/ea-table.style.js +0 -4
  150. package/dist/css/ea-tabs.style.js +0 -4
  151. package/dist/css/ea-tag.style.js +0 -4
  152. package/dist/css/ea-text.style.js +0 -4
  153. package/dist/css/ea-time-picker.style.js +0 -4
  154. package/dist/css/ea-timeline-item.style.js +0 -4
  155. package/dist/css/ea-timeline.style.js +0 -4
  156. package/dist/css/ea-tooltip.style.js +0 -4
  157. package/dist/css/ea-tour-step.style.js +0 -4
  158. package/dist/css/ea-tour.style.js +0 -4
  159. package/dist/css/ea-transfer.style.js +0 -5
  160. package/dist/css/ea-tree.style.js +0 -6
  161. package/dist/css/ea-ui-component.style.js +0 -4
  162. package/dist/favicon.ico +0 -0
  163. package/dist/utils/Color.js +0 -439
  164. package/dist/utils/I18nManager.js +0 -218
  165. package/dist/utils/Utils.js +0 -65
  166. package/dist/utils/Variables.js +0 -12
  167. package/dist/utils/parseTime.js +0 -73
  168. package/dist/utils/timeout.js +0 -9
@@ -1,313 +0,0 @@
1
- var k = Object.defineProperty;
2
- var x = (s) => {
3
- throw TypeError(s);
4
- };
5
- var N = (s, i, t) => i in s ? k(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t;
6
- var p = (s, i, t) => N(s, typeof i != "symbol" ? i + "" : i, t), R = (s, i, t) => i.has(s) || x("Cannot " + t);
7
- var e = (s, i, t) => (R(s, i, "read from private field"), t ? t.call(s) : i.get(s)), o = (s, i, t) => i.has(s) ? x("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), r = (s, i, t, a) => (R(s, i, "write to private field"), a ? a.call(s, t) : i.set(s, t), t);
8
- import { B as $ } from "./Base.js";
9
- import { s as B } from "../css/ea-collapse.style.js";
10
- import { s as L } from "../css/ea-collapse-item.style.js";
11
- var g, c, d, y, C, w;
12
- class P extends $ {
13
- constructor() {
14
- super();
15
- /** @type {HTMLElement} */
16
- o(this, g);
17
- /** @type {AbortController} */
18
- o(this, c);
19
- p(this, "state", this.properties({
20
- accordion: {
21
- type: Boolean,
22
- default: !1,
23
- observer: () => {
24
- }
25
- },
26
- active: {
27
- props: !0,
28
- type: {
29
- String: () => this.accordion,
30
- Array: () => !this.accordion
31
- },
32
- default: () => this.accordion ? "" : [],
33
- observer: (t) => {
34
- this.setActiveNames(t);
35
- }
36
- },
37
- "expand-icon-position": {
38
- type: ["left", "right"],
39
- default: "right",
40
- observer: (t) => {
41
- this.querySelectorAll("ea-collapse-item").forEach((a) => {
42
- a["expand-icon-position"] = t;
43
- });
44
- }
45
- }
46
- }));
47
- p(this, "fnState", this.properties({
48
- beforeCollapse: {
49
- props: !0,
50
- rawFunction: !0,
51
- type: Function,
52
- default: null,
53
- observer: () => {
54
- }
55
- }
56
- }));
57
- /**
58
- * 更新手风琴模式下的折叠状态
59
- * @param {string} [activeName]
60
- */
61
- o(this, d, (t = this.active) => {
62
- [...this.querySelectorAll("ea-collapse-item")].forEach(
63
- (l) => l.toggleAttribute("active", l.getAttribute("name") === t)
64
- );
65
- });
66
- /**
67
- * 更新普通模式下的折叠状态
68
- * @param {string[]} [activeNames]
69
- */
70
- o(this, y, (t = this.active) => {
71
- [...this.querySelectorAll("ea-collapse-item")].forEach(
72
- (l) => l.toggleAttribute(
73
- "active",
74
- t.includes(l.getAttribute("name"))
75
- )
76
- );
77
- });
78
- /**
79
- * 折叠项点击事件处理
80
- * @param {CustomEvent} e
81
- */
82
- o(this, C, async (t) => {
83
- t.preventDefault(), t.stopImmediatePropagation(), t.stopPropagation();
84
- const { name: a, el: l } = t.detail;
85
- if (typeof this.beforeCollapse == "function")
86
- try {
87
- if (!await this.beforeCollapse({ name: a, el: l })) return;
88
- } catch {
89
- return;
90
- }
91
- if (this.accordion)
92
- e(this, d).call(this, a), this.active = a;
93
- else
94
- try {
95
- this.active.includes(a) ? (this.active = this.active.filter((q) => q !== a), l.toggleAttribute("active", !1)) : (this.active = [...this.active, a], l.toggleAttribute("active", this.active.includes(a)));
96
- } catch {
97
- console.error(
98
- `${this.tagName}: When 'accordion' is false, 'active' should be an Array type.`,
99
- this
100
- );
101
- }
102
- this.emit("change", {
103
- detail: {
104
- name: a,
105
- target: l,
106
- active: this.active
107
- },
108
- bubbles: !0
109
- });
110
- });
111
- /**
112
- * 初始化折叠项的唯一标识及折叠状态
113
- */
114
- o(this, w, () => {
115
- [...this.querySelectorAll("ea-collapse-item")].forEach((a, l) => {
116
- a.getAttribute("name") || a.setAttribute("name", l);
117
- });
118
- });
119
- /**
120
- * 设置折叠项的展开状态
121
- * @param {string | string[]} newVal
122
- */
123
- p(this, "setActiveNames", (t) => {
124
- this.accordion ? e(this, d).call(this, t) : e(this, y).call(this, t);
125
- });
126
- this.stylesheet = B, this.$render();
127
- }
128
- static get observedAttributes() {
129
- return [...super.observedAttributes, "accordion", "expand-icon-position"];
130
- }
131
- $render() {
132
- this.shadowRoot.innerHTML = `
133
- <div class='ea-collapse' part='container'>
134
- <slot></slot>
135
- </div>
136
- `, r(this, g, this.shadowRoot.querySelector(".ea-collapse"));
137
- }
138
- connectedCallback() {
139
- var t;
140
- super.connectedCallback(), (t = e(this, c)) == null || t.abort(), r(this, c, new AbortController()), e(this, w).call(this), this.addEventListener("collapse-item-click", e(this, C), {
141
- signal: e(this, c).signal
142
- });
143
- }
144
- $beforeUnmounted() {
145
- var t;
146
- (t = e(this, c)) == null || t.abort();
147
- }
148
- }
149
- g = new WeakMap(), c = new WeakMap(), d = new WeakMap(), y = new WeakMap(), C = new WeakMap(), w = new WeakMap();
150
- window.customElements.get("ea-collapse") || window.customElements.define("ea-collapse", P);
151
- var h, u, A, m, S, b, v, n, f, _, E;
152
- class H extends $ {
153
- constructor() {
154
- super();
155
- /** @type {HTMLElement} */
156
- o(this, h);
157
- /** @type {HTMLElement} */
158
- o(this, u);
159
- /** @type {HTMLElement} */
160
- o(this, A);
161
- /** @type {HTMLSlotElement} */
162
- o(this, m);
163
- /** @type {HTMLElement} */
164
- o(this, S);
165
- /** @type {HTMLElement} */
166
- o(this, b);
167
- /** @type {HTMLSlotElement} */
168
- o(this, v);
169
- /** @type {AbortController} */
170
- o(this, n);
171
- p(this, "state", this.properties({
172
- title: {
173
- type: String,
174
- default: "",
175
- observer: (t) => {
176
- e(this, m).textContent = t;
177
- }
178
- },
179
- name: {
180
- type: String,
181
- default: "",
182
- observer: () => {
183
- }
184
- },
185
- "expand-icon-position": {
186
- type: ["left", "right"],
187
- default: "right",
188
- observer: () => {
189
- this.updateContainerClasslist();
190
- }
191
- },
192
- disabled: {
193
- type: Boolean,
194
- default: !1,
195
- observer: () => {
196
- this.updateContainerClasslist();
197
- }
198
- },
199
- active: {
200
- type: Boolean,
201
- default: !1,
202
- observer: (t) => {
203
- e(this, f).call(this, t);
204
- }
205
- }
206
- }));
207
- /**
208
- * 更新折叠面板高度
209
- * @param {boolean} isActive
210
- */
211
- o(this, f, (t = this.active) => {
212
- queueMicrotask(() => {
213
- e(this, h).style.setProperty(
214
- "--ea-collapse-item-content-height",
215
- t ? `${e(this, b).scrollHeight}px` : "0"
216
- );
217
- });
218
- });
219
- /**
220
- * 折叠面板 展开/收起 事件处理
221
- * @param {Event} e
222
- */
223
- o(this, _, (t) => {
224
- t.preventDefault(), t.stopImmediatePropagation(), !this.disabled && this.emit("collapse-item-click", {
225
- detail: {
226
- name: this.name,
227
- el: this
228
- },
229
- bubbles: !0,
230
- cancelable: !0
231
- });
232
- });
233
- /**
234
- * 插槽变化事件处理
235
- */
236
- o(this, E, () => {
237
- e(this, h).style.setProperty(
238
- "--ea-collapse-item-content-height",
239
- "auto"
240
- ), e(this, f).call(this);
241
- });
242
- this.stylesheet = L, this.$render();
243
- }
244
- static get observedAttributes() {
245
- return [
246
- ...super.observedAttributes,
247
- "title",
248
- "name",
249
- "disabled",
250
- "expand-icon-position",
251
- "active"
252
- ];
253
- }
254
- /**
255
- * 获取 classlist 列表
256
- * @return {string} 属性值
257
- */
258
- updateContainerClasslist() {
259
- const t = this.computedClasslist(
260
- "ea-collapse-item",
261
- {
262
- ["--indicator-" + this["expand-icon-position"]]: this["expand-icon-position"]
263
- },
264
- {
265
- disabled: this.disabled
266
- }
267
- );
268
- return e(this, h).className = t, t;
269
- }
270
- $render() {
271
- this.shadowRoot.innerHTML = `
272
- <div class='ea-collapse-item' part='container'>
273
- <div class="ea-collapse-item__title-wrap" part="title-wrap">
274
- <span class="ea-collapse-item__title" part="title">
275
- <slot name="title"></slot>
276
- </span>
277
- <span class="ea-collapse-item__indicator" part="indicator">
278
- <slot name="icon">
279
- <ea-icon class="default-expand-icon" name="angle-down" part="icon"></ea-icon>
280
- </slot>
281
- </span>
282
- </div>
283
- <div class="ea-collapse-item__content" part="content-wrap">
284
- <slot></slot>
285
- </div>
286
- </div>
287
- `, r(this, h, this.shadowRoot.querySelector(".ea-collapse-item")), r(this, u, this.shadowRoot.querySelector(
288
- ".ea-collapse-item__title-wrap"
289
- )), r(this, A, this.shadowRoot.querySelector(".ea-collapse-item__title")), r(this, m, this.shadowRoot.querySelector(
290
- ".ea-collapse-item__title slot"
291
- )), r(this, S, this.shadowRoot.querySelector(
292
- ".ea-collapse-item__title-icon"
293
- )), r(this, b, this.shadowRoot.querySelector(".ea-collapse-item__content")), r(this, v, this.shadowRoot.querySelector("slot:not([name])")), this.updateContainerClasslist();
294
- }
295
- connectedCallback() {
296
- var t;
297
- super.connectedCallback(), (t = e(this, n)) == null || t.abort(), r(this, n, new AbortController()), e(this, u).addEventListener("click", e(this, _), {
298
- signal: e(this, n).signal
299
- }), e(this, v).addEventListener("slotchange", e(this, E), {
300
- signal: e(this, n).signal
301
- });
302
- }
303
- $beforeUnmounted() {
304
- var t;
305
- (t = e(this, n)) == null || t.abort();
306
- }
307
- }
308
- h = new WeakMap(), u = new WeakMap(), A = new WeakMap(), m = new WeakMap(), S = new WeakMap(), b = new WeakMap(), v = new WeakMap(), n = new WeakMap(), f = new WeakMap(), _ = new WeakMap(), E = new WeakMap();
309
- window.customElements.get("ea-collapse-item") || window.customElements.define("ea-collapse-item", H);
310
- export {
311
- P as EaCollapse,
312
- H as EaCollapseItem
313
- };