@xwiki/cristal-dsvuetify 0.20.0 → 0.21.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 (114) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{index-DNHsU4Fr.js → index-CPGfq5JL.js} +11490 -10285
  3. package/dist/index-CPGfq5JL.js.map +1 -0
  4. package/dist/index.es.js +10 -10
  5. package/dist/index.umd.js +31 -31
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/translations-BVK9UR9x.js.map +1 -1
  8. package/dist/translations.d.ts +19 -0
  9. package/dist/vue/__tests__/utils/vuetify.d.ts +19 -0
  10. package/dist/vue/form/x-form.vue.d.ts +8 -0
  11. package/dist/{x-alert-CAlwFn5B.js → x-alert-Bqf5Ghy4.js} +3 -3
  12. package/dist/x-alert-Bqf5Ghy4.js.map +1 -0
  13. package/dist/{x-avatar-Cp8QVkHc.js → x-avatar-DDWQUeZJ.js} +2 -2
  14. package/dist/x-avatar-DDWQUeZJ.js.map +1 -0
  15. package/dist/{x-breadcrumb-BQVk_ZI_.js → x-breadcrumb-Ca8UqeNm.js} +4 -4
  16. package/dist/x-breadcrumb-Ca8UqeNm.js.map +1 -0
  17. package/dist/{x-btn-BXn20OTM.js → x-btn-CEN-gSJs.js} +2 -2
  18. package/dist/x-btn-CEN-gSJs.js.map +1 -0
  19. package/dist/{x-card-BjsZr1mV.js → x-card-ywmTDQq1.js} +2 -2
  20. package/dist/x-card-ywmTDQq1.js.map +1 -0
  21. package/dist/{x-checkbox-DqUXQoJU.js → x-checkbox-DioEzg6D.js} +2 -2
  22. package/dist/x-checkbox-DioEzg6D.js.map +1 -0
  23. package/dist/{x-dialog-te6-Vgkm.js → x-dialog-BR0aOJnF.js} +11 -11
  24. package/dist/x-dialog-BR0aOJnF.js.map +1 -0
  25. package/dist/{x-divider-B3cbVfv2.js → x-divider-DdCNaWK9.js} +2 -2
  26. package/dist/x-divider-DdCNaWK9.js.map +1 -0
  27. package/dist/{x-file-input-DGLWq0E0.js → x-file-input-CR_baWpm.js} +2 -2
  28. package/dist/x-file-input-CR_baWpm.js.map +1 -0
  29. package/dist/{x-form-C5fVEKNp.js → x-form-DXezCfh2.js} +3 -3
  30. package/dist/x-form-DXezCfh2.js.map +1 -0
  31. package/dist/{x-img-BB3GSMHr.js → x-img-X-qoosGi.js} +2 -2
  32. package/dist/x-img-X-qoosGi.js.map +1 -0
  33. package/dist/{x-load-DPuiSh1i.js → x-load-CXDfm5l3.js} +2 -2
  34. package/dist/x-load-CXDfm5l3.js.map +1 -0
  35. package/dist/{x-menu-9krdqSZB.js → x-menu-C7rglNy2.js} +6 -6
  36. package/dist/x-menu-C7rglNy2.js.map +1 -0
  37. package/dist/{x-menu-item-BSondWPp.js → x-menu-item-CCcPUrHX.js} +2 -2
  38. package/dist/x-menu-item-CCcPUrHX.js.map +1 -0
  39. package/dist/{x-menu-label-Dp7gEYzE.js → x-menu-label-gVnEylDY.js} +2 -2
  40. package/dist/x-menu-label-gVnEylDY.js.map +1 -0
  41. package/dist/x-navigation-tree-BNc0pKUi.js +188 -0
  42. package/dist/x-navigation-tree-BNc0pKUi.js.map +1 -0
  43. package/dist/{x-navigation-tree-select-CZMM_WJl.js → x-navigation-tree-select-CHoauT-L.js} +21 -21
  44. package/dist/x-navigation-tree-select-CHoauT-L.js.map +1 -0
  45. package/dist/{x-search-NPeNBHNh.js → x-search-BgVWZd4f.js} +2 -2
  46. package/dist/x-search-BgVWZd4f.js.map +1 -0
  47. package/dist/{x-select-DCWNJiNk.js → x-select-bQRFdVPL.js} +2 -2
  48. package/dist/x-select-bQRFdVPL.js.map +1 -0
  49. package/dist/{x-tab-UmfRst-i.js → x-tab-CFwL72L6.js} +2 -2
  50. package/dist/x-tab-CFwL72L6.js.map +1 -0
  51. package/dist/{x-tab-group-C0nWDupY.js → x-tab-group-Bs17utO_.js} +2 -2
  52. package/dist/x-tab-group-Bs17utO_.js.map +1 -0
  53. package/dist/{x-tab-panel-CjY4vyG0.js → x-tab-panel-DL228tOt.js} +2 -2
  54. package/dist/x-tab-panel-DL228tOt.js.map +1 -0
  55. package/dist/{x-text-field-CaWcwz2v.js → x-text-field-DtCbDE_F.js} +2 -2
  56. package/dist/x-text-field-DtCbDE_F.js.map +1 -0
  57. package/package.json +17 -16
  58. package/src/components/componentsInit.ts +1 -1
  59. package/src/components/vuetifyDesignSystemLoader.ts +2 -3
  60. package/src/index.ts +1 -1
  61. package/src/translations.ts +1 -1
  62. package/src/vue/__tests__/utils/vuetify.ts +1 -1
  63. package/src/vue/__tests__/x-btn.test.ts +1 -1
  64. package/src/vue/css/style.css +1 -1
  65. package/src/vue/form/x-checkbox.vue +14 -14
  66. package/src/vue/form/x-file-input.vue +19 -0
  67. package/src/vue/form/x-form.vue +19 -0
  68. package/src/vue/form/x-navigation-tree-select.vue +14 -14
  69. package/src/vue/form/x-select.vue +14 -14
  70. package/src/vue/form/x-text-field.vue +19 -0
  71. package/src/vue/x-alert.vue +14 -14
  72. package/src/vue/x-avatar.vue +14 -14
  73. package/src/vue/x-breadcrumb.vue +14 -14
  74. package/src/vue/x-btn.vue +14 -14
  75. package/src/vue/x-card.vue +14 -14
  76. package/src/vue/x-dialog.vue +14 -14
  77. package/src/vue/x-divider.vue +14 -14
  78. package/src/vue/x-img.vue +14 -14
  79. package/src/vue/x-load.vue +14 -14
  80. package/src/vue/x-menu-item.vue +14 -14
  81. package/src/vue/x-menu-label.vue +14 -14
  82. package/src/vue/x-menu.vue +14 -14
  83. package/src/vue/x-navigation-tree.vue +15 -15
  84. package/src/vue/x-search.vue +14 -14
  85. package/src/vue/x-tab-group.vue +14 -14
  86. package/src/vue/x-tab-panel.vue +14 -14
  87. package/src/vue/x-tab.vue +14 -14
  88. package/vite.config.ts +1 -1
  89. package/vitest.config.ts +1 -1
  90. package/dist/index-DNHsU4Fr.js.map +0 -1
  91. package/dist/x-alert-CAlwFn5B.js.map +0 -1
  92. package/dist/x-avatar-Cp8QVkHc.js.map +0 -1
  93. package/dist/x-breadcrumb-BQVk_ZI_.js.map +0 -1
  94. package/dist/x-btn-BXn20OTM.js.map +0 -1
  95. package/dist/x-card-BjsZr1mV.js.map +0 -1
  96. package/dist/x-checkbox-DqUXQoJU.js.map +0 -1
  97. package/dist/x-dialog-te6-Vgkm.js.map +0 -1
  98. package/dist/x-divider-B3cbVfv2.js.map +0 -1
  99. package/dist/x-file-input-DGLWq0E0.js.map +0 -1
  100. package/dist/x-form-C5fVEKNp.js.map +0 -1
  101. package/dist/x-img-BB3GSMHr.js.map +0 -1
  102. package/dist/x-load-DPuiSh1i.js.map +0 -1
  103. package/dist/x-menu-9krdqSZB.js.map +0 -1
  104. package/dist/x-menu-item-BSondWPp.js.map +0 -1
  105. package/dist/x-menu-label-Dp7gEYzE.js.map +0 -1
  106. package/dist/x-navigation-tree-BMLu80ML.js +0 -518
  107. package/dist/x-navigation-tree-BMLu80ML.js.map +0 -1
  108. package/dist/x-navigation-tree-select-CZMM_WJl.js.map +0 -1
  109. package/dist/x-search-NPeNBHNh.js.map +0 -1
  110. package/dist/x-select-DCWNJiNk.js.map +0 -1
  111. package/dist/x-tab-UmfRst-i.js.map +0 -1
  112. package/dist/x-tab-group-C0nWDupY.js.map +0 -1
  113. package/dist/x-tab-panel-CjY4vyG0.js.map +0 -1
  114. package/dist/x-text-field-CaWcwz2v.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-alert-CAlwFn5B.js","sources":["../src/vue/x-alert.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script 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,EAAQ;AAAA,QAAG,OAAOC,EAAK;AAAA,QAAG,MAAMC,EAAI;AAAA,QAAG,MAAMC,EAAW;AAAA,MAAA;mBAExE,MAAyB;AAAA,kBAD3BC,EAOCC,GAAA,MAAAC,EANkBC,EAAO,SAAA,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,EAAO,gBAAjBR,EAAqB,MAAAS,CAAA;UACRD,EAAO,WAApBE,EAAA,GAAAV,EAA2C,cAAlBQ,EAAO,OAAA,GAAA,CAAA;UAChCG,EAAQC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-avatar-Cp8QVkHc.js","sources":["../src/vue/x-avatar.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport 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,EAAI,QAAA;AAAA,mBACnB,MAAqD;AAAA,UAAxCC,EAAK,cAAlBH,EAAqDI,GAAA;AAAA;YAAhC,KAAKC,EAAI;AAAA,YAAG,KAAKF,EAAK;AAAA,UAAA,gCAC3CG,EAAA,GAAAC,EAA8B,aAAdF,EAAI,IAAA,GAAA,CAAA;AAAA,QAAA;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-breadcrumb-BQVk_ZI_.js","sources":["../src/vue/x-breadcrumb.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { BreadcrumbProps } from \"@xwiki/cristal-dsapi\";\nimport { computed } from \"vue\";\n\nconst props = defineProps<BreadcrumbProps>();\n// Converts props items to the format expected by v-breadcrumbs\nconst items = computed(() => {\n return props.items.map(({ label, url }) => {\n return {\n title: label,\n href: url,\n };\n });\n});\n</script>\n\n<template>\n <v-breadcrumbs :items=\"items\"></v-breadcrumbs>\n</template>\n\n<style scoped>\n.v-breadcrumbs {\n padding: 0;\n}\n</style>\n"],"names":["props","__props","items","computed","label","url","_createBlock","_component_v_breadcrumbs"],"mappings":";;;;;;;;AAuBA,UAAMA,IAAQC,GAERC,IAAQC,EAAS,MACdH,EAAM,MAAM,IAAI,CAAC,EAAE,OAAAI,GAAO,KAAAC,SACxB;AAAA,MACL,OAAOD;AAAA,MACP,MAAMC;AAAA,IACR,EACD,CACF;;;kBAICC,EAA8CC,GAAA,EAA9B,OAAOL,EAAK,MAAA,GAAA,MAAA,GAAA,CAAA,OAAA,CAAA;AAAA;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-btn-BXn20OTM.js","sources":["../src/vue/x-btn.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport { computed } from \"vue\";\nimport type { BtnProps } from \"@xwiki/cristal-dsapi\";\n\nconst { variant } = defineProps<BtnProps>();\n\n// Map the variants to corresponding vuetify colors.\nconst color = computed(() => {\n let color = undefined;\n switch (variant) {\n case \"default\":\n break;\n case \"primary\":\n color = \"primary\";\n break;\n case \"success\":\n color = \"success\";\n break;\n case \"neutral\":\n color = \"secondary\";\n break;\n case \"warning\":\n color = \"warning\";\n break;\n case \"danger\":\n color = \"error\";\n break;\n }\n return color;\n});\n\nconst vVariant = computed(() => (variant == \"text\" ? \"text\" : \"tonal\"));\n</script>\n<template>\n <v-btn :color=\"color\" :variant=\"vVariant\">\n <slot />\n </v-btn>\n</template>\n"],"names":["color","computed","__props","vVariant","_createBlock","_component_v_btn","_renderSlot","_ctx"],"mappings":";;;;;;;;;AA0BM,UAAAA,IAAQC,EAAS,MAAM;AAC3B,UAAID;AACJ,cAAQE,EAAO,SAAE;AAAA,QACf,KAAK;AACH;AAAA,QACF,KAAK;AACHF,UAAAA,IAAQ;AACR;AAAA,QACF,KAAK;AACHA,UAAAA,IAAQ;AACR;AAAA,QACF,KAAK;AACHA,UAAAA,IAAQ;AACR;AAAA,QACF,KAAK;AACHA,UAAAA,IAAQ;AACR;AAAA,QACF,KAAK;AACHA,UAAAA,IAAQ;AACR;AAAA,MAAA;AAEGA,aAAAA;AAAAA,IAAA,CACR,GAEKG,IAAWF,EAAS,MAAOC,EAAA,WAAW,SAAS,SAAS,OAAQ;;;kBAGpEE,EAEQC,GAAA;AAAA,QAFA,OAAOL,EAAK;AAAA,QAAG,SAASG,EAAQ;AAAA,MAAA;mBACtC,MAAQ;AAAA,UAARG,EAAQC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-card-BjsZr1mV.js","sources":["../src/vue/x-card.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<template>\n <v-card :title=\"title\" variant=\"outlined\">\n <slot />\n </v-card>\n</template>\n<script lang=\"ts\">\nexport default {\n props: { title: { type: String, required: true } },\n};\n</script>\n"],"names":["_sfc_main","_createBlock","_component_v_card","$props","_renderSlot","_ctx"],"mappings":";;AAyBA,MAAeA,IAAA;AAAA,EACb,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,UAAU,GAAO,EAAA;AACnD;;;cAPEC,EAESC,GAAA;AAAA,IAFA,OAAOC,EAAA;AAAA,IAAO,SAAQ;AAAA,EAAA,GAAA;AAAA,eAC7B,MAAQ;AAAA,MAARC,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA,CAAA;AAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-checkbox-DqUXQoJU.js","sources":["../src/vue/form/x-checkbox.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport { VCheckbox } from \"vuetify/components/VCheckbox\";\nimport type { CheckboxProps } from \"@xwiki/cristal-dsapi\";\n\ndefineProps<CheckboxProps>();\n\nconst checked = defineModel<boolean | null>();\n</script>\n<template>\n <v-checkbox\n v-model=\"checked\"\n :label=\"label\"\n :messages=\"help\"\n density=\"compact\"\n ></v-checkbox>\n</template>\n"],"names":["checked","_useModel","_createBlock","_unref","VCheckbox","$event","label","help"],"mappings":";;;;;;;;;;;;;AAyBM,UAAAA,IAAUC,iBAA4B;2BAG1CC,EAKcC,EAAAC,CAAA,GAAA;AAAA,kBAJHJ,EAAO;AAAA,oDAAPA,EAAO,QAAAK;AAAA,MACf,OAAOC,EAAK;AAAA,MACZ,UAAUC,EAAI;AAAA,MACf,SAAQ;AAAA,IAAA;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-dialog-te6-Vgkm.js","sources":["../src/vue/x-dialog.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\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,EAAK;AAAA,QAAE,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,EAAK,SAAA;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 +0,0 @@
1
- {"version":3,"file":"x-divider-B3cbVfv2.js","sources":["../src/vue/x-divider.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<template>\n <v-divider />\n</template>\n"],"names":["_createBlock","_component_v_divider"],"mappings":";;;;;cAoBEA,EAAaC,CAAA;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-file-input-DGLWq0E0.js","sources":["../src/vue/form/x-file-input.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport messages from \"../../translations\";\nimport { computed, defineModel } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VFileInput } from \"vuetify/components/VFileInput\";\nimport type { FileInputModel, TextFieldProps } from \"@xwiki/cristal-dsapi\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst model = defineModel<FileInputModel>();\nconst props = defineProps<TextFieldProps>();\n\nconst rules = computed(() => {\n const rulesList = [];\n if (props.required) {\n rulesList.push((value: unknown) => {\n if (value) {\n return true;\n } else {\n return t(\"vuetify.file.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n\n<template>\n <v-file-input\n v-model=\"model\"\n :label=\"label\"\n :name=\"name\"\n :rules=\"rules\"\n ></v-file-input>\n</template>\n\n<style scoped></style>\n"],"names":["useI18n","messages","model","_useModel","props","__props","rules","computed","rulesList","value","_createBlock","_unref","VFileInput","$event","label","name"],"mappings":";;;;;;;;;;;;;;;;;;;;AAOM,UAAA,EAAE,EAAE,IAAIA,EAAQ;AAAA,MACpBC,UAAAA;AAAAA,IAAA,CACD,GAEKC,IAAQC,iBAA4B,GACpCC,IAAQC,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAC;AACnB,aAAIJ,EAAM,YACEI,EAAA,KAAK,CAACC,MACVA,IACK,KAEA,EAAE,8BAA8B,CAE1C,GAEID;AAAA,IAAA,CACR;2BAICE,EAKgBC,EAAAC,CAAA,GAAA;AAAA,kBAJLV,EAAK;AAAA,oDAALA,EAAK,QAAAW;AAAA,MACb,OAAOC,EAAK;AAAA,MACZ,MAAMC,EAAI;AAAA,MACV,OAAOT,EAAK;AAAA,IAAA;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-form-C5fVEKNp.js","sources":["../src/vue/form/x-form.vue"],"sourcesContent":["<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":";;;;;;AAKM,UAAAA,IAA+BC,EAAI,MAAS,GAC5CC,IAAQC;AAED,IAAAC,EAAA;AAAA,MACX,OAAAC;AAAA,IAAA,CACD;AAED,mBAAeA,IAAQ;AACrB,MAAAL,EAAK,OAAO,MAAM;AAAA,IAAA;AAGpB,mBAAeM,IAAS;AAEtB,OADmB,MAAMN,EAAK,OAAO,SAAS,IAC9B,SACdE,EAAM,YAAY;AAAA,IACpB;2BAKAK,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 +0,0 @@
1
- {"version":3,"file":"x-img-BB3GSMHr.js","sources":["../src/vue/x-img.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<template>\n <!-- TODO: add an alt attribute for accessibility -->\n <img :src=\"src\" />\n</template>\n<script lang=\"ts\">\nexport default {\n props: { src: { type: String, required: true } },\n};\n</script>\n"],"names":["_sfc_main","_createElementBlock","$props","_hoisted_1"],"mappings":";;AAwBA,MAAeA,IAAA;AAAA,EACb,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,UAAU,GAAO,EAAA;AACjD;;cALEC,EAAkB,OAAA,EAAZ,KAAKC,EAAG,IAAA,GAAA,MAAA,GAAAC,CAAA;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-load-DPuiSh1i.js","sources":["../src/vue/x-load.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport \"vuetify/styles\";\nimport \"./css/style.css\";\n</script>\n\n<template><span></span></template>\n\n<style scoped></style>\n"],"names":["_createElementBlock"],"mappings":";;;;2BAwBUA,EAAa,MAAA;AAAA;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-menu-9krdqSZB.js","sources":["../src/vue/x-menu.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup></script>\n<template>\n <!-- v-menu needs to be attached inside Cristal DOM to fix its z-index.\n We also reset the default z-index to set it in the style section. -->\n <v-menu\n :close-on-content-click=\"false\"\n attach=\"#xwCristalApp\"\n z-index=\"initial\"\n >\n <template #activator=\"{ props }\">\n <span v-bind=\"props\">\n <slot name=\"activator\" />\n </span>\n </template>\n <v-list>\n <slot name=\"default\" />\n </v-list>\n </v-menu>\n</template>\n<style scoped>\n.v-overlay {\n z-index: var(--cr-z-index-dropdown);\n}\n</style>\n"],"names":["_createBlock","_component_v_menu","_withCtx","props","_createElementVNode","_renderSlot","_ctx","_createVNode","_component_v_list"],"mappings":";;;;;cAuBEA,EAaSC,GAAA;AAAA,IAZN,0BAAwB;AAAA,IACzB,QAAO;AAAA,IACP,WAAQ;AAAA;IAEG,WAASC,EAClB,CAEO,EAHe,OAAAC,QAAK;AAAA,MAC3BC,EAEO,YAFOD,CAAK,CAAA,GAAA;AAAA,QACjBE,EAAyBC,EAAA,QAAA,aAAA,CAAA,GAAA,QAAA,EAAA;AAAA;;eAG7B,MAES;AAAA,MAFTC,EAESC,GAAA,MAAA;AAAA,mBADP,MAAuB;AAAA,UAAvBH,EAAuBC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-menu-item-BSondWPp.js","sources":["../src/vue/x-menu-item.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\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,EAAK,SAAA;AAAA,mBACxB,MAAuB;AAAA,UAAvBC,EAAuBC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"x-menu-label-Dp7gEYzE.js","sources":["../src/vue/x-menu-label.vue"],"sourcesContent":["<!--\nSee the LICENSE file distributed with this work for additional\ninformation regarding copyright ownership.\n\nThis is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 2.1 of\nthe License, or (at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this software; if not, write to the Free\nSoftware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup></script>\n<template>\n <v-list-subheader>\n <slot name=\"default\" />\n </v-list-subheader>\n</template>\n"],"names":["_createBlock","_component_v_list_subheader","_renderSlot","_ctx"],"mappings":";;;;;cAqBEA,EAEmBC,GAAA,MAAA;AAAA,eADjB,MAAuB;AAAA,MAAvBC,EAAuBC,EAAA,QAAA,SAAA;AAAA;;;;;"}
@@ -1,518 +0,0 @@
1
- import { x as O, y as B, l as x, a as k, z as j, A as U, i as C, j as N, B as ee, F, C as P, D as E, E as te, G as J, H as S, I as M, J as ne, K as ie, L as le, M as ae, N as R, O as oe, P as re, m as Q, Q as ce, R as se, S as de, T as ue, U as y, W as D, X as ve, Y as fe, Z as he, _ as z, d as me, $ as ge, a0 as we, a1 as Ie, b as pe, w as Ce, u as be, o as G, c as K, t as W } from "./index-DNHsU4Fr.js";
2
- import { SpaceReference as ye } from "@xwiki/cristal-model-api";
3
- import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const _e = {
5
- includeTerminals: !0
6
- }, Pe = B({
7
- ...E(te({
8
- collapseIcon: "$treeviewCollapse",
9
- expandIcon: "$treeviewExpand"
10
- }), ["subgroup"])
11
- }, "VTreeviewGroup"), q = O()({
12
- name: "VTreeviewGroup",
13
- props: Pe(),
14
- setup(e, p) {
15
- let {
16
- slots: o
17
- } = p;
18
- const d = x(), m = k(() => d.value?.isOpen ? e.collapseIcon : e.expandIcon), s = k(() => ({
19
- VTreeviewItem: {
20
- prependIcon: void 0,
21
- appendIcon: void 0,
22
- active: d.value?.isOpen,
23
- toggleIcon: m.value
24
- }
25
- }));
26
- return j(() => {
27
- const g = U.filterProps(e);
28
- return C(U, P(g, {
29
- ref: d,
30
- class: ["v-treeview-group", e.class],
31
- subgroup: !0
32
- }), {
33
- ...o,
34
- activator: o.activator ? (n) => N(F, null, [C(ee, {
35
- defaults: s.value
36
- }, {
37
- default: () => [o.activator?.(n)]
38
- })]) : void 0
39
- });
40
- }), {};
41
- }
42
- }), X = Symbol.for("vuetify:v-treeview"), Ve = B({
43
- loading: Boolean,
44
- toggleIcon: R,
45
- ...ae({
46
- slim: !0
47
- })
48
- }, "VTreeviewItem"), H = O()({
49
- name: "VTreeviewItem",
50
- props: Ve(),
51
- emits: {
52
- toggleExpand: (e) => !0
53
- },
54
- setup(e, p) {
55
- let {
56
- slots: o,
57
- emit: d
58
- } = p;
59
- const m = J(X, {
60
- visibleIds: x()
61
- }).visibleIds, s = x(), g = k(() => s.value?.root.activatable.value && s.value?.isGroupActivator), n = k(() => s.value?.link.isClickable.value || e.value != null && !!s.value?.list), a = k(() => !e.disabled && e.link !== !1 && (e.link || n.value || g.value)), w = k(() => m.value && !m.value.has(S(s.value?.id)));
62
- function _(I) {
63
- a.value && g.value && s.value?.activate(!s.value?.isActivated, I);
64
- }
65
- function b(I) {
66
- I.preventDefault(), I.stopPropagation(), d("toggleExpand", I);
67
- }
68
- return j(() => {
69
- const I = E(M.filterProps(e), ["onClick"]), V = o.prepend || e.toggleIcon;
70
- return C(M, P({
71
- ref: s
72
- }, I, {
73
- active: s.value?.isActivated,
74
- class: ["v-treeview-item", {
75
- "v-treeview-item--activatable-group-activator": g.value,
76
- "v-treeview-item--filtered": w.value
77
- }, e.class],
78
- ripple: !1,
79
- onClick: e.onClick ?? _
80
- }), {
81
- ...o,
82
- prepend: V ? (c) => N(F, null, [C(ne, {
83
- start: !1
84
- }, {
85
- default: () => [e.toggleIcon ? C(ie, {
86
- density: "compact",
87
- icon: e.toggleIcon,
88
- loading: e.loading,
89
- variant: "text",
90
- onClick: b
91
- }, {
92
- loader() {
93
- return C(le, {
94
- indeterminate: "disable-shrink",
95
- size: "20",
96
- width: "2"
97
- }, null);
98
- }
99
- }) : N("div", {
100
- class: "v-treeview-item__level"
101
- }, null)]
102
- }), o.prepend?.(c)]) : void 0
103
- });
104
- }), {};
105
- }
106
- }), Y = B({
107
- disabled: Boolean,
108
- loadChildren: Function,
109
- loadingIcon: {
110
- type: String,
111
- default: "$loading"
112
- },
113
- items: Array,
114
- openOnClick: {
115
- type: Boolean,
116
- default: void 0
117
- },
118
- indeterminateIcon: {
119
- type: R,
120
- default: "$checkboxIndeterminate"
121
- },
122
- falseIcon: R,
123
- trueIcon: R,
124
- returnObject: Boolean,
125
- selectable: Boolean,
126
- selectedColor: String,
127
- selectStrategy: [String, Function, Object],
128
- ...oe()
129
- }, "VTreeviewChildren"), A = O()({
130
- name: "VTreeviewChildren",
131
- props: Y(),
132
- setup(e, p) {
133
- let {
134
- slots: o
135
- } = p;
136
- const d = re(/* @__PURE__ */ new Set()), m = k(() => !e.disabled && (e.openOnClick != null ? e.openOnClick : e.selectable));
137
- async function s(n) {
138
- try {
139
- if (!e.items?.length || !e.loadChildren) return;
140
- n?.children?.length === 0 && (d.add(n.value), await e.loadChildren(n.raw));
141
- } finally {
142
- d.delete(n.value);
143
- }
144
- }
145
- function g(n, a) {
146
- e.selectable && n(!a);
147
- }
148
- return () => o.default?.() ?? e.items?.map((n) => {
149
- const {
150
- children: a,
151
- props: w
152
- } = n, _ = d.has(n.value), b = {
153
- prepend: (c) => N(F, null, [e.selectable && (!a || a && !["leaf", "single-leaf"].includes(e.selectStrategy)) && N("div", null, [C(ce, {
154
- key: n.value,
155
- modelValue: c.isSelected,
156
- disabled: e.disabled,
157
- loading: _,
158
- color: e.selectedColor,
159
- density: e.density,
160
- indeterminate: c.isIndeterminate,
161
- indeterminateIcon: e.indeterminateIcon,
162
- falseIcon: e.falseIcon,
163
- trueIcon: e.trueIcon,
164
- onClick: Q(() => g(c.select, c.isSelected), ["stop"]),
165
- onKeydown: (r) => {
166
- ["Enter", "Space"].includes(r.key) && (r.stopPropagation(), g(c.select, c.isSelected));
167
- }
168
- }, null)]), o.prepend?.({
169
- ...c,
170
- item: n.raw,
171
- internalItem: n
172
- })]),
173
- append: o.append ? (c) => o.append?.({
174
- ...c,
175
- item: n.raw,
176
- internalItem: n
177
- }) : void 0,
178
- title: o.title ? (c) => o.title?.({
179
- ...c,
180
- item: n.raw,
181
- internalItem: n
182
- }) : void 0,
183
- subtitle: o.subtitle ? (c) => o.subtitle?.({
184
- ...c,
185
- item: n.raw,
186
- internalItem: n
187
- }) : void 0
188
- }, I = q.filterProps(w), V = A.filterProps(e);
189
- return a ? C(q, P(I, {
190
- value: e.returnObject ? n.raw : I?.value,
191
- rawId: I?.value
192
- }), {
193
- activator: (c) => {
194
- let {
195
- props: r
196
- } = c;
197
- const l = {
198
- ...w,
199
- ...r,
200
- value: w?.value,
201
- onToggleExpand: [() => s(n), r.onClick],
202
- onClick: m.value ? [() => s(n), r.onClick] : void 0
203
- };
204
- return C(H, P(l, {
205
- value: e.returnObject ? n.raw : w.value,
206
- loading: _
207
- }), b);
208
- },
209
- default: () => C(A, P(V, {
210
- items: a,
211
- returnObject: e.returnObject
212
- }), o)
213
- }) : o.item?.({
214
- props: w,
215
- item: n.raw,
216
- internalItem: n
217
- }) ?? C(H, P(w, {
218
- value: e.returnObject ? S(n.raw) : w.value
219
- }), b);
220
- });
221
- }
222
- });
223
- function Z(e) {
224
- let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
225
- for (const o of e)
226
- p.push(o), o.children && Z(o.children, p);
227
- return p;
228
- }
229
- const Te = B({
230
- fluid: Boolean,
231
- openAll: Boolean,
232
- search: String,
233
- ...se({
234
- filterKeys: ["title"]
235
- }),
236
- ...Y(),
237
- ...E(de({
238
- collapseIcon: "$treeviewCollapse",
239
- expandIcon: "$treeviewExpand",
240
- slim: !0
241
- }), ["itemType", "nav", "openStrategy"]),
242
- modelValue: {
243
- type: Array,
244
- default: () => []
245
- }
246
- }, "VTreeview"), xe = O()({
247
- name: "VTreeview",
248
- props: Te(),
249
- emits: {
250
- "update:opened": (e) => !0,
251
- "update:activated": (e) => !0,
252
- "update:selected": (e) => !0,
253
- "update:modelValue": (e) => !0,
254
- "click:open": (e) => !0,
255
- "click:select": (e) => !0
256
- },
257
- setup(e, p) {
258
- let {
259
- slots: o
260
- } = p;
261
- const {
262
- items: d
263
- } = ue(e), m = y(() => e.activeColor), s = y(() => e.baseColor), g = y(() => e.color), n = D(e, "activated"), a = D(e, "modelValue"), w = D(e, "selected", e.modelValue), _ = k({
264
- get: () => w.value,
265
- set(f) {
266
- w.value = f, a.value = f;
267
- }
268
- }), b = x(), I = k(() => e.openAll ? t(d.value) : e.opened), V = k(() => Z(d.value)), c = y(() => e.search), {
269
- filteredItems: r
270
- } = ve(e, V, c), l = k(() => {
271
- if (!c.value) return null;
272
- const f = b.value?.getPath;
273
- return f ? new Set(r.value.flatMap((u) => {
274
- const v = e.returnObject ? u.raw : u.props.value;
275
- return [...f(v), ...i(v)].map(S);
276
- })) : null;
277
- });
278
- function i(f) {
279
- const u = [], v = (b.value?.children.get(f) ?? []).slice();
280
- for (; v.length; ) {
281
- const T = v.shift();
282
- T && (u.push(T), v.push(...(b.value?.children.get(T) ?? []).slice()));
283
- }
284
- return u;
285
- }
286
- function t(f) {
287
- let u = [];
288
- for (const v of f)
289
- v.children && (u.push(e.returnObject ? S(v.raw) : v.value), v.children && (u = u.concat(t(v.children))));
290
- return u;
291
- }
292
- return fe(X, {
293
- visibleIds: l
294
- }), he({
295
- VTreeviewGroup: {
296
- activeColor: m,
297
- baseColor: s,
298
- color: g,
299
- collapseIcon: y(() => e.collapseIcon),
300
- expandIcon: y(() => e.expandIcon)
301
- },
302
- VTreeviewItem: {
303
- activeClass: y(() => e.activeClass),
304
- activeColor: m,
305
- baseColor: s,
306
- color: g,
307
- density: y(() => e.density),
308
- disabled: y(() => e.disabled),
309
- lines: y(() => e.lines),
310
- variant: y(() => e.variant)
311
- }
312
- }), j(() => {
313
- const f = z.filterProps(e), u = A.filterProps(e);
314
- return C(z, P({
315
- ref: b
316
- }, f, {
317
- class: ["v-treeview", {
318
- "v-treeview--fluid": e.fluid
319
- }, e.class],
320
- "open-strategy": "multiple",
321
- style: e.style,
322
- opened: I.value,
323
- activated: n.value,
324
- "onUpdate:activated": (v) => n.value = v,
325
- selected: _.value,
326
- "onUpdate:selected": (v) => _.value = v
327
- }), {
328
- default: () => [C(A, P(u, {
329
- density: e.density,
330
- returnObject: e.returnObject,
331
- items: d.value
332
- }), o)]
333
- });
334
- }), {};
335
- }
336
- }), Ne = ["href", "onClick"], Re = ["href"], Se = /* @__PURE__ */ me({
337
- __name: "x-navigation-tree",
338
- props: /* @__PURE__ */ ge({
339
- clickAction: { type: Function },
340
- currentPageReference: {},
341
- includeTerminals: { type: Boolean },
342
- showRootNode: { type: Boolean }
343
- }, _e),
344
- setup(e) {
345
- const p = J("cristal"), o = p.getContainer().get("DocumentService"), d = p.getContainer().get("NavigationTreeSourceProvider").get(), m = x([]), s = x(new Array()), g = x([]);
346
- var n = !1;
347
- const a = e;
348
- we(async () => {
349
- const r = [];
350
- for (const l of await c(""))
351
- r.push({
352
- id: l.id,
353
- title: l.label,
354
- href: l.url,
355
- children: l.has_children ? [] : void 0,
356
- _location: l.location,
357
- _is_terminal: l.is_terminal
358
- });
359
- a.showRootNode ? m.value.push({
360
- id: "",
361
- title: "Root",
362
- href: ".",
363
- children: r,
364
- _location: new ye(),
365
- _is_terminal: !1
366
- }) : m.value.push(...r), await w(), o.registerDocumentChangeListener("delete", I), o.registerDocumentChangeListener("update", V);
367
- }), Ie(() => a.currentPageReference, w);
368
- async function w() {
369
- if (a.currentPageReference && !n) {
370
- n = !0;
371
- const r = d.getParentNodesId(
372
- a.currentPageReference,
373
- a.includeTerminals,
374
- a.showRootNode
375
- );
376
- let l, i = m.value;
377
- for (l = 0; l < r.length - 1; l++)
378
- if (i)
379
- for (const t of i)
380
- t.id == r[l] && (t.children?.length == 0 && await _(t), g.value.includes(t.id) || g.value.push(t.id), i = t.children);
381
- if (i)
382
- for (const t of i)
383
- t.id == r[l] && (s.value = [t.id], a.clickAction && a.clickAction({
384
- id: t.id,
385
- label: t.title,
386
- location: t._location,
387
- url: t.href,
388
- has_children: t.children !== void 0,
389
- is_terminal: t._is_terminal
390
- }));
391
- n = !1;
392
- }
393
- }
394
- async function _(r) {
395
- const l = r, i = await c(l.id);
396
- for (const t of i)
397
- l.children?.push({
398
- id: t.id,
399
- title: t.label,
400
- href: t.url,
401
- children: t.has_children ? [] : void 0,
402
- _location: t.location,
403
- _is_terminal: t.is_terminal
404
- });
405
- i.length == 0 && (l.children = void 0);
406
- }
407
- function b() {
408
- s.value.length > 1 && s.value.pop();
409
- }
410
- async function I(r) {
411
- const l = d.getParentNodesId(
412
- r,
413
- a.includeTerminals,
414
- a.showRootNode
415
- );
416
- let i, t = m.value, f = !1;
417
- e: for (; t && !f; ) {
418
- for (const u of t.keys())
419
- if (t[u].id == l[0])
420
- if (l.length == 1) {
421
- t.splice(u, 1), i && t.length == 0 && (i.children = void 0);
422
- return;
423
- } else {
424
- i = t[u], t = i.children, l.shift();
425
- continue e;
426
- }
427
- f = !0;
428
- }
429
- }
430
- async function V(r) {
431
- const l = d.getParentNodesId(
432
- r,
433
- a.includeTerminals,
434
- a.showRootNode
435
- );
436
- let i, t = m.value, f = !1, u = !0;
437
- e: for (; t && !f; ) {
438
- for (const h of t.keys())
439
- if (t[h].id == l[0])
440
- if (l.length == 1) {
441
- const L = await c(
442
- i || ""
443
- );
444
- for (const $ of L)
445
- if ($.id == t[h].id) {
446
- t[h].title = $.label;
447
- return;
448
- }
449
- } else {
450
- i = t[h].id, t[h].children || (t[h].children = []), t = t[h].children, l.shift(), u = !1;
451
- continue e;
452
- }
453
- f = !0;
454
- }
455
- if (t.length == 0 && !u)
456
- return;
457
- const v = await c(i || ""), T = a.currentPageReference ? d.getParentNodesId(
458
- a.currentPageReference,
459
- a.includeTerminals
460
- ) : [];
461
- e: for (const h of v) {
462
- for (const L of t.keys())
463
- if (h.id == t[L].id)
464
- continue e;
465
- t.push({
466
- id: h.id,
467
- title: h.label,
468
- href: h.url,
469
- children: h.has_children ? [] : void 0,
470
- _location: h.location,
471
- _is_terminal: h.is_terminal
472
- }), T.length > 0 && T[T.length - 1] === h.id && (s.value = [h.id]);
473
- }
474
- }
475
- async function c(r) {
476
- return (await d.getChildNodes(r)).filter(
477
- (l) => a.includeTerminals || !l.is_terminal
478
- );
479
- }
480
- return (r, l) => (G(), pe(be(xe), {
481
- opened: g.value,
482
- "onUpdate:opened": l[0] || (l[0] = (i) => g.value = i),
483
- density: "compact",
484
- activated: s.value,
485
- items: m.value,
486
- "load-children": _,
487
- activatable: "",
488
- "active-strategy": "independent",
489
- "item-value": "id",
490
- "onUpdate:activated": b
491
- }, {
492
- title: Ce(({ item: i }) => [
493
- a.clickAction ? (G(), K("a", {
494
- key: 0,
495
- href: i.href,
496
- onClick: Q((t) => {
497
- s.value = [i.id], r.clickAction({
498
- id: i.id,
499
- label: i.title,
500
- location: i._location,
501
- url: i.href,
502
- has_children: i.children !== void 0,
503
- is_terminal: i._is_terminal
504
- });
505
- }, ["prevent"])
506
- }, W(i.title), 9, Ne)) : (G(), K("a", {
507
- key: 1,
508
- href: i.href
509
- }, W(i.title), 9, Re))
510
- ]),
511
- _: 1
512
- }, 8, ["opened", "activated", "items"]));
513
- }
514
- }), Le = /* @__PURE__ */ ke(Se, [["__scopeId", "data-v-7243c728"]]);
515
- export {
516
- Le as default
517
- };
518
- //# sourceMappingURL=x-navigation-tree-BMLu80ML.js.map