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