@anzusystems/common-admin 1.47.0-beta.334 → 1.47.0-beta.336

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