@stonecrop/atable 0.20.0 → 0.22.0

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,13 +1,13 @@
1
- import { ref as E, computed as Z, defineComponent as ce, useTemplateRef as ne, onMounted as Ne, openBlock as h, createElementBlock as w, unref as A, normalizeClass as J, normalizeStyle as se, createBlock as oe, resolveDynamicComponent as me, mergeProps as Oe, toDisplayString as ie, nextTick as Ye, useCssVars as nt, onUnmounted as ot, createElementVNode as V, withModifiers as fe, createCommentVNode as W, withDirectives as te, Fragment as ae, renderList as re, vShow as Le, renderSlot as le, reactive as lt, vModelText as ge, vModelCheckbox as at, vModelSelect as st, createTextVNode as it, useModel as Xe, inject as rt, watch as Ge, createVNode as We, withCtx as je, mergeModels as Ue } from "vue";
1
+ import { ref as E, computed as B, defineComponent as ce, useTemplateRef as ne, onMounted as Ne, openBlock as h, createElementBlock as w, unref as A, normalizeClass as J, normalizeStyle as se, createBlock as oe, resolveDynamicComponent as me, mergeProps as Oe, toDisplayString as ie, nextTick as Ye, useCssVars as nt, onUnmounted as ot, createElementVNode as V, withModifiers as fe, createCommentVNode as G, withDirectives as te, Fragment as ae, renderList as re, vShow as Le, renderSlot as le, reactive as lt, vModelText as ge, vModelCheckbox as at, vModelSelect as st, createTextVNode as it, useModel as Xe, inject as rt, watch as Ge, createVNode as We, withCtx as je, mergeModels as Ue } from "vue";
2
2
  import { defaultKeypressHandlers as Ve, useKeyboardNav as qe } from "@stonecrop/utilities";
3
- import { componentCategory as Re, linkDisplayFieldname as ct } from "@stonecrop/schema";
4
- import { useDebounceFn as dt, useElementBounding as ve, useDraggable as Te, useResizeObserver as ut, onClickOutside as vt, useMutationObserver as ft } from "@vueuse/core";
5
- import { defineStore as ht } from "pinia";
6
- import { vResizeObserver as gt, vOnClickOutside as mt } from "@vueuse/components";
7
- import './assets/index.css';const wt = (e) => {
3
+ import { useDebounceFn as ct, useElementBounding as ve, useDraggable as Te, useResizeObserver as dt, onClickOutside as ut, useMutationObserver as vt } from "@vueuse/core";
4
+ import { defineStore as ft } from "pinia";
5
+ import { componentCategory as Re } from "@stonecrop/schema";
6
+ import { vResizeObserver as ht, vOnClickOutside as gt } from "@vueuse/components";
7
+ import './assets/index.css';const mt = (e) => {
8
8
  const k = new DOMParser().parseFromString(e, "text/html");
9
9
  return Array.from(k.body.childNodes).some((i) => i.nodeType === 1);
10
- }, xt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), Je = (e) => {
10
+ }, wt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), Je = (e) => {
11
11
  if (e == null) return "";
12
12
  if (typeof e == "object") {
13
13
  const k = e.qty ?? "", i = e.uom ?? "";
@@ -38,7 +38,7 @@ function Ke(e, k) {
38
38
  const u = i.parent;
39
39
  return u < 0 || u >= k.length ? !1 : (k[u].childrenOpen || !1) && Ke(u, k);
40
40
  }
41
- function bt(e, k, i) {
41
+ function xt(e, k, i) {
42
42
  const u = i.filterType || "text", M = k.value;
43
43
  if (!M && u !== "dateRange" && u !== "checkbox") return !0;
44
44
  switch (u) {
@@ -55,8 +55,8 @@ function bt(e, k, i) {
55
55
  case "date": {
56
56
  let s;
57
57
  if (typeof e == "number") {
58
- const r = new Date(e), v = (/* @__PURE__ */ new Date()).getFullYear();
59
- s = new Date(v, r.getMonth(), r.getDate());
58
+ const c = new Date(e), v = (/* @__PURE__ */ new Date()).getFullYear();
59
+ s = new Date(v, c.getMonth(), c.getDate());
60
60
  } else
61
61
  s = new Date(String(e));
62
62
  const l = new Date(String(M));
@@ -65,37 +65,37 @@ function bt(e, k, i) {
65
65
  case "dateRange": {
66
66
  const s = k.startValue, l = k.endValue;
67
67
  if (!s && !l) return !0;
68
- let r;
68
+ let c;
69
69
  if (typeof e == "number") {
70
70
  const v = new Date(e), n = (/* @__PURE__ */ new Date()).getFullYear();
71
- r = new Date(n, v.getMonth(), v.getDate());
71
+ c = new Date(n, v.getMonth(), v.getDate());
72
72
  } else
73
- r = new Date(String(e));
74
- return !(s && r < new Date(String(s)) || l && r > new Date(String(l)));
73
+ c = new Date(String(e));
74
+ return !(s && c < new Date(String(s)) || l && c > new Date(String(l)));
75
75
  }
76
76
  default:
77
77
  return !0;
78
78
  }
79
79
  }
80
- function yt(e, k) {
80
+ function bt(e, k) {
81
81
  return k && e === 0 && k > 0 ? `${k}ch` : "inherit";
82
82
  }
83
- const Ct = (e) => {
84
- const k = e.id || xt(), i = e.linkResolver ?? null;
85
- return ht(`table-${k}`, () => {
83
+ const yt = (e) => {
84
+ const k = e.id || wt(), i = e.linkResolver ?? null;
85
+ return ft(`table-${k}`, () => {
86
86
  const M = () => {
87
87
  const t = [Object.assign({}, { rowModified: !1 })], o = /* @__PURE__ */ new Set();
88
88
  for (let D = 0; D < l.value.length; D++) {
89
89
  const R = l.value[D];
90
90
  R.parent !== null && R.parent !== void 0 && o.add(R.parent);
91
91
  }
92
- const c = (D) => l.value[D]?.gantt !== void 0, S = (D) => {
92
+ const r = (D) => l.value[D]?.gantt !== void 0, S = (D) => {
93
93
  for (let R = 0; R < l.value.length; R++)
94
- if (l.value[R].parent === D && (c(R) || S(R)))
94
+ if (l.value[R].parent === D && (r(R) || S(R)))
95
95
  return !0;
96
96
  return !1;
97
- }, F = (D) => {
98
- const R = r.value, N = R.view === "tree" || R.view === "tree-gantt" ? R.defaultTreeExpansion : void 0;
97
+ }, P = (D) => {
98
+ const R = c.value, N = R.view === "tree" || R.view === "tree-gantt" ? R.defaultTreeExpansion : void 0;
99
99
  if (!N) return !0;
100
100
  switch (N) {
101
101
  case "root":
@@ -113,7 +113,7 @@ const Ct = (e) => {
113
113
  for (let D = 0; D < l.value.length; D++) {
114
114
  const R = l.value[D], N = R.parent === null || R.parent === void 0, K = o.has(D);
115
115
  t[D] = {
116
- childrenOpen: F(D),
116
+ childrenOpen: P(D),
117
117
  expanded: !1,
118
118
  indent: R.indent || 0,
119
119
  isParent: K,
@@ -125,13 +125,13 @@ const Ct = (e) => {
125
125
  };
126
126
  }
127
127
  return t;
128
- }, s = E(e.columns), l = E(e.rows), r = E(e.config || {}), v = E({}), n = E({}), C = Z(() => {
128
+ }, s = E(e.columns), l = E(e.rows), c = E(e.config || {}), v = E({}), n = E({}), C = B(() => {
129
129
  const t = {};
130
- for (const [o, c] of s.value.entries())
131
- for (const [S, F] of l.value.entries())
132
- t[`${o}:${S}`] = F[c.name];
130
+ for (const [o, r] of s.value.entries())
131
+ for (const [S, P] of l.value.entries())
132
+ t[`${o}:${S}`] = P[r.name];
133
133
  return t;
134
- }), d = Z({
134
+ }), d = B({
135
135
  get: () => {
136
136
  const t = M();
137
137
  for (let o = 0; o < t.length; o++)
@@ -144,57 +144,57 @@ const Ct = (e) => {
144
144
  set: (t) => {
145
145
  JSON.stringify(t) !== JSON.stringify(d.value) && (d.value = t);
146
146
  }
147
- }), m = E(e.modal || { visible: !1 }), Y = E({}), j = E([]), b = E([]), $ = E([]), a = E({
147
+ }), m = E(e.modal || { visible: !1 }), U = E({}), W = E([]), b = E([]), $ = E([]), a = E({
148
148
  column: null,
149
149
  direction: null
150
- }), f = E({}), x = Z(() => s.value.some((t) => t.pinned)), y = Z(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), g = Z(() => r.value.view === "tree" || r.value.view === "tree-gantt"), T = Z(() => {
151
- const t = r.value;
150
+ }), f = E({}), x = B(() => s.value.some((t) => t.pinned)), y = B(() => c.value.view === "gantt" || c.value.view === "tree-gantt"), g = B(() => c.value.view === "tree" || c.value.view === "tree-gantt"), T = B(() => {
151
+ const t = c.value;
152
152
  return t.view === "gantt" || t.view === "tree-gantt" ? t.dependencyGraph !== !1 : !0;
153
- }), O = Z(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), p = Z(
154
- () => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
155
- ), H = Z(() => {
156
- let t = l.value.map((o, c) => ({
153
+ }), O = B(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), p = B(
154
+ () => c.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(c.value.view) : !1
155
+ ), Z = B(() => {
156
+ let t = l.value.map((o, r) => ({
157
157
  ...o,
158
- originalIndex: c
158
+ originalIndex: r
159
159
  }));
160
- if (Object.entries(f.value).forEach(([o, c]) => {
161
- const S = parseInt(o), F = s.value[S];
162
- !F || !(c.value || c.startValue || c.endValue || F.filterType === "checkbox" && c.value !== void 0) || (t = t.filter((R) => {
163
- const N = R[F.name];
164
- return bt(N, c, F);
160
+ if (Object.entries(f.value).forEach(([o, r]) => {
161
+ const S = parseInt(o), P = s.value[S];
162
+ !P || !(r.value || r.startValue || r.endValue || P.filterType === "checkbox" && r.value !== void 0) || (t = t.filter((R) => {
163
+ const N = R[P.name];
164
+ return xt(N, r, P);
165
165
  }));
166
166
  }), a.value.column !== null && a.value.direction) {
167
- const o = s.value[a.value.column], c = a.value.direction;
168
- t.sort((S, F) => {
169
- let D = S[o.name], R = F[o.name];
167
+ const o = s.value[a.value.column], r = a.value.direction;
168
+ t.sort((S, P) => {
169
+ let D = S[o.name], R = P[o.name];
170
170
  D == null && (D = ""), R == null && (R = "");
171
171
  const N = Ee(D), K = Ee(R);
172
172
  if (!isNaN(N) && !isNaN(K) && D !== "" && R !== "")
173
- return c === "asc" ? N - K : K - N;
173
+ return r === "asc" ? N - K : K - N;
174
174
  {
175
175
  const Pe = String(D).toLowerCase(), ze = String(R).toLowerCase();
176
- return c === "asc" ? Pe.localeCompare(ze) : ze.localeCompare(Pe);
176
+ return r === "asc" ? Pe.localeCompare(ze) : ze.localeCompare(Pe);
177
177
  }
178
178
  });
179
179
  }
180
180
  return t;
181
- }), X = (t, o) => C.value[`${t}:${o}`], P = (t, o, c) => {
182
- const S = `${t}:${o}`, F = s.value[t];
183
- C.value[S] !== c && (v.value[o] = !0), C.value[S] = c, l.value[o] = {
181
+ }), L = (t, o) => C.value[`${t}:${o}`], X = (t, o, r) => {
182
+ const S = `${t}:${o}`, P = s.value[t];
183
+ C.value[S] !== r && (v.value[o] = !0), C.value[S] = r, l.value[o] = {
184
184
  ...l.value[o],
185
- [F.name]: c
185
+ [P.name]: r
186
186
  };
187
- }, G = (t) => {
187
+ }, Y = (t) => {
188
188
  l.value = t;
189
- }, ee = (t, o, c) => {
189
+ }, ee = (t, o, r) => {
190
190
  const S = `${t}:${o}`;
191
- C.value[S] !== c && (v.value[o] = !0, Y.value[S] = c);
191
+ C.value[S] !== r && (v.value[o] = !0, U.value[S] = r);
192
192
  }, de = (t) => {
193
- const o = s.value.indexOf(t) === s.value.length - 1, c = r.value.fullWidth ? t.resizable && !o : t.resizable;
193
+ const o = s.value.indexOf(t) === s.value.length - 1, r = c.value.fullWidth ? t.resizable && !o : t.resizable;
194
194
  return {
195
195
  width: t.width || "40ch",
196
196
  textAlign: t.align || "center",
197
- ...c && {
197
+ ...r && {
198
198
  resize: "horizontal",
199
199
  overflow: "hidden",
200
200
  whiteSpace: "nowrap"
@@ -210,59 +210,59 @@ const Ct = (e) => {
210
210
  }, $e = (t) => {
211
211
  const o = l.value[t];
212
212
  return y.value && o.gantt !== void 0;
213
- }, Ie = (t) => !g.value || d.value[t].isRoot || d.value[t].open, Se = (t) => !g.value && r.value.view !== "list-expansion" ? "" : g.value && (d.value[t].isRoot || d.value[t].isParent) ? d.value[t].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? d.value[t].expanded ? "▼" : "►" : "", De = (t) => {
213
+ }, Ie = (t) => !g.value || d.value[t].isRoot || d.value[t].open, Se = (t) => !g.value && c.value.view !== "list-expansion" ? "" : g.value && (d.value[t].isRoot || d.value[t].isParent) ? d.value[t].childrenOpen ? "▼" : "►" : c.value.view === "list-expansion" ? d.value[t].expanded ? "▼" : "►" : "", De = (t) => {
214
214
  if (g.value) {
215
215
  const o = n.value[t] || {}, S = !(o.childrenOpen ?? d.value[t].childrenOpen);
216
216
  n.value[t] = {
217
217
  ...o,
218
218
  childrenOpen: S
219
219
  }, S || we(t);
220
- } else if (r.value.view === "list-expansion") {
221
- const o = n.value[t] || {}, c = o.expanded ?? d.value[t].expanded;
220
+ } else if (c.value.view === "list-expansion") {
221
+ const o = n.value[t] || {}, r = o.expanded ?? d.value[t].expanded;
222
222
  n.value[t] = {
223
223
  ...o,
224
- expanded: !c
224
+ expanded: !r
225
225
  };
226
226
  }
227
227
  }, we = (t) => {
228
228
  for (let o = 0; o < l.value.length; o++)
229
229
  if (d.value[o].parent === t) {
230
- const c = n.value[o] || {};
230
+ const r = n.value[o] || {};
231
231
  n.value[o] = {
232
- ...c,
232
+ ...r,
233
233
  childrenOpen: !1
234
234
  }, we(o);
235
235
  }
236
236
  }, Ae = (t, o) => {
237
- const c = X(t, o);
238
- return xe(t, o, c);
239
- }, xe = (t, o, c) => {
240
- const S = s.value[t], F = l.value[o], D = S.format;
237
+ const r = L(t, o);
238
+ return xe(t, o, r);
239
+ }, xe = (t, o, r) => {
240
+ const S = s.value[t], P = l.value[o], D = S.format;
241
241
  if (!D) {
242
242
  const R = Re(S.component);
243
- return R === "boolean" ? c ? "✓" : "✗" : R === "date" ? c != null ? new Date(String(c)).toLocaleDateString() : c : R === "datetime" ? c != null ? new Date(String(c)).toLocaleString() : c : R === "quantity" ? Je(c) : R === "currency" ? Qe(c) : c;
243
+ return R === "boolean" ? r ? "✓" : "✗" : R === "date" ? r != null ? new Date(String(r)).toLocaleDateString() : r : R === "datetime" ? r != null ? new Date(String(r)).toLocaleString() : r : R === "quantity" ? Je(r) : R === "currency" ? Qe(r) : r;
244
244
  }
245
- return typeof D == "function" ? D(c, { table: C.value, row: F, column: S }) : typeof D == "string" ? Function(`"use strict";return (${D})`)()(c, { table: C.value, row: F, column: S }) : c;
245
+ return typeof D == "function" ? D(r, { table: C.value, row: P, column: S }) : typeof D == "string" ? Function(`"use strict";return (${D})`)()(r, { table: C.value, row: P, column: S }) : r;
246
246
  }, He = (t) => {
247
247
  t.target instanceof Node && m.value.parent?.contains(t.target) || m.value.visible && (m.value.visible = !1);
248
248
  }, Be = (t) => {
249
249
  const o = l.value[t.rowIndex]?.gantt;
250
250
  o && (t.type === "resize" ? t.edge === "start" ? (o.startIndex = t.newStart, o.endIndex = t.end, o.colspan = o.endIndex - o.startIndex) : t.edge === "end" && (o.startIndex = t.start, o.endIndex = t.newEnd, o.colspan = o.endIndex - o.startIndex) : t.type === "bar" && (o.startIndex = t.newStart, o.endIndex = t.newEnd, o.colspan = o.endIndex - o.startIndex));
251
251
  }, be = (t) => {
252
- const o = j.value.findIndex((c) => c.id === t.id);
253
- o >= 0 ? j.value[o] = t : j.value.push(t);
252
+ const o = W.value.findIndex((r) => r.id === t.id);
253
+ o >= 0 ? W.value[o] = t : W.value.push(t);
254
254
  }, ye = (t) => {
255
- const o = j.value.findIndex((c) => c.id === t);
256
- o >= 0 && j.value.splice(o, 1);
255
+ const o = W.value.findIndex((r) => r.id === t);
256
+ o >= 0 && W.value.splice(o, 1);
257
257
  }, Ce = (t) => {
258
- const o = b.value.findIndex((c) => c.id === t.id);
258
+ const o = b.value.findIndex((r) => r.id === t.id);
259
259
  o >= 0 ? b.value[o] = t : b.value.push(t);
260
260
  }, pe = (t) => {
261
- const o = b.value.findIndex((c) => c.id === t);
261
+ const o = b.value.findIndex((r) => r.id === t);
262
262
  o >= 0 && b.value.splice(o, 1);
263
- }, I = (t, o, c) => {
264
- const S = b.value.find((R) => R.id === t), F = b.value.find((R) => R.id === o);
265
- if (!S || !F)
263
+ }, I = (t, o, r) => {
264
+ const S = b.value.find((R) => R.id === t), P = b.value.find((R) => R.id === o);
265
+ if (!S || !P)
266
266
  return console.warn("Cannot create connection: handle not found"), null;
267
267
  const D = {
268
268
  id: `connection-${t}-${o}`,
@@ -271,48 +271,48 @@ const Ct = (e) => {
271
271
  side: S.side
272
272
  },
273
273
  to: {
274
- barId: F.barId,
275
- side: F.side
274
+ barId: P.barId,
275
+ side: P.side
276
276
  },
277
- style: c?.style,
278
- label: c?.label
277
+ style: r?.style,
278
+ label: r?.label
279
279
  };
280
280
  return $.value.push(D), D;
281
- }, B = (t) => {
282
- const o = $.value.findIndex((c) => c.id === t);
281
+ }, H = (t) => {
282
+ const o = $.value.findIndex((r) => r.id === t);
283
283
  return o >= 0 ? ($.value.splice(o, 1), !0) : !1;
284
- }, z = (t) => $.value.filter((o) => o.from.barId === t || o.to.barId === t), L = (t) => b.value.filter((o) => o.barId === t), U = (t) => {
284
+ }, z = (t) => $.value.filter((o) => o.from.barId === t || o.to.barId === t), F = (t) => b.value.filter((o) => o.barId === t), j = (t) => {
285
285
  if (s.value[t].sortable === !1) return;
286
- let c;
287
- a.value.column === t && a.value.direction === "asc" ? c = "desc" : c = "asc", a.value.column = t, a.value.direction = c;
286
+ let r;
287
+ a.value.column === t && a.value.direction === "asc" ? r = "desc" : r = "asc", a.value.column = t, a.value.direction = r;
288
288
  }, q = (t, o) => {
289
289
  !o.value && !o.startValue && !o.endValue ? delete f.value[t] : f.value[t] = o;
290
290
  }, _ = (t) => {
291
291
  delete f.value[t];
292
292
  }, Q = (t, o = "end") => {
293
- const c = {};
294
- for (const F of s.value)
295
- c[F.name] = "";
296
- t && Object.assign(c, t);
293
+ const r = {};
294
+ for (const P of s.value)
295
+ r[P.name] = "";
296
+ t && Object.assign(r, t);
297
297
  let S;
298
- return o === "start" ? (S = 0, l.value.unshift(c)) : o === "end" ? (S = l.value.length, l.value.push(c)) : (S = Math.max(0, Math.min(o, l.value.length)), l.value.splice(S, 0, c)), S;
298
+ return o === "start" ? (S = 0, l.value.unshift(r)) : o === "end" ? (S = l.value.length, l.value.push(r)) : (S = Math.max(0, Math.min(o, l.value.length)), l.value.splice(S, 0, r)), S;
299
299
  };
300
300
  return {
301
301
  // state
302
302
  columns: s,
303
- config: r,
303
+ config: c,
304
304
  connectionHandles: b,
305
305
  connectionPaths: $,
306
306
  display: d,
307
307
  filterState: f,
308
- ganttBars: j,
308
+ ganttBars: W,
309
309
  modal: m,
310
310
  rows: l,
311
311
  sortState: a,
312
312
  table: C,
313
- updates: Y,
313
+ updates: U,
314
314
  // getters
315
- filteredRows: H,
315
+ filteredRows: Z,
316
316
  hasPinnedColumns: x,
317
317
  isGanttView: y,
318
318
  isTreeView: g,
@@ -326,52 +326,52 @@ const Ct = (e) => {
326
326
  clearFilter: _,
327
327
  closeModal: He,
328
328
  createConnection: I,
329
- deleteConnection: B,
329
+ deleteConnection: H,
330
330
  deleteRow: (t) => {
331
331
  if (t < 0 || t >= l.value.length)
332
332
  return null;
333
333
  const [o] = l.value.splice(t, 1);
334
334
  delete v.value[t], delete n.value[t];
335
- const c = {}, S = {};
336
- for (const [F, D] of Object.entries(v.value)) {
337
- const R = parseInt(F);
338
- R > t ? c[R - 1] = D : c[R] = D;
335
+ const r = {}, S = {};
336
+ for (const [P, D] of Object.entries(v.value)) {
337
+ const R = parseInt(P);
338
+ R > t ? r[R - 1] = D : r[R] = D;
339
339
  }
340
- for (const [F, D] of Object.entries(n.value)) {
341
- const R = parseInt(F);
340
+ for (const [P, D] of Object.entries(n.value)) {
341
+ const R = parseInt(P);
342
342
  R > t ? S[R - 1] = D : S[R] = D;
343
343
  }
344
- return v.value = c, n.value = S, o;
344
+ return v.value = r, n.value = S, o;
345
345
  },
346
346
  duplicateRow: (t) => {
347
347
  if (t < 0 || t >= l.value.length)
348
348
  return -1;
349
- const o = l.value[t], c = JSON.parse(JSON.stringify(o)), S = t + 1;
350
- return l.value.splice(S, 0, c), S;
349
+ const o = l.value[t], r = JSON.parse(JSON.stringify(o)), S = t + 1;
350
+ return l.value.splice(S, 0, r), S;
351
351
  },
352
- getCellData: X,
352
+ getCellData: L,
353
353
  getCellDisplayValue: Ae,
354
354
  getConnectionsForBar: z,
355
355
  getFormattedValue: xe,
356
- getHandlesForBar: L,
356
+ getHandlesForBar: F,
357
357
  getHeaderCellStyle: de,
358
358
  getRowExpandSymbol: Se,
359
359
  insertRowAbove: (t, o) => {
360
- const c = Math.max(0, t);
361
- return Q(o, c);
360
+ const r = Math.max(0, t);
361
+ return Q(o, r);
362
362
  },
363
363
  insertRowBelow: (t, o) => {
364
- const c = Math.min(t + 1, l.value.length);
365
- return Q(o, c);
364
+ const r = Math.min(t + 1, l.value.length);
365
+ return Q(o, r);
366
366
  },
367
367
  isRowGantt: $e,
368
368
  isRowVisible: Ie,
369
369
  moveRow: (t, o) => {
370
370
  if (t < 0 || t >= l.value.length || o < 0 || o >= l.value.length || t === o)
371
371
  return !1;
372
- const [c] = l.value.splice(t, 1);
373
- l.value.splice(o, 0, c);
374
- const S = {}, F = {};
372
+ const [r] = l.value.splice(t, 1);
373
+ l.value.splice(o, 0, r);
374
+ const S = {}, P = {};
375
375
  for (const [D, R] of Object.entries(v.value)) {
376
376
  const N = parseInt(D);
377
377
  let K = N;
@@ -380,25 +380,25 @@ const Ct = (e) => {
380
380
  for (const [D, R] of Object.entries(n.value)) {
381
381
  const N = parseInt(D);
382
382
  let K = N;
383
- N === t ? K = o : t < o ? N > t && N <= o && (K = N - 1) : N >= o && N < t && (K = N + 1), F[K] = R;
383
+ N === t ? K = o : t < o ? N > t && N <= o && (K = N - 1) : N >= o && N < t && (K = N + 1), P[K] = R;
384
384
  }
385
- return v.value = S, n.value = F, !0;
385
+ return v.value = S, n.value = P, !0;
386
386
  },
387
387
  registerConnectionHandle: Ce,
388
388
  registerGanttBar: be,
389
389
  resizeColumn: ue,
390
- setCellData: P,
390
+ setCellData: X,
391
391
  setCellText: ee,
392
392
  setFilter: q,
393
- sortByColumn: U,
393
+ sortByColumn: j,
394
394
  toggleRowExpand: De,
395
395
  unregisterConnectionHandle: pe,
396
396
  unregisterGanttBar: ye,
397
397
  updateGanttBar: Be,
398
- updateRows: G
398
+ updateRows: Y
399
399
  };
400
400
  })();
401
- }, pt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], kt = ["innerHTML"], Mt = { key: 2 }, Rt = /* @__PURE__ */ ce({
401
+ }, Ct = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], pt = ["innerHTML"], kt = { key: 2 }, Mt = /* @__PURE__ */ ce({
402
402
  __name: "ACell",
403
403
  props: {
404
404
  colIndex: {},
@@ -410,36 +410,32 @@ const Ct = (e) => {
410
410
  debounce: { default: 300 }
411
411
  },
412
412
  setup(e, { expose: k }) {
413
- const i = ne("cell"), u = e.store.getCellData(e.colIndex, e.rowIndex), M = E(""), s = E(!1), l = e.store.columns[e.colIndex], r = e.store.rows[e.rowIndex], v = l.align || "center", n = l.width || "40ch", C = Z(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), d = E(null);
413
+ const i = ne("cell"), u = e.store.getCellData(e.colIndex, e.rowIndex), M = E(""), s = E(!1), l = e.store.columns[e.colIndex], c = e.store.rows[e.rowIndex], v = l.align || "center", n = l.width || "40ch", C = B(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), d = E(null);
414
414
  Ne(() => {
415
415
  if (!l.linkDoctype) return;
416
- const p = e.store.getCellData(e.colIndex, e.rowIndex), H = r?.[ct(l.name)];
417
- if (typeof H == "string" || typeof H == "number") {
418
- d.value = String(H);
419
- return;
420
- }
416
+ const p = e.store.getCellData(e.colIndex, e.rowIndex);
421
417
  if (p != null && typeof p == "object") {
422
- const P = p, G = P.displayText ?? P.id;
423
- (typeof G == "string" || typeof G == "number") && (d.value = String(G));
418
+ const L = p, X = L.displayText ?? L.id;
419
+ (typeof X == "string" || typeof X == "number") && (d.value = String(X));
424
420
  return;
425
421
  }
426
- const X = e.store.linkResolver;
427
- !X || typeof p != "string" || p === "" || X(l.linkDoctype, p).then((P) => (P != null && (d.value = P), P));
422
+ const Z = e.store.linkResolver;
423
+ !Z || typeof p != "string" || p === "" || Z(l.linkDoctype, p).then((L) => (L != null && (d.value = L), L));
428
424
  });
429
- const m = Z(() => d.value ?? C.value), Y = Z(() => typeof m.value == "string" ? wt(m.value) : !1), j = Z(() => ({
425
+ const m = B(() => d.value ?? C.value), U = B(() => typeof m.value == "string" ? mt(m.value) : !1), W = B(() => ({
430
426
  textAlign: v,
431
427
  width: n,
432
428
  fontWeight: s.value ? "bold" : "inherit",
433
- paddingLeft: yt(e.colIndex, e.store.display[e.rowIndex]?.indent)
434
- })), b = Z(() => ({
429
+ paddingLeft: bt(e.colIndex, e.store.display[e.rowIndex]?.indent)
430
+ })), b = B(() => ({
435
431
  "sticky-column": e.pinned,
436
432
  "cell-modified": s.value
437
433
  })), $ = () => {
438
434
  f(), a();
439
435
  }, a = () => {
440
- const { left: p, bottom: H, width: X, height: P } = ve(i);
441
- l.mask, l.modalComponent && e.store.$patch((G) => {
442
- G.modal.visible = !0, G.modal.colIndex = e.colIndex, G.modal.rowIndex = e.rowIndex, G.modal.left = p.value, G.modal.bottom = H.value, G.modal.width = X.value, G.modal.height = P.value, G.modal.cell = i.value, typeof l.modalComponent == "function" ? G.modal.component = l.modalComponent({ table: e.store.table, row: r, column: l }) : G.modal.component = l.modalComponent, G.modal.componentProps = l.modalComponentExtraProps;
436
+ const { left: p, bottom: Z, width: L, height: X } = ve(i);
437
+ l.mask, l.modalComponent && e.store.$patch((Y) => {
438
+ Y.modal.visible = !0, Y.modal.colIndex = e.colIndex, Y.modal.rowIndex = e.rowIndex, Y.modal.left = p.value, Y.modal.bottom = Z.value, Y.modal.width = L.value, Y.modal.height = X.value, Y.modal.cell = i.value, typeof l.modalComponent == "function" ? Y.modal.component = l.modalComponent({ table: e.store.table, row: c, column: l }) : Y.modal.component = l.modalComponent, Y.modal.componentProps = l.modalComponentExtraProps;
443
439
  });
444
440
  };
445
441
  if (e.addNavigation) {
@@ -466,8 +462,8 @@ const Ct = (e) => {
466
462
  const p = window.getSelection();
467
463
  if (p)
468
464
  try {
469
- const H = document.createRange();
470
- H.selectNodeContents && (H.selectNodeContents(i.value), p.removeAllRanges(), p.addRange(H));
465
+ const Z = document.createRange();
466
+ Z.selectNodeContents && (Z.selectNodeContents(i.value), p.removeAllRanges(), p.addRange(Z));
471
467
  } catch {
472
468
  }
473
469
  }
@@ -477,9 +473,9 @@ const Ct = (e) => {
477
473
  try {
478
474
  const p = window.getSelection();
479
475
  if (p && p.rangeCount > 0 && i.value) {
480
- const H = p.getRangeAt(0), X = H.cloneRange();
481
- if (X.selectNodeContents && X.setEnd)
482
- return X.selectNodeContents(i.value), X.setEnd(H.endContainer, H.endOffset), X.toString().length;
476
+ const Z = p.getRangeAt(0), L = Z.cloneRange();
477
+ if (L.selectNodeContents && L.setEnd)
478
+ return L.selectNodeContents(i.value), L.setEnd(Z.endContainer, Z.endOffset), L.toString().length;
483
479
  }
484
480
  } catch {
485
481
  }
@@ -487,34 +483,34 @@ const Ct = (e) => {
487
483
  }, g = (p) => {
488
484
  if (i.value)
489
485
  try {
490
- const H = window.getSelection();
491
- if (!H) return;
492
- let X = 0;
493
- const P = document.createTreeWalker ? document.createTreeWalker(i.value, NodeFilter.SHOW_TEXT, null) : null;
494
- if (!P) return;
495
- let G, ee = null;
496
- for (; G = P.nextNode(); ) {
497
- const de = G, ue = X + de.textContent.length;
486
+ const Z = window.getSelection();
487
+ if (!Z) return;
488
+ let L = 0;
489
+ const X = document.createTreeWalker ? document.createTreeWalker(i.value, NodeFilter.SHOW_TEXT, null) : null;
490
+ if (!X) return;
491
+ let Y, ee = null;
492
+ for (; Y = X.nextNode(); ) {
493
+ const de = Y, ue = L + de.textContent.length;
498
494
  if (p <= ue && (ee = document.createRange(), ee.setStart && ee.setEnd)) {
499
- ee.setStart(de, p - X), ee.setEnd(de, p - X);
495
+ ee.setStart(de, p - L), ee.setEnd(de, p - L);
500
496
  break;
501
497
  }
502
- X = ue;
498
+ L = ue;
503
499
  }
504
- ee && H.removeAllRanges && H.addRange && (H.removeAllRanges(), H.addRange(ee));
500
+ ee && Z.removeAllRanges && Z.addRange && (Z.removeAllRanges(), Z.addRange(ee));
505
501
  } catch {
506
502
  }
507
503
  }, T = (p) => {
508
504
  if (!l.edit) return;
509
- const H = p.target;
510
- if (H.textContent === M.value)
505
+ const Z = p.target;
506
+ if (Z.textContent === M.value)
511
507
  return;
512
- const X = y();
513
- M.value = H.textContent, l.format ? (s.value = H.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, u), e.store.setCellText(e.colIndex, e.rowIndex, H.textContent)) : (s.value = H.textContent !== u, e.store.setCellData(e.colIndex, e.rowIndex, H.textContent)), Ye().then(() => g(X));
514
- }, O = dt(T, e.debounce);
508
+ const L = y();
509
+ M.value = Z.textContent, l.format ? (s.value = Z.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, u), e.store.setCellText(e.colIndex, e.rowIndex, Z.textContent)) : (s.value = Z.textContent !== u, e.store.setCellData(e.colIndex, e.rowIndex, Z.textContent)), Ye().then(() => g(L));
510
+ }, O = ct(T, e.debounce);
515
511
  return k({
516
512
  currentData: M
517
- }), (p, H) => (h(), w("td", {
513
+ }), (p, Z) => (h(), w("td", {
518
514
  ref: "cell",
519
515
  "data-colindex": e.colIndex,
520
516
  "data-rowindex": e.rowIndex,
@@ -522,30 +518,30 @@ const Ct = (e) => {
522
518
  contenteditable: A(l).edit,
523
519
  tabindex: e.tabIndex,
524
520
  spellcheck: !1,
525
- style: se(j.value),
521
+ style: se(W.value),
526
522
  class: J(["atable-cell", b.value]),
527
523
  onFocus: x,
528
524
  onPaste: T,
529
- onInput: H[0] || (H[0] = //@ts-ignore
530
- (...X) => A(O) && A(O)(...X)),
525
+ onInput: Z[0] || (Z[0] = //@ts-ignore
526
+ (...L) => A(O) && A(O)(...L)),
531
527
  onClick: $
532
528
  }, [
533
529
  A(l).cellComponent ? (h(), oe(me(A(l).cellComponent), Oe({
534
530
  key: 0,
535
531
  value: m.value
536
- }, A(l).cellComponentProps), null, 16, ["value"])) : Y.value ? (h(), w("span", {
532
+ }, A(l).cellComponentProps), null, 16, ["value"])) : U.value ? (h(), w("span", {
537
533
  key: 1,
538
534
  innerHTML: m.value
539
- }, null, 8, kt)) : (h(), w("span", Mt, ie(m.value), 1))
540
- ], 46, pt));
535
+ }, null, 8, pt)) : (h(), w("span", kt, ie(m.value), 1))
536
+ ], 46, Ct));
541
537
  }
542
- }), $t = ["colspan"], It = {
538
+ }), Rt = ["colspan"], $t = {
543
539
  ref: "container",
544
540
  class: "gantt-container"
545
- }, St = ["data-rowindex", "data-colindex"], Dt = {
541
+ }, It = ["data-rowindex", "data-colindex"], St = {
546
542
  key: 2,
547
543
  class: "gantt-label"
548
- }, At = ["x1", "y1", "x2", "y2"], Ht = /* @__PURE__ */ ce({
544
+ }, Dt = ["x1", "y1", "x2", "y2"], At = /* @__PURE__ */ ce({
549
545
  __name: "AGanttCell",
550
546
  props: {
551
547
  store: {},
@@ -564,14 +560,14 @@ const Ct = (e) => {
564
560
  v564d6da1: M.value,
565
561
  v4f540c19: I.colspan
566
562
  }));
567
- const u = i, M = E(e.color.length >= 6 ? e.color : "#cccccc"), s = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, l = ne("container"), r = ne("bar"), v = ne("leftResizeHandle"), n = ne("rightResizeHandle"), C = ne("leftConnectionHandle"), d = ne("rightConnectionHandle"), { width: m } = ve(l), { left: Y, right: j } = ve(r), b = E(e.start), $ = E(e.end || b.value + e.colspan), a = E(!1), f = E(!1), x = E(!1), y = E(!1), g = E(!1), T = E({ startX: 0, startY: 0, endX: 0, endY: 0 }), O = Z(() => de.value || G.value || ee.value), p = Z(() => e.colspan > 0 ? m.value / e.colspan : 0), H = Z(() => {
568
- const I = b.value / e.colspan * 100, B = $.value / e.colspan * 100;
563
+ const u = i, M = E(e.color.length >= 6 ? e.color : "#cccccc"), s = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, l = ne("container"), c = ne("bar"), v = ne("leftResizeHandle"), n = ne("rightResizeHandle"), C = ne("leftConnectionHandle"), d = ne("rightConnectionHandle"), { width: m } = ve(l), { left: U, right: W } = ve(c), b = E(e.start), $ = E(e.end || b.value + e.colspan), a = E(!1), f = E(!1), x = E(!1), y = E(!1), g = E(!1), T = E({ startX: 0, startY: 0, endX: 0, endY: 0 }), O = B(() => de.value || Y.value || ee.value), p = B(() => e.colspan > 0 ? m.value / e.colspan : 0), Z = B(() => {
564
+ const I = b.value / e.colspan * 100, H = $.value / e.colspan * 100;
569
565
  return {
570
566
  left: `${I}%`,
571
- width: `${B - I}%`,
567
+ width: `${H - I}%`,
572
568
  backgroundColor: M.value
573
569
  };
574
- }), X = Z(() => ({
570
+ }), L = B(() => ({
575
571
  position: "fixed",
576
572
  top: 0,
577
573
  left: 0,
@@ -579,20 +575,20 @@ const Ct = (e) => {
579
575
  height: "100vh",
580
576
  pointerEvents: "none",
581
577
  zIndex: 1e3
582
- })), P = E({ startX: 0, startPos: 0 }), { isDragging: G } = Te(v, {
578
+ })), X = E({ startX: 0, startPos: 0 }), { isDragging: Y } = Te(v, {
583
579
  axis: "x",
584
- onStart: () => ue(Y.value, b.value),
580
+ onStart: () => ue(U.value, b.value),
585
581
  onMove: ({ x: I }) => $e(I),
586
582
  onEnd: ({ x: I }) => Ie(I)
587
583
  }), { isDragging: ee } = Te(n, {
588
584
  axis: "x",
589
- onStart: () => ue(j.value, $.value),
585
+ onStart: () => ue(W.value, $.value),
590
586
  onMove: ({ x: I }) => Se(I),
591
587
  onEnd: ({ x: I }) => De(I)
592
- }), { isDragging: de } = Te(r, {
588
+ }), { isDragging: de } = Te(c, {
593
589
  exact: !0,
594
590
  axis: "x",
595
- onStart: () => ue(Y.value, b.value),
591
+ onStart: () => ue(U.value, b.value),
596
592
  onMove: ({ x: I }) => we(I),
597
593
  onEnd: ({ x: I }) => Ae(I)
598
594
  });
@@ -601,65 +597,65 @@ const Ct = (e) => {
601
597
  }), ot(() => {
602
598
  He();
603
599
  });
604
- function ue(I, B) {
605
- r.value && (r.value.style.transition = "none"), P.value = { startX: I, startPos: B };
600
+ function ue(I, H) {
601
+ c.value && (c.value.style.transition = "none"), X.value = { startX: I, startPos: H };
606
602
  }
607
603
  function $e(I) {
608
- if (!G.value || !r.value) return;
609
- const z = (I - P.value.startX) / p.value, L = Math.max(0, Math.min($.value - 1, P.value.startPos + z));
610
- r.value.style.left = `${L / e.colspan * 100}%`, r.value.style.width = `${($.value - L) / e.colspan * 100}%`;
604
+ if (!Y.value || !c.value) return;
605
+ const z = (I - X.value.startX) / p.value, F = Math.max(0, Math.min($.value - 1, X.value.startPos + z));
606
+ c.value.style.left = `${F / e.colspan * 100}%`, c.value.style.width = `${($.value - F) / e.colspan * 100}%`;
611
607
  }
612
608
  function Ie(I) {
613
- if (!r.value) return;
614
- const B = I - P.value.startX, z = Math.round(B / p.value), L = b.value, U = Math.max(0, Math.min($.value - 1, P.value.startPos + z));
615
- b.value = U, e.store.updateGanttBar({
609
+ if (!c.value) return;
610
+ const H = I - X.value.startX, z = Math.round(H / p.value), F = b.value, j = Math.max(0, Math.min($.value - 1, X.value.startPos + z));
611
+ b.value = j, e.store.updateGanttBar({
616
612
  rowIndex: e.rowIndex,
617
613
  colIndex: e.colIndex,
618
614
  type: "resize",
619
615
  edge: "start",
620
- oldStart: L,
621
- newStart: U,
616
+ oldStart: F,
617
+ newStart: j,
622
618
  end: $.value,
623
619
  delta: z,
624
- oldColspan: $.value - L,
625
- newColspan: $.value - U
620
+ oldColspan: $.value - F,
621
+ newColspan: $.value - j
626
622
  });
627
623
  }
628
624
  function Se(I) {
629
- if (!ee.value || !r.value) return;
630
- const z = (I - P.value.startX) / p.value, L = Math.max(b.value + 1, Math.min(e.columnsCount, P.value.startPos + z));
631
- r.value.style.width = `${(L - b.value) / e.colspan * 100}%`;
625
+ if (!ee.value || !c.value) return;
626
+ const z = (I - X.value.startX) / p.value, F = Math.max(b.value + 1, Math.min(e.columnsCount, X.value.startPos + z));
627
+ c.value.style.width = `${(F - b.value) / e.colspan * 100}%`;
632
628
  }
633
629
  function De(I) {
634
- if (!r.value) return;
635
- const B = I - P.value.startX, z = Math.round(B / p.value), L = $.value, U = Math.max(b.value + 1, Math.min(e.columnsCount, P.value.startPos + z));
636
- $.value = U, e.store.updateGanttBar({
630
+ if (!c.value) return;
631
+ const H = I - X.value.startX, z = Math.round(H / p.value), F = $.value, j = Math.max(b.value + 1, Math.min(e.columnsCount, X.value.startPos + z));
632
+ $.value = j, e.store.updateGanttBar({
637
633
  rowIndex: e.rowIndex,
638
634
  colIndex: e.colIndex,
639
635
  type: "resize",
640
636
  edge: "end",
641
- oldEnd: L,
642
- newEnd: U,
637
+ oldEnd: F,
638
+ newEnd: j,
643
639
  start: b.value,
644
640
  delta: z,
645
- oldColspan: L - b.value,
646
- newColspan: U - b.value
641
+ oldColspan: F - b.value,
642
+ newColspan: j - b.value
647
643
  });
648
644
  }
649
645
  function we(I) {
650
- if (!de.value || !r.value) return;
651
- const z = (I - P.value.startX) / p.value, L = $.value - b.value, U = Math.max(0, Math.min(P.value.startPos + z, e.columnsCount - L));
652
- r.value.style.left = `${U / e.colspan * 100}%`;
646
+ if (!de.value || !c.value) return;
647
+ const z = (I - X.value.startX) / p.value, F = $.value - b.value, j = Math.max(0, Math.min(X.value.startPos + z, e.columnsCount - F));
648
+ c.value.style.left = `${j / e.colspan * 100}%`;
653
649
  }
654
650
  function Ae(I) {
655
- if (!r.value) return;
656
- const B = I - P.value.startX, z = Math.round(B / p.value), L = $.value - b.value, U = b.value, q = $.value;
657
- let _ = P.value.startPos + z, Q = _ + L;
658
- _ < 0 ? (_ = 0, Q = L) : Q > e.columnsCount && (Q = e.columnsCount, _ = Q - L), b.value = _, $.value = Q, e.store.updateGanttBar({
651
+ if (!c.value) return;
652
+ const H = I - X.value.startX, z = Math.round(H / p.value), F = $.value - b.value, j = b.value, q = $.value;
653
+ let _ = X.value.startPos + z, Q = _ + F;
654
+ _ < 0 ? (_ = 0, Q = F) : Q > e.columnsCount && (Q = e.columnsCount, _ = Q - F), b.value = _, $.value = Q, e.store.updateGanttBar({
659
655
  rowIndex: e.rowIndex,
660
656
  colIndex: e.colIndex,
661
657
  type: "bar",
662
- oldStart: U,
658
+ oldStart: j,
663
659
  oldEnd: q,
664
660
  newStart: _,
665
661
  newEnd: Q,
@@ -668,7 +664,7 @@ const Ct = (e) => {
668
664
  });
669
665
  }
670
666
  function xe() {
671
- const { x: I, y: B } = ve(r), { x: z, y: L } = ve(C), { x: U, y: q } = ve(d);
667
+ const { x: I, y: H } = ve(c), { x: z, y: F } = ve(C), { x: j, y: q } = ve(d);
672
668
  e.store.registerGanttBar({
673
669
  id: s,
674
670
  rowIndex: e.rowIndex,
@@ -677,13 +673,13 @@ const Ct = (e) => {
677
673
  endIndex: $,
678
674
  color: M,
679
675
  label: e.label,
680
- position: { x: I, y: B }
676
+ position: { x: I, y: H }
681
677
  }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
682
678
  id: `${s}-connection-left`,
683
679
  rowIndex: e.rowIndex,
684
680
  colIndex: e.colIndex,
685
681
  side: "left",
686
- position: { x: z, y: L },
682
+ position: { x: z, y: F },
687
683
  visible: a,
688
684
  barId: s
689
685
  }), e.store.registerConnectionHandle({
@@ -691,7 +687,7 @@ const Ct = (e) => {
691
687
  rowIndex: e.rowIndex,
692
688
  colIndex: e.colIndex,
693
689
  side: "right",
694
- position: { x: U, y: q },
690
+ position: { x: j, y: q },
695
691
  visible: f,
696
692
  barId: s
697
693
  }));
@@ -705,38 +701,38 @@ const Ct = (e) => {
705
701
  function be() {
706
702
  !x.value && !y.value && (a.value = !1, f.value = !1);
707
703
  }
708
- function ye(I, B) {
709
- B.preventDefault(), B.stopPropagation(), g.value = !0, I === "left" ? x.value = !0 : y.value = !0;
704
+ function ye(I, H) {
705
+ H.preventDefault(), H.stopPropagation(), g.value = !0, I === "left" ? x.value = !0 : y.value = !0;
710
706
  const z = I === "left" ? C.value : d.value;
711
707
  if (z) {
712
708
  const q = z.getBoundingClientRect(), _ = q.left + q.width / 2, Q = q.top + q.height / 2;
713
709
  T.value = { startX: _, startY: Q, endX: _, endY: Q };
714
710
  }
715
- const L = (q) => {
711
+ const F = (q) => {
716
712
  T.value.endX = q.clientX, T.value.endY = q.clientY;
717
- }, U = (q) => {
718
- Ce(q, I), pe(L, U);
713
+ }, j = (q) => {
714
+ Ce(q, I), pe(F, j);
719
715
  };
720
- document.addEventListener("mousemove", L), document.addEventListener("mouseup", U);
716
+ document.addEventListener("mousemove", F), document.addEventListener("mouseup", j);
721
717
  }
722
- function Ce(I, B) {
723
- const L = document.elementFromPoint(I.clientX, I.clientY)?.closest(".connection-handle");
724
- if (L && L !== (B === "left" ? C.value : d.value)) {
725
- const U = L.closest(".gantt-bar");
726
- if (U) {
727
- const q = parseInt(U.getAttribute("data-rowindex") || "0"), _ = parseInt(U.getAttribute("data-colindex") || "0"), Q = L.classList.contains("left-connection-handle") ? "left" : "right", Fe = `gantt-bar-row-${q}-col-${_}`, Ze = e.store.createConnection(
728
- `${s}-connection-${B}`,
718
+ function Ce(I, H) {
719
+ const F = document.elementFromPoint(I.clientX, I.clientY)?.closest(".connection-handle");
720
+ if (F && F !== (H === "left" ? C.value : d.value)) {
721
+ const j = F.closest(".gantt-bar");
722
+ if (j) {
723
+ const q = parseInt(j.getAttribute("data-rowindex") || "0"), _ = parseInt(j.getAttribute("data-colindex") || "0"), Q = F.classList.contains("left-connection-handle") ? "left" : "right", Fe = `gantt-bar-row-${q}-col-${_}`, Ze = e.store.createConnection(
724
+ `${s}-connection-${H}`,
729
725
  `${Fe}-connection-${Q}`
730
726
  );
731
727
  Ze && u("connection:create", Ze);
732
728
  }
733
729
  }
734
730
  }
735
- function pe(I, B) {
736
- g.value = !1, x.value = !1, y.value = !1, document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", B), r.value?.matches(":hover") || be();
731
+ function pe(I, H) {
732
+ g.value = !1, x.value = !1, y.value = !1, document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", H), c.value?.matches(":hover") || be();
737
733
  }
738
734
  return k({
739
- barStyle: H,
735
+ barStyle: Z,
740
736
  cleanupConnectionDrag: pe,
741
737
  currentEnd: $,
742
738
  handleConnectionDrop: Ce,
@@ -745,17 +741,17 @@ const Ct = (e) => {
745
741
  isRightConnectionDragging: y,
746
742
  isRightConnectionVisible: f,
747
743
  showDragPreview: g
748
- }), (I, B) => (h(), w("td", {
744
+ }), (I, H) => (h(), w("td", {
749
745
  class: "aganttcell",
750
746
  colspan: e.colspan
751
747
  }, [
752
- V("div", It, [
748
+ V("div", $t, [
753
749
  V("div", {
754
750
  ref: "bar",
755
751
  "data-rowindex": e.rowIndex,
756
752
  "data-colindex": e.colIndex,
757
753
  class: J(["gantt-bar", { "is-dragging": O.value }]),
758
- style: se(H.value),
754
+ style: se(Z.value),
759
755
  onMouseenter: Be,
760
756
  onMouseleave: be
761
757
  }, [
@@ -763,38 +759,38 @@ const Ct = (e) => {
763
759
  key: 0,
764
760
  ref: "leftConnectionHandle",
765
761
  class: J(["connection-handle left-connection-handle", { visible: a.value, "is-dragging": x.value }]),
766
- onMousedown: B[0] || (B[0] = fe((z) => ye("left", z), ["stop"]))
767
- }, [...B[2] || (B[2] = [
762
+ onMousedown: H[0] || (H[0] = fe((z) => ye("left", z), ["stop"]))
763
+ }, [...H[2] || (H[2] = [
768
764
  V("div", { class: "connection-dot" }, null, -1)
769
- ])], 34)) : W("", !0),
765
+ ])], 34)) : G("", !0),
770
766
  e.store.isDependencyGraphEnabled ? (h(), w("div", {
771
767
  key: 1,
772
768
  ref: "rightConnectionHandle",
773
769
  class: J(["connection-handle right-connection-handle", { visible: f.value, "is-dragging": y.value }]),
774
- onMousedown: B[1] || (B[1] = fe((z) => ye("right", z), ["stop"]))
775
- }, [...B[3] || (B[3] = [
770
+ onMousedown: H[1] || (H[1] = fe((z) => ye("right", z), ["stop"]))
771
+ }, [...H[3] || (H[3] = [
776
772
  V("div", { class: "connection-dot" }, null, -1)
777
- ])], 34)) : W("", !0),
773
+ ])], 34)) : G("", !0),
778
774
  V("div", {
779
775
  ref: "leftResizeHandle",
780
- class: J(["resize-handle left-resize-handle", { "is-dragging": A(G) }])
781
- }, [...B[4] || (B[4] = [
776
+ class: J(["resize-handle left-resize-handle", { "is-dragging": A(Y) }])
777
+ }, [...H[4] || (H[4] = [
782
778
  V("div", { class: "handle-grip" }, null, -1),
783
779
  V("div", { class: "vertical-indicator left-indicator" }, null, -1)
784
780
  ])], 2),
785
- e.label ? (h(), w("label", Dt, ie(e.label), 1)) : W("", !0),
781
+ e.label ? (h(), w("label", St, ie(e.label), 1)) : G("", !0),
786
782
  V("div", {
787
783
  ref: "rightResizeHandle",
788
784
  class: J(["resize-handle right-resize-handle", { "is-dragging": A(ee) }])
789
- }, [...B[5] || (B[5] = [
785
+ }, [...H[5] || (H[5] = [
790
786
  V("div", { class: "handle-grip" }, null, -1),
791
787
  V("div", { class: "vertical-indicator right-indicator" }, null, -1)
792
788
  ])], 2)
793
- ], 46, St)
789
+ ], 46, It)
794
790
  ], 512),
795
791
  e.store.isDependencyGraphEnabled && g.value ? (h(), w("svg", {
796
792
  key: 0,
797
- style: se(X.value)
793
+ style: se(L.value)
798
794
  }, [
799
795
  V("line", {
800
796
  x1: T.value.startX,
@@ -804,29 +800,29 @@ const Ct = (e) => {
804
800
  stroke: "#2196f3",
805
801
  "stroke-width": "2",
806
802
  "stroke-dasharray": "5,5"
807
- }, null, 8, At)
808
- ], 4)) : W("", !0)
809
- ], 8, $t));
803
+ }, null, 8, Dt)
804
+ ], 4)) : G("", !0)
805
+ ], 8, Rt));
810
806
  }
811
807
  }), he = (e, k) => {
812
808
  const i = e.__vccOpts || e;
813
809
  for (const [u, M] of k)
814
810
  i[u] = M;
815
811
  return i;
816
- }, Bt = /* @__PURE__ */ he(Ht, [["__scopeId", "data-v-032ef6d9"]]), Zt = `<?xml version="1.0" encoding="UTF-8"?>
812
+ }, Ht = /* @__PURE__ */ he(At, [["__scopeId", "data-v-032ef6d9"]]), Bt = `<?xml version="1.0" encoding="UTF-8"?>
817
813
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
818
814
  <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;"/>
819
815
  <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;"/>
820
816
  </svg>
821
- `, Tt = `<?xml version="1.0" encoding="UTF-8"?>
817
+ `, Zt = `<?xml version="1.0" encoding="UTF-8"?>
822
818
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
823
819
  <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;"/>
824
820
  <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;"/>
825
- </svg>`, Vt = `<?xml version="1.0" encoding="UTF-8"?>
821
+ </svg>`, Tt = `<?xml version="1.0" encoding="UTF-8"?>
826
822
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.67">
827
823
  <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;"/>
828
824
  <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;"/>
829
- </svg>`, Et = `<?xml version="1.0" encoding="UTF-8"?>
825
+ </svg>`, Vt = `<?xml version="1.0" encoding="UTF-8"?>
830
826
  <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
831
827
  <path d="M68.6,45.8v13.7H2v-13.7h66.6M70.6,43.8H0v17.7h70.6v-17.7h0Z"/>
832
828
  <path d="M68.6,24.2v13.7H2v-13.7h66.6M70.6,22.2H0v17.7h70.6v-17.7h0Z"/>
@@ -840,7 +836,7 @@ const Ct = (e) => {
840
836
  <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"/>
841
837
  <path d="M70.6,13.4h-2v-2.7h2v2.7ZM70.6,8h-2v-2.7h2v2.7Z"/>
842
838
  </g>
843
- </svg>`, Nt = `<?xml version="1.0" encoding="UTF-8"?>
839
+ </svg>`, Et = `<?xml version="1.0" encoding="UTF-8"?>
844
840
  <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
845
841
  <g>
846
842
  <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"/>
@@ -854,31 +850,31 @@ const Ct = (e) => {
854
850
  </g>
855
851
  <path d="M68.6,23.7v13.7H2v-13.7h66.6M70.6,21.7H0v17.7h70.6v-17.7h0Z"/>
856
852
  <path d="M68.6,2v13.7H2V2h66.6M70.6,0H0v17.7h70.6V0h0Z"/>
857
- </svg>`, Ot = `<?xml version="1.0" encoding="UTF-8"?>
853
+ </svg>`, Nt = `<?xml version="1.0" encoding="UTF-8"?>
858
854
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
859
855
  <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;"/>
860
- </svg>`, Lt = `<?xml version="1.0" encoding="UTF-8"?>
856
+ </svg>`, Ot = `<?xml version="1.0" encoding="UTF-8"?>
861
857
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
862
858
  <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;"/>
863
859
  <polygon points="18,20 18,44 46,32" style="fill: #000; stroke-width: 0px;"/>
864
860
  </svg>
865
- `, Ft = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 13V3.5M4.5 7 8 3.5 11.5 7" stroke-linecap="round" stroke-linejoin="round"/></svg>', Pt = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 3v9.5M4.5 9 8 12.5 11.5 9" stroke-linecap="round" stroke-linejoin="round"/></svg>', zt = {
866
- add: Zt,
867
- delete: Tt,
868
- duplicate: Vt,
869
- insertAbove: Et,
870
- insertBelow: Nt,
871
- move: Ot,
872
- moveUp: Ft,
873
- moveDown: Pt,
874
- open: Lt
875
- }, Xt = {
861
+ `, Lt = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 13V3.5M4.5 7 8 3.5 11.5 7" stroke-linecap="round" stroke-linejoin="round"/></svg>', Ft = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 3v9.5M4.5 9 8 12.5 11.5 9" stroke-linecap="round" stroke-linejoin="round"/></svg>', Pt = {
862
+ add: Bt,
863
+ delete: Zt,
864
+ duplicate: Tt,
865
+ insertAbove: Vt,
866
+ insertBelow: Et,
867
+ move: Nt,
868
+ moveUp: Lt,
869
+ moveDown: Ft,
870
+ open: Ot
871
+ }, zt = {
876
872
  key: 0,
877
873
  class: "row-actions-dropdown"
878
- }, Gt = ["aria-expanded"], Wt = ["disabled", "onClick"], jt = ["innerHTML"], Ut = { class: "action-label" }, Yt = {
874
+ }, Xt = ["aria-expanded"], Gt = ["disabled", "onClick"], Wt = ["innerHTML"], jt = { class: "action-label" }, Ut = {
879
875
  key: 1,
880
876
  class: "row-actions-icons"
881
- }, qt = ["title", "aria-label", "disabled", "onClick"], Jt = ["innerHTML"], Me = /* @__PURE__ */ ce({
877
+ }, Yt = ["title", "aria-label", "disabled", "onClick"], qt = ["innerHTML"], Me = /* @__PURE__ */ ce({
882
878
  __name: "ARowActions",
883
879
  props: {
884
880
  rowIndex: {},
@@ -888,7 +884,7 @@ const Ct = (e) => {
888
884
  },
889
885
  emits: ["action"],
890
886
  setup(e, { emit: k }) {
891
- const i = e, u = k, M = ne("actionsCell"), s = ne("toggleButton"), l = E(0), r = E(!1), v = E(!1), n = E({ top: 0, left: 0 }), C = {
887
+ const i = e, u = k, M = ne("actionsCell"), s = ne("toggleButton"), l = E(0), c = E(!1), v = E(!1), n = E({ top: 0, left: 0 }), C = {
892
888
  add: "Add Record",
893
889
  delete: "Delete Record",
894
890
  duplicate: "Duplicate Record",
@@ -898,7 +894,7 @@ const Ct = (e) => {
898
894
  moveUp: "Move Up",
899
895
  moveDown: "Move Down",
900
896
  open: "Open Record"
901
- }, d = Z(() => {
897
+ }, d = B(() => {
902
898
  const a = [], f = i.config.actions || {}, x = [
903
899
  "open",
904
900
  "moveUp",
@@ -913,15 +909,15 @@ const Ct = (e) => {
913
909
  for (const y of x) {
914
910
  const g = f[y];
915
911
  if (g === !1 || g === void 0) continue;
916
- let T = !0, O = C[y], p = zt[y], H = !1;
917
- typeof g == "object" && (T = g.enabled !== !1, O = g.label || O, p = g.icon || p, g.disabled && (H = g.disabled(i.rowIndex, i.store))), T && a.push({ type: y, label: O, icon: p, disabled: H });
912
+ let T = !0, O = C[y], p = Pt[y], Z = !1;
913
+ typeof g == "object" && (T = g.enabled !== !1, O = g.label || O, p = g.icon || p, g.disabled && (Z = g.disabled(i.rowIndex, i.store))), T && a.push({ type: y, label: O, icon: p, disabled: Z });
918
914
  }
919
915
  return a;
920
- }), m = Z(() => {
916
+ }), m = B(() => {
921
917
  if (i.config.forceDropdown) return !0;
922
918
  const a = i.config.dropdownThreshold ?? 150;
923
919
  return a === 0 ? !1 : l.value > 0 && l.value < a;
924
- }), Y = Z(() => r.value ? v.value ? {
920
+ }), U = B(() => c.value ? v.value ? {
925
921
  position: "fixed",
926
922
  bottom: `${window.innerHeight - n.value.top}px`,
927
923
  left: `${n.value.left}px`,
@@ -931,12 +927,12 @@ const Ct = (e) => {
931
927
  top: `${n.value.top}px`,
932
928
  left: `${n.value.left}px`
933
929
  } : {});
934
- ut(M, (a) => {
930
+ dt(M, (a) => {
935
931
  const f = a[0];
936
932
  f && (l.value = f.contentRect.width);
937
933
  });
938
- const j = () => {
939
- r.value || b(), r.value = !r.value;
934
+ const W = () => {
935
+ c.value || b(), c.value = !c.value;
940
936
  }, b = () => {
941
937
  if (!s.value) return;
942
938
  const a = s.value.getBoundingClientRect(), f = window.innerHeight, x = window.innerWidth, y = d.value.length * 40 + 16, g = 160, T = f - a.bottom, O = a.top;
@@ -947,32 +943,32 @@ const Ct = (e) => {
947
943
  left: p
948
944
  };
949
945
  };
950
- vt(M, () => {
951
- r.value = !1;
946
+ ut(M, () => {
947
+ c.value = !1;
952
948
  });
953
949
  const $ = (a, f) => {
954
- r.value = !1;
950
+ c.value = !1;
955
951
  const x = i.config.actions?.[a];
956
952
  typeof x == "object" && x.handler && x.handler(i.rowIndex, i.store) === !1 || u("action", a, i.rowIndex, f);
957
953
  };
958
954
  return (a, f) => (h(), w("td", {
959
955
  ref: "actionsCell",
960
- class: J(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": r.value }])
956
+ class: J(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": c.value }])
961
957
  }, [
962
- m.value ? (h(), w("div", Xt, [
958
+ m.value ? (h(), w("div", zt, [
963
959
  V("button", {
964
960
  ref: "toggleButton",
965
961
  type: "button",
966
962
  class: "row-actions-toggle",
967
- "aria-expanded": r.value,
963
+ "aria-expanded": c.value,
968
964
  "aria-haspopup": "true",
969
- onClick: fe(j, ["stop"])
965
+ onClick: fe(W, ["stop"])
970
966
  }, [...f[0] || (f[0] = [
971
967
  V("span", { class: "dropdown-icon" }, "⋮", -1)
972
- ])], 8, Gt),
968
+ ])], 8, Xt),
973
969
  te(V("div", {
974
970
  class: J(["row-actions-menu", { "menu-flipped": v.value }]),
975
- style: se(Y.value),
971
+ style: se(U.value),
976
972
  role: "menu"
977
973
  }, [
978
974
  (h(!0), w(ae, null, re(d.value, (x) => (h(), w("button", {
@@ -986,13 +982,13 @@ const Ct = (e) => {
986
982
  V("span", {
987
983
  class: "action-icon",
988
984
  innerHTML: x.icon
989
- }, null, 8, jt),
990
- V("span", Ut, ie(x.label), 1)
991
- ], 8, Wt))), 128))
985
+ }, null, 8, Wt),
986
+ V("span", jt, ie(x.label), 1)
987
+ ], 8, Gt))), 128))
992
988
  ], 6), [
993
- [Le, r.value]
989
+ [Le, c.value]
994
990
  ])
995
- ])) : (h(), w("div", Yt, [
991
+ ])) : (h(), w("div", Ut, [
996
992
  (h(!0), w(ae, null, re(d.value, (x) => (h(), w("button", {
997
993
  key: x.type,
998
994
  type: "button",
@@ -1005,12 +1001,12 @@ const Ct = (e) => {
1005
1001
  V("span", {
1006
1002
  class: "action-icon",
1007
1003
  innerHTML: x.icon
1008
- }, null, 8, Jt)
1009
- ], 8, qt))), 128))
1004
+ }, null, 8, qt)
1005
+ ], 8, Yt))), 128))
1010
1006
  ]))
1011
1007
  ], 2));
1012
1008
  }
1013
- }), Qt = ["tabindex"], Kt = ["tabindex"], _t = ["colspan"], en = /* @__PURE__ */ ce({
1009
+ }), Jt = ["tabindex"], Qt = ["tabindex"], Kt = ["colspan"], _t = /* @__PURE__ */ ce({
1014
1010
  __name: "ARow",
1015
1011
  props: {
1016
1012
  rowIndex: {},
@@ -1020,18 +1016,18 @@ const Ct = (e) => {
1020
1016
  },
1021
1017
  emits: ["row:action", "row:click"],
1022
1018
  setup(e, { emit: k }) {
1023
- const i = k, u = ne("rowEl"), M = Z(() => e.store.isRowVisible(e.rowIndex)), s = Z(() => e.store.getRowExpandSymbol(e.rowIndex)), l = Z(() => e.store.config.clickable ?? !1), r = Z(() => e.store.config.rowActions || { enabled: !1 }), v = Z(() => r.value.enabled), n = Z(() => r.value.position || "before-index"), C = Z(() => e.store.config.view === "list-expansion" && !!e.store.display[e.rowIndex]?.expanded), d = Z(() => {
1019
+ const i = k, u = ne("rowEl"), M = B(() => e.store.isRowVisible(e.rowIndex)), s = B(() => e.store.getRowExpandSymbol(e.rowIndex)), l = B(() => e.store.config.clickable ?? !1), c = B(() => e.store.config.rowActions || { enabled: !1 }), v = B(() => c.value.enabled), n = B(() => c.value.position || "before-index"), C = B(() => e.store.config.view === "list-expansion" && !!e.store.display[e.rowIndex]?.expanded), d = B(() => {
1024
1020
  const b = e.store.config.view === "uncounted" ? 0 : 1, $ = v.value ? 1 : 0;
1025
1021
  return e.store.columns.length + b + $;
1026
1022
  }), m = (b, $, a) => {
1027
1023
  i("row:action", b, $, a);
1028
- }, Y = (b) => {
1024
+ }, U = (b) => {
1029
1025
  const $ = b.target;
1030
1026
  $.closest(".atable-row-actions") || $.closest(".tree-index") || $.closest(".expansion-index") || i("row:click", e.rowIndex, b);
1031
- }, j = e.store.config.view === "list-expansion";
1032
- if (e.addNavigation || j) {
1027
+ }, W = e.store.config.view === "list-expansion";
1028
+ if (e.addNavigation || W) {
1033
1029
  let b = {};
1034
- e.addNavigation === !0 ? b = { ...Ve } : typeof e.addNavigation == "object" && (b = { ...Ve, ...e.addNavigation }), j && !b["keydown.control.g"] && (b["keydown.control.g"] = ($) => {
1030
+ e.addNavigation === !0 ? b = { ...Ve } : typeof e.addNavigation == "object" && (b = { ...Ve, ...e.addNavigation }), W && !b["keydown.control.g"] && (b["keydown.control.g"] = ($) => {
1035
1031
  $.stopPropagation(), $.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
1036
1032
  }), qe([
1037
1033
  {
@@ -1045,16 +1041,16 @@ const Ct = (e) => {
1045
1041
  ref: "rowEl",
1046
1042
  tabindex: e.tabIndex,
1047
1043
  class: ["atable-row", { "atable-row-clickable": l.value }],
1048
- onClick: Y
1044
+ onClick: U
1049
1045
  }), [
1050
1046
  v.value && n.value === "before-index" ? (h(), oe(Me, {
1051
1047
  key: 0,
1052
1048
  "row-index": e.rowIndex,
1053
1049
  store: e.store,
1054
- config: r.value,
1050
+ config: c.value,
1055
1051
  position: n.value,
1056
1052
  onAction: m
1057
- }, null, 8, ["row-index", "store", "config", "position"])) : W("", !0),
1053
+ }, null, 8, ["row-index", "store", "config", "position"])) : G("", !0),
1058
1054
  e.store.config.view !== "uncounted" ? le(b.$slots, "index", {}, () => [
1059
1055
  e.store.config.view === "list" ? (h(), w("td", {
1060
1056
  key: 0,
@@ -1070,26 +1066,26 @@ const Ct = (e) => {
1070
1066
  tabIndex: -1,
1071
1067
  class: J(["expansion-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1072
1068
  onClick: $[1] || ($[1] = (a) => e.store.toggleRowExpand(e.rowIndex))
1073
- }, ie(s.value), 3)) : W("", !0)
1074
- ], !0, 1) : W("", !0),
1069
+ }, ie(s.value), 3)) : G("", !0)
1070
+ ], !0, 1) : G("", !0),
1075
1071
  v.value && n.value === "after-index" ? (h(), oe(Me, {
1076
1072
  key: 2,
1077
1073
  "row-index": e.rowIndex,
1078
1074
  store: e.store,
1079
- config: r.value,
1075
+ config: c.value,
1080
1076
  position: n.value,
1081
1077
  onAction: m
1082
- }, null, 8, ["row-index", "store", "config", "position"])) : W("", !0),
1078
+ }, null, 8, ["row-index", "store", "config", "position"])) : G("", !0),
1083
1079
  le(b.$slots, "default", {}, void 0, !0),
1084
1080
  v.value && n.value === "end" ? (h(), oe(Me, {
1085
1081
  key: 3,
1086
1082
  "row-index": e.rowIndex,
1087
1083
  store: e.store,
1088
- config: r.value,
1084
+ config: c.value,
1089
1085
  position: n.value,
1090
1086
  onAction: m
1091
- }, null, 8, ["row-index", "store", "config", "position"])) : W("", !0)
1092
- ], 16, Qt), [
1087
+ }, null, 8, ["row-index", "store", "config", "position"])) : G("", !0)
1088
+ ], 16, Jt), [
1093
1089
  [Le, M.value]
1094
1090
  ]),
1095
1091
  C.value ? (h(), w("tr", {
@@ -1107,11 +1103,11 @@ const Ct = (e) => {
1107
1103
  rowIndex: e.rowIndex,
1108
1104
  store: e.store
1109
1105
  }, void 0, !0)
1110
- ], 8, _t)
1111
- ], 8, Kt)) : W("", !0)
1106
+ ], 8, Kt)
1107
+ ], 8, Qt)) : G("", !0)
1112
1108
  ], 64));
1113
1109
  }
1114
- }), _e = /* @__PURE__ */ he(en, [["__scopeId", "data-v-4dd47763"]]), tn = { class: "gantt-connection-overlay" }, nn = {
1110
+ }), _e = /* @__PURE__ */ he(_t, [["__scopeId", "data-v-4dd47763"]]), en = { class: "gantt-connection-overlay" }, tn = {
1115
1111
  class: "connection-svg",
1116
1112
  style: {
1117
1113
  position: "absolute",
@@ -1122,31 +1118,31 @@ const Ct = (e) => {
1122
1118
  pointerEvents: "none",
1123
1119
  zIndex: 1
1124
1120
  }
1125
- }, on = ["d", "stroke-width", "onDblclick"], ln = ["id", "d", "stroke", "stroke-width", "onDblclick"], an = 0.25, ke = 16, sn = /* @__PURE__ */ ce({
1121
+ }, nn = ["d", "stroke-width", "onDblclick"], on = ["id", "d", "stroke", "stroke-width", "onDblclick"], ln = 0.25, ke = 16, an = /* @__PURE__ */ ce({
1126
1122
  __name: "AGanttConnection",
1127
1123
  props: {
1128
1124
  store: {}
1129
1125
  },
1130
1126
  emits: ["connection:delete"],
1131
1127
  setup(e, { emit: k }) {
1132
- const i = k, u = Z(() => e.store.connectionPaths.filter((l) => {
1133
- const r = e.store.ganttBars.find((n) => n.id === l.from.barId), v = e.store.ganttBars.find((n) => n.id === l.to.barId);
1134
- return r && v;
1128
+ const i = k, u = B(() => e.store.connectionPaths.filter((l) => {
1129
+ const c = e.store.ganttBars.find((n) => n.id === l.from.barId), v = e.store.ganttBars.find((n) => n.id === l.to.barId);
1130
+ return c && v;
1135
1131
  })), M = (l) => {
1136
- const r = e.store.connectionHandles.find(
1132
+ const c = e.store.connectionHandles.find(
1137
1133
  (O) => O.barId === l.from.barId && O.side === l.from.side
1138
1134
  ), v = e.store.connectionHandles.find(
1139
1135
  (O) => O.barId === l.to.barId && O.side === l.to.side
1140
1136
  );
1141
- if (!r || !v) return "";
1142
- const n = r.position.x + ke / 2, C = r.position.y + ke / 2, d = v.position.x + ke / 2, m = v.position.y + ke / 2, Y = Math.abs(d - n), j = Math.max(Y * an, 50), b = n + (l.from.side === "left" ? -j : j), $ = d + (l.to.side === "left" ? -j : j), a = { x: 0.5 * n + 0.5 * b, y: 0.5 * C + 0.5 * C }, f = { x: 0.5 * b + 0.5 * $, y: 0.5 * C + 0.5 * m }, x = { x: 0.5 * $ + 0.5 * d, y: 0.5 * m + 0.5 * m }, y = { x: 0.5 * a.x + 0.5 * f.x, y: 0.5 * a.y + 0.5 * f.y }, g = { x: 0.5 * f.x + 0.5 * x.x, y: 0.5 * f.y + 0.5 * x.y }, T = { x: 0.5 * y.x + 0.5 * g.x, y: 0.5 * y.y + 0.5 * g.y };
1137
+ if (!c || !v) return "";
1138
+ const n = c.position.x + ke / 2, C = c.position.y + ke / 2, d = v.position.x + ke / 2, m = v.position.y + ke / 2, U = Math.abs(d - n), W = Math.max(U * ln, 50), b = n + (l.from.side === "left" ? -W : W), $ = d + (l.to.side === "left" ? -W : W), a = { x: 0.5 * n + 0.5 * b, y: 0.5 * C + 0.5 * C }, f = { x: 0.5 * b + 0.5 * $, y: 0.5 * C + 0.5 * m }, x = { x: 0.5 * $ + 0.5 * d, y: 0.5 * m + 0.5 * m }, y = { x: 0.5 * a.x + 0.5 * f.x, y: 0.5 * a.y + 0.5 * f.y }, g = { x: 0.5 * f.x + 0.5 * x.x, y: 0.5 * f.y + 0.5 * x.y }, T = { x: 0.5 * y.x + 0.5 * g.x, y: 0.5 * y.y + 0.5 * g.y };
1143
1139
  return `M ${n} ${C} Q ${b} ${C}, ${T.x} ${T.y} Q ${$} ${m}, ${d} ${m}`;
1144
1140
  }, s = (l) => {
1145
1141
  e.store.deleteConnection(l.id) && i("connection:delete", l);
1146
1142
  };
1147
- return (l, r) => (h(), w("div", tn, [
1148
- (h(), w("svg", nn, [
1149
- r[0] || (r[0] = V("defs", null, [
1143
+ return (l, c) => (h(), w("div", en, [
1144
+ (h(), w("svg", tn, [
1145
+ c[0] || (c[0] = V("defs", null, [
1150
1146
  V("path", {
1151
1147
  id: "arrowhead",
1152
1148
  d: "M 0 -7 L 20 0 L 0 7Z",
@@ -1177,7 +1173,7 @@ const Ct = (e) => {
1177
1173
  fill: "none",
1178
1174
  class: "connection-hitbox",
1179
1175
  onDblclick: (n) => s(v)
1180
- }, null, 40, on))), 128)),
1176
+ }, null, 40, nn))), 128)),
1181
1177
  (h(!0), w(ae, null, re(u.value, (v) => (h(), w("path", {
1182
1178
  id: v.id,
1183
1179
  key: v.id,
@@ -1188,17 +1184,17 @@ const Ct = (e) => {
1188
1184
  "marker-mid": "url(#arrowhead-marker)",
1189
1185
  class: "connection-path animated-path",
1190
1186
  onDblclick: (n) => s(v)
1191
- }, null, 40, ln))), 128))
1187
+ }, null, 40, on))), 128))
1192
1188
  ]))
1193
1189
  ]));
1194
1190
  }
1195
- }), rn = /* @__PURE__ */ he(sn, [["__scopeId", "data-v-d5929c98"]]), cn = { class: "column-filter" }, dn = {
1191
+ }), sn = /* @__PURE__ */ he(an, [["__scopeId", "data-v-d5929c98"]]), rn = { class: "column-filter" }, cn = {
1196
1192
  key: 2,
1197
1193
  class: "checkbox-filter"
1198
- }, un = ["value"], vn = {
1194
+ }, dn = ["value"], un = {
1199
1195
  key: 5,
1200
1196
  class: "date-range-filter"
1201
- }, fn = /* @__PURE__ */ ce({
1197
+ }, vn = /* @__PURE__ */ ce({
1202
1198
  __name: "ATableColumnFilter",
1203
1199
  props: {
1204
1200
  column: {},
@@ -1221,7 +1217,7 @@ const Ct = (e) => {
1221
1217
  }, i = E(""), u = lt({
1222
1218
  startValue: "",
1223
1219
  endValue: ""
1224
- }), M = Z(() => {
1220
+ }), M = B(() => {
1225
1221
  if (e.column.filterType) return e.column.filterType;
1226
1222
  const C = Re(e.column.component);
1227
1223
  return C ? k[C] : "text";
@@ -1229,13 +1225,13 @@ const Ct = (e) => {
1229
1225
  if (C.filterOptions) return C.filterOptions;
1230
1226
  const d = /* @__PURE__ */ new Set();
1231
1227
  return e.store.rows.forEach((m) => {
1232
- const Y = m[C.name];
1233
- Y != null && Y !== "" && d.add(Y);
1228
+ const U = m[C.name];
1229
+ U != null && U !== "" && d.add(U);
1234
1230
  }), Array.from(d).map((m) => ({
1235
1231
  value: m,
1236
1232
  label: String(m)
1237
1233
  }));
1238
- }, l = Z(() => !!(i.value || u.startValue || u.endValue)), r = (C) => {
1234
+ }, l = B(() => !!(i.value || u.startValue || u.endValue)), c = (C) => {
1239
1235
  !C && M.value !== "checkbox" ? (e.store.clearFilter(e.colIndex), i.value = "") : (i.value = C, e.store.setFilter(e.colIndex, { value: C }));
1240
1236
  }, v = (C, d) => {
1241
1237
  C === "start" ? u.startValue = d : u.endValue = d, !u.startValue && !u.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
@@ -1246,13 +1242,13 @@ const Ct = (e) => {
1246
1242
  }, n = () => {
1247
1243
  i.value = "", u.startValue = "", u.endValue = "", e.store.clearFilter(e.colIndex);
1248
1244
  };
1249
- return (C, d) => (h(), w("div", cn, [
1245
+ return (C, d) => (h(), w("div", rn, [
1250
1246
  M.value === "text" ? te((h(), w("input", {
1251
1247
  key: 0,
1252
1248
  "onUpdate:modelValue": d[0] || (d[0] = (m) => i.value = m),
1253
1249
  type: "text",
1254
1250
  class: "filter-input",
1255
- onInput: d[1] || (d[1] = (m) => r(i.value))
1251
+ onInput: d[1] || (d[1] = (m) => c(i.value))
1256
1252
  }, null, 544)), [
1257
1253
  [ge, i.value]
1258
1254
  ]) : M.value === "number" ? te((h(), w("input", {
@@ -1260,15 +1256,15 @@ const Ct = (e) => {
1260
1256
  "onUpdate:modelValue": d[2] || (d[2] = (m) => i.value = m),
1261
1257
  type: "number",
1262
1258
  class: "filter-input",
1263
- onInput: d[3] || (d[3] = (m) => r(i.value))
1259
+ onInput: d[3] || (d[3] = (m) => c(i.value))
1264
1260
  }, null, 544)), [
1265
1261
  [ge, i.value]
1266
- ]) : M.value === "checkbox" ? (h(), w("label", dn, [
1262
+ ]) : M.value === "checkbox" ? (h(), w("label", cn, [
1267
1263
  te(V("input", {
1268
1264
  "onUpdate:modelValue": d[4] || (d[4] = (m) => i.value = m),
1269
1265
  type: "checkbox",
1270
1266
  class: "filter-checkbox",
1271
- onChange: d[5] || (d[5] = (m) => r(i.value))
1267
+ onChange: d[5] || (d[5] = (m) => c(i.value))
1272
1268
  }, null, 544), [
1273
1269
  [at, i.value]
1274
1270
  ]),
@@ -1277,13 +1273,13 @@ const Ct = (e) => {
1277
1273
  key: 3,
1278
1274
  "onUpdate:modelValue": d[6] || (d[6] = (m) => i.value = m),
1279
1275
  class: "filter-select",
1280
- onChange: d[7] || (d[7] = (m) => r(i.value))
1276
+ onChange: d[7] || (d[7] = (m) => c(i.value))
1281
1277
  }, [
1282
1278
  d[15] || (d[15] = V("option", { value: "" }, "All", -1)),
1283
1279
  (h(!0), w(ae, null, re(s(e.column), (m) => (h(), w("option", {
1284
1280
  key: m.value || m,
1285
1281
  value: m.value || m
1286
- }, ie(m.label || m), 9, un))), 128))
1282
+ }, ie(m.label || m), 9, dn))), 128))
1287
1283
  ], 544)), [
1288
1284
  [st, i.value]
1289
1285
  ]) : M.value === "date" ? te((h(), w("input", {
@@ -1291,10 +1287,10 @@ const Ct = (e) => {
1291
1287
  "onUpdate:modelValue": d[8] || (d[8] = (m) => i.value = m),
1292
1288
  type: "date",
1293
1289
  class: "filter-input",
1294
- onChange: d[9] || (d[9] = (m) => r(i.value))
1290
+ onChange: d[9] || (d[9] = (m) => c(i.value))
1295
1291
  }, null, 544)), [
1296
1292
  [ge, i.value]
1297
- ]) : M.value === "dateRange" ? (h(), w("div", vn, [
1293
+ ]) : M.value === "dateRange" ? (h(), w("div", un, [
1298
1294
  te(V("input", {
1299
1295
  "onUpdate:modelValue": d[10] || (d[10] = (m) => u.startValue = m),
1300
1296
  type: "date",
@@ -1318,32 +1314,32 @@ const Ct = (e) => {
1318
1314
  column: e.column,
1319
1315
  "col-index": e.colIndex,
1320
1316
  store: e.store,
1321
- "onUpdate:value": d[14] || (d[14] = (m) => r(m))
1322
- }, null, 40, ["value", "column", "col-index", "store"])) : W("", !0),
1317
+ "onUpdate:value": d[14] || (d[14] = (m) => c(m))
1318
+ }, null, 40, ["value", "column", "col-index", "store"])) : G("", !0),
1323
1319
  l.value ? (h(), w("button", {
1324
1320
  key: 7,
1325
1321
  class: "clear-btn",
1326
1322
  title: "Clear",
1327
1323
  onClick: n
1328
- }, "×")) : W("", !0)
1324
+ }, "×")) : G("", !0)
1329
1325
  ]));
1330
1326
  }
1331
- }), hn = /* @__PURE__ */ he(fn, [["__scopeId", "data-v-a0263c77"]]), gn = { key: 0 }, mn = {
1327
+ }), fn = /* @__PURE__ */ he(vn, [["__scopeId", "data-v-a0263c77"]]), hn = { key: 0 }, gn = {
1332
1328
  class: "atable-header-row",
1333
1329
  tabindex: "-1"
1334
- }, wn = {
1330
+ }, mn = {
1335
1331
  key: 2,
1336
1332
  class: "row-actions-header"
1337
- }, xn = ["data-colindex", "onClick"], bn = {
1333
+ }, wn = ["data-colindex", "onClick"], xn = {
1338
1334
  key: 3,
1339
1335
  class: "row-actions-header"
1340
- }, yn = {
1336
+ }, bn = {
1341
1337
  key: 0,
1342
1338
  class: "atable-filters-row"
1343
- }, Cn = {
1339
+ }, yn = {
1344
1340
  key: 2,
1345
1341
  class: "row-actions-header"
1346
- }, pn = {
1342
+ }, Cn = {
1347
1343
  key: 3,
1348
1344
  class: "row-actions-header"
1349
1345
  }, et = /* @__PURE__ */ ce({
@@ -1353,19 +1349,19 @@ const Ct = (e) => {
1353
1349
  store: {}
1354
1350
  },
1355
1351
  setup(e) {
1356
- const k = Z(() => e.columns.filter((l) => l.filterable)), i = Z(() => e.store.config.rowActions?.enabled ?? !1), u = Z(() => e.store.config.rowActions?.position ?? "before-index"), M = (l) => e.store.sortByColumn(l), s = (l) => {
1357
- for (const r of l) {
1358
- if (r.borderBoxSize.length === 0) continue;
1359
- const n = r.borderBoxSize[0].inlineSize, C = Number(r.target.dataset.colindex), d = e.store.columns[C]?.width;
1352
+ const k = B(() => e.columns.filter((l) => l.filterable)), i = B(() => e.store.config.rowActions?.enabled ?? !1), u = B(() => e.store.config.rowActions?.position ?? "before-index"), M = (l) => e.store.sortByColumn(l), s = (l) => {
1353
+ for (const c of l) {
1354
+ if (c.borderBoxSize.length === 0) continue;
1355
+ const n = c.borderBoxSize[0].inlineSize, C = Number(c.target.dataset.colindex), d = e.store.columns[C]?.width;
1360
1356
  typeof d == "number" && d !== n && e.store.resizeColumn(C, n);
1361
1357
  }
1362
1358
  };
1363
- return (l, r) => e.columns.length ? (h(), w("thead", gn, [
1364
- V("tr", mn, [
1359
+ return (l, c) => e.columns.length ? (h(), w("thead", hn, [
1360
+ V("tr", gn, [
1365
1361
  i.value && u.value === "before-index" ? (h(), w("th", {
1366
1362
  key: 0,
1367
1363
  class: J(["row-actions-header", { "sticky-column": u.value === "before-index" }])
1368
- }, null, 2)) : W("", !0),
1364
+ }, null, 2)) : G("", !0),
1369
1365
  e.store.zeroColumn ? (h(), w("th", {
1370
1366
  key: 1,
1371
1367
  id: "header-index",
@@ -1374,8 +1370,8 @@ const Ct = (e) => {
1374
1370
  e.store.isTreeView ? "tree-index" : "",
1375
1371
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1376
1372
  ], "list-index"])
1377
- }, null, 2)) : W("", !0),
1378
- i.value && u.value === "after-index" ? (h(), w("th", wn)) : W("", !0),
1373
+ }, null, 2)) : G("", !0),
1374
+ i.value && u.value === "after-index" ? (h(), w("th", mn)) : G("", !0),
1379
1375
  (h(!0), w(ae, null, re(e.columns, (v, n) => te((h(), w("th", {
1380
1376
  key: v.name,
1381
1377
  "data-colindex": n,
@@ -1387,16 +1383,16 @@ const Ct = (e) => {
1387
1383
  le(l.$slots, "default", {}, () => [
1388
1384
  it(ie(v.label || String.fromCharCode(n + 97).toUpperCase()), 1)
1389
1385
  ])
1390
- ], 14, xn)), [
1391
- [A(gt), s]
1386
+ ], 14, wn)), [
1387
+ [A(ht), s]
1392
1388
  ])), 128)),
1393
- i.value && u.value === "end" ? (h(), w("th", bn)) : W("", !0)
1389
+ i.value && u.value === "end" ? (h(), w("th", xn)) : G("", !0)
1394
1390
  ]),
1395
- k.value.length > 0 ? (h(), w("tr", yn, [
1391
+ k.value.length > 0 ? (h(), w("tr", bn, [
1396
1392
  i.value && u.value === "before-index" ? (h(), w("th", {
1397
1393
  key: 0,
1398
1394
  class: J(["row-actions-header", { "sticky-column": u.value === "before-index" }])
1399
- }, null, 2)) : W("", !0),
1395
+ }, null, 2)) : G("", !0),
1400
1396
  e.store.zeroColumn ? (h(), w("th", {
1401
1397
  key: 1,
1402
1398
  class: J([[
@@ -1404,23 +1400,23 @@ const Ct = (e) => {
1404
1400
  e.store.isTreeView ? "tree-index" : "",
1405
1401
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1406
1402
  ], "list-index"])
1407
- }, null, 2)) : W("", !0),
1408
- i.value && u.value === "after-index" ? (h(), w("th", Cn)) : W("", !0),
1403
+ }, null, 2)) : G("", !0),
1404
+ i.value && u.value === "after-index" ? (h(), w("th", yn)) : G("", !0),
1409
1405
  (h(!0), w(ae, null, re(e.columns, (v, n) => (h(), w("th", {
1410
1406
  key: `filter-${v.name}`,
1411
1407
  class: J(`${v.pinned ? "sticky-column" : ""}`),
1412
1408
  style: se(e.store.getHeaderCellStyle(v))
1413
1409
  }, [
1414
- v.filterable ? (h(), oe(hn, {
1410
+ v.filterable ? (h(), oe(fn, {
1415
1411
  key: 0,
1416
1412
  column: v,
1417
1413
  "col-index": n,
1418
1414
  store: e.store
1419
- }, null, 8, ["column", "col-index", "store"])) : W("", !0)
1415
+ }, null, 8, ["column", "col-index", "store"])) : G("", !0)
1420
1416
  ], 6))), 128)),
1421
- i.value && u.value === "end" ? (h(), w("th", pn)) : W("", !0)
1422
- ])) : W("", !0)
1423
- ])) : W("", !0);
1417
+ i.value && u.value === "end" ? (h(), w("th", Cn)) : G("", !0)
1418
+ ])) : G("", !0)
1419
+ ])) : G("", !0);
1424
1420
  }
1425
1421
  }), tt = /* @__PURE__ */ ce({
1426
1422
  __name: "ATableModal",
@@ -1428,16 +1424,16 @@ const Ct = (e) => {
1428
1424
  store: {}
1429
1425
  },
1430
1426
  setup(e) {
1431
- const k = ne("amodal"), { width: i, height: u } = ve(k), M = Z(() => {
1427
+ const k = ne("amodal"), { width: i, height: u } = ve(k), M = B(() => {
1432
1428
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return {};
1433
1429
  const s = e.store.modal.cell?.closest("table");
1434
1430
  if (!s) return {};
1435
- const l = s.offsetHeight || 0, r = s.offsetWidth || 0;
1431
+ const l = s.offsetHeight || 0, c = s.offsetWidth || 0;
1436
1432
  let v = e.store.modal.cell?.offsetTop || 0;
1437
1433
  const n = s.querySelector("thead")?.offsetHeight || 0;
1438
1434
  v += n, v = v + u.value < l ? v : v - (u.value + e.store.modal.height);
1439
1435
  let C = e.store.modal.cell?.offsetLeft || 0;
1440
- return C = C + i.value <= r ? C : C - (i.value - e.store.modal.width), {
1436
+ return C = C + i.value <= c ? C : C - (i.value - e.store.modal.width), {
1441
1437
  left: `${C}px`,
1442
1438
  top: `${v}px`
1443
1439
  };
@@ -1456,7 +1452,7 @@ const Ct = (e) => {
1456
1452
  ], 36));
1457
1453
  }
1458
1454
  });
1459
- function kn(e) {
1455
+ function pn(e) {
1460
1456
  return e.filter((k) => !k.hidden && k.component).map(({ fieldname: k, hidden: i, ...u }) => {
1461
1457
  const M = Object.assign({ name: k }, u);
1462
1458
  return u.doctype && !u.cellComponent && (M.linkDoctype = u.doctype, u.format || (M.format = (s) => {
@@ -1469,10 +1465,10 @@ function kn(e) {
1469
1465
  })), Re(u.component) === "quantity" && !u.format && (M.format = Je), Re(u.component) === "currency" && !u.format && (M.format = Qe), M;
1470
1466
  });
1471
1467
  }
1472
- const Mn = {
1468
+ const kn = {
1473
1469
  class: "atable-container",
1474
1470
  style: { position: "relative" }
1475
- }, Rn = /* @__PURE__ */ ce({
1471
+ }, Mn = /* @__PURE__ */ ce({
1476
1472
  __name: "ATable",
1477
1473
  props: /* @__PURE__ */ Ue({
1478
1474
  id: { default: "" },
@@ -1487,8 +1483,8 @@ const Mn = {
1487
1483
  }),
1488
1484
  emits: /* @__PURE__ */ Ue(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:click", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move", "row:open"], ["update:rows", "update:columns"]),
1489
1485
  setup(e, { expose: k, emit: i }) {
1490
- const u = Xe(e, "rows"), M = Xe(e, "columns"), s = i, l = ne("table"), r = M.value?.length ? M.value : kn(e.schema ?? []), v = rt("aformLinkResolver", null), n = Ct({
1491
- columns: r,
1486
+ const u = Xe(e, "rows"), M = Xe(e, "columns"), s = i, l = ne("table"), c = M.value?.length ? M.value : pn(e.schema ?? []), v = rt("aformLinkResolver", null), n = yt({
1487
+ columns: c,
1492
1488
  rows: u.value,
1493
1489
  id: e.id,
1494
1490
  config: e.config,
@@ -1522,9 +1518,9 @@ const Mn = {
1522
1518
  },
1523
1519
  { deep: !0 }
1524
1520
  ), Ne(() => {
1525
- M.value?.some((a) => a.pinned) && (d(), n.isTreeView && ft(l, d, { childList: !0, subtree: !0 }));
1521
+ M.value?.some((a) => a.pinned) && (d(), n.isTreeView && vt(l, d, { childList: !0, subtree: !0 }));
1526
1522
  });
1527
- const C = Z(() => n.columns.filter((a) => a.pinned).length), d = () => {
1523
+ const C = B(() => n.columns.filter((a) => a.pinned).length), d = () => {
1528
1524
  const a = l.value, f = a?.rows[0], x = a?.rows[1], y = f ? Array.from(f.cells) : [];
1529
1525
  for (const [g, T] of y.entries()) {
1530
1526
  const O = x?.cells[g];
@@ -1561,9 +1557,9 @@ const Mn = {
1561
1557
  width: "auto"
1562
1558
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
1563
1559
  }), f;
1564
- }, Y = (a) => {
1560
+ }, U = (a) => {
1565
1561
  s("connection:event", { type: "create", connection: a });
1566
- }, j = (a) => {
1562
+ }, W = (a) => {
1567
1563
  s("connection:event", { type: "delete", connection: a });
1568
1564
  }, b = (a, f) => {
1569
1565
  const x = n.rows[a];
@@ -1630,7 +1626,7 @@ const Mn = {
1630
1626
  insertRowAbove: n.insertRowAbove,
1631
1627
  insertRowBelow: n.insertRowBelow,
1632
1628
  moveRow: n.moveRow
1633
- }), (a, f) => (h(), w("div", Mn, [
1629
+ }), (a, f) => (h(), w("div", kn, [
1634
1630
  te((h(), w("table", {
1635
1631
  ref: "table",
1636
1632
  class: "atable",
@@ -1674,7 +1670,7 @@ const Mn = {
1674
1670
  minWidth: g?.width || "40ch",
1675
1671
  width: A(n).config.fullWidth ? "auto" : null
1676
1672
  }),
1677
- "onConnection:create": Y
1673
+ "onConnection:create": U
1678
1674
  }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (h(), oe(me(g.cellComponent || "ACell"), {
1679
1675
  key: 1,
1680
1676
  store: A(n),
@@ -1710,57 +1706,57 @@ const Mn = {
1710
1706
  ])
1711
1707
  ], !0)
1712
1708
  ], 4)), [
1713
- [A(mt), A(n).closeModal]
1709
+ [A(gt), A(n).closeModal]
1714
1710
  ]),
1715
- A(n).isGanttView && A(n).isDependencyGraphEnabled ? (h(), oe(rn, {
1711
+ A(n).isGanttView && A(n).isDependencyGraphEnabled ? (h(), oe(sn, {
1716
1712
  key: 0,
1717
1713
  store: A(n),
1718
- "onConnection:delete": j
1719
- }, null, 8, ["store"])) : W("", !0)
1714
+ "onConnection:delete": W
1715
+ }, null, 8, ["store"])) : G("", !0)
1720
1716
  ]));
1721
1717
  }
1722
- }), $n = /* @__PURE__ */ he(Rn, [["__scopeId", "data-v-4bfbbeab"]]), In = {}, Sn = { class: "aloading" }, Dn = { class: "aloading-header" };
1723
- function An(e, k) {
1724
- return h(), w("div", Sn, [
1725
- V("h2", Dn, [
1718
+ }), Rn = /* @__PURE__ */ he(Mn, [["__scopeId", "data-v-4bfbbeab"]]), $n = {}, In = { class: "aloading" }, Sn = { class: "aloading-header" };
1719
+ function Dn(e, k) {
1720
+ return h(), w("div", In, [
1721
+ V("h2", Sn, [
1726
1722
  le(e.$slots, "default", {}, void 0, !0)
1727
1723
  ]),
1728
1724
  k[0] || (k[0] = V("div", { class: "aloading-bar" }, null, -1))
1729
1725
  ]);
1730
1726
  }
1731
- const Hn = /* @__PURE__ */ he(In, [["render", An], ["__scopeId", "data-v-a930a25b"]]), Bn = {}, Zn = { class: "aloading" }, Tn = { class: "aloading-header" };
1732
- function Vn(e, k) {
1733
- return h(), w("div", Zn, [
1734
- V("h2", Tn, [
1727
+ const An = /* @__PURE__ */ he($n, [["render", Dn], ["__scopeId", "data-v-a930a25b"]]), Hn = {}, Bn = { class: "aloading" }, Zn = { class: "aloading-header" };
1728
+ function Tn(e, k) {
1729
+ return h(), w("div", Bn, [
1730
+ V("h2", Zn, [
1735
1731
  le(e.$slots, "default", {}, void 0, !0)
1736
1732
  ]),
1737
1733
  k[0] || (k[0] = V("div", { class: "aloading-bar" }, null, -1))
1738
1734
  ]);
1739
1735
  }
1740
- const En = /* @__PURE__ */ he(Bn, [["render", Vn], ["__scopeId", "data-v-e1165876"]]);
1741
- function Un(e) {
1742
- e.component("ACell", Rt), e.component("AGanttCell", Bt), e.component("ARow", _e), e.component("ARowActions", Me), e.component("ATable", $n), e.component("ATableHeader", et), e.component("ATableLoading", Hn), e.component("ATableLoadingBar", En), e.component("ATableModal", tt);
1736
+ const Vn = /* @__PURE__ */ he(Hn, [["render", Tn], ["__scopeId", "data-v-e1165876"]]);
1737
+ function jn(e) {
1738
+ e.component("ACell", Mt), e.component("AGanttCell", Ht), e.component("ARow", _e), e.component("ARowActions", Me), e.component("ATable", Rn), e.component("ATableHeader", et), e.component("ATableLoading", An), e.component("ATableLoadingBar", Vn), e.component("ATableModal", tt);
1743
1739
  }
1744
1740
  export {
1745
- Rt as ACell,
1746
- Bt as AGanttCell,
1741
+ Mt as ACell,
1742
+ Ht as AGanttCell,
1747
1743
  _e as ARow,
1748
1744
  Me as ARowActions,
1749
- $n as ATable,
1745
+ Rn as ATable,
1750
1746
  et as ATableHeader,
1751
- Hn as ATableLoading,
1752
- En as ATableLoadingBar,
1747
+ An as ATableLoading,
1748
+ Vn as ATableLoadingBar,
1753
1749
  tt as ATableModal,
1754
- Zt as AddIcon,
1755
- Tt as DeleteIcon,
1756
- Vt as DuplicateIcon,
1757
- Et as InsertAboveIcon,
1758
- Nt as InsertBelowIcon,
1759
- Ot as MoveIcon,
1760
- Lt as OpenIcon,
1761
- zt as actionIcons,
1762
- Ct as createTableStore,
1763
- Un as install,
1764
- kn as schemaToColumns
1750
+ Bt as AddIcon,
1751
+ Zt as DeleteIcon,
1752
+ Tt as DuplicateIcon,
1753
+ Vt as InsertAboveIcon,
1754
+ Et as InsertBelowIcon,
1755
+ Nt as MoveIcon,
1756
+ Ot as OpenIcon,
1757
+ Pt as actionIcons,
1758
+ yt as createTableStore,
1759
+ jn as install,
1760
+ pn as schemaToColumns
1765
1761
  };
1766
1762
  //# sourceMappingURL=atable.js.map