@koumoul/vjsf 3.3.2 → 3.3.4
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/text-field-menu.vue +6 -4
- package/src/components/nodes/combobox.vue +6 -1
- package/src/components/nodes/date-time-picker.vue +4 -1
- package/src/components/nodes/number-combobox.vue +6 -1
- package/src/components/nodes/time-picker.vue +7 -4
- package/src/composables/use-select-node.js +6 -1
- package/types/components/fragments/child-subtitle.vue.d.ts +2 -2
- package/types/components/fragments/select-item.vue.d.ts +2 -2
- package/types/components/fragments/select-selection.vue.d.ts +2 -2
- package/types/components/fragments/text-field-menu.vue.d.ts.map +1 -1
- package/types/components/tree.vue.d.ts +2 -2
- package/types/components/vjsf.vue.d.ts +2 -2
- package/types/composables/use-get-items.d.ts +1 -1
- package/types/composables/use-node.d.ts +3 -3
- package/types/composables/use-select-node.d.ts +1 -1
- package/types/composables/use-select-node.d.ts.map +1 -1
- package/types/composables/use-vjsf.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koumoul/vjsf",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "vitest",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"vuetify": "^3.6.13"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@json-layout/core": "1.
|
|
73
|
+
"@json-layout/core": "~1.1.0",
|
|
74
74
|
"@vueuse/core": "^10.5.0",
|
|
75
75
|
"debug": "^4.3.4"
|
|
76
76
|
},
|
|
@@ -37,10 +37,12 @@ const fieldProps = computed(() => {
|
|
|
37
37
|
})
|
|
38
38
|
|
|
39
39
|
const menuProps = computed(() => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
return {
|
|
41
|
+
...compProps.value,
|
|
42
|
+
zIndex: 3000, // vuetify zIndex stacking is buggy (for example https://github.com/vuetifyjs/vuetify/issues/16251)
|
|
43
|
+
closeOnContentClick: false,
|
|
44
|
+
disabled: true
|
|
45
|
+
}
|
|
44
46
|
})
|
|
45
47
|
|
|
46
48
|
const textField = ref(null)
|
|
@@ -28,7 +28,12 @@ export default defineComponent({
|
|
|
28
28
|
const fieldProps = computed(() => {
|
|
29
29
|
const fieldProps = { ...inputProps.value }
|
|
30
30
|
fieldProps.returnObject = false
|
|
31
|
-
if (options.value.readOnly)
|
|
31
|
+
if (options.value.readOnly) {
|
|
32
|
+
fieldProps.menuProps = { modelValue: false }
|
|
33
|
+
} else {
|
|
34
|
+
// vuetify zIndex stacking is buggy (for example https://github.com/vuetifyjs/vuetify/issues/16251)
|
|
35
|
+
fieldProps.menuProps = { zIndex: 3000 }
|
|
36
|
+
}
|
|
32
37
|
if (getItems.hasItems.value) {
|
|
33
38
|
fieldProps.items = getItems.items.value
|
|
34
39
|
fieldProps.loading = getItems.loading.value
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import TextFieldMenu from '../fragments/text-field-menu.vue'
|
|
3
3
|
import { VDatePicker } from 'vuetify/components/VDatePicker'
|
|
4
4
|
import { VTimePicker } from 'vuetify/labs/VTimePicker'
|
|
5
|
+
import { VDefaultsProvider } from 'vuetify/components/VDefaultsProvider'
|
|
5
6
|
import { VTabs, VTab, VTabsWindow, VTabsWindowItem } from 'vuetify/components/VTabs'
|
|
6
7
|
import { VIcon } from 'vuetify/components/VIcon'
|
|
7
8
|
import { VSheet } from 'vuetify/components/VSheet'
|
|
@@ -95,7 +96,9 @@ const timePickerProps = computed(() => {
|
|
|
95
96
|
<v-date-picker v-bind="datePickerProps" />
|
|
96
97
|
</v-tabs-window-item>
|
|
97
98
|
<v-tabs-window-item value="time">
|
|
98
|
-
<v-
|
|
99
|
+
<v-defaults-provider :defaults="{global: { density: 'default' }}">
|
|
100
|
+
<v-time-picker v-bind="timePickerProps" />
|
|
101
|
+
</v-defaults-provider>
|
|
99
102
|
</v-tabs-window-item>
|
|
100
103
|
</v-tabs-window>
|
|
101
104
|
</v-sheet>
|
|
@@ -29,7 +29,12 @@ export default defineComponent({
|
|
|
29
29
|
const fieldProps = { ...inputProps.value }
|
|
30
30
|
fieldProps.type = 'number'
|
|
31
31
|
fieldProps.returnObject = false
|
|
32
|
-
if (options.value.readOnly)
|
|
32
|
+
if (options.value.readOnly) {
|
|
33
|
+
fieldProps.menuProps = { modelValue: false }
|
|
34
|
+
} else {
|
|
35
|
+
// vuetify zIndex stacking is buggy (for example https://github.com/vuetifyjs/vuetify/issues/16251)
|
|
36
|
+
fieldProps.menuProps = { zIndex: 3000 }
|
|
37
|
+
}
|
|
33
38
|
if (getItems.hasItems.value) {
|
|
34
39
|
fieldProps.items = getItems.items.value
|
|
35
40
|
fieldProps.loading = getItems.loading.value
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import TextFieldMenu from '../fragments/text-field-menu.vue'
|
|
3
3
|
import { VTimePicker } from 'vuetify/labs/VTimePicker'
|
|
4
4
|
import { VIcon } from 'vuetify/components/VIcon'
|
|
5
|
+
import { VDefaultsProvider } from 'vuetify/components/VDefaultsProvider'
|
|
5
6
|
import { useDate, useDefaults } from 'vuetify'
|
|
6
7
|
import { computed, toRef } from 'vue'
|
|
7
8
|
import { getShortTime, getLongTime } from '../../utils/dates.js'
|
|
@@ -43,9 +44,11 @@ const timePickerProps = computed(() => {
|
|
|
43
44
|
<template #prepend-inner>
|
|
44
45
|
<v-icon :icon="statefulLayout.options.icons.clock" />
|
|
45
46
|
</template>
|
|
46
|
-
<v-
|
|
47
|
-
v-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
<v-defaults-provider :defaults="{global: { density: 'default' }}">
|
|
48
|
+
<v-time-picker
|
|
49
|
+
v-bind="timePickerProps"
|
|
50
|
+
@update:model-value="value => {statefulLayout.input(props.modelValue, value && getLongTime(value))}"
|
|
51
|
+
/>
|
|
52
|
+
</v-defaults-provider>
|
|
50
53
|
</text-field-menu>
|
|
51
54
|
</template>
|
|
@@ -18,7 +18,12 @@ export default function (nodeRef, statefulLayout) {
|
|
|
18
18
|
const selectProps = computed(() => {
|
|
19
19
|
const props = { ...inputProps.value }
|
|
20
20
|
|
|
21
|
-
if (options.value.readOnly)
|
|
21
|
+
if (options.value.readOnly) {
|
|
22
|
+
props.menuProps = { modelValue: false }
|
|
23
|
+
} else {
|
|
24
|
+
// vuetify zIndex stacking is buggy (for example https://github.com/vuetifyjs/vuetify/issues/16251)
|
|
25
|
+
props.menuProps = { zIndex: 3000 }
|
|
26
|
+
}
|
|
22
27
|
props.clearable = props.clearable ?? !skeleton.value.required
|
|
23
28
|
props.valueComparator = (/** @type {any} */a, /** @type {any} */b) => {
|
|
24
29
|
const aKey = typeof a === 'object' ? statefulLayout.prepareSelectItem(nodeRef.value, a).key : a
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<any, {
|
|
2
|
-
modelValue: import("
|
|
2
|
+
modelValue: import("../../../node_modules/@json-layout/core/types/state/types.js").StateNode;
|
|
3
3
|
$props: {
|
|
4
|
-
modelValue?: import("
|
|
4
|
+
modelValue?: import("../../../node_modules/@json-layout/core/types/state/types.js").StateNode | undefined;
|
|
5
5
|
};
|
|
6
6
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
7
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<any, {
|
|
2
2
|
multiple: boolean;
|
|
3
|
-
item: import("
|
|
3
|
+
item: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
|
|
4
4
|
itemProps: Record<string, any>;
|
|
5
5
|
$props: {
|
|
6
6
|
readonly multiple?: boolean | undefined;
|
|
7
|
-
readonly item?: import("
|
|
7
|
+
readonly item?: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
|
|
8
8
|
readonly itemProps?: Record<string, any> | undefined;
|
|
9
9
|
};
|
|
10
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<any, {
|
|
2
2
|
multiple: boolean;
|
|
3
|
-
item: import("
|
|
3
|
+
item: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
|
|
4
4
|
last: boolean;
|
|
5
5
|
$props: {
|
|
6
6
|
readonly multiple?: boolean | undefined;
|
|
7
|
-
readonly item?: import("
|
|
7
|
+
readonly item?: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
|
|
8
8
|
readonly last?: boolean | undefined;
|
|
9
9
|
};
|
|
10
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field-menu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/fragments/text-field-menu.vue.js"],"names":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"text-field-menu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/fragments/text-field-menu.vue.js"],"names":[],"mappings":";;;;;;;;;;6BAgJsC,GAAG;;;QACX,GAAG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<any, {
|
|
2
|
-
modelValue: import("
|
|
2
|
+
modelValue: import("../../node_modules/@json-layout/core/types/state/types.js").StateTree;
|
|
3
3
|
statefulLayout: import("../types.js").VjsfStatefulLayout;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("
|
|
5
|
+
readonly modelValue?: import("../../node_modules/@json-layout/core/types/state/types.js").StateTree | undefined;
|
|
6
6
|
readonly statefulLayout?: import("../types.js").VjsfStatefulLayout | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -3,12 +3,12 @@ declare const _default: import("vue").DefineComponent<any, {
|
|
|
3
3
|
options: Partial<Omit<import("../types.js").VjsfOptions, "onData" | "onUpdate" | "onAutofocus" | "width" | "vjsfSlots">> | null;
|
|
4
4
|
modelValue: any;
|
|
5
5
|
schema: Record<string, any>;
|
|
6
|
-
precompiledLayout: import("
|
|
6
|
+
precompiledLayout: import("../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout;
|
|
7
7
|
$props: {
|
|
8
8
|
readonly options?: Partial<Omit<import("../types.js").VjsfOptions, "onData" | "onUpdate" | "onAutofocus" | "width" | "vjsfSlots">> | null | undefined;
|
|
9
9
|
readonly modelValue?: any;
|
|
10
10
|
readonly schema?: Record<string, any> | undefined;
|
|
11
|
-
readonly precompiledLayout?: import("
|
|
11
|
+
readonly precompiledLayout?: import("../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout | undefined;
|
|
12
12
|
};
|
|
13
13
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
14
|
export default _default;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export default function _default(nodeRef: import('vue').Ref<import('../types.js').VjsfNode>, statefulLayout: import('../types.js').VjsfStatefulLayout): {
|
|
6
6
|
hasItems: import("vue").ComputedRef<boolean>;
|
|
7
|
-
items: import("vue").Ref<import("
|
|
7
|
+
items: import("vue").Ref<import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems, import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems>;
|
|
8
8
|
loading: import("vue").Ref<boolean, boolean>;
|
|
9
9
|
search: import("vue").Ref<string, string>;
|
|
10
10
|
prepareSelectedItem: (selectedItem: any, itemValue: any) => any;
|
|
@@ -24,9 +24,9 @@ export default function _default(nodeRef: import('vue').Ref<import('../types.js'
|
|
|
24
24
|
}>;
|
|
25
25
|
compSlots: import("vue").ComputedRef<Record<string, any>>;
|
|
26
26
|
options: import("vue").ComputedRef<Required<import("../types.js").VjsfOptions>>;
|
|
27
|
-
skeleton: import("vue").ComputedRef<import("
|
|
28
|
-
layout: import("vue").ComputedRef<import("
|
|
27
|
+
skeleton: import("vue").ComputedRef<import("../../node_modules/@json-layout/core/types/compile/types.js").SkeletonNode>;
|
|
28
|
+
layout: import("vue").ComputedRef<import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").BaseCompObject>;
|
|
29
29
|
data: import("vue").ComputedRef<unknown>;
|
|
30
|
-
children: import("vue").ComputedRef<import("
|
|
30
|
+
children: import("vue").ComputedRef<import("../../node_modules/@json-layout/core/types/state/types.js").StateNode[] | undefined>;
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=use-node.d.ts.map
|
|
@@ -18,7 +18,7 @@ export default function _default(nodeRef: import('vue').Ref<import('../types.js'
|
|
|
18
18
|
}>;
|
|
19
19
|
getItems: {
|
|
20
20
|
hasItems: import("vue").ComputedRef<boolean>;
|
|
21
|
-
items: import("vue").Ref<import("
|
|
21
|
+
items: import("vue").Ref<import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems, import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems>;
|
|
22
22
|
loading: import("vue").Ref<boolean, boolean>;
|
|
23
23
|
search: import("vue").Ref<string, string>;
|
|
24
24
|
prepareSelectedItem: (selectedItem: any, itemValue: any) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-select-node.d.ts","sourceRoot":"","sources":["../../src/composables/use-select-node.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,0CAHW,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,aAAa,EAAE,cAAc,CAAC,kBACvD,OAAO,aAAa,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-select-node.d.ts","sourceRoot":"","sources":["../../src/composables/use-select-node.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,0CAHW,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,aAAa,EAAE,cAAc,CAAC,kBACvD,OAAO,aAAa,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;EA8DlD"}
|
|
@@ -8,9 +8,9 @@ export const emits: {
|
|
|
8
8
|
*/
|
|
9
9
|
'update:state': (state: import('../types.js').VjsfStatefulLayout) => boolean;
|
|
10
10
|
};
|
|
11
|
-
export function useVjsf(schema: import('vue').Ref<Object>, modelValue: import('vue').Ref<any>, options: import('vue').Ref<import("../types.js").PartialVjsfOptions | null>, nodeComponents: Record<string, import('vue').Component>, emit: any, compile?: typeof import("@json-layout/core").compile | undefined, precompiledLayout?: import("vue").Ref<import("
|
|
11
|
+
export function useVjsf(schema: import('vue').Ref<Object>, modelValue: import('vue').Ref<any>, options: import('vue').Ref<import("../types.js").PartialVjsfOptions | null>, nodeComponents: Record<string, import('vue').Component>, emit: any, compile?: typeof import("@json-layout/core").compile | undefined, precompiledLayout?: import("vue").Ref<import("../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout, import("../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout> | undefined): {
|
|
12
12
|
el: import("vue").Ref<null, null>;
|
|
13
13
|
statefulLayout: import("vue").ShallowRef<import("../types.js").VjsfStatefulLayout | null>;
|
|
14
|
-
stateTree: import("vue").ShallowRef<import("
|
|
14
|
+
stateTree: import("vue").ShallowRef<import("../../node_modules/@json-layout/core/types/state/types.js").StateTree | null>;
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=use-vjsf.d.ts.map
|