@anzusystems/common-admin 1.47.0-beta.316 → 1.47.0-beta.317
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 +422 -422
- package/dist/labs.js.map +1 -1
- package/package.json +1 -1
package/dist/labs.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { bO as
|
|
2
|
-
import { aB as
|
|
3
|
-
import { defineComponent as oe, inject as q, computed as U, nextTick as de, ref as E, watch as se, resolveComponent as be, createElementBlock as I, openBlock as
|
|
1
|
+
import { bO as Bt, bP as Ie, aC as we, aD as Ae, d as _, bQ as Yt, H as Se, bR as Qt, l as qe, p as ze, ah as $e, g as Q, bS as je, bT as Ne, n as Fe, k as He, o as ue, a5 as bt, ar as Ke, m as Xt, A as Pt, ag as Gt, af as Zt, ap as Ee, h as ee, s as yt, i as Z, ai as We, aj as Je, ak as Ye, al as Qe, ae as pe, aZ as Xe, a8 as Ge, a9 as Ze, aa as et, ab as tt, am as at, an as ot, ac as nt, ad as st, bU as lt, bV as rt, bW as it, a6 as Dt, bX as Ue, aG as ea, aE as ut, aJ as ht, bb as Ct, bc as ta, f as St, a_ as aa, bM as oa, B as na, D as sa, aV as la, bY as ra, j as ia, bZ as ua, b_ as Le, aX as ca, aY as da, aN as ma, F as fa, b1 as va, ao as ga, a1 as pa, b$ as ba, q as ya, x as ha } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-D8sSAMnK.mjs";
|
|
2
|
+
import { aB as un, c0 as cn, c1 as dn, ax as mn, ay as fn, aA as vn, az as gn, aF as pn, ba as bn, av as yn, aw as hn } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-D8sSAMnK.mjs";
|
|
3
|
+
import { defineComponent as oe, inject as q, computed as U, nextTick as de, ref as E, watch as se, resolveComponent as be, createElementBlock as I, openBlock as h, Fragment as te, createBlock as V, createCommentVNode as W, withModifiers as M, unref as b, withCtx as u, createVNode as r, mergeProps as ct, renderSlot as K, createTextVNode as O, toDisplayString as P, normalizeClass as _e, renderList as me, createElementVNode as L, useTemplateRef as $t, createSlots as Ca, mergeModels as fe, useModel as Ce, onMounted as Et, provide as kt, resolveDynamicComponent as ka, withDirectives as Vt, vShow as It, toRaw as wt } from "vue";
|
|
4
4
|
import { useI18n as le } from "vue-i18n";
|
|
5
|
-
import { VCard as
|
|
6
|
-
import { VDialog as
|
|
7
|
-
import { VSpacer as
|
|
8
|
-
import { VListItem as
|
|
9
|
-
import { VSelect as
|
|
10
|
-
import { VTextarea as
|
|
5
|
+
import { VCard as dt, VCardText as Ut, VCardActions as Rt } from "vuetify/components/VCard";
|
|
6
|
+
import { VDialog as mt } from "vuetify/components/VDialog";
|
|
7
|
+
import { VSpacer as ft, VRow as Te, VCol as ge } from "vuetify/components/VGrid";
|
|
8
|
+
import { VListItem as vt, VList as Ot, VListItemTitle as jt } from "vuetify/components/VList";
|
|
9
|
+
import { VSelect as wa } from "vuetify/components/VSelect";
|
|
10
|
+
import { VTextarea as Aa } from "vuetify/components/VTextarea";
|
|
11
11
|
import { VBtn as G } from "vuetify/components/VBtn";
|
|
12
12
|
import { VIcon as ye } from "vuetify/components/VIcon";
|
|
13
13
|
import { VTooltip as ke } from "vuetify/components/VTooltip";
|
|
14
|
-
import { VChip as
|
|
15
|
-
import { defineStore as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { VProgressCircular as
|
|
19
|
-
import { VTabs as
|
|
20
|
-
import { useResizeObserver as
|
|
21
|
-
import { VMenu as
|
|
22
|
-
import { VForm as
|
|
23
|
-
import { VBtnToggle as
|
|
24
|
-
import { VToolbar as
|
|
25
|
-
import { Intersect as
|
|
26
|
-
const
|
|
14
|
+
import { VChip as At } from "vuetify/components/VChip";
|
|
15
|
+
import { defineStore as _a } from "pinia";
|
|
16
|
+
import gt from "axios";
|
|
17
|
+
import _t from "@vuelidate/core";
|
|
18
|
+
import { VProgressCircular as xa } from "vuetify/components/VProgressCircular";
|
|
19
|
+
import { VTabs as Fa, VTab as xt } from "vuetify/components/VTabs";
|
|
20
|
+
import { useResizeObserver as Ta, watchThrottled as Ba, useThrottleFn as Be, useDebounceFn as Pa } from "@vueuse/core";
|
|
21
|
+
import { VMenu as Nt } from "vuetify/components/VMenu";
|
|
22
|
+
import { VForm as Da } from "vuetify/components/VForm";
|
|
23
|
+
import { VBtnToggle as Sa } from "vuetify/components/VBtnToggle";
|
|
24
|
+
import { VToolbar as $a } from "vuetify/components/VToolbar";
|
|
25
|
+
import { Intersect as Ea } from "vuetify/directives";
|
|
26
|
+
const Va = /* @__PURE__ */ oe({
|
|
27
27
|
__name: "AFilterTimeInterval",
|
|
28
28
|
props: {
|
|
29
29
|
nameFrom: {},
|
|
@@ -34,8 +34,8 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
34
34
|
},
|
|
35
35
|
emits: ["change"],
|
|
36
36
|
setup(e, { emit: d }) {
|
|
37
|
-
const s = e, o = d,
|
|
38
|
-
if (_(
|
|
37
|
+
const s = e, o = d, C = q(Bt), m = q(Ie), l = q(we), a = q(Ae);
|
|
38
|
+
if (_(C) || _(m) || _(l) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
39
39
|
_(l.fields[s.nameFrom]) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
40
40
|
_(l.fields[s.nameUntil]) || _(a) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
41
41
|
_(a[s.nameFrom]) || // eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
@@ -50,13 +50,13 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
50
50
|
o("change");
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
}), { timeIntervalOptions: g, getTimeIntervalOption: c } =
|
|
53
|
+
}), { timeIntervalOptions: g, getTimeIntervalOption: c } = Yt(s.allowed), i = E(null), p = E(!1), n = E({
|
|
54
54
|
from: null,
|
|
55
|
-
until:
|
|
56
|
-
}), t = E(!1), { v$:
|
|
55
|
+
until: Se()
|
|
56
|
+
}), t = E(!1), { v$: y } = Qt(n), A = U(() => l.fields[s.nameFrom]), { t: f } = le(), D = U(() => A.value.titleT ? f(A.value.titleT) : void 0), { clearOne: N } = Ke(), { showValidationError: x } = qe(), F = () => {
|
|
57
57
|
t.value = !1, i.value = null, S();
|
|
58
58
|
}, k = () => {
|
|
59
|
-
if (
|
|
59
|
+
if (y.value.$touch(), y.value.$invalid) {
|
|
60
60
|
x();
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
@@ -66,14 +66,14 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
66
66
|
}, S = () => {
|
|
67
67
|
N(s.nameFrom, a, l), N(s.nameUntil, a, l), m.value.delete(s.nameFrom);
|
|
68
68
|
}, j = (w) => {
|
|
69
|
-
if (
|
|
69
|
+
if (ze(w) || $e(w)) return;
|
|
70
70
|
if (Q(w) || _(w)) {
|
|
71
71
|
m.value.delete(s.nameFrom);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
const B = c(w);
|
|
75
|
-
if (!B &&
|
|
76
|
-
const X = c(
|
|
75
|
+
if (!B && je(w)) {
|
|
76
|
+
const X = c(Ne.Custom);
|
|
77
77
|
m.value.set(s.nameFrom, [
|
|
78
78
|
{
|
|
79
79
|
title: X.title + ": " + Fe(n.value.from) + " - " + Fe(n.value.until),
|
|
@@ -84,18 +84,18 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
84
84
|
}
|
|
85
85
|
B && m.value.set(s.nameFrom, [{ title: B.title, value: w }]);
|
|
86
86
|
}, R = (w = !1) => {
|
|
87
|
-
|
|
87
|
+
y.value.$reset(), w && (n.value.from = null, n.value.until = Se()), p.value = !0;
|
|
88
88
|
};
|
|
89
89
|
se(
|
|
90
90
|
v,
|
|
91
91
|
(w) => {
|
|
92
|
-
if (
|
|
92
|
+
if (ze(w) || $e(w)) return;
|
|
93
93
|
if (t.value = !1, _(w) || Q(w)) {
|
|
94
94
|
i.value = null;
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
const B = c(v.value), X = a[s.nameUntil];
|
|
98
|
-
!B &&
|
|
98
|
+
!B && je(v.value) && je(X) && (i.value = Ne.Custom, n.value.from = v.value, n.value.until = X, t.value = !0), B && (i.value = B.value);
|
|
99
99
|
},
|
|
100
100
|
{ immediate: !0 }
|
|
101
101
|
), se(
|
|
@@ -106,7 +106,7 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
106
106
|
{ immediate: !0 }
|
|
107
107
|
);
|
|
108
108
|
const ae = (w) => {
|
|
109
|
-
if (w.value ===
|
|
109
|
+
if (w.value === Ne.Custom) {
|
|
110
110
|
R(!0);
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
@@ -114,11 +114,11 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
114
114
|
};
|
|
115
115
|
return (w, B) => {
|
|
116
116
|
const X = be("ABtnTertiary"), J = be("ABtnPrimary");
|
|
117
|
-
return
|
|
118
|
-
t.value ? (
|
|
117
|
+
return h(), I(te, null, [
|
|
118
|
+
t.value ? (h(), V(Aa, {
|
|
119
119
|
key: 0,
|
|
120
120
|
label: D.value,
|
|
121
|
-
"model-value":
|
|
121
|
+
"model-value": b(Fe)(n.value.from) + " - " + b(Fe)(n.value.until),
|
|
122
122
|
readonly: "",
|
|
123
123
|
rows: "1",
|
|
124
124
|
"auto-grow": "",
|
|
@@ -128,38 +128,38 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
128
128
|
class: "cursor-pointer",
|
|
129
129
|
"onClick:clear": M(F, ["stop"]),
|
|
130
130
|
onClick: B[0] || (B[0] = M((Y) => R(), ["stop"]))
|
|
131
|
-
}, null, 8, ["label", "model-value"])) : (
|
|
131
|
+
}, null, 8, ["label", "model-value"])) : (h(), V(wa, {
|
|
132
132
|
key: 1,
|
|
133
133
|
modelValue: i.value,
|
|
134
134
|
"onUpdate:modelValue": B[1] || (B[1] = (Y) => i.value = Y),
|
|
135
135
|
"item-title": "title",
|
|
136
136
|
"item-value": "value",
|
|
137
137
|
label: D.value,
|
|
138
|
-
clearable: !
|
|
138
|
+
clearable: !b(Q)(i.value),
|
|
139
139
|
"no-filter": "",
|
|
140
140
|
"data-cy": e.dataCy,
|
|
141
|
-
items:
|
|
141
|
+
items: b(g),
|
|
142
142
|
"hide-details": "",
|
|
143
143
|
autocomplete: "off",
|
|
144
144
|
"onClick:clear": M(F, ["stop"])
|
|
145
145
|
}, {
|
|
146
146
|
item: u(({ props: Y, item: re }) => [
|
|
147
|
-
r(
|
|
147
|
+
r(vt, ct(Y, {
|
|
148
148
|
onClick: (ve) => ae(re)
|
|
149
149
|
}), null, 16, ["onClick"])
|
|
150
150
|
]),
|
|
151
151
|
_: 1
|
|
152
152
|
}, 8, ["modelValue", "label", "clearable", "data-cy", "items"])),
|
|
153
|
-
p.value ? (
|
|
153
|
+
p.value ? (h(), V(mt, {
|
|
154
154
|
key: 2,
|
|
155
155
|
"model-value": !0,
|
|
156
156
|
width: "auto",
|
|
157
157
|
"min-width": 360
|
|
158
158
|
}, {
|
|
159
159
|
default: u(() => [
|
|
160
|
-
r(
|
|
160
|
+
r(dt, null, {
|
|
161
161
|
default: u(() => [
|
|
162
|
-
r(
|
|
162
|
+
r(He, { onOnCancel: $ }, {
|
|
163
163
|
default: u(() => [
|
|
164
164
|
K(w.$slots, "title", {}, () => [
|
|
165
165
|
O(P(D.value), 1)
|
|
@@ -167,15 +167,15 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
167
167
|
]),
|
|
168
168
|
_: 3
|
|
169
169
|
}),
|
|
170
|
-
r(
|
|
170
|
+
r(Ut, null, {
|
|
171
171
|
default: u(() => [
|
|
172
172
|
r(ue, null, {
|
|
173
173
|
default: u(() => [
|
|
174
|
-
r(
|
|
174
|
+
r(bt, {
|
|
175
175
|
modelValue: n.value.from,
|
|
176
176
|
"onUpdate:modelValue": B[2] || (B[2] = (Y) => n.value.from = Y),
|
|
177
|
-
v:
|
|
178
|
-
label:
|
|
177
|
+
v: b(y).dialogData.from,
|
|
178
|
+
label: b(f)("common.filter.timeInterval.from"),
|
|
179
179
|
required: ""
|
|
180
180
|
}, null, 8, ["modelValue", "v", "label"])
|
|
181
181
|
]),
|
|
@@ -183,11 +183,11 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
183
183
|
}),
|
|
184
184
|
r(ue, null, {
|
|
185
185
|
default: u(() => [
|
|
186
|
-
r(
|
|
186
|
+
r(bt, {
|
|
187
187
|
modelValue: n.value.until,
|
|
188
188
|
"onUpdate:modelValue": B[3] || (B[3] = (Y) => n.value.until = Y),
|
|
189
|
-
v:
|
|
190
|
-
label:
|
|
189
|
+
v: b(y).dialogData.until,
|
|
190
|
+
label: b(f)("common.filter.timeInterval.until"),
|
|
191
191
|
required: ""
|
|
192
192
|
}, null, 8, ["modelValue", "v", "label"])
|
|
193
193
|
]),
|
|
@@ -196,15 +196,15 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
196
196
|
]),
|
|
197
197
|
_: 1
|
|
198
198
|
}),
|
|
199
|
-
r(
|
|
199
|
+
r(Rt, null, {
|
|
200
200
|
default: u(() => [
|
|
201
|
-
r(
|
|
201
|
+
r(ft),
|
|
202
202
|
r(X, {
|
|
203
203
|
"data-cy": "button-cancel",
|
|
204
204
|
onClick: M($, ["stop"])
|
|
205
205
|
}, {
|
|
206
206
|
default: u(() => [
|
|
207
|
-
O(P(
|
|
207
|
+
O(P(b(f)("common.button.cancel")), 1)
|
|
208
208
|
]),
|
|
209
209
|
_: 1
|
|
210
210
|
}),
|
|
@@ -213,7 +213,7 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
213
213
|
onClick: M(k, ["stop"])
|
|
214
214
|
}, {
|
|
215
215
|
default: u(() => [
|
|
216
|
-
O(P(
|
|
216
|
+
O(P(b(f)("common.button.confirm")), 1)
|
|
217
217
|
]),
|
|
218
218
|
_: 1
|
|
219
219
|
})
|
|
@@ -229,7 +229,7 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
229
229
|
], 64);
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
}),
|
|
232
|
+
}), Go = /* @__PURE__ */ Xt(Va, [["__scopeId", "data-v-622f5681"]]), Ia = /* @__PURE__ */ oe({
|
|
233
233
|
__name: "AFilterAdvancedButton",
|
|
234
234
|
props: {
|
|
235
235
|
tooltipT: { default: "common.button.advancedFilters" },
|
|
@@ -238,16 +238,16 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
238
238
|
},
|
|
239
239
|
emits: ["advancedFilter"],
|
|
240
240
|
setup(e, { emit: d }) {
|
|
241
|
-
const s = d, o = E(!1),
|
|
242
|
-
|
|
241
|
+
const s = d, o = E(!1), C = (l) => {
|
|
242
|
+
Pt(l), o.value = !o.value, s("advancedFilter");
|
|
243
243
|
}, { t: m } = le();
|
|
244
|
-
return (l, a) => (
|
|
244
|
+
return (l, a) => (h(), V(G, {
|
|
245
245
|
class: _e(e.buttonClass),
|
|
246
246
|
"data-cy": e.dataCy,
|
|
247
247
|
icon: "",
|
|
248
248
|
size: "x-small",
|
|
249
249
|
variant: "text",
|
|
250
|
-
onClick: M(
|
|
250
|
+
onClick: M(C, ["stop"])
|
|
251
251
|
}, {
|
|
252
252
|
default: u(() => [
|
|
253
253
|
r(ye, { icon: "mdi-filter-variant" }),
|
|
@@ -256,7 +256,7 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
256
256
|
location: "bottom"
|
|
257
257
|
}, {
|
|
258
258
|
default: u(() => [
|
|
259
|
-
O(P(
|
|
259
|
+
O(P(b(m)(e.tooltipT)), 1)
|
|
260
260
|
]),
|
|
261
261
|
_: 1
|
|
262
262
|
})
|
|
@@ -264,15 +264,15 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
264
264
|
_: 1
|
|
265
265
|
}, 8, ["class", "data-cy"]));
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
267
|
+
}), Ua = { class: "a-selected-filters__label text-caption" }, Ra = /* @__PURE__ */ oe({
|
|
268
268
|
__name: "FiltersSelected",
|
|
269
269
|
setup(e) {
|
|
270
|
-
const d = q(we), s = q(Ae), o = q(
|
|
270
|
+
const d = q(we), s = q(Ae), o = q(Ie);
|
|
271
271
|
if (_(d) || _(s) || _(o))
|
|
272
272
|
throw new Error("Incorrect provide/inject config.");
|
|
273
|
-
const { t:
|
|
273
|
+
const { t: C } = le(), m = (c) => {
|
|
274
274
|
const i = d.fields?.[c]?.titleT;
|
|
275
|
-
return i ?
|
|
275
|
+
return i ? C(i) : c;
|
|
276
276
|
}, l = U(() => {
|
|
277
277
|
const c = Object.keys(d.fields);
|
|
278
278
|
return Array.from(o.value).map(([i, p]) => ({
|
|
@@ -280,19 +280,19 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
280
280
|
title: m(i),
|
|
281
281
|
options: p
|
|
282
282
|
})).sort((i, p) => c.indexOf(i.name) - c.indexOf(p.name));
|
|
283
|
-
}), { clearOneFilterSelected: a, isClearable: v } =
|
|
283
|
+
}), { clearOneFilterSelected: a, isClearable: v } = Ke(), g = (c, i) => {
|
|
284
284
|
a(c, i, s, d, o), d.touched = !0;
|
|
285
285
|
};
|
|
286
|
-
return (c, i) => (
|
|
286
|
+
return (c, i) => (h(!0), I(te, null, me(l.value, (p) => (h(), I("div", {
|
|
287
287
|
key: p.name,
|
|
288
288
|
class: "a-selected-filters"
|
|
289
289
|
}, [
|
|
290
|
-
L("div",
|
|
291
|
-
(
|
|
290
|
+
L("div", Ua, P(p.title) + ": ", 1),
|
|
291
|
+
(h(!0), I(te, null, me(p.options, (n) => (h(), I("div", {
|
|
292
292
|
key: n.value,
|
|
293
293
|
class: "a-selected-filters__chips"
|
|
294
294
|
}, [
|
|
295
|
-
|
|
295
|
+
b(v)(p.name, b(d)) ? (h(), V(At, {
|
|
296
296
|
key: 0,
|
|
297
297
|
closable: "",
|
|
298
298
|
size: "small",
|
|
@@ -309,7 +309,7 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
309
309
|
O(" " + P(n.title), 1)
|
|
310
310
|
]),
|
|
311
311
|
_: 2
|
|
312
|
-
}, 1032, ["onClick:close"])) : (
|
|
312
|
+
}, 1032, ["onClick:close"])) : (h(), V(At, {
|
|
313
313
|
key: 1,
|
|
314
314
|
size: "small",
|
|
315
315
|
class: "a-selected-filters__chip"
|
|
@@ -323,7 +323,7 @@ const Ea = /* @__PURE__ */ oe({
|
|
|
323
323
|
]))), 128));
|
|
324
324
|
}
|
|
325
325
|
});
|
|
326
|
-
function
|
|
326
|
+
function Ft(e, d = "userAdminConfig") {
|
|
327
327
|
const s = [
|
|
328
328
|
{ name: "user", default: null },
|
|
329
329
|
{ name: "configType", default: null },
|
|
@@ -331,22 +331,22 @@ function xt(e, d = "userAdminConfig") {
|
|
|
331
331
|
{ name: "systemResource", default: null },
|
|
332
332
|
{ name: "customName", default: null },
|
|
333
333
|
{ name: "defaultConfig", default: null }
|
|
334
|
-
], { filterConfig: o, filterData:
|
|
334
|
+
], { filterConfig: o, filterData: C } = Gt(s, Zt(s), {
|
|
335
335
|
system: e,
|
|
336
336
|
subject: d
|
|
337
337
|
});
|
|
338
338
|
return {
|
|
339
339
|
filterConfig: o,
|
|
340
|
-
filterData:
|
|
340
|
+
filterData: C
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
const
|
|
343
|
+
const Ve = {
|
|
344
344
|
PinnedWidgets: "pinnedWidgets",
|
|
345
345
|
FilterBookmark: "filterBookmark"
|
|
346
|
-
},
|
|
346
|
+
}, Oa = Ve.PinnedWidgets, ce = {
|
|
347
347
|
Desktop: "desktop",
|
|
348
348
|
Mobile: "mobile"
|
|
349
|
-
},
|
|
349
|
+
}, ja = ce.Desktop, Na = 3, Me = 8, Lt = _a("filterBookmarkStore", () => {
|
|
350
350
|
const e = E(/* @__PURE__ */ new Map()), d = E(!1);
|
|
351
351
|
function s(a, v) {
|
|
352
352
|
return `userAdminConfig/${v}/${a}/`;
|
|
@@ -357,7 +357,7 @@ const Ee = {
|
|
|
357
357
|
g.lastUsed < v && (v = g.lastUsed, a = c);
|
|
358
358
|
}), a !== null && e.value.delete(a);
|
|
359
359
|
}
|
|
360
|
-
async function
|
|
360
|
+
async function C(a, v, g = !1) {
|
|
361
361
|
d.value = !1;
|
|
362
362
|
const c = s(a.layoutType, a.systemResource), i = Date.now();
|
|
363
363
|
if (!g) {
|
|
@@ -365,29 +365,29 @@ const Ee = {
|
|
|
365
365
|
if (D)
|
|
366
366
|
return D.lastUsed = i, D.items;
|
|
367
367
|
}
|
|
368
|
-
const { pagination: p } =
|
|
369
|
-
rowsPerPage:
|
|
370
|
-
}), { start: n, end: t } =
|
|
371
|
-
A.configType =
|
|
368
|
+
const { pagination: p } = Ee("position", ee.Asc, {
|
|
369
|
+
rowsPerPage: Me
|
|
370
|
+
}), { start: n, end: t } = yt(a.systemResource, "_"), { filterConfig: y, filterData: A } = Ft(n, t);
|
|
371
|
+
A.configType = Ve.FilterBookmark, A.layoutType = a.layoutType, A.systemResource = a.systemResource, A.user = a.user;
|
|
372
372
|
let f = [];
|
|
373
373
|
try {
|
|
374
374
|
const { executeFetch: D } = v();
|
|
375
|
-
f = await D(p, A,
|
|
375
|
+
f = await D(p, A, y), e.value.set(c, { lastUsed: i, items: f });
|
|
376
376
|
} catch {
|
|
377
377
|
d.value = !0;
|
|
378
378
|
}
|
|
379
|
-
return e.value.size >
|
|
379
|
+
return e.value.size > Na && o(), f;
|
|
380
380
|
}
|
|
381
381
|
async function m(a, v) {
|
|
382
382
|
d.value = !1;
|
|
383
|
-
const { pagination: g } =
|
|
384
|
-
rowsPerPage:
|
|
385
|
-
}), { start: c, end: i } =
|
|
386
|
-
n.configType =
|
|
383
|
+
const { pagination: g } = Ee("position", ee.Asc, {
|
|
384
|
+
rowsPerPage: Me + 1
|
|
385
|
+
}), { start: c, end: i } = yt(a.systemResource, "_"), { filterConfig: p, filterData: n } = Ft(c, i);
|
|
386
|
+
n.configType = Ve.FilterBookmark, n.layoutType = a.layoutType, n.systemResource = a.systemResource, n.user = a.user;
|
|
387
387
|
let t = 1 / 0;
|
|
388
388
|
try {
|
|
389
|
-
const { executeFetch:
|
|
390
|
-
t = (await
|
|
389
|
+
const { executeFetch: y } = v();
|
|
390
|
+
t = (await y(g, n, p)).length;
|
|
391
391
|
} catch {
|
|
392
392
|
d.value = !0;
|
|
393
393
|
}
|
|
@@ -399,36 +399,36 @@ const Ee = {
|
|
|
399
399
|
return {
|
|
400
400
|
bookmarks: e,
|
|
401
401
|
error: d,
|
|
402
|
-
getBookmarks:
|
|
402
|
+
getBookmarks: C,
|
|
403
403
|
generateKey: s,
|
|
404
404
|
addOne: l,
|
|
405
405
|
fetchBookmarksCount: m
|
|
406
406
|
};
|
|
407
|
-
}), he = (e, d, s, o,
|
|
407
|
+
}), he = (e, d, s, o, C = void 0, m = void 0, l = {}) => {
|
|
408
408
|
let a = null;
|
|
409
409
|
return {
|
|
410
410
|
executeRequest: async (c = void 0, i = void 0, p = void 0) => {
|
|
411
411
|
a = new AbortController();
|
|
412
412
|
try {
|
|
413
|
-
const n = { method: d }, t = Z(i) ? i : m,
|
|
414
|
-
if (_(
|
|
415
|
-
n.url =
|
|
413
|
+
const n = { method: d }, t = Z(i) ? i : m, y = Z(c) ? c : C;
|
|
414
|
+
if (_(y)) throw new Error("Url template is undefined");
|
|
415
|
+
n.url = y, y !== "" && !_(t) && (n.url = We(y, t)), Q(p) || (n.data = JSON.stringify(p));
|
|
416
416
|
const A = await e().request({
|
|
417
417
|
...l,
|
|
418
418
|
...n,
|
|
419
419
|
signal: a.signal
|
|
420
420
|
});
|
|
421
|
-
if (!
|
|
422
|
-
throw new
|
|
421
|
+
if (!Je(A.status))
|
|
422
|
+
throw new Ye(A.status);
|
|
423
423
|
if (A.data)
|
|
424
424
|
return A.data;
|
|
425
|
-
if (A.status ===
|
|
425
|
+
if (A.status === Qe)
|
|
426
426
|
return;
|
|
427
427
|
throw new pe();
|
|
428
428
|
} catch (n) {
|
|
429
429
|
if (n instanceof DOMException && n.name === "AbortError")
|
|
430
430
|
return [];
|
|
431
|
-
throw
|
|
431
|
+
throw Xe(n) ? n : Ge(n) ? new Ze(n, n.config?.url) : et(n) ? new tt(n, s, o, n) : at(n) ? new ot(n, s, o, n) : nt(n) ? new st(n, n) : lt(n) ? new rt(n) : gt.isAxiosError(n) ? (console.error("Axios error: " + C, n.cause), new it(n)) : (console.error("AnzuFatalError: ", n), new pe(n));
|
|
432
432
|
} finally {
|
|
433
433
|
a = null;
|
|
434
434
|
}
|
|
@@ -437,10 +437,10 @@ const Ee = {
|
|
|
437
437
|
a && a.abort();
|
|
438
438
|
}
|
|
439
439
|
};
|
|
440
|
-
},
|
|
441
|
-
function
|
|
440
|
+
}, Tt = "/adm/v1/user-admin-config", La = "userAdminConfig";
|
|
441
|
+
function zt(e, d, s = La, o = Tt) {
|
|
442
442
|
return {
|
|
443
|
-
useFetchUserAdminConfigList: () =>
|
|
443
|
+
useFetchUserAdminConfigList: () => Dt(e, d, s, Tt),
|
|
444
444
|
fetchUserAdminConfig: (c) => {
|
|
445
445
|
const { executeRequest: i } = he(e, "GET", d, s);
|
|
446
446
|
return i(o + "/:id", { id: c });
|
|
@@ -463,20 +463,20 @@ function Lt(e, d, s = Na, o = Ft) {
|
|
|
463
463
|
}
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function za() {
|
|
467
467
|
return {
|
|
468
468
|
createDefaultUserAdminConfig: (d) => ({
|
|
469
469
|
id: 0,
|
|
470
470
|
user: 0,
|
|
471
|
-
configType:
|
|
472
|
-
layoutType:
|
|
471
|
+
configType: Oa,
|
|
472
|
+
layoutType: ja,
|
|
473
473
|
systemResource: "",
|
|
474
474
|
customName: "",
|
|
475
475
|
defaultConfig: !1,
|
|
476
476
|
data: [],
|
|
477
477
|
position: 0,
|
|
478
|
-
createdAt:
|
|
479
|
-
modifiedAt:
|
|
478
|
+
createdAt: Se(),
|
|
479
|
+
modifiedAt: Se(),
|
|
480
480
|
createdBy: null,
|
|
481
481
|
modifiedBy: null,
|
|
482
482
|
_resourceName: "userAdminConfig",
|
|
@@ -484,19 +484,19 @@ function La() {
|
|
|
484
484
|
})
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
|
-
const
|
|
487
|
+
const Ma = {
|
|
488
488
|
key: 0,
|
|
489
489
|
class: "w-100 pt-4"
|
|
490
|
-
},
|
|
490
|
+
}, qa = {
|
|
491
491
|
key: 1,
|
|
492
492
|
class: "w-100 pt-4"
|
|
493
|
-
},
|
|
493
|
+
}, Ha = {
|
|
494
494
|
key: 0,
|
|
495
495
|
class: "d-flex w-100 align-center justify-center"
|
|
496
|
-
},
|
|
496
|
+
}, Ka = { key: 1 }, Wa = {
|
|
497
497
|
key: 0,
|
|
498
498
|
class: "d-flex align-center justify-end"
|
|
499
|
-
},
|
|
499
|
+
}, Ja = /* @__PURE__ */ oe({
|
|
500
500
|
__name: "FilterBookmarkDialog",
|
|
501
501
|
props: {
|
|
502
502
|
client: {},
|
|
@@ -507,20 +507,20 @@ const za = {
|
|
|
507
507
|
},
|
|
508
508
|
emits: ["onClose"],
|
|
509
509
|
setup(e, { emit: d }) {
|
|
510
|
-
const s = e, o = d,
|
|
511
|
-
if (_(l) || _(
|
|
510
|
+
const s = e, o = d, C = q(we), m = q(Ae), l = q(Ue);
|
|
511
|
+
if (_(l) || _(C) || _(m))
|
|
512
512
|
throw new Error("Incorrect provide/inject config.");
|
|
513
|
-
const a = E("add"), v = E(""), g = E(!1), c = E(!1), i = E(!1), p = E(!1), n = E(!1), t = E([]),
|
|
513
|
+
const a = E("add"), v = E(""), g = E(!1), c = E(!1), i = E(!1), p = E(!1), n = E(!1), t = E([]), y = E(null), { required: A, maxLength: f } = ea(), D = {
|
|
514
514
|
customName: {
|
|
515
515
|
required: A,
|
|
516
516
|
maxLength: f(100)
|
|
517
517
|
}
|
|
518
|
-
}, N =
|
|
518
|
+
}, N = _t(D, { customName: v }, { $stopPropagation: !0 }), x = {
|
|
519
519
|
itemEdit: {
|
|
520
520
|
required: A,
|
|
521
521
|
maxLength: f(100)
|
|
522
522
|
}
|
|
523
|
-
}, F =
|
|
523
|
+
}, F = _t(x, { itemEdit: y }, { $stopPropagation: !0 }), k = Lt(), {
|
|
524
524
|
createUserAdminConfig: $,
|
|
525
525
|
useFetchUserAdminConfigList: S,
|
|
526
526
|
updateUserAdminConfigPositions: j,
|
|
@@ -528,8 +528,8 @@ const za = {
|
|
|
528
528
|
updateUserAdminConfig: ae
|
|
529
529
|
} = (
|
|
530
530
|
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
|
531
|
-
|
|
532
|
-
), { t: w } = le(), { showErrorsDefault: B, showValidationError: X, showWarningT: J } =
|
|
531
|
+
zt(s.client, s.system)
|
|
532
|
+
), { t: w } = le(), { showErrorsDefault: B, showValidationError: X, showWarningT: J } = qe(), { createDefaultUserAdminConfig: Y } = za(), re = async () => {
|
|
533
533
|
i.value = !0;
|
|
534
534
|
const T = t.value.map((ne) => ne.id);
|
|
535
535
|
try {
|
|
@@ -537,10 +537,10 @@ const za = {
|
|
|
537
537
|
} catch (ne) {
|
|
538
538
|
B(ne), i.value = !1;
|
|
539
539
|
}
|
|
540
|
-
}, { serializeFilters: ve } =
|
|
540
|
+
}, { serializeFilters: ve } = ut(m, C), ie = s.system + "_" + s.subject, Mt = async () => {
|
|
541
541
|
i.value = !0, n.value = !1;
|
|
542
542
|
const z = Y(s.system);
|
|
543
|
-
z.user = s.user, z.configType =
|
|
543
|
+
z.user = s.user, z.configType = Ve.FilterBookmark, z.layoutType = ce.Desktop, z.systemResource = ie, z.customName = v.value, z.data = {
|
|
544
544
|
filter: ve(m, l, !1),
|
|
545
545
|
datatableHiddenColumns: g.value && s.datatableHiddenColumns ? s.datatableHiddenColumns : void 0,
|
|
546
546
|
sortBy: c.value && l.value.sortBy ? l.value.sortBy : void 0
|
|
@@ -554,7 +554,7 @@ const za = {
|
|
|
554
554
|
},
|
|
555
555
|
S
|
|
556
556
|
);
|
|
557
|
-
if (T >=
|
|
557
|
+
if (T >= Me) {
|
|
558
558
|
n.value = !0, i.value = !1;
|
|
559
559
|
return;
|
|
560
560
|
}
|
|
@@ -565,7 +565,7 @@ const za = {
|
|
|
565
565
|
ne
|
|
566
566
|
), o("onClose");
|
|
567
567
|
} catch (T) {
|
|
568
|
-
if (
|
|
568
|
+
if (aa(T) && oa(T, "error_field_not_unique", "cms.userAdminConfig.model.systemResource")) {
|
|
569
569
|
J("common.filter.bookmark.nameUniqueError");
|
|
570
570
|
return;
|
|
571
571
|
}
|
|
@@ -573,39 +573,39 @@ const za = {
|
|
|
573
573
|
} finally {
|
|
574
574
|
i.value = !1;
|
|
575
575
|
}
|
|
576
|
-
},
|
|
576
|
+
}, qt = () => {
|
|
577
577
|
if (a.value === "add") {
|
|
578
578
|
if (N.value.$touch(), N.value.$invalid) {
|
|
579
579
|
X();
|
|
580
580
|
return;
|
|
581
581
|
}
|
|
582
|
-
|
|
582
|
+
Mt();
|
|
583
583
|
} else a.value === "manage" && t.value.length > 0 && re();
|
|
584
|
-
},
|
|
584
|
+
}, Ht = async (z) => {
|
|
585
585
|
p.value = !0;
|
|
586
586
|
try {
|
|
587
|
-
await R(z.raw.id), await xe(),
|
|
587
|
+
await R(z.raw.id), await xe(), Re();
|
|
588
588
|
} catch (T) {
|
|
589
589
|
B(T);
|
|
590
590
|
} finally {
|
|
591
591
|
p.value = !1;
|
|
592
592
|
}
|
|
593
|
-
},
|
|
594
|
-
|
|
595
|
-
},
|
|
596
|
-
if (Q(
|
|
593
|
+
}, pt = $t("inputRef"), Kt = async (z) => {
|
|
594
|
+
y.value = { id: z.raw.id, customName: z.raw.customName }, await de(), pt.value?.focus();
|
|
595
|
+
}, Wt = async (z) => {
|
|
596
|
+
if (Q(y.value)) return;
|
|
597
597
|
p.value = !0;
|
|
598
|
-
const T =
|
|
599
|
-
T.customName =
|
|
598
|
+
const T = St(z.raw);
|
|
599
|
+
T.customName = y.value.customName;
|
|
600
600
|
try {
|
|
601
|
-
|
|
601
|
+
Re(), await ae(T.id, T), await xe();
|
|
602
602
|
} catch (ne) {
|
|
603
603
|
B(ne);
|
|
604
604
|
} finally {
|
|
605
605
|
p.value = !1;
|
|
606
606
|
}
|
|
607
|
-
},
|
|
608
|
-
|
|
607
|
+
}, Re = () => {
|
|
608
|
+
y.value = null;
|
|
609
609
|
}, xe = async () => {
|
|
610
610
|
p.value = !0;
|
|
611
611
|
try {
|
|
@@ -627,129 +627,129 @@ const za = {
|
|
|
627
627
|
return se(a, () => {
|
|
628
628
|
n.value = !1, a.value === "manage" && xe();
|
|
629
629
|
}), (z, T) => {
|
|
630
|
-
const ne = be("ABtnTertiary"),
|
|
631
|
-
return
|
|
630
|
+
const ne = be("ABtnTertiary"), Jt = be("ABtnPrimary");
|
|
631
|
+
return h(), V(mt, {
|
|
632
632
|
"model-value": !0,
|
|
633
633
|
width: 500
|
|
634
634
|
}, {
|
|
635
635
|
default: u(() => [
|
|
636
|
-
r(
|
|
636
|
+
r(dt, null, {
|
|
637
637
|
default: u(() => [
|
|
638
|
-
r(
|
|
638
|
+
r(He, {
|
|
639
639
|
onOnCancel: T[0] || (T[0] = (H) => o("onClose"))
|
|
640
640
|
}, {
|
|
641
641
|
default: u(() => [
|
|
642
|
-
O(P(
|
|
642
|
+
O(P(b(w)("common.filter.bookmark.title")), 1)
|
|
643
643
|
]),
|
|
644
644
|
_: 1
|
|
645
645
|
}),
|
|
646
|
-
r(
|
|
646
|
+
r(Ut, { class: "pt-0" }, {
|
|
647
647
|
default: u(() => [
|
|
648
|
-
r(
|
|
648
|
+
r(Fa, {
|
|
649
649
|
modelValue: a.value,
|
|
650
650
|
"onUpdate:modelValue": T[1] || (T[1] = (H) => a.value = H),
|
|
651
651
|
"fixed-tabs": ""
|
|
652
652
|
}, {
|
|
653
653
|
default: u(() => [
|
|
654
|
-
r(
|
|
654
|
+
r(xt, { value: "add" }, {
|
|
655
655
|
default: u(() => [
|
|
656
|
-
O(P(
|
|
656
|
+
O(P(b(w)("common.filter.bookmark.add")), 1)
|
|
657
657
|
]),
|
|
658
658
|
_: 1
|
|
659
659
|
}),
|
|
660
|
-
r(
|
|
660
|
+
r(xt, { value: "manage" }, {
|
|
661
661
|
default: u(() => [
|
|
662
|
-
O(P(
|
|
662
|
+
O(P(b(w)("common.filter.bookmark.manage")), 1)
|
|
663
663
|
]),
|
|
664
664
|
_: 1
|
|
665
665
|
})
|
|
666
666
|
]),
|
|
667
667
|
_: 1
|
|
668
668
|
}, 8, ["modelValue"]),
|
|
669
|
-
a.value === "add" ? (
|
|
669
|
+
a.value === "add" ? (h(), I("div", Ma, [
|
|
670
670
|
r(ue, {
|
|
671
|
-
title:
|
|
671
|
+
title: b(w)("common.filter.bookmark.infoSave")
|
|
672
672
|
}, null, 8, ["title"]),
|
|
673
|
-
n.value ? (
|
|
673
|
+
n.value ? (h(), V(ue, {
|
|
674
674
|
key: 0,
|
|
675
675
|
class: "text-error",
|
|
676
|
-
title:
|
|
676
|
+
title: b(w)("common.filter.bookmark.errorMax")
|
|
677
677
|
}, null, 8, ["title"])) : W("", !0),
|
|
678
678
|
r(ue, null, {
|
|
679
679
|
default: u(() => [
|
|
680
|
-
r(
|
|
680
|
+
r(ht, {
|
|
681
681
|
modelValue: v.value,
|
|
682
682
|
"onUpdate:modelValue": T[2] || (T[2] = (H) => v.value = H),
|
|
683
|
-
label:
|
|
683
|
+
label: b(w)("common.filter.bookmark.name"),
|
|
684
684
|
required: "",
|
|
685
|
-
v:
|
|
685
|
+
v: b(N).customName
|
|
686
686
|
}, null, 8, ["modelValue", "label", "v"])
|
|
687
687
|
]),
|
|
688
688
|
_: 1
|
|
689
689
|
}),
|
|
690
690
|
r(ue, null, {
|
|
691
691
|
default: u(() => [
|
|
692
|
-
r(
|
|
692
|
+
r(Ct, {
|
|
693
693
|
modelValue: g.value,
|
|
694
694
|
"onUpdate:modelValue": T[3] || (T[3] = (H) => g.value = H),
|
|
695
|
-
label:
|
|
695
|
+
label: b(w)("common.filter.bookmark.storeTableColumns")
|
|
696
696
|
}, null, 8, ["modelValue", "label"])
|
|
697
697
|
]),
|
|
698
698
|
_: 1
|
|
699
699
|
}),
|
|
700
700
|
r(ue, null, {
|
|
701
701
|
default: u(() => [
|
|
702
|
-
r(
|
|
702
|
+
r(Ct, {
|
|
703
703
|
modelValue: c.value,
|
|
704
704
|
"onUpdate:modelValue": T[4] || (T[4] = (H) => c.value = H),
|
|
705
|
-
label:
|
|
705
|
+
label: b(w)("common.filter.bookmark.storeTableOrder")
|
|
706
706
|
}, null, 8, ["modelValue", "label"])
|
|
707
707
|
]),
|
|
708
708
|
_: 1
|
|
709
709
|
})
|
|
710
|
-
])) : a.value === "manage" ? (
|
|
711
|
-
p.value ? (
|
|
712
|
-
r(
|
|
713
|
-
])) : (
|
|
710
|
+
])) : a.value === "manage" ? (h(), I("div", qa, [
|
|
711
|
+
p.value ? (h(), I("div", Ha, [
|
|
712
|
+
r(xa, { indeterminate: "" })
|
|
713
|
+
])) : (h(), V(ta, {
|
|
714
714
|
key: 1,
|
|
715
715
|
modelValue: t.value,
|
|
716
716
|
"onUpdate:modelValue": T[7] || (T[7] = (H) => t.value = H),
|
|
717
717
|
"show-edit-button": "",
|
|
718
718
|
"show-delete-button": "",
|
|
719
719
|
"permanent-buttons": "",
|
|
720
|
-
onOnDelete:
|
|
721
|
-
onOnEdit:
|
|
722
|
-
},
|
|
720
|
+
onOnDelete: Ht,
|
|
721
|
+
onOnEdit: Kt
|
|
722
|
+
}, Ca({
|
|
723
723
|
item: u(({ item: H }) => [
|
|
724
|
-
|
|
724
|
+
y.value && y.value.id === H.raw.id ? (h(), V(ht, {
|
|
725
725
|
key: 0,
|
|
726
726
|
ref_key: "inputRef",
|
|
727
|
-
ref:
|
|
728
|
-
modelValue:
|
|
729
|
-
"onUpdate:modelValue": T[5] || (T[5] = (
|
|
727
|
+
ref: pt,
|
|
728
|
+
modelValue: y.value.customName,
|
|
729
|
+
"onUpdate:modelValue": T[5] || (T[5] = (Oe) => y.value.customName = Oe),
|
|
730
730
|
"hide-details": "auto",
|
|
731
|
-
v:
|
|
732
|
-
}, null, 8, ["modelValue", "v"])) : (
|
|
731
|
+
v: b(F)
|
|
732
|
+
}, null, 8, ["modelValue", "v"])) : (h(), I("div", Ka, P(H.raw.customName), 1))
|
|
733
733
|
]),
|
|
734
734
|
_: 2
|
|
735
735
|
}, [
|
|
736
|
-
|
|
736
|
+
b(Q)(y.value) ? void 0 : {
|
|
737
737
|
name: "item-buttons",
|
|
738
738
|
fn: u(({ item: H }) => [
|
|
739
|
-
|
|
739
|
+
y.value && y.value.id === H.raw.id ? (h(), I("div", Wa, [
|
|
740
740
|
r(G, {
|
|
741
741
|
icon: "",
|
|
742
742
|
size: "x-small",
|
|
743
743
|
variant: "text",
|
|
744
744
|
class: "mx-1",
|
|
745
|
-
onClick: M((
|
|
745
|
+
onClick: M((Oe) => Wt(H), ["stop"])
|
|
746
746
|
}, {
|
|
747
747
|
default: u(() => [
|
|
748
748
|
r(ye, { icon: "mdi-check" }),
|
|
749
749
|
r(ke, {
|
|
750
750
|
anchor: "bottom",
|
|
751
751
|
activator: "parent",
|
|
752
|
-
text:
|
|
752
|
+
text: b(w)("common.button.confirm")
|
|
753
753
|
}, null, 8, ["text"])
|
|
754
754
|
]),
|
|
755
755
|
_: 1
|
|
@@ -759,14 +759,14 @@ const za = {
|
|
|
759
759
|
size: "x-small",
|
|
760
760
|
variant: "text",
|
|
761
761
|
class: "mx-1",
|
|
762
|
-
onClick: T[6] || (T[6] = M((
|
|
762
|
+
onClick: T[6] || (T[6] = M((Oe) => Re(), ["stop"]))
|
|
763
763
|
}, {
|
|
764
764
|
default: u(() => [
|
|
765
765
|
r(ye, { icon: "mdi-close" }),
|
|
766
766
|
r(ke, {
|
|
767
767
|
anchor: "bottom",
|
|
768
768
|
activator: "parent",
|
|
769
|
-
text:
|
|
769
|
+
text: b(w)("common.button.cancel")
|
|
770
770
|
}, null, 8, ["text"])
|
|
771
771
|
]),
|
|
772
772
|
_: 1
|
|
@@ -780,25 +780,25 @@ const za = {
|
|
|
780
780
|
]),
|
|
781
781
|
_: 1
|
|
782
782
|
}),
|
|
783
|
-
r(
|
|
783
|
+
r(Rt, null, {
|
|
784
784
|
default: u(() => [
|
|
785
|
-
r(
|
|
785
|
+
r(ft),
|
|
786
786
|
r(ne, {
|
|
787
787
|
"data-cy": "button-cancel",
|
|
788
788
|
onClick: T[8] || (T[8] = M((H) => o("onClose"), ["stop"]))
|
|
789
789
|
}, {
|
|
790
790
|
default: u(() => [
|
|
791
|
-
O(P(
|
|
791
|
+
O(P(b(w)("common.button.cancel")), 1)
|
|
792
792
|
]),
|
|
793
793
|
_: 1
|
|
794
794
|
}),
|
|
795
|
-
r(
|
|
795
|
+
r(Jt, {
|
|
796
796
|
"data-cy": "button-confirm",
|
|
797
797
|
loading: i.value,
|
|
798
|
-
onClick: M(
|
|
798
|
+
onClick: M(qt, ["stop"])
|
|
799
799
|
}, {
|
|
800
800
|
default: u(() => [
|
|
801
|
-
O(P(a.value === "add" ?
|
|
801
|
+
O(P(a.value === "add" ? b(w)("common.button.add") : b(w)("common.filter.bookmark.saveBookmarkOrder")), 1)
|
|
802
802
|
]),
|
|
803
803
|
_: 1
|
|
804
804
|
}, 8, ["loading"])
|
|
@@ -813,7 +813,7 @@ const za = {
|
|
|
813
813
|
});
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
|
-
}),
|
|
816
|
+
}), Ya = /* @__PURE__ */ oe({
|
|
817
817
|
__name: "AFilterBookmarkButton",
|
|
818
818
|
props: /* @__PURE__ */ fe({
|
|
819
819
|
client: {},
|
|
@@ -831,10 +831,10 @@ const za = {
|
|
|
831
831
|
}),
|
|
832
832
|
emits: ["update:dialog"],
|
|
833
833
|
setup(e) {
|
|
834
|
-
const d = Ce(e, "dialog"), s = (
|
|
835
|
-
|
|
834
|
+
const d = Ce(e, "dialog"), s = (C) => {
|
|
835
|
+
Pt(C), d.value = !0;
|
|
836
836
|
}, { t: o } = le();
|
|
837
|
-
return (
|
|
837
|
+
return (C, m) => (h(), I(te, null, [
|
|
838
838
|
r(G, {
|
|
839
839
|
class: _e([e.buttonClass, "px-2"]),
|
|
840
840
|
"data-cy": e.dataCy,
|
|
@@ -853,14 +853,14 @@ const za = {
|
|
|
853
853
|
location: "bottom"
|
|
854
854
|
}, {
|
|
855
855
|
default: u(() => [
|
|
856
|
-
O(P(
|
|
856
|
+
O(P(b(o)(e.tooltipT)), 1)
|
|
857
857
|
]),
|
|
858
858
|
_: 1
|
|
859
859
|
})
|
|
860
860
|
]),
|
|
861
861
|
_: 1
|
|
862
862
|
}, 8, ["class", "data-cy"]),
|
|
863
|
-
d.value ? (
|
|
863
|
+
d.value ? (h(), V(Ja, {
|
|
864
864
|
key: 0,
|
|
865
865
|
client: e.client,
|
|
866
866
|
system: e.system,
|
|
@@ -871,7 +871,7 @@ const za = {
|
|
|
871
871
|
}, null, 8, ["client", "system", "user", "subject", "datatable-hidden-columns"])) : W("", !0)
|
|
872
872
|
], 64));
|
|
873
873
|
}
|
|
874
|
-
}),
|
|
874
|
+
}), Qa = { key: 0 }, Xa = 32, Ga = /* @__PURE__ */ oe({
|
|
875
875
|
__name: "FilterBookmarks",
|
|
876
876
|
props: /* @__PURE__ */ fe({
|
|
877
877
|
client: {},
|
|
@@ -887,28 +887,28 @@ const za = {
|
|
|
887
887
|
}),
|
|
888
888
|
emits: /* @__PURE__ */ fe(["submit"], ["update:datatableHiddenColumns"]),
|
|
889
889
|
setup(e, { emit: d }) {
|
|
890
|
-
const s = e, o = d,
|
|
890
|
+
const s = e, o = d, C = Ce(e, "datatableHiddenColumns"), m = q(we), l = q(Ae), a = q(Ue), v = q(Ie);
|
|
891
891
|
if (_(a) || _(m) || _(l) || _(v))
|
|
892
892
|
throw new Error("Incorrect provide/inject config.");
|
|
893
|
-
const g = E(!1), c =
|
|
893
|
+
const g = E(!1), c = $t("toolbar"), i = E(300), p = E(1e3), n = Lt(), { useFetchUserAdminConfigList: t } = zt(s.client, s.system), y = s.system + "_" + s.subject, A = async (k = !1) => {
|
|
894
894
|
g.value = !0, await n.getBookmarks(
|
|
895
895
|
{
|
|
896
896
|
user: s.userId,
|
|
897
897
|
layoutType: ce.Desktop,
|
|
898
|
-
systemResource:
|
|
898
|
+
systemResource: y
|
|
899
899
|
},
|
|
900
900
|
t,
|
|
901
901
|
k
|
|
902
902
|
), g.value = !1;
|
|
903
|
-
}, { deserializeFilters: f } =
|
|
903
|
+
}, { deserializeFilters: f } = ut(l, m), D = (k) => {
|
|
904
904
|
const $ = k.data;
|
|
905
|
-
Z($.datatableHiddenColumns) && Z(
|
|
905
|
+
Z($.datatableHiddenColumns) && Z(C.value) && (C.value = $.datatableHiddenColumns), Z($.sortBy) && (a.value = { ...a.value, sortBy: { key: $.sortBy.key, order: $.sortBy.order } });
|
|
906
906
|
const S = f($.filter);
|
|
907
907
|
if (!Q(S)) {
|
|
908
908
|
for (const j in l) {
|
|
909
909
|
const R = j, ae = S.filters[R];
|
|
910
910
|
if (_(ae) && m.fields[R]?.clearable) {
|
|
911
|
-
l[R] =
|
|
911
|
+
l[R] = St(m.fields[R].default), v.value.delete(R);
|
|
912
912
|
continue;
|
|
913
913
|
}
|
|
914
914
|
l[R] = ae;
|
|
@@ -922,15 +922,15 @@ const za = {
|
|
|
922
922
|
let S = 0, j = 0;
|
|
923
923
|
for (let R = 0; R < $.children.length; R++) {
|
|
924
924
|
const w = $.children[R].offsetWidth;
|
|
925
|
-
if (S += w, S >= k -
|
|
925
|
+
if (S += w, S >= k - Xa)
|
|
926
926
|
break;
|
|
927
927
|
j++;
|
|
928
928
|
}
|
|
929
929
|
p.value = j;
|
|
930
930
|
};
|
|
931
|
-
|
|
931
|
+
Ta(c, (k) => {
|
|
932
932
|
k[0] && (i.value = k[0].contentRect.width);
|
|
933
|
-
}),
|
|
933
|
+
}), Ba(
|
|
934
934
|
i,
|
|
935
935
|
(k, $) => {
|
|
936
936
|
k !== $ && N(k);
|
|
@@ -938,7 +938,7 @@ const za = {
|
|
|
938
938
|
{ throttle: 1e3 }
|
|
939
939
|
);
|
|
940
940
|
const x = U(() => {
|
|
941
|
-
const k = n.generateKey(ce.Desktop,
|
|
941
|
+
const k = n.generateKey(ce.Desktop, y);
|
|
942
942
|
return n.bookmarks.get(k)?.items ?? [];
|
|
943
943
|
}), F = U(() => {
|
|
944
944
|
const k = p.value;
|
|
@@ -951,15 +951,15 @@ const za = {
|
|
|
951
951
|
k === !0 || Q(c.value) || (i.value = c.value.clientWidth, de(() => {
|
|
952
952
|
N(i.value);
|
|
953
953
|
}));
|
|
954
|
-
}),
|
|
954
|
+
}), Et(() => {
|
|
955
955
|
A();
|
|
956
|
-
}), (k, $) => (
|
|
956
|
+
}), (k, $) => (h(), I("div", {
|
|
957
957
|
ref: "toolbar",
|
|
958
958
|
key: x.value.length,
|
|
959
959
|
class: "w-100 d-flex overflow-hidden align-center mb-1"
|
|
960
960
|
}, [
|
|
961
|
-
g.value ? (
|
|
962
|
-
(
|
|
961
|
+
g.value ? (h(), I("div", Qa)) : (h(), I(te, { key: 1 }, [
|
|
962
|
+
(h(!0), I(te, null, me(F.value.visible, (S) => (h(), I("div", {
|
|
963
963
|
key: S.id,
|
|
964
964
|
class: "white-space-nowrap"
|
|
965
965
|
}, [
|
|
@@ -976,13 +976,13 @@ const za = {
|
|
|
976
976
|
_: 2
|
|
977
977
|
}, 1032, ["onClick"])
|
|
978
978
|
]))), 128)),
|
|
979
|
-
F.value.hidden.length > 0 ? (
|
|
979
|
+
F.value.hidden.length > 0 ? (h(), V(Nt, {
|
|
980
980
|
key: 0,
|
|
981
981
|
bottom: "",
|
|
982
982
|
"offset-y": ""
|
|
983
983
|
}, {
|
|
984
984
|
activator: u(({ props: S }) => [
|
|
985
|
-
r(G,
|
|
985
|
+
r(G, ct({
|
|
986
986
|
icon: "mdi-menu-down",
|
|
987
987
|
size: "x-small",
|
|
988
988
|
width: 28,
|
|
@@ -990,14 +990,14 @@ const za = {
|
|
|
990
990
|
}, S), null, 16)
|
|
991
991
|
]),
|
|
992
992
|
default: u(() => [
|
|
993
|
-
r(
|
|
993
|
+
r(Ot, { density: "compact" }, {
|
|
994
994
|
default: u(() => [
|
|
995
|
-
(
|
|
995
|
+
(h(!0), I(te, null, me(F.value.hidden, (S) => (h(), V(vt, {
|
|
996
996
|
key: S.id,
|
|
997
997
|
onClick: (j) => D(S)
|
|
998
998
|
}, {
|
|
999
999
|
default: u(() => [
|
|
1000
|
-
r(
|
|
1000
|
+
r(jt, null, {
|
|
1001
1001
|
default: u(() => [
|
|
1002
1002
|
O(P(S.customName), 1)
|
|
1003
1003
|
]),
|
|
@@ -1015,7 +1015,7 @@ const za = {
|
|
|
1015
1015
|
], 64))
|
|
1016
1016
|
]));
|
|
1017
1017
|
}
|
|
1018
|
-
}),
|
|
1018
|
+
}), Za = { class: "d-flex flex-wrap align-center" }, eo = { class: "a-filter__container" }, to = { class: "a-filter__search" }, ao = { key: 2 }, Zo = /* @__PURE__ */ oe({
|
|
1019
1019
|
__name: "AFilterWrapper",
|
|
1020
1020
|
props: /* @__PURE__ */ fe({
|
|
1021
1021
|
enableTop: { type: Boolean, default: !1 },
|
|
@@ -1037,29 +1037,29 @@ const za = {
|
|
|
1037
1037
|
}),
|
|
1038
1038
|
emits: /* @__PURE__ */ fe(["submit", "reset", "bookmarkLoadAfter"], ["update:datatableHiddenColumns", "update:showDetail"]),
|
|
1039
1039
|
setup(e, { expose: d, emit: s }) {
|
|
1040
|
-
const o = e,
|
|
1040
|
+
const o = e, C = s, m = Ce(e, "datatableHiddenColumns"), l = Ce(e, "showDetail"), a = q(we), v = q(Ae);
|
|
1041
1041
|
if (_(a) || _(v))
|
|
1042
1042
|
throw new Error("Incorrect provide/inject config.");
|
|
1043
1043
|
const g = E({
|
|
1044
1044
|
system: a.general.system,
|
|
1045
1045
|
subject: a.general.subject
|
|
1046
1046
|
});
|
|
1047
|
-
|
|
1047
|
+
$e(o.store) ? o.store === !1 && (g.value.system = void 0, g.value.subject = void 0) : (g.value.system = o.store.system, g.value.subject = o.store.subject);
|
|
1048
1048
|
const c = E(0);
|
|
1049
|
-
|
|
1049
|
+
kt(Bt, c);
|
|
1050
1050
|
const i = E(/* @__PURE__ */ new Map());
|
|
1051
|
-
|
|
1051
|
+
kt(Ie, i);
|
|
1052
1052
|
const p = () => {
|
|
1053
1053
|
c.value++, de(() => {
|
|
1054
|
-
|
|
1054
|
+
C("submit");
|
|
1055
1055
|
});
|
|
1056
|
-
}, { clearAll: n, clearAllFilterSelected: t } =
|
|
1056
|
+
}, { clearAll: n, clearAllFilterSelected: t } = Ke(), y = () => {
|
|
1057
1057
|
de(() => {
|
|
1058
|
-
c.value++,
|
|
1058
|
+
c.value++, C("bookmarkLoadAfter");
|
|
1059
1059
|
});
|
|
1060
1060
|
}, A = () => {
|
|
1061
1061
|
n(v, a), t(v, a, i), de(() => {
|
|
1062
|
-
c.value++,
|
|
1062
|
+
c.value++, C("reset");
|
|
1063
1063
|
});
|
|
1064
1064
|
}, f = () => {
|
|
1065
1065
|
l.value = !l.value;
|
|
@@ -1067,12 +1067,12 @@ const za = {
|
|
|
1067
1067
|
return o.alwaysVisible && (l.value = !0), d({
|
|
1068
1068
|
submit: p,
|
|
1069
1069
|
reset: A
|
|
1070
|
-
}), (x, F) => (
|
|
1070
|
+
}), (x, F) => (h(), V(Da, {
|
|
1071
1071
|
name: e.formName,
|
|
1072
1072
|
onSubmit: M(p, ["prevent"])
|
|
1073
1073
|
}, {
|
|
1074
1074
|
default: u(() => [
|
|
1075
|
-
e.enableTop ? (
|
|
1075
|
+
e.enableTop ? (h(), V(Te, {
|
|
1076
1076
|
key: 0,
|
|
1077
1077
|
dense: ""
|
|
1078
1078
|
}, {
|
|
@@ -1088,11 +1088,11 @@ const za = {
|
|
|
1088
1088
|
})) : W("", !0),
|
|
1089
1089
|
r(Te, { dense: "" }, {
|
|
1090
1090
|
default: u(() => [
|
|
1091
|
-
e.store && e.userId &&
|
|
1091
|
+
e.store && e.userId && b(Z)(e.client) ? (h(), V(ge, { key: 0 }, {
|
|
1092
1092
|
default: u(() => [
|
|
1093
1093
|
K(x.$slots, "bookmarks", {}, () => [
|
|
1094
|
-
L("div",
|
|
1095
|
-
g.value.system && g.value.subject && e.userId &&
|
|
1094
|
+
L("div", Za, [
|
|
1095
|
+
g.value.system && g.value.subject && e.userId && b(Z)(e.client) ? (h(), V(Ga, {
|
|
1096
1096
|
key: 0,
|
|
1097
1097
|
"datatable-hidden-columns": m.value,
|
|
1098
1098
|
"onUpdate:datatableHiddenColumns": F[0] || (F[0] = (k) => m.value = k),
|
|
@@ -1100,7 +1100,7 @@ const za = {
|
|
|
1100
1100
|
system: g.value.system,
|
|
1101
1101
|
subject: g.value.subject,
|
|
1102
1102
|
"user-id": e.userId,
|
|
1103
|
-
onSubmit:
|
|
1103
|
+
onSubmit: y
|
|
1104
1104
|
}, null, 8, ["datatable-hidden-columns", "client", "system", "subject", "user-id"])) : W("", !0)
|
|
1105
1105
|
])
|
|
1106
1106
|
])
|
|
@@ -1110,17 +1110,17 @@ const za = {
|
|
|
1110
1110
|
]),
|
|
1111
1111
|
_: 3
|
|
1112
1112
|
}),
|
|
1113
|
-
e.alwaysVisible ? W("", !0) : (
|
|
1113
|
+
e.alwaysVisible ? W("", !0) : (h(), V(Te, {
|
|
1114
1114
|
key: 1,
|
|
1115
1115
|
dense: ""
|
|
1116
1116
|
}, {
|
|
1117
1117
|
default: u(() => [
|
|
1118
|
-
e.hideMore ? W("", !0) : (
|
|
1118
|
+
e.hideMore ? W("", !0) : (h(), V(ge, {
|
|
1119
1119
|
key: 0,
|
|
1120
1120
|
cols: "auto"
|
|
1121
1121
|
}, {
|
|
1122
1122
|
default: u(() => [
|
|
1123
|
-
r(
|
|
1123
|
+
r(Ia, {
|
|
1124
1124
|
"button-active": l.value,
|
|
1125
1125
|
onAdvancedFilter: f
|
|
1126
1126
|
}, null, 8, ["button-active"])
|
|
@@ -1129,25 +1129,25 @@ const za = {
|
|
|
1129
1129
|
})),
|
|
1130
1130
|
r(ge, null, {
|
|
1131
1131
|
default: u(() => [
|
|
1132
|
-
L("div",
|
|
1133
|
-
L("div",
|
|
1132
|
+
L("div", eo, [
|
|
1133
|
+
L("div", to, [
|
|
1134
1134
|
K(x.$slots, "search")
|
|
1135
1135
|
]),
|
|
1136
|
-
r(
|
|
1136
|
+
r(Ra)
|
|
1137
1137
|
])
|
|
1138
1138
|
]),
|
|
1139
1139
|
_: 3
|
|
1140
1140
|
}),
|
|
1141
|
-
e.hideButtons ? W("", !0) : (
|
|
1141
|
+
e.hideButtons ? W("", !0) : (h(), V(ge, {
|
|
1142
1142
|
key: 1,
|
|
1143
1143
|
class: "text-right",
|
|
1144
1144
|
cols: "auto"
|
|
1145
1145
|
}, {
|
|
1146
1146
|
default: u(() => [
|
|
1147
1147
|
K(x.$slots, "buttons", {}, () => [
|
|
1148
|
-
r(
|
|
1149
|
-
r(
|
|
1150
|
-
g.value.system && g.value.subject && e.userId &&
|
|
1148
|
+
r(na, { touched: D.value }, null, 8, ["touched"]),
|
|
1149
|
+
r(sa, { onReset: A }),
|
|
1150
|
+
g.value.system && g.value.subject && e.userId && b(Z)(e.client) ? (h(), V(Ya, {
|
|
1151
1151
|
key: 0,
|
|
1152
1152
|
client: e.client,
|
|
1153
1153
|
user: e.userId,
|
|
@@ -1162,28 +1162,28 @@ const za = {
|
|
|
1162
1162
|
]),
|
|
1163
1163
|
_: 3
|
|
1164
1164
|
})),
|
|
1165
|
-
e.hideMore ? W("", !0) : (
|
|
1166
|
-
(
|
|
1165
|
+
e.hideMore ? W("", !0) : (h(), I("div", ao, [
|
|
1166
|
+
(h(), V(ka(e.alwaysVisible ? "div" : "VSlideYTransition"), null, {
|
|
1167
1167
|
default: u(() => [
|
|
1168
|
-
|
|
1168
|
+
Vt(L("div", {
|
|
1169
1169
|
class: _e({ "mt-6 pa-4 system-border-a": !e.alwaysVisible })
|
|
1170
1170
|
}, [
|
|
1171
1171
|
K(x.$slots, "detail", {}, () => [
|
|
1172
1172
|
r(Te, null, {
|
|
1173
1173
|
default: u(() => [
|
|
1174
|
-
(
|
|
1174
|
+
(h(!0), I(te, null, me(N.value, (k) => (h(), V(ge, {
|
|
1175
1175
|
key: k,
|
|
1176
|
-
cols:
|
|
1177
|
-
sm:
|
|
1178
|
-
md:
|
|
1179
|
-
lg:
|
|
1180
|
-
xl:
|
|
1176
|
+
cols: b(a).fields[k].render.xs || 12,
|
|
1177
|
+
sm: b(a).fields[k].render.sm || 6,
|
|
1178
|
+
md: b(a).fields[k].render.md || 4,
|
|
1179
|
+
lg: b(a).fields[k].render.lg || 3,
|
|
1180
|
+
xl: b(a).fields[k].render.xl || 2
|
|
1181
1181
|
}, {
|
|
1182
1182
|
default: u(() => [
|
|
1183
|
-
K(x.$slots,
|
|
1184
|
-
itemConfig:
|
|
1183
|
+
K(x.$slots, b(la)(k), {
|
|
1184
|
+
itemConfig: b(a).fields[k]
|
|
1185
1185
|
}, () => [
|
|
1186
|
-
r(
|
|
1186
|
+
r(ra, { name: k }, null, 8, ["name"])
|
|
1187
1187
|
])
|
|
1188
1188
|
]),
|
|
1189
1189
|
_: 2
|
|
@@ -1193,7 +1193,7 @@ const za = {
|
|
|
1193
1193
|
})
|
|
1194
1194
|
])
|
|
1195
1195
|
], 2), [
|
|
1196
|
-
[
|
|
1196
|
+
[It, l.value]
|
|
1197
1197
|
])
|
|
1198
1198
|
]),
|
|
1199
1199
|
_: 3
|
|
@@ -1203,7 +1203,7 @@ const za = {
|
|
|
1203
1203
|
_: 3
|
|
1204
1204
|
}, 8, ["name"]));
|
|
1205
1205
|
}
|
|
1206
|
-
}),
|
|
1206
|
+
}), oo = { class: "d-flex align-center justify-center" }, no = { class: "text-caption mr-1" }, en = /* @__PURE__ */ oe({
|
|
1207
1207
|
__name: "ADatatableOrdering",
|
|
1208
1208
|
props: /* @__PURE__ */ fe({
|
|
1209
1209
|
variant: { default: "id" },
|
|
@@ -1218,7 +1218,7 @@ const za = {
|
|
|
1218
1218
|
}),
|
|
1219
1219
|
emits: /* @__PURE__ */ fe(["sortByChange"], ["update:modelValue"]),
|
|
1220
1220
|
setup(e, { emit: d }) {
|
|
1221
|
-
const s = e, o = d,
|
|
1221
|
+
const s = e, o = d, C = Ce(e, "modelValue"), m = q(Ue);
|
|
1222
1222
|
if (_(m))
|
|
1223
1223
|
throw new Error("Incorrect provide/inject config.");
|
|
1224
1224
|
const { t: l } = le(), a = [
|
|
@@ -1231,22 +1231,22 @@ const za = {
|
|
|
1231
1231
|
{
|
|
1232
1232
|
id: 3,
|
|
1233
1233
|
titleT: "common.system.datatable.ordering.mostRelevant",
|
|
1234
|
-
sortBy: { key:
|
|
1234
|
+
sortBy: { key: ia, order: ee.Desc }
|
|
1235
1235
|
},
|
|
1236
1236
|
{ id: 1, titleT: "common.system.datatable.ordering.mostRecent", sortBy: { key: "createdAt", order: ee.Desc } },
|
|
1237
1237
|
{ id: 2, titleT: "common.system.datatable.ordering.oldest", sortBy: { key: "createdAt", order: ee.Asc } }
|
|
1238
1238
|
], c = U(() => {
|
|
1239
|
-
const t = i.value.find((
|
|
1239
|
+
const t = i.value.find((y) => y.id === C.value);
|
|
1240
1240
|
return t ? l(t.titleT) : "";
|
|
1241
1241
|
}), i = U(() => s.customOptions ? s.customOptions : s.variant === "most-relevant" ? g : s.variant === "id" ? v : a), p = (t) => {
|
|
1242
|
-
|
|
1242
|
+
C.value = t.id;
|
|
1243
1243
|
}, n = (t) => {
|
|
1244
1244
|
t.sortBy || (m.value = { ...m.value, sortBy: null, descending: !0 }, o("sortByChange", t)), m.value.sortBy = t.sortBy, o("sortByChange", t);
|
|
1245
1245
|
};
|
|
1246
1246
|
return se(
|
|
1247
|
-
|
|
1248
|
-
(t,
|
|
1249
|
-
if (t ===
|
|
1247
|
+
C,
|
|
1248
|
+
(t, y) => {
|
|
1249
|
+
if (t === y) return;
|
|
1250
1250
|
const A = i.value.find((f) => f.id === t);
|
|
1251
1251
|
if (!_(A)) {
|
|
1252
1252
|
if (_(s.paginationUpdateCustomCb)) {
|
|
@@ -1258,15 +1258,15 @@ const za = {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
), se(
|
|
1260
1260
|
m,
|
|
1261
|
-
(t,
|
|
1262
|
-
if (t.sortBy?.key ===
|
|
1261
|
+
(t, y) => {
|
|
1262
|
+
if (t.sortBy?.key === y?.sortBy?.key && t.sortBy?.order === y?.sortBy?.order)
|
|
1263
1263
|
return;
|
|
1264
1264
|
const A = i.value.find((f) => t.sortBy?.key === f.sortBy?.key && t.sortBy?.order === f.sortBy?.order);
|
|
1265
|
-
_(A) || (
|
|
1265
|
+
_(A) || (C.value = A.id);
|
|
1266
1266
|
},
|
|
1267
1267
|
{ immediate: !0 }
|
|
1268
|
-
), (t,
|
|
1269
|
-
L("div",
|
|
1268
|
+
), (t, y) => (h(), I("div", oo, [
|
|
1269
|
+
L("div", no, P(b(l)("common.system.datatable.ordering.title")) + ": ", 1),
|
|
1270
1270
|
r(G, {
|
|
1271
1271
|
variant: "text",
|
|
1272
1272
|
rounded: "xl",
|
|
@@ -1275,27 +1275,27 @@ const za = {
|
|
|
1275
1275
|
}, {
|
|
1276
1276
|
default: u(() => [
|
|
1277
1277
|
O(P(c.value) + " ", 1),
|
|
1278
|
-
r(
|
|
1278
|
+
r(Nt, {
|
|
1279
1279
|
activator: "parent",
|
|
1280
1280
|
location: "bottom",
|
|
1281
1281
|
"close-on-content-click": ""
|
|
1282
1282
|
}, {
|
|
1283
1283
|
default: u(() => [
|
|
1284
|
-
r(
|
|
1284
|
+
r(Ot, {
|
|
1285
1285
|
density: "compact",
|
|
1286
1286
|
class: "pa-0"
|
|
1287
1287
|
}, {
|
|
1288
1288
|
default: u(() => [
|
|
1289
|
-
(
|
|
1289
|
+
(h(!0), I(te, null, me(i.value, (A) => (h(), V(vt, {
|
|
1290
1290
|
key: A.id,
|
|
1291
1291
|
onClick: (f) => p(A)
|
|
1292
1292
|
}, {
|
|
1293
1293
|
default: u(() => [
|
|
1294
|
-
r(
|
|
1295
|
-
class: _e({ "font-weight-bold": A.id ===
|
|
1294
|
+
r(jt, {
|
|
1295
|
+
class: _e({ "font-weight-bold": A.id === C.value })
|
|
1296
1296
|
}, {
|
|
1297
1297
|
default: u(() => [
|
|
1298
|
-
O(P(
|
|
1298
|
+
O(P(b(l)(A.titleT)), 1)
|
|
1299
1299
|
]),
|
|
1300
1300
|
_: 2
|
|
1301
1301
|
}, 1032, ["class"])
|
|
@@ -1313,10 +1313,10 @@ const za = {
|
|
|
1313
1313
|
})
|
|
1314
1314
|
]));
|
|
1315
1315
|
}
|
|
1316
|
-
}),
|
|
1316
|
+
}), so = { class: "anzu-data-footer" }, lo = {
|
|
1317
1317
|
key: 0,
|
|
1318
1318
|
class: "anzu-data-footer__page-limit"
|
|
1319
|
-
},
|
|
1319
|
+
}, ro = { class: "anzu-data-footer__pagination" }, io = { class: "anzu-data-footer__icons-before" }, uo = { class: "current-page" }, co = { class: "anzu-data-footer__icons-after" }, mo = /* @__PURE__ */ oe({
|
|
1320
1320
|
__name: "ADatatablePagination",
|
|
1321
1321
|
props: {
|
|
1322
1322
|
itemsPerPageOptions: { default: () => [10, 25, 50] },
|
|
@@ -1324,10 +1324,10 @@ const za = {
|
|
|
1324
1324
|
},
|
|
1325
1325
|
emits: ["change"],
|
|
1326
1326
|
setup(e, { emit: d }) {
|
|
1327
|
-
const s = d, o = q(
|
|
1327
|
+
const s = d, o = q(Ue);
|
|
1328
1328
|
if (_(o))
|
|
1329
1329
|
throw new Error("Incorrect provide/inject config.");
|
|
1330
|
-
const { t:
|
|
1330
|
+
const { t: C } = le(), m = U(() => Math.ceil(o.value.totalCount / o.value.rowsPerPage)), l = U(() => o.value.page * o.value.rowsPerPage - o.value.rowsPerPage + 1), a = U(() => o.value.page * o.value.rowsPerPage - o.value.rowsPerPage + o.value.currentViewCount), v = U(() => o.value.page === 1), g = U(() => !Q(o.value.hasNextPage) || o.value.page === m.value), c = U(() => Q(o.value.hasNextPage) && o.value.page === m.value || o.value.hasNextPage === !1), i = U(() => Q(o.value.hasNextPage) ? o.value.totalCount : o.value.hasNextPage ? a.value + 1 + "+" : a.value);
|
|
1331
1331
|
se(
|
|
1332
1332
|
() => o.value.rowsPerPage,
|
|
1333
1333
|
(A, f) => {
|
|
@@ -1339,30 +1339,30 @@ const za = {
|
|
|
1339
1339
|
A !== f && s("change");
|
|
1340
1340
|
}
|
|
1341
1341
|
);
|
|
1342
|
-
const p = () => {
|
|
1342
|
+
const p = Be(() => {
|
|
1343
1343
|
o.value.page = 1;
|
|
1344
|
-
}, n = () => {
|
|
1344
|
+
}, 300), n = Be(() => {
|
|
1345
1345
|
o.value.page = m.value;
|
|
1346
|
-
}, t = () => {
|
|
1346
|
+
}, 300), t = Be(() => {
|
|
1347
1347
|
o.value.page = o.value.page - 1;
|
|
1348
|
-
},
|
|
1348
|
+
}, 300), y = Be(() => {
|
|
1349
1349
|
o.value.page = o.value.page + 1;
|
|
1350
|
-
};
|
|
1351
|
-
return (A, f) => (
|
|
1352
|
-
e.hideRecordsPerPage ? W("", !0) : (
|
|
1353
|
-
O(P(C
|
|
1354
|
-
r(
|
|
1355
|
-
modelValue:
|
|
1356
|
-
"onUpdate:modelValue": f[0] || (f[0] = (D) =>
|
|
1350
|
+
}, 300);
|
|
1351
|
+
return (A, f) => (h(), I("div", so, [
|
|
1352
|
+
e.hideRecordsPerPage ? W("", !0) : (h(), I("div", lo, [
|
|
1353
|
+
O(P(b(C)("common.system.datatable.itemsPerPage")) + ": ", 1),
|
|
1354
|
+
r(Sa, {
|
|
1355
|
+
modelValue: b(o).rowsPerPage,
|
|
1356
|
+
"onUpdate:modelValue": f[0] || (f[0] = (D) => b(o).rowsPerPage = D),
|
|
1357
1357
|
class: "ml-2",
|
|
1358
1358
|
density: "compact",
|
|
1359
1359
|
mandatory: "",
|
|
1360
1360
|
"data-cy": "table-size"
|
|
1361
1361
|
}, {
|
|
1362
1362
|
default: u(() => [
|
|
1363
|
-
(
|
|
1363
|
+
(h(!0), I(te, null, me(e.itemsPerPageOptions, (D) => (h(), V(G, {
|
|
1364
1364
|
key: D,
|
|
1365
|
-
color: D ===
|
|
1365
|
+
color: D === b(o).rowsPerPage ? "secondary" : "",
|
|
1366
1366
|
value: D,
|
|
1367
1367
|
density: "compact",
|
|
1368
1368
|
size: "small",
|
|
@@ -1377,70 +1377,70 @@ const za = {
|
|
|
1377
1377
|
_: 1
|
|
1378
1378
|
}, 8, ["modelValue"])
|
|
1379
1379
|
])),
|
|
1380
|
-
L("div",
|
|
1381
|
-
L("div",
|
|
1380
|
+
L("div", ro, P(l.value) + " - " + P(a.value) + " " + P(b(C)("common.system.datatable.from")) + " " + P(i.value), 1),
|
|
1381
|
+
L("div", io, [
|
|
1382
1382
|
r(G, {
|
|
1383
1383
|
disabled: v.value,
|
|
1384
1384
|
icon: "mdi-page-first",
|
|
1385
1385
|
size: "small",
|
|
1386
1386
|
variant: "text",
|
|
1387
|
-
onClick: M(p, ["stop"])
|
|
1388
|
-
}, null, 8, ["disabled"]),
|
|
1387
|
+
onClick: M(b(p), ["stop"])
|
|
1388
|
+
}, null, 8, ["disabled", "onClick"]),
|
|
1389
1389
|
r(G, {
|
|
1390
1390
|
disabled: v.value,
|
|
1391
1391
|
icon: "mdi-chevron-left",
|
|
1392
1392
|
size: "small",
|
|
1393
1393
|
variant: "text",
|
|
1394
|
-
onClick: M(t, ["stop"])
|
|
1395
|
-
}, null, 8, ["disabled"])
|
|
1396
|
-
]),
|
|
1397
|
-
L("div", io, [
|
|
1398
|
-
L("span", null, P(C(o).page), 1)
|
|
1394
|
+
onClick: M(b(t), ["stop"])
|
|
1395
|
+
}, null, 8, ["disabled", "onClick"])
|
|
1399
1396
|
]),
|
|
1400
1397
|
L("div", uo, [
|
|
1398
|
+
L("span", null, P(b(o).page), 1)
|
|
1399
|
+
]),
|
|
1400
|
+
L("div", co, [
|
|
1401
1401
|
r(G, {
|
|
1402
1402
|
disabled: c.value,
|
|
1403
1403
|
icon: "mdi-chevron-right",
|
|
1404
1404
|
size: "small",
|
|
1405
1405
|
variant: "text",
|
|
1406
|
-
onClick: M(b, ["stop"])
|
|
1407
|
-
}, null, 8, ["disabled"]),
|
|
1406
|
+
onClick: M(b(y), ["stop"])
|
|
1407
|
+
}, null, 8, ["disabled", "onClick"]),
|
|
1408
1408
|
r(G, {
|
|
1409
1409
|
disabled: g.value,
|
|
1410
1410
|
icon: "mdi-page-last",
|
|
1411
1411
|
size: "small",
|
|
1412
1412
|
variant: "text",
|
|
1413
|
-
onClick: M(n, ["stop"])
|
|
1414
|
-
}, null, 8, ["disabled"])
|
|
1413
|
+
onClick: M(b(n), ["stop"])
|
|
1414
|
+
}, null, 8, ["disabled", "onClick"])
|
|
1415
1415
|
])
|
|
1416
1416
|
]));
|
|
1417
1417
|
}
|
|
1418
|
-
}),
|
|
1419
|
-
const { querySetLimit: o, querySetOffset:
|
|
1420
|
-
return o(g),
|
|
1421
|
-
},
|
|
1418
|
+
}), fo = (e, d, s = "id") => {
|
|
1419
|
+
const { querySetLimit: o, querySetOffset: C, querySetOrder: m, queryBuild: l, queryAddFilter: a, queryAdd: v } = ua(), g = e.length;
|
|
1420
|
+
return o(g), C(1, g), m(s, !1), d ? v(s, e.join(",")) : a("in", s, e.join(",")), l();
|
|
1421
|
+
}, tn = (e, d, s, o = void 0, C = void 0, m = {}, l = !1, a = "id") => {
|
|
1422
1422
|
let v = null;
|
|
1423
1423
|
return {
|
|
1424
1424
|
executeFetch: async (i, p = void 0, n = void 0) => {
|
|
1425
1425
|
v = new AbortController();
|
|
1426
1426
|
try {
|
|
1427
|
-
const t = Z(n) ? n :
|
|
1428
|
-
if (_(
|
|
1429
|
-
const A = (_(t) ?
|
|
1427
|
+
const t = Z(n) ? n : C, y = Z(p) ? p : o;
|
|
1428
|
+
if (_(y)) throw new Error("Url template is undefined");
|
|
1429
|
+
const A = (_(t) ? y : We(y, t)) + fo(i, l, a), f = await e().get(A, {
|
|
1430
1430
|
...m,
|
|
1431
1431
|
signal: v.signal
|
|
1432
1432
|
});
|
|
1433
|
-
if (!
|
|
1434
|
-
throw new
|
|
1433
|
+
if (!Je(f.status))
|
|
1434
|
+
throw new Ye(f.status);
|
|
1435
1435
|
if (f.data?.data)
|
|
1436
1436
|
return f.data.data;
|
|
1437
|
-
if (f.status ===
|
|
1437
|
+
if (f.status === Qe)
|
|
1438
1438
|
return [];
|
|
1439
1439
|
throw new pe();
|
|
1440
1440
|
} catch (t) {
|
|
1441
1441
|
if (t instanceof DOMException && t.name === "AbortError")
|
|
1442
1442
|
return [];
|
|
1443
|
-
throw
|
|
1443
|
+
throw Xe(t) ? t : Ge(t) ? new Ze(t, t.config?.url) : et(t) ? new tt(t, d, s, t) : at(t) ? new ot(t, d, s, t) : nt(t) ? new st(t, t) : lt(t) ? new rt(t) : gt.isAxiosError(t) ? (console.error("Axios error: " + o, t.cause), new it(t)) : (console.error("AnzuFatalError: ", t), new pe(t));
|
|
1444
1444
|
} finally {
|
|
1445
1445
|
v = null;
|
|
1446
1446
|
}
|
|
@@ -1449,41 +1449,41 @@ const za = {
|
|
|
1449
1449
|
v && v.abort();
|
|
1450
1450
|
}
|
|
1451
1451
|
};
|
|
1452
|
-
},
|
|
1452
|
+
}, an = (e, d, s, o = void 0, C = void 0, m = {}) => {
|
|
1453
1453
|
let l = null;
|
|
1454
1454
|
return {
|
|
1455
|
-
executeFetch: async (g, c, i = void 0, p = void 0, n = "id", t = !0,
|
|
1455
|
+
executeFetch: async (g, c, i = void 0, p = void 0, n = "id", t = !0, y = 100, A = !1) => {
|
|
1456
1456
|
l = new AbortController();
|
|
1457
1457
|
try {
|
|
1458
|
-
const f = c.general.elastic || A ? "/search" : "", D = Z(p) ? p :
|
|
1458
|
+
const f = c.general.elastic || A ? "/search" : "", D = Z(p) ? p : C, N = Z(i) ? i : o;
|
|
1459
1459
|
if (_(N)) throw new Error("Url template is undefined");
|
|
1460
|
-
const { pagination: x } =
|
|
1461
|
-
rowsPerPage:
|
|
1462
|
-
}), F = (_(D) ? N :
|
|
1460
|
+
const { pagination: x } = Ee(n, t ? ee.Desc : ee.Asc, {
|
|
1461
|
+
rowsPerPage: y
|
|
1462
|
+
}), F = (_(D) ? N : We(N, D)) + f, k = [], $ = await e().get(F + Le(x, g, c), {
|
|
1463
1463
|
...m,
|
|
1464
1464
|
signal: l.signal
|
|
1465
1465
|
});
|
|
1466
|
-
if (!
|
|
1467
|
-
throw new
|
|
1466
|
+
if (!Je($.status))
|
|
1467
|
+
throw new Ye($.status);
|
|
1468
1468
|
if ($.data) {
|
|
1469
1469
|
const S = $.data;
|
|
1470
|
-
if (k.push(...S.data),
|
|
1470
|
+
if (k.push(...S.data), ca(S))
|
|
1471
1471
|
for (x.value.hasNextPage = S.hasNextPage; x.value.hasNextPage; ) {
|
|
1472
1472
|
x.value.page++;
|
|
1473
|
-
const R = (await e().get(F +
|
|
1473
|
+
const R = (await e().get(F + Le(x, g, c), {
|
|
1474
1474
|
...m,
|
|
1475
1475
|
signal: l.signal
|
|
1476
1476
|
})).data;
|
|
1477
1477
|
k.push(...R.data), x.value.hasNextPage = R.hasNextPage;
|
|
1478
1478
|
}
|
|
1479
|
-
else if (
|
|
1479
|
+
else if (da(S)) {
|
|
1480
1480
|
if (x.value.totalCount = S.totalCount, x.value.totalCount <= x.value.rowsPerPage)
|
|
1481
1481
|
return k;
|
|
1482
1482
|
const j = [], R = Math.ceil(x.value.totalCount / x.value.rowsPerPage);
|
|
1483
1483
|
for (let w = 1; w < R; w++) {
|
|
1484
1484
|
const B = { ...x.value, page: w + 1 }, X = E(B);
|
|
1485
1485
|
j.push(
|
|
1486
|
-
e().get(F +
|
|
1486
|
+
e().get(F + Le(X, g, c), {
|
|
1487
1487
|
...m,
|
|
1488
1488
|
signal: l.signal
|
|
1489
1489
|
})
|
|
@@ -1495,13 +1495,13 @@ const za = {
|
|
|
1495
1495
|
}
|
|
1496
1496
|
return k;
|
|
1497
1497
|
}
|
|
1498
|
-
if ($.status ===
|
|
1498
|
+
if ($.status === Qe)
|
|
1499
1499
|
return [];
|
|
1500
1500
|
throw new pe();
|
|
1501
1501
|
} catch (f) {
|
|
1502
1502
|
if (f instanceof DOMException && f.name === "AbortError")
|
|
1503
1503
|
return [];
|
|
1504
|
-
throw
|
|
1504
|
+
throw Xe(f) ? f : Ge(f) ? new Ze(f, f.config?.url) : et(f) ? new tt(f, d, s, f) : at(f) ? new ot(f, d, s, f) : nt(f) ? new st(f, f) : lt(f) ? new rt(f) : gt.isAxiosError(f) ? (console.error("Axios error: " + o, f.cause), new it(f)) : (console.error("AnzuFatalError: ", f), new pe(f));
|
|
1505
1505
|
} finally {
|
|
1506
1506
|
l = null;
|
|
1507
1507
|
}
|
|
@@ -1510,36 +1510,36 @@ const za = {
|
|
|
1510
1510
|
l && l.abort();
|
|
1511
1511
|
}
|
|
1512
1512
|
};
|
|
1513
|
-
},
|
|
1514
|
-
function
|
|
1513
|
+
}, Pe = "/adm/v1/job", De = "job";
|
|
1514
|
+
function on(e, d) {
|
|
1515
1515
|
return {
|
|
1516
|
-
useFetchJobList: () =>
|
|
1517
|
-
fetchJob: (l) =>
|
|
1516
|
+
useFetchJobList: () => Dt(e, d, De, Pe),
|
|
1517
|
+
fetchJob: (l) => fa(e, Pe + "/:id", { id: l }, d, De),
|
|
1518
1518
|
createJob: (l) => {
|
|
1519
|
-
const a =
|
|
1520
|
-
return
|
|
1519
|
+
const a = va(l._resourceName).slice(4).replace("-kind-", "-kind/");
|
|
1520
|
+
return ga(e, l, Pe + "/:type", { type: a }, d, De);
|
|
1521
1521
|
},
|
|
1522
|
-
deleteJob: (l) =>
|
|
1522
|
+
deleteJob: (l) => ma(e, Pe + "/:id", { id: l }, d, De)
|
|
1523
1523
|
};
|
|
1524
1524
|
}
|
|
1525
|
-
const
|
|
1525
|
+
const vo = {
|
|
1526
1526
|
key: "",
|
|
1527
1527
|
title: void 0,
|
|
1528
1528
|
sortable: !1,
|
|
1529
1529
|
fixed: !1
|
|
1530
|
-
},
|
|
1530
|
+
}, go = {
|
|
1531
1531
|
storeColumnsLocalStorage: !0,
|
|
1532
1532
|
disableActions: !1,
|
|
1533
1533
|
customI18n: void 0,
|
|
1534
1534
|
showExpand: !1
|
|
1535
1535
|
};
|
|
1536
|
-
function
|
|
1537
|
-
const m = { ...
|
|
1536
|
+
function po(e, d, s, o, C = {}) {
|
|
1537
|
+
const m = { ...go, ...C }, l = m.customI18n ?? pa, { t: a } = l.global || l;
|
|
1538
1538
|
let v;
|
|
1539
|
-
|
|
1539
|
+
ha(m.storeColumnsLocalStorage) ? v = m.storeColumnsLocalStorage : $e(m.storeColumnsLocalStorage) && m.storeColumnsLocalStorage === !0 && (v = "table_" + s + "_" + o);
|
|
1540
1540
|
const g = e.map((n) => {
|
|
1541
|
-
const t = { ...
|
|
1542
|
-
return _(t.title) && (_(t.title) &&
|
|
1541
|
+
const t = { ...vo, ...n };
|
|
1542
|
+
return _(t.title) && (_(t.title) && ba.includes(t.key) ? t.title = a("common.model.tracking." + t.key) : _(t.title) && s && o ? t.title = a(s + "." + o + ".model." + t.key) : t.title = ""), t;
|
|
1543
1543
|
}), c = U(() => {
|
|
1544
1544
|
const n = [];
|
|
1545
1545
|
return m.showExpand && n.push({ key: "data-table-expand", sortable: !1 }), g.forEach((t) => {
|
|
@@ -1550,11 +1550,11 @@ function go(e, d, s, o, h = {}) {
|
|
|
1550
1550
|
const n = localStorage.getItem(v);
|
|
1551
1551
|
if (!n) return;
|
|
1552
1552
|
const t = JSON.parse(n);
|
|
1553
|
-
|
|
1553
|
+
ya(t) && ze(t.hidden) && (d.value = t.hidden);
|
|
1554
1554
|
}, p = (n) => {
|
|
1555
1555
|
!v || !localStorage || localStorage.setItem(v, JSON.stringify({ hidden: n }));
|
|
1556
1556
|
};
|
|
1557
|
-
return
|
|
1557
|
+
return Et(() => {
|
|
1558
1558
|
i();
|
|
1559
1559
|
}), se(d, (n) => {
|
|
1560
1560
|
p(n);
|
|
@@ -1564,14 +1564,14 @@ function go(e, d, s, o, h = {}) {
|
|
|
1564
1564
|
columnsHidden: d
|
|
1565
1565
|
};
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1568
|
-
const i = E(!1), p = E([]), n = E([]), t = E(!1), { pagination:
|
|
1567
|
+
function nn(e, d, s, o, C, m, l, a = null, v = void 0, g = void 0, c = !1) {
|
|
1568
|
+
const i = E(!1), p = E([]), n = E([]), t = E(!1), { pagination: y, setSortBy: A, incrementPage: f } = Ee(
|
|
1569
1569
|
Q(a) ? null : a.key,
|
|
1570
1570
|
a?.order
|
|
1571
|
-
), { resetFilter: D, submitFilter: N } =
|
|
1571
|
+
), { resetFilter: D, submitFilter: N } = ut(m, l, {
|
|
1572
1572
|
storeFiltersLocalStorage: !1,
|
|
1573
1573
|
populateUrlParams: !1
|
|
1574
|
-
}), { showErrorsDefault: x } =
|
|
1574
|
+
}), { showErrorsDefault: x } = qe(), { columnsVisible: F, columnsAll: k, columnsHidden: $ } = po(
|
|
1575
1575
|
e,
|
|
1576
1576
|
d,
|
|
1577
1577
|
s,
|
|
@@ -1584,8 +1584,8 @@ function on(e, d, s, o, h, m, l, a = null, v = void 0, g = void 0, c = !1) {
|
|
|
1584
1584
|
}, R = async () => {
|
|
1585
1585
|
t.value = !0, f();
|
|
1586
1586
|
try {
|
|
1587
|
-
const J = await
|
|
1588
|
-
|
|
1587
|
+
const J = await C(
|
|
1588
|
+
y,
|
|
1589
1589
|
m,
|
|
1590
1590
|
l,
|
|
1591
1591
|
v,
|
|
@@ -1603,8 +1603,8 @@ function on(e, d, s, o, h, m, l, a = null, v = void 0, g = void 0, c = !1) {
|
|
|
1603
1603
|
}, w = async () => {
|
|
1604
1604
|
t.value = !0;
|
|
1605
1605
|
try {
|
|
1606
|
-
p.value = await
|
|
1607
|
-
|
|
1606
|
+
p.value = await C(
|
|
1607
|
+
y,
|
|
1608
1608
|
m,
|
|
1609
1609
|
l,
|
|
1610
1610
|
v,
|
|
@@ -1616,13 +1616,13 @@ function on(e, d, s, o, h, m, l, a = null, v = void 0, g = void 0, c = !1) {
|
|
|
1616
1616
|
} finally {
|
|
1617
1617
|
t.value = !1;
|
|
1618
1618
|
}
|
|
1619
|
-
}, B =
|
|
1619
|
+
}, B = Pa(async () => {
|
|
1620
1620
|
await w();
|
|
1621
1621
|
});
|
|
1622
1622
|
return {
|
|
1623
1623
|
items: p,
|
|
1624
1624
|
selected: n,
|
|
1625
|
-
pagination:
|
|
1625
|
+
pagination: y,
|
|
1626
1626
|
columnsVisible: F,
|
|
1627
1627
|
columnsHidden: $,
|
|
1628
1628
|
columnsAll: k,
|
|
@@ -1643,14 +1643,14 @@ function on(e, d, s, o, h, m, l, a = null, v = void 0, g = void 0, c = !1) {
|
|
|
1643
1643
|
onOpen: S,
|
|
1644
1644
|
sortByChange: j,
|
|
1645
1645
|
getList: B,
|
|
1646
|
-
resetFilter: () => D(
|
|
1647
|
-
submitFilter: () => N(
|
|
1646
|
+
resetFilter: () => D(y, B),
|
|
1647
|
+
submitFilter: () => N(y, B)
|
|
1648
1648
|
};
|
|
1649
1649
|
}
|
|
1650
|
-
const
|
|
1650
|
+
const bo = { class: "d-flex flex-column w-100 px-1 align-center" }, yo = { class: "d-flex justify-space-between w-100 align-center" }, ho = { class: "d-flex align-center" }, Co = { class: "d-flex align-center" }, ko = { class: "subject-select__sidebar system-border-r" }, wo = { class: "subject-select-filter" }, Ao = { class: "subject-select__content" }, _o = {
|
|
1651
1651
|
key: 0,
|
|
1652
1652
|
class: "d-flex w-100 align-center justify-center pa-4"
|
|
1653
|
-
},
|
|
1653
|
+
}, xo = { class: "subject-select__actions system-border-t" }, Fo = { key: 0 }, To = { key: 1 }, sn = /* @__PURE__ */ oe({
|
|
1654
1654
|
__name: "ASubjectSelect",
|
|
1655
1655
|
props: {
|
|
1656
1656
|
selectedItems: {},
|
|
@@ -1664,33 +1664,33 @@ const po = { class: "d-flex flex-column w-100 px-1 align-center" }, bo = { class
|
|
|
1664
1664
|
},
|
|
1665
1665
|
emits: ["update:modelValue", "update:pagination", "onOpen", "onPageChange", "onConfirm", "onFetchNextPage"],
|
|
1666
1666
|
setup(e, { expose: d, emit: s }) {
|
|
1667
|
-
const o = e,
|
|
1667
|
+
const o = e, C = s, m = E(!1), l = U({
|
|
1668
1668
|
get() {
|
|
1669
1669
|
return _(o.modelValue) ? m.value : o.modelValue;
|
|
1670
1670
|
},
|
|
1671
1671
|
set(F) {
|
|
1672
|
-
m.value = F,
|
|
1672
|
+
m.value = F, C("update:modelValue", F);
|
|
1673
1673
|
}
|
|
1674
1674
|
}), a = U({
|
|
1675
1675
|
get: () => o.pagination,
|
|
1676
1676
|
set: (F) => {
|
|
1677
|
-
|
|
1677
|
+
C("update:pagination", { ...wt(F) });
|
|
1678
1678
|
}
|
|
1679
1679
|
}), v = E(!0), { t: g } = le(), c = U(() => o.selectedItems.length), i = U(() => c.value < o.minCount || c.value > o.maxCount), p = () => {
|
|
1680
|
-
|
|
1680
|
+
C("onOpen"), v.value = !0, l.value = !0;
|
|
1681
1681
|
}, n = () => {
|
|
1682
1682
|
v.value = !v.value;
|
|
1683
1683
|
}, t = () => {
|
|
1684
1684
|
l.value = !1;
|
|
1685
|
-
},
|
|
1686
|
-
|
|
1685
|
+
}, y = () => {
|
|
1686
|
+
C(
|
|
1687
1687
|
"onConfirm",
|
|
1688
|
-
o.selectedItems.map((F) =>
|
|
1688
|
+
o.selectedItems.map((F) => wt(F))
|
|
1689
1689
|
), t();
|
|
1690
1690
|
}, A = () => {
|
|
1691
|
-
|
|
1691
|
+
C("onFetchNextPage");
|
|
1692
1692
|
}, f = () => {
|
|
1693
|
-
|
|
1693
|
+
C("onPageChange");
|
|
1694
1694
|
}, D = U(() => Math.ceil(a.value.totalCount / a.value.rowsPerPage)), N = U(() => !(Q(a.value.hasNextPage) && a.value.page === D.value || a.value.hasNextPage === !1)), x = (F) => {
|
|
1695
1695
|
F && N.value && !o.loading && A();
|
|
1696
1696
|
};
|
|
@@ -1698,34 +1698,34 @@ const po = { class: "d-flex flex-column w-100 px-1 align-center" }, bo = { class
|
|
|
1698
1698
|
open: p
|
|
1699
1699
|
}), (F, k) => {
|
|
1700
1700
|
const $ = be("ABtnSecondary"), S = be("ABtnPrimary");
|
|
1701
|
-
return
|
|
1701
|
+
return h(), I(te, null, [
|
|
1702
1702
|
K(F.$slots, "activator", {
|
|
1703
1703
|
props: { onClick: M(() => p(), ["stop"]) }
|
|
1704
1704
|
}),
|
|
1705
|
-
r(
|
|
1705
|
+
r(mt, ct(F.$attrs, {
|
|
1706
1706
|
"model-value": l.value,
|
|
1707
1707
|
fullscreen: "",
|
|
1708
1708
|
class: "subject-select",
|
|
1709
|
-
"onUpdate:modelValue": k[1] || (k[1] = (j) =>
|
|
1709
|
+
"onUpdate:modelValue": k[1] || (k[1] = (j) => C("update:modelValue", j))
|
|
1710
1710
|
}), {
|
|
1711
1711
|
default: u(() => [
|
|
1712
|
-
l.value ? (
|
|
1712
|
+
l.value ? (h(), V(dt, {
|
|
1713
1713
|
key: 0,
|
|
1714
1714
|
class: "subject-select__card"
|
|
1715
1715
|
}, {
|
|
1716
1716
|
default: u(() => [
|
|
1717
|
-
r(
|
|
1717
|
+
r(He, {
|
|
1718
1718
|
class: "subject-select__toolbar system-border-b",
|
|
1719
1719
|
onOnCancel: t
|
|
1720
1720
|
}, {
|
|
1721
1721
|
default: u(() => [
|
|
1722
1722
|
K(F.$slots, "title", {}, () => [
|
|
1723
|
-
O(P(
|
|
1723
|
+
O(P(b(g)(e.dialogTitleT)), 1)
|
|
1724
1724
|
])
|
|
1725
1725
|
]),
|
|
1726
1726
|
_: 3
|
|
1727
1727
|
}),
|
|
1728
|
-
r(
|
|
1728
|
+
r($a, {
|
|
1729
1729
|
density: "compact",
|
|
1730
1730
|
color: "transparent",
|
|
1731
1731
|
height: 46,
|
|
@@ -1734,9 +1734,9 @@ const po = { class: "d-flex flex-column w-100 px-1 align-center" }, bo = { class
|
|
|
1734
1734
|
}, {
|
|
1735
1735
|
default: u(() => [
|
|
1736
1736
|
K(F.$slots, "second-bar", {}, () => [
|
|
1737
|
-
L("div",
|
|
1738
|
-
L("div",
|
|
1739
|
-
L("div",
|
|
1737
|
+
L("div", bo, [
|
|
1738
|
+
L("div", yo, [
|
|
1739
|
+
L("div", ho, [
|
|
1740
1740
|
r(G, {
|
|
1741
1741
|
icon: "",
|
|
1742
1742
|
width: 30,
|
|
@@ -1753,7 +1753,7 @@ const po = { class: "d-flex flex-column w-100 px-1 align-center" }, bo = { class
|
|
|
1753
1753
|
location: "bottom"
|
|
1754
1754
|
}, {
|
|
1755
1755
|
default: u(() => [
|
|
1756
|
-
O(P(
|
|
1756
|
+
O(P(b(g)("common.subjectSelect.filter.toggle")), 1)
|
|
1757
1757
|
]),
|
|
1758
1758
|
_: 1
|
|
1759
1759
|
})
|
|
@@ -1762,7 +1762,7 @@ const po = { class: "d-flex flex-column w-100 px-1 align-center" }, bo = { class
|
|
|
1762
1762
|
}),
|
|
1763
1763
|
K(F.$slots, "second-bar-left")
|
|
1764
1764
|
]),
|
|
1765
|
-
L("div",
|
|
1765
|
+
L("div", Co, [
|
|
1766
1766
|
K(F.$slots, "second-bar-right")
|
|
1767
1767
|
])
|
|
1768
1768
|
])
|
|
@@ -1774,35 +1774,35 @@ const po = { class: "d-flex flex-column w-100 px-1 align-center" }, bo = { class
|
|
|
1774
1774
|
L("div", {
|
|
1775
1775
|
class: _e(["subject-select__main", { "subject-select__main--sidebar-active": v.value }])
|
|
1776
1776
|
}, [
|
|
1777
|
-
L("div",
|
|
1778
|
-
L("div",
|
|
1777
|
+
L("div", ko, [
|
|
1778
|
+
L("div", wo, [
|
|
1779
1779
|
K(F.$slots, "filter")
|
|
1780
1780
|
])
|
|
1781
1781
|
]),
|
|
1782
|
-
L("div",
|
|
1782
|
+
L("div", Ao, [
|
|
1783
1783
|
K(F.$slots, "content"),
|
|
1784
|
-
e.paginationMode === "more" ? (
|
|
1785
|
-
|
|
1784
|
+
e.paginationMode === "more" ? (h(), I("div", _o, [
|
|
1785
|
+
Vt((h(), V($, {
|
|
1786
1786
|
loading: e.loading,
|
|
1787
1787
|
size: "small",
|
|
1788
1788
|
onClick: A
|
|
1789
1789
|
}, {
|
|
1790
1790
|
default: u(() => [
|
|
1791
1791
|
K(F.$slots, "button-confirm-title", {}, () => [
|
|
1792
|
-
O(P(
|
|
1792
|
+
O(P(b(g)("common.button.loadMore")), 1)
|
|
1793
1793
|
])
|
|
1794
1794
|
]),
|
|
1795
1795
|
_: 3
|
|
1796
1796
|
}, 8, ["loading"])), [
|
|
1797
|
-
[
|
|
1797
|
+
[It, N.value || e.loading],
|
|
1798
1798
|
[
|
|
1799
|
-
|
|
1799
|
+
Ea,
|
|
1800
1800
|
x,
|
|
1801
1801
|
void 0,
|
|
1802
1802
|
{ quiet: !0 }
|
|
1803
1803
|
]
|
|
1804
1804
|
])
|
|
1805
|
-
])) : (
|
|
1805
|
+
])) : (h(), V(mo, {
|
|
1806
1806
|
key: 1,
|
|
1807
1807
|
modelValue: a.value,
|
|
1808
1808
|
"onUpdate:modelValue": k[0] || (k[0] = (j) => a.value = j),
|
|
@@ -1810,20 +1810,20 @@ const po = { class: "d-flex flex-column w-100 px-1 align-center" }, bo = { class
|
|
|
1810
1810
|
}, null, 8, ["modelValue"]))
|
|
1811
1811
|
])
|
|
1812
1812
|
], 2),
|
|
1813
|
-
L("div",
|
|
1814
|
-
e.minCount === e.maxCount ? (
|
|
1813
|
+
L("div", xo, [
|
|
1814
|
+
e.minCount === e.maxCount ? (h(), I("div", Fo, P(b(g)("common.subjectSelect.texts.pickExactCount", { count: e.minCount, selected: c.value })), 1)) : (h(), I("div", To, P(b(g)("common.subjectSelect.texts.pickRangeCount", {
|
|
1815
1815
|
minCount: e.minCount,
|
|
1816
1816
|
maxCount: e.maxCount,
|
|
1817
1817
|
selected: c.value
|
|
1818
1818
|
})), 1)),
|
|
1819
|
-
r(
|
|
1819
|
+
r(ft),
|
|
1820
1820
|
r(S, {
|
|
1821
1821
|
disabled: i.value,
|
|
1822
|
-
onClick: M(
|
|
1822
|
+
onClick: M(y, ["stop"])
|
|
1823
1823
|
}, {
|
|
1824
1824
|
default: u(() => [
|
|
1825
1825
|
K(F.$slots, "button-confirm-title", {}, () => [
|
|
1826
|
-
O(P(
|
|
1826
|
+
O(P(b(g)("common.button.confirm")), 1)
|
|
1827
1827
|
])
|
|
1828
1828
|
]),
|
|
1829
1829
|
_: 3
|
|
@@ -1840,44 +1840,44 @@ const po = { class: "d-flex flex-column w-100 px-1 align-center" }, bo = { class
|
|
|
1840
1840
|
}
|
|
1841
1841
|
});
|
|
1842
1842
|
export {
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1843
|
+
en as ADatatableOrdering,
|
|
1844
|
+
mo as ADatatablePagination,
|
|
1845
|
+
un as AFilterBooleanSelect,
|
|
1846
|
+
cn as AFilterDatetimePicker,
|
|
1847
|
+
dn as AFilterInteger,
|
|
1848
|
+
mn as AFilterRemoteAutocomplete,
|
|
1849
|
+
fn as AFilterRemoteAutocompleteWithMinimal,
|
|
1850
|
+
vn as AFilterString,
|
|
1851
|
+
Go as AFilterTimeInterval,
|
|
1852
|
+
gn as AFilterValueObjectOptionsSelect,
|
|
1853
|
+
Zo as AFilterWrapper,
|
|
1854
|
+
pn as AFilterWrapperSubjectSelect,
|
|
1855
|
+
bn as AFormRemoteAutocomplete,
|
|
1856
|
+
sn as ASubjectSelect,
|
|
1857
|
+
Ue as DatatablePaginationKey,
|
|
1858
1858
|
we as FilterConfigKey,
|
|
1859
1859
|
Ae as FilterDataKey,
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1860
|
+
yn as FilterInnerConfigKey,
|
|
1861
|
+
hn as FilterInnerDataKey,
|
|
1862
|
+
Ne as TimeIntervalSpecialOptions,
|
|
1863
1863
|
ce as UserAdminConfigLayoutType,
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1864
|
+
ja as UserAdminConfigLayoutTypeDefault,
|
|
1865
|
+
Ve as UserAdminConfigType,
|
|
1866
|
+
Oa as UserAdminConfigTypeDefault,
|
|
1867
|
+
po as createDatatableColumnsConfig,
|
|
1868
|
+
Gt as createFilter,
|
|
1869
|
+
Zt as createFilterStore,
|
|
1870
|
+
Le as generateListQuery,
|
|
1871
|
+
tn as useApiFetchByIds,
|
|
1872
|
+
Dt as useApiFetchList,
|
|
1873
|
+
an as useApiFetchListBatch,
|
|
1874
|
+
ua as useApiQueryBuilder,
|
|
1875
1875
|
he as useApiRequest,
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1876
|
+
ut as useFilterHelpers,
|
|
1877
|
+
on as useJobApi,
|
|
1878
|
+
Ee as usePagination,
|
|
1879
|
+
nn as useSubjectSelect,
|
|
1880
|
+
zt as useUserAdminConfigApi,
|
|
1881
|
+
za as useUserAdminConfigFactory
|
|
1882
1882
|
};
|
|
1883
1883
|
//# sourceMappingURL=labs.js.map
|