1
1
import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
2
2
import { ReactNode } from "react" ;
3
3
import FormGroupProps from "./form-group" ;
4
+ import { FormGroupProps as FormGrpProps , ListProps , ToolbarProps , TextInputProps , ButtonProps , GridProps , GridItemProps , TextContentProps , FlexProps , FlexItemProps } from "@patternfly/react-core" ;
5
+ import { SVGIconProps } from "@patternfly/react-icons/dist/js/createIcon" ;
4
6
5
7
export interface DualListSelectOption extends AnyObject {
6
8
value ?: any ;
@@ -16,6 +18,14 @@ export interface RenderStatusFunction {
16
18
( input : RenderStatusInput ) : ReactNode ;
17
19
}
18
20
21
+ export interface VoidFunction {
22
+ ( ) : void ;
23
+ }
24
+
25
+ export interface HandleOptionsFunction {
26
+ ( e : any , value : any ) : void ;
27
+ }
28
+
19
29
interface InternalDualListSelectProps {
20
30
leftTitle ?: ReactNode ;
21
31
rightTitle ?: ReactNode ;
@@ -25,15 +35,81 @@ interface InternalDualListSelectProps {
25
35
allToRight ?: boolean ;
26
36
moveAllLeftTitle ?: ReactNode ;
27
37
moveAllRightTitle ?: ReactNode ;
38
+ label ?: ReactNode ;
39
+ isRequired ?: boolean ;
40
+ helperText ?: ReactNode ;
28
41
noValueTitle ?: ReactNode ;
29
42
noOptionsTitle ?: ReactNode ;
30
43
filterOptionsTitle ?: ReactNode ;
31
44
filterValueTitle ?: ReactNode ;
32
45
filterValueText ?: ReactNode ;
33
46
filterOptionsText ?: ReactNode ;
34
- leftValues : DualListSelectOption [ ] ;
35
- rightValues : DualListSelectOption [ ] ;
47
+ description ?: ReactNode ;
48
+ hideLabel ?: boolean ;
49
+ id ?: string ;
50
+ state ?: AnyObject ,
51
+ sortOptions ?: VoidFunction ,
52
+ filterOptions ?: VoidFunction ,
53
+ leftValues ?: DualListSelectOption [ ] ;
54
+ rightValues ?: DualListSelectOption [ ] ;
36
55
renderStatus ?: RenderStatusFunction ;
56
+ handleOptionsClick ?: HandleOptionsFunction ,
57
+ handleMoveRight : VoidFunction ,
58
+ handleMoveLeft : VoidFunction ,
59
+ handleClearLeftValues : VoidFunction ,
60
+ handleClearRightValues : VoidFunction ,
61
+ sortValues : VoidFunction ,
62
+ filterValues : VoidFunction ,
63
+ handleValuesClick : HandleOptionsFunction ,
64
+ FormGroupProps : FormGrpProps ,
65
+ ListProps : ListProps ,
66
+ LeftListProps : ListProps ,
67
+ RightListProps : ListProps ,
68
+ ListItemProps : React . HTMLProps < HTMLDivElement > ,
69
+ LeftListItemProps : React . HTMLProps < HTMLDivElement > ,
70
+ RightListItemProps : React . HTMLProps < HTMLDivElement > ,
71
+ ToolbarProps : ToolbarProps ,
72
+ LeftToolbarProps : ToolbarProps ,
73
+ RightToolbarProps : ToolbarProps ,
74
+ FilterFieldProps : TextInputProps ,
75
+ LeftFilterFieldProps : TextInputProps ,
76
+ RightFilterFieldProps : TextInputProps ,
77
+ SearchIconProps : SVGIconProps ,
78
+ LeftSearchIconProps : SVGIconProps ,
79
+ RightSearchIconProps : SVGIconProps ,
80
+ SearchIconButtonProps : ButtonProps ,
81
+ LeftSearchIconButtonProps : ButtonProps ,
82
+ RightSearchIconButtonProps : ButtonProps ,
83
+ SortIconButtonProps : ButtonProps ,
84
+ LeftSortIconButtonProps : ButtonProps ,
85
+ RightSortIconButtonProps : ButtonProps ,
86
+ SortIconProps : SVGIconProps ,
87
+ LeftSortIconProps : SVGIconProps ,
88
+ RightSortIconProps : SVGIconProps ,
89
+ InternalGridProps : GridProps ,
90
+ ListGridProps : GridItemProps ,
91
+ LeftListGridProps : GridItemProps ,
92
+ RightListGridProps : GridItemProps ,
93
+ TitleProps : TextContentProps ,
94
+ LeftTitleProps : TextContentProps ,
95
+ RightTitleProps : TextContentProps ,
96
+ ButtonsGridProps : GridItemProps ,
97
+ ButtonsInternalFlexProps : FlexProps ,
98
+ ButtonFlexProps : FlexItemProps ,
99
+ ToRightFlexProps : FlexItemProps ,
100
+ IconButtonProps : ButtonProps ,
101
+ ToRightIconButtonProps : ButtonProps ,
102
+ IconProps : SVGIconProps ,
103
+ AllToRightFlexProps : FlexItemProps ,
104
+ AllToRightIconButtonProps : ButtonProps ,
105
+ AllToLeftFlexProps : FlexProps ,
106
+ AllToLeftIconButtonProps : ButtonProps ,
107
+ ToLeftFlexProps : FlexProps ,
108
+ ToLeftIconButtonProps : ButtonProps ,
109
+ ToRightIconProps : SVGIconProps ,
110
+ AllToRightIconProps : SVGIconProps ,
111
+ AllToLeftIconProps : SVGIconProps ,
112
+ ToLeftIconProps : SVGIconProps
37
113
}
38
114
39
115
export type DualListSelectProps = InternalDualListSelectProps & FormGroupProps & UseFieldApiComponentConfig ;
0 commit comments