@xwiki/cristal-dsvuetify 0.16.0 → 0.18.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 (79) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/{index-CLqR2xXr.js → index-C-c8K0Z_.js} +7863 -7315
  3. package/dist/index-C-c8K0Z_.js.map +1 -0
  4. package/dist/index.es.js +5 -5
  5. package/dist/index.umd.js +10 -10
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/{translations-k4crOAds.js → translations-BVK9UR9x.js} +4 -1
  8. package/dist/{translations-k4crOAds.js.map → translations-BVK9UR9x.js.map} +1 -1
  9. package/dist/vue/form/x-form.vue.d.ts +1195 -3
  10. package/dist/vue/form/x-select.vue.d.ts +11 -0
  11. package/dist/{x-alert-CRdF8zFB.js → x-alert-gEtl8xCI.js} +10 -10
  12. package/dist/x-alert-gEtl8xCI.js.map +1 -0
  13. package/dist/{x-avatar-Ds9aYRI9.js → x-avatar-WnkeGyHH.js} +2 -2
  14. package/dist/x-avatar-WnkeGyHH.js.map +1 -0
  15. package/dist/{x-breadcrumb-C2iUd4Sf.js → x-breadcrumb-CyjqjISE.js} +3 -3
  16. package/dist/{x-breadcrumb-C2iUd4Sf.js.map → x-breadcrumb-CyjqjISE.js.map} +1 -1
  17. package/dist/{x-btn-DwTcXGgx.js → x-btn-DzH2bk-f.js} +4 -4
  18. package/dist/{x-btn-DwTcXGgx.js.map → x-btn-DzH2bk-f.js.map} +1 -1
  19. package/dist/{x-card-CRM9KUby.js → x-card-BlUD5hbt.js} +3 -3
  20. package/dist/{x-card-CRM9KUby.js.map → x-card-BlUD5hbt.js.map} +1 -1
  21. package/dist/{x-checkbox-BMonacnS.js → x-checkbox-D6cpCtlt.js} +4 -4
  22. package/dist/{x-checkbox-BMonacnS.js.map → x-checkbox-D6cpCtlt.js.map} +1 -1
  23. package/dist/x-dialog-Ccb-vGZ2.js +49 -0
  24. package/dist/x-dialog-Ccb-vGZ2.js.map +1 -0
  25. package/dist/{x-divider-Buudf0KI.js → x-divider-BOCxsH8h.js} +3 -3
  26. package/dist/x-divider-BOCxsH8h.js.map +1 -0
  27. package/dist/{x-file-input-CUcSVuxz.js → x-file-input-DubSSwF4.js} +5 -5
  28. package/dist/{x-file-input-CUcSVuxz.js.map → x-file-input-DubSSwF4.js.map} +1 -1
  29. package/dist/x-form-B2T8k_wn.js +36 -0
  30. package/dist/x-form-B2T8k_wn.js.map +1 -0
  31. package/dist/{x-img-BYgs_O1F.js → x-img-DWbVDNTs.js} +3 -3
  32. package/dist/{x-img-BYgs_O1F.js.map → x-img-DWbVDNTs.js.map} +1 -1
  33. package/dist/x-load-Bw4ftl3k.js +11 -0
  34. package/dist/x-load-Bw4ftl3k.js.map +1 -0
  35. package/dist/{x-menu-DDC7z1Wb.js → x-menu-BeWrqcFy.js} +5 -5
  36. package/dist/{x-menu-DDC7z1Wb.js.map → x-menu-BeWrqcFy.js.map} +1 -1
  37. package/dist/{x-menu-item-ByE5R9Bf.js → x-menu-item-CBdOhZc3.js} +3 -3
  38. package/dist/x-menu-item-CBdOhZc3.js.map +1 -0
  39. package/dist/{x-menu-label-DniImc0U.js → x-menu-label-D-sFcG_g.js} +3 -3
  40. package/dist/{x-menu-label-DniImc0U.js.map → x-menu-label-D-sFcG_g.js.map} +1 -1
  41. package/dist/{x-navigation-tree-CeAKceG7.js → x-navigation-tree-Cx21xHVH.js} +70 -70
  42. package/dist/x-navigation-tree-Cx21xHVH.js.map +1 -0
  43. package/dist/{x-navigation-tree-select-C6j0iSBP.js → x-navigation-tree-select-B3fRZYec.js} +10 -10
  44. package/dist/{x-navigation-tree-select-C6j0iSBP.js.map → x-navigation-tree-select-B3fRZYec.js.map} +1 -1
  45. package/dist/{x-search-C4yZLrSp.js → x-search-C7GhoCKj.js} +3 -3
  46. package/dist/{x-search-C4yZLrSp.js.map → x-search-C7GhoCKj.js.map} +1 -1
  47. package/dist/x-select-CgIqNkk3.js +39 -0
  48. package/dist/x-select-CgIqNkk3.js.map +1 -0
  49. package/dist/{x-tab-group-D1jmHXyJ.js → x-tab-group-BfEaq8Nj.js} +3 -3
  50. package/dist/{x-tab-group-D1jmHXyJ.js.map → x-tab-group-BfEaq8Nj.js.map} +1 -1
  51. package/dist/{x-tab-panel-YsSPuuLL.js → x-tab-panel-DysgiPCz.js} +3 -3
  52. package/dist/x-tab-panel-DysgiPCz.js.map +1 -0
  53. package/dist/{x-tab-OWsxC4de.js → x-tab-vRrbUjdK.js} +3 -3
  54. package/dist/x-tab-vRrbUjdK.js.map +1 -0
  55. package/dist/{x-text-field-D94TCr6e.js → x-text-field-KwBy_u7M.js} +8 -8
  56. package/dist/{x-text-field-D94TCr6e.js.map → x-text-field-KwBy_u7M.js.map} +1 -1
  57. package/langs/translation-de.json +1 -0
  58. package/langs/translation-en.json +1 -0
  59. package/langs/translation-fr.json +1 -0
  60. package/package.json +15 -15
  61. package/src/components/vuetifyDesignSystemLoader.ts +5 -0
  62. package/src/vue/css/style.css +4 -0
  63. package/src/vue/form/x-form.vue +19 -3
  64. package/src/vue/form/x-select.vue +57 -0
  65. package/src/vue/x-dialog.vue +1 -1
  66. package/dist/index-CLqR2xXr.js.map +0 -1
  67. package/dist/x-alert-CRdF8zFB.js.map +0 -1
  68. package/dist/x-avatar-Ds9aYRI9.js.map +0 -1
  69. package/dist/x-dialog-DCEnccuq.js +0 -48
  70. package/dist/x-dialog-DCEnccuq.js.map +0 -1
  71. package/dist/x-divider-Buudf0KI.js.map +0 -1
  72. package/dist/x-form-DWpzuKe6.js +0 -25
  73. package/dist/x-form-DWpzuKe6.js.map +0 -1
  74. package/dist/x-load-DipiCmNY.js +0 -11
  75. package/dist/x-load-DipiCmNY.js.map +0 -1
  76. package/dist/x-menu-item-ByE5R9Bf.js.map +0 -1
  77. package/dist/x-navigation-tree-CeAKceG7.js.map +0 -1
  78. package/dist/x-tab-OWsxC4de.js.map +0 -1
  79. package/dist/x-tab-panel-YsSPuuLL.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, ref as i, resolveComponent as n, openBlock as b, createBlock as V, withCtx as a, createVNode as s, renderSlot as u } from "vue";
1
+ import { defineComponent as f, ref as i, resolveComponent as n, createBlock as b, openBlock as V, withCtx as a, createVNode as s, renderSlot as u } from "vue";
2
2
  const x = /* @__PURE__ */ f({
3
3
  __name: "x-tab-group",
4
4
  emits: ["tab-change"],
@@ -9,7 +9,7 @@ const x = /* @__PURE__ */ f({
9
9
  }
10
10
  return (e, o) => {
11
11
  const _ = n("v-tabs"), c = n("v-tabs-window"), p = n("v-card-text"), v = n("v-card");
12
- return b(), V(v, { class: "mx-auto" }, {
12
+ return V(), b(v, { class: "mx-auto" }, {
13
13
  default: a(() => [
14
14
  s(_, {
15
15
  modelValue: t.value,
@@ -46,4 +46,4 @@ const x = /* @__PURE__ */ f({
46
46
  export {
47
47
  x as default
48
48
  };
49
- //# sourceMappingURL=x-tab-group-D1jmHXyJ.js.map
49
+ //# sourceMappingURL=x-tab-group-BfEaq8Nj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-tab-group-D1jmHXyJ.js","sources":["../src/vue/x-tab-group.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 { 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"],"mappings":";;;;;AAqBA,UAAMA,IAAoBC,EAAI,GAExBC,IAAQC;AAEd,aAASC,EAAOC,GAAgB;AAC1B,MAAA,OAAOA,KAAS,YAClBH,EAAM,cAAcG,CAAK;AAAA,IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"x-tab-group-BfEaq8Nj.js","sources":["../src/vue/x-tab-group.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 { 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"],"mappings":";;;;;AAqBA,UAAMA,IAAoBC,EAAI,GAExBC,IAAQC;AAEd,aAASC,EAAOC,GAAgB;AAC1B,MAAA,OAAOA,KAAS,YAClBH,EAAM,cAAcG,CAAK;AAAA,IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as o, resolveComponent as n, openBlock as a, createBlock as r, withCtx as p, renderSlot as s } from "vue";
1
+ import { defineComponent as o, resolveComponent as n, createBlock as a, openBlock as r, withCtx as p, renderSlot as s } from "vue";
2
2
  const m = /* @__PURE__ */ o({
3
3
  __name: "x-tab-panel",
4
4
  props: {
@@ -7,7 +7,7 @@ const m = /* @__PURE__ */ o({
7
7
  setup(_) {
8
8
  return (e, l) => {
9
9
  const t = n("v-tabs-window-item");
10
- return a(), r(t, { value: e.tabId }, {
10
+ return r(), a(t, { value: e.tabId }, {
11
11
  default: p(() => [
12
12
  s(e.$slots, "default")
13
13
  ]),
@@ -19,4 +19,4 @@ const m = /* @__PURE__ */ o({
19
19
  export {
20
20
  m as default
21
21
  };
22
- //# sourceMappingURL=x-tab-panel-YsSPuuLL.js.map
22
+ //# sourceMappingURL=x-tab-panel-DysgiPCz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-tab-panel-DysgiPCz.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as o, resolveComponent as a, openBlock as n, createBlock as r, withCtx as p, renderSlot as l } from "vue";
1
+ import { defineComponent as o, resolveComponent as a, createBlock as n, openBlock as r, withCtx as p, renderSlot as l } from "vue";
2
2
  const u = /* @__PURE__ */ o({
3
3
  __name: "x-tab",
4
4
  props: {
@@ -7,7 +7,7 @@ const u = /* @__PURE__ */ o({
7
7
  setup(s) {
8
8
  return (e, _) => {
9
9
  const t = a("v-tab");
10
- return n(), r(t, { value: e.tabId }, {
10
+ return r(), n(t, { value: e.tabId }, {
11
11
  default: p(() => [
12
12
  l(e.$slots, "default")
13
13
  ]),
@@ -19,4 +19,4 @@ const u = /* @__PURE__ */ o({
19
19
  export {
20
20
  u as default
21
21
  };
22
- //# sourceMappingURL=x-tab-OWsxC4de.js.map
22
+ //# sourceMappingURL=x-tab-vRrbUjdK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-tab-vRrbUjdK.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as s, mergeModels as m, useModel as p, computed as d, openBlock as i, createBlock as f, unref as y } from "vue";
2
- import { t as V } from "./translations-k4crOAds.js";
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
+ import { t as V } from "./translations-BVK9UR9x.js";
3
3
  import { useI18n as c } from "vue-i18n";
4
- import { a as h } from "./index-CLqR2xXr.js";
4
+ import { a as h } from "./index-C-c8K0Z_.js";
5
5
  const g = /* @__PURE__ */ s({
6
6
  __name: "x-text-field",
7
7
  props: /* @__PURE__ */ m({
@@ -19,13 +19,13 @@ const g = /* @__PURE__ */ s({
19
19
  }),
20
20
  emits: ["update:modelValue"],
21
21
  setup(t) {
22
- const { t: n } = c({
22
+ const { t: a } = c({
23
23
  messages: V
24
- }), a = t, l = p(t, "modelValue"), u = d(() => {
24
+ }), n = t, l = p(t, "modelValue"), u = i(() => {
25
25
  const e = [];
26
- return a.required && e.push((o) => o ? !0 : n("vuetify.text.input.mandatory")), e;
26
+ return n.required && e.push((o) => o ? !0 : a("vuetify.text.input.mandatory")), e;
27
27
  });
28
- return (e, o) => (i(), f(y(h), {
28
+ return (e, o) => (f(), d(y(h), {
29
29
  modelValue: l.value,
30
30
  "onUpdate:modelValue": o[0] || (o[0] = (r) => l.value = r),
31
31
  label: e.label,
@@ -42,4 +42,4 @@ const g = /* @__PURE__ */ s({
42
42
  export {
43
43
  g as default
44
44
  };
45
- //# sourceMappingURL=x-text-field-D94TCr6e.js.map
45
+ //# sourceMappingURL=x-text-field-KwBy_u7M.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-text-field-D94TCr6e.js","sources":["../src/vue/form/x-text-field.vue"],"sourcesContent":["<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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOM,UAAA,EAAE,GAAAA,EAAE,IAAIC,EAAQ;AAAA,MACpBC,UAAAA;AAAAA,IAAA,CACD,GACKC,IAAQC,GACRC,IAAQC,EAAmBF,GAAA,YAAC,GAE5BG,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAC;AACnB,aAAIN,EAAM,YACEM,EAAA,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IAAA,CACR;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"x-text-field-KwBy_u7M.js","sources":["../src/vue/form/x-text-field.vue"],"sourcesContent":["<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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOM,UAAA,EAAE,GAAAA,EAAE,IAAIC,EAAQ;AAAA,MACpBC,UAAAA;AAAAA,IAAA,CACD,GACKC,IAAQC,GACRC,IAAQC,EAAmBF,GAAA,YAAC,GAE5BG,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAC;AACnB,aAAIN,EAAM,YACEM,EAAA,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IAAA,CACR;;;;;;;;;;;;;;;"}
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "vuetify.file.input.mandatory": "Pflichtfeld",
3
+ "vuetify.select.input.mandatory": "Pflichtfeld",
3
4
  "vuetify.text.input.mandatory": "Pflichtfeld",
4
5
  "vuetify.tree.select.location.label": "Speicherort der Seite ändern",
5
6
  "vuetify.tree.select.location.select": "Auswählen"
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "vuetify.file.input.mandatory": "Mandatory field",
3
+ "vuetify.select.input.mandatory": "Mandatory field",
3
4
  "vuetify.text.input.mandatory": "Mandatory field",
4
5
  "vuetify.tree.select.location.label": "Change Page Location",
5
6
  "vuetify.tree.select.location.select": "Select"
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "vuetify.file.input.mandatory": "Champ obligatoire",
3
+ "vuetify.select.input.mandatory": "Champ obligatoire",
3
4
  "vuetify.text.input.mandatory": "Champ obligatoire",
4
5
  "vuetify.tree.select.location.label": "Changer l'emplacement de la page",
5
6
  "vuetify.tree.select.location.select": "Sélectionner"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-dsvuetify",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -22,16 +22,16 @@
22
22
  },
23
23
  "main": "./dist/index.es.js",
24
24
  "dependencies": {
25
- "inversify": "7.1.0",
25
+ "inversify": "7.5.1",
26
26
  "vue": "3.5.13",
27
- "vue-i18n": "11.1.2",
28
- "vuetify": "3.7.16",
29
- "@xwiki/cristal-api": "0.16.0",
30
- "@xwiki/cristal-document-api": "0.16.0",
31
- "@xwiki/cristal-model-api": "0.16.0",
32
- "@xwiki/cristal-hierarchy-api": "0.16.0",
33
- "@xwiki/cristal-navigation-tree-api": "0.16.0",
34
- "@xwiki/cristal-model-reference-api": "0.16.0"
27
+ "vue-i18n": "11.1.3",
28
+ "vuetify": "3.8.3",
29
+ "@xwiki/cristal-document-api": "0.18.0",
30
+ "@xwiki/cristal-model-reference-api": "0.18.0",
31
+ "@xwiki/cristal-navigation-tree-api": "0.18.0",
32
+ "@xwiki/cristal-hierarchy-api": "0.18.0",
33
+ "@xwiki/cristal-model-api": "0.18.0",
34
+ "@xwiki/cristal-api": "0.18.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "reflect-metadata": "0.2.2"
@@ -39,11 +39,11 @@
39
39
  "devDependencies": {
40
40
  "@vue/test-utils": "2.4.6",
41
41
  "reflect-metadata": "0.2.2",
42
- "typescript": "5.8.2",
43
- "vite": "6.2.2",
44
- "vue-tsc": "2.2.8",
45
- "@xwiki/cristal-dev-config": "0.16.0",
46
- "@xwiki/cristal-dsapi": "0.16.0"
42
+ "typescript": "5.8.3",
43
+ "vite": "6.3.5",
44
+ "vue-tsc": "2.2.10",
45
+ "@xwiki/cristal-dev-config": "0.18.0",
46
+ "@xwiki/cristal-dsapi": "0.18.0"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "pnpm compile",
@@ -151,5 +151,10 @@ export class VuetifyDesignSystemLoader implements DesignSystemLoader {
151
151
  "XNavigationTreeSelect",
152
152
  () => import("../vue/form/x-navigation-tree-select.vue"),
153
153
  );
154
+ registerAsyncComponent(
155
+ app,
156
+ "XSelect",
157
+ () => import("../vue/form/x-select.vue"),
158
+ );
154
159
  }
155
160
  }
@@ -25,6 +25,10 @@
25
25
  height: 64px;
26
26
  }
27
27
 
28
+ html {
29
+ overflow-y: auto;
30
+ }
31
+
28
32
  main ul, main ol {
29
33
  padding-inline-start: var(--cr-spacing-x-large);
30
34
  }
@@ -1,13 +1,29 @@
1
1
  <script setup lang="ts">
2
+ import { ref } from "vue";
2
3
  import { VForm } from "vuetify/components/VForm";
4
+ import type { Ref } from "vue";
5
+
6
+ const form: Ref<VForm | undefined> = ref(undefined);
3
7
  const emits = defineEmits(["formSubmit"]);
4
- function submit() {
5
- emits("formSubmit");
8
+
9
+ defineExpose({
10
+ reset,
11
+ });
12
+
13
+ async function reset() {
14
+ form.value?.reset();
15
+ }
16
+
17
+ async function submit() {
18
+ const validation = await form.value?.validate();
19
+ if (validation?.valid) {
20
+ emits("formSubmit");
21
+ }
6
22
  }
7
23
  </script>
8
24
 
9
25
  <template>
10
- <v-form @submit.prevent="submit">
26
+ <v-form ref="form" @submit.prevent="submit">
11
27
  <slot></slot>
12
28
  </v-form>
13
29
  </template>
@@ -0,0 +1,57 @@
1
+ <!--
2
+ See the LICENSE file distributed with this work for additional
3
+ information regarding copyright ownership.
4
+
5
+ This is free software; you can redistribute it and/or modify it
6
+ under the terms of the GNU Lesser General Public License as
7
+ published by the Free Software Foundation; either version 2.1 of
8
+ the License, or (at your option) any later version.
9
+
10
+ This software is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ Lesser General Public License for more details.
14
+
15
+ You should have received a copy of the GNU Lesser General Public
16
+ License along with this software; if not, write to the Free
17
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
+ -->
20
+ <script lang="ts" setup>
21
+ import messages from "../../translations";
22
+ import { computed } from "vue";
23
+ import { useI18n } from "vue-i18n";
24
+ import { VSelect } from "vuetify/components/VSelect";
25
+ import type { SelectProps } from "@xwiki/cristal-dsapi";
26
+
27
+ const props = defineProps<SelectProps>();
28
+ const selected = defineModel<string>();
29
+
30
+ const { t } = useI18n({
31
+ messages,
32
+ });
33
+
34
+ const rules = computed(() => {
35
+ const rulesList = [];
36
+ if (props.required) {
37
+ rulesList.push((value: unknown) => {
38
+ if (value) {
39
+ return true;
40
+ } else {
41
+ return t("vuetify.select.input.mandatory");
42
+ }
43
+ });
44
+ }
45
+ return rulesList;
46
+ });
47
+ </script>
48
+ <template>
49
+ <v-select
50
+ v-model="selected"
51
+ :label="label"
52
+ :messages="help"
53
+ :items="items"
54
+ :rules="rules"
55
+ :clearable="!required"
56
+ ></v-select>
57
+ </template>
@@ -25,7 +25,7 @@ defineProps<{
25
25
  </script>
26
26
 
27
27
  <template>
28
- <v-dialog :width="width" scrollable>
28
+ <v-dialog :width="width" attach="#view" scrollable>
29
29
  <template #activator="{ props }">
30
30
  <span v-bind="props">
31
31
  <slot name="activator" />