forked from renrizzolo/react-native-sectioned-multi-select
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
154 lines (152 loc) · 5.21 KB
/
index.d.ts
File metadata and controls
154 lines (152 loc) · 5.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import * as React from 'react'
import * as ReactNative from 'react-native'
export interface Styles {
container?: ReactNative.StyleProp<ReactNative.ViewStyle>
modalWrapper?: ReactNative.StyleProp<ReactNative.ViewStyle>
selectToggle?: ReactNative.StyleProp<ReactNative.ViewStyle>
selectToggleText?: ReactNative.StyleProp<ReactNative.TextStyle>
item?: ReactNative.StyleProp<ReactNative.ViewStyle>
subItem?: ReactNative.StyleProp<ReactNative.ViewStyle>
itemText?: ReactNative.StyleProp<ReactNative.TextStyle>
selectedItemText?: ReactNative.StyleProp<ReactNative.TextStyle>
selectedSubItemText?: ReactNative.StyleProp<ReactNative.TextStyle>
subItemText?: ReactNative.StyleProp<ReactNative.TextStyle>
searchBar?: ReactNative.StyleProp<ReactNative.ViewStyle>
center?: ReactNative.StyleProp<ReactNative.ViewStyle>
separator?: ReactNative.StyleProp<ReactNative.ViewStyle>
subSeparator?: ReactNative.StyleProp<ReactNative.ViewStyle>
chipsWrapper?: ReactNative.StyleProp<ReactNative.ViewStyle>
chipContainer?: ReactNative.StyleProp<ReactNative.ViewStyle>
chipText?: ReactNative.StyleProp<ReactNative.TextStyle>
chipIcon?: ReactNative.StyleProp<ReactNative.ViewStyle>
searchTextInput?: ReactNative.StyleProp<ReactNative.TextStyle>
scrollView?: ReactNative.StyleProp<ReactNative.ViewStyle>
button?: ReactNative.StyleProp<ReactNative.ViewStyle>
cancelButton?: ReactNative.StyleProp<ReactNative.ViewStyle>
confirmText?: ReactNative.StyleProp<ReactNative.TextStyle>
toggleIcon?: ReactNative.StyleProp<ReactNative.ViewStyle>
selectedItem?: ReactNative.StyleProp<ReactNative.ViewStyle>
selectedSubItem?: ReactNative.StyleProp<ReactNative.ViewStyle>
backdrop?: ReactNative.StyleProp<ReactNative.ViewStyle>
listContainer?: ReactNative.StyleProp<ReactNative.ViewStyle>
}
export interface SectionedMultiSelectProps<ItemType> {
single?: boolean
selectedItems?: any[]
items?: ItemType[]
displayKey?: string
uniqueKey: string
subKey?: string
onSelectedItemsChange: (items: ItemType[]) => void
showDropDowns?: boolean
showChips?: boolean
readOnlyHeadings?: boolean
selectText?: string
selectedText?: string | (() => void)
renderSelectText?: (props: object) => void
confirmText?: string
hideConfirm?: boolean
styles?: Styles
colors?: {
primary?: string
success?: string
cancel?: string
text?: string
subText?: string
selectToggleTextColor?: string
searchPlaceholderTextColor?: string
searchSelectionColor?: string
chipColor?: string
itemBackground?: string
subItemBackground?: string
disabled?: string
}
searchPlaceholderText?: string
noResultsComponent?: (() => void) | JSX.Element
loadingComponent?: (() => void) | JSX.Element
loading?: boolean
subItemFontFamily?: object
itemFontFamily?: object
searchTextFontFamily?: object
confirmFontFamily?: object
showRemoveAll?: boolean
removeAllText?: string
modalSupportedOrientations?: ReactNative.ModalProps['supportedOrientations']
modalAnimationType?: string
modalWithSafeAreaView?: boolean
modalWithTouchable?: boolean
hideSearch?: boolean
footerComponent?: (() => void) | JSX.Element
stickyFooterComponent?: (() => void) | JSX.Element
selectToggleIconComponent?: (() => void) | JSX.Element
cancelIconComponent?: (() => void) | JSX.Element
searchIconComponent?: (() => void) | JSX.Element
selectedIconComponent?: (() => void) | JSX.Element
unselectedIconComponent?: (() => void) | JSX.Element
dropDownToggleIconUpComponent?: (() => void) | JSX.Element
dropDownToggleIconDownComponent?: (() => void) | JSX.Element
chipRemoveIconComponent?: (() => void) | JSX.Element
selectChildren?: boolean
highlightChildren?: boolean
onSelectedItemObjectsChange?: (items: ItemType[]) => void
itemNumberOfLines?: number
selectLabelNumberOfLines?: number
showCancelButton?: boolean
hideSelect?: boolean
onConfirm?: () => void
onCancel?: () => void
headerComponent?: (() => void) | JSX.Element
alwaysShowSelectText?: boolean
searchAdornment?: (searchText: string) => void
expandDropDowns?: boolean
animateDropDowns?: boolean
customLayoutAnimation?: object
onChangeSearchText?: (searchTerm: string) => void
filterItems?: (searchTerm: string) => void
onToggleSelector?: (selected: boolean) => void
noItemsComponent?: (() => void) | JSX.Element
customChipsRenderer?: (chipProperties: object) => void
chipsPosition?: 'top' | 'bottom'
autoFocus?: boolean
iconKey?: string
disabled?: boolean
selectedIconOnLeft?: boolean
parentChipsRemoveChildren?: boolean
IconRenderer?: (() => void) | JSX.Element
itemsFlatListProps?: Omit<ReactNative.FlatListProps<T>, 'data' | 'renderItem'>
subItemsFlatListProps?: Omit<
ReactNative.FlatListProps<T>,
'data' | 'renderItem'
>
icons: {
search: {
name: string
size: number
}
arrowUp: {
name: string
size: number
}
arrowDown: {
name: string
size: number
}
close: {
name: string
size: number
}
check: {
name: string
size: number
}
cancel: {
name: string
size: number
}
}
}
export default class SectionedMultiSelect<ItemType> extends React.Component<
SectionedMultiSelectProps<ItemType>
> {
_toggleSelector: () => void
}