@anzusystems/common-admin 1.47.0-beta.191 → 1.47.0-beta.192
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 +792 -787
- package/dist/labs.js.map +1 -1
- package/package.json +2 -2
package/dist/labs.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { reactive as Pt, defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { g 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 Oe, watch as Y, ref as R, createSlots as Rt, withCtx as F, createVNode as _, unref as N, renderSlot as pe, resolveComponent as je, createElementBlock as L, Fragment as de, createCommentVNode as ie, createTextVNode as G, toDisplayString as j, normalizeClass as Ve, renderList as ke, createElementVNode as ae, toRaw as ra, resolveDynamicComponent as sa, useTemplateRef as xt, nextTick as we, mergeModels as Ae, useModel as Te, onMounted as Et, provide as ft, withDirectives as ia, vShow as ua } from "vue";
|
|
2
|
+
import { useI18n as X } from "vue-i18n";
|
|
3
|
+
import { g as Qe, n as z, d, h as O, q as At, o as Dt, p as _t, v as oe, l as De, Q as ca, at as ne, bc as Ot, ak as $t, R as $e, k as Ut, bn as vt, j as Mt, m as be, af as Ft, _ as da, y as Nt, f as ht, b6 as ma, b4 as fa, b3 as va, bo as pt, B as Ge, D as Je, E as Ye, ag as zt, ah as qt, H as Xe, F as ge, aB as Ze, G as et, I as tt, J as at, K as lt, L as ot, M as nt, N as rt, O as st, 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";
|
|
7
7
|
import { VAutocomplete as kt } from "vuetify/components/VAutocomplete";
|
|
8
8
|
import { VListItem as Ue, VList as Kt, VListItemTitle as Wt } from "vuetify/components/VList";
|
|
9
9
|
import { VChip as Vt } from "vuetify/components/VChip";
|
|
10
|
-
import
|
|
10
|
+
import gt from "@vuelidate/core";
|
|
11
11
|
import { VCard as Qt, VCardText as Gt, VCardActions as Jt } from "vuetify/components/VCard";
|
|
12
12
|
import { VDialog as Yt } from "vuetify/components/VDialog";
|
|
13
13
|
import { VSpacer as Xt, VRow as qe, VCol as Fe } from "vuetify/components/VGrid";
|
|
14
14
|
import { VTextarea as Fa } from "vuetify/components/VTextarea";
|
|
15
|
-
import { VBtn as
|
|
15
|
+
import { VBtn as le } from "vuetify/components/VBtn";
|
|
16
16
|
import { VIcon as Me } from "vuetify/components/VIcon";
|
|
17
17
|
import { VTooltip as Ke } from "vuetify/components/VTooltip";
|
|
18
18
|
import { defineStore as wa } from "pinia";
|
|
@@ -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
|
|
26
|
+
const re = Symbol.for("anzu:FilterDataKey"), ee = Symbol.for("anzu:FilterConfigKey"), ea = Symbol.for("anzu:FilterInnerDataKey"), ta = Symbol.for("anzu:FilterInnerConfigKey"), ye = Symbol.for("anzu:FilterSubmitResetCounterKey"), ce = Symbol.for("anzu:FilterSelectedKey"), me = Symbol.for("anzu:FilterTouchedKey"), it = Symbol.for("anzu:DatatablePaginationKey"), yt = "_sort", Ra = {
|
|
27
27
|
skip: !1,
|
|
28
28
|
xs: 12,
|
|
29
29
|
sm: 6,
|
|
@@ -31,26 +31,26 @@ const ne = Symbol.for("anzu:FilterDataKey"), Z = Symbol.for("anzu:FilterConfigKe
|
|
|
31
31
|
lg: 3,
|
|
32
32
|
xl: 2
|
|
33
33
|
};
|
|
34
|
-
function xa(
|
|
35
|
-
const c =
|
|
36
|
-
(
|
|
37
|
-
const u = s.name, l =
|
|
34
|
+
function xa(f, h, e) {
|
|
35
|
+
const c = f.reduce(
|
|
36
|
+
(p, s) => {
|
|
37
|
+
const u = s.name, l = Qe(h[u]);
|
|
38
38
|
return {
|
|
39
|
-
...
|
|
39
|
+
...p,
|
|
40
40
|
[u]: {
|
|
41
41
|
name: u,
|
|
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(l),
|
|
49
|
+
advanced: ve(s.advanced, !1),
|
|
50
|
+
related: ve(s.related, void 0),
|
|
51
|
+
exclude: ve(s.exclude, !1),
|
|
52
52
|
default: l,
|
|
53
|
-
render: { ...Ra, ...
|
|
53
|
+
render: { ...Ra, ...ve(s.render, {}) }
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
},
|
|
@@ -66,44 +66,44 @@ function xa(v, y, e) {
|
|
|
66
66
|
general: g,
|
|
67
67
|
fields: c
|
|
68
68
|
}),
|
|
69
|
-
filterData:
|
|
69
|
+
filterData: h
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return d(
|
|
72
|
+
function ve(f, h) {
|
|
73
|
+
return d(f) ? h : f;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const
|
|
75
|
+
function he() {
|
|
76
|
+
const f = (e, c, g) => {
|
|
77
77
|
var b;
|
|
78
|
-
(b = g.fields[e]) != null && b.clearable && (c[e] =
|
|
78
|
+
(b = g.fields[e]) != null && b.clearable && (c[e] = Qe(g.fields[e].default));
|
|
79
79
|
};
|
|
80
80
|
return {
|
|
81
|
-
clearOne:
|
|
81
|
+
clearOne: f,
|
|
82
82
|
clearAll: (e, c) => {
|
|
83
83
|
for (const g in c.fields)
|
|
84
|
-
|
|
84
|
+
f(g, e, c);
|
|
85
85
|
}
|
|
86
86
|
// resetFilter,
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function aa(
|
|
89
|
+
function aa(f, h, e = void 0) {
|
|
90
90
|
const c = "~", g = () => {
|
|
91
91
|
const a = {};
|
|
92
|
-
for (const n in
|
|
92
|
+
for (const n in f)
|
|
93
93
|
try {
|
|
94
|
-
const o = n, i =
|
|
95
|
-
!d(i) &&
|
|
94
|
+
const o = n, i = f[o];
|
|
95
|
+
!d(i) && !O(i) && !At(i) && i !== h.fields[o].default && (a[n] = i);
|
|
96
96
|
} catch {
|
|
97
97
|
}
|
|
98
98
|
return a;
|
|
99
99
|
}, b = (a, n, o) => {
|
|
100
100
|
const i = new URLSearchParams();
|
|
101
|
-
for (const
|
|
102
|
-
const T = a[
|
|
103
|
-
d(T) ||
|
|
101
|
+
for (const k in a) {
|
|
102
|
+
const T = a[k];
|
|
103
|
+
d(T) || O(T) || z(T) && At(T) || Dt(T) && _t(T) || (z(T) ? i.set(k, T.join(",")) : i.set(k, String(T)));
|
|
104
104
|
}
|
|
105
|
-
return i.size === 0 ? "" : (o && n.value.sortBy && i.set(
|
|
106
|
-
},
|
|
105
|
+
return i.size === 0 ? "" : (o && n.value.sortBy && i.set(yt, `${n.value.sortBy.key},${n.value.sortBy.order}`), i.toString() + c);
|
|
106
|
+
}, p = (a) => {
|
|
107
107
|
if (!a) return null;
|
|
108
108
|
if (a.startsWith("#") && (a = a.substring(1)), a.endsWith(c))
|
|
109
109
|
a = a.slice(0, -1);
|
|
@@ -116,34 +116,34 @@ function aa(v, y, e = void 0) {
|
|
|
116
116
|
}
|
|
117
117
|
const n = new URLSearchParams(a), o = {};
|
|
118
118
|
let i = null;
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
const [T,
|
|
122
|
-
T && (
|
|
119
|
+
const k = n.get(yt);
|
|
120
|
+
if (k) {
|
|
121
|
+
const [T, M] = k.split(",");
|
|
122
|
+
T && (M === "asc" || M === "desc") && (i = { key: T, order: M }), n.delete(yt);
|
|
123
123
|
}
|
|
124
|
-
for (const [T,
|
|
125
|
-
if (
|
|
126
|
-
const
|
|
127
|
-
o[T] =
|
|
124
|
+
for (const [T, M] of n.entries())
|
|
125
|
+
if (h.fields[T].multiple ?? !1) {
|
|
126
|
+
const U = M.split(","), P = U.every((V) => !isNaN(Number(V)));
|
|
127
|
+
o[T] = P ? U.map(Number) : U;
|
|
128
128
|
} else
|
|
129
|
-
o[T] =
|
|
129
|
+
o[T] = M;
|
|
130
130
|
return { filters: o, sortBy: i };
|
|
131
131
|
}, s = (a) => {
|
|
132
132
|
window.location.hash = a;
|
|
133
|
-
}, u = () =>
|
|
133
|
+
}, u = () => p(window.location.hash), l = (a) => {
|
|
134
134
|
!e || !localStorage || localStorage.setItem(e, a);
|
|
135
|
-
},
|
|
135
|
+
}, v = () => {
|
|
136
136
|
if (!e || !localStorage) return null;
|
|
137
137
|
const a = localStorage.getItem(e);
|
|
138
|
-
return !a || !
|
|
138
|
+
return !a || !oe(a) ? null : p(a);
|
|
139
139
|
};
|
|
140
140
|
return {
|
|
141
141
|
loadStoredFilters: () => {
|
|
142
142
|
let a = u();
|
|
143
|
-
if (
|
|
144
|
-
for (const n in
|
|
143
|
+
if (O(a) && (a = v()), O(a) || _t(a.filters)) return !1;
|
|
144
|
+
for (const n in f) {
|
|
145
145
|
const o = n, i = a.filters[o];
|
|
146
|
-
d(i) || (
|
|
146
|
+
d(i) || (f[o] = i);
|
|
147
147
|
}
|
|
148
148
|
return !0;
|
|
149
149
|
},
|
|
@@ -155,10 +155,10 @@ function aa(v, y, e = void 0) {
|
|
|
155
155
|
s(i), l(i), a.value = { ...a.value, page: 1 }, n && n();
|
|
156
156
|
},
|
|
157
157
|
serializeFilters: b,
|
|
158
|
-
deserializeFilters:
|
|
158
|
+
deserializeFilters: p
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
const Ea = /* @__PURE__ */
|
|
161
|
+
const Ea = /* @__PURE__ */ W({
|
|
162
162
|
__name: "AFilterBooleanSelect",
|
|
163
163
|
props: {
|
|
164
164
|
name: {},
|
|
@@ -168,58 +168,58 @@ const Ea = /* @__PURE__ */ K({
|
|
|
168
168
|
dataCy: { default: "filter-boolean" }
|
|
169
169
|
},
|
|
170
170
|
emits: ["change"],
|
|
171
|
-
setup(
|
|
172
|
-
const e =
|
|
173
|
-
if (d(g) || d(b) || d(
|
|
171
|
+
setup(f, { emit: h }) {
|
|
172
|
+
const e = f, c = h, g = w(ye), b = w(me), p = w(ce), s = w(ee), u = w(re);
|
|
173
|
+
if (d(g) || d(b) || d(p) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
174
174
|
d(s.fields[e.name]) || d(u) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
175
175
|
d(u[e.name]))
|
|
176
176
|
throw new Error("Incorrect provide/inject config.");
|
|
177
177
|
const l = I({
|
|
178
178
|
get() {
|
|
179
|
-
return d(u[e.name]) ||
|
|
179
|
+
return d(u[e.name]) || O(u[e.name]) ? {
|
|
180
180
|
value: -1,
|
|
181
181
|
title: t(e.allT)
|
|
182
182
|
} : u[e.name] ? { value: 1, title: t(e.trueT) } : { value: 0, title: t(e.falseT) };
|
|
183
183
|
},
|
|
184
184
|
set(i) {
|
|
185
|
-
let
|
|
186
|
-
(i == null ? void 0 : i.value) === 1 && (
|
|
185
|
+
let k = null;
|
|
186
|
+
(i == null ? void 0 : i.value) === 1 && (k = !0), (i == null ? void 0 : i.value) === 0 && (k = !1), u[e.name] = k, o(), b.value = !0, c("change");
|
|
187
187
|
}
|
|
188
|
-
}),
|
|
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: a } =
|
|
193
|
-
a(e.name, u, s),
|
|
192
|
+
]), { clearOne: a } = he(), n = () => {
|
|
193
|
+
a(e.name, u, s), p.value.delete(e.name);
|
|
194
194
|
}, o = () => {
|
|
195
195
|
if (l.value.value === -1) {
|
|
196
|
-
|
|
196
|
+
p.value.delete(e.name);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
p.value.set(e.name, [{ title: l.value.title, value: l.value.value }]);
|
|
200
200
|
};
|
|
201
|
-
return (i,
|
|
201
|
+
return (i, k) => (S(), q(Lt, {
|
|
202
202
|
modelValue: l.value,
|
|
203
|
-
"onUpdate:modelValue":
|
|
203
|
+
"onUpdate:modelValue": k[0] || (k[0] = (T) => l.value = T),
|
|
204
204
|
"data-cy": i.dataCy,
|
|
205
205
|
label: r.value,
|
|
206
206
|
items: m.value,
|
|
207
|
-
clearable: !
|
|
207
|
+
clearable: !v.value.mandatory && l.value.value !== -1,
|
|
208
208
|
"return-object": "",
|
|
209
209
|
"hide-details": "",
|
|
210
210
|
"onClick:clear": H(n, ["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: {},
|
|
217
217
|
dataCy: { default: "filter-datepicker" }
|
|
218
218
|
},
|
|
219
219
|
emits: ["change"],
|
|
220
|
-
setup(
|
|
221
|
-
const e =
|
|
222
|
-
if (d(g) || d(b) || d(
|
|
220
|
+
setup(f, { emit: h }) {
|
|
221
|
+
const e = f, c = h, g = w(ye), b = w(me), p = w(ce), s = w(ee), u = w(re);
|
|
222
|
+
if (d(g) || d(b) || d(p) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
223
223
|
d(s.fields[e.name]) || d(u) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
224
224
|
d(u[e.name]))
|
|
225
225
|
throw new Error("Incorrect provide/inject config.");
|
|
@@ -230,21 +230,21 @@ const Ea = /* @__PURE__ */ K({
|
|
|
230
230
|
set(o) {
|
|
231
231
|
u[e.name] = o, n(), b.value = !0, c("change");
|
|
232
232
|
}
|
|
233
|
-
}), { t:
|
|
234
|
-
m(e.name, u, s),
|
|
233
|
+
}), { t: v } = X(), t = I(() => s.fields[e.name]), r = I(() => t.value.titleT ? v(t.value.titleT) : void 0), { clearOne: m } = he(), a = () => {
|
|
234
|
+
m(e.name, u, s), p.value.delete(e.name);
|
|
235
235
|
}, n = () => {
|
|
236
|
-
!
|
|
236
|
+
!oe(l.value) || oe(l.value) && l.value.length === 0 || p.value.set(e.name, [{ title: De(l.value), value: l.value }]);
|
|
237
237
|
};
|
|
238
|
-
return (o, i) => (S(),
|
|
238
|
+
return (o, i) => (S(), q(ca, Oe({
|
|
239
239
|
modelValue: l.value,
|
|
240
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
240
|
+
"onUpdate:modelValue": i[0] || (i[0] = (k) => l.value = k),
|
|
241
241
|
"data-cy": o.dataCy,
|
|
242
242
|
clearable: !t.value.mandatory,
|
|
243
243
|
"default-value": t.value.default,
|
|
244
244
|
label: r.value
|
|
245
245
|
}, o.$attrs, { onAfterClear: a }), null, 16, ["modelValue", "data-cy", "clearable", "default-value", "label"]));
|
|
246
246
|
}
|
|
247
|
-
}), Oa = /* @__PURE__ */
|
|
247
|
+
}), Oa = /* @__PURE__ */ W({
|
|
248
248
|
__name: "AFilterInteger",
|
|
249
249
|
props: {
|
|
250
250
|
name: {},
|
|
@@ -252,9 +252,9 @@ const Ea = /* @__PURE__ */ K({
|
|
|
252
252
|
dataCy: { default: "filter-integer" }
|
|
253
253
|
},
|
|
254
254
|
emits: ["change"],
|
|
255
|
-
setup(
|
|
256
|
-
const e =
|
|
257
|
-
if (d(g) || d(b) || d(
|
|
255
|
+
setup(f, { emit: h }) {
|
|
256
|
+
const e = f, c = h, g = w(ye), b = w(me), p = w(ce), s = w(ee), u = w(re);
|
|
257
|
+
if (d(g) || d(b) || d(p) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
258
258
|
d(s.fields[e.name]) || d(u) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
259
259
|
d(u[e.name]))
|
|
260
260
|
throw new Error("Incorrect provide/inject config.");
|
|
@@ -265,23 +265,23 @@ const Ea = /* @__PURE__ */ K({
|
|
|
265
265
|
set(i) {
|
|
266
266
|
u[e.name] = i, b.value = !0, c("change");
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
269
|
-
a(e.name, u, s),
|
|
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: a } = he(), n = () => {
|
|
269
|
+
a(e.name, u, s), p.value.delete(e.name);
|
|
270
270
|
}, o = () => {
|
|
271
|
-
!
|
|
271
|
+
!oe(l.value) || oe(l.value) && l.value.length === 0 || p.value.set(e.name, [{ title: l.value, value: l.value }]);
|
|
272
272
|
};
|
|
273
|
-
return
|
|
273
|
+
return Y(
|
|
274
274
|
() => u[e.name],
|
|
275
|
-
(i,
|
|
276
|
-
i ===
|
|
275
|
+
(i, k) => {
|
|
276
|
+
i === k || ne(i) || O(i) || d(i) || z(i) && i.length === 0 || o();
|
|
277
277
|
},
|
|
278
278
|
{ immediate: !0 }
|
|
279
|
-
), (i,
|
|
279
|
+
), (i, k) => (S(), q(jt, {
|
|
280
280
|
modelValue: l.value,
|
|
281
|
-
"onUpdate:modelValue":
|
|
281
|
+
"onUpdate:modelValue": k[0] || (k[0] = (T) => l.value = T),
|
|
282
282
|
label: r.value,
|
|
283
283
|
placeholder: m.value,
|
|
284
|
-
clearable: !
|
|
284
|
+
clearable: !v.value.mandatory,
|
|
285
285
|
"data-cy": i.dataCy,
|
|
286
286
|
"hide-details": "",
|
|
287
287
|
onBlur: o,
|
|
@@ -289,9 +289,9 @@ const Ea = /* @__PURE__ */ K({
|
|
|
289
289
|
}, null, 8, ["modelValue", "label", "placeholder", "clearable", "data-cy"]));
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
|
-
function Ne(
|
|
293
|
-
return
|
|
294
|
-
sortBy:
|
|
292
|
+
function Ne(f = null) {
|
|
293
|
+
return R({
|
|
294
|
+
sortBy: f,
|
|
295
295
|
page: 1,
|
|
296
296
|
rowsPerPage: 25,
|
|
297
297
|
rowsNumber: 0,
|
|
@@ -300,7 +300,7 @@ function Ne(v = 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: {},
|
|
@@ -312,141 +312,141 @@ const Wl = /* @__PURE__ */ K({
|
|
|
312
312
|
prefetch: { default: "hover" }
|
|
313
313
|
},
|
|
314
314
|
emits: ["change"],
|
|
315
|
-
setup(
|
|
316
|
-
const e =
|
|
317
|
-
if (d(g) || d(b) || d(
|
|
315
|
+
setup(f, { emit: h }) {
|
|
316
|
+
const e = f, c = h, g = w(ye), b = w(me), p = w(ce), s = w(ee), u = w(re), l = w(ta), v = w(ea);
|
|
317
|
+
if (d(g) || d(b) || d(p) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
318
318
|
d(s.fields[e.name]) || d(u) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
319
319
|
d(u[e.name]) || d(l) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
320
|
-
d(l.fields[e.filterByField]) || d(
|
|
321
|
-
d(
|
|
320
|
+
d(l.fields[e.filterByField]) || d(v) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
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), a = R(void 0), n = R(0), { t: o } = X(), i = I(() => s.fields[e.name]), k = () => {
|
|
324
324
|
m.value = !0;
|
|
325
|
-
}, T = I(() => i.value.titleT ? o(i.value.titleT) : void 0),
|
|
326
|
-
const
|
|
327
|
-
return B.value.forEach((
|
|
328
|
-
|
|
329
|
-
}),
|
|
330
|
-
|
|
331
|
-
}), Array.from(
|
|
332
|
-
}),
|
|
333
|
-
|
|
334
|
-
const A = await e.fetchItems(
|
|
335
|
-
|
|
336
|
-
},
|
|
337
|
-
const
|
|
338
|
-
return [].concat(
|
|
339
|
-
},
|
|
340
|
-
let
|
|
341
|
-
return
|
|
342
|
-
},
|
|
325
|
+
}, T = I(() => i.value.titleT ? o(i.value.titleT) : void 0), M = Ne(e.filterSortBy), x = R([]), B = R([]), U = I(() => {
|
|
326
|
+
const y = /* @__PURE__ */ new Map();
|
|
327
|
+
return B.value.forEach((C) => {
|
|
328
|
+
y.set(C.value, { value: C.value, title: C.title, subtitle: C.subtitle });
|
|
329
|
+
}), x.value.forEach((C) => {
|
|
330
|
+
y.set(C.value, { value: C.value, title: C.title, subtitle: C.subtitle });
|
|
331
|
+
}), Array.from(y, ([C, A]) => ({ value: C, title: A.title, subtitle: A.subtitle }));
|
|
332
|
+
}), P = R(!1), V = async (y, C) => {
|
|
333
|
+
P.value = !0, v[e.filterByField] = y;
|
|
334
|
+
const A = await e.fetchItems(M, v, l);
|
|
335
|
+
C === n.value && (x.value = A), P.value = !1;
|
|
336
|
+
}, K = (y) => {
|
|
337
|
+
const C = U.value.filter((A) => y.includes(A.value));
|
|
338
|
+
return [].concat(C);
|
|
339
|
+
}, Z = async (y) => {
|
|
340
|
+
let C = 1, A = [];
|
|
341
|
+
return z(y) ? (C = y.length, A = K(y)) : A = K([y]), B.value = A, A.length === C;
|
|
342
|
+
}, E = R(!1), $ = () => {
|
|
343
343
|
clearTimeout(a.value), a.value = void 0;
|
|
344
|
-
},
|
|
345
|
-
if (
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
n.value === 0 && (
|
|
349
|
-
},
|
|
350
|
-
m.value = !0,
|
|
351
|
-
},
|
|
352
|
-
e.prefetch !== "focus" && (
|
|
344
|
+
}, J = async () => {
|
|
345
|
+
if ($(), E.value === !0) return;
|
|
346
|
+
E.value = !0, P.value = !0;
|
|
347
|
+
const y = await e.fetchItems(M, v, l);
|
|
348
|
+
n.value === 0 && (x.value = y), P.value = !1;
|
|
349
|
+
}, fe = () => {
|
|
350
|
+
m.value = !0, $(), J();
|
|
351
|
+
}, te = () => {
|
|
352
|
+
e.prefetch !== "focus" && ($(), J());
|
|
353
353
|
}, Be = I(() => {
|
|
354
354
|
if (!i.value.multiple && B.value[0])
|
|
355
355
|
return B.value[0].title;
|
|
356
|
-
}), Se = (
|
|
357
|
-
!i.value.multiple && !m.value &&
|
|
358
|
-
}, Ie = (
|
|
356
|
+
}), Se = (y) => {
|
|
357
|
+
!i.value.multiple && !m.value && y.length === 0 || Be.value !== y && (r.value = y);
|
|
358
|
+
}, Ie = (y) => {
|
|
359
359
|
b.value = !0;
|
|
360
|
-
let
|
|
361
|
-
|
|
360
|
+
let C = null;
|
|
361
|
+
z(y) ? C = y.map((A) => A.value) : O(y) || (C = y.value), u[e.name] = C, b.value = !0, c("change");
|
|
362
362
|
}, Pe = async () => {
|
|
363
|
-
|
|
364
|
-
}, _e = I(() => d(e.placeholder) ? i.value.variant === "startsWith" ? o("common.model.filterPlaceholder.startsWith") : i.value.variant === "eq" ? o("common.model.filterPlaceholder.eq") : i.value.variant === "contains" || i.value.variant === "search" ? o("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: Re } =
|
|
365
|
-
Re(e.name, u, s),
|
|
366
|
-
},
|
|
367
|
-
if (
|
|
368
|
-
|
|
363
|
+
x.value = await e.fetchItems(M, v, l), xe();
|
|
364
|
+
}, _e = I(() => d(e.placeholder) ? i.value.variant === "startsWith" ? o("common.model.filterPlaceholder.startsWith") : i.value.variant === "eq" ? o("common.model.filterPlaceholder.eq") : i.value.variant === "contains" || i.value.variant === "search" ? o("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: Re } = he(), xe = () => {
|
|
365
|
+
Re(e.name, u, s), p.value.delete(e.name);
|
|
366
|
+
}, se = (y) => {
|
|
367
|
+
if (p.value.delete(e.name), z(y) && y.length === 0 || O(y)) {
|
|
368
|
+
p.value.delete(e.name);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
|
-
if (
|
|
372
|
-
|
|
371
|
+
if (z(y)) {
|
|
372
|
+
p.value.set(
|
|
373
373
|
e.name,
|
|
374
|
-
|
|
374
|
+
y.map((C) => ({ title: C.title, value: C.value }))
|
|
375
375
|
);
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
|
-
|
|
378
|
+
p.value.set(e.name, [{ title: y.title, value: y.value }]);
|
|
379
379
|
};
|
|
380
|
-
return
|
|
380
|
+
return Y(
|
|
381
381
|
() => u[e.name],
|
|
382
|
-
async (
|
|
383
|
-
if (
|
|
384
|
-
if (
|
|
385
|
-
if (B.value = [], i.value.multiple ? t.value = [] : t.value = null,
|
|
382
|
+
async (y, C) => {
|
|
383
|
+
if (y === C || ne(y)) return;
|
|
384
|
+
if (O(y) || d(y) || z(y) && y.length === 0) {
|
|
385
|
+
if (B.value = [], i.value.multiple ? t.value = [] : t.value = null, E.value === !0 || Ot(e.prefetch, ["hover", "focus"])) return;
|
|
386
386
|
a.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 Z(y)) {
|
|
392
|
+
t.value = B.value.map((D) => ({ title: D.title, value: D.value })), se(t.value);
|
|
393
393
|
return;
|
|
394
394
|
}
|
|
395
|
-
if (
|
|
396
|
-
|
|
395
|
+
if (z(y)) {
|
|
396
|
+
P.value = !0, B.value = await e.fetchItemsByIds(y), t.value = B.value.map((D) => ({ title: D.title, value: D.value })), se(t.value), P.value = !1;
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
|
-
|
|
399
|
+
P.value = !0, B.value = await e.fetchItemsByIds([y]), t.value = B.value.map((D) => ({ title: D.title, value: D.value }))[0], se(t.value), P.value = !1;
|
|
400
400
|
},
|
|
401
401
|
{ immediate: !0 }
|
|
402
402
|
), Ht(
|
|
403
403
|
r,
|
|
404
|
-
(
|
|
405
|
-
n.value++,
|
|
404
|
+
(y, C) => {
|
|
405
|
+
n.value++, y !== C && (n.value++, V(y, n.value));
|
|
406
406
|
},
|
|
407
407
|
{ debounce: 300 }
|
|
408
|
-
), (
|
|
408
|
+
), (y, C) => (S(), q(kt, {
|
|
409
409
|
modelValue: t.value,
|
|
410
410
|
"onUpdate:modelValue": [
|
|
411
|
-
|
|
411
|
+
C[0] || (C[0] = (A) => t.value = A),
|
|
412
412
|
Ie
|
|
413
413
|
],
|
|
414
|
-
items:
|
|
414
|
+
items: U.value,
|
|
415
415
|
"no-filter": "",
|
|
416
416
|
placeholder: _e.value,
|
|
417
417
|
multiple: i.value.multiple,
|
|
418
418
|
clearable: !i.value.mandatory,
|
|
419
419
|
label: T.value,
|
|
420
420
|
chips: i.value.multiple,
|
|
421
|
-
loading:
|
|
421
|
+
loading: P.value,
|
|
422
422
|
"hide-details": "",
|
|
423
423
|
"return-object": "",
|
|
424
424
|
"onUpdate:search": Se,
|
|
425
|
-
onBlur:
|
|
426
|
-
onFocus:
|
|
427
|
-
onMouseenter:
|
|
425
|
+
onBlur: k,
|
|
426
|
+
onFocus: fe,
|
|
427
|
+
onMouseenter: te,
|
|
428
428
|
"onClick:clear": Pe
|
|
429
429
|
}, Rt({
|
|
430
|
-
item: F(({ props: A, item:
|
|
430
|
+
item: F(({ props: A, item: D }) => [
|
|
431
431
|
_(Ue, Oe(A, {
|
|
432
|
-
title:
|
|
433
|
-
subtitle:
|
|
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
441
|
_(Ue, {
|
|
442
|
-
title:
|
|
442
|
+
title: N(o)("$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: {},
|
|
@@ -460,146 +460,146 @@ const Wl = /* @__PURE__ */ K({
|
|
|
460
460
|
itemValue: { default: "id" }
|
|
461
461
|
},
|
|
462
462
|
emits: ["change"],
|
|
463
|
-
setup(
|
|
464
|
-
const e =
|
|
465
|
-
if (d(g) || d(b) || d(
|
|
463
|
+
setup(f, { emit: h }) {
|
|
464
|
+
const e = f, c = h, g = w(ye), b = w(me), p = w(ce), s = w(ee), u = w(re), l = w(ta), v = w(ea);
|
|
465
|
+
if (d(g) || d(b) || d(p) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
466
466
|
d(s.fields[e.name]) || d(u) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
467
467
|
d(u[e.name]) || d(l) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
468
|
-
d(l.fields[e.filterByField]) || d(
|
|
469
|
-
d(
|
|
468
|
+
d(l.fields[e.filterByField]) || d(v) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
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), a = R(void 0), n = R(0), { t: o } = X(), i = I(() => s.fields[e.name]), k = () => {
|
|
472
472
|
m.value = !0;
|
|
473
|
-
}, T = I(() => i.value.titleT ? o(i.value.titleT) : void 0),
|
|
474
|
-
const
|
|
475
|
-
return B.value.forEach((
|
|
476
|
-
|
|
477
|
-
}),
|
|
478
|
-
|
|
479
|
-
}), Array.from(
|
|
480
|
-
}),
|
|
481
|
-
|
|
482
|
-
const A = await e.fetchItemsMinimal(
|
|
483
|
-
|
|
484
|
-
},
|
|
485
|
-
const
|
|
486
|
-
return [].concat(
|
|
487
|
-
},
|
|
488
|
-
let
|
|
489
|
-
return
|
|
490
|
-
},
|
|
473
|
+
}, T = I(() => i.value.titleT ? o(i.value.titleT) : void 0), M = Ne(e.filterSortBy), x = R([]), B = R([]), U = I(() => {
|
|
474
|
+
const y = /* @__PURE__ */ new Map();
|
|
475
|
+
return B.value.forEach((C) => {
|
|
476
|
+
y.set(C.value, { value: C.value, title: C.title, subtitle: C.subtitle });
|
|
477
|
+
}), x.value.forEach((C) => {
|
|
478
|
+
y.set(C.value, { value: C.value, title: C.title, subtitle: C.subtitle });
|
|
479
|
+
}), Array.from(y, ([C, A]) => ({ value: C, title: A.title, subtitle: A.subtitle }));
|
|
480
|
+
}), P = R(!1), V = async (y, C) => {
|
|
481
|
+
P.value = !0, v[e.filterByField] = y;
|
|
482
|
+
const A = await e.fetchItemsMinimal(M, v, l);
|
|
483
|
+
C === n.value && (x.value = A), P.value = !1;
|
|
484
|
+
}, K = (y) => {
|
|
485
|
+
const C = U.value.filter((A) => y.includes(A.value));
|
|
486
|
+
return [].concat(C);
|
|
487
|
+
}, Z = async (y) => {
|
|
488
|
+
let C = 1, A = [];
|
|
489
|
+
return z(y) ? (C = y.length, A = K(y)) : A = K([y]), B.value = A, A.length === C;
|
|
490
|
+
}, E = R(!1), $ = () => {
|
|
491
491
|
clearTimeout(a.value), a.value = void 0;
|
|
492
|
-
},
|
|
493
|
-
if (
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
n.value === 0 && (
|
|
497
|
-
},
|
|
498
|
-
m.value = !0,
|
|
499
|
-
},
|
|
500
|
-
e.prefetch !== "focus" && (
|
|
492
|
+
}, J = async () => {
|
|
493
|
+
if ($(), E.value === !0) return;
|
|
494
|
+
E.value = !0, P.value = !0;
|
|
495
|
+
const y = await e.fetchItemsMinimal(M, v, l);
|
|
496
|
+
n.value === 0 && (x.value = y), P.value = !1;
|
|
497
|
+
}, fe = () => {
|
|
498
|
+
m.value = !0, $(), J();
|
|
499
|
+
}, te = () => {
|
|
500
|
+
e.prefetch !== "focus" && ($(), J());
|
|
501
501
|
}, Be = I(() => {
|
|
502
502
|
if (!i.value.multiple && B.value[0])
|
|
503
503
|
return B.value[0].title;
|
|
504
|
-
}), Se = (
|
|
505
|
-
!i.value.multiple && !m.value &&
|
|
506
|
-
}, Ie = (
|
|
504
|
+
}), Se = (y) => {
|
|
505
|
+
!i.value.multiple && !m.value && y.length === 0 || Be.value !== y && (r.value = y);
|
|
506
|
+
}, Ie = (y) => {
|
|
507
507
|
b.value = !0;
|
|
508
|
-
let
|
|
509
|
-
|
|
508
|
+
let C = null;
|
|
509
|
+
z(y) ? C = y.map((A) => A.value) : O(y) || (C = y.value), u[e.name] = C, b.value = !0, c("change");
|
|
510
510
|
}, Pe = async () => {
|
|
511
|
-
|
|
512
|
-
}, _e = I(() => d(e.placeholder) ? i.value.variant === "startsWith" ? o("common.model.filterPlaceholder.startsWith") : i.value.variant === "eq" ? o("common.model.filterPlaceholder.eq") : i.value.variant === "contains" || i.value.variant === "search" ? o("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: Re } =
|
|
513
|
-
Re(e.name, u, s),
|
|
514
|
-
},
|
|
515
|
-
if (
|
|
516
|
-
|
|
511
|
+
x.value = await e.fetchItemsMinimal(M, v, l), xe();
|
|
512
|
+
}, _e = I(() => d(e.placeholder) ? i.value.variant === "startsWith" ? o("common.model.filterPlaceholder.startsWith") : i.value.variant === "eq" ? o("common.model.filterPlaceholder.eq") : i.value.variant === "contains" || i.value.variant === "search" ? o("common.model.filterPlaceholder.contains") : "" : e.placeholder), { clearOne: Re } = he(), xe = () => {
|
|
513
|
+
Re(e.name, u, s), p.value.delete(e.name);
|
|
514
|
+
}, se = (y) => {
|
|
515
|
+
if (p.value.delete(e.name), z(y) && y.length === 0 || O(y)) {
|
|
516
|
+
p.value.delete(e.name);
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
|
-
if (
|
|
520
|
-
|
|
519
|
+
if (z(y)) {
|
|
520
|
+
p.value.set(
|
|
521
521
|
e.name,
|
|
522
|
-
|
|
522
|
+
y.map((C) => ({ title: C.title, value: C.value }))
|
|
523
523
|
);
|
|
524
524
|
return;
|
|
525
525
|
}
|
|
526
|
-
|
|
526
|
+
p.value.set(e.name, [{ title: y.title, value: y.value }]);
|
|
527
527
|
};
|
|
528
|
-
return
|
|
528
|
+
return Y(
|
|
529
529
|
() => u[e.name],
|
|
530
|
-
async (
|
|
531
|
-
if (
|
|
532
|
-
if (
|
|
533
|
-
if (B.value = [], i.value.multiple ? t.value = [] : t.value = null,
|
|
530
|
+
async (y, C) => {
|
|
531
|
+
if (y === C || ne(y)) return;
|
|
532
|
+
if (O(y) || d(y) || z(y) && y.length === 0) {
|
|
533
|
+
if (B.value = [], i.value.multiple ? t.value = [] : t.value = null, E.value === !0 || Ot(e.prefetch, ["hover", "focus"])) return;
|
|
534
534
|
a.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 Z(y)) {
|
|
540
|
+
t.value = B.value.map((D) => ({ title: D.title, value: D.value })), se(t.value);
|
|
541
541
|
return;
|
|
542
542
|
}
|
|
543
|
-
if (
|
|
544
|
-
|
|
543
|
+
if (z(y)) {
|
|
544
|
+
P.value = !0, B.value = await e.fetchItemsMinimalByIds(y), t.value = B.value.map((D) => ({ title: D.title, value: D.value })), se(t.value), P.value = !1;
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
|
-
|
|
547
|
+
P.value = !0, B.value = await e.fetchItemsMinimalByIds([y]), t.value = B.value.map((D) => ({ title: D.title, value: D.value }))[0], se(t.value), P.value = !1;
|
|
548
548
|
},
|
|
549
549
|
{ immediate: !0 }
|
|
550
550
|
), Ht(
|
|
551
551
|
r,
|
|
552
|
-
(
|
|
553
|
-
n.value++,
|
|
552
|
+
(y, C) => {
|
|
553
|
+
n.value++, y !== C && (n.value++, V(y, n.value));
|
|
554
554
|
},
|
|
555
555
|
{ debounce: 300 }
|
|
556
|
-
), (
|
|
556
|
+
), (y, C) => (S(), q(kt, {
|
|
557
557
|
modelValue: t.value,
|
|
558
558
|
"onUpdate:modelValue": [
|
|
559
|
-
|
|
559
|
+
C[0] || (C[0] = (A) => t.value = A),
|
|
560
560
|
Ie
|
|
561
561
|
],
|
|
562
|
-
items:
|
|
562
|
+
items: U.value,
|
|
563
563
|
"no-filter": "",
|
|
564
564
|
placeholder: _e.value,
|
|
565
565
|
multiple: i.value.multiple,
|
|
566
566
|
clearable: !i.value.mandatory,
|
|
567
567
|
label: T.value,
|
|
568
568
|
chips: i.value.multiple,
|
|
569
|
-
loading:
|
|
569
|
+
loading: P.value,
|
|
570
570
|
"hide-details": "",
|
|
571
571
|
"return-object": "",
|
|
572
572
|
"onUpdate:search": Se,
|
|
573
|
-
onBlur:
|
|
574
|
-
onFocus:
|
|
575
|
-
onMouseenter:
|
|
573
|
+
onBlur: k,
|
|
574
|
+
onFocus: fe,
|
|
575
|
+
onMouseenter: te,
|
|
576
576
|
"onClick:clear": Pe
|
|
577
577
|
}, {
|
|
578
|
-
item: F(({ props: A, item:
|
|
579
|
-
|
|
580
|
-
item:
|
|
578
|
+
item: F(({ props: A, item: D }) => [
|
|
579
|
+
pe(y.$slots, "item", {
|
|
580
|
+
item: D,
|
|
581
581
|
props: A
|
|
582
582
|
}, () => [
|
|
583
583
|
_(Ue, Oe(A, {
|
|
584
|
-
title:
|
|
585
|
-
subtitle:
|
|
584
|
+
title: D.raw.title,
|
|
585
|
+
subtitle: D.raw.subtitle
|
|
586
586
|
}), null, 16, ["title", "subtitle"])
|
|
587
587
|
])
|
|
588
588
|
]),
|
|
589
|
-
chip: F(({ props: A, item:
|
|
590
|
-
|
|
589
|
+
chip: F(({ props: A, item: D }) => [
|
|
590
|
+
pe(y.$slots, "chip", {
|
|
591
591
|
props: A,
|
|
592
|
-
item:
|
|
592
|
+
item: D
|
|
593
593
|
}, () => [
|
|
594
594
|
_(Vt, Oe(A, {
|
|
595
|
-
text:
|
|
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
|
-
}), $a = /* @__PURE__ */
|
|
602
|
+
}), $a = /* @__PURE__ */ W({
|
|
603
603
|
__name: "AFilterString",
|
|
604
604
|
props: {
|
|
605
605
|
name: {},
|
|
@@ -607,9 +607,9 @@ const Wl = /* @__PURE__ */ K({
|
|
|
607
607
|
dataCy: { default: "filter-string" }
|
|
608
608
|
},
|
|
609
609
|
emits: ["change"],
|
|
610
|
-
setup(
|
|
611
|
-
const e =
|
|
612
|
-
if (d(g) || d(b) || d(
|
|
610
|
+
setup(f, { emit: h }) {
|
|
611
|
+
const e = f, c = h, g = w(ye), b = w(me), p = w(ce), s = w(ee), u = w(re);
|
|
612
|
+
if (d(g) || d(b) || d(p) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
613
613
|
d(s.fields[e.name]) || d(u) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
614
614
|
d(u[e.name]))
|
|
615
615
|
throw new Error("Incorrect provide/inject config.");
|
|
@@ -620,41 +620,41 @@ const Wl = /* @__PURE__ */ K({
|
|
|
620
620
|
set(i) {
|
|
621
621
|
u[e.name] = i, b.value = !0, c("change");
|
|
622
622
|
}
|
|
623
|
-
}),
|
|
624
|
-
a(e.name, u, s),
|
|
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: a } = he(), n = () => {
|
|
624
|
+
a(e.name, u, s), p.value.delete(e.name);
|
|
625
625
|
}, o = () => {
|
|
626
|
-
!
|
|
626
|
+
!oe(l.value) || oe(l.value) && l.value.length === 0 || p.value.set(e.name, [{ title: l.value, value: l.value }]);
|
|
627
627
|
};
|
|
628
|
-
return
|
|
628
|
+
return Y(
|
|
629
629
|
() => u[e.name],
|
|
630
|
-
(i,
|
|
631
|
-
i ===
|
|
630
|
+
(i, k) => {
|
|
631
|
+
i === k || ne(i) || O(i) || d(i) || z(i) && i.length === 0 || o();
|
|
632
632
|
},
|
|
633
633
|
{ immediate: !0 }
|
|
634
|
-
), (i,
|
|
634
|
+
), (i, k) => (S(), q(jt, {
|
|
635
635
|
modelValue: l.value,
|
|
636
|
-
"onUpdate:modelValue":
|
|
636
|
+
"onUpdate:modelValue": k[0] || (k[0] = (T) => l.value = T),
|
|
637
637
|
label: r.value,
|
|
638
638
|
placeholder: m.value,
|
|
639
|
-
clearable: !
|
|
639
|
+
clearable: !v.value.mandatory,
|
|
640
640
|
"data-cy": i.dataCy,
|
|
641
641
|
"hide-details": "",
|
|
642
642
|
onBlur: o,
|
|
643
643
|
"onClick:clear": H(n, ["stop"])
|
|
644
644
|
}, null, 8, ["modelValue", "label", "placeholder", "clearable", "data-cy"]));
|
|
645
645
|
}
|
|
646
|
-
}),
|
|
646
|
+
}), ue = {
|
|
647
647
|
CurrentMonth: "cm",
|
|
648
648
|
LastMonth: "lm",
|
|
649
649
|
Last3Months: "l3m",
|
|
650
650
|
Custom: "custom"
|
|
651
651
|
};
|
|
652
|
-
function Ua(
|
|
653
|
-
const { t:
|
|
652
|
+
function Ua(f = void 0) {
|
|
653
|
+
const { t: h } = X(), e = I(() => {
|
|
654
654
|
const g = [
|
|
655
655
|
{
|
|
656
656
|
value: null,
|
|
657
|
-
title:
|
|
657
|
+
title: h("common.model.all")
|
|
658
658
|
},
|
|
659
659
|
{
|
|
660
660
|
value: 60,
|
|
@@ -673,47 +673,47 @@ function Ua(v = void 0) {
|
|
|
673
673
|
title: "28 dní"
|
|
674
674
|
},
|
|
675
675
|
{
|
|
676
|
-
value:
|
|
676
|
+
value: ue.CurrentMonth,
|
|
677
677
|
title: "Prebiehajúci mesiac"
|
|
678
678
|
},
|
|
679
679
|
{
|
|
680
|
-
value:
|
|
680
|
+
value: ue.LastMonth,
|
|
681
681
|
title: "Minulý mesiac"
|
|
682
682
|
},
|
|
683
683
|
{
|
|
684
|
-
value:
|
|
684
|
+
value: ue.Last3Months,
|
|
685
685
|
title: "Posledné 3 mesiace"
|
|
686
686
|
},
|
|
687
687
|
{
|
|
688
|
-
value:
|
|
688
|
+
value: ue.Custom,
|
|
689
689
|
title: "Vlastné"
|
|
690
690
|
}
|
|
691
691
|
];
|
|
692
|
-
return d(
|
|
692
|
+
return d(f) ? g : g.filter((b) => f.includes(b.value) || O(b.value));
|
|
693
693
|
});
|
|
694
694
|
return {
|
|
695
695
|
timeIntervalOptions: e,
|
|
696
696
|
getTimeIntervalOption: (g) => e.value.find((b) => b.value === g)
|
|
697
697
|
};
|
|
698
698
|
}
|
|
699
|
-
function Ma(
|
|
700
|
-
const { datesCompare:
|
|
699
|
+
function Ma(f) {
|
|
700
|
+
const { datesCompare: h, required: e } = $t(), c = I(() => f.value.from), g = I(() => f.value.until), b = {
|
|
701
701
|
dialogData: {
|
|
702
702
|
from: {
|
|
703
703
|
required: e,
|
|
704
|
-
datesCompare:
|
|
704
|
+
datesCompare: h(g, "Until", "onOrBefore")
|
|
705
705
|
},
|
|
706
706
|
until: {
|
|
707
707
|
required: e,
|
|
708
|
-
datesCompare:
|
|
708
|
+
datesCompare: h(c, "From", "laterThan")
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
};
|
|
712
712
|
return {
|
|
713
|
-
v$:
|
|
713
|
+
v$: gt(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: {},
|
|
@@ -723,9 +723,9 @@ const Na = /* @__PURE__ */ K({
|
|
|
723
723
|
dataCy: { default: "filter-time-interval" }
|
|
724
724
|
},
|
|
725
725
|
emits: ["change"],
|
|
726
|
-
setup(
|
|
727
|
-
const e =
|
|
728
|
-
if (d(g) || d(b) || d(
|
|
726
|
+
setup(f, { emit: h }) {
|
|
727
|
+
const e = f, c = h, g = w(ye), b = w(me), p = w(ce), s = w(ee), u = w(re);
|
|
728
|
+
if (d(g) || d(b) || d(p) || 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(u) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
731
731
|
d(u[e.nameFrom]) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
@@ -735,72 +735,72 @@ const Na = /* @__PURE__ */ K({
|
|
|
735
735
|
get() {
|
|
736
736
|
return u[e.nameFrom];
|
|
737
737
|
},
|
|
738
|
-
set(
|
|
739
|
-
u[e.nameFrom] =
|
|
738
|
+
set(E) {
|
|
739
|
+
u[e.nameFrom] = E, K(), b.value = !0, c("change");
|
|
740
740
|
}
|
|
741
|
-
}), { timeIntervalOptions:
|
|
741
|
+
}), { timeIntervalOptions: v, getTimeIntervalOption: t } = Ua(e.allowed), r = R(null), m = R(!1), a = R({
|
|
742
742
|
from: null,
|
|
743
743
|
until: $e()
|
|
744
|
-
}), n =
|
|
745
|
-
n.value = !1, r.value = null,
|
|
746
|
-
},
|
|
744
|
+
}), n = R(!1), { v$: o } = Ma(a), i = I(() => s.fields[e.nameFrom]), { t: k } = X(), T = I(() => i.value.titleT ? k(i.value.titleT) : void 0), { clearOne: M } = he(), { showValidationError: x } = Ut(), B = () => {
|
|
745
|
+
n.value = !1, r.value = null, V();
|
|
746
|
+
}, U = () => {
|
|
747
747
|
if (o.value.$touch(), o.value.$invalid) {
|
|
748
|
-
|
|
748
|
+
x();
|
|
749
749
|
return;
|
|
750
750
|
}
|
|
751
751
|
n.value = !0, m.value = !1, u[e.nameUntil] = a.value.until, l.value = a.value.from;
|
|
752
|
-
},
|
|
752
|
+
}, P = () => {
|
|
753
753
|
m.value = !1, r.value = null;
|
|
754
|
-
},
|
|
755
|
-
|
|
756
|
-
},
|
|
757
|
-
if (
|
|
758
|
-
if (
|
|
759
|
-
|
|
754
|
+
}, V = () => {
|
|
755
|
+
M(e.nameFrom, u, s), p.value.delete(e.nameFrom);
|
|
756
|
+
}, K = () => {
|
|
757
|
+
if (z(l.value) || ne(l.value)) return;
|
|
758
|
+
if (O(l.value) || d(l.value)) {
|
|
759
|
+
p.value.delete(e.nameFrom);
|
|
760
760
|
return;
|
|
761
761
|
}
|
|
762
|
-
const
|
|
763
|
-
if (!
|
|
764
|
-
const
|
|
765
|
-
|
|
762
|
+
const E = t(l.value);
|
|
763
|
+
if (!E && vt(l.value)) {
|
|
764
|
+
const $ = t(ue.Custom);
|
|
765
|
+
p.value.set(e.nameFrom, [
|
|
766
766
|
{
|
|
767
|
-
title:
|
|
767
|
+
title: $.title + ": " + De(a.value.from) + " - " + De(a.value.until),
|
|
768
768
|
value: l.value
|
|
769
769
|
}
|
|
770
770
|
]);
|
|
771
771
|
return;
|
|
772
772
|
}
|
|
773
|
-
|
|
774
|
-
},
|
|
775
|
-
o.value.$reset(),
|
|
773
|
+
E && p.value.set(e.nameFrom, [{ title: E.title, value: l.value }]);
|
|
774
|
+
}, Z = (E = !1) => {
|
|
775
|
+
o.value.$reset(), E && (a.value.from = null, a.value.until = $e()), m.value = !0;
|
|
776
776
|
};
|
|
777
|
-
return
|
|
778
|
-
if (
|
|
779
|
-
|
|
777
|
+
return Y(r, (E) => {
|
|
778
|
+
if (E === ue.Custom) {
|
|
779
|
+
Z(!0);
|
|
780
780
|
return;
|
|
781
781
|
}
|
|
782
|
-
u[e.nameUntil] = null, l.value =
|
|
783
|
-
}),
|
|
784
|
-
if (
|
|
785
|
-
if (n.value = !1, d(
|
|
782
|
+
u[e.nameUntil] = null, l.value = E;
|
|
783
|
+
}), Y(l, (E) => {
|
|
784
|
+
if (z(E) || ne(E)) return;
|
|
785
|
+
if (n.value = !1, d(E) || O(E)) {
|
|
786
786
|
r.value = null;
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
}),
|
|
789
|
+
const $ = t(l.value), J = u[e.nameUntil];
|
|
790
|
+
!$ && vt(l.value) && vt(J) && (r.value = ue.Custom, a.value.from = l.value, a.value.until = J, n.value = !0), $ && (r.value = $.value);
|
|
791
|
+
}), Y(
|
|
792
792
|
[() => u[e.nameFrom], () => u[e.nameUntil]],
|
|
793
|
-
([
|
|
794
|
-
|
|
793
|
+
([E, $], [J, fe]) => {
|
|
794
|
+
E === J && $ === fe || ne(E) || ne($) || O(E) || O($) || d(E) || d($) || z(E) && E.length === 0 || z($) && $.length === 0 || K();
|
|
795
795
|
},
|
|
796
796
|
{ immediate: !0 }
|
|
797
|
-
), (
|
|
798
|
-
const
|
|
799
|
-
return S(), L(
|
|
800
|
-
n.value ? (S(),
|
|
797
|
+
), (E, $) => {
|
|
798
|
+
const J = je("ABtnTertiary"), fe = je("ABtnPrimary");
|
|
799
|
+
return S(), L(de, null, [
|
|
800
|
+
n.value ? (S(), q(Fa, {
|
|
801
801
|
key: 0,
|
|
802
802
|
label: T.value,
|
|
803
|
-
"model-value":
|
|
803
|
+
"model-value": N(De)(a.value.from) + " - " + N(De)(a.value.until),
|
|
804
804
|
readonly: "",
|
|
805
805
|
rows: "1",
|
|
806
806
|
"auto-grow": "",
|
|
@@ -809,22 +809,22 @@ 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: $[0] || ($[0] = H((te) => Z(), ["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": $[1] || ($[1] = (te) => r.value = te),
|
|
817
817
|
"item-title": "title",
|
|
818
818
|
"item-value": "value",
|
|
819
819
|
label: T.value,
|
|
820
|
-
clearable: !
|
|
820
|
+
clearable: !N(O)(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",
|
|
@@ -833,10 +833,10 @@ const Na = /* @__PURE__ */ K({
|
|
|
833
833
|
default: F(() => [
|
|
834
834
|
_(Qt, null, {
|
|
835
835
|
default: F(() => [
|
|
836
|
-
_(Mt, { onOnCancel:
|
|
836
|
+
_(Mt, { onOnCancel: P }, {
|
|
837
837
|
default: F(() => [
|
|
838
|
-
|
|
839
|
-
|
|
838
|
+
pe(E.$slots, "title", {}, () => [
|
|
839
|
+
G(j(T.value), 1)
|
|
840
840
|
], !0)
|
|
841
841
|
]),
|
|
842
842
|
_: 3
|
|
@@ -847,8 +847,8 @@ const Na = /* @__PURE__ */ K({
|
|
|
847
847
|
default: F(() => [
|
|
848
848
|
_(Ft, {
|
|
849
849
|
modelValue: a.value.from,
|
|
850
|
-
"onUpdate:modelValue":
|
|
851
|
-
v:
|
|
850
|
+
"onUpdate:modelValue": $[2] || ($[2] = (te) => a.value.from = te),
|
|
851
|
+
v: N(o).dialogData.from,
|
|
852
852
|
label: "From",
|
|
853
853
|
required: ""
|
|
854
854
|
}, null, 8, ["modelValue", "v"])
|
|
@@ -859,8 +859,8 @@ const Na = /* @__PURE__ */ K({
|
|
|
859
859
|
default: F(() => [
|
|
860
860
|
_(Ft, {
|
|
861
861
|
modelValue: a.value.until,
|
|
862
|
-
"onUpdate:modelValue":
|
|
863
|
-
v:
|
|
862
|
+
"onUpdate:modelValue": $[3] || ($[3] = (te) => a.value.until = te),
|
|
863
|
+
v: N(o).dialogData.until,
|
|
864
864
|
label: "Until",
|
|
865
865
|
required: ""
|
|
866
866
|
}, null, 8, ["modelValue", "v"])
|
|
@@ -873,21 +873,21 @@ const Na = /* @__PURE__ */ K({
|
|
|
873
873
|
_(Jt, null, {
|
|
874
874
|
default: F(() => [
|
|
875
875
|
_(Xt),
|
|
876
|
-
_(
|
|
876
|
+
_(J, {
|
|
877
877
|
"data-cy": "button-cancel",
|
|
878
|
-
onClick: H(
|
|
878
|
+
onClick: H(P, ["stop"])
|
|
879
879
|
}, {
|
|
880
880
|
default: F(() => [
|
|
881
|
-
|
|
881
|
+
G(j(N(k)("common.button.cancel")), 1)
|
|
882
882
|
]),
|
|
883
883
|
_: 1
|
|
884
884
|
}),
|
|
885
|
-
_(
|
|
885
|
+
_(fe, {
|
|
886
886
|
"data-cy": "button-confirm",
|
|
887
|
-
onClick: H(
|
|
887
|
+
onClick: H(U, ["stop"])
|
|
888
888
|
}, {
|
|
889
889
|
default: F(() => [
|
|
890
|
-
|
|
890
|
+
G(j(N(k)("common.button.confirm")), 1)
|
|
891
891
|
]),
|
|
892
892
|
_: 1
|
|
893
893
|
})
|
|
@@ -899,20 +899,20 @@ const Na = /* @__PURE__ */ K({
|
|
|
899
899
|
})
|
|
900
900
|
]),
|
|
901
901
|
_: 3
|
|
902
|
-
})) :
|
|
902
|
+
})) : ie("", !0)
|
|
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: {},
|
|
910
910
|
items: {}
|
|
911
911
|
},
|
|
912
912
|
emits: ["change"],
|
|
913
|
-
setup(
|
|
914
|
-
const e =
|
|
915
|
-
if (d(g) || d(b) || d(
|
|
913
|
+
setup(f, { emit: h }) {
|
|
914
|
+
const e = f, c = h, g = w(ye), b = w(me), p = w(ce), s = w(ee), u = w(re);
|
|
915
|
+
if (d(g) || d(b) || d(p) || d(s) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
916
916
|
d(s.fields[e.name]) || d(u) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
917
917
|
d(u[e.name]))
|
|
918
918
|
throw new Error("Incorrect provide/inject config.");
|
|
@@ -923,43 +923,43 @@ const Na = /* @__PURE__ */ K({
|
|
|
923
923
|
set(o) {
|
|
924
924
|
u[e.name] = o, n(), b.value = !0, c("change");
|
|
925
925
|
}
|
|
926
|
-
}),
|
|
927
|
-
m(e.name, u, s),
|
|
926
|
+
}), v = I(() => s.fields[e.name]), { t } = X(), r = I(() => v.value.titleT ? t(v.value.titleT) : void 0), { clearOne: m } = he(), a = () => {
|
|
927
|
+
m(e.name, u, s), p.value.delete(e.name);
|
|
928
928
|
}, n = () => {
|
|
929
|
-
if (
|
|
930
|
-
if (
|
|
931
|
-
|
|
929
|
+
if (z(l.value) && l.value.length === 0) return;
|
|
930
|
+
if (z(l.value)) {
|
|
931
|
+
p.value.set(
|
|
932
932
|
e.name,
|
|
933
933
|
l.value.map((i) => {
|
|
934
|
-
const
|
|
935
|
-
return
|
|
934
|
+
const k = e.items.find((T) => T.value === i);
|
|
935
|
+
return k ? { title: k.title, value: k.value } : { title: i, value: i };
|
|
936
936
|
})
|
|
937
937
|
);
|
|
938
938
|
return;
|
|
939
939
|
}
|
|
940
940
|
const o = e.items.find((i) => i.value === l.value);
|
|
941
|
-
o &&
|
|
941
|
+
o && p.value.set(e.name, [{ title: o.title, value: o.value }]);
|
|
942
942
|
};
|
|
943
|
-
return
|
|
943
|
+
return Y(
|
|
944
944
|
() => u[e.name],
|
|
945
945
|
(o, i) => {
|
|
946
|
-
o === i ||
|
|
946
|
+
o === i || ne(o) || O(o) || d(o) || z(o) && o.length === 0 || n();
|
|
947
947
|
},
|
|
948
948
|
{ immediate: !0 }
|
|
949
|
-
), (o, i) => (S(),
|
|
949
|
+
), (o, i) => (S(), q(kt, {
|
|
950
950
|
modelValue: l.value,
|
|
951
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
951
|
+
"onUpdate:modelValue": i[0] || (i[0] = (k) => l.value = k),
|
|
952
952
|
items: o.items,
|
|
953
|
-
chips:
|
|
953
|
+
chips: v.value.multiple,
|
|
954
954
|
label: r.value,
|
|
955
|
-
multiple:
|
|
956
|
-
clearable: !
|
|
955
|
+
multiple: v.value.multiple,
|
|
956
|
+
clearable: !v.value.mandatory,
|
|
957
957
|
"data-cy": "filter-value",
|
|
958
958
|
"hide-details": "",
|
|
959
959
|
"onClick:clear": H(a, ["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" },
|
|
@@ -967,13 +967,13 @@ const Na = /* @__PURE__ */ K({
|
|
|
967
967
|
dataCy: { default: "filter-advanced" }
|
|
968
968
|
},
|
|
969
969
|
emits: ["advancedFilter"],
|
|
970
|
-
setup(
|
|
971
|
-
const e =
|
|
972
|
-
Nt(
|
|
973
|
-
}, { t: b } =
|
|
974
|
-
return (
|
|
975
|
-
class: Ve(
|
|
976
|
-
"data-cy":
|
|
970
|
+
setup(f, { emit: h }) {
|
|
971
|
+
const e = h, c = R(!1), g = (p) => {
|
|
972
|
+
Nt(p), c.value = !c.value, e("advancedFilter");
|
|
973
|
+
}, { t: b } = X();
|
|
974
|
+
return (p, s) => (S(), q(le, {
|
|
975
|
+
class: Ve(p.buttonClass),
|
|
976
|
+
"data-cy": p.dataCy,
|
|
977
977
|
icon: "",
|
|
978
978
|
size: "x-small",
|
|
979
979
|
variant: "text",
|
|
@@ -986,7 +986,7 @@ const Na = /* @__PURE__ */ K({
|
|
|
986
986
|
location: "bottom"
|
|
987
987
|
}, {
|
|
988
988
|
default: F(() => [
|
|
989
|
-
|
|
989
|
+
G(j(N(b)(p.tooltipT)), 1)
|
|
990
990
|
]),
|
|
991
991
|
_: 1
|
|
992
992
|
})
|
|
@@ -994,43 +994,43 @@ 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
|
-
setup(
|
|
1000
|
-
const
|
|
1001
|
-
if (d(
|
|
999
|
+
setup(f) {
|
|
1000
|
+
const h = w(ee), e = w(re), c = w(ce), g = w(me);
|
|
1001
|
+
if (d(h) || d(e) || d(c) || d(g))
|
|
1002
1002
|
throw new Error("Incorrect provide/inject config.");
|
|
1003
|
-
const { t: b } =
|
|
1003
|
+
const { t: b } = X(), p = (l) => {
|
|
1004
1004
|
var t, r;
|
|
1005
|
-
const
|
|
1006
|
-
return
|
|
1005
|
+
const v = (r = (t = h.fields) == null ? void 0 : t[l]) == null ? void 0 : r.titleT;
|
|
1006
|
+
return v ? b(v) : l;
|
|
1007
1007
|
}, s = I(() => {
|
|
1008
|
-
const l = Object.keys(
|
|
1009
|
-
return Array.from(c.value).map(([
|
|
1010
|
-
name:
|
|
1011
|
-
title:
|
|
1008
|
+
const l = Object.keys(h.fields);
|
|
1009
|
+
return Array.from(c.value).map(([v, t]) => ({
|
|
1010
|
+
name: v,
|
|
1011
|
+
title: p(v),
|
|
1012
1012
|
options: t
|
|
1013
|
-
})).sort((
|
|
1014
|
-
}), u = (l,
|
|
1013
|
+
})).sort((v, t) => l.indexOf(v.name) - l.indexOf(t.name));
|
|
1014
|
+
}), u = (l, v) => {
|
|
1015
1015
|
const t = c.value.get(l);
|
|
1016
1016
|
if (t && t.length === 1)
|
|
1017
1017
|
c.value.delete(l);
|
|
1018
1018
|
else if (t) {
|
|
1019
|
-
const r = t.findIndex((m) => m.value ===
|
|
1019
|
+
const r = t.findIndex((m) => m.value === v);
|
|
1020
1020
|
t.splice(r, 1);
|
|
1021
1021
|
}
|
|
1022
|
-
if (
|
|
1023
|
-
const r = e[l].findIndex((a) => a ===
|
|
1022
|
+
if (z(e[l]) && e[l].length > 0) {
|
|
1023
|
+
const r = e[l].findIndex((a) => a === v), m = [...ra(e[l])];
|
|
1024
1024
|
m.splice(r, 1), e[l] = m;
|
|
1025
|
-
} else (
|
|
1025
|
+
} else (oe(e[l]) || ht(e[l]) || ne(e[l])) && (e[l] = h.fields[l].default);
|
|
1026
1026
|
g.value = !0;
|
|
1027
1027
|
};
|
|
1028
|
-
return (l,
|
|
1028
|
+
return (l, v) => (S(!0), L(de, null, ke(s.value, (t) => (S(), L("div", {
|
|
1029
1029
|
key: t.name,
|
|
1030
1030
|
class: "a-selected-filters"
|
|
1031
1031
|
}, [
|
|
1032
|
-
|
|
1033
|
-
(S(!0), L(
|
|
1032
|
+
ae("div", qa, j(t.title) + ": ", 1),
|
|
1033
|
+
(S(!0), L(de, null, ke(t.options, (r) => (S(), L("div", {
|
|
1034
1034
|
key: r.value,
|
|
1035
1035
|
class: "a-selected-filters__chips"
|
|
1036
1036
|
}, [
|
|
@@ -1047,33 +1047,33 @@ const Na = /* @__PURE__ */ K({
|
|
|
1047
1047
|
})
|
|
1048
1048
|
]),
|
|
1049
1049
|
default: F(() => [
|
|
1050
|
-
|
|
1050
|
+
G(" " + 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: {}
|
|
1061
1061
|
},
|
|
1062
|
-
setup(
|
|
1063
|
-
const
|
|
1064
|
-
return (e, c) => (S(), L("div", null, j(
|
|
1062
|
+
setup(f) {
|
|
1063
|
+
const h = f;
|
|
1064
|
+
return (e, c) => (S(), L("div", null, j(h.name), 1));
|
|
1065
1065
|
}
|
|
1066
|
-
}), ja = /* @__PURE__ */
|
|
1066
|
+
}), ja = /* @__PURE__ */ W({
|
|
1067
1067
|
__name: "FilterDetailItem",
|
|
1068
1068
|
props: {
|
|
1069
1069
|
name: {}
|
|
1070
1070
|
},
|
|
1071
|
-
setup(
|
|
1072
|
-
const
|
|
1071
|
+
setup(f) {
|
|
1072
|
+
const h = f, e = w(ee);
|
|
1073
1073
|
if (d(e) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
1074
|
-
d(e.fields[
|
|
1074
|
+
d(e.fields[h.name]))
|
|
1075
1075
|
throw new Error("Incorrect provide/inject config.");
|
|
1076
|
-
const c = I(() => e.fields[
|
|
1076
|
+
const c = I(() => e.fields[h.name]), g = I(() => {
|
|
1077
1077
|
if (c.value.render.skip) return St;
|
|
1078
1078
|
switch (c.value.type) {
|
|
1079
1079
|
case "string":
|
|
@@ -1088,10 +1088,10 @@ const Na = /* @__PURE__ */ K({
|
|
|
1088
1088
|
return St;
|
|
1089
1089
|
}
|
|
1090
1090
|
});
|
|
1091
|
-
return (b,
|
|
1091
|
+
return (b, p) => (S(), q(sa(g.value), { name: b.name }, null, 8, ["name"]));
|
|
1092
1092
|
}
|
|
1093
1093
|
});
|
|
1094
|
-
function It(
|
|
1094
|
+
function It(f, h = "userAdminConfig") {
|
|
1095
1095
|
const e = [
|
|
1096
1096
|
{ name: "user" },
|
|
1097
1097
|
{ name: "configType" },
|
|
@@ -1110,8 +1110,8 @@ function It(v, y = "userAdminConfig") {
|
|
|
1110
1110
|
defaultConfig: null
|
|
1111
1111
|
}),
|
|
1112
1112
|
{
|
|
1113
|
-
system:
|
|
1114
|
-
subject:
|
|
1113
|
+
system: f,
|
|
1114
|
+
subject: h
|
|
1115
1115
|
}
|
|
1116
1116
|
);
|
|
1117
1117
|
return {
|
|
@@ -1127,43 +1127,43 @@ const We = {
|
|
|
1127
1127
|
Mobile: "mobile"
|
|
1128
1128
|
}, Ka = Ce.Desktop;
|
|
1129
1129
|
function Wa() {
|
|
1130
|
-
const
|
|
1130
|
+
const f = R([]), h = (t) => {
|
|
1131
1131
|
u("limit", t);
|
|
1132
1132
|
}, e = (t, r) => {
|
|
1133
1133
|
u("offset", t * r - r);
|
|
1134
1134
|
}, c = (t, r) => {
|
|
1135
|
-
|
|
1136
|
-
}, g = (t) =>
|
|
1137
|
-
|
|
1138
|
-
},
|
|
1135
|
+
!O(t) && t.length > 0 && u("order[" + t + "]", r ? "desc" : "asc");
|
|
1136
|
+
}, g = (t) => ne(t) ? t ? "1" : "0" : t, b = (t, r, m) => {
|
|
1137
|
+
oe(m) && m.length === 0 || f.value.push("filter_" + t + "[" + r + "]=" + g(m));
|
|
1138
|
+
}, p = (t, r, m, a, n) => {
|
|
1139
1139
|
let o = m[t], i = m[r];
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1140
|
+
O(o) && n && (o = a.fields[t].default), O(i) && n && (i = a.fields[t].default);
|
|
1141
|
+
const k = $e(), T = ma(k);
|
|
1142
1142
|
switch (o) {
|
|
1143
|
-
case
|
|
1144
|
-
return
|
|
1145
|
-
case
|
|
1146
|
-
return
|
|
1147
|
-
case
|
|
1148
|
-
return
|
|
1149
|
-
case
|
|
1143
|
+
case ue.CurrentMonth:
|
|
1144
|
+
return pt(T, "utc", 0, !1);
|
|
1145
|
+
case ue.LastMonth:
|
|
1146
|
+
return pt(T, "utc", -1, !1);
|
|
1147
|
+
case ue.Last3Months:
|
|
1148
|
+
return pt(T, "utc", -2, !0);
|
|
1149
|
+
case ue.Custom:
|
|
1150
1150
|
return {
|
|
1151
1151
|
from: o,
|
|
1152
1152
|
until: i
|
|
1153
1153
|
};
|
|
1154
1154
|
default:
|
|
1155
|
-
if (
|
|
1155
|
+
if (ht(o))
|
|
1156
1156
|
return {
|
|
1157
1157
|
from: fa(va(o * -1, T)),
|
|
1158
|
-
until:
|
|
1158
|
+
until: k
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
return null;
|
|
1162
|
-
}, s = (t, r) =>
|
|
1163
|
-
|
|
1162
|
+
}, s = (t, r) => O(t) ? r.mandatory && !d(r.default) ? z(r.default) ? r.default.join(",") : r.default : null : oe(t) ? t.length === 0 ? r.mandatory && !d(r.default) && !O(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) => oe(m) ? encodeURIComponent(m) : m).join(",") : null : t.map((m) => oe(m) ? encodeURIComponent(m) : m).join(",") : ht(t) || ne(t) ? t : null, u = (t, r) => {
|
|
1163
|
+
f.value.push(t + "=" + r);
|
|
1164
1164
|
};
|
|
1165
1165
|
return {
|
|
1166
|
-
querySetLimit:
|
|
1166
|
+
querySetLimit: h,
|
|
1167
1167
|
querySetOffset: e,
|
|
1168
1168
|
querySetOrder: c,
|
|
1169
1169
|
queryAddFilter: b,
|
|
@@ -1174,24 +1174,24 @@ function Wa() {
|
|
|
1174
1174
|
if (d(o) || o.exclude)
|
|
1175
1175
|
continue;
|
|
1176
1176
|
if (o.type === "timeInterval" && !d(o.related)) {
|
|
1177
|
-
const
|
|
1177
|
+
const k = p(
|
|
1178
1178
|
a,
|
|
1179
1179
|
o.related,
|
|
1180
1180
|
t,
|
|
1181
1181
|
r,
|
|
1182
1182
|
o.mandatory
|
|
1183
1183
|
);
|
|
1184
|
-
if (
|
|
1184
|
+
if (O(k))
|
|
1185
1185
|
continue;
|
|
1186
1186
|
if (m) {
|
|
1187
|
-
u(a,
|
|
1187
|
+
u(a, k.from), u(o.related, k.until);
|
|
1188
1188
|
continue;
|
|
1189
1189
|
}
|
|
1190
|
-
|
|
1190
|
+
k.from && b("gte", a, k.from), k.until && b("lte", o.related, k.until);
|
|
1191
1191
|
continue;
|
|
1192
1192
|
}
|
|
1193
1193
|
const i = s(n, o);
|
|
1194
|
-
if (
|
|
1194
|
+
if (!O(i)) {
|
|
1195
1195
|
if (m) {
|
|
1196
1196
|
u(a, i);
|
|
1197
1197
|
continue;
|
|
@@ -1201,35 +1201,35 @@ function Wa() {
|
|
|
1201
1201
|
}
|
|
1202
1202
|
},
|
|
1203
1203
|
queryAdd: u,
|
|
1204
|
-
queryBuild: () => "?" +
|
|
1204
|
+
queryBuild: () => "?" + f.value.join("&")
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
1207
|
-
class
|
|
1208
|
-
constructor(
|
|
1209
|
-
super("API request failed"), this.name = "AnzuApiAxiosError", this.cause =
|
|
1207
|
+
class ut extends Error {
|
|
1208
|
+
constructor(h) {
|
|
1209
|
+
super("API request failed"), this.name = "AnzuApiAxiosError", this.cause = h;
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
class
|
|
1214
|
-
constructor(
|
|
1215
|
-
super("API request failed"), this.name = "AnzuApiAxiosError", this.cause =
|
|
1212
|
+
const ct = (f) => ze.isAxiosError(f) && (f.code === "ECONNABORTED" || f.message.includes("timeout") || f.cause instanceof Error && f.cause.message.includes("timeout"));
|
|
1213
|
+
class dt extends Error {
|
|
1214
|
+
constructor(h = void 0) {
|
|
1215
|
+
super("API request failed"), this.name = "AnzuApiAxiosError", this.cause = h;
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
const Le = (
|
|
1219
|
-
const { querySetLimit: c, querySetOffset: g, querySetOrder: b, queryBuild:
|
|
1220
|
-
return c(
|
|
1221
|
-
}, Va = (
|
|
1218
|
+
const Le = (f, h, e) => {
|
|
1219
|
+
const { querySetLimit: c, querySetOffset: g, querySetOrder: b, queryBuild: p, querySetFilters: s } = Wa();
|
|
1220
|
+
return c(f.value.rowsPerPage), g(f.value.page, f.value.rowsPerPage), f.value.sortBy && b(f.value.sortBy.key, f.value.sortBy.order === "desc"), s(h, e), p();
|
|
1221
|
+
}, Va = (f, h, e, c = {}) => {
|
|
1222
1222
|
let g = null;
|
|
1223
1223
|
return {
|
|
1224
|
-
executeFetch: async (s, u, l,
|
|
1224
|
+
executeFetch: async (s, u, l, v, t = void 0) => {
|
|
1225
1225
|
g = new AbortController();
|
|
1226
1226
|
try {
|
|
1227
|
-
const r = l.general.elastic ? "/search" : "", m = (d(t) ?
|
|
1227
|
+
const r = l.general.elastic ? "/search" : "", m = (d(t) ? v : Ge(v, t)) + r + Le(s, u, l), a = await f().get(m, {
|
|
1228
1228
|
...c,
|
|
1229
1229
|
signal: g.signal
|
|
1230
1230
|
});
|
|
1231
|
-
if (!
|
|
1232
|
-
throw new
|
|
1231
|
+
if (!Je(a.status))
|
|
1232
|
+
throw new Ye(a.status);
|
|
1233
1233
|
if (a.data) {
|
|
1234
1234
|
const n = a.data;
|
|
1235
1235
|
return zt(n) ? s.value = {
|
|
@@ -1242,13 +1242,13 @@ const Le = (v, y, e) => {
|
|
|
1242
1242
|
currentViewCount: a.data.data.length
|
|
1243
1243
|
}), n.data;
|
|
1244
1244
|
}
|
|
1245
|
-
if (a.status ===
|
|
1245
|
+
if (a.status === Xe)
|
|
1246
1246
|
return [];
|
|
1247
1247
|
throw new ge();
|
|
1248
1248
|
} catch (r) {
|
|
1249
1249
|
if (r instanceof DOMException && r.name === "AbortError")
|
|
1250
1250
|
return [];
|
|
1251
|
-
throw
|
|
1251
|
+
throw Ze(r) ? r : et(r) ? new tt(r) : at(r) ? new lt(r, h, e, r) : ot(r) ? new nt(r, h, e, r) : rt(r) ? new st(r, r) : ct(r) ? new dt(r) : ze.isAxiosError(r) ? (console.error("Axios error: " + v, r.cause), new ut(r)) : (console.error("AnzuFatalError: ", r), new ge(r));
|
|
1252
1252
|
} finally {
|
|
1253
1253
|
g = null;
|
|
1254
1254
|
}
|
|
@@ -1257,30 +1257,30 @@ const Le = (v, y, e) => {
|
|
|
1257
1257
|
g && g.abort();
|
|
1258
1258
|
}
|
|
1259
1259
|
};
|
|
1260
|
-
}, Ee = (
|
|
1260
|
+
}, Ee = (f, h, e, c, g = {}) => {
|
|
1261
1261
|
let b = null;
|
|
1262
1262
|
return {
|
|
1263
|
-
executeRequest: async (u = "", l = void 0,
|
|
1263
|
+
executeRequest: async (u = "", l = void 0, v = void 0) => {
|
|
1264
1264
|
b = new AbortController();
|
|
1265
1265
|
try {
|
|
1266
|
-
const t = { method:
|
|
1267
|
-
t.url = u, u !== "" && !d(l) && (t.url =
|
|
1268
|
-
const r = await
|
|
1266
|
+
const t = { method: h };
|
|
1267
|
+
t.url = u, u !== "" && !d(l) && (t.url = Ge(u, l)), O(v) || (t.data = JSON.stringify(v));
|
|
1268
|
+
const r = await f().request({
|
|
1269
1269
|
...g,
|
|
1270
1270
|
...t,
|
|
1271
1271
|
signal: b.signal
|
|
1272
1272
|
});
|
|
1273
|
-
if (!
|
|
1274
|
-
throw new
|
|
1273
|
+
if (!Je(r.status))
|
|
1274
|
+
throw new Ye(r.status);
|
|
1275
1275
|
if (r.data)
|
|
1276
1276
|
return r.data;
|
|
1277
|
-
if (r.status ===
|
|
1277
|
+
if (r.status === Xe)
|
|
1278
1278
|
return;
|
|
1279
1279
|
throw new ge();
|
|
1280
1280
|
} catch (t) {
|
|
1281
1281
|
if (t instanceof DOMException && t.name === "AbortError")
|
|
1282
1282
|
return [];
|
|
1283
|
-
throw
|
|
1283
|
+
throw Ze(t) ? t : et(t) ? new tt(t) : at(t) ? new lt(t, e, c, t) : ot(t) ? new nt(t, e, c, t) : rt(t) ? new st(t, t) : ct(t) ? new dt(t) : ze.isAxiosError(t) ? (console.error("Axios error: " + u, t.cause), new ut(t)) : (console.error("AnzuFatalError: ", t), new ge(t));
|
|
1284
1284
|
} finally {
|
|
1285
1285
|
b = null;
|
|
1286
1286
|
}
|
|
@@ -1289,95 +1289,95 @@ const Le = (v, y, e) => {
|
|
|
1289
1289
|
b && b.abort();
|
|
1290
1290
|
}
|
|
1291
1291
|
};
|
|
1292
|
-
},
|
|
1293
|
-
function la(
|
|
1292
|
+
}, bt = "/adm/v1/user-admin-config", Qa = "userAdminConfig";
|
|
1293
|
+
function la(f, h, e = Qa, c = bt) {
|
|
1294
1294
|
return {
|
|
1295
|
-
useFetchUserAdminConfigList: () => Va(
|
|
1296
|
-
fetchUserAdminConfig: (
|
|
1297
|
-
const { executeRequest: t } = Ee(
|
|
1298
|
-
return t(c + "/:id", { id:
|
|
1295
|
+
useFetchUserAdminConfigList: () => Va(f, h, e),
|
|
1296
|
+
fetchUserAdminConfig: (v) => {
|
|
1297
|
+
const { executeRequest: t } = Ee(f, "GET", h, e);
|
|
1298
|
+
return t(c + "/:id", { id: v });
|
|
1299
1299
|
},
|
|
1300
|
-
createUserAdminConfig: (
|
|
1301
|
-
const { executeRequest: t } = Ee(
|
|
1302
|
-
return t(c, void 0,
|
|
1300
|
+
createUserAdminConfig: (v) => {
|
|
1301
|
+
const { executeRequest: t } = Ee(f, "POST", h, e);
|
|
1302
|
+
return t(c, void 0, v);
|
|
1303
1303
|
},
|
|
1304
|
-
updateUserAdminConfig: (
|
|
1305
|
-
const { executeRequest: r } = Ee(
|
|
1306
|
-
return r(c + "/:id", { id:
|
|
1304
|
+
updateUserAdminConfig: (v, t) => {
|
|
1305
|
+
const { executeRequest: r } = Ee(f, "POST", h, e);
|
|
1306
|
+
return r(c + "/:id", { id: v }, t);
|
|
1307
1307
|
},
|
|
1308
|
-
deleteUserAdminConfig: (
|
|
1309
|
-
const { executeRequest: t } = Ee(
|
|
1310
|
-
return t(c + "/:id", { id:
|
|
1308
|
+
deleteUserAdminConfig: (v) => {
|
|
1309
|
+
const { executeRequest: t } = Ee(f, "DELETE", h, e);
|
|
1310
|
+
return t(c + "/:id", { id: v });
|
|
1311
1311
|
},
|
|
1312
|
-
updateUserAdminConfigPositions: (
|
|
1313
|
-
const { executeRequest: t } = Ee(
|
|
1314
|
-
return t(c + "/update-positions", void 0, { userAdminConfigs:
|
|
1312
|
+
updateUserAdminConfigPositions: (v) => {
|
|
1313
|
+
const { executeRequest: t } = Ee(f, "PATCH", h, e);
|
|
1314
|
+
return t(c + "/update-positions", void 0, { userAdminConfigs: v });
|
|
1315
1315
|
}
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
1318
|
-
const Ga = 3,
|
|
1319
|
-
const
|
|
1318
|
+
const Ga = 3, Ct = 8, oa = wa("filterBookmarkStore", () => {
|
|
1319
|
+
const f = R(/* @__PURE__ */ new Map()), h = R(!1);
|
|
1320
1320
|
function e(s, u, l) {
|
|
1321
1321
|
return `${s}/userAdminConfig/${u}/${l}`;
|
|
1322
1322
|
}
|
|
1323
1323
|
function c() {
|
|
1324
1324
|
let s = null, u = 1 / 0;
|
|
1325
|
-
|
|
1326
|
-
l.lastUsed < u && (u = l.lastUsed, s =
|
|
1327
|
-
}), s !== null &&
|
|
1325
|
+
f.value.forEach((l, v) => {
|
|
1326
|
+
l.lastUsed < u && (u = l.lastUsed, s = v);
|
|
1327
|
+
}), s !== null && f.value.delete(s);
|
|
1328
1328
|
}
|
|
1329
1329
|
async function g(s, u, l = !1) {
|
|
1330
|
-
|
|
1331
|
-
const
|
|
1330
|
+
h.value = !1;
|
|
1331
|
+
const v = e(s.system, s.layoutType, s.systemResource), t = Date.now();
|
|
1332
1332
|
if (!l) {
|
|
1333
|
-
const o =
|
|
1333
|
+
const o = f.value.get(v);
|
|
1334
1334
|
if (o)
|
|
1335
1335
|
return o.lastUsed = t, o.items;
|
|
1336
1336
|
}
|
|
1337
1337
|
const r = Ne({ key: "position", order: "asc" });
|
|
1338
|
-
r.value.rowsPerPage =
|
|
1338
|
+
r.value.rowsPerPage = Ct;
|
|
1339
1339
|
const { filterConfig: m, filterData: a } = It(s.system);
|
|
1340
1340
|
a.configType = We.FilterBookmark, a.layoutType = s.layoutType, a.systemResource = s.systemResource, a.user = s.user;
|
|
1341
1341
|
let n = [];
|
|
1342
1342
|
try {
|
|
1343
1343
|
const { executeFetch: o } = u();
|
|
1344
|
-
n = await o(r, a, m,
|
|
1344
|
+
n = await o(r, a, m, bt), f.value.set(v, { lastUsed: t, items: n });
|
|
1345
1345
|
} catch {
|
|
1346
|
-
|
|
1346
|
+
h.value = !0;
|
|
1347
1347
|
}
|
|
1348
|
-
return
|
|
1348
|
+
return f.value.size > Ga && c(), n;
|
|
1349
1349
|
}
|
|
1350
1350
|
async function b(s, u) {
|
|
1351
|
-
|
|
1351
|
+
h.value = !1;
|
|
1352
1352
|
const l = Ne({ key: "position", order: "asc" });
|
|
1353
|
-
l.value.rowsPerPage =
|
|
1354
|
-
const { filterConfig:
|
|
1353
|
+
l.value.rowsPerPage = Ct + 1;
|
|
1354
|
+
const { filterConfig: v, filterData: t } = It(s.system);
|
|
1355
1355
|
t.configType = We.FilterBookmark, t.layoutType = s.layoutType, t.systemResource = s.systemResource, t.user = s.user;
|
|
1356
1356
|
let r = 1 / 0;
|
|
1357
1357
|
try {
|
|
1358
1358
|
const { executeFetch: m } = u();
|
|
1359
|
-
r = (await m(l, t,
|
|
1359
|
+
r = (await m(l, t, v, bt)).length;
|
|
1360
1360
|
} catch {
|
|
1361
|
-
|
|
1361
|
+
h.value = !0;
|
|
1362
1362
|
}
|
|
1363
1363
|
return r;
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function p(s, u) {
|
|
1366
1366
|
var l;
|
|
1367
|
-
(l =
|
|
1367
|
+
(l = f.value.get(s)) == null || l.items.push(u);
|
|
1368
1368
|
}
|
|
1369
1369
|
return {
|
|
1370
|
-
bookmarks:
|
|
1371
|
-
error:
|
|
1370
|
+
bookmarks: f,
|
|
1371
|
+
error: h,
|
|
1372
1372
|
getBookmarks: g,
|
|
1373
1373
|
generateKey: e,
|
|
1374
|
-
addOne:
|
|
1374
|
+
addOne: p,
|
|
1375
1375
|
fetchBookmarksCount: b
|
|
1376
1376
|
};
|
|
1377
1377
|
});
|
|
1378
1378
|
function Ja() {
|
|
1379
1379
|
return {
|
|
1380
|
-
createDefaultUserAdminConfig: (
|
|
1380
|
+
createDefaultUserAdminConfig: (h) => ({
|
|
1381
1381
|
id: 0,
|
|
1382
1382
|
user: 0,
|
|
1383
1383
|
configType: Ha,
|
|
@@ -1392,7 +1392,7 @@ function Ja() {
|
|
|
1392
1392
|
createdBy: null,
|
|
1393
1393
|
modifiedBy: null,
|
|
1394
1394
|
_resourceName: "userAdminConfig",
|
|
1395
|
-
_system:
|
|
1395
|
+
_system: h
|
|
1396
1396
|
})
|
|
1397
1397
|
};
|
|
1398
1398
|
}
|
|
@@ -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: {},
|
|
@@ -1418,44 +1418,44 @@ const Ya = {
|
|
|
1418
1418
|
datatableHiddenColumns: { default: void 0 }
|
|
1419
1419
|
},
|
|
1420
1420
|
emits: ["onClose"],
|
|
1421
|
-
setup(
|
|
1422
|
-
const e =
|
|
1423
|
-
if (d(
|
|
1421
|
+
setup(f, { emit: h }) {
|
|
1422
|
+
const e = f, c = h, g = w(ee), b = w(re), p = w(it);
|
|
1423
|
+
if (d(p) || d(g) || d(b))
|
|
1424
1424
|
throw new Error("Incorrect provide/inject config.");
|
|
1425
|
-
const s =
|
|
1425
|
+
const s = R("add"), u = R(""), l = R(!1), v = R(!1), t = R(!1), r = R(!1), m = R(!1), a = R([]), n = R(null), { required: o, maxLength: i } = $t(), k = {
|
|
1426
1426
|
customName: {
|
|
1427
1427
|
required: o,
|
|
1428
1428
|
maxLength: i(100)
|
|
1429
1429
|
}
|
|
1430
|
-
}, T =
|
|
1430
|
+
}, T = gt(k, { customName: u }, { $stopPropagation: !0 }), M = {
|
|
1431
1431
|
itemEdit: {
|
|
1432
1432
|
required: o,
|
|
1433
1433
|
maxLength: i(100)
|
|
1434
1434
|
}
|
|
1435
|
-
},
|
|
1436
|
-
createUserAdminConfig:
|
|
1437
|
-
useFetchUserAdminConfigList:
|
|
1438
|
-
updateUserAdminConfigPositions:
|
|
1439
|
-
deleteUserAdminConfig:
|
|
1440
|
-
updateUserAdminConfig:
|
|
1435
|
+
}, x = gt(M, { itemEdit: n }, { $stopPropagation: !0 }), B = oa(), {
|
|
1436
|
+
createUserAdminConfig: U,
|
|
1437
|
+
useFetchUserAdminConfigList: P,
|
|
1438
|
+
updateUserAdminConfigPositions: V,
|
|
1439
|
+
deleteUserAdminConfig: K,
|
|
1440
|
+
updateUserAdminConfig: Z
|
|
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: $, showValidationError: J } = Ut(), { createDefaultUserAdminConfig: fe } = Ja(), te = async () => {
|
|
1445
1445
|
t.value = !0;
|
|
1446
|
-
const A = a.value.map((
|
|
1446
|
+
const A = a.value.map((D) => D.id);
|
|
1447
1447
|
try {
|
|
1448
|
-
await
|
|
1449
|
-
} catch (
|
|
1450
|
-
|
|
1448
|
+
await V(A), t.value = !1, await y(), c("onClose");
|
|
1449
|
+
} catch (D) {
|
|
1450
|
+
$(D), t.value = !1;
|
|
1451
1451
|
}
|
|
1452
1452
|
}, { serializeFilters: Be } = aa(b, g, e.systemResource), Se = async () => {
|
|
1453
1453
|
t.value = !0, m.value = !1;
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1456
|
-
filter: Be(b,
|
|
1454
|
+
const C = fe(e.system);
|
|
1455
|
+
C.user = e.user, C.configType = We.FilterBookmark, C.layoutType = Ce.Desktop, C.systemResource = e.systemResource, C.customName = u.value, C.data = {
|
|
1456
|
+
filter: Be(b, p, !1),
|
|
1457
1457
|
datatableHiddenColumns: l.value && e.datatableHiddenColumns ? e.datatableHiddenColumns : void 0,
|
|
1458
|
-
sortBy:
|
|
1458
|
+
sortBy: v.value && p.value.sortBy ? p.value.sortBy : void 0
|
|
1459
1459
|
};
|
|
1460
1460
|
try {
|
|
1461
1461
|
const A = await B.fetchBookmarksCount(
|
|
@@ -1465,60 +1465,60 @@ const Ya = {
|
|
|
1465
1465
|
layoutType: Ce.Desktop,
|
|
1466
1466
|
systemResource: e.systemResource
|
|
1467
1467
|
},
|
|
1468
|
-
|
|
1468
|
+
P
|
|
1469
1469
|
);
|
|
1470
|
-
if (A >=
|
|
1470
|
+
if (A >= Ct) {
|
|
1471
1471
|
m.value = !0;
|
|
1472
1472
|
return;
|
|
1473
1473
|
}
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1474
|
+
C.position = A + 1;
|
|
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 (A) {
|
|
1485
|
-
|
|
1485
|
+
$(A), t.value = !1;
|
|
1486
1486
|
}
|
|
1487
1487
|
}, Ie = () => {
|
|
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
|
Se();
|
|
1494
|
-
} else s.value === "manage" && a.value.length > 0 &&
|
|
1495
|
-
}, Pe = async (
|
|
1494
|
+
} else s.value === "manage" && a.value.length > 0 && te();
|
|
1495
|
+
}, Pe = async (C) => {
|
|
1496
1496
|
r.value = !0;
|
|
1497
1497
|
try {
|
|
1498
|
-
await
|
|
1498
|
+
await K(C.raw.id), await y(), se();
|
|
1499
1499
|
} catch (A) {
|
|
1500
|
-
|
|
1500
|
+
$(A);
|
|
1501
1501
|
} finally {
|
|
1502
1502
|
r.value = !1;
|
|
1503
1503
|
}
|
|
1504
|
-
}, _e = xt("inputRef"), Re = async (
|
|
1504
|
+
}, _e = xt("inputRef"), Re = async (C) => {
|
|
1505
1505
|
var A;
|
|
1506
|
-
n.value = { id:
|
|
1507
|
-
}, xe = async (
|
|
1508
|
-
if (
|
|
1506
|
+
n.value = { id: C.raw.id, customName: C.raw.customName }, await we(), (A = _e.value) == null || A.focus();
|
|
1507
|
+
}, xe = async (C) => {
|
|
1508
|
+
if (O(n.value)) return;
|
|
1509
1509
|
r.value = !0;
|
|
1510
|
-
const A =
|
|
1510
|
+
const A = Qe(C.raw);
|
|
1511
1511
|
A.customName = n.value.customName;
|
|
1512
1512
|
try {
|
|
1513
|
-
await
|
|
1514
|
-
} catch (
|
|
1515
|
-
|
|
1513
|
+
await Z(A.id, A), await y(), se();
|
|
1514
|
+
} catch (D) {
|
|
1515
|
+
$(D);
|
|
1516
1516
|
} finally {
|
|
1517
1517
|
r.value = !1;
|
|
1518
1518
|
}
|
|
1519
|
-
},
|
|
1519
|
+
}, se = () => {
|
|
1520
1520
|
n.value = null;
|
|
1521
|
-
},
|
|
1521
|
+
}, y = async () => {
|
|
1522
1522
|
r.value = !0;
|
|
1523
1523
|
try {
|
|
1524
1524
|
a.value = await B.getBookmarks(
|
|
@@ -1528,20 +1528,20 @@ const Ya = {
|
|
|
1528
1528
|
layoutType: Ce.Desktop,
|
|
1529
1529
|
systemResource: e.systemResource
|
|
1530
1530
|
},
|
|
1531
|
-
|
|
1531
|
+
P,
|
|
1532
1532
|
!0
|
|
1533
1533
|
);
|
|
1534
|
-
} catch (
|
|
1535
|
-
|
|
1534
|
+
} catch (C) {
|
|
1535
|
+
$(C);
|
|
1536
1536
|
} finally {
|
|
1537
1537
|
r.value = !1;
|
|
1538
1538
|
}
|
|
1539
1539
|
};
|
|
1540
|
-
return
|
|
1541
|
-
m.value = !1, s.value === "manage" &&
|
|
1542
|
-
}), (
|
|
1543
|
-
const
|
|
1544
|
-
return S(),
|
|
1540
|
+
return Y(s, () => {
|
|
1541
|
+
m.value = !1, s.value === "manage" && y();
|
|
1542
|
+
}), (C, A) => {
|
|
1543
|
+
const D = je("ABtnTertiary"), na = je("ABtnPrimary");
|
|
1544
|
+
return S(), q(Yt, {
|
|
1545
1545
|
"model-value": !0,
|
|
1546
1546
|
width: 500
|
|
1547
1547
|
}, {
|
|
@@ -1549,10 +1549,10 @@ const Ya = {
|
|
|
1549
1549
|
_(Qt, null, {
|
|
1550
1550
|
default: F(() => [
|
|
1551
1551
|
_(Mt, {
|
|
1552
|
-
onOnCancel: A[0] || (A[0] = (
|
|
1552
|
+
onOnCancel: A[0] || (A[0] = (Q) => c("onClose"))
|
|
1553
1553
|
}, {
|
|
1554
1554
|
default: F(() => A[9] || (A[9] = [
|
|
1555
|
-
|
|
1555
|
+
G(" Bookmarks ")
|
|
1556
1556
|
])),
|
|
1557
1557
|
_: 1,
|
|
1558
1558
|
__: [9]
|
|
@@ -1561,20 +1561,20 @@ const Ya = {
|
|
|
1561
1561
|
default: F(() => [
|
|
1562
1562
|
_(Ba, {
|
|
1563
1563
|
modelValue: s.value,
|
|
1564
|
-
"onUpdate:modelValue": A[1] || (A[1] = (
|
|
1564
|
+
"onUpdate:modelValue": A[1] || (A[1] = (Q) => s.value = Q),
|
|
1565
1565
|
"fixed-tabs": ""
|
|
1566
1566
|
}, {
|
|
1567
1567
|
default: F(() => [
|
|
1568
1568
|
_(Bt, { value: "add" }, {
|
|
1569
1569
|
default: F(() => A[10] || (A[10] = [
|
|
1570
|
-
|
|
1570
|
+
G(" Add bookmark ")
|
|
1571
1571
|
])),
|
|
1572
1572
|
_: 1,
|
|
1573
1573
|
__: [10]
|
|
1574
1574
|
}),
|
|
1575
1575
|
_(Bt, { value: "manage" }, {
|
|
1576
1576
|
default: F(() => A[11] || (A[11] = [
|
|
1577
|
-
|
|
1577
|
+
G(" Manage bookmarks ")
|
|
1578
1578
|
])),
|
|
1579
1579
|
_: 1,
|
|
1580
1580
|
__: [11]
|
|
@@ -1584,19 +1584,19 @@ const Ya = {
|
|
|
1584
1584
|
}, 8, ["modelValue"]),
|
|
1585
1585
|
s.value === "add" ? (S(), L("div", Ya, [
|
|
1586
1586
|
_(be, { title: "Current selected filters will be stored with this bookmark." }),
|
|
1587
|
-
m.value ? (S(),
|
|
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
|
+
})) : ie("", !0),
|
|
1592
1592
|
_(be, null, {
|
|
1593
1593
|
default: F(() => [
|
|
1594
1594
|
_(wt, {
|
|
1595
1595
|
modelValue: u.value,
|
|
1596
|
-
"onUpdate:modelValue": A[2] || (A[2] = (
|
|
1596
|
+
"onUpdate:modelValue": A[2] || (A[2] = (Q) => u.value = Q),
|
|
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
|
|
@@ -1605,7 +1605,7 @@ const Ya = {
|
|
|
1605
1605
|
default: F(() => [
|
|
1606
1606
|
_(Tt, {
|
|
1607
1607
|
modelValue: l.value,
|
|
1608
|
-
"onUpdate:modelValue": A[3] || (A[3] = (
|
|
1608
|
+
"onUpdate:modelValue": A[3] || (A[3] = (Q) => l.value = Q),
|
|
1609
1609
|
label: "Save datatable columns also"
|
|
1610
1610
|
}, null, 8, ["modelValue"])
|
|
1611
1611
|
]),
|
|
@@ -1614,8 +1614,8 @@ const Ya = {
|
|
|
1614
1614
|
_(be, null, {
|
|
1615
1615
|
default: F(() => [
|
|
1616
1616
|
_(Tt, {
|
|
1617
|
-
modelValue:
|
|
1618
|
-
"onUpdate:modelValue": A[4] || (A[4] = (
|
|
1617
|
+
modelValue: v.value,
|
|
1618
|
+
"onUpdate:modelValue": A[4] || (A[4] = (Q) => v.value = Q),
|
|
1619
1619
|
label: "Save order"
|
|
1620
1620
|
}, null, 8, ["modelValue"])
|
|
1621
1621
|
]),
|
|
@@ -1624,95 +1624,95 @@ const Ya = {
|
|
|
1624
1624
|
])) : s.value === "manage" ? (S(), L("div", Xa, [
|
|
1625
1625
|
r.value ? (S(), L("div", Za, [
|
|
1626
1626
|
_(Ta, { indeterminate: "" })
|
|
1627
|
-
])) : (S(),
|
|
1627
|
+
])) : (S(), q(pa, {
|
|
1628
1628
|
key: 1,
|
|
1629
1629
|
modelValue: a.value,
|
|
1630
|
-
"onUpdate:modelValue": A[7] || (A[7] = (
|
|
1630
|
+
"onUpdate:modelValue": A[7] || (A[7] = (Q) => a.value = Q),
|
|
1631
1631
|
"show-edit-button": "",
|
|
1632
1632
|
"show-delete-button": "",
|
|
1633
1633
|
onOnDelete: Pe,
|
|
1634
1634
|
onOnEdit: Re
|
|
1635
1635
|
}, Rt({
|
|
1636
|
-
item: F(({ item:
|
|
1637
|
-
n.value && n.value.id ===
|
|
1636
|
+
item: F(({ item: Q }) => [
|
|
1637
|
+
n.value && n.value.id === Q.raw.id ? (S(), q(wt, {
|
|
1638
1638
|
key: 0,
|
|
1639
1639
|
ref_key: "inputRef",
|
|
1640
1640
|
ref: _e,
|
|
1641
1641
|
modelValue: n.value.customName,
|
|
1642
|
-
"onUpdate:modelValue": A[5] || (A[5] = (
|
|
1642
|
+
"onUpdate:modelValue": A[5] || (A[5] = (mt) => n.value.customName = mt),
|
|
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(Q.raw.customName), 1))
|
|
1646
1646
|
]),
|
|
1647
1647
|
_: 2
|
|
1648
1648
|
}, [
|
|
1649
|
-
|
|
1649
|
+
N(O)(n.value) ? void 0 : {
|
|
1650
1650
|
name: "item-buttons",
|
|
1651
|
-
fn: F(({ item:
|
|
1652
|
-
n.value && n.value.id ===
|
|
1653
|
-
_(
|
|
1651
|
+
fn: F(({ item: Q }) => [
|
|
1652
|
+
n.value && n.value.id === Q.raw.id ? (S(), L("div", tl, [
|
|
1653
|
+
_(le, {
|
|
1654
1654
|
icon: "",
|
|
1655
1655
|
size: "x-small",
|
|
1656
1656
|
variant: "text",
|
|
1657
1657
|
class: "mx-1",
|
|
1658
|
-
onClick: H((
|
|
1658
|
+
onClick: H((mt) => xe(Q), ["stop"])
|
|
1659
1659
|
}, {
|
|
1660
1660
|
default: F(() => [
|
|
1661
1661
|
_(Me, { icon: "mdi-check" }),
|
|
1662
1662
|
_(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
|
+
_(le, {
|
|
1671
1671
|
icon: "",
|
|
1672
1672
|
size: "x-small",
|
|
1673
1673
|
variant: "text",
|
|
1674
1674
|
class: "mx-1",
|
|
1675
|
-
onClick: A[6] || (A[6] = H((
|
|
1675
|
+
onClick: A[6] || (A[6] = H((mt) => se(), ["stop"]))
|
|
1676
1676
|
}, {
|
|
1677
1677
|
default: F(() => [
|
|
1678
1678
|
_(Me, { icon: "mdi-close" }),
|
|
1679
1679
|
_(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
|
|
1686
1686
|
})
|
|
1687
|
-
])) :
|
|
1687
|
+
])) : ie("", !0)
|
|
1688
1688
|
]),
|
|
1689
1689
|
key: "0"
|
|
1690
1690
|
}
|
|
1691
1691
|
]), 1032, ["modelValue"]))
|
|
1692
|
-
])) :
|
|
1692
|
+
])) : ie("", !0)
|
|
1693
1693
|
]),
|
|
1694
1694
|
_: 1
|
|
1695
1695
|
}),
|
|
1696
1696
|
_(Jt, null, {
|
|
1697
1697
|
default: F(() => [
|
|
1698
1698
|
_(Xt),
|
|
1699
|
-
_(
|
|
1699
|
+
_(D, {
|
|
1700
1700
|
"data-cy": "button-cancel",
|
|
1701
|
-
onClick: A[8] || (A[8] = H((
|
|
1701
|
+
onClick: A[8] || (A[8] = H((Q) => c("onClose"), ["stop"]))
|
|
1702
1702
|
}, {
|
|
1703
1703
|
default: F(() => [
|
|
1704
|
-
|
|
1704
|
+
G(j(N(E)("common.button.cancel")), 1)
|
|
1705
1705
|
]),
|
|
1706
1706
|
_: 1
|
|
1707
1707
|
}),
|
|
1708
1708
|
_(na, {
|
|
1709
1709
|
"data-cy": "button-confirm",
|
|
1710
1710
|
loading: t.value,
|
|
1711
|
-
disabled: !
|
|
1711
|
+
disabled: !N(O)(n.value),
|
|
1712
1712
|
onClick: H(Ie, ["stop"])
|
|
1713
1713
|
}, {
|
|
1714
1714
|
default: F(() => [
|
|
1715
|
-
|
|
1715
|
+
G(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: {},
|
|
@@ -1744,12 +1744,12 @@ const Ya = {
|
|
|
1744
1744
|
dialogModifiers: {}
|
|
1745
1745
|
}),
|
|
1746
1746
|
emits: ["update:dialog"],
|
|
1747
|
-
setup(
|
|
1748
|
-
const
|
|
1749
|
-
Nt(g),
|
|
1750
|
-
}, { t: c } =
|
|
1751
|
-
return (g, b) => (S(), L(
|
|
1752
|
-
_(
|
|
1747
|
+
setup(f) {
|
|
1748
|
+
const h = Te(f, "dialog"), e = (g) => {
|
|
1749
|
+
Nt(g), h.value = !0;
|
|
1750
|
+
}, { t: c } = X();
|
|
1751
|
+
return (g, b) => (S(), L(de, null, [
|
|
1752
|
+
_(le, {
|
|
1753
1753
|
class: Ve([g.buttonClass, "px-2"]),
|
|
1754
1754
|
"data-cy": g.dataCy,
|
|
1755
1755
|
color: "light",
|
|
@@ -1767,25 +1767,25 @@ const Ya = {
|
|
|
1767
1767
|
location: "bottom"
|
|
1768
1768
|
}, {
|
|
1769
1769
|
default: F(() => [
|
|
1770
|
-
|
|
1770
|
+
G(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
|
-
|
|
1777
|
+
h.value ? (S(), q(al, {
|
|
1778
1778
|
key: 0,
|
|
1779
1779
|
client: g.client,
|
|
1780
1780
|
system: g.system,
|
|
1781
1781
|
user: g.user,
|
|
1782
1782
|
"system-resource": g.systemResource,
|
|
1783
1783
|
"datatable-hidden-columns": g.datatableHiddenColumns,
|
|
1784
|
-
onOnClose: b[0] || (b[0] = (
|
|
1785
|
-
}, null, 8, ["client", "system", "user", "system-resource", "datatable-hidden-columns"])) :
|
|
1784
|
+
onOnClose: b[0] || (b[0] = (p) => h.value = !1)
|
|
1785
|
+
}, null, 8, ["client", "system", "user", "system-resource", "datatable-hidden-columns"])) : ie("", !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: {},
|
|
@@ -1800,117 +1800,122 @@ const Ya = {
|
|
|
1800
1800
|
datatableHiddenColumnsModifiers: {}
|
|
1801
1801
|
}),
|
|
1802
1802
|
emits: /* @__PURE__ */ Ae(["submit"], ["update:datatableHiddenColumns"]),
|
|
1803
|
-
setup(
|
|
1804
|
-
const e =
|
|
1805
|
-
if (d(s) || d(b) || d(
|
|
1803
|
+
setup(f, { emit: h }) {
|
|
1804
|
+
const e = f, c = h, g = Te(f, "datatableHiddenColumns"), b = w(ee), p = w(re), s = w(it), u = w(ce);
|
|
1805
|
+
if (d(s) || d(b) || d(p) || d(u))
|
|
1806
1806
|
throw new Error("Incorrect provide/inject config.");
|
|
1807
|
-
const
|
|
1808
|
-
|
|
1807
|
+
const l = R(!1), v = xt("toolbar"), t = R(300), r = R(1e3), m = oa(), { useFetchUserAdminConfigList: a } = la(e.client, e.system), n = async (x = !1) => {
|
|
1808
|
+
l.value = !0, await m.getBookmarks(
|
|
1809
1809
|
{
|
|
1810
1810
|
system: e.system,
|
|
1811
1811
|
user: e.userId,
|
|
1812
1812
|
layoutType: Ce.Desktop,
|
|
1813
1813
|
systemResource: e.systemResource
|
|
1814
1814
|
},
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
),
|
|
1818
|
-
}, { deserializeFilters:
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1815
|
+
a,
|
|
1816
|
+
x
|
|
1817
|
+
), l.value = !1;
|
|
1818
|
+
}, { deserializeFilters: o } = aa(p, b, e.systemResource), i = (x) => {
|
|
1819
|
+
var P;
|
|
1820
|
+
const B = x.data;
|
|
1821
|
+
He(B.datatableHiddenColumns) && (g.value = B.datatableHiddenColumns), He(B.sortBy) && (s.value = { ...s.value, sortBy: { key: B.sortBy.key, order: B.sortBy.order } });
|
|
1822
|
+
const U = o(B.filter);
|
|
1823
|
+
if (!O(U)) {
|
|
1824
|
+
for (const V in p) {
|
|
1825
|
+
const K = V, Z = U.filters[K];
|
|
1826
|
+
if (d(Z) && ((P = b.fields[K]) != null && P.clearable)) {
|
|
1827
|
+
p[K] = Qe(b.fields[K].default), u.value.delete(K);
|
|
1828
|
+
continue;
|
|
1829
|
+
}
|
|
1830
|
+
p[K] = Z;
|
|
1826
1831
|
}
|
|
1827
1832
|
c("submit");
|
|
1828
1833
|
}
|
|
1829
|
-
},
|
|
1830
|
-
const
|
|
1831
|
-
if (
|
|
1832
|
-
|
|
1833
|
-
let
|
|
1834
|
-
for (let
|
|
1835
|
-
const
|
|
1836
|
-
if (
|
|
1834
|
+
}, k = async (x) => {
|
|
1835
|
+
const B = v.value;
|
|
1836
|
+
if (O(B)) return;
|
|
1837
|
+
r.value = 1e3, await we();
|
|
1838
|
+
let U = 0, P = 0;
|
|
1839
|
+
for (let V = 0; V < B.children.length; V++) {
|
|
1840
|
+
const Z = B.children[V].offsetWidth;
|
|
1841
|
+
if (U += Z, U >= x - nl)
|
|
1837
1842
|
break;
|
|
1838
|
-
|
|
1843
|
+
P++;
|
|
1839
1844
|
}
|
|
1840
|
-
|
|
1845
|
+
r.value = P;
|
|
1841
1846
|
};
|
|
1842
|
-
Aa(
|
|
1843
|
-
|
|
1847
|
+
Aa(v, (x) => {
|
|
1848
|
+
x[0] && (t.value = x[0].contentRect.width);
|
|
1844
1849
|
}), _a(
|
|
1845
|
-
|
|
1846
|
-
(
|
|
1847
|
-
|
|
1850
|
+
t,
|
|
1851
|
+
(x, B) => {
|
|
1852
|
+
x !== B && k(x);
|
|
1848
1853
|
},
|
|
1849
1854
|
{ throttle: 1e3 }
|
|
1850
1855
|
);
|
|
1851
|
-
const
|
|
1852
|
-
const
|
|
1853
|
-
return (
|
|
1854
|
-
}),
|
|
1855
|
-
const
|
|
1856
|
+
const T = I(() => {
|
|
1857
|
+
const x = m.generateKey(e.system, Ce.Desktop, e.systemResource), B = m.bookmarks.get(x);
|
|
1858
|
+
return (B == null ? void 0 : B.items) ?? [];
|
|
1859
|
+
}), M = I(() => {
|
|
1860
|
+
const x = r.value;
|
|
1856
1861
|
return {
|
|
1857
|
-
visible:
|
|
1858
|
-
hidden:
|
|
1862
|
+
visible: T.value.slice(0, x),
|
|
1863
|
+
hidden: T.value.slice(x)
|
|
1859
1864
|
};
|
|
1860
1865
|
});
|
|
1861
|
-
return
|
|
1862
|
-
|
|
1863
|
-
|
|
1866
|
+
return Y([l, () => T.value.length], ([x]) => {
|
|
1867
|
+
x === !0 || O(v.value) || (t.value = v.value.clientWidth, we(() => {
|
|
1868
|
+
k(t.value);
|
|
1864
1869
|
}));
|
|
1865
1870
|
}), Et(() => {
|
|
1866
|
-
|
|
1867
|
-
}), (
|
|
1871
|
+
n();
|
|
1872
|
+
}), (x, B) => (S(), L("div", {
|
|
1868
1873
|
ref: "toolbar",
|
|
1869
|
-
key:
|
|
1874
|
+
key: T.value.length,
|
|
1870
1875
|
class: "w-100 d-flex overflow-hidden align-center mb-1"
|
|
1871
1876
|
}, [
|
|
1872
|
-
|
|
1873
|
-
(S(!0), L(
|
|
1874
|
-
key:
|
|
1877
|
+
l.value ? (S(), L("div", ol)) : (S(), L(de, { key: 1 }, [
|
|
1878
|
+
(S(!0), L(de, null, ke(M.value.visible, (U) => (S(), L("div", {
|
|
1879
|
+
key: U.id,
|
|
1875
1880
|
class: "white-space-nowrap"
|
|
1876
1881
|
}, [
|
|
1877
|
-
_(
|
|
1882
|
+
_(le, {
|
|
1878
1883
|
text: "",
|
|
1879
1884
|
"prepend-icon": "mdi-bookmark-outline",
|
|
1880
1885
|
size: "small",
|
|
1881
1886
|
class: "mr-1 mb-1 bg-grey-lighten-4 text-grey-darken-3",
|
|
1882
|
-
onClick: (
|
|
1887
|
+
onClick: (P) => i(U)
|
|
1883
1888
|
}, {
|
|
1884
1889
|
default: F(() => [
|
|
1885
|
-
|
|
1890
|
+
G(j(U.customName), 1)
|
|
1886
1891
|
]),
|
|
1887
1892
|
_: 2
|
|
1888
1893
|
}, 1032, ["onClick"])
|
|
1889
1894
|
]))), 128)),
|
|
1890
|
-
|
|
1895
|
+
M.value.hidden.length > 0 ? (S(), q(Zt, {
|
|
1891
1896
|
key: 0,
|
|
1892
1897
|
bottom: "",
|
|
1893
1898
|
"offset-y": ""
|
|
1894
1899
|
}, {
|
|
1895
|
-
activator: F(({ props:
|
|
1896
|
-
_(
|
|
1900
|
+
activator: F(({ props: U }) => [
|
|
1901
|
+
_(le, Oe({
|
|
1897
1902
|
icon: "mdi-menu-down",
|
|
1898
1903
|
size: "x-small",
|
|
1899
1904
|
width: 28,
|
|
1900
1905
|
height: 28
|
|
1901
|
-
},
|
|
1906
|
+
}, U), null, 16)
|
|
1902
1907
|
]),
|
|
1903
1908
|
default: F(() => [
|
|
1904
1909
|
_(Kt, { density: "compact" }, {
|
|
1905
1910
|
default: F(() => [
|
|
1906
|
-
(S(!0), L(
|
|
1907
|
-
key:
|
|
1908
|
-
onClick: (
|
|
1911
|
+
(S(!0), L(de, null, ke(M.value.hidden, (U) => (S(), q(Ue, {
|
|
1912
|
+
key: U.id,
|
|
1913
|
+
onClick: (P) => i(U)
|
|
1909
1914
|
}, {
|
|
1910
1915
|
default: F(() => [
|
|
1911
1916
|
_(Wt, null, {
|
|
1912
1917
|
default: F(() => [
|
|
1913
|
-
|
|
1918
|
+
G(j(U.customName), 1)
|
|
1914
1919
|
]),
|
|
1915
1920
|
_: 2
|
|
1916
1921
|
}, 1024)
|
|
@@ -1922,11 +1927,11 @@ const Ya = {
|
|
|
1922
1927
|
})
|
|
1923
1928
|
]),
|
|
1924
1929
|
_: 1
|
|
1925
|
-
})) :
|
|
1930
|
+
})) : ie("", !0)
|
|
1926
1931
|
], 64))
|
|
1927
1932
|
]));
|
|
1928
1933
|
}
|
|
1929
|
-
}), 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__ */
|
|
1934
|
+
}), 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({
|
|
1930
1935
|
__name: "AFilterWrapper",
|
|
1931
1936
|
props: /* @__PURE__ */ Ae({
|
|
1932
1937
|
enableTop: { type: Boolean, default: !1 },
|
|
@@ -1949,62 +1954,62 @@ const Ya = {
|
|
|
1949
1954
|
touchedModifiers: {}
|
|
1950
1955
|
}),
|
|
1951
1956
|
emits: /* @__PURE__ */ Ae(["submit", "bookmarkLoadAfter", "reset"], ["update:datatableHiddenColumns", "update:showDetail", "update:touched"]),
|
|
1952
|
-
setup(
|
|
1953
|
-
const c = e, g = Te(
|
|
1954
|
-
|
|
1955
|
-
const s = w(
|
|
1957
|
+
setup(f, { expose: h, emit: e }) {
|
|
1958
|
+
const c = e, g = Te(f, "datatableHiddenColumns"), b = Te(f, "showDetail"), p = Te(f, "touched");
|
|
1959
|
+
ft(me, p);
|
|
1960
|
+
const s = w(ee), u = w(re);
|
|
1956
1961
|
if (d(s) || d(u))
|
|
1957
1962
|
throw new Error("Incorrect provide/inject config.");
|
|
1958
|
-
const l =
|
|
1959
|
-
|
|
1960
|
-
const
|
|
1961
|
-
|
|
1963
|
+
const l = R(0);
|
|
1964
|
+
ft(ye, l);
|
|
1965
|
+
const v = R(/* @__PURE__ */ new Map());
|
|
1966
|
+
ft(ce, v);
|
|
1962
1967
|
const t = () => {
|
|
1963
|
-
|
|
1968
|
+
p.value = !1, l.value++, we(() => {
|
|
1964
1969
|
c("submit");
|
|
1965
1970
|
});
|
|
1966
|
-
}, { clearAll: r } =
|
|
1967
|
-
|
|
1971
|
+
}, { clearAll: r } = he(), m = () => {
|
|
1972
|
+
we(() => {
|
|
1968
1973
|
l.value++, c("bookmarkLoadAfter");
|
|
1969
1974
|
});
|
|
1970
1975
|
}, a = () => {
|
|
1971
|
-
|
|
1976
|
+
p.value = !1, r(u, s), v.value.clear(), we(() => {
|
|
1972
1977
|
l.value++, c("reset");
|
|
1973
1978
|
});
|
|
1974
1979
|
}, n = () => {
|
|
1975
1980
|
b.value = !b.value;
|
|
1976
1981
|
};
|
|
1977
|
-
return
|
|
1982
|
+
return h({
|
|
1978
1983
|
submit: t,
|
|
1979
1984
|
reset: a
|
|
1980
|
-
}), (o, i) => (S(),
|
|
1985
|
+
}), (o, i) => (S(), q(Sa, {
|
|
1981
1986
|
name: o.formName,
|
|
1982
1987
|
onSubmit: H(t, ["prevent"])
|
|
1983
1988
|
}, {
|
|
1984
1989
|
default: F(() => [
|
|
1985
|
-
o.enableTop ? (S(),
|
|
1990
|
+
o.enableTop ? (S(), q(qe, {
|
|
1986
1991
|
key: 0,
|
|
1987
1992
|
dense: ""
|
|
1988
1993
|
}, {
|
|
1989
1994
|
default: F(() => [
|
|
1990
1995
|
_(Fe, null, {
|
|
1991
1996
|
default: F(() => [
|
|
1992
|
-
|
|
1997
|
+
pe(o.$slots, "top")
|
|
1993
1998
|
]),
|
|
1994
1999
|
_: 3
|
|
1995
2000
|
})
|
|
1996
2001
|
]),
|
|
1997
2002
|
_: 3
|
|
1998
|
-
})) :
|
|
2003
|
+
})) : ie("", !0),
|
|
1999
2004
|
_(qe, { dense: "" }, {
|
|
2000
2005
|
default: F(() => [
|
|
2001
|
-
o.bookmarkSystemResource && o.userId && o.system &&
|
|
2006
|
+
o.bookmarkSystemResource && o.userId && o.system && N(He)(o.client) ? (S(), q(Fe, { key: 0 }, {
|
|
2002
2007
|
default: F(() => [
|
|
2003
|
-
|
|
2004
|
-
|
|
2008
|
+
pe(o.$slots, "bookmarks", {}, () => [
|
|
2009
|
+
ae("div", sl, [
|
|
2005
2010
|
_(rl, {
|
|
2006
2011
|
"datatable-hidden-columns": g.value,
|
|
2007
|
-
"onUpdate:datatableHiddenColumns": i[0] || (i[0] = (
|
|
2012
|
+
"onUpdate:datatableHiddenColumns": i[0] || (i[0] = (k) => g.value = k),
|
|
2008
2013
|
client: o.client,
|
|
2009
2014
|
system: o.system,
|
|
2010
2015
|
"user-id": o.userId,
|
|
@@ -2015,7 +2020,7 @@ const Ya = {
|
|
|
2015
2020
|
])
|
|
2016
2021
|
]),
|
|
2017
2022
|
_: 3
|
|
2018
|
-
})) :
|
|
2023
|
+
})) : ie("", !0)
|
|
2019
2024
|
]),
|
|
2020
2025
|
_: 3
|
|
2021
2026
|
}),
|
|
@@ -2032,32 +2037,32 @@ const Ya = {
|
|
|
2032
2037
|
}),
|
|
2033
2038
|
_(Fe, null, {
|
|
2034
2039
|
default: F(() => [
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2040
|
+
ae("div", il, [
|
|
2041
|
+
ae("div", ul, [
|
|
2042
|
+
pe(o.$slots, "search")
|
|
2038
2043
|
]),
|
|
2039
2044
|
_(La)
|
|
2040
2045
|
])
|
|
2041
2046
|
]),
|
|
2042
2047
|
_: 3
|
|
2043
2048
|
}),
|
|
2044
|
-
o.hideButtons ?
|
|
2049
|
+
o.hideButtons ? ie("", !0) : (S(), q(Fe, {
|
|
2045
2050
|
key: 0,
|
|
2046
2051
|
class: "text-right",
|
|
2047
2052
|
cols: "auto"
|
|
2048
2053
|
}, {
|
|
2049
2054
|
default: F(() => [
|
|
2050
|
-
|
|
2051
|
-
_(ya, { touched:
|
|
2055
|
+
pe(o.$slots, "buttons", {}, () => [
|
|
2056
|
+
_(ya, { touched: p.value }, null, 8, ["touched"]),
|
|
2052
2057
|
_(ha, { onReset: a }),
|
|
2053
|
-
o.bookmarkSystemResource && o.userId && o.system &&
|
|
2058
|
+
o.bookmarkSystemResource && o.userId && o.system && N(He)(o.client) ? (S(), q(ll, {
|
|
2054
2059
|
key: 0,
|
|
2055
2060
|
client: o.client,
|
|
2056
2061
|
system: o.system,
|
|
2057
2062
|
user: o.userId,
|
|
2058
2063
|
"system-resource": o.bookmarkSystemResource,
|
|
2059
2064
|
"datatable-hidden-columns": g.value
|
|
2060
|
-
}, null, 8, ["client", "system", "user", "system-resource", "datatable-hidden-columns"])) :
|
|
2065
|
+
}, null, 8, ["client", "system", "user", "system-resource", "datatable-hidden-columns"])) : ie("", !0)
|
|
2061
2066
|
])
|
|
2062
2067
|
]),
|
|
2063
2068
|
_: 3
|
|
@@ -2065,26 +2070,26 @@ const Ya = {
|
|
|
2065
2070
|
]),
|
|
2066
2071
|
_: 3
|
|
2067
2072
|
}),
|
|
2068
|
-
|
|
2073
|
+
ae("div", null, [
|
|
2069
2074
|
_(Ia, null, {
|
|
2070
2075
|
default: F(() => [
|
|
2071
|
-
ia(
|
|
2072
|
-
|
|
2076
|
+
ia(ae("div", cl, [
|
|
2077
|
+
pe(o.$slots, "detail", {}, () => [
|
|
2073
2078
|
_(qe, null, {
|
|
2074
2079
|
default: F(() => [
|
|
2075
|
-
(S(!0), L(
|
|
2076
|
-
key:
|
|
2077
|
-
cols:
|
|
2078
|
-
sm:
|
|
2079
|
-
md:
|
|
2080
|
-
lg:
|
|
2081
|
-
xl:
|
|
2082
|
-
class: Ve({ "d-none":
|
|
2080
|
+
(S(!0), L(de, null, ke(N(s).fields, (k) => (S(), q(Fe, {
|
|
2081
|
+
key: k.name,
|
|
2082
|
+
cols: k.render.xs,
|
|
2083
|
+
sm: k.render.sm,
|
|
2084
|
+
md: k.render.md,
|
|
2085
|
+
lg: k.render.lg,
|
|
2086
|
+
xl: k.render.xl,
|
|
2087
|
+
class: Ve({ "d-none": k.render.skip })
|
|
2083
2088
|
}, {
|
|
2084
2089
|
default: F(() => [
|
|
2085
|
-
|
|
2090
|
+
pe(o.$slots, N(ga)(k.name), { itemConfig: k }, () => [
|
|
2086
2091
|
_(ja, {
|
|
2087
|
-
name:
|
|
2092
|
+
name: k.name
|
|
2088
2093
|
}, null, 8, ["name"])
|
|
2089
2094
|
])
|
|
2090
2095
|
]),
|
|
@@ -2105,7 +2110,7 @@ const Ya = {
|
|
|
2105
2110
|
_: 3
|
|
2106
2111
|
}, 8, ["name"]));
|
|
2107
2112
|
}
|
|
2108
|
-
}), dl = { class: "d-flex align-center justify-center" }, ml = { class: "text-caption mr-1" }, Yl = /* @__PURE__ */
|
|
2113
|
+
}), dl = { class: "d-flex align-center justify-center" }, ml = { class: "text-caption mr-1" }, Yl = /* @__PURE__ */ W({
|
|
2109
2114
|
__name: "ADatatableOrdering",
|
|
2110
2115
|
props: /* @__PURE__ */ Ae({
|
|
2111
2116
|
variant: { default: "default" },
|
|
@@ -2119,11 +2124,11 @@ const Ya = {
|
|
|
2119
2124
|
modelModifiers: {}
|
|
2120
2125
|
}),
|
|
2121
2126
|
emits: /* @__PURE__ */ Ae(["sortByChange"], ["update:modelValue"]),
|
|
2122
|
-
setup(
|
|
2123
|
-
const e =
|
|
2127
|
+
setup(f, { emit: h }) {
|
|
2128
|
+
const e = f, c = h, g = Te(f, "modelValue"), b = w(it);
|
|
2124
2129
|
if (d(b))
|
|
2125
2130
|
throw new Error("Incorrect provide/inject config.");
|
|
2126
|
-
const { t:
|
|
2131
|
+
const { t: p } = X(), s = [
|
|
2127
2132
|
{ id: 1, titleT: "common.system.datatable.ordering.mostRecent", sortBy: { key: "createdAt", order: "desc" } },
|
|
2128
2133
|
{ id: 2, titleT: "common.system.datatable.ordering.oldest", sortBy: { key: "createdAt", order: "asc" } }
|
|
2129
2134
|
], u = [
|
|
@@ -2131,18 +2136,18 @@ const Ya = {
|
|
|
2131
2136
|
{ id: 1, titleT: "common.system.datatable.ordering.mostRecent", sortBy: { key: "createdAt", order: "desc" } },
|
|
2132
2137
|
{ id: 2, titleT: "common.system.datatable.ordering.oldest", sortBy: { key: "createdAt", order: "asc" } }
|
|
2133
2138
|
], l = I(() => {
|
|
2134
|
-
const m =
|
|
2135
|
-
return m ?
|
|
2136
|
-
}),
|
|
2139
|
+
const m = v.value.find((a) => a.id === g.value);
|
|
2140
|
+
return m ? p(m.titleT) : "";
|
|
2141
|
+
}), v = I(() => e.customOptions ? e.customOptions : e.variant === "most-relevant" ? u : s), t = (m) => {
|
|
2137
2142
|
g.value = m.id;
|
|
2138
2143
|
}, r = (m) => {
|
|
2139
2144
|
m.sortBy || (b.value = { ...b.value, sortBy: null, descending: !0 }, c("sortByChange", m)), b.value.sortBy = m.sortBy, c("sortByChange", m);
|
|
2140
2145
|
};
|
|
2141
|
-
return
|
|
2146
|
+
return Y(
|
|
2142
2147
|
g,
|
|
2143
2148
|
(m, a) => {
|
|
2144
2149
|
if (m === a) return;
|
|
2145
|
-
const n =
|
|
2150
|
+
const n = v.value.find((o) => o.id === m);
|
|
2146
2151
|
if (!d(n)) {
|
|
2147
2152
|
if (d(e.paginationUpdateCustomCb)) {
|
|
2148
2153
|
r(n);
|
|
@@ -2152,29 +2157,29 @@ const Ya = {
|
|
|
2152
2157
|
}
|
|
2153
2158
|
},
|
|
2154
2159
|
{ immediate: !0 }
|
|
2155
|
-
),
|
|
2160
|
+
), Y(
|
|
2156
2161
|
b,
|
|
2157
2162
|
(m, a) => {
|
|
2158
|
-
var o, i,
|
|
2159
|
-
if (((o = m.sortBy) == null ? void 0 : o.key) === ((i = a == null ? void 0 : a.sortBy) == null ? void 0 : i.key) && ((
|
|
2163
|
+
var o, i, k, T;
|
|
2164
|
+
if (((o = m.sortBy) == null ? void 0 : o.key) === ((i = a == null ? void 0 : a.sortBy) == null ? void 0 : i.key) && ((k = m.sortBy) == null ? void 0 : k.order) === ((T = a == null ? void 0 : a.sortBy) == null ? void 0 : T.order))
|
|
2160
2165
|
return;
|
|
2161
|
-
const n =
|
|
2162
|
-
var
|
|
2163
|
-
return ((
|
|
2166
|
+
const n = v.value.find((M) => {
|
|
2167
|
+
var x, B, U, P;
|
|
2168
|
+
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);
|
|
2164
2169
|
});
|
|
2165
2170
|
d(n) || (g.value = n.id);
|
|
2166
2171
|
},
|
|
2167
2172
|
{ immediate: !0 }
|
|
2168
2173
|
), (m, a) => (S(), L("div", dl, [
|
|
2169
|
-
|
|
2170
|
-
_(
|
|
2174
|
+
ae("div", ml, j(N(p)("common.system.datatable.ordering.title")) + ": ", 1),
|
|
2175
|
+
_(le, {
|
|
2171
2176
|
variant: "text",
|
|
2172
2177
|
rounded: "xl",
|
|
2173
2178
|
size: "small",
|
|
2174
2179
|
"append-icon": "mdi-chevron-down"
|
|
2175
2180
|
}, {
|
|
2176
2181
|
default: F(() => [
|
|
2177
|
-
|
|
2182
|
+
G(j(l.value) + " ", 1),
|
|
2178
2183
|
_(Zt, {
|
|
2179
2184
|
activator: "parent",
|
|
2180
2185
|
location: "bottom",
|
|
@@ -2186,7 +2191,7 @@ const Ya = {
|
|
|
2186
2191
|
class: "pa-0"
|
|
2187
2192
|
}, {
|
|
2188
2193
|
default: F(() => [
|
|
2189
|
-
(S(!0), L(
|
|
2194
|
+
(S(!0), L(de, null, ke(v.value, (n) => (S(), q(Ue, {
|
|
2190
2195
|
key: n.id,
|
|
2191
2196
|
onClick: (o) => t(n)
|
|
2192
2197
|
}, {
|
|
@@ -2195,7 +2200,7 @@ const Ya = {
|
|
|
2195
2200
|
class: Ve({ "font-weight-bold": n.id === g.value })
|
|
2196
2201
|
}, {
|
|
2197
2202
|
default: F(() => [
|
|
2198
|
-
|
|
2203
|
+
G(j(N(p)(n.titleT)), 1)
|
|
2199
2204
|
]),
|
|
2200
2205
|
_: 2
|
|
2201
2206
|
}, 1032, ["class"])
|
|
@@ -2216,24 +2221,24 @@ const Ya = {
|
|
|
2216
2221
|
}), fl = { class: "anzu-data-footer" }, vl = {
|
|
2217
2222
|
key: 0,
|
|
2218
2223
|
class: "anzu-data-footer__page-limit"
|
|
2219
|
-
}, 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__ */
|
|
2224
|
+
}, 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({
|
|
2220
2225
|
__name: "ADatatablePagination",
|
|
2221
2226
|
props: {
|
|
2222
2227
|
itemsPerPageOptions: { default: () => [10, 25, 50] },
|
|
2223
2228
|
hideRecordsPerPage: { type: Boolean, default: !1 }
|
|
2224
2229
|
},
|
|
2225
2230
|
emits: ["change"],
|
|
2226
|
-
setup(
|
|
2227
|
-
const e =
|
|
2231
|
+
setup(f, { emit: h }) {
|
|
2232
|
+
const e = h, c = w(it);
|
|
2228
2233
|
if (d(c))
|
|
2229
2234
|
throw new Error("Incorrect provide/inject config.");
|
|
2230
|
-
const { t: g } =
|
|
2231
|
-
|
|
2235
|
+
const { t: g } = X(), b = I(() => Math.ceil(c.value.totalCount / c.value.rowsPerPage)), p = 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), u = I(() => c.value.page === 1), l = I(() => !O(c.value.hasNextPage) || c.value.page === b.value), v = I(() => O(c.value.hasNextPage) && c.value.page === b.value || c.value.hasNextPage === !1), t = I(() => O(c.value.hasNextPage) ? c.value.totalCount : c.value.hasNextPage ? s.value + 1 + "+" : s.value);
|
|
2236
|
+
Y(
|
|
2232
2237
|
() => c.value.rowsPerPage,
|
|
2233
2238
|
(o, i) => {
|
|
2234
2239
|
o !== i && (c.value.page = 1, e("change"));
|
|
2235
2240
|
}
|
|
2236
|
-
),
|
|
2241
|
+
), Y(
|
|
2237
2242
|
() => c.value.page,
|
|
2238
2243
|
(o, i) => {
|
|
2239
2244
|
o !== i && e("change");
|
|
@@ -2249,27 +2254,27 @@ const Ya = {
|
|
|
2249
2254
|
c.value.page = c.value.page + 1;
|
|
2250
2255
|
};
|
|
2251
2256
|
return (o, i) => (S(), L("div", fl, [
|
|
2252
|
-
o.hideRecordsPerPage ?
|
|
2253
|
-
|
|
2257
|
+
o.hideRecordsPerPage ? ie("", !0) : (S(), L("div", vl, [
|
|
2258
|
+
G(j(N(g)("common.system.datatable.itemsPerPage")) + ": ", 1),
|
|
2254
2259
|
_(Pa, {
|
|
2255
|
-
modelValue:
|
|
2256
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
2260
|
+
modelValue: N(c).rowsPerPage,
|
|
2261
|
+
"onUpdate:modelValue": i[0] || (i[0] = (k) => N(c).rowsPerPage = k),
|
|
2257
2262
|
class: "ml-2",
|
|
2258
2263
|
density: "compact",
|
|
2259
2264
|
mandatory: "",
|
|
2260
2265
|
"data-cy": "table-size"
|
|
2261
2266
|
}, {
|
|
2262
2267
|
default: F(() => [
|
|
2263
|
-
(S(!0), L(
|
|
2264
|
-
key:
|
|
2265
|
-
color:
|
|
2266
|
-
value:
|
|
2268
|
+
(S(!0), L(de, null, ke(o.itemsPerPageOptions, (k) => (S(), q(le, {
|
|
2269
|
+
key: k,
|
|
2270
|
+
color: k === N(c).rowsPerPage ? "secondary" : "",
|
|
2271
|
+
value: k,
|
|
2267
2272
|
density: "compact",
|
|
2268
2273
|
size: "small",
|
|
2269
2274
|
variant: "text"
|
|
2270
2275
|
}, {
|
|
2271
2276
|
default: F(() => [
|
|
2272
|
-
|
|
2277
|
+
G(j(k), 1)
|
|
2273
2278
|
]),
|
|
2274
2279
|
_: 2
|
|
2275
2280
|
}, 1032, ["color", "value"]))), 128))
|
|
@@ -2277,16 +2282,16 @@ const Ya = {
|
|
|
2277
2282
|
_: 1
|
|
2278
2283
|
}, 8, ["modelValue"])
|
|
2279
2284
|
])),
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
_(
|
|
2285
|
+
ae("div", pl, j(p.value) + " - " + j(s.value) + " " + j(N(g)("common.system.datatable.from")) + " " + j(t.value), 1),
|
|
2286
|
+
ae("div", yl, [
|
|
2287
|
+
_(le, {
|
|
2283
2288
|
disabled: u.value,
|
|
2284
2289
|
icon: "mdi-page-first",
|
|
2285
2290
|
size: "small",
|
|
2286
2291
|
variant: "text",
|
|
2287
2292
|
onClick: H(r, ["stop"])
|
|
2288
2293
|
}, null, 8, ["disabled"]),
|
|
2289
|
-
_(
|
|
2294
|
+
_(le, {
|
|
2290
2295
|
disabled: u.value,
|
|
2291
2296
|
icon: "mdi-chevron-left",
|
|
2292
2297
|
size: "small",
|
|
@@ -2294,18 +2299,18 @@ const Ya = {
|
|
|
2294
2299
|
onClick: H(a, ["stop"])
|
|
2295
2300
|
}, null, 8, ["disabled"])
|
|
2296
2301
|
]),
|
|
2297
|
-
|
|
2298
|
-
|
|
2302
|
+
ae("div", hl, [
|
|
2303
|
+
ae("span", null, j(N(c).page), 1)
|
|
2299
2304
|
]),
|
|
2300
|
-
|
|
2301
|
-
_(
|
|
2302
|
-
disabled:
|
|
2305
|
+
ae("div", gl, [
|
|
2306
|
+
_(le, {
|
|
2307
|
+
disabled: v.value,
|
|
2303
2308
|
icon: "mdi-chevron-right",
|
|
2304
2309
|
size: "small",
|
|
2305
2310
|
variant: "text",
|
|
2306
2311
|
onClick: H(n, ["stop"])
|
|
2307
2312
|
}, null, 8, ["disabled"]),
|
|
2308
|
-
_(
|
|
2313
|
+
_(le, {
|
|
2309
2314
|
disabled: l.value,
|
|
2310
2315
|
icon: "mdi-page-last",
|
|
2311
2316
|
size: "small",
|
|
@@ -2315,90 +2320,90 @@ const Ya = {
|
|
|
2315
2320
|
])
|
|
2316
2321
|
]));
|
|
2317
2322
|
}
|
|
2318
|
-
}), bl = (
|
|
2319
|
-
const { querySetLimit: c, querySetOffset: g, querySetOrder: b, queryBuild:
|
|
2320
|
-
return c(l), g(1, l), b(e, !1),
|
|
2321
|
-
}, Zl = (
|
|
2322
|
-
let
|
|
2323
|
+
}), bl = (f, h, e = "id") => {
|
|
2324
|
+
const { querySetLimit: c, querySetOffset: g, querySetOrder: b, queryBuild: p, queryAddFilter: s, queryAdd: u } = ba(), l = f.length;
|
|
2325
|
+
return c(l), g(1, l), b(e, !1), h ? u(e, f.join(",")) : s("in", e, f.join(",")), p();
|
|
2326
|
+
}, Zl = (f, h, e, c = {}, g = !1, b = "id") => {
|
|
2327
|
+
let p = null;
|
|
2323
2328
|
return {
|
|
2324
|
-
executeFetch: async (l,
|
|
2329
|
+
executeFetch: async (l, v, t = void 0) => {
|
|
2325
2330
|
var r;
|
|
2326
|
-
|
|
2331
|
+
p = new AbortController();
|
|
2327
2332
|
try {
|
|
2328
|
-
const m = (d(t) ?
|
|
2333
|
+
const m = (d(t) ? v : Ge(v, t)) + bl(l, g, b), a = await f().get(m, {
|
|
2329
2334
|
...c,
|
|
2330
|
-
signal:
|
|
2335
|
+
signal: p.signal
|
|
2331
2336
|
});
|
|
2332
|
-
if (!
|
|
2333
|
-
throw new
|
|
2337
|
+
if (!Je(a.status))
|
|
2338
|
+
throw new Ye(a.status);
|
|
2334
2339
|
if ((r = a.data) != null && r.data)
|
|
2335
2340
|
return a.data.data;
|
|
2336
|
-
if (a.status ===
|
|
2341
|
+
if (a.status === Xe)
|
|
2337
2342
|
return [];
|
|
2338
2343
|
throw new ge();
|
|
2339
2344
|
} catch (m) {
|
|
2340
2345
|
if (m instanceof DOMException && m.name === "AbortError")
|
|
2341
2346
|
return [];
|
|
2342
|
-
throw
|
|
2347
|
+
throw Ze(m) ? m : et(m) ? new tt(m) : at(m) ? new lt(m, h, e, m) : ot(m) ? new nt(m, h, e, m) : rt(m) ? new st(m, m) : ct(m) ? new dt(m) : ze.isAxiosError(m) ? (console.error("Axios error: " + v, m.cause), new ut(m)) : (console.error("AnzuFatalError: ", m), new ge(m));
|
|
2343
2348
|
} finally {
|
|
2344
|
-
|
|
2349
|
+
p = null;
|
|
2345
2350
|
}
|
|
2346
2351
|
},
|
|
2347
2352
|
abortFetch: () => {
|
|
2348
|
-
|
|
2353
|
+
p && p.abort();
|
|
2349
2354
|
}
|
|
2350
2355
|
};
|
|
2351
|
-
}, eo = (
|
|
2356
|
+
}, eo = (f, h, e, c = {}) => {
|
|
2352
2357
|
let g = null;
|
|
2353
2358
|
return {
|
|
2354
|
-
executeFetch: async (s, u, l,
|
|
2359
|
+
executeFetch: async (s, u, l, v = void 0, t = "id", r = !0, m = 100, a = !1) => {
|
|
2355
2360
|
g = new AbortController();
|
|
2356
2361
|
try {
|
|
2357
2362
|
const n = u.general.elastic || a ? "/search" : "", o = Ne({ key: t, order: r ? "desc" : "asc" });
|
|
2358
2363
|
o.value.rowsPerPage = m;
|
|
2359
|
-
const i = (d(
|
|
2364
|
+
const i = (d(v) ? l : Ge(l, v)) + n, k = [], T = await f().get(i + Le(o, s, u), {
|
|
2360
2365
|
...c,
|
|
2361
2366
|
signal: g.signal
|
|
2362
2367
|
});
|
|
2363
|
-
if (!
|
|
2364
|
-
throw new
|
|
2368
|
+
if (!Je(T.status))
|
|
2369
|
+
throw new Ye(T.status);
|
|
2365
2370
|
if (T.data) {
|
|
2366
|
-
const
|
|
2367
|
-
if (
|
|
2368
|
-
for (o.value.hasNextPage =
|
|
2371
|
+
const M = T.data;
|
|
2372
|
+
if (k.push(...M.data), zt(M))
|
|
2373
|
+
for (o.value.hasNextPage = M.hasNextPage; o.value.hasNextPage; ) {
|
|
2369
2374
|
o.value.page++;
|
|
2370
|
-
const B = (await
|
|
2375
|
+
const B = (await f().get(i + Le(o, s, u), {
|
|
2371
2376
|
...c,
|
|
2372
2377
|
signal: g.signal
|
|
2373
2378
|
})).data;
|
|
2374
|
-
|
|
2379
|
+
k.push(...B.data), o.value.hasNextPage = B.hasNextPage;
|
|
2375
2380
|
}
|
|
2376
|
-
else if (qt(
|
|
2377
|
-
if (o.value.totalCount =
|
|
2378
|
-
return
|
|
2379
|
-
const
|
|
2380
|
-
for (let
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2383
|
-
|
|
2381
|
+
else if (qt(M)) {
|
|
2382
|
+
if (o.value.totalCount = M.totalCount, o.value.totalCount <= o.value.rowsPerPage)
|
|
2383
|
+
return k;
|
|
2384
|
+
const x = [], B = Math.ceil(o.value.totalCount / o.value.rowsPerPage);
|
|
2385
|
+
for (let P = 1; P < B; P++) {
|
|
2386
|
+
const V = { ...o.value, page: P + 1 }, K = R(V);
|
|
2387
|
+
x.push(
|
|
2388
|
+
f().get(i + Le(K, s, u), {
|
|
2384
2389
|
...c,
|
|
2385
2390
|
signal: g.signal
|
|
2386
2391
|
})
|
|
2387
2392
|
);
|
|
2388
2393
|
}
|
|
2389
|
-
(await Promise.all(
|
|
2390
|
-
|
|
2394
|
+
(await Promise.all(x)).forEach((P) => {
|
|
2395
|
+
k.push(...P.data.data);
|
|
2391
2396
|
});
|
|
2392
2397
|
}
|
|
2393
|
-
return
|
|
2398
|
+
return k;
|
|
2394
2399
|
}
|
|
2395
|
-
if (T.status ===
|
|
2400
|
+
if (T.status === Xe)
|
|
2396
2401
|
return [];
|
|
2397
2402
|
throw new ge();
|
|
2398
2403
|
} catch (n) {
|
|
2399
2404
|
if (n instanceof DOMException && n.name === "AbortError")
|
|
2400
2405
|
return [];
|
|
2401
|
-
throw
|
|
2406
|
+
throw Ze(n) ? n : et(n) ? new tt(n) : at(n) ? new lt(n, h, e, n) : ot(n) ? new nt(n, h, e, n) : rt(n) ? new st(n, n) : ct(n) ? new dt(n) : ze.isAxiosError(n) ? (console.error("Axios error: " + l, n.cause), new ut(n)) : (console.error("AnzuFatalError: ", n), new ge(n));
|
|
2402
2407
|
} finally {
|
|
2403
2408
|
g = null;
|
|
2404
2409
|
}
|
|
@@ -2413,32 +2418,32 @@ const Ya = {
|
|
|
2413
2418
|
sortable: !1,
|
|
2414
2419
|
fixed: !1
|
|
2415
2420
|
};
|
|
2416
|
-
function to(
|
|
2417
|
-
const u = b ?? Ca, { t: l } = u.global || u,
|
|
2421
|
+
function to(f, h, e = void 0, c = void 0, g = !1, b = void 0, p = void 0, s = void 0) {
|
|
2422
|
+
const u = b ?? Ca, { t: l } = u.global || u, v = f.map((a) => {
|
|
2418
2423
|
const n = { ...Cl, ...a };
|
|
2419
2424
|
return d(n.title) && (d(n.title) && ka.includes(n.key) ? n.title = l("common.model.tracking." + n.key) : d(n.title) && e && c ? n.title = l(e + "." + c + ".model." + n.key) : n.title = ""), n;
|
|
2420
2425
|
}), t = I(() => {
|
|
2421
2426
|
const a = [];
|
|
2422
|
-
return
|
|
2423
|
-
|
|
2427
|
+
return p && a.push({ key: "data-table-expand", sortable: !1 }), v.forEach((n) => {
|
|
2428
|
+
h.value.includes(n.key) || a.push(n);
|
|
2424
2429
|
}), g || a.push({ key: "actions", sortable: !1, fixed: !0 }), a;
|
|
2425
2430
|
}), r = () => {
|
|
2426
2431
|
if (!s || !localStorage) return;
|
|
2427
2432
|
const a = localStorage.getItem(s);
|
|
2428
2433
|
if (!a) return;
|
|
2429
2434
|
const n = JSON.parse(a);
|
|
2430
|
-
Dt(n) &&
|
|
2435
|
+
Dt(n) && z(n.hidden) && (h.value = n.hidden);
|
|
2431
2436
|
}, m = (a) => {
|
|
2432
2437
|
!s || !localStorage || localStorage.setItem(s, JSON.stringify({ hidden: a }));
|
|
2433
2438
|
};
|
|
2434
2439
|
return Et(() => {
|
|
2435
2440
|
r();
|
|
2436
|
-
}),
|
|
2441
|
+
}), Y(h, (a) => {
|
|
2437
2442
|
m(a);
|
|
2438
2443
|
}), {
|
|
2439
|
-
columnsAll:
|
|
2444
|
+
columnsAll: v,
|
|
2440
2445
|
columnsVisible: t,
|
|
2441
|
-
columnsHidden:
|
|
2446
|
+
columnsHidden: h
|
|
2442
2447
|
};
|
|
2443
2448
|
}
|
|
2444
2449
|
export {
|
|
@@ -2453,12 +2458,12 @@ export {
|
|
|
2453
2458
|
Ql as AFilterTimeInterval,
|
|
2454
2459
|
Gl as AFilterValueObjectOptionsSelect,
|
|
2455
2460
|
Jl as AFilterWrapper,
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2461
|
+
it as DatatablePaginationKey,
|
|
2462
|
+
ee as FilterConfigKey,
|
|
2463
|
+
re as FilterDataKey,
|
|
2459
2464
|
ta as FilterInnerConfigKey,
|
|
2460
2465
|
ea as FilterInnerDataKey,
|
|
2461
|
-
|
|
2466
|
+
ue as TimeIntervalSpecialOptions,
|
|
2462
2467
|
to as createDatatableColumnsConfig,
|
|
2463
2468
|
xa as createFilter,
|
|
2464
2469
|
Le as generateListQuery,
|