@xwiki/cristal-dsvuetify 1.0.0 → 1.1.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/dist/{index-CkeFEgm6.js → index-5yb_QWW0.js} +1945 -1941
- package/dist/index-5yb_QWW0.js.map +1 -0
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/{x-alert-C1NRkhdt.js → x-alert-ChVriu6T.js} +7 -7
- package/dist/{x-alert-C1NRkhdt.js.map → x-alert-ChVriu6T.js.map} +1 -1
- package/dist/{x-avatar-B5IoAQPQ.js → x-avatar-CSobfWTk.js} +2 -2
- package/dist/{x-avatar-B5IoAQPQ.js.map → x-avatar-CSobfWTk.js.map} +1 -1
- package/dist/{x-breadcrumb-DaJw0U-E.js → x-breadcrumb-GmZWw0HG.js} +3 -3
- package/dist/{x-breadcrumb-DaJw0U-E.js.map → x-breadcrumb-GmZWw0HG.js.map} +1 -1
- package/dist/{x-btn-DzH2bk-f.js → x-btn-BsiSIiiO.js} +3 -3
- package/dist/{x-btn-DzH2bk-f.js.map → x-btn-BsiSIiiO.js.map} +1 -1
- package/dist/{x-card-BlUD5hbt.js → x-card-CRM9KUby.js} +3 -3
- package/dist/{x-card-BlUD5hbt.js.map → x-card-CRM9KUby.js.map} +1 -1
- package/dist/{x-checkbox-CxPnLGd0.js → x-checkbox-vREi3-wS.js} +6 -6
- package/dist/{x-checkbox-CxPnLGd0.js.map → x-checkbox-vREi3-wS.js.map} +1 -1
- package/dist/{x-dialog-C3nQDBym.js → x-dialog-4cFJfisB.js} +4 -4
- package/dist/{x-dialog-C3nQDBym.js.map → x-dialog-4cFJfisB.js.map} +1 -1
- package/dist/{x-divider-BOCxsH8h.js → x-divider-Buudf0KI.js} +3 -3
- package/dist/{x-divider-BOCxsH8h.js.map → x-divider-Buudf0KI.js.map} +1 -1
- package/dist/{x-file-input-CEz4Wmf4.js → x-file-input-f35OKy3m.js} +6 -6
- package/dist/{x-file-input-CEz4Wmf4.js.map → x-file-input-f35OKy3m.js.map} +1 -1
- package/dist/{x-form-SvpVocOb.js → x-form-ClKnXXd0.js} +4 -4
- package/dist/{x-form-SvpVocOb.js.map → x-form-ClKnXXd0.js.map} +1 -1
- package/dist/{x-img-DWbVDNTs.js → x-img-BYgs_O1F.js} +3 -3
- package/dist/{x-img-DWbVDNTs.js.map → x-img-BYgs_O1F.js.map} +1 -1
- package/dist/x-load-DipiCmNY.js +11 -0
- package/dist/{x-load-Bw4ftl3k.js.map → x-load-DipiCmNY.js.map} +1 -1
- package/dist/{x-menu-DUp-JvdG.js → x-menu-Dvd5JVz3.js} +3 -3
- package/dist/{x-menu-DUp-JvdG.js.map → x-menu-Dvd5JVz3.js.map} +1 -1
- package/dist/{x-menu-item-Ph5-wwcR.js → x-menu-item-C1ntozOO.js} +3 -3
- package/dist/{x-menu-item-Ph5-wwcR.js.map → x-menu-item-C1ntozOO.js.map} +1 -1
- package/dist/{x-menu-label-D-sFcG_g.js → x-menu-label-DniImc0U.js} +3 -3
- package/dist/{x-menu-label-D-sFcG_g.js.map → x-menu-label-DniImc0U.js.map} +1 -1
- package/dist/{x-search-C7GhoCKj.js → x-search-C4yZLrSp.js} +3 -3
- package/dist/{x-search-C7GhoCKj.js.map → x-search-C4yZLrSp.js.map} +1 -1
- package/dist/{x-select-BduzHCet.js → x-select-B-9ebdG3.js} +7 -7
- package/dist/{x-select-BduzHCet.js.map → x-select-B-9ebdG3.js.map} +1 -1
- package/dist/{x-tab-B8YFmNK2.js → x-tab-D8ZXVkZ2.js} +3 -3
- package/dist/{x-tab-B8YFmNK2.js.map → x-tab-D8ZXVkZ2.js.map} +1 -1
- package/dist/{x-tab-group-BfEaq8Nj.js → x-tab-group-D1jmHXyJ.js} +3 -3
- package/dist/{x-tab-group-BfEaq8Nj.js.map → x-tab-group-D1jmHXyJ.js.map} +1 -1
- package/dist/{x-tab-panel-B7a_xbQd.js → x-tab-panel-CwQdoT0T.js} +3 -3
- package/dist/{x-tab-panel-B7a_xbQd.js.map → x-tab-panel-CwQdoT0T.js.map} +1 -1
- package/dist/{x-text-field-CvC6id2f.js → x-text-field-BoIZJ_CH.js} +8 -8
- package/dist/{x-text-field-CvC6id2f.js.map → x-text-field-BoIZJ_CH.js.map} +1 -1
- package/dist/{x-tree-CbliYwVw.js → x-tree-CrHakAmV.js} +9 -9
- package/dist/{x-tree-CbliYwVw.js.map → x-tree-CrHakAmV.js.map} +1 -1
- package/package.json +14 -14
- package/dist/index-CkeFEgm6.js.map +0 -1
- package/dist/x-load-Bw4ftl3k.js +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-select-
|
|
1
|
+
{"version":3,"file":"x-select-B-9ebdG3.js","sources":["../src/vue/form/x-select.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport messages from \"../../translations\";\nimport { computed } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VSelect } from \"vuetify/components/VSelect\";\nimport type { SelectProps } from \"@xwiki/platform-dsapi\";\n\nconst props = defineProps<SelectProps>();\nconst selected = defineModel<string>();\n\nconst { t } = useI18n({\n messages,\n});\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.select.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n<template>\n <v-select\n v-model=\"selected\"\n :label=\"label\"\n :messages=\"help\"\n :items=\"items\"\n :rules=\"rules\"\n :clearable=\"!required\"\n ></v-select>\n</template>\n"],"names":["props","__props","selected","_useModel","t","useI18n","messages","rules","computed","rulesList","value","_createBlock","_unref","VSelect","$event"],"mappings":";;;;;;;;;;;;;;;;;;AA0BA,UAAMA,IAAQC,GACRC,IAAWC,EAAmBF,GAAA,YAAC,GAE/B,EAAE,GAAAG,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GAEKC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIT,EAAM,YACRS,EAAU,KAAK,CAACC,MACVA,IACK,KAEAN,EAAE,gCAAgC,CAE5C,GAEIK;AAAA,IACT,CAAC;2BAGCE,EAOYC,EAAAC,CAAA,GAAA;AAAA,kBANDX,EAAA;AAAA,oDAAAA,EAAQ,QAAAY;AAAA,MAChB,OAAOb,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACV,OAAOA,EAAA;AAAA,MACP,OAAOM,EAAA;AAAA,MACP,YAAYN,EAAA;AAAA,IAAA;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as a, resolveComponent as n,
|
|
1
|
+
import { defineComponent as a, resolveComponent as n, openBlock as r, createBlock as l, withCtx as c, renderSlot as p } from "vue";
|
|
2
2
|
const u = /* @__PURE__ */ a({
|
|
3
3
|
__name: "x-tab",
|
|
4
4
|
props: {
|
|
@@ -7,7 +7,7 @@ const u = /* @__PURE__ */ a({
|
|
|
7
7
|
setup(e) {
|
|
8
8
|
return (t, s) => {
|
|
9
9
|
const o = n("v-tab");
|
|
10
|
-
return
|
|
10
|
+
return r(), l(o, { value: e.tabId }, {
|
|
11
11
|
default: c(() => [
|
|
12
12
|
p(t.$slots, "default")
|
|
13
13
|
]),
|
|
@@ -19,4 +19,4 @@ const u = /* @__PURE__ */ a({
|
|
|
19
19
|
export {
|
|
20
20
|
u as default
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=x-tab-
|
|
22
|
+
//# sourceMappingURL=x-tab-D8ZXVkZ2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-tab-
|
|
1
|
+
{"version":3,"file":"x-tab-D8ZXVkZ2.js","sources":["../src/vue/x-tab.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport type { TabProps } from \"@xwiki/platform-dsapi\";\n\ndefineProps<TabProps>();\n</script>\n\n<template>\n <v-tab :value=\"tabId\"><slot></slot></v-tab>\n</template>\n\n<style scoped></style>\n"],"names":["_createBlock","_component_v_tab","__props","_renderSlot","_ctx"],"mappings":";;;;;;;;;kBA0BEA,EAA2CC,GAAA,EAAnC,OAAOC,EAAA,SAAK;AAAA,mBAAE,MAAa;AAAA,UAAbC,EAAaC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as f, ref as i, resolveComponent as n,
|
|
1
|
+
import { defineComponent as f, ref as i, resolveComponent as n, openBlock as b, createBlock as V, withCtx as a, createVNode as s, renderSlot as u } from "vue";
|
|
2
2
|
const x = /* @__PURE__ */ f({
|
|
3
3
|
__name: "x-tab-group",
|
|
4
4
|
emits: ["tab-change"],
|
|
@@ -9,7 +9,7 @@ const x = /* @__PURE__ */ f({
|
|
|
9
9
|
}
|
|
10
10
|
return (e, o) => {
|
|
11
11
|
const _ = n("v-tabs"), c = n("v-tabs-window"), p = n("v-card-text"), v = n("v-card");
|
|
12
|
-
return
|
|
12
|
+
return b(), V(v, { class: "mx-auto" }, {
|
|
13
13
|
default: a(() => [
|
|
14
14
|
s(_, {
|
|
15
15
|
modelValue: t.value,
|
|
@@ -46,4 +46,4 @@ const x = /* @__PURE__ */ f({
|
|
|
46
46
|
export {
|
|
47
47
|
x as default
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=x-tab-group-
|
|
49
|
+
//# sourceMappingURL=x-tab-group-D1jmHXyJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-tab-group-
|
|
1
|
+
{"version":3,"file":"x-tab-group-D1jmHXyJ.js","sources":["../src/vue/x-tab-group.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { Ref } from \"vue\";\nconst tab: Ref<unknown> = ref();\n\nconst emits = defineEmits([\"tab-change\"]);\n\nfunction change(tabId: unknown) {\n if (typeof tabId == \"string\") {\n emits(\"tab-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","_createBlock","_component_v_card","_createVNode","_component_v_tabs","$event","_renderSlot","_ctx","_component_v_card_text","_component_v_tabs_window"],"mappings":";;;;;AAsBA,UAAMA,IAAoBC,EAAA,GAEpBC,IAAQC;AAEd,aAASC,EAAOC,GAAgB;AAC9B,MAAI,OAAOA,KAAS,YAClBH,EAAM,cAAcG,CAAK;AAAA,IAE7B;;;kBAIEC,EASSC,GAAA,EATD,OAAM,aAAS;AAAA,mBACrB,MAES;AAAA,UAFTC,EAESC,GAAA;AAAA,wBAFQT,EAAA;AAAA;qCAAAA,EAAG,QAAAU;AAAA,cAAuBN;AAAA,YAAA;AAAA;uBACzC,MAAyB;AAAA,cAAzBO,EAAyBC,EAAA,QAAA,MAAA;AAAA,YAAA;;;UAE3BJ,EAIcK,GAAA,MAAA;AAAA,uBAHZ,MAEgB;AAAA,cAFhBL,EAEgBM,GAAA;AAAA,4BAFQd,EAAA;AAAA,8DAAAA,EAAG,QAAAU;AAAA,cAAA;2BACzB,MAA2B;AAAA,kBAA3BC,EAA2BC,EAAA,QAAA,QAAA;AAAA,gBAAA;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as n, resolveComponent as a,
|
|
1
|
+
import { defineComponent as n, resolveComponent as a, openBlock as r, createBlock as l, withCtx as s, renderSlot as _ } from "vue";
|
|
2
2
|
const d = /* @__PURE__ */ n({
|
|
3
3
|
__name: "x-tab-panel",
|
|
4
4
|
props: {
|
|
@@ -7,7 +7,7 @@ const d = /* @__PURE__ */ n({
|
|
|
7
7
|
setup(e) {
|
|
8
8
|
return (t, p) => {
|
|
9
9
|
const o = a("v-tabs-window-item");
|
|
10
|
-
return
|
|
10
|
+
return r(), l(o, { value: e.tabId }, {
|
|
11
11
|
default: s(() => [
|
|
12
12
|
_(t.$slots, "default")
|
|
13
13
|
]),
|
|
@@ -19,4 +19,4 @@ const d = /* @__PURE__ */ n({
|
|
|
19
19
|
export {
|
|
20
20
|
d as default
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=x-tab-panel-
|
|
22
|
+
//# sourceMappingURL=x-tab-panel-CwQdoT0T.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-tab-panel-
|
|
1
|
+
{"version":3,"file":"x-tab-panel-CwQdoT0T.js","sources":["../src/vue/x-tab-panel.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport type { TabPanelProps } from \"@xwiki/platform-dsapi\";\n\ndefineProps<TabPanelProps>();\n</script>\n\n<template>\n <v-tabs-window-item :value=\"tabId\"><slot></slot></v-tabs-window-item>\n</template>\n"],"names":["_createBlock","_component_v_tabs_window_item","__props","_renderSlot","_ctx"],"mappings":";;;;;;;;;kBA0BEA,EAAqEC,GAAA,EAAhD,OAAOC,EAAA,SAAK;AAAA,mBAAE,MAAa;AAAA,UAAbC,EAAaC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as s,
|
|
1
|
+
import { defineComponent as s, useModel as d, computed as i, openBlock as m, createBlock as f, unref as p, withCtx as c, renderSlot as y, mergeModels as h } from "vue";
|
|
2
2
|
import { t as V } from "./translations-CXVK8zyA.js";
|
|
3
3
|
import { useI18n as x } from "vue-i18n";
|
|
4
|
-
import { a as v } from "./index-
|
|
4
|
+
import { a as v } from "./index-5yb_QWW0.js";
|
|
5
5
|
const k = /* @__PURE__ */ s({
|
|
6
6
|
__name: "x-text-field",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ h({
|
|
8
8
|
name: {},
|
|
9
9
|
label: {},
|
|
10
10
|
required: { type: Boolean },
|
|
@@ -21,11 +21,11 @@ const k = /* @__PURE__ */ s({
|
|
|
21
21
|
setup(e) {
|
|
22
22
|
const { t: a } = x({
|
|
23
23
|
messages: V
|
|
24
|
-
}), n = e, o =
|
|
24
|
+
}), n = e, o = d(e, "modelValue"), u = i(() => {
|
|
25
25
|
const t = [];
|
|
26
26
|
return n.required && t.push((l) => l ? !0 : a("vuetify.text.input.mandatory")), t;
|
|
27
27
|
});
|
|
28
|
-
return (t, l) => (
|
|
28
|
+
return (t, l) => (m(), f(p(v), {
|
|
29
29
|
modelValue: o.value,
|
|
30
30
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => o.value = r),
|
|
31
31
|
label: e.label,
|
|
@@ -37,8 +37,8 @@ const k = /* @__PURE__ */ s({
|
|
|
37
37
|
readonly: e.readonly,
|
|
38
38
|
type: e.type ?? "text"
|
|
39
39
|
}, {
|
|
40
|
-
default:
|
|
41
|
-
|
|
40
|
+
default: c(() => [
|
|
41
|
+
y(t.$slots, "default")
|
|
42
42
|
]),
|
|
43
43
|
_: 3
|
|
44
44
|
}, 8, ["modelValue", "label", "name", "autofocus", "hint", "persistent-hint", "rules", "readonly", "type"]));
|
|
@@ -47,4 +47,4 @@ const k = /* @__PURE__ */ s({
|
|
|
47
47
|
export {
|
|
48
48
|
k as default
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=x-text-field-
|
|
50
|
+
//# sourceMappingURL=x-text-field-BoIZJ_CH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-text-field-
|
|
1
|
+
{"version":3,"file":"x-text-field-BoIZJ_CH.js","sources":["../src/vue/form/x-text-field.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../../translations\";\nimport { computed } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VTextField } from \"vuetify/components/VTextField\";\nimport type { TextFieldProps } from \"@xwiki/platform-dsapi\";\n\nconst { t } = useI18n({\n messages,\n});\nconst props = defineProps<TextFieldProps>();\nconst input = defineModel<string>();\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.text.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n\n<template>\n <v-text-field\n v-model=\"input\"\n :label=\"label\"\n :name=\"name\"\n :autofocus=\"autofocus\"\n :hint=\"help\"\n :persistent-hint=\"help !== undefined\"\n :rules=\"rules\"\n :readonly=\"readonly\"\n :type=\"type ?? 'text'\"\n >\n <template #default>\n <slot name=\"default\" />\n </template>\n </v-text-field>\n</template>\n\n<style scoped></style>\n"],"names":["t","useI18n","messages","props","__props","input","_useModel","rules","computed","rulesList","value","_createBlock","_unref","VTextField","$event","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,UAAM,EAAE,GAAAA,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GACKC,IAAQC,GACRC,IAAQC,EAAmBF,GAAA,YAAC,GAE5BG,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIN,EAAM,YACRM,EAAU,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IACT,CAAC;2BAICE,EAceC,EAAAC,CAAA,GAAA;AAAA,kBAbJR,EAAA;AAAA,oDAAAA,EAAK,QAAAS;AAAA,MACb,OAAOV,EAAA;AAAA,MACP,MAAMA,EAAA;AAAA,MACN,WAAWA,EAAA;AAAA,MACX,MAAMA,EAAA;AAAA,MACN,mBAAiBA,EAAA,SAAS;AAAA,MAC1B,OAAOG,EAAA;AAAA,MACP,UAAUH,EAAA;AAAA,MACV,MAAMA,EAAA,QAAI;AAAA,IAAA;MAEA,WACT,MAAuB;AAAA,QAAvBW,EAAuBC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as y,
|
|
2
|
-
import { e as A } from "./index-
|
|
1
|
+
import { defineComponent as y, useModel as s, ref as h, watch as C, openBlock as i, createBlock as k, unref as m, withCtx as b, createElementBlock as v, withModifiers as w, toDisplayString as u, mergeModels as x } from "vue";
|
|
2
|
+
import { e as A } from "./index-5yb_QWW0.js";
|
|
3
3
|
import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
|
|
5
5
|
__name: "x-tree",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ x({
|
|
7
7
|
rootNode: {},
|
|
8
8
|
showRootNode: { type: Boolean },
|
|
9
9
|
activated: {},
|
|
@@ -18,8 +18,8 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
|
|
|
18
18
|
}),
|
|
19
19
|
emits: ["update:opened", "update:activated"],
|
|
20
20
|
setup(t) {
|
|
21
|
-
const f = t, n = s(t, "opened"), o = s(t, "activated"), c =
|
|
22
|
-
|
|
21
|
+
const f = t, n = s(t, "opened"), o = s(t, "activated"), c = h([]);
|
|
22
|
+
C(o, l, { immediate: !0 });
|
|
23
23
|
function l() {
|
|
24
24
|
c.value = o.value ? [o.value] : [];
|
|
25
25
|
}
|
|
@@ -29,7 +29,7 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
|
|
|
29
29
|
async function p(a) {
|
|
30
30
|
await f.lazyLoadChildren(a);
|
|
31
31
|
}
|
|
32
|
-
return (a, d) => (i(), m(
|
|
32
|
+
return (a, d) => (i(), k(m(A), {
|
|
33
33
|
density: "compact",
|
|
34
34
|
activated: c.value,
|
|
35
35
|
items: t.showRootNode ? [t.rootNode] : t.rootNode.children,
|
|
@@ -44,11 +44,11 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
|
|
|
44
44
|
],
|
|
45
45
|
"onUpdate:activated": l
|
|
46
46
|
}, {
|
|
47
|
-
title:
|
|
47
|
+
title: b(({ item: e }) => [
|
|
48
48
|
t.nodeClickAction ? (i(), v("a", {
|
|
49
49
|
key: 0,
|
|
50
50
|
href: e.url,
|
|
51
|
-
onClick:
|
|
51
|
+
onClick: w(
|
|
52
52
|
async () => {
|
|
53
53
|
r(e), await t.nodeClickAction(e);
|
|
54
54
|
},
|
|
@@ -67,4 +67,4 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
|
|
|
67
67
|
export {
|
|
68
68
|
T as default
|
|
69
69
|
};
|
|
70
|
-
//# sourceMappingURL=x-tree-
|
|
70
|
+
//# sourceMappingURL=x-tree-CrHakAmV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-tree-
|
|
1
|
+
{"version":3,"file":"x-tree-CrHakAmV.js","sources":["../src/vue/x-tree.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\" generic=\"T extends DisplayableTreeNode\">\nimport { ref, watch } from \"vue\";\nimport { VTreeview } from \"vuetify/components/VTreeview\";\nimport type { DisplayableTreeNode, TreeProps } from \"@xwiki/platform-dsapi\";\nimport type { Ref } from \"vue\";\n\nconst props = defineProps<TreeProps<T>>();\nconst opened = defineModel(\"opened\", { default: [], type: Array<string> });\nconst activated = defineModel<string | undefined>(\"activated\");\n\nconst activatedNodes: Ref<Array<string>> = ref([]);\n\nwatch(activated, resetActivated, { immediate: true });\n\nfunction resetActivated() {\n // Clicking on a node would activate it and this can't be disabled easily.\n // With this listener, we ensure that only the node we want stays active.\n activatedNodes.value = activated.value ? [activated.value] : [];\n}\n\nfunction updateActivated(newActivatedNode: DisplayableTreeNode) {\n if (newActivatedNode.activatable) {\n activated.value = newActivatedNode.id;\n }\n}\n\nasync function lazyLoadChildrenWrapper(node: unknown) {\n // We need this wrapper because our props are more specific than Vuetify's.\n await props.lazyLoadChildren!(node as T);\n}\n</script>\n\n<template>\n <v-treeview\n density=\"compact\"\n :activated=\"activatedNodes\"\n :items=\"showRootNode ? [rootNode] : rootNode.children\"\n :load-children=\"lazyLoadChildren ? lazyLoadChildrenWrapper : undefined\"\n activatable\n active-strategy=\"independent\"\n item-value=\"id\"\n v-model:opened=\"opened as string[]\"\n @update:opened=\"($event: string[]) => (opened = $event)\"\n @update:activated=\"resetActivated\"\n >\n <template #title=\"{ item }\">\n <a\n v-if=\"nodeClickAction\"\n :href=\"item.url\"\n @click.prevent=\"\n async () => {\n updateActivated(item);\n await nodeClickAction!(item as T);\n }\n \"\n >{{ item.label }}</a\n >\n <a v-else :href=\"item.url\" @click=\"updateActivated(item)\">{{\n item.label\n }}</a>\n </template>\n </v-treeview>\n</template>\n\n<style scoped>\n/* Remove the background color from the root div element. */\n.v-list {\n background: none;\n}\n:deep(a) {\n text-decoration: none;\n color: var(--cr-base-text-color);\n}\n/* Disable hover on items. */\n:deep(.v-list-item__overlay) {\n --v-hover-opacity: 0;\n}\n/* Disable hand cursor on items, since we disable the default click action. */\n:deep(.v-list-item--link) {\n cursor: default;\n}\n</style>\n"],"names":["props","__props","opened","_useModel","activated","activatedNodes","ref","watch","resetActivated","updateActivated","newActivatedNode","lazyLoadChildrenWrapper","node","_createBlock","_unref","VTreeview","$event","_withCtx","item","_createElementBlock","_withModifiers","_toDisplayString","_hoisted_1","_hoisted_2"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,UAAMA,IAAQC,GACRC,IAASC,EAAWF,GAAC,QAA8C,GACnEG,IAAYD,KAAgC,WAAW,GAEvDE,IAAqCC,EAAI,EAAE;AAEjD,IAAAC,EAAMH,GAAWI,GAAgB,EAAE,WAAW,IAAM;AAEpD,aAASA,IAAiB;AAGxB,MAAAH,EAAe,QAAQD,EAAU,QAAQ,CAACA,EAAU,KAAK,IAAI,CAAA;AAAA,IAC/D;AAEA,aAASK,EAAgBC,GAAuC;AAC9D,MAAIA,EAAiB,gBACnBN,EAAU,QAAQM,EAAiB;AAAA,IAEvC;AAEA,mBAAeC,EAAwBC,GAAe;AAEpD,YAAMZ,EAAM,iBAAkBY,CAAS;AAAA,IACzC;2BAIEC,EA4BaC,EAAAC,CAAA,GAAA;AAAA,MA3BX,SAAQ;AAAA,MACP,WAAWV,EAAA;AAAA,MACX,OAAOJ,EAAA,eAAY,CAAIA,UAAQ,IAAIA,EAAA,SAAS;AAAA,MAC5C,iBAAeA,EAAA,mBAAmBU,IAA0B;AAAA,MAC7D,aAAA;AAAA,MACA,mBAAgB;AAAA,MAChB,cAAW;AAAA,MACH,QAAQT,EAAA;AAAA;+BAAAA,EAAA,QAAMc;AAAA,yBACLA,MAAsBd,EAAA,QAASc;AAAA,MAAA;AAAA,MAC/C,sBAAkBR;AAAA,IAAA;MAER,OAAKS,EACd,CAUC,EAXiB,MAAAC,QAAI;AAAA,QAEdjB,EAAA,wBADRkB,EAUC,KAAA;AAAA;UARE,MAAMD,EAAK;AAAA,UACX,SAAKE;AAAAA;AAA+C,cAAAX,EAAgBS,CAAI,GAAqB,MAAAjB,EAAA,gBAAiBiB,CAAI;AAAA;;;WAM/GG,EAAAH,EAAK,KAAK,GAAA,GAAAI,CAAA,WAEhBH,EAEM,KAAA;AAAA;UAFK,MAAMD,EAAK;AAAA,UAAM,SAAK,CAAAF,MAAEP,EAAgBS,CAAI;AAAA,QAAA,GACrDG,EAAAH,EAAK,KAAK,GAAA,GAAAK,CAAA;AAAA,MAAA;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-dsvuetify",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"license": "LGPL 2.1",
|
|
5
5
|
"author": "XWiki Org Community <contact@xwiki.org>",
|
|
6
6
|
"homepage": "https://cristal.xwiki.org/",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"main": "./dist/index.es.js",
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@xwiki/platform-api": "18.
|
|
32
|
-
"@xwiki/platform-document-api": "18.
|
|
33
|
-
"@xwiki/platform-fn-utils": "18.
|
|
34
|
-
"@xwiki/platform-model-api": "18.
|
|
35
|
-
"@xwiki/platform-model-reference-api": "18.
|
|
36
|
-
"@xwiki/platform-navigation-tree-api": "18.
|
|
37
|
-
"vue-i18n": "11.2.
|
|
38
|
-
"vuetify": "3.11.
|
|
39
|
-
"@xwiki/cristal-hierarchy-api": "1.
|
|
31
|
+
"@xwiki/platform-api": "18.1.0",
|
|
32
|
+
"@xwiki/platform-document-api": "18.1.0",
|
|
33
|
+
"@xwiki/platform-fn-utils": "18.1.0",
|
|
34
|
+
"@xwiki/platform-model-api": "18.1.0",
|
|
35
|
+
"@xwiki/platform-model-reference-api": "18.1.0",
|
|
36
|
+
"@xwiki/platform-navigation-tree-api": "18.1.0",
|
|
37
|
+
"vue-i18n": "11.2.8",
|
|
38
|
+
"vuetify": "3.11.8",
|
|
39
|
+
"@xwiki/cristal-hierarchy-api": "1.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"inversify": "7.x",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@vue/test-utils": "2.4.6",
|
|
48
|
-
"@xwiki/platform-dsapi": "18.
|
|
48
|
+
"@xwiki/platform-dsapi": "18.1.0",
|
|
49
49
|
"inversify": "7.11.0",
|
|
50
50
|
"reflect-metadata": "0.2.2",
|
|
51
51
|
"typescript": "5.9.3",
|
|
52
52
|
"vite": "7.3.1",
|
|
53
|
-
"vue": "3.5.
|
|
54
|
-
"vue-tsc": "3.2.
|
|
55
|
-
"@xwiki/cristal-dev-config": "1.
|
|
53
|
+
"vue": "3.5.28",
|
|
54
|
+
"vue-tsc": "3.2.4",
|
|
55
|
+
"@xwiki/cristal-dev-config": "1.1.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"api-extractor:local": "api-extractor run --local",
|