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,218 +0,0 @@
1
- var h = Object.defineProperty;
2
- var r = (s) => {
3
- throw TypeError(s);
4
- };
5
- var u = (s, e, t) => e in s ? h(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
- var c = (s, e, t) => u(s, typeof e != "symbol" ? e + "" : e, t), f = (s, e, t) => e.has(s) || r("Cannot " + t);
7
- var i = (s, e, t) => (f(s, e, "read from private field"), t ? t.call(s) : e.get(s)), l = (s, e, t) => e.has(s) ? r("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t);
8
- var n;
9
- class p {
10
- constructor() {
11
- c(this, "configs", {
12
- locale: "en-US",
13
- messages: {
14
- "zh-CN": {
15
- calendar: {
16
- selectYear: "年",
17
- selectMonth: "月",
18
- prevMonth: "上个月",
19
- currentMonth: "本月",
20
- nextMonth: "下个月",
21
- today: "今天",
22
- weekDays: ["一", "二", "三", "四", "五", "六", "日"],
23
- months: [
24
- "一月",
25
- "二月",
26
- "三月",
27
- "四月",
28
- "五月",
29
- "六月",
30
- "七月",
31
- "八月",
32
- "九月",
33
- "十月",
34
- "十一月",
35
- "十二月"
36
- ]
37
- },
38
- button: {
39
- ok: "确定",
40
- cancel: "取消",
41
- confirm: "确认"
42
- },
43
- pagination: {
44
- total: "共 {total} 条",
45
- itemsPerPage: "每页 {size} 条",
46
- goto: "前往",
47
- page: "页"
48
- },
49
- inputNumber: {
50
- increase: "增加数值",
51
- decrease: "减少数值"
52
- },
53
- select: {
54
- placeholder: "请选择",
55
- noData: "暂无数据",
56
- noMatch: "无匹配数据"
57
- },
58
- dialog: {
59
- confirmButtonText: "确定",
60
- cancelButtonText: "取消"
61
- },
62
- drawer: {
63
- close: "关闭"
64
- },
65
- empty: {
66
- description: "暂无数据"
67
- },
68
- transfer: {
69
- list1: "列表 1",
70
- list2: "列表 2",
71
- filterPlaceholder: "输入关键词"
72
- }
73
- },
74
- "en-US": {
75
- calendar: {
76
- selectYear: "Year",
77
- selectMonth: "Month",
78
- prevMonth: "Previous Month",
79
- currentMonth: "Current Month",
80
- nextMonth: "Next Month",
81
- today: "Today",
82
- weekDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
83
- months: [
84
- "January",
85
- "February",
86
- "March",
87
- "April",
88
- "May",
89
- "June",
90
- "July",
91
- "August",
92
- "September",
93
- "October",
94
- "November",
95
- "December"
96
- ],
97
- monthsShort: [
98
- "Jan",
99
- "Feb",
100
- "Mar",
101
- "Apr",
102
- "May",
103
- "Jun",
104
- "Jul",
105
- "Aug",
106
- "Sep",
107
- "Oct",
108
- "Nov",
109
- "Dec"
110
- ]
111
- },
112
- button: {
113
- ok: "OK",
114
- cancel: "Cancel",
115
- confirm: "Confirm"
116
- },
117
- pagination: {
118
- total: "Total {total}",
119
- itemsPerPage: "{size} per page",
120
- goto: "Goto",
121
- page: ""
122
- },
123
- inputNumber: {
124
- increase: "Increase value",
125
- decrease: "Decrease value"
126
- },
127
- select: {
128
- placeholder: "Please select",
129
- noData: "No Data",
130
- noMatch: "No Matching Data"
131
- },
132
- dialog: {
133
- confirmButtonText: "OK",
134
- cancelButtonText: "Cancel"
135
- },
136
- drawer: {
137
- close: "Close"
138
- },
139
- empty: {
140
- description: "No Data"
141
- },
142
- transfer: {
143
- list1: "List 1",
144
- list2: "List 2",
145
- filterPlaceholder: "Enter keyword"
146
- }
147
- }
148
- }
149
- });
150
- /**
151
- * 格式化成规范的 locale
152
- * @param {string} locale
153
- */
154
- l(this, n, (e) => {
155
- const t = e.split("-") || [];
156
- return t.length > 1 ? t[0] + "-" + t[1].toUpperCase() : t[0];
157
- });
158
- }
159
- /**
160
- * 获取当前语言
161
- * @returns {string} 当前语言标识符
162
- */
163
- get locale() {
164
- return this.configs.locale;
165
- }
166
- /**
167
- * 设置当前语言
168
- * @param {'zh-CN' | 'en-US'} locale - 语言标识符,如 'zh-CN', 'en-US'
169
- */
170
- set locale(e) {
171
- this.configs.locale = i(this, n).call(this, e);
172
- }
173
- /**
174
- * 获取当前语言的所有消息
175
- */
176
- get messages() {
177
- return this.configs.messages[this.locale] || {};
178
- }
179
- /**
180
- * 添加或更新语言包
181
- * @param {string} locale - 语言标识符
182
- * @param {object} messages - 语言消息对象
183
- */
184
- setMessages(e, t) {
185
- this.configs.messages[e] || (this.configs.messages[e] = {}), this.configs.messages[e] = {
186
- ...this.configs.messages[e],
187
- ...t
188
- };
189
- }
190
- /**
191
- * 获取翻译文本
192
- * @param {string} key - 翻译键路径,例如 'calendar.prevMonth'
193
- * @param {object} params - 参数对象,用于替换模板字符串中的变量
194
- * @returns {string} 翻译后的文本
195
- */
196
- t(e, t) {
197
- const g = e.split(".");
198
- let o = this.configs.messages[this.locale];
199
- for (const a of g)
200
- if (o && typeof o == "object")
201
- o = o[a];
202
- else {
203
- o = e;
204
- break;
205
- }
206
- return typeof o == "string" && t && Object.keys(t).forEach((a) => {
207
- o = o.replace(
208
- new RegExp(`\\{${a}\\}`, "g"),
209
- t[a]
210
- );
211
- }), o || e;
212
- }
213
- }
214
- n = new WeakMap();
215
- const m = new p();
216
- export {
217
- m as i
218
- };
@@ -1,65 +0,0 @@
1
- var l = Object.defineProperty;
2
- var S = (r, e, t) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var u = (r, e, t) => S(r, typeof e != "symbol" ? e + "" : e, t);
4
- const i = class i {
5
- };
6
- u(i, "Array", {}), u(i, "String", {}), u(i, "Object", {}), u(i, "Number", {}), u(i, "RegExp", {}), u(i, "Boolean", {}), u(i, "Enum", {}), u(i, "EaElement", {}), u(i, "JSON", {}), u(i, "CSS", {}), u(i, "timeout"), u(i, "sleep", (e) => new Promise((t) => {
7
- i.timeout(() => t(), e);
8
- }));
9
- let n = i;
10
- n.Array.toLowerCamelCase = (r) => (Array.isArray(r) || (r = Array.from(r)), r.map((e) => n.String.toLowerCamelCase(e)));
11
- n.String.toLowerCamelCase = (r) => r.toString().replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
12
- n.Boolean.isBoolean = (r) => typeof r == "boolean" || r === "" || r === "true" || r === !0;
13
- n.Number.isNumber = (r) => (r = Number(r), typeof r == "number" && !isNaN(r));
14
- n.String.randomString = (r = 6) => Math.random().toString(36).substring(2, r + 2);
15
- n.Enum.isEnum = (r) => Array.isArray(r);
16
- n.Enum.hasEnum = (r, e) => r.includes(e);
17
- n.EaElement.define = (r, e) => {
18
- if (!("customElements" in window))
19
- return console.warn("当前浏览器不支持自定义元素");
20
- window.customElements.get(r) || window.customElements.define(r, e);
21
- };
22
- n.EaElement.addAsyncEventListener = (r, e, t = !0) => new Promise((m) => {
23
- r.addEventListener(
24
- e,
25
- (c) => {
26
- c.preventDefault(), c.stopPropagation(), m(!0);
27
- },
28
- { once: t }
29
- );
30
- });
31
- n.EaElement.h = (r, e, t, m) => {
32
- if (r === "script" || r === "style") return "";
33
- const c = ["input"], a = (o, s) => (o = o || "", o.startsWith("on") ? "" : o && (typeof s == "string" || typeof s == "number" || typeof s == "boolean") ? `${o}="${s}"` : Array.isArray(s) ? `${o}="${s.join(" ")}"` : typeof s == "object" && s ? Object.entries(s).map(([f, y]) => a(f, y)).join(" ") : typeof s == "function" ? `${o}="${s()}"` : ""), p = (o) => {
34
- const s = (f) => f.replace(/<\/?script.*?>/g, "&lt;script&gt;").replace(/<\/?style.*?>/g, "&lt;style&gt;");
35
- return typeof o == "string" || typeof o == "number" || typeof o == "boolean" ? s(String(o)) : Array.isArray(o) ? s(o.join("")) : "";
36
- };
37
- return `<${r} ${a("class", e)} ${t ? Object.entries(t).map(([o, s]) => a(o, s)).join(" ") : ""}${c.includes(r) ? "/>" : `${`>
38
- ${p(m)}
39
- </${r}>`}`}`;
40
- };
41
- n.JSON.parse = (r, e = !1) => {
42
- try {
43
- return JSON.parse(r);
44
- } catch (t) {
45
- return e || console.error(t), null;
46
- }
47
- };
48
- n.JSON.stringify = (r, e = !1) => {
49
- try {
50
- return JSON.stringify(r);
51
- } catch (t) {
52
- return e || console.error(t), null;
53
- }
54
- };
55
- n.timeout = (r, e = 0) => {
56
- let t = setTimeout(() => {
57
- clearTimeout(t), t = null, r && r();
58
- }, e);
59
- return t;
60
- };
61
- n.CSS.px2num = (r) => Number(r == null ? void 0 : r.replace("px", ""));
62
- n.CSS.rem2num = (r) => Number(r.replace("rem", ""));
63
- export {
64
- n as E
65
- };
@@ -1,12 +0,0 @@
1
- const c = {
2
- primary: "circle-info",
3
- success: "circle-check",
4
- info: "circle-info",
5
- warning: "triangle-exclamation",
6
- error: "circle-xmark"
7
- }, e = ["large", "default", "small"], a = ["large", "default", "small"];
8
- export {
9
- a as E,
10
- e as c,
11
- c as t
12
- };
@@ -1,73 +0,0 @@
1
- import { d as o } from "../components/ea-calendar2.js";
2
- const m = {
3
- // 毫秒
4
- ms: "millisecond",
5
- millisecond: "millisecond",
6
- milliseconds: "millisecond",
7
- // 秒
8
- s: "second",
9
- sec: "second",
10
- secs: "second",
11
- second: "second",
12
- seconds: "second",
13
- // 分钟
14
- m: "minute",
15
- min: "minute",
16
- mins: "minute",
17
- minute: "minute",
18
- minutes: "minute",
19
- // 小时
20
- h: "hour",
21
- hr: "hour",
22
- hrs: "hour",
23
- hour: "hour",
24
- hours: "hour",
25
- // 天
26
- d: "day",
27
- day: "day",
28
- days: "day",
29
- // 周
30
- w: "week",
31
- week: "week",
32
- weeks: "week",
33
- // 月
34
- M: "month",
35
- mo: "month",
36
- mos: "month",
37
- month: "month",
38
- months: "month",
39
- // 年
40
- y: "year",
41
- yr: "year",
42
- yrs: "year",
43
- year: "year",
44
- years: "year"
45
- };
46
- function d(n) {
47
- if (typeof n != "string" || !n.trim())
48
- return null;
49
- const e = n.trim().match(/^([+-]?\d+\.?\d*)\s*([a-zA-Z]+)$/);
50
- if (!e)
51
- return null;
52
- const r = parseFloat(e[1]), i = e[2], s = m[i];
53
- return !s || isNaN(r) ? null : o().add(r, s);
54
- }
55
- function c(n) {
56
- if (!n) return null;
57
- if (n instanceof Date)
58
- return n;
59
- if (typeof n == "number")
60
- return new Date(n);
61
- if (typeof n == "string") {
62
- const t = d(n);
63
- if (t)
64
- return t.toDate();
65
- const e = o(n);
66
- if (e.isValid())
67
- return e.toDate();
68
- }
69
- return null;
70
- }
71
- export {
72
- c as p
73
- };
@@ -1,9 +0,0 @@
1
- const r = (e, o = 0) => {
2
- let t = setTimeout(() => {
3
- clearTimeout(t), t = null, e();
4
- }, o);
5
- return t;
6
- };
7
- export {
8
- r as t
9
- };