@shifl-inc/ui 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shifl-ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ref as b, computed as C, onMounted as we, onUnmounted as Me, watch as W, nextTick as Ze, defineComponent as ce, createElementBlock as d, openBlock as a, withModifiers as J, createElementVNode as g, createCommentVNode as R, createTextVNode as se, toDisplayString as P, Fragment as H, renderList as j, normalizeClass as I, createBlock as B, Teleport as Ce, normalizeStyle as F, unref as V, resolveDynamicComponent as ue, createVNode as te, createStaticVNode as fn, provide as gn, inject as pn } from "vue";
1
+ import { ref as b, computed as C, onMounted as we, onUnmounted as Me, watch as W, nextTick as Ze, defineComponent as ce, createElementBlock as d, openBlock as a, withModifiers as J, createElementVNode as g, createCommentVNode as H, createTextVNode as se, toDisplayString as P, Fragment as R, renderList as j, normalizeClass as I, createBlock as B, Teleport as Ce, normalizeStyle as F, unref as V, resolveDynamicComponent as ue, createVNode as ee, createStaticVNode as fn, provide as gn, inject as pn } from "vue";
2
2
  function hn(i) {
3
3
  const r = (i.columns || []).map((h) => ({
4
4
  ...h,
@@ -214,8 +214,8 @@ function bn(i, r) {
214
214
  E = z ? `${i}?${z}` : i;
215
215
  } else {
216
216
  const z = new URLSearchParams();
217
- Object.entries(ie).forEach(([ne, O]) => {
218
- O != null && O !== "" && (Array.isArray(O) ? O.forEach((ge) => z.append(`${ne}[]`, String(ge))) : z.append(ne, String(O)));
217
+ Object.entries(ie).forEach(([te, O]) => {
218
+ O != null && O !== "" && (Array.isArray(O) ? O.forEach((ge) => z.append(`${te}[]`, String(ge))) : z.append(te, String(O)));
219
219
  });
220
220
  const fe = z.toString();
221
221
  E = fe ? `${i}?${fe}` : i;
@@ -349,13 +349,13 @@ function Cn(i) {
349
349
  }), m.join(`
350
350
  `);
351
351
  }
352
- function yt(i, r, f) {
352
+ function _t(i, r, f) {
353
353
  const h = new Blob([i], { type: f }), l = window.URL.createObjectURL(h), m = document.createElement("a");
354
354
  m.href = l, m.download = r, document.body.appendChild(m), m.click(), document.body.removeChild(m), window.URL.revokeObjectURL(l);
355
355
  }
356
- function ht(i, r) {
356
+ function pt(i, r) {
357
357
  const f = Cn(i), h = r.endsWith(".csv") ? r : `${r}.csv`;
358
- yt(f, h, "text/csv;charset=utf-8;");
358
+ _t(f, h, "text/csv;charset=utf-8;");
359
359
  }
360
360
  function wn(i, r) {
361
361
  const { rows: f, columns: h } = i, l = h.filter((k) => k.visible && k.key !== "_actions").sort((k, w) => (k.order || 0) - (w.order || 0));
@@ -402,7 +402,7 @@ function wn(i, r) {
402
402
  <thead>
403
403
  <tr>
404
404
  `, l.forEach((k) => {
405
- m += ` <th>${mt(k.label || k.key)}</th>
405
+ m += ` <th>${ht(k.label || k.key)}</th>
406
406
  `;
407
407
  }), m += `
408
408
  </tr>
@@ -418,7 +418,7 @@ function wn(i, r) {
418
418
  ).join(", ") : typeof u == "object" && u !== null ? c = "name" in u ? String(u.name) : JSON.stringify(u) : c = String(u);
419
419
  const _ = c.replace(/\r?\n/g, `
420
420
  `);
421
- m += ` <td>${mt(_)}</td>
421
+ m += ` <td>${ht(_)}</td>
422
422
  `;
423
423
  }), m += ` </tr>
424
424
  `;
@@ -428,9 +428,9 @@ function wn(i, r) {
428
428
  </body>
429
429
  </html>`;
430
430
  const T = r.endsWith(".xlsx") ? r : `${r}.xlsx`;
431
- yt(m, T, "application/vnd.ms-excel");
431
+ _t(m, T, "application/vnd.ms-excel");
432
432
  }
433
- function mt(i) {
433
+ function ht(i) {
434
434
  const r = document.createElement("div");
435
435
  return r.textContent = i, r.innerHTML;
436
436
  }
@@ -442,14 +442,14 @@ function Mn(i) {
442
442
  }
443
443
  switch (r) {
444
444
  case "csv":
445
- ht(h, f);
445
+ pt(h, f);
446
446
  break;
447
447
  case "excel":
448
448
  case "xlsx":
449
449
  wn(h, f);
450
450
  break;
451
451
  default:
452
- ht(h, f);
452
+ pt(h, f);
453
453
  break;
454
454
  }
455
455
  }
@@ -461,7 +461,7 @@ function Tn(i, r, f, h) {
461
461
  filters: h
462
462
  };
463
463
  }
464
- function vt(i) {
464
+ function mt(i) {
465
465
  const r = [];
466
466
  return (!i.exportFileName || i.exportFileName.trim() === "") && r.push("Export file name is required"), i.exportType ? ["csv", "excel", "xlsx"].includes(i.exportType) || r.push("Invalid export type. Must be csv, excel, or xlsx") : r.push("Export type is required"), i.source ? ["client", "server"].includes(i.source) || r.push("Invalid export source. Must be client or server") : r.push("Export source is required"), {
467
467
  isValid: r.length === 0,
@@ -500,8 +500,8 @@ const Sn = { class: "shifl-column-manager__header" }, xn = { class: "shifl-colum
500
500
  g("header", Sn, [
501
501
  g("div", xn, [
502
502
  g("h2", $n, [
503
- i.titlePrefix ? (a(), d("span", Pn, P(i.titlePrefix), 1)) : R("", !0),
504
- i.titlePrefix ? (a(), d("span", Ln, ">")) : R("", !0),
503
+ i.titlePrefix ? (a(), d("span", Pn, P(i.titlePrefix), 1)) : H("", !0),
504
+ i.titlePrefix ? (a(), d("span", Ln, ">")) : H("", !0),
505
505
  c[8] || (c[8] = se("Edit Columns ", -1))
506
506
  ])
507
507
  ]),
@@ -534,7 +534,7 @@ const Sn = { class: "shifl-column-manager__header" }, xn = { class: "shifl-colum
534
534
  ]),
535
535
  g("div", An, [
536
536
  g("ul", Hn, [
537
- (a(!0), d(H, null, j(h.value, (_, M) => (a(), d("li", {
537
+ (a(!0), d(R, null, j(h.value, (_, M) => (a(), d("li", {
538
538
  key: _.key,
539
539
  class: I(["shifl-column-manager__item", {
540
540
  "shifl-column-manager__item--disabled": _.freeze || _.protected
@@ -643,14 +643,14 @@ const Sn = { class: "shifl-column-manager__header" }, xn = { class: "shifl-colum
643
643
  i.isHtml ? (a(), d("div", {
644
644
  key: 0,
645
645
  innerHTML: i.content
646
- }, null, 8, Zn)) : l.value ? (a(!0), d(H, { key: 1 }, j(m.value, (_, M) => (a(), d("div", {
646
+ }, null, 8, Zn)) : l.value ? (a(!0), d(R, { key: 1 }, j(m.value, (_, M) => (a(), d("div", {
647
647
  key: M,
648
648
  class: "shifl-grid__tooltip-line"
649
- }, P(_), 1))), 128)) : (a(), d(H, { key: 2 }, [
649
+ }, P(_), 1))), 128)) : (a(), d(R, { key: 2 }, [
650
650
  se(P(i.content), 1)
651
651
  ], 64))
652
652
  ])
653
- ], 4)) : R("", !0)
653
+ ], 4)) : H("", !0)
654
654
  ]));
655
655
  }
656
656
  }), Fn = /* @__PURE__ */ G(Gn, [["__scopeId", "data-v-239005f1"]]), Wn = {}, Un = {
@@ -694,7 +694,7 @@ function Qn(i, r, f, h, l, m) {
694
694
  }, null, 8, Xn)
695
695
  ]);
696
696
  }
697
- const _t = /* @__PURE__ */ G(qn, [["render", Qn]]), er = {}, tr = {
697
+ const vt = /* @__PURE__ */ G(qn, [["render", Qn]]), er = {}, tr = {
698
698
  width: "14",
699
699
  height: "10",
700
700
  viewBox: "0 0 14 10",
@@ -724,7 +724,7 @@ function or(i, r) {
724
724
  }, null, -1)
725
725
  ])]);
726
726
  }
727
- const bt = /* @__PURE__ */ G(sr, [["render", or]]), ar = {}, lr = {
727
+ const yt = /* @__PURE__ */ G(sr, [["render", or]]), ar = {}, lr = {
728
728
  width: "16",
729
729
  height: "16",
730
730
  viewBox: "0 0 16 16",
@@ -822,12 +822,12 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
822
822
  },
823
823
  setup(i) {
824
824
  const h = {
825
- OceanIcon: bt
825
+ OceanIcon: yt
826
826
  // add other icons here...
827
827
  }[i.iconName] ?? null;
828
828
  return (l, m) => (a(), d("div", Sr, [
829
829
  g("div", xr, [
830
- V(h) ? (a(), B(ue(V(h)), { key: 0 })) : R("", !0)
830
+ V(h) ? (a(), B(ue(V(h)), { key: 0 })) : H("", !0)
831
831
  ]),
832
832
  g("p", $r, P(i.title), 1),
833
833
  g("p", Pr, P(i.description), 1)
@@ -842,49 +842,55 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
842
842
  }, jr = {
843
843
  key: 2,
844
844
  class: "shifl-grid__sort-icon shifl-grid__sort-icon--hover"
845
- }, Br = { key: 0 }, Ir = ["colspan"], Or = { key: 1 }, Zr = ["colspan"], Gr = ["onClick"], Fr = {
845
+ }, Br = ["onClick"], Ir = {
846
846
  key: 0,
847
847
  class: "shifl-grid__smart-tracking-icon"
848
- }, Wr = {
848
+ }, Or = {
849
849
  key: 1,
850
850
  class: "shifl-grid__action-icon-wrapper"
851
- }, Ur = ["onClick"], Kr = { key: 0 }, Jr = ["innerHTML"], qr = {
851
+ }, Zr = ["onClick"], Gr = { key: 0 }, Fr = ["innerHTML"], Wr = {
852
852
  key: 2,
853
853
  class: "shifl-grid__composite-cell"
854
- }, Yr = {
854
+ }, Ur = {
855
855
  key: 1,
856
856
  class: "shifl-grid__cell-blank"
857
- }, Xr = {
857
+ }, Kr = {
858
858
  key: 3,
859
859
  class: "shifl-grid__type-cell"
860
- }, Qr = {
860
+ }, Jr = {
861
861
  key: 1,
862
862
  class: "shifl-grid__cell-blank"
863
- }, es = {
863
+ }, qr = {
864
864
  key: 2,
865
865
  class: "shifl-grid__container-badge"
866
- }, ts = {
866
+ }, Yr = {
867
867
  key: 0,
868
868
  class: "shifl-grid__cell-blank"
869
- }, ns = {
869
+ }, Xr = {
870
870
  key: 1,
871
871
  class: "shifl-grid__tags-cell"
872
- }, rs = { class: "shifl-grid__tags-wrapper" }, ss = ["onMouseenter"], is = {
872
+ }, Qr = { class: "shifl-grid__tags-wrapper" }, es = ["onMouseenter"], ts = {
873
873
  key: 5,
874
874
  class: "shifl-grid__chips-container"
875
- }, os = {
875
+ }, ns = {
876
876
  key: 6,
877
877
  class: "shifl-grid__truncated-cell"
878
- }, as = ["onMouseenter"], ls = ["onMouseenter"], us = ["href"], cs = {
878
+ }, rs = ["onMouseenter"], ss = ["onMouseenter"], is = ["href"], os = {
879
879
  key: 8,
880
880
  class: "shifl-grid__progress-cell"
881
- }, ds = { class: "shifl-grid__progress-bar" }, fs = { class: "shifl-grid__progress-text" }, gs = ["onMouseenter"], ps = { class: "shifl-grid__reference-value" }, hs = ["onClick"], ms = {
881
+ }, as = { class: "shifl-grid__progress-bar" }, ls = { class: "shifl-grid__progress-text" }, us = ["onMouseenter"], cs = { class: "shifl-grid__reference-value" }, ds = ["onClick"], fs = { key: 0 }, gs = {
882
+ key: 0,
883
+ class: "shifl-grid__empty-state-wrapper"
884
+ }, ps = {
885
+ key: 1,
886
+ class: "text-center text-gray-500 py-6 shifl-grid__empty-state-wrapper empty--rows"
887
+ }, hs = {
882
888
  key: 0,
883
889
  class: "shifl-grid__pagination"
884
- }, vs = { class: "shifl-grid__pagination-left" }, _s = { class: "shifl-grid__pagination-range" }, ys = { class: "shifl-grid__pagination-range-numbers" }, bs = { class: "shifl-grid__pagination-right" }, ks = { class: "shifl-grid__pagination-rows" }, Cs = ["value", "disabled"], ws = { class: "shifl-grid__pagination-nav" }, Ms = ["disabled"], Ts = { class: "shifl-grid__pagination-pages" }, Ss = ["disabled", "onClick"], xs = {
890
+ }, ms = { class: "shifl-grid__pagination-left" }, vs = { class: "shifl-grid__pagination-range" }, _s = { class: "shifl-grid__pagination-range-numbers" }, ys = { class: "shifl-grid__pagination-right" }, bs = { class: "shifl-grid__pagination-rows" }, ks = ["value", "disabled"], Cs = { class: "shifl-grid__pagination-nav" }, ws = ["disabled"], Ms = { class: "shifl-grid__pagination-pages" }, Ts = ["disabled", "onClick"], Ss = {
885
891
  key: 1,
886
892
  class: "shifl-grid__pagination-ellipsis"
887
- }, $s = ["disabled"], Ps = ["onClick"], Ls = ["innerHTML"], Ns = { class: "shifl-grid__copy-tooltip-content" }, Es = /* @__PURE__ */ ce({
893
+ }, xs = ["disabled"], $s = ["onClick"], Ps = ["innerHTML"], Ls = { class: "shifl-grid__copy-tooltip-content" }, Ns = /* @__PURE__ */ ce({
888
894
  __name: "ShiflGrid",
889
895
  props: {
890
896
  config: {},
@@ -893,12 +899,12 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
893
899
  },
894
900
  emits: ["action-click", "search-change", "pagination-change", "row-click"],
895
901
  setup(i, { emit: r }) {
896
- var ct, dt, ft, gt, pt;
902
+ var ut, ct, dt, ft, gt;
897
903
  const f = i, h = r, l = C(() => hn(f.config)), m = b(f.search), T = b(l.value.filters), k = b(l.value.sort), w = b({
898
- page: ((ct = l.value.paginationMeta) == null ? void 0 : ct.currentPage) || 1,
899
- perPage: ((dt = l.value.paginationMeta) == null ? void 0 : dt.perPage) || 20
904
+ page: ((ut = l.value.paginationMeta) == null ? void 0 : ut.currentPage) || 1,
905
+ perPage: ((ct = l.value.paginationMeta) == null ? void 0 : ct.perPage) || 20
900
906
  }), u = b(
901
- typeof ((ft = l.value.apiConfig) == null ? void 0 : ft.additionalParams) == "function" || (pt = (gt = l.value.apiConfig) == null ? void 0 : gt.additionalParams) == null ? void 0 : pt.tabName
907
+ typeof ((dt = l.value.apiConfig) == null ? void 0 : dt.additionalParams) == "function" || (gt = (ft = l.value.apiConfig) == null ? void 0 : ft.additionalParams) == null ? void 0 : gt.tabName
902
908
  ), c = kn(l.value, {
903
909
  search: m,
904
910
  filters: T,
@@ -913,9 +919,9 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
913
919
  toggleFreeze: S,
914
920
  moveColumn: E,
915
921
  resetColumns: L
916
- } = mn(_.value), { sort: N, setSort: Te, applySort: de } = vn(l.value.sort), { applyGlobalFilter: ie } = _n(), { menuState: z, openMenu: fe, closeMenu: ne } = yn(), O = b(!1), ge = b({}), Ge = b(null), Fe = b(null), Se = b(null), xe = b(!1), We = b(""), $e = b(null), Pe = b(!1), wt = b({});
922
+ } = mn(_.value), { sort: N, setSort: Te, applySort: de } = vn(l.value.sort), { applyGlobalFilter: ie } = _n(), { menuState: z, openMenu: fe, closeMenu: te } = yn(), O = b(!1), ge = b({}), Ge = b(null), Fe = b(null), Se = b(null), xe = b(!1), We = b(""), $e = b(null), Pe = b(!1), Ct = b({});
917
923
  b({});
918
- const re = b(
924
+ const ne = b(
919
925
  {}
920
926
  ), pe = b(!1), he = b("Copy To Clipboard"), me = b(null), Le = b({ top: 0, left: 0 });
921
927
  function q() {
@@ -951,12 +957,12 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
951
957
  (e) => {
952
958
  if (e && typeof e != "function") {
953
959
  const t = e;
954
- t.tabName !== void 0 && u.value !== t.tabName && (Mt(), u.value = t.tabName);
960
+ t.tabName !== void 0 && u.value !== t.tabName && (wt(), u.value = t.tabName);
955
961
  }
956
962
  },
957
963
  { deep: !0 }
958
964
  );
959
- function Mt() {
965
+ function wt() {
960
966
  var t;
961
967
  const e = ((t = l.value.paginationMeta) == null ? void 0 : t.perPage) || 20;
962
968
  w.value = { page: 1, perPage: e }, m.value = void 0, k.value = l.value.sort, T.value = l.value.filters, h("search-change", ""), h("pagination-change", 1, e);
@@ -1003,10 +1009,10 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1003
1009
  ...c.paginationMeta.value,
1004
1010
  currentPage: ((e = w.value) == null ? void 0 : e.page) || c.paginationMeta.value.currentPage || 1
1005
1011
  } : l.value.paginationMeta;
1006
- }), X = C(() => f.loading !== void 0 ? f.loading : c.loading.value), Tt = C(() => {
1012
+ }), U = C(() => f.loading !== void 0 ? f.loading : c.loading.value), Mt = C(() => {
1007
1013
  var e;
1008
1014
  return ((e = D.value) == null ? void 0 : e.perPage) === 100;
1009
- }), St = C(() => {
1015
+ }), Tt = C(() => {
1010
1016
  var e;
1011
1017
  return ((e = D.value) == null ? void 0 : e.perPage) || 10;
1012
1018
  }), Ue = C(() => {
@@ -1018,7 +1024,7 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1018
1024
  return { from: e.from, to: e.to };
1019
1025
  const y = (o - 1) * n + 1, $ = Math.min(o * n, t);
1020
1026
  return t === 0 ? { from: 0, to: 0 } : { from: y, to: $ };
1021
- }), Q = C(() => {
1027
+ }), X = C(() => {
1022
1028
  var e;
1023
1029
  return ((e = D.value) == null ? void 0 : e.currentPage) || 1;
1024
1030
  }), Re = C(() => {
@@ -1028,8 +1034,8 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1028
1034
  if (t === 0) return 1;
1029
1035
  const n = e.perPage || 20, o = Math.ceil(t / n);
1030
1036
  return Math.max(1, o);
1031
- }), Ke = C(() => Q.value <= 1), Je = C(() => Q.value >= Re.value), xt = C(() => {
1032
- const e = Re.value, t = Q.value, n = [];
1037
+ }), Ke = C(() => X.value <= 1), Je = C(() => X.value >= Re.value), St = C(() => {
1038
+ const e = Re.value, t = X.value, n = [];
1033
1039
  if (e <= 7)
1034
1040
  for (let o = 1; o <= e; o++)
1035
1041
  n.push(o);
@@ -1049,31 +1055,31 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1049
1055
  }
1050
1056
  return n;
1051
1057
  });
1052
- function $t(e) {
1058
+ function xt(e) {
1053
1059
  var n;
1054
- if (e < 1 || e > Re.value || e === Q.value || X.value) return;
1060
+ if (e < 1 || e > Re.value || e === X.value || U.value) return;
1055
1061
  const t = ((n = D.value) == null ? void 0 : n.perPage) || 20;
1056
1062
  w.value = { page: e, perPage: t }, h("pagination-change", e, t);
1057
1063
  }
1058
- function Pt() {
1064
+ function $t() {
1059
1065
  var n;
1060
- if (Ke.value || X.value) return;
1061
- const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Q.value - 1;
1066
+ if (Ke.value || U.value) return;
1067
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = X.value - 1;
1062
1068
  w.value = { page: t, perPage: e }, h("pagination-change", t, e);
1063
1069
  }
1064
- function Lt() {
1070
+ function Pt() {
1065
1071
  var n;
1066
- if (Je.value || X.value) return;
1067
- const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Q.value + 1;
1072
+ if (Je.value || U.value) return;
1073
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = X.value + 1;
1068
1074
  w.value = { page: t, perPage: e }, h("pagination-change", t, e);
1069
1075
  }
1070
- function Nt(e) {
1076
+ function Lt(e) {
1071
1077
  var o;
1072
- if (X.value) return;
1078
+ if (U.value) return;
1073
1079
  const t = e.target, n = parseInt(t.value, 10);
1074
1080
  n && n !== (((o = D.value) == null ? void 0 : o.perPage) || 20) && (w.value = { page: 1, perPage: n }, h("pagination-change", 1, n));
1075
1081
  }
1076
- const Et = C(() => {
1082
+ const Nt = C(() => {
1077
1083
  const e = l.value.columns.find((n) => n.smartTrackingColumn);
1078
1084
  if (!(e != null && e.smartTrackingColumn)) return !1;
1079
1085
  const t = e.smartTrackingColumn.dataKey;
@@ -1081,10 +1087,10 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1081
1087
  const o = n[t];
1082
1088
  return o === !0 || o === 1 || o === "true" || o === "1";
1083
1089
  });
1084
- }), Ve = C(() => l.value.columns.find((e) => e.smartTrackingColumn)), U = C(() => {
1090
+ }), Ve = C(() => l.value.columns.find((e) => e.smartTrackingColumn)), re = C(() => {
1085
1091
  var n;
1086
1092
  const e = x.value.filter((o) => !o.smartTrackingColumn);
1087
- if (Et.value && Ve.value) {
1093
+ if (Nt.value && Ve.value) {
1088
1094
  const o = {
1089
1095
  key: "_smart_tracking",
1090
1096
  label: "",
@@ -1103,33 +1109,33 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1103
1109
  }
1104
1110
  const t = e.find((o) => o.key === "ref");
1105
1111
  return t && (t.freeze = !0, t.protected = !0), e;
1106
- }), At = C(() => {
1112
+ }), Et = C(() => {
1107
1113
  let e = 0;
1108
1114
  const t = {};
1109
- for (const n of U.value) {
1115
+ for (const n of re.value) {
1110
1116
  n.freeze && (t[n.key] = e);
1111
1117
  const o = parseInt(n.width ?? "160", 10);
1112
1118
  Number.isNaN(o) || (e += o);
1113
1119
  }
1114
1120
  return t;
1115
- }), Ht = C(() => {
1121
+ }), At = C(() => {
1116
1122
  const e = l.value.exportConfig;
1117
1123
  return (e == null ? void 0 : e.show) === !0;
1118
- }), Rt = C(() => {
1124
+ }), Ht = C(() => {
1119
1125
  const e = l.value.exportConfig;
1120
- return !(e != null && e.show) || !Y.value || Y.value.length === 0 ? !0 : !vt(e).isValid;
1126
+ return !(e != null && e.show) || !Y.value || Y.value.length === 0 ? !0 : !mt(e).isValid;
1121
1127
  });
1122
- function Vt() {
1128
+ function Rt() {
1123
1129
  const e = l.value.exportConfig;
1124
1130
  if (!e) return;
1125
- const t = vt(e);
1131
+ const t = mt(e);
1126
1132
  if (!t.isValid) {
1127
1133
  console.error("Export configuration is invalid:", t.errors);
1128
1134
  return;
1129
1135
  }
1130
1136
  const n = Tn(
1131
1137
  Y.value,
1132
- U.value,
1138
+ re.value,
1133
1139
  N.value,
1134
1140
  T.value
1135
1141
  );
@@ -1139,10 +1145,10 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1139
1145
  data: n
1140
1146
  }) : e.source === "server" && console.log("Server-side export not yet implemented");
1141
1147
  }
1142
- const qe = C(() => !!f.search && f.search.trim().length > 0), Ye = b(0);
1148
+ const Vt = C(() => !!f.search && f.search.trim().length > 0), qe = b(0);
1143
1149
  function zt(e) {
1144
1150
  const t = e.target;
1145
- Ye.value = t.scrollLeft;
1151
+ qe.value = t.scrollLeft;
1146
1152
  }
1147
1153
  function Dt(e) {
1148
1154
  const t = M.value.find((n) => n.key === e);
@@ -1150,29 +1156,29 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1150
1156
  }
1151
1157
  function ve(e, t) {
1152
1158
  if (e == null || e === "" || e === void 0)
1153
- return ee(t.blankStyle);
1159
+ return Q(t.blankStyle);
1154
1160
  const n = t.cellType;
1155
1161
  if (Array.isArray(n)) {
1156
1162
  const o = n.find((s) => typeof s == "string" && s !== "icon");
1157
- return o && typeof o == "string" ? rt(e, o, t) : "";
1163
+ return o && typeof o == "string" ? nt(e, o, t) : "";
1158
1164
  }
1159
1165
  if (!n)
1160
1166
  return typeof e == "object" ? JSON.stringify(e) : String(e);
1161
1167
  switch (n) {
1162
1168
  case "number":
1163
- return Xe(e);
1169
+ return Ye(e);
1164
1170
  case "currency":
1165
- return Qe(e);
1171
+ return Xe(e);
1166
1172
  case "date":
1167
- return et(e);
1173
+ return Qe(e);
1168
1174
  case "boolean":
1169
- return tt(e);
1175
+ return et(e);
1170
1176
  case "text":
1171
1177
  default:
1172
1178
  return typeof e == "object" ? JSON.stringify(e) : String(e);
1173
1179
  }
1174
1180
  }
1175
- function ee(e) {
1181
+ function Q(e) {
1176
1182
  switch (e) {
1177
1183
  case "dash":
1178
1184
  return "--";
@@ -1185,13 +1191,13 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1185
1191
  return "";
1186
1192
  }
1187
1193
  }
1188
- function Xe(e) {
1194
+ function Ye(e) {
1189
1195
  if (typeof e == "number")
1190
1196
  return e.toLocaleString();
1191
1197
  const t = Number(e);
1192
1198
  return Number.isNaN(t) ? String(e) : t.toLocaleString();
1193
1199
  }
1194
- function Qe(e) {
1200
+ function Xe(e) {
1195
1201
  if (typeof e == "number")
1196
1202
  return new Intl.NumberFormat("en-US", {
1197
1203
  style: "currency",
@@ -1203,7 +1209,7 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1203
1209
  currency: "USD"
1204
1210
  }).format(t);
1205
1211
  }
1206
- function et(e) {
1212
+ function Qe(e) {
1207
1213
  if (e instanceof Date)
1208
1214
  return e.toLocaleDateString();
1209
1215
  if (typeof e == "string") {
@@ -1213,7 +1219,7 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1213
1219
  }
1214
1220
  return String(e);
1215
1221
  }
1216
- function tt(e) {
1222
+ function et(e) {
1217
1223
  return typeof e == "boolean" ? e ? "Yes" : "No" : e === 1 || e === "1" || e === "true" || e === "True" ? "Yes" : e === 0 || e === "0" || e === "false" || e === "False" ? "No" : String(e);
1218
1224
  }
1219
1225
  function jt(e) {
@@ -1223,13 +1229,13 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1223
1229
  return Number.isNaN(t) ? 0 : Math.min(100, Math.max(0, t));
1224
1230
  }
1225
1231
  function _e(e) {
1226
- return typeof e == "boolean" ? e ? _r : Cr : typeof e == "string" && e.toLowerCase() === "ocean" ? bt : null;
1232
+ return typeof e == "boolean" ? e ? _r : Cr : typeof e == "string" && e.toLowerCase() === "ocean" ? yt : null;
1227
1233
  }
1228
1234
  function Bt(e) {
1229
1235
  const t = e.toLowerCase();
1230
1236
  return ["supplier", "suppliers", "po", "pos", "product_description"].includes(t);
1231
1237
  }
1232
- function nt(e) {
1238
+ function tt(e) {
1233
1239
  if (e.cellType === "badge") return !0;
1234
1240
  const t = e.key.toLowerCase();
1235
1241
  return t === "tag" || t === "tags";
@@ -1246,18 +1252,18 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1246
1252
  function Gt(e) {
1247
1253
  return Array.isArray(e.cellType) ? e.cellType.filter((t) => typeof t == "string") : e.cellType && typeof e.cellType == "string" ? [e.cellType] : [];
1248
1254
  }
1249
- function rt(e, t, n) {
1255
+ function nt(e, t, n) {
1250
1256
  if (e == null || e === "" || e === void 0)
1251
- return ee(n.blankStyle);
1257
+ return Q(n.blankStyle);
1252
1258
  switch (t) {
1253
1259
  case "number":
1254
- return Xe(e);
1260
+ return Ye(e);
1255
1261
  case "currency":
1256
- return Qe(e);
1262
+ return Xe(e);
1257
1263
  case "date":
1258
- return et(e);
1264
+ return Qe(e);
1259
1265
  case "boolean":
1260
- return tt(e);
1266
+ return et(e);
1261
1267
  case "text":
1262
1268
  default:
1263
1269
  return typeof e == "object" ? JSON.stringify(e) : String(e);
@@ -1274,16 +1280,16 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1274
1280
  }
1275
1281
  function Wt(e, t) {
1276
1282
  if (e == null || e === "")
1277
- return ee(t.blankStyle);
1283
+ return Q(t.blankStyle);
1278
1284
  if (Array.isArray(e)) {
1279
1285
  if (e.length === 0)
1280
- return ee(t.blankStyle);
1286
+ return Q(t.blankStyle);
1281
1287
  const n = e.join(", ");
1282
- return st(n, 45);
1288
+ return rt(n, 45);
1283
1289
  }
1284
- return typeof e == "string" ? st(e, 45) : String(e);
1290
+ return typeof e == "string" ? rt(e, 45) : String(e);
1285
1291
  }
1286
- function st(e, t) {
1292
+ function rt(e, t) {
1287
1293
  return e.length <= t ? e : e.substring(0, t) + "...";
1288
1294
  }
1289
1295
  function ze(e) {
@@ -1314,10 +1320,10 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1314
1320
  }
1315
1321
  function De(e, t, n, o) {
1316
1322
  let s = "", y = !1;
1317
- const $ = U.value.find((A) => A.key === e);
1318
- if ($ && nt($)) {
1319
- const A = it(n);
1320
- A.length > 0 && (y = !0, s = A.map((K) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${lt(K)} !important">${K.name}</span>`).join(""));
1323
+ const $ = re.value.find((A) => A.key === e);
1324
+ if ($ && tt($)) {
1325
+ const A = st(n);
1326
+ A.length > 0 && (y = !0, s = A.map((K) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${at(K)} !important">${K.name}</span>`).join(""));
1321
1327
  } else Array.isArray(n) ? n.length > 0 && (s = n.join(`
1322
1328
  `)) : n != null && (s = String(n));
1323
1329
  We.value = s, Pe.value = y, $e.value = o, xe.value = !0;
@@ -1345,12 +1351,12 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1345
1351
  }
1346
1352
  }
1347
1353
  function Xt(e, t, n) {
1348
- n && (wt.value[`${e}-${t}`] = n);
1354
+ n && (Ct.value[`${e}-${t}`] = n);
1349
1355
  }
1350
1356
  function ye(e) {
1351
1357
  return e == null ? [] : Array.isArray(e) ? e.map((t) => typeof t == "object" && t !== null && "name" in t ? String(t.name) : String(t)).filter((t) => t.length > 0) : typeof e == "string" ? e.split(",").map((t) => t.trim()).filter((t) => t.length > 0) : [String(e)];
1352
1358
  }
1353
- function it(e) {
1359
+ function st(e) {
1354
1360
  return e == null ? [] : Array.isArray(e) ? e.map((t) => typeof t == "object" && t !== null && "name" in t ? {
1355
1361
  name: String(t.name),
1356
1362
  color: "color" in t ? String(t.color) : void 0
@@ -1359,12 +1365,12 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1359
1365
  color: void 0
1360
1366
  }).filter((t) => t.name.length > 0) : typeof e == "string" ? e.split(",").map((t) => t.trim()).filter((t) => t.length > 0).map((t) => ({ name: t, color: void 0 })) : [{ name: String(e), color: void 0 }];
1361
1367
  }
1362
- function ot(e, t, n) {
1368
+ function it(e, t, n) {
1363
1369
  const o = ye(e);
1364
1370
  if (o.length === 0) return [];
1365
1371
  const s = `${t}-${n}`;
1366
- if (re.value[s])
1367
- return re.value[s];
1372
+ if (ne.value[s])
1373
+ return ne.value[s];
1368
1374
  const y = 130, $ = 8, A = 4;
1369
1375
  let K = 0;
1370
1376
  const Z = [];
@@ -1374,14 +1380,14 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1374
1380
  break;
1375
1381
  Z.push(ae), K += le;
1376
1382
  }
1377
- return re.value[s] = Z, Z;
1383
+ return ne.value[s] = Z, Z;
1378
1384
  }
1379
- function at(e, t, n) {
1380
- const o = it(e);
1385
+ function ot(e, t, n) {
1386
+ const o = st(e);
1381
1387
  if (o.length === 0) return [];
1382
1388
  const s = `${t}-${n}-objects`;
1383
- if (re.value[s])
1384
- return re.value[s];
1389
+ if (ne.value[s])
1390
+ return ne.value[s];
1385
1391
  const y = 130, $ = 8, A = 4;
1386
1392
  let K = 0;
1387
1393
  const Z = [];
@@ -1391,14 +1397,14 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1391
1397
  break;
1392
1398
  Z.push(ae), K += le;
1393
1399
  }
1394
- return re.value[s] = Z, Z;
1400
+ return ne.value[s] = Z, Z;
1395
1401
  }
1396
1402
  function Qt(e, t, n) {
1397
- const o = ye(e), s = ot(e, t, n);
1403
+ const o = ye(e), s = it(e, t, n);
1398
1404
  return o.length > s.length;
1399
1405
  }
1400
1406
  function en(e, t, n) {
1401
- const o = ye(e), s = ot(e, t, n);
1407
+ const o = ye(e), s = it(e, t, n);
1402
1408
  return o.length - s.length;
1403
1409
  }
1404
1410
  function tn(e) {
@@ -1421,7 +1427,7 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1421
1427
  return s;
1422
1428
  return nn(e);
1423
1429
  }
1424
- function lt(e) {
1430
+ function at(e) {
1425
1431
  return e.color && e.color !== "" ? e.color : tn(e.name);
1426
1432
  }
1427
1433
  function nn(e) {
@@ -1444,9 +1450,9 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1444
1450
  const o = { ...{
1445
1451
  width: e.width ?? "160px",
1446
1452
  minWidth: e.width ?? "160px"
1447
- } }, s = Ye.value > 0, y = M.value.filter((A) => A.freeze), $ = y[y.length - 1];
1453
+ } }, s = qe.value > 0, y = M.value.filter((A) => A.freeze), $ = y[y.length - 1];
1448
1454
  if (e.freeze) {
1449
- const A = At.value[e.key] ?? 0;
1455
+ const A = Et.value[e.key] ?? 0;
1450
1456
  o.position = "sticky", o.left = `${A}px`, o.background = "#ffffff", o.zIndex = t ? 40 : 10, e.key === ($ == null ? void 0 : $.key) && s ? o.boxShadow = "2px 0px 4px -2px #121b2b0d, 2px 0px 2px 0px #121b2b0d" : o.boxShadow = "none";
1451
1457
  }
1452
1458
  return t && (o.position = "sticky", o.top = "0px"), o;
@@ -1480,7 +1486,7 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1480
1486
  if (!n.actionColumn) return;
1481
1487
  const s = o.currentTarget;
1482
1488
  if (z.value.rowIndex === e) {
1483
- ne();
1489
+ te();
1484
1490
  return;
1485
1491
  }
1486
1492
  Fe.value = n, Se.value = t, fe(e, s);
@@ -1489,7 +1495,7 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1489
1495
  return !(e != null && e.actionColumn) || !t ? [] : (typeof e.actionColumn.actions == "function" ? e.actionColumn.actions(t) : e.actionColumn.actions).filter((o) => o.show ? o.show(t) : !0);
1490
1496
  }
1491
1497
  function un(e, t, n) {
1492
- h("action-click", e.key, t, n), ne();
1498
+ h("action-click", e.key, t, n), te();
1493
1499
  }
1494
1500
  const cn = (e, t) => {
1495
1501
  ["BUTTON", "A", "INPUT", "SELECT", "TEXTAREA", "SVG", "PATH"].includes(t.target.tagName) || h("row-click", e);
@@ -1497,15 +1503,15 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1497
1503
  function dn(e, t) {
1498
1504
  t && (ge.value[e] = t);
1499
1505
  }
1500
- function ut(e) {
1506
+ function lt(e) {
1501
1507
  if (z.value.rowIndex === null) return;
1502
1508
  const t = e.target, n = Ge.value, o = Object.values(ge.value), s = n == null ? void 0 : n.contains(t), y = o.some(($) => $.contains(t));
1503
- !s && !y && ne();
1509
+ !s && !y && te();
1504
1510
  }
1505
1511
  return we(() => {
1506
- document.addEventListener("click", ut), document.addEventListener("scroll", q), window.addEventListener("scroll", q), window.addEventListener("resize", q);
1512
+ document.addEventListener("click", lt), document.addEventListener("scroll", q), window.addEventListener("scroll", q), window.addEventListener("resize", q);
1507
1513
  }), Me(() => {
1508
- document.removeEventListener("click", ut), document.removeEventListener("scroll", q), window.removeEventListener("scroll", q), window.removeEventListener("resize", q);
1514
+ document.removeEventListener("click", lt), document.removeEventListener("scroll", q), window.removeEventListener("scroll", q), window.removeEventListener("resize", q);
1509
1515
  }), (e, t) => (a(), d("div", Nr, [
1510
1516
  g("div", Er, [
1511
1517
  g("button", {
@@ -1513,29 +1519,29 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1513
1519
  class: "shifl-grid__pill-button whitespace-nowrap",
1514
1520
  onClick: t[0] || (t[0] = (n) => O.value = !0)
1515
1521
  }, " Edit Column "),
1516
- Ht.value ? (a(), d("button", {
1522
+ At.value ? (a(), d("button", {
1517
1523
  key: 0,
1518
1524
  type: "button",
1519
1525
  class: "shifl-grid__pill-button whitespace-nowrap flex items-center gap-2",
1520
- disabled: Rt.value,
1521
- onClick: Vt,
1526
+ disabled: Ht.value,
1527
+ onClick: Rt,
1522
1528
  title: "Export Data"
1523
1529
  }, [
1524
- te(Tr),
1530
+ ee(Tr),
1525
1531
  t[6] || (t[6] = se(" Export ", -1))
1526
- ], 8, Ar)) : R("", !0)
1532
+ ], 8, Ar)) : H("", !0)
1527
1533
  ]),
1528
1534
  g("div", {
1529
1535
  class: I(["shifl-grid__viewport", {
1530
- "shifl-grid__viewport--scroll": Tt.value,
1531
- "shifl-grid__viewport--empty": !Y.value.length && qe.value && l.value.emptyState
1536
+ "shifl-grid__viewport--scroll": Mt.value,
1537
+ "shifl-grid__viewport--empty": !Y.value.length
1532
1538
  }]),
1533
1539
  onScroll: zt
1534
1540
  }, [
1535
1541
  g("table", Hr, [
1536
1542
  g("thead", null, [
1537
1543
  g("tr", null, [
1538
- (a(!0), d(H, null, j(U.value, (n) => {
1544
+ (a(!0), d(R, null, j(re.value, (n) => {
1539
1545
  var o;
1540
1546
  return a(), d("th", {
1541
1547
  key: n.key,
@@ -1553,142 +1559,100 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1553
1559
  ])
1554
1560
  }, [
1555
1561
  g("div", Vr, [
1556
- n.label ? (a(), d("span", zr, P(n.label), 1)) : R("", !0),
1562
+ n.label ? (a(), d("span", zr, P(n.label), 1)) : H("", !0),
1557
1563
  ((o = V(N)) == null ? void 0 : o.key) === n.key && V(N).order ? (a(), d("span", Dr, [
1558
- V(N).order === "asc" ? (a(), B(_t, { key: 0 })) : (a(), B(rr, { key: 1 }))
1564
+ V(N).order === "asc" ? (a(), B(vt, { key: 0 })) : (a(), B(rr, { key: 1 }))
1559
1565
  ])) : n.sortable && !oe(n) && !be(n) ? (a(), d("span", jr, [
1560
- te(_t, { color: "#69758C" })
1561
- ])) : R("", !0)
1566
+ ee(vt, { color: "#69758C" })
1567
+ ])) : H("", !0)
1562
1568
  ])
1563
1569
  ], 14, Rr);
1564
1570
  }), 128))
1565
1571
  ])
1566
1572
  ]),
1567
1573
  g("tbody", null, [
1568
- X.value ? (a(!0), d(H, { key: 0 }, j(St.value, (n) => (a(), d("tr", {
1574
+ U.value ? (a(!0), d(R, { key: 0 }, j(Tt.value, (n) => (a(), d("tr", {
1569
1575
  key: `skeleton-${n}`,
1570
1576
  class: "shifl-grid__skeleton-row"
1571
1577
  }, [
1572
- (a(!0), d(H, null, j(U.value, (o) => (a(), d("td", {
1578
+ (a(!0), d(R, null, j(re.value, (o) => (a(), d("td", {
1573
1579
  key: o.key,
1574
1580
  style: F(Ie(o, !1)),
1575
1581
  class: I({ "shifl-grid__cell--sticky": o.freeze })
1576
1582
  }, [...t[7] || (t[7] = [
1577
1583
  g("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1578
1584
  ])], 6))), 128))
1579
- ]))), 128)) : (a(), d(H, { key: 1 }, [
1580
- !Y.value.length && qe.value && l.value.emptyState ? (a(), d("tr", Br, [
1581
- g("td", {
1582
- colspan: U.value.length,
1583
- style: { height: "200px !important", "border-right": "none !important" }
1584
- }, [
1585
- te(Lr, {
1586
- "icon-name": l.value.emptyState.iconName,
1587
- title: l.value.emptyState.title,
1588
- description: l.value.emptyState.description
1589
- }, null, 8, ["icon-name", "title", "description"])
1590
- ], 8, Ir)
1591
- ])) : Y.value.length ? R("", !0) : (a(), d("tr", Or, [
1592
- g("td", {
1593
- colspan: U.value.length,
1594
- class: "text-center text-gray-500 py-6"
1595
- }, " No data ", 8, Zr)
1596
- ])),
1597
- (a(!0), d(H, null, j(Y.value, (n, o) => (a(), d("tr", {
1598
- key: o,
1599
- onClick: (s) => cn(n, s)
1585
+ ]))), 128)) : (a(!0), d(R, { key: 1 }, j(Y.value, (n, o) => (a(), d("tr", {
1586
+ key: o,
1587
+ onClick: (s) => cn(n, s)
1588
+ }, [
1589
+ (a(!0), d(R, null, j(re.value, (s) => (a(), d("td", {
1590
+ key: s.key,
1591
+ style: F(Ie(s, !1)),
1592
+ class: I([
1593
+ { "shifl-grid__cell--sticky": s.freeze },
1594
+ { "shifl-grid__cell--action": oe(s) },
1595
+ `shifl-grid__cell-align-${s != null && s.align ? s.align : "left"}`,
1596
+ { "shifl-grid__icon": s.cellType === "icon" }
1597
+ ])
1600
1598
  }, [
1601
- (a(!0), d(H, null, j(U.value, (s) => (a(), d("td", {
1602
- key: s.key,
1603
- style: F(Ie(s, !1)),
1604
- class: I([
1605
- { "shifl-grid__cell--sticky": s.freeze },
1606
- { "shifl-grid__cell--action": oe(s) },
1607
- `shifl-grid__cell-align-${s != null && s.align ? s.align : "left"}`,
1608
- { "shifl-grid__icon": s.cellType === "icon" }
1609
- ])
1610
- }, [
1611
- be(s) ? (a(), d(H, { key: 0 }, [
1612
- on(s, n) ? (a(), d("div", Fr, [
1613
- te(Jn)
1614
- ])) : R("", !0)
1615
- ], 64)) : oe(s) ? (a(), d("div", Wr, [
1616
- g("button", {
1617
- type: "button",
1618
- class: "shifl-grid__action-icon",
1619
- ref_for: !0,
1620
- ref: (y) => dn(o, y),
1621
- onClick: J((y) => an(o, n, s, y), ["stop"])
1622
- }, [
1623
- ke(s, n) ? typeof ke(s, n) == "string" ? (a(), d("span", {
1624
- key: 1,
1625
- innerHTML: ke(s, n),
1626
- class: "w-4 h-4 inline-block"
1627
- }, null, 8, Jr)) : (a(), B(ue(ke(s, n)), {
1628
- key: 2,
1629
- class: "w-4 h-4"
1630
- })) : (a(), d("span", Kr, "⋯"))
1631
- ], 8, Ur)
1632
- ])) : Zt(s) ? (a(), d("div", qr, [
1633
- (a(!0), d(H, null, j(Gt(s), (y, $) => (a(), d(H, { key: $ }, [
1634
- y === "icon" && _e(n[s.key]) ? (a(), B(ue(_e(n[s.key])), {
1635
- key: 0,
1636
- class: "shifl-grid__type-icon"
1637
- })) : y === "icon" ? (a(), d("span", Yr, P(ee(s.blankStyle)), 1)) : (a(), d("span", {
1638
- key: 2,
1639
- class: I(Ft(y))
1640
- }, P(rt(n[s.key], y, s)), 3))
1641
- ], 64))), 128))
1642
- ])) : Ot(s) ? (a(), d("div", Xr, [
1643
- _e(n[s.key]) ? (a(), B(ue(_e(n[s.key])), {
1599
+ be(s) ? (a(), d(R, { key: 0 }, [
1600
+ on(s, n) ? (a(), d("div", Ir, [
1601
+ ee(Jn)
1602
+ ])) : H("", !0)
1603
+ ], 64)) : oe(s) ? (a(), d("div", Or, [
1604
+ g("button", {
1605
+ type: "button",
1606
+ class: "shifl-grid__action-icon",
1607
+ ref_for: !0,
1608
+ ref: (y) => dn(o, y),
1609
+ onClick: J((y) => an(o, n, s, y), ["stop"])
1610
+ }, [
1611
+ ke(s, n) ? typeof ke(s, n) == "string" ? (a(), d("span", {
1612
+ key: 1,
1613
+ innerHTML: ke(s, n),
1614
+ class: "w-4 h-4 inline-block"
1615
+ }, null, 8, Fr)) : (a(), B(ue(ke(s, n)), {
1616
+ key: 2,
1617
+ class: "w-4 h-4"
1618
+ })) : (a(), d("span", Gr, "⋯"))
1619
+ ], 8, Zr)
1620
+ ])) : Zt(s) ? (a(), d("div", Wr, [
1621
+ (a(!0), d(R, null, j(Gt(s), (y, $) => (a(), d(R, { key: $ }, [
1622
+ y === "icon" && _e(n[s.key]) ? (a(), B(ue(_e(n[s.key])), {
1644
1623
  key: 0,
1645
1624
  class: "shifl-grid__type-icon"
1646
- })) : (a(), d("span", Qr, P(ee(s.blankStyle)), 1)),
1647
- n.container_count != null ? (a(), d("span", es, " (" + P(n.container_count) + ") ", 1)) : R("", !0)
1648
- ])) : nt(s) ? (a(), d(H, { key: 4 }, [
1649
- n[s.key] == null || at(n[s.key], s.key, o).length === 0 ? (a(), d("div", ts, P(ee(s.blankStyle)), 1)) : (a(), d("div", ns, [
1650
- g("div", rs, [
1651
- g("div", {
1652
- ref_for: !0,
1653
- ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1654
- class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1655
- }, [
1656
- (a(!0), d(H, null, j(at(
1657
- n[s.key],
1658
- s.key,
1659
- o
1660
- ), (y, $) => (a(), d("span", {
1661
- key: $,
1662
- class: "shifl-grid__chip shifl-grid__chip--tag",
1663
- style: F({ borderLeftColor: lt(y) })
1664
- }, P(y.name), 5))), 128))
1665
- ], 512)
1666
- ]),
1667
- Qt(n[s.key], s.key, o) ? (a(), d("button", {
1668
- key: 0,
1669
- type: "button",
1670
- class: "shifl-grid__counter-button",
1671
- onMouseenter: (y) => De(
1672
- s.key,
1673
- o,
1625
+ })) : y === "icon" ? (a(), d("span", Ur, P(Q(s.blankStyle)), 1)) : (a(), d("span", {
1626
+ key: 2,
1627
+ class: I(Ft(y))
1628
+ }, P(nt(n[s.key], y, s)), 3))
1629
+ ], 64))), 128))
1630
+ ])) : Ot(s) ? (a(), d("div", Kr, [
1631
+ _e(n[s.key]) ? (a(), B(ue(_e(n[s.key])), {
1632
+ key: 0,
1633
+ class: "shifl-grid__type-icon"
1634
+ })) : (a(), d("span", Jr, P(Q(s.blankStyle)), 1)),
1635
+ n.container_count != null ? (a(), d("span", qr, " (" + P(n.container_count) + ") ", 1)) : H("", !0)
1636
+ ])) : tt(s) ? (a(), d(R, { key: 4 }, [
1637
+ n[s.key] == null || ot(n[s.key], s.key, o).length === 0 ? (a(), d("div", Yr, P(Q(s.blankStyle)), 1)) : (a(), d("div", Xr, [
1638
+ g("div", Qr, [
1639
+ g("div", {
1640
+ ref_for: !0,
1641
+ ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1642
+ class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1643
+ }, [
1644
+ (a(!0), d(R, null, j(ot(
1674
1645
  n[s.key],
1675
- y.currentTarget
1676
- ),
1677
- onMouseleave: je
1678
- }, " +" + P(en(n[s.key], s.key, o)), 41, ss)) : R("", !0)
1679
- ]))
1680
- ], 64)) : It(s) ? (a(), d("div", is, [
1681
- (a(!0), d(H, null, j(ye(n[s.key]), (y, $) => (a(), d("span", {
1682
- key: $,
1683
- class: "shifl-grid__chip shifl-grid__chip--status"
1684
- }, P(y), 1))), 128))
1685
- ])) : s.truncate !== !1 && (s.truncate === !0 || Bt(s.key)) ? (a(), d("div", os, [
1686
- g("span", {
1687
- class: "shifl-grid__truncated-text",
1688
- ref_for: !0,
1689
- ref: (y) => Xt(s.key, o, y)
1690
- }, P(Wt(n[s.key], s)), 513),
1691
- ze(s.key) && Kt(n[s.key]) ? (a(), d("button", {
1646
+ s.key,
1647
+ o
1648
+ ), (y, $) => (a(), d("span", {
1649
+ key: $,
1650
+ class: "shifl-grid__chip shifl-grid__chip--tag",
1651
+ style: F({ borderLeftColor: at(y) })
1652
+ }, P(y.name), 5))), 128))
1653
+ ], 512)
1654
+ ]),
1655
+ Qt(n[s.key], s.key, o) ? (a(), d("button", {
1692
1656
  key: 0,
1693
1657
  type: "button",
1694
1658
  class: "shifl-grid__counter-button",
@@ -1699,107 +1663,139 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1699
1663
  y.currentTarget
1700
1664
  ),
1701
1665
  onMouseleave: je
1702
- }, " +" + P(Jt(n[s.key])), 41, as)) : !ze(s.key) && Ut(n[s.key], s.key) ? (a(), d("button", {
1703
- key: 1,
1704
- type: "button",
1705
- class: "shifl-grid__info-icon-button",
1706
- onMouseenter: (y) => De(
1707
- s.key,
1708
- o,
1709
- n[s.key],
1710
- y.currentTarget
1711
- ),
1712
- onMouseleave: je
1713
- }, [
1714
- te(cr)
1715
- ], 40, ls)) : R("", !0)
1716
- ])) : s.cellType === "link" ? (a(), d("a", {
1717
- key: 7,
1718
- href: String(n[s.key] || ""),
1719
- class: "shifl-grid__link-cell",
1720
- onClick: t[1] || (t[1] = J(() => {
1721
- }, ["stop"]))
1722
- }, P(ve(n[s.key], s)), 9, us)) : s.cellType === "progress" ? (a(), d("div", cs, [
1723
- g("div", ds, [
1724
- g("div", {
1725
- class: "shifl-grid__progress-fill",
1726
- style: F({ width: `${jt(n[s.key])}%` })
1727
- }, null, 4)
1728
- ]),
1729
- g("span", fs, P(ve(n[s.key], s)), 1)
1730
- ])) : sn(s) ? (a(), d("div", {
1731
- key: 9,
1732
- class: "shifl-grid__reference-cell",
1733
- onMouseenter: (y) => qt(String(n[s.key] || ""), y.currentTarget),
1734
- onMouseleave: Be
1666
+ }, " +" + P(en(n[s.key], s.key, o)), 41, es)) : H("", !0)
1667
+ ]))
1668
+ ], 64)) : It(s) ? (a(), d("div", ts, [
1669
+ (a(!0), d(R, null, j(ye(n[s.key]), (y, $) => (a(), d("span", {
1670
+ key: $,
1671
+ class: "shifl-grid__chip shifl-grid__chip--status"
1672
+ }, P(y), 1))), 128))
1673
+ ])) : s.truncate !== !1 && (s.truncate === !0 || Bt(s.key)) ? (a(), d("div", ns, [
1674
+ g("span", {
1675
+ class: "shifl-grid__truncated-text",
1676
+ ref_for: !0,
1677
+ ref: (y) => Xt(s.key, o, y)
1678
+ }, P(Wt(n[s.key], s)), 513),
1679
+ ze(s.key) && Kt(n[s.key]) ? (a(), d("button", {
1680
+ key: 0,
1681
+ type: "button",
1682
+ class: "shifl-grid__counter-button",
1683
+ onMouseenter: (y) => De(
1684
+ s.key,
1685
+ o,
1686
+ n[s.key],
1687
+ y.currentTarget
1688
+ ),
1689
+ onMouseleave: je
1690
+ }, " +" + P(Jt(n[s.key])), 41, rs)) : !ze(s.key) && Ut(n[s.key], s.key) ? (a(), d("button", {
1691
+ key: 1,
1692
+ type: "button",
1693
+ class: "shifl-grid__info-icon-button",
1694
+ onMouseenter: (y) => De(
1695
+ s.key,
1696
+ o,
1697
+ n[s.key],
1698
+ y.currentTarget
1699
+ ),
1700
+ onMouseleave: je
1735
1701
  }, [
1736
- g("span", ps, P(ve(n[s.key], s)), 1),
1737
- n[s.key] ? (a(), d("button", {
1738
- key: 0,
1739
- class: "shifl-grid__copy-icon",
1740
- onClick: J(() => Yt(String(n[s.key] || "")), ["stop"]),
1741
- type: "button"
1742
- }, [
1743
- te(pr)
1744
- ], 8, hs)) : R("", !0)
1745
- ], 40, gs)) : (a(), d(H, { key: 10 }, [
1746
- se(P(ve(n[s.key], s)), 1)
1747
- ], 64))
1748
- ], 6))), 128))
1749
- ], 8, Gr))), 128))
1750
- ], 64))
1702
+ ee(cr)
1703
+ ], 40, ss)) : H("", !0)
1704
+ ])) : s.cellType === "link" ? (a(), d("a", {
1705
+ key: 7,
1706
+ href: String(n[s.key] || ""),
1707
+ class: "shifl-grid__link-cell",
1708
+ onClick: t[1] || (t[1] = J(() => {
1709
+ }, ["stop"]))
1710
+ }, P(ve(n[s.key], s)), 9, is)) : s.cellType === "progress" ? (a(), d("div", os, [
1711
+ g("div", as, [
1712
+ g("div", {
1713
+ class: "shifl-grid__progress-fill",
1714
+ style: F({ width: `${jt(n[s.key])}%` })
1715
+ }, null, 4)
1716
+ ]),
1717
+ g("span", ls, P(ve(n[s.key], s)), 1)
1718
+ ])) : sn(s) ? (a(), d("div", {
1719
+ key: 9,
1720
+ class: "shifl-grid__reference-cell",
1721
+ onMouseenter: (y) => qt(String(n[s.key] || ""), y.currentTarget),
1722
+ onMouseleave: Be
1723
+ }, [
1724
+ g("span", cs, P(ve(n[s.key], s)), 1),
1725
+ n[s.key] ? (a(), d("button", {
1726
+ key: 0,
1727
+ class: "shifl-grid__copy-icon",
1728
+ onClick: J(() => Yt(String(n[s.key] || "")), ["stop"]),
1729
+ type: "button"
1730
+ }, [
1731
+ ee(pr)
1732
+ ], 8, ds)) : H("", !0)
1733
+ ], 40, us)) : (a(), d(R, { key: 10 }, [
1734
+ se(P(ve(n[s.key], s)), 1)
1735
+ ], 64))
1736
+ ], 6))), 128))
1737
+ ], 8, Br))), 128))
1751
1738
  ])
1752
- ])
1739
+ ]),
1740
+ U.value ? H("", !0) : (a(), d("div", fs, [
1741
+ !Y.value.length && Vt.value && l.value.emptyState ? (a(), d("div", gs, [
1742
+ ee(Lr, {
1743
+ "icon-name": l.value.emptyState.iconName,
1744
+ title: l.value.emptyState.title,
1745
+ description: l.value.emptyState.description
1746
+ }, null, 8, ["icon-name", "title", "description"])
1747
+ ])) : Y.value.length ? H("", !0) : (a(), d("div", ps, " No data available "))
1748
+ ]))
1753
1749
  ], 34),
1754
- D.value && D.value.show !== !1 ? (a(), d("div", ms, [
1755
- g("div", vs, [
1756
- g("span", _s, [
1750
+ D.value && D.value.show !== !1 ? (a(), d("div", hs, [
1751
+ g("div", ms, [
1752
+ g("span", vs, [
1757
1753
  t[8] || (t[8] = se(" Showing ", -1)),
1758
- g("span", ys, P(Ue.value.from) + "–" + P(Ue.value.to), 1),
1754
+ g("span", _s, P(Ue.value.from) + "–" + P(Ue.value.to), 1),
1759
1755
  se(" of " + P(Ae.value), 1)
1760
1756
  ])
1761
1757
  ]),
1762
- g("div", bs, [
1763
- g("div", ks, [
1758
+ g("div", ys, [
1759
+ g("div", bs, [
1764
1760
  t[10] || (t[10] = g("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1765
1761
  g("select", {
1766
1762
  value: D.value.perPage || 20,
1767
- disabled: X.value,
1768
- onChange: Nt,
1763
+ disabled: U.value,
1764
+ onChange: Lt,
1769
1765
  class: "shifl-grid__pagination-select"
1770
1766
  }, [...t[9] || (t[9] = [
1771
1767
  fn('<option value="20">20</option><option value="30">30</option><option value="50">50</option><option value="75">75</option><option value="100">100</option>', 5)
1772
- ])], 40, Cs)
1768
+ ])], 40, ks)
1773
1769
  ]),
1774
- g("div", ws, [
1770
+ g("div", Cs, [
1775
1771
  g("button", {
1776
1772
  type: "button",
1777
1773
  class: "shifl-grid__pagination-button",
1778
1774
  disabled: Ke.value || f.loading,
1779
- onClick: Pt,
1775
+ onClick: $t,
1780
1776
  "aria-label": "Previous page"
1781
- }, " ‹ ", 8, Ms),
1782
- g("div", Ts, [
1783
- (a(!0), d(H, null, j(xt.value, (n) => (a(), d(H, { key: n }, [
1777
+ }, " ‹ ", 8, ws),
1778
+ g("div", Ms, [
1779
+ (a(!0), d(R, null, j(St.value, (n) => (a(), d(R, { key: n }, [
1784
1780
  n !== -1 ? (a(), d("button", {
1785
1781
  key: 0,
1786
1782
  type: "button",
1787
- class: I(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === Q.value }]),
1788
- disabled: X.value,
1789
- onClick: (o) => $t(n)
1790
- }, P(n), 11, Ss)) : (a(), d("span", xs, "…"))
1783
+ class: I(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === X.value }]),
1784
+ disabled: U.value,
1785
+ onClick: (o) => xt(n)
1786
+ }, P(n), 11, Ts)) : (a(), d("span", Ss, "…"))
1791
1787
  ], 64))), 128))
1792
1788
  ]),
1793
1789
  g("button", {
1794
1790
  type: "button",
1795
1791
  class: "shifl-grid__pagination-button",
1796
1792
  disabled: Je.value || f.loading,
1797
- onClick: Lt,
1793
+ onClick: Pt,
1798
1794
  "aria-label": "Next page"
1799
- }, " › ", 8, $s)
1795
+ }, " › ", 8, xs)
1800
1796
  ])
1801
1797
  ])
1802
- ])) : R("", !0),
1798
+ ])) : H("", !0),
1803
1799
  (a(), B(Ce, { to: "body" }, [
1804
1800
  V(z).rowIndex !== null && V(z).position ? (a(), d("div", {
1805
1801
  key: 0,
@@ -1814,7 +1810,7 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1814
1810
  onClick: t[2] || (t[2] = J(() => {
1815
1811
  }, ["stop"]))
1816
1812
  }, [
1817
- (a(!0), d(H, null, j(ln(Fe.value, Se.value), (n) => (a(), d("div", {
1813
+ (a(!0), d(R, null, j(ln(Fe.value, Se.value), (n) => (a(), d("div", {
1818
1814
  key: n.key,
1819
1815
  class: I(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": n.danger }]),
1820
1816
  onClick: () => un(n, Se.value, V(z).rowIndex)
@@ -1823,15 +1819,15 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1823
1819
  key: 0,
1824
1820
  innerHTML: n.icon,
1825
1821
  class: "w-4 h-4 inline-block"
1826
- }, null, 8, Ls)) : n.icon ? (a(), B(ue(typeof n.icon == "function" ? n.icon() : n.icon), {
1822
+ }, null, 8, Ps)) : n.icon ? (a(), B(ue(typeof n.icon == "function" ? n.icon() : n.icon), {
1827
1823
  key: 1,
1828
1824
  class: "w-4 h-4"
1829
- })) : R("", !0),
1825
+ })) : H("", !0),
1830
1826
  g("span", null, P(n.label), 1)
1831
- ], 10, Ps))), 128))
1832
- ], 4)) : R("", !0)
1827
+ ], 10, $s))), 128))
1828
+ ], 4)) : H("", !0)
1833
1829
  ])),
1834
- te(Fn, {
1830
+ ee(Fn, {
1835
1831
  content: We.value,
1836
1832
  visible: xe.value,
1837
1833
  "trigger-element": $e.value,
@@ -1849,8 +1845,8 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1849
1845
  })
1850
1846
  }, [
1851
1847
  t[11] || (t[11] = g("div", { class: "shifl-grid__copy-tooltip-arrow" }, null, -1)),
1852
- g("div", Ns, P(he.value), 1)
1853
- ], 4)) : R("", !0)
1848
+ g("div", Ls, P(he.value), 1)
1849
+ ], 4)) : H("", !0)
1854
1850
  ])),
1855
1851
  (a(), B(Ce, { to: "body" }, [
1856
1852
  O.value ? (a(), B(In, {
@@ -1864,16 +1860,16 @@ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
1864
1860
  onSelectAll: t[4] || (t[4] = (n) => V(v)(!0)),
1865
1861
  onDeselectAll: t[5] || (t[5] = (n) => V(v)(!1)),
1866
1862
  onRestoreDefault: V(L)
1867
- }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : R("", !0)
1863
+ }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : H("", !0)
1868
1864
  ]))
1869
1865
  ]));
1870
1866
  }
1871
- }), Hs = {
1867
+ }), As = {
1872
1868
  install(i) {
1873
- i.component("ShiflGrid", Es);
1869
+ i.component("ShiflGrid", Ns);
1874
1870
  }
1875
1871
  };
1876
- function Rs() {
1872
+ function Hs() {
1877
1873
  const i = b(/* @__PURE__ */ new Set());
1878
1874
  function r(f) {
1879
1875
  const h = f.id ?? JSON.stringify(f), l = new Set(i.value);
@@ -1884,12 +1880,12 @@ function Rs() {
1884
1880
  toggleRow: r
1885
1881
  };
1886
1882
  }
1887
- function Vs() {
1883
+ function Rs() {
1888
1884
  return {
1889
1885
  // placeholder
1890
1886
  };
1891
1887
  }
1892
- const kt = Symbol("shifl-grid-theme"), Ct = {
1888
+ const bt = Symbol("shifl-grid-theme"), kt = {
1893
1889
  surface: "var(--shifl-surface)",
1894
1890
  surfaceAlt: "var(--shifl-surface-alt)",
1895
1891
  border: "var(--shifl-border)",
@@ -1899,19 +1895,19 @@ const kt = Symbol("shifl-grid-theme"), Ct = {
1899
1895
  accentStrong: "var(--shifl-accent-strong)",
1900
1896
  focus: "var(--shifl-focus)"
1901
1897
  };
1902
- function zs(i) {
1903
- const r = b({ ...Ct, ...i });
1904
- return gn(kt, r), r;
1898
+ function Vs(i) {
1899
+ const r = b({ ...kt, ...i });
1900
+ return gn(bt, r), r;
1905
1901
  }
1906
- function Ds() {
1907
- const i = pn(kt);
1908
- return C(() => (i == null ? void 0 : i.value) ?? Ct);
1902
+ function zs() {
1903
+ const i = pn(bt);
1904
+ return C(() => (i == null ? void 0 : i.value) ?? kt);
1909
1905
  }
1910
1906
  const Oe = {
1911
1907
  sm: 640,
1912
1908
  lg: 1024
1913
1909
  };
1914
- function js() {
1910
+ function Ds() {
1915
1911
  const i = b(typeof window < "u" ? window.innerWidth : 0);
1916
1912
  function r() {
1917
1913
  i.value = window.innerWidth;
@@ -1926,34 +1922,34 @@ function js() {
1926
1922
  isTablet: C(() => i.value >= Oe.sm && i.value < Oe.lg)
1927
1923
  };
1928
1924
  }
1929
- function Bs() {
1925
+ function js() {
1930
1926
  return {
1931
1927
  // placeholder
1932
1928
  };
1933
1929
  }
1934
- function Is() {
1930
+ function Bs() {
1935
1931
  return {
1936
1932
  // placeholder
1937
1933
  };
1938
1934
  }
1939
- function Os() {
1935
+ function Is() {
1940
1936
  return {
1941
1937
  // placeholder
1942
1938
  };
1943
1939
  }
1944
1940
  export {
1945
- Es as ShiflGrid,
1946
- Hs as ShiflGridPlugin,
1947
- zs as provideGridTheme,
1948
- js as useBreakpoints,
1941
+ Ns as ShiflGrid,
1942
+ As as ShiflGridPlugin,
1943
+ Vs as provideGridTheme,
1944
+ Ds as useBreakpoints,
1949
1945
  mn as useGridColumns,
1950
1946
  kn as useGridData,
1951
- Vs as useGridEditing,
1947
+ Rs as useGridEditing,
1952
1948
  _n as useGridFilter,
1953
- Bs as useGridInfiniteScroll,
1954
- Rs as useGridSelection,
1949
+ js as useGridInfiniteScroll,
1950
+ Hs as useGridSelection,
1955
1951
  vn as useGridSort,
1956
- Ds as useGridTheme,
1957
- Os as useGridTour,
1958
- Is as useVirtualScroll
1952
+ zs as useGridTheme,
1953
+ Is as useGridTour,
1954
+ Bs as useVirtualScroll
1959
1955
  };