@xwiki/cristal-dsvuetify 0.22.0 → 0.23.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{index-D8yc5V3N.js → index-DuymNdmD.js} +8211 -7780
  3. package/dist/index-DuymNdmD.js.map +1 -0
  4. package/dist/index.es.js +5 -4
  5. package/dist/index.umd.js +10 -9
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/vue/form/x-form.vue.d.ts +178 -174
  8. package/dist/vue/x-menu-item.vue.d.ts +2 -4
  9. package/dist/vue/x-tree.vue.d.ts +14 -0
  10. package/dist/x-alert-CWUIStcc.js +46 -0
  11. package/dist/{x-alert-DKgk3dOE.js.map → x-alert-CWUIStcc.js.map} +1 -1
  12. package/dist/x-avatar-B5IoAQPQ.js +28 -0
  13. package/dist/{x-avatar-WnkeGyHH.js.map → x-avatar-B5IoAQPQ.js.map} +1 -1
  14. package/dist/x-checkbox-DPBHV522.js +28 -0
  15. package/dist/{x-checkbox-EzA-ce8R.js.map → x-checkbox-DPBHV522.js.map} +1 -1
  16. package/dist/x-dialog-C3nQDBym.js +49 -0
  17. package/dist/{x-dialog-CvZUbP80.js.map → x-dialog-C3nQDBym.js.map} +1 -1
  18. package/dist/{x-file-input-7TdHHaG2.js → x-file-input-BF8IdlrX.js} +13 -13
  19. package/dist/{x-file-input-7TdHHaG2.js.map → x-file-input-BF8IdlrX.js.map} +1 -1
  20. package/dist/{x-form-DrjHf0um.js → x-form-7_KNhAtf.js} +2 -2
  21. package/dist/{x-form-DrjHf0um.js.map → x-form-7_KNhAtf.js.map} +1 -1
  22. package/dist/x-menu-item-Ph5-wwcR.js +26 -0
  23. package/dist/{x-menu-item-CBdOhZc3.js.map → x-menu-item-Ph5-wwcR.js.map} +1 -1
  24. package/dist/{x-navigation-tree-BcW_691Y.js → x-navigation-tree-B5pIL2rS.js} +48 -48
  25. package/dist/{x-navigation-tree-BcW_691Y.js.map → x-navigation-tree-B5pIL2rS.js.map} +1 -1
  26. package/dist/x-navigation-tree-select-BHnoY91T.js +110 -0
  27. package/dist/{x-navigation-tree-select-_13SOFbP.js.map → x-navigation-tree-select-BHnoY91T.js.map} +1 -1
  28. package/dist/{x-select-DnRsSLAX.js → x-select-mVjAXRju.js} +14 -14
  29. package/dist/{x-select-DnRsSLAX.js.map → x-select-mVjAXRju.js.map} +1 -1
  30. package/dist/x-tab-B8YFmNK2.js +22 -0
  31. package/dist/{x-tab-vRrbUjdK.js.map → x-tab-B8YFmNK2.js.map} +1 -1
  32. package/dist/x-tab-panel-B7a_xbQd.js +22 -0
  33. package/dist/{x-tab-panel-DysgiPCz.js.map → x-tab-panel-B7a_xbQd.js.map} +1 -1
  34. package/dist/x-text-field-DTZ5xunG.js +45 -0
  35. package/dist/{x-text-field-BWaRETwR.js.map → x-text-field-DTZ5xunG.js.map} +1 -1
  36. package/dist/x-tree-iloM7Rw9.js +51 -0
  37. package/dist/x-tree-iloM7Rw9.js.map +1 -0
  38. package/package.json +16 -15
  39. package/src/components/vuetifyDesignSystemLoader.ts +1 -0
  40. package/src/vue/css/style.css +1 -0
  41. package/src/vue/x-menu-item.vue +4 -4
  42. package/src/vue/x-tree.vue +81 -0
  43. package/dist/index-D8yc5V3N.js.map +0 -1
  44. package/dist/x-alert-DKgk3dOE.js +0 -46
  45. package/dist/x-avatar-WnkeGyHH.js +0 -28
  46. package/dist/x-checkbox-EzA-ce8R.js +0 -28
  47. package/dist/x-dialog-CvZUbP80.js +0 -49
  48. package/dist/x-menu-item-CBdOhZc3.js +0 -22
  49. package/dist/x-navigation-tree-select-_13SOFbP.js +0 -110
  50. package/dist/x-tab-panel-DysgiPCz.js +0 -22
  51. package/dist/x-tab-vRrbUjdK.js +0 -22
  52. package/dist/x-text-field-BWaRETwR.js +0 -45
@@ -1,6 +1,4 @@
1
- type __VLS_Props = {
2
- value: string;
3
- };
1
+ import { MenuItemProps } from '@xwiki/cristal-dsapi';
4
2
  declare function __VLS_template(): {
5
3
  attrs: Partial<{}>;
6
4
  slots: {
@@ -10,7 +8,7 @@ declare function __VLS_template(): {
10
8
  rootEl: any;
11
9
  };
12
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_component: import('vue').DefineComponent<MenuItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MenuItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
12
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
13
  export default _default;
16
14
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,14 @@
1
+ import { TreeProps } from '@xwiki/cristal-dsapi';
2
+ type __VLS_Props = TreeProps;
3
+ type __VLS_PublicProps = {
4
+ "opened"?: string[];
5
+ "activated"?: string | undefined;
6
+ } & __VLS_Props;
7
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ "update:opened": (value: string[]) => any;
9
+ "update:activated": (value: string | undefined) => any;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:opened"?: ((value: string[]) => any) | undefined;
12
+ "onUpdate:activated"?: ((value: string | undefined) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,46 @@
1
+ import { defineComponent as u, resolveComponent as n, createBlock as a, openBlock as t, withCtx as c, createElementBlock as o, createCommentVNode as r, renderSlot as x, Fragment as f, renderList as b, createTextVNode as k, toDisplayString as s } from "vue";
2
+ import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const _ = { key: 0 }, p = { key: 1 }, v = /* @__PURE__ */ u({
4
+ __name: "x-alert",
5
+ props: {
6
+ title: {},
7
+ type: {},
8
+ description: {},
9
+ actions: {},
10
+ closable: { type: Boolean },
11
+ details: {}
12
+ },
13
+ setup(e) {
14
+ return (i, C) => {
15
+ const d = n("x-btn"), m = n("v-alert");
16
+ return t(), a(m, {
17
+ closable: e.closable,
18
+ title: e.title,
19
+ type: e.type,
20
+ text: e.description
21
+ }, {
22
+ default: c(() => [
23
+ (t(!0), o(f, null, b(e.actions, (l) => (t(), a(d, {
24
+ key: l.name,
25
+ size: "small",
26
+ variant: "text",
27
+ onClick: l.callback
28
+ }, {
29
+ default: c(() => [
30
+ k(s(l.name), 1)
31
+ ]),
32
+ _: 2
33
+ }, 1032, ["onClick"]))), 128)),
34
+ e.details ? (t(), o("br", _)) : r("", !0),
35
+ e.details ? (t(), o("small", p, s(e.details), 1)) : r("", !0),
36
+ x(i.$slots, "default", {}, void 0, !0)
37
+ ]),
38
+ _: 3
39
+ }, 8, ["closable", "title", "type", "text"]);
40
+ };
41
+ }
42
+ }), g = /* @__PURE__ */ y(v, [["__scopeId", "data-v-3b5794fd"]]);
43
+ export {
44
+ g as default
45
+ };
46
+ //# sourceMappingURL=x-alert-CWUIStcc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-alert-DKgk3dOE.js","sources":["../src/vue/x-alert.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 { AlertProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<AlertProps>();\n</script>\n<template>\n <v-alert :closable=\"closable\" :title=\"title\" :type=\"type\" :text=\"description\">\n <x-btn\n v-for=\"action of actions\"\n :key=\"action.name\"\n size=\"small\"\n variant=\"text\"\n @click=\"action.callback\"\n >{{ action.name }}</x-btn\n >\n <br v-if=\"details\" />\n <small v-if=\"details\">{{ details }}</small>\n <slot />\n </v-alert>\n</template>\n\n<style scoped>\n:deep(.v-alert__content a.router-link-active),\n:deep(.v-alert__content a.router-link-active:visited) {\n color: inherit;\n text-decoration-color: inherit;\n}\n</style>\n"],"names":["_createBlock","_component_v_alert","closable","title","type","description","_createElementBlock","_Fragment","_renderList","actions","action","_component_x_btn","_createTextVNode","_toDisplayString","details","_hoisted_1","_openBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;kBAyBEA,EAYUC,GAAA;AAAA,QAZA,UAAUC,EAAAA;AAAAA,QAAW,OAAOC,EAAAA;AAAAA,QAAQ,MAAMC,EAAAA;AAAAA,QAAO,MAAMC,EAAAA;AAAAA,MAAAA;mBAE7D,MAAyB;AAAA,kBAD3BC,EAOCC,GAAA,MAAAC,EANkBC,EAAAA,SAAO,CAAjBC,YADTV,EAOCW,GAAA;AAAA,YALE,KAAKD,EAAO;AAAA,YACb,MAAK;AAAA,YACL,SAAQ;AAAA,YACP,SAAOA,EAAO;AAAA,UAAA;uBACd,MAAiB;AAAA,cAAdE,EAAAC,EAAAH,EAAO,IAAI,GAAA,CAAA;AAAA,YAAA;;;UAEPI,EAAAA,gBAAVR,EAAqB,MAAAS,CAAA;UACRD,EAAAA,WAAbE,EAAA,GAAAV,EAA2C,cAAlBQ,EAAAA,OAAO,GAAA,CAAA;UAChCG,EAAQC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA;;;;;;"}
1
+ {"version":3,"file":"x-alert-CWUIStcc.js","sources":["../src/vue/x-alert.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 { AlertProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<AlertProps>();\n</script>\n<template>\n <v-alert :closable=\"closable\" :title=\"title\" :type=\"type\" :text=\"description\">\n <x-btn\n v-for=\"action of actions\"\n :key=\"action.name\"\n size=\"small\"\n variant=\"text\"\n @click=\"action.callback\"\n >{{ action.name }}</x-btn\n >\n <br v-if=\"details\" />\n <small v-if=\"details\">{{ details }}</small>\n <slot />\n </v-alert>\n</template>\n\n<style scoped>\n:deep(.v-alert__content a.router-link-active),\n:deep(.v-alert__content a.router-link-active:visited) {\n color: inherit;\n text-decoration-color: inherit;\n}\n</style>\n"],"names":["_createBlock","_component_v_alert","__props","_createElementBlock","_Fragment","_renderList","action","_component_x_btn","_createTextVNode","_toDisplayString","_hoisted_1","_openBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;kBAyBEA,EAYUC,GAAA;AAAA,QAZA,UAAUC,EAAA;AAAA,QAAW,OAAOA,EAAA;AAAA,QAAQ,MAAMA,EAAA;AAAA,QAAO,MAAMA,EAAA;AAAA,MAAA;mBAE7D,MAAyB;AAAA,kBAD3BC,EAOCC,GAAA,MAAAC,EANkBH,EAAA,SAAO,CAAjBI,YADTN,EAOCO,GAAA;AAAA,YALE,KAAKD,EAAO;AAAA,YACb,MAAK;AAAA,YACL,SAAQ;AAAA,YACP,SAAOA,EAAO;AAAA,UAAA;uBACd,MAAiB;AAAA,cAAdE,EAAAC,EAAAH,EAAO,IAAI,GAAA,CAAA;AAAA,YAAA;;;UAEPJ,EAAA,gBAAVC,EAAqB,MAAAO,CAAA;UACRR,EAAA,WAAbS,EAAA,GAAAR,EAA2C,cAAlBD,EAAA,OAAO,GAAA,CAAA;UAChCU,EAAQC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA;;;;;;"}
@@ -0,0 +1,28 @@
1
+ import { defineComponent as m, resolveComponent as a, createBlock as n, openBlock as t, withCtx as i, createElementBlock as s, toDisplayString as r } from "vue";
2
+ const l = { key: 1 }, u = /* @__PURE__ */ m({
3
+ __name: "x-avatar",
4
+ props: {
5
+ image: {},
6
+ size: {},
7
+ name: {}
8
+ },
9
+ setup(e) {
10
+ return (v, _) => {
11
+ const o = a("v-img"), c = a("v-avatar");
12
+ return t(), n(c, { size: e.size }, {
13
+ default: i(() => [
14
+ e.image ? (t(), n(o, {
15
+ key: 0,
16
+ alt: e.name,
17
+ src: e.image
18
+ }, null, 8, ["alt", "src"])) : (t(), s("span", l, r(e.name), 1))
19
+ ]),
20
+ _: 1
21
+ }, 8, ["size"]);
22
+ };
23
+ }
24
+ });
25
+ export {
26
+ u as default
27
+ };
28
+ //# sourceMappingURL=x-avatar-B5IoAQPQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-avatar-WnkeGyHH.js","sources":["../src/vue/x-avatar.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 type { AvatarProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<AvatarProps>();\n</script>\n<template>\n <v-avatar :size=\"size\">\n <v-img v-if=\"image\" :alt=\"name\" :src=\"image\"></v-img>\n <span v-else>{{ name }}</span>\n </v-avatar>\n</template>\n"],"names":["_createBlock","_component_v_avatar","size","image","_component_v_img","name","_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;kBAyBEA,EAGWC,GAAA,EAHA,MAAMC,EAAAA,QAAI;AAAA,mBACnB,MAAqD;AAAA,UAAxCC,EAAAA,cAAbH,EAAqDI,GAAA;AAAA;YAAhC,KAAKC,EAAAA;AAAAA,YAAO,KAAKF,EAAAA;AAAAA,UAAAA,gCACtCG,EAAA,GAAAC,EAA8B,aAAdF,EAAAA,IAAI,GAAA,CAAA;AAAA,QAAA;;;;;;"}
1
+ {"version":3,"file":"x-avatar-B5IoAQPQ.js","sources":["../src/vue/x-avatar.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 type { AvatarProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<AvatarProps>();\n</script>\n<template>\n <v-avatar :size=\"size\">\n <v-img v-if=\"image\" :alt=\"name\" :src=\"image\"></v-img>\n <span v-else>{{ name }}</span>\n </v-avatar>\n</template>\n"],"names":["_createBlock","_component_v_avatar","__props","_component_v_img","_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;kBAyBEA,EAGWC,GAAA,EAHA,MAAMC,EAAA,QAAI;AAAA,mBACnB,MAAqD;AAAA,UAAxCA,EAAA,cAAbF,EAAqDG,GAAA;AAAA;YAAhC,KAAKD,EAAA;AAAA,YAAO,KAAKA,EAAA;AAAA,UAAA,gCACtCE,EAAA,GAAAC,EAA8B,aAAdH,EAAA,IAAI,GAAA,CAAA;AAAA,QAAA;;;;;;"}
@@ -0,0 +1,28 @@
1
+ import { defineComponent as m, mergeModels as t, useModel as d, createBlock as u, openBlock as n, unref as s } from "vue";
2
+ import { d as c } from "./index-DuymNdmD.js";
3
+ const V = /* @__PURE__ */ m({
4
+ __name: "x-checkbox",
5
+ props: /* @__PURE__ */ t({
6
+ label: {},
7
+ help: {},
8
+ modelValue: { type: Boolean }
9
+ }, {
10
+ modelValue: { type: [Boolean, null] },
11
+ modelModifiers: {}
12
+ }),
13
+ emits: ["update:modelValue"],
14
+ setup(e) {
15
+ const l = d(e, "modelValue");
16
+ return (r, o) => (n(), u(s(c), {
17
+ modelValue: l.value,
18
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => l.value = a),
19
+ label: e.label,
20
+ messages: e.help,
21
+ density: "compact"
22
+ }, null, 8, ["modelValue", "label", "messages"]));
23
+ }
24
+ });
25
+ export {
26
+ V as default
27
+ };
28
+ //# sourceMappingURL=x-checkbox-DPBHV522.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-checkbox-EzA-ce8R.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/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","_createBlock","_unref","VCheckbox","$event","label","help"],"mappings":";;;;;;;;;;;;;;AAyBA,UAAMA,IAAUC,iBAA4B;2BAG1CC,EAKcC,EAAAC,CAAA,GAAA;AAAA,kBAJHJ,EAAA;AAAA,oDAAAA,EAAO,QAAAK;AAAA,MACf,OAAOC,EAAAA;AAAAA,MACP,UAAUC,EAAAA;AAAAA,MACX,SAAQ;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"x-checkbox-DPBHV522.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/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","_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;;;"}
@@ -0,0 +1,49 @@
1
+ import { defineComponent as m, resolveComponent as o, createBlock as n, openBlock as c, withCtx as t, createVNode as d, createCommentVNode as p, renderSlot as a, createElementVNode as u, normalizeProps as f, guardReactiveProps as h } from "vue";
2
+ import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const g = /* @__PURE__ */ m({
4
+ __name: "x-dialog",
5
+ props: {
6
+ title: {},
7
+ width: {}
8
+ },
9
+ setup(r) {
10
+ return (e, x) => {
11
+ const l = o("v-card-text"), i = o("v-card-actions"), s = o("v-card"), _ = o("v-dialog");
12
+ return c(), n(_, {
13
+ width: r.width,
14
+ attach: "#view",
15
+ scrollable: ""
16
+ }, {
17
+ activator: t(({ props: v }) => [
18
+ u("span", f(h(v)), [
19
+ a(e.$slots, "activator", {}, void 0, !0)
20
+ ], 16)
21
+ ]),
22
+ default: t(() => [
23
+ d(s, { title: r.title }, {
24
+ default: t(() => [
25
+ d(l, null, {
26
+ default: t(() => [
27
+ a(e.$slots, "default", {}, void 0, !0)
28
+ ]),
29
+ _: 3
30
+ }),
31
+ e.$slots.footer ? (c(), n(i, { key: 0 }, {
32
+ default: t(() => [
33
+ a(e.$slots, "footer", {}, void 0, !0)
34
+ ]),
35
+ _: 3
36
+ })) : p("", !0)
37
+ ]),
38
+ _: 3
39
+ }, 8, ["title"])
40
+ ]),
41
+ _: 3
42
+ }, 8, ["width"]);
43
+ };
44
+ }
45
+ }), k = /* @__PURE__ */ w(g, [["__scopeId", "data-v-9e36865e"]]);
46
+ export {
47
+ k as default
48
+ };
49
+ //# sourceMappingURL=x-dialog-C3nQDBym.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-dialog-CvZUbP80.js","sources":["../src/vue/x-dialog.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>\ndefineProps<{\n title: string;\n width: string | number | undefined;\n}>();\n</script>\n\n<template>\n <v-dialog :width=\"width\" attach=\"#view\" scrollable>\n <template #activator=\"{ props }\">\n <span v-bind=\"props\">\n <slot name=\"activator\" />\n </span>\n </template>\n <template #default>\n <v-card :title=\"title\">\n <v-card-text>\n <slot name=\"default\" />\n </v-card-text>\n <v-card-actions v-if=\"$slots.footer\">\n <slot name=\"footer\" />\n </v-card-actions>\n </v-card>\n </template>\n </v-dialog>\n</template>\n\n<style scoped>\n:deep(.v-card-actions) {\n padding: var(--cr-spacing-large);\n}\n</style>\n"],"names":["_createBlock","_component_v_dialog","width","_withCtx","props","_createElementVNode","_renderSlot","_ctx","_createVNode","_component_v_card","title","_component_v_card_text","$slots","_component_v_card_actions"],"mappings":";;;;;;;;;;;kBA2BEA,EAgBWC,GAAA;AAAA,QAhBA,OAAOC,EAAAA;AAAAA,QAAO,QAAO;AAAA,QAAQ,YAAA;AAAA,MAAA;QAC3B,WAASC,EAClB,CAEO,EAHe,OAAAC,QAAK;AAAA,UAC3BC,EAEO,YAFOD,CAAK,CAAA,GAAA;AAAA,YACjBE,EAAyBC,EAAA,QAAA,aAAA,CAAA,GAAA,QAAA,EAAA;AAAA,UAAA;;QAGlB,WACT,MAOS;AAAA,UAPTC,EAOSC,GAAA,EAPA,OAAOC,EAAAA,SAAK;AAAA,uBACnB,MAEc;AAAA,cAFdF,EAEcG,GAAA,MAAA;AAAA,2BADZ,MAAuB;AAAA,kBAAvBL,EAAuBC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,gBAAA;;;cAEHK,EAAAA,OAAO,eAA7BZ,EAEiBa,GAAA,EAAA,KAAA,KAAA;AAAA,2BADf,MAAsB;AAAA,kBAAtBP,EAAsBC,EAAA,QAAA,UAAA,CAAA,GAAA,QAAA,EAAA;AAAA,gBAAA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"x-dialog-C3nQDBym.js","sources":["../src/vue/x-dialog.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>\ndefineProps<{\n title: string;\n width: string | number | undefined;\n}>();\n</script>\n\n<template>\n <v-dialog :width=\"width\" attach=\"#view\" scrollable>\n <template #activator=\"{ props }\">\n <span v-bind=\"props\">\n <slot name=\"activator\" />\n </span>\n </template>\n <template #default>\n <v-card :title=\"title\">\n <v-card-text>\n <slot name=\"default\" />\n </v-card-text>\n <v-card-actions v-if=\"$slots.footer\">\n <slot name=\"footer\" />\n </v-card-actions>\n </v-card>\n </template>\n </v-dialog>\n</template>\n\n<style scoped>\n:deep(.v-card-actions) {\n padding: var(--cr-spacing-large);\n}\n</style>\n"],"names":["_createBlock","_component_v_dialog","__props","_withCtx","props","_createElementVNode","_renderSlot","_ctx","_createVNode","_component_v_card","_component_v_card_text","$slots","_component_v_card_actions"],"mappings":";;;;;;;;;;;kBA2BEA,EAgBWC,GAAA;AAAA,QAhBA,OAAOC,EAAA;AAAA,QAAO,QAAO;AAAA,QAAQ,YAAA;AAAA,MAAA;QAC3B,WAASC,EAClB,CAEO,EAHe,OAAAC,QAAK;AAAA,UAC3BC,EAEO,YAFOD,CAAK,CAAA,GAAA;AAAA,YACjBE,EAAyBC,EAAA,QAAA,aAAA,CAAA,GAAA,QAAA,EAAA;AAAA,UAAA;;QAGlB,WACT,MAOS;AAAA,UAPTC,EAOSC,GAAA,EAPA,OAAOP,EAAA,SAAK;AAAA,uBACnB,MAEc;AAAA,cAFdM,EAEcE,GAAA,MAAA;AAAA,2BADZ,MAAuB;AAAA,kBAAvBJ,EAAuBC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,gBAAA;;;cAEHI,EAAAA,OAAO,eAA7BX,EAEiBY,GAAA,EAAA,KAAA,KAAA;AAAA,2BADf,MAAsB;AAAA,kBAAtBN,EAAsBC,EAAA,QAAA,UAAA,CAAA,GAAA,QAAA,EAAA;AAAA,gBAAA;;;;;;;;;;;;"}
@@ -1,10 +1,10 @@
1
- import { defineComponent as s, mergeModels as m, useModel as p, computed as d, createBlock as i, openBlock as f, unref as c } from "vue";
1
+ import { defineComponent as m, mergeModels as s, useModel as d, computed as i, createBlock as p, openBlock as f, unref as c } from "vue";
2
2
  import { t as V } from "./translations-BVK9UR9x.js";
3
3
  import { useI18n as y } from "vue-i18n";
4
- import { b } from "./index-D8yc5V3N.js";
5
- const k = /* @__PURE__ */ s({
4
+ import { b } from "./index-DuymNdmD.js";
5
+ const g = /* @__PURE__ */ m({
6
6
  __name: "x-file-input",
7
- props: /* @__PURE__ */ m({
7
+ props: /* @__PURE__ */ s({
8
8
  name: {},
9
9
  label: {},
10
10
  required: { type: Boolean },
@@ -18,23 +18,23 @@ const k = /* @__PURE__ */ s({
18
18
  modelModifiers: {}
19
19
  }),
20
20
  emits: ["update:modelValue"],
21
- setup(o) {
21
+ setup(e) {
22
22
  const { t: u } = y({
23
23
  messages: V
24
- }), t = p(o, "modelValue"), a = o, r = d(() => {
25
- const e = [];
26
- return a.required && e.push((l) => l ? !0 : u("vuetify.file.input.mandatory")), e;
24
+ }), t = d(e, "modelValue"), a = e, n = i(() => {
25
+ const o = [];
26
+ return a.required && o.push((l) => l ? !0 : u("vuetify.file.input.mandatory")), o;
27
27
  });
28
- return (e, l) => (f(), i(c(b), {
28
+ return (o, l) => (f(), p(c(b), {
29
29
  modelValue: t.value,
30
- "onUpdate:modelValue": l[0] || (l[0] = (n) => t.value = n),
30
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => t.value = r),
31
31
  label: e.label,
32
32
  name: e.name,
33
- rules: r.value
33
+ rules: n.value
34
34
  }, null, 8, ["modelValue", "label", "name", "rules"]));
35
35
  }
36
36
  });
37
37
  export {
38
- k as default
38
+ g as default
39
39
  };
40
- //# sourceMappingURL=x-file-input-7TdHHaG2.js.map
40
+ //# sourceMappingURL=x-file-input-BF8IdlrX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-file-input-7TdHHaG2.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, 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","_createBlock","_unref","VFileInput","$event","label","name"],"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,OAAOC,EAAAA;AAAAA,MACP,MAAMC,EAAAA;AAAAA,MACN,OAAOT,EAAA;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"x-file-input-BF8IdlrX.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, 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","_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, createBlock as f, openBlock as c, unref as u, withModifiers as d, withCtx as _, renderSlot as l } from "vue";
2
- import { V as p } from "./index-D8yc5V3N.js";
2
+ import { V as p } from "./index-DuymNdmD.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-DrjHf0um.js.map
33
+ //# sourceMappingURL=x-form-7_KNhAtf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-form-DrjHf0um.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-7_KNhAtf.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;;;;;"}
@@ -0,0 +1,26 @@
1
+ import { defineComponent as o, resolveComponent as a, createBlock as n, openBlock as s, withCtx as d, renderSlot as i } from "vue";
2
+ const u = /* @__PURE__ */ o({
3
+ __name: "x-menu-item",
4
+ props: {
5
+ value: {},
6
+ disabled: { type: Boolean }
7
+ },
8
+ setup(e) {
9
+ return (t, m) => {
10
+ const l = a("v-list-item");
11
+ return s(), n(l, {
12
+ value: e.value,
13
+ disabled: e.disabled
14
+ }, {
15
+ default: d(() => [
16
+ i(t.$slots, "default")
17
+ ]),
18
+ _: 3
19
+ }, 8, ["value", "disabled"]);
20
+ };
21
+ }
22
+ });
23
+ export {
24
+ u as default
25
+ };
26
+ //# sourceMappingURL=x-menu-item-Ph5-wwcR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-menu-item-CBdOhZc3.js","sources":["../src/vue/x-menu-item.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>\ndefineProps<{\n value: string;\n}>();\n</script>\n<template>\n <v-list-item :value=\"value\">\n <slot name=\"default\" />\n </v-list-item>\n</template>\n"],"names":["_createBlock","_component_v_list_item","value","_renderSlot","_ctx"],"mappings":";;;;;;;;;kBAyBEA,EAEcC,GAAA,EAFA,OAAOC,EAAAA,SAAK;AAAA,mBACxB,MAAuB;AAAA,UAAvBC,EAAuBC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
1
+ {"version":3,"file":"x-menu-item-Ph5-wwcR.js","sources":["../src/vue/x-menu-item.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 type { MenuItemProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<MenuItemProps>();\n</script>\n<template>\n <v-list-item :value=\"value\" :disabled=\"disabled\">\n <slot name=\"default\" />\n </v-list-item>\n</template>\n"],"names":["_createBlock","_component_v_list_item","__props","_renderSlot","_ctx"],"mappings":";;;;;;;;;;kBAyBEA,EAEcC,GAAA;AAAA,QAFA,OAAOC,EAAA;AAAA,QAAQ,UAAUA,EAAA;AAAA,MAAA;mBACrC,MAAuB;AAAA,UAAvBC,EAAuBC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
@@ -1,6 +1,6 @@
1
- import { defineComponent as b, mergeDefaults as S, inject as A, ref as _, onBeforeMount as B, watch as E, createBlock as F, openBlock as g, unref as L, withCtx as U, createElementBlock as P, withModifiers as M, toDisplayString as R } from "vue";
1
+ import { defineComponent as b, mergeDefaults as S, inject as A, ref as _, onBeforeMount as B, watch as E, createBlock as F, openBlock as g, unref as L, withCtx as U, createElementBlock as R, withModifiers as M, toDisplayString as I } from "vue";
2
2
  import { SpaceReference as j } from "@xwiki/cristal-model-api";
3
- import { c as z } from "./index-D8yc5V3N.js";
3
+ import { c as z } from "./index-DuymNdmD.js";
4
4
  import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const $ = {
6
6
  includeTerminals: !0
@@ -12,14 +12,14 @@ const $ = {
12
12
  includeTerminals: { type: Boolean },
13
13
  showRootNode: { type: Boolean }
14
14
  }, $),
15
- setup(I) {
16
- const m = A("cristal"), w = m.getContainer().get("DocumentService"), s = m.getContainer().get("NavigationTreeSourceProvider").get(), l = _([]), a = _(new Array()), f = _([]);
15
+ setup(m) {
16
+ const w = A("cristal"), N = w.getContainer().get("DocumentService"), s = w.getContainer().get("NavigationTreeSourceProvider").get(), l = _([]), a = _(new Array()), f = _([]);
17
17
  var h = !1;
18
- const i = I;
18
+ const i = m;
19
19
  B(async () => {
20
- const o = [];
20
+ const r = [];
21
21
  for (const n of await u(""))
22
- o.push({
22
+ r.push({
23
23
  id: n.id,
24
24
  title: n.label,
25
25
  href: n.url,
@@ -31,27 +31,27 @@ const $ = {
31
31
  id: "",
32
32
  title: "Root",
33
33
  href: ".",
34
- children: o,
34
+ children: r,
35
35
  _location: new j(),
36
36
  _is_terminal: !1
37
- }) : l.value.push(...o), await N(), w.registerDocumentChangeListener("delete", T), w.registerDocumentChangeListener("update", x);
38
- }), E(() => i.currentPageReference, N);
39
- async function N() {
37
+ }) : l.value.push(...r), await y(), N.registerDocumentChangeListener("delete", T), N.registerDocumentChangeListener("update", x);
38
+ }), E(() => i.currentPageReference, y);
39
+ async function y() {
40
40
  if (i.currentPageReference && !h) {
41
41
  h = !0;
42
- const o = s.getParentNodesId(
42
+ const r = s.getParentNodesId(
43
43
  i.currentPageReference,
44
44
  i.includeTerminals,
45
45
  i.showRootNode
46
46
  );
47
47
  let n, t = l.value;
48
- for (n = 0; n < o.length - 1; n++)
48
+ for (n = 0; n < r.length - 1; n++)
49
49
  if (t)
50
50
  for (const e of t)
51
- e.id == o[n] && (e.children?.length == 0 && await y(e), f.value.includes(e.id) || f.value.push(e.id), t = e.children);
51
+ e.id == r[n] && (e.children?.length == 0 && await k(e), f.value.includes(e.id) || f.value.push(e.id), t = e.children);
52
52
  if (t)
53
53
  for (const e of t)
54
- e.id == o[n] && (a.value = [e.id], i.clickAction && i.clickAction({
54
+ e.id == r[n] && (a.value = [e.id], i.clickAction && i.clickAction({
55
55
  id: e.id,
56
56
  label: e.title,
57
57
  location: e._location,
@@ -62,8 +62,8 @@ const $ = {
62
62
  h = !1;
63
63
  }
64
64
  }
65
- async function y(o) {
66
- const n = o, t = await u(n.id);
65
+ async function k(r) {
66
+ const n = r, t = await u(n.id);
67
67
  for (const e of t)
68
68
  n.children?.push({
69
69
  id: e.id,
@@ -78,9 +78,9 @@ const $ = {
78
78
  function C() {
79
79
  a.value.length > 1 && a.value.pop();
80
80
  }
81
- async function T(o) {
81
+ async function T(r) {
82
82
  const n = s.getParentNodesId(
83
- o,
83
+ r,
84
84
  i.includeTerminals,
85
85
  i.showRootNode
86
86
  );
@@ -98,74 +98,74 @@ const $ = {
98
98
  d = !0;
99
99
  }
100
100
  }
101
- async function x(o) {
101
+ async function x(r) {
102
102
  const n = s.getParentNodesId(
103
- o,
103
+ r,
104
104
  i.includeTerminals,
105
105
  i.showRootNode
106
106
  );
107
107
  let t, e = l.value, d = !1, c = !0;
108
108
  e: for (; e && !d; ) {
109
- for (const r of e.keys())
110
- if (e[r].id == n[0])
109
+ for (const o of e.keys())
110
+ if (e[o].id == n[0])
111
111
  if (n.length == 1) {
112
- const v = await u(
112
+ const p = await u(
113
113
  t || ""
114
114
  );
115
- for (const k of v)
116
- if (k.id == e[r].id) {
117
- e[r].title = k.label;
115
+ for (const P of p)
116
+ if (P.id == e[o].id) {
117
+ e[o].title = P.label;
118
118
  return;
119
119
  }
120
120
  } else {
121
- t = e[r].id, e[r].children || (e[r].children = []), e = e[r].children, n.shift(), c = !1;
121
+ t = e[o].id, e[o].children || (e[o].children = []), e = e[o].children, n.shift(), c = !1;
122
122
  continue e;
123
123
  }
124
124
  d = !0;
125
125
  }
126
126
  if (e.length == 0 && !c)
127
127
  return;
128
- const D = await u(t || ""), p = i.currentPageReference ? s.getParentNodesId(
128
+ const D = await u(t || ""), v = i.currentPageReference ? s.getParentNodesId(
129
129
  i.currentPageReference,
130
130
  i.includeTerminals
131
131
  ) : [];
132
- e: for (const r of D) {
133
- for (const v of e.keys())
134
- if (r.id == e[v].id)
132
+ e: for (const o of D) {
133
+ for (const p of e.keys())
134
+ if (o.id == e[p].id)
135
135
  continue e;
136
136
  e.push({
137
- id: r.id,
138
- title: r.label,
139
- href: r.url,
140
- children: r.has_children ? [] : void 0,
141
- _location: r.location,
142
- _is_terminal: r.is_terminal
143
- }), p.length > 0 && p[p.length - 1] === r.id && (a.value = [r.id]);
137
+ id: o.id,
138
+ title: o.label,
139
+ href: o.url,
140
+ children: o.has_children ? [] : void 0,
141
+ _location: o.location,
142
+ _is_terminal: o.is_terminal
143
+ }), v.length > 0 && v[v.length - 1] === o.id && (a.value = [o.id]);
144
144
  }
145
145
  }
146
- async function u(o) {
147
- return (await s.getChildNodes(o)).filter(
146
+ async function u(r) {
147
+ return (await s.getChildNodes(r)).filter(
148
148
  (n) => i.includeTerminals || !n.is_terminal
149
149
  );
150
150
  }
151
- return (o, n) => (g(), F(L(z), {
151
+ return (r, n) => (g(), F(L(z), {
152
152
  opened: f.value,
153
153
  "onUpdate:opened": n[0] || (n[0] = (t) => f.value = t),
154
154
  density: "compact",
155
155
  activated: a.value,
156
156
  items: l.value,
157
- "load-children": y,
157
+ "load-children": k,
158
158
  activatable: "",
159
159
  "active-strategy": "independent",
160
160
  "item-value": "id",
161
161
  "onUpdate:activated": C
162
162
  }, {
163
163
  title: U(({ item: t }) => [
164
- i.clickAction ? (g(), P("a", {
164
+ i.clickAction ? (g(), R("a", {
165
165
  key: 0,
166
166
  href: t.href,
167
167
  onClick: M((e) => {
168
- a.value = [t.id], o.clickAction({
168
+ a.value = [t.id], m.clickAction({
169
169
  id: t.id,
170
170
  label: t.title,
171
171
  location: t._location,
@@ -174,10 +174,10 @@ const $ = {
174
174
  is_terminal: t._is_terminal
175
175
  });
176
176
  }, ["prevent"])
177
- }, R(t.title), 9, q)) : (g(), P("a", {
177
+ }, I(t.title), 9, q)) : (g(), R("a", {
178
178
  key: 1,
179
179
  href: t.href
180
- }, R(t.title), 9, G))
180
+ }, I(t.title), 9, G))
181
181
  ]),
182
182
  _: 1
183
183
  }, 8, ["opened", "activated", "items"]));
@@ -186,4 +186,4 @@ const $ = {
186
186
  export {
187
187
  W as default
188
188
  };
189
- //# sourceMappingURL=x-navigation-tree-BcW_691Y.js.map
189
+ //# sourceMappingURL=x-navigation-tree-B5pIL2rS.js.map