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