@paragrav/rhf-utils 0.0.22 → 0.0.26

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.
Files changed (122) hide show
  1. package/dist/_virtual/_commonjsHelpers.mjs +8 -0
  2. package/dist/_virtual/index.mjs +4 -0
  3. package/dist/devtool/LazyDevTool.d.ts +11 -0
  4. package/dist/devtool/LazyDevTool.mjs +16 -0
  5. package/dist/errors/getFlatFieldErrors.mjs +11 -11
  6. package/dist/errors/isFieldError.d.ts +7 -0
  7. package/dist/errors/isFieldError.mjs +4 -0
  8. package/dist/errors/message/FormErrorMessage.d.ts +8 -0
  9. package/dist/errors/message/FormErrorMessage.mjs +14 -0
  10. package/dist/errors/message/FormErrorMessageByPath.d.ts +9 -0
  11. package/dist/errors/message/FormErrorMessageByPath.mjs +17 -0
  12. package/dist/errors/nonfield/{utils.d.ts → isNonFieldError.d.ts} +3 -2
  13. package/dist/errors/nonfield/isNonFieldError.mjs +5 -0
  14. package/dist/errors/orphan/getOrphanFlatFieldErrors.d.ts +5 -0
  15. package/dist/errors/orphan/{utils.mjs → getOrphanFlatFieldErrors.mjs} +7 -7
  16. package/dist/errors/orphan/useFormHasOrphanAndNoFieldErrors.d.ts +9 -0
  17. package/dist/errors/orphan/useFormHasOrphanAndNoFieldErrors.mjs +10 -0
  18. package/dist/errors/orphan/useOrphanFormErrors.mjs +2 -2
  19. package/dist/errors/orphan/useOrphanFormErrorsToConsoleError.d.ts +4 -3
  20. package/dist/errors/orphan/useOrphanFormErrorsToConsoleError.mjs +22 -14
  21. package/dist/errors/useFormErrorsEffect.mjs +2 -2
  22. package/dist/errors/useFormErrorsIfAny.mjs +1 -1
  23. package/dist/errors/useFormErrorsOnChange.mjs +5 -5
  24. package/dist/errors/useFormFieldErrors.d.ts +6 -0
  25. package/dist/errors/useFormFieldErrors.mjs +13 -0
  26. package/dist/isEmptyObject.d.ts +2 -0
  27. package/dist/isEmptyObject.mjs +4 -0
  28. package/dist/main.d.ts +4 -1
  29. package/dist/main.mjs +34 -28
  30. package/dist/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
  31. package/dist/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.mjs +305 -0
  32. package/dist/node_modules/@emotion/hash/dist/emotion-hash.esm.mjs +22 -0
  33. package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.mjs +10 -0
  34. package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.mjs +9 -0
  35. package/dist/node_modules/@emotion/react/dist/emotion-element-43c6fea0.browser.esm.mjs +57 -0
  36. package/dist/node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.mjs +167 -0
  37. package/dist/node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.mjs +49 -0
  38. package/dist/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.mjs +82 -0
  39. package/dist/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.mjs +146 -0
  40. package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.mjs +52 -0
  41. package/dist/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.mjs +7 -0
  42. package/dist/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.mjs +34 -0
  43. package/dist/node_modules/@hookform/devtools/dist/index.esm.mjs +1402 -0
  44. package/dist/node_modules/dequal/dist/index.mjs +64 -0
  45. package/dist/node_modules/little-state-machine/dist/little-state-machine.es.mjs +67 -0
  46. package/dist/node_modules/lodash/_Hash.mjs +22 -0
  47. package/dist/node_modules/lodash/_ListCache.mjs +22 -0
  48. package/dist/node_modules/lodash/_Map.mjs +6 -0
  49. package/dist/node_modules/lodash/_MapCache.mjs +22 -0
  50. package/dist/node_modules/lodash/_Symbol.mjs +5 -0
  51. package/dist/node_modules/lodash/_arrayMap.mjs +9 -0
  52. package/dist/node_modules/lodash/_assocIndexOf.mjs +12 -0
  53. package/dist/node_modules/lodash/_baseGet.mjs +13 -0
  54. package/dist/node_modules/lodash/_baseGetTag.mjs +11 -0
  55. package/dist/node_modules/lodash/_baseIsNative.mjs +17 -0
  56. package/dist/node_modules/lodash/_baseToString.mjs +19 -0
  57. package/dist/node_modules/lodash/_castPath.mjs +12 -0
  58. package/dist/node_modules/lodash/_coreJsData.mjs +5 -0
  59. package/dist/node_modules/lodash/_freeGlobal.mjs +5 -0
  60. package/dist/node_modules/lodash/_getMapData.mjs +10 -0
  61. package/dist/node_modules/lodash/_getNative.mjs +11 -0
  62. package/dist/node_modules/lodash/_getRawTag.mjs +16 -0
  63. package/dist/node_modules/lodash/_getValue.mjs +7 -0
  64. package/dist/node_modules/lodash/_hashClear.mjs +9 -0
  65. package/dist/node_modules/lodash/_hashDelete.mjs +8 -0
  66. package/dist/node_modules/lodash/_hashGet.mjs +14 -0
  67. package/dist/node_modules/lodash/_hashHas.mjs +10 -0
  68. package/dist/node_modules/lodash/_hashSet.mjs +10 -0
  69. package/dist/node_modules/lodash/_isKey.mjs +13 -0
  70. package/dist/node_modules/lodash/_isKeyable.mjs +8 -0
  71. package/dist/node_modules/lodash/_isMasked.mjs +12 -0
  72. package/dist/node_modules/lodash/_listCacheClear.mjs +7 -0
  73. package/dist/node_modules/lodash/_listCacheDelete.mjs +13 -0
  74. package/dist/node_modules/lodash/_listCacheGet.mjs +10 -0
  75. package/dist/node_modules/lodash/_listCacheHas.mjs +9 -0
  76. package/dist/node_modules/lodash/_listCacheSet.mjs +10 -0
  77. package/dist/node_modules/lodash/_mapCacheClear.mjs +15 -0
  78. package/dist/node_modules/lodash/_mapCacheDelete.mjs +10 -0
  79. package/dist/node_modules/lodash/_mapCacheGet.mjs +9 -0
  80. package/dist/node_modules/lodash/_mapCacheHas.mjs +9 -0
  81. package/dist/node_modules/lodash/_mapCacheSet.mjs +10 -0
  82. package/dist/node_modules/lodash/_memoizeCapped.mjs +12 -0
  83. package/dist/node_modules/lodash/_nativeCreate.mjs +5 -0
  84. package/dist/node_modules/lodash/_objectToString.mjs +8 -0
  85. package/dist/node_modules/lodash/_root.mjs +5 -0
  86. package/dist/node_modules/lodash/_stringToPath.mjs +10 -0
  87. package/dist/node_modules/lodash/_toKey.mjs +12 -0
  88. package/dist/node_modules/lodash/_toSource.mjs +18 -0
  89. package/dist/node_modules/lodash/eq.mjs +7 -0
  90. package/dist/node_modules/lodash/get.mjs +12 -0
  91. package/dist/node_modules/lodash/isArray.mjs +4 -0
  92. package/dist/node_modules/lodash/isFunction.mjs +13 -0
  93. package/dist/node_modules/lodash/isObject.mjs +11 -0
  94. package/dist/node_modules/lodash/isObjectLike.mjs +7 -0
  95. package/dist/node_modules/lodash/isSymbol.mjs +10 -0
  96. package/dist/node_modules/lodash/isUndefined.mjs +9 -0
  97. package/dist/node_modules/lodash/memoize.mjs +19 -0
  98. package/dist/node_modules/lodash/toString.mjs +9 -0
  99. package/dist/node_modules/react-simple-animate/dist/index.mjs +257 -0
  100. package/dist/node_modules/stylis/src/Enum.mjs +12 -0
  101. package/dist/node_modules/stylis/src/Middleware.mjs +18 -0
  102. package/dist/node_modules/stylis/src/Parser.mjs +114 -0
  103. package/dist/node_modules/stylis/src/Serializer.mjs +28 -0
  104. package/dist/node_modules/stylis/src/Tokenizer.mjs +131 -0
  105. package/dist/node_modules/stylis/src/Utility.mjs +50 -0
  106. package/dist/node_modules/use-deep-compare-effect/dist/use-deep-compare-effect.esm.mjs +24 -0
  107. package/dist/node_modules/uuid/dist/esm-browser/regex.mjs +4 -0
  108. package/dist/node_modules/uuid/dist/esm-browser/rng.mjs +9 -0
  109. package/dist/node_modules/uuid/dist/esm-browser/stringify.mjs +13 -0
  110. package/dist/node_modules/uuid/dist/esm-browser/v4.mjs +16 -0
  111. package/dist/node_modules/uuid/dist/esm-browser/validate.mjs +7 -0
  112. package/dist/submit/useFormOnSubmitSuccessful.mjs +7 -7
  113. package/dist/submit/useFormOnSubmitSuccessfulAndReset.d.ts +3 -0
  114. package/dist/submit/useFormOnSubmitSuccessfulAndReset.mjs +7 -7
  115. package/package.json +14 -1
  116. package/dist/errors/nonfield/utils.mjs +0 -4
  117. package/dist/errors/orphan/useFormErrorsHasOnlyOrphans.d.ts +0 -2
  118. package/dist/errors/orphan/useFormErrorsHasOnlyOrphans.mjs +0 -10
  119. package/dist/errors/orphan/utils.d.ts +0 -4
  120. package/dist/errors/useFormFlatFieldErrors.mjs +0 -6
  121. package/dist/utils.d.ts +0 -1
  122. package/dist/utils.mjs +0 -4
@@ -0,0 +1,8 @@
1
+ var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function l(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ export {
6
+ o as commonjsGlobal,
7
+ l as getDefaultExportFromCjs
8
+ };
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { DevtoolUIProps } from '@hookform/devtools/dist/devToolUI';
3
+
4
+ type Props = Omit<DevtoolUIProps, 'control'> & {
5
+ isDev: boolean;
6
+ };
7
+ /**
8
+ * Lazy-loaded RHF DevTool.
9
+ */
10
+ declare const LazyDevTool: React.FC<Props>;
11
+ export default LazyDevTool;
@@ -0,0 +1,16 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import e from "react";
3
+ import { useFormContext as n } from "react-hook-form";
4
+ const a = e.lazy(
5
+ () => import("../node_modules/@hookform/devtools/dist/index.esm.mjs").then((o) => ({
6
+ default: o.DevTool
7
+ }))
8
+ ), f = ({ isDev: o, ...l }) => {
9
+ if (!o)
10
+ return null;
11
+ const { control: r } = n();
12
+ return /* @__PURE__ */ t(e.Suspense, { fallback: null, children: /* @__PURE__ */ t(a, { control: r, ...l }) });
13
+ }, m = f;
14
+ export {
15
+ m as default
16
+ };
@@ -1,22 +1,22 @@
1
- import { get as l } from "react-hook-form";
1
+ import { get as f } from "react-hook-form";
2
2
  import n from "./flattenFieldErrors.mjs";
3
- const d = (t) => {
3
+ const p = (t) => {
4
4
  const a = n(t), c = Object.keys(a);
5
5
  return Object.fromEntries(
6
6
  c.reduce(
7
- (r, o) => {
8
- const e = o.replace(f, "");
9
- if (e === o)
10
- return r;
11
- const s = l(t, e, void 0);
12
- return s && r.push([e, s]), r;
7
+ (e, o) => {
8
+ const r = o.replace(d, "");
9
+ if (r === o)
10
+ return e;
11
+ const s = f(t, r, void 0);
12
+ return s && e.push([r, s]), e;
13
13
  },
14
14
  []
15
15
  // entries
16
16
  )
17
17
  );
18
- }, u = d, f = /\.(?:type|message)\b$/;
18
+ }, d = /\.(?:type|message)\b$/;
19
19
  export {
20
- u as default,
21
- f as regexMaybeFieldErrorLeafNode
20
+ p as default,
21
+ d as regexMaybeFieldErrorLeafNode
22
22
  };
@@ -0,0 +1,7 @@
1
+ import { FieldError } from 'react-hook-form';
2
+
3
+ /**
4
+ * Determine if {@link FieldError} is a field error (i.e., has `ref`).
5
+ */
6
+ declare const isFieldError: (error: FieldError) => boolean;
7
+ export default isFieldError;
@@ -0,0 +1,4 @@
1
+ const e = (r) => !!r.ref;
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ type Props = {
4
+ message: string;
5
+ className?: string;
6
+ };
7
+ declare const FormErrorMessage: React.FC<Props>;
8
+ export default FormErrorMessage;
@@ -0,0 +1,14 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ const s = ({ message: r, className: o }) => /* @__PURE__ */ e(
4
+ "p",
5
+ {
6
+ role: "alert",
7
+ "aria-live": "polite",
8
+ className: o,
9
+ children: r
10
+ }
11
+ ), i = s;
12
+ export {
13
+ i as default
14
+ };
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ name: string;
4
+ Component?: React.FC<{
5
+ message: string;
6
+ }>;
7
+ };
8
+ declare const FormErrorMessageByPath: React.FC<Props>;
9
+ export default FormErrorMessageByPath;
@@ -0,0 +1,17 @@
1
+ import { jsxs as n, Fragment as a, jsx as e } from "react/jsx-runtime";
2
+ import { useFormState as g, get as i } from "react-hook-form";
3
+ import p from "../nonfield/FormNonFieldErrorMarker.mjs";
4
+ import F from "./FormErrorMessage.mjs";
5
+ const c = ({ name: o, ...s }) => {
6
+ const { errors: t } = g(), r = i(t, o, void 0);
7
+ if (!(r != null && r.message))
8
+ return null;
9
+ const m = s.Component ?? F;
10
+ return /* @__PURE__ */ n(a, { children: [
11
+ /* @__PURE__ */ e(p, { path: o }),
12
+ /* @__PURE__ */ e(m, { message: r.message })
13
+ ] });
14
+ }, h = c;
15
+ export {
16
+ h as default
17
+ };
@@ -1,7 +1,7 @@
1
1
  import { FieldError } from 'react-hook-form';
2
2
 
3
3
  /**
4
- * Determine if {@link FieldError} is a non-field error (i.e., has `ref`).
4
+ * Determine if {@link FieldError} is a non-field error (i.e., has no `ref`).
5
5
  *
6
6
  * A non-field error has no association to an input via {@link FieldError.ref}.
7
7
  *
@@ -15,4 +15,5 @@ import { FieldError } from 'react-hook-form';
15
15
  * - The schema is incorrect.
16
16
  * - The error is not displayed to user with `FormErrorNonFieldMarker`.
17
17
  */
18
- export declare const isNonFieldError: (error: FieldError) => boolean;
18
+ declare const isNonFieldError: (error: FieldError) => boolean;
19
+ export default isNonFieldError;
@@ -0,0 +1,5 @@
1
+ import o from "../isFieldError.mjs";
2
+ const e = (r) => !o(r);
3
+ export {
4
+ e as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import { FlatFieldErrors } from '../getFlatFieldErrors';
2
+ import { FieldErrors } from 'react-hook-form';
3
+
4
+ declare const getOrphanFlatFieldErrors: (errors: FieldErrors, parentElement: Pick<HTMLElement, 'querySelector'>) => FlatFieldErrors;
5
+ export default getOrphanFlatFieldErrors;
@@ -1,20 +1,20 @@
1
- import m from "../getFlatFieldErrors.mjs";
2
- import { hasNonFieldErrorMarkerInDOM as s } from "../nonfield/FormNonFieldErrorMarker.utils.mjs";
3
- import { isNonFieldError as l } from "../nonfield/utils.mjs";
1
+ import s from "../getFlatFieldErrors.mjs";
2
+ import { hasNonFieldErrorMarkerInDOM as l } from "../nonfield/FormNonFieldErrorMarker.utils.mjs";
3
+ import m from "../nonfield/isNonFieldError.mjs";
4
4
  import { isFormErrorPathRoot as n } from "../root/utils.mjs";
5
5
  const d = (o, t) => {
6
- const e = m(o);
6
+ const e = s(o);
7
7
  return Object.fromEntries(
8
8
  Object.entries(e).filter(
9
9
  ([r, i]) => (
10
10
  // not root path
11
11
  !n(r) && // non-field
12
- l(i) && // does not have marker
13
- !s(r, t)
12
+ m(i) && // does not have marker
13
+ !l(r, t)
14
14
  )
15
15
  )
16
16
  );
17
17
  };
18
18
  export {
19
- d as getOrphanFlatFieldErrors
19
+ d as default
20
20
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Determined if there are orphan errors and no field errors.
3
+ * (May be useful when reporting or displaying a specific message to user.)
4
+ * RHF doesn't seem to have any other mechanism to indicate a failed submit but to `setErrors()`.
5
+ * Therefore, we have no way of distinguishing between "placeholder" root error and actual error.
6
+ * (e.g., "Please fix form errors above." vs "Start date must be less than end date.")
7
+ */
8
+ declare const useFormHasOrphanAndNoFieldErrors: (formRef: React.RefObject<HTMLFormElement>) => boolean;
9
+ export default useFormHasOrphanAndNoFieldErrors;
@@ -0,0 +1,10 @@
1
+ import r from "../../isEmptyObject.mjs";
2
+ import t from "../useFormFieldErrors.mjs";
3
+ import n from "./useOrphanFormErrors.mjs";
4
+ const m = (o) => {
5
+ const s = n(o), e = t();
6
+ return r(s) ? !1 : !r(e);
7
+ }, d = m;
8
+ export {
9
+ d as default
10
+ };
@@ -1,7 +1,7 @@
1
1
  import "react";
2
- import { isEmptyObject as t } from "../../utils.mjs";
2
+ import t from "../../isEmptyObject.mjs";
3
3
  import e from "../useFormErrorsOnChange.mjs";
4
- import { getOrphanFlatFieldErrors as n } from "./utils.mjs";
4
+ import n from "./getOrphanFlatFieldErrors.mjs";
5
5
  const m = (r) => e((o) => {
6
6
  if (t(o))
7
7
  return {};
@@ -1,8 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  /**
4
- * Outputs orphan errors to `console.error` all errors with `ref: undefined` that do not begin with `root(.*)`.
5
- * Sentry (or equivalent) should capture.
4
+ * Logs out orphan errors to console.error.
5
+ *
6
+ * When `isDev`, it will also throw an error to bring attention to dev.
6
7
  */
7
- declare const useOrphanFormErrorsToConsoleError: (formRef: React.RefObject<HTMLFormElement>) => void;
8
+ declare const useOrphanFormErrorsToConsoleError: (formRef: React.RefObject<HTMLFormElement>, isDev?: boolean) => void;
8
9
  export default useOrphanFormErrorsToConsoleError;
@@ -1,16 +1,24 @@
1
- import t from "react";
2
- import { useFormContext as n, useFormState as a } from "react-hook-form";
3
- import m from "./useOrphanFormErrors.mjs";
4
- const c = (e) => {
5
- const { getValues: o } = n(), { errors: s } = a(), r = m(e);
6
- t.useEffect(() => {
7
- Object.keys(r).length && console.error("useOrphanFormErrorsToConsoleError", {
8
- location: window.location,
9
- values: o(),
10
- orphans: r
11
- });
12
- }, [s, o, r]);
13
- }, E = c;
1
+ import n from "react";
2
+ import { useFormContext as a, useFormState as m } from "react-hook-form";
3
+ import c from "../../isEmptyObject.mjs";
4
+ import p from "./useOrphanFormErrors.mjs";
5
+ const u = (o, e) => {
6
+ const { getValues: s } = a(), { errors: t } = m(), r = p(o);
7
+ n.useEffect(() => {
8
+ if (!c(r) && (console.error(
9
+ "useOrphanFormErrorsToConsoleError",
10
+ // include debugging details
11
+ {
12
+ location: window.location,
13
+ values: s(),
14
+ // form values
15
+ errors: t,
16
+ orphans: r
17
+ }
18
+ ), e))
19
+ throw new Error("Orphan errors detected");
20
+ }, [r]);
21
+ }, h = u;
14
22
  export {
15
- E as default
23
+ h as default
16
24
  };
@@ -5,7 +5,7 @@ const s = (r) => {
5
5
  t.useEffect(() => {
6
6
  r(o);
7
7
  }, [r, o]);
8
- }, c = s;
8
+ }, u = s;
9
9
  export {
10
- c as default
10
+ u as default
11
11
  };
@@ -1,5 +1,5 @@
1
1
  import { useFormState as o } from "react-hook-form";
2
- import { isEmptyObject as s } from "../utils.mjs";
2
+ import s from "../isEmptyObject.mjs";
3
3
  const t = () => {
4
4
  const { errors: r } = o();
5
5
  return s(r) ? !1 : r;
@@ -1,9 +1,9 @@
1
- import e from "react";
1
+ import o from "react";
2
2
  import { useFormState as t } from "react-hook-form";
3
- const n = (r) => {
4
- const { errors: o } = t();
5
- return e.useMemo(() => r(o), [r, o]);
3
+ const u = (r) => {
4
+ const { errors: e } = t();
5
+ return o.useMemo(() => r(e), [r, e]);
6
6
  };
7
7
  export {
8
- n as default
8
+ u as default
9
9
  };
@@ -0,0 +1,6 @@
1
+ import { FlatFieldErrors } from './getFlatFieldErrors';
2
+ import { FieldErrors } from 'react-hook-form';
3
+
4
+ declare const useFormFieldErrors: () => FlatFieldErrors;
5
+ export default useFormFieldErrors;
6
+ export declare const getFlatFieldFormErrors: (errors: FieldErrors) => FlatFieldErrors;
@@ -0,0 +1,13 @@
1
+ import t from "./getFlatFieldErrors.mjs";
2
+ import s from "./isFieldError.mjs";
3
+ import i from "./useFormErrorsOnChange.mjs";
4
+ const f = () => i(l), l = (r) => {
5
+ const o = t(r);
6
+ return Object.fromEntries(
7
+ Object.entries(o).filter(([, e]) => s(e))
8
+ );
9
+ };
10
+ export {
11
+ f as default,
12
+ l as getFlatFieldFormErrors
13
+ };
@@ -0,0 +1,2 @@
1
+ declare const isEmptyObject: (obj: Record<string, unknown>) => boolean;
2
+ export default isEmptyObject;
@@ -0,0 +1,4 @@
1
+ const e = (t) => Object.keys(t).length === 0, s = e;
2
+ export {
3
+ s as default
4
+ };
package/dist/main.d.ts CHANGED
@@ -1,6 +1,9 @@
1
+ export { default as LazyDevTool } from './devtool/LazyDevTool';
2
+ export { default as FormErrorMessage } from './errors/message/FormErrorMessage';
3
+ export { default as FormErrorMessageByPath } from './errors/message/FormErrorMessageByPath';
1
4
  export { default as FormNonFieldErrorMarker } from './errors/nonfield/FormNonFieldErrorMarker';
2
5
  export { default as FormNonFieldErrorMarkerHtmlAttribute } from './errors/nonfield/FormNonFieldErrorMarker.utils';
3
- export { default as useFormErrorsHasOnlyOrphans } from './errors/orphan/useFormErrorsHasOnlyOrphans';
6
+ export { default as useFormHasOrphanAndNoFieldErrors } from './errors/orphan/useFormHasOrphanAndNoFieldErrors';
4
7
  export { default as useOrphanFormErrors } from './errors/orphan/useOrphanFormErrors';
5
8
  export { default as useOrphanFormErrorsToConsoleError } from './errors/orphan/useOrphanFormErrorsToConsoleError';
6
9
  export { default as useRootFormFieldErrors } from './errors/root/useRootFormFieldErrors';
package/dist/main.mjs CHANGED
@@ -1,30 +1,36 @@
1
- import { default as e } from "./errors/nonfield/FormNonFieldErrorMarker.mjs";
2
- import { default as t } from "./errors/nonfield/FormNonFieldErrorMarker.utils.mjs";
3
- import { default as a } from "./errors/orphan/useFormErrorsHasOnlyOrphans.mjs";
4
- import { default as m } from "./errors/orphan/useOrphanFormErrors.mjs";
5
- import { default as d } from "./errors/orphan/useOrphanFormErrorsToConsoleError.mjs";
6
- import { default as F } from "./errors/root/useRootFormFieldErrors.mjs";
7
- import { default as x } from "./errors/useFormErrorConsoleDebug.mjs";
8
- import { default as i } from "./errors/useFormErrorsEffect.mjs";
9
- import { default as O } from "./errors/useFormErrorsIfAny.mjs";
10
- import { default as b } from "./errors/useFormErrorsOnChange.mjs";
11
- import { default as A } from "./errors/useFormRequestSubmit.mjs";
12
- import { default as C } from "./submit/useFormOnSubmitSuccessful.mjs";
13
- import { default as k } from "./submit/useFormOnSubmitSuccessfulAndReset.mjs";
14
- import { default as H } from "./submit/useResetFormOnSubmitSuccessful.mjs";
1
+ import { default as e } from "./devtool/LazyDevTool.mjs";
2
+ import { default as t } from "./errors/message/FormErrorMessage.mjs";
3
+ import { default as u } from "./errors/message/FormErrorMessageByPath.mjs";
4
+ import { default as m } from "./errors/nonfield/FormNonFieldErrorMarker.mjs";
5
+ import { default as d } from "./errors/nonfield/FormNonFieldErrorMarker.utils.mjs";
6
+ import { default as F } from "./errors/orphan/useFormHasOrphanAndNoFieldErrors.mjs";
7
+ import { default as n } from "./errors/orphan/useOrphanFormErrors.mjs";
8
+ import { default as i } from "./errors/orphan/useOrphanFormErrorsToConsoleError.mjs";
9
+ import { default as S } from "./errors/root/useRootFormFieldErrors.mjs";
10
+ import { default as O } from "./errors/useFormErrorConsoleDebug.mjs";
11
+ import { default as A } from "./errors/useFormErrorsEffect.mjs";
12
+ import { default as M } from "./errors/useFormErrorsIfAny.mjs";
13
+ import { default as y } from "./errors/useFormErrorsOnChange.mjs";
14
+ import { default as N } from "./errors/useFormRequestSubmit.mjs";
15
+ import { default as D } from "./submit/useFormOnSubmitSuccessful.mjs";
16
+ import { default as T } from "./submit/useFormOnSubmitSuccessfulAndReset.mjs";
17
+ import { default as v } from "./submit/useResetFormOnSubmitSuccessful.mjs";
15
18
  export {
16
- e as FormNonFieldErrorMarker,
17
- t as FormNonFieldErrorMarkerHtmlAttribute,
18
- x as useFormErrorConsoleDebug,
19
- i as useFormErrorsEffect,
20
- a as useFormErrorsHasOnlyOrphans,
21
- O as useFormErrorsIfAny,
22
- b as useFormErrorsOnChange,
23
- C as useFormOnSubmitSuccessful,
24
- k as useFormOnSubmitSuccessfulAndReset,
25
- A as useFormRequestSubmit,
26
- m as useOrphanFormErrors,
27
- d as useOrphanFormErrorsToConsoleError,
28
- H as useResetFormAfterSubmitSuccessful,
29
- F as useRootFormFieldErrors
19
+ t as FormErrorMessage,
20
+ u as FormErrorMessageByPath,
21
+ m as FormNonFieldErrorMarker,
22
+ d as FormNonFieldErrorMarkerHtmlAttribute,
23
+ e as LazyDevTool,
24
+ O as useFormErrorConsoleDebug,
25
+ A as useFormErrorsEffect,
26
+ M as useFormErrorsIfAny,
27
+ y as useFormErrorsOnChange,
28
+ F as useFormHasOrphanAndNoFieldErrors,
29
+ D as useFormOnSubmitSuccessful,
30
+ T as useFormOnSubmitSuccessfulAndReset,
31
+ N as useFormRequestSubmit,
32
+ n as useOrphanFormErrors,
33
+ i as useOrphanFormErrorsToConsoleError,
34
+ v as useResetFormAfterSubmitSuccessful,
35
+ S as useRootFormFieldErrors
30
36
  };
@@ -0,0 +1,13 @@
1
+ function e() {
2
+ return e = Object.assign ? Object.assign.bind() : function(a) {
3
+ for (var n = 1; n < arguments.length; n++) {
4
+ var t = arguments[n];
5
+ for (var r in t)
6
+ Object.prototype.hasOwnProperty.call(t, r) && (a[r] = t[r]);
7
+ }
8
+ return a;
9
+ }, e.apply(this, arguments);
10
+ }
11
+ export {
12
+ e as default
13
+ };