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