@stonecrop/atable 0.12.2 → 0.12.4

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