@koumoul/vjsf 3.0.0-beta.36 → 3.0.0-beta.37
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/nodes/autocomplete.vue +4 -26
- package/src/components/nodes/select.vue +4 -26
- package/src/composables/use-get-items.js +1 -1
- package/src/utils/props.js +31 -0
- package/src/utils/slots.js +28 -0
- package/types/components/fragments/select-item.vue.d.ts +2 -2
- package/types/components/fragments/text-field-menu.vue.d.ts +2 -2
- package/types/components/nodes/autocomplete.vue.d.ts.map +1 -1
- package/types/components/nodes/checkbox.vue.d.ts +2 -2
- package/types/components/nodes/color-picker.vue.d.ts +2 -2
- package/types/components/nodes/date-picker.vue.d.ts +2 -2
- package/types/components/nodes/expansion-panels.vue.d.ts +2 -2
- package/types/components/nodes/list.vue.d.ts +2 -2
- package/types/components/nodes/one-of-select.vue.d.ts +2 -2
- package/types/components/nodes/select.vue.d.ts.map +1 -1
- package/types/components/nodes/slider.vue.d.ts +2 -2
- package/types/components/nodes/switch.vue.d.ts +2 -2
- package/types/components/vjsf.vue.d.ts +2 -2
- package/types/utils/props.d.ts +7 -0
- package/types/utils/props.d.ts.map +1 -1
- package/types/utils/slots.d.ts +8 -0
- package/types/utils/slots.d.ts.map +1 -1
- package/types/components/nodes/checkbox-group copy.vue.d.ts +0 -27
- package/types/components/nodes/checkbox-group copy.vue.d.ts.map +0 -1
- package/types/components/nodes/radio.vue.d.ts +0 -10
- package/types/components/nodes/radio.vue.d.ts.map +0 -1
- package/types/utils/global-register.d.ts +0 -8
- package/types/utils/global-register.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koumoul/vjsf",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.37",
|
|
4
4
|
"description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "vitest",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"vuetify": "^3.6.13"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@json-layout/core": "0.
|
|
79
|
+
"@json-layout/core": "0.30.0",
|
|
80
80
|
"@vueuse/core": "^10.5.0",
|
|
81
81
|
"debug": "^4.3.4",
|
|
82
82
|
"ejs": "^3.1.9"
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
import { VAutocomplete } from 'vuetify/components/VAutocomplete'
|
|
3
3
|
import { useDefaults } from 'vuetify'
|
|
4
4
|
import { defineComponent, computed, h } from 'vue'
|
|
5
|
-
import {
|
|
5
|
+
import { getSelectProps, getSelectSlots } from '../../utils/index.js'
|
|
6
6
|
import useGetItems from '../../composables/use-get-items.js'
|
|
7
|
-
import SelectItem from '../fragments/select-item.vue'
|
|
8
|
-
import SelectSelection from '../fragments/select-selection.vue'
|
|
9
7
|
|
|
10
8
|
export default defineComponent({
|
|
11
9
|
props: {
|
|
@@ -22,42 +20,22 @@ export default defineComponent({
|
|
|
22
20
|
},
|
|
23
21
|
setup (props) {
|
|
24
22
|
useDefaults({}, 'VjsfAutocomplete')
|
|
23
|
+
|
|
25
24
|
const getItems = useGetItems(props)
|
|
26
25
|
|
|
27
26
|
const fieldProps = computed(() => {
|
|
28
|
-
const fieldProps =
|
|
29
|
-
if (props.modelValue.options.readOnly) fieldProps.menuProps = { modelValue: false }
|
|
27
|
+
const fieldProps = getSelectProps(props.modelValue, props.statefulLayout)
|
|
30
28
|
fieldProps.noFilter = true
|
|
31
29
|
fieldProps['onUpdate:search'] = (/** @type string */searchValue) => {
|
|
32
30
|
getItems.search.value = searchValue
|
|
33
31
|
}
|
|
34
32
|
fieldProps.items = getItems.items.value
|
|
35
33
|
fieldProps.loading = getItems.loading.value
|
|
36
|
-
fieldProps.clearable = fieldProps.clearable ?? !props.modelValue.skeleton.required
|
|
37
34
|
return fieldProps
|
|
38
35
|
})
|
|
39
36
|
|
|
40
|
-
const fieldSlots = computed(() => {
|
|
41
|
-
const slots = getCompSlots(props.modelValue, props.statefulLayout)
|
|
42
|
-
if (!slots.item) {
|
|
43
|
-
slots.item = (/** @type {any} */ context) => h(SelectItem, {
|
|
44
|
-
multiple: props.modelValue.layout.multiple,
|
|
45
|
-
itemProps: context.props,
|
|
46
|
-
item: context.item.raw
|
|
47
|
-
})
|
|
48
|
-
}
|
|
49
|
-
if (!slots.selection) {
|
|
50
|
-
slots.selection = (/** @type {any} */ context) => h(SelectSelection, {
|
|
51
|
-
multiple: props.modelValue.layout.multiple,
|
|
52
|
-
last: props.modelValue.layout.multiple && context.index === props.modelValue.data.length - 1,
|
|
53
|
-
item: getItems.prepareSelectedItem(context.item.raw, context.item.value)
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
return slots
|
|
57
|
-
})
|
|
58
|
-
|
|
59
37
|
// @ts-ignore
|
|
60
|
-
return () => h(VAutocomplete, fieldProps.value,
|
|
38
|
+
return () => h(VAutocomplete, fieldProps.value, getSelectSlots(props.modelValue, props.statefulLayout, getItems))
|
|
61
39
|
}
|
|
62
40
|
})
|
|
63
41
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { VSelect } from 'vuetify/components/VSelect'
|
|
3
3
|
import { defineComponent, h, computed } from 'vue'
|
|
4
|
-
import {
|
|
4
|
+
import { getSelectProps, getSelectSlots } from '../../utils/index.js'
|
|
5
5
|
import useGetItems from '../../composables/use-get-items.js'
|
|
6
|
-
|
|
7
|
-
import SelectSelection from '../fragments/select-selection.vue'
|
|
6
|
+
|
|
8
7
|
import { useDefaults } from 'vuetify'
|
|
9
8
|
|
|
10
9
|
export default defineComponent({
|
|
@@ -26,35 +25,14 @@ export default defineComponent({
|
|
|
26
25
|
const getItems = useGetItems(props)
|
|
27
26
|
|
|
28
27
|
const fieldProps = computed(() => {
|
|
29
|
-
const fieldProps =
|
|
30
|
-
if (props.modelValue.options.readOnly) fieldProps.menuProps = { modelValue: false }
|
|
28
|
+
const fieldProps = getSelectProps(props.modelValue, props.statefulLayout)
|
|
31
29
|
fieldProps.loading = getItems.loading.value
|
|
32
30
|
fieldProps.items = getItems.items.value
|
|
33
|
-
fieldProps.clearable = fieldProps.clearable ?? !props.modelValue.skeleton.required
|
|
34
31
|
return fieldProps
|
|
35
32
|
})
|
|
36
33
|
|
|
37
|
-
const fieldSlots = computed(() => {
|
|
38
|
-
const slots = getCompSlots(props.modelValue, props.statefulLayout)
|
|
39
|
-
if (!slots.item) {
|
|
40
|
-
slots.item = (/** @type {any} */ context) => h(SelectItem, {
|
|
41
|
-
multiple: props.modelValue.layout.multiple,
|
|
42
|
-
itemProps: context.props,
|
|
43
|
-
item: context.item.raw
|
|
44
|
-
})
|
|
45
|
-
}
|
|
46
|
-
if (!slots.selection) {
|
|
47
|
-
slots.selection = (/** @type {any} */ context) => h(SelectSelection, {
|
|
48
|
-
multiple: props.modelValue.layout.multiple,
|
|
49
|
-
last: props.modelValue.layout.multiple && context.index === props.modelValue.data.length - 1,
|
|
50
|
-
item: getItems.prepareSelectedItem(context.item.raw, context.item.value)
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
return slots
|
|
54
|
-
})
|
|
55
|
-
|
|
56
34
|
// @ts-ignore
|
|
57
|
-
return () => h(VSelect, fieldProps.value,
|
|
35
|
+
return () => h(VSelect, fieldProps.value, getSelectSlots(props.modelValue, props.statefulLayout, getItems))
|
|
58
36
|
}
|
|
59
37
|
})
|
|
60
38
|
|
package/src/utils/props.js
CHANGED
|
@@ -100,3 +100,34 @@ export function getCompProps (node, isMainComp = true) {
|
|
|
100
100
|
const fullProps = mergePropsLevels(propsLevels)
|
|
101
101
|
return fullProps
|
|
102
102
|
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* shared between select and autocomplete components
|
|
106
|
+
* @param {import('../types.js').VjsfNode} node
|
|
107
|
+
* @param {import('../types.js').VjsfStatefulLayout} statefulLayout
|
|
108
|
+
* @returns {Record<string, any>}
|
|
109
|
+
*/
|
|
110
|
+
export function getSelectProps (node, statefulLayout) {
|
|
111
|
+
const fullProps = getInputProps(node, statefulLayout, ['multiple'], false)
|
|
112
|
+
if (node.options.readOnly) fullProps.menuProps = { modelValue: false }
|
|
113
|
+
fullProps.clearable = fullProps.clearable ?? !node.skeleton.required
|
|
114
|
+
fullProps.valueComparator = (/** @type {any} */a, /** @type {any} */b) => {
|
|
115
|
+
const aKey = typeof a === 'object' ? statefulLayout.prepareSelectItem(node, a).key : a
|
|
116
|
+
const bKey = typeof b === 'object' ? statefulLayout.prepareSelectItem(node, b).key : b
|
|
117
|
+
return aKey === bKey
|
|
118
|
+
}
|
|
119
|
+
fullProps['onUpdate:modelValue'] = (/** @type string */value) => {
|
|
120
|
+
// fix some weird case where vuetify only keep the title property of an unknown item
|
|
121
|
+
if (Array.isArray(value) && Array.isArray(node.data)) {
|
|
122
|
+
for (let i = 0; i < node.data.length; i++) {
|
|
123
|
+
if (typeof node.data[i] === 'object' && typeof value[i] === 'string') {
|
|
124
|
+
value[i] = node.data[i]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return statefulLayout.input(node, (Array.isArray(value) && node.layout.separator) ? value.join(/** @type {string} */(node.layout.separator)) : value)
|
|
130
|
+
}
|
|
131
|
+
fullProps.onBlur = () => statefulLayout.blur(node)
|
|
132
|
+
return fullProps
|
|
133
|
+
}
|
package/src/utils/slots.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { h } from 'vue'
|
|
2
2
|
import NodeSlot from '../components/fragments/node-slot.vue'
|
|
3
|
+
import SelectItem from '../components/fragments/select-item.vue'
|
|
4
|
+
import SelectSelection from '../components/fragments/select-selection.vue'
|
|
3
5
|
|
|
4
6
|
// calculate the slots of components
|
|
5
7
|
/**
|
|
@@ -16,3 +18,29 @@ export function getCompSlots (node, statefulLayout) {
|
|
|
16
18
|
}
|
|
17
19
|
return slots
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* shared between select and autocomplete components
|
|
24
|
+
* @param {import('../types.js').VjsfSelectNode} node
|
|
25
|
+
* @param {import('../types.js').VjsfStatefulLayout} statefulLayout
|
|
26
|
+
* @param {any} getItems
|
|
27
|
+
* @returns {Record<string, any>}
|
|
28
|
+
*/
|
|
29
|
+
export function getSelectSlots (node, statefulLayout, getItems) {
|
|
30
|
+
const slots = getCompSlots(node, statefulLayout)
|
|
31
|
+
if (!slots.item) {
|
|
32
|
+
slots.item = (/** @type {any} */ context) => h(SelectItem, {
|
|
33
|
+
multiple: node.layout.multiple,
|
|
34
|
+
itemProps: context.props,
|
|
35
|
+
item: context.item.raw
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
if (!slots.selection) {
|
|
39
|
+
slots.selection = (/** @type {any} */ context) => h(SelectSelection, {
|
|
40
|
+
multiple: node.layout.multiple,
|
|
41
|
+
last: node.layout.multiple && context.index === node.data.length - 1,
|
|
42
|
+
item: getItems.prepareSelectedItem(context.item.raw, context.item.value)
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
return slots
|
|
46
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
multiple: boolean;
|
|
3
|
-
itemProps: Record<string, any>;
|
|
4
3
|
item: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
|
|
4
|
+
itemProps: Record<string, any>;
|
|
5
5
|
$props: {
|
|
6
6
|
readonly multiple?: boolean | undefined;
|
|
7
|
-
readonly itemProps?: Record<string, any> | undefined;
|
|
8
7
|
readonly item?: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
|
|
8
|
+
readonly itemProps?: Record<string, any> | undefined;
|
|
9
9
|
};
|
|
10
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
11
11
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfNode;
|
|
4
4
|
formattedValue: string | null;
|
|
5
5
|
$props: {
|
|
6
|
-
readonly modelValue?: import("../../types.js").VjsfNode | undefined;
|
|
7
6
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
7
|
+
readonly modelValue?: import("../../types.js").VjsfNode | undefined;
|
|
8
8
|
readonly formattedValue?: string | null | undefined;
|
|
9
9
|
};
|
|
10
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/autocomplete.vue.js"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"autocomplete.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/autocomplete.vue.js"],"names":[],"mappings":";;QAWI,4EAA4E;cAAlE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,cAAc,CAAC;;;;QAKvE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;;;QAL/E,4EAA4E;cAAlE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,cAAc,CAAC;;;;QAKvE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfCheckboxNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfCheckboxNode;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfCheckboxNode | undefined;
|
|
6
5
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
6
|
+
readonly modelValue?: import("../../types.js").VjsfCheckboxNode | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfColorPickerNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfColorPickerNode;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfColorPickerNode | undefined;
|
|
6
5
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
6
|
+
readonly modelValue?: import("../../types.js").VjsfColorPickerNode | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfDatePickerNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfDatePickerNode;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfDatePickerNode | undefined;
|
|
6
5
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
6
|
+
readonly modelValue?: import("../../types.js").VjsfDatePickerNode | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfExpansionPanelsNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfExpansionPanelsNode;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfExpansionPanelsNode | undefined;
|
|
6
5
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
6
|
+
readonly modelValue?: import("../../types.js").VjsfExpansionPanelsNode | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfListNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfListNode;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfListNode | undefined;
|
|
6
5
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
6
|
+
readonly modelValue?: import("../../types.js").VjsfListNode | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfOneOfSelectNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfOneOfSelectNode;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfOneOfSelectNode | undefined;
|
|
6
5
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
6
|
+
readonly modelValue?: import("../../types.js").VjsfOneOfSelectNode | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/select.vue.js"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"select.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/select.vue.js"],"names":[],"mappings":";;QAYI,4EAA4E;cAAlE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,cAAc,CAAC;;;;QAKzE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;;;QAL7E,4EAA4E;cAAlE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,cAAc,CAAC;;;;QAKzE,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfSliderNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfSliderNode;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfSliderNode | undefined;
|
|
6
5
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
6
|
+
readonly modelValue?: import("../../types.js").VjsfSliderNode | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfSwitchNode;
|
|
3
2
|
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
3
|
+
modelValue: import("../../types.js").VjsfSwitchNode;
|
|
4
4
|
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfSwitchNode | undefined;
|
|
6
5
|
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
6
|
+
readonly modelValue?: import("../../types.js").VjsfSwitchNode | undefined;
|
|
7
7
|
};
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
$emit: ((event: "update:modelValue", data: any) => void) & ((event: "update:state", state: import("../types.js").VjsfStatefulLayout) => void);
|
|
3
|
-
schema: Record<string, any>;
|
|
4
3
|
options: Partial<Omit<import("../types.js").VjsfOptions, "width" | "onData" | "onUpdate" | "onAutofocus" | "vjsfSlots">> | null;
|
|
5
4
|
modelValue: any;
|
|
5
|
+
schema: Record<string, any>;
|
|
6
6
|
precompiledLayout: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout;
|
|
7
7
|
$props: {
|
|
8
|
-
readonly schema?: Record<string, any> | undefined;
|
|
9
8
|
readonly options?: Partial<Omit<import("../types.js").VjsfOptions, "width" | "onData" | "onUpdate" | "onAutofocus" | "vjsfSlots">> | null | undefined;
|
|
10
9
|
readonly modelValue?: any;
|
|
10
|
+
readonly schema?: Record<string, any> | undefined;
|
|
11
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<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
package/types/utils/props.d.ts
CHANGED
|
@@ -19,4 +19,11 @@ export function getInputProps(node: import('../types.js').VjsfNode, statefulLayo
|
|
|
19
19
|
* @returns {Record<string, any>}
|
|
20
20
|
*/
|
|
21
21
|
export function getCompProps(node: import('@json-layout/core').StateNode, isMainComp?: boolean): Record<string, any>;
|
|
22
|
+
/**
|
|
23
|
+
* shared between select and autocomplete components
|
|
24
|
+
* @param {import('../types.js').VjsfNode} node
|
|
25
|
+
* @param {import('../types.js').VjsfStatefulLayout} statefulLayout
|
|
26
|
+
* @returns {Record<string, any>}
|
|
27
|
+
*/
|
|
28
|
+
export function getSelectProps(node: import('../types.js').VjsfNode, statefulLayout: import('../types.js').VjsfStatefulLayout): Record<string, any>;
|
|
22
29
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/utils/props.js"],"names":[],"mappings":"AAcA;;;GAGG;AACH,8CAHW,CAAC,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,GACjC,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAC,CAqBnD;AAID;;;;;;GAMG;AACH,oCANW,OAAO,aAAa,EAAE,QAAQ,kBAC9B,OAAO,aAAa,EAAE,kBAAkB,iGAGtC,OAAO,MAAM,EAAE,GAAG,CAAC,CAwC/B;AAGD;;;;GAIG;AACH,mCAJW,OAAO,mBAAmB,EAAE,SAAS,eACrC,OAAO,GACL,OAAO,MAAM,EAAE,GAAG,CAAC,CAS/B"}
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/utils/props.js"],"names":[],"mappings":"AAcA;;;GAGG;AACH,8CAHW,CAAC,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,GACjC,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAC,CAqBnD;AAID;;;;;;GAMG;AACH,oCANW,OAAO,aAAa,EAAE,QAAQ,kBAC9B,OAAO,aAAa,EAAE,kBAAkB,iGAGtC,OAAO,MAAM,EAAE,GAAG,CAAC,CAwC/B;AAGD;;;;GAIG;AACH,mCAJW,OAAO,mBAAmB,EAAE,SAAS,eACrC,OAAO,GACL,OAAO,MAAM,EAAE,GAAG,CAAC,CAS/B;AAED;;;;;GAKG;AACH,qCAJW,OAAO,aAAa,EAAE,QAAQ,kBAC9B,OAAO,aAAa,EAAE,kBAAkB,GACtC,OAAO,MAAM,EAAE,GAAG,CAAC,CAyB/B"}
|
package/types/utils/slots.d.ts
CHANGED
|
@@ -4,4 +4,12 @@
|
|
|
4
4
|
* @returns {Record<string, any>}
|
|
5
5
|
*/
|
|
6
6
|
export function getCompSlots(node: import('../types.js').VjsfNode, statefulLayout: import('../types.js').VjsfStatefulLayout): Record<string, any>;
|
|
7
|
+
/**
|
|
8
|
+
* shared between select and autocomplete components
|
|
9
|
+
* @param {import('../types.js').VjsfSelectNode} node
|
|
10
|
+
* @param {import('../types.js').VjsfStatefulLayout} statefulLayout
|
|
11
|
+
* @param {any} getItems
|
|
12
|
+
* @returns {Record<string, any>}
|
|
13
|
+
*/
|
|
14
|
+
export function getSelectSlots(node: import('../types.js').VjsfSelectNode, statefulLayout: import('../types.js').VjsfStatefulLayout, getItems: any): Record<string, any>;
|
|
7
15
|
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/utils/slots.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/utils/slots.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,mCAJW,OAAO,aAAa,EAAE,QAAQ,kBAC9B,OAAO,aAAa,EAAE,kBAAkB,GACtC,OAAO,MAAM,EAAE,GAAG,CAAC,CAU/B;AAED;;;;;;GAMG;AACH,qCALW,OAAO,aAAa,EAAE,cAAc,kBACpC,OAAO,aAAa,EAAE,kBAAkB,YACxC,GAAG,GACD,OAAO,MAAM,EAAE,GAAG,CAAC,CAmB/B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
modelValue: {
|
|
3
|
-
/** @type import('vue').PropType<import('../../types.js').VjsfCheckboxGroupNode> */
|
|
4
|
-
type: import('vue').PropType<import('../../types.js').VjsfCheckboxGroupNode>;
|
|
5
|
-
required: true;
|
|
6
|
-
};
|
|
7
|
-
statefulLayout: {
|
|
8
|
-
/** @type import('vue').PropType<import('../../types.js').VjsfStatefulLayout> */
|
|
9
|
-
type: import('vue').PropType<import('../../types.js').VjsfStatefulLayout>;
|
|
10
|
-
required: true;
|
|
11
|
-
};
|
|
12
|
-
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}>, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
modelValue: {
|
|
16
|
-
/** @type import('vue').PropType<import('../../types.js').VjsfCheckboxGroupNode> */
|
|
17
|
-
type: import('vue').PropType<import('../../types.js').VjsfCheckboxGroupNode>;
|
|
18
|
-
required: true;
|
|
19
|
-
};
|
|
20
|
-
statefulLayout: {
|
|
21
|
-
/** @type import('vue').PropType<import('../../types.js').VjsfStatefulLayout> */
|
|
22
|
-
type: import('vue').PropType<import('../../types.js').VjsfStatefulLayout>;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
}>>, {}, {}>;
|
|
26
|
-
export default _default;
|
|
27
|
-
//# sourceMappingURL=checkbox-group%20copy.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group copy.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/checkbox-group copy.vue.js"],"names":[],"mappings":";;QAQI,mFAAmF;cAAzE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,qBAAqB,CAAC;;;;QAKhF,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC;;;;;;;QAL7E,mFAAmF;cAAzE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,qBAAqB,CAAC;;;;QAKhF,gFAAgF;cAAtE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,gBAAgB,EAAE,kBAAkB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
modelValue: import("../../types.js").VjsfSwitchNode;
|
|
3
|
-
statefulLayout: import("../../types.js").VjsfStatefulLayout;
|
|
4
|
-
$props: {
|
|
5
|
-
readonly modelValue?: import("../../types.js").VjsfSwitchNode | undefined;
|
|
6
|
-
readonly statefulLayout?: import("../../types.js").VjsfStatefulLayout | undefined;
|
|
7
|
-
};
|
|
8
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
9
|
-
export default _default;
|
|
10
|
-
//# sourceMappingURL=radio.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"radio.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/radio.vue.js"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {string} name
|
|
3
|
-
* @param {import('vue').Component} component
|
|
4
|
-
*/
|
|
5
|
-
export function registerNodeComponent(name: string, component: import('vue').Component): void;
|
|
6
|
-
/** @type {import('vue').Ref<Record<string, import('vue').Component>>} */
|
|
7
|
-
export const registeredNodeComponents: import('vue').Ref<Record<string, import('vue').Component>>;
|
|
8
|
-
//# sourceMappingURL=global-register.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"global-register.d.ts","sourceRoot":"","sources":["../../src/utils/global-register.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,4CAHW,MAAM,aACN,OAAO,KAAK,EAAE,SAAS,QAKjC;AAVD,yEAAyE;AACzE,uCADW,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,MAAM,EAAE,OAAO,KAAK,EAAE,SAAS,CAAC,CAAC,CACtB"}
|