@xwiki/cristal-dsvuetify 0.15.0 → 0.16.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.
- package/CHANGELOG.md +16 -0
- package/dist/{index-BAakw3UY.js → index-CLqR2xXr.js} +5386 -5312
- package/dist/index-CLqR2xXr.js.map +1 -0
- package/dist/index.es.js +4 -4
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/vue/form/x-checkbox.vue.d.ts +3 -3
- package/dist/vue/form/x-navigation-tree-select.vue.d.ts +3 -1
- package/dist/vue/x-navigation-tree.vue.d.ts +3 -1
- package/dist/{x-checkbox-Fro597Ax.js → x-checkbox-BMonacnS.js} +7 -7
- package/dist/{x-checkbox-Fro597Ax.js.map → x-checkbox-BMonacnS.js.map} +1 -1
- package/dist/{x-file-input-CvH0AC3G.js → x-file-input-CUcSVuxz.js} +7 -6
- package/dist/{x-file-input-CvH0AC3G.js.map → x-file-input-CUcSVuxz.js.map} +1 -1
- package/dist/{x-form-DCHdDC6W.js → x-form-DWpzuKe6.js} +2 -2
- package/dist/{x-form-DCHdDC6W.js.map → x-form-DWpzuKe6.js.map} +1 -1
- package/dist/x-navigation-tree-CeAKceG7.js +543 -0
- package/dist/x-navigation-tree-CeAKceG7.js.map +1 -0
- package/dist/x-navigation-tree-select-C6j0iSBP.js +99 -0
- package/dist/x-navigation-tree-select-C6j0iSBP.js.map +1 -0
- package/dist/{x-tab-group-Bp7V46k9.js → x-tab-group-D1jmHXyJ.js} +2 -2
- package/dist/x-tab-group-D1jmHXyJ.js.map +1 -0
- package/dist/x-text-field-D94TCr6e.js +45 -0
- package/dist/{x-text-field-2Sv6HUGW.js.map → x-text-field-D94TCr6e.js.map} +1 -1
- package/package.json +15 -15
- package/src/components/componentsInit.ts +1 -1
- package/src/components/vuetifyDesignSystemLoader.ts +0 -1
- package/src/vue/__tests__/utils/vuetify.ts +0 -1
- package/src/vue/form/x-checkbox.vue +1 -1
- package/src/vue/form/x-navigation-tree-select.vue +6 -1
- package/src/vue/form/x-text-field.vue +1 -0
- package/src/vue/x-navigation-tree.vue +30 -14
- package/src/vue/x-tab-group.vue +2 -2
- package/dist/index-BAakw3UY.js.map +0 -1
- package/dist/x-navigation-tree-D_fUW-gW.js +0 -520
- package/dist/x-navigation-tree-D_fUW-gW.js.map +0 -1
- package/dist/x-navigation-tree-select-DaiYF3ux.js +0 -95
- package/dist/x-navigation-tree-select-DaiYF3ux.js.map +0 -1
- package/dist/x-tab-group-Bp7V46k9.js.map +0 -1
- package/dist/x-text-field-2Sv6HUGW.js +0 -43
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, mergeModels as X, inject as k, useModel as w, ref as v, onMounted as N, resolveComponent as i, openBlock as B, createElementBlock as D, Fragment as H, createVNode as t, unref as o, withCtx as a, createTextVNode as h, toDisplayString as _ } from "vue";
|
|
2
|
-
import { t as M } from "./translations-k4crOAds.js";
|
|
3
|
-
import T from "./x-breadcrumb-C2iUd4Sf.js";
|
|
4
|
-
import { SpaceReference as S } from "@xwiki/cristal-model-api";
|
|
5
|
-
import { useI18n as F } from "vue-i18n";
|
|
6
|
-
import { a as I } from "./index-BAakw3UY.js";
|
|
7
|
-
import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const z = /* @__PURE__ */ C({
|
|
9
|
-
__name: "x-navigation-tree-select",
|
|
10
|
-
props: /* @__PURE__ */ X({
|
|
11
|
-
label: {},
|
|
12
|
-
help: {},
|
|
13
|
-
currentPageReference: {},
|
|
14
|
-
modelValue: {}
|
|
15
|
-
}, {
|
|
16
|
-
modelValue: {},
|
|
17
|
-
modelModifiers: {}
|
|
18
|
-
}),
|
|
19
|
-
emits: ["update:modelValue"],
|
|
20
|
-
setup(m) {
|
|
21
|
-
const d = k("cristal"), f = d.getContainer().get("PageHierarchyResolverProvider").get(), y = d.getContainer().get("ModelReferenceHandlerProvider").get(), { t: c } = F({
|
|
22
|
-
messages: M
|
|
23
|
-
}), s = m, p = w(m, "modelValue"), u = v(!1), n = v([]);
|
|
24
|
-
let l;
|
|
25
|
-
N(async () => {
|
|
26
|
-
l = s.currentPageReference, p.value = s.currentPageReference.space, n.value = await f.getPageHierarchy(
|
|
27
|
-
s.currentPageReference.space
|
|
28
|
-
);
|
|
29
|
-
});
|
|
30
|
-
async function b(e) {
|
|
31
|
-
l = y.createDocumentReference(
|
|
32
|
-
e.location.names[e.location.names.length - 1],
|
|
33
|
-
new S(e.location.wiki, ...e.location.names.slice(0, -1))
|
|
34
|
-
), p.value = e.location, n.value = await f.getPageHierarchy(l);
|
|
35
|
-
}
|
|
36
|
-
return (e, r) => {
|
|
37
|
-
const P = i("x-btn"), V = i("XNavigationTree"), R = i("XBtn"), x = i("XDialog");
|
|
38
|
-
return B(), D(H, null, [
|
|
39
|
-
t(o(I), {
|
|
40
|
-
label: e.label,
|
|
41
|
-
hint: e.help,
|
|
42
|
-
"persistent-hint": e.help !== void 0,
|
|
43
|
-
active: n.value.length > 0,
|
|
44
|
-
readonly: ""
|
|
45
|
-
}, {
|
|
46
|
-
default: a(() => [
|
|
47
|
-
t(T, { items: n.value }, null, 8, ["items"])
|
|
48
|
-
]),
|
|
49
|
-
_: 1
|
|
50
|
-
}, 8, ["label", "hint", "persistent-hint", "active"]),
|
|
51
|
-
t(x, {
|
|
52
|
-
modelValue: u.value,
|
|
53
|
-
"onUpdate:modelValue": r[1] || (r[1] = (g) => u.value = g),
|
|
54
|
-
width: "auto",
|
|
55
|
-
title: o(c)("vuetify.tree.select.location.label")
|
|
56
|
-
}, {
|
|
57
|
-
activator: a(() => [
|
|
58
|
-
t(P, {
|
|
59
|
-
id: "change-page-location-button",
|
|
60
|
-
size: "small",
|
|
61
|
-
color: "secondary"
|
|
62
|
-
}, {
|
|
63
|
-
default: a(() => [
|
|
64
|
-
h(_(o(c)("vuetify.tree.select.location.label")), 1)
|
|
65
|
-
]),
|
|
66
|
-
_: 1
|
|
67
|
-
})
|
|
68
|
-
]),
|
|
69
|
-
default: a(() => [
|
|
70
|
-
t(V, {
|
|
71
|
-
"current-page-reference": o(l),
|
|
72
|
-
"click-action": b
|
|
73
|
-
}, null, 8, ["current-page-reference"])
|
|
74
|
-
]),
|
|
75
|
-
footer: a(() => [
|
|
76
|
-
t(R, {
|
|
77
|
-
variant: "primary",
|
|
78
|
-
onClick: r[0] || (r[0] = (g) => u.value = !1)
|
|
79
|
-
}, {
|
|
80
|
-
default: a(() => [
|
|
81
|
-
h(_(o(c)("vuetify.tree.select.location.select")), 1)
|
|
82
|
-
]),
|
|
83
|
-
_: 1
|
|
84
|
-
})
|
|
85
|
-
]),
|
|
86
|
-
_: 1
|
|
87
|
-
}, 8, ["modelValue", "title"])
|
|
88
|
-
], 64);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}), J = /* @__PURE__ */ j(z, [["__scopeId", "data-v-059de402"]]);
|
|
92
|
-
export {
|
|
93
|
-
J as default
|
|
94
|
-
};
|
|
95
|
-
//# sourceMappingURL=x-navigation-tree-select-DaiYF3ux.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"x-navigation-tree-select-DaiYF3ux.js","sources":["../src/vue/form/x-navigation-tree-select.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 messages from \"../../translations\";\nimport XBreadcrumb from \"../x-breadcrumb.vue\";\nimport { 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 = defineProps<NavigationTreeSelectProps>();\nconst model = defineModel<SpaceReference>();\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 );\n});\n\nasync function treeNodeClickAction(node: NavigationTreeNode) {\n selectedPage = referenceHandler.createDocumentReference(\n node.location.names[node.location.names.length - 1],\n new SpaceReference(node.location.wiki, ...node.location.names.slice(0, -1)),\n );\n model.value = node.location;\n hierarchy.value = await hierarchyResolver.getPageHierarchy(selectedPage);\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 ></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":["cristal","inject","hierarchyResolver","referenceHandler","t","useI18n","messages","props","__props","model","_useModel","openedLocationDialog","ref","hierarchy","selectedPage","onMounted","treeNodeClickAction","node","SpaceReference"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyCM,UAAAA,IAAsBC,EAAmB,SAAS,GAClDC,IAA2CF,EAC9C,aAAA,EACA,IAAmC,+BAA+B,EAClE,IAAI,GACDG,IAA0CH,EAC7C,aAAA,EACA,IAAmC,+BAA+B,EAClE,IAAI,GAED,EAAE,GAAAI,EAAE,IAAIC,EAAQ;AAAA,MACpBC,UAAAA;AAAAA,IAAA,CACD,GACKC,IAAQC,GACRC,IAAQC,iBAA4B,GAEpCC,IAAqCC,EAAI,EAAK,GAC9CC,IAA2CD,EAAI,EAAE;AACnD,QAAAE;AAEJ,IAAAC,EAAU,YAAY;AACpB,MAAAD,IAAeP,EAAM,sBACfE,EAAA,QAAQF,EAAM,qBAAsB,OAChCM,EAAA,QAAQ,MAAMX,EAAkB;AAAA,QACxCK,EAAM,qBAAsB;AAAA,MAC9B;AAAA,IAAA,CACD;AAED,mBAAeS,EAAoBC,GAA0B;AAC3D,MAAAH,IAAeX,EAAiB;AAAA,QAC9Bc,EAAK,SAAS,MAAMA,EAAK,SAAS,MAAM,SAAS,CAAC;AAAA,QAClD,IAAIC,EAAeD,EAAK,SAAS,MAAM,GAAGA,EAAK,SAAS,MAAM,MAAM,GAAG,EAAE,CAAC;AAAA,MAC5E,GACAR,EAAM,QAAQQ,EAAK,UACnBJ,EAAU,QAAQ,MAAMX,EAAkB,iBAAiBY,CAAY;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"x-tab-group-Bp7V46k9.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 } from \"vue\";\nconst tab = ref(null);\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":";;;;;AAqBM,UAAAA,IAAMC,EAAI,IAAI,GAEdC,IAAQC;AAEd,aAASC,EAAOC,GAAgB;AAC1B,MAAA,OAAOA,KAAS,YAClBH,EAAM,cAAcG,CAAK;AAAA,IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { defineComponent as s, mergeModels as m, useModel as d, computed as i, openBlock as p, createBlock as f, unref as y } from "vue";
|
|
2
|
-
import { t as c } from "./translations-k4crOAds.js";
|
|
3
|
-
import { useI18n as V } from "vue-i18n";
|
|
4
|
-
import { a as h } from "./index-BAakw3UY.js";
|
|
5
|
-
const g = /* @__PURE__ */ s({
|
|
6
|
-
__name: "x-text-field",
|
|
7
|
-
props: /* @__PURE__ */ m({
|
|
8
|
-
name: {},
|
|
9
|
-
label: {},
|
|
10
|
-
required: { type: Boolean },
|
|
11
|
-
autofocus: { type: Boolean },
|
|
12
|
-
modelValue: {},
|
|
13
|
-
help: {},
|
|
14
|
-
readonly: { type: Boolean }
|
|
15
|
-
}, {
|
|
16
|
-
modelValue: {},
|
|
17
|
-
modelModifiers: {}
|
|
18
|
-
}),
|
|
19
|
-
emits: ["update:modelValue"],
|
|
20
|
-
setup(l) {
|
|
21
|
-
const { t: n } = V({
|
|
22
|
-
messages: c
|
|
23
|
-
}), a = l, t = d(l, "modelValue"), u = i(() => {
|
|
24
|
-
const e = [];
|
|
25
|
-
return a.required && e.push((o) => o ? !0 : n("vuetify.text.input.mandatory")), e;
|
|
26
|
-
});
|
|
27
|
-
return (e, o) => (p(), f(y(h), {
|
|
28
|
-
modelValue: t.value,
|
|
29
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
|
|
30
|
-
label: e.label,
|
|
31
|
-
name: e.name,
|
|
32
|
-
autofocus: e.autofocus,
|
|
33
|
-
hint: e.help,
|
|
34
|
-
"persistent-hint": e.help !== void 0,
|
|
35
|
-
rules: u.value,
|
|
36
|
-
readonly: e.readonly
|
|
37
|
-
}, null, 8, ["modelValue", "label", "name", "autofocus", "hint", "persistent-hint", "rules", "readonly"]));
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
export {
|
|
41
|
-
g as default
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=x-text-field-2Sv6HUGW.js.map
|