ep-craft 0.1.32 → 0.1.34

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 (205) hide show
  1. package/dist/components/button/index.d.ts +12 -0
  2. package/dist/components/button-group/index.d.ts +3 -2
  3. package/dist/components/button-group/index.js +7 -3
  4. package/dist/components/button-group/src/button-group.d.ts +48 -0
  5. package/dist/components/button-group/src/button-group.js +7 -0
  6. package/dist/components/button-group/src/button-group.vue.d.ts +16 -0
  7. package/dist/components/button-group/src/button-group.vue.js +42 -0
  8. package/dist/components/button-group/src/button-group2.vue.js +4 -0
  9. package/dist/components/checkbox/index.js +6 -5
  10. package/dist/components/collection/index.d.ts +8 -0
  11. package/dist/components/collection/src/collection-item.vue.d.ts +2 -0
  12. package/dist/components/collection/src/collection-item.vue.js +10 -0
  13. package/dist/components/collection/src/collection-item2.vue.js +8 -0
  14. package/dist/components/collection/src/collection.d.ts +39 -0
  15. package/dist/components/collection/src/collection.js +52 -0
  16. package/dist/components/collection/src/collection.vue.d.ts +2 -0
  17. package/dist/components/collection/src/collection.vue.js +10 -0
  18. package/dist/components/collection/src/collection2.vue.js +7 -0
  19. package/dist/components/collection/src/tokens.d.ts +18 -0
  20. package/dist/components/divider/index.d.ts +24 -2
  21. package/dist/components/divider/index.js +8 -3
  22. package/dist/components/divider/src/divider.d.ts +30 -0
  23. package/dist/components/divider/src/divider.js +34 -0
  24. package/dist/components/divider/src/divider.vue.d.ts +24 -0
  25. package/dist/components/divider/src/divider.vue.js +39 -0
  26. package/dist/components/divider/src/divider2.vue.js +4 -0
  27. package/dist/components/dropdown/index.d.ts +3017 -3
  28. package/dist/components/dropdown/index.js +23 -3
  29. package/dist/components/dropdown/src/dropdown-item-impl.vue.d.ts +79 -0
  30. package/dist/components/dropdown/src/dropdown-item-impl.vue.js +40 -0
  31. package/dist/components/dropdown/src/dropdown-item-impl2.vue.js +68 -0
  32. package/dist/components/dropdown/src/dropdown-item.vue.d.ts +169 -0
  33. package/dist/components/dropdown/src/dropdown-item.vue.js +35 -0
  34. package/dist/components/dropdown/src/dropdown-item2.vue.js +63 -0
  35. package/dist/components/dropdown/src/dropdown-menu.vue.d.ts +27 -0
  36. package/dist/components/dropdown/src/dropdown-menu.vue.js +24 -0
  37. package/dist/components/dropdown/src/dropdown-menu2.vue.js +75 -0
  38. package/dist/components/dropdown/src/dropdown.d.ts +200 -0
  39. package/dist/components/dropdown/src/dropdown.js +201 -0
  40. package/dist/components/dropdown/src/dropdown.vue.d.ts +1126 -0
  41. package/dist/components/dropdown/src/dropdown.vue.js +127 -0
  42. package/dist/components/dropdown/src/dropdown2.vue.js +127 -0
  43. package/dist/components/dropdown/src/instance.d.ts +2 -0
  44. package/dist/components/dropdown/src/tokens.d.ts +13 -0
  45. package/dist/components/dropdown/src/tokens.js +5 -0
  46. package/dist/components/dropdown/src/useDropdown.d.ts +5 -0
  47. package/dist/components/dropdown/src/useDropdown.js +15 -0
  48. package/dist/components/dropdown-item/index.d.ts +1 -4
  49. package/dist/components/dropdown-menu/index.d.ts +1 -4
  50. package/dist/components/index.js +129 -131
  51. package/dist/components/popover/index.d.ts +121 -3
  52. package/dist/components/popover/index.js +19 -4
  53. package/dist/components/popover/src/directive.d.ts +4 -0
  54. package/dist/components/popover/src/directive.js +15 -0
  55. package/dist/components/popover/src/popover.d.ts +291 -0
  56. package/dist/components/popover/src/popover.js +168 -0
  57. package/dist/components/popover/src/popover.vue.d.ts +53 -0
  58. package/dist/components/popover/src/popover.vue.js +125 -0
  59. package/dist/components/popover/src/popover2.vue.js +4 -0
  60. package/dist/components/progress/index.d.ts +35 -2
  61. package/dist/components/progress/index.js +10 -4
  62. package/dist/components/progress/src/progress.d.ts +97 -0
  63. package/dist/components/progress/src/progress.js +104 -0
  64. package/dist/components/progress/src/progress.vue.d.ts +30 -0
  65. package/dist/components/progress/src/progress.vue.js +179 -0
  66. package/dist/components/progress/src/progress2.vue.js +4 -0
  67. package/dist/components/roving-focus-group/index.d.ts +14 -0
  68. package/dist/components/roving-focus-group/index.js +15 -0
  69. package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +50 -0
  70. package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.js +10 -0
  71. package/dist/components/roving-focus-group/src/roving-focus-group-impl2.vue.js +115 -0
  72. package/dist/components/roving-focus-group/src/roving-focus-group.d.ts +56 -0
  73. package/dist/components/roving-focus-group/src/roving-focus-group.js +43 -0
  74. package/dist/components/roving-focus-group/src/roving-focus-group.vue.d.ts +67 -0
  75. package/dist/components/roving-focus-group/src/roving-focus-group.vue.js +13 -0
  76. package/dist/components/roving-focus-group/src/roving-focus-group2.vue.js +21 -0
  77. package/dist/components/roving-focus-group/src/roving-focus-item.vue.d.ts +43 -0
  78. package/dist/components/roving-focus-group/src/roving-focus-item.vue.js +20 -0
  79. package/dist/components/roving-focus-group/src/roving-focus-item2.vue.js +78 -0
  80. package/dist/components/roving-focus-group/src/tokens.d.ts +28 -0
  81. package/dist/components/roving-focus-group/src/tokens.js +5 -0
  82. package/dist/components/roving-focus-group/src/utils.d.ts +8 -0
  83. package/dist/components/roving-focus-group/src/utils.js +28 -0
  84. package/dist/components/table/index.d.ts +56 -3
  85. package/dist/components/table/index.js +20 -4
  86. package/dist/components/table/src/composables/use-scrollbar.d.ts +6 -0
  87. package/dist/components/table/src/composables/use-scrollbar.js +24 -0
  88. package/dist/components/table/src/config.d.ts +87 -0
  89. package/dist/components/table/src/config.js +210 -0
  90. package/dist/components/table/src/filter-panel.vue.d.ts +837 -0
  91. package/dist/components/table/src/filter-panel.vue.js +130 -0
  92. package/dist/components/table/src/filter-panel2.vue.js +155 -0
  93. package/dist/components/table/src/h-helper.d.ts +13 -0
  94. package/dist/components/table/src/h-helper.js +30 -0
  95. package/dist/components/table/src/layout-observer.d.ts +8 -0
  96. package/dist/components/table/src/layout-observer.js +49 -0
  97. package/dist/components/table/src/store/current.d.ts +15 -0
  98. package/dist/components/table/src/store/current.js +45 -0
  99. package/dist/components/table/src/store/expand.d.ts +14 -0
  100. package/dist/components/table/src/store/expand.js +55 -0
  101. package/dist/components/table/src/store/helper.d.ts +548 -0
  102. package/dist/components/table/src/store/helper.js +61 -0
  103. package/dist/components/table/src/store/index.d.ts +1107 -0
  104. package/dist/components/table/src/store/index.js +123 -0
  105. package/dist/components/table/src/store/tree.d.ts +27 -0
  106. package/dist/components/table/src/store/tree.js +153 -0
  107. package/dist/components/table/src/store/watcher.d.ts +88 -0
  108. package/dist/components/table/src/store/watcher.js +483 -0
  109. package/dist/components/table/src/table/defaults.d.ts +560 -0
  110. package/dist/components/table/src/table/defaults.js +236 -0
  111. package/dist/components/table/src/table/key-render-helper.d.ts +2 -0
  112. package/dist/components/table/src/table/key-render-helper.js +18 -0
  113. package/dist/components/table/src/table/style-helper.d.ts +51 -0
  114. package/dist/components/table/src/table/style-helper.js +169 -0
  115. package/dist/components/table/src/table/utils-helper.d.ts +16 -0
  116. package/dist/components/table/src/table/utils-helper.js +36 -0
  117. package/dist/components/table/src/table-body/defaults.d.ts +39 -0
  118. package/dist/components/table/src/table-body/defaults.js +25 -0
  119. package/dist/components/table/src/table-body/events-helper.d.ts +19 -0
  120. package/dist/components/table/src/table-body/events-helper.js +126 -0
  121. package/dist/components/table/src/table-body/index.d.ts +84 -0
  122. package/dist/components/table/src/table-body/index.js +77 -0
  123. package/dist/components/table/src/table-body/render-helper.d.ts +18 -0
  124. package/dist/components/table/src/table-body/render-helper.js +188 -0
  125. package/dist/components/table/src/table-body/styles-helper.d.ts +15 -0
  126. package/dist/components/table/src/table-body/styles-helper.js +98 -0
  127. package/dist/components/table/src/table-body/td-wrapper.vue.d.ts +33 -0
  128. package/dist/components/table/src/table-body/td-wrapper.vue.js +26 -0
  129. package/dist/components/table/src/table-body/td-wrapper2.vue.js +4 -0
  130. package/dist/components/table/src/table-column/defaults.d.ts +348 -0
  131. package/dist/components/table/src/table-column/defaults.js +152 -0
  132. package/dist/components/table/src/table-column/index.d.ts +2 -0
  133. package/dist/components/table/src/table-column/index.vue.d.ts +32 -0
  134. package/dist/components/table/src/table-column/index.vue.js +161 -0
  135. package/dist/components/table/src/table-column/index2.vue.js +4 -0
  136. package/dist/components/table/src/table-column/render-helper.d.ts +17 -0
  137. package/dist/components/table/src/table-column/render-helper.js +116 -0
  138. package/dist/components/table/src/table-column/watcher-helper.d.ts +8 -0
  139. package/dist/components/table/src/table-column/watcher-helper.js +85 -0
  140. package/dist/components/table/src/table-footer/index.d.ts +79 -0
  141. package/dist/components/table/src/table-footer/index.js +110 -0
  142. package/dist/components/table/src/table-footer/mapState-helper.d.ts +9 -0
  143. package/dist/components/table/src/table-footer/mapState-helper.js +16 -0
  144. package/dist/components/table/src/table-footer/style-helper.d.ts +9 -0
  145. package/dist/components/table/src/table-footer/style-helper.js +42 -0
  146. package/dist/components/table/src/table-header/event-helper.d.ts +14 -0
  147. package/dist/components/table/src/table-header/event-helper.js +113 -0
  148. package/dist/components/table/src/table-header/index.d.ts +361 -0
  149. package/dist/components/table/src/table-header/index.js +255 -0
  150. package/dist/components/table/src/table-header/style.helper.d.ts +10 -0
  151. package/dist/components/table/src/table-header/style.helper.js +73 -0
  152. package/dist/components/table/src/table-header/utils-helper.d.ts +10 -0
  153. package/dist/components/table/src/table-header/utils-helper.js +45 -0
  154. package/dist/components/table/src/table-layout.d.ts +37 -0
  155. package/dist/components/table/src/table-layout.js +144 -0
  156. package/dist/components/table/src/table.vue.d.ts +734 -0
  157. package/dist/components/table/src/table.vue.js +443 -0
  158. package/dist/components/table/src/table2.vue.js +4 -0
  159. package/dist/components/table/src/tableColumn.d.ts +2 -0
  160. package/dist/components/table/src/tokens.d.ts +3 -0
  161. package/dist/components/table/src/tokens.js +4 -0
  162. package/dist/components/table/src/util.d.ts +55 -0
  163. package/dist/components/table/src/util.js +310 -0
  164. package/dist/components/table-column/index.d.ts +40 -3
  165. package/dist/components/table-column/index.js +6 -3
  166. package/dist/components/upload/index.d.ts +45 -2
  167. package/dist/components/upload/index.js +23 -4
  168. package/dist/components/upload/src/ajax.d.ts +9 -0
  169. package/dist/components/upload/src/ajax.js +58 -0
  170. package/dist/components/upload/src/constants.d.ts +5 -0
  171. package/dist/components/upload/src/constants.js +4 -0
  172. package/dist/components/upload/src/upload-content.d.ts +136 -0
  173. package/dist/components/upload/src/upload-content.js +53 -0
  174. package/dist/components/upload/src/upload-content.vue.d.ts +38 -0
  175. package/dist/components/upload/src/upload-content.vue.js +186 -0
  176. package/dist/components/upload/src/upload-content2.vue.js +4 -0
  177. package/dist/components/upload/src/upload-dragger.d.ts +22 -0
  178. package/dist/components/upload/src/upload-dragger.js +19 -0
  179. package/dist/components/upload/src/upload-dragger.vue.d.ts +19 -0
  180. package/dist/components/upload/src/upload-dragger.vue.js +91 -0
  181. package/dist/components/upload/src/upload-dragger2.vue.js +4 -0
  182. package/dist/components/upload/src/upload-list.d.ts +45 -0
  183. package/dist/components/upload/src/upload-list.js +39 -0
  184. package/dist/components/upload/src/upload-list.vue.d.ts +28 -0
  185. package/dist/components/upload/src/upload-list.vue.js +182 -0
  186. package/dist/components/upload/src/upload-list2.vue.js +4 -0
  187. package/dist/components/upload/src/upload.d.ts +361 -0
  188. package/dist/components/upload/src/upload.js +216 -0
  189. package/dist/components/upload/src/upload.vue.d.ts +64 -0
  190. package/dist/components/upload/src/upload.vue.js +150 -0
  191. package/dist/components/upload/src/upload2.vue.js +4 -0
  192. package/dist/components/upload/src/use-handlers.d.ts +60 -0
  193. package/dist/components/upload/src/use-handlers.js +111 -0
  194. package/dist/directives/mousewheel/index.js +28 -0
  195. package/dist/ep-craft.js +277 -236
  196. package/dist/index.d.ts +67 -0
  197. package/dist/utils/dom/event.js +12 -11
  198. package/dist/utils/objects.js +10 -9
  199. package/dist/utils/vue/install.js +21 -18
  200. package/dist/utils/vue/refs.js +8 -0
  201. package/dist/vendored-components.d.ts +1 -1
  202. package/dist/vendored-components.js +44 -4
  203. package/package.json +1 -1
  204. package/dist/components/dropdown-item/index.js +0 -6
  205. package/dist/components/dropdown-menu/index.js +0 -6
@@ -0,0 +1,483 @@
1
+ import { getCurrentInstance as tt, toRefs as lt, ref as r, computed as ge, watch as J, unref as nt } from "vue";
2
+ import { isArray as X, isString as ye, hasOwn as at } from "@vue/shared";
3
+ import { castArray as ot } from "lodash-unified";
4
+ import "@vueuse/core";
5
+ import "@element-plus/icons-vue";
6
+ import { getKeysMap as Ce, getRowIdentity as E, toggleRowStatus as B, getColumnByKey as st, getColumnById as ct, orderBy as ut } from "../util.js";
7
+ import rt from "./expand.js";
8
+ import it from "./current.js";
9
+ import dt from "./tree.js";
10
+ const ft = (o, x) => {
11
+ const c = x.sortingColumn;
12
+ return !c || ye(c.sortable) ? o : ut(
13
+ o,
14
+ x.sortProp,
15
+ x.sortOrder,
16
+ c.sortMethod,
17
+ c.sortBy
18
+ );
19
+ }, H = (o) => {
20
+ const x = [];
21
+ return o.forEach((c) => {
22
+ c.children && c.children.length > 0 ? x.push.apply(x, H(c.children)) : x.push(c);
23
+ }), x;
24
+ };
25
+ function Et() {
26
+ var ve;
27
+ const o = tt(), { size: x } = lt((ve = o.proxy) == null ? void 0 : ve.$props), c = r(null), m = r([]), Y = r([]), Z = r(!1), b = r([]), ee = r([]), L = r([]), R = r([]), T = r([]), xe = r([]), Se = r([]), we = r([]), Ee = [], te = r(0), le = r(0), ne = r(0), M = r(!1), i = r([]), O = r({}), Re = r(!1), ae = r(!1), S = r(null), Ie = r(null), A = r({}), U = r(null), k = r(null), W = r(null), q = r(null), be = r(null);
28
+ let N = [];
29
+ const z = ge(() => c.value ? Ce(i.value, c.value) : void 0), Q = (e) => {
30
+ var a;
31
+ const { childrenColumnName: t, lazyTreeNodeMap: n } = o.store.states, l = e[t.value] ?? [];
32
+ if (!c.value) return l;
33
+ const s = E(e, c.value);
34
+ return [...((a = n.value) == null ? void 0 : a[s]) ?? [], ...l];
35
+ };
36
+ J(
37
+ m,
38
+ () => {
39
+ var e;
40
+ o.state && (ce(!1), o.props.tableLayout === "auto" && ((e = o.refs.tableHeaderRef) == null || e.updateFixedColumnStyle()));
41
+ },
42
+ {
43
+ deep: !0
44
+ }
45
+ );
46
+ const Me = () => {
47
+ if (!c.value) throw new Error("[ElTable] prop row-key is required");
48
+ }, oe = (e) => {
49
+ var t;
50
+ (t = e.children) == null || t.forEach((n) => {
51
+ n.fixed = e.fixed, oe(n);
52
+ });
53
+ }, se = () => {
54
+ b.value.forEach((a) => {
55
+ oe(a);
56
+ }), R.value = b.value.filter(
57
+ (a) => [!0, "left"].includes(a.fixed)
58
+ );
59
+ const e = b.value.find(
60
+ (a) => a.type === "selection"
61
+ );
62
+ let t;
63
+ e && e.fixed !== "right" && !R.value.includes(e) && b.value.indexOf(e) === 0 && R.value.length && (R.value.unshift(e), t = !0), T.value = b.value.filter(
64
+ (a) => a.fixed === "right"
65
+ );
66
+ const n = b.value.filter(
67
+ (a) => (t ? a.type !== "selection" : !0) && !a.fixed
68
+ );
69
+ ee.value = Array.from(R.value).concat(n).concat(T.value);
70
+ const l = H(n), s = H(R.value), u = H(T.value);
71
+ te.value = l.length, le.value = s.length, ne.value = u.length, L.value = Array.from(s).concat(l).concat(u), Z.value = R.value.length > 0 || T.value.length > 0;
72
+ }, ce = (e, t = !1) => {
73
+ e && se(), t ? o.state.doLayout() : o.state.debouncedUpdateLayout();
74
+ }, $ = (e) => z.value ? !!z.value[E(e, c.value)] : i.value.includes(e), K = ge(() => {
75
+ const e = /* @__PURE__ */ new Map();
76
+ if (!c.value || !S.value) return e;
77
+ let t = 0;
78
+ const n = (l) => {
79
+ X(l) && l.forEach((s) => {
80
+ const u = E(s, c.value);
81
+ e.set(u, t), t += 1;
82
+ const a = Q(s);
83
+ a.length && n(a);
84
+ });
85
+ };
86
+ return n(m.value || []), e;
87
+ }), F = (e = {}) => {
88
+ const { emitChange: t = !0 } = e;
89
+ if (g.checkStrictly.value || !c.value) {
90
+ O.value = {}, N = [];
91
+ return;
92
+ }
93
+ const n = c.value, l = e.rowIndexMap ?? K.value, s = S.value, u = /* @__PURE__ */ new WeakMap(), a = (C) => {
94
+ const p = u.get(C);
95
+ if (p) return p;
96
+ const w = E(C, n);
97
+ return u.set(C, w), w;
98
+ }, v = {}, h = [], d = new Set(
99
+ i.value.map((C) => a(C))
100
+ ), f = [];
101
+ let y = !1;
102
+ const et = (C, p, w) => {
103
+ const I = d.has(p);
104
+ w && !I ? (f.push(C), d.add(p), y = !0) : !w && I && (d.delete(p), y = !0);
105
+ }, he = (C) => {
106
+ let p = 0, w = 0;
107
+ return X(C) ? (C.forEach((I) => {
108
+ const P = a(I), pe = Q(I);
109
+ let j = 0, V = 0;
110
+ if (pe.length) {
111
+ const D = he(pe);
112
+ j = D.selectedCount, V = D.selectableCount;
113
+ }
114
+ const me = s ? s.call(null, I, l.get(P) ?? 0) : !0;
115
+ if (me && V > 0) {
116
+ const D = j === V;
117
+ !D && !(j === 0) && (v[P] = !0, h.push(I)), et(I, P, D);
118
+ }
119
+ me && (w += 1, d.has(P) && (p += 1)), p += j, w += V;
120
+ }), { selectedCount: p, selectableCount: w }) : { selectedCount: p, selectableCount: w };
121
+ };
122
+ if (he(m.value || []), y) {
123
+ const C = i.value.filter(
124
+ (p) => d.has(a(p))
125
+ );
126
+ f.forEach((p) => {
127
+ d.has(a(p)) && C.push(p);
128
+ }), i.value = C;
129
+ }
130
+ O.value = v, N = h, y && t && o.emit(
131
+ "selection-change",
132
+ i.value ? i.value.slice() : []
133
+ );
134
+ }, ke = () => {
135
+ M.value = !1;
136
+ const e = i.value;
137
+ i.value = [], O.value = {}, N = [], e.length && o.emit("selection-change", []);
138
+ }, ze = () => {
139
+ var t, n;
140
+ let e;
141
+ if (c.value) {
142
+ e = [];
143
+ const l = (n = (t = o == null ? void 0 : o.store) == null ? void 0 : t.states) == null ? void 0 : n.childrenColumnName.value, s = Ce(m.value, c.value, !0, l), { lazyTreeNodeMap: u } = o.store.states;
144
+ u.value && Object.entries(u.value).forEach(
145
+ ([a, v]) => {
146
+ s[a] && v.forEach((h) => {
147
+ const d = E(h, c.value);
148
+ s[d] || (s[d] = { row: h, index: -1 });
149
+ });
150
+ }
151
+ );
152
+ for (const a in z.value)
153
+ at(z.value, a) && !s[a] && e.push(z.value[a].row);
154
+ } else
155
+ e = i.value.filter((l) => !m.value.includes(l));
156
+ if (e.length) {
157
+ const l = i.value.filter(
158
+ (s) => !e.includes(s)
159
+ );
160
+ i.value = l, F({ emitChange: !1 }), o.emit("selection-change", [...l]);
161
+ }
162
+ }, Fe = () => (i.value || []).slice(), Le = () => N.slice(), _ = (e, t, n) => {
163
+ var d;
164
+ if (!c.value || g.checkStrictly.value || !g.lazy.value)
165
+ return;
166
+ const { lazyTreeNodeMap: l, childrenColumnName: s } = o.store.states, u = E(e, c.value), a = ((d = l.value) == null ? void 0 : d[u]) ?? [], v = e[s.value] ?? [], h = {
167
+ children: s.value,
168
+ checkStrictly: !1
169
+ };
170
+ for (const f of a) {
171
+ const y = n.get(E(f, c.value)) ?? 0;
172
+ B(
173
+ i.value,
174
+ f,
175
+ t,
176
+ h,
177
+ S.value,
178
+ y,
179
+ c.value
180
+ ), _(f, t, n);
181
+ }
182
+ for (const f of v)
183
+ _(f, t, n);
184
+ }, Oe = (e, t, n = !0, l = !1) => {
185
+ var a, v, h, d;
186
+ const s = {
187
+ children: (v = (a = o == null ? void 0 : o.store) == null ? void 0 : a.states) == null ? void 0 : v.childrenColumnName.value,
188
+ checkStrictly: (d = (h = o == null ? void 0 : o.store) == null ? void 0 : h.states) == null ? void 0 : d.checkStrictly.value
189
+ };
190
+ if (B(
191
+ i.value,
192
+ e,
193
+ t,
194
+ s,
195
+ l ? void 0 : S.value,
196
+ m.value.indexOf(e),
197
+ c.value
198
+ )) {
199
+ if (g.lazy.value && !g.checkStrictly.value) {
200
+ const y = t ?? $(e);
201
+ _(e, y, K.value), F({
202
+ emitChange: !1,
203
+ rowIndexMap: K.value
204
+ });
205
+ } else
206
+ F({ emitChange: !1 });
207
+ const f = (i.value || []).slice();
208
+ n && o.emit("select", f, e), o.emit("selection-change", f);
209
+ }
210
+ }, Te = () => {
211
+ var v, h;
212
+ const e = ae.value ? !M.value : !(M.value || i.value.length);
213
+ M.value = e;
214
+ let t = !1, n = 0;
215
+ const l = (h = (v = o == null ? void 0 : o.store) == null ? void 0 : v.states) == null ? void 0 : h.rowKey.value, { childrenColumnName: s } = o.store.states, u = {
216
+ children: s.value,
217
+ checkStrictly: !1
218
+ // Disable checkStrictly when selecting all
219
+ };
220
+ m.value.forEach((d, f) => {
221
+ const y = f + n;
222
+ B(
223
+ i.value,
224
+ d,
225
+ e,
226
+ u,
227
+ S.value,
228
+ y,
229
+ l
230
+ ) && (t = !0), n += ue(E(d, l));
231
+ });
232
+ const a = K.value;
233
+ if (g.lazy.value && !g.checkStrictly.value && l)
234
+ for (const d of Object.values(g.lazyTreeNodeMap.value))
235
+ for (const f of d) {
236
+ const y = a.get(E(f, l)) ?? 0;
237
+ B(
238
+ i.value,
239
+ f,
240
+ e,
241
+ u,
242
+ S.value,
243
+ y,
244
+ l
245
+ ) && (t = !0), _(f, e, a);
246
+ }
247
+ F({
248
+ emitChange: !1,
249
+ rowIndexMap: a
250
+ }), t && o.emit(
251
+ "selection-change",
252
+ i.value ? [...i.value] : []
253
+ ), o.emit("select-all", (i.value || []).slice());
254
+ }, G = () => {
255
+ var s;
256
+ if (((s = m.value) == null ? void 0 : s.length) === 0) {
257
+ M.value = !1;
258
+ return;
259
+ }
260
+ let e = 0, t = 0;
261
+ const n = (u) => {
262
+ for (const a of u) {
263
+ const v = S.value && S.value.call(null, a, e);
264
+ if ($(a))
265
+ t++;
266
+ else if (!S.value || v)
267
+ return !1;
268
+ e++;
269
+ const h = Q(a);
270
+ if (h.length && !n(h))
271
+ return !1;
272
+ }
273
+ return !0;
274
+ }, l = n(m.value || []);
275
+ M.value = t === 0 ? !1 : l;
276
+ }, Ae = (e) => {
277
+ if (!c.value) return !1;
278
+ const t = E(e, c.value);
279
+ return !!O.value[t];
280
+ }, ue = (e) => {
281
+ var s;
282
+ if (!o || !o.store) return 0;
283
+ const { treeData: t } = o.store.states;
284
+ let n = 0;
285
+ const l = (s = t.value[e]) == null ? void 0 : s.children;
286
+ return l && (n += l.length, l.forEach((u) => {
287
+ n += ue(u);
288
+ })), n;
289
+ }, Ne = (e, t) => {
290
+ const n = {};
291
+ return ot(e).forEach((l) => {
292
+ A.value[l.id] = t, n[l.columnKey || l.id] = t;
293
+ }), n;
294
+ }, re = (e, t, n) => {
295
+ k.value && k.value !== e && (k.value.order = null), k.value = e, W.value = t, q.value = n;
296
+ }, ie = () => {
297
+ let e = nt(Y);
298
+ Object.keys(A.value).forEach((t) => {
299
+ const n = A.value[t];
300
+ if (!n || n.length === 0) return;
301
+ const l = ct(
302
+ {
303
+ columns: L.value
304
+ },
305
+ t
306
+ );
307
+ l && l.filterMethod && (e = e.filter((s) => n.some(
308
+ (u) => l.filterMethod.call(null, u, s, l)
309
+ )));
310
+ }), U.value = e;
311
+ }, de = () => {
312
+ m.value = ft(U.value ?? [], {
313
+ sortingColumn: k.value,
314
+ sortProp: W.value,
315
+ sortOrder: q.value
316
+ });
317
+ }, Ke = (e = void 0) => {
318
+ e != null && e.filter || ie(), de();
319
+ }, _e = (e) => {
320
+ const { tableHeaderRef: t } = o.refs;
321
+ if (!t) return;
322
+ const n = Object.assign({}, t.filterPanels), l = Object.keys(n);
323
+ if (l.length)
324
+ if (ye(e) && (e = [e]), X(e)) {
325
+ const s = e.map(
326
+ (u) => st(
327
+ {
328
+ columns: L.value
329
+ },
330
+ u
331
+ )
332
+ );
333
+ l.forEach((u) => {
334
+ const a = s.find((v) => v.id === u);
335
+ a && (a.filteredValue = []);
336
+ }), o.store.commit("filterChange", {
337
+ column: s,
338
+ values: [],
339
+ silent: !0,
340
+ multi: !0
341
+ });
342
+ } else
343
+ l.forEach((s) => {
344
+ const u = L.value.find((a) => a.id === s);
345
+ u && (u.filteredValue = []);
346
+ }), A.value = {}, o.store.commit("filterChange", {
347
+ column: {},
348
+ values: [],
349
+ silent: !0
350
+ });
351
+ }, De = () => {
352
+ k.value && (re(null, null, null), o.store.commit("changeSortCondition", {
353
+ silent: !0
354
+ }));
355
+ }, {
356
+ setExpandRowKeys: Pe,
357
+ toggleRowExpansion: fe,
358
+ updateExpandRows: je,
359
+ states: Ve,
360
+ isRowExpanded: Be
361
+ } = rt({
362
+ data: m,
363
+ rowKey: c
364
+ }), {
365
+ updateTreeExpandKeys: He,
366
+ toggleTreeExpansion: Ue,
367
+ updateTreeData: We,
368
+ updateKeyChildren: qe,
369
+ loadOrToggle: Qe,
370
+ states: g
371
+ } = dt({
372
+ data: m,
373
+ rowKey: c
374
+ }), {
375
+ updateCurrentRowData: $e,
376
+ updateCurrentRow: Ge,
377
+ setCurrentRowKey: Je,
378
+ states: Xe
379
+ } = it({
380
+ data: m,
381
+ rowKey: c
382
+ }), Ye = (e) => {
383
+ Pe(e), He(e);
384
+ }, Ze = (e, t) => {
385
+ L.value.some(({ type: l }) => l === "expand") ? fe(e, t) : Ue(e, t);
386
+ };
387
+ return J(
388
+ () => g.checkStrictly.value,
389
+ (e) => {
390
+ e ? (O.value = {}, N = []) : F({ emitChange: !1 }), G();
391
+ }
392
+ ), J(
393
+ () => g.lazyTreeNodeMap.value,
394
+ () => {
395
+ var l;
396
+ if (!g.lazy.value || g.checkStrictly.value || !c.value)
397
+ return;
398
+ const e = K.value, t = i.value.length;
399
+ for (const s of Object.keys(g.lazyTreeNodeMap.value))
400
+ (l = z.value) != null && l[s] && _(
401
+ z.value[s].row,
402
+ !0,
403
+ e
404
+ );
405
+ const n = i.value.length !== t;
406
+ F({
407
+ emitChange: !n,
408
+ rowIndexMap: e
409
+ }), G(), n && o.emit("selection-change", [...i.value]);
410
+ }
411
+ ), {
412
+ assertRowKey: Me,
413
+ updateColumns: se,
414
+ scheduleLayout: ce,
415
+ isSelected: $,
416
+ clearSelection: ke,
417
+ cleanSelection: ze,
418
+ getSelectionRows: Fe,
419
+ getHalfSelectionRows: Le,
420
+ toggleRowSelection: Oe,
421
+ _toggleAllSelection: Te,
422
+ toggleAllSelection: null,
423
+ updateAllSelected: G,
424
+ updateSelectionByChildren: F,
425
+ getRowIndeterminate: Ae,
426
+ updateFilters: Ne,
427
+ updateCurrentRow: Ge,
428
+ updateSort: re,
429
+ execFilter: ie,
430
+ execSort: de,
431
+ execQuery: Ke,
432
+ clearFilter: _e,
433
+ clearSort: De,
434
+ toggleRowExpansion: fe,
435
+ setExpandRowKeysAdapter: Ye,
436
+ setCurrentRowKey: Je,
437
+ toggleRowExpansionAdapter: Ze,
438
+ isRowExpanded: Be,
439
+ updateExpandRows: je,
440
+ updateCurrentRowData: $e,
441
+ loadOrToggle: Qe,
442
+ updateTreeData: We,
443
+ updateKeyChildren: qe,
444
+ states: {
445
+ tableSize: x,
446
+ rowKey: c,
447
+ data: m,
448
+ _data: Y,
449
+ isComplex: Z,
450
+ _columns: b,
451
+ originColumns: ee,
452
+ columns: L,
453
+ fixedColumns: R,
454
+ rightFixedColumns: T,
455
+ leafColumns: xe,
456
+ fixedLeafColumns: Se,
457
+ rightFixedLeafColumns: we,
458
+ updateOrderFns: Ee,
459
+ leafColumnsLength: te,
460
+ fixedLeafColumnsLength: le,
461
+ rightFixedLeafColumnsLength: ne,
462
+ isAllSelected: M,
463
+ selection: i,
464
+ selectionIndeterminate: O,
465
+ reserveSelection: Re,
466
+ selectOnIndeterminate: ae,
467
+ selectable: S,
468
+ rowExpandable: Ie,
469
+ filters: A,
470
+ filteredData: U,
471
+ sortingColumn: k,
472
+ sortProp: W,
473
+ sortOrder: q,
474
+ hoverRow: be,
475
+ ...Ve,
476
+ ...g,
477
+ ...Xe
478
+ }
479
+ };
480
+ }
481
+ export {
482
+ Et as default
483
+ };