@stonecrop/atable 0.4.2 → 0.4.4
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.
- package/dist/assets/index.css +1 -1
- package/dist/atable.d.ts +6 -0
- package/dist/atable.js +418 -396
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/ACell.vue +16 -2
- package/src/components/AExpansionRow.vue +7 -0
- package/src/components/ARow.vue +16 -2
- package/src/components/ATableLoading.vue +86 -0
- package/src/components/ATableLoadingBar.vue +81 -0
- package/src/index.ts +5 -1
package/dist/atable.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { onMounted as G, ref as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import './assets/index.css';function
|
|
4
|
-
return
|
|
1
|
+
import { onMounted as G, ref as y, watch as L, onBeforeUnmount as Je, computed as k, unref as g, getCurrentScope as Le, onScopeDispose as Pe, getCurrentInstance as fe, nextTick as We, toRef as Qe, readonly as Ze, customRef as Ke, defineComponent as V, useTemplateRef as J, openBlock as C, createElementBlock as I, normalizeStyle as z, normalizeClass as F, createBlock as te, resolveDynamicComponent as De, mergeProps as me, toDisplayString as Y, Fragment as oe, createElementVNode as P, renderSlot as R, createCommentVNode as U, withDirectives as ie, vShow as He, renderList as ce, createTextVNode as _e, createVNode as Ce, withCtx as ke } from "vue";
|
|
2
|
+
import { defineStore as et } from "pinia";
|
|
3
|
+
import './assets/index.css';function Ne(e) {
|
|
4
|
+
return Le() ? (Pe(e), !0) : !1;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return typeof e == "function" ? e() :
|
|
6
|
+
function ve(e) {
|
|
7
|
+
return typeof e == "function" ? e() : g(e);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const tt = typeof window < "u" && typeof document < "u";
|
|
10
10
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
11
|
-
const
|
|
12
|
-
}, Q =
|
|
11
|
+
const nt = (e) => e != null, ot = Object.prototype.toString, lt = (e) => ot.call(e) === "[object Object]", rt = () => {
|
|
12
|
+
}, Q = tt ? window : void 0;
|
|
13
13
|
function X(e) {
|
|
14
14
|
var t;
|
|
15
|
-
const n =
|
|
15
|
+
const n = ve(e);
|
|
16
16
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
17
17
|
}
|
|
18
18
|
function q(...e) {
|
|
19
19
|
let t, n, o, a;
|
|
20
20
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, a] = e, t = Q) : [t, n, o, a] = e, !t)
|
|
21
|
-
return
|
|
21
|
+
return rt;
|
|
22
22
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
23
23
|
const i = [], l = () => {
|
|
24
24
|
i.forEach((c) => c()), i.length = 0;
|
|
25
|
-
}, r = (c, u, f, m) => (c.addEventListener(u, f, m), () => c.removeEventListener(u, f, m)), d =
|
|
26
|
-
() => [X(t),
|
|
25
|
+
}, r = (c, u, f, m) => (c.addEventListener(u, f, m), () => c.removeEventListener(u, f, m)), d = L(
|
|
26
|
+
() => [X(t), ve(a)],
|
|
27
27
|
([c, u]) => {
|
|
28
28
|
if (l(), !c)
|
|
29
29
|
return;
|
|
30
|
-
const f =
|
|
30
|
+
const f = lt(u) ? { ...u } : u;
|
|
31
31
|
i.push(
|
|
32
|
-
...n.flatMap((m) => o.map((
|
|
32
|
+
...n.flatMap((m) => o.map((x) => r(c, m, x, f)))
|
|
33
33
|
);
|
|
34
34
|
},
|
|
35
35
|
{ immediate: !0, flush: "post" }
|
|
36
36
|
), s = () => {
|
|
37
37
|
d(), l();
|
|
38
38
|
};
|
|
39
|
-
return
|
|
39
|
+
return Ne(s), s;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const e =
|
|
41
|
+
function st() {
|
|
42
|
+
const e = y(!1), t = fe();
|
|
43
43
|
return t && G(() => {
|
|
44
44
|
e.value = !0;
|
|
45
45
|
}, t), e;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
const t =
|
|
47
|
+
function at(e) {
|
|
48
|
+
const t = st();
|
|
49
49
|
return k(() => (t.value, !!e()));
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function it(e, t, n = {}) {
|
|
52
52
|
const { window: o = Q, ...a } = n;
|
|
53
53
|
let i;
|
|
54
|
-
const l =
|
|
54
|
+
const l = at(() => o && "MutationObserver" in o), r = () => {
|
|
55
55
|
i && (i.disconnect(), i = void 0);
|
|
56
56
|
}, d = k(() => {
|
|
57
|
-
const f =
|
|
57
|
+
const f = ve(e), m = (Array.isArray(f) ? f : [f]).map(X).filter(nt);
|
|
58
58
|
return new Set(m);
|
|
59
|
-
}), s =
|
|
59
|
+
}), s = L(
|
|
60
60
|
() => d.value,
|
|
61
61
|
(f) => {
|
|
62
62
|
r(), l.value && f.size && (i = new MutationObserver(t), f.forEach((m) => i.observe(m, a)));
|
|
@@ -65,13 +65,13 @@ function at(e, t, n = {}) {
|
|
|
65
65
|
), c = () => i == null ? void 0 : i.takeRecords(), u = () => {
|
|
66
66
|
s(), r();
|
|
67
67
|
};
|
|
68
|
-
return
|
|
68
|
+
return Ne(u), {
|
|
69
69
|
isSupported: l,
|
|
70
70
|
stop: u,
|
|
71
71
|
takeRecords: c
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function ct(e = {}) {
|
|
75
75
|
var t;
|
|
76
76
|
const {
|
|
77
77
|
window: n = Q,
|
|
@@ -84,12 +84,12 @@ function it(e = {}) {
|
|
|
84
84
|
for (; c != null && c.shadowRoot; )
|
|
85
85
|
c = (s = c == null ? void 0 : c.shadowRoot) == null ? void 0 : s.activeElement;
|
|
86
86
|
return c;
|
|
87
|
-
}, r =
|
|
87
|
+
}, r = y(), d = () => {
|
|
88
88
|
r.value = l();
|
|
89
89
|
};
|
|
90
90
|
return n && (q(n, "blur", (s) => {
|
|
91
91
|
s.relatedTarget === null && d();
|
|
92
|
-
}, !0), q(n, "focus", d, !0)), a &&
|
|
92
|
+
}, !0), q(n, "focus", d, !0)), a && it(i, (s) => {
|
|
93
93
|
s.filter((c) => c.removedNodes.length).map((c) => Array.from(c.removedNodes)).flat().forEach((c) => {
|
|
94
94
|
c === r.value && d();
|
|
95
95
|
});
|
|
@@ -98,13 +98,13 @@ function it(e = {}) {
|
|
|
98
98
|
subtree: !0
|
|
99
99
|
}), d(), r;
|
|
100
100
|
}
|
|
101
|
-
const
|
|
102
|
-
function
|
|
103
|
-
const { window: n = Q } = t, o = k(() => X(e)), a =
|
|
104
|
-
return !n || !l.value ? { focused: i } : (q(o,
|
|
101
|
+
const ut = "focusin", dt = "focusout";
|
|
102
|
+
function ft(e, t = {}) {
|
|
103
|
+
const { window: n = Q } = t, o = k(() => X(e)), a = y(!1), i = k(() => a.value), l = ct(t);
|
|
104
|
+
return !n || !l.value ? { focused: i } : (q(o, ut, () => a.value = !0), q(o, dt, () => a.value = !1), { focused: i });
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
const o =
|
|
106
|
+
function mt(e, { window: t = Q, scrollTarget: n } = {}) {
|
|
107
|
+
const o = y(!1), a = () => {
|
|
108
108
|
if (!t) return;
|
|
109
109
|
const i = t.document, l = X(e);
|
|
110
110
|
if (!l)
|
|
@@ -114,7 +114,7 @@ function ft(e, { window: t = Q, scrollTarget: n } = {}) {
|
|
|
114
114
|
o.value = r.top <= (t.innerHeight || i.documentElement.clientHeight) && r.left <= (t.innerWidth || i.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
|
-
return
|
|
117
|
+
return L(
|
|
118
118
|
() => X(e),
|
|
119
119
|
() => a(),
|
|
120
120
|
{ immediate: !0, flush: "post" }
|
|
@@ -123,13 +123,13 @@ function ft(e, { window: t = Q, scrollTarget: n } = {}) {
|
|
|
123
123
|
passive: !0
|
|
124
124
|
}), o;
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
let t =
|
|
126
|
+
const W = (e) => {
|
|
127
|
+
let t = mt(e).value;
|
|
128
128
|
return t = t && e.offsetHeight > 0, t;
|
|
129
|
-
},
|
|
129
|
+
}, D = (e) => e.tabIndex >= 0, Ae = (e) => {
|
|
130
130
|
const t = e.target;
|
|
131
|
-
return
|
|
132
|
-
},
|
|
131
|
+
return pe(t);
|
|
132
|
+
}, pe = (e) => {
|
|
133
133
|
var t;
|
|
134
134
|
let n;
|
|
135
135
|
if (e instanceof HTMLTableCellElement) {
|
|
@@ -142,8 +142,8 @@ const L = (e) => {
|
|
|
142
142
|
const o = e.previousElementSibling;
|
|
143
143
|
o && (n = o);
|
|
144
144
|
}
|
|
145
|
-
return n && (!
|
|
146
|
-
},
|
|
145
|
+
return n && (!D(n) || !W(n)) ? pe(n) : n;
|
|
146
|
+
}, vt = (e) => {
|
|
147
147
|
var t;
|
|
148
148
|
const n = e.target;
|
|
149
149
|
let o;
|
|
@@ -160,11 +160,11 @@ const L = (e) => {
|
|
|
160
160
|
i && (o = i);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
return o && (!
|
|
164
|
-
},
|
|
163
|
+
return o && (!D(o) || !W(o)) ? he(o) : o;
|
|
164
|
+
}, Ie = (e) => {
|
|
165
165
|
const t = e.target;
|
|
166
|
-
return
|
|
167
|
-
},
|
|
166
|
+
return he(t);
|
|
167
|
+
}, he = (e) => {
|
|
168
168
|
var t;
|
|
169
169
|
let n;
|
|
170
170
|
if (e instanceof HTMLTableCellElement) {
|
|
@@ -177,8 +177,8 @@ const L = (e) => {
|
|
|
177
177
|
const o = e.nextElementSibling;
|
|
178
178
|
o && (n = o);
|
|
179
179
|
}
|
|
180
|
-
return n && (!
|
|
181
|
-
},
|
|
180
|
+
return n && (!D(n) || !W(n)) ? he(n) : n;
|
|
181
|
+
}, pt = (e) => {
|
|
182
182
|
var t;
|
|
183
183
|
const n = e.target;
|
|
184
184
|
let o;
|
|
@@ -195,11 +195,11 @@ const L = (e) => {
|
|
|
195
195
|
i && (o = i);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
return o && (!
|
|
199
|
-
},
|
|
198
|
+
return o && (!D(o) || !W(o)) ? pe(o) : o;
|
|
199
|
+
}, $e = (e) => {
|
|
200
200
|
const t = e.target;
|
|
201
|
-
return
|
|
202
|
-
},
|
|
201
|
+
return we(t);
|
|
202
|
+
}, we = (e) => {
|
|
203
203
|
var t;
|
|
204
204
|
let n;
|
|
205
205
|
if (e.previousElementSibling)
|
|
@@ -208,11 +208,11 @@ const L = (e) => {
|
|
|
208
208
|
const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
209
209
|
n = o == null ? void 0 : o.lastElementChild;
|
|
210
210
|
}
|
|
211
|
-
return n && (!
|
|
212
|
-
},
|
|
211
|
+
return n && (!D(n) || !W(n)) ? we(n) : n;
|
|
212
|
+
}, Se = (e) => {
|
|
213
213
|
const t = e.target;
|
|
214
|
-
return
|
|
215
|
-
},
|
|
214
|
+
return ge(t);
|
|
215
|
+
}, ge = (e) => {
|
|
216
216
|
var t;
|
|
217
217
|
let n;
|
|
218
218
|
if (e.nextElementSibling)
|
|
@@ -221,83 +221,83 @@ const L = (e) => {
|
|
|
221
221
|
const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
222
222
|
n = o == null ? void 0 : o.firstElementChild;
|
|
223
223
|
}
|
|
224
|
-
return n && (!
|
|
225
|
-
}, Se = (e) => {
|
|
226
|
-
const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
|
|
227
|
-
return n && (!P(n) || !L(n)) ? he(n) : n;
|
|
224
|
+
return n && (!D(n) || !W(n)) ? ge(n) : n;
|
|
228
225
|
}, Te = (e) => {
|
|
226
|
+
const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
|
|
227
|
+
return n && (!D(n) || !W(n)) ? ge(n) : n;
|
|
228
|
+
}, Me = (e) => {
|
|
229
229
|
const t = e.target.parentElement, n = t == null ? void 0 : t.lastElementChild;
|
|
230
|
-
return n && (!
|
|
231
|
-
},
|
|
230
|
+
return n && (!D(n) || !W(n)) ? we(n) : n;
|
|
231
|
+
}, ee = ["alt", "control", "shift", "meta"], ht = {
|
|
232
232
|
ArrowUp: "up",
|
|
233
233
|
ArrowDown: "down",
|
|
234
234
|
ArrowLeft: "left",
|
|
235
235
|
ArrowRight: "right"
|
|
236
|
-
},
|
|
236
|
+
}, ye = {
|
|
237
237
|
"keydown.up": (e) => {
|
|
238
|
-
const t =
|
|
238
|
+
const t = Ae(e);
|
|
239
239
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
240
240
|
},
|
|
241
241
|
"keydown.down": (e) => {
|
|
242
|
-
const t =
|
|
242
|
+
const t = Ie(e);
|
|
243
243
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
244
244
|
},
|
|
245
245
|
"keydown.left": (e) => {
|
|
246
|
-
const t =
|
|
246
|
+
const t = $e(e);
|
|
247
247
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
248
248
|
},
|
|
249
249
|
"keydown.right": (e) => {
|
|
250
|
-
const t =
|
|
250
|
+
const t = Se(e);
|
|
251
251
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
252
252
|
},
|
|
253
253
|
"keydown.control.up": (e) => {
|
|
254
|
-
const t =
|
|
254
|
+
const t = vt(e);
|
|
255
255
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
256
256
|
},
|
|
257
257
|
"keydown.control.down": (e) => {
|
|
258
|
-
const t =
|
|
258
|
+
const t = pt(e);
|
|
259
259
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
260
260
|
},
|
|
261
261
|
"keydown.control.left": (e) => {
|
|
262
|
-
const t =
|
|
262
|
+
const t = Te(e);
|
|
263
263
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
264
264
|
},
|
|
265
265
|
"keydown.control.right": (e) => {
|
|
266
|
-
const t =
|
|
266
|
+
const t = Me(e);
|
|
267
267
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
268
268
|
},
|
|
269
269
|
"keydown.end": (e) => {
|
|
270
|
-
const t =
|
|
270
|
+
const t = Me(e);
|
|
271
271
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
272
272
|
},
|
|
273
273
|
"keydown.enter": (e) => {
|
|
274
274
|
if (e.target instanceof HTMLTableCellElement) {
|
|
275
275
|
e.preventDefault(), e.stopPropagation();
|
|
276
|
-
const t =
|
|
276
|
+
const t = Ie(e);
|
|
277
277
|
t && t.focus();
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
280
|
"keydown.shift.enter": (e) => {
|
|
281
281
|
if (e.target instanceof HTMLTableCellElement) {
|
|
282
282
|
e.preventDefault(), e.stopPropagation();
|
|
283
|
-
const t =
|
|
283
|
+
const t = Ae(e);
|
|
284
284
|
t && t.focus();
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
"keydown.home": (e) => {
|
|
288
|
-
const t =
|
|
288
|
+
const t = Te(e);
|
|
289
289
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
290
290
|
},
|
|
291
291
|
"keydown.tab": (e) => {
|
|
292
|
-
const t =
|
|
292
|
+
const t = Se(e);
|
|
293
293
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
294
294
|
},
|
|
295
295
|
"keydown.shift.tab": (e) => {
|
|
296
|
-
const t =
|
|
296
|
+
const t = $e(e);
|
|
297
297
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
|
-
function
|
|
300
|
+
function be(e) {
|
|
301
301
|
const t = (l) => {
|
|
302
302
|
let r = null;
|
|
303
303
|
return l.parent && (typeof l.parent == "string" ? r = document.querySelector(l.parent) : l.parent instanceof HTMLElement ? r = l.parent : r = l.parent.value), r;
|
|
@@ -322,28 +322,28 @@ function ge(e) {
|
|
|
322
322
|
}, o = (l) => {
|
|
323
323
|
const r = t(l);
|
|
324
324
|
let d = [];
|
|
325
|
-
return l.selectors ? d = n(l) : r && (d = Array.from(r.children).filter((s) =>
|
|
325
|
+
return l.selectors ? d = n(l) : r && (d = Array.from(r.children).filter((s) => D(s) && W(s))), d;
|
|
326
326
|
}, a = (l) => (r) => {
|
|
327
|
-
const d =
|
|
328
|
-
if (
|
|
329
|
-
const s = l.handlers ||
|
|
327
|
+
const d = ht[r.key] || r.key.toLowerCase();
|
|
328
|
+
if (ee.includes(d)) return;
|
|
329
|
+
const s = l.handlers || ye;
|
|
330
330
|
for (const c of Object.keys(s)) {
|
|
331
331
|
const [u, ...f] = c.split(".");
|
|
332
332
|
if (u === "keydown" && f.includes(d)) {
|
|
333
|
-
const m = s[c],
|
|
334
|
-
const
|
|
335
|
-
return r.getModifierState(
|
|
333
|
+
const m = s[c], x = f.filter((p) => ee.includes(p)), v = ee.some((p) => {
|
|
334
|
+
const E = p.charAt(0).toUpperCase() + p.slice(1);
|
|
335
|
+
return r.getModifierState(E);
|
|
336
336
|
});
|
|
337
|
-
if (
|
|
338
|
-
if (
|
|
339
|
-
for (const
|
|
340
|
-
if (f.includes(
|
|
341
|
-
const
|
|
342
|
-
r.getModifierState(
|
|
337
|
+
if (x.length > 0) {
|
|
338
|
+
if (v) {
|
|
339
|
+
for (const p of ee)
|
|
340
|
+
if (f.includes(p)) {
|
|
341
|
+
const E = p.charAt(0).toUpperCase() + p.slice(1);
|
|
342
|
+
r.getModifierState(E) && m(r);
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
} else
|
|
346
|
-
|
|
346
|
+
v || m(r);
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}, i = [];
|
|
@@ -351,64 +351,64 @@ function ge(e) {
|
|
|
351
351
|
for (const l of e) {
|
|
352
352
|
const r = t(l), d = o(l), s = a(l), c = r ? [r] : d;
|
|
353
353
|
for (const u of c) {
|
|
354
|
-
const { focused: f } =
|
|
355
|
-
|
|
354
|
+
const { focused: f } = ft(y(u)), m = L(f, (x) => {
|
|
355
|
+
x ? u.addEventListener("keydown", s) : u.removeEventListener("keydown", s);
|
|
356
356
|
});
|
|
357
357
|
i.push(m);
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
}),
|
|
360
|
+
}), Je(() => {
|
|
361
361
|
for (const l of i)
|
|
362
362
|
l();
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
function Z(e) {
|
|
366
|
-
return
|
|
366
|
+
return Le() ? (Pe(e), !0) : !1;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
return typeof e == "function" ? e() :
|
|
368
|
+
function O(e) {
|
|
369
|
+
return typeof e == "function" ? e() : g(e);
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const xe = typeof window < "u" && typeof document < "u";
|
|
372
372
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
373
|
-
const
|
|
374
|
-
},
|
|
375
|
-
function
|
|
373
|
+
const wt = (e) => e != null, gt = Object.prototype.toString, Ve = (e) => gt.call(e) === "[object Object]", H = () => {
|
|
374
|
+
}, ue = /* @__PURE__ */ yt();
|
|
375
|
+
function yt() {
|
|
376
376
|
var e, t;
|
|
377
|
-
return
|
|
377
|
+
return xe && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
379
|
+
function bt(e) {
|
|
380
|
+
return fe();
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function xt(...e) {
|
|
383
383
|
if (e.length !== 1)
|
|
384
|
-
return
|
|
384
|
+
return Qe(...e);
|
|
385
385
|
const t = e[0];
|
|
386
|
-
return typeof t == "function" ?
|
|
386
|
+
return typeof t == "function" ? Ze(Ke(() => ({ get: t, set: H }))) : y(t);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
|
|
388
|
+
function Et(e, t = !0, n) {
|
|
389
|
+
bt() ? G(e, n) : t ? e() : We(e);
|
|
390
390
|
}
|
|
391
|
-
const
|
|
392
|
-
function
|
|
391
|
+
const le = xe ? window : void 0;
|
|
392
|
+
function N(e) {
|
|
393
393
|
var t;
|
|
394
|
-
const n =
|
|
394
|
+
const n = O(e);
|
|
395
395
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function de(...e) {
|
|
398
398
|
let t, n, o, a;
|
|
399
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, a] = e, t =
|
|
400
|
-
return
|
|
399
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, a] = e, t = le) : [t, n, o, a] = e, !t)
|
|
400
|
+
return H;
|
|
401
401
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
402
402
|
const i = [], l = () => {
|
|
403
403
|
i.forEach((c) => c()), i.length = 0;
|
|
404
|
-
}, r = (c, u, f, m) => (c.addEventListener(u, f, m), () => c.removeEventListener(u, f, m)), d =
|
|
405
|
-
() => [
|
|
404
|
+
}, r = (c, u, f, m) => (c.addEventListener(u, f, m), () => c.removeEventListener(u, f, m)), d = L(
|
|
405
|
+
() => [N(t), O(a)],
|
|
406
406
|
([c, u]) => {
|
|
407
407
|
if (l(), !c)
|
|
408
408
|
return;
|
|
409
|
-
const f =
|
|
409
|
+
const f = Ve(u) ? { ...u } : u;
|
|
410
410
|
i.push(
|
|
411
|
-
...n.flatMap((m) => o.map((
|
|
411
|
+
...n.flatMap((m) => o.map((x) => r(c, m, x, f)))
|
|
412
412
|
);
|
|
413
413
|
},
|
|
414
414
|
{ immediate: !0, flush: "post" }
|
|
@@ -417,25 +417,25 @@ function ce(...e) {
|
|
|
417
417
|
};
|
|
418
418
|
return Z(s), s;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
const e =
|
|
420
|
+
function Ct() {
|
|
421
|
+
const e = y(!1), t = fe();
|
|
422
422
|
return t && G(() => {
|
|
423
423
|
e.value = !0;
|
|
424
424
|
}, t), e;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
const t =
|
|
426
|
+
function je(e) {
|
|
427
|
+
const t = Ct();
|
|
428
428
|
return k(() => (t.value, !!e()));
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
const { window: o =
|
|
430
|
+
function Be(e, t, n = {}) {
|
|
431
|
+
const { window: o = le, ...a } = n;
|
|
432
432
|
let i;
|
|
433
|
-
const l =
|
|
433
|
+
const l = je(() => o && "MutationObserver" in o), r = () => {
|
|
434
434
|
i && (i.disconnect(), i = void 0);
|
|
435
435
|
}, d = k(() => {
|
|
436
|
-
const f =
|
|
436
|
+
const f = O(e), m = (Array.isArray(f) ? f : [f]).map(N).filter(wt);
|
|
437
437
|
return new Set(m);
|
|
438
|
-
}), s =
|
|
438
|
+
}), s = L(
|
|
439
439
|
() => d.value,
|
|
440
440
|
(f) => {
|
|
441
441
|
r(), l.value && f.size && (i = new MutationObserver(t), f.forEach((m) => i.observe(m, a)));
|
|
@@ -450,15 +450,15 @@ function Ve(e, t, n = {}) {
|
|
|
450
450
|
takeRecords: c
|
|
451
451
|
};
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
const { window: o =
|
|
453
|
+
function kt(e, t, n = {}) {
|
|
454
|
+
const { window: o = le, ...a } = n;
|
|
455
455
|
let i;
|
|
456
|
-
const l =
|
|
456
|
+
const l = je(() => o && "ResizeObserver" in o), r = () => {
|
|
457
457
|
i && (i.disconnect(), i = void 0);
|
|
458
458
|
}, d = k(() => {
|
|
459
|
-
const u =
|
|
460
|
-
return Array.isArray(u) ? u.map((f) =>
|
|
461
|
-
}), s =
|
|
459
|
+
const u = O(e);
|
|
460
|
+
return Array.isArray(u) ? u.map((f) => N(f)) : [N(u)];
|
|
461
|
+
}), s = L(
|
|
462
462
|
d,
|
|
463
463
|
(u) => {
|
|
464
464
|
if (r(), l.value && o) {
|
|
@@ -476,30 +476,30 @@ function Ct(e, t, n = {}) {
|
|
|
476
476
|
stop: c
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function ze(e, t = {}) {
|
|
480
480
|
const {
|
|
481
481
|
reset: n = !0,
|
|
482
482
|
windowResize: o = !0,
|
|
483
483
|
windowScroll: a = !0,
|
|
484
484
|
immediate: i = !0,
|
|
485
485
|
updateTiming: l = "sync"
|
|
486
|
-
} = t, r =
|
|
487
|
-
function
|
|
488
|
-
const
|
|
489
|
-
if (!
|
|
490
|
-
n && (r.value = 0, d.value = 0, s.value = 0, c.value = 0, u.value = 0, f.value = 0, m.value = 0,
|
|
486
|
+
} = t, r = y(0), d = y(0), s = y(0), c = y(0), u = y(0), f = y(0), m = y(0), x = y(0);
|
|
487
|
+
function v() {
|
|
488
|
+
const E = N(e);
|
|
489
|
+
if (!E) {
|
|
490
|
+
n && (r.value = 0, d.value = 0, s.value = 0, c.value = 0, u.value = 0, f.value = 0, m.value = 0, x.value = 0);
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
|
-
const
|
|
494
|
-
r.value =
|
|
493
|
+
const b = E.getBoundingClientRect();
|
|
494
|
+
r.value = b.height, d.value = b.bottom, s.value = b.left, c.value = b.right, u.value = b.top, f.value = b.width, m.value = b.x, x.value = b.y;
|
|
495
495
|
}
|
|
496
|
-
function
|
|
497
|
-
l === "sync" ?
|
|
496
|
+
function p() {
|
|
497
|
+
l === "sync" ? v() : l === "next-frame" && requestAnimationFrame(() => v());
|
|
498
498
|
}
|
|
499
|
-
return
|
|
499
|
+
return kt(e, p), L(() => N(e), (E) => !E && p()), Be(e, p, {
|
|
500
500
|
attributeFilter: ["style", "class"]
|
|
501
|
-
}), a &&
|
|
502
|
-
i &&
|
|
501
|
+
}), a && de("scroll", p, { capture: !0, passive: !0 }), o && de("resize", p, { passive: !0 }), Et(() => {
|
|
502
|
+
i && p();
|
|
503
503
|
}), {
|
|
504
504
|
height: r,
|
|
505
505
|
bottom: d,
|
|
@@ -508,18 +508,18 @@ function je(e, t = {}) {
|
|
|
508
508
|
top: u,
|
|
509
509
|
width: f,
|
|
510
510
|
x: m,
|
|
511
|
-
y:
|
|
512
|
-
update:
|
|
511
|
+
y: x,
|
|
512
|
+
update: p
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
const { window: t =
|
|
515
|
+
function At(e = {}) {
|
|
516
|
+
const { window: t = le, behavior: n = "auto" } = e;
|
|
517
517
|
if (!t)
|
|
518
518
|
return {
|
|
519
|
-
x:
|
|
520
|
-
y:
|
|
519
|
+
x: y(0),
|
|
520
|
+
y: y(0)
|
|
521
521
|
};
|
|
522
|
-
const o =
|
|
522
|
+
const o = y(t.scrollX), a = y(t.scrollY), i = k({
|
|
523
523
|
get() {
|
|
524
524
|
return o.value;
|
|
525
525
|
},
|
|
@@ -534,7 +534,7 @@ function kt(e = {}) {
|
|
|
534
534
|
scrollTo({ top: r, behavior: n });
|
|
535
535
|
}
|
|
536
536
|
});
|
|
537
|
-
return
|
|
537
|
+
return de(
|
|
538
538
|
t,
|
|
539
539
|
"scroll",
|
|
540
540
|
() => {
|
|
@@ -546,10 +546,10 @@ function kt(e = {}) {
|
|
|
546
546
|
}
|
|
547
547
|
), { x: i, y: l };
|
|
548
548
|
}
|
|
549
|
-
const
|
|
549
|
+
const It = (e) => {
|
|
550
550
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
551
551
|
return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
|
|
552
|
-
},
|
|
552
|
+
}, $t = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), St = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Tt = ["innerHTML"], Mt = { key: 2 }, Fe = /* @__PURE__ */ V({
|
|
553
553
|
__name: "ACell",
|
|
554
554
|
props: {
|
|
555
555
|
colIndex: {},
|
|
@@ -557,75 +557,77 @@ const At = (e) => {
|
|
|
557
557
|
store: {},
|
|
558
558
|
addNavigation: { type: [Boolean, Object], default: !0 },
|
|
559
559
|
tabIndex: { default: 0 },
|
|
560
|
-
pinned: { type: Boolean }
|
|
560
|
+
pinned: { type: Boolean, default: !1 }
|
|
561
561
|
},
|
|
562
562
|
emits: ["cellInput"],
|
|
563
563
|
setup(e, { emit: t }) {
|
|
564
|
-
const n = t, o = J("cell"), a = e.store.getCellData(e.colIndex, e.rowIndex), i =
|
|
565
|
-
var
|
|
564
|
+
const n = t, o = J("cell"), a = e.store.getCellData(e.colIndex, e.rowIndex), i = y(""), l = y(!1), r = e.store.columns[e.colIndex], d = e.store.rows[e.rowIndex], s = r.align || "center", c = r.width || "40ch", u = k(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), f = k(() => typeof u.value == "string" ? It(u.value) : !1), m = k(() => {
|
|
565
|
+
var b;
|
|
566
566
|
return {
|
|
567
567
|
textAlign: s,
|
|
568
568
|
width: c,
|
|
569
|
-
backgroundColor: l.value ? "var(--sc-cell-changed-color)" : "inherit",
|
|
570
569
|
fontWeight: l.value ? "bold" : "inherit",
|
|
571
|
-
paddingLeft: e.store.getIndent(e.colIndex, (
|
|
570
|
+
paddingLeft: e.store.getIndent(e.colIndex, (b = e.store.display[e.rowIndex]) == null ? void 0 : b.indent)
|
|
572
571
|
};
|
|
573
|
-
}),
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
572
|
+
}), x = k(() => ({
|
|
573
|
+
"sticky-column": e.pinned,
|
|
574
|
+
"cell-modified": l.value
|
|
575
|
+
})), v = () => {
|
|
576
|
+
const { left: b, bottom: S, width: re, height: _ } = ze(o);
|
|
577
|
+
r.mask, r.modalComponent && e.store.$patch((M) => {
|
|
578
|
+
M.modal.visible = !0, M.modal.colIndex = e.colIndex, M.modal.rowIndex = e.rowIndex, M.modal.left = b, M.modal.bottom = S, M.modal.width = re, M.modal.height = _, typeof r.modalComponent == "function" ? M.modal.component = r.modalComponent({ table: M.table, row: d, column: r }) : M.modal.component = r.modalComponent, M.modal.componentProps = r.modalComponentExtraProps;
|
|
577
579
|
});
|
|
578
580
|
};
|
|
579
581
|
if (e.addNavigation) {
|
|
580
|
-
let
|
|
581
|
-
...
|
|
582
|
-
"keydown.f2":
|
|
583
|
-
"keydown.alt.up":
|
|
584
|
-
"keydown.alt.down":
|
|
585
|
-
"keydown.alt.left":
|
|
586
|
-
"keydown.alt.right":
|
|
582
|
+
let b = {
|
|
583
|
+
...ye,
|
|
584
|
+
"keydown.f2": v,
|
|
585
|
+
"keydown.alt.up": v,
|
|
586
|
+
"keydown.alt.down": v,
|
|
587
|
+
"keydown.alt.left": v,
|
|
588
|
+
"keydown.alt.right": v
|
|
587
589
|
};
|
|
588
|
-
typeof e.addNavigation == "object" && (
|
|
589
|
-
...
|
|
590
|
+
typeof e.addNavigation == "object" && (b = {
|
|
591
|
+
...b,
|
|
590
592
|
...e.addNavigation
|
|
591
|
-
}),
|
|
593
|
+
}), be([
|
|
592
594
|
{
|
|
593
595
|
selectors: o,
|
|
594
|
-
handlers:
|
|
596
|
+
handlers: b
|
|
595
597
|
}
|
|
596
598
|
]);
|
|
597
599
|
}
|
|
598
600
|
const p = () => {
|
|
599
601
|
o.value && (i.value = o.value.textContent);
|
|
600
|
-
},
|
|
601
|
-
const
|
|
602
|
-
|
|
602
|
+
}, E = (b) => {
|
|
603
|
+
const S = b.target;
|
|
604
|
+
S.textContent !== i.value && (n("cellInput", e.colIndex, e.rowIndex, S.textContent, i.value), i.value = S.textContent, r.format ? (l.value = S.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, a), e.store.setCellText(e.colIndex, e.rowIndex, S.textContent)) : (l.value = S.textContent !== a, e.store.setCellData(e.colIndex, e.rowIndex, S.textContent)));
|
|
603
605
|
};
|
|
604
|
-
return (
|
|
606
|
+
return (b, S) => (C(), I("td", {
|
|
605
607
|
ref: "cell",
|
|
606
|
-
"data-colindex":
|
|
607
|
-
"data-rowindex":
|
|
608
|
-
"data-editable":
|
|
609
|
-
contenteditable:
|
|
610
|
-
tabindex:
|
|
608
|
+
"data-colindex": b.colIndex,
|
|
609
|
+
"data-rowindex": b.rowIndex,
|
|
610
|
+
"data-editable": g(r).edit,
|
|
611
|
+
contenteditable: g(r).edit,
|
|
612
|
+
tabindex: b.tabIndex,
|
|
611
613
|
spellcheck: !1,
|
|
612
614
|
style: z(m.value),
|
|
613
615
|
onFocus: p,
|
|
614
|
-
onPaste:
|
|
615
|
-
onInput:
|
|
616
|
-
onClick:
|
|
617
|
-
class: F(["atable-cell",
|
|
616
|
+
onPaste: E,
|
|
617
|
+
onInput: E,
|
|
618
|
+
onClick: v,
|
|
619
|
+
class: F(["atable-cell", x.value])
|
|
618
620
|
}, [
|
|
619
|
-
|
|
621
|
+
g(r).cellComponent ? (C(), te(De(g(r).cellComponent), me({
|
|
620
622
|
key: 0,
|
|
621
623
|
value: u.value
|
|
622
|
-
},
|
|
624
|
+
}, g(r).cellComponentProps), null, 16, ["value"])) : f.value ? (C(), I("span", {
|
|
623
625
|
key: 1,
|
|
624
626
|
innerHTML: u.value
|
|
625
|
-
}, null, 8, Tt)) : (C(),
|
|
627
|
+
}, null, 8, Tt)) : (C(), I("span", Mt, Y(u.value), 1))
|
|
626
628
|
], 46, St));
|
|
627
629
|
}
|
|
628
|
-
}),
|
|
630
|
+
}), Rt = ["tabindex"], Ot = ["tabindex"], Lt = ["colspan"], Pt = /* @__PURE__ */ V({
|
|
629
631
|
__name: "AExpansionRow",
|
|
630
632
|
props: {
|
|
631
633
|
rowIndex: {},
|
|
@@ -641,43 +643,48 @@ const At = (e) => {
|
|
|
641
643
|
a.stopPropagation(), a.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
642
644
|
}
|
|
643
645
|
};
|
|
644
|
-
typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation),
|
|
646
|
+
typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), be([
|
|
645
647
|
{
|
|
646
648
|
selectors: t,
|
|
647
649
|
handlers: o
|
|
648
650
|
}
|
|
649
651
|
]);
|
|
650
652
|
}
|
|
651
|
-
return (o, a) => (C(),
|
|
652
|
-
|
|
653
|
+
return (o, a) => (C(), I(oe, null, [
|
|
654
|
+
P("tr", me(o.$attrs, {
|
|
653
655
|
ref: "rowEl",
|
|
654
656
|
tabindex: o.tabIndex,
|
|
655
657
|
class: "expandable-row"
|
|
656
658
|
}), [
|
|
657
|
-
|
|
659
|
+
P("td", {
|
|
658
660
|
tabIndex: -1,
|
|
659
661
|
onClick: a[0] || (a[0] = (i) => o.store.toggleRowExpand(o.rowIndex)),
|
|
660
662
|
class: "row-index"
|
|
661
663
|
}, Y(n.value), 1),
|
|
662
|
-
|
|
663
|
-
], 16,
|
|
664
|
-
o.store.display[o.rowIndex].expanded ? (C(),
|
|
664
|
+
R(o.$slots, "row", {}, void 0, !0)
|
|
665
|
+
], 16, Rt),
|
|
666
|
+
o.store.display[o.rowIndex].expanded ? (C(), I("tr", {
|
|
665
667
|
key: 0,
|
|
666
668
|
ref: "rowExpanded",
|
|
667
669
|
tabindex: o.tabIndex,
|
|
668
670
|
class: "expanded-row"
|
|
669
671
|
}, [
|
|
670
|
-
|
|
672
|
+
P("td", {
|
|
671
673
|
tabIndex: -1,
|
|
672
674
|
colspan: o.store.columns.length + 1,
|
|
673
675
|
class: "expanded-row-content"
|
|
674
676
|
}, [
|
|
675
|
-
|
|
676
|
-
], 8,
|
|
677
|
-
], 8,
|
|
677
|
+
R(o.$slots, "content", {}, void 0, !0)
|
|
678
|
+
], 8, Lt)
|
|
679
|
+
], 8, Ot)) : U("", !0)
|
|
678
680
|
], 64));
|
|
679
681
|
}
|
|
680
|
-
}),
|
|
682
|
+
}), K = (e, t) => {
|
|
683
|
+
const n = e.__vccOpts || e;
|
|
684
|
+
for (const [o, a] of t)
|
|
685
|
+
n[o] = a;
|
|
686
|
+
return n;
|
|
687
|
+
}, Wt = /* @__PURE__ */ K(Pt, [["__scopeId", "data-v-60affd71"]]), Dt = ["tabindex"], Ht = /* @__PURE__ */ V({
|
|
681
688
|
__name: "ARow",
|
|
682
689
|
props: {
|
|
683
690
|
rowIndex: {},
|
|
@@ -688,60 +695,60 @@ const At = (e) => {
|
|
|
688
695
|
setup(e) {
|
|
689
696
|
const t = J("rowEl"), n = k(() => e.store.isRowVisible(e.rowIndex)), o = k(() => e.store.getRowExpandSymbol(e.rowIndex));
|
|
690
697
|
if (e.addNavigation) {
|
|
691
|
-
let a =
|
|
698
|
+
let a = ye;
|
|
692
699
|
typeof e.addNavigation == "object" && (a = {
|
|
693
700
|
...a,
|
|
694
701
|
...e.addNavigation
|
|
695
|
-
}),
|
|
702
|
+
}), be([
|
|
696
703
|
{
|
|
697
704
|
selectors: t,
|
|
698
705
|
handlers: a
|
|
699
706
|
}
|
|
700
707
|
]);
|
|
701
708
|
}
|
|
702
|
-
return (a, i) =>
|
|
709
|
+
return (a, i) => ie((C(), I("tr", {
|
|
703
710
|
ref: "rowEl",
|
|
704
711
|
tabindex: a.tabIndex,
|
|
705
|
-
class: "
|
|
712
|
+
class: "atable-row"
|
|
706
713
|
}, [
|
|
707
|
-
a.store.config.view !== "uncounted" ?
|
|
708
|
-
a.store.config.view === "list" ? (C(),
|
|
714
|
+
a.store.config.view !== "uncounted" ? R(a.$slots, "index", { key: 0 }, () => [
|
|
715
|
+
a.store.config.view === "list" ? (C(), I("td", {
|
|
709
716
|
key: 0,
|
|
710
717
|
tabIndex: -1,
|
|
711
718
|
class: F(["list-index", a.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
712
|
-
}, Y(a.rowIndex + 1), 3)) : a.store.config.view === "tree" ? (C(),
|
|
719
|
+
}, Y(a.rowIndex + 1), 3)) : a.store.config.view === "tree" ? (C(), I("td", {
|
|
713
720
|
key: 1,
|
|
714
721
|
tabIndex: -1,
|
|
715
722
|
class: F(["tree-index", a.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
716
723
|
onClick: i[0] || (i[0] = (l) => a.store.toggleRowExpand(a.rowIndex))
|
|
717
724
|
}, Y(o.value), 3)) : U("", !0)
|
|
718
|
-
]) : U("", !0),
|
|
719
|
-
|
|
720
|
-
], 8,
|
|
721
|
-
[
|
|
725
|
+
], !0) : U("", !0),
|
|
726
|
+
R(a.$slots, "default", {}, void 0, !0)
|
|
727
|
+
], 8, Dt)), [
|
|
728
|
+
[He, n.value]
|
|
722
729
|
]);
|
|
723
730
|
}
|
|
724
|
-
}),
|
|
725
|
-
function
|
|
731
|
+
}), Ye = /* @__PURE__ */ K(Ht, [["__scopeId", "data-v-e02365ea"]]), Ue = xe ? window : void 0;
|
|
732
|
+
function B(e) {
|
|
726
733
|
var t;
|
|
727
|
-
const n =
|
|
734
|
+
const n = O(e);
|
|
728
735
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
729
736
|
}
|
|
730
|
-
function
|
|
737
|
+
function ne(...e) {
|
|
731
738
|
let t, n, o, a;
|
|
732
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, a] = e, t =
|
|
733
|
-
return
|
|
739
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, a] = e, t = Ue) : [t, n, o, a] = e, !t)
|
|
740
|
+
return H;
|
|
734
741
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
735
742
|
const i = [], l = () => {
|
|
736
743
|
i.forEach((c) => c()), i.length = 0;
|
|
737
|
-
}, r = (c, u, f, m) => (c.addEventListener(u, f, m), () => c.removeEventListener(u, f, m)), d =
|
|
738
|
-
() => [
|
|
744
|
+
}, r = (c, u, f, m) => (c.addEventListener(u, f, m), () => c.removeEventListener(u, f, m)), d = L(
|
|
745
|
+
() => [B(t), O(a)],
|
|
739
746
|
([c, u]) => {
|
|
740
747
|
if (l(), !c)
|
|
741
748
|
return;
|
|
742
|
-
const f =
|
|
749
|
+
const f = Ve(u) ? { ...u } : u;
|
|
743
750
|
i.push(
|
|
744
|
-
...n.flatMap((m) => o.map((
|
|
751
|
+
...n.flatMap((m) => o.map((x) => r(c, m, x, f)))
|
|
745
752
|
);
|
|
746
753
|
},
|
|
747
754
|
{ immediate: !0, flush: "post" }
|
|
@@ -750,99 +757,99 @@ function ee(...e) {
|
|
|
750
757
|
};
|
|
751
758
|
return Z(s), s;
|
|
752
759
|
}
|
|
753
|
-
let
|
|
754
|
-
function
|
|
755
|
-
const { window: o =
|
|
760
|
+
let Re = !1;
|
|
761
|
+
function Oe(e, t, n = {}) {
|
|
762
|
+
const { window: o = Ue, ignore: a = [], capture: i = !0, detectIframe: l = !1 } = n;
|
|
756
763
|
if (!o)
|
|
757
|
-
return
|
|
758
|
-
|
|
764
|
+
return H;
|
|
765
|
+
ue && !Re && (Re = !0, Array.from(o.document.body.children).forEach((v) => v.addEventListener("click", H)), o.document.documentElement.addEventListener("click", H));
|
|
759
766
|
let r = !0;
|
|
760
|
-
const d = (
|
|
761
|
-
if (typeof
|
|
762
|
-
return Array.from(o.document.querySelectorAll(
|
|
767
|
+
const d = (v) => O(a).some((p) => {
|
|
768
|
+
if (typeof p == "string")
|
|
769
|
+
return Array.from(o.document.querySelectorAll(p)).some((E) => E === v.target || v.composedPath().includes(E));
|
|
763
770
|
{
|
|
764
|
-
const
|
|
765
|
-
return
|
|
771
|
+
const E = B(p);
|
|
772
|
+
return E && (v.target === E || v.composedPath().includes(E));
|
|
766
773
|
}
|
|
767
774
|
});
|
|
768
|
-
function s(
|
|
769
|
-
const
|
|
770
|
-
return
|
|
775
|
+
function s(v) {
|
|
776
|
+
const p = O(v);
|
|
777
|
+
return p && p.$.subTree.shapeFlag === 16;
|
|
771
778
|
}
|
|
772
|
-
function c(
|
|
773
|
-
const
|
|
774
|
-
return
|
|
779
|
+
function c(v, p) {
|
|
780
|
+
const E = O(v), b = E.$.subTree && E.$.subTree.children;
|
|
781
|
+
return b == null || !Array.isArray(b) ? !1 : b.some((S) => S.el === p.target || p.composedPath().includes(S.el));
|
|
775
782
|
}
|
|
776
|
-
const u = (
|
|
777
|
-
const
|
|
778
|
-
if (
|
|
779
|
-
if (
|
|
783
|
+
const u = (v) => {
|
|
784
|
+
const p = B(e);
|
|
785
|
+
if (v.target != null && !(!(p instanceof Element) && s(e) && c(e, v)) && !(!p || p === v.target || v.composedPath().includes(p))) {
|
|
786
|
+
if (v.detail === 0 && (r = !d(v)), !r) {
|
|
780
787
|
r = !0;
|
|
781
788
|
return;
|
|
782
789
|
}
|
|
783
|
-
t(
|
|
790
|
+
t(v);
|
|
784
791
|
}
|
|
785
792
|
};
|
|
786
793
|
let f = !1;
|
|
787
794
|
const m = [
|
|
788
|
-
|
|
795
|
+
ne(o, "click", (v) => {
|
|
789
796
|
f || (f = !0, setTimeout(() => {
|
|
790
797
|
f = !1;
|
|
791
|
-
}, 0), u(
|
|
798
|
+
}, 0), u(v));
|
|
792
799
|
}, { passive: !0, capture: i }),
|
|
793
|
-
|
|
794
|
-
const
|
|
795
|
-
r = !d(
|
|
800
|
+
ne(o, "pointerdown", (v) => {
|
|
801
|
+
const p = B(e);
|
|
802
|
+
r = !d(v) && !!(p && !v.composedPath().includes(p));
|
|
796
803
|
}, { passive: !0 }),
|
|
797
|
-
l &&
|
|
804
|
+
l && ne(o, "blur", (v) => {
|
|
798
805
|
setTimeout(() => {
|
|
799
|
-
var
|
|
800
|
-
const
|
|
801
|
-
((
|
|
806
|
+
var p;
|
|
807
|
+
const E = B(e);
|
|
808
|
+
((p = o.document.activeElement) == null ? void 0 : p.tagName) === "IFRAME" && !(E != null && E.contains(o.document.activeElement)) && t(v);
|
|
802
809
|
}, 0);
|
|
803
810
|
})
|
|
804
811
|
].filter(Boolean);
|
|
805
|
-
return () => m.forEach((
|
|
812
|
+
return () => m.forEach((v) => v());
|
|
806
813
|
}
|
|
807
|
-
const
|
|
814
|
+
const Nt = {
|
|
808
815
|
mounted(e, t) {
|
|
809
816
|
const n = !t.modifiers.bubble;
|
|
810
817
|
if (typeof t.value == "function")
|
|
811
|
-
e.__onClickOutside_stop =
|
|
818
|
+
e.__onClickOutside_stop = Oe(e, t.value, { capture: n });
|
|
812
819
|
else {
|
|
813
820
|
const [o, a] = t.value;
|
|
814
|
-
e.__onClickOutside_stop =
|
|
821
|
+
e.__onClickOutside_stop = Oe(e, o, Object.assign({ capture: n }, a));
|
|
815
822
|
}
|
|
816
823
|
},
|
|
817
824
|
unmounted(e) {
|
|
818
825
|
e.__onClickOutside_stop();
|
|
819
826
|
}
|
|
820
827
|
};
|
|
821
|
-
function
|
|
828
|
+
function se(e) {
|
|
822
829
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
823
830
|
}
|
|
824
|
-
function
|
|
831
|
+
function Xe(e) {
|
|
825
832
|
const t = window.getComputedStyle(e);
|
|
826
833
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
|
|
827
834
|
return !0;
|
|
828
835
|
{
|
|
829
836
|
const n = e.parentNode;
|
|
830
|
-
return !n || n.tagName === "BODY" ? !1 :
|
|
837
|
+
return !n || n.tagName === "BODY" ? !1 : Xe(n);
|
|
831
838
|
}
|
|
832
839
|
}
|
|
833
|
-
function
|
|
840
|
+
function Vt(e) {
|
|
834
841
|
const t = e || window.event, n = t.target;
|
|
835
|
-
return
|
|
842
|
+
return Xe(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
836
843
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
839
|
-
const n =
|
|
844
|
+
const ae = /* @__PURE__ */ new WeakMap();
|
|
845
|
+
function jt(e, t = !1) {
|
|
846
|
+
const n = y(t);
|
|
840
847
|
let o = null, a = "";
|
|
841
|
-
|
|
842
|
-
const d =
|
|
848
|
+
L(xt(e), (r) => {
|
|
849
|
+
const d = se(O(r));
|
|
843
850
|
if (d) {
|
|
844
851
|
const s = d;
|
|
845
|
-
if (
|
|
852
|
+
if (ae.get(s) || ae.set(s, s.style.overflow), s.style.overflow !== "hidden" && (a = s.style.overflow), s.style.overflow === "hidden")
|
|
846
853
|
return n.value = !0;
|
|
847
854
|
if (n.value)
|
|
848
855
|
return s.style.overflow = "hidden";
|
|
@@ -851,18 +858,18 @@ function Ht(e, t = !1) {
|
|
|
851
858
|
immediate: !0
|
|
852
859
|
});
|
|
853
860
|
const i = () => {
|
|
854
|
-
const r =
|
|
855
|
-
!r || n.value || (
|
|
861
|
+
const r = se(O(e));
|
|
862
|
+
!r || n.value || (ue && (o = ne(
|
|
856
863
|
r,
|
|
857
864
|
"touchmove",
|
|
858
865
|
(d) => {
|
|
859
|
-
|
|
866
|
+
Vt(d);
|
|
860
867
|
},
|
|
861
868
|
{ passive: !1 }
|
|
862
869
|
)), r.style.overflow = "hidden", n.value = !0);
|
|
863
870
|
}, l = () => {
|
|
864
|
-
const r =
|
|
865
|
-
!r || !n.value || (
|
|
871
|
+
const r = se(O(e));
|
|
872
|
+
!r || !n.value || (ue && (o == null || o()), r.style.overflow = a, ae.delete(r), n.value = !1);
|
|
866
873
|
};
|
|
867
874
|
return Z(l), k({
|
|
868
875
|
get() {
|
|
@@ -873,34 +880,34 @@ function Ht(e, t = !1) {
|
|
|
873
880
|
}
|
|
874
881
|
});
|
|
875
882
|
}
|
|
876
|
-
function
|
|
883
|
+
function Bt() {
|
|
877
884
|
let e = !1;
|
|
878
|
-
const t =
|
|
885
|
+
const t = y(!1);
|
|
879
886
|
return (n, o) => {
|
|
880
887
|
if (t.value = o.value, e)
|
|
881
888
|
return;
|
|
882
889
|
e = !0;
|
|
883
|
-
const a =
|
|
884
|
-
|
|
890
|
+
const a = jt(n, o.value);
|
|
891
|
+
L(t, (i) => a.value = i);
|
|
885
892
|
};
|
|
886
893
|
}
|
|
887
|
-
|
|
888
|
-
const
|
|
894
|
+
Bt();
|
|
895
|
+
const zt = {
|
|
889
896
|
key: 0,
|
|
890
897
|
id: "resizable"
|
|
891
|
-
},
|
|
898
|
+
}, Ft = {
|
|
892
899
|
class: "atable-header-row",
|
|
893
900
|
tabindex: "-1"
|
|
894
|
-
},
|
|
901
|
+
}, qe = /* @__PURE__ */ V({
|
|
895
902
|
__name: "ATableHeader",
|
|
896
903
|
props: {
|
|
897
904
|
columns: {},
|
|
898
905
|
store: {}
|
|
899
906
|
},
|
|
900
907
|
setup(e) {
|
|
901
|
-
return (t, n) => t.columns.length ? (C(),
|
|
902
|
-
|
|
903
|
-
t.store.zeroColumn ? (C(),
|
|
908
|
+
return (t, n) => t.columns.length ? (C(), I("thead", zt, [
|
|
909
|
+
P("tr", Ft, [
|
|
910
|
+
t.store.zeroColumn ? (C(), I("th", {
|
|
904
911
|
key: 0,
|
|
905
912
|
id: "header-index",
|
|
906
913
|
class: F([[
|
|
@@ -909,26 +916,26 @@ const Vt = {
|
|
|
909
916
|
t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
910
917
|
], "list-index"])
|
|
911
918
|
}, null, 2)) : U("", !0),
|
|
912
|
-
(C(!0),
|
|
919
|
+
(C(!0), I(oe, null, ce(t.columns, (o, a) => (C(), I("th", {
|
|
913
920
|
key: o.name,
|
|
914
921
|
tabindex: "-1",
|
|
915
922
|
style: z(t.store.getHeaderCellStyle(o)),
|
|
916
923
|
class: F(o.pinned ? "sticky-column" : "")
|
|
917
924
|
}, [
|
|
918
|
-
|
|
919
|
-
|
|
925
|
+
R(t.$slots, "default", {}, () => [
|
|
926
|
+
_e(Y(o.label || String.fromCharCode(a + 97).toUpperCase()), 1)
|
|
920
927
|
])
|
|
921
928
|
], 6))), 128))
|
|
922
929
|
])
|
|
923
930
|
])) : U("", !0);
|
|
924
931
|
}
|
|
925
|
-
}),
|
|
932
|
+
}), Ge = /* @__PURE__ */ V({
|
|
926
933
|
__name: "ATableModal",
|
|
927
934
|
props: {
|
|
928
935
|
store: {}
|
|
929
936
|
},
|
|
930
937
|
setup(e) {
|
|
931
|
-
const t = J("amodal"), { width: n, height: o } =
|
|
938
|
+
const t = J("amodal"), { width: n, height: o } = ze(t), { y: a } = At(), i = k(() => {
|
|
932
939
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
933
940
|
const r = document.body, d = document.documentElement, s = Math.max(
|
|
934
941
|
r.scrollHeight,
|
|
@@ -944,7 +951,7 @@ const Vt = {
|
|
|
944
951
|
}), l = (r) => {
|
|
945
952
|
r.stopPropagation();
|
|
946
953
|
};
|
|
947
|
-
return (r, d) => (C(),
|
|
954
|
+
return (r, d) => (C(), I("div", {
|
|
948
955
|
class: "amodal",
|
|
949
956
|
ref: "amodal",
|
|
950
957
|
tabindex: "-1",
|
|
@@ -952,61 +959,61 @@ const Vt = {
|
|
|
952
959
|
onInput: l,
|
|
953
960
|
style: z(i.value)
|
|
954
961
|
}, [
|
|
955
|
-
|
|
962
|
+
R(r.$slots, "default")
|
|
956
963
|
], 36));
|
|
957
964
|
}
|
|
958
|
-
}),
|
|
959
|
-
const t = e.id ||
|
|
960
|
-
return
|
|
965
|
+
}), Yt = (e) => {
|
|
966
|
+
const t = e.id || $t();
|
|
967
|
+
return et(`table-${t}`, () => {
|
|
961
968
|
const o = () => {
|
|
962
969
|
const h = {};
|
|
963
|
-
for (const [
|
|
964
|
-
for (const [
|
|
965
|
-
h[`${
|
|
970
|
+
for (const [w, A] of i.value.entries())
|
|
971
|
+
for (const [$, T] of l.value.entries())
|
|
972
|
+
h[`${w}:${$}`] = T[A.name];
|
|
966
973
|
return h;
|
|
967
974
|
}, a = (h) => {
|
|
968
|
-
const
|
|
975
|
+
const w = [Object.assign({}, { rowModified: !1 })];
|
|
969
976
|
if (h && "0:0" in h)
|
|
970
977
|
return h;
|
|
971
978
|
const A = /* @__PURE__ */ new Set();
|
|
972
|
-
for (let
|
|
973
|
-
const T = l.value[
|
|
974
|
-
T.parent && A.add(T.parent),
|
|
979
|
+
for (let $ = l.value.length - 1; $ >= 0; $--) {
|
|
980
|
+
const T = l.value[$];
|
|
981
|
+
T.parent && A.add(T.parent), w[$] = {
|
|
975
982
|
childrenOpen: !1,
|
|
976
983
|
expanded: !1,
|
|
977
984
|
indent: T.indent || 0,
|
|
978
|
-
isParent: A.has(
|
|
985
|
+
isParent: A.has($),
|
|
979
986
|
isRoot: T.parent === null || T.parent === void 0,
|
|
980
987
|
rowModified: !1,
|
|
981
988
|
open: T.parent === null || T.parent === void 0,
|
|
982
989
|
parent: T.parent
|
|
983
990
|
};
|
|
984
991
|
}
|
|
985
|
-
return
|
|
986
|
-
}, i =
|
|
992
|
+
return w;
|
|
993
|
+
}, i = y(e.columns), l = y(e.rows), r = y(e.config || {}), d = y(e.table || o()), s = y(a(e.display)), c = y(e.modal || { visible: !1 }), u = y({}), f = k(() => i.value.some((h) => h.pinned)), m = k(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), x = k(
|
|
987
994
|
() => r.value.view ? ["list", "tree", "list-expansion"].includes(r.value.view) : !1
|
|
988
|
-
),
|
|
989
|
-
const
|
|
990
|
-
d.value[
|
|
991
|
-
},
|
|
992
|
-
const
|
|
993
|
-
d.value[
|
|
994
|
-
},
|
|
995
|
+
), v = (h, w) => d.value[`${h}:${w}`], p = (h, w, A) => {
|
|
996
|
+
const $ = `${h}:${w}`, T = i.value[h];
|
|
997
|
+
d.value[$] !== A && (s.value[w].rowModified = !0), d.value[$] = A, l.value[w][T.name] = A;
|
|
998
|
+
}, E = (h, w, A) => {
|
|
999
|
+
const $ = `${h}:${w}`;
|
|
1000
|
+
d.value[$] !== A && (s.value[w].rowModified = !0, u.value[$] = A);
|
|
1001
|
+
}, b = (h) => ({
|
|
995
1002
|
minWidth: h.width || "40ch",
|
|
996
1003
|
textAlign: h.align || "center",
|
|
997
1004
|
width: r.value.fullWidth ? "auto" : void 0
|
|
998
|
-
}),
|
|
1005
|
+
}), S = (h) => r.value.view !== "tree" || s.value[h].isRoot || s.value[h].open, re = (h) => r.value.view !== "tree" ? "" : s.value[h].isRoot || s.value[h].isParent ? s.value[h].childrenOpen ? "-" : "+" : "", _ = (h) => {
|
|
999
1006
|
if (r.value.view === "tree") {
|
|
1000
1007
|
s.value[h].childrenOpen = !s.value[h].childrenOpen;
|
|
1001
|
-
for (let
|
|
1002
|
-
s.value[
|
|
1008
|
+
for (let w = l.value.length - 1; w >= 0; w--)
|
|
1009
|
+
s.value[w].parent === h && (s.value[w].open = !s.value[w].open, s.value[w].childrenOpen && _(w));
|
|
1003
1010
|
} else r.value.view === "list-expansion" && (s.value[h].expanded = !s.value[h].expanded);
|
|
1004
|
-
},
|
|
1005
|
-
const A =
|
|
1006
|
-
return
|
|
1007
|
-
},
|
|
1008
|
-
const
|
|
1009
|
-
return
|
|
1011
|
+
}, M = (h, w) => {
|
|
1012
|
+
const A = v(h, w);
|
|
1013
|
+
return Ee(h, w, A);
|
|
1014
|
+
}, Ee = (h, w, A) => {
|
|
1015
|
+
const $ = i.value[h], T = l.value[w], j = $.format;
|
|
1016
|
+
return j ? typeof j == "function" ? j(A, { table: d.value, row: T, column: $ }) : typeof j == "string" ? Function(`"use strict";return (${j})`)()(A, { table: d.value, row: T, column: $ }) : A : A;
|
|
1010
1017
|
};
|
|
1011
1018
|
return {
|
|
1012
1019
|
// state
|
|
@@ -1020,25 +1027,25 @@ const Vt = {
|
|
|
1020
1027
|
// getters
|
|
1021
1028
|
hasPinnedColumns: f,
|
|
1022
1029
|
numberedRowWidth: m,
|
|
1023
|
-
zeroColumn:
|
|
1030
|
+
zeroColumn: x,
|
|
1024
1031
|
// actions
|
|
1025
1032
|
closeModal: (h) => {
|
|
1026
|
-
var
|
|
1027
|
-
h.target instanceof Node && (
|
|
1033
|
+
var w;
|
|
1034
|
+
h.target instanceof Node && (w = c.value.parent) != null && w.contains(h.target) || c.value.visible && (c.value.visible = !1);
|
|
1028
1035
|
},
|
|
1029
|
-
getCellData:
|
|
1030
|
-
getCellDisplayValue:
|
|
1031
|
-
getFormattedValue:
|
|
1032
|
-
getHeaderCellStyle:
|
|
1033
|
-
getIndent: (h,
|
|
1034
|
-
getRowExpandSymbol:
|
|
1035
|
-
isRowVisible:
|
|
1036
|
-
setCellData:
|
|
1037
|
-
setCellText:
|
|
1038
|
-
toggleRowExpand:
|
|
1036
|
+
getCellData: v,
|
|
1037
|
+
getCellDisplayValue: M,
|
|
1038
|
+
getFormattedValue: Ee,
|
|
1039
|
+
getHeaderCellStyle: b,
|
|
1040
|
+
getIndent: (h, w) => w && h === 0 && w > 0 ? `${w}ch` : "inherit",
|
|
1041
|
+
getRowExpandSymbol: re,
|
|
1042
|
+
isRowVisible: S,
|
|
1043
|
+
setCellData: p,
|
|
1044
|
+
setCellText: E,
|
|
1045
|
+
toggleRowExpand: _
|
|
1039
1046
|
};
|
|
1040
1047
|
})();
|
|
1041
|
-
},
|
|
1048
|
+
}, Ut = /* @__PURE__ */ V({
|
|
1042
1049
|
__name: "ATable",
|
|
1043
1050
|
props: {
|
|
1044
1051
|
id: {},
|
|
@@ -1049,80 +1056,80 @@ const Vt = {
|
|
|
1049
1056
|
},
|
|
1050
1057
|
emits: ["update:modelValue", "cellUpdate"],
|
|
1051
1058
|
setup(e, { expose: t, emit: n }) {
|
|
1052
|
-
const o = n, a = J("table"), i = e.modelValue ? e.modelValue : e.rows, l =
|
|
1059
|
+
const o = n, a = J("table"), i = e.modelValue ? e.modelValue : e.rows, l = Yt({ columns: e.columns, rows: i, id: e.id, config: e.config });
|
|
1053
1060
|
l.$onAction(({ name: s, store: c, args: u, after: f }) => {
|
|
1054
1061
|
if (s === "setCellData") {
|
|
1055
|
-
const [m,
|
|
1062
|
+
const [m, x, v] = u, p = c.getCellData(m, x);
|
|
1056
1063
|
f(() => {
|
|
1057
|
-
o("cellUpdate", m,
|
|
1064
|
+
o("cellUpdate", m, x, v, p);
|
|
1058
1065
|
});
|
|
1059
1066
|
}
|
|
1060
|
-
}),
|
|
1067
|
+
}), L(
|
|
1061
1068
|
() => l.rows,
|
|
1062
1069
|
(s) => {
|
|
1063
1070
|
o("update:modelValue", s);
|
|
1064
1071
|
},
|
|
1065
1072
|
{ deep: !0 }
|
|
1066
1073
|
), G(() => {
|
|
1067
|
-
e.columns.some((s) => s.pinned) && (d(), l.config.view === "tree" &&
|
|
1074
|
+
e.columns.some((s) => s.pinned) && (d(), l.config.view === "tree" && Be(a, d, { childList: !0, subtree: !0 }));
|
|
1068
1075
|
});
|
|
1069
1076
|
const r = (s, c, u, f) => {
|
|
1070
1077
|
o("cellUpdate", s, c, u, f);
|
|
1071
1078
|
}, d = () => {
|
|
1072
1079
|
const s = a.value, c = s == null ? void 0 : s.rows[0], u = s == null ? void 0 : s.rows[1], f = c ? Array.from(c.cells) : [];
|
|
1073
|
-
for (const [m,
|
|
1074
|
-
const
|
|
1075
|
-
|
|
1080
|
+
for (const [m, x] of f.entries()) {
|
|
1081
|
+
const v = u == null ? void 0 : u.cells[m];
|
|
1082
|
+
v && (x.style.width = `${v.offsetWidth}px`);
|
|
1076
1083
|
}
|
|
1077
1084
|
for (const m of (s == null ? void 0 : s.rows) || []) {
|
|
1078
|
-
let
|
|
1079
|
-
const
|
|
1080
|
-
for (const
|
|
1081
|
-
(
|
|
1082
|
-
|
|
1085
|
+
let x = 0;
|
|
1086
|
+
const v = [];
|
|
1087
|
+
for (const p of m.cells)
|
|
1088
|
+
(p.classList.contains("sticky-column") || p.classList.contains("sticky-index")) && (p.style.left = `${x}px`, x += p.offsetWidth, v.push(p));
|
|
1089
|
+
v.length > 0 && v[v.length - 1].classList.add("sticky-column-edge");
|
|
1083
1090
|
}
|
|
1084
1091
|
};
|
|
1085
1092
|
return window.addEventListener("keydown", (s) => {
|
|
1086
1093
|
if (s.key === "Escape" && l.modal.visible) {
|
|
1087
1094
|
l.modal.visible = !1;
|
|
1088
1095
|
const c = l.modal.parent;
|
|
1089
|
-
c &&
|
|
1096
|
+
c && We().then(() => {
|
|
1090
1097
|
c.focus();
|
|
1091
1098
|
});
|
|
1092
1099
|
}
|
|
1093
|
-
}), t({ store: l }), (s, c) =>
|
|
1100
|
+
}), t({ store: l }), (s, c) => ie((C(), I("table", {
|
|
1094
1101
|
ref: "table",
|
|
1095
1102
|
class: "atable",
|
|
1096
|
-
style: z({ width:
|
|
1103
|
+
style: z({ width: g(l).config.fullWidth ? "100%" : "auto" })
|
|
1097
1104
|
}, [
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
columns:
|
|
1101
|
-
store:
|
|
1105
|
+
R(s.$slots, "header", { data: g(l) }, () => [
|
|
1106
|
+
Ce(qe, {
|
|
1107
|
+
columns: g(l).columns,
|
|
1108
|
+
store: g(l)
|
|
1102
1109
|
}, null, 8, ["columns", "store"])
|
|
1103
1110
|
], !0),
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
(C(!0),
|
|
1111
|
+
P("tbody", null, [
|
|
1112
|
+
R(s.$slots, "body", { data: g(l) }, () => [
|
|
1113
|
+
(C(!0), I(oe, null, ce(g(l).rows, (u, f) => (C(), te(Ye, {
|
|
1107
1114
|
key: u.id,
|
|
1108
1115
|
row: u,
|
|
1109
1116
|
rowIndex: f,
|
|
1110
|
-
store:
|
|
1117
|
+
store: g(l)
|
|
1111
1118
|
}, {
|
|
1112
|
-
default:
|
|
1113
|
-
(C(!0),
|
|
1119
|
+
default: ke(() => [
|
|
1120
|
+
(C(!0), I(oe, null, ce(g(l).columns, (m, x) => (C(), te(Fe, {
|
|
1114
1121
|
key: m.name,
|
|
1115
|
-
store:
|
|
1122
|
+
store: g(l),
|
|
1116
1123
|
col: m,
|
|
1117
1124
|
spellcheck: "false",
|
|
1118
1125
|
pinned: m.pinned,
|
|
1119
1126
|
rowIndex: f,
|
|
1120
|
-
colIndex:
|
|
1127
|
+
colIndex: x,
|
|
1121
1128
|
component: m.cellComponent,
|
|
1122
1129
|
style: z({
|
|
1123
1130
|
textAlign: (m == null ? void 0 : m.align) || "center",
|
|
1124
1131
|
minWidth: (m == null ? void 0 : m.width) || "40ch",
|
|
1125
|
-
width:
|
|
1132
|
+
width: g(l).config.fullWidth ? "auto" : null
|
|
1126
1133
|
}),
|
|
1127
1134
|
onCellInput: r
|
|
1128
1135
|
}, null, 8, ["store", "col", "pinned", "rowIndex", "colIndex", "component", "style"]))), 128))
|
|
@@ -1131,43 +1138,58 @@ const Vt = {
|
|
|
1131
1138
|
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
1132
1139
|
], !0)
|
|
1133
1140
|
]),
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
default:
|
|
1138
|
-
(C(),
|
|
1139
|
-
key: `${
|
|
1140
|
-
colIndex:
|
|
1141
|
-
rowIndex:
|
|
1142
|
-
store:
|
|
1143
|
-
},
|
|
1141
|
+
R(s.$slots, "footer", { data: g(l) }, void 0, !0),
|
|
1142
|
+
R(s.$slots, "modal", { data: g(l) }, () => [
|
|
1143
|
+
ie(Ce(Ge, { store: g(l) }, {
|
|
1144
|
+
default: ke(() => [
|
|
1145
|
+
(C(), te(De(g(l).modal.component), me({
|
|
1146
|
+
key: `${g(l).modal.rowIndex}:${g(l).modal.colIndex}`,
|
|
1147
|
+
colIndex: g(l).modal.colIndex,
|
|
1148
|
+
rowIndex: g(l).modal.rowIndex,
|
|
1149
|
+
store: g(l)
|
|
1150
|
+
}, g(l).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
|
|
1144
1151
|
]),
|
|
1145
1152
|
_: 1
|
|
1146
1153
|
}, 8, ["store"]), [
|
|
1147
|
-
[
|
|
1154
|
+
[He, g(l).modal.visible]
|
|
1148
1155
|
])
|
|
1149
1156
|
], !0)
|
|
1150
1157
|
], 4)), [
|
|
1151
|
-
[
|
|
1158
|
+
[g(Nt), g(l).closeModal]
|
|
1152
1159
|
]);
|
|
1153
1160
|
}
|
|
1154
|
-
}),
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1161
|
+
}), Xt = /* @__PURE__ */ K(Ut, [["__scopeId", "data-v-bd5101d3"]]), qt = {}, Gt = { class: "aloading" }, Jt = { class: "aloading-header" };
|
|
1162
|
+
function Qt(e, t) {
|
|
1163
|
+
return C(), I("div", Gt, [
|
|
1164
|
+
P("h2", Jt, [
|
|
1165
|
+
R(e.$slots, "default", {}, void 0, !0)
|
|
1166
|
+
]),
|
|
1167
|
+
t[0] || (t[0] = P("div", { class: "aloading-bar" }, null, -1))
|
|
1168
|
+
]);
|
|
1169
|
+
}
|
|
1170
|
+
const Zt = /* @__PURE__ */ K(qt, [["render", Qt], ["__scopeId", "data-v-a930a25b"]]), Kt = {}, _t = { class: "aloading" }, en = { class: "aloading-header" };
|
|
1171
|
+
function tn(e, t) {
|
|
1172
|
+
return C(), I("div", _t, [
|
|
1173
|
+
P("h2", en, [
|
|
1174
|
+
R(e.$slots, "default", {}, void 0, !0)
|
|
1175
|
+
]),
|
|
1176
|
+
t[0] || (t[0] = P("div", { class: "aloading-bar" }, null, -1))
|
|
1177
|
+
]);
|
|
1178
|
+
}
|
|
1179
|
+
const nn = /* @__PURE__ */ K(Kt, [["render", tn], ["__scopeId", "data-v-e1165876"]]);
|
|
1180
|
+
function cn(e) {
|
|
1181
|
+
e.component("ACell", Fe), e.component("AExpansionRow", Wt), e.component("ARow", Ye), e.component("ATable", Xt), e.component("ATableHeader", qe), e.component("ATableLoading", Zt), e.component("ATableLoadingBar", nn), e.component("ATableModal", Ge);
|
|
1162
1182
|
}
|
|
1163
1183
|
export {
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1184
|
+
Fe as ACell,
|
|
1185
|
+
Wt as AExpansionRow,
|
|
1186
|
+
Ye as ARow,
|
|
1187
|
+
Xt as ATable,
|
|
1188
|
+
qe as ATableHeader,
|
|
1189
|
+
Zt as ATableLoading,
|
|
1190
|
+
nn as ATableLoadingBar,
|
|
1191
|
+
Ge as ATableModal,
|
|
1192
|
+
Yt as createTableStore,
|
|
1193
|
+
cn as install
|
|
1172
1194
|
};
|
|
1173
1195
|
//# sourceMappingURL=atable.js.map
|