@xwiki/cristal-dsvuetify 0.21.1 → 0.22.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 (40) hide show
  1. package/CHANGELOG.md +11 -8
  2. package/api-extractor.json +4 -0
  3. package/dist/components/componentsInit.d.ts +3 -0
  4. package/dist/{index-BrgIqIDX.js → index-D8yc5V3N.js} +3144 -3097
  5. package/dist/index-D8yc5V3N.js.map +1 -0
  6. package/dist/index.es.js +3 -3
  7. package/dist/index.umd.js +7 -7
  8. package/dist/index.umd.js.map +1 -1
  9. package/dist/vue/form/x-form.vue.d.ts +58 -58
  10. package/dist/x-breadcrumb-DiDfmxr5.js +22 -0
  11. package/dist/{x-breadcrumb-DAVkDLuc.js.map → x-breadcrumb-DiDfmxr5.js.map} +1 -1
  12. package/dist/{x-checkbox-BgfaZdm4.js → x-checkbox-EzA-ce8R.js} +2 -2
  13. package/dist/{x-checkbox-BgfaZdm4.js.map → x-checkbox-EzA-ce8R.js.map} +1 -1
  14. package/dist/{x-file-input-CavZBvoc.js → x-file-input-7TdHHaG2.js} +2 -2
  15. package/dist/{x-file-input-CavZBvoc.js.map → x-file-input-7TdHHaG2.js.map} +1 -1
  16. package/dist/{x-form-By-DBhfe.js → x-form-DrjHf0um.js} +2 -2
  17. package/dist/{x-form-By-DBhfe.js.map → x-form-DrjHf0um.js.map} +1 -1
  18. package/dist/{x-navigation-tree-DDzkOI4X.js → x-navigation-tree-BcW_691Y.js} +2 -2
  19. package/dist/x-navigation-tree-BcW_691Y.js.map +1 -0
  20. package/dist/{x-navigation-tree-select-BSwLmNS-.js → x-navigation-tree-select-_13SOFbP.js} +3 -3
  21. package/dist/x-navigation-tree-select-_13SOFbP.js.map +1 -0
  22. package/dist/{x-select-BMnDdspj.js → x-select-DnRsSLAX.js} +2 -2
  23. package/dist/{x-select-BMnDdspj.js.map → x-select-DnRsSLAX.js.map} +1 -1
  24. package/dist/x-tab-group-BfEaq8Nj.js.map +1 -1
  25. package/dist/x-tab-panel-DysgiPCz.js.map +1 -1
  26. package/dist/x-tab-vRrbUjdK.js.map +1 -1
  27. package/dist/{x-text-field-OCXMbIfP.js → x-text-field-BWaRETwR.js} +2 -2
  28. package/dist/{x-text-field-OCXMbIfP.js.map → x-text-field-BWaRETwR.js.map} +1 -1
  29. package/etc/cristal-dsvuetify.api.md +16 -0
  30. package/package.json +19 -18
  31. package/src/components/componentsInit.ts +3 -0
  32. package/src/vue/x-breadcrumb.vue +1 -1
  33. package/src/vue/x-tab-group.vue +2 -1
  34. package/src/vue/x-tab-panel.vue +1 -1
  35. package/src/vue/x-tab.vue +1 -1
  36. package/vitest.config.ts +1 -1
  37. package/dist/index-BrgIqIDX.js.map +0 -1
  38. package/dist/x-breadcrumb-DAVkDLuc.js +0 -22
  39. package/dist/x-navigation-tree-DDzkOI4X.js.map +0 -1
  40. package/dist/x-navigation-tree-select-BSwLmNS-.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-navigation-tree-BcW_691Y.js","sources":["../../api/src/XNavigationTree.ts","../src/vue/x-navigation-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\nimport type { DocumentReference } from \"@xwiki/cristal-model-api\";\nimport type { NavigationTreeNode } from \"@xwiki/cristal-navigation-tree-api\";\n\n/**\n * @since 0.15\n * @beta\n */\ntype NavigationTreeProps = {\n clickAction?: (node: NavigationTreeNode) => void;\n currentPageReference?: DocumentReference;\n /**\n * Whether to include terminal pages in the tree (default: true).\n * @since 0.16\n * @beta\n */\n includeTerminals?: boolean;\n /**\n * Whether to display a root node (default: false).\n * @since 0.20\n * @beta\n */\n showRootNode?: boolean;\n};\n\n/**\n * Default props values for NavigationTree implementations.\n * @since 0.16\n * @beta\n */\nconst navigationTreePropsDefaults = {\n includeTerminals: true,\n};\n\nexport type { NavigationTreeProps };\nexport { navigationTreePropsDefaults };\n","<!--\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\">\n/**\n * Navigation Tree implemented using Vuetify's VTreeView component.\n * In order to use the initial component as a proper Navigation Tree for\n * Cristal, a few changes were made:\n * - The only node activated matches the current page, or the clicked link if\n * the component has a custom clickAction. We want to use actual links so\n * that the user can click them normally (to e.g., open them in a new tab).\n * So the default behavior of activating a node by clicking anywhere on the\n * item was disabled. Default hover effects, such as darkening or changing\n * the cursor on items, were also disabled.\n */\nimport { navigationTreePropsDefaults } from \"@xwiki/cristal-dsapi\";\nimport { SpaceReference } from \"@xwiki/cristal-model-api\";\nimport { inject, onBeforeMount, ref, watch } from \"vue\";\nimport { VTreeview } from \"vuetify/components/VTreeview\";\nimport type { CristalApp } from \"@xwiki/cristal-api\";\nimport type { DocumentService } from \"@xwiki/cristal-document-api\";\nimport type { NavigationTreeProps } from \"@xwiki/cristal-dsapi\";\nimport type { DocumentReference } from \"@xwiki/cristal-model-api\";\nimport type {\n NavigationTreeSource,\n NavigationTreeSourceProvider,\n} from \"@xwiki/cristal-navigation-tree-api\";\nimport type { Ref } from \"vue\";\n\ntype TreeItem = {\n id: string;\n title: string;\n href: string;\n children?: Array<TreeItem>;\n _location: SpaceReference | DocumentReference;\n _is_terminal: boolean;\n};\n\nconst cristal: CristalApp = inject<CristalApp>(\"cristal\")!;\nconst documentService: DocumentService = cristal\n .getContainer()\n .get<DocumentService>(\"DocumentService\");\nconst treeSource: NavigationTreeSource = cristal\n .getContainer()\n .get<NavigationTreeSourceProvider>(\"NavigationTreeSourceProvider\")\n .get();\n\nconst rootNodes: Ref<Array<TreeItem>> = ref([]);\n\nconst activatedNodes: Ref<Array<string>> = ref(new Array<string>());\nconst expandedNodes: Ref<unknown> = ref([]);\nvar isExpanding: boolean = false;\n\nconst props = withDefaults(\n defineProps<NavigationTreeProps>(),\n navigationTreePropsDefaults,\n);\n\nonBeforeMount(async () => {\n const newRootNodes: Array<TreeItem> = [];\n for (const node of await getChildNodes(\"\")) {\n newRootNodes.push({\n id: node.id,\n title: node.label,\n href: node.url,\n children: node.has_children ? [] : undefined,\n _location: node.location,\n _is_terminal: node.is_terminal,\n });\n }\n if (props.showRootNode) {\n rootNodes.value.push({\n id: \"\",\n title: \"Root\",\n href: \".\",\n children: newRootNodes,\n _location: new SpaceReference(),\n _is_terminal: false,\n });\n } else {\n rootNodes.value.push(...newRootNodes);\n }\n await expandTree();\n\n documentService.registerDocumentChangeListener(\"delete\", onDocumentDelete);\n documentService.registerDocumentChangeListener(\"update\", onDocumentUpdate);\n});\n\nwatch(() => props.currentPageReference, expandTree);\n\n// TODO: reduce the number of statements in the following method and reactivate the disabled eslint rule.\n// eslint-disable-next-line max-statements\nasync function expandTree() {\n if (props.currentPageReference && !isExpanding) {\n isExpanding = true;\n const newExpandedNodes = treeSource.getParentNodesId(\n props.currentPageReference!,\n props.includeTerminals,\n props.showRootNode,\n );\n let i;\n let currentNodes = rootNodes.value;\n for (i = 0; i < newExpandedNodes.length - 1; i++) {\n if (currentNodes) {\n for (const node of currentNodes) {\n if (node.id == newExpandedNodes[i]) {\n if (node.children?.length == 0) {\n await lazyLoadChildren(node);\n }\n if (!(expandedNodes.value as unknown[]).includes(node.id)) {\n (expandedNodes.value as unknown[]).push(node.id);\n }\n currentNodes = node.children!;\n }\n }\n }\n }\n if (currentNodes) {\n for (const node of currentNodes) {\n if (node.id == newExpandedNodes[i]) {\n activatedNodes.value = [node.id];\n // If we have a custom click action, we want to use it on dynamic\n // selection.\n if (props.clickAction) {\n props.clickAction({\n id: node.id,\n label: node.title,\n location: node._location,\n url: node.href,\n has_children: node.children !== undefined,\n is_terminal: node._is_terminal,\n });\n }\n }\n }\n }\n isExpanding = false;\n }\n}\n\nasync function lazyLoadChildren(item: unknown) {\n const treeItem = item as TreeItem;\n const childNodes = await getChildNodes(treeItem.id);\n for (const child of childNodes) {\n treeItem.children?.push({\n id: child.id,\n title: child.label,\n href: child.url,\n children: child.has_children ? [] : undefined,\n _location: child.location,\n _is_terminal: child.is_terminal,\n });\n }\n // If the node doesn't have any children, we update it.\n if (childNodes.length == 0) {\n treeItem.children = undefined;\n }\n}\n\nfunction clearSelection() {\n // Clicking on a node would activate it and this can't be disabled easily.\n // With this listener, we ensure that only the first activated node stays\n // active.\n if (activatedNodes.value.length > 1) {\n activatedNodes.value.pop();\n }\n}\n\n// TODO: reduce the number of statements in the following method and reactivate the disabled eslint rule.\n// eslint-disable-next-line max-statements\nasync function onDocumentDelete(page: DocumentReference) {\n const parents = treeSource.getParentNodesId(\n page,\n props.includeTerminals,\n props.showRootNode,\n );\n let currentItem: TreeItem | undefined = undefined;\n let currentItemChildren: TreeItem[] | undefined = rootNodes.value;\n let notFound = false;\n\n currentItemsLoop: while (currentItemChildren && !notFound) {\n for (const i of currentItemChildren.keys()) {\n if (currentItemChildren[i].id == parents[0]) {\n if (parents.length == 1) {\n currentItemChildren.splice(i, 1);\n if (currentItem && currentItemChildren.length == 0) {\n currentItem!.children = undefined;\n }\n return;\n } else {\n currentItem = currentItemChildren[i];\n currentItemChildren = currentItem.children;\n parents.shift();\n continue currentItemsLoop;\n }\n }\n }\n notFound = true;\n }\n}\n\n// TODO: reduce the number of statements in the following method and reactivate the disabled eslint rule.\n// eslint-disable-next-line max-statements\nasync function onDocumentUpdate(page: DocumentReference) {\n const parents = treeSource.getParentNodesId(\n page,\n props.includeTerminals,\n props.showRootNode,\n );\n let currentParent: string | undefined = undefined;\n let currentItems: TreeItem[] | undefined = rootNodes.value;\n let notFound = false;\n let isRoot = true;\n\n currentItemsLoop: while (currentItems && !notFound) {\n for (const i of currentItems.keys()) {\n if (currentItems[i].id == parents[0]) {\n if (parents.length == 1) {\n // Page update\n const newItems = await getChildNodes(\n currentParent ? currentParent : \"\",\n );\n for (const newItem of newItems) {\n if (newItem.id == currentItems[i].id) {\n currentItems[i].title = newItem.label;\n return;\n }\n }\n } else {\n currentParent = currentItems[i].id;\n if (!currentItems[i].children) {\n // This node had no children, we reset this so new ones can be\n // loaded lazily.\n currentItems[i].children = [];\n }\n currentItems = currentItems[i].children;\n parents.shift();\n isRoot = false;\n continue currentItemsLoop;\n }\n }\n }\n notFound = true;\n }\n\n // New page\n if (currentItems.length == 0 && !isRoot) {\n // We don't do anything because this node will be loaded lazily anyway.\n return;\n }\n const newItems = await getChildNodes(currentParent ? currentParent : \"\");\n const currentPageParents = props.currentPageReference\n ? treeSource.getParentNodesId(\n props.currentPageReference!,\n props.includeTerminals,\n )\n : [];\n newItemsLoop: for (const newItem of newItems) {\n for (const i of currentItems!.keys()) {\n if (newItem.id == currentItems![i].id) {\n continue newItemsLoop;\n }\n }\n currentItems!.push({\n id: newItem.id,\n title: newItem.label,\n href: newItem.url,\n children: newItem.has_children ? [] : undefined,\n _location: newItem.location,\n _is_terminal: newItem.is_terminal,\n });\n if (\n currentPageParents.length > 0 &&\n currentPageParents[currentPageParents.length - 1] === newItem.id\n ) {\n // If we add a node, and it's the current page, it should be activated.\n activatedNodes.value = [newItem.id];\n }\n }\n}\n\nasync function getChildNodes(id: string) {\n return (await treeSource.getChildNodes(id)).filter(\n (c) => props.includeTerminals || !c.is_terminal,\n );\n}\n</script>\n\n<template>\n <v-treeview\n v-model:opened=\"expandedNodes\"\n density=\"compact\"\n :activated=\"activatedNodes\"\n :items=\"rootNodes\"\n :load-children=\"lazyLoadChildren\"\n activatable\n active-strategy=\"independent\"\n item-value=\"id\"\n @update:activated=\"clearSelection\"\n >\n <template #title=\"{ item }: { item: any }\">\n <a\n v-if=\"props.clickAction\"\n :href=\"item.href\"\n @click.prevent=\"\n activatedNodes = [item.id];\n clickAction!({\n id: item.id,\n label: item.title,\n location: item._location,\n url: item.href,\n has_children: item.children !== undefined,\n is_terminal: item._is_terminal,\n });\n \"\n >{{ item.title }}</a\n >\n <a v-else :href=\"item.href\">{{ item.title }}</a>\n </template>\n </v-treeview>\n</template>\n\n<style scoped>\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":["navigationTreePropsDefaults","cristal","inject","documentService","treeSource","rootNodes","ref","activatedNodes","expandedNodes","isExpanding","props","__props","onBeforeMount","newRootNodes","node","getChildNodes","SpaceReference","expandTree","onDocumentDelete","onDocumentUpdate","watch","newExpandedNodes","i","currentNodes","lazyLoadChildren","item","treeItem","childNodes","child","clearSelection","page","parents","currentItem","currentItemChildren","notFound","currentItemsLoop","currentParent","currentItems","isRoot","newItems","newItem","currentPageParents","newItemsLoop","id","c","_createBlock","_unref","VTreeview","$event","_withCtx","_createElementBlock","_withModifiers","clickAction","_toDisplayString","_hoisted_1","_hoisted_2"],"mappings":";;;;AAiDA,MAAMA,IAA8B;AAA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K;AAAA,UACX,SAAK0B,EAAA,CAAAH,MAAA;AAAqB,YAAAzC,EAAA,QAAc,CAAIkB,EAAK,EAAE,GAAa2B,EAAAA,YAAW;AAAA,cAAoB,IAAA3B,EAAK;AAAA,cAAuB,OAAAA,EAAK;AAAA,cAA6B,UAAAA,EAAK;AAAA,cAA4B,KAAAA,EAAK;AAAA,4BAAgCA,EAAK,aAAa;AAAA,cAAoC,aAAAA,EAAK;AAAA,YAAA;;WAW3R4B,EAAA5B,EAAK,KAAK,GAAA,GAAA6B,CAAA,WAEhBJ,EAAgD,KAAA;AAAA;UAArC,MAAMzB,EAAK;AAAA,QAAA,GAAS4B,EAAA5B,EAAK,KAAK,GAAA,GAAA8B,CAAA;AAAA,MAAA;;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as w, mergeModels as C, inject as D, useModel as X, ref as v, onMounted as k, resolveComponent as i, createElementBlock as x, openBlock as B, Fragment as H, createVNode as l, unref as o, withCtx as n, createTextVNode as h, toDisplayString as y, mergeDefaults as N } from "vue";
2
2
  import { t as M } from "./translations-BVK9UR9x.js";
3
- import S from "./x-breadcrumb-DAVkDLuc.js";
3
+ import S from "./x-breadcrumb-DiDfmxr5.js";
4
4
  import { EntityType as E, SpaceReference as I } from "@xwiki/cristal-model-api";
5
5
  import { useI18n as A } from "vue-i18n";
6
- import { a as F } from "./index-BrgIqIDX.js";
6
+ import { a as F } from "./index-D8yc5V3N.js";
7
7
  import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const z = {
9
9
  includeTerminals: !1
@@ -107,4 +107,4 @@ const z = {
107
107
  export {
108
108
  Q as default
109
109
  };
110
- //# sourceMappingURL=x-navigation-tree-select-BSwLmNS-.js.map
110
+ //# sourceMappingURL=x-navigation-tree-select-_13SOFbP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-navigation-tree-select-_13SOFbP.js","sources":["../../api/src/XNavigationTreeSelect.ts","../src/vue/form/x-navigation-tree-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\nimport type {\n DocumentReference,\n SpaceReference,\n} from \"@xwiki/cristal-model-api\";\n\n/**\n * @since 0.15\n * @beta\n */\ntype NavigationTreeSelectProps = {\n label: string;\n help?: string;\n currentPageReference?: DocumentReference;\n modelValue?: SpaceReference;\n /**\n * Whether to include terminal pages as select options (default: false).\n * @since 0.16\n * @beta\n */\n includeTerminals?: boolean;\n};\n\n/**\n * Default props values for NavigationTreeSelect implementations.\n * @since 0.16\n * @beta\n */\nconst navigationTreeSelectPropsDefaults = {\n includeTerminals: false,\n};\n\nexport type { NavigationTreeSelectProps };\nexport { navigationTreeSelectPropsDefaults };\n","<!--\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 XBreadcrumb from \"../x-breadcrumb.vue\";\nimport { navigationTreeSelectPropsDefaults } from \"@xwiki/cristal-dsapi\";\nimport { EntityType, SpaceReference } from \"@xwiki/cristal-model-api\";\nimport { inject, onMounted, ref } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VTextField } from \"vuetify/components/VTextField\";\nimport type { CristalApp } from \"@xwiki/cristal-api\";\nimport type { NavigationTreeSelectProps } from \"@xwiki/cristal-dsapi\";\nimport type {\n PageHierarchyItem,\n PageHierarchyResolver,\n PageHierarchyResolverProvider,\n} from \"@xwiki/cristal-hierarchy-api\";\nimport type { DocumentReference } from \"@xwiki/cristal-model-api\";\nimport type {\n ModelReferenceHandler,\n ModelReferenceHandlerProvider,\n} from \"@xwiki/cristal-model-reference-api\";\nimport type { NavigationTreeNode } from \"@xwiki/cristal-navigation-tree-api\";\nimport type { Ref } from \"vue\";\n\nconst cristal: CristalApp = inject<CristalApp>(\"cristal\")!;\nconst hierarchyResolver: PageHierarchyResolver = cristal\n .getContainer()\n .get<PageHierarchyResolverProvider>(\"PageHierarchyResolverProvider\")\n .get()!;\nconst referenceHandler: ModelReferenceHandler = cristal\n .getContainer()\n .get<ModelReferenceHandlerProvider>(\"ModelReferenceHandlerProvider\")\n .get()!;\n\nconst { t } = useI18n({\n messages,\n});\nconst props = withDefaults(\n defineProps<NavigationTreeSelectProps>(),\n navigationTreeSelectPropsDefaults,\n);\nconst model = defineModel<SpaceReference | DocumentReference>();\n\nconst openedLocationDialog: Ref<boolean> = ref(false);\nconst hierarchy: Ref<Array<PageHierarchyItem>> = ref([]);\nlet selectedPage: DocumentReference | undefined;\n\nonMounted(async () => {\n selectedPage = props.currentPageReference;\n model.value = props.currentPageReference!.space;\n hierarchy.value = await hierarchyResolver.getPageHierarchy(\n props.currentPageReference!.space!,\n false,\n );\n});\n\nasync function treeNodeClickAction(node: NavigationTreeNode) {\n if (node.location.type == EntityType.SPACE) {\n if (node.location.names.length > 0) {\n selectedPage = referenceHandler.createDocumentReference(\n node.location.names[node.location.names.length - 1],\n new SpaceReference(\n node.location.wiki,\n ...node.location.names.slice(0, -1),\n ),\n );\n hierarchy.value = await hierarchyResolver.getPageHierarchy(\n selectedPage,\n false,\n );\n } else {\n selectedPage = undefined;\n hierarchy.value = [{ label: node.label, pageId: \"\", url: node.url }];\n }\n } else {\n selectedPage = node.location;\n hierarchy.value = await hierarchyResolver.getPageHierarchy(\n selectedPage,\n false,\n );\n }\n model.value = node.location;\n}\n</script>\n\n<template>\n <v-text-field\n :label=\"label\"\n :hint=\"help\"\n :persistent-hint=\"help !== undefined\"\n :active=\"hierarchy.length > 0\"\n readonly\n >\n <template #default>\n <XBreadcrumb :items=\"hierarchy\"></XBreadcrumb>\n </template>\n </v-text-field>\n <XDialog\n v-model=\"openedLocationDialog\"\n width=\"auto\"\n :title=\"t('vuetify.tree.select.location.label')\"\n >\n <template #activator>\n <x-btn id=\"change-page-location-button\" size=\"small\" color=\"secondary\">\n {{ t(\"vuetify.tree.select.location.label\") }}\n </x-btn>\n </template>\n <template #default>\n <XNavigationTree\n :current-page-reference=\"selectedPage\"\n :click-action=\"treeNodeClickAction\"\n :include-terminals=\"includeTerminals\"\n show-root-node\n ></XNavigationTree>\n </template>\n <template #footer>\n <XBtn variant=\"primary\" @click=\"openedLocationDialog = false\">\n {{ t(\"vuetify.tree.select.location.select\") }}\n </XBtn>\n </template>\n </XDialog>\n</template>\n\n<style scoped>\n.v-treeview {\n overflow: auto;\n}\n</style>\n"],"names":["navigationTreeSelectPropsDefaults","cristal","inject","hierarchyResolver","referenceHandler","t","useI18n","messages","props","__props","model","_useModel","openedLocationDialog","ref","hierarchy","selectedPage","onMounted","treeNodeClickAction","node","EntityType","SpaceReference","_createVNode","_unref","VTextField","label","help","XBreadcrumb","_component_XDialog","$event","_component_x_btn","_component_XNavigationTree","includeTerminals","_component_XBtn"],"mappings":";;;;;;;AA+CA,MAAMA,IAAoC;AAAA,EACxC,kBAAkB;AACpB;;;;;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C,EAAAA;AAAAA,UACP,MAAMC,EAAAA;AAAAA,UACN,mBAAiBA,EAAAA,SAAS;AAAA,UAC1B,QAAQX,EAAA,MAAU,SAAM;AAAA,UACzB,UAAA;AAAA,QAAA;UAEW,WACT,MAA8C;AAAA,YAA9CO,EAA8CK,GAAA,EAAhC,OAAOZ,EAAA,MAAA,GAAS,MAAA,GAAA,CAAA,OAAA,CAAA;AAAA,UAAA;;;QAGlCO,EAuBUM,GAAA;AAAA,sBAtBCf,EAAA;AAAA,wDAAAA,EAAoB,QAAAgB;AAAA,UAC7B,OAAM;AAAA,UACL,OAAON,EAAAjB,CAAA,EAAC,oCAAA;AAAA,QAAA;UAEE,aACT,MAEQ;AAAA,YAFRgB,EAEQQ,GAAA;AAAA,cAFD,IAAG;AAAA,cAA8B,MAAK;AAAA,cAAQ,OAAM;AAAA,YAAA;yBACzD,MAA6C;AAAA,oBAA1CP,EAAAjB,CAAA,EAAC,oCAAA,CAAA,GAAA,CAAA;AAAA,cAAA;;;;UAGG,WACT,MAKmB;AAAA,YALnBgB,EAKmBS,GAAA;AAAA,cAJhB,0BAAwBR,EAAAP,CAAA;AAAA,cACxB,gBAAcE;AAAA,cACd,qBAAmBc,EAAAA;AAAAA,cACpB,kBAAA;AAAA,YAAA;;UAGO,UACT,MAEO;AAAA,YAFPV,EAEOW,GAAA;AAAA,cAFD,SAAQ;AAAA,cAAW,gCAAOpB,EAAA,QAAoB;AAAA,YAAA;yBAClD,MAA8C;AAAA,oBAA3CU,EAAAjB,CAAA,EAAC,qCAAA,CAAA,GAAA,CAAA;AAAA,cAAA;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as m, mergeModels as n, useModel as i, computed as d, createBlock as p, openBlock as c, unref as f } from "vue";
2
2
  import { t as V } from "./translations-BVK9UR9x.js";
3
3
  import { useI18n as b } from "vue-i18n";
4
- import { e as g } from "./index-BrgIqIDX.js";
4
+ import { e as g } from "./index-D8yc5V3N.js";
5
5
  const M = /* @__PURE__ */ m({
6
6
  __name: "x-select",
7
7
  props: /* @__PURE__ */ n({
@@ -36,4 +36,4 @@ const M = /* @__PURE__ */ m({
36
36
  export {
37
37
  M as default
38
38
  };
39
- //# sourceMappingURL=x-select-BMnDdspj.js.map
39
+ //# sourceMappingURL=x-select-DnRsSLAX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-select-BMnDdspj.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/cristal-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","label","help","items","required"],"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,OAAOC,EAAAA;AAAAA,MACP,UAAUC,EAAAA;AAAAA,MACV,OAAOC,EAAAA;AAAAA,MACP,OAAOV,EAAA;AAAA,MACP,YAAYW,EAAAA;AAAAA,IAAAA;;;"}
1
+ {"version":3,"file":"x-select-DnRsSLAX.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/cristal-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","label","help","items","required"],"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,OAAOC,EAAAA;AAAAA,MACP,UAAUC,EAAAA;AAAAA,MACV,OAAOC,EAAAA;AAAAA,MACP,OAAOV,EAAA;AAAA,MACP,YAAYW,EAAAA;AAAAA,IAAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"x-tab-group-BfEaq8Nj.js","sources":["../src/vue/x-tab-group.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { Ref, ref } from \"vue\";\nconst tab: Ref<unknown> = ref();\n\nconst emits = defineEmits([\"tab-change\"]);\n\nfunction change(tabId: unknown) {\n if (typeof tabId == \"string\") {\n emits(\"tab-change\", tabId);\n }\n}\n</script>\n\n<template>\n <v-card class=\"mx-auto\">\n <v-tabs v-model=\"tab\" @update:model-value=\"change\">\n <slot name=\"tabs\"></slot>\n </v-tabs>\n <v-card-text>\n <v-tabs-window v-model=\"tab\">\n <slot name=\"panels\"></slot>\n </v-tabs-window>\n </v-card-text>\n </v-card>\n</template>\n\n<style scoped></style>\n"],"names":["tab","ref","emits","__emit","change","tabId","_createBlock","_component_v_card","_createVNode","_component_v_tabs","$event","_renderSlot","_ctx","_component_v_card_text","_component_v_tabs_window"],"mappings":";;;;;AAqBA,UAAMA,IAAoBC,EAAA,GAEpBC,IAAQC;AAEd,aAASC,EAAOC,GAAgB;AAC9B,MAAI,OAAOA,KAAS,YAClBH,EAAM,cAAcG,CAAK;AAAA,IAE7B;;;kBAIEC,EASSC,GAAA,EATD,OAAM,aAAS;AAAA,mBACrB,MAES;AAAA,UAFTC,EAESC,GAAA;AAAA,wBAFQT,EAAA;AAAA;qCAAAA,EAAG,QAAAU;AAAA,cAAuBN;AAAA,YAAA;AAAA;uBACzC,MAAyB;AAAA,cAAzBO,EAAyBC,EAAA,QAAA,MAAA;AAAA,YAAA;;;UAE3BJ,EAIcK,GAAA,MAAA;AAAA,uBAHZ,MAEgB;AAAA,cAFhBL,EAEgBM,GAAA;AAAA,4BAFQd,EAAA;AAAA,8DAAAA,EAAG,QAAAU;AAAA,cAAA;2BACzB,MAA2B;AAAA,kBAA3BC,EAA2BC,EAAA,QAAA,QAAA;AAAA,gBAAA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"x-tab-group-BfEaq8Nj.js","sources":["../src/vue/x-tab-group.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport type { Ref } from \"vue\";\nconst tab: Ref<unknown> = ref();\n\nconst emits = defineEmits([\"tab-change\"]);\n\nfunction change(tabId: unknown) {\n if (typeof tabId == \"string\") {\n emits(\"tab-change\", tabId);\n }\n}\n</script>\n\n<template>\n <v-card class=\"mx-auto\">\n <v-tabs v-model=\"tab\" @update:model-value=\"change\">\n <slot name=\"tabs\"></slot>\n </v-tabs>\n <v-card-text>\n <v-tabs-window v-model=\"tab\">\n <slot name=\"panels\"></slot>\n </v-tabs-window>\n </v-card-text>\n </v-card>\n</template>\n\n<style scoped></style>\n"],"names":["tab","ref","emits","__emit","change","tabId","_createBlock","_component_v_card","_createVNode","_component_v_tabs","$event","_renderSlot","_ctx","_component_v_card_text","_component_v_tabs_window"],"mappings":";;;;;AAsBA,UAAMA,IAAoBC,EAAA,GAEpBC,IAAQC;AAEd,aAASC,EAAOC,GAAgB;AAC9B,MAAI,OAAOA,KAAS,YAClBH,EAAM,cAAcG,CAAK;AAAA,IAE7B;;;kBAIEC,EASSC,GAAA,EATD,OAAM,aAAS;AAAA,mBACrB,MAES;AAAA,UAFTC,EAESC,GAAA;AAAA,wBAFQT,EAAA;AAAA;qCAAAA,EAAG,QAAAU;AAAA,cAAuBN;AAAA,YAAA;AAAA;uBACzC,MAAyB;AAAA,cAAzBO,EAAyBC,EAAA,QAAA,MAAA;AAAA,YAAA;;;UAE3BJ,EAIcK,GAAA,MAAA;AAAA,uBAHZ,MAEgB;AAAA,cAFhBL,EAEgBM,GAAA;AAAA,4BAFQd,EAAA;AAAA,8DAAAA,EAAG,QAAAU;AAAA,cAAA;2BACzB,MAA2B;AAAA,kBAA3BC,EAA2BC,EAAA,QAAA,QAAA;AAAA,gBAAA;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"x-tab-panel-DysgiPCz.js","sources":["../src/vue/x-tab-panel.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { TabPanelProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<TabPanelProps>();\n</script>\n\n<template>\n <v-tabs-window-item :value=\"tabId\"><slot></slot></v-tabs-window-item>\n</template>\n"],"names":["_createBlock","_component_v_tabs_window_item","tabId","_renderSlot","_ctx"],"mappings":";;;;;;;;;kBA0BEA,EAAqEC,GAAA,EAAhD,OAAOC,EAAAA,SAAK;AAAA,mBAAE,MAAa;AAAA,UAAbC,EAAaC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
1
+ {"version":3,"file":"x-tab-panel-DysgiPCz.js","sources":["../src/vue/x-tab-panel.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport type { TabPanelProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<TabPanelProps>();\n</script>\n\n<template>\n <v-tabs-window-item :value=\"tabId\"><slot></slot></v-tabs-window-item>\n</template>\n"],"names":["_createBlock","_component_v_tabs_window_item","tabId","_renderSlot","_ctx"],"mappings":";;;;;;;;;kBA0BEA,EAAqEC,GAAA,EAAhD,OAAOC,EAAAA,SAAK;AAAA,mBAAE,MAAa;AAAA,UAAbC,EAAaC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"x-tab-vRrbUjdK.js","sources":["../src/vue/x-tab.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { TabProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<TabProps>();\n</script>\n\n<template>\n <v-tab :value=\"tabId\"><slot></slot></v-tab>\n</template>\n\n<style scoped></style>\n"],"names":["_createBlock","_component_v_tab","tabId","_renderSlot","_ctx"],"mappings":";;;;;;;;;kBA0BEA,EAA2CC,GAAA,EAAnC,OAAOC,EAAAA,SAAK;AAAA,mBAAE,MAAa;AAAA,UAAbC,EAAaC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
1
+ {"version":3,"file":"x-tab-vRrbUjdK.js","sources":["../src/vue/x-tab.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport type { TabProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<TabProps>();\n</script>\n\n<template>\n <v-tab :value=\"tabId\"><slot></slot></v-tab>\n</template>\n\n<style scoped></style>\n"],"names":["_createBlock","_component_v_tab","tabId","_renderSlot","_ctx"],"mappings":";;;;;;;;;kBA0BEA,EAA2CC,GAAA,EAAnC,OAAOC,EAAAA,SAAK;AAAA,mBAAE,MAAa;AAAA,UAAbC,EAAaC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as s, mergeModels as m, useModel as p, computed as i, createBlock as d, openBlock as f, unref as y } from "vue";
2
2
  import { t as V } from "./translations-BVK9UR9x.js";
3
3
  import { useI18n as c } from "vue-i18n";
4
- import { a as h } from "./index-BrgIqIDX.js";
4
+ import { a as h } from "./index-D8yc5V3N.js";
5
5
  const g = /* @__PURE__ */ s({
6
6
  __name: "x-text-field",
7
7
  props: /* @__PURE__ */ m({
@@ -42,4 +42,4 @@ const g = /* @__PURE__ */ s({
42
42
  export {
43
43
  g as default
44
44
  };
45
- //# sourceMappingURL=x-text-field-OCXMbIfP.js.map
45
+ //# sourceMappingURL=x-text-field-BWaRETwR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-text-field-OCXMbIfP.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/cristal-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 ></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","label","name","autofocus","help","readonly","type"],"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,EAUgBC,EAAAC,CAAA,GAAA;AAAA,kBATLR,EAAA;AAAA,oDAAAA,EAAK,QAAAS;AAAA,MACb,OAAOC,EAAAA;AAAAA,MACP,MAAMC,EAAAA;AAAAA,MACN,WAAWC,EAAAA;AAAAA,MACX,MAAMC,EAAAA;AAAAA,MACN,mBAAiBA,EAAAA,SAAS;AAAA,MAC1B,OAAOX,EAAA;AAAA,MACP,UAAUY,EAAAA;AAAAA,MACV,MAAMC,EAAAA,QAAI;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"x-text-field-BWaRETwR.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/cristal-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 ></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","label","name","autofocus","help","readonly","type"],"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,EAUgBC,EAAAC,CAAA,GAAA;AAAA,kBATLR,EAAA;AAAA,oDAAAA,EAAK,QAAAS;AAAA,MACb,OAAOC,EAAAA;AAAAA,MACP,MAAMC,EAAAA;AAAAA,MACN,WAAWC,EAAAA;AAAAA,MACX,MAAMC,EAAAA;AAAAA,MACN,mBAAiBA,EAAAA,SAAS;AAAA,MAC1B,OAAOX,EAAA;AAAA,MACP,UAAUY,EAAAA;AAAAA,MACV,MAAMC,EAAAA,QAAI;AAAA,IAAA;;;"}
@@ -0,0 +1,16 @@
1
+ ## API Report File for "@xwiki/cristal-dsvuetify"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { Container } from 'inversify';
8
+
9
+ // @beta (undocumented)
10
+ export class ComponentInit {
11
+ constructor(container: Container);
12
+ }
13
+
14
+ // (No @packageDocumentation comment for this package)
15
+
16
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-dsvuetify",
3
- "version": "0.21.1",
3
+ "version": "0.22.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -26,15 +26,16 @@
26
26
  }
27
27
  },
28
28
  "main": "./dist/index.es.js",
29
+ "types": "./dist/index.d.ts",
29
30
  "dependencies": {
30
31
  "vue-i18n": "11.1.11",
31
- "vuetify": "3.9.3",
32
- "@xwiki/cristal-api": "0.21.1",
33
- "@xwiki/cristal-document-api": "0.21.1",
34
- "@xwiki/cristal-hierarchy-api": "0.21.1",
35
- "@xwiki/cristal-model-api": "0.21.1",
36
- "@xwiki/cristal-navigation-tree-api": "0.21.1",
37
- "@xwiki/cristal-model-reference-api": "0.21.1"
32
+ "vuetify": "3.9.5",
33
+ "@xwiki/cristal-api": "0.22.0",
34
+ "@xwiki/cristal-hierarchy-api": "0.22.0",
35
+ "@xwiki/cristal-document-api": "0.22.0",
36
+ "@xwiki/cristal-model-reference-api": "0.22.0",
37
+ "@xwiki/cristal-model-api": "0.22.0",
38
+ "@xwiki/cristal-navigation-tree-api": "0.22.0"
38
39
  },
39
40
  "peerDependencies": {
40
41
  "inversify": "7.x",
@@ -43,21 +44,21 @@
43
44
  },
44
45
  "devDependencies": {
45
46
  "@vue/test-utils": "2.4.6",
46
- "inversify": "7.7.0",
47
+ "inversify": "7.9.0",
47
48
  "reflect-metadata": "0.2.2",
48
49
  "typescript": "5.9.2",
49
- "vite": "7.0.6",
50
- "vue": "3.5.18",
50
+ "vite": "7.1.5",
51
+ "vue": "3.5.20",
51
52
  "vue-tsc": "2.2.12",
52
- "@xwiki/cristal-dev-config": "0.21.1",
53
- "@xwiki/cristal-dsapi": "0.21.1"
53
+ "@xwiki/cristal-dev-config": "0.22.0",
54
+ "@xwiki/cristal-dsapi": "0.22.0"
54
55
  },
55
56
  "scripts": {
56
- "build": "pnpm compile",
57
+ "api-extractor:local": "api-extractor run --local",
58
+ "build": "vite build",
57
59
  "clean": "rimraf dist",
58
- "compile": "vue-tsc --project tsconfig.json && vite build",
59
60
  "lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
60
- "test": "vitest --run"
61
- },
62
- "types": "./dist/index.d.ts"
61
+ "test": "vitest --run",
62
+ "typecheck": "vue-tsc"
63
+ }
63
64
  }
@@ -22,6 +22,9 @@ import { VuetifyDesignSystemLoader } from "./vuetifyDesignSystemLoader";
22
22
  import type { DesignSystemLoader } from "@xwiki/cristal-api";
23
23
  import type { Container } from "inversify";
24
24
 
25
+ /**
26
+ * @beta
27
+ */
25
28
  export default class ComponentInit {
26
29
  constructor(container: Container) {
27
30
  container
@@ -18,8 +18,8 @@
18
18
  02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  -->
20
20
  <script setup lang="ts">
21
- import { BreadcrumbProps } from "@xwiki/cristal-dsapi";
22
21
  import { computed } from "vue";
22
+ import type { BreadcrumbProps } from "@xwiki/cristal-dsapi";
23
23
 
24
24
  const props = defineProps<BreadcrumbProps>();
25
25
  // Converts props items to the format expected by v-breadcrumbs
@@ -18,7 +18,8 @@
18
18
  02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  -->
20
20
  <script setup lang="ts">
21
- import { Ref, ref } from "vue";
21
+ import { ref } from "vue";
22
+ import type { Ref } from "vue";
22
23
  const tab: Ref<unknown> = ref();
23
24
 
24
25
  const emits = defineEmits(["tab-change"]);
@@ -18,7 +18,7 @@
18
18
  02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  -->
20
20
  <script setup lang="ts">
21
- import { TabPanelProps } from "@xwiki/cristal-dsapi";
21
+ import type { TabPanelProps } from "@xwiki/cristal-dsapi";
22
22
 
23
23
  defineProps<TabPanelProps>();
24
24
  </script>
package/src/vue/x-tab.vue CHANGED
@@ -18,7 +18,7 @@
18
18
  02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  -->
20
20
  <script setup lang="ts">
21
- import { TabProps } from "@xwiki/cristal-dsapi";
21
+ import type { TabProps } from "@xwiki/cristal-dsapi";
22
22
 
23
23
  defineProps<TabProps>();
24
24
  </script>
package/vitest.config.ts CHANGED
@@ -19,8 +19,8 @@
19
19
  */
20
20
 
21
21
  import localConfig from "./vite.config";
22
+ import { vitestVue as defaultConfig } from "@xwiki/cristal-dev-config";
22
23
  import { defineConfig, mergeConfig } from "vitest/config";
23
- import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";
24
24
 
25
25
  export default mergeConfig(
26
26
  mergeConfig(defaultConfig, localConfig),