st-comp 0.0.178 → 0.0.180

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 (185) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +3 -3
  3. package/es/FactorWarning.cjs +1 -1
  4. package/es/FactorWarning.js +29 -33
  5. package/es/Kline.cjs +1 -1
  6. package/es/Kline.js +14 -18
  7. package/es/KlineBasic.cjs +1 -1
  8. package/es/KlineBasic.js +25 -30
  9. package/es/KlineConfig.cjs +1 -1
  10. package/es/KlineConfig.js +457 -419
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +13 -16
  13. package/es/KlinePlus.cjs +3 -3
  14. package/es/KlinePlus.js +140 -142
  15. package/es/Pagination.cjs +1 -1
  16. package/es/Pagination.js +274 -276
  17. package/es/PasswordPrompt.cjs +1 -1
  18. package/es/PasswordPrompt.js +3 -3
  19. package/es/Table.cjs +1 -1
  20. package/es/Table.js +21 -23
  21. package/es/User.cjs +1 -1
  22. package/es/User.js +472 -482
  23. package/es/VarSelectDialog.cjs +3 -3
  24. package/es/VarSelectDialog.js +440 -2878
  25. package/es/VarietySearch.cjs +12 -12
  26. package/es/VarietySearch.js +1199 -1176
  27. package/es/VirtualTable.cjs +1 -13
  28. package/es/VirtualTable.js +1547 -1567
  29. package/es/{_initCloneObject-da90eef0.js → _initCloneObject-346b7ee2.js} +25 -26
  30. package/es/_initCloneObject-e2f0deb9.cjs +1 -0
  31. package/es/base-62a70f61.js +288 -0
  32. package/es/base-ef747d02.cjs +5 -0
  33. package/es/config-provider-178bb43c.cjs +1 -0
  34. package/es/config-provider-2e733cae.js +58 -0
  35. package/es/dayjs.min-2c20abe6.cjs +1 -0
  36. package/es/{dayjs.min-54a4e095.js → dayjs.min-8313b006.js} +96 -93
  37. package/es/{debounce-9e323221.cjs → debounce-0b77a317.cjs} +1 -1
  38. package/es/{debounce-3cec4646.js → debounce-5f2ec4be.js} +19 -19
  39. package/es/{dropdown-82b80e8b.js → dropdown-d06edf54.js} +49 -39
  40. package/es/dropdown-f2fec683.cjs +1 -0
  41. package/es/el-button-5b08c08a.js +272 -0
  42. package/es/el-button-fc46a173.cjs +1 -0
  43. package/es/el-dialog-0b7166c9.cjs +1 -0
  44. package/es/el-dialog-d8d0da7a.js +276 -0
  45. package/es/{el-divider-fd2b4e2e.js → el-divider-2f300113.js} +1 -1
  46. package/es/{el-divider-40c50ce7.cjs → el-divider-4713d74c.cjs} +1 -1
  47. package/es/{el-empty-412fc297.js → el-empty-87a86f30.js} +57 -80
  48. package/es/el-empty-bb2b0235.cjs +1 -0
  49. package/es/el-form-item-caffd133.cjs +12 -0
  50. package/es/el-form-item-ff9c7d98.js +1267 -0
  51. package/es/el-input-6db30c8c.js +531 -0
  52. package/es/el-input-9c912678.cjs +1 -0
  53. package/es/el-input-number-05f150e5.js +311 -0
  54. package/es/el-input-number-6fe73563.cjs +1 -0
  55. package/es/el-loading-8514feaa.cjs +1 -0
  56. package/es/el-loading-93842445.js +203 -0
  57. package/es/el-menu-item-7a57c1be.cjs +1 -0
  58. package/es/el-menu-item-a886fbdd.js +768 -0
  59. package/es/el-message-8aa674f2.js +406 -0
  60. package/es/el-message-aad5b42b.cjs +1 -0
  61. package/es/el-message-box-2b6b2b68.js +550 -0
  62. package/es/el-message-box-53f355d7.cjs +1 -0
  63. package/es/el-overlay-540b2a02.js +324 -0
  64. package/es/el-overlay-96630a2e.cjs +1 -0
  65. package/es/el-popconfirm-2afdf6fb.cjs +1 -0
  66. package/es/el-popconfirm-c18d8035.js +162 -0
  67. package/es/el-popper-544fd77e.js +2412 -0
  68. package/es/el-popper-73466d7a.cjs +1 -0
  69. package/es/el-scrollbar-691cfc11.cjs +1 -0
  70. package/es/el-scrollbar-fae984e3.js +763 -0
  71. package/es/el-segmented-a7493831.js +142 -0
  72. package/es/el-segmented-b6bd3c0e.cjs +1 -0
  73. package/es/el-select-5959e837.cjs +1 -0
  74. package/es/el-select-ea8feecf.js +1251 -0
  75. package/es/el-table-column-9ef52443.js +3878 -0
  76. package/es/el-table-column-b824ac5c.cjs +14 -0
  77. package/es/el-tag-2fc9b9eb.js +116 -0
  78. package/es/el-tag-ecad6d02.cjs +1 -0
  79. package/es/index-2e331d74.js +10 -0
  80. package/es/{index-a8e9ec0f.js → index-34592e82.js} +176 -182
  81. package/es/index-3a74eae4.cjs +1 -0
  82. package/es/{index-1c41bd56.js → index-5d4e5c51.js} +3 -3
  83. package/es/{index-e348d5e8.cjs → index-694bb944.cjs} +1 -1
  84. package/es/{index-ee1cebbc.js → index-74fb90c7.js} +5 -5
  85. package/es/{index-d577b81b.js → index-8d7ae5dc.js} +2 -2
  86. package/es/index-a9095b4a.js +163 -0
  87. package/es/index-a93dd9c4.cjs +1 -0
  88. package/es/index-ebd2fd7e.cjs +1 -0
  89. package/es/index-f1c702f6.cjs +1 -0
  90. package/es/{index-19fa1fcf.cjs → index-f6afafaa.cjs} +1 -1
  91. package/es/{raf-bfbf42e4.js → raf-41aed4d4.js} +1 -1
  92. package/es/{raf-07cb6953.cjs → raf-8249652f.cjs} +1 -1
  93. package/es/{scroll-e3cb691f.js → scroll-7d352c1f.js} +2 -2
  94. package/es/{scroll-4769a65d.cjs → scroll-b108dabd.cjs} +1 -1
  95. package/es/style.css +1 -1
  96. package/es/use-global-config-03735617.cjs +1 -0
  97. package/es/use-global-config-4b185eb5.js +71 -0
  98. package/es/validator-0e688e4e.cjs +1 -0
  99. package/es/validator-d12a8f8c.js +5 -0
  100. package/es/vnode-4db20540.cjs +1 -0
  101. package/es/vnode-a0795a4b.js +70 -0
  102. package/es/{zh-cn-d883afa8.js → zh-cn-0ff32188.js} +5 -4
  103. package/es/{zh-cn-b24a7dc9.cjs → zh-cn-adf19c4b.cjs} +1 -1
  104. package/lib/bundle.js +1 -1
  105. package/lib/bundle.umd.cjs +226 -245
  106. package/lib/{index-0f16f8b0.js → index-9341884f.js} +44358 -46367
  107. package/lib/{python-e9c32bc9.js → python-5c9b3e4e.js} +1 -1
  108. package/lib/style.css +1 -1
  109. package/package.json +2 -2
  110. package/packages/KlinePlus/index.vue +2 -1
  111. package/packages/VarSelectDialog/index.vue +43 -67
  112. package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +4 -2
  113. package/packages/VarietySearch/components/FactorScreen/index.vue +6 -4
  114. package/packages/index.ts +0 -2
  115. package/src/pages/VarSelectDialog/index.vue +1 -1
  116. package/src/router/routes.ts +0 -5
  117. package/es/Dialog.cjs +0 -1
  118. package/es/Dialog.js +0 -95
  119. package/es/_commonjsHelpers-10dfc225.js +0 -8
  120. package/es/_commonjsHelpers-87b0abe8.cjs +0 -1
  121. package/es/_initCloneObject-9ccbb113.cjs +0 -1
  122. package/es/base-bdc10baa.cjs +0 -5
  123. package/es/base-d9284bf0.js +0 -304
  124. package/es/castArray-37eb9980.cjs +0 -1
  125. package/es/castArray-b0ab0165.js +0 -10
  126. package/es/config-provider-ec6b09df.cjs +0 -1
  127. package/es/config-provider-f0151e9f.js +0 -47
  128. package/es/dayjs.min-19fb125f.cjs +0 -1
  129. package/es/dropdown-b2dab5bb.cjs +0 -1
  130. package/es/el-button-34665425.js +0 -237
  131. package/es/el-button-960edd49.cjs +0 -1
  132. package/es/el-dialog-a412484e.js +0 -267
  133. package/es/el-dialog-cd484c1f.cjs +0 -1
  134. package/es/el-empty-627ec09e.cjs +0 -1
  135. package/es/el-form-item-668ba024.js +0 -1263
  136. package/es/el-form-item-e1c3104b.cjs +0 -12
  137. package/es/el-input-22e66e37.js +0 -523
  138. package/es/el-input-5163bda3.cjs +0 -1
  139. package/es/el-input-number-481e21c5.js +0 -284
  140. package/es/el-input-number-eb54cde4.cjs +0 -1
  141. package/es/el-loading-15a5501c.cjs +0 -1
  142. package/es/el-loading-d4e403ab.js +0 -187
  143. package/es/el-menu-item-404c10e5.js +0 -772
  144. package/es/el-menu-item-ac89e804.cjs +0 -1
  145. package/es/el-message-ad87b9dd.cjs +0 -1
  146. package/es/el-message-box-41f39f6d.js +0 -558
  147. package/es/el-message-box-6694f827.cjs +0 -1
  148. package/es/el-message-ef506caa.js +0 -375
  149. package/es/el-overlay-4a9fa4e1.js +0 -269
  150. package/es/el-overlay-e5d318c3.cjs +0 -1
  151. package/es/el-popconfirm-7b9183aa.js +0 -140
  152. package/es/el-popconfirm-a497b279.cjs +0 -1
  153. package/es/el-popper-14a9d493.cjs +0 -1
  154. package/es/el-popper-e73466eb.js +0 -2263
  155. package/es/el-scrollbar-45318df0.js +0 -201
  156. package/es/el-scrollbar-8bf765f2.cjs +0 -1
  157. package/es/el-segmented-3ba6d664.cjs +0 -1
  158. package/es/el-segmented-41820018.js +0 -135
  159. package/es/el-select-1d2309a1.cjs +0 -1
  160. package/es/el-select-d7a00294.js +0 -1130
  161. package/es/el-table-column-a2d0c635.js +0 -3805
  162. package/es/el-table-column-be9a76bb.cjs +0 -14
  163. package/es/el-tag-7f391090.js +0 -280
  164. package/es/el-tag-8d49d4d2.cjs +0 -1
  165. package/es/index-02ca0096.cjs +0 -5
  166. package/es/index-3120be08.js +0 -14
  167. package/es/index-5b81f4da.cjs +0 -1
  168. package/es/index-85a32a00.js +0 -59
  169. package/es/index-8d3c5e96.cjs +0 -3
  170. package/es/index-94f38460.js +0 -306
  171. package/es/index-a99a5307.cjs +0 -1
  172. package/es/index-b90c746b.cjs +0 -1
  173. package/es/index-d94bae37.cjs +0 -1
  174. package/es/index-d99fdc6d.js +0 -159
  175. package/es/use-form-common-props-592797e2.cjs +0 -2
  176. package/es/use-form-common-props-cc347a83.js +0 -171
  177. package/es/use-global-config-584b62f1.cjs +0 -1
  178. package/es/use-global-config-c7f0a7e3.js +0 -73
  179. package/es/validator-10fa54fe.js +0 -5
  180. package/es/validator-af488a9a.cjs +0 -1
  181. package/es/vnode-1b827c99.cjs +0 -1
  182. package/es/vnode-6be33bb1.js +0 -14
  183. package/packages/Dialog/index.ts +0 -8
  184. package/packages/Dialog/index.vue +0 -54
  185. package/src/pages/Dialog/index.vue +0 -16
@@ -0,0 +1,768 @@
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 "./el-scrollbar-fae984e3.js";
3
+ import { a as Ze, b as Qe, E as $e, m as Xe } from "./index-74fb90c7.js";
4
+ import { a as E, t as ee, b as ae, E as Be, f as et, d as tt } from "./el-popper-544fd77e.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-62a70f61.js";
6
+ import { T as at } from "./index-657047bb.js";
7
+ import { C as lt } from "./el-tag-2fc9b9eb.js";
8
+ import { m as ut } from "./typescript-7ae59c4c.js";
9
+ import { f as it } from "./vnode-a0795a4b.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)), R = m(() => [...Object.values(P.value), ...Object.values(I.value)].some(({ active: s }) => s)), B = m(() => i.props.mode), J = m(() => i.props.persistent), j = Me({
262
+ index: t.index,
263
+ indexPath: e,
264
+ active: R
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: R.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(j), b.addSubMenu(j);
328
+ }), Oe(() => {
329
+ b.removeSubMenu(j), i.removeSubMenu(j);
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", R.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
+ }, R = (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
+ }, j = (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 = ""), R(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: R,
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, j(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 Re = /* @__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 je = /* @__PURE__ */ ie(Ot, [["__file", "menu-item-group.vue"]]);
758
+ const Ft = ze(Ct, {
759
+ MenuItem: Re,
760
+ MenuItemGroup: je,
761
+ SubMenu: Ee
762
+ }), qt = Ce(Re);
763
+ Ce(je);
764
+ Ce(Ee);
765
+ export {
766
+ qt as E,
767
+ Ft as a
768
+ };