@xwiki/cristal-dsvuetify 0.15.0 → 0.17.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 +32 -0
- package/dist/{index-BAakw3UY.js → index-ptn5-s1m.js} +8120 -7532
- package/dist/index-ptn5-s1m.js.map +1 -0
- package/dist/index.es.js +5 -5
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/vue/form/x-checkbox.vue.d.ts +3 -3
- package/dist/vue/form/x-navigation-tree-select.vue.d.ts +3 -1
- package/dist/vue/x-navigation-tree.vue.d.ts +3 -1
- package/dist/{x-checkbox-Fro597Ax.js → x-checkbox-DkOHWnw9.js} +7 -7
- package/dist/{x-checkbox-Fro597Ax.js.map → x-checkbox-DkOHWnw9.js.map} +1 -1
- package/dist/{x-file-input-CvH0AC3G.js → x-file-input-BI6tqzny.js} +7 -6
- package/dist/{x-file-input-CvH0AC3G.js.map → x-file-input-BI6tqzny.js.map} +1 -1
- package/dist/{x-form-DCHdDC6W.js → x-form-BVMvR_NO.js} +2 -2
- package/dist/{x-form-DCHdDC6W.js.map → x-form-BVMvR_NO.js.map} +1 -1
- package/dist/x-navigation-tree-BsHJIZki.js +543 -0
- package/dist/x-navigation-tree-BsHJIZki.js.map +1 -0
- package/dist/x-navigation-tree-select-B8G-rNmk.js +99 -0
- package/dist/x-navigation-tree-select-B8G-rNmk.js.map +1 -0
- package/dist/{x-tab-group-Bp7V46k9.js → x-tab-group-D1jmHXyJ.js} +2 -2
- package/dist/x-tab-group-D1jmHXyJ.js.map +1 -0
- package/dist/x-text-field-DutyqCkJ.js +45 -0
- package/dist/{x-text-field-2Sv6HUGW.js.map → x-text-field-DutyqCkJ.js.map} +1 -1
- package/package.json +15 -15
- package/src/components/componentsInit.ts +1 -1
- package/src/components/vuetifyDesignSystemLoader.ts +0 -1
- package/src/vue/__tests__/utils/vuetify.ts +0 -1
- package/src/vue/form/x-checkbox.vue +1 -1
- package/src/vue/form/x-navigation-tree-select.vue +6 -1
- package/src/vue/form/x-text-field.vue +1 -0
- package/src/vue/x-navigation-tree.vue +30 -14
- package/src/vue/x-tab-group.vue +2 -2
- package/dist/index-BAakw3UY.js.map +0 -1
- package/dist/x-navigation-tree-D_fUW-gW.js +0 -520
- package/dist/x-navigation-tree-D_fUW-gW.js.map +0 -1
- package/dist/x-navigation-tree-select-DaiYF3ux.js +0 -95
- package/dist/x-navigation-tree-select-DaiYF3ux.js.map +0 -1
- package/dist/x-tab-group-Bp7V46k9.js.map +0 -1
- package/dist/x-text-field-2Sv6HUGW.js +0 -43
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CheckboxProps } from '@xwiki/cristal-dsapi';
|
|
2
2
|
type __VLS_Props = CheckboxProps;
|
|
3
3
|
type __VLS_PublicProps = {
|
|
4
|
-
modelValue?: boolean;
|
|
4
|
+
modelValue?: boolean | null;
|
|
5
5
|
} & __VLS_Props;
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (value: boolean) => any;
|
|
7
|
+
"update:modelValue": (value: boolean | null) => any;
|
|
8
8
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
9
|
+
"onUpdate:modelValue"?: ((value: boolean | null) => any) | undefined;
|
|
10
10
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
export default _default;
|
|
@@ -8,5 +8,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
8
8
|
"update:modelValue": (value: SpaceReference) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
10
|
"onUpdate:modelValue"?: ((value: SpaceReference) => any) | undefined;
|
|
11
|
-
}>, {
|
|
11
|
+
}>, {
|
|
12
|
+
includeTerminals: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
14
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { NavigationTreeProps } from '@xwiki/cristal-dsapi';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<NavigationTreeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NavigationTreeProps> & Readonly<{}>, {
|
|
2
|
+
declare const _default: import('vue').DefineComponent<NavigationTreeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NavigationTreeProps> & Readonly<{}>, {
|
|
3
|
+
includeTerminals: boolean;
|
|
4
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
5
|
export default _default;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as s, mergeModels as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as s, mergeModels as u, useModel as d, openBlock as n, createBlock as t, unref as p } from "vue";
|
|
2
|
+
import { x as r } from "./index-ptn5-s1m.js";
|
|
3
3
|
const V = /* @__PURE__ */ s({
|
|
4
4
|
__name: "x-checkbox",
|
|
5
|
-
props: /* @__PURE__ */
|
|
5
|
+
props: /* @__PURE__ */ u({
|
|
6
6
|
label: {},
|
|
7
7
|
help: {},
|
|
8
8
|
modelValue: { type: Boolean }
|
|
9
9
|
}, {
|
|
10
|
-
modelValue: { type: Boolean },
|
|
10
|
+
modelValue: { type: [Boolean, null] },
|
|
11
11
|
modelModifiers: {}
|
|
12
12
|
}),
|
|
13
13
|
emits: ["update:modelValue"],
|
|
14
14
|
setup(a) {
|
|
15
|
-
const e =
|
|
16
|
-
return (l, o) => (
|
|
15
|
+
const e = d(a, "modelValue");
|
|
16
|
+
return (l, o) => (n(), t(p(r), {
|
|
17
17
|
modelValue: e.value,
|
|
18
18
|
"onUpdate:modelValue": o[0] || (o[0] = (m) => e.value = m),
|
|
19
19
|
label: l.label,
|
|
@@ -25,4 +25,4 @@ const V = /* @__PURE__ */ s({
|
|
|
25
25
|
export {
|
|
26
26
|
V as default
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=x-checkbox-
|
|
28
|
+
//# sourceMappingURL=x-checkbox-DkOHWnw9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-checkbox-
|
|
1
|
+
{"version":3,"file":"x-checkbox-DkOHWnw9.js","sources":["../src/vue/form/x-checkbox.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 { VCheckbox } from \"vuetify/components/VCheckbox\";\nimport type { CheckboxProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<CheckboxProps>();\n\nconst checked = defineModel<boolean | null>();\n</script>\n<template>\n <v-checkbox\n v-model=\"checked\"\n :label=\"label\"\n :messages=\"help\"\n density=\"compact\"\n ></v-checkbox>\n</template>\n"],"names":["checked","_useModel"],"mappings":";;;;;;;;;;;;;;AAyBM,UAAAA,IAAUC,iBAA4B;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as s, mergeModels as m, useModel as
|
|
1
|
+
import { defineComponent as s, mergeModels as m, useModel as p, computed as d, openBlock as i, createBlock as f, unref as c } from "vue";
|
|
2
2
|
import { t as V } from "./translations-k4crOAds.js";
|
|
3
3
|
import { useI18n as y } from "vue-i18n";
|
|
4
|
-
import { b } from "./index-
|
|
4
|
+
import { b } from "./index-ptn5-s1m.js";
|
|
5
5
|
const k = /* @__PURE__ */ s({
|
|
6
6
|
__name: "x-file-input",
|
|
7
7
|
props: /* @__PURE__ */ m({
|
|
@@ -11,7 +11,8 @@ const k = /* @__PURE__ */ s({
|
|
|
11
11
|
autofocus: { type: Boolean },
|
|
12
12
|
modelValue: {},
|
|
13
13
|
help: {},
|
|
14
|
-
readonly: { type: Boolean }
|
|
14
|
+
readonly: { type: Boolean },
|
|
15
|
+
type: {}
|
|
15
16
|
}, {
|
|
16
17
|
modelValue: {},
|
|
17
18
|
modelModifiers: {}
|
|
@@ -20,11 +21,11 @@ const k = /* @__PURE__ */ s({
|
|
|
20
21
|
setup(o) {
|
|
21
22
|
const { t: u } = y({
|
|
22
23
|
messages: V
|
|
23
|
-
}), t =
|
|
24
|
+
}), t = p(o, "modelValue"), a = o, r = d(() => {
|
|
24
25
|
const e = [];
|
|
25
26
|
return a.required && e.push((l) => l ? !0 : u("vuetify.file.input.mandatory")), e;
|
|
26
27
|
});
|
|
27
|
-
return (e, l) => (
|
|
28
|
+
return (e, l) => (i(), f(c(b), {
|
|
28
29
|
modelValue: t.value,
|
|
29
30
|
"onUpdate:modelValue": l[0] || (l[0] = (n) => t.value = n),
|
|
30
31
|
label: e.label,
|
|
@@ -36,4 +37,4 @@ const k = /* @__PURE__ */ s({
|
|
|
36
37
|
export {
|
|
37
38
|
k as default
|
|
38
39
|
};
|
|
39
|
-
//# sourceMappingURL=x-file-input-
|
|
40
|
+
//# sourceMappingURL=x-file-input-BI6tqzny.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-file-input-
|
|
1
|
+
{"version":3,"file":"x-file-input-BI6tqzny.js","sources":["../src/vue/form/x-file-input.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport messages from \"../../translations\";\nimport { computed, defineModel } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VFileInput } from \"vuetify/components/VFileInput\";\nimport type { FileInputModel, TextFieldProps } from \"@xwiki/cristal-dsapi\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst model = defineModel<FileInputModel>();\nconst props = defineProps<TextFieldProps>();\n\nconst rules = computed(() => {\n const rulesList = [];\n if (props.required) {\n rulesList.push((value: unknown) => {\n if (value) {\n return true;\n } else {\n return t(\"vuetify.file.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n\n<template>\n <v-file-input\n v-model=\"model\"\n :label=\"label\"\n :name=\"name\"\n :rules=\"rules\"\n ></v-file-input>\n</template>\n\n<style scoped></style>\n"],"names":["t","useI18n","messages","model","_useModel","props","__props","rules","computed","rulesList","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOM,UAAA,EAAE,GAAAA,EAAE,IAAIC,EAAQ;AAAA,MACpBC,UAAAA;AAAAA,IAAA,CACD,GAEKC,IAAQC,iBAA4B,GACpCC,IAAQC,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAC;AACnB,aAAIJ,EAAM,YACEI,EAAA,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IAAA,CACR;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as m, openBlock as n, createBlock as i, unref as s, withModifiers as f, withCtx as u, renderSlot as a } from "vue";
|
|
2
|
-
import { V as c } from "./index-
|
|
2
|
+
import { V as c } from "./index-ptn5-s1m.js";
|
|
3
3
|
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const p = /* @__PURE__ */ m({
|
|
5
5
|
__name: "x-form",
|
|
@@ -22,4 +22,4 @@ const p = /* @__PURE__ */ m({
|
|
|
22
22
|
export {
|
|
23
23
|
h as default
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=x-form-
|
|
25
|
+
//# sourceMappingURL=x-form-BVMvR_NO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-form-
|
|
1
|
+
{"version":3,"file":"x-form-BVMvR_NO.js","sources":["../src/vue/form/x-form.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { VForm } from \"vuetify/components/VForm\";\nconst emits = defineEmits([\"formSubmit\"]);\nfunction submit() {\n emits(\"formSubmit\");\n}\n</script>\n\n<template>\n <v-form @submit.prevent=\"submit\">\n <slot></slot>\n </v-form>\n</template>\n\n<style scoped>\n.v-form {\n display: flex;\n flex-direction: column;\n gap: var(--cr-spacing-x-small);\n}\n</style>\n"],"names":["emits","__emit","submit"],"mappings":";;;;;;;AAEA,UAAMA,IAAQC;AACd,aAASC,IAAS;AAChB,MAAAF,EAAM,YAAY;AAAA,IAAA;;;;;;;;;;;"}
|
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
import { ref as S, computed as V, createVNode as p, mergeProps as T, Fragment as R, inject as H, toRaw as O, reactive as Z, withModifiers as J, toRef as _, provide as ee, defineComponent as te, mergeDefaults as ne, onBeforeMount as ie, watch as le, openBlock as D, createBlock as ae, unref as re, withCtx as ce, createElementBlock as $, toDisplayString as U } from "vue";
|
|
2
|
+
import { p as N, o as G, m as oe, g as B, u as F, c as M, d as de, I as A, e as se, f as q, h as ue, i as ve, j as fe, k as he, l as me, n as ge, q as Ie, r as we, s as j, t as pe, v as be, w as z } from "./index-ptn5-s1m.js";
|
|
3
|
+
import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const Ce = {
|
|
5
|
+
includeTerminals: !0
|
|
6
|
+
}, ye = N({
|
|
7
|
+
...G(oe({
|
|
8
|
+
collapseIcon: "$treeviewCollapse",
|
|
9
|
+
expandIcon: "$treeviewExpand"
|
|
10
|
+
}), ["subgroup"])
|
|
11
|
+
}, "VTreeviewGroup"), K = B()({
|
|
12
|
+
name: "VTreeviewGroup",
|
|
13
|
+
props: ye(),
|
|
14
|
+
setup(e, C) {
|
|
15
|
+
let {
|
|
16
|
+
slots: l
|
|
17
|
+
} = C;
|
|
18
|
+
const h = S(), k = V(() => {
|
|
19
|
+
var s;
|
|
20
|
+
return (s = h.value) != null && s.isOpen ? e.collapseIcon : e.expandIcon;
|
|
21
|
+
}), d = V(() => {
|
|
22
|
+
var s;
|
|
23
|
+
return {
|
|
24
|
+
VTreeviewItem: {
|
|
25
|
+
prependIcon: void 0,
|
|
26
|
+
appendIcon: void 0,
|
|
27
|
+
active: (s = h.value) == null ? void 0 : s.isOpen,
|
|
28
|
+
toggleIcon: k.value
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
return F(() => {
|
|
33
|
+
const s = M.filterProps(e);
|
|
34
|
+
return p(M, T(s, {
|
|
35
|
+
ref: h,
|
|
36
|
+
class: ["v-treeview-group", e.class],
|
|
37
|
+
subgroup: !0
|
|
38
|
+
}), {
|
|
39
|
+
...l,
|
|
40
|
+
activator: l.activator ? (u) => p(R, null, [p(de, {
|
|
41
|
+
defaults: d.value
|
|
42
|
+
}, {
|
|
43
|
+
default: () => {
|
|
44
|
+
var c;
|
|
45
|
+
return [(c = l.activator) == null ? void 0 : c.call(l, u)];
|
|
46
|
+
}
|
|
47
|
+
})]) : void 0
|
|
48
|
+
});
|
|
49
|
+
}), {};
|
|
50
|
+
}
|
|
51
|
+
}), Q = Symbol.for("vuetify:v-treeview"), _e = N({
|
|
52
|
+
loading: Boolean,
|
|
53
|
+
toggleIcon: A,
|
|
54
|
+
...se({
|
|
55
|
+
slim: !0
|
|
56
|
+
})
|
|
57
|
+
}, "VTreeviewItem"), W = B()({
|
|
58
|
+
name: "VTreeviewItem",
|
|
59
|
+
props: _e(),
|
|
60
|
+
emits: {
|
|
61
|
+
toggleExpand: (e) => !0
|
|
62
|
+
},
|
|
63
|
+
setup(e, C) {
|
|
64
|
+
let {
|
|
65
|
+
slots: l,
|
|
66
|
+
emit: h
|
|
67
|
+
} = C;
|
|
68
|
+
const k = H(Q, {
|
|
69
|
+
visibleIds: S()
|
|
70
|
+
}).visibleIds, d = S(), s = V(() => {
|
|
71
|
+
var v, b;
|
|
72
|
+
return ((v = d.value) == null ? void 0 : v.root.activatable.value) && ((b = d.value) == null ? void 0 : b.isGroupActivator);
|
|
73
|
+
}), u = V(() => {
|
|
74
|
+
var v, b;
|
|
75
|
+
return ((v = d.value) == null ? void 0 : v.link.isClickable.value) || e.value != null && !!((b = d.value) != null && b.list);
|
|
76
|
+
}), c = V(() => !e.disabled && e.link !== !1 && (e.link || u.value || s.value)), a = V(() => {
|
|
77
|
+
var v;
|
|
78
|
+
return k.value && !k.value.has(O((v = d.value) == null ? void 0 : v.id));
|
|
79
|
+
});
|
|
80
|
+
function y(v) {
|
|
81
|
+
var b, I;
|
|
82
|
+
c.value && s.value && ((I = d.value) == null || I.activate(!((b = d.value) != null && b.isActivated), v));
|
|
83
|
+
}
|
|
84
|
+
function g(v) {
|
|
85
|
+
v.preventDefault(), h("toggleExpand", v);
|
|
86
|
+
}
|
|
87
|
+
return F(() => {
|
|
88
|
+
var I;
|
|
89
|
+
const v = G(q.filterProps(e), ["onClick"]), b = l.prepend || e.toggleIcon;
|
|
90
|
+
return p(q, T({
|
|
91
|
+
ref: d
|
|
92
|
+
}, v, {
|
|
93
|
+
active: (I = d.value) == null ? void 0 : I.isActivated,
|
|
94
|
+
class: ["v-treeview-item", {
|
|
95
|
+
"v-treeview-item--activatable-group-activator": s.value,
|
|
96
|
+
"v-treeview-item--filtered": a.value
|
|
97
|
+
}, e.class],
|
|
98
|
+
ripple: !1,
|
|
99
|
+
onClick: e.onClick ?? y
|
|
100
|
+
}), {
|
|
101
|
+
...l,
|
|
102
|
+
prepend: b ? (o) => {
|
|
103
|
+
var r;
|
|
104
|
+
return p(R, null, [p(ue, {
|
|
105
|
+
start: !1
|
|
106
|
+
}, {
|
|
107
|
+
default: () => [e.toggleIcon ? p(ve, {
|
|
108
|
+
density: "compact",
|
|
109
|
+
icon: e.toggleIcon,
|
|
110
|
+
loading: e.loading,
|
|
111
|
+
variant: "text",
|
|
112
|
+
onClick: g
|
|
113
|
+
}, {
|
|
114
|
+
loader() {
|
|
115
|
+
return p(fe, {
|
|
116
|
+
indeterminate: "disable-shrink",
|
|
117
|
+
size: "20",
|
|
118
|
+
width: "2"
|
|
119
|
+
}, null);
|
|
120
|
+
}
|
|
121
|
+
}) : p("div", {
|
|
122
|
+
class: "v-treeview-item__level"
|
|
123
|
+
}, null)]
|
|
124
|
+
}), (r = l.prepend) == null ? void 0 : r.call(l, o)]);
|
|
125
|
+
} : void 0
|
|
126
|
+
});
|
|
127
|
+
}), {};
|
|
128
|
+
}
|
|
129
|
+
}), X = N({
|
|
130
|
+
disabled: Boolean,
|
|
131
|
+
loadChildren: Function,
|
|
132
|
+
loadingIcon: {
|
|
133
|
+
type: String,
|
|
134
|
+
default: "$loading"
|
|
135
|
+
},
|
|
136
|
+
items: Array,
|
|
137
|
+
openOnClick: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: void 0
|
|
140
|
+
},
|
|
141
|
+
indeterminateIcon: {
|
|
142
|
+
type: A,
|
|
143
|
+
default: "$checkboxIndeterminate"
|
|
144
|
+
},
|
|
145
|
+
falseIcon: A,
|
|
146
|
+
trueIcon: A,
|
|
147
|
+
returnObject: Boolean,
|
|
148
|
+
selectable: Boolean,
|
|
149
|
+
selectedColor: String,
|
|
150
|
+
selectStrategy: [String, Function, Object],
|
|
151
|
+
...he()
|
|
152
|
+
}, "VTreeviewChildren"), L = B()({
|
|
153
|
+
name: "VTreeviewChildren",
|
|
154
|
+
props: X(),
|
|
155
|
+
setup(e, C) {
|
|
156
|
+
let {
|
|
157
|
+
slots: l
|
|
158
|
+
} = C;
|
|
159
|
+
const h = Z(/* @__PURE__ */ new Set()), k = V(() => !e.disabled && (e.openOnClick != null ? e.openOnClick : e.selectable));
|
|
160
|
+
async function d(u) {
|
|
161
|
+
var c, a;
|
|
162
|
+
try {
|
|
163
|
+
if (!((c = e.items) != null && c.length) || !e.loadChildren) return;
|
|
164
|
+
((a = u == null ? void 0 : u.children) == null ? void 0 : a.length) === 0 && (h.add(u.value), await e.loadChildren(u.raw));
|
|
165
|
+
} finally {
|
|
166
|
+
h.delete(u.value);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function s(u, c) {
|
|
170
|
+
e.selectable && u(!c);
|
|
171
|
+
}
|
|
172
|
+
return () => {
|
|
173
|
+
var u, c;
|
|
174
|
+
return ((u = l.default) == null ? void 0 : u.call(l)) ?? ((c = e.items) == null ? void 0 : c.map((a) => {
|
|
175
|
+
var r;
|
|
176
|
+
const {
|
|
177
|
+
children: y,
|
|
178
|
+
props: g
|
|
179
|
+
} = a, v = h.has(a.value), b = {
|
|
180
|
+
prepend: (t) => {
|
|
181
|
+
var n;
|
|
182
|
+
return p(R, null, [e.selectable && (!y || y && !["leaf", "single-leaf"].includes(e.selectStrategy)) && p("div", null, [p(me, {
|
|
183
|
+
key: a.value,
|
|
184
|
+
modelValue: t.isSelected,
|
|
185
|
+
disabled: e.disabled,
|
|
186
|
+
loading: v,
|
|
187
|
+
color: e.selectedColor,
|
|
188
|
+
density: e.density,
|
|
189
|
+
indeterminate: t.isIndeterminate,
|
|
190
|
+
indeterminateIcon: e.indeterminateIcon,
|
|
191
|
+
falseIcon: e.falseIcon,
|
|
192
|
+
trueIcon: e.trueIcon,
|
|
193
|
+
onClick: J(() => s(t.select, t.isSelected), ["stop"]),
|
|
194
|
+
onKeydown: (i) => {
|
|
195
|
+
["Enter", "Space"].includes(i.key) && (i.stopPropagation(), s(t.select, t.isSelected));
|
|
196
|
+
}
|
|
197
|
+
}, null)]), (n = l.prepend) == null ? void 0 : n.call(l, {
|
|
198
|
+
...t,
|
|
199
|
+
item: a.raw,
|
|
200
|
+
internalItem: a
|
|
201
|
+
})]);
|
|
202
|
+
},
|
|
203
|
+
append: l.append ? (t) => {
|
|
204
|
+
var n;
|
|
205
|
+
return (n = l.append) == null ? void 0 : n.call(l, {
|
|
206
|
+
...t,
|
|
207
|
+
item: a.raw,
|
|
208
|
+
internalItem: a
|
|
209
|
+
});
|
|
210
|
+
} : void 0,
|
|
211
|
+
title: l.title ? (t) => {
|
|
212
|
+
var n;
|
|
213
|
+
return (n = l.title) == null ? void 0 : n.call(l, {
|
|
214
|
+
...t,
|
|
215
|
+
item: a.raw,
|
|
216
|
+
internalItem: a
|
|
217
|
+
});
|
|
218
|
+
} : void 0,
|
|
219
|
+
subtitle: l.subtitle ? (t) => {
|
|
220
|
+
var n;
|
|
221
|
+
return (n = l.subtitle) == null ? void 0 : n.call(l, {
|
|
222
|
+
...t,
|
|
223
|
+
item: a.raw,
|
|
224
|
+
internalItem: a
|
|
225
|
+
});
|
|
226
|
+
} : void 0
|
|
227
|
+
}, I = K.filterProps(g), o = L.filterProps(e);
|
|
228
|
+
return y ? p(K, T(I, {
|
|
229
|
+
value: e.returnObject ? a.raw : I == null ? void 0 : I.value
|
|
230
|
+
}), {
|
|
231
|
+
activator: (t) => {
|
|
232
|
+
let {
|
|
233
|
+
props: n
|
|
234
|
+
} = t;
|
|
235
|
+
const i = {
|
|
236
|
+
...g,
|
|
237
|
+
...n,
|
|
238
|
+
value: g == null ? void 0 : g.value,
|
|
239
|
+
onToggleExpand: [() => d(a), n.onClick],
|
|
240
|
+
onClick: k.value ? [() => d(a), n.onClick] : void 0
|
|
241
|
+
};
|
|
242
|
+
return p(W, T(i, {
|
|
243
|
+
value: e.returnObject ? a.raw : g.value,
|
|
244
|
+
loading: v
|
|
245
|
+
}), b);
|
|
246
|
+
},
|
|
247
|
+
default: () => p(L, T(o, {
|
|
248
|
+
items: y,
|
|
249
|
+
returnObject: e.returnObject
|
|
250
|
+
}), l)
|
|
251
|
+
}) : ((r = l.item) == null ? void 0 : r.call(l, {
|
|
252
|
+
props: g,
|
|
253
|
+
item: a.raw,
|
|
254
|
+
internalItem: a
|
|
255
|
+
})) ?? p(W, T(g, {
|
|
256
|
+
value: e.returnObject ? O(a.raw) : g.value
|
|
257
|
+
}), b);
|
|
258
|
+
}));
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
function Y(e) {
|
|
263
|
+
let C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
264
|
+
for (const l of e)
|
|
265
|
+
C.push(l), l.children && Y(l.children, C);
|
|
266
|
+
return C;
|
|
267
|
+
}
|
|
268
|
+
const Ve = N({
|
|
269
|
+
fluid: Boolean,
|
|
270
|
+
openAll: Boolean,
|
|
271
|
+
search: String,
|
|
272
|
+
...ge({
|
|
273
|
+
filterKeys: ["title"]
|
|
274
|
+
}),
|
|
275
|
+
...X(),
|
|
276
|
+
...G(Ie({
|
|
277
|
+
collapseIcon: "$treeviewCollapse",
|
|
278
|
+
expandIcon: "$treeviewExpand",
|
|
279
|
+
slim: !0
|
|
280
|
+
}), ["itemType", "nav", "openStrategy"]),
|
|
281
|
+
modelValue: {
|
|
282
|
+
type: Array,
|
|
283
|
+
default: () => []
|
|
284
|
+
}
|
|
285
|
+
}, "VTreeview"), Pe = B()({
|
|
286
|
+
name: "VTreeview",
|
|
287
|
+
props: Ve(),
|
|
288
|
+
emits: {
|
|
289
|
+
"update:opened": (e) => !0,
|
|
290
|
+
"update:activated": (e) => !0,
|
|
291
|
+
"update:selected": (e) => !0,
|
|
292
|
+
"update:modelValue": (e) => !0,
|
|
293
|
+
"click:open": (e) => !0,
|
|
294
|
+
"click:select": (e) => !0
|
|
295
|
+
},
|
|
296
|
+
setup(e, C) {
|
|
297
|
+
let {
|
|
298
|
+
slots: l
|
|
299
|
+
} = C;
|
|
300
|
+
const {
|
|
301
|
+
items: h
|
|
302
|
+
} = we(e), k = _(e, "activeColor"), d = _(e, "baseColor"), s = _(e, "color"), u = j(e, "activated"), c = j(e, "modelValue"), a = j(e, "selected", e.modelValue), y = V({
|
|
303
|
+
get: () => a.value,
|
|
304
|
+
set(i) {
|
|
305
|
+
a.value = i, c.value = i;
|
|
306
|
+
}
|
|
307
|
+
}), g = S(), v = V(() => e.openAll ? n(h.value) : e.opened), b = V(() => Y(h.value)), I = _(e, "search"), {
|
|
308
|
+
filteredItems: o
|
|
309
|
+
} = pe(e, b, I), r = V(() => {
|
|
310
|
+
var m;
|
|
311
|
+
if (!I.value) return null;
|
|
312
|
+
const i = (m = g.value) == null ? void 0 : m.getPath;
|
|
313
|
+
return i ? new Set(o.value.flatMap((w) => {
|
|
314
|
+
const P = e.returnObject ? w.raw : w.props.value;
|
|
315
|
+
return [...i(P), ...t(P)].map(O);
|
|
316
|
+
})) : null;
|
|
317
|
+
});
|
|
318
|
+
function t(i) {
|
|
319
|
+
var P, f;
|
|
320
|
+
const m = [], w = (((P = g.value) == null ? void 0 : P.children.get(i)) ?? []).slice();
|
|
321
|
+
for (; w.length; ) {
|
|
322
|
+
const x = w.shift();
|
|
323
|
+
x && (m.push(x), w.push(...(((f = g.value) == null ? void 0 : f.children.get(x)) ?? []).slice()));
|
|
324
|
+
}
|
|
325
|
+
return m;
|
|
326
|
+
}
|
|
327
|
+
function n(i) {
|
|
328
|
+
let m = [];
|
|
329
|
+
for (const w of i)
|
|
330
|
+
w.children && (m.push(e.returnObject ? O(w.raw) : w.value), w.children && (m = m.concat(n(w.children))));
|
|
331
|
+
return m;
|
|
332
|
+
}
|
|
333
|
+
return ee(Q, {
|
|
334
|
+
visibleIds: r
|
|
335
|
+
}), be({
|
|
336
|
+
VTreeviewGroup: {
|
|
337
|
+
activeColor: k,
|
|
338
|
+
baseColor: d,
|
|
339
|
+
color: s,
|
|
340
|
+
collapseIcon: _(e, "collapseIcon"),
|
|
341
|
+
expandIcon: _(e, "expandIcon")
|
|
342
|
+
},
|
|
343
|
+
VTreeviewItem: {
|
|
344
|
+
activeClass: _(e, "activeClass"),
|
|
345
|
+
activeColor: k,
|
|
346
|
+
baseColor: d,
|
|
347
|
+
color: s,
|
|
348
|
+
density: _(e, "density"),
|
|
349
|
+
disabled: _(e, "disabled"),
|
|
350
|
+
lines: _(e, "lines"),
|
|
351
|
+
variant: _(e, "variant")
|
|
352
|
+
}
|
|
353
|
+
}), F(() => {
|
|
354
|
+
const i = z.filterProps(e), m = L.filterProps(e);
|
|
355
|
+
return p(z, T({
|
|
356
|
+
ref: g
|
|
357
|
+
}, i, {
|
|
358
|
+
class: ["v-treeview", {
|
|
359
|
+
"v-treeview--fluid": e.fluid
|
|
360
|
+
}, e.class],
|
|
361
|
+
"open-strategy": "multiple",
|
|
362
|
+
style: e.style,
|
|
363
|
+
opened: v.value,
|
|
364
|
+
activated: u.value,
|
|
365
|
+
"onUpdate:activated": (w) => u.value = w,
|
|
366
|
+
selected: y.value,
|
|
367
|
+
"onUpdate:selected": (w) => y.value = w
|
|
368
|
+
}), {
|
|
369
|
+
default: () => [p(L, T(m, {
|
|
370
|
+
density: e.density,
|
|
371
|
+
returnObject: e.returnObject,
|
|
372
|
+
items: h.value
|
|
373
|
+
}), l)]
|
|
374
|
+
});
|
|
375
|
+
}), {};
|
|
376
|
+
}
|
|
377
|
+
}), Te = ["href", "onClick"], xe = ["href"], Se = /* @__PURE__ */ te({
|
|
378
|
+
__name: "x-navigation-tree",
|
|
379
|
+
props: /* @__PURE__ */ ne({
|
|
380
|
+
clickAction: { type: Function },
|
|
381
|
+
currentPageReference: {},
|
|
382
|
+
includeTerminals: { type: Boolean }
|
|
383
|
+
}, Ce),
|
|
384
|
+
setup(e) {
|
|
385
|
+
const C = H("cristal"), l = C.getContainer().get("DocumentService"), h = C.getContainer().get("NavigationTreeSourceProvider").get(), k = S([]), d = S(new Array()), s = S([]);
|
|
386
|
+
var u = !1;
|
|
387
|
+
const c = e;
|
|
388
|
+
ie(async () => {
|
|
389
|
+
for (const o of await I(""))
|
|
390
|
+
k.value.push({
|
|
391
|
+
id: o.id,
|
|
392
|
+
title: o.label,
|
|
393
|
+
href: o.url,
|
|
394
|
+
children: o.has_children ? [] : void 0,
|
|
395
|
+
_location: o.location,
|
|
396
|
+
_is_terminal: o.is_terminal
|
|
397
|
+
});
|
|
398
|
+
await a(), l.registerDocumentChangeListener("delete", v), l.registerDocumentChangeListener("update", b);
|
|
399
|
+
}), le(() => c.currentPageReference, a);
|
|
400
|
+
async function a() {
|
|
401
|
+
var o;
|
|
402
|
+
if (c.currentPageReference && !u) {
|
|
403
|
+
u = !0;
|
|
404
|
+
const r = h.getParentNodesId(
|
|
405
|
+
c.currentPageReference,
|
|
406
|
+
c.includeTerminals
|
|
407
|
+
);
|
|
408
|
+
let t, n = k.value;
|
|
409
|
+
for (t = 0; t < r.length - 1; t++)
|
|
410
|
+
if (n)
|
|
411
|
+
for (const i of n)
|
|
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
|
+
if (n)
|
|
414
|
+
for (const i of n)
|
|
415
|
+
i.id == r[t] && (d.value = [i.id], c.clickAction && c.clickAction({
|
|
416
|
+
id: i.id,
|
|
417
|
+
label: i.title,
|
|
418
|
+
location: i._location,
|
|
419
|
+
url: i.href,
|
|
420
|
+
has_children: i.children !== void 0,
|
|
421
|
+
is_terminal: i._is_terminal
|
|
422
|
+
}));
|
|
423
|
+
u = !1;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
async function y(o) {
|
|
427
|
+
var n;
|
|
428
|
+
const r = o, t = await I(r.id);
|
|
429
|
+
for (const i of t)
|
|
430
|
+
(n = r.children) == null || n.push({
|
|
431
|
+
id: i.id,
|
|
432
|
+
title: i.label,
|
|
433
|
+
href: i.url,
|
|
434
|
+
children: i.has_children ? [] : void 0,
|
|
435
|
+
_location: i.location,
|
|
436
|
+
_is_terminal: i.is_terminal
|
|
437
|
+
});
|
|
438
|
+
t.length == 0 && (r.children = void 0);
|
|
439
|
+
}
|
|
440
|
+
function g() {
|
|
441
|
+
d.value.length > 1 && d.value.pop();
|
|
442
|
+
}
|
|
443
|
+
async function v(o) {
|
|
444
|
+
const r = h.getParentNodesId(o, c.includeTerminals);
|
|
445
|
+
let t, n = k.value, i = !1;
|
|
446
|
+
e: for (; n && !i; ) {
|
|
447
|
+
for (const m of n.keys())
|
|
448
|
+
if (n[m].id == r[0])
|
|
449
|
+
if (r.length == 1) {
|
|
450
|
+
n.splice(m, 1), t && n.length == 0 && (t.children = void 0);
|
|
451
|
+
return;
|
|
452
|
+
} else {
|
|
453
|
+
t = n[m], n = t.children, r.shift();
|
|
454
|
+
continue e;
|
|
455
|
+
}
|
|
456
|
+
i = !0;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
async function b(o) {
|
|
460
|
+
const r = h.getParentNodesId(o, c.includeTerminals);
|
|
461
|
+
let t, n = k.value, i = !1, m = !0;
|
|
462
|
+
e: for (; n && !i; ) {
|
|
463
|
+
for (const f of n.keys())
|
|
464
|
+
if (n[f].id == r[0])
|
|
465
|
+
if (r.length == 1) {
|
|
466
|
+
const x = await I(
|
|
467
|
+
t || ""
|
|
468
|
+
);
|
|
469
|
+
for (const E of x)
|
|
470
|
+
if (E.id == n[f].id) {
|
|
471
|
+
n[f].title = E.label;
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
} else {
|
|
475
|
+
t = n[f].id, n[f].children || (n[f].children = []), n = n[f].children, r.shift(), m = !1;
|
|
476
|
+
continue e;
|
|
477
|
+
}
|
|
478
|
+
i = !0;
|
|
479
|
+
}
|
|
480
|
+
if (n.length == 0 && !m)
|
|
481
|
+
return;
|
|
482
|
+
const w = await I(t || ""), P = h.getParentNodesId(
|
|
483
|
+
c.currentPageReference,
|
|
484
|
+
c.includeTerminals
|
|
485
|
+
);
|
|
486
|
+
e: for (const f of w) {
|
|
487
|
+
for (const x of n.keys())
|
|
488
|
+
if (f.id == n[x].id)
|
|
489
|
+
continue e;
|
|
490
|
+
n.push({
|
|
491
|
+
id: f.id,
|
|
492
|
+
title: f.label,
|
|
493
|
+
href: f.url,
|
|
494
|
+
children: f.has_children ? [] : void 0,
|
|
495
|
+
_location: f.location,
|
|
496
|
+
_is_terminal: f.is_terminal
|
|
497
|
+
}), P.length > 0 && P[P.length - 1] === f.id && (d.value = [f.id]);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
async function I(o) {
|
|
501
|
+
return (await h.getChildNodes(o)).filter(
|
|
502
|
+
(r) => c.includeTerminals || !r.is_terminal
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
return (o, r) => (D(), ae(re(Pe), {
|
|
506
|
+
opened: s.value,
|
|
507
|
+
"onUpdate:opened": r[0] || (r[0] = (t) => s.value = t),
|
|
508
|
+
density: "compact",
|
|
509
|
+
activated: d.value,
|
|
510
|
+
items: k.value,
|
|
511
|
+
"load-children": y,
|
|
512
|
+
activatable: "",
|
|
513
|
+
"active-strategy": "independent",
|
|
514
|
+
"item-value": "id",
|
|
515
|
+
"onUpdate:activated": g
|
|
516
|
+
}, {
|
|
517
|
+
title: ce(({ item: t }) => [
|
|
518
|
+
c.clickAction ? (D(), $("a", {
|
|
519
|
+
key: 0,
|
|
520
|
+
href: t.href,
|
|
521
|
+
onClick: J((n) => {
|
|
522
|
+
d.value = [t.id], o.clickAction({
|
|
523
|
+
id: t.id,
|
|
524
|
+
label: t.title,
|
|
525
|
+
location: t._location,
|
|
526
|
+
url: t.href,
|
|
527
|
+
has_children: t.children !== void 0,
|
|
528
|
+
is_terminal: t._is_terminal
|
|
529
|
+
});
|
|
530
|
+
}, ["prevent"])
|
|
531
|
+
}, U(t.title), 9, Te)) : (D(), $("a", {
|
|
532
|
+
key: 1,
|
|
533
|
+
href: t.href
|
|
534
|
+
}, U(t.title), 9, xe))
|
|
535
|
+
]),
|
|
536
|
+
_: 1
|
|
537
|
+
}, 8, ["opened", "activated", "items"]));
|
|
538
|
+
}
|
|
539
|
+
}), Ne = /* @__PURE__ */ ke(Se, [["__scopeId", "data-v-515dbad6"]]);
|
|
540
|
+
export {
|
|
541
|
+
Ne as default
|
|
542
|
+
};
|
|
543
|
+
//# sourceMappingURL=x-navigation-tree-BsHJIZki.js.map
|