@paragrav/rhf-utils 0.0.99 → 0.0.102
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/package.json +1 -1
- package/dist/types/errors/consoleErrors.d.ts +0 -14
- package/dist/types/errors/orphan/useOrphanFormErrorsToConsole.d.ts +0 -9
- package/dist/types/errors/outputErrors.d.ts +0 -14
- package/dist/types/errors/useFormErrorConsoleDebug.d.ts +0 -8
- package/dist/types/errors/useFormErrorsToConsole.d.ts +0 -13
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FieldErrors } from 'react-hook-form';
|
|
2
|
-
import { SafeFieldValues } from '../form/SafeFieldValues';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Output form values and errors to console.
|
|
6
|
-
*/
|
|
7
|
-
declare const consoleErrors: (message: string, form: {
|
|
8
|
-
values: SafeFieldValues;
|
|
9
|
-
errors: FieldErrors;
|
|
10
|
-
}, options?: {
|
|
11
|
-
other?: Record<string, unknown>;
|
|
12
|
-
isError?: boolean;
|
|
13
|
-
}) => void;
|
|
14
|
-
export default consoleErrors;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Logs out orphan errors to console.error.
|
|
5
|
-
*
|
|
6
|
-
* In development, it will also throw an error to bring attention to dev.
|
|
7
|
-
*/
|
|
8
|
-
declare const useOrphanFormErrorsToConsole: (formRef: React.RefObject<HTMLFormElement>, enabled?: boolean) => void;
|
|
9
|
-
export default useOrphanFormErrorsToConsole;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FieldErrors } from 'react-hook-form';
|
|
2
|
-
import { SafeFieldValues } from '../form/SafeFieldValues';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Output form values and errors to console and throw in dev.
|
|
6
|
-
*/
|
|
7
|
-
declare const outputErrors: (message: string, form: {
|
|
8
|
-
values: SafeFieldValues;
|
|
9
|
-
errors: FieldErrors;
|
|
10
|
-
}, options?: {
|
|
11
|
-
other?: Record<string, unknown>;
|
|
12
|
-
isError?: boolean;
|
|
13
|
-
}) => void;
|
|
14
|
-
export default outputErrors;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Output form errors to console.debug() for easier debugging for certain condition.
|
|
3
|
-
* (e.g., in dev/staging environments or certain users)
|
|
4
|
-
*
|
|
5
|
-
* `console.debug()` is unlikely to trigger any automated console capture reporting.
|
|
6
|
-
*/
|
|
7
|
-
declare const useFormErrorConsoleDebug: (enabled?: boolean) => void;
|
|
8
|
-
export default useFormErrorConsoleDebug;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FlatFieldErrors } from './flat/types';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Logs out orphan errors to console.error.
|
|
5
|
-
*
|
|
6
|
-
* In development, it will also throw an error to bring attention to dev.
|
|
7
|
-
*/
|
|
8
|
-
declare const useFormErrorsToConsole: (message: string, flatErrors: FlatFieldErrors, options?: {
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
isError?: boolean;
|
|
11
|
-
data?: Record<string, unknown>;
|
|
12
|
-
}) => void;
|
|
13
|
-
export default useFormErrorsToConsole;
|