react-hook-form 7.19.5 → 7.20.3

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.
@@ -1,2 +1,3 @@
1
1
  import { FieldValues, Names } from '../types';
2
- export declare function generateWatchOutput(names: string | string[] | undefined, _names: Names, formValues?: FieldValues, isGlobal?: boolean): any;
2
+ declare const _default: (names: string | string[] | undefined, _names: Names, formValues?: FieldValues | undefined, isGlobal?: boolean | undefined) => any;
3
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: <T>(defaultValues: T, formValues: T) => any;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { InternalFieldName, Names } from '../types';
2
+ declare const _default: (name: InternalFieldName, _names: Names, isBlurEvent?: boolean | undefined) => boolean;
3
+ export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: <T extends string | string[] | undefined>(name?: T | undefined, signalName?: string | undefined) => boolean;
1
+ declare const _default: <T extends string | string[] | undefined>(name?: T | undefined, signalName?: string | undefined, exact?: boolean | undefined) => boolean;
2
2
  export default _default;
@@ -164,7 +164,7 @@ export declare type Control<TFieldValues extends FieldValues = FieldValues, TCon
164
164
  action: boolean;
165
165
  watch: boolean;
166
166
  };
167
- _options: Pick<UseFormProps<TFieldValues, TContext>, 'shouldUnregister'>;
167
+ _options: UseFormProps<TFieldValues, TContext>;
168
168
  _getDirty: GetIsDirty;
169
169
  _formState: FormState<TFieldValues>;
170
170
  _updateValid: Noop;
@@ -206,6 +206,7 @@ export declare type UseFormStateProps<TFieldValues> = Partial<{
206
206
  control?: Control<TFieldValues>;
207
207
  disabled?: boolean;
208
208
  name?: FieldPath<TFieldValues> | FieldPath<TFieldValues>[] | readonly FieldPath<TFieldValues>[];
209
+ exact?: boolean;
209
210
  }>;
210
211
  export declare type UseFormStateReturn<TFieldValues> = FormState<TFieldValues>;
211
212
  export declare type UseWatchProps<TFieldValues extends FieldValues = FieldValues> = {
@@ -213,6 +214,7 @@ export declare type UseWatchProps<TFieldValues extends FieldValues = FieldValues
213
214
  disabled?: boolean;
214
215
  name?: FieldPath<TFieldValues> | FieldPath<TFieldValues>[] | readonly FieldPath<TFieldValues>[];
215
216
  control?: Control<TFieldValues>;
217
+ exact?: boolean;
216
218
  };
217
219
  export declare type FormProviderProps<TFieldValues extends FieldValues = FieldValues, TContext extends object = object> = {
218
220
  children: React.ReactNode;
@@ -3,17 +3,20 @@ export declare function useWatch<TFieldValues extends FieldValues = FieldValues>
3
3
  defaultValue?: UnpackNestedValue<DeepPartialSkipArrayKey<TFieldValues>>;
4
4
  control?: Control<TFieldValues>;
5
5
  disabled?: boolean;
6
+ exact?: boolean;
6
7
  }): UnpackNestedValue<DeepPartialSkipArrayKey<TFieldValues>>;
7
8
  export declare function useWatch<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: {
8
9
  name: TFieldName;
9
10
  defaultValue?: FieldPathValue<TFieldValues, TFieldName>;
10
11
  control?: Control<TFieldValues>;
11
12
  disabled?: boolean;
13
+ exact?: boolean;
12
14
  }): FieldPathValue<TFieldValues, TFieldName>;
13
15
  export declare function useWatch<TFieldValues extends FieldValues = FieldValues, TFieldNames extends readonly FieldPath<TFieldValues>[] = readonly FieldPath<TFieldValues>[]>(props: {
14
- name: TFieldNames;
16
+ name: readonly [...TFieldNames];
15
17
  defaultValue?: UnpackNestedValue<DeepPartialSkipArrayKey<TFieldValues>>;
16
18
  control?: Control<TFieldValues>;
17
19
  disabled?: boolean;
20
+ exact?: boolean;
18
21
  }): FieldPathValues<TFieldValues, TFieldNames>;
19
22
  export declare function useWatch<TFieldValues extends FieldValues = FieldValues, TFieldNames extends FieldPath<TFieldValues>[] = FieldPath<TFieldValues>[]>(): FieldPathValues<TFieldValues, TFieldNames>;
@@ -0,0 +1,2 @@
1
+ declare const _default: <T>(data: T) => boolean;
2
+ export default _default;
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": "7.19.5",
4
+ "version": "7.20.3",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "umd:main": "dist/index.umd.js",
@@ -67,42 +67,42 @@
67
67
  "devDependencies": {
68
68
  "@rollup/plugin-commonjs": "^21.0.1",
69
69
  "@rollup/plugin-node-resolve": "^13.0.6",
70
- "@testing-library/jest-dom": "^5.14.1",
70
+ "@testing-library/jest-dom": "^5.15.0",
71
71
  "@testing-library/react": "^12.1.2",
72
72
  "@testing-library/react-hooks": "^7.0.2",
73
73
  "@testing-library/react-native": "^8.0.0",
74
74
  "@types/jest": "^27.0.2",
75
- "@types/react": "^17.0.31",
76
- "@types/react-native": "^0.65.10",
77
- "@typescript-eslint/eslint-plugin": "^5.1.0",
78
- "@typescript-eslint/parser": "^5.1.0",
75
+ "@types/react": "^17.0.34",
76
+ "@types/react-native": "^0.66.4",
77
+ "@typescript-eslint/eslint-plugin": "^5.3.1",
78
+ "@typescript-eslint/parser": "^5.3.1",
79
79
  "@vitejs/plugin-react-refresh": "^1.3.6",
80
80
  "babel-jest": "^27.3.1",
81
81
  "bundlesize": "^0.18.0",
82
- "cypress": "8.6.0",
83
- "eslint": "^8.0.1",
82
+ "cypress": "9.0.0",
83
+ "eslint": "^8.2.0",
84
84
  "eslint-config-prettier": "^8.3.0",
85
85
  "eslint-plugin-cypress": "^2.12.1",
86
86
  "eslint-plugin-prettier": "^4.0.0",
87
- "eslint-plugin-react": "^7.26.1",
88
- "eslint-plugin-react-hooks": "^4.2.0",
87
+ "eslint-plugin-react": "^7.27.0",
88
+ "eslint-plugin-react-hooks": "^4.3.0",
89
89
  "eslint-plugin-simple-import-sort": "^7.0.0",
90
90
  "husky": "^7.0.4",
91
91
  "jest": "^27.3.1",
92
- "lint-staged": "^11.2.3",
92
+ "lint-staged": "^12.0.1",
93
93
  "prettier": "^2.4.1",
94
94
  "react": "^17.0.1",
95
95
  "react-dom": "^17.0.1",
96
- "react-native": "^0.66.1",
96
+ "react-native": "^0.66.3",
97
97
  "react-test-renderer": "^17.0.1",
98
98
  "rimraf": "^3.0.2",
99
- "rollup": "^2.58.0",
99
+ "rollup": "^2.60.0",
100
100
  "rollup-plugin-peer-deps-external": "^2.2.4",
101
101
  "rollup-plugin-sourcemaps": "^0.6.2",
102
102
  "rollup-plugin-terser": "^7.0.2",
103
103
  "rollup-plugin-typescript2": "^0.30.0",
104
104
  "ts-jest": "^27.0.7",
105
- "typescript": "^4.4.4"
105
+ "typescript": "^4.5.2"
106
106
  },
107
107
  "resolutions": {
108
108
  "react-native/@jest/create-cache-key-function": "^27.0.2"
@@ -134,5 +134,7 @@
134
134
  "type": "opencollective",
135
135
  "url": "https://opencollective.com/react-hook-form"
136
136
  },
137
- "dependencies": {}
137
+ "engines": {
138
+ "node": ">=12.0"
139
+ }
138
140
  }
@@ -1,2 +0,0 @@
1
- declare const _default: <T extends U, U extends Record<string, unknown>[]>(values: T, defaultValues: U, dirtyFields: Record<string, boolean | []>[]) => Record<string, boolean | []>[];
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: <T>(ref: T, name: string) => any;
2
- export default _default;