@homecode/ui 4.27.13 → 4.27.14

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.
@@ -231,6 +231,7 @@ function Form(props) {
231
231
  setValue: setValueAPI,
232
232
  setValues: setValuesAPI,
233
233
  setDisabled: setDisabledAPI,
234
+ resetErrors: () => setErrors({}),
234
235
  reset,
235
236
  submit: onSubmitHandler,
236
237
  };
@@ -22,13 +22,18 @@ export type ValidationState = {
22
22
  export type FormAPI = ValidationState & {
23
23
  isDirty: boolean;
24
24
  isLoading: boolean;
25
+ isEmpty: boolean;
25
26
  values: FormValues;
26
27
  touched: FieldsFlags;
27
28
  changed: FieldsFlags;
29
+ disabled: FieldsFlags;
30
+ submit: (e: React.FormEvent<HTMLFormElement>) => Promise<void>;
28
31
  setValue: (field: string, val: any) => void;
29
32
  setValues: (values: FormValues) => void;
33
+ setDisabled: (field: string, disabled: boolean) => void;
30
34
  reset: () => void;
31
35
  Field: (props: FormFieldProps) => ReactNode;
36
+ resetErrors: () => void;
32
37
  };
33
38
  export type FormValidationRule = {
34
39
  type?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.27.13",
3
+ "version": "4.27.14",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",