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