st-comp 0.0.279 → 0.0.280

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 (229) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +13 -14
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +342 -547
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +294 -294
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +19 -19
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +253 -253
  11. package/es/KlineConfig.cjs +1 -1
  12. package/es/KlineConfig.js +579 -553
  13. package/es/KlineNew.cjs +1 -1
  14. package/es/KlineNew.js +17 -17
  15. package/es/KlinePlus.cjs +2 -2
  16. package/es/KlinePlus.js +23 -24
  17. package/es/MonacoEditor.cjs +1 -1
  18. package/es/MonacoEditor.js +30 -29
  19. package/es/Pagination.cjs +1 -1
  20. package/es/Pagination.js +517 -425
  21. package/es/PasswordPrompt.cjs +1 -1
  22. package/es/PasswordPrompt.js +3 -3
  23. package/es/Table.cjs +1 -1
  24. package/es/Table.js +46 -46
  25. package/es/User.cjs +1 -1
  26. package/es/User.js +898 -866
  27. package/es/VarSelectDialog.cjs +3 -3
  28. package/es/VarSelectDialog.js +110 -109
  29. package/es/VarietyAiHelper.cjs +7 -7
  30. package/es/VarietyAiHelper.js +605 -443
  31. package/es/VarietyAutoComplete.cjs +1 -1
  32. package/es/VarietyAutoComplete.js +11 -11
  33. package/es/VarietySearch.cjs +18 -18
  34. package/es/VarietySearch.js +3079 -2913
  35. package/es/{VarietySelect-d58eee29.cjs → VarietySelect-aa082a9c.cjs} +1 -1
  36. package/es/{VarietySelect-41daac7b.js → VarietySelect-c402bade.js} +5 -5
  37. package/es/VarietyTextCopy.cjs +3 -3
  38. package/es/VarietyTextCopy.js +51 -51
  39. package/es/VirtualTable.cjs +13 -1
  40. package/es/VirtualTable.js +1929 -2261
  41. package/es/_baseClone-10bdb989.cjs +1 -0
  42. package/es/_baseClone-98af8b33.js +210 -0
  43. package/es/base-d987e5c9.cjs +5 -0
  44. package/es/base-dd156b8e.js +790 -0
  45. package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
  46. package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
  47. package/es/clamp-17c4d8aa.cjs +1 -0
  48. package/es/clamp-c7512966.js +10 -0
  49. package/es/config-provider-33a127c4.cjs +1 -0
  50. package/es/config-provider-563023c9.js +86 -0
  51. package/es/debounce-0a98a9c6.js +57 -0
  52. package/es/debounce-37b17615.cjs +1 -0
  53. package/es/dropdown-ce7496c7.cjs +1 -0
  54. package/es/dropdown-feea8702.js +178 -0
  55. package/es/el-autocomplete-d9253bba.cjs +1 -0
  56. package/es/el-autocomplete-eac54f9f.js +434 -0
  57. package/es/el-button-8259594b.cjs +1 -0
  58. package/es/el-button-8a9721f8.js +343 -0
  59. package/es/el-checkbox-6303fc92.cjs +1 -0
  60. package/es/el-checkbox-c328b097.js +566 -0
  61. package/es/el-dialog-67536fac.js +252 -0
  62. package/es/el-dialog-8788bcc1.cjs +1 -0
  63. package/es/el-divider-3f0320be.cjs +1 -0
  64. package/es/el-divider-c5d72961.js +51 -0
  65. package/es/el-empty-552baf04.js +159 -0
  66. package/es/el-empty-58bc2a10.cjs +1 -0
  67. package/es/el-form-item-8efcf2c3.js +1265 -0
  68. package/es/el-form-item-95e68669.cjs +12 -0
  69. package/es/el-input-c8a9bb71.cjs +1 -0
  70. package/es/el-input-e66500b7.js +761 -0
  71. package/es/el-input-number-68ee0d65.js +390 -0
  72. package/es/el-input-number-d7a81922.cjs +1 -0
  73. package/es/el-loading-62132db2.cjs +1 -0
  74. package/es/el-loading-db4c6d13.js +190 -0
  75. package/es/el-menu-item-4b8e7794.cjs +1 -0
  76. package/es/el-menu-item-c2523d82.js +824 -0
  77. package/es/el-message-box-7c13546c.js +481 -0
  78. package/es/el-message-box-fed174f0.cjs +1 -0
  79. package/es/el-overlay-17299785.cjs +1 -0
  80. package/es/el-overlay-36f223e9.js +444 -0
  81. package/es/el-popconfirm-520b2928.cjs +1 -0
  82. package/es/el-popconfirm-a857c54a.js +190 -0
  83. package/es/el-popper-852446fd.js +2235 -0
  84. package/es/el-popper-f824c63b.cjs +1 -0
  85. package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
  86. package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
  87. package/es/el-segmented-45dcc036.cjs +1 -0
  88. package/es/el-segmented-bf08279f.js +168 -0
  89. package/es/el-select-a34348e1.js +1535 -0
  90. package/es/el-select-d2958ae8.cjs +1 -0
  91. package/es/el-table-column-ad70ee0e.cjs +14 -0
  92. package/es/el-table-column-e2be313e.js +3651 -0
  93. package/es/el-tag-527f06f0.cjs +1 -0
  94. package/es/el-tag-9bcfae32.js +77 -0
  95. package/es/el-text-f9379288.js +84 -0
  96. package/es/el-text-fc345ffd.cjs +1 -0
  97. package/es/index-2419d69a.js +468 -0
  98. package/es/index-3806160e.js +710 -0
  99. package/es/index-3a0a7c36.cjs +1 -0
  100. package/es/index-3e7d5ffb.cjs +1 -0
  101. package/es/index-3ed0c678.cjs +1 -0
  102. package/es/index-47d30a52.js +372 -0
  103. package/es/index-5dec535a.cjs +1 -0
  104. package/es/index-5e76a22d.cjs +1 -0
  105. package/es/{index-eb96e074.js → index-60900c6c.js} +223 -254
  106. package/es/{index-a33b2fb8.js → index-69d2353a.js} +5090 -5090
  107. package/es/index-71ba4c28.cjs +1 -0
  108. package/es/index-7711aa69.cjs +1 -0
  109. package/es/index-7c4d8f5d.js +47 -0
  110. package/es/index-86678b72.js +131 -0
  111. package/es/index-99bb359f.cjs +1 -0
  112. package/es/index-99d4335d.cjs +1 -0
  113. package/es/index-a0522466.js +413 -0
  114. package/es/index-a181f161.js +429 -0
  115. package/es/index-b9a26e7f.js +141 -0
  116. package/es/{index-a9246d17.cjs → index-bb0bc131.cjs} +109 -109
  117. package/es/index-d372e68f.cjs +5 -0
  118. package/es/index-de9ad85c.js +12 -0
  119. package/es/{index-44a382a5.js → index-dfb34e00.js} +12 -12
  120. package/es/index-f5474dcc.cjs +3 -0
  121. package/es/{python-8a1664e6.js → python-6eafa04b.js} +32 -31
  122. package/es/{python-a3db9620.cjs → python-922eca89.cjs} +1 -1
  123. package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
  124. package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
  125. package/es/scroll-07bade1e.cjs +1 -0
  126. package/es/scroll-70271cb1.js +35 -0
  127. package/es/style.css +1 -1
  128. package/es/toNumber-b47ceb68.cjs +1 -0
  129. package/es/toNumber-f077c66a.js +31 -0
  130. package/es/use-form-item-0a831287.cjs +2 -0
  131. package/es/use-form-item-187cd7db.js +422 -0
  132. package/es/use-global-config-17dafd40.js +71 -0
  133. package/es/use-global-config-c90c91f7.cjs +1 -0
  134. package/es/{validator-c60a8956.js → validator-800ed2ba.js} +1 -1
  135. package/es/validator-ee5bc3eb.cjs +1 -0
  136. package/es/vnode-6f7b84f0.cjs +1 -0
  137. package/es/vnode-8ee9bf4e.js +12 -0
  138. package/es/{zh-cn-b59a0910.js → zh-cn-26cc7233.js} +36 -33
  139. package/es/zh-cn-a22a6792.cjs +1 -0
  140. package/lib/bundle.js +1 -1
  141. package/lib/bundle.umd.cjs +271 -252
  142. package/lib/{index-62fa175a.js → index-74ed48c6.js} +54107 -52151
  143. package/lib/{python-4a48fa39.js → python-7aaa84e4.js} +1 -1
  144. package/lib/style.css +1 -1
  145. package/package.json +1 -1
  146. package/es/_initCloneObject-5e73c9c8.js +0 -81
  147. package/es/_initCloneObject-a5832933.cjs +0 -1
  148. package/es/base-a5af3db3.js +0 -288
  149. package/es/base-ef747d02.cjs +0 -5
  150. package/es/config-provider-06ea6b42.cjs +0 -1
  151. package/es/config-provider-88b637a8.js +0 -59
  152. package/es/dayjs.min-2c20abe6.cjs +0 -1
  153. package/es/dayjs.min-8313b006.js +0 -299
  154. package/es/debounce-62f5b6e8.cjs +0 -1
  155. package/es/debounce-8d53f4dd.js +0 -83
  156. package/es/dropdown-4ce4c3e2.cjs +0 -1
  157. package/es/dropdown-72fbc15d.js +0 -178
  158. package/es/el-autocomplete-6cafcdf1.js +0 -329
  159. package/es/el-autocomplete-e0857c5b.cjs +0 -1
  160. package/es/el-button-613e0bb2.cjs +0 -1
  161. package/es/el-button-94d3de38.js +0 -272
  162. package/es/el-checkbox-6d4cb393.js +0 -459
  163. package/es/el-checkbox-e90762df.cjs +0 -1
  164. package/es/el-dialog-02942e22.cjs +0 -1
  165. package/es/el-dialog-5e30161f.js +0 -276
  166. package/es/el-divider-4713d74c.cjs +0 -1
  167. package/es/el-divider-4e059794.js +0 -45
  168. package/es/el-empty-1697ded8.cjs +0 -1
  169. package/es/el-empty-33cb66f1.js +0 -183
  170. package/es/el-form-item-44f060d8.cjs +0 -12
  171. package/es/el-form-item-9e8969ea.js +0 -1269
  172. package/es/el-input-342b2def.js +0 -531
  173. package/es/el-input-9a9a7f7f.cjs +0 -1
  174. package/es/el-input-number-65c847d6.cjs +0 -1
  175. package/es/el-input-number-c22b803a.js +0 -311
  176. package/es/el-loading-8179b497.cjs +0 -1
  177. package/es/el-loading-bcc51e3d.js +0 -203
  178. package/es/el-menu-item-339baf6d.js +0 -768
  179. package/es/el-menu-item-83186444.cjs +0 -1
  180. package/es/el-message-box-035b699c.js +0 -489
  181. package/es/el-message-box-c62d3217.cjs +0 -1
  182. package/es/el-overlay-3e17604b.js +0 -324
  183. package/es/el-overlay-8f1da9e8.cjs +0 -1
  184. package/es/el-popconfirm-4e32ec1b.cjs +0 -1
  185. package/es/el-popconfirm-f8a86e2c.js +0 -162
  186. package/es/el-popper-a4f3ae4d.cjs +0 -1
  187. package/es/el-popper-fbd0dcea.js +0 -2094
  188. package/es/el-segmented-56bd58a8.js +0 -142
  189. package/es/el-segmented-833ac177.cjs +0 -1
  190. package/es/el-select-44fa547d.js +0 -1256
  191. package/es/el-select-70806166.cjs +0 -1
  192. package/es/el-table-column-3e2cdfca.cjs +0 -14
  193. package/es/el-table-column-b74a857d.js +0 -3432
  194. package/es/el-tag-66c83156.js +0 -117
  195. package/es/el-tag-9c2f329f.cjs +0 -1
  196. package/es/el-text-034bd3f4.js +0 -67
  197. package/es/el-text-6b2374bb.cjs +0 -1
  198. package/es/index-00f6ca75.cjs +0 -1
  199. package/es/index-185792a7.cjs +0 -1
  200. package/es/index-1e2a38ab.js +0 -113
  201. package/es/index-2e331d74.js +0 -10
  202. package/es/index-3153c1db.cjs +0 -1
  203. package/es/index-5216d5f5.js +0 -406
  204. package/es/index-5c0dd943.cjs +0 -1
  205. package/es/index-657047bb.js +0 -513
  206. package/es/index-870b6c9d.cjs +0 -1
  207. package/es/index-8c2d7e05.js +0 -368
  208. package/es/index-960806da.js +0 -314
  209. package/es/index-9780a537.cjs +0 -1
  210. package/es/index-9d16cea8.cjs +0 -1
  211. package/es/index-ac8dc53d.cjs +0 -1
  212. package/es/index-bb833443.cjs +0 -1
  213. package/es/index-c5f2d372.js +0 -326
  214. package/es/index-c6584658.js +0 -163
  215. package/es/index-d77a7336.js +0 -204
  216. package/es/index-eea0bcb3.cjs +0 -1
  217. package/es/index-f034b910.js +0 -60
  218. package/es/index-f1c702f6.cjs +0 -1
  219. package/es/index-f58b2920.cjs +0 -1
  220. package/es/scroll-679bd6bf.js +0 -35
  221. package/es/scroll-b108dabd.cjs +0 -1
  222. package/es/use-form-common-props-ac666630.cjs +0 -1
  223. package/es/use-form-common-props-ed72e914.js +0 -364
  224. package/es/use-global-config-23472471.cjs +0 -1
  225. package/es/use-global-config-ee406d58.js +0 -72
  226. package/es/validator-366dbf39.cjs +0 -1
  227. package/es/vnode-5ddb7ed1.js +0 -14
  228. package/es/vnode-b906ae6d.cjs +0 -1
  229. package/es/zh-cn-c21d12d8.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./index-3ed0c678.cjs"),h=require("./base-d987e5c9.cjs"),u=require("./index-d372e68f.cjs"),y=require("./el-popper-f824c63b.cjs");var I=1,M=2;function _(n,r,e,t){var i=e.length,l=i,E=!t;if(n==null)return!l;for(n=Object(n);i--;){var f=e[i];if(E&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++i<l;){f=e[i];var o=f[0],A=n[o],P=f[1];if(E&&f[2]){if(A===void 0&&!(o in n))return!1}else{var R=new s.Stack;if(t)var c=t(A,P,o,n,r,R);if(!(c===void 0?s.baseIsEqual(P,A,I|M,t,R):c))return!1}}return!0}function O(n){return n===n&&!h.isObject$1(n)}function d(n){for(var r=s.keys(n),e=r.length;e--;){var t=r[e],i=n[t];r[e]=[t,i,O(i)]}return r}function g(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function p(n){var r=d(n);return r.length==1&&r[0][2]?g(r[0][0],r[0][1]):function(e){return e===n||_(e,n,r)}}var C=1,q=2;function L(n,r){return u.isKey(n)&&O(r)?g(u.toKey(n),r):function(e){var t=u.get(e,n);return t===void 0&&t===r?y.hasIn(e,n):s.baseIsEqual(r,t,C|q)}}function a(n){return function(r){return r==null?void 0:r[n]}}function D(n){return function(r){return u.baseGet(r,n)}}function G(n){return u.isKey(n)?a(u.toKey(n)):D(n)}function $(n){return typeof n=="function"?n:n==null?y.identity:typeof n=="object"?u.isArray(n)?L(n[0],n[1]):p(n):G(n)}exports.baseIteratee=$;
@@ -0,0 +1,77 @@
1
+ import { S as h, o as g, k as l } from "./index-47d30a52.js";
2
+ import { H as M } from "./base-dd156b8e.js";
3
+ import { f as m, t as E, g as _, c as y, i as C } from "./index-a181f161.js";
4
+ import { t as I, m as L } from "./el-popper-852446fd.js";
5
+ var c = 1, d = 2;
6
+ function D(n, r, t, e) {
7
+ var i = t.length, o = i, A = !e;
8
+ if (n == null)
9
+ return !o;
10
+ for (n = Object(n); i--; ) {
11
+ var f = t[i];
12
+ if (A && f[2] ? f[1] !== n[f[0]] : !(f[0] in n))
13
+ return !1;
14
+ }
15
+ for (; ++i < o; ) {
16
+ f = t[i];
17
+ var u = f[0], s = n[u], a = f[1];
18
+ if (A && f[2]) {
19
+ if (s === void 0 && !(u in n))
20
+ return !1;
21
+ } else {
22
+ var p = new h();
23
+ if (e)
24
+ var R = e(s, a, u, n, r, p);
25
+ if (!(R === void 0 ? g(a, s, c | d, e, p) : R))
26
+ return !1;
27
+ }
28
+ }
29
+ return !0;
30
+ }
31
+ function O(n) {
32
+ return n === n && !M(n);
33
+ }
34
+ function G(n) {
35
+ for (var r = l(n), t = r.length; t--; ) {
36
+ var e = r[t], i = n[e];
37
+ r[t] = [e, i, O(i)];
38
+ }
39
+ return r;
40
+ }
41
+ function P(n, r) {
42
+ return function(t) {
43
+ return t == null ? !1 : t[n] === r && (r !== void 0 || n in Object(t));
44
+ };
45
+ }
46
+ function w(n) {
47
+ var r = G(n);
48
+ return r.length == 1 && r[0][2] ? P(r[0][0], r[0][1]) : function(t) {
49
+ return t === n || D(t, n, r);
50
+ };
51
+ }
52
+ var F = 1, S = 2;
53
+ function T(n, r) {
54
+ return m(n) && O(r) ? P(E(n), r) : function(t) {
55
+ var e = _(t, n);
56
+ return e === void 0 && e === r ? I(t, n) : g(r, e, F | S);
57
+ };
58
+ }
59
+ function x(n) {
60
+ return function(r) {
61
+ return r == null ? void 0 : r[n];
62
+ };
63
+ }
64
+ function K(n) {
65
+ return function(r) {
66
+ return y(r, n);
67
+ };
68
+ }
69
+ function N(n) {
70
+ return m(n) ? x(E(n)) : K(n);
71
+ }
72
+ function H(n) {
73
+ return typeof n == "function" ? n : n == null ? L : typeof n == "object" ? C(n) ? T(n[0], n[1]) : w(n) : N(n);
74
+ }
75
+ export {
76
+ H as b
77
+ };
@@ -0,0 +1,84 @@
1
+ import { b as _, u as C, i as x, w as S } from "./base-dd156b8e.js";
2
+ import { k as b, e as w } from "./use-form-item-187cd7db.js";
3
+ import { defineComponent as k, useAttrs as z, ref as T, computed as A, onMounted as B, onUpdated as E, openBlock as H, createBlock as W, resolveDynamicComponent as N, normalizeClass as P, normalizeStyle as R, withCtx as U, renderSlot as D, nextTick as F } from "vue";
4
+ const I = _({
5
+ /**
6
+ * @description text type
7
+ */
8
+ type: {
9
+ type: String,
10
+ values: [
11
+ "primary",
12
+ "success",
13
+ "info",
14
+ "warning",
15
+ "danger",
16
+ ""
17
+ ],
18
+ default: ""
19
+ },
20
+ /**
21
+ * @description text size
22
+ */
23
+ size: {
24
+ type: String,
25
+ values: b,
26
+ default: ""
27
+ },
28
+ /**
29
+ * @description render ellipsis
30
+ */
31
+ truncated: Boolean,
32
+ /**
33
+ * @description maximum lines
34
+ */
35
+ lineClamp: { type: [String, Number] },
36
+ /**
37
+ * @description custom element tag
38
+ */
39
+ tag: {
40
+ type: String,
41
+ default: "span"
42
+ }
43
+ });
44
+ var K = /* @__PURE__ */ k({
45
+ name: "ElText",
46
+ __name: "text",
47
+ props: I,
48
+ setup(i) {
49
+ const e = i, y = z(), t = T(), g = w(), l = C("text"), h = A(() => [
50
+ l.b(),
51
+ l.m(e.type),
52
+ l.m(g.value),
53
+ l.is("truncated", e.truncated),
54
+ l.is("line-clamp", !x(e.lineClamp))
55
+ ]), o = async () => {
56
+ var u, c, p, d, f, m, v;
57
+ if (await F(), y.title)
58
+ return;
59
+ let s = !1;
60
+ const r = ((u = t.value) == null ? void 0 : u.textContent) || "";
61
+ if (e.truncated) {
62
+ const n = (c = t.value) == null ? void 0 : c.offsetWidth, a = (p = t.value) == null ? void 0 : p.scrollWidth;
63
+ n && a && a > n && (s = !0);
64
+ } else if (!x(e.lineClamp)) {
65
+ const n = (d = t.value) == null ? void 0 : d.offsetHeight, a = (f = t.value) == null ? void 0 : f.scrollHeight;
66
+ n && a && a > n && (s = !0);
67
+ }
68
+ s ? (m = t.value) == null || m.setAttribute("title", r) : (v = t.value) == null || v.removeAttribute("title");
69
+ };
70
+ return B(o), E(o), (s, r) => (H(), W(N(i.tag), {
71
+ ref_key: "textRef",
72
+ ref: t,
73
+ class: P(h.value),
74
+ style: R({ "-webkit-line-clamp": i.lineClamp })
75
+ }, {
76
+ default: U(() => [D(s.$slots, "default")]),
77
+ _: 3
78
+ }, 8, ["class", "style"]));
79
+ }
80
+ }), M = K;
81
+ const G = S(M);
82
+ export {
83
+ G as E
84
+ };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("./base-d987e5c9.cjs"),g=require("./use-form-item-0a831287.cjs"),e=require("vue"),S=r.buildProps({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:g.componentSizes,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}});var b=e.defineComponent({name:"ElText",__name:"text",props:S,setup(o){const l=o,h=e.useAttrs(),t=e.ref(),_=g.useFormSize(),s=r.useNamespace("text"),C=e.computed(()=>[s.b(),s.m(l.type),s.m(_.value),s.is("truncated",l.truncated),s.is("line-clamp",!r.isUndefined(l.lineClamp))]),u=async()=>{var d,f,p,m,v,x,y;if(await e.nextTick(),h.title)return;let n=!1;const c=((d=t.value)==null?void 0:d.textContent)||"";if(l.truncated){const i=(f=t.value)==null?void 0:f.offsetWidth,a=(p=t.value)==null?void 0:p.scrollWidth;i&&a&&a>i&&(n=!0)}else if(!r.isUndefined(l.lineClamp)){const i=(m=t.value)==null?void 0:m.offsetHeight,a=(v=t.value)==null?void 0:v.scrollHeight;i&&a&&a>i&&(n=!0)}n?(x=t.value)==null||x.setAttribute("title",c):(y=t.value)==null||y.removeAttribute("title")};return e.onMounted(u),e.onUpdated(u),(n,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"textRef",ref:t,class:e.normalizeClass(C.value),style:e.normalizeStyle({"-webkit-line-clamp":o.lineClamp})},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["class","style"]))}}),T=b;const w=r.withInstall(T);exports.ElText=w;
@@ -0,0 +1,468 @@
1
+ import { b as J, c as y, u as ve, s as T, p as j, w as ye, y as K, e as be, a as D, B as P, q as L, E as he, F as Ce, v as Q, W as Te } from "./base-dd156b8e.js";
2
+ import { m as c } from "./config-provider-563023c9.js";
3
+ import { i as xe, m as Z, b as Se, u as we, T as Ee } from "./use-form-item-187cd7db.js";
4
+ import { m as Be } from "./typescript-7ae59c4c.js";
5
+ import { defineComponent as X, computed as f, openBlock as m, createElementBlock as $, normalizeClass as g, unref as l, renderSlot as A, createVNode as F, Transition as Y, withCtx as k, normalizeStyle as _, createTextVNode as ee, toDisplayString as te, createCommentVNode as C, shallowReactive as ne, ref as M, onMounted as Ne, watch as Me, createBlock as h, withDirectives as ke, createElementVNode as W, resolveDynamicComponent as $e, Fragment as Ie, withModifiers as Oe, vShow as Le, nextTick as Pe, isVNode as se, render as q } from "vue";
6
+ import { g as Ae, a as De } from "./el-popper-852446fd.js";
7
+ import { E as G } from "./index-60900c6c.js";
8
+ import { u as Fe } from "./use-global-config-17dafd40.js";
9
+ const He = J({
10
+ /**
11
+ * @description display value.
12
+ */
13
+ value: {
14
+ type: [String, Number],
15
+ default: ""
16
+ },
17
+ /**
18
+ * @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.
19
+ */
20
+ max: {
21
+ type: Number,
22
+ default: 99
23
+ },
24
+ /**
25
+ * @description if a little dot is displayed.
26
+ */
27
+ isDot: Boolean,
28
+ /**
29
+ * @description hidden badge.
30
+ */
31
+ hidden: Boolean,
32
+ /**
33
+ * @description badge type.
34
+ */
35
+ type: {
36
+ type: String,
37
+ values: [
38
+ "primary",
39
+ "success",
40
+ "warning",
41
+ "info",
42
+ "danger"
43
+ ],
44
+ default: "danger"
45
+ },
46
+ /**
47
+ * @description whether to show badge when value is zero.
48
+ */
49
+ showZero: {
50
+ type: Boolean,
51
+ default: !0
52
+ },
53
+ /**
54
+ * @description customize dot background color
55
+ */
56
+ color: String,
57
+ /**
58
+ * @description CSS style of badge
59
+ */
60
+ badgeStyle: {
61
+ type: y([
62
+ String,
63
+ Object,
64
+ Array,
65
+ Boolean
66
+ ]),
67
+ default: void 0
68
+ },
69
+ /**
70
+ * @description set offset of the badge
71
+ */
72
+ offset: {
73
+ type: y(Array),
74
+ default: () => [0, 0]
75
+ },
76
+ /**
77
+ * @description custom class name of badge
78
+ */
79
+ badgeClass: {
80
+ type: y([
81
+ String,
82
+ Array,
83
+ Object,
84
+ Boolean
85
+ ]),
86
+ default: void 0
87
+ }
88
+ });
89
+ var ze = /* @__PURE__ */ X({
90
+ name: "ElBadge",
91
+ __name: "badge",
92
+ props: He,
93
+ setup(e, { expose: s }) {
94
+ const t = e, o = ve("badge"), n = f(() => t.isDot ? "" : T(t.value) && T(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), u = f(() => [{
95
+ backgroundColor: t.color,
96
+ marginRight: j(-t.offset[0]),
97
+ marginTop: j(t.offset[1])
98
+ }, t.badgeStyle ?? {}]);
99
+ return s({
100
+ /** @description badge content */
101
+ content: n
102
+ }), (i, a) => (m(), $("div", { class: g(l(o).b()) }, [A(i.$slots, "default"), F(Y, { name: `${l(o).namespace.value}-zoom-in-center` }, {
103
+ default: k(() => [!e.hidden && (n.value || e.isDot || i.$slots.content) ? (m(), $("sup", {
104
+ key: 0,
105
+ class: g([
106
+ l(o).e("content"),
107
+ l(o).em("content", e.type),
108
+ l(o).is("fixed", !!i.$slots.default),
109
+ l(o).is("dot", e.isDot),
110
+ l(o).is("hide-zero", !e.showZero && e.value === 0),
111
+ e.badgeClass
112
+ ]),
113
+ style: _(u.value)
114
+ }, [A(i.$slots, "content", { value: n.value }, () => [ee(te(n.value), 1)])], 6)) : C("v-if", !0)]),
115
+ _: 3
116
+ }, 8, ["name"])], 2));
117
+ }
118
+ }), Re = ze;
119
+ const Ve = ye(Re), oe = [
120
+ "primary",
121
+ "success",
122
+ "info",
123
+ "warning",
124
+ "error"
125
+ ], ae = [
126
+ "top",
127
+ "top-left",
128
+ "top-right",
129
+ "bottom",
130
+ "bottom-left",
131
+ "bottom-right"
132
+ ], r = Be({
133
+ customClass: "",
134
+ dangerouslyUseHTMLString: !1,
135
+ duration: 3e3,
136
+ icon: void 0,
137
+ id: "",
138
+ message: "",
139
+ onClose: void 0,
140
+ showClose: !1,
141
+ type: "info",
142
+ plain: !1,
143
+ offset: 16,
144
+ placement: void 0,
145
+ zIndex: 0,
146
+ grouping: !1,
147
+ repeatNum: 1,
148
+ appendTo: K ? document.body : void 0
149
+ }), Ue = J({
150
+ /**
151
+ * @description custom class name for Message
152
+ */
153
+ customClass: {
154
+ type: y([
155
+ String,
156
+ Array,
157
+ Object,
158
+ Boolean
159
+ ]),
160
+ default: r.customClass
161
+ },
162
+ /**
163
+ * @description whether `message` is treated as HTML string
164
+ */
165
+ dangerouslyUseHTMLString: {
166
+ type: Boolean,
167
+ default: r.dangerouslyUseHTMLString
168
+ },
169
+ /**
170
+ * @description display duration, millisecond. If set to 0, it will not turn off automatically
171
+ */
172
+ duration: {
173
+ type: Number,
174
+ default: r.duration
175
+ },
176
+ /**
177
+ * @description custom icon component, overrides `type`
178
+ */
179
+ icon: {
180
+ type: xe,
181
+ default: r.icon
182
+ },
183
+ /**
184
+ * @description message dom id
185
+ */
186
+ id: {
187
+ type: String,
188
+ default: r.id
189
+ },
190
+ /**
191
+ * @description message text
192
+ */
193
+ message: {
194
+ type: y([
195
+ String,
196
+ Object,
197
+ Function
198
+ ]),
199
+ default: r.message
200
+ },
201
+ /**
202
+ * @description callback function when closed with the message instance as the parameter
203
+ */
204
+ onClose: {
205
+ type: y(Function),
206
+ default: r.onClose
207
+ },
208
+ /**
209
+ * @description whether to show a close button
210
+ */
211
+ showClose: {
212
+ type: Boolean,
213
+ default: r.showClose
214
+ },
215
+ /**
216
+ * @description message type
217
+ */
218
+ type: {
219
+ type: String,
220
+ values: oe,
221
+ default: r.type
222
+ },
223
+ /**
224
+ * @description whether message is plain
225
+ */
226
+ plain: {
227
+ type: Boolean,
228
+ default: r.plain
229
+ },
230
+ /**
231
+ * @description set the distance to the top of viewport
232
+ */
233
+ offset: {
234
+ type: Number,
235
+ default: r.offset
236
+ },
237
+ /**
238
+ * @description message placement position
239
+ */
240
+ placement: {
241
+ type: String,
242
+ values: ae,
243
+ default: r.placement
244
+ },
245
+ /**
246
+ * @description message element zIndex value
247
+ */
248
+ zIndex: {
249
+ type: Number,
250
+ default: r.zIndex
251
+ },
252
+ /**
253
+ * @description merge messages with the same content, type of VNode message is not supported
254
+ */
255
+ grouping: {
256
+ type: Boolean,
257
+ default: r.grouping
258
+ },
259
+ /**
260
+ * @description The number of repetitions, similar to badge, is used as the initial number when used with `grouping`
261
+ */
262
+ repeatNum: {
263
+ type: Number,
264
+ default: r.repeatNum
265
+ }
266
+ }), je = { destroy: () => !0 }, p = ne({}), Ze = (e) => (p[e] || (p[e] = ne([])), p[e]), We = (e, s) => {
267
+ const t = p[s] || [], o = t.findIndex((i) => i.id === e), n = t[o];
268
+ let u;
269
+ return o > 0 && (u = t[o - 1]), {
270
+ current: n,
271
+ prev: u
272
+ };
273
+ }, qe = (e, s) => {
274
+ const { prev: t } = We(e, s);
275
+ return t ? t.vm.exposed.bottom.value : 0;
276
+ }, Ge = (e, s, t) => (p[t] || []).findIndex((o) => o.id === e) > 0 ? 16 : s, Je = ["id"], Ke = ["innerHTML"];
277
+ var Qe = /* @__PURE__ */ X({
278
+ name: "ElMessage",
279
+ __name: "message",
280
+ props: Ue,
281
+ emits: je,
282
+ setup(e, { expose: s, emit: t }) {
283
+ const { Close: o } = Ee, n = e, u = t, i = M(!1), { ns: a, zIndex: x } = Fe("message"), { currentZIndex: S, nextZIndex: ie } = x, I = M(), w = M(!1), H = M(0);
284
+ let E;
285
+ const re = f(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), ue = f(() => {
286
+ const d = n.type;
287
+ return { [a.bm("icon", d)]: d && Z[d] };
288
+ }), z = f(() => n.icon || Z[n.type] || ""), b = f(() => n.placement || "top"), ce = f(() => qe(n.id, b.value)), R = f(() => Math.max(Ge(n.id, n.offset, b.value) + ce.value, n.offset)), de = f(() => H.value + R.value), fe = f(() => b.value.includes("left") ? a.is("left") : b.value.includes("right") ? a.is("right") : a.is("center")), V = f(() => b.value.startsWith("top") ? "top" : "bottom"), pe = f(() => ({
289
+ [V.value]: `${R.value}px`,
290
+ zIndex: S.value
291
+ }));
292
+ function O() {
293
+ n.duration !== 0 && ({ stop: E } = be(() => {
294
+ B();
295
+ }, n.duration));
296
+ }
297
+ function U() {
298
+ E == null || E();
299
+ }
300
+ function B() {
301
+ w.value = !1, Pe(() => {
302
+ var d;
303
+ i.value || ((d = n.onClose) == null || d.call(n), u("destroy"));
304
+ });
305
+ }
306
+ function me(d) {
307
+ Ae(d) === De.esc && B();
308
+ }
309
+ return Ne(() => {
310
+ O(), ie(), w.value = !0;
311
+ }), Me(() => n.repeatNum, () => {
312
+ U(), O();
313
+ }), Se(document, "keydown", me), we(I, () => {
314
+ H.value = I.value.getBoundingClientRect().height;
315
+ }), s({
316
+ visible: w,
317
+ bottom: de,
318
+ close: B
319
+ }), (d, N) => (m(), h(Y, {
320
+ name: l(a).b("fade"),
321
+ onBeforeEnter: N[0] || (N[0] = (ge) => i.value = !0),
322
+ onBeforeLeave: e.onClose,
323
+ onAfterLeave: N[1] || (N[1] = (ge) => d.$emit("destroy")),
324
+ persisted: ""
325
+ }, {
326
+ default: k(() => [ke(W("div", {
327
+ id: e.id,
328
+ ref_key: "messageRef",
329
+ ref: I,
330
+ class: g([
331
+ l(a).b(),
332
+ { [l(a).m(e.type)]: e.type },
333
+ l(a).is("closable", e.showClose),
334
+ l(a).is("plain", e.plain),
335
+ l(a).is("bottom", V.value === "bottom"),
336
+ fe.value,
337
+ e.customClass
338
+ ]),
339
+ style: _(pe.value),
340
+ role: "alert",
341
+ onMouseenter: U,
342
+ onMouseleave: O
343
+ }, [
344
+ e.repeatNum > 1 ? (m(), h(l(Ve), {
345
+ key: 0,
346
+ value: e.repeatNum,
347
+ type: re.value,
348
+ class: g(l(a).e("badge"))
349
+ }, null, 8, [
350
+ "value",
351
+ "type",
352
+ "class"
353
+ ])) : C("v-if", !0),
354
+ z.value ? (m(), h(l(G), {
355
+ key: 1,
356
+ class: g([l(a).e("icon"), ue.value])
357
+ }, {
358
+ default: k(() => [(m(), h($e(z.value)))]),
359
+ _: 1
360
+ }, 8, ["class"])) : C("v-if", !0),
361
+ !e.dangerouslyUseHTMLString || d.$slots.default ? (m(), $("p", {
362
+ key: 2,
363
+ class: g(l(a).e("content"))
364
+ }, [A(d.$slots, "default", {}, () => [ee(te(e.message), 1)])], 2)) : (m(), $(Ie, { key: 3 }, [C(" Caution here, message could've been compromised, never use user's input as message "), W("p", {
365
+ class: g(l(a).e("content")),
366
+ innerHTML: e.message
367
+ }, null, 10, Ke)], 2112)),
368
+ e.showClose ? (m(), h(l(G), {
369
+ key: 4,
370
+ class: g(l(a).e("closeBtn")),
371
+ onClick: Oe(B, ["stop"])
372
+ }, {
373
+ default: k(() => [F(l(o))]),
374
+ _: 1
375
+ }, 8, ["class"])) : C("v-if", !0)
376
+ ], 46, Je), [[Le, w.value]])]),
377
+ _: 3
378
+ }, 8, ["name", "onBeforeLeave"]));
379
+ }
380
+ }), Xe = Qe;
381
+ let Ye = 1;
382
+ const _e = (e) => {
383
+ if (!e.appendTo)
384
+ e.appendTo = document.body;
385
+ else if (D(e.appendTo)) {
386
+ let s = document.querySelector(e.appendTo);
387
+ Ce(s) || (Q("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), s = document.body), e.appendTo = s;
388
+ }
389
+ }, et = (e) => {
390
+ !e.placement && D(c.placement) && c.placement && (e.placement = c.placement), e.placement || (e.placement = "top"), ae.includes(e.placement) || (Q("ElMessage", `Invalid placement: ${e.placement}. Falling back to 'top'.`), e.placement = "top");
391
+ }, le = (e) => {
392
+ const s = !e || D(e) || se(e) || P(e) ? { message: e } : e, t = {
393
+ ...r,
394
+ ...s
395
+ };
396
+ return _e(t), et(t), L(c.grouping) && !t.grouping && (t.grouping = c.grouping), T(c.duration) && t.duration === 3e3 && (t.duration = c.duration), T(c.offset) && t.offset === 16 && (t.offset = c.offset), L(c.showClose) && !t.showClose && (t.showClose = c.showClose), L(c.plain) && !t.plain && (t.plain = c.plain), t;
397
+ }, tt = (e) => {
398
+ const s = p[e.props.placement || "top"], t = s.indexOf(e);
399
+ if (t === -1)
400
+ return;
401
+ s.splice(t, 1);
402
+ const { handler: o } = e;
403
+ o.close();
404
+ }, nt = ({ appendTo: e, ...s }, t) => {
405
+ const o = `message_${Ye++}`, n = s.onClose, u = document.createElement("div"), i = {
406
+ ...s,
407
+ id: o,
408
+ onClose: () => {
409
+ n == null || n(), tt(S);
410
+ },
411
+ onDestroy: () => {
412
+ q(null, u);
413
+ }
414
+ }, a = F(Xe, i, P(i.message) || se(i.message) ? { default: P(i.message) ? i.message : () => i.message } : null);
415
+ a.appContext = t || v._context, q(a, u), e.appendChild(u.firstElementChild);
416
+ const x = a.component, S = {
417
+ id: o,
418
+ vnode: a,
419
+ vm: x,
420
+ handler: { close: () => {
421
+ x.exposed.close();
422
+ } },
423
+ props: a.component.props
424
+ };
425
+ return S;
426
+ }, v = (e = {}, s) => {
427
+ if (!K)
428
+ return { close: () => {
429
+ } };
430
+ const t = le(e), o = Ze(t.placement || "top");
431
+ if (t.grouping && o.length) {
432
+ const u = o.find(({ vnode: i }) => {
433
+ var a;
434
+ return ((a = i.props) == null ? void 0 : a.message) === t.message;
435
+ });
436
+ if (u)
437
+ return u.props.repeatNum += 1, u.props.type = t.type, u.handler;
438
+ }
439
+ if (T(c.max) && o.length >= c.max)
440
+ return { close: () => {
441
+ } };
442
+ const n = nt(t, s);
443
+ return o.push(n), n.handler;
444
+ };
445
+ oe.forEach((e) => {
446
+ v[e] = (s = {}, t) => v({
447
+ ...le(s),
448
+ type: e
449
+ }, t);
450
+ });
451
+ function st(e) {
452
+ for (const s in p)
453
+ if (he(p, s)) {
454
+ const t = [...p[s]];
455
+ for (const o of t)
456
+ (!e || e === o.props.type) && o.handler.close();
457
+ }
458
+ }
459
+ function ot(e) {
460
+ p[e] && [...p[e]].forEach((s) => s.handler.close());
461
+ }
462
+ v.closeAll = st;
463
+ v.closeAllByPlacement = ot;
464
+ v._context = null;
465
+ const pt = Te(v, "$message");
466
+ export {
467
+ pt as E
468
+ };