easy-component-ui 3.0.12 → 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/package.json +308 -304
  2. package/dist/assets/icon.css +0 -1
  3. package/dist/components/Base.js +0 -873
  4. package/dist/components/ea-alert.js +0 -196
  5. package/dist/components/ea-avatar.js +0 -159
  6. package/dist/components/ea-backtop.js +0 -136
  7. package/dist/components/ea-badge.js +0 -144
  8. package/dist/components/ea-breadcrumb.js +0 -148
  9. package/dist/components/ea-button.js +0 -265
  10. package/dist/components/ea-calendar.js +0 -10
  11. package/dist/components/ea-calendar2.js +0 -671
  12. package/dist/components/ea-card.js +0 -85
  13. package/dist/components/ea-carousel.js +0 -415
  14. package/dist/components/ea-checkbox.js +0 -446
  15. package/dist/components/ea-collapse.js +0 -313
  16. package/dist/components/ea-color-picker.js +0 -891
  17. package/dist/components/ea-container.js +0 -177
  18. package/dist/components/ea-countdown.js +0 -142
  19. package/dist/components/ea-date-picker.js +0 -649
  20. package/dist/components/ea-descriptions.js +0 -474
  21. package/dist/components/ea-dialog.js +0 -249
  22. package/dist/components/ea-drawer.js +0 -211
  23. package/dist/components/ea-dropdown.js +0 -228
  24. package/dist/components/ea-empty.js +0 -93
  25. package/dist/components/ea-icon.js +0 -68
  26. package/dist/components/ea-image-preview.js +0 -488
  27. package/dist/components/ea-image.js +0 -302
  28. package/dist/components/ea-infinite-scroll.js +0 -109
  29. package/dist/components/ea-input-number.js +0 -367
  30. package/dist/components/ea-input.js +0 -588
  31. package/dist/components/ea-layout.js +0 -125
  32. package/dist/components/ea-link.js +0 -101
  33. package/dist/components/ea-loading.js +0 -151
  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 -251
  37. package/dist/components/ea-notification.js +0 -331
  38. package/dist/components/ea-overlay.js +0 -167
  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 -123
  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 -421
  53. package/dist/components/ea-space.js +0 -123
  54. package/dist/components/ea-splitter.js +0 -217
  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 -1124
  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 -514
  63. package/dist/components/ea-timeline.js +0 -185
  64. package/dist/components/ea-tooltip.js +0 -121
  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 -61
  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,177 +0,0 @@
1
- var u = Object.defineProperty;
2
- var h = (t) => {
3
- throw TypeError(t);
4
- };
5
- var p = (t, s, e) => s in t ? u(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
6
- var r = (t, s, e) => p(t, typeof s != "symbol" ? s + "" : s, e), m = (t, s, e) => s.has(t) || h("Cannot " + e);
7
- var i = (t, s, e) => s.has(t) ? h("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), n = (t, s, e, a) => (m(t, s, "write to private field"), a ? a.call(t, e) : s.set(t, e), e);
8
- import { B as o } from "./Base.js";
9
- import { s as f } from "../css/ea-container.style.js";
10
- import { s as w } from "../css/ea-header.style.js";
11
- import { s as y } from "../css/ea-main.style.js";
12
- import { s as b } from "../css/ea-footer.style.js";
13
- import { s as g } from "../css/ea-aside.style.js";
14
- var c;
15
- class E extends o {
16
- constructor() {
17
- super();
18
- /** @type {HTMLElement} */
19
- i(this, c);
20
- /**
21
- * @typedef {Object} State
22
- * @property {string} direction 排列方向
23
- */
24
- /** @type {State} */
25
- r(this, "state", this.properties({
26
- direction: {
27
- type: ["horizontal", "vertical"],
28
- default: "horizontal",
29
- observer: (e) => {
30
- this.style.setProperty("--ea-container-direction", e === "vertical" ? "column" : "row");
31
- }
32
- }
33
- }));
34
- this.stylesheet = f, this.$render();
35
- }
36
- static get observedAttributes() {
37
- return ["direction"];
38
- }
39
- $render() {
40
- this.shadowRoot.innerHTML = `
41
- <div class="ea-container" part="container">
42
- <slot></slot>
43
- </div>
44
- `, n(this, c, this.shadowRoot.querySelector(".ea-container"));
45
- }
46
- connectedCallback() {
47
- super.connectedCallback();
48
- const e = [...this.children].map((a) => a.tagName.toLowerCase());
49
- e.includes("ea-header") || e.includes("ea-footer") ? this.direction = "vertical" : this.direction = "horizontal";
50
- }
51
- }
52
- c = new WeakMap();
53
- customElements.get("ea-container") || customElements.define("ea-container", E);
54
- class $ extends o {
55
- constructor() {
56
- super();
57
- /**
58
- * @typedef {Object} State
59
- * @property {string} height
60
- */
61
- /** @type {State} */
62
- r(this, "state", this.properties({
63
- height: {
64
- type: String,
65
- default: "60px",
66
- observer: (e) => {
67
- this.style.setProperty("--ea-header-height", e);
68
- }
69
- }
70
- }));
71
- this.stylesheet = w, this.$render();
72
- }
73
- static get observedAttributes() {
74
- return ["height"];
75
- }
76
- $render() {
77
- this.shadowRoot.innerHTML = `
78
- <header class="ea-header" part="container">
79
- <slot></slot>
80
- </header>
81
- `;
82
- }
83
- connectedCallback() {
84
- super.connectedCallback();
85
- }
86
- }
87
- window.customElements.get("ea-header") || window.customElements.define("ea-header", $);
88
- class v extends o {
89
- constructor() {
90
- super(), this.stylesheet = y, this.$render();
91
- }
92
- $render() {
93
- this.shadowRoot.innerHTML = `
94
- <main class="ea-main" part="container">
95
- <slot></slot>
96
- </main>
97
- `;
98
- }
99
- connectedCallback() {
100
- super.connectedCallback();
101
- }
102
- }
103
- window.customElements.get("ea-main") || window.customElements.define("ea-main", v);
104
- var d;
105
- class C extends o {
106
- constructor() {
107
- super();
108
- /** @type {HTMLElement} */
109
- i(this, d);
110
- /**
111
- * @typedef {Object} State
112
- */
113
- /** @type {State} */
114
- r(this, "state", this.properties({
115
- height: {
116
- type: String,
117
- default: "60px",
118
- observer: (e) => {
119
- this.style.setProperty("--ea-footer-height", e);
120
- }
121
- }
122
- }));
123
- this.stylesheet = b, this.$render();
124
- }
125
- static get observedAttributes() {
126
- return ["height"];
127
- }
128
- $render() {
129
- this.shadowRoot.innerHTML = `
130
- <footer class="ea-footer" part="container">
131
- <slot></slot>
132
- </footer>
133
- `, n(this, d, this.shadowRoot.querySelector(".ea-footer"));
134
- }
135
- connectedCallback() {
136
- super.connectedCallback();
137
- }
138
- }
139
- d = new WeakMap();
140
- window.customElements.get("ea-footer") || window.customElements.define("ea-footer", C);
141
- var l;
142
- class k extends o {
143
- constructor() {
144
- super();
145
- /** @type {HTMLElement} */
146
- i(this, l);
147
- /**
148
- * @typedef {Object} State
149
- */
150
- /** @type {State} */
151
- r(this, "state", this.properties({
152
- width: {
153
- type: String,
154
- default: "300px",
155
- observer: (e) => {
156
- this.style.setProperty("--ea-aside-width", e);
157
- }
158
- }
159
- }));
160
- this.stylesheet = g, this.$render();
161
- }
162
- static get observedAttributes() {
163
- return ["width"];
164
- }
165
- $render() {
166
- this.shadowRoot.innerHTML = `
167
- <aside class="ea-aside" part="container">
168
- <slot></slot>
169
- </aside>
170
- `, n(this, l, this.shadowRoot.querySelector(".ea-aside"));
171
- }
172
- connectedCallback() {
173
- super.connectedCallback();
174
- }
175
- }
176
- l = new WeakMap();
177
- window.customElements.get("ea-aside") || window.customElements.define("ea-aside", k);
@@ -1,142 +0,0 @@
1
- var I = Object.defineProperty;
2
- var H = (t) => {
3
- throw TypeError(t);
4
- };
5
- var N = (t, s, e) => s in t ? I(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
6
- var T = (t, s, e) => N(t, typeof s != "symbol" ? s + "" : s, e), _ = (t, s, e) => s.has(t) || H("Cannot " + e);
7
- var n = (t, s, e) => (_(t, s, "read from private field"), e ? e.call(t) : s.get(t)), f = (t, s, e) => s.has(t) ? H("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), o = (t, s, e, a) => (_(t, s, "write to private field"), a ? a.call(t, e) : s.set(t, e), e);
8
- import { EaStatistic as O } from "./ea-statistic.js";
9
- import { d as Y } from "./ea-calendar2.js";
10
- import { t as A } from "../utils/timeout.js";
11
- import { p as k } from "../utils/parseTime.js";
12
- class U extends Event {
13
- constructor(s) {
14
- super("ea-finish", {
15
- bubbles: !0,
16
- composed: !0
17
- }), this.detail = s;
18
- }
19
- }
20
- var y, b, v, S, M, d, c, w, g;
21
- class $ extends O {
22
- constructor() {
23
- super();
24
- /** @type {HTMLElement} */
25
- f(this, y);
26
- /** @type {HTMLElement} */
27
- f(this, b);
28
- /** @type {HTMLElement} */
29
- f(this, v);
30
- /** @type {HTMLElement} */
31
- f(this, S);
32
- /** @type {HTMLElement} */
33
- f(this, M);
34
- f(this, d, null);
35
- f(this, c, null);
36
- f(this, w, {
37
- displayValue: ""
38
- });
39
- T(this, "state", this.properties({
40
- value: {
41
- type: String,
42
- default: "",
43
- observer: (e) => {
44
- n(this, d) && (clearInterval(n(this, d)), o(this, d, null)), n(this, c) && (clearTimeout(n(this, c)), o(this, c, null));
45
- const a = k(e) || e, r = () => {
46
- const { diff: h, currentTime: l, displayValue: m } = n(this, g).call(this, a, this.format);
47
- n(this, v).textContent = m, this.emit("change", { detail: { value: l, displayValue: m } }), (h <= 0 || !h) && (n(this, c) && (clearTimeout(n(this, c)), o(this, c, null)), n(this, d) && (clearInterval(n(this, d)), o(this, d, null)), this.dispatchEvent(
48
- new U({ value: l, displayValue: m })
49
- ));
50
- };
51
- r();
52
- const i = Number(this["refresh-interval"]) || 1e3, p = Date.now();
53
- let u = i - p % i;
54
- u === 0 && (u = i), o(this, c, A(() => {
55
- o(this, c, null), r(), o(this, d, setInterval(r, i));
56
- }, u));
57
- }
58
- },
59
- format: {
60
- type: String,
61
- default: "HH:mm:ss",
62
- observer: (e) => {
63
- }
64
- },
65
- "refresh-interval": {
66
- type: Number,
67
- default: 1e3,
68
- /** @param {Number} newVal */
69
- observer: (e) => {
70
- }
71
- }
72
- }));
73
- /**
74
- * 获取时间差
75
- * @param {dayjs} date
76
- * @param {string} format
77
- * @return {{currentTime: number, diff: number, displayValue: string}}
78
- */
79
- f(this, g, (e, a) => {
80
- const r = Y(), i = Y(e), p = i.valueOf() - r.valueOf(), u = (q, R = 2) => `${q}`.padStart(R, "0");
81
- if (p <= 0 || i.isBefore(r) || !p)
82
- return {
83
- currentTime: r.valueOf(),
84
- diff: p,
85
- displayValue: "00:00:00"
86
- };
87
- let h = i.diff(r, "year"), l = r.add(h, "year");
88
- l.isAfter(i) && (h -= 1, l = r.add(h, "year"));
89
- let m = i.diff(l, "month");
90
- l = l.add(m, "month");
91
- let D = i.diff(l, "day");
92
- l = l.add(D, "day");
93
- let V = i.diff(l, "hour");
94
- l = l.add(V, "hour");
95
- let x = i.diff(l, "minute");
96
- l = l.add(x, "minute");
97
- let C = i.diff(l, "second");
98
- l = l.add(C, "second");
99
- let E = i.diff(l, "millisecond");
100
- return !a.includes("YY") && a.includes("MM") && (m = Math.floor(i.diff(r, "month", !0))), !a.includes("MM") && a.includes("DD") && (D = Math.floor(i.diff(r, "day", !0))), !a.includes("DD") && a.includes("HH") && (V = Math.floor(i.diff(r, "hour", !0))), !a.includes("HH") && a.includes("mm") && (x = Math.floor(i.diff(r, "minute", !0))), !a.includes("mm") && a.includes("ss") && (C = Math.floor(i.diff(r, "second", !0))), !a.includes("ss") && a.includes("SSS") && (E = Math.floor(i.diff(r, "millisecond", !0))), {
101
- currentTime: r.valueOf(),
102
- diff: p,
103
- displayValue: a.replace("YYYY", u(h)).replace("MM", u(m)).replace("DD", u(D)).replace("HH", u(V)).replace("mm", u(x)).replace("ss", u(C)).replace("SSS", u(E, 3)).replace(/\[|\]/g, "")
104
- };
105
- });
106
- o(this, y, this.shadowRoot.querySelector(".ea-statistic")), o(this, b, this.shadowRoot.querySelector(".ea-statistic__number slot")), o(this, v, this.shadowRoot.querySelector(".ea-statistic__number")), o(this, S, this.shadowRoot.querySelector(".ea-statistic__prefix slot")), o(this, M, this.shadowRoot.querySelector(".ea-statistic__suffix slot"));
107
- }
108
- // ------- displayValue -------
109
- // #region
110
- get displayValue() {
111
- return n(this, w).displayValue;
112
- }
113
- set displayValue(e) {
114
- n(this, w).displayValue = e;
115
- }
116
- // #endregion
117
- // ------- end -------
118
- static get observedAttributes() {
119
- return [...super.observedAttributes, "value", "format", "refresh-interval"];
120
- }
121
- /**
122
- * 获取 classlist 列表
123
- * @return {string} 属性值
124
- */
125
- updateContainerClasslist() {
126
- const e = this.computedClasslist("ea-countdown", {
127
- // ['--' + this.type]: this.type,
128
- });
129
- return n(this, y).className = e, e;
130
- }
131
- connectedCallback() {
132
- super.connectedCallback();
133
- }
134
- $beforeUnmounted() {
135
- clearInterval(n(this, d));
136
- }
137
- }
138
- y = new WeakMap(), b = new WeakMap(), v = new WeakMap(), S = new WeakMap(), M = new WeakMap(), d = new WeakMap(), c = new WeakMap(), w = new WeakMap(), g = new WeakMap();
139
- window.customElements.get("ea-countdown") || window.customElements.define("ea-countdown", $);
140
- export {
141
- $ as EaCountdown
142
- };