@koumoul/vjsf 3.26.1 → 4.0.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/package.json +2 -2
- package/src/components/fragments/section-header.vue +1 -1
- package/src/components/nodes/card.vue +1 -1
- package/src/components/nodes/expansion-panels.vue +1 -1
- package/src/components/nodes/list.vue +7 -3
- package/src/components/nodes/one-of-select.vue +7 -7
- package/src/components/nodes/section.vue +1 -1
- package/src/components/nodes/stepper.vue +1 -1
- package/src/components/nodes/tabs.vue +1 -1
- package/src/components/nodes/vertical-tabs.vue +1 -1
- package/src/composables/use-select-node.js +4 -4
- package/types/components/nodes/card.vue.d.ts.map +1 -1
- package/types/components/nodes/expansion-panels.vue.d.ts.map +1 -1
- package/types/components/nodes/list.vue.d.ts.map +1 -1
- package/types/components/nodes/section.vue.d.ts.map +1 -1
- package/types/components/nodes/stepper.vue.d.ts.map +1 -1
- package/types/components/nodes/tabs.vue.d.ts.map +1 -1
- package/types/components/nodes/vertical-tabs.vue.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koumoul/vjsf",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test-tz1": "TZ=Europe/Paris vitest run",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"vue": "^3.4.3",
|
|
72
|
-
"vuetify": "^
|
|
72
|
+
"vuetify": "^4.0.0"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@json-layout/core": "~2.4.0",
|
|
@@ -20,7 +20,7 @@ const titleDepthBase = computed(() => {
|
|
|
20
20
|
return 8
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
-
const classes = ['text-
|
|
23
|
+
const classes = ['text-display-large', 'text-display-medium', 'text-display-small', 'text-headline-large', 'text-headline-medium', 'text-headline-small', 'text-body-large', 'text-body-large']
|
|
24
24
|
const titleClass = computed(() => {
|
|
25
25
|
const index = props.node.options.titleDepth
|
|
26
26
|
if (props.node.options.density === 'compact') return classes[index + 2]
|
|
@@ -37,7 +37,7 @@ const nodeProps = computed(() => {
|
|
|
37
37
|
:node="modelValue"
|
|
38
38
|
hide-title
|
|
39
39
|
/>
|
|
40
|
-
<v-row
|
|
40
|
+
<v-row>
|
|
41
41
|
<node
|
|
42
42
|
v-for="child of modelValue.children"
|
|
43
43
|
:key="child.fullKey"
|
|
@@ -49,7 +49,7 @@ const { compProps } = useNode(toRef(props, 'modelValue'), props.statefulLayout)
|
|
|
49
49
|
<v-expansion-panel-text>
|
|
50
50
|
<v-container fluid>
|
|
51
51
|
<child-subtitle :model-value="child" />
|
|
52
|
-
<v-row
|
|
52
|
+
<v-row>
|
|
53
53
|
<node
|
|
54
54
|
v-for="grandChild of isSection(child) ? child.children : [child]"
|
|
55
55
|
:key="grandChild.fullKey"
|
|
@@ -267,7 +267,7 @@ const toggleDialog = (/** @type {boolean} */value) => {
|
|
|
267
267
|
>
|
|
268
268
|
{{ itemSubtitles?.[childIndex] }}
|
|
269
269
|
</v-list-item-subtitle>
|
|
270
|
-
<v-row class="
|
|
270
|
+
<v-row class="pa-3">
|
|
271
271
|
<node
|
|
272
272
|
v-for="grandChild of isSection(child) ? child.children : [child]"
|
|
273
273
|
:key="grandChild.fullKey"
|
|
@@ -363,7 +363,7 @@ const toggleDialog = (/** @type {boolean} */value) => {
|
|
|
363
363
|
</v-list-item>
|
|
364
364
|
</template>
|
|
365
365
|
<v-sheet>
|
|
366
|
-
<v-row class="
|
|
366
|
+
<v-row class="pa-3">
|
|
367
367
|
<node
|
|
368
368
|
v-for="grandChild of isSection(children[children.length - 1]) ? children[children.length - 1].children : [children[children.length - 1]]"
|
|
369
369
|
:key="grandChild.fullKey"
|
|
@@ -547,7 +547,7 @@ const toggleDialog = (/** @type {boolean} */value) => {
|
|
|
547
547
|
@click="isActive.value = false"
|
|
548
548
|
/>
|
|
549
549
|
</v-toolbar>
|
|
550
|
-
<v-row class="
|
|
550
|
+
<v-row class="pa-3">
|
|
551
551
|
<node
|
|
552
552
|
v-for="grandChild of isSection(children[children.length - 1]) ? children[children.length - 1].children : [children[children.length - 1]]"
|
|
553
553
|
:key="grandChild.fullKey"
|
|
@@ -570,4 +570,8 @@ const toggleDialog = (/** @type {boolean} */value) => {
|
|
|
570
570
|
.vjsf-list-item .v-list-item__content {
|
|
571
571
|
padding-right: 4px;
|
|
572
572
|
}
|
|
573
|
+
.vjsf-list-item-actions-wrapper .v-list-item-action--end {
|
|
574
|
+
margin-inline-start: 0;
|
|
575
|
+
margin-inline-end: 0;
|
|
576
|
+
}
|
|
573
577
|
</style>
|
|
@@ -88,25 +88,25 @@ const fieldProps = computed(() => {
|
|
|
88
88
|
:model-value="activeChildTree"
|
|
89
89
|
>
|
|
90
90
|
<template #item="context">
|
|
91
|
-
<v-list-subheader v-if="context.
|
|
91
|
+
<v-list-subheader v-if="context.internalItem.raw.header">
|
|
92
92
|
<v-select-item-icon
|
|
93
|
-
v-if="typeof context.
|
|
94
|
-
:icon="context.
|
|
93
|
+
v-if="typeof context.internalItem.raw.icon === 'string'"
|
|
94
|
+
:icon="context.internalItem.raw.icon"
|
|
95
95
|
:avatar-props="avatarProps"
|
|
96
96
|
/>
|
|
97
|
-
{{ context.
|
|
97
|
+
{{ context.internalItem.raw.title }}
|
|
98
98
|
</v-list-subheader>
|
|
99
99
|
<v-list-item
|
|
100
100
|
v-else
|
|
101
101
|
v-bind="context.props"
|
|
102
102
|
>
|
|
103
103
|
<template
|
|
104
|
-
v-if="context.
|
|
104
|
+
v-if="context.internalItem.raw.icon"
|
|
105
105
|
#prepend
|
|
106
106
|
>
|
|
107
107
|
<v-select-item-icon
|
|
108
|
-
v-if="typeof context.
|
|
109
|
-
:icon="context.
|
|
108
|
+
v-if="typeof context.internalItem.raw.icon === 'string'"
|
|
109
|
+
:icon="context.internalItem.raw.icon"
|
|
110
110
|
:avatar-props="avatarProps"
|
|
111
111
|
/>
|
|
112
112
|
</template>
|
|
@@ -23,7 +23,7 @@ defineProps({
|
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
25
|
<section-header :node="modelValue" />
|
|
26
|
-
<v-row
|
|
26
|
+
<v-row>
|
|
27
27
|
<node
|
|
28
28
|
v-for="child of modelValue.children"
|
|
29
29
|
:key="child.fullKey"
|
|
@@ -74,7 +74,7 @@ const goNext = () => {
|
|
|
74
74
|
class="pa-0"
|
|
75
75
|
>
|
|
76
76
|
<child-subtitle :model-value="child" />
|
|
77
|
-
<v-row
|
|
77
|
+
<v-row>
|
|
78
78
|
<node
|
|
79
79
|
v-for="grandChild of isSection(child) ? child.children : [child]"
|
|
80
80
|
:key="grandChild.fullKey"
|
|
@@ -67,7 +67,7 @@ const tab = ref(0)
|
|
|
67
67
|
>
|
|
68
68
|
<v-container fluid>
|
|
69
69
|
<child-subtitle :model-value="child" />
|
|
70
|
-
<v-row
|
|
70
|
+
<v-row>
|
|
71
71
|
<node
|
|
72
72
|
v-for="grandChild of isSection(child) ? child.children : [child]"
|
|
73
73
|
:key="grandChild.fullKey"
|
|
@@ -71,7 +71,7 @@ const tab = ref(0)
|
|
|
71
71
|
>
|
|
72
72
|
<v-container fluid>
|
|
73
73
|
<child-subtitle :model-value="child" />
|
|
74
|
-
<v-row
|
|
74
|
+
<v-row>
|
|
75
75
|
<node
|
|
76
76
|
v-for="grandChild of isSection(child) ? child.children : [child]"
|
|
77
77
|
:key="grandChild.fullKey"
|
|
@@ -57,16 +57,16 @@ export default function (nodeRef, statefulLayout, avatarProps, cssPrefix) {
|
|
|
57
57
|
const slots = { ...compSlots.value }
|
|
58
58
|
if (!slots.item) {
|
|
59
59
|
slots.item = (/** @type {any} */ context) => {
|
|
60
|
-
if (context.
|
|
60
|
+
if (context.internalItem.raw.header) {
|
|
61
61
|
return h(SelectItemHeader, {
|
|
62
|
-
item: context.
|
|
62
|
+
item: context.internalItem.raw,
|
|
63
63
|
avatarProps
|
|
64
64
|
})
|
|
65
65
|
} else {
|
|
66
66
|
return h(SelectItem, {
|
|
67
67
|
multiple: layout.value.multiple,
|
|
68
68
|
itemProps: context.props,
|
|
69
|
-
item: context.
|
|
69
|
+
item: context.internalItem.raw,
|
|
70
70
|
avatarProps
|
|
71
71
|
})
|
|
72
72
|
}
|
|
@@ -76,7 +76,7 @@ export default function (nodeRef, statefulLayout, avatarProps, cssPrefix) {
|
|
|
76
76
|
slots.selection = (/** @type {any} */ context) => h(SelectSelection, {
|
|
77
77
|
multiple: layout.value.multiple,
|
|
78
78
|
last: layout.value.multiple && context.index === nodeRef.value.data.length - 1,
|
|
79
|
-
item: getItems.prepareSelectedItem(context.
|
|
79
|
+
item: getItems.prepareSelectedItem(context.internalItem.raw, context.internalItem.value),
|
|
80
80
|
avatarProps,
|
|
81
81
|
cssPrefix
|
|
82
82
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/card.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/card.vue"],"names":[],"mappings":"wBA4LqB,OAAO,YAAY;;AAdxC;;QAGI,0EAA0E;cAAhE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,YAAY,CAAC;;;;QAKvE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;QAL7E,0EAA0E;cAAhE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,YAAY,CAAC;;;;QAKvE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;6IAK9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expansion-panels.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/expansion-panels.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expansion-panels.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/expansion-panels.vue"],"names":[],"mappings":"wBAoRqB,OAAO,YAAY;;AAdxC;;QAGI,qFAAqF;cAA3E,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,uBAAuB,CAAC;;;;QAKlF,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;QAL7E,qFAAqF;cAA3E,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,uBAAuB,CAAC;;;;QAKlF,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;6IAK9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/list.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/list.vue"],"names":[],"mappings":"wBAomEqB,OAAO,YAAY;;AAdxC;;QAGI,0EAA0E;cAAhE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,YAAY,CAAC;;;;QAKvE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;QAL7E,0EAA0E;cAAhE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,YAAY,CAAC;;;;QAKvE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;6IAK9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/section.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"section.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/section.vue"],"names":[],"mappings":"wBA8HqB,OAAO,YAAY;;AAdxC;;QAGI,6EAA6E;cAAnE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,eAAe,CAAC;;;;QAK1E,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;QAL7E,6EAA6E;cAAnE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,eAAe,CAAC;;;;QAK1E,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;6IAK9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/stepper.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/stepper.vue"],"names":[],"mappings":"wBAqbqB,OAAO,YAAY;;AAdxC;;QAGI,6EAA6E;cAAnE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,eAAe,CAAC;;;;QAK1E,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;QAL7E,6EAA6E;cAAnE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,eAAe,CAAC;;;;QAK1E,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;6IAK9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/tabs.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/tabs.vue"],"names":[],"mappings":"wBAsUqB,OAAO,YAAY;;AAdxC;;QAGI,0EAA0E;cAAhE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,YAAY,CAAC;;;;QAKvE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;QAL7E,0EAA0E;cAAhE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,YAAY,CAAC;;;;QAKvE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;6IAK9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertical-tabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/vertical-tabs.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vertical-tabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/vertical-tabs.vue"],"names":[],"mappings":"wBAmVqB,OAAO,YAAY;;AAdxC;;QAGI,kFAAkF;cAAxE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,oBAAoB,CAAC;;;;QAK/E,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;QAL7E,kFAAkF;cAAxE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,oBAAoB,CAAC;;;;QAK/E,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;6IAK9E"}
|