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