Skip to content

Commit ac69980

Browse files
authoredNov 16, 2024··
fix: Error in the build of the auto form with Vite and TypeScript #870 (#896)
* fix: Error in the build of the auto form with Vite and TypeScript #870 * fix: new york registry
1 parent 58fc125 commit ac69980

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed
 

‎apps/www/src/lib/registry/default/ui/auto-form/constant.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { InputComponents } from './interface'
12
import AutoFormFieldArray from './AutoFormFieldArray.vue'
23
import AutoFormFieldBoolean from './AutoFormFieldBoolean.vue'
34
import AutoFormFieldDate from './AutoFormFieldDate.vue'
@@ -7,7 +8,7 @@ import AutoFormFieldInput from './AutoFormFieldInput.vue'
78
import AutoFormFieldNumber from './AutoFormFieldNumber.vue'
89
import AutoFormFieldObject from './AutoFormFieldObject.vue'
910

10-
export const INPUT_COMPONENTS = {
11+
export const INPUT_COMPONENTS: InputComponents = {
1112
date: AutoFormFieldDate,
1213
select: AutoFormFieldEnum,
1314
radio: AutoFormFieldEnum,

‎apps/www/src/lib/registry/default/ui/auto-form/interface.ts

+14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ export interface Shape {
1818
schema?: ZodAny
1919
}
2020

21+
export interface InputComponents {
22+
date: Component;
23+
select: Component;
24+
radio: Component;
25+
checkbox: Component;
26+
switch: Component;
27+
textarea: Component;
28+
number: Component;
29+
string: Component;
30+
file: Component;
31+
array: Component;
32+
object: Component;
33+
};
34+
2135
export interface ConfigItem {
2236
/** Value for the `FormLabel` */
2337
label?: string

‎apps/www/src/lib/registry/new-york/ui/auto-form/constant.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { InputComponents } from './interface'
12
import AutoFormFieldArray from './AutoFormFieldArray.vue'
23
import AutoFormFieldBoolean from './AutoFormFieldBoolean.vue'
34
import AutoFormFieldDate from './AutoFormFieldDate.vue'
@@ -7,7 +8,7 @@ import AutoFormFieldInput from './AutoFormFieldInput.vue'
78
import AutoFormFieldNumber from './AutoFormFieldNumber.vue'
89
import AutoFormFieldObject from './AutoFormFieldObject.vue'
910

10-
export const INPUT_COMPONENTS = {
11+
export const INPUT_COMPONENTS: InputComponents = {
1112
date: AutoFormFieldDate,
1213
select: AutoFormFieldEnum,
1314
radio: AutoFormFieldEnum,

‎apps/www/src/lib/registry/new-york/ui/auto-form/interface.ts

+14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ export interface Shape {
1818
schema?: ZodAny
1919
}
2020

21+
export interface InputComponents {
22+
date: Component;
23+
select: Component;
24+
radio: Component;
25+
checkbox: Component;
26+
switch: Component;
27+
textarea: Component;
28+
number: Component;
29+
string: Component;
30+
file: Component;
31+
array: Component;
32+
object: Component;
33+
};
34+
2135
export interface ConfigItem {
2236
/** Value for the `FormLabel` */
2337
label?: string

0 commit comments

Comments
 (0)
Please sign in to comment.