@anzusystems/common-admin 1.47.0-beta.188 → 1.47.0-beta.189
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/dist/labs.js +505 -503
- package/dist/labs.js.map +1 -1
- package/package.json +6 -6
package/dist/labs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { reactive as Pt, defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { g as Ct, n as
|
|
1
|
+
import { reactive as Pt, defineComponent as W, inject as w, computed as I, createBlock as q, openBlock as S, withModifiers as H, mergeProps as De, watch as Y, ref as R, createSlots as Rt, withCtx as F, createVNode as A, unref as N, renderSlot as pe, resolveComponent as je, createElementBlock as L, Fragment as ce, createCommentVNode as se, createTextVNode as Q, toDisplayString as j, normalizeClass as Ve, renderList as ke, createElementVNode as te, toRaw as ra, resolveDynamicComponent as sa, useTemplateRef as xt, nextTick as $e, mergeModels as Ae, useModel as we, onMounted as Et, provide as mt, withDirectives as ia, vShow as ua } from "vue";
|
|
2
|
+
import { useI18n as X } from "vue-i18n";
|
|
3
|
+
import { g as Ct, n as z, d, h as $, q as At, o as Dt, p as _t, v as le, l as Ee, Q as ca, at as oe, bc as $t, ak as Ot, R as Oe, k as Ut, bn as ft, j as Mt, m as be, af as Ft, _ as da, y as Nt, f as yt, b6 as ma, b4 as fa, b3 as va, bo as vt, B as Qe, D as Ge, E as Je, ag as zt, ah as qt, H as Ye, F as ge, aB as Xe, G as Ze, I as et, J as tt, K as at, L as lt, M as ot, N as nt, O as rt, ao as wt, aO as Tt, aP as pa, i as He, z as ya, A as ha, az as ga, ai as ba, ab as Ca, bp as ka } from "./enum-BxNAEttW.js";
|
|
4
4
|
import { VSelect as Lt } from "vuetify/components/VSelect";
|
|
5
5
|
import { VTextField as jt } from "vuetify/components/VTextField";
|
|
6
6
|
import { watchDebounced as Ht, useResizeObserver as Aa, watchThrottled as _a } from "@vueuse/core";
|
|
@@ -23,7 +23,7 @@ import { VMenu as Zt } from "vuetify/components/VMenu";
|
|
|
23
23
|
import { VForm as Sa } from "vuetify/components/VForm";
|
|
24
24
|
import { VSlideYTransition as Ia } from "vuetify/components/transitions";
|
|
25
25
|
import { VBtnToggle as Pa } from "vuetify/components/VBtnToggle";
|
|
26
|
-
const ne = Symbol.for("anzu:FilterDataKey"), Z = Symbol.for("anzu:FilterConfigKey"), ea = Symbol.for("anzu:FilterInnerDataKey"), ta = Symbol.for("anzu:FilterInnerConfigKey"),
|
|
26
|
+
const ne = Symbol.for("anzu:FilterDataKey"), Z = Symbol.for("anzu:FilterConfigKey"), ea = Symbol.for("anzu:FilterInnerDataKey"), ta = Symbol.for("anzu:FilterInnerConfigKey"), ye = Symbol.for("anzu:FilterSubmitResetCounterKey"), de = Symbol.for("anzu:FilterSelectedKey"), me = Symbol.for("anzu:FilterTouchedKey"), st = Symbol.for("anzu:DatatablePaginationKey"), pt = "_sort", Ra = {
|
|
27
27
|
skip: !1,
|
|
28
28
|
xs: 12,
|
|
29
29
|
sm: 6,
|
|
@@ -39,18 +39,18 @@ function xa(f, y, e) {
|
|
|
39
39
|
...h,
|
|
40
40
|
[i]: {
|
|
41
41
|
name: i,
|
|
42
|
-
variant:
|
|
43
|
-
type:
|
|
42
|
+
variant: ve(s.variant, "eq"),
|
|
43
|
+
type: ve(s.type, "custom"),
|
|
44
44
|
titleT: s.titleT ?? (e != null && e.system && (e != null && e.subject) && s.name ? `${e.system}.${e.subject}.filter.${s.name}` : void 0),
|
|
45
|
-
apiName:
|
|
46
|
-
clearable:
|
|
47
|
-
mandatory:
|
|
48
|
-
multiple:
|
|
49
|
-
advanced:
|
|
50
|
-
related:
|
|
51
|
-
exclude:
|
|
45
|
+
apiName: ve(s.apiName, ""),
|
|
46
|
+
clearable: ve(s.clearable, !0),
|
|
47
|
+
mandatory: ve(s.mandatory, !1),
|
|
48
|
+
multiple: z(o),
|
|
49
|
+
advanced: ve(s.advanced, !1),
|
|
50
|
+
related: ve(s.related, void 0),
|
|
51
|
+
exclude: ve(s.exclude, !1),
|
|
52
52
|
default: o,
|
|
53
|
-
render: { ...Ra, ...
|
|
53
|
+
render: { ...Ra, ...ve(s.render, {}) }
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
},
|
|
@@ -69,10 +69,10 @@ function xa(f, y, e) {
|
|
|
69
69
|
filterData: y
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function ve(f, y) {
|
|
73
73
|
return d(f) ? y : f;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function he() {
|
|
76
76
|
const f = (e, c, g) => {
|
|
77
77
|
var b;
|
|
78
78
|
(b = g.fields[e]) != null && b.clearable && (c[e] = Ct(g.fields[e].default));
|
|
@@ -92,15 +92,15 @@ function aa(f, y, e = void 0) {
|
|
|
92
92
|
for (const a in f)
|
|
93
93
|
try {
|
|
94
94
|
const u = a, n = f[u];
|
|
95
|
-
!d(n) &&
|
|
95
|
+
!d(n) && !$(n) && !At(n) && n !== y.fields[u].default && (l[a] = n);
|
|
96
96
|
} catch {
|
|
97
97
|
}
|
|
98
98
|
return l;
|
|
99
99
|
}, b = (l, a, u) => {
|
|
100
100
|
const n = new URLSearchParams();
|
|
101
|
-
for (const
|
|
102
|
-
const T = l[
|
|
103
|
-
d(T) ||
|
|
101
|
+
for (const _ in l) {
|
|
102
|
+
const T = l[_];
|
|
103
|
+
d(T) || $(T) || z(T) && At(T) || Dt(T) && _t(T) || (z(T) ? n.set(_, T.join(",")) : n.set(_, String(T)));
|
|
104
104
|
}
|
|
105
105
|
return n.size === 0 ? "" : (u && a.value.sortBy && n.set(pt, `${a.value.sortBy.key},${a.value.sortBy.order}`), n.toString() + c);
|
|
106
106
|
}, h = (l) => {
|
|
@@ -116,17 +116,17 @@ function aa(f, y, e = void 0) {
|
|
|
116
116
|
}
|
|
117
117
|
const a = new URLSearchParams(l), u = {};
|
|
118
118
|
let n = null;
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
const [T,
|
|
122
|
-
T && (
|
|
119
|
+
const _ = a.get(pt);
|
|
120
|
+
if (_) {
|
|
121
|
+
const [T, M] = _.split(",");
|
|
122
|
+
T && (M === "asc" || M === "desc") && (n = { key: T, order: M }), a.delete(pt);
|
|
123
123
|
}
|
|
124
|
-
for (const [T,
|
|
124
|
+
for (const [T, M] of a.entries())
|
|
125
125
|
if (y.fields[T].multiple ?? !1) {
|
|
126
|
-
const
|
|
127
|
-
u[T] =
|
|
126
|
+
const U = M.split(","), P = U.every((K) => !isNaN(Number(K)));
|
|
127
|
+
u[T] = P ? U.map(Number) : U;
|
|
128
128
|
} else
|
|
129
|
-
u[T] =
|
|
129
|
+
u[T] = M;
|
|
130
130
|
return { filters: u, sortBy: n };
|
|
131
131
|
}, s = (l) => {
|
|
132
132
|
window.location.hash = l;
|
|
@@ -140,7 +140,7 @@ function aa(f, y, e = void 0) {
|
|
|
140
140
|
return {
|
|
141
141
|
loadStoredFilters: () => {
|
|
142
142
|
let l = i();
|
|
143
|
-
if (
|
|
143
|
+
if ($(l) && (l = v()), $(l) || _t(l.filters)) return !1;
|
|
144
144
|
for (const a in f) {
|
|
145
145
|
const u = a, n = l.filters[u];
|
|
146
146
|
d(n) || (f[u] = n);
|
|
@@ -158,7 +158,7 @@ function aa(f, y, e = void 0) {
|
|
|
158
158
|
deserializeFilters: h
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
const Ea = /* @__PURE__ */
|
|
161
|
+
const Ea = /* @__PURE__ */ W({
|
|
162
162
|
__name: "AFilterBooleanSelect",
|
|
163
163
|
props: {
|
|
164
164
|
name: {},
|
|
@@ -169,27 +169,27 @@ const Ea = /* @__PURE__ */ K({
|
|
|
169
169
|
},
|
|
170
170
|
emits: ["change"],
|
|
171
171
|
setup(f, { emit: y }) {
|
|
172
|
-
const e = f, c = y, g = w(
|
|
172
|
+
const e = f, c = y, g = w(ye), b = w(me), h = w(de), s = w(Z), i = w(ne);
|
|
173
173
|
if (d(g) || d(b) || d(h) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
174
174
|
d(s.fields[e.name]) || d(i) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
175
175
|
d(i[e.name]))
|
|
176
176
|
throw new Error("Incorrect provide/inject config.");
|
|
177
177
|
const o = I({
|
|
178
178
|
get() {
|
|
179
|
-
return d(i[e.name]) ||
|
|
179
|
+
return d(i[e.name]) || $(i[e.name]) ? {
|
|
180
180
|
value: -1,
|
|
181
181
|
title: t(e.allT)
|
|
182
182
|
} : i[e.name] ? { value: 1, title: t(e.trueT) } : { value: 0, title: t(e.falseT) };
|
|
183
183
|
},
|
|
184
184
|
set(n) {
|
|
185
|
-
let
|
|
186
|
-
(n == null ? void 0 : n.value) === 1 && (
|
|
185
|
+
let _ = null;
|
|
186
|
+
(n == null ? void 0 : n.value) === 1 && (_ = !0), (n == null ? void 0 : n.value) === 0 && (_ = !1), i[e.name] = _, u(), b.value = !0, c("change");
|
|
187
187
|
}
|
|
188
|
-
}), v = I(() => s.fields[e.name]), { t } =
|
|
188
|
+
}), v = I(() => s.fields[e.name]), { t } = X(), r = I(() => v.value.titleT ? t(v.value.titleT) : void 0), m = I(() => [
|
|
189
189
|
{ value: -1, title: t(e.allT) },
|
|
190
190
|
{ value: 1, title: t(e.trueT) },
|
|
191
191
|
{ value: 0, title: t(e.falseT) }
|
|
192
|
-
]), { clearOne: l } =
|
|
192
|
+
]), { clearOne: l } = he(), a = () => {
|
|
193
193
|
l(e.name, i, s), h.value.delete(e.name);
|
|
194
194
|
}, u = () => {
|
|
195
195
|
if (o.value.value === -1) {
|
|
@@ -198,9 +198,9 @@ const Ea = /* @__PURE__ */ K({
|
|
|
198
198
|
}
|
|
199
199
|
h.value.set(e.name, [{ title: o.value.title, value: o.value.value }]);
|
|
200
200
|
};
|
|
201
|
-
return (n,
|
|
201
|
+
return (n, _) => (S(), q(Lt, {
|
|
202
202
|
modelValue: o.value,
|
|
203
|
-
"onUpdate:modelValue":
|
|
203
|
+
"onUpdate:modelValue": _[0] || (_[0] = (T) => o.value = T),
|
|
204
204
|
"data-cy": n.dataCy,
|
|
205
205
|
label: r.value,
|
|
206
206
|
items: m.value,
|
|
@@ -210,7 +210,7 @@ const Ea = /* @__PURE__ */ K({
|
|
|
210
210
|
"onClick:clear": H(a, ["stop"])
|
|
211
211
|
}, null, 8, ["modelValue", "data-cy", "label", "items", "clearable"]));
|
|
212
212
|
}
|
|
213
|
-
}), Da = /* @__PURE__ */
|
|
213
|
+
}), Da = /* @__PURE__ */ W({
|
|
214
214
|
__name: "AFilterDatetimePicker",
|
|
215
215
|
props: {
|
|
216
216
|
name: {},
|
|
@@ -218,7 +218,7 @@ const Ea = /* @__PURE__ */ K({
|
|
|
218
218
|
},
|
|
219
219
|
emits: ["change"],
|
|
220
220
|
setup(f, { emit: y }) {
|
|
221
|
-
const e = f, c = y, g = w(
|
|
221
|
+
const e = f, c = y, g = w(ye), b = w(me), h = w(de), s = w(Z), i = w(ne);
|
|
222
222
|
if (d(g) || d(b) || d(h) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
223
223
|
d(s.fields[e.name]) || d(i) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
224
224
|
d(i[e.name]))
|
|
@@ -230,21 +230,21 @@ const Ea = /* @__PURE__ */ K({
|
|
|
230
230
|
set(u) {
|
|
231
231
|
i[e.name] = u, a(), b.value = !0, c("change");
|
|
232
232
|
}
|
|
233
|
-
}), { t: v } =
|
|
233
|
+
}), { t: v } = X(), t = I(() => s.fields[e.name]), r = I(() => t.value.titleT ? v(t.value.titleT) : void 0), { clearOne: m } = he(), l = () => {
|
|
234
234
|
m(e.name, i, s), h.value.delete(e.name);
|
|
235
235
|
}, a = () => {
|
|
236
236
|
!le(o.value) || le(o.value) && o.value.length === 0 || h.value.set(e.name, [{ title: Ee(o.value), value: o.value }]);
|
|
237
237
|
};
|
|
238
|
-
return (u, n) => (S(),
|
|
238
|
+
return (u, n) => (S(), q(ca, De({
|
|
239
239
|
modelValue: o.value,
|
|
240
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
240
|
+
"onUpdate:modelValue": n[0] || (n[0] = (_) => o.value = _),
|
|
241
241
|
"data-cy": u.dataCy,
|
|
242
242
|
clearable: !t.value.mandatory,
|
|
243
243
|
"default-value": t.value.default,
|
|
244
244
|
label: r.value
|
|
245
245
|
}, u.$attrs, { onAfterClear: l }), null, 16, ["modelValue", "data-cy", "clearable", "default-value", "label"]));
|
|
246
246
|
}
|
|
247
|
-
}), $a = /* @__PURE__ */
|
|
247
|
+
}), $a = /* @__PURE__ */ W({
|
|
248
248
|
__name: "AFilterInteger",
|
|
249
249
|
props: {
|
|
250
250
|
name: {},
|
|
@@ -253,7 +253,7 @@ const Ea = /* @__PURE__ */ K({
|
|
|
253
253
|
},
|
|
254
254
|
emits: ["change"],
|
|
255
255
|
setup(f, { emit: y }) {
|
|
256
|
-
const e = f, c = y, g = w(
|
|
256
|
+
const e = f, c = y, g = w(ye), b = w(me), h = w(de), s = w(Z), i = w(ne);
|
|
257
257
|
if (d(g) || d(b) || d(h) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
258
258
|
d(s.fields[e.name]) || d(i) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
259
259
|
d(i[e.name]))
|
|
@@ -265,20 +265,20 @@ const Ea = /* @__PURE__ */ K({
|
|
|
265
265
|
set(n) {
|
|
266
266
|
i[e.name] = n, b.value = !0, c("change");
|
|
267
267
|
}
|
|
268
|
-
}), v = I(() => s.fields[e.name]), { t } =
|
|
268
|
+
}), v = I(() => s.fields[e.name]), { t } = X(), r = I(() => v.value.titleT ? t(v.value.titleT) : void 0), m = I(() => d(e.placeholder) ? v.value.variant === "startsWith" ? t("common.model.filterPlaceholder.startsWith") : v.value.variant === "eq" ? t("common.model.filterPlaceholder.eq") : v.value.variant === "contains" || v.value.variant === "search" ? t("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: l } = he(), a = () => {
|
|
269
269
|
l(e.name, i, s), h.value.delete(e.name);
|
|
270
270
|
}, u = () => {
|
|
271
271
|
!le(o.value) || le(o.value) && o.value.length === 0 || h.value.set(e.name, [{ title: o.value, value: o.value }]);
|
|
272
272
|
};
|
|
273
|
-
return
|
|
273
|
+
return Y(
|
|
274
274
|
() => i[e.name],
|
|
275
|
-
(n,
|
|
276
|
-
n ===
|
|
275
|
+
(n, _) => {
|
|
276
|
+
n === _ || oe(n) || $(n) || d(n) || z(n) && n.length === 0 || u();
|
|
277
277
|
},
|
|
278
278
|
{ immediate: !0 }
|
|
279
|
-
), (n,
|
|
279
|
+
), (n, _) => (S(), q(jt, {
|
|
280
280
|
modelValue: o.value,
|
|
281
|
-
"onUpdate:modelValue":
|
|
281
|
+
"onUpdate:modelValue": _[0] || (_[0] = (T) => o.value = T),
|
|
282
282
|
label: r.value,
|
|
283
283
|
placeholder: m.value,
|
|
284
284
|
clearable: !v.value.mandatory,
|
|
@@ -290,7 +290,7 @@ const Ea = /* @__PURE__ */ K({
|
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
292
|
function Ne(f = null) {
|
|
293
|
-
return
|
|
293
|
+
return R({
|
|
294
294
|
sortBy: f,
|
|
295
295
|
page: 1,
|
|
296
296
|
rowsPerPage: 25,
|
|
@@ -300,7 +300,7 @@ function Ne(f = null) {
|
|
|
300
300
|
totalCount: 0
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
-
const Wl = /* @__PURE__ */
|
|
303
|
+
const Wl = /* @__PURE__ */ W({
|
|
304
304
|
__name: "AFilterRemoteAutocomplete",
|
|
305
305
|
props: {
|
|
306
306
|
name: {},
|
|
@@ -313,43 +313,43 @@ const Wl = /* @__PURE__ */ K({
|
|
|
313
313
|
},
|
|
314
314
|
emits: ["change"],
|
|
315
315
|
setup(f, { emit: y }) {
|
|
316
|
-
const e = f, c = y, g = w(
|
|
316
|
+
const e = f, c = y, g = w(ye), b = w(me), h = w(de), s = w(Z), i = w(ne), o = w(ta), v = w(ea);
|
|
317
317
|
if (d(g) || d(b) || d(h) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
318
318
|
d(s.fields[e.name]) || d(i) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
319
319
|
d(i[e.name]) || d(o) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
320
320
|
d(o.fields[e.filterByField]) || d(v) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
321
321
|
d(v[e.filterByField]))
|
|
322
322
|
throw new Error("Incorrect provide/inject config.");
|
|
323
|
-
const t =
|
|
323
|
+
const t = R([]), r = R(""), m = R(!1), l = R(void 0), a = R(0), { t: u } = X(), n = I(() => s.fields[e.name]), _ = () => {
|
|
324
324
|
m.value = !0;
|
|
325
|
-
}, T = I(() => n.value.titleT ? u(n.value.titleT) : void 0),
|
|
325
|
+
}, T = I(() => n.value.titleT ? u(n.value.titleT) : void 0), M = Ne(e.filterSortBy), x = R([]), B = R([]), U = I(() => {
|
|
326
326
|
const p = /* @__PURE__ */ new Map();
|
|
327
327
|
return B.value.forEach((C) => {
|
|
328
328
|
p.set(C.value, { value: C.value, title: C.title, subtitle: C.subtitle });
|
|
329
|
-
}),
|
|
329
|
+
}), x.value.forEach((C) => {
|
|
330
330
|
p.set(C.value, { value: C.value, title: C.title, subtitle: C.subtitle });
|
|
331
331
|
}), Array.from(p, ([C, k]) => ({ value: C, title: k.title, subtitle: k.subtitle }));
|
|
332
|
-
}),
|
|
333
|
-
|
|
334
|
-
const k = await e.fetchItems(
|
|
335
|
-
C === a.value && (
|
|
336
|
-
},
|
|
337
|
-
const C =
|
|
332
|
+
}), P = R(!1), K = async (p, C) => {
|
|
333
|
+
P.value = !0, v[e.filterByField] = p;
|
|
334
|
+
const k = await e.fetchItems(M, v, o);
|
|
335
|
+
C === a.value && (x.value = k), P.value = !1;
|
|
336
|
+
}, G = (p) => {
|
|
337
|
+
const C = U.value.filter((k) => p.includes(k.value));
|
|
338
338
|
return [].concat(C);
|
|
339
|
-
},
|
|
339
|
+
}, ue = async (p) => {
|
|
340
340
|
let C = 1, k = [];
|
|
341
|
-
return
|
|
342
|
-
},
|
|
341
|
+
return z(p) ? (C = p.length, k = G(p)) : k = G([p]), B.value = k, k.length === C;
|
|
342
|
+
}, E = R(!1), O = () => {
|
|
343
343
|
clearTimeout(l.value), l.value = void 0;
|
|
344
|
-
},
|
|
345
|
-
if (
|
|
346
|
-
|
|
347
|
-
const p = await e.fetchItems(
|
|
348
|
-
a.value === 0 && (
|
|
349
|
-
},
|
|
350
|
-
m.value = !0,
|
|
344
|
+
}, J = async () => {
|
|
345
|
+
if (O(), E.value === !0) return;
|
|
346
|
+
E.value = !0, P.value = !0;
|
|
347
|
+
const p = await e.fetchItems(M, v, o);
|
|
348
|
+
a.value === 0 && (x.value = p), P.value = !1;
|
|
349
|
+
}, fe = () => {
|
|
350
|
+
m.value = !0, O(), J();
|
|
351
351
|
}, ee = () => {
|
|
352
|
-
e.prefetch !== "focus" && (
|
|
352
|
+
e.prefetch !== "focus" && (O(), J());
|
|
353
353
|
}, Te = I(() => {
|
|
354
354
|
if (!n.value.multiple && B.value[0])
|
|
355
355
|
return B.value[0].title;
|
|
@@ -358,17 +358,17 @@ const Wl = /* @__PURE__ */ K({
|
|
|
358
358
|
}, Se = (p) => {
|
|
359
359
|
b.value = !0;
|
|
360
360
|
let C = null;
|
|
361
|
-
|
|
361
|
+
z(p) ? C = p.map((k) => k.value) : $(p) || (C = p.value), i[e.name] = C, b.value = !0, c("change");
|
|
362
362
|
}, Ie = async () => {
|
|
363
|
-
|
|
364
|
-
}, _e = I(() => d(e.placeholder) ? n.value.variant === "startsWith" ? u("common.model.filterPlaceholder.startsWith") : n.value.variant === "eq" ? u("common.model.filterPlaceholder.eq") : n.value.variant === "contains" || n.value.variant === "search" ? u("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: Pe } =
|
|
363
|
+
x.value = await e.fetchItems(M, v, o), Re();
|
|
364
|
+
}, _e = I(() => d(e.placeholder) ? n.value.variant === "startsWith" ? u("common.model.filterPlaceholder.startsWith") : n.value.variant === "eq" ? u("common.model.filterPlaceholder.eq") : n.value.variant === "contains" || n.value.variant === "search" ? u("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: Pe } = he(), Re = () => {
|
|
365
365
|
Pe(e.name, i, s), h.value.delete(e.name);
|
|
366
366
|
}, re = (p) => {
|
|
367
|
-
if (h.value.delete(e.name),
|
|
367
|
+
if (h.value.delete(e.name), z(p) && p.length === 0 || $(p)) {
|
|
368
368
|
h.value.delete(e.name);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
|
-
if (
|
|
371
|
+
if (z(p)) {
|
|
372
372
|
h.value.set(
|
|
373
373
|
e.name,
|
|
374
374
|
p.map((C) => ({ title: C.title, value: C.value }))
|
|
@@ -377,76 +377,76 @@ const Wl = /* @__PURE__ */ K({
|
|
|
377
377
|
}
|
|
378
378
|
h.value.set(e.name, [{ title: p.title, value: p.value }]);
|
|
379
379
|
};
|
|
380
|
-
return
|
|
380
|
+
return Y(
|
|
381
381
|
() => i[e.name],
|
|
382
382
|
async (p, C) => {
|
|
383
383
|
if (p === C || oe(p)) return;
|
|
384
|
-
if (
|
|
385
|
-
if (B.value = [], n.value.multiple ? t.value = [] : t.value = null,
|
|
384
|
+
if ($(p) || d(p) || z(p) && p.length === 0) {
|
|
385
|
+
if (B.value = [], n.value.multiple ? t.value = [] : t.value = null, E.value === !0 || $t(e.prefetch, ["hover", "focus"])) return;
|
|
386
386
|
l.value = setTimeout(() => {
|
|
387
|
-
|
|
387
|
+
J();
|
|
388
388
|
}, 3e3);
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
if (await
|
|
392
|
-
t.value = B.value.map((
|
|
391
|
+
if (await ue(p)) {
|
|
392
|
+
t.value = B.value.map((D) => ({ title: D.title, value: D.value })), re(t.value);
|
|
393
393
|
return;
|
|
394
394
|
}
|
|
395
|
-
if (
|
|
396
|
-
|
|
395
|
+
if (z(p)) {
|
|
396
|
+
P.value = !0, B.value = await e.fetchItemsByIds(p), t.value = B.value.map((D) => ({ title: D.title, value: D.value })), re(t.value), P.value = !1;
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
|
-
|
|
399
|
+
P.value = !0, B.value = await e.fetchItemsByIds([p]), t.value = B.value.map((D) => ({ title: D.title, value: D.value }))[0], re(t.value), P.value = !1;
|
|
400
400
|
},
|
|
401
401
|
{ immediate: !0 }
|
|
402
402
|
), Ht(
|
|
403
403
|
r,
|
|
404
404
|
(p, C) => {
|
|
405
|
-
a.value++, p !== C && (a.value++,
|
|
405
|
+
a.value++, p !== C && (a.value++, K(p, a.value));
|
|
406
406
|
},
|
|
407
407
|
{ debounce: 300 }
|
|
408
|
-
), (p, C) => (S(),
|
|
408
|
+
), (p, C) => (S(), q(kt, {
|
|
409
409
|
modelValue: t.value,
|
|
410
410
|
"onUpdate:modelValue": [
|
|
411
411
|
C[0] || (C[0] = (k) => t.value = k),
|
|
412
412
|
Se
|
|
413
413
|
],
|
|
414
|
-
items:
|
|
414
|
+
items: U.value,
|
|
415
415
|
"no-filter": "",
|
|
416
416
|
placeholder: _e.value,
|
|
417
417
|
multiple: n.value.multiple,
|
|
418
418
|
clearable: !n.value.mandatory,
|
|
419
419
|
label: T.value,
|
|
420
420
|
chips: n.value.multiple,
|
|
421
|
-
loading:
|
|
421
|
+
loading: P.value,
|
|
422
422
|
"hide-details": "",
|
|
423
423
|
"return-object": "",
|
|
424
424
|
"onUpdate:search": Be,
|
|
425
|
-
onBlur:
|
|
426
|
-
onFocus:
|
|
425
|
+
onBlur: _,
|
|
426
|
+
onFocus: fe,
|
|
427
427
|
onMouseenter: ee,
|
|
428
428
|
"onClick:clear": Ie
|
|
429
429
|
}, Rt({
|
|
430
|
-
item: F(({ props: k, item:
|
|
431
|
-
|
|
432
|
-
title:
|
|
433
|
-
subtitle:
|
|
430
|
+
item: F(({ props: k, item: D }) => [
|
|
431
|
+
A(Ue, De(k, {
|
|
432
|
+
title: D.raw.title,
|
|
433
|
+
subtitle: D.raw.subtitle
|
|
434
434
|
}), null, 16, ["title", "subtitle"])
|
|
435
435
|
]),
|
|
436
436
|
_: 2
|
|
437
437
|
}, [
|
|
438
|
-
|
|
438
|
+
P.value ? {
|
|
439
439
|
name: "no-data",
|
|
440
440
|
fn: F(() => [
|
|
441
|
-
|
|
442
|
-
title:
|
|
441
|
+
A(Ue, {
|
|
442
|
+
title: N(u)("$vuetify.loading")
|
|
443
443
|
}, null, 8, ["title"])
|
|
444
444
|
]),
|
|
445
445
|
key: "0"
|
|
446
446
|
} : void 0
|
|
447
447
|
]), 1032, ["modelValue", "items", "placeholder", "multiple", "clearable", "label", "chips", "loading"]));
|
|
448
448
|
}
|
|
449
|
-
}), Vl = /* @__PURE__ */
|
|
449
|
+
}), Vl = /* @__PURE__ */ W({
|
|
450
450
|
__name: "AFilterRemoteAutocompleteWithMinimal",
|
|
451
451
|
props: {
|
|
452
452
|
name: {},
|
|
@@ -461,43 +461,43 @@ const Wl = /* @__PURE__ */ K({
|
|
|
461
461
|
},
|
|
462
462
|
emits: ["change"],
|
|
463
463
|
setup(f, { emit: y }) {
|
|
464
|
-
const e = f, c = y, g = w(
|
|
464
|
+
const e = f, c = y, g = w(ye), b = w(me), h = w(de), s = w(Z), i = w(ne), o = w(ta), v = w(ea);
|
|
465
465
|
if (d(g) || d(b) || d(h) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
466
466
|
d(s.fields[e.name]) || d(i) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
467
467
|
d(i[e.name]) || d(o) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
468
468
|
d(o.fields[e.filterByField]) || d(v) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
469
469
|
d(v[e.filterByField]))
|
|
470
470
|
throw new Error("Incorrect provide/inject config.");
|
|
471
|
-
const t =
|
|
471
|
+
const t = R([]), r = R(""), m = R(!1), l = R(void 0), a = R(0), { t: u } = X(), n = I(() => s.fields[e.name]), _ = () => {
|
|
472
472
|
m.value = !0;
|
|
473
|
-
}, T = I(() => n.value.titleT ? u(n.value.titleT) : void 0),
|
|
473
|
+
}, T = I(() => n.value.titleT ? u(n.value.titleT) : void 0), M = Ne(e.filterSortBy), x = R([]), B = R([]), U = I(() => {
|
|
474
474
|
const p = /* @__PURE__ */ new Map();
|
|
475
475
|
return B.value.forEach((C) => {
|
|
476
476
|
p.set(C.value, { value: C.value, title: C.title, subtitle: C.subtitle });
|
|
477
|
-
}),
|
|
477
|
+
}), x.value.forEach((C) => {
|
|
478
478
|
p.set(C.value, { value: C.value, title: C.title, subtitle: C.subtitle });
|
|
479
479
|
}), Array.from(p, ([C, k]) => ({ value: C, title: k.title, subtitle: k.subtitle }));
|
|
480
|
-
}),
|
|
481
|
-
|
|
482
|
-
const k = await e.fetchItemsMinimal(
|
|
483
|
-
C === a.value && (
|
|
484
|
-
},
|
|
485
|
-
const C =
|
|
480
|
+
}), P = R(!1), K = async (p, C) => {
|
|
481
|
+
P.value = !0, v[e.filterByField] = p;
|
|
482
|
+
const k = await e.fetchItemsMinimal(M, v, o);
|
|
483
|
+
C === a.value && (x.value = k), P.value = !1;
|
|
484
|
+
}, G = (p) => {
|
|
485
|
+
const C = U.value.filter((k) => p.includes(k.value));
|
|
486
486
|
return [].concat(C);
|
|
487
|
-
},
|
|
487
|
+
}, ue = async (p) => {
|
|
488
488
|
let C = 1, k = [];
|
|
489
|
-
return
|
|
490
|
-
},
|
|
489
|
+
return z(p) ? (C = p.length, k = G(p)) : k = G([p]), B.value = k, k.length === C;
|
|
490
|
+
}, E = R(!1), O = () => {
|
|
491
491
|
clearTimeout(l.value), l.value = void 0;
|
|
492
|
-
},
|
|
493
|
-
if (
|
|
494
|
-
|
|
495
|
-
const p = await e.fetchItemsMinimal(
|
|
496
|
-
a.value === 0 && (
|
|
497
|
-
},
|
|
498
|
-
m.value = !0,
|
|
492
|
+
}, J = async () => {
|
|
493
|
+
if (O(), E.value === !0) return;
|
|
494
|
+
E.value = !0, P.value = !0;
|
|
495
|
+
const p = await e.fetchItemsMinimal(M, v, o);
|
|
496
|
+
a.value === 0 && (x.value = p), P.value = !1;
|
|
497
|
+
}, fe = () => {
|
|
498
|
+
m.value = !0, O(), J();
|
|
499
499
|
}, ee = () => {
|
|
500
|
-
e.prefetch !== "focus" && (
|
|
500
|
+
e.prefetch !== "focus" && (O(), J());
|
|
501
501
|
}, Te = I(() => {
|
|
502
502
|
if (!n.value.multiple && B.value[0])
|
|
503
503
|
return B.value[0].title;
|
|
@@ -506,17 +506,17 @@ const Wl = /* @__PURE__ */ K({
|
|
|
506
506
|
}, Se = (p) => {
|
|
507
507
|
b.value = !0;
|
|
508
508
|
let C = null;
|
|
509
|
-
|
|
509
|
+
z(p) ? C = p.map((k) => k.value) : $(p) || (C = p.value), i[e.name] = C, b.value = !0, c("change");
|
|
510
510
|
}, Ie = async () => {
|
|
511
|
-
|
|
512
|
-
}, _e = I(() => d(e.placeholder) ? n.value.variant === "startsWith" ? u("common.model.filterPlaceholder.startsWith") : n.value.variant === "eq" ? u("common.model.filterPlaceholder.eq") : n.value.variant === "contains" || n.value.variant === "search" ? u("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: Pe } =
|
|
511
|
+
x.value = await e.fetchItemsMinimal(M, v, o), Re();
|
|
512
|
+
}, _e = I(() => d(e.placeholder) ? n.value.variant === "startsWith" ? u("common.model.filterPlaceholder.startsWith") : n.value.variant === "eq" ? u("common.model.filterPlaceholder.eq") : n.value.variant === "contains" || n.value.variant === "search" ? u("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: Pe } = he(), Re = () => {
|
|
513
513
|
Pe(e.name, i, s), h.value.delete(e.name);
|
|
514
514
|
}, re = (p) => {
|
|
515
|
-
if (h.value.delete(e.name),
|
|
515
|
+
if (h.value.delete(e.name), z(p) && p.length === 0 || $(p)) {
|
|
516
516
|
h.value.delete(e.name);
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
|
-
if (
|
|
519
|
+
if (z(p)) {
|
|
520
520
|
h.value.set(
|
|
521
521
|
e.name,
|
|
522
522
|
p.map((C) => ({ title: C.title, value: C.value }))
|
|
@@ -525,81 +525,81 @@ const Wl = /* @__PURE__ */ K({
|
|
|
525
525
|
}
|
|
526
526
|
h.value.set(e.name, [{ title: p.title, value: p.value }]);
|
|
527
527
|
};
|
|
528
|
-
return
|
|
528
|
+
return Y(
|
|
529
529
|
() => i[e.name],
|
|
530
530
|
async (p, C) => {
|
|
531
531
|
if (p === C || oe(p)) return;
|
|
532
|
-
if (
|
|
533
|
-
if (B.value = [], n.value.multiple ? t.value = [] : t.value = null,
|
|
532
|
+
if ($(p) || d(p) || z(p) && p.length === 0) {
|
|
533
|
+
if (B.value = [], n.value.multiple ? t.value = [] : t.value = null, E.value === !0 || $t(e.prefetch, ["hover", "focus"])) return;
|
|
534
534
|
l.value = setTimeout(() => {
|
|
535
|
-
|
|
535
|
+
J();
|
|
536
536
|
}, 3e3);
|
|
537
537
|
return;
|
|
538
538
|
}
|
|
539
|
-
if (await
|
|
540
|
-
t.value = B.value.map((
|
|
539
|
+
if (await ue(p)) {
|
|
540
|
+
t.value = B.value.map((D) => ({ title: D.title, value: D.value })), re(t.value);
|
|
541
541
|
return;
|
|
542
542
|
}
|
|
543
|
-
if (
|
|
544
|
-
|
|
543
|
+
if (z(p)) {
|
|
544
|
+
P.value = !0, B.value = await e.fetchItemsMinimalByIds(p), t.value = B.value.map((D) => ({ title: D.title, value: D.value })), re(t.value), P.value = !1;
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
|
-
|
|
547
|
+
P.value = !0, B.value = await e.fetchItemsMinimalByIds([p]), t.value = B.value.map((D) => ({ title: D.title, value: D.value }))[0], re(t.value), P.value = !1;
|
|
548
548
|
},
|
|
549
549
|
{ immediate: !0 }
|
|
550
550
|
), Ht(
|
|
551
551
|
r,
|
|
552
552
|
(p, C) => {
|
|
553
|
-
a.value++, p !== C && (a.value++,
|
|
553
|
+
a.value++, p !== C && (a.value++, K(p, a.value));
|
|
554
554
|
},
|
|
555
555
|
{ debounce: 300 }
|
|
556
|
-
), (p, C) => (S(),
|
|
556
|
+
), (p, C) => (S(), q(kt, {
|
|
557
557
|
modelValue: t.value,
|
|
558
558
|
"onUpdate:modelValue": [
|
|
559
559
|
C[0] || (C[0] = (k) => t.value = k),
|
|
560
560
|
Se
|
|
561
561
|
],
|
|
562
|
-
items:
|
|
562
|
+
items: U.value,
|
|
563
563
|
"no-filter": "",
|
|
564
564
|
placeholder: _e.value,
|
|
565
565
|
multiple: n.value.multiple,
|
|
566
566
|
clearable: !n.value.mandatory,
|
|
567
567
|
label: T.value,
|
|
568
568
|
chips: n.value.multiple,
|
|
569
|
-
loading:
|
|
569
|
+
loading: P.value,
|
|
570
570
|
"hide-details": "",
|
|
571
571
|
"return-object": "",
|
|
572
572
|
"onUpdate:search": Be,
|
|
573
|
-
onBlur:
|
|
574
|
-
onFocus:
|
|
573
|
+
onBlur: _,
|
|
574
|
+
onFocus: fe,
|
|
575
575
|
onMouseenter: ee,
|
|
576
576
|
"onClick:clear": Ie
|
|
577
577
|
}, {
|
|
578
|
-
item: F(({ props: k, item:
|
|
579
|
-
|
|
580
|
-
item:
|
|
578
|
+
item: F(({ props: k, item: D }) => [
|
|
579
|
+
pe(p.$slots, "item", {
|
|
580
|
+
item: D,
|
|
581
581
|
props: k
|
|
582
582
|
}, () => [
|
|
583
|
-
|
|
584
|
-
title:
|
|
585
|
-
subtitle:
|
|
583
|
+
A(Ue, De(k, {
|
|
584
|
+
title: D.raw.title,
|
|
585
|
+
subtitle: D.raw.subtitle
|
|
586
586
|
}), null, 16, ["title", "subtitle"])
|
|
587
587
|
])
|
|
588
588
|
]),
|
|
589
|
-
chip: F(({ props: k, item:
|
|
590
|
-
|
|
589
|
+
chip: F(({ props: k, item: D }) => [
|
|
590
|
+
pe(p.$slots, "chip", {
|
|
591
591
|
props: k,
|
|
592
|
-
item:
|
|
592
|
+
item: D
|
|
593
593
|
}, () => [
|
|
594
|
-
|
|
595
|
-
text:
|
|
594
|
+
A(Vt, De(k, {
|
|
595
|
+
text: D.title
|
|
596
596
|
}), null, 16, ["text"])
|
|
597
597
|
])
|
|
598
598
|
]),
|
|
599
599
|
_: 3
|
|
600
600
|
}, 8, ["modelValue", "items", "placeholder", "multiple", "clearable", "label", "chips", "loading"]));
|
|
601
601
|
}
|
|
602
|
-
}), Oa = /* @__PURE__ */
|
|
602
|
+
}), Oa = /* @__PURE__ */ W({
|
|
603
603
|
__name: "AFilterString",
|
|
604
604
|
props: {
|
|
605
605
|
name: {},
|
|
@@ -608,7 +608,7 @@ const Wl = /* @__PURE__ */ K({
|
|
|
608
608
|
},
|
|
609
609
|
emits: ["change"],
|
|
610
610
|
setup(f, { emit: y }) {
|
|
611
|
-
const e = f, c = y, g = w(
|
|
611
|
+
const e = f, c = y, g = w(ye), b = w(me), h = w(de), s = w(Z), i = w(ne);
|
|
612
612
|
if (d(g) || d(b) || d(h) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
613
613
|
d(s.fields[e.name]) || d(i) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
614
614
|
d(i[e.name]))
|
|
@@ -620,20 +620,20 @@ const Wl = /* @__PURE__ */ K({
|
|
|
620
620
|
set(n) {
|
|
621
621
|
i[e.name] = n, b.value = !0, c("change");
|
|
622
622
|
}
|
|
623
|
-
}), v = I(() => s.fields[e.name]), { t } =
|
|
623
|
+
}), v = I(() => s.fields[e.name]), { t } = X(), r = I(() => v.value.titleT ? t(v.value.titleT) : void 0), m = I(() => d(e.placeholder) ? v.value.variant === "startsWith" ? t("common.model.filterPlaceholder.startsWith") : v.value.variant === "eq" ? t("common.model.filterPlaceholder.eq") : v.value.variant === "contains" || v.value.variant === "search" ? t("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: l } = he(), a = () => {
|
|
624
624
|
l(e.name, i, s), h.value.delete(e.name);
|
|
625
625
|
}, u = () => {
|
|
626
626
|
!le(o.value) || le(o.value) && o.value.length === 0 || h.value.set(e.name, [{ title: o.value, value: o.value }]);
|
|
627
627
|
};
|
|
628
|
-
return
|
|
628
|
+
return Y(
|
|
629
629
|
() => i[e.name],
|
|
630
|
-
(n,
|
|
631
|
-
n ===
|
|
630
|
+
(n, _) => {
|
|
631
|
+
n === _ || oe(n) || $(n) || d(n) || z(n) && n.length === 0 || u();
|
|
632
632
|
},
|
|
633
633
|
{ immediate: !0 }
|
|
634
|
-
), (n,
|
|
634
|
+
), (n, _) => (S(), q(jt, {
|
|
635
635
|
modelValue: o.value,
|
|
636
|
-
"onUpdate:modelValue":
|
|
636
|
+
"onUpdate:modelValue": _[0] || (_[0] = (T) => o.value = T),
|
|
637
637
|
label: r.value,
|
|
638
638
|
placeholder: m.value,
|
|
639
639
|
clearable: !v.value.mandatory,
|
|
@@ -650,7 +650,7 @@ const Wl = /* @__PURE__ */ K({
|
|
|
650
650
|
Custom: "custom"
|
|
651
651
|
};
|
|
652
652
|
function Ua(f = void 0) {
|
|
653
|
-
const { t: y } =
|
|
653
|
+
const { t: y } = X(), e = I(() => {
|
|
654
654
|
const g = [
|
|
655
655
|
{
|
|
656
656
|
value: null,
|
|
@@ -689,7 +689,7 @@ function Ua(f = void 0) {
|
|
|
689
689
|
title: "Vlastné"
|
|
690
690
|
}
|
|
691
691
|
];
|
|
692
|
-
return d(f) ? g : g.filter((b) => f.includes(b.value) ||
|
|
692
|
+
return d(f) ? g : g.filter((b) => f.includes(b.value) || $(b.value));
|
|
693
693
|
});
|
|
694
694
|
return {
|
|
695
695
|
timeIntervalOptions: e,
|
|
@@ -713,7 +713,7 @@ function Ma(f) {
|
|
|
713
713
|
v$: ht(b, { dialogData: f }, { $scope: "AFilterTimeIntervalScope" })
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
|
-
const Na = /* @__PURE__ */
|
|
716
|
+
const Na = /* @__PURE__ */ W({
|
|
717
717
|
__name: "AFilterTimeInterval",
|
|
718
718
|
props: {
|
|
719
719
|
nameFrom: {},
|
|
@@ -724,7 +724,7 @@ const Na = /* @__PURE__ */ K({
|
|
|
724
724
|
},
|
|
725
725
|
emits: ["change"],
|
|
726
726
|
setup(f, { emit: y }) {
|
|
727
|
-
const e = f, c = y, g = w(
|
|
727
|
+
const e = f, c = y, g = w(ye), b = w(me), h = w(de), s = w(Z), i = w(ne);
|
|
728
728
|
if (d(g) || d(b) || d(h) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
729
729
|
d(s.fields[e.nameFrom]) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
730
730
|
d(s.fields[e.nameUntil]) || d(i) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
@@ -735,72 +735,72 @@ const Na = /* @__PURE__ */ K({
|
|
|
735
735
|
get() {
|
|
736
736
|
return i[e.nameFrom];
|
|
737
737
|
},
|
|
738
|
-
set(
|
|
739
|
-
i[e.nameFrom] =
|
|
738
|
+
set(E) {
|
|
739
|
+
i[e.nameFrom] = E, G(), b.value = !0, c("change");
|
|
740
740
|
}
|
|
741
|
-
}), { timeIntervalOptions: v, getTimeIntervalOption: t } = Ua(e.allowed), r =
|
|
741
|
+
}), { timeIntervalOptions: v, getTimeIntervalOption: t } = Ua(e.allowed), r = R(null), m = R(!1), l = R({
|
|
742
742
|
from: null,
|
|
743
743
|
until: Oe()
|
|
744
|
-
}), a =
|
|
745
|
-
a.value = !1, r.value = null,
|
|
746
|
-
},
|
|
744
|
+
}), a = R(!1), { v$: u } = Ma(l), n = I(() => s.fields[e.nameFrom]), { t: _ } = X(), T = I(() => n.value.titleT ? _(n.value.titleT) : void 0), { clearOne: M } = he(), { showValidationError: x } = Ut(), B = () => {
|
|
745
|
+
a.value = !1, r.value = null, K();
|
|
746
|
+
}, U = () => {
|
|
747
747
|
if (u.value.$touch(), u.value.$invalid) {
|
|
748
|
-
|
|
748
|
+
x();
|
|
749
749
|
return;
|
|
750
750
|
}
|
|
751
751
|
a.value = !0, m.value = !1, i[e.nameUntil] = l.value.until, o.value = l.value.from;
|
|
752
|
-
},
|
|
752
|
+
}, P = () => {
|
|
753
753
|
m.value = !1, r.value = null;
|
|
754
|
+
}, K = () => {
|
|
755
|
+
M(e.nameFrom, i, s), h.value.delete(e.nameFrom);
|
|
754
756
|
}, G = () => {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
if (N(o.value) || oe(o.value)) return;
|
|
758
|
-
if (O(o.value) || d(o.value)) {
|
|
757
|
+
if (z(o.value) || oe(o.value)) return;
|
|
758
|
+
if ($(o.value) || d(o.value)) {
|
|
759
759
|
h.value.delete(e.nameFrom);
|
|
760
760
|
return;
|
|
761
761
|
}
|
|
762
|
-
const
|
|
763
|
-
if (!
|
|
764
|
-
const
|
|
762
|
+
const E = t(o.value);
|
|
763
|
+
if (!E && ft(o.value)) {
|
|
764
|
+
const O = t(ie.Custom);
|
|
765
765
|
h.value.set(e.nameFrom, [
|
|
766
766
|
{
|
|
767
|
-
title:
|
|
767
|
+
title: O.title + ": " + Ee(l.value.from) + " - " + Ee(l.value.until),
|
|
768
768
|
value: o.value
|
|
769
769
|
}
|
|
770
770
|
]);
|
|
771
771
|
return;
|
|
772
772
|
}
|
|
773
|
-
|
|
774
|
-
},
|
|
775
|
-
u.value.$reset(),
|
|
773
|
+
E && h.value.set(e.nameFrom, [{ title: E.title, value: o.value }]);
|
|
774
|
+
}, ue = (E = !1) => {
|
|
775
|
+
u.value.$reset(), E && (l.value.from = null, l.value.until = Oe()), m.value = !0;
|
|
776
776
|
};
|
|
777
|
-
return
|
|
778
|
-
if (
|
|
779
|
-
|
|
777
|
+
return Y(r, (E) => {
|
|
778
|
+
if (E === ie.Custom) {
|
|
779
|
+
ue(!0);
|
|
780
780
|
return;
|
|
781
781
|
}
|
|
782
|
-
i[e.nameUntil] = null, o.value =
|
|
783
|
-
}),
|
|
784
|
-
if (
|
|
785
|
-
if (a.value = !1, d(
|
|
782
|
+
i[e.nameUntil] = null, o.value = E;
|
|
783
|
+
}), Y(o, (E) => {
|
|
784
|
+
if (z(E) || oe(E)) return;
|
|
785
|
+
if (a.value = !1, d(E) || $(E)) {
|
|
786
786
|
r.value = null;
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
|
-
const
|
|
790
|
-
!
|
|
791
|
-
}),
|
|
789
|
+
const O = t(o.value), J = i[e.nameUntil];
|
|
790
|
+
!O && ft(o.value) && ft(J) && (r.value = ie.Custom, l.value.from = o.value, l.value.until = J, a.value = !0), O && (r.value = O.value);
|
|
791
|
+
}), Y(
|
|
792
792
|
[() => i[e.nameFrom], () => i[e.nameUntil]],
|
|
793
|
-
([
|
|
794
|
-
|
|
793
|
+
([E, O], [J, fe]) => {
|
|
794
|
+
E === J && O === fe || oe(E) || oe(O) || $(E) || $(O) || d(E) || d(O) || z(E) && E.length === 0 || z(O) && O.length === 0 || G();
|
|
795
795
|
},
|
|
796
796
|
{ immediate: !0 }
|
|
797
|
-
), (
|
|
798
|
-
const
|
|
799
|
-
return S(), L(
|
|
800
|
-
a.value ? (S(),
|
|
797
|
+
), (E, O) => {
|
|
798
|
+
const J = je("ABtnTertiary"), fe = je("ABtnPrimary");
|
|
799
|
+
return S(), L(ce, null, [
|
|
800
|
+
a.value ? (S(), q(Fa, {
|
|
801
801
|
key: 0,
|
|
802
802
|
label: T.value,
|
|
803
|
-
"model-value":
|
|
803
|
+
"model-value": N(Ee)(l.value.from) + " - " + N(Ee)(l.value.until),
|
|
804
804
|
readonly: "",
|
|
805
805
|
rows: "1",
|
|
806
806
|
"auto-grow": "",
|
|
@@ -809,58 +809,58 @@ const Na = /* @__PURE__ */ K({
|
|
|
809
809
|
clearable: "",
|
|
810
810
|
class: "cursor-pointer",
|
|
811
811
|
"onClick:clear": H(B, ["stop"]),
|
|
812
|
-
onClick:
|
|
813
|
-
}, null, 8, ["label", "model-value"])) : (S(),
|
|
812
|
+
onClick: O[0] || (O[0] = H((ee) => ue(), ["stop"]))
|
|
813
|
+
}, null, 8, ["label", "model-value"])) : (S(), q(Lt, {
|
|
814
814
|
key: 1,
|
|
815
815
|
modelValue: r.value,
|
|
816
|
-
"onUpdate:modelValue":
|
|
816
|
+
"onUpdate:modelValue": O[1] || (O[1] = (ee) => r.value = ee),
|
|
817
817
|
"item-title": "title",
|
|
818
818
|
"item-value": "value",
|
|
819
819
|
label: T.value,
|
|
820
|
-
clearable: !
|
|
820
|
+
clearable: !N($)(r.value),
|
|
821
821
|
"no-filter": "",
|
|
822
|
-
"data-cy":
|
|
823
|
-
items:
|
|
822
|
+
"data-cy": E.dataCy,
|
|
823
|
+
items: N(v),
|
|
824
824
|
"hide-details": "",
|
|
825
825
|
"onClick:clear": H(B, ["stop"])
|
|
826
826
|
}, null, 8, ["modelValue", "label", "clearable", "data-cy", "items"])),
|
|
827
|
-
m.value ? (S(),
|
|
827
|
+
m.value ? (S(), q(Yt, {
|
|
828
828
|
key: 2,
|
|
829
829
|
"model-value": !0,
|
|
830
830
|
width: "auto",
|
|
831
831
|
"min-width": 360
|
|
832
832
|
}, {
|
|
833
833
|
default: F(() => [
|
|
834
|
-
|
|
834
|
+
A(Qt, null, {
|
|
835
835
|
default: F(() => [
|
|
836
|
-
|
|
836
|
+
A(Mt, { onOnCancel: P }, {
|
|
837
837
|
default: F(() => [
|
|
838
|
-
|
|
839
|
-
|
|
838
|
+
pe(E.$slots, "title", {}, () => [
|
|
839
|
+
Q(j(T.value), 1)
|
|
840
840
|
], !0)
|
|
841
841
|
]),
|
|
842
842
|
_: 3
|
|
843
843
|
}),
|
|
844
|
-
|
|
844
|
+
A(Gt, null, {
|
|
845
845
|
default: F(() => [
|
|
846
|
-
|
|
846
|
+
A(be, null, {
|
|
847
847
|
default: F(() => [
|
|
848
|
-
|
|
848
|
+
A(Ft, {
|
|
849
849
|
modelValue: l.value.from,
|
|
850
|
-
"onUpdate:modelValue":
|
|
851
|
-
v:
|
|
850
|
+
"onUpdate:modelValue": O[2] || (O[2] = (ee) => l.value.from = ee),
|
|
851
|
+
v: N(u).dialogData.from,
|
|
852
852
|
label: "From",
|
|
853
853
|
required: ""
|
|
854
854
|
}, null, 8, ["modelValue", "v"])
|
|
855
855
|
]),
|
|
856
856
|
_: 1
|
|
857
857
|
}),
|
|
858
|
-
|
|
858
|
+
A(be, null, {
|
|
859
859
|
default: F(() => [
|
|
860
|
-
|
|
860
|
+
A(Ft, {
|
|
861
861
|
modelValue: l.value.until,
|
|
862
|
-
"onUpdate:modelValue":
|
|
863
|
-
v:
|
|
862
|
+
"onUpdate:modelValue": O[3] || (O[3] = (ee) => l.value.until = ee),
|
|
863
|
+
v: N(u).dialogData.until,
|
|
864
864
|
label: "Until",
|
|
865
865
|
required: ""
|
|
866
866
|
}, null, 8, ["modelValue", "v"])
|
|
@@ -870,24 +870,24 @@ const Na = /* @__PURE__ */ K({
|
|
|
870
870
|
]),
|
|
871
871
|
_: 1
|
|
872
872
|
}),
|
|
873
|
-
|
|
873
|
+
A(Jt, null, {
|
|
874
874
|
default: F(() => [
|
|
875
|
-
|
|
876
|
-
|
|
875
|
+
A(Xt),
|
|
876
|
+
A(J, {
|
|
877
877
|
"data-cy": "button-cancel",
|
|
878
|
-
onClick: H(
|
|
878
|
+
onClick: H(P, ["stop"])
|
|
879
879
|
}, {
|
|
880
880
|
default: F(() => [
|
|
881
|
-
|
|
881
|
+
Q(j(N(_)("common.button.cancel")), 1)
|
|
882
882
|
]),
|
|
883
883
|
_: 1
|
|
884
884
|
}),
|
|
885
|
-
|
|
885
|
+
A(fe, {
|
|
886
886
|
"data-cy": "button-confirm",
|
|
887
|
-
onClick: H(
|
|
887
|
+
onClick: H(U, ["stop"])
|
|
888
888
|
}, {
|
|
889
889
|
default: F(() => [
|
|
890
|
-
|
|
890
|
+
Q(j(N(_)("common.button.confirm")), 1)
|
|
891
891
|
]),
|
|
892
892
|
_: 1
|
|
893
893
|
})
|
|
@@ -903,7 +903,7 @@ const Na = /* @__PURE__ */ K({
|
|
|
903
903
|
], 64);
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
|
-
}), Ql = /* @__PURE__ */ da(Na, [["__scopeId", "data-v-a7dadbfe"]]), Gl = /* @__PURE__ */
|
|
906
|
+
}), Ql = /* @__PURE__ */ da(Na, [["__scopeId", "data-v-a7dadbfe"]]), Gl = /* @__PURE__ */ W({
|
|
907
907
|
__name: "AFilterValueObjectOptionsSelect",
|
|
908
908
|
props: {
|
|
909
909
|
name: {},
|
|
@@ -911,7 +911,7 @@ const Na = /* @__PURE__ */ K({
|
|
|
911
911
|
},
|
|
912
912
|
emits: ["change"],
|
|
913
913
|
setup(f, { emit: y }) {
|
|
914
|
-
const e = f, c = y, g = w(
|
|
914
|
+
const e = f, c = y, g = w(ye), b = w(me), h = w(de), s = w(Z), i = w(ne);
|
|
915
915
|
if (d(g) || d(b) || d(h) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
916
916
|
d(s.fields[e.name]) || d(i) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
917
917
|
d(i[e.name]))
|
|
@@ -923,16 +923,16 @@ const Na = /* @__PURE__ */ K({
|
|
|
923
923
|
set(u) {
|
|
924
924
|
i[e.name] = u, a(), b.value = !0, c("change");
|
|
925
925
|
}
|
|
926
|
-
}), v = I(() => s.fields[e.name]), { t } =
|
|
926
|
+
}), v = I(() => s.fields[e.name]), { t } = X(), r = I(() => v.value.titleT ? t(v.value.titleT) : void 0), { clearOne: m } = he(), l = () => {
|
|
927
927
|
m(e.name, i, s), h.value.delete(e.name);
|
|
928
928
|
}, a = () => {
|
|
929
|
-
if (
|
|
930
|
-
if (
|
|
929
|
+
if (z(o.value) && o.value.length === 0) return;
|
|
930
|
+
if (z(o.value)) {
|
|
931
931
|
h.value.set(
|
|
932
932
|
e.name,
|
|
933
933
|
o.value.map((n) => {
|
|
934
|
-
const
|
|
935
|
-
return
|
|
934
|
+
const _ = e.items.find((T) => T.value === n);
|
|
935
|
+
return _ ? { title: _.title, value: _.value } : { title: n, value: n };
|
|
936
936
|
})
|
|
937
937
|
);
|
|
938
938
|
return;
|
|
@@ -940,15 +940,15 @@ const Na = /* @__PURE__ */ K({
|
|
|
940
940
|
const u = e.items.find((n) => n.value === o.value);
|
|
941
941
|
u && h.value.set(e.name, [{ title: u.title, value: u.value }]);
|
|
942
942
|
};
|
|
943
|
-
return
|
|
943
|
+
return Y(
|
|
944
944
|
() => i[e.name],
|
|
945
945
|
(u, n) => {
|
|
946
|
-
u === n || oe(u) ||
|
|
946
|
+
u === n || oe(u) || $(u) || d(u) || z(u) && u.length === 0 || a();
|
|
947
947
|
},
|
|
948
948
|
{ immediate: !0 }
|
|
949
|
-
), (u, n) => (S(),
|
|
949
|
+
), (u, n) => (S(), q(kt, {
|
|
950
950
|
modelValue: o.value,
|
|
951
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
951
|
+
"onUpdate:modelValue": n[0] || (n[0] = (_) => o.value = _),
|
|
952
952
|
items: u.items,
|
|
953
953
|
chips: v.value.multiple,
|
|
954
954
|
label: r.value,
|
|
@@ -959,7 +959,7 @@ const Na = /* @__PURE__ */ K({
|
|
|
959
959
|
"onClick:clear": H(l, ["stop"])
|
|
960
960
|
}, null, 8, ["modelValue", "items", "chips", "label", "multiple", "clearable"]));
|
|
961
961
|
}
|
|
962
|
-
}), za = /* @__PURE__ */
|
|
962
|
+
}), za = /* @__PURE__ */ W({
|
|
963
963
|
__name: "AFilterAdvancedButton",
|
|
964
964
|
props: {
|
|
965
965
|
tooltipT: { default: "common.button.advancedFilters" },
|
|
@@ -968,10 +968,10 @@ const Na = /* @__PURE__ */ K({
|
|
|
968
968
|
},
|
|
969
969
|
emits: ["advancedFilter"],
|
|
970
970
|
setup(f, { emit: y }) {
|
|
971
|
-
const e = y, c =
|
|
971
|
+
const e = y, c = R(!1), g = (h) => {
|
|
972
972
|
Nt(h), c.value = !c.value, e("advancedFilter");
|
|
973
|
-
}, { t: b } =
|
|
974
|
-
return (h, s) => (S(),
|
|
973
|
+
}, { t: b } = X();
|
|
974
|
+
return (h, s) => (S(), q(ae, {
|
|
975
975
|
class: Ve(h.buttonClass),
|
|
976
976
|
"data-cy": h.dataCy,
|
|
977
977
|
icon: "",
|
|
@@ -980,13 +980,13 @@ const Na = /* @__PURE__ */ K({
|
|
|
980
980
|
onClick: H(g, ["stop"])
|
|
981
981
|
}, {
|
|
982
982
|
default: F(() => [
|
|
983
|
-
|
|
984
|
-
|
|
983
|
+
A(Me, { icon: "mdi-filter-variant" }),
|
|
984
|
+
A(Ke, {
|
|
985
985
|
activator: "parent",
|
|
986
986
|
location: "bottom"
|
|
987
987
|
}, {
|
|
988
988
|
default: F(() => [
|
|
989
|
-
|
|
989
|
+
Q(j(N(b)(h.tooltipT)), 1)
|
|
990
990
|
]),
|
|
991
991
|
_: 1
|
|
992
992
|
})
|
|
@@ -994,13 +994,13 @@ const Na = /* @__PURE__ */ K({
|
|
|
994
994
|
_: 1
|
|
995
995
|
}, 8, ["class", "data-cy"]));
|
|
996
996
|
}
|
|
997
|
-
}), qa = { class: "a-selected-filters__label text-caption" }, La = /* @__PURE__ */
|
|
997
|
+
}), qa = { class: "a-selected-filters__label text-caption" }, La = /* @__PURE__ */ W({
|
|
998
998
|
__name: "FiltersSelected",
|
|
999
999
|
setup(f) {
|
|
1000
|
-
const y = w(Z), e = w(ne), c = w(
|
|
1000
|
+
const y = w(Z), e = w(ne), c = w(de), g = w(me);
|
|
1001
1001
|
if (d(y) || d(e) || d(c) || d(g))
|
|
1002
1002
|
throw new Error("Incorrect provide/inject config.");
|
|
1003
|
-
const { t: b } =
|
|
1003
|
+
const { t: b } = X(), h = (o) => {
|
|
1004
1004
|
var t, r;
|
|
1005
1005
|
const v = (r = (t = y.fields) == null ? void 0 : t[o]) == null ? void 0 : r.titleT;
|
|
1006
1006
|
return v ? b(v) : o;
|
|
@@ -1019,42 +1019,42 @@ const Na = /* @__PURE__ */ K({
|
|
|
1019
1019
|
const r = t.findIndex((m) => m.value === v);
|
|
1020
1020
|
t.splice(r, 1);
|
|
1021
1021
|
}
|
|
1022
|
-
if (
|
|
1022
|
+
if (z(e[o]) && e[o].length > 0) {
|
|
1023
1023
|
const r = e[o].findIndex((l) => l === v), m = [...ra(e[o])];
|
|
1024
1024
|
m.splice(r, 1), e[o] = m;
|
|
1025
1025
|
} else (le(e[o]) || yt(e[o]) || oe(e[o])) && (e[o] = y.fields[o].default);
|
|
1026
1026
|
g.value = !0;
|
|
1027
1027
|
};
|
|
1028
|
-
return (o, v) => (S(!0), L(
|
|
1028
|
+
return (o, v) => (S(!0), L(ce, null, ke(s.value, (t) => (S(), L("div", {
|
|
1029
1029
|
key: t.name,
|
|
1030
1030
|
class: "a-selected-filters"
|
|
1031
1031
|
}, [
|
|
1032
1032
|
te("div", qa, j(t.title) + ": ", 1),
|
|
1033
|
-
(S(!0), L(
|
|
1033
|
+
(S(!0), L(ce, null, ke(t.options, (r) => (S(), L("div", {
|
|
1034
1034
|
key: r.value,
|
|
1035
1035
|
class: "a-selected-filters__chips"
|
|
1036
1036
|
}, [
|
|
1037
|
-
|
|
1037
|
+
A(Vt, {
|
|
1038
1038
|
closable: "",
|
|
1039
1039
|
size: "small",
|
|
1040
1040
|
class: "a-selected-filters__chip",
|
|
1041
1041
|
"onClick:close": H((m) => i(t.name, r.value), ["stop"])
|
|
1042
1042
|
}, {
|
|
1043
1043
|
close: F(() => [
|
|
1044
|
-
|
|
1044
|
+
A(Me, {
|
|
1045
1045
|
size: "16",
|
|
1046
1046
|
icon: "mdi-close-circle"
|
|
1047
1047
|
})
|
|
1048
1048
|
]),
|
|
1049
1049
|
default: F(() => [
|
|
1050
|
-
|
|
1050
|
+
Q(" " + j(r.title), 1)
|
|
1051
1051
|
]),
|
|
1052
1052
|
_: 2
|
|
1053
1053
|
}, 1032, ["onClick:close"])
|
|
1054
1054
|
]))), 128))
|
|
1055
1055
|
]))), 128));
|
|
1056
1056
|
}
|
|
1057
|
-
}), St = /* @__PURE__ */
|
|
1057
|
+
}), St = /* @__PURE__ */ W({
|
|
1058
1058
|
__name: "AFilterEmpty",
|
|
1059
1059
|
props: {
|
|
1060
1060
|
name: {}
|
|
@@ -1063,7 +1063,7 @@ const Na = /* @__PURE__ */ K({
|
|
|
1063
1063
|
const y = f;
|
|
1064
1064
|
return (e, c) => (S(), L("div", null, j(y.name), 1));
|
|
1065
1065
|
}
|
|
1066
|
-
}), ja = /* @__PURE__ */
|
|
1066
|
+
}), ja = /* @__PURE__ */ W({
|
|
1067
1067
|
__name: "FilterDetailItem",
|
|
1068
1068
|
props: {
|
|
1069
1069
|
name: {}
|
|
@@ -1088,7 +1088,7 @@ const Na = /* @__PURE__ */ K({
|
|
|
1088
1088
|
return St;
|
|
1089
1089
|
}
|
|
1090
1090
|
});
|
|
1091
|
-
return (b, h) => (S(),
|
|
1091
|
+
return (b, h) => (S(), q(sa(g.value), { name: b.name }, null, 8, ["name"]));
|
|
1092
1092
|
}
|
|
1093
1093
|
});
|
|
1094
1094
|
function It(f, y = "userAdminConfig") {
|
|
@@ -1127,18 +1127,18 @@ const We = {
|
|
|
1127
1127
|
Mobile: "mobile"
|
|
1128
1128
|
}, Ka = Ce.Desktop;
|
|
1129
1129
|
function Wa() {
|
|
1130
|
-
const f =
|
|
1130
|
+
const f = R([]), y = (t) => {
|
|
1131
1131
|
i("limit", t);
|
|
1132
1132
|
}, e = (t, r) => {
|
|
1133
1133
|
i("offset", t * r - r);
|
|
1134
1134
|
}, c = (t, r) => {
|
|
1135
|
-
|
|
1135
|
+
!$(t) && t.length > 0 && i("order[" + t + "]", r ? "desc" : "asc");
|
|
1136
1136
|
}, g = (t) => oe(t) ? t ? "1" : "0" : t, b = (t, r, m) => {
|
|
1137
1137
|
le(m) && m.length === 0 || f.value.push("filter_" + t + "[" + r + "]=" + g(m));
|
|
1138
1138
|
}, h = (t, r, m, l, a) => {
|
|
1139
1139
|
let u = m[t], n = m[r];
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1140
|
+
$(u) && a && (u = l.fields[t].default), $(n) && a && (n = l.fields[t].default);
|
|
1141
|
+
const _ = Oe(), T = ma(_);
|
|
1142
1142
|
switch (u) {
|
|
1143
1143
|
case ie.CurrentMonth:
|
|
1144
1144
|
return vt(T, "utc", 0, !1);
|
|
@@ -1155,11 +1155,11 @@ function Wa() {
|
|
|
1155
1155
|
if (yt(u))
|
|
1156
1156
|
return {
|
|
1157
1157
|
from: fa(va(u * -1, T)),
|
|
1158
|
-
until:
|
|
1158
|
+
until: _
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
return null;
|
|
1162
|
-
}, s = (t, r) =>
|
|
1162
|
+
}, s = (t, r) => $(t) ? r.mandatory && !d(r.default) ? z(r.default) ? r.default.join(",") : r.default : null : le(t) ? t.length === 0 ? r.mandatory && !d(r.default) && !$(r.default) ? encodeURIComponent(z(r.default) ? r.default.join(",") : r.default) : null : encodeURIComponent(t) : z(t) ? t.length === 0 ? r.mandatory && z(r.default) ? r.default.map((m) => le(m) ? encodeURIComponent(m) : m).join(",") : null : t.map((m) => le(m) ? encodeURIComponent(m) : m).join(",") : yt(t) || oe(t) ? t : null, i = (t, r) => {
|
|
1163
1163
|
f.value.push(t + "=" + r);
|
|
1164
1164
|
};
|
|
1165
1165
|
return {
|
|
@@ -1174,24 +1174,24 @@ function Wa() {
|
|
|
1174
1174
|
if (d(u) || u.exclude)
|
|
1175
1175
|
continue;
|
|
1176
1176
|
if (u.type === "timeInterval" && !d(u.related)) {
|
|
1177
|
-
const
|
|
1177
|
+
const _ = h(
|
|
1178
1178
|
l,
|
|
1179
1179
|
u.related,
|
|
1180
1180
|
t,
|
|
1181
1181
|
r,
|
|
1182
1182
|
u.mandatory
|
|
1183
1183
|
);
|
|
1184
|
-
if (
|
|
1184
|
+
if ($(_))
|
|
1185
1185
|
continue;
|
|
1186
1186
|
if (m) {
|
|
1187
|
-
i(l,
|
|
1187
|
+
i(l, _.from), i(u.related, _.until);
|
|
1188
1188
|
continue;
|
|
1189
1189
|
}
|
|
1190
|
-
|
|
1190
|
+
_.from && b("gte", l, _.from), _.until && b("lte", u.related, _.until);
|
|
1191
1191
|
continue;
|
|
1192
1192
|
}
|
|
1193
1193
|
const n = s(a, u);
|
|
1194
|
-
if (
|
|
1194
|
+
if (!$(n)) {
|
|
1195
1195
|
if (m) {
|
|
1196
1196
|
i(l, n);
|
|
1197
1197
|
continue;
|
|
@@ -1264,7 +1264,7 @@ const Le = (f, y, e) => {
|
|
|
1264
1264
|
b = new AbortController();
|
|
1265
1265
|
try {
|
|
1266
1266
|
const t = { method: y };
|
|
1267
|
-
t.url = i, i !== "" && !d(o) && (t.url = Qe(i, o)),
|
|
1267
|
+
t.url = i, i !== "" && !d(o) && (t.url = Qe(i, o)), $(v) || (t.data = JSON.stringify(v));
|
|
1268
1268
|
const r = await f().request({
|
|
1269
1269
|
...g,
|
|
1270
1270
|
...t,
|
|
@@ -1316,7 +1316,7 @@ function la(f, y, e = Qa, c = gt) {
|
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
1318
1318
|
const Ga = 3, bt = 8, oa = wa("filterBookmarkStore", () => {
|
|
1319
|
-
const f =
|
|
1319
|
+
const f = R(/* @__PURE__ */ new Map()), y = R(!1);
|
|
1320
1320
|
function e(s, i, o) {
|
|
1321
1321
|
return `${s}/userAdminConfig/${i}/${o}`;
|
|
1322
1322
|
}
|
|
@@ -1408,7 +1408,7 @@ const Ya = {
|
|
|
1408
1408
|
}, el = { key: 1 }, tl = {
|
|
1409
1409
|
key: 0,
|
|
1410
1410
|
class: "d-flex align-center justify-end"
|
|
1411
|
-
}, al = /* @__PURE__ */
|
|
1411
|
+
}, al = /* @__PURE__ */ W({
|
|
1412
1412
|
__name: "FilterBookmarkDialog",
|
|
1413
1413
|
props: {
|
|
1414
1414
|
client: {},
|
|
@@ -1422,36 +1422,36 @@ const Ya = {
|
|
|
1422
1422
|
const e = f, c = y, g = w(Z), b = w(ne), h = w(st);
|
|
1423
1423
|
if (d(h) || d(g) || d(b))
|
|
1424
1424
|
throw new Error("Incorrect provide/inject config.");
|
|
1425
|
-
const s =
|
|
1425
|
+
const s = R("add"), i = R(""), o = R(!1), v = R(!1), t = R(!1), r = R(!1), m = R(!1), l = R([]), a = R(null), { required: u, maxLength: n } = Ot(), _ = {
|
|
1426
1426
|
customName: {
|
|
1427
1427
|
required: u,
|
|
1428
1428
|
maxLength: n(100)
|
|
1429
1429
|
}
|
|
1430
|
-
}, T = ht(
|
|
1430
|
+
}, T = ht(_, { customName: i }, { $stopPropagation: !0 }), M = {
|
|
1431
1431
|
itemEdit: {
|
|
1432
1432
|
required: u,
|
|
1433
1433
|
maxLength: n(100)
|
|
1434
1434
|
}
|
|
1435
|
-
},
|
|
1436
|
-
createUserAdminConfig:
|
|
1437
|
-
useFetchUserAdminConfigList:
|
|
1438
|
-
updateUserAdminConfigPositions:
|
|
1439
|
-
deleteUserAdminConfig:
|
|
1440
|
-
updateUserAdminConfig:
|
|
1435
|
+
}, x = ht(M, { itemEdit: a }, { $stopPropagation: !0 }), B = oa(), {
|
|
1436
|
+
createUserAdminConfig: U,
|
|
1437
|
+
useFetchUserAdminConfigList: P,
|
|
1438
|
+
updateUserAdminConfigPositions: K,
|
|
1439
|
+
deleteUserAdminConfig: G,
|
|
1440
|
+
updateUserAdminConfig: ue
|
|
1441
1441
|
} = (
|
|
1442
1442
|
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
1443
1443
|
la(e.client, e.system)
|
|
1444
|
-
), { t:
|
|
1444
|
+
), { t: E } = X(), { showErrorsDefault: O, showValidationError: J } = Ut(), { createDefaultUserAdminConfig: fe } = Ja(), ee = async () => {
|
|
1445
1445
|
t.value = !0;
|
|
1446
|
-
const k = l.value.map((
|
|
1446
|
+
const k = l.value.map((D) => D.id);
|
|
1447
1447
|
try {
|
|
1448
|
-
await
|
|
1449
|
-
} catch (
|
|
1450
|
-
|
|
1448
|
+
await K(k), t.value = !1, await p(), c("onClose");
|
|
1449
|
+
} catch (D) {
|
|
1450
|
+
O(D), t.value = !1;
|
|
1451
1451
|
}
|
|
1452
1452
|
}, { serializeFilters: Te } = aa(b, g, e.systemResource), Be = async () => {
|
|
1453
1453
|
t.value = !0, m.value = !1;
|
|
1454
|
-
const C =
|
|
1454
|
+
const C = fe(e.system);
|
|
1455
1455
|
C.user = e.user, C.configType = We.FilterBookmark, C.layoutType = Ce.Desktop, C.systemResource = e.systemResource, C.customName = i.value, C.data = {
|
|
1456
1456
|
filter: Te(b, h, !1),
|
|
1457
1457
|
datatableHiddenColumns: o.value && e.datatableHiddenColumns ? e.datatableHiddenColumns : void 0,
|
|
@@ -1465,29 +1465,29 @@ const Ya = {
|
|
|
1465
1465
|
layoutType: Ce.Desktop,
|
|
1466
1466
|
systemResource: e.systemResource
|
|
1467
1467
|
},
|
|
1468
|
-
|
|
1468
|
+
P
|
|
1469
1469
|
);
|
|
1470
1470
|
if (k >= bt) {
|
|
1471
1471
|
m.value = !0;
|
|
1472
1472
|
return;
|
|
1473
1473
|
}
|
|
1474
1474
|
C.position = k + 1;
|
|
1475
|
-
const
|
|
1475
|
+
const D = await U(C);
|
|
1476
1476
|
B.addOne(
|
|
1477
1477
|
B.generateKey(
|
|
1478
1478
|
e.system,
|
|
1479
1479
|
Ce.Desktop,
|
|
1480
1480
|
e.systemResource
|
|
1481
1481
|
),
|
|
1482
|
-
|
|
1482
|
+
D
|
|
1483
1483
|
), t.value = !1, c("onClose");
|
|
1484
1484
|
} catch (k) {
|
|
1485
|
-
|
|
1485
|
+
O(k), t.value = !1;
|
|
1486
1486
|
}
|
|
1487
1487
|
}, Se = () => {
|
|
1488
1488
|
if (s.value === "add") {
|
|
1489
1489
|
if (T.value.$touch(), T.value.$invalid) {
|
|
1490
|
-
|
|
1490
|
+
J();
|
|
1491
1491
|
return;
|
|
1492
1492
|
}
|
|
1493
1493
|
Be();
|
|
@@ -1495,9 +1495,9 @@ const Ya = {
|
|
|
1495
1495
|
}, Ie = async (C) => {
|
|
1496
1496
|
r.value = !0;
|
|
1497
1497
|
try {
|
|
1498
|
-
await
|
|
1498
|
+
await G(C.raw.id), await p(), re();
|
|
1499
1499
|
} catch (k) {
|
|
1500
|
-
|
|
1500
|
+
O(k);
|
|
1501
1501
|
} finally {
|
|
1502
1502
|
r.value = !1;
|
|
1503
1503
|
}
|
|
@@ -1505,14 +1505,14 @@ const Ya = {
|
|
|
1505
1505
|
var k;
|
|
1506
1506
|
a.value = { id: C.raw.id, customName: C.raw.customName }, await $e(), (k = _e.value) == null || k.focus();
|
|
1507
1507
|
}, Re = async (C) => {
|
|
1508
|
-
if (
|
|
1508
|
+
if ($(a.value)) return;
|
|
1509
1509
|
r.value = !0;
|
|
1510
1510
|
const k = Ct(C.raw);
|
|
1511
1511
|
k.customName = a.value.customName;
|
|
1512
1512
|
try {
|
|
1513
|
-
await
|
|
1514
|
-
} catch (
|
|
1515
|
-
|
|
1513
|
+
await ue(k.id, k), await p(), re();
|
|
1514
|
+
} catch (D) {
|
|
1515
|
+
O(D);
|
|
1516
1516
|
} finally {
|
|
1517
1517
|
r.value = !1;
|
|
1518
1518
|
}
|
|
@@ -1528,53 +1528,53 @@ const Ya = {
|
|
|
1528
1528
|
layoutType: Ce.Desktop,
|
|
1529
1529
|
systemResource: e.systemResource
|
|
1530
1530
|
},
|
|
1531
|
-
|
|
1531
|
+
P,
|
|
1532
1532
|
!0
|
|
1533
1533
|
);
|
|
1534
1534
|
} catch (C) {
|
|
1535
|
-
|
|
1535
|
+
O(C);
|
|
1536
1536
|
} finally {
|
|
1537
1537
|
r.value = !1;
|
|
1538
1538
|
}
|
|
1539
1539
|
};
|
|
1540
|
-
return
|
|
1540
|
+
return Y(s, () => {
|
|
1541
1541
|
m.value = !1, s.value === "manage" && p();
|
|
1542
1542
|
}), (C, k) => {
|
|
1543
|
-
const
|
|
1544
|
-
return S(),
|
|
1543
|
+
const D = je("ABtnTertiary"), na = je("ABtnPrimary");
|
|
1544
|
+
return S(), q(Yt, {
|
|
1545
1545
|
"model-value": !0,
|
|
1546
1546
|
width: 500
|
|
1547
1547
|
}, {
|
|
1548
1548
|
default: F(() => [
|
|
1549
|
-
|
|
1549
|
+
A(Qt, null, {
|
|
1550
1550
|
default: F(() => [
|
|
1551
|
-
|
|
1552
|
-
onOnCancel: k[0] || (k[0] = (
|
|
1551
|
+
A(Mt, {
|
|
1552
|
+
onOnCancel: k[0] || (k[0] = (V) => c("onClose"))
|
|
1553
1553
|
}, {
|
|
1554
1554
|
default: F(() => k[9] || (k[9] = [
|
|
1555
|
-
|
|
1555
|
+
Q(" Bookmarks ")
|
|
1556
1556
|
])),
|
|
1557
1557
|
_: 1,
|
|
1558
1558
|
__: [9]
|
|
1559
1559
|
}),
|
|
1560
|
-
|
|
1560
|
+
A(Gt, { class: "pt-0" }, {
|
|
1561
1561
|
default: F(() => [
|
|
1562
|
-
|
|
1562
|
+
A(Ba, {
|
|
1563
1563
|
modelValue: s.value,
|
|
1564
|
-
"onUpdate:modelValue": k[1] || (k[1] = (
|
|
1564
|
+
"onUpdate:modelValue": k[1] || (k[1] = (V) => s.value = V),
|
|
1565
1565
|
"fixed-tabs": ""
|
|
1566
1566
|
}, {
|
|
1567
1567
|
default: F(() => [
|
|
1568
|
-
|
|
1568
|
+
A(Bt, { value: "add" }, {
|
|
1569
1569
|
default: F(() => k[10] || (k[10] = [
|
|
1570
|
-
|
|
1570
|
+
Q(" Add bookmark ")
|
|
1571
1571
|
])),
|
|
1572
1572
|
_: 1,
|
|
1573
1573
|
__: [10]
|
|
1574
1574
|
}),
|
|
1575
|
-
|
|
1575
|
+
A(Bt, { value: "manage" }, {
|
|
1576
1576
|
default: F(() => k[11] || (k[11] = [
|
|
1577
|
-
|
|
1577
|
+
Q(" Manage bookmarks ")
|
|
1578
1578
|
])),
|
|
1579
1579
|
_: 1,
|
|
1580
1580
|
__: [11]
|
|
@@ -1583,39 +1583,39 @@ const Ya = {
|
|
|
1583
1583
|
_: 1
|
|
1584
1584
|
}, 8, ["modelValue"]),
|
|
1585
1585
|
s.value === "add" ? (S(), L("div", Ya, [
|
|
1586
|
-
|
|
1587
|
-
m.value ? (S(),
|
|
1586
|
+
A(be, { title: "Current selected filters will be stored with this bookmark." }),
|
|
1587
|
+
m.value ? (S(), q(be, {
|
|
1588
1588
|
key: 0,
|
|
1589
1589
|
class: "text-error",
|
|
1590
1590
|
title: "Max numbers of bookmarks reached. You can delete some bookmarks to add new one."
|
|
1591
1591
|
})) : se("", !0),
|
|
1592
|
-
|
|
1592
|
+
A(be, null, {
|
|
1593
1593
|
default: F(() => [
|
|
1594
|
-
|
|
1594
|
+
A(wt, {
|
|
1595
1595
|
modelValue: i.value,
|
|
1596
|
-
"onUpdate:modelValue": k[2] || (k[2] = (
|
|
1596
|
+
"onUpdate:modelValue": k[2] || (k[2] = (V) => i.value = V),
|
|
1597
1597
|
label: "Name",
|
|
1598
1598
|
required: "",
|
|
1599
|
-
v:
|
|
1599
|
+
v: N(T).customName
|
|
1600
1600
|
}, null, 8, ["modelValue", "v"])
|
|
1601
1601
|
]),
|
|
1602
1602
|
_: 1
|
|
1603
1603
|
}),
|
|
1604
|
-
|
|
1604
|
+
A(be, null, {
|
|
1605
1605
|
default: F(() => [
|
|
1606
|
-
|
|
1606
|
+
A(Tt, {
|
|
1607
1607
|
modelValue: o.value,
|
|
1608
|
-
"onUpdate:modelValue": k[3] || (k[3] = (
|
|
1608
|
+
"onUpdate:modelValue": k[3] || (k[3] = (V) => o.value = V),
|
|
1609
1609
|
label: "Save datatable columns also"
|
|
1610
1610
|
}, null, 8, ["modelValue"])
|
|
1611
1611
|
]),
|
|
1612
1612
|
_: 1
|
|
1613
1613
|
}),
|
|
1614
|
-
|
|
1614
|
+
A(be, null, {
|
|
1615
1615
|
default: F(() => [
|
|
1616
|
-
|
|
1616
|
+
A(Tt, {
|
|
1617
1617
|
modelValue: v.value,
|
|
1618
|
-
"onUpdate:modelValue": k[4] || (k[4] = (
|
|
1618
|
+
"onUpdate:modelValue": k[4] || (k[4] = (V) => v.value = V),
|
|
1619
1619
|
label: "Save order"
|
|
1620
1620
|
}, null, 8, ["modelValue"])
|
|
1621
1621
|
]),
|
|
@@ -1623,51 +1623,51 @@ const Ya = {
|
|
|
1623
1623
|
})
|
|
1624
1624
|
])) : s.value === "manage" ? (S(), L("div", Xa, [
|
|
1625
1625
|
r.value ? (S(), L("div", Za, [
|
|
1626
|
-
|
|
1627
|
-
])) : (S(),
|
|
1626
|
+
A(Ta, { indeterminate: "" })
|
|
1627
|
+
])) : (S(), q(pa, {
|
|
1628
1628
|
key: 1,
|
|
1629
1629
|
modelValue: l.value,
|
|
1630
|
-
"onUpdate:modelValue": k[7] || (k[7] = (
|
|
1630
|
+
"onUpdate:modelValue": k[7] || (k[7] = (V) => l.value = V),
|
|
1631
1631
|
"show-edit-button": "",
|
|
1632
1632
|
"show-delete-button": "",
|
|
1633
1633
|
onOnDelete: Ie,
|
|
1634
1634
|
onOnEdit: Pe
|
|
1635
1635
|
}, Rt({
|
|
1636
|
-
item: F(({ item:
|
|
1637
|
-
a.value && a.value.id ===
|
|
1636
|
+
item: F(({ item: V }) => [
|
|
1637
|
+
a.value && a.value.id === V.raw.id ? (S(), q(wt, {
|
|
1638
1638
|
key: 0,
|
|
1639
1639
|
ref_key: "inputRef",
|
|
1640
1640
|
ref: _e,
|
|
1641
1641
|
modelValue: a.value.customName,
|
|
1642
1642
|
"onUpdate:modelValue": k[5] || (k[5] = (dt) => a.value.customName = dt),
|
|
1643
1643
|
"hide-details": "auto",
|
|
1644
|
-
v:
|
|
1645
|
-
}, null, 8, ["modelValue", "v"])) : (S(), L("div", el, j(
|
|
1644
|
+
v: N(x)
|
|
1645
|
+
}, null, 8, ["modelValue", "v"])) : (S(), L("div", el, j(V.raw.customName), 1))
|
|
1646
1646
|
]),
|
|
1647
1647
|
_: 2
|
|
1648
1648
|
}, [
|
|
1649
|
-
|
|
1649
|
+
N($)(a.value) ? void 0 : {
|
|
1650
1650
|
name: "item-buttons",
|
|
1651
|
-
fn: F(({ item:
|
|
1652
|
-
a.value && a.value.id ===
|
|
1653
|
-
|
|
1651
|
+
fn: F(({ item: V }) => [
|
|
1652
|
+
a.value && a.value.id === V.raw.id ? (S(), L("div", tl, [
|
|
1653
|
+
A(ae, {
|
|
1654
1654
|
icon: "",
|
|
1655
1655
|
size: "x-small",
|
|
1656
1656
|
variant: "text",
|
|
1657
1657
|
class: "mx-1",
|
|
1658
|
-
onClick: H((dt) => Re(
|
|
1658
|
+
onClick: H((dt) => Re(V), ["stop"])
|
|
1659
1659
|
}, {
|
|
1660
1660
|
default: F(() => [
|
|
1661
|
-
|
|
1662
|
-
|
|
1661
|
+
A(Me, { icon: "mdi-check" }),
|
|
1662
|
+
A(Ke, {
|
|
1663
1663
|
anchor: "bottom",
|
|
1664
1664
|
activator: "parent",
|
|
1665
|
-
text:
|
|
1665
|
+
text: N(E)("common.button.confirm")
|
|
1666
1666
|
}, null, 8, ["text"])
|
|
1667
1667
|
]),
|
|
1668
1668
|
_: 2
|
|
1669
1669
|
}, 1032, ["onClick"]),
|
|
1670
|
-
|
|
1670
|
+
A(ae, {
|
|
1671
1671
|
icon: "",
|
|
1672
1672
|
size: "x-small",
|
|
1673
1673
|
variant: "text",
|
|
@@ -1675,11 +1675,11 @@ const Ya = {
|
|
|
1675
1675
|
onClick: k[6] || (k[6] = H((dt) => re(), ["stop"]))
|
|
1676
1676
|
}, {
|
|
1677
1677
|
default: F(() => [
|
|
1678
|
-
|
|
1679
|
-
|
|
1678
|
+
A(Me, { icon: "mdi-close" }),
|
|
1679
|
+
A(Ke, {
|
|
1680
1680
|
anchor: "bottom",
|
|
1681
1681
|
activator: "parent",
|
|
1682
|
-
text:
|
|
1682
|
+
text: N(E)("common.button.cancel")
|
|
1683
1683
|
}, null, 8, ["text"])
|
|
1684
1684
|
]),
|
|
1685
1685
|
_: 1
|
|
@@ -1693,26 +1693,26 @@ const Ya = {
|
|
|
1693
1693
|
]),
|
|
1694
1694
|
_: 1
|
|
1695
1695
|
}),
|
|
1696
|
-
|
|
1696
|
+
A(Jt, null, {
|
|
1697
1697
|
default: F(() => [
|
|
1698
|
-
|
|
1699
|
-
|
|
1698
|
+
A(Xt),
|
|
1699
|
+
A(D, {
|
|
1700
1700
|
"data-cy": "button-cancel",
|
|
1701
|
-
onClick: k[8] || (k[8] = H((
|
|
1701
|
+
onClick: k[8] || (k[8] = H((V) => c("onClose"), ["stop"]))
|
|
1702
1702
|
}, {
|
|
1703
1703
|
default: F(() => [
|
|
1704
|
-
|
|
1704
|
+
Q(j(N(E)("common.button.cancel")), 1)
|
|
1705
1705
|
]),
|
|
1706
1706
|
_: 1
|
|
1707
1707
|
}),
|
|
1708
|
-
|
|
1708
|
+
A(na, {
|
|
1709
1709
|
"data-cy": "button-confirm",
|
|
1710
1710
|
loading: t.value,
|
|
1711
|
-
disabled: !
|
|
1711
|
+
disabled: !N($)(a.value),
|
|
1712
1712
|
onClick: H(Se, ["stop"])
|
|
1713
1713
|
}, {
|
|
1714
1714
|
default: F(() => [
|
|
1715
|
-
|
|
1715
|
+
Q(j(N(E)("common.button.confirm")), 1)
|
|
1716
1716
|
]),
|
|
1717
1717
|
_: 1
|
|
1718
1718
|
}, 8, ["loading", "disabled"])
|
|
@@ -1727,7 +1727,7 @@ const Ya = {
|
|
|
1727
1727
|
});
|
|
1728
1728
|
};
|
|
1729
1729
|
}
|
|
1730
|
-
}), ll = /* @__PURE__ */
|
|
1730
|
+
}), ll = /* @__PURE__ */ W({
|
|
1731
1731
|
__name: "AFilterBookmarkButton",
|
|
1732
1732
|
props: /* @__PURE__ */ Ae({
|
|
1733
1733
|
client: {},
|
|
@@ -1747,9 +1747,9 @@ const Ya = {
|
|
|
1747
1747
|
setup(f) {
|
|
1748
1748
|
const y = we(f, "dialog"), e = (g) => {
|
|
1749
1749
|
Nt(g), y.value = !0;
|
|
1750
|
-
}, { t: c } =
|
|
1751
|
-
return (g, b) => (S(), L(
|
|
1752
|
-
|
|
1750
|
+
}, { t: c } = X();
|
|
1751
|
+
return (g, b) => (S(), L(ce, null, [
|
|
1752
|
+
A(ae, {
|
|
1753
1753
|
class: Ve([g.buttonClass, "px-2"]),
|
|
1754
1754
|
"data-cy": g.dataCy,
|
|
1755
1755
|
color: "light",
|
|
@@ -1758,23 +1758,23 @@ const Ya = {
|
|
|
1758
1758
|
onClick: H(e, ["stop"])
|
|
1759
1759
|
}, {
|
|
1760
1760
|
default: F(() => [
|
|
1761
|
-
|
|
1761
|
+
A(Me, {
|
|
1762
1762
|
color: "grey darken-1",
|
|
1763
1763
|
icon: "mdi-bookmark-outline"
|
|
1764
1764
|
}),
|
|
1765
|
-
|
|
1765
|
+
A(Ke, {
|
|
1766
1766
|
activator: "parent",
|
|
1767
1767
|
location: "bottom"
|
|
1768
1768
|
}, {
|
|
1769
1769
|
default: F(() => [
|
|
1770
|
-
|
|
1770
|
+
Q(j(N(c)(g.tooltipT)), 1)
|
|
1771
1771
|
]),
|
|
1772
1772
|
_: 1
|
|
1773
1773
|
})
|
|
1774
1774
|
]),
|
|
1775
1775
|
_: 1
|
|
1776
1776
|
}, 8, ["class", "data-cy"]),
|
|
1777
|
-
y.value ? (S(),
|
|
1777
|
+
y.value ? (S(), q(al, {
|
|
1778
1778
|
key: 0,
|
|
1779
1779
|
client: g.client,
|
|
1780
1780
|
system: g.system,
|
|
@@ -1785,7 +1785,7 @@ const Ya = {
|
|
|
1785
1785
|
}, null, 8, ["client", "system", "user", "system-resource", "datatable-hidden-columns"])) : se("", !0)
|
|
1786
1786
|
], 64));
|
|
1787
1787
|
}
|
|
1788
|
-
}), ol = { key: 0 }, nl = 32, rl = /* @__PURE__ */
|
|
1788
|
+
}), ol = { key: 0 }, nl = 32, rl = /* @__PURE__ */ W({
|
|
1789
1789
|
__name: "FilterBookmarks",
|
|
1790
1790
|
props: /* @__PURE__ */ Ae({
|
|
1791
1791
|
client: {},
|
|
@@ -1804,7 +1804,7 @@ const Ya = {
|
|
|
1804
1804
|
const e = f, c = y, g = we(f, "datatableHiddenColumns"), b = w(Z), h = w(ne), s = w(st);
|
|
1805
1805
|
if (d(s) || d(b) || d(h))
|
|
1806
1806
|
throw new Error("Incorrect provide/inject config.");
|
|
1807
|
-
const i =
|
|
1807
|
+
const i = R(!1), o = xt("toolbar"), v = R(300), t = R(1e3), r = oa(), { useFetchUserAdminConfigList: m } = la(e.client, e.system), l = async (x = !1) => {
|
|
1808
1808
|
i.value = !0, await r.getBookmarks(
|
|
1809
1809
|
{
|
|
1810
1810
|
system: e.system,
|
|
@@ -1813,103 +1813,105 @@ const Ya = {
|
|
|
1813
1813
|
systemResource: e.systemResource
|
|
1814
1814
|
},
|
|
1815
1815
|
m,
|
|
1816
|
-
|
|
1816
|
+
x
|
|
1817
1817
|
), i.value = !1;
|
|
1818
|
-
}, { deserializeFilters: a } = aa(h, b, e.systemResource),
|
|
1819
|
-
const
|
|
1820
|
-
He(
|
|
1821
|
-
const
|
|
1822
|
-
if (
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1818
|
+
}, { deserializeFilters: a, resetFilter: u } = aa(h, b, e.systemResource), n = (x) => {
|
|
1819
|
+
const B = x.data;
|
|
1820
|
+
He(B.datatableHiddenColumns) && (g.value = B.datatableHiddenColumns), He(B.sortBy) && (s.value = { ...s.value, sortBy: { key: B.sortBy.key, order: B.sortBy.order } });
|
|
1821
|
+
const U = a(B.filter);
|
|
1822
|
+
if (!$(U)) {
|
|
1823
|
+
u(s);
|
|
1824
|
+
for (const P in h) {
|
|
1825
|
+
const K = P, G = U.filters[K];
|
|
1826
|
+
d(G) || (h[K] = G);
|
|
1826
1827
|
}
|
|
1827
1828
|
c("submit");
|
|
1828
1829
|
}
|
|
1829
|
-
},
|
|
1830
|
-
const
|
|
1831
|
-
if (
|
|
1830
|
+
}, _ = async (x) => {
|
|
1831
|
+
const B = o.value;
|
|
1832
|
+
if ($(B)) return;
|
|
1832
1833
|
t.value = 1e3, await $e();
|
|
1833
|
-
let
|
|
1834
|
-
for (let
|
|
1835
|
-
const
|
|
1836
|
-
if (
|
|
1834
|
+
let U = 0, P = 0;
|
|
1835
|
+
for (let K = 0; K < B.children.length; K++) {
|
|
1836
|
+
const ue = B.children[K].offsetWidth;
|
|
1837
|
+
if (U += ue, U >= x - nl)
|
|
1837
1838
|
break;
|
|
1838
|
-
|
|
1839
|
+
P++;
|
|
1839
1840
|
}
|
|
1840
|
-
t.value =
|
|
1841
|
+
t.value = P;
|
|
1841
1842
|
};
|
|
1842
|
-
Aa(o, (
|
|
1843
|
-
|
|
1843
|
+
Aa(o, (x) => {
|
|
1844
|
+
x[0] && (v.value = x[0].contentRect.width);
|
|
1844
1845
|
}), _a(
|
|
1845
1846
|
v,
|
|
1846
|
-
(
|
|
1847
|
-
|
|
1847
|
+
(x, B) => {
|
|
1848
|
+
x !== B && _(x);
|
|
1848
1849
|
},
|
|
1849
1850
|
{ throttle: 1e3 }
|
|
1850
1851
|
);
|
|
1851
|
-
const
|
|
1852
|
-
const
|
|
1853
|
-
return (
|
|
1854
|
-
}),
|
|
1855
|
-
const
|
|
1852
|
+
const T = I(() => {
|
|
1853
|
+
const x = r.generateKey(e.system, Ce.Desktop, e.systemResource), B = r.bookmarks.get(x);
|
|
1854
|
+
return (B == null ? void 0 : B.items) ?? [];
|
|
1855
|
+
}), M = I(() => {
|
|
1856
|
+
const x = t.value;
|
|
1856
1857
|
return {
|
|
1857
|
-
visible:
|
|
1858
|
-
hidden:
|
|
1858
|
+
visible: T.value.slice(0, x),
|
|
1859
|
+
hidden: T.value.slice(x)
|
|
1859
1860
|
};
|
|
1860
1861
|
});
|
|
1861
|
-
return
|
|
1862
|
-
|
|
1863
|
-
|
|
1862
|
+
return Y([i, () => T.value.length], ([x]) => {
|
|
1863
|
+
x === !0 || $(o.value) || (v.value = o.value.clientWidth, $e(() => {
|
|
1864
|
+
_(v.value);
|
|
1864
1865
|
}));
|
|
1865
1866
|
}), Et(() => {
|
|
1866
1867
|
l();
|
|
1867
|
-
}), (
|
|
1868
|
+
}), (x, B) => (S(), L("div", {
|
|
1868
1869
|
ref: "toolbar",
|
|
1869
|
-
key:
|
|
1870
|
-
class: "w-100 d-flex overflow-hidden align-center"
|
|
1870
|
+
key: T.value.length,
|
|
1871
|
+
class: "w-100 d-flex overflow-hidden align-center mb-1"
|
|
1871
1872
|
}, [
|
|
1872
|
-
i.value ? (S(), L("div", ol)) : (S(), L(
|
|
1873
|
-
(S(!0), L(
|
|
1874
|
-
key:
|
|
1873
|
+
i.value ? (S(), L("div", ol)) : (S(), L(ce, { key: 1 }, [
|
|
1874
|
+
(S(!0), L(ce, null, ke(M.value.visible, (U) => (S(), L("div", {
|
|
1875
|
+
key: U.id,
|
|
1875
1876
|
class: "white-space-nowrap"
|
|
1876
1877
|
}, [
|
|
1877
|
-
|
|
1878
|
+
A(ae, {
|
|
1878
1879
|
text: "",
|
|
1880
|
+
"prepend-icon": "mdi-bookmark-outline",
|
|
1879
1881
|
size: "small",
|
|
1880
|
-
|
|
1882
|
+
class: "mr-1 mb-1 bg-grey-lighten-4 text-grey-darken-3",
|
|
1883
|
+
onClick: (P) => n(U)
|
|
1881
1884
|
}, {
|
|
1882
1885
|
default: F(() => [
|
|
1883
|
-
|
|
1886
|
+
Q(j(U.customName), 1)
|
|
1884
1887
|
]),
|
|
1885
1888
|
_: 2
|
|
1886
1889
|
}, 1032, ["onClick"])
|
|
1887
1890
|
]))), 128)),
|
|
1888
|
-
|
|
1891
|
+
M.value.hidden.length > 0 ? (S(), q(Zt, {
|
|
1889
1892
|
key: 0,
|
|
1890
1893
|
bottom: "",
|
|
1891
1894
|
"offset-y": ""
|
|
1892
1895
|
}, {
|
|
1893
|
-
activator: F(({ props:
|
|
1894
|
-
|
|
1896
|
+
activator: F(({ props: U }) => [
|
|
1897
|
+
A(ae, De({
|
|
1895
1898
|
icon: "mdi-menu-down",
|
|
1896
1899
|
size: "x-small",
|
|
1897
1900
|
width: 28,
|
|
1898
|
-
height: 28
|
|
1899
|
-
|
|
1900
|
-
}, B), null, 16)
|
|
1901
|
+
height: 28
|
|
1902
|
+
}, U), null, 16)
|
|
1901
1903
|
]),
|
|
1902
1904
|
default: F(() => [
|
|
1903
|
-
|
|
1905
|
+
A(Kt, { density: "compact" }, {
|
|
1904
1906
|
default: F(() => [
|
|
1905
|
-
(S(!0), L(
|
|
1906
|
-
key:
|
|
1907
|
-
onClick: (
|
|
1907
|
+
(S(!0), L(ce, null, ke(M.value.hidden, (U) => (S(), q(Ue, {
|
|
1908
|
+
key: U.id,
|
|
1909
|
+
onClick: (P) => n(U)
|
|
1908
1910
|
}, {
|
|
1909
1911
|
default: F(() => [
|
|
1910
|
-
|
|
1912
|
+
A(Wt, null, {
|
|
1911
1913
|
default: F(() => [
|
|
1912
|
-
|
|
1914
|
+
Q(j(U.customName), 1)
|
|
1913
1915
|
]),
|
|
1914
1916
|
_: 2
|
|
1915
1917
|
}, 1024)
|
|
@@ -1925,7 +1927,7 @@ const Ya = {
|
|
|
1925
1927
|
], 64))
|
|
1926
1928
|
]));
|
|
1927
1929
|
}
|
|
1928
|
-
}), sl = { class: "d-flex flex-wrap align-center" }, il = { class: "a-filter__container" }, ul = { class: "a-filter__search" }, cl = { class: "mt-6 pa-4 system-border-a" }, Jl = /* @__PURE__ */
|
|
1930
|
+
}), sl = { class: "d-flex flex-wrap align-center" }, il = { class: "a-filter__container" }, ul = { class: "a-filter__search" }, cl = { class: "mt-6 pa-4 system-border-a" }, Jl = /* @__PURE__ */ W({
|
|
1929
1931
|
__name: "AFilterWrapper",
|
|
1930
1932
|
props: /* @__PURE__ */ Ae({
|
|
1931
1933
|
enableTop: { type: Boolean, default: !1 },
|
|
@@ -1950,19 +1952,19 @@ const Ya = {
|
|
|
1950
1952
|
emits: /* @__PURE__ */ Ae(["submit", "bookmarkLoadAfter", "reset"], ["update:datatableHiddenColumns", "update:showDetail", "update:touched"]),
|
|
1951
1953
|
setup(f, { expose: y, emit: e }) {
|
|
1952
1954
|
const c = e, g = we(f, "datatableHiddenColumns"), b = we(f, "showDetail"), h = we(f, "touched");
|
|
1953
|
-
mt(
|
|
1955
|
+
mt(me, h);
|
|
1954
1956
|
const s = w(Z), i = w(ne);
|
|
1955
1957
|
if (d(s) || d(i))
|
|
1956
1958
|
throw new Error("Incorrect provide/inject config.");
|
|
1957
|
-
const o =
|
|
1958
|
-
mt(
|
|
1959
|
-
const v =
|
|
1960
|
-
mt(
|
|
1959
|
+
const o = R(0);
|
|
1960
|
+
mt(ye, o);
|
|
1961
|
+
const v = R(/* @__PURE__ */ new Map());
|
|
1962
|
+
mt(de, v);
|
|
1961
1963
|
const t = () => {
|
|
1962
1964
|
h.value = !1, o.value++, $e(() => {
|
|
1963
1965
|
c("submit");
|
|
1964
1966
|
});
|
|
1965
|
-
}, { clearAll: r } =
|
|
1967
|
+
}, { clearAll: r } = he(), m = () => {
|
|
1966
1968
|
h.value = !1, r(i, s), v.value.clear(), $e(() => {
|
|
1967
1969
|
o.value++, c("reset");
|
|
1968
1970
|
});
|
|
@@ -1972,32 +1974,32 @@ const Ya = {
|
|
|
1972
1974
|
return y({
|
|
1973
1975
|
submit: t,
|
|
1974
1976
|
reset: m
|
|
1975
|
-
}), (a, u) => (S(),
|
|
1977
|
+
}), (a, u) => (S(), q(Sa, {
|
|
1976
1978
|
name: a.formName,
|
|
1977
1979
|
onSubmit: H(t, ["prevent"])
|
|
1978
1980
|
}, {
|
|
1979
1981
|
default: F(() => [
|
|
1980
|
-
a.enableTop ? (S(),
|
|
1982
|
+
a.enableTop ? (S(), q(qe, {
|
|
1981
1983
|
key: 0,
|
|
1982
1984
|
dense: ""
|
|
1983
1985
|
}, {
|
|
1984
1986
|
default: F(() => [
|
|
1985
|
-
|
|
1987
|
+
A(Fe, null, {
|
|
1986
1988
|
default: F(() => [
|
|
1987
|
-
|
|
1989
|
+
pe(a.$slots, "top")
|
|
1988
1990
|
]),
|
|
1989
1991
|
_: 3
|
|
1990
1992
|
})
|
|
1991
1993
|
]),
|
|
1992
1994
|
_: 3
|
|
1993
1995
|
})) : se("", !0),
|
|
1994
|
-
|
|
1996
|
+
A(qe, { dense: "" }, {
|
|
1995
1997
|
default: F(() => [
|
|
1996
|
-
a.bookmarkSystemResource && a.userId && a.system &&
|
|
1998
|
+
a.bookmarkSystemResource && a.userId && a.system && N(He)(a.client) ? (S(), q(Fe, { key: 0 }, {
|
|
1997
1999
|
default: F(() => [
|
|
1998
|
-
|
|
2000
|
+
pe(a.$slots, "bookmarks", {}, () => [
|
|
1999
2001
|
te("div", sl, [
|
|
2000
|
-
|
|
2002
|
+
A(rl, {
|
|
2001
2003
|
"datatable-hidden-columns": g.value,
|
|
2002
2004
|
"onUpdate:datatableHiddenColumns": u[0] || (u[0] = (n) => g.value = n),
|
|
2003
2005
|
client: a.client,
|
|
@@ -2014,38 +2016,38 @@ const Ya = {
|
|
|
2014
2016
|
]),
|
|
2015
2017
|
_: 3
|
|
2016
2018
|
}),
|
|
2017
|
-
|
|
2019
|
+
A(qe, { dense: "" }, {
|
|
2018
2020
|
default: F(() => [
|
|
2019
|
-
|
|
2021
|
+
A(Fe, { cols: "auto" }, {
|
|
2020
2022
|
default: F(() => [
|
|
2021
|
-
|
|
2023
|
+
A(za, {
|
|
2022
2024
|
"button-active": b.value,
|
|
2023
2025
|
onAdvancedFilter: l
|
|
2024
2026
|
}, null, 8, ["button-active"])
|
|
2025
2027
|
]),
|
|
2026
2028
|
_: 1
|
|
2027
2029
|
}),
|
|
2028
|
-
|
|
2030
|
+
A(Fe, null, {
|
|
2029
2031
|
default: F(() => [
|
|
2030
2032
|
te("div", il, [
|
|
2031
2033
|
te("div", ul, [
|
|
2032
|
-
|
|
2034
|
+
pe(a.$slots, "search")
|
|
2033
2035
|
]),
|
|
2034
|
-
|
|
2036
|
+
A(La)
|
|
2035
2037
|
])
|
|
2036
2038
|
]),
|
|
2037
2039
|
_: 3
|
|
2038
2040
|
}),
|
|
2039
|
-
a.hideButtons ? se("", !0) : (S(),
|
|
2041
|
+
a.hideButtons ? se("", !0) : (S(), q(Fe, {
|
|
2040
2042
|
key: 0,
|
|
2041
2043
|
class: "text-right",
|
|
2042
2044
|
cols: "auto"
|
|
2043
2045
|
}, {
|
|
2044
2046
|
default: F(() => [
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
a.bookmarkSystemResource && a.userId && a.system &&
|
|
2047
|
+
pe(a.$slots, "buttons", {}, () => [
|
|
2048
|
+
A(ya, { touched: h.value }, null, 8, ["touched"]),
|
|
2049
|
+
A(ha, { onReset: m }),
|
|
2050
|
+
a.bookmarkSystemResource && a.userId && a.system && N(He)(a.client) ? (S(), q(ll, {
|
|
2049
2051
|
key: 0,
|
|
2050
2052
|
client: a.client,
|
|
2051
2053
|
system: a.system,
|
|
@@ -2061,13 +2063,13 @@ const Ya = {
|
|
|
2061
2063
|
_: 3
|
|
2062
2064
|
}),
|
|
2063
2065
|
te("div", null, [
|
|
2064
|
-
|
|
2066
|
+
A(Ia, null, {
|
|
2065
2067
|
default: F(() => [
|
|
2066
2068
|
ia(te("div", cl, [
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
+
pe(a.$slots, "detail", {}, () => [
|
|
2070
|
+
A(qe, null, {
|
|
2069
2071
|
default: F(() => [
|
|
2070
|
-
(S(!0), L(
|
|
2072
|
+
(S(!0), L(ce, null, ke(N(s).fields, (n) => (S(), q(Fe, {
|
|
2071
2073
|
key: n.name,
|
|
2072
2074
|
cols: n.render.xs,
|
|
2073
2075
|
sm: n.render.sm,
|
|
@@ -2077,8 +2079,8 @@ const Ya = {
|
|
|
2077
2079
|
class: Ve({ "d-none": n.render.skip })
|
|
2078
2080
|
}, {
|
|
2079
2081
|
default: F(() => [
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
+
pe(a.$slots, N(ga)(n.name), { itemConfig: n }, () => [
|
|
2083
|
+
A(ja, {
|
|
2082
2084
|
name: n.name
|
|
2083
2085
|
}, null, 8, ["name"])
|
|
2084
2086
|
])
|
|
@@ -2100,7 +2102,7 @@ const Ya = {
|
|
|
2100
2102
|
_: 3
|
|
2101
2103
|
}, 8, ["name"]));
|
|
2102
2104
|
}
|
|
2103
|
-
}), dl = { class: "d-flex align-center justify-center" }, ml = { class: "text-caption mr-1" }, Yl = /* @__PURE__ */
|
|
2105
|
+
}), dl = { class: "d-flex align-center justify-center" }, ml = { class: "text-caption mr-1" }, Yl = /* @__PURE__ */ W({
|
|
2104
2106
|
__name: "ADatatableOrdering",
|
|
2105
2107
|
props: /* @__PURE__ */ Ae({
|
|
2106
2108
|
variant: { default: "default" },
|
|
@@ -2118,7 +2120,7 @@ const Ya = {
|
|
|
2118
2120
|
const e = f, c = y, g = we(f, "modelValue"), b = w(st);
|
|
2119
2121
|
if (d(b))
|
|
2120
2122
|
throw new Error("Incorrect provide/inject config.");
|
|
2121
|
-
const { t: h } =
|
|
2123
|
+
const { t: h } = X(), s = [
|
|
2122
2124
|
{ id: 1, titleT: "common.system.datatable.ordering.mostRecent", sortBy: { key: "createdAt", order: "desc" } },
|
|
2123
2125
|
{ id: 2, titleT: "common.system.datatable.ordering.oldest", sortBy: { key: "createdAt", order: "asc" } }
|
|
2124
2126
|
], i = [
|
|
@@ -2133,7 +2135,7 @@ const Ya = {
|
|
|
2133
2135
|
}, r = (m) => {
|
|
2134
2136
|
m.sortBy || (b.value = { ...b.value, sortBy: null, descending: !0 }, c("sortByChange", m)), b.value.sortBy = m.sortBy, c("sortByChange", m);
|
|
2135
2137
|
};
|
|
2136
|
-
return
|
|
2138
|
+
return Y(
|
|
2137
2139
|
g,
|
|
2138
2140
|
(m, l) => {
|
|
2139
2141
|
if (m === l) return;
|
|
@@ -2147,50 +2149,50 @@ const Ya = {
|
|
|
2147
2149
|
}
|
|
2148
2150
|
},
|
|
2149
2151
|
{ immediate: !0 }
|
|
2150
|
-
),
|
|
2152
|
+
), Y(
|
|
2151
2153
|
b,
|
|
2152
2154
|
(m, l) => {
|
|
2153
|
-
var u, n,
|
|
2154
|
-
if (((u = m.sortBy) == null ? void 0 : u.key) === ((n = l == null ? void 0 : l.sortBy) == null ? void 0 : n.key) && ((
|
|
2155
|
+
var u, n, _, T;
|
|
2156
|
+
if (((u = m.sortBy) == null ? void 0 : u.key) === ((n = l == null ? void 0 : l.sortBy) == null ? void 0 : n.key) && ((_ = m.sortBy) == null ? void 0 : _.order) === ((T = l == null ? void 0 : l.sortBy) == null ? void 0 : T.order))
|
|
2155
2157
|
return;
|
|
2156
|
-
const a = v.value.find((
|
|
2157
|
-
var
|
|
2158
|
-
return ((
|
|
2158
|
+
const a = v.value.find((M) => {
|
|
2159
|
+
var x, B, U, P;
|
|
2160
|
+
return ((x = m.sortBy) == null ? void 0 : x.key) === ((B = M.sortBy) == null ? void 0 : B.key) && ((U = m.sortBy) == null ? void 0 : U.order) === ((P = M.sortBy) == null ? void 0 : P.order);
|
|
2159
2161
|
});
|
|
2160
2162
|
d(a) || (g.value = a.id);
|
|
2161
2163
|
},
|
|
2162
2164
|
{ immediate: !0 }
|
|
2163
2165
|
), (m, l) => (S(), L("div", dl, [
|
|
2164
|
-
te("div", ml, j(
|
|
2165
|
-
|
|
2166
|
+
te("div", ml, j(N(h)("common.system.datatable.ordering.title")) + ": ", 1),
|
|
2167
|
+
A(ae, {
|
|
2166
2168
|
variant: "text",
|
|
2167
2169
|
rounded: "xl",
|
|
2168
2170
|
size: "small",
|
|
2169
2171
|
"append-icon": "mdi-chevron-down"
|
|
2170
2172
|
}, {
|
|
2171
2173
|
default: F(() => [
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
+
Q(j(o.value) + " ", 1),
|
|
2175
|
+
A(Zt, {
|
|
2174
2176
|
activator: "parent",
|
|
2175
2177
|
location: "bottom",
|
|
2176
2178
|
"close-on-content-click": ""
|
|
2177
2179
|
}, {
|
|
2178
2180
|
default: F(() => [
|
|
2179
|
-
|
|
2181
|
+
A(Kt, {
|
|
2180
2182
|
density: "compact",
|
|
2181
2183
|
class: "pa-0"
|
|
2182
2184
|
}, {
|
|
2183
2185
|
default: F(() => [
|
|
2184
|
-
(S(!0), L(
|
|
2186
|
+
(S(!0), L(ce, null, ke(v.value, (a) => (S(), q(Ue, {
|
|
2185
2187
|
key: a.id,
|
|
2186
2188
|
onClick: (u) => t(a)
|
|
2187
2189
|
}, {
|
|
2188
2190
|
default: F(() => [
|
|
2189
|
-
|
|
2191
|
+
A(Wt, {
|
|
2190
2192
|
class: Ve({ "font-weight-bold": a.id === g.value })
|
|
2191
2193
|
}, {
|
|
2192
2194
|
default: F(() => [
|
|
2193
|
-
|
|
2195
|
+
Q(j(N(h)(a.titleT)), 1)
|
|
2194
2196
|
]),
|
|
2195
2197
|
_: 2
|
|
2196
2198
|
}, 1032, ["class"])
|
|
@@ -2211,7 +2213,7 @@ const Ya = {
|
|
|
2211
2213
|
}), fl = { class: "anzu-data-footer" }, vl = {
|
|
2212
2214
|
key: 0,
|
|
2213
2215
|
class: "anzu-data-footer__page-limit"
|
|
2214
|
-
}, pl = { class: "anzu-data-footer__pagination" }, yl = { class: "anzu-data-footer__icons-before" }, hl = { class: "current-page" }, gl = { class: "anzu-data-footer__icons-after" }, Xl = /* @__PURE__ */
|
|
2216
|
+
}, pl = { class: "anzu-data-footer__pagination" }, yl = { class: "anzu-data-footer__icons-before" }, hl = { class: "current-page" }, gl = { class: "anzu-data-footer__icons-after" }, Xl = /* @__PURE__ */ W({
|
|
2215
2217
|
__name: "ADatatablePagination",
|
|
2216
2218
|
props: {
|
|
2217
2219
|
itemsPerPageOptions: { default: () => [10, 25, 50] },
|
|
@@ -2222,13 +2224,13 @@ const Ya = {
|
|
|
2222
2224
|
const e = y, c = w(st);
|
|
2223
2225
|
if (d(c))
|
|
2224
2226
|
throw new Error("Incorrect provide/inject config.");
|
|
2225
|
-
const { t: g } =
|
|
2226
|
-
|
|
2227
|
+
const { t: g } = X(), b = I(() => Math.ceil(c.value.totalCount / c.value.rowsPerPage)), h = I(() => c.value.page * c.value.rowsPerPage - c.value.rowsPerPage + 1), s = I(() => c.value.page * c.value.rowsPerPage - c.value.rowsPerPage + c.value.currentViewCount), i = I(() => c.value.page === 1), o = I(() => !$(c.value.hasNextPage) || c.value.page === b.value), v = I(() => $(c.value.hasNextPage) && c.value.page === b.value || c.value.hasNextPage === !1), t = I(() => $(c.value.hasNextPage) ? c.value.totalCount : c.value.hasNextPage ? s.value + 1 + "+" : s.value);
|
|
2228
|
+
Y(
|
|
2227
2229
|
() => c.value.rowsPerPage,
|
|
2228
2230
|
(u, n) => {
|
|
2229
2231
|
u !== n && (c.value.page = 1, e("change"));
|
|
2230
2232
|
}
|
|
2231
|
-
),
|
|
2233
|
+
), Y(
|
|
2232
2234
|
() => c.value.page,
|
|
2233
2235
|
(u, n) => {
|
|
2234
2236
|
u !== n && e("change");
|
|
@@ -2245,26 +2247,26 @@ const Ya = {
|
|
|
2245
2247
|
};
|
|
2246
2248
|
return (u, n) => (S(), L("div", fl, [
|
|
2247
2249
|
u.hideRecordsPerPage ? se("", !0) : (S(), L("div", vl, [
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
modelValue:
|
|
2251
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
2250
|
+
Q(j(N(g)("common.system.datatable.itemsPerPage")) + ": ", 1),
|
|
2251
|
+
A(Pa, {
|
|
2252
|
+
modelValue: N(c).rowsPerPage,
|
|
2253
|
+
"onUpdate:modelValue": n[0] || (n[0] = (_) => N(c).rowsPerPage = _),
|
|
2252
2254
|
class: "ml-2",
|
|
2253
2255
|
density: "compact",
|
|
2254
2256
|
mandatory: "",
|
|
2255
2257
|
"data-cy": "table-size"
|
|
2256
2258
|
}, {
|
|
2257
2259
|
default: F(() => [
|
|
2258
|
-
(S(!0), L(
|
|
2259
|
-
key:
|
|
2260
|
-
color:
|
|
2261
|
-
value:
|
|
2260
|
+
(S(!0), L(ce, null, ke(u.itemsPerPageOptions, (_) => (S(), q(ae, {
|
|
2261
|
+
key: _,
|
|
2262
|
+
color: _ === N(c).rowsPerPage ? "secondary" : "",
|
|
2263
|
+
value: _,
|
|
2262
2264
|
density: "compact",
|
|
2263
2265
|
size: "small",
|
|
2264
2266
|
variant: "text"
|
|
2265
2267
|
}, {
|
|
2266
2268
|
default: F(() => [
|
|
2267
|
-
|
|
2269
|
+
Q(j(_), 1)
|
|
2268
2270
|
]),
|
|
2269
2271
|
_: 2
|
|
2270
2272
|
}, 1032, ["color", "value"]))), 128))
|
|
@@ -2272,16 +2274,16 @@ const Ya = {
|
|
|
2272
2274
|
_: 1
|
|
2273
2275
|
}, 8, ["modelValue"])
|
|
2274
2276
|
])),
|
|
2275
|
-
te("div", pl, j(h.value) + " - " + j(s.value) + " " + j(
|
|
2277
|
+
te("div", pl, j(h.value) + " - " + j(s.value) + " " + j(N(g)("common.system.datatable.from")) + " " + j(t.value), 1),
|
|
2276
2278
|
te("div", yl, [
|
|
2277
|
-
|
|
2279
|
+
A(ae, {
|
|
2278
2280
|
disabled: i.value,
|
|
2279
2281
|
icon: "mdi-page-first",
|
|
2280
2282
|
size: "small",
|
|
2281
2283
|
variant: "text",
|
|
2282
2284
|
onClick: H(r, ["stop"])
|
|
2283
2285
|
}, null, 8, ["disabled"]),
|
|
2284
|
-
|
|
2286
|
+
A(ae, {
|
|
2285
2287
|
disabled: i.value,
|
|
2286
2288
|
icon: "mdi-chevron-left",
|
|
2287
2289
|
size: "small",
|
|
@@ -2290,17 +2292,17 @@ const Ya = {
|
|
|
2290
2292
|
}, null, 8, ["disabled"])
|
|
2291
2293
|
]),
|
|
2292
2294
|
te("div", hl, [
|
|
2293
|
-
te("span", null, j(
|
|
2295
|
+
te("span", null, j(N(c).page), 1)
|
|
2294
2296
|
]),
|
|
2295
2297
|
te("div", gl, [
|
|
2296
|
-
|
|
2298
|
+
A(ae, {
|
|
2297
2299
|
disabled: v.value,
|
|
2298
2300
|
icon: "mdi-chevron-right",
|
|
2299
2301
|
size: "small",
|
|
2300
2302
|
variant: "text",
|
|
2301
2303
|
onClick: H(a, ["stop"])
|
|
2302
2304
|
}, null, 8, ["disabled"]),
|
|
2303
|
-
|
|
2305
|
+
A(ae, {
|
|
2304
2306
|
disabled: o.value,
|
|
2305
2307
|
icon: "mdi-page-last",
|
|
2306
2308
|
size: "small",
|
|
@@ -2351,41 +2353,41 @@ const Ya = {
|
|
|
2351
2353
|
try {
|
|
2352
2354
|
const a = i.general.elastic || l ? "/search" : "", u = Ne({ key: t, order: r ? "desc" : "asc" });
|
|
2353
2355
|
u.value.rowsPerPage = m;
|
|
2354
|
-
const n = (d(v) ? o : Qe(o, v)) + a,
|
|
2356
|
+
const n = (d(v) ? o : Qe(o, v)) + a, _ = [], T = await f().get(n + Le(u, s, i), {
|
|
2355
2357
|
...c,
|
|
2356
2358
|
signal: g.signal
|
|
2357
2359
|
});
|
|
2358
2360
|
if (!Ge(T.status))
|
|
2359
2361
|
throw new Je(T.status);
|
|
2360
2362
|
if (T.data) {
|
|
2361
|
-
const
|
|
2362
|
-
if (
|
|
2363
|
-
for (u.value.hasNextPage =
|
|
2363
|
+
const M = T.data;
|
|
2364
|
+
if (_.push(...M.data), zt(M))
|
|
2365
|
+
for (u.value.hasNextPage = M.hasNextPage; u.value.hasNextPage; ) {
|
|
2364
2366
|
u.value.page++;
|
|
2365
2367
|
const B = (await f().get(n + Le(u, s, i), {
|
|
2366
2368
|
...c,
|
|
2367
2369
|
signal: g.signal
|
|
2368
2370
|
})).data;
|
|
2369
|
-
|
|
2371
|
+
_.push(...B.data), u.value.hasNextPage = B.hasNextPage;
|
|
2370
2372
|
}
|
|
2371
|
-
else if (qt(
|
|
2372
|
-
if (u.value.totalCount =
|
|
2373
|
-
return
|
|
2374
|
-
const
|
|
2375
|
-
for (let
|
|
2376
|
-
const
|
|
2377
|
-
|
|
2378
|
-
f().get(n + Le(
|
|
2373
|
+
else if (qt(M)) {
|
|
2374
|
+
if (u.value.totalCount = M.totalCount, u.value.totalCount <= u.value.rowsPerPage)
|
|
2375
|
+
return _;
|
|
2376
|
+
const x = [], B = Math.ceil(u.value.totalCount / u.value.rowsPerPage);
|
|
2377
|
+
for (let P = 1; P < B; P++) {
|
|
2378
|
+
const K = { ...u.value, page: P + 1 }, G = R(K);
|
|
2379
|
+
x.push(
|
|
2380
|
+
f().get(n + Le(G, s, i), {
|
|
2379
2381
|
...c,
|
|
2380
2382
|
signal: g.signal
|
|
2381
2383
|
})
|
|
2382
2384
|
);
|
|
2383
2385
|
}
|
|
2384
|
-
(await Promise.all(
|
|
2385
|
-
|
|
2386
|
+
(await Promise.all(x)).forEach((P) => {
|
|
2387
|
+
_.push(...P.data.data);
|
|
2386
2388
|
});
|
|
2387
2389
|
}
|
|
2388
|
-
return
|
|
2390
|
+
return _;
|
|
2389
2391
|
}
|
|
2390
2392
|
if (T.status === Ye)
|
|
2391
2393
|
return [];
|
|
@@ -2422,13 +2424,13 @@ function to(f, y, e = void 0, c = void 0, g = !1, b = void 0, h = void 0, s = vo
|
|
|
2422
2424
|
const l = localStorage.getItem(s);
|
|
2423
2425
|
if (!l) return;
|
|
2424
2426
|
const a = JSON.parse(l);
|
|
2425
|
-
Dt(a) &&
|
|
2427
|
+
Dt(a) && z(a.hidden) && (y.value = a.hidden);
|
|
2426
2428
|
}, m = (l) => {
|
|
2427
2429
|
!s || !localStorage || localStorage.setItem(s, JSON.stringify({ hidden: l }));
|
|
2428
2430
|
};
|
|
2429
2431
|
return Et(() => {
|
|
2430
2432
|
r();
|
|
2431
|
-
}),
|
|
2433
|
+
}), Y(y, (l) => {
|
|
2432
2434
|
m(l);
|
|
2433
2435
|
}), {
|
|
2434
2436
|
columnsAll: v,
|