@anzusystems/common-admin 1.47.0-beta.dev-1784059863 → 1.47.0-beta.dev-1784059866
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/{AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-Dbsa5FLQ.mjs → AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-BbBijPbh.mjs} +427 -426
- package/dist/AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-BbBijPbh.mjs.map +1 -0
- package/dist/common-admin.d.ts +1 -0
- package/dist/common-admin.js +3 -3
- package/dist/labs.d.ts +5 -2
- package/dist/labs.js +636 -631
- package/dist/labs.js.map +1 -1
- package/dist/{webfontloader-BfikDxLU.mjs → webfontloader-CswbVn2y.mjs} +2 -2
- package/dist/{webfontloader-BfikDxLU.mjs.map → webfontloader-CswbVn2y.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-Dbsa5FLQ.mjs.map +0 -1
package/dist/labs.js
CHANGED
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
import { aG as Oo, aH as Uo, d as fe, bT as jo, bU as qo, bV as Da, j as Ve, k as
|
|
2
|
-
import { aE as
|
|
3
|
-
import { defineComponent as ze, inject as Vt, provide as oa, ref as _, openBlock as g, createBlock as U, withModifiers as J, withCtx as r, renderSlot as L, useModel as it, computed as b, watch as ue, createElementBlock as
|
|
4
|
-
import { VForm as
|
|
1
|
+
import { aG as Oo, aH as Uo, d as fe, bT as jo, bU as qo, au as Go, bV as Da, j as Ve, k as Ho, a1 as Wo, h as ht, i as Kt, aj as Ia, ak as Ta, al as Fa, am as Ba, ag as Lt, a_ as Ra, aa as Ka, ab as La, ac as Va, ad as za, an as Ma, ao as Na, ae as Oa, af as Ua, bW as ja, bX as qa, be as Ga, bY as Jo, as as Ha, bZ as ta, ap as Xo, aq as Yo, aV as Qo, b2 as Zo, ar as _o, E as en, a8 as tn, a2 as an, b_ as on, q as nn, p as ln, x as sn, a7 as rn, aI as dn, m as Wa, b$ as cn, l as un, c0 as fn, c1 as mn, c2 as Ja, c3 as Xa, c4 as Ya, c5 as Qa, c6 as Za, c7 as _a, c8 as eo, c9 as to, ca as ao, cb as oo, cc as no, cd as vn, _ as lo, ce as yn, cf as hn, cg as pn, ch as gn, ci as bn, cj as kn, ck as wn, g as Cn, aU as xn, cl as Sn, cm as An, cn as En, z as Pn, co as $n, cp as Dn } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-BbBijPbh.mjs";
|
|
2
|
+
import { aE as Yi, cq as Qi, cr as Zi, aA as _i, aB as es, aD as ts, aF as as, aC as os, aS as ns, aJ as ls, bb as is, aO as ss, aX as rs, ay as ds, az as cs, cs as us, ct as fs, cu as ms, cv as vs, cw as ys, cx as hs, cy as ps, cz as gs, ai as bs, ah as ks, cA as ws, cB as Cs, cC as xs, cD as Ss, cE as As, cF as Es, cG as Ps, cH as $s } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-BbBijPbh.mjs";
|
|
3
|
+
import { defineComponent as ze, inject as Vt, provide as oa, ref as _, openBlock as g, createBlock as U, withKeys as In, withModifiers as J, withCtx as r, renderSlot as L, useModel as it, computed as b, watch as ue, createElementBlock as B, createElementVNode as K, toDisplayString as $, unref as c, createVNode as s, createTextVNode as N, Fragment as ne, renderList as Ze, normalizeClass as we, mergeModels as Te, createCommentVNode as M, onMounted as la, toRaw as wa, resolveComponent as Ca, mergeProps as Q, withDirectives as Tn, vShow as Fn, useSlots as io, useTemplateRef as zt, isRef as so, normalizeProps as De, guardReactiveProps as Ie, normalizeStyle as pt, shallowRef as aa, nextTick as Le, onBeforeUnmount as na, getCurrentInstance as xa } from "vue";
|
|
4
|
+
import { VForm as Bn } from "vuetify/components/VForm";
|
|
5
5
|
import { useI18n as je } from "vue-i18n";
|
|
6
6
|
import { VBtn as q } from "vuetify/components/VBtn";
|
|
7
|
-
import { VList as
|
|
7
|
+
import { VList as gt, VListItem as xe, VListItemTitle as Pe } from "vuetify/components/VList";
|
|
8
8
|
import { VMenu as Mt } from "vuetify/components/VMenu";
|
|
9
|
-
import { useThrottleFn as It, useDebounceFn as
|
|
10
|
-
import { VBtnToggle as
|
|
9
|
+
import { useThrottleFn as It, useDebounceFn as Rn } from "@vueuse/core";
|
|
10
|
+
import { VBtnToggle as Kn } from "vuetify/components/VBtnToggle";
|
|
11
11
|
import ro from "axios";
|
|
12
12
|
import { useDisplay as co } from "vuetify";
|
|
13
13
|
import { VCard as ia, VCardTitle as uo, VCardText as Rt, VCardActions as fo } from "vuetify/components/VCard";
|
|
14
14
|
import { VDialog as sa } from "vuetify/components/VDialog";
|
|
15
15
|
import { VSpacer as ra } from "vuetify/components/VGrid";
|
|
16
|
-
import { VIcon as
|
|
17
|
-
import { VToolbar as
|
|
16
|
+
import { VIcon as W } from "vuetify/components/VIcon";
|
|
17
|
+
import { VToolbar as Ln } from "vuetify/components/VToolbar";
|
|
18
18
|
import { VTooltip as Se } from "vuetify/components/VTooltip";
|
|
19
|
-
import { Intersect as
|
|
19
|
+
import { Intersect as Vn } from "vuetify/directives";
|
|
20
20
|
import { VAlert as da } from "vuetify/components/VAlert";
|
|
21
21
|
import { VProgressCircular as mo } from "vuetify/components/VProgressCircular";
|
|
22
22
|
import { VRadio as Sa } from "vuetify/components/VRadio";
|
|
23
|
-
import { VRadioGroup as
|
|
24
|
-
import { onBeforeRouteLeave as
|
|
25
|
-
const
|
|
23
|
+
import { VRadioGroup as zn } from "vuetify/components/VRadioGroup";
|
|
24
|
+
import { onBeforeRouteLeave as Mn } from "vue-router";
|
|
25
|
+
const Ri = /* @__PURE__ */ ze({
|
|
26
26
|
__name: "AFilterWrapperSidebar",
|
|
27
27
|
props: {
|
|
28
28
|
formName: { default: "search" }
|
|
29
29
|
},
|
|
30
30
|
emits: ["submit"],
|
|
31
|
-
setup(t, {
|
|
32
|
-
const
|
|
33
|
-
if (fe(
|
|
31
|
+
setup(t, { expose: C, emit: u }) {
|
|
32
|
+
const a = u, m = Vt(Oo), h = Vt(Uo);
|
|
33
|
+
if (fe(m) || fe(h))
|
|
34
34
|
throw new Error("Incorrect provide/inject config.");
|
|
35
|
-
oa(jo, _(0))
|
|
36
|
-
const
|
|
37
|
-
|
|
35
|
+
oa(jo, _(0));
|
|
36
|
+
const y = _(/* @__PURE__ */ new Map());
|
|
37
|
+
oa(qo, y);
|
|
38
|
+
const { clearAll: x, clearAllFilterSelected: k } = Go(), p = () => {
|
|
39
|
+
a("submit");
|
|
38
40
|
};
|
|
39
|
-
return (
|
|
41
|
+
return C({ resetFilter: () => {
|
|
42
|
+
x(h, m), k(h, m, y);
|
|
43
|
+
} }), (I, R) => (g(), U(Bn, {
|
|
40
44
|
name: t.formName,
|
|
41
|
-
onSubmit: J(
|
|
45
|
+
onSubmit: J(p, ["prevent"]),
|
|
46
|
+
onKeyup: In(p, ["enter"])
|
|
42
47
|
}, {
|
|
43
48
|
default: r(() => [
|
|
44
|
-
L(
|
|
49
|
+
L(I.$slots, "default")
|
|
45
50
|
]),
|
|
46
51
|
_: 3
|
|
47
52
|
}, 8, ["name"]));
|
|
48
53
|
}
|
|
49
|
-
}),
|
|
54
|
+
}), Nn = { class: "d-flex align-center justify-center" }, On = { class: "text-body-small mr-1" }, Ki = /* @__PURE__ */ ze({
|
|
50
55
|
__name: "ADatatableOrdering",
|
|
51
56
|
props: /* @__PURE__ */ Te({
|
|
52
57
|
variant: { default: "id" },
|
|
@@ -61,7 +66,7 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
61
66
|
}),
|
|
62
67
|
emits: /* @__PURE__ */ Te(["sortByChange"], ["update:modelValue"]),
|
|
63
68
|
setup(t, { emit: C }) {
|
|
64
|
-
const u = t, a = C,
|
|
69
|
+
const u = t, a = C, m = it(t, "modelValue"), h = Vt(Da);
|
|
65
70
|
if (fe(h))
|
|
66
71
|
throw new Error("Incorrect provide/inject config.");
|
|
67
72
|
const { t: y } = je(), x = [
|
|
@@ -90,7 +95,7 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
90
95
|
{
|
|
91
96
|
id: 3,
|
|
92
97
|
titleT: "common.system.datatable.ordering.mostRelevant",
|
|
93
|
-
sortBy: { key:
|
|
98
|
+
sortBy: { key: Ho, order: Ve.Desc }
|
|
94
99
|
},
|
|
95
100
|
{
|
|
96
101
|
id: 1,
|
|
@@ -102,20 +107,20 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
102
107
|
titleT: "common.system.datatable.ordering.oldest",
|
|
103
108
|
sortBy: { key: "createdAt", order: Ve.Asc }
|
|
104
109
|
}
|
|
105
|
-
],
|
|
106
|
-
const
|
|
107
|
-
return
|
|
108
|
-
}), I = b(() => u.customOptions ? u.customOptions : u.variant === "most-relevant" ? p : u.variant === "id" ? k : x), R = (
|
|
109
|
-
|
|
110
|
-
}, S = (
|
|
111
|
-
|
|
110
|
+
], P = b(() => {
|
|
111
|
+
const v = I.value.find((T) => T.id === m.value);
|
|
112
|
+
return v ? y(v.titleT) : "";
|
|
113
|
+
}), I = b(() => u.customOptions ? u.customOptions : u.variant === "most-relevant" ? p : u.variant === "id" ? k : x), R = (v) => {
|
|
114
|
+
m.value = v.id;
|
|
115
|
+
}, S = (v) => {
|
|
116
|
+
v.sortBy || (h.value = {
|
|
112
117
|
...h.value,
|
|
113
118
|
sortBy: null
|
|
114
|
-
}, a("sortByChange",
|
|
119
|
+
}, a("sortByChange", v)), h.value.sortBy = v.sortBy, a("sortByChange", v);
|
|
115
120
|
};
|
|
116
|
-
return ue(
|
|
117
|
-
if (
|
|
118
|
-
const z = I.value.find((
|
|
121
|
+
return ue(m, (v, T) => {
|
|
122
|
+
if (v === T) return;
|
|
123
|
+
const z = I.value.find((F) => F.id === v);
|
|
119
124
|
if (!fe(z)) {
|
|
120
125
|
if (fe(u.paginationUpdateCustomCb)) {
|
|
121
126
|
S(z);
|
|
@@ -125,15 +130,15 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
125
130
|
}
|
|
126
131
|
}), ue(
|
|
127
132
|
h,
|
|
128
|
-
(
|
|
129
|
-
if (
|
|
133
|
+
(v, T) => {
|
|
134
|
+
if (v.sortBy?.key === T?.sortBy?.key && v.sortBy?.order === T?.sortBy?.order)
|
|
130
135
|
return;
|
|
131
|
-
const z = I.value.find((
|
|
132
|
-
fe(z) || (
|
|
136
|
+
const z = I.value.find((F) => v.sortBy?.key === F.sortBy?.key && v.sortBy?.order === F.sortBy?.order);
|
|
137
|
+
fe(z) || (m.value = z.id);
|
|
133
138
|
},
|
|
134
139
|
{ immediate: !0 }
|
|
135
|
-
), (
|
|
136
|
-
K("div",
|
|
140
|
+
), (v, T) => (g(), B("div", Nn, [
|
|
141
|
+
K("div", On, $(c(y)("common.system.datatable.ordering.title")) + ": ", 1),
|
|
137
142
|
s(q, {
|
|
138
143
|
variant: "text",
|
|
139
144
|
rounded: "xl",
|
|
@@ -142,28 +147,28 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
142
147
|
"append-icon": "mdi-chevron-down"
|
|
143
148
|
}, {
|
|
144
149
|
default: r(() => [
|
|
145
|
-
N(P
|
|
150
|
+
N($(P.value) + " ", 1),
|
|
146
151
|
s(Mt, {
|
|
147
152
|
activator: "parent",
|
|
148
153
|
location: "bottom",
|
|
149
154
|
"close-on-content-click": ""
|
|
150
155
|
}, {
|
|
151
156
|
default: r(() => [
|
|
152
|
-
s(
|
|
157
|
+
s(gt, {
|
|
153
158
|
density: "compact",
|
|
154
159
|
class: "pa-0"
|
|
155
160
|
}, {
|
|
156
161
|
default: r(() => [
|
|
157
|
-
(g(!0),
|
|
162
|
+
(g(!0), B(ne, null, Ze(I.value, (z) => (g(), U(xe, {
|
|
158
163
|
key: z.id,
|
|
159
|
-
onClick: (
|
|
164
|
+
onClick: (F) => R(z)
|
|
160
165
|
}, {
|
|
161
166
|
default: r(() => [
|
|
162
167
|
s(Pe, {
|
|
163
|
-
class: we({ "font-weight-bold": z.id ===
|
|
168
|
+
class: we({ "font-weight-bold": z.id === m.value })
|
|
164
169
|
}, {
|
|
165
170
|
default: r(() => [
|
|
166
|
-
N(
|
|
171
|
+
N($(c(y)(z.titleT)), 1)
|
|
167
172
|
]),
|
|
168
173
|
_: 2
|
|
169
174
|
}, 1032, ["class"])
|
|
@@ -181,10 +186,10 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
181
186
|
})
|
|
182
187
|
]));
|
|
183
188
|
}
|
|
184
|
-
}),
|
|
189
|
+
}), Un = { class: "anzu-data-footer" }, jn = {
|
|
185
190
|
key: 0,
|
|
186
191
|
class: "anzu-data-footer__page-limit"
|
|
187
|
-
},
|
|
192
|
+
}, qn = { class: "anzu-data-footer__pagination" }, Gn = { class: "anzu-data-footer__icons-before" }, Hn = { class: "current-page" }, Wn = { class: "anzu-data-footer__icons-after" }, Jn = /* @__PURE__ */ ze({
|
|
188
193
|
__name: "ADatatablePagination",
|
|
189
194
|
props: {
|
|
190
195
|
itemsPerPageOptions: { default: () => [10, 25, 50] },
|
|
@@ -195,31 +200,31 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
195
200
|
const u = C, a = Vt(Da);
|
|
196
201
|
if (fe(a))
|
|
197
202
|
throw new Error("Incorrect provide/inject config.");
|
|
198
|
-
const { t:
|
|
203
|
+
const { t: m } = je(), { setStoredPage: h } = Wo(), y = b(() => Math.ceil(a.value.totalCount / a.value.rowsPerPage)), x = b(() => a.value.page * a.value.rowsPerPage - a.value.rowsPerPage + 1), k = b(() => a.value.page * a.value.rowsPerPage - a.value.rowsPerPage + a.value.currentViewCount), p = b(() => a.value.page === 1), P = b(() => !ht(a.value.hasNextPage) || a.value.page === y.value), I = b(() => ht(a.value.hasNextPage) && a.value.page === y.value || a.value.hasNextPage === !1), R = b(() => ht(a.value.hasNextPage) ? a.value.totalCount : a.value.hasNextPage ? k.value + 1 + "+" : k.value);
|
|
199
204
|
ue(
|
|
200
205
|
() => a.value.rowsPerPage,
|
|
201
|
-
(
|
|
202
|
-
|
|
206
|
+
(F, O) => {
|
|
207
|
+
F !== O && (a.value.page = 1, u("change"));
|
|
203
208
|
}
|
|
204
209
|
), ue(
|
|
205
210
|
() => a.value.page,
|
|
206
|
-
(
|
|
207
|
-
|
|
211
|
+
(F, O) => {
|
|
212
|
+
F !== O && (h(F), u("change"));
|
|
208
213
|
}
|
|
209
214
|
);
|
|
210
215
|
const S = It(() => {
|
|
211
216
|
a.value.page = 1;
|
|
212
|
-
}, 300),
|
|
217
|
+
}, 300), v = It(() => {
|
|
213
218
|
a.value.page = y.value;
|
|
214
219
|
}, 300), T = It(() => {
|
|
215
220
|
a.value.page = a.value.page - 1;
|
|
216
221
|
}, 300), z = It(() => {
|
|
217
222
|
a.value.page = a.value.page + 1;
|
|
218
223
|
}, 300);
|
|
219
|
-
return (
|
|
220
|
-
t.hideRecordsPerPage ? M("", !0) : (g(),
|
|
221
|
-
N(
|
|
222
|
-
s(
|
|
224
|
+
return (F, O) => (g(), B("div", Un, [
|
|
225
|
+
t.hideRecordsPerPage ? M("", !0) : (g(), B("div", jn, [
|
|
226
|
+
N($(c(m)("common.system.datatable.itemsPerPage")) + ": ", 1),
|
|
227
|
+
s(Kn, {
|
|
223
228
|
modelValue: c(a).rowsPerPage,
|
|
224
229
|
"onUpdate:modelValue": O[0] || (O[0] = (E) => c(a).rowsPerPage = E),
|
|
225
230
|
class: "ml-2",
|
|
@@ -228,7 +233,7 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
228
233
|
"data-cy": "table-size"
|
|
229
234
|
}, {
|
|
230
235
|
default: r(() => [
|
|
231
|
-
(g(!0),
|
|
236
|
+
(g(!0), B(ne, null, Ze(t.itemsPerPageOptions, (E) => (g(), U(q, {
|
|
232
237
|
key: E,
|
|
233
238
|
color: E === c(a).rowsPerPage ? "secondary" : "",
|
|
234
239
|
value: E,
|
|
@@ -237,7 +242,7 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
237
242
|
variant: "text"
|
|
238
243
|
}, {
|
|
239
244
|
default: r(() => [
|
|
240
|
-
N(
|
|
245
|
+
N($(E), 1)
|
|
241
246
|
]),
|
|
242
247
|
_: 2
|
|
243
248
|
}, 1032, ["color", "value"]))), 128))
|
|
@@ -245,8 +250,8 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
245
250
|
_: 1
|
|
246
251
|
}, 8, ["modelValue"])
|
|
247
252
|
])),
|
|
248
|
-
K("div",
|
|
249
|
-
K("div",
|
|
253
|
+
K("div", qn, $(x.value) + " - " + $(k.value) + " " + $(c(m)("common.system.datatable.from")) + " " + $(R.value), 1),
|
|
254
|
+
K("div", Gn, [
|
|
250
255
|
s(q, {
|
|
251
256
|
disabled: p.value,
|
|
252
257
|
icon: "mdi-page-first",
|
|
@@ -262,10 +267,10 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
262
267
|
onClick: J(c(T), ["stop"])
|
|
263
268
|
}, null, 8, ["disabled", "onClick"])
|
|
264
269
|
]),
|
|
265
|
-
K("div",
|
|
266
|
-
K("span", null,
|
|
270
|
+
K("div", Hn, [
|
|
271
|
+
K("span", null, $(c(a).page), 1)
|
|
267
272
|
]),
|
|
268
|
-
K("div",
|
|
273
|
+
K("div", Wn, [
|
|
269
274
|
s(q, {
|
|
270
275
|
disabled: I.value,
|
|
271
276
|
icon: "mdi-chevron-right",
|
|
@@ -274,67 +279,67 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
274
279
|
onClick: J(c(z), ["stop"])
|
|
275
280
|
}, null, 8, ["disabled", "onClick"]),
|
|
276
281
|
s(q, {
|
|
277
|
-
disabled:
|
|
282
|
+
disabled: P.value,
|
|
278
283
|
icon: "mdi-page-last",
|
|
279
284
|
size: "small",
|
|
280
285
|
variant: "text",
|
|
281
|
-
onClick: J(c(
|
|
286
|
+
onClick: J(c(v), ["stop"])
|
|
282
287
|
}, null, 8, ["disabled", "onClick"])
|
|
283
288
|
])
|
|
284
289
|
]));
|
|
285
290
|
}
|
|
286
|
-
}),
|
|
287
|
-
const { querySetLimit: a, querySetOffset:
|
|
288
|
-
return a(p),
|
|
289
|
-
},
|
|
291
|
+
}), Xn = (t, C, u = "id") => {
|
|
292
|
+
const { querySetLimit: a, querySetOffset: m, querySetOrder: h, queryBuild: y, queryAddFilter: x, queryAdd: k } = Jo(), p = t.length;
|
|
293
|
+
return a(p), m(1, p), h(u, !1), C ? k(u, t.join(",")) : x("in", u, t.join(",")), y();
|
|
294
|
+
}, Li = (t) => {
|
|
290
295
|
const {
|
|
291
296
|
client: C,
|
|
292
297
|
system: u,
|
|
293
298
|
entity: a,
|
|
294
|
-
urlTemplate:
|
|
299
|
+
urlTemplate: m,
|
|
295
300
|
urlParams: h,
|
|
296
301
|
options: y = {},
|
|
297
302
|
isSearchApi: x = !1,
|
|
298
303
|
field: k = "id",
|
|
299
304
|
silentConsoleError: p = !1
|
|
300
305
|
} = t;
|
|
301
|
-
let
|
|
306
|
+
let P = null;
|
|
302
307
|
return {
|
|
303
|
-
executeFetch: async (S,
|
|
304
|
-
|
|
305
|
-
const { urlTemplate: T, urlParams: z } =
|
|
308
|
+
executeFetch: async (S, v = {}) => {
|
|
309
|
+
P = new AbortController();
|
|
310
|
+
const { urlTemplate: T, urlParams: z } = v;
|
|
306
311
|
try {
|
|
307
|
-
const
|
|
312
|
+
const F = Kt(z) ? z : h, O = Kt(T) ? T : m;
|
|
308
313
|
if (fe(O)) throw new Error("Url template is undefined");
|
|
309
|
-
const E = (fe(
|
|
314
|
+
const E = (fe(F) ? O : Ia(O, F)) + Xn(S, x, k), d = await C().get(E, {
|
|
310
315
|
...y,
|
|
311
|
-
signal:
|
|
316
|
+
signal: P.signal
|
|
312
317
|
});
|
|
313
318
|
if (!Ta(d.status))
|
|
314
|
-
throw new
|
|
319
|
+
throw new Fa(d.status);
|
|
315
320
|
if (d.data?.data)
|
|
316
321
|
return d.data.data;
|
|
317
|
-
if (d.status ===
|
|
322
|
+
if (d.status === Ba)
|
|
318
323
|
return [];
|
|
319
324
|
throw new Lt();
|
|
320
|
-
} catch (
|
|
321
|
-
if (
|
|
325
|
+
} catch (F) {
|
|
326
|
+
if (F instanceof DOMException && F.name === "AbortError")
|
|
322
327
|
return [];
|
|
323
|
-
throw Ra(
|
|
328
|
+
throw Ra(F) ? F : Ka(F) ? new La(F, F.config?.url) : Va(F) ? new za(F, u, a, F) : Ma(F) ? new Na(F, u, a, F) : Oa(F) ? new Ua(F, F) : ja(F) ? new qa(F) : ro.isAxiosError(F) ? (p || console.error("Axios error: " + m, ...F.cause ? [F.cause] : []), new Ga(F)) : (p || console.error("AnzuFatalError: ", F), new Lt(F));
|
|
324
329
|
} finally {
|
|
325
|
-
|
|
330
|
+
P = null;
|
|
326
331
|
}
|
|
327
332
|
},
|
|
328
333
|
abortFetch: () => {
|
|
329
|
-
|
|
334
|
+
P && P.abort();
|
|
330
335
|
}
|
|
331
336
|
};
|
|
332
|
-
},
|
|
337
|
+
}, Vi = (t) => {
|
|
333
338
|
const {
|
|
334
339
|
client: C,
|
|
335
340
|
system: u,
|
|
336
341
|
entity: a,
|
|
337
|
-
urlTemplate:
|
|
342
|
+
urlTemplate: m,
|
|
338
343
|
urlParams: h,
|
|
339
344
|
options: y = {},
|
|
340
345
|
silentConsoleError: x = !1
|
|
@@ -344,17 +349,17 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
344
349
|
executeFetch: async (I, R, S = {}) => {
|
|
345
350
|
k = new AbortController();
|
|
346
351
|
const {
|
|
347
|
-
urlTemplate:
|
|
352
|
+
urlTemplate: v,
|
|
348
353
|
urlParams: T,
|
|
349
354
|
sortBy: z = "id",
|
|
350
|
-
sortDesc:
|
|
355
|
+
sortDesc: F = !0,
|
|
351
356
|
batchSize: O = 100,
|
|
352
357
|
forceElastic: E = !1
|
|
353
358
|
} = S;
|
|
354
359
|
try {
|
|
355
|
-
const d = R.general.elastic || E ? "/search" : "", D = Kt(T) ? T : h, w = Kt(
|
|
360
|
+
const d = R.general.elastic || E ? "/search" : "", D = Kt(T) ? T : h, w = Kt(v) ? v : m;
|
|
356
361
|
if (fe(w)) throw new Error("Url template is undefined");
|
|
357
|
-
const { pagination: i } =
|
|
362
|
+
const { pagination: i } = Ha(z, F ? Ve.Desc : Ve.Asc, {
|
|
358
363
|
rowsPerPage: O
|
|
359
364
|
}), G = (fe(D) ? w : Ia(w, D)) + d, X = [], ee = await C().get(
|
|
360
365
|
G + ta(i, I, R),
|
|
@@ -364,11 +369,11 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
364
369
|
}
|
|
365
370
|
);
|
|
366
371
|
if (!Ta(ee.status))
|
|
367
|
-
throw new
|
|
372
|
+
throw new Fa(ee.status);
|
|
368
373
|
if (ee.data) {
|
|
369
|
-
const
|
|
370
|
-
if (X.push(...
|
|
371
|
-
for (i.value.hasNextPage =
|
|
374
|
+
const H = ee.data;
|
|
375
|
+
if (X.push(...H.data), Xo(H))
|
|
376
|
+
for (i.value.hasNextPage = H.hasNextPage; i.value.hasNextPage; ) {
|
|
372
377
|
i.value.page++;
|
|
373
378
|
const me = (await C().get(
|
|
374
379
|
G + ta(i, I, R),
|
|
@@ -379,8 +384,8 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
379
384
|
)).data;
|
|
380
385
|
X.push(...me.data), i.value.hasNextPage = me.hasNextPage;
|
|
381
386
|
}
|
|
382
|
-
else if (
|
|
383
|
-
if (i.value.totalCount =
|
|
387
|
+
else if (Yo(H)) {
|
|
388
|
+
if (i.value.totalCount = H.totalCount, i.value.totalCount <= i.value.rowsPerPage)
|
|
384
389
|
return X;
|
|
385
390
|
const Y = [], me = Math.ceil(i.value.totalCount / i.value.rowsPerPage);
|
|
386
391
|
for (let ae = 1; ae < me; ae++) {
|
|
@@ -398,13 +403,13 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
398
403
|
}
|
|
399
404
|
return X;
|
|
400
405
|
}
|
|
401
|
-
if (ee.status ===
|
|
406
|
+
if (ee.status === Ba)
|
|
402
407
|
return [];
|
|
403
408
|
throw new Lt();
|
|
404
409
|
} catch (d) {
|
|
405
410
|
if (d instanceof DOMException && d.name === "AbortError")
|
|
406
411
|
return [];
|
|
407
|
-
throw Ra(d) ? d : Ka(d) ? new La(d, d.config?.url) : Va(d) ? new za(d, u, a, d) : Ma(d) ? new Na(d, u, a, d) : Oa(d) ? new Ua(d, d) : ja(d) ? new qa(d) : ro.isAxiosError(d) ? (x || console.error("Axios error: " +
|
|
412
|
+
throw Ra(d) ? d : Ka(d) ? new La(d, d.config?.url) : Va(d) ? new za(d, u, a, d) : Ma(d) ? new Na(d, u, a, d) : Oa(d) ? new Ua(d, d) : ja(d) ? new qa(d) : ro.isAxiosError(d) ? (x || console.error("Axios error: " + m, ...d.cause ? [d.cause] : []), new Ga(d)) : (x || console.error("AnzuFatalError: ", d), new Lt(d));
|
|
408
413
|
} finally {
|
|
409
414
|
k = null;
|
|
410
415
|
}
|
|
@@ -413,47 +418,47 @@ const Bi = /* @__PURE__ */ ze({
|
|
|
413
418
|
k && k.abort();
|
|
414
419
|
}
|
|
415
420
|
};
|
|
416
|
-
}, Tt = "/adm/v1/job",
|
|
417
|
-
function
|
|
421
|
+
}, Tt = "/adm/v1/job", Ft = "job";
|
|
422
|
+
function zi(t, C) {
|
|
418
423
|
return {
|
|
419
|
-
useFetchJobList: () =>
|
|
420
|
-
fetchJob: (y) =>
|
|
424
|
+
useFetchJobList: () => tn({ client: t, system: C, entity: Ft, urlTemplate: Tt }),
|
|
425
|
+
fetchJob: (y) => en(t, Tt + "/:id", { id: y }, C, Ft),
|
|
421
426
|
createJob: (y) => {
|
|
422
|
-
const x =
|
|
423
|
-
return
|
|
427
|
+
const x = Zo(y._resourceName).slice(4).replace("-kind-", "-kind/");
|
|
428
|
+
return _o(t, y, Tt + "/:type", { type: x }, C, Ft);
|
|
424
429
|
},
|
|
425
|
-
deleteJob: (y) =>
|
|
430
|
+
deleteJob: (y) => Qo(t, Tt + "/:id", { id: y }, C, Ft)
|
|
426
431
|
};
|
|
427
432
|
}
|
|
428
|
-
const
|
|
433
|
+
const Yn = {
|
|
429
434
|
key: "",
|
|
430
435
|
title: void 0,
|
|
431
436
|
sortable: !1,
|
|
432
437
|
fixed: !1
|
|
433
|
-
},
|
|
438
|
+
}, Qn = {
|
|
434
439
|
storeColumnsLocalStorage: !0,
|
|
435
440
|
disableActions: !1,
|
|
436
441
|
customI18n: void 0,
|
|
437
442
|
showExpand: !1
|
|
438
443
|
};
|
|
439
|
-
function
|
|
440
|
-
const h = { ...
|
|
444
|
+
function Zn(t, C, u, a, m = {}) {
|
|
445
|
+
const h = { ...Qn, ...m }, y = h.customI18n ?? an, { t: x } = y.global || y;
|
|
441
446
|
let k;
|
|
442
|
-
|
|
447
|
+
sn(h.storeColumnsLocalStorage) ? k = h.storeColumnsLocalStorage : rn(h.storeColumnsLocalStorage) && h.storeColumnsLocalStorage === !0 && (k = "table_" + u + "_" + a);
|
|
443
448
|
const p = t.map((S) => {
|
|
444
|
-
const
|
|
445
|
-
return fe(
|
|
446
|
-
}),
|
|
449
|
+
const v = { ...Yn, ...S };
|
|
450
|
+
return fe(v.title) && (fe(v.title) && on.includes(v.key) ? v.title = x("common.model.tracking." + v.key) : fe(v.title) && u && a ? v.title = x(u + "." + a + ".model." + v.key) : v.title = ""), v;
|
|
451
|
+
}), P = b(() => {
|
|
447
452
|
const S = [];
|
|
448
|
-
return h.showExpand && S.push({ key: "data-table-expand", sortable: !1 }), p.forEach((
|
|
449
|
-
C.value.includes(
|
|
453
|
+
return h.showExpand && S.push({ key: "data-table-expand", sortable: !1 }), p.forEach((v) => {
|
|
454
|
+
C.value.includes(v.key) || S.push(v);
|
|
450
455
|
}), h.disableActions || S.push({ key: "actions", sortable: !1, fixed: "end" }), S;
|
|
451
456
|
}), I = () => {
|
|
452
457
|
if (!k || !localStorage) return;
|
|
453
458
|
const S = localStorage.getItem(k);
|
|
454
459
|
if (!S) return;
|
|
455
|
-
const
|
|
456
|
-
|
|
460
|
+
const v = JSON.parse(S);
|
|
461
|
+
nn(v) && ln(v.hidden) && (C.value = v.hidden);
|
|
457
462
|
}, R = (S) => {
|
|
458
463
|
!k || !localStorage || localStorage.setItem(k, JSON.stringify({ hidden: S }));
|
|
459
464
|
};
|
|
@@ -463,18 +468,18 @@ function Yn(t, C, u, a, v = {}) {
|
|
|
463
468
|
R(S);
|
|
464
469
|
}), {
|
|
465
470
|
columnsAll: p,
|
|
466
|
-
columnsVisible:
|
|
471
|
+
columnsVisible: P,
|
|
467
472
|
columnsHidden: C
|
|
468
473
|
};
|
|
469
474
|
}
|
|
470
|
-
function
|
|
471
|
-
const
|
|
475
|
+
function Mi(t, C, u, a, m, h, y, x = null, k = void 0, p = !1) {
|
|
476
|
+
const P = _(!1), I = _([]), R = _([]), S = _(!1), { pagination: v, setSortBy: T, incrementPage: z } = Ha(
|
|
472
477
|
ht(x) ? null : x.key,
|
|
473
478
|
x?.order
|
|
474
|
-
), { resetFilter:
|
|
479
|
+
), { resetFilter: F, submitFilter: O } = dn(h, y, {
|
|
475
480
|
storeFiltersLocalStorage: !1,
|
|
476
481
|
populateUrlParams: !1
|
|
477
|
-
}), { showErrorsDefault: E } =
|
|
482
|
+
}), { showErrorsDefault: E } = Wa(), { columnsVisible: d, columnsAll: D, columnsHidden: w } = Zn(
|
|
478
483
|
t,
|
|
479
484
|
C,
|
|
480
485
|
u,
|
|
@@ -487,7 +492,7 @@ function Vi(t, C, u, a, v, h, y, x = null, k = void 0, p = !1) {
|
|
|
487
492
|
}, X = async () => {
|
|
488
493
|
S.value = !0, z();
|
|
489
494
|
try {
|
|
490
|
-
const ve = await v
|
|
495
|
+
const ve = await m(v, h, y, k);
|
|
491
496
|
I.value.push(...ve);
|
|
492
497
|
} catch (ve) {
|
|
493
498
|
E(ve);
|
|
@@ -496,11 +501,11 @@ function Vi(t, C, u, a, v, h, y, x = null, k = void 0, p = !1) {
|
|
|
496
501
|
}
|
|
497
502
|
}, ee = () => {
|
|
498
503
|
I.value = [], R.value = [];
|
|
499
|
-
},
|
|
504
|
+
}, H = async () => {
|
|
500
505
|
S.value = !0;
|
|
501
506
|
try {
|
|
502
|
-
I.value = await
|
|
503
|
-
|
|
507
|
+
I.value = await m(
|
|
508
|
+
v,
|
|
504
509
|
h,
|
|
505
510
|
y,
|
|
506
511
|
k
|
|
@@ -510,17 +515,17 @@ function Vi(t, C, u, a, v, h, y, x = null, k = void 0, p = !1) {
|
|
|
510
515
|
} finally {
|
|
511
516
|
S.value = !1;
|
|
512
517
|
}
|
|
513
|
-
}, Y =
|
|
514
|
-
await
|
|
518
|
+
}, Y = Rn(async () => {
|
|
519
|
+
await H();
|
|
515
520
|
});
|
|
516
521
|
return {
|
|
517
522
|
items: I,
|
|
518
523
|
selected: R,
|
|
519
|
-
pagination:
|
|
524
|
+
pagination: v,
|
|
520
525
|
columnsVisible: d,
|
|
521
526
|
columnsHidden: w,
|
|
522
527
|
columnsAll: D,
|
|
523
|
-
filterTouched:
|
|
528
|
+
filterTouched: P,
|
|
524
529
|
loading: S,
|
|
525
530
|
onRowClick: (ve) => {
|
|
526
531
|
const ae = ve.target;
|
|
@@ -537,14 +542,14 @@ function Vi(t, C, u, a, v, h, y, x = null, k = void 0, p = !1) {
|
|
|
537
542
|
onOpen: i,
|
|
538
543
|
sortByChange: G,
|
|
539
544
|
getList: Y,
|
|
540
|
-
resetFilter: () =>
|
|
541
|
-
submitFilter: () => O(
|
|
545
|
+
resetFilter: () => F(v, Y),
|
|
546
|
+
submitFilter: () => O(v, Y)
|
|
542
547
|
};
|
|
543
548
|
}
|
|
544
|
-
const
|
|
549
|
+
const _n = { class: "d-flex flex-column w-100 px-1 align-center" }, el = { class: "d-flex justify-space-between w-100 align-center" }, tl = { class: "d-flex align-center" }, al = { class: "d-flex align-center" }, ol = { class: "subject-select__sidebar system-border-r" }, nl = { class: "subject-select-filter" }, ll = { class: "subject-select__content" }, il = {
|
|
545
550
|
key: 0,
|
|
546
551
|
class: "d-flex w-100 align-center justify-center pa-4"
|
|
547
|
-
},
|
|
552
|
+
}, sl = { class: "subject-select__actions system-border-t" }, rl = { key: 0 }, dl = { key: 1 }, Ni = /* @__PURE__ */ ze({
|
|
548
553
|
__name: "ASubjectSelect",
|
|
549
554
|
props: {
|
|
550
555
|
selectedItems: {},
|
|
@@ -559,56 +564,56 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
559
564
|
},
|
|
560
565
|
emits: ["update:modelValue", "update:pagination", "onOpen", "onPageChange", "onConfirm", "onFetchNextPage"],
|
|
561
566
|
setup(t, { expose: C, emit: u }) {
|
|
562
|
-
const a = t,
|
|
567
|
+
const a = t, m = u, h = _(!1), y = b({
|
|
563
568
|
get() {
|
|
564
569
|
return fe(a.modelValue) ? h.value : a.modelValue;
|
|
565
570
|
},
|
|
566
571
|
set(i) {
|
|
567
|
-
h.value = i,
|
|
572
|
+
h.value = i, m("update:modelValue", i);
|
|
568
573
|
}
|
|
569
574
|
}), x = b({
|
|
570
575
|
get: () => a.pagination,
|
|
571
576
|
set: (i) => {
|
|
572
|
-
|
|
577
|
+
m("update:pagination", { ...wa(i) });
|
|
573
578
|
}
|
|
574
|
-
}), { mdAndDown: k } = co(), p = _(!k.value),
|
|
579
|
+
}), { mdAndDown: k } = co(), p = _(!k.value), P = () => {
|
|
575
580
|
k.value && (p.value = !1);
|
|
576
581
|
};
|
|
577
|
-
oa(
|
|
578
|
-
const { t: I } = je(), R = b(() => a.selectedItems.length), S = b(() => R.value < a.minCount || R.value > a.maxCount),
|
|
579
|
-
|
|
582
|
+
oa(cn, P);
|
|
583
|
+
const { t: I } = je(), R = b(() => a.selectedItems.length), S = b(() => R.value < a.minCount || R.value > a.maxCount), v = () => {
|
|
584
|
+
m("onOpen"), p.value = !k.value, y.value = !0;
|
|
580
585
|
}, T = () => {
|
|
581
586
|
p.value = !p.value;
|
|
582
587
|
}, z = () => {
|
|
583
588
|
y.value = !1;
|
|
584
|
-
},
|
|
585
|
-
|
|
589
|
+
}, F = () => {
|
|
590
|
+
m(
|
|
586
591
|
"onConfirm",
|
|
587
592
|
a.selectedItems.map((i) => wa(i))
|
|
588
593
|
), z();
|
|
589
594
|
}, O = () => {
|
|
590
|
-
|
|
595
|
+
m("onFetchNextPage");
|
|
591
596
|
}, E = () => {
|
|
592
|
-
|
|
597
|
+
m("onPageChange");
|
|
593
598
|
}, d = b(() => Math.ceil(x.value.totalCount / x.value.rowsPerPage)), D = b(() => !(ht(x.value.hasNextPage) && x.value.page === d.value || x.value.hasNextPage === !1)), w = (i) => {
|
|
594
599
|
i && D.value && !a.loading && O();
|
|
595
600
|
};
|
|
596
601
|
return la(() => {
|
|
597
|
-
a.autoOpen &&
|
|
602
|
+
a.autoOpen && v();
|
|
598
603
|
}), C({
|
|
599
|
-
open:
|
|
600
|
-
closeSidebarOnMobile:
|
|
604
|
+
open: v,
|
|
605
|
+
closeSidebarOnMobile: P
|
|
601
606
|
}), (i, G) => {
|
|
602
607
|
const X = Ca("ABtnSecondary"), ee = Ca("ABtnPrimary");
|
|
603
|
-
return g(),
|
|
608
|
+
return g(), B(ne, null, [
|
|
604
609
|
L(i.$slots, "activator", {
|
|
605
|
-
props: { onClick: J(() =>
|
|
610
|
+
props: { onClick: J(() => v(), ["stop"]) }
|
|
606
611
|
}),
|
|
607
612
|
s(sa, Q(i.$attrs, {
|
|
608
613
|
"model-value": y.value,
|
|
609
614
|
fullscreen: "",
|
|
610
615
|
class: "subject-select",
|
|
611
|
-
"onUpdate:modelValue": G[1] || (G[1] = (
|
|
616
|
+
"onUpdate:modelValue": G[1] || (G[1] = (H) => m("update:modelValue", H))
|
|
612
617
|
}), {
|
|
613
618
|
default: r(() => [
|
|
614
619
|
y.value ? (g(), U(ia, {
|
|
@@ -616,18 +621,18 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
616
621
|
class: "subject-select__card"
|
|
617
622
|
}, {
|
|
618
623
|
default: r(() => [
|
|
619
|
-
s(
|
|
624
|
+
s(un, {
|
|
620
625
|
class: "subject-select__toolbar system-border-b",
|
|
621
626
|
onOnCancel: z
|
|
622
627
|
}, {
|
|
623
628
|
default: r(() => [
|
|
624
629
|
L(i.$slots, "title", {}, () => [
|
|
625
|
-
N(
|
|
630
|
+
N($(c(I)(t.dialogTitleT)), 1)
|
|
626
631
|
])
|
|
627
632
|
]),
|
|
628
633
|
_: 3
|
|
629
634
|
}),
|
|
630
|
-
s(
|
|
635
|
+
s(Ln, {
|
|
631
636
|
density: "compact",
|
|
632
637
|
color: "transparent",
|
|
633
638
|
height: 46,
|
|
@@ -636,9 +641,9 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
636
641
|
}, {
|
|
637
642
|
default: r(() => [
|
|
638
643
|
L(i.$slots, "second-bar", {}, () => [
|
|
639
|
-
K("div",
|
|
640
|
-
K("div",
|
|
641
|
-
K("div",
|
|
644
|
+
K("div", _n, [
|
|
645
|
+
K("div", el, [
|
|
646
|
+
K("div", tl, [
|
|
642
647
|
s(q, {
|
|
643
648
|
icon: "",
|
|
644
649
|
width: 30,
|
|
@@ -646,7 +651,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
646
651
|
onClick: T
|
|
647
652
|
}, {
|
|
648
653
|
default: r(() => [
|
|
649
|
-
s(
|
|
654
|
+
s(W, {
|
|
650
655
|
icon: "mdi-tune",
|
|
651
656
|
size: 16
|
|
652
657
|
}),
|
|
@@ -655,7 +660,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
655
660
|
location: "bottom"
|
|
656
661
|
}, {
|
|
657
662
|
default: r(() => [
|
|
658
|
-
N(
|
|
663
|
+
N($(c(I)("common.subjectSelect.filter.toggle")), 1)
|
|
659
664
|
]),
|
|
660
665
|
_: 1
|
|
661
666
|
})
|
|
@@ -664,7 +669,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
664
669
|
}),
|
|
665
670
|
L(i.$slots, "second-bar-left")
|
|
666
671
|
]),
|
|
667
|
-
K("div",
|
|
672
|
+
K("div", al, [
|
|
668
673
|
L(i.$slots, "second-bar-right")
|
|
669
674
|
])
|
|
670
675
|
])
|
|
@@ -676,47 +681,47 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
676
681
|
K("div", {
|
|
677
682
|
class: we(["subject-select__main", { "subject-select__main--sidebar-active": p.value }])
|
|
678
683
|
}, [
|
|
679
|
-
K("div",
|
|
680
|
-
K("div",
|
|
684
|
+
K("div", ol, [
|
|
685
|
+
K("div", nl, [
|
|
681
686
|
L(i.$slots, "filter")
|
|
682
687
|
])
|
|
683
688
|
]),
|
|
684
|
-
K("div",
|
|
689
|
+
K("div", ll, [
|
|
685
690
|
L(i.$slots, "content"),
|
|
686
|
-
t.paginationMode === "more" ? (g(),
|
|
687
|
-
|
|
691
|
+
t.paginationMode === "more" ? (g(), B("div", il, [
|
|
692
|
+
Tn((g(), U(X, {
|
|
688
693
|
loading: t.loading,
|
|
689
694
|
size: "small",
|
|
690
695
|
onClick: O
|
|
691
696
|
}, {
|
|
692
697
|
default: r(() => [
|
|
693
698
|
L(i.$slots, "button-confirm-title", {}, () => [
|
|
694
|
-
N(
|
|
699
|
+
N($(c(I)("common.button.loadMore")), 1)
|
|
695
700
|
])
|
|
696
701
|
]),
|
|
697
702
|
_: 3
|
|
698
703
|
}, 8, ["loading"])), [
|
|
699
|
-
[
|
|
704
|
+
[Fn, D.value || t.loading],
|
|
700
705
|
[
|
|
701
|
-
|
|
706
|
+
Vn,
|
|
702
707
|
w,
|
|
703
708
|
void 0,
|
|
704
709
|
{ quiet: !0 }
|
|
705
710
|
]
|
|
706
711
|
])
|
|
707
|
-
])) : (g(), U(
|
|
712
|
+
])) : (g(), U(Jn, {
|
|
708
713
|
key: 1,
|
|
709
714
|
modelValue: x.value,
|
|
710
|
-
"onUpdate:modelValue": G[0] || (G[0] = (
|
|
715
|
+
"onUpdate:modelValue": G[0] || (G[0] = (H) => x.value = H),
|
|
711
716
|
onChange: E
|
|
712
717
|
}, null, 8, ["modelValue"]))
|
|
713
718
|
])
|
|
714
719
|
], 2),
|
|
715
|
-
K("div",
|
|
716
|
-
t.minCount === t.maxCount ? (g(),
|
|
720
|
+
K("div", sl, [
|
|
721
|
+
t.minCount === t.maxCount ? (g(), B("div", rl, $(c(I)("common.subjectSelect.texts.pickExactCount", {
|
|
717
722
|
count: t.minCount,
|
|
718
723
|
selected: R.value
|
|
719
|
-
})), 1)) : (g(),
|
|
724
|
+
})), 1)) : (g(), B("div", dl, $(c(I)("common.subjectSelect.texts.pickRangeCount", {
|
|
720
725
|
minCount: t.minCount,
|
|
721
726
|
maxCount: t.maxCount,
|
|
722
727
|
selected: R.value
|
|
@@ -724,11 +729,11 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
724
729
|
s(ra),
|
|
725
730
|
s(ee, {
|
|
726
731
|
disabled: S.value,
|
|
727
|
-
onClick: J(
|
|
732
|
+
onClick: J(F, ["stop"])
|
|
728
733
|
}, {
|
|
729
734
|
default: r(() => [
|
|
730
735
|
L(i.$slots, "button-confirm-title", {}, () => [
|
|
731
|
-
N(
|
|
736
|
+
N($(c(I)("common.button.confirm")), 1)
|
|
732
737
|
])
|
|
733
738
|
]),
|
|
734
739
|
_: 3
|
|
@@ -743,38 +748,38 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
743
748
|
], 64);
|
|
744
749
|
};
|
|
745
750
|
}
|
|
746
|
-
}),
|
|
751
|
+
}), cl = {
|
|
747
752
|
key: 0,
|
|
748
753
|
class: "a-le-header"
|
|
749
|
-
},
|
|
754
|
+
}, ul = {
|
|
750
755
|
key: 0,
|
|
751
756
|
class: "a-le-title-heading"
|
|
752
|
-
},
|
|
757
|
+
}, fl = ["data-unsaved-count"], ml = {
|
|
753
758
|
key: 1,
|
|
754
759
|
class: "a-le-state a-le-state--loading"
|
|
755
|
-
},
|
|
760
|
+
}, vl = {
|
|
756
761
|
key: 2,
|
|
757
762
|
class: "a-le-state a-le-state--error"
|
|
758
|
-
},
|
|
763
|
+
}, yl = {
|
|
759
764
|
key: 3,
|
|
760
765
|
class: "a-le-state a-le-state--empty"
|
|
761
|
-
},
|
|
766
|
+
}, hl = ["data-id", "tabindex", "onKeydown"], pl = ["onClick"], gl = { class: "a-le-row-main" }, bl = { class: "a-le-title" }, kl = {
|
|
762
767
|
key: 0,
|
|
763
768
|
class: "a-le-status"
|
|
764
|
-
},
|
|
769
|
+
}, wl = {
|
|
765
770
|
key: 0,
|
|
766
771
|
class: "a-le-status-badge"
|
|
767
|
-
},
|
|
772
|
+
}, Cl = { class: "a-le-actions" }, xl = { class: "a-le-row-body" }, Sl = { class: "a-le-form" }, Al = {
|
|
768
773
|
key: 0,
|
|
769
774
|
class: "a-le-row-footer"
|
|
770
|
-
},
|
|
775
|
+
}, El = {
|
|
771
776
|
key: 1,
|
|
772
777
|
class: "a-le-row-body"
|
|
773
|
-
},
|
|
778
|
+
}, Pl = { class: "a-le-form" }, $l = {
|
|
774
779
|
class: "a-le-sr-only",
|
|
775
780
|
"aria-live": "polite",
|
|
776
781
|
role: "status"
|
|
777
|
-
},
|
|
782
|
+
}, Oi = /* @__PURE__ */ ze({
|
|
778
783
|
__name: "AListEditor",
|
|
779
784
|
props: /* @__PURE__ */ Te({
|
|
780
785
|
factory: { type: Function, default: void 0 },
|
|
@@ -819,7 +824,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
819
824
|
}),
|
|
820
825
|
emits: /* @__PURE__ */ Te(["edit", "deleted", "close", "item-saved", "item-expand"], ["update:modelValue"]),
|
|
821
826
|
setup(t, { expose: C, emit: u }) {
|
|
822
|
-
const a = t,
|
|
827
|
+
const a = t, m = u, h = it(t, "modelValue"), { t: y } = je(), x = io(), k = co(), p = zt("rootEl"), P = b(() => k.platform.value.touch), I = {
|
|
823
828
|
get: () => h.value,
|
|
824
829
|
set: (o) => h.value = o,
|
|
825
830
|
factory: a.factory,
|
|
@@ -827,8 +832,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
827
832
|
position: a.position,
|
|
828
833
|
dirtyExclude: () => a.dirtyExclude ?? [],
|
|
829
834
|
validate: a.validate
|
|
830
|
-
}, R = a.editor ? null :
|
|
831
|
-
() => typeof
|
|
835
|
+
}, R = a.editor ? null : fn(a.stateKey, I), S = a.editor ?? R?.handle ?? mn(I), v = a.getKey ?? "id", T = Ja(R?.childScope ?? null), z = (o) => typeof v == "function" ? v(o) : o[v], F = b(
|
|
836
|
+
() => typeof v == "function" ? "(fn)" : v
|
|
832
837
|
), O = b(() => {
|
|
833
838
|
const o = a.position;
|
|
834
839
|
return o === void 0 || o === !1 ? "position" : typeof o == "object" ? o.field : o;
|
|
@@ -852,9 +857,9 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
852
857
|
if (oe === 0 && f.size === 0) return;
|
|
853
858
|
const Re = `${oe}|${[...f].sort().join(",")}`;
|
|
854
859
|
d.has(Re) || (d.add(Re), oe > 0 && console.warn(
|
|
855
|
-
`[list-editor] ${oe} row(s) resolve to an undefined key (key-field "${
|
|
860
|
+
`[list-editor] ${oe} row(s) resolve to an undefined key (key-field "${F.value}"). Point get-key at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`
|
|
856
861
|
), f.size > 0 && console.warn(
|
|
857
|
-
`[list-editor] duplicate row keys (key-field "${
|
|
862
|
+
`[list-editor] duplicate row keys (key-field "${F.value}"): ${[...f].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`
|
|
858
863
|
));
|
|
859
864
|
};
|
|
860
865
|
ue(E, (o) => D(o), { immediate: !0 }), ue(
|
|
@@ -864,7 +869,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
864
869
|
);
|
|
865
870
|
const w = _(/* @__PURE__ */ new Set()), i = zt("rowsContainer"), G = b(() => !a.chips && !!x.item), X = b(() => !a.chips && !!x["item-readonly"]), {
|
|
866
871
|
editingKeys: ee,
|
|
867
|
-
editingSnapshots:
|
|
872
|
+
editingSnapshots: H,
|
|
868
873
|
beginEdit: Y,
|
|
869
874
|
cancelEdit: me,
|
|
870
875
|
commitEdit: ve,
|
|
@@ -891,12 +896,12 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
891
896
|
() => a.deleteConfirmText ?? (a.deleteMode === "immediate" ? y("common.sortable.deleteConfirmText") : y("common.sortable.deleteConfirmTextDeferred"))
|
|
892
897
|
), le = b(() => !a.readonly && !a.disabled && !a.loading), Me = b(() => le.value && a.showAddButton), _e = S.unsavedCount, kt = b(
|
|
893
898
|
() => !a.readonly && !a.disableUnsaved && _e.value > 0
|
|
894
|
-
), Ot = b(() => !!(a.title || x.header) || kt.value), Ne = b(() => !!a.onItemSave), Ge = /* @__PURE__ */ new Map(),
|
|
899
|
+
), Ot = b(() => !!(a.title || x.header) || kt.value), Ne = b(() => !!a.onItemSave), Ge = /* @__PURE__ */ new Map(), Fe = b(() => {
|
|
895
900
|
const o = [], V = /* @__PURE__ */ new Set();
|
|
896
901
|
for (const f of E.value) {
|
|
897
902
|
V.add(f.key);
|
|
898
|
-
const oe = ee.value.has(f.key), Re = w.value.has(f.key), Ce = a.loadingKeys?.has(f.key) ?? !1, Ke = a.disableUnsaved || a.readonly ? !1 : S.isUnsaved(f.key),
|
|
899
|
-
if (de && de.raw === f.raw && de.index === f.index && de.position === f.position && de.editing === oe && de.expanded === Re && de.loading === Ce && de.dirty ===
|
|
903
|
+
const oe = ee.value.has(f.key), Re = w.value.has(f.key), Ce = a.loadingKeys?.has(f.key) ?? !1, Ke = a.disableUnsaved || a.readonly ? !1 : S.isUnsaved(f.key), pe = Ke, At = S.rowState(f.raw, f.key, oe), de = Ge.get(f.key);
|
|
904
|
+
if (de && de.raw === f.raw && de.index === f.index && de.position === f.position && de.editing === oe && de.expanded === Re && de.loading === Ce && de.dirty === pe && de.unsaved === Ke && de.validationState === At) {
|
|
900
905
|
o.push(de);
|
|
901
906
|
continue;
|
|
902
907
|
}
|
|
@@ -905,7 +910,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
905
910
|
editing: oe,
|
|
906
911
|
expanded: Re,
|
|
907
912
|
loading: Ce,
|
|
908
|
-
dirty:
|
|
913
|
+
dirty: pe,
|
|
909
914
|
unsaved: Ke,
|
|
910
915
|
validationState: At
|
|
911
916
|
};
|
|
@@ -914,8 +919,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
914
919
|
for (const f of Ge.keys())
|
|
915
920
|
V.has(f) || Ge.delete(f);
|
|
916
921
|
return o;
|
|
917
|
-
}), st = b(() =>
|
|
918
|
-
viewItems: b(() =>
|
|
922
|
+
}), st = b(() => Fe.value.length === 0), Ae = (o) => Fe.value.find((V) => V.key === o), He = Ya({
|
|
923
|
+
viewItems: b(() => Fe.value.map((o) => ({ key: o.key }))),
|
|
919
924
|
variant: "flat",
|
|
920
925
|
isReorderMode: _(!1),
|
|
921
926
|
disabled: b(() => !le.value),
|
|
@@ -928,9 +933,9 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
928
933
|
const V = Ae(o);
|
|
929
934
|
V && tt(V);
|
|
930
935
|
}
|
|
931
|
-
}), Ut = (o) => oo(o, { compactField: a.compactField }),
|
|
936
|
+
}), Ut = (o) => oo(o, { compactField: a.compactField }), Be = () => {
|
|
932
937
|
Me.value && (be(), S.addItem(void 0, void 0));
|
|
933
|
-
},
|
|
938
|
+
}, We = (o) => {
|
|
934
939
|
le.value && (be(), S.addItem(void 0, { afterId: o.key }));
|
|
935
940
|
}, Je = (o) => {
|
|
936
941
|
if (le.value) {
|
|
@@ -938,7 +943,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
938
943
|
tt(o);
|
|
939
944
|
return;
|
|
940
945
|
}
|
|
941
|
-
G.value && (Y(o), w.value.delete(o.key)),
|
|
946
|
+
G.value && (Y(o), w.value.delete(o.key)), m("edit", o);
|
|
942
947
|
}
|
|
943
948
|
}, rt = (o) => {
|
|
944
949
|
if (a.disabled || a.loading) return;
|
|
@@ -949,7 +954,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
949
954
|
for (const oe of w.value) w.value.delete(oe);
|
|
950
955
|
w.value.add(V);
|
|
951
956
|
}
|
|
952
|
-
|
|
957
|
+
m("item-expand", o, !f);
|
|
953
958
|
}, wt = (o) => a.chips || a.disableRowClick || a.defaultExpanded || a.disabled || a.loading ? !1 : !!(o.editing || o.expanded || !a.readonly && a.showEditButton), he = (o) => {
|
|
954
959
|
if (wt(o)) {
|
|
955
960
|
if (o.editing || o.expanded) {
|
|
@@ -969,17 +974,17 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
969
974
|
onDeleteConfirm: (o) => a.onDeleteConfirm ? a.onDeleteConfirm(o) : !0,
|
|
970
975
|
onDelete: (o) => a.onDelete?.(o),
|
|
971
976
|
onDeleted: (o) => {
|
|
972
|
-
ee.value.delete(o.key),
|
|
977
|
+
ee.value.delete(o.key), H.value.delete(o.key), w.value.delete(o.key), S.deleteItem(o.key, { trackDeleted: a.deleteMode === "deferred" }), m("deleted", o);
|
|
973
978
|
},
|
|
974
979
|
disableDeleteConfirm: () => a.disableDeleteConfirm || a.chips
|
|
975
980
|
}), ke = async (o) => {
|
|
976
981
|
le.value && await Ct(o);
|
|
977
982
|
}, ut = async (o) => {
|
|
978
|
-
a.onItemSave && await a.onItemSave(o.raw), ve(o),
|
|
983
|
+
a.onItemSave && await a.onItemSave(o.raw), ve(o), m("item-saved", o);
|
|
979
984
|
}, xt = (o) => {
|
|
980
985
|
me(o);
|
|
981
986
|
}, tt = (o) => {
|
|
982
|
-
ae(o), w.value.delete(o.key),
|
|
987
|
+
ae(o), w.value.delete(o.key), m("close", o);
|
|
983
988
|
}, Ye = /* @__PURE__ */ new Map(), St = (o) => {
|
|
984
989
|
let V = Ye.get(o);
|
|
985
990
|
return V || (V = {
|
|
@@ -1005,7 +1010,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1005
1010
|
},
|
|
1006
1011
|
addAfter: () => {
|
|
1007
1012
|
const f = Ae(o);
|
|
1008
|
-
f &&
|
|
1013
|
+
f && We(f);
|
|
1009
1014
|
},
|
|
1010
1015
|
toggleExpand: () => {
|
|
1011
1016
|
const f = Ae(o);
|
|
@@ -1015,7 +1020,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1015
1020
|
}, Ye.set(o, V)), V;
|
|
1016
1021
|
};
|
|
1017
1022
|
ue(
|
|
1018
|
-
() =>
|
|
1023
|
+
() => Fe.value,
|
|
1019
1024
|
(o) => {
|
|
1020
1025
|
if (Ye.size === 0) return;
|
|
1021
1026
|
const V = new Set(o.map((f) => f.key));
|
|
@@ -1034,7 +1039,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1034
1039
|
editing: o.editing || a.defaultExpanded,
|
|
1035
1040
|
dirty: o.dirty,
|
|
1036
1041
|
unsaved: o.unsaved,
|
|
1037
|
-
touch:
|
|
1042
|
+
touch: P.value,
|
|
1038
1043
|
stateKeyPrefix: T.prefixFor(o.key),
|
|
1039
1044
|
actions: St(o.key)
|
|
1040
1045
|
});
|
|
@@ -1053,7 +1058,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1053
1058
|
}), C({
|
|
1054
1059
|
...S,
|
|
1055
1060
|
validateAll: $e
|
|
1056
|
-
}), (o, V) => (g(),
|
|
1061
|
+
}), (o, V) => (g(), B("div", {
|
|
1057
1062
|
ref_key: "rootEl",
|
|
1058
1063
|
ref: p,
|
|
1059
1064
|
class: we(["a-list-editor", [
|
|
@@ -1061,7 +1066,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1061
1066
|
{
|
|
1062
1067
|
"a-list-editor--readonly": t.readonly,
|
|
1063
1068
|
"a-list-editor--disabled": t.disabled,
|
|
1064
|
-
"a-list-editor--touch":
|
|
1069
|
+
"a-list-editor--touch": P.value,
|
|
1065
1070
|
"a-list-editor--chips": t.chips
|
|
1066
1071
|
}
|
|
1067
1072
|
]])
|
|
@@ -1071,23 +1076,23 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1071
1076
|
ref: i,
|
|
1072
1077
|
class: "a-le-card"
|
|
1073
1078
|
}, [
|
|
1074
|
-
Ot.value ? (g(),
|
|
1079
|
+
Ot.value ? (g(), B("div", cl, [
|
|
1075
1080
|
L(o.$slots, "header", { title: t.title }, () => [
|
|
1076
|
-
t.title ? (g(),
|
|
1081
|
+
t.title ? (g(), B("h3", ul, $(t.title), 1)) : M("", !0)
|
|
1077
1082
|
]),
|
|
1078
|
-
kt.value ? (g(),
|
|
1083
|
+
kt.value ? (g(), B("span", {
|
|
1079
1084
|
key: 0,
|
|
1080
1085
|
class: "a-le-unsaved-count",
|
|
1081
1086
|
"data-unsaved-count": c(_e)
|
|
1082
|
-
},
|
|
1087
|
+
}, $(c(y)("common.sortable.pendingChanges", { count: c(_e) })), 9, fl)) : M("", !0)
|
|
1083
1088
|
])) : M("", !0),
|
|
1084
|
-
t.loading ? (g(),
|
|
1089
|
+
t.loading ? (g(), B("div", ml, [
|
|
1085
1090
|
s(mo, {
|
|
1086
1091
|
indeterminate: "",
|
|
1087
1092
|
color: "primary",
|
|
1088
1093
|
size: "32"
|
|
1089
1094
|
})
|
|
1090
|
-
])) : t.error ? (g(),
|
|
1095
|
+
])) : t.error ? (g(), B("div", vl, [
|
|
1091
1096
|
s(da, {
|
|
1092
1097
|
type: "error",
|
|
1093
1098
|
variant: "tonal",
|
|
@@ -1095,24 +1100,24 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1095
1100
|
border: "start"
|
|
1096
1101
|
}, {
|
|
1097
1102
|
default: r(() => [
|
|
1098
|
-
N(
|
|
1103
|
+
N($(t.error), 1)
|
|
1099
1104
|
]),
|
|
1100
1105
|
_: 1
|
|
1101
1106
|
})
|
|
1102
|
-
])) : st.value ? (g(),
|
|
1107
|
+
])) : st.value ? (g(), B("div", yl, [
|
|
1103
1108
|
L(o.$slots, "empty", {
|
|
1104
1109
|
readonly: t.readonly,
|
|
1105
1110
|
disabled: t.disabled,
|
|
1106
|
-
actions: { add:
|
|
1111
|
+
actions: { add: Be }
|
|
1107
1112
|
}, () => [
|
|
1108
1113
|
s(eo, {
|
|
1109
1114
|
title: qe.value,
|
|
1110
1115
|
"add-label": ie.value,
|
|
1111
1116
|
"can-add": Me.value,
|
|
1112
|
-
onAdd:
|
|
1117
|
+
onAdd: Be
|
|
1113
1118
|
}, null, 8, ["title", "add-label", "can-add"])
|
|
1114
1119
|
])
|
|
1115
|
-
])) : (g(!0),
|
|
1120
|
+
])) : (g(!0), B(ne, { key: 4 }, Ze(Fe.value, (f) => (g(), B("div", {
|
|
1116
1121
|
key: String(f.key),
|
|
1117
1122
|
class: "a-le-row-wrapper"
|
|
1118
1123
|
}, [
|
|
@@ -1120,7 +1125,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1120
1125
|
K("div", {
|
|
1121
1126
|
"data-id": String(f.key),
|
|
1122
1127
|
role: "listitem",
|
|
1123
|
-
tabindex: c(
|
|
1128
|
+
tabindex: c(He).rowTabindex(f.key),
|
|
1124
1129
|
class: we(["a-le-row", {
|
|
1125
1130
|
"a-le-row--two-rows": t.twoRows === "always",
|
|
1126
1131
|
"a-le-row--editing": f.editing,
|
|
@@ -1129,27 +1134,27 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1129
1134
|
"a-le-row--clickable": wt(f),
|
|
1130
1135
|
[`a-le-row--validation-${f.validationState}`]: f.validationState !== null
|
|
1131
1136
|
}]),
|
|
1132
|
-
onKeydown: (oe) => c(
|
|
1137
|
+
onKeydown: (oe) => c(He).handleKeydown(f.key, oe)
|
|
1133
1138
|
}, [
|
|
1134
1139
|
K("div", {
|
|
1135
1140
|
class: "a-le-row-header",
|
|
1136
1141
|
onClick: (oe) => he(f)
|
|
1137
1142
|
}, [
|
|
1138
|
-
K("div",
|
|
1143
|
+
K("div", gl, [
|
|
1139
1144
|
L(o.$slots, "item-compact", Q({ ref_for: !0 }, Ee(f)), () => [
|
|
1140
|
-
K("span",
|
|
1145
|
+
K("span", bl, $(Ut(f.raw)), 1)
|
|
1141
1146
|
]),
|
|
1142
1147
|
f.unsaved ? (g(), U(to, {
|
|
1143
1148
|
key: 0,
|
|
1144
1149
|
"dot-only": t.chips
|
|
1145
1150
|
}, null, 8, ["dot-only"])) : M("", !0)
|
|
1146
1151
|
]),
|
|
1147
|
-
t.chips ? M("", !0) : (g(),
|
|
1152
|
+
t.chips ? M("", !0) : (g(), B("div", kl, [
|
|
1148
1153
|
L(o.$slots, "item-status", Q({ ref_for: !0 }, Ee(f)), () => [
|
|
1149
|
-
t.statusField && f.raw[t.statusField] != null && f.raw[t.statusField] !== "" ? (g(),
|
|
1154
|
+
t.statusField && f.raw[t.statusField] != null && f.raw[t.statusField] !== "" ? (g(), B("span", wl, $(f.raw[t.statusField]), 1)) : M("", !0)
|
|
1150
1155
|
])
|
|
1151
1156
|
])),
|
|
1152
|
-
K("div",
|
|
1157
|
+
K("div", Cl, [
|
|
1153
1158
|
L(o.$slots, "item-actions", Q({ ref_for: !0 }, Ee(f)), () => [
|
|
1154
1159
|
t.chips && t.showDeleteButton && le.value ? (g(), U(q, {
|
|
1155
1160
|
key: 0,
|
|
@@ -1162,13 +1167,13 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1162
1167
|
onClick: J((oe) => ke(f), ["stop"])
|
|
1163
1168
|
}, {
|
|
1164
1169
|
default: r(() => [
|
|
1165
|
-
s(
|
|
1170
|
+
s(W, {
|
|
1166
1171
|
icon: "mdi-close",
|
|
1167
1172
|
size: "14"
|
|
1168
1173
|
})
|
|
1169
1174
|
]),
|
|
1170
1175
|
_: 1
|
|
1171
|
-
}, 8, ["onClick"])) : (g(),
|
|
1176
|
+
}, 8, ["onClick"])) : (g(), B(ne, { key: 1 }, [
|
|
1172
1177
|
t.showEditButton && le.value && !t.defaultExpanded ? (g(), U(q, {
|
|
1173
1178
|
key: 0,
|
|
1174
1179
|
icon: "",
|
|
@@ -1180,7 +1185,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1180
1185
|
onClick: J((oe) => Je(f), ["stop"])
|
|
1181
1186
|
}, {
|
|
1182
1187
|
default: r(() => [
|
|
1183
|
-
s(
|
|
1188
|
+
s(W, {
|
|
1184
1189
|
icon: "mdi-pencil-outline",
|
|
1185
1190
|
size: "18"
|
|
1186
1191
|
}),
|
|
@@ -1202,7 +1207,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1202
1207
|
onClick: J((oe) => ke(f), ["stop"])
|
|
1203
1208
|
}, {
|
|
1204
1209
|
default: r(() => [
|
|
1205
|
-
s(
|
|
1210
|
+
s(W, {
|
|
1206
1211
|
icon: "mdi-trash-can-outline",
|
|
1207
1212
|
size: "18"
|
|
1208
1213
|
}),
|
|
@@ -1224,7 +1229,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1224
1229
|
class: "mx-1 a-le-action a-le-action--menu"
|
|
1225
1230
|
}, {
|
|
1226
1231
|
default: r(() => [
|
|
1227
|
-
s(
|
|
1232
|
+
s(W, {
|
|
1228
1233
|
icon: "mdi-dots-vertical",
|
|
1229
1234
|
size: "18"
|
|
1230
1235
|
}),
|
|
@@ -1235,18 +1240,18 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1235
1240
|
}, null, 8, ["text"]),
|
|
1236
1241
|
s(Mt, { activator: "parent" }, {
|
|
1237
1242
|
default: r(() => [
|
|
1238
|
-
s(
|
|
1243
|
+
s(gt, { density: "compact" }, {
|
|
1239
1244
|
default: r(() => [
|
|
1240
1245
|
s(xe, {
|
|
1241
|
-
onClick: (oe) =>
|
|
1246
|
+
onClick: (oe) => We(f)
|
|
1242
1247
|
}, {
|
|
1243
1248
|
prepend: r(() => [
|
|
1244
|
-
s(
|
|
1249
|
+
s(W, { icon: "mdi-plus" })
|
|
1245
1250
|
]),
|
|
1246
1251
|
default: r(() => [
|
|
1247
1252
|
s(Pe, null, {
|
|
1248
1253
|
default: r(() => [
|
|
1249
|
-
N(
|
|
1254
|
+
N($(c(y)("common.sortable.addAfter")), 1)
|
|
1250
1255
|
]),
|
|
1251
1256
|
_: 1
|
|
1252
1257
|
})
|
|
@@ -1265,15 +1270,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1265
1270
|
], 64))
|
|
1266
1271
|
])
|
|
1267
1272
|
])
|
|
1268
|
-
], 8,
|
|
1269
|
-
(f.editing || t.defaultExpanded) && o.$slots.item ? (g(),
|
|
1270
|
-
K("div",
|
|
1271
|
-
K("div",
|
|
1273
|
+
], 8, pl),
|
|
1274
|
+
(f.editing || t.defaultExpanded) && o.$slots.item ? (g(), B(ne, { key: 0 }, [
|
|
1275
|
+
K("div", xl, [
|
|
1276
|
+
K("div", Sl, [
|
|
1272
1277
|
L(o.$slots, "item", Q({ ref_for: !0 }, Ee(f)))
|
|
1273
1278
|
])
|
|
1274
1279
|
]),
|
|
1275
1280
|
L(o.$slots, "item-footer", Q({ ref_for: !0 }, Ee(f)), () => [
|
|
1276
|
-
Ne.value && !t.defaultExpanded ? (g(),
|
|
1281
|
+
Ne.value && !t.defaultExpanded ? (g(), B("div", Al, [
|
|
1277
1282
|
V[1] || (V[1] = K("div", { class: "a-le-row-footer-spacer" }, null, -1)),
|
|
1278
1283
|
s(q, {
|
|
1279
1284
|
variant: "text",
|
|
@@ -1281,7 +1286,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1281
1286
|
onClick: J((oe) => xt(f), ["stop"])
|
|
1282
1287
|
}, {
|
|
1283
1288
|
default: r(() => [
|
|
1284
|
-
N(
|
|
1289
|
+
N($(c(y)("common.button.cancel")), 1)
|
|
1285
1290
|
]),
|
|
1286
1291
|
_: 1
|
|
1287
1292
|
}, 8, ["disabled", "onClick"]),
|
|
@@ -1293,36 +1298,36 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1293
1298
|
onClick: J((oe) => ut(f), ["stop"])
|
|
1294
1299
|
}, {
|
|
1295
1300
|
default: r(() => [
|
|
1296
|
-
N(
|
|
1301
|
+
N($(c(y)("common.button.save")), 1)
|
|
1297
1302
|
]),
|
|
1298
1303
|
_: 1
|
|
1299
1304
|
}, 8, ["disabled", "onClick"])
|
|
1300
1305
|
])) : M("", !0)
|
|
1301
1306
|
])
|
|
1302
|
-
], 64)) : o.$slots["item-readonly"] && (t.readonly || f.expanded) ? (g(),
|
|
1303
|
-
K("div",
|
|
1307
|
+
], 64)) : o.$slots["item-readonly"] && (t.readonly || f.expanded) ? (g(), B("div", El, [
|
|
1308
|
+
K("div", Pl, [
|
|
1304
1309
|
L(o.$slots, "item-readonly", Q({ ref_for: !0 }, Ee(f)))
|
|
1305
1310
|
])
|
|
1306
1311
|
])) : M("", !0)
|
|
1307
|
-
], 42,
|
|
1312
|
+
], 42, hl),
|
|
1308
1313
|
L(o.$slots, "after-item", Q({ ref_for: !0 }, Ee(f)))
|
|
1309
1314
|
]))), 128)),
|
|
1310
1315
|
Me.value && !t.loading && !t.error && !st.value ? L(o.$slots, "add-button", {
|
|
1311
1316
|
readonly: t.readonly,
|
|
1312
1317
|
disabled: t.disabled,
|
|
1313
|
-
props: { onClick:
|
|
1314
|
-
actions: { add:
|
|
1318
|
+
props: { onClick: Be },
|
|
1319
|
+
actions: { add: Be }
|
|
1315
1320
|
}, () => [
|
|
1316
1321
|
K("button", {
|
|
1317
1322
|
type: "button",
|
|
1318
1323
|
class: "a-le-row-add",
|
|
1319
|
-
onClick:
|
|
1324
|
+
onClick: Be
|
|
1320
1325
|
}, [
|
|
1321
|
-
s(
|
|
1326
|
+
s(W, {
|
|
1322
1327
|
icon: "mdi-plus",
|
|
1323
1328
|
size: "18"
|
|
1324
1329
|
}),
|
|
1325
|
-
K("span", null,
|
|
1330
|
+
K("span", null, $(ie.value), 1)
|
|
1326
1331
|
])
|
|
1327
1332
|
], void 0, 5) : M("", !0)
|
|
1328
1333
|
], 512),
|
|
@@ -1338,9 +1343,9 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1338
1343
|
onConfirm: c(et),
|
|
1339
1344
|
onCancel: c(ct)
|
|
1340
1345
|
}, null, 8, ["modelValue", "title", "text", "confirm-label", "cancel-label", "error", "in-flight", "onConfirm", "onCancel"]),
|
|
1341
|
-
K("div",
|
|
1342
|
-
n: c(
|
|
1343
|
-
total: c(
|
|
1346
|
+
K("div", $l, $(c(He).grabbedKey.value !== null ? c(y)("common.sortable.keyboardGrab.status", {
|
|
1347
|
+
n: c(He).grabbedIndex.value + 1,
|
|
1348
|
+
total: c(He).totalCount.value
|
|
1344
1349
|
}) : ""), 1)
|
|
1345
1350
|
], 2));
|
|
1346
1351
|
}
|
|
@@ -1351,25 +1356,25 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1351
1356
|
a = Nt(t, a.parentKey);
|
|
1352
1357
|
}
|
|
1353
1358
|
return !1;
|
|
1354
|
-
},
|
|
1359
|
+
}, Dl = (t, C, u) => {
|
|
1355
1360
|
let a = Nt(t, C);
|
|
1356
1361
|
for (; a && a.depth > u; ) {
|
|
1357
1362
|
if (a.parentKey === null) return null;
|
|
1358
1363
|
a = Nt(t, a.parentKey);
|
|
1359
1364
|
}
|
|
1360
1365
|
return a && a.depth === u ? a : null;
|
|
1361
|
-
},
|
|
1362
|
-
for (let
|
|
1363
|
-
const h = t[
|
|
1364
|
-
if (
|
|
1366
|
+
}, Il = (t, C, u) => u === C || vo(t, C, u), Bt = (t, C, u, a) => {
|
|
1367
|
+
for (let m = C; m >= 0 && m < t.length; m += u) {
|
|
1368
|
+
const h = t[m];
|
|
1369
|
+
if (!Il(t, a, h.key)) return h;
|
|
1365
1370
|
}
|
|
1366
1371
|
return null;
|
|
1367
|
-
},
|
|
1372
|
+
}, Tl = (t) => {
|
|
1368
1373
|
const {
|
|
1369
1374
|
pointer: C,
|
|
1370
1375
|
hoveredRow: u,
|
|
1371
1376
|
sourceKey: a,
|
|
1372
|
-
sourceSubtreeDepth:
|
|
1377
|
+
sourceSubtreeDepth: m,
|
|
1373
1378
|
viewItems: h,
|
|
1374
1379
|
maxDepth: y,
|
|
1375
1380
|
indentPx: x,
|
|
@@ -1377,7 +1382,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1377
1382
|
containerPaddingLeft: p
|
|
1378
1383
|
} = t;
|
|
1379
1384
|
if (u.key === a || vo(h, a, u.key)) return null;
|
|
1380
|
-
const
|
|
1385
|
+
const P = C.y - u.rect.top, I = u.rect.height, R = P < I / 2, S = R ? "top" : "bottom", v = h.findIndex((i) => i.key === u.key), T = R ? Bt(h, v - 1, -1, a) : Bt(h, v, -1, a), z = R ? Bt(h, v, 1, a) : Bt(h, v + 1, 1, a), F = C.x - k - p, O = Math.round(F / x), E = T ? T.depth + 1 : 0, d = z ? z.depth : 0, D = Math.max(d, Math.min(O, E));
|
|
1381
1386
|
let w;
|
|
1382
1387
|
if (!T)
|
|
1383
1388
|
w = {
|
|
@@ -1413,7 +1418,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1413
1418
|
levelRowKey: T.key
|
|
1414
1419
|
};
|
|
1415
1420
|
else {
|
|
1416
|
-
const i =
|
|
1421
|
+
const i = Dl(h, T.key, D);
|
|
1417
1422
|
i ? w = {
|
|
1418
1423
|
type: "insert",
|
|
1419
1424
|
refKey: u.key,
|
|
@@ -1434,28 +1439,28 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1434
1439
|
levelRowKey: T.key
|
|
1435
1440
|
};
|
|
1436
1441
|
}
|
|
1437
|
-
return w.depth +
|
|
1438
|
-
},
|
|
1442
|
+
return w.depth + m - 1 >= y ? { type: "blocked", desired: w, reason: "maxDepth" } : w;
|
|
1443
|
+
}, Fl = ["data-id", "aria-level", "tabindex"], Bl = ["aria-label"], Rl = {
|
|
1439
1444
|
key: 2,
|
|
1440
1445
|
class: "a-nested-list-editor__tree-toggle a-nested-list-editor__tree-toggle--spacer",
|
|
1441
1446
|
"aria-hidden": "true"
|
|
1442
|
-
},
|
|
1447
|
+
}, Kl = { class: "a-le-row-main" }, Ll = { class: "a-le-title" }, Vl = {
|
|
1443
1448
|
key: 0,
|
|
1444
1449
|
class: "a-nested-list-editor__drag-count",
|
|
1445
1450
|
"aria-hidden": "true"
|
|
1446
|
-
},
|
|
1451
|
+
}, zl = {
|
|
1447
1452
|
key: 3,
|
|
1448
1453
|
class: "a-le-status"
|
|
1449
|
-
},
|
|
1454
|
+
}, Ml = {
|
|
1450
1455
|
key: 0,
|
|
1451
1456
|
class: "a-le-status-badge"
|
|
1452
|
-
},
|
|
1457
|
+
}, Nl = { class: "a-le-actions" }, Ol = { class: "a-le-row-body" }, Ul = { class: "a-le-form" }, jl = {
|
|
1453
1458
|
key: 0,
|
|
1454
1459
|
class: "a-le-row-footer"
|
|
1455
|
-
},
|
|
1460
|
+
}, ql = {
|
|
1456
1461
|
key: 1,
|
|
1457
1462
|
class: "a-le-row-body"
|
|
1458
|
-
},
|
|
1463
|
+
}, Gl = { class: "a-le-form" }, Hl = ["data-parent-id"], Wl = "a-nested-list-editor__group", Jl = "a-le-drag-handle", yo = /* @__PURE__ */ ze({
|
|
1459
1464
|
__name: "LeNestedRow",
|
|
1460
1465
|
props: {
|
|
1461
1466
|
vi: {},
|
|
@@ -1465,13 +1470,13 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1465
1470
|
callbacks: {}
|
|
1466
1471
|
},
|
|
1467
1472
|
setup(t) {
|
|
1468
|
-
const C = t, u = yo, { t: a } = je(),
|
|
1473
|
+
const C = t, u = yo, { t: a } = je(), m = (k) => `--row-${String(k).replace(/\W/g, "_")}`, h = (k) => {
|
|
1469
1474
|
if (typeof C.context.resolveValidation == "function")
|
|
1470
1475
|
return C.context.resolveValidation(k, C.vi.key, C.vi.index);
|
|
1471
1476
|
const p = k.validationState;
|
|
1472
1477
|
return p === "valid" || p === "invalid" || p === "warning" ? p : null;
|
|
1473
1478
|
}, y = () => C.context.buildSlotProps(C.vi), x = () => C.viewItems.filter((k) => k.parentKey === C.vi.key);
|
|
1474
|
-
return (k, p) => (g(),
|
|
1479
|
+
return (k, p) => (g(), B("div", {
|
|
1475
1480
|
class: we([
|
|
1476
1481
|
"a-le-row-wrapper",
|
|
1477
1482
|
{
|
|
@@ -1482,7 +1487,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1482
1487
|
role: "treeitem",
|
|
1483
1488
|
"aria-level": t.vi.depth + 1,
|
|
1484
1489
|
tabindex: t.context.keyboardNav ? t.context.keyboardNav.rowTabindex(t.vi.key) : void 0,
|
|
1485
|
-
onKeydown: p[17] || (p[17] = (
|
|
1490
|
+
onKeydown: p[17] || (p[17] = (P) => t.context.keyboardNav ? t.context.keyboardNav.handleKeydown(t.vi.key, P) : void 0)
|
|
1486
1491
|
}, [
|
|
1487
1492
|
L(k.$slots, "before-item", De(Ie(y()))),
|
|
1488
1493
|
K("div", {
|
|
@@ -1500,21 +1505,21 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1500
1505
|
[`a-le-row--validation-${h(t.vi.raw)}`]: h(t.vi.raw) !== null
|
|
1501
1506
|
}
|
|
1502
1507
|
]),
|
|
1503
|
-
style:
|
|
1508
|
+
style: pt({
|
|
1504
1509
|
"--nested-depth": t.vi.depth,
|
|
1505
|
-
"anchor-name":
|
|
1506
|
-
"--parent-anchor": t.vi.parentKey !== null ?
|
|
1510
|
+
"anchor-name": m(t.vi.key),
|
|
1511
|
+
"--parent-anchor": t.vi.parentKey !== null ? m(t.vi.parentKey) : "none"
|
|
1507
1512
|
})
|
|
1508
1513
|
}, [
|
|
1509
1514
|
K("div", {
|
|
1510
1515
|
class: "a-le-row-header",
|
|
1511
|
-
onClick: p[14] || (p[14] = (
|
|
1516
|
+
onClick: p[14] || (p[14] = (P) => t.callbacks.onRowClick(t.vi))
|
|
1512
1517
|
}, [
|
|
1513
|
-
t.context.dragEnabled ? (g(), U(
|
|
1518
|
+
t.context.dragEnabled ? (g(), U(vn, {
|
|
1514
1519
|
key: 0,
|
|
1515
|
-
class: we(
|
|
1520
|
+
class: we(Jl)
|
|
1516
1521
|
})) : M("", !0),
|
|
1517
|
-
t.context.showExpandToggle && t.vi.childrenAllowed ? (g(),
|
|
1522
|
+
t.context.showExpandToggle && t.vi.childrenAllowed ? (g(), B("button", {
|
|
1518
1523
|
key: 1,
|
|
1519
1524
|
type: "button",
|
|
1520
1525
|
class: we([
|
|
@@ -1525,31 +1530,31 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1525
1530
|
}
|
|
1526
1531
|
]),
|
|
1527
1532
|
"aria-label": t.vi.childrenExpanded ? c(a)("common.sortable.close") : c(a)("common.sortable.edit"),
|
|
1528
|
-
onClick: p[0] || (p[0] = J((
|
|
1533
|
+
onClick: p[0] || (p[0] = J((P) => t.vi.hasChildren && t.callbacks.onChevronClick(t.vi), ["stop"]))
|
|
1529
1534
|
}, [...p[18] || (p[18] = [
|
|
1530
1535
|
K("span", { class: "a-nested-list-editor__tree-toggle-caret" }, null, -1)
|
|
1531
|
-
])], 10,
|
|
1532
|
-
K("div",
|
|
1536
|
+
])], 10, Bl)) : t.context.showExpandToggle ? (g(), B("span", Rl)) : M("", !0),
|
|
1537
|
+
K("div", Kl, [
|
|
1533
1538
|
L(k.$slots, "item-compact", De(Ie(y())), () => [
|
|
1534
|
-
K("span",
|
|
1539
|
+
K("span", Ll, $(t.context.resolveCompactText(t.vi.raw, t.vi.key)), 1)
|
|
1535
1540
|
]),
|
|
1536
|
-
t.vi.hasChildren ? (g(),
|
|
1537
|
-
s(
|
|
1541
|
+
t.vi.hasChildren ? (g(), B("span", Vl, [
|
|
1542
|
+
s(W, {
|
|
1538
1543
|
icon: "mdi-file-tree",
|
|
1539
1544
|
size: "14"
|
|
1540
1545
|
}),
|
|
1541
|
-
N(" +" +
|
|
1546
|
+
N(" +" + $(t.vi.childrenCount), 1)
|
|
1542
1547
|
])) : M("", !0),
|
|
1543
1548
|
t.vi.unsaved ? (g(), U(to, { key: 1 })) : M("", !0)
|
|
1544
1549
|
]),
|
|
1545
|
-
t.context.reorderMode ? M("", !0) : (g(),
|
|
1550
|
+
t.context.reorderMode ? M("", !0) : (g(), B("div", zl, [
|
|
1546
1551
|
L(k.$slots, "item-status", De(Ie(y())), () => [
|
|
1547
|
-
t.context.statusField && t.vi.raw[t.context.statusField] != null && t.vi.raw[t.context.statusField] !== "" ? (g(),
|
|
1552
|
+
t.context.statusField && t.vi.raw[t.context.statusField] != null && t.vi.raw[t.context.statusField] !== "" ? (g(), B("span", Ml, $(t.vi.raw[t.context.statusField]), 1)) : M("", !0)
|
|
1548
1553
|
])
|
|
1549
1554
|
])),
|
|
1550
|
-
K("div",
|
|
1555
|
+
K("div", Nl, [
|
|
1551
1556
|
L(k.$slots, "item-actions", De(Ie(y())), () => [
|
|
1552
|
-
t.context.reorderMode ? (g(),
|
|
1557
|
+
t.context.reorderMode ? (g(), B(ne, { key: 0 }, [
|
|
1553
1558
|
s(q, {
|
|
1554
1559
|
icon: "",
|
|
1555
1560
|
size: "small",
|
|
@@ -1557,10 +1562,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1557
1562
|
density: "comfortable",
|
|
1558
1563
|
disabled: t.vi.firstInParent,
|
|
1559
1564
|
class: "mx-1 a-le-action a-le-action--up",
|
|
1560
|
-
onClick: p[1] || (p[1] = J((
|
|
1565
|
+
onClick: p[1] || (p[1] = J((P) => t.callbacks.moveUp(t.vi.key), ["stop"]))
|
|
1561
1566
|
}, {
|
|
1562
1567
|
default: r(() => [
|
|
1563
|
-
s(
|
|
1568
|
+
s(W, {
|
|
1564
1569
|
icon: "mdi-arrow-up",
|
|
1565
1570
|
size: "18"
|
|
1566
1571
|
}),
|
|
@@ -1579,10 +1584,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1579
1584
|
density: "comfortable",
|
|
1580
1585
|
disabled: t.vi.lastInParent,
|
|
1581
1586
|
class: "mx-1 a-le-action a-le-action--down",
|
|
1582
|
-
onClick: p[2] || (p[2] = J((
|
|
1587
|
+
onClick: p[2] || (p[2] = J((P) => t.callbacks.moveDown(t.vi.key), ["stop"]))
|
|
1583
1588
|
}, {
|
|
1584
1589
|
default: r(() => [
|
|
1585
|
-
s(
|
|
1590
|
+
s(W, {
|
|
1586
1591
|
icon: "mdi-arrow-down",
|
|
1587
1592
|
size: "18"
|
|
1588
1593
|
}),
|
|
@@ -1603,7 +1608,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1603
1608
|
class: "mx-1 a-le-action a-le-action--menu"
|
|
1604
1609
|
}, {
|
|
1605
1610
|
default: r(() => [
|
|
1606
|
-
s(
|
|
1611
|
+
s(W, {
|
|
1607
1612
|
icon: "mdi-dots-vertical",
|
|
1608
1613
|
size: "18"
|
|
1609
1614
|
}),
|
|
@@ -1614,19 +1619,19 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1614
1619
|
}, null, 8, ["text"]),
|
|
1615
1620
|
s(Mt, { activator: "parent" }, {
|
|
1616
1621
|
default: r(() => [
|
|
1617
|
-
s(
|
|
1622
|
+
s(gt, { density: "compact" }, {
|
|
1618
1623
|
default: r(() => [
|
|
1619
1624
|
s(xe, {
|
|
1620
1625
|
disabled: t.vi.firstInParent,
|
|
1621
|
-
onClick: p[3] || (p[3] = J((
|
|
1626
|
+
onClick: p[3] || (p[3] = J((P) => t.callbacks.moveTop(t.vi.key), ["stop"]))
|
|
1622
1627
|
}, {
|
|
1623
1628
|
prepend: r(() => [
|
|
1624
|
-
s(
|
|
1629
|
+
s(W, { icon: "mdi-arrow-collapse-up" })
|
|
1625
1630
|
]),
|
|
1626
1631
|
default: r(() => [
|
|
1627
1632
|
s(Pe, null, {
|
|
1628
1633
|
default: r(() => [
|
|
1629
|
-
N(
|
|
1634
|
+
N($(c(a)("common.sortable.moveToTop")), 1)
|
|
1630
1635
|
]),
|
|
1631
1636
|
_: 1
|
|
1632
1637
|
})
|
|
@@ -1635,15 +1640,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1635
1640
|
}, 8, ["disabled"]),
|
|
1636
1641
|
s(xe, {
|
|
1637
1642
|
disabled: t.vi.lastInParent,
|
|
1638
|
-
onClick: p[4] || (p[4] = J((
|
|
1643
|
+
onClick: p[4] || (p[4] = J((P) => t.callbacks.moveBottom(t.vi.key), ["stop"]))
|
|
1639
1644
|
}, {
|
|
1640
1645
|
prepend: r(() => [
|
|
1641
|
-
s(
|
|
1646
|
+
s(W, { icon: "mdi-arrow-collapse-down" })
|
|
1642
1647
|
]),
|
|
1643
1648
|
default: r(() => [
|
|
1644
1649
|
s(Pe, null, {
|
|
1645
1650
|
default: r(() => [
|
|
1646
|
-
N(
|
|
1651
|
+
N($(c(a)("common.sortable.moveToBottom")), 1)
|
|
1647
1652
|
]),
|
|
1648
1653
|
_: 1
|
|
1649
1654
|
})
|
|
@@ -1652,15 +1657,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1652
1657
|
}, 8, ["disabled"]),
|
|
1653
1658
|
t.context.showMoveToPosition && (!t.vi.firstInParent || !t.vi.lastInParent) ? (g(), U(xe, {
|
|
1654
1659
|
key: 0,
|
|
1655
|
-
onClick: p[5] || (p[5] = J((
|
|
1660
|
+
onClick: p[5] || (p[5] = J((P) => t.callbacks.openMoveToPosition(t.vi), ["stop"]))
|
|
1656
1661
|
}, {
|
|
1657
1662
|
prepend: r(() => [
|
|
1658
|
-
s(
|
|
1663
|
+
s(W, { icon: "mdi-target" })
|
|
1659
1664
|
]),
|
|
1660
1665
|
default: r(() => [
|
|
1661
1666
|
s(Pe, null, {
|
|
1662
1667
|
default: r(() => [
|
|
1663
|
-
N(
|
|
1668
|
+
N($(c(a)("common.sortable.moveToPosition.action")), 1)
|
|
1664
1669
|
]),
|
|
1665
1670
|
_: 1
|
|
1666
1671
|
})
|
|
@@ -1669,15 +1674,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1669
1674
|
})) : M("", !0),
|
|
1670
1675
|
t.context.showChangeParent ? (g(), U(xe, {
|
|
1671
1676
|
key: 1,
|
|
1672
|
-
onClick: p[6] || (p[6] = J((
|
|
1677
|
+
onClick: p[6] || (p[6] = J((P) => t.callbacks.openChangeParent(t.vi), ["stop"]))
|
|
1673
1678
|
}, {
|
|
1674
1679
|
prepend: r(() => [
|
|
1675
|
-
s(
|
|
1680
|
+
s(W, { icon: "mdi-folder-move-outline" })
|
|
1676
1681
|
]),
|
|
1677
1682
|
default: r(() => [
|
|
1678
1683
|
s(Pe, null, {
|
|
1679
1684
|
default: r(() => [
|
|
1680
|
-
N(
|
|
1685
|
+
N($(c(a)("common.sortable.changeParent.action")), 1)
|
|
1681
1686
|
]),
|
|
1682
1687
|
_: 1
|
|
1683
1688
|
})
|
|
@@ -1686,15 +1691,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1686
1691
|
})) : M("", !0),
|
|
1687
1692
|
s(xe, {
|
|
1688
1693
|
disabled: !t.vi.canIndent,
|
|
1689
|
-
onClick: p[7] || (p[7] = J((
|
|
1694
|
+
onClick: p[7] || (p[7] = J((P) => t.callbacks.indent(t.vi), ["stop"]))
|
|
1690
1695
|
}, {
|
|
1691
1696
|
prepend: r(() => [
|
|
1692
|
-
s(
|
|
1697
|
+
s(W, { icon: "mdi-format-indent-increase" })
|
|
1693
1698
|
]),
|
|
1694
1699
|
default: r(() => [
|
|
1695
1700
|
s(Pe, null, {
|
|
1696
1701
|
default: r(() => [
|
|
1697
|
-
N(
|
|
1702
|
+
N($(c(a)("common.sortable.indent")), 1)
|
|
1698
1703
|
]),
|
|
1699
1704
|
_: 1
|
|
1700
1705
|
})
|
|
@@ -1703,15 +1708,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1703
1708
|
}, 8, ["disabled"]),
|
|
1704
1709
|
s(xe, {
|
|
1705
1710
|
disabled: !t.vi.canOutdent,
|
|
1706
|
-
onClick: p[8] || (p[8] = J((
|
|
1711
|
+
onClick: p[8] || (p[8] = J((P) => t.callbacks.outdent(t.vi), ["stop"]))
|
|
1707
1712
|
}, {
|
|
1708
1713
|
prepend: r(() => [
|
|
1709
|
-
s(
|
|
1714
|
+
s(W, { icon: "mdi-format-indent-decrease" })
|
|
1710
1715
|
]),
|
|
1711
1716
|
default: r(() => [
|
|
1712
1717
|
s(Pe, null, {
|
|
1713
1718
|
default: r(() => [
|
|
1714
|
-
N(
|
|
1719
|
+
N($(c(a)("common.sortable.outdent")), 1)
|
|
1715
1720
|
]),
|
|
1716
1721
|
_: 1
|
|
1717
1722
|
})
|
|
@@ -1720,10 +1725,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1720
1725
|
}, 8, ["disabled"]),
|
|
1721
1726
|
t.context.showDeleteButton && t.context.canInteract ? (g(), U(xe, {
|
|
1722
1727
|
key: 2,
|
|
1723
|
-
onClick: p[9] || (p[9] = J((
|
|
1728
|
+
onClick: p[9] || (p[9] = J((P) => t.callbacks.onDeleteClick(t.vi), ["stop"]))
|
|
1724
1729
|
}, {
|
|
1725
1730
|
prepend: r(() => [
|
|
1726
|
-
s(
|
|
1731
|
+
s(W, {
|
|
1727
1732
|
icon: "mdi-trash-can-outline",
|
|
1728
1733
|
color: "error"
|
|
1729
1734
|
})
|
|
@@ -1731,7 +1736,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1731
1736
|
default: r(() => [
|
|
1732
1737
|
s(Pe, { class: "text-error" }, {
|
|
1733
1738
|
default: r(() => [
|
|
1734
|
-
N(
|
|
1739
|
+
N($(c(a)("common.sortable.delete")), 1)
|
|
1735
1740
|
]),
|
|
1736
1741
|
_: 1
|
|
1737
1742
|
})
|
|
@@ -1747,7 +1752,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1747
1752
|
]),
|
|
1748
1753
|
_: 1
|
|
1749
1754
|
})
|
|
1750
|
-
], 64)) : (g(),
|
|
1755
|
+
], 64)) : (g(), B(ne, { key: 1 }, [
|
|
1751
1756
|
t.context.showEditButton && t.context.canInteract ? (g(), U(q, {
|
|
1752
1757
|
key: 0,
|
|
1753
1758
|
icon: "",
|
|
@@ -1756,10 +1761,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1756
1761
|
color: "primary",
|
|
1757
1762
|
density: "comfortable",
|
|
1758
1763
|
class: "mx-1 a-le-action a-le-action--edit",
|
|
1759
|
-
onClick: p[10] || (p[10] = J((
|
|
1764
|
+
onClick: p[10] || (p[10] = J((P) => t.callbacks.onEditClick(t.vi), ["stop"]))
|
|
1760
1765
|
}, {
|
|
1761
1766
|
default: r(() => [
|
|
1762
|
-
s(
|
|
1767
|
+
s(W, {
|
|
1763
1768
|
icon: "mdi-pencil-outline",
|
|
1764
1769
|
size: "18"
|
|
1765
1770
|
}),
|
|
@@ -1778,10 +1783,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1778
1783
|
variant: "text",
|
|
1779
1784
|
density: "comfortable",
|
|
1780
1785
|
class: "mx-1 a-le-action a-le-action--delete",
|
|
1781
|
-
onClick: p[11] || (p[11] = J((
|
|
1786
|
+
onClick: p[11] || (p[11] = J((P) => t.callbacks.onDeleteClick(t.vi), ["stop"]))
|
|
1782
1787
|
}, {
|
|
1783
1788
|
default: r(() => [
|
|
1784
|
-
s(
|
|
1789
|
+
s(W, {
|
|
1785
1790
|
icon: "mdi-trash-can-outline",
|
|
1786
1791
|
size: "18"
|
|
1787
1792
|
}),
|
|
@@ -1803,7 +1808,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1803
1808
|
class: "mx-1 a-le-action a-le-action--menu"
|
|
1804
1809
|
}, {
|
|
1805
1810
|
default: r(() => [
|
|
1806
|
-
s(
|
|
1811
|
+
s(W, {
|
|
1807
1812
|
icon: "mdi-dots-vertical",
|
|
1808
1813
|
size: "18"
|
|
1809
1814
|
}),
|
|
@@ -1814,19 +1819,19 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1814
1819
|
}, null, 8, ["text"]),
|
|
1815
1820
|
s(Mt, { activator: "parent" }, {
|
|
1816
1821
|
default: r(() => [
|
|
1817
|
-
s(
|
|
1822
|
+
s(gt, { density: "compact" }, {
|
|
1818
1823
|
default: r(() => [
|
|
1819
1824
|
t.context.showAddAfterAction ? (g(), U(xe, {
|
|
1820
1825
|
key: 0,
|
|
1821
|
-
onClick: p[12] || (p[12] = J((
|
|
1826
|
+
onClick: p[12] || (p[12] = J((P) => t.callbacks.onAddAfterClick(t.vi), ["stop"]))
|
|
1822
1827
|
}, {
|
|
1823
1828
|
prepend: r(() => [
|
|
1824
|
-
s(
|
|
1829
|
+
s(W, { icon: "mdi-playlist-plus" })
|
|
1825
1830
|
]),
|
|
1826
1831
|
default: r(() => [
|
|
1827
1832
|
s(Pe, null, {
|
|
1828
1833
|
default: r(() => [
|
|
1829
|
-
N(
|
|
1834
|
+
N($(c(a)("common.sortable.addAfter")), 1)
|
|
1830
1835
|
]),
|
|
1831
1836
|
_: 1
|
|
1832
1837
|
})
|
|
@@ -1835,15 +1840,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1835
1840
|
})) : M("", !0),
|
|
1836
1841
|
t.context.showAddChildButton && t.vi.canAddChild ? (g(), U(xe, {
|
|
1837
1842
|
key: 1,
|
|
1838
|
-
onClick: p[13] || (p[13] = J((
|
|
1843
|
+
onClick: p[13] || (p[13] = J((P) => t.callbacks.onAddChildClick(t.vi), ["stop"]))
|
|
1839
1844
|
}, {
|
|
1840
1845
|
prepend: r(() => [
|
|
1841
|
-
s(
|
|
1846
|
+
s(W, { icon: "mdi-subdirectory-arrow-right" })
|
|
1842
1847
|
]),
|
|
1843
1848
|
default: r(() => [
|
|
1844
1849
|
s(Pe, null, {
|
|
1845
1850
|
default: r(() => [
|
|
1846
|
-
N(
|
|
1851
|
+
N($(c(a)("common.sortable.addChild")), 1)
|
|
1847
1852
|
]),
|
|
1848
1853
|
_: 1
|
|
1849
1854
|
})
|
|
@@ -1863,22 +1868,22 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1863
1868
|
])
|
|
1864
1869
|
])
|
|
1865
1870
|
]),
|
|
1866
|
-
t.vi.editing && !t.context.reorderMode && k.$slots.item ? (g(),
|
|
1867
|
-
K("div",
|
|
1868
|
-
K("div",
|
|
1871
|
+
t.vi.editing && !t.context.reorderMode && k.$slots.item ? (g(), B(ne, { key: 0 }, [
|
|
1872
|
+
K("div", Ol, [
|
|
1873
|
+
K("div", Ul, [
|
|
1869
1874
|
L(k.$slots, "item", De(Ie(y())))
|
|
1870
1875
|
])
|
|
1871
1876
|
]),
|
|
1872
1877
|
L(k.$slots, "item-footer", De(Ie(y())), () => [
|
|
1873
|
-
t.context.showInlineSaveFooter ? (g(),
|
|
1878
|
+
t.context.showInlineSaveFooter ? (g(), B("div", jl, [
|
|
1874
1879
|
p[19] || (p[19] = K("div", { class: "a-le-row-footer-spacer" }, null, -1)),
|
|
1875
1880
|
s(q, {
|
|
1876
1881
|
variant: "text",
|
|
1877
1882
|
disabled: t.vi.loading,
|
|
1878
|
-
onClick: p[15] || (p[15] = J((
|
|
1883
|
+
onClick: p[15] || (p[15] = J((P) => t.callbacks.onCancelClick(t.vi), ["stop"]))
|
|
1879
1884
|
}, {
|
|
1880
1885
|
default: r(() => [
|
|
1881
|
-
N(
|
|
1886
|
+
N($(c(a)("common.button.cancel")), 1)
|
|
1882
1887
|
]),
|
|
1883
1888
|
_: 1
|
|
1884
1889
|
}, 8, ["disabled"]),
|
|
@@ -1887,34 +1892,34 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1887
1892
|
variant: "flat",
|
|
1888
1893
|
"prepend-icon": "mdi-check",
|
|
1889
1894
|
disabled: t.vi.loading,
|
|
1890
|
-
onClick: p[16] || (p[16] = J((
|
|
1895
|
+
onClick: p[16] || (p[16] = J((P) => t.callbacks.onSaveClick(t.vi), ["stop"]))
|
|
1891
1896
|
}, {
|
|
1892
1897
|
default: r(() => [
|
|
1893
|
-
N(
|
|
1898
|
+
N($(c(a)("common.button.save")), 1)
|
|
1894
1899
|
]),
|
|
1895
1900
|
_: 1
|
|
1896
1901
|
}, 8, ["disabled"])
|
|
1897
1902
|
])) : M("", !0)
|
|
1898
1903
|
])
|
|
1899
|
-
], 64)) : k.$slots["item-readonly"] && (t.context.readonly || t.vi.expanded) && !t.context.reorderMode ? (g(),
|
|
1900
|
-
K("div",
|
|
1904
|
+
], 64)) : k.$slots["item-readonly"] && (t.context.readonly || t.vi.expanded) && !t.context.reorderMode ? (g(), B("div", ql, [
|
|
1905
|
+
K("div", Gl, [
|
|
1901
1906
|
L(k.$slots, "item-readonly", De(Ie(y())))
|
|
1902
1907
|
])
|
|
1903
1908
|
])) : M("", !0)
|
|
1904
1909
|
], 6),
|
|
1905
1910
|
L(k.$slots, "after-item", De(Ie(y()))),
|
|
1906
|
-
t.vi.hasChildren && t.vi.childrenExpanded ? (g(),
|
|
1911
|
+
t.vi.hasChildren && t.vi.childrenExpanded ? (g(), B("div", {
|
|
1907
1912
|
key: 0,
|
|
1908
1913
|
class: "a-nested-list-editor__children",
|
|
1909
|
-
style:
|
|
1914
|
+
style: pt({ "--parent-depth": t.vi.depth })
|
|
1910
1915
|
}, [
|
|
1911
1916
|
K("div", {
|
|
1912
|
-
class: we([
|
|
1917
|
+
class: we([Wl]),
|
|
1913
1918
|
"data-parent-id": String(t.vi.key)
|
|
1914
1919
|
}, [
|
|
1915
|
-
(g(!0),
|
|
1916
|
-
key: String(
|
|
1917
|
-
vi:
|
|
1920
|
+
(g(!0), B(ne, null, Ze(x(), (P) => (g(), U(c(u), {
|
|
1921
|
+
key: String(P.key),
|
|
1922
|
+
vi: P,
|
|
1918
1923
|
"view-items": t.viewItems,
|
|
1919
1924
|
"drag-state": t.dragState,
|
|
1920
1925
|
context: t.context,
|
|
@@ -1946,11 +1951,11 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1946
1951
|
]),
|
|
1947
1952
|
_: 3
|
|
1948
1953
|
}, 8, ["vi", "view-items", "drag-state", "context", "callbacks"]))), 128))
|
|
1949
|
-
], 10,
|
|
1954
|
+
], 10, Hl)
|
|
1950
1955
|
], 4)) : M("", !0)
|
|
1951
|
-
], 42,
|
|
1956
|
+
], 42, Fl));
|
|
1952
1957
|
}
|
|
1953
|
-
}),
|
|
1958
|
+
}), Xl = { class: "text-body-medium mb-2" }, Yl = /* @__PURE__ */ ze({
|
|
1954
1959
|
__name: "LeChangeParentDialog",
|
|
1955
1960
|
props: /* @__PURE__ */ Te({
|
|
1956
1961
|
tree: {},
|
|
@@ -1965,8 +1970,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1965
1970
|
}),
|
|
1966
1971
|
emits: /* @__PURE__ */ Te(["confirm"], ["update:modelValue"]),
|
|
1967
1972
|
setup(t, { emit: C }) {
|
|
1968
|
-
const u = t, a = C,
|
|
1969
|
-
ue(
|
|
1973
|
+
const u = t, a = C, m = it(t, "modelValue"), { t: h } = je(), y = _(void 0), x = _("last");
|
|
1974
|
+
ue(m, (d) => {
|
|
1970
1975
|
d && (y.value = void 0, x.value = "last");
|
|
1971
1976
|
});
|
|
1972
1977
|
const k = b(() => {
|
|
@@ -1976,8 +1981,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1976
1981
|
for (const i of w) {
|
|
1977
1982
|
if (i.data[u.keyField] === u.sourceKey) {
|
|
1978
1983
|
const X = (ee) => {
|
|
1979
|
-
for (const
|
|
1980
|
-
d.add(
|
|
1984
|
+
for (const H of ee)
|
|
1985
|
+
d.add(H.data[u.keyField]), H.children?.length && X(H.children);
|
|
1981
1986
|
};
|
|
1982
1987
|
return i.children?.length && X(i.children), !0;
|
|
1983
1988
|
}
|
|
@@ -1999,7 +2004,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
1999
2004
|
return null;
|
|
2000
2005
|
};
|
|
2001
2006
|
return d(u.tree.children);
|
|
2002
|
-
}),
|
|
2007
|
+
}), P = b(() => {
|
|
2003
2008
|
if (u.sourceKey === null) return;
|
|
2004
2009
|
const d = (D, w) => {
|
|
2005
2010
|
for (const i of D) {
|
|
@@ -2018,19 +2023,19 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2018
2023
|
depth: 0,
|
|
2019
2024
|
label: h("common.sortable.changeParent.rootLabel"),
|
|
2020
2025
|
hasChildren: u.tree.children.length > 0,
|
|
2021
|
-
disallowed:
|
|
2022
|
-
reason:
|
|
2026
|
+
disallowed: P.value === null,
|
|
2027
|
+
reason: P.value === null ? "currentParent" : null
|
|
2023
2028
|
});
|
|
2024
2029
|
const w = (i, G) => {
|
|
2025
2030
|
for (const X of i) {
|
|
2026
2031
|
const ee = X.data[u.keyField];
|
|
2027
|
-
let
|
|
2028
|
-
ee === u.sourceKey ? (
|
|
2032
|
+
let H = !1, Y = null;
|
|
2033
|
+
ee === u.sourceKey ? (H = !0, Y = "self") : k.value.has(ee) ? (H = !0, Y = "descendant") : P.value !== void 0 && P.value === ee ? (H = !0, Y = "currentParent") : G + 1 + D > u.maxDepth && (H = !0, Y = "maxDepth"), d.push({
|
|
2029
2034
|
key: ee,
|
|
2030
2035
|
depth: G + 1,
|
|
2031
2036
|
label: u.resolveLabel(X.data, ee),
|
|
2032
2037
|
hasChildren: !!(X.children && X.children.length > 0),
|
|
2033
|
-
disallowed:
|
|
2038
|
+
disallowed: H,
|
|
2034
2039
|
reason: Y
|
|
2035
2040
|
}), X.children?.length && w(X.children, G + 1);
|
|
2036
2041
|
}
|
|
@@ -2038,18 +2043,18 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2038
2043
|
return w(u.tree.children, 0), d;
|
|
2039
2044
|
}), R = b(() => I.value.filter((d) => !d.disallowed)), S = b(
|
|
2040
2045
|
() => y.value === void 0 ? null : I.value.find((d) => d.key === y.value) ?? null
|
|
2041
|
-
),
|
|
2046
|
+
), v = b(
|
|
2042
2047
|
() => !!S.value && S.value.hasChildren
|
|
2043
2048
|
), T = (d) => {
|
|
2044
2049
|
d.disallowed || (y.value = d.key);
|
|
2045
2050
|
}, z = () => {
|
|
2046
|
-
S.value && (a("confirm", S.value.key, x.value),
|
|
2047
|
-
},
|
|
2048
|
-
|
|
2051
|
+
S.value && (a("confirm", S.value.key, x.value), m.value = !1);
|
|
2052
|
+
}, F = () => {
|
|
2053
|
+
m.value = !1;
|
|
2049
2054
|
}, O = (d) => `${d * 16}px`, E = (d) => d === "maxDepth" ? h("common.sortable.changeParent.errorMaxDepth") : "";
|
|
2050
2055
|
return (d, D) => (g(), U(sa, {
|
|
2051
|
-
modelValue:
|
|
2052
|
-
"onUpdate:modelValue": D[1] || (D[1] = (w) =>
|
|
2056
|
+
modelValue: m.value,
|
|
2057
|
+
"onUpdate:modelValue": D[1] || (D[1] = (w) => m.value = w),
|
|
2053
2058
|
"max-width": "540",
|
|
2054
2059
|
persistent: ""
|
|
2055
2060
|
}, {
|
|
@@ -2058,7 +2063,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2058
2063
|
default: r(() => [
|
|
2059
2064
|
s(uo, null, {
|
|
2060
2065
|
default: r(() => [
|
|
2061
|
-
N(
|
|
2066
|
+
N($(c(h)("common.sortable.changeParent.title")), 1)
|
|
2062
2067
|
]),
|
|
2063
2068
|
_: 1
|
|
2064
2069
|
}),
|
|
@@ -2073,42 +2078,42 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2073
2078
|
density: "compact"
|
|
2074
2079
|
}, {
|
|
2075
2080
|
default: r(() => [
|
|
2076
|
-
K("strong", null,
|
|
2077
|
-
K("div", null,
|
|
2081
|
+
K("strong", null, $(c(h)("common.sortable.changeParent.noTargetsTitle")), 1),
|
|
2082
|
+
K("div", null, $(c(h)("common.sortable.changeParent.noTargetsText")), 1)
|
|
2078
2083
|
]),
|
|
2079
2084
|
_: 1
|
|
2080
2085
|
})
|
|
2081
2086
|
]),
|
|
2082
2087
|
_: 1
|
|
2083
|
-
})) : (g(),
|
|
2088
|
+
})) : (g(), B(ne, { key: 1 }, [
|
|
2084
2089
|
s(Rt, { class: "pb-1" }, {
|
|
2085
2090
|
default: r(() => [
|
|
2086
|
-
s(
|
|
2091
|
+
s(gt, {
|
|
2087
2092
|
density: "compact",
|
|
2088
2093
|
class: "le-change-parent__list"
|
|
2089
2094
|
}, {
|
|
2090
2095
|
default: r(() => [
|
|
2091
|
-
(g(!0),
|
|
2096
|
+
(g(!0), B(ne, null, Ze(I.value, (w) => (g(), U(xe, {
|
|
2092
2097
|
key: w.key === null ? "__root__" : String(w.key),
|
|
2093
2098
|
disabled: w.disallowed,
|
|
2094
2099
|
active: y.value === w.key,
|
|
2095
2100
|
title: w.label,
|
|
2096
2101
|
subtitle: E(w.reason),
|
|
2097
|
-
style:
|
|
2102
|
+
style: pt({ paddingInlineStart: O(w.depth) }),
|
|
2098
2103
|
"data-disallowed": w.disallowed ? "true" : "false",
|
|
2099
2104
|
"data-reason": w.reason ?? "",
|
|
2100
2105
|
onClick: (i) => T(w)
|
|
2101
2106
|
}, {
|
|
2102
2107
|
prepend: r(() => [
|
|
2103
|
-
w.key === null ? (g(), U(
|
|
2108
|
+
w.key === null ? (g(), U(W, {
|
|
2104
2109
|
key: 0,
|
|
2105
2110
|
icon: "mdi-folder-home-outline",
|
|
2106
2111
|
size: "18"
|
|
2107
|
-
})) : w.hasChildren ? (g(), U(
|
|
2112
|
+
})) : w.hasChildren ? (g(), U(W, {
|
|
2108
2113
|
key: 1,
|
|
2109
2114
|
icon: "mdi-folder-outline",
|
|
2110
2115
|
size: "18"
|
|
2111
|
-
})) : (g(), U(
|
|
2116
|
+
})) : (g(), U(W, {
|
|
2112
2117
|
key: 2,
|
|
2113
2118
|
icon: "mdi-file-outline",
|
|
2114
2119
|
size: "18"
|
|
@@ -2122,15 +2127,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2122
2127
|
]),
|
|
2123
2128
|
_: 1
|
|
2124
2129
|
}),
|
|
2125
|
-
|
|
2130
|
+
v.value ? (g(), U(Rt, {
|
|
2126
2131
|
key: 0,
|
|
2127
2132
|
class: "pt-0"
|
|
2128
2133
|
}, {
|
|
2129
2134
|
default: r(() => [
|
|
2130
|
-
K("div",
|
|
2135
|
+
K("div", Xl, $(c(h)("common.sortable.changeParent.placementHeading", {
|
|
2131
2136
|
label: S.value?.label ?? ""
|
|
2132
2137
|
})), 1),
|
|
2133
|
-
s(
|
|
2138
|
+
s(zn, {
|
|
2134
2139
|
modelValue: x.value,
|
|
2135
2140
|
"onUpdate:modelValue": D[0] || (D[0] = (w) => x.value = w),
|
|
2136
2141
|
density: "compact",
|
|
@@ -2157,10 +2162,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2157
2162
|
s(ra),
|
|
2158
2163
|
s(q, {
|
|
2159
2164
|
variant: "text",
|
|
2160
|
-
onClick:
|
|
2165
|
+
onClick: F
|
|
2161
2166
|
}, {
|
|
2162
2167
|
default: r(() => [
|
|
2163
|
-
N(
|
|
2168
|
+
N($(c(h)("common.sortable.reorderCancel")), 1)
|
|
2164
2169
|
]),
|
|
2165
2170
|
_: 1
|
|
2166
2171
|
}),
|
|
@@ -2171,7 +2176,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2171
2176
|
onClick: z
|
|
2172
2177
|
}, {
|
|
2173
2178
|
default: r(() => [
|
|
2174
|
-
N(
|
|
2179
|
+
N($(c(h)("common.sortable.changeParent.confirm")), 1)
|
|
2175
2180
|
]),
|
|
2176
2181
|
_: 1
|
|
2177
2182
|
}, 8, ["disabled"])
|
|
@@ -2185,26 +2190,26 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2185
2190
|
_: 1
|
|
2186
2191
|
}, 8, ["modelValue"]));
|
|
2187
2192
|
}
|
|
2188
|
-
}),
|
|
2193
|
+
}), Ql = /* @__PURE__ */ lo(Yl, [["__scopeId", "data-v-0058f5cc"]]), Zl = { class: "a-le-card" }, _l = {
|
|
2189
2194
|
key: 0,
|
|
2190
2195
|
class: "a-le-header"
|
|
2191
|
-
},
|
|
2196
|
+
}, ei = {
|
|
2192
2197
|
key: 0,
|
|
2193
2198
|
class: "a-le-title-heading"
|
|
2194
|
-
},
|
|
2199
|
+
}, ti = { class: "a-le-header-actions" }, ai = {
|
|
2195
2200
|
key: 1,
|
|
2196
2201
|
class: "a-le-state a-le-state--loading"
|
|
2197
|
-
},
|
|
2202
|
+
}, oi = {
|
|
2198
2203
|
key: 2,
|
|
2199
2204
|
class: "a-le-state a-le-state--error"
|
|
2200
|
-
},
|
|
2205
|
+
}, ni = {
|
|
2201
2206
|
key: 3,
|
|
2202
2207
|
class: "a-le-state a-le-state--empty"
|
|
2203
|
-
},
|
|
2208
|
+
}, li = {
|
|
2204
2209
|
class: "a-le-sr-only",
|
|
2205
2210
|
"aria-live": "polite",
|
|
2206
2211
|
role: "status"
|
|
2207
|
-
}, Aa = "a-nested-list-editor__group",
|
|
2212
|
+
}, Aa = "a-nested-list-editor__group", ii = "a-le-drag-handle", Ea = 24, Pa = 22, Ui = /* @__PURE__ */ ze({
|
|
2208
2213
|
__name: "ANestedSortableListEditor",
|
|
2209
2214
|
props: /* @__PURE__ */ Te({
|
|
2210
2215
|
maxDepth: {},
|
|
@@ -2257,14 +2262,14 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2257
2262
|
}),
|
|
2258
2263
|
emits: /* @__PURE__ */ Te(["add", "add-child", "edit", "deleted", "close", "item-saved", "item-expand", "reorder-start", "reorder-cancel", "reorder-applied", "reorder-apply-error", "reorder-end", "indent", "outdent"], ["update:modelValue", "update:mode"]),
|
|
2259
2264
|
setup(t, { expose: C, emit: u }) {
|
|
2260
|
-
const a = t,
|
|
2265
|
+
const a = t, m = u, h = it(t, "modelValue"), y = it(t, "mode"), { t: x } = je(), k = io(), { showWarningT: p } = Wa(), P = zt("rootEl"), { isNarrow: I } = yn(P), R = hn(), S = b(() => a.closeVariant === "icon" ? "icon" : a.closeVariant === "labeled" ? "labeled" : I.value ? "icon" : "labeled"), v = _(/* @__PURE__ */ new Set()), T = _(/* @__PURE__ */ new Set()), z = a.getKey ?? "id", F = typeof z == "function" ? "id" : z, O = (e) => typeof z == "function" ? z(e) : e[z], E = (() => {
|
|
2261
2266
|
const e = a.position;
|
|
2262
2267
|
return e === void 0 || e === !1 ? "position" : typeof e == "object" ? e.field : e;
|
|
2263
2268
|
})();
|
|
2264
2269
|
((e) => {
|
|
2265
2270
|
const l = (n) => {
|
|
2266
2271
|
for (const A of n)
|
|
2267
|
-
A.children && A.children.length > 0 && (
|
|
2272
|
+
A.children && A.children.length > 0 && (v.value.add(O(A.data)), l(A.children));
|
|
2268
2273
|
};
|
|
2269
2274
|
l(e.children);
|
|
2270
2275
|
})(h.value);
|
|
@@ -2278,10 +2283,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2278
2283
|
maxDepth: a.maxDepth,
|
|
2279
2284
|
dirtyExclude: () => a.dirtyExclude ?? [],
|
|
2280
2285
|
validate: a.validate
|
|
2281
|
-
}, w = a.editor ? null :
|
|
2286
|
+
}, w = a.editor ? null : pn(a.stateKey, D), i = a.editor ?? w?.handle ?? gn(D), G = Ja(w?.childScope ?? null), X = b(() => {
|
|
2282
2287
|
const e = [];
|
|
2283
2288
|
let l = 0;
|
|
2284
|
-
const n = a.maxDepth, A = (j, te,
|
|
2289
|
+
const n = a.maxDepth, A = (j, te, ge) => {
|
|
2285
2290
|
for (let se = 0; se < j.length; se++) {
|
|
2286
2291
|
const ce = j[se], Qe = O(ce.data), Z = ce.children !== void 0, lt = Z && (ce.children?.length ?? 0) > 0, Dt = ce.children?.length ?? 0, yt = n - (te + 1);
|
|
2287
2292
|
e.push({
|
|
@@ -2291,8 +2296,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2291
2296
|
position: ce.data[E],
|
|
2292
2297
|
node: ce,
|
|
2293
2298
|
depth: te,
|
|
2294
|
-
parent:
|
|
2295
|
-
parentKey:
|
|
2299
|
+
parent: ge?.data ?? null,
|
|
2300
|
+
parentKey: ge ? O(ge.data) : null,
|
|
2296
2301
|
childrenCount: Dt,
|
|
2297
2302
|
hasChildren: lt,
|
|
2298
2303
|
childrenAllowed: Z,
|
|
@@ -2313,24 +2318,24 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2313
2318
|
() => G.retainOwners(X.value.map((e) => e.key)),
|
|
2314
2319
|
{ flush: "post" }
|
|
2315
2320
|
);
|
|
2316
|
-
const ee = aa(null),
|
|
2317
|
-
i.commit(),
|
|
2321
|
+
const ee = aa(null), H = _(/* @__PURE__ */ new Set()), Y = _(/* @__PURE__ */ new Set()), me = _(/* @__PURE__ */ new Set()), ve = () => {
|
|
2322
|
+
i.commit(), H.value = /* @__PURE__ */ new Set();
|
|
2318
2323
|
}, ae = (e) => {
|
|
2319
2324
|
const { node: l } = i.findNode(e);
|
|
2320
2325
|
if (!l) {
|
|
2321
|
-
|
|
2326
|
+
H.value.add(e);
|
|
2322
2327
|
return;
|
|
2323
2328
|
}
|
|
2324
2329
|
const n = (A) => {
|
|
2325
|
-
|
|
2330
|
+
H.value.add(O(A.data)), A.children && A.children.forEach(n);
|
|
2326
2331
|
};
|
|
2327
2332
|
n(l);
|
|
2328
2333
|
}, be = /* @__PURE__ */ new Map(), ie = b(() => {
|
|
2329
2334
|
const e = [], l = /* @__PURE__ */ new Set();
|
|
2330
2335
|
for (const n of X.value) {
|
|
2331
2336
|
l.add(n.key);
|
|
2332
|
-
const A = Ne.value.has(n.key), j = T.value.has(n.key), te =
|
|
2333
|
-
if (Z && Z.raw === n.raw && Z.index === n.index && Z.position === n.position && Z.depth === n.depth && Z.parentKey === n.parentKey && Z.childrenCount === n.childrenCount && Z.firstInParent === n.firstInParent && Z.lastInParent === n.lastInParent && Z.editing === A && Z.expanded === j && Z.childrenExpanded === te && Z.loading ===
|
|
2337
|
+
const A = Ne.value.has(n.key), j = T.value.has(n.key), te = v.value.has(n.key), ge = a.loadingKeys?.has(n.key) ?? !1, se = H.value.has(n.key), ce = a.readonly ? !1 : i.isUnsaved(n.key), Qe = a.readonly ? !1 : ce || se, Z = be.get(n.key);
|
|
2338
|
+
if (Z && Z.raw === n.raw && Z.index === n.index && Z.position === n.position && Z.depth === n.depth && Z.parentKey === n.parentKey && Z.childrenCount === n.childrenCount && Z.firstInParent === n.firstInParent && Z.lastInParent === n.lastInParent && Z.editing === A && Z.expanded === j && Z.childrenExpanded === te && Z.loading === ge && Z.dirty === ce && Z.moved === se && Z.unsaved === Qe) {
|
|
2334
2339
|
e.push(Z);
|
|
2335
2340
|
continue;
|
|
2336
2341
|
}
|
|
@@ -2339,7 +2344,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2339
2344
|
editing: A,
|
|
2340
2345
|
expanded: j,
|
|
2341
2346
|
childrenExpanded: te,
|
|
2342
|
-
loading:
|
|
2347
|
+
loading: ge,
|
|
2343
2348
|
dirty: ce,
|
|
2344
2349
|
moved: se,
|
|
2345
2350
|
unsaved: Qe
|
|
@@ -2354,12 +2359,12 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2354
2359
|
), _e = b(() => !!k.item), kt = b(() => !!k["item-readonly"]), Ot = b(() => !!a.onItemSave), {
|
|
2355
2360
|
editingKeys: Ne,
|
|
2356
2361
|
editingSnapshots: Ge,
|
|
2357
|
-
clearEditing:
|
|
2362
|
+
clearEditing: Fe,
|
|
2358
2363
|
beginEdit: st,
|
|
2359
2364
|
cancelEdit: Ae,
|
|
2360
|
-
commitEdit:
|
|
2365
|
+
commitEdit: He,
|
|
2361
2366
|
closeEdit: Ut,
|
|
2362
|
-
requestAutoOpen:
|
|
2367
|
+
requestAutoOpen: Be
|
|
2363
2368
|
} = Xa({
|
|
2364
2369
|
rowsContainer: ye,
|
|
2365
2370
|
rowSelector: ".a-le-row-wrapper",
|
|
@@ -2380,10 +2385,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2380
2385
|
},
|
|
2381
2386
|
afterAutoOpen: (e) => {
|
|
2382
2387
|
const { parent: l } = i.findNode(e);
|
|
2383
|
-
l &&
|
|
2388
|
+
l && v.value.add(O(l.data));
|
|
2384
2389
|
}
|
|
2385
2390
|
}), {
|
|
2386
|
-
applying:
|
|
2391
|
+
applying: We,
|
|
2387
2392
|
applyError: Je,
|
|
2388
2393
|
hasPendingChanges: rt,
|
|
2389
2394
|
movedCount: wt,
|
|
@@ -2391,25 +2396,25 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2391
2396
|
enterReorderMode: Oe,
|
|
2392
2397
|
cancelReorderMode: Xe,
|
|
2393
2398
|
applyReorder: dt
|
|
2394
|
-
} =
|
|
2399
|
+
} = bn({
|
|
2395
2400
|
mode: y,
|
|
2396
2401
|
snapshot: ee,
|
|
2397
|
-
movedKeys:
|
|
2402
|
+
movedKeys: H,
|
|
2398
2403
|
modelValue: h,
|
|
2399
|
-
cloneModel: (e) =>
|
|
2404
|
+
cloneModel: (e) => Cn(e),
|
|
2400
2405
|
applyModel: (e) => {
|
|
2401
2406
|
h.value = e;
|
|
2402
2407
|
},
|
|
2403
2408
|
canEnterReorder: Me,
|
|
2404
2409
|
onEnter: () => {
|
|
2405
|
-
Y.value = /* @__PURE__ */ new Set(), me.value = /* @__PURE__ */ new Set(),
|
|
2406
|
-
for (const e of $e.value)
|
|
2410
|
+
Y.value = /* @__PURE__ */ new Set(), me.value = /* @__PURE__ */ new Set(), Fe();
|
|
2411
|
+
for (const e of $e.value) v.value.add(e);
|
|
2407
2412
|
Le(() => {
|
|
2408
2413
|
ke.value && ot();
|
|
2409
2414
|
});
|
|
2410
2415
|
},
|
|
2411
2416
|
onExternalEnter: () => {
|
|
2412
|
-
Y.value = /* @__PURE__ */ new Set(), me.value = /* @__PURE__ */ new Set(),
|
|
2417
|
+
Y.value = /* @__PURE__ */ new Set(), me.value = /* @__PURE__ */ new Set(), Fe();
|
|
2413
2418
|
},
|
|
2414
2419
|
// Cancel: the snapshot-restore has brought every deleted row back; reconcile the controller so a
|
|
2415
2420
|
// deferred delete truly reverts (clear tombstone, row stays) and an immediate delete stays gone (row
|
|
@@ -2425,11 +2430,11 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2425
2430
|
},
|
|
2426
2431
|
onReorderApply: (e) => a.onReorderApply?.(e),
|
|
2427
2432
|
emit: {
|
|
2428
|
-
reorderStart: () =>
|
|
2429
|
-
reorderCancel: () =>
|
|
2430
|
-
reorderApplied: (e) =>
|
|
2431
|
-
reorderApplyError: (e) =>
|
|
2432
|
-
reorderEnd: () =>
|
|
2433
|
+
reorderStart: () => m("reorder-start"),
|
|
2434
|
+
reorderCancel: () => m("reorder-cancel"),
|
|
2435
|
+
reorderApplied: (e) => m("reorder-applied", e),
|
|
2436
|
+
reorderApplyError: (e) => m("reorder-apply-error", e),
|
|
2437
|
+
reorderEnd: () => m("reorder-end")
|
|
2433
2438
|
}
|
|
2434
2439
|
}), Ct = b(
|
|
2435
2440
|
() => wt.value + Y.value.size
|
|
@@ -2450,14 +2455,14 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2450
2455
|
};
|
|
2451
2456
|
return l(h.value.children), e;
|
|
2452
2457
|
}), o = b(
|
|
2453
|
-
() => $e.value.length > 0 && $e.value.every((e) =>
|
|
2458
|
+
() => $e.value.length > 0 && $e.value.every((e) => v.value.has(e))
|
|
2454
2459
|
), V = b(
|
|
2455
2460
|
() => !he.value && $e.value.length > 0
|
|
2456
2461
|
), f = () => {
|
|
2457
2462
|
if (o.value)
|
|
2458
|
-
for (const e of $e.value)
|
|
2463
|
+
for (const e of $e.value) v.value.delete(e);
|
|
2459
2464
|
else
|
|
2460
|
-
for (const e of $e.value)
|
|
2465
|
+
for (const e of $e.value) v.value.add(e);
|
|
2461
2466
|
}, oe = b(
|
|
2462
2467
|
() => !!(a.title || k.header || k["reorder-toggle"] || St.value || V.value || he.value)
|
|
2463
2468
|
), Re = _([]), Ce = _(0), Ke = () => {
|
|
@@ -2467,24 +2472,24 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2467
2472
|
} catch {
|
|
2468
2473
|
}
|
|
2469
2474
|
Re.value = [];
|
|
2470
|
-
},
|
|
2475
|
+
}, pe = _(null), At = (e, l) => {
|
|
2471
2476
|
const n = document.elementFromPoint(e, l);
|
|
2472
2477
|
if (!n) return null;
|
|
2473
2478
|
const A = n.closest(".a-le-row-wrapper");
|
|
2474
2479
|
if (!A || !ye.value || !ye.value.contains(A)) return null;
|
|
2475
2480
|
const j = ca(A.getAttribute("data-id"));
|
|
2476
2481
|
if (j === null) return null;
|
|
2477
|
-
const te = ie.value.find((
|
|
2482
|
+
const te = ie.value.find((ge) => ge.key === j);
|
|
2478
2483
|
return te ? { el: A, viewItem: te } : null;
|
|
2479
2484
|
}, de = (e, l) => {
|
|
2480
|
-
if (!
|
|
2485
|
+
if (!pe.value || !ye.value) return;
|
|
2481
2486
|
const n = At(e, l);
|
|
2482
2487
|
if (!n) {
|
|
2483
|
-
|
|
2488
|
+
pe.value.instruction = null;
|
|
2484
2489
|
return;
|
|
2485
2490
|
}
|
|
2486
2491
|
const A = ye.value.getBoundingClientRect(), te = (n.el.querySelector(":scope > .a-le-row") ?? n.el).getBoundingClientRect();
|
|
2487
|
-
|
|
2492
|
+
pe.value.instruction = Tl({
|
|
2488
2493
|
pointer: { x: e, y: l },
|
|
2489
2494
|
hoveredRow: {
|
|
2490
2495
|
key: n.viewItem.key,
|
|
@@ -2494,8 +2499,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2494
2499
|
siblingIndex: n.viewItem.siblingIndex,
|
|
2495
2500
|
siblingCount: n.viewItem.siblingCount
|
|
2496
2501
|
},
|
|
2497
|
-
sourceKey:
|
|
2498
|
-
sourceSubtreeDepth:
|
|
2502
|
+
sourceKey: pe.value.sourceKey,
|
|
2503
|
+
sourceSubtreeDepth: pe.value.sourceSubtreeDepth,
|
|
2499
2504
|
viewItems: ie.value,
|
|
2500
2505
|
maxDepth: a.maxDepth,
|
|
2501
2506
|
indentPx: Ea,
|
|
@@ -2509,26 +2514,26 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2509
2514
|
p("common.sortable.error.maxDeepExceed"), Ce.value++, Le(() => ot());
|
|
2510
2515
|
return;
|
|
2511
2516
|
}
|
|
2512
|
-
ae(l), e.makeChild && e.parentKey !== null &&
|
|
2517
|
+
ae(l), e.makeChild && e.parentKey !== null && v.value.add(e.parentKey);
|
|
2513
2518
|
}, ot = () => {
|
|
2514
2519
|
if (Ke(), !ke.value || !ye.value) return;
|
|
2515
2520
|
const e = Array.from(ye.value.querySelectorAll("." + Aa));
|
|
2516
2521
|
for (const l of e) {
|
|
2517
|
-
const n =
|
|
2522
|
+
const n = xn(l, [], {
|
|
2518
2523
|
group: { name: "a-nested", pull: !0, put: !0 },
|
|
2519
|
-
handle: "." +
|
|
2524
|
+
handle: "." + ii,
|
|
2520
2525
|
animation: 0,
|
|
2521
|
-
ghostClass:
|
|
2522
|
-
chosenClass:
|
|
2523
|
-
dragClass:
|
|
2526
|
+
ghostClass: En,
|
|
2527
|
+
chosenClass: An,
|
|
2528
|
+
dragClass: Sn,
|
|
2524
2529
|
fallbackOnBody: !0,
|
|
2525
2530
|
forceFallback: !0,
|
|
2526
2531
|
fallbackTolerance: 3,
|
|
2527
2532
|
onStart: (A) => {
|
|
2528
2533
|
const j = A.item, te = ca(j.getAttribute("data-id"));
|
|
2529
2534
|
if (te === null) return;
|
|
2530
|
-
const
|
|
2531
|
-
|
|
2535
|
+
const ge = i.findNode(te).node, se = ge ? i.calculateSubtreeDepth(ge) : 1;
|
|
2536
|
+
pe.value = {
|
|
2532
2537
|
sourceKey: te,
|
|
2533
2538
|
sourceSubtreeDepth: se,
|
|
2534
2539
|
instruction: null
|
|
@@ -2548,8 +2553,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2548
2553
|
},
|
|
2549
2554
|
onEnd: () => {
|
|
2550
2555
|
document.removeEventListener("pointermove", at);
|
|
2551
|
-
const A =
|
|
2552
|
-
if (
|
|
2556
|
+
const A = pe.value;
|
|
2557
|
+
if (pe.value = null, !A) return;
|
|
2553
2558
|
const j = A.instruction;
|
|
2554
2559
|
j !== null && j.type !== "blocked" && ho(j, A.sourceKey);
|
|
2555
2560
|
}
|
|
@@ -2558,7 +2563,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2558
2563
|
}
|
|
2559
2564
|
}, ca = (e) => {
|
|
2560
2565
|
if (e === null || e === "") return null;
|
|
2561
|
-
const l =
|
|
2566
|
+
const l = Pn(e);
|
|
2562
2567
|
return String(l) === e ? l : e;
|
|
2563
2568
|
};
|
|
2564
2569
|
ue(
|
|
@@ -2582,7 +2587,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2582
2587
|
Ke(), document.removeEventListener("pointermove", at);
|
|
2583
2588
|
});
|
|
2584
2589
|
const Ue = b(() => {
|
|
2585
|
-
const e =
|
|
2590
|
+
const e = pe.value;
|
|
2586
2591
|
if (!e || e.instruction === null || !ye.value) return null;
|
|
2587
2592
|
const l = e.instruction;
|
|
2588
2593
|
if (l.type === "blocked") return null;
|
|
@@ -2590,7 +2595,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2590
2595
|
`.a-le-row-wrapper[data-id="${CSS.escape(String(l.refKey))}"]`
|
|
2591
2596
|
);
|
|
2592
2597
|
if (!n) return null;
|
|
2593
|
-
const A = n.querySelector(":scope > .a-le-row"), j = ye.value.getBoundingClientRect(), te = (A ?? n).getBoundingClientRect(),
|
|
2598
|
+
const A = n.querySelector(":scope > .a-le-row"), j = ye.value.getBoundingClientRect(), te = (A ?? n).getBoundingClientRect(), ge = Pa + l.depth * Ea, se = l.refEdge === "top" ? te.top - j.top : te.bottom - j.top, ce = { top: se, left: ge, right: 16 };
|
|
2594
2599
|
let Qe = null;
|
|
2595
2600
|
if (l.levelRowKey !== null) {
|
|
2596
2601
|
const Z = ye.value.querySelector(
|
|
@@ -2601,34 +2606,34 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2601
2606
|
yt < se && (Qe = {
|
|
2602
2607
|
top: yt,
|
|
2603
2608
|
height: se - yt,
|
|
2604
|
-
left:
|
|
2609
|
+
left: ge
|
|
2605
2610
|
});
|
|
2606
2611
|
}
|
|
2607
2612
|
}
|
|
2608
2613
|
return { line: ce, connector: Qe };
|
|
2609
2614
|
}), ft = () => {
|
|
2610
|
-
ct.value && (
|
|
2615
|
+
ct.value && (Be(), a.factory && i.addItem(), m("add", void 0));
|
|
2611
2616
|
}, ua = (e) => {
|
|
2612
|
-
le.value && (
|
|
2617
|
+
le.value && (Be(), a.factory && i.addAfter(e.key, void 0, e.childrenAllowed), m("add", { afterId: e.key, childrenAllowed: e.childrenAllowed }));
|
|
2613
2618
|
}, fa = (e) => {
|
|
2614
|
-
le.value && e.canAddChild && (
|
|
2619
|
+
le.value && e.canAddChild && (Be(), v.value.add(e.key), m("add-child", e), a.factory && i.addChild(e.key, void 0, !0), m("add", { parentId: e.key, childrenAllowed: !0 }));
|
|
2615
2620
|
}, Et = (e) => {
|
|
2616
2621
|
if (!(!le.value || he.value)) {
|
|
2617
2622
|
if (Ne.value.has(e.key)) {
|
|
2618
2623
|
mt(e);
|
|
2619
2624
|
return;
|
|
2620
2625
|
}
|
|
2621
|
-
_e.value && st(e),
|
|
2626
|
+
_e.value && st(e), m("edit", e);
|
|
2622
2627
|
}
|
|
2623
2628
|
}, jt = (e) => {
|
|
2624
2629
|
if (a.disabled || a.loading) return;
|
|
2625
|
-
const l = e.key, n =
|
|
2626
|
-
n ?
|
|
2630
|
+
const l = e.key, n = v.value.has(l);
|
|
2631
|
+
n ? v.value.delete(l) : v.value.add(l), m("item-expand", e, !n);
|
|
2627
2632
|
}, ma = (e) => {
|
|
2628
2633
|
if (a.disabled || a.loading) return;
|
|
2629
2634
|
const l = e.key, n = T.value.has(l);
|
|
2630
|
-
n ? T.value.delete(l) : T.value.add(l),
|
|
2631
|
-
}, va = (e) => a.disableRowClick || a.disabled || a.loading || he.value ? !1 : !!(e.editing || e.expanded || !a.readonly && a.showEditButton),
|
|
2635
|
+
n ? T.value.delete(l) : T.value.add(l), m("item-expand", e, !n);
|
|
2636
|
+
}, va = (e) => a.disableRowClick || a.disabled || a.loading || he.value ? !1 : !!(e.editing || e.expanded || !a.readonly && a.showEditButton), po = (e) => {
|
|
2632
2637
|
if (va(e)) {
|
|
2633
2638
|
if (e.editing || e.expanded) {
|
|
2634
2639
|
mt(e);
|
|
@@ -2638,7 +2643,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2638
2643
|
}
|
|
2639
2644
|
}, {
|
|
2640
2645
|
deleteDialog: qt,
|
|
2641
|
-
deleteInFlight:
|
|
2646
|
+
deleteInFlight: go,
|
|
2642
2647
|
deleteError: bo,
|
|
2643
2648
|
onDeleteClick: ko,
|
|
2644
2649
|
onDeleteDialogConfirm: wo,
|
|
@@ -2647,24 +2652,24 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2647
2652
|
onDeleteConfirm: (e) => a.onDeleteConfirm ? a.onDeleteConfirm(e) : !0,
|
|
2648
2653
|
onDelete: (e) => a.onDelete?.(e),
|
|
2649
2654
|
onDeleted: (e) => {
|
|
2650
|
-
Ne.value.delete(e.key), Ge.value.delete(e.key), T.value.delete(e.key),
|
|
2655
|
+
Ne.value.delete(e.key), Ge.value.delete(e.key), T.value.delete(e.key), v.value.delete(e.key);
|
|
2651
2656
|
const l = a.deleteMode === "deferred";
|
|
2652
|
-
he.value && (l ? Y.value.add(e.key) : me.value.add(e.key)), i.deleteItem(e.key, { trackDeleted: l }),
|
|
2657
|
+
he.value && (l ? Y.value.add(e.key) : me.value.add(e.key)), i.deleteItem(e.key, { trackDeleted: l }), m("deleted", e);
|
|
2653
2658
|
},
|
|
2654
2659
|
disableDeleteConfirm: () => a.disableDeleteConfirm
|
|
2655
2660
|
}), ya = async (e) => {
|
|
2656
2661
|
le.value && await ko(e);
|
|
2657
2662
|
}, ha = async (e) => {
|
|
2658
|
-
a.onItemSave && await a.onItemSave(e.raw),
|
|
2659
|
-
},
|
|
2663
|
+
a.onItemSave && await a.onItemSave(e.raw), He(e), m("item-saved", e);
|
|
2664
|
+
}, pa = (e) => {
|
|
2660
2665
|
Ae(e);
|
|
2661
2666
|
}, mt = (e) => {
|
|
2662
|
-
Ut(e),
|
|
2667
|
+
Ut(e), m("close", e);
|
|
2663
2668
|
}, Gt = (e) => {
|
|
2664
2669
|
i.moveUp(e) && ae(e);
|
|
2665
|
-
}, Wt = (e) => {
|
|
2666
|
-
i.moveDown(e) && ae(e);
|
|
2667
2670
|
}, Ht = (e) => {
|
|
2671
|
+
i.moveDown(e) && ae(e);
|
|
2672
|
+
}, Wt = (e) => {
|
|
2668
2673
|
i.moveTop(e) && ae(e);
|
|
2669
2674
|
}, Jt = (e) => {
|
|
2670
2675
|
i.moveBottom(e) && ae(e);
|
|
@@ -2673,10 +2678,10 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2673
2678
|
p("common.sortable.error.maxDeepExceed");
|
|
2674
2679
|
return;
|
|
2675
2680
|
}
|
|
2676
|
-
ae(e.key),
|
|
2681
|
+
ae(e.key), m("indent", e);
|
|
2677
2682
|
}, Yt = (e) => {
|
|
2678
|
-
i.outdent(e.key) && (ae(e.key),
|
|
2679
|
-
}, Qt = (e) => oo(e, { compactField: a.compactField }),
|
|
2683
|
+
i.outdent(e.key) && (ae(e.key), m("outdent", e));
|
|
2684
|
+
}, Qt = (e) => oo(e, { compactField: a.compactField }), ga = (e, l) => l === void 0 ? null : i.rowState(e, l, Ne.value.has(l)), vt = /* @__PURE__ */ new Map(), xo = (e) => {
|
|
2680
2685
|
let l = vt.get(e);
|
|
2681
2686
|
return l || (l = {
|
|
2682
2687
|
edit: () => {
|
|
@@ -2689,7 +2694,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2689
2694
|
},
|
|
2690
2695
|
cancel: () => {
|
|
2691
2696
|
const n = re(e);
|
|
2692
|
-
n &&
|
|
2697
|
+
n && pa(n);
|
|
2693
2698
|
},
|
|
2694
2699
|
close: () => {
|
|
2695
2700
|
const n = re(e);
|
|
@@ -2716,8 +2721,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2716
2721
|
n && ma(n);
|
|
2717
2722
|
},
|
|
2718
2723
|
moveUp: () => Gt(e),
|
|
2719
|
-
moveDown: () =>
|
|
2720
|
-
moveTop: () =>
|
|
2724
|
+
moveDown: () => Ht(e),
|
|
2725
|
+
moveTop: () => Wt(e),
|
|
2721
2726
|
moveBottom: () => Jt(e),
|
|
2722
2727
|
indent: () => {
|
|
2723
2728
|
const n = re(e);
|
|
@@ -2740,7 +2745,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2740
2745
|
}
|
|
2741
2746
|
);
|
|
2742
2747
|
const So = (e) => ({
|
|
2743
|
-
item: { ...e, validationState:
|
|
2748
|
+
item: { ...e, validationState: ga(e.raw, e.key) },
|
|
2744
2749
|
raw: e.raw,
|
|
2745
2750
|
index: e.index,
|
|
2746
2751
|
key: e.key,
|
|
@@ -2770,7 +2775,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2770
2775
|
stateKeyPrefix: G.prefixFor(e.key),
|
|
2771
2776
|
actions: xo(e.key)
|
|
2772
2777
|
}), Ao = b(() => ({
|
|
2773
|
-
applying:
|
|
2778
|
+
applying: We.value,
|
|
2774
2779
|
hasPendingChanges: et.value,
|
|
2775
2780
|
movedCount: Ct.value,
|
|
2776
2781
|
error: Je.value,
|
|
@@ -2809,8 +2814,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2809
2814
|
l && mt(l);
|
|
2810
2815
|
},
|
|
2811
2816
|
onMoveUp: (e) => Gt(e),
|
|
2812
|
-
onMoveDown: (e) =>
|
|
2813
|
-
onMoveTop: (e) =>
|
|
2817
|
+
onMoveDown: (e) => Ht(e),
|
|
2818
|
+
onMoveTop: (e) => Wt(e),
|
|
2814
2819
|
onMoveBottom: (e) => Jt(e),
|
|
2815
2820
|
onIndent: (e) => {
|
|
2816
2821
|
const l = re(e);
|
|
@@ -2849,8 +2854,8 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2849
2854
|
let A = 0;
|
|
2850
2855
|
e === null ? A = h.value.children.length : A = i.findNode(e).node?.children?.length ?? 0;
|
|
2851
2856
|
const j = l === "first" ? 0 : A;
|
|
2852
|
-
i.moveTo(n.key, e, j) && (ae(n.key), e !== null &&
|
|
2853
|
-
},
|
|
2857
|
+
i.moveTo(n.key, e, j) && (ae(n.key), e !== null && v.value.add(e));
|
|
2858
|
+
}, Fo = b(() => ({
|
|
2854
2859
|
reorderMode: he.value,
|
|
2855
2860
|
readonly: a.readonly,
|
|
2856
2861
|
canInteract: le.value,
|
|
@@ -2868,32 +2873,32 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2868
2873
|
keyboardNav: Pt,
|
|
2869
2874
|
isRowClickable: va,
|
|
2870
2875
|
resolveCompactText: Qt,
|
|
2871
|
-
resolveValidation: (e, l) =>
|
|
2876
|
+
resolveValidation: (e, l) => ga(e, l),
|
|
2872
2877
|
buildSlotProps: So
|
|
2873
|
-
})),
|
|
2874
|
-
onRowClick:
|
|
2878
|
+
})), Bo = {
|
|
2879
|
+
onRowClick: po,
|
|
2875
2880
|
onChevronClick: jt,
|
|
2876
2881
|
onEditClick: Et,
|
|
2877
2882
|
onDeleteClick: ya,
|
|
2878
2883
|
onCloseClick: mt,
|
|
2879
2884
|
onSaveClick: ha,
|
|
2880
|
-
onCancelClick:
|
|
2885
|
+
onCancelClick: pa,
|
|
2881
2886
|
onAddAfterClick: ua,
|
|
2882
2887
|
onAddChildClick: fa,
|
|
2883
2888
|
moveUp: (e) => Gt(e),
|
|
2884
|
-
moveDown: (e) =>
|
|
2885
|
-
moveTop: (e) =>
|
|
2889
|
+
moveDown: (e) => Ht(e),
|
|
2890
|
+
moveTop: (e) => Wt(e),
|
|
2886
2891
|
moveBottom: (e) => Jt(e),
|
|
2887
2892
|
indent: Xt,
|
|
2888
2893
|
outdent: Yt,
|
|
2889
2894
|
openMoveToPosition: $o,
|
|
2890
2895
|
openChangeParent: Io
|
|
2891
|
-
}, Ro = b(() => ie.value.filter((e) => e.parentKey === null)), Ko = (e, l, n) => (i.addItem(l, { afterId: e ?? void 0, childrenAllowed: n }), Le(() => i.commit()), h.value), Lo = (e, l, n) => (
|
|
2892
|
-
i.deleteItem(e), Ne.value.delete(e), Ge.value.delete(e), T.value.delete(e),
|
|
2896
|
+
}, Ro = b(() => ie.value.filter((e) => e.parentKey === null)), Ko = (e, l, n) => (i.addItem(l, { afterId: e ?? void 0, childrenAllowed: n }), Le(() => i.commit()), h.value), Lo = (e, l, n) => (v.value.add(e), i.addItem(l, { parentId: e, asFirstChild: !0, childrenAllowed: n }), Le(() => i.commit()), h.value), Vo = (e) => {
|
|
2897
|
+
i.deleteItem(e), Ne.value.delete(e), Ge.value.delete(e), T.value.delete(e), v.value.delete(e), Le(() => i.commit());
|
|
2893
2898
|
}, zo = (e, l, n = null, A = null, j = null) => {
|
|
2894
2899
|
i.updateItem(e, l), Le(() => i.commit());
|
|
2895
2900
|
}, Mo = i.unsavedCount, No = () => {
|
|
2896
|
-
i.commit(),
|
|
2901
|
+
i.commit(), H.value = /* @__PURE__ */ new Set(), Fe();
|
|
2897
2902
|
};
|
|
2898
2903
|
Za(
|
|
2899
2904
|
() => a.unsavedSectionLabel ? { label: a.unsavedSectionLabel, dirty: i.hasUnsaved.value } : []
|
|
@@ -2901,7 +2906,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2901
2906
|
const ka = () => no(i, (e) => {
|
|
2902
2907
|
let l = i.findNode(e).parent;
|
|
2903
2908
|
for (; l; )
|
|
2904
|
-
|
|
2909
|
+
v.value.add(O(l.data)), l = i.findNode(O(l.data)).parent;
|
|
2905
2910
|
const n = i.viewItems.value.find((A) => A.key === e);
|
|
2906
2911
|
n && st(n);
|
|
2907
2912
|
});
|
|
@@ -2927,16 +2932,16 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2927
2932
|
enterReorderMode: Oe,
|
|
2928
2933
|
cancelReorderMode: Xe,
|
|
2929
2934
|
applyReorder: dt,
|
|
2930
|
-
expand: (e) =>
|
|
2931
|
-
collapse: (e) =>
|
|
2935
|
+
expand: (e) => v.value.add(e),
|
|
2936
|
+
collapse: (e) => v.value.delete(e),
|
|
2932
2937
|
toggleExpand: (e) => {
|
|
2933
|
-
|
|
2938
|
+
v.value.has(e) ? v.value.delete(e) : v.value.add(e);
|
|
2934
2939
|
},
|
|
2935
2940
|
expandDetail: (e) => T.value.add(e),
|
|
2936
2941
|
collapseDetail: (e) => T.value.delete(e)
|
|
2937
|
-
}), (e, l) => (g(),
|
|
2942
|
+
}), (e, l) => (g(), B("div", {
|
|
2938
2943
|
ref_key: "rootEl",
|
|
2939
|
-
ref:
|
|
2944
|
+
ref: P,
|
|
2940
2945
|
class: we(["a-nested-list-editor", [
|
|
2941
2946
|
`a-nested-list-editor--mode-${y.value}`,
|
|
2942
2947
|
{
|
|
@@ -2947,13 +2952,13 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2947
2952
|
}
|
|
2948
2953
|
]])
|
|
2949
2954
|
}, [
|
|
2950
|
-
K("div",
|
|
2951
|
-
oe.value ? (g(),
|
|
2955
|
+
K("div", Zl, [
|
|
2956
|
+
oe.value ? (g(), B("div", _l, [
|
|
2952
2957
|
L(e.$slots, "header", Q({ title: t.title }, ba.value), () => [
|
|
2953
|
-
t.title ? (g(),
|
|
2954
|
-
K("div",
|
|
2958
|
+
t.title ? (g(), B("h3", ei, $(t.title), 1)) : M("", !0),
|
|
2959
|
+
K("div", ti, [
|
|
2955
2960
|
c(he) ? L(e.$slots, "reorder-toolbar", De(Ie(Ao.value)), () => [
|
|
2956
|
-
s(
|
|
2961
|
+
s(kn, {
|
|
2957
2962
|
class: we({ "a-le-toolbar-status--pending": et.value }),
|
|
2958
2963
|
"has-pending-changes": et.value,
|
|
2959
2964
|
"pending-count": Ct.value,
|
|
@@ -2962,11 +2967,11 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2962
2967
|
s(q, {
|
|
2963
2968
|
variant: "text",
|
|
2964
2969
|
size: "small",
|
|
2965
|
-
disabled: c(
|
|
2970
|
+
disabled: c(We),
|
|
2966
2971
|
onClick: c(Xe)
|
|
2967
2972
|
}, {
|
|
2968
2973
|
default: r(() => [
|
|
2969
|
-
N(
|
|
2974
|
+
N($(c(x)("common.sortable.reorderCancel")), 1)
|
|
2970
2975
|
]),
|
|
2971
2976
|
_: 1
|
|
2972
2977
|
}, 8, ["disabled", "onClick"]),
|
|
@@ -2975,16 +2980,16 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2975
2980
|
variant: "flat",
|
|
2976
2981
|
size: "small",
|
|
2977
2982
|
"prepend-icon": "mdi-check",
|
|
2978
|
-
loading: c(
|
|
2979
|
-
disabled: c(
|
|
2983
|
+
loading: c(We),
|
|
2984
|
+
disabled: c(We) || !et.value,
|
|
2980
2985
|
onClick: c(dt)
|
|
2981
2986
|
}, {
|
|
2982
2987
|
default: r(() => [
|
|
2983
|
-
N(
|
|
2988
|
+
N($(c(x)("common.sortable.reorderApply")), 1)
|
|
2984
2989
|
]),
|
|
2985
2990
|
_: 1
|
|
2986
2991
|
}, 8, ["loading", "disabled", "onClick"])
|
|
2987
|
-
], void 0, 0) : (g(),
|
|
2992
|
+
], void 0, 0) : (g(), B(ne, { key: 1 }, [
|
|
2988
2993
|
V.value && Ee.value ? (g(), U(q, {
|
|
2989
2994
|
key: 0,
|
|
2990
2995
|
variant: "tonal",
|
|
@@ -2994,7 +2999,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
2994
2999
|
onClick: f
|
|
2995
3000
|
}, {
|
|
2996
3001
|
default: r(() => [
|
|
2997
|
-
s(
|
|
3002
|
+
s(W, {
|
|
2998
3003
|
icon: o.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
|
|
2999
3004
|
size: "18"
|
|
3000
3005
|
}, null, 8, ["icon"]),
|
|
@@ -3014,7 +3019,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3014
3019
|
onClick: f
|
|
3015
3020
|
}, {
|
|
3016
3021
|
default: r(() => [
|
|
3017
|
-
N(
|
|
3022
|
+
N($(o.value ? c(x)("common.sortable.collapseAll") : c(x)("common.sortable.expandAll")), 1)
|
|
3018
3023
|
]),
|
|
3019
3024
|
_: 1
|
|
3020
3025
|
}, 8, ["prepend-icon"])) : M("", !0),
|
|
@@ -3029,7 +3034,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3029
3034
|
onClick: c(Oe)
|
|
3030
3035
|
}, {
|
|
3031
3036
|
default: r(() => [
|
|
3032
|
-
s(
|
|
3037
|
+
s(W, {
|
|
3033
3038
|
icon: "mdi-sort",
|
|
3034
3039
|
size: "18"
|
|
3035
3040
|
}),
|
|
@@ -3050,7 +3055,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3050
3055
|
onClick: c(Oe)
|
|
3051
3056
|
}, {
|
|
3052
3057
|
default: r(() => [
|
|
3053
|
-
N(
|
|
3058
|
+
N($(c(x)("common.sortable.reorder")), 1)
|
|
3054
3059
|
]),
|
|
3055
3060
|
_: 1
|
|
3056
3061
|
}, 8, ["disabled", "onClick"]))
|
|
@@ -3059,13 +3064,13 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3059
3064
|
])
|
|
3060
3065
|
])
|
|
3061
3066
|
])) : M("", !0),
|
|
3062
|
-
t.loading ? (g(),
|
|
3067
|
+
t.loading ? (g(), B("div", ai, [
|
|
3063
3068
|
s(mo, {
|
|
3064
3069
|
indeterminate: "",
|
|
3065
3070
|
color: "primary",
|
|
3066
3071
|
size: "32"
|
|
3067
3072
|
})
|
|
3068
|
-
])) : t.error ? (g(),
|
|
3073
|
+
])) : t.error ? (g(), B("div", oi, [
|
|
3069
3074
|
s(da, {
|
|
3070
3075
|
type: "error",
|
|
3071
3076
|
variant: "tonal",
|
|
@@ -3073,11 +3078,11 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3073
3078
|
border: "start"
|
|
3074
3079
|
}, {
|
|
3075
3080
|
default: r(() => [
|
|
3076
|
-
N(
|
|
3081
|
+
N($(t.error), 1)
|
|
3077
3082
|
]),
|
|
3078
3083
|
_: 1
|
|
3079
3084
|
})
|
|
3080
|
-
])) : qe.value ? (g(),
|
|
3085
|
+
])) : qe.value ? (g(), B("div", ni, [
|
|
3081
3086
|
L(e.$slots, "empty", {
|
|
3082
3087
|
readonly: t.readonly,
|
|
3083
3088
|
disabled: t.disabled,
|
|
@@ -3090,23 +3095,23 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3090
3095
|
onAdd: ft
|
|
3091
3096
|
}, null, 8, ["title", "add-label", "can-add"])
|
|
3092
3097
|
])
|
|
3093
|
-
])) : (g(),
|
|
3098
|
+
])) : (g(), B("div", {
|
|
3094
3099
|
key: Ce.value,
|
|
3095
3100
|
ref_key: "rowsContainer",
|
|
3096
3101
|
ref: ye,
|
|
3097
|
-
class: we(["a-nested-list-editor__rows", { "a-nested-list-editor__rows--dragging":
|
|
3102
|
+
class: we(["a-nested-list-editor__rows", { "a-nested-list-editor__rows--dragging": pe.value !== null }])
|
|
3098
3103
|
}, [
|
|
3099
3104
|
K("div", {
|
|
3100
3105
|
class: we([Aa, "a-nested-list-editor__group--root"]),
|
|
3101
3106
|
"data-parent-id": ""
|
|
3102
3107
|
}, [
|
|
3103
|
-
(g(!0),
|
|
3108
|
+
(g(!0), B(ne, null, Ze(Ro.value, (n) => (g(), U(yo, {
|
|
3104
3109
|
key: String(n.key),
|
|
3105
3110
|
vi: n,
|
|
3106
3111
|
"view-items": ie.value,
|
|
3107
|
-
"drag-state":
|
|
3108
|
-
context:
|
|
3109
|
-
callbacks:
|
|
3112
|
+
"drag-state": pe.value,
|
|
3113
|
+
context: Fo.value,
|
|
3114
|
+
callbacks: Bo
|
|
3110
3115
|
}, {
|
|
3111
3116
|
item: r((A) => [
|
|
3112
3117
|
L(e.$slots, "item", Q({ ref_for: !0 }, A))
|
|
@@ -3135,11 +3140,11 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3135
3140
|
_: 3
|
|
3136
3141
|
}, 8, ["vi", "view-items", "drag-state", "context"]))), 128))
|
|
3137
3142
|
], 2),
|
|
3138
|
-
Ue.value !== null ? (g(),
|
|
3139
|
-
Ue.value.connector !== null ? (g(),
|
|
3143
|
+
Ue.value !== null ? (g(), B(ne, { key: 0 }, [
|
|
3144
|
+
Ue.value.connector !== null ? (g(), B("div", {
|
|
3140
3145
|
key: 0,
|
|
3141
3146
|
class: "a-nested-list-editor__drop-connector",
|
|
3142
|
-
style:
|
|
3147
|
+
style: pt({
|
|
3143
3148
|
left: `${Ue.value.connector.left}px`,
|
|
3144
3149
|
top: `${Ue.value.connector.top}px`,
|
|
3145
3150
|
height: `${Ue.value.connector.height}px`
|
|
@@ -3147,7 +3152,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3147
3152
|
}, null, 4)) : M("", !0),
|
|
3148
3153
|
K("div", {
|
|
3149
3154
|
class: "a-nested-list-editor__drop-line",
|
|
3150
|
-
style:
|
|
3155
|
+
style: pt({
|
|
3151
3156
|
top: `${Ue.value.line.top}px`,
|
|
3152
3157
|
left: `${Ue.value.line.left}px`,
|
|
3153
3158
|
right: `${Ue.value.line.right}px`
|
|
@@ -3168,15 +3173,15 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3168
3173
|
class: "a-le-row-add",
|
|
3169
3174
|
onClick: ft
|
|
3170
3175
|
}, [
|
|
3171
|
-
s(
|
|
3176
|
+
s(W, {
|
|
3172
3177
|
icon: "mdi-plus",
|
|
3173
3178
|
size: "18"
|
|
3174
3179
|
}),
|
|
3175
|
-
K("span", null,
|
|
3180
|
+
K("span", null, $(ut.value), 1)
|
|
3176
3181
|
])
|
|
3177
3182
|
], void 0, 5) : M("", !0)
|
|
3178
3183
|
]),
|
|
3179
|
-
s(
|
|
3184
|
+
s(wn, {
|
|
3180
3185
|
modelValue: Zt.value,
|
|
3181
3186
|
"onUpdate:modelValue": l[0] || (l[0] = (n) => Zt.value = n),
|
|
3182
3187
|
total: _t.value?.total ?? 0,
|
|
@@ -3184,12 +3189,12 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3184
3189
|
"item-label": Po.value,
|
|
3185
3190
|
onConfirm: Do
|
|
3186
3191
|
}, null, 8, ["modelValue", "total", "current-index", "item-label"]),
|
|
3187
|
-
s(
|
|
3192
|
+
s(Ql, {
|
|
3188
3193
|
modelValue: ea.value,
|
|
3189
3194
|
"onUpdate:modelValue": l[1] || (l[1] = (n) => ea.value = n),
|
|
3190
3195
|
tree: h.value,
|
|
3191
3196
|
"source-key": $t.value?.key ?? null,
|
|
3192
|
-
"key-field": c(
|
|
3197
|
+
"key-field": c(F),
|
|
3193
3198
|
"max-depth": t.maxDepth,
|
|
3194
3199
|
"resolve-label": Qt,
|
|
3195
3200
|
"calculate-subtree-depth": c(i).calculateSubtreeDepth,
|
|
@@ -3203,17 +3208,17 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3203
3208
|
"confirm-label": c(x)("common.sortable.delete"),
|
|
3204
3209
|
"cancel-label": c(x)("common.button.cancel"),
|
|
3205
3210
|
error: c(bo),
|
|
3206
|
-
"in-flight": c(
|
|
3211
|
+
"in-flight": c(go),
|
|
3207
3212
|
onConfirm: c(wo),
|
|
3208
3213
|
onCancel: c(Co)
|
|
3209
3214
|
}, null, 8, ["modelValue", "title", "text", "confirm-label", "cancel-label", "error", "in-flight", "onConfirm", "onCancel"]),
|
|
3210
|
-
K("div",
|
|
3215
|
+
K("div", li, $(c(Pt).grabbedKey.value !== null ? c(x)("common.sortable.keyboardGrab.status", {
|
|
3211
3216
|
n: c(Pt).grabbedIndex.value + 1,
|
|
3212
3217
|
total: c(Pt).totalCount.value
|
|
3213
3218
|
}) : ""), 1)
|
|
3214
3219
|
], 2));
|
|
3215
3220
|
}
|
|
3216
|
-
}),
|
|
3221
|
+
}), si = { class: "a-unsaved-sections" }, ri = /* @__PURE__ */ ze({
|
|
3217
3222
|
__name: "AUnsavedConfirmDialog",
|
|
3218
3223
|
props: /* @__PURE__ */ Te({
|
|
3219
3224
|
title: { default: void 0 },
|
|
@@ -3227,7 +3232,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3227
3232
|
}),
|
|
3228
3233
|
emits: /* @__PURE__ */ Te(["resolve"], ["update:modelValue"]),
|
|
3229
3234
|
setup(t, { emit: C }) {
|
|
3230
|
-
const u = C, a = it(t, "modelValue"), { t:
|
|
3235
|
+
const u = C, a = it(t, "modelValue"), { t: m } = je(), h = () => {
|
|
3231
3236
|
u("resolve", !1);
|
|
3232
3237
|
}, y = () => {
|
|
3233
3238
|
u("resolve", !0);
|
|
@@ -3243,22 +3248,22 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3243
3248
|
default: r(() => [
|
|
3244
3249
|
s(uo, null, {
|
|
3245
3250
|
default: r(() => [
|
|
3246
|
-
N(
|
|
3251
|
+
N($(t.title ?? c(m)("common.sortable.unsavedChanges.title")), 1)
|
|
3247
3252
|
]),
|
|
3248
3253
|
_: 1
|
|
3249
3254
|
}),
|
|
3250
3255
|
s(Rt, null, {
|
|
3251
3256
|
default: r(() => [
|
|
3252
|
-
t.body ? (g(),
|
|
3253
|
-
N(
|
|
3254
|
-
], 64)) : t.dirtyLabels.length ? (g(),
|
|
3255
|
-
N(
|
|
3256
|
-
K("ul",
|
|
3257
|
-
(g(!0),
|
|
3257
|
+
t.body ? (g(), B(ne, { key: 0 }, [
|
|
3258
|
+
N($(t.body), 1)
|
|
3259
|
+
], 64)) : t.dirtyLabels.length ? (g(), B(ne, { key: 1 }, [
|
|
3260
|
+
N($(c(m)("common.sortable.unsavedChanges.sectionsIntro")) + " ", 1),
|
|
3261
|
+
K("ul", si, [
|
|
3262
|
+
(g(!0), B(ne, null, Ze(t.dirtyLabels, (p, P) => (g(), B("li", { key: P }, $(p), 1))), 128))
|
|
3258
3263
|
]),
|
|
3259
|
-
N(" " +
|
|
3260
|
-
], 64)) : (g(),
|
|
3261
|
-
N(
|
|
3264
|
+
N(" " + $(c(m)("common.sortable.unsavedChanges.leaveQuestion")), 1)
|
|
3265
|
+
], 64)) : (g(), B(ne, { key: 2 }, [
|
|
3266
|
+
N($(c(m)("common.sortable.unsavedChanges.body")), 1)
|
|
3262
3267
|
], 64))
|
|
3263
3268
|
]),
|
|
3264
3269
|
_: 1
|
|
@@ -3271,7 +3276,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3271
3276
|
onClick: h
|
|
3272
3277
|
}, {
|
|
3273
3278
|
default: r(() => [
|
|
3274
|
-
N(
|
|
3279
|
+
N($(t.stayLabel ?? c(m)("common.sortable.unsavedChanges.stay")), 1)
|
|
3275
3280
|
]),
|
|
3276
3281
|
_: 1
|
|
3277
3282
|
}),
|
|
@@ -3281,7 +3286,7 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3281
3286
|
onClick: y
|
|
3282
3287
|
}, {
|
|
3283
3288
|
default: r(() => [
|
|
3284
|
-
N(
|
|
3289
|
+
N($(t.discardLabel ?? c(m)("common.sortable.unsavedChanges.discard")), 1)
|
|
3285
3290
|
]),
|
|
3286
3291
|
_: 1
|
|
3287
3292
|
})
|
|
@@ -3295,36 +3300,36 @@ const Qn = { class: "d-flex flex-column w-100 px-1 align-center" }, Zn = { class
|
|
|
3295
3300
|
_: 1
|
|
3296
3301
|
}, 8, ["modelValue"]));
|
|
3297
3302
|
}
|
|
3298
|
-
}),
|
|
3299
|
-
function
|
|
3300
|
-
const C =
|
|
3303
|
+
}), ji = /* @__PURE__ */ lo(ri, [["__scopeId", "data-v-8342a164"]]), di = 8e3, ci = (t) => t == null ? !1 : typeof t == "boolean" ? t : t instanceof Set ? t.size > 0 : Array.isArray(t) ? t.length > 0 : !!t, $a = (t, C) => t === void 0 ? C : typeof t == "boolean" ? t : t.value;
|
|
3304
|
+
function qi(t) {
|
|
3305
|
+
const C = $n();
|
|
3301
3306
|
if (t.ownSections) {
|
|
3302
|
-
const R = t.ownSections, S = /* @__PURE__ */ Symbol("unsaved.section.own"),
|
|
3307
|
+
const R = t.ownSections, S = /* @__PURE__ */ Symbol("unsaved.section.own"), v = b(() => {
|
|
3303
3308
|
const T = R();
|
|
3304
3309
|
return Array.isArray(T) ? T : [T];
|
|
3305
3310
|
});
|
|
3306
|
-
C.register(S,
|
|
3311
|
+
C.register(S, v);
|
|
3307
3312
|
}
|
|
3308
3313
|
const u = b(
|
|
3309
|
-
() => t.sources.some((R) =>
|
|
3314
|
+
() => t.sources.some((R) => ci(R.value)) || C.dirtyLabels.value.length > 0
|
|
3310
3315
|
), a = _(!1);
|
|
3311
|
-
let
|
|
3316
|
+
let m = null, h = !1, y = null;
|
|
3312
3317
|
const x = () => {
|
|
3313
3318
|
y !== null && (clearTimeout(y), y = null);
|
|
3314
3319
|
}, k = () => h ? (h = !1, x(), Promise.resolve(!0)) : new Promise((R) => {
|
|
3315
|
-
|
|
3320
|
+
m = R, a.value = !0;
|
|
3316
3321
|
}), p = (R) => {
|
|
3317
|
-
a.value = !1,
|
|
3318
|
-
},
|
|
3322
|
+
a.value = !1, m && (m(R), m = null);
|
|
3323
|
+
}, P = () => {
|
|
3319
3324
|
h = !0, x(), y = setTimeout(() => {
|
|
3320
3325
|
h = !1, y = null;
|
|
3321
|
-
},
|
|
3326
|
+
}, di);
|
|
3322
3327
|
}, I = () => {
|
|
3323
3328
|
h = !1, x();
|
|
3324
3329
|
};
|
|
3325
3330
|
if ($a(t.guardRoute, !0) && xa())
|
|
3326
3331
|
try {
|
|
3327
|
-
|
|
3332
|
+
Mn(async () => u.value ? await k() : !0);
|
|
3328
3333
|
} catch {
|
|
3329
3334
|
}
|
|
3330
3335
|
if ($a(t.guardWindowUnload, !0)) {
|
|
@@ -3338,12 +3343,12 @@ function Ui(t) {
|
|
|
3338
3343
|
if (t.guardDialogModel) {
|
|
3339
3344
|
const R = t.guardDialogModel;
|
|
3340
3345
|
let S = !1;
|
|
3341
|
-
ue(R, async (
|
|
3346
|
+
ue(R, async (v, T) => {
|
|
3342
3347
|
if (S) {
|
|
3343
3348
|
S = !1;
|
|
3344
3349
|
return;
|
|
3345
3350
|
}
|
|
3346
|
-
T === !0 &&
|
|
3351
|
+
T === !0 && v === !1 && u.value && (S = !0, R.value = !0, await k() && (S = !0, R.value = !1));
|
|
3347
3352
|
});
|
|
3348
3353
|
}
|
|
3349
3354
|
return xa() && na(x), {
|
|
@@ -3351,26 +3356,26 @@ function Ui(t) {
|
|
|
3351
3356
|
dirtyLabels: C.dirtyLabels,
|
|
3352
3357
|
promptOpen: a,
|
|
3353
3358
|
resolvePrompt: p,
|
|
3354
|
-
acknowledge:
|
|
3359
|
+
acknowledge: P,
|
|
3355
3360
|
unacknowledge: I
|
|
3356
3361
|
};
|
|
3357
3362
|
}
|
|
3358
|
-
function
|
|
3363
|
+
function Gi(t, C) {
|
|
3359
3364
|
return (...u) => {
|
|
3360
3365
|
t.acknowledge();
|
|
3361
3366
|
let a;
|
|
3362
3367
|
try {
|
|
3363
3368
|
a = C(...u);
|
|
3364
|
-
} catch (
|
|
3365
|
-
throw t.unacknowledge(),
|
|
3369
|
+
} catch (m) {
|
|
3370
|
+
throw t.unacknowledge(), m;
|
|
3366
3371
|
}
|
|
3367
|
-
return a instanceof Promise ? a.catch((
|
|
3368
|
-
throw t.unacknowledge(),
|
|
3372
|
+
return a instanceof Promise ? a.catch((m) => {
|
|
3373
|
+
throw t.unacknowledge(), m;
|
|
3369
3374
|
}) : a;
|
|
3370
3375
|
};
|
|
3371
3376
|
}
|
|
3372
|
-
function
|
|
3373
|
-
const u = C.keyField ?? "id", a = C.positionField ?? "position",
|
|
3377
|
+
function Hi(t, C = {}) {
|
|
3378
|
+
const u = C.keyField ?? "id", a = C.positionField ?? "position", m = C.positionMultiplier ?? 1, h = C.updatePosition === !0;
|
|
3374
3379
|
h && u === a && console.warn(
|
|
3375
3380
|
`[list-editor] key-field === position-field ("${u}") with update-position enabled. Reordering renumbers positions and thus changes row keys, breaking dirty/validity tracking. Point key-field at a stable identity field (e.g. "id").`
|
|
3376
3381
|
);
|
|
@@ -3399,13 +3404,13 @@ function qi(t, C = {}) {
|
|
|
3399
3404
|
position: d[a]
|
|
3400
3405
|
}));
|
|
3401
3406
|
return x(E), E;
|
|
3402
|
-
}), p = (E) =>
|
|
3407
|
+
}), p = (E) => Dn(E, { positionField: a, positionMultiplier: m }), P = (E) => {
|
|
3403
3408
|
const d = h ? p(E) : E;
|
|
3404
3409
|
return t.value = d, d;
|
|
3405
3410
|
}, I = (E) => E !== null && typeof E == "object", R = (E, d) => E.findIndex((D) => D[u] === d), S = (E, d) => {
|
|
3406
3411
|
const D = I(d) ? d[u] : d;
|
|
3407
3412
|
return R(E, D);
|
|
3408
|
-
},
|
|
3413
|
+
}, v = (E, d) => {
|
|
3409
3414
|
if (!d) return E.length;
|
|
3410
3415
|
if (d.afterId !== void 0) {
|
|
3411
3416
|
const D = R(E, d.afterId);
|
|
@@ -3416,106 +3421,106 @@ function qi(t, C = {}) {
|
|
|
3416
3421
|
return {
|
|
3417
3422
|
viewItems: k,
|
|
3418
3423
|
addItem: (E, d) => {
|
|
3419
|
-
const D = [...t.value], w =
|
|
3420
|
-
return D.splice(w, 0, E),
|
|
3424
|
+
const D = [...t.value], w = v(D, d);
|
|
3425
|
+
return D.splice(w, 0, E), P(D);
|
|
3421
3426
|
},
|
|
3422
3427
|
deleteItem: (E) => {
|
|
3423
3428
|
const d = S(t.value, E);
|
|
3424
3429
|
if (d === -1) return t.value;
|
|
3425
3430
|
const D = [...t.value];
|
|
3426
|
-
return D.splice(d, 1),
|
|
3431
|
+
return D.splice(d, 1), P(D);
|
|
3427
3432
|
},
|
|
3428
3433
|
updateItem: (E, d) => {
|
|
3429
3434
|
const D = S(t.value, E);
|
|
3430
3435
|
if (D === -1) return t.value;
|
|
3431
3436
|
const w = [...t.value];
|
|
3432
|
-
return w[D] = d,
|
|
3437
|
+
return w[D] = d, P(w);
|
|
3433
3438
|
},
|
|
3434
3439
|
moveItem: (E, d) => {
|
|
3435
3440
|
const D = t.value.length;
|
|
3436
3441
|
if (E === d || E < 0 || E >= D || d < 0 || d >= D) return t.value;
|
|
3437
3442
|
const w = [...t.value], [i] = w.splice(E, 1);
|
|
3438
|
-
return w.splice(d, 0, i),
|
|
3443
|
+
return w.splice(d, 0, i), P(w);
|
|
3439
3444
|
},
|
|
3440
3445
|
recalculatePositions: p
|
|
3441
3446
|
};
|
|
3442
3447
|
}
|
|
3443
|
-
function
|
|
3448
|
+
function Wi() {
|
|
3444
3449
|
const t = _(/* @__PURE__ */ new Map()), C = /* @__PURE__ */ new Set(), u = (y) => t.value.get(y) ?? C, a = (y, x) => {
|
|
3445
3450
|
x.size === 0 ? t.value.delete(y) : t.value.set(y, x), t.value = new Map(t.value);
|
|
3446
|
-
},
|
|
3451
|
+
}, m = b(() => {
|
|
3447
3452
|
const y = /* @__PURE__ */ new Set();
|
|
3448
3453
|
for (const [x, k] of t.value.entries())
|
|
3449
3454
|
for (const p of k)
|
|
3450
3455
|
y.add(`${String(x)}:${String(p)}`);
|
|
3451
3456
|
return y;
|
|
3452
|
-
}), h = b(() =>
|
|
3453
|
-
return { getForParent: u, setForParent: a, merged:
|
|
3457
|
+
}), h = b(() => m.value.size);
|
|
3458
|
+
return { getForParent: u, setForParent: a, merged: m, count: h };
|
|
3454
3459
|
}
|
|
3455
3460
|
export {
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3461
|
+
Ki as ADatatableOrdering,
|
|
3462
|
+
Jn as ADatatablePagination,
|
|
3463
|
+
Yi as AFilterBooleanSelect,
|
|
3464
|
+
Qi as AFilterDatetimePicker,
|
|
3465
|
+
Zi as AFilterInteger,
|
|
3466
|
+
_i as AFilterRemoteAutocomplete,
|
|
3467
|
+
es as AFilterRemoteAutocompleteWithMinimal,
|
|
3468
|
+
ts as AFilterString,
|
|
3469
|
+
as as AFilterTimeInterval,
|
|
3470
|
+
os as AFilterValueObjectOptionsSelect,
|
|
3471
|
+
ns as AFilterWrapper,
|
|
3472
|
+
Ri as AFilterWrapperSidebar,
|
|
3473
|
+
ls as AFilterWrapperSubjectSelect,
|
|
3474
|
+
is as AFormRemoteAutocomplete,
|
|
3475
|
+
ss as AFormRemoteAutocompleteWithCached,
|
|
3476
|
+
Oi as AListEditor,
|
|
3477
|
+
Ui as ANestedSortableListEditor,
|
|
3478
|
+
rs as ASortableListEditor,
|
|
3479
|
+
Ni as ASubjectSelect,
|
|
3480
|
+
ji as AUnsavedConfirmDialog,
|
|
3476
3481
|
Da as DatatablePaginationKey,
|
|
3477
3482
|
Oo as FilterConfigKey,
|
|
3478
3483
|
Uo as FilterDataKey,
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3484
|
+
ds as FilterInnerConfigKey,
|
|
3485
|
+
cs as FilterInnerDataKey,
|
|
3486
|
+
us as FiltersSelected,
|
|
3487
|
+
fs as ListEditorStateScopeKey,
|
|
3488
|
+
ms as SharedReorderRegistryKey,
|
|
3489
|
+
vs as TimeIntervalSpecialOptions,
|
|
3490
|
+
ys as UserAdminConfigLayoutType,
|
|
3491
|
+
hs as UserAdminConfigLayoutTypeDefault,
|
|
3492
|
+
ps as UserAdminConfigType,
|
|
3493
|
+
gs as UserAdminConfigTypeDefault,
|
|
3494
|
+
Zn as createDatatableColumnsConfig,
|
|
3495
|
+
bs as createFilter,
|
|
3496
|
+
ks as createFilterStore,
|
|
3497
|
+
ws as createListEditorStateScope,
|
|
3493
3498
|
ta as generateListQuery,
|
|
3494
|
-
|
|
3499
|
+
Cs as nextListEditorTempId,
|
|
3495
3500
|
Ja as provideListEditorStateScope,
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3501
|
+
Dn as renumberPositions,
|
|
3502
|
+
xs as sortByPosition,
|
|
3503
|
+
Ss as sortByPositionDeep,
|
|
3504
|
+
Li as useApiFetchByIds,
|
|
3505
|
+
tn as useApiFetchList,
|
|
3506
|
+
Vi as useApiFetchListBatch,
|
|
3507
|
+
Jo as useApiQueryBuilder,
|
|
3508
|
+
As as useApiRequest,
|
|
3509
|
+
dn as useFilterHelpers,
|
|
3510
|
+
Gi as useGuardedDelete,
|
|
3511
|
+
zi as useJobApi,
|
|
3512
|
+
Hi as useListEditor,
|
|
3513
|
+
mn as useListEditorController,
|
|
3514
|
+
fn as useListEditorStateEntry,
|
|
3515
|
+
Es as useNestedListEditor,
|
|
3511
3516
|
gn as useNestedListEditorController,
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
+
pn as useNestedListEditorStateEntry,
|
|
3518
|
+
Wi as useNestedUnsavedKeys,
|
|
3519
|
+
Ha as usePagination,
|
|
3520
|
+
Mi as useSubjectSelect,
|
|
3521
|
+
qi as useUnsavedChangesGuard,
|
|
3517
3522
|
Za as useUnsavedSection,
|
|
3518
|
-
|
|
3519
|
-
|
|
3523
|
+
Ps as useUserAdminConfigApi,
|
|
3524
|
+
$s as useUserAdminConfigFactory
|
|
3520
3525
|
};
|
|
3521
3526
|
//# sourceMappingURL=labs.js.map
|