@prefabs.tech/vue3-tanstack-table 0.17.0 → 0.19.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),
@@ -3450,6 +3450,10 @@ const ri = { class: "pagination" }, li = {
3450
3450
  type: String
3451
3451
  },
3452
3452
  enableRowSelection: Boolean,
3453
+ locale: {
3454
+ default: void 0,
3455
+ type: String
3456
+ },
3453
3457
  table: {
3454
3458
  required: !0,
3455
3459
  type: Object
@@ -3461,29 +3465,29 @@ const ri = { class: "pagination" }, li = {
3461
3465
  return {
3462
3466
  props: r,
3463
3467
  render: (() => {
3464
- const u = {
3468
+ const c = {
3465
3469
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3466
3470
  number: (g) => vt({
3467
3471
  value: Number(g),
3468
- locale: s?.locale,
3472
+ locale: s?.locale ?? o.locale,
3469
3473
  formatOptions: s?.formatOptions
3470
3474
  }),
3471
3475
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3472
3476
  date: (g) => on(
3473
3477
  g,
3474
- l?.locale,
3478
+ l?.locale ?? o.locale,
3475
3479
  l?.formatOptions
3476
3480
  ),
3477
3481
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3478
3482
  datetime: (g) => ke(
3479
3483
  g,
3480
- l?.locale,
3484
+ l?.locale ?? o.locale,
3481
3485
  l?.formatOptions
3482
3486
  ),
3483
3487
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3484
3488
  currency: (g) => vt({
3485
3489
  value: Number(g),
3486
- locale: s?.locale,
3490
+ locale: s?.locale ?? o.locale,
3487
3491
  formatOptions: {
3488
3492
  style: "currency",
3489
3493
  currency: "USD",
@@ -3492,7 +3496,7 @@ const ri = { class: "pagination" }, li = {
3492
3496
  }),
3493
3497
  ...o.customFormatters
3494
3498
  }, f = i.column.columnDef.dataType || "text";
3495
- return u?.[f]?.(r.getValue()) || a;
3499
+ return c?.[f]?.(r.getValue()) || a;
3496
3500
  })()
3497
3501
  };
3498
3502
  }, n = (i) => {
@@ -3500,12 +3504,12 @@ const ri = { class: "pagination" }, li = {
3500
3504
  return typeof r == "string" ? r : typeof r == "function" ? r(i) : i.getValue();
3501
3505
  };
3502
3506
  return (i, r) => (S(), y("tbody", null, [
3503
- 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", {
3504
3508
  key: `table-row-${l.id}`,
3505
3509
  "data-id": l.id,
3506
3510
  "data-selected": e.enableRowSelection ? l.getIsSelected() : void 0
3507
3511
  }, [
3508
- (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", {
3509
3513
  key: `table-data-${l.id}-${s.id}`,
3510
3514
  class: de([s.column.id ? `cell-${s.column.id}` : ""]),
3511
3515
  "data-label": s.column.id,
@@ -3519,26 +3523,26 @@ const ri = { class: "pagination" }, li = {
3519
3523
  minWidth: s.column.columnDef.minWidth
3520
3524
  })
3521
3525
  }, [
3522
- s.column.columnDef.tooltip ? (S(), E(C(nn), ne({
3526
+ s.column.columnDef.tooltip ? (S(), E(C(nn), te({
3523
3527
  key: 0,
3524
3528
  ref_for: !0
3525
3529
  }, s.column.columnDef.tooltipOptions), {
3526
3530
  content: O(() => [
3527
3531
  typeof s.column.columnDef.tooltip == "function" && typeof n(s) != "string" ? (S(), E(Rt(n(s)), { key: 0 })) : (S(), y(H, { key: 1 }, [
3528
- tn(z(n(s)), 1)
3532
+ tn(N(n(s)), 1)
3529
3533
  ], 64))
3530
3534
  ]),
3531
3535
  default: O(() => [
3532
- M(C(fe), ne({ ref_for: !0 }, t(s)), null, 16)
3536
+ M(C(fe), te({ ref_for: !0 }, t(s)), null, 16)
3533
3537
  ]),
3534
3538
  _: 2
3535
- }, 1040)) : (S(), E(C(fe), ne({
3539
+ }, 1040)) : (S(), E(C(fe), te({
3536
3540
  key: 1,
3537
3541
  ref_for: !0
3538
3542
  }, t(s)), null, 16))
3539
3543
  ], 14, Fi))), 128))
3540
3544
  ], 8, Ri))), 128)) : (S(), y("tr", bi, [
3541
- A("td", null, z(e.emptyTableMessage), 1)
3545
+ A("td", null, N(e.emptyTableMessage), 1)
3542
3546
  ]))
3543
3547
  ]));
3544
3548
  }
@@ -3554,6 +3558,10 @@ const ri = { class: "pagination" }, li = {
3554
3558
  type: Array,
3555
3559
  required: !0
3556
3560
  },
3561
+ autoModeCount: {
3562
+ default: 1,
3563
+ type: Number
3564
+ },
3557
3565
  data: {
3558
3566
  default: () => ({}),
3559
3567
  type: Object
@@ -3562,46 +3570,46 @@ const ri = { class: "pagination" }, li = {
3562
3570
  default: !0,
3563
3571
  type: [Boolean, Function]
3564
3572
  },
3565
- singleActionMode: {
3566
- default: "button",
3573
+ mode: {
3574
+ default: void 0,
3567
3575
  type: String,
3568
- validator: (e) => ["button", "menu"].includes(e)
3576
+ validator: (e) => ["buttons", "menu"].includes(e)
3569
3577
  }
3570
3578
  },
3571
- emits: ["action:click", "action:select"],
3579
+ emits: ["action:select"],
3572
3580
  setup(e, { emit: o }) {
3573
3581
  const t = e, n = o, i = K(!1), r = K(), l = G(
3574
- () => t.actions.map((f) => ({
3575
- ...f,
3576
- display: typeof f.display == "function" ? f.display(t.data) : f.display ?? !0,
3577
- disabled: typeof f.disabled == "function" ? f.disabled(t.data) : f.disabled
3578
- })).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)
3579
3587
  ), s = G(
3580
- () => l.value.length === 1 && l.value[0].icon && t.singleActionMode === "button"
3581
- ), a = G(
3582
- () => typeof t.displayActions == "function" ? t.displayActions(t.data) : t.displayActions
3583
- ), c = () => {
3588
+ () => (typeof t.displayActions == "function" ? t.displayActions(t.data) : t.displayActions) && l.value?.length
3589
+ ), a = () => {
3584
3590
  i.value = !1, n("action:select", r.value);
3585
- }, u = (f) => {
3586
- 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);
3587
3593
  };
3588
- return (f, g) => a.value ? (S(), y("div", Ii, [
3589
- s.value ? (S(), E(C(Z), {
3590
- key: 0,
3591
- disabled: l.value[0].disabled,
3592
- "icon-left": l.value[0].icon,
3593
- 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,
3594
3602
  rounded: "",
3595
3603
  variant: "textOnly",
3596
- onClick: g[0] || (g[0] = (d) => f.$emit("action:click"))
3597
- }, 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), {
3598
3606
  key: 1,
3599
3607
  menu: l.value,
3600
3608
  onSelect: u
3601
3609
  }, {
3602
3610
  default: O(() => [
3603
- J(f.$slots, "trigger", {}, () => [
3604
- M(C(N), {
3611
+ J(c.$slots, "trigger", {}, () => [
3612
+ M(C(j), {
3605
3613
  icon: "prime:cog",
3606
3614
  width: "22"
3607
3615
  })
@@ -3609,30 +3617,30 @@ const ri = { class: "pagination" }, li = {
3609
3617
  ]),
3610
3618
  _: 3
3611
3619
  }, 8, ["menu"])) : V("", !0),
3612
- J(f.$slots, "confirmationModal", {}, () => [
3620
+ J(c.$slots, "confirmationModal", {}, () => [
3613
3621
  i.value ? (S(), E(C(ln), {
3614
3622
  key: 0,
3615
- "onOn:close": g[1] || (g[1] = (d) => i.value = !1),
3616
- "onOn:confirm": c
3623
+ "onOn:close": f[0] || (f[0] = (g) => i.value = !1),
3624
+ "onOn:confirm": a
3617
3625
  }, Ft({ _: 2 }, [
3618
3626
  r.value?.confirmationOptions?.header ? {
3619
3627
  name: "header",
3620
3628
  fn: O(() => [
3621
- A("p", null, z(r.value?.confirmationOptions?.header), 1)
3629
+ A("p", null, N(r.value?.confirmationOptions?.header), 1)
3622
3630
  ]),
3623
3631
  key: "0"
3624
3632
  } : void 0,
3625
3633
  r.value?.confirmationOptions?.body ? {
3626
3634
  name: "body",
3627
3635
  fn: O(() => [
3628
- A("p", null, z(r.value?.confirmationOptions?.body), 1)
3636
+ A("p", null, N(r.value?.confirmationOptions?.body), 1)
3629
3637
  ]),
3630
3638
  key: "1"
3631
3639
  } : void 0,
3632
3640
  r.value?.confirmationOptions?.footer ? {
3633
3641
  name: "footer",
3634
3642
  fn: O(() => [
3635
- A("p", null, z(r.value?.confirmationOptions?.footer), 1)
3643
+ A("p", null, N(r.value?.confirmationOptions?.footer), 1)
3636
3644
  ]),
3637
3645
  key: "2"
3638
3646
  } : void 0
@@ -3691,54 +3699,54 @@ const ri = { class: "pagination" }, li = {
3691
3699
  },
3692
3700
  setup(e) {
3693
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) => {
3694
- 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";
3695
- 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}`;
3696
3704
  }).filter((s) => s !== null) : null, r = (l, s, a) => {
3697
- const c = l.getFilterValue(), u = Array.isArray(c) ? [...c] : [void 0, void 0];
3698
- u[s] = a !== void 0 ? Number(a) : void 0;
3699
- 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(
3700
3708
  (g) => g !== void 0
3701
3709
  );
3702
- l.setFilterValue(f ? u : []);
3710
+ l.setFilterValue(f ? c : []);
3703
3711
  };
3704
3712
  return (l, s) => (S(), y("thead", null, [
3705
- (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", {
3706
3714
  key: a.id,
3707
3715
  class: "header-row"
3708
3716
  }, [
3709
- (S(!0), y(H, null, j(a.headers, (c) => (S(), y("th", {
3710
- key: `table-header-${c.id}`,
3717
+ (S(!0), y(H, null, z(a.headers, (u) => (S(), y("th", {
3718
+ key: `table-header-${u.id}`,
3711
3719
  class: de([
3712
- t(c.column),
3713
- `column-${c.id}`,
3714
- c.column.columnDef.enableSorting ? "sortable" : ""
3720
+ t(u.column),
3721
+ `column-${u.id}`,
3722
+ u.column.columnDef.enableSorting ? "sortable" : ""
3715
3723
  ]),
3716
- colSpan: c.colSpan,
3724
+ colSpan: u.colSpan,
3717
3725
  "data-align": C(Ue)({
3718
- align: c.column.columnDef.align,
3719
- dataType: c.column.columnDef.dataType
3726
+ align: u.column.columnDef.align,
3727
+ dataType: u.column.columnDef.dataType
3720
3728
  }),
3721
3729
  style: oe({
3722
- width: c.column.columnDef.width,
3723
- maxWidth: c.column.columnDef.maxWidth,
3724
- minWidth: c.column.columnDef.minWidth
3730
+ width: u.column.columnDef.width,
3731
+ maxWidth: u.column.columnDef.maxWidth,
3732
+ minWidth: u.column.columnDef.minWidth
3725
3733
  }),
3726
- onClick: (u) => c.column.getCanSort() ? c.column.getToggleSortingHandler()?.(u) : null
3734
+ onClick: (c) => u.column.getCanSort() ? u.column.getToggleSortingHandler()?.(c) : null
3727
3735
  }, [
3728
- c.isPlaceholder ? V("", !0) : (S(), y(H, { key: 0 }, [
3736
+ u.isPlaceholder ? V("", !0) : (S(), y(H, { key: 0 }, [
3729
3737
  M(C(fe), {
3730
- props: c.getContext(),
3731
- render: c.column.columnDef.header
3738
+ props: u.getContext(),
3739
+ render: u.column.columnDef.header
3732
3740
  }, null, 8, ["props", "render"]),
3733
- c.column.columnDef.enableSorting ? (S(), y("span", Di, [
3734
- !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] = [
3735
3743
  A("path", {
3736
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",
3737
3745
  fill: "currentColor"
3738
3746
  }, null, -1)
3739
3747
  ]))) : V("", !0),
3740
- c.column.getIsSorted() && c.column.getCanSort() ? (S(), y(H, { key: 1 }, [
3741
- 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] = [
3742
3750
  A("path", {
3743
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",
3744
3752
  fill: "currentColor"
@@ -3755,7 +3763,7 @@ const ri = { class: "pagination" }, li = {
3755
3763
  ], 14, Vi))), 128))
3756
3764
  ]))), 128)),
3757
3765
  e.isFilterRowVisible ? (S(), y("tr", Li, [
3758
- (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", {
3759
3767
  key: `table-filter-${a.id}`,
3760
3768
  class: de([
3761
3769
  t(a),
@@ -3782,26 +3790,26 @@ const ri = { class: "pagination" }, li = {
3782
3790
  name: `multiselect-filter-${a.columnDef.accessorKey}`,
3783
3791
  multiple: a.columnDef.meta?.filterVariant === "multiselect",
3784
3792
  "enable-tooltip": "",
3785
- "onUpdate:modelValue": (c) => a.setFilterValue(c)
3793
+ "onUpdate:modelValue": (u) => a.setFilterValue(u)
3786
3794
  }, null, 8, ["model-value", "options", "placeholder", "name", "multiple", "onUpdate:modelValue"])) : a.columnDef.meta?.filterVariant === "dateRange" ? (S(), E(C(fn), {
3787
3795
  key: 2,
3788
3796
  "model-value": n(a),
3789
3797
  placeholder: a.columnDef.filterPlaceholder,
3790
3798
  name: "`date-range-${column.columnDef.accessorKey}`",
3791
3799
  range: "",
3792
- "onUpdate:modelValue": (c) => a.setFilterValue(i(c))
3800
+ "onUpdate:modelValue": (u) => a.setFilterValue(i(u))
3793
3801
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])) : a.columnDef.meta?.filterVariant === "range" ? (S(), y("div", Ti, [
3794
3802
  M(C(tt), {
3795
3803
  "model-value": Array.isArray(n(a)) && n(a)[0] !== null ? Number(n(a)[0]) : void 0,
3796
3804
  placeholder: a.columnDef.filterPlaceholder?.split(",")[0],
3797
3805
  name: "`range-${column.columnDef.accessorKey}-start`",
3798
- "onUpdate:modelValue": (c) => r(a, 0, c)
3806
+ "onUpdate:modelValue": (u) => r(a, 0, u)
3799
3807
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
3800
3808
  M(C(tt), {
3801
3809
  "model-value": Array.isArray(n(a)) && n(a)[1] !== null ? Number(n(a)[1]) : void 0,
3802
3810
  placeholder: a.columnDef.filterPlaceholder?.split(",")[1] ?? a.columnDef.filterPlaceholder,
3803
3811
  name: "`range-${column.columnDef.accessorKey}-end`",
3804
- "onUpdate:modelValue": (c) => r(a, 1, c)
3812
+ "onUpdate:modelValue": (u) => r(a, 1, u)
3805
3813
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
3806
3814
  ])) : (S(), E(C(bt), {
3807
3815
  key: 4,
@@ -3809,7 +3817,7 @@ const ri = { class: "pagination" }, li = {
3809
3817
  "debounce-time": e.inputDebounceTime,
3810
3818
  "model-value": typeof n(a) == "string" ? String(n(a)) : "",
3811
3819
  placeholder: a.columnDef.filterPlaceholder,
3812
- "onUpdate:modelValue": (c) => a.setFilterValue(c)
3820
+ "onUpdate:modelValue": (u) => a.setFilterValue(u)
3813
3821
  }, null, 8, ["id", "debounce-time", "model-value", "placeholder", "onUpdate:modelValue"]))
3814
3822
  ], 64)) : V("", !0)
3815
3823
  ], 14, ki))), 128))
@@ -3846,9 +3854,9 @@ const ri = { class: "pagination" }, li = {
3846
3854
  data: l,
3847
3855
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3848
3856
  render: (a) => {
3849
- let c = a.columnDef.header;
3850
- return typeof a.columnDef.header == "function" && (c = a.columnDef.header()), X(Te, {
3851
- label: c,
3857
+ let u = a.columnDef.header;
3858
+ return typeof a.columnDef.header == "function" && (u = a.columnDef.header()), X(Te, {
3859
+ label: u,
3852
3860
  modelValue: a.getIsVisible(),
3853
3861
  name: a.columnDef.accessorKey,
3854
3862
  "onUpdate:modelValue": () => a.toggleVisibility()
@@ -3901,6 +3909,15 @@ const ri = { class: "pagination" }, li = {
3901
3909
  }, Qi = /* @__PURE__ */ Q({
3902
3910
  ...Wi,
3903
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
+ },
3904
3921
  dataActionMenu: {
3905
3922
  default: () => [],
3906
3923
  type: Array
@@ -3957,6 +3974,10 @@ const ri = { class: "pagination" }, li = {
3957
3974
  },
3958
3975
  isLoading: Boolean,
3959
3976
  isServerTable: Boolean,
3977
+ locale: {
3978
+ default: void 0,
3979
+ type: String
3980
+ },
3960
3981
  paginated: {
3961
3982
  default: !0,
3962
3983
  type: Boolean
@@ -3965,7 +3986,10 @@ const ri = { class: "pagination" }, li = {
3965
3986
  default: () => ({}),
3966
3987
  type: Object
3967
3988
  },
3968
- persistState: Boolean,
3989
+ persistState: {
3990
+ default: !0,
3991
+ type: Boolean
3992
+ },
3969
3993
  persistStateStorage: {
3970
3994
  default: "localStorage",
3971
3995
  type: String,
@@ -3985,11 +4009,6 @@ const ri = { class: "pagination" }, li = {
3985
4009
  },
3986
4010
  showColumnAction: Boolean,
3987
4011
  showResetButton: Boolean,
3988
- singleActionMode: {
3989
- default: "menu",
3990
- type: String,
3991
- validator: (e) => ["button", "menu"].includes(e)
3992
- },
3993
4012
  tableOptions: {
3994
4013
  default: () => ({}),
3995
4014
  type: Object
@@ -4008,7 +4027,6 @@ const ri = { class: "pagination" }, li = {
4008
4027
  }
4009
4028
  },
4010
4029
  emits: [
4011
- "action:click",
4012
4030
  "action:select",
4013
4031
  "change:rowSelection",
4014
4032
  "update:request"
@@ -4017,12 +4035,12 @@ const ri = { class: "pagination" }, li = {
4017
4035
  const t = e, n = o, i = [], r = K(t.initialFilters), l = K([]), s = K({}), a = K({
4018
4036
  pageIndex: Le,
4019
4037
  pageSize: t.paginated ? t.rowPerPage : t.data.length
4020
- }), 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(() => ({
4021
4039
  columnFilters: r.value,
4022
4040
  columnOrder: l.value,
4023
4041
  columnVisibility: s.value,
4024
4042
  pagination: a.value,
4025
- sorting: u.value
4043
+ sorting: c.value
4026
4044
  })), d = G(
4027
4045
  () => un(t.persistStateStorage)
4028
4046
  ), p = G(
@@ -4037,9 +4055,9 @@ const ri = { class: "pagination" }, li = {
4037
4055
  columnOrder: l.value?.length ? l.value : t.visibleColumns,
4038
4056
  columnVisibility: s.value,
4039
4057
  pagination: a.value,
4040
- rowSelection: c.value,
4058
+ rowSelection: u.value,
4041
4059
  get sorting() {
4042
- return u.value;
4060
+ return c.value;
4043
4061
  }
4044
4062
  },
4045
4063
  onColumnFiltersChange: (v) => {
@@ -4049,20 +4067,20 @@ const ri = { class: "pagination" }, li = {
4049
4067
  ) || !t.visibleColumns.length)
4050
4068
  ).map((w) => {
4051
4069
  if (w.meta?.filterVariant === "range") {
4052
- const I = r.value.find(
4070
+ const $ = r.value.find(
4053
4071
  (U) => U?.id === w.accessorKey
4054
- )?.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);
4055
- 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 ? {
4056
4074
  filterFn: k,
4057
4075
  id: w.accessorKey,
4058
- value: I
4076
+ value: $
4059
4077
  } : void 0;
4060
4078
  } else
4061
4079
  return {
4062
4080
  filterFn: w?.meta?.serverFilterFn,
4063
4081
  id: w.accessorKey,
4064
4082
  value: r.value.find(
4065
- (I) => I.id === w.accessorKey
4083
+ ($) => $.id === w.accessorKey
4066
4084
  )?.value
4067
4085
  };
4068
4086
  }).filter(Boolean), R());
@@ -4074,10 +4092,10 @@ const ri = { class: "pagination" }, li = {
4074
4092
  a.value = typeof v == "function" ? v(a.value) : v, t.isServerTable && R();
4075
4093
  },
4076
4094
  onRowSelectionChange: (v) => {
4077
- 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);
4078
4096
  },
4079
4097
  onSortingChange: (v) => {
4080
- 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();
4081
4099
  },
4082
4100
  columnResizeMode: "onChange",
4083
4101
  data: t.data,
@@ -4093,23 +4111,23 @@ const ri = { class: "pagination" }, li = {
4093
4111
  })
4094
4112
  );
4095
4113
  yt(
4096
- [r, l, s, a, u],
4114
+ [r, l, s, a, c],
4097
4115
  () => {
4098
4116
  t.persistState && t.id && Ct(t.id, g.value, d.value);
4099
4117
  }
4100
4118
  );
4101
4119
  const R = () => {
4102
4120
  const v = wi(
4103
- u.value,
4121
+ c.value,
4104
4122
  r.value,
4105
4123
  a.value
4106
4124
  );
4107
4125
  n("update:request", v);
4108
- }, $ = () => {
4126
+ }, I = () => {
4109
4127
  r.value = t.initialFilters, l.value = [], s.value = {}, a.value = {
4110
4128
  pageIndex: Le,
4111
4129
  pageSize: t.paginated ? t.rowPerPage : t.data.length
4112
- }, u.value = t.initialSorting;
4130
+ }, c.value = t.initialSorting;
4113
4131
  }, P = () => {
4114
4132
  if (t.enableRowSelection && i.push({
4115
4133
  accessorKey: "select",
@@ -4127,51 +4145,55 @@ const ri = { class: "pagination" }, li = {
4127
4145
  enableColumnFilter: !1,
4128
4146
  enableSorting: !1
4129
4147
  }), t.columnsData.forEach((v) => {
4130
- 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) => {
4131
4149
  if (D?.length) {
4132
- 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);
4133
4151
  return k.getTime() >= U && k.getTime() <= L;
4134
4152
  }
4135
4153
  return !0;
4136
- } : v.meta?.filterVariant === "range" && (v.filterFn = (w, I, D) => {
4154
+ } : v.meta?.filterVariant === "range" && (v.filterFn = (w, $, D) => {
4137
4155
  if (!Array.isArray(D))
4138
4156
  return !0;
4139
- const [L, k] = D, U = w.getValue(I);
4157
+ const [L, k] = D, U = w.getValue($);
4140
4158
  return L && k ? U >= L && U <= k : L ? U >= L : k ? U <= k : !0;
4141
4159
  }), i.push({
4142
4160
  ...v,
4143
4161
  enableColumnFilter: v.enableColumnFilter ?? !1,
4144
4162
  enableSorting: v.enableSorting ?? !1
4145
4163
  }));
4146
- }), t.dataActionMenu.length && i.push({
4147
- accessorKey: "actions",
4148
- align: "center",
4149
- enableColumnFilter: !1,
4150
- enableSorting: !1,
4151
- header: () => X(N, {
4152
- icon: "prime:cog",
4153
- width: "24"
4154
- }),
4155
- cell: ({ row: v }) => X(Ai, {
4156
- actions: t.dataActionMenu,
4157
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4158
- data: v.original,
4159
- displayActions: t.displayActions,
4160
- singleActionMode: t.singleActionMode,
4161
- "onAction:click": () => n("action:click", v.original),
4162
- "onAction:select": (w) => n("action:select", {
4163
- action: w?.key || w?.label,
4164
- 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
+ })
4165
4186
  })
4166
- })
4167
- }), t.persistState && !t.id)
4187
+ });
4188
+ }
4189
+ if (t.persistState && !t.id)
4168
4190
  throw new Error('Id is required when prop "persistState" is true');
4169
4191
  _(), t.isServerTable && R();
4170
4192
  }, _ = () => {
4171
4193
  if (!t.persistState || !t.id)
4172
4194
  return;
4173
4195
  const v = Ci(t.id, d.value);
4174
- 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);
4175
4197
  };
4176
4198
  return P(), (v, w) => (S(), y("div", {
4177
4199
  id: e.id,
@@ -4183,7 +4205,7 @@ const ri = { class: "pagination" }, li = {
4183
4205
  e.titleInfo ? (S(), y("span", {
4184
4206
  key: 1,
4185
4207
  "data-align": e.titleInfo.align || "center"
4186
- }, z(e.titleInfo.text), 9, qi)) : V("", !0),
4208
+ }, N(e.titleInfo.text), 9, qi)) : V("", !0),
4187
4209
  e.showColumnAction || e.showResetButton || v.$slots.toolbar ? (S(), E(zi, {
4188
4210
  key: 2,
4189
4211
  "column-action-button-label": e.columnActionButtonLabel,
@@ -4193,8 +4215,8 @@ const ri = { class: "pagination" }, li = {
4193
4215
  "show-column-action": e.showColumnAction,
4194
4216
  "show-reset-button": e.showResetButton,
4195
4217
  table: h.value,
4196
- "onOn:reset": $,
4197
- "onOn:drag": w[0] || (w[0] = (I) => l.value = I)
4218
+ "onOn:reset": I,
4219
+ "onOn:drag": w[0] || (w[0] = ($) => l.value = $)
4198
4220
  }, {
4199
4221
  default: O(() => [
4200
4222
  J(v.$slots, "toolbar")
@@ -4214,15 +4236,16 @@ const ri = { class: "pagination" }, li = {
4214
4236
  M($i, {
4215
4237
  "custom-formatters": e.customFormatters,
4216
4238
  "empty-table-message": e.emptyTableMessage,
4239
+ locale: e.locale,
4217
4240
  table: h.value
4218
- }, null, 8, ["custom-formatters", "empty-table-message", "table"]),
4241
+ }, null, 8, ["custom-formatters", "empty-table-message", "locale", "table"]),
4219
4242
  v.$slots.footer ? (S(), y("tfoot", Ui, [
4220
4243
  J(v.$slots, "footer")
4221
4244
  ])) : V("", !0)
4222
4245
  ], 4)
4223
4246
  ]),
4224
4247
  (e.isServerTable || e.paginated) && p.value > 0 ? J(v.$slots, "pagination", { key: 3 }, () => [
4225
- M(hi, ne(e.paginationOptions, {
4248
+ M(hi, te(e.paginationOptions, {
4226
4249
  "current-page": a.value.pageIndex,
4227
4250
  "default-items-per-page": a.value.pageSize,
4228
4251
  "items-per-page-options": e.rowPerPageOptions,
@@ -4261,7 +4284,14 @@ const ri = { class: "pagination" }, li = {
4261
4284
  },
4262
4285
  isLoading: Boolean,
4263
4286
  isServerTable: Boolean,
4264
- persistState: Boolean,
4287
+ locale: {
4288
+ default: void 0,
4289
+ type: String
4290
+ },
4291
+ persistState: {
4292
+ default: !0,
4293
+ type: Boolean
4294
+ },
4265
4295
  persistStateStorage: {
4266
4296
  default: "localStorage",
4267
4297
  type: String,
@@ -4327,16 +4357,16 @@ const ri = { class: "pagination" }, li = {
4327
4357
  cell: ({ row: { original: u } }) => u.uploadedBy ? u.uploadedBy.givenName || u.uploadedBy.lastName ? `${u.uploadedBy.givenName || ""} ${u.uploadedBy.lastName || ""}` : u.uploadedBy.email : X("code", {}, "—"),
4328
4358
  enableColumnFilter: !t.isServerTable,
4329
4359
  enableSorting: !t.isServerTable,
4330
- filterFn: (u, f, g) => {
4331
- const d = u.getValue(f);
4332
- 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);
4333
4363
  },
4334
4364
  filterPlaceholder: "Name",
4335
4365
  header: "Uploaded by"
4336
4366
  },
4337
4367
  {
4338
4368
  accessorKey: "uploadedAt",
4339
- cell: ({ getValue: u }) => ke(u()),
4369
+ cell: ({ getValue: u }) => ke(u(), t.locale),
4340
4370
  enableColumnFilter: !0,
4341
4371
  enableSorting: !0,
4342
4372
  filterPlaceholder: "Date range",
@@ -4359,7 +4389,7 @@ const ri = { class: "pagination" }, li = {
4359
4389
  },
4360
4390
  {
4361
4391
  accessorKey: "lastDownloadedAt",
4362
- cell: ({ getValue: u }) => u() ? ke(u()) : X("code", {}, "—"),
4392
+ cell: ({ getValue: u }) => u() ? ke(u(), t.locale) : X("code", {}, "—"),
4363
4393
  enableColumnFilter: !0,
4364
4394
  enableSorting: !0,
4365
4395
  filterPlaceholder: "Date range",
@@ -4409,19 +4439,17 @@ const ri = { class: "pagination" }, li = {
4409
4439
  }), u;
4410
4440
  }), l = G(() => [
4411
4441
  ...i.map((u) => {
4412
- const f = t.columnsData.find(
4413
- (g) => g.accessorKey === u.accessorKey
4442
+ const c = t.columnsData.find(
4443
+ (f) => f.accessorKey === u.accessorKey
4414
4444
  );
4415
- return f ? { ...u, ...f } : u;
4445
+ return c ? { ...u, ...c } : u;
4416
4446
  }),
4417
4447
  ...t.columnsData.filter(
4418
4448
  (u) => !i.some(
4419
- (f) => f.accessorKey === u.accessorKey
4449
+ (c) => c.accessorKey === u.accessorKey
4420
4450
  )
4421
4451
  )
4422
4452
  ]), s = (u) => {
4423
- 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);
4424
- }, a = (u) => {
4425
4453
  switch (u.action) {
4426
4454
  case "archive":
4427
4455
  n("action:archive", u.data);
@@ -4442,10 +4470,10 @@ const ri = { class: "pagination" }, li = {
4442
4470
  n("action:view", u.data);
4443
4471
  break;
4444
4472
  }
4445
- }, c = (u) => {
4473
+ }, a = (u) => {
4446
4474
  n("update:request", u);
4447
4475
  };
4448
- return (u, f) => (S(), E(Qi, ne(e.tableOptions, {
4476
+ return (u, c) => (S(), E(Qi, te(e.tableOptions, {
4449
4477
  id: e.id,
4450
4478
  "columns-data": l.value,
4451
4479
  data: e.files,
@@ -4454,14 +4482,14 @@ const ri = { class: "pagination" }, li = {
4454
4482
  "initial-sorting": e.initialSorting,
4455
4483
  "is-loading": e.isLoading,
4456
4484
  "is-server-table": e.isServerTable,
4485
+ locale: String(e.locale),
4457
4486
  "persist-state": e.persistState,
4458
4487
  "persist-state-storage": e.persistStateStorage,
4459
4488
  "total-records": e.totalRecords,
4460
4489
  "visible-columns": e.visibleColumns,
4461
4490
  class: "table-files",
4462
- "onAction:click": s,
4463
- "onAction:select": a,
4464
- "onUpdate:request": c
4491
+ "onAction:select": s,
4492
+ "onUpdate:request": a
4465
4493
  }), Ft({ _: 2 }, [
4466
4494
  u.$slots.toolbar ? {
4467
4495
  name: "toolbar",
@@ -4484,7 +4512,7 @@ const ri = { class: "pagination" }, li = {
4484
4512
  ]),
4485
4513
  key: "2"
4486
4514
  } : void 0
4487
- ]), 1040, ["id", "columns-data", "data", "data-action-menu", "empty-table-message", "initial-sorting", "is-loading", "is-server-table", "persist-state", "persist-state-storage", "total-records", "visible-columns"]));
4515
+ ]), 1040, ["id", "columns-data", "data", "data-action-menu", "empty-table-message", "initial-sorting", "is-loading", "is-server-table", "locale", "persist-state", "persist-state-storage", "total-records", "visible-columns"]));
4488
4516
  }
4489
4517
  }), Ji = {
4490
4518
  name: "FilesPresentation"
@@ -4515,6 +4543,10 @@ const ri = { class: "pagination" }, li = {
4515
4543
  },
4516
4544
  type: Object
4517
4545
  },
4546
+ locale: {
4547
+ default: void 0,
4548
+ type: String
4549
+ },
4518
4550
  presentation: {
4519
4551
  default: () => "list",
4520
4552
  type: String,
@@ -4571,10 +4603,11 @@ const ri = { class: "pagination" }, li = {
4571
4603
  break;
4572
4604
  }
4573
4605
  };
4574
- 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, {
4575
4607
  "action-buttons-visibility": e.actionButtonsVisibility,
4576
4608
  files: e.files,
4577
4609
  "file-detail-visibility": i.value,
4610
+ locale: e.locale,
4578
4611
  messages: e.messages,
4579
4612
  "onAction:archive": s[0] || (s[0] = (a) => r("archive", a)),
4580
4613
  "onAction:delete": s[1] || (s[1] = (a) => r("delete", a)),
@@ -4582,12 +4615,13 @@ const ri = { class: "pagination" }, li = {
4582
4615
  "onAction:edit": s[3] || (s[3] = (a) => r("edit", a)),
4583
4616
  "onAction:share": s[4] || (s[4] = (a) => r("share", a)),
4584
4617
  "onAction:view": s[5] || (s[5] = (a) => r("view", a))
4585
- }), null, 16, ["action-buttons-visibility", "files", "file-detail-visibility", "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, {
4586
4619
  "archive-file": e.actionButtonsVisibility.archive,
4587
4620
  "delete-file": e.actionButtonsVisibility.delete,
4588
4621
  "download-file": e.actionButtonsVisibility.download,
4589
4622
  "edit-description": e.actionButtonsVisibility.edit,
4590
4623
  files: e.files,
4624
+ locale: e.locale,
4591
4625
  messages: e.messages,
4592
4626
  "share-file": e.actionButtonsVisibility.share,
4593
4627
  "view-file": e.actionButtonsVisibility.view,
@@ -4598,7 +4632,7 @@ const ri = { class: "pagination" }, li = {
4598
4632
  "onAction:edit": s[9] || (s[9] = (a) => r("edit", a)),
4599
4633
  "onAction:share": s[10] || (s[10] = (a) => r("share", a)),
4600
4634
  "onAction:view": s[11] || (s[11] = (a) => r("view", a))
4601
- }), null, 16, ["archive-file", "delete-file", "download-file", "edit-description", "files", "messages", "share-file", "view-file", "visible-columns"]));
4635
+ }), null, 16, ["archive-file", "delete-file", "download-file", "edit-description", "files", "locale", "messages", "share-file", "view-file", "visible-columns"]));
4602
4636
  }
4603
4637
  }), Zi = { class: "table-wrapper" }, er = {
4604
4638
  key: 0,
@@ -4623,13 +4657,13 @@ const ri = { class: "pagination" }, li = {
4623
4657
  },
4624
4658
  setup(e) {
4625
4659
  const o = e, t = po(), n = [];
4626
- o.columnsData.forEach((u) => {
4660
+ o.columnsData.forEach((c) => {
4627
4661
  const f = t.accessor(
4628
- u.accessorKey,
4662
+ c.accessorKey,
4629
4663
  {
4630
- header: () => u.header,
4664
+ header: () => c.header,
4631
4665
  footer: (g) => g.column.id,
4632
- enableSorting: u.sort !== void 0 ? u.sort : !1
4666
+ enableSorting: c.sort !== void 0 ? c.sort : !1
4633
4667
  }
4634
4668
  );
4635
4669
  n.push(f);
@@ -4641,8 +4675,8 @@ const ri = { class: "pagination" }, li = {
4641
4675
  return i.value;
4642
4676
  }
4643
4677
  },
4644
- onSortingChange: (u) => {
4645
- i.value = typeof u == "function" ? u(i.value) : u;
4678
+ onSortingChange: (c) => {
4679
+ i.value = typeof c == "function" ? c(i.value) : c;
4646
4680
  },
4647
4681
  columnResizeMode: "onChange",
4648
4682
  data: o.rows,
@@ -4652,14 +4686,14 @@ const ri = { class: "pagination" }, li = {
4652
4686
  getSortedRowModel: Wt()
4653
4687
  }), l = K(!1), s = () => {
4654
4688
  l.value = !l.value;
4655
- }, a = (u) => {
4656
- 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;
4657
4691
  r.setPageIndex(g);
4658
- }, c = (u) => {
4659
- 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;
4660
4694
  r.setPageSize(g);
4661
4695
  };
4662
- return (u, f) => (S(), y("div", Zi, [
4696
+ return (c, f) => (S(), y("div", Zi, [
4663
4697
  A("table", {
4664
4698
  style: oe(`width: ${C(r).getCenterTotalSize()}`)
4665
4699
  }, [
@@ -4668,14 +4702,14 @@ const ri = { class: "pagination" }, li = {
4668
4702
  class: "table-toggle",
4669
4703
  onClick: s
4670
4704
  }, [
4671
- M(C(N), {
4705
+ M(C(j), {
4672
4706
  icon: "mingcute:menu-fill",
4673
4707
  class: "toggle-icon"
4674
4708
  })
4675
4709
  ])
4676
4710
  ])) : V("", !0),
4677
4711
  A("colgroup", null, [
4678
- (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", {
4679
4713
  key: g.accessorKey,
4680
4714
  style: oe(`width: ${g.size}px`)
4681
4715
  }, null, 4))), 128))
@@ -4683,10 +4717,10 @@ const ri = { class: "pagination" }, li = {
4683
4717
  A("thead", {
4684
4718
  class: de({ expand: l.value })
4685
4719
  }, [
4686
- (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", {
4687
4721
  key: g.id
4688
4722
  }, [
4689
- (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", {
4690
4724
  key: d.id,
4691
4725
  colSpan: d.colSpan,
4692
4726
  onClick: (p) => d.column.getCanSort() ? d.column.getToggleSortingHandler()?.(p) : null
@@ -4696,12 +4730,12 @@ const ri = { class: "pagination" }, li = {
4696
4730
  props: d.getContext(),
4697
4731
  render: d.column.columnDef.header
4698
4732
  }, null, 8, ["props", "render"]),
4699
- !d.column.getIsSorted() && d.column.getCanSort() ? (S(), E(C(N), {
4733
+ !d.column.getIsSorted() && d.column.getCanSort() ? (S(), E(C(j), {
4700
4734
  key: 0,
4701
4735
  icon: "ri:arrow-up-down-line",
4702
4736
  class: "sort-icon"
4703
4737
  })) : V("", !0),
4704
- d.column.getIsSorted() && d.column.getCanSort() ? (S(), E(C(N), {
4738
+ d.column.getIsSorted() && d.column.getCanSort() ? (S(), E(C(j), {
4705
4739
  key: 1,
4706
4740
  icon: d.column.getIsSorted() === "asc" ? "mdi:arrow-up" : "mdi:arrow-down",
4707
4741
  class: "sort-icon"
@@ -4711,10 +4745,10 @@ const ri = { class: "pagination" }, li = {
4711
4745
  ]))), 128))
4712
4746
  ], 2),
4713
4747
  A("tbody", null, [
4714
- (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", {
4715
4749
  key: g.id
4716
4750
  }, [
4717
- (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", {
4718
4752
  key: d.id,
4719
4753
  "data-label": d.column.id
4720
4754
  }, [
@@ -4728,7 +4762,7 @@ const ri = { class: "pagination" }, li = {
4728
4762
  ], 4),
4729
4763
  A("div", ir, [
4730
4764
  A("div", rr, [
4731
- 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),
4732
4766
  A("span", sr, [
4733
4767
  f[6] || (f[6] = A("span", { class: "go-to-page-text" }, " Go to page: ", -1)),
4734
4768
  A("input", {
@@ -4741,12 +4775,12 @@ const ri = { class: "pagination" }, li = {
4741
4775
  ]),
4742
4776
  A("select", {
4743
4777
  value: C(r).getState().pagination.pageSize,
4744
- onChange: f[1] || (f[1] = (g) => c(g))
4778
+ onChange: f[1] || (f[1] = (g) => u(g))
4745
4779
  }, [
4746
- (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", {
4747
4781
  key: g,
4748
4782
  value: g
4749
- }, " Show " + z(g), 9, cr)), 64))
4783
+ }, " Show " + N(g), 9, cr)), 64))
4750
4784
  ], 40, ur)
4751
4785
  ]),
4752
4786
  A("div", dr, [
@@ -4755,7 +4789,7 @@ const ri = { class: "pagination" }, li = {
4755
4789
  disabled: !C(r).getCanPreviousPage(),
4756
4790
  onClick: f[2] || (f[2] = (g) => C(r).setPageIndex(0))
4757
4791
  }, [
4758
- M(C(N), {
4792
+ M(C(j), {
4759
4793
  icon: "material-symbols:keyboard-double-arrow-left-rounded",
4760
4794
  class: "navigation-button-icon"
4761
4795
  })
@@ -4765,7 +4799,7 @@ const ri = { class: "pagination" }, li = {
4765
4799
  disabled: !C(r).getCanPreviousPage(),
4766
4800
  onClick: f[3] || (f[3] = (g) => C(r).previousPage())
4767
4801
  }, [
4768
- M(C(N), {
4802
+ M(C(j), {
4769
4803
  icon: "material-symbols:arrow-back-ios-new-rounded",
4770
4804
  class: "navigation-button-icon"
4771
4805
  })
@@ -4775,7 +4809,7 @@ const ri = { class: "pagination" }, li = {
4775
4809
  disabled: !C(r).getCanNextPage(),
4776
4810
  onClick: f[4] || (f[4] = (g) => C(r).nextPage())
4777
4811
  }, [
4778
- M(C(N), {
4812
+ M(C(j), {
4779
4813
  icon: "material-symbols:arrow-forward-ios-rounded",
4780
4814
  class: "navigation-button-icon"
4781
4815
  })
@@ -4785,7 +4819,7 @@ const ri = { class: "pagination" }, li = {
4785
4819
  disabled: !C(r).getCanNextPage(),
4786
4820
  onClick: f[5] || (f[5] = (g) => C(r).setPageIndex(C(r).getPageCount() - 1))
4787
4821
  }, [
4788
- M(C(N), {
4822
+ M(C(j), {
4789
4823
  icon: "material-symbols:keyboard-double-arrow-right-rounded",
4790
4824
  class: "navigation-button-icon"
4791
4825
  })