@xwiki/cristal-dsvuetify 0.18.0 → 0.19.0
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/CHANGELOG.md +16 -0
- package/dist/index-BZqZR8-g.js +21866 -0
- package/dist/index-BZqZR8-g.js.map +1 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/x-alert-gEtl8xCI.js.map +1 -1
- package/dist/x-avatar-WnkeGyHH.js.map +1 -1
- package/dist/x-breadcrumb-CyjqjISE.js.map +1 -1
- package/dist/x-btn-DzH2bk-f.js.map +1 -1
- package/dist/x-card-BlUD5hbt.js.map +1 -1
- package/dist/{x-checkbox-D6cpCtlt.js → x-checkbox-CV2j3kg9.js} +2 -2
- package/dist/{x-checkbox-D6cpCtlt.js.map → x-checkbox-CV2j3kg9.js.map} +1 -1
- package/dist/x-dialog-Ccb-vGZ2.js.map +1 -1
- package/dist/x-divider-BOCxsH8h.js.map +1 -1
- package/dist/{x-file-input-DubSSwF4.js → x-file-input-WC5u-psN.js} +2 -2
- package/dist/{x-file-input-DubSSwF4.js.map → x-file-input-WC5u-psN.js.map} +1 -1
- package/dist/{x-form-B2T8k_wn.js → x-form-66u_n6Xf.js} +2 -2
- package/dist/{x-form-B2T8k_wn.js.map → x-form-66u_n6Xf.js.map} +1 -1
- package/dist/x-img-DWbVDNTs.js.map +1 -1
- package/dist/x-load-Bw4ftl3k.js.map +1 -1
- package/dist/x-menu-BeWrqcFy.js.map +1 -1
- package/dist/x-menu-item-CBdOhZc3.js.map +1 -1
- package/dist/x-menu-label-D-sFcG_g.js.map +1 -1
- package/dist/{x-navigation-tree-Cx21xHVH.js → x-navigation-tree-CA9rdB38.js} +137 -137
- package/dist/x-navigation-tree-CA9rdB38.js.map +1 -0
- package/dist/{x-navigation-tree-select-B3fRZYec.js → x-navigation-tree-select-D5olgFJB.js} +2 -2
- package/dist/{x-navigation-tree-select-B3fRZYec.js.map → x-navigation-tree-select-D5olgFJB.js.map} +1 -1
- package/dist/x-search-C7GhoCKj.js.map +1 -1
- package/dist/{x-select-CgIqNkk3.js → x-select-qbcXbRjw.js} +2 -2
- package/dist/{x-select-CgIqNkk3.js.map → x-select-qbcXbRjw.js.map} +1 -1
- package/dist/x-tab-group-BfEaq8Nj.js.map +1 -1
- package/dist/x-tab-panel-DysgiPCz.js.map +1 -1
- package/dist/x-tab-vRrbUjdK.js.map +1 -1
- package/dist/{x-text-field-KwBy_u7M.js → x-text-field-B2S1QZum.js} +2 -2
- package/dist/{x-text-field-KwBy_u7M.js.map → x-text-field-B2S1QZum.js.map} +1 -1
- package/package.json +22 -17
- package/dist/index-C-c8K0Z_.js +0 -21675
- package/dist/index-C-c8K0Z_.js.map +0 -1
- package/dist/x-navigation-tree-Cx21xHVH.js.map +0 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { ref as S, computed as V, createVNode as
|
|
2
|
-
import { g as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
1
|
+
import { ref as S, computed as V, createVNode as C, mergeProps as T, createElementVNode as A, Fragment as G, inject as J, toRaw as L, reactive as ee, withModifiers as Q, toRef as _, provide as te, defineComponent as ne, mergeDefaults as ie, onBeforeMount as le, watch as ae, createBlock as re, openBlock as j, unref as ce, withCtx as oe, createElementBlock as U, toDisplayString as M } from "vue";
|
|
2
|
+
import { g as B, p as D, u as E, c as q, d as de, o as F, m as se, e as z, f as ue, h as ve, i as fe, j as he, I as O, k as me, l as ge, n as Ie, q as R, r as we, s as pe, t as be, v as ke, w as K } from "./index-BZqZR8-g.js";
|
|
3
|
+
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const ye = {
|
|
5
5
|
includeTerminals: !0
|
|
6
|
-
},
|
|
6
|
+
}, _e = D({
|
|
7
7
|
...F(se({
|
|
8
8
|
collapseIcon: "$treeviewCollapse",
|
|
9
9
|
expandIcon: "$treeviewExpand"
|
|
10
10
|
}), ["subgroup"])
|
|
11
|
-
}, "VTreeviewGroup"),
|
|
11
|
+
}, "VTreeviewGroup"), W = B()({
|
|
12
12
|
name: "VTreeviewGroup",
|
|
13
|
-
props:
|
|
14
|
-
setup(e,
|
|
13
|
+
props: _e(),
|
|
14
|
+
setup(e, k) {
|
|
15
15
|
let {
|
|
16
16
|
slots: l
|
|
17
|
-
} =
|
|
18
|
-
const h = S(),
|
|
19
|
-
var
|
|
20
|
-
return (
|
|
21
|
-
}),
|
|
22
|
-
var
|
|
17
|
+
} = k;
|
|
18
|
+
const h = S(), b = V(() => {
|
|
19
|
+
var s;
|
|
20
|
+
return (s = h.value) != null && s.isOpen ? e.collapseIcon : e.expandIcon;
|
|
21
|
+
}), d = V(() => {
|
|
22
|
+
var s;
|
|
23
23
|
return {
|
|
24
24
|
VTreeviewItem: {
|
|
25
25
|
prependIcon: void 0,
|
|
26
26
|
appendIcon: void 0,
|
|
27
|
-
active: (
|
|
28
|
-
toggleIcon:
|
|
27
|
+
active: (s = h.value) == null ? void 0 : s.isOpen,
|
|
28
|
+
toggleIcon: b.value
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
});
|
|
32
|
-
return
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
return E(() => {
|
|
33
|
+
const s = q.filterProps(e);
|
|
34
|
+
return C(q, T(s, {
|
|
35
35
|
ref: h,
|
|
36
36
|
class: ["v-treeview-group", e.class],
|
|
37
37
|
subgroup: !0
|
|
38
38
|
}), {
|
|
39
39
|
...l,
|
|
40
|
-
activator: l.activator ? (u) =>
|
|
41
|
-
defaults:
|
|
40
|
+
activator: l.activator ? (u) => A(G, null, [C(de, {
|
|
41
|
+
defaults: d.value
|
|
42
42
|
}, {
|
|
43
43
|
default: () => {
|
|
44
44
|
var c;
|
|
@@ -48,63 +48,63 @@ const Ce = {
|
|
|
48
48
|
});
|
|
49
49
|
}), {};
|
|
50
50
|
}
|
|
51
|
-
}),
|
|
51
|
+
}), X = Symbol.for("vuetify:v-treeview"), Ve = D({
|
|
52
52
|
loading: Boolean,
|
|
53
|
-
toggleIcon:
|
|
54
|
-
...
|
|
53
|
+
toggleIcon: O,
|
|
54
|
+
...he({
|
|
55
55
|
slim: !0
|
|
56
56
|
})
|
|
57
|
-
}, "VTreeviewItem"),
|
|
57
|
+
}, "VTreeviewItem"), H = B()({
|
|
58
58
|
name: "VTreeviewItem",
|
|
59
|
-
props:
|
|
59
|
+
props: Ve(),
|
|
60
60
|
emits: {
|
|
61
61
|
toggleExpand: (e) => !0
|
|
62
62
|
},
|
|
63
|
-
setup(e,
|
|
63
|
+
setup(e, k) {
|
|
64
64
|
let {
|
|
65
65
|
slots: l,
|
|
66
66
|
emit: h
|
|
67
|
-
} =
|
|
68
|
-
const
|
|
67
|
+
} = k;
|
|
68
|
+
const b = J(X, {
|
|
69
69
|
visibleIds: S()
|
|
70
|
-
}).visibleIds,
|
|
71
|
-
var v,
|
|
72
|
-
return ((v =
|
|
70
|
+
}).visibleIds, d = S(), s = V(() => {
|
|
71
|
+
var v, p;
|
|
72
|
+
return ((v = d.value) == null ? void 0 : v.root.activatable.value) && ((p = d.value) == null ? void 0 : p.isGroupActivator);
|
|
73
73
|
}), u = V(() => {
|
|
74
|
-
var v,
|
|
75
|
-
return ((v =
|
|
76
|
-
}), c = V(() => !e.disabled && e.link !== !1 && (e.link || u.value ||
|
|
74
|
+
var v, p;
|
|
75
|
+
return ((v = d.value) == null ? void 0 : v.link.isClickable.value) || e.value != null && !!((p = d.value) != null && p.list);
|
|
76
|
+
}), c = V(() => !e.disabled && e.link !== !1 && (e.link || u.value || s.value)), a = V(() => {
|
|
77
77
|
var v;
|
|
78
|
-
return
|
|
78
|
+
return b.value && !b.value.has(L((v = d.value) == null ? void 0 : v.id));
|
|
79
79
|
});
|
|
80
80
|
function y(v) {
|
|
81
|
-
var
|
|
82
|
-
c.value &&
|
|
81
|
+
var p, I;
|
|
82
|
+
c.value && s.value && ((I = d.value) == null || I.activate(!((p = d.value) != null && p.isActivated), v));
|
|
83
83
|
}
|
|
84
84
|
function g(v) {
|
|
85
85
|
v.preventDefault(), h("toggleExpand", v);
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return E(() => {
|
|
88
88
|
var I;
|
|
89
|
-
const v = F(
|
|
90
|
-
return
|
|
91
|
-
ref:
|
|
89
|
+
const v = F(z.filterProps(e), ["onClick"]), p = l.prepend || e.toggleIcon;
|
|
90
|
+
return C(z, T({
|
|
91
|
+
ref: d
|
|
92
92
|
}, v, {
|
|
93
|
-
active: (I =
|
|
93
|
+
active: (I = d.value) == null ? void 0 : I.isActivated,
|
|
94
94
|
class: ["v-treeview-item", {
|
|
95
|
-
"v-treeview-item--activatable-group-activator":
|
|
95
|
+
"v-treeview-item--activatable-group-activator": s.value,
|
|
96
96
|
"v-treeview-item--filtered": a.value
|
|
97
97
|
}, e.class],
|
|
98
98
|
ripple: !1,
|
|
99
99
|
onClick: e.onClick ?? y
|
|
100
100
|
}), {
|
|
101
101
|
...l,
|
|
102
|
-
prepend:
|
|
102
|
+
prepend: p ? (o) => {
|
|
103
103
|
var r;
|
|
104
|
-
return
|
|
104
|
+
return A(G, null, [C(ue, {
|
|
105
105
|
start: !1
|
|
106
106
|
}, {
|
|
107
|
-
default: () => [e.toggleIcon ?
|
|
107
|
+
default: () => [e.toggleIcon ? C(ve, {
|
|
108
108
|
density: "compact",
|
|
109
109
|
icon: e.toggleIcon,
|
|
110
110
|
loading: e.loading,
|
|
@@ -112,13 +112,13 @@ const Ce = {
|
|
|
112
112
|
onClick: g
|
|
113
113
|
}, {
|
|
114
114
|
loader() {
|
|
115
|
-
return
|
|
115
|
+
return C(fe, {
|
|
116
116
|
indeterminate: "disable-shrink",
|
|
117
117
|
size: "20",
|
|
118
118
|
width: "2"
|
|
119
119
|
}, null);
|
|
120
120
|
}
|
|
121
|
-
}) :
|
|
121
|
+
}) : A("div", {
|
|
122
122
|
class: "v-treeview-item__level"
|
|
123
123
|
}, null)]
|
|
124
124
|
}), (r = l.prepend) == null ? void 0 : r.call(l, o)]);
|
|
@@ -126,7 +126,7 @@ const Ce = {
|
|
|
126
126
|
});
|
|
127
127
|
}), {};
|
|
128
128
|
}
|
|
129
|
-
}),
|
|
129
|
+
}), Y = D({
|
|
130
130
|
disabled: Boolean,
|
|
131
131
|
loadChildren: Function,
|
|
132
132
|
loadingIcon: {
|
|
@@ -139,25 +139,25 @@ const Ce = {
|
|
|
139
139
|
default: void 0
|
|
140
140
|
},
|
|
141
141
|
indeterminateIcon: {
|
|
142
|
-
type:
|
|
142
|
+
type: O,
|
|
143
143
|
default: "$checkboxIndeterminate"
|
|
144
144
|
},
|
|
145
|
-
falseIcon:
|
|
146
|
-
trueIcon:
|
|
145
|
+
falseIcon: O,
|
|
146
|
+
trueIcon: O,
|
|
147
147
|
returnObject: Boolean,
|
|
148
148
|
selectable: Boolean,
|
|
149
149
|
selectedColor: String,
|
|
150
150
|
selectStrategy: [String, Function, Object],
|
|
151
|
-
...
|
|
152
|
-
}, "VTreeviewChildren"),
|
|
151
|
+
...me()
|
|
152
|
+
}, "VTreeviewChildren"), N = B()({
|
|
153
153
|
name: "VTreeviewChildren",
|
|
154
|
-
props:
|
|
155
|
-
setup(e,
|
|
154
|
+
props: Y(),
|
|
155
|
+
setup(e, k) {
|
|
156
156
|
let {
|
|
157
157
|
slots: l
|
|
158
|
-
} =
|
|
159
|
-
const h =
|
|
160
|
-
async function
|
|
158
|
+
} = k;
|
|
159
|
+
const h = ee(/* @__PURE__ */ new Set()), b = V(() => !e.disabled && (e.openOnClick != null ? e.openOnClick : e.selectable));
|
|
160
|
+
async function d(u) {
|
|
161
161
|
var c, a;
|
|
162
162
|
try {
|
|
163
163
|
if (!((c = e.items) != null && c.length) || !e.loadChildren) return;
|
|
@@ -166,7 +166,7 @@ const Ce = {
|
|
|
166
166
|
h.delete(u.value);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function s(u, c) {
|
|
170
170
|
e.selectable && u(!c);
|
|
171
171
|
}
|
|
172
172
|
return () => {
|
|
@@ -176,10 +176,10 @@ const Ce = {
|
|
|
176
176
|
const {
|
|
177
177
|
children: y,
|
|
178
178
|
props: g
|
|
179
|
-
} = a, v = h.has(a.value),
|
|
179
|
+
} = a, v = h.has(a.value), p = {
|
|
180
180
|
prepend: (t) => {
|
|
181
181
|
var n;
|
|
182
|
-
return
|
|
182
|
+
return A(G, null, [e.selectable && (!y || y && !["leaf", "single-leaf"].includes(e.selectStrategy)) && A("div", null, [C(ge, {
|
|
183
183
|
key: a.value,
|
|
184
184
|
modelValue: t.isSelected,
|
|
185
185
|
disabled: e.disabled,
|
|
@@ -190,9 +190,9 @@ const Ce = {
|
|
|
190
190
|
indeterminateIcon: e.indeterminateIcon,
|
|
191
191
|
falseIcon: e.falseIcon,
|
|
192
192
|
trueIcon: e.trueIcon,
|
|
193
|
-
onClick:
|
|
193
|
+
onClick: Q(() => s(t.select, t.isSelected), ["stop"]),
|
|
194
194
|
onKeydown: (i) => {
|
|
195
|
-
["Enter", "Space"].includes(i.key) && (i.stopPropagation(),
|
|
195
|
+
["Enter", "Space"].includes(i.key) && (i.stopPropagation(), s(t.select, t.isSelected));
|
|
196
196
|
}
|
|
197
197
|
}, null)]), (n = l.prepend) == null ? void 0 : n.call(l, {
|
|
198
198
|
...t,
|
|
@@ -224,8 +224,8 @@ const Ce = {
|
|
|
224
224
|
internalItem: a
|
|
225
225
|
});
|
|
226
226
|
} : void 0
|
|
227
|
-
}, I =
|
|
228
|
-
return y ?
|
|
227
|
+
}, I = W.filterProps(g), o = N.filterProps(e);
|
|
228
|
+
return y ? C(W, T(I, {
|
|
229
229
|
value: e.returnObject ? a.raw : I == null ? void 0 : I.value
|
|
230
230
|
}), {
|
|
231
231
|
activator: (t) => {
|
|
@@ -236,15 +236,15 @@ const Ce = {
|
|
|
236
236
|
...g,
|
|
237
237
|
...n,
|
|
238
238
|
value: g == null ? void 0 : g.value,
|
|
239
|
-
onToggleExpand: [() =>
|
|
240
|
-
onClick:
|
|
239
|
+
onToggleExpand: [() => d(a), n.onClick],
|
|
240
|
+
onClick: b.value ? [() => d(a), n.onClick] : void 0
|
|
241
241
|
};
|
|
242
|
-
return
|
|
242
|
+
return C(H, T(i, {
|
|
243
243
|
value: e.returnObject ? a.raw : g.value,
|
|
244
244
|
loading: v
|
|
245
|
-
}),
|
|
245
|
+
}), p);
|
|
246
246
|
},
|
|
247
|
-
default: () =>
|
|
247
|
+
default: () => C(N, T(o, {
|
|
248
248
|
items: y,
|
|
249
249
|
returnObject: e.returnObject
|
|
250
250
|
}), l)
|
|
@@ -252,28 +252,28 @@ const Ce = {
|
|
|
252
252
|
props: g,
|
|
253
253
|
item: a.raw,
|
|
254
254
|
internalItem: a
|
|
255
|
-
})) ??
|
|
256
|
-
value: e.returnObject ?
|
|
257
|
-
}),
|
|
255
|
+
})) ?? C(H, T(g, {
|
|
256
|
+
value: e.returnObject ? L(a.raw) : g.value
|
|
257
|
+
}), p);
|
|
258
258
|
}));
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
|
-
function
|
|
263
|
-
let
|
|
262
|
+
function Z(e) {
|
|
263
|
+
let k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
264
264
|
for (const l of e)
|
|
265
|
-
|
|
266
|
-
return
|
|
265
|
+
k.push(l), l.children && Z(l.children, k);
|
|
266
|
+
return k;
|
|
267
267
|
}
|
|
268
|
-
const
|
|
268
|
+
const Pe = D({
|
|
269
269
|
fluid: Boolean,
|
|
270
270
|
openAll: Boolean,
|
|
271
271
|
search: String,
|
|
272
|
-
...
|
|
272
|
+
...be({
|
|
273
273
|
filterKeys: ["title"]
|
|
274
274
|
}),
|
|
275
|
-
...
|
|
276
|
-
...F(
|
|
275
|
+
...Y(),
|
|
276
|
+
...F(ke({
|
|
277
277
|
collapseIcon: "$treeviewCollapse",
|
|
278
278
|
expandIcon: "$treeviewExpand",
|
|
279
279
|
slim: !0
|
|
@@ -282,9 +282,9 @@ const Ve = B({
|
|
|
282
282
|
type: Array,
|
|
283
283
|
default: () => []
|
|
284
284
|
}
|
|
285
|
-
}, "VTreeview"),
|
|
285
|
+
}, "VTreeview"), Te = B()({
|
|
286
286
|
name: "VTreeview",
|
|
287
|
-
props:
|
|
287
|
+
props: Pe(),
|
|
288
288
|
emits: {
|
|
289
289
|
"update:opened": (e) => !0,
|
|
290
290
|
"update:activated": (e) => !0,
|
|
@@ -293,26 +293,26 @@ const Ve = B({
|
|
|
293
293
|
"click:open": (e) => !0,
|
|
294
294
|
"click:select": (e) => !0
|
|
295
295
|
},
|
|
296
|
-
setup(e,
|
|
296
|
+
setup(e, k) {
|
|
297
297
|
let {
|
|
298
298
|
slots: l
|
|
299
|
-
} =
|
|
299
|
+
} = k;
|
|
300
300
|
const {
|
|
301
301
|
items: h
|
|
302
|
-
} =
|
|
302
|
+
} = Ie(e), b = _(() => e.activeColor), d = _(() => e.baseColor), s = _(() => e.color), u = R(e, "activated"), c = R(e, "modelValue"), a = R(e, "selected", e.modelValue), y = V({
|
|
303
303
|
get: () => a.value,
|
|
304
304
|
set(i) {
|
|
305
305
|
a.value = i, c.value = i;
|
|
306
306
|
}
|
|
307
|
-
}), g = S(), v = V(() => e.openAll ? n(h.value) : e.opened),
|
|
307
|
+
}), g = S(), v = V(() => e.openAll ? n(h.value) : e.opened), p = V(() => Z(h.value)), I = _(() => e.search), {
|
|
308
308
|
filteredItems: o
|
|
309
|
-
} =
|
|
309
|
+
} = we(e, p, I), r = V(() => {
|
|
310
310
|
var m;
|
|
311
311
|
if (!I.value) return null;
|
|
312
312
|
const i = (m = g.value) == null ? void 0 : m.getPath;
|
|
313
313
|
return i ? new Set(o.value.flatMap((w) => {
|
|
314
314
|
const P = e.returnObject ? w.raw : w.props.value;
|
|
315
|
-
return [...i(P), ...t(P)].map(
|
|
315
|
+
return [...i(P), ...t(P)].map(L);
|
|
316
316
|
})) : null;
|
|
317
317
|
});
|
|
318
318
|
function t(i) {
|
|
@@ -327,32 +327,32 @@ const Ve = B({
|
|
|
327
327
|
function n(i) {
|
|
328
328
|
let m = [];
|
|
329
329
|
for (const w of i)
|
|
330
|
-
w.children && (m.push(e.returnObject ?
|
|
330
|
+
w.children && (m.push(e.returnObject ? L(w.raw) : w.value), w.children && (m = m.concat(n(w.children))));
|
|
331
331
|
return m;
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return te(X, {
|
|
334
334
|
visibleIds: r
|
|
335
|
-
}),
|
|
335
|
+
}), pe({
|
|
336
336
|
VTreeviewGroup: {
|
|
337
|
-
activeColor:
|
|
338
|
-
baseColor:
|
|
339
|
-
color:
|
|
337
|
+
activeColor: b,
|
|
338
|
+
baseColor: d,
|
|
339
|
+
color: s,
|
|
340
340
|
collapseIcon: _(() => e.collapseIcon),
|
|
341
341
|
expandIcon: _(() => e.expandIcon)
|
|
342
342
|
},
|
|
343
343
|
VTreeviewItem: {
|
|
344
344
|
activeClass: _(() => e.activeClass),
|
|
345
|
-
activeColor:
|
|
346
|
-
baseColor:
|
|
347
|
-
color:
|
|
345
|
+
activeColor: b,
|
|
346
|
+
baseColor: d,
|
|
347
|
+
color: s,
|
|
348
348
|
density: _(() => e.density),
|
|
349
349
|
disabled: _(() => e.disabled),
|
|
350
350
|
lines: _(() => e.lines),
|
|
351
351
|
variant: _(() => e.variant)
|
|
352
352
|
}
|
|
353
|
-
}),
|
|
354
|
-
const i =
|
|
355
|
-
return
|
|
353
|
+
}), E(() => {
|
|
354
|
+
const i = K.filterProps(e), m = N.filterProps(e);
|
|
355
|
+
return C(K, T({
|
|
356
356
|
ref: g
|
|
357
357
|
}, i, {
|
|
358
358
|
class: ["v-treeview", {
|
|
@@ -366,7 +366,7 @@ const Ve = B({
|
|
|
366
366
|
selected: y.value,
|
|
367
367
|
"onUpdate:selected": (w) => y.value = w
|
|
368
368
|
}), {
|
|
369
|
-
default: () => [
|
|
369
|
+
default: () => [C(N, T(m, {
|
|
370
370
|
density: e.density,
|
|
371
371
|
returnObject: e.returnObject,
|
|
372
372
|
items: h.value
|
|
@@ -374,20 +374,20 @@ const Ve = B({
|
|
|
374
374
|
});
|
|
375
375
|
}), {};
|
|
376
376
|
}
|
|
377
|
-
}),
|
|
377
|
+
}), xe = ["href", "onClick"], Se = ["href"], Ae = /* @__PURE__ */ ne({
|
|
378
378
|
__name: "x-navigation-tree",
|
|
379
|
-
props: /* @__PURE__ */
|
|
379
|
+
props: /* @__PURE__ */ ie({
|
|
380
380
|
clickAction: { type: Function },
|
|
381
381
|
currentPageReference: {},
|
|
382
382
|
includeTerminals: { type: Boolean }
|
|
383
|
-
},
|
|
383
|
+
}, ye),
|
|
384
384
|
setup(e) {
|
|
385
|
-
const
|
|
385
|
+
const k = J("cristal"), l = k.getContainer().get("DocumentService"), h = k.getContainer().get("NavigationTreeSourceProvider").get(), b = S([]), d = S(new Array()), s = S([]);
|
|
386
386
|
var u = !1;
|
|
387
387
|
const c = e;
|
|
388
|
-
|
|
388
|
+
le(async () => {
|
|
389
389
|
for (const o of await I(""))
|
|
390
|
-
|
|
390
|
+
b.value.push({
|
|
391
391
|
id: o.id,
|
|
392
392
|
title: o.label,
|
|
393
393
|
href: o.url,
|
|
@@ -395,8 +395,8 @@ const Ve = B({
|
|
|
395
395
|
_location: o.location,
|
|
396
396
|
_is_terminal: o.is_terminal
|
|
397
397
|
});
|
|
398
|
-
await a(), l.registerDocumentChangeListener("delete", v), l.registerDocumentChangeListener("update",
|
|
399
|
-
}),
|
|
398
|
+
await a(), l.registerDocumentChangeListener("delete", v), l.registerDocumentChangeListener("update", p);
|
|
399
|
+
}), ae(() => c.currentPageReference, a);
|
|
400
400
|
async function a() {
|
|
401
401
|
var o;
|
|
402
402
|
if (c.currentPageReference && !u) {
|
|
@@ -405,14 +405,14 @@ const Ve = B({
|
|
|
405
405
|
c.currentPageReference,
|
|
406
406
|
c.includeTerminals
|
|
407
407
|
);
|
|
408
|
-
let t, n =
|
|
408
|
+
let t, n = b.value;
|
|
409
409
|
for (t = 0; t < r.length - 1; t++)
|
|
410
410
|
if (n)
|
|
411
411
|
for (const i of n)
|
|
412
|
-
i.id == r[t] && (((o = i.children) == null ? void 0 : o.length) == 0 && await y(i),
|
|
412
|
+
i.id == r[t] && (((o = i.children) == null ? void 0 : o.length) == 0 && await y(i), s.value.includes(i.id) || s.value.push(i.id), n = i.children);
|
|
413
413
|
if (n)
|
|
414
414
|
for (const i of n)
|
|
415
|
-
i.id == r[t] && (
|
|
415
|
+
i.id == r[t] && (d.value = [i.id], c.clickAction && c.clickAction({
|
|
416
416
|
id: i.id,
|
|
417
417
|
label: i.title,
|
|
418
418
|
location: i._location,
|
|
@@ -438,11 +438,11 @@ const Ve = B({
|
|
|
438
438
|
t.length == 0 && (r.children = void 0);
|
|
439
439
|
}
|
|
440
440
|
function g() {
|
|
441
|
-
|
|
441
|
+
d.value.length > 1 && d.value.pop();
|
|
442
442
|
}
|
|
443
443
|
async function v(o) {
|
|
444
444
|
const r = h.getParentNodesId(o, c.includeTerminals);
|
|
445
|
-
let t, n =
|
|
445
|
+
let t, n = b.value, i = !1;
|
|
446
446
|
e: for (; n && !i; ) {
|
|
447
447
|
for (const m of n.keys())
|
|
448
448
|
if (n[m].id == r[0])
|
|
@@ -456,9 +456,9 @@ const Ve = B({
|
|
|
456
456
|
i = !0;
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
async function
|
|
459
|
+
async function p(o) {
|
|
460
460
|
const r = h.getParentNodesId(o, c.includeTerminals);
|
|
461
|
-
let t, n =
|
|
461
|
+
let t, n = b.value, i = !1, m = !0;
|
|
462
462
|
e: for (; n && !i; ) {
|
|
463
463
|
for (const f of n.keys())
|
|
464
464
|
if (n[f].id == r[0])
|
|
@@ -466,9 +466,9 @@ const Ve = B({
|
|
|
466
466
|
const x = await I(
|
|
467
467
|
t || ""
|
|
468
468
|
);
|
|
469
|
-
for (const
|
|
470
|
-
if (
|
|
471
|
-
n[f].title =
|
|
469
|
+
for (const $ of x)
|
|
470
|
+
if ($.id == n[f].id) {
|
|
471
|
+
n[f].title = $.label;
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
474
|
} else {
|
|
@@ -494,7 +494,7 @@ const Ve = B({
|
|
|
494
494
|
children: f.has_children ? [] : void 0,
|
|
495
495
|
_location: f.location,
|
|
496
496
|
_is_terminal: f.is_terminal
|
|
497
|
-
}), P.length > 0 && P[P.length - 1] === f.id && (
|
|
497
|
+
}), P.length > 0 && P[P.length - 1] === f.id && (d.value = [f.id]);
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
async function I(o) {
|
|
@@ -502,24 +502,24 @@ const Ve = B({
|
|
|
502
502
|
(r) => c.includeTerminals || !r.is_terminal
|
|
503
503
|
);
|
|
504
504
|
}
|
|
505
|
-
return (o, r) => (
|
|
506
|
-
opened:
|
|
507
|
-
"onUpdate:opened": r[0] || (r[0] = (t) =>
|
|
505
|
+
return (o, r) => (j(), re(ce(Te), {
|
|
506
|
+
opened: s.value,
|
|
507
|
+
"onUpdate:opened": r[0] || (r[0] = (t) => s.value = t),
|
|
508
508
|
density: "compact",
|
|
509
|
-
activated:
|
|
510
|
-
items:
|
|
509
|
+
activated: d.value,
|
|
510
|
+
items: b.value,
|
|
511
511
|
"load-children": y,
|
|
512
512
|
activatable: "",
|
|
513
513
|
"active-strategy": "independent",
|
|
514
514
|
"item-value": "id",
|
|
515
515
|
"onUpdate:activated": g
|
|
516
516
|
}, {
|
|
517
|
-
title:
|
|
518
|
-
c.clickAction ? (
|
|
517
|
+
title: oe(({ item: t }) => [
|
|
518
|
+
c.clickAction ? (j(), U("a", {
|
|
519
519
|
key: 0,
|
|
520
520
|
href: t.href,
|
|
521
|
-
onClick:
|
|
522
|
-
|
|
521
|
+
onClick: Q((n) => {
|
|
522
|
+
d.value = [t.id], o.clickAction({
|
|
523
523
|
id: t.id,
|
|
524
524
|
label: t.title,
|
|
525
525
|
location: t._location,
|
|
@@ -528,16 +528,16 @@ const Ve = B({
|
|
|
528
528
|
is_terminal: t._is_terminal
|
|
529
529
|
});
|
|
530
530
|
}, ["prevent"])
|
|
531
|
-
},
|
|
531
|
+
}, M(t.title), 9, xe)) : (j(), U("a", {
|
|
532
532
|
key: 1,
|
|
533
533
|
href: t.href
|
|
534
|
-
},
|
|
534
|
+
}, M(t.title), 9, Se))
|
|
535
535
|
]),
|
|
536
536
|
_: 1
|
|
537
537
|
}, 8, ["opened", "activated", "items"]));
|
|
538
538
|
}
|
|
539
|
-
}),
|
|
539
|
+
}), Be = /* @__PURE__ */ Ce(Ae, [["__scopeId", "data-v-515dbad6"]]);
|
|
540
540
|
export {
|
|
541
|
-
|
|
541
|
+
Be as default
|
|
542
542
|
};
|
|
543
|
-
//# sourceMappingURL=x-navigation-tree-
|
|
543
|
+
//# sourceMappingURL=x-navigation-tree-CA9rdB38.js.map
|