@bombillazo/rhf-plus 7.56.4-plus.0 → 7.57.0-plus.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,EACX,YAAY,EAgBZ,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAuDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd,kBAAkB,GAAG,YAAY,EACjC,SAAS,SAAS,YAAY,GAAG,GAAG,EAEpC,KAAK,GAAE,YAAY,CACjB,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,SAAS,CACL,GACL,IAAI,CACL,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,CAAC,EACpE,WAAW,CACZ,GAAG;IACF,WAAW,EAAE,IAAI,CACf,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,CAAC,EACpE,WAAW,CACZ,CAAC;CACH,CA09CA"}
1
+ {"version":3,"file":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,EAaL,WAAW,EACX,YAAY,EAgBZ,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAuDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd,kBAAkB,GAAG,YAAY,EACjC,SAAS,SAAS,YAAY,GAAG,GAAG,EAEpC,KAAK,GAAE,YAAY,CACjB,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,SAAS,CACL,GACL,IAAI,CACL,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,CAAC,EACpE,WAAW,CACZ,GAAG;IACF,WAAW,EAAE,IAAI,CACf,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,CAAC,EACpE,WAAW,CACZ,CAAC;CACH,CA29CA"}
@@ -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"}
@@ -542,6 +542,12 @@ function schemaErrorLookup(errors, _fields, name) {
542
542
  error: foundError,
543
543
  };
544
544
  }
545
+ if (foundError && foundError.root && foundError.root.type) {
546
+ return {
547
+ name: `${fieldName}.root`,
548
+ error: foundError.root,
549
+ };
550
+ }
545
551
  names.pop();
546
552
  }
547
553
  return {
@@ -1168,7 +1174,7 @@ function createFormControl(props = {}) {
1168
1174
  return;
1169
1175
  }
1170
1176
  const fieldValue = value[fieldKey];
1171
- const fieldName = `${name}.${fieldKey}`;
1177
+ const fieldName = name + '.' + fieldKey;
1172
1178
  const field = get(_fields, fieldName);
1173
1179
  (_names.array.has(name) ||
1174
1180
  isObject(fieldValue) ||
@@ -1810,6 +1816,7 @@ function createFormControl(props = {}) {
1810
1816
  setError,
1811
1817
  _subscribe,
1812
1818
  _runSchema,
1819
+ _focusError,
1813
1820
  _getWatch,
1814
1821
  _getDirty,
1815
1822
  _setValid,