@stonecrop/aform 0.12.2 → 0.12.3

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/aform.js CHANGED
@@ -498,10 +498,10 @@ function Dt(e, t, o = {}) {
498
498
  } : _e;
499
499
  let l = !0;
500
500
  const u = (f) => $(s).some((m) => {
501
- if (typeof m == "string") return Array.from(n.document.querySelectorAll(m)).some((I) => I === f.target || f.composedPath().includes(I));
501
+ if (typeof m == "string") return Array.from(n.document.querySelectorAll(m)).some((M) => M === f.target || f.composedPath().includes(M));
502
502
  {
503
- const I = ke(m);
504
- return I && (f.target === I || f.composedPath().includes(I));
503
+ const M = ke(m);
504
+ return M && (f.target === M || f.composedPath().includes(M));
505
505
  }
506
506
  });
507
507
  function c(f) {
@@ -509,8 +509,8 @@ function Dt(e, t, o = {}) {
509
509
  return m && m.$.subTree.shapeFlag === 16;
510
510
  }
511
511
  function v(f, m) {
512
- const I = $(f), k = I.$.subTree && I.$.subTree.children;
513
- return k == null || !Array.isArray(k) ? !1 : k.some((C) => C.el === m.target || m.composedPath().includes(C.el));
512
+ const M = $(f), k = M.$.subTree && M.$.subTree.children;
513
+ return k == null || !Array.isArray(k) ? !1 : k.some((I) => I.el === m.target || m.composedPath().includes(I.el));
514
514
  }
515
515
  const x = (f) => {
516
516
  const m = ke(e);
@@ -539,8 +539,8 @@ function Dt(e, t, o = {}) {
539
539
  a && Ve(n, "blur", (f) => {
540
540
  setTimeout(() => {
541
541
  var m;
542
- const I = ke(e);
543
- ((m = n.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !I?.contains(n.document.activeElement) && t(f);
542
+ const M = ke(e);
543
+ ((m = n.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !M?.contains(n.document.activeElement) && t(f);
544
544
  }, 0);
545
545
  }, { passive: !0 })
546
546
  ].filter(Boolean), h = () => E.forEach((f) => f());
@@ -598,12 +598,12 @@ function co(e) {
598
598
  }
599
599
  function wt(e, t = {}) {
600
600
  var o, n, s, r;
601
- const { pointerTypes: a, preventDefault: i, stopPropagation: l, exact: u, onMove: c, onEnd: v, onStart: x, initialValue: w, axis: E = "both", draggingElement: h = et, containerElement: f, handle: m = e, buttons: I = [0], restrictInView: k, autoScroll: C = !1 } = t, D = R((o = $(w)) !== null && o !== void 0 ? o : {
601
+ const { pointerTypes: a, preventDefault: i, stopPropagation: l, exact: u, onMove: c, onEnd: v, onStart: x, initialValue: w, axis: E = "both", draggingElement: h = et, containerElement: f, handle: m = e, buttons: M = [0], restrictInView: k, autoScroll: I = !1 } = t, D = R((o = $(w)) !== null && o !== void 0 ? o : {
602
602
  x: 0,
603
603
  y: 0
604
604
  }), T = R(), V = (L) => a ? a.includes(L.pointerType) : !0, U = (L) => {
605
605
  $(i) && L.preventDefault(), $(l) && L.stopPropagation();
606
- }, me = $(C), Q = typeof me == "object" ? {
606
+ }, me = $(I), Q = typeof me == "object" ? {
607
607
  speed: (n = $(me.speed)) !== null && n !== void 0 ? n : ot.speed,
608
608
  margin: (s = $(me.margin)) !== null && s !== void 0 ? s : ot.margin,
609
609
  direction: (r = me.direction) !== null && r !== void 0 ? r : ot.direction
@@ -641,13 +641,13 @@ function wt(e, t = {}) {
641
641
  y: K - L.scrollTop
642
642
  }, L, Q.margin, O) ? Oe() : Le();
643
643
  };
644
- $(C) && te(D, Xe);
644
+ $(I) && te(D, Xe);
645
645
  const Ze = (L) => {
646
646
  var O;
647
- if (!$(I).includes(L.button) || $(t.disabled) || !V(L) || $(u) && L.target !== $(e)) return;
647
+ if (!$(M).includes(L.button) || $(t.disabled) || !V(L) || $(u) && L.target !== $(e)) return;
648
648
  const G = $(f), K = G == null || (O = G.getBoundingClientRect) === null || O === void 0 ? void 0 : O.call(G), Y = $(e).getBoundingClientRect(), re = {
649
- x: L.clientX - (G ? Y.left - K.left + (C ? 0 : G.scrollLeft) : Y.left),
650
- y: L.clientY - (G ? Y.top - K.top + (C ? 0 : G.scrollTop) : Y.top)
649
+ x: L.clientX - (G ? Y.left - K.left + (I ? 0 : G.scrollLeft) : Y.left),
650
+ y: L.clientY - (G ? Y.top - K.top + (I ? 0 : G.scrollTop) : Y.top)
651
651
  };
652
652
  x?.(re, L) !== !1 && (T.value = re, U(L));
653
653
  }, Je = (L) => {
@@ -656,10 +656,10 @@ function wt(e, t = {}) {
656
656
  O instanceof HTMLElement && co(O);
657
657
  const G = $(e).getBoundingClientRect();
658
658
  let { x: K, y: Y } = D.value;
659
- if ((E === "x" || E === "both") && (K = L.clientX - T.value.x, O && (K = Math.min(Math.max(0, K), O.scrollWidth - G.width))), (E === "y" || E === "both") && (Y = L.clientY - T.value.y, O && (Y = Math.min(Math.max(0, Y), O.scrollHeight - G.height))), $(C) && O && (fe === null && we(O, G, {
659
+ if ((E === "x" || E === "both") && (K = L.clientX - T.value.x, O && (K = Math.min(Math.max(0, K), O.scrollWidth - G.width))), (E === "y" || E === "both") && (Y = L.clientY - T.value.y, O && (Y = Math.min(Math.max(0, Y), O.scrollHeight - G.height))), $(I) && O && (fe === null && we(O, G, {
660
660
  x: K,
661
661
  y: Y
662
- }), K += O.scrollLeft, Y += O.scrollTop), O && (k || C)) {
662
+ }), K += O.scrollLeft, Y += O.scrollTop), O && (k || I)) {
663
663
  if (E !== "y") {
664
664
  const re = K - O.scrollLeft;
665
665
  re < 0 ? K = O.scrollLeft : re > O.clientWidth - G.width && (K = O.clientWidth - G.width + O.scrollLeft);
@@ -674,7 +674,7 @@ function wt(e, t = {}) {
674
674
  y: Y
675
675
  }, c?.(D.value, L), U(L);
676
676
  }, Ne = (L) => {
677
- $(t.disabled) || !V(L) || T.value && (T.value = void 0, C && Le(), v?.(D.value, L), U(L));
677
+ $(t.disabled) || !V(L) || T.value && (T.value = void 0, I && Le(), v?.(D.value, L), U(L));
678
678
  };
679
679
  if (fn) {
680
680
  const L = () => {
@@ -693,7 +693,7 @@ function wt(e, t = {}) {
693
693
  style: A(() => `
694
694
  left: ${D.value.x}px;
695
695
  top: ${D.value.y}px;
696
- ${C ? "text-wrap: nowrap;" : ""}
696
+ ${I ? "text-wrap: nowrap;" : ""}
697
697
  `)
698
698
  };
699
699
  }
@@ -729,8 +729,8 @@ function Pe(e, t = {}) {
729
729
  o && (i.value = 0, l.value = 0, u.value = 0, c.value = 0, v.value = 0, x.value = 0, w.value = 0, E.value = 0);
730
730
  return;
731
731
  }
732
- const I = m.getBoundingClientRect();
733
- i.value = I.height, l.value = I.bottom, u.value = I.left, c.value = I.right, v.value = I.top, x.value = I.width, w.value = I.x, E.value = I.y;
732
+ const M = m.getBoundingClientRect();
733
+ i.value = M.height, l.value = M.bottom, u.value = M.left, c.value = M.right, v.value = M.top, x.value = M.width, w.value = M.x, E.value = M.y;
734
734
  }
735
735
  function f() {
736
736
  a === "sync" ? h() : a === "next-frame" && requestAnimationFrame(() => h());
@@ -845,7 +845,7 @@ const vo = (e) => {
845
845
  }
846
846
  }, m = () => {
847
847
  o.value && (s.value = o.value.textContent, f());
848
- }, I = () => {
848
+ }, M = () => {
849
849
  try {
850
850
  const T = window.getSelection();
851
851
  if (T && T.rangeCount > 0 && o.value) {
@@ -876,16 +876,16 @@ const vo = (e) => {
876
876
  j && V.removeAllRanges && V.addRange && (V.removeAllRanges(), V.addRange(j));
877
877
  } catch {
878
878
  }
879
- }, C = (T) => {
879
+ }, I = (T) => {
880
880
  if (!a.edit) return;
881
881
  const V = T.target;
882
882
  if (V.textContent === s.value)
883
883
  return;
884
- const U = I();
884
+ const U = M();
885
885
  s.value = V.textContent, a.format ? (r.value = V.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, n), e.store.setCellText(e.colIndex, e.rowIndex, V.textContent)) : (r.value = V.textContent !== n, e.store.setCellData(e.colIndex, e.rowIndex, V.textContent)), ft().then(() => {
886
886
  k(U);
887
887
  });
888
- }, D = /* @__PURE__ */ ao(C, e.debounce);
888
+ }, D = /* @__PURE__ */ ao(I, e.debounce);
889
889
  return t({
890
890
  currentData: s
891
891
  }), (T, V) => (g(), b("td", {
@@ -899,7 +899,7 @@ const vo = (e) => {
899
899
  style: Ie(x.value),
900
900
  class: ae(["atable-cell", w.value]),
901
901
  onFocus: m,
902
- onPaste: C,
902
+ onPaste: I,
903
903
  onInput: V[0] || (V[0] = //@ts-ignore
904
904
  (...U) => H(D) && H(D)(...U)),
905
905
  onClick: E
@@ -995,7 +995,7 @@ const vo = (e) => {
995
995
  v67f2230e: s.value,
996
996
  v8309df7e: _.colspan
997
997
  }));
998
- const n = o, s = R(e.color.length >= 6 ? e.color : "#cccccc"), r = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, a = ve("container"), i = ve("bar"), l = ve("leftResizeHandle"), u = ve("rightResizeHandle"), c = ve("leftConnectionHandle"), v = ve("rightConnectionHandle"), { width: x } = Pe(a), { left: w, right: E } = Pe(i), h = R(e.start), f = R(e.end || h.value + e.colspan), m = R(!1), I = R(!1), k = R(!1), C = R(!1), D = R(!1), T = R({ startX: 0, startY: 0, endX: 0, endY: 0 }), V = A(() => Oe.value || we.value || fe.value), U = A(() => e.colspan > 0 ? x.value / e.colspan : 0), me = A(() => {
998
+ const n = o, s = R(e.color.length >= 6 ? e.color : "#cccccc"), r = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, a = ve("container"), i = ve("bar"), l = ve("leftResizeHandle"), u = ve("rightResizeHandle"), c = ve("leftConnectionHandle"), v = ve("rightConnectionHandle"), { width: x } = Pe(a), { left: w, right: E } = Pe(i), h = R(e.start), f = R(e.end || h.value + e.colspan), m = R(!1), M = R(!1), k = R(!1), I = R(!1), D = R(!1), T = R({ startX: 0, startY: 0, endX: 0, endY: 0 }), V = A(() => Oe.value || we.value || fe.value), U = A(() => e.colspan > 0 ? x.value / e.colspan : 0), me = A(() => {
999
999
  const _ = h.value / e.colspan * 100, F = f.value / e.colspan * 100;
1000
1000
  return {
1001
1001
  left: `${_}%`,
@@ -1125,7 +1125,7 @@ const vo = (e) => {
1125
1125
  colIndex: e.colIndex,
1126
1126
  side: "right",
1127
1127
  position: { x: le, y: oe },
1128
- visible: I,
1128
+ visible: M,
1129
1129
  barId: r
1130
1130
  }));
1131
1131
  }
@@ -1133,13 +1133,13 @@ const vo = (e) => {
1133
1133
  e.store.unregisterGanttBar(r), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${r}-connection-left`), e.store.unregisterConnectionHandle(`${r}-connection-right`));
1134
1134
  }
1135
1135
  function K() {
1136
- e.store.isDependencyGraphEnabled && (m.value = !0, I.value = !0);
1136
+ e.store.isDependencyGraphEnabled && (m.value = !0, M.value = !0);
1137
1137
  }
1138
1138
  function Y() {
1139
- !k.value && !C.value && (m.value = !1, I.value = !1);
1139
+ !k.value && !I.value && (m.value = !1, M.value = !1);
1140
1140
  }
1141
1141
  function re(_, F) {
1142
- F.preventDefault(), F.stopPropagation(), D.value = !0, _ === "left" ? k.value = !0 : C.value = !0;
1142
+ F.preventDefault(), F.stopPropagation(), D.value = !0, _ === "left" ? k.value = !0 : I.value = !0;
1143
1143
  const q = _ === "left" ? c.value : v.value;
1144
1144
  if (q) {
1145
1145
  const oe = q.getBoundingClientRect(), ie = oe.left + oe.width / 2, ce = oe.top + oe.height / 2;
@@ -1166,7 +1166,7 @@ const vo = (e) => {
1166
1166
  }
1167
1167
  }
1168
1168
  function He(_, F) {
1169
- D.value = !1, k.value = !1, C.value = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", F), i.value?.matches(":hover") || Y();
1169
+ D.value = !1, k.value = !1, I.value = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", F), i.value?.matches(":hover") || Y();
1170
1170
  }
1171
1171
  return t({
1172
1172
  barStyle: me,
@@ -1175,8 +1175,8 @@ const vo = (e) => {
1175
1175
  handleConnectionDrop: Ee,
1176
1176
  isLeftConnectionDragging: k,
1177
1177
  isLeftConnectionVisible: m,
1178
- isRightConnectionDragging: C,
1179
- isRightConnectionVisible: I,
1178
+ isRightConnectionDragging: I,
1179
+ isRightConnectionVisible: M,
1180
1180
  showDragPreview: D
1181
1181
  }), (_, F) => (g(), b("td", {
1182
1182
  class: "aganttcell",
@@ -1203,7 +1203,7 @@ const vo = (e) => {
1203
1203
  e.store.isDependencyGraphEnabled ? (g(), b("div", {
1204
1204
  key: 1,
1205
1205
  ref: "rightConnectionHandle",
1206
- class: ae(["connection-handle right-connection-handle", { visible: I.value, "is-dragging": C.value }]),
1206
+ class: ae(["connection-handle right-connection-handle", { visible: M.value, "is-dragging": I.value }]),
1207
1207
  onMousedown: F[1] || (F[1] = he((q) => re("right", q), ["stop"]))
1208
1208
  }, [...F[3] || (F[3] = [
1209
1209
  y("div", { class: "connection-dot" }, null, -1)
@@ -1316,12 +1316,12 @@ const vo = (e) => {
1316
1316
  insertBelow: "Insert Below",
1317
1317
  move: "Move Row"
1318
1318
  }, v = A(() => {
1319
- const m = [], I = o.config.actions || {}, k = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1320
- for (const C of k) {
1321
- const D = I[C];
1319
+ const m = [], M = o.config.actions || {}, k = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1320
+ for (const I of k) {
1321
+ const D = M[I];
1322
1322
  if (D === !1 || D === void 0) continue;
1323
- let T = !0, V = c[C], U = Po[C];
1324
- typeof D == "object" && (T = D.enabled !== !1, V = D.label || V, U = D.icon || U), T && m.push({ type: C, label: V, icon: U });
1323
+ let T = !0, V = c[I], U = Po[I];
1324
+ typeof D == "object" && (T = D.enabled !== !1, V = D.label || V, U = D.icon || U), T && m.push({ type: I, label: V, icon: U });
1325
1325
  }
1326
1326
  return m;
1327
1327
  }), x = A(() => {
@@ -1339,15 +1339,15 @@ const vo = (e) => {
1339
1339
  left: `${u.value.left}px`
1340
1340
  } : {});
1341
1341
  ct(s, (m) => {
1342
- const I = m[0];
1343
- I && (a.value = I.contentRect.width);
1342
+ const M = m[0];
1343
+ M && (a.value = M.contentRect.width);
1344
1344
  });
1345
1345
  const E = () => {
1346
1346
  i.value || h(), i.value = !i.value;
1347
1347
  }, h = () => {
1348
1348
  if (!r.value) return;
1349
- const m = r.value.getBoundingClientRect(), I = window.innerHeight, k = v.value.length * 40 + 16, C = I - m.bottom, D = m.top;
1350
- l.value = C < k && D > k, l.value ? u.value = {
1349
+ const m = r.value.getBoundingClientRect(), M = window.innerHeight, k = v.value.length * 40 + 16, I = M - m.bottom, D = m.top;
1350
+ l.value = I < k && D > k, l.value ? u.value = {
1351
1351
  top: m.top,
1352
1352
  left: m.left
1353
1353
  } : u.value = {
@@ -1360,10 +1360,10 @@ const vo = (e) => {
1360
1360
  });
1361
1361
  const f = (m) => {
1362
1362
  i.value = !1;
1363
- const I = o.config.actions?.[m];
1364
- typeof I == "object" && I.handler && I.handler(o.rowIndex, o.store) === !1 || n("action", m, o.rowIndex);
1363
+ const M = o.config.actions?.[m];
1364
+ typeof M == "object" && M.handler && M.handler(o.rowIndex, o.store) === !1 || n("action", m, o.rowIndex);
1365
1365
  };
1366
- return (m, I) => (g(), b("td", {
1366
+ return (m, M) => (g(), b("td", {
1367
1367
  ref: "actionsCell",
1368
1368
  class: ae(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": i.value }])
1369
1369
  }, [
@@ -1375,7 +1375,7 @@ const vo = (e) => {
1375
1375
  "aria-expanded": i.value,
1376
1376
  "aria-haspopup": "true",
1377
1377
  onClick: he(E, ["stop"])
1378
- }, [...I[0] || (I[0] = [
1378
+ }, [...M[0] || (M[0] = [
1379
1379
  y("span", { class: "dropdown-icon" }, "⋮", -1)
1380
1380
  ])], 8, Fo),
1381
1381
  J(y("div", {
@@ -1388,7 +1388,7 @@ const vo = (e) => {
1388
1388
  type: "button",
1389
1389
  class: "row-action-menu-item",
1390
1390
  role: "menuitem",
1391
- onClick: he((C) => f(k.type), ["stop"])
1391
+ onClick: he((I) => f(k.type), ["stop"])
1392
1392
  }, [
1393
1393
  y("span", {
1394
1394
  class: "action-icon",
@@ -1406,7 +1406,7 @@ const vo = (e) => {
1406
1406
  class: "row-action-btn",
1407
1407
  title: k.label,
1408
1408
  "aria-label": k.label,
1409
- onClick: he((C) => f(k.type), ["stop"])
1409
+ onClick: he((I) => f(k.type), ["stop"])
1410
1410
  }, [
1411
1411
  y("span", {
1412
1412
  class: "action-icon",
@@ -1544,7 +1544,7 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
1544
1544
  (V) => V.barId === a.to.barId && V.side === a.to.side
1545
1545
  );
1546
1546
  if (!i || !l) return "";
1547
- const u = i.position.x + lt / 2, c = i.position.y + lt / 2, v = l.position.x + lt / 2, x = l.position.y + lt / 2, w = Math.abs(v - u), E = Math.max(w * tl, 50), h = u + (a.from.side === "left" ? -E : E), f = v + (a.to.side === "left" ? -E : E), m = { x: 0.5 * u + 0.5 * h, y: 0.5 * c + 0.5 * c }, I = { x: 0.5 * h + 0.5 * f, y: 0.5 * c + 0.5 * x }, k = { x: 0.5 * f + 0.5 * v, y: 0.5 * x + 0.5 * x }, C = { x: 0.5 * m.x + 0.5 * I.x, y: 0.5 * m.y + 0.5 * I.y }, D = { x: 0.5 * I.x + 0.5 * k.x, y: 0.5 * I.y + 0.5 * k.y }, T = { x: 0.5 * C.x + 0.5 * D.x, y: 0.5 * C.y + 0.5 * D.y };
1547
+ const u = i.position.x + lt / 2, c = i.position.y + lt / 2, v = l.position.x + lt / 2, x = l.position.y + lt / 2, w = Math.abs(v - u), E = Math.max(w * tl, 50), h = u + (a.from.side === "left" ? -E : E), f = v + (a.to.side === "left" ? -E : E), m = { x: 0.5 * u + 0.5 * h, y: 0.5 * c + 0.5 * c }, M = { x: 0.5 * h + 0.5 * f, y: 0.5 * c + 0.5 * x }, k = { x: 0.5 * f + 0.5 * v, y: 0.5 * x + 0.5 * x }, I = { x: 0.5 * m.x + 0.5 * M.x, y: 0.5 * m.y + 0.5 * M.y }, D = { x: 0.5 * M.x + 0.5 * k.x, y: 0.5 * M.y + 0.5 * k.y }, T = { x: 0.5 * I.x + 0.5 * D.x, y: 0.5 * I.y + 0.5 * D.y };
1548
1548
  return `M ${u} ${c} Q ${h} ${c}, ${T.x} ${T.y} Q ${f} ${x}, ${v} ${x}`;
1549
1549
  }, r = (a) => {
1550
1550
  e.store.deleteConnection(a.id) && o("connection:delete", a);
@@ -1873,9 +1873,9 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
1873
1873
  const B = s.value[S];
1874
1874
  B.parent !== null && B.parent !== void 0 && p.add(B.parent);
1875
1875
  }
1876
- const M = (S) => s.value[S]?.gantt !== void 0, P = (S) => {
1876
+ const C = (S) => s.value[S]?.gantt !== void 0, P = (S) => {
1877
1877
  for (let B = 0; B < s.value.length; B++)
1878
- if (s.value[B].parent === S && (M(B) || P(B)))
1878
+ if (s.value[B].parent === S && (C(B) || P(B)))
1879
1879
  return !0;
1880
1880
  return !1;
1881
1881
  }, N = (S) => {
@@ -1911,9 +1911,9 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
1911
1911
  return d;
1912
1912
  }, n = R(e.columns), s = R(e.rows), r = R(e.config || {}), a = R({}), i = R({}), l = A(() => {
1913
1913
  const d = {};
1914
- for (const [p, M] of n.value.entries())
1914
+ for (const [p, C] of n.value.entries())
1915
1915
  for (const [P, N] of s.value.entries())
1916
- d[`${p}:${P}`] = N[M.name];
1916
+ d[`${p}:${P}`] = N[C.name];
1917
1917
  return d;
1918
1918
  }), u = A({
1919
1919
  get: () => {
@@ -1921,15 +1921,15 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
1921
1921
  for (let p = 0; p < d.length; p++)
1922
1922
  a.value[p] && (d[p].rowModified = a.value[p]), i.value[p] && (i.value[p].childrenOpen !== void 0 && (d[p].childrenOpen = i.value[p].childrenOpen), i.value[p].expanded !== void 0 && (d[p].expanded = i.value[p].expanded));
1923
1923
  if (k.value) {
1924
- const p = (M, P) => {
1925
- const N = P[M];
1924
+ const p = (C, P) => {
1925
+ const N = P[C];
1926
1926
  if (N.isRoot || N.parent === null || N.parent === void 0)
1927
1927
  return !0;
1928
1928
  const S = N.parent;
1929
1929
  return S < 0 || S >= P.length ? !1 : (P[S].childrenOpen || !1) && p(S, P);
1930
1930
  };
1931
- for (let M = 0; M < d.length; M++)
1932
- d[M].isRoot || (d[M].open = p(M, d));
1931
+ for (let C = 0; C < d.length; C++)
1932
+ d[C].isRoot || (d[C].open = p(C, d));
1933
1933
  }
1934
1934
  return d;
1935
1935
  },
@@ -1939,54 +1939,54 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
1939
1939
  }), c = R(e.modal || { visible: !1 }), v = R({}), x = R([]), w = R([]), E = R([]), h = R({
1940
1940
  column: null,
1941
1941
  direction: null
1942
- }), f = R({}), m = A(() => n.value.some((d) => d.pinned)), I = A(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), k = A(() => r.value.view === "tree" || r.value.view === "tree-gantt"), C = A(() => {
1942
+ }), f = R({}), m = A(() => n.value.some((d) => d.pinned)), M = A(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), k = A(() => r.value.view === "tree" || r.value.view === "tree-gantt"), I = A(() => {
1943
1943
  const d = r.value;
1944
1944
  return d.view === "gantt" || d.view === "tree-gantt" ? d.dependencyGraph !== !1 : !0;
1945
1945
  }), D = A(() => `${Math.ceil(s.value.length / 100 + 1)}ch`), T = A(
1946
1946
  () => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
1947
1947
  ), V = A(() => {
1948
- let d = s.value.map((p, M) => ({
1948
+ let d = s.value.map((p, C) => ({
1949
1949
  ...p,
1950
- originalIndex: M
1950
+ originalIndex: C
1951
1951
  }));
1952
- if (Object.entries(f.value).forEach(([p, M]) => {
1952
+ if (Object.entries(f.value).forEach(([p, C]) => {
1953
1953
  const P = parseInt(p), N = n.value[P];
1954
- !N || !(M.value || M.startValue || M.endValue || N.filterType === "checkbox" && M.value !== void 0) || (d = d.filter((S) => {
1954
+ !N || !(C.value || C.startValue || C.endValue || N.filterType === "checkbox" && C.value !== void 0) || (d = d.filter((S) => {
1955
1955
  const B = S[N.name];
1956
- return le(B, M, N);
1956
+ return le(B, C, N);
1957
1957
  }));
1958
1958
  }), h.value.column !== null && h.value.direction) {
1959
- const p = n.value[h.value.column], M = h.value.direction;
1959
+ const p = n.value[h.value.column], C = h.value.direction;
1960
1960
  d.sort((P, N) => {
1961
1961
  let S = P[p.name], B = N[p.name];
1962
1962
  S == null && (S = ""), B == null && (B = "");
1963
1963
  const W = Number(S), se = Number(B);
1964
1964
  if (!isNaN(W) && !isNaN(se) && S !== "" && B !== "")
1965
- return M === "asc" ? W - se : se - W;
1965
+ return C === "asc" ? W - se : se - W;
1966
1966
  {
1967
1967
  const tt = String(S).toLowerCase(), Wt = String(B).toLowerCase();
1968
- return M === "asc" ? tt.localeCompare(Wt) : Wt.localeCompare(tt);
1968
+ return C === "asc" ? tt.localeCompare(Wt) : Wt.localeCompare(tt);
1969
1969
  }
1970
1970
  });
1971
1971
  }
1972
1972
  return d;
1973
- }), U = (d, p) => l.value[`${d}:${p}`], me = (d, p, M) => {
1973
+ }), U = (d, p) => l.value[`${d}:${p}`], me = (d, p, C) => {
1974
1974
  const P = `${d}:${p}`, N = n.value[d];
1975
- l.value[P] !== M && (a.value[p] = !0), l.value[P] = M, s.value[p] = {
1975
+ l.value[P] !== C && (a.value[p] = !0), l.value[P] = C, s.value[p] = {
1976
1976
  ...s.value[p],
1977
- [N.name]: M
1977
+ [N.name]: C
1978
1978
  };
1979
1979
  }, Q = (d) => {
1980
1980
  s.value = d;
1981
- }, j = (d, p, M) => {
1981
+ }, j = (d, p, C) => {
1982
1982
  const P = `${d}:${p}`;
1983
- l.value[P] !== M && (a.value[p] = !0, v.value[P] = M);
1983
+ l.value[P] !== C && (a.value[p] = !0, v.value[P] = C);
1984
1984
  }, we = (d) => {
1985
- const p = n.value.indexOf(d) === n.value.length - 1, M = r.value.fullWidth ? d.resizable && !p : d.resizable;
1985
+ const p = n.value.indexOf(d) === n.value.length - 1, C = r.value.fullWidth ? d.resizable && !p : d.resizable;
1986
1986
  return {
1987
1987
  width: d.width || "40ch",
1988
1988
  textAlign: d.align || "center",
1989
- ...M && {
1989
+ ...C && {
1990
1990
  resize: "horizontal",
1991
1991
  overflow: "hidden",
1992
1992
  whiteSpace: "nowrap"
@@ -1994,72 +1994,72 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
1994
1994
  };
1995
1995
  }, fe = (d, p) => {
1996
1996
  if (d < 0 || d >= n.value.length) return;
1997
- const M = Math.max(p, 40);
1997
+ const C = Math.max(p, 40);
1998
1998
  n.value[d] = {
1999
1999
  ...n.value[d],
2000
- width: `${M}px`
2000
+ width: `${C}px`
2001
2001
  };
2002
2002
  }, Oe = (d) => {
2003
2003
  const p = s.value[d];
2004
- return I.value && p.gantt !== void 0;
2004
+ return M.value && p.gantt !== void 0;
2005
2005
  }, Le = (d) => !k.value || u.value[d].isRoot || u.value[d].open, Ye = (d) => !k.value && r.value.view !== "list-expansion" ? "" : k.value && (u.value[d].isRoot || u.value[d].isParent) ? u.value[d].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? u.value[d].expanded ? "▼" : "►" : "", Xe = (d) => {
2006
2006
  if (k.value) {
2007
- const p = i.value[d] || {}, M = !(p.childrenOpen ?? u.value[d].childrenOpen);
2007
+ const p = i.value[d] || {}, C = !(p.childrenOpen ?? u.value[d].childrenOpen);
2008
2008
  i.value[d] = {
2009
2009
  ...p,
2010
- childrenOpen: M
2011
- }, M || Ze(d);
2010
+ childrenOpen: C
2011
+ }, C || Ze(d);
2012
2012
  } else if (r.value.view === "list-expansion") {
2013
- const p = i.value[d] || {}, M = p.expanded ?? u.value[d].expanded;
2013
+ const p = i.value[d] || {}, C = p.expanded ?? u.value[d].expanded;
2014
2014
  i.value[d] = {
2015
2015
  ...p,
2016
- expanded: !M
2016
+ expanded: !C
2017
2017
  };
2018
2018
  }
2019
2019
  }, Ze = (d) => {
2020
2020
  for (let p = 0; p < s.value.length; p++)
2021
2021
  if (u.value[p].parent === d) {
2022
- const M = i.value[p] || {};
2022
+ const C = i.value[p] || {};
2023
2023
  i.value[p] = {
2024
- ...M,
2024
+ ...C,
2025
2025
  childrenOpen: !1
2026
2026
  }, Ze(p);
2027
2027
  }
2028
2028
  }, Je = (d, p) => {
2029
- const M = U(d, p);
2030
- return Ne(d, p, M);
2031
- }, Ne = (d, p, M) => {
2029
+ const C = U(d, p);
2030
+ return Ne(d, p, C);
2031
+ }, Ne = (d, p, C) => {
2032
2032
  const P = n.value[d], N = s.value[p], S = P.format;
2033
2033
  if (!S)
2034
2034
  switch (P.fieldtype) {
2035
2035
  case "Check":
2036
- return M ? "✓" : "✗";
2036
+ return C ? "✓" : "✗";
2037
2037
  case "Date":
2038
- return M != null ? new Date(M).toLocaleDateString() : M;
2038
+ return C != null ? new Date(C).toLocaleDateString() : C;
2039
2039
  case "Datetime":
2040
- return M != null ? new Date(M).toLocaleString() : M;
2040
+ return C != null ? new Date(C).toLocaleString() : C;
2041
2041
  default:
2042
- return M;
2042
+ return C;
2043
2043
  }
2044
- return typeof S == "function" ? S(M, { table: l.value, row: N, column: P }) : typeof S == "string" ? Function(`"use strict";return (${S})`)()(M, { table: l.value, row: N, column: P }) : M;
2044
+ return typeof S == "function" ? S(C, { table: l.value, row: N, column: P }) : typeof S == "string" ? Function(`"use strict";return (${S})`)()(C, { table: l.value, row: N, column: P }) : C;
2045
2045
  }, L = (d) => {
2046
2046
  d.target instanceof Node && c.value.parent?.contains(d.target) || c.value.visible && (c.value.visible = !1);
2047
2047
  }, O = (d, p) => p && d === 0 && p > 0 ? `${p}ch` : "inherit", G = (d) => {
2048
2048
  const p = s.value[d.rowIndex]?.gantt;
2049
2049
  p && (d.type === "resize" ? d.edge === "start" ? (p.startIndex = d.newStart, p.endIndex = d.end, p.colspan = p.endIndex - p.startIndex) : d.edge === "end" && (p.startIndex = d.start, p.endIndex = d.newEnd, p.colspan = p.endIndex - p.startIndex) : d.type === "bar" && (p.startIndex = d.newStart, p.endIndex = d.newEnd, p.colspan = p.endIndex - p.startIndex));
2050
2050
  }, K = (d) => {
2051
- const p = x.value.findIndex((M) => M.id === d.id);
2051
+ const p = x.value.findIndex((C) => C.id === d.id);
2052
2052
  p >= 0 ? x.value[p] = d : x.value.push(d);
2053
2053
  }, Y = (d) => {
2054
- const p = x.value.findIndex((M) => M.id === d);
2054
+ const p = x.value.findIndex((C) => C.id === d);
2055
2055
  p >= 0 && x.value.splice(p, 1);
2056
2056
  }, re = (d) => {
2057
- const p = w.value.findIndex((M) => M.id === d.id);
2057
+ const p = w.value.findIndex((C) => C.id === d.id);
2058
2058
  p >= 0 ? w.value[p] = d : w.value.push(d);
2059
2059
  }, Ee = (d) => {
2060
- const p = w.value.findIndex((M) => M.id === d);
2060
+ const p = w.value.findIndex((C) => C.id === d);
2061
2061
  p >= 0 && w.value.splice(p, 1);
2062
- }, He = (d, p, M) => {
2062
+ }, He = (d, p, C) => {
2063
2063
  const P = w.value.find((B) => B.id === d), N = w.value.find((B) => B.id === p);
2064
2064
  if (!P || !N)
2065
2065
  return console.warn("Cannot create connection: handle not found"), null;
@@ -2073,19 +2073,19 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
2073
2073
  barId: N.barId,
2074
2074
  side: N.side
2075
2075
  },
2076
- style: M?.style,
2077
- label: M?.label
2076
+ style: C?.style,
2077
+ label: C?.label
2078
2078
  };
2079
2079
  return E.value.push(S), S;
2080
2080
  }, _ = (d) => {
2081
- const p = E.value.findIndex((M) => M.id === d);
2081
+ const p = E.value.findIndex((C) => C.id === d);
2082
2082
  return p >= 0 ? (E.value.splice(p, 1), !0) : !1;
2083
2083
  }, F = (d) => E.value.filter((p) => p.from.barId === d || p.to.barId === d), q = (d) => w.value.filter((p) => p.barId === d), ee = (d) => {
2084
2084
  if (n.value[d].sortable === !1) return;
2085
2085
  let p;
2086
2086
  h.value.column === d && h.value.direction === "asc" ? p = "desc" : p = "asc", h.value.column = d, h.value.direction = p;
2087
- }, le = (d, p, M) => {
2088
- const P = M.filterType || "text", N = p.value;
2087
+ }, le = (d, p, C) => {
2088
+ const P = C.filterType || "text", N = p.value;
2089
2089
  if (!N && P !== "dateRange" && P !== "checkbox") return !0;
2090
2090
  switch (P) {
2091
2091
  case "text":
@@ -2127,12 +2127,12 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
2127
2127
  }, ie = (d) => {
2128
2128
  delete f.value[d];
2129
2129
  }, ce = (d, p = "end") => {
2130
- const M = {};
2130
+ const C = {};
2131
2131
  for (const N of n.value)
2132
- M[N.name] = "";
2133
- d && Object.assign(M, d);
2132
+ C[N.name] = "";
2133
+ d && Object.assign(C, d);
2134
2134
  let P;
2135
- return p === "start" ? (P = 0, s.value.unshift(M)) : p === "end" ? (P = s.value.length, s.value.push(M)) : (P = Math.max(0, Math.min(p, s.value.length)), s.value.splice(P, 0, M)), P;
2135
+ return p === "start" ? (P = 0, s.value.unshift(C)) : p === "end" ? (P = s.value.length, s.value.push(C)) : (P = Math.max(0, Math.min(p, s.value.length)), s.value.splice(P, 0, C)), P;
2136
2136
  };
2137
2137
  return {
2138
2138
  // state
@@ -2151,9 +2151,9 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
2151
2151
  // getters
2152
2152
  filteredRows: V,
2153
2153
  hasPinnedColumns: m,
2154
- isGanttView: I,
2154
+ isGanttView: M,
2155
2155
  isTreeView: k,
2156
- isDependencyGraphEnabled: C,
2156
+ isDependencyGraphEnabled: I,
2157
2157
  numberedRowWidth: D,
2158
2158
  zeroColumn: T,
2159
2159
  // actions
@@ -2167,22 +2167,22 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
2167
2167
  return null;
2168
2168
  const [p] = s.value.splice(d, 1);
2169
2169
  delete a.value[d], delete i.value[d];
2170
- const M = {}, P = {};
2170
+ const C = {}, P = {};
2171
2171
  for (const [N, S] of Object.entries(a.value)) {
2172
2172
  const B = parseInt(N);
2173
- B > d ? M[B - 1] = S : M[B] = S;
2173
+ B > d ? C[B - 1] = S : C[B] = S;
2174
2174
  }
2175
2175
  for (const [N, S] of Object.entries(i.value)) {
2176
2176
  const B = parseInt(N);
2177
2177
  B > d ? P[B - 1] = S : P[B] = S;
2178
2178
  }
2179
- return a.value = M, i.value = P, p;
2179
+ return a.value = C, i.value = P, p;
2180
2180
  },
2181
2181
  duplicateRow: (d) => {
2182
2182
  if (d < 0 || d >= s.value.length)
2183
2183
  return -1;
2184
- const p = s.value[d], M = JSON.parse(JSON.stringify(p)), P = d + 1;
2185
- return s.value.splice(P, 0, M), P;
2184
+ const p = s.value[d], C = JSON.parse(JSON.stringify(p)), P = d + 1;
2185
+ return s.value.splice(P, 0, C), P;
2186
2186
  },
2187
2187
  getCellData: U,
2188
2188
  getCellDisplayValue: Je,
@@ -2193,20 +2193,20 @@ const Qo = { class: "gantt-connection-overlay" }, jo = {
2193
2193
  getIndent: O,
2194
2194
  getRowExpandSymbol: Ye,
2195
2195
  insertRowAbove: (d, p) => {
2196
- const M = Math.max(0, d);
2197
- return ce(p, M);
2196
+ const C = Math.max(0, d);
2197
+ return ce(p, C);
2198
2198
  },
2199
2199
  insertRowBelow: (d, p) => {
2200
- const M = Math.min(d + 1, s.value.length);
2201
- return ce(p, M);
2200
+ const C = Math.min(d + 1, s.value.length);
2201
+ return ce(p, C);
2202
2202
  },
2203
2203
  isRowGantt: Oe,
2204
2204
  isRowVisible: Le,
2205
2205
  moveRow: (d, p) => {
2206
2206
  if (d < 0 || d >= s.value.length || p < 0 || p >= s.value.length || d === p)
2207
2207
  return !1;
2208
- const [M] = s.value.splice(d, 1);
2209
- s.value.splice(p, 0, M);
2208
+ const [C] = s.value.splice(d, 1);
2209
+ s.value.splice(p, 0, C);
2210
2210
  const P = {}, N = {};
2211
2211
  for (const [S, B] of Object.entries(a.value)) {
2212
2212
  const W = parseInt(S);
@@ -2259,19 +2259,19 @@ const bl = {
2259
2259
  emits: /* @__PURE__ */ xe(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
2260
2260
  setup(e, { expose: t, emit: o }) {
2261
2261
  const n = Me(e, "rows"), s = Me(e, "columns"), r = o, a = ve("table"), i = s.value?.length ? s.value : yl(e.schema ?? []), l = wl({ columns: i, rows: n.value, id: e.id, config: e.config });
2262
- l.$onAction(({ name: h, store: f, args: m, after: I }) => {
2262
+ l.$onAction(({ name: h, store: f, args: m, after: M }) => {
2263
2263
  if (h === "setCellData" || h === "setCellText") {
2264
- const [k, C, D] = m, T = f.getCellData(k, C);
2265
- I(() => {
2266
- n.value = [...f.rows], r("cellUpdate", { colIndex: k, rowIndex: C, newValue: D, oldValue: T });
2264
+ const [k, I, D] = m, T = f.getCellData(k, I);
2265
+ M(() => {
2266
+ n.value = [...f.rows], r("cellUpdate", { colIndex: k, rowIndex: I, newValue: D, oldValue: T });
2267
2267
  });
2268
2268
  } else if (h === "updateGanttBar") {
2269
2269
  const [k] = m;
2270
- let C = !1;
2271
- k.type === "resize" ? C = k.oldColspan !== k.newColspan : k.type === "bar" && (C = k.oldStart !== k.newStart || k.oldEnd !== k.newEnd), C && I(() => {
2270
+ let I = !1;
2271
+ k.type === "resize" ? I = k.oldColspan !== k.newColspan : k.type === "bar" && (I = k.oldStart !== k.newStart || k.oldEnd !== k.newEnd), I && M(() => {
2272
2272
  r("gantt:drag", k);
2273
2273
  });
2274
- } else h === "resizeColumn" && I(() => {
2274
+ } else h === "resizeColumn" && M(() => {
2275
2275
  s.value = [...f.columns], r("columns:update", [...f.columns]);
2276
2276
  });
2277
2277
  }), te(
@@ -2290,16 +2290,16 @@ const bl = {
2290
2290
  s.value?.some((h) => h.pinned) && (c(), l.isTreeView && pn(a, c, { childList: !0, subtree: !0 }));
2291
2291
  });
2292
2292
  const u = A(() => l.columns.filter((h) => h.pinned).length), c = () => {
2293
- const h = a.value, f = h?.rows[0], m = h?.rows[1], I = f ? Array.from(f.cells) : [];
2294
- for (const [k, C] of I.entries()) {
2293
+ const h = a.value, f = h?.rows[0], m = h?.rows[1], M = f ? Array.from(f.cells) : [];
2294
+ for (const [k, I] of M.entries()) {
2295
2295
  const D = m?.cells[k];
2296
- D && (C.style.width = `${D.offsetWidth}px`);
2296
+ D && (I.style.width = `${D.offsetWidth}px`);
2297
2297
  }
2298
2298
  for (const k of h?.rows || []) {
2299
- let C = 0;
2299
+ let I = 0;
2300
2300
  const D = [];
2301
2301
  for (const T of k.cells)
2302
- (T.classList.contains("sticky-column") || T.classList.contains("sticky-index")) && (T.style.left = `${C}px`, C += T.offsetWidth, D.push(T));
2302
+ (T.classList.contains("sticky-column") || T.classList.contains("sticky-index")) && (T.style.left = `${I}px`, I += T.offsetWidth, D.push(T));
2303
2303
  D.length > 0 && D[D.length - 1].classList.add("sticky-column-edge");
2304
2304
  }
2305
2305
  };
@@ -2317,8 +2317,8 @@ const bl = {
2317
2317
  return l.columns;
2318
2318
  const f = [];
2319
2319
  for (let m = 0; m < u.value; m++) {
2320
- const I = { ...l.columns[m] };
2321
- I.originalIndex = m, f.push(I);
2320
+ const M = { ...l.columns[m] };
2321
+ M.originalIndex = m, f.push(M);
2322
2322
  }
2323
2323
  return f.push({
2324
2324
  ...l.columns[u.value],
@@ -2335,8 +2335,8 @@ const bl = {
2335
2335
  }, E = (h, f) => {
2336
2336
  switch (h) {
2337
2337
  case "add": {
2338
- const m = l.addRow({}, f + 1), I = l.rows[m];
2339
- n.value = [...l.rows], r("row:add", { rowIndex: m, row: I });
2338
+ const m = l.addRow({}, f + 1), M = l.rows[m];
2339
+ n.value = [...l.rows], r("row:add", { rowIndex: m, row: M });
2340
2340
  break;
2341
2341
  }
2342
2342
  case "delete": {
@@ -2347,19 +2347,19 @@ const bl = {
2347
2347
  case "duplicate": {
2348
2348
  const m = l.duplicateRow(f);
2349
2349
  if (m >= 0) {
2350
- const I = l.rows[m];
2351
- n.value = [...l.rows], r("row:duplicate", { sourceIndex: f, newIndex: m, row: I });
2350
+ const M = l.rows[m];
2351
+ n.value = [...l.rows], r("row:duplicate", { sourceIndex: f, newIndex: m, row: M });
2352
2352
  }
2353
2353
  break;
2354
2354
  }
2355
2355
  case "insertAbove": {
2356
- const m = l.insertRowAbove(f), I = l.rows[m];
2357
- n.value = [...l.rows], r("row:insert-above", { targetIndex: f, newIndex: m, row: I });
2356
+ const m = l.insertRowAbove(f), M = l.rows[m];
2357
+ n.value = [...l.rows], r("row:insert-above", { targetIndex: f, newIndex: m, row: M });
2358
2358
  break;
2359
2359
  }
2360
2360
  case "insertBelow": {
2361
- const m = l.insertRowBelow(f), I = l.rows[m];
2362
- n.value = [...l.rows], r("row:insert-below", { targetIndex: f, newIndex: m, row: I });
2361
+ const m = l.insertRowBelow(f), M = l.rows[m];
2362
+ n.value = [...l.rows], r("row:insert-below", { targetIndex: f, newIndex: m, row: M });
2363
2363
  break;
2364
2364
  }
2365
2365
  case "move": {
@@ -2397,15 +2397,15 @@ const bl = {
2397
2397
  ], !0),
2398
2398
  y("tbody", null, [
2399
2399
  ge(h.$slots, "body", { data: H(l) }, () => [
2400
- (g(!0), b(X, null, de(H(l).filteredRows, (m, I) => (g(), pe(mn, {
2401
- key: `${m.originalIndex}-${I}`,
2400
+ (g(!0), b(X, null, de(H(l).filteredRows, (m, M) => (g(), pe(mn, {
2401
+ key: `${m.originalIndex}-${M}`,
2402
2402
  row: m,
2403
2403
  "row-index": m.originalIndex,
2404
2404
  store: H(l),
2405
2405
  "onRow:action": E
2406
2406
  }, {
2407
2407
  default: $t(() => [
2408
- (g(!0), b(X, null, de(v(m), (k, C) => (g(), b(X, {
2408
+ (g(!0), b(X, null, de(v(m), (k, I) => (g(), b(X, {
2409
2409
  key: k.name
2410
2410
  }, [
2411
2411
  k.isGantt ? (g(), pe(Fe(k.ganttComponent || "AGanttCell"), {
@@ -2418,7 +2418,7 @@ const bl = {
2418
2418
  colspan: k.colspan,
2419
2419
  pinned: k.pinned,
2420
2420
  "row-index": m.originalIndex,
2421
- "col-index": k.originalIndex ?? C,
2421
+ "col-index": k.originalIndex ?? I,
2422
2422
  style: Ie({
2423
2423
  textAlign: k?.align || "center",
2424
2424
  minWidth: k?.width || "40ch",
@@ -2430,7 +2430,7 @@ const bl = {
2430
2430
  store: H(l),
2431
2431
  pinned: k.pinned,
2432
2432
  "row-index": m.originalIndex,
2433
- "col-index": C,
2433
+ "col-index": I,
2434
2434
  style: Ie({
2435
2435
  textAlign: k?.align || "center",
2436
2436
  width: H(l).config.fullWidth ? "auto" : null
@@ -2704,10 +2704,10 @@ function jt(e, t, o = {}) {
2704
2704
  } : Qe;
2705
2705
  let l = !0;
2706
2706
  const u = (f) => $(s).some((m) => {
2707
- if (typeof m == "string") return Array.from(n.document.querySelectorAll(m)).some((I) => I === f.target || f.composedPath().includes(I));
2707
+ if (typeof m == "string") return Array.from(n.document.querySelectorAll(m)).some((M) => M === f.target || f.composedPath().includes(M));
2708
2708
  {
2709
- const I = Ue(m);
2710
- return I && (f.target === I || f.composedPath().includes(I));
2709
+ const M = Ue(m);
2710
+ return M && (f.target === M || f.composedPath().includes(M));
2711
2711
  }
2712
2712
  });
2713
2713
  function c(f) {
@@ -2715,8 +2715,8 @@ function jt(e, t, o = {}) {
2715
2715
  return m && m.$.subTree.shapeFlag === 16;
2716
2716
  }
2717
2717
  function v(f, m) {
2718
- const I = $(f), k = I.$.subTree && I.$.subTree.children;
2719
- return k == null || !Array.isArray(k) ? !1 : k.some((C) => C.el === m.target || m.composedPath().includes(C.el));
2718
+ const M = $(f), k = M.$.subTree && M.$.subTree.children;
2719
+ return k == null || !Array.isArray(k) ? !1 : k.some((I) => I.el === m.target || m.composedPath().includes(I.el));
2720
2720
  }
2721
2721
  const x = (f) => {
2722
2722
  const m = Ue(e);
@@ -2745,8 +2745,8 @@ function jt(e, t, o = {}) {
2745
2745
  a && It(n, "blur", (f) => {
2746
2746
  setTimeout(() => {
2747
2747
  var m;
2748
- const I = Ue(e);
2749
- ((m = n.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !I?.contains(n.document.activeElement) && t(f);
2748
+ const M = Ue(e);
2749
+ ((m = n.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !M?.contains(n.document.activeElement) && t(f);
2750
2750
  }, 0);
2751
2751
  }, { passive: !0 })
2752
2752
  ].filter(Boolean), h = () => E.forEach((f) => f());
@@ -3384,13 +3384,13 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3384
3384
  if (k.length > 0)
3385
3385
  k[0].focus();
3386
3386
  else {
3387
- const C = document.getElementsByClassName("todaysDate");
3388
- C.length > 0 && C[0].focus();
3387
+ const I = document.getElementsByClassName("todaysDate");
3388
+ I.length > 0 && I[0].focus();
3389
3389
  }
3390
3390
  });
3391
3391
  const l = () => {
3392
3392
  a.value = [];
3393
- const k = new Date(r.value, s.value, 1), C = k.getDay(), D = k.setDate(k.getDate() - C);
3393
+ const k = new Date(r.value, s.value, 1), I = k.getDay(), D = k.setDate(k.getDate() - I);
3394
3394
  for (const T of Array(43).keys())
3395
3395
  a.value.push(D + T * 864e5);
3396
3396
  };
@@ -3400,12 +3400,12 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3400
3400
  }, x = () => {
3401
3401
  s.value == 11 ? (s.value = 0, c()) : s.value += 1;
3402
3402
  }, w = (k) => {
3403
- const C = /* @__PURE__ */ new Date();
3404
- if (s.value === C.getMonth())
3405
- return C.toDateString() === new Date(k).toDateString();
3406
- }, E = (k) => new Date(k).toDateString() === new Date(n.value).toDateString(), h = (k, C) => (k - 1) * an + C, f = (k, C) => a.value[h(k, C)], m = (k) => {
3403
+ const I = /* @__PURE__ */ new Date();
3404
+ if (s.value === I.getMonth())
3405
+ return I.toDateString() === new Date(k).toDateString();
3406
+ }, E = (k) => new Date(k).toDateString() === new Date(n.value).toDateString(), h = (k, I) => (k - 1) * an + I, f = (k, I) => a.value[h(k, I)], m = (k) => {
3407
3407
  o.value = n.value = new Date(a.value[k]);
3408
- }, I = A(() => new Date(r.value, s.value, 1).toLocaleDateString(void 0, {
3408
+ }, M = A(() => new Date(r.value, s.value, 1).toLocaleDateString(void 0, {
3409
3409
  year: "numeric",
3410
3410
  month: "long"
3411
3411
  }));
@@ -3425,7 +3425,7 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3425
3425
  }
3426
3426
  }
3427
3427
  }
3428
- ]), t({ currentMonth: s, currentYear: r, selectedDate: n }), (k, C) => e.mode === "display" || e.mode === "read" ? (g(), b(X, { key: 0 }, [
3428
+ ]), t({ currentMonth: s, currentYear: r, selectedDate: n }), (k, I) => e.mode === "display" || e.mode === "read" ? (g(), b(X, { key: 0 }, [
3429
3429
  y("span", Ba, Z(o.value ? new Date(o.value).toLocaleDateString() : ""), 1),
3430
3430
  e.label ? (g(), b("label", Pa, Z(e.label), 1)) : z("", !0)
3431
3431
  ], 64)) : (g(), b("div", _a, [
@@ -3437,14 +3437,14 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3437
3437
  tabindex: -1,
3438
3438
  onClick: v
3439
3439
  }, "<"),
3440
- y("th", Fa, Z(I.value), 1),
3440
+ y("th", Fa, Z(M.value), 1),
3441
3441
  y("td", {
3442
3442
  id: "next-month-btn",
3443
3443
  tabindex: -1,
3444
3444
  onClick: x
3445
3445
  }, ">")
3446
3446
  ]),
3447
- C[0] || (C[0] = y("tr", { class: "days-header" }, [
3447
+ I[0] || (I[0] = y("tr", { class: "days-header" }, [
3448
3448
  y("td", null, "M"),
3449
3449
  y("td", null, "T"),
3450
3450
  y("td", null, "W"),
@@ -3700,15 +3700,21 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3700
3700
  emits: ["update:modelValue"],
3701
3701
  setup(e) {
3702
3702
  const t = Me(e, "modelValue"), o = A(() => {
3703
- const C = t.value?.id;
3704
- return C != null && C !== "";
3703
+ const I = t.value?.id;
3704
+ return I != null && I !== "";
3705
3705
  }), n = A(() => o.value ? e.formatter ? e.formatter(t.value) : t.value.displayText ?? String(t.value.id) : "—"), s = R(o.value ? n.value : ""), r = R(!1), a = R(!1), i = R([]), l = R(null), u = Sn("aformLinkNavigator", null);
3706
3706
  te(
3707
+ () => t.value,
3708
+ (I) => {
3709
+ I != null && (typeof I == "string" || typeof I == "number") && (t.value = { id: I });
3710
+ },
3711
+ { immediate: !0 }
3712
+ ), te(
3707
3713
  () => t.value?.id,
3708
- async (C) => {
3709
- if (!(!C || t.value.displayText || !e.filterFunction))
3714
+ async (I) => {
3715
+ if (!(!I || t.value.displayText || !e.filterFunction))
3710
3716
  try {
3711
- const V = (await (typeof e.filterFunction == "string" ? At(e.filterFunction) : e.filterFunction)(String(C))).find((U) => String(U.id) === String(C));
3717
+ const V = (await (typeof e.filterFunction == "string" ? At(e.filterFunction) : e.filterFunction)(String(I))).find((U) => String(U.id) === String(I));
3712
3718
  V?.displayText && (s.value = V.displayText, t.value = { ...t.value, displayText: V.displayText });
3713
3719
  } catch {
3714
3720
  }
@@ -3717,12 +3723,12 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3717
3723
  );
3718
3724
  const c = () => {
3719
3725
  u && e.doctype && u.navigate(e.doctype, t.value.id);
3720
- }, v = async (C) => {
3726
+ }, v = async (I) => {
3721
3727
  if (!(!e.filterFunction || e.mode === "read")) {
3722
3728
  l.value = null, r.value = !0, e.isAsync && (a.value = !0);
3723
3729
  try {
3724
3730
  const D = typeof e.filterFunction == "string" ? At(e.filterFunction) : e.filterFunction;
3725
- i.value = await D(C) ?? [];
3731
+ i.value = await D(I) ?? [];
3726
3732
  } catch {
3727
3733
  i.value = [];
3728
3734
  } finally {
@@ -3733,17 +3739,17 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3733
3739
  r.value = !1, l.value = null, s.value = o.value ? n.value : "";
3734
3740
  }, w = () => {
3735
3741
  r.value && x();
3736
- }, E = () => v(s.value), h = () => v(s.value), f = (C) => {
3737
- t.value = C, s.value = C.displayText ?? String(C.id), r.value = !1, l.value = null;
3742
+ }, E = () => v(s.value), h = () => v(s.value), f = (I) => {
3743
+ t.value = I, s.value = I.displayText ?? String(I.id), r.value = !1, l.value = null;
3738
3744
  }, m = () => {
3739
- const C = i.value.length;
3740
- C && (l.value = l.value === null ? 0 : (l.value + 1) % C);
3741
- }, I = () => {
3745
+ const I = i.value.length;
3746
+ I && (l.value = l.value === null ? 0 : (l.value + 1) % I);
3747
+ }, M = () => {
3742
3748
  i.value.length && (l.value === null || l.value === 0 ? l.value = null : l.value -= 1);
3743
3749
  }, k = () => {
3744
3750
  l.value !== null && i.value[l.value] && f(i.value[l.value]);
3745
3751
  };
3746
- return (C, D) => (g(), b("div", ss, [
3752
+ return (I, D) => (g(), b("div", ss, [
3747
3753
  e.mode === "display" ? (g(), b("span", rs, Z(n.value), 1)) : (g(), b(X, { key: 1 }, [
3748
3754
  J((g(), b("div", is, [
3749
3755
  y("div", us, [
@@ -3756,7 +3762,7 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3756
3762
  onFocus: E,
3757
3763
  onKeydown: [
3758
3764
  ye(he(m, ["prevent"]), ["down"]),
3759
- ye(he(I, ["prevent"]), ["up"]),
3765
+ ye(he(M, ["prevent"]), ["up"]),
3760
3766
  ye(he(k, ["prevent"]), ["enter"]),
3761
3767
  ye(x, ["esc"]),
3762
3768
  ye(x, ["tab"])
@@ -3788,7 +3794,7 @@ const Ba = { class: "aform_display-value" }, Pa = { key: 0 }, _a = {
3788
3794
  ], 64))
3789
3795
  ]));
3790
3796
  }
3791
- }), gs = /* @__PURE__ */ Ce(hs, [["__scopeId", "data-v-8801750a"]]), ws = { class: "aform_form-element" }, ys = { class: "aform_display-value" }, bs = { class: "aform_field-label" }, xs = ["id", "disabled", "required"], ks = ["for"], Is = ["innerHTML"], Ms = /* @__PURE__ */ ne({
3797
+ }), gs = /* @__PURE__ */ Ce(hs, [["__scopeId", "data-v-08459d90"]]), ws = { class: "aform_form-element" }, ys = { class: "aform_display-value" }, bs = { class: "aform_field-label" }, xs = ["id", "disabled", "required"], ks = ["for"], Is = ["innerHTML"], Ms = /* @__PURE__ */ ne({
3792
3798
  __name: "ANumericInput",
3793
3799
  props: /* @__PURE__ */ xe({
3794
3800
  schema: {},