@jcoreio/zod-forms 2.1.0 → 2.1.1
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/ConditionalValidator.d.mts +25 -0
- package/ConditionalValidator.d.mts.map +1 -0
- package/ConditionalValidator.d.ts +12 -12
- package/ConditionalValidator.d.ts.map +1 -1
- package/FieldPath.d.mts +24 -0
- package/FieldPath.d.mts.map +1 -0
- package/FieldPath.d.ts +13 -15
- package/FieldPath.d.ts.map +1 -1
- package/FormAction.d.mts +15 -0
- package/FormAction.d.mts.map +1 -0
- package/FormAction.d.ts +12 -12
- package/FormAction.d.ts.map +1 -1
- package/FormContext.d.mts +40 -0
- package/FormContext.d.mts.map +1 -0
- package/FormContext.d.ts +34 -34
- package/FormContext.d.ts.map +1 -1
- package/FormState.d.mts +34 -0
- package/FormState.d.mts.map +1 -0
- package/FormState.d.ts +24 -26
- package/FormState.d.ts.map +1 -1
- package/FormStateContext.d.mts +8 -0
- package/FormStateContext.d.mts.map +1 -0
- package/FormStateContext.d.ts +2 -2
- package/FormStateContext.d.ts.map +1 -1
- package/actions/addHandlers.d.mts +15 -0
- package/actions/addHandlers.d.mts.map +1 -0
- package/actions/addHandlers.d.ts +8 -8
- package/actions/addHandlers.d.ts.map +1 -1
- package/actions/arrayActions.d.mts +130 -0
- package/actions/arrayActions.d.mts.map +1 -0
- package/actions/arrayActions.d.ts +77 -77
- package/actions/arrayActions.d.ts.map +1 -1
- package/actions/initialize.d.mts +14 -0
- package/actions/initialize.d.mts.map +1 -0
- package/actions/initialize.d.ts +8 -8
- package/actions/initialize.d.ts.map +1 -1
- package/actions/removeHandlers.d.mts +10 -0
- package/actions/removeHandlers.d.mts.map +1 -0
- package/actions/removeHandlers.d.ts +5 -5
- package/actions/removeHandlers.d.ts.map +1 -1
- package/actions/setMeta.d.mts +9 -0
- package/actions/setMeta.d.mts.map +1 -0
- package/actions/setMeta.d.ts +5 -5
- package/actions/setMeta.d.ts.map +1 -1
- package/actions/setMounted.d.mts +6 -0
- package/actions/setMounted.d.mts.map +1 -0
- package/actions/setMounted.d.ts +2 -2
- package/actions/setMounted.d.ts.map +1 -1
- package/actions/setParsedValue.d.mts +12 -0
- package/actions/setParsedValue.d.mts.map +1 -0
- package/actions/setParsedValue.d.ts +6 -6
- package/actions/setParsedValue.d.ts.map +1 -1
- package/actions/setSubmitStatus.d.mts +14 -0
- package/actions/setSubmitStatus.d.mts.map +1 -0
- package/actions/setSubmitStatus.d.ts +9 -9
- package/actions/setSubmitStatus.d.ts.map +1 -1
- package/actions/setValue.d.mts +10 -0
- package/actions/setValue.d.mts.map +1 -0
- package/actions/setValue.d.ts +5 -5
- package/actions/setValue.d.ts.map +1 -1
- package/actions/submit.d.mts +5 -0
- package/actions/submit.d.mts.map +1 -0
- package/actions/submit.d.ts +1 -1
- package/actions/submit.d.ts.map +1 -1
- package/actions/submitSucceeded.d.mts +5 -0
- package/actions/submitSucceeded.d.mts.map +1 -0
- package/actions/submitSucceeded.d.ts +1 -1
- package/actions/submitSucceeded.d.ts.map +1 -1
- package/createFormMiddleware.d.mts +6 -0
- package/createFormMiddleware.d.mts.map +1 -0
- package/createFormMiddleware.d.ts +2 -2
- package/createFormMiddleware.d.ts.map +1 -1
- package/createFormProvider.d.mts +15 -0
- package/createFormProvider.d.mts.map +1 -0
- package/createFormProvider.d.ts +9 -7
- package/createFormProvider.d.ts.map +1 -1
- package/createFormReducer.d.mts +9 -0
- package/createFormReducer.d.mts.map +1 -0
- package/createFormReducer.d.ts +4 -4
- package/createFormReducer.d.ts.map +1 -1
- package/createSelectFieldErrorMap.d.mts +32 -0
- package/createSelectFieldErrorMap.d.mts.map +1 -0
- package/createSelectFieldErrorMap.d.ts +23 -23
- package/createSelectFieldErrorMap.d.ts.map +1 -1
- package/createSelectFormStatus.d.mts +133 -0
- package/createSelectFormStatus.d.mts.map +1 -0
- package/createSelectFormStatus.d.ts +101 -97
- package/createSelectFormStatus.d.ts.map +1 -1
- package/createSelectFormValues.d.mts +45 -0
- package/createSelectFormValues.d.mts.map +1 -0
- package/createSelectFormValues.d.ts +34 -34
- package/createSelectFormValues.d.ts.map +1 -1
- package/createZodForm.d.mts +42 -0
- package/createZodForm.d.mts.map +1 -0
- package/createZodForm.d.ts +36 -32
- package/createZodForm.d.ts.map +1 -1
- package/index.d.mts +15 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +14 -14
- package/index.d.ts.map +1 -1
- package/initFormState.d.mts +4 -0
- package/initFormState.d.mts.map +1 -0
- package/initFormState.d.ts +1 -1
- package/initFormState.d.ts.map +1 -1
- package/package.json +10 -7
- package/reducers/addHandlers.d.mts +24 -0
- package/reducers/addHandlers.d.mts.map +1 -0
- package/reducers/addHandlers.d.ts +20 -20
- package/reducers/addHandlers.d.ts.map +1 -1
- package/reducers/arrayInsert.d.mts +7 -0
- package/reducers/arrayInsert.d.mts.map +1 -0
- package/reducers/arrayInsert.d.ts +3 -3
- package/reducers/arrayInsert.d.ts.map +1 -1
- package/reducers/arrayInsertParsed.d.mts +7 -0
- package/reducers/arrayInsertParsed.d.mts.map +1 -0
- package/reducers/arrayInsertParsed.d.ts +3 -3
- package/reducers/arrayInsertParsed.d.ts.map +1 -1
- package/reducers/arrayMove.d.mts +8 -0
- package/reducers/arrayMove.d.mts.map +1 -0
- package/reducers/arrayMove.d.ts +3 -3
- package/reducers/arrayMove.d.ts.map +1 -1
- package/reducers/arrayPop.d.mts +7 -0
- package/reducers/arrayPop.d.mts.map +1 -0
- package/reducers/arrayPop.d.ts +3 -3
- package/reducers/arrayPop.d.ts.map +1 -1
- package/reducers/arrayPush.d.mts +7 -0
- package/reducers/arrayPush.d.mts.map +1 -0
- package/reducers/arrayPush.d.ts +3 -3
- package/reducers/arrayPush.d.ts.map +1 -1
- package/reducers/arrayPushParsed.d.mts +7 -0
- package/reducers/arrayPushParsed.d.mts.map +1 -0
- package/reducers/arrayPushParsed.d.ts +3 -3
- package/reducers/arrayPushParsed.d.ts.map +1 -1
- package/reducers/arrayRemove.d.mts +7 -0
- package/reducers/arrayRemove.d.mts.map +1 -0
- package/reducers/arrayRemove.d.ts +3 -3
- package/reducers/arrayRemove.d.ts.map +1 -1
- package/reducers/arrayRemoveAll.d.mts +7 -0
- package/reducers/arrayRemoveAll.d.mts.map +1 -0
- package/reducers/arrayRemoveAll.d.ts +3 -3
- package/reducers/arrayRemoveAll.d.ts.map +1 -1
- package/reducers/arrayShift.d.mts +7 -0
- package/reducers/arrayShift.d.mts.map +1 -0
- package/reducers/arrayShift.d.ts +3 -3
- package/reducers/arrayShift.d.ts.map +1 -1
- package/reducers/arraySplice.d.mts +7 -0
- package/reducers/arraySplice.d.mts.map +1 -0
- package/reducers/arraySplice.d.ts +3 -3
- package/reducers/arraySplice.d.ts.map +1 -1
- package/reducers/arraySpliceParsed.d.mts +7 -0
- package/reducers/arraySpliceParsed.d.mts.map +1 -0
- package/reducers/arraySpliceParsed.d.ts +3 -3
- package/reducers/arraySpliceParsed.d.ts.map +1 -1
- package/reducers/arraySwap.d.mts +8 -0
- package/reducers/arraySwap.d.mts.map +1 -0
- package/reducers/arraySwap.d.ts +3 -3
- package/reducers/arraySwap.d.ts.map +1 -1
- package/reducers/arrayUnshift.d.mts +7 -0
- package/reducers/arrayUnshift.d.mts.map +1 -0
- package/reducers/arrayUnshift.d.ts +3 -3
- package/reducers/arrayUnshift.d.ts.map +1 -1
- package/reducers/arrayUnshiftParsed.d.mts +7 -0
- package/reducers/arrayUnshiftParsed.d.mts.map +1 -0
- package/reducers/arrayUnshiftParsed.d.ts +3 -3
- package/reducers/arrayUnshiftParsed.d.ts.map +1 -1
- package/reducers/initialize.d.mts +49 -0
- package/reducers/initialize.d.mts.map +1 -0
- package/reducers/initialize.d.ts +44 -41
- package/reducers/initialize.d.ts.map +1 -1
- package/reducers/removeHandlers.d.mts +24 -0
- package/reducers/removeHandlers.d.mts.map +1 -0
- package/reducers/removeHandlers.d.ts +20 -20
- package/reducers/removeHandlers.d.ts.map +1 -1
- package/reducers/setMeta.d.mts +6 -0
- package/reducers/setMeta.d.mts.map +1 -0
- package/reducers/setMeta.d.ts +3 -3
- package/reducers/setMeta.d.ts.map +1 -1
- package/reducers/setParsedValue.d.mts +50 -0
- package/reducers/setParsedValue.d.mts.map +1 -0
- package/reducers/setParsedValue.d.ts +45 -42
- package/reducers/setParsedValue.d.ts.map +1 -1
- package/reducers/setSubmitStatus.d.mts +24 -0
- package/reducers/setSubmitStatus.d.mts.map +1 -0
- package/reducers/setSubmitStatus.d.ts +20 -20
- package/reducers/setSubmitStatus.d.ts.map +1 -1
- package/reducers/setValue.d.mts +29 -0
- package/reducers/setValue.d.mts.map +1 -0
- package/reducers/setValue.d.ts +25 -23
- package/reducers/setValue.d.ts.map +1 -1
- package/reducers/submitSucceeded.d.mts +23 -0
- package/reducers/submitSucceeded.d.mts.map +1 -0
- package/reducers/submitSucceeded.d.ts +19 -19
- package/reducers/submitSucceeded.d.ts.map +1 -1
- package/reducers/util/getInverseArrayElementSchema.d.mts +3 -0
- package/reducers/util/getInverseArrayElementSchema.d.mts.map +1 -0
- package/reducers/util/getInverseArrayElementSchema.d.ts.map +1 -1
- package/reducers/util/updateRawArray.d.mts +7 -0
- package/reducers/util/updateRawArray.d.mts.map +1 -0
- package/reducers/util/updateRawArray.d.ts +3 -3
- package/reducers/util/updateRawArray.d.ts.map +1 -1
- package/useArrayField.d.mts +34 -0
- package/useArrayField.d.mts.map +1 -0
- package/useArrayField.d.ts +23 -23
- package/useArrayField.d.ts.map +1 -1
- package/useField.d.mts +38 -0
- package/useField.d.mts.map +1 -0
- package/useField.d.ts +26 -26
- package/useField.d.ts.map +1 -1
- package/useFormContext.d.mts +4 -0
- package/useFormContext.d.mts.map +1 -0
- package/useFormContext.d.ts +1 -1
- package/useFormContext.d.ts.map +1 -1
- package/useFormDispatch.d.mts +5 -0
- package/useFormDispatch.d.mts.map +1 -0
- package/useFormDispatch.d.ts +1 -1
- package/useFormDispatch.d.ts.map +1 -1
- package/useFormSelector.d.mts +6 -0
- package/useFormSelector.d.mts.map +1 -0
- package/useFormSelector.d.ts +1 -1
- package/useFormSelector.d.ts.map +1 -1
- package/useFormStatus.d.mts +13 -0
- package/useFormStatus.d.mts.map +1 -0
- package/useFormStatus.d.ts +10 -10
- package/useFormStatus.d.ts.map +1 -1
- package/useFormValues.d.mts +8 -0
- package/useFormValues.d.mts.map +1 -0
- package/useFormValues.d.ts +4 -4
- package/useFormValues.d.ts.map +1 -1
- package/useHtmlField.d.mts +41 -0
- package/useHtmlField.d.mts.map +1 -0
- package/useHtmlField.d.ts +25 -25
- package/useHtmlField.d.ts.map +1 -1
- package/useInitialize.d.mts +5 -0
- package/useInitialize.d.mts.map +1 -0
- package/useInitialize.d.ts +1 -1
- package/useInitialize.d.ts.map +1 -1
- package/useSubmit.d.mts +5 -0
- package/useSubmit.d.mts.map +1 -0
- package/useSubmit.d.ts +1 -1
- package/useSubmit.d.ts.map +1 -1
- package/util/DeepPartial.d.mts +2 -0
- package/util/DeepPartial.d.mts.map +1 -0
- package/util/DeepPartial.d.ts +1 -3
- package/util/DeepPartial.d.ts.map +1 -1
- package/util/PathInSchema.d.mts +5 -0
- package/util/PathInSchema.d.mts.map +1 -0
- package/util/PathInSchema.d.ts +1 -1
- package/util/PathInSchema.d.ts.map +1 -1
- package/util/PathInType.d.mts +7 -0
- package/util/PathInType.d.mts.map +1 -0
- package/util/PathInType.d.ts +3 -8
- package/util/PathInType.d.ts.map +1 -1
- package/util/SchemaAt.d.mts +5 -0
- package/util/SchemaAt.d.mts.map +1 -0
- package/util/SchemaAt.d.ts.map +1 -1
- package/util/acceptsBigint.d.mts +3 -0
- package/util/acceptsBigint.d.mts.map +1 -0
- package/util/acceptsBigint.d.ts.map +1 -1
- package/util/acceptsBigint.js +2 -2
- package/util/acceptsBigint.js.map +1 -1
- package/util/acceptsNumber.d.mts +3 -0
- package/util/acceptsNumber.d.mts.map +1 -0
- package/util/acceptsNumber.d.ts.map +1 -1
- package/util/acceptsNumber.js +2 -2
- package/util/acceptsNumber.js.map +1 -1
- package/util/bindActionsToField.d.mts +3 -0
- package/util/bindActionsToField.d.mts.map +1 -0
- package/util/bindActionsToField.d.ts +2 -6
- package/util/bindActionsToField.d.ts.map +1 -1
- package/util/get.d.mts +2 -0
- package/util/get.d.mts.map +1 -0
- package/util/get.d.ts.map +1 -1
- package/util/getArrayElementSchema.d.mts +3 -0
- package/util/getArrayElementSchema.d.mts.map +1 -0
- package/util/getArrayElementSchema.d.ts.map +1 -1
- package/util/getArrayElementSchema.js +2 -2
- package/util/getArrayElementSchema.js.map +1 -1
- package/util/isPromise.d.mts +2 -0
- package/util/isPromise.d.mts.map +1 -0
- package/util/isPromise.d.ts.map +1 -1
- package/util/maybeParse.d.mts +3 -0
- package/util/maybeParse.d.mts.map +1 -0
- package/util/maybeParse.d.ts.map +1 -1
- package/util/parsePathstring.d.mts +33 -0
- package/util/parsePathstring.d.mts.map +1 -0
- package/util/parsePathstring.d.ts +14 -38
- package/util/parsePathstring.d.ts.map +1 -1
- package/util/pathstring.d.mts +7 -0
- package/util/pathstring.d.mts.map +1 -0
- package/util/pathstring.d.ts.map +1 -1
- package/util/set.d.mts +2 -0
- package/util/set.d.mts.map +1 -0
- package/util/set.d.ts.map +1 -1
- package/util/setAdd.d.mts +2 -0
- package/util/setAdd.d.mts.map +1 -0
- package/util/setAdd.d.ts.map +1 -1
- package/util/setDelete.d.mts +2 -0
- package/util/setDelete.d.mts.map +1 -0
- package/util/setDelete.d.ts.map +1 -1
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
import { FormState } from
|
|
1
|
+
import { FormState } from "./FormState.js";
|
|
2
2
|
export type SelectFormStatus = ReturnType<typeof createSelectFormStatus>;
|
|
3
3
|
export type FormStatus = ReturnType<SelectFormStatus>;
|
|
4
4
|
export declare function createSelectFormStatus(): ((state: FormState<any>) => {
|
|
5
|
+
initialized: boolean;
|
|
6
|
+
submitting: boolean;
|
|
7
|
+
submitSucceeded: boolean;
|
|
8
|
+
submitFailed: boolean;
|
|
9
|
+
submitError: unknown;
|
|
10
|
+
validationError: any;
|
|
11
|
+
valid: boolean;
|
|
12
|
+
invalid: boolean;
|
|
13
|
+
pristine: boolean;
|
|
14
|
+
dirty: boolean;
|
|
15
|
+
}) & {
|
|
16
|
+
clearCache: () => void;
|
|
17
|
+
resultsCount: () => number;
|
|
18
|
+
resetResultsCount: () => void;
|
|
19
|
+
} & {
|
|
20
|
+
resultFunc: (resultFuncArgs_0: boolean, resultFuncArgs_1: boolean, resultFuncArgs_2: boolean, resultFuncArgs_3: boolean, resultFuncArgs_4: any, resultFuncArgs_5: boolean, resultFuncArgs_6: boolean, resultFuncArgs_7: any, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean) => {
|
|
5
21
|
initialized: boolean;
|
|
6
22
|
submitting: boolean;
|
|
7
23
|
submitSucceeded: boolean;
|
|
@@ -12,118 +28,106 @@ export declare function createSelectFormStatus(): ((state: FormState<any>) => {
|
|
|
12
28
|
invalid: boolean;
|
|
13
29
|
pristine: boolean;
|
|
14
30
|
dirty: boolean;
|
|
15
|
-
}
|
|
31
|
+
};
|
|
32
|
+
memoizedResultFunc: ((resultFuncArgs_0: boolean, resultFuncArgs_1: boolean, resultFuncArgs_2: boolean, resultFuncArgs_3: boolean, resultFuncArgs_4: any, resultFuncArgs_5: boolean, resultFuncArgs_6: boolean, resultFuncArgs_7: any, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean) => {
|
|
33
|
+
initialized: boolean;
|
|
34
|
+
submitting: boolean;
|
|
35
|
+
submitSucceeded: boolean;
|
|
36
|
+
submitFailed: boolean;
|
|
37
|
+
submitError: unknown;
|
|
38
|
+
validationError: any;
|
|
39
|
+
valid: boolean;
|
|
40
|
+
invalid: boolean;
|
|
41
|
+
pristine: boolean;
|
|
42
|
+
dirty: boolean;
|
|
43
|
+
}) & {
|
|
16
44
|
clearCache: () => void;
|
|
17
45
|
resultsCount: () => number;
|
|
18
46
|
resetResultsCount: () => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
47
|
+
};
|
|
48
|
+
lastResult: () => {
|
|
49
|
+
initialized: boolean;
|
|
50
|
+
submitting: boolean;
|
|
51
|
+
submitSucceeded: boolean;
|
|
52
|
+
submitFailed: boolean;
|
|
53
|
+
submitError: unknown;
|
|
54
|
+
validationError: any;
|
|
55
|
+
valid: boolean;
|
|
56
|
+
invalid: boolean;
|
|
57
|
+
pristine: boolean;
|
|
58
|
+
dirty: boolean;
|
|
59
|
+
};
|
|
60
|
+
dependencies: [(state: FormState<any>) => boolean, (state: FormState<any>) => boolean, (state: FormState<any>) => boolean, (state: FormState<any>) => boolean, (state: FormState<any>) => unknown, (state: FormState<any>) => boolean, (state: FormState<any>) => boolean, ({
|
|
61
|
+
validationError
|
|
62
|
+
}: FormState<any>) => any, (state: FormState<any>) => boolean, ((state: FormState<any>) => boolean) & {
|
|
63
|
+
clearCache: () => void;
|
|
64
|
+
resultsCount: () => number;
|
|
65
|
+
resetResultsCount: () => void;
|
|
66
|
+
} & {
|
|
67
|
+
resultFunc: (resultFuncArgs_0: boolean, resultFuncArgs_1: boolean, resultFuncArgs_2: any) => boolean;
|
|
68
|
+
memoizedResultFunc: ((resultFuncArgs_0: boolean, resultFuncArgs_1: boolean, resultFuncArgs_2: any) => boolean) & {
|
|
69
|
+
clearCache: () => void;
|
|
70
|
+
resultsCount: () => number;
|
|
71
|
+
resetResultsCount: () => void;
|
|
31
72
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
invalid: boolean;
|
|
41
|
-
pristine: boolean;
|
|
42
|
-
dirty: boolean;
|
|
43
|
-
}) & {
|
|
73
|
+
lastResult: () => boolean;
|
|
74
|
+
dependencies: [((state: FormState<any>) => boolean) & {
|
|
75
|
+
clearCache: () => void;
|
|
76
|
+
resultsCount: () => number;
|
|
77
|
+
resetResultsCount: () => void;
|
|
78
|
+
} & {
|
|
79
|
+
resultFunc: (resultFuncArgs_0: any, resultFuncArgs_1: any) => boolean;
|
|
80
|
+
memoizedResultFunc: ((resultFuncArgs_0: any, resultFuncArgs_1: any) => boolean) & {
|
|
44
81
|
clearCache: () => void;
|
|
45
82
|
resultsCount: () => number;
|
|
46
83
|
resetResultsCount: () => void;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
84
|
+
};
|
|
85
|
+
lastResult: () => boolean;
|
|
86
|
+
dependencies: [(state: FormState<any>) => any, (state: FormState<any>) => any];
|
|
87
|
+
recomputations: () => number;
|
|
88
|
+
resetRecomputations: () => void;
|
|
89
|
+
dependencyRecomputations: () => number;
|
|
90
|
+
resetDependencyRecomputations: () => void;
|
|
91
|
+
} & {
|
|
92
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
93
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
94
|
+
}, ((state: FormState<any>) => boolean) & {
|
|
95
|
+
clearCache: () => void;
|
|
96
|
+
resultsCount: () => number;
|
|
97
|
+
resetResultsCount: () => void;
|
|
98
|
+
} & {
|
|
99
|
+
resultFunc: (resultFuncArgs_0: any, resultFuncArgs_1: any) => boolean;
|
|
100
|
+
memoizedResultFunc: ((resultFuncArgs_0: any, resultFuncArgs_1: any) => boolean) & {
|
|
61
101
|
clearCache: () => void;
|
|
62
102
|
resultsCount: () => number;
|
|
63
103
|
resetResultsCount: () => void;
|
|
104
|
+
};
|
|
105
|
+
lastResult: () => boolean;
|
|
106
|
+
dependencies: [(state: FormState<any>) => any, (state: FormState<any>) => any];
|
|
107
|
+
recomputations: () => number;
|
|
108
|
+
resetRecomputations: () => void;
|
|
109
|
+
dependencyRecomputations: () => number;
|
|
110
|
+
resetDependencyRecomputations: () => void;
|
|
64
111
|
} & {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
lastResult: () => boolean;
|
|
72
|
-
dependencies: [((state: FormState<any>) => boolean) & {
|
|
73
|
-
clearCache: () => void;
|
|
74
|
-
resultsCount: () => number;
|
|
75
|
-
resetResultsCount: () => void;
|
|
76
|
-
} & {
|
|
77
|
-
resultFunc: (resultFuncArgs_0: any, resultFuncArgs_1: any) => boolean;
|
|
78
|
-
memoizedResultFunc: ((resultFuncArgs_0: any, resultFuncArgs_1: any) => boolean) & {
|
|
79
|
-
clearCache: () => void;
|
|
80
|
-
resultsCount: () => number;
|
|
81
|
-
resetResultsCount: () => void;
|
|
82
|
-
};
|
|
83
|
-
lastResult: () => boolean;
|
|
84
|
-
dependencies: [(state: FormState<any>) => any, (state: FormState<any>) => any];
|
|
85
|
-
recomputations: () => number;
|
|
86
|
-
resetRecomputations: () => void;
|
|
87
|
-
dependencyRecomputations: () => number;
|
|
88
|
-
resetDependencyRecomputations: () => void;
|
|
89
|
-
} & {
|
|
90
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
91
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
92
|
-
}, ((state: FormState<any>) => boolean) & {
|
|
93
|
-
clearCache: () => void;
|
|
94
|
-
resultsCount: () => number;
|
|
95
|
-
resetResultsCount: () => void;
|
|
96
|
-
} & {
|
|
97
|
-
resultFunc: (resultFuncArgs_0: any, resultFuncArgs_1: any) => boolean;
|
|
98
|
-
memoizedResultFunc: ((resultFuncArgs_0: any, resultFuncArgs_1: any) => boolean) & {
|
|
99
|
-
clearCache: () => void;
|
|
100
|
-
resultsCount: () => number;
|
|
101
|
-
resetResultsCount: () => void;
|
|
102
|
-
};
|
|
103
|
-
lastResult: () => boolean;
|
|
104
|
-
dependencies: [(state: FormState<any>) => any, (state: FormState<any>) => any];
|
|
105
|
-
recomputations: () => number;
|
|
106
|
-
resetRecomputations: () => void;
|
|
107
|
-
dependencyRecomputations: () => number;
|
|
108
|
-
resetDependencyRecomputations: () => void;
|
|
109
|
-
} & {
|
|
110
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
111
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
112
|
-
}, ({ validationError }: FormState<any>) => any];
|
|
113
|
-
recomputations: () => number;
|
|
114
|
-
resetRecomputations: () => void;
|
|
115
|
-
dependencyRecomputations: () => number;
|
|
116
|
-
resetDependencyRecomputations: () => void;
|
|
117
|
-
} & {
|
|
118
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
119
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
120
|
-
}];
|
|
112
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
113
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
114
|
+
}, ({
|
|
115
|
+
validationError
|
|
116
|
+
}: FormState<any>) => any];
|
|
121
117
|
recomputations: () => number;
|
|
122
118
|
resetRecomputations: () => void;
|
|
123
119
|
dependencyRecomputations: () => number;
|
|
124
120
|
resetDependencyRecomputations: () => void;
|
|
125
|
-
} & {
|
|
121
|
+
} & {
|
|
126
122
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
127
123
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
124
|
+
}];
|
|
125
|
+
recomputations: () => number;
|
|
126
|
+
resetRecomputations: () => void;
|
|
127
|
+
dependencyRecomputations: () => number;
|
|
128
|
+
resetDependencyRecomputations: () => void;
|
|
129
|
+
} & {
|
|
130
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
131
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
128
132
|
};
|
|
129
133
|
//# sourceMappingURL=createSelectFormStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSelectFormStatus.d.ts","
|
|
1
|
+
{"version":3,"file":"createSelectFormStatus.d.ts","names":["FormState","SelectFormStatus","ReturnType","createSelectFormStatus","FormStatus","state","validationError"],"sources":["src/createSelectFormStatus.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,SAAS;AAGlB,OAAM,KAAMC,gBAAgB,GAAGC,UAAU,CAAC,OAAOC,sBAAsB,CAAC;AACxE,OAAM,KAAMC,UAAU,GAAGF,UAAU,CAACD,gBAAgB,CAAC;AAErD,wBAAgBE,sBAAsBA,CAAA,KAAAE,KAAA,EAAAL,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA0CnBA,SAAS,CAAC,GAAG,CAAC,eAAAK,KAAA,EAGdL,SAAS,CAAC,GAAG,CAAC,eAAAK,KAAA,EAPJL,SAAS,CAAC,GAAG,CAAC,eAAAK,KAAA,EADnBL,SAAS,CAAC,GAAG,CAAC,eAAAK,KAAA,EAGbL,SAAS,CAAC,GAAG,CAAC,eAAAK,KAAA,EADbL,SAAS,CAAC,GAAG,CAAC,eAAAK,KAAA,EAHfL,SAAS,CAAC,GAAG,CAAC;IAAAM;EAjC4B,CAiC5B,EAjCeN,SAAS,CAAC,GAAG,CAAC,WAAAK,KAAA,EAwC/CL,SAAS,CAAC,GAAG,CAAC,gBAAAK,KAAA,EAAAL,SAAA;;;;;;;;;;;;;;;;;;;;;;;;6BA1BjBA,SAAS,CAAC,GAAG,CAAC,WAAAK,KAAA,EACdL,SAAS,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;6BAMdA,SAAS,CAAC,GAAG,CAAC,WAAAK,KAAA,EACdL,SAAS,CAAC,GAAG,CAAC;;;;;;;;;;IAtBmC,C,EAAbA,SAAS,CAAC,GAAG,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { FormState } from "./FormState.mjs";
|
|
3
|
+
export type SelectFormValues<T extends z.ZodTypeAny> = ReturnType<typeof createSelectFormValues<T>>;
|
|
4
|
+
export declare function createSelectFormValues<T extends z.ZodTypeAny>(): ((state: FormState<T>) => {
|
|
5
|
+
parsedValues: z.output<T> | undefined;
|
|
6
|
+
values: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
7
|
+
initialParsedValues: z.output<T> | undefined;
|
|
8
|
+
initialValues: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
9
|
+
}) & {
|
|
10
|
+
clearCache: () => void;
|
|
11
|
+
resultsCount: () => number;
|
|
12
|
+
resetResultsCount: () => void;
|
|
13
|
+
} & {
|
|
14
|
+
resultFunc: (resultFuncArgs_0: unknown extends import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined, resultFuncArgs_1: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined, resultFuncArgs_2: unknown extends import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined, resultFuncArgs_3: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined) => {
|
|
15
|
+
parsedValues: z.output<T> | undefined;
|
|
16
|
+
values: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
17
|
+
initialParsedValues: z.output<T> | undefined;
|
|
18
|
+
initialValues: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
19
|
+
};
|
|
20
|
+
memoizedResultFunc: ((resultFuncArgs_0: unknown extends import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined, resultFuncArgs_1: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined, resultFuncArgs_2: unknown extends import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined, resultFuncArgs_3: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined) => {
|
|
21
|
+
parsedValues: z.output<T> | undefined;
|
|
22
|
+
values: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
23
|
+
initialParsedValues: z.output<T> | undefined;
|
|
24
|
+
initialValues: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
25
|
+
}) & {
|
|
26
|
+
clearCache: () => void;
|
|
27
|
+
resultsCount: () => number;
|
|
28
|
+
resetResultsCount: () => void;
|
|
29
|
+
};
|
|
30
|
+
lastResult: () => {
|
|
31
|
+
parsedValues: z.output<T> | undefined;
|
|
32
|
+
values: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
33
|
+
initialParsedValues: z.output<T> | undefined;
|
|
34
|
+
initialValues: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
35
|
+
};
|
|
36
|
+
dependencies: [(state: FormState<T>) => import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined, (state: FormState<T>) => z.output<T> | undefined, (state: FormState<T>) => import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined, (state: FormState<T>) => z.output<T> | undefined];
|
|
37
|
+
recomputations: () => number;
|
|
38
|
+
resetRecomputations: () => void;
|
|
39
|
+
dependencyRecomputations: () => number;
|
|
40
|
+
resetDependencyRecomputations: () => void;
|
|
41
|
+
} & {
|
|
42
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
43
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=createSelectFormValues.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSelectFormValues.d.mts","names":["z","FormState","SelectFormValues","ZodTypeAny","ReturnType","createSelectFormValues","T","state","DeepPartial","input","output"],"sources":["src/createSelectFormValues.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AAEnB,SAASC,SAAS;AAElB,OAAM,KAAMC,gBAAgB,CAAC,UAAUF,CAAC,CAACG,UAAU,IAAIC,UAAU,CAC/D,OAAOC,sBAAsB,CAACC,CAAC,CAAC,CACjC;AAED,wBAAgBD,sBAAsB,CAAC,UAAUL,CAAC,CAACG,UAAU,CAAAE,CAAA,KAAAE,KAAA,EAAAN,SAAA,CAAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAGzCL,SAAS,CAACK,CAAC,CAAC,sCAAAE,WAAA,CAAAR,CAAA,CAAAS,KAAA,CAAAH,CAAA,iBAAAC,KAAA,EADNN,SAAS,CAACK,CAAC,CAAC,KAAAN,CAAA,CAAAU,MAAA,CAAAJ,CAAA,gBAAAC,KAAA,EAGXN,SAAS,CAACK,CAAC,CAAC,sCAAAE,WAAA,CAAAR,CAAA,CAAAS,KAAA,CAAAH,CAAA,iBAAAC,KAAA,EADNN,SAAS,CAACK,CAAC,CAAC,KAAAN,CAAA,CAAAU,MAAA,CAAAJ,CAAA","ignoreList":[]}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
import { FormState } from
|
|
2
|
+
import { FormState } from "./FormState.js";
|
|
3
3
|
export type SelectFormValues<T extends z.ZodTypeAny> = ReturnType<typeof createSelectFormValues<T>>;
|
|
4
4
|
export declare function createSelectFormValues<T extends z.ZodTypeAny>(): ((state: FormState<T>) => {
|
|
5
|
+
parsedValues: z.output<T> | undefined;
|
|
6
|
+
values: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
7
|
+
initialParsedValues: z.output<T> | undefined;
|
|
8
|
+
initialValues: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
9
|
+
}) & {
|
|
10
|
+
clearCache: () => void;
|
|
11
|
+
resultsCount: () => number;
|
|
12
|
+
resetResultsCount: () => void;
|
|
13
|
+
} & {
|
|
14
|
+
resultFunc: (resultFuncArgs_0: unknown extends import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined, resultFuncArgs_1: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined, resultFuncArgs_2: unknown extends import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined, resultFuncArgs_3: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined) => {
|
|
5
15
|
parsedValues: z.output<T> | undefined;
|
|
6
|
-
values: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
16
|
+
values: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
7
17
|
initialParsedValues: z.output<T> | undefined;
|
|
8
|
-
initialValues: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
9
|
-
}
|
|
18
|
+
initialValues: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
19
|
+
};
|
|
20
|
+
memoizedResultFunc: ((resultFuncArgs_0: unknown extends import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined, resultFuncArgs_1: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined, resultFuncArgs_2: unknown extends import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined, resultFuncArgs_3: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined) => {
|
|
21
|
+
parsedValues: z.output<T> | undefined;
|
|
22
|
+
values: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
23
|
+
initialParsedValues: z.output<T> | undefined;
|
|
24
|
+
initialValues: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
25
|
+
}) & {
|
|
10
26
|
clearCache: () => void;
|
|
11
27
|
resultsCount: () => number;
|
|
12
28
|
resetResultsCount: () => void;
|
|
29
|
+
};
|
|
30
|
+
lastResult: () => {
|
|
31
|
+
parsedValues: z.output<T> | undefined;
|
|
32
|
+
values: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
33
|
+
initialParsedValues: z.output<T> | undefined;
|
|
34
|
+
initialValues: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
35
|
+
};
|
|
36
|
+
dependencies: [(state: FormState<T>) => import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined, (state: FormState<T>) => z.output<T> | undefined, (state: FormState<T>) => import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined, (state: FormState<T>) => z.output<T> | undefined];
|
|
37
|
+
recomputations: () => number;
|
|
38
|
+
resetRecomputations: () => void;
|
|
39
|
+
dependencyRecomputations: () => number;
|
|
40
|
+
resetDependencyRecomputations: () => void;
|
|
13
41
|
} & {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
values: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
17
|
-
initialParsedValues: z.output<T> | undefined;
|
|
18
|
-
initialValues: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
19
|
-
};
|
|
20
|
-
memoizedResultFunc: ((resultFuncArgs_0: unknown extends import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined, resultFuncArgs_1: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined, resultFuncArgs_2: unknown extends import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined ? [import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined] extends [null] ? import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined : any : import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined, resultFuncArgs_3: unknown extends z.output<T> | undefined ? [z.output<T> | undefined] extends [null] ? z.output<T> | undefined : any : z.output<T> | undefined) => {
|
|
21
|
-
parsedValues: z.output<T> | undefined;
|
|
22
|
-
values: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
23
|
-
initialParsedValues: z.output<T> | undefined;
|
|
24
|
-
initialValues: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
25
|
-
}) & {
|
|
26
|
-
clearCache: () => void;
|
|
27
|
-
resultsCount: () => number;
|
|
28
|
-
resetResultsCount: () => void;
|
|
29
|
-
};
|
|
30
|
-
lastResult: () => {
|
|
31
|
-
parsedValues: z.output<T> | undefined;
|
|
32
|
-
values: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
33
|
-
initialParsedValues: z.output<T> | undefined;
|
|
34
|
-
initialValues: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
35
|
-
};
|
|
36
|
-
dependencies: [(state: FormState<T>) => import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined, (state: FormState<T>) => z.output<T> | undefined, (state: FormState<T>) => import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined, (state: FormState<T>) => z.output<T> | undefined];
|
|
37
|
-
recomputations: () => number;
|
|
38
|
-
resetRecomputations: () => void;
|
|
39
|
-
dependencyRecomputations: () => number;
|
|
40
|
-
resetDependencyRecomputations: () => void;
|
|
41
|
-
} & {
|
|
42
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
43
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
42
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
43
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
44
44
|
};
|
|
45
45
|
//# sourceMappingURL=createSelectFormValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSelectFormValues.d.ts","
|
|
1
|
+
{"version":3,"file":"createSelectFormValues.d.ts","names":["z","FormState","SelectFormValues","ZodTypeAny","ReturnType","createSelectFormValues","T","state","DeepPartial","input","output"],"sources":["src/createSelectFormValues.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AAEnB,SAASC,SAAS;AAElB,OAAM,KAAMC,gBAAgB,CAAC,UAAUF,CAAC,CAACG,UAAU,IAAIC,UAAU,CAC/D,OAAOC,sBAAsB,CAACC,CAAC,CAAC,CACjC;AAED,wBAAgBD,sBAAsB,CAAC,UAAUL,CAAC,CAACG,UAAU,CAAAE,CAAA,KAAAE,KAAA,EAAAN,SAAA,CAAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAGzCL,SAAS,CAACK,CAAC,CAAC,qCAAAE,WAAA,CAAAR,CAAA,CAAAS,KAAA,CAAAH,CAAA,iBAAAC,KAAA,EADNN,SAAS,CAACK,CAAC,CAAC,KAAAN,CAAA,CAAAU,MAAA,CAAAJ,CAAA,gBAAAC,KAAA,EAGXN,SAAS,CAACK,CAAC,CAAC,qCAAAE,WAAA,CAAAR,CAAA,CAAAS,KAAA,CAAAH,CAAA,iBAAAC,KAAA,EADNN,SAAS,CAACK,CAAC,CAAC,KAAAN,CAAA,CAAAU,MAAA,CAAAJ,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { FieldPath } from "./FieldPath.mjs";
|
|
3
|
+
import { TypedUseField } from "./useField.mjs";
|
|
4
|
+
import { TypedUseHtmlField } from "./useHtmlField.mjs";
|
|
5
|
+
import { useFormStatus } from "./useFormStatus.mjs";
|
|
6
|
+
import { TypedUseArrayField } from "./useArrayField.mjs";
|
|
7
|
+
export type ZodForm<T extends z.ZodTypeAny> = ReturnType<typeof createZodForm<T>>;
|
|
8
|
+
export declare function createZodForm<T extends z.ZodTypeAny>({
|
|
9
|
+
schema
|
|
10
|
+
}: {
|
|
11
|
+
schema: T;
|
|
12
|
+
}): {
|
|
13
|
+
root: FieldPath<T>;
|
|
14
|
+
get: {
|
|
15
|
+
<Path extends import("./util/PathInSchema.mjs").PathInSchema<T>>(path: Path): import("./util/SchemaAt.mjs").SchemaAt<T, Path> extends never ? never : FieldPath<import("./util/SchemaAt.mjs").SchemaAt<T, Path>>;
|
|
16
|
+
<Pathstring extends import("./util/PathInSchema.mjs").PathstringInSchema<T>>(path: Pathstring): FieldPath<import("./util/SchemaAt.mjs").SchemaAt<T, import("./util/parsePathstring.mjs").parsePathstring<Pathstring, false>>>;
|
|
17
|
+
};
|
|
18
|
+
FormProvider: {
|
|
19
|
+
({
|
|
20
|
+
children
|
|
21
|
+
}: {
|
|
22
|
+
children: React.ReactElement;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
propTypes: {
|
|
25
|
+
children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
useFormContext: () => import("./FormContext.mjs").FormContextProps<T>;
|
|
29
|
+
useFormStatus: typeof useFormStatus;
|
|
30
|
+
useFormValues: () => {
|
|
31
|
+
parsedValues: z.output<T> | undefined;
|
|
32
|
+
values: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
33
|
+
initialParsedValues: z.output<T> | undefined;
|
|
34
|
+
initialValues: import("./util/DeepPartial.mjs").DeepPartial<z.input<T>> | undefined;
|
|
35
|
+
};
|
|
36
|
+
useInitialize: (options: Omit<import("./actions/initialize.mjs").InitializeAction<T>, "type">, deps?: import("react").DependencyList) => void;
|
|
37
|
+
useSubmit: (handlers?: import("./actions/addHandlers.mjs").Handlers<T> | undefined) => (e: React.FormEvent) => void;
|
|
38
|
+
useArrayField: TypedUseArrayField<T>;
|
|
39
|
+
useField: TypedUseField<T>;
|
|
40
|
+
useHtmlField: TypedUseHtmlField<T>;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=createZodForm.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createZodForm.d.mts","names":["z","FieldPath","TypedUseField","TypedUseHtmlField","useFormStatus","TypedUseArrayField","ZodForm","ZodTypeAny","ReturnType","createZodForm","T","schema"],"sources":["src/createZodForm.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AAEnB,SAASC,SAAS;AAElB,SAAmBC,aAAa;AAChC,SAAuBC,iBAAiB;AAExC,SAASC,aAAa;AAOtB,SAASC,kBAAkB;AAE3B,OAAM,KAAMC,OAAO,CAAC,UAAUN,CAAC,CAACO,UAAU,IAAIC,UAAU,CACtD,OAAOC,aAAa,CAACC,CAAC,CAAC,CACxB;AAED,wBAAgBD,aAAa,CAAC,UAAUT,CAAC,CAACO,UAAU,CAAAE,CAAE;EACpDE;CACD,EAAE;EACDA,MAAM,EAAED,CAAC;CACV;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BmCL,kBAAkB,CAACK,CAAC,CAAC;YAC/BR,aAAa,CAACQ,CAAC,CAAC;gBACRP,iBAAiB,CAACO,CAAC,CAAC","ignoreList":[]}
|
package/createZodForm.d.ts
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
import { FieldPath } from
|
|
3
|
-
import { TypedUseField } from
|
|
4
|
-
import { TypedUseHtmlField } from
|
|
5
|
-
import { useFormStatus } from
|
|
6
|
-
import { TypedUseArrayField } from
|
|
2
|
+
import { FieldPath } from "./FieldPath.js";
|
|
3
|
+
import { TypedUseField } from "./useField.js";
|
|
4
|
+
import { TypedUseHtmlField } from "./useHtmlField.js";
|
|
5
|
+
import { useFormStatus } from "./useFormStatus.js";
|
|
6
|
+
import { TypedUseArrayField } from "./useArrayField.js";
|
|
7
7
|
export type ZodForm<T extends z.ZodTypeAny> = ReturnType<typeof createZodForm<T>>;
|
|
8
|
-
export declare function createZodForm<T extends z.ZodTypeAny>({
|
|
9
|
-
|
|
8
|
+
export declare function createZodForm<T extends z.ZodTypeAny>({
|
|
9
|
+
schema
|
|
10
|
+
}: {
|
|
11
|
+
schema: T;
|
|
10
12
|
}): {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
root: FieldPath<T>;
|
|
14
|
+
get: {
|
|
15
|
+
<Path extends import("./util/PathInSchema.js").PathInSchema<T>>(path: Path): import("./util/SchemaAt.js").SchemaAt<T, Path> extends never ? never : FieldPath<import("./util/SchemaAt.js").SchemaAt<T, Path>>;
|
|
16
|
+
<Pathstring extends import("./util/PathInSchema.js").PathstringInSchema<T>>(path: Pathstring): FieldPath<import("./util/SchemaAt.js").SchemaAt<T, import("./util/parsePathstring.js").parsePathstring<Pathstring, false>>>;
|
|
17
|
+
};
|
|
18
|
+
FormProvider: {
|
|
19
|
+
({
|
|
20
|
+
children
|
|
21
|
+
}: {
|
|
22
|
+
children: React.ReactElement;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
propTypes: {
|
|
25
|
+
children: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
15
26
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
initialValues: import("./util/DeepPartial").DeepPartial<z.input<T>> | undefined;
|
|
31
|
-
};
|
|
32
|
-
useInitialize: (options: Omit<import("./actions/initialize").InitializeAction<T>, "type">, deps?: import("react").DependencyList) => void;
|
|
33
|
-
useSubmit: (handlers?: import("./actions/addHandlers").Handlers<T> | undefined) => (e: React.FormEvent) => void;
|
|
34
|
-
useArrayField: TypedUseArrayField<T>;
|
|
35
|
-
useField: TypedUseField<T>;
|
|
36
|
-
useHtmlField: TypedUseHtmlField<T>;
|
|
27
|
+
};
|
|
28
|
+
useFormContext: () => import("./FormContext.js").FormContextProps<T>;
|
|
29
|
+
useFormStatus: typeof useFormStatus;
|
|
30
|
+
useFormValues: () => {
|
|
31
|
+
parsedValues: z.output<T> | undefined;
|
|
32
|
+
values: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
33
|
+
initialParsedValues: z.output<T> | undefined;
|
|
34
|
+
initialValues: import("./util/DeepPartial.js").DeepPartial<z.input<T>> | undefined;
|
|
35
|
+
};
|
|
36
|
+
useInitialize: (options: Omit<import("./actions/initialize.js").InitializeAction<T>, "type">, deps?: import("react").DependencyList) => void;
|
|
37
|
+
useSubmit: (handlers?: import("./actions/addHandlers.js").Handlers<T> | undefined) => (e: React.FormEvent) => void;
|
|
38
|
+
useArrayField: TypedUseArrayField<T>;
|
|
39
|
+
useField: TypedUseField<T>;
|
|
40
|
+
useHtmlField: TypedUseHtmlField<T>;
|
|
37
41
|
};
|
|
38
42
|
//# sourceMappingURL=createZodForm.d.ts.map
|
package/createZodForm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createZodForm.d.ts","
|
|
1
|
+
{"version":3,"file":"createZodForm.d.ts","names":["z","FieldPath","TypedUseField","TypedUseHtmlField","useFormStatus","TypedUseArrayField","ZodForm","ZodTypeAny","ReturnType","createZodForm","T","schema"],"sources":["src/createZodForm.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AAEnB,SAASC,SAAS;AAElB,SAAmBC,aAAa;AAChC,SAAuBC,iBAAiB;AAExC,SAASC,aAAa;AAOtB,SAASC,kBAAkB;AAE3B,OAAM,KAAMC,OAAO,CAAC,UAAUN,CAAC,CAACO,UAAU,IAAIC,UAAU,CACtD,OAAOC,aAAa,CAACC,CAAC,CAAC,CACxB;AAED,wBAAgBD,aAAa,CAAC,UAAUT,CAAC,CAACO,UAAU,CAAAE,CAAE;EACpDE;CACD,EAAE;EACDA,MAAM,EAAED,CAAC;CACV;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BmCL,kBAAkB,CAACK,CAAC,CAAC;YAC/BR,aAAa,CAACQ,CAAC,CAAC;gBACRP,iBAAiB,CAACO,CAAC,CAAC","ignoreList":[]}
|
package/index.d.mts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { createZodForm, type ZodForm } from "./createZodForm.mjs";
|
|
2
|
+
export { type FieldMeta, type SubmitHandler, type SubmitSuccededHandler, type SubmitFailedHandler } from "./FormState.mjs";
|
|
3
|
+
export { FieldPath, type FieldPathForParsedValue, type FieldPathForValue } from "./FieldPath.mjs";
|
|
4
|
+
export { useField, type UseFieldProps, type TypedUseField } from "./useField.mjs";
|
|
5
|
+
export { useArrayField, type UseArrayFieldProps, type TypedUseArrayField } from "./useArrayField.mjs";
|
|
6
|
+
export { type FormContextProps } from "./FormContext.mjs";
|
|
7
|
+
export { useFormContext } from "./useFormContext.mjs";
|
|
8
|
+
export { type FormStatus } from "./createSelectFormStatus.mjs";
|
|
9
|
+
export { useFormStatus } from "./useFormStatus.mjs";
|
|
10
|
+
export { useFormValues } from "./useFormValues.mjs";
|
|
11
|
+
export { useHtmlField, type TypedUseHtmlField, type UseHtmlFieldOptions, type UseHtmlFieldProps, type HtmlFieldInputProps, type ValidUseHtmlFieldProps } from "./useHtmlField.mjs";
|
|
12
|
+
export { useInitialize } from "./useInitialize.mjs";
|
|
13
|
+
export { useSubmit } from "./useSubmit.mjs";
|
|
14
|
+
export { conditionalValidate, ConditionalValidator } from "./ConditionalValidator.mjs";
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
package/index.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["createZodForm","ZodForm","FieldMeta","SubmitHandler","SubmitSuccededHandler","SubmitFailedHandler","FieldPath","FieldPathForParsedValue","FieldPathForValue","useField","UseFieldProps","TypedUseField","useArrayField","UseArrayFieldProps","TypedUseArrayField","FormContextProps","useFormContext","FormStatus","useFormStatus","useFormValues","useHtmlField","TypedUseHtmlField","UseHtmlFieldOptions","UseHtmlFieldProps","HtmlFieldInputProps","ValidUseHtmlFieldProps","useInitialize","useSubmit","conditionalValidate","ConditionalValidator"],"sources":["src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAa,EAAE,KAAKC,OAAO;AACpC,SACE,KAAKC,SAAS,EACd,KAAKC,aAAa,EAClB,KAAKC,qBAAqB,EAC1B,KAAKC,mBAAmB;AAE1B,SACEC,SAAS,EACT,KAAKC,uBAAuB,EAC5B,KAAKC,iBAAiB;AAExB,SAASC,QAAQ,EAAE,KAAKC,aAAa,EAAE,KAAKC,aAAa;AACzD,SACEC,aAAa,EACb,KAAKC,kBAAkB,EACvB,KAAKC,kBAAkB;AAEzB,SAAS,KAAKC,gBAAgB;AAC9B,SAASC,cAAc;AACvB,SAAS,KAAKC,UAAU;AACxB,SAASC,aAAa;AACtB,SAASC,aAAa;AACtB,SACEC,YAAY,EACZ,KAAKC,iBAAiB,EACtB,KAAKC,mBAAmB,EACxB,KAAKC,iBAAiB,EACtB,KAAKC,mBAAmB,EACxB,KAAKC,sBAAsB;AAE7B,SAASC,aAAa;AACtB,SAASC,SAAS;AAClB,SACEC,mBAAmB,EACnBC,oBAAoB","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { createZodForm, type ZodForm } from
|
|
2
|
-
export { type FieldMeta, type SubmitHandler, type SubmitSuccededHandler, type SubmitFailedHandler
|
|
3
|
-
export { FieldPath, type FieldPathForParsedValue, type FieldPathForValue
|
|
4
|
-
export { useField, type UseFieldProps, type TypedUseField } from
|
|
5
|
-
export { useArrayField, type UseArrayFieldProps, type TypedUseArrayField
|
|
6
|
-
export { type FormContextProps } from
|
|
7
|
-
export { useFormContext } from
|
|
8
|
-
export { type FormStatus } from
|
|
9
|
-
export { useFormStatus } from
|
|
10
|
-
export { useFormValues } from
|
|
11
|
-
export { useHtmlField, type TypedUseHtmlField, type UseHtmlFieldOptions, type UseHtmlFieldProps, type HtmlFieldInputProps, type ValidUseHtmlFieldProps
|
|
12
|
-
export { useInitialize } from
|
|
13
|
-
export { useSubmit } from
|
|
14
|
-
export { conditionalValidate, ConditionalValidator
|
|
1
|
+
export { createZodForm, type ZodForm } from "./createZodForm.js";
|
|
2
|
+
export { type FieldMeta, type SubmitHandler, type SubmitSuccededHandler, type SubmitFailedHandler } from "./FormState.js";
|
|
3
|
+
export { FieldPath, type FieldPathForParsedValue, type FieldPathForValue } from "./FieldPath.js";
|
|
4
|
+
export { useField, type UseFieldProps, type TypedUseField } from "./useField.js";
|
|
5
|
+
export { useArrayField, type UseArrayFieldProps, type TypedUseArrayField } from "./useArrayField.js";
|
|
6
|
+
export { type FormContextProps } from "./FormContext.js";
|
|
7
|
+
export { useFormContext } from "./useFormContext.js";
|
|
8
|
+
export { type FormStatus } from "./createSelectFormStatus.js";
|
|
9
|
+
export { useFormStatus } from "./useFormStatus.js";
|
|
10
|
+
export { useFormValues } from "./useFormValues.js";
|
|
11
|
+
export { useHtmlField, type TypedUseHtmlField, type UseHtmlFieldOptions, type UseHtmlFieldProps, type HtmlFieldInputProps, type ValidUseHtmlFieldProps } from "./useHtmlField.js";
|
|
12
|
+
export { useInitialize } from "./useInitialize.js";
|
|
13
|
+
export { useSubmit } from "./useSubmit.js";
|
|
14
|
+
export { conditionalValidate, ConditionalValidator } from "./ConditionalValidator.js";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["createZodForm","ZodForm","FieldMeta","SubmitHandler","SubmitSuccededHandler","SubmitFailedHandler","FieldPath","FieldPathForParsedValue","FieldPathForValue","useField","UseFieldProps","TypedUseField","useArrayField","UseArrayFieldProps","TypedUseArrayField","FormContextProps","useFormContext","FormStatus","useFormStatus","useFormValues","useHtmlField","TypedUseHtmlField","UseHtmlFieldOptions","UseHtmlFieldProps","HtmlFieldInputProps","ValidUseHtmlFieldProps","useInitialize","useSubmit","conditionalValidate","ConditionalValidator"],"sources":["src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAa,EAAE,KAAKC,OAAO;AACpC,SACE,KAAKC,SAAS,EACd,KAAKC,aAAa,EAClB,KAAKC,qBAAqB,EAC1B,KAAKC,mBAAmB;AAE1B,SACEC,SAAS,EACT,KAAKC,uBAAuB,EAC5B,KAAKC,iBAAiB;AAExB,SAASC,QAAQ,EAAE,KAAKC,aAAa,EAAE,KAAKC,aAAa;AACzD,SACEC,aAAa,EACb,KAAKC,kBAAkB,EACvB,KAAKC,kBAAkB;AAEzB,SAAS,KAAKC,gBAAgB;AAC9B,SAASC,cAAc;AACvB,SAAS,KAAKC,UAAU;AACxB,SAASC,aAAa;AACtB,SAASC,aAAa;AACtB,SACEC,YAAY,EACZ,KAAKC,iBAAiB,EACtB,KAAKC,mBAAmB,EACxB,KAAKC,iBAAiB,EACtB,KAAKC,mBAAmB,EACxB,KAAKC,sBAAsB;AAE7B,SAASC,aAAa;AACtB,SAASC,SAAS;AAClB,SACEC,mBAAmB,EACnBC,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initFormState.d.mts","names":["z","FormState","initFormState","ZodTypeAny","T"],"sources":["src/initFormState.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AACnB,SAASC,SAAS;AAElB,wBAAgBC,aAAa,CAAC,UAAUF,CAAC,CAACG,UAAU,CAAAD,CAAA,GAAKD,SAAS,CAACG,CAAC,CAAC","ignoreList":[]}
|
package/initFormState.d.ts
CHANGED
package/initFormState.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initFormState.d.ts","
|
|
1
|
+
{"version":3,"file":"initFormState.d.ts","names":["z","FormState","initFormState","ZodTypeAny","T"],"sources":["src/initFormState.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AACnB,SAASC,SAAS;AAElB,wBAAgBC,aAAa,CAAC,UAAUF,CAAC,CAACG,UAAU,CAAAD,CAAA,GAAKD,SAAS,CAACG,CAAC,CAAC","ignoreList":[]}
|