react-hook-form 8.0.0-alpha.1 → 8.0.0-alpha.2
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/README.md +10 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.mjs +183 -91
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/logic/createFormControl.d.ts.map +1 -1
- package/dist/logic/focusFieldBy.d.ts.map +1 -1
- package/dist/logic/getResolverOptions.d.ts +1 -1
- package/dist/logic/shouldRenderFormState.d.ts.map +1 -1
- package/dist/types/fieldArray.d.ts +1 -1
- package/dist/types/validator.d.ts +1 -1
- package/dist/types/validator.d.ts.map +1 -1
- package/dist/useFieldArray.d.ts.map +1 -1
- package/dist/useFormContext.d.ts.map +1 -1
- package/dist/utils/unset.d.ts.map +1 -1
- package/package.json +17 -17
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,EAYL,WAAW,EAcX,YAAY,EAIZ,aAAa,EASd,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,EAYL,WAAW,EAcX,YAAY,EAIZ,aAAa,EASd,MAAM,UAAU,CAAC;AAgDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EAEd,KAAK,GAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAM,GAC/C,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,CA8nC1D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"focusFieldBy.d.ts","sourceRoot":"","sources":["../../src/logic/focusFieldBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"focusFieldBy.d.ts","sourceRoot":"","sources":["../../src/logic/focusFieldBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AAKxD,QAAA,MAAM,YAAY,WACR,SAAS,mBACA,MAAM,KAAK,OAAO,2DAqBpC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -23,7 +23,7 @@ declare const _default: <TFieldValues>(fieldsNames: Set<InternalFieldName> | Int
|
|
23
23
|
onChange?: ((event: any) => void) | undefined;
|
24
24
|
onBlur?: ((event: any) => void) | undefined;
|
25
25
|
disabled: boolean;
|
26
|
-
deps: string[];
|
26
|
+
deps: string | string[];
|
27
27
|
}>>;
|
28
28
|
shouldUseNativeValidation: boolean | undefined;
|
29
29
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shouldRenderFormState.d.ts","sourceRoot":"","sources":["../../src/logic/shouldRenderFormState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;;
|
1
|
+
{"version":3,"file":"shouldRenderFormState.d.ts","sourceRoot":"","sources":["../../src/logic/shouldRenderFormState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;;AAGzC,wBAgBE"}
|
@@ -158,7 +158,7 @@ export declare type UseFieldArrayInsert<TFieldValues, TFieldArrayName extends Pa
|
|
158
158
|
*/
|
159
159
|
declare type UseFieldArrayUpdate<TFieldValues, TFieldArrayName extends PathString> = (index: number, value: FieldArray<TFieldValues, TFieldArrayName>) => void;
|
160
160
|
/**
|
161
|
-
*
|
161
|
+
* Replace the entire field array values.
|
162
162
|
*
|
163
163
|
* @remarks
|
164
164
|
* [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d)
|
@@ -25,6 +25,6 @@ export declare type RegisterOptions<TFieldValues extends FieldValues = FieldValu
|
|
25
25
|
onChange?: (event: any) => void;
|
26
26
|
onBlur?: (event: any) => void;
|
27
27
|
disabled: boolean;
|
28
|
-
deps: InternalFieldName[];
|
28
|
+
deps: InternalFieldName | InternalFieldName[];
|
29
29
|
}>;
|
30
30
|
//# sourceMappingURL=validator.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/types/validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpD,oBAAY,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjE,oBAAY,cAAc,CACxB,gBAAgB,SAAS,eAAe,GAAG,eAAe,IACxD,gBAAgB,GAAG,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;AAEhE,oBAAY,sBAAsB,CAChC,gBAAgB,SAAS,eAAe,GAAG,eAAe,IACxD;IACF,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,oBAAY,cAAc,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvE,oBAAY,QAAQ,CAAC,WAAW,IAAI,CAClC,KAAK,EAAE,WAAW,KACf,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE9C,oBAAY,eAAe,CACzB,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,UAAU,SAAS,UAAU,GAAG,KAAK,IACnC,OAAO,CAAC;IACV,QAAQ,EAAE,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC5C,GAAG,EAAE,c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AE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,iBAAiB,GAAG,iBAAiB,EAAE,CAAC;CAC/C,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFieldArray.d.ts","sourceRoot":"","sources":["../src/useFieldArray.ts"],"names":[],"mappings":"AAkBA,OAAO,EAML,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,aAAa,CAC3B,YAAY,SAAS,WAAW,EAChC,eAAe,SAAS,UAAU,EAElC,KAAK,EAAE,kBAAkB,CAAC,YAAY,EAAE,eAAe,CAAC,GACvD,mBAAmB,CAAC,YAAY,EAAE,eAAe,CAAC,
|
1
|
+
{"version":3,"file":"useFieldArray.d.ts","sourceRoot":"","sources":["../src/useFieldArray.ts"],"names":[],"mappings":"AAkBA,OAAO,EAML,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,aAAa,CAC3B,YAAY,SAAS,WAAW,EAChC,eAAe,SAAS,UAAU,EAElC,KAAK,EAAE,kBAAkB,CAAC,YAAY,EAAE,eAAe,CAAC,GACvD,mBAAmB,CAAC,YAAY,EAAE,eAAe,CAAC,CAsQpD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFormContext.d.ts","sourceRoot":"","sources":["../src/useFormContext.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useFormContext.d.ts","sourceRoot":"","sources":["../src/useFormContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,cAAc,0EAGkD,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,YAAY,qHASxB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"unset.d.ts","sourceRoot":"","sources":["../../src/utils/unset.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"unset.d.ts","sourceRoot":"","sources":["../../src/utils/unset.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,OAuCtD"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-hook-form",
|
3
3
|
"description": "Performant, flexible and extensible forms library for React Hooks",
|
4
|
-
"version": "8.0.0-alpha.
|
4
|
+
"version": "8.0.0-alpha.2",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.esm.mjs",
|
7
7
|
"umd:main": "dist/index.umd.js",
|
@@ -10,7 +10,7 @@
|
|
10
10
|
"jsnext:main": "dist/index.esm.mjs",
|
11
11
|
"source": "src/index.ts",
|
12
12
|
"types": "dist/index.d.ts",
|
13
|
-
"sideEffects":
|
13
|
+
"sideEffects": false,
|
14
14
|
"files": [
|
15
15
|
"dist",
|
16
16
|
"dist/__tests__"
|
@@ -70,45 +70,45 @@
|
|
70
70
|
"license": "MIT",
|
71
71
|
"devDependencies": {
|
72
72
|
"@microsoft/api-extractor": "^7.19.4",
|
73
|
-
"@rollup/plugin-commonjs": "^21.0.
|
73
|
+
"@rollup/plugin-commonjs": "^21.0.2",
|
74
74
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
75
75
|
"@testing-library/jest-dom": "^5.16.2",
|
76
76
|
"@testing-library/react": "13.0.0-alpha.5",
|
77
77
|
"@testing-library/react-hooks": "8.0.0-alpha.1",
|
78
78
|
"@testing-library/react-native": "^9.0.0",
|
79
|
-
"@types/jest": "^27.4.
|
80
|
-
"@types/react": "^17.0.
|
81
|
-
"@types/react-native": "^0.
|
82
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
83
|
-
"@typescript-eslint/parser": "^5.
|
79
|
+
"@types/jest": "^27.4.1",
|
80
|
+
"@types/react": "^17.0.40",
|
81
|
+
"@types/react-native": "^0.67.2",
|
82
|
+
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
83
|
+
"@typescript-eslint/parser": "^5.14.0",
|
84
84
|
"@vitejs/plugin-react-refresh": "^1.3.6",
|
85
|
-
"babel-jest": "^27.
|
85
|
+
"babel-jest": "^27.5.1",
|
86
86
|
"bundlesize": "^0.18.0",
|
87
87
|
"cypress": "9.4.1",
|
88
|
-
"eslint": "^8.
|
89
|
-
"eslint-config-prettier": "^8.
|
88
|
+
"eslint": "^8.11.0",
|
89
|
+
"eslint-config-prettier": "^8.5.0",
|
90
90
|
"eslint-plugin-cypress": "^2.12.1",
|
91
91
|
"eslint-plugin-prettier": "^4.0.0",
|
92
|
-
"eslint-plugin-react": "^7.
|
92
|
+
"eslint-plugin-react": "^7.29.3",
|
93
93
|
"eslint-plugin-react-hooks": "^4.3.0",
|
94
94
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
95
95
|
"husky": "^7.0.4",
|
96
|
-
"jest": "^27.
|
97
|
-
"lint-staged": "^12.3.
|
96
|
+
"jest": "^27.5.1",
|
97
|
+
"lint-staged": "^12.3.5",
|
98
98
|
"prettier": "^2.5.1",
|
99
99
|
"react": "18.0.0-rc.0-next-f2a59df48-20211208",
|
100
100
|
"react-dom": "18.0.0-rc.0-next-f2a59df48-20211208",
|
101
|
-
"react-native": "^0.67.
|
101
|
+
"react-native": "^0.67.3",
|
102
102
|
"react-test-renderer": "18.0.0-rc.0-next-f2a59df48-20211208",
|
103
103
|
"rimraf": "^3.0.2",
|
104
|
-
"rollup": "^2.
|
104
|
+
"rollup": "^2.70.0",
|
105
105
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
106
106
|
"rollup-plugin-sourcemaps": "^0.6.2",
|
107
107
|
"rollup-plugin-terser": "^7.0.2",
|
108
108
|
"rollup-plugin-typescript2": "^0.31.2",
|
109
109
|
"ts-jest": "^27.1.3",
|
110
110
|
"tsd": "^0.19.1",
|
111
|
-
"typescript": "^4.
|
111
|
+
"typescript": "^4.6.2"
|
112
112
|
},
|
113
113
|
"bundlesize": [
|
114
114
|
{
|