st-comp 0.0.147 → 0.0.149

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 (142) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +2 -2
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +26 -22
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +112 -103
  8. package/es/Kline.cjs +1 -0
  9. package/es/Kline.js +1901 -0
  10. package/es/KlineBasic.cjs +1 -1
  11. package/es/KlineBasic.js +675 -1422
  12. package/es/KlineNew.cjs +1 -3
  13. package/es/KlineNew.js +314 -2736
  14. package/es/Pagination.cjs +1 -1
  15. package/es/Pagination.js +102 -96
  16. package/es/Table.cjs +1 -1
  17. package/es/Table.js +66 -60
  18. package/es/User.cjs +1 -1
  19. package/es/User.js +102 -95
  20. package/es/VarietySearch.cjs +1 -1
  21. package/es/VarietySearch.js +41 -32
  22. package/es/VirtualTable.cjs +13 -1
  23. package/es/VirtualTable.js +2801 -1
  24. package/es/{_initCloneObject-a8dcd058.js → _initCloneObject-14b53c6f.js} +26 -26
  25. package/es/_initCloneObject-441db749.cjs +1 -0
  26. package/es/{base-674a354a.js → base-437d17f3.js} +64 -63
  27. package/es/{base-00ce90ec.cjs → base-ec05f348.cjs} +3 -3
  28. package/es/castArray-4251bbe4.js +10 -0
  29. package/es/castArray-a45823fe.cjs +1 -0
  30. package/es/config-provider-55482a43.js +47 -0
  31. package/es/config-provider-7cdfca4d.cjs +1 -0
  32. package/es/debounce-ac30be50.js +83 -0
  33. package/es/debounce-b2ff12bd.cjs +1 -0
  34. package/es/{dropdown-ce30ada6.js → dropdown-634b5e27.js} +31 -30
  35. package/es/dropdown-d7c59a21.cjs +1 -0
  36. package/es/el-button-196807af.cjs +1 -0
  37. package/es/el-button-e1665717.js +235 -0
  38. package/es/el-checkbox-group-492b95cc.cjs +1 -0
  39. package/es/{el-checkbox-group-0554b352.js → el-checkbox-group-e8fece80.js} +10 -10
  40. package/es/{el-empty-87154b6d.cjs → el-empty-19ea04f4.cjs} +1 -1
  41. package/es/{el-empty-39b3aed7.js → el-empty-bacc6613.js} +5 -5
  42. package/es/el-form-item-5bdffd07.cjs +12 -0
  43. package/es/{el-form-item-fc6f80ab.js → el-form-item-af1855f0.js} +79 -78
  44. package/es/el-input-23e2bac3.cjs +1 -0
  45. package/es/{el-input-d249ac86.js → el-input-4961b99f.js} +84 -82
  46. package/es/el-input-number-40a81eb5.cjs +1 -0
  47. package/es/{el-input-number-2066fbb7.js → el-input-number-610fc8ba.js} +36 -35
  48. package/es/el-menu-item-78b858f2.cjs +1 -0
  49. package/es/el-menu-item-7d04c11a.js +771 -0
  50. package/es/{el-message-9859835d.js → el-message-c3b3ac96.js} +81 -79
  51. package/es/el-message-d4df8136.cjs +1 -0
  52. package/es/el-overlay-12dd9b35.js +519 -0
  53. package/es/el-overlay-bc0790a2.cjs +1 -0
  54. package/es/{el-popover-b7b43c1f.js → el-popover-0aa071f2.js} +18 -18
  55. package/es/el-popover-8a77e015.cjs +1 -0
  56. package/es/el-popper-50100766.js +2262 -0
  57. package/es/el-popper-746070ba.cjs +1 -0
  58. package/es/el-scrollbar-562d0595.js +201 -0
  59. package/es/el-scrollbar-d1c3e7f7.cjs +1 -0
  60. package/es/{el-select-bcbb7e55.js → el-select-9381b156.js} +333 -329
  61. package/es/el-select-b162dffc.cjs +1 -0
  62. package/es/{el-table-column-c1e1a206.js → el-table-column-55bffba5.js} +350 -346
  63. package/es/el-table-column-6d761fce.cjs +14 -0
  64. package/es/el-tag-985d9aff.js +279 -0
  65. package/es/el-tag-c51a6490.cjs +1 -0
  66. package/es/index-09e01b1d.js +81 -0
  67. package/es/index-0cb48e01.js +306 -0
  68. package/es/{index-45de4a12.js → index-39ec9741.js} +7 -7
  69. package/es/index-3bf8d597.cjs +1 -0
  70. package/es/index-657047bb.js +513 -0
  71. package/es/index-8a0b1c53.cjs +3 -0
  72. package/es/index-a387515d.cjs +1 -0
  73. package/es/index-a902a0d9.js +59 -0
  74. package/es/index-deb8de52.cjs +1 -0
  75. package/es/index-eea0bcb3.cjs +1 -0
  76. package/es/index.esm-8d9a2abe.js +2432 -0
  77. package/es/index.esm-94a95a2a.cjs +3 -0
  78. package/es/raf-8fc301fd.cjs +1 -0
  79. package/es/raf-b128c7b7.js +6 -0
  80. package/es/{scroll-cb696ed2.js → scroll-387fcfdb.js} +1 -1
  81. package/es/{scroll-cca17da0.cjs → scroll-41224831.cjs} +1 -1
  82. package/es/style.css +1 -1
  83. package/es/typescript-7ae59c4c.js +4 -0
  84. package/es/typescript-b63f8e83.cjs +1 -0
  85. package/es/use-form-common-props-1b84d8f4.cjs +2 -0
  86. package/es/use-form-common-props-f377e500.js +587 -0
  87. package/es/vnode-7dfd4ed5.js +14 -0
  88. package/es/vnode-7fbc61e1.cjs +1 -0
  89. package/es/{zh-cn-37af467d.cjs → zh-cn-ab9a583d.cjs} +1 -1
  90. package/es/{zh-cn-ef7d7220.js → zh-cn-eb9c2820.js} +2 -2
  91. package/lib/bundle.js +1 -1
  92. package/lib/bundle.umd.cjs +206 -206
  93. package/lib/{index-24f8572c.js → index-d2de454d.js} +33249 -31372
  94. package/lib/{python-2143eee4.js → python-22975586.js} +1 -1
  95. package/lib/style.css +1 -1
  96. package/package.json +1 -1
  97. package/packages/Kline/components/Contextmenu/index.vue +110 -0
  98. package/packages/Kline/components/Tips/index.vue +40 -0
  99. package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
  100. package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
  101. package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
  102. package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
  103. package/packages/Kline/componentsNew/Tips/index.vue +33 -0
  104. package/packages/Kline/formatKlineData.ts +109 -0
  105. package/packages/Kline/images/buy.svg +1 -0
  106. package/packages/Kline/images/pen.png +0 -0
  107. package/packages/Kline/images/sell.svg +1 -0
  108. package/packages/Kline/images/t.svg +1 -0
  109. package/packages/Kline/index.ts +16 -0
  110. package/packages/Kline/index.vue +891 -0
  111. package/packages/Kline/option.ts +539 -0
  112. package/packages/Kline/type.d.ts +219 -0
  113. package/packages/Kline/utils.ts +682 -0
  114. package/packages/KlineBasic/utils.js +1 -1
  115. package/packages/index.ts +2 -0
  116. package/src/pages/Kline/index.vue +12 -0
  117. package/src/router/routes.ts +5 -0
  118. package/es/_initCloneObject-7493ecd5.cjs +0 -1
  119. package/es/config-provider-419ffbf2.js +0 -120
  120. package/es/config-provider-68414290.cjs +0 -3
  121. package/es/dropdown-127a8c0d.cjs +0 -1
  122. package/es/el-button-7b9f5933.js +0 -745
  123. package/es/el-button-c00975e1.cjs +0 -1
  124. package/es/el-checkbox-group-7a313d34.cjs +0 -1
  125. package/es/el-form-item-7867f64d.cjs +0 -12
  126. package/es/el-input-2ff1628c.cjs +0 -1
  127. package/es/el-input-number-d6801a5c.cjs +0 -1
  128. package/es/el-message-ffcf690c.cjs +0 -1
  129. package/es/el-overlay-91784be2.cjs +0 -1
  130. package/es/el-overlay-f0757cc4.js +0 -525
  131. package/es/el-popover-4db657e2.cjs +0 -1
  132. package/es/el-scrollbar-35bac6b3.js +0 -2452
  133. package/es/el-scrollbar-ec09bbd3.cjs +0 -1
  134. package/es/el-select-0785c35a.cjs +0 -1
  135. package/es/el-table-column-2478adf8.cjs +0 -14
  136. package/es/el-tag-13ee17b3.cjs +0 -1
  137. package/es/el-tag-73372c6c.js +0 -359
  138. package/es/index-07b61d12.cjs +0 -1
  139. package/es/index-65b719a4.cjs +0 -1
  140. package/es/index-8b5fbc11.js +0 -66
  141. package/es/index-8c85d7c5.js +0 -858
  142. package/es/index-a49f4743.cjs +0 -2
@@ -1,9 +1,11 @@
1
- import { defineComponent as E, computed as m, openBlock as v, createElementBlock as z, normalizeClass as C, unref as s, renderSlot as I, createVNode as O, Transition as Z, withCtx as N, withDirectives as j, createElementVNode as L, normalizeStyle as q, createTextVNode as re, toDisplayString as G, vShow as W, shallowReactive as ie, ref as $, onMounted as ue, watch as de, createBlock as b, createCommentVNode as S, resolveDynamicComponent as ce, Fragment as pe, withModifiers as fe, isVNode as J, render as H } from "vue";
2
- import { b as me, d as ge } from "./el-scrollbar-35bac6b3.js";
3
- import { b as K, d as B, u as ye, k as T, h as A, _ as Q, w as ve, i as X, x as Ce, n as R, e as _, c as he, m as be, y as V, z as Te } from "./base-674a354a.js";
4
- import { i as we, T as P, E as U, w as Se, b as Ne } from "./index-8c85d7c5.js";
5
- import { m as Be } from "./el-input-d249ac86.js";
6
- import { u as Ee, m as c } from "./config-provider-419ffbf2.js";
1
+ import { defineComponent as B, computed as m, openBlock as v, createElementBlock as z, normalizeClass as C, unref as s, renderSlot as I, createVNode as O, Transition as j, withCtx as E, withDirectives as Z, createElementVNode as L, normalizeStyle as q, createTextVNode as re, toDisplayString as G, vShow as W, shallowReactive as ie, ref as k, onMounted as ue, watch as de, createBlock as b, createCommentVNode as S, resolveDynamicComponent as ce, Fragment as pe, withModifiers as fe, isVNode as J, render as H } from "vue";
2
+ import { b as me, a as ge } from "./el-scrollbar-562d0595.js";
3
+ import { b as K, d as N, u as ye, a as T, y as A, _ as Q, w as ve, j as X, p as Ce, i as R, h as _, m as he, f as be, c as V, T as Te } from "./base-437d17f3.js";
4
+ import { j as we, f as P, E as U, T as Se } from "./use-form-common-props-f377e500.js";
5
+ import { m as Ee } from "./typescript-7ae59c4c.js";
6
+ import { u as Ne } from "./index-09e01b1d.js";
7
+ import { E as Be } from "./index-0cb48e01.js";
8
+ import { m as c } from "./config-provider-55482a43.js";
7
9
  const Me = K({
8
10
  value: {
9
11
  type: [String, Number],
@@ -26,22 +28,22 @@ const Me = K({
26
28
  },
27
29
  color: String,
28
30
  badgeStyle: {
29
- type: B([String, Object, Array])
31
+ type: N([String, Object, Array])
30
32
  },
31
33
  offset: {
32
- type: B(Array),
34
+ type: N(Array),
33
35
  default: [0, 0]
34
36
  },
35
37
  badgeClass: {
36
38
  type: String
37
39
  }
38
- }), ke = E({
40
+ }), $e = B({
39
41
  name: "ElBadge"
40
- }), $e = /* @__PURE__ */ E({
41
- ...ke,
42
+ }), ke = /* @__PURE__ */ B({
43
+ ...$e,
42
44
  props: Me,
43
- setup(o, { expose: n }) {
44
- const e = o, a = ye("badge"), t = m(() => e.isDot ? "" : T(e.value) && T(e.max) ? e.max < e.value ? `${e.max}+` : `${e.value}` : `${e.value}`), p = m(() => {
45
+ setup(o, { expose: t }) {
46
+ const e = o, a = ye("badge"), n = m(() => e.isDot ? "" : T(e.value) && T(e.max) ? e.max < e.value ? `${e.max}+` : `${e.value}` : `${e.value}`), p = m(() => {
45
47
  var l, u, f, g, y;
46
48
  return [
47
49
  {
@@ -52,18 +54,18 @@ const Me = K({
52
54
  (y = e.badgeStyle) != null ? y : {}
53
55
  ];
54
56
  });
55
- return n({
56
- content: t
57
+ return t({
58
+ content: n
57
59
  }), (l, u) => (v(), z("div", {
58
60
  class: C(s(a).b())
59
61
  }, [
60
62
  I(l.$slots, "default"),
61
- O(Z, {
63
+ O(j, {
62
64
  name: `${s(a).namespace.value}-zoom-in-center`,
63
65
  persisted: ""
64
66
  }, {
65
- default: N(() => [
66
- j(L("sup", {
67
+ default: E(() => [
68
+ Z(L("sup", {
67
69
  class: C([
68
70
  s(a).e("content"),
69
71
  s(a).em("content", l.type),
@@ -74,11 +76,11 @@ const Me = K({
74
76
  ]),
75
77
  style: q(s(p))
76
78
  }, [
77
- I(l.$slots, "content", { value: s(t) }, () => [
78
- re(G(s(t)), 1)
79
+ I(l.$slots, "content", { value: s(n) }, () => [
80
+ re(G(s(n)), 1)
79
81
  ])
80
82
  ], 6), [
81
- [W, !l.hidden && (s(t) || l.isDot || l.$slots.content)]
83
+ [W, !l.hidden && (s(n) || l.isDot || l.$slots.content)]
82
84
  ])
83
85
  ]),
84
86
  _: 3
@@ -86,8 +88,8 @@ const Me = K({
86
88
  ], 2));
87
89
  }
88
90
  });
89
- var ze = /* @__PURE__ */ Q($e, [["__file", "badge.vue"]]);
90
- const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
91
+ var ze = /* @__PURE__ */ Q(ke, [["__file", "badge.vue"]]);
92
+ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Ee({
91
93
  customClass: "",
92
94
  center: !1,
93
95
  dangerouslyUseHTMLString: !1,
@@ -130,7 +132,7 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
130
132
  default: i.id
131
133
  },
132
134
  message: {
133
- type: B([
135
+ type: N([
134
136
  String,
135
137
  Object,
136
138
  Function
@@ -138,7 +140,7 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
138
140
  default: i.message
139
141
  },
140
142
  onClose: {
141
- type: B(Function),
143
+ type: N(Function),
142
144
  default: i.onClose
143
145
  },
144
146
  showClose: {
@@ -173,29 +175,29 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
173
175
  }), _e = {
174
176
  destroy: () => !0
175
177
  }, d = ie([]), Oe = (o) => {
176
- const n = d.findIndex((t) => t.id === o), e = d[n];
178
+ const t = d.findIndex((n) => n.id === o), e = d[t];
177
179
  let a;
178
- return n > 0 && (a = d[n - 1]), { current: e, prev: a };
180
+ return t > 0 && (a = d[t - 1]), { current: e, prev: a };
179
181
  }, De = (o) => {
180
- const { prev: n } = Oe(o);
181
- return n ? n.vm.exposed.bottom.value : 0;
182
- }, xe = (o, n) => d.findIndex((a) => a.id === o) > 0 ? 16 : n, Fe = E({
182
+ const { prev: t } = Oe(o);
183
+ return t ? t.vm.exposed.bottom.value : 0;
184
+ }, xe = (o, t) => d.findIndex((a) => a.id === o) > 0 ? 16 : t, Fe = B({
183
185
  name: "ElMessage"
184
- }), He = /* @__PURE__ */ E({
186
+ }), He = /* @__PURE__ */ B({
185
187
  ...Fe,
186
188
  props: Le,
187
189
  emits: _e,
188
- setup(o, { expose: n }) {
189
- const e = o, { Close: a } = Se, { ns: t, zIndex: p } = Ee("message"), { currentZIndex: l, nextZIndex: u } = p, f = $(), g = $(!1), y = $(0);
190
+ setup(o, { expose: t }) {
191
+ const e = o, { Close: a } = Se, { ns: n, zIndex: p } = Ne("message"), { currentZIndex: l, nextZIndex: u } = p, f = k(), g = k(!1), y = k(0);
190
192
  let M;
191
193
  const se = m(() => e.type ? e.type === "error" ? "danger" : e.type : "info"), oe = m(() => {
192
194
  const r = e.type;
193
- return { [t.bm("icon", r)]: r && P[r] };
194
- }), D = m(() => e.icon || P[e.type] || ""), ne = m(() => De(e.id)), x = m(() => xe(e.id, e.offset) + ne.value), te = m(() => y.value + x.value), ae = m(() => ({
195
+ return { [n.bm("icon", r)]: r && P[r] };
196
+ }), D = m(() => e.icon || P[e.type] || ""), te = m(() => De(e.id)), x = m(() => xe(e.id, e.offset) + te.value), ne = m(() => y.value + x.value), ae = m(() => ({
195
197
  top: `${x.value}px`,
196
198
  zIndex: l.value
197
199
  }));
198
- function k() {
200
+ function $() {
199
201
  e.duration !== 0 && ({ stop: M } = Ce(() => {
200
202
  w();
201
203
  }, e.duration));
@@ -207,53 +209,53 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
207
209
  g.value = !1;
208
210
  }
209
211
  function le({ code: r }) {
210
- r === Ne.esc && w();
212
+ r === Be.esc && w();
211
213
  }
212
214
  return ue(() => {
213
- k(), u(), g.value = !0;
215
+ $(), u(), g.value = !0;
214
216
  }), de(() => e.repeatNum, () => {
215
- F(), k();
217
+ F(), $();
216
218
  }), me(document, "keydown", le), ge(f, () => {
217
219
  y.value = f.value.getBoundingClientRect().height;
218
- }), n({
220
+ }), t({
219
221
  visible: g,
220
- bottom: te,
222
+ bottom: ne,
221
223
  close: w
222
- }), (r, Ze) => (v(), b(Z, {
223
- name: s(t).b("fade"),
224
+ }), (r, je) => (v(), b(j, {
225
+ name: s(n).b("fade"),
224
226
  onBeforeLeave: r.onClose,
225
- onAfterLeave: (je) => r.$emit("destroy"),
227
+ onAfterLeave: (Ze) => r.$emit("destroy"),
226
228
  persisted: ""
227
229
  }, {
228
- default: N(() => [
229
- j(L("div", {
230
+ default: E(() => [
231
+ Z(L("div", {
230
232
  id: r.id,
231
233
  ref_key: "messageRef",
232
234
  ref: f,
233
235
  class: C([
234
- s(t).b(),
235
- { [s(t).m(r.type)]: r.type },
236
- s(t).is("center", r.center),
237
- s(t).is("closable", r.showClose),
238
- s(t).is("plain", r.plain),
236
+ s(n).b(),
237
+ { [s(n).m(r.type)]: r.type },
238
+ s(n).is("center", r.center),
239
+ s(n).is("closable", r.showClose),
240
+ s(n).is("plain", r.plain),
239
241
  r.customClass
240
242
  ]),
241
243
  style: q(s(ae)),
242
244
  role: "alert",
243
245
  onMouseenter: F,
244
- onMouseleave: k
246
+ onMouseleave: $
245
247
  }, [
246
248
  r.repeatNum > 1 ? (v(), b(s(Ie), {
247
249
  key: 0,
248
250
  value: r.repeatNum,
249
251
  type: s(se),
250
- class: C(s(t).e("badge"))
252
+ class: C(s(n).e("badge"))
251
253
  }, null, 8, ["value", "type", "class"])) : S("v-if", !0),
252
254
  s(D) ? (v(), b(s(U), {
253
255
  key: 1,
254
- class: C([s(t).e("icon"), s(oe)])
256
+ class: C([s(n).e("icon"), s(oe)])
255
257
  }, {
256
- default: N(() => [
258
+ default: E(() => [
257
259
  (v(), b(ce(s(D))))
258
260
  ]),
259
261
  _: 1
@@ -262,20 +264,20 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
262
264
  r.dangerouslyUseHTMLString ? (v(), z(pe, { key: 1 }, [
263
265
  S(" Caution here, message could've been compromised, never use user's input as message "),
264
266
  L("p", {
265
- class: C(s(t).e("content")),
267
+ class: C(s(n).e("content")),
266
268
  innerHTML: r.message
267
269
  }, null, 10, ["innerHTML"])
268
270
  ], 2112)) : (v(), z("p", {
269
271
  key: 0,
270
- class: C(s(t).e("content"))
272
+ class: C(s(n).e("content"))
271
273
  }, G(r.message), 3))
272
274
  ]),
273
275
  r.showClose ? (v(), b(s(U), {
274
276
  key: 2,
275
- class: C(s(t).e("closeBtn")),
277
+ class: C(s(n).e("closeBtn")),
276
278
  onClick: fe(w, ["stop"])
277
279
  }, {
278
- default: N(() => [
280
+ default: E(() => [
279
281
  O(s(a))
280
282
  ]),
281
283
  _: 1
@@ -291,9 +293,9 @@ const Ie = ve(ze), Y = ["success", "info", "warning", "error"], i = Be({
291
293
  var Ae = /* @__PURE__ */ Q(He, [["__file", "message.vue"]]);
292
294
  let Re = 1;
293
295
  const ee = (o) => {
294
- const n = !o || R(o) || J(o) || _(o) ? { message: o } : o, e = {
296
+ const t = !o || R(o) || J(o) || _(o) ? { message: o } : o, e = {
295
297
  ...i,
296
- ...n
298
+ ...t
297
299
  };
298
300
  if (!e.appendTo)
299
301
  e.appendTo = document.body;
@@ -303,18 +305,18 @@ const ee = (o) => {
303
305
  }
304
306
  return V(c.grouping) && !e.grouping && (e.grouping = c.grouping), T(c.duration) && e.duration === 3e3 && (e.duration = c.duration), T(c.offset) && e.offset === 16 && (e.offset = c.offset), V(c.showClose) && !e.showClose && (e.showClose = c.showClose), e;
305
307
  }, Ve = (o) => {
306
- const n = d.indexOf(o);
307
- if (n === -1)
308
+ const t = d.indexOf(o);
309
+ if (t === -1)
308
310
  return;
309
- d.splice(n, 1);
311
+ d.splice(t, 1);
310
312
  const { handler: e } = o;
311
313
  e.close();
312
- }, Pe = ({ appendTo: o, ...n }, e) => {
313
- const a = `message_${Re++}`, t = n.onClose, p = document.createElement("div"), l = {
314
- ...n,
314
+ }, Pe = ({ appendTo: o, ...t }, e) => {
315
+ const a = `message_${Re++}`, n = t.onClose, p = document.createElement("div"), l = {
316
+ ...t,
315
317
  id: a,
316
318
  onClose: () => {
317
- t == null || t(), Ve(y);
319
+ n == null || n(), Ve(y);
318
320
  },
319
321
  onDestroy: () => {
320
322
  H(null, p);
@@ -335,38 +337,38 @@ const ee = (o) => {
335
337
  props: u.component.props
336
338
  };
337
339
  return y;
338
- }, h = (o = {}, n) => {
340
+ }, h = (o = {}, t) => {
339
341
  if (!X)
340
342
  return { close: () => {
341
343
  } };
342
344
  const e = ee(o);
343
345
  if (e.grouping && d.length) {
344
- const t = d.find(({ vnode: p }) => {
346
+ const n = d.find(({ vnode: p }) => {
345
347
  var l;
346
348
  return ((l = p.props) == null ? void 0 : l.message) === e.message;
347
349
  });
348
- if (t)
349
- return t.props.repeatNum += 1, t.props.type = e.type, t.handler;
350
+ if (n)
351
+ return n.props.repeatNum += 1, n.props.type = e.type, n.handler;
350
352
  }
351
353
  if (T(c.max) && d.length >= c.max)
352
354
  return { close: () => {
353
355
  } };
354
- const a = Pe(e, n);
356
+ const a = Pe(e, t);
355
357
  return d.push(a), a.handler;
356
358
  };
357
359
  Y.forEach((o) => {
358
- h[o] = (n = {}, e) => {
359
- const a = ee(n);
360
+ h[o] = (t = {}, e) => {
361
+ const a = ee(t);
360
362
  return h({ ...a, type: o }, e);
361
363
  };
362
364
  });
363
365
  function Ue(o) {
364
- for (const n of d)
365
- (!o || o === n.props.type) && n.handler.close();
366
+ for (const t of d)
367
+ (!o || o === t.props.type) && t.handler.close();
366
368
  }
367
369
  h.closeAll = Ue;
368
370
  h._context = null;
369
- const Xe = Te(h, "$message");
371
+ const es = Te(h, "$message");
370
372
  export {
371
- Xe as E
373
+ es as E
372
374
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),k=require("./el-scrollbar-d1c3e7f7.cjs"),o=require("./base-ec05f348.cjs"),v=require("./use-form-common-props-1b84d8f4.cjs"),L=require("./typescript-b63f8e83.cjs"),_=require("./index-8a0b1c53.cjs"),D=require("./index-3bf8d597.cjs"),p=require("./config-provider-7cdfca4d.cjs"),O=o.buildProps({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:o.definePropType([String,Object,Array])},offset:{type:o.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),P=e.defineComponent({name:"ElBadge"}),F=e.defineComponent({...P,props:O,setup(s,{expose:t}){const n=s,a=o.useNamespace("badge"),r=e.computed(()=>n.isDot?"":o.isNumber(n.value)&&o.isNumber(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),f=e.computed(()=>{var l,c,m,g,y;return[{backgroundColor:n.color,marginRight:o.addUnit(-((c=(l=n.offset)==null?void 0:l[0])!=null?c:0)),marginTop:o.addUnit((g=(m=n.offset)==null?void 0:m[1])!=null?g:0)},(y=n.badgeStyle)!=null?y:{}]});return t({content:r}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).b())},[e.renderSlot(l.$slots,"default"),e.createVNode(e.Transition,{name:`${e.unref(a).namespace.value}-zoom-in-center`,persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("sup",{class:e.normalizeClass([e.unref(a).e("content"),e.unref(a).em("content",l.type),e.unref(a).is("fixed",!!l.$slots.default),e.unref(a).is("dot",l.isDot),e.unref(a).is("hide-zero",!l.showZero&&n.value===0),l.badgeClass]),style:e.normalizeStyle(e.unref(f))},[e.renderSlot(l.$slots,"content",{value:e.unref(r)},()=>[e.createTextVNode(e.toDisplayString(e.unref(r)),1)])],6),[[e.vShow,!l.hidden&&(e.unref(r)||l.isDot||l.$slots.content)]])]),_:3},8,["name"])],2))}});var q=o._export_sfc(F,[["__file","badge.vue"]]);const H=o.withInstall(q),w=["success","info","warning","error"],u=L.mutable({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:o.isClient?document.body:void 0}),A=o.buildProps({customClass:{type:String,default:u.customClass},center:{type:Boolean,default:u.center},dangerouslyUseHTMLString:{type:Boolean,default:u.dangerouslyUseHTMLString},duration:{type:Number,default:u.duration},icon:{type:v.iconPropType,default:u.icon},id:{type:String,default:u.id},message:{type:o.definePropType([String,Object,Function]),default:u.message},onClose:{type:o.definePropType(Function),default:u.onClose},showClose:{type:Boolean,default:u.showClose},type:{type:String,values:w,default:u.type},plain:{type:Boolean,default:u.plain},offset:{type:Number,default:u.offset},zIndex:{type:Number,default:u.zIndex},grouping:{type:Boolean,default:u.grouping},repeatNum:{type:Number,default:u.repeatNum}}),R={destroy:()=>!0},d=e.shallowReactive([]),U=s=>{const t=d.findIndex(r=>r.id===s),n=d[t];let a;return t>0&&(a=d[t-1]),{current:n,prev:a}},Z=s=>{const{prev:t}=U(s);return t?t.vm.exposed.bottom.value:0},j=(s,t)=>d.findIndex(a=>a.id===s)>0?16:t,G=e.defineComponent({name:"ElMessage"}),W=e.defineComponent({...G,props:A,emits:R,setup(s,{expose:t}){const n=s,{Close:a}=v.TypeComponents,{ns:r,zIndex:f}=_.useGlobalComponentSettings("message"),{currentZIndex:l,nextZIndex:c}=f,m=e.ref(),g=e.ref(!1),y=e.ref(0);let b;const z=e.computed(()=>n.type?n.type==="error"?"danger":n.type:"info"),M=e.computed(()=>{const i=n.type;return{[r.bm("icon",i)]:i&&v.TypeComponentsMap[i]}}),T=e.computed(()=>n.icon||v.TypeComponentsMap[n.type]||""),$=e.computed(()=>Z(n.id)),N=e.computed(()=>j(n.id,n.offset)+$.value),I=e.computed(()=>y.value+N.value),V=e.computed(()=>({top:`${N.value}px`,zIndex:l.value}));function B(){n.duration!==0&&({stop:b}=o.useTimeoutFn(()=>{h()},n.duration))}function S(){b==null||b()}function h(){g.value=!1}function x({code:i}){i===D.EVENT_CODE.esc&&h()}return e.onMounted(()=>{B(),c(),g.value=!0}),e.watch(()=>n.repeatNum,()=>{S(),B()}),k.useEventListener(document,"keydown",x),k.useResizeObserver(m,()=>{y.value=m.value.getBoundingClientRect().height}),t({visible:g,bottom:I,close:h}),(i,ne)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(r).b("fade"),onBeforeLeave:i.onClose,onAfterLeave:oe=>i.$emit("destroy"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:i.id,ref_key:"messageRef",ref:m,class:e.normalizeClass([e.unref(r).b(),{[e.unref(r).m(i.type)]:i.type},e.unref(r).is("center",i.center),e.unref(r).is("closable",i.showClose),e.unref(r).is("plain",i.plain),i.customClass]),style:e.normalizeStyle(e.unref(V)),role:"alert",onMouseenter:S,onMouseleave:B},[i.repeatNum>1?(e.openBlock(),e.createBlock(e.unref(H),{key:0,value:i.repeatNum,type:e.unref(z),class:e.normalizeClass(e.unref(r).e("badge"))},null,8,["value","type","class"])):e.createCommentVNode("v-if",!0),e.unref(T)?(e.openBlock(),e.createBlock(e.unref(v.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(M)])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(T))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.renderSlot(i.$slots,"default",{},()=>[i.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),e.createElementVNode("p",{class:e.normalizeClass(e.unref(r).e("content")),innerHTML:i.message},null,10,["innerHTML"])],2112)):(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(r).e("content"))},e.toDisplayString(i.message),3))]),i.showClose?(e.openBlock(),e.createBlock(e.unref(v.ElIcon),{key:2,class:e.normalizeClass(e.unref(r).e("closeBtn")),onClick:e.withModifiers(h,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(a))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],46,["id"]),[[e.vShow,g.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var J=o._export_sfc(W,[["__file","message.vue"]]);let K=1;const E=s=>{const t=!s||o.isString(s)||e.isVNode(s)||o.isFunction(s)?{message:s}:s,n={...u,...t};if(!n.appendTo)n.appendTo=document.body;else if(o.isString(n.appendTo)){let a=document.querySelector(n.appendTo);o.isElement(a)||(o.debugWarn("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body),n.appendTo=a}return o.isBoolean(p.messageConfig.grouping)&&!n.grouping&&(n.grouping=p.messageConfig.grouping),o.isNumber(p.messageConfig.duration)&&n.duration===3e3&&(n.duration=p.messageConfig.duration),o.isNumber(p.messageConfig.offset)&&n.offset===16&&(n.offset=p.messageConfig.offset),o.isBoolean(p.messageConfig.showClose)&&!n.showClose&&(n.showClose=p.messageConfig.showClose),n},Q=s=>{const t=d.indexOf(s);if(t===-1)return;d.splice(t,1);const{handler:n}=s;n.close()},X=({appendTo:s,...t},n)=>{const a=`message_${K++}`,r=t.onClose,f=document.createElement("div"),l={...t,id:a,onClose:()=>{r==null||r(),Q(y)},onDestroy:()=>{e.render(null,f)}},c=e.createVNode(J,l,o.isFunction(l.message)||e.isVNode(l.message)?{default:o.isFunction(l.message)?l.message:()=>l.message}:null);c.appContext=n||C._context,e.render(c,f),s.appendChild(f.firstElementChild);const m=c.component,y={id:a,vnode:c,vm:m,handler:{close:()=>{m.exposed.visible.value=!1}},props:c.component.props};return y},C=(s={},t)=>{if(!o.isClient)return{close:()=>{}};const n=E(s);if(n.grouping&&d.length){const r=d.find(({vnode:f})=>{var l;return((l=f.props)==null?void 0:l.message)===n.message});if(r)return r.props.repeatNum+=1,r.props.type=n.type,r.handler}if(o.isNumber(p.messageConfig.max)&&d.length>=p.messageConfig.max)return{close:()=>{}};const a=X(n,t);return d.push(a),a.handler};w.forEach(s=>{C[s]=(t={},n)=>{const a=E(t);return C({...a,type:s},n)}});function Y(s){for(const t of d)(!s||s===t.props.type)&&t.handler.close()}C.closeAll=Y;C._context=null;const ee=o.withInstallFunction(C,"$message");exports.ElMessage=ee;