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

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