@xwiki/cristal-dsvuetify 1.7.0 → 1.8.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.
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, useModel as t, openBlock as u, createBlock as d, unref as n, mergeModels as s } from "vue";
2
- import { c } from "./index-CQAmUusH.js";
2
+ import { c } from "./index-Rdrx300a.js";
3
3
  const V = /* @__PURE__ */ m({
4
4
  __name: "x-checkbox",
5
5
  props: /* @__PURE__ */ s({
@@ -25,4 +25,4 @@ const V = /* @__PURE__ */ m({
25
25
  export {
26
26
  V as default
27
27
  };
28
- //# sourceMappingURL=x-checkbox-D_hqOA4p.js.map
28
+ //# sourceMappingURL=x-checkbox-CVjvdmor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-checkbox-D_hqOA4p.js","sources":["../src/vue/form/x-checkbox.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 { VCheckbox } from \"vuetify/components/VCheckbox\";\nimport type { CheckboxProps } from \"@xwiki/platform-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","_createBlock","_unref","VCheckbox","$event","__props"],"mappings":";;;;;;;;;;;;;;AAyBA,UAAMA,IAAUC,iBAA4B;2BAG1CC,EAKcC,EAAAC,CAAA,GAAA;AAAA,kBAJHJ,EAAA;AAAA,oDAAAA,EAAO,QAAAK;AAAA,MACf,OAAOC,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACX,SAAQ;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"x-checkbox-CVjvdmor.js","sources":["../src/vue/form/x-checkbox.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 { VCheckbox } from \"vuetify/components/VCheckbox\";\nimport type { CheckboxProps } from \"@xwiki/platform-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","_createBlock","_unref","VCheckbox","$event","__props"],"mappings":";;;;;;;;;;;;;;AAyBA,UAAMA,IAAUC,iBAA4B;2BAG1CC,EAKcC,EAAAC,CAAA,GAAA;AAAA,kBAJHJ,EAAA;AAAA,oDAAAA,EAAO,QAAAK;AAAA,MACf,OAAOC,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACX,SAAQ;AAAA,IAAA;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as m, useModel as s, computed as d, openBlock as i, createBlock as p, unref as f, mergeModels as c } from "vue";
2
2
  import { t as V } from "./translations-CXVK8zyA.js";
3
3
  import { useI18n as y } from "vue-i18n";
4
- import { b } from "./index-CQAmUusH.js";
4
+ import { b } from "./index-Rdrx300a.js";
5
5
  const g = /* @__PURE__ */ m({
6
6
  __name: "x-file-input",
7
7
  props: /* @__PURE__ */ c({
@@ -37,4 +37,4 @@ const g = /* @__PURE__ */ m({
37
37
  export {
38
38
  g as default
39
39
  };
40
- //# sourceMappingURL=x-file-input-DaIGyyH2.js.map
40
+ //# sourceMappingURL=x-file-input-7Yguf-_F.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-file-input-DaIGyyH2.js","sources":["../src/vue/form/x-file-input.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 { VFileInput } from \"vuetify/components/VFileInput\";\nimport type { FileInputModel, TextFieldProps } from \"@xwiki/platform-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","_createBlock","_unref","VFileInput","$event"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,UAAM,EAAE,GAAAA,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GAEKC,IAAQC,iBAA4B,GACpCC,IAAQC,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIJ,EAAM,YACRI,EAAU,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IACT,CAAC;2BAICE,EAKgBC,EAAAC,CAAA,GAAA;AAAA,kBAJLV,EAAA;AAAA,oDAAAA,EAAK,QAAAW;AAAA,MACb,OAAOR,EAAA;AAAA,MACP,MAAMA,EAAA;AAAA,MACN,OAAOC,EAAA;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"x-file-input-7Yguf-_F.js","sources":["../src/vue/form/x-file-input.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 { VFileInput } from \"vuetify/components/VFileInput\";\nimport type { FileInputModel, TextFieldProps } from \"@xwiki/platform-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","_createBlock","_unref","VFileInput","$event"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,UAAM,EAAE,GAAAA,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GAEKC,IAAQC,iBAA4B,GACpCC,IAAQC,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIJ,EAAM,YACRI,EAAU,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IACT,CAAC;2BAICE,EAKgBC,EAAAC,CAAA,GAAA;AAAA,kBAJLV,EAAA;AAAA,oDAAAA,EAAK,QAAAW;AAAA,MACb,OAAOR,EAAA;AAAA,MACP,MAAMA,EAAA;AAAA,MACN,OAAOC,EAAA;AAAA,IAAA;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as s, ref as m, openBlock as f, createBlock as c, unref as u, withModifiers as d, withCtx as _, renderSlot as l } from "vue";
2
- import { V as p } from "./index-CQAmUusH.js";
2
+ import { V as p } from "./index-Rdrx300a.js";
3
3
  import { _ as v } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const x = /* @__PURE__ */ s({
5
5
  __name: "x-form",
@@ -30,4 +30,4 @@ const x = /* @__PURE__ */ s({
30
30
  export {
31
31
  y as default
32
32
  };
33
- //# sourceMappingURL=x-form-B6DCj_pz.js.map
33
+ //# sourceMappingURL=x-form-B6AuGJmF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-form-B6DCj_pz.js","sources":["../src/vue/form/x-form.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 { VForm } from \"vuetify/components/VForm\";\nimport type { Ref } from \"vue\";\n\nconst form: Ref<VForm | undefined> = ref(undefined);\nconst emits = defineEmits([\"formSubmit\"]);\n\ndefineExpose({\n reset,\n});\n\nasync function reset() {\n form.value?.reset();\n}\n\nasync function submit() {\n const validation = await form.value?.validate();\n if (validation?.valid) {\n emits(\"formSubmit\");\n }\n}\n</script>\n\n<template>\n <v-form ref=\"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":["form","ref","emits","__emit","__expose","reset","submit","_createBlock","_unref","VForm","_renderSlot","_ctx"],"mappings":";;;;;;;AAwBA,UAAMA,IAA+BC,EAAI,MAAS,GAC5CC,IAAQC;AAEd,IAAAC,EAAa;AAAA,MACX,OAAAC;AAAA,IAAA,CACD;AAED,mBAAeA,IAAQ;AACrB,MAAAL,EAAK,OAAO,MAAA;AAAA,IACd;AAEA,mBAAeM,IAAS;AAEtB,OADmB,MAAMN,EAAK,OAAO,SAAA,IACrB,SACdE,EAAM,YAAY;AAAA,IAEtB;2BAIEK,EAESC,EAAAC,CAAA,GAAA;AAAA,eAFG;AAAA,MAAJ,KAAIT;AAAA,MAAQ,YAAgBM,GAAM,CAAA,SAAA,CAAA;AAAA,IAAA;iBACxC,MAAa;AAAA,QAAbI,EAAaC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA;;;;;"}
1
+ {"version":3,"file":"x-form-B6AuGJmF.js","sources":["../src/vue/form/x-form.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 { VForm } from \"vuetify/components/VForm\";\nimport type { Ref } from \"vue\";\n\nconst form: Ref<VForm | undefined> = ref(undefined);\nconst emits = defineEmits([\"formSubmit\"]);\n\ndefineExpose({\n reset,\n});\n\nasync function reset() {\n form.value?.reset();\n}\n\nasync function submit() {\n const validation = await form.value?.validate();\n if (validation?.valid) {\n emits(\"formSubmit\");\n }\n}\n</script>\n\n<template>\n <v-form ref=\"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":["form","ref","emits","__emit","__expose","reset","submit","_createBlock","_unref","VForm","_renderSlot","_ctx"],"mappings":";;;;;;;AAwBA,UAAMA,IAA+BC,EAAI,MAAS,GAC5CC,IAAQC;AAEd,IAAAC,EAAa;AAAA,MACX,OAAAC;AAAA,IAAA,CACD;AAED,mBAAeA,IAAQ;AACrB,MAAAL,EAAK,OAAO,MAAA;AAAA,IACd;AAEA,mBAAeM,IAAS;AAEtB,OADmB,MAAMN,EAAK,OAAO,SAAA,IACrB,SACdE,EAAM,YAAY;AAAA,IAEtB;2BAIEK,EAESC,EAAAC,CAAA,GAAA;AAAA,eAFG;AAAA,MAAJ,KAAIT;AAAA,MAAQ,YAAgBM,GAAM,CAAA,SAAA,CAAA;AAAA,IAAA;iBACxC,MAAa;AAAA,QAAbI,EAAaC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA;;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { resolveComponent as o, openBlock as n, createBlock as r, withCtx as c, renderSlot as s } from "vue";
2
2
  import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
3
  const a = {};
4
- function d(e, f) {
5
- const t = o("v-list");
6
- return n(), r(t, { density: "compact" }, {
4
+ function d(t, l) {
5
+ const e = o("v-list");
6
+ return n(), r(e, { density: "compact" }, {
7
7
  default: c(() => [
8
- s(e.$slots, "default", {}, void 0, !0)
8
+ s(t.$slots, "default", {}, void 0, !0)
9
9
  ]),
10
10
  _: 3
11
11
  });
@@ -14,4 +14,4 @@ const p = /* @__PURE__ */ _(a, [["render", d], ["__scopeId", "data-v-34407184"]]
14
14
  export {
15
15
  p as default
16
16
  };
17
- //# sourceMappingURL=x-menu--XKGcL5D.js.map
17
+ //# sourceMappingURL=x-menu-CFiNZsP5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-menu--XKGcL5D.js","sources":["../src/vue/x-menu.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></script>\n<template>\n <v-list density=\"compact\">\n <slot name=\"default\" />\n </v-list>\n</template>\n<style scoped>\n.v-overlay {\n z-index: var(--cr-z-index-dropdown);\n}\n</style>\n"],"names":["_createBlock","_component_v_list","_renderSlot","_ctx"],"mappings":";;;;;cAqBEA,EAESC,GAAA,EAFD,SAAQ,aAAS;AAAA,eACvB,MAAuB;AAAA,MAAvBC,EAAuBC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA;;;;;"}
1
+ {"version":3,"file":"x-menu-CFiNZsP5.js","sources":["../src/vue/x-menu.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></script>\n<template>\n <v-list density=\"compact\">\n <slot name=\"default\" />\n </v-list>\n</template>\n<style scoped>\n.v-overlay {\n z-index: var(--cr-z-index-dropdown);\n}\n</style>\n"],"names":["_createBlock","_component_v_list","_withCtx","_renderSlot","_ctx"],"mappings":";;;;;cAqBEA,EAESC,GAAA,EAFD,SAAQ,aAAS;AAAA,IAAA,SAAAC,EACvB,MAAuB;AAAA,MAAvBC,EAAuBC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAA,CAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"x-menu-label-DniImc0U.js","sources":["../src/vue/x-menu-label.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></script>\n<template>\n <v-list-subheader>\n <slot name=\"default\" />\n </v-list-subheader>\n</template>\n"],"names":["_createBlock","_component_v_list_subheader","_renderSlot","_ctx"],"mappings":";;;;;cAqBEA,EAEmBC,GAAA,MAAA;AAAA,eADjB,MAAuB;AAAA,MAAvBC,EAAuBC,EAAA,QAAA,SAAA;AAAA;;;;;"}
1
+ {"version":3,"file":"x-menu-label-DniImc0U.js","sources":["../src/vue/x-menu-label.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></script>\n<template>\n <v-list-subheader>\n <slot name=\"default\" />\n </v-list-subheader>\n</template>\n"],"names":["_createBlock","_component_v_list_subheader","_withCtx","_renderSlot","_ctx"],"mappings":";;;;;cAqBEA,EAEmBC,GAAA,MAAA;AAAA,IAAA,SAAAC,EADjB,MAAuB;AAAA,MAAvBC,EAAuBC,EAAA,QAAA,SAAA;AAAA,IAAA,CAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"x-search-C4yZLrSp.js","sources":["../src/vue/x-search.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\"></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":["_createBlock","_component_v_autocomplete"],"mappings":";;;;;cAsBEA,EAQkBC,GAAA;AAAA,IAPhB,SAAQ;AAAA,IACR,aAAU;AAAA,IACV,aAAY;AAAA,IACZ,sBAAmB;AAAA,IACnB,SAAQ;AAAA,IACR,qBAAA;AAAA,IACA,SAAA;AAAA;;;"}
1
+ {"version":3,"file":"x-search-C4yZLrSp.js","sources":["../src/vue/x-search.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\"></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":["_createBlock","_component_v_autocomplete"],"mappings":";;;;;cAsBEA,EAQkBC,GAAA;AAAA,IAPhB,SAAQ;AAAA,IACR,aAAU;AAAA,IACV,aAAY;AAAA,IACZ,sBAAmB;AAAA,IACnB,SAAQ;AAAA,IACR,qBAAA;AAAA,IACA,SAAA;AAAA,EAAA,CAAA;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as m, useModel as n, computed as d, openBlock as i, createBlock as c, unref as f, mergeModels as p } from "vue";
2
2
  import { t as V } from "./translations-CXVK8zyA.js";
3
3
  import { useI18n as b } from "vue-i18n";
4
- import { d as g } from "./index-CQAmUusH.js";
4
+ import { d as g } from "./index-Rdrx300a.js";
5
5
  const B = /* @__PURE__ */ m({
6
6
  __name: "x-select",
7
7
  props: /* @__PURE__ */ p({
@@ -36,4 +36,4 @@ const B = /* @__PURE__ */ m({
36
36
  export {
37
37
  B as default
38
38
  };
39
- //# sourceMappingURL=x-select-CRmDB2Aj.js.map
39
+ //# sourceMappingURL=x-select-Dh7L3_7W.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-select-CRmDB2Aj.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
+ {"version":3,"file":"x-select-Dh7L3_7W.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,7 +1,7 @@
1
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-CQAmUusH.js";
4
+ import { a as v } from "./index-Rdrx300a.js";
5
5
  const k = /* @__PURE__ */ s({
6
6
  __name: "x-text-field",
7
7
  props: /* @__PURE__ */ h({
@@ -47,4 +47,4 @@ const k = /* @__PURE__ */ s({
47
47
  export {
48
48
  k as default
49
49
  };
50
- //# sourceMappingURL=x-text-field-C-BZoqfn.js.map
50
+ //# sourceMappingURL=x-text-field-BwEdkzjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-text-field-C-BZoqfn.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
+ {"version":3,"file":"x-text-field-BwEdkzjs.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, 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-CQAmUusH.js";
3
- import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
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 w, createElementBlock as v, withModifiers as x, toDisplayString as u, mergeModels as A } from "vue";
2
+ import { e as M } from "./index-Rdrx300a.js";
3
+ import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const b = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
5
5
  __name: "x-tree",
6
- props: /* @__PURE__ */ x({
6
+ props: /* @__PURE__ */ A({
7
7
  rootNode: {},
8
8
  showRootNode: { type: Boolean },
9
9
  activated: {},
@@ -11,7 +11,10 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
11
11
  lazyLoadChildren: { type: Function },
12
12
  nodeClickAction: { type: Function }
13
13
  }, {
14
- opened: { default: [], type: Array },
14
+ opened: {
15
+ default: () => [],
16
+ type: Array
17
+ },
15
18
  openedModifiers: {},
16
19
  activated: {},
17
20
  activatedModifiers: {}
@@ -29,7 +32,7 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
29
32
  async function p(a) {
30
33
  await f.lazyLoadChildren(a);
31
34
  }
32
- return (a, d) => (i(), k(m(A), {
35
+ return (a, d) => (i(), k(m(M), {
33
36
  density: "compact",
34
37
  activated: c.value,
35
38
  items: t.showRootNode ? [t.rootNode] : t.rootNode.children,
@@ -44,17 +47,17 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
44
47
  ],
45
48
  "onUpdate:activated": l
46
49
  }, {
47
- title: b(({ item: e }) => [
50
+ title: w(({ item: e }) => [
48
51
  t.nodeClickAction ? (i(), v("a", {
49
52
  key: 0,
50
53
  href: e.url,
51
- onClick: w(
54
+ onClick: x(
52
55
  async () => {
53
56
  r(e), await t.nodeClickAction(e);
54
57
  },
55
58
  ["prevent"]
56
59
  )
57
- }, u(e.label), 9, N)) : (i(), v("a", {
60
+ }, u(e.label), 9, b)) : (i(), v("a", {
58
61
  key: 1,
59
62
  href: e.url,
60
63
  onClick: (L) => r(e)
@@ -63,8 +66,8 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
63
66
  _: 1
64
67
  }, 8, ["activated", "items", "load-children", "opened"]));
65
68
  }
66
- }), T = /* @__PURE__ */ M(B, [["__scopeId", "data-v-b9bb4c28"]]);
69
+ }), T = /* @__PURE__ */ N(B, [["__scopeId", "data-v-56ddc9cc"]]);
67
70
  export {
68
71
  T as default
69
72
  };
70
- //# sourceMappingURL=x-tree-B0xvdg9D.js.map
73
+ //# sourceMappingURL=x-tree-BrRZGwKO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-tree-BrRZGwKO.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\", {\n default: () => [],\n type: Array<string>,\n});\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,QAG1B,GACKG,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.7.0",
3
+ "version": "1.8.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -28,14 +28,14 @@
28
28
  "main": "./dist/index.es.js",
29
29
  "types": "./dist/index.d.ts",
30
30
  "dependencies": {
31
- "@xwiki/platform-api": "18.7.0",
32
- "@xwiki/platform-document-api": "18.7.0",
33
- "@xwiki/platform-fn-utils": "18.7.0",
34
- "@xwiki/platform-hierarchy-api": "18.7.0",
35
- "@xwiki/platform-model-api": "18.7.0",
36
- "@xwiki/platform-model-reference-api": "18.7.0",
37
- "@xwiki/platform-navigation-tree-api": "18.7.0",
38
- "vue-i18n": "11.4.4",
31
+ "@xwiki/platform-api": "18.8.0",
32
+ "@xwiki/platform-document-api": "18.8.0",
33
+ "@xwiki/platform-fn-utils": "18.8.0",
34
+ "@xwiki/platform-hierarchy-api": "18.8.0",
35
+ "@xwiki/platform-model-api": "18.8.0",
36
+ "@xwiki/platform-model-reference-api": "18.8.0",
37
+ "@xwiki/platform-navigation-tree-api": "18.8.0",
38
+ "vue-i18n": "11.4.10",
39
39
  "vuetify": "4.1.5"
40
40
  },
41
41
  "peerDependencies": {
@@ -45,16 +45,16 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@vue/test-utils": "2.4.11",
48
- "@xwiki/cristal-dev-config": "1.7.0",
49
- "@xwiki/platform-dsapi": "18.7.0",
50
- "@xwiki/platform-tool-apiextractorconfig": "18.7.0",
51
- "@xwiki/platform-tool-tsconfig": "18.7.0",
48
+ "@xwiki/cristal-dev-config": "1.8.0",
49
+ "@xwiki/platform-dsapi": "18.8.0",
50
+ "@xwiki/platform-tool-apiextractorconfig": "18.8.0",
51
+ "@xwiki/platform-tool-tsconfig": "18.8.0",
52
52
  "inversify": "8.2.3",
53
53
  "reflect-metadata": "0.2.2",
54
54
  "typescript": "5.9.3",
55
55
  "vite": "7.3.5",
56
- "vue": "3.5.38",
57
- "vue-tsc": "3.3.4"
56
+ "vue": "3.5.43",
57
+ "vue-tsc": "3.3.11"
58
58
  },
59
59
  "scripts": {
60
60
  "api-extractor:local": "api-extractor run --local",
@@ -24,7 +24,10 @@ import type { DisplayableTreeNode, TreeProps } from "@xwiki/platform-dsapi";
24
24
  import type { Ref } from "vue";
25
25
 
26
26
  const props = defineProps<TreeProps<T>>();
27
- const opened = defineModel("opened", { default: [], type: Array<string> });
27
+ const opened = defineModel("opened", {
28
+ default: () => [],
29
+ type: Array<string>,
30
+ });
28
31
  const activated = defineModel<string | undefined>("activated");
29
32
 
30
33
  const activatedNodes: Ref<Array<string>> = ref([]);
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-tree-B0xvdg9D.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;;;;;"}