@fewangsit/wangsvue-fats 1.0.1-alpha.68 → 1.0.1-alpha.69

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.
Files changed (78) hide show
  1. package/animation/index.es.js +9 -8
  2. package/assetinfo/index.d.ts +5 -4
  3. package/assetinfo/index.es.js +113 -97
  4. package/backgroundimagecropper/index.es.js +14 -12
  5. package/button/index.es.js +58 -48
  6. package/buttonbulkaction/index.es.js +67 -59
  7. package/buttondownload/index.es.js +18 -18
  8. package/buttonradio/index.es.js +11 -11
  9. package/buttonscan/index.es.js +1 -1
  10. package/buttonsearch/index.es.js +14 -14
  11. package/buttonselectuser/index.es.js +29 -29
  12. package/checkbox/index.es.js +5 -5
  13. package/config/defaultProps.es.js +3 -4
  14. package/datatable/index.es.js +470 -465
  15. package/datepicker/index.es.js +17 -17
  16. package/daypicker/index.es.js +21 -21
  17. package/dialog/index.es.js +17 -15
  18. package/dialogbasictransferlog/index.es.js +89 -89
  19. package/dialogconfirm/index.es.js +33 -33
  20. package/dialogdamagelog/index.es.js +89 -89
  21. package/dialogform/index.es.js +16 -16
  22. package/dialogfulltransferlog/index.es.js +96 -96
  23. package/dialoglinkedasset/index.es.js +48 -48
  24. package/dialogprintqr/index.es.js +70 -70
  25. package/dialogreportdamage/index.es.js +57 -57
  26. package/dialogreportmissing/index.es.js +94 -86
  27. package/dialogselecttree/index.es.js +18 -16
  28. package/dialogselectuser/index.es.js +16 -16
  29. package/directives/index.d.ts +1 -0
  30. package/directives/index.es.js +1 -0
  31. package/directives/safeHtml.d.ts +16 -0
  32. package/directives/safeHtml.es.js +12 -0
  33. package/disposalreport/index.es.js +1 -1
  34. package/disposalreportbulkaction/index.es.js +40 -41
  35. package/disposalreportdialogselectasset/index.es.js +72 -72
  36. package/disposalreporttable/index.es.js +108 -108
  37. package/disposalreporttablefilter/index.es.js +16 -17
  38. package/dropdown/index.es.js +120 -117
  39. package/fieldwrapper/index.es.js +7 -7
  40. package/fileupload/index.es.js +35 -31
  41. package/hardwaresync/index.es.js +12 -12
  42. package/headercell/index.es.js +4 -4
  43. package/icon/index.es.js +26 -25
  44. package/imagecompressor/index.es.js +143 -143
  45. package/imageinputinfo/index.es.js +13 -13
  46. package/inlinemessage/index.es.js +12 -12
  47. package/inputbadge/index.es.js +42 -43
  48. package/inputnumber/index.es.js +7 -7
  49. package/inputpassword/index.es.js +9 -9
  50. package/inputrangenumber/index.es.js +16 -16
  51. package/inputsearch/index.es.js +18 -18
  52. package/inputtext/index.es.js +33 -33
  53. package/litedropdown/index.es.js +48 -40
  54. package/menuitem/index.es.js +27 -26
  55. package/multirow/index.es.js +16 -16
  56. package/multiselect/index.es.js +86 -83
  57. package/package.json +1 -1
  58. package/plugins/basei18n.d.ts +2 -2
  59. package/plugins/basei18n.es.js +48 -42
  60. package/stats.html +1 -1
  61. package/style.css +1 -1
  62. package/tabmenu/index.es.js +14 -9
  63. package/tagtype/index.es.js +33 -30
  64. package/textarea/index.es.js +3 -3
  65. package/toggledarkmode/store/index.d.ts +7 -0
  66. package/toggleswitch/index.es.js +3 -3
  67. package/treesearchinput/index.es.js +11 -11
  68. package/username/index.es.js +39 -39
  69. package/utils/baseToast.util.es.js +23 -22
  70. package/utils/index.es.js +1 -2
  71. package/utils/textFormatter.util.d.ts +32 -0
  72. package/utils/textFormatter.util.es.js +38 -10
  73. package/validatormessage/index.es.js +1 -1
  74. package/vendor/dompurify/dist/purify.es.es.js +553 -0
  75. package/wangsvue-fats.d.ts +2 -1
  76. package/wangsvue-fats.es.js +190 -186
  77. package/wangsvue-fats.esm.browser.js +17750 -17086
  78. package/wangsvue-fats.system.js +73 -72
@@ -1,38 +1,38 @@
1
- import { defineComponent as kt, mergeModels as $a, useModel as Ct, computed as P, inject as xa, ref as O, shallowRef as R, onMounted as Rt, onUnmounted as Dt, watch as Re, createElementBlock as p, openBlock as d, normalizeProps as ee, guardReactiveProps as ie, unref as r, createElementVNode as U, withDirectives as _t, createCommentVNode as m, createVNode as K, createBlock as N, mergeProps as f, withCtx as ue, Fragment as _, renderList as Q, renderSlot as St, withModifiers as T, normalizeClass as De, toDisplayString as I, resolveDynamicComponent as Pt, toHandlers as Kt, createTextVNode as _e, vShow as Et, nextTick as Ma } from "vue";
2
- import { s as Nt } from "../vendor/simplebar-vue/dist/simplebar-vue.esm.es.js";
1
+ import { defineComponent as Ct, mergeModels as Ma, useModel as Rt, computed as E, inject as La, ref as I, shallowRef as R, onMounted as Dt, onUnmounted as St, watch as De, createElementBlock as c, openBlock as d, normalizeProps as ae, guardReactiveProps as ue, unref as r, createElementVNode as x, withDirectives as Pt, createCommentVNode as m, createVNode as _, createBlock as T, mergeProps as f, withCtx as ce, Fragment as S, renderList as W, renderSlot as Kt, withModifiers as A, normalizeClass as Se, toDisplayString as z, resolveDynamicComponent as Et, toHandlers as _t, createTextVNode as Pe, vShow as Nt, nextTick as Oa } from "vue";
2
+ import { s as Tt } from "../vendor/simplebar-vue/dist/simplebar-vue.esm.es.js";
3
3
  import { e as w } from "../event-bus/index.es.js";
4
- import { u as Tt } from "../plugins/WangsVue.es.js";
5
- import { u as At } from "../utils/baseToast.util.es.js";
6
- import { f as Ft } from "../utils/date.util.es.js";
4
+ import { u as At } from "../plugins/WangsVue.es.js";
5
+ import { u as Ft } from "../utils/baseToast.util.es.js";
6
+ import { f as $t } from "../utils/date.util.es.js";
7
7
  import { n as Ht, e as Bt } from "../utils/exportToExcel.util.es.js";
8
- import { m as $t } from "../utils/mergePropsWithDefaults.util.es.js";
9
- import { s as ce, g as B } from "../utils/object.util.es.js";
10
- import { u as xt } from "../assetinfo/index.es.js";
11
- import { s as Mt } from "../vendor/primevue/paginator/paginator.esm.es.js";
12
- import { O as La } from "../vendor/primevue/utils/utils.esm.es.js";
13
- import { _ as Le } from "../checkbox/index.es.js";
14
- import { _ as Se } from "../animation/index.es.js";
15
- import { _ as Oe } from "../button/index.es.js";
16
- import { _ as Lt } from "../customcolumn/index.es.js";
17
- import { _ as Ot } from "../dialogconfirm/index.es.js";
18
- import { _ as ae } from "../icon/index.es.js";
19
- import { _ as Ut } from "../menu/index.es.js";
20
- import { _ as It } from "../toast/index.es.js";
21
- import { _ as zt } from "../toggleswitch/index.es.js";
22
- import { _ as Oa } from "../headercell/index.es.js";
23
- import { _ as jt } from "../multirow/index.es.js";
8
+ import { m as Mt } from "../utils/mergePropsWithDefaults.util.es.js";
9
+ import { s as pe, g as B } from "../utils/object.util.es.js";
10
+ import { u as Lt } from "../assetinfo/index.es.js";
11
+ import { s as Ot } from "../vendor/primevue/paginator/paginator.esm.es.js";
12
+ import { O as Ua } from "../vendor/primevue/utils/utils.esm.es.js";
13
+ import { _ as Ue } from "../checkbox/index.es.js";
14
+ import { _ as Ke } from "../animation/index.es.js";
15
+ import { _ as Ie } from "../button/index.es.js";
16
+ import { _ as Ut } from "../customcolumn/index.es.js";
17
+ import { _ as It } from "../dialogconfirm/index.es.js";
18
+ import { _ as te } from "../icon/index.es.js";
19
+ import { _ as xt } from "../menu/index.es.js";
20
+ import { _ as zt } from "../toast/index.es.js";
21
+ import { _ as jt } from "../toggleswitch/index.es.js";
22
+ import { _ as Ia } from "../headercell/index.es.js";
23
+ import { _ as Vt } from "../multirow/index.es.js";
24
24
  /* empty css */
25
- import { c as Vt } from "../vendor/lodash-es/cloneDeep.es.js";
26
- import { _ as Qt } from "../backgroundimagecropper/index.es.js";
27
- function Wt(W) {
28
- let $ = W.target;
29
- $.tagName === "UL" && ($ = $.parentElement);
30
- const { offsetHeight: t = 0 } = $, z = window.innerHeight * 90 / 100;
31
- t >= z && ($.style.transform = "translateY(5vh)");
25
+ import { c as Qt } from "../vendor/lodash-es/cloneDeep.es.js";
26
+ import { _ as Wt } from "../backgroundimagecropper/index.es.js";
27
+ function qt(q) {
28
+ let M = q.target;
29
+ M.tagName === "UL" && (M = M.parentElement);
30
+ const { offsetHeight: t = 0 } = M, j = window.innerHeight * 90 / 100;
31
+ t >= j && (M.style.transform = "translateY(5vh)");
32
32
  }
33
- const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"], Yt = ["rowspan"], Zt = ["rowspan"], Xt = ["id", "rowspan"], el = { key: 0 }, al = ["colspan"], tl = ["id", "draggable", "onClick", "onDblclick", "onDragenter", "onDragstart"], ll = ["onClick"], ol = ["colspan"], nl = ["colspan"], rl = ["colspan"], sl = ["colspan"], dl = ["colspan"], il = ["contenteditable", "onBlur", "onKeypress"], ul = { key: 1 }, cl = { key: 2 }, pl = ["colspan"], fl = /* @__PURE__ */ kt({
33
+ const Gt = (q, M) => q.every((t) => M.includes(t)), Jt = ["id"], Yt = ["rowspan"], Zt = ["rowspan"], Xt = ["rowspan"], el = ["id", "rowspan"], al = { key: 0 }, tl = ["colspan"], ll = ["id", "draggable", "onClick", "onDblclick", "onDragenter", "onDragstart"], ol = ["onClick"], nl = ["colspan"], rl = ["colspan"], sl = ["colspan"], dl = ["colspan"], il = ["colspan"], ul = ["contenteditable", "onBlur", "onKeypress"], cl = { key: 1 }, pl = { key: 2 }, fl = ["colspan"], vl = /* @__PURE__ */ Ct({
34
34
  __name: "DataTable",
35
- props: /* @__PURE__ */ $a({
35
+ props: /* @__PURE__ */ Ma({
36
36
  treeTable: { type: Boolean },
37
37
  childTableProps: {},
38
38
  tableName: { default: "datatable" },
@@ -74,18 +74,18 @@ const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"
74
74
  singleSelection: {},
75
75
  singleSelectionModifiers: {}
76
76
  }),
77
- emits: /* @__PURE__ */ $a(["toggleOption", "doubleClick", "selectData", "rowSelect", "page", "sort", "update:selectedData", "update:singleSelection", "cellEdited", "input", "rowReorder"], ["update:singleSelection"]),
78
- setup(W, { emit: $ }) {
79
- const t = W, z = $, Ue = Ct(W, "singleSelection"), { defaultProps: Ua, locale: pe } = Tt("DataTable"), te = P(() => $t(t, Ua)), i = xa("preset", {}).datatable, Ia = [10, 25, 50, 100], za = xa("useToastConfig"), Ie = At(za), { setLoading: ze } = xt(), Pe = `${window.location.pathname.replace("/", "").split("/").join("-")}-${t.tableName}`, y = O(t.data ?? []), fe = R(t.data ?? []), x = O({}), M = O(t.columns), ja = O(), Va = O(), S = R([]), q = R(), je = R(0), le = R(!1), ve = R(!1), Qa = R(0), Ve = R(0), be = R(0), Ke = R(!1), ge = R(), Ee = O(), Qe = O(), L = O([]), Ne = R({}), oe = R(), We = R(), A = R(), D = R(), G = R(1), j = R(10), H = R(0), ye = O({}), Wa = P(
80
- () => !!he.value.child.length
81
- ), J = P(
82
- () => Wa.value ? 2 : 1
83
- ), he = P(() => {
77
+ emits: /* @__PURE__ */ Ma(["toggleOption", "doubleClick", "selectData", "rowSelect", "page", "sort", "update:selectedData", "update:singleSelection", "cellEdited", "input", "rowReorder"], ["update:singleSelection"]),
78
+ setup(q, { emit: M }) {
79
+ const t = q, j = M, xe = Rt(q, "singleSelection"), { defaultProps: xa, locale: fe } = At("DataTable"), le = E(() => Mt(t, xa)), i = La("preset", {}).datatable, za = [10, 25, 50, 100], ja = La("useToastConfig"), ze = Ft(ja), { setLoading: je } = Lt(), Ee = `${window.location.pathname.replace("/", "").split("/").join("-")}-${t.tableName}`, g = I(t.data ?? []), ve = R(t.data ?? []), L = I({}), O = I(t.columns), Va = I(), Qa = I(), P = R([]), G = R(), Ve = R(0), oe = R(!1), be = R(!1), Wa = R(0), Qe = R(0), ge = R(0), _e = R(!1), ye = R(), Ne = I(), We = I(), U = I([]), Te = R({}), ne = R(), qe = R(), F = R(), D = R(), J = R(1), V = R(10), H = R(0), he = I({}), qa = E(
80
+ () => !!me.value.child.length
81
+ ), Y = E(
82
+ () => qa.value ? 2 : 1
83
+ ), me = E(() => {
84
84
  const e = {
85
85
  parent: [],
86
86
  child: []
87
87
  };
88
- for (const a of M.value)
88
+ for (const a of O.value)
89
89
  if (a.parentHeader) {
90
90
  e.child.push(a);
91
91
  const n = e.parent.find(
@@ -99,310 +99,310 @@ const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"
99
99
  } else
100
100
  e.parent.push(a);
101
101
  return e;
102
- }), qe = P(() => {
102
+ }), Ge = E(() => {
103
103
  var e, a;
104
104
  return (e = t.childTableProps) != null && e.columns ? (a = t.childTableProps) == null ? void 0 : a.columns.filter((n) => {
105
105
  var s;
106
106
  return !n.parentColumnsFields || ((s = n.parentColumnsFields) == null ? void 0 : s.some(
107
- (b) => M.value.some((c) => c.field === b)
107
+ (b) => O.value.some((p) => p.field === b)
108
108
  ));
109
- }) : M.value;
110
- }), Ge = P(() => M.value.length + (t.selectionType === "checkbox" ? 1 : 0) + (t.useOption ? 1 : 0) + (t.reorderable ? 1 : 0) + (t.treeTable ? 1 : 0)), Je = P(() => ({
109
+ }) : O.value;
110
+ }), Je = E(() => O.value.length + (t.selectionType === "checkbox" ? 1 : 0) + (t.useOption ? 1 : 0) + (t.reorderable ? 1 : 0) + (t.treeTable ? 1 : 0)), Ye = E(() => ({
111
111
  ...t.defaultQueryParams,
112
- search: t.lazy ? oe.value : t.search,
113
- tag: t.lazy ? We.value : void 0,
114
- page: t.usePaginator ? G.value : void 0,
115
- limit: t.usePaginator ? j.value : void 0,
112
+ search: t.lazy ? ne.value : t.search,
113
+ tag: t.lazy ? qe.value : void 0,
114
+ page: t.usePaginator ? J.value : void 0,
115
+ limit: t.usePaginator ? V.value : void 0,
116
116
  sortOrder: D.value,
117
- sortBy: A.value,
118
- ...t.lazy ? Ne.value : t.filters
117
+ sortBy: F.value,
118
+ ...t.lazy ? Te.value : t.filters
119
119
  // This will reset the previous filters.
120
- })), Ye = P(() => {
120
+ })), Ze = E(() => {
121
121
  var a;
122
- const e = (a = y.value) == null ? void 0 : a.filter(
122
+ const e = (a = g.value) == null ? void 0 : a.filter(
123
123
  (n) => {
124
124
  var s;
125
125
  return ((s = n.children) == null ? void 0 : s.length) || n.hasChildren;
126
126
  }
127
127
  );
128
- return (e == null ? void 0 : e.length) && e.every((n) => x.value[n[t.dataKey]] > 0);
129
- }), Ze = P(() => {
130
- var c, g, u, k, h;
131
- if (t.disableAllRows || !((c = Z()) != null && c.length) || t.selectionType !== "checkbox" || ((g = ne.value) == null ? void 0 : g.length) === y.value.length)
128
+ return (e == null ? void 0 : e.length) && e.every((n) => L.value[n[t.dataKey]] > 0);
129
+ }), Xe = E(() => {
130
+ var p, v, u, k, h;
131
+ if (t.disableAllRows || !((p = X()) != null && p.length) || t.selectionType !== "checkbox" || ((v = re.value) == null ? void 0 : v.length) === g.value.length)
132
132
  return !1;
133
- const e = (u = S.value) == null ? void 0 : u.length, a = ((k = xe(Z())) == null ? void 0 : k.map((l) => l[t.dataKey])) ?? [], n = ((h = S.value) == null ? void 0 : h.map((l) => l[t.dataKey])) ?? [], s = n.length ? qt(a, n) : !1, b = e > 0 && e === (H.value ?? 0) - (ne.value.length ?? 0);
133
+ const e = (u = P.value) == null ? void 0 : u.length, a = ((k = Le(X())) == null ? void 0 : k.map((K) => K[t.dataKey])) ?? [], n = ((h = P.value) == null ? void 0 : h.map((K) => K[t.dataKey])) ?? [], s = n.length ? Gt(a, n) : !1, b = e > 0 && e === (H.value ?? 0) - (re.value.length ?? 0);
134
134
  return s || b;
135
- }), ne = P(
136
- () => la(t.data ?? Z() ?? [])
137
- ), Te = P(
138
- () => le.value || t.loading
139
- ), Ae = P(
135
+ }), re = E(
136
+ () => oa(t.data ?? X() ?? [])
137
+ ), Ae = E(
138
+ () => oe.value || t.loading
139
+ ), Fe = E(
140
140
  () => {
141
141
  var e;
142
142
  return t.useOption || ((e = t.childTableProps) == null ? void 0 : e.useOption) || t.customColumn;
143
143
  }
144
- ), qa = P(
144
+ ), Ga = E(
145
145
  () => {
146
146
  var e;
147
- return !Te.value && !((e = y.value) != null && e.length);
147
+ return !Ae.value && !((e = g.value) != null && e.length);
148
148
  }
149
- ), Ga = P(
150
- () => t.lazy && t.fetchFunction || !t.usePaginator ? y.value : y.value.slice(
151
- (G.value - 1) * j.value,
152
- G.value * j.value
149
+ ), Ja = E(
150
+ () => t.lazy && t.fetchFunction || !t.usePaginator ? g.value : g.value.slice(
151
+ (J.value - 1) * V.value,
152
+ J.value * V.value
153
153
  )
154
- ), Fe = (e) => Object.keys(x.value).includes(e), Y = (e) => ne.value.includes(e), me = (e) => t.selectionType === "checkbox" ? !!S.value.find((a) => a[t.dataKey] === e) : Ja(e), Ja = (e) => {
154
+ ), $e = (e) => Object.keys(L.value).includes(e), Z = (e) => re.value.includes(e), we = (e) => t.selectionType === "checkbox" ? !!P.value.find((a) => a[t.dataKey] === e) : Ya(e), Ya = (e) => {
155
155
  var a;
156
- return e !== void 0 && ((a = Ue.value) == null ? void 0 : a[t.dataKey]) === e;
157
- }, Z = (e) => (y.value ?? []).filter(
156
+ return e !== void 0 && ((a = xe.value) == null ? void 0 : a[t.dataKey]) === e;
157
+ }, X = (e) => (g.value ?? []).filter(
158
158
  (a) => !a.childRowHeader && !a.childRow
159
- ), we = async (e, a, n) => {
160
- var b, c;
161
- if (Fe(e[t.dataKey]) === n) return;
162
- const s = n ?? !Fe(e[t.dataKey]);
163
- if (!ve.value)
159
+ ), ke = async (e, a, n) => {
160
+ var b, p;
161
+ if ($e(e[t.dataKey]) === n) return;
162
+ const s = n ?? !$e(e[t.dataKey]);
163
+ if (!be.value)
164
164
  if (!s)
165
- y.value.splice(
165
+ g.value.splice(
166
166
  a + 1,
167
- x.value[e[t.dataKey]]
168
- ), delete x.value[e[t.dataKey]];
167
+ L.value[e[t.dataKey]]
168
+ ), delete L.value[e[t.dataKey]];
169
169
  else {
170
- x.value[e[t.dataKey]] = 1;
171
- let { children: g } = e;
170
+ L.value[e[t.dataKey]] = 1;
171
+ let { children: v } = e;
172
172
  if ((b = t.childTableProps) != null && b.fetchFunction && e.hasChildren)
173
173
  try {
174
- y.value.splice(a + 1, 0, {
174
+ g.value.splice(a + 1, 0, {
175
175
  childRow: !0,
176
176
  loadingRow: !0
177
- }), ve.value = !0;
178
- const u = await ((c = t.childTableProps) == null ? void 0 : c.fetchFunction(e));
179
- g = u == null ? void 0 : u.data;
177
+ }), be.value = !0;
178
+ const u = await ((p = t.childTableProps) == null ? void 0 : p.fetchFunction(e));
179
+ v = u == null ? void 0 : u.data;
180
180
  } catch (u) {
181
181
  console.error("🚀 ~ toggleRowExpand ~ error:", u);
182
182
  } finally {
183
- y.value.splice(a + 1, 1), ve.value = !1;
183
+ g.value.splice(a + 1, 1), be.value = !1;
184
184
  }
185
- if (a >= 0 && (g != null && g.length)) {
186
- const u = g.flatMap((k) => [
185
+ if (a >= 0 && (v != null && v.length)) {
186
+ const u = v.flatMap((k) => [
187
187
  {
188
188
  childRowHeader: !0,
189
189
  header: k.groupHeader
190
190
  },
191
- ...(k.groupItems ?? []).map((l) => ({ childRow: !0, ...l }))
191
+ ...(k.groupItems ?? []).map((K) => ({ childRow: !0, ...K }))
192
192
  ]);
193
- x.value[e[t.dataKey]] = u.length, y.value.splice(a + 1, 0, ...u);
193
+ L.value[e[t.dataKey]] = u.length, g.value.splice(a + 1, 0, ...u);
194
194
  } else
195
- y.value.splice(a + 1, 0, {
195
+ g.value.splice(a + 1, 0, {
196
196
  childRow: !0,
197
197
  noDataRow: !0
198
198
  });
199
199
  }
200
- }, Ya = (e) => {
201
- t.includeCheckDisabledRows ? S.value = e ? Z() : Z().filter((a) => Y(a[t.dataKey])) : S.value = e ? xe(Z()) : [];
202
- }, Za = (e, a, n) => {
203
- if (!a.childRow && !a.childRowHeader && !Y(a[t.dataKey]) && t.selectionType !== "none") {
204
- const s = me(a[t.dataKey]);
205
- z("rowSelect", { originalEvent: e, data: a, index: n }), t.selectionType === "checkbox" ? s ? S.value = S.value.filter(
200
+ }, Za = (e) => {
201
+ t.includeCheckDisabledRows ? P.value = e ? X() : X().filter((a) => Z(a[t.dataKey])) : P.value = e ? Le(X()) : [];
202
+ }, Xa = (e, a, n) => {
203
+ if (!a.childRow && !a.childRowHeader && !Z(a[t.dataKey]) && t.selectionType !== "none") {
204
+ const s = we(a[t.dataKey]);
205
+ j("rowSelect", { originalEvent: e, data: a, index: n }), t.selectionType === "checkbox" ? s ? P.value = P.value.filter(
206
206
  (b) => b[t.dataKey] != a[t.dataKey]
207
- ) : S.value = [...S.value, a] : Ue.value = s ? void 0 : a;
207
+ ) : P.value = [...P.value, a] : xe.value = s ? void 0 : a;
208
208
  }
209
- }, Xa = async () => {
209
+ }, et = async () => {
210
210
  var a;
211
- const e = !Ye.value;
212
- if (!ve.value) {
211
+ const e = !Ze.value;
212
+ if (!be.value) {
213
213
  let n = 0;
214
- for (const s of y.value)
215
- ((a = s.children) != null && a.length || s.hasChildren) && await we(s, n, e), n++;
214
+ for (const s of g.value)
215
+ ((a = s.children) != null && a.length || s.hasChildren) && await ke(s, n, e), n++;
216
216
  }
217
- }, et = async (e, a) => {
217
+ }, at = async (e, a) => {
218
218
  const n = e.target, s = n.tagName.toLowerCase() === "button" ? n : n.parentElement;
219
- z("toggleOption", a);
219
+ j("toggleOption", a);
220
220
  const b = {
221
221
  ...e,
222
222
  currentTarget: e.currentTarget ?? e.target
223
223
  };
224
- Be(), await Ma(() => {
225
- var c;
226
- s != null && s.classList.contains("option-button-active") ? Be() : ((c = Qe.value) == null || c.toggle(b), Be(), s == null || s.classList.add("option-button-active"));
224
+ Be(), await Oa(() => {
225
+ var p;
226
+ s != null && s.classList.contains("option-button-active") ? Be() : ((p = We.value) == null || p.toggle(b), Be(), s == null || s.classList.add("option-button-active"));
227
227
  });
228
- }, at = (e, a, n) => ({
229
- [(typeof e.bodySelectedClass == "function" ? e.bodySelectedClass(a) : e.bodySelectedClass) ?? ""]: me(a[n])
230
- }), Xe = async (e, a, n) => {
231
- var b, c, g, u;
228
+ }, tt = (e, a, n) => ({
229
+ [(typeof e.bodySelectedClass == "function" ? e.bodySelectedClass(a) : e.bodySelectedClass) ?? ""]: we(a[n])
230
+ }), ea = async (e, a, n) => {
231
+ var b, p, v, u;
232
232
  if (!n.preset) return;
233
- const s = () => ce(
233
+ const s = () => pe(
234
234
  a,
235
235
  n.field,
236
236
  !B(a, n.field)
237
237
  );
238
- if (n.preset.type === "checkbox" ? (c = (b = n.preset).onCheck) == null || c.call(b, e, a, s) : n.preset.type === "toggle" && ((u = (g = n.preset).onToggle) == null || u.call(g, e, a, s)), "confirmDialogProps" in n.preset) {
239
- const { showWhen: k } = Me(
238
+ if (n.preset.type === "checkbox" ? (p = (b = n.preset).onCheck) == null || p.call(b, e, a, s) : n.preset.type === "toggle" && ((u = (v = n.preset).onToggle) == null || u.call(v, e, a, s)), "confirmDialogProps" in n.preset) {
239
+ const { showWhen: k } = Oe(
240
240
  n.preset,
241
241
  a[n.field],
242
242
  a
243
243
  ) ?? {};
244
- typeof k == "function" ? ye.value[a[t.dataKey] + n.field] = await k(
244
+ typeof k == "function" ? he.value[a[t.dataKey] + n.field] = await k(
245
245
  a,
246
246
  e
247
- ) : ye.value[a[t.dataKey] + n.field] = !k || k === "active" && e || k === "inactive" && !e;
247
+ ) : he.value[a[t.dataKey] + n.field] = !k || k === "active" && e || k === "inactive" && !e;
248
248
  }
249
- }, He = (e) => e.draggable !== !1 && !e.childRow && !e.childRowHeader && t.reorderable && !D.value, tt = (e, a, n) => {
249
+ }, He = (e) => e.draggable !== !1 && !e.childRow && !e.childRowHeader && t.reorderable && !D.value, lt = (e, a, n) => {
250
250
  if (a.childRow || a.childRowHeader) return;
251
- x.value = {};
251
+ L.value = {};
252
252
  const { dataTransfer: s } = e;
253
- ge.value = a, q.value = { item: a, fromIndex: n }, s && (s.dropEffect = "move", s.effectAllowed = "move", s.setData("id", a._id), s.setData("index", n.toString()));
254
- }, lt = (e, a) => {
255
- var n, s, b, c;
253
+ ye.value = a, G.value = { item: a, fromIndex: n }, s && (s.dropEffect = "move", s.effectAllowed = "move", s.setData("id", a._id), s.setData("index", n.toString()));
254
+ }, ot = (e, a) => {
255
+ var n, s, b, p;
256
256
  if (e.preventDefault(), He(a)) {
257
- const g = e.target, u = g.tagName === "TR" ? g : g.closest("tr");
258
- if (u == null || u.classList.add("bg-primary-50"), u == null || u.classList.add("dark:bg-grayscale-800"), (n = u == null ? void 0 : u.nextElementSibling) == null || n.classList.remove("bg-primary-50"), (s = u == null ? void 0 : u.nextElementSibling) == null || s.classList.remove("dark:bg-grayscale-800"), (b = u == null ? void 0 : u.previousElementSibling) == null || b.classList.remove("bg-primary-50"), (c = u == null ? void 0 : u.previousElementSibling) == null || c.classList.remove(
257
+ const v = e.target, u = v.tagName === "TR" ? v : v.closest("tr");
258
+ if (u == null || u.classList.add("bg-primary-50"), u == null || u.classList.add("dark:bg-grayscale-800"), (n = u == null ? void 0 : u.nextElementSibling) == null || n.classList.remove("bg-primary-50"), (s = u == null ? void 0 : u.nextElementSibling) == null || s.classList.remove("dark:bg-grayscale-800"), (b = u == null ? void 0 : u.previousElementSibling) == null || b.classList.remove("bg-primary-50"), (p = u == null ? void 0 : u.previousElementSibling) == null || p.classList.remove(
259
259
  "dark:bg-grayscale-800"
260
- ), !u || !ge.value) return;
261
- const k = L.value.findIndex(
262
- (l) => {
263
- var v;
264
- return l._id === ((v = ge.value) == null ? void 0 : v._id);
260
+ ), !u || !ye.value) return;
261
+ const k = U.value.findIndex(
262
+ (K) => {
263
+ var l;
264
+ return K._id === ((l = ye.value) == null ? void 0 : l._id);
265
265
  }
266
- ), h = L.value.findIndex(
267
- (l) => l._id === u.id
266
+ ), h = U.value.findIndex(
267
+ (K) => K._id === u.id
268
268
  );
269
- k !== -1 && h !== -1 && (q.value && (q.value.toIndex = h), [
270
- L.value[k],
271
- L.value[h]
269
+ k !== -1 && h !== -1 && (G.value && (G.value.toIndex = h), [
270
+ U.value[k],
271
+ U.value[h]
272
272
  ] = [
273
- L.value[h],
274
- L.value[k]
275
- ], nt());
273
+ U.value[h],
274
+ U.value[k]
275
+ ], rt());
276
276
  }
277
- }, ot = () => {
278
- q.value && z("rowReorder", q.value), ge.value = void 0, Ke.value = !1, q.value = void 0;
279
277
  }, nt = () => {
280
- y.value = [...L.value];
278
+ G.value && j("rowReorder", G.value), ye.value = void 0, _e.value = !1, G.value = void 0;
279
+ }, rt = () => {
280
+ g.value = [...U.value];
281
281
  }, Be = () => {
282
282
  const e = document.querySelectorAll(".option-button-active");
283
283
  e == null || e.forEach((a) => {
284
284
  a.classList.remove("option-button-active");
285
285
  });
286
- }, rt = () => {
287
- A.value = void 0, D.value = void 0;
288
286
  }, st = () => {
289
- G.value = 1, be.value++;
287
+ F.value = void 0, D.value = void 0;
290
288
  }, dt = () => {
291
- j.value = t.rows ?? 10, G.value = 1, be.value++;
289
+ J.value = 1, ge.value++;
292
290
  }, it = () => {
293
- dt(), rt();
294
- }, $e = async () => {
295
- Ve.value++, be.value++, it(), t.lazy ? await re() : ut();
291
+ V.value = t.rows ?? 10, J.value = 1, ge.value++;
296
292
  }, ut = () => {
297
- let e = [...fe.value ?? []];
298
- const a = Ne.value, n = Object.entries(a);
293
+ it(), st();
294
+ }, Me = async () => {
295
+ Qe.value++, ge.value++, ut(), t.lazy ? await se() : ct();
296
+ }, ct = () => {
297
+ let e = [...ve.value ?? []];
298
+ const a = Te.value, n = Object.entries(a);
299
299
  try {
300
300
  e = n.length ? e.filter((s) => n.every(
301
- ([b, { value: c, matchMode: g }]) => {
301
+ ([b, { value: p, matchMode: v }]) => {
302
302
  const u = B(s, b);
303
- switch (g) {
303
+ switch (v) {
304
304
  case "IN":
305
- return Array.isArray(c) ? c.includes(u) : !1;
305
+ return Array.isArray(p) ? p.includes(u) : !1;
306
306
  case "CONTAINS":
307
- return u && c ? u.toString().toLowerCase().includes(c) : !1;
307
+ return u && p ? u.toString().toLowerCase().includes(p) : !1;
308
308
  case "EQUALS":
309
- return u ? u.toString() === c.toString() : !1;
309
+ return u ? u.toString() === p.toString() : !1;
310
310
  case "BETWEEN":
311
- return Array.isArray(c) && c.length === 2 ? !isNaN(u) && (c[0] == null || u >= c[0]) && (c[1] == null || u <= c[1]) : !1;
311
+ return Array.isArray(p) && p.length === 2 ? !isNaN(u) && (p[0] == null || u >= p[0]) && (p[1] == null || u <= p[1]) : !1;
312
312
  case "DATE_BETWEEN":
313
- return Array.isArray(c) ? +new Date(u) >= c[0] && +new Date(u) <= c[1] : !1;
313
+ return Array.isArray(p) ? +new Date(u) >= p[0] && +new Date(u) <= p[1] : !1;
314
314
  default:
315
315
  return !1;
316
316
  }
317
317
  }
318
- )) : fe.value;
318
+ )) : ve.value;
319
319
  } catch (s) {
320
320
  console.error("🚀 ~ applyStaticFilter ~ error:", s);
321
321
  }
322
- ct(e);
323
- }, ct = (e) => {
322
+ pt(e);
323
+ }, pt = (e) => {
324
324
  var a;
325
325
  try {
326
- y.value = (a = oe.value) != null && a.length ? e.filter((n) => {
326
+ g.value = (a = ne.value) != null && a.length ? e.filter((n) => {
327
327
  const s = JSON.stringify(n);
328
- return new RegExp(oe.value, "i").test(s) || oe.value.split(/\s+/).filter(Boolean).every((b) => new RegExp(b, "i").test(s));
328
+ return new RegExp(ne.value, "i").test(s) || ne.value.split(/\s+/).filter(Boolean).every((b) => new RegExp(b, "i").test(s));
329
329
  }) : e;
330
330
  } catch (n) {
331
331
  console.error("🚀 ~ applyStaticSearch ~ error:", n);
332
332
  }
333
- }, pt = async (e) => {
334
- j.value = e.rows, G.value = e.page + 1, t.lazy && t.fetchFunction && await re(), Object.keys(x.value).forEach((a) => {
335
- const n = y.value.findIndex(
333
+ }, ft = async (e) => {
334
+ V.value = e.rows, J.value = e.page + 1, t.lazy && t.fetchFunction && await se(), Object.keys(L.value).forEach((a) => {
335
+ const n = g.value.findIndex(
336
336
  (s) => s[t.dataKey] == a
337
337
  );
338
- n >= 0 && we(y.value[n], n, !0);
338
+ n >= 0 && ke(g.value[n], n, !0);
339
339
  });
340
- }, ea = (e, a) => {
341
- e !== A.value && (D.value = void 0), A.value = e, D.value ? D.value == -1 ? (D.value = void 0, A.value = void 0) : D.value = -1 : D.value = 1, z("sort", {
340
+ }, aa = (e, a) => {
341
+ e !== F.value && (D.value = void 0), F.value = e, D.value ? D.value == -1 ? (D.value = void 0, F.value = void 0) : D.value = -1 : D.value = 1, j("sort", {
342
342
  sortOrder: D.value,
343
- sortField: A.value,
343
+ sortField: F.value,
344
344
  originalEvent: a,
345
- rows: j.value
346
- }), st(), t.lazy && t.fetchFunction ? re() : ft();
347
- }, ft = () => {
348
- const e = [...y.value ?? []], a = /* @__PURE__ */ new Map();
345
+ rows: V.value
346
+ }), dt(), t.lazy && t.fetchFunction ? se() : vt();
347
+ }, vt = () => {
348
+ const e = [...g.value ?? []], a = /* @__PURE__ */ new Map();
349
349
  if (!D.value) {
350
- y.value = fe.value ?? [];
350
+ g.value = ve.value ?? [];
351
351
  return;
352
352
  }
353
353
  for (const s of e)
354
354
  a.set(
355
355
  s,
356
- La.resolveFieldData(s, A.value)
356
+ Ua.resolveFieldData(s, F.value)
357
357
  );
358
358
  const n = new Intl.Collator(void 0, { numeric: !0 }).compare;
359
359
  e.sort((s, b) => {
360
- const c = a.get(s), g = a.get(b);
361
- return La.sort(c, g, D.value, n, -1);
362
- }), y.value = e;
363
- }, re = async () => {
360
+ const p = a.get(s), v = a.get(b);
361
+ return Ua.sort(p, v, D.value, n, -1);
362
+ }), g.value = e;
363
+ }, se = async () => {
364
364
  var e;
365
365
  try {
366
- le.value = !0;
367
- const a = await ((e = t.fetchFunction) == null ? void 0 : e.call(t, Je.value)), { data: n = [], totalRecords: s = 0 } = (a == null ? void 0 : a.data) ?? {};
368
- y.value = n, L.value = [...y.value], H.value = s;
366
+ oe.value = !0;
367
+ const a = await ((e = t.fetchFunction) == null ? void 0 : e.call(t, Ye.value)), { data: n = [], totalRecords: s = 0 } = (a == null ? void 0 : a.data) ?? {};
368
+ g.value = n, U.value = [...g.value], H.value = s;
369
369
  } catch (a) {
370
370
  console.error("🚀 ~ reFetch ~ error:", a);
371
371
  } finally {
372
- le.value = !1, x.value = {};
372
+ oe.value = !1, L.value = {};
373
373
  }
374
- }, aa = async () => {
374
+ }, ta = async () => {
375
375
  var n;
376
- const e = Vt(Je.value);
376
+ const e = Qt(Ye.value);
377
377
  delete e.page, delete e.limit;
378
378
  const a = await ((n = t.fetchFunction) == null ? void 0 : n.call(t, e));
379
379
  if (a instanceof Error) throw a;
380
380
  return (a == null ? void 0 : a.data) ?? { data: [], totalRecords: 0 };
381
- }, vt = async (e) => {
381
+ }, bt = async (e) => {
382
382
  if (t.tableName === e.tableName)
383
383
  try {
384
- le.value = !0;
385
- const { data: a, totalRecords: n = 0 } = t.lazy ? await aa() : { totalRecords: (t.data ?? []).length, data: t.data }, s = la(a);
386
- S.value = t.includeCheckDisabledRows ? a ?? [] : xe(a, s), H.value = n;
384
+ oe.value = !0;
385
+ const { data: a, totalRecords: n = 0 } = t.lazy ? await ta() : { totalRecords: (t.data ?? []).length, data: t.data }, s = oa(a);
386
+ P.value = t.includeCheckDisabledRows ? a ?? [] : Le(a, s), H.value = n;
387
387
  } finally {
388
- le.value = !1;
388
+ oe.value = !1;
389
389
  }
390
- }, X = (e, a) => i == null ? void 0 : i.headercell({
390
+ }, ee = (e, a) => i == null ? void 0 : i.headercell({
391
391
  props: t,
392
392
  context: {
393
393
  sortOrder: D.value,
394
394
  customColumn: a,
395
- sorted: A.value && A.value === (e == null ? void 0 : e.field),
395
+ sorted: F.value && F.value === (e == null ? void 0 : e.field),
396
396
  sortable: e == null ? void 0 : e.sortable,
397
397
  isParentHeader: (e == null ? void 0 : e.rowspan) === 1
398
398
  }
399
- }), ta = (e) => {
400
- (!e.tableName || e.tableName === t.tableName) && Ma(() => {
401
- Qa.value++, re();
399
+ }), la = (e) => {
400
+ (!e.tableName || e.tableName === t.tableName) && Oa(() => {
401
+ Wa.value++, se();
402
402
  });
403
- }, xe = (e, a) => (e ?? []).filter(
404
- (n) => !(a ?? ne.value).includes(n[t.dataKey])
405
- ), la = (e = []) => t.disableAllRows ? e.map((a) => a[t.dataKey]) : e.filter((a) => a[t.disableKey]).map((a) => a[t.dataKey]), bt = async ({
403
+ }, Le = (e, a) => (e ?? []).filter(
404
+ (n) => !(a ?? re.value).includes(n[t.dataKey])
405
+ ), oa = (e = []) => t.disableAllRows ? e.map((a) => a[t.dataKey]) : e.filter((a) => a[t.disableKey]).map((a) => a[t.dataKey]), gt = async ({
406
406
  tableName: e,
407
407
  multiTableNames: a,
408
408
  fileName: n,
@@ -411,20 +411,20 @@ const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"
411
411
  var k;
412
412
  if (e !== t.tableName && !(a != null && a.includes(t.tableName)))
413
413
  return;
414
- const c = M.value.filter(
414
+ const p = O.value.filter(
415
415
  (h) => h.visible !== !1
416
- ).filter((h) => !h.excluded), g = c.map(
416
+ ).filter((h) => !h.excluded), v = p.map(
417
417
  (h) => h.header ?? h.exportHeader ?? "-"
418
418
  ), u = () => n.trim().replace(/[^a-zA-Z0-9\s]/g, "-").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/-+$/, "");
419
419
  try {
420
- if (w.off("data-table:download", ke), e === t.tableName) {
421
- ze(!0, pe.downloadingMessage);
422
- const { data: h } = t.fetchFunction ? await aa() : { data: t.data }, l = Ht(h, c, pe);
420
+ if (w.off("data-table:download", Ce), e === t.tableName) {
421
+ je(!0, fe.downloadingMessage);
422
+ const { data: h } = t.fetchFunction ? await ta() : { data: t.data }, K = Ht(h, p, fe);
423
423
  if (a != null && a.length) {
424
424
  w.emit("button-download:multi-tables", {
425
425
  table: {
426
- headers: g,
427
- data: l,
426
+ headers: v,
427
+ data: K,
428
428
  tableName: e,
429
429
  tableTitle: t.tableTitle
430
430
  }
@@ -433,283 +433,283 @@ const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"
433
433
  }
434
434
  await Bt({
435
435
  tables: [
436
- { headers: g, data: l, tableName: e, tableTitle: t.tableTitle }
436
+ { headers: v, data: K, tableName: e, tableTitle: t.tableTitle }
437
437
  ],
438
438
  fileName: u(),
439
439
  additionalTexts: s
440
440
  });
441
441
  }
442
442
  } catch (h) {
443
- console.error("🚀 ~ downloadExcel error:", h), Ie.removeAllGroups(), Ie.add({
444
- message: ((k = te.value.excelToastErrorMessage) == null ? void 0 : k.replace("{fileName}", n)) ?? "Data gagal diunduh.",
443
+ console.error("🚀 ~ downloadExcel error:", h), ze.removeAllGroups(), ze.add({
444
+ message: ((k = le.value.excelToastErrorMessage) == null ? void 0 : k.replace("{fileName}", n)) ?? "Data gagal diunduh.",
445
445
  error: h,
446
446
  group: "download"
447
447
  });
448
448
  } finally {
449
- ze(!1), w.on("data-table:download", ke);
449
+ je(!1), w.on("data-table:download", Ce);
450
450
  }
451
451
  };
452
- Rt(async () => {
452
+ Dt(async () => {
453
453
  var e;
454
- t.fetchFunction && (await re(), wt()), (e = t.selectedData) != null && e.length && (S.value = t.selectedData), gt();
455
- }), Dt(() => {
456
- yt();
457
- }), Re(
454
+ t.fetchFunction && (await se(), kt()), (e = t.selectedData) != null && e.length && (P.value = t.selectedData), yt();
455
+ }), St(() => {
456
+ ht();
457
+ }), De(
458
458
  () => t.columns,
459
459
  () => {
460
- t.customColumn || (M.value = t.columns), je.value++;
460
+ t.customColumn || (O.value = t.columns), Ve.value++;
461
461
  }
462
- ), Re(
462
+ ), De(
463
463
  () => t.data,
464
464
  (e) => {
465
- y.value = e ?? [], fe.value = e ?? [], w.emit("data-table:updated", { tableName: t.tableName, data: e }), H.value = e == null ? void 0 : e.length;
465
+ g.value = e ?? [], ve.value = e ?? [], w.emit("data-table:updated", { tableName: t.tableName, data: e }), H.value = e == null ? void 0 : e.length;
466
466
  },
467
467
  {
468
468
  immediate: !0
469
469
  }
470
- ), Re(H, (e) => {
471
- mt(e);
472
- }), Re(
473
- S,
470
+ ), De(H, (e) => {
471
+ wt(e);
472
+ }), De(
473
+ P,
474
474
  (e) => {
475
- z("selectData", e), z("update:selectedData", e), w.emit("data-table:update-selected-data", {
475
+ j("selectData", e), j("update:selectedData", e), w.emit("data-table:update-selected-data", {
476
476
  tableName: t.tableName,
477
477
  data: e
478
478
  });
479
479
  },
480
480
  { deep: !0 }
481
481
  );
482
- const gt = () => {
483
- w.on("data-table:apply-filter", oa), w.on("search-table", na), w.on("search-by-scan-table", ra), w.on("data-table:clear-selected-data", da), w.on("data-table:select-all-record", sa), w.on("data-table:download", ke), w.on("data-table:import-excel-to-json", ia);
484
- }, yt = () => {
485
- w.off("data-table:update", ta), w.off("data-table:apply-filter", oa), w.off("search-table", na), w.off("search-by-scan-table", ra), w.off("data-table:clear-selected-data", da), w.off("data-table:select-all-record", sa), w.off("data-table:download", ke), w.off("data-table:import-excel-to-json", ia);
486
- }, oa = (e) => {
487
- e.tableName === t.tableName && (Ne.value = e.filter, $e());
482
+ const yt = () => {
483
+ w.on("data-table:apply-filter", na), w.on("search-table", ra), w.on("search-by-scan-table", sa), w.on("data-table:clear-selected-data", ia), w.on("data-table:select-all-record", da), w.on("data-table:download", Ce), w.on("data-table:import-excel-to-json", ua);
484
+ }, ht = () => {
485
+ w.off("data-table:update", la), w.off("data-table:apply-filter", na), w.off("search-table", ra), w.off("search-by-scan-table", sa), w.off("data-table:clear-selected-data", ia), w.off("data-table:select-all-record", da), w.off("data-table:download", Ce), w.off("data-table:import-excel-to-json", ua);
488
486
  }, na = (e) => {
489
- e.tableName === t.tableName && (oe.value = e.search, $e());
487
+ e.tableName === t.tableName && (Te.value = e.filter, Me());
490
488
  }, ra = (e) => {
491
- e.tableName === t.tableName && (We.value = e.tag, $e());
489
+ e.tableName === t.tableName && (ne.value = e.search, Me());
492
490
  }, sa = (e) => {
493
- e.tableName === t.tableName && vt(e);
491
+ e.tableName === t.tableName && (qe.value = e.tag, Me());
494
492
  }, da = (e) => {
495
- e.tableName === t.tableName && (S.value = []);
496
- }, ke = (e) => {
493
+ e.tableName === t.tableName && bt(e);
494
+ }, ia = (e) => {
495
+ e.tableName === t.tableName && (P.value = []);
496
+ }, Ce = (e) => {
497
497
  var a;
498
- (e.tableName === t.tableName || (a = e.multiTableNames) != null && a.includes(t.tableName)) && bt(e);
499
- }, ht = (e) => {
500
- e.code.includes("Digit") || e.code.includes("Numpad") || ["ArrowLeft", "ArrowRight", "Backspace", "Delete"].includes(e.code) || e.preventDefault();
498
+ (e.tableName === t.tableName || (a = e.multiTableNames) != null && a.includes(t.tableName)) && gt(e);
501
499
  }, mt = (e) => {
502
- const a = t.includeCheckDisabledRows ? 0 : (ne.value.length || t.totalDisabledRows) ?? 0, n = {
500
+ e.code.includes("Digit") || e.code.includes("Numpad") || ["ArrowLeft", "ArrowRight", "Backspace", "Delete"].includes(e.code) || e.preventDefault();
501
+ }, wt = (e) => {
502
+ const a = t.includeCheckDisabledRows ? 0 : (re.value.length || t.totalDisabledRows) ?? 0, n = {
503
503
  total: (e ?? H.value ?? 0) - a,
504
504
  tableName: t.tableName
505
505
  };
506
506
  w.emit("data-table:update-total-record", n);
507
- }, wt = () => {
508
- w.on("data-table:update", ta);
509
- }, ia = (e) => {
510
- e.tableName === t.tableName && (y.value = e.data, L.value = [...y.value], H.value = e.data.length);
511
- }, Me = (e, a, n) => typeof (e == null ? void 0 : e.confirmDialogProps) == "function" ? e == null ? void 0 : e.confirmDialogProps(a, n) : e == null ? void 0 : e.confirmDialogProps;
507
+ }, kt = () => {
508
+ w.on("data-table:update", la);
509
+ }, ua = (e) => {
510
+ e.tableName === t.tableName && (g.value = e.data, U.value = [...g.value], H.value = e.data.length);
511
+ }, Oe = (e, a, n) => typeof (e == null ? void 0 : e.confirmDialogProps) == "function" ? e == null ? void 0 : e.confirmDialogProps(a, n) : e == null ? void 0 : e.confirmDialogProps;
512
512
  return (e, a) => {
513
- var n, s, b;
514
- return d(), p("div", ee(ie((n = r(i)) == null ? void 0 : n.root)), [
515
- U("div", ee(ie((s = r(i)) == null ? void 0 : s.tablewrapper)), [
516
- K(r(Nt), f({ "auto-hide": !1 }, (b = r(i)) == null ? void 0 : b.scrollheightwrapper({ props: t }), { class: "custom-scrollbar [&_.simplebar-track]:bg-grayscale-100 dark:[&_.simplebar-track]:bg-grayscale-800" }), {
517
- default: ue(() => {
518
- var c, g, u, k, h;
513
+ var n, s, b, p;
514
+ return d(), c("div", ae(ue((n = r(i)) == null ? void 0 : n.root)), [
515
+ x("div", ae(ue((s = r(i)) == null ? void 0 : s.tablewrapper)), [
516
+ _(r(Tt), f({ "auto-hide": !1 }, (b = r(i)) == null ? void 0 : b.scrollheightwrapper({ props: t }), { class: "custom-scrollbar [&_.simplebar-track]:bg-grayscale-100 dark:[&_.simplebar-track]:bg-grayscale-800" }), {
517
+ default: ce(() => {
518
+ var v, u, k, h, K;
519
519
  return [
520
- (d(), p("table", f({ id: r(Pe) }, (c = r(i)) == null ? void 0 : c.table, {
521
- key: Ve.value,
522
- ref: ja.value
520
+ (d(), c("table", f({ id: r(Ee) }, (v = r(i)) == null ? void 0 : v.table, {
521
+ key: Qe.value,
522
+ ref: Va.value
523
523
  }), [
524
- U("thead", ee(ie(r(i).thead)), [
525
- U("tr", ee(ie(r(i).headerrow)), [
526
- e.reorderable && !D.value ? (d(), p("th", f({ key: 0 }, r(i).headercellreorderable, {
527
- class: X().class,
528
- rowspan: J.value
529
- }), null, 16, Jt)) : m("", !0),
530
- e.selectionType === "checkbox" ? (d(), p("th", f({ key: 1 }, r(i).headercellcheckbox, {
531
- class: X().class,
532
- rowspan: J.value
524
+ x("thead", ae(ue(r(i).thead)), [
525
+ x("tr", ae(ue(r(i).headerrow)), [
526
+ e.reorderable && !D.value ? (d(), c("th", f({ key: 0 }, r(i).headercellreorderable, {
527
+ class: ee().class,
528
+ rowspan: Y.value
529
+ }), null, 16, Yt)) : m("", !0),
530
+ e.selectionType === "checkbox" ? (d(), c("th", f({ key: 1 }, r(i).headercellcheckbox, {
531
+ class: ee().class,
532
+ rowspan: Y.value
533
533
  }), [
534
- K(Le, f(
535
- (g = r(i)) == null ? void 0 : g.headercheckbox({ context: { isSelectedAll: Ze.value } }),
534
+ _(Ue, f(
535
+ (u = r(i)) == null ? void 0 : u.headercheckbox({ context: { isSelectedAll: Xe.value } }),
536
536
  {
537
- "model-value": Ze.value,
538
- "onUpdate:modelValue": a[0] || (a[0] = (l) => Ya(!!l)),
537
+ "model-value": Xe.value,
538
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => Za(!!l)),
539
539
  binary: ""
540
540
  }
541
541
  ), null, 16, ["model-value"])
542
- ], 16, Yt)) : m("", !0),
543
- e.treeTable ? (d(), p("th", f({ key: 2 }, r(i).headertoggler, {
544
- class: X().class,
545
- rowspan: J.value
542
+ ], 16, Zt)) : m("", !0),
543
+ e.treeTable ? (d(), c("th", f({ key: 2 }, r(i).headertoggler, {
544
+ class: ee().class,
545
+ rowspan: Y.value
546
546
  }), [
547
- K(Oe, f(
548
- { onClick: Xa },
549
- r(i).headertogglerbutton({ context: { isExpandedAll: Ye.value } }),
547
+ _(Ie, f(
548
+ { onClick: et },
549
+ r(i).headertogglerbutton({ context: { isExpandedAll: Ze.value } }),
550
550
  {
551
551
  icon: "arrow-down",
552
552
  text: ""
553
553
  }
554
554
  ), null, 16)
555
- ], 16, Zt)) : m("", !0),
556
- (d(!0), p(_, null, Q(he.value.parent, (l) => (d(), N(Oa, f({
555
+ ], 16, Xt)) : m("", !0),
556
+ (d(!0), c(S, null, W(me.value.parent, (l) => (d(), T(Ia, f({
557
557
  key: l.field,
558
558
  ref_for: !0
559
- }, X(l), {
559
+ }, ee(l), {
560
560
  col: l,
561
- "default-header-row-span": J.value,
561
+ "default-header-row-span": Y.value,
562
562
  preset: r(i),
563
- "sort-by": A.value,
563
+ "sort-by": F.value,
564
564
  "sort-order": D.value,
565
- onClick: (v) => l.sortable ? ea(l.field, v) : null
565
+ onClick: (y) => l.sortable ? aa(l.field, y) : null
566
566
  }), null, 16, ["col", "default-header-row-span", "preset", "sort-by", "sort-order", "onClick"]))), 128)),
567
- Ae.value ? (d(), p("th", f({ key: 3 }, X(void 0, t.customColumn), {
568
- id: `column-visibility-toggle-${r(Pe)}`,
569
- rowspan: J.value,
567
+ Fe.value ? (d(), c("th", f({ key: 3 }, ee(void 0, t.customColumn), {
568
+ id: `column-visibility-toggle-${r(Ee)}`,
569
+ rowspan: Y.value,
570
570
  onClick: a[1] || (a[1] = //@ts-ignore
571
571
  (...l) => {
572
- var v, se;
573
- return ((v = Ee.value) == null ? void 0 : v.toggleMenu) && ((se = Ee.value) == null ? void 0 : se.toggleMenu(...l));
572
+ var y, de;
573
+ return ((y = Ne.value) == null ? void 0 : y.toggleMenu) && ((de = Ne.value) == null ? void 0 : de.toggleMenu(...l));
574
574
  })
575
575
  }), [
576
- t.customColumn ? (d(), N(ae, f({ key: 0 }, r(i).columnvisibilityicon, {
576
+ t.customColumn ? (d(), T(te, f({ key: 0 }, r(i).columnvisibilityicon, {
577
577
  icon: "ellipsis-h",
578
578
  "tooltip-pos": "left"
579
579
  }), null, 16)) : m("", !0)
580
- ], 16, Xt)) : m("", !0)
580
+ ], 16, el)) : m("", !0)
581
581
  ], 16),
582
- he.value.child.length ? (d(), p("tr", ee(f({ key: 0 }, r(i).headerrow)), [
583
- (d(!0), p(_, null, Q(he.value.child, (l) => (d(), N(Oa, f({
582
+ me.value.child.length ? (d(), c("tr", ae(f({ key: 0 }, r(i).headerrow)), [
583
+ (d(!0), c(S, null, W(me.value.child, (l) => (d(), T(Ia, f({
584
584
  key: l.field,
585
585
  ref_for: !0
586
- }, X(l), {
586
+ }, ee(l), {
587
587
  col: l,
588
- "default-header-row-span": J.value,
588
+ "default-header-row-span": Y.value,
589
589
  preset: r(i),
590
- "sort-by": A.value,
590
+ "sort-by": F.value,
591
591
  "sort-order": D.value,
592
- onClick: (v) => l.sortable ? ea(l.field, v) : null
592
+ onClick: (y) => l.sortable ? aa(l.field, y) : null
593
593
  }), null, 16, ["col", "default-header-row-span", "preset", "sort-by", "sort-order", "onClick"]))), 128))
594
594
  ], 16)) : m("", !0)
595
595
  ], 16),
596
- U("tbody", ee(ie((u = r(i)) == null ? void 0 : u.tbody)), [
597
- Te.value ? (d(), p("tr", el, [
598
- U("td", f({ colspan: Ge.value }, (k = r(i)) == null ? void 0 : k.bodycell), [
599
- (d(!0), p(_, null, Q(r(i).invisiblelottiewrapper ? 2 : 1, (l) => (d(), p("div", f(
596
+ x("tbody", ae(ue((k = r(i)) == null ? void 0 : k.tbody)), [
597
+ Ae.value ? (d(), c("tr", al, [
598
+ x("td", f({ colspan: Je.value }, (h = r(i)) == null ? void 0 : h.bodycell), [
599
+ (d(!0), c(S, null, W(r(i).invisiblelottiewrapper ? 2 : 1, (l) => (d(), c("div", f(
600
600
  {
601
601
  key: l,
602
602
  ref_for: !0
603
603
  },
604
604
  l === 1 ? r(i).loadingtablewrapper : r(i).invisiblelottiewrapper
605
605
  ), [
606
- K(Se, f({
606
+ _(Ke, f({
607
607
  animation: "loading-table",
608
608
  ref_for: !0
609
609
  }, r(i).loadingtablelottie), null, 16)
610
610
  ], 16))), 128))
611
- ], 16, al)
612
- ])) : qa.value ? (d(), p("tr", cl, [
613
- U("td", f({ colspan: Ge.value }, (h = r(i)) == null ? void 0 : h.bodycell), [
614
- (d(!0), p(_, null, Q(r(i).invisiblelottiewrapper ? 2 : 1, (l) => (d(), p("div", f(
611
+ ], 16, tl)
612
+ ])) : Ga.value ? (d(), c("tr", pl, [
613
+ x("td", f({ colspan: Je.value }, (K = r(i)) == null ? void 0 : K.bodycell), [
614
+ (d(!0), c(S, null, W(r(i).invisiblelottiewrapper ? 2 : 1, (l) => (d(), c("div", f(
615
615
  {
616
616
  key: l,
617
617
  ref_for: !0
618
618
  },
619
619
  l === 1 ? r(i).nodatalottiewrapper : r(i).invisiblelottiewrapper
620
620
  ), [
621
- K(Se, f({
621
+ _(Ke, f({
622
622
  animation: "no-data",
623
623
  ref_for: !0
624
624
  }, r(i).nodatalottie), null, 16),
625
- te.value.emptyTableMessage ? (d(), p("span", f({
625
+ le.value.emptyTableMessage ? (d(), c("span", f({
626
626
  key: 0,
627
627
  ref_for: !0
628
- }, r(i).nodatamessage), I(te.value.emptyTableMessage), 17)) : m("", !0)
628
+ }, r(i).nodatamessage), z(e.$t(le.value.emptyTableMessage)), 17)) : m("", !0)
629
629
  ], 16))), 128))
630
- ], 16, pl)
631
- ])) : (d(!0), p(_, { key: 1 }, Q(Ga.value, (l, v) => {
632
- var se, ua, ca, pa, fa, va, ba, ga, ya, ha, ma;
633
- return d(), p(_, {
634
- key: `${v}-${l[e.dataKey]}`
630
+ ], 16, fl)
631
+ ])) : (d(!0), c(S, { key: 1 }, W(Ja.value, (l, y) => {
632
+ var de, ca, pa, fa, va, ba, ga, ya, ha, ma, wa;
633
+ return d(), c(S, {
634
+ key: `${y}-${l[e.dataKey]}`
635
635
  }, [
636
- U("tr", f(
636
+ x("tr", f(
637
637
  {
638
638
  id: l._id,
639
639
  draggable: He(l),
640
640
  ref_for: !0
641
641
  },
642
- (se = r(i)) == null ? void 0 : se.bodyrow({
642
+ (de = r(i)) == null ? void 0 : de.bodyrow({
643
643
  context: {
644
644
  highlighted: l[e.highlightKey ?? ""],
645
- selected: me(l[e.dataKey]),
646
- disabled: Y(l[e.dataKey]),
645
+ selected: we(l[e.dataKey]),
646
+ disabled: Z(l[e.dataKey]),
647
647
  draggable: He(l),
648
- dragging: Ke.value
648
+ dragging: _e.value
649
649
  },
650
650
  props: t
651
651
  }),
652
652
  {
653
- onClick: (o) => Za(o, l, v),
653
+ onClick: (o) => Xa(o, l, y),
654
654
  onDblclick: (o) => {
655
- var V;
656
- return e.treeTable && ((V = l.children) != null && V.length || l.hasChildren) ? we(l, v) : e.$emit("doubleClick", l);
655
+ var Q;
656
+ return e.treeTable && ((Q = l.children) != null && Q.length || l.hasChildren) ? ke(l, y) : e.$emit("doubleClick", l);
657
657
  },
658
- onDrag: a[11] || (a[11] = (o) => Ke.value = !0),
659
- onDragenter: T((o) => lt(o, l), ["prevent"]),
660
- onDragleave: a[12] || (a[12] = T(() => {
658
+ onDrag: a[11] || (a[11] = (o) => _e.value = !0),
659
+ onDragenter: A((o) => ot(o, l), ["prevent"]),
660
+ onDragleave: a[12] || (a[12] = A(() => {
661
661
  }, ["prevent"])),
662
- onDragover: a[13] || (a[13] = T(() => {
662
+ onDragover: a[13] || (a[13] = A(() => {
663
663
  }, ["prevent"])),
664
- onDragstart: (o) => tt(o, l, v),
665
- onDrop: ot
664
+ onDragstart: (o) => lt(o, l, y),
665
+ onDrop: nt
666
666
  }
667
667
  ), [
668
- e.reorderable && !D.value ? (d(), p("td", f({
668
+ e.reorderable && !D.value ? (d(), c("td", f({
669
669
  key: 0,
670
670
  ref_for: !0
671
- }, (ua = r(i)) == null ? void 0 : ua.bodycell), [
672
- !l.childRow && !l.childRowHeader ? (d(), N(ae, {
671
+ }, (ca = r(i)) == null ? void 0 : ca.bodycell), [
672
+ !l.childRow && !l.childRowHeader ? (d(), T(te, {
673
673
  key: 0,
674
674
  class: "draggableicon",
675
675
  icon: "dragable-menu"
676
676
  })) : m("", !0)
677
677
  ], 16)) : m("", !0),
678
- e.selectionType === "checkbox" ? (d(), p("td", f({
678
+ e.selectionType === "checkbox" ? (d(), c("td", f({
679
679
  key: 1,
680
680
  ref_for: !0
681
- }, (ca = r(i)) == null ? void 0 : ca.bodycell, {
682
- onClick: a[3] || (a[3] = T(() => {
681
+ }, (pa = r(i)) == null ? void 0 : pa.bodycell, {
682
+ onClick: a[3] || (a[3] = A(() => {
683
683
  }, ["stop"]))
684
684
  }), [
685
- !l.childRow && !l.childRowHeader ? (d(), N(Le, f({
685
+ !l.childRow && !l.childRowHeader ? (d(), T(Ue, f({
686
686
  key: 0,
687
687
  ref_for: !0
688
- }, (pa = r(i)) == null ? void 0 : pa.rowcheckbox, {
689
- modelValue: S.value,
690
- "onUpdate:modelValue": a[2] || (a[2] = (o) => S.value = o),
688
+ }, (fa = r(i)) == null ? void 0 : fa.rowcheckbox, {
689
+ modelValue: P.value,
690
+ "onUpdate:modelValue": a[2] || (a[2] = (o) => P.value = o),
691
691
  binary: !1,
692
- disabled: Y(l[e.dataKey]),
692
+ disabled: Z(l[e.dataKey]),
693
693
  value: l
694
694
  }), null, 16, ["modelValue", "disabled", "value"])) : m("", !0)
695
695
  ], 16)) : m("", !0),
696
- e.treeTable ? (d(), p("td", f({
696
+ e.treeTable ? (d(), c("td", f({
697
697
  key: 2,
698
698
  ref_for: !0
699
- }, (fa = r(i)) == null ? void 0 : fa.bodycell, {
699
+ }, (va = r(i)) == null ? void 0 : va.bodycell, {
700
700
  onClick: (o) => {
701
701
  (l.childRow || l.childRowHeader) && o.stopPropagation();
702
702
  }
703
703
  }), [
704
- (va = l.children) != null && va.length || l.hasChildren ? (d(), N(Oe, f(
704
+ (ba = l.children) != null && ba.length || l.hasChildren ? (d(), T(Ie, f(
705
705
  {
706
706
  key: 0,
707
- onClick: T((o) => we(l, v), ["stop"]),
707
+ onClick: A((o) => ke(l, y), ["stop"]),
708
708
  ref_for: !0
709
709
  },
710
710
  r(i).rowtogglerbutton({
711
711
  context: {
712
- isRowExpanded: Fe(l[e.dataKey])
712
+ isRowExpanded: $e(l[e.dataKey])
713
713
  }
714
714
  }),
715
715
  {
@@ -717,156 +717,156 @@ const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"
717
717
  text: ""
718
718
  }
719
719
  ), null, 16, ["onClick"])) : m("", !0)
720
- ], 16, ll)) : m("", !0),
720
+ ], 16, ol)) : m("", !0),
721
721
  (() => {
722
722
  var o;
723
723
  return l.childRowHeader && ((o = t.childTableProps) == null ? void 0 : o.useColumnsHeader);
724
- })() ? (d(), p(_, { key: 3 }, [
725
- (d(!0), p(_, null, Q(qe.value, (o) => {
726
- var V, de;
727
- return d(), p("td", {
724
+ })() ? (d(), c(S, { key: 3 }, [
725
+ (d(!0), c(S, null, W(Ge.value, (o) => {
726
+ var Q, ie;
727
+ return d(), c("td", {
728
728
  key: o.header,
729
- class: De([(V = r(i)) == null ? void 0 : V.bodycell.class, "font-semibold text-xs"]),
730
- colspan: o.colspan ?? ((de = o.parentColumnsFields) == null ? void 0 : de.length),
731
- onClick: a[4] || (a[4] = T(() => {
729
+ class: Se([(Q = r(i)) == null ? void 0 : Q.bodycell.class, "font-semibold text-xs"]),
730
+ colspan: o.colspan ?? ((ie = o.parentColumnsFields) == null ? void 0 : ie.length),
731
+ onClick: a[4] || (a[4] = A(() => {
732
732
  }, ["stop"]))
733
- }, I(o.header), 11, ol);
733
+ }, z(e.$t(o.header)), 11, nl);
734
734
  }), 128)),
735
- Ae.value ? (d(), p("td", {
735
+ Fe.value ? (d(), c("td", {
736
736
  key: 0,
737
- class: De(r(i).bodycell.class),
738
- onClick: a[5] || (a[5] = T(() => {
737
+ class: Se(r(i).bodycell.class),
738
+ onClick: a[5] || (a[5] = A(() => {
739
739
  }, ["stop"]))
740
740
  }, null, 2)) : m("", !0)
741
- ], 64)) : l.childRowHeader ? (d(), p("td", f({
741
+ ], 64)) : l.childRowHeader ? (d(), c("td", f({
742
742
  key: 4,
743
743
  ref_for: !0
744
744
  }, r(i).childrowheader, {
745
- class: (ba = r(i)) == null ? void 0 : ba.bodycell.class,
745
+ class: (ga = r(i)) == null ? void 0 : ga.bodycell.class,
746
746
  colspan: t.columns.length + 1,
747
- onClick: a[6] || (a[6] = T(() => {
747
+ onClick: a[6] || (a[6] = A(() => {
748
748
  }, ["stop"]))
749
- }), I(l.header), 17, nl)) : l.loadingRow ? (d(), p("td", {
749
+ }), z(e.$t(l.header)), 17, rl)) : l.loadingRow ? (d(), c("td", {
750
750
  key: 5,
751
- class: De((ga = r(i)) == null ? void 0 : ga.bodycell.class),
751
+ class: Se((ya = r(i)) == null ? void 0 : ya.bodycell.class),
752
752
  colspan: t.columns.length + 1,
753
- onClick: a[7] || (a[7] = T(() => {
753
+ onClick: a[7] || (a[7] = A(() => {
754
754
  }, ["stop"]))
755
755
  }, [
756
- U("div", f({ ref_for: !0 }, r(i).loadingtablewrapper), [
757
- K(Se, f({
756
+ x("div", f({ ref_for: !0 }, r(i).loadingtablewrapper), [
757
+ _(Ke, f({
758
758
  animation: "loading-table",
759
759
  ref_for: !0
760
760
  }, r(i).loadingtablelottie), null, 16)
761
761
  ], 16)
762
- ], 10, rl)) : l.noDataRow ? (d(), p("td", {
762
+ ], 10, sl)) : l.noDataRow ? (d(), c("td", {
763
763
  key: 6,
764
- class: De((ya = r(i)) == null ? void 0 : ya.bodycell.class),
764
+ class: Se((ha = r(i)) == null ? void 0 : ha.bodycell.class),
765
765
  colspan: t.columns.length + 1,
766
- onClick: a[8] || (a[8] = T(() => {
766
+ onClick: a[8] || (a[8] = A(() => {
767
767
  }, ["stop"]))
768
768
  }, [
769
- U("div", f({ ref_for: !0 }, r(i).nodatalottiewrapper), [
770
- K(Se, f({
769
+ x("div", f({ ref_for: !0 }, r(i).nodatalottiewrapper), [
770
+ _(Ke, f({
771
771
  animation: "no-data",
772
772
  ref_for: !0
773
773
  }, r(i).nodatalottie), null, 16),
774
- te.value.emptyTableMessage ? (d(), p("span", f({
774
+ le.value.emptyTableMessage ? (d(), c("span", f({
775
775
  key: 0,
776
776
  ref_for: !0
777
- }, r(i).nodatamessage), I(te.value.emptyTableMessage), 17)) : m("", !0)
777
+ }, r(i).nodatamessage), z(e.$t(le.value.emptyTableMessage)), 17)) : m("", !0)
778
778
  ], 16)
779
- ], 10, sl)) : (d(), p(_, { key: 7 }, [
780
- (d(!0), p(_, null, Q(l.childRow ? qe.value : M.value, (o) => {
781
- var V, de, wa, ka, Ca, Ra, Da, _a, Sa, Pa, Ka, Ea, Na, Ta, Aa, Ce, Fa, Ha;
782
- return d(), p("td", f({
779
+ ], 10, dl)) : (d(), c(S, { key: 7 }, [
780
+ (d(!0), c(S, null, W(l.childRow ? Ge.value : O.value, (o) => {
781
+ var Q, ie, ka, Ca, Ra, Da, Sa, Pa, Ka, Ea, _a, Na, Ta, Aa, Fa, Re, $a, Ha;
782
+ return d(), c("td", f({
783
783
  key: o.field,
784
784
  class: [
785
785
  {
786
786
  "!py-0": o.editable,
787
- "!px-0": ((V = o.preset) == null ? void 0 : V.type) === "multirow"
787
+ "!px-0": ((Q = o.preset) == null ? void 0 : Q.type) === "multirow"
788
788
  },
789
789
  typeof o.bodyClass == "function" ? o.bodyClass(l) : o.bodyClass,
790
- at(o, l, e.dataKey),
790
+ tt(o, l, e.dataKey),
791
791
  o.class
792
792
  ],
793
- colspan: o.colspan ?? ((de = o.parentColumnsFields) == null ? void 0 : de.length),
793
+ colspan: o.colspan ?? ((ie = o.parentColumnsFields) == null ? void 0 : ie.length),
794
794
  ref_for: !0
795
- }, (wa = r(i)) == null ? void 0 : wa.bodycell), [
796
- ((ka = o.preset) == null ? void 0 : ka.type) === "toggle" || ((Ca = o.preset) == null ? void 0 : Ca.type) === "checkbox" ? (d(), p(_, { key: 0 }, [
797
- ((Ra = o.preset) == null ? void 0 : Ra.type) === "toggle" ? (d(), N(zt, {
795
+ }, (ka = r(i)) == null ? void 0 : ka.bodycell), [
796
+ ((Ca = o.preset) == null ? void 0 : Ca.type) === "toggle" || ((Ra = o.preset) == null ? void 0 : Ra.type) === "checkbox" ? (d(), c(S, { key: 0 }, [
797
+ ((Da = o.preset) == null ? void 0 : Da.type) === "toggle" ? (d(), T(jt, {
798
798
  key: 0,
799
- disabled: Y(l[e.dataKey]) || (typeof ((Da = o.preset) == null ? void 0 : Da.disabled) == "function" ? (_a = o.preset) == null ? void 0 : _a.disabled(l) : (Sa = o.preset) == null ? void 0 : Sa.disabled),
799
+ disabled: Z(l[e.dataKey]) || (typeof ((Sa = o.preset) == null ? void 0 : Sa.disabled) == "function" ? (Pa = o.preset) == null ? void 0 : Pa.disabled(l) : (Ka = o.preset) == null ? void 0 : Ka.disabled),
800
800
  "input-id": l[e.dataKey],
801
801
  "model-value": r(B)(l, o.field),
802
- onClick: a[9] || (a[9] = T(() => {
802
+ onClick: a[9] || (a[9] = A(() => {
803
803
  }, ["stop"])),
804
804
  "onUpdate:modelValue": (C) => {
805
- r(ce)(l, o.field, C), Xe(C, l, o);
805
+ r(pe)(l, o.field, C), ea(C, l, o);
806
806
  }
807
807
  }, null, 8, ["disabled", "input-id", "model-value", "onUpdate:modelValue"])) : m("", !0),
808
- ((Pa = o.preset) == null ? void 0 : Pa.type) === "checkbox" ? (d(), N(Le, {
808
+ ((Ea = o.preset) == null ? void 0 : Ea.type) === "checkbox" ? (d(), T(Ue, {
809
809
  key: 1,
810
- disabled: Y(l[e.dataKey]) || (typeof ((Ka = o.preset) == null ? void 0 : Ka.disabled) == "function" ? (Ea = o.preset) == null ? void 0 : Ea.disabled(l) : (Na = o.preset) == null ? void 0 : Na.disabled),
810
+ disabled: Z(l[e.dataKey]) || (typeof ((_a = o.preset) == null ? void 0 : _a.disabled) == "function" ? (Na = o.preset) == null ? void 0 : Na.disabled(l) : (Ta = o.preset) == null ? void 0 : Ta.disabled),
811
811
  "input-id": l[e.dataKey],
812
812
  "model-value": r(B)(l, o.field),
813
- onClick: a[10] || (a[10] = T(() => {
813
+ onClick: a[10] || (a[10] = A(() => {
814
814
  }, ["stop"])),
815
815
  "onUpdate:modelValue": (C) => {
816
- r(ce)(l, o.field, !!C), Xe(!!C, l, o);
816
+ r(pe)(l, o.field, !!C), ea(!!C, l, o);
817
817
  },
818
818
  binary: ""
819
819
  }, null, 8, ["disabled", "input-id", "model-value", "onUpdate:modelValue"])) : m("", !0),
820
- (Ta = o.preset) != null && Ta.confirmDialogProps ? (d(), N(Ot, f(
820
+ (Aa = o.preset) != null && Aa.confirmDialogProps ? (d(), T(It, f(
821
821
  {
822
822
  key: 2,
823
823
  list: [l],
824
- visible: !!ye.value[l[e.dataKey] + o.field],
824
+ visible: !!he.value[l[e.dataKey] + o.field],
825
825
  onClose: () => {
826
- var E, F, Ba;
827
- const C = () => r(ce)(
826
+ var N, $, Ba;
827
+ const C = () => r(pe)(
828
828
  l,
829
829
  o.field,
830
830
  !r(B)(l, o.field)
831
831
  );
832
- ((E = Me(
832
+ ((N = Oe(
833
833
  o.preset,
834
834
  l[o.field],
835
835
  l
836
- )) == null ? void 0 : E.actionable) == !1 && "onConfirm" in o.preset ? (Ba = (F = o.preset).onConfirm) == null || Ba.call(
837
- F,
836
+ )) == null ? void 0 : N.actionable) == !1 && "onConfirm" in o.preset ? (Ba = ($ = o.preset).onConfirm) == null || Ba.call(
837
+ $,
838
838
  l[o.field],
839
839
  l,
840
840
  C
841
841
  ) : C();
842
842
  },
843
843
  onConfirm: (C) => {
844
- var E, F;
845
- return (F = (E = o.preset) == null ? void 0 : E.onConfirm) == null ? void 0 : F.call(
846
- E,
844
+ var N, $;
845
+ return ($ = (N = o.preset) == null ? void 0 : N.onConfirm) == null ? void 0 : $.call(
846
+ N,
847
847
  l[o.field],
848
848
  l,
849
- () => r(ce)(
849
+ () => r(pe)(
850
850
  l,
851
851
  o.field,
852
852
  !r(B)(l, o.field)
853
853
  )
854
854
  );
855
855
  },
856
- "onUpdate:visible": (C) => ye.value[l[e.dataKey] + o.field] = C,
856
+ "onUpdate:visible": (C) => he.value[l[e.dataKey] + o.field] = C,
857
857
  actionable: "",
858
858
  ref_for: !0
859
859
  },
860
- Me(
860
+ Oe(
861
861
  o.preset,
862
862
  l[o.field],
863
863
  l
864
864
  )
865
865
  ), null, 16, ["list", "visible", "onClose", "onConfirm", "onUpdate:visible"])) : m("", !0)
866
- ], 64)) : ((Aa = o.preset) == null ? void 0 : Aa.type) === "multirow" ? (d(), N(jt, {
866
+ ], 64)) : ((Fa = o.preset) == null ? void 0 : Fa.type) === "multirow" ? (d(), T(Vt, {
867
867
  key: 1,
868
- attributes: ((Fa = (Ce = o.preset) == null ? void 0 : Ce.fieldAttributes) == null ? void 0 : Fa.call(Ce, l)) ?? []
869
- }, null, 8, ["attributes"])) : o.editable ? (d(), p("span", f({
868
+ attributes: (($a = (Re = o.preset) == null ? void 0 : Re.fieldAttributes) == null ? void 0 : $a.call(Re, l)) ?? []
869
+ }, null, 8, ["attributes"])) : o.editable ? (d(), c("span", f({
870
870
  key: 2,
871
871
  ref_for: !0
872
872
  }, r(i).celleditableelement, {
@@ -875,67 +875,69 @@ const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"
875
875
  e.$emit("cellEdited", {
876
876
  item: l,
877
877
  field: o.field,
878
- index: v,
878
+ index: y,
879
879
  value: C.target.innerText
880
880
  });
881
881
  },
882
882
  onKeypress: (C) => {
883
- o.numberInputOnly && ht(C);
883
+ o.numberInputOnly && mt(C);
884
884
  }
885
- }), I(r(B)(l, o.field) || "-"), 17, il)) : o.bodyComponent || o.bodyClass || o.bodyTemplate || o.dateFormatOptions ? (d(), p(_, { key: 3 }, [
886
- o.bodyComponent ? (d(), N(Pt(o.bodyComponent(l, v).component), f({
885
+ }), z(e.$t(r(B)(l, o.field)) || "-"), 17, ul)) : o.bodyComponent || o.bodyClass || o.bodyTemplate || o.dateFormatOptions ? (d(), c(S, { key: 3 }, [
886
+ o.bodyComponent ? (d(), T(Et(o.bodyComponent(l, y).component), f({
887
887
  key: 0,
888
- modelValue: o.bodyComponent(l, v).model,
889
- "onUpdate:modelValue": (C) => o.bodyComponent(l, v).model = C,
890
- disabled: o.bodyComponent(l, v).disabled,
888
+ modelValue: o.bodyComponent(l, y).model,
889
+ "onUpdate:modelValue": (C) => o.bodyComponent(l, y).model = C,
890
+ disabled: o.bodyComponent(l, y).disabled,
891
891
  ref_for: !0
892
- }, o.bodyComponent(l, v).props, Kt(
893
- o.bodyComponent(l, v).events ? o.bodyComponent(l, v).events : {}
892
+ }, o.bodyComponent(l, y).props, _t(
893
+ o.bodyComponent(l, y).events ? o.bodyComponent(l, y).events : {}
894
894
  ), {
895
895
  onChange: (C) => {
896
- var E, F;
897
- return (F = (E = o.bodyComponent(l, v)).onChange) == null ? void 0 : F.call(E, l);
896
+ var N, $;
897
+ return ($ = (N = o.bodyComponent(l, y)).onChange) == null ? void 0 : $.call(N, l);
898
898
  },
899
899
  onClick: (C) => {
900
- o.bodyComponent(l, v).stop !== !1 && C.stopPropagation();
900
+ o.bodyComponent(l, y).stop !== !1 && C.stopPropagation();
901
901
  },
902
902
  "onUpdate:modelValue": (C) => {
903
- var E, F;
904
- return (F = (E = o.bodyComponent(l, v)).onChange) == null ? void 0 : F.call(E, l);
903
+ var N, $;
904
+ return ($ = (N = o.bodyComponent(l, y)).onChange) == null ? void 0 : $.call(N, l);
905
905
  }
906
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onChange", "onClick"])) : (d(), p("span", ul, [
907
- o.bodyTemplate ? (d(), p(_, { key: 0 }, [
908
- _e(I(((Ha = o.bodyTemplate) == null ? void 0 : Ha.call(o, l, v)) || "-"), 1)
909
- ], 64)) : o.dateFormatOptions ? (d(), p(_, { key: 1 }, [
910
- _e(I(r(Ft)(
911
- new Date(
912
- r(B)(
913
- l,
914
- o.field
915
- )
916
- ),
917
- o.dateFormatOptions
906
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onChange", "onClick"])) : (d(), c("span", cl, [
907
+ o.bodyTemplate ? (d(), c(S, { key: 0 }, [
908
+ Pe(z(e.$t((Ha = o.bodyTemplate) == null ? void 0 : Ha.call(o, l, y)) || "-"), 1)
909
+ ], 64)) : o.dateFormatOptions ? (d(), c(S, { key: 1 }, [
910
+ Pe(z(e.$t(
911
+ r($t)(
912
+ new Date(
913
+ r(B)(
914
+ l,
915
+ o.field
916
+ )
917
+ ),
918
+ o.dateFormatOptions
919
+ )
918
920
  )), 1)
919
- ], 64)) : (d(), p(_, { key: 2 }, [
920
- _e(I(r(B)(l, o.field) || "-"), 1)
921
+ ], 64)) : (d(), c(S, { key: 2 }, [
922
+ Pe(z(e.$t(r(B)(l, o.field)) || "-"), 1)
921
923
  ], 64))
922
924
  ]))
923
- ], 64)) : (d(), p(_, { key: 4 }, [
924
- _e(I(r(B)(l, o.field) ?? "-"), 1)
925
+ ], 64)) : (d(), c(S, { key: 4 }, [
926
+ Pe(z(e.$t(r(B)(l, o.field)) ?? "-"), 1)
925
927
  ], 64))
926
- ], 16, dl);
928
+ ], 16, il);
927
929
  }), 128)),
928
- Ae.value ? (d(), p("td", f(
930
+ Fe.value ? (d(), c("td", f(
929
931
  {
930
932
  key: 0,
931
933
  ref_for: !0,
932
934
  ref_key: "rowSingleActionCell",
933
- ref: Va
935
+ ref: Qa
934
936
  },
935
- (ha = r(i)) == null ? void 0 : ha.rowsingleactioncell({
937
+ (ma = r(i)) == null ? void 0 : ma.rowsingleactioncell({
936
938
  props: t,
937
939
  context: {
938
- selected: me(l[e.dataKey]),
940
+ selected: we(l[e.dataKey]),
939
941
  highlighted: l[e.highlightKey ?? ""]
940
942
  }
941
943
  }),
@@ -943,16 +945,16 @@ const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"
943
945
  class: r(i).bodycell.class
944
946
  }
945
947
  ), [
946
- !l.childRow && e.useOption || l.childRow && ((ma = t.childTableProps) != null && ma.useOption) ? (d(), p("div", f({
948
+ !l.childRow && e.useOption || l.childRow && ((wa = t.childTableProps) != null && wa.useOption) ? (d(), c("div", f({
947
949
  key: 0,
948
950
  ref_for: !0
949
951
  }, r(i).singleactionwrapper), [
950
- K(Oe, f({
952
+ _(Ie, f({
951
953
  id: "button-action-" + l[t.dataKey],
952
954
  ref_for: !0
953
955
  }, r(i).singleactionbutton({ props: t }), {
954
956
  disabled: e.disableAllRows,
955
- onClick: T((o) => et(o, l), ["stop"]),
957
+ onClick: A((o) => at(o, l), ["stop"]),
956
958
  icon: "ellipsis-h",
957
959
  outlined: "",
958
960
  size: "small",
@@ -962,67 +964,70 @@ const qt = (W, $) => W.every((t) => $.includes(t)), Gt = ["id"], Jt = ["rowspan"
962
964
  ], 16)) : m("", !0)
963
965
  ], 16)) : m("", !0)
964
966
  ], 64))
965
- ], 16, tl),
966
- St(e.$slots, "row-subcontent", { item: l }, void 0, !0)
967
+ ], 16, ll),
968
+ Kt(e.$slots, "row-subcontent", { item: l }, void 0, !0)
967
969
  ], 64);
968
970
  }), 128))
969
971
  ], 16)
970
- ], 16, Gt))
972
+ ], 16, Jt))
971
973
  ];
972
974
  }),
973
975
  _: 3
974
976
  }, 16)
975
977
  ], 16),
976
- e.usePaginator ? _t((d(), N(r(Mt), f({
977
- key: be.value,
978
- rows: j.value,
979
- "onUpdate:rows": a[14] || (a[14] = (c) => j.value = c)
978
+ e.usePaginator ? Pt((d(), T(r(Ot), f({
979
+ key: ge.value,
980
+ rows: V.value,
981
+ "onUpdate:rows": a[14] || (a[14] = (v) => V.value = v)
980
982
  }, r(i).paginator({ context: { totalRecords: H.value } }), {
981
- "current-page-report-template": H.value ? r(pe).paginationReportFound : r(pe).paginationReportNotFound,
982
- "rows-per-page-options": Ia,
983
+ "current-page-report-template": H.value ? r(fe).paginationReportFound : r(fe).paginationReportNotFound,
984
+ "rows-per-page-options": za,
983
985
  "total-records": H.value,
984
- onPage: pt
986
+ onPage: ft
985
987
  }), {
986
- firstpagelinkicon: ue(() => [
987
- K(ae, { icon: "round-keyboard-double-arrow-left" })
988
+ firstpagelinkicon: ce(() => [
989
+ _(te, { icon: "round-keyboard-double-arrow-left" })
988
990
  ]),
989
- lastpagelinkicon: ue(() => [
990
- K(ae, { icon: "round-keyboard-double-arrow-right" })
991
+ lastpagelinkicon: ce(() => [
992
+ _(te, { icon: "round-keyboard-double-arrow-right" })
991
993
  ]),
992
- prevpagelinkicon: ue(() => [
993
- K(ae, { icon: "round-keyboard-arrow-left" })
994
+ prevpagelinkicon: ce(() => [
995
+ _(te, { icon: "round-keyboard-arrow-left" })
994
996
  ]),
995
- nextpagelinkicon: ue(() => [
996
- K(ae, { icon: "round-keyboard-arrow-right" })
997
+ nextpagelinkicon: ce(() => [
998
+ _(te, { icon: "round-keyboard-arrow-right" })
997
999
  ]),
998
1000
  _: 1
999
1001
  }, 16, ["rows", "current-page-report-template", "total-records"])), [
1000
- [Et, !Te.value]
1002
+ [Nt, !Ae.value]
1001
1003
  ]) : m("", !0),
1002
- K(Ut, {
1004
+ _(xt, {
1003
1005
  id: "single-action-menu",
1004
1006
  ref_key: "optionMenu",
1005
- ref: Qe,
1006
- model: e.options,
1007
- onFocus: r(Wt),
1007
+ ref: We,
1008
+ model: (p = e.options) == null ? void 0 : p.map((v) => ({
1009
+ ...v,
1010
+ label: e.$t(v == null ? void 0 : v.label)
1011
+ })),
1012
+ onFocus: r(qt),
1008
1013
  "append-to": "body",
1009
1014
  "auto-z-index": "",
1010
1015
  popup: ""
1011
1016
  }, null, 8, ["model", "onFocus"]),
1012
- t.customColumn ? (d(), N(Lt, {
1013
- key: je.value,
1017
+ t.customColumn ? (d(), T(Ut, {
1018
+ key: Ve.value,
1014
1019
  ref_key: "customColumn",
1015
- ref: Ee,
1016
- "visible-columns": M.value,
1017
- "onUpdate:visibleColumns": a[15] || (a[15] = (c) => M.value = c),
1018
- "default-columns": e.columns.filter((c) => c.visible !== !1),
1019
- "table-id": r(Pe)
1020
+ ref: Ne,
1021
+ "visible-columns": O.value,
1022
+ "onUpdate:visibleColumns": a[15] || (a[15] = (v) => O.value = v),
1023
+ "default-columns": e.columns.filter((v) => v.visible !== !1),
1024
+ "table-id": r(Ee)
1020
1025
  }, null, 8, ["visible-columns", "default-columns", "table-id"])) : m("", !0),
1021
- K(It, { group: "download" })
1026
+ _(zt, { group: "download" })
1022
1027
  ], 16);
1023
1028
  };
1024
1029
  }
1025
- }), Ol = /* @__PURE__ */ Qt(fl, [["__scopeId", "data-v-afd5b24a"]]);
1030
+ }), Il = /* @__PURE__ */ Wt(vl, [["__scopeId", "data-v-e0751051"]]);
1026
1031
  export {
1027
- Ol as D
1032
+ Il as D
1028
1033
  };