st-comp 0.0.279 → 0.0.281

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 +377 -376
  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 +260 -260
  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 +43 -43
  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 +615 -464
  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-41daac7b.js → VarietySelect-3fc0f0ce.js} +5 -5
  36. package/es/{VarietySelect-d58eee29.cjs → VarietySelect-d2d25a3d.cjs} +1 -1
  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 +1927 -2259
  41. package/es/_baseClone-f8e5d3ba.cjs +1 -0
  42. package/es/_baseClone-fb6a3947.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-06d8207f.js +86 -0
  50. package/es/config-provider-bb61bd3e.cjs +1 -0
  51. package/es/debounce-0a98a9c6.js +57 -0
  52. package/es/debounce-37b17615.cjs +1 -0
  53. package/es/dropdown-8fa21bfd.cjs +1 -0
  54. package/es/dropdown-bcf8d198.js +178 -0
  55. package/es/el-autocomplete-13b9e372.cjs +1 -0
  56. package/es/el-autocomplete-419bfbcf.js +434 -0
  57. package/es/el-button-ee9fe159.js +343 -0
  58. package/es/el-button-fac5e058.cjs +1 -0
  59. package/es/el-checkbox-6cf1a71c.cjs +1 -0
  60. package/es/el-checkbox-b5ac7f04.js +566 -0
  61. package/es/el-dialog-060b3735.js +252 -0
  62. package/es/el-dialog-54aebacd.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-2be6b683.js +1265 -0
  68. package/es/el-form-item-758dfefa.cjs +12 -0
  69. package/es/el-input-7fe53030.cjs +1 -0
  70. package/es/el-input-d23f5442.js +761 -0
  71. package/es/el-input-number-484fb184.js +390 -0
  72. package/es/el-input-number-f0f4eedb.cjs +1 -0
  73. package/es/el-loading-9d3e405c.js +190 -0
  74. package/es/el-loading-fafaaa7b.cjs +1 -0
  75. package/es/el-menu-item-0ac22681.js +824 -0
  76. package/es/el-menu-item-c91ae430.cjs +1 -0
  77. package/es/el-message-box-568a0aa6.js +481 -0
  78. package/es/el-message-box-ceacb54e.cjs +1 -0
  79. package/es/el-overlay-9f36e73c.cjs +1 -0
  80. package/es/el-overlay-cb5c85aa.js +444 -0
  81. package/es/el-popconfirm-4a8cd35c.cjs +1 -0
  82. package/es/el-popconfirm-6f8e65c8.js +190 -0
  83. package/es/el-popper-0454c8e8.js +2235 -0
  84. package/es/el-popper-acd0ff35.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-64dc7258.js +168 -0
  88. package/es/el-segmented-eb3c8e65.cjs +1 -0
  89. package/es/el-select-a573c78b.js +1535 -0
  90. package/es/el-select-c317294a.cjs +1 -0
  91. package/es/el-table-column-1c443963.js +3651 -0
  92. package/es/el-table-column-f555115d.cjs +14 -0
  93. package/es/el-tag-2d8a3fe7.js +77 -0
  94. package/es/el-tag-dca1292c.cjs +1 -0
  95. package/es/el-text-649c986a.cjs +1 -0
  96. package/es/el-text-761e6717.js +84 -0
  97. package/es/index-11181b5f.cjs +1 -0
  98. package/es/index-21a3dc89.cjs +1 -0
  99. package/es/index-33e039e3.cjs +1 -0
  100. package/es/index-3806160e.js +710 -0
  101. package/es/{index-a9246d17.cjs → index-4614e8e9.cjs} +109 -109
  102. package/es/{index-44a382a5.js → index-53beef02.js} +12 -12
  103. package/es/index-5cada1ed.cjs +1 -0
  104. package/es/index-6a36e1fc.cjs +1 -0
  105. package/es/{index-eb96e074.js → index-6a52dc7c.js} +235 -236
  106. package/es/index-71ba4c28.cjs +1 -0
  107. package/es/index-78dab605.js +141 -0
  108. package/es/index-798fec2d.cjs +1 -0
  109. package/es/index-9573f74b.js +372 -0
  110. package/es/index-a181f161.js +429 -0
  111. package/es/{index-a33b2fb8.js → index-ab0ad219.js} +5090 -5090
  112. package/es/index-beb5cb7d.cjs +1 -0
  113. package/es/index-c09fc6f5.js +131 -0
  114. package/es/index-ceae4c47.cjs +1 -0
  115. package/es/index-d372e68f.cjs +5 -0
  116. package/es/index-d9379af4.js +413 -0
  117. package/es/index-dddacf80.js +47 -0
  118. package/es/index-de9ad85c.js +12 -0
  119. package/es/index-e2e58ea9.js +468 -0
  120. package/es/index-f5474dcc.cjs +3 -0
  121. package/es/{python-a3db9620.cjs → python-60e79979.cjs} +1 -1
  122. package/es/{python-8a1664e6.js → python-673bf8b8.js} +32 -31
  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-76516e50.cjs +2 -0
  131. package/es/use-form-item-784142b4.js +422 -0
  132. package/es/use-global-config-7ff9a1c2.cjs +1 -0
  133. package/es/use-global-config-9a4ccf33.js +71 -0
  134. package/es/validator-1926345b.cjs +1 -0
  135. package/es/{validator-c60a8956.js → validator-a66ec4f8.js} +1 -1
  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-51c2e528.js} +36 -33
  139. package/es/zh-cn-ad12d9f5.cjs +1 -0
  140. package/lib/bundle.js +1 -1
  141. package/lib/bundle.umd.cjs +265 -246
  142. package/lib/{index-62fa175a.js → index-7282d3be.js} +52335 -50156
  143. package/lib/{python-4a48fa39.js → python-418be57d.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
@@ -1,768 +0,0 @@
1
- import { defineComponent as N, openBlock as H, createBlock as be, Transition as we, mergeProps as ke, unref as C, toHandlers as Fe, withCtx as te, renderSlot as A, computed as m, getCurrentInstance as ge, inject as ne, ref as _, reactive as Me, watch as X, provide as ve, onMounted as ye, onBeforeUnmount as Oe, h as g, Fragment as Ie, withDirectives as Ne, vShow as qe, nextTick as Pe, watchEffect as Ve, toRef as Ue, createElementBlock as oe, normalizeClass as se, createElementVNode as fe, createTextVNode as Ge, toDisplayString as Je } from "vue";
2
- import { i as V, u as Ke, a as Ye } from "./use-form-common-props-ed72e914.js";
3
- import { g as Ze, h as Qe, E as $e, j as Xe } from "./index-eb96e074.js";
4
- import { a as E, t as ee, b as ae, E as Be, f as et, d as tt } from "./el-popper-fbd0dcea.js";
5
- import { u as O, _ as ie, w as ze, a as Q, r as de, h as nt, b as xe, i as Ae, c as D, d as Te, e as le, f as ot, g as Se, j as He, k as st, l as Ce } from "./base-a5af3db3.js";
6
- import { T as at } from "./index-657047bb.js";
7
- import { C as lt } from "./el-tag-66c83156.js";
8
- import { m as ut } from "./typescript-7ae59c4c.js";
9
- import { f as it } from "./vnode-5ddb7ed1.js";
10
- const rt = N({
11
- name: "ElCollapseTransition"
12
- }), ct = /* @__PURE__ */ N({
13
- ...rt,
14
- setup(t) {
15
- const n = O("collapse-transition"), u = (e) => {
16
- e.style.maxHeight = "", e.style.overflow = e.dataset.oldOverflow, e.style.paddingTop = e.dataset.oldPaddingTop, e.style.paddingBottom = e.dataset.oldPaddingBottom;
17
- }, o = {
18
- beforeEnter(e) {
19
- e.dataset || (e.dataset = {}), e.dataset.oldPaddingTop = e.style.paddingTop, e.dataset.oldPaddingBottom = e.style.paddingBottom, e.style.height && (e.dataset.elExistsHeight = e.style.height), e.style.maxHeight = 0, e.style.paddingTop = 0, e.style.paddingBottom = 0;
20
- },
21
- enter(e) {
22
- requestAnimationFrame(() => {
23
- e.dataset.oldOverflow = e.style.overflow, e.dataset.elExistsHeight ? e.style.maxHeight = e.dataset.elExistsHeight : e.scrollHeight !== 0 ? e.style.maxHeight = `${e.scrollHeight}px` : e.style.maxHeight = 0, e.style.paddingTop = e.dataset.oldPaddingTop, e.style.paddingBottom = e.dataset.oldPaddingBottom, e.style.overflow = "hidden";
24
- });
25
- },
26
- afterEnter(e) {
27
- e.style.maxHeight = "", e.style.overflow = e.dataset.oldOverflow;
28
- },
29
- enterCancelled(e) {
30
- u(e);
31
- },
32
- beforeLeave(e) {
33
- e.dataset || (e.dataset = {}), e.dataset.oldPaddingTop = e.style.paddingTop, e.dataset.oldPaddingBottom = e.style.paddingBottom, e.dataset.oldOverflow = e.style.overflow, e.style.maxHeight = `${e.scrollHeight}px`, e.style.overflow = "hidden";
34
- },
35
- leave(e) {
36
- e.scrollHeight !== 0 && (e.style.maxHeight = 0, e.style.paddingTop = 0, e.style.paddingBottom = 0);
37
- },
38
- afterLeave(e) {
39
- u(e);
40
- },
41
- leaveCancelled(e) {
42
- u(e);
43
- }
44
- };
45
- return (e, h) => (H(), be(we, ke({
46
- name: C(n).b()
47
- }, Fe(o)), {
48
- default: te(() => [
49
- A(e.$slots, "default")
50
- ]),
51
- _: 3
52
- }, 16, ["name"]));
53
- }
54
- });
55
- var dt = /* @__PURE__ */ ie(ct, [["__file", "collapse-transition.vue"]]);
56
- const pt = ze(dt);
57
- let mt = class {
58
- constructor(n, u) {
59
- this.parent = n, this.domNode = u, this.subIndex = 0, this.subIndex = 0, this.init();
60
- }
61
- init() {
62
- this.subMenuItems = this.domNode.querySelectorAll("li"), this.addListeners();
63
- }
64
- gotoSubIndex(n) {
65
- n === this.subMenuItems.length ? n = 0 : n < 0 && (n = this.subMenuItems.length - 1), this.subMenuItems[n].focus(), this.subIndex = n;
66
- }
67
- addListeners() {
68
- const n = this.parent.domNode;
69
- Array.prototype.forEach.call(this.subMenuItems, (u) => {
70
- u.addEventListener("keydown", (o) => {
71
- let e = !1;
72
- switch (o.code) {
73
- case E.down: {
74
- this.gotoSubIndex(this.subIndex + 1), e = !0;
75
- break;
76
- }
77
- case E.up: {
78
- this.gotoSubIndex(this.subIndex - 1), e = !0;
79
- break;
80
- }
81
- case E.tab: {
82
- ee(n, "mouseleave");
83
- break;
84
- }
85
- case E.enter:
86
- case E.numpadEnter:
87
- case E.space: {
88
- e = !0, o.currentTarget.click();
89
- break;
90
- }
91
- }
92
- return e && (o.preventDefault(), o.stopPropagation()), !1;
93
- });
94
- });
95
- }
96
- }, vt = class {
97
- constructor(n, u) {
98
- this.domNode = n, this.submenu = null, this.submenu = null, this.init(u);
99
- }
100
- init(n) {
101
- this.domNode.setAttribute("tabindex", "0");
102
- const u = this.domNode.querySelector(`.${n}-menu`);
103
- u && (this.submenu = new mt(this, u)), this.addListeners();
104
- }
105
- addListeners() {
106
- this.domNode.addEventListener("keydown", (n) => {
107
- let u = !1;
108
- switch (n.code) {
109
- case E.down: {
110
- ee(n.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(0), u = !0;
111
- break;
112
- }
113
- case E.up: {
114
- ee(n.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1), u = !0;
115
- break;
116
- }
117
- case E.tab: {
118
- ee(n.currentTarget, "mouseleave");
119
- break;
120
- }
121
- case E.enter:
122
- case E.numpadEnter:
123
- case E.space: {
124
- u = !0, n.currentTarget.click();
125
- break;
126
- }
127
- }
128
- u && n.preventDefault();
129
- });
130
- }
131
- }, ft = class {
132
- constructor(n, u) {
133
- this.domNode = n, this.init(u);
134
- }
135
- init(n) {
136
- const u = this.domNode.childNodes;
137
- Array.from(u).forEach((o) => {
138
- o.nodeType === 1 && new vt(o, n);
139
- });
140
- }
141
- };
142
- const ht = N({
143
- name: "ElMenuCollapseTransition"
144
- }), bt = /* @__PURE__ */ N({
145
- ...ht,
146
- setup(t) {
147
- const n = O("menu"), u = {
148
- onBeforeEnter: (o) => o.style.opacity = "0.2",
149
- onEnter(o, e) {
150
- Q(o, `${n.namespace.value}-opacity-transition`), o.style.opacity = "1", e();
151
- },
152
- onAfterEnter(o) {
153
- de(o, `${n.namespace.value}-opacity-transition`), o.style.opacity = "";
154
- },
155
- onBeforeLeave(o) {
156
- o.dataset || (o.dataset = {}), nt(o, n.m("collapse")) ? (de(o, n.m("collapse")), o.dataset.oldOverflow = o.style.overflow, o.dataset.scrollWidth = o.clientWidth.toString(), Q(o, n.m("collapse"))) : (Q(o, n.m("collapse")), o.dataset.oldOverflow = o.style.overflow, o.dataset.scrollWidth = o.clientWidth.toString(), de(o, n.m("collapse"))), o.style.width = `${o.scrollWidth}px`, o.style.overflow = "hidden";
157
- },
158
- onLeave(o) {
159
- Q(o, "horizontal-collapse-transition"), o.style.width = `${o.dataset.scrollWidth}px`;
160
- }
161
- };
162
- return (o, e) => (H(), be(we, ke({ mode: "out-in" }, C(u)), {
163
- default: te(() => [
164
- A(o.$slots, "default")
165
- ]),
166
- _: 3
167
- }, 16));
168
- }
169
- });
170
- var gt = /* @__PURE__ */ ie(bt, [["__file", "menu-collapse-transition.vue"]]);
171
- function Le(t, n) {
172
- const u = m(() => {
173
- let e = t.parent;
174
- const h = [n.value];
175
- for (; e.type.name !== "ElMenu"; )
176
- e.props.index && h.unshift(e.props.index), e = e.parent;
177
- return h;
178
- });
179
- return {
180
- parentMenu: m(() => {
181
- let e = t.parent;
182
- for (; e && !["ElMenu", "ElSubMenu"].includes(e.type.name); )
183
- e = e.parent;
184
- return e;
185
- }),
186
- indexPath: u
187
- };
188
- }
189
- function Mt(t) {
190
- return m(() => {
191
- const u = t.backgroundColor;
192
- return u ? new at(u).shade(20).toString() : "";
193
- });
194
- }
195
- const We = (t, n) => {
196
- const u = O("menu");
197
- return m(() => u.cssVarBlock({
198
- "text-color": t.textColor || "",
199
- "hover-text-color": t.textColor || "",
200
- "bg-color": t.backgroundColor || "",
201
- "hover-bg-color": Mt(t).value || "",
202
- "active-color": t.activeTextColor || "",
203
- level: `${n}`
204
- }));
205
- }, _e = "rootMenu", ue = "subMenu:", yt = xe({
206
- index: {
207
- type: String,
208
- required: !0
209
- },
210
- showTimeout: Number,
211
- hideTimeout: Number,
212
- popperClass: String,
213
- disabled: Boolean,
214
- teleported: {
215
- type: Boolean,
216
- default: void 0
217
- },
218
- popperOffset: Number,
219
- expandCloseIcon: {
220
- type: V
221
- },
222
- expandOpenIcon: {
223
- type: V
224
- },
225
- collapseCloseIcon: {
226
- type: V
227
- },
228
- collapseOpenIcon: {
229
- type: V
230
- }
231
- }), pe = "ElSubMenu";
232
- var Ee = N({
233
- name: pe,
234
- props: yt,
235
- setup(t, { slots: n, expose: u }) {
236
- const o = ge(), { indexPath: e, parentMenu: h } = Le(o, m(() => t.index)), v = O("menu"), y = O("sub-menu"), i = ne(_e);
237
- i || ae(pe, "can not inject root menu");
238
- const b = ne(`${ue}${h.value.uid}`);
239
- b || ae(pe, "can not inject sub menu");
240
- const P = _({}), I = _({});
241
- let c;
242
- const x = _(!1), M = _(), S = _(), L = m(() => b.level === 0), U = m(() => B.value === "horizontal" && L.value ? "bottom-start" : "right-start"), $ = m(() => B.value === "horizontal" && L.value || B.value === "vertical" && !i.props.collapse ? t.expandCloseIcon && t.expandOpenIcon ? w.value ? t.expandOpenIcon : t.expandCloseIcon : Ze : t.collapseCloseIcon && t.collapseOpenIcon ? w.value ? t.collapseOpenIcon : t.collapseCloseIcon : Qe), W = m(() => {
243
- const s = t.teleported;
244
- return Ae(s) ? L.value : s;
245
- }), G = m(() => i.props.collapse ? `${v.namespace.value}-zoom-in-left` : `${v.namespace.value}-zoom-in-top`), re = m(() => B.value === "horizontal" && L.value ? [
246
- "bottom-start",
247
- "bottom-end",
248
- "top-start",
249
- "top-end",
250
- "right-start",
251
- "left-start"
252
- ] : [
253
- "right-start",
254
- "right",
255
- "right-end",
256
- "left-start",
257
- "bottom-start",
258
- "bottom-end",
259
- "top-start",
260
- "top-end"
261
- ]), w = m(() => i.openedMenus.includes(t.index)), j = m(() => [...Object.values(P.value), ...Object.values(I.value)].some(({ active: s }) => s)), B = m(() => i.props.mode), J = m(() => i.props.persistent), R = Me({
262
- index: t.index,
263
- indexPath: e,
264
- active: j
265
- }), K = We(i.props, b.level + 1), Y = m(() => {
266
- var s;
267
- return (s = t.popperOffset) != null ? s : i.props.popperOffset;
268
- }), F = m(() => {
269
- var s;
270
- return (s = t.popperClass) != null ? s : i.props.popperClass;
271
- }), q = m(() => {
272
- var s;
273
- return (s = t.showTimeout) != null ? s : i.props.showTimeout;
274
- }), Z = m(() => {
275
- var s;
276
- return (s = t.hideTimeout) != null ? s : i.props.hideTimeout;
277
- }), ce = () => {
278
- var s, f, p;
279
- return (p = (f = (s = S.value) == null ? void 0 : s.popperRef) == null ? void 0 : f.popperInstanceRef) == null ? void 0 : p.destroy();
280
- }, a = (s) => {
281
- s || ce();
282
- }, l = () => {
283
- i.props.menuTrigger === "hover" && i.props.mode === "horizontal" || i.props.collapse && i.props.mode === "vertical" || t.disabled || i.handleSubMenuClick({
284
- index: t.index,
285
- indexPath: e.value,
286
- active: j.value
287
- });
288
- }, r = (s, f = q.value) => {
289
- var p;
290
- if (s.type !== "focus") {
291
- if (i.props.menuTrigger === "click" && i.props.mode === "horizontal" || !i.props.collapse && i.props.mode === "vertical" || t.disabled) {
292
- b.mouseInChild.value = !0;
293
- return;
294
- }
295
- b.mouseInChild.value = !0, c == null || c(), { stop: c } = Te(() => {
296
- i.openMenu(t.index, e.value);
297
- }, f), W.value && ((p = h.value.vnode.el) == null || p.dispatchEvent(new MouseEvent("mouseenter"))), s.type === "mouseenter" && s.target && Pe(() => {
298
- et(s.target, { preventScroll: !0 });
299
- });
300
- }
301
- }, d = (s = !1) => {
302
- var f;
303
- if (i.props.menuTrigger === "click" && i.props.mode === "horizontal" || !i.props.collapse && i.props.mode === "vertical") {
304
- b.mouseInChild.value = !1;
305
- return;
306
- }
307
- c == null || c(), b.mouseInChild.value = !1, { stop: c } = Te(() => !x.value && i.closeMenu(t.index, e.value), Z.value), W.value && s && ((f = b.handleMouseleave) == null || f.call(b, !0));
308
- };
309
- X(() => i.props.collapse, (s) => a(!!s));
310
- {
311
- const s = (p) => {
312
- I.value[p.index] = p;
313
- }, f = (p) => {
314
- delete I.value[p.index];
315
- };
316
- ve(`${ue}${o.uid}`, {
317
- addSubMenu: s,
318
- removeSubMenu: f,
319
- handleMouseleave: d,
320
- mouseInChild: x,
321
- level: b.level + 1
322
- });
323
- }
324
- return u({
325
- opened: w
326
- }), ye(() => {
327
- i.addSubMenu(R), b.addSubMenu(R);
328
- }), Oe(() => {
329
- b.removeSubMenu(R), i.removeSubMenu(R);
330
- }), () => {
331
- var s;
332
- const f = [
333
- (s = n.title) == null ? void 0 : s.call(n),
334
- g($e, {
335
- class: y.e("icon-arrow"),
336
- style: {
337
- transform: w.value ? t.expandCloseIcon && t.expandOpenIcon || t.collapseCloseIcon && t.collapseOpenIcon && i.props.collapse ? "none" : "rotateZ(180deg)" : "none"
338
- }
339
- }, {
340
- default: () => D($.value) ? g(o.appContext.components[$.value]) : g($.value)
341
- })
342
- ], p = i.isMenuPopup ? g(Be, {
343
- ref: S,
344
- visible: w.value,
345
- effect: "light",
346
- pure: !0,
347
- offset: Y.value,
348
- showArrow: !1,
349
- persistent: J.value,
350
- popperClass: F.value,
351
- placement: U.value,
352
- teleported: W.value,
353
- fallbackPlacements: re.value,
354
- transition: G.value,
355
- gpuAcceleration: !1
356
- }, {
357
- content: () => {
358
- var k;
359
- return g("div", {
360
- class: [
361
- v.m(B.value),
362
- v.m("popup-container"),
363
- F.value
364
- ],
365
- onMouseenter: (T) => r(T, 100),
366
- onMouseleave: () => d(!0),
367
- onFocus: (T) => r(T, 100)
368
- }, [
369
- g("ul", {
370
- class: [
371
- v.b(),
372
- v.m("popup"),
373
- v.m(`popup-${U.value}`)
374
- ],
375
- style: K.value
376
- }, [(k = n.default) == null ? void 0 : k.call(n)])
377
- ]);
378
- },
379
- default: () => g("div", {
380
- class: y.e("title"),
381
- onClick: l
382
- }, f)
383
- }) : g(Ie, {}, [
384
- g("div", {
385
- class: y.e("title"),
386
- ref: M,
387
- onClick: l
388
- }, f),
389
- g(pt, {}, {
390
- default: () => {
391
- var k;
392
- return Ne(g("ul", {
393
- role: "menu",
394
- class: [v.b(), v.m("inline")],
395
- style: K.value
396
- }, [(k = n.default) == null ? void 0 : k.call(n)]), [[qe, w.value]]);
397
- }
398
- })
399
- ]);
400
- return g("li", {
401
- class: [
402
- y.b(),
403
- y.is("active", j.value),
404
- y.is("opened", w.value),
405
- y.is("disabled", t.disabled)
406
- ],
407
- role: "menuitem",
408
- ariaHaspopup: !0,
409
- ariaExpanded: w.value,
410
- onMouseenter: r,
411
- onMouseleave: () => d(),
412
- onFocus: r
413
- }, [p]);
414
- };
415
- }
416
- });
417
- const It = xe({
418
- mode: {
419
- type: String,
420
- values: ["horizontal", "vertical"],
421
- default: "vertical"
422
- },
423
- defaultActive: {
424
- type: String,
425
- default: ""
426
- },
427
- defaultOpeneds: {
428
- type: le(Array),
429
- default: () => ut([])
430
- },
431
- uniqueOpened: Boolean,
432
- router: Boolean,
433
- menuTrigger: {
434
- type: String,
435
- values: ["hover", "click"],
436
- default: "hover"
437
- },
438
- collapse: Boolean,
439
- backgroundColor: String,
440
- textColor: String,
441
- activeTextColor: String,
442
- closeOnClickOutside: Boolean,
443
- collapseTransition: {
444
- type: Boolean,
445
- default: !0
446
- },
447
- ellipsis: {
448
- type: Boolean,
449
- default: !0
450
- },
451
- popperOffset: {
452
- type: Number,
453
- default: 6
454
- },
455
- ellipsisIcon: {
456
- type: V,
457
- default: () => Xe
458
- },
459
- popperEffect: {
460
- type: le(String),
461
- default: "dark"
462
- },
463
- popperClass: String,
464
- showTimeout: {
465
- type: Number,
466
- default: 300
467
- },
468
- hideTimeout: {
469
- type: Number,
470
- default: 300
471
- },
472
- persistent: {
473
- type: Boolean,
474
- default: !0
475
- }
476
- }), me = (t) => He(t) && t.every((n) => D(n)), xt = {
477
- close: (t, n) => D(t) && me(n),
478
- open: (t, n) => D(t) && me(n),
479
- select: (t, n, u, o) => D(t) && me(n) && ot(u) && (Ae(o) || o instanceof Promise)
480
- };
481
- var Ct = N({
482
- name: "ElMenu",
483
- props: It,
484
- emits: xt,
485
- setup(t, { emit: n, slots: u, expose: o }) {
486
- const e = ge(), h = e.appContext.config.globalProperties.$router, v = _(), y = _(), i = O("menu"), b = O("sub-menu");
487
- let P = 64;
488
- const I = _(-1), c = _(t.defaultOpeneds && !t.collapse ? t.defaultOpeneds.slice(0) : []), x = _(t.defaultActive), M = _({}), S = _({}), L = m(() => t.mode === "horizontal" || t.mode === "vertical" && t.collapse), U = () => {
489
- const a = x.value && M.value[x.value];
490
- if (!a || t.mode === "horizontal" || t.collapse)
491
- return;
492
- a.indexPath.forEach((r) => {
493
- const d = S.value[r];
494
- d && $(r, d.indexPath);
495
- });
496
- }, $ = (a, l) => {
497
- c.value.includes(a) || (t.uniqueOpened && (c.value = c.value.filter((r) => l.includes(r))), c.value.push(a), n("open", a, l));
498
- }, W = (a) => {
499
- const l = c.value.indexOf(a);
500
- l !== -1 && c.value.splice(l, 1);
501
- }, G = (a, l) => {
502
- W(a), n("close", a, l);
503
- }, re = ({
504
- index: a,
505
- indexPath: l
506
- }) => {
507
- c.value.includes(a) ? G(a, l) : $(a, l);
508
- }, w = (a) => {
509
- (t.mode === "horizontal" || t.collapse) && (c.value = []);
510
- const { index: l, indexPath: r } = a;
511
- if (!(Se(l) || Se(r)))
512
- if (t.router && h) {
513
- const d = a.route || l, s = h.push(d).then((f) => (f || (x.value = l), f));
514
- n("select", l, r, { index: l, indexPath: r, route: d }, s);
515
- } else
516
- x.value = l, n("select", l, r, { index: l, indexPath: r });
517
- }, j = (a) => {
518
- var l;
519
- const r = M.value, d = r[a] || x.value && r[x.value] || r[t.defaultActive];
520
- x.value = (l = d == null ? void 0 : d.index) != null ? l : a;
521
- }, B = (a) => {
522
- const l = getComputedStyle(a), r = Number.parseInt(l.marginLeft, 10), d = Number.parseInt(l.marginRight, 10);
523
- return a.offsetWidth + r + d || 0;
524
- }, J = () => {
525
- var a, l;
526
- if (!v.value)
527
- return -1;
528
- const r = Array.from((l = (a = v.value) == null ? void 0 : a.childNodes) != null ? l : []).filter((z) => z.nodeName !== "#comment" && (z.nodeName !== "#text" || z.nodeValue)), d = getComputedStyle(v.value), s = Number.parseInt(d.paddingLeft, 10), f = Number.parseInt(d.paddingRight, 10), p = v.value.clientWidth - s - f;
529
- let k = 0, T = 0;
530
- return r.forEach((z, De) => {
531
- k += B(z), k <= p - P && (T = De + 1);
532
- }), T === r.length ? -1 : T;
533
- }, R = (a) => S.value[a].indexPath, K = (a, l = 33.34) => {
534
- let r;
535
- return () => {
536
- r && clearTimeout(r), r = setTimeout(() => {
537
- a();
538
- }, l);
539
- };
540
- };
541
- let Y = !0;
542
- const F = () => {
543
- const a = Ye(y);
544
- if (a && (P = B(a) || 64), I.value === J())
545
- return;
546
- const l = () => {
547
- I.value = -1, Pe(() => {
548
- I.value = J();
549
- });
550
- };
551
- Y ? l() : K(l)(), Y = !1;
552
- };
553
- X(() => t.defaultActive, (a) => {
554
- M.value[a] || (x.value = ""), j(a);
555
- }), X(() => t.collapse, (a) => {
556
- a && (c.value = []);
557
- }), X(M.value, U);
558
- let q;
559
- Ve(() => {
560
- t.mode === "horizontal" && t.ellipsis ? q = Ke(v, F).stop : q == null || q();
561
- });
562
- const Z = _(!1);
563
- {
564
- const a = (s) => {
565
- S.value[s.index] = s;
566
- }, l = (s) => {
567
- delete S.value[s.index];
568
- };
569
- ve(_e, Me({
570
- props: t,
571
- openedMenus: c,
572
- items: M,
573
- subMenus: S,
574
- activeIndex: x,
575
- isMenuPopup: L,
576
- addMenuItem: (s) => {
577
- M.value[s.index] = s;
578
- },
579
- removeMenuItem: (s) => {
580
- delete M.value[s.index];
581
- },
582
- addSubMenu: a,
583
- removeSubMenu: l,
584
- openMenu: $,
585
- closeMenu: G,
586
- handleMenuItemClick: w,
587
- handleSubMenuClick: re
588
- })), ve(`${ue}${e.uid}`, {
589
- addSubMenu: a,
590
- removeSubMenu: l,
591
- mouseInChild: Z,
592
- level: 0
593
- });
594
- }
595
- ye(() => {
596
- t.mode === "horizontal" && new ft(e.vnode.el, i.namespace.value);
597
- }), o({
598
- open: (l) => {
599
- const { indexPath: r } = S.value[l];
600
- r.forEach((d) => $(d, r));
601
- },
602
- close: W,
603
- updateActiveIndex: j,
604
- handleResize: F
605
- });
606
- const ce = We(t, 0);
607
- return () => {
608
- var a, l;
609
- let r = (l = (a = u.default) == null ? void 0 : a.call(u)) != null ? l : [];
610
- const d = [];
611
- if (t.mode === "horizontal" && v.value) {
612
- const p = it(r).filter((z) => (z == null ? void 0 : z.shapeFlag) !== 8), k = I.value === -1 ? p : p.slice(0, I.value), T = I.value === -1 ? [] : p.slice(I.value);
613
- T != null && T.length && t.ellipsis && (r = k, d.push(g(Ee, {
614
- ref: y,
615
- index: "sub-menu-more",
616
- class: b.e("hide-arrow"),
617
- popperOffset: t.popperOffset
618
- }, {
619
- title: () => g($e, {
620
- class: b.e("icon-more")
621
- }, {
622
- default: () => g(t.ellipsisIcon)
623
- }),
624
- default: () => T
625
- })));
626
- }
627
- const s = t.closeOnClickOutside ? [
628
- [
629
- lt,
630
- () => {
631
- c.value.length && (Z.value || (c.value.forEach((p) => n("close", p, R(p))), c.value = []));
632
- }
633
- ]
634
- ] : [], f = Ne(g("ul", {
635
- key: String(t.collapse),
636
- role: "menubar",
637
- ref: v,
638
- style: ce.value,
639
- class: {
640
- [i.b()]: !0,
641
- [i.m(t.mode)]: !0,
642
- [i.m("collapse")]: t.collapse
643
- }
644
- }, [...r, ...d]), s);
645
- return t.collapseTransition && t.mode === "vertical" ? g(gt, () => f) : f;
646
- };
647
- }
648
- });
649
- const _t = xe({
650
- index: {
651
- type: le([String, null]),
652
- default: null
653
- },
654
- route: {
655
- type: le([String, Object])
656
- },
657
- disabled: Boolean
658
- }), Et = {
659
- click: (t) => D(t.index) && He(t.indexPath)
660
- }, he = "ElMenuItem", Tt = N({
661
- name: he
662
- }), St = /* @__PURE__ */ N({
663
- ...Tt,
664
- props: _t,
665
- emits: Et,
666
- setup(t, { expose: n, emit: u }) {
667
- const o = t;
668
- st(o.index) && tt();
669
- const e = ge(), h = ne(_e), v = O("menu"), y = O("menu-item");
670
- h || ae(he, "can not inject root menu");
671
- const { parentMenu: i, indexPath: b } = Le(e, Ue(o, "index")), P = ne(`${ue}${i.value.uid}`);
672
- P || ae(he, "can not inject sub menu");
673
- const I = m(() => o.index === h.activeIndex), c = Me({
674
- index: o.index,
675
- indexPath: b,
676
- active: I
677
- }), x = () => {
678
- o.disabled || (h.handleMenuItemClick({
679
- index: o.index,
680
- indexPath: b.value,
681
- route: o.route
682
- }), u("click", c));
683
- };
684
- return ye(() => {
685
- P.addSubMenu(c), h.addMenuItem(c);
686
- }), Oe(() => {
687
- P.removeSubMenu(c), h.removeMenuItem(c);
688
- }), n({
689
- parentMenu: i,
690
- rootMenu: h,
691
- active: I,
692
- nsMenu: v,
693
- nsMenuItem: y,
694
- handleClick: x
695
- }), (M, S) => (H(), oe("li", {
696
- class: se([
697
- C(y).b(),
698
- C(y).is("active", C(I)),
699
- C(y).is("disabled", M.disabled)
700
- ]),
701
- role: "menuitem",
702
- tabindex: "-1",
703
- onClick: x
704
- }, [
705
- C(i).type.name === "ElMenu" && C(h).props.collapse && M.$slots.title ? (H(), be(C(Be), {
706
- key: 0,
707
- effect: C(h).props.popperEffect,
708
- placement: "right",
709
- "fallback-placements": ["left"],
710
- persistent: C(h).props.persistent,
711
- "focus-on-target": ""
712
- }, {
713
- content: te(() => [
714
- A(M.$slots, "title")
715
- ]),
716
- default: te(() => [
717
- fe("div", {
718
- class: se(C(v).be("tooltip", "trigger"))
719
- }, [
720
- A(M.$slots, "default")
721
- ], 2)
722
- ]),
723
- _: 3
724
- }, 8, ["effect", "persistent"])) : (H(), oe(Ie, { key: 1 }, [
725
- A(M.$slots, "default"),
726
- A(M.$slots, "title")
727
- ], 64))
728
- ], 2));
729
- }
730
- });
731
- var je = /* @__PURE__ */ ie(St, [["__file", "menu-item.vue"]]);
732
- const wt = {
733
- title: String
734
- }, kt = N({
735
- name: "ElMenuItemGroup"
736
- }), Ot = /* @__PURE__ */ N({
737
- ...kt,
738
- props: wt,
739
- setup(t) {
740
- const n = O("menu-item-group");
741
- return (u, o) => (H(), oe("li", {
742
- class: se(C(n).b())
743
- }, [
744
- fe("div", {
745
- class: se(C(n).e("title"))
746
- }, [
747
- u.$slots.title ? A(u.$slots, "title", { key: 1 }) : (H(), oe(Ie, { key: 0 }, [
748
- Ge(Je(u.title), 1)
749
- ], 64))
750
- ], 2),
751
- fe("ul", null, [
752
- A(u.$slots, "default")
753
- ])
754
- ], 2));
755
- }
756
- });
757
- var Re = /* @__PURE__ */ ie(Ot, [["__file", "menu-item-group.vue"]]);
758
- const Ft = ze(Ct, {
759
- MenuItem: je,
760
- MenuItemGroup: Re,
761
- SubMenu: Ee
762
- }), qt = Ce(je);
763
- Ce(Re);
764
- Ce(Ee);
765
- export {
766
- qt as E,
767
- Ft as a
768
- };