react-native-input-select 1.3.6 → 1.3.8
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/lib/commonjs/components/CheckBox/checkbox.types.js.map +1 -1
- package/lib/commonjs/components/CheckBox/index.js +22 -25
- package/lib/commonjs/components/CheckBox/index.js.map +1 -1
- package/lib/commonjs/components/CustomModal/index.js +23 -26
- package/lib/commonjs/components/CustomModal/index.js.map +1 -1
- package/lib/commonjs/components/Dropdown/Dropdown.js +30 -30
- package/lib/commonjs/components/Dropdown/Dropdown.js.map +1 -1
- package/lib/commonjs/components/Dropdown/DropdownFlatList.js +39 -44
- package/lib/commonjs/components/Dropdown/DropdownFlatList.js.map +1 -1
- package/lib/commonjs/components/Dropdown/DropdownListItem.js +22 -24
- package/lib/commonjs/components/Dropdown/DropdownListItem.js.map +1 -1
- package/lib/commonjs/components/Dropdown/DropdownSectionList.js +47 -54
- package/lib/commonjs/components/Dropdown/DropdownSectionList.js.map +1 -1
- package/lib/commonjs/components/Dropdown/DropdownSelectedItemsView.js +48 -57
- package/lib/commonjs/components/Dropdown/DropdownSelectedItemsView.js.map +1 -1
- package/lib/commonjs/components/Input/index.js +13 -15
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Others/index.js +18 -22
- package/lib/commonjs/components/Others/index.js.map +1 -1
- package/lib/commonjs/constants/index.js +3 -6
- package/lib/commonjs/constants/index.js.map +1 -1
- package/lib/commonjs/index.js +106 -91
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/colors.js +1 -2
- package/lib/commonjs/styles/colors.js.map +1 -1
- package/lib/commonjs/styles/input.js +1 -2
- package/lib/commonjs/styles/input.js.map +1 -1
- package/lib/commonjs/styles/typography.js +1 -2
- package/lib/commonjs/styles/typography.js.map +1 -1
- package/lib/commonjs/types/index.types.js.map +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/components/CheckBox/checkbox.types.js.map +1 -1
- package/lib/module/components/CheckBox/index.js +20 -22
- package/lib/module/components/CheckBox/index.js.map +1 -1
- package/lib/module/components/CustomModal/index.js +21 -23
- package/lib/module/components/CustomModal/index.js.map +1 -1
- package/lib/module/components/Dropdown/Dropdown.js +28 -27
- package/lib/module/components/Dropdown/Dropdown.js.map +1 -1
- package/lib/module/components/Dropdown/DropdownFlatList.js +35 -39
- package/lib/module/components/Dropdown/DropdownFlatList.js.map +1 -1
- package/lib/module/components/Dropdown/DropdownListItem.js +18 -19
- package/lib/module/components/Dropdown/DropdownListItem.js.map +1 -1
- package/lib/module/components/Dropdown/DropdownSectionList.js +43 -49
- package/lib/module/components/Dropdown/DropdownSectionList.js.map +1 -1
- package/lib/module/components/Dropdown/DropdownSelectedItemsView.js +46 -54
- package/lib/module/components/Dropdown/DropdownSelectedItemsView.js.map +1 -1
- package/lib/module/components/Input/index.js +10 -11
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Others/index.js +17 -21
- package/lib/module/components/Others/index.js.map +1 -1
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/index.js +104 -88
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/colors.js.map +1 -1
- package/lib/module/styles/input.js.map +1 -1
- package/lib/module/styles/typography.js.map +1 -1
- package/lib/module/types/index.types.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/jest-setup.d.ts +2 -0
- package/lib/typescript/jest-setup.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/CheckBox/checkbox.types.d.ts +1 -0
- package/lib/typescript/src/components/CheckBox/checkbox.types.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/CheckBox/index.d.ts +3 -2
- package/lib/typescript/src/components/CheckBox/index.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomModal/index.d.ts +6 -0
- package/lib/typescript/src/components/CustomModal/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Dropdown/Dropdown.d.ts +4 -0
- package/lib/typescript/src/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/Dropdown/DropdownFlatList.d.ts +3 -2
- package/lib/typescript/src/components/Dropdown/DropdownFlatList.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/Dropdown/DropdownListItem.d.ts +2 -1
- package/lib/typescript/src/components/Dropdown/DropdownListItem.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/Dropdown/DropdownSectionList.d.ts +3 -2
- package/lib/typescript/src/components/Dropdown/DropdownSectionList.d.ts.map +1 -0
- package/lib/typescript/src/components/Dropdown/DropdownSelectedItemsView.d.ts +4 -0
- package/lib/typescript/src/components/Dropdown/DropdownSelectedItemsView.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/Input/index.d.ts +3 -2
- package/lib/typescript/src/components/Input/index.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/Others/index.d.ts +8 -7
- package/lib/typescript/src/components/Others/index.d.ts.map +1 -0
- package/lib/typescript/{constants → src/constants}/index.d.ts +1 -0
- package/lib/typescript/src/constants/index.d.ts.map +1 -0
- package/lib/typescript/{index.d.ts → src/index.d.ts} +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/styles/colors.d.ts +2 -0
- package/lib/typescript/src/styles/colors.d.ts.map +1 -0
- package/lib/typescript/{styles → src/styles}/input.d.ts +1 -0
- package/lib/typescript/src/styles/input.d.ts.map +1 -0
- package/lib/typescript/src/styles/typography.d.ts +2 -0
- package/lib/typescript/src/styles/typography.d.ts.map +1 -0
- package/lib/typescript/{types → src/types}/index.types.d.ts +6 -2
- package/lib/typescript/src/types/index.types.d.ts.map +1 -0
- package/lib/typescript/{utils → src/utils}/index.d.ts +1 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/package.json +28 -21
- package/src/components/CustomModal/index.tsx +5 -3
- package/src/components/Dropdown/Dropdown.tsx +4 -2
- package/src/components/Dropdown/DropdownSelectedItemsView.tsx +5 -5
- package/src/index.tsx +37 -7
- package/src/types/index.types.ts +4 -2
- package/lib/typescript/components/CustomModal/index.d.ts +0 -5
- package/lib/typescript/components/Dropdown/Dropdown.d.ts +0 -3
- package/lib/typescript/components/Dropdown/DropdownSelectedItemsView.d.ts +0 -3
- package/lib/typescript/styles/colors.d.ts +0 -1
- package/lib/typescript/styles/typography.d.ts +0 -1
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
/* eslint-disable react-native/no-inline-styles */
|
|
3
3
|
import React, { useEffect, useState, useRef } from 'react';
|
|
4
4
|
import { SectionList, StyleSheet } from 'react-native';
|
|
5
5
|
import DropdownListItem from './DropdownListItem';
|
|
6
6
|
import { ItemSeparatorComponent, ListEmptyComponent, SectionHeaderTitle } from '../Others';
|
|
7
7
|
import { extractPropertyFromArray } from '../../utils';
|
|
8
|
-
const DropdownSectionList =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = _ref;
|
|
8
|
+
const DropdownSectionList = ({
|
|
9
|
+
options,
|
|
10
|
+
optionLabel,
|
|
11
|
+
optionValue,
|
|
12
|
+
isMultiple,
|
|
13
|
+
isSearchable,
|
|
14
|
+
selectedItems,
|
|
15
|
+
selectedItem,
|
|
16
|
+
handleMultipleSelections,
|
|
17
|
+
handleSingleSelection,
|
|
18
|
+
primaryColor,
|
|
19
|
+
checkboxSize,
|
|
20
|
+
checkboxStyle,
|
|
21
|
+
checkboxLabelStyle,
|
|
22
|
+
checkboxComponentStyles,
|
|
23
|
+
checkboxComponent,
|
|
24
|
+
checkboxControls,
|
|
25
|
+
listComponentStyles,
|
|
26
|
+
listIndex,
|
|
27
|
+
emptyListMessage,
|
|
28
|
+
...rest
|
|
29
|
+
}) => {
|
|
31
30
|
const [expandedSections, setExpandedSections] = useState(new Set());
|
|
32
31
|
|
|
33
32
|
/**
|
|
@@ -60,8 +59,7 @@ const DropdownSectionList = _ref => {
|
|
|
60
59
|
|
|
61
60
|
const sectionlistRef = useRef(null);
|
|
62
61
|
const scrollToLocation = listIndex => {
|
|
63
|
-
|
|
64
|
-
sectionlistRef === null || sectionlistRef === void 0 || (_sectionlistRef$curre = sectionlistRef.current) === null || _sectionlistRef$curre === void 0 ? void 0 : _sectionlistRef$curre.scrollToLocation({
|
|
62
|
+
sectionlistRef?.current?.scrollToLocation({
|
|
65
63
|
sectionIndex: listIndex.sectionIndex,
|
|
66
64
|
animated: true,
|
|
67
65
|
itemIndex: listIndex.itemIndex
|
|
@@ -77,14 +75,14 @@ const DropdownSectionList = _ref => {
|
|
|
77
75
|
extraData: isMultiple ? selectedItems : selectedItem,
|
|
78
76
|
initialNumToRender: 5,
|
|
79
77
|
ListEmptyComponent: /*#__PURE__*/React.createElement(ListEmptyComponent, {
|
|
80
|
-
listEmptyComponentStyle: listComponentStyles
|
|
78
|
+
listEmptyComponentStyle: listComponentStyles?.listEmptyComponentStyle,
|
|
81
79
|
emptyListMessage: emptyListMessage
|
|
82
80
|
}),
|
|
83
81
|
contentContainerStyle: [isSearchable ? {
|
|
84
82
|
paddingTop: 0
|
|
85
83
|
} : styles.contentContainerStyle],
|
|
86
84
|
ItemSeparatorComponent: () => /*#__PURE__*/React.createElement(ItemSeparatorComponent, {
|
|
87
|
-
itemSeparatorStyle: listComponentStyles
|
|
85
|
+
itemSeparatorStyle: listComponentStyles?.itemSeparatorStyle
|
|
88
86
|
}),
|
|
89
87
|
renderItem: item => _renderItem(item, {
|
|
90
88
|
optionLabel,
|
|
@@ -106,19 +104,16 @@ const DropdownSectionList = _ref => {
|
|
|
106
104
|
checkboxControls,
|
|
107
105
|
expandedSections
|
|
108
106
|
}),
|
|
109
|
-
renderSectionHeader:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
isExpanded: expandedSections.has(title)
|
|
120
|
-
});
|
|
121
|
-
},
|
|
107
|
+
renderSectionHeader: ({
|
|
108
|
+
section: {
|
|
109
|
+
title
|
|
110
|
+
}
|
|
111
|
+
}) => /*#__PURE__*/React.createElement(SectionHeaderTitle, {
|
|
112
|
+
title: title,
|
|
113
|
+
sectionHeaderStyle: listComponentStyles?.sectionHeaderStyle,
|
|
114
|
+
onPress: () => handleToggleListExpansion(title),
|
|
115
|
+
isExpanded: expandedSections.has(title)
|
|
116
|
+
}),
|
|
122
117
|
keyExtractor: (_item, index) => `Options${index}`,
|
|
123
118
|
stickySectionHeadersEnabled: false,
|
|
124
119
|
ref: sectionlistRef,
|
|
@@ -129,14 +124,13 @@ const DropdownSectionList = _ref => {
|
|
|
129
124
|
}
|
|
130
125
|
}, rest));
|
|
131
126
|
};
|
|
132
|
-
const _renderItem = (
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const isExpanded = props === null || props === void 0 ? void 0 : props.expandedSections.has(title);
|
|
127
|
+
const _renderItem = ({
|
|
128
|
+
section: {
|
|
129
|
+
title
|
|
130
|
+
},
|
|
131
|
+
item
|
|
132
|
+
}, props) => {
|
|
133
|
+
const isExpanded = props?.expandedSections.has(title);
|
|
140
134
|
|
|
141
135
|
//return null if it is not expanded
|
|
142
136
|
if (!isExpanded) return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","useRef","SectionList","StyleSheet","DropdownListItem","ItemSeparatorComponent","ListEmptyComponent","SectionHeaderTitle","extractPropertyFromArray","DropdownSectionList","_ref","options","optionLabel","optionValue","isMultiple","isSearchable","selectedItems","selectedItem","handleMultipleSelections","handleSingleSelection","primaryColor","checkboxSize","checkboxStyle","checkboxLabelStyle","checkboxComponentStyles","checkboxComponent","checkboxControls","listComponentStyles","listIndex","emptyListMessage","rest","expandedSections","setExpandedSections","Set","initialState","handleToggleListExpansion","title","expandedSectionsState","next","has","delete","add","sectionlistRef","scrollToLocation","_sectionlistRef$curre","current","sectionIndex","animated","itemIndex","createElement","_extends","sections","extraData","initialNumToRender","listEmptyComponentStyle","contentContainerStyle","paddingTop","styles","itemSeparatorStyle","renderItem","item","_renderItem","selectedOption","onChange","renderSectionHeader","_ref2","section","sectionHeaderStyle","onPress","isExpanded","keyExtractor","_item","index","stickySectionHeadersEnabled","ref","onScrollToIndexFailed","setTimeout","_ref3","props","create"],"sources":["DropdownSectionList.tsx"],"sourcesContent":["/* eslint-disable react-native/no-inline-styles */\nimport React, { useEffect, useState, useRef } from 'react';\nimport { SectionList, StyleSheet } from 'react-native';\nimport DropdownListItem from './DropdownListItem';\nimport {\n ItemSeparatorComponent,\n ListEmptyComponent,\n SectionHeaderTitle,\n} from '../Others';\nimport { extractPropertyFromArray } from '../../utils';\nimport { TSectionList } from 'src/types/index.types';\n\nconst DropdownSectionList = ({\n options,\n optionLabel,\n optionValue,\n isMultiple,\n isSearchable,\n selectedItems,\n selectedItem,\n handleMultipleSelections,\n handleSingleSelection,\n primaryColor,\n checkboxSize,\n checkboxStyle,\n checkboxLabelStyle,\n checkboxComponentStyles,\n checkboxComponent,\n checkboxControls,\n listComponentStyles,\n listIndex,\n emptyListMessage,\n ...rest\n}: any) => {\n const [expandedSections, setExpandedSections] = useState(new Set());\n\n /**\n * Expand all sections\n */\n useEffect(() => {\n let initialState = new Set(extractPropertyFromArray(options, 'title'));\n setExpandedSections(initialState);\n }, [options]);\n\n /**\n * @param title\n */\n const handleToggleListExpansion = (title: string) => {\n setExpandedSections((expandedSectionsState) => {\n // Using Set here but you can use an array too\n const next = new Set(expandedSectionsState);\n if (next.has(title)) {\n next.delete(title);\n } else {\n next.add(title);\n }\n return next;\n });\n };\n\n /**\n * @description Scroll to item location\n */\n\n const sectionlistRef = useRef<SectionList<TSectionList>>(null);\n\n const scrollToLocation = (listIndex: any) => {\n sectionlistRef?.current?.scrollToLocation({\n sectionIndex: listIndex.sectionIndex,\n animated: true,\n itemIndex: listIndex.itemIndex,\n });\n };\n\n useEffect(() => {\n if (listIndex.itemIndex >= 0 && listIndex.sectionIndex >= 0) {\n scrollToLocation(listIndex);\n }\n }, [listIndex]);\n\n return (\n <SectionList\n sections={options}\n extraData={isMultiple ? selectedItems : selectedItem}\n initialNumToRender={5}\n ListEmptyComponent={\n <ListEmptyComponent\n listEmptyComponentStyle={listComponentStyles?.listEmptyComponentStyle}\n emptyListMessage={emptyListMessage}\n />\n }\n contentContainerStyle={[\n isSearchable ? { paddingTop: 0 } : styles.contentContainerStyle,\n ]}\n ItemSeparatorComponent={() => (\n <ItemSeparatorComponent\n itemSeparatorStyle={listComponentStyles?.itemSeparatorStyle}\n />\n )}\n renderItem={(item) =>\n _renderItem(item, {\n optionLabel,\n optionValue,\n isMultiple,\n selectedOption: isMultiple ? selectedItems : selectedItem,\n onChange: isMultiple\n ? handleMultipleSelections\n : handleSingleSelection,\n primaryColor,\n checkboxSize, // kept for backwards compatibility\n checkboxStyle, // kept for backwards compatibility\n checkboxLabelStyle, // kept for backwards compatibility\n checkboxComponentStyles, // kept for backwards compatibility\n checkboxComponent, // kept for backwards compatibility\n checkboxControls,\n expandedSections,\n })\n }\n renderSectionHeader={({ section: { title } }) => (\n <SectionHeaderTitle\n title={title}\n sectionHeaderStyle={listComponentStyles?.sectionHeaderStyle}\n onPress={() => handleToggleListExpansion(title)}\n isExpanded={expandedSections.has(title)}\n />\n )}\n keyExtractor={(_item, index) => `Options${index}`}\n stickySectionHeadersEnabled={false}\n ref={sectionlistRef}\n onScrollToIndexFailed={() => {\n setTimeout(() => {\n scrollToLocation(listIndex);\n }, 500);\n }}\n {...rest}\n />\n );\n};\n\nconst _renderItem = ({ section: { title }, item }: any, props: any) => {\n const isExpanded = props?.expandedSections.has(title);\n\n //return null if it is not expanded\n if (!isExpanded) return null;\n\n return (\n <DropdownListItem\n item={item}\n optionLabel={props.optionLabel}\n optionValue={props.optionValue}\n isMultiple={props.isMultiple}\n selectedOption={props.selectedOption}\n onChange={props.onChange}\n primaryColor={props.primaryColor}\n checkboxSize={props.checkboxSize}\n checkboxStyle={props.checkboxStyle}\n checkboxLabelStyle={props.checkboxLabelStyle}\n checkboxComponentStyles={props.checkboxComponentStyles}\n checkboxComponent={props.checkboxComponent}\n checkboxControls={props.checkboxControls}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n contentContainerStyle: { paddingTop: 20 },\n});\n\nexport default DropdownSectionList;\n"],"mappings":";AAAA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,OAAO;AAC1D,SAASC,WAAW,EAAEC,UAAU,QAAQ,cAAc;AACtD,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SACEC,sBAAsB,EACtBC,kBAAkB,EAClBC,kBAAkB,QACb,WAAW;AAClB,SAASC,wBAAwB,QAAQ,aAAa;AAGtD,MAAMC,mBAAmB,GAAGC,IAAA,IAqBjB;EAAA,IArBkB;IAC3BC,OAAO;IACPC,WAAW;IACXC,WAAW;IACXC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,YAAY;IACZC,wBAAwB;IACxBC,qBAAqB;IACrBC,YAAY;IACZC,YAAY;IACZC,aAAa;IACbC,kBAAkB;IAClBC,uBAAuB;IACvBC,iBAAiB;IACjBC,gBAAgB;IAChBC,mBAAmB;IACnBC,SAAS;IACTC,gBAA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,CAACzD,YAAa;IACjCC,aAAa,EAAEwD,KAAK,CAACxD,aAAc;IACnCC,kBAAkB,EAAEuD,KAAK,CAACvD,kBAAmB;IAC7CC,uBAAuB,EAAEsD,KAAK,CAACtD,uBAAwB;IACvDC,iBAAiB,EAAEqD,KAAK,CAACrD,iBAAkB;IAC3CC,gBAAgB,EAAEoD,KAAK,CAACpD;EAAiB,CAC1C,CAAC;AAEN,CAAC;AAED,MAAM+B,MAAM,GAAGtD,UAAU,CAAC4E,MAAM,CAAC;EAC/BxB,qBAAqB,EAAE;IAAEC,UAAU,EAAE;EAAG;AAC1C,CAAC,CAAC;AAEF,eAAe/C,mBAAmB"}
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","useRef","SectionList","StyleSheet","DropdownListItem","ItemSeparatorComponent","ListEmptyComponent","SectionHeaderTitle","extractPropertyFromArray","DropdownSectionList","options","optionLabel","optionValue","isMultiple","isSearchable","selectedItems","selectedItem","handleMultipleSelections","handleSingleSelection","primaryColor","checkboxSize","checkboxStyle","checkboxLabelStyle","checkboxComponentStyles","checkboxComponent","checkboxControls","listComponentStyles","listIndex","emptyListMessage","rest","expandedSections","setExpandedSections","Set","initialState","handleToggleListExpansion","title","expandedSectionsState","next","has","delete","add","sectionlistRef","scrollToLocation","current","sectionIndex","animated","itemIndex","createElement","_extends","sections","extraData","initialNumToRender","listEmptyComponentStyle","contentContainerStyle","paddingTop","styles","itemSeparatorStyle","renderItem","item","_renderItem","selectedOption","onChange","renderSectionHeader","section","sectionHeaderStyle","onPress","isExpanded","keyExtractor","_item","index","stickySectionHeadersEnabled","ref","onScrollToIndexFailed","setTimeout","props","create"],"sourceRoot":"../../../../src","sources":["components/Dropdown/DropdownSectionList.tsx"],"mappings":";AAAA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,OAAO;AAC1D,SAASC,WAAW,EAAEC,UAAU,QAAQ,cAAc;AACtD,OAAOC,gBAAgB,MAAM,oBAAoB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QAAS;IACzB1C,YAAY,EAAEuD,KAAK,CAACvD,YAAa;IACjCC,YAAY,EAAEsD,KAAK,CAACtD,YAAa;IACjCC,aAAa,EAAEqD,KAAK,CAACrD,aAAc;IACnCC,kBAAkB,EAAEoD,KAAK,CAACpD,kBAAmB;IAC7CC,uBAAuB,EAAEmD,KAAK,CAACnD,uBAAwB;IACvDC,iBAAiB,EAAEkD,KAAK,CAAClD,iBAAkB;IAC3CC,gBAAgB,EAAEiD,KAAK,CAACjD;EAAiB,CAC1C,CAAC;AAEN,CAAC;AAED,MAAM8B,MAAM,GAAGpD,UAAU,CAACwE,MAAM,CAAC;EAC/BtB,qBAAqB,EAAE;IAAEC,UAAU,EAAE;EAAG;AAC1C,CAAC,CAAC;AAEF,eAAe7C,mBAAmB","ignoreList":[]}
|
|
@@ -1,48 +1,43 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { View, Text, Pressable, ScrollView, StyleSheet, Image, TouchableOpacity } from 'react-native';
|
|
4
4
|
import { colors } from '../../styles/colors';
|
|
5
5
|
import { inputStyles } from '../../styles/input';
|
|
6
|
-
const DropdownSelectedItemsView =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
setIndexOfSelectedItem
|
|
26
|
-
} = _ref;
|
|
6
|
+
const DropdownSelectedItemsView = ({
|
|
7
|
+
placeholder,
|
|
8
|
+
error,
|
|
9
|
+
getSelectedItemsLabel,
|
|
10
|
+
openModal,
|
|
11
|
+
isMultiple,
|
|
12
|
+
selectedItem,
|
|
13
|
+
selectedItems,
|
|
14
|
+
dropdownIcon,
|
|
15
|
+
dropdownStyle,
|
|
16
|
+
dropdownIconStyle,
|
|
17
|
+
selectedItemStyle,
|
|
18
|
+
placeholderStyle,
|
|
19
|
+
multipleSelectedItemStyle,
|
|
20
|
+
dropdownErrorStyle,
|
|
21
|
+
primaryColor,
|
|
22
|
+
disabled,
|
|
23
|
+
setIndexOfSelectedItem
|
|
24
|
+
}) => {
|
|
27
25
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
28
|
-
onPress: () =>
|
|
29
|
-
style:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
...dropdownErrorStyle
|
|
44
|
-
}];
|
|
45
|
-
},
|
|
26
|
+
onPress: () => openModal(),
|
|
27
|
+
style: ({
|
|
28
|
+
pressed
|
|
29
|
+
}) => [pressed && {
|
|
30
|
+
...inputStyles.inputFocusState,
|
|
31
|
+
borderColor: primaryColor
|
|
32
|
+
}, {
|
|
33
|
+
...inputStyles.input,
|
|
34
|
+
...dropdownStyle
|
|
35
|
+
}, error &&
|
|
36
|
+
//this must be last
|
|
37
|
+
error !== '' && !pressed && {
|
|
38
|
+
...inputStyles.inputFocusErrorState,
|
|
39
|
+
...dropdownErrorStyle
|
|
40
|
+
}],
|
|
46
41
|
disabled: disabled
|
|
47
42
|
}, /*#__PURE__*/React.createElement(ScrollView, {
|
|
48
43
|
horizontal: true,
|
|
@@ -51,12 +46,11 @@ const DropdownSelectedItemsView = _ref => {
|
|
|
51
46
|
}, /*#__PURE__*/React.createElement(View, {
|
|
52
47
|
style: styles.selectedItemsContainer,
|
|
53
48
|
onStartShouldSetResponder: () => true
|
|
54
|
-
}, isMultiple ?
|
|
49
|
+
}, isMultiple ? getSelectedItemsLabel()?.map((label, i) => /*#__PURE__*/React.createElement(DropdownContent, {
|
|
55
50
|
onPress: () => {
|
|
56
|
-
|
|
51
|
+
openModal();
|
|
57
52
|
setIndexOfSelectedItem(label); // immediately scrolls to list item with the specified label when modal
|
|
58
53
|
},
|
|
59
|
-
|
|
60
54
|
key: `react-native-input-select-${Math.random()}-${i}`,
|
|
61
55
|
style: [styles.selectedItems, {
|
|
62
56
|
backgroundColor: primaryColor
|
|
@@ -65,15 +59,14 @@ const DropdownSelectedItemsView = _ref => {
|
|
|
65
59
|
disabled: disabled
|
|
66
60
|
})) : /*#__PURE__*/React.createElement(DropdownContent, {
|
|
67
61
|
onPress: () => {
|
|
68
|
-
|
|
62
|
+
openModal();
|
|
69
63
|
setIndexOfSelectedItem(getSelectedItemsLabel()); // immediately scrolls to list item with the specified label when modal
|
|
70
64
|
},
|
|
71
|
-
|
|
72
65
|
style: [styles.blackText, selectedItemStyle],
|
|
73
66
|
label: getSelectedItemsLabel(),
|
|
74
67
|
disabled: disabled
|
|
75
|
-
}), !selectedItem &&
|
|
76
|
-
onPress: () =>
|
|
68
|
+
}), !selectedItem && selectedItems?.length === 0 && /*#__PURE__*/React.createElement(DropdownContent, {
|
|
69
|
+
onPress: () => openModal(),
|
|
77
70
|
style: [styles.blackText, placeholderStyle],
|
|
78
71
|
label: placeholder ?? 'Select an option',
|
|
79
72
|
disabled: disabled
|
|
@@ -83,13 +76,12 @@ const DropdownSelectedItemsView = _ref => {
|
|
|
83
76
|
source: require('../../asset/arrow-down.png')
|
|
84
77
|
})));
|
|
85
78
|
};
|
|
86
|
-
const DropdownContent =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
} = _ref3;
|
|
79
|
+
const DropdownContent = ({
|
|
80
|
+
onPress,
|
|
81
|
+
style,
|
|
82
|
+
label,
|
|
83
|
+
...rest
|
|
84
|
+
}) => {
|
|
93
85
|
return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
|
|
94
86
|
onPress: () => onPress()
|
|
95
87
|
}, rest), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","Pressable","ScrollView","StyleSheet","Image","TouchableOpacity","colors","inputStyles","DropdownSelectedItemsView","
|
|
1
|
+
{"version":3,"names":["React","View","Text","Pressable","ScrollView","StyleSheet","Image","TouchableOpacity","colors","inputStyles","DropdownSelectedItemsView","placeholder","error","getSelectedItemsLabel","openModal","isMultiple","selectedItem","selectedItems","dropdownIcon","dropdownStyle","dropdownIconStyle","selectedItemStyle","placeholderStyle","multipleSelectedItemStyle","dropdownErrorStyle","primaryColor","disabled","setIndexOfSelectedItem","createElement","onPress","style","pressed","inputFocusState","borderColor","input","inputFocusErrorState","horizontal","alwaysBounceHorizontal","showsHorizontalScrollIndicator","styles","selectedItemsContainer","onStartShouldSetResponder","map","label","i","DropdownContent","key","Math","random","backgroundColor","blackText","length","iconStyle","source","require","rest","_extends","create","position","right","top","flexDirection","flexWrap","alignItems","color","white","paddingHorizontal","paddingVertical","borderRadius","primary","marginRight","overflow","black"],"sourceRoot":"../../../../src","sources":["components/Dropdown/DropdownSelectedItemsView.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,gBAAgB,QACX,cAAc;AACrB,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,WAAW,QAAQ,oBAAoB;AAEhD,MAAMC,yBAAyB,GAAGA,CAAC;EACjCC,WAAW;EACXC,KAAK;EACLC,qBAAqB;EACrBC,SAAS;EACTC,UAAU;EACVC,YAAY;EACZC,aAAa;EACbC,YAAY;EACZC,aAAa;EACbC,iBAAiB;EACjBC,iBAAiB;EACjBC,gBA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AAM,GAAEa,KAAY,CACjB,CAAC;AAEvB,CAAC;AAED,MAAMJ,MAAM,GAAGlC,UAAU,CAACoD,MAAM,CAAC;EAC/BL,SAAS,EAAE;IAAEM,QAAQ,EAAE,UAAU;IAAEC,KAAK,EAAE,EAAE;IAAEC,GAAG,EAAE;EAAG,CAAC;EACvDpB,sBAAsB,EAAE;IACtBqB,aAAa,EAAE,KAAK;IACpBC,QAAQ,EAAE,QAAQ;IAClBC,UAAU,EAAE;EACd,CAAC;EACD9C,aAAa,EAAE;IACb+C,KAAK,EAAExD,MAAM,CAACyD,KAAK;IACnBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE,EAAE;IAChBnB,eAAe,EAAEzC,MAAM,CAAC6D,OAAO;IAC/BC,WAAW,EAAE,EAAE;IACfC,QAAQ,EAAE;EACZ,CAAC;EACDrB,SAAS,EAAE;IAAEc,KAAK,EAAExD,MAAM,CAACgE;EAAM;AACnC,CAAC,CAAC;AAEF,eAAe9D,yBAAyB","ignoreList":[]}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { TextInput, StyleSheet, View, Platform } from 'react-native';
|
|
4
4
|
import { inputStyles } from '../../styles/input';
|
|
5
|
-
export const Input =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
5
|
+
export const Input = ({
|
|
6
|
+
placeholder,
|
|
7
|
+
value,
|
|
8
|
+
onChangeText,
|
|
9
|
+
style,
|
|
10
|
+
primaryColor,
|
|
11
|
+
textInputContainerStyle,
|
|
12
|
+
...rest
|
|
13
|
+
}) => {
|
|
15
14
|
const [isFocused, setFocus] = useState(false);
|
|
16
15
|
return /*#__PURE__*/React.createElement(View, {
|
|
17
16
|
style: [styles.container, textInputContainerStyle]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","TextInput","StyleSheet","View","Platform","inputStyles","Input","
|
|
1
|
+
{"version":3,"names":["React","useState","TextInput","StyleSheet","View","Platform","inputStyles","Input","placeholder","value","onChangeText","style","primaryColor","textInputContainerStyle","rest","isFocused","setFocus","createElement","styles","container","_extends","input","select","web","outlineColor","borderColor","onFocus","onBlur","returnKeyType","create","margin"],"sourceRoot":"../../../../src","sources":["components/Input/index.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACpE,SAASC,WAAW,QAAQ,oBAAoB;AAEhD,OAAO,MAAMC,KAAK,GAAGA,CAAC;EACpBC,WAAW;EACXC,KAAK;EACLC,YAAY;EACZC,KAAK;EACLC,YAAY;EACZC,uBAAuB;EACvB,GAAGC;AACA,CAAC,KAAK;EACT,MAAM,CAACC,SAAS,EAAEC,QAAQ,CAAC,GAAGf,QAAQ,CAAC,KAAK,CAAC;EAE7C,oBACED,KAAA,CAAAiB,aAAA,CAACb,IAAI;IAACO,KAAK,EAAE,CAACO,MAAM,CAACC,SAAS,EAAEN,uBAAuB;EAAE,gBACvDb,KAAA,CAAAiB,aAAA,CAACf,SAAS,EAAAkB,QAAA;IACRZ,WAAW,EAAEA,WAAY;IACzBG,KAAK,EAAE,CACLL,WAAW,CAACe,KAAK,EACjBhB,QAAQ,CAACiB,MAAM,CAAC;MACdC,GAAG,EAAE;QACHC,YAAY,EAAEZ;MAChB;IACF,CAAC,CAAC,EACFG,SAAS,IAAI;MAAEU,WAAW,EAAEb;IAAa,CAAC,EAC1CD,KAAK,CACL;IACFe,OAAO,EAAEA,CAAA,KAAM;MACbV,QAAQ,CAAC,IAAI,CAAC;IAChB,CAAE;IACFW,MAAM,EAAEA,CAAA,KAAMX,QAAQ,CAAC,KAAK,CAAE;IAC9BP,KAAK,EAAEA,KAAM;IACbC,YAAY,EAAEA,YAAa;IAC3BkB,aAAa,EAAC;EAAQ,GAClBd,IAAI,CACT,CACG,CAAC;AAEX,CAAC;AAED,MAAMI,MAAM,GAAGf,UAAU,CAAC0B,MAAM,CAAC;EAC/BV,SAAS,EAAE;IAAEW,MAAM,EAAE;EAAG;AAC1B,CAAC,CAAC;AAEF,eAAevB,KAAK","ignoreList":[]}
|
|
@@ -1,41 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, Text, StyleSheet, TouchableOpacity, Image } from 'react-native';
|
|
3
3
|
import { colors } from '../../styles/colors';
|
|
4
|
-
export const ListEmptyComponent =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = _ref;
|
|
4
|
+
export const ListEmptyComponent = ({
|
|
5
|
+
listEmptyComponentStyle,
|
|
6
|
+
emptyListMessage
|
|
7
|
+
}) => {
|
|
9
8
|
return /*#__PURE__*/React.createElement(View, {
|
|
10
9
|
style: styles.listEmptyComponentStyle
|
|
11
10
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
12
11
|
style: listEmptyComponentStyle
|
|
13
12
|
}, emptyListMessage || 'No options available'));
|
|
14
13
|
};
|
|
15
|
-
export const ItemSeparatorComponent =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref2;
|
|
14
|
+
export const ItemSeparatorComponent = ({
|
|
15
|
+
itemSeparatorStyle
|
|
16
|
+
}) => {
|
|
19
17
|
return /*#__PURE__*/React.createElement(View, {
|
|
20
18
|
style: [styles.itemSeparatorStyle, itemSeparatorStyle]
|
|
21
19
|
});
|
|
22
20
|
};
|
|
23
|
-
export const ListItemContainer =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = _ref3;
|
|
21
|
+
export const ListItemContainer = ({
|
|
22
|
+
children,
|
|
23
|
+
listItemContainerStyle
|
|
24
|
+
}) => {
|
|
28
25
|
return /*#__PURE__*/React.createElement(View, {
|
|
29
26
|
style: [styles.listItemContainerStyle, listItemContainerStyle]
|
|
30
27
|
}, children);
|
|
31
28
|
};
|
|
32
|
-
export const SectionHeaderTitle =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} = _ref4;
|
|
29
|
+
export const SectionHeaderTitle = ({
|
|
30
|
+
title,
|
|
31
|
+
sectionHeaderStyle,
|
|
32
|
+
onPress,
|
|
33
|
+
isExpanded
|
|
34
|
+
}) => {
|
|
39
35
|
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
40
36
|
onPress: onPress
|
|
41
37
|
}, /*#__PURE__*/React.createElement(ListItemContainer, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","TouchableOpacity","Image","colors","ListEmptyComponent","
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","TouchableOpacity","Image","colors","ListEmptyComponent","listEmptyComponentStyle","emptyListMessage","createElement","style","styles","ItemSeparatorComponent","itemSeparatorStyle","ListItemContainer","children","listItemContainerStyle","SectionHeaderTitle","title","sectionHeaderStyle","onPress","isExpanded","accordionStyle","rotatedIcon90","source","require","create","alignItems","width","marginVertical","backgroundColor","gray","height","opacity","paddingHorizontal","paddingVertical","flexDirection","fontWeight","flexWrap","justifyContent","alignContent","transform","rotate"],"sourceRoot":"../../../../src","sources":["components/Others/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SACEC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,gBAAgB,EAEhBC,KAAK,QAEA,cAAc;AACrB,SAASC,MAAM,QAAQ,qBAAqB;AAE5C,OAAO,MA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,EAAEC,OAAO,CAAC,4BAA4B;EAAE,CAAE,CACnD,CACW,CACH,CAAC;AAEvB,CAAC;AAED,MAAMd,MAAM,GAAGT,UAAU,CAACwB,MAAM,CAAC;EAC/BnB,uBAAuB,EAAE;IACvBoB,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAE,MAAM;IACbC,cAAc,EAAE;EAClB,CAAC;EACDhB,kBAAkB,EAAE;IAClBiB,eAAe,EAAEzB,MAAM,CAAC0B,IAAI;IAC5BC,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE;EACX,CAAC;EACDjB,sBAAsB,EAAE;IACtBkB,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBC,aAAa,EAAE,KAAK;IACpBT,UAAU,EAAE;EACd,CAAC;EACDR,kBAAkB,EAAE;IAAEkB,UAAU,EAAE;EAAM,CAAC;EACzCf,cAAc,EAAE;IACdc,aAAa,EAAE,KAAK;IACpBE,QAAQ,EAAE,QAAQ;IAClBC,cAAc,EAAE,eAAe;IAC/BC,YAAY,EAAE;EAChB,CAAC;EACDjB,aAAa,EAAE;IACbkB,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAS,CAAC;EAClC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_OPTION_LABEL","DEFAULT_OPTION_VALUE","CHECKBOX_SIZE"],"
|
|
1
|
+
{"version":3,"names":["DEFAULT_OPTION_LABEL","DEFAULT_OPTION_VALUE","CHECKBOX_SIZE"],"sourceRoot":"../../../src","sources":["constants/index.ts"],"mappings":"AAAA,OAAO,MAAMA,oBAAoB,GAAG,OAAO;AAC3C,OAAO,MAAMC,oBAAoB,GAAG,OAAO;AAC3C,OAAO,MAAMC,aAAa,GAAG,EAAE","ignoreList":[]}
|