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