@koumoul/vjsf 3.13.1 → 3.14.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 +3 -3
- package/src/components/nodes/date-time-picker.vue +4 -2
- package/src/components/nodes/list.vue +1 -1
- package/src/components/nodes/time-picker.vue +5 -3
- 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/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-vjsf.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koumoul/vjsf",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "vitest run",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"vuetify": "^3.6.13"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@json-layout/core": "~1.
|
|
75
|
-
"@json-layout/vocabulary": "~2.
|
|
74
|
+
"@json-layout/core": "~1.10.0",
|
|
75
|
+
"@json-layout/vocabulary": "~2.3.0",
|
|
76
76
|
"@vueuse/core": "^12.5.0",
|
|
77
77
|
"debug": "^4.3.4"
|
|
78
78
|
},
|
|
@@ -10,8 +10,10 @@ import { useDate, useDefaults } from 'vuetify'
|
|
|
10
10
|
import { computed, ref, watch, toRef } from 'vue'
|
|
11
11
|
import { getDateTimeParts, getDateTimeWithOffset, getShortTime } from '../../utils/dates.js'
|
|
12
12
|
import useNode from '../../composables/use-node.js'
|
|
13
|
+
import useCompDefaults from '../../composables/use-comp-defaults.js'
|
|
13
14
|
|
|
14
15
|
useDefaults({}, 'VjsfDatePicker')
|
|
16
|
+
const timePickerDefaults = useCompDefaults('VTimePicker')
|
|
15
17
|
|
|
16
18
|
const props = defineProps({
|
|
17
19
|
modelValue: {
|
|
@@ -54,8 +56,8 @@ const datePickerProps = computed(() => {
|
|
|
54
56
|
})
|
|
55
57
|
|
|
56
58
|
const timePickerProps = computed(() => {
|
|
57
|
-
const timePickerProps = { ...compProps.value }
|
|
58
|
-
timePickerProps['ampm-in-title'] = true
|
|
59
|
+
const timePickerProps = { ...timePickerDefaults.value, ...compProps.value }
|
|
60
|
+
if (timePickerProps.format !== '24hr') timePickerProps['ampm-in-title'] = true
|
|
59
61
|
if (localData.value) timePickerProps.modelValue = getShortTime(localData.value.slice(11))
|
|
60
62
|
timePickerProps['onUpdate:modelValue'] = (/** @type {string} */value) => {
|
|
61
63
|
if (!localData.value) return
|
|
@@ -111,7 +111,7 @@ const pushEmptyIndexedItem = () => {
|
|
|
111
111
|
if (!newKey.value) return
|
|
112
112
|
if (!newKeyForm.value) return
|
|
113
113
|
if (!newKeyForm.value.isValid) return
|
|
114
|
-
const newData = { ...(props.modelValue.data ?? {}), [newKey.value]:
|
|
114
|
+
const newData = { ...(props.modelValue.data ?? {}), [newKey.value]: undefined }
|
|
115
115
|
props.statefulLayout.input(props.modelValue, newData)
|
|
116
116
|
if (layout.value.listEditMode === 'inline-single') {
|
|
117
117
|
props.statefulLayout.activateItem(props.modelValue, Object.keys(newData).length - 1)
|
|
@@ -7,8 +7,10 @@ import { useDate, useDefaults } from 'vuetify'
|
|
|
7
7
|
import { computed, toRef } from 'vue'
|
|
8
8
|
import { getShortTime, getLongTime } from '../../utils/dates.js'
|
|
9
9
|
import useNode from '../../composables/use-node.js'
|
|
10
|
+
import useCompDefaults from '../../composables/use-comp-defaults.js'
|
|
10
11
|
|
|
11
|
-
useDefaults({}, '
|
|
12
|
+
useDefaults({}, 'VjsfTimePicker')
|
|
13
|
+
const timePickerDefaults = useCompDefaults('VTimePicker')
|
|
12
14
|
|
|
13
15
|
const props = defineProps({
|
|
14
16
|
modelValue: {
|
|
@@ -28,8 +30,8 @@ const vDate = useDate()
|
|
|
28
30
|
const { compProps, localData } = useNode(toRef(props, 'modelValue'), props.statefulLayout)
|
|
29
31
|
|
|
30
32
|
const timePickerProps = computed(() => {
|
|
31
|
-
const timePickerProps = { ...compProps.value }
|
|
32
|
-
timePickerProps['ampm-in-title'] = true
|
|
33
|
+
const timePickerProps = { ...timePickerDefaults.value, ...compProps.value }
|
|
34
|
+
if (timePickerProps.format !== '24hr') timePickerProps['ampm-in-title'] = true
|
|
33
35
|
if (localData.value) timePickerProps.modelValue = getShortTime(localData.value)
|
|
34
36
|
return timePickerProps
|
|
35
37
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
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<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
7
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
multiple: boolean;
|
|
3
|
-
item: import("
|
|
3
|
+
item: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
|
|
4
4
|
avatarProps: Record<string, any>;
|
|
5
5
|
itemProps: Record<string, any>;
|
|
6
6
|
$props: {
|
|
7
7
|
readonly multiple?: boolean | undefined;
|
|
8
|
-
readonly item?: import("
|
|
8
|
+
readonly item?: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
|
|
9
9
|
readonly avatarProps?: Record<string, any> | undefined;
|
|
10
10
|
readonly itemProps?: Record<string, any> | undefined;
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
multiple: boolean;
|
|
3
|
-
item: import("
|
|
3
|
+
item: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
|
|
4
4
|
avatarProps: Record<string, any>;
|
|
5
5
|
last: boolean;
|
|
6
6
|
$props: {
|
|
7
7
|
readonly multiple?: boolean | undefined;
|
|
8
|
-
readonly item?: import("
|
|
8
|
+
readonly item?: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
|
|
9
9
|
readonly avatarProps?: Record<string, any> | undefined;
|
|
10
10
|
readonly last?: boolean | undefined;
|
|
11
11
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
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<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -3,12 +3,12 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3
3
|
options: import("../types.js").PartialVjsfOptions | 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?: import("../types.js").PartialVjsfOptions | 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<{}> & 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
|
|
@@ -19,7 +19,7 @@ export default function _default(nodeRef: import('vue').Ref<import('../types.js'
|
|
|
19
19
|
}>;
|
|
20
20
|
getItems: {
|
|
21
21
|
hasItems: import("vue").ComputedRef<boolean>;
|
|
22
|
-
items: import("vue").Ref<import("
|
|
22
|
+
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>;
|
|
23
23
|
loading: import("vue").Ref<boolean, boolean>;
|
|
24
24
|
search: import("vue").Ref<string, string>;
|
|
25
25
|
prepareSelectedItem: (selectedItem: any, itemValue: any) => any;
|
|
@@ -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, 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, import("../../node_modules/@json-layout/core/types/state/types.js").StateTree | null>;
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=use-vjsf.d.ts.map
|