Skip to content

Commit

Permalink
fix: Error in the build of the auto form with Vite and TypeScript #870 (
Browse files Browse the repository at this point in the history
#896)

* fix: Error in the build of the auto form with Vite and TypeScript #870

* fix: new york registry
  • Loading branch information
louis-va authored Nov 16, 2024
1 parent 58fc125 commit ac69980
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/www/src/lib/registry/default/ui/auto-form/constant.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { InputComponents } from './interface'
import AutoFormFieldArray from './AutoFormFieldArray.vue'
import AutoFormFieldBoolean from './AutoFormFieldBoolean.vue'
import AutoFormFieldDate from './AutoFormFieldDate.vue'
Expand All @@ -7,7 +8,7 @@ import AutoFormFieldInput from './AutoFormFieldInput.vue'
import AutoFormFieldNumber from './AutoFormFieldNumber.vue'
import AutoFormFieldObject from './AutoFormFieldObject.vue'

export const INPUT_COMPONENTS = {
export const INPUT_COMPONENTS: InputComponents = {
date: AutoFormFieldDate,
select: AutoFormFieldEnum,
radio: AutoFormFieldEnum,
Expand Down
14 changes: 14 additions & 0 deletions apps/www/src/lib/registry/default/ui/auto-form/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ export interface Shape {
schema?: ZodAny
}

export interface InputComponents {
date: Component;
select: Component;
radio: Component;
checkbox: Component;
switch: Component;
textarea: Component;
number: Component;
string: Component;
file: Component;
array: Component;
object: Component;
};

export interface ConfigItem {
/** Value for the `FormLabel` */
label?: string
Expand Down
3 changes: 2 additions & 1 deletion apps/www/src/lib/registry/new-york/ui/auto-form/constant.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { InputComponents } from './interface'
import AutoFormFieldArray from './AutoFormFieldArray.vue'
import AutoFormFieldBoolean from './AutoFormFieldBoolean.vue'
import AutoFormFieldDate from './AutoFormFieldDate.vue'
Expand All @@ -7,7 +8,7 @@ import AutoFormFieldInput from './AutoFormFieldInput.vue'
import AutoFormFieldNumber from './AutoFormFieldNumber.vue'
import AutoFormFieldObject from './AutoFormFieldObject.vue'

export const INPUT_COMPONENTS = {
export const INPUT_COMPONENTS: InputComponents = {
date: AutoFormFieldDate,
select: AutoFormFieldEnum,
radio: AutoFormFieldEnum,
Expand Down
14 changes: 14 additions & 0 deletions apps/www/src/lib/registry/new-york/ui/auto-form/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ export interface Shape {
schema?: ZodAny
}

export interface InputComponents {
date: Component;
select: Component;
radio: Component;
checkbox: Component;
switch: Component;
textarea: Component;
number: Component;
string: Component;
file: Component;
array: Component;
object: Component;
};

export interface ConfigItem {
/** Value for the `FormLabel` */
label?: string
Expand Down

0 comments on commit ac69980

Please sign in to comment.