@teamnovu/kit-vue-forms 0.1.18 → 0.1.19
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.
|
@@ -11,7 +11,7 @@ declare const _default: <TData extends object, TPath extends EntityPaths<TData>>
|
|
|
11
11
|
attrs: any;
|
|
12
12
|
slots: {
|
|
13
13
|
default?(_: {
|
|
14
|
-
subform:
|
|
14
|
+
subform: Form< PickEntity<TData, TPath>>;
|
|
15
15
|
}): any;
|
|
16
16
|
};
|
|
17
17
|
emit: {};
|
|
@@ -27,5 +27,5 @@ export declare function useForm<T extends FormDataDefault>(options: UseFormOptio
|
|
|
27
27
|
defineValidator: <TData extends T>(options: ValidatorOptions<TData> | Ref< Validator<TData>, Validator<TData>>) => Ref< Validator<TData> | undefined, Validator<TData> | undefined>;
|
|
28
28
|
reset: () => void;
|
|
29
29
|
validateForm: () => Promise< ValidationResult>;
|
|
30
|
-
getSubForm: <P extends EntityPaths<T>>(path: P, options?: SubformOptions<PickEntity<T, P>> | undefined) =>
|
|
30
|
+
getSubForm: <P extends EntityPaths<T>>(path: P, options?: SubformOptions<PickEntity<T, P>> | undefined) => Form<PickEntity<T, P>>;
|
|
31
31
|
};
|
package/dist/types/form.d.ts
CHANGED
|
@@ -44,5 +44,5 @@ export interface Form<T extends FormDataDefault> {
|
|
|
44
44
|
reset: () => void;
|
|
45
45
|
validateForm: () => Promise<ValidationResult>;
|
|
46
46
|
submitHandler: (onSubmit: (data: T) => Awaitable<void>) => (event: SubmitEvent) => Promise<void>;
|
|
47
|
-
getSubForm: <P extends EntityPaths<T>>(path: P, options?: SubformOptions<PickEntity<T, P>>) =>
|
|
47
|
+
getSubForm: <P extends EntityPaths<T>>(path: P, options?: SubformOptions<PickEntity<T, P>>) => Form<PickEntity<T, P>>;
|
|
48
48
|
}
|
package/package.json
CHANGED
|
@@ -67,7 +67,7 @@ export function useForm<T extends FormDataDefault>(options: UseFormOptions<T>) {
|
|
|
67
67
|
function getSubForm<K extends EntityPaths<T>>(
|
|
68
68
|
path: K,
|
|
69
69
|
subformOptions?: SubformOptions<PickEntity<T, K>>,
|
|
70
|
-
):
|
|
70
|
+
): Form<PickEntity<T, K>> {
|
|
71
71
|
return createSubformInterface(formInterface, path, options, subformOptions);
|
|
72
72
|
}
|
|
73
73
|
|
package/src/types/form.ts
CHANGED