@anzusystems/common-admin 1.47.0-beta.dev-1788935852 → 1.47.0-beta.dev-1788935853
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-Cb9Sk6H6.mjs → AFormRemoteAutocomplete-CHvecQMq.mjs} +2326 -2301
- package/dist/AFormRemoteAutocomplete-CHvecQMq.mjs.map +1 -0
- package/dist/common-admin.css +1 -1
- package/dist/common-admin.d.ts +731 -13
- package/dist/common-admin.js +2672 -2208
- package/dist/common-admin.js.map +1 -1
- package/dist/{esm-CdGfO7hW.mjs → esm-BP456dlq.mjs} +2 -2
- package/dist/{esm-CdGfO7hW.mjs.map → esm-BP456dlq.mjs.map} +1 -1
- package/dist/labs.d.ts +18 -2
- package/dist/labs.js +950 -950
- package/dist/labs.js.map +1 -1
- package/dist/{webfontloader-MU9EmUQJ.mjs → webfontloader-ClDWjC2G.mjs} +2 -2
- package/dist/{webfontloader-MU9EmUQJ.mjs.map → webfontloader-ClDWjC2G.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/AFormRemoteAutocomplete-Cb9Sk6H6.mjs.map +0 -1
package/dist/labs.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { $ as e, $r as t, A as n,
|
|
2
|
-
import { Fragment as
|
|
1
|
+
import { $ as e, $r as t, A as n, At as r, B as i, Bt as a, C as o, Cn as s, Ct as c, D as l, Dn as u, Dt as d, E as f, En as p, Et as m, F as h, I as g, J as _, K as v, Kn as y, Kr as b, L as ee, M as te, Mn as x, Mt as ne, N as re, Nn as ie, Nt as ae, O as S, On as oe, Ot as se, P as ce, Q as le, Qn as C, Qr as ue, R as de, Rt as fe, S as pe, St as me, T as he, Tt as w, Un as T, V as ge, X as _e, Y as E, Yn as ve, Z as ye, _ as be, _t as xe, a as Se, b as Ce, bn as we, bt as Te, c as Ee, ci as D, ct as De, d as Oe, di as ke, dt as Ae, ei as je, et as Me, f as Ne, fi as O, ft as Pe, g as Fe, gn as Ie, gt as Le, h as Re, hn as ze, ht as Be, i as Ve, it as k, j as He, jt as Ue, k as We, kn as Ge, kt as Ke, l as qe, lt as Je, m as Ye, mt as Xe, n as Ze, nr as Qe, nt as $e, o as et, ot as tt, p as nt, pi as rt, pt as it, q as at, qn as ot, qr as st, r as ct, rt as lt, s as ut, st as dt, t as ft, ti as A, u as pt, ui as mt, ut as ht, v as gt, vn as _t, vt, w as yt, wn as bt, wt as xt, x as St, xn as Ct, xt as wt, y as Tt, yn as Et, yt as Dt, z as Ot, zt as kt } from "./AFormRemoteAutocomplete-CHvecQMq.mjs";
|
|
2
|
+
import { Fragment as j, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createTextVNode as L, createVNode as R, defineComponent as z, getCurrentInstance as At, guardReactiveProps as jt, inject as Mt, isRef as Nt, mergeModels as Pt, mergeProps as B, nextTick as Ft, normalizeClass as V, normalizeProps as It, normalizeStyle as Lt, onBeforeUnmount as Rt, onMounted as zt, openBlock as H, provide as Bt, ref as U, renderList as Vt, renderSlot as W, resolveComponent as Ht, shallowRef as Ut, toDisplayString as G, toRaw as Wt, unref as K, useModel as Gt, useSlots as Kt, useTemplateRef as qt, vShow as Jt, watch as q, withCtx as J, withDirectives as Yt, withKeys as Xt, withModifiers as Y } from "vue";
|
|
3
3
|
import { useI18n as Zt } from "vue-i18n";
|
|
4
4
|
import { VSpacer as Qt } from "vuetify/components/VGrid";
|
|
5
5
|
import { VAlert as $t } from "vuetify/components/VAlert";
|
|
6
|
-
import { VIcon as
|
|
6
|
+
import { VIcon as X } from "vuetify/components/VIcon";
|
|
7
7
|
import { VProgressCircular as en } from "vuetify/components/VProgressCircular";
|
|
8
8
|
import { VCard as tn, VCardActions as nn, VCardText as rn, VCardTitle as an } from "vuetify/components/VCard";
|
|
9
|
-
import { VTooltip as
|
|
10
|
-
import { useDebounceFn as
|
|
11
|
-
import { Intersect as
|
|
12
|
-
import { useDisplay as
|
|
13
|
-
import { VBtn as
|
|
14
|
-
import { VBtnToggle as
|
|
15
|
-
import { VList as
|
|
16
|
-
import { VMenu as
|
|
17
|
-
import { VToolbar as
|
|
18
|
-
import { onBeforeRouteLeave as
|
|
19
|
-
import
|
|
20
|
-
import { VDialog as
|
|
21
|
-
import { VForm as
|
|
22
|
-
import { VRadio as
|
|
23
|
-
import { VRadioGroup as
|
|
9
|
+
import { VTooltip as on } from "vuetify/components/VTooltip";
|
|
10
|
+
import { useDebounceFn as sn, useThrottleFn as cn } from "@vueuse/core";
|
|
11
|
+
import { Intersect as ln } from "vuetify/directives";
|
|
12
|
+
import { useDisplay as un } from "vuetify";
|
|
13
|
+
import { VBtn as Z } from "vuetify/components/VBtn";
|
|
14
|
+
import { VBtnToggle as dn } from "vuetify/components/VBtnToggle";
|
|
15
|
+
import { VList as fn, VListItem as Q, VListItemTitle as pn } from "vuetify/components/VList";
|
|
16
|
+
import { VMenu as $ } from "vuetify/components/VMenu";
|
|
17
|
+
import { VToolbar as mn } from "vuetify/components/VToolbar";
|
|
18
|
+
import { onBeforeRouteLeave as hn } from "vue-router";
|
|
19
|
+
import gn from "axios";
|
|
20
|
+
import { VDialog as _n } from "vuetify/components/VDialog";
|
|
21
|
+
import { VForm as vn } from "vuetify/components/VForm";
|
|
22
|
+
import { VRadio as yn } from "vuetify/components/VRadio";
|
|
23
|
+
import { VRadioGroup as bn } from "vuetify/components/VRadioGroup";
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/labs/filters/AFilterWrapperSidebar.vue
|
|
26
|
-
var
|
|
26
|
+
var xn = /* @__PURE__ */ z({
|
|
27
27
|
__name: "AFilterWrapperSidebar",
|
|
28
28
|
props: { formName: { default: "search" } },
|
|
29
29
|
emits: ["submit"],
|
|
30
30
|
setup(e, { expose: t, emit: n }) {
|
|
31
|
-
let
|
|
32
|
-
if (
|
|
33
|
-
Bt(
|
|
34
|
-
let
|
|
35
|
-
Bt(
|
|
36
|
-
let { clearAll: c, clearAllFilterSelected: l } =
|
|
37
|
-
|
|
31
|
+
let i = n, a = Mt(w), o = Mt(m);
|
|
32
|
+
if (O(a) || O(o)) throw Error("Incorrect provide/inject config.");
|
|
33
|
+
Bt(r, U(0));
|
|
34
|
+
let s = U(/* @__PURE__ */ new Map());
|
|
35
|
+
Bt(Ke, s);
|
|
36
|
+
let { clearAll: c, clearAllFilterSelected: l } = wt(), u = () => {
|
|
37
|
+
i("submit");
|
|
38
38
|
};
|
|
39
39
|
return t({ resetFilter: () => {
|
|
40
|
-
c(
|
|
41
|
-
} }), (t, n) => (
|
|
40
|
+
c(o, a), l(o, a, s);
|
|
41
|
+
} }), (t, n) => (H(), N(vn, {
|
|
42
42
|
name: e.formName,
|
|
43
|
-
onSubmit:
|
|
44
|
-
onKeyup: Xt(
|
|
43
|
+
onSubmit: Y(u, ["prevent"]),
|
|
44
|
+
onKeyup: Xt(u, ["enter"])
|
|
45
45
|
}, {
|
|
46
|
-
default:
|
|
46
|
+
default: J(() => [W(t.$slots, "default")]),
|
|
47
47
|
_: 3
|
|
48
48
|
}, 8, ["name"]));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), Sn = { class: "d-flex align-center justify-center" }, Cn = { class: "text-body-small mr-1" }, wn = /* @__PURE__ */ z({
|
|
51
51
|
__name: "ADatatableOrdering",
|
|
52
52
|
props: /*@__PURE__*/ Pt({
|
|
53
53
|
variant: { default: "id" },
|
|
@@ -65,43 +65,43 @@ var yn = /* @__PURE__ */ kt({
|
|
|
65
65
|
}),
|
|
66
66
|
emits: /*@__PURE__*/ Pt(["sortByChange"], ["update:modelValue"]),
|
|
67
67
|
setup(e, { emit: t }) {
|
|
68
|
-
let n = e, r = t, i = Gt(e, "modelValue"), a = Mt(
|
|
69
|
-
if (
|
|
68
|
+
let n = e, r = t, i = Gt(e, "modelValue"), a = Mt(xt);
|
|
69
|
+
if (O(a)) throw Error("Incorrect provide/inject config.");
|
|
70
70
|
let { t: o } = Zt(), s = [{
|
|
71
71
|
id: 1,
|
|
72
72
|
titleT: "common.system.datatable.ordering.mostRecent",
|
|
73
73
|
sortBy: {
|
|
74
74
|
key: "createdAt",
|
|
75
|
-
order:
|
|
75
|
+
order: C.Desc
|
|
76
76
|
}
|
|
77
77
|
}, {
|
|
78
78
|
id: 2,
|
|
79
79
|
titleT: "common.system.datatable.ordering.oldest",
|
|
80
80
|
sortBy: {
|
|
81
81
|
key: "createdAt",
|
|
82
|
-
order:
|
|
82
|
+
order: C.Asc
|
|
83
83
|
}
|
|
84
84
|
}], c = [{
|
|
85
85
|
id: 1,
|
|
86
86
|
titleT: "common.system.datatable.ordering.mostRecent",
|
|
87
87
|
sortBy: {
|
|
88
88
|
key: "id",
|
|
89
|
-
order:
|
|
89
|
+
order: C.Desc
|
|
90
90
|
}
|
|
91
91
|
}, {
|
|
92
92
|
id: 2,
|
|
93
93
|
titleT: "common.system.datatable.ordering.oldest",
|
|
94
94
|
sortBy: {
|
|
95
95
|
key: "id",
|
|
96
|
-
order:
|
|
96
|
+
order: C.Asc
|
|
97
97
|
}
|
|
98
98
|
}], l = [
|
|
99
99
|
{
|
|
100
100
|
id: 3,
|
|
101
101
|
titleT: "common.system.datatable.ordering.mostRelevant",
|
|
102
102
|
sortBy: {
|
|
103
|
-
key:
|
|
104
|
-
order:
|
|
103
|
+
key: ve,
|
|
104
|
+
order: C.Desc
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
{
|
|
@@ -109,7 +109,7 @@ var yn = /* @__PURE__ */ kt({
|
|
|
109
109
|
titleT: "common.system.datatable.ordering.mostRecent",
|
|
110
110
|
sortBy: {
|
|
111
111
|
key: "createdAt",
|
|
112
|
-
order:
|
|
112
|
+
order: C.Desc
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
{
|
|
@@ -117,13 +117,13 @@ var yn = /* @__PURE__ */ kt({
|
|
|
117
117
|
titleT: "common.system.datatable.ordering.oldest",
|
|
118
118
|
sortBy: {
|
|
119
119
|
key: "createdAt",
|
|
120
|
-
order:
|
|
120
|
+
order: C.Asc
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
], u =
|
|
123
|
+
], u = M(() => {
|
|
124
124
|
let e = d.value.find((e) => e.id === i.value);
|
|
125
125
|
return e ? o(e.titleT) : "";
|
|
126
|
-
}), d =
|
|
126
|
+
}), d = M(() => n.customOptions ? n.customOptions : n.variant === "most-relevant" ? l : n.variant === "id" ? c : s), f = (e) => {
|
|
127
127
|
i.value = e.id;
|
|
128
128
|
}, p = (e) => {
|
|
129
129
|
if (!e.sortBy) {
|
|
@@ -135,42 +135,42 @@ var yn = /* @__PURE__ */ kt({
|
|
|
135
135
|
}
|
|
136
136
|
a.value.sortBy = e.sortBy, r("sortByChange", e);
|
|
137
137
|
};
|
|
138
|
-
return
|
|
138
|
+
return q(i, (e, t) => {
|
|
139
139
|
if (e === t) return;
|
|
140
140
|
let r = d.value.find((t) => t.id === e);
|
|
141
|
-
if (!
|
|
142
|
-
if (
|
|
141
|
+
if (!O(r)) {
|
|
142
|
+
if (O(n.paginationUpdateCustomCb)) {
|
|
143
143
|
p(r);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
146
|
n.paginationUpdateCustomCb(r, a);
|
|
147
147
|
}
|
|
148
|
-
}),
|
|
148
|
+
}), q(a, (e, t) => {
|
|
149
149
|
if (e.sortBy?.key === t?.sortBy?.key && e.sortBy?.order === t?.sortBy?.order) return;
|
|
150
150
|
let n = d.value.find((t) => e.sortBy?.key === t.sortBy?.key && e.sortBy?.order === t.sortBy?.order);
|
|
151
|
-
|
|
152
|
-
}, { immediate: !0 }), (e, t) => (
|
|
151
|
+
O(n) || (i.value = n.id);
|
|
152
|
+
}, { immediate: !0 }), (e, t) => (H(), F("div", Sn, [I("div", Cn, G(K(o)("common.system.datatable.ordering.title")) + ":", 1), R(Z, {
|
|
153
153
|
variant: "text",
|
|
154
154
|
rounded: "xl",
|
|
155
155
|
size: "small",
|
|
156
156
|
class: "text-medium-emphasis",
|
|
157
157
|
"append-icon": "mdi-chevron-down"
|
|
158
158
|
}, {
|
|
159
|
-
default:
|
|
159
|
+
default: J(() => [L(G(u.value) + " ", 1), R($, {
|
|
160
160
|
activator: "parent",
|
|
161
161
|
location: "bottom",
|
|
162
162
|
"close-on-content-click": ""
|
|
163
163
|
}, {
|
|
164
|
-
default:
|
|
164
|
+
default: J(() => [R(fn, {
|
|
165
165
|
density: "compact",
|
|
166
166
|
class: "pa-0"
|
|
167
167
|
}, {
|
|
168
|
-
default:
|
|
168
|
+
default: J(() => [(H(!0), F(j, null, Vt(d.value, (e) => (H(), N(Q, {
|
|
169
169
|
key: e.id,
|
|
170
170
|
onClick: (t) => f(e)
|
|
171
171
|
}, {
|
|
172
|
-
default:
|
|
173
|
-
default:
|
|
172
|
+
default: J(() => [R(pn, { class: V({ "font-weight-bold": e.id === i.value }) }, {
|
|
173
|
+
default: J(() => [L(G(K(o)(e.titleT)), 1)]),
|
|
174
174
|
_: 2
|
|
175
175
|
}, 1032, ["class"])]),
|
|
176
176
|
_: 2
|
|
@@ -182,10 +182,10 @@ var yn = /* @__PURE__ */ kt({
|
|
|
182
182
|
_: 1
|
|
183
183
|
})]));
|
|
184
184
|
}
|
|
185
|
-
}),
|
|
185
|
+
}), Tn = { class: "anzu-data-footer" }, En = {
|
|
186
186
|
key: 0,
|
|
187
187
|
class: "anzu-data-footer__page-limit"
|
|
188
|
-
},
|
|
188
|
+
}, Dn = { class: "anzu-data-footer__pagination" }, On = { class: "anzu-data-footer__icons-before" }, kn = { class: "current-page" }, An = { class: "anzu-data-footer__icons-after" }, jn = /* @__PURE__ */ z({
|
|
189
189
|
__name: "ADatatablePagination",
|
|
190
190
|
props: {
|
|
191
191
|
itemsPerPageOptions: { default: () => [
|
|
@@ -200,99 +200,99 @@ var yn = /* @__PURE__ */ kt({
|
|
|
200
200
|
},
|
|
201
201
|
emits: ["change"],
|
|
202
202
|
setup(e, { emit: t }) {
|
|
203
|
-
let n = t, r = Mt(
|
|
204
|
-
if (
|
|
205
|
-
let { t:
|
|
206
|
-
|
|
203
|
+
let n = t, r = Mt(xt);
|
|
204
|
+
if (O(r)) throw Error("Incorrect provide/inject config.");
|
|
205
|
+
let { t: i } = Zt(), { setStoredPage: a } = ae(), o = Mt(c, void 0), s = Mt(w, void 0), l = M(() => o ?? ne(s?.general.system, s?.general.subject)), u = M(() => Math.ceil(r.value.totalCount / r.value.rowsPerPage)), d = M(() => r.value.page * r.value.rowsPerPage - r.value.rowsPerPage + 1), f = M(() => r.value.page * r.value.rowsPerPage - r.value.rowsPerPage + r.value.currentViewCount), p = M(() => r.value.page === 1), m = M(() => !D(r.value.hasNextPage) || r.value.page === u.value), h = M(() => D(r.value.hasNextPage) && r.value.page === u.value || r.value.hasNextPage === !1), g = M(() => D(r.value.hasNextPage) ? r.value.totalCount : r.value.hasNextPage ? f.value + 1 + "+" : f.value);
|
|
206
|
+
q(() => r.value.rowsPerPage, (e, t) => {
|
|
207
207
|
e !== t && (r.value.page = 1, n("change"));
|
|
208
|
-
}),
|
|
209
|
-
e !== t && (
|
|
208
|
+
}), q(() => r.value.page, (e, t) => {
|
|
209
|
+
e !== t && (a(l.value, e), n("change"));
|
|
210
210
|
});
|
|
211
|
-
let
|
|
211
|
+
let _ = cn(() => {
|
|
212
212
|
r.value.page = 1;
|
|
213
|
-
}, 300),
|
|
214
|
-
r.value.page =
|
|
215
|
-
}, 300),
|
|
213
|
+
}, 300), v = cn(() => {
|
|
214
|
+
r.value.page = u.value;
|
|
215
|
+
}, 300), y = cn(() => {
|
|
216
216
|
r.value.page = r.value.page - 1;
|
|
217
|
-
}, 300),
|
|
217
|
+
}, 300), b = cn(() => {
|
|
218
218
|
r.value.page = r.value.page + 1;
|
|
219
219
|
}, 300);
|
|
220
|
-
return (t, n) => (
|
|
221
|
-
e.hideRecordsPerPage ?
|
|
222
|
-
modelValue:
|
|
223
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
220
|
+
return (t, n) => (H(), F("div", Tn, [
|
|
221
|
+
e.hideRecordsPerPage ? P("", !0) : (H(), F("div", En, [L(G(K(i)("common.system.datatable.itemsPerPage")) + ": ", 1), R(dn, {
|
|
222
|
+
modelValue: K(r).rowsPerPage,
|
|
223
|
+
"onUpdate:modelValue": n[0] ||= (e) => K(r).rowsPerPage = e,
|
|
224
224
|
class: "ml-2",
|
|
225
225
|
density: "compact",
|
|
226
226
|
mandatory: "",
|
|
227
227
|
"data-cy": "table-size"
|
|
228
228
|
}, {
|
|
229
|
-
default:
|
|
229
|
+
default: J(() => [(H(!0), F(j, null, Vt(e.itemsPerPageOptions, (e) => (H(), N(Z, {
|
|
230
230
|
key: e,
|
|
231
|
-
color: e ===
|
|
231
|
+
color: e === K(r).rowsPerPage ? "secondary" : "",
|
|
232
232
|
value: e,
|
|
233
233
|
density: "compact",
|
|
234
234
|
size: "small",
|
|
235
235
|
variant: "text"
|
|
236
236
|
}, {
|
|
237
|
-
default:
|
|
237
|
+
default: J(() => [L(G(e), 1)]),
|
|
238
238
|
_: 2
|
|
239
239
|
}, 1032, ["color", "value"]))), 128))]),
|
|
240
240
|
_: 1
|
|
241
241
|
}, 8, ["modelValue"])])),
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
disabled:
|
|
242
|
+
I("div", Dn, G(d.value) + " - " + G(f.value) + " " + G(K(i)("common.system.datatable.from")) + " " + G(g.value), 1),
|
|
243
|
+
I("div", On, [R(Z, {
|
|
244
|
+
disabled: p.value,
|
|
245
245
|
icon: "mdi-page-first",
|
|
246
246
|
size: "small",
|
|
247
247
|
variant: "text",
|
|
248
|
-
onClick:
|
|
249
|
-
}, null, 8, ["disabled", "onClick"]),
|
|
250
|
-
disabled:
|
|
248
|
+
onClick: Y(K(_), ["stop"])
|
|
249
|
+
}, null, 8, ["disabled", "onClick"]), R(Z, {
|
|
250
|
+
disabled: p.value,
|
|
251
251
|
icon: "mdi-chevron-left",
|
|
252
252
|
size: "small",
|
|
253
253
|
variant: "text",
|
|
254
|
-
onClick:
|
|
254
|
+
onClick: Y(K(y), ["stop"])
|
|
255
255
|
}, null, 8, ["disabled", "onClick"])]),
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
disabled:
|
|
256
|
+
I("div", kn, [I("span", null, G(K(r).page), 1)]),
|
|
257
|
+
I("div", An, [R(Z, {
|
|
258
|
+
disabled: h.value,
|
|
259
259
|
icon: "mdi-chevron-right",
|
|
260
260
|
size: "small",
|
|
261
261
|
variant: "text",
|
|
262
|
-
onClick:
|
|
263
|
-
}, null, 8, ["disabled", "onClick"]),
|
|
264
|
-
disabled:
|
|
262
|
+
onClick: Y(K(b), ["stop"])
|
|
263
|
+
}, null, 8, ["disabled", "onClick"]), R(Z, {
|
|
264
|
+
disabled: m.value,
|
|
265
265
|
icon: "mdi-page-last",
|
|
266
266
|
size: "small",
|
|
267
267
|
variant: "text",
|
|
268
|
-
onClick:
|
|
268
|
+
onClick: Y(K(v), ["stop"])
|
|
269
269
|
}, null, 8, ["disabled", "onClick"])])
|
|
270
270
|
]));
|
|
271
271
|
}
|
|
272
|
-
}),
|
|
273
|
-
let { querySetLimit: r, querySetOffset: i, querySetOrder: a, queryBuild: o, queryAddFilter: s, queryAdd: c } =
|
|
272
|
+
}), Mn = (e, t, n = "id") => {
|
|
273
|
+
let { querySetLimit: r, querySetOffset: i, querySetOrder: a, queryBuild: o, queryAddFilter: s, queryAdd: c } = Be(), l = e.length;
|
|
274
274
|
return r(l), i(1, l), a(n, !1), t ? c(n, e.join(",")) : s("in", n, e.join(",")), o();
|
|
275
|
-
},
|
|
276
|
-
let { client:
|
|
275
|
+
}, Nn = (e) => {
|
|
276
|
+
let { client: t, system: n, entity: r, urlTemplate: i, urlParams: o, options: c = {}, isSearchApi: l = !1, field: d = "id", silentConsoleError: f = !1 } = e, m = /* @__PURE__ */ new Set();
|
|
277
277
|
return {
|
|
278
278
|
executeFetch: async (e, h = {}) => {
|
|
279
279
|
let g = new AbortController();
|
|
280
280
|
m.add(g);
|
|
281
281
|
let { urlTemplate: _, urlParams: v } = h;
|
|
282
282
|
try {
|
|
283
|
-
let
|
|
284
|
-
if (
|
|
285
|
-
let
|
|
283
|
+
let n = A(v) ? v : o, r = A(_) ? _ : i;
|
|
284
|
+
if (O(r)) throw Error("Url template is undefined");
|
|
285
|
+
let s = (O(n) ? r : a(r, n)) + Mn(e, l, d), u = await t().get(s, {
|
|
286
286
|
...c,
|
|
287
287
|
signal: g.signal
|
|
288
288
|
});
|
|
289
|
-
if (!
|
|
290
|
-
if (
|
|
291
|
-
if (
|
|
292
|
-
throw new
|
|
289
|
+
if (!kt(u.status)) throw new p(u.status);
|
|
290
|
+
if (u.data?.data) return u.data.data;
|
|
291
|
+
if (u.status === 204) return [];
|
|
292
|
+
throw new T();
|
|
293
293
|
} catch (e) {
|
|
294
294
|
if (e instanceof DOMException && e.name === "AbortError") return [];
|
|
295
|
-
throw
|
|
295
|
+
throw u(e) ? e : ie(e) ? new x(e, e.config?.url) : Ge(e) ? new oe(e, n, r, e) : Ct(e) ? new we(e, n, r, e) : bt(e) ? new s(e, e) : Et(e) ? new _t(e) : gn.isAxiosError(e) ? (f || console.error("Axios error: " + i, ...e.cause ? [e.cause] : []), new Ie(e)) : (f || console.error("AnzuFatalError: ", e), new T(e));
|
|
296
296
|
} finally {
|
|
297
297
|
m.delete(g);
|
|
298
298
|
}
|
|
@@ -301,40 +301,40 @@ var yn = /* @__PURE__ */ kt({
|
|
|
301
301
|
m.forEach((e) => e.abort()), m.clear();
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
|
-
},
|
|
305
|
-
let { client:
|
|
304
|
+
}, Pn = (e) => {
|
|
305
|
+
let { client: t, system: n, entity: r, urlTemplate: i, urlParams: o, options: c = {}, silentConsoleError: l = !1 } = e, d = /* @__PURE__ */ new Set();
|
|
306
306
|
return {
|
|
307
|
-
executeFetch: async (e,
|
|
307
|
+
executeFetch: async (e, f, m = {}) => {
|
|
308
308
|
let h = new AbortController();
|
|
309
309
|
d.add(h);
|
|
310
310
|
let { urlTemplate: g, urlParams: _, sortBy: v = "id", sortDesc: y = !0, batchSize: b = 100, forceElastic: ee = !1 } = m;
|
|
311
311
|
try {
|
|
312
|
-
let
|
|
313
|
-
if (
|
|
314
|
-
let { pagination: l } = ht(v, y ?
|
|
312
|
+
let n = f.general.elastic || ee ? "/search" : "", r = A(_) ? _ : o, s = A(g) ? g : i;
|
|
313
|
+
if (O(s)) throw Error("Url template is undefined");
|
|
314
|
+
let { pagination: l } = ht(v, y ? C.Desc : C.Asc, { rowsPerPage: b }), u = (O(r) ? s : a(s, r)) + n, d = [], m = await t().get(u + Ae(l, e, f), {
|
|
315
315
|
...c,
|
|
316
316
|
signal: h.signal
|
|
317
317
|
});
|
|
318
|
-
if (!
|
|
319
|
-
if (
|
|
320
|
-
let
|
|
321
|
-
if (d.push(...
|
|
318
|
+
if (!kt(m.status)) throw new p(m.status);
|
|
319
|
+
if (m.data) {
|
|
320
|
+
let n = m.data;
|
|
321
|
+
if (d.push(...n.data), it(n)) for (l.value.hasNextPage = n.hasNextPage; l.value.hasNextPage;) {
|
|
322
322
|
l.value.page++;
|
|
323
|
-
let
|
|
323
|
+
let n = (await t().get(u + Ae(l, e, f), {
|
|
324
324
|
...c,
|
|
325
325
|
signal: h.signal
|
|
326
326
|
})).data;
|
|
327
|
-
d.push(...
|
|
327
|
+
d.push(...n.data), l.value.hasNextPage = n.hasNextPage;
|
|
328
328
|
}
|
|
329
|
-
else if (
|
|
330
|
-
if (l.value.totalCount =
|
|
329
|
+
else if (Xe(n)) {
|
|
330
|
+
if (l.value.totalCount = n.totalCount, l.value.totalCount <= l.value.rowsPerPage) return d;
|
|
331
331
|
let r = [], i = Math.ceil(l.value.totalCount / l.value.rowsPerPage);
|
|
332
|
-
for (let
|
|
332
|
+
for (let n = 1; n < i; n++) {
|
|
333
333
|
let i = {
|
|
334
334
|
...l.value,
|
|
335
|
-
page:
|
|
336
|
-
}, a =
|
|
337
|
-
r.push(
|
|
335
|
+
page: n + 1
|
|
336
|
+
}, a = U(i);
|
|
337
|
+
r.push(t().get(u + Ae(a, e, f), {
|
|
338
338
|
...c,
|
|
339
339
|
signal: h.signal
|
|
340
340
|
}));
|
|
@@ -345,11 +345,11 @@ var yn = /* @__PURE__ */ kt({
|
|
|
345
345
|
}
|
|
346
346
|
return d;
|
|
347
347
|
}
|
|
348
|
-
if (
|
|
349
|
-
throw new
|
|
348
|
+
if (m.status === 204) return [];
|
|
349
|
+
throw new T();
|
|
350
350
|
} catch (e) {
|
|
351
351
|
if (e instanceof DOMException && e.name === "AbortError") return [];
|
|
352
|
-
throw
|
|
352
|
+
throw u(e) ? e : ie(e) ? new x(e, e.config?.url) : Ge(e) ? new oe(e, n, r, e) : Ct(e) ? new we(e, n, r, e) : bt(e) ? new s(e, e) : Et(e) ? new _t(e) : gn.isAxiosError(e) ? (l || console.error("Axios error: " + i, ...e.cause ? [e.cause] : []), new Ie(e)) : (l || console.error("AnzuFatalError: ", e), new T(e));
|
|
353
353
|
} finally {
|
|
354
354
|
d.delete(h);
|
|
355
355
|
}
|
|
@@ -358,99 +358,99 @@ var yn = /* @__PURE__ */ kt({
|
|
|
358
358
|
d.forEach((e) => e.abort()), d.clear();
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
|
-
},
|
|
362
|
-
function
|
|
361
|
+
}, Fn = "/adm/v1/job";
|
|
362
|
+
function In(e, t) {
|
|
363
363
|
return {
|
|
364
|
-
useFetchJobList: () =>
|
|
364
|
+
useFetchJobList: () => Pe({
|
|
365
365
|
client: e,
|
|
366
366
|
system: t,
|
|
367
367
|
entity: "job",
|
|
368
|
-
urlTemplate:
|
|
368
|
+
urlTemplate: Fn
|
|
369
369
|
}),
|
|
370
|
-
fetchJob: (n) =>
|
|
370
|
+
fetchJob: (n) => fe(e, Fn + "/:id", { id: n }, t, "job"),
|
|
371
371
|
createJob: (n) => {
|
|
372
|
-
let r =
|
|
373
|
-
return
|
|
372
|
+
let r = st(n._resourceName).slice(4).replace("-kind-", "-kind/");
|
|
373
|
+
return Je(e, n, Fn + "/:type", { type: r }, t, "job");
|
|
374
374
|
},
|
|
375
|
-
deleteJob: (n) =>
|
|
375
|
+
deleteJob: (n) => g(e, Fn + "/:id", { id: n }, t, "job")
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
//#endregion
|
|
379
379
|
//#region src/labs/filters/datatableColumns.ts
|
|
380
|
-
var
|
|
380
|
+
var Ln = {
|
|
381
381
|
key: "",
|
|
382
382
|
title: void 0,
|
|
383
383
|
sortable: !1,
|
|
384
384
|
fixed: !1
|
|
385
|
-
},
|
|
385
|
+
}, Rn = {
|
|
386
386
|
storeColumnsLocalStorage: !0,
|
|
387
387
|
disableActions: !1,
|
|
388
388
|
customI18n: void 0,
|
|
389
389
|
showExpand: !1
|
|
390
390
|
};
|
|
391
|
-
function
|
|
392
|
-
let
|
|
393
|
-
...
|
|
394
|
-
...
|
|
395
|
-
},
|
|
396
|
-
|
|
397
|
-
let
|
|
391
|
+
function zn(e, n, r, i, a = {}) {
|
|
392
|
+
let o = {
|
|
393
|
+
...Rn,
|
|
394
|
+
...a
|
|
395
|
+
}, s = o.customI18n ?? Qe, { t: c } = s.global || s, l;
|
|
396
|
+
ke(o.storeColumnsLocalStorage) ? l = o.storeColumnsLocalStorage : je(o.storeColumnsLocalStorage) && !0 === o.storeColumnsLocalStorage && (l = "table_" + r + "_" + i);
|
|
397
|
+
let u = e.map((e) => {
|
|
398
398
|
let t = {
|
|
399
|
-
...
|
|
399
|
+
...Ln,
|
|
400
400
|
...e
|
|
401
401
|
};
|
|
402
|
-
return
|
|
403
|
-
}),
|
|
402
|
+
return O(t.title) && (t.title = O(t.title) && ot.includes(t.key) ? c("common.model.tracking." + t.key) : O(t.title) && r && i ? c(r + "." + i + ".model." + t.key) : ""), t;
|
|
403
|
+
}), d = M(() => {
|
|
404
404
|
let e = [];
|
|
405
|
-
return
|
|
405
|
+
return o.showExpand && e.push({
|
|
406
406
|
key: "data-table-expand",
|
|
407
407
|
sortable: !1
|
|
408
|
-
}),
|
|
409
|
-
|
|
410
|
-
}),
|
|
408
|
+
}), u.forEach((t) => {
|
|
409
|
+
n.value.includes(t.key) || e.push(t);
|
|
410
|
+
}), o.disableActions || e.push({
|
|
411
411
|
key: "actions",
|
|
412
412
|
sortable: !1,
|
|
413
413
|
fixed: "end"
|
|
414
414
|
}), e;
|
|
415
|
-
}),
|
|
416
|
-
if (!
|
|
417
|
-
let e = localStorage.getItem(
|
|
415
|
+
}), f = () => {
|
|
416
|
+
if (!l || !localStorage) return;
|
|
417
|
+
let e = localStorage.getItem(l);
|
|
418
418
|
if (!e) return;
|
|
419
|
-
let
|
|
419
|
+
let r;
|
|
420
420
|
try {
|
|
421
|
-
|
|
421
|
+
r = JSON.parse(e);
|
|
422
422
|
} catch {
|
|
423
|
-
localStorage.removeItem(
|
|
423
|
+
localStorage.removeItem(l);
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
-
|
|
427
|
-
},
|
|
428
|
-
|
|
426
|
+
mt(r) && t(r.hidden) && (n.value = r.hidden);
|
|
427
|
+
}, p = (e) => {
|
|
428
|
+
l && localStorage && localStorage.setItem(l, JSON.stringify({ hidden: e }));
|
|
429
429
|
};
|
|
430
430
|
return zt(() => {
|
|
431
|
-
|
|
432
|
-
}),
|
|
433
|
-
|
|
431
|
+
f();
|
|
432
|
+
}), q(n, (e) => {
|
|
433
|
+
p(e);
|
|
434
434
|
}), {
|
|
435
|
-
columnsAll:
|
|
436
|
-
columnsVisible:
|
|
437
|
-
columnsHidden:
|
|
435
|
+
columnsAll: u,
|
|
436
|
+
columnsVisible: d,
|
|
437
|
+
columnsHidden: n
|
|
438
438
|
};
|
|
439
439
|
}
|
|
440
440
|
//#endregion
|
|
441
441
|
//#region src/labs/subjectSelect/useSubjectSelect.ts
|
|
442
|
-
function
|
|
443
|
-
let u =
|
|
442
|
+
function Bn(e, t, n, r, i, a, o, s = null, c = void 0, l = !1) {
|
|
443
|
+
let u = U(!1), d = U([]), f = U([]), p = U(!1), { pagination: m, setSortBy: h, incrementPage: g } = ht(D(s) ? null : s.key, s?.order), { resetFilter: _, submitFilter: v } = me(a, o, {
|
|
444
444
|
storeFiltersLocalStorage: !1,
|
|
445
445
|
populateUrlParams: !1
|
|
446
|
-
}), { showErrorsDefault: y } =
|
|
446
|
+
}), { showErrorsDefault: y } = ze(), { columnsVisible: b, columnsAll: ee, columnsHidden: te } = zn(e, t, n, r, {
|
|
447
447
|
storeColumnsLocalStorage: !1,
|
|
448
448
|
disableActions: !l
|
|
449
|
-
}),
|
|
450
|
-
|
|
451
|
-
},
|
|
452
|
-
h(e.sortBy),
|
|
453
|
-
},
|
|
449
|
+
}), x = () => {
|
|
450
|
+
ie(), S();
|
|
451
|
+
}, ne = (e) => {
|
|
452
|
+
h(e.sortBy), S();
|
|
453
|
+
}, re = async () => {
|
|
454
454
|
p.value = !0, g();
|
|
455
455
|
try {
|
|
456
456
|
let e = await i(m, a, o, c);
|
|
@@ -460,9 +460,9 @@ function Rn(e, t, n, r, i, a, o, s = null, c = void 0, l = !1) {
|
|
|
460
460
|
} finally {
|
|
461
461
|
p.value = !1;
|
|
462
462
|
}
|
|
463
|
-
},
|
|
463
|
+
}, ie = () => {
|
|
464
464
|
d.value = [], f.value = [];
|
|
465
|
-
},
|
|
465
|
+
}, ae = async () => {
|
|
466
466
|
p.value = !0;
|
|
467
467
|
try {
|
|
468
468
|
d.value = await i(m, a, o, c);
|
|
@@ -471,15 +471,15 @@ function Rn(e, t, n, r, i, a, o, s = null, c = void 0, l = !1) {
|
|
|
471
471
|
} finally {
|
|
472
472
|
p.value = !1;
|
|
473
473
|
}
|
|
474
|
-
},
|
|
475
|
-
await
|
|
474
|
+
}, S = sn(async () => {
|
|
475
|
+
await ae();
|
|
476
476
|
});
|
|
477
477
|
return {
|
|
478
478
|
items: d,
|
|
479
479
|
selected: f,
|
|
480
480
|
pagination: m,
|
|
481
481
|
columnsVisible: b,
|
|
482
|
-
columnsHidden:
|
|
482
|
+
columnsHidden: te,
|
|
483
483
|
columnsAll: ee,
|
|
484
484
|
filterTouched: u,
|
|
485
485
|
loading: p,
|
|
@@ -493,20 +493,20 @@ function Rn(e, t, n, r, i, a, o, s = null, c = void 0, l = !1) {
|
|
|
493
493
|
let i = r.querySelector("input");
|
|
494
494
|
i && i.click();
|
|
495
495
|
},
|
|
496
|
-
onFetchNextPage:
|
|
497
|
-
onOpen:
|
|
498
|
-
sortByChange:
|
|
499
|
-
getList:
|
|
500
|
-
resetFilter: () => _(m,
|
|
501
|
-
submitFilter: () => v(m,
|
|
496
|
+
onFetchNextPage: re,
|
|
497
|
+
onOpen: x,
|
|
498
|
+
sortByChange: ne,
|
|
499
|
+
getList: S,
|
|
500
|
+
resetFilter: () => _(m, S),
|
|
501
|
+
submitFilter: () => v(m, S)
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
504
|
//#endregion
|
|
505
505
|
//#region src/labs/subjectSelect/ASubjectSelect.vue?vue&type=script&setup=true&lang.ts
|
|
506
|
-
var
|
|
506
|
+
var Vn = { class: "d-flex flex-column w-100 px-1 align-center" }, Hn = { class: "d-flex justify-space-between w-100 align-center" }, Un = { class: "d-flex align-center" }, Wn = { class: "d-flex align-center" }, Gn = { class: "subject-select__sidebar system-border-r" }, Kn = { class: "subject-select-filter" }, qn = { class: "subject-select__content" }, Jn = {
|
|
507
507
|
key: 0,
|
|
508
508
|
class: "d-flex w-100 align-center justify-center pa-4"
|
|
509
|
-
},
|
|
509
|
+
}, Yn = { class: "subject-select__actions system-border-t" }, Xn = { key: 0 }, Zn = { key: 1 }, Qn = /* @__PURE__ */ z({
|
|
510
510
|
__name: "ASubjectSelect",
|
|
511
511
|
props: {
|
|
512
512
|
selectedItems: {},
|
|
@@ -537,23 +537,23 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
537
537
|
"onFetchNextPage"
|
|
538
538
|
],
|
|
539
539
|
setup(e, { expose: t, emit: n }) {
|
|
540
|
-
let r = e, i = n, a =
|
|
540
|
+
let r = e, i = n, a = U(!1), o = M({
|
|
541
541
|
get() {
|
|
542
|
-
return
|
|
542
|
+
return O(r.modelValue) ? a.value : r.modelValue;
|
|
543
543
|
},
|
|
544
544
|
set(e) {
|
|
545
545
|
a.value = e, i("update:modelValue", e);
|
|
546
546
|
}
|
|
547
|
-
}), s =
|
|
547
|
+
}), s = M({
|
|
548
548
|
get: () => r.pagination,
|
|
549
549
|
set: (e) => {
|
|
550
550
|
i("update:pagination", { ...Wt(e) });
|
|
551
551
|
}
|
|
552
|
-
}), { mdAndDown: c } =
|
|
552
|
+
}), { mdAndDown: c } = un(), l = U(!c.value), u = () => {
|
|
553
553
|
c.value && (l.value = !1);
|
|
554
554
|
};
|
|
555
|
-
Bt(
|
|
556
|
-
let { t: d } = Zt(), f =
|
|
555
|
+
Bt(Ue, u);
|
|
556
|
+
let { t: d } = Zt(), f = M(() => r.selectedItems.length), p = M(() => f.value < r.minCount || f.value > r.maxCount), m = () => {
|
|
557
557
|
i("onOpen"), l.value = !c.value, o.value = !0;
|
|
558
558
|
}, h = () => {
|
|
559
559
|
l.value = !l.value;
|
|
@@ -563,10 +563,10 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
563
563
|
i("onConfirm", r.selectedItems.map((e) => Wt(e))), g();
|
|
564
564
|
}, v = () => {
|
|
565
565
|
i("onFetchNextPage");
|
|
566
|
-
},
|
|
566
|
+
}, b = () => {
|
|
567
567
|
i("onPageChange");
|
|
568
|
-
},
|
|
569
|
-
e &&
|
|
568
|
+
}, ee = M(() => Math.ceil(s.value.totalCount / s.value.rowsPerPage)), te = M(() => !(D(s.value.hasNextPage) && s.value.page === ee.value || s.value.hasNextPage === !1)), x = (e) => {
|
|
569
|
+
e && te.value && !r.loading && v();
|
|
570
570
|
};
|
|
571
571
|
return zt(() => {
|
|
572
572
|
r.autoOpen && m();
|
|
@@ -575,130 +575,130 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
575
575
|
closeSidebarOnMobile: u
|
|
576
576
|
}), (t, n) => {
|
|
577
577
|
let r = Ht("ABtnSecondary"), a = Ht("ABtnPrimary");
|
|
578
|
-
return
|
|
578
|
+
return H(), F(j, null, [W(t.$slots, "activator", { props: { onClick: Y(() => m(), ["stop"]) } }), R(_n, B(t.$attrs, {
|
|
579
579
|
"model-value": o.value,
|
|
580
580
|
fullscreen: "",
|
|
581
581
|
class: "subject-select",
|
|
582
582
|
"onUpdate:modelValue": n[1] ||= (e) => i("update:modelValue", e)
|
|
583
583
|
}), {
|
|
584
|
-
default:
|
|
584
|
+
default: J(() => [o.value ? (H(), N(tn, {
|
|
585
585
|
key: 0,
|
|
586
586
|
class: "subject-select__card"
|
|
587
587
|
}, {
|
|
588
|
-
default:
|
|
589
|
-
|
|
588
|
+
default: J(() => [
|
|
589
|
+
R(y, {
|
|
590
590
|
class: "subject-select__toolbar system-border-b",
|
|
591
591
|
onOnCancel: g
|
|
592
592
|
}, {
|
|
593
|
-
default:
|
|
593
|
+
default: J(() => [W(t.$slots, "title", {}, () => [L(G(K(d)(e.dialogTitleT)), 1)])]),
|
|
594
594
|
_: 3
|
|
595
595
|
}),
|
|
596
|
-
|
|
596
|
+
R(mn, {
|
|
597
597
|
density: "compact",
|
|
598
598
|
color: "transparent",
|
|
599
599
|
height: 46,
|
|
600
600
|
elevation: "0",
|
|
601
601
|
class: "system-border-b subject-select__second-bar"
|
|
602
602
|
}, {
|
|
603
|
-
default:
|
|
603
|
+
default: J(() => [W(t.$slots, "second-bar", {}, () => [I("div", Vn, [I("div", Hn, [I("div", Un, [R(Z, {
|
|
604
604
|
icon: "",
|
|
605
605
|
width: 30,
|
|
606
606
|
height: 30,
|
|
607
607
|
onClick: h
|
|
608
608
|
}, {
|
|
609
|
-
default:
|
|
609
|
+
default: J(() => [R(X, {
|
|
610
610
|
icon: "mdi-tune",
|
|
611
611
|
size: 16
|
|
612
|
-
}),
|
|
612
|
+
}), R(on, {
|
|
613
613
|
activator: "parent",
|
|
614
614
|
location: "bottom"
|
|
615
615
|
}, {
|
|
616
|
-
default:
|
|
616
|
+
default: J(() => [L(G(K(d)("common.subjectSelect.filter.toggle")), 1)]),
|
|
617
617
|
_: 1
|
|
618
618
|
})]),
|
|
619
619
|
_: 1
|
|
620
|
-
}),
|
|
620
|
+
}), W(t.$slots, "second-bar-left")]), I("div", Wn, [W(t.$slots, "second-bar-right")])])])])]),
|
|
621
621
|
_: 3
|
|
622
622
|
}),
|
|
623
|
-
|
|
623
|
+
I("div", { class: V(["subject-select__main", { "subject-select__main--sidebar-active": l.value }]) }, [I("div", Gn, [I("div", Kn, [W(t.$slots, "filter")])]), I("div", qn, [W(t.$slots, "content"), e.paginationMode === "more" ? (H(), F("div", Jn, [Yt((H(), N(r, {
|
|
624
624
|
loading: e.loading,
|
|
625
625
|
size: "small",
|
|
626
626
|
onClick: v
|
|
627
627
|
}, {
|
|
628
|
-
default:
|
|
628
|
+
default: J(() => [W(t.$slots, "button-confirm-title", {}, () => [L(G(K(d)("common.button.loadMore")), 1)])]),
|
|
629
629
|
_: 3
|
|
630
|
-
}, 8, ["loading"])), [[Jt,
|
|
631
|
-
|
|
630
|
+
}, 8, ["loading"])), [[Jt, te.value || e.loading], [
|
|
631
|
+
ln,
|
|
632
632
|
x,
|
|
633
633
|
void 0,
|
|
634
634
|
{ quiet: !0 }
|
|
635
|
-
]])])) : (
|
|
635
|
+
]])])) : (H(), N(jn, {
|
|
636
636
|
key: 1,
|
|
637
637
|
modelValue: s.value,
|
|
638
638
|
"onUpdate:modelValue": n[0] ||= (e) => s.value = e,
|
|
639
|
-
onChange:
|
|
639
|
+
onChange: b
|
|
640
640
|
}, null, 8, ["modelValue"]))])], 2),
|
|
641
|
-
|
|
642
|
-
e.minCount === e.maxCount ? (
|
|
641
|
+
I("div", Yn, [
|
|
642
|
+
e.minCount === e.maxCount ? (H(), F("div", Xn, G(K(d)("common.subjectSelect.texts.pickExactCount", {
|
|
643
643
|
count: e.minCount,
|
|
644
644
|
selected: f.value
|
|
645
|
-
})), 1)) : (
|
|
645
|
+
})), 1)) : (H(), F("div", Zn, G(K(d)("common.subjectSelect.texts.pickRangeCount", {
|
|
646
646
|
minCount: e.minCount,
|
|
647
647
|
maxCount: e.maxCount,
|
|
648
648
|
selected: f.value
|
|
649
649
|
})), 1)),
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
R(Qt),
|
|
651
|
+
R(a, {
|
|
652
652
|
disabled: p.value,
|
|
653
|
-
onClick:
|
|
653
|
+
onClick: Y(_, ["stop"])
|
|
654
654
|
}, {
|
|
655
|
-
default:
|
|
655
|
+
default: J(() => [W(t.$slots, "button-confirm-title", {}, () => [L(G(K(d)("common.button.confirm")), 1)])]),
|
|
656
656
|
_: 3
|
|
657
657
|
}, 8, ["disabled"])
|
|
658
658
|
])
|
|
659
659
|
]),
|
|
660
660
|
_: 3
|
|
661
|
-
})) :
|
|
661
|
+
})) : P("", !0)]),
|
|
662
662
|
_: 3
|
|
663
663
|
}, 16, ["model-value"])], 64);
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
|
-
}),
|
|
666
|
+
}), $n = {
|
|
667
667
|
key: 0,
|
|
668
668
|
class: "a-le-header"
|
|
669
|
-
},
|
|
669
|
+
}, er = {
|
|
670
670
|
key: 0,
|
|
671
671
|
class: "a-le-title-heading"
|
|
672
|
-
},
|
|
672
|
+
}, tr = ["data-unsaved-count"], nr = {
|
|
673
673
|
key: 1,
|
|
674
674
|
class: "a-le-state a-le-state--loading"
|
|
675
|
-
},
|
|
675
|
+
}, rr = {
|
|
676
676
|
key: 2,
|
|
677
677
|
class: "a-le-state a-le-state--error"
|
|
678
|
-
},
|
|
678
|
+
}, ir = {
|
|
679
679
|
key: 3,
|
|
680
680
|
class: "a-le-state a-le-state--empty"
|
|
681
|
-
},
|
|
681
|
+
}, ar = [
|
|
682
682
|
"data-id",
|
|
683
683
|
"tabindex",
|
|
684
684
|
"onKeydown"
|
|
685
|
-
],
|
|
685
|
+
], or = ["onClick"], sr = { class: "a-le-row-main" }, cr = { class: "a-le-title" }, lr = {
|
|
686
686
|
key: 0,
|
|
687
687
|
class: "a-le-status"
|
|
688
|
-
},
|
|
688
|
+
}, ur = {
|
|
689
689
|
key: 0,
|
|
690
690
|
class: "a-le-status-badge"
|
|
691
|
-
},
|
|
691
|
+
}, dr = { class: "a-le-actions" }, fr = { class: "a-le-row-body" }, pr = { class: "a-le-form" }, mr = {
|
|
692
692
|
key: 0,
|
|
693
693
|
class: "a-le-row-footer"
|
|
694
|
-
},
|
|
694
|
+
}, hr = {
|
|
695
695
|
key: 1,
|
|
696
696
|
class: "a-le-row-body"
|
|
697
|
-
},
|
|
697
|
+
}, gr = { class: "a-le-form" }, _r = {
|
|
698
698
|
class: "a-le-sr-only",
|
|
699
699
|
"aria-live": "polite",
|
|
700
700
|
role: "status"
|
|
701
|
-
},
|
|
701
|
+
}, vr = /* @__PURE__ */ z({
|
|
702
702
|
__name: "AListEditor",
|
|
703
703
|
props: /*@__PURE__*/ Pt({
|
|
704
704
|
factory: {
|
|
@@ -818,7 +818,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
818
818
|
"item-expand"
|
|
819
819
|
], ["update:modelValue"]),
|
|
820
820
|
setup(e, { expose: t, emit: n }) {
|
|
821
|
-
let r = e, i = n, a = Gt(e, "modelValue"), { t: s } = Zt(), c = Kt(), l =
|
|
821
|
+
let r = e, i = n, a = Gt(e, "modelValue"), { t: s } = Zt(), c = Kt(), l = un(), u = qt("rootEl"), d = M(() => l.platform.value.touch), f = {
|
|
822
822
|
get: () => a.value,
|
|
823
823
|
set: (e) => a.value = e,
|
|
824
824
|
factory: r.factory,
|
|
@@ -826,15 +826,15 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
826
826
|
position: r.position,
|
|
827
827
|
dirtyExclude: () => r.dirtyExclude ?? [],
|
|
828
828
|
validate: r.validate
|
|
829
|
-
}, p = r.editor ? null : yt(r.stateKey, f), m = r.editor ?? p?.handle ??
|
|
829
|
+
}, p = r.editor ? null : yt(r.stateKey, f), m = r.editor ?? p?.handle ?? S(f), h = r.getKey ?? "id", g = o(p?.childScope ?? null), _ = (e) => typeof h == "function" ? h(e) : e[h], v = M(() => typeof h == "function" ? "(fn)" : h), y = M(() => {
|
|
830
830
|
let e = r.position;
|
|
831
831
|
return e === void 0 || e === !1 ? "position" : typeof e == "object" ? e.field : e;
|
|
832
|
-
}), b =
|
|
832
|
+
}), b = M(() => a.value.map((e, t) => ({
|
|
833
833
|
key: _(e),
|
|
834
834
|
index: t,
|
|
835
835
|
raw: e,
|
|
836
836
|
position: e[y.value]
|
|
837
|
-
}))), ee = /* @__PURE__ */ new Set(),
|
|
837
|
+
}))), ee = /* @__PURE__ */ new Set(), te = (e) => {
|
|
838
838
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = 0;
|
|
839
839
|
for (let i of e) {
|
|
840
840
|
if (i.key === void 0 || i.key === null) {
|
|
@@ -847,9 +847,9 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
847
847
|
let i = `${r}|${[...n].sort().join(",")}`;
|
|
848
848
|
ee.has(i) || (ee.add(i), r > 0 && console.warn(`[list-editor] ${r} row(s) resolve to an undefined key (key-field "${v.value}"). Point get-key at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`), n.size > 0 && console.warn(`[list-editor] duplicate row keys (key-field "${v.value}"): ${[...n].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`));
|
|
849
849
|
};
|
|
850
|
-
|
|
851
|
-
let
|
|
852
|
-
rowsContainer:
|
|
850
|
+
q(b, (e) => te(e), { immediate: !0 }), q(() => b.value.map((e) => String(e.key)).join("|"), () => g.retainOwners(b.value.map((e) => e.key)), { flush: "post" });
|
|
851
|
+
let x = U(/* @__PURE__ */ new Set()), ne = qt("rowsContainer"), ie = M(() => !r.chips && !!c.item), ae = M(() => !r.chips && !!c["item-readonly"]), { editingKeys: oe, editingSnapshots: se, beginEdit: ce, cancelEdit: le, commitEdit: C, closeEdit: ue, requestAutoOpen: de } = Fe({
|
|
852
|
+
rowsContainer: ne,
|
|
853
853
|
rowSelector: ".a-le-row",
|
|
854
854
|
isInlineEdit: ie,
|
|
855
855
|
restoreSnapshot: (e, t) => m.updateItem(e, t),
|
|
@@ -859,13 +859,13 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
859
859
|
return t ? { data: t } : null;
|
|
860
860
|
},
|
|
861
861
|
afterAutoOpen: (e) => {
|
|
862
|
-
|
|
862
|
+
x.value.delete(e);
|
|
863
863
|
}
|
|
864
|
-
}), fe =
|
|
864
|
+
}), fe = M(() => r.addLabel ? s(r.addLabel) : s("common.sortable.add")), pe = M(() => r.emptyTitle ?? s("common.sortable.emptyTitle")), me = M(() => r.deleteConfirmTitle ?? s("common.sortable.deleteConfirmTitle")), he = M(() => r.deleteConfirmText ?? (r.deleteMode === "immediate" ? s("common.sortable.deleteConfirmText") : s("common.sortable.deleteConfirmTextDeferred"))), w = M(() => !r.readonly && !r.disabled && !r.loading), T = M(() => w.value && r.showAddButton), ge = m.unsavedCount, _e = M(() => !r.readonly && !r.disableUnsaved && ge.value > 0), E = M(() => !!(r.title || c.header) || _e.value), ve = M(() => !!r.onItemSave), ye = /* @__PURE__ */ new Map(), xe = M(() => {
|
|
865
865
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
866
866
|
for (let n of b.value) {
|
|
867
867
|
t.add(n.key);
|
|
868
|
-
let i =
|
|
868
|
+
let i = oe.value.has(n.key), a = x.value.has(n.key), o = r.loadingKeys?.has(n.key) ?? !1, s = r.disableUnsaved || r.readonly ? !1 : m.isUnsaved(n.key), c = s, l = m.rowState(n.raw, n.key, i), u = ye.get(n.key);
|
|
869
869
|
if (u && u.raw === n.raw && u.index === n.index && u.position === n.position && u.editing === i && u.expanded === a && u.loading === o && u.dirty === c && u.unsaved === s && u.validationState === l) {
|
|
870
870
|
e.push(u);
|
|
871
871
|
continue;
|
|
@@ -883,104 +883,104 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
883
883
|
}
|
|
884
884
|
for (let e of ye.keys()) t.has(e) || ye.delete(e);
|
|
885
885
|
return e;
|
|
886
|
-
}), Se =
|
|
887
|
-
viewItems:
|
|
886
|
+
}), Se = M(() => xe.value.length === 0), we = (e) => xe.value.find((t) => t.key === e), Te = re({
|
|
887
|
+
viewItems: M(() => xe.value.map((e) => ({ key: e.key }))),
|
|
888
888
|
variant: "flat",
|
|
889
|
-
isReorderMode:
|
|
890
|
-
disabled:
|
|
891
|
-
isEditing: (e) =>
|
|
889
|
+
isReorderMode: U(!1),
|
|
890
|
+
disabled: M(() => !w.value),
|
|
891
|
+
isEditing: (e) => oe.value.has(e),
|
|
892
892
|
onToggleEdit: (e) => {
|
|
893
|
-
let t =
|
|
893
|
+
let t = we(e);
|
|
894
894
|
t && ke(t);
|
|
895
895
|
},
|
|
896
896
|
onCancelEdit: (e) => {
|
|
897
|
-
let t =
|
|
898
|
-
t &&
|
|
897
|
+
let t = we(e);
|
|
898
|
+
t && He(t);
|
|
899
899
|
}
|
|
900
|
-
}), Ee = (e) =>
|
|
901
|
-
|
|
902
|
-
},
|
|
903
|
-
|
|
900
|
+
}), Ee = (e) => Ce(e, { compactField: r.compactField }), D = () => {
|
|
901
|
+
T.value && (de(), m.addItem(void 0, void 0));
|
|
902
|
+
}, De = (e) => {
|
|
903
|
+
w.value && (de(), m.addItem(void 0, { afterId: e.key }));
|
|
904
904
|
}, ke = (e) => {
|
|
905
|
-
if (
|
|
906
|
-
if (
|
|
907
|
-
|
|
905
|
+
if (w.value) {
|
|
906
|
+
if (oe.value.has(e.key)) {
|
|
907
|
+
He(e);
|
|
908
908
|
return;
|
|
909
909
|
}
|
|
910
|
-
ie.value && (
|
|
910
|
+
ie.value && (ce(e), x.value.delete(e.key)), i("edit", e);
|
|
911
911
|
}
|
|
912
|
-
},
|
|
912
|
+
}, Ae = (e) => {
|
|
913
913
|
if (r.disabled || r.loading) return;
|
|
914
|
-
let t = e.key, n =
|
|
915
|
-
if (n)
|
|
914
|
+
let t = e.key, n = x.value.has(t);
|
|
915
|
+
if (n) x.value.delete(t);
|
|
916
916
|
else {
|
|
917
|
-
for (let e of
|
|
918
|
-
|
|
917
|
+
for (let e of x.value) x.value.delete(e);
|
|
918
|
+
x.value.add(t);
|
|
919
919
|
}
|
|
920
920
|
i("item-expand", e, !n);
|
|
921
|
-
},
|
|
922
|
-
if (
|
|
921
|
+
}, je = (e) => r.chips || r.disableRowClick || r.defaultExpanded || r.disabled || r.loading ? !1 : !!(e.editing || e.expanded || !r.readonly && r.showEditButton), Me = (e) => {
|
|
922
|
+
if (je(e)) {
|
|
923
923
|
if (e.editing || e.expanded) {
|
|
924
|
-
|
|
924
|
+
He(e);
|
|
925
925
|
return;
|
|
926
926
|
}
|
|
927
|
-
r.readonly &&
|
|
927
|
+
r.readonly && ae.value ? Ae(e) : ke(e);
|
|
928
928
|
}
|
|
929
|
-
}, { deleteDialog:
|
|
929
|
+
}, { deleteDialog: Ne, deleteInFlight: O, deleteError: Pe, onDeleteClick: Ie, onDeleteDialogConfirm: Le, onDeleteDialogCancel: ze } = be({
|
|
930
930
|
onDeleteConfirm: (e) => !r.onDeleteConfirm || r.onDeleteConfirm(e),
|
|
931
931
|
onDelete: (e) => r.onDelete?.(e),
|
|
932
932
|
onDeleted: (e) => {
|
|
933
|
-
|
|
933
|
+
oe.value.delete(e.key), se.value.delete(e.key), x.value.delete(e.key), m.deleteItem(e.key, { trackDeleted: r.deleteMode === "deferred" }), i("deleted", e);
|
|
934
934
|
},
|
|
935
935
|
disableDeleteConfirm: () => r.disableDeleteConfirm || r.chips
|
|
936
|
-
}),
|
|
937
|
-
|
|
938
|
-
},
|
|
939
|
-
r.onItemSave && await r.onItemSave(e.raw),
|
|
940
|
-
},
|
|
941
|
-
|
|
942
|
-
},
|
|
943
|
-
ue(e),
|
|
944
|
-
},
|
|
945
|
-
let t =
|
|
936
|
+
}), Be = async (e) => {
|
|
937
|
+
w.value && await Ie(e);
|
|
938
|
+
}, Ve = async (e) => {
|
|
939
|
+
r.onItemSave && await r.onItemSave(e.raw), C(e), i("item-saved", e);
|
|
940
|
+
}, k = (e) => {
|
|
941
|
+
le(e);
|
|
942
|
+
}, He = (e) => {
|
|
943
|
+
ue(e), x.value.delete(e.key), i("close", e);
|
|
944
|
+
}, Ue = /* @__PURE__ */ new Map(), We = (e) => {
|
|
945
|
+
let t = Ue.get(e);
|
|
946
946
|
return t || (t = {
|
|
947
947
|
edit: () => {
|
|
948
|
-
let t =
|
|
948
|
+
let t = we(e);
|
|
949
949
|
t && ke(t);
|
|
950
950
|
},
|
|
951
951
|
save: () => {
|
|
952
|
-
let t =
|
|
953
|
-
if (t) return
|
|
952
|
+
let t = we(e);
|
|
953
|
+
if (t) return Ve(t);
|
|
954
954
|
},
|
|
955
955
|
cancel: () => {
|
|
956
|
-
let t =
|
|
957
|
-
t &&
|
|
956
|
+
let t = we(e);
|
|
957
|
+
t && k(t);
|
|
958
958
|
},
|
|
959
959
|
close: () => {
|
|
960
|
-
let t =
|
|
961
|
-
t &&
|
|
960
|
+
let t = we(e);
|
|
961
|
+
t && He(t);
|
|
962
962
|
},
|
|
963
963
|
delete: async () => {
|
|
964
|
-
let t =
|
|
965
|
-
t && await
|
|
964
|
+
let t = we(e);
|
|
965
|
+
t && await Be(t);
|
|
966
966
|
},
|
|
967
967
|
addAfter: () => {
|
|
968
|
-
let t =
|
|
969
|
-
t &&
|
|
968
|
+
let t = we(e);
|
|
969
|
+
t && De(t);
|
|
970
970
|
},
|
|
971
971
|
toggleExpand: () => {
|
|
972
|
-
let t =
|
|
973
|
-
t &&
|
|
972
|
+
let t = we(e);
|
|
973
|
+
t && Ae(t);
|
|
974
974
|
},
|
|
975
975
|
update: (t) => m.updateItem(e, t)
|
|
976
|
-
},
|
|
976
|
+
}, Ue.set(e, t)), t;
|
|
977
977
|
};
|
|
978
|
-
|
|
979
|
-
if (
|
|
978
|
+
q(() => xe.value, (e) => {
|
|
979
|
+
if (Ue.size === 0) return;
|
|
980
980
|
let t = new Set(e.map((e) => e.key));
|
|
981
|
-
for (let e of
|
|
981
|
+
for (let e of Ue.keys()) t.has(e) || Ue.delete(e);
|
|
982
982
|
});
|
|
983
|
-
let
|
|
983
|
+
let Ge = (e) => ({
|
|
984
984
|
item: e,
|
|
985
985
|
raw: e.raw,
|
|
986
986
|
index: e.index,
|
|
@@ -993,97 +993,97 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
993
993
|
unsaved: e.unsaved,
|
|
994
994
|
touch: d.value,
|
|
995
995
|
stateKeyPrefix: g.prefixFor(e.key),
|
|
996
|
-
actions:
|
|
996
|
+
actions: We(e.key)
|
|
997
997
|
});
|
|
998
998
|
Tt(() => r.unsavedSectionLabel && !r.disableUnsaved ? {
|
|
999
999
|
label: r.unsavedSectionLabel,
|
|
1000
1000
|
dirty: m.hasUnsaved.value
|
|
1001
1001
|
} : []);
|
|
1002
|
-
let
|
|
1002
|
+
let Ke = () => Re(m, (e) => {
|
|
1003
1003
|
let t = b.value.find((t) => t.key === e);
|
|
1004
|
-
t &&
|
|
1004
|
+
t && ce(t);
|
|
1005
1005
|
});
|
|
1006
|
-
return
|
|
1006
|
+
return Ye({
|
|
1007
1007
|
hasErrors: m.hasErrors,
|
|
1008
1008
|
validationScope: r.validationScope,
|
|
1009
1009
|
validateProvided: r.validate !== void 0,
|
|
1010
|
-
reveal:
|
|
1010
|
+
reveal: Ke
|
|
1011
1011
|
}), t({
|
|
1012
1012
|
...m,
|
|
1013
|
-
validateAll:
|
|
1014
|
-
}), (t, n) => (
|
|
1013
|
+
validateAll: Ke
|
|
1014
|
+
}), (t, n) => (H(), F("div", {
|
|
1015
1015
|
ref_key: "rootEl",
|
|
1016
1016
|
ref: u,
|
|
1017
|
-
class:
|
|
1017
|
+
class: V(["a-list-editor", [`a-list-editor--two-rows-${e.twoRows}`, {
|
|
1018
1018
|
"a-list-editor--readonly": e.readonly,
|
|
1019
1019
|
"a-list-editor--disabled": e.disabled,
|
|
1020
1020
|
"a-list-editor--touch": d.value,
|
|
1021
1021
|
"a-list-editor--chips": e.chips
|
|
1022
1022
|
}]])
|
|
1023
1023
|
}, [
|
|
1024
|
-
|
|
1024
|
+
I("div", {
|
|
1025
1025
|
ref_key: "rowsContainer",
|
|
1026
|
-
ref:
|
|
1026
|
+
ref: ne,
|
|
1027
1027
|
class: "a-le-card"
|
|
1028
1028
|
}, [
|
|
1029
|
-
|
|
1029
|
+
E.value ? (H(), F("div", $n, [W(t.$slots, "header", { title: e.title }, () => [e.title ? (H(), F("h3", er, G(e.title), 1)) : P("", !0)]), _e.value ? (H(), F("span", {
|
|
1030
1030
|
key: 0,
|
|
1031
1031
|
class: "a-le-unsaved-count",
|
|
1032
|
-
"data-unsaved-count":
|
|
1033
|
-
},
|
|
1034
|
-
e.loading ? (
|
|
1032
|
+
"data-unsaved-count": K(ge)
|
|
1033
|
+
}, G(K(s)("common.sortable.pendingChanges", { count: K(ge) })), 9, tr)) : P("", !0)])) : P("", !0),
|
|
1034
|
+
e.loading ? (H(), F("div", nr, [R(en, {
|
|
1035
1035
|
indeterminate: "",
|
|
1036
1036
|
color: "primary",
|
|
1037
1037
|
size: "32"
|
|
1038
|
-
})])) : e.error ? (
|
|
1038
|
+
})])) : e.error ? (H(), F("div", rr, [R($t, {
|
|
1039
1039
|
type: "error",
|
|
1040
1040
|
variant: "tonal",
|
|
1041
1041
|
density: "compact",
|
|
1042
1042
|
border: "start"
|
|
1043
1043
|
}, {
|
|
1044
|
-
default:
|
|
1044
|
+
default: J(() => [L(G(e.error), 1)]),
|
|
1045
1045
|
_: 1
|
|
1046
|
-
})])) : Se.value ? (
|
|
1046
|
+
})])) : Se.value ? (H(), F("div", ir, [W(t.$slots, "empty", {
|
|
1047
1047
|
readonly: e.readonly,
|
|
1048
1048
|
disabled: e.disabled,
|
|
1049
|
-
actions: { add:
|
|
1050
|
-
}, () => [
|
|
1049
|
+
actions: { add: D }
|
|
1050
|
+
}, () => [R(qe, {
|
|
1051
1051
|
title: pe.value,
|
|
1052
1052
|
"add-label": fe.value,
|
|
1053
|
-
"can-add":
|
|
1054
|
-
onAdd:
|
|
1053
|
+
"can-add": T.value,
|
|
1054
|
+
onAdd: D
|
|
1055
1055
|
}, null, 8, [
|
|
1056
1056
|
"title",
|
|
1057
1057
|
"add-label",
|
|
1058
1058
|
"can-add"
|
|
1059
|
-
])])])) : (
|
|
1059
|
+
])])])) : (H(!0), F(j, { key: 4 }, Vt(xe.value, (r) => (H(), F("div", {
|
|
1060
1060
|
key: String(r.key),
|
|
1061
1061
|
class: "a-le-row-wrapper"
|
|
1062
1062
|
}, [
|
|
1063
|
-
|
|
1064
|
-
|
|
1063
|
+
W(t.$slots, "before-item", B({ ref_for: !0 }, Ge(r))),
|
|
1064
|
+
I("div", {
|
|
1065
1065
|
"data-id": String(r.key),
|
|
1066
1066
|
role: "listitem",
|
|
1067
|
-
tabindex:
|
|
1068
|
-
class:
|
|
1067
|
+
tabindex: K(Te).rowTabindex(r.key),
|
|
1068
|
+
class: V(["a-le-row", {
|
|
1069
1069
|
"a-le-row--two-rows": e.twoRows === "always",
|
|
1070
1070
|
"a-le-row--editing": r.editing,
|
|
1071
1071
|
"a-le-row--expanded": r.expanded,
|
|
1072
1072
|
"a-le-row--unsaved": r.unsaved,
|
|
1073
|
-
"a-le-row--clickable":
|
|
1073
|
+
"a-le-row--clickable": je(r),
|
|
1074
1074
|
[`a-le-row--validation-${r.validationState}`]: r.validationState !== null
|
|
1075
1075
|
}]),
|
|
1076
|
-
onKeydown: (e) =>
|
|
1077
|
-
}, [
|
|
1076
|
+
onKeydown: (e) => K(Te).handleKeydown(r.key, e)
|
|
1077
|
+
}, [I("div", {
|
|
1078
1078
|
class: "a-le-row-header",
|
|
1079
|
-
onClick: (e) =>
|
|
1079
|
+
onClick: (e) => Me(r)
|
|
1080
1080
|
}, [
|
|
1081
|
-
|
|
1081
|
+
I("div", sr, [W(t.$slots, "item-compact", B({ ref_for: !0 }, Ge(r)), () => [I("span", cr, G(Ee(r.raw)), 1)]), r.unsaved ? (H(), N(ut, {
|
|
1082
1082
|
key: 0,
|
|
1083
1083
|
"dot-only": e.chips
|
|
1084
|
-
}, null, 8, ["dot-only"])) :
|
|
1085
|
-
e.chips ?
|
|
1086
|
-
|
|
1084
|
+
}, null, 8, ["dot-only"])) : P("", !0)]),
|
|
1085
|
+
e.chips ? P("", !0) : (H(), F("div", lr, [W(t.$slots, "item-status", B({ ref_for: !0 }, Ge(r)), () => [e.statusField && r.raw[e.statusField] != null && r.raw[e.statusField] !== "" ? (H(), F("span", ur, G(r.raw[e.statusField]), 1)) : P("", !0)])])),
|
|
1086
|
+
I("div", dr, [W(t.$slots, "item-actions", B({ ref_for: !0 }, Ge(r)), () => [e.chips && e.showDeleteButton && w.value ? (H(), N(Z, {
|
|
1087
1087
|
key: 0,
|
|
1088
1088
|
icon: "",
|
|
1089
1089
|
size: "x-small",
|
|
@@ -1091,15 +1091,15 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1091
1091
|
density: "compact",
|
|
1092
1092
|
active: !1,
|
|
1093
1093
|
class: "a-le-action a-le-action--chip-close",
|
|
1094
|
-
onClick:
|
|
1094
|
+
onClick: Y((e) => Be(r), ["stop"])
|
|
1095
1095
|
}, {
|
|
1096
|
-
default:
|
|
1096
|
+
default: J(() => [R(X, {
|
|
1097
1097
|
icon: "mdi-close",
|
|
1098
1098
|
size: "14"
|
|
1099
1099
|
})]),
|
|
1100
1100
|
_: 1
|
|
1101
|
-
}, 8, ["onClick"])) : (
|
|
1102
|
-
e.showEditButton &&
|
|
1101
|
+
}, 8, ["onClick"])) : (H(), F(j, { key: 1 }, [
|
|
1102
|
+
e.showEditButton && w.value && !e.defaultExpanded ? (H(), N(Z, {
|
|
1103
1103
|
key: 0,
|
|
1104
1104
|
icon: "",
|
|
1105
1105
|
size: "small",
|
|
@@ -1107,38 +1107,38 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1107
1107
|
color: "primary",
|
|
1108
1108
|
density: "comfortable",
|
|
1109
1109
|
class: "mx-1 a-le-action a-le-action--edit",
|
|
1110
|
-
onClick:
|
|
1110
|
+
onClick: Y((e) => ke(r), ["stop"])
|
|
1111
1111
|
}, {
|
|
1112
|
-
default:
|
|
1112
|
+
default: J(() => [R(X, {
|
|
1113
1113
|
icon: "mdi-pencil-outline",
|
|
1114
1114
|
size: "18"
|
|
1115
|
-
}),
|
|
1115
|
+
}), R(on, {
|
|
1116
1116
|
activator: "parent",
|
|
1117
1117
|
location: "bottom",
|
|
1118
|
-
text:
|
|
1118
|
+
text: K(s)("common.sortable.edit")
|
|
1119
1119
|
}, null, 8, ["text"])]),
|
|
1120
1120
|
_: 1
|
|
1121
|
-
}, 8, ["onClick"])) :
|
|
1122
|
-
e.showDeleteButton &&
|
|
1121
|
+
}, 8, ["onClick"])) : P("", !0),
|
|
1122
|
+
e.showDeleteButton && w.value ? (H(), N(Z, {
|
|
1123
1123
|
key: 1,
|
|
1124
1124
|
icon: "",
|
|
1125
1125
|
size: "small",
|
|
1126
1126
|
variant: "text",
|
|
1127
1127
|
density: "comfortable",
|
|
1128
1128
|
class: "mx-1 a-le-action a-le-action--delete",
|
|
1129
|
-
onClick:
|
|
1129
|
+
onClick: Y((e) => Be(r), ["stop"])
|
|
1130
1130
|
}, {
|
|
1131
|
-
default:
|
|
1131
|
+
default: J(() => [R(X, {
|
|
1132
1132
|
icon: "mdi-trash-can-outline",
|
|
1133
1133
|
size: "18"
|
|
1134
|
-
}),
|
|
1134
|
+
}), R(on, {
|
|
1135
1135
|
activator: "parent",
|
|
1136
1136
|
location: "bottom",
|
|
1137
|
-
text:
|
|
1137
|
+
text: K(s)("common.sortable.delete")
|
|
1138
1138
|
}, null, 8, ["text"])]),
|
|
1139
1139
|
_: 1
|
|
1140
|
-
}, 8, ["onClick"])) :
|
|
1141
|
-
e.showAddAfterAction &&
|
|
1140
|
+
}, 8, ["onClick"])) : P("", !0),
|
|
1141
|
+
e.showAddAfterAction && w.value ? (H(), N(Z, {
|
|
1142
1142
|
key: 2,
|
|
1143
1143
|
icon: "",
|
|
1144
1144
|
size: "small",
|
|
@@ -1147,22 +1147,22 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1147
1147
|
active: !1,
|
|
1148
1148
|
class: "mx-1 a-le-action a-le-action--menu"
|
|
1149
1149
|
}, {
|
|
1150
|
-
default:
|
|
1151
|
-
|
|
1150
|
+
default: J(() => [
|
|
1151
|
+
R(X, {
|
|
1152
1152
|
icon: "mdi-dots-vertical",
|
|
1153
1153
|
size: "18"
|
|
1154
1154
|
}),
|
|
1155
|
-
|
|
1155
|
+
R(on, {
|
|
1156
1156
|
activator: "parent",
|
|
1157
1157
|
location: "bottom",
|
|
1158
|
-
text:
|
|
1158
|
+
text: K(s)("common.sortable.more")
|
|
1159
1159
|
}, null, 8, ["text"]),
|
|
1160
|
-
|
|
1161
|
-
default:
|
|
1162
|
-
default:
|
|
1163
|
-
prepend:
|
|
1164
|
-
default:
|
|
1165
|
-
default:
|
|
1160
|
+
R($, { activator: "parent" }, {
|
|
1161
|
+
default: J(() => [R(fn, { density: "compact" }, {
|
|
1162
|
+
default: J(() => [R(Q, { onClick: (e) => De(r) }, {
|
|
1163
|
+
prepend: J(() => [R(X, { icon: "mdi-plus" })]),
|
|
1164
|
+
default: J(() => [R(pn, null, {
|
|
1165
|
+
default: J(() => [L(G(K(s)("common.sortable.addAfter")), 1)]),
|
|
1166
1166
|
_: 1
|
|
1167
1167
|
})]),
|
|
1168
1168
|
_: 1
|
|
@@ -1173,56 +1173,56 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1173
1173
|
}, 1024)
|
|
1174
1174
|
]),
|
|
1175
1175
|
_: 2
|
|
1176
|
-
}, 1024)) :
|
|
1176
|
+
}, 1024)) : P("", !0)
|
|
1177
1177
|
], 64))])])
|
|
1178
|
-
], 8,
|
|
1179
|
-
n[1] ||=
|
|
1180
|
-
|
|
1178
|
+
], 8, or), (r.editing || e.defaultExpanded) && t.$slots.item ? (H(), F(j, { key: 0 }, [I("div", fr, [I("div", pr, [W(t.$slots, "item", B({ ref_for: !0 }, Ge(r)))])]), W(t.$slots, "item-footer", B({ ref_for: !0 }, Ge(r)), () => [ve.value && !e.defaultExpanded ? (H(), F("div", mr, [
|
|
1179
|
+
n[1] ||= I("div", { class: "a-le-row-footer-spacer" }, null, -1),
|
|
1180
|
+
R(Z, {
|
|
1181
1181
|
variant: "text",
|
|
1182
1182
|
disabled: r.loading,
|
|
1183
|
-
onClick:
|
|
1183
|
+
onClick: Y((e) => k(r), ["stop"])
|
|
1184
1184
|
}, {
|
|
1185
|
-
default:
|
|
1185
|
+
default: J(() => [L(G(K(s)("common.button.cancel")), 1)]),
|
|
1186
1186
|
_: 1
|
|
1187
1187
|
}, 8, ["disabled", "onClick"]),
|
|
1188
|
-
|
|
1188
|
+
R(Z, {
|
|
1189
1189
|
color: "primary",
|
|
1190
1190
|
variant: "flat",
|
|
1191
1191
|
"prepend-icon": "mdi-check",
|
|
1192
1192
|
disabled: r.loading,
|
|
1193
|
-
onClick:
|
|
1193
|
+
onClick: Y((e) => Ve(r), ["stop"])
|
|
1194
1194
|
}, {
|
|
1195
|
-
default:
|
|
1195
|
+
default: J(() => [L(G(K(s)("common.button.save")), 1)]),
|
|
1196
1196
|
_: 1
|
|
1197
1197
|
}, 8, ["disabled", "onClick"])
|
|
1198
|
-
])) :
|
|
1199
|
-
|
|
1198
|
+
])) : P("", !0)])], 64)) : t.$slots["item-readonly"] && (e.readonly || r.expanded) ? (H(), F("div", hr, [I("div", gr, [W(t.$slots, "item-readonly", B({ ref_for: !0 }, Ge(r)))])])) : P("", !0)], 42, ar),
|
|
1199
|
+
W(t.$slots, "after-item", B({ ref_for: !0 }, Ge(r)))
|
|
1200
1200
|
]))), 128)),
|
|
1201
|
-
|
|
1201
|
+
T.value && !e.loading && !e.error && !Se.value ? W(t.$slots, "add-button", {
|
|
1202
1202
|
readonly: e.readonly,
|
|
1203
1203
|
disabled: e.disabled,
|
|
1204
|
-
props: { onClick:
|
|
1205
|
-
actions: { add:
|
|
1206
|
-
}, () => [
|
|
1204
|
+
props: { onClick: D },
|
|
1205
|
+
actions: { add: D }
|
|
1206
|
+
}, () => [I("button", {
|
|
1207
1207
|
type: "button",
|
|
1208
1208
|
class: "a-le-row-add",
|
|
1209
|
-
onClick:
|
|
1210
|
-
}, [
|
|
1209
|
+
onClick: D
|
|
1210
|
+
}, [R(X, {
|
|
1211
1211
|
icon: "mdi-plus",
|
|
1212
1212
|
size: "18"
|
|
1213
|
-
}),
|
|
1213
|
+
}), I("span", null, G(fe.value), 1)])], void 0, 5) : P("", !0)
|
|
1214
1214
|
], 512),
|
|
1215
|
-
|
|
1216
|
-
modelValue:
|
|
1217
|
-
"onUpdate:modelValue": n[0] ||= (e) => Nt(
|
|
1215
|
+
R(Oe, {
|
|
1216
|
+
modelValue: K(Ne),
|
|
1217
|
+
"onUpdate:modelValue": n[0] ||= (e) => Nt(Ne) ? Ne.value = e : null,
|
|
1218
1218
|
title: me.value,
|
|
1219
|
-
text:
|
|
1220
|
-
"confirm-label":
|
|
1221
|
-
"cancel-label":
|
|
1222
|
-
error:
|
|
1223
|
-
"in-flight":
|
|
1224
|
-
onConfirm:
|
|
1225
|
-
onCancel:
|
|
1219
|
+
text: he.value,
|
|
1220
|
+
"confirm-label": K(s)("common.sortable.delete"),
|
|
1221
|
+
"cancel-label": K(s)("common.button.cancel"),
|
|
1222
|
+
error: K(Pe),
|
|
1223
|
+
"in-flight": K(O),
|
|
1224
|
+
onConfirm: K(Le),
|
|
1225
|
+
onCancel: K(ze)
|
|
1226
1226
|
}, null, 8, [
|
|
1227
1227
|
"modelValue",
|
|
1228
1228
|
"title",
|
|
@@ -1234,36 +1234,36 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1234
1234
|
"onConfirm",
|
|
1235
1235
|
"onCancel"
|
|
1236
1236
|
]),
|
|
1237
|
-
|
|
1238
|
-
n:
|
|
1239
|
-
total:
|
|
1237
|
+
I("div", _r, G(K(Te).grabbedKey.value === null ? "" : K(s)("common.sortable.keyboardGrab.status", {
|
|
1238
|
+
n: K(Te).grabbedIndex.value + 1,
|
|
1239
|
+
total: K(Te).totalCount.value
|
|
1240
1240
|
})), 1)
|
|
1241
1241
|
], 2));
|
|
1242
1242
|
}
|
|
1243
|
-
}),
|
|
1244
|
-
let r =
|
|
1243
|
+
}), yr = (e, t) => e.find((e) => e.key === t) ?? null, br = (e, t, n) => {
|
|
1244
|
+
let r = yr(e, n);
|
|
1245
1245
|
for (; r && r.parentKey !== null;) {
|
|
1246
1246
|
if (r.parentKey === t) return !0;
|
|
1247
|
-
r =
|
|
1247
|
+
r = yr(e, r.parentKey);
|
|
1248
1248
|
}
|
|
1249
1249
|
return !1;
|
|
1250
|
-
},
|
|
1251
|
-
let r =
|
|
1250
|
+
}, xr = (e, t, n) => {
|
|
1251
|
+
let r = yr(e, t);
|
|
1252
1252
|
for (; r && r.depth > n;) {
|
|
1253
1253
|
if (r.parentKey === null) return null;
|
|
1254
|
-
r =
|
|
1254
|
+
r = yr(e, r.parentKey);
|
|
1255
1255
|
}
|
|
1256
1256
|
return r && r.depth === n ? r : null;
|
|
1257
|
-
},
|
|
1257
|
+
}, Sr = (e, t, n) => n === t || br(e, t, n), Cr = (e, t, n, r) => {
|
|
1258
1258
|
for (let i = t; i >= 0 && i < e.length; i += n) {
|
|
1259
1259
|
let t = e[i];
|
|
1260
|
-
if (!
|
|
1260
|
+
if (!Sr(e, r, t.key)) return t;
|
|
1261
1261
|
}
|
|
1262
1262
|
return null;
|
|
1263
|
-
},
|
|
1263
|
+
}, wr = (e) => {
|
|
1264
1264
|
let { pointer: t, hoveredRow: n, sourceKey: r, sourceSubtreeDepth: i, viewItems: a, maxDepth: o, indentPx: s, containerLeft: c, containerPaddingLeft: l } = e;
|
|
1265
|
-
if (n.key === r ||
|
|
1266
|
-
let u = t.y - n.rect.top < n.rect.height / 2, d = u ? "top" : "bottom", f = a.findIndex((e) => e.key === n.key), p = u ?
|
|
1265
|
+
if (n.key === r || br(a, r, n.key)) return null;
|
|
1266
|
+
let u = t.y - n.rect.top < n.rect.height / 2, d = u ? "top" : "bottom", f = a.findIndex((e) => e.key === n.key), p = u ? Cr(a, f - 1, -1, r) : Cr(a, f, -1, r), m = u ? Cr(a, f, 1, r) : Cr(a, f + 1, 1, r), h = t.x - c - l, g = Math.round(h / s), _ = p ? p.depth + 1 : 0, v = m ? m.depth : 0, y = Math.max(v, Math.min(g, _)), b;
|
|
1267
1267
|
if (!p) b = {
|
|
1268
1268
|
type: "insert",
|
|
1269
1269
|
refKey: n.key,
|
|
@@ -1295,7 +1295,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1295
1295
|
levelRowKey: p.key
|
|
1296
1296
|
};
|
|
1297
1297
|
else {
|
|
1298
|
-
let e =
|
|
1298
|
+
let e = xr(a, p.key, y);
|
|
1299
1299
|
b = e ? {
|
|
1300
1300
|
type: "insert",
|
|
1301
1301
|
refKey: n.key,
|
|
@@ -1321,31 +1321,31 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1321
1321
|
desired: b,
|
|
1322
1322
|
reason: "maxDepth"
|
|
1323
1323
|
} : b;
|
|
1324
|
-
},
|
|
1324
|
+
}, Tr = [
|
|
1325
1325
|
"data-id",
|
|
1326
1326
|
"aria-level",
|
|
1327
1327
|
"tabindex"
|
|
1328
|
-
],
|
|
1328
|
+
], Er = ["aria-label"], Dr = {
|
|
1329
1329
|
key: 2,
|
|
1330
1330
|
class: "a-nested-list-editor__tree-toggle a-nested-list-editor__tree-toggle--spacer",
|
|
1331
1331
|
"aria-hidden": "true"
|
|
1332
|
-
},
|
|
1332
|
+
}, Or = { class: "a-le-row-main" }, kr = { class: "a-le-title" }, Ar = {
|
|
1333
1333
|
key: 0,
|
|
1334
1334
|
class: "a-nested-list-editor__drag-count",
|
|
1335
1335
|
"aria-hidden": "true"
|
|
1336
|
-
},
|
|
1336
|
+
}, jr = {
|
|
1337
1337
|
key: 3,
|
|
1338
1338
|
class: "a-le-status"
|
|
1339
|
-
},
|
|
1339
|
+
}, Mr = {
|
|
1340
1340
|
key: 0,
|
|
1341
1341
|
class: "a-le-status-badge"
|
|
1342
|
-
},
|
|
1342
|
+
}, Nr = { class: "a-le-actions" }, Pr = { class: "a-le-row-body" }, Fr = { class: "a-le-form" }, Ir = {
|
|
1343
1343
|
key: 0,
|
|
1344
1344
|
class: "a-le-row-footer"
|
|
1345
|
-
},
|
|
1345
|
+
}, Lr = {
|
|
1346
1346
|
key: 1,
|
|
1347
1347
|
class: "a-le-row-body"
|
|
1348
|
-
},
|
|
1348
|
+
}, Rr = { class: "a-le-form" }, zr = ["data-parent-id"], Br = "a-nested-list-editor__group", Vr = "a-le-drag-handle", Hr = /* @__PURE__ */ z({
|
|
1349
1349
|
__name: "LeNestedRow",
|
|
1350
1350
|
props: {
|
|
1351
1351
|
vi: {},
|
|
@@ -1355,22 +1355,22 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1355
1355
|
callbacks: {}
|
|
1356
1356
|
},
|
|
1357
1357
|
setup(e) {
|
|
1358
|
-
let t = e, n =
|
|
1358
|
+
let t = e, n = Hr, { t: r } = Zt(), i = (e) => `--row-${String(e).replace(/\W/g, "_")}`, a = (e) => {
|
|
1359
1359
|
if (typeof t.context.resolveValidation == "function") return t.context.resolveValidation(e, t.vi.key, t.vi.index);
|
|
1360
1360
|
let n = e.validationState;
|
|
1361
1361
|
return n === "valid" || n === "invalid" || n === "warning" ? n : null;
|
|
1362
1362
|
}, o = () => t.context.buildSlotProps(t.vi), s = () => t.viewItems.filter((e) => e.parentKey === t.vi.key);
|
|
1363
|
-
return (t, c) => (
|
|
1364
|
-
class:
|
|
1363
|
+
return (t, c) => (H(), F("div", {
|
|
1364
|
+
class: V(["a-le-row-wrapper", { "a-le-row-wrapper--drop-disabled": e.dragState !== null && e.dragState.sourceKey === e.vi.key }]),
|
|
1365
1365
|
"data-id": String(e.vi.key),
|
|
1366
1366
|
role: "treeitem",
|
|
1367
1367
|
"aria-level": e.vi.depth + 1,
|
|
1368
1368
|
tabindex: e.context.keyboardNav ? e.context.keyboardNav.rowTabindex(e.vi.key) : void 0,
|
|
1369
1369
|
onKeydown: c[17] ||= (t) => e.context.keyboardNav ? e.context.keyboardNav.handleKeydown(e.vi.key, t) : void 0
|
|
1370
1370
|
}, [
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
class:
|
|
1371
|
+
W(t.$slots, "before-item", It(jt(o()))),
|
|
1372
|
+
I("div", {
|
|
1373
|
+
class: V([
|
|
1374
1374
|
"a-le-row",
|
|
1375
1375
|
e.vi.depth > 0 ? "a-le-row--child" : null,
|
|
1376
1376
|
{
|
|
@@ -1389,73 +1389,73 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1389
1389
|
"anchor-name": i(e.vi.key),
|
|
1390
1390
|
"--parent-anchor": e.vi.parentKey === null ? "none" : i(e.vi.parentKey)
|
|
1391
1391
|
})
|
|
1392
|
-
}, [
|
|
1392
|
+
}, [I("div", {
|
|
1393
1393
|
class: "a-le-row-header",
|
|
1394
1394
|
onClick: c[14] ||= (t) => e.callbacks.onRowClick(e.vi)
|
|
1395
1395
|
}, [
|
|
1396
|
-
e.context.dragEnabled ? (
|
|
1396
|
+
e.context.dragEnabled ? (H(), N(et, {
|
|
1397
1397
|
key: 0,
|
|
1398
|
-
class:
|
|
1399
|
-
})) :
|
|
1400
|
-
e.context.showExpandToggle && e.vi.childrenAllowed ? (
|
|
1398
|
+
class: V(Vr)
|
|
1399
|
+
})) : P("", !0),
|
|
1400
|
+
e.context.showExpandToggle && e.vi.childrenAllowed ? (H(), F("button", {
|
|
1401
1401
|
key: 1,
|
|
1402
1402
|
type: "button",
|
|
1403
|
-
class:
|
|
1403
|
+
class: V(["a-nested-list-editor__tree-toggle", {
|
|
1404
1404
|
"a-nested-list-editor__tree-toggle--empty": !e.vi.hasChildren,
|
|
1405
1405
|
"a-nested-list-editor__tree-toggle--open": e.vi.childrenExpanded
|
|
1406
1406
|
}]),
|
|
1407
|
-
"aria-label": e.vi.childrenExpanded ?
|
|
1408
|
-
onClick: c[0] ||=
|
|
1409
|
-
}, [...c[18] ||= [
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
e.vi.hasChildren ? (
|
|
1407
|
+
"aria-label": e.vi.childrenExpanded ? K(r)("common.sortable.close") : K(r)("common.sortable.edit"),
|
|
1408
|
+
onClick: c[0] ||= Y((t) => e.vi.hasChildren && e.callbacks.onChevronClick(e.vi), ["stop"])
|
|
1409
|
+
}, [...c[18] ||= [I("span", { class: "a-nested-list-editor__tree-toggle-caret" }, null, -1)]], 10, Er)) : e.context.showExpandToggle ? (H(), F("span", Dr)) : P("", !0),
|
|
1410
|
+
I("div", Or, [
|
|
1411
|
+
W(t.$slots, "item-compact", It(jt(o())), () => [I("span", kr, G(e.context.resolveCompactText(e.vi.raw, e.vi.key)), 1)]),
|
|
1412
|
+
e.vi.hasChildren ? (H(), F("span", Ar, [R(X, {
|
|
1413
1413
|
icon: "mdi-file-tree",
|
|
1414
1414
|
size: "14"
|
|
1415
|
-
}),
|
|
1416
|
-
e.vi.unsaved ? (
|
|
1415
|
+
}), L(" +" + G(e.vi.childrenCount), 1)])) : P("", !0),
|
|
1416
|
+
e.vi.unsaved ? (H(), N(ut, { key: 1 })) : P("", !0)
|
|
1417
1417
|
]),
|
|
1418
|
-
e.context.reorderMode ?
|
|
1419
|
-
|
|
1420
|
-
|
|
1418
|
+
e.context.reorderMode ? P("", !0) : (H(), F("div", jr, [W(t.$slots, "item-status", It(jt(o())), () => [e.context.statusField && e.vi.raw[e.context.statusField] != null && e.vi.raw[e.context.statusField] !== "" ? (H(), F("span", Mr, G(e.vi.raw[e.context.statusField]), 1)) : P("", !0)])])),
|
|
1419
|
+
I("div", Nr, [W(t.$slots, "item-actions", It(jt(o())), () => [e.context.reorderMode ? (H(), F(j, { key: 0 }, [
|
|
1420
|
+
R(Z, {
|
|
1421
1421
|
icon: "",
|
|
1422
1422
|
size: "small",
|
|
1423
1423
|
variant: "text",
|
|
1424
1424
|
density: "comfortable",
|
|
1425
1425
|
disabled: e.vi.firstInParent,
|
|
1426
1426
|
class: "mx-1 a-le-action a-le-action--up",
|
|
1427
|
-
onClick: c[1] ||=
|
|
1427
|
+
onClick: c[1] ||= Y((t) => e.callbacks.moveUp(e.vi.key), ["stop"])
|
|
1428
1428
|
}, {
|
|
1429
|
-
default:
|
|
1429
|
+
default: J(() => [R(X, {
|
|
1430
1430
|
icon: "mdi-arrow-up",
|
|
1431
1431
|
size: "18"
|
|
1432
|
-
}),
|
|
1432
|
+
}), R(on, {
|
|
1433
1433
|
activator: "parent",
|
|
1434
1434
|
location: "bottom",
|
|
1435
|
-
text:
|
|
1435
|
+
text: K(r)("common.sortable.moveUp")
|
|
1436
1436
|
}, null, 8, ["text"])]),
|
|
1437
1437
|
_: 1
|
|
1438
1438
|
}, 8, ["disabled"]),
|
|
1439
|
-
|
|
1439
|
+
R(Z, {
|
|
1440
1440
|
icon: "",
|
|
1441
1441
|
size: "small",
|
|
1442
1442
|
variant: "text",
|
|
1443
1443
|
density: "comfortable",
|
|
1444
1444
|
disabled: e.vi.lastInParent,
|
|
1445
1445
|
class: "mx-1 a-le-action a-le-action--down",
|
|
1446
|
-
onClick: c[2] ||=
|
|
1446
|
+
onClick: c[2] ||= Y((t) => e.callbacks.moveDown(e.vi.key), ["stop"])
|
|
1447
1447
|
}, {
|
|
1448
|
-
default:
|
|
1448
|
+
default: J(() => [R(X, {
|
|
1449
1449
|
icon: "mdi-arrow-down",
|
|
1450
1450
|
size: "18"
|
|
1451
|
-
}),
|
|
1451
|
+
}), R(on, {
|
|
1452
1452
|
activator: "parent",
|
|
1453
1453
|
location: "bottom",
|
|
1454
|
-
text:
|
|
1454
|
+
text: K(r)("common.sortable.moveDown")
|
|
1455
1455
|
}, null, 8, ["text"])]),
|
|
1456
1456
|
_: 1
|
|
1457
1457
|
}, 8, ["disabled"]),
|
|
1458
|
-
|
|
1458
|
+
R(Z, {
|
|
1459
1459
|
icon: "",
|
|
1460
1460
|
size: "small",
|
|
1461
1461
|
variant: "text",
|
|
@@ -1463,99 +1463,99 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1463
1463
|
active: !1,
|
|
1464
1464
|
class: "mx-1 a-le-action a-le-action--menu"
|
|
1465
1465
|
}, {
|
|
1466
|
-
default:
|
|
1467
|
-
|
|
1466
|
+
default: J(() => [
|
|
1467
|
+
R(X, {
|
|
1468
1468
|
icon: "mdi-dots-vertical",
|
|
1469
1469
|
size: "18"
|
|
1470
1470
|
}),
|
|
1471
|
-
|
|
1471
|
+
R(on, {
|
|
1472
1472
|
activator: "parent",
|
|
1473
1473
|
location: "bottom",
|
|
1474
|
-
text:
|
|
1474
|
+
text: K(r)("common.sortable.more")
|
|
1475
1475
|
}, null, 8, ["text"]),
|
|
1476
|
-
|
|
1477
|
-
default:
|
|
1478
|
-
default:
|
|
1479
|
-
|
|
1476
|
+
R($, { activator: "parent" }, {
|
|
1477
|
+
default: J(() => [R(fn, { density: "compact" }, {
|
|
1478
|
+
default: J(() => [
|
|
1479
|
+
R(Q, {
|
|
1480
1480
|
disabled: e.vi.firstInParent,
|
|
1481
|
-
onClick: c[3] ||=
|
|
1481
|
+
onClick: c[3] ||= Y((t) => e.callbacks.moveTop(e.vi.key), ["stop"])
|
|
1482
1482
|
}, {
|
|
1483
|
-
prepend:
|
|
1484
|
-
default:
|
|
1485
|
-
default:
|
|
1483
|
+
prepend: J(() => [R(X, { icon: "mdi-arrow-collapse-up" })]),
|
|
1484
|
+
default: J(() => [R(pn, null, {
|
|
1485
|
+
default: J(() => [L(G(K(r)("common.sortable.moveToTop")), 1)]),
|
|
1486
1486
|
_: 1
|
|
1487
1487
|
})]),
|
|
1488
1488
|
_: 1
|
|
1489
1489
|
}, 8, ["disabled"]),
|
|
1490
|
-
|
|
1490
|
+
R(Q, {
|
|
1491
1491
|
disabled: e.vi.lastInParent,
|
|
1492
|
-
onClick: c[4] ||=
|
|
1492
|
+
onClick: c[4] ||= Y((t) => e.callbacks.moveBottom(e.vi.key), ["stop"])
|
|
1493
1493
|
}, {
|
|
1494
|
-
prepend:
|
|
1495
|
-
default:
|
|
1496
|
-
default:
|
|
1494
|
+
prepend: J(() => [R(X, { icon: "mdi-arrow-collapse-down" })]),
|
|
1495
|
+
default: J(() => [R(pn, null, {
|
|
1496
|
+
default: J(() => [L(G(K(r)("common.sortable.moveToBottom")), 1)]),
|
|
1497
1497
|
_: 1
|
|
1498
1498
|
})]),
|
|
1499
1499
|
_: 1
|
|
1500
1500
|
}, 8, ["disabled"]),
|
|
1501
|
-
e.context.showMoveToPosition && (!e.vi.firstInParent || !e.vi.lastInParent) ? (
|
|
1501
|
+
e.context.showMoveToPosition && (!e.vi.firstInParent || !e.vi.lastInParent) ? (H(), N(Q, {
|
|
1502
1502
|
key: 0,
|
|
1503
|
-
onClick: c[5] ||=
|
|
1503
|
+
onClick: c[5] ||= Y((t) => e.callbacks.openMoveToPosition(e.vi), ["stop"])
|
|
1504
1504
|
}, {
|
|
1505
|
-
prepend:
|
|
1506
|
-
default:
|
|
1507
|
-
default:
|
|
1505
|
+
prepend: J(() => [R(X, { icon: "mdi-target" })]),
|
|
1506
|
+
default: J(() => [R(pn, null, {
|
|
1507
|
+
default: J(() => [L(G(K(r)("common.sortable.moveToPosition.action")), 1)]),
|
|
1508
1508
|
_: 1
|
|
1509
1509
|
})]),
|
|
1510
1510
|
_: 1
|
|
1511
|
-
})) :
|
|
1512
|
-
e.context.showChangeParent ? (
|
|
1511
|
+
})) : P("", !0),
|
|
1512
|
+
e.context.showChangeParent ? (H(), N(Q, {
|
|
1513
1513
|
key: 1,
|
|
1514
|
-
onClick: c[6] ||=
|
|
1514
|
+
onClick: c[6] ||= Y((t) => e.callbacks.openChangeParent(e.vi), ["stop"])
|
|
1515
1515
|
}, {
|
|
1516
|
-
prepend:
|
|
1517
|
-
default:
|
|
1518
|
-
default:
|
|
1516
|
+
prepend: J(() => [R(X, { icon: "mdi-folder-move-outline" })]),
|
|
1517
|
+
default: J(() => [R(pn, null, {
|
|
1518
|
+
default: J(() => [L(G(K(r)("common.sortable.changeParent.action")), 1)]),
|
|
1519
1519
|
_: 1
|
|
1520
1520
|
})]),
|
|
1521
1521
|
_: 1
|
|
1522
|
-
})) :
|
|
1523
|
-
|
|
1522
|
+
})) : P("", !0),
|
|
1523
|
+
R(Q, {
|
|
1524
1524
|
disabled: !e.vi.canIndent,
|
|
1525
|
-
onClick: c[7] ||=
|
|
1525
|
+
onClick: c[7] ||= Y((t) => e.callbacks.indent(e.vi), ["stop"])
|
|
1526
1526
|
}, {
|
|
1527
|
-
prepend:
|
|
1528
|
-
default:
|
|
1529
|
-
default:
|
|
1527
|
+
prepend: J(() => [R(X, { icon: "mdi-format-indent-increase" })]),
|
|
1528
|
+
default: J(() => [R(pn, null, {
|
|
1529
|
+
default: J(() => [L(G(K(r)("common.sortable.indent")), 1)]),
|
|
1530
1530
|
_: 1
|
|
1531
1531
|
})]),
|
|
1532
1532
|
_: 1
|
|
1533
1533
|
}, 8, ["disabled"]),
|
|
1534
|
-
|
|
1534
|
+
R(Q, {
|
|
1535
1535
|
disabled: !e.vi.canOutdent,
|
|
1536
|
-
onClick: c[8] ||=
|
|
1536
|
+
onClick: c[8] ||= Y((t) => e.callbacks.outdent(e.vi), ["stop"])
|
|
1537
1537
|
}, {
|
|
1538
|
-
prepend:
|
|
1539
|
-
default:
|
|
1540
|
-
default:
|
|
1538
|
+
prepend: J(() => [R(X, { icon: "mdi-format-indent-decrease" })]),
|
|
1539
|
+
default: J(() => [R(pn, null, {
|
|
1540
|
+
default: J(() => [L(G(K(r)("common.sortable.outdent")), 1)]),
|
|
1541
1541
|
_: 1
|
|
1542
1542
|
})]),
|
|
1543
1543
|
_: 1
|
|
1544
1544
|
}, 8, ["disabled"]),
|
|
1545
|
-
e.context.showDeleteButton && e.context.canInteract ? (
|
|
1545
|
+
e.context.showDeleteButton && e.context.canInteract ? (H(), N(Q, {
|
|
1546
1546
|
key: 2,
|
|
1547
|
-
onClick: c[9] ||=
|
|
1547
|
+
onClick: c[9] ||= Y((t) => e.callbacks.onDeleteClick(e.vi), ["stop"])
|
|
1548
1548
|
}, {
|
|
1549
|
-
prepend:
|
|
1549
|
+
prepend: J(() => [R(X, {
|
|
1550
1550
|
icon: "mdi-trash-can-outline",
|
|
1551
1551
|
color: "error"
|
|
1552
1552
|
})]),
|
|
1553
|
-
default:
|
|
1554
|
-
default:
|
|
1553
|
+
default: J(() => [R(pn, { class: "text-error" }, {
|
|
1554
|
+
default: J(() => [L(G(K(r)("common.sortable.delete")), 1)]),
|
|
1555
1555
|
_: 1
|
|
1556
1556
|
})]),
|
|
1557
1557
|
_: 1
|
|
1558
|
-
})) :
|
|
1558
|
+
})) : P("", !0)
|
|
1559
1559
|
]),
|
|
1560
1560
|
_: 1
|
|
1561
1561
|
})]),
|
|
@@ -1564,8 +1564,8 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1564
1564
|
]),
|
|
1565
1565
|
_: 1
|
|
1566
1566
|
})
|
|
1567
|
-
], 64)) : (
|
|
1568
|
-
e.context.showEditButton && e.context.canInteract ? (
|
|
1567
|
+
], 64)) : (H(), F(j, { key: 1 }, [
|
|
1568
|
+
e.context.showEditButton && e.context.canInteract ? (H(), N(Z, {
|
|
1569
1569
|
key: 0,
|
|
1570
1570
|
icon: "",
|
|
1571
1571
|
size: "small",
|
|
@@ -1573,38 +1573,38 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1573
1573
|
color: "primary",
|
|
1574
1574
|
density: "comfortable",
|
|
1575
1575
|
class: "mx-1 a-le-action a-le-action--edit",
|
|
1576
|
-
onClick: c[10] ||=
|
|
1576
|
+
onClick: c[10] ||= Y((t) => e.callbacks.onEditClick(e.vi), ["stop"])
|
|
1577
1577
|
}, {
|
|
1578
|
-
default:
|
|
1578
|
+
default: J(() => [R(X, {
|
|
1579
1579
|
icon: "mdi-pencil-outline",
|
|
1580
1580
|
size: "18"
|
|
1581
|
-
}),
|
|
1581
|
+
}), R(on, {
|
|
1582
1582
|
activator: "parent",
|
|
1583
1583
|
location: "bottom",
|
|
1584
|
-
text:
|
|
1584
|
+
text: K(r)("common.sortable.edit")
|
|
1585
1585
|
}, null, 8, ["text"])]),
|
|
1586
1586
|
_: 1
|
|
1587
|
-
})) :
|
|
1588
|
-
e.context.showDeleteButton && e.context.canInteract ? (
|
|
1587
|
+
})) : P("", !0),
|
|
1588
|
+
e.context.showDeleteButton && e.context.canInteract ? (H(), N(Z, {
|
|
1589
1589
|
key: 1,
|
|
1590
1590
|
icon: "",
|
|
1591
1591
|
size: "small",
|
|
1592
1592
|
variant: "text",
|
|
1593
1593
|
density: "comfortable",
|
|
1594
1594
|
class: "mx-1 a-le-action a-le-action--delete",
|
|
1595
|
-
onClick: c[11] ||=
|
|
1595
|
+
onClick: c[11] ||= Y((t) => e.callbacks.onDeleteClick(e.vi), ["stop"])
|
|
1596
1596
|
}, {
|
|
1597
|
-
default:
|
|
1597
|
+
default: J(() => [R(X, {
|
|
1598
1598
|
icon: "mdi-trash-can-outline",
|
|
1599
1599
|
size: "18"
|
|
1600
|
-
}),
|
|
1600
|
+
}), R(on, {
|
|
1601
1601
|
activator: "parent",
|
|
1602
1602
|
location: "bottom",
|
|
1603
|
-
text:
|
|
1603
|
+
text: K(r)("common.sortable.delete")
|
|
1604
1604
|
}, null, 8, ["text"])]),
|
|
1605
1605
|
_: 1
|
|
1606
|
-
})) :
|
|
1607
|
-
e.context.canInteract && (e.context.showAddChildButton && e.vi.canAddChild || e.context.showAddAfterAction) ? (
|
|
1606
|
+
})) : P("", !0),
|
|
1607
|
+
e.context.canInteract && (e.context.showAddChildButton && e.vi.canAddChild || e.context.showAddAfterAction) ? (H(), N(Z, {
|
|
1608
1608
|
key: 2,
|
|
1609
1609
|
icon: "",
|
|
1610
1610
|
size: "small",
|
|
@@ -1613,77 +1613,77 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1613
1613
|
active: !1,
|
|
1614
1614
|
class: "mx-1 a-le-action a-le-action--menu"
|
|
1615
1615
|
}, {
|
|
1616
|
-
default:
|
|
1617
|
-
|
|
1616
|
+
default: J(() => [
|
|
1617
|
+
R(X, {
|
|
1618
1618
|
icon: "mdi-dots-vertical",
|
|
1619
1619
|
size: "18"
|
|
1620
1620
|
}),
|
|
1621
|
-
|
|
1621
|
+
R(on, {
|
|
1622
1622
|
activator: "parent",
|
|
1623
1623
|
location: "bottom",
|
|
1624
|
-
text:
|
|
1624
|
+
text: K(r)("common.sortable.more")
|
|
1625
1625
|
}, null, 8, ["text"]),
|
|
1626
|
-
|
|
1627
|
-
default:
|
|
1628
|
-
default:
|
|
1626
|
+
R($, { activator: "parent" }, {
|
|
1627
|
+
default: J(() => [R(fn, { density: "compact" }, {
|
|
1628
|
+
default: J(() => [e.context.showAddAfterAction ? (H(), N(Q, {
|
|
1629
1629
|
key: 0,
|
|
1630
|
-
onClick: c[12] ||=
|
|
1630
|
+
onClick: c[12] ||= Y((t) => e.callbacks.onAddAfterClick(e.vi), ["stop"])
|
|
1631
1631
|
}, {
|
|
1632
|
-
prepend:
|
|
1633
|
-
default:
|
|
1634
|
-
default:
|
|
1632
|
+
prepend: J(() => [R(X, { icon: "mdi-playlist-plus" })]),
|
|
1633
|
+
default: J(() => [R(pn, null, {
|
|
1634
|
+
default: J(() => [L(G(K(r)("common.sortable.addAfter")), 1)]),
|
|
1635
1635
|
_: 1
|
|
1636
1636
|
})]),
|
|
1637
1637
|
_: 1
|
|
1638
|
-
})) :
|
|
1638
|
+
})) : P("", !0), e.context.showAddChildButton && e.vi.canAddChild ? (H(), N(Q, {
|
|
1639
1639
|
key: 1,
|
|
1640
|
-
onClick: c[13] ||=
|
|
1640
|
+
onClick: c[13] ||= Y((t) => e.callbacks.onAddChildClick(e.vi), ["stop"])
|
|
1641
1641
|
}, {
|
|
1642
|
-
prepend:
|
|
1643
|
-
default:
|
|
1644
|
-
default:
|
|
1642
|
+
prepend: J(() => [R(X, { icon: "mdi-subdirectory-arrow-right" })]),
|
|
1643
|
+
default: J(() => [R(pn, null, {
|
|
1644
|
+
default: J(() => [L(G(K(r)("common.sortable.addChild")), 1)]),
|
|
1645
1645
|
_: 1
|
|
1646
1646
|
})]),
|
|
1647
1647
|
_: 1
|
|
1648
|
-
})) :
|
|
1648
|
+
})) : P("", !0)]),
|
|
1649
1649
|
_: 1
|
|
1650
1650
|
})]),
|
|
1651
1651
|
_: 1
|
|
1652
1652
|
})
|
|
1653
1653
|
]),
|
|
1654
1654
|
_: 1
|
|
1655
|
-
})) :
|
|
1655
|
+
})) : P("", !0)
|
|
1656
1656
|
], 64))])])
|
|
1657
|
-
]), e.vi.editing && !e.context.reorderMode && t.$slots.item ? (
|
|
1658
|
-
c[19] ||=
|
|
1659
|
-
|
|
1657
|
+
]), e.vi.editing && !e.context.reorderMode && t.$slots.item ? (H(), F(j, { key: 0 }, [I("div", Pr, [I("div", Fr, [W(t.$slots, "item", It(jt(o())))])]), W(t.$slots, "item-footer", It(jt(o())), () => [e.context.showInlineSaveFooter ? (H(), F("div", Ir, [
|
|
1658
|
+
c[19] ||= I("div", { class: "a-le-row-footer-spacer" }, null, -1),
|
|
1659
|
+
R(Z, {
|
|
1660
1660
|
variant: "text",
|
|
1661
1661
|
disabled: e.vi.loading,
|
|
1662
|
-
onClick: c[15] ||=
|
|
1662
|
+
onClick: c[15] ||= Y((t) => e.callbacks.onCancelClick(e.vi), ["stop"])
|
|
1663
1663
|
}, {
|
|
1664
|
-
default:
|
|
1664
|
+
default: J(() => [L(G(K(r)("common.button.cancel")), 1)]),
|
|
1665
1665
|
_: 1
|
|
1666
1666
|
}, 8, ["disabled"]),
|
|
1667
|
-
|
|
1667
|
+
R(Z, {
|
|
1668
1668
|
color: "primary",
|
|
1669
1669
|
variant: "flat",
|
|
1670
1670
|
"prepend-icon": "mdi-check",
|
|
1671
1671
|
disabled: e.vi.loading,
|
|
1672
|
-
onClick: c[16] ||=
|
|
1672
|
+
onClick: c[16] ||= Y((t) => e.callbacks.onSaveClick(e.vi), ["stop"])
|
|
1673
1673
|
}, {
|
|
1674
|
-
default:
|
|
1674
|
+
default: J(() => [L(G(K(r)("common.button.save")), 1)]),
|
|
1675
1675
|
_: 1
|
|
1676
1676
|
}, 8, ["disabled"])
|
|
1677
|
-
])) :
|
|
1678
|
-
|
|
1679
|
-
e.vi.hasChildren && e.vi.childrenExpanded ? (
|
|
1677
|
+
])) : P("", !0)])], 64)) : t.$slots["item-readonly"] && (e.context.readonly || e.vi.expanded) && !e.context.reorderMode ? (H(), F("div", Lr, [I("div", Rr, [W(t.$slots, "item-readonly", It(jt(o())))])])) : P("", !0)], 6),
|
|
1678
|
+
W(t.$slots, "after-item", It(jt(o()))),
|
|
1679
|
+
e.vi.hasChildren && e.vi.childrenExpanded ? (H(), F("div", {
|
|
1680
1680
|
key: 0,
|
|
1681
1681
|
class: "a-nested-list-editor__children",
|
|
1682
1682
|
style: Lt({ "--parent-depth": e.vi.depth })
|
|
1683
|
-
}, [
|
|
1684
|
-
class:
|
|
1683
|
+
}, [I("div", {
|
|
1684
|
+
class: V([Br]),
|
|
1685
1685
|
"data-parent-id": String(e.vi.key)
|
|
1686
|
-
}, [(
|
|
1686
|
+
}, [(H(!0), F(j, null, Vt(s(), (r) => (H(), N(K(n), {
|
|
1687
1687
|
key: String(r.key),
|
|
1688
1688
|
vi: r,
|
|
1689
1689
|
"view-items": e.viewItems,
|
|
@@ -1691,14 +1691,14 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1691
1691
|
context: e.context,
|
|
1692
1692
|
callbacks: e.callbacks
|
|
1693
1693
|
}, {
|
|
1694
|
-
item:
|
|
1695
|
-
"item-compact":
|
|
1696
|
-
"item-readonly":
|
|
1697
|
-
"item-status":
|
|
1698
|
-
"item-footer":
|
|
1699
|
-
"item-actions":
|
|
1700
|
-
"before-item":
|
|
1701
|
-
"after-item":
|
|
1694
|
+
item: J((e) => [W(t.$slots, "item", B({ ref_for: !0 }, e))]),
|
|
1695
|
+
"item-compact": J((e) => [W(t.$slots, "item-compact", B({ ref_for: !0 }, e))]),
|
|
1696
|
+
"item-readonly": J((e) => [W(t.$slots, "item-readonly", B({ ref_for: !0 }, e))]),
|
|
1697
|
+
"item-status": J((e) => [W(t.$slots, "item-status", B({ ref_for: !0 }, e))]),
|
|
1698
|
+
"item-footer": J((e) => [W(t.$slots, "item-footer", B({ ref_for: !0 }, e))]),
|
|
1699
|
+
"item-actions": J((e) => [W(t.$slots, "item-actions", B({ ref_for: !0 }, e))]),
|
|
1700
|
+
"before-item": J((e) => [W(t.$slots, "before-item", B({ ref_for: !0 }, e))]),
|
|
1701
|
+
"after-item": J((e) => [W(t.$slots, "after-item", B({ ref_for: !0 }, e))]),
|
|
1702
1702
|
_: 3
|
|
1703
1703
|
}, 8, [
|
|
1704
1704
|
"vi",
|
|
@@ -1706,10 +1706,10 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1706
1706
|
"drag-state",
|
|
1707
1707
|
"context",
|
|
1708
1708
|
"callbacks"
|
|
1709
|
-
]))), 128))], 10,
|
|
1710
|
-
], 42,
|
|
1709
|
+
]))), 128))], 10, zr)], 4)) : P("", !0)
|
|
1710
|
+
], 42, Tr));
|
|
1711
1711
|
}
|
|
1712
|
-
}),
|
|
1712
|
+
}), Ur = { class: "text-body-medium mb-2" }, Wr = /*#__PURE__*/ rt(/* @__PURE__ */ z({
|
|
1713
1713
|
__name: "LeChangeParentDialog",
|
|
1714
1714
|
props: /*@__PURE__*/ Pt({
|
|
1715
1715
|
tree: {},
|
|
@@ -1727,11 +1727,11 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1727
1727
|
}),
|
|
1728
1728
|
emits: /*@__PURE__*/ Pt(["confirm"], ["update:modelValue"]),
|
|
1729
1729
|
setup(e, { emit: t }) {
|
|
1730
|
-
let n = e, r = t, i = Gt(e, "modelValue"), { t: a } = Zt(), o =
|
|
1731
|
-
|
|
1730
|
+
let n = e, r = t, i = Gt(e, "modelValue"), { t: a } = Zt(), o = U(void 0), s = U("last");
|
|
1731
|
+
q(i, (e) => {
|
|
1732
1732
|
e && (o.value = void 0, s.value = "last");
|
|
1733
1733
|
});
|
|
1734
|
-
let c =
|
|
1734
|
+
let c = M(() => {
|
|
1735
1735
|
let e = /* @__PURE__ */ new Set();
|
|
1736
1736
|
if (n.sourceKey === null) return e;
|
|
1737
1737
|
let t = (r) => {
|
|
@@ -1747,7 +1747,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1747
1747
|
return !1;
|
|
1748
1748
|
};
|
|
1749
1749
|
return t(n.tree.children), e;
|
|
1750
|
-
}), l =
|
|
1750
|
+
}), l = M(() => {
|
|
1751
1751
|
if (n.sourceKey === null) return null;
|
|
1752
1752
|
let e = (t) => {
|
|
1753
1753
|
for (let r of t) {
|
|
@@ -1760,7 +1760,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1760
1760
|
return null;
|
|
1761
1761
|
};
|
|
1762
1762
|
return e(n.tree.children);
|
|
1763
|
-
}), u =
|
|
1763
|
+
}), u = M(() => {
|
|
1764
1764
|
if (n.sourceKey === null) return;
|
|
1765
1765
|
let e = (t, r) => {
|
|
1766
1766
|
for (let i of t) {
|
|
@@ -1772,7 +1772,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1772
1772
|
}
|
|
1773
1773
|
};
|
|
1774
1774
|
return e(n.tree.children, null);
|
|
1775
|
-
}), d =
|
|
1775
|
+
}), d = M(() => {
|
|
1776
1776
|
let e = [], t = l.value ? n.calculateSubtreeDepth(l.value) : 1;
|
|
1777
1777
|
e.push({
|
|
1778
1778
|
key: null,
|
|
@@ -1796,44 +1796,44 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1796
1796
|
}
|
|
1797
1797
|
};
|
|
1798
1798
|
return r(n.tree.children, 0), e;
|
|
1799
|
-
}), f =
|
|
1799
|
+
}), f = M(() => d.value.filter((e) => !e.disallowed)), p = M(() => o.value === void 0 ? null : d.value.find((e) => e.key === o.value) ?? null), m = M(() => !!p.value && p.value.hasChildren), h = (e) => {
|
|
1800
1800
|
e.disallowed || (o.value = e.key);
|
|
1801
1801
|
}, g = () => {
|
|
1802
1802
|
p.value && (r("confirm", p.value.key, s.value), i.value = !1);
|
|
1803
1803
|
}, _ = () => {
|
|
1804
1804
|
i.value = !1;
|
|
1805
1805
|
}, v = (e) => `${e * 16}px`, y = (e) => e === "maxDepth" ? a("common.sortable.changeParent.errorMaxDepth") : "";
|
|
1806
|
-
return (e, t) => (
|
|
1806
|
+
return (e, t) => (H(), N(_n, {
|
|
1807
1807
|
modelValue: i.value,
|
|
1808
1808
|
"onUpdate:modelValue": t[1] ||= (e) => i.value = e,
|
|
1809
1809
|
"max-width": "540",
|
|
1810
1810
|
persistent: ""
|
|
1811
1811
|
}, {
|
|
1812
|
-
default:
|
|
1813
|
-
default:
|
|
1814
|
-
|
|
1815
|
-
default:
|
|
1812
|
+
default: J(() => [R(tn, null, {
|
|
1813
|
+
default: J(() => [
|
|
1814
|
+
R(an, null, {
|
|
1815
|
+
default: J(() => [L(G(K(a)("common.sortable.changeParent.title")), 1)]),
|
|
1816
1816
|
_: 1
|
|
1817
1817
|
}),
|
|
1818
|
-
f.value.length === 0 ? (
|
|
1818
|
+
f.value.length === 0 ? (H(), N(rn, {
|
|
1819
1819
|
key: 0,
|
|
1820
1820
|
class: "text-body-medium"
|
|
1821
1821
|
}, {
|
|
1822
|
-
default:
|
|
1822
|
+
default: J(() => [R($t, {
|
|
1823
1823
|
type: "info",
|
|
1824
1824
|
variant: "tonal",
|
|
1825
1825
|
density: "compact"
|
|
1826
1826
|
}, {
|
|
1827
|
-
default:
|
|
1827
|
+
default: J(() => [I("strong", null, G(K(a)("common.sortable.changeParent.noTargetsTitle")), 1), I("div", null, G(K(a)("common.sortable.changeParent.noTargetsText")), 1)]),
|
|
1828
1828
|
_: 1
|
|
1829
1829
|
})]),
|
|
1830
1830
|
_: 1
|
|
1831
|
-
})) : (
|
|
1832
|
-
default:
|
|
1831
|
+
})) : (H(), F(j, { key: 1 }, [R(rn, { class: "pb-1" }, {
|
|
1832
|
+
default: J(() => [R(fn, {
|
|
1833
1833
|
density: "compact",
|
|
1834
1834
|
class: "le-change-parent__list"
|
|
1835
1835
|
}, {
|
|
1836
|
-
default:
|
|
1836
|
+
default: J(() => [(H(!0), F(j, null, Vt(d.value, (e) => (H(), N(Q, {
|
|
1837
1837
|
key: e.key === null ? "__root__" : String(e.key),
|
|
1838
1838
|
disabled: e.disallowed,
|
|
1839
1839
|
active: o.value === e.key,
|
|
@@ -1844,15 +1844,15 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1844
1844
|
"data-reason": e.reason ?? "",
|
|
1845
1845
|
onClick: (t) => h(e)
|
|
1846
1846
|
}, {
|
|
1847
|
-
prepend:
|
|
1847
|
+
prepend: J(() => [e.key === null ? (H(), N(X, {
|
|
1848
1848
|
key: 0,
|
|
1849
1849
|
icon: "mdi-folder-home-outline",
|
|
1850
1850
|
size: "18"
|
|
1851
|
-
})) : e.hasChildren ? (
|
|
1851
|
+
})) : e.hasChildren ? (H(), N(X, {
|
|
1852
1852
|
key: 1,
|
|
1853
1853
|
icon: "mdi-folder-outline",
|
|
1854
1854
|
size: "18"
|
|
1855
|
-
})) : (
|
|
1855
|
+
})) : (H(), N(X, {
|
|
1856
1856
|
key: 2,
|
|
1857
1857
|
icon: "mdi-file-outline",
|
|
1858
1858
|
size: "18"
|
|
@@ -1871,44 +1871,44 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1871
1871
|
_: 1
|
|
1872
1872
|
})]),
|
|
1873
1873
|
_: 1
|
|
1874
|
-
}), m.value ? (
|
|
1874
|
+
}), m.value ? (H(), N(rn, {
|
|
1875
1875
|
key: 0,
|
|
1876
1876
|
class: "pt-0"
|
|
1877
1877
|
}, {
|
|
1878
|
-
default:
|
|
1878
|
+
default: J(() => [I("div", Ur, G(K(a)("common.sortable.changeParent.placementHeading", { label: p.value?.label ?? "" })), 1), R(bn, {
|
|
1879
1879
|
modelValue: s.value,
|
|
1880
1880
|
"onUpdate:modelValue": t[0] ||= (e) => s.value = e,
|
|
1881
1881
|
density: "compact",
|
|
1882
1882
|
"hide-details": ""
|
|
1883
1883
|
}, {
|
|
1884
|
-
default:
|
|
1884
|
+
default: J(() => [R(yn, {
|
|
1885
1885
|
value: "first",
|
|
1886
|
-
label:
|
|
1887
|
-
}, null, 8, ["label"]),
|
|
1886
|
+
label: K(a)("common.sortable.changeParent.placeFirst")
|
|
1887
|
+
}, null, 8, ["label"]), R(yn, {
|
|
1888
1888
|
value: "last",
|
|
1889
|
-
label:
|
|
1889
|
+
label: K(a)("common.sortable.changeParent.placeLast")
|
|
1890
1890
|
}, null, 8, ["label"])]),
|
|
1891
1891
|
_: 1
|
|
1892
1892
|
}, 8, ["modelValue"])]),
|
|
1893
1893
|
_: 1
|
|
1894
|
-
})) :
|
|
1895
|
-
|
|
1896
|
-
default:
|
|
1897
|
-
|
|
1898
|
-
|
|
1894
|
+
})) : P("", !0)], 64)),
|
|
1895
|
+
R(nn, null, {
|
|
1896
|
+
default: J(() => [
|
|
1897
|
+
R(Qt),
|
|
1898
|
+
R(Z, {
|
|
1899
1899
|
variant: "text",
|
|
1900
1900
|
onClick: _
|
|
1901
1901
|
}, {
|
|
1902
|
-
default:
|
|
1902
|
+
default: J(() => [L(G(K(a)("common.sortable.reorderCancel")), 1)]),
|
|
1903
1903
|
_: 1
|
|
1904
1904
|
}),
|
|
1905
|
-
|
|
1905
|
+
R(Z, {
|
|
1906
1906
|
color: "primary",
|
|
1907
1907
|
variant: "elevated",
|
|
1908
1908
|
disabled: !p.value || p.value.disallowed,
|
|
1909
1909
|
onClick: g
|
|
1910
1910
|
}, {
|
|
1911
|
-
default:
|
|
1911
|
+
default: J(() => [L(G(K(a)("common.sortable.changeParent.confirm")), 1)]),
|
|
1912
1912
|
_: 1
|
|
1913
1913
|
}, 8, ["disabled"])
|
|
1914
1914
|
]),
|
|
@@ -1920,26 +1920,26 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
1920
1920
|
_: 1
|
|
1921
1921
|
}, 8, ["modelValue"]));
|
|
1922
1922
|
}
|
|
1923
|
-
}), [["__scopeId", "data-v-0058f5cc"]]),
|
|
1923
|
+
}), [["__scopeId", "data-v-0058f5cc"]]), Gr = { class: "a-le-card" }, Kr = {
|
|
1924
1924
|
key: 0,
|
|
1925
1925
|
class: "a-le-header"
|
|
1926
|
-
},
|
|
1926
|
+
}, qr = {
|
|
1927
1927
|
key: 0,
|
|
1928
1928
|
class: "a-le-title-heading"
|
|
1929
|
-
},
|
|
1929
|
+
}, Jr = { class: "a-le-header-actions" }, Yr = {
|
|
1930
1930
|
key: 1,
|
|
1931
1931
|
class: "a-le-state a-le-state--loading"
|
|
1932
|
-
},
|
|
1932
|
+
}, Xr = {
|
|
1933
1933
|
key: 2,
|
|
1934
1934
|
class: "a-le-state a-le-state--error"
|
|
1935
|
-
},
|
|
1935
|
+
}, Zr = {
|
|
1936
1936
|
key: 3,
|
|
1937
1937
|
class: "a-le-state a-le-state--empty"
|
|
1938
|
-
},
|
|
1938
|
+
}, Qr = {
|
|
1939
1939
|
class: "a-le-sr-only",
|
|
1940
1940
|
"aria-live": "polite",
|
|
1941
1941
|
role: "status"
|
|
1942
|
-
},
|
|
1942
|
+
}, $r = "a-nested-list-editor__group", ei = 24, ti = 22, ni = /* @__PURE__ */ z({
|
|
1943
1943
|
__name: "ANestedSortableListEditor",
|
|
1944
1944
|
props: /*@__PURE__*/ Pt({
|
|
1945
1945
|
maxDepth: {},
|
|
@@ -2091,7 +2091,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2091
2091
|
"outdent"
|
|
2092
2092
|
], ["update:modelValue", "update:mode"]),
|
|
2093
2093
|
setup(e, { expose: t, emit: n }) {
|
|
2094
|
-
let r = e, i = n, a = Gt(e, "modelValue"), s = Gt(e, "mode"), { t: c } = Zt(), l = Kt(), { showWarningT: u } =
|
|
2094
|
+
let r = e, i = n, a = Gt(e, "modelValue"), s = Gt(e, "mode"), { t: c } = Zt(), l = Kt(), { showWarningT: u } = ze(), d = qt("rootEl"), { isNarrow: p } = h(d), m = ce(), g = M(() => r.closeVariant === "icon" ? "icon" : r.closeVariant === "labeled" ? "labeled" : p.value ? "icon" : "labeled"), _ = U(/* @__PURE__ */ new Set()), y = U(/* @__PURE__ */ new Set()), ee = r.getKey ?? "id", te = typeof ee == "function" ? "id" : ee, x = (e) => typeof ee == "function" ? ee(e) : e[ee], ne = (() => {
|
|
2095
2095
|
let e = r.position;
|
|
2096
2096
|
return e === void 0 || e === !1 ? "position" : typeof e == "object" ? e.field : e;
|
|
2097
2097
|
})();
|
|
@@ -2101,7 +2101,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2101
2101
|
};
|
|
2102
2102
|
t(e.children);
|
|
2103
2103
|
})(a.value);
|
|
2104
|
-
let
|
|
2104
|
+
let ie = {
|
|
2105
2105
|
get: () => a.value,
|
|
2106
2106
|
set: (e) => a.value = e,
|
|
2107
2107
|
factory: r.factory,
|
|
@@ -2111,7 +2111,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2111
2111
|
maxDepth: r.maxDepth,
|
|
2112
2112
|
dirtyExclude: () => r.dirtyExclude ?? [],
|
|
2113
2113
|
validate: r.validate
|
|
2114
|
-
},
|
|
2114
|
+
}, ae = r.editor ? null : he(r.stateKey, ie), S = r.editor ?? ae?.handle ?? f(ie), oe = o(ae?.childScope ?? null), se = M(() => {
|
|
2115
2115
|
let e = [], t = 0, n = r.maxDepth, i = (r, a, o) => {
|
|
2116
2116
|
for (let s = 0; s < r.length; s++) {
|
|
2117
2117
|
let c = r[s], l = x(c.data), u = c.children !== void 0, d = u && (c.children?.length ?? 0) > 0, f = c.children?.length ?? 0, p = n - (a + 1);
|
|
@@ -2119,7 +2119,7 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2119
2119
|
key: l,
|
|
2120
2120
|
index: t++,
|
|
2121
2121
|
raw: c.data,
|
|
2122
|
-
position: c.data[
|
|
2122
|
+
position: c.data[ne],
|
|
2123
2123
|
node: c,
|
|
2124
2124
|
depth: a,
|
|
2125
2125
|
parent: o?.data ?? null,
|
|
@@ -2139,24 +2139,24 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2139
2139
|
};
|
|
2140
2140
|
return i(a.value.children, 0, null), e;
|
|
2141
2141
|
});
|
|
2142
|
-
|
|
2143
|
-
let
|
|
2144
|
-
|
|
2145
|
-
},
|
|
2146
|
-
let { node: t } =
|
|
2142
|
+
q(() => se.value.map((e) => String(e.key)).join("|"), () => oe.retainOwners(se.value.map((e) => e.key)), { flush: "post" });
|
|
2143
|
+
let le = Ut(null), C = U(/* @__PURE__ */ new Set()), de = U(/* @__PURE__ */ new Set()), fe = U(/* @__PURE__ */ new Set()), pe = () => {
|
|
2144
|
+
S.commit(), C.value = /* @__PURE__ */ new Set();
|
|
2145
|
+
}, me = (e) => {
|
|
2146
|
+
let { node: t } = S.findNode(e);
|
|
2147
2147
|
if (!t) {
|
|
2148
|
-
|
|
2148
|
+
C.value.add(e);
|
|
2149
2149
|
return;
|
|
2150
2150
|
}
|
|
2151
2151
|
let n = (e) => {
|
|
2152
|
-
|
|
2152
|
+
C.value.add(x(e.data)), e.children && e.children.forEach(n);
|
|
2153
2153
|
};
|
|
2154
2154
|
n(t);
|
|
2155
|
-
},
|
|
2155
|
+
}, w = /* @__PURE__ */ new Map(), T = M(() => {
|
|
2156
2156
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
2157
|
-
for (let n of
|
|
2157
|
+
for (let n of se.value) {
|
|
2158
2158
|
t.add(n.key);
|
|
2159
|
-
let i =
|
|
2159
|
+
let i = D.value.has(n.key), a = y.value.has(n.key), o = _.value.has(n.key), s = r.loadingKeys?.has(n.key) ?? !1, c = C.value.has(n.key), l = !r.readonly && S.isUnsaved(n.key), u = r.readonly ? !1 : l || c, d = w.get(n.key);
|
|
2160
2160
|
if (d && d.raw === n.raw && d.index === n.index && d.position === n.position && d.depth === n.depth && d.parentKey === n.parentKey && d.childrenCount === n.childrenCount && d.firstInParent === n.firstInParent && d.lastInParent === n.lastInParent && d.editing === i && d.expanded === a && d.childrenExpanded === o && d.loading === s && d.dirty === l && d.moved === c && d.unsaved === u) {
|
|
2161
2161
|
e.push(d);
|
|
2162
2162
|
continue;
|
|
@@ -2171,15 +2171,15 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2171
2171
|
moved: c,
|
|
2172
2172
|
unsaved: u
|
|
2173
2173
|
};
|
|
2174
|
-
|
|
2174
|
+
w.set(n.key, f), e.push(f);
|
|
2175
2175
|
}
|
|
2176
|
-
for (let e of
|
|
2176
|
+
for (let e of w.keys()) t.has(e) || w.delete(e);
|
|
2177
2177
|
return e;
|
|
2178
|
-
}),
|
|
2178
|
+
}), ge = M(() => a.value.children.length === 0), _e = M(() => se.value.length), E = qt("rowsContainer"), ve = M(() => !r.readonly && !r.disabled && !r.loading), ye = M(() => ve.value && !r.disableReorder && _e.value > 1), xe = M(() => !!l.item), we = M(() => !!l["item-readonly"]), Te = M(() => !!r.onItemSave), { editingKeys: D, editingSnapshots: De, clearEditing: ke, beginEdit: Ae, cancelEdit: je, commitEdit: Me, closeEdit: Ne, requestAutoOpen: O } = Fe({
|
|
2179
2179
|
rowsContainer: E,
|
|
2180
2180
|
rowSelector: ".a-le-row-wrapper",
|
|
2181
|
-
isInlineEdit:
|
|
2182
|
-
restoreSnapshot: (e, t) =>
|
|
2181
|
+
isInlineEdit: xe,
|
|
2182
|
+
restoreSnapshot: (e, t) => S.updateItem(e, t, !1),
|
|
2183
2183
|
watchKeys: () => {
|
|
2184
2184
|
let e = [], t = (n) => {
|
|
2185
2185
|
for (let r of n) e.push(x(r.data)), r.children && r.children.length && t(r.children);
|
|
@@ -2187,40 +2187,40 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2187
2187
|
return t(a.value.children), e;
|
|
2188
2188
|
},
|
|
2189
2189
|
findEntry: (e) => {
|
|
2190
|
-
let { node: t } =
|
|
2190
|
+
let { node: t } = S.findNode(e);
|
|
2191
2191
|
return t ? { data: t.data } : null;
|
|
2192
2192
|
},
|
|
2193
2193
|
afterAutoOpen: (e) => {
|
|
2194
|
-
let { parent: t } =
|
|
2194
|
+
let { parent: t } = S.findNode(e);
|
|
2195
2195
|
t && _.value.add(x(t.data));
|
|
2196
2196
|
}
|
|
2197
|
-
}), { applying:
|
|
2197
|
+
}), { applying: Pe, applyError: Ie, hasPendingChanges: Le, movedCount: Be, reorderMode: k, enterReorderMode: He, cancelReorderMode: Ue, applyReorder: We } = nt({
|
|
2198
2198
|
mode: s,
|
|
2199
|
-
snapshot:
|
|
2200
|
-
movedKeys:
|
|
2199
|
+
snapshot: le,
|
|
2200
|
+
movedKeys: C,
|
|
2201
2201
|
modelValue: a,
|
|
2202
|
-
cloneModel: (e) =>
|
|
2202
|
+
cloneModel: (e) => ue(e),
|
|
2203
2203
|
applyModel: (e) => {
|
|
2204
2204
|
a.value = e;
|
|
2205
2205
|
},
|
|
2206
2206
|
canEnterReorder: ye,
|
|
2207
2207
|
onEnter: () => {
|
|
2208
|
-
|
|
2209
|
-
for (let e of
|
|
2208
|
+
de.value = /* @__PURE__ */ new Set(), fe.value = /* @__PURE__ */ new Set(), ke();
|
|
2209
|
+
for (let e of it.value) _.value.add(e);
|
|
2210
2210
|
Ft(() => {
|
|
2211
|
-
|
|
2211
|
+
Xe.value && vt();
|
|
2212
2212
|
});
|
|
2213
2213
|
},
|
|
2214
2214
|
onExternalEnter: () => {
|
|
2215
|
-
|
|
2215
|
+
de.value = /* @__PURE__ */ new Set(), fe.value = /* @__PURE__ */ new Set(), ke();
|
|
2216
2216
|
},
|
|
2217
2217
|
onCancel: () => {
|
|
2218
|
-
for (let e of
|
|
2219
|
-
for (let e of
|
|
2220
|
-
|
|
2218
|
+
for (let e of de.value) S.restoreDeleted(e);
|
|
2219
|
+
for (let e of fe.value) S.deleteItem(e, { trackDeleted: !1 });
|
|
2220
|
+
de.value = /* @__PURE__ */ new Set(), fe.value = /* @__PURE__ */ new Set(), ft();
|
|
2221
2221
|
},
|
|
2222
2222
|
onApplyEnd: () => {
|
|
2223
|
-
|
|
2223
|
+
de.value = /* @__PURE__ */ new Set(), fe.value = /* @__PURE__ */ new Set(), ft();
|
|
2224
2224
|
},
|
|
2225
2225
|
onReorderApply: (e) => r.onReorderApply?.(e),
|
|
2226
2226
|
emit: {
|
|
@@ -2230,40 +2230,40 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2230
2230
|
reorderApplyError: (e) => i("reorder-apply-error", e),
|
|
2231
2231
|
reorderEnd: () => i("reorder-end")
|
|
2232
2232
|
}
|
|
2233
|
-
}),
|
|
2233
|
+
}), Ge = M(() => Be.value + de.value.size), Ke = M(() => Le.value || de.value.size > 0), Je = M(() => ve.value && r.showAddButton && !k.value), Xe = M(() => k.value && !m.value && !r.disableDrag), Ze = M(() => r.addLabel ? c(r.addLabel) : c("common.sortable.add")), Qe = M(() => r.emptyTitle ?? c("common.sortable.emptyTitle")), $e = M(() => r.deleteConfirmTitle ?? c("common.sortable.deleteConfirmTitle")), et = M(() => r.deleteConfirmText ?? (r.deleteMode === "immediate" ? c("common.sortable.deleteConfirmText") : c("common.sortable.deleteConfirmTextDeferred"))), tt = M(() => !r.readonly && r.showReorderToggle && !k.value && _e.value > 0), rt = M(() => !!r.title && p.value), it = M(() => {
|
|
2234
2234
|
let e = [], t = (n) => {
|
|
2235
2235
|
for (let r of n) r.children && r.children.length > 0 && (e.push(x(r.data)), t(r.children));
|
|
2236
2236
|
};
|
|
2237
2237
|
return t(a.value.children), e;
|
|
2238
|
-
}),
|
|
2239
|
-
if (
|
|
2240
|
-
else for (let e of
|
|
2241
|
-
},
|
|
2242
|
-
for (let e of
|
|
2238
|
+
}), at = M(() => it.value.length > 0 && it.value.every((e) => _.value.has(e))), ot = M(() => !k.value && it.value.length > 0), st = () => {
|
|
2239
|
+
if (at.value) for (let e of it.value) _.value.delete(e);
|
|
2240
|
+
else for (let e of it.value) _.value.add(e);
|
|
2241
|
+
}, lt = M(() => !!(r.title || l.header || l["reorder-toggle"] || tt.value || ot.value || k.value)), ut = U([]), dt = U(0), ft = () => {
|
|
2242
|
+
for (let e of ut.value) try {
|
|
2243
2243
|
e.stop();
|
|
2244
2244
|
} catch {}
|
|
2245
|
-
|
|
2246
|
-
},
|
|
2245
|
+
ut.value = [];
|
|
2246
|
+
}, A = U(null), mt = (e, t) => {
|
|
2247
2247
|
let n = document.elementFromPoint(e, t);
|
|
2248
2248
|
if (!n) return null;
|
|
2249
2249
|
let r = n.closest(".a-le-row-wrapper");
|
|
2250
2250
|
if (!r || !E.value || !E.value.contains(r)) return null;
|
|
2251
|
-
let i =
|
|
2251
|
+
let i = yt(r.getAttribute("data-id"));
|
|
2252
2252
|
if (i === null) return null;
|
|
2253
|
-
let a =
|
|
2253
|
+
let a = T.value.find((e) => e.key === i);
|
|
2254
2254
|
return a ? {
|
|
2255
2255
|
el: r,
|
|
2256
2256
|
viewItem: a
|
|
2257
2257
|
} : null;
|
|
2258
|
-
},
|
|
2259
|
-
if (!
|
|
2260
|
-
let n =
|
|
2258
|
+
}, ht = (e, t) => {
|
|
2259
|
+
if (!A.value || !E.value) return;
|
|
2260
|
+
let n = mt(e, t);
|
|
2261
2261
|
if (!n) {
|
|
2262
|
-
|
|
2262
|
+
A.value.instruction = null;
|
|
2263
2263
|
return;
|
|
2264
2264
|
}
|
|
2265
2265
|
let i = E.value.getBoundingClientRect(), a = (n.el.querySelector(":scope > .a-le-row") ?? n.el).getBoundingClientRect();
|
|
2266
|
-
|
|
2266
|
+
A.value.instruction = wr({
|
|
2267
2267
|
pointer: {
|
|
2268
2268
|
x: e,
|
|
2269
2269
|
y: t
|
|
@@ -2276,27 +2276,27 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2276
2276
|
siblingIndex: n.viewItem.siblingIndex,
|
|
2277
2277
|
siblingCount: n.viewItem.siblingCount
|
|
2278
2278
|
},
|
|
2279
|
-
sourceKey:
|
|
2280
|
-
sourceSubtreeDepth:
|
|
2281
|
-
viewItems:
|
|
2279
|
+
sourceKey: A.value.sourceKey,
|
|
2280
|
+
sourceSubtreeDepth: A.value.sourceSubtreeDepth,
|
|
2281
|
+
viewItems: T.value,
|
|
2282
2282
|
maxDepth: r.maxDepth,
|
|
2283
|
-
indentPx:
|
|
2283
|
+
indentPx: ei,
|
|
2284
2284
|
containerLeft: i.left,
|
|
2285
|
-
containerPaddingLeft:
|
|
2285
|
+
containerPaddingLeft: ti
|
|
2286
2286
|
});
|
|
2287
|
-
},
|
|
2288
|
-
|
|
2289
|
-
},
|
|
2290
|
-
if (!
|
|
2291
|
-
u("common.sortable.error.maxDeepExceed"),
|
|
2287
|
+
}, gt = (e) => {
|
|
2288
|
+
ht(e.clientX, e.clientY);
|
|
2289
|
+
}, _t = (e, t) => {
|
|
2290
|
+
if (!S.moveTo(t, e.parentKey, e.index)) {
|
|
2291
|
+
u("common.sortable.error.maxDeepExceed"), dt.value++, Ft(() => vt());
|
|
2292
2292
|
return;
|
|
2293
2293
|
}
|
|
2294
|
-
|
|
2295
|
-
},
|
|
2296
|
-
if (
|
|
2297
|
-
let e = Array.from(E.value.querySelectorAll("." +
|
|
2294
|
+
me(t), e.makeChild && e.parentKey !== null && _.value.add(e.parentKey);
|
|
2295
|
+
}, vt = () => {
|
|
2296
|
+
if (ft(), !Xe.value || !E.value) return;
|
|
2297
|
+
let e = Array.from(E.value.querySelectorAll("." + $r));
|
|
2298
2298
|
for (let t of e) {
|
|
2299
|
-
let e =
|
|
2299
|
+
let e = v(t, [], {
|
|
2300
2300
|
group: {
|
|
2301
2301
|
name: "a-nested",
|
|
2302
2302
|
pull: !0,
|
|
@@ -2304,67 +2304,67 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2304
2304
|
},
|
|
2305
2305
|
handle: ".a-le-drag-handle",
|
|
2306
2306
|
animation: 0,
|
|
2307
|
-
ghostClass:
|
|
2308
|
-
chosenClass:
|
|
2309
|
-
dragClass:
|
|
2307
|
+
ghostClass: Se,
|
|
2308
|
+
chosenClass: ct,
|
|
2309
|
+
dragClass: Ve,
|
|
2310
2310
|
fallbackOnBody: !0,
|
|
2311
2311
|
forceFallback: !0,
|
|
2312
2312
|
fallbackTolerance: 3,
|
|
2313
2313
|
onStart: (e) => {
|
|
2314
|
-
let t = e.item, n =
|
|
2314
|
+
let t = e.item, n = yt(t.getAttribute("data-id"));
|
|
2315
2315
|
if (n === null) return;
|
|
2316
|
-
let r =
|
|
2317
|
-
|
|
2316
|
+
let r = S.findNode(n).node, i = r ? S.calculateSubtreeDepth(r) : 1;
|
|
2317
|
+
A.value = {
|
|
2318
2318
|
sourceKey: n,
|
|
2319
2319
|
sourceSubtreeDepth: i,
|
|
2320
2320
|
instruction: null
|
|
2321
|
-
}, document.addEventListener("pointermove",
|
|
2321
|
+
}, document.addEventListener("pointermove", gt, { passive: !0 });
|
|
2322
2322
|
},
|
|
2323
2323
|
onMove: (e) => {
|
|
2324
2324
|
let t = e.originalEvent;
|
|
2325
2325
|
if (t) {
|
|
2326
|
-
if ("clientX" in t && "clientY" in t)
|
|
2326
|
+
if ("clientX" in t && "clientY" in t) ht(t.clientX, t.clientY);
|
|
2327
2327
|
else if ("touches" in t) {
|
|
2328
2328
|
let e = t;
|
|
2329
|
-
e.touches.length > 0 &&
|
|
2329
|
+
e.touches.length > 0 && ht(e.touches[0].clientX, e.touches[0].clientY);
|
|
2330
2330
|
}
|
|
2331
2331
|
}
|
|
2332
2332
|
return !1;
|
|
2333
2333
|
},
|
|
2334
2334
|
onEnd: () => {
|
|
2335
|
-
document.removeEventListener("pointermove",
|
|
2336
|
-
let e =
|
|
2337
|
-
if (
|
|
2335
|
+
document.removeEventListener("pointermove", gt);
|
|
2336
|
+
let e = A.value;
|
|
2337
|
+
if (A.value = null, !e) return;
|
|
2338
2338
|
let t = e.instruction;
|
|
2339
|
-
t !== null && t.type !== "blocked" &&
|
|
2339
|
+
t !== null && t.type !== "blocked" && _t(t, e.sourceKey);
|
|
2340
2340
|
}
|
|
2341
2341
|
});
|
|
2342
|
-
|
|
2342
|
+
ut.value.push(e);
|
|
2343
2343
|
}
|
|
2344
|
-
},
|
|
2344
|
+
}, yt = (e) => {
|
|
2345
2345
|
if (e === null || e === "") return null;
|
|
2346
|
-
let t =
|
|
2346
|
+
let t = b(e);
|
|
2347
2347
|
return String(t) === e ? t : e;
|
|
2348
2348
|
};
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
}),
|
|
2352
|
-
|
|
2353
|
-
}),
|
|
2354
|
-
|
|
2349
|
+
q(() => Xe.value, () => {
|
|
2350
|
+
Xe.value ? Ft(() => vt()) : ft();
|
|
2351
|
+
}), q(() => dt.value, () => {
|
|
2352
|
+
Xe.value && Ft(() => vt());
|
|
2353
|
+
}), q(() => T.value.map((e) => e.key).join("|"), () => {
|
|
2354
|
+
Xe.value && Ft(() => vt());
|
|
2355
2355
|
}), zt(() => {
|
|
2356
|
-
|
|
2356
|
+
Xe.value && vt();
|
|
2357
2357
|
}), Rt(() => {
|
|
2358
|
-
|
|
2358
|
+
ft(), document.removeEventListener("pointermove", gt);
|
|
2359
2359
|
});
|
|
2360
|
-
let
|
|
2361
|
-
let e =
|
|
2360
|
+
let bt = M(() => {
|
|
2361
|
+
let e = A.value;
|
|
2362
2362
|
if (!e || e.instruction === null || !E.value) return null;
|
|
2363
2363
|
let t = e.instruction;
|
|
2364
2364
|
if (t.type === "blocked") return null;
|
|
2365
2365
|
let n = E.value.querySelector(`.a-le-row-wrapper[data-id="${CSS.escape(String(t.refKey))}"]`);
|
|
2366
2366
|
if (!n) return null;
|
|
2367
|
-
let r = n.querySelector(":scope > .a-le-row"), i = E.value.getBoundingClientRect(), a = (r ?? n).getBoundingClientRect(), o =
|
|
2367
|
+
let r = n.querySelector(":scope > .a-le-row"), i = E.value.getBoundingClientRect(), a = (r ?? n).getBoundingClientRect(), o = ti + t.depth * ei, s = t.refEdge === "top" ? a.top - i.top : a.bottom - i.top, c = {
|
|
2368
2368
|
top: s,
|
|
2369
2369
|
left: o,
|
|
2370
2370
|
right: 16
|
|
@@ -2384,138 +2384,138 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2384
2384
|
line: c,
|
|
2385
2385
|
connector: l
|
|
2386
2386
|
};
|
|
2387
|
-
}),
|
|
2388
|
-
Je.value && (
|
|
2389
|
-
},
|
|
2390
|
-
ve.value && (
|
|
2387
|
+
}), xt = () => {
|
|
2388
|
+
Je.value && (O(), r.factory && S.addItem(), i("add", void 0));
|
|
2389
|
+
}, St = (e) => {
|
|
2390
|
+
ve.value && (O(), r.factory && S.addAfter(e.key, void 0, e.childrenAllowed), i("add", {
|
|
2391
2391
|
afterId: e.key,
|
|
2392
2392
|
childrenAllowed: e.childrenAllowed
|
|
2393
2393
|
}));
|
|
2394
|
-
},
|
|
2395
|
-
ve.value && e.canAddChild && (
|
|
2394
|
+
}, Ct = (e) => {
|
|
2395
|
+
ve.value && e.canAddChild && (O(), _.value.add(e.key), i("add-child", e), r.factory && S.addChild(e.key, void 0, !0), i("add", {
|
|
2396
2396
|
parentId: e.key,
|
|
2397
2397
|
childrenAllowed: !0
|
|
2398
2398
|
}));
|
|
2399
|
-
},
|
|
2400
|
-
if (ve.value && !
|
|
2401
|
-
if (
|
|
2402
|
-
|
|
2399
|
+
}, wt = (e) => {
|
|
2400
|
+
if (ve.value && !k.value) {
|
|
2401
|
+
if (D.value.has(e.key)) {
|
|
2402
|
+
Xt(e);
|
|
2403
2403
|
return;
|
|
2404
2404
|
}
|
|
2405
|
-
|
|
2405
|
+
xe.value && Ae(e), i("edit", e);
|
|
2406
2406
|
}
|
|
2407
|
-
},
|
|
2407
|
+
}, Et = (e) => {
|
|
2408
2408
|
if (r.disabled || r.loading) return;
|
|
2409
2409
|
let t = e.key, n = _.value.has(t);
|
|
2410
2410
|
n ? _.value.delete(t) : _.value.add(t), i("item-expand", e, !n);
|
|
2411
|
-
},
|
|
2411
|
+
}, Dt = (e) => {
|
|
2412
2412
|
if (r.disabled || r.loading) return;
|
|
2413
|
-
let t = e.key, n =
|
|
2414
|
-
n ?
|
|
2415
|
-
},
|
|
2416
|
-
if (
|
|
2413
|
+
let t = e.key, n = y.value.has(t);
|
|
2414
|
+
n ? y.value.delete(t) : y.value.add(t), i("item-expand", e, !n);
|
|
2415
|
+
}, Ot = (e) => r.disableRowClick || r.disabled || r.loading || k.value ? !1 : !!(e.editing || e.expanded || !r.readonly && r.showEditButton), kt = (e) => {
|
|
2416
|
+
if (Ot(e)) {
|
|
2417
2417
|
if (e.editing || e.expanded) {
|
|
2418
|
-
|
|
2418
|
+
Xt(e);
|
|
2419
2419
|
return;
|
|
2420
2420
|
}
|
|
2421
|
-
r.readonly &&
|
|
2421
|
+
r.readonly && we.value ? Dt(e) : wt(e);
|
|
2422
2422
|
}
|
|
2423
|
-
}, { deleteDialog:
|
|
2423
|
+
}, { deleteDialog: z, deleteInFlight: At, deleteError: Mt, onDeleteClick: Pt, onDeleteDialogConfirm: Bt, onDeleteDialogCancel: Ht } = be({
|
|
2424
2424
|
onDeleteConfirm: (e) => !r.onDeleteConfirm || r.onDeleteConfirm(e),
|
|
2425
2425
|
onDelete: (e) => r.onDelete?.(e),
|
|
2426
2426
|
onDeleted: (e) => {
|
|
2427
|
-
|
|
2427
|
+
D.value.delete(e.key), De.value.delete(e.key), y.value.delete(e.key), _.value.delete(e.key);
|
|
2428
2428
|
let t = r.deleteMode === "deferred";
|
|
2429
|
-
|
|
2429
|
+
k.value && (t ? de.value.add(e.key) : fe.value.add(e.key)), S.deleteItem(e.key, { trackDeleted: t }), i("deleted", e);
|
|
2430
2430
|
},
|
|
2431
2431
|
disableDeleteConfirm: () => r.disableDeleteConfirm
|
|
2432
|
-
}),
|
|
2433
|
-
ve.value && await
|
|
2434
|
-
},
|
|
2435
|
-
r.onItemSave && await r.onItemSave(e.raw),
|
|
2436
|
-
},
|
|
2437
|
-
|
|
2432
|
+
}), Wt = async (e) => {
|
|
2433
|
+
ve.value && await Pt(e);
|
|
2434
|
+
}, Jt = async (e) => {
|
|
2435
|
+
r.onItemSave && await r.onItemSave(e.raw), Me(e), i("item-saved", e);
|
|
2436
|
+
}, Yt = (e) => {
|
|
2437
|
+
je(e);
|
|
2438
|
+
}, Xt = (e) => {
|
|
2439
|
+
Ne(e), i("close", e);
|
|
2440
|
+
}, Y = (e) => {
|
|
2441
|
+
S.moveUp(e) && me(e);
|
|
2438
2442
|
}, Qt = (e) => {
|
|
2439
|
-
|
|
2443
|
+
S.moveDown(e) && me(e);
|
|
2440
2444
|
}, tn = (e) => {
|
|
2441
|
-
|
|
2445
|
+
S.moveTop(e) && me(e);
|
|
2442
2446
|
}, nn = (e) => {
|
|
2443
|
-
|
|
2447
|
+
S.moveBottom(e) && me(e);
|
|
2444
2448
|
}, rn = (e) => {
|
|
2445
|
-
|
|
2446
|
-
}, an = (e) => {
|
|
2447
|
-
C.moveBottom(e) && pe(e);
|
|
2448
|
-
}, on = (e) => {
|
|
2449
|
-
if (!C.indent(e.key)) {
|
|
2449
|
+
if (!S.indent(e.key)) {
|
|
2450
2450
|
u("common.sortable.error.maxDeepExceed");
|
|
2451
2451
|
return;
|
|
2452
2452
|
}
|
|
2453
|
-
|
|
2454
|
-
},
|
|
2455
|
-
|
|
2456
|
-
},
|
|
2457
|
-
let t =
|
|
2453
|
+
me(e.key), i("indent", e);
|
|
2454
|
+
}, an = (e) => {
|
|
2455
|
+
S.outdent(e.key) && (me(e.key), i("outdent", e));
|
|
2456
|
+
}, sn = (e) => Ce(e, { compactField: r.compactField }), cn = (e, t) => t === void 0 ? null : S.rowState(e, t, D.value.has(t)), ln = /* @__PURE__ */ new Map(), un = (e) => {
|
|
2457
|
+
let t = ln.get(e);
|
|
2458
2458
|
return t || (t = {
|
|
2459
2459
|
edit: () => {
|
|
2460
2460
|
let t = $(e);
|
|
2461
|
-
t &&
|
|
2461
|
+
t && wt(t);
|
|
2462
2462
|
},
|
|
2463
2463
|
save: () => {
|
|
2464
2464
|
let t = $(e);
|
|
2465
|
-
if (t) return
|
|
2465
|
+
if (t) return Jt(t);
|
|
2466
2466
|
},
|
|
2467
2467
|
cancel: () => {
|
|
2468
2468
|
let t = $(e);
|
|
2469
|
-
t &&
|
|
2469
|
+
t && Yt(t);
|
|
2470
2470
|
},
|
|
2471
2471
|
close: () => {
|
|
2472
2472
|
let t = $(e);
|
|
2473
|
-
t &&
|
|
2473
|
+
t && Xt(t);
|
|
2474
2474
|
},
|
|
2475
2475
|
delete: async () => {
|
|
2476
2476
|
let t = $(e);
|
|
2477
|
-
t && await
|
|
2477
|
+
t && await Wt(t);
|
|
2478
2478
|
},
|
|
2479
2479
|
addAfter: () => {
|
|
2480
2480
|
let t = $(e);
|
|
2481
|
-
t &&
|
|
2481
|
+
t && St(t);
|
|
2482
2482
|
},
|
|
2483
2483
|
addChild: () => {
|
|
2484
2484
|
let t = $(e);
|
|
2485
|
-
t &&
|
|
2485
|
+
t && Ct(t);
|
|
2486
2486
|
},
|
|
2487
2487
|
toggleExpand: () => {
|
|
2488
2488
|
let t = $(e);
|
|
2489
|
-
t &&
|
|
2489
|
+
t && Et(t);
|
|
2490
2490
|
},
|
|
2491
2491
|
toggleDetail: () => {
|
|
2492
2492
|
let t = $(e);
|
|
2493
|
-
t &&
|
|
2493
|
+
t && Dt(t);
|
|
2494
2494
|
},
|
|
2495
|
-
moveUp: () =>
|
|
2496
|
-
moveDown: () =>
|
|
2497
|
-
moveTop: () =>
|
|
2498
|
-
moveBottom: () =>
|
|
2495
|
+
moveUp: () => Y(e),
|
|
2496
|
+
moveDown: () => Qt(e),
|
|
2497
|
+
moveTop: () => tn(e),
|
|
2498
|
+
moveBottom: () => nn(e),
|
|
2499
2499
|
indent: () => {
|
|
2500
2500
|
let t = $(e);
|
|
2501
|
-
t &&
|
|
2501
|
+
t && rn(t);
|
|
2502
2502
|
},
|
|
2503
2503
|
outdent: () => {
|
|
2504
2504
|
let t = $(e);
|
|
2505
|
-
t &&
|
|
2505
|
+
t && an(t);
|
|
2506
2506
|
},
|
|
2507
|
-
update: (t) =>
|
|
2508
|
-
},
|
|
2507
|
+
update: (t) => S.updateItem(e, t)
|
|
2508
|
+
}, ln.set(e, t)), t;
|
|
2509
2509
|
};
|
|
2510
|
-
|
|
2511
|
-
if (
|
|
2510
|
+
q(() => T.value, (e) => {
|
|
2511
|
+
if (ln.size === 0) return;
|
|
2512
2512
|
let t = new Set(e.map((e) => e.key));
|
|
2513
|
-
for (let e of
|
|
2513
|
+
for (let e of ln.keys()) t.has(e) || ln.delete(e);
|
|
2514
2514
|
});
|
|
2515
|
-
let
|
|
2515
|
+
let dn = (e) => ({
|
|
2516
2516
|
item: {
|
|
2517
2517
|
...e,
|
|
2518
|
-
validationState:
|
|
2518
|
+
validationState: cn(e.raw, e.key)
|
|
2519
2519
|
},
|
|
2520
2520
|
raw: e.raw,
|
|
2521
2521
|
index: e.index,
|
|
@@ -2536,34 +2536,34 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2536
2536
|
dirty: e.dirty,
|
|
2537
2537
|
unsaved: e.unsaved,
|
|
2538
2538
|
moved: e.moved,
|
|
2539
|
-
reorderMode:
|
|
2539
|
+
reorderMode: k.value,
|
|
2540
2540
|
canMoveUp: !e.firstInParent,
|
|
2541
2541
|
canMoveDown: !e.lastInParent,
|
|
2542
2542
|
canIndent: e.canIndent,
|
|
2543
2543
|
canOutdent: e.canOutdent,
|
|
2544
2544
|
canAddChild: e.canAddChild,
|
|
2545
|
-
touch:
|
|
2546
|
-
stateKeyPrefix:
|
|
2547
|
-
actions:
|
|
2548
|
-
}),
|
|
2549
|
-
applying:
|
|
2550
|
-
hasPendingChanges:
|
|
2551
|
-
movedCount:
|
|
2552
|
-
error:
|
|
2545
|
+
touch: m.value,
|
|
2546
|
+
stateKeyPrefix: oe.prefixFor(e.key),
|
|
2547
|
+
actions: un(e.key)
|
|
2548
|
+
}), fn = M(() => ({
|
|
2549
|
+
applying: Pe.value,
|
|
2550
|
+
hasPendingChanges: Ke.value,
|
|
2551
|
+
movedCount: Ge.value,
|
|
2552
|
+
error: Ie.value,
|
|
2553
2553
|
actions: {
|
|
2554
|
-
apply:
|
|
2555
|
-
cancel:
|
|
2554
|
+
apply: We,
|
|
2555
|
+
cancel: Ue
|
|
2556
2556
|
}
|
|
2557
|
-
})),
|
|
2557
|
+
})), Q = M(() => ({
|
|
2558
2558
|
mode: s.value,
|
|
2559
2559
|
disabled: !ye.value,
|
|
2560
|
-
hasPendingChanges:
|
|
2560
|
+
hasPendingChanges: Le.value,
|
|
2561
2561
|
actions: {
|
|
2562
|
-
enterReorderMode:
|
|
2563
|
-
exitReorderMode:
|
|
2562
|
+
enterReorderMode: He,
|
|
2563
|
+
exitReorderMode: Ue
|
|
2564
2564
|
}
|
|
2565
|
-
})), pn =
|
|
2566
|
-
viewItems:
|
|
2565
|
+
})), pn = M(() => new Set(it.value)), $ = (e) => T.value.find((t) => t.key === e), mn = re({
|
|
2566
|
+
viewItems: M(() => T.value.map((e) => ({
|
|
2567
2567
|
key: e.key,
|
|
2568
2568
|
expanded: e.childrenExpanded,
|
|
2569
2569
|
canExpand: pn.value.has(e.key),
|
|
@@ -2571,62 +2571,62 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2571
2571
|
canOutdent: !0
|
|
2572
2572
|
}))),
|
|
2573
2573
|
variant: "nested",
|
|
2574
|
-
isReorderMode:
|
|
2575
|
-
disabled:
|
|
2576
|
-
isEditing: (e) =>
|
|
2574
|
+
isReorderMode: k,
|
|
2575
|
+
disabled: M(() => !ve.value),
|
|
2576
|
+
isEditing: (e) => D.value.has(e),
|
|
2577
2577
|
onToggleEdit: (e) => {
|
|
2578
2578
|
let t = $(e);
|
|
2579
|
-
t &&
|
|
2579
|
+
t && wt(t);
|
|
2580
2580
|
},
|
|
2581
2581
|
onCancelEdit: (e) => {
|
|
2582
2582
|
let t = $(e);
|
|
2583
|
-
t &&
|
|
2583
|
+
t && Xt(t);
|
|
2584
2584
|
},
|
|
2585
|
-
onMoveUp: (e) =>
|
|
2586
|
-
onMoveDown: (e) =>
|
|
2587
|
-
onMoveTop: (e) =>
|
|
2588
|
-
onMoveBottom: (e) =>
|
|
2585
|
+
onMoveUp: (e) => Y(e),
|
|
2586
|
+
onMoveDown: (e) => Qt(e),
|
|
2587
|
+
onMoveTop: (e) => tn(e),
|
|
2588
|
+
onMoveBottom: (e) => nn(e),
|
|
2589
2589
|
onIndent: (e) => {
|
|
2590
2590
|
let t = $(e);
|
|
2591
|
-
t &&
|
|
2591
|
+
t && rn(t);
|
|
2592
2592
|
},
|
|
2593
2593
|
onOutdent: (e) => {
|
|
2594
2594
|
let t = $(e);
|
|
2595
|
-
t &&
|
|
2595
|
+
t && an(t);
|
|
2596
2596
|
},
|
|
2597
2597
|
onToggleChildren: (e) => {
|
|
2598
2598
|
let t = $(e);
|
|
2599
|
-
t &&
|
|
2599
|
+
t && Et(t);
|
|
2600
2600
|
},
|
|
2601
|
-
onCancelReorder: () =>
|
|
2602
|
-
}), hn =
|
|
2601
|
+
onCancelReorder: () => Ue()
|
|
2602
|
+
}), hn = U(!1), gn = Ut(null), _n = M(() => {
|
|
2603
2603
|
let e = gn.value;
|
|
2604
2604
|
if (!e) return null;
|
|
2605
|
-
let t =
|
|
2605
|
+
let t = S.findNode(e.key), n = t.parent?.children ?? a.value.children, r = n.findIndex((t) => x(t.data) === e.key);
|
|
2606
2606
|
return {
|
|
2607
2607
|
parentId: t.parent ? x(t.parent.data) : null,
|
|
2608
2608
|
total: n.length,
|
|
2609
2609
|
currentIndex: r
|
|
2610
2610
|
};
|
|
2611
|
-
}), vn =
|
|
2611
|
+
}), vn = M(() => gn.value ? sn(gn.value.raw) : ""), yn = (e) => {
|
|
2612
2612
|
r.showMoveToPosition && (gn.value = e, hn.value = !0);
|
|
2613
2613
|
}, bn = (e) => {
|
|
2614
2614
|
let t = _n.value, n = gn.value;
|
|
2615
|
-
gn.value = null, t && n && e !== t.currentIndex &&
|
|
2616
|
-
}, xn =
|
|
2615
|
+
gn.value = null, t && n && e !== t.currentIndex && S.moveTo(n.key, t.parentId, e) && me(n.key);
|
|
2616
|
+
}, xn = U(!1), Sn = Ut(null), Cn = (e) => {
|
|
2617
2617
|
r.showChangeParent && (Sn.value = e, xn.value = !0);
|
|
2618
2618
|
}, wn = (e, t) => {
|
|
2619
2619
|
let n = Sn.value;
|
|
2620
2620
|
if (Sn.value = null, !n) return;
|
|
2621
2621
|
let r = 0;
|
|
2622
|
-
r = e === null ? a.value.children.length :
|
|
2622
|
+
r = e === null ? a.value.children.length : S.findNode(e).node?.children?.length ?? 0;
|
|
2623
2623
|
let i = t === "first" ? 0 : r;
|
|
2624
|
-
|
|
2625
|
-
}, Tn =
|
|
2626
|
-
reorderMode:
|
|
2624
|
+
S.moveTo(n.key, e, i) && (me(n.key), e !== null && _.value.add(e));
|
|
2625
|
+
}, Tn = M(() => ({
|
|
2626
|
+
reorderMode: k.value,
|
|
2627
2627
|
readonly: r.readonly,
|
|
2628
2628
|
canInteract: ve.value,
|
|
2629
|
-
dragEnabled:
|
|
2629
|
+
dragEnabled: Xe.value,
|
|
2630
2630
|
showExpandToggle: r.showExpandToggle,
|
|
2631
2631
|
showEditButton: r.showEditButton,
|
|
2632
2632
|
showDeleteButton: r.showDeleteButton,
|
|
@@ -2634,274 +2634,274 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2634
2634
|
showAddAfterAction: r.showAddAfterAction,
|
|
2635
2635
|
showMoveToPosition: r.showMoveToPosition,
|
|
2636
2636
|
showChangeParent: r.showChangeParent,
|
|
2637
|
-
showInlineSaveFooter:
|
|
2637
|
+
showInlineSaveFooter: Te.value,
|
|
2638
2638
|
statusField: r.statusField,
|
|
2639
2639
|
effectiveCloseVariant: g.value,
|
|
2640
2640
|
keyboardNav: mn,
|
|
2641
|
-
isRowClickable:
|
|
2642
|
-
resolveCompactText:
|
|
2643
|
-
resolveValidation: (e, t) =>
|
|
2644
|
-
buildSlotProps:
|
|
2641
|
+
isRowClickable: Ot,
|
|
2642
|
+
resolveCompactText: sn,
|
|
2643
|
+
resolveValidation: (e, t) => cn(e, t),
|
|
2644
|
+
buildSlotProps: dn
|
|
2645
2645
|
})), En = {
|
|
2646
|
-
onRowClick:
|
|
2647
|
-
onChevronClick:
|
|
2648
|
-
onEditClick:
|
|
2649
|
-
onDeleteClick:
|
|
2650
|
-
onCloseClick:
|
|
2651
|
-
onSaveClick:
|
|
2652
|
-
onCancelClick:
|
|
2653
|
-
onAddAfterClick:
|
|
2654
|
-
onAddChildClick:
|
|
2655
|
-
moveUp: (e) =>
|
|
2656
|
-
moveDown: (e) =>
|
|
2657
|
-
moveTop: (e) =>
|
|
2658
|
-
moveBottom: (e) =>
|
|
2659
|
-
indent:
|
|
2660
|
-
outdent:
|
|
2646
|
+
onRowClick: kt,
|
|
2647
|
+
onChevronClick: Et,
|
|
2648
|
+
onEditClick: wt,
|
|
2649
|
+
onDeleteClick: Wt,
|
|
2650
|
+
onCloseClick: Xt,
|
|
2651
|
+
onSaveClick: Jt,
|
|
2652
|
+
onCancelClick: Yt,
|
|
2653
|
+
onAddAfterClick: St,
|
|
2654
|
+
onAddChildClick: Ct,
|
|
2655
|
+
moveUp: (e) => Y(e),
|
|
2656
|
+
moveDown: (e) => Qt(e),
|
|
2657
|
+
moveTop: (e) => tn(e),
|
|
2658
|
+
moveBottom: (e) => nn(e),
|
|
2659
|
+
indent: rn,
|
|
2660
|
+
outdent: an,
|
|
2661
2661
|
openMoveToPosition: yn,
|
|
2662
2662
|
openChangeParent: Cn
|
|
2663
|
-
}, Dn =
|
|
2663
|
+
}, Dn = M(() => T.value.filter((e) => e.parentKey === null)), On = (e, t, n) => (S.addItem(t, {
|
|
2664
2664
|
afterId: e ?? void 0,
|
|
2665
2665
|
childrenAllowed: n
|
|
2666
|
-
}), Ft(() =>
|
|
2666
|
+
}), Ft(() => S.commit()), a.value), kn = (e, t, n) => (_.value.add(e), S.addItem(t, {
|
|
2667
2667
|
parentId: e,
|
|
2668
2668
|
asFirstChild: !0,
|
|
2669
2669
|
childrenAllowed: n
|
|
2670
|
-
}), Ft(() =>
|
|
2671
|
-
|
|
2670
|
+
}), Ft(() => S.commit()), a.value), An = (e) => {
|
|
2671
|
+
S.deleteItem(e), D.value.delete(e), De.value.delete(e), y.value.delete(e), _.value.delete(e), Ft(() => S.commit());
|
|
2672
2672
|
}, jn = (e, t, n = null, r = null, i = null) => {
|
|
2673
|
-
|
|
2674
|
-
}, Mn =
|
|
2675
|
-
|
|
2673
|
+
S.updateItem(e, t), Ft(() => S.commit());
|
|
2674
|
+
}, Mn = S.unsavedCount, Nn = () => {
|
|
2675
|
+
S.commit(), C.value = /* @__PURE__ */ new Set(), ke();
|
|
2676
2676
|
};
|
|
2677
2677
|
Tt(() => r.unsavedSectionLabel ? {
|
|
2678
2678
|
label: r.unsavedSectionLabel,
|
|
2679
|
-
dirty:
|
|
2679
|
+
dirty: S.hasUnsaved.value
|
|
2680
2680
|
} : []);
|
|
2681
|
-
let Pn = () =>
|
|
2682
|
-
let t =
|
|
2683
|
-
for (; t;) _.value.add(x(t.data)), t =
|
|
2684
|
-
let n =
|
|
2685
|
-
n &&
|
|
2681
|
+
let Pn = () => Re(S, (e) => {
|
|
2682
|
+
let t = S.findNode(e).parent;
|
|
2683
|
+
for (; t;) _.value.add(x(t.data)), t = S.findNode(x(t.data)).parent;
|
|
2684
|
+
let n = S.viewItems.value.find((t) => t.key === e);
|
|
2685
|
+
n && Ae(n);
|
|
2686
2686
|
});
|
|
2687
|
-
return
|
|
2688
|
-
hasErrors:
|
|
2687
|
+
return Ye({
|
|
2688
|
+
hasErrors: S.hasErrors,
|
|
2689
2689
|
validationScope: r.validationScope,
|
|
2690
2690
|
validateProvided: r.validate !== void 0,
|
|
2691
2691
|
reveal: Pn
|
|
2692
2692
|
}), t({
|
|
2693
|
-
...
|
|
2693
|
+
...S,
|
|
2694
2694
|
validateAll: Pn,
|
|
2695
2695
|
addAfterId: On,
|
|
2696
2696
|
addChildToId: kn,
|
|
2697
2697
|
removeById: An,
|
|
2698
2698
|
updateData: jn,
|
|
2699
|
-
resetDirtyBaseline:
|
|
2700
|
-
hasUnsavedChanges:
|
|
2699
|
+
resetDirtyBaseline: pe,
|
|
2700
|
+
hasUnsavedChanges: S.hasUnsaved,
|
|
2701
2701
|
unsavedCount: Mn,
|
|
2702
2702
|
clearUnsavedState: Nn,
|
|
2703
|
-
viewItems:
|
|
2704
|
-
enterReorderMode:
|
|
2705
|
-
cancelReorderMode:
|
|
2706
|
-
applyReorder:
|
|
2703
|
+
viewItems: se,
|
|
2704
|
+
enterReorderMode: He,
|
|
2705
|
+
cancelReorderMode: Ue,
|
|
2706
|
+
applyReorder: We,
|
|
2707
2707
|
expand: (e) => _.value.add(e),
|
|
2708
2708
|
collapse: (e) => _.value.delete(e),
|
|
2709
2709
|
toggleExpand: (e) => {
|
|
2710
2710
|
_.value.has(e) ? _.value.delete(e) : _.value.add(e);
|
|
2711
2711
|
},
|
|
2712
|
-
expandDetail: (e) =>
|
|
2713
|
-
collapseDetail: (e) =>
|
|
2714
|
-
}), (t, n) => (
|
|
2712
|
+
expandDetail: (e) => y.value.add(e),
|
|
2713
|
+
collapseDetail: (e) => y.value.delete(e)
|
|
2714
|
+
}), (t, n) => (H(), F("div", {
|
|
2715
2715
|
ref_key: "rootEl",
|
|
2716
|
-
ref:
|
|
2717
|
-
class:
|
|
2716
|
+
ref: d,
|
|
2717
|
+
class: V(["a-nested-list-editor", [`a-nested-list-editor--mode-${s.value}`, {
|
|
2718
2718
|
"a-nested-list-editor--readonly": e.readonly,
|
|
2719
2719
|
"a-nested-list-editor--disabled": e.disabled,
|
|
2720
|
-
"a-nested-list-editor--touch":
|
|
2721
|
-
"a-nested-list-editor--drag-enabled":
|
|
2720
|
+
"a-nested-list-editor--touch": K(m),
|
|
2721
|
+
"a-nested-list-editor--drag-enabled": Xe.value
|
|
2722
2722
|
}]])
|
|
2723
2723
|
}, [
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
class:
|
|
2728
|
-
"has-pending-changes":
|
|
2729
|
-
"pending-count":
|
|
2730
|
-
error:
|
|
2724
|
+
I("div", Gr, [
|
|
2725
|
+
lt.value ? (H(), F("div", Kr, [W(t.$slots, "header", B({ title: e.title }, Q.value), () => [e.title ? (H(), F("h3", qr, G(e.title), 1)) : P("", !0), I("div", Jr, [K(k) ? W(t.$slots, "reorder-toolbar", It(jt(fn.value)), () => [
|
|
2726
|
+
R(Ee, {
|
|
2727
|
+
class: V({ "a-le-toolbar-status--pending": Ke.value }),
|
|
2728
|
+
"has-pending-changes": Ke.value,
|
|
2729
|
+
"pending-count": Ge.value,
|
|
2730
|
+
error: K(Ie)
|
|
2731
2731
|
}, null, 8, [
|
|
2732
2732
|
"class",
|
|
2733
2733
|
"has-pending-changes",
|
|
2734
2734
|
"pending-count",
|
|
2735
2735
|
"error"
|
|
2736
2736
|
]),
|
|
2737
|
-
|
|
2737
|
+
R(Z, {
|
|
2738
2738
|
variant: "text",
|
|
2739
2739
|
size: "small",
|
|
2740
|
-
disabled:
|
|
2741
|
-
onClick:
|
|
2740
|
+
disabled: K(Pe),
|
|
2741
|
+
onClick: K(Ue)
|
|
2742
2742
|
}, {
|
|
2743
|
-
default:
|
|
2743
|
+
default: J(() => [L(G(K(c)("common.sortable.reorderCancel")), 1)]),
|
|
2744
2744
|
_: 1
|
|
2745
2745
|
}, 8, ["disabled", "onClick"]),
|
|
2746
|
-
|
|
2746
|
+
R(Z, {
|
|
2747
2747
|
color: "primary",
|
|
2748
2748
|
variant: "flat",
|
|
2749
2749
|
size: "small",
|
|
2750
2750
|
"prepend-icon": "mdi-check",
|
|
2751
|
-
loading:
|
|
2752
|
-
disabled:
|
|
2753
|
-
onClick:
|
|
2751
|
+
loading: K(Pe),
|
|
2752
|
+
disabled: K(Pe) || !Ke.value,
|
|
2753
|
+
onClick: K(We)
|
|
2754
2754
|
}, {
|
|
2755
|
-
default:
|
|
2755
|
+
default: J(() => [L(G(K(c)("common.sortable.reorderApply")), 1)]),
|
|
2756
2756
|
_: 1
|
|
2757
2757
|
}, 8, [
|
|
2758
2758
|
"loading",
|
|
2759
2759
|
"disabled",
|
|
2760
2760
|
"onClick"
|
|
2761
2761
|
])
|
|
2762
|
-
], void 0, 0) : (
|
|
2762
|
+
], void 0, 0) : (H(), F(j, { key: 1 }, [ot.value && rt.value ? (H(), N(Z, {
|
|
2763
2763
|
key: 0,
|
|
2764
2764
|
variant: "tonal",
|
|
2765
2765
|
color: "primary",
|
|
2766
2766
|
icon: "",
|
|
2767
2767
|
size: "x-small",
|
|
2768
|
-
onClick:
|
|
2768
|
+
onClick: st
|
|
2769
2769
|
}, {
|
|
2770
|
-
default:
|
|
2771
|
-
icon:
|
|
2770
|
+
default: J(() => [R(X, {
|
|
2771
|
+
icon: at.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
|
|
2772
2772
|
size: "18"
|
|
2773
|
-
}, null, 8, ["icon"]),
|
|
2773
|
+
}, null, 8, ["icon"]), R(on, {
|
|
2774
2774
|
activator: "parent",
|
|
2775
2775
|
location: "bottom",
|
|
2776
|
-
text:
|
|
2776
|
+
text: at.value ? K(c)("common.sortable.collapseAll") : K(c)("common.sortable.expandAll")
|
|
2777
2777
|
}, null, 8, ["text"])]),
|
|
2778
2778
|
_: 1
|
|
2779
|
-
})) :
|
|
2779
|
+
})) : ot.value ? (H(), N(Z, {
|
|
2780
2780
|
key: 1,
|
|
2781
2781
|
variant: "tonal",
|
|
2782
2782
|
color: "primary",
|
|
2783
2783
|
size: "small",
|
|
2784
|
-
"prepend-icon":
|
|
2785
|
-
onClick:
|
|
2784
|
+
"prepend-icon": at.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
|
|
2785
|
+
onClick: st
|
|
2786
2786
|
}, {
|
|
2787
|
-
default:
|
|
2787
|
+
default: J(() => [L(G(at.value ? K(c)("common.sortable.collapseAll") : K(c)("common.sortable.expandAll")), 1)]),
|
|
2788
2788
|
_: 1
|
|
2789
|
-
}, 8, ["prepend-icon"])) :
|
|
2789
|
+
}, 8, ["prepend-icon"])) : P("", !0), tt.value ? W(t.$slots, "reorder-toggle", It(jt(Q.value)), () => [rt.value ? (H(), N(Z, {
|
|
2790
2790
|
key: 0,
|
|
2791
2791
|
variant: "tonal",
|
|
2792
2792
|
color: "primary",
|
|
2793
2793
|
icon: "",
|
|
2794
2794
|
size: "x-small",
|
|
2795
2795
|
disabled: !ye.value,
|
|
2796
|
-
onClick:
|
|
2796
|
+
onClick: K(He)
|
|
2797
2797
|
}, {
|
|
2798
|
-
default:
|
|
2798
|
+
default: J(() => [R(X, {
|
|
2799
2799
|
icon: "mdi-sort",
|
|
2800
2800
|
size: "18"
|
|
2801
|
-
}),
|
|
2801
|
+
}), R(on, {
|
|
2802
2802
|
activator: "parent",
|
|
2803
2803
|
location: "bottom",
|
|
2804
|
-
text:
|
|
2804
|
+
text: K(c)("common.sortable.reorder")
|
|
2805
2805
|
}, null, 8, ["text"])]),
|
|
2806
2806
|
_: 1
|
|
2807
|
-
}, 8, ["disabled", "onClick"])) : (
|
|
2807
|
+
}, 8, ["disabled", "onClick"])) : (H(), N(Z, {
|
|
2808
2808
|
key: 1,
|
|
2809
2809
|
variant: "tonal",
|
|
2810
2810
|
color: "primary",
|
|
2811
2811
|
"prepend-icon": "mdi-sort",
|
|
2812
2812
|
size: "small",
|
|
2813
2813
|
disabled: !ye.value,
|
|
2814
|
-
onClick:
|
|
2814
|
+
onClick: K(He)
|
|
2815
2815
|
}, {
|
|
2816
|
-
default:
|
|
2816
|
+
default: J(() => [L(G(K(c)("common.sortable.reorder")), 1)]),
|
|
2817
2817
|
_: 1
|
|
2818
|
-
}, 8, ["disabled", "onClick"]))], void 0, 2) :
|
|
2819
|
-
e.loading ? (
|
|
2818
|
+
}, 8, ["disabled", "onClick"]))], void 0, 2) : P("", !0)], 64))])])])) : P("", !0),
|
|
2819
|
+
e.loading ? (H(), F("div", Yr, [R(en, {
|
|
2820
2820
|
indeterminate: "",
|
|
2821
2821
|
color: "primary",
|
|
2822
2822
|
size: "32"
|
|
2823
|
-
})])) : e.error ? (
|
|
2823
|
+
})])) : e.error ? (H(), F("div", Xr, [R($t, {
|
|
2824
2824
|
type: "error",
|
|
2825
2825
|
variant: "tonal",
|
|
2826
2826
|
density: "compact",
|
|
2827
2827
|
border: "start"
|
|
2828
2828
|
}, {
|
|
2829
|
-
default:
|
|
2829
|
+
default: J(() => [L(G(e.error), 1)]),
|
|
2830
2830
|
_: 1
|
|
2831
|
-
})])) :
|
|
2831
|
+
})])) : ge.value ? (H(), F("div", Zr, [W(t.$slots, "empty", {
|
|
2832
2832
|
readonly: e.readonly,
|
|
2833
2833
|
disabled: e.disabled,
|
|
2834
|
-
actions: { add:
|
|
2835
|
-
}, () => [
|
|
2834
|
+
actions: { add: xt }
|
|
2835
|
+
}, () => [R(qe, {
|
|
2836
2836
|
title: Qe.value,
|
|
2837
2837
|
"add-label": Ze.value,
|
|
2838
2838
|
"can-add": Je.value,
|
|
2839
|
-
onAdd:
|
|
2839
|
+
onAdd: xt
|
|
2840
2840
|
}, null, 8, [
|
|
2841
2841
|
"title",
|
|
2842
2842
|
"add-label",
|
|
2843
2843
|
"can-add"
|
|
2844
|
-
])])])) : (
|
|
2845
|
-
key:
|
|
2844
|
+
])])])) : (H(), F("div", {
|
|
2845
|
+
key: dt.value,
|
|
2846
2846
|
ref_key: "rowsContainer",
|
|
2847
2847
|
ref: E,
|
|
2848
|
-
class:
|
|
2849
|
-
}, [
|
|
2850
|
-
class:
|
|
2848
|
+
class: V(["a-nested-list-editor__rows", { "a-nested-list-editor__rows--dragging": A.value !== null }])
|
|
2849
|
+
}, [I("div", {
|
|
2850
|
+
class: V([$r, "a-nested-list-editor__group--root"]),
|
|
2851
2851
|
"data-parent-id": ""
|
|
2852
|
-
}, [(
|
|
2852
|
+
}, [(H(!0), F(j, null, Vt(Dn.value, (e) => (H(), N(Hr, {
|
|
2853
2853
|
key: String(e.key),
|
|
2854
2854
|
vi: e,
|
|
2855
|
-
"view-items":
|
|
2856
|
-
"drag-state":
|
|
2855
|
+
"view-items": T.value,
|
|
2856
|
+
"drag-state": A.value,
|
|
2857
2857
|
context: Tn.value,
|
|
2858
2858
|
callbacks: En
|
|
2859
2859
|
}, {
|
|
2860
|
-
item:
|
|
2861
|
-
"item-compact":
|
|
2862
|
-
"item-readonly":
|
|
2863
|
-
"item-status":
|
|
2864
|
-
"item-footer":
|
|
2865
|
-
"item-actions":
|
|
2866
|
-
"before-item":
|
|
2867
|
-
"after-item":
|
|
2860
|
+
item: J((e) => [W(t.$slots, "item", B({ ref_for: !0 }, e))]),
|
|
2861
|
+
"item-compact": J((e) => [W(t.$slots, "item-compact", B({ ref_for: !0 }, e))]),
|
|
2862
|
+
"item-readonly": J((e) => [W(t.$slots, "item-readonly", B({ ref_for: !0 }, e))]),
|
|
2863
|
+
"item-status": J((e) => [W(t.$slots, "item-status", B({ ref_for: !0 }, e))]),
|
|
2864
|
+
"item-footer": J((e) => [W(t.$slots, "item-footer", B({ ref_for: !0 }, e))]),
|
|
2865
|
+
"item-actions": J((e) => [W(t.$slots, "item-actions", B({ ref_for: !0 }, e))]),
|
|
2866
|
+
"before-item": J((e) => [W(t.$slots, "before-item", B({ ref_for: !0 }, e))]),
|
|
2867
|
+
"after-item": J((e) => [W(t.$slots, "after-item", B({ ref_for: !0 }, e))]),
|
|
2868
2868
|
_: 3
|
|
2869
2869
|
}, 8, [
|
|
2870
2870
|
"vi",
|
|
2871
2871
|
"view-items",
|
|
2872
2872
|
"drag-state",
|
|
2873
2873
|
"context"
|
|
2874
|
-
]))), 128))], 2),
|
|
2874
|
+
]))), 128))], 2), bt.value === null ? P("", !0) : (H(), F(j, { key: 0 }, [bt.value.connector === null ? P("", !0) : (H(), F("div", {
|
|
2875
2875
|
key: 0,
|
|
2876
2876
|
class: "a-nested-list-editor__drop-connector",
|
|
2877
2877
|
style: Lt({
|
|
2878
|
-
left: `${
|
|
2879
|
-
top: `${
|
|
2880
|
-
height: `${
|
|
2878
|
+
left: `${bt.value.connector.left}px`,
|
|
2879
|
+
top: `${bt.value.connector.top}px`,
|
|
2880
|
+
height: `${bt.value.connector.height}px`
|
|
2881
2881
|
})
|
|
2882
|
-
}, null, 4)),
|
|
2882
|
+
}, null, 4)), I("div", {
|
|
2883
2883
|
class: "a-nested-list-editor__drop-line",
|
|
2884
2884
|
style: Lt({
|
|
2885
|
-
top: `${
|
|
2886
|
-
left: `${
|
|
2887
|
-
right: `${
|
|
2885
|
+
top: `${bt.value.line.top}px`,
|
|
2886
|
+
left: `${bt.value.line.left}px`,
|
|
2887
|
+
right: `${bt.value.line.right}px`
|
|
2888
2888
|
})
|
|
2889
|
-
}, [...n[3] ||= [
|
|
2890
|
-
Je.value && !e.loading && !e.error && !
|
|
2889
|
+
}, [...n[3] ||= [I("span", { class: "a-nested-list-editor__drop-line-dot" }, null, -1)]], 4)], 64))], 2)),
|
|
2890
|
+
Je.value && !e.loading && !e.error && !ge.value ? W(t.$slots, "add-button", {
|
|
2891
2891
|
readonly: e.readonly,
|
|
2892
2892
|
disabled: e.disabled,
|
|
2893
|
-
props: { onClick:
|
|
2894
|
-
actions: { add:
|
|
2895
|
-
}, () => [
|
|
2893
|
+
props: { onClick: xt },
|
|
2894
|
+
actions: { add: xt }
|
|
2895
|
+
}, () => [I("button", {
|
|
2896
2896
|
type: "button",
|
|
2897
2897
|
class: "a-le-row-add",
|
|
2898
|
-
onClick:
|
|
2899
|
-
}, [
|
|
2898
|
+
onClick: xt
|
|
2899
|
+
}, [R(X, {
|
|
2900
2900
|
icon: "mdi-plus",
|
|
2901
2901
|
size: "18"
|
|
2902
|
-
}),
|
|
2902
|
+
}), I("span", null, G(Ze.value), 1)])], void 0, 5) : P("", !0)
|
|
2903
2903
|
]),
|
|
2904
|
-
|
|
2904
|
+
R(pt, {
|
|
2905
2905
|
modelValue: hn.value,
|
|
2906
2906
|
"onUpdate:modelValue": n[0] ||= (e) => hn.value = e,
|
|
2907
2907
|
total: _n.value?.total ?? 0,
|
|
@@ -2914,15 +2914,15 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2914
2914
|
"current-index",
|
|
2915
2915
|
"item-label"
|
|
2916
2916
|
]),
|
|
2917
|
-
|
|
2917
|
+
R(Wr, {
|
|
2918
2918
|
modelValue: xn.value,
|
|
2919
2919
|
"onUpdate:modelValue": n[1] ||= (e) => xn.value = e,
|
|
2920
2920
|
tree: a.value,
|
|
2921
2921
|
"source-key": Sn.value?.key ?? null,
|
|
2922
|
-
"key-field":
|
|
2922
|
+
"key-field": K(te),
|
|
2923
2923
|
"max-depth": e.maxDepth,
|
|
2924
|
-
"resolve-label":
|
|
2925
|
-
"calculate-subtree-depth":
|
|
2924
|
+
"resolve-label": sn,
|
|
2925
|
+
"calculate-subtree-depth": K(S).calculateSubtreeDepth,
|
|
2926
2926
|
onConfirm: wn
|
|
2927
2927
|
}, null, 8, [
|
|
2928
2928
|
"modelValue",
|
|
@@ -2932,17 +2932,17 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2932
2932
|
"max-depth",
|
|
2933
2933
|
"calculate-subtree-depth"
|
|
2934
2934
|
]),
|
|
2935
|
-
|
|
2936
|
-
modelValue:
|
|
2937
|
-
"onUpdate:modelValue": n[2] ||= (e) => Nt(
|
|
2935
|
+
R(Oe, {
|
|
2936
|
+
modelValue: K(z),
|
|
2937
|
+
"onUpdate:modelValue": n[2] ||= (e) => Nt(z) ? z.value = e : null,
|
|
2938
2938
|
title: $e.value,
|
|
2939
2939
|
text: et.value,
|
|
2940
|
-
"confirm-label":
|
|
2941
|
-
"cancel-label":
|
|
2942
|
-
error:
|
|
2943
|
-
"in-flight":
|
|
2944
|
-
onConfirm:
|
|
2945
|
-
onCancel:
|
|
2940
|
+
"confirm-label": K(c)("common.sortable.delete"),
|
|
2941
|
+
"cancel-label": K(c)("common.button.cancel"),
|
|
2942
|
+
error: K(Mt),
|
|
2943
|
+
"in-flight": K(At),
|
|
2944
|
+
onConfirm: K(Bt),
|
|
2945
|
+
onCancel: K(Ht)
|
|
2946
2946
|
}, null, 8, [
|
|
2947
2947
|
"modelValue",
|
|
2948
2948
|
"title",
|
|
@@ -2954,13 +2954,13 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2954
2954
|
"onConfirm",
|
|
2955
2955
|
"onCancel"
|
|
2956
2956
|
]),
|
|
2957
|
-
|
|
2958
|
-
n:
|
|
2959
|
-
total:
|
|
2957
|
+
I("div", Qr, G(K(mn).grabbedKey.value === null ? "" : K(c)("common.sortable.keyboardGrab.status", {
|
|
2958
|
+
n: K(mn).grabbedIndex.value + 1,
|
|
2959
|
+
total: K(mn).totalCount.value
|
|
2960
2960
|
})), 1)
|
|
2961
2961
|
], 2));
|
|
2962
2962
|
}
|
|
2963
|
-
}),
|
|
2963
|
+
}), ri = { class: "a-unsaved-sections" }, ii = /*#__PURE__*/ rt(/* @__PURE__ */ z({
|
|
2964
2964
|
__name: "AUnsavedConfirmDialog",
|
|
2965
2965
|
props: /*@__PURE__*/ Pt({
|
|
2966
2966
|
title: { default: void 0 },
|
|
@@ -2982,42 +2982,42 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
2982
2982
|
}, o = () => {
|
|
2983
2983
|
n("resolve", !0);
|
|
2984
2984
|
};
|
|
2985
|
-
return (t, n) => (
|
|
2985
|
+
return (t, n) => (H(), N(_n, {
|
|
2986
2986
|
modelValue: r.value,
|
|
2987
2987
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
2988
2988
|
"max-width": "480",
|
|
2989
2989
|
persistent: ""
|
|
2990
2990
|
}, {
|
|
2991
|
-
default:
|
|
2992
|
-
default:
|
|
2993
|
-
|
|
2994
|
-
default:
|
|
2991
|
+
default: J(() => [R(tn, null, {
|
|
2992
|
+
default: J(() => [
|
|
2993
|
+
R(an, null, {
|
|
2994
|
+
default: J(() => [L(G(e.title ?? K(i)("common.sortable.unsavedChanges.title")), 1)]),
|
|
2995
2995
|
_: 1
|
|
2996
2996
|
}),
|
|
2997
|
-
|
|
2998
|
-
default:
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
], 64)) : (
|
|
2997
|
+
R(rn, null, {
|
|
2998
|
+
default: J(() => [e.body ? (H(), F(j, { key: 0 }, [L(G(e.body), 1)], 64)) : e.dirtyLabels.length ? (H(), F(j, { key: 1 }, [
|
|
2999
|
+
L(G(K(i)("common.sortable.unsavedChanges.sectionsIntro")) + " ", 1),
|
|
3000
|
+
I("ul", ri, [(H(!0), F(j, null, Vt(e.dirtyLabels, (e, t) => (H(), F("li", { key: t }, G(e), 1))), 128))]),
|
|
3001
|
+
L(" " + G(K(i)("common.sortable.unsavedChanges.leaveQuestion")), 1)
|
|
3002
|
+
], 64)) : (H(), F(j, { key: 2 }, [L(G(K(i)("common.sortable.unsavedChanges.body")), 1)], 64))]),
|
|
3003
3003
|
_: 1
|
|
3004
3004
|
}),
|
|
3005
|
-
|
|
3006
|
-
default:
|
|
3007
|
-
|
|
3008
|
-
|
|
3005
|
+
R(nn, null, {
|
|
3006
|
+
default: J(() => [
|
|
3007
|
+
R(Qt),
|
|
3008
|
+
R(Z, {
|
|
3009
3009
|
variant: "text",
|
|
3010
3010
|
onClick: a
|
|
3011
3011
|
}, {
|
|
3012
|
-
default:
|
|
3012
|
+
default: J(() => [L(G(e.stayLabel ?? K(i)("common.sortable.unsavedChanges.stay")), 1)]),
|
|
3013
3013
|
_: 1
|
|
3014
3014
|
}),
|
|
3015
|
-
|
|
3015
|
+
R(Z, {
|
|
3016
3016
|
color: "warning",
|
|
3017
3017
|
variant: "flat",
|
|
3018
3018
|
onClick: o
|
|
3019
3019
|
}, {
|
|
3020
|
-
default:
|
|
3020
|
+
default: J(() => [L(G(e.discardLabel ?? K(i)("common.sortable.unsavedChanges.discard")), 1)]),
|
|
3021
3021
|
_: 1
|
|
3022
3022
|
})
|
|
3023
3023
|
]),
|
|
@@ -3029,17 +3029,17 @@ var zn = { class: "d-flex flex-column w-100 px-1 align-center" }, Bn = { class:
|
|
|
3029
3029
|
_: 1
|
|
3030
3030
|
}, 8, ["modelValue"]));
|
|
3031
3031
|
}
|
|
3032
|
-
}), [["__scopeId", "data-v-8342a164"]]),
|
|
3033
|
-
function
|
|
3032
|
+
}), [["__scopeId", "data-v-8342a164"]]), ai = 8e3, oi = (e) => e == null ? !1 : typeof e == "boolean" ? e : e instanceof Set ? e.size > 0 : Array.isArray(e) ? e.length > 0 : !!e, si = (e, t) => e === void 0 ? t : typeof e == "boolean" ? e : e.value;
|
|
3033
|
+
function ci(e) {
|
|
3034
3034
|
let t = gt();
|
|
3035
3035
|
if (e.ownSections) {
|
|
3036
|
-
let n = e.ownSections, r = Symbol("unsaved.section.own"), i =
|
|
3036
|
+
let n = e.ownSections, r = Symbol("unsaved.section.own"), i = M(() => {
|
|
3037
3037
|
let e = n();
|
|
3038
3038
|
return Array.isArray(e) ? e : [e];
|
|
3039
3039
|
});
|
|
3040
3040
|
t.register(r, i);
|
|
3041
3041
|
}
|
|
3042
|
-
let n =
|
|
3042
|
+
let n = M(() => e.sources.some((e) => oi(e.value)) || t.dirtyLabels.value.length > 0), r = U(!1), i = null, a = !1, o = null, s = () => {
|
|
3043
3043
|
o !== null && (clearTimeout(o), o = null);
|
|
3044
3044
|
}, c = () => a ? (a = !1, s(), Promise.resolve(!0)) : new Promise((e) => {
|
|
3045
3045
|
i = e, r.value = !0;
|
|
@@ -3048,22 +3048,22 @@ function oi(e) {
|
|
|
3048
3048
|
}, u = () => {
|
|
3049
3049
|
a = !0, s(), o = setTimeout(() => {
|
|
3050
3050
|
a = !1, o = null;
|
|
3051
|
-
},
|
|
3051
|
+
}, ai);
|
|
3052
3052
|
}, d = () => {
|
|
3053
3053
|
a = !1, s();
|
|
3054
3054
|
};
|
|
3055
|
-
if (
|
|
3056
|
-
|
|
3055
|
+
if (si(e.guardRoute, !0) && At()) try {
|
|
3056
|
+
hn(async () => !n.value || await c());
|
|
3057
3057
|
} catch {}
|
|
3058
3058
|
let f = [s], p = !1;
|
|
3059
|
-
if (
|
|
3059
|
+
if (si(e.guardWindowUnload, !0)) {
|
|
3060
3060
|
let e = (e) => {
|
|
3061
3061
|
n.value && (e.preventDefault(), e.returnValue = "");
|
|
3062
3062
|
};
|
|
3063
3063
|
typeof window < "u" && (window.addEventListener("beforeunload", e), f.push(() => window.removeEventListener("beforeunload", e)));
|
|
3064
3064
|
}
|
|
3065
3065
|
if (e.guardDialogModel) {
|
|
3066
|
-
let t = e.guardDialogModel, r = !1, i =
|
|
3066
|
+
let t = e.guardDialogModel, r = !1, i = q(t, async (e, i) => {
|
|
3067
3067
|
if (r) {
|
|
3068
3068
|
r = !1;
|
|
3069
3069
|
return;
|
|
@@ -3092,7 +3092,7 @@ function oi(e) {
|
|
|
3092
3092
|
}
|
|
3093
3093
|
//#endregion
|
|
3094
3094
|
//#region src/labs/unsavedGuard/useGuardedDelete.ts
|
|
3095
|
-
function
|
|
3095
|
+
function li(e, t) {
|
|
3096
3096
|
return (...n) => {
|
|
3097
3097
|
e.acknowledge();
|
|
3098
3098
|
let r;
|
|
@@ -3108,7 +3108,7 @@ function si(e, t) {
|
|
|
3108
3108
|
}
|
|
3109
3109
|
//#endregion
|
|
3110
3110
|
//#region src/labs/listEditor/composables/useListEditor.ts
|
|
3111
|
-
function
|
|
3111
|
+
function ui(e, t = {}) {
|
|
3112
3112
|
let r = t.keyField ?? "id", i = t.positionField ?? "position", a = t.positionMultiplier ?? 1, o = t.updatePosition === !0;
|
|
3113
3113
|
o && r === i && console.warn(`[list-editor] key-field === position-field ("${r}") with update-position enabled. Reordering renumbers positions and thus changes row keys, breaking dirty/validity tracking. Point key-field at a stable identity field (e.g. "id").`);
|
|
3114
3114
|
let s = /* @__PURE__ */ new Set(), c = (e) => {
|
|
@@ -3123,7 +3123,7 @@ function ci(e, t = {}) {
|
|
|
3123
3123
|
if (i === 0 && n.size === 0) return;
|
|
3124
3124
|
let a = `${i}|${[...n].sort().join(",")}`;
|
|
3125
3125
|
s.has(a) || (s.add(a), i > 0 && console.warn(`[list-editor] ${i} row(s) resolve to an undefined key (key-field "${r}"). Point key-field at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`), n.size > 0 && console.warn(`[list-editor] duplicate row keys (key-field "${r}"): ${[...n].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`));
|
|
3126
|
-
}, l =
|
|
3126
|
+
}, l = M(() => {
|
|
3127
3127
|
let t = e.value.map((e, t) => ({
|
|
3128
3128
|
key: e[r],
|
|
3129
3129
|
index: t,
|
|
@@ -3177,10 +3177,10 @@ function ci(e, t = {}) {
|
|
|
3177
3177
|
}
|
|
3178
3178
|
//#endregion
|
|
3179
3179
|
//#region src/labs/listEditor/composables/useNestedUnsavedKeys.ts
|
|
3180
|
-
function
|
|
3181
|
-
let e =
|
|
3180
|
+
function di() {
|
|
3181
|
+
let e = U(/* @__PURE__ */ new Map()), t = /* @__PURE__ */ new Set(), n = (n) => e.value.get(n) ?? t, r = (t, n) => {
|
|
3182
3182
|
n.size === 0 ? e.value.delete(t) : e.value.set(t, n), e.value = new Map(e.value);
|
|
3183
|
-
}, i =
|
|
3183
|
+
}, i = M(() => {
|
|
3184
3184
|
let t = /* @__PURE__ */ new Set();
|
|
3185
3185
|
for (let [n, r] of e.value.entries()) for (let e of r) t.add(`${String(n)}:${String(e)}`);
|
|
3186
3186
|
return t;
|
|
@@ -3189,10 +3189,10 @@ function li() {
|
|
|
3189
3189
|
getForParent: n,
|
|
3190
3190
|
setForParent: r,
|
|
3191
3191
|
merged: i,
|
|
3192
|
-
count:
|
|
3192
|
+
count: M(() => i.value.size)
|
|
3193
3193
|
};
|
|
3194
3194
|
}
|
|
3195
3195
|
//#endregion
|
|
3196
|
-
export {
|
|
3196
|
+
export { wn as ADatatableOrdering, jn as ADatatablePagination, De as AFilterBooleanSelect, Me as AFilterDatetimePicker, e as AFilterInteger, tt as AFilterRemoteAutocomplete, k as AFilterRemoteAutocompleteWithMinimal, dt as AFilterString, $e as AFilterTimeInterval, lt as AFilterValueObjectOptionsSelect, ee as AFilterWrapper, xn as AFilterWrapperSidebar, i as AFilterWrapperSubjectSelect, ft as AFormRemoteAutocomplete, Ot as AFormRemoteAutocompleteWithCached, vr as AListEditor, ni as ANestedSortableListEditor, Ze as ASortableListEditor, Qn as ASubjectSelect, ii as AUnsavedConfirmDialog, xt as DatatablePaginationKey, w as FilterConfigKey, m as FilterDataKey, d as FilterInnerConfigKey, se as FilterInnerDataKey, de as FiltersSelected, St as ListEditorStateScopeKey, Ne as SharedReorderRegistryKey, Le as TimeIntervalSpecialOptions, E as UserAdminConfigLayoutType, _e as UserAdminConfigLayoutTypeDefault, ye as UserAdminConfigType, le as UserAdminConfigTypeDefault, xe as buildFilterHash, zn as createDatatableColumnsConfig, vt as createFilter, Dt as createFilterStore, pe as createListEditorStateScope, Ae as generateListQuery, Te as isRouterSafeHash, We as nextListEditorTempId, o as provideListEditorStateScope, n as renumberPositions, He as sortByPosition, te as sortByPositionDeep, Nn as useApiFetchByIds, Pe as useApiFetchList, Pn as useApiFetchListBatch, Be as useApiQueryBuilder, _ as useApiRequest, me as useFilterHelpers, li as useGuardedDelete, In as useJobApi, ui as useListEditor, S as useListEditorController, yt as useListEditorStateEntry, l as useNestedListEditor, f as useNestedListEditorController, he as useNestedListEditorStateEntry, di as useNestedUnsavedKeys, ht as usePagination, Bn as useSubjectSelect, ci as useUnsavedChangesGuard, Tt as useUnsavedSection, at as useUserAdminConfigApi, ge as useUserAdminConfigFactory };
|
|
3197
3197
|
|
|
3198
3198
|
//# sourceMappingURL=labs.js.map
|