@sfxcode/nuxt-ui-formkit 1.2.4 → 1.2.6
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/README.md +2 -1
- package/dist/module.json +1 -1
- package/dist/runtime/components/FUAutoForm.d.vue.ts +7 -8
- package/dist/runtime/components/FUAutoForm.vue +7 -4
- package/dist/runtime/components/FUAutoForm.vue.d.ts +7 -8
- package/dist/runtime/components/FUAutoFormOverlay.d.vue.ts +1 -1
- package/dist/runtime/components/FUAutoFormOverlay.vue.d.ts +1 -1
- package/dist/runtime/components/FUDataEdit.d.vue.ts +7 -7
- package/dist/runtime/components/FUDataEdit.vue +1 -1
- package/dist/runtime/components/FUDataEdit.vue.d.ts +7 -7
- package/dist/runtime/components/FUDataView.d.vue.ts +7 -7
- package/dist/runtime/components/FUDataView.vue +1 -1
- package/dist/runtime/components/FUDataView.vue.d.ts +7 -7
- package/dist/runtime/components/inputs/FUCalendar.vue +2 -2
- package/dist/runtime/components/inputs/FUCheckbox.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUCheckbox.vue +3 -2
- package/dist/runtime/components/inputs/FUCheckbox.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUCheckboxGroup.vue +3 -2
- package/dist/runtime/components/inputs/FUColorPicker.vue +2 -2
- package/dist/runtime/components/inputs/FUEditor.vue +2 -2
- package/dist/runtime/components/inputs/FUFileUpload.vue +3 -3
- package/dist/runtime/components/inputs/FUInput.vue +2 -2
- package/dist/runtime/components/inputs/FUInputDate.vue +2 -2
- package/dist/runtime/components/inputs/FUInputMenu.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUInputMenu.vue +3 -2
- package/dist/runtime/components/inputs/FUInputMenu.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUInputNumber.vue +2 -2
- package/dist/runtime/components/inputs/FUInputTags.vue +2 -2
- package/dist/runtime/components/inputs/FUInputTime.vue +2 -2
- package/dist/runtime/components/inputs/FUListbox.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUListbox.vue +10 -6
- package/dist/runtime/components/inputs/FUListbox.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUPinInput.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUPinInput.vue +3 -2
- package/dist/runtime/components/inputs/FUPinInput.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FURadioGroup.vue +3 -3
- package/dist/runtime/components/inputs/FUSelect.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUSelect.vue +3 -2
- package/dist/runtime/components/inputs/FUSelect.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUSelectMenu.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUSelectMenu.vue +3 -2
- package/dist/runtime/components/inputs/FUSelectMenu.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUSlider.vue +3 -3
- package/dist/runtime/components/inputs/FUSwitch.d.vue.ts +1 -0
- package/dist/runtime/components/inputs/FUSwitch.vue +3 -2
- package/dist/runtime/components/inputs/FUSwitch.vue.d.ts +1 -0
- package/dist/runtime/components/inputs/FUTextarea.vue +2 -2
- package/dist/runtime/components/inputs/FUTree.d.vue.ts +36 -0
- package/dist/runtime/components/inputs/FUTree.vue +52 -0
- package/dist/runtime/components/inputs/FUTree.vue.d.ts +36 -0
- package/dist/runtime/components/output/FUOutputBoolean.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputBoolean.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputDate.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputDate.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputLink.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputLink.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputList.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputList.vue +2 -1
- package/dist/runtime/components/output/FUOutputList.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputNumber.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputNumber.vue.d.ts +2 -0
- package/dist/runtime/components/output/FUOutputText.d.vue.ts +2 -0
- package/dist/runtime/components/output/FUOutputText.vue.d.ts +2 -0
- package/dist/runtime/composables/useFormKitAutoForm.d.ts +2 -0
- package/dist/runtime/composables/useFormKitAutoForm.js +86 -1
- package/dist/runtime/composables/useFormKitRepeater.js +5 -5
- package/dist/runtime/composables/useFormKitSchema.d.ts +7 -24
- package/dist/runtime/formkit/definitions/index.d.ts +1 -0
- package/dist/runtime/formkit/definitions/index.js +2 -1
- package/dist/runtime/formkit/definitions/index.mjs +2 -1
- package/dist/runtime/formkit/definitions/input.d.ts +1 -0
- package/dist/runtime/formkit/definitions/input.js +12 -7
- package/dist/runtime/formkit/definitions/input.mjs +12 -7
- package/dist/runtime/formkit/definitions/multiStep.js +8 -4
- package/dist/runtime/formkit/definitions/multiStep.mjs +8 -4
- package/dist/runtime/formkit/definitions/output.js +6 -6
- package/dist/runtime/formkit/definitions/output.mjs +6 -6
- package/dist/runtime/formkit/definitions/repeater.js +4 -0
- package/dist/runtime/formkit/definitions/repeater.mjs +4 -0
- package/dist/runtime/formkit/index.d.ts +10 -1
- package/dist/runtime/utils/useFormKitInput.d.ts +1 -0
- package/dist/runtime/utils/useFormKitInput.js +10 -2
- package/dist/runtime/utils/useFormKitOutput.d.ts +25 -0
- package/dist/runtime/utils/useFormKitOutput.js +21 -5
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ FormKit Nuxt UI bridges the gap between [FormKit](https://formkit.com/)'s powerf
|
|
|
18
18
|
|
|
19
19
|
## Features
|
|
20
20
|
|
|
21
|
-
✨ **
|
|
21
|
+
✨ **21 Input Components** - Complete set of FormKit-wrapped Nuxt UI input components
|
|
22
22
|
- `nuxtUICalendar` - Bare date-grid picker with range/multiple selection
|
|
23
23
|
- `nuxtUICheckbox` - Single checkbox with label and description
|
|
24
24
|
- `nuxtUICheckboxGroup` - Multiple checkbox selection
|
|
@@ -39,6 +39,7 @@ FormKit Nuxt UI bridges the gap between [FormKit](https://formkit.com/)'s powerf
|
|
|
39
39
|
- `nuxtUISlider` - Range slider for numeric values
|
|
40
40
|
- `nuxtUISwitch` - Toggle switch for boolean states
|
|
41
41
|
- `nuxtUITextarea` - Multi-line text input with autoresize
|
|
42
|
+
- `nuxtUITree` - Hierarchical selection input (categories, org charts, file trees)
|
|
42
43
|
|
|
43
44
|
🔁 **Repeater Component** - Dynamic repeatable form sections
|
|
44
45
|
- `nuxtUIRepeater` - Create dynamic lists with add, remove, clone, and reorder functionality
|
package/dist/module.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { FormKitSchemaDefinition } from '@formkit/core';
|
|
2
1
|
import type { PropType } from 'vue';
|
|
3
2
|
import type { AutoFormOverrides, ValibotLikeSchema, ZodLikeSchema } from '../composables/useFormKitAutoForm.js';
|
|
4
3
|
declare var __VLS_10: string, __VLS_11: any;
|
|
@@ -7,7 +6,7 @@ type __VLS_Slots = {} & {
|
|
|
7
6
|
};
|
|
8
7
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
8
|
data: {
|
|
10
|
-
type:
|
|
9
|
+
type: PropType<Record<string, unknown> | Record<string, unknown>[]>;
|
|
11
10
|
default: null;
|
|
12
11
|
};
|
|
13
12
|
overrides: {
|
|
@@ -23,13 +22,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
23
22
|
default: undefined;
|
|
24
23
|
};
|
|
25
24
|
modelValue: {
|
|
26
|
-
type: PropType<
|
|
25
|
+
type: PropType<Record<string, unknown>>;
|
|
27
26
|
};
|
|
28
27
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
-
"update:modelValue": (value:
|
|
28
|
+
"update:modelValue": (value: Record<string, unknown> | undefined) => any;
|
|
30
29
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
30
|
data: {
|
|
32
|
-
type:
|
|
31
|
+
type: PropType<Record<string, unknown> | Record<string, unknown>[]>;
|
|
33
32
|
default: null;
|
|
34
33
|
};
|
|
35
34
|
overrides: {
|
|
@@ -45,12 +44,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
45
44
|
default: undefined;
|
|
46
45
|
};
|
|
47
46
|
modelValue: {
|
|
48
|
-
type: PropType<
|
|
47
|
+
type: PropType<Record<string, unknown>>;
|
|
49
48
|
};
|
|
50
49
|
}>> & Readonly<{
|
|
51
|
-
"onUpdate:modelValue"?: ((value:
|
|
50
|
+
"onUpdate:modelValue"?: ((value: Record<string, unknown> | undefined) => any) | undefined;
|
|
52
51
|
}>, {
|
|
53
|
-
data: Record<string,
|
|
52
|
+
data: Record<string, unknown> | Record<string, unknown>[];
|
|
54
53
|
overrides: AutoFormOverrides;
|
|
55
54
|
valibotSchema: ValibotLikeSchema;
|
|
56
55
|
zodSchema: ZodLikeSchema;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, watch } from "vue";
|
|
3
|
-
import { inferFormSchema, inferFormSchemaFromValibot, inferFormSchemaFromZod } from "../composables/useFormKitAutoForm";
|
|
3
|
+
import { inferFormSchema, inferFormSchemaFromSamples, inferFormSchemaFromValibot, inferFormSchemaFromZod } from "../composables/useFormKitAutoForm";
|
|
4
4
|
import FUDataEdit from "./FUDataEdit.vue";
|
|
5
5
|
defineOptions({ inheritAttrs: false });
|
|
6
6
|
const props = defineProps({
|
|
7
7
|
data: {
|
|
8
|
-
type: Object,
|
|
8
|
+
type: [Object, Array],
|
|
9
9
|
default: null
|
|
10
10
|
},
|
|
11
11
|
overrides: {
|
|
@@ -21,8 +21,8 @@ const props = defineProps({
|
|
|
21
21
|
default: void 0
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
const formData = defineModel({ type:
|
|
25
|
-
if (!formData.value && props.data) {
|
|
24
|
+
const formData = defineModel({ type: Object });
|
|
25
|
+
if (!formData.value && props.data && !Array.isArray(props.data)) {
|
|
26
26
|
formData.value = props.data;
|
|
27
27
|
}
|
|
28
28
|
function buildSchema(data) {
|
|
@@ -32,6 +32,9 @@ function buildSchema(data) {
|
|
|
32
32
|
if (props.zodSchema) {
|
|
33
33
|
return inferFormSchemaFromZod(props.zodSchema, props.overrides);
|
|
34
34
|
}
|
|
35
|
+
if (Array.isArray(data)) {
|
|
36
|
+
return inferFormSchemaFromSamples(data, props.overrides);
|
|
37
|
+
}
|
|
35
38
|
return inferFormSchema(data ?? formData.value ?? {}, props.overrides);
|
|
36
39
|
}
|
|
37
40
|
const formSchema = ref(buildSchema(props.data));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { FormKitSchemaDefinition } from '@formkit/core';
|
|
2
1
|
import type { PropType } from 'vue';
|
|
3
2
|
import type { AutoFormOverrides, ValibotLikeSchema, ZodLikeSchema } from '../composables/useFormKitAutoForm.js';
|
|
4
3
|
declare var __VLS_10: string, __VLS_11: any;
|
|
@@ -7,7 +6,7 @@ type __VLS_Slots = {} & {
|
|
|
7
6
|
};
|
|
8
7
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
8
|
data: {
|
|
10
|
-
type:
|
|
9
|
+
type: PropType<Record<string, unknown> | Record<string, unknown>[]>;
|
|
11
10
|
default: null;
|
|
12
11
|
};
|
|
13
12
|
overrides: {
|
|
@@ -23,13 +22,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
23
22
|
default: undefined;
|
|
24
23
|
};
|
|
25
24
|
modelValue: {
|
|
26
|
-
type: PropType<
|
|
25
|
+
type: PropType<Record<string, unknown>>;
|
|
27
26
|
};
|
|
28
27
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
-
"update:modelValue": (value:
|
|
28
|
+
"update:modelValue": (value: Record<string, unknown> | undefined) => any;
|
|
30
29
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
30
|
data: {
|
|
32
|
-
type:
|
|
31
|
+
type: PropType<Record<string, unknown> | Record<string, unknown>[]>;
|
|
33
32
|
default: null;
|
|
34
33
|
};
|
|
35
34
|
overrides: {
|
|
@@ -45,12 +44,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
45
44
|
default: undefined;
|
|
46
45
|
};
|
|
47
46
|
modelValue: {
|
|
48
|
-
type: PropType<
|
|
47
|
+
type: PropType<Record<string, unknown>>;
|
|
49
48
|
};
|
|
50
49
|
}>> & Readonly<{
|
|
51
|
-
"onUpdate:modelValue"?: ((value:
|
|
50
|
+
"onUpdate:modelValue"?: ((value: Record<string, unknown> | undefined) => any) | undefined;
|
|
52
51
|
}>, {
|
|
53
|
-
data: Record<string,
|
|
52
|
+
data: Record<string, unknown> | Record<string, unknown>[];
|
|
54
53
|
overrides: AutoFormOverrides;
|
|
55
54
|
valibotSchema: ValibotLikeSchema;
|
|
56
55
|
zodSchema: ZodLikeSchema;
|
|
@@ -73,10 +73,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
73
73
|
}>, {
|
|
74
74
|
data: Record<string, any>;
|
|
75
75
|
title: string;
|
|
76
|
+
as: "modal" | "slideover";
|
|
76
77
|
overrides: AutoFormOverrides;
|
|
77
78
|
valibotSchema: ValibotLikeSchema;
|
|
78
79
|
zodSchema: ZodLikeSchema;
|
|
79
|
-
as: "modal" | "slideover";
|
|
80
80
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
81
81
|
declare const _default: typeof __VLS_export;
|
|
82
82
|
export default _default;
|
|
@@ -73,10 +73,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
73
73
|
}>, {
|
|
74
74
|
data: Record<string, any>;
|
|
75
75
|
title: string;
|
|
76
|
+
as: "modal" | "slideover";
|
|
76
77
|
overrides: AutoFormOverrides;
|
|
77
78
|
valibotSchema: ValibotLikeSchema;
|
|
78
79
|
zodSchema: ZodLikeSchema;
|
|
79
|
-
as: "modal" | "slideover";
|
|
80
80
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
81
81
|
declare const _default: typeof __VLS_export;
|
|
82
82
|
export default _default;
|
|
@@ -15,7 +15,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
17
|
data: {
|
|
18
|
-
type:
|
|
18
|
+
type: PropType<Record<string, unknown>>;
|
|
19
19
|
default: null;
|
|
20
20
|
};
|
|
21
21
|
schema: {
|
|
@@ -79,17 +79,17 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
79
79
|
default: boolean;
|
|
80
80
|
};
|
|
81
81
|
modelValue: {
|
|
82
|
-
type: PropType<
|
|
82
|
+
type: PropType<Record<string, unknown>>;
|
|
83
83
|
};
|
|
84
84
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
85
|
-
"update:modelValue": (value:
|
|
85
|
+
"update:modelValue": (value: Record<string, unknown> | undefined) => any;
|
|
86
86
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
87
87
|
id: {
|
|
88
88
|
type: StringConstructor;
|
|
89
89
|
default: string;
|
|
90
90
|
};
|
|
91
91
|
data: {
|
|
92
|
-
type:
|
|
92
|
+
type: PropType<Record<string, unknown>>;
|
|
93
93
|
default: null;
|
|
94
94
|
};
|
|
95
95
|
schema: {
|
|
@@ -153,13 +153,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
153
153
|
default: boolean;
|
|
154
154
|
};
|
|
155
155
|
modelValue: {
|
|
156
|
-
type: PropType<
|
|
156
|
+
type: PropType<Record<string, unknown>>;
|
|
157
157
|
};
|
|
158
158
|
}>> & Readonly<{
|
|
159
|
-
"onUpdate:modelValue"?: ((value:
|
|
159
|
+
"onUpdate:modelValue"?: ((value: Record<string, unknown> | undefined) => any) | undefined;
|
|
160
160
|
}>, {
|
|
161
161
|
schema: FormKitSchemaDefinition;
|
|
162
|
-
data: Record<string,
|
|
162
|
+
data: Record<string, unknown>;
|
|
163
163
|
id: string;
|
|
164
164
|
standardSchema: StandardSchemaV1<unknown, unknown>;
|
|
165
165
|
formClass: string;
|
|
@@ -82,7 +82,7 @@ useFormKitContextById(props.id, (context) => {
|
|
|
82
82
|
});
|
|
83
83
|
onScopeDispose(() => detachStandardSchema?.());
|
|
84
84
|
const formSchema = ref(props.schema);
|
|
85
|
-
const formData = defineModel({ type:
|
|
85
|
+
const formData = defineModel({ type: Object });
|
|
86
86
|
watch(() => props.schema, (newSchema) => {
|
|
87
87
|
formSchema.value = newSchema;
|
|
88
88
|
}, { deep: true });
|
|
@@ -15,7 +15,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
17
|
data: {
|
|
18
|
-
type:
|
|
18
|
+
type: PropType<Record<string, unknown>>;
|
|
19
19
|
default: null;
|
|
20
20
|
};
|
|
21
21
|
schema: {
|
|
@@ -79,17 +79,17 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
79
79
|
default: boolean;
|
|
80
80
|
};
|
|
81
81
|
modelValue: {
|
|
82
|
-
type: PropType<
|
|
82
|
+
type: PropType<Record<string, unknown>>;
|
|
83
83
|
};
|
|
84
84
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
85
|
-
"update:modelValue": (value:
|
|
85
|
+
"update:modelValue": (value: Record<string, unknown> | undefined) => any;
|
|
86
86
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
87
87
|
id: {
|
|
88
88
|
type: StringConstructor;
|
|
89
89
|
default: string;
|
|
90
90
|
};
|
|
91
91
|
data: {
|
|
92
|
-
type:
|
|
92
|
+
type: PropType<Record<string, unknown>>;
|
|
93
93
|
default: null;
|
|
94
94
|
};
|
|
95
95
|
schema: {
|
|
@@ -153,13 +153,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
153
153
|
default: boolean;
|
|
154
154
|
};
|
|
155
155
|
modelValue: {
|
|
156
|
-
type: PropType<
|
|
156
|
+
type: PropType<Record<string, unknown>>;
|
|
157
157
|
};
|
|
158
158
|
}>> & Readonly<{
|
|
159
|
-
"onUpdate:modelValue"?: ((value:
|
|
159
|
+
"onUpdate:modelValue"?: ((value: Record<string, unknown> | undefined) => any) | undefined;
|
|
160
160
|
}>, {
|
|
161
161
|
schema: FormKitSchemaDefinition;
|
|
162
|
-
data: Record<string,
|
|
162
|
+
data: Record<string, unknown>;
|
|
163
163
|
id: string;
|
|
164
164
|
standardSchema: StandardSchemaV1<unknown, unknown>;
|
|
165
165
|
formClass: string;
|
|
@@ -6,7 +6,7 @@ type __VLS_Slots = {} & {
|
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
8
|
data: {
|
|
9
|
-
type:
|
|
9
|
+
type: PropType<Record<string, unknown>>;
|
|
10
10
|
default: null;
|
|
11
11
|
};
|
|
12
12
|
schema: {
|
|
@@ -26,13 +26,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
26
26
|
default: boolean;
|
|
27
27
|
};
|
|
28
28
|
modelValue: {
|
|
29
|
-
type: PropType<
|
|
29
|
+
type: PropType<Record<string, unknown>>;
|
|
30
30
|
};
|
|
31
31
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
-
"update:modelValue": (value:
|
|
32
|
+
"update:modelValue": (value: Record<string, unknown> | undefined) => any;
|
|
33
33
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
34
|
data: {
|
|
35
|
-
type:
|
|
35
|
+
type: PropType<Record<string, unknown>>;
|
|
36
36
|
default: null;
|
|
37
37
|
};
|
|
38
38
|
schema: {
|
|
@@ -52,13 +52,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
54
|
modelValue: {
|
|
55
|
-
type: PropType<
|
|
55
|
+
type: PropType<Record<string, unknown>>;
|
|
56
56
|
};
|
|
57
57
|
}>> & Readonly<{
|
|
58
|
-
"onUpdate:modelValue"?: ((value:
|
|
58
|
+
"onUpdate:modelValue"?: ((value: Record<string, unknown> | undefined) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
60
|
schema: FormKitSchemaDefinition;
|
|
61
|
-
data: Record<string,
|
|
61
|
+
data: Record<string, unknown>;
|
|
62
62
|
formClass: string;
|
|
63
63
|
debugData: boolean;
|
|
64
64
|
debugSchema: boolean;
|
|
@@ -25,7 +25,7 @@ const props = defineProps({
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
const formSchema = ref(props.schema);
|
|
28
|
-
const formData = defineModel({ type:
|
|
28
|
+
const formData = defineModel({ type: Object });
|
|
29
29
|
watch(() => props.schema, (newSchema) => {
|
|
30
30
|
formSchema.value = newSchema;
|
|
31
31
|
}, { deep: true });
|
|
@@ -6,7 +6,7 @@ type __VLS_Slots = {} & {
|
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
8
|
data: {
|
|
9
|
-
type:
|
|
9
|
+
type: PropType<Record<string, unknown>>;
|
|
10
10
|
default: null;
|
|
11
11
|
};
|
|
12
12
|
schema: {
|
|
@@ -26,13 +26,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
26
26
|
default: boolean;
|
|
27
27
|
};
|
|
28
28
|
modelValue: {
|
|
29
|
-
type: PropType<
|
|
29
|
+
type: PropType<Record<string, unknown>>;
|
|
30
30
|
};
|
|
31
31
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
-
"update:modelValue": (value:
|
|
32
|
+
"update:modelValue": (value: Record<string, unknown> | undefined) => any;
|
|
33
33
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
34
|
data: {
|
|
35
|
-
type:
|
|
35
|
+
type: PropType<Record<string, unknown>>;
|
|
36
36
|
default: null;
|
|
37
37
|
};
|
|
38
38
|
schema: {
|
|
@@ -52,13 +52,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
54
|
modelValue: {
|
|
55
|
-
type: PropType<
|
|
55
|
+
type: PropType<Record<string, unknown>>;
|
|
56
56
|
};
|
|
57
57
|
}>> & Readonly<{
|
|
58
|
-
"onUpdate:modelValue"?: ((value:
|
|
58
|
+
"onUpdate:modelValue"?: ((value: Record<string, unknown> | undefined) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
60
|
schema: FormKitSchemaDefinition;
|
|
61
|
-
data: Record<string,
|
|
61
|
+
data: Record<string, unknown>;
|
|
62
62
|
formClass: string;
|
|
63
63
|
debugData: boolean;
|
|
64
64
|
debugSchema: boolean;
|
|
@@ -9,7 +9,7 @@ const props = defineProps({
|
|
|
9
9
|
required: true
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
const { handleInput, styleClass, color, validSlotNames } = useFormKitInput(props.context);
|
|
12
|
+
const { handleInput, styleClass, color, validSlotNames, ui } = useFormKitInput(props.context);
|
|
13
13
|
const handleContainerBlur = createContainerBlurHandler(props.context);
|
|
14
14
|
const conversionOptions = computed(() => ({ timeZone: props.context.timeZone }));
|
|
15
15
|
const modelValue = computed({
|
|
@@ -46,7 +46,7 @@ const maxValue = computed(() => toDateValue(props.context.maxValue, conversionOp
|
|
|
46
46
|
:max-value="maxValue"
|
|
47
47
|
:is-date-disabled="context.isDateDisabled"
|
|
48
48
|
:is-date-unavailable="context.isDateUnavailable"
|
|
49
|
-
:ui="
|
|
49
|
+
:ui="ui"
|
|
50
50
|
@update:model-value="handleInput"
|
|
51
51
|
@focusout="handleContainerBlur"
|
|
52
52
|
>
|
|
@@ -12,6 +12,7 @@ export interface FormKitCheckboxProps {
|
|
|
12
12
|
trueValue?: unknown;
|
|
13
13
|
falseValue?: unknown;
|
|
14
14
|
autofocus?: false | true | 'true' | 'false';
|
|
15
|
+
name?: string;
|
|
15
16
|
ui?: Record<string, unknown>;
|
|
16
17
|
}
|
|
17
18
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -6,13 +6,14 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, handleBlur, styleClass, modelValue, color, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, handleBlur, styleClass, modelValue, color, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
13
|
<UCheckbox
|
|
14
14
|
:id="context.id"
|
|
15
15
|
v-model="modelValue"
|
|
16
|
+
:name="context.node.name"
|
|
16
17
|
v-bind="{ ...context?.attrs }"
|
|
17
18
|
:class="styleClass"
|
|
18
19
|
:disabled="!!context?.disabled"
|
|
@@ -28,7 +29,7 @@ const { handleInput, handleChange, handleBlur, styleClass, modelValue, color, va
|
|
|
28
29
|
:true-value="context.trueValue"
|
|
29
30
|
:false-value="context.falseValue"
|
|
30
31
|
:autofocus="context.autofocus"
|
|
31
|
-
:ui="
|
|
32
|
+
:ui="ui"
|
|
32
33
|
@change="handleChange"
|
|
33
34
|
@update:model-value="handleInput"
|
|
34
35
|
@blur="handleBlur"
|
|
@@ -12,6 +12,7 @@ export interface FormKitCheckboxProps {
|
|
|
12
12
|
trueValue?: unknown;
|
|
13
13
|
falseValue?: unknown;
|
|
14
14
|
autofocus?: false | true | 'true' | 'false';
|
|
15
|
+
name?: string;
|
|
15
16
|
ui?: Record<string, unknown>;
|
|
16
17
|
}
|
|
17
18
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -7,7 +7,7 @@ const props = defineProps({
|
|
|
7
7
|
required: true
|
|
8
8
|
}
|
|
9
9
|
});
|
|
10
|
-
const { handleInput, handleChange, styleClass, color, modelValue, items, validSlotNames } = useFormKitInput(props.context);
|
|
10
|
+
const { handleInput, handleChange, styleClass, color, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
|
|
11
11
|
const handleContainerBlur = createContainerBlurHandler(props.context);
|
|
12
12
|
</script>
|
|
13
13
|
|
|
@@ -30,7 +30,8 @@ const handleContainerBlur = createContainerBlurHandler(props.context);
|
|
|
30
30
|
:label-key="context.labelKey"
|
|
31
31
|
:description-key="context.descriptionKey"
|
|
32
32
|
:loop="context.loop ?? false"
|
|
33
|
-
:name="context.name"
|
|
33
|
+
:name="context.node.name"
|
|
34
|
+
:ui="ui"
|
|
34
35
|
@change="handleChange"
|
|
35
36
|
@update:model-value="handleInput"
|
|
36
37
|
@focusout="handleContainerBlur"
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, styleClass, modelValue } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, styleClass, modelValue, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -20,7 +20,7 @@ const { handleInput, handleChange, styleClass, modelValue } = useFormKitInput(pr
|
|
|
20
20
|
:size="context.size ?? 'md'"
|
|
21
21
|
:format="context.format || 'hex'"
|
|
22
22
|
:throttle="context.throttle"
|
|
23
|
-
:ui="
|
|
23
|
+
:ui="ui"
|
|
24
24
|
@change="handleChange"
|
|
25
25
|
@update:model-value="handleInput"
|
|
26
26
|
/>
|
|
@@ -61,7 +61,7 @@ const props = defineProps({
|
|
|
61
61
|
required: true
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
const { handleInput, styleClass, modelValue } = useFormKitInput(props.context);
|
|
64
|
+
const { handleInput, styleClass, modelValue, ui } = useFormKitInput(props.context);
|
|
65
65
|
const handleContainerBlur = createContainerBlurHandler(props.context);
|
|
66
66
|
</script>
|
|
67
67
|
|
|
@@ -83,7 +83,7 @@ const handleContainerBlur = createContainerBlurHandler(props.context);
|
|
|
83
83
|
:handlers="context.editorHandlers"
|
|
84
84
|
:extensions="context.extensions"
|
|
85
85
|
:autofocus="context.autofocus"
|
|
86
|
-
:ui="
|
|
86
|
+
:ui="ui"
|
|
87
87
|
@update:model-value="handleInput"
|
|
88
88
|
>
|
|
89
89
|
<template #default="{ editor, handlers }">
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -37,8 +37,8 @@ const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, mod
|
|
|
37
37
|
:file-delete="context.fileDelete"
|
|
38
38
|
:file-delete-icon="context.fileDeleteIcon"
|
|
39
39
|
:preview="context.preview"
|
|
40
|
-
:name="context.name"
|
|
41
|
-
:ui="
|
|
40
|
+
:name="context.node.name"
|
|
41
|
+
:ui="ui"
|
|
42
42
|
@change="handleChange"
|
|
43
43
|
@update:model-value="handleInput"
|
|
44
44
|
@blur="handleBlur"
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -43,7 +43,7 @@ const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, mod
|
|
|
43
43
|
:min-length="context.minLength"
|
|
44
44
|
:pattern="context.pattern"
|
|
45
45
|
:step="context.step"
|
|
46
|
-
:ui="
|
|
46
|
+
:ui="ui"
|
|
47
47
|
@change="handleChange"
|
|
48
48
|
@update:model-value="handleInput"
|
|
49
49
|
@blur="handleBlur"
|
|
@@ -9,7 +9,7 @@ const props = defineProps({
|
|
|
9
9
|
required: true
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, validSlotNames } = useFormKitInput(props.context);
|
|
12
|
+
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, validSlotNames, ui } = useFormKitInput(props.context);
|
|
13
13
|
const handleContainerBlur = createContainerBlurHandler(props.context);
|
|
14
14
|
const conversionOptions = computed(() => ({
|
|
15
15
|
granularity: props.context.granularity,
|
|
@@ -65,7 +65,7 @@ const minValue = computed(() => toDateValue(props.context.minValue, conversionOp
|
|
|
65
65
|
:max-value="maxValue"
|
|
66
66
|
:min-value="minValue"
|
|
67
67
|
:is-date-unavailable="context.isDateUnavailable"
|
|
68
|
-
:ui="
|
|
68
|
+
:ui="ui"
|
|
69
69
|
@change="handleChange"
|
|
70
70
|
@update:model-value="handleInput"
|
|
71
71
|
@blur="handleBlur"
|
|
@@ -60,6 +60,7 @@ export interface FormKitInputMenuProps {
|
|
|
60
60
|
list?: string;
|
|
61
61
|
autocomplete?: string & {} | 'on' | 'off';
|
|
62
62
|
searchTerm?: string;
|
|
63
|
+
name?: string;
|
|
63
64
|
ui?: Record<string, unknown>;
|
|
64
65
|
}
|
|
65
66
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -6,13 +6,14 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, items, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
13
|
<UInputMenu
|
|
14
14
|
:id="context.id"
|
|
15
15
|
v-model="modelValue"
|
|
16
|
+
:name="context.node.name"
|
|
16
17
|
v-bind="{ ...context?.attrs }"
|
|
17
18
|
:class="styleClass"
|
|
18
19
|
:disabled="!!context?.disabled"
|
|
@@ -62,7 +63,7 @@ const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, mod
|
|
|
62
63
|
:list="context.list"
|
|
63
64
|
:autocomplete="context.autocomplete"
|
|
64
65
|
:search-term="context.searchTerm"
|
|
65
|
-
:ui="
|
|
66
|
+
:ui="ui"
|
|
66
67
|
@change="handleChange"
|
|
67
68
|
@update:model-value="handleInput"
|
|
68
69
|
@blur="handleBlur"
|
|
@@ -60,6 +60,7 @@ export interface FormKitInputMenuProps {
|
|
|
60
60
|
list?: string;
|
|
61
61
|
autocomplete?: string & {} | 'on' | 'off';
|
|
62
62
|
searchTerm?: string;
|
|
63
|
+
name?: string;
|
|
63
64
|
ui?: Record<string, unknown>;
|
|
64
65
|
}
|
|
65
66
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -44,7 +44,7 @@ const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, mod
|
|
|
44
44
|
:placeholder="context.placeholder"
|
|
45
45
|
:list="context.list"
|
|
46
46
|
:autocomplete="context.autocomplete"
|
|
47
|
-
:ui="
|
|
47
|
+
:ui="ui"
|
|
48
48
|
@change="handleChange"
|
|
49
49
|
@update:model-value="handleInput"
|
|
50
50
|
@blur="handleBlur"
|
|
@@ -6,7 +6,7 @@ const props = defineProps({
|
|
|
6
6
|
required: true
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
|
-
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames } = useFormKitInput(props.context);
|
|
9
|
+
const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
@@ -46,7 +46,7 @@ const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, mod
|
|
|
46
46
|
:loading-icon="context.loadingIcon"
|
|
47
47
|
:list="context.list"
|
|
48
48
|
:autocomplete="context.autocomplete || 'off'"
|
|
49
|
-
:ui="
|
|
49
|
+
:ui="ui"
|
|
50
50
|
@change="handleChange"
|
|
51
51
|
@update:model-value="handleInput"
|
|
52
52
|
@blur="handleBlur"
|