@xwiki/cristal-dsvuetify 0.8.0 → 0.10.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 +25 -0
- package/dist/index-BjjXwAdJ.js +20870 -0
- package/dist/index-BjjXwAdJ.js.map +1 -0
- package/dist/index.es.js +9 -20955
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +14 -25
- package/dist/index.umd.js.map +1 -1
- package/dist/translations-CFfpgNrx.js +10 -0
- package/dist/translations-CFfpgNrx.js.map +1 -0
- package/dist/translations.d.ts +2 -0
- package/dist/vue/form/x-file-input.vue.d.ts +32 -0
- package/dist/vue/form/x-form.vue.d.ts +15 -0
- package/dist/vue/form/x-text-field.vue.d.ts +13 -0
- package/dist/vue/x-alert.vue.d.ts +3 -2
- package/dist/vue/x-btn.vue.d.ts +4 -2
- package/dist/vue/x-dialog.vue.d.ts +7 -5
- package/dist/vue/x-menu-item.vue.d.ts +6 -4
- package/dist/vue/x-menu.vue.d.ts +7 -5
- package/dist/vue/x-navigation-tree.vue.d.ts +23 -0
- package/dist/vue/x-tab-group.vue.d.ts +16 -0
- package/dist/vue/x-tab-panel.vue.d.ts +22 -0
- package/dist/vue/x-tab.vue.d.ts +22 -0
- package/dist/x-alert-Cm6mzRpR.js.map +1 -1
- package/dist/x-avatar-But_Z7ic.js.map +1 -1
- package/dist/x-breadcrumb-DBZVExfF.js +21 -0
- package/dist/x-breadcrumb-DBZVExfF.js.map +1 -0
- package/dist/x-btn-DsACLwMY.js.map +1 -1
- package/dist/x-card-CRM9KUby.js.map +1 -1
- package/dist/x-divider-7cmRuxTV.js.map +1 -1
- package/dist/x-file-input-B6XyfogW.js +35 -0
- package/dist/x-file-input-B6XyfogW.js.map +1 -0
- package/dist/x-form-leyAZnAr.js +32 -0
- package/dist/x-form-leyAZnAr.js.map +1 -0
- package/dist/x-img-BYgs_O1F.js.map +1 -1
- package/dist/{x-load-CDyapJH_.js → x-load-DipiCmNY.js} +1 -1
- package/dist/x-load-DipiCmNY.js.map +1 -0
- package/dist/x-navigation-tree-B8JZ_wJm.js +470 -0
- package/dist/x-navigation-tree-B8JZ_wJm.js.map +1 -0
- package/dist/x-search-C4yZLrSp.js.map +1 -1
- package/dist/x-tab-OWsxC4de.js +22 -0
- package/dist/x-tab-OWsxC4de.js.map +1 -0
- package/dist/x-tab-group-ngNByee3.js +49 -0
- package/dist/x-tab-group-ngNByee3.js.map +1 -0
- package/dist/x-tab-panel-YsSPuuLL.js +22 -0
- package/dist/x-tab-panel-YsSPuuLL.js.map +1 -0
- package/dist/x-text-field-B88odaud.js +29 -0
- package/dist/x-text-field-B88odaud.js.map +1 -0
- package/langs/translation-en.json +4 -0
- package/langs/translation-fr.json +1 -0
- package/package.json +9 -10
- package/src/components/componentsInit.ts +4 -9
- package/src/components/vuetifyDesignSystemLoader.ts +35 -9
- package/src/index.ts +4 -9
- package/src/translations.ts +26 -0
- package/src/vue/css/style.css +31 -13
- package/src/vue/form/x-file-input.vue +40 -0
- package/src/vue/form/x-form.vue +17 -0
- package/src/vue/form/x-text-field.vue +32 -0
- package/src/vue/x-alert.vue +17 -23
- package/src/vue/x-avatar.vue +17 -23
- package/src/vue/x-breadcrumb.vue +28 -24
- package/src/vue/x-btn.vue +17 -23
- package/src/vue/x-card.vue +17 -23
- package/src/vue/x-dialog.vue +17 -23
- package/src/vue/x-divider.vue +17 -23
- package/src/vue/x-img.vue +17 -23
- package/src/vue/x-load.vue +17 -23
- package/src/vue/x-menu-item.vue +17 -23
- package/src/vue/x-menu.vue +17 -23
- package/src/vue/x-navigation-tree.vue +165 -0
- package/src/vue/x-search.vue +17 -23
- package/src/vue/x-tab-group.vue +46 -0
- package/src/vue/x-tab-panel.vue +30 -0
- package/src/vue/x-tab.vue +30 -0
- package/src/vue.d.ts +4 -9
- package/tsconfig.json +1 -0
- package/vite.config.ts +4 -9
- package/dist/style.css +0 -5
- package/dist/x-breadcrumb-DKUFjeVQ.js +0 -17
- package/dist/x-breadcrumb-DKUFjeVQ.js.map +0 -1
- package/dist/x-load-CDyapJH_.js.map +0 -1
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import { ref as k, computed as p, createVNode as s, mergeProps as x, Fragment as G, inject as ne, withDirectives as le, resolveDirective as ae, shallowRef as re, withModifiers as X, toRef as I, provide as ce, defineComponent as oe, onBeforeMount as se, watch as ue, openBlock as F, createBlock as de, unref as ve, withCtx as fe, createElementBlock as z, toDisplayString as K } from "vue";
|
|
2
|
+
import { p as B, o as Y, m as he, g as D, u as E, c as M, d as me, I as ge, e as we, f as Ie, h as pe, i as ke, j as O, k as ye, l as U, n as j, q, r as be, s as Ce, t as Ve, v as Pe, w as Te, x as Se, y as W, z as Ae, A as xe, B as H } from "./index-BjjXwAdJ.js";
|
|
3
|
+
const _e = B({
|
|
4
|
+
...Y(he({
|
|
5
|
+
collapseIcon: "$treeviewCollapse",
|
|
6
|
+
expandIcon: "$treeviewExpand"
|
|
7
|
+
}), ["subgroup"])
|
|
8
|
+
}, "VTreeviewGroup"), J = D()({
|
|
9
|
+
name: "VTreeviewGroup",
|
|
10
|
+
props: _e(),
|
|
11
|
+
setup(e, g) {
|
|
12
|
+
let {
|
|
13
|
+
slots: h
|
|
14
|
+
} = g;
|
|
15
|
+
const t = k(), w = p(() => {
|
|
16
|
+
var f;
|
|
17
|
+
return (f = t.value) != null && f.isOpen ? e.collapseIcon : e.expandIcon;
|
|
18
|
+
}), v = p(() => {
|
|
19
|
+
var f;
|
|
20
|
+
return {
|
|
21
|
+
VTreeviewItem: {
|
|
22
|
+
prependIcon: void 0,
|
|
23
|
+
appendIcon: void 0,
|
|
24
|
+
active: (f = t.value) == null ? void 0 : f.isOpen,
|
|
25
|
+
toggleIcon: w.value
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
return E(() => {
|
|
30
|
+
const f = M.filterProps(e);
|
|
31
|
+
return s(M, x(f, {
|
|
32
|
+
ref: t,
|
|
33
|
+
class: ["v-treeview-group", e.class],
|
|
34
|
+
subgroup: !0
|
|
35
|
+
}), {
|
|
36
|
+
...h,
|
|
37
|
+
activator: h.activator ? (u) => s(G, null, [s(me, {
|
|
38
|
+
defaults: v.value
|
|
39
|
+
}, {
|
|
40
|
+
default: () => {
|
|
41
|
+
var l;
|
|
42
|
+
return [(l = h.activator) == null ? void 0 : l.call(h, u)];
|
|
43
|
+
}
|
|
44
|
+
})]) : void 0
|
|
45
|
+
});
|
|
46
|
+
}), {};
|
|
47
|
+
}
|
|
48
|
+
}), Z = Symbol.for("vuetify:v-treeview"), Le = B({
|
|
49
|
+
loading: Boolean,
|
|
50
|
+
toggleIcon: ge,
|
|
51
|
+
...we({
|
|
52
|
+
slim: !0
|
|
53
|
+
})
|
|
54
|
+
}, "VTreeviewItem"), Q = D()({
|
|
55
|
+
name: "VTreeviewItem",
|
|
56
|
+
props: Le(),
|
|
57
|
+
setup(e, g) {
|
|
58
|
+
let {
|
|
59
|
+
attrs: h,
|
|
60
|
+
slots: t,
|
|
61
|
+
emit: w
|
|
62
|
+
} = g;
|
|
63
|
+
const v = Ie(e, h), f = p(() => e.value === void 0 ? v.href.value : e.value), u = k(), {
|
|
64
|
+
activate: l,
|
|
65
|
+
isActivated: a,
|
|
66
|
+
select: i,
|
|
67
|
+
isSelected: d,
|
|
68
|
+
isIndeterminate: n,
|
|
69
|
+
isGroupActivator: y,
|
|
70
|
+
root: b,
|
|
71
|
+
id: C
|
|
72
|
+
} = pe(f, !1), V = p(() => b.activatable.value && y), {
|
|
73
|
+
densityClasses: P
|
|
74
|
+
} = ke(e, "v-list-item"), c = p(() => ({
|
|
75
|
+
isActive: a.value,
|
|
76
|
+
select: i,
|
|
77
|
+
isSelected: d.value,
|
|
78
|
+
isIndeterminate: n.value
|
|
79
|
+
})), r = p(() => {
|
|
80
|
+
var m;
|
|
81
|
+
return !e.disabled && e.link !== !1 && (e.link || v.isClickable.value || e.value != null && !!((m = u.value) != null && m.list));
|
|
82
|
+
});
|
|
83
|
+
function o(m) {
|
|
84
|
+
var _, L;
|
|
85
|
+
!r.value || !V.value && y || b.activatable.value && (V.value ? l(!a.value, m) : (L = u.value) == null || L.activate(!((_ = u.value) != null && _.isActivated), m));
|
|
86
|
+
}
|
|
87
|
+
function T(m) {
|
|
88
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), o(m));
|
|
89
|
+
}
|
|
90
|
+
const S = ne(Z, {
|
|
91
|
+
visibleIds: k()
|
|
92
|
+
}).visibleIds;
|
|
93
|
+
return E(() => {
|
|
94
|
+
var R;
|
|
95
|
+
const m = t.title || e.title != null, _ = t.subtitle || e.subtitle != null, L = O.filterProps(e), ie = t.prepend || e.toggleIcon;
|
|
96
|
+
return V.value ? le(s("div", {
|
|
97
|
+
class: ["v-list-item", "v-list-item--one-line", "v-treeview-item", "v-treeview-item--activetable-group-activator", {
|
|
98
|
+
"v-list-item--active": a.value || d.value,
|
|
99
|
+
"v-treeview-item--filtered": S.value && !S.value.has(C.value)
|
|
100
|
+
}, P.value, e.class],
|
|
101
|
+
onClick: o
|
|
102
|
+
}, [s(G, null, [ye(a.value || d.value, "v-list-item"), e.toggleIcon && s(U, {
|
|
103
|
+
start: !1
|
|
104
|
+
}, {
|
|
105
|
+
default: () => [s(j, {
|
|
106
|
+
density: "compact",
|
|
107
|
+
icon: e.toggleIcon,
|
|
108
|
+
loading: e.loading,
|
|
109
|
+
variant: "text",
|
|
110
|
+
onClick: e.onClick
|
|
111
|
+
}, {
|
|
112
|
+
loader() {
|
|
113
|
+
return s(q, {
|
|
114
|
+
indeterminate: "disable-shrink",
|
|
115
|
+
size: "20",
|
|
116
|
+
width: "2"
|
|
117
|
+
}, null);
|
|
118
|
+
}
|
|
119
|
+
})]
|
|
120
|
+
})]), s("div", {
|
|
121
|
+
class: "v-list-item__content",
|
|
122
|
+
"data-no-activator": ""
|
|
123
|
+
}, [m && s(be, {
|
|
124
|
+
key: "title"
|
|
125
|
+
}, {
|
|
126
|
+
default: () => {
|
|
127
|
+
var A;
|
|
128
|
+
return [((A = t.title) == null ? void 0 : A.call(t, {
|
|
129
|
+
title: e.title
|
|
130
|
+
})) ?? e.title];
|
|
131
|
+
}
|
|
132
|
+
}), _ && s(Ce, {
|
|
133
|
+
key: "subtitle"
|
|
134
|
+
}, {
|
|
135
|
+
default: () => {
|
|
136
|
+
var A;
|
|
137
|
+
return [((A = t.subtitle) == null ? void 0 : A.call(t, {
|
|
138
|
+
subtitle: e.subtitle
|
|
139
|
+
})) ?? e.subtitle];
|
|
140
|
+
}
|
|
141
|
+
}), (R = t.default) == null ? void 0 : R.call(t, c.value)])]), [[ae("ripple"), r.value && e.ripple]]) : s(O, x({
|
|
142
|
+
ref: u
|
|
143
|
+
}, L, {
|
|
144
|
+
class: ["v-treeview-item", {
|
|
145
|
+
"v-treeview-item--filtered": S.value && !S.value.has(C.value)
|
|
146
|
+
}, e.class],
|
|
147
|
+
value: C.value,
|
|
148
|
+
onClick: o,
|
|
149
|
+
onKeydown: r.value && T
|
|
150
|
+
}), {
|
|
151
|
+
...t,
|
|
152
|
+
prepend: ie ? (A) => {
|
|
153
|
+
var $;
|
|
154
|
+
return s(G, null, [e.toggleIcon && s(U, {
|
|
155
|
+
start: !1
|
|
156
|
+
}, {
|
|
157
|
+
default: () => [s(j, {
|
|
158
|
+
density: "compact",
|
|
159
|
+
icon: e.toggleIcon,
|
|
160
|
+
loading: e.loading,
|
|
161
|
+
variant: "text"
|
|
162
|
+
}, {
|
|
163
|
+
loader() {
|
|
164
|
+
return s(q, {
|
|
165
|
+
indeterminate: "disable-shrink",
|
|
166
|
+
size: "20",
|
|
167
|
+
width: "2"
|
|
168
|
+
}, null);
|
|
169
|
+
}
|
|
170
|
+
})]
|
|
171
|
+
}), ($ = t.prepend) == null ? void 0 : $.call(t, A)]);
|
|
172
|
+
} : void 0
|
|
173
|
+
});
|
|
174
|
+
}), {};
|
|
175
|
+
}
|
|
176
|
+
}), ee = B({
|
|
177
|
+
loadChildren: Function,
|
|
178
|
+
loadingIcon: {
|
|
179
|
+
type: String,
|
|
180
|
+
default: "$loading"
|
|
181
|
+
},
|
|
182
|
+
items: Array,
|
|
183
|
+
selectable: Boolean,
|
|
184
|
+
selectStrategy: [String, Function, Object]
|
|
185
|
+
}, "VTreeviewChildren"), N = D()({
|
|
186
|
+
name: "VTreeviewChildren",
|
|
187
|
+
props: ee(),
|
|
188
|
+
setup(e, g) {
|
|
189
|
+
let {
|
|
190
|
+
emit: h,
|
|
191
|
+
slots: t
|
|
192
|
+
} = g;
|
|
193
|
+
const w = re(null);
|
|
194
|
+
function v(u) {
|
|
195
|
+
return new Promise((l) => {
|
|
196
|
+
var a, i;
|
|
197
|
+
if (!((a = e.items) != null && a.length) || !e.loadChildren) return l();
|
|
198
|
+
if (((i = u == null ? void 0 : u.children) == null ? void 0 : i.length) === 0) {
|
|
199
|
+
w.value = u.value, e.loadChildren(u).then(l);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
l();
|
|
203
|
+
}).finally(() => {
|
|
204
|
+
w.value = null;
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
function f(u, l) {
|
|
208
|
+
e.selectable && u(!l);
|
|
209
|
+
}
|
|
210
|
+
return () => {
|
|
211
|
+
var u, l;
|
|
212
|
+
return ((u = t.default) == null ? void 0 : u.call(t)) ?? ((l = e.items) == null ? void 0 : l.map((a) => {
|
|
213
|
+
var P;
|
|
214
|
+
let {
|
|
215
|
+
children: i,
|
|
216
|
+
props: d,
|
|
217
|
+
raw: n
|
|
218
|
+
} = a;
|
|
219
|
+
const y = w.value === n.value, b = {
|
|
220
|
+
prepend: (c) => {
|
|
221
|
+
var r;
|
|
222
|
+
return s(G, null, [e.selectable && (!i || i && !["leaf", "single-leaf"].includes(e.selectStrategy)) && s("div", null, [s(Ve, {
|
|
223
|
+
key: n.value,
|
|
224
|
+
modelValue: c.isSelected,
|
|
225
|
+
loading: y,
|
|
226
|
+
indeterminate: c.isIndeterminate,
|
|
227
|
+
onClick: X(() => f(c.select, c.isSelected), ["stop"]),
|
|
228
|
+
onKeydown: (o) => {
|
|
229
|
+
["Enter", "Space"].includes(o.key) && (o.stopPropagation(), f(c.select, c.isSelected));
|
|
230
|
+
}
|
|
231
|
+
}, null)]), (r = t.prepend) == null ? void 0 : r.call(t, {
|
|
232
|
+
...c,
|
|
233
|
+
item: n
|
|
234
|
+
})]);
|
|
235
|
+
},
|
|
236
|
+
append: t.append ? (c) => {
|
|
237
|
+
var r;
|
|
238
|
+
return (r = t.append) == null ? void 0 : r.call(t, {
|
|
239
|
+
...c,
|
|
240
|
+
item: n
|
|
241
|
+
});
|
|
242
|
+
} : void 0,
|
|
243
|
+
title: t.title ? (c) => {
|
|
244
|
+
var r;
|
|
245
|
+
return (r = t.title) == null ? void 0 : r.call(t, {
|
|
246
|
+
...c,
|
|
247
|
+
item: n
|
|
248
|
+
});
|
|
249
|
+
} : void 0
|
|
250
|
+
}, C = J.filterProps(d), V = N.filterProps(e);
|
|
251
|
+
return i ? s(J, x({
|
|
252
|
+
value: d == null ? void 0 : d.value
|
|
253
|
+
}, C), {
|
|
254
|
+
activator: (c) => {
|
|
255
|
+
let {
|
|
256
|
+
props: r
|
|
257
|
+
} = c;
|
|
258
|
+
const o = {
|
|
259
|
+
...d,
|
|
260
|
+
...r,
|
|
261
|
+
value: d == null ? void 0 : d.value
|
|
262
|
+
};
|
|
263
|
+
return s(Q, x(o, {
|
|
264
|
+
loading: y,
|
|
265
|
+
onClick: () => v(n)
|
|
266
|
+
}), b);
|
|
267
|
+
},
|
|
268
|
+
default: () => s(N, x(V, {
|
|
269
|
+
items: i
|
|
270
|
+
}), t)
|
|
271
|
+
}) : ((P = t.item) == null ? void 0 : P.call(t, {
|
|
272
|
+
props: d
|
|
273
|
+
})) ?? s(Q, d, b);
|
|
274
|
+
}));
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
function te(e) {
|
|
279
|
+
let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
280
|
+
for (const h of e)
|
|
281
|
+
g.push(h), h.children && te(h.children, g);
|
|
282
|
+
return g;
|
|
283
|
+
}
|
|
284
|
+
const Ge = B({
|
|
285
|
+
openAll: Boolean,
|
|
286
|
+
search: String,
|
|
287
|
+
...Pe({
|
|
288
|
+
filterKeys: ["title"]
|
|
289
|
+
}),
|
|
290
|
+
...ee(),
|
|
291
|
+
...Y(Te({
|
|
292
|
+
collapseIcon: "$treeviewCollapse",
|
|
293
|
+
expandIcon: "$treeviewExpand",
|
|
294
|
+
slim: !0
|
|
295
|
+
}), ["itemType", "nav"])
|
|
296
|
+
}, "VTreeview"), Ne = D()({
|
|
297
|
+
name: "VTreeview",
|
|
298
|
+
props: Ge(),
|
|
299
|
+
emits: {
|
|
300
|
+
"update:opened": (e) => !0,
|
|
301
|
+
"update:activated": (e) => !0,
|
|
302
|
+
"update:selected": (e) => !0,
|
|
303
|
+
"click:open": (e) => !0,
|
|
304
|
+
"click:select": (e) => !0
|
|
305
|
+
},
|
|
306
|
+
setup(e, g) {
|
|
307
|
+
let {
|
|
308
|
+
slots: h
|
|
309
|
+
} = g;
|
|
310
|
+
const {
|
|
311
|
+
items: t
|
|
312
|
+
} = Se(e), w = I(e, "activeColor"), v = I(e, "baseColor"), f = I(e, "color"), u = W(e, "activated"), l = W(e, "selected"), a = k(), i = p(() => e.openAll ? P(t.value) : e.opened), d = p(() => te(t.value)), n = I(e, "search"), {
|
|
313
|
+
filteredItems: y
|
|
314
|
+
} = Ae(e, d, n), b = p(() => n.value ? new Set(y.value.flatMap((c) => [...C(c.props.value), ...V(c.props.value)])) : null);
|
|
315
|
+
function C(c) {
|
|
316
|
+
var T;
|
|
317
|
+
const r = [];
|
|
318
|
+
let o = c;
|
|
319
|
+
for (; o != null; )
|
|
320
|
+
r.unshift(o), o = (T = a.value) == null ? void 0 : T.parents.get(o);
|
|
321
|
+
return r;
|
|
322
|
+
}
|
|
323
|
+
function V(c) {
|
|
324
|
+
var T, S;
|
|
325
|
+
const r = [], o = (((T = a.value) == null ? void 0 : T.children.get(c)) ?? []).slice();
|
|
326
|
+
for (; o.length; ) {
|
|
327
|
+
const m = o.shift();
|
|
328
|
+
m && (r.push(m), o.push(...(((S = a.value) == null ? void 0 : S.children.get(m)) ?? []).slice()));
|
|
329
|
+
}
|
|
330
|
+
return r;
|
|
331
|
+
}
|
|
332
|
+
function P(c) {
|
|
333
|
+
let r = [];
|
|
334
|
+
for (const o of c)
|
|
335
|
+
o.children && (r.push(o.value), o.children && (r = r.concat(P(o.children))));
|
|
336
|
+
return r;
|
|
337
|
+
}
|
|
338
|
+
return ce(Z, {
|
|
339
|
+
visibleIds: b
|
|
340
|
+
}), xe({
|
|
341
|
+
VTreeviewGroup: {
|
|
342
|
+
activeColor: w,
|
|
343
|
+
baseColor: v,
|
|
344
|
+
color: f,
|
|
345
|
+
collapseIcon: I(e, "collapseIcon"),
|
|
346
|
+
expandIcon: I(e, "expandIcon")
|
|
347
|
+
},
|
|
348
|
+
VTreeviewItem: {
|
|
349
|
+
activeClass: I(e, "activeClass"),
|
|
350
|
+
activeColor: w,
|
|
351
|
+
baseColor: v,
|
|
352
|
+
color: f,
|
|
353
|
+
density: I(e, "density"),
|
|
354
|
+
disabled: I(e, "disabled"),
|
|
355
|
+
lines: I(e, "lines"),
|
|
356
|
+
variant: I(e, "variant")
|
|
357
|
+
}
|
|
358
|
+
}), E(() => {
|
|
359
|
+
const c = H.filterProps(e), r = N.filterProps(e);
|
|
360
|
+
return s(H, x({
|
|
361
|
+
ref: a
|
|
362
|
+
}, c, {
|
|
363
|
+
class: ["v-treeview", e.class],
|
|
364
|
+
style: e.style,
|
|
365
|
+
opened: i.value,
|
|
366
|
+
activated: u.value,
|
|
367
|
+
"onUpdate:activated": (o) => u.value = o,
|
|
368
|
+
selected: l.value,
|
|
369
|
+
"onUpdate:selected": (o) => l.value = o
|
|
370
|
+
}), {
|
|
371
|
+
default: () => [s(N, x(r, {
|
|
372
|
+
items: t.value
|
|
373
|
+
}), h)]
|
|
374
|
+
});
|
|
375
|
+
}), {};
|
|
376
|
+
}
|
|
377
|
+
}), Be = ["href", "onClick"], De = ["href"], Re = /* @__PURE__ */ oe({
|
|
378
|
+
__name: "x-navigation-tree",
|
|
379
|
+
props: {
|
|
380
|
+
treeSource: {},
|
|
381
|
+
clickAction: { type: Function },
|
|
382
|
+
currentPage: {}
|
|
383
|
+
},
|
|
384
|
+
setup(e) {
|
|
385
|
+
const g = k([]), h = k(void 0), t = k(new Array()), w = k(new Array()), v = e;
|
|
386
|
+
se(async () => {
|
|
387
|
+
for (const l of await v.treeSource.getChildNodes(""))
|
|
388
|
+
g.value.push({
|
|
389
|
+
id: l.id,
|
|
390
|
+
title: l.label,
|
|
391
|
+
href: l.url,
|
|
392
|
+
children: l.has_children ? [] : void 0,
|
|
393
|
+
_location: l.location
|
|
394
|
+
});
|
|
395
|
+
v.currentPage !== void 0 && await f();
|
|
396
|
+
}), ue(
|
|
397
|
+
() => v.currentPage,
|
|
398
|
+
async () => {
|
|
399
|
+
v.currentPage && await f();
|
|
400
|
+
}
|
|
401
|
+
);
|
|
402
|
+
async function f() {
|
|
403
|
+
var d;
|
|
404
|
+
const l = v.treeSource.getParentNodesId(v.currentPage);
|
|
405
|
+
let a, i = g.value;
|
|
406
|
+
for (a = 0; a < l.length - 1; a++)
|
|
407
|
+
if (i)
|
|
408
|
+
for (const n of i)
|
|
409
|
+
n.id == l[a] && (((d = n.children) == null ? void 0 : d.length) == 0 && await u(n), w.value.includes(n.id) || w.value.push(n.id), i = n.children);
|
|
410
|
+
if (i)
|
|
411
|
+
for (const n of i)
|
|
412
|
+
n.id == l[a] && (t.value = [n.id], v.clickAction && v.clickAction({
|
|
413
|
+
id: n.id,
|
|
414
|
+
label: n.title,
|
|
415
|
+
location: n._location,
|
|
416
|
+
url: n.href,
|
|
417
|
+
has_children: n.children !== void 0
|
|
418
|
+
}));
|
|
419
|
+
}
|
|
420
|
+
async function u(l) {
|
|
421
|
+
var d;
|
|
422
|
+
const a = l, i = await v.treeSource.getChildNodes(a.id);
|
|
423
|
+
for (const n of i)
|
|
424
|
+
(d = a.children) == null || d.push({
|
|
425
|
+
id: n.id,
|
|
426
|
+
title: n.label,
|
|
427
|
+
href: n.url,
|
|
428
|
+
children: n.has_children ? [] : void 0,
|
|
429
|
+
_location: n.location
|
|
430
|
+
});
|
|
431
|
+
i.length == 0 && (a.children = void 0);
|
|
432
|
+
}
|
|
433
|
+
return (l, a) => (F(), de(ve(Ne), {
|
|
434
|
+
ref_key: "tree",
|
|
435
|
+
ref: h,
|
|
436
|
+
activated: t.value,
|
|
437
|
+
"onUpdate:activated": a[0] || (a[0] = (i) => t.value = i),
|
|
438
|
+
opened: w.value,
|
|
439
|
+
"onUpdate:opened": a[1] || (a[1] = (i) => w.value = i),
|
|
440
|
+
items: g.value,
|
|
441
|
+
"load-children": u,
|
|
442
|
+
activatable: "",
|
|
443
|
+
"active-strategy": "single-independent",
|
|
444
|
+
"item-value": "id",
|
|
445
|
+
"open-strategy": "multiple"
|
|
446
|
+
}, {
|
|
447
|
+
title: fe(({ item: i }) => [
|
|
448
|
+
v.clickAction ? (F(), z("a", {
|
|
449
|
+
key: 0,
|
|
450
|
+
href: i.href,
|
|
451
|
+
onClick: X((d) => l.clickAction({
|
|
452
|
+
id: i.id,
|
|
453
|
+
label: i.title,
|
|
454
|
+
location: i._location,
|
|
455
|
+
url: i.href,
|
|
456
|
+
has_children: i.children !== void 0
|
|
457
|
+
}), ["prevent"])
|
|
458
|
+
}, K(i.title), 9, Be)) : (F(), z("a", {
|
|
459
|
+
key: 1,
|
|
460
|
+
href: i.href
|
|
461
|
+
}, K(i.title), 9, De))
|
|
462
|
+
]),
|
|
463
|
+
_: 1
|
|
464
|
+
}, 8, ["activated", "opened", "items"]));
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
export {
|
|
468
|
+
Re as default
|
|
469
|
+
};
|
|
470
|
+
//# sourceMappingURL=x-navigation-tree-B8JZ_wJm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x-navigation-tree-B8JZ_wJm.js","sources":["../../../node_modules/.pnpm/vuetify@3.6.15_typescript@5.5.2_vite-plugin-vuetify@2.0.3_vue-i18n@9.13.1_vue@3.4.31_typescri_34qekugouoix6pecd7mrea7vh4/node_modules/vuetify/lib/labs/VTreeview/VTreeviewGroup.mjs","../../../node_modules/.pnpm/vuetify@3.6.15_typescript@5.5.2_vite-plugin-vuetify@2.0.3_vue-i18n@9.13.1_vue@3.4.31_typescri_34qekugouoix6pecd7mrea7vh4/node_modules/vuetify/lib/labs/VTreeview/shared.mjs","../../../node_modules/.pnpm/vuetify@3.6.15_typescript@5.5.2_vite-plugin-vuetify@2.0.3_vue-i18n@9.13.1_vue@3.4.31_typescri_34qekugouoix6pecd7mrea7vh4/node_modules/vuetify/lib/labs/VTreeview/VTreeviewItem.mjs","../../../node_modules/.pnpm/vuetify@3.6.15_typescript@5.5.2_vite-plugin-vuetify@2.0.3_vue-i18n@9.13.1_vue@3.4.31_typescri_34qekugouoix6pecd7mrea7vh4/node_modules/vuetify/lib/labs/VTreeview/VTreeviewChildren.mjs","../../../node_modules/.pnpm/vuetify@3.6.15_typescript@5.5.2_vite-plugin-vuetify@2.0.3_vue-i18n@9.13.1_vue@3.4.31_typescri_34qekugouoix6pecd7mrea7vh4/node_modules/vuetify/lib/labs/VTreeview/VTreeview.mjs","../src/vue/x-navigation-tree.vue"],"sourcesContent":["import { mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Components\nimport { VDefaultsProvider } from \"../../components/VDefaultsProvider/index.mjs\";\nimport { makeVListGroupProps, VListGroup } from \"../../components/VList/VListGroup.mjs\"; // Utilities\nimport { computed, ref } from 'vue';\nimport { genericComponent, omit, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nexport const makeVTreeviewGroupProps = propsFactory({\n ...omit(makeVListGroupProps({\n collapseIcon: '$treeviewCollapse',\n expandIcon: '$treeviewExpand'\n }), ['subgroup'])\n}, 'VTreeviewGroup');\nexport const VTreeviewGroup = genericComponent()({\n name: 'VTreeviewGroup',\n props: makeVTreeviewGroupProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const vListGroupRef = ref();\n const toggleIcon = computed(() => vListGroupRef.value?.isOpen ? props.collapseIcon : props.expandIcon);\n const activatorDefaults = computed(() => ({\n VTreeviewItem: {\n prependIcon: undefined,\n appendIcon: undefined,\n active: vListGroupRef.value?.isOpen,\n toggleIcon: toggleIcon.value\n }\n }));\n useRender(() => {\n const listGroupProps = VListGroup.filterProps(props);\n return _createVNode(VListGroup, _mergeProps(listGroupProps, {\n \"ref\": vListGroupRef,\n \"class\": ['v-treeview-group', props.class],\n \"subgroup\": true\n }), {\n ...slots,\n activator: slots.activator ? slotProps => _createVNode(_Fragment, null, [_createVNode(VDefaultsProvider, {\n \"defaults\": activatorDefaults.value\n }, {\n default: () => [slots.activator?.(slotProps)]\n })]) : undefined\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VTreeviewGroup.mjs.map","// Types\n\nexport const VTreeviewSymbol = Symbol.for('vuetify:v-treeview');\n//# sourceMappingURL=shared.mjs.map","import { mergeProps as _mergeProps, withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Styles\nimport \"./VTreeviewItem.css\";\n\n// Components\nimport { VBtn } from \"../../components/VBtn/index.mjs\";\nimport { VListItemAction, VListItemSubtitle, VListItemTitle } from \"../../components/VList/index.mjs\";\nimport { makeVListItemProps, VListItem } from \"../../components/VList/VListItem.mjs\";\nimport { VProgressCircular } from \"../../components/VProgressCircular/index.mjs\"; // Composables\nimport { useDensity } from \"../../composables/density.mjs\";\nimport { IconValue } from \"../../composables/icons.mjs\";\nimport { useNestedItem } from \"../../composables/nested/nested.mjs\";\nimport { useLink } from \"../../composables/router.mjs\";\nimport { genOverlays } from \"../../composables/variant.mjs\"; // Utilities\nimport { computed, inject, ref } from 'vue';\nimport { genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nimport { VTreeviewSymbol } from \"./shared.mjs\";\nexport const makeVTreeviewItemProps = propsFactory({\n loading: Boolean,\n toggleIcon: IconValue,\n ...makeVListItemProps({\n slim: true\n })\n}, 'VTreeviewItem');\nexport const VTreeviewItem = genericComponent()({\n name: 'VTreeviewItem',\n props: makeVTreeviewItemProps(),\n setup(props, _ref) {\n let {\n attrs,\n slots,\n emit\n } = _ref;\n const link = useLink(props, attrs);\n const rawId = computed(() => props.value === undefined ? link.href.value : props.value);\n const vListItemRef = ref();\n const {\n activate,\n isActivated,\n select,\n isSelected,\n isIndeterminate,\n isGroupActivator,\n root,\n id\n } = useNestedItem(rawId, false);\n const isActivatableGroupActivator = computed(() => root.activatable.value && isGroupActivator);\n const {\n densityClasses\n } = useDensity(props, 'v-list-item');\n const slotProps = computed(() => ({\n isActive: isActivated.value,\n select,\n isSelected: isSelected.value,\n isIndeterminate: isIndeterminate.value\n }));\n const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!vListItemRef.value?.list));\n function activateItem(e) {\n if (!isClickable.value || !isActivatableGroupActivator.value && isGroupActivator) return;\n if (root.activatable.value) {\n if (isActivatableGroupActivator.value) {\n activate(!isActivated.value, e);\n } else {\n vListItemRef.value?.activate(!vListItemRef.value?.isActivated, e);\n }\n }\n }\n function onKeyDown(e) {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n activateItem(e);\n }\n }\n const visibleIds = inject(VTreeviewSymbol, {\n visibleIds: ref()\n }).visibleIds;\n useRender(() => {\n const hasTitle = slots.title || props.title != null;\n const hasSubtitle = slots.subtitle || props.subtitle != null;\n const listItemProps = VListItem.filterProps(props);\n const hasPrepend = slots.prepend || props.toggleIcon;\n return isActivatableGroupActivator.value ? _withDirectives(_createVNode(\"div\", {\n \"class\": ['v-list-item', 'v-list-item--one-line', 'v-treeview-item', 'v-treeview-item--activetable-group-activator', {\n 'v-list-item--active': isActivated.value || isSelected.value,\n 'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(id.value)\n }, densityClasses.value, props.class],\n \"onClick\": activateItem\n }, [_createVNode(_Fragment, null, [genOverlays(isActivated.value || isSelected.value, 'v-list-item'), props.toggleIcon && _createVNode(VListItemAction, {\n \"start\": false\n }, {\n default: () => [_createVNode(VBtn, {\n \"density\": \"compact\",\n \"icon\": props.toggleIcon,\n \"loading\": props.loading,\n \"variant\": \"text\",\n \"onClick\": props.onClick\n }, {\n loader() {\n return _createVNode(VProgressCircular, {\n \"indeterminate\": \"disable-shrink\",\n \"size\": \"20\",\n \"width\": \"2\"\n }, null);\n }\n })]\n })]), _createVNode(\"div\", {\n \"class\": \"v-list-item__content\",\n \"data-no-activator\": \"\"\n }, [hasTitle && _createVNode(VListItemTitle, {\n \"key\": \"title\"\n }, {\n default: () => [slots.title?.({\n title: props.title\n }) ?? props.title]\n }), hasSubtitle && _createVNode(VListItemSubtitle, {\n \"key\": \"subtitle\"\n }, {\n default: () => [slots.subtitle?.({\n subtitle: props.subtitle\n }) ?? props.subtitle]\n }), slots.default?.(slotProps.value)])]), [[_resolveDirective(\"ripple\"), isClickable.value && props.ripple]]) : _createVNode(VListItem, _mergeProps({\n \"ref\": vListItemRef\n }, listItemProps, {\n \"class\": ['v-treeview-item', {\n 'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(id.value)\n }, props.class],\n \"value\": id.value,\n \"onClick\": activateItem,\n \"onKeydown\": isClickable.value && onKeyDown\n }), {\n ...slots,\n prepend: hasPrepend ? slotProps => {\n return _createVNode(_Fragment, null, [props.toggleIcon && _createVNode(VListItemAction, {\n \"start\": false\n }, {\n default: () => [_createVNode(VBtn, {\n \"density\": \"compact\",\n \"icon\": props.toggleIcon,\n \"loading\": props.loading,\n \"variant\": \"text\"\n }, {\n loader() {\n return _createVNode(VProgressCircular, {\n \"indeterminate\": \"disable-shrink\",\n \"size\": \"20\",\n \"width\": \"2\"\n }, null);\n }\n })]\n }), slots.prepend?.(slotProps)]);\n } : undefined\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VTreeviewItem.mjs.map","import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode, Fragment as _Fragment } from \"vue\";\n// Components\nimport { VTreeviewGroup } from \"./VTreeviewGroup.mjs\";\nimport { VTreeviewItem } from \"./VTreeviewItem.mjs\";\nimport { VCheckboxBtn } from \"../../components/VCheckbox/index.mjs\"; // Utilities\nimport { shallowRef, withModifiers } from 'vue';\nimport { genericComponent, propsFactory } from \"../../util/index.mjs\"; // Types\nexport const makeVTreeviewChildrenProps = propsFactory({\n loadChildren: Function,\n loadingIcon: {\n type: String,\n default: '$loading'\n },\n items: Array,\n selectable: Boolean,\n selectStrategy: [String, Function, Object]\n}, 'VTreeviewChildren');\nexport const VTreeviewChildren = genericComponent()({\n name: 'VTreeviewChildren',\n props: makeVTreeviewChildrenProps(),\n setup(props, _ref) {\n let {\n emit,\n slots\n } = _ref;\n const isLoading = shallowRef(null);\n function checkChildren(item) {\n return new Promise(resolve => {\n if (!props.items?.length || !props.loadChildren) return resolve();\n if (item?.children?.length === 0) {\n isLoading.value = item.value;\n props.loadChildren(item).then(resolve);\n return;\n }\n resolve();\n }).finally(() => {\n isLoading.value = null;\n });\n }\n function selectItem(select, isSelected) {\n if (props.selectable) {\n select(!isSelected);\n }\n }\n return () => slots.default?.() ?? props.items?.map(_ref2 => {\n let {\n children,\n props: itemProps,\n raw: item\n } = _ref2;\n const loading = isLoading.value === item.value;\n const slotsWithItem = {\n prepend: slotProps => _createVNode(_Fragment, null, [props.selectable && (!children || children && !['leaf', 'single-leaf'].includes(props.selectStrategy)) && _createVNode(\"div\", null, [_createVNode(VCheckboxBtn, {\n \"key\": item.value,\n \"modelValue\": slotProps.isSelected,\n \"loading\": loading,\n \"indeterminate\": slotProps.isIndeterminate,\n \"onClick\": withModifiers(() => selectItem(slotProps.select, slotProps.isSelected), ['stop']),\n \"onKeydown\": e => {\n if (!['Enter', 'Space'].includes(e.key)) return;\n e.stopPropagation();\n selectItem(slotProps.select, slotProps.isSelected);\n }\n }, null)]), slots.prepend?.({\n ...slotProps,\n item\n })]),\n append: slots.append ? slotProps => slots.append?.({\n ...slotProps,\n item\n }) : undefined,\n title: slots.title ? slotProps => slots.title?.({\n ...slotProps,\n item\n }) : undefined\n };\n const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props);\n return children ? _createVNode(VTreeviewGroup, _mergeProps({\n \"value\": itemProps?.value\n }, treeviewGroupProps), {\n activator: _ref3 => {\n let {\n props: activatorProps\n } = _ref3;\n const listItemProps = {\n ...itemProps,\n ...activatorProps,\n value: itemProps?.value\n };\n return _createVNode(VTreeviewItem, _mergeProps(listItemProps, {\n \"loading\": loading,\n \"onClick\": () => checkChildren(item)\n }), slotsWithItem);\n },\n default: () => _createVNode(VTreeviewChildren, _mergeProps(treeviewChildrenProps, {\n \"items\": children\n }), slots)\n }) : slots.item?.({\n props: itemProps\n }) ?? _createVNode(VTreeviewItem, itemProps, slotsWithItem);\n });\n }\n});\n//# sourceMappingURL=VTreeviewChildren.mjs.map","import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from \"vue\";\n// Components\nimport { makeVTreeviewChildrenProps, VTreeviewChildren } from \"./VTreeviewChildren.mjs\";\nimport { makeVListProps, useListItems, VList } from \"../../components/VList/VList.mjs\"; // Composables\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeFilterProps, useFilter } from \"../../composables/filter.mjs\";\nimport { useProxiedModel } from \"../../composables/proxiedModel.mjs\"; // Utilities\nimport { computed, provide, ref, toRef } from 'vue';\nimport { genericComponent, omit, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nimport { VTreeviewSymbol } from \"./shared.mjs\";\nfunction flatten(items) {\n let flat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n for (const item of items) {\n flat.push(item);\n if (item.children) flatten(item.children, flat);\n }\n return flat;\n}\nexport const makeVTreeviewProps = propsFactory({\n openAll: Boolean,\n search: String,\n ...makeFilterProps({\n filterKeys: ['title']\n }),\n ...makeVTreeviewChildrenProps(),\n ...omit(makeVListProps({\n collapseIcon: '$treeviewCollapse',\n expandIcon: '$treeviewExpand',\n slim: true\n }), ['itemType', 'nav'])\n}, 'VTreeview');\nexport const VTreeview = genericComponent()({\n name: 'VTreeview',\n props: makeVTreeviewProps(),\n emits: {\n 'update:opened': val => true,\n 'update:activated': val => true,\n 'update:selected': val => true,\n 'click:open': value => true,\n 'click:select': value => true\n },\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n items\n } = useListItems(props);\n const activeColor = toRef(props, 'activeColor');\n const baseColor = toRef(props, 'baseColor');\n const color = toRef(props, 'color');\n const activated = useProxiedModel(props, 'activated');\n const selected = useProxiedModel(props, 'selected');\n const vListRef = ref();\n const opened = computed(() => props.openAll ? openAll(items.value) : props.opened);\n const flatItems = computed(() => flatten(items.value));\n const search = toRef(props, 'search');\n const {\n filteredItems\n } = useFilter(props, flatItems, search);\n const visibleIds = computed(() => {\n if (!search.value) {\n return null;\n }\n return new Set(filteredItems.value.flatMap(item => {\n return [...getPath(item.props.value), ...getChildren(item.props.value)];\n }));\n });\n function getPath(id) {\n const path = [];\n let parent = id;\n while (parent != null) {\n path.unshift(parent);\n parent = vListRef.value?.parents.get(parent);\n }\n return path;\n }\n function getChildren(id) {\n const arr = [];\n const queue = (vListRef.value?.children.get(id) ?? []).slice();\n while (queue.length) {\n const child = queue.shift();\n if (!child) continue;\n arr.push(child);\n queue.push(...(vListRef.value?.children.get(child) ?? []).slice());\n }\n return arr;\n }\n function openAll(item) {\n let ids = [];\n for (const i of item) {\n if (!i.children) continue;\n ids.push(i.value);\n if (i.children) {\n ids = ids.concat(openAll(i.children));\n }\n }\n return ids;\n }\n provide(VTreeviewSymbol, {\n visibleIds\n });\n provideDefaults({\n VTreeviewGroup: {\n activeColor,\n baseColor,\n color,\n collapseIcon: toRef(props, 'collapseIcon'),\n expandIcon: toRef(props, 'expandIcon')\n },\n VTreeviewItem: {\n activeClass: toRef(props, 'activeClass'),\n activeColor,\n baseColor,\n color,\n density: toRef(props, 'density'),\n disabled: toRef(props, 'disabled'),\n lines: toRef(props, 'lines'),\n variant: toRef(props, 'variant')\n }\n });\n useRender(() => {\n const listProps = VList.filterProps(props);\n const treeviewChildrenProps = VTreeviewChildren.filterProps(props);\n return _createVNode(VList, _mergeProps({\n \"ref\": vListRef\n }, listProps, {\n \"class\": ['v-treeview', props.class],\n \"style\": props.style,\n \"opened\": opened.value,\n \"activated\": activated.value,\n \"onUpdate:activated\": $event => activated.value = $event,\n \"selected\": selected.value,\n \"onUpdate:selected\": $event => selected.value = $event\n }), {\n default: () => [_createVNode(VTreeviewChildren, _mergeProps(treeviewChildrenProps, {\n \"items\": items.value\n }), slots)]\n });\n });\n return {};\n }\n});\n//# sourceMappingURL=VTreeview.mjs.map","<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { Ref, onBeforeMount, ref, watch } from \"vue\";\nimport { VTreeview } from \"vuetify/labs/VTreeview\";\nimport { type PageData } from \"@xwiki/cristal-api\";\nimport type {\n NavigationTreeSource,\n NavigationTreeNode,\n} from \"@xwiki/cristal-navigation-tree-api\";\n\ntype TreeItem = {\n id: string;\n title: string;\n href: string;\n children?: Array<TreeItem>;\n _location: string;\n};\n\ntype OnClickAction = (node: NavigationTreeNode) => void;\n\nconst rootNodes: Ref<Array<TreeItem>> = ref([]);\nconst tree: Ref<VTreeview | undefined> = ref(undefined);\n\nconst activatedNodes: Ref<Array<string>> = ref(new Array<string>());\nconst expandedNodes: Ref<Array<string>> = ref(new Array<string>());\n\nconst props = defineProps<{\n treeSource: NavigationTreeSource;\n clickAction?: OnClickAction;\n currentPage?: PageData;\n}>();\n\nonBeforeMount(async () => {\n for (const node of await props.treeSource.getChildNodes(\"\")) {\n rootNodes.value.push({\n id: node.id,\n title: node.label,\n href: node.url,\n children: node.has_children ? [] : undefined,\n _location: node.location,\n });\n }\n if (props.currentPage !== undefined) {\n await expandTree();\n }\n});\n\nwatch(\n () => props.currentPage,\n async () => {\n if (props.currentPage) {\n await expandTree();\n }\n },\n);\n\nasync function expandTree() {\n const newExpandedNodes = props.treeSource.getParentNodesId(props.currentPage);\n let i;\n let currentNodes = rootNodes.value;\n for (i = 0; i < newExpandedNodes.length - 1; i++) {\n if (currentNodes) {\n for (const node of currentNodes) {\n if (node.id == newExpandedNodes[i]) {\n if (node.children?.length == 0) {\n await lazyLoadChildren(node);\n }\n if (!expandedNodes.value.includes(node.id)) {\n expandedNodes.value.push(node.id);\n }\n currentNodes = node.children!;\n }\n }\n }\n }\n if (currentNodes) {\n for (const node of currentNodes) {\n if (node.id == newExpandedNodes[i]) {\n activatedNodes.value = [node.id];\n // If we have a custom click action, we want to use it on dynamic\n // selection.\n if (props.clickAction) {\n props.clickAction({\n id: node.id,\n label: node.title,\n location: node._location,\n url: node.href,\n has_children: node.children !== undefined,\n });\n }\n }\n }\n }\n}\n\nasync function lazyLoadChildren(item: unknown) {\n const treeItem = item as TreeItem;\n const childNodes = await props.treeSource.getChildNodes(treeItem.id);\n for (const child of childNodes) {\n treeItem.children?.push({\n id: child.id,\n title: child.label,\n href: child.url,\n children: child.has_children ? [] : undefined,\n _location: child.location,\n });\n }\n // If the node doesn't have any children, we update it.\n if (childNodes.length == 0) {\n treeItem.children = undefined;\n }\n}\n</script>\n\n<template>\n <v-treeview\n ref=\"tree\"\n v-model:activated=\"activatedNodes\"\n v-model:opened=\"expandedNodes\"\n :items=\"rootNodes\"\n :load-children=\"lazyLoadChildren\"\n activatable\n active-strategy=\"single-independent\"\n item-value=\"id\"\n open-strategy=\"multiple\"\n >\n <template #title=\"{ item }: { item: any }\">\n <a\n v-if=\"props.clickAction\"\n :href=\"item.href\"\n @click.prevent=\"\n clickAction!({\n id: item.id,\n label: item.title,\n location: item._location,\n url: item.href,\n has_children: item.children !== undefined,\n })\n \"\n >{{ item.title }}</a\n >\n <a v-else :href=\"item.href\">{{ item.title }}</a>\n </template>\n </v-treeview>\n</template>\n\n<style scoped></style>\n"],"names":["makeVTreeviewGroupProps","propsFactory","omit","makeVListGroupProps","VTreeviewGroup","genericComponent","props","_ref","slots","vListGroupRef","ref","toggleIcon","computed","_a","activatorDefaults","useRender","listGroupProps","VListGroup","_createVNode","_mergeProps","slotProps","_Fragment","VDefaultsProvider","VTreeviewSymbol","makeVTreeviewItemProps","IconValue","makeVListItemProps","VTreeviewItem","attrs","emit","link","useLink","rawId","vListItemRef","activate","isActivated","select","isSelected","isIndeterminate","isGroupActivator","root","id","useNestedItem","isActivatableGroupActivator","densityClasses","useDensity","isClickable","activateItem","e","_b","onKeyDown","visibleIds","inject","hasTitle","hasSubtitle","listItemProps","VListItem","hasPrepend","_withDirectives","genOverlays","VListItemAction","VBtn","VProgressCircular","VListItemTitle","VListItemSubtitle","_resolveDirective","makeVTreeviewChildrenProps","VTreeviewChildren","isLoading","shallowRef","checkChildren","item","resolve","selectItem","_ref2","children","itemProps","loading","slotsWithItem","VCheckboxBtn","withModifiers","treeviewGroupProps","treeviewChildrenProps","_ref3","activatorProps","flatten","items","flat","makeVTreeviewProps","makeFilterProps","makeVListProps","VTreeview","val","value","useListItems","activeColor","toRef","baseColor","color","activated","useProxiedModel","selected","vListRef","opened","openAll","flatItems","search","filteredItems","useFilter","getPath","getChildren","path","parent","arr","queue","child","ids","i","provide","provideDefaults","listProps","VList","$event","rootNodes","tree","activatedNodes","expandedNodes","__props","onBeforeMount","node","expandTree","watch","newExpandedNodes","currentNodes","lazyLoadChildren","treeItem","childNodes"],"mappings":";;AAMO,MAAMA,KAA0BC,EAAa;AAAA,EAClD,GAAGC,EAAKC,GAAoB;AAAA,IAC1B,cAAc;AAAA,IACd,YAAY;AAAA,EAChB,CAAG,GAAG,CAAC,UAAU,CAAC;AAClB,GAAG,gBAAgB,GACNC,IAAiBC,EAAgB,EAAG;AAAA,EAC/C,MAAM;AAAA,EACN,OAAOL,GAAyB;AAAA,EAChC,MAAMM,GAAOC,GAAM;AACjB,QAAI;AAAA,MACF,OAAAC;AAAA,IACD,IAAGD;AACJ,UAAME,IAAgBC,KAChBC,IAAaC,EAAS,MAAM;;AAAA,cAAAC,IAAAJ,EAAc,UAAd,QAAAI,EAAqB,SAASP,EAAM,eAAeA,EAAM;AAAA,KAAU,GAC/FQ,IAAoBF,EAAS,MAAO;;AAAA;AAAA,QACxC,eAAe;AAAA,UACb,aAAa;AAAA,UACb,YAAY;AAAA,UACZ,SAAQC,IAAAJ,EAAc,UAAd,gBAAAI,EAAqB;AAAA,UAC7B,YAAYF,EAAW;AAAA,QACxB;AAAA,MACF;AAAA,KAAC;AACF,WAAAI,EAAU,MAAM;AACd,YAAMC,IAAiBC,EAAW,YAAYX,CAAK;AACnD,aAAOY,EAAaD,GAAYE,EAAYH,GAAgB;AAAA,QAC1D,KAAOP;AAAA,QACP,OAAS,CAAC,oBAAoBH,EAAM,KAAK;AAAA,QACzC,UAAY;AAAA,MACpB,CAAO,GAAG;AAAA,QACF,GAAGE;AAAA,QACH,WAAWA,EAAM,YAAY,CAAAY,MAAaF,EAAaG,GAAW,MAAM,CAACH,EAAaI,IAAmB;AAAA,UACvG,UAAYR,EAAkB;AAAA,QACxC,GAAW;A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AC,MAChBQ,EAAA,QAAQ,CAACI,EAAK,EAAE,GAG3B3H,EAAM,eACRA,EAAM,YAAY;AAAA,YAChB,IAAI2H,EAAK;AAAA,YACT,OAAOA,EAAK;AAAA,YACZ,UAAUA,EAAK;AAAA,YACf,KAAKA,EAAK;AAAA,YACV,cAAcA,EAAK,aAAa;AAAA,UAAA,CACjC;AAAA,IAKX;AAEA,mBAAeK,EAAiB/D,GAAe;;AAC7C,YAAMgE,IAAWhE,GACXiE,IAAa,MAAMlI,EAAM,WAAW,cAAciI,EAAS,EAAE;AACnE,iBAAWpB,KAASqB;AAClB,SAAA3H,IAAA0H,EAAS,aAAT,QAAA1H,EAAmB,KAAK;AAAA,UACtB,IAAIsG,EAAM;AAAA,UACV,OAAOA,EAAM;AAAA,UACb,MAAMA,EAAM;AAAA,UACZ,UAAUA,EAAM,eAAe,CAAA,IAAK;AAAA,UACpC,WAAWA,EAAM;AAAA,QAAA;AAIjB,MAAAqB,EAAW,UAAU,MACvBD,EAAS,WAAW;AAAA,IAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-search-C4yZLrSp.js","sources":["../src/vue/x-search.vue"],"sourcesContent":["<!--\
|
|
1
|
+
{"version":3,"file":"x-search-C4yZLrSp.js","sources":["../src/vue/x-search.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\"></script>\n\n<template>\n <v-autocomplete\n density=\"comfortable\"\n menu-icon=\"\"\n placeholder=\"Search\"\n prepend-inner-icon=\"mdi-magnify\"\n variant=\"solo\"\n auto-select-first\n rounded\n ></v-autocomplete>\n</template>\n\n<style scoped></style>\n"],"names":["_openBlock","_createBlock","_component_v_autocomplete"],"mappings":";;;;;AAuBI,SAAAA,EAAqB,GAAAC,EAAAC,GAAA;AAAA,IACrB,SAAA;AAAA,IACA,aAAY;AAAA,IACZ,aAAA;AAAA,IACA,sBAAc;AAAA,IACd,SAAA;AAAA,IACA,qBAAO;AAAA;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as o, resolveComponent as a, openBlock as n, createBlock as r, withCtx as p, renderSlot as l } from "vue";
|
|
2
|
+
const u = /* @__PURE__ */ o({
|
|
3
|
+
__name: "x-tab",
|
|
4
|
+
props: {
|
|
5
|
+
tabId: {}
|
|
6
|
+
},
|
|
7
|
+
setup(s) {
|
|
8
|
+
return (e, _) => {
|
|
9
|
+
const t = a("v-tab");
|
|
10
|
+
return n(), r(t, { value: e.tabId }, {
|
|
11
|
+
default: p(() => [
|
|
12
|
+
l(e.$slots, "default")
|
|
13
|
+
]),
|
|
14
|
+
_: 3
|
|
15
|
+
}, 8, ["value"]);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
u as default
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=x-tab-OWsxC4de.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x-tab-OWsxC4de.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as f, ref as i, resolveComponent as n, openBlock as V, createBlock as b, withCtx as a, createVNode as s, renderSlot as u } from "vue";
|
|
2
|
+
const x = /* @__PURE__ */ f({
|
|
3
|
+
__name: "x-tab-group",
|
|
4
|
+
emits: ["change"],
|
|
5
|
+
setup(g, { emit: d }) {
|
|
6
|
+
const t = i(null), m = d;
|
|
7
|
+
function r(e) {
|
|
8
|
+
typeof e == "string" && m("change", e);
|
|
9
|
+
}
|
|
10
|
+
return (e, o) => {
|
|
11
|
+
const _ = n("v-tabs"), c = n("v-tabs-window"), p = n("v-card-text"), v = n("v-card");
|
|
12
|
+
return V(), b(v, { class: "mx-auto" }, {
|
|
13
|
+
default: a(() => [
|
|
14
|
+
s(_, {
|
|
15
|
+
modelValue: t.value,
|
|
16
|
+
"onUpdate:modelValue": [
|
|
17
|
+
o[0] || (o[0] = (l) => t.value = l),
|
|
18
|
+
r
|
|
19
|
+
]
|
|
20
|
+
}, {
|
|
21
|
+
default: a(() => [
|
|
22
|
+
u(e.$slots, "tabs")
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 8, ["modelValue"]),
|
|
26
|
+
s(p, null, {
|
|
27
|
+
default: a(() => [
|
|
28
|
+
s(c, {
|
|
29
|
+
modelValue: t.value,
|
|
30
|
+
"onUpdate:modelValue": o[1] || (o[1] = (l) => t.value = l)
|
|
31
|
+
}, {
|
|
32
|
+
default: a(() => [
|
|
33
|
+
u(e.$slots, "panels")
|
|
34
|
+
]),
|
|
35
|
+
_: 3
|
|
36
|
+
}, 8, ["modelValue"])
|
|
37
|
+
]),
|
|
38
|
+
_: 3
|
|
39
|
+
})
|
|
40
|
+
]),
|
|
41
|
+
_: 3
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
x as default
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=x-tab-group-ngNByee3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x-tab-group-ngNByee3.js","sources":["../src/vue/x-tab-group.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nconst tab = ref(null);\n\nconst emits = defineEmits([\"change\"]);\n\nfunction change(tabId: unknown) {\n if (typeof tabId == \"string\") {\n emits(\"change\", tabId);\n }\n}\n</script>\n\n<template>\n <v-card class=\"mx-auto\">\n <v-tabs v-model=\"tab\" @update:model-value=\"change\">\n <slot name=\"tabs\"></slot>\n </v-tabs>\n <v-card-text>\n <v-tabs-window v-model=\"tab\">\n <slot name=\"panels\"></slot>\n </v-tabs-window>\n </v-card-text>\n </v-card>\n</template>\n\n<style scoped></style>\n"],"names":["tab","ref","emits","__emit","change","tabId"],"mappings":";;;;;AAqBM,UAAAA,IAAMC,EAAI,IAAI,GAEdC,IAAQC;AAEd,aAASC,EAAOC,GAAgB;AAC1B,MAAA,OAAOA,KAAS,YAClBH,EAAM,UAAUG,CAAK;AAAA,IAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as o, resolveComponent as n, openBlock as a, createBlock as r, withCtx as p, renderSlot as s } from "vue";
|
|
2
|
+
const m = /* @__PURE__ */ o({
|
|
3
|
+
__name: "x-tab-panel",
|
|
4
|
+
props: {
|
|
5
|
+
tabId: {}
|
|
6
|
+
},
|
|
7
|
+
setup(_) {
|
|
8
|
+
return (e, l) => {
|
|
9
|
+
const t = n("v-tabs-window-item");
|
|
10
|
+
return a(), r(t, { value: e.tabId }, {
|
|
11
|
+
default: p(() => [
|
|
12
|
+
s(e.$slots, "default")
|
|
13
|
+
]),
|
|
14
|
+
_: 3
|
|
15
|
+
}, 8, ["value"]);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
m as default
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=x-tab-panel-YsSPuuLL.js.map
|