@fewangsit/wangsvue-fats 1.0.1-alpha.40 → 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.
- package/animation/index.d.ts +13 -1
- package/animation/index.es.js +11 -9
- package/assets/lottiejs/scan-qr.es.js +4 -0
- package/badge/index.d.ts +11 -1
- package/badge/index.es.js +55 -53
- package/badgegroup/index.es.js +16 -14
- package/buttonbulkaction/index.es.js +15 -14
- package/datatable/index.d.ts +41 -0
- package/datatable/index.es.js +471 -435
- package/disposalreporttable/index.es.js +56 -55
- package/dropdown/index.d.ts +1 -0
- package/dropdown/index.es.js +82 -72
- package/headercell/index.es.js +40 -0
- package/inputbadge/index.d.ts +33 -0
- package/inputbadge/index.es.js +108 -94
- package/inputcurrency/index.es.js +2 -1
- package/package.json +2 -1
- package/scan-qr-C6V4afHJ.js +4 -0
- package/scan-qr-ER7xYaNh.js +1 -0
- package/stats.html +1 -1
- package/style.css +1 -1
- package/wangsvue-fats.esm.browser.js +11705 -11603
- package/wangsvue-fats.system.js +69 -69
package/datatable/index.es.js
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { s as
|
|
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
|
|
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
|
|
15
|
-
import { _ as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { _ as
|
|
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
|
|
25
|
-
import { _ as
|
|
26
|
-
function
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
const { offsetHeight: t = 0 } =
|
|
30
|
-
t >= z && (
|
|
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
|
|
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__ */
|
|
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__ */
|
|
77
|
-
setup(W, { emit:
|
|
78
|
-
const t = W, z =
|
|
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) =>
|
|
115
|
+
(v) => x.value.some((d) => d.field === v)
|
|
84
116
|
));
|
|
85
|
-
}) :
|
|
86
|
-
}),
|
|
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 ?
|
|
89
|
-
tag: t.lazy ?
|
|
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:
|
|
94
|
-
...t.lazy ?
|
|
125
|
+
sortBy: A.value,
|
|
126
|
+
...t.lazy ? Ke.value : t.filters
|
|
95
127
|
// This will reset the previous filters.
|
|
96
|
-
})),
|
|
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) =>
|
|
105
|
-
}),
|
|
106
|
-
var
|
|
107
|
-
if (t.disableAllRows || !((
|
|
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 =
|
|
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
|
-
}),
|
|
112
|
-
() =>
|
|
113
|
-
),
|
|
114
|
-
() =>
|
|
115
|
-
),
|
|
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
|
-
),
|
|
152
|
+
), qa = P(
|
|
121
153
|
() => {
|
|
122
154
|
var e;
|
|
123
|
-
return !
|
|
155
|
+
return !Ee.value && !((e = g.value) != null && e.length);
|
|
124
156
|
}
|
|
125
|
-
),
|
|
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
|
-
),
|
|
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 =
|
|
133
|
-
},
|
|
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
|
-
),
|
|
136
|
-
var v,
|
|
137
|
-
if (
|
|
138
|
-
const s = n ?? !
|
|
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
|
-
|
|
144
|
-
), delete
|
|
175
|
+
$.value[e[t.dataKey]]
|
|
176
|
+
), delete $.value[e[t.dataKey]];
|
|
145
177
|
else {
|
|
146
|
-
|
|
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 ((
|
|
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
|
-
|
|
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
|
-
},
|
|
177
|
-
t.includeCheckDisabledRows ? T.value = e ?
|
|
178
|
-
},
|
|
179
|
-
if (!a.childRow && !a.childRowHeader && !
|
|
180
|
-
const s =
|
|
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] :
|
|
215
|
+
) : T.value = [...T.value, a] : Ue.value = s ? void 0 : a;
|
|
184
216
|
}
|
|
185
|
-
},
|
|
217
|
+
}, Xa = async () => {
|
|
186
218
|
var a;
|
|
187
|
-
const e = !
|
|
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
|
|
223
|
+
((a = s.children) != null && a.length || s.hasChildren) && await he(s, n, e), n++;
|
|
192
224
|
}
|
|
193
|
-
},
|
|
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
|
-
|
|
201
|
-
var
|
|
202
|
-
s != null && s.classList.contains("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
|
-
},
|
|
205
|
-
var v,
|
|
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
|
-
!
|
|
242
|
+
!F(a, n.field)
|
|
211
243
|
);
|
|
212
|
-
if (n.preset.type === "checkbox" ? (
|
|
213
|
-
const { showWhen: w } =
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
-
},
|
|
260
|
+
}, tt = (e, a) => {
|
|
229
261
|
var n, s;
|
|
230
|
-
if (e.preventDefault(),
|
|
231
|
-
const v = e.target,
|
|
232
|
-
if (
|
|
233
|
-
const b =
|
|
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 =
|
|
239
|
-
(w) => w._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
|
-
|
|
243
|
-
|
|
274
|
+
M.value[b],
|
|
275
|
+
M.value[f]
|
|
244
276
|
] = [
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
],
|
|
277
|
+
M.value[f],
|
|
278
|
+
M.value[b]
|
|
279
|
+
], ot());
|
|
248
280
|
}
|
|
249
|
-
},
|
|
250
|
-
q.value && z("rowReorder", q.value), be.value = void 0,
|
|
251
|
-
},
|
|
252
|
-
g.value = [...
|
|
253
|
-
},
|
|
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
|
-
},
|
|
259
|
-
|
|
260
|
-
},
|
|
290
|
+
}, nt = () => {
|
|
291
|
+
A.value = void 0, D.value = void 0;
|
|
292
|
+
}, rt = () => {
|
|
261
293
|
G.value = 1, ve.value++;
|
|
262
|
-
},
|
|
294
|
+
}, st = () => {
|
|
263
295
|
j.value = t.rows ?? 10, G.value = 1, ve.value++;
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
},
|
|
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 =
|
|
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:
|
|
274
|
-
const f =
|
|
305
|
+
([v, { value: d, matchMode: b }]) => {
|
|
306
|
+
const f = F(s, v);
|
|
275
307
|
switch (b) {
|
|
276
308
|
case "IN":
|
|
277
|
-
return Array.isArray(
|
|
309
|
+
return Array.isArray(d) ? d.includes(f) : !1;
|
|
278
310
|
case "CONTAINS":
|
|
279
|
-
return f &&
|
|
311
|
+
return f && d ? f.toString().toLowerCase().includes(d) : !1;
|
|
280
312
|
case "EQUALS":
|
|
281
|
-
return f ? f.toString() ===
|
|
313
|
+
return f ? f.toString() === d.toString() : !1;
|
|
282
314
|
case "BETWEEN":
|
|
283
|
-
return Array.isArray(
|
|
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(
|
|
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
|
-
|
|
295
|
-
},
|
|
326
|
+
ut(e);
|
|
327
|
+
}, ut = (e) => {
|
|
296
328
|
var a;
|
|
297
329
|
try {
|
|
298
|
-
g.value = (a =
|
|
330
|
+
g.value = (a = oe.value) != null && a.length ? e.filter((n) => {
|
|
299
331
|
const s = JSON.stringify(n);
|
|
300
|
-
return new RegExp(
|
|
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
|
-
},
|
|
306
|
-
j.value = e.rows, G.value = e.page + 1, t.lazy && t.fetchFunction && await
|
|
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 &&
|
|
342
|
+
n >= 0 && he(g.value[n], n, !0);
|
|
311
343
|
});
|
|
312
|
-
},
|
|
313
|
-
e !==
|
|
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:
|
|
347
|
+
sortField: A.value,
|
|
316
348
|
originalEvent: a,
|
|
317
349
|
rows: j.value
|
|
318
|
-
}),
|
|
319
|
-
},
|
|
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
|
-
|
|
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
|
|
333
|
-
return
|
|
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
|
-
},
|
|
367
|
+
}, re = async () => {
|
|
336
368
|
var e;
|
|
337
369
|
try {
|
|
338
|
-
|
|
339
|
-
const a = await ((e = t.fetchFunction) == null ? void 0 : e.call(t,
|
|
340
|
-
g.value = n,
|
|
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
|
-
|
|
376
|
+
le.value = !1, $.value = {};
|
|
345
377
|
}
|
|
346
|
-
},
|
|
378
|
+
}, aa = async () => {
|
|
347
379
|
var n;
|
|
348
|
-
const e =
|
|
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
|
-
},
|
|
385
|
+
}, ft = async (e) => {
|
|
354
386
|
if (t.tableName === e.tableName)
|
|
355
387
|
try {
|
|
356
|
-
|
|
357
|
-
const { data: a, totalRecords: n = 0 } = t.lazy ? await
|
|
358
|
-
T.value = t.includeCheckDisabledRows ? a ?? [] :
|
|
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
|
-
|
|
392
|
+
le.value = !1;
|
|
361
393
|
}
|
|
362
|
-
},
|
|
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:
|
|
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
|
-
}),
|
|
371
|
-
(!e.tableName || e.tableName === t.tableName) &&
|
|
372
|
-
|
|
403
|
+
}), ta = (e) => {
|
|
404
|
+
(!e.tableName || e.tableName === t.tableName) && Ma(() => {
|
|
405
|
+
Qa.value++, re();
|
|
373
406
|
});
|
|
374
|
-
},
|
|
375
|
-
(n) => !(a ??
|
|
376
|
-
),
|
|
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
|
|
418
|
+
const d = x.value.filter(
|
|
386
419
|
(k) => k.visible !== !1
|
|
387
|
-
).filter((k) => !k.excluded), b =
|
|
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",
|
|
392
|
-
|
|
393
|
-
const { data: k } = t.fetchFunction ? await
|
|
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
|
|
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),
|
|
415
|
-
message: ((w =
|
|
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
|
-
|
|
453
|
+
ze(!1), m.on("data-table:download", me);
|
|
421
454
|
}
|
|
422
455
|
};
|
|
423
|
-
|
|
456
|
+
Ct(async () => {
|
|
424
457
|
var e;
|
|
425
|
-
t.fetchFunction && (await
|
|
426
|
-
}),
|
|
427
|
-
|
|
428
|
-
}),
|
|
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 || (
|
|
464
|
+
t.customColumn || (x.value = t.columns), je.value++;
|
|
432
465
|
}
|
|
433
|
-
),
|
|
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 }),
|
|
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
|
-
),
|
|
442
|
-
|
|
443
|
-
}),
|
|
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
|
|
454
|
-
m.on("data-table:apply-filter",
|
|
455
|
-
},
|
|
456
|
-
m.off("data-table:update",
|
|
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 &&
|
|
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
|
-
},
|
|
500
|
+
}, me = (e) => {
|
|
468
501
|
var a;
|
|
469
|
-
(e.tableName === t.tableName || (a = e.multiTableNames) != null && a.includes(t.tableName)) &&
|
|
470
|
-
},
|
|
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
|
-
},
|
|
473
|
-
const a = t.includeCheckDisabledRows ? 0 : (
|
|
474
|
-
total: (e ??
|
|
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
|
-
},
|
|
479
|
-
m.on("data-table:update",
|
|
480
|
-
},
|
|
481
|
-
e.tableName === t.tableName && (g.value = e.data,
|
|
482
|
-
},
|
|
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
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
default:
|
|
489
|
-
var
|
|
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
|
-
(
|
|
492
|
-
key:
|
|
493
|
-
ref:
|
|
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
|
-
|
|
496
|
-
|
|
497
|
-
e.reorderable && !D.value ? (
|
|
498
|
-
class:
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
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
|
-
|
|
504
|
-
(b = r(u)) == null ? void 0 : b.headercheckbox({ context: { isSelectedAll:
|
|
538
|
+
K(Me, p(
|
|
539
|
+
(b = r(u)) == null ? void 0 : b.headercheckbox({ context: { isSelectedAll: Ze.value } }),
|
|
505
540
|
{
|
|
506
|
-
"model-value":
|
|
507
|
-
"onUpdate:modelValue": a[0] || (a[0] = (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)) :
|
|
512
|
-
e.treeTable ? (
|
|
513
|
-
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
|
-
|
|
516
|
-
{ onClick:
|
|
517
|
-
r(u).headertogglerbutton({ context: { isExpandedAll:
|
|
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)) :
|
|
524
|
-
(
|
|
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
|
-
},
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
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
|
|
554
|
-
return ((
|
|
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 ? (
|
|
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)) :
|
|
561
|
-
], 16,
|
|
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
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
(
|
|
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
|
-
|
|
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,
|
|
580
|
-
])) :
|
|
581
|
-
|
|
582
|
-
(
|
|
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
|
-
|
|
625
|
+
K(De, p({
|
|
590
626
|
animation: "no-data",
|
|
591
627
|
ref_for: !0
|
|
592
628
|
}, r(u).nodatalottie), null, 16),
|
|
593
|
-
|
|
629
|
+
te.value.emptyTableMessage ? (i(), c("span", p({
|
|
594
630
|
key: 0,
|
|
595
631
|
ref_for: !0
|
|
596
|
-
}, r(u).nodatamessage),
|
|
632
|
+
}, r(u).nodatamessage), I(te.value.emptyTableMessage), 17)) : h("", !0)
|
|
597
633
|
], 16))), 128))
|
|
598
|
-
], 16,
|
|
599
|
-
])) : (
|
|
600
|
-
var
|
|
601
|
-
return
|
|
602
|
-
key: `${
|
|
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
|
-
|
|
640
|
+
L("tr", p(
|
|
605
641
|
{
|
|
606
642
|
id: l._id,
|
|
607
|
-
draggable:
|
|
643
|
+
draggable: He(l),
|
|
608
644
|
ref_for: !0
|
|
609
645
|
},
|
|
610
|
-
(
|
|
646
|
+
(se = r(u)) == null ? void 0 : se.bodyrow({
|
|
611
647
|
context: {
|
|
612
648
|
highlighted: l[e.highlightKey ?? ""],
|
|
613
|
-
selected:
|
|
614
|
-
disabled:
|
|
615
|
-
draggable:
|
|
616
|
-
dragging:
|
|
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) =>
|
|
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) ?
|
|
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) =>
|
|
627
|
-
onDragenter:
|
|
628
|
-
onDragleave: a[12] || (a[12] =
|
|
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] =
|
|
666
|
+
onDragover: a[13] || (a[13] = N(() => {
|
|
631
667
|
}, ["prevent"])),
|
|
632
|
-
onDragstart: (o) =>
|
|
633
|
-
onDrop:
|
|
668
|
+
onDragstart: (o) => at(o, l, y),
|
|
669
|
+
onDrop: lt
|
|
634
670
|
}
|
|
635
671
|
), [
|
|
636
|
-
e.reorderable && !D.value ? (
|
|
672
|
+
e.reorderable && !D.value ? (i(), c("td", p({
|
|
637
673
|
key: 0,
|
|
638
674
|
ref_for: !0
|
|
639
|
-
}, (
|
|
640
|
-
!l.childRow && !l.childRowHeader ? (
|
|
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
|
-
})) :
|
|
645
|
-
], 16)) :
|
|
646
|
-
e.selectionType === "checkbox" ? (
|
|
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
|
-
}, (
|
|
650
|
-
onClick: a[3] || (a[3] =
|
|
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 ? (
|
|
689
|
+
!l.childRow && !l.childRowHeader ? (i(), S(Me, p({
|
|
654
690
|
key: 0,
|
|
655
691
|
ref_for: !0
|
|
656
|
-
}, (
|
|
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:
|
|
696
|
+
disabled: Y(l[e.dataKey]),
|
|
661
697
|
value: l
|
|
662
|
-
}), null, 16, ["modelValue", "disabled", "value"])) :
|
|
663
|
-
], 16)) :
|
|
664
|
-
e.treeTable ? (
|
|
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
|
-
}, (
|
|
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
|
-
(
|
|
708
|
+
(va = l.children) != null && va.length || l.hasChildren ? (i(), S(Oe, p(
|
|
673
709
|
{
|
|
674
710
|
key: 0,
|
|
675
|
-
onClick:
|
|
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:
|
|
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"])) :
|
|
688
|
-
], 16,
|
|
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
|
-
})() ? (
|
|
693
|
-
(
|
|
694
|
-
var V,
|
|
695
|
-
return
|
|
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:
|
|
698
|
-
colspan: o.colspan ?? ((
|
|
699
|
-
onClick: a[4] || (a[4] =
|
|
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
|
-
},
|
|
737
|
+
}, I(o.header), 11, ll);
|
|
702
738
|
}), 128)),
|
|
703
|
-
|
|
739
|
+
Se.value ? (i(), c("td", {
|
|
704
740
|
key: 0,
|
|
705
|
-
class:
|
|
706
|
-
onClick: a[5] || (a[5] =
|
|
741
|
+
class: Ce(r(u).bodycell.class),
|
|
742
|
+
onClick: a[5] || (a[5] = N(() => {
|
|
707
743
|
}, ["stop"]))
|
|
708
|
-
}, null, 2)) :
|
|
709
|
-
], 64)) : l.childRowHeader ? (
|
|
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: (
|
|
749
|
+
class: (ba = r(u)) == null ? void 0 : ba.bodycell.class,
|
|
714
750
|
colspan: t.columns.length + 1,
|
|
715
|
-
onClick: a[6] || (a[6] =
|
|
751
|
+
onClick: a[6] || (a[6] = N(() => {
|
|
716
752
|
}, ["stop"]))
|
|
717
|
-
}),
|
|
753
|
+
}), I(l.header), 17, ol)) : l.loadingRow ? (i(), c("td", {
|
|
718
754
|
key: 5,
|
|
719
|
-
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] =
|
|
757
|
+
onClick: a[7] || (a[7] = N(() => {
|
|
722
758
|
}, ["stop"]))
|
|
723
759
|
}, [
|
|
724
|
-
|
|
725
|
-
|
|
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,
|
|
766
|
+
], 10, nl)) : l.noDataRow ? (i(), c("td", {
|
|
731
767
|
key: 6,
|
|
732
|
-
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] =
|
|
770
|
+
onClick: a[8] || (a[8] = N(() => {
|
|
735
771
|
}, ["stop"]))
|
|
736
772
|
}, [
|
|
737
|
-
|
|
738
|
-
|
|
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
|
-
|
|
778
|
+
te.value.emptyTableMessage ? (i(), c("span", p({
|
|
743
779
|
key: 0,
|
|
744
780
|
ref_for: !0
|
|
745
|
-
}, r(u).nodatamessage),
|
|
781
|
+
}, r(u).nodatamessage), I(te.value.emptyTableMessage), 17)) : h("", !0)
|
|
746
782
|
], 16)
|
|
747
|
-
], 10,
|
|
748
|
-
(
|
|
749
|
-
var V,
|
|
750
|
-
return
|
|
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 ?? ((
|
|
796
|
+
colspan: o.colspan ?? ((de = o.parentColumnsFields) == null ? void 0 : de.length),
|
|
761
797
|
ref_for: !0
|
|
762
|
-
}, (
|
|
763
|
-
((
|
|
764
|
-
((
|
|
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:
|
|
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(
|
|
769
|
-
onClick: a[9] || (a[9] =
|
|
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),
|
|
808
|
+
r(ce)(l, o.field, C), Xe(C, l, o);
|
|
773
809
|
}
|
|
774
|
-
}, null, 8, ["disabled", "input-id", "model-value", "onUpdate:modelValue"])) :
|
|
775
|
-
((
|
|
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:
|
|
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(
|
|
780
|
-
onClick: a[10] || (a[10] =
|
|
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),
|
|
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"])) :
|
|
787
|
-
(
|
|
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
|
|
829
|
+
var E, H, Ba;
|
|
794
830
|
const C = () => r(ce)(
|
|
795
831
|
l,
|
|
796
832
|
o.field,
|
|
797
|
-
!r(
|
|
833
|
+
!r(F)(l, o.field)
|
|
798
834
|
);
|
|
799
|
-
((
|
|
835
|
+
((E = xe(
|
|
800
836
|
o.preset,
|
|
801
837
|
l[o.field],
|
|
802
838
|
l
|
|
803
|
-
)) == null ? void 0 :
|
|
804
|
-
|
|
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
|
|
812
|
-
return (
|
|
813
|
-
|
|
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(
|
|
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
|
-
|
|
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"])) :
|
|
833
|
-
], 64)) : ((
|
|
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: ((
|
|
836
|
-
}, null, 8, ["attributes"])) : o.editable ? (
|
|
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:
|
|
881
|
+
index: y,
|
|
846
882
|
value: C.target.innerText
|
|
847
883
|
});
|
|
848
884
|
},
|
|
849
885
|
onKeypress: (C) => {
|
|
850
|
-
o.numberInputOnly &&
|
|
886
|
+
o.numberInputOnly && yt(C);
|
|
851
887
|
}
|
|
852
|
-
}),
|
|
853
|
-
o.bodyComponent ? (
|
|
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,
|
|
856
|
-
"onUpdate:modelValue": (C) => o.bodyComponent(l,
|
|
857
|
-
disabled: o.bodyComponent(l,
|
|
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,
|
|
860
|
-
o.bodyComponent(l,
|
|
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
|
|
864
|
-
return (
|
|
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,
|
|
903
|
+
o.bodyComponent(l, y).stop !== !1 && C.stopPropagation();
|
|
868
904
|
},
|
|
869
905
|
"onUpdate:modelValue": (C) => {
|
|
870
|
-
var
|
|
871
|
-
return (
|
|
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"])) : (
|
|
874
|
-
o.bodyTemplate ? (
|
|
875
|
-
|
|
876
|
-
], 64)) : o.dateFormatOptions ? (
|
|
877
|
-
|
|
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(
|
|
915
|
+
r(F)(
|
|
880
916
|
l,
|
|
881
917
|
o.field
|
|
882
918
|
)
|
|
883
919
|
),
|
|
884
920
|
o.dateFormatOptions
|
|
885
921
|
)), 1)
|
|
886
|
-
], 64)) : (
|
|
887
|
-
|
|
922
|
+
], 64)) : (i(), c(_, { key: 2 }, [
|
|
923
|
+
Re(I(r(F)(l, o.field) || "-"), 1)
|
|
888
924
|
], 64))
|
|
889
925
|
]))
|
|
890
|
-
], 64)) : (
|
|
891
|
-
|
|
926
|
+
], 64)) : (i(), c(_, { key: 4 }, [
|
|
927
|
+
Re(I(r(F)(l, o.field) ?? "-"), 1)
|
|
892
928
|
], 64))
|
|
893
|
-
], 16,
|
|
929
|
+
], 16, sl);
|
|
894
930
|
}), 128)),
|
|
895
|
-
|
|
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:
|
|
936
|
+
ref: Va
|
|
901
937
|
},
|
|
902
|
-
(
|
|
938
|
+
(ha = r(u)) == null ? void 0 : ha.rowsingleactioncell({
|
|
903
939
|
props: t,
|
|
904
940
|
context: {
|
|
905
|
-
selected:
|
|
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 && ((
|
|
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
|
-
|
|
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:
|
|
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)) :
|
|
930
|
-
], 16)) :
|
|
965
|
+
], 16)) : h("", !0)
|
|
966
|
+
], 16)) : h("", !0)
|
|
931
967
|
], 64))
|
|
932
|
-
], 16,
|
|
933
|
-
|
|
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,
|
|
973
|
+
], 16, qt))
|
|
938
974
|
];
|
|
939
975
|
}),
|
|
940
976
|
_: 3
|
|
941
977
|
}, 16)
|
|
942
978
|
], 16),
|
|
943
|
-
e.usePaginator ?
|
|
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] = (
|
|
947
|
-
}, r(u).paginator({ context: { totalRecords:
|
|
948
|
-
"rows-per-page-options":
|
|
949
|
-
"total-records":
|
|
950
|
-
onPage:
|
|
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:
|
|
953
|
-
|
|
988
|
+
firstpagelinkicon: ue(() => [
|
|
989
|
+
K(ae, { icon: "round-keyboard-double-arrow-left" })
|
|
954
990
|
]),
|
|
955
|
-
lastpagelinkicon:
|
|
956
|
-
|
|
991
|
+
lastpagelinkicon: ue(() => [
|
|
992
|
+
K(ae, { icon: "round-keyboard-double-arrow-right" })
|
|
957
993
|
]),
|
|
958
|
-
prevpagelinkicon:
|
|
959
|
-
|
|
994
|
+
prevpagelinkicon: ue(() => [
|
|
995
|
+
K(ae, { icon: "round-keyboard-arrow-left" })
|
|
960
996
|
]),
|
|
961
|
-
nextpagelinkicon:
|
|
962
|
-
|
|
997
|
+
nextpagelinkicon: ue(() => [
|
|
998
|
+
K(ae, { icon: "round-keyboard-arrow-right" })
|
|
963
999
|
]),
|
|
964
1000
|
_: 1
|
|
965
1001
|
}, 16, ["rows", "total-records"])), [
|
|
966
|
-
[
|
|
967
|
-
]) :
|
|
968
|
-
|
|
1002
|
+
[Kt, !Ee.value]
|
|
1003
|
+
]) : h("", !0),
|
|
1004
|
+
K(Ut, {
|
|
969
1005
|
id: "single-action-menu",
|
|
970
1006
|
ref_key: "optionMenu",
|
|
971
|
-
ref:
|
|
1007
|
+
ref: Qe,
|
|
972
1008
|
model: e.options,
|
|
973
|
-
onFocus: r(
|
|
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 ? (
|
|
979
|
-
key:
|
|
1014
|
+
t.customColumn ? (i(), S(Mt, {
|
|
1015
|
+
key: je.value,
|
|
980
1016
|
ref_key: "customColumn",
|
|
981
|
-
ref:
|
|
982
|
-
"visible-columns":
|
|
983
|
-
"onUpdate:visibleColumns": a[15] || (a[15] = (
|
|
984
|
-
"default-columns": e.columns.filter((
|
|
985
|
-
"table-id": r(
|
|
986
|
-
}, null, 8, ["visible-columns", "default-columns", "table-id"])) :
|
|
987
|
-
|
|
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
|
-
}),
|
|
1027
|
+
}), Ol = /* @__PURE__ */ Vt(pl, [["__scopeId", "data-v-a2aa5e4c"]]);
|
|
992
1028
|
export {
|
|
993
|
-
|
|
1029
|
+
Ol as D
|
|
994
1030
|
};
|