@rolster/react-forms 18.2.0 → 18.2.1
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/dist/esm/form-array/form-array-control.hook.d.ts +2 -2
- package/dist/esm/form-array/form-array-group.hook.d.ts +1 -1
- package/dist/esm/form-array/form-array.hook.d.ts +1 -1
- package/dist/esm/form-control.hook.d.ts +3 -3
- package/dist/esm/form-group.hook.d.ts +1 -1
- package/dist/esm/form-ref.hook.d.ts +4 -4
- package/package.json +2 -2
|
@@ -41,9 +41,9 @@ interface RolsterControlProps<T = any> extends FormArrayControlProps<T> {
|
|
|
41
41
|
}
|
|
42
42
|
type ReactControlProps<T = any> = Omit<RolsterControlProps<T>, 'uuid'>;
|
|
43
43
|
export declare function useFormArrayControl<T = any, C extends ReactArrayControls = any, E extends HTMLElement = HTMLElement>(): AbstractRolsterArrayControl<T, C, E>;
|
|
44
|
-
export declare function useFormArrayControl<T = any, C extends ReactArrayControls = any, E extends HTMLElement = HTMLElement>(state: FormState<T>, validators?: ValidatorFn<T>[]): AbstractRolsterArrayControl<T, C, E>;
|
|
45
44
|
export declare function useFormArrayControl<T = any, C extends ReactArrayControls = any, E extends HTMLElement = HTMLElement>(props: ReactControlProps<T>): AbstractRolsterArrayControl<T, C, E>;
|
|
45
|
+
export declare function useFormArrayControl<T = any, C extends ReactArrayControls = any, E extends HTMLElement = HTMLElement>(state: FormState<T>, validators?: ValidatorFn<T>[]): AbstractRolsterArrayControl<T, C, E>;
|
|
46
46
|
export declare function useInputArrayControl<T = any, C extends ReactArrayControls = any>(): AbstractRolsterArrayControl<T, C, HTMLInputElement>;
|
|
47
|
-
export declare function useInputArrayControl<T = any, C extends ReactArrayControls = any>(state: FormState<T>, validators?: ValidatorFn<T>[]): AbstractRolsterArrayControl<T, C, HTMLInputElement>;
|
|
48
47
|
export declare function useInputArrayControl<T = any, C extends ReactArrayControls = any>(props: ReactControlProps<T>): AbstractRolsterArrayControl<T, C, HTMLInputElement>;
|
|
48
|
+
export declare function useInputArrayControl<T = any, C extends ReactArrayControls = any>(state: FormState<T>, validators?: ValidatorFn<T>[]): AbstractRolsterArrayControl<T, C, HTMLInputElement>;
|
|
49
49
|
export {};
|
|
@@ -26,6 +26,6 @@ export declare class RolsterArrayGroup<C extends RolsterArrayControls = RolsterA
|
|
|
26
26
|
setValidators(validators: ValidatorGroupFn<C>[]): void;
|
|
27
27
|
}
|
|
28
28
|
type RolsterGroupProps<C extends RolsterArrayControls = RolsterArrayControls, R = any> = Omit<FormArrayGroupProps<C, R>, 'uuid'>;
|
|
29
|
-
export declare function useFormArrayGroup<C extends RolsterArrayControls = RolsterArrayControls, R = any>(controls: C, validators?: ValidatorGroupFn<C, R>[]): AbstractRolsterArrayGroup<C, R>;
|
|
30
29
|
export declare function useFormArrayGroup<C extends RolsterArrayControls = RolsterArrayControls, R = any>(props: RolsterGroupProps<C, R>): AbstractRolsterArrayGroup<C, R>;
|
|
30
|
+
export declare function useFormArrayGroup<C extends RolsterArrayControls = RolsterArrayControls, R = any>(controls: C, validators?: ValidatorGroupFn<C, R>[]): AbstractRolsterArrayGroup<C, R>;
|
|
31
31
|
export {};
|
|
@@ -3,6 +3,6 @@ import { ReactArrayControls, ReactFormArray } from '../types';
|
|
|
3
3
|
import { AbstractRolsterArrayGroup } from './types';
|
|
4
4
|
type RolsterArrayProps<C extends ReactArrayControls = ReactArrayControls, R = any> = FormArrayProps<C, R, AbstractRolsterArrayGroup<C, R>>;
|
|
5
5
|
export declare function useFormArray<G extends ReactArrayControls, R = any>(): ReactFormArray<G, R>;
|
|
6
|
-
export declare function useFormArray<G extends ReactArrayControls, R = any>(groups: AbstractRolsterArrayGroup<G, R>[], validatorsFn?: ValidatorArrayFn<G, R>[]): ReactFormArray<G, R>;
|
|
7
6
|
export declare function useFormArray<G extends ReactArrayControls, R = any>(props: RolsterArrayProps<G>): ReactFormArray<G, R>;
|
|
7
|
+
export declare function useFormArray<G extends ReactArrayControls, R = any>(groups: AbstractRolsterArrayGroup<G, R>[], validatorsFn?: ValidatorArrayFn<G, R>[]): ReactFormArray<G, R>;
|
|
8
8
|
export {};
|
|
@@ -7,12 +7,12 @@ interface ReactControlProps<T = any> extends FormControlProps<T> {
|
|
|
7
7
|
export declare function instanceOfReactControlProps<T = any>(props: any): props is ReactControlProps<T>;
|
|
8
8
|
export declare function getReactControlProps<T = any>(props?: ReactControlProps<T> | FormState<T>, validators?: ValidatorFn<T>[]): ReactControlProps<T>;
|
|
9
9
|
export declare function useReactControl<E extends HTMLElement, T = any>(): ReactFormControl<E, T>;
|
|
10
|
-
export declare function useReactControl<E extends HTMLElement, T = any>(state: FormState<T>, validators?: ValidatorFn<T>[]): ReactFormControl<E, T>;
|
|
11
10
|
export declare function useReactControl<E extends HTMLElement, T = any>(props: ReactControlProps<T>): ReactFormControl<E, T>;
|
|
11
|
+
export declare function useReactControl<E extends HTMLElement, T = any>(state: FormState<T>, validators?: ValidatorFn<T>[]): ReactFormControl<E, T>;
|
|
12
12
|
export declare function useFormControl<T = any>(): ReactHtmlControl<T>;
|
|
13
|
-
export declare function useFormControl<T = any>(state: FormState<T>, validators?: ValidatorFn<T>[]): ReactHtmlControl<T>;
|
|
14
13
|
export declare function useFormControl<T = any>(props: ReactControlProps<T>): ReactHtmlControl<T>;
|
|
14
|
+
export declare function useFormControl<T = any>(state: FormState<T>, validators?: ValidatorFn<T>[]): ReactHtmlControl<T>;
|
|
15
15
|
export declare function useInputControl<T = any>(): ReactInputControl<T>;
|
|
16
|
-
export declare function useInputControl<T = any>(state: FormState<T>, validators?: ValidatorFn<T>[]): ReactInputControl<T>;
|
|
17
16
|
export declare function useInputControl<T = any>(props: ReactControlProps<T>): ReactInputControl<T>;
|
|
17
|
+
export declare function useInputControl<T = any>(state: FormState<T>, validators?: ValidatorFn<T>[]): ReactInputControl<T>;
|
|
18
18
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FormGroupProps, ValidatorGroupFn } from '@rolster/helpers-forms';
|
|
2
2
|
import { ReactControls, ReactGroup } from './types';
|
|
3
|
-
export declare function useFormGroup<T extends ReactControls>(controls: T, validators?: ValidatorGroupFn<T>[]): ReactGroup<T>;
|
|
4
3
|
export declare function useFormGroup<T extends ReactControls>(props: FormGroupProps<T>): ReactGroup<T>;
|
|
4
|
+
export declare function useFormGroup<T extends ReactControls>(controls: T, validators?: ValidatorGroupFn<T>[]): ReactGroup<T>;
|
|
@@ -9,9 +9,9 @@ type InputRefProps<T = any> = Omit<ReactRefProps<T>, 'setValue'>;
|
|
|
9
9
|
type TextRefProps = InputRefProps<string>;
|
|
10
10
|
type NumberRefProps = InputRefProps<number>;
|
|
11
11
|
export declare function useTextRefControl(): ReactInputControl<string>;
|
|
12
|
-
export declare function useTextRefControl(
|
|
13
|
-
export declare function useTextRefControl(
|
|
12
|
+
export declare function useTextRefControl(props: TextRefProps): ReactInputControl<string>;
|
|
13
|
+
export declare function useTextRefControl(state: FormState<string>, validators?: ValidatorFn<string>[]): ReactInputControl<string>;
|
|
14
14
|
export declare function useNumberRefControl(): ReactInputControl<number>;
|
|
15
|
-
export declare function useNumberRefControl(
|
|
16
|
-
export declare function useNumberRefControl(
|
|
15
|
+
export declare function useNumberRefControl(props: NumberRefProps): ReactInputControl<number>;
|
|
16
|
+
export declare function useNumberRefControl(state: FormState<number>, validators?: ValidatorFn<number>[]): ReactInputControl<number>;
|
|
17
17
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolster/react-forms",
|
|
3
|
-
"version": "18.2.
|
|
3
|
+
"version": "18.2.1",
|
|
4
4
|
"description": "It implements a set of classes that allow managing the control of states of the input components in React",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prepublishOnly": "npm run build"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@rolster/helpers-forms": "^1.10.
|
|
29
|
+
"@rolster/helpers-forms": "^1.10.3",
|
|
30
30
|
"@rolster/validators": "^1.0.5",
|
|
31
31
|
"rxjs": "^7.8.0",
|
|
32
32
|
"uuid": "^9.0.1"
|