@trackunit/custom-field-components 0.0.101 → 0.0.104
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/BooleanCustomField.d.ts +0 -11
- package/DateCustomField.d.ts +0 -6
- package/DropdownCustomField.d.ts +0 -14
- package/package.json +2 -2
package/BooleanCustomField.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export interface BooleanCustomFieldProps extends Omit<CheckboxProps, "value" | "
|
|
|
7
7
|
/**
|
|
8
8
|
* A id for the field
|
|
9
9
|
*
|
|
10
|
-
* @type string
|
|
11
10
|
* @memberof BooleanCustomFieldProps
|
|
12
11
|
*
|
|
13
12
|
*/
|
|
@@ -15,70 +14,60 @@ export interface BooleanCustomFieldProps extends Omit<CheckboxProps, "value" | "
|
|
|
15
14
|
/**
|
|
16
15
|
* A value to be displayed by a input field
|
|
17
16
|
*
|
|
18
|
-
* @type boolean
|
|
19
17
|
* @memberof BooleanCustomFieldProps
|
|
20
18
|
*/
|
|
21
19
|
description?: string;
|
|
22
20
|
/**
|
|
23
21
|
* A text to be displayed under the input with a short description of field purpose
|
|
24
22
|
*
|
|
25
|
-
* @type string
|
|
26
23
|
* @memberof BooleanCustomFieldProps
|
|
27
24
|
*/
|
|
28
25
|
value?: boolean;
|
|
29
26
|
/**
|
|
30
27
|
* A default value to be displayed by a input field
|
|
31
28
|
*
|
|
32
|
-
* @type boolean
|
|
33
29
|
* @memberof BooleanCustomFieldProps
|
|
34
30
|
*/
|
|
35
31
|
defaultValue?: boolean;
|
|
36
32
|
/**
|
|
37
33
|
* A id that can be used in tests to get the component
|
|
38
34
|
*
|
|
39
|
-
* @type string
|
|
40
35
|
* @memberof BooleanCustomFieldProps
|
|
41
36
|
*/
|
|
42
37
|
dataTestId?: string;
|
|
43
38
|
/**
|
|
44
39
|
* A custom handler for onChange event
|
|
45
40
|
*
|
|
46
|
-
* @type OnChange
|
|
47
41
|
* @memberof BooleanCustomFieldProps
|
|
48
42
|
*/
|
|
49
43
|
onChange?: (event: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
50
44
|
/**
|
|
51
45
|
* A flag that can be used to disable the input, default value is false
|
|
52
46
|
*
|
|
53
|
-
* @type boolean
|
|
54
47
|
* @memberof BooleanCustomFieldProps
|
|
55
48
|
*/
|
|
56
49
|
disabled?: boolean;
|
|
57
50
|
/**
|
|
58
51
|
* Used for field validation by React Hook Form library it dynamically set the value of a registered field and have the options to validate and update the form state. At the same time, it tries to avoid unnecessary rerender.
|
|
59
52
|
*
|
|
60
|
-
* @type UseFormSetValue<FieldValues>
|
|
61
53
|
* @memberof BooleanCustomFieldProps
|
|
62
54
|
*/
|
|
63
55
|
setValue?: UseFormSetValue<FieldValues>;
|
|
64
56
|
/**
|
|
65
57
|
* This method allows you to register an input or select element and apply validation rules to React Hook Form. Validation rules are all based on the HTML standard and also allow for custom validation methods.
|
|
66
58
|
*
|
|
67
|
-
* @type UseFormSetValue<FieldValues>
|
|
68
59
|
* @memberof BooleanCustomFieldProps
|
|
69
60
|
*/
|
|
70
61
|
register?: UseFormRegister<FieldValues>;
|
|
71
62
|
/**
|
|
72
63
|
* Validation rules that can be passed to the field, they can be pass along with error messages. Rules are described here https://react-hook-form.com/api/useform/register
|
|
73
64
|
*
|
|
74
|
-
* @type ValidationRules
|
|
75
65
|
* @memberof BooleanCustomFieldProps
|
|
76
66
|
*/
|
|
77
67
|
validationRules?: ValidationRules;
|
|
78
68
|
/**
|
|
79
69
|
* If a value is set, the field is rendered in its invalid state.
|
|
80
70
|
*
|
|
81
|
-
* @type string
|
|
82
71
|
* @memberof BooleanCustomFieldProps
|
|
83
72
|
*/
|
|
84
73
|
errorMessage?: string;
|
package/DateCustomField.d.ts
CHANGED
|
@@ -6,35 +6,30 @@ export interface DateCustomFieldProps extends Omit<DateFieldProps, "label">, For
|
|
|
6
6
|
/**
|
|
7
7
|
* A id for the field
|
|
8
8
|
*
|
|
9
|
-
* @type string
|
|
10
9
|
* @memberof DateCustomFieldProps
|
|
11
10
|
*/
|
|
12
11
|
id: string;
|
|
13
12
|
/**
|
|
14
13
|
* Used for field validation by React Hook Form library it dynamically set the value of a registered field and have the options to validate and update the form state. At the same time, it tries to avoid unnecessary rerender.
|
|
15
14
|
*
|
|
16
|
-
* @type UseFormSetValue<FieldValues>
|
|
17
15
|
* @memberof DateCustomFieldProps
|
|
18
16
|
*/
|
|
19
17
|
setValue?: UseFormSetValue<FieldValues>;
|
|
20
18
|
/**
|
|
21
19
|
* This method allows you to register an input or select element and apply validation rules to React Hook Form. Validation rules are all based on the HTML standard and also allow for custom validation methods.
|
|
22
20
|
*
|
|
23
|
-
* @type UseFormSetValue<FieldValues>
|
|
24
21
|
* @memberof DateCustomFieldProps
|
|
25
22
|
*/
|
|
26
23
|
register?: UseFormRegister<FieldValues>;
|
|
27
24
|
/**
|
|
28
25
|
* Validation rules that can be passed to the field, they can be pass along with error messages. Rules are described here https://react-hook-form.com/api/useform/register
|
|
29
26
|
*
|
|
30
|
-
* @type ValidationRules
|
|
31
27
|
* @memberof DateCustomFieldProps
|
|
32
28
|
*/
|
|
33
29
|
validationRules?: RegisterOptions;
|
|
34
30
|
/**
|
|
35
31
|
* If a value is set, the field is rendered in its invalid state.
|
|
36
32
|
*
|
|
37
|
-
* @type string
|
|
38
33
|
* @memberof DateCustomFieldProps
|
|
39
34
|
*/
|
|
40
35
|
errorMessage?: string;
|
|
@@ -42,7 +37,6 @@ export interface DateCustomFieldProps extends Omit<DateFieldProps, "label">, For
|
|
|
42
37
|
* A boolean flag to set a component into invalid state
|
|
43
38
|
* which means that selected value is breaking validation rules
|
|
44
39
|
*
|
|
45
|
-
* @type boolean
|
|
46
40
|
* @memberof DateCustomFieldProps
|
|
47
41
|
*/
|
|
48
42
|
isInvalid?: boolean;
|
package/DropdownCustomField.d.ts
CHANGED
|
@@ -5,91 +5,78 @@ export interface DropdownCustomFieldProps extends FormGroupExposedProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* A id for the field
|
|
7
7
|
*
|
|
8
|
-
* @type string
|
|
9
8
|
* @memberof DropdownCustomFieldProps
|
|
10
9
|
*/
|
|
11
10
|
id: string;
|
|
12
11
|
/**
|
|
13
12
|
* A text to be displayed under the input with a short description of field purpose
|
|
14
13
|
*
|
|
15
|
-
* @type string
|
|
16
14
|
* @memberof DropdownCustomFieldProps
|
|
17
15
|
*/
|
|
18
16
|
description?: string;
|
|
19
17
|
/**
|
|
20
18
|
* A default value to be displayed by a input field
|
|
21
19
|
*
|
|
22
|
-
* @type {string[]}
|
|
23
20
|
* @memberof DropdownCustomFieldProps
|
|
24
21
|
*/
|
|
25
22
|
defaultValue?: string[];
|
|
26
23
|
/**
|
|
27
24
|
* A id that can be used in tests to get the component
|
|
28
25
|
*
|
|
29
|
-
* @type string
|
|
30
26
|
* @memberof DropdownCustomFieldProps
|
|
31
27
|
*/
|
|
32
28
|
dataTestId?: string;
|
|
33
29
|
/**
|
|
34
30
|
* A custom handler for onChange event
|
|
35
31
|
*
|
|
36
|
-
* @type {OnChange}
|
|
37
32
|
* @memberof DropdownCustomFieldProps
|
|
38
33
|
*/
|
|
39
34
|
onChange?: OnChange;
|
|
40
35
|
/**
|
|
41
36
|
* A flag that can be used to disable the dropdown, default value is false
|
|
42
37
|
*
|
|
43
|
-
* @type {boolean}
|
|
44
38
|
* @memberof DropdownCustomFieldProps
|
|
45
39
|
*/
|
|
46
40
|
disabled?: boolean;
|
|
47
41
|
/**
|
|
48
42
|
* A flag that can be used to enable multiselect mode, default value is false
|
|
49
43
|
*
|
|
50
|
-
* @type {boolean}
|
|
51
44
|
* @memberof DropdownCustomFieldProps
|
|
52
45
|
*/
|
|
53
46
|
multiSelect?: boolean;
|
|
54
47
|
/**
|
|
55
48
|
* An array of values to select for
|
|
56
49
|
*
|
|
57
|
-
* @type {string[]}
|
|
58
50
|
* @memberof DropdownCustomFieldProps
|
|
59
51
|
*/
|
|
60
52
|
allValues: string[] | undefined;
|
|
61
53
|
/**
|
|
62
54
|
* Used for field validation by React Hook Form library it dynamically set the value of a registered field and have the options to validate and update the form state. At the same time, it tries to avoid unnecessary rerender.
|
|
63
55
|
*
|
|
64
|
-
* @type UseFormSetValue<FieldValues>
|
|
65
56
|
* @memberof DropdownCustomFieldProps
|
|
66
57
|
*/
|
|
67
58
|
setValue?: UseFormSetValue<FieldValues>;
|
|
68
59
|
/**
|
|
69
60
|
* This method allows you to register an input or select element and apply validation rules to React Hook Form. Validation rules are all based on the HTML standard and also allow for custom validation methods.
|
|
70
61
|
*
|
|
71
|
-
* @type UseFormSetValue<FieldValues>
|
|
72
62
|
* @memberof DropdownCustomFieldProps
|
|
73
63
|
*/
|
|
74
64
|
register?: UseFormRegister<FieldValues>;
|
|
75
65
|
/**
|
|
76
66
|
* Validation rules that can be passed to the field, they can be pass along with error messages. Rules are described here https://react-hook-form.com/api/useform/register
|
|
77
67
|
*
|
|
78
|
-
* @type ValidationRules
|
|
79
68
|
* @memberof DropdownCustomFieldProps
|
|
80
69
|
*/
|
|
81
70
|
validationRules?: RegisterOptions;
|
|
82
71
|
/**
|
|
83
72
|
* A custom handler for the onBlur event
|
|
84
73
|
*
|
|
85
|
-
* @type {OnBlur}
|
|
86
74
|
* @memberof DropdownCustomFieldProps
|
|
87
75
|
*/
|
|
88
76
|
onBlur?: OnBlur;
|
|
89
77
|
/**
|
|
90
78
|
* If a value is set, the field is rendered in its invalid state.
|
|
91
79
|
*
|
|
92
|
-
* @type string
|
|
93
80
|
* @memberof DropdownCustomFieldProps
|
|
94
81
|
*/
|
|
95
82
|
errorMessage?: string;
|
|
@@ -97,7 +84,6 @@ export interface DropdownCustomFieldProps extends FormGroupExposedProps {
|
|
|
97
84
|
* A boolean flag to set a component into invalid state
|
|
98
85
|
* which means that selected value is breaking validation rules
|
|
99
86
|
*
|
|
100
|
-
* @type boolean
|
|
101
87
|
* @memberof DropdownCustomFieldProps
|
|
102
88
|
*/
|
|
103
89
|
isInvalid?: boolean;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/custom-field-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.104",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@trackunit/react-core-contexts-test": "0.0.32",
|
|
8
|
-
"@trackunit/react-components": "0.0.
|
|
8
|
+
"@trackunit/react-components": "0.0.119",
|
|
9
9
|
"react": "17.0.1",
|
|
10
10
|
"react-hook-form": "^7.29.0",
|
|
11
11
|
"@trackunit/iris-app-runtime-core": "0.0.62",
|