@stonecrop/atable 0.2.40 → 0.2.41

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