@fewangsit/wangsvue-fats 1.0.1-alpha.41 → 1.0.1-alpha.43

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