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