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