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