11import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
22import { ReactNode } from "react" ;
33import 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" ;
46
57export interface DualListSelectOption extends AnyObject {
68 value ?: any ;
@@ -16,6 +18,14 @@ export interface RenderStatusFunction {
1618 ( input : RenderStatusInput ) : ReactNode ;
1719}
1820
21+ export interface VoidFunction {
22+ ( ) : void ;
23+ }
24+
25+ export interface HandleOptionsFunction {
26+ ( e : any , value : any ) : void ;
27+ }
28+
1929interface InternalDualListSelectProps {
2030 leftTitle ?: ReactNode ;
2131 rightTitle ?: ReactNode ;
@@ -25,15 +35,81 @@ interface InternalDualListSelectProps {
2535 allToRight ?: boolean ;
2636 moveAllLeftTitle ?: ReactNode ;
2737 moveAllRightTitle ?: ReactNode ;
38+ label ?: ReactNode ;
39+ isRequired ?: boolean ;
40+ helperText ?: ReactNode ;
2841 noValueTitle ?: ReactNode ;
2942 noOptionsTitle ?: ReactNode ;
3043 filterOptionsTitle ?: ReactNode ;
3144 filterValueTitle ?: ReactNode ;
3245 filterValueText ?: ReactNode ;
3346 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 [ ] ;
3655 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
37113}
38114
39115export type DualListSelectProps = InternalDualListSelectProps & FormGroupProps & UseFieldApiComponentConfig ;
0 commit comments