react-hook-form 7.56.4 → 7.57.0

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 +1 @@
1
- {"version":3,"file":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,EAaL,WAAW,EAgBX,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAoDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd,kBAAkB,GAAG,YAAY,EAEjC,KAAK,GAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAM,GACnE,IAAI,CACL,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EACzD,WAAW,CACZ,GAAG;IACF,WAAW,EAAE,IAAI,CACf,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EACzD,WAAW,CACZ,CAAC;CACH,CA+5CA"}
1
+ {"version":3,"file":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,EAaL,WAAW,EAgBX,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAoDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd,kBAAkB,GAAG,YAAY,EAEjC,KAAK,GAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAM,GACnE,IAAI,CACL,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EACzD,WAAW,CACZ,GAAG;IACF,WAAW,EAAE,IAAI,CACf,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EACzD,WAAW,CACZ,CAAC;CACH,CAg6CA"}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaErrorLookup.d.ts","sourceRoot":"","sources":["../../src/logic/schemaErrorLookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIhE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC3E,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EACtB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,GACX;IACD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAkCA"}
1
+ {"version":3,"file":"schemaErrorLookup.d.ts","sourceRoot":"","sources":["../../src/logic/schemaErrorLookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIhE,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC3E,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EACtB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,GACX;IACD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAyCA"}
@@ -1,3 +1,3 @@
1
- declare const _default: <T extends string | string[] | undefined>(name?: T, signalName?: string, exact?: boolean) => boolean;
1
+ declare const _default: <T extends string | readonly string[] | undefined>(name?: T, signalName?: string, exact?: boolean) => boolean;
2
2
  export default _default;
3
3
  //# sourceMappingURL=shouldSubscribeByName.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shouldSubscribeByName.d.ts","sourceRoot":"","sources":["../../src/logic/shouldSubscribeByName.ts"],"names":[],"mappings":"yBAEgB,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EACrD,OAAO,CAAC,EACR,aAAa,MAAM,EACnB,QAAQ,OAAO;AAHjB,wBAeI"}
1
+ {"version":3,"file":"shouldSubscribeByName.d.ts","sourceRoot":"","sources":["../../src/logic/shouldSubscribeByName.ts"],"names":[],"mappings":"yBAEgB,CAAC,SAAS,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,EAC9D,OAAO,CAAC,EACR,aAAa,MAAM,EACnB,QAAQ,OAAO;AAHjB,wBAeI"}
@@ -498,6 +498,12 @@ function schemaErrorLookup(errors, _fields, name) {
498
498
  error: foundError,
499
499
  };
500
500
  }
501
+ if (foundError && foundError.root && foundError.root.type) {
502
+ return {
503
+ name: `${fieldName}.root`,
504
+ error: foundError.root,
505
+ };
506
+ }
501
507
  names.pop();
502
508
  }
503
509
  return {
@@ -1121,7 +1127,7 @@ function createFormControl(props = {}) {
1121
1127
  return;
1122
1128
  }
1123
1129
  const fieldValue = value[fieldKey];
1124
- const fieldName = `${name}.${fieldKey}`;
1130
+ const fieldName = name + '.' + fieldKey;
1125
1131
  const field = get(_fields, fieldName);
1126
1132
  (_names.array.has(name) ||
1127
1133
  isObject(fieldValue) ||
@@ -1720,6 +1726,7 @@ function createFormControl(props = {}) {
1720
1726
  setError,
1721
1727
  _subscribe,
1722
1728
  _runSchema,
1729
+ _focusError,
1723
1730
  _getWatch,
1724
1731
  _getDirty,
1725
1732
  _setValid,