@prefabs.tech/vue3-tanstack-table 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { defineComponent as Q, h as X, isRef as Jt, shallowRef as Zt, watch as yt, ref as K, watchEffect as en, unref as C, computed as G, createElementBlock as y, openBlock as S, createCommentVNode as V, createElementVNode as A, toDisplayString as z, Fragment as H, renderList as j, createVNode as M, createBlock as E, withCtx as O, normalizeClass as de, normalizeStyle as oe, mergeProps as ne, resolveDynamicComponent as Rt, createTextVNode as tn, renderSlot as J, createSlots as Ft } from "vue";
1
+ import { defineComponent as Q, h as X, isRef as Jt, shallowRef as Zt, watch as yt, ref as K, watchEffect as en, unref as C, computed as G, createElementBlock as y, openBlock as S, createCommentVNode as V, createElementVNode as A, toDisplayString as N, Fragment as H, renderList as z, createVNode as M, createBlock as E, withCtx as O, normalizeClass as de, normalizeStyle as oe, mergeProps as te, resolveDynamicComponent as Rt, createTextVNode as tn, renderSlot as J, createSlots as Ft } from "vue";
2
2
  import { DebouncedInput as bt, ButtonElement as Z, Tooltip as nn, formatDateTime as ke, formatDate as on, Dropdown as rn, ConfirmationModal as ln, Popup as sn, SortableList as an, getStorage as un, LoadingIcon as cn, FilesList as dn } from "@prefabs.tech/vue3-ui";
3
3
  import { SelectInput as gn, DatePicker as fn, NumberInput as tt, Checkbox as Te } from "@prefabs.tech/vue3-form";
4
4
  const Pt = /^[a-z0-9]+(-[a-z0-9]+)*$/, Re = (e, o, t, n = "") => {
@@ -11,13 +11,13 @@ const Pt = /^[a-z0-9]+(-[a-z0-9]+)*$/, Re = (e, o, t, n = "") => {
11
11
  if (i.length > 3 || !i.length)
12
12
  return null;
13
13
  if (i.length > 1) {
14
- const s = i.pop(), a = i.pop(), c = {
14
+ const s = i.pop(), a = i.pop(), u = {
15
15
  // Allow provider without '@': "provider:prefix:name"
16
16
  provider: i.length > 0 ? i[0] : n,
17
17
  prefix: a,
18
18
  name: s
19
19
  };
20
- return o && !Se(c) ? null : c;
20
+ return o && !Se(u) ? null : u;
21
21
  }
22
22
  const r = i[0], l = r.split("-");
23
23
  if (l.length > 1) {
@@ -291,11 +291,11 @@ function An(e, o) {
291
291
  };
292
292
  let r = t.body;
293
293
  [t, n].forEach((m) => {
294
- const h = [], R = m.hFlip, $ = m.vFlip;
294
+ const h = [], R = m.hFlip, I = m.vFlip;
295
295
  let P = m.rotate;
296
- R ? $ ? P += 2 : (h.push(
296
+ R ? I ? P += 2 : (h.push(
297
297
  "translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"
298
- ), h.push("scale(-1 1)"), i.top = i.left = 0) : $ && (h.push(
298
+ ), h.push("scale(-1 1)"), i.top = i.left = 0) : I && (h.push(
299
299
  "translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"
300
300
  ), h.push("scale(1 -1)"), i.top = i.left = 0);
301
301
  let _;
@@ -322,14 +322,14 @@ function An(e, o) {
322
322
  "</g>"
323
323
  ));
324
324
  });
325
- const l = n.width, s = n.height, a = i.width, c = i.height;
326
- let u, f;
327
- l === null ? (f = s === null ? "1em" : s === "auto" ? c : s, u = it(f, a / c)) : (u = l === "auto" ? a : l, f = s === null ? it(u, c / a) : s === "auto" ? c : s);
325
+ const l = n.width, s = n.height, a = i.width, u = i.height;
326
+ let c, f;
327
+ l === null ? (f = s === null ? "1em" : s === "auto" ? u : s, c = it(f, a / u)) : (c = l === "auto" ? a : l, f = s === null ? it(c, u / a) : s === "auto" ? u : s);
328
328
  const g = {}, d = (m, h) => {
329
329
  xn(h) || (g[m] = h.toString());
330
330
  };
331
- d("width", u), d("height", f);
332
- const p = [i.left, i.top, a, c];
331
+ d("width", c), d("height", f);
332
+ const p = [i.left, i.top, a, u];
333
333
  return g.viewBox = p.join(" "), {
334
334
  attributes: g,
335
335
  viewBox: p,
@@ -441,8 +441,8 @@ const Bn = (e, o, t) => {
441
441
  prefix: o,
442
442
  icons: []
443
443
  }, s = 0;
444
- return t.forEach((a, c) => {
445
- s += a.length + 1, s >= i && c > 0 && (n.push(l), l = {
444
+ return t.forEach((a, u) => {
445
+ s += a.length + 1, s >= i && u > 0 && (n.push(l), l = {
446
446
  type: r,
447
447
  provider: e,
448
448
  prefix: o,
@@ -524,15 +524,15 @@ function Nn(e) {
524
524
  if (n.name === i.name && n.prefix === i.prefix && n.provider === i.provider)
525
525
  return;
526
526
  n = i;
527
- const r = i.provider, l = i.prefix, s = i.name, a = t[r] || (t[r] = /* @__PURE__ */ Object.create(null)), c = a[l] || (a[l] = ie(r, l));
528
- let u;
529
- s in c.icons ? u = o.loaded : l === "" || c.missing.has(s) ? u = o.missing : u = o.pending;
527
+ const r = i.provider, l = i.prefix, s = i.name, a = t[r] || (t[r] = /* @__PURE__ */ Object.create(null)), u = a[l] || (a[l] = ie(r, l));
528
+ let c;
529
+ s in u.icons ? c = o.loaded : l === "" || u.missing.has(s) ? c = o.missing : c = o.pending;
530
530
  const f = {
531
531
  provider: r,
532
532
  prefix: l,
533
533
  name: s
534
534
  };
535
- u.push(f);
535
+ c.push(f);
536
536
  }), o;
537
537
  }
538
538
  function Mt(e, o) {
@@ -554,18 +554,18 @@ function jn(e) {
554
554
  l.pending = l.pending.filter((a) => {
555
555
  if (a.prefix !== i)
556
556
  return !0;
557
- const c = a.name;
558
- if (e.icons[c])
557
+ const u = a.name;
558
+ if (e.icons[u])
559
559
  l.loaded.push({
560
560
  provider: n,
561
561
  prefix: i,
562
- name: c
562
+ name: u
563
563
  });
564
- else if (e.missing.has(c))
564
+ else if (e.missing.has(u))
565
565
  l.missing.push({
566
566
  provider: n,
567
567
  prefix: i,
568
- name: c
568
+ name: u
569
569
  });
570
570
  else
571
571
  return t = !0, !0;
@@ -615,14 +615,14 @@ function Qn(e, o, t, n) {
615
615
  if (e.random) {
616
616
  let w = e.resources.slice(0);
617
617
  for (l = []; w.length > 1; ) {
618
- const I = Math.floor(Math.random() * w.length);
619
- l.push(w[I]), w = w.slice(0, I).concat(w.slice(I + 1));
618
+ const $ = Math.floor(Math.random() * w.length);
619
+ l.push(w[$]), w = w.slice(0, $).concat(w.slice($ + 1));
620
620
  }
621
621
  l = l.concat(w);
622
622
  } else
623
623
  l = e.resources.slice(r).concat(e.resources.slice(0, r));
624
624
  const s = Date.now();
625
- let a = "pending", c = 0, u, f = null, g = [], d = [];
625
+ let a = "pending", u = 0, c, f = null, g = [], d = [];
626
626
  typeof n == "function" && d.push(n);
627
627
  function p() {
628
628
  f && (clearTimeout(f), f = null);
@@ -632,23 +632,23 @@ function Qn(e, o, t, n) {
632
632
  w.status === "pending" && (w.status = "aborted");
633
633
  }), g = [];
634
634
  }
635
- function h(w, I) {
636
- I && (d = []), typeof w == "function" && d.push(w);
635
+ function h(w, $) {
636
+ $ && (d = []), typeof w == "function" && d.push(w);
637
637
  }
638
638
  function R() {
639
639
  return {
640
640
  startTime: s,
641
641
  payload: o,
642
642
  status: a,
643
- queriesSent: c,
643
+ queriesSent: u,
644
644
  queriesPending: g.length,
645
645
  subscribe: h,
646
646
  abort: m
647
647
  };
648
648
  }
649
- function $() {
649
+ function I() {
650
650
  a = "failed", d.forEach((w) => {
651
- w(void 0, u);
651
+ w(void 0, c);
652
652
  });
653
653
  }
654
654
  function P() {
@@ -656,8 +656,8 @@ function Qn(e, o, t, n) {
656
656
  w.status === "pending" && (w.status = "aborted");
657
657
  }), g = [];
658
658
  }
659
- function _(w, I, D) {
660
- const L = I !== "success";
659
+ function _(w, $, D) {
660
+ const L = $ !== "success";
661
661
  switch (g = g.filter((k) => k !== w), a) {
662
662
  case "pending":
663
663
  break;
@@ -668,12 +668,12 @@ function Qn(e, o, t, n) {
668
668
  default:
669
669
  return;
670
670
  }
671
- if (I === "abort") {
672
- u = D, $();
671
+ if ($ === "abort") {
672
+ c = D, I();
673
673
  return;
674
674
  }
675
675
  if (L) {
676
- u = D, g.length || (l.length ? v() : $());
676
+ c = D, g.length || (l.length ? v() : I());
677
677
  return;
678
678
  }
679
679
  if (p(), P(), !e.random) {
@@ -692,21 +692,21 @@ function Qn(e, o, t, n) {
692
692
  if (w === void 0) {
693
693
  if (g.length) {
694
694
  f = setTimeout(() => {
695
- p(), a === "pending" && (P(), $());
695
+ p(), a === "pending" && (P(), I());
696
696
  }, e.timeout);
697
697
  return;
698
698
  }
699
- $();
699
+ I();
700
700
  return;
701
701
  }
702
- const I = {
702
+ const $ = {
703
703
  status: "pending",
704
704
  resource: w,
705
705
  callback: (D, L) => {
706
- _(I, D, L);
706
+ _($, D, L);
707
707
  }
708
708
  };
709
- g.push(I), c++, f = setTimeout(v, e.rotate), t(w, o, I.callback);
709
+ g.push($), u++, f = setTimeout(v, e.rotate), t(w, o, $.callback);
710
710
  }
711
711
  return setTimeout(v), R;
712
712
  }
@@ -719,16 +719,16 @@ function Et(e) {
719
719
  function n() {
720
720
  t = t.filter((s) => s().status === "pending");
721
721
  }
722
- function i(s, a, c) {
723
- const u = Qn(
722
+ function i(s, a, u) {
723
+ const c = Qn(
724
724
  o,
725
725
  s,
726
726
  a,
727
727
  (f, g) => {
728
- n(), c && c(f, g);
728
+ n(), u && u(f, g);
729
729
  }
730
730
  );
731
- return t.push(u), u;
731
+ return t.push(c), c;
732
732
  }
733
733
  function r(s) {
734
734
  return t.find((a) => s(a)) || null;
@@ -829,23 +829,23 @@ function eo(e, o) {
829
829
  if (e.loadIcons && (i.length > 1 || !r)) {
830
830
  at(
831
831
  e.loadIcons(i, n, t),
832
- (u) => {
833
- le(e, i, u);
832
+ (c) => {
833
+ le(e, i, c);
834
834
  }
835
835
  );
836
836
  return;
837
837
  }
838
838
  if (r) {
839
- i.forEach((u) => {
840
- const f = r(u, n, t);
839
+ i.forEach((c) => {
840
+ const f = r(c, n, t);
841
841
  at(f, (g) => {
842
842
  const d = g ? {
843
843
  prefix: n,
844
844
  icons: {
845
- [u]: g
845
+ [c]: g
846
846
  }
847
847
  } : null;
848
- le(e, [u], d);
848
+ le(e, [c], d);
849
849
  });
850
850
  });
851
851
  return;
@@ -858,9 +858,9 @@ function eo(e, o) {
858
858
  le(e, l, null);
859
859
  return;
860
860
  }
861
- a.prepare(t, n, l).forEach((u) => {
862
- Yn(t, u, (f) => {
863
- le(e, u.icons, f);
861
+ a.prepare(t, n, l).forEach((c) => {
862
+ Yn(t, c, (f) => {
863
+ le(e, c.icons, f);
864
864
  });
865
865
  });
866
866
  }));
@@ -883,18 +883,18 @@ const to = (e, o) => {
883
883
  const i = /* @__PURE__ */ Object.create(null), r = [];
884
884
  let l, s;
885
885
  return n.pending.forEach((a) => {
886
- const { provider: c, prefix: u } = a;
887
- if (u === s && c === l)
886
+ const { provider: u, prefix: c } = a;
887
+ if (c === s && u === l)
888
888
  return;
889
- l = c, s = u, r.push(ie(c, u));
890
- const f = i[c] || (i[c] = /* @__PURE__ */ Object.create(null));
891
- f[u] || (f[u] = []);
889
+ l = u, s = c, r.push(ie(u, c));
890
+ const f = i[u] || (i[u] = /* @__PURE__ */ Object.create(null));
891
+ f[c] || (f[c] = []);
892
892
  }), n.pending.forEach((a) => {
893
- const { provider: c, prefix: u, name: f } = a, g = ie(c, u), d = g.pendingIcons || (g.pendingIcons = /* @__PURE__ */ new Set());
894
- d.has(f) || (d.add(f), i[c][u].push(f));
893
+ const { provider: u, prefix: c, name: f } = a, g = ie(u, c), d = g.pendingIcons || (g.pendingIcons = /* @__PURE__ */ new Set());
894
+ d.has(f) || (d.add(f), i[u][c].push(f));
895
895
  }), r.forEach((a) => {
896
- const c = i[a.provider][a.prefix];
897
- c.length && eo(a, c);
896
+ const u = i[a.provider][a.prefix];
897
+ u.length && eo(a, u);
898
898
  }), o ? Kn(o, n, r) : st;
899
899
  };
900
900
  function no(e, o) {
@@ -1039,25 +1039,25 @@ const ft = (e, o) => {
1039
1039
  }
1040
1040
  }
1041
1041
  }
1042
- const a = An(e, t), c = a.attributes;
1042
+ const a = An(e, t), u = a.attributes;
1043
1043
  if (t.inline && (r.verticalAlign = "-0.125em"), i === "svg") {
1044
1044
  n.style = {
1045
1045
  ...r,
1046
1046
  ...s
1047
- }, Object.assign(n, c);
1047
+ }, Object.assign(n, u);
1048
1048
  let m = 0, h = o.id;
1049
1049
  return typeof h == "string" && (h = h.replace(/-/g, "_")), n.innerHTML = Mn(a.body, h ? () => h + "ID" + m++ : "iconifyVue"), X("svg", n);
1050
1050
  }
1051
- const { body: u, width: f, height: g } = e, d = i === "mask" || (i === "bg" ? !1 : u.indexOf("currentColor") !== -1), p = lo(u, {
1052
- ...c,
1051
+ const { body: c, width: f, height: g } = e, d = i === "mask" || (i === "bg" ? !1 : c.indexOf("currentColor") !== -1), p = lo(c, {
1052
+ ...u,
1053
1053
  width: f + "",
1054
1054
  height: g + ""
1055
1055
  });
1056
1056
  return n.style = {
1057
1057
  ...r,
1058
1058
  "--svg": uo(p),
1059
- width: gt(c.width),
1060
- height: gt(c.height),
1059
+ width: gt(u.width),
1060
+ height: gt(u.height),
1061
1061
  ...go,
1062
1062
  ...d ? Ge : Lt,
1063
1063
  ...s
@@ -1099,7 +1099,7 @@ if (typeof document < "u" && typeof window < "u") {
1099
1099
  const fo = {
1100
1100
  ...Fe,
1101
1101
  body: ""
1102
- }, N = Q({
1102
+ }, j = Q({
1103
1103
  // Do not inherit other attributes: it is handled by render()
1104
1104
  inheritAttrs: !1,
1105
1105
  // Set initial data
@@ -1223,17 +1223,17 @@ function F(e, o, t) {
1223
1223
  let l;
1224
1224
  t.key && t.debug && (l = Date.now());
1225
1225
  const s = e(r);
1226
- if (!(s.length !== n.length || s.some((u, f) => n[f] !== u)))
1226
+ if (!(s.length !== n.length || s.some((c, f) => n[f] !== c)))
1227
1227
  return i;
1228
1228
  n = s;
1229
- let c;
1230
- if (t.key && t.debug && (c = Date.now()), i = o(...s), t == null || t.onChange == null || t.onChange(i), t.key && t.debug && t != null && t.debug()) {
1231
- const u = Math.round((Date.now() - l) * 100) / 100, f = Math.round((Date.now() - c) * 100) / 100, g = f / 16, d = (p, m) => {
1229
+ let u;
1230
+ if (t.key && t.debug && (u = Date.now()), i = o(...s), t == null || t.onChange == null || t.onChange(i), t.key && t.debug && t != null && t.debug()) {
1231
+ const c = Math.round((Date.now() - l) * 100) / 100, f = Math.round((Date.now() - u) * 100) / 100, g = f / 16, d = (p, m) => {
1232
1232
  for (p = String(p); p.length < m; )
1233
1233
  p = " " + p;
1234
1234
  return p;
1235
1235
  };
1236
- console.info(`%c⏱ ${d(f, 5)} /${d(u, 5)} ms`, `
1236
+ console.info(`%c⏱ ${d(f, 5)} /${d(c, 5)} ms`, `
1237
1237
  font-size: .6rem;
1238
1238
  font-weight: bold;
1239
1239
  color: hsl(${Math.max(0, Math.min(120 - 120 * g, 120))}deg 100% 31%);`, t?.key);
@@ -1261,13 +1261,13 @@ function vo(e, o, t, n) {
1261
1261
  column: t,
1262
1262
  getValue: () => o.getValue(n),
1263
1263
  renderValue: i,
1264
- getContext: F(() => [e, t, o, r], (l, s, a, c) => ({
1264
+ getContext: F(() => [e, t, o, r], (l, s, a, u) => ({
1265
1265
  table: l,
1266
1266
  column: s,
1267
1267
  row: a,
1268
- cell: c,
1269
- getValue: c.getValue,
1270
- renderValue: c.renderValue
1268
+ cell: u,
1269
+ getValue: u.getValue,
1270
+ renderValue: u.renderValue
1271
1271
  }), b(e.options, "debugCells", "cell.getContext"))
1272
1272
  };
1273
1273
  return e._features.forEach((l) => {
@@ -1280,19 +1280,19 @@ function So(e, o, t, n) {
1280
1280
  ...e._getDefaultColumnDef(),
1281
1281
  ...o
1282
1282
  }, a = s.accessorKey;
1283
- let c = (i = (r = s.id) != null ? r : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? i : typeof s.header == "string" ? s.header : void 0, u;
1284
- if (s.accessorFn ? u = s.accessorFn : a && (a.includes(".") ? u = (g) => {
1283
+ let u = (i = (r = s.id) != null ? r : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? i : typeof s.header == "string" ? s.header : void 0, c;
1284
+ if (s.accessorFn ? c = s.accessorFn : a && (a.includes(".") ? c = (g) => {
1285
1285
  let d = g;
1286
1286
  for (const m of a.split(".")) {
1287
1287
  var p;
1288
1288
  d = (p = d) == null ? void 0 : p[m], process.env.NODE_ENV !== "production" && d === void 0 && console.warn(`"${m}" in deeply nested key "${a}" returned undefined.`);
1289
1289
  }
1290
1290
  return d;
1291
- } : u = (g) => g[s.accessorKey]), !c)
1291
+ } : c = (g) => g[s.accessorKey]), !u)
1292
1292
  throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
1293
1293
  let f = {
1294
- id: `${String(c)}`,
1295
- accessorFn: u,
1294
+ id: `${String(u)}`,
1295
+ accessorFn: c,
1296
1296
  parent: n,
1297
1297
  depth: t,
1298
1298
  columnDef: s,
@@ -1348,8 +1348,8 @@ const wo = {
1348
1348
  createTable: (e) => {
1349
1349
  e.getHeaderGroups = F(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, i) => {
1350
1350
  var r, l;
1351
- const s = (r = n?.map((f) => t.find((g) => g.id === f)).filter(Boolean)) != null ? r : [], a = (l = i?.map((f) => t.find((g) => g.id === f)).filter(Boolean)) != null ? l : [], c = t.filter((f) => !(n != null && n.includes(f.id)) && !(i != null && i.includes(f.id)));
1352
- return pe(o, [...s, ...c, ...a], e);
1351
+ const s = (r = n?.map((f) => t.find((g) => g.id === f)).filter(Boolean)) != null ? r : [], a = (l = i?.map((f) => t.find((g) => g.id === f)).filter(Boolean)) != null ? l : [], u = t.filter((f) => !(n != null && n.includes(f.id)) && !(i != null && i.includes(f.id)));
1352
+ return pe(o, [...s, ...u, ...a], e);
1353
1353
  }, b(e.options, B, "getHeaderGroups")), e.getCenterHeaderGroups = F(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, i) => (t = t.filter((r) => !(n != null && n.includes(r.id)) && !(i != null && i.includes(r.id))), pe(o, t, e, "center")), b(e.options, B, "getCenterHeaderGroups")), e.getLeftHeaderGroups = F(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
1354
1354
  var i;
1355
1355
  const r = (i = n?.map((l) => t.find((s) => s.id === l)).filter(Boolean)) != null ? i : [];
@@ -1368,8 +1368,8 @@ const wo = {
1368
1368
  var n;
1369
1369
  return !((n = t.subHeaders) != null && n.length);
1370
1370
  }), b(e.options, B, "getRightLeafHeaders")), e.getLeafHeaders = F(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
1371
- var i, r, l, s, a, c;
1372
- return [...(i = (r = o[0]) == null ? void 0 : r.headers) != null ? i : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(a = (c = n[0]) == null ? void 0 : c.headers) != null ? a : []].map((u) => u.getLeafHeaders()).flat();
1371
+ var i, r, l, s, a, u;
1372
+ return [...(i = (r = o[0]) == null ? void 0 : r.headers) != null ? i : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(a = (u = n[0]) == null ? void 0 : u.headers) != null ? a : []].map((c) => c.getLeafHeaders()).flat();
1373
1373
  }, b(e.options, B, "getLeafHeaders"));
1374
1374
  }
1375
1375
  };
@@ -1384,16 +1384,16 @@ function pe(e, o, t, n) {
1384
1384
  };
1385
1385
  s(e);
1386
1386
  let a = [];
1387
- const c = (g, d) => {
1387
+ const u = (g, d) => {
1388
1388
  const p = {
1389
1389
  depth: d,
1390
1390
  id: [n, `${d}`].filter(Boolean).join("_"),
1391
1391
  headers: []
1392
1392
  }, m = [];
1393
1393
  g.forEach((h) => {
1394
- const R = [...m].reverse()[0], $ = h.column.depth === p.depth;
1394
+ const R = [...m].reverse()[0], I = h.column.depth === p.depth;
1395
1395
  let P, _ = !1;
1396
- if ($ && h.column.parent ? P = h.column.parent : (P = h.column, _ = !0), R && R?.column === P)
1396
+ if (I && h.column.parent ? P = h.column.parent : (P = h.column, _ = !0), R && R?.column === P)
1397
1397
  R.subHeaders.push(h);
1398
1398
  else {
1399
1399
  const v = pt(t, P, {
@@ -1406,12 +1406,12 @@ function pe(e, o, t, n) {
1406
1406
  v.subHeaders.push(h), m.push(v);
1407
1407
  }
1408
1408
  p.headers.push(h), h.headerGroup = p;
1409
- }), a.push(p), d > 0 && c(m, d - 1);
1410
- }, u = o.map((g, d) => pt(t, g, {
1409
+ }), a.push(p), d > 0 && u(m, d - 1);
1410
+ }, c = o.map((g, d) => pt(t, g, {
1411
1411
  depth: l,
1412
1412
  index: d
1413
1413
  }));
1414
- c(u, l - 1), a.reverse();
1414
+ u(c, l - 1), a.reverse();
1415
1415
  const f = (g) => g.filter((p) => p.column.getIsVisible()).map((p) => {
1416
1416
  let m = 0, h = 0, R = [0];
1417
1417
  p.subHeaders && p.subHeaders.length ? (R = [], f(p.subHeaders).forEach((P) => {
@@ -1421,8 +1421,8 @@ function pe(e, o, t, n) {
1421
1421
  } = P;
1422
1422
  m += _, R.push(v);
1423
1423
  })) : m = 1;
1424
- const $ = Math.min(...R);
1425
- return h = h + $, p.colSpan = m, p.rowSpan = h, {
1424
+ const I = Math.min(...R);
1425
+ return h = h + I, p.colSpan = m, p.rowSpan = h, {
1426
1426
  colSpan: m,
1427
1427
  rowSpan: h
1428
1428
  };
@@ -1441,39 +1441,39 @@ const Ye = (e, o, t, n, i, r, l) => {
1441
1441
  getValue: (a) => {
1442
1442
  if (s._valuesCache.hasOwnProperty(a))
1443
1443
  return s._valuesCache[a];
1444
- const c = e.getColumn(a);
1445
- if (c != null && c.accessorFn)
1446
- return s._valuesCache[a] = c.accessorFn(s.original, n), s._valuesCache[a];
1444
+ const u = e.getColumn(a);
1445
+ if (u != null && u.accessorFn)
1446
+ return s._valuesCache[a] = u.accessorFn(s.original, n), s._valuesCache[a];
1447
1447
  },
1448
1448
  getUniqueValues: (a) => {
1449
1449
  if (s._uniqueValuesCache.hasOwnProperty(a))
1450
1450
  return s._uniqueValuesCache[a];
1451
- const c = e.getColumn(a);
1452
- if (c != null && c.accessorFn)
1453
- return c.columnDef.getUniqueValues ? (s._uniqueValuesCache[a] = c.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[a]) : (s._uniqueValuesCache[a] = [s.getValue(a)], s._uniqueValuesCache[a]);
1451
+ const u = e.getColumn(a);
1452
+ if (u != null && u.accessorFn)
1453
+ return u.columnDef.getUniqueValues ? (s._uniqueValuesCache[a] = u.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[a]) : (s._uniqueValuesCache[a] = [s.getValue(a)], s._uniqueValuesCache[a]);
1454
1454
  },
1455
1455
  renderValue: (a) => {
1456
- var c;
1457
- return (c = s.getValue(a)) != null ? c : e.options.renderFallbackValue;
1456
+ var u;
1457
+ return (u = s.getValue(a)) != null ? u : e.options.renderFallbackValue;
1458
1458
  },
1459
1459
  subRows: [],
1460
1460
  getLeafRows: () => ho(s.subRows, (a) => a.subRows),
1461
1461
  getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
1462
1462
  getParentRows: () => {
1463
- let a = [], c = s;
1463
+ let a = [], u = s;
1464
1464
  for (; ; ) {
1465
- const u = c.getParentRow();
1466
- if (!u) break;
1467
- a.push(u), c = u;
1465
+ const c = u.getParentRow();
1466
+ if (!c) break;
1467
+ a.push(c), u = c;
1468
1468
  }
1469
1469
  return a.reverse();
1470
1470
  },
1471
- getAllCells: F(() => [e.getAllLeafColumns()], (a) => a.map((c) => vo(e, s, c, c.id)), b(e.options, "debugRows", "getAllCells")),
1472
- _getAllCellsByColumnId: F(() => [s.getAllCells()], (a) => a.reduce((c, u) => (c[u.column.id] = u, c), {}), b(e.options, "debugRows", "getAllCellsByColumnId"))
1471
+ getAllCells: F(() => [e.getAllLeafColumns()], (a) => a.map((u) => vo(e, s, u, u.id)), b(e.options, "debugRows", "getAllCells")),
1472
+ _getAllCellsByColumnId: F(() => [s.getAllCells()], (a) => a.reduce((u, c) => (u[c.column.id] = c, u), {}), b(e.options, "debugRows", "getAllCellsByColumnId"))
1473
1473
  };
1474
1474
  for (let a = 0; a < e._features.length; a++) {
1475
- const c = e._features[a];
1476
- c == null || c.createRow == null || c.createRow(s, e);
1475
+ const u = e._features[a];
1476
+ u == null || u.createRow == null || u.createRow(s, e);
1477
1477
  }
1478
1478
  return s;
1479
1479
  }, Co = {
@@ -1580,18 +1580,18 @@ const yo = {
1580
1580
  return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((i) => i.id === e.id)) != null ? t : -1;
1581
1581
  }, e.setFilterValue = (t) => {
1582
1582
  o.setColumnFilters((n) => {
1583
- const i = e.getFilterFn(), r = n?.find((u) => u.id === e.id), l = ee(t, r ? r.value : void 0);
1583
+ const i = e.getFilterFn(), r = n?.find((c) => c.id === e.id), l = ee(t, r ? r.value : void 0);
1584
1584
  if (mt(i, l, e)) {
1585
1585
  var s;
1586
- return (s = n?.filter((u) => u.id !== e.id)) != null ? s : [];
1586
+ return (s = n?.filter((c) => c.id !== e.id)) != null ? s : [];
1587
1587
  }
1588
1588
  const a = {
1589
1589
  id: e.id,
1590
1590
  value: l
1591
1591
  };
1592
1592
  if (r) {
1593
- var c;
1594
- return (c = n?.map((u) => u.id === e.id ? a : u)) != null ? c : [];
1593
+ var u;
1594
+ return (u = n?.map((c) => c.id === e.id ? a : c)) != null ? u : [];
1595
1595
  }
1596
1596
  return n != null && n.length ? [...n, a] : [a];
1597
1597
  });
@@ -1773,8 +1773,8 @@ const Mo = {
1773
1773
  else {
1774
1774
  const l = [...o], s = [...i];
1775
1775
  for (; s.length && l.length; ) {
1776
- const a = l.shift(), c = s.findIndex((u) => u.id === a);
1777
- c > -1 && r.push(s.splice(c, 1)[0]);
1776
+ const a = l.shift(), u = s.findIndex((c) => c.id === a);
1777
+ u > -1 && r.push(s.splice(u, 1)[0]);
1778
1778
  }
1779
1779
  r = [...r, ...s];
1780
1780
  }
@@ -1805,10 +1805,10 @@ const Mo = {
1805
1805
  };
1806
1806
  }
1807
1807
  if (t === "left") {
1808
- var c, u;
1808
+ var u, c;
1809
1809
  return {
1810
- left: [...((c = i?.left) != null ? c : []).filter((f) => !(n != null && n.includes(f))), ...n],
1811
- right: ((u = i?.right) != null ? u : []).filter((f) => !(n != null && n.includes(f)))
1810
+ left: [...((u = i?.left) != null ? u : []).filter((f) => !(n != null && n.includes(f))), ...n],
1811
+ right: ((c = i?.right) != null ? c : []).filter((f) => !(n != null && n.includes(f)))
1812
1812
  };
1813
1813
  }
1814
1814
  return {
@@ -1925,25 +1925,25 @@ const Mo = {
1925
1925
  return (r) => {
1926
1926
  if (!n || !i || (r.persist == null || r.persist(), Ve(r) && r.touches && r.touches.length > 1))
1927
1927
  return;
1928
- const l = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], a = Ve(r) ? Math.round(r.touches[0].clientX) : r.clientX, c = {}, u = (R, $) => {
1929
- typeof $ == "number" && (o.setColumnSizingInfo((P) => {
1928
+ const l = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], a = Ve(r) ? Math.round(r.touches[0].clientX) : r.clientX, u = {}, c = (R, I) => {
1929
+ typeof I == "number" && (o.setColumnSizingInfo((P) => {
1930
1930
  var _, v;
1931
- const w = o.options.columnResizeDirection === "rtl" ? -1 : 1, I = ($ - ((_ = P?.startOffset) != null ? _ : 0)) * w, D = Math.max(I / ((v = P?.startSize) != null ? v : 0), -0.999999);
1931
+ const w = o.options.columnResizeDirection === "rtl" ? -1 : 1, $ = (I - ((_ = P?.startOffset) != null ? _ : 0)) * w, D = Math.max($ / ((v = P?.startSize) != null ? v : 0), -0.999999);
1932
1932
  return P.columnSizingStart.forEach((L) => {
1933
1933
  let [k, U] = L;
1934
- c[k] = Math.round(Math.max(U + U * D, 0) * 100) / 100;
1934
+ u[k] = Math.round(Math.max(U + U * D, 0) * 100) / 100;
1935
1935
  }), {
1936
1936
  ...P,
1937
- deltaOffset: I,
1937
+ deltaOffset: $,
1938
1938
  deltaPercentage: D
1939
1939
  };
1940
1940
  }), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing((P) => ({
1941
1941
  ...P,
1942
- ...c
1942
+ ...u
1943
1943
  })));
1944
- }, f = (R) => u("move", R), g = (R) => {
1945
- u("end", R), o.setColumnSizingInfo(($) => ({
1946
- ...$,
1944
+ }, f = (R) => c("move", R), g = (R) => {
1945
+ c("end", R), o.setColumnSizingInfo((I) => ({
1946
+ ...I,
1947
1947
  isResizingColumn: !1,
1948
1948
  startOffset: null,
1949
1949
  startSize: null,
@@ -1959,8 +1959,8 @@ const Mo = {
1959
1959
  }, m = {
1960
1960
  moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), f(R.touches[0].clientX), !1),
1961
1961
  upHandler: (R) => {
1962
- var $;
1963
- d?.removeEventListener("touchmove", m.moveHandler), d?.removeEventListener("touchend", m.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), g(($ = R.touches[0]) == null ? void 0 : $.clientX);
1962
+ var I;
1963
+ d?.removeEventListener("touchmove", m.moveHandler), d?.removeEventListener("touchend", m.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), g((I = R.touches[0]) == null ? void 0 : I.clientX);
1964
1964
  }
1965
1965
  }, h = ko() ? {
1966
1966
  passive: !1
@@ -2292,17 +2292,17 @@ const Ho = {
2292
2292
  e.pin = (t, n, i) => {
2293
2293
  const r = n ? e.getLeafRows().map((a) => {
2294
2294
  let {
2295
- id: c
2295
+ id: u
2296
2296
  } = a;
2297
- return c;
2297
+ return u;
2298
2298
  }) : [], l = i ? e.getParentRows().map((a) => {
2299
2299
  let {
2300
- id: c
2300
+ id: u
2301
2301
  } = a;
2302
- return c;
2302
+ return u;
2303
2303
  }) : [], s = /* @__PURE__ */ new Set([...l, e.id, ...r]);
2304
2304
  o.setRowPinning((a) => {
2305
- var c, u;
2305
+ var u, c;
2306
2306
  if (t === "bottom") {
2307
2307
  var f, g;
2308
2308
  return {
@@ -2318,8 +2318,8 @@ const Ho = {
2318
2318
  };
2319
2319
  }
2320
2320
  return {
2321
- top: ((c = a?.top) != null ? c : []).filter((m) => !(s != null && s.has(m))),
2322
- bottom: ((u = a?.bottom) != null ? u : []).filter((m) => !(s != null && s.has(m)))
2321
+ top: ((u = a?.top) != null ? u : []).filter((m) => !(s != null && s.has(m))),
2322
+ bottom: ((c = a?.bottom) != null ? c : []).filter((m) => !(s != null && s.has(m)))
2323
2323
  };
2324
2324
  });
2325
2325
  }, e.getCanPin = () => {
@@ -2507,12 +2507,12 @@ const Ho = {
2507
2507
  function Me(e, o) {
2508
2508
  const t = e.getState().rowSelection, n = [], i = {}, r = function(l, s) {
2509
2509
  return l.map((a) => {
2510
- var c;
2511
- const u = Ze(a, t);
2512
- if (u && (n.push(a), i[a.id] = a), (c = a.subRows) != null && c.length && (a = {
2510
+ var u;
2511
+ const c = Ze(a, t);
2512
+ if (c && (n.push(a), i[a.id] = a), (u = a.subRows) != null && u.length && (a = {
2513
2513
  ...a,
2514
2514
  subRows: r(a.subRows)
2515
- }), u)
2515
+ }), c)
2516
2516
  return a;
2517
2517
  }).filter(Boolean);
2518
2518
  };
@@ -2537,14 +2537,14 @@ function qe(e, o, t) {
2537
2537
  }
2538
2538
  }), i ? "all" : r ? "some" : !1;
2539
2539
  }
2540
- const Ke = /([0-9]+)/gm, jo = (e, o, t) => jt(te(e.getValue(t)).toLowerCase(), te(o.getValue(t)).toLowerCase()), qo = (e, o, t) => jt(te(e.getValue(t)), te(o.getValue(t))), Ko = (e, o, t) => et(te(e.getValue(t)).toLowerCase(), te(o.getValue(t)).toLowerCase()), Uo = (e, o, t) => et(te(e.getValue(t)), te(o.getValue(t))), Wo = (e, o, t) => {
2540
+ const Ke = /([0-9]+)/gm, jo = (e, o, t) => jt(ne(e.getValue(t)).toLowerCase(), ne(o.getValue(t)).toLowerCase()), qo = (e, o, t) => jt(ne(e.getValue(t)), ne(o.getValue(t))), Ko = (e, o, t) => et(ne(e.getValue(t)).toLowerCase(), ne(o.getValue(t)).toLowerCase()), Uo = (e, o, t) => et(ne(e.getValue(t)), ne(o.getValue(t))), Wo = (e, o, t) => {
2541
2541
  const n = e.getValue(t), i = o.getValue(t);
2542
2542
  return n > i ? 1 : n < i ? -1 : 0;
2543
2543
  }, Qo = (e, o, t) => et(e.getValue(t), o.getValue(t));
2544
2544
  function et(e, o) {
2545
2545
  return e === o ? 0 : e > o ? 1 : -1;
2546
2546
  }
2547
- function te(e) {
2547
+ function ne(e) {
2548
2548
  return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
2549
2549
  }
2550
2550
  function jt(e, o) {
@@ -2611,21 +2611,21 @@ const se = {
2611
2611
  const i = e.getNextSortingOrder(), r = typeof t < "u" && t !== null;
2612
2612
  o.setSorting((l) => {
2613
2613
  const s = l?.find((d) => d.id === e.id), a = l?.findIndex((d) => d.id === e.id);
2614
- let c = [], u, f = r ? t : i === "desc";
2615
- if (l != null && l.length && e.getCanMultiSort() && n ? s ? u = "toggle" : u = "add" : l != null && l.length && a !== l.length - 1 ? u = "replace" : s ? u = "toggle" : u = "replace", u === "toggle" && (r || i || (u = "remove")), u === "add") {
2614
+ let u = [], c, f = r ? t : i === "desc";
2615
+ if (l != null && l.length && e.getCanMultiSort() && n ? s ? c = "toggle" : c = "add" : l != null && l.length && a !== l.length - 1 ? c = "replace" : s ? c = "toggle" : c = "replace", c === "toggle" && (r || i || (c = "remove")), c === "add") {
2616
2616
  var g;
2617
- c = [...l, {
2617
+ u = [...l, {
2618
2618
  id: e.id,
2619
2619
  desc: f
2620
- }], c.splice(0, c.length - ((g = o.options.maxMultiSortColCount) != null ? g : Number.MAX_SAFE_INTEGER));
2621
- } else u === "toggle" ? c = l.map((d) => d.id === e.id ? {
2620
+ }], u.splice(0, u.length - ((g = o.options.maxMultiSortColCount) != null ? g : Number.MAX_SAFE_INTEGER));
2621
+ } else c === "toggle" ? u = l.map((d) => d.id === e.id ? {
2622
2622
  ...d,
2623
2623
  desc: f
2624
- } : d) : u === "remove" ? c = l.filter((d) => d.id !== e.id) : c = [{
2624
+ } : d) : c === "remove" ? u = l.filter((d) => d.id !== e.id) : u = [{
2625
2625
  id: e.id,
2626
2626
  desc: f
2627
2627
  }];
2628
- return c;
2628
+ return u;
2629
2629
  });
2630
2630
  }, e.getFirstSortDir = () => {
2631
2631
  var t, n;
@@ -2702,8 +2702,8 @@ function Jo(e) {
2702
2702
  var d;
2703
2703
  a = (d = g.getInitialState == null ? void 0 : g.getInitialState(a)) != null ? d : a;
2704
2704
  });
2705
- const c = [];
2706
- let u = !1;
2705
+ const u = [];
2706
+ let c = !1;
2707
2707
  const f = {
2708
2708
  _features: n,
2709
2709
  options: {
@@ -2712,10 +2712,10 @@ function Jo(e) {
2712
2712
  },
2713
2713
  initialState: a,
2714
2714
  _queue: (g) => {
2715
- c.push(g), u || (u = !0, Promise.resolve().then(() => {
2716
- for (; c.length; )
2717
- c.shift()();
2718
- u = !1;
2715
+ u.push(g), c || (c = !0, Promise.resolve().then(() => {
2716
+ for (; u.length; )
2717
+ u.shift()();
2718
+ c = !1;
2719
2719
  }).catch((d) => setTimeout(() => {
2720
2720
  throw d;
2721
2721
  })));
@@ -2766,8 +2766,8 @@ function Jo(e) {
2766
2766
  getAllColumns: F(() => [i._getColumnDefs()], (g) => {
2767
2767
  const d = function(p, m, h) {
2768
2768
  return h === void 0 && (h = 0), p.map((R) => {
2769
- const $ = So(i, R, h, m), P = R;
2770
- return $.columns = P.columns ? d(P.columns, $, h + 1) : [], $;
2769
+ const I = So(i, R, h, m), P = R;
2770
+ return I.columns = P.columns ? d(P.columns, I, h + 1) : [], I;
2771
2771
  });
2772
2772
  };
2773
2773
  return d(g);
@@ -2799,11 +2799,11 @@ function qt() {
2799
2799
  }, n = function(i, r, l) {
2800
2800
  r === void 0 && (r = 0);
2801
2801
  const s = [];
2802
- for (let c = 0; c < i.length; c++) {
2803
- const u = Ye(e, e._getRowId(i[c], c, l), i[c], c, r, void 0, l?.id);
2804
- if (t.flatRows.push(u), t.rowsById[u.id] = u, s.push(u), e.options.getSubRows) {
2802
+ for (let u = 0; u < i.length; u++) {
2803
+ const c = Ye(e, e._getRowId(i[u], u, l), i[u], u, r, void 0, l?.id);
2804
+ if (t.flatRows.push(c), t.rowsById[c.id] = c, s.push(c), e.options.getSubRows) {
2805
2805
  var a;
2806
- u.originalSubRows = e.options.getSubRows(i[c], c), (a = u.originalSubRows) != null && a.length && (u.subRows = n(u.originalSubRows, r + 1, u));
2806
+ c.originalSubRows = e.options.getSubRows(i[u], u), (a = c.originalSubRows) != null && a.length && (c.subRows = n(c.originalSubRows, r + 1, c));
2807
2807
  }
2808
2808
  }
2809
2809
  return s;
@@ -2827,26 +2827,26 @@ function ei(e, o, t) {
2827
2827
  }
2828
2828
  function ti(e, o, t) {
2829
2829
  var n;
2830
- const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(a, c) {
2831
- c === void 0 && (c = 0);
2832
- const u = [];
2830
+ const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(a, u) {
2831
+ u === void 0 && (u = 0);
2832
+ const c = [];
2833
2833
  for (let g = 0; g < a.length; g++) {
2834
2834
  var f;
2835
2835
  let d = a[g];
2836
2836
  const p = Ye(t, d.id, d.original, d.index, d.depth, void 0, d.parentId);
2837
- if (p.columnFilters = d.columnFilters, (f = d.subRows) != null && f.length && c < l) {
2838
- if (p.subRows = s(d.subRows, c + 1), d = p, o(d) && !p.subRows.length) {
2839
- u.push(d), r[d.id] = d, i.push(d);
2837
+ if (p.columnFilters = d.columnFilters, (f = d.subRows) != null && f.length && u < l) {
2838
+ if (p.subRows = s(d.subRows, u + 1), d = p, o(d) && !p.subRows.length) {
2839
+ c.push(d), r[d.id] = d, i.push(d);
2840
2840
  continue;
2841
2841
  }
2842
2842
  if (o(d) || p.subRows.length) {
2843
- u.push(d), r[d.id] = d, i.push(d);
2843
+ c.push(d), r[d.id] = d, i.push(d);
2844
2844
  continue;
2845
2845
  }
2846
2846
  } else
2847
- d = p, o(d) && (u.push(d), r[d.id] = d, i.push(d));
2847
+ d = p, o(d) && (c.push(d), r[d.id] = d, i.push(d));
2848
2848
  }
2849
- return u;
2849
+ return c;
2850
2850
  };
2851
2851
  return {
2852
2852
  rows: s(e),
@@ -2856,21 +2856,21 @@ function ti(e, o, t) {
2856
2856
  }
2857
2857
  function ni(e, o, t) {
2858
2858
  var n;
2859
- const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(a, c) {
2860
- c === void 0 && (c = 0);
2861
- const u = [];
2859
+ const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(a, u) {
2860
+ u === void 0 && (u = 0);
2861
+ const c = [];
2862
2862
  for (let g = 0; g < a.length; g++) {
2863
2863
  let d = a[g];
2864
2864
  if (o(d)) {
2865
2865
  var f;
2866
- if ((f = d.subRows) != null && f.length && c < l) {
2866
+ if ((f = d.subRows) != null && f.length && u < l) {
2867
2867
  const m = Ye(t, d.id, d.original, d.index, d.depth, void 0, d.parentId);
2868
- m.subRows = s(d.subRows, c + 1), d = m;
2868
+ m.subRows = s(d.subRows, u + 1), d = m;
2869
2869
  }
2870
- u.push(d), i.push(d), r[d.id] = d;
2870
+ c.push(d), i.push(d), r[d.id] = d;
2871
2871
  }
2872
2872
  }
2873
- return u;
2873
+ return c;
2874
2874
  };
2875
2875
  return {
2876
2876
  rows: s(e),
@@ -2911,22 +2911,22 @@ function Kt() {
2911
2911
  resolvedValue: (d = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? d : n
2912
2912
  });
2913
2913
  }));
2914
- let c, u;
2914
+ let u, c;
2915
2915
  for (let g = 0; g < o.flatRows.length; g++) {
2916
2916
  const d = o.flatRows[g];
2917
2917
  if (d.columnFilters = {}, i.length)
2918
2918
  for (let p = 0; p < i.length; p++) {
2919
- c = i[p];
2920
- const m = c.id;
2921
- d.columnFilters[m] = c.filterFn(d, m, c.resolvedValue, (h) => {
2919
+ u = i[p];
2920
+ const m = u.id;
2921
+ d.columnFilters[m] = u.filterFn(d, m, u.resolvedValue, (h) => {
2922
2922
  d.columnFiltersMeta[m] = h;
2923
2923
  });
2924
2924
  }
2925
2925
  if (r.length) {
2926
2926
  for (let p = 0; p < r.length; p++) {
2927
- u = r[p];
2928
- const m = u.id;
2929
- if (u.filterFn(d, m, u.resolvedValue, (h) => {
2927
+ c = r[p];
2928
+ const m = c.id;
2929
+ if (c.filterFn(d, m, c.resolvedValue, (h) => {
2930
2930
  d.columnFiltersMeta[m] = h;
2931
2931
  })) {
2932
2932
  d.columnFilters.__global__ = !0;
@@ -2958,8 +2958,8 @@ function Ut(e) {
2958
2958
  flatRows: s,
2959
2959
  rowsById: a
2960
2960
  } = n;
2961
- const c = i * r, u = c + i;
2962
- l = l.slice(c, u);
2961
+ const u = i * r, c = u + i;
2962
+ l = l.slice(u, c);
2963
2963
  let f;
2964
2964
  o.options.paginateExpandedRows ? f = {
2965
2965
  rows: l,
@@ -2981,42 +2981,42 @@ function Wt() {
2981
2981
  if (!t.rows.length || !(o != null && o.length))
2982
2982
  return t;
2983
2983
  const n = e.getState().sorting, i = [], r = n.filter((a) => {
2984
- var c;
2985
- return (c = e.getColumn(a.id)) == null ? void 0 : c.getCanSort();
2984
+ var u;
2985
+ return (u = e.getColumn(a.id)) == null ? void 0 : u.getCanSort();
2986
2986
  }), l = {};
2987
2987
  r.forEach((a) => {
2988
- const c = e.getColumn(a.id);
2989
- c && (l[a.id] = {
2990
- sortUndefined: c.columnDef.sortUndefined,
2991
- invertSorting: c.columnDef.invertSorting,
2992
- sortingFn: c.getSortingFn()
2988
+ const u = e.getColumn(a.id);
2989
+ u && (l[a.id] = {
2990
+ sortUndefined: u.columnDef.sortUndefined,
2991
+ invertSorting: u.columnDef.invertSorting,
2992
+ sortingFn: u.getSortingFn()
2993
2993
  });
2994
2994
  });
2995
2995
  const s = (a) => {
2996
- const c = a.map((u) => ({
2997
- ...u
2996
+ const u = a.map((c) => ({
2997
+ ...c
2998
2998
  }));
2999
- return c.sort((u, f) => {
2999
+ return u.sort((c, f) => {
3000
3000
  for (let d = 0; d < r.length; d += 1) {
3001
3001
  var g;
3002
3002
  const p = r[d], m = l[p.id], h = m.sortUndefined, R = (g = p?.desc) != null ? g : !1;
3003
- let $ = 0;
3003
+ let I = 0;
3004
3004
  if (h) {
3005
- const P = u.getValue(p.id), _ = f.getValue(p.id), v = P === void 0, w = _ === void 0;
3005
+ const P = c.getValue(p.id), _ = f.getValue(p.id), v = P === void 0, w = _ === void 0;
3006
3006
  if (v || w) {
3007
3007
  if (h === "first") return v ? -1 : 1;
3008
3008
  if (h === "last") return v ? 1 : -1;
3009
- $ = v && w ? 0 : v ? h : -h;
3009
+ I = v && w ? 0 : v ? h : -h;
3010
3010
  }
3011
3011
  }
3012
- if ($ === 0 && ($ = m.sortingFn(u, f, p.id)), $ !== 0)
3013
- return R && ($ *= -1), m.invertSorting && ($ *= -1), $;
3012
+ if (I === 0 && (I = m.sortingFn(c, f, p.id)), I !== 0)
3013
+ return R && (I *= -1), m.invertSorting && (I *= -1), I;
3014
3014
  }
3015
- return u.index - f.index;
3016
- }), c.forEach((u) => {
3015
+ return c.index - f.index;
3016
+ }), u.forEach((c) => {
3017
3017
  var f;
3018
- i.push(u), (f = u.subRows) != null && f.length && (u.subRows = s(u.subRows));
3019
- }), c;
3018
+ i.push(c), (f = c.subRows) != null && f.length && (c.subRows = s(c.subRows));
3019
+ }), u;
3020
3020
  };
3021
3021
  return {
3022
3022
  rows: s(t.rows),
@@ -3127,7 +3127,7 @@ function Qt(e) {
3127
3127
  n.setOptions((r) => {
3128
3128
  var l;
3129
3129
  const s = new Proxy({}, {
3130
- get: (a, c) => i.value[c]
3130
+ get: (a, u) => i.value[u]
3131
3131
  });
3132
3132
  return ae(r, o ? ht(e) : e, {
3133
3133
  // merge the initialState and `options.state`
@@ -3214,32 +3214,32 @@ const ri = { class: "pagination" }, li = {
3214
3214
  ), r = G(
3215
3215
  () => Math.ceil(t.totalItems / i.value)
3216
3216
  ), l = G(
3217
- () => Array.from({ length: r.value }, (c, u) => u + 1)
3218
- ), s = (c) => {
3219
- const u = parseInt(
3220
- c.target.value,
3217
+ () => Array.from({ length: r.value }, (u, c) => c + 1)
3218
+ ), s = (u) => {
3219
+ const c = parseInt(
3220
+ u.target.value,
3221
3221
  10
3222
3222
  );
3223
- i.value = u, n("update:itemsPerPage", i.value);
3224
- }, a = (c) => {
3225
- const u = parseInt(c.toString(), 10) - 1;
3226
- !isNaN(u) && u >= 0 && u < r.value && n("update:currentPage", u);
3223
+ i.value = c, n("update:itemsPerPage", i.value);
3224
+ }, a = (u) => {
3225
+ const c = parseInt(u.toString(), 10) - 1;
3226
+ !isNaN(c) && c >= 0 && c < r.value && n("update:currentPage", c);
3227
3227
  };
3228
- return (c, u) => (S(), y("div", ri, [
3228
+ return (u, c) => (S(), y("div", ri, [
3229
3229
  e.showItemsPerPageControl ? (S(), y("div", li, [
3230
- A("span", null, z(e.itemsPerPageControlLabel), 1),
3230
+ A("span", null, N(e.itemsPerPageControlLabel), 1),
3231
3231
  A("select", {
3232
3232
  value: i.value,
3233
3233
  onChange: s
3234
3234
  }, [
3235
- (S(!0), y(H, null, j(e.itemsPerPageOptions, (f) => (S(), y("option", {
3235
+ (S(!0), y(H, null, z(e.itemsPerPageOptions, (f) => (S(), y("option", {
3236
3236
  key: `items-per-page-option-${f}`,
3237
3237
  value: f
3238
- }, z(f), 9, ai))), 128))
3238
+ }, N(f), 9, ai))), 128))
3239
3239
  ], 40, si)
3240
3240
  ])) : V("", !0),
3241
3241
  r.value > 1 && e.showPageInput ? (S(), y("div", ui, [
3242
- A("span", null, z(e.pageInputLabel), 1),
3242
+ A("span", null, N(e.pageInputLabel), 1),
3243
3243
  M(C(bt), {
3244
3244
  type: "number",
3245
3245
  "debounce-time": e.inputDebounceTime,
@@ -3253,10 +3253,10 @@ const ri = { class: "pagination" }, li = {
3253
3253
  disabled: !(e.currentPage > 0),
3254
3254
  class: "first-page",
3255
3255
  size: "small",
3256
- onClick: u[0] || (u[0] = (f) => c.$emit("update:currentPage", 0))
3256
+ onClick: c[0] || (c[0] = (f) => u.$emit("update:currentPage", 0))
3257
3257
  }, {
3258
3258
  iconLeft: O(() => [
3259
- M(C(N), { icon: "prime:angle-double-left" })
3259
+ M(C(j), { icon: "prime:angle-double-left" })
3260
3260
  ]),
3261
3261
  _: 1
3262
3262
  }, 8, ["disabled"])) : V("", !0),
@@ -3265,22 +3265,22 @@ const ri = { class: "pagination" }, li = {
3265
3265
  disabled: !(e.currentPage > 0),
3266
3266
  class: "previous-page",
3267
3267
  size: "small",
3268
- onClick: u[1] || (u[1] = (f) => c.$emit("update:currentPage", e.currentPage - 1))
3268
+ onClick: c[1] || (c[1] = (f) => u.$emit("update:currentPage", e.currentPage - 1))
3269
3269
  }, {
3270
3270
  iconLeft: O(() => [
3271
- M(C(N), { icon: "prime:angle-left" })
3271
+ M(C(j), { icon: "prime:angle-left" })
3272
3272
  ]),
3273
3273
  _: 1
3274
3274
  }, 8, ["disabled"])) : V("", !0)
3275
3275
  ])) : V("", !0),
3276
3276
  A("div", null, [
3277
- e.showPageButtons ? (S(!0), y(H, { key: 0 }, j(l.value, (f) => (S(), E(C(Z), {
3277
+ e.showPageButtons ? (S(!0), y(H, { key: 0 }, z(l.value, (f) => (S(), E(C(Z), {
3278
3278
  key: `page-button-${f}`,
3279
3279
  class: de(`page-button ${f === e.currentPage + 1 ? "active" : ""}`),
3280
3280
  label: `${f}`,
3281
3281
  size: "small",
3282
- onClick: (g) => c.$emit("update:currentPage", f - 1)
3283
- }, null, 8, ["class", "label", "onClick"]))), 128)) : (S(), y("span", gi, z(`${e.currentPage + 1} / ${r.value}`), 1))
3282
+ onClick: (g) => u.$emit("update:currentPage", f - 1)
3283
+ }, null, 8, ["class", "label", "onClick"]))), 128)) : (S(), y("span", gi, N(`${e.currentPage + 1} / ${r.value}`), 1))
3284
3284
  ]),
3285
3285
  e.showFirstLastButtons || e.showPreviousNextButtons ? (S(), y("div", fi, [
3286
3286
  e.showPreviousNextButtons ? (S(), E(C(Z), {
@@ -3288,10 +3288,10 @@ const ri = { class: "pagination" }, li = {
3288
3288
  disabled: !(e.currentPage < r.value - 1),
3289
3289
  class: "next-page",
3290
3290
  size: "small",
3291
- onClick: u[2] || (u[2] = (f) => c.$emit("update:currentPage", e.currentPage + 1))
3291
+ onClick: c[2] || (c[2] = (f) => u.$emit("update:currentPage", e.currentPage + 1))
3292
3292
  }, {
3293
3293
  iconLeft: O(() => [
3294
- M(C(N), { icon: "prime:angle-right" })
3294
+ M(C(j), { icon: "prime:angle-right" })
3295
3295
  ]),
3296
3296
  _: 1
3297
3297
  }, 8, ["disabled"])) : V("", !0),
@@ -3300,15 +3300,15 @@ const ri = { class: "pagination" }, li = {
3300
3300
  disabled: !(e.currentPage < r.value - 1),
3301
3301
  class: "last-page",
3302
3302
  size: "small",
3303
- onClick: u[3] || (u[3] = (f) => c.$emit("update:currentPage", r.value - 1))
3303
+ onClick: c[3] || (c[3] = (f) => u.$emit("update:currentPage", r.value - 1))
3304
3304
  }, {
3305
3305
  iconLeft: O(() => [
3306
- M(C(N), { icon: "prime:angle-double-right" })
3306
+ M(C(j), { icon: "prime:angle-double-right" })
3307
3307
  ]),
3308
3308
  _: 1
3309
3309
  }, 8, ["disabled"])) : V("", !0)
3310
3310
  ])) : V("", !0)
3311
- ])) : (S(), y("span", pi, z(`${e.currentPage + 1} / ${r.value}`), 1))
3311
+ ])) : (S(), y("span", pi, N(`${e.currentPage + 1} / ${r.value}`), 1))
3312
3312
  ]));
3313
3313
  }
3314
3314
  }), Le = 0, vi = [10, 20, 30], Si = 10, Xt = "table", vt = ({
@@ -3390,7 +3390,7 @@ const ri = { class: "pagination" }, li = {
3390
3390
  }, wi = (e, o, t) => {
3391
3391
  const n = () => {
3392
3392
  if (!o || o.length === 0) return null;
3393
- const s = o.filter((a) => Array.isArray(a.value) ? a.value.filter((u) => Yt(u)).length > 0 : typeof a.value == "string" ? a.value.trim() !== "" : a.value != null);
3393
+ const s = o.filter((a) => Array.isArray(a.value) ? a.value.filter((c) => Yt(c)).length > 0 : typeof a.value == "string" ? a.value.trim() !== "" : a.value != null);
3394
3394
  return s.length === 0 ? null : s.length === 1 ? Array.isArray(s[0].value) ? wt(s[0]) : {
3395
3395
  key: s[0].id,
3396
3396
  ...ce(s[0].filterFn || x.CONTAINS),
@@ -3465,7 +3465,7 @@ const ri = { class: "pagination" }, li = {
3465
3465
  return {
3466
3466
  props: r,
3467
3467
  render: (() => {
3468
- const u = {
3468
+ const c = {
3469
3469
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3470
3470
  number: (g) => vt({
3471
3471
  value: Number(g),
@@ -3496,7 +3496,7 @@ const ri = { class: "pagination" }, li = {
3496
3496
  }),
3497
3497
  ...o.customFormatters
3498
3498
  }, f = i.column.columnDef.dataType || "text";
3499
- return u?.[f]?.(r.getValue()) || a;
3499
+ return c?.[f]?.(r.getValue()) || a;
3500
3500
  })()
3501
3501
  };
3502
3502
  }, n = (i) => {
@@ -3504,12 +3504,12 @@ const ri = { class: "pagination" }, li = {
3504
3504
  return typeof r == "string" ? r : typeof r == "function" ? r(i) : i.getValue();
3505
3505
  };
3506
3506
  return (i, r) => (S(), y("tbody", null, [
3507
- e.table.getRowModel().rows?.length ? (S(!0), y(H, { key: 0 }, j(e.table.getRowModel().rows, (l) => (S(), y("tr", {
3507
+ e.table.getRowModel().rows?.length ? (S(!0), y(H, { key: 0 }, z(e.table.getRowModel().rows, (l) => (S(), y("tr", {
3508
3508
  key: `table-row-${l.id}`,
3509
3509
  "data-id": l.id,
3510
3510
  "data-selected": e.enableRowSelection ? l.getIsSelected() : void 0
3511
3511
  }, [
3512
- (S(!0), y(H, null, j(l.getVisibleCells(), (s) => (S(), y("td", {
3512
+ (S(!0), y(H, null, z(l.getVisibleCells(), (s) => (S(), y("td", {
3513
3513
  key: `table-data-${l.id}-${s.id}`,
3514
3514
  class: de([s.column.id ? `cell-${s.column.id}` : ""]),
3515
3515
  "data-label": s.column.id,
@@ -3523,26 +3523,26 @@ const ri = { class: "pagination" }, li = {
3523
3523
  minWidth: s.column.columnDef.minWidth
3524
3524
  })
3525
3525
  }, [
3526
- s.column.columnDef.tooltip ? (S(), E(C(nn), ne({
3526
+ s.column.columnDef.tooltip ? (S(), E(C(nn), te({
3527
3527
  key: 0,
3528
3528
  ref_for: !0
3529
3529
  }, s.column.columnDef.tooltipOptions), {
3530
3530
  content: O(() => [
3531
3531
  typeof s.column.columnDef.tooltip == "function" && typeof n(s) != "string" ? (S(), E(Rt(n(s)), { key: 0 })) : (S(), y(H, { key: 1 }, [
3532
- tn(z(n(s)), 1)
3532
+ tn(N(n(s)), 1)
3533
3533
  ], 64))
3534
3534
  ]),
3535
3535
  default: O(() => [
3536
- M(C(fe), ne({ ref_for: !0 }, t(s)), null, 16)
3536
+ M(C(fe), te({ ref_for: !0 }, t(s)), null, 16)
3537
3537
  ]),
3538
3538
  _: 2
3539
- }, 1040)) : (S(), E(C(fe), ne({
3539
+ }, 1040)) : (S(), E(C(fe), te({
3540
3540
  key: 1,
3541
3541
  ref_for: !0
3542
3542
  }, t(s)), null, 16))
3543
3543
  ], 14, Fi))), 128))
3544
3544
  ], 8, Ri))), 128)) : (S(), y("tr", bi, [
3545
- A("td", null, z(e.emptyTableMessage), 1)
3545
+ A("td", null, N(e.emptyTableMessage), 1)
3546
3546
  ]))
3547
3547
  ]));
3548
3548
  }
@@ -3558,6 +3558,10 @@ const ri = { class: "pagination" }, li = {
3558
3558
  type: Array,
3559
3559
  required: !0
3560
3560
  },
3561
+ autoModeCount: {
3562
+ default: 1,
3563
+ type: Number
3564
+ },
3561
3565
  data: {
3562
3566
  default: () => ({}),
3563
3567
  type: Object
@@ -3566,46 +3570,46 @@ const ri = { class: "pagination" }, li = {
3566
3570
  default: !0,
3567
3571
  type: [Boolean, Function]
3568
3572
  },
3569
- singleActionMode: {
3570
- default: "button",
3573
+ mode: {
3574
+ default: void 0,
3571
3575
  type: String,
3572
- validator: (e) => ["button", "menu"].includes(e)
3576
+ validator: (e) => ["buttons", "menu"].includes(e)
3573
3577
  }
3574
3578
  },
3575
- emits: ["action:click", "action:select"],
3579
+ emits: ["action:select"],
3576
3580
  setup(e, { emit: o }) {
3577
3581
  const t = e, n = o, i = K(!1), r = K(), l = G(
3578
- () => t.actions.map((f) => ({
3579
- ...f,
3580
- display: typeof f.display == "function" ? f.display(t.data) : f.display ?? !0,
3581
- disabled: typeof f.disabled == "function" ? f.disabled(t.data) : f.disabled
3582
- })).filter((f) => f.display)
3582
+ () => t.actions.map((c) => ({
3583
+ ...c,
3584
+ display: typeof c.display == "function" ? c.display(t.data) : c.display ?? !0,
3585
+ disabled: typeof c.disabled == "function" ? c.disabled(t.data) : c.disabled
3586
+ })).filter((c) => c.display)
3583
3587
  ), s = G(
3584
- () => l.value.length === 1 && l.value[0].icon && t.singleActionMode === "button"
3585
- ), a = G(
3586
- () => typeof t.displayActions == "function" ? t.displayActions(t.data) : t.displayActions
3587
- ), c = () => {
3588
+ () => (typeof t.displayActions == "function" ? t.displayActions(t.data) : t.displayActions) && l.value?.length
3589
+ ), a = () => {
3588
3590
  i.value = !1, n("action:select", r.value);
3589
- }, u = (f) => {
3590
- r.value = f, f?.requireConfirmationModal ? i.value = !0 : n("action:select", r.value);
3591
+ }, u = (c) => {
3592
+ r.value = c, c?.requireConfirmationModal ? i.value = !0 : n("action:select", r.value);
3591
3593
  };
3592
- return (f, g) => a.value ? (S(), y("div", Ii, [
3593
- s.value ? (S(), E(C(Z), {
3594
- key: 0,
3595
- disabled: l.value[0].disabled,
3596
- "icon-left": l.value[0].icon,
3597
- label: l.value[0].label,
3594
+ return (c, f) => s.value ? (S(), y("div", Ii, [
3595
+ e.mode === "buttons" ? (S(!0), y(H, { key: 0 }, z(l.value, (g, d) => (S(), E(C(Z), te({ ref_for: !0 }, g, {
3596
+ key: `mode-button-${d}`,
3597
+ class: g.class,
3598
+ disabled: g.disabled,
3599
+ "icon-left": g.icon,
3600
+ label: g.icon ? "" : g.label,
3601
+ title: g.label,
3598
3602
  rounded: "",
3599
3603
  variant: "textOnly",
3600
- onClick: g[0] || (g[0] = (d) => f.$emit("action:click"))
3601
- }, null, 8, ["disabled", "icon-left", "label"])) : l.value.length ? (S(), E(C(rn), {
3604
+ onClick: (p) => u(g)
3605
+ }), null, 16, ["class", "disabled", "icon-left", "label", "title", "onClick"]))), 128)) : e.mode === "menu" ? (S(), E(C(rn), {
3602
3606
  key: 1,
3603
3607
  menu: l.value,
3604
3608
  onSelect: u
3605
3609
  }, {
3606
3610
  default: O(() => [
3607
- J(f.$slots, "trigger", {}, () => [
3608
- M(C(N), {
3611
+ J(c.$slots, "trigger", {}, () => [
3612
+ M(C(j), {
3609
3613
  icon: "prime:cog",
3610
3614
  width: "22"
3611
3615
  })
@@ -3613,30 +3617,30 @@ const ri = { class: "pagination" }, li = {
3613
3617
  ]),
3614
3618
  _: 3
3615
3619
  }, 8, ["menu"])) : V("", !0),
3616
- J(f.$slots, "confirmationModal", {}, () => [
3620
+ J(c.$slots, "confirmationModal", {}, () => [
3617
3621
  i.value ? (S(), E(C(ln), {
3618
3622
  key: 0,
3619
- "onOn:close": g[1] || (g[1] = (d) => i.value = !1),
3620
- "onOn:confirm": c
3623
+ "onOn:close": f[0] || (f[0] = (g) => i.value = !1),
3624
+ "onOn:confirm": a
3621
3625
  }, Ft({ _: 2 }, [
3622
3626
  r.value?.confirmationOptions?.header ? {
3623
3627
  name: "header",
3624
3628
  fn: O(() => [
3625
- A("p", null, z(r.value?.confirmationOptions?.header), 1)
3629
+ A("p", null, N(r.value?.confirmationOptions?.header), 1)
3626
3630
  ]),
3627
3631
  key: "0"
3628
3632
  } : void 0,
3629
3633
  r.value?.confirmationOptions?.body ? {
3630
3634
  name: "body",
3631
3635
  fn: O(() => [
3632
- A("p", null, z(r.value?.confirmationOptions?.body), 1)
3636
+ A("p", null, N(r.value?.confirmationOptions?.body), 1)
3633
3637
  ]),
3634
3638
  key: "1"
3635
3639
  } : void 0,
3636
3640
  r.value?.confirmationOptions?.footer ? {
3637
3641
  name: "footer",
3638
3642
  fn: O(() => [
3639
- A("p", null, z(r.value?.confirmationOptions?.footer), 1)
3643
+ A("p", null, N(r.value?.confirmationOptions?.footer), 1)
3640
3644
  ]),
3641
3645
  key: "2"
3642
3646
  } : void 0
@@ -3695,54 +3699,54 @@ const ri = { class: "pagination" }, li = {
3695
3699
  },
3696
3700
  setup(e) {
3697
3701
  const o = e, t = (l) => o.highlightActiveColumn && (l.getIsSorted() === "asc" || l.getIsSorted() === "desc" || l.getIsFiltered()) ? "highlight" : "", n = (l) => l.getFilterValue(), i = (l) => l?.length ? l.map((s, a) => {
3698
- const c = String(s.getDate()).padStart(2, "0"), u = String(s.getMonth() + 1).padStart(2, "0"), f = a === 0 ? "00:00:00" : "23:59:59";
3699
- return `${s.getFullYear()}-${u}-${c} ${f}`;
3702
+ const u = String(s.getDate()).padStart(2, "0"), c = String(s.getMonth() + 1).padStart(2, "0"), f = a === 0 ? "00:00:00" : "23:59:59";
3703
+ return `${s.getFullYear()}-${c}-${u} ${f}`;
3700
3704
  }).filter((s) => s !== null) : null, r = (l, s, a) => {
3701
- const c = l.getFilterValue(), u = Array.isArray(c) ? [...c] : [void 0, void 0];
3702
- u[s] = a !== void 0 ? Number(a) : void 0;
3703
- const f = u.some(
3705
+ const u = l.getFilterValue(), c = Array.isArray(u) ? [...u] : [void 0, void 0];
3706
+ c[s] = a !== void 0 ? Number(a) : void 0;
3707
+ const f = c.some(
3704
3708
  (g) => g !== void 0
3705
3709
  );
3706
- l.setFilterValue(f ? u : []);
3710
+ l.setFilterValue(f ? c : []);
3707
3711
  };
3708
3712
  return (l, s) => (S(), y("thead", null, [
3709
- (S(!0), y(H, null, j(e.table.getHeaderGroups(), (a) => (S(), y("tr", {
3713
+ (S(!0), y(H, null, z(e.table.getHeaderGroups(), (a) => (S(), y("tr", {
3710
3714
  key: a.id,
3711
3715
  class: "header-row"
3712
3716
  }, [
3713
- (S(!0), y(H, null, j(a.headers, (c) => (S(), y("th", {
3714
- key: `table-header-${c.id}`,
3717
+ (S(!0), y(H, null, z(a.headers, (u) => (S(), y("th", {
3718
+ key: `table-header-${u.id}`,
3715
3719
  class: de([
3716
- t(c.column),
3717
- `column-${c.id}`,
3718
- c.column.columnDef.enableSorting ? "sortable" : ""
3720
+ t(u.column),
3721
+ `column-${u.id}`,
3722
+ u.column.columnDef.enableSorting ? "sortable" : ""
3719
3723
  ]),
3720
- colSpan: c.colSpan,
3724
+ colSpan: u.colSpan,
3721
3725
  "data-align": C(Ue)({
3722
- align: c.column.columnDef.align,
3723
- dataType: c.column.columnDef.dataType
3726
+ align: u.column.columnDef.align,
3727
+ dataType: u.column.columnDef.dataType
3724
3728
  }),
3725
3729
  style: oe({
3726
- width: c.column.columnDef.width,
3727
- maxWidth: c.column.columnDef.maxWidth,
3728
- minWidth: c.column.columnDef.minWidth
3730
+ width: u.column.columnDef.width,
3731
+ maxWidth: u.column.columnDef.maxWidth,
3732
+ minWidth: u.column.columnDef.minWidth
3729
3733
  }),
3730
- onClick: (u) => c.column.getCanSort() ? c.column.getToggleSortingHandler()?.(u) : null
3734
+ onClick: (c) => u.column.getCanSort() ? u.column.getToggleSortingHandler()?.(c) : null
3731
3735
  }, [
3732
- c.isPlaceholder ? V("", !0) : (S(), y(H, { key: 0 }, [
3736
+ u.isPlaceholder ? V("", !0) : (S(), y(H, { key: 0 }, [
3733
3737
  M(C(fe), {
3734
- props: c.getContext(),
3735
- render: c.column.columnDef.header
3738
+ props: u.getContext(),
3739
+ render: u.column.columnDef.header
3736
3740
  }, null, 8, ["props", "render"]),
3737
- c.column.columnDef.enableSorting ? (S(), y("span", Di, [
3738
- !c.column.getIsSorted() && c.column.getCanSort() ? (S(), y("svg", _i, s[0] || (s[0] = [
3741
+ u.column.columnDef.enableSorting ? (S(), y("span", Di, [
3742
+ !u.column.getIsSorted() && u.column.getCanSort() ? (S(), y("svg", _i, s[0] || (s[0] = [
3739
3743
  A("path", {
3740
3744
  d: "M18 10.75H6a.74.74 0 0 1-.69-.46a.75.75 0 0 1 .16-.82l6-6a.75.75 0 0 1 1.06 0l6 6a.75.75 0 0 1 .16.82a.74.74 0 0 1-.69.46M7.81 9.25h8.38L12 5.06ZM12 20.75a.74.74 0 0 1-.53-.22l-6-6a.75.75 0 0 1-.16-.82a.74.74 0 0 1 .69-.46h12a.74.74 0 0 1 .69.46a.75.75 0 0 1-.16.82l-6 6a.74.74 0 0 1-.53.22m-4.19-6L12 18.94l4.19-4.19Z",
3741
3745
  fill: "currentColor"
3742
3746
  }, null, -1)
3743
3747
  ]))) : V("", !0),
3744
- c.column.getIsSorted() && c.column.getCanSort() ? (S(), y(H, { key: 1 }, [
3745
- c.column.getIsSorted() === "asc" ? (S(), y("svg", Mi, s[1] || (s[1] = [
3748
+ u.column.getIsSorted() && u.column.getCanSort() ? (S(), y(H, { key: 1 }, [
3749
+ u.column.getIsSorted() === "asc" ? (S(), y("svg", Mi, s[1] || (s[1] = [
3746
3750
  A("path", {
3747
3751
  d: "M12.53 7.97a.75.75 0 0 0-1.06 0l-7 7A.75.75 0 0 0 5 16.25h14a.75.75 0 0 0 .53-1.28z",
3748
3752
  fill: "currentColor"
@@ -3759,7 +3763,7 @@ const ri = { class: "pagination" }, li = {
3759
3763
  ], 14, Vi))), 128))
3760
3764
  ]))), 128)),
3761
3765
  e.isFilterRowVisible ? (S(), y("tr", Li, [
3762
- (S(!0), y(H, null, j(e.table.getVisibleLeafColumns(), (a) => (S(), y("th", {
3766
+ (S(!0), y(H, null, z(e.table.getVisibleLeafColumns(), (a) => (S(), y("th", {
3763
3767
  key: `table-filter-${a.id}`,
3764
3768
  class: de([
3765
3769
  t(a),
@@ -3786,26 +3790,26 @@ const ri = { class: "pagination" }, li = {
3786
3790
  name: `multiselect-filter-${a.columnDef.accessorKey}`,
3787
3791
  multiple: a.columnDef.meta?.filterVariant === "multiselect",
3788
3792
  "enable-tooltip": "",
3789
- "onUpdate:modelValue": (c) => a.setFilterValue(c)
3793
+ "onUpdate:modelValue": (u) => a.setFilterValue(u)
3790
3794
  }, null, 8, ["model-value", "options", "placeholder", "name", "multiple", "onUpdate:modelValue"])) : a.columnDef.meta?.filterVariant === "dateRange" ? (S(), E(C(fn), {
3791
3795
  key: 2,
3792
3796
  "model-value": n(a),
3793
3797
  placeholder: a.columnDef.filterPlaceholder,
3794
3798
  name: "`date-range-${column.columnDef.accessorKey}`",
3795
3799
  range: "",
3796
- "onUpdate:modelValue": (c) => a.setFilterValue(i(c))
3800
+ "onUpdate:modelValue": (u) => a.setFilterValue(i(u))
3797
3801
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : a.columnDef.meta?.filterVariant === "range" ? (S(), y("div", Ti, [
3798
3802
  M(C(tt), {
3799
3803
  "model-value": Array.isArray(n(a)) && n(a)[0] !== null ? Number(n(a)[0]) : void 0,
3800
3804
  placeholder: a.columnDef.filterPlaceholder?.split(",")[0],
3801
3805
  name: "`range-${column.columnDef.accessorKey}-start`",
3802
- "onUpdate:modelValue": (c) => r(a, 0, c)
3806
+ "onUpdate:modelValue": (u) => r(a, 0, u)
3803
3807
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
3804
3808
  M(C(tt), {
3805
3809
  "model-value": Array.isArray(n(a)) && n(a)[1] !== null ? Number(n(a)[1]) : void 0,
3806
3810
  placeholder: a.columnDef.filterPlaceholder?.split(",")[1] ?? a.columnDef.filterPlaceholder,
3807
3811
  name: "`range-${column.columnDef.accessorKey}-end`",
3808
- "onUpdate:modelValue": (c) => r(a, 1, c)
3812
+ "onUpdate:modelValue": (u) => r(a, 1, u)
3809
3813
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
3810
3814
  ])) : (S(), E(C(bt), {
3811
3815
  key: 4,
@@ -3813,7 +3817,7 @@ const ri = { class: "pagination" }, li = {
3813
3817
  "debounce-time": e.inputDebounceTime,
3814
3818
  "model-value": typeof n(a) == "string" ? String(n(a)) : "",
3815
3819
  placeholder: a.columnDef.filterPlaceholder,
3816
- "onUpdate:modelValue": (c) => a.setFilterValue(c)
3820
+ "onUpdate:modelValue": (u) => a.setFilterValue(u)
3817
3821
  }, null, 8, ["id", "debounce-time", "model-value", "placeholder", "onUpdate:modelValue"]))
3818
3822
  ], 64)) : V("", !0)
3819
3823
  ], 14, ki))), 128))
@@ -3850,9 +3854,9 @@ const ri = { class: "pagination" }, li = {
3850
3854
  data: l,
3851
3855
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3852
3856
  render: (a) => {
3853
- let c = a.columnDef.header;
3854
- return typeof a.columnDef.header == "function" && (c = a.columnDef.header()), X(Te, {
3855
- label: c,
3857
+ let u = a.columnDef.header;
3858
+ return typeof a.columnDef.header == "function" && (u = a.columnDef.header()), X(Te, {
3859
+ label: u,
3856
3860
  modelValue: a.getIsVisible(),
3857
3861
  name: a.columnDef.accessorKey,
3858
3862
  "onUpdate:modelValue": () => a.toggleVisibility()
@@ -3905,6 +3909,15 @@ const ri = { class: "pagination" }, li = {
3905
3909
  }, Qi = /* @__PURE__ */ Q({
3906
3910
  ...Wi,
3907
3911
  props: {
3912
+ actionsMode: {
3913
+ default: "auto",
3914
+ type: String,
3915
+ validator: (e) => ["auto", "buttons", "menu"].includes(e)
3916
+ },
3917
+ autoModeCount: {
3918
+ default: 1,
3919
+ type: Number
3920
+ },
3908
3921
  dataActionMenu: {
3909
3922
  default: () => [],
3910
3923
  type: Array
@@ -3973,7 +3986,10 @@ const ri = { class: "pagination" }, li = {
3973
3986
  default: () => ({}),
3974
3987
  type: Object
3975
3988
  },
3976
- persistState: Boolean,
3989
+ persistState: {
3990
+ default: !0,
3991
+ type: Boolean
3992
+ },
3977
3993
  persistStateStorage: {
3978
3994
  default: "localStorage",
3979
3995
  type: String,
@@ -3993,11 +4009,6 @@ const ri = { class: "pagination" }, li = {
3993
4009
  },
3994
4010
  showColumnAction: Boolean,
3995
4011
  showResetButton: Boolean,
3996
- singleActionMode: {
3997
- default: "menu",
3998
- type: String,
3999
- validator: (e) => ["button", "menu"].includes(e)
4000
- },
4001
4012
  tableOptions: {
4002
4013
  default: () => ({}),
4003
4014
  type: Object
@@ -4016,7 +4027,6 @@ const ri = { class: "pagination" }, li = {
4016
4027
  }
4017
4028
  },
4018
4029
  emits: [
4019
- "action:click",
4020
4030
  "action:select",
4021
4031
  "change:rowSelection",
4022
4032
  "update:request"
@@ -4025,12 +4035,12 @@ const ri = { class: "pagination" }, li = {
4025
4035
  const t = e, n = o, i = [], r = K(t.initialFilters), l = K([]), s = K({}), a = K({
4026
4036
  pageIndex: Le,
4027
4037
  pageSize: t.paginated ? t.rowPerPage : t.data.length
4028
- }), c = K({}), u = K(t.initialSorting), f = G(() => t.columnsData.some((v) => v.enableColumnFilter)), g = G(() => ({
4038
+ }), u = K({}), c = K(t.initialSorting), f = G(() => t.columnsData.some((v) => v.enableColumnFilter)), g = G(() => ({
4029
4039
  columnFilters: r.value,
4030
4040
  columnOrder: l.value,
4031
4041
  columnVisibility: s.value,
4032
4042
  pagination: a.value,
4033
- sorting: u.value
4043
+ sorting: c.value
4034
4044
  })), d = G(
4035
4045
  () => un(t.persistStateStorage)
4036
4046
  ), p = G(
@@ -4045,9 +4055,9 @@ const ri = { class: "pagination" }, li = {
4045
4055
  columnOrder: l.value?.length ? l.value : t.visibleColumns,
4046
4056
  columnVisibility: s.value,
4047
4057
  pagination: a.value,
4048
- rowSelection: c.value,
4058
+ rowSelection: u.value,
4049
4059
  get sorting() {
4050
- return u.value;
4060
+ return c.value;
4051
4061
  }
4052
4062
  },
4053
4063
  onColumnFiltersChange: (v) => {
@@ -4057,20 +4067,20 @@ const ri = { class: "pagination" }, li = {
4057
4067
  ) || !t.visibleColumns.length)
4058
4068
  ).map((w) => {
4059
4069
  if (w.meta?.filterVariant === "range") {
4060
- const I = r.value.find(
4070
+ const $ = r.value.find(
4061
4071
  (U) => U?.id === w.accessorKey
4062
- )?.value, [D, L] = I || [], k = w.meta?.serverFilterFn || (typeof D == "number" && typeof L == "number" && D <= L ? x.BETWEEN : typeof D == "number" && !L ? x.GREATER_THAN_OR_EQUAL : typeof L == "number" ? x.LESS_THAN_OR_EQUAL : null);
4063
- return k && I?.length ? {
4072
+ )?.value, [D, L] = $ || [], k = w.meta?.serverFilterFn || (typeof D == "number" && typeof L == "number" && D <= L ? x.BETWEEN : typeof D == "number" && !L ? x.GREATER_THAN_OR_EQUAL : typeof L == "number" ? x.LESS_THAN_OR_EQUAL : null);
4073
+ return k && $?.length ? {
4064
4074
  filterFn: k,
4065
4075
  id: w.accessorKey,
4066
- value: I
4076
+ value: $
4067
4077
  } : void 0;
4068
4078
  } else
4069
4079
  return {
4070
4080
  filterFn: w?.meta?.serverFilterFn,
4071
4081
  id: w.accessorKey,
4072
4082
  value: r.value.find(
4073
- (I) => I.id === w.accessorKey
4083
+ ($) => $.id === w.accessorKey
4074
4084
  )?.value
4075
4085
  };
4076
4086
  }).filter(Boolean), R());
@@ -4082,10 +4092,10 @@ const ri = { class: "pagination" }, li = {
4082
4092
  a.value = typeof v == "function" ? v(a.value) : v, t.isServerTable && R();
4083
4093
  },
4084
4094
  onRowSelectionChange: (v) => {
4085
- c.value = typeof v == "function" ? v(c.value) : v, n("change:rowSelection", m.value);
4095
+ u.value = typeof v == "function" ? v(u.value) : v, n("change:rowSelection", m.value);
4086
4096
  },
4087
4097
  onSortingChange: (v) => {
4088
- u.value = typeof v == "function" ? v(u.value) : v, t.isServerTable && R();
4098
+ c.value = typeof v == "function" ? v(c.value) : v, t.isServerTable && R();
4089
4099
  },
4090
4100
  columnResizeMode: "onChange",
4091
4101
  data: t.data,
@@ -4101,23 +4111,23 @@ const ri = { class: "pagination" }, li = {
4101
4111
  })
4102
4112
  );
4103
4113
  yt(
4104
- [r, l, s, a, u],
4114
+ [r, l, s, a, c],
4105
4115
  () => {
4106
4116
  t.persistState && t.id && Ct(t.id, g.value, d.value);
4107
4117
  }
4108
4118
  );
4109
4119
  const R = () => {
4110
4120
  const v = wi(
4111
- u.value,
4121
+ c.value,
4112
4122
  r.value,
4113
4123
  a.value
4114
4124
  );
4115
4125
  n("update:request", v);
4116
- }, $ = () => {
4126
+ }, I = () => {
4117
4127
  r.value = t.initialFilters, l.value = [], s.value = {}, a.value = {
4118
4128
  pageIndex: Le,
4119
4129
  pageSize: t.paginated ? t.rowPerPage : t.data.length
4120
- }, u.value = t.initialSorting;
4130
+ }, c.value = t.initialSorting;
4121
4131
  }, P = () => {
4122
4132
  if (t.enableRowSelection && i.push({
4123
4133
  accessorKey: "select",
@@ -4135,51 +4145,55 @@ const ri = { class: "pagination" }, li = {
4135
4145
  enableColumnFilter: !1,
4136
4146
  enableSorting: !1
4137
4147
  }), t.columnsData.forEach((v) => {
4138
- t.visibleColumns.length && !t.visibleColumns.includes(String(v.accessorKey ?? v.id)) || (v.meta?.filterVariant === "multiselect" && !v.filterFn ? v.filterFn = (w, I, D) => !D || D.length === 0 ? w : D.some((L) => w.getValue(I) == L) : v.meta?.filterVariant === "select" && !v.filterFn ? v.filterFn = (w, I, D) => D === void 0 || D.length === 0 ? !0 : String(D) === String(w.getValue(I)) : v.meta?.filterVariant === "dateRange" && !v.filterFn ? v.filterFn = (w, I, D) => {
4148
+ t.visibleColumns.length && !t.visibleColumns.includes(String(v.accessorKey ?? v.id)) || (v.meta?.filterVariant === "multiselect" && !v.filterFn ? v.filterFn = (w, $, D) => !D || D.length === 0 ? w : D.some((L) => w.getValue($) == L) : v.meta?.filterVariant === "select" && !v.filterFn ? v.filterFn = (w, $, D) => D === void 0 || D.length === 0 ? !0 : String(D) === String(w.getValue($)) : v.meta?.filterVariant === "dateRange" && !v.filterFn ? v.filterFn = (w, $, D) => {
4139
4149
  if (D?.length) {
4140
- const L = new Date(D[1]).setHours(23, 59, 59, 999), k = new Date(w.getValue(I)), U = new Date(D[0]).setHours(0, 0, 0, 0);
4150
+ const L = new Date(D[1]).setHours(23, 59, 59, 999), k = new Date(w.getValue($)), U = new Date(D[0]).setHours(0, 0, 0, 0);
4141
4151
  return k.getTime() >= U && k.getTime() <= L;
4142
4152
  }
4143
4153
  return !0;
4144
- } : v.meta?.filterVariant === "range" && (v.filterFn = (w, I, D) => {
4154
+ } : v.meta?.filterVariant === "range" && (v.filterFn = (w, $, D) => {
4145
4155
  if (!Array.isArray(D))
4146
4156
  return !0;
4147
- const [L, k] = D, U = w.getValue(I);
4157
+ const [L, k] = D, U = w.getValue($);
4148
4158
  return L && k ? U >= L && U <= k : L ? U >= L : k ? U <= k : !0;
4149
4159
  }), i.push({
4150
4160
  ...v,
4151
4161
  enableColumnFilter: v.enableColumnFilter ?? !1,
4152
4162
  enableSorting: v.enableSorting ?? !1
4153
4163
  }));
4154
- }), t.dataActionMenu.length && i.push({
4155
- accessorKey: "actions",
4156
- align: "center",
4157
- enableColumnFilter: !1,
4158
- enableSorting: !1,
4159
- header: () => X(N, {
4160
- icon: "prime:cog",
4161
- width: "24"
4162
- }),
4163
- cell: ({ row: v }) => X(Ai, {
4164
- actions: t.dataActionMenu,
4165
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4166
- data: v.original,
4167
- displayActions: t.displayActions,
4168
- singleActionMode: t.singleActionMode,
4169
- "onAction:click": () => n("action:click", v.original),
4170
- "onAction:select": (w) => n("action:select", {
4171
- action: w?.key || w?.label,
4172
- data: v.original
4164
+ }), t.dataActionMenu?.length) {
4165
+ let v = t.actionsMode;
4166
+ t.actionsMode === "auto" && t.dataActionMenu?.length <= t.autoModeCount ? v = "buttons" : t.actionsMode === "auto" && t.dataActionMenu?.length > t.autoModeCount && (v = "menu"), i.push({
4167
+ accessorKey: "actions",
4168
+ align: "center",
4169
+ enableColumnFilter: !1,
4170
+ enableSorting: !1,
4171
+ header: () => X(j, {
4172
+ icon: "prime:cog",
4173
+ width: "24"
4174
+ }),
4175
+ cell: ({ row: w }) => X(Ai, {
4176
+ actions: t.dataActionMenu,
4177
+ autoModeCount: t.autoModeCount,
4178
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4179
+ data: w.original,
4180
+ displayActions: t.displayActions,
4181
+ mode: v,
4182
+ "onAction:select": ($) => n("action:select", {
4183
+ action: $?.key || $?.label,
4184
+ data: w.original
4185
+ })
4173
4186
  })
4174
- })
4175
- }), t.persistState && !t.id)
4187
+ });
4188
+ }
4189
+ if (t.persistState && !t.id)
4176
4190
  throw new Error('Id is required when prop "persistState" is true');
4177
4191
  _(), t.isServerTable && R();
4178
4192
  }, _ = () => {
4179
4193
  if (!t.persistState || !t.id)
4180
4194
  return;
4181
4195
  const v = Ci(t.id, d.value);
4182
- v && (r.value = v.columnFilters, l.value = v.columnOrder, s.value = v.columnVisibility, u.value = v.sorting, t.rowPerPageOptions.includes(v.pagination.pageSize) && (a.value = v.pagination)), Ct(t.id, g.value, d.value);
4196
+ v && (r.value = v.columnFilters, l.value = v.columnOrder, s.value = v.columnVisibility, c.value = v.sorting, t.rowPerPageOptions.includes(v.pagination.pageSize) && (a.value = v.pagination)), Ct(t.id, g.value, d.value);
4183
4197
  };
4184
4198
  return P(), (v, w) => (S(), y("div", {
4185
4199
  id: e.id,
@@ -4191,7 +4205,7 @@ const ri = { class: "pagination" }, li = {
4191
4205
  e.titleInfo ? (S(), y("span", {
4192
4206
  key: 1,
4193
4207
  "data-align": e.titleInfo.align || "center"
4194
- }, z(e.titleInfo.text), 9, qi)) : V("", !0),
4208
+ }, N(e.titleInfo.text), 9, qi)) : V("", !0),
4195
4209
  e.showColumnAction || e.showResetButton || v.$slots.toolbar ? (S(), E(zi, {
4196
4210
  key: 2,
4197
4211
  "column-action-button-label": e.columnActionButtonLabel,
@@ -4201,8 +4215,8 @@ const ri = { class: "pagination" }, li = {
4201
4215
  "show-column-action": e.showColumnAction,
4202
4216
  "show-reset-button": e.showResetButton,
4203
4217
  table: h.value,
4204
- "onOn:reset": $,
4205
- "onOn:drag": w[0] || (w[0] = (I) => l.value = I)
4218
+ "onOn:reset": I,
4219
+ "onOn:drag": w[0] || (w[0] = ($) => l.value = $)
4206
4220
  }, {
4207
4221
  default: O(() => [
4208
4222
  J(v.$slots, "toolbar")
@@ -4231,7 +4245,7 @@ const ri = { class: "pagination" }, li = {
4231
4245
  ], 4)
4232
4246
  ]),
4233
4247
  (e.isServerTable || e.paginated) && p.value > 0 ? J(v.$slots, "pagination", { key: 3 }, () => [
4234
- M(hi, ne(e.paginationOptions, {
4248
+ M(hi, te(e.paginationOptions, {
4235
4249
  "current-page": a.value.pageIndex,
4236
4250
  "default-items-per-page": a.value.pageSize,
4237
4251
  "items-per-page-options": e.rowPerPageOptions,
@@ -4274,7 +4288,10 @@ const ri = { class: "pagination" }, li = {
4274
4288
  default: void 0,
4275
4289
  type: String
4276
4290
  },
4277
- persistState: Boolean,
4291
+ persistState: {
4292
+ default: !0,
4293
+ type: Boolean
4294
+ },
4278
4295
  persistStateStorage: {
4279
4296
  default: "localStorage",
4280
4297
  type: String,
@@ -4340,9 +4357,9 @@ const ri = { class: "pagination" }, li = {
4340
4357
  cell: ({ row: { original: u } }) => u.uploadedBy ? u.uploadedBy.givenName || u.uploadedBy.lastName ? `${u.uploadedBy.givenName || ""} ${u.uploadedBy.lastName || ""}` : u.uploadedBy.email : X("code", {}, "—"),
4341
4358
  enableColumnFilter: !t.isServerTable,
4342
4359
  enableSorting: !t.isServerTable,
4343
- filterFn: (u, f, g) => {
4344
- const d = u.getValue(f);
4345
- return !g || g.length === 0 ? !0 : `${d.givenName || ""} ${d.lastName || ""}`.trim().toLowerCase().includes(g.toLowerCase()) || (d.email?.toLowerCase().includes(g.toLowerCase()) ?? !1);
4360
+ filterFn: (u, c, f) => {
4361
+ const g = u.getValue(c);
4362
+ return !f || f.length === 0 ? !0 : `${g.givenName || ""} ${g.lastName || ""}`.trim().toLowerCase().includes(f.toLowerCase()) || (g.email?.toLowerCase().includes(f.toLowerCase()) ?? !1);
4346
4363
  },
4347
4364
  filterPlaceholder: "Name",
4348
4365
  header: "Uploaded by"
@@ -4422,19 +4439,17 @@ const ri = { class: "pagination" }, li = {
4422
4439
  }), u;
4423
4440
  }), l = G(() => [
4424
4441
  ...i.map((u) => {
4425
- const f = t.columnsData.find(
4426
- (g) => g.accessorKey === u.accessorKey
4442
+ const c = t.columnsData.find(
4443
+ (f) => f.accessorKey === u.accessorKey
4427
4444
  );
4428
- return f ? { ...u, ...f } : u;
4445
+ return c ? { ...u, ...c } : u;
4429
4446
  }),
4430
4447
  ...t.columnsData.filter(
4431
4448
  (u) => !i.some(
4432
- (f) => f.accessorKey === u.accessorKey
4449
+ (c) => c.accessorKey === u.accessorKey
4433
4450
  )
4434
4451
  )
4435
4452
  ]), s = (u) => {
4436
- t.archiveFile ? n("action:archive", u) : t.downloadFile ? n("action:download", u) : t.editDescription ? n("action:edit", u) : t.shareFile ? n("action:share", u) : t.viewFile ? n("action:view", u) : t.deleteFile && n("action:delete", u);
4437
- }, a = (u) => {
4438
4453
  switch (u.action) {
4439
4454
  case "archive":
4440
4455
  n("action:archive", u.data);
@@ -4455,10 +4470,10 @@ const ri = { class: "pagination" }, li = {
4455
4470
  n("action:view", u.data);
4456
4471
  break;
4457
4472
  }
4458
- }, c = (u) => {
4473
+ }, a = (u) => {
4459
4474
  n("update:request", u);
4460
4475
  };
4461
- return (u, f) => (S(), E(Qi, ne(e.tableOptions, {
4476
+ return (u, c) => (S(), E(Qi, te(e.tableOptions, {
4462
4477
  id: e.id,
4463
4478
  "columns-data": l.value,
4464
4479
  data: e.files,
@@ -4473,9 +4488,8 @@ const ri = { class: "pagination" }, li = {
4473
4488
  "total-records": e.totalRecords,
4474
4489
  "visible-columns": e.visibleColumns,
4475
4490
  class: "table-files",
4476
- "onAction:click": s,
4477
- "onAction:select": a,
4478
- "onUpdate:request": c
4491
+ "onAction:select": s,
4492
+ "onUpdate:request": a
4479
4493
  }), Ft({ _: 2 }, [
4480
4494
  u.$slots.toolbar ? {
4481
4495
  name: "toolbar",
@@ -4589,7 +4603,7 @@ const ri = { class: "pagination" }, li = {
4589
4603
  break;
4590
4604
  }
4591
4605
  };
4592
- return (l, s) => e.presentation === "list" ? (S(), E(C(dn), ne({ key: 0 }, e.listProps, {
4606
+ return (l, s) => e.presentation === "list" ? (S(), E(C(dn), te({ key: 0 }, e.listProps, {
4593
4607
  "action-buttons-visibility": e.actionButtonsVisibility,
4594
4608
  files: e.files,
4595
4609
  "file-detail-visibility": i.value,
@@ -4601,7 +4615,7 @@ const ri = { class: "pagination" }, li = {
4601
4615
  "onAction:edit": s[3] || (s[3] = (a) => r("edit", a)),
4602
4616
  "onAction:share": s[4] || (s[4] = (a) => r("share", a)),
4603
4617
  "onAction:view": s[5] || (s[5] = (a) => r("view", a))
4604
- }), null, 16, ["action-buttons-visibility", "files", "file-detail-visibility", "locale", "messages"])) : (S(), E(Yi, ne({ key: 1 }, e.tableProps, {
4618
+ }), null, 16, ["action-buttons-visibility", "files", "file-detail-visibility", "locale", "messages"])) : (S(), E(Yi, te({ key: 1 }, e.tableProps, {
4605
4619
  "archive-file": e.actionButtonsVisibility.archive,
4606
4620
  "delete-file": e.actionButtonsVisibility.delete,
4607
4621
  "download-file": e.actionButtonsVisibility.download,
@@ -4643,13 +4657,13 @@ const ri = { class: "pagination" }, li = {
4643
4657
  },
4644
4658
  setup(e) {
4645
4659
  const o = e, t = po(), n = [];
4646
- o.columnsData.forEach((u) => {
4660
+ o.columnsData.forEach((c) => {
4647
4661
  const f = t.accessor(
4648
- u.accessorKey,
4662
+ c.accessorKey,
4649
4663
  {
4650
- header: () => u.header,
4664
+ header: () => c.header,
4651
4665
  footer: (g) => g.column.id,
4652
- enableSorting: u.sort !== void 0 ? u.sort : !1
4666
+ enableSorting: c.sort !== void 0 ? c.sort : !1
4653
4667
  }
4654
4668
  );
4655
4669
  n.push(f);
@@ -4661,8 +4675,8 @@ const ri = { class: "pagination" }, li = {
4661
4675
  return i.value;
4662
4676
  }
4663
4677
  },
4664
- onSortingChange: (u) => {
4665
- i.value = typeof u == "function" ? u(i.value) : u;
4678
+ onSortingChange: (c) => {
4679
+ i.value = typeof c == "function" ? c(i.value) : c;
4666
4680
  },
4667
4681
  columnResizeMode: "onChange",
4668
4682
  data: o.rows,
@@ -4672,14 +4686,14 @@ const ri = { class: "pagination" }, li = {
4672
4686
  getSortedRowModel: Wt()
4673
4687
  }), l = K(!1), s = () => {
4674
4688
  l.value = !l.value;
4675
- }, a = (u) => {
4676
- const f = u.target, g = f.value ? Number(f.value) - 1 : 0;
4689
+ }, a = (c) => {
4690
+ const f = c.target, g = f.value ? Number(f.value) - 1 : 0;
4677
4691
  r.setPageIndex(g);
4678
- }, c = (u) => {
4679
- const f = u.target, g = f.value ? Number(f.value) : 10;
4692
+ }, u = (c) => {
4693
+ const f = c.target, g = f.value ? Number(f.value) : 10;
4680
4694
  r.setPageSize(g);
4681
4695
  };
4682
- return (u, f) => (S(), y("div", Zi, [
4696
+ return (c, f) => (S(), y("div", Zi, [
4683
4697
  A("table", {
4684
4698
  style: oe(`width: ${C(r).getCenterTotalSize()}`)
4685
4699
  }, [
@@ -4688,14 +4702,14 @@ const ri = { class: "pagination" }, li = {
4688
4702
  class: "table-toggle",
4689
4703
  onClick: s
4690
4704
  }, [
4691
- M(C(N), {
4705
+ M(C(j), {
4692
4706
  icon: "mingcute:menu-fill",
4693
4707
  class: "toggle-icon"
4694
4708
  })
4695
4709
  ])
4696
4710
  ])) : V("", !0),
4697
4711
  A("colgroup", null, [
4698
- (S(!0), y(H, null, j(o.columnsData, (g) => (S(), y("col", {
4712
+ (S(!0), y(H, null, z(o.columnsData, (g) => (S(), y("col", {
4699
4713
  key: g.accessorKey,
4700
4714
  style: oe(`width: ${g.size}px`)
4701
4715
  }, null, 4))), 128))
@@ -4703,10 +4717,10 @@ const ri = { class: "pagination" }, li = {
4703
4717
  A("thead", {
4704
4718
  class: de({ expand: l.value })
4705
4719
  }, [
4706
- (S(!0), y(H, null, j(C(r).getHeaderGroups(), (g) => (S(), y("tr", {
4720
+ (S(!0), y(H, null, z(C(r).getHeaderGroups(), (g) => (S(), y("tr", {
4707
4721
  key: g.id
4708
4722
  }, [
4709
- (S(!0), y(H, null, j(g.headers, (d) => (S(), y("th", {
4723
+ (S(!0), y(H, null, z(g.headers, (d) => (S(), y("th", {
4710
4724
  key: d.id,
4711
4725
  colSpan: d.colSpan,
4712
4726
  onClick: (p) => d.column.getCanSort() ? d.column.getToggleSortingHandler()?.(p) : null
@@ -4716,12 +4730,12 @@ const ri = { class: "pagination" }, li = {
4716
4730
  props: d.getContext(),
4717
4731
  render: d.column.columnDef.header
4718
4732
  }, null, 8, ["props", "render"]),
4719
- !d.column.getIsSorted() && d.column.getCanSort() ? (S(), E(C(N), {
4733
+ !d.column.getIsSorted() && d.column.getCanSort() ? (S(), E(C(j), {
4720
4734
  key: 0,
4721
4735
  icon: "ri:arrow-up-down-line",
4722
4736
  class: "sort-icon"
4723
4737
  })) : V("", !0),
4724
- d.column.getIsSorted() && d.column.getCanSort() ? (S(), E(C(N), {
4738
+ d.column.getIsSorted() && d.column.getCanSort() ? (S(), E(C(j), {
4725
4739
  key: 1,
4726
4740
  icon: d.column.getIsSorted() === "asc" ? "mdi:arrow-up" : "mdi:arrow-down",
4727
4741
  class: "sort-icon"
@@ -4731,10 +4745,10 @@ const ri = { class: "pagination" }, li = {
4731
4745
  ]))), 128))
4732
4746
  ], 2),
4733
4747
  A("tbody", null, [
4734
- (S(!0), y(H, null, j(C(r).getRowModel().rows, (g) => (S(), y("tr", {
4748
+ (S(!0), y(H, null, z(C(r).getRowModel().rows, (g) => (S(), y("tr", {
4735
4749
  key: g.id
4736
4750
  }, [
4737
- (S(!0), y(H, null, j(g.getVisibleCells(), (d) => (S(), y("td", {
4751
+ (S(!0), y(H, null, z(g.getVisibleCells(), (d) => (S(), y("td", {
4738
4752
  key: d.id,
4739
4753
  "data-label": d.column.id
4740
4754
  }, [
@@ -4748,7 +4762,7 @@ const ri = { class: "pagination" }, li = {
4748
4762
  ], 4),
4749
4763
  A("div", ir, [
4750
4764
  A("div", rr, [
4751
- A("span", lr, z(C(r).getState().pagination.pageIndex + 1) + " of " + z(C(r).getPageCount()), 1),
4765
+ A("span", lr, N(C(r).getState().pagination.pageIndex + 1) + " of " + N(C(r).getPageCount()), 1),
4752
4766
  A("span", sr, [
4753
4767
  f[6] || (f[6] = A("span", { class: "go-to-page-text" }, " Go to page: ", -1)),
4754
4768
  A("input", {
@@ -4761,12 +4775,12 @@ const ri = { class: "pagination" }, li = {
4761
4775
  ]),
4762
4776
  A("select", {
4763
4777
  value: C(r).getState().pagination.pageSize,
4764
- onChange: f[1] || (f[1] = (g) => c(g))
4778
+ onChange: f[1] || (f[1] = (g) => u(g))
4765
4779
  }, [
4766
- (S(), y(H, null, j([10, 20, 30, 40, 50], (g) => A("option", {
4780
+ (S(), y(H, null, z([10, 20, 30, 40, 50], (g) => A("option", {
4767
4781
  key: g,
4768
4782
  value: g
4769
- }, " Show " + z(g), 9, cr)), 64))
4783
+ }, " Show " + N(g), 9, cr)), 64))
4770
4784
  ], 40, ur)
4771
4785
  ]),
4772
4786
  A("div", dr, [
@@ -4775,7 +4789,7 @@ const ri = { class: "pagination" }, li = {
4775
4789
  disabled: !C(r).getCanPreviousPage(),
4776
4790
  onClick: f[2] || (f[2] = (g) => C(r).setPageIndex(0))
4777
4791
  }, [
4778
- M(C(N), {
4792
+ M(C(j), {
4779
4793
  icon: "material-symbols:keyboard-double-arrow-left-rounded",
4780
4794
  class: "navigation-button-icon"
4781
4795
  })
@@ -4785,7 +4799,7 @@ const ri = { class: "pagination" }, li = {
4785
4799
  disabled: !C(r).getCanPreviousPage(),
4786
4800
  onClick: f[3] || (f[3] = (g) => C(r).previousPage())
4787
4801
  }, [
4788
- M(C(N), {
4802
+ M(C(j), {
4789
4803
  icon: "material-symbols:arrow-back-ios-new-rounded",
4790
4804
  class: "navigation-button-icon"
4791
4805
  })
@@ -4795,7 +4809,7 @@ const ri = { class: "pagination" }, li = {
4795
4809
  disabled: !C(r).getCanNextPage(),
4796
4810
  onClick: f[4] || (f[4] = (g) => C(r).nextPage())
4797
4811
  }, [
4798
- M(C(N), {
4812
+ M(C(j), {
4799
4813
  icon: "material-symbols:arrow-forward-ios-rounded",
4800
4814
  class: "navigation-button-icon"
4801
4815
  })
@@ -4805,7 +4819,7 @@ const ri = { class: "pagination" }, li = {
4805
4819
  disabled: !C(r).getCanNextPage(),
4806
4820
  onClick: f[5] || (f[5] = (g) => C(r).setPageIndex(C(r).getPageCount() - 1))
4807
4821
  }, [
4808
- M(C(N), {
4822
+ M(C(j), {
4809
4823
  icon: "material-symbols:keyboard-double-arrow-right-rounded",
4810
4824
  class: "navigation-button-icon"
4811
4825
  })