@stonecrop/atable 0.4.2 → 0.4.3

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