@xwiki/cristal-dsvuetify 0.13.0 → 0.14.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 +14 -0
- package/dist/{index-UP1o6s9t.js → index-C4ioHAez.js} +3275 -3259
- package/dist/index-C4ioHAez.js.map +1 -0
- package/dist/index.es.js +6 -5
- package/dist/index.umd.js +10 -9
- package/dist/index.umd.js.map +1 -1
- package/dist/vue/form/x-checkbox.vue.d.ts +11 -0
- package/dist/vue/form/x-file-input.vue.d.ts +6 -6
- package/dist/vue/form/x-form.vue.d.ts +2 -1
- package/dist/vue/form/x-text-field.vue.d.ts +9 -1
- package/dist/vue/x-alert.vue.d.ts +2 -1
- package/dist/vue/x-avatar.vue.d.ts +2 -19
- package/dist/vue/x-btn.vue.d.ts +2 -1
- package/dist/vue/x-dialog.vue.d.ts +7 -8
- package/dist/vue/x-load.vue.d.ts +1 -1
- package/dist/vue/x-menu-item.vue.d.ts +6 -6
- package/dist/vue/x-menu-label.vue.d.ts +2 -1
- package/dist/vue/x-menu.vue.d.ts +2 -1
- package/dist/vue/x-navigation-tree.vue.d.ts +3 -5
- package/dist/vue/x-tab-group.vue.d.ts +4 -3
- package/dist/vue/x-tab-panel.vue.d.ts +2 -1
- package/dist/vue/x-tab.vue.d.ts +2 -1
- package/dist/x-alert-CTAhsN6L.js +46 -0
- package/dist/x-alert-CTAhsN6L.js.map +1 -0
- package/dist/x-avatar-Ds9aYRI9.js +28 -0
- package/dist/x-avatar-Ds9aYRI9.js.map +1 -0
- package/dist/{x-btn-DNlhiqjD.js → x-btn-BsiSIiiO.js} +9 -7
- package/dist/{x-btn-DNlhiqjD.js.map → x-btn-BsiSIiiO.js.map} +1 -1
- package/dist/x-checkbox-CJ3_IJ-Y.js +28 -0
- package/dist/x-checkbox-CJ3_IJ-Y.js.map +1 -0
- package/dist/x-dialog-C4gz0mOu.js +48 -0
- package/dist/x-dialog-C4gz0mOu.js.map +1 -0
- package/dist/{x-file-input-BsaodA0p.js → x-file-input-CMM5DWJc.js} +4 -3
- package/dist/{x-file-input-BsaodA0p.js.map → x-file-input-CMM5DWJc.js.map} +1 -1
- package/dist/{x-form-iQFXj1PW.js → x-form-BLg386BG.js} +2 -2
- package/dist/{x-form-iQFXj1PW.js.map → x-form-BLg386BG.js.map} +1 -1
- package/dist/x-navigation-tree-BW05Yivz.js +502 -0
- package/dist/x-navigation-tree-BW05Yivz.js.map +1 -0
- package/dist/{x-tab-group-ngNByee3.js → x-tab-group-Bp7V46k9.js} +5 -5
- package/dist/{x-tab-group-ngNByee3.js.map → x-tab-group-Bp7V46k9.js.map} +1 -1
- package/dist/x-text-field-BxSiyeFc.js +38 -0
- package/dist/x-text-field-BxSiyeFc.js.map +1 -0
- package/langs/translation-fr.json +4 -1
- package/package.json +13 -13
- package/src/components/vuetifyDesignSystemLoader.ts +5 -0
- package/src/vue/css/style.css +6 -0
- package/src/vue/form/x-checkbox.vue +35 -0
- package/src/vue/form/x-file-input.vue +2 -2
- package/src/vue/form/x-text-field.vue +2 -0
- package/src/vue/x-alert.vue +8 -0
- package/src/vue/x-avatar.vue +9 -9
- package/src/vue/x-dialog.vue +1 -7
- package/src/vue/x-navigation-tree.vue +43 -10
- package/src/vue/x-tab-group.vue +2 -2
- package/src/vue/x-tab-panel.vue +0 -2
- package/dist/index-UP1o6s9t.js.map +0 -1
- package/dist/x-alert-Bmt4mXHQ.js +0 -45
- package/dist/x-alert-Bmt4mXHQ.js.map +0 -1
- package/dist/x-avatar-But_Z7ic.js +0 -20
- package/dist/x-avatar-But_Z7ic.js.map +0 -1
- package/dist/x-dialog-C-dMkFJk.js +0 -49
- package/dist/x-dialog-C-dMkFJk.js.map +0 -1
- package/dist/x-navigation-tree-DN2Qz7Sm.js +0 -501
- package/dist/x-navigation-tree-DN2Qz7Sm.js.map +0 -1
- package/dist/x-text-field-CTsLZhLE.js +0 -31
- package/dist/x-text-field-CTsLZhLE.js.map +0 -1
package/dist/x-alert-Bmt4mXHQ.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, resolveComponent as n, openBlock as t, createBlock as a, withCtx as r, createElementBlock as o, Fragment as m, renderList as u, createTextVNode as _, toDisplayString as s, createCommentVNode as i, renderSlot as k } from "vue";
|
|
2
|
-
const y = { key: 0 }, b = { key: 1 }, v = /* @__PURE__ */ d({
|
|
3
|
-
__name: "x-alert",
|
|
4
|
-
props: {
|
|
5
|
-
title: {},
|
|
6
|
-
type: {},
|
|
7
|
-
description: {},
|
|
8
|
-
actions: {},
|
|
9
|
-
closable: { type: Boolean },
|
|
10
|
-
details: {}
|
|
11
|
-
},
|
|
12
|
-
setup(f) {
|
|
13
|
-
return (e, C) => {
|
|
14
|
-
const p = n("x-btn"), c = n("v-alert");
|
|
15
|
-
return t(), a(c, {
|
|
16
|
-
closable: e.closable,
|
|
17
|
-
title: e.title,
|
|
18
|
-
type: e.type,
|
|
19
|
-
text: e.description
|
|
20
|
-
}, {
|
|
21
|
-
default: r(() => [
|
|
22
|
-
(t(!0), o(m, null, u(e.actions, (l) => (t(), a(p, {
|
|
23
|
-
key: l.name,
|
|
24
|
-
size: "small",
|
|
25
|
-
variant: "text",
|
|
26
|
-
onClick: l.callback
|
|
27
|
-
}, {
|
|
28
|
-
default: r(() => [
|
|
29
|
-
_(s(l.name), 1)
|
|
30
|
-
]),
|
|
31
|
-
_: 2
|
|
32
|
-
}, 1032, ["onClick"]))), 128)),
|
|
33
|
-
e.details ? (t(), o("br", y)) : i("", !0),
|
|
34
|
-
e.details ? (t(), o("small", b, s(e.details), 1)) : i("", !0),
|
|
35
|
-
k(e.$slots, "default")
|
|
36
|
-
]),
|
|
37
|
-
_: 3
|
|
38
|
-
}, 8, ["closable", "title", "type", "text"]);
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
export {
|
|
43
|
-
v as default
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=x-alert-Bmt4mXHQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"x-alert-Bmt4mXHQ.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { resolveComponent as r, openBlock as a, createBlock as o } from "vue";
|
|
2
|
-
import { _ as n } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
const i = {
|
|
4
|
-
props: {
|
|
5
|
-
image: { type: String, required: !0 },
|
|
6
|
-
size: { type: String, required: !0 }
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
function s(c, _, e, m, p, u) {
|
|
10
|
-
const t = r("v-avatar");
|
|
11
|
-
return a(), o(t, {
|
|
12
|
-
image: e.image,
|
|
13
|
-
size: e.size
|
|
14
|
-
}, null, 8, ["image", "size"]);
|
|
15
|
-
}
|
|
16
|
-
const g = /* @__PURE__ */ n(i, [["render", s]]);
|
|
17
|
-
export {
|
|
18
|
-
g as default
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=x-avatar-But_Z7ic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"x-avatar-But_Z7ic.js","sources":["../src/vue/x-avatar.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<template>\n <v-avatar :image=\"image\" :size=\"size\"></v-avatar>\n</template>\n<script lang=\"ts\">\nexport default {\n props: {\n image: { type: String, required: true },\n size: { type: String, required: true },\n },\n};\n</script>\n"],"names":["_sfc_main","_resolveComponent","_openBlock","_createBlock","_component_v_avatar","$props"],"mappings":";;AAuBA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ,UAAU,GAAK;AAAA,IACtC,MAAM,EAAE,MAAM,QAAQ,UAAU,GAAK;AAAA,EAAA;AAEzC;;YAREC,EAAiD,UAAA;SAAjBC,EAAI,GAAAC,EAAAC,GAAA;AAAA,IAAA,OAAAC,EAAA;AAAA;;;;"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineComponent as u, useSlots as m, resolveComponent as o, openBlock as a, createBlock as n, withCtx as e, createElementVNode as v, normalizeProps as f, guardReactiveProps as h, renderSlot as r, createVNode as s, unref as g, createCommentVNode as w } from "vue";
|
|
2
|
-
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
const k = /* @__PURE__ */ u({
|
|
4
|
-
__name: "x-dialog",
|
|
5
|
-
props: {
|
|
6
|
-
title: {},
|
|
7
|
-
width: {}
|
|
8
|
-
},
|
|
9
|
-
setup(x) {
|
|
10
|
-
const d = m();
|
|
11
|
-
return (t, N) => {
|
|
12
|
-
const c = o("v-card-text"), l = o("v-card-actions"), i = o("v-card"), _ = o("v-dialog");
|
|
13
|
-
return a(), n(_, {
|
|
14
|
-
width: t.width,
|
|
15
|
-
scrollable: ""
|
|
16
|
-
}, {
|
|
17
|
-
activator: e(({ props: p }) => [
|
|
18
|
-
v("span", f(h(p)), [
|
|
19
|
-
r(t.$slots, "activator", {}, void 0, !0)
|
|
20
|
-
], 16)
|
|
21
|
-
]),
|
|
22
|
-
default: e(() => [
|
|
23
|
-
s(i, { title: t.title }, {
|
|
24
|
-
default: e(() => [
|
|
25
|
-
s(c, null, {
|
|
26
|
-
default: e(() => [
|
|
27
|
-
r(t.$slots, "default", {}, void 0, !0)
|
|
28
|
-
]),
|
|
29
|
-
_: 3
|
|
30
|
-
}),
|
|
31
|
-
g(d).footer ? (a(), n(l, { key: 0 }, {
|
|
32
|
-
default: e(() => [
|
|
33
|
-
r(t.$slots, "footer", {}, void 0, !0)
|
|
34
|
-
]),
|
|
35
|
-
_: 3
|
|
36
|
-
})) : w("", !0)
|
|
37
|
-
]),
|
|
38
|
-
_: 3
|
|
39
|
-
}, 8, ["title"])
|
|
40
|
-
]),
|
|
41
|
-
_: 3
|
|
42
|
-
}, 8, ["width"]);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}), B = /* @__PURE__ */ C(k, [["__scopeId", "data-v-4640de4f"]]);
|
|
46
|
-
export {
|
|
47
|
-
B as default
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=x-dialog-C-dMkFJk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"x-dialog-C-dMkFJk.js","sources":["../src/vue/x-dialog.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 lang=\"ts\" setup>\nimport { useSlots } from \"vue\";\n\ndefineProps<{\n title: string;\n width: string | number | undefined;\n}>();\n\nconst slots = useSlots();\n\n// const innerIsActive = ref(props.isActive);\n</script>\n\n<template>\n <v-dialog :width=\"width\" scrollable>\n <template #activator=\"{ props }\">\n <span v-bind=\"props\">\n <slot name=\"activator\" />\n </span>\n </template>\n <template #default>\n <v-card :title=\"title\">\n <v-card-text>\n <slot name=\"default\" />\n </v-card-text>\n <v-card-actions v-if=\"slots.footer\">\n <slot name=\"footer\" />\n </v-card-actions>\n </v-card>\n </template>\n </v-dialog>\n</template>\n\n<style scoped>\n:deep(.v-card-actions) {\n padding: var(--cr-spacing-large);\n}\n</style>\n"],"names":["slots","useSlots"],"mappings":";;;;;;;;;AA2BA,UAAMA,IAAQC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,501 +0,0 @@
|
|
|
1
|
-
import { ref as T, computed as P, createVNode as h, mergeProps as _, Fragment as G, inject as W, reactive as Y, withModifiers as H, toRaw as A, toRef as b, provide as Z, defineComponent as ee, onBeforeMount as te, watch as ne, openBlock as B, createBlock as ae, unref as ie, withCtx as le, createElementBlock as $, toDisplayString as R } from "vue";
|
|
2
|
-
import { p as L, o as D, m as oe, g as N, u as F, c as U, d as ce, E as re, I as S, e as de, f as se, h as M, i as ue, j as ve, k as fe, l as he, n as ge, q as me, r as Ie, s as E, t as we, v as pe, w as q } from "./index-UP1o6s9t.js";
|
|
3
|
-
import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
const Ce = L({
|
|
5
|
-
...D(oe({
|
|
6
|
-
collapseIcon: "$treeviewCollapse",
|
|
7
|
-
expandIcon: "$treeviewExpand"
|
|
8
|
-
}), ["subgroup"])
|
|
9
|
-
}, "VTreeviewGroup"), z = N()({
|
|
10
|
-
name: "VTreeviewGroup",
|
|
11
|
-
props: Ce(),
|
|
12
|
-
setup(e, g) {
|
|
13
|
-
let {
|
|
14
|
-
slots: i
|
|
15
|
-
} = g;
|
|
16
|
-
const s = T(), w = P(() => {
|
|
17
|
-
var c;
|
|
18
|
-
return (c = s.value) != null && c.isOpen ? e.collapseIcon : e.expandIcon;
|
|
19
|
-
}), y = P(() => {
|
|
20
|
-
var c;
|
|
21
|
-
return {
|
|
22
|
-
VTreeviewItem: {
|
|
23
|
-
prependIcon: void 0,
|
|
24
|
-
appendIcon: void 0,
|
|
25
|
-
active: (c = s.value) == null ? void 0 : c.isOpen,
|
|
26
|
-
toggleIcon: w.value
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
return F(() => {
|
|
31
|
-
const c = U.filterProps(e);
|
|
32
|
-
return h(U, _(c, {
|
|
33
|
-
ref: s,
|
|
34
|
-
class: ["v-treeview-group", e.class],
|
|
35
|
-
subgroup: !0
|
|
36
|
-
}), {
|
|
37
|
-
...i,
|
|
38
|
-
activator: i.activator ? (u) => h(G, null, [h(ce, {
|
|
39
|
-
defaults: y.value
|
|
40
|
-
}, {
|
|
41
|
-
default: () => {
|
|
42
|
-
var f;
|
|
43
|
-
return [(f = i.activator) == null ? void 0 : f.call(i, u)];
|
|
44
|
-
}
|
|
45
|
-
})]) : void 0
|
|
46
|
-
});
|
|
47
|
-
}), {};
|
|
48
|
-
}
|
|
49
|
-
}), J = Symbol.for("vuetify:v-treeview"), ye = L({
|
|
50
|
-
loading: Boolean,
|
|
51
|
-
onToggleExpand: re(),
|
|
52
|
-
toggleIcon: S,
|
|
53
|
-
...de({
|
|
54
|
-
slim: !0
|
|
55
|
-
})
|
|
56
|
-
}, "VTreeviewItem"), K = N()({
|
|
57
|
-
name: "VTreeviewItem",
|
|
58
|
-
props: ye(),
|
|
59
|
-
setup(e, g) {
|
|
60
|
-
let {
|
|
61
|
-
attrs: i,
|
|
62
|
-
slots: s,
|
|
63
|
-
emit: w
|
|
64
|
-
} = g;
|
|
65
|
-
const y = se(e, i), c = T(), u = P(() => {
|
|
66
|
-
var r, m;
|
|
67
|
-
return ((r = c.value) == null ? void 0 : r.root.activatable.value) && ((m = c.value) == null ? void 0 : m.isGroupActivator);
|
|
68
|
-
}), f = P(() => {
|
|
69
|
-
var r;
|
|
70
|
-
return !e.disabled && e.link !== !1 && (e.link || y.isClickable.value || e.value != null && !!((r = c.value) != null && r.list) || u.value);
|
|
71
|
-
});
|
|
72
|
-
function l(r) {
|
|
73
|
-
var m, k;
|
|
74
|
-
f.value && u.value && ((k = c.value) == null || k.activate(!((m = c.value) != null && m.isActivated), r));
|
|
75
|
-
}
|
|
76
|
-
const p = W(J, {
|
|
77
|
-
visibleIds: T()
|
|
78
|
-
}).visibleIds;
|
|
79
|
-
return F(() => {
|
|
80
|
-
var k, C;
|
|
81
|
-
const r = D(M.filterProps(e), ["onClick"]), m = s.prepend || e.toggleIcon;
|
|
82
|
-
return h(M, _({
|
|
83
|
-
ref: c
|
|
84
|
-
}, r, {
|
|
85
|
-
active: (k = c.value) == null ? void 0 : k.isActivated,
|
|
86
|
-
class: ["v-treeview-item", {
|
|
87
|
-
"v-treeview-item--activatable-group-activator": u.value,
|
|
88
|
-
"v-treeview-item--filtered": p.value && !p.value.has((C = c.value) == null ? void 0 : C.id)
|
|
89
|
-
}, e.class],
|
|
90
|
-
ripple: !1,
|
|
91
|
-
onClick: e.onClick ?? l
|
|
92
|
-
}), {
|
|
93
|
-
...s,
|
|
94
|
-
prepend: m ? (v) => {
|
|
95
|
-
var d;
|
|
96
|
-
return h(G, null, [e.toggleIcon && h(ue, {
|
|
97
|
-
start: !1
|
|
98
|
-
}, {
|
|
99
|
-
default: () => [h(ve, {
|
|
100
|
-
density: "compact",
|
|
101
|
-
icon: e.toggleIcon,
|
|
102
|
-
loading: e.loading,
|
|
103
|
-
variant: "text",
|
|
104
|
-
onClick: e.onToggleExpand
|
|
105
|
-
}, {
|
|
106
|
-
loader() {
|
|
107
|
-
return h(fe, {
|
|
108
|
-
indeterminate: "disable-shrink",
|
|
109
|
-
size: "20",
|
|
110
|
-
width: "2"
|
|
111
|
-
}, null);
|
|
112
|
-
}
|
|
113
|
-
})]
|
|
114
|
-
}), (d = s.prepend) == null ? void 0 : d.call(s, v)]);
|
|
115
|
-
} : void 0
|
|
116
|
-
});
|
|
117
|
-
}), {};
|
|
118
|
-
}
|
|
119
|
-
}), Q = L({
|
|
120
|
-
loadChildren: Function,
|
|
121
|
-
loadingIcon: {
|
|
122
|
-
type: String,
|
|
123
|
-
default: "$loading"
|
|
124
|
-
},
|
|
125
|
-
items: Array,
|
|
126
|
-
openOnClick: {
|
|
127
|
-
type: Boolean,
|
|
128
|
-
default: void 0
|
|
129
|
-
},
|
|
130
|
-
indeterminateIcon: {
|
|
131
|
-
type: S,
|
|
132
|
-
default: "$checkboxIndeterminate"
|
|
133
|
-
},
|
|
134
|
-
falseIcon: S,
|
|
135
|
-
trueIcon: S,
|
|
136
|
-
returnObject: Boolean,
|
|
137
|
-
selectable: Boolean,
|
|
138
|
-
selectedColor: String,
|
|
139
|
-
selectStrategy: [String, Function, Object]
|
|
140
|
-
}, "VTreeviewChildren"), O = N()({
|
|
141
|
-
name: "VTreeviewChildren",
|
|
142
|
-
props: Q(),
|
|
143
|
-
setup(e, g) {
|
|
144
|
-
let {
|
|
145
|
-
slots: i
|
|
146
|
-
} = g;
|
|
147
|
-
const s = Y(/* @__PURE__ */ new Set()), w = P(() => e.openOnClick != null ? e.openOnClick : e.selectable);
|
|
148
|
-
async function y(u) {
|
|
149
|
-
var f, l;
|
|
150
|
-
try {
|
|
151
|
-
if (!((f = e.items) != null && f.length) || !e.loadChildren) return;
|
|
152
|
-
((l = u == null ? void 0 : u.children) == null ? void 0 : l.length) === 0 && (s.add(u.value), await e.loadChildren(u.raw));
|
|
153
|
-
} finally {
|
|
154
|
-
s.delete(u.value);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function c(u, f) {
|
|
158
|
-
e.selectable && u(!f);
|
|
159
|
-
}
|
|
160
|
-
return () => {
|
|
161
|
-
var u, f;
|
|
162
|
-
return ((u = i.default) == null ? void 0 : u.call(i)) ?? ((f = e.items) == null ? void 0 : f.map((l) => {
|
|
163
|
-
var d;
|
|
164
|
-
const {
|
|
165
|
-
children: p,
|
|
166
|
-
props: r
|
|
167
|
-
} = l, m = s.has(l.value), k = {
|
|
168
|
-
prepend: (t) => {
|
|
169
|
-
var n;
|
|
170
|
-
return h(G, null, [e.selectable && (!p || p && !["leaf", "single-leaf"].includes(e.selectStrategy)) && h("div", null, [h(he, {
|
|
171
|
-
key: l.value,
|
|
172
|
-
modelValue: t.isSelected,
|
|
173
|
-
loading: m,
|
|
174
|
-
color: e.selectedColor,
|
|
175
|
-
indeterminate: t.isIndeterminate,
|
|
176
|
-
indeterminateIcon: e.indeterminateIcon,
|
|
177
|
-
falseIcon: e.falseIcon,
|
|
178
|
-
trueIcon: e.trueIcon,
|
|
179
|
-
onClick: H(() => c(t.select, t.isSelected), ["stop"]),
|
|
180
|
-
onKeydown: (a) => {
|
|
181
|
-
["Enter", "Space"].includes(a.key) && (a.stopPropagation(), c(t.select, t.isSelected));
|
|
182
|
-
}
|
|
183
|
-
}, null)]), (n = i.prepend) == null ? void 0 : n.call(i, {
|
|
184
|
-
...t,
|
|
185
|
-
item: l.raw,
|
|
186
|
-
internalItem: l
|
|
187
|
-
})]);
|
|
188
|
-
},
|
|
189
|
-
append: i.append ? (t) => {
|
|
190
|
-
var n;
|
|
191
|
-
return (n = i.append) == null ? void 0 : n.call(i, {
|
|
192
|
-
...t,
|
|
193
|
-
item: l.raw,
|
|
194
|
-
internalItem: l
|
|
195
|
-
});
|
|
196
|
-
} : void 0,
|
|
197
|
-
title: i.title ? (t) => {
|
|
198
|
-
var n;
|
|
199
|
-
return (n = i.title) == null ? void 0 : n.call(i, {
|
|
200
|
-
...t,
|
|
201
|
-
item: l.raw,
|
|
202
|
-
internalItem: l
|
|
203
|
-
});
|
|
204
|
-
} : void 0
|
|
205
|
-
}, C = z.filterProps(r), v = O.filterProps(e);
|
|
206
|
-
return p ? h(z, _(C, {
|
|
207
|
-
value: e.returnObject ? l.raw : C == null ? void 0 : C.value
|
|
208
|
-
}), {
|
|
209
|
-
activator: (t) => {
|
|
210
|
-
let {
|
|
211
|
-
props: n
|
|
212
|
-
} = t;
|
|
213
|
-
const a = {
|
|
214
|
-
...r,
|
|
215
|
-
...n,
|
|
216
|
-
value: r == null ? void 0 : r.value,
|
|
217
|
-
onToggleExpand: [() => y(l), n.onClick],
|
|
218
|
-
onClick: w.value ? [() => y(l), n.onClick] : void 0
|
|
219
|
-
};
|
|
220
|
-
return h(K, _(a, {
|
|
221
|
-
value: e.returnObject ? A(l.raw) : r.value,
|
|
222
|
-
loading: m
|
|
223
|
-
}), k);
|
|
224
|
-
},
|
|
225
|
-
default: () => h(O, _(v, {
|
|
226
|
-
items: p,
|
|
227
|
-
returnObject: e.returnObject
|
|
228
|
-
}), i)
|
|
229
|
-
}) : ((d = i.item) == null ? void 0 : d.call(i, {
|
|
230
|
-
props: r,
|
|
231
|
-
item: l.raw,
|
|
232
|
-
internalItem: l
|
|
233
|
-
})) ?? h(K, _(r, {
|
|
234
|
-
value: e.returnObject ? A(l.raw) : r.value
|
|
235
|
-
}), k);
|
|
236
|
-
}));
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
function X(e) {
|
|
241
|
-
let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
242
|
-
for (const i of e)
|
|
243
|
-
g.push(i), i.children && X(i.children, g);
|
|
244
|
-
return g;
|
|
245
|
-
}
|
|
246
|
-
const be = L({
|
|
247
|
-
openAll: Boolean,
|
|
248
|
-
search: String,
|
|
249
|
-
...ge({
|
|
250
|
-
filterKeys: ["title"]
|
|
251
|
-
}),
|
|
252
|
-
...Q(),
|
|
253
|
-
...D(me({
|
|
254
|
-
collapseIcon: "$treeviewCollapse",
|
|
255
|
-
expandIcon: "$treeviewExpand",
|
|
256
|
-
slim: !0
|
|
257
|
-
}), ["itemType", "nav", "openStrategy"]),
|
|
258
|
-
modelValue: {
|
|
259
|
-
type: Array,
|
|
260
|
-
default: () => []
|
|
261
|
-
}
|
|
262
|
-
}, "VTreeview"), Ve = N()({
|
|
263
|
-
name: "VTreeview",
|
|
264
|
-
props: be(),
|
|
265
|
-
emits: {
|
|
266
|
-
"update:opened": (e) => !0,
|
|
267
|
-
"update:activated": (e) => !0,
|
|
268
|
-
"update:selected": (e) => !0,
|
|
269
|
-
"update:modelValue": (e) => !0,
|
|
270
|
-
"click:open": (e) => !0,
|
|
271
|
-
"click:select": (e) => !0
|
|
272
|
-
},
|
|
273
|
-
setup(e, g) {
|
|
274
|
-
let {
|
|
275
|
-
slots: i
|
|
276
|
-
} = g;
|
|
277
|
-
const {
|
|
278
|
-
items: s
|
|
279
|
-
} = Ie(e), w = b(e, "activeColor"), y = b(e, "baseColor"), c = b(e, "color"), u = E(e, "activated"), f = E(e, "modelValue"), l = E(e, "selected", e.modelValue), p = P({
|
|
280
|
-
get: () => l.value,
|
|
281
|
-
set(a) {
|
|
282
|
-
l.value = a, f.value = a;
|
|
283
|
-
}
|
|
284
|
-
}), r = T(), m = P(() => e.openAll ? n(s.value) : e.opened), k = P(() => X(s.value)), C = b(e, "search"), {
|
|
285
|
-
filteredItems: v
|
|
286
|
-
} = we(e, k, C), d = P(() => {
|
|
287
|
-
var I;
|
|
288
|
-
if (!C.value) return null;
|
|
289
|
-
const a = (I = r.value) == null ? void 0 : I.getPath;
|
|
290
|
-
return a ? new Set(v.value.flatMap((o) => {
|
|
291
|
-
const V = e.returnObject ? o.raw : o.props.value;
|
|
292
|
-
return [...a(V), ...t(V)].map(A);
|
|
293
|
-
})) : null;
|
|
294
|
-
});
|
|
295
|
-
function t(a) {
|
|
296
|
-
var V, x;
|
|
297
|
-
const I = [], o = (((V = r.value) == null ? void 0 : V.children.get(a)) ?? []).slice();
|
|
298
|
-
for (; o.length; ) {
|
|
299
|
-
const j = o.shift();
|
|
300
|
-
j && (I.push(j), o.push(...(((x = r.value) == null ? void 0 : x.children.get(j)) ?? []).slice()));
|
|
301
|
-
}
|
|
302
|
-
return I;
|
|
303
|
-
}
|
|
304
|
-
function n(a) {
|
|
305
|
-
let I = [];
|
|
306
|
-
for (const o of a)
|
|
307
|
-
o.children && (I.push(e.returnObject ? A(o.raw) : o.value), o.children && (I = I.concat(n(o.children))));
|
|
308
|
-
return I;
|
|
309
|
-
}
|
|
310
|
-
return Z(J, {
|
|
311
|
-
visibleIds: d
|
|
312
|
-
}), pe({
|
|
313
|
-
VTreeviewGroup: {
|
|
314
|
-
activeColor: w,
|
|
315
|
-
baseColor: y,
|
|
316
|
-
color: c,
|
|
317
|
-
collapseIcon: b(e, "collapseIcon"),
|
|
318
|
-
expandIcon: b(e, "expandIcon")
|
|
319
|
-
},
|
|
320
|
-
VTreeviewItem: {
|
|
321
|
-
activeClass: b(e, "activeClass"),
|
|
322
|
-
activeColor: w,
|
|
323
|
-
baseColor: y,
|
|
324
|
-
color: c,
|
|
325
|
-
density: b(e, "density"),
|
|
326
|
-
disabled: b(e, "disabled"),
|
|
327
|
-
lines: b(e, "lines"),
|
|
328
|
-
variant: b(e, "variant")
|
|
329
|
-
}
|
|
330
|
-
}), F(() => {
|
|
331
|
-
const a = q.filterProps(e), I = O.filterProps(e);
|
|
332
|
-
return h(q, _({
|
|
333
|
-
ref: r
|
|
334
|
-
}, a, {
|
|
335
|
-
class: ["v-treeview", e.class],
|
|
336
|
-
"open-strategy": "multiple",
|
|
337
|
-
style: e.style,
|
|
338
|
-
opened: m.value,
|
|
339
|
-
activated: u.value,
|
|
340
|
-
"onUpdate:activated": (o) => u.value = o,
|
|
341
|
-
selected: p.value,
|
|
342
|
-
"onUpdate:selected": (o) => p.value = o
|
|
343
|
-
}), {
|
|
344
|
-
default: () => [h(O, _(I, {
|
|
345
|
-
returnObject: e.returnObject,
|
|
346
|
-
items: s.value
|
|
347
|
-
}), i)]
|
|
348
|
-
});
|
|
349
|
-
}), {};
|
|
350
|
-
}
|
|
351
|
-
}), Pe = ["href", "onClick"], Te = ["href"], _e = /* @__PURE__ */ ee({
|
|
352
|
-
__name: "x-navigation-tree",
|
|
353
|
-
props: {
|
|
354
|
-
clickAction: { type: Function },
|
|
355
|
-
currentPage: {}
|
|
356
|
-
},
|
|
357
|
-
setup(e) {
|
|
358
|
-
const g = W("cristal"), i = g.getContainer().get("DocumentService"), s = g.getContainer().get("NavigationTreeSourceProvider").get(), w = T([]), y = T(void 0), c = T(new Array()), u = T(new Array());
|
|
359
|
-
var f = !1;
|
|
360
|
-
const l = e;
|
|
361
|
-
te(async () => {
|
|
362
|
-
for (const v of await s.getChildNodes(""))
|
|
363
|
-
w.value.push({
|
|
364
|
-
id: v.id,
|
|
365
|
-
title: v.label,
|
|
366
|
-
href: v.url,
|
|
367
|
-
children: v.has_children ? [] : void 0,
|
|
368
|
-
_location: v.location
|
|
369
|
-
});
|
|
370
|
-
await p(), i.registerDocumentChangeListener("delete", k), i.registerDocumentChangeListener("update", C);
|
|
371
|
-
}), ne(() => l.currentPage, p);
|
|
372
|
-
async function p() {
|
|
373
|
-
var v;
|
|
374
|
-
if (l.currentPage && !f) {
|
|
375
|
-
f = !0;
|
|
376
|
-
const d = s.getParentNodesId(l.currentPage);
|
|
377
|
-
let t, n = w.value;
|
|
378
|
-
for (t = 0; t < d.length - 1; t++)
|
|
379
|
-
if (n)
|
|
380
|
-
for (const a of n)
|
|
381
|
-
a.id == d[t] && (((v = a.children) == null ? void 0 : v.length) == 0 && await r(a), u.value.includes(a.id) || u.value.push(a.id), n = a.children);
|
|
382
|
-
if (n)
|
|
383
|
-
for (const a of n)
|
|
384
|
-
a.id == d[t] && (c.value = [a.id], l.clickAction && l.clickAction({
|
|
385
|
-
id: a.id,
|
|
386
|
-
label: a.title,
|
|
387
|
-
location: a._location,
|
|
388
|
-
url: a.href,
|
|
389
|
-
has_children: a.children !== void 0
|
|
390
|
-
}));
|
|
391
|
-
f = !1;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
async function r(v) {
|
|
395
|
-
var n;
|
|
396
|
-
const d = v, t = await s.getChildNodes(d.id);
|
|
397
|
-
for (const a of t)
|
|
398
|
-
(n = d.children) == null || n.push({
|
|
399
|
-
id: a.id,
|
|
400
|
-
title: a.label,
|
|
401
|
-
href: a.url,
|
|
402
|
-
children: a.has_children ? [] : void 0,
|
|
403
|
-
_location: a.location
|
|
404
|
-
});
|
|
405
|
-
t.length == 0 && (d.children = void 0);
|
|
406
|
-
}
|
|
407
|
-
function m() {
|
|
408
|
-
c.value.length > 1 && c.value.pop();
|
|
409
|
-
}
|
|
410
|
-
async function k(v) {
|
|
411
|
-
const d = s.getParentNodesId(v);
|
|
412
|
-
let t = w.value;
|
|
413
|
-
for (; t; )
|
|
414
|
-
for (const n of t.keys())
|
|
415
|
-
if (t[n].id == d[0])
|
|
416
|
-
if (d.length == 1) {
|
|
417
|
-
t.splice(n, 1);
|
|
418
|
-
return;
|
|
419
|
-
} else {
|
|
420
|
-
t = t[n].children, d.shift();
|
|
421
|
-
break;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
async function C(v) {
|
|
425
|
-
const d = s.getParentNodesId(v);
|
|
426
|
-
let t, n = w.value, a = !1;
|
|
427
|
-
e: for (; n && !a; ) {
|
|
428
|
-
for (const o of n.keys())
|
|
429
|
-
if (n[o].id == d[0])
|
|
430
|
-
if (d.length == 1) {
|
|
431
|
-
const V = await s.getChildNodes(
|
|
432
|
-
t || ""
|
|
433
|
-
);
|
|
434
|
-
for (const x of V)
|
|
435
|
-
if (x.id == n[o].id) {
|
|
436
|
-
n[o].title = x.label;
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
} else {
|
|
440
|
-
t = n[o].id, n[o].children || (n[o].children = []), n = n[o].children, d.shift();
|
|
441
|
-
continue e;
|
|
442
|
-
}
|
|
443
|
-
a = !0;
|
|
444
|
-
}
|
|
445
|
-
const I = await s.getChildNodes(
|
|
446
|
-
t || ""
|
|
447
|
-
);
|
|
448
|
-
e: for (const o of I) {
|
|
449
|
-
for (const V of n.keys())
|
|
450
|
-
if (o.id == n[V].id)
|
|
451
|
-
continue e;
|
|
452
|
-
n.push({
|
|
453
|
-
id: o.id,
|
|
454
|
-
title: o.label,
|
|
455
|
-
href: o.url,
|
|
456
|
-
children: o.has_children ? [] : void 0,
|
|
457
|
-
_location: o.location
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
return (v, d) => (B(), ae(ie(Ve), {
|
|
462
|
-
ref_key: "tree",
|
|
463
|
-
ref: y,
|
|
464
|
-
opened: u.value,
|
|
465
|
-
"onUpdate:opened": d[0] || (d[0] = (t) => u.value = t),
|
|
466
|
-
density: "compact",
|
|
467
|
-
activated: c.value,
|
|
468
|
-
items: w.value,
|
|
469
|
-
"load-children": r,
|
|
470
|
-
activatable: "",
|
|
471
|
-
"active-strategy": "independent",
|
|
472
|
-
"item-value": "id",
|
|
473
|
-
"open-strategy": "multiple",
|
|
474
|
-
"onUpdate:activated": m
|
|
475
|
-
}, {
|
|
476
|
-
title: le(({ item: t }) => [
|
|
477
|
-
l.clickAction ? (B(), $("a", {
|
|
478
|
-
key: 0,
|
|
479
|
-
href: t.href,
|
|
480
|
-
onClick: H((n) => {
|
|
481
|
-
c.value = [t.id], v.clickAction({
|
|
482
|
-
id: t.id,
|
|
483
|
-
label: t.title,
|
|
484
|
-
location: t._location,
|
|
485
|
-
url: t.href,
|
|
486
|
-
has_children: t.children !== void 0
|
|
487
|
-
});
|
|
488
|
-
}, ["prevent"])
|
|
489
|
-
}, R(t.title), 9, Pe)) : (B(), $("a", {
|
|
490
|
-
key: 1,
|
|
491
|
-
href: t.href
|
|
492
|
-
}, R(t.title), 9, Te))
|
|
493
|
-
]),
|
|
494
|
-
_: 1
|
|
495
|
-
}, 8, ["opened", "activated", "items"]));
|
|
496
|
-
}
|
|
497
|
-
}), Oe = /* @__PURE__ */ ke(_e, [["__scopeId", "data-v-ec2189a9"]]);
|
|
498
|
-
export {
|
|
499
|
-
Oe as default
|
|
500
|
-
};
|
|
501
|
-
//# sourceMappingURL=x-navigation-tree-DN2Qz7Sm.js.map
|