@mantine/form 5.0.0-alpha.0 → 5.0.0-alpha.11
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.
- package/cjs/filter-errors/filter-errors.js +1 -1
- package/cjs/filter-errors/filter-errors.js.map +1 -1
- package/cjs/get-input-on-change/get-input-on-change.js +6 -4
- package/cjs/get-input-on-change/get-input-on-change.js.map +1 -1
- package/cjs/index.js +0 -3
- package/cjs/index.js.map +1 -1
- package/cjs/paths/get-path.js +23 -0
- package/cjs/paths/get-path.js.map +1 -0
- package/cjs/paths/get-splitted-path.js +13 -0
- package/cjs/paths/get-splitted-path.js.map +1 -0
- package/cjs/paths/insert-path.js +19 -0
- package/cjs/paths/insert-path.js.map +1 -0
- package/cjs/paths/remove-path.js +17 -0
- package/cjs/paths/remove-path.js.map +1 -0
- package/cjs/paths/reorder-path.js +21 -0
- package/cjs/paths/reorder-path.js.map +1 -0
- package/cjs/paths/set-path.js +34 -0
- package/cjs/paths/set-path.js.map +1 -0
- package/cjs/resolvers/yup-resolver/yup-resolver.js +1 -1
- package/cjs/resolvers/yup-resolver/yup-resolver.js.map +1 -1
- package/cjs/use-form.js +84 -97
- package/cjs/use-form.js.map +1 -1
- package/cjs/validate/should-validate-on-change.js +19 -0
- package/cjs/validate/should-validate-on-change.js.map +1 -0
- package/cjs/validate/validate-field-value.js +17 -0
- package/cjs/validate/validate-field-value.js.map +1 -0
- package/cjs/validate/validate-values.js +40 -0
- package/cjs/validate/validate-values.js.map +1 -0
- package/esm/filter-errors/filter-errors.js +1 -1
- package/esm/filter-errors/filter-errors.js.map +1 -1
- package/esm/get-input-on-change/get-input-on-change.js +6 -4
- package/esm/get-input-on-change/get-input-on-change.js.map +1 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +1 -1
- package/esm/paths/get-path.js +19 -0
- package/esm/paths/get-path.js.map +1 -0
- package/esm/paths/get-splitted-path.js +9 -0
- package/esm/paths/get-splitted-path.js.map +1 -0
- package/esm/paths/insert-path.js +15 -0
- package/esm/paths/insert-path.js.map +1 -0
- package/esm/paths/remove-path.js +13 -0
- package/esm/paths/remove-path.js.map +1 -0
- package/esm/paths/reorder-path.js +17 -0
- package/esm/paths/reorder-path.js.map +1 -0
- package/esm/paths/set-path.js +26 -0
- package/esm/paths/set-path.js.map +1 -0
- package/esm/resolvers/yup-resolver/yup-resolver.js +1 -1
- package/esm/resolvers/yup-resolver/yup-resolver.js.map +1 -1
- package/esm/use-form.js +85 -98
- package/esm/use-form.js.map +1 -1
- package/esm/validate/should-validate-on-change.js +15 -0
- package/esm/validate/should-validate-on-change.js.map +1 -0
- package/esm/validate/validate-field-value.js +13 -0
- package/esm/validate/validate-field-value.js.map +1 -0
- package/esm/validate/validate-values.js +36 -0
- package/esm/validate/validate-values.js.map +1 -0
- package/lib/filter-errors/index.d.ts +2 -0
- package/lib/filter-errors/index.d.ts.map +1 -0
- package/lib/get-input-on-change/get-input-on-change.d.ts +1 -1
- package/lib/get-input-on-change/get-input-on-change.d.ts.map +1 -1
- package/lib/get-input-on-change/index.d.ts +2 -0
- package/lib/get-input-on-change/index.d.ts.map +1 -0
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/paths/get-path.d.ts +2 -0
- package/lib/paths/get-path.d.ts.map +1 -0
- package/lib/paths/get-splitted-path.d.ts +2 -0
- package/lib/paths/get-splitted-path.d.ts.map +1 -0
- package/lib/paths/index.d.ts +6 -0
- package/lib/paths/index.d.ts.map +1 -0
- package/lib/paths/insert-path.d.ts +2 -0
- package/lib/paths/insert-path.d.ts.map +1 -0
- package/lib/paths/remove-path.d.ts +2 -0
- package/lib/paths/remove-path.d.ts.map +1 -0
- package/lib/paths/reorder-path.d.ts +3 -0
- package/lib/paths/reorder-path.d.ts.map +1 -0
- package/lib/paths/set-path.d.ts +2 -0
- package/lib/paths/set-path.d.ts.map +1 -0
- package/lib/resolvers/test-resolver.d.ts +1 -0
- package/lib/resolvers/test-resolver.d.ts.map +1 -1
- package/lib/stories/_base.d.ts +6 -0
- package/lib/stories/_base.d.ts.map +1 -0
- package/lib/types.d.ts +62 -22
- package/lib/types.d.ts.map +1 -1
- package/lib/use-form.d.ts +2 -41
- package/lib/use-form.d.ts.map +1 -1
- package/lib/validate/index.d.ts +4 -0
- package/lib/validate/index.d.ts.map +1 -0
- package/lib/validate/should-validate-on-change.d.ts +2 -0
- package/lib/validate/should-validate-on-change.d.ts.map +1 -0
- package/lib/validate/validate-field-value.d.ts +3 -0
- package/lib/validate/validate-field-value.d.ts.map +1 -0
- package/lib/validate/validate-values.d.ts +6 -0
- package/lib/validate/validate-values.d.ts.map +1 -0
- package/package.json +4 -2
- package/esm/form-list/form-list.js +0 -16
- package/esm/form-list/form-list.js.map +0 -1
- package/esm/get-error-path/get-error-path.js +0 -6
- package/esm/get-error-path/get-error-path.js.map +0 -1
- package/esm/validate-values/validate-list-values.js +0 -20
- package/esm/validate-values/validate-list-values.js.map +0 -1
- package/esm/validate-values/validate-values.js +0 -53
- package/esm/validate-values/validate-values.js.map +0 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export { formList, isFormList } from './form-list/form-list';
|
|
2
1
|
export { useForm } from './use-form';
|
|
3
2
|
export { zodResolver } from './resolvers/zod-resolver/zod-resolver';
|
|
4
3
|
export { yupResolver } from './resolvers/yup-resolver/yup-resolver';
|
|
5
4
|
export { joiResolver } from './resolvers/joi-resolver/joi-resolver';
|
|
6
|
-
export type { FormErrors,
|
|
5
|
+
export type { FormErrors, UseFormReturnType } from './types';
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-path.d.ts","sourceRoot":"","sources":["../../src/paths/get-path.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAiB/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-splitted-path.d.ts","sourceRoot":"","sources":["../../src/paths/get-splitted-path.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,YAM5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/paths/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insert-path.d.ts","sourceRoot":"","sources":["../../src/paths/insert-path.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAWpF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-path.d.ts","sourceRoot":"","sources":["../../src/paths/remove-path.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAYpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder-path.d.ts","sourceRoot":"","sources":["../../src/paths/reorder-path.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,KAapF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-path.d.ts","sourceRoot":"","sources":["../../src/paths/set-path.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,KA2BlE"}
|
|
@@ -4,6 +4,7 @@ export declare const RESOLVER_ERROR_MESSAGES: {
|
|
|
4
4
|
age: string;
|
|
5
5
|
fruitName: string;
|
|
6
6
|
fruitStock: string;
|
|
7
|
+
nestedArray: string;
|
|
7
8
|
};
|
|
8
9
|
export declare function testResolver(schema: (values: Record<string, any>) => FormErrors): void;
|
|
9
10
|
//# sourceMappingURL=test-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/test-resolver.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"test-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/test-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,uBAAuB;;;;;;CAMnC,CAAC;AAyCF,wBAAgB,YAAY,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,UAAU,QA4D/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_base.d.ts","sourceRoot":"","sources":["../../src/stories/_base.tsx"],"names":[],"mappings":";AAGA,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;CAAA,eAuB1C"}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,30 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} : (value: T[P], values: T) => React.ReactNode;
|
|
8
|
-
}>;
|
|
9
|
-
export declare type FormRules<T> = ((values: T) => FormErrors) | FormRulesRecord<T>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type GetInputPropsType = 'input' | 'checkbox';
|
|
3
|
+
export interface FormFieldValidationResult {
|
|
4
|
+
hasError: boolean;
|
|
5
|
+
error: React.ReactNode;
|
|
6
|
+
}
|
|
10
7
|
export interface FormValidationResult {
|
|
11
8
|
hasErrors: boolean;
|
|
12
9
|
errors: FormErrors;
|
|
13
10
|
}
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
export declare type FormErrors = Record<string, React.ReactNode>;
|
|
12
|
+
export interface ReorderPayload {
|
|
13
|
+
from: number;
|
|
14
|
+
to: number;
|
|
17
15
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
declare type Rule<Value, Values> = (value: Value, values: Values) => React.ReactNode;
|
|
17
|
+
declare type FormRule<Value, Values> = Value extends Array<infer ListValue> ? Partial<{
|
|
18
|
+
[Key in keyof ListValue]: ListValue[Key] extends Array<infer NestedListItem> ? FormRulesRecord<NestedListItem> | Rule<ListValue[Key], Values> : FormRulesRecord<ListValue[Key]> | Rule<ListValue[Key], Values>;
|
|
19
|
+
}> | Rule<Value, Values> : Value extends Record<string, unknown> ? FormRulesRecord<Value> | Rule<Value, Values> : Rule<Value, Values>;
|
|
20
|
+
export declare type FormRulesRecord<Values> = Partial<{
|
|
21
|
+
[Key in keyof Values]: FormRule<Values[Key], Values>;
|
|
22
|
+
}>;
|
|
23
|
+
export declare type FormValidateInput<Values> = FormRulesRecord<Values> | ((values: Values) => FormErrors);
|
|
24
|
+
export declare type LooseKeys<Values> = keyof Values | (string & {});
|
|
25
|
+
export declare type SetValues<Values> = React.Dispatch<React.SetStateAction<Values>>;
|
|
26
|
+
export declare type SetErrors = React.Dispatch<React.SetStateAction<FormErrors>>;
|
|
27
|
+
export declare type OnSubmit<Values> = (handleSubmit: (values: Values, event: React.FormEvent<HTMLFormElement>) => void, handleValidationFailure?: (errors: FormErrors, values: Values, event: React.FormEvent<HTMLFormElement>) => void) => (event: React.FormEvent<HTMLFormElement>) => void;
|
|
28
|
+
export declare type OnReset = (event: React.FormEvent<HTMLFormElement>) => void;
|
|
29
|
+
export declare type GetInputProps<Values> = <Field extends LooseKeys<Values>>(path: Field, options?: {
|
|
30
|
+
type?: GetInputPropsType;
|
|
31
|
+
withError?: boolean;
|
|
32
|
+
}) => any;
|
|
33
|
+
export declare type SetFieldValue<Values> = <Field extends LooseKeys<Values>>(path: Field, value: Field extends keyof Values ? Values[Field] : unknown) => void;
|
|
34
|
+
export declare type ClearFieldError = (path: unknown) => void;
|
|
35
|
+
export declare type ClearErrors = () => void;
|
|
36
|
+
export declare type Reset = () => void;
|
|
37
|
+
export declare type Validate = () => FormValidationResult;
|
|
38
|
+
export declare type ValidateField<Values> = <Field extends LooseKeys<Values>>(path: Field) => FormFieldValidationResult;
|
|
39
|
+
export declare type SetFieldError<Values> = <Field extends LooseKeys<Values>>(path: Field, error: React.ReactNode) => void;
|
|
40
|
+
export declare type ReorderListItem<Values> = <Field extends LooseKeys<Values>>(path: Field, payload: ReorderPayload) => void;
|
|
41
|
+
export declare type InsertListItem<Values> = <Field extends LooseKeys<Values>>(path: Field, item: unknown, index?: number) => void;
|
|
42
|
+
export declare type RemoveListItem<Values> = <Field extends LooseKeys<Values>>(path: Field, index: number) => void;
|
|
43
|
+
export interface UseFormInput<Values> {
|
|
44
|
+
initialValues?: Values;
|
|
45
|
+
initialErrors?: FormErrors;
|
|
46
|
+
validate?: FormValidateInput<Values>;
|
|
47
|
+
clearInputErrorOnChange?: boolean;
|
|
48
|
+
validateInputOnChange?: boolean | LooseKeys<Values>[];
|
|
22
49
|
}
|
|
23
|
-
export interface
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
50
|
+
export interface UseFormReturnType<Values> {
|
|
51
|
+
values: Values;
|
|
52
|
+
errors: FormErrors;
|
|
53
|
+
setValues: SetValues<Values>;
|
|
54
|
+
setErrors: SetErrors;
|
|
55
|
+
setFieldValue: SetFieldValue<Values>;
|
|
56
|
+
setFieldError: SetFieldError<Values>;
|
|
57
|
+
clearFieldError: ClearFieldError;
|
|
58
|
+
clearErrors: ClearErrors;
|
|
59
|
+
reset: Reset;
|
|
60
|
+
validate: Validate;
|
|
61
|
+
validateField: ValidateField<Values>;
|
|
62
|
+
reorderListItem: ReorderListItem<Values>;
|
|
63
|
+
removeListItem: RemoveListItem<Values>;
|
|
64
|
+
insertListItem: InsertListItem<Values>;
|
|
65
|
+
getInputProps: GetInputProps<Values>;
|
|
66
|
+
onSubmit: OnSubmit<Values>;
|
|
67
|
+
onReset: OnReset;
|
|
27
68
|
}
|
|
28
|
-
export
|
|
29
|
-
export declare type GetInputProps<T extends GetInputPropsFieldType> = T extends 'checkbox' ? GetCheckboxPropsPayload : GetInputPropsPayload;
|
|
69
|
+
export {};
|
|
30
70
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot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E,MAAM,KACV,IAAI,CAAC;AAEV,MAAM,WAAW,YAAY,CAAC,MAAM;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACrC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;CACvD;AAED,MAAM,WAAW,iBAAiB,CAAC,MAAM;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7B,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACzC,cAAc,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACvC,cAAc,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACvC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
package/lib/use-form.d.ts
CHANGED
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { FormErrors, FormRules, FormValidationResult, FormFieldValidationResult, GetInputProps, GetInputPropsFieldType } from './types';
|
|
4
|
-
export interface UseFormInput<T> {
|
|
5
|
-
initialValues: T;
|
|
6
|
-
initialErrors?: FormErrors;
|
|
7
|
-
validate?: FormRules<T>;
|
|
8
|
-
schema?: (values: Record<string, any>) => FormErrors;
|
|
9
|
-
}
|
|
10
|
-
export interface UseFormReturnType<T> {
|
|
11
|
-
values: T;
|
|
12
|
-
setValues: React.Dispatch<React.SetStateAction<T>>;
|
|
13
|
-
setFieldValue: <K extends keyof T, V extends T[K]>(field: K, value: V) => void;
|
|
14
|
-
errors: FormErrors;
|
|
15
|
-
setErrors: React.Dispatch<React.SetStateAction<FormErrors>>;
|
|
16
|
-
setFieldError: <K extends keyof T>(field: K, error: React.ReactNode) => void;
|
|
17
|
-
clearFieldError: <K extends keyof T>(field: K) => void;
|
|
18
|
-
clearErrors(): void;
|
|
19
|
-
setListItem: <K extends keyof T, V extends T[K]>(field: K, index: number, value: V extends FormList<infer U> ? U : never) => void;
|
|
20
|
-
addListItem: <K extends keyof T, V extends T[K]>(field: K, payload: V extends FormList<infer U> ? U : never) => void;
|
|
21
|
-
removeListItem: <K extends keyof T>(field: K, indices: number[] | number) => void;
|
|
22
|
-
reorderListItem: <K extends keyof T>(field: K, payload: {
|
|
23
|
-
from: number;
|
|
24
|
-
to: number;
|
|
25
|
-
}) => void;
|
|
26
|
-
validate(): FormValidationResult;
|
|
27
|
-
validateField: (field: string) => FormFieldValidationResult;
|
|
28
|
-
onSubmit(handleSubmit: (values: T, event: React.FormEvent) => void): (event?: React.FormEvent) => void;
|
|
29
|
-
reset(): void;
|
|
30
|
-
getInputProps: <K extends keyof T, L extends GetInputPropsFieldType = 'input'>(field: K, options?: {
|
|
31
|
-
type?: L;
|
|
32
|
-
withError?: boolean;
|
|
33
|
-
}) => GetInputProps<L>;
|
|
34
|
-
getListInputProps: <K extends keyof T, U extends T[K], L extends GetInputPropsFieldType = 'input'>(field: K, index: number, listField: U extends FormList<infer V> ? keyof V : never, options?: {
|
|
35
|
-
type?: L;
|
|
36
|
-
withError?: boolean;
|
|
37
|
-
}) => GetInputProps<L>;
|
|
38
|
-
}
|
|
39
|
-
export declare function useForm<T extends {
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
}>({ initialValues, initialErrors, validate: rules, schema, }: UseFormInput<T>): UseFormReturnType<T>;
|
|
1
|
+
import { UseFormReturnType, UseFormInput } from './types';
|
|
2
|
+
export declare function useForm<Values = Record<string, unknown>>({ initialValues, initialErrors, clearInputErrorOnChange, validateInputOnChange, validate: rules, }?: UseFormInput<Values>): UseFormReturnType<Values>;
|
|
42
3
|
//# sourceMappingURL=use-form.d.ts.map
|
package/lib/use-form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../src/use-form.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../src/use-form.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,iBAAiB,EACjB,YAAY,EAgBb,MAAM,SAAS,CAAC;AAEjB,wBAAgB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACxD,aAA4B,EAC5B,aAAkB,EAClB,uBAA8B,EAC9B,qBAA6B,EAC7B,QAAQ,EAAE,KAAK,GAChB,GAAE,YAAY,CAAC,MAAM,CAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,CA2IvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"should-validate-on-change.d.ts","sourceRoot":"","sources":["../../src/validate/should-validate-on-change.ts"],"names":[],"mappings":"AAAA,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,qBAAqB,EAAE,OAAO,GAAG,OAAO,EAAE,WAc/F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-field-value.d.ts","sourceRoot":"","sources":["../../src/validate/validate-field-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAGxE,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC3B,MAAM,EAAE,CAAC,GACR,yBAAyB,CAQ3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-values.d.ts","sourceRoot":"","sources":["../../src/validate/validate-values.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAwC1E,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;;;EAM1E"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/form",
|
|
3
3
|
"description": "Mantine form management library",
|
|
4
|
-
"version": "5.0.0-alpha.
|
|
4
|
+
"version": "5.0.0-alpha.11",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=16.8.0"
|
|
19
19
|
},
|
|
20
|
-
"dependencies": {
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"lodash.clonedeep": "4.5.0"
|
|
22
|
+
},
|
|
21
23
|
"devDependencies": {}
|
|
22
24
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const LIST_IDENTIFIER = Symbol("@mantine/form/list");
|
|
2
|
-
function formList(list) {
|
|
3
|
-
Object.defineProperty(list, LIST_IDENTIFIER, {
|
|
4
|
-
value: true,
|
|
5
|
-
writable: false,
|
|
6
|
-
enumerable: false,
|
|
7
|
-
configurable: false
|
|
8
|
-
});
|
|
9
|
-
return list;
|
|
10
|
-
}
|
|
11
|
-
function isFormList(list) {
|
|
12
|
-
return Array.isArray(list) && !!list[LIST_IDENTIFIER];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { formList, isFormList };
|
|
16
|
-
//# sourceMappingURL=form-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-list.js","sources":["../../src/form-list/form-list.ts"],"sourcesContent":["const LIST_IDENTIFIER = Symbol('@mantine/form/list');\n\nexport interface FormList<T> extends Array<T> {\n [LIST_IDENTIFIER]: true;\n}\n\nexport function formList<T>(list: T[]): FormList<T> {\n Object.defineProperty(list, LIST_IDENTIFIER, {\n value: true,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n\n return list as FormList<T>;\n}\n\nexport function isFormList(list: unknown) {\n return Array.isArray(list) && !!list[LIST_IDENTIFIER];\n}\n"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAC9C,SAAS,QAAQ,CAAC,IAAI,EAAE;AAC/B,EAAE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,EAAE;AAC/C,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,UAAU,EAAE,KAAK;AACrB,IAAI,YAAY,EAAE,KAAK;AACvB,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,IAAI,CAAC;AACd,CAAC;AACM,SAAS,UAAU,CAAC,IAAI,EAAE;AACjC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AACxD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-error-path.js","sources":["../../src/get-error-path/get-error-path.ts"],"sourcesContent":["export function getErrorPath(path: (string | number | symbol)[]) {\n return path.join('.');\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,CAAC,IAAI,EAAE;AACnC,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB;;;;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
function validateListValues(values, key, rules) {
|
|
2
|
-
const list = values[key];
|
|
3
|
-
const results = {};
|
|
4
|
-
list.forEach((item, itemIndex) => {
|
|
5
|
-
if (typeof item === "object" && item !== null) {
|
|
6
|
-
Object.keys(item).forEach((listItemKey) => {
|
|
7
|
-
if (typeof rules[key][listItemKey] === "function") {
|
|
8
|
-
const error = rules[key][listItemKey](item[listItemKey], values);
|
|
9
|
-
if (error) {
|
|
10
|
-
results[`${key}.${itemIndex}.${listItemKey}`] = error;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return results;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { validateListValues };
|
|
20
|
-
//# sourceMappingURL=validate-list-values.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-list-values.js","sources":["../../src/validate-values/validate-list-values.ts"],"sourcesContent":["import type { FormList } from '../form-list/form-list';\nimport type { FormRulesRecord, FormErrors } from '../types';\n\nexport function validateListValues<T>(values: T, key: string, rules: FormRulesRecord<T>) {\n const list: FormList<any> = values[key] as any;\n const results: FormErrors = {};\n\n list.forEach((item, itemIndex) => {\n if (typeof item === 'object' && item !== null) {\n Object.keys(item).forEach((listItemKey) => {\n if (typeof rules[key][listItemKey] === 'function') {\n const error = rules[key][listItemKey](item[listItemKey], values);\n if (error) {\n results[`${key}.${itemIndex}.${listItemKey}`] = error;\n }\n }\n });\n }\n });\n\n return results;\n}\n"],"names":[],"mappings":"AAAO,SAAS,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE;AACvD,EAAE,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAC3B,EAAE,MAAM,OAAO,GAAG,EAAE,CAAC;AACrB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,SAAS,KAAK;AACpC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;AACnD,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,KAAK;AACjD,QAAQ,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,KAAK,UAAU,EAAE;AAC3D,UAAU,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;AAC3E,UAAU,IAAI,KAAK,EAAE;AACrB,YAAY,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;AAClE,WAAW;AACX,SAAS;AACT,OAAO,CAAC,CAAC;AACT,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,OAAO,CAAC;AACjB;;;;"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { isFormList } from '../form-list/form-list.js';
|
|
2
|
-
import { filterErrors } from '../filter-errors/filter-errors.js';
|
|
3
|
-
import { validateListValues } from './validate-list-values.js';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
function validateRecordRules(rules, values) {
|
|
22
|
-
return Object.keys(rules).reduce((acc, key) => {
|
|
23
|
-
const rule = rules[key];
|
|
24
|
-
if (isFormList(values[key])) {
|
|
25
|
-
return __spreadValues(__spreadValues({}, acc), validateListValues(values, key, rules));
|
|
26
|
-
}
|
|
27
|
-
if (typeof rule === "function") {
|
|
28
|
-
acc[key] = rule(values[key], values);
|
|
29
|
-
}
|
|
30
|
-
return acc;
|
|
31
|
-
}, {});
|
|
32
|
-
}
|
|
33
|
-
function getValidationResults(errors) {
|
|
34
|
-
const filteredErrors = filterErrors(errors);
|
|
35
|
-
return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };
|
|
36
|
-
}
|
|
37
|
-
function validateValues(rules, values) {
|
|
38
|
-
if (rules === void 0 || rules === null) {
|
|
39
|
-
return { hasErrors: false, errors: {} };
|
|
40
|
-
}
|
|
41
|
-
if (typeof rules === "function") {
|
|
42
|
-
return getValidationResults(rules(values));
|
|
43
|
-
}
|
|
44
|
-
return getValidationResults(validateRecordRules(rules, values));
|
|
45
|
-
}
|
|
46
|
-
function validateFieldValue(field, rules, values) {
|
|
47
|
-
const results = validateValues(rules, values);
|
|
48
|
-
const hasError = field in results.errors;
|
|
49
|
-
return { hasError, error: hasError ? results.errors[field] : null };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { validateFieldValue, validateValues };
|
|
53
|
-
//# sourceMappingURL=validate-values.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-values.js","sources":["../../src/validate-values/validate-values.ts"],"sourcesContent":["import type {\n FormErrors,\n FormRulesRecord,\n FormRules,\n FormValidationResult,\n FormFieldValidationResult,\n} from '../types';\nimport { isFormList } from '../form-list/form-list';\nimport { filterErrors } from '../filter-errors/filter-errors';\nimport { validateListValues } from './validate-list-values';\n\nfunction validateRecordRules(rules: FormRulesRecord<any>, values: Record<string, any>): FormErrors {\n return Object.keys(rules).reduce<FormErrors>((acc, key) => {\n const rule = rules[key];\n\n if (isFormList(values[key])) {\n return { ...acc, ...validateListValues(values, key, rules) };\n }\n\n if (typeof rule === 'function') {\n acc[key] = rule(values[key], values);\n }\n\n return acc;\n }, {});\n}\n\nfunction getValidationResults(errors: FormErrors) {\n const filteredErrors = filterErrors(errors);\n return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };\n}\n\nexport function validateValues(\n rules: FormRules<any>,\n values: Record<string, any>\n): FormValidationResult {\n if (rules === undefined || rules === null) {\n return { hasErrors: false, errors: {} };\n }\n\n if (typeof rules === 'function') {\n return getValidationResults(rules(values));\n }\n\n return getValidationResults(validateRecordRules(rules, values));\n}\n\nexport function validateFieldValue(\n field: string,\n rules: FormRules<any>,\n values: Record<string, any>\n): FormFieldValidationResult {\n const results = validateValues(rules, values);\n const hasError = field in results.errors;\n return { hasError, error: hasError ? results.errors[field] : null };\n}\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,C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