@stonecrop/atable 0.13.12 → 0.13.14

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,7 +1,7 @@
1
- import { onMounted as Ae, ref as z, watch as ue, onBeforeUnmount as Pt, computed as E, shallowRef as re, toValue as A, watchEffect as Zt, getCurrentScope as $t, onScopeDispose as It, getCurrentInstance as lt, unref as O, nextTick as at, isRef as Nt, toRefs as Ft, customRef as Tt, toRef as Wt, readonly as zt, defineComponent as xe, useTemplateRef as ce, openBlock as p, createElementBlock as b, normalizeClass as se, normalizeStyle as pe, createBlock as he, resolveDynamicComponent as Ne, mergeProps as st, toDisplayString as be, Fragment as me, createElementVNode as N, renderSlot as fe, createCommentVNode as ee, useCssVars as Xt, onUnmounted as Gt, withModifiers as Se, withDirectives as de, renderList as Ce, vShow as it, reactive as jt, vModelText as Ze, vModelCheckbox as Yt, vModelSelect as Ut, createTextVNode as Jt, useModel as wt, inject as qt, createVNode as pt, withCtx as xt, mergeModels as yt } from "vue";
1
+ import { onMounted as Ae, ref as z, watch as ue, onBeforeUnmount as Pt, computed as $, shallowRef as re, toValue as H, watchEffect as Zt, getCurrentScope as $t, onScopeDispose as Tt, getCurrentInstance as lt, unref as B, nextTick as at, isRef as Nt, toRefs as Ft, customRef as It, toRef as Wt, readonly as zt, defineComponent as xe, useTemplateRef as ce, openBlock as y, createElementBlock as k, normalizeClass as ae, normalizeStyle as pe, createBlock as he, resolveDynamicComponent as Ne, mergeProps as st, toDisplayString as be, Fragment as me, createElementVNode as F, renderSlot as fe, createCommentVNode as ee, useCssVars as Xt, onUnmounted as Gt, withModifiers as Se, withDirectives as de, renderList as Ce, vShow as it, reactive as jt, vModelText as Ze, vModelCheckbox as Yt, vModelSelect as Ut, createTextVNode as Jt, useModel as wt, inject as qt, createVNode as pt, withCtx as xt, mergeModels as yt } from "vue";
2
2
  import { defineStore as Qt } from "pinia";
3
3
  import './assets/index.css';function St(e, t) {
4
- return $t() ? (It(e, t), !0) : !1;
4
+ return $t() ? (Tt(e, t), !0) : !1;
5
5
  }
6
6
  const Kt = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -19,27 +19,27 @@ function on(e, t, n) {
19
19
  const De = Kt ? window : void 0;
20
20
  function Le(e) {
21
21
  var t;
22
- const n = A(e);
22
+ const n = H(e);
23
23
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
24
24
  }
25
25
  function Fe(...e) {
26
- const t = (l, u, a, o) => (l.addEventListener(u, a, o), () => l.removeEventListener(u, a, o)), n = E(() => {
27
- const l = je(A(e[0])).filter((u) => u != null);
26
+ const t = (l, u, a, o) => (l.addEventListener(u, a, o), () => l.removeEventListener(u, a, o)), n = $(() => {
27
+ const l = je(H(e[0])).filter((u) => u != null);
28
28
  return l.every((u) => typeof u != "string") ? l : void 0;
29
29
  });
30
30
  return on(() => {
31
31
  var l, u;
32
32
  return [
33
33
  (l = (u = n.value) === null || u === void 0 ? void 0 : u.map((a) => Le(a))) !== null && l !== void 0 ? l : [De].filter((a) => a != null),
34
- je(A(n.value ? e[1] : e[0])),
35
- je(O(n.value ? e[2] : e[1])),
36
- A(n.value ? e[3] : e[2])
34
+ je(H(n.value ? e[1] : e[0])),
35
+ je(B(n.value ? e[2] : e[1])),
36
+ H(n.value ? e[3] : e[2])
37
37
  ];
38
- }, ([l, u, a, o], c, r) => {
38
+ }, ([l, u, a, o], r, c) => {
39
39
  if (!l?.length || !u?.length || !a?.length) return;
40
- const s = tn(o) ? { ...o } : o, d = l.flatMap((v) => u.flatMap((y) => a.map((P) => t(v, y, P, s))));
41
- r(() => {
42
- d.forEach((v) => v());
40
+ const s = tn(o) ? { ...o } : o, f = l.flatMap((v) => u.flatMap((x) => a.map((I) => t(v, x, I, s))));
41
+ c(() => {
42
+ f.forEach((v) => v());
43
43
  });
44
44
  }, { flush: "post" });
45
45
  }
@@ -53,27 +53,27 @@ function ln() {
53
53
  // @__NO_SIDE_EFFECTS__
54
54
  function an(e) {
55
55
  const t = /* @__PURE__ */ ln();
56
- return E(() => (t.value, !!e()));
56
+ return $(() => (t.value, !!e()));
57
57
  }
58
58
  function sn(e, t, n = {}) {
59
59
  const { window: l = De, ...u } = n;
60
60
  let a;
61
- const o = /* @__PURE__ */ an(() => l && "MutationObserver" in l), c = () => {
61
+ const o = /* @__PURE__ */ an(() => l && "MutationObserver" in l), r = () => {
62
62
  a && (a.disconnect(), a = void 0);
63
- }, r = ue(E(() => {
64
- const v = je(A(e)).map(Le).filter(_t);
63
+ }, c = ue($(() => {
64
+ const v = je(H(e)).map(Le).filter(_t);
65
65
  return new Set(v);
66
66
  }), (v) => {
67
- c(), o.value && v.size && (a = new MutationObserver(t), v.forEach((y) => a.observe(y, u)));
67
+ r(), o.value && v.size && (a = new MutationObserver(t), v.forEach((x) => a.observe(x, u)));
68
68
  }, {
69
69
  immediate: !0,
70
70
  flush: "post"
71
- }), s = () => a?.takeRecords(), d = () => {
72
- r(), c();
71
+ }), s = () => a?.takeRecords(), f = () => {
72
+ c(), r();
73
73
  };
74
- return St(d), {
74
+ return St(f), {
75
75
  isSupported: o,
76
- stop: d,
76
+ stop: f,
77
77
  takeRecords: s
78
78
  };
79
79
  }
@@ -81,22 +81,22 @@ function rn(e, t, n = {}) {
81
81
  const { window: l = De, document: u = l?.document, flush: a = "sync" } = n;
82
82
  if (!l || !u) return nn;
83
83
  let o;
84
- const c = (d) => {
85
- o?.(), o = d;
86
- }, r = Zt(() => {
87
- const d = Le(e);
88
- if (d) {
89
- const { stop: v } = sn(u, (y) => {
90
- y.map((P) => [...P.removedNodes]).flat().some((P) => P === d || P.contains(d)) && t(y);
84
+ const r = (f) => {
85
+ o?.(), o = f;
86
+ }, c = Zt(() => {
87
+ const f = Le(e);
88
+ if (f) {
89
+ const { stop: v } = sn(u, (x) => {
90
+ x.map((I) => [...I.removedNodes]).flat().some((I) => I === f || I.contains(f)) && t(x);
91
91
  }, {
92
92
  window: l,
93
93
  childList: !0,
94
94
  subtree: !0
95
95
  });
96
- c(v);
96
+ r(v);
97
97
  }
98
98
  }, { flush: a }), s = () => {
99
- r(), c();
99
+ c(), r();
100
100
  };
101
101
  return St(s), s;
102
102
  }
@@ -106,30 +106,30 @@ function cn(e = {}) {
106
106
  const { window: n = De, deep: l = !0, triggerOnRemoval: u = !1 } = e, a = (t = e.document) !== null && t !== void 0 ? t : n?.document, o = () => {
107
107
  let s = a?.activeElement;
108
108
  if (l)
109
- for (var d; s?.shadowRoot; ) s = s == null || (d = s.shadowRoot) === null || d === void 0 ? void 0 : d.activeElement;
109
+ for (var f; s?.shadowRoot; ) s = s == null || (f = s.shadowRoot) === null || f === void 0 ? void 0 : f.activeElement;
110
110
  return s;
111
- }, c = re(), r = () => {
112
- c.value = o();
111
+ }, r = re(), c = () => {
112
+ r.value = o();
113
113
  };
114
114
  if (n) {
115
115
  const s = {
116
116
  capture: !0,
117
117
  passive: !0
118
118
  };
119
- Fe(n, "blur", (d) => {
120
- d.relatedTarget === null && r();
121
- }, s), Fe(n, "focus", r, s);
119
+ Fe(n, "blur", (f) => {
120
+ f.relatedTarget === null && c();
121
+ }, s), Fe(n, "focus", c, s);
122
122
  }
123
- return u && rn(c, r, { document: a }), r(), c;
123
+ return u && rn(r, c, { document: a }), c(), r;
124
124
  }
125
125
  const un = "focusin", dn = "focusout", fn = ":focus-within";
126
126
  function vn(e, t = {}) {
127
- const { window: n = De } = t, l = E(() => Le(e)), u = re(!1), a = E(() => u.value);
127
+ const { window: n = De } = t, l = $(() => Le(e)), u = re(!1), a = $(() => u.value);
128
128
  if (!n || !(/* @__PURE__ */ cn(t)).value) return { focused: a };
129
129
  const o = { passive: !0 };
130
130
  return Fe(l, un, () => u.value = !0, o), Fe(l, dn, () => {
131
- var c, r, s;
132
- return u.value = (c = (r = l.value) === null || r === void 0 || (s = r.matches) === null || s === void 0 ? void 0 : s.call(r, fn)) !== null && c !== void 0 ? c : !1;
131
+ var r, c, s;
132
+ return u.value = (r = (c = l.value) === null || c === void 0 || (s = c.matches) === null || s === void 0 ? void 0 : s.call(c, fn)) !== null && r !== void 0 ? r : !1;
133
133
  }, o), { focused: a };
134
134
  }
135
135
  function hn(e, { window: t = De, scrollTarget: n } = {}) {
@@ -139,8 +139,8 @@ function hn(e, { window: t = De, scrollTarget: n } = {}) {
139
139
  if (!o)
140
140
  l.value = !1;
141
141
  else {
142
- const c = o.getBoundingClientRect();
143
- l.value = c.top <= (t.innerHeight || a.documentElement.clientHeight) && c.left <= (t.innerWidth || a.documentElement.clientWidth) && c.bottom >= 0 && c.right >= 0;
142
+ const r = o.getBoundingClientRect();
143
+ l.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
144
144
  }
145
145
  };
146
146
  return ue(
@@ -152,10 +152,10 @@ function hn(e, { window: t = De, scrollTarget: n } = {}) {
152
152
  passive: !0
153
153
  }), l;
154
154
  }
155
- const Me = (e) => {
155
+ const ke = (e) => {
156
156
  let t = hn(e).value;
157
157
  return t = t && e.offsetHeight > 0, t;
158
- }, ke = (e) => e.tabIndex >= 0, bt = (e) => {
158
+ }, Me = (e) => e.tabIndex >= 0, bt = (e) => {
159
159
  if (e.target instanceof HTMLElement)
160
160
  return rt(e.target);
161
161
  }, rt = (e) => {
@@ -170,7 +170,7 @@ const Me = (e) => {
170
170
  const n = e.previousElementSibling;
171
171
  n instanceof HTMLTableRowElement && (t = n);
172
172
  }
173
- return t && (!ke(t) || !Me(t)) ? rt(t) : t;
173
+ return t && (!Me(t) || !ke(t)) ? rt(t) : t;
174
174
  }, mn = (e) => {
175
175
  if (!(e.target instanceof HTMLElement)) return;
176
176
  const t = e.target;
@@ -188,7 +188,7 @@ const Me = (e) => {
188
188
  u instanceof HTMLTableRowElement && (n = u);
189
189
  }
190
190
  }
191
- return n && (!ke(n) || !Me(n)) ? ct(n) : n;
191
+ return n && (!Me(n) || !ke(n)) ? ct(n) : n;
192
192
  }, Ct = (e) => {
193
193
  if (e.target instanceof HTMLElement)
194
194
  return ct(e.target);
@@ -204,7 +204,7 @@ const Me = (e) => {
204
204
  const n = e.nextElementSibling;
205
205
  n instanceof HTMLTableRowElement && (t = n);
206
206
  }
207
- return t && (!ke(t) || !Me(t)) ? ct(t) : t;
207
+ return t && (!Me(t) || !ke(t)) ? ct(t) : t;
208
208
  }, gn = (e) => {
209
209
  if (!(e.target instanceof HTMLElement)) return;
210
210
  const t = e.target;
@@ -222,8 +222,8 @@ const Me = (e) => {
222
222
  u instanceof HTMLTableRowElement && (n = u);
223
223
  }
224
224
  }
225
- return n && (!ke(n) || !Me(n)) ? rt(n) : n;
226
- }, Mt = (e) => {
225
+ return n && (!Me(n) || !ke(n)) ? rt(n) : n;
226
+ }, kt = (e) => {
227
227
  if (e.target instanceof HTMLElement)
228
228
  return ut(e.target);
229
229
  }, ut = (e) => {
@@ -235,8 +235,8 @@ const Me = (e) => {
235
235
  const l = e.parentElement?.previousElementSibling?.lastElementChild;
236
236
  l instanceof HTMLElement && (t = l);
237
237
  }
238
- return t && (!ke(t) || !Me(t)) ? ut(t) : t;
239
- }, kt = (e) => {
238
+ return t && (!Me(t) || !ke(t)) ? ut(t) : t;
239
+ }, Mt = (e) => {
240
240
  if (e.target instanceof HTMLElement)
241
241
  return dt(e.target);
242
242
  }, dt = (e) => {
@@ -248,15 +248,15 @@ const Me = (e) => {
248
248
  const l = e.parentElement?.nextElementSibling?.firstElementChild;
249
249
  l instanceof HTMLElement && (t = l);
250
250
  }
251
- return t && (!ke(t) || !Me(t)) ? dt(t) : t;
251
+ return t && (!Me(t) || !ke(t)) ? dt(t) : t;
252
252
  }, Rt = (e) => {
253
253
  if (!(e.target instanceof HTMLElement)) return;
254
254
  const t = e.target.parentElement?.firstElementChild, n = t instanceof HTMLElement ? t : null;
255
- return n && (!ke(n) || !Me(n)) ? dt(n) : n;
255
+ return n && (!Me(n) || !ke(n)) ? dt(n) : n;
256
256
  }, Et = (e) => {
257
257
  if (!(e.target instanceof HTMLElement)) return;
258
258
  const t = e.target.parentElement?.lastElementChild, n = t instanceof HTMLElement ? t : null;
259
- return n && (!ke(n) || !Me(n)) ? ut(n) : n;
259
+ return n && (!Me(n) || !ke(n)) ? ut(n) : n;
260
260
  }, ze = ["alt", "control", "shift", "meta"], wn = {
261
261
  ArrowUp: "up",
262
262
  ArrowDown: "down",
@@ -272,11 +272,11 @@ const Me = (e) => {
272
272
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
273
273
  },
274
274
  "keydown.left": (e) => {
275
- const t = Mt(e);
275
+ const t = kt(e);
276
276
  e.preventDefault(), e.stopPropagation(), t && t.focus();
277
277
  },
278
278
  "keydown.right": (e) => {
279
- const t = kt(e);
279
+ const t = Mt(e);
280
280
  e.preventDefault(), e.stopPropagation(), t && t.focus();
281
281
  },
282
282
  "keydown.control.up": (e) => {
@@ -318,11 +318,11 @@ const Me = (e) => {
318
318
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
319
319
  },
320
320
  "keydown.tab": (e) => {
321
- const t = kt(e);
321
+ const t = Mt(e);
322
322
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
323
323
  },
324
324
  "keydown.shift.tab": (e) => {
325
- const t = Mt(e);
325
+ const t = kt(e);
326
326
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
327
327
  }
328
328
  };
@@ -333,57 +333,57 @@ function Ke(e) {
333
333
  function ft(e) {
334
334
  const t = (a) => {
335
335
  const o = Ke(a);
336
- let c = [];
336
+ let r = [];
337
337
  if (typeof a.selectors == "string")
338
- c = Array.from(o ? o.querySelectorAll(a.selectors) : document.querySelectorAll(a.selectors));
338
+ r = Array.from(o ? o.querySelectorAll(a.selectors) : document.querySelectorAll(a.selectors));
339
339
  else if (Array.isArray(a.selectors))
340
- for (const r of a.selectors)
341
- r instanceof HTMLElement ? c.push(r) : c.push(r.$el);
340
+ for (const c of a.selectors)
341
+ c instanceof HTMLElement ? r.push(c) : r.push(c.$el);
342
342
  else if (a.selectors instanceof HTMLElement)
343
- c.push(a.selectors);
343
+ r.push(a.selectors);
344
344
  else if (a.selectors?.value)
345
345
  if (Array.isArray(a.selectors.value))
346
- for (const r of a.selectors.value)
347
- r instanceof HTMLElement ? c.push(r) : c.push(r.$el);
346
+ for (const c of a.selectors.value)
347
+ c instanceof HTMLElement ? r.push(c) : r.push(c.$el);
348
348
  else
349
- c.push(a.selectors.value);
350
- return c;
349
+ r.push(a.selectors.value);
350
+ return r;
351
351
  }, n = (a) => {
352
352
  const o = Ke(a);
353
- let c = [];
354
- return a.selectors ? c = t(a) : o && (c = Array.from(o.children).filter((r) => r instanceof HTMLElement).filter((r) => ke(r) && Me(r))), c;
353
+ let r = [];
354
+ return a.selectors ? r = t(a) : o && (r = Array.from(o.children).filter((c) => c instanceof HTMLElement).filter((c) => Me(c) && ke(c))), r;
355
355
  }, l = (a) => (o) => {
356
- const c = wn[o.key] || o.key.toLowerCase();
357
- if (ze.includes(c)) return;
358
- const r = a.handlers || qe;
359
- for (const s of Object.keys(r)) {
360
- const [d, ...v] = s.split(".");
361
- if (d === "keydown" && v.includes(c)) {
362
- const y = r[s], P = v.filter((M) => ze.includes(M)), F = ze.some((M) => {
363
- const h = M.charAt(0).toUpperCase() + M.slice(1);
364
- return o.getModifierState(h);
356
+ const r = wn[o.key] || o.key.toLowerCase();
357
+ if (ze.includes(r)) return;
358
+ const c = a.handlers || qe;
359
+ for (const s of Object.keys(c)) {
360
+ const [f, ...v] = s.split(".");
361
+ if (f === "keydown" && v.includes(r)) {
362
+ const x = c[s], I = v.filter((R) => ze.includes(R)), P = ze.some((R) => {
363
+ const w = R.charAt(0).toUpperCase() + R.slice(1);
364
+ return o.getModifierState(w);
365
365
  });
366
- if (P.length > 0) {
367
- if (F) {
368
- for (const M of ze)
369
- if (v.includes(M)) {
370
- const h = M.charAt(0).toUpperCase() + M.slice(1);
371
- o.getModifierState(h) && y(o);
366
+ if (I.length > 0) {
367
+ if (P) {
368
+ for (const R of ze)
369
+ if (v.includes(R)) {
370
+ const w = R.charAt(0).toUpperCase() + R.slice(1);
371
+ o.getModifierState(w) && x(o);
372
372
  }
373
373
  }
374
374
  } else
375
- F || y(o);
375
+ P || x(o);
376
376
  }
377
377
  }
378
378
  }, u = [];
379
379
  Ae(() => {
380
380
  for (const a of e) {
381
- const o = Ke(a), c = n(a), r = l(a), s = o ? [o] : c;
382
- for (const d of s) {
383
- const { focused: v } = vn(z(d)), y = ue(v, (P) => {
384
- P ? d.addEventListener("keydown", r) : d.removeEventListener("keydown", r);
381
+ const o = Ke(a), r = n(a), c = l(a), s = o ? [o] : r;
382
+ for (const f of s) {
383
+ const { focused: v } = vn(z(f)), x = ue(v, (I) => {
384
+ I ? f.addEventListener("keydown", c) : f.removeEventListener("keydown", c);
385
385
  });
386
- u.push(y);
386
+ u.push(x);
387
387
  }
388
388
  }
389
389
  }), Pt(() => {
@@ -392,18 +392,18 @@ function ft(e) {
392
392
  });
393
393
  }
394
394
  function vt(e, t) {
395
- return $t() ? (It(e, t), !0) : !1;
395
+ return $t() ? (Tt(e, t), !0) : !1;
396
396
  }
397
397
  const At = typeof window < "u" && typeof document < "u";
398
398
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
399
- const pn = (e) => e != null, xn = Object.prototype.toString, yn = (e) => xn.call(e) === "[object Object]", Te = () => {
399
+ const pn = (e) => e != null, xn = Object.prototype.toString, yn = (e) => xn.call(e) === "[object Object]", Ie = () => {
400
400
  };
401
401
  function bn(...e) {
402
402
  if (e.length !== 1) return Wt(...e);
403
403
  const t = e[0];
404
- return typeof t == "function" ? zt(Tt(() => ({
404
+ return typeof t == "function" ? zt(It(() => ({
405
405
  get: t,
406
- set: Te
406
+ set: Ie
407
407
  }))) : z(t);
408
408
  }
409
409
  function Cn(e, t) {
@@ -418,19 +418,19 @@ function Cn(e, t) {
418
418
  }
419
419
  return n;
420
420
  }
421
- function Mn(e, t = {}) {
422
- let n, l, u = Te;
423
- const a = (r) => {
424
- clearTimeout(r), u(), u = Te;
421
+ function kn(e, t = {}) {
422
+ let n, l, u = Ie;
423
+ const a = (c) => {
424
+ clearTimeout(c), u(), u = Ie;
425
425
  };
426
426
  let o;
427
- return (r) => {
428
- const s = A(e), d = A(t.maxWait);
429
- return n && a(n), s <= 0 || d !== void 0 && d <= 0 ? (l && (a(l), l = void 0), Promise.resolve(r())) : new Promise((v, y) => {
430
- u = t.rejectOnCancel ? y : v, o = r, d && !l && (l = setTimeout(() => {
427
+ return (c) => {
428
+ const s = H(e), f = H(t.maxWait);
429
+ return n && a(n), s <= 0 || f !== void 0 && f <= 0 ? (l && (a(l), l = void 0), Promise.resolve(c())) : new Promise((v, x) => {
430
+ u = t.rejectOnCancel ? x : v, o = c, f && !l && (l = setTimeout(() => {
431
431
  n && a(n), l = void 0, v(o());
432
- }, d)), n = setTimeout(() => {
433
- l && a(l), l = void 0, v(r());
432
+ }, f)), n = setTimeout(() => {
433
+ l && a(l), l = void 0, v(c());
434
434
  }, s);
435
435
  });
436
436
  };
@@ -438,23 +438,23 @@ function Mn(e, t = {}) {
438
438
  function Ye(e) {
439
439
  return Array.isArray(e) ? e : [e];
440
440
  }
441
- function kn(e) {
441
+ function Mn(e) {
442
442
  return lt();
443
443
  }
444
444
  // @__NO_SIDE_EFFECTS__
445
445
  function Rn(e, t = 200, n = {}) {
446
- return Cn(Mn(t, n), e);
446
+ return Cn(kn(t, n), e);
447
447
  }
448
448
  function En(e, t = {}) {
449
449
  if (!Nt(e)) return Ft(e);
450
450
  const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
451
- for (const l in e.value) n[l] = Tt(() => ({
451
+ for (const l in e.value) n[l] = It(() => ({
452
452
  get() {
453
453
  return e.value[l];
454
454
  },
455
455
  set(u) {
456
456
  var a;
457
- if (!((a = A(t.replaceRef)) !== null && a !== void 0) || a) if (Array.isArray(e.value)) {
457
+ if (!((a = H(t.replaceRef)) !== null && a !== void 0) || a) if (Array.isArray(e.value)) {
458
458
  const o = [...e.value];
459
459
  o[l] = u, e.value = o;
460
460
  } else {
@@ -470,9 +470,9 @@ function En(e, t = {}) {
470
470
  return n;
471
471
  }
472
472
  function $n(e, t = !0, n) {
473
- kn() ? Ae(e, n) : t ? e() : at(e);
473
+ Mn() ? Ae(e, n) : t ? e() : at(e);
474
474
  }
475
- function In(e, t, n) {
475
+ function Tn(e, t, n) {
476
476
  return ue(e, t, {
477
477
  ...n,
478
478
  immediate: !0
@@ -481,97 +481,97 @@ function In(e, t, n) {
481
481
  const We = At ? window : void 0;
482
482
  function we(e) {
483
483
  var t;
484
- const n = A(e);
484
+ const n = H(e);
485
485
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
486
486
  }
487
487
  function Ee(...e) {
488
- const t = (l, u, a, o) => (l.addEventListener(u, a, o), () => l.removeEventListener(u, a, o)), n = E(() => {
489
- const l = Ye(A(e[0])).filter((u) => u != null);
488
+ const t = (l, u, a, o) => (l.addEventListener(u, a, o), () => l.removeEventListener(u, a, o)), n = $(() => {
489
+ const l = Ye(H(e[0])).filter((u) => u != null);
490
490
  return l.every((u) => typeof u != "string") ? l : void 0;
491
491
  });
492
- return In(() => {
492
+ return Tn(() => {
493
493
  var l, u;
494
494
  return [
495
495
  (l = (u = n.value) === null || u === void 0 ? void 0 : u.map((a) => we(a))) !== null && l !== void 0 ? l : [We].filter((a) => a != null),
496
- Ye(A(n.value ? e[1] : e[0])),
497
- Ye(O(n.value ? e[2] : e[1])),
498
- A(n.value ? e[3] : e[2])
496
+ Ye(H(n.value ? e[1] : e[0])),
497
+ Ye(B(n.value ? e[2] : e[1])),
498
+ H(n.value ? e[3] : e[2])
499
499
  ];
500
- }, ([l, u, a, o], c, r) => {
500
+ }, ([l, u, a, o], r, c) => {
501
501
  if (!l?.length || !u?.length || !a?.length) return;
502
- const s = yn(o) ? { ...o } : o, d = l.flatMap((v) => u.flatMap((y) => a.map((P) => t(v, y, P, s))));
503
- r(() => {
504
- d.forEach((v) => v());
502
+ const s = yn(o) ? { ...o } : o, f = l.flatMap((v) => u.flatMap((x) => a.map((I) => t(v, x, I, s))));
503
+ c(() => {
504
+ f.forEach((v) => v());
505
505
  });
506
506
  }, { flush: "post" });
507
507
  }
508
508
  function ot(e, t, n = {}) {
509
- const { window: l = We, ignore: u = [], capture: a = !0, detectIframe: o = !1, controls: c = !1 } = n;
510
- if (!l) return c ? {
511
- stop: Te,
512
- cancel: Te,
513
- trigger: Te
514
- } : Te;
515
- let r = !0;
516
- const s = (h) => A(u).some((m) => {
517
- if (typeof m == "string") return Array.from(l.document.querySelectorAll(m)).some((g) => g === h.target || h.composedPath().includes(g));
509
+ const { window: l = We, ignore: u = [], capture: a = !0, detectIframe: o = !1, controls: r = !1 } = n;
510
+ if (!l) return r ? {
511
+ stop: Ie,
512
+ cancel: Ie,
513
+ trigger: Ie
514
+ } : Ie;
515
+ let c = !0;
516
+ const s = (w) => H(u).some((h) => {
517
+ if (typeof h == "string") return Array.from(l.document.querySelectorAll(h)).some((m) => m === w.target || w.composedPath().includes(m));
518
518
  {
519
- const g = we(m);
520
- return g && (h.target === g || h.composedPath().includes(g));
519
+ const m = we(h);
520
+ return m && (w.target === m || w.composedPath().includes(m));
521
521
  }
522
522
  });
523
- function d(h) {
524
- const m = A(h);
525
- return m && m.$.subTree.shapeFlag === 16;
523
+ function f(w) {
524
+ const h = H(w);
525
+ return h && h.$.subTree.shapeFlag === 16;
526
526
  }
527
- function v(h, m) {
528
- const g = A(h), k = g.$.subTree && g.$.subTree.children;
529
- return k == null || !Array.isArray(k) ? !1 : k.some((x) => x.el === m.target || m.composedPath().includes(x.el));
527
+ function v(w, h) {
528
+ const m = H(w), C = m.$.subTree && m.$.subTree.children;
529
+ return C == null || !Array.isArray(C) ? !1 : C.some((b) => b.el === h.target || h.composedPath().includes(b.el));
530
530
  }
531
- const y = (h) => {
532
- const m = we(e);
533
- if (h.target != null && !(!(m instanceof Element) && d(e) && v(e, h)) && !(!m || m === h.target || h.composedPath().includes(m))) {
534
- if ("detail" in h && h.detail === 0 && (r = !s(h)), !r) {
535
- r = !0;
531
+ const x = (w) => {
532
+ const h = we(e);
533
+ if (w.target != null && !(!(h instanceof Element) && f(e) && v(e, w)) && !(!h || h === w.target || w.composedPath().includes(h))) {
534
+ if ("detail" in w && w.detail === 0 && (c = !s(w)), !c) {
535
+ c = !0;
536
536
  return;
537
537
  }
538
- t(h);
538
+ t(w);
539
539
  }
540
540
  };
541
- let P = !1;
542
- const F = [
543
- Ee(l, "click", (h) => {
544
- P || (P = !0, setTimeout(() => {
545
- P = !1;
546
- }, 0), y(h));
541
+ let I = !1;
542
+ const P = [
543
+ Ee(l, "click", (w) => {
544
+ I || (I = !0, setTimeout(() => {
545
+ I = !1;
546
+ }, 0), x(w));
547
547
  }, {
548
548
  passive: !0,
549
549
  capture: a
550
550
  }),
551
- Ee(l, "pointerdown", (h) => {
552
- const m = we(e);
553
- r = !s(h) && !!(m && !h.composedPath().includes(m));
551
+ Ee(l, "pointerdown", (w) => {
552
+ const h = we(e);
553
+ c = !s(w) && !!(h && !w.composedPath().includes(h));
554
554
  }, { passive: !0 }),
555
- o && Ee(l, "blur", (h) => {
555
+ o && Ee(l, "blur", (w) => {
556
556
  setTimeout(() => {
557
- var m;
558
- const g = we(e);
559
- ((m = l.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !g?.contains(l.document.activeElement) && t(h);
557
+ var h;
558
+ const m = we(e);
559
+ ((h = l.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !m?.contains(l.document.activeElement) && t(w);
560
560
  }, 0);
561
561
  }, { passive: !0 })
562
- ].filter(Boolean), M = () => F.forEach((h) => h());
563
- return c ? {
564
- stop: M,
562
+ ].filter(Boolean), R = () => P.forEach((w) => w());
563
+ return r ? {
564
+ stop: R,
565
565
  cancel: () => {
566
- r = !1;
566
+ c = !1;
567
567
  },
568
- trigger: (h) => {
569
- r = !0, y(h), r = !1;
568
+ trigger: (w) => {
569
+ c = !0, x(w), c = !1;
570
570
  }
571
- } : M;
571
+ } : R;
572
572
  }
573
573
  // @__NO_SIDE_EFFECTS__
574
- function Tn() {
574
+ function In() {
575
575
  const e = re(!1), t = lt();
576
576
  return t && Ae(() => {
577
577
  e.value = !0;
@@ -579,28 +579,28 @@ function Tn() {
579
579
  }
580
580
  // @__NO_SIDE_EFFECTS__
581
581
  function Ht(e) {
582
- const t = /* @__PURE__ */ Tn();
583
- return E(() => (t.value, !!e()));
582
+ const t = /* @__PURE__ */ In();
583
+ return $(() => (t.value, !!e()));
584
584
  }
585
585
  function Lt(e, t, n = {}) {
586
586
  const { window: l = We, ...u } = n;
587
587
  let a;
588
- const o = /* @__PURE__ */ Ht(() => l && "MutationObserver" in l), c = () => {
588
+ const o = /* @__PURE__ */ Ht(() => l && "MutationObserver" in l), r = () => {
589
589
  a && (a.disconnect(), a = void 0);
590
- }, r = ue(E(() => {
591
- const v = Ye(A(e)).map(we).filter(pn);
590
+ }, c = ue($(() => {
591
+ const v = Ye(H(e)).map(we).filter(pn);
592
592
  return new Set(v);
593
593
  }), (v) => {
594
- c(), o.value && v.size && (a = new MutationObserver(t), v.forEach((y) => a.observe(y, u)));
594
+ r(), o.value && v.size && (a = new MutationObserver(t), v.forEach((x) => a.observe(x, u)));
595
595
  }, {
596
596
  immediate: !0,
597
597
  flush: "post"
598
- }), s = () => a?.takeRecords(), d = () => {
599
- r(), c();
598
+ }), s = () => a?.takeRecords(), f = () => {
599
+ c(), r();
600
600
  };
601
- return vt(d), {
601
+ return vt(f), {
602
602
  isSupported: o,
603
- stop: d,
603
+ stop: f,
604
604
  takeRecords: s
605
605
  };
606
606
  }
@@ -614,19 +614,19 @@ function Sn(e) {
614
614
  }
615
615
  function _e(e, t = {}) {
616
616
  var n, l, u, a;
617
- const { pointerTypes: o, preventDefault: c, stopPropagation: r, exact: s, onMove: d, onEnd: v, onStart: y, initialValue: P, axis: F = "both", draggingElement: M = We, containerElement: h, handle: m = e, buttons: g = [0], restrictInView: k, autoScroll: x = !1 } = t, R = z((n = A(P)) !== null && n !== void 0 ? n : {
617
+ const { pointerTypes: o, preventDefault: r, stopPropagation: c, exact: s, onMove: f, onEnd: v, onStart: x, initialValue: I, axis: P = "both", draggingElement: R = We, containerElement: w, handle: h = e, buttons: m = [0], restrictInView: C, autoScroll: b = !1 } = t, p = z((n = H(I)) !== null && n !== void 0 ? n : {
618
618
  x: 0,
619
619
  y: 0
620
- }), B = z(), j = (C) => o ? o.includes(C.pointerType) : !0, I = (C) => {
621
- A(c) && C.preventDefault(), A(r) && C.stopPropagation();
622
- }, V = A(x), Z = typeof V == "object" ? {
623
- speed: (l = A(V.speed)) !== null && l !== void 0 ? l : Xe.speed,
624
- margin: (u = A(V.margin)) !== null && u !== void 0 ? u : Xe.margin,
625
- direction: (a = V.direction) !== null && a !== void 0 ? a : Xe.direction
626
- } : Xe, q = (C) => typeof C == "number" ? [C, C] : [C.x, C.y], _ = (C, H, W) => {
627
- const { clientWidth: Q, clientHeight: X, scrollLeft: oe, scrollTop: ye, scrollWidth: Re, scrollHeight: $ } = C, [D, Y] = q(Z.margin), [G, K] = q(Z.speed);
620
+ }), O = z(), j = (M) => o ? o.includes(M.pointerType) : !0, E = (M) => {
621
+ H(r) && M.preventDefault(), H(c) && M.stopPropagation();
622
+ }, Z = H(b), N = typeof Z == "object" ? {
623
+ speed: (l = H(Z.speed)) !== null && l !== void 0 ? l : Xe.speed,
624
+ margin: (u = H(Z.margin)) !== null && u !== void 0 ? u : Xe.margin,
625
+ direction: (a = Z.direction) !== null && a !== void 0 ? a : Xe.direction
626
+ } : Xe, q = (M) => typeof M == "number" ? [M, M] : [M.x, M.y], _ = (M, L, W) => {
627
+ const { clientWidth: Q, clientHeight: X, scrollLeft: oe, scrollTop: ye, scrollWidth: Re, scrollHeight: T } = M, [V, Y] = q(N.margin), [G, K] = q(N.speed);
628
628
  let te = 0, le = 0;
629
- (Z.direction === "x" || Z.direction === "both") && (W.x < D && oe > 0 ? te = -G : W.x + H.width > Q - D && oe < Re - Q && (te = G)), (Z.direction === "y" || Z.direction === "both") && (W.y < Y && ye > 0 ? le = -K : W.y + H.height > X - Y && ye < $ - X && (le = K)), (te || le) && C.scrollBy({
629
+ (N.direction === "x" || N.direction === "both") && (W.x < V && oe > 0 ? te = -G : W.x + L.width > Q - V && oe < Re - Q && (te = G)), (N.direction === "y" || N.direction === "both") && (W.y < Y && ye > 0 ? le = -K : W.y + L.height > X - Y && ye < T - X && (le = K)), (te || le) && M.scrollBy({
630
630
  left: te,
631
631
  top: le,
632
632
  behavior: "auto"
@@ -634,138 +634,138 @@ function _e(e, t = {}) {
634
634
  };
635
635
  let ne = null;
636
636
  const ge = () => {
637
- const C = A(h);
638
- C && !ne && (ne = setInterval(() => {
639
- const H = A(e).getBoundingClientRect(), { x: W, y: Q } = R.value, X = {
640
- x: W - C.scrollLeft,
641
- y: Q - C.scrollTop
637
+ const M = H(w);
638
+ M && !ne && (ne = setInterval(() => {
639
+ const L = H(e).getBoundingClientRect(), { x: W, y: Q } = p.value, X = {
640
+ x: W - M.scrollLeft,
641
+ y: Q - M.scrollTop
642
642
  };
643
- X.x >= 0 && X.y >= 0 && (_(C, H, X), X.x += C.scrollLeft, X.y += C.scrollTop, R.value = X);
643
+ X.x >= 0 && X.y >= 0 && (_(M, L, X), X.x += M.scrollLeft, X.y += M.scrollTop, p.value = X);
644
644
  }, 1e3 / 60));
645
645
  }, ve = () => {
646
646
  ne && (clearInterval(ne), ne = null);
647
- }, Oe = (C, H, W, Q) => {
648
- const [X, oe] = typeof W == "number" ? [W, W] : [W.x, W.y], { clientWidth: ye, clientHeight: Re } = H;
649
- return C.x < X || C.x + Q.width > ye - X || C.y < oe || C.y + Q.height > Re - oe;
647
+ }, Oe = (M, L, W, Q) => {
648
+ const [X, oe] = typeof W == "number" ? [W, W] : [W.x, W.y], { clientWidth: ye, clientHeight: Re } = L;
649
+ return M.x < X || M.x + Q.width > ye - X || M.y < oe || M.y + Q.height > Re - oe;
650
650
  }, Ve = () => {
651
- if (A(t.disabled) || !B.value) return;
652
- const C = A(h);
653
- if (!C) return;
654
- const H = A(e).getBoundingClientRect(), { x: W, y: Q } = R.value;
651
+ if (H(t.disabled) || !O.value) return;
652
+ const M = H(w);
653
+ if (!M) return;
654
+ const L = H(e).getBoundingClientRect(), { x: W, y: Q } = p.value;
655
655
  Oe({
656
- x: W - C.scrollLeft,
657
- y: Q - C.scrollTop
658
- }, C, Z.margin, H) ? ge() : ve();
656
+ x: W - M.scrollLeft,
657
+ y: Q - M.scrollTop
658
+ }, M, N.margin, L) ? ge() : ve();
659
659
  };
660
- A(x) && ue(R, Ve);
661
- const Be = (C) => {
662
- var H;
663
- if (!A(g).includes(C.button) || A(t.disabled) || !j(C) || A(s) && C.target !== A(e)) return;
664
- const W = A(h), Q = W == null || (H = W.getBoundingClientRect) === null || H === void 0 ? void 0 : H.call(W), X = A(e).getBoundingClientRect(), oe = {
665
- x: C.clientX - (W ? X.left - Q.left + (x ? 0 : W.scrollLeft) : X.left),
666
- y: C.clientY - (W ? X.top - Q.top + (x ? 0 : W.scrollTop) : X.top)
660
+ H(b) && ue(p, Ve);
661
+ const Be = (M) => {
662
+ var L;
663
+ if (!H(m).includes(M.button) || H(t.disabled) || !j(M) || H(s) && M.target !== H(e)) return;
664
+ const W = H(w), Q = W == null || (L = W.getBoundingClientRect) === null || L === void 0 ? void 0 : L.call(W), X = H(e).getBoundingClientRect(), oe = {
665
+ x: M.clientX - (W ? X.left - Q.left + (b ? 0 : W.scrollLeft) : X.left),
666
+ y: M.clientY - (W ? X.top - Q.top + (b ? 0 : W.scrollTop) : X.top)
667
667
  };
668
- y?.(oe, C) !== !1 && (B.value = oe, I(C));
669
- }, Pe = (C) => {
670
- if (A(t.disabled) || !j(C) || !B.value) return;
671
- const H = A(h);
672
- H instanceof HTMLElement && Sn(H);
673
- const W = A(e).getBoundingClientRect();
674
- let { x: Q, y: X } = R.value;
675
- if ((F === "x" || F === "both") && (Q = C.clientX - B.value.x, H && (Q = Math.min(Math.max(0, Q), H.scrollWidth - W.width))), (F === "y" || F === "both") && (X = C.clientY - B.value.y, H && (X = Math.min(Math.max(0, X), H.scrollHeight - W.height))), A(x) && H && (ne === null && _(H, W, {
668
+ x?.(oe, M) !== !1 && (O.value = oe, E(M));
669
+ }, Pe = (M) => {
670
+ if (H(t.disabled) || !j(M) || !O.value) return;
671
+ const L = H(w);
672
+ L instanceof HTMLElement && Sn(L);
673
+ const W = H(e).getBoundingClientRect();
674
+ let { x: Q, y: X } = p.value;
675
+ if ((P === "x" || P === "both") && (Q = M.clientX - O.value.x, L && (Q = Math.min(Math.max(0, Q), L.scrollWidth - W.width))), (P === "y" || P === "both") && (X = M.clientY - O.value.y, L && (X = Math.min(Math.max(0, X), L.scrollHeight - W.height))), H(b) && L && (ne === null && _(L, W, {
676
676
  x: Q,
677
677
  y: X
678
- }), Q += H.scrollLeft, X += H.scrollTop), H && (k || x)) {
679
- if (F !== "y") {
680
- const oe = Q - H.scrollLeft;
681
- oe < 0 ? Q = H.scrollLeft : oe > H.clientWidth - W.width && (Q = H.clientWidth - W.width + H.scrollLeft);
678
+ }), Q += L.scrollLeft, X += L.scrollTop), L && (C || b)) {
679
+ if (P !== "y") {
680
+ const oe = Q - L.scrollLeft;
681
+ oe < 0 ? Q = L.scrollLeft : oe > L.clientWidth - W.width && (Q = L.clientWidth - W.width + L.scrollLeft);
682
682
  }
683
- if (F !== "x") {
684
- const oe = X - H.scrollTop;
685
- oe < 0 ? X = H.scrollTop : oe > H.clientHeight - W.height && (X = H.clientHeight - W.height + H.scrollTop);
683
+ if (P !== "x") {
684
+ const oe = X - L.scrollTop;
685
+ oe < 0 ? X = L.scrollTop : oe > L.clientHeight - W.height && (X = L.clientHeight - W.height + L.scrollTop);
686
686
  }
687
687
  }
688
- R.value = {
688
+ p.value = {
689
689
  x: Q,
690
690
  y: X
691
- }, d?.(R.value, C), I(C);
692
- }, He = (C) => {
693
- A(t.disabled) || !j(C) || B.value && (B.value = void 0, x && ve(), v?.(R.value, C), I(C));
691
+ }, f?.(p.value, M), E(M);
692
+ }, He = (M) => {
693
+ H(t.disabled) || !j(M) || O.value && (O.value = void 0, b && ve(), v?.(p.value, M), E(M));
694
694
  };
695
695
  if (At) {
696
- const C = () => {
697
- var H;
696
+ const M = () => {
697
+ var L;
698
698
  return {
699
- capture: (H = t.capture) !== null && H !== void 0 ? H : !0,
700
- passive: !A(c)
699
+ capture: (L = t.capture) !== null && L !== void 0 ? L : !0,
700
+ passive: !H(r)
701
701
  };
702
702
  };
703
- Ee(m, "pointerdown", Be, C), Ee(M, "pointermove", Pe, C), Ee(M, "pointerup", He, C);
703
+ Ee(h, "pointerdown", Be, M), Ee(R, "pointermove", Pe, M), Ee(R, "pointerup", He, M);
704
704
  }
705
705
  return {
706
- ...En(R),
707
- position: R,
708
- isDragging: E(() => !!B.value),
709
- style: E(() => `
710
- left: ${R.value.x}px;
711
- top: ${R.value.y}px;
712
- ${x ? "text-wrap: nowrap;" : ""}
706
+ ...En(p),
707
+ position: p,
708
+ isDragging: $(() => !!O.value),
709
+ style: $(() => `
710
+ left: ${p.value.x}px;
711
+ top: ${p.value.y}px;
712
+ ${b ? "text-wrap: nowrap;" : ""}
713
713
  `)
714
714
  };
715
715
  }
716
716
  function Je(e, t, n = {}) {
717
717
  const { window: l = We, ...u } = n;
718
718
  let a;
719
- const o = /* @__PURE__ */ Ht(() => l && "ResizeObserver" in l), c = () => {
719
+ const o = /* @__PURE__ */ Ht(() => l && "ResizeObserver" in l), r = () => {
720
720
  a && (a.disconnect(), a = void 0);
721
- }, r = ue(E(() => {
722
- const d = A(e);
723
- return Array.isArray(d) ? d.map((v) => we(v)) : [we(d)];
724
- }), (d) => {
725
- if (c(), o.value && l) {
721
+ }, c = ue($(() => {
722
+ const f = H(e);
723
+ return Array.isArray(f) ? f.map((v) => we(v)) : [we(f)];
724
+ }), (f) => {
725
+ if (r(), o.value && l) {
726
726
  a = new ResizeObserver(t);
727
- for (const v of d) v && a.observe(v, u);
727
+ for (const v of f) v && a.observe(v, u);
728
728
  }
729
729
  }, {
730
730
  immediate: !0,
731
731
  flush: "post"
732
732
  }), s = () => {
733
- c(), r();
733
+ r(), c();
734
734
  };
735
735
  return vt(s), {
736
736
  isSupported: o,
737
737
  stop: s
738
738
  };
739
739
  }
740
- function Ie(e, t = {}) {
741
- const { reset: n = !0, windowResize: l = !0, windowScroll: u = !0, immediate: a = !0, updateTiming: o = "sync" } = t, c = re(0), r = re(0), s = re(0), d = re(0), v = re(0), y = re(0), P = re(0), F = re(0);
742
- function M() {
743
- const m = we(e);
744
- if (!m) {
745
- n && (c.value = 0, r.value = 0, s.value = 0, d.value = 0, v.value = 0, y.value = 0, P.value = 0, F.value = 0);
740
+ function Te(e, t = {}) {
741
+ const { reset: n = !0, windowResize: l = !0, windowScroll: u = !0, immediate: a = !0, updateTiming: o = "sync" } = t, r = re(0), c = re(0), s = re(0), f = re(0), v = re(0), x = re(0), I = re(0), P = re(0);
742
+ function R() {
743
+ const h = we(e);
744
+ if (!h) {
745
+ n && (r.value = 0, c.value = 0, s.value = 0, f.value = 0, v.value = 0, x.value = 0, I.value = 0, P.value = 0);
746
746
  return;
747
747
  }
748
- const g = m.getBoundingClientRect();
749
- c.value = g.height, r.value = g.bottom, s.value = g.left, d.value = g.right, v.value = g.top, y.value = g.width, P.value = g.x, F.value = g.y;
748
+ const m = h.getBoundingClientRect();
749
+ r.value = m.height, c.value = m.bottom, s.value = m.left, f.value = m.right, v.value = m.top, x.value = m.width, I.value = m.x, P.value = m.y;
750
750
  }
751
- function h() {
752
- o === "sync" ? M() : o === "next-frame" && requestAnimationFrame(() => M());
751
+ function w() {
752
+ o === "sync" ? R() : o === "next-frame" && requestAnimationFrame(() => R());
753
753
  }
754
- return Je(e, h), ue(() => we(e), (m) => !m && h()), Lt(e, h, { attributeFilter: ["style", "class"] }), u && Ee("scroll", h, {
754
+ return Je(e, w), ue(() => we(e), (h) => !h && w()), Lt(e, w, { attributeFilter: ["style", "class"] }), u && Ee("scroll", w, {
755
755
  capture: !0,
756
756
  passive: !0
757
- }), l && Ee("resize", h, { passive: !0 }), $n(() => {
758
- a && h();
757
+ }), l && Ee("resize", w, { passive: !0 }), $n(() => {
758
+ a && w();
759
759
  }), {
760
- height: c,
761
- bottom: r,
760
+ height: r,
761
+ bottom: c,
762
762
  left: s,
763
- right: d,
763
+ right: f,
764
764
  top: v,
765
- width: y,
766
- x: P,
767
- y: F,
768
- update: h
765
+ width: x,
766
+ x: I,
767
+ y: P,
768
+ update: w
769
769
  };
770
770
  }
771
771
  function et(e) {
@@ -776,21 +776,21 @@ function An(e, t = !1) {
776
776
  const n = re(t);
777
777
  let l = "";
778
778
  ue(bn(e), (o) => {
779
- const c = et(A(o));
780
- if (c) {
781
- const r = c;
782
- if (tt.get(r) || tt.set(r, r.style.overflow), r.style.overflow !== "hidden" && (l = r.style.overflow), r.style.overflow === "hidden") return n.value = !0;
783
- if (n.value) return r.style.overflow = "hidden";
779
+ const r = et(H(o));
780
+ if (r) {
781
+ const c = r;
782
+ if (tt.get(c) || tt.set(c, c.style.overflow), c.style.overflow !== "hidden" && (l = c.style.overflow), c.style.overflow === "hidden") return n.value = !0;
783
+ if (n.value) return c.style.overflow = "hidden";
784
784
  }
785
785
  }, { immediate: !0 });
786
786
  const u = () => {
787
- const o = et(A(e));
787
+ const o = et(H(e));
788
788
  !o || n.value || (o.style.overflow = "hidden", n.value = !0);
789
789
  }, a = () => {
790
- const o = et(A(e));
790
+ const o = et(H(e));
791
791
  !o || !n.value || (o.style.overflow = l, tt.delete(o), n.value = !1);
792
792
  };
793
- return vt(a), E({
793
+ return vt(a), $({
794
794
  get() {
795
795
  return n.value;
796
796
  },
@@ -814,129 +814,129 @@ const Hn = (e) => {
814
814
  debounce: { default: 300 }
815
815
  },
816
816
  setup(e, { expose: t }) {
817
- const n = ce("cell"), l = e.store.getCellData(e.colIndex, e.rowIndex), u = z(""), a = z(!1), o = e.store.columns[e.colIndex], c = e.store.rows[e.rowIndex], r = o.align || "center", s = o.width || "40ch", d = E(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), v = z(null);
817
+ const n = ce("cell"), l = e.store.getCellData(e.colIndex, e.rowIndex), u = z(""), a = z(!1), o = e.store.columns[e.colIndex], r = e.store.rows[e.rowIndex], c = o.align || "center", s = o.width || "40ch", f = $(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), v = z(null);
818
818
  Ae(() => {
819
819
  if (!o.linkDoctype) return;
820
- const I = e.store.getCellData(e.colIndex, e.rowIndex);
821
- if (I != null && typeof I == "object") {
822
- const Z = I, q = Z.displayText ?? Z.id;
820
+ const E = e.store.getCellData(e.colIndex, e.rowIndex);
821
+ if (E != null && typeof E == "object") {
822
+ const N = E, q = N.displayText ?? N.id;
823
823
  (typeof q == "string" || typeof q == "number") && (v.value = String(q));
824
824
  return;
825
825
  }
826
- const V = e.store.linkResolver;
827
- !V || typeof I != "string" || I === "" || V(o.linkDoctype, I).then((Z) => (Z != null && (v.value = Z), Z));
826
+ const Z = e.store.linkResolver;
827
+ !Z || typeof E != "string" || E === "" || Z(o.linkDoctype, E).then((N) => (N != null && (v.value = N), N));
828
828
  });
829
- const y = E(() => v.value ?? d.value), P = E(() => typeof y.value == "string" ? Hn(y.value) : !1), F = E(() => ({
830
- textAlign: r,
829
+ const x = $(() => v.value ?? f.value), I = $(() => typeof x.value == "string" ? Hn(x.value) : !1), P = $(() => ({
830
+ textAlign: c,
831
831
  width: s,
832
832
  fontWeight: a.value ? "bold" : "inherit",
833
833
  paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
834
- })), M = E(() => ({
834
+ })), R = $(() => ({
835
835
  "sticky-column": e.pinned,
836
836
  "cell-modified": a.value
837
- })), h = () => {
838
- g(), m();
839
- }, m = () => {
840
- const { left: I, bottom: V, width: Z, height: q } = Ie(n);
837
+ })), w = () => {
838
+ m(), h();
839
+ }, h = () => {
840
+ const { left: E, bottom: Z, width: N, height: q } = Te(n);
841
841
  o.mask, o.modalComponent && e.store.$patch((_) => {
842
- _.modal.visible = !0, _.modal.colIndex = e.colIndex, _.modal.rowIndex = e.rowIndex, _.modal.left = I, _.modal.bottom = V, _.modal.width = Z, _.modal.height = q, _.modal.cell = n.value, typeof o.modalComponent == "function" ? _.modal.component = o.modalComponent({ table: _.table, row: c, column: o }) : _.modal.component = o.modalComponent, _.modal.componentProps = o.modalComponentExtraProps;
842
+ _.modal.visible = !0, _.modal.colIndex = e.colIndex, _.modal.rowIndex = e.rowIndex, _.modal.left = E, _.modal.bottom = Z, _.modal.width = N, _.modal.height = q, _.modal.cell = n.value, typeof o.modalComponent == "function" ? _.modal.component = o.modalComponent({ table: _.table, row: r, column: o }) : _.modal.component = o.modalComponent, _.modal.componentProps = o.modalComponentExtraProps;
843
843
  });
844
844
  };
845
845
  if (e.addNavigation) {
846
- let I = {
846
+ let E = {
847
847
  ...qe,
848
- "keydown.f2": m,
849
- "keydown.alt.up": m,
850
- "keydown.alt.down": m,
851
- "keydown.alt.left": m,
852
- "keydown.alt.right": m
848
+ "keydown.f2": h,
849
+ "keydown.alt.up": h,
850
+ "keydown.alt.down": h,
851
+ "keydown.alt.left": h,
852
+ "keydown.alt.right": h
853
853
  };
854
- typeof e.addNavigation == "object" && (I = {
855
- ...I,
854
+ typeof e.addNavigation == "object" && (E = {
855
+ ...E,
856
856
  ...e.addNavigation
857
857
  }), ft([
858
858
  {
859
859
  selectors: n,
860
- handlers: I
860
+ handlers: E
861
861
  }
862
862
  ]);
863
863
  }
864
- const g = () => {
864
+ const m = () => {
865
865
  if (n.value && o.edit) {
866
- const I = window.getSelection();
867
- if (I)
866
+ const E = window.getSelection();
867
+ if (E)
868
868
  try {
869
- const V = document.createRange();
870
- V.selectNodeContents && (V.selectNodeContents(n.value), I.removeAllRanges(), I.addRange(V));
869
+ const Z = document.createRange();
870
+ Z.selectNodeContents && (Z.selectNodeContents(n.value), E.removeAllRanges(), E.addRange(Z));
871
871
  } catch {
872
872
  }
873
873
  }
874
- }, k = () => {
875
- n.value && (u.value = n.value.textContent, g());
876
- }, x = () => {
874
+ }, C = () => {
875
+ n.value && (u.value = n.value.textContent, m());
876
+ }, b = () => {
877
877
  try {
878
- const I = window.getSelection();
879
- if (I && I.rangeCount > 0 && n.value) {
880
- const V = I.getRangeAt(0), Z = V.cloneRange();
881
- if (Z.selectNodeContents && Z.setEnd)
882
- return Z.selectNodeContents(n.value), Z.setEnd(V.endContainer, V.endOffset), Z.toString().length;
878
+ const E = window.getSelection();
879
+ if (E && E.rangeCount > 0 && n.value) {
880
+ const Z = E.getRangeAt(0), N = Z.cloneRange();
881
+ if (N.selectNodeContents && N.setEnd)
882
+ return N.selectNodeContents(n.value), N.setEnd(Z.endContainer, Z.endOffset), N.toString().length;
883
883
  }
884
884
  } catch {
885
885
  }
886
886
  return 0;
887
- }, R = (I) => {
887
+ }, p = (E) => {
888
888
  if (n.value)
889
889
  try {
890
- const V = window.getSelection();
891
- if (!V) return;
892
- let Z = 0;
890
+ const Z = window.getSelection();
891
+ if (!Z) return;
892
+ let N = 0;
893
893
  const q = document.createTreeWalker ? document.createTreeWalker(n.value, NodeFilter.SHOW_TEXT, null) : null;
894
894
  if (!q) return;
895
895
  let _, ne = null;
896
896
  for (; _ = q.nextNode(); ) {
897
- const ge = _, ve = Z + ge.textContent.length;
898
- if (I <= ve && (ne = document.createRange(), ne.setStart && ne.setEnd)) {
899
- ne.setStart(ge, I - Z), ne.setEnd(ge, I - Z);
897
+ const ge = _, ve = N + ge.textContent.length;
898
+ if (E <= ve && (ne = document.createRange(), ne.setStart && ne.setEnd)) {
899
+ ne.setStart(ge, E - N), ne.setEnd(ge, E - N);
900
900
  break;
901
901
  }
902
- Z = ve;
902
+ N = ve;
903
903
  }
904
- ne && V.removeAllRanges && V.addRange && (V.removeAllRanges(), V.addRange(ne));
904
+ ne && Z.removeAllRanges && Z.addRange && (Z.removeAllRanges(), Z.addRange(ne));
905
905
  } catch {
906
906
  }
907
- }, B = (I) => {
907
+ }, O = (E) => {
908
908
  if (!o.edit) return;
909
- const V = I.target;
910
- if (V.textContent === u.value)
909
+ const Z = E.target;
910
+ if (Z.textContent === u.value)
911
911
  return;
912
- const Z = x();
913
- u.value = V.textContent, o.format ? (a.value = V.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, l), e.store.setCellText(e.colIndex, e.rowIndex, V.textContent)) : (a.value = V.textContent !== l, e.store.setCellData(e.colIndex, e.rowIndex, V.textContent)), at().then(() => R(Z));
914
- }, j = /* @__PURE__ */ Rn(B, e.debounce);
912
+ const N = b();
913
+ u.value = Z.textContent, o.format ? (a.value = Z.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, l), e.store.setCellText(e.colIndex, e.rowIndex, Z.textContent)) : (a.value = Z.textContent !== l, e.store.setCellData(e.colIndex, e.rowIndex, Z.textContent)), at().then(() => p(N));
914
+ }, j = /* @__PURE__ */ Rn(O, e.debounce);
915
915
  return t({
916
916
  currentData: u
917
- }), (I, V) => (p(), b("td", {
917
+ }), (E, Z) => (y(), k("td", {
918
918
  ref: "cell",
919
919
  "data-colindex": e.colIndex,
920
920
  "data-rowindex": e.rowIndex,
921
- "data-editable": O(o).edit,
922
- contenteditable: O(o).edit,
921
+ "data-editable": B(o).edit,
922
+ contenteditable: B(o).edit,
923
923
  tabindex: e.tabIndex,
924
924
  spellcheck: !1,
925
- style: pe(F.value),
926
- class: se(["atable-cell", M.value]),
927
- onFocus: k,
928
- onPaste: B,
929
- onInput: V[0] || (V[0] = //@ts-ignore
930
- (...Z) => O(j) && O(j)(...Z)),
931
- onClick: h
925
+ style: pe(P.value),
926
+ class: ae(["atable-cell", R.value]),
927
+ onFocus: C,
928
+ onPaste: O,
929
+ onInput: Z[0] || (Z[0] = //@ts-ignore
930
+ (...N) => B(j) && B(j)(...N)),
931
+ onClick: w
932
932
  }, [
933
- O(o).cellComponent ? (p(), he(Ne(O(o).cellComponent), st({
933
+ B(o).cellComponent ? (y(), he(Ne(B(o).cellComponent), st({
934
934
  key: 0,
935
- value: y.value
936
- }, O(o).cellComponentProps), null, 16, ["value"])) : P.value ? (p(), b("span", {
935
+ value: x.value
936
+ }, B(o).cellComponentProps), null, 16, ["value"])) : I.value ? (y(), k("span", {
937
937
  key: 1,
938
- innerHTML: y.value
939
- }, null, 8, On)) : (p(), b("span", Vn, be(y.value), 1))
938
+ innerHTML: x.value
939
+ }, null, 8, On)) : (y(), k("span", Vn, be(x.value), 1))
940
940
  ], 46, Dn));
941
941
  }
942
942
  }), Pn = ["tabindex"], Zn = ["tabindex"], Nn = ["colspan"], Fn = /* @__PURE__ */ xe({
@@ -948,7 +948,7 @@ const Hn = (e) => {
948
948
  addNavigation: { type: [Boolean, Object], default: () => qe }
949
949
  },
950
950
  setup(e) {
951
- const t = ce("rowEl"), n = E(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
951
+ const t = ce("rowEl"), n = $(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
952
952
  if (e.addNavigation) {
953
953
  const l = {
954
954
  "keydown.control.g": (u) => {
@@ -962,26 +962,26 @@ const Hn = (e) => {
962
962
  }
963
963
  ]);
964
964
  }
965
- return (l, u) => (p(), b(me, null, [
966
- N("tr", st(l.$attrs, {
965
+ return (l, u) => (y(), k(me, null, [
966
+ F("tr", st(l.$attrs, {
967
967
  ref: "rowEl",
968
968
  tabindex: e.tabIndex,
969
969
  class: "expandable-row"
970
970
  }), [
971
- N("td", {
971
+ F("td", {
972
972
  tabIndex: -1,
973
973
  class: "row-index",
974
974
  onClick: u[0] || (u[0] = (a) => e.store.toggleRowExpand(e.rowIndex))
975
975
  }, be(n.value), 1),
976
976
  fe(l.$slots, "row", {}, void 0, !0)
977
977
  ], 16, Pn),
978
- e.store.display[e.rowIndex].expanded ? (p(), b("tr", {
978
+ e.store.display[e.rowIndex].expanded ? (y(), k("tr", {
979
979
  key: 0,
980
980
  ref: "rowExpanded",
981
981
  tabindex: e.tabIndex,
982
982
  class: "expanded-row"
983
983
  }, [
984
- N("td", {
984
+ F("td", {
985
985
  tabIndex: -1,
986
986
  colspan: e.store.columns.length + 1,
987
987
  class: "expanded-row-content"
@@ -1017,133 +1017,131 @@ const Hn = (e) => {
1017
1017
  },
1018
1018
  emits: ["connection:create"],
1019
1019
  setup(e, { expose: t, emit: n }) {
1020
- Xt(($) => ({
1021
- v1b78cb3b: u.value,
1022
- v0a4cd982: $.colspan
1020
+ Xt((T) => ({
1021
+ v564d6da1: u.value,
1022
+ v4f540c19: T.colspan
1023
1023
  }));
1024
- const l = n, u = z(e.color.length >= 6 ? e.color : "#cccccc"), a = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, o = ce("container"), c = ce("bar"), r = ce("leftResizeHandle"), s = ce("rightResizeHandle"), d = ce("leftConnectionHandle"), v = ce("rightConnectionHandle"), { width: y } = Ie(o), { left: P, right: F } = Ie(c), M = z(e.start), h = z(e.end || M.value + e.colspan), m = z(!1), g = z(!1), k = z(!1), x = z(!1), R = z(!1), B = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), j = E(() => ge.value || _.value || ne.value), I = E(() => e.colspan > 0 ? y.value / e.colspan : 0), V = E(() => {
1025
- const $ = M.value / e.colspan * 100, D = h.value / e.colspan * 100;
1024
+ const l = n, u = z(e.color.length >= 6 ? e.color : "#cccccc"), a = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, o = ce("container"), r = ce("bar"), c = ce("leftResizeHandle"), s = ce("rightResizeHandle"), f = ce("leftConnectionHandle"), v = ce("rightConnectionHandle"), { width: x } = Te(o), { left: I, right: P } = Te(r), R = z(e.start), w = z(e.end || R.value + e.colspan), h = z(!1), m = z(!1), C = z(!1), b = z(!1), p = z(!1), O = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), j = $(() => ge.value || _.value || ne.value), E = $(() => e.colspan > 0 ? x.value / e.colspan : 0), Z = $(() => {
1025
+ const T = R.value / e.colspan * 100, V = w.value / e.colspan * 100;
1026
1026
  return {
1027
- left: `${$}%`,
1028
- width: `${D - $}%`,
1027
+ left: `${T}%`,
1028
+ width: `${V - T}%`,
1029
1029
  backgroundColor: u.value
1030
1030
  };
1031
- }), Z = E(
1032
- () => ({
1033
- position: "fixed",
1034
- top: 0,
1035
- left: 0,
1036
- width: "100vw",
1037
- height: "100vh",
1038
- pointerEvents: "none",
1039
- zIndex: 1e3
1040
- })
1041
- ), q = z({ startX: 0, startPos: 0 }), { isDragging: _ } = _e(r, {
1031
+ }), N = $(() => ({
1032
+ position: "fixed",
1033
+ top: 0,
1034
+ left: 0,
1035
+ width: "100vw",
1036
+ height: "100vh",
1037
+ pointerEvents: "none",
1038
+ zIndex: 1e3
1039
+ })), q = z({ startX: 0, startPos: 0 }), { isDragging: _ } = _e(c, {
1042
1040
  axis: "x",
1043
- onStart: () => ve(P.value, M.value),
1044
- onMove: ({ x: $ }) => Oe($),
1045
- onEnd: ({ x: $ }) => Ve($)
1041
+ onStart: () => ve(I.value, R.value),
1042
+ onMove: ({ x: T }) => Oe(T),
1043
+ onEnd: ({ x: T }) => Ve(T)
1046
1044
  }), { isDragging: ne } = _e(s, {
1047
1045
  axis: "x",
1048
- onStart: () => ve(F.value, h.value),
1049
- onMove: ({ x: $ }) => Be($),
1050
- onEnd: ({ x: $ }) => Pe($)
1051
- }), { isDragging: ge } = _e(c, {
1046
+ onStart: () => ve(P.value, w.value),
1047
+ onMove: ({ x: T }) => Be(T),
1048
+ onEnd: ({ x: T }) => Pe(T)
1049
+ }), { isDragging: ge } = _e(r, {
1052
1050
  exact: !0,
1053
1051
  axis: "x",
1054
- onStart: () => ve(P.value, M.value),
1055
- onMove: ({ x: $ }) => He($),
1056
- onEnd: ({ x: $ }) => C($)
1052
+ onStart: () => ve(I.value, R.value),
1053
+ onMove: ({ x: T }) => He(T),
1054
+ onEnd: ({ x: T }) => M(T)
1057
1055
  });
1058
1056
  Ae(() => {
1059
- H();
1057
+ L();
1060
1058
  }), Gt(() => {
1061
1059
  W();
1062
1060
  });
1063
- function ve($, D) {
1064
- c.value && (c.value.style.transition = "none"), q.value = { startX: $, startPos: D };
1061
+ function ve(T, V) {
1062
+ r.value && (r.value.style.transition = "none"), q.value = { startX: T, startPos: V };
1065
1063
  }
1066
- function Oe($) {
1067
- if (!_.value || !c.value) return;
1068
- const Y = ($ - q.value.startX) / I.value, G = Math.max(0, Math.min(h.value - 1, q.value.startPos + Y));
1069
- c.value.style.left = `${G / e.colspan * 100}%`, c.value.style.width = `${(h.value - G) / e.colspan * 100}%`;
1064
+ function Oe(T) {
1065
+ if (!_.value || !r.value) return;
1066
+ const Y = (T - q.value.startX) / E.value, G = Math.max(0, Math.min(w.value - 1, q.value.startPos + Y));
1067
+ r.value.style.left = `${G / e.colspan * 100}%`, r.value.style.width = `${(w.value - G) / e.colspan * 100}%`;
1070
1068
  }
1071
- function Ve($) {
1072
- if (!c.value) return;
1073
- const D = $ - q.value.startX, Y = Math.round(D / I.value), G = M.value, K = Math.max(0, Math.min(h.value - 1, q.value.startPos + Y));
1074
- M.value = K, e.store.updateGanttBar({
1069
+ function Ve(T) {
1070
+ if (!r.value) return;
1071
+ const V = T - q.value.startX, Y = Math.round(V / E.value), G = R.value, K = Math.max(0, Math.min(w.value - 1, q.value.startPos + Y));
1072
+ R.value = K, e.store.updateGanttBar({
1075
1073
  rowIndex: e.rowIndex,
1076
1074
  colIndex: e.colIndex,
1077
1075
  type: "resize",
1078
1076
  edge: "start",
1079
1077
  oldStart: G,
1080
1078
  newStart: K,
1081
- end: h.value,
1079
+ end: w.value,
1082
1080
  delta: Y,
1083
- oldColspan: h.value - G,
1084
- newColspan: h.value - K
1081
+ oldColspan: w.value - G,
1082
+ newColspan: w.value - K
1085
1083
  });
1086
1084
  }
1087
- function Be($) {
1088
- if (!ne.value || !c.value) return;
1089
- const Y = ($ - q.value.startX) / I.value, G = Math.max(M.value + 1, Math.min(e.columnsCount, q.value.startPos + Y));
1090
- c.value.style.width = `${(G - M.value) / e.colspan * 100}%`;
1085
+ function Be(T) {
1086
+ if (!ne.value || !r.value) return;
1087
+ const Y = (T - q.value.startX) / E.value, G = Math.max(R.value + 1, Math.min(e.columnsCount, q.value.startPos + Y));
1088
+ r.value.style.width = `${(G - R.value) / e.colspan * 100}%`;
1091
1089
  }
1092
- function Pe($) {
1093
- if (!c.value) return;
1094
- const D = $ - q.value.startX, Y = Math.round(D / I.value), G = h.value, K = Math.max(M.value + 1, Math.min(e.columnsCount, q.value.startPos + Y));
1095
- h.value = K, e.store.updateGanttBar({
1090
+ function Pe(T) {
1091
+ if (!r.value) return;
1092
+ const V = T - q.value.startX, Y = Math.round(V / E.value), G = w.value, K = Math.max(R.value + 1, Math.min(e.columnsCount, q.value.startPos + Y));
1093
+ w.value = K, e.store.updateGanttBar({
1096
1094
  rowIndex: e.rowIndex,
1097
1095
  colIndex: e.colIndex,
1098
1096
  type: "resize",
1099
1097
  edge: "end",
1100
1098
  oldEnd: G,
1101
1099
  newEnd: K,
1102
- start: M.value,
1100
+ start: R.value,
1103
1101
  delta: Y,
1104
- oldColspan: G - M.value,
1105
- newColspan: K - M.value
1102
+ oldColspan: G - R.value,
1103
+ newColspan: K - R.value
1106
1104
  });
1107
1105
  }
1108
- function He($) {
1109
- if (!ge.value || !c.value) return;
1110
- const Y = ($ - q.value.startX) / I.value, G = h.value - M.value, K = Math.max(0, Math.min(q.value.startPos + Y, e.columnsCount - G));
1111
- c.value.style.left = `${K / e.colspan * 100}%`;
1106
+ function He(T) {
1107
+ if (!ge.value || !r.value) return;
1108
+ const Y = (T - q.value.startX) / E.value, G = w.value - R.value, K = Math.max(0, Math.min(q.value.startPos + Y, e.columnsCount - G));
1109
+ r.value.style.left = `${K / e.colspan * 100}%`;
1112
1110
  }
1113
- function C($) {
1114
- if (!c.value) return;
1115
- const D = $ - q.value.startX, Y = Math.round(D / I.value), G = h.value - M.value, K = M.value, te = h.value;
1116
- let le = q.value.startPos + Y, ae = le + G;
1117
- le < 0 ? (le = 0, ae = G) : ae > e.columnsCount && (ae = e.columnsCount, le = ae - G), M.value = le, h.value = ae, e.store.updateGanttBar({
1111
+ function M(T) {
1112
+ if (!r.value) return;
1113
+ const V = T - q.value.startX, Y = Math.round(V / E.value), G = w.value - R.value, K = R.value, te = w.value;
1114
+ let le = q.value.startPos + Y, se = le + G;
1115
+ le < 0 ? (le = 0, se = G) : se > e.columnsCount && (se = e.columnsCount, le = se - G), R.value = le, w.value = se, e.store.updateGanttBar({
1118
1116
  rowIndex: e.rowIndex,
1119
1117
  colIndex: e.colIndex,
1120
1118
  type: "bar",
1121
1119
  oldStart: K,
1122
1120
  oldEnd: te,
1123
1121
  newStart: le,
1124
- newEnd: ae,
1122
+ newEnd: se,
1125
1123
  delta: Y,
1126
- colspan: ae - le
1124
+ colspan: se - le
1127
1125
  });
1128
1126
  }
1129
- function H() {
1130
- const { x: $, y: D } = Ie(c), { x: Y, y: G } = Ie(d), { x: K, y: te } = Ie(v);
1127
+ function L() {
1128
+ const { x: T, y: V } = Te(r), { x: Y, y: G } = Te(f), { x: K, y: te } = Te(v);
1131
1129
  e.store.registerGanttBar({
1132
1130
  id: a,
1133
1131
  rowIndex: e.rowIndex,
1134
1132
  colIndex: e.colIndex,
1135
- startIndex: M,
1136
- endIndex: h,
1133
+ startIndex: R,
1134
+ endIndex: w,
1137
1135
  color: u,
1138
1136
  label: e.label,
1139
- position: { x: $, y: D }
1137
+ position: { x: T, y: V }
1140
1138
  }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
1141
1139
  id: `${a}-connection-left`,
1142
1140
  rowIndex: e.rowIndex,
1143
1141
  colIndex: e.colIndex,
1144
1142
  side: "left",
1145
1143
  position: { x: Y, y: G },
1146
- visible: m,
1144
+ visible: h,
1147
1145
  barId: a
1148
1146
  }), e.store.registerConnectionHandle({
1149
1147
  id: `${a}-connection-right`,
@@ -1151,7 +1149,7 @@ const Hn = (e) => {
1151
1149
  colIndex: e.colIndex,
1152
1150
  side: "right",
1153
1151
  position: { x: K, y: te },
1154
- visible: g,
1152
+ visible: m,
1155
1153
  barId: a
1156
1154
  }));
1157
1155
  }
@@ -1159,107 +1157,107 @@ const Hn = (e) => {
1159
1157
  e.store.unregisterGanttBar(a), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${a}-connection-left`), e.store.unregisterConnectionHandle(`${a}-connection-right`));
1160
1158
  }
1161
1159
  function Q() {
1162
- e.store.isDependencyGraphEnabled && (m.value = !0, g.value = !0);
1160
+ e.store.isDependencyGraphEnabled && (h.value = !0, m.value = !0);
1163
1161
  }
1164
1162
  function X() {
1165
- !k.value && !x.value && (m.value = !1, g.value = !1);
1163
+ !C.value && !b.value && (h.value = !1, m.value = !1);
1166
1164
  }
1167
- function oe($, D) {
1168
- D.preventDefault(), D.stopPropagation(), R.value = !0, $ === "left" ? k.value = !0 : x.value = !0;
1169
- const Y = $ === "left" ? d.value : v.value;
1165
+ function oe(T, V) {
1166
+ V.preventDefault(), V.stopPropagation(), p.value = !0, T === "left" ? C.value = !0 : b.value = !0;
1167
+ const Y = T === "left" ? f.value : v.value;
1170
1168
  if (Y) {
1171
- const te = Y.getBoundingClientRect(), le = te.left + te.width / 2, ae = te.top + te.height / 2;
1172
- B.value = { startX: le, startY: ae, endX: le, endY: ae };
1169
+ const te = Y.getBoundingClientRect(), le = te.left + te.width / 2, se = te.top + te.height / 2;
1170
+ O.value = { startX: le, startY: se, endX: le, endY: se };
1173
1171
  }
1174
1172
  const G = (te) => {
1175
- B.value.endX = te.clientX, B.value.endY = te.clientY;
1173
+ O.value.endX = te.clientX, O.value.endY = te.clientY;
1176
1174
  }, K = (te) => {
1177
- ye(te, $), Re(G, K);
1175
+ ye(te, T), Re(G, K);
1178
1176
  };
1179
1177
  document.addEventListener("mousemove", G), document.addEventListener("mouseup", K);
1180
1178
  }
1181
- function ye($, D) {
1182
- const G = document.elementFromPoint($.clientX, $.clientY)?.closest(".connection-handle");
1183
- if (G && G !== (D === "left" ? d.value : v.value)) {
1179
+ function ye(T, V) {
1180
+ const G = document.elementFromPoint(T.clientX, T.clientY)?.closest(".connection-handle");
1181
+ if (G && G !== (V === "left" ? f.value : v.value)) {
1184
1182
  const K = G.closest(".gantt-bar");
1185
1183
  if (K) {
1186
- const te = parseInt(K.getAttribute("data-rowindex") || "0"), le = parseInt(K.getAttribute("data-colindex") || "0"), ae = G.classList.contains("left-connection-handle") ? "left" : "right", ht = `gantt-bar-row-${te}-col-${le}`, Qe = e.store.createConnection(
1187
- `${a}-connection-${D}`,
1188
- `${ht}-connection-${ae}`
1184
+ const te = parseInt(K.getAttribute("data-rowindex") || "0"), le = parseInt(K.getAttribute("data-colindex") || "0"), se = G.classList.contains("left-connection-handle") ? "left" : "right", ht = `gantt-bar-row-${te}-col-${le}`, Qe = e.store.createConnection(
1185
+ `${a}-connection-${V}`,
1186
+ `${ht}-connection-${se}`
1189
1187
  );
1190
1188
  Qe && l("connection:create", Qe);
1191
1189
  }
1192
1190
  }
1193
1191
  }
1194
- function Re($, D) {
1195
- R.value = !1, k.value = !1, x.value = !1, document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", D), c.value?.matches(":hover") || X();
1192
+ function Re(T, V) {
1193
+ p.value = !1, C.value = !1, b.value = !1, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", V), r.value?.matches(":hover") || X();
1196
1194
  }
1197
1195
  return t({
1198
- barStyle: V,
1196
+ barStyle: Z,
1199
1197
  cleanupConnectionDrag: Re,
1200
- currentEnd: h,
1198
+ currentEnd: w,
1201
1199
  handleConnectionDrop: ye,
1202
- isLeftConnectionDragging: k,
1203
- isLeftConnectionVisible: m,
1204
- isRightConnectionDragging: x,
1205
- isRightConnectionVisible: g,
1206
- showDragPreview: R
1207
- }), ($, D) => (p(), b("td", {
1200
+ isLeftConnectionDragging: C,
1201
+ isLeftConnectionVisible: h,
1202
+ isRightConnectionDragging: b,
1203
+ isRightConnectionVisible: m,
1204
+ showDragPreview: p
1205
+ }), (T, V) => (y(), k("td", {
1208
1206
  class: "aganttcell",
1209
1207
  colspan: e.colspan
1210
1208
  }, [
1211
- N("div", Xn, [
1212
- N("div", {
1209
+ F("div", Xn, [
1210
+ F("div", {
1213
1211
  ref: "bar",
1214
1212
  "data-rowindex": e.rowIndex,
1215
1213
  "data-colindex": e.colIndex,
1216
- class: se(["gantt-bar", { "is-dragging": j.value }]),
1217
- style: pe(V.value),
1214
+ class: ae(["gantt-bar", { "is-dragging": j.value }]),
1215
+ style: pe(Z.value),
1218
1216
  onMouseenter: Q,
1219
1217
  onMouseleave: X
1220
1218
  }, [
1221
- e.store.isDependencyGraphEnabled ? (p(), b("div", {
1219
+ e.store.isDependencyGraphEnabled ? (y(), k("div", {
1222
1220
  key: 0,
1223
1221
  ref: "leftConnectionHandle",
1224
- class: se(["connection-handle left-connection-handle", { visible: m.value, "is-dragging": k.value }]),
1225
- onMousedown: D[0] || (D[0] = Se((Y) => oe("left", Y), ["stop"]))
1226
- }, [...D[2] || (D[2] = [
1227
- N("div", { class: "connection-dot" }, null, -1)
1222
+ class: ae(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": C.value }]),
1223
+ onMousedown: V[0] || (V[0] = Se((Y) => oe("left", Y), ["stop"]))
1224
+ }, [...V[2] || (V[2] = [
1225
+ F("div", { class: "connection-dot" }, null, -1)
1228
1226
  ])], 34)) : ee("", !0),
1229
- e.store.isDependencyGraphEnabled ? (p(), b("div", {
1227
+ e.store.isDependencyGraphEnabled ? (y(), k("div", {
1230
1228
  key: 1,
1231
1229
  ref: "rightConnectionHandle",
1232
- class: se(["connection-handle right-connection-handle", { visible: g.value, "is-dragging": x.value }]),
1233
- onMousedown: D[1] || (D[1] = Se((Y) => oe("right", Y), ["stop"]))
1234
- }, [...D[3] || (D[3] = [
1235
- N("div", { class: "connection-dot" }, null, -1)
1230
+ class: ae(["connection-handle right-connection-handle", { visible: m.value, "is-dragging": b.value }]),
1231
+ onMousedown: V[1] || (V[1] = Se((Y) => oe("right", Y), ["stop"]))
1232
+ }, [...V[3] || (V[3] = [
1233
+ F("div", { class: "connection-dot" }, null, -1)
1236
1234
  ])], 34)) : ee("", !0),
1237
- N("div", {
1235
+ F("div", {
1238
1236
  ref: "leftResizeHandle",
1239
- class: se(["resize-handle left-resize-handle", { "is-dragging": O(_) }])
1240
- }, [...D[4] || (D[4] = [
1241
- N("div", { class: "handle-grip" }, null, -1),
1242
- N("div", { class: "vertical-indicator left-indicator" }, null, -1)
1237
+ class: ae(["resize-handle left-resize-handle", { "is-dragging": B(_) }])
1238
+ }, [...V[4] || (V[4] = [
1239
+ F("div", { class: "handle-grip" }, null, -1),
1240
+ F("div", { class: "vertical-indicator left-indicator" }, null, -1)
1243
1241
  ])], 2),
1244
- e.label ? (p(), b("label", jn, be(e.label), 1)) : ee("", !0),
1245
- N("div", {
1242
+ e.label ? (y(), k("label", jn, be(e.label), 1)) : ee("", !0),
1243
+ F("div", {
1246
1244
  ref: "rightResizeHandle",
1247
- class: se(["resize-handle right-resize-handle", { "is-dragging": O(ne) }])
1248
- }, [...D[5] || (D[5] = [
1249
- N("div", { class: "handle-grip" }, null, -1),
1250
- N("div", { class: "vertical-indicator right-indicator" }, null, -1)
1245
+ class: ae(["resize-handle right-resize-handle", { "is-dragging": B(ne) }])
1246
+ }, [...V[5] || (V[5] = [
1247
+ F("div", { class: "handle-grip" }, null, -1),
1248
+ F("div", { class: "vertical-indicator right-indicator" }, null, -1)
1251
1249
  ])], 2)
1252
1250
  ], 46, Gn)
1253
1251
  ], 512),
1254
- e.store.isDependencyGraphEnabled && R.value ? (p(), b("svg", {
1252
+ e.store.isDependencyGraphEnabled && p.value ? (y(), k("svg", {
1255
1253
  key: 0,
1256
- style: pe(Z.value)
1254
+ style: pe(N.value)
1257
1255
  }, [
1258
- N("line", {
1259
- x1: B.value.startX,
1260
- y1: B.value.startY,
1261
- x2: B.value.endX,
1262
- y2: B.value.endY,
1256
+ F("line", {
1257
+ x1: O.value.startX,
1258
+ y1: O.value.startY,
1259
+ x2: O.value.endX,
1260
+ y2: O.value.endY,
1263
1261
  stroke: "#2196f3",
1264
1262
  "stroke-width": "2",
1265
1263
  "stroke-dasharray": "5,5"
@@ -1267,7 +1265,7 @@ const Hn = (e) => {
1267
1265
  ], 4)) : ee("", !0)
1268
1266
  ], 8, zn));
1269
1267
  }
1270
- }), Jn = /* @__PURE__ */ $e(Un, [["__scopeId", "data-v-c3173189"]]), qn = `<?xml version="1.0" encoding="UTF-8"?>
1268
+ }), Jn = /* @__PURE__ */ $e(Un, [["__scopeId", "data-v-032ef6d9"]]), qn = `<?xml version="1.0" encoding="UTF-8"?>
1271
1269
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1272
1270
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1273
1271
  <polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
@@ -1311,20 +1309,26 @@ const Hn = (e) => {
1311
1309
  </svg>`, to = `<?xml version="1.0" encoding="UTF-8"?>
1312
1310
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
1313
1311
  <path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
1314
- </svg>`, no = {
1312
+ </svg>`, no = `<?xml version="1.0" encoding="UTF-8"?>
1313
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1314
+ <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1315
+ <polygon points="18,20 18,44 46,32" style="fill: #000; stroke-width: 0px;"/>
1316
+ </svg>
1317
+ `, oo = {
1315
1318
  add: qn,
1316
1319
  delete: Qn,
1317
1320
  duplicate: Kn,
1318
1321
  insertAbove: _n,
1319
1322
  insertBelow: eo,
1320
- move: to
1321
- }, oo = {
1323
+ move: to,
1324
+ open: no
1325
+ }, lo = {
1322
1326
  key: 0,
1323
1327
  class: "row-actions-dropdown"
1324
- }, lo = ["aria-expanded"], ao = ["onClick"], so = ["innerHTML"], io = { class: "action-label" }, ro = {
1328
+ }, ao = ["aria-expanded"], so = ["onClick"], io = ["innerHTML"], ro = { class: "action-label" }, co = {
1325
1329
  key: 1,
1326
1330
  class: "row-actions-icons"
1327
- }, co = ["title", "aria-label", "onClick"], uo = ["innerHTML"], Ue = /* @__PURE__ */ xe({
1331
+ }, uo = ["title", "aria-label", "onClick"], fo = ["innerHTML"], Ue = /* @__PURE__ */ xe({
1328
1332
  __name: "ARowActions",
1329
1333
  props: {
1330
1334
  rowIndex: {},
@@ -1334,27 +1338,28 @@ const Hn = (e) => {
1334
1338
  },
1335
1339
  emits: ["action"],
1336
1340
  setup(e, { emit: t }) {
1337
- const n = e, l = t, u = ce("actionsCell"), a = ce("toggleButton"), o = z(0), c = z(!1), r = z(!1), s = z({ top: 0, left: 0 }), d = {
1338
- add: "Add Row",
1339
- delete: "Delete Row",
1340
- duplicate: "Duplicate Row",
1341
+ const n = e, l = t, u = ce("actionsCell"), a = ce("toggleButton"), o = z(0), r = z(!1), c = z(!1), s = z({ top: 0, left: 0 }), f = {
1342
+ add: "Add Record",
1343
+ delete: "Delete Record",
1344
+ duplicate: "Duplicate Record",
1341
1345
  insertAbove: "Insert Above",
1342
1346
  insertBelow: "Insert Below",
1343
- move: "Move Row"
1344
- }, v = E(() => {
1345
- const m = [], g = n.config.actions || {}, k = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1346
- for (const x of k) {
1347
- const R = g[x];
1348
- if (R === !1 || R === void 0) continue;
1349
- let B = !0, j = d[x], I = no[x];
1350
- typeof R == "object" && (B = R.enabled !== !1, j = R.label || j, I = R.icon || I), B && m.push({ type: x, label: j, icon: I });
1347
+ move: "Move Record",
1348
+ open: "Open Record"
1349
+ }, v = $(() => {
1350
+ const h = [], m = n.config.actions || {}, C = ["open", "add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1351
+ for (const b of C) {
1352
+ const p = m[b];
1353
+ if (p === !1 || p === void 0) continue;
1354
+ let O = !0, j = f[b], E = oo[b];
1355
+ typeof p == "object" && (O = p.enabled !== !1, j = p.label || j, E = p.icon || E), O && h.push({ type: b, label: j, icon: E });
1351
1356
  }
1352
- return m;
1353
- }), y = E(() => {
1357
+ return h;
1358
+ }), x = $(() => {
1354
1359
  if (n.config.forceDropdown) return !0;
1355
- const m = n.config.dropdownThreshold ?? 150;
1356
- return m === 0 ? !1 : o.value > 0 && o.value < m;
1357
- }), P = E(() => c.value ? r.value ? {
1360
+ const h = n.config.dropdownThreshold ?? 150;
1361
+ return h === 0 ? !1 : o.value > 0 && o.value < h;
1362
+ }), I = $(() => r.value ? c.value ? {
1358
1363
  position: "fixed",
1359
1364
  bottom: `${window.innerHeight - s.value.top}px`,
1360
1365
  left: `${s.value.left}px`,
@@ -1364,85 +1369,85 @@ const Hn = (e) => {
1364
1369
  top: `${s.value.top}px`,
1365
1370
  left: `${s.value.left}px`
1366
1371
  } : {});
1367
- Je(u, (m) => {
1368
- const g = m[0];
1369
- g && (o.value = g.contentRect.width);
1372
+ Je(u, (h) => {
1373
+ const m = h[0];
1374
+ m && (o.value = m.contentRect.width);
1370
1375
  });
1371
- const F = () => {
1372
- c.value || M(), c.value = !c.value;
1373
- }, M = () => {
1376
+ const P = () => {
1377
+ r.value || R(), r.value = !r.value;
1378
+ }, R = () => {
1374
1379
  if (!a.value) return;
1375
- const m = a.value.getBoundingClientRect(), g = window.innerHeight, k = v.value.length * 40 + 16, x = g - m.bottom, R = m.top;
1376
- r.value = x < k && R > k, r.value ? s.value = {
1377
- top: m.top,
1378
- left: m.left
1380
+ const h = a.value.getBoundingClientRect(), m = window.innerHeight, C = v.value.length * 40 + 16, b = m - h.bottom, p = h.top;
1381
+ c.value = b < C && p > C, c.value ? s.value = {
1382
+ top: h.top,
1383
+ left: h.left
1379
1384
  } : s.value = {
1380
- top: m.bottom,
1381
- left: m.left
1385
+ top: h.bottom,
1386
+ left: h.left
1382
1387
  };
1383
1388
  };
1384
1389
  ot(u, () => {
1385
- c.value = !1;
1390
+ r.value = !1;
1386
1391
  });
1387
- const h = (m) => {
1388
- c.value = !1;
1389
- const g = n.config.actions?.[m];
1390
- typeof g == "object" && g.handler && g.handler(n.rowIndex, n.store) === !1 || l("action", m, n.rowIndex);
1392
+ const w = (h, m) => {
1393
+ r.value = !1;
1394
+ const C = n.config.actions?.[h];
1395
+ typeof C == "object" && C.handler && C.handler(n.rowIndex, n.store) === !1 || l("action", h, n.rowIndex, m);
1391
1396
  };
1392
- return (m, g) => (p(), b("td", {
1397
+ return (h, m) => (y(), k("td", {
1393
1398
  ref: "actionsCell",
1394
- class: se(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": c.value }])
1399
+ class: ae(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": r.value }])
1395
1400
  }, [
1396
- y.value ? (p(), b("div", oo, [
1397
- N("button", {
1401
+ x.value ? (y(), k("div", lo, [
1402
+ F("button", {
1398
1403
  ref: "toggleButton",
1399
1404
  type: "button",
1400
1405
  class: "row-actions-toggle",
1401
- "aria-expanded": c.value,
1406
+ "aria-expanded": r.value,
1402
1407
  "aria-haspopup": "true",
1403
- onClick: Se(F, ["stop"])
1404
- }, [...g[0] || (g[0] = [
1405
- N("span", { class: "dropdown-icon" }, "⋮", -1)
1406
- ])], 8, lo),
1407
- de(N("div", {
1408
- class: se(["row-actions-menu", { "menu-flipped": r.value }]),
1409
- style: pe(P.value),
1408
+ onClick: Se(P, ["stop"])
1409
+ }, [...m[0] || (m[0] = [
1410
+ F("span", { class: "dropdown-icon" }, "⋮", -1)
1411
+ ])], 8, ao),
1412
+ de(F("div", {
1413
+ class: ae(["row-actions-menu", { "menu-flipped": c.value }]),
1414
+ style: pe(I.value),
1410
1415
  role: "menu"
1411
1416
  }, [
1412
- (p(!0), b(me, null, Ce(v.value, (k) => (p(), b("button", {
1413
- key: k.type,
1417
+ (y(!0), k(me, null, Ce(v.value, (C) => (y(), k("button", {
1418
+ key: C.type,
1414
1419
  type: "button",
1415
1420
  class: "row-action-menu-item",
1416
1421
  role: "menuitem",
1417
- onClick: Se((x) => h(k.type), ["stop"])
1422
+ onClick: Se((b) => w(C.type, b), ["stop"])
1418
1423
  }, [
1419
- N("span", {
1424
+ F("span", {
1420
1425
  class: "action-icon",
1421
- innerHTML: k.icon
1422
- }, null, 8, so),
1423
- N("span", io, be(k.label), 1)
1424
- ], 8, ao))), 128))
1426
+ innerHTML: C.icon
1427
+ }, null, 8, io),
1428
+ F("span", ro, be(C.label), 1)
1429
+ ], 8, so))), 128))
1425
1430
  ], 6), [
1426
- [it, c.value]
1431
+ [it, r.value]
1427
1432
  ])
1428
- ])) : (p(), b("div", ro, [
1429
- (p(!0), b(me, null, Ce(v.value, (k) => (p(), b("button", {
1430
- key: k.type,
1433
+ ])) : (y(), k("div", co, [
1434
+ (y(!0), k(me, null, Ce(v.value, (C) => (y(), k("button", {
1435
+ key: C.type,
1431
1436
  type: "button",
1432
1437
  class: "row-action-btn",
1433
- title: k.label,
1434
- "aria-label": k.label,
1435
- onClick: Se((x) => h(k.type), ["stop"])
1438
+ title: C.label,
1439
+ "aria-label": C.label,
1440
+ onClick: Se((b) => w(C.type, b), ["stop"])
1436
1441
  }, [
1437
- N("span", {
1442
+ F("span", {
1438
1443
  class: "action-icon",
1439
- innerHTML: k.icon
1440
- }, null, 8, uo)
1441
- ], 8, co))), 128))
1444
+ innerHTML: C.icon
1445
+ }, null, 8, fo)
1446
+ ], 8, uo))), 128))
1442
1447
  ]))
1443
1448
  ], 2));
1444
1449
  }
1445
- }), fo = ["tabindex"], vo = /* @__PURE__ */ xe({
1450
+ }), vo = ["tabindex"], ho = /* @__PURE__ */ xe({
1446
1451
  __name: "ARow",
1447
1452
  props: {
1448
1453
  rowIndex: {},
@@ -1450,70 +1455,74 @@ const Hn = (e) => {
1450
1455
  tabIndex: { default: () => -1 },
1451
1456
  addNavigation: { type: [Boolean, Object], default: !1 }
1452
1457
  },
1453
- emits: ["row:action"],
1458
+ emits: ["row:action", "row:click"],
1454
1459
  setup(e, { emit: t }) {
1455
- const n = t, l = ce("rowEl"), u = E(() => e.store.isRowVisible(e.rowIndex)), a = E(() => e.store.getRowExpandSymbol(e.rowIndex)), o = E(() => e.store.config.rowActions || { enabled: !1 }), c = E(() => o.value.enabled), r = E(() => o.value.position || "before-index"), s = (d, v) => {
1456
- n("row:action", d, v);
1460
+ const n = t, l = ce("rowEl"), u = $(() => e.store.isRowVisible(e.rowIndex)), a = $(() => e.store.getRowExpandSymbol(e.rowIndex)), o = $(() => e.store.config.clickable ?? !1), r = $(() => e.store.config.rowActions || { enabled: !1 }), c = $(() => r.value.enabled), s = $(() => r.value.position || "before-index"), f = (x, I, P) => {
1461
+ n("row:action", x, I, P);
1462
+ }, v = (x) => {
1463
+ const I = x.target;
1464
+ I.closest(".atable-row-actions") || I.closest(".tree-index") || n("row:click", e.rowIndex, x);
1457
1465
  };
1458
1466
  if (e.addNavigation) {
1459
- let d = qe;
1460
- typeof e.addNavigation == "object" && (d = {
1461
- ...d,
1467
+ let x = qe;
1468
+ typeof e.addNavigation == "object" && (x = {
1469
+ ...x,
1462
1470
  ...e.addNavigation
1463
1471
  }), ft([
1464
1472
  {
1465
1473
  selectors: l,
1466
- handlers: d
1474
+ handlers: x
1467
1475
  }
1468
1476
  ]);
1469
1477
  }
1470
- return (d, v) => de((p(), b("tr", {
1478
+ return (x, I) => de((y(), k("tr", {
1471
1479
  ref: "rowEl",
1472
1480
  tabindex: e.tabIndex,
1473
- class: "atable-row"
1481
+ class: ae(["atable-row", { "atable-row-clickable": o.value }]),
1482
+ onClick: v
1474
1483
  }, [
1475
- c.value && r.value === "before-index" ? (p(), he(Ue, {
1484
+ c.value && s.value === "before-index" ? (y(), he(Ue, {
1476
1485
  key: 0,
1477
1486
  "row-index": e.rowIndex,
1478
1487
  store: e.store,
1479
- config: o.value,
1480
- position: r.value,
1481
- onAction: s
1488
+ config: r.value,
1489
+ position: s.value,
1490
+ onAction: f
1482
1491
  }, null, 8, ["row-index", "store", "config", "position"])) : ee("", !0),
1483
- e.store.config.view !== "uncounted" ? fe(d.$slots, "index", { key: 1 }, () => [
1484
- e.store.config.view === "list" ? (p(), b("td", {
1492
+ e.store.config.view !== "uncounted" ? fe(x.$slots, "index", { key: 1 }, () => [
1493
+ e.store.config.view === "list" ? (y(), k("td", {
1485
1494
  key: 0,
1486
1495
  tabIndex: -1,
1487
- class: se(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
1488
- }, be(e.rowIndex + 1), 3)) : e.store.isTreeView ? (p(), b("td", {
1496
+ class: ae(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
1497
+ }, be(e.rowIndex + 1), 3)) : e.store.isTreeView ? (y(), k("td", {
1489
1498
  key: 1,
1490
1499
  tabIndex: -1,
1491
- class: se(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1492
- onClick: v[0] || (v[0] = (y) => e.store.toggleRowExpand(e.rowIndex))
1500
+ class: ae(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1501
+ onClick: I[0] || (I[0] = (P) => e.store.toggleRowExpand(e.rowIndex))
1493
1502
  }, be(a.value), 3)) : ee("", !0)
1494
1503
  ], !0) : ee("", !0),
1495
- c.value && r.value === "after-index" ? (p(), he(Ue, {
1504
+ c.value && s.value === "after-index" ? (y(), he(Ue, {
1496
1505
  key: 2,
1497
1506
  "row-index": e.rowIndex,
1498
1507
  store: e.store,
1499
- config: o.value,
1500
- position: r.value,
1501
- onAction: s
1508
+ config: r.value,
1509
+ position: s.value,
1510
+ onAction: f
1502
1511
  }, null, 8, ["row-index", "store", "config", "position"])) : ee("", !0),
1503
- fe(d.$slots, "default", {}, void 0, !0),
1504
- c.value && r.value === "end" ? (p(), he(Ue, {
1512
+ fe(x.$slots, "default", {}, void 0, !0),
1513
+ c.value && s.value === "end" ? (y(), he(Ue, {
1505
1514
  key: 3,
1506
1515
  "row-index": e.rowIndex,
1507
1516
  store: e.store,
1508
- config: o.value,
1509
- position: r.value,
1510
- onAction: s
1517
+ config: r.value,
1518
+ position: s.value,
1519
+ onAction: f
1511
1520
  }, null, 8, ["row-index", "store", "config", "position"])) : ee("", !0)
1512
- ], 8, fo)), [
1521
+ ], 10, vo)), [
1513
1522
  [it, u.value]
1514
1523
  ]);
1515
1524
  }
1516
- }), Dt = /* @__PURE__ */ $e(vo, [["__scopeId", "data-v-e7ca13d1"]]), nt = /* @__PURE__ */ new WeakMap(), ho = {
1525
+ }), Dt = /* @__PURE__ */ $e(ho, [["__scopeId", "data-v-533161af"]]), nt = /* @__PURE__ */ new WeakMap(), mo = {
1517
1526
  mounted(e, t) {
1518
1527
  const n = !t.modifiers.bubble;
1519
1528
  let l;
@@ -1528,10 +1537,10 @@ const Hn = (e) => {
1528
1537
  const t = nt.get(e);
1529
1538
  t && typeof t == "function" ? t() : t?.stop(), nt.delete(e);
1530
1539
  }
1531
- }, mo = { mounted(e, t) {
1540
+ }, go = { mounted(e, t) {
1532
1541
  typeof t.value == "function" ? Je(e, t.value) : Je(e, ...t.value);
1533
1542
  } };
1534
- function go() {
1543
+ function wo() {
1535
1544
  let e = !1;
1536
1545
  const t = re(!1);
1537
1546
  return (n, l) => {
@@ -1541,8 +1550,8 @@ function go() {
1541
1550
  ue(t, (a) => u.value = a);
1542
1551
  };
1543
1552
  }
1544
- go();
1545
- const wo = { class: "gantt-connection-overlay" }, po = {
1553
+ wo();
1554
+ const po = { class: "gantt-connection-overlay" }, xo = {
1546
1555
  class: "connection-svg",
1547
1556
  style: {
1548
1557
  position: "absolute",
@@ -1553,39 +1562,39 @@ const wo = { class: "gantt-connection-overlay" }, po = {
1553
1562
  pointerEvents: "none",
1554
1563
  zIndex: 1
1555
1564
  }
1556
- }, xo = ["d", "stroke-width", "onDblclick"], yo = ["id", "d", "stroke", "stroke-width", "onDblclick"], bo = 0.25, Ge = 16, Co = /* @__PURE__ */ xe({
1565
+ }, yo = ["d", "stroke-width", "onDblclick"], bo = ["id", "d", "stroke", "stroke-width", "onDblclick"], Co = 0.25, Ge = 16, ko = /* @__PURE__ */ xe({
1557
1566
  __name: "AGanttConnection",
1558
1567
  props: {
1559
1568
  store: {}
1560
1569
  },
1561
1570
  emits: ["connection:delete"],
1562
1571
  setup(e, { emit: t }) {
1563
- const n = t, l = E(() => e.store.connectionPaths.filter((o) => {
1564
- const c = e.store.ganttBars.find((s) => s.id === o.from.barId), r = e.store.ganttBars.find((s) => s.id === o.to.barId);
1565
- return c && r;
1572
+ const n = t, l = $(() => e.store.connectionPaths.filter((o) => {
1573
+ const r = e.store.ganttBars.find((s) => s.id === o.from.barId), c = e.store.ganttBars.find((s) => s.id === o.to.barId);
1574
+ return r && c;
1566
1575
  })), u = (o) => {
1567
- const c = e.store.connectionHandles.find(
1576
+ const r = e.store.connectionHandles.find(
1568
1577
  (j) => j.barId === o.from.barId && j.side === o.from.side
1569
- ), r = e.store.connectionHandles.find(
1578
+ ), c = e.store.connectionHandles.find(
1570
1579
  (j) => j.barId === o.to.barId && j.side === o.to.side
1571
1580
  );
1572
- if (!c || !r) return "";
1573
- const s = c.position.x + Ge / 2, d = c.position.y + Ge / 2, v = r.position.x + Ge / 2, y = r.position.y + Ge / 2, P = Math.abs(v - s), F = Math.max(P * bo, 50), M = s + (o.from.side === "left" ? -F : F), h = v + (o.to.side === "left" ? -F : F), m = { x: 0.5 * s + 0.5 * M, y: 0.5 * d + 0.5 * d }, g = { x: 0.5 * M + 0.5 * h, y: 0.5 * d + 0.5 * y }, k = { x: 0.5 * h + 0.5 * v, y: 0.5 * y + 0.5 * y }, x = { x: 0.5 * m.x + 0.5 * g.x, y: 0.5 * m.y + 0.5 * g.y }, R = { x: 0.5 * g.x + 0.5 * k.x, y: 0.5 * g.y + 0.5 * k.y }, B = { x: 0.5 * x.x + 0.5 * R.x, y: 0.5 * x.y + 0.5 * R.y };
1574
- return `M ${s} ${d} Q ${M} ${d}, ${B.x} ${B.y} Q ${h} ${y}, ${v} ${y}`;
1581
+ if (!r || !c) return "";
1582
+ const s = r.position.x + Ge / 2, f = r.position.y + Ge / 2, v = c.position.x + Ge / 2, x = c.position.y + Ge / 2, I = Math.abs(v - s), P = Math.max(I * Co, 50), R = s + (o.from.side === "left" ? -P : P), w = v + (o.to.side === "left" ? -P : P), h = { x: 0.5 * s + 0.5 * R, y: 0.5 * f + 0.5 * f }, m = { x: 0.5 * R + 0.5 * w, y: 0.5 * f + 0.5 * x }, C = { x: 0.5 * w + 0.5 * v, y: 0.5 * x + 0.5 * x }, b = { x: 0.5 * h.x + 0.5 * m.x, y: 0.5 * h.y + 0.5 * m.y }, p = { x: 0.5 * m.x + 0.5 * C.x, y: 0.5 * m.y + 0.5 * C.y }, O = { x: 0.5 * b.x + 0.5 * p.x, y: 0.5 * b.y + 0.5 * p.y };
1583
+ return `M ${s} ${f} Q ${R} ${f}, ${O.x} ${O.y} Q ${w} ${x}, ${v} ${x}`;
1575
1584
  }, a = (o) => {
1576
1585
  e.store.deleteConnection(o.id) && n("connection:delete", o);
1577
1586
  };
1578
- return (o, c) => (p(), b("div", wo, [
1579
- (p(), b("svg", po, [
1580
- c[0] || (c[0] = N("defs", null, [
1581
- N("path", {
1587
+ return (o, r) => (y(), k("div", po, [
1588
+ (y(), k("svg", xo, [
1589
+ r[0] || (r[0] = F("defs", null, [
1590
+ F("path", {
1582
1591
  id: "arrowhead",
1583
1592
  d: "M 0 -7 L 20 0 L 0 7Z",
1584
1593
  stroke: "black",
1585
1594
  "stroke-width": "1",
1586
1595
  fill: "currentColor"
1587
1596
  }),
1588
- N("marker", {
1597
+ F("marker", {
1589
1598
  id: "arrowhead-marker",
1590
1599
  markerWidth: "10",
1591
1600
  markerHeight: "7",
@@ -1594,39 +1603,39 @@ const wo = { class: "gantt-connection-overlay" }, po = {
1594
1603
  orient: "auto",
1595
1604
  markerUnits: "strokeWidth"
1596
1605
  }, [
1597
- N("polygon", {
1606
+ F("polygon", {
1598
1607
  points: "0 0, 10 3.5, 0 7",
1599
1608
  fill: "currentColor"
1600
1609
  })
1601
1610
  ])
1602
1611
  ], -1)),
1603
- (p(!0), b(me, null, Ce(l.value, (r) => (p(), b("path", {
1604
- key: `${r.id}-hitbox`,
1605
- d: u(r),
1612
+ (y(!0), k(me, null, Ce(l.value, (c) => (y(), k("path", {
1613
+ key: `${c.id}-hitbox`,
1614
+ d: u(c),
1606
1615
  stroke: "transparent",
1607
- "stroke-width": (r.style?.width || 2) + 10,
1616
+ "stroke-width": (c.style?.width || 2) + 10,
1608
1617
  fill: "none",
1609
1618
  class: "connection-hitbox",
1610
- onDblclick: (s) => a(r)
1611
- }, null, 40, xo))), 128)),
1612
- (p(!0), b(me, null, Ce(l.value, (r) => (p(), b("path", {
1613
- id: r.id,
1614
- key: r.id,
1615
- d: u(r),
1616
- stroke: r.style?.color || "#666",
1617
- "stroke-width": r.style?.width || 2,
1619
+ onDblclick: (s) => a(c)
1620
+ }, null, 40, yo))), 128)),
1621
+ (y(!0), k(me, null, Ce(l.value, (c) => (y(), k("path", {
1622
+ id: c.id,
1623
+ key: c.id,
1624
+ d: u(c),
1625
+ stroke: c.style?.color || "#666",
1626
+ "stroke-width": c.style?.width || 2,
1618
1627
  fill: "none",
1619
1628
  "marker-mid": "url(#arrowhead-marker)",
1620
1629
  class: "connection-path animated-path",
1621
- onDblclick: (s) => a(r)
1622
- }, null, 40, yo))), 128))
1630
+ onDblclick: (s) => a(c)
1631
+ }, null, 40, bo))), 128))
1623
1632
  ]))
1624
1633
  ]));
1625
1634
  }
1626
- }), Mo = /* @__PURE__ */ $e(Co, [["__scopeId", "data-v-d5929c98"]]), ko = { class: "column-filter" }, Ro = {
1635
+ }), Mo = /* @__PURE__ */ $e(ko, [["__scopeId", "data-v-d5929c98"]]), Ro = { class: "column-filter" }, Eo = {
1627
1636
  key: 2,
1628
1637
  class: "checkbox-filter"
1629
- }, Eo = ["value"], $o = {
1638
+ }, $o = ["value"], To = {
1630
1639
  key: 5,
1631
1640
  class: "date-range-filter"
1632
1641
  }, Io = /* @__PURE__ */ xe({
@@ -1640,7 +1649,7 @@ const wo = { class: "gantt-connection-overlay" }, po = {
1640
1649
  const t = z(""), n = jt({
1641
1650
  startValue: "",
1642
1651
  endValue: ""
1643
- }), l = E(() => {
1652
+ }), l = $(() => {
1644
1653
  if (e.column.filterType) return e.column.filterType;
1645
1654
  switch (e.column.fieldtype) {
1646
1655
  case "Check":
@@ -1662,123 +1671,123 @@ const wo = { class: "gantt-connection-overlay" }, po = {
1662
1671
  }
1663
1672
  }), u = (s) => {
1664
1673
  if (s.filterOptions) return s.filterOptions;
1665
- const d = /* @__PURE__ */ new Set();
1674
+ const f = /* @__PURE__ */ new Set();
1666
1675
  return e.store.rows.forEach((v) => {
1667
- const y = v[s.name];
1668
- y != null && y !== "" && d.add(y);
1669
- }), Array.from(d).map((v) => ({
1676
+ const x = v[s.name];
1677
+ x != null && x !== "" && f.add(x);
1678
+ }), Array.from(f).map((v) => ({
1670
1679
  value: v,
1671
1680
  label: String(v)
1672
1681
  }));
1673
- }, a = E(() => !!(t.value || n.startValue || n.endValue)), o = (s) => {
1682
+ }, a = $(() => !!(t.value || n.startValue || n.endValue)), o = (s) => {
1674
1683
  !s && l.value !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = s, e.store.setFilter(e.colIndex, { value: s }));
1675
- }, c = (s, d) => {
1676
- s === "start" ? n.startValue = d : n.endValue = d, !n.startValue && !n.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
1684
+ }, r = (s, f) => {
1685
+ s === "start" ? n.startValue = f : n.endValue = f, !n.startValue && !n.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
1677
1686
  value: null,
1678
1687
  startValue: n.startValue,
1679
1688
  endValue: n.endValue
1680
1689
  });
1681
- }, r = () => {
1690
+ }, c = () => {
1682
1691
  t.value = "", n.startValue = "", n.endValue = "", e.store.clearFilter(e.colIndex);
1683
1692
  };
1684
- return (s, d) => (p(), b("div", ko, [
1685
- l.value === "text" ? de((p(), b("input", {
1693
+ return (s, f) => (y(), k("div", Ro, [
1694
+ l.value === "text" ? de((y(), k("input", {
1686
1695
  key: 0,
1687
- "onUpdate:modelValue": d[0] || (d[0] = (v) => t.value = v),
1696
+ "onUpdate:modelValue": f[0] || (f[0] = (v) => t.value = v),
1688
1697
  type: "text",
1689
1698
  class: "filter-input",
1690
- onInput: d[1] || (d[1] = (v) => o(t.value))
1699
+ onInput: f[1] || (f[1] = (v) => o(t.value))
1691
1700
  }, null, 544)), [
1692
1701
  [Ze, t.value]
1693
- ]) : l.value === "number" ? de((p(), b("input", {
1702
+ ]) : l.value === "number" ? de((y(), k("input", {
1694
1703
  key: 1,
1695
- "onUpdate:modelValue": d[2] || (d[2] = (v) => t.value = v),
1704
+ "onUpdate:modelValue": f[2] || (f[2] = (v) => t.value = v),
1696
1705
  type: "number",
1697
1706
  class: "filter-input",
1698
- onInput: d[3] || (d[3] = (v) => o(t.value))
1707
+ onInput: f[3] || (f[3] = (v) => o(t.value))
1699
1708
  }, null, 544)), [
1700
1709
  [Ze, t.value]
1701
- ]) : l.value === "checkbox" ? (p(), b("label", Ro, [
1702
- de(N("input", {
1703
- "onUpdate:modelValue": d[4] || (d[4] = (v) => t.value = v),
1710
+ ]) : l.value === "checkbox" ? (y(), k("label", Eo, [
1711
+ de(F("input", {
1712
+ "onUpdate:modelValue": f[4] || (f[4] = (v) => t.value = v),
1704
1713
  type: "checkbox",
1705
1714
  class: "filter-checkbox",
1706
- onChange: d[5] || (d[5] = (v) => o(t.value))
1715
+ onChange: f[5] || (f[5] = (v) => o(t.value))
1707
1716
  }, null, 544), [
1708
1717
  [Yt, t.value]
1709
1718
  ]),
1710
- N("span", null, be(e.column.label), 1)
1711
- ])) : l.value === "select" ? de((p(), b("select", {
1719
+ F("span", null, be(e.column.label), 1)
1720
+ ])) : l.value === "select" ? de((y(), k("select", {
1712
1721
  key: 3,
1713
- "onUpdate:modelValue": d[6] || (d[6] = (v) => t.value = v),
1722
+ "onUpdate:modelValue": f[6] || (f[6] = (v) => t.value = v),
1714
1723
  class: "filter-select",
1715
- onChange: d[7] || (d[7] = (v) => o(t.value))
1724
+ onChange: f[7] || (f[7] = (v) => o(t.value))
1716
1725
  }, [
1717
- d[15] || (d[15] = N("option", { value: "" }, "All", -1)),
1718
- (p(!0), b(me, null, Ce(u(e.column), (v) => (p(), b("option", {
1726
+ f[15] || (f[15] = F("option", { value: "" }, "All", -1)),
1727
+ (y(!0), k(me, null, Ce(u(e.column), (v) => (y(), k("option", {
1719
1728
  key: v.value || v,
1720
1729
  value: v.value || v
1721
- }, be(v.label || v), 9, Eo))), 128))
1730
+ }, be(v.label || v), 9, $o))), 128))
1722
1731
  ], 544)), [
1723
1732
  [Ut, t.value]
1724
- ]) : l.value === "date" ? de((p(), b("input", {
1733
+ ]) : l.value === "date" ? de((y(), k("input", {
1725
1734
  key: 4,
1726
- "onUpdate:modelValue": d[8] || (d[8] = (v) => t.value = v),
1735
+ "onUpdate:modelValue": f[8] || (f[8] = (v) => t.value = v),
1727
1736
  type: "date",
1728
1737
  class: "filter-input",
1729
- onChange: d[9] || (d[9] = (v) => o(t.value))
1738
+ onChange: f[9] || (f[9] = (v) => o(t.value))
1730
1739
  }, null, 544)), [
1731
1740
  [Ze, t.value]
1732
- ]) : l.value === "dateRange" ? (p(), b("div", $o, [
1733
- de(N("input", {
1734
- "onUpdate:modelValue": d[10] || (d[10] = (v) => n.startValue = v),
1741
+ ]) : l.value === "dateRange" ? (y(), k("div", To, [
1742
+ de(F("input", {
1743
+ "onUpdate:modelValue": f[10] || (f[10] = (v) => n.startValue = v),
1735
1744
  type: "date",
1736
1745
  class: "filter-input",
1737
- onChange: d[11] || (d[11] = (v) => c("start", n.startValue))
1746
+ onChange: f[11] || (f[11] = (v) => r("start", n.startValue))
1738
1747
  }, null, 544), [
1739
1748
  [Ze, n.startValue]
1740
1749
  ]),
1741
- d[16] || (d[16] = N("span", { class: "date-separator" }, "-", -1)),
1742
- de(N("input", {
1743
- "onUpdate:modelValue": d[12] || (d[12] = (v) => n.endValue = v),
1750
+ f[16] || (f[16] = F("span", { class: "date-separator" }, "-", -1)),
1751
+ de(F("input", {
1752
+ "onUpdate:modelValue": f[12] || (f[12] = (v) => n.endValue = v),
1744
1753
  type: "date",
1745
1754
  class: "filter-input",
1746
- onChange: d[13] || (d[13] = (v) => c("end", n.endValue))
1755
+ onChange: f[13] || (f[13] = (v) => r("end", n.endValue))
1747
1756
  }, null, 544), [
1748
1757
  [Ze, n.endValue]
1749
1758
  ])
1750
- ])) : l.value === "component" && e.column.filterComponent ? (p(), he(Ne(e.column.filterComponent), {
1759
+ ])) : l.value === "component" && e.column.filterComponent ? (y(), he(Ne(e.column.filterComponent), {
1751
1760
  key: 6,
1752
1761
  value: t.value,
1753
1762
  column: e.column,
1754
1763
  "col-index": e.colIndex,
1755
1764
  store: e.store,
1756
- "onUpdate:value": d[14] || (d[14] = (v) => o(v))
1765
+ "onUpdate:value": f[14] || (f[14] = (v) => o(v))
1757
1766
  }, null, 40, ["value", "column", "col-index", "store"])) : ee("", !0),
1758
- a.value ? (p(), b("button", {
1767
+ a.value ? (y(), k("button", {
1759
1768
  key: 7,
1760
1769
  class: "clear-btn",
1761
1770
  title: "Clear",
1762
- onClick: r
1771
+ onClick: c
1763
1772
  }, "×")) : ee("", !0)
1764
1773
  ]));
1765
1774
  }
1766
- }), To = /* @__PURE__ */ $e(Io, [["__scopeId", "data-v-e0efa4a9"]]), So = { key: 0 }, Ao = {
1775
+ }), So = /* @__PURE__ */ $e(Io, [["__scopeId", "data-v-e0efa4a9"]]), Ao = { key: 0 }, Ho = {
1767
1776
  class: "atable-header-row",
1768
1777
  tabindex: "-1"
1769
- }, Ho = {
1778
+ }, Lo = {
1770
1779
  key: 2,
1771
1780
  class: "row-actions-header"
1772
- }, Lo = ["data-colindex", "onClick"], Do = {
1781
+ }, Do = ["data-colindex", "onClick"], Oo = {
1773
1782
  key: 3,
1774
1783
  class: "row-actions-header"
1775
- }, Oo = {
1784
+ }, Vo = {
1776
1785
  key: 0,
1777
1786
  class: "atable-filters-row"
1778
- }, Vo = {
1787
+ }, Bo = {
1779
1788
  key: 2,
1780
1789
  class: "row-actions-header"
1781
- }, Bo = {
1790
+ }, Po = {
1782
1791
  key: 3,
1783
1792
  class: "row-actions-header"
1784
1793
  }, Ot = /* @__PURE__ */ xe({
@@ -1788,72 +1797,72 @@ const wo = { class: "gantt-connection-overlay" }, po = {
1788
1797
  store: {}
1789
1798
  },
1790
1799
  setup(e) {
1791
- const t = E(() => e.columns.filter((o) => o.filterable)), n = E(() => e.store.config.rowActions?.enabled ?? !1), l = E(() => e.store.config.rowActions?.position ?? "before-index"), u = (o) => e.store.sortByColumn(o), a = (o) => {
1792
- for (const c of o) {
1793
- if (c.borderBoxSize.length === 0) continue;
1794
- const s = c.borderBoxSize[0].inlineSize, d = Number(c.target.dataset.colindex), v = e.store.columns[d]?.width;
1795
- typeof v == "number" && v !== s && e.store.resizeColumn(d, s);
1800
+ const t = $(() => e.columns.filter((o) => o.filterable)), n = $(() => e.store.config.rowActions?.enabled ?? !1), l = $(() => e.store.config.rowActions?.position ?? "before-index"), u = (o) => e.store.sortByColumn(o), a = (o) => {
1801
+ for (const r of o) {
1802
+ if (r.borderBoxSize.length === 0) continue;
1803
+ const s = r.borderBoxSize[0].inlineSize, f = Number(r.target.dataset.colindex), v = e.store.columns[f]?.width;
1804
+ typeof v == "number" && v !== s && e.store.resizeColumn(f, s);
1796
1805
  }
1797
1806
  };
1798
- return (o, c) => e.columns.length ? (p(), b("thead", So, [
1799
- N("tr", Ao, [
1800
- n.value && l.value === "before-index" ? (p(), b("th", {
1807
+ return (o, r) => e.columns.length ? (y(), k("thead", Ao, [
1808
+ F("tr", Ho, [
1809
+ n.value && l.value === "before-index" ? (y(), k("th", {
1801
1810
  key: 0,
1802
- class: se(["row-actions-header", { "sticky-column": l.value === "before-index" }])
1811
+ class: ae(["row-actions-header", { "sticky-column": l.value === "before-index" }])
1803
1812
  }, null, 2)) : ee("", !0),
1804
- e.store.zeroColumn ? (p(), b("th", {
1813
+ e.store.zeroColumn ? (y(), k("th", {
1805
1814
  key: 1,
1806
1815
  id: "header-index",
1807
- class: se([[
1816
+ class: ae([[
1808
1817
  e.store.hasPinnedColumns ? "sticky-index" : "",
1809
1818
  e.store.isTreeView ? "tree-index" : "",
1810
1819
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1811
1820
  ], "list-index"])
1812
1821
  }, null, 2)) : ee("", !0),
1813
- n.value && l.value === "after-index" ? (p(), b("th", Ho)) : ee("", !0),
1814
- (p(!0), b(me, null, Ce(e.columns, (r, s) => de((p(), b("th", {
1815
- key: r.name,
1822
+ n.value && l.value === "after-index" ? (y(), k("th", Lo)) : ee("", !0),
1823
+ (y(!0), k(me, null, Ce(e.columns, (c, s) => de((y(), k("th", {
1824
+ key: c.name,
1816
1825
  "data-colindex": s,
1817
1826
  tabindex: "-1",
1818
- style: pe(e.store.getHeaderCellStyle(r)),
1819
- class: se(`${r.pinned ? "sticky-column" : ""} ${r.sortable === !1 ? "" : "cursor-pointer"}`),
1820
- onClick: (d) => r.sortable !== !1 ? u(s) : void 0
1827
+ style: pe(e.store.getHeaderCellStyle(c)),
1828
+ class: ae(`${c.pinned ? "sticky-column" : ""} ${c.sortable === !1 ? "" : "cursor-pointer"}`),
1829
+ onClick: (f) => c.sortable !== !1 ? u(s) : void 0
1821
1830
  }, [
1822
1831
  fe(o.$slots, "default", {}, () => [
1823
- Jt(be(r.label || String.fromCharCode(s + 97).toUpperCase()), 1)
1832
+ Jt(be(c.label || String.fromCharCode(s + 97).toUpperCase()), 1)
1824
1833
  ])
1825
- ], 14, Lo)), [
1826
- [O(mo), a]
1834
+ ], 14, Do)), [
1835
+ [B(go), a]
1827
1836
  ])), 128)),
1828
- n.value && l.value === "end" ? (p(), b("th", Do)) : ee("", !0)
1837
+ n.value && l.value === "end" ? (y(), k("th", Oo)) : ee("", !0)
1829
1838
  ]),
1830
- t.value.length > 0 ? (p(), b("tr", Oo, [
1831
- n.value && l.value === "before-index" ? (p(), b("th", {
1839
+ t.value.length > 0 ? (y(), k("tr", Vo, [
1840
+ n.value && l.value === "before-index" ? (y(), k("th", {
1832
1841
  key: 0,
1833
- class: se(["row-actions-header", { "sticky-column": l.value === "before-index" }])
1842
+ class: ae(["row-actions-header", { "sticky-column": l.value === "before-index" }])
1834
1843
  }, null, 2)) : ee("", !0),
1835
- e.store.zeroColumn ? (p(), b("th", {
1844
+ e.store.zeroColumn ? (y(), k("th", {
1836
1845
  key: 1,
1837
- class: se([[
1846
+ class: ae([[
1838
1847
  e.store.hasPinnedColumns ? "sticky-index" : "",
1839
1848
  e.store.isTreeView ? "tree-index" : "",
1840
1849
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1841
1850
  ], "list-index"])
1842
1851
  }, null, 2)) : ee("", !0),
1843
- n.value && l.value === "after-index" ? (p(), b("th", Vo)) : ee("", !0),
1844
- (p(!0), b(me, null, Ce(e.columns, (r, s) => (p(), b("th", {
1845
- key: `filter-${r.name}`,
1846
- class: se(`${r.pinned ? "sticky-column" : ""}`),
1847
- style: pe(e.store.getHeaderCellStyle(r))
1852
+ n.value && l.value === "after-index" ? (y(), k("th", Bo)) : ee("", !0),
1853
+ (y(!0), k(me, null, Ce(e.columns, (c, s) => (y(), k("th", {
1854
+ key: `filter-${c.name}`,
1855
+ class: ae(`${c.pinned ? "sticky-column" : ""}`),
1856
+ style: pe(e.store.getHeaderCellStyle(c))
1848
1857
  }, [
1849
- r.filterable ? (p(), he(To, {
1858
+ c.filterable ? (y(), he(So, {
1850
1859
  key: 0,
1851
- column: r,
1860
+ column: c,
1852
1861
  "col-index": s,
1853
1862
  store: e.store
1854
1863
  }, null, 8, ["column", "col-index", "store"])) : ee("", !0)
1855
1864
  ], 6))), 128)),
1856
- n.value && l.value === "end" ? (p(), b("th", Bo)) : ee("", !0)
1865
+ n.value && l.value === "end" ? (y(), k("th", Po)) : ee("", !0)
1857
1866
  ])) : ee("", !0)
1858
1867
  ])) : ee("", !0);
1859
1868
  }
@@ -1863,21 +1872,21 @@ const wo = { class: "gantt-connection-overlay" }, po = {
1863
1872
  store: {}
1864
1873
  },
1865
1874
  setup(e) {
1866
- const t = ce("amodal"), { width: n, height: l } = Ie(t), u = E(() => {
1875
+ const t = ce("amodal"), { width: n, height: l } = Te(t), u = $(() => {
1867
1876
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return {};
1868
1877
  const a = e.store.modal.cell?.closest("table");
1869
1878
  if (!a) return {};
1870
- const o = a.offsetHeight || 0, c = a.offsetWidth || 0;
1871
- let r = e.store.modal.cell?.offsetTop || 0;
1879
+ const o = a.offsetHeight || 0, r = a.offsetWidth || 0;
1880
+ let c = e.store.modal.cell?.offsetTop || 0;
1872
1881
  const s = a.querySelector("thead")?.offsetHeight || 0;
1873
- r += s, r = r + l.value < o ? r : r - (l.value + e.store.modal.height);
1874
- let d = e.store.modal.cell?.offsetLeft || 0;
1875
- return d = d + n.value <= c ? d : d - (n.value - e.store.modal.width), {
1876
- left: `${d}px`,
1877
- top: `${r}px`
1882
+ c += s, c = c + l.value < o ? c : c - (l.value + e.store.modal.height);
1883
+ let f = e.store.modal.cell?.offsetLeft || 0;
1884
+ return f = f + n.value <= r ? f : f - (n.value - e.store.modal.width), {
1885
+ left: `${f}px`,
1886
+ top: `${c}px`
1878
1887
  };
1879
1888
  });
1880
- return (a, o) => (p(), b("div", {
1889
+ return (a, o) => (y(), k("div", {
1881
1890
  ref: "amodal",
1882
1891
  class: "amodal",
1883
1892
  tabindex: "-1",
@@ -1898,7 +1907,7 @@ function Bt(e, t) {
1898
1907
  const l = n.parent;
1899
1908
  return l < 0 || l >= t.length ? !1 : (t[l].childrenOpen || !1) && Bt(l, t);
1900
1909
  }
1901
- function Po(e, t, n) {
1910
+ function Zo(e, t, n) {
1902
1911
  const l = n.filterType || "text", u = t.value;
1903
1912
  if (!u && l !== "dateRange" && l !== "checkbox") return !0;
1904
1913
  switch (l) {
@@ -1915,8 +1924,8 @@ function Po(e, t, n) {
1915
1924
  case "date": {
1916
1925
  let a;
1917
1926
  if (typeof e == "number") {
1918
- const c = new Date(e), r = (/* @__PURE__ */ new Date()).getFullYear();
1919
- a = new Date(r, c.getMonth(), c.getDate());
1927
+ const r = new Date(e), c = (/* @__PURE__ */ new Date()).getFullYear();
1928
+ a = new Date(c, r.getMonth(), r.getDate());
1920
1929
  } else
1921
1930
  a = new Date(String(e));
1922
1931
  const o = new Date(String(u));
@@ -1925,44 +1934,44 @@ function Po(e, t, n) {
1925
1934
  case "dateRange": {
1926
1935
  const a = t.startValue, o = t.endValue;
1927
1936
  if (!a && !o) return !0;
1928
- let c;
1937
+ let r;
1929
1938
  if (typeof e == "number") {
1930
- const r = new Date(e), s = (/* @__PURE__ */ new Date()).getFullYear();
1931
- c = new Date(s, r.getMonth(), r.getDate());
1939
+ const c = new Date(e), s = (/* @__PURE__ */ new Date()).getFullYear();
1940
+ r = new Date(s, c.getMonth(), c.getDate());
1932
1941
  } else
1933
- c = new Date(String(e));
1934
- return !(a && c < new Date(String(a)) || o && c > new Date(String(o)));
1942
+ r = new Date(String(e));
1943
+ return !(a && r < new Date(String(a)) || o && r > new Date(String(o)));
1935
1944
  }
1936
1945
  default:
1937
1946
  return !0;
1938
1947
  }
1939
1948
  }
1940
- function Zo(e, t) {
1949
+ function No(e, t) {
1941
1950
  return t && e === 0 && t > 0 ? `${t}ch` : "inherit";
1942
1951
  }
1943
- const No = (e) => {
1952
+ const Fo = (e) => {
1944
1953
  const t = e.id || Ln(), n = e.linkResolver ?? null;
1945
1954
  return Qt(`table-${t}`, () => {
1946
1955
  const u = () => {
1947
- const i = [Object.assign({}, { rowModified: !1 })], f = /* @__PURE__ */ new Set();
1948
- for (let L = 0; L < o.value.length; L++) {
1949
- const S = o.value[L];
1950
- S.parent !== null && S.parent !== void 0 && f.add(S.parent);
1956
+ const i = [Object.assign({}, { rowModified: !1 })], d = /* @__PURE__ */ new Set();
1957
+ for (let D = 0; D < o.value.length; D++) {
1958
+ const A = o.value[D];
1959
+ A.parent !== null && A.parent !== void 0 && d.add(A.parent);
1951
1960
  }
1952
- const w = (L) => o.value[L]?.gantt !== void 0, T = (L) => {
1953
- for (let S = 0; S < o.value.length; S++)
1954
- if (o.value[S].parent === L && (w(S) || T(S)))
1961
+ const g = (D) => o.value[D]?.gantt !== void 0, S = (D) => {
1962
+ for (let A = 0; A < o.value.length; A++)
1963
+ if (o.value[A].parent === D && (g(A) || S(A)))
1955
1964
  return !0;
1956
1965
  return !1;
1957
- }, J = (L) => {
1958
- const S = c.value, U = S.view === "tree" || S.view === "tree-gantt" ? S.defaultTreeExpansion : void 0;
1966
+ }, J = (D) => {
1967
+ const A = r.value, U = A.view === "tree" || A.view === "tree-gantt" ? A.defaultTreeExpansion : void 0;
1959
1968
  if (!U) return !0;
1960
1969
  switch (U) {
1961
1970
  case "root":
1962
1971
  return !1;
1963
1972
  // Only root nodes are visible, all children start collapsed
1964
1973
  case "branch":
1965
- return T(L);
1974
+ return S(D);
1966
1975
  case "leaf":
1967
1976
  return !0;
1968
1977
  // All nodes should be expanded
@@ -1970,287 +1979,287 @@ const No = (e) => {
1970
1979
  return !0;
1971
1980
  }
1972
1981
  };
1973
- for (let L = 0; L < o.value.length; L++) {
1974
- const S = o.value[L], U = S.parent === null || S.parent === void 0, ie = f.has(L);
1975
- i[L] = {
1976
- childrenOpen: J(L),
1982
+ for (let D = 0; D < o.value.length; D++) {
1983
+ const A = o.value[D], U = A.parent === null || A.parent === void 0, ie = d.has(D);
1984
+ i[D] = {
1985
+ childrenOpen: J(D),
1977
1986
  expanded: !1,
1978
- indent: S.indent || 0,
1987
+ indent: A.indent || 0,
1979
1988
  isParent: ie,
1980
1989
  isRoot: U,
1981
1990
  rowModified: !1,
1982
1991
  open: U,
1983
1992
  // This will be recalculated later for non-root nodes
1984
- parent: S.parent
1993
+ parent: A.parent
1985
1994
  };
1986
1995
  }
1987
1996
  return i;
1988
- }, a = z(e.columns), o = z(e.rows), c = z(e.config || {}), r = z({}), s = z({}), d = E(() => {
1997
+ }, a = z(e.columns), o = z(e.rows), r = z(e.config || {}), c = z({}), s = z({}), f = $(() => {
1989
1998
  const i = {};
1990
- for (const [f, w] of a.value.entries())
1991
- for (const [T, J] of o.value.entries())
1992
- i[`${f}:${T}`] = J[w.name];
1999
+ for (const [d, g] of a.value.entries())
2000
+ for (const [S, J] of o.value.entries())
2001
+ i[`${d}:${S}`] = J[g.name];
1993
2002
  return i;
1994
- }), v = E({
2003
+ }), v = $({
1995
2004
  get: () => {
1996
2005
  const i = u();
1997
- for (let f = 0; f < i.length; f++)
1998
- r.value[f] && (i[f].rowModified = r.value[f]), s.value[f] && (s.value[f].childrenOpen !== void 0 && (i[f].childrenOpen = s.value[f].childrenOpen), s.value[f].expanded !== void 0 && (i[f].expanded = s.value[f].expanded));
1999
- if (R.value)
2000
- for (let f = 0; f < i.length; f++)
2001
- i[f].isRoot || (i[f].open = Bt(f, i));
2006
+ for (let d = 0; d < i.length; d++)
2007
+ c.value[d] && (i[d].rowModified = c.value[d]), s.value[d] && (s.value[d].childrenOpen !== void 0 && (i[d].childrenOpen = s.value[d].childrenOpen), s.value[d].expanded !== void 0 && (i[d].expanded = s.value[d].expanded));
2008
+ if (p.value)
2009
+ for (let d = 0; d < i.length; d++)
2010
+ i[d].isRoot || (i[d].open = Bt(d, i));
2002
2011
  return i;
2003
2012
  },
2004
2013
  set: (i) => {
2005
2014
  JSON.stringify(i) !== JSON.stringify(v.value) && (v.value = i);
2006
2015
  }
2007
- }), y = z(e.modal || { visible: !1 }), P = z({}), F = z([]), M = z([]), h = z([]), m = z({
2016
+ }), x = z(e.modal || { visible: !1 }), I = z({}), P = z([]), R = z([]), w = z([]), h = z({
2008
2017
  column: null,
2009
2018
  direction: null
2010
- }), g = z({}), k = E(() => a.value.some((i) => i.pinned)), x = E(() => c.value.view === "gantt" || c.value.view === "tree-gantt"), R = E(() => c.value.view === "tree" || c.value.view === "tree-gantt"), B = E(() => {
2011
- const i = c.value;
2019
+ }), m = z({}), C = $(() => a.value.some((i) => i.pinned)), b = $(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), p = $(() => r.value.view === "tree" || r.value.view === "tree-gantt"), O = $(() => {
2020
+ const i = r.value;
2012
2021
  return i.view === "gantt" || i.view === "tree-gantt" ? i.dependencyGraph !== !1 : !0;
2013
- }), j = E(() => `${Math.ceil(o.value.length / 100 + 1)}ch`), I = E(
2014
- () => c.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(c.value.view) : !1
2015
- ), V = E(() => {
2016
- let i = o.value.map((f, w) => ({
2017
- ...f,
2018
- originalIndex: w
2022
+ }), j = $(() => `${Math.ceil(o.value.length / 100 + 1)}ch`), E = $(
2023
+ () => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
2024
+ ), Z = $(() => {
2025
+ let i = o.value.map((d, g) => ({
2026
+ ...d,
2027
+ originalIndex: g
2019
2028
  }));
2020
- if (Object.entries(g.value).forEach(([f, w]) => {
2021
- const T = parseInt(f), J = a.value[T];
2022
- !J || !(w.value || w.startValue || w.endValue || J.filterType === "checkbox" && w.value !== void 0) || (i = i.filter((S) => {
2023
- const U = S[J.name];
2024
- return Po(U, w, J);
2029
+ if (Object.entries(m.value).forEach(([d, g]) => {
2030
+ const S = parseInt(d), J = a.value[S];
2031
+ !J || !(g.value || g.startValue || g.endValue || J.filterType === "checkbox" && g.value !== void 0) || (i = i.filter((A) => {
2032
+ const U = A[J.name];
2033
+ return Zo(U, g, J);
2025
2034
  }));
2026
- }), m.value.column !== null && m.value.direction) {
2027
- const f = a.value[m.value.column], w = m.value.direction;
2028
- i.sort((T, J) => {
2029
- let L = T[f.name], S = J[f.name];
2030
- L == null && (L = ""), S == null && (S = "");
2031
- const U = Number(L), ie = Number(S);
2032
- if (!isNaN(U) && !isNaN(ie) && L !== "" && S !== "")
2033
- return w === "asc" ? U - ie : ie - U;
2035
+ }), h.value.column !== null && h.value.direction) {
2036
+ const d = a.value[h.value.column], g = h.value.direction;
2037
+ i.sort((S, J) => {
2038
+ let D = S[d.name], A = J[d.name];
2039
+ D == null && (D = ""), A == null && (A = "");
2040
+ const U = Number(D), ie = Number(A);
2041
+ if (!isNaN(U) && !isNaN(ie) && D !== "" && A !== "")
2042
+ return g === "asc" ? U - ie : ie - U;
2034
2043
  {
2035
- const mt = String(L).toLowerCase(), gt = String(S).toLowerCase();
2036
- return w === "asc" ? mt.localeCompare(gt) : gt.localeCompare(mt);
2044
+ const mt = String(D).toLowerCase(), gt = String(A).toLowerCase();
2045
+ return g === "asc" ? mt.localeCompare(gt) : gt.localeCompare(mt);
2037
2046
  }
2038
2047
  });
2039
2048
  }
2040
2049
  return i;
2041
- }), Z = (i, f) => d.value[`${i}:${f}`], q = (i, f, w) => {
2042
- const T = `${i}:${f}`, J = a.value[i];
2043
- d.value[T] !== w && (r.value[f] = !0), d.value[T] = w, o.value[f] = {
2044
- ...o.value[f],
2045
- [J.name]: w
2050
+ }), N = (i, d) => f.value[`${i}:${d}`], q = (i, d, g) => {
2051
+ const S = `${i}:${d}`, J = a.value[i];
2052
+ f.value[S] !== g && (c.value[d] = !0), f.value[S] = g, o.value[d] = {
2053
+ ...o.value[d],
2054
+ [J.name]: g
2046
2055
  };
2047
2056
  }, _ = (i) => {
2048
2057
  o.value = i;
2049
- }, ne = (i, f, w) => {
2050
- const T = `${i}:${f}`;
2051
- d.value[T] !== w && (r.value[f] = !0, P.value[T] = w);
2058
+ }, ne = (i, d, g) => {
2059
+ const S = `${i}:${d}`;
2060
+ f.value[S] !== g && (c.value[d] = !0, I.value[S] = g);
2052
2061
  }, ge = (i) => {
2053
- const f = a.value.indexOf(i) === a.value.length - 1, w = c.value.fullWidth ? i.resizable && !f : i.resizable;
2062
+ const d = a.value.indexOf(i) === a.value.length - 1, g = r.value.fullWidth ? i.resizable && !d : i.resizable;
2054
2063
  return {
2055
2064
  width: i.width || "40ch",
2056
2065
  textAlign: i.align || "center",
2057
- ...w && {
2066
+ ...g && {
2058
2067
  resize: "horizontal",
2059
2068
  overflow: "hidden",
2060
2069
  whiteSpace: "nowrap"
2061
2070
  }
2062
2071
  };
2063
- }, ve = (i, f) => {
2072
+ }, ve = (i, d) => {
2064
2073
  if (i < 0 || i >= a.value.length) return;
2065
- const T = Math.max(f, 40);
2074
+ const S = Math.max(d, 40);
2066
2075
  a.value[i] = {
2067
2076
  ...a.value[i],
2068
- width: `${T}px`
2077
+ width: `${S}px`
2069
2078
  };
2070
2079
  }, Oe = (i) => {
2071
- const f = o.value[i];
2072
- return x.value && f.gantt !== void 0;
2073
- }, Ve = (i) => !R.value || v.value[i].isRoot || v.value[i].open, Be = (i) => !R.value && c.value.view !== "list-expansion" ? "" : R.value && (v.value[i].isRoot || v.value[i].isParent) ? v.value[i].childrenOpen ? "▼" : "►" : c.value.view === "list-expansion" ? v.value[i].expanded ? "▼" : "►" : "", Pe = (i) => {
2074
- if (R.value) {
2075
- const f = s.value[i] || {}, T = !(f.childrenOpen ?? v.value[i].childrenOpen);
2080
+ const d = o.value[i];
2081
+ return b.value && d.gantt !== void 0;
2082
+ }, Ve = (i) => !p.value || v.value[i].isRoot || v.value[i].open, Be = (i) => !p.value && r.value.view !== "list-expansion" ? "" : p.value && (v.value[i].isRoot || v.value[i].isParent) ? v.value[i].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? v.value[i].expanded ? "▼" : "►" : "", Pe = (i) => {
2083
+ if (p.value) {
2084
+ const d = s.value[i] || {}, S = !(d.childrenOpen ?? v.value[i].childrenOpen);
2076
2085
  s.value[i] = {
2077
- ...f,
2078
- childrenOpen: T
2079
- }, T || He(i);
2080
- } else if (c.value.view === "list-expansion") {
2081
- const f = s.value[i] || {}, w = f.expanded ?? v.value[i].expanded;
2086
+ ...d,
2087
+ childrenOpen: S
2088
+ }, S || He(i);
2089
+ } else if (r.value.view === "list-expansion") {
2090
+ const d = s.value[i] || {}, g = d.expanded ?? v.value[i].expanded;
2082
2091
  s.value[i] = {
2083
- ...f,
2084
- expanded: !w
2092
+ ...d,
2093
+ expanded: !g
2085
2094
  };
2086
2095
  }
2087
2096
  }, He = (i) => {
2088
- for (let f = 0; f < o.value.length; f++)
2089
- if (v.value[f].parent === i) {
2090
- const w = s.value[f] || {};
2091
- s.value[f] = {
2092
- ...w,
2097
+ for (let d = 0; d < o.value.length; d++)
2098
+ if (v.value[d].parent === i) {
2099
+ const g = s.value[d] || {};
2100
+ s.value[d] = {
2101
+ ...g,
2093
2102
  childrenOpen: !1
2094
- }, He(f);
2103
+ }, He(d);
2095
2104
  }
2096
- }, C = (i, f) => {
2097
- const w = Z(i, f);
2098
- return H(i, f, w);
2099
- }, H = (i, f, w) => {
2100
- const T = a.value[i], J = o.value[f], L = T.format;
2101
- if (!L)
2102
- switch (T.fieldtype) {
2105
+ }, M = (i, d) => {
2106
+ const g = N(i, d);
2107
+ return L(i, d, g);
2108
+ }, L = (i, d, g) => {
2109
+ const S = a.value[i], J = o.value[d], D = S.format;
2110
+ if (!D)
2111
+ switch (S.fieldtype) {
2103
2112
  case "Check":
2104
- return w ? "✓" : "✗";
2113
+ return g ? "✓" : "✗";
2105
2114
  case "Date":
2106
- return w != null ? new Date(String(w)).toLocaleDateString() : w;
2115
+ return g != null ? new Date(String(g)).toLocaleDateString() : g;
2107
2116
  case "Datetime":
2108
- return w != null ? new Date(String(w)).toLocaleString() : w;
2117
+ return g != null ? new Date(String(g)).toLocaleString() : g;
2109
2118
  default:
2110
- return w;
2119
+ return g;
2111
2120
  }
2112
- return typeof L == "function" ? L(w, { table: d.value, row: J, column: T }) : typeof L == "string" ? Function(`"use strict";return (${L})`)()(w, { table: d.value, row: J, column: T }) : w;
2121
+ return typeof D == "function" ? D(g, { table: f.value, row: J, column: S }) : typeof D == "string" ? Function(`"use strict";return (${D})`)()(g, { table: f.value, row: J, column: S }) : g;
2113
2122
  }, W = (i) => {
2114
- i.target instanceof Node && y.value.parent?.contains(i.target) || y.value.visible && (y.value.visible = !1);
2123
+ i.target instanceof Node && x.value.parent?.contains(i.target) || x.value.visible && (x.value.visible = !1);
2115
2124
  }, Q = (i) => {
2116
- const f = o.value[i.rowIndex]?.gantt;
2117
- f && (i.type === "resize" ? i.edge === "start" ? (f.startIndex = i.newStart, f.endIndex = i.end, f.colspan = f.endIndex - f.startIndex) : i.edge === "end" && (f.startIndex = i.start, f.endIndex = i.newEnd, f.colspan = f.endIndex - f.startIndex) : i.type === "bar" && (f.startIndex = i.newStart, f.endIndex = i.newEnd, f.colspan = f.endIndex - f.startIndex));
2125
+ const d = o.value[i.rowIndex]?.gantt;
2126
+ d && (i.type === "resize" ? i.edge === "start" ? (d.startIndex = i.newStart, d.endIndex = i.end, d.colspan = d.endIndex - d.startIndex) : i.edge === "end" && (d.startIndex = i.start, d.endIndex = i.newEnd, d.colspan = d.endIndex - d.startIndex) : i.type === "bar" && (d.startIndex = i.newStart, d.endIndex = i.newEnd, d.colspan = d.endIndex - d.startIndex));
2118
2127
  }, X = (i) => {
2119
- const f = F.value.findIndex((w) => w.id === i.id);
2120
- f >= 0 ? F.value[f] = i : F.value.push(i);
2128
+ const d = P.value.findIndex((g) => g.id === i.id);
2129
+ d >= 0 ? P.value[d] = i : P.value.push(i);
2121
2130
  }, oe = (i) => {
2122
- const f = F.value.findIndex((w) => w.id === i);
2123
- f >= 0 && F.value.splice(f, 1);
2131
+ const d = P.value.findIndex((g) => g.id === i);
2132
+ d >= 0 && P.value.splice(d, 1);
2124
2133
  }, ye = (i) => {
2125
- const f = M.value.findIndex((w) => w.id === i.id);
2126
- f >= 0 ? M.value[f] = i : M.value.push(i);
2134
+ const d = R.value.findIndex((g) => g.id === i.id);
2135
+ d >= 0 ? R.value[d] = i : R.value.push(i);
2127
2136
  }, Re = (i) => {
2128
- const f = M.value.findIndex((w) => w.id === i);
2129
- f >= 0 && M.value.splice(f, 1);
2130
- }, $ = (i, f, w) => {
2131
- const T = M.value.find((S) => S.id === i), J = M.value.find((S) => S.id === f);
2132
- if (!T || !J)
2137
+ const d = R.value.findIndex((g) => g.id === i);
2138
+ d >= 0 && R.value.splice(d, 1);
2139
+ }, T = (i, d, g) => {
2140
+ const S = R.value.find((A) => A.id === i), J = R.value.find((A) => A.id === d);
2141
+ if (!S || !J)
2133
2142
  return console.warn("Cannot create connection: handle not found"), null;
2134
- const L = {
2135
- id: `connection-${i}-${f}`,
2143
+ const D = {
2144
+ id: `connection-${i}-${d}`,
2136
2145
  from: {
2137
- barId: T.barId,
2138
- side: T.side
2146
+ barId: S.barId,
2147
+ side: S.side
2139
2148
  },
2140
2149
  to: {
2141
2150
  barId: J.barId,
2142
2151
  side: J.side
2143
2152
  },
2144
- style: w?.style,
2145
- label: w?.label
2153
+ style: g?.style,
2154
+ label: g?.label
2146
2155
  };
2147
- return h.value.push(L), L;
2148
- }, D = (i) => {
2149
- const f = h.value.findIndex((w) => w.id === i);
2150
- return f >= 0 ? (h.value.splice(f, 1), !0) : !1;
2151
- }, Y = (i) => h.value.filter((f) => f.from.barId === i || f.to.barId === i), G = (i) => M.value.filter((f) => f.barId === i), K = (i) => {
2156
+ return w.value.push(D), D;
2157
+ }, V = (i) => {
2158
+ const d = w.value.findIndex((g) => g.id === i);
2159
+ return d >= 0 ? (w.value.splice(d, 1), !0) : !1;
2160
+ }, Y = (i) => w.value.filter((d) => d.from.barId === i || d.to.barId === i), G = (i) => R.value.filter((d) => d.barId === i), K = (i) => {
2152
2161
  if (a.value[i].sortable === !1) return;
2153
- let w;
2154
- m.value.column === i && m.value.direction === "asc" ? w = "desc" : w = "asc", m.value.column = i, m.value.direction = w;
2155
- }, te = (i, f) => {
2156
- !f.value && !f.startValue && !f.endValue ? delete g.value[i] : g.value[i] = f;
2162
+ let g;
2163
+ h.value.column === i && h.value.direction === "asc" ? g = "desc" : g = "asc", h.value.column = i, h.value.direction = g;
2164
+ }, te = (i, d) => {
2165
+ !d.value && !d.startValue && !d.endValue ? delete m.value[i] : m.value[i] = d;
2157
2166
  }, le = (i) => {
2158
- delete g.value[i];
2159
- }, ae = (i, f = "end") => {
2160
- const w = {};
2167
+ delete m.value[i];
2168
+ }, se = (i, d = "end") => {
2169
+ const g = {};
2161
2170
  for (const J of a.value)
2162
- w[J.name] = "";
2163
- i && Object.assign(w, i);
2164
- let T;
2165
- return f === "start" ? (T = 0, o.value.unshift(w)) : f === "end" ? (T = o.value.length, o.value.push(w)) : (T = Math.max(0, Math.min(f, o.value.length)), o.value.splice(T, 0, w)), T;
2171
+ g[J.name] = "";
2172
+ i && Object.assign(g, i);
2173
+ let S;
2174
+ return d === "start" ? (S = 0, o.value.unshift(g)) : d === "end" ? (S = o.value.length, o.value.push(g)) : (S = Math.max(0, Math.min(d, o.value.length)), o.value.splice(S, 0, g)), S;
2166
2175
  };
2167
2176
  return {
2168
2177
  // state
2169
2178
  columns: a,
2170
- config: c,
2171
- connectionHandles: M,
2172
- connectionPaths: h,
2179
+ config: r,
2180
+ connectionHandles: R,
2181
+ connectionPaths: w,
2173
2182
  display: v,
2174
- filterState: g,
2175
- ganttBars: F,
2176
- modal: y,
2183
+ filterState: m,
2184
+ ganttBars: P,
2185
+ modal: x,
2177
2186
  rows: o,
2178
- sortState: m,
2179
- table: d,
2180
- updates: P,
2187
+ sortState: h,
2188
+ table: f,
2189
+ updates: I,
2181
2190
  // getters
2182
- filteredRows: V,
2183
- hasPinnedColumns: k,
2184
- isGanttView: x,
2185
- isTreeView: R,
2186
- isDependencyGraphEnabled: B,
2191
+ filteredRows: Z,
2192
+ hasPinnedColumns: C,
2193
+ isGanttView: b,
2194
+ isTreeView: p,
2195
+ isDependencyGraphEnabled: O,
2187
2196
  numberedRowWidth: j,
2188
- zeroColumn: I,
2197
+ zeroColumn: E,
2189
2198
  // resolver
2190
2199
  linkResolver: n,
2191
2200
  // actions
2192
- addRow: ae,
2201
+ addRow: se,
2193
2202
  clearFilter: le,
2194
2203
  closeModal: W,
2195
- createConnection: $,
2196
- deleteConnection: D,
2204
+ createConnection: T,
2205
+ deleteConnection: V,
2197
2206
  deleteRow: (i) => {
2198
2207
  if (i < 0 || i >= o.value.length)
2199
2208
  return null;
2200
- const [f] = o.value.splice(i, 1);
2201
- delete r.value[i], delete s.value[i];
2202
- const w = {}, T = {};
2203
- for (const [J, L] of Object.entries(r.value)) {
2204
- const S = parseInt(J);
2205
- S > i ? w[S - 1] = L : w[S] = L;
2209
+ const [d] = o.value.splice(i, 1);
2210
+ delete c.value[i], delete s.value[i];
2211
+ const g = {}, S = {};
2212
+ for (const [J, D] of Object.entries(c.value)) {
2213
+ const A = parseInt(J);
2214
+ A > i ? g[A - 1] = D : g[A] = D;
2206
2215
  }
2207
- for (const [J, L] of Object.entries(s.value)) {
2208
- const S = parseInt(J);
2209
- S > i ? T[S - 1] = L : T[S] = L;
2216
+ for (const [J, D] of Object.entries(s.value)) {
2217
+ const A = parseInt(J);
2218
+ A > i ? S[A - 1] = D : S[A] = D;
2210
2219
  }
2211
- return r.value = w, s.value = T, f;
2220
+ return c.value = g, s.value = S, d;
2212
2221
  },
2213
2222
  duplicateRow: (i) => {
2214
2223
  if (i < 0 || i >= o.value.length)
2215
2224
  return -1;
2216
- const f = o.value[i], w = JSON.parse(JSON.stringify(f)), T = i + 1;
2217
- return o.value.splice(T, 0, w), T;
2225
+ const d = o.value[i], g = JSON.parse(JSON.stringify(d)), S = i + 1;
2226
+ return o.value.splice(S, 0, g), S;
2218
2227
  },
2219
- getCellData: Z,
2220
- getCellDisplayValue: C,
2228
+ getCellData: N,
2229
+ getCellDisplayValue: M,
2221
2230
  getConnectionsForBar: Y,
2222
- getFormattedValue: H,
2231
+ getFormattedValue: L,
2223
2232
  getHandlesForBar: G,
2224
2233
  getHeaderCellStyle: ge,
2225
- getIndent: Zo,
2234
+ getIndent: No,
2226
2235
  getRowExpandSymbol: Be,
2227
- insertRowAbove: (i, f) => {
2228
- const w = Math.max(0, i);
2229
- return ae(f, w);
2236
+ insertRowAbove: (i, d) => {
2237
+ const g = Math.max(0, i);
2238
+ return se(d, g);
2230
2239
  },
2231
- insertRowBelow: (i, f) => {
2232
- const w = Math.min(i + 1, o.value.length);
2233
- return ae(f, w);
2240
+ insertRowBelow: (i, d) => {
2241
+ const g = Math.min(i + 1, o.value.length);
2242
+ return se(d, g);
2234
2243
  },
2235
2244
  isRowGantt: Oe,
2236
2245
  isRowVisible: Ve,
2237
- moveRow: (i, f) => {
2238
- if (i < 0 || i >= o.value.length || f < 0 || f >= o.value.length || i === f)
2246
+ moveRow: (i, d) => {
2247
+ if (i < 0 || i >= o.value.length || d < 0 || d >= o.value.length || i === d)
2239
2248
  return !1;
2240
- const [w] = o.value.splice(i, 1);
2241
- o.value.splice(f, 0, w);
2242
- const T = {}, J = {};
2243
- for (const [L, S] of Object.entries(r.value)) {
2244
- const U = parseInt(L);
2249
+ const [g] = o.value.splice(i, 1);
2250
+ o.value.splice(d, 0, g);
2251
+ const S = {}, J = {};
2252
+ for (const [D, A] of Object.entries(c.value)) {
2253
+ const U = parseInt(D);
2245
2254
  let ie = U;
2246
- U === i ? ie = f : i < f ? U > i && U <= f && (ie = U - 1) : U >= f && U < i && (ie = U + 1), T[ie] = S;
2255
+ U === i ? ie = d : i < d ? U > i && U <= d && (ie = U - 1) : U >= d && U < i && (ie = U + 1), S[ie] = A;
2247
2256
  }
2248
- for (const [L, S] of Object.entries(s.value)) {
2249
- const U = parseInt(L);
2257
+ for (const [D, A] of Object.entries(s.value)) {
2258
+ const U = parseInt(D);
2250
2259
  let ie = U;
2251
- U === i ? ie = f : i < f ? U > i && U <= f && (ie = U - 1) : U >= f && U < i && (ie = U + 1), J[ie] = S;
2260
+ U === i ? ie = d : i < d ? U > i && U <= d && (ie = U - 1) : U >= d && U < i && (ie = U + 1), J[ie] = A;
2252
2261
  }
2253
- return r.value = T, s.value = J, !0;
2262
+ return c.value = S, s.value = J, !0;
2254
2263
  },
2255
2264
  registerConnectionHandle: ye,
2256
2265
  registerGanttBar: X,
@@ -2267,27 +2276,27 @@ const No = (e) => {
2267
2276
  };
2268
2277
  })();
2269
2278
  };
2270
- function Fo(e) {
2279
+ function Wo(e) {
2271
2280
  return e.filter((t) => !t.hidden && t.fieldtype).map(({ fieldname: t, hidden: n, ...l }) => {
2272
2281
  const u = Object.assign({ name: t }, l);
2273
2282
  if (l.fieldtype === "Link" && !l.cellComponent) {
2274
2283
  const a = l, o = typeof a.doctype == "string" ? a.doctype : void 0;
2275
- o && (u.linkDoctype = o), l.format || (u.format = (c) => {
2276
- if (c == null) return "";
2277
- if (typeof c == "object") {
2278
- const r = c.displayText ?? c.id ?? "";
2279
- return typeof r == "string" || typeof r == "number" ? String(r) : "";
2284
+ o && (u.linkDoctype = o), l.format || (u.format = (r) => {
2285
+ if (r == null) return "";
2286
+ if (typeof r == "object") {
2287
+ const c = r.displayText ?? r.id ?? "";
2288
+ return typeof c == "string" || typeof c == "number" ? String(c) : "";
2280
2289
  }
2281
- return String(c);
2290
+ return String(r);
2282
2291
  });
2283
2292
  }
2284
2293
  return u;
2285
2294
  });
2286
2295
  }
2287
- const Wo = {
2296
+ const zo = {
2288
2297
  class: "atable-container",
2289
2298
  style: { position: "relative" }
2290
- }, zo = /* @__PURE__ */ xe({
2299
+ }, Xo = /* @__PURE__ */ xe({
2291
2300
  __name: "ATable",
2292
2301
  props: /* @__PURE__ */ yt({
2293
2302
  id: { default: "" },
@@ -2300,28 +2309,28 @@ const Wo = {
2300
2309
  columns: {},
2301
2310
  columnsModifiers: {}
2302
2311
  }),
2303
- emits: /* @__PURE__ */ yt(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
2312
+ emits: /* @__PURE__ */ yt(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:click", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move", "row:open"], ["update:rows", "update:columns"]),
2304
2313
  setup(e, { expose: t, emit: n }) {
2305
- const l = wt(e, "rows"), u = wt(e, "columns"), a = n, o = ce("table"), c = u.value?.length ? u.value : Fo(e.schema ?? []), r = qt("aformLinkResolver", null), s = No({
2306
- columns: c,
2314
+ const l = wt(e, "rows"), u = wt(e, "columns"), a = n, o = ce("table"), r = u.value?.length ? u.value : Wo(e.schema ?? []), c = qt("aformLinkResolver", null), s = Fo({
2315
+ columns: r,
2307
2316
  rows: l.value,
2308
2317
  id: e.id,
2309
2318
  config: e.config,
2310
- linkResolver: e.linkResolver ?? r
2319
+ linkResolver: e.linkResolver ?? c
2311
2320
  });
2312
- s.$onAction(({ name: h, store: m, args: g, after: k }) => {
2321
+ s.$onAction(({ name: h, store: m, args: C, after: b }) => {
2313
2322
  if (h === "setCellData" || h === "setCellText") {
2314
- const [x, R, B] = g, j = m.getCellData(x, R);
2315
- k(() => {
2316
- l.value = [...s.rows], a("cellUpdate", { colIndex: x, rowIndex: R, newValue: B, oldValue: j });
2323
+ const [p, O, j] = C, E = m.getCellData(p, O);
2324
+ b(() => {
2325
+ l.value = [...s.rows], a("cellUpdate", { colIndex: p, rowIndex: O, newValue: j, oldValue: E });
2317
2326
  });
2318
2327
  } else if (h === "updateGanttBar") {
2319
- const [x] = g;
2320
- let R = !1;
2321
- x.type === "resize" ? R = x.oldColspan !== x.newColspan : x.type === "bar" && (R = x.oldStart !== x.newStart || x.oldEnd !== x.newEnd), R && k(() => {
2322
- a("gantt:drag", x);
2328
+ const [p] = C;
2329
+ let O = !1;
2330
+ p.type === "resize" ? O = p.oldColspan !== p.newColspan : p.type === "bar" && (O = p.oldStart !== p.newStart || p.oldEnd !== p.newEnd), O && b(() => {
2331
+ a("gantt:drag", p);
2323
2332
  });
2324
- } else h === "resizeColumn" && k(() => {
2333
+ } else h === "resizeColumn" && b(() => {
2325
2334
  u.value = [...s.columns], a("columns:update", [...s.columns]);
2326
2335
  });
2327
2336
  }), ue(
@@ -2339,18 +2348,18 @@ const Wo = {
2339
2348
  ), Ae(() => {
2340
2349
  u.value?.some((h) => h.pinned) && (v(), s.isTreeView && Lt(o, v, { childList: !0, subtree: !0 }));
2341
2350
  });
2342
- const d = E(() => s.columns.filter((h) => h.pinned).length), v = () => {
2343
- const h = o.value, m = h?.rows[0], g = h?.rows[1], k = m ? Array.from(m.cells) : [];
2344
- for (const [x, R] of k.entries()) {
2345
- const B = g?.cells[x];
2346
- B && (R.style.width = `${B.offsetWidth}px`);
2351
+ const f = $(() => s.columns.filter((h) => h.pinned).length), v = () => {
2352
+ const h = o.value, m = h?.rows[0], C = h?.rows[1], b = m ? Array.from(m.cells) : [];
2353
+ for (const [p, O] of b.entries()) {
2354
+ const j = C?.cells[p];
2355
+ j && (O.style.width = `${j.offsetWidth}px`);
2347
2356
  }
2348
- for (const x of h?.rows || []) {
2349
- let R = 0;
2350
- const B = [];
2351
- for (const j of x.cells)
2352
- (j.classList.contains("sticky-column") || j.classList.contains("sticky-index")) && (j.style.left = `${R}px`, R += j.offsetWidth, B.push(j));
2353
- B.length > 0 && B[B.length - 1].classList.add("sticky-column-edge");
2357
+ for (const p of h?.rows || []) {
2358
+ let O = 0;
2359
+ const j = [];
2360
+ for (const E of p.cells)
2361
+ (E.classList.contains("sticky-column") || E.classList.contains("sticky-index")) && (E.style.left = `${O}px`, O += E.offsetWidth, j.push(E));
2362
+ j.length > 0 && j[j.length - 1].classList.add("sticky-column-edge");
2354
2363
  }
2355
2364
  };
2356
2365
  window.addEventListener("keydown", (h) => {
@@ -2360,60 +2369,68 @@ const Wo = {
2360
2369
  m && at().then(() => m.focus());
2361
2370
  }
2362
2371
  });
2363
- const y = (h) => {
2364
- if (!h.gantt || d.value === 0)
2372
+ const x = (h) => {
2373
+ if (!h.gantt || f.value === 0)
2365
2374
  return s.columns;
2366
2375
  const m = [];
2367
- for (let g = 0; g < d.value; g++) {
2368
- const k = { ...s.columns[g] };
2369
- k.originalIndex = g, m.push(k);
2376
+ for (let C = 0; C < f.value; C++) {
2377
+ const b = { ...s.columns[C] };
2378
+ b.originalIndex = C, m.push(b);
2370
2379
  }
2371
2380
  return m.push({
2372
- ...s.columns[d.value],
2381
+ ...s.columns[f.value],
2373
2382
  isGantt: !0,
2374
- colspan: h.gantt?.colspan || s.columns.length - d.value,
2375
- originalIndex: d.value,
2383
+ colspan: h.gantt?.colspan || s.columns.length - f.value,
2384
+ originalIndex: f.value,
2376
2385
  width: "auto"
2377
2386
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
2378
2387
  }), m;
2379
- }, P = (h) => {
2388
+ }, I = (h) => {
2380
2389
  a("connection:event", { type: "create", connection: h });
2381
- }, F = (h) => {
2390
+ }, P = (h) => {
2382
2391
  a("connection:event", { type: "delete", connection: h });
2383
- }, M = (h, m) => {
2392
+ }, R = (h, m) => {
2393
+ const C = s.rows[h];
2394
+ a("row:click", { row: C, rowIndex: h, event: m });
2395
+ }, w = (h, m, C) => {
2384
2396
  switch (h) {
2385
2397
  case "add": {
2386
- const g = s.addRow({}, m + 1), k = s.rows[g];
2387
- l.value = [...s.rows], a("row:add", { rowIndex: g, row: k });
2398
+ const b = s.addRow({}, m + 1), p = s.rows[b];
2399
+ l.value = [...s.rows], a("row:add", { rowIndex: b, row: p });
2388
2400
  break;
2389
2401
  }
2390
2402
  case "delete": {
2391
- const g = s.deleteRow(m);
2392
- g && (l.value = [...s.rows], a("row:delete", { rowIndex: m, row: g }));
2403
+ const b = s.deleteRow(m);
2404
+ b && (l.value = [...s.rows], a("row:delete", { rowIndex: m, row: b }));
2393
2405
  break;
2394
2406
  }
2395
2407
  case "duplicate": {
2396
- const g = s.duplicateRow(m);
2397
- if (g >= 0) {
2398
- const k = s.rows[g];
2399
- l.value = [...s.rows], a("row:duplicate", { sourceIndex: m, newIndex: g, row: k });
2408
+ const b = s.duplicateRow(m);
2409
+ if (b >= 0) {
2410
+ const p = s.rows[b];
2411
+ l.value = [...s.rows], a("row:duplicate", { sourceIndex: m, newIndex: b, row: p });
2400
2412
  }
2401
2413
  break;
2402
2414
  }
2403
2415
  case "insertAbove": {
2404
- const g = s.insertRowAbove(m), k = s.rows[g];
2405
- l.value = [...s.rows], a("row:insert-above", { targetIndex: m, newIndex: g, row: k });
2416
+ const b = s.insertRowAbove(m), p = s.rows[b];
2417
+ l.value = [...s.rows], a("row:insert-above", { targetIndex: m, newIndex: b, row: p });
2406
2418
  break;
2407
2419
  }
2408
2420
  case "insertBelow": {
2409
- const g = s.insertRowBelow(m), k = s.rows[g];
2410
- l.value = [...s.rows], a("row:insert-below", { targetIndex: m, newIndex: g, row: k });
2421
+ const b = s.insertRowBelow(m), p = s.rows[b];
2422
+ l.value = [...s.rows], a("row:insert-below", { targetIndex: m, newIndex: b, row: p });
2411
2423
  break;
2412
2424
  }
2413
2425
  case "move": {
2414
2426
  a("row:move", { fromIndex: m, toIndex: -1 });
2415
2427
  break;
2416
2428
  }
2429
+ case "open": {
2430
+ const b = s.rows[m];
2431
+ a("row:open", { row: b, rowIndex: m, event: C });
2432
+ break;
2433
+ }
2417
2434
  }
2418
2435
  };
2419
2436
  return t({
@@ -2429,59 +2446,60 @@ const Wo = {
2429
2446
  insertRowAbove: s.insertRowAbove,
2430
2447
  insertRowBelow: s.insertRowBelow,
2431
2448
  moveRow: s.moveRow
2432
- }), (h, m) => (p(), b("div", Wo, [
2433
- de((p(), b("table", {
2449
+ }), (h, m) => (y(), k("div", zo, [
2450
+ de((y(), k("table", {
2434
2451
  ref: "table",
2435
2452
  class: "atable",
2436
2453
  style: pe({
2437
- width: O(s).config.fullWidth ? "100%" : "auto"
2454
+ width: B(s).config.fullWidth ? "100%" : "auto"
2438
2455
  })
2439
2456
  }, [
2440
- fe(h.$slots, "header", { data: O(s) }, () => [
2457
+ fe(h.$slots, "header", { data: B(s) }, () => [
2441
2458
  pt(Ot, {
2442
- columns: O(s).columns,
2443
- store: O(s)
2459
+ columns: B(s).columns,
2460
+ store: B(s)
2444
2461
  }, null, 8, ["columns", "store"])
2445
2462
  ], !0),
2446
- N("tbody", null, [
2447
- fe(h.$slots, "body", { data: O(s) }, () => [
2448
- (p(!0), b(me, null, Ce(O(s).filteredRows, (g, k) => (p(), he(Dt, {
2449
- key: `${g.originalIndex}-${k}`,
2450
- row: g,
2451
- "row-index": g.originalIndex,
2452
- store: O(s),
2453
- "onRow:action": M
2463
+ F("tbody", null, [
2464
+ fe(h.$slots, "body", { data: B(s) }, () => [
2465
+ (y(!0), k(me, null, Ce(B(s).filteredRows, (C, b) => (y(), he(Dt, {
2466
+ key: `${C.originalIndex}-${b}`,
2467
+ row: C,
2468
+ "row-index": C.originalIndex,
2469
+ store: B(s),
2470
+ "onRow:action": w,
2471
+ "onRow:click": R
2454
2472
  }, {
2455
2473
  default: xt(() => [
2456
- (p(!0), b(me, null, Ce(y(g), (x, R) => (p(), b(me, {
2457
- key: x.name
2474
+ (y(!0), k(me, null, Ce(x(C), (p, O) => (y(), k(me, {
2475
+ key: p.name
2458
2476
  }, [
2459
- x.isGantt ? (p(), he(Ne(x.ganttComponent || "AGanttCell"), {
2477
+ p.isGantt ? (y(), he(Ne(p.ganttComponent || "AGanttCell"), {
2460
2478
  key: 0,
2461
- store: O(s),
2462
- "columns-count": O(s).columns.length - d.value,
2463
- color: g.gantt?.color,
2464
- start: g.gantt?.startIndex,
2465
- end: g.gantt?.endIndex,
2466
- colspan: x.colspan,
2467
- pinned: x.pinned,
2468
- "row-index": g.originalIndex,
2469
- "col-index": x.originalIndex ?? R,
2479
+ store: B(s),
2480
+ "columns-count": B(s).columns.length - f.value,
2481
+ color: C.gantt?.color,
2482
+ start: C.gantt?.startIndex,
2483
+ end: C.gantt?.endIndex,
2484
+ colspan: p.colspan,
2485
+ pinned: p.pinned,
2486
+ "row-index": C.originalIndex,
2487
+ "col-index": p.originalIndex ?? O,
2470
2488
  style: pe({
2471
- textAlign: x?.align || "center",
2472
- minWidth: x?.width || "40ch",
2473
- width: O(s).config.fullWidth ? "auto" : null
2489
+ textAlign: p?.align || "center",
2490
+ minWidth: p?.width || "40ch",
2491
+ width: B(s).config.fullWidth ? "auto" : null
2474
2492
  }),
2475
- "onConnection:create": P
2476
- }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (p(), he(Ne(x.cellComponent || "ACell"), {
2493
+ "onConnection:create": I
2494
+ }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (y(), he(Ne(p.cellComponent || "ACell"), {
2477
2495
  key: 1,
2478
- store: O(s),
2479
- pinned: x.pinned,
2480
- "row-index": g.originalIndex,
2481
- "col-index": R,
2496
+ store: B(s),
2497
+ pinned: p.pinned,
2498
+ "row-index": C.originalIndex,
2499
+ "col-index": O,
2482
2500
  style: pe({
2483
- textAlign: x?.align || "center",
2484
- width: O(s).config.fullWidth ? "auto" : null
2501
+ textAlign: p?.align || "center",
2502
+ width: B(s).config.fullWidth ? "auto" : null
2485
2503
  }),
2486
2504
  spellcheck: "false"
2487
2505
  }, null, 8, ["store", "pinned", "row-index", "col-index", "style"]))
@@ -2491,53 +2509,53 @@ const Wo = {
2491
2509
  }, 1032, ["row", "row-index", "store"]))), 128))
2492
2510
  ], !0)
2493
2511
  ]),
2494
- fe(h.$slots, "footer", { data: O(s) }, void 0, !0),
2495
- fe(h.$slots, "modal", { data: O(s) }, () => [
2496
- de(pt(Vt, { store: O(s) }, {
2512
+ fe(h.$slots, "footer", { data: B(s) }, void 0, !0),
2513
+ fe(h.$slots, "modal", { data: B(s) }, () => [
2514
+ de(pt(Vt, { store: B(s) }, {
2497
2515
  default: xt(() => [
2498
- (p(), he(Ne(O(s).modal.component), st({
2499
- key: `${O(s).modal.rowIndex}:${O(s).modal.colIndex}`,
2500
- "col-index": O(s).modal.colIndex,
2501
- "row-index": O(s).modal.rowIndex,
2502
- store: O(s)
2503
- }, O(s).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
2516
+ (y(), he(Ne(B(s).modal.component), st({
2517
+ key: `${B(s).modal.rowIndex}:${B(s).modal.colIndex}`,
2518
+ "col-index": B(s).modal.colIndex,
2519
+ "row-index": B(s).modal.rowIndex,
2520
+ store: B(s)
2521
+ }, B(s).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
2504
2522
  ]),
2505
2523
  _: 1
2506
2524
  }, 8, ["store"]), [
2507
- [it, O(s).modal.visible]
2525
+ [it, B(s).modal.visible]
2508
2526
  ])
2509
2527
  ], !0)
2510
2528
  ], 4)), [
2511
- [O(ho), O(s).closeModal]
2529
+ [B(mo), B(s).closeModal]
2512
2530
  ]),
2513
- O(s).isGanttView && O(s).isDependencyGraphEnabled ? (p(), he(Mo, {
2531
+ B(s).isGanttView && B(s).isDependencyGraphEnabled ? (y(), he(Mo, {
2514
2532
  key: 0,
2515
- store: O(s),
2516
- "onConnection:delete": F
2533
+ store: B(s),
2534
+ "onConnection:delete": P
2517
2535
  }, null, 8, ["store"])) : ee("", !0)
2518
2536
  ]));
2519
2537
  }
2520
- }), Xo = /* @__PURE__ */ $e(zo, [["__scopeId", "data-v-402a86ad"]]), Go = {}, jo = { class: "aloading" }, Yo = { class: "aloading-header" };
2521
- function Uo(e, t) {
2522
- return p(), b("div", jo, [
2523
- N("h2", Yo, [
2538
+ }), Go = /* @__PURE__ */ $e(Xo, [["__scopeId", "data-v-ffa2a0fc"]]), jo = {}, Yo = { class: "aloading" }, Uo = { class: "aloading-header" };
2539
+ function Jo(e, t) {
2540
+ return y(), k("div", Yo, [
2541
+ F("h2", Uo, [
2524
2542
  fe(e.$slots, "default", {}, void 0, !0)
2525
2543
  ]),
2526
- t[0] || (t[0] = N("div", { class: "aloading-bar" }, null, -1))
2544
+ t[0] || (t[0] = F("div", { class: "aloading-bar" }, null, -1))
2527
2545
  ]);
2528
2546
  }
2529
- const Jo = /* @__PURE__ */ $e(Go, [["render", Uo], ["__scopeId", "data-v-a930a25b"]]), qo = {}, Qo = { class: "aloading" }, Ko = { class: "aloading-header" };
2530
- function _o(e, t) {
2531
- return p(), b("div", Qo, [
2532
- N("h2", Ko, [
2547
+ const qo = /* @__PURE__ */ $e(jo, [["render", Jo], ["__scopeId", "data-v-a930a25b"]]), Qo = {}, Ko = { class: "aloading" }, _o = { class: "aloading-header" };
2548
+ function el(e, t) {
2549
+ return y(), k("div", Ko, [
2550
+ F("h2", _o, [
2533
2551
  fe(e.$slots, "default", {}, void 0, !0)
2534
2552
  ]),
2535
- t[0] || (t[0] = N("div", { class: "aloading-bar" }, null, -1))
2553
+ t[0] || (t[0] = F("div", { class: "aloading-bar" }, null, -1))
2536
2554
  ]);
2537
2555
  }
2538
- const el = /* @__PURE__ */ $e(qo, [["render", _o], ["__scopeId", "data-v-e1165876"]]);
2539
- function il(e) {
2540
- e.component("ACell", Bn), e.component("AExpansionRow", Wn), e.component("AGanttCell", Jn), e.component("ARow", Dt), e.component("ARowActions", Ue), e.component("ATable", Xo), e.component("ATableHeader", Ot), e.component("ATableLoading", Jo), e.component("ATableLoadingBar", el), e.component("ATableModal", Vt);
2556
+ const tl = /* @__PURE__ */ $e(Qo, [["render", el], ["__scopeId", "data-v-e1165876"]]);
2557
+ function rl(e) {
2558
+ e.component("ACell", Bn), e.component("AExpansionRow", Wn), e.component("AGanttCell", Jn), e.component("ARow", Dt), e.component("ARowActions", Ue), e.component("ATable", Go), e.component("ATableHeader", Ot), e.component("ATableLoading", qo), e.component("ATableLoadingBar", tl), e.component("ATableModal", Vt);
2541
2559
  }
2542
2560
  export {
2543
2561
  Bn as ACell,
@@ -2545,10 +2563,10 @@ export {
2545
2563
  Jn as AGanttCell,
2546
2564
  Dt as ARow,
2547
2565
  Ue as ARowActions,
2548
- Xo as ATable,
2566
+ Go as ATable,
2549
2567
  Ot as ATableHeader,
2550
- Jo as ATableLoading,
2551
- el as ATableLoadingBar,
2568
+ qo as ATableLoading,
2569
+ tl as ATableLoadingBar,
2552
2570
  Vt as ATableModal,
2553
2571
  qn as AddIcon,
2554
2572
  Qn as DeleteIcon,
@@ -2556,9 +2574,10 @@ export {
2556
2574
  _n as InsertAboveIcon,
2557
2575
  eo as InsertBelowIcon,
2558
2576
  to as MoveIcon,
2559
- no as actionIcons,
2560
- No as createTableStore,
2561
- il as install,
2562
- Fo as schemaToColumns
2577
+ no as OpenIcon,
2578
+ oo as actionIcons,
2579
+ Fo as createTableStore,
2580
+ rl as install,
2581
+ Wo as schemaToColumns
2563
2582
  };
2564
2583
  //# sourceMappingURL=atable.js.map