@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: Omit<Form< PickEntity<TData, TPath>>, "submitHandler">;
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) => Omit<Form<PickEntity<T, P>>, "submitHandler">;
30
+ getSubForm: <P extends EntityPaths<T>>(path: P, options?: SubformOptions<PickEntity<T, P>> | undefined) => Form<PickEntity<T, P>>;
31
31
  };
@@ -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>>) => Omit<Form<PickEntity<T, P>>, 'submitHandler'>;
47
+ getSubForm: <P extends EntityPaths<T>>(path: P, options?: SubformOptions<PickEntity<T, P>>) => Form<PickEntity<T, P>>;
48
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnovu/kit-vue-forms",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -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
- ): Omit<Form<PickEntity<T, K>>, "submitHandler"> {
70
+ ): Form<PickEntity<T, K>> {
71
71
  return createSubformInterface(formInterface, path, options, subformOptions);
72
72
  }
73
73
 
package/src/types/form.ts CHANGED
@@ -80,5 +80,5 @@ export interface Form<T extends FormDataDefault> {
80
80
  getSubForm: <P extends EntityPaths<T>>(
81
81
  path: P,
82
82
  options?: SubformOptions<PickEntity<T, P>>,
83
- ) => Omit<Form<PickEntity<T, P>>, 'submitHandler'>
83
+ ) => Form<PickEntity<T, P>>
84
84
  }