@johnhalazonetis/data-table 1.25.0 → 1.25.2

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.
@@ -1,13 +1,13 @@
1
- import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createStaticVNode as c, createTextVNode as l, createVNode as u, inject as d, isRef as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onMounted as _, onUnmounted as v, openBlock as y, provide as b, ref as x, renderList as S, toDisplayString as C, toValue as w, unref as T, useTemplateRef as E, vModelSelect as D, vModelText as O, watch as k, watchEffect as A, withCtx as j, withDirectives as ee, withModifiers as M } from "vue";
2
- import { FlexRender as N, getCoreRowModel as P, getFilteredRowModel as te, getPaginationRowModel as F, getSortedRowModel as I, useVueTable as L } from "@tanstack/vue-table";
3
- import { onClickOutside as R } from "@vueuse/core";
4
- import { useVirtualizer as z } from "@tanstack/vue-virtual";
1
+ import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createStaticVNode as c, createTextVNode as l, createVNode as u, inject as d, isRef as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onMounted as _, onUnmounted as v, openBlock as y, provide as b, ref as x, renderList as S, toDisplayString as C, toValue as w, unref as T, useTemplateRef as E, vModelSelect as D, vModelText as O, watch as k, watchEffect as A, withCtx as j, withDirectives as M, withModifiers as N } from "vue";
2
+ import { FlexRender as P, getCoreRowModel as F, getFilteredRowModel as ee, getPaginationRowModel as I, getSortedRowModel as L, useVueTable as R } from "@tanstack/vue-table";
3
+ import { onClickOutside as z } from "@vueuse/core";
4
+ import { useVirtualizer as B } from "@tanstack/vue-virtual";
5
5
  //#region \0plugin-vue:export-helper
6
- var B = (e, t) => {
6
+ var V = (e, t) => {
7
7
  let n = e.__vccOpts || e;
8
8
  for (let [e, r] of t) n[e] = r;
9
9
  return n;
10
- }, V = { class: "p-3" }, H = {
10
+ }, H = { class: "p-3" }, te = {
11
11
  key: 0,
12
12
  class: "text-center py-4",
13
13
  style: { color: "var(--st-text-tertiary)" }
@@ -48,7 +48,7 @@ var B = (e, t) => {
48
48
  }, pe = ["onClick"], me = {
49
49
  class: "px-3 py-2 flex items-center justify-end gap-2",
50
50
  style: { borderTop: "1px solid var(--st-border-secondary)" }
51
- }, he = /* @__PURE__ */ B({
51
+ }, he = /* @__PURE__ */ V({
52
52
  __name: "SortPanel",
53
53
  props: {
54
54
  table: {
@@ -127,19 +127,19 @@ var B = (e, t) => {
127
127
  }
128
128
  return -1;
129
129
  }
130
- let N = x(null), P = x(null);
131
- function te(e) {
132
- N.value = e;
130
+ let P = x(null), F = x(null);
131
+ function ee(e) {
132
+ P.value = e;
133
133
  }
134
- function F(e, t) {
135
- e.preventDefault(), P.value = t;
134
+ function I(e, t) {
135
+ e.preventDefault(), F.value = t;
136
136
  }
137
- function I() {
138
- if (N.value !== null && P.value !== null && N.value !== P.value) {
139
- let e = [...h.value], [t] = e.splice(N.value, 1);
140
- e.splice(P.value, 0, t), h.value = e;
137
+ function L() {
138
+ if (P.value !== null && F.value !== null && P.value !== F.value) {
139
+ let e = [...h.value], [t] = e.splice(P.value, 1);
140
+ e.splice(F.value, 0, t), h.value = e;
141
141
  }
142
- N.value = null, P.value = null;
142
+ P.value = null, F.value = null;
143
143
  }
144
144
  return (n, r) => (y(), o("div", {
145
145
  class: "absolute top-full right-0 mt-1 w-96 rounded shadow-xl z-50 text-[13px]",
@@ -147,22 +147,22 @@ var B = (e, t) => {
147
147
  backgroundColor: "var(--st-bg-surface)",
148
148
  border: "1px solid var(--st-border-secondary)"
149
149
  },
150
- onClick: r[2] ||= M(() => {}, ["stop"])
151
- }, [s("div", V, [
152
- h.value.length === 0 ? (y(), o("div", H, [...r[3] ||= [s("p", { class: "mb-1" }, "No sorts applied to this view", -1), s("p", { class: "text-xs" }, "Add a column below to sort the view", -1)]])) : a("", !0),
150
+ onClick: r[2] ||= N(() => {}, ["stop"])
151
+ }, [s("div", H, [
152
+ h.value.length === 0 ? (y(), o("div", te, [...r[3] ||= [s("p", { class: "mb-1" }, "No sorts applied to this view", -1), s("p", { class: "text-xs" }, "Add a column below to sort the view", -1)]])) : a("", !0),
153
153
  p.value ? (y(), o("div", ne, C(t.tableName), 1)) : a("", !0),
154
154
  (y(!0), o(e, null, S(O.value, (n, i) => (y(), o("div", {
155
155
  key: "p-" + i,
156
156
  class: "flex items-center gap-2 mb-2 rounded px-1 -mx-1 transition-colors",
157
- style: g(P.value === j("parent", i) && N.value !== j("parent", i) ? { backgroundColor: "var(--st-bg-menu-hover)" } : {}),
157
+ style: g(F.value === j("parent", i) && P.value !== j("parent", i) ? { backgroundColor: "var(--st-bg-menu-hover)" } : {}),
158
158
  draggable: "true",
159
- onDragstart: (e) => te(j("parent", i)),
160
- onDragover: (e) => F(e, j("parent", i)),
161
- onDragend: I
159
+ onDragstart: (e) => ee(j("parent", i)),
160
+ onDragover: (e) => I(e, j("parent", i)),
161
+ onDragend: L
162
162
  }, [
163
163
  r[5] ||= c("<span class=\"cursor-grab active:cursor-grabbing shrink-0 flex items-center\" style=\"color:var(--st-text-placeholder);\" data-v-f1143526><svg class=\"w-3.5 h-3.5\" viewBox=\"0 0 16 16\" fill=\"currentColor\" data-v-f1143526><circle cx=\"5.5\" cy=\"4\" r=\"1\" data-v-f1143526></circle><circle cx=\"10.5\" cy=\"4\" r=\"1\" data-v-f1143526></circle><circle cx=\"5.5\" cy=\"8\" r=\"1\" data-v-f1143526></circle><circle cx=\"10.5\" cy=\"8\" r=\"1\" data-v-f1143526></circle><circle cx=\"5.5\" cy=\"12\" r=\"1\" data-v-f1143526></circle><circle cx=\"10.5\" cy=\"12\" r=\"1\" data-v-f1143526></circle></svg></span>", 1),
164
164
  s("span", W, C(i === 0 ? "sort by" : "then by"), 1),
165
- ee(s("select", {
165
+ M(s("select", {
166
166
  "onUpdate:modelValue": (e) => n.id = e,
167
167
  class: "sort-select flex-1 rounded py-1 text-[13px] outline-none min-w-0",
168
168
  style: {
@@ -216,15 +216,15 @@ var B = (e, t) => {
216
216
  (y(!0), o(e, null, S(A.value, (n, i) => (y(), o("div", {
217
217
  key: "s-" + i,
218
218
  class: "flex items-center gap-2 mb-2 rounded px-1 -mx-1 transition-colors",
219
- style: g(P.value === j("sub", i) && N.value !== j("sub", i) ? { backgroundColor: "var(--st-bg-menu-hover)" } : {}),
219
+ style: g(F.value === j("sub", i) && P.value !== j("sub", i) ? { backgroundColor: "var(--st-bg-menu-hover)" } : {}),
220
220
  draggable: "true",
221
- onDragstart: (e) => te(j("sub", i)),
222
- onDragover: (e) => F(e, j("sub", i)),
223
- onDragend: I
221
+ onDragstart: (e) => ee(j("sub", i)),
222
+ onDragover: (e) => I(e, j("sub", i)),
223
+ onDragend: L
224
224
  }, [
225
225
  r[7] ||= c("<span class=\"cursor-grab active:cursor-grabbing shrink-0 flex items-center\" style=\"color:var(--st-text-placeholder);\" data-v-f1143526><svg class=\"w-3.5 h-3.5\" viewBox=\"0 0 16 16\" fill=\"currentColor\" data-v-f1143526><circle cx=\"5.5\" cy=\"4\" r=\"1\" data-v-f1143526></circle><circle cx=\"10.5\" cy=\"4\" r=\"1\" data-v-f1143526></circle><circle cx=\"5.5\" cy=\"8\" r=\"1\" data-v-f1143526></circle><circle cx=\"10.5\" cy=\"8\" r=\"1\" data-v-f1143526></circle><circle cx=\"5.5\" cy=\"12\" r=\"1\" data-v-f1143526></circle><circle cx=\"10.5\" cy=\"12\" r=\"1\" data-v-f1143526></circle></svg></span>", 1),
226
226
  s("span", se, C(i === 0 ? "sort by" : "then by"), 1),
227
- ee(s("select", {
227
+ M(s("select", {
228
228
  "onUpdate:modelValue": (e) => n.id = e,
229
229
  class: "sort-select flex-1 rounded py-1 text-[13px] outline-none min-w-0",
230
230
  style: {
@@ -400,7 +400,7 @@ var B = (e, t) => {
400
400
  class: "flex items-center justify-center w-4 h-4 rounded transition-colors shrink-0",
401
401
  style: g({ color: p.value ? "var(--st-accent)" : "var(--st-text-placeholder)" }),
402
402
  title: "Pick date/time",
403
- onClick: M(C, ["stop"])
403
+ onClick: N(C, ["stop"])
404
404
  }, [_.value === "time" ? (y(), o("svg", ye, [...n[1] ||= [s("path", { d: "M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zm7-3.25a.75.75 0 00-1.5 0v3.5c0 .27.144.518.378.651l2.5 1.5a.75.75 0 10.744-1.302L8.5 7.742V4.75z" }, null, -1)]])) : (y(), o("svg", be, [...n[2] ||= [s("path", { d: "M4.75 0a.75.75 0 01.75.75V2h5V.75a.75.75 0 011.5 0V2h1.25c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0113.25 16H2.75A1.75 1.75 0 011 14.25V3.75C1 2.784 1.784 2 2.75 2H4V.75A.75.75 0 014.75 0zm0 3.5h-2a.25.25 0 00-.25.25V6h10.5V3.75a.25.25 0 00-.25-.25h-2V5a.75.75 0 01-1.5 0V3.5h-5V5a.75.75 0 01-1.5 0V3.5zM2.5 7.5v6.75c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25V7.5H2.5z" }, null, -1)]]))], 4), (y(), i(t, { to: "body" }, [p.value ? (y(), o("div", {
405
405
  key: 0,
406
406
  class: "fixed inset-0 z-40",
@@ -415,7 +415,7 @@ var B = (e, t) => {
415
415
  top: h.value ? h.value.getBoundingClientRect().bottom + 6 + "px" : "0",
416
416
  left: h.value ? h.value.getBoundingClientRect().left + "px" : "0"
417
417
  }),
418
- onClick: n[0] ||= M(() => {}, ["stop"])
418
+ onClick: n[0] ||= N(() => {}, ["stop"])
419
419
  }, [s("div", xe, [s("input", {
420
420
  type: _.value,
421
421
  value: v.value,
@@ -469,7 +469,7 @@ var B = (e, t) => {
469
469
  ], Re = { style: { color: "var(--st-text)" } }, ze = {
470
470
  class: "font-mono text-xs",
471
471
  style: { color: "var(--st-text-placeholder)" }
472
- }, Be = /* @__PURE__ */ B({
472
+ }, Be = /* @__PURE__ */ V({
473
473
  __name: "FilterBar",
474
474
  props: {
475
475
  table: {
@@ -510,14 +510,14 @@ var B = (e, t) => {
510
510
  sourceIndex: t
511
511
  }));
512
512
  return [...e, ...t];
513
- }), _ = r(() => h.value.some((e) => e.table === "sub")), v = x("closed"), b = x(null), w = x(""), E = x(0), D = x(null), j = x(null), M = x(null), N = x({
513
+ }), _ = r(() => h.value.some((e) => e.table === "sub")), v = x("closed"), b = x(null), w = x(""), E = x(0), D = x(null), j = x(null), N = x(null), P = x({
514
514
  top: 0,
515
515
  left: 0
516
- }), P = x({});
517
- function te() {
518
- if (v.value === "operators" && M.value) {
519
- let e = M.value.getBoundingClientRect();
520
- N.value = {
516
+ }), F = x({});
517
+ function ee() {
518
+ if (v.value === "operators" && N.value) {
519
+ let e = N.value.getBoundingClientRect();
520
+ P.value = {
521
521
  top: e.bottom + 4,
522
522
  left: e.right
523
523
  };
@@ -526,12 +526,12 @@ var B = (e, t) => {
526
526
  let e = j.value;
527
527
  if (!e) return;
528
528
  let t = e.getBoundingClientRect();
529
- N.value = {
529
+ P.value = {
530
530
  top: t.bottom + 4,
531
531
  left: t.left
532
532
  };
533
533
  }
534
- let F = r(() => {
534
+ let I = r(() => {
535
535
  let e = [];
536
536
  for (let t of _e) {
537
537
  e.push({
@@ -544,21 +544,21 @@ var B = (e, t) => {
544
544
  });
545
545
  }
546
546
  return e;
547
- }), I = r(() => F.value.filter((e) => e.type === "operator")), L = r(() => {
547
+ }), L = r(() => I.value.filter((e) => e.type === "operator")), R = r(() => {
548
548
  let e = w.value.toLowerCase();
549
549
  return e ? l.allColumns.filter((t) => t.id.toLowerCase().includes(e)) : l.allColumns;
550
- }), R = r(() => L.value.map((e) => ({
550
+ }), z = r(() => R.value.map((e) => ({
551
551
  ...e,
552
552
  table: "parent"
553
- }))), z = r(() => `Filter by ${l.allColumns.map((e) => e.id).slice(0, 3).join(", ")}...`), B = r(() => {
553
+ }))), B = r(() => `Filter by ${l.allColumns.map((e) => e.id).slice(0, 3).join(", ")}...`), V = r(() => {
554
554
  let e = l.subTableColumns || [];
555
555
  return [...l.allColumns, ...e];
556
556
  });
557
- function V(e) {
558
- return B.value.find((t) => t.id === e)?.type || "varchar";
559
- }
560
557
  function H(e) {
561
- return ge.includes(V(e));
558
+ return V.value.find((t) => t.id === e)?.type || "varchar";
559
+ }
560
+ function te(e) {
561
+ return ge.includes(H(e));
562
562
  }
563
563
  function ne(e) {
564
564
  return e.value?.operator || "=";
@@ -586,7 +586,7 @@ var B = (e, t) => {
586
586
  };
587
587
  n === "sub" ? u("update:sub-table-column-filters", [...l.subTableColumnFilters, r]) : u("update:column-filters", [...l.columnFilters, r]), v.value = "closed", b.value = null, w.value = "", D.value?.blur();
588
588
  let i = () => {
589
- let e = h.value.length - 1, t = P.value[e];
589
+ let e = h.value.length - 1, t = F.value[e];
590
590
  t ? t.focus() : m(i);
591
591
  };
592
592
  m(() => m(i));
@@ -621,7 +621,7 @@ var B = (e, t) => {
621
621
  v.value === "columns" ? J(e) : v.value === "operators" ? ae(e) : e.key !== "Escape" && W(), e.key === "Escape" && (se(), D.value?.blur());
622
622
  }
623
623
  function J(e) {
624
- let t = R.value;
624
+ let t = z.value;
625
625
  if (t.length !== 0) {
626
626
  if (e.key === "ArrowDown") e.preventDefault(), E.value = Math.min(E.value + 1, t.length - 1), oe("column-picker");
627
627
  else if (e.key === "ArrowUp") e.preventDefault(), E.value = Math.max(E.value - 1, 0), oe("column-picker");
@@ -633,7 +633,7 @@ var B = (e, t) => {
633
633
  }
634
634
  }
635
635
  function ae(e) {
636
- let t = I.value;
636
+ let t = L.value;
637
637
  t.length !== 0 && (e.key === "ArrowDown" ? (e.preventDefault(), E.value = Math.min(E.value + 1, t.length - 1), oe("operator-picker")) : e.key === "ArrowUp" ? (e.preventDefault(), E.value = Math.max(E.value - 1, 0), oe("operator-picker")) : (e.key === "Enter" || e.key === "Tab") && (e.preventDefault(), t[E.value] && K(t[E.value].value)));
638
638
  }
639
639
  function oe(e) {
@@ -653,9 +653,9 @@ var B = (e, t) => {
653
653
  }), A((e) => {
654
654
  if (v.value === "closed") return;
655
655
  function t() {
656
- m(te);
656
+ m(ee);
657
657
  }
658
- te(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), e(() => {
658
+ ee(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), e(() => {
659
659
  window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
660
660
  });
661
661
  }), (r, c) => (y(), o("div", we, [
@@ -673,7 +673,7 @@ var B = (e, t) => {
673
673
  s("input", {
674
674
  ref_for: !0,
675
675
  ref: (e) => {
676
- e && (P.value[t] = e);
676
+ e && (F.value[t] = e);
677
677
  },
678
678
  value: U(e),
679
679
  class: "bg-transparent outline-none text-[13px]",
@@ -684,10 +684,10 @@ var B = (e, t) => {
684
684
  placeholder: "value",
685
685
  onInput: (e) => q(t, e.target.value)
686
686
  }, null, 44, Oe),
687
- H(e.id) ? (y(), i(Ce, {
687
+ te(e.id) ? (y(), i(Ce, {
688
688
  key: 1,
689
689
  value: U(e),
690
- "column-type": V(e.id),
690
+ "column-type": H(e.id),
691
691
  onUpdate: (e) => q(t, e)
692
692
  }, null, 8, [
693
693
  "value",
@@ -707,7 +707,7 @@ var B = (e, t) => {
707
707
  b.value ? (y(), o("div", {
708
708
  key: 0,
709
709
  ref_key: "pendingChipRef",
710
- ref: M,
710
+ ref: N,
711
711
  class: "flex items-center gap-1 rounded px-2 py-0.5 text-[13px]",
712
712
  style: {
713
713
  backgroundColor: "var(--st-bg-surface)",
@@ -719,7 +719,7 @@ var B = (e, t) => {
719
719
  ref: j,
720
720
  class: "relative flex-1 min-w-[200px]"
721
721
  }, [
722
- ee(s("input", {
722
+ M(s("input", {
723
723
  ref_key: "searchInputRef",
724
724
  ref: D,
725
725
  "onUpdate:modelValue": c[0] ||= (e) => w.value = e,
@@ -728,7 +728,7 @@ var B = (e, t) => {
728
728
  color: "var(--st-text)",
729
729
  caretColor: v.value === "operators" ? "transparent" : void 0
730
730
  }),
731
- placeholder: v.value === "operators" ? "Pick a filter method..." : h.value.length > 0 ? "+ Add more filters..." : z.value,
731
+ placeholder: v.value === "operators" ? "Pick a filter method..." : h.value.length > 0 ? "+ Add more filters..." : B.value,
732
732
  onFocus: ce,
733
733
  onKeydown: ie
734
734
  }, null, 44, Me), [[O, w.value]]),
@@ -738,41 +738,41 @@ var B = (e, t) => {
738
738
  class: "fixed w-60 rounded shadow-xl z-50 py-1 max-h-60 overflow-auto",
739
739
  style: g({
740
740
  ...T(p),
741
- top: N.value.top + "px",
742
- left: N.value.left + "px",
741
+ top: P.value.top + "px",
742
+ left: P.value.left + "px",
743
743
  fontFamily: "var(--dt-font-family)",
744
744
  backgroundColor: "var(--st-bg-surface)",
745
745
  border: "1px solid var(--st-border-secondary)",
746
746
  color: "var(--st-text)"
747
747
  })
748
- }, [(y(!0), o(e, null, S(L.value, (e, t) => (y(), o("div", {
748
+ }, [(y(!0), o(e, null, S(R.value, (e, t) => (y(), o("div", {
749
749
  key: "p-" + e.id,
750
750
  class: "flex items-center justify-between px-3 py-1.5 cursor-pointer text-[13px]",
751
751
  "data-highlighted": t === E.value,
752
752
  style: g(t === E.value ? { backgroundColor: "var(--st-bg-menu-hover)" } : {}),
753
753
  onClick: (t) => G(e.id, "parent"),
754
754
  onMouseenter: (e) => E.value = t
755
- }, [s("span", Pe, C(e.id), 1), T(f) ? (y(), o("span", Fe, C(e.type), 1)) : a("", !0)], 44, Ne))), 128)), L.value.length === 0 ? (y(), o("div", Ie, " No columns found ")) : a("", !0)], 4)) : a("", !0)])),
755
+ }, [s("span", Pe, C(e.id), 1), T(f) ? (y(), o("span", Fe, C(e.type), 1)) : a("", !0)], 44, Ne))), 128)), R.value.length === 0 ? (y(), o("div", Ie, " No columns found ")) : a("", !0)], 4)) : a("", !0)])),
756
756
  (y(), i(t, { to: "body" }, [v.value === "operators" ? (y(), o("div", {
757
757
  key: 0,
758
758
  id: "operator-picker",
759
759
  class: "fixed w-52 rounded shadow-xl z-50 py-1 max-h-60 overflow-auto",
760
760
  style: g({
761
761
  ...T(p),
762
- top: N.value.top + "px",
763
- left: N.value.left + "px",
762
+ top: P.value.top + "px",
763
+ left: P.value.left + "px",
764
764
  fontFamily: "var(--dt-font-family)",
765
765
  backgroundColor: "var(--st-bg-surface)",
766
766
  border: "1px solid var(--st-border-secondary)",
767
767
  color: "var(--st-text)"
768
768
  })
769
- }, [(y(!0), o(e, null, S(F.value, (t, n) => (y(), o(e, { key: n }, [t.type === "header" ? (y(), o("div", Q, C(t.label), 1)) : (y(), o("div", {
769
+ }, [(y(!0), o(e, null, S(I.value, (t, n) => (y(), o(e, { key: n }, [t.type === "header" ? (y(), o("div", Q, C(t.label), 1)) : (y(), o("div", {
770
770
  key: 1,
771
771
  class: "flex items-center justify-between px-3 py-1.5 cursor-pointer text-[13px]",
772
- "data-highlighted": I.value.indexOf(t) === E.value,
773
- style: g(I.value.indexOf(t) === E.value ? { backgroundColor: "var(--st-bg-menu-hover)" } : {}),
772
+ "data-highlighted": L.value.indexOf(t) === E.value,
773
+ style: g(L.value.indexOf(t) === E.value ? { backgroundColor: "var(--st-bg-menu-hover)" } : {}),
774
774
  onClick: (e) => K(t.value),
775
- onMouseenter: (e) => E.value = I.value.indexOf(t)
775
+ onMouseenter: (e) => E.value = L.value.indexOf(t)
776
776
  }, [s("span", Re, C(t.label), 1), s("span", ze, C(t.value), 1)], 44, Le))], 64))), 128))], 4)) : a("", !0)])),
777
777
  (y(), i(t, { to: "body" }, [v.value === "closed" ? a("", !0) : (y(), o("div", {
778
778
  key: 0,
@@ -812,7 +812,7 @@ var B = (e, t) => {
812
812
  key: 0,
813
813
  class: "text-xs ml-auto shrink-0",
814
814
  style: { color: "var(--st-text-placeholder)" }
815
- }, Ze = /* @__PURE__ */ B({
815
+ }, Ze = /* @__PURE__ */ V({
816
816
  __name: "ColumnVisibilityPanel",
817
817
  props: {
818
818
  table: {
@@ -883,7 +883,7 @@ var B = (e, t) => {
883
883
  backgroundColor: "var(--st-bg-surface)",
884
884
  border: "1px solid var(--st-border-secondary)"
885
885
  },
886
- onClick: r[0] ||= M(() => {}, ["stop"])
886
+ onClick: r[0] ||= N(() => {}, ["stop"])
887
887
  }, [s("div", Ve, [s("span", He, C(_.value) + " of " + C(v.value) + " columns", 1), s("div", { class: "flex items-center gap-2" }, [
888
888
  s("button", {
889
889
  class: "text-xs",
@@ -973,7 +973,7 @@ var B = (e, t) => {
973
973
  backgroundColor: "var(--st-bg-surface)",
974
974
  border: "1px solid var(--st-border-secondary)"
975
975
  }
976
- }, lt = ["onClick"], ut = ["innerHTML"], dt = { class: "shrink-0 whitespace-nowrap" }, ft = /* @__PURE__ */ B({
976
+ }, lt = ["onClick"], ut = ["innerHTML"], dt = { class: "shrink-0 whitespace-nowrap" }, ft = /* @__PURE__ */ V({
977
977
  __name: "TableToolbar",
978
978
  props: {
979
979
  table: {
@@ -1063,13 +1063,13 @@ var B = (e, t) => {
1063
1063
  ],
1064
1064
  setup(t, { emit: n }) {
1065
1065
  let c = t, d = n, f = x(!1), p = x(!1), m = x(!1), _ = x(!1), v = x(null), b = x(null), w = x(null), T = x(null);
1066
- R(v, () => {
1066
+ z(v, () => {
1067
1067
  f.value = !1;
1068
- }), R(b, () => {
1068
+ }), z(b, () => {
1069
1069
  _.value = !1;
1070
- }), R(w, () => {
1070
+ }), z(w, () => {
1071
1071
  m.value = !1;
1072
- }), R(T, () => {
1072
+ }), z(T, () => {
1073
1073
  p.value = !1;
1074
1074
  });
1075
1075
  function E(e) {
@@ -1358,7 +1358,7 @@ var mt = {
1358
1358
  key: 0,
1359
1359
  class: "my-1",
1360
1360
  style: { borderTop: "1px solid var(--st-border-secondary)" }
1361
- }, vt = ["disabled", "onClick"], yt = ["innerHTML"], bt = ["onClick"], xt = /* @__PURE__ */ B({
1361
+ }, vt = ["disabled", "onClick"], yt = ["innerHTML"], bt = ["onClick"], xt = /* @__PURE__ */ V({
1362
1362
  __name: "SelectionToolbar",
1363
1363
  props: {
1364
1364
  selectedCount: {
@@ -1414,7 +1414,7 @@ var mt = {
1414
1414
  ],
1415
1415
  setup(t, { emit: n }) {
1416
1416
  let i = d("tableSourceRows", null), c = t, u = r(() => c.totalFilteredCount == null ? (i != null && w(i), c.table.getFilteredRowModel().rows.length) : c.totalFilteredCount), f = r(() => c.selectedCount >= u.value && u.value > 0), p = n, m = x(!1), _ = x(null);
1417
- R(_, () => {
1417
+ z(_, () => {
1418
1418
  m.value = !1;
1419
1419
  });
1420
1420
  function v() {
@@ -1599,7 +1599,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1599
1599
  class: "shrink-0 text-xs",
1600
1600
  style: { color: "var(--st-text-tertiary)" },
1601
1601
  title: "Column is frozen"
1602
- }, At = /* @__PURE__ */ B({
1602
+ }, At = /* @__PURE__ */ V({
1603
1603
  __name: "TableColumnHeader",
1604
1604
  props: {
1605
1605
  header: {
@@ -1685,7 +1685,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1685
1685
  })
1686
1686
  }, [
1687
1687
  s("div", Tt, [
1688
- s("span", Et, [e.header.isPlaceholder ? a("", !0) : (y(), i(T(N), {
1688
+ s("span", Et, [e.header.isPlaceholder ? a("", !0) : (y(), i(T(P), {
1689
1689
  key: 0,
1690
1690
  render: e.header.column.columnDef.header,
1691
1691
  props: e.header.getContext()
@@ -1698,7 +1698,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1698
1698
  ref: v,
1699
1699
  class: h(["ml-auto shrink-0 w-4 h-4 flex items-center justify-center opacity-0 group-hover/header:opacity-100 transition-opacity", { "!opacity-100": p.value }]),
1700
1700
  style: { color: "var(--st-text-tertiary)" },
1701
- onClick: M(S, ["stop"])
1701
+ onClick: N(S, ["stop"])
1702
1702
  }, [...d[1] ||= [s("svg", {
1703
1703
  class: "w-3 h-3",
1704
1704
  viewBox: "0 0 16 16",
@@ -1721,7 +1721,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1721
1721
  border: "1px solid var(--st-border-secondary)",
1722
1722
  color: "var(--st-text)"
1723
1723
  }),
1724
- onClick: d[0] ||= M(() => {}, ["stop"])
1724
+ onClick: d[0] ||= N(() => {}, ["stop"])
1725
1725
  }, [
1726
1726
  s("button", {
1727
1727
  class: "w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item",
@@ -1768,7 +1768,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1768
1768
  class: h(["absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-blue-500/50 active:bg-blue-500", { "bg-blue-500": e.header.column.getIsResizing() }]),
1769
1769
  onMousedown: A,
1770
1770
  onTouchstart: A,
1771
- onDblclick: M(j, ["stop"])
1771
+ onDblclick: N(j, ["stop"])
1772
1772
  }, null, 34)
1773
1773
  ], 4));
1774
1774
  }
@@ -1854,20 +1854,20 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1854
1854
  "secondaryText",
1855
1855
  "overflow",
1856
1856
  "multiline"
1857
- ], c = t, u = d("editable", !0), p = d("showRowBorders", !0), _ = d("showColumnBorders", !0), v = d("cellButtonVisibility", "hover"), b = d("cellOverflow", "truncate"), w = d("getCellPendingState", () => null), E = d("getCellPreviousValue", () => void 0), D = d("getRowPendingState", () => null), k = r(() => w(c.cell.row.id, c.cell.column.id)), A = r(() => D(c.cell.row.id)), j = r(() => E(c.cell.row.id, c.cell.column.id)), N = r(() => k.value === "modified"), P = r(() => A.value === "delete"), te = r(() => {
1857
+ ], c = t, u = d("editable", !0), p = d("showRowBorders", !0), _ = d("showColumnBorders", !0), v = d("cellButtonVisibility", "hover"), b = d("cellOverflow", "truncate"), w = d("getCellPendingState", () => null), E = d("getCellPreviousValue", () => void 0), D = d("getRowPendingState", () => null), k = r(() => w(c.cell.row.id, c.cell.column.id)), A = r(() => D(c.cell.row.id)), j = r(() => E(c.cell.row.id, c.cell.column.id)), P = r(() => k.value === "modified"), F = r(() => A.value === "delete"), ee = r(() => {
1858
1858
  let e = f(v) ? v.value : v;
1859
1859
  return e === "always" ? "opacity-100" : e === "select" ? c.isSelected ? "opacity-100" : "opacity-0" : "opacity-0 group-hover/row:opacity-100";
1860
- }), F = n, I = x(!1), L = x(""), R = x(null), z = {}, B = d("originalColumnMetaById", null), V = r(() => {
1861
- let e = String(c.cell.column.id), t = B?.value?.[e], n = c.cell.column.columnDef.meta || {};
1862
- if (!t) return Object.keys(n).length ? n : z;
1860
+ }), I = n, L = x(!1), R = x(""), z = x(null), B = {}, V = d("originalColumnMetaById", null), H = r(() => {
1861
+ let e = String(c.cell.column.id), t = V?.value?.[e], n = c.cell.column.columnDef.meta || {};
1862
+ if (!t) return Object.keys(n).length ? n : B;
1863
1863
  let r = {
1864
1864
  ...t,
1865
1865
  ...n
1866
1866
  };
1867
1867
  for (let e of i) (r[e] === void 0 || r[e] === null) && t[e] != null && (r[e] = t[e]);
1868
1868
  return typeof r.badge != "function" && r.badge !== !0 && typeof t.badge == "function" && (r.badge = t.badge), r.suffixIcon == null && t.suffixIcon != null && (r.suffixIcon = t.suffixIcon), r.secondaryText == null && t.secondaryText != null && (r.secondaryText = t.secondaryText), typeof r.secondaryText != "function" && typeof r.secondaryText != "string" && typeof t.secondaryText == "function" && (r.secondaryText = t.secondaryText), typeof r.segmentedBar != "function" && typeof t.segmentedBar == "function" && (r.segmentedBar = t.segmentedBar), r;
1869
- }), H = r(() => V.value.type === "boolean"), ne = r(() => {
1870
- let e = V.value;
1869
+ }), te = r(() => H.value.type === "boolean"), ne = r(() => {
1870
+ let e = H.value;
1871
1871
  if (!e.progressBar) return null;
1872
1872
  let t = c.cell.getValue();
1873
1873
  if (t == null) return null;
@@ -1878,7 +1878,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1878
1878
  }
1879
1879
  return Math.min(100, Math.max(0, Number(t)));
1880
1880
  }), U = r(() => {
1881
- let e = V.value;
1881
+ let e = H.value;
1882
1882
  if (!e.segmentedBar || typeof e.segmentedBar != "function") return null;
1883
1883
  let t = c.cell.getValue(), n = c.cell.row.original;
1884
1884
  return e.segmentedBar(t, n) ?? null;
@@ -1889,9 +1889,9 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1889
1889
  return `${Math.min(100, Math.max(0, n))}%`;
1890
1890
  }
1891
1891
  let G = r(() => {
1892
- let e = V.value;
1892
+ let e = H.value;
1893
1893
  return e.overflow ? e.overflow : e.multiline ? "wrap" : (f(b) ? b.value : b) || "truncate";
1894
- }), K = r(() => V.value.cellButtons ?? []);
1894
+ }), K = r(() => H.value.cellButtons ?? []);
1895
1895
  function re(e) {
1896
1896
  let t = e && e.color !== void 0 ? e.color : null;
1897
1897
  return t ? {
@@ -1905,7 +1905,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1905
1905
  };
1906
1906
  }
1907
1907
  let q = r(() => {
1908
- let e = V.value;
1908
+ let e = H.value;
1909
1909
  if (!e.badge) return null;
1910
1910
  let t = c.cell.getValue(), n = c.cell.row.original, r = e.badge;
1911
1911
  if (typeof r == "function") {
@@ -1917,13 +1917,13 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1917
1917
  style: i,
1918
1918
  text: a
1919
1919
  };
1920
- }), ie = r(() => H.value && !V.value.badge), J = r(() => {
1921
- let e = V.value;
1920
+ }), ie = r(() => te.value && !H.value.badge), J = r(() => {
1921
+ let e = H.value;
1922
1922
  if (!e.suffixIcon) return null;
1923
1923
  let t = c.cell.getValue();
1924
1924
  return typeof e.suffixIcon == "function" ? e.suffixIcon(t, c.cell.row.original) || null : e.suffixIcon;
1925
1925
  }), ae = r(() => {
1926
- let e = V.value;
1926
+ let e = H.value;
1927
1927
  if (e.secondaryText == null || e.secondaryText === "") return null;
1928
1928
  let t = c.cell.getValue(), n = c.cell.row.original, r;
1929
1929
  if (r = typeof e.secondaryText == "function" ? e.secondaryText(t, n) : e.secondaryText, r == null) return null;
@@ -1931,28 +1931,28 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1931
1931
  return i === "" ? null : i;
1932
1932
  }), oe = r(() => c.cell.getValue() == null), se = r(() => ae.value ? oe.value ? !0 : !q.value : !1), ce = r(() => se.value ? "flex items-start gap-1 min-w-0" : "flex items-center gap-1 min-w-0");
1933
1933
  function le() {
1934
- I.value || F("select");
1934
+ L.value || I("select");
1935
1935
  }
1936
1936
  function ue() {
1937
- !u.value?.update || ie.value || V.value.progressBar || V.value.segmentedBar || K.value.length > 0 || (I.value = !0, F("editing-change", !0), L.value = c.cell.getValue() ?? "", m(() => {
1938
- R.value && (R.value.focus(), R.value.select(), de());
1937
+ !u.value?.update || ie.value || H.value.progressBar || H.value.segmentedBar || K.value.length > 0 || (L.value = !0, I("editing-change", !0), R.value = c.cell.getValue() ?? "", m(() => {
1938
+ z.value && (z.value.focus(), z.value.select(), de());
1939
1939
  }));
1940
1940
  }
1941
1941
  function de() {
1942
- R.value && (R.value.style.height = "auto", R.value.style.height = R.value.scrollHeight + "px");
1942
+ z.value && (z.value.style.height = "auto", z.value.style.height = z.value.scrollHeight + "px");
1943
1943
  }
1944
1944
  function fe() {
1945
- let e = V.value.type;
1946
- F("update", e === "int8" || e === "int4" || e === "float8" ? Number(L.value) : L.value), I.value = !1, F("editing-change", !1);
1945
+ let e = H.value.type;
1946
+ I("update", e === "int8" || e === "int4" || e === "float8" ? Number(R.value) : R.value), L.value = !1, I("editing-change", !1);
1947
1947
  }
1948
1948
  function Y() {
1949
- I.value = !1, F("editing-change", !1);
1949
+ L.value = !1, I("editing-change", !1);
1950
1950
  }
1951
1951
  function pe(e) {
1952
1952
  e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), fe()) : e.key === "Escape" && Y();
1953
1953
  }
1954
1954
  function me() {
1955
- u.value?.update && F("update", !c.cell.getValue());
1955
+ u.value?.update && I("update", !c.cell.getValue());
1956
1956
  }
1957
1957
  return (n, r) => (y(), o("div", {
1958
1958
  class: "px-2 py-1.5 relative cursor-default align-middle",
@@ -1964,23 +1964,23 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1964
1964
  overflow: "hidden",
1965
1965
  borderBottom: T(p) ? "1px solid var(--st-border)" : "none",
1966
1966
  borderRight: T(_) ? "1px solid var(--st-border)" : "none",
1967
- boxShadow: t.isSelected && !I.value ? "inset 0 0 0 2px var(--st-accent)" : N.value ? "inset 3px 0 0 var(--st-accent)" : "none",
1968
- zIndex: I.value ? 20 : t.isSelected ? 10 : "auto"
1967
+ boxShadow: t.isSelected && !L.value ? "inset 0 0 0 2px var(--st-accent)" : P.value ? "inset 3px 0 0 var(--st-accent)" : "none",
1968
+ zIndex: L.value ? 20 : t.isSelected ? 10 : "auto"
1969
1969
  }),
1970
- title: N.value && j.value !== void 0 ? `Was: ${j.value === null || j.value === "" ? "(empty)" : j.value}` : void 0,
1970
+ title: P.value && j.value !== void 0 ? `Was: ${j.value === null || j.value === "" ? "(empty)" : j.value}` : void 0,
1971
1971
  onClick: le,
1972
1972
  onDblclick: ue
1973
1973
  }, [ie.value ? (y(), o(e, { key: 0 }, [T(u).update ? (y(), o("button", {
1974
1974
  key: 0,
1975
1975
  class: "flex items-center gap-1.5",
1976
- onClick: M(me, ["stop"])
1976
+ onClick: N(me, ["stop"])
1977
1977
  }, [s("span", {
1978
1978
  class: "inline-block w-7 h-4 rounded-full relative transition-colors",
1979
1979
  style: g({ backgroundColor: t.cell.getValue() ? "var(--st-accent)" : "var(--st-toggle-off)" })
1980
- }, [s("span", { class: h(["absolute top-0.5 w-3 h-3 rounded-full bg-white transition-transform", t.cell.getValue() ? "left-3.5" : "left-0.5"]) }, null, 2)], 4), s("span", Mt, C(t.cell.getValue() ? "true" : "false"), 1)])) : (y(), o("span", Nt, [t.cell.getValue() === null || t.cell.getValue() === void 0 ? (y(), o("span", Pt, "NULL")) : (y(), o(e, { key: 1 }, [l(C(t.cell.getValue() ? "true" : "false"), 1)], 64))]))], 64)) : I.value ? (y(), o(e, { key: 1 }, [ee(s("textarea", {
1980
+ }, [s("span", { class: h(["absolute top-0.5 w-3 h-3 rounded-full bg-white transition-transform", t.cell.getValue() ? "left-3.5" : "left-0.5"]) }, null, 2)], 4), s("span", Mt, C(t.cell.getValue() ? "true" : "false"), 1)])) : (y(), o("span", Nt, [t.cell.getValue() === null || t.cell.getValue() === void 0 ? (y(), o("span", Pt, "NULL")) : (y(), o(e, { key: 1 }, [l(C(t.cell.getValue() ? "true" : "false"), 1)], 64))]))], 64)) : L.value ? (y(), o(e, { key: 1 }, [M(s("textarea", {
1981
1981
  ref_key: "textareaRef",
1982
- ref: R,
1983
- "onUpdate:modelValue": r[0] ||= (e) => L.value = e,
1982
+ ref: z,
1983
+ "onUpdate:modelValue": r[0] ||= (e) => R.value = e,
1984
1984
  class: "w-full rounded px-1.5 py-1 text-[13px] resize-none outline-none",
1985
1985
  style: {
1986
1986
  backgroundColor: "var(--st-bg-input)",
@@ -1990,17 +1990,17 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
1990
1990
  rows: "1",
1991
1991
  onKeydown: pe,
1992
1992
  onInput: de
1993
- }, null, 544), [[O, L.value]]), s("div", Ft, [
1993
+ }, null, 544), [[O, R.value]]), s("div", Ft, [
1994
1994
  s("button", {
1995
1995
  class: "flex items-center gap-0.5",
1996
1996
  style: { color: "var(--st-accent)" },
1997
- onClick: M(fe, ["stop"])
1997
+ onClick: N(fe, ["stop"])
1998
1998
  }, " ↵ Save "),
1999
1999
  r[1] ||= s("span", { style: { color: "var(--st-text-placeholder)" } }, "|", -1),
2000
2000
  s("button", {
2001
2001
  class: "flex items-center gap-0.5",
2002
2002
  style: { color: "var(--st-text-secondary)" },
2003
- onClick: M(Y, ["stop"])
2003
+ onClick: N(Y, ["stop"])
2004
2004
  }, " Esc Cancel ")
2005
2005
  ])], 64)) : U.value ? (y(), o(e, { key: 2 }, [U.value.total === 0 ? (y(), o("div", It, [...r[2] ||= [s("span", {
2006
2006
  class: "italic text-[13px]",
@@ -2019,7 +2019,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2019
2019
  }, C(e.count) + " " + C(e.label), 1))), 128))])]))], 64)) : ne.value === null ? (y(), o("div", {
2020
2020
  key: 4,
2021
2021
  class: h(ce.value),
2022
- style: g(P.value ? {
2022
+ style: g(F.value ? {
2023
2023
  textDecoration: "line-through",
2024
2024
  opacity: .5
2025
2025
  } : {})
@@ -2046,14 +2046,14 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2046
2046
  }, null, 12, Jt)) : a("", !0),
2047
2047
  K.value.length > 0 ? (y(), o("div", {
2048
2048
  key: 1,
2049
- class: h(["flex items-center gap-0.5 shrink-0", te.value])
2049
+ class: h(["flex items-center gap-0.5 shrink-0", ee.value])
2050
2050
  }, [(y(!0), o(e, null, S(K.value, (e, n) => (y(), o("button", {
2051
2051
  key: n,
2052
2052
  type: "button",
2053
2053
  class: h(["flex items-center justify-center rounded transition-colors", e.icon ? "w-5 h-5 shrink-0" : "h-5 px-1.5 shrink-0 text-[11px] font-medium whitespace-nowrap"]),
2054
2054
  style: { color: "var(--st-text-secondary)" },
2055
2055
  title: e.label,
2056
- onClick: M((n) => e.onClick(t.cell.row.original), ["stop"])
2056
+ onClick: N((n) => e.onClick(t.cell.row.original), ["stop"])
2057
2057
  }, [e.icon ? (y(), o("span", {
2058
2058
  key: 0,
2059
2059
  class: "w-3.5 h-3.5 flex items-center justify-center",
@@ -2077,7 +2077,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2077
2077
  }, tn = { class: "flex h-full gap-1 pr-1.5 pl-1 items-center justify-end pl-0.5" }, nn = { class: "flex min-w-0 flex-1 items-center justify-end gap-0.5" }, rn = {
2078
2078
  class: "text-xs text-right whitespace-nowrap",
2079
2079
  style: { color: "var(--st-text-tertiary)" }
2080
- }, an = ["checked"], on = /* @__PURE__ */ B({
2080
+ }, an = ["checked"], on = /* @__PURE__ */ V({
2081
2081
  __name: "TableGridDataRow",
2082
2082
  props: {
2083
2083
  row: {
@@ -2138,19 +2138,19 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2138
2138
  delete: !0,
2139
2139
  ...e
2140
2140
  };
2141
- }), f = d("showRowBorders", !0), m = d("showColumnBorders", !0), _ = d("getSubTable", null), v = d("expanded", {}), b = d("toggleRowExpanded", () => {}), x = d("nestingDepth", 0), E = d("parentTheme", "dark"), D = d("parentAccentColor", "#3ecf8e"), O = d("subTableSorting", {}), k = d("subTableColumnFilters", {}), A = d("subTableColumnVisibility", {}), j = d("getRowPendingState", () => null), ee = d("isRowDisplayedSelected", null), N = d("highlightedRowId", null), P = r(() => {
2142
- let e = T(N);
2141
+ }), f = d("showRowBorders", !0), m = d("showColumnBorders", !0), _ = d("getSubTable", null), v = d("expanded", {}), b = d("toggleRowExpanded", () => {}), x = d("nestingDepth", 0), E = d("parentTheme", "dark"), D = d("parentAccentColor", "#3ecf8e"), O = d("subTableSorting", {}), k = d("subTableColumnFilters", {}), A = d("subTableColumnVisibility", {}), j = d("getRowPendingState", () => null), M = d("isRowDisplayedSelected", null), P = d("highlightedRowId", null), F = r(() => {
2142
+ let e = T(P);
2143
2143
  return e == null || e === "" ? !1 : n.row.id === e;
2144
2144
  });
2145
- function te(e) {
2146
- let t = T(ee);
2145
+ function ee(e) {
2146
+ let t = T(M);
2147
2147
  return typeof t == "function" ? t(e) : e.getIsSelected();
2148
2148
  }
2149
- let F = r(() => {
2149
+ let I = r(() => {
2150
2150
  let e = m ? "inset -1px 0 0 var(--st-border)" : "", t = "2px 0 4px var(--st-shadow-sticky)";
2151
2151
  return e ? `${e}, ${t}` : t;
2152
- }), I = r(() => _ ? _(n.row.original) : null), L = r(() => {
2153
- let e = I.value;
2152
+ }), L = r(() => _ ? _(n.row.original) : null), R = r(() => {
2153
+ let e = L.value;
2154
2154
  if (!e) return {
2155
2155
  tableProps: null,
2156
2156
  onRowAction: null
@@ -2160,14 +2160,14 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2160
2160
  tableProps: n,
2161
2161
  onRowAction: typeof t == "function" ? t : null
2162
2162
  };
2163
- }), R = r(() => T(v) ?? {});
2164
- function z() {
2165
- return !!I.value;
2166
- }
2163
+ }), z = r(() => T(v) ?? {});
2167
2164
  function B() {
2168
- return !!R.value?.[n.row.id];
2165
+ return !!L.value;
2169
2166
  }
2170
- let V = r(() => n.virtualOffsetY == null ? { width: "100%" } : {
2167
+ function V() {
2168
+ return !!z.value?.[n.row.id];
2169
+ }
2170
+ let H = r(() => n.virtualOffsetY == null ? { width: "100%" } : {
2171
2171
  position: "absolute",
2172
2172
  top: "0px",
2173
2173
  left: "0px",
@@ -2177,12 +2177,12 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2177
2177
  });
2178
2178
  return (n, r) => (y(), o("div", {
2179
2179
  class: h(["st-row", {
2180
- "st-row--selected": te(t.row),
2181
- "st-row--active": P.value,
2180
+ "st-row--selected": ee(t.row),
2181
+ "st-row--active": F.value,
2182
2182
  "st-row--pending-insert": T(j)(t.row.id) === "insert",
2183
2183
  "st-row--pending-delete": T(j)(t.row.id) === "delete"
2184
2184
  }]),
2185
- style: g(V.value),
2185
+ style: g(H.value),
2186
2186
  "data-index": t.virtualOffsetY == null ? void 0 : t.rowIndex
2187
2187
  }, [s("div", en, [
2188
2188
  s("div", {
@@ -2193,15 +2193,15 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2193
2193
  minWidth: "44px",
2194
2194
  borderBottom: T(f) ? "1px solid var(--st-border)" : "none"
2195
2195
  })
2196
- }, [s("div", tn, [s("div", nn, [z() ? (y(), o("button", {
2196
+ }, [s("div", tn, [s("div", nn, [B() ? (y(), o("button", {
2197
2197
  key: 0,
2198
2198
  class: "flex items-center justify-center w-4 h-4 shrink-0 transition-transform duration-150",
2199
2199
  style: g({
2200
- color: B() ? "var(--st-accent)" : "var(--st-text-secondary)",
2201
- transform: B() ? "rotate(90deg)" : "rotate(0deg)"
2200
+ color: V() ? "var(--st-accent)" : "var(--st-text-secondary)",
2201
+ transform: V() ? "rotate(90deg)" : "rotate(0deg)"
2202
2202
  }),
2203
2203
  title: "Toggle sub-table",
2204
- onClick: r[0] ||= M((e) => T(b)(t.row.id), ["stop"])
2204
+ onClick: r[0] ||= N((e) => T(b)(t.row.id), ["stop"])
2205
2205
  }, [...r[5] ||= [s("svg", {
2206
2206
  class: "w-3 h-3",
2207
2207
  viewBox: "0 0 16 16",
@@ -2211,7 +2211,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2211
2211
  class: "invisible group-hover/row:visible flex items-center justify-center w-4 h-4 shrink-0",
2212
2212
  style: { color: "var(--st-text-secondary)" },
2213
2213
  title: "Expand row",
2214
- onClick: r[1] ||= M((e) => n.$emit("edit-row", t.row.original), ["stop"])
2214
+ onClick: r[1] ||= N((e) => n.$emit("edit-row", t.row.original), ["stop"])
2215
2215
  }, [...r[6] ||= [s("svg", {
2216
2216
  class: "w-3 h-3",
2217
2217
  viewBox: "0 0 16 16",
@@ -2227,13 +2227,13 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2227
2227
  minWidth: "40px",
2228
2228
  left: "44px",
2229
2229
  borderBottom: T(f) ? "1px solid var(--st-border)" : "none",
2230
- boxShadow: F.value
2230
+ boxShadow: I.value
2231
2231
  })
2232
2232
  }, [s("input", {
2233
2233
  type: "checkbox",
2234
2234
  class: "cursor-pointer align-middle",
2235
2235
  style: { accentColor: "var(--st-accent)" },
2236
- checked: te(t.row),
2236
+ checked: ee(t.row),
2237
2237
  onClick: r[2] ||= (e) => n.$emit("toggle-row-select", t.row, e, t.rowIndex)
2238
2238
  }, null, 8, an)], 4),
2239
2239
  (y(!0), o(e, null, S(t.row.getVisibleCells(), (e) => (y(), i(Qt, {
@@ -2243,7 +2243,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2243
2243
  onSelect: (r) => n.$emit("select-cell", t.row.id, e.column.id),
2244
2244
  onUpdate: (r) => n.$emit("update-cell", t.row.id, e.column.id, r),
2245
2245
  onEditingChange: r[3] ||= (e) => n.$emit("editing-change", e, t.row.id),
2246
- onContextmenu: M((r) => n.$emit("context-menu", r, t.row, e), ["prevent", "stop"])
2246
+ onContextmenu: N((r) => n.$emit("context-menu", r, t.row, e), ["prevent", "stop"])
2247
2247
  }, null, 8, [
2248
2248
  "cell",
2249
2249
  "is-selected",
@@ -2251,7 +2251,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2251
2251
  "onUpdate",
2252
2252
  "onContextmenu"
2253
2253
  ]))), 128))
2254
- ]), B() && I.value ? (y(), o("div", {
2254
+ ]), V() && L.value ? (y(), o("div", {
2255
2255
  key: 0,
2256
2256
  style: g({
2257
2257
  display: "block",
@@ -2262,19 +2262,19 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2262
2262
  borderLeft: "3px solid var(--st-accent)",
2263
2263
  marginLeft: 10 + Number(w(T(x)) || 0) * 16 + "px",
2264
2264
  backgroundColor: "var(--st-bg)"
2265
- }) }, [u(Vr, p(L.value.tableProps, {
2266
- editable: I.value.editable ?? {
2265
+ }) }, [u(Vr, p(R.value.tableProps, {
2266
+ editable: L.value.editable ?? {
2267
2267
  insert: !1,
2268
2268
  update: !1,
2269
2269
  delete: !1
2270
2270
  },
2271
- theme: I.value.theme ?? T(T(E)),
2272
- "accent-color": I.value.accentColor ?? T(T(D)),
2271
+ theme: L.value.theme ?? T(T(E)),
2272
+ "accent-color": L.value.accentColor ?? T(T(D)),
2273
2273
  "nesting-depth": T(x) + 1,
2274
2274
  "controlled-sorting": T(O),
2275
2275
  "controlled-column-filters": T(k),
2276
2276
  "controlled-column-visibility": T(A),
2277
- onRowAction: r[4] ||= (e, t) => L.value.onRowAction?.(e, t)
2277
+ onRowAction: r[4] ||= (e, t) => R.value.onRowAction?.(e, t)
2278
2278
  }), null, 16, [
2279
2279
  "editable",
2280
2280
  "theme",
@@ -2326,7 +2326,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2326
2326
  "editing-change"
2327
2327
  ],
2328
2328
  setup(t, { emit: n }) {
2329
- let a = t, s = n, c = d("cellOverflow", "truncate"), l = d("getSubTable", null), u = d("expanded"), f = typeof window < "u" && "onscrollend" in window, p = r(() => T(u) ?? {}), m = z(r(() => {
2329
+ let a = t, s = n, c = d("cellOverflow", "truncate"), l = d("getSubTable", null), u = d("expanded"), f = typeof window < "u" && "onscrollend" in window, p = r(() => T(u) ?? {}), m = B(r(() => {
2330
2330
  let e = a.rows, t = p.value, n = T(c) === "wrap", r = {}, i = l;
2331
2331
  if (i) for (let t of e) {
2332
2332
  let e = i(t.original);
@@ -2491,7 +2491,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2491
2491
  backgroundColor: "var(--st-bg-surface)",
2492
2492
  border: "1px solid var(--st-border-secondary)"
2493
2493
  }
2494
- }, wn = 500, Tn = 8, En = /* @__PURE__ */ B({
2494
+ }, wn = 500, Tn = 8, En = /* @__PURE__ */ V({
2495
2495
  __name: "TableGrid",
2496
2496
  props: { table: {
2497
2497
  type: Object,
@@ -2532,10 +2532,10 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2532
2532
  delete: !0,
2533
2533
  ...e
2534
2534
  };
2535
- }), b = d("showRowBorders", !0), D = d("showColumnBorders", !0), O = d("loading", !1), k = r(() => !!T(O)), A = d("emptyTitle", "No rows found"), j = d("emptyMessage", "Get started by inserting a new row."), ee = d("openInsertPanel", null), N = d("defaultInsertLabel", null), P = d("insertActions", null), te = r(() => {
2536
- let e = P == null ? [] : T(P);
2535
+ }), b = d("showRowBorders", !0), D = d("showColumnBorders", !0), O = d("loading", !1), k = r(() => !!T(O)), A = d("emptyTitle", "No rows found"), j = d("emptyMessage", "Get started by inserting a new row."), M = d("openInsertPanel", null), P = d("defaultInsertLabel", null), F = d("insertActions", null), ee = r(() => {
2536
+ let e = F == null ? [] : T(F);
2537
2537
  return Array.isArray(e) ? e : [];
2538
- }), F = r(() => !v.value.insert || !(N != null && String(T(N)).trim()) ? !1 : te.value.length === 0), I = d("insertRow", () => {}), L = x(!1), R = d("nestingDepth", 0), z = u, B = x(null), V = x(null), H = d("tableSourceRows", null), ne = r(() => (H != null && w(H), m.table.getHeaderGroups())), U = r(() => 84 + m.table.getVisibleLeafColumns().reduce((e, t) => e + t.getSize(), 0)), W = r(() => (H != null && w(H), m.table.getRowModel().rows)), G = r(() => (H != null && w(H), m.table.getVisibleLeafColumns())), K = r(() => m.table.getState().pagination), re = d("isRowDisplayedSelected", null);
2538
+ }), I = r(() => !v.value.insert || !(P != null && String(T(P)).trim()) ? !1 : ee.value.length === 0), L = d("insertRow", () => {}), R = x(!1), z = d("nestingDepth", 0), B = u, V = x(null), H = x(null), te = d("tableSourceRows", null), ne = r(() => (te != null && w(te), m.table.getHeaderGroups())), U = r(() => 84 + m.table.getVisibleLeafColumns().reduce((e, t) => e + t.getSize(), 0)), W = r(() => (te != null && w(te), m.table.getRowModel().rows)), G = r(() => (te != null && w(te), m.table.getVisibleLeafColumns())), K = r(() => m.table.getState().pagination), re = d("isRowDisplayedSelected", null);
2539
2539
  function q(e) {
2540
2540
  let t = T(re);
2541
2541
  return typeof t == "function" ? t(e) : e.getIsSelected();
@@ -2546,13 +2546,13 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2546
2546
  return e && !t;
2547
2547
  });
2548
2548
  function ae(e, t) {
2549
- B.value = `${e}:${t}`;
2549
+ V.value = `${e}:${t}`;
2550
2550
  }
2551
2551
  function oe() {
2552
- B.value = null;
2552
+ V.value = null;
2553
2553
  }
2554
2554
  function se(e, t, n) {
2555
- z("context-menu", e, t, n);
2555
+ B("context-menu", e, t, n);
2556
2556
  }
2557
2557
  function ce() {
2558
2558
  m.table.toggleAllPageRowsSelected(!ie.value);
@@ -2570,12 +2570,12 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2570
2570
  return e ? `${e}, ${t}` : t;
2571
2571
  }), fe = r(() => W.value.length > wn), Y = E("scroller");
2572
2572
  function pe(e, t) {
2573
- V.value = e ? t : null;
2573
+ H.value = e ? t : null;
2574
2574
  }
2575
2575
  function me() {
2576
2576
  let e = Y.value;
2577
2577
  if (!e) return null;
2578
- let t = w(R);
2578
+ let t = w(z);
2579
2579
  return t && t > 0 ? e.parentElement : e;
2580
2580
  }
2581
2581
  function he() {
@@ -2584,11 +2584,11 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2584
2584
  return c({
2585
2585
  getScrollViewportInnerWidth: he,
2586
2586
  getViewportResizeObserveTarget: me
2587
- }), (r, c) => (y(), o("div", { class: h(T(R) === 0 ? "flex-1 min-h-0 relative" : "overflow-auto") }, [s("div", {
2587
+ }), (r, c) => (y(), o("div", { class: h(T(z) === 0 ? "flex-1 min-h-0 relative" : "overflow-auto") }, [s("div", {
2588
2588
  ref: "scroller",
2589
- class: h(T(R) === 0 ? "absolute inset-0 overflow-auto flex flex-col items-start min-h-0" : "flex flex-col items-start"),
2589
+ class: h(T(z) === 0 ? "absolute inset-0 overflow-auto flex flex-col items-start min-h-0" : "flex flex-col items-start"),
2590
2590
  style: { "scrollbar-gutter": "stable" },
2591
- onClick: M(oe, ["self"])
2591
+ onClick: N(oe, ["self"])
2592
2592
  }, [s("div", {
2593
2593
  class: "sticky top-0 z-[26] shrink-0 isolate",
2594
2594
  style: g({
@@ -2638,14 +2638,14 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2638
2638
  rows: W.value,
2639
2639
  "scroll-element-ref": Y.value,
2640
2640
  "total-table-width": U.value,
2641
- "selected-cell": B.value,
2642
- "editing-row-id": V.value,
2641
+ "selected-cell": V.value,
2642
+ "editing-row-id": H.value,
2643
2643
  "pagination-state": K.value,
2644
2644
  onToggleRowSelect: ue,
2645
- onEditRow: c[0] ||= (e) => z("edit-row", e),
2645
+ onEditRow: c[0] ||= (e) => B("edit-row", e),
2646
2646
  onContextMenu: se,
2647
2647
  onSelectCell: ae,
2648
- onUpdateCell: c[1] ||= (e, t, n) => z("update-cell", e, t, n),
2648
+ onUpdateCell: c[1] ||= (e, t, n) => B("update-cell", e, t, n),
2649
2649
  onEditingChange: pe
2650
2650
  }, null, 8, [
2651
2651
  "rows",
@@ -2658,14 +2658,14 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2658
2658
  key: 1,
2659
2659
  rows: W.value,
2660
2660
  "total-table-width": U.value,
2661
- "selected-cell": B.value,
2662
- "editing-row-id": V.value,
2661
+ "selected-cell": V.value,
2662
+ "editing-row-id": H.value,
2663
2663
  "pagination-state": K.value,
2664
2664
  onToggleRowSelect: ue,
2665
- onEditRow: c[2] ||= (e) => z("edit-row", e),
2665
+ onEditRow: c[2] ||= (e) => B("edit-row", e),
2666
2666
  onContextMenu: se,
2667
2667
  onSelectCell: ae,
2668
- onUpdateCell: c[3] ||= (e, t, n) => z("update-cell", e, t, n),
2668
+ onUpdateCell: c[3] ||= (e, t, n) => B("update-cell", e, t, n),
2669
2669
  onEditingChange: pe
2670
2670
  }, null, 8, [
2671
2671
  "rows",
@@ -2727,29 +2727,29 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2727
2727
  }, null, -1), s("path", { d: "M3 9h18M3 15h18M9 9v9M15 9v9" }, null, -1)]]))]),
2728
2728
  s("div", vn, [s("p", yn, C(T(A)), 1), s("p", bn, C(T(j)), 1)]),
2729
2729
  v.value.insert ? (y(), o("div", xn, [
2730
- F.value ? (y(), o("button", {
2730
+ I.value ? (y(), o("button", {
2731
2731
  key: 0,
2732
2732
  class: "flex items-center gap-1.5 px-3 py-1 rounded text-[13px] font-medium transition-colors",
2733
2733
  style: {
2734
2734
  backgroundColor: "var(--st-accent)",
2735
2735
  color: "var(--st-text-on-accent)"
2736
2736
  },
2737
- onClick: c[4] ||= (e) => T(I)()
2738
- }, C(T(N)), 1)) : T(N) ? (y(), o("div", Sn, [s("button", {
2737
+ onClick: c[4] ||= (e) => T(L)()
2738
+ }, C(T(P)), 1)) : T(P) ? (y(), o("div", Sn, [s("button", {
2739
2739
  class: "flex items-center gap-1.5 px-3 py-1 rounded-l text-[13px] font-medium transition-colors",
2740
2740
  style: {
2741
2741
  backgroundColor: "var(--st-accent)",
2742
2742
  color: "var(--st-text-on-accent)"
2743
2743
  },
2744
- onClick: c[5] ||= (e) => T(I)()
2745
- }, C(T(N)), 1), s("button", {
2744
+ onClick: c[5] ||= (e) => T(L)()
2745
+ }, C(T(P)), 1), s("button", {
2746
2746
  class: "flex items-center self-stretch px-1.5 rounded-r transition-colors",
2747
2747
  style: {
2748
2748
  backgroundColor: "var(--st-accent)",
2749
2749
  color: "var(--st-text-on-accent)",
2750
2750
  borderLeft: "1px solid var(--st-accent-hover)"
2751
2751
  },
2752
- onClick: c[6] ||= (e) => L.value = !L.value
2752
+ onClick: c[6] ||= (e) => R.value = !R.value
2753
2753
  }, [...c[14] ||= [s("svg", {
2754
2754
  class: "w-3 h-3",
2755
2755
  viewBox: "0 0 16 16",
@@ -2761,24 +2761,24 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2761
2761
  backgroundColor: "var(--st-accent)",
2762
2762
  color: "var(--st-text-on-accent)"
2763
2763
  },
2764
- onClick: c[7] ||= (e) => L.value = !L.value
2764
+ onClick: c[7] ||= (e) => R.value = !R.value
2765
2765
  }, [...c[15] ||= [l(" Insert ", -1), s("svg", {
2766
2766
  class: "w-3 h-3",
2767
2767
  viewBox: "0 0 16 16",
2768
2768
  fill: "currentColor"
2769
2769
  }, [s("path", { d: "M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z" })], -1)]])),
2770
- L.value ? (y(), o("div", Cn, [
2770
+ R.value ? (y(), o("div", Cn, [
2771
2771
  s("button", {
2772
2772
  class: "w-full text-left px-3 py-1.5 hover-menu-item",
2773
2773
  style: { color: "var(--st-text)" },
2774
2774
  onClick: c[8] ||= (e) => {
2775
- T(ee)(), L.value = !1;
2775
+ T(M)(), R.value = !1;
2776
2776
  }
2777
2777
  }, " Insert row "),
2778
2778
  s("button", {
2779
2779
  class: "w-full text-left px-3 py-1.5 hover-menu-item",
2780
2780
  style: { color: "var(--st-text)" },
2781
- onClick: c[9] ||= (e) => L.value = !1
2781
+ onClick: c[9] ||= (e) => R.value = !1
2782
2782
  }, " Insert column "),
2783
2783
  c[16] ||= s("div", {
2784
2784
  class: "my-1",
@@ -2787,13 +2787,13 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2787
2787
  s("button", {
2788
2788
  class: "w-full text-left px-3 py-1.5 hover-menu-item",
2789
2789
  style: { color: "var(--st-text)" },
2790
- onClick: c[10] ||= (e) => L.value = !1
2790
+ onClick: c[10] ||= (e) => R.value = !1
2791
2791
  }, " Import data from CSV ")
2792
2792
  ])) : a("", !0),
2793
- (y(), i(t, { to: "body" }, [L.value ? (y(), o("div", {
2793
+ (y(), i(t, { to: "body" }, [R.value ? (y(), o("div", {
2794
2794
  key: 0,
2795
2795
  class: "fixed inset-0 z-40",
2796
- onClick: c[11] ||= (e) => L.value = !1
2796
+ onClick: c[11] ||= (e) => R.value = !1
2797
2797
  })) : a("", !0)]))
2798
2798
  ])) : a("", !0)
2799
2799
  ])])) : a("", !0)], 2));
@@ -2883,7 +2883,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2883
2883
  function j() {
2884
2884
  p.pendingEditCount !== 0 && (A.value = !0);
2885
2885
  }
2886
- function ee() {
2886
+ function M() {
2887
2887
  m("discard"), A.value = !1;
2888
2888
  }
2889
2889
  return (r, c) => (y(), o("div", Dn, [
@@ -2979,7 +2979,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
2979
2979
  ...T(u),
2980
2980
  backgroundColor: "var(--st-bg-overlay)"
2981
2981
  }),
2982
- onClick: c[5] ||= M((e) => A.value = !1, ["self"])
2982
+ onClick: c[5] ||= N((e) => A.value = !1, ["self"])
2983
2983
  }, [s("div", {
2984
2984
  class: "rounded-lg shadow-xl p-5 w-80",
2985
2985
  style: g({
@@ -3004,7 +3004,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3004
3004
  "background-color": "#ef4444",
3005
3005
  color: "white"
3006
3006
  },
3007
- onClick: ee
3007
+ onClick: M
3008
3008
  }, " Clear edits ")])
3009
3009
  ], 4)], 4)) : a("", !0)]))
3010
3010
  ]));
@@ -3134,7 +3134,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3134
3134
  color: "var(--st-text-secondary)"
3135
3135
  },
3136
3136
  disabled: ""
3137
- }, null, 8, nr)) : ee((y(), o("textarea", {
3137
+ }, null, 8, nr)) : M((y(), o("textarea", {
3138
3138
  key: 1,
3139
3139
  "onUpdate:modelValue": (e) => w.value[n.id] = e,
3140
3140
  class: "w-full rounded px-3 py-2 text-[13px] outline-none resize-y min-h-[36px]",
@@ -3172,7 +3172,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3172
3172
  color: "var(--st-text-secondary)"
3173
3173
  },
3174
3174
  disabled: ""
3175
- }, null, 8, fr)) : ee((y(), o("textarea", {
3175
+ }, null, 8, fr)) : M((y(), o("textarea", {
3176
3176
  key: 1,
3177
3177
  "onUpdate:modelValue": (e) => w.value[n.id] = e,
3178
3178
  class: "w-full rounded px-3 py-2 text-[13px] outline-none resize-y min-h-[36px]",
@@ -3231,7 +3231,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3231
3231
  style: { color: "var(--st-text-secondary)" },
3232
3232
  viewBox: "0 0 16 16",
3233
3233
  fill: "currentColor"
3234
- }, wr = /* @__PURE__ */ B({
3234
+ }, wr = /* @__PURE__ */ V({
3235
3235
  __name: "ContextMenu",
3236
3236
  props: {
3237
3237
  x: {
@@ -3281,52 +3281,52 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3281
3281
  t.value = e, t.style.cssText = "position:fixed;opacity:0;pointer-events:none", document.body.appendChild(t), t.focus(), t.select(), document.execCommand("copy"), document.body.removeChild(t);
3282
3282
  }
3283
3283
  }
3284
- function ee() {
3284
+ function M() {
3285
3285
  k.value !== null && k.value !== void 0 && j(String(k.value)), b("close");
3286
3286
  }
3287
- function M() {
3287
+ function N() {
3288
3288
  m.row && j(JSON.stringify(m.row.original, null, 2)), b("close");
3289
3289
  }
3290
- function N() {
3290
+ function P() {
3291
3291
  A.value && k.value !== null && k.value !== void 0 && b("filter-by-value", A.value, String(k.value)), b("close");
3292
3292
  }
3293
- function P() {
3293
+ function F() {
3294
3294
  b("edit-row"), b("close");
3295
3295
  }
3296
- function te() {
3296
+ function ee() {
3297
3297
  b("delete-row"), b("close");
3298
3298
  }
3299
- function F() {
3299
+ function I() {
3300
3300
  b("undo-row"), b("close");
3301
3301
  }
3302
- function I() {
3302
+ function L() {
3303
3303
  A.value && b("undo-cell", A.value), b("close");
3304
3304
  }
3305
- function L() {
3305
+ function R() {
3306
3306
  return m.row?.original ?? null;
3307
3307
  }
3308
- function z(e, t) {
3308
+ function B(e, t) {
3309
3309
  if (e == null || e.divider) return !1;
3310
3310
  let n = e.disabled;
3311
3311
  if (n == null) return !1;
3312
3312
  let r = t?.original ?? t ?? null;
3313
3313
  return typeof n == "function" ? !!n(r) : !!n;
3314
3314
  }
3315
- function B(e) {
3316
- z(e, m.row) || (b("row-action", e.key, L()), b("close"));
3315
+ function V(e) {
3316
+ B(e, m.row) || (b("row-action", e.key, R()), b("close"));
3317
3317
  }
3318
- R(O, () => {
3318
+ z(O, () => {
3319
3319
  b("close");
3320
3320
  });
3321
- function V(e) {
3321
+ function H(e) {
3322
3322
  e.key === "Escape" && b("close");
3323
3323
  }
3324
3324
  _(() => {
3325
- document.addEventListener("keydown", V);
3325
+ document.addEventListener("keydown", H);
3326
3326
  }), v(() => {
3327
- document.removeEventListener("keydown", V);
3327
+ document.removeEventListener("keydown", H);
3328
3328
  });
3329
- let H = r(() => {
3329
+ let te = r(() => {
3330
3330
  let e = window.innerWidth, t = window.innerHeight, n = {
3331
3331
  position: "fixed",
3332
3332
  zIndex: 9999
@@ -3338,18 +3338,18 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3338
3338
  ref: O,
3339
3339
  style: g({
3340
3340
  ...T(u),
3341
- ...H.value
3341
+ ...te.value
3342
3342
  })
3343
3343
  }, [s("div", gr, [
3344
3344
  s("button", {
3345
3345
  class: "w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item",
3346
3346
  style: { color: "var(--st-text)" },
3347
- onClick: ee
3347
+ onClick: M
3348
3348
  }, [(y(), o("svg", _r, [...c[0] ||= [s("path", { d: "M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25zM5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25z" }, null, -1)]])), c[1] ||= l(" Copy cell ", -1)]),
3349
3349
  s("button", {
3350
3350
  class: "w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item",
3351
3351
  style: { color: "var(--st-text)" },
3352
- onClick: M
3352
+ onClick: N
3353
3353
  }, [(y(), o("svg", vr, [...c[2] ||= [s("path", { d: "M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25zM5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25z" }, null, -1)]])), c[3] ||= l(" Copy row ", -1)]),
3354
3354
  c[14] ||= s("div", {
3355
3355
  class: "my-1",
@@ -3358,7 +3358,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3358
3358
  s("button", {
3359
3359
  class: "w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item",
3360
3360
  style: { color: "var(--st-text)" },
3361
- onClick: N
3361
+ onClick: P
3362
3362
  }, [(y(), o("svg", yr, [...c[4] ||= [s("path", { d: "M.75 3a.75.75 0 000 1.5h14.5a.75.75 0 000-1.5H.75zM3 7.75A.75.75 0 013.75 7h8.5a.75.75 0 010 1.5h-8.5A.75.75 0 013 7.75zm3 4a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5h-2.5a.75.75 0 01-.75-.75z" }, null, -1)]])), c[5] ||= l(" Filter by value ", -1)]),
3363
3363
  E.value === "modified" || D.value ? (y(), o(e, { key: 0 }, [
3364
3364
  c[8] ||= s("div", {
@@ -3369,7 +3369,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3369
3369
  key: 0,
3370
3370
  class: "w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item",
3371
3371
  style: { color: "var(--st-accent)" },
3372
- onClick: I
3372
+ onClick: L
3373
3373
  }, [...c[6] ||= [s("svg", {
3374
3374
  class: "w-3.5 h-3.5",
3375
3375
  viewBox: "0 0 16 16",
@@ -3383,7 +3383,7 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3383
3383
  key: 1,
3384
3384
  class: "w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item",
3385
3385
  style: { color: "var(--st-accent)" },
3386
- onClick: F
3386
+ onClick: I
3387
3387
  }, [c[7] ||= s("svg", {
3388
3388
  class: "w-3.5 h-3.5",
3389
3389
  viewBox: "0 0 16 16",
@@ -3400,10 +3400,10 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3400
3400
  }, null, -1), (y(!0), o(e, null, S(n.customActions, (t, n) => (y(), o(e, { key: t.divider ? `divider-${n}` : t.key }, [t.divider ? (y(), o("div", br)) : (y(), o("button", {
3401
3401
  key: 1,
3402
3402
  type: "button",
3403
- class: h(["w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item disabled:pointer-events-none", { "opacity-40 cursor-not-allowed": z(t, m.row) }]),
3404
- disabled: z(t, m.row),
3403
+ class: h(["w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item disabled:pointer-events-none", { "opacity-40 cursor-not-allowed": B(t, m.row) }]),
3404
+ disabled: B(t, m.row),
3405
3405
  style: g({ color: T(pt)(t) ? "var(--st-danger)" : "var(--st-text)" }),
3406
- onClick: (e) => B(t)
3406
+ onClick: (e) => V(t)
3407
3407
  }, [t.icon ? (y(), o("span", {
3408
3408
  key: 0,
3409
3409
  class: "shrink-0 w-3.5 h-3.5 inline-flex items-center justify-center [&_svg]:max-w-full [&_svg]:max-h-full",
@@ -3418,13 +3418,13 @@ var Tt = { class: "flex items-center gap-1.5 px-2 py-1.5 cursor-default overflow
3418
3418
  key: 0,
3419
3419
  class: "w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item",
3420
3420
  style: { color: "var(--st-text)" },
3421
- onClick: P
3421
+ onClick: F
3422
3422
  }, [(y(), o("svg", Cr, [...c[10] ||= [s("path", { d: "M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61z" }, null, -1)]])), c[11] ||= l(" Edit row ", -1)])) : a("", !0),
3423
3423
  n.allowRowDelete && w.value !== "delete" ? (y(), o("button", {
3424
3424
  key: 1,
3425
3425
  class: "w-full text-left px-3 py-1.5 flex items-center gap-2 hover-menu-item",
3426
3426
  style: { color: "#ef4444" },
3427
- onClick: te
3427
+ onClick: ee
3428
3428
  }, [...c[12] ||= [s("svg", {
3429
3429
  class: "w-3.5 h-3.5",
3430
3430
  viewBox: "0 0 16 16",
@@ -3535,7 +3535,7 @@ var Fr = ["data-st-theme"], Ir = {
3535
3535
  borderBottom: "1px solid rgba(239,68,68,0.3)",
3536
3536
  color: "#ef4444"
3537
3537
  }
3538
- }, Lr = { class: "flex-1" }, Rr = { class: "flex flex-1 min-h-0 min-w-0" }, zr = { class: "flex flex-col flex-1 min-w-0 min-h-0" }, Br = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif", Vr = /* @__PURE__ */ B({
3538
+ }, Lr = { class: "flex-1" }, Rr = { class: "flex flex-1 min-h-0 min-w-0" }, zr = { class: "flex flex-col flex-1 min-w-0 min-h-0" }, Br = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif", Vr = /* @__PURE__ */ V({
3539
3539
  __name: "DataTable",
3540
3540
  props: {
3541
3541
  columns: {
@@ -3787,12 +3787,12 @@ var Fr = ["data-st-theme"], Ir = {
3787
3787
  return e != null && String(e).trim() !== "" ? String(e).trim() : null;
3788
3788
  });
3789
3789
  b(f, O);
3790
- let A = r(() => ({ "--dt-font-family": O.value || Br })), ee = r(() => ({
3790
+ let A = r(() => ({ "--dt-font-family": O.value || Br })), M = r(() => ({
3791
3791
  ...E.value,
3792
3792
  ...A.value,
3793
3793
  backgroundColor: "var(--st-bg)",
3794
3794
  color: "var(--st-text)"
3795
- })), M = x(null), N = x(null), R = x(!1), z = x([]), B = l, V = r(() => p.editable === !0 ? {
3795
+ })), N = x(null), P = x(null), z = x(!1), B = x([]), V = l, H = r(() => p.editable === !0 ? {
3796
3796
  insert: !0,
3797
3797
  update: !0,
3798
3798
  delete: !0
@@ -3805,7 +3805,7 @@ var Fr = ["data-st-theme"], Ir = {
3805
3805
  update: !0,
3806
3806
  delete: !0,
3807
3807
  ...p.editable
3808
- }), H = r(() => V.value.update), ne = r(() => V.value.delete), U = x(!1);
3808
+ }), te = r(() => H.value.update), ne = r(() => H.value.delete), U = x(!1);
3809
3809
  k(() => p.error, () => {
3810
3810
  U.value = !1;
3811
3811
  });
@@ -3834,7 +3834,7 @@ var Fr = ["data-st-theme"], Ir = {
3834
3834
  p.expandedRows === null ? ce.value = {
3835
3835
  ...ce.value,
3836
3836
  [e]: !ce.value[e]
3837
- } : B("update:expanded-rows", {
3837
+ } : V("update:expanded-rows", {
3838
3838
  ...p.expandedRows,
3839
3839
  [e]: !p.expandedRows[e]
3840
3840
  });
@@ -4000,14 +4000,14 @@ var Fr = ["data-st-theme"], Ir = {
4000
4000
  function Fe() {
4001
4001
  if (ye.value || !Ce.value) return;
4002
4002
  let e = Pe();
4003
- ye.value = !0, B("commit-edits", e, (e) => {
4003
+ ye.value = !0, V("commit-edits", e, (e) => {
4004
4004
  ye.value = !1, e && (Z.value = /* @__PURE__ */ new Map());
4005
4005
  });
4006
4006
  }
4007
4007
  function Ie() {
4008
- Z.value = /* @__PURE__ */ new Map(), B("discard-edits");
4008
+ Z.value = /* @__PURE__ */ new Map(), V("discard-edits");
4009
4009
  }
4010
- let Q = L({
4010
+ let Q = R({
4011
4011
  data: Te,
4012
4012
  get columns() {
4013
4013
  return p.columns;
@@ -4044,10 +4044,10 @@ var Fr = ["data-st-theme"], Ir = {
4044
4044
  return Y.value;
4045
4045
  },
4046
4046
  onSortingChange: (e) => {
4047
- W.value = typeof e == "function" ? e(W.value) : e, Y.value && B("sort-change", W.value);
4047
+ W.value = typeof e == "function" ? e(W.value) : e, Y.value && V("sort-change", W.value);
4048
4048
  },
4049
4049
  onColumnFiltersChange: (e) => {
4050
- G.value = typeof e == "function" ? e(G.value) : e, B("update:column-filters", G.value);
4050
+ G.value = typeof e == "function" ? e(G.value) : e, V("update:column-filters", G.value);
4051
4051
  },
4052
4052
  onRowSelectionChange: (e) => {
4053
4053
  let t = K.value, n = typeof e == "function" ? e(t) : e;
@@ -4057,7 +4057,7 @@ var Fr = ["data-st-theme"], Ir = {
4057
4057
  let e = p.additionalSelectedRowIds || [], t = new Set(e.map(String)), n = i.filter((e) => t.has(String(e)));
4058
4058
  if (n.length > 0) {
4059
4059
  let t = new Set(n.map(String));
4060
- B("update:additionalSelectedRowIds", e.filter((e) => !t.has(String(e))));
4060
+ V("update:additionalSelectedRowIds", e.filter((e) => !t.has(String(e))));
4061
4061
  }
4062
4062
  }
4063
4063
  }
@@ -4065,7 +4065,7 @@ var Fr = ["data-st-theme"], Ir = {
4065
4065
  },
4066
4066
  onPaginationChange: (e) => {
4067
4067
  let t = typeof e == "function" ? e(re.value) : e;
4068
- re.value = t, Y.value && B("page-change", {
4068
+ re.value = t, Y.value && V("page-change", {
4069
4069
  pageIndex: t.pageIndex,
4070
4070
  pageSize: t.pageSize
4071
4071
  });
@@ -4075,15 +4075,15 @@ var Fr = ["data-st-theme"], Ir = {
4075
4075
  },
4076
4076
  onColumnSizingInfoChange: (e) => {
4077
4077
  let t = ie.value, n = typeof e == "function" ? e(t) : e;
4078
- ie.value = n, t.isResizingColumn && !n.isResizingColumn && B("column-resize", q.value);
4078
+ ie.value = n, t.isResizingColumn && !n.isResizingColumn && V("column-resize", q.value);
4079
4079
  },
4080
4080
  onColumnVisibilityChange: (e) => {
4081
4081
  J.value = typeof e == "function" ? e(J.value) : e;
4082
4082
  },
4083
- getCoreRowModel: P(),
4084
- getSortedRowModel: I(),
4085
- getFilteredRowModel: te(),
4086
- getPaginationRowModel: F(),
4083
+ getCoreRowModel: F(),
4084
+ getSortedRowModel: L(),
4085
+ getFilteredRowModel: ee(),
4086
+ getPaginationRowModel: I(),
4087
4087
  get manualPagination() {
4088
4088
  return Y.value;
4089
4089
  },
@@ -4121,7 +4121,7 @@ var Fr = ["data-st-theme"], Ir = {
4121
4121
  r && (K.value = n);
4122
4122
  }, { deep: !0 });
4123
4123
  function Re() {
4124
- Q.resetRowSelection(), B("update:additionalSelectedRowIds", []);
4124
+ Q.resetRowSelection(), V("update:additionalSelectedRowIds", []);
4125
4125
  }
4126
4126
  let ze = he, Be = r(() => he.value > 0), Ve = x({
4127
4127
  open: !1,
@@ -4138,7 +4138,7 @@ var Fr = ["data-st-theme"], Ir = {
4138
4138
  function Ue() {
4139
4139
  let e = p.defaultInsertLabel;
4140
4140
  if (typeof e == "string" && e.trim() !== "") {
4141
- B("insert-row");
4141
+ V("insert-row");
4142
4142
  return;
4143
4143
  }
4144
4144
  He();
@@ -4158,36 +4158,36 @@ var Fr = ["data-st-theme"], Ir = {
4158
4158
  };
4159
4159
  }
4160
4160
  function Ke(e) {
4161
- if (Ve.value.mode === "insert") p.stagedEdits ? Ee(e) : B("insert-row", e);
4161
+ if (Ve.value.mode === "insert") p.stagedEdits ? Ee(e) : V("insert-row", e);
4162
4162
  else if (p.stagedEdits) {
4163
4163
  let t = fe.value, n = String(e[t] ?? e.id), r = Se(n) ?? {}, i = {};
4164
4164
  for (let n of Object.keys(e)) n !== t && e[n] !== r[n] && (i[n] = e[n]);
4165
4165
  Object.keys(i).length > 0 && De(n, i);
4166
- } else B("update-row", {
4166
+ } else V("update-row", {
4167
4167
  id: e.id,
4168
4168
  changes: e
4169
4169
  });
4170
4170
  Ge();
4171
4171
  }
4172
4172
  function qe(e) {
4173
- p.stagedEdits ? Oe(e) : B("delete-rows", e), Q.resetRowSelection(), B("update:additionalSelectedRowIds", []);
4173
+ p.stagedEdits ? Oe(e) : V("delete-rows", e), Q.resetRowSelection(), V("update:additionalSelectedRowIds", []);
4174
4174
  }
4175
4175
  function Je(e) {
4176
4176
  let t = (e ?? []).map(String).filter(Boolean);
4177
- t.length !== 0 && (z.value = t, R.value = !0);
4177
+ t.length !== 0 && (B.value = t, z.value = !0);
4178
4178
  }
4179
4179
  function Ye() {
4180
4180
  Je(ge());
4181
4181
  }
4182
4182
  function Xe() {
4183
- let e = [...z.value];
4184
- R.value = !1, qe(e);
4183
+ let e = [...B.value];
4184
+ z.value = !1, qe(e);
4185
4185
  }
4186
- k(R, (e) => {
4187
- e || (z.value = []);
4186
+ k(z, (e) => {
4187
+ e || (B.value = []);
4188
4188
  });
4189
4189
  function Ze(e, t, n) {
4190
- p.stagedEdits ? De(e, { [t]: n }) : B("update-row", {
4190
+ p.stagedEdits ? De(e, { [t]: n }) : V("update-row", {
4191
4191
  id: e,
4192
4192
  changes: { [t]: n }
4193
4193
  });
@@ -4218,24 +4218,25 @@ var Fr = ["data-st-theme"], Ir = {
4218
4218
  }, Pr($e);
4219
4219
  }
4220
4220
  function et(e, t) {
4221
- G.value.find((t) => t.id === e) ? G.value = G.value.map((n) => n.id === e ? {
4221
+ let n;
4222
+ n = G.value.find((t) => t.id === e) ? G.value.map((n) => n.id === e ? {
4222
4223
  ...n,
4223
4224
  value: {
4224
4225
  operator: "=",
4225
4226
  value: t
4226
4227
  }
4227
- } : n) : G.value = [...G.value, {
4228
+ } : n) : [...G.value, {
4228
4229
  id: e,
4229
4230
  value: {
4230
4231
  operator: "=",
4231
4232
  value: t
4232
4233
  }
4233
- }];
4234
+ }], G.value = n, V("update:column-filters", n);
4234
4235
  }
4235
4236
  b("themeVars", r(() => ({
4236
4237
  ...E.value,
4237
4238
  ...A.value
4238
- }))), b("originalColumnMetaById", Le), b("table", Q), b("tableSourceRows", Te), b("tableName", p.tableName), b("showDataTypes", p.showDataTypes), b("editable", V), b("showRowBorders", p.showRowBorders), b("showColumnBorders", p.showColumnBorders), b("cellButtonVisibility", r(() => p.cellButtonVisibility)), b("cellOverflow", r(() => p.cellOverflow)), b("insertRow", () => B("insert-row")), b("openInsertPanel", He), b("emptyTitle", r(() => p.emptyTitle)), b("emptyMessage", r(() => p.emptyMessage)), b("defaultInsertLabel", r(() => p.defaultInsertLabel)), b("insertActions", r(() => p.insertActions)), b("loading", r(() => p.loading)), b("expanded", le), b("toggleRowExpanded", ue), b("getSubTable", p.getSubTable), b("nestingDepth", p.nestingDepth), b("parentTheme", r(() => p.theme)), b("parentAccentColor", r(() => p.accentColor)), b("subTableSorting", ae), b("subTableColumnFilters", oe), b("subTableColumnVisibility", se), b("stagedEditsEnabled", r(() => p.stagedEdits)), b("getRowPendingState", je), b("getCellPendingState", Me), b("getCellPreviousValue", Ne), b("undoRowEdit", ke), b("undoCellEdit", Ae), k(() => p.rows, () => {
4239
+ }))), b("originalColumnMetaById", Le), b("table", Q), b("tableSourceRows", Te), b("tableName", p.tableName), b("showDataTypes", p.showDataTypes), b("editable", H), b("showRowBorders", p.showRowBorders), b("showColumnBorders", p.showColumnBorders), b("cellButtonVisibility", r(() => p.cellButtonVisibility)), b("cellOverflow", r(() => p.cellOverflow)), b("insertRow", () => V("insert-row")), b("openInsertPanel", He), b("emptyTitle", r(() => p.emptyTitle)), b("emptyMessage", r(() => p.emptyMessage)), b("defaultInsertLabel", r(() => p.defaultInsertLabel)), b("insertActions", r(() => p.insertActions)), b("loading", r(() => p.loading)), b("expanded", le), b("toggleRowExpanded", ue), b("getSubTable", p.getSubTable), b("nestingDepth", p.nestingDepth), b("parentTheme", r(() => p.theme)), b("parentAccentColor", r(() => p.accentColor)), b("subTableSorting", ae), b("subTableColumnFilters", oe), b("subTableColumnVisibility", se), b("stagedEditsEnabled", r(() => p.stagedEdits)), b("getRowPendingState", je), b("getCellPendingState", Me), b("getCellPreviousValue", Ne), b("undoRowEdit", ke), b("undoCellEdit", Ae), k(() => p.rows, () => {
4239
4240
  Q.resetRowSelection();
4240
4241
  });
4241
4242
  function tt() {
@@ -4244,8 +4245,8 @@ var Fr = ["data-st-theme"], Ir = {
4244
4245
  let t = document.createElement("canvas").getContext("2d");
4245
4246
  if (!t) return e;
4246
4247
  let n = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif";
4247
- if (M.value) {
4248
- let e = getComputedStyle(M.value).fontFamily;
4248
+ if (N.value) {
4249
+ let e = getComputedStyle(N.value).fontFamily;
4249
4250
  e && e.trim() !== "" && (n = e);
4250
4251
  }
4251
4252
  t.font = `13px ${n}`;
@@ -4289,8 +4290,8 @@ var Fr = ["data-st-theme"], Ir = {
4289
4290
  }
4290
4291
  q.value = t;
4291
4292
  }
4292
- let rt = null;
4293
- function it() {
4293
+ let rt = null, it = !1;
4294
+ function at() {
4294
4295
  rt?.disconnect(), rt = null;
4295
4296
  }
4296
4297
  return _(() => {
@@ -4298,28 +4299,32 @@ var Fr = ["data-st-theme"], Ir = {
4298
4299
  await m(), await new Promise((e) => {
4299
4300
  requestAnimationFrame(() => e());
4300
4301
  });
4301
- let e = N.value?.getScrollViewportInnerWidth?.() ?? 0;
4302
- if (nt(e), e > 0) return;
4303
- let t = typeof N.value?.getViewportResizeObserveTarget == "function" ? N.value.getViewportResizeObserveTarget() : null;
4304
- t && typeof ResizeObserver < "u" && (it(), rt = new ResizeObserver(() => {
4305
- let e = N.value?.getScrollViewportInnerWidth?.() ?? 0;
4306
- e <= 0 || (nt(e), it());
4302
+ let e = P.value?.getScrollViewportInnerWidth?.() ?? 0;
4303
+ if (nt(e), it = Te.value.length > 0, e > 0) return;
4304
+ let t = typeof P.value?.getViewportResizeObserveTarget == "function" ? P.value.getViewportResizeObserveTarget() : null;
4305
+ t && typeof ResizeObserver < "u" && (at(), rt = new ResizeObserver(() => {
4306
+ let e = P.value?.getScrollViewportInnerWidth?.() ?? 0;
4307
+ e <= 0 || (nt(e), at());
4307
4308
  }), rt.observe(t));
4308
4309
  })();
4310
+ }), k(() => p.rows, async (e) => {
4311
+ it || e.length === 0 || (it = !0, await m(), await new Promise((e) => {
4312
+ requestAnimationFrame(() => e());
4313
+ }), nt(P.value?.getScrollViewportInnerWidth?.() ?? 0));
4309
4314
  }), v(() => {
4310
- it(), Pr($e);
4315
+ at(), Pr($e);
4311
4316
  }), c({ openDeleteConfirmation: Je }), (r, c) => (y(), o("div", {
4312
4317
  ref_key: "rootElRef",
4313
- ref: M,
4318
+ ref: N,
4314
4319
  class: h(["data-table-root flex flex-col text-[13px]", t.nestingDepth === 0 ? "flex-1 min-h-0 min-w-0" : ""]),
4315
4320
  "data-st-theme": t.theme,
4316
- style: g(ee.value)
4321
+ style: g(M.value)
4317
4322
  }, [
4318
4323
  t.showToolbar ? (y(), o(e, { key: 0 }, [Be.value ? (y(), i(xt, {
4319
4324
  key: 0,
4320
4325
  "selected-count": T(ze),
4321
4326
  table: T(Q),
4322
- editable: V.value,
4327
+ editable: H.value,
4323
4328
  "selection-actions": t.selectionActions,
4324
4329
  "context-menu-actions": t.contextMenuActions,
4325
4330
  "enable-select-all": t.enableSelectAll,
@@ -4328,8 +4333,8 @@ var Fr = ["data-st-theme"], Ir = {
4328
4333
  "count-label-singular": t.countLabelSingular,
4329
4334
  "count-label-plural": t.countLabelPlural,
4330
4335
  onDeleteConfirmRequest: Ye,
4331
- onSelectionAction: c[0] ||= (e, t) => B("selection-action", e, t, ge()),
4332
- onSelectAllMatching: c[1] ||= (e) => B("select-all-matching"),
4336
+ onSelectionAction: c[0] ||= (e, t) => V("selection-action", e, t, ge()),
4337
+ onSelectAllMatching: c[1] ||= (e) => V("select-all-matching"),
4333
4338
  onClearFullSelection: Re
4334
4339
  }, null, 8, [
4335
4340
  "selected-count",
@@ -4349,7 +4354,7 @@ var Fr = ["data-st-theme"], Ir = {
4349
4354
  "column-filters": G.value,
4350
4355
  "column-visibility": J.value,
4351
4356
  "default-column-visibility": t.defaultColumnVisibility,
4352
- editable: V.value,
4357
+ editable: H.value,
4353
4358
  loading: t.loading,
4354
4359
  "is-empty": Te.value.length === 0,
4355
4360
  "default-insert-label": t.defaultInsertLabel,
@@ -4362,15 +4367,17 @@ var Fr = ["data-st-theme"], Ir = {
4362
4367
  "sub-table-column-visibility": se.value,
4363
4368
  "table-name": t.tableName,
4364
4369
  "onUpdate:sorting": c[2] ||= (e) => W.value = e,
4365
- "onUpdate:columnFilters": c[3] ||= (e) => G.value = e,
4370
+ "onUpdate:columnFilters": c[3] ||= (e) => {
4371
+ G.value = e, V("update:column-filters", e);
4372
+ },
4366
4373
  "onUpdate:columnVisibility": c[4] ||= (e) => J.value = e,
4367
4374
  "onUpdate:subTableSorting": c[5] ||= (e) => ae.value = e,
4368
4375
  "onUpdate:subTableColumnFilters": c[6] ||= (e) => oe.value = e,
4369
4376
  "onUpdate:subTableColumnVisibility": c[7] ||= (e) => se.value = e,
4370
4377
  onInsertRow: Ue,
4371
- onInsertAction: c[8] ||= (e) => B("insert-action", e),
4372
- onRefresh: c[9] ||= (e) => B("refresh"),
4373
- onToolbarAction: c[10] ||= (e) => B("toolbar-action", e)
4378
+ onInsertAction: c[8] ||= (e) => V("insert-action", e),
4379
+ onRefresh: c[9] ||= (e) => V("refresh"),
4380
+ onToolbarAction: c[10] ||= (e) => V("toolbar-action", e)
4374
4381
  }, null, 8, [
4375
4382
  "table",
4376
4383
  "sorting",
@@ -4408,7 +4415,7 @@ var Fr = ["data-st-theme"], Ir = {
4408
4415
  ])) : a("", !0),
4409
4416
  s("div", Rr, [s("div", zr, [u(En, {
4410
4417
  ref_key: "tableGridRef",
4411
- ref: N,
4418
+ ref: P,
4412
4419
  table: T(Q),
4413
4420
  onUpdateCell: Ze,
4414
4421
  onContextMenu: Qe,
@@ -4435,7 +4442,7 @@ var Fr = ["data-st-theme"], Ir = {
4435
4442
  "count-label-singular",
4436
4443
  "count-label-plural"
4437
4444
  ])) : a("", !0)]), u(n, { name: "slide-panel" }, {
4438
- default: j(() => [(V.value.insert || V.value.update) && Ve.value.open ? (y(), i(hr, {
4445
+ default: j(() => [(H.value.insert || H.value.update) && Ve.value.open ? (y(), i(hr, {
4439
4446
  key: 0,
4440
4447
  mode: Ve.value.mode,
4441
4448
  "row-data": Ve.value.rowData,
@@ -4452,9 +4459,9 @@ var Fr = ["data-st-theme"], Ir = {
4452
4459
  _: 1
4453
4460
  })]),
4454
4461
  u(Or, {
4455
- modelValue: R.value,
4456
- "onUpdate:modelValue": c[12] ||= (e) => R.value = e,
4457
- "row-count": z.value.length,
4462
+ modelValue: z.value,
4463
+ "onUpdate:modelValue": c[12] ||= (e) => z.value = e,
4464
+ "row-count": B.value.length,
4458
4465
  onConfirm: Xe
4459
4466
  }, null, 8, ["modelValue", "row-count"]),
4460
4467
  $.value.show ? (y(), i(wr, {
@@ -4464,7 +4471,7 @@ var Fr = ["data-st-theme"], Ir = {
4464
4471
  row: $.value.row,
4465
4472
  cell: $.value.cell,
4466
4473
  "custom-actions": t.contextMenuActions,
4467
- "allow-row-edit": H.value,
4474
+ "allow-row-edit": te.value,
4468
4475
  "allow-row-delete": ne.value,
4469
4476
  onClose: $e,
4470
4477
  onEditRow: c[13] ||= (e) => We($.value.row.original),
@@ -4472,7 +4479,7 @@ var Fr = ["data-st-theme"], Ir = {
4472
4479
  onFilterByValue: et,
4473
4480
  onUndoRow: c[15] ||= (e) => ke($.value.row.id),
4474
4481
  onUndoCell: c[16] ||= (e) => Ae($.value.row.id, e),
4475
- onRowAction: c[17] ||= (e, t) => B("row-action", e, t)
4482
+ onRowAction: c[17] ||= (e, t) => V("row-action", e, t)
4476
4483
  }, null, 8, [
4477
4484
  "x",
4478
4485
  "y",
@@ -4484,6 +4491,6 @@ var Fr = ["data-st-theme"], Ir = {
4484
4491
  ])) : a("", !0)
4485
4492
  ], 14, Fr));
4486
4493
  }
4487
- }, [["__scopeId", "data-v-3ec50e77"]]);
4494
+ }, [["__scopeId", "data-v-4b5ed867"]]);
4488
4495
  //#endregion
4489
4496
  export { Vr as DataTable };