@adiraku/react-native-ui 1.2.9 → 1.2.10-canary-2
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/ActionList/ActionList.component.js +14 -6
- package/lib/commonjs/components/ActionList/ActionList.component.js.map +1 -1
- package/lib/commonjs/components/ActionList/ActionList.styles.js +8 -5
- package/lib/commonjs/components/ActionList/ActionList.styles.js.map +1 -1
- package/lib/commonjs/components/countdown/countdown.component.js +7 -2
- package/lib/commonjs/components/countdown/countdown.component.js.map +1 -1
- package/lib/commonjs/components/index.js +26 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/selection-modal/selection-modal.component.js +116 -0
- package/lib/commonjs/components/selection-modal/selection-modal.component.js.map +1 -0
- package/lib/commonjs/components/selection-modal/selection-modal.style.js +20 -0
- package/lib/commonjs/components/selection-modal/selection-modal.style.js.map +1 -0
- package/lib/commonjs/components/selection-modal/selection-modal.type.js +6 -0
- package/lib/commonjs/components/selection-modal/selection-modal.type.js.map +1 -0
- package/lib/module/components/ActionList/ActionList.component.js +14 -6
- package/lib/module/components/ActionList/ActionList.component.js.map +1 -1
- package/lib/module/components/ActionList/ActionList.styles.js +8 -5
- package/lib/module/components/ActionList/ActionList.styles.js.map +1 -1
- package/lib/module/components/countdown/countdown.component.js +7 -2
- package/lib/module/components/countdown/countdown.component.js.map +1 -1
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/selection-modal/selection-modal.component.js +108 -0
- package/lib/module/components/selection-modal/selection-modal.component.js.map +1 -0
- package/lib/module/components/selection-modal/selection-modal.style.js +13 -0
- package/lib/module/components/selection-modal/selection-modal.style.js.map +1 -0
- package/lib/module/components/selection-modal/selection-modal.type.js +2 -0
- package/lib/module/components/selection-modal/selection-modal.type.js.map +1 -0
- package/lib/typescript/components/ActionList/ActionList.component.d.ts.map +1 -1
- package/lib/typescript/components/ActionList/ActionList.styles.d.ts +1 -0
- package/lib/typescript/components/ActionList/ActionList.styles.d.ts.map +1 -1
- package/lib/typescript/components/ActionList/ActionList.type.d.ts +1 -0
- package/lib/typescript/components/ActionList/ActionList.type.d.ts.map +1 -1
- package/lib/typescript/components/countdown/countdown.component.d.ts.map +1 -1
- package/lib/typescript/components/countdown/countdown.type.d.ts +1 -0
- package/lib/typescript/components/countdown/countdown.type.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +2 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/selection-modal/selection-modal.component.d.ts +4 -0
- package/lib/typescript/components/selection-modal/selection-modal.component.d.ts.map +1 -0
- package/lib/typescript/components/selection-modal/selection-modal.style.d.ts +8 -0
- package/lib/typescript/components/selection-modal/selection-modal.style.d.ts.map +1 -0
- package/lib/typescript/components/selection-modal/selection-modal.type.d.ts +22 -0
- package/lib/typescript/components/selection-modal/selection-modal.type.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/components/ActionList/ActionList.component.tsx +35 -20
- package/src/components/ActionList/ActionList.styles.tsx +10 -4
- package/src/components/ActionList/ActionList.type.tsx +2 -0
- package/src/components/countdown/countdown.component.tsx +12 -2
- package/src/components/countdown/countdown.type.ts +2 -0
- package/src/components/index.ts +6 -0
- package/src/components/selection-modal/selection-modal.component.tsx +147 -0
- package/src/components/selection-modal/selection-modal.style.tsx +22 -0
- package/src/components/selection-modal/selection-modal.type.ts +36 -0
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
import React, { useRef, useState } from 'react';
|
|
3
|
+
import { FlatList, View } from 'react-native';
|
|
4
|
+
import { getStyle } from './selection-modal.style';
|
|
5
|
+
import { ActionList } from '../ActionList/ActionList.component';
|
|
6
|
+
import { BottomSheet } from '../BottomSheet/BottomSheet.component';
|
|
7
|
+
import { Button } from '../button/button.component';
|
|
8
|
+
import { Checkbox } from '../Checkbox/Checkbox.component';
|
|
9
|
+
import { RadioButton } from '../RadioButton/RadioButton.component';
|
|
10
|
+
import { IconArrowLeft } from '../../icons';
|
|
11
|
+
export function SelectionModal(props) {
|
|
12
|
+
const {
|
|
13
|
+
type = 'radio',
|
|
14
|
+
renderDisplayComponent,
|
|
15
|
+
listOptions,
|
|
16
|
+
maxSelectedItem = -1,
|
|
17
|
+
bottomSheetOpt,
|
|
18
|
+
saveButtonProps,
|
|
19
|
+
bottomActionContainerStyle,
|
|
20
|
+
onSaveButtonPress = () => {},
|
|
21
|
+
renderCutomBottomAction,
|
|
22
|
+
value = []
|
|
23
|
+
} = props;
|
|
24
|
+
const {
|
|
25
|
+
renderItem,
|
|
26
|
+
...listOptionsRest
|
|
27
|
+
} = listOptions;
|
|
28
|
+
const ref = useRef(null);
|
|
29
|
+
const computedStyles = getStyle();
|
|
30
|
+
const [selectedTemp, setSelectedTemp] = useState(value);
|
|
31
|
+
if (!renderDisplayComponent) {
|
|
32
|
+
console.warn('Please provide renderDisplayComponent props (SelectionModal - adiraku)');
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const renderActionList = ({
|
|
36
|
+
item,
|
|
37
|
+
index
|
|
38
|
+
}) => {
|
|
39
|
+
var _listOptions$data;
|
|
40
|
+
const {
|
|
41
|
+
value: valueItem,
|
|
42
|
+
title,
|
|
43
|
+
disabled,
|
|
44
|
+
...itemRest
|
|
45
|
+
} = item;
|
|
46
|
+
const isSelected = !!(selectedTemp !== null && selectedTemp !== void 0 && selectedTemp.find(i => i.value === valueItem));
|
|
47
|
+
return /*#__PURE__*/React.createElement(ActionList, _extends({
|
|
48
|
+
title: title,
|
|
49
|
+
onPress: () => handleOnItemPress(item),
|
|
50
|
+
trailingComponent: type === 'radio' ? /*#__PURE__*/React.createElement(RadioButton, {
|
|
51
|
+
selected: isSelected,
|
|
52
|
+
disabled: disabled
|
|
53
|
+
}) : /*#__PURE__*/React.createElement(Checkbox, {
|
|
54
|
+
selected: isSelected,
|
|
55
|
+
disabled: disabled
|
|
56
|
+
}),
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
isLast: index === (((_listOptions$data = listOptions.data) === null || _listOptions$data === void 0 ? void 0 : _listOptions$data.length) ?? 0) - 1
|
|
59
|
+
}, itemRest));
|
|
60
|
+
};
|
|
61
|
+
const handleOnItemPress = item => {
|
|
62
|
+
if (type === 'radio') {
|
|
63
|
+
setSelectedTemp([item]);
|
|
64
|
+
} else if (type === 'checkbox') {
|
|
65
|
+
const isItemExist = selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.find(i => i.value === item.value);
|
|
66
|
+
|
|
67
|
+
// Takeout current item if it's in the stack
|
|
68
|
+
if (isItemExist) {
|
|
69
|
+
const filterData = selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.filter(i => i.value !== item.value);
|
|
70
|
+
setSelectedTemp(filterData);
|
|
71
|
+
} else {
|
|
72
|
+
if (maxSelectedItem < 0) {
|
|
73
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
74
|
+
} else {
|
|
75
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const handleShowSheet = () => {
|
|
81
|
+
var _ref$current;
|
|
82
|
+
setSelectedTemp(value);
|
|
83
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.open();
|
|
84
|
+
};
|
|
85
|
+
const handleCloseSheet = () => {
|
|
86
|
+
var _ref$current2;
|
|
87
|
+
(_ref$current2 = ref.current) === null || _ref$current2 === void 0 || _ref$current2.close();
|
|
88
|
+
};
|
|
89
|
+
const handleOnSaveButtonPress = () => {
|
|
90
|
+
var _ref$current3;
|
|
91
|
+
onSaveButtonPress(selectedTemp);
|
|
92
|
+
(_ref$current3 = ref.current) === null || _ref$current3 === void 0 || _ref$current3.close();
|
|
93
|
+
};
|
|
94
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderDisplayComponent === null || renderDisplayComponent === void 0 ? void 0 : renderDisplayComponent(handleShowSheet), /*#__PURE__*/React.createElement(BottomSheet, _extends({
|
|
95
|
+
ref: ref,
|
|
96
|
+
dismissIcon: (bottomSheetOpt === null || bottomSheetOpt === void 0 ? void 0 : bottomSheetOpt.dismissIcon) ?? /*#__PURE__*/React.createElement(IconArrowLeft, null)
|
|
97
|
+
}, bottomSheetOpt), /*#__PURE__*/React.createElement(FlatList, _extends({
|
|
98
|
+
renderItem: renderItem || renderActionList,
|
|
99
|
+
style: [computedStyles.flatListContentContainer, listOptions.contentContainerStyle]
|
|
100
|
+
}, listOptionsRest)), renderCutomBottomAction ? renderCutomBottomAction(handleOnSaveButtonPress, handleCloseSheet) : /*#__PURE__*/React.createElement(View, {
|
|
101
|
+
style: [computedStyles.bottomActionContainer, bottomActionContainerStyle]
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
103
|
+
label: (saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.label) ?? 'Simpan',
|
|
104
|
+
onPress: handleOnSaveButtonPress,
|
|
105
|
+
disabled: ((selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.length) ?? 0) <= 0
|
|
106
|
+
}, saveButtonProps)))));
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=selection-modal.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useRef","useState","FlatList","View","getStyle","ActionList","BottomSheet","Button","Checkbox","RadioButton","IconArrowLeft","SelectionModal","props","type","renderDisplayComponent","listOptions","maxSelectedItem","bottomSheetOpt","saveButtonProps","bottomActionContainerStyle","onSaveButtonPress","renderCutomBottomAction","value","renderItem","listOptionsRest","ref","computedStyles","selectedTemp","setSelectedTemp","console","warn","renderActionList","item","index","_listOptions$data","valueItem","title","disabled","itemRest","isSelected","find","i","createElement","_extends","onPress","handleOnItemPress","trailingComponent","selected","isLast","data","length","isItemExist","filterData","filter","handleShowSheet","_ref$current","current","open","handleCloseSheet","_ref$current2","close","handleOnSaveButtonPress","_ref$current3","Fragment","dismissIcon","style","flatListContentContainer","contentContainerStyle","bottomActionContainer","label"],"sourceRoot":"../../../../src","sources":["components/selection-modal/selection-modal.component.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAgBC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,QAAQ,EAAiBC,IAAI,QAAQ,cAAc;AAO5D,SAASC,QAAQ,QAAQ,yBAAyB;AAElD,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,SAASC,WAAW,QAAQ,sCAAsC;AAClE,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,WAAW,QAAQ,sCAAsC;AAClE,SAASC,aAAa,QAAQ,aAAa;AAG3C,OAAO,SAASC,cAAcA,CAACC,KAA0B,EAAE;EACzD,MAAM;IACJC,IAAI,GAAG,OAAO;IACdC,sBAAsB;IACtBC,WAAW;IACXC,eAAe,GAAG,CAAC,CAAC;IACpBC,cAAc;IACdC,eAAe;IACfC,0BAA0B;IAC1BC,iBAAiB,GAAGA,CAAA,KAAM,CAAC,CAAC;IAC5BC,uBAAuB;IACvBC,KAAK,GAAG;EACV,CAAC,GAAGV,KAAK;EAET,MAAM;IAAEW,UAAU;IAAE,GAAGC;EAAgB,CAAC,GAAGT,WAAW;EAEtD,MAAMU,GAAG,GAAGzB,MAAM,CAAqB,IAAI,CAAC;EAE5C,MAAM0B,cAAc,GAAGtB,QAAQ,CAAC,CAAC;EAEjC,MAAM,CAACuB,YAAY,EAAEC,eAAe,CAAC,GAAG3B,QAAQ,CAAsBqB,KAAK,CAAC;EAE5E,IAAI,CAACR,sBAAsB,EAAE;IAC3Be,OAAO,CAACC,IAAI,CACV,wEACF,CAAC;I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A,sBAAsB,CAAGwC,eAAe,CAAC,eAE1CvD,KAAA,CAAA2C,aAAA,CAACpC,WAAW,EAAAqC,QAAA;IACVlB,GAAG,EAAEA,GAAI;IACTuC,WAAW,EAAE,CAAA/C,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAE+C,WAAW,kBAAIjE,KAAA,CAAA2C,aAAA,CAAChC,aAAa,MAAE;EAAE,GAC1DO,cAAc,gBAElBlB,KAAA,CAAA2C,aAAA,CAACxC,QAAQ,EAAAyC,QAAA;IACPpB,UAAU,EAAEA,UAAU,IAAIQ,gBAAiB;IAC3CkC,KAAK,EAAE,CACLvC,cAAc,CAACwC,wBAAwB,EACvCnD,WAAW,CAACoD,qBAAqB;EACjC,GACE3C,eAAe,CACpB,CAAC,EAEDH,uBAAuB,GACtBA,uBAAuB,CAACwC,uBAAuB,EAAEH,gBAAgB,CAAC,gBAElE3D,KAAA,CAAA2C,aAAA,CAACvC,IAAI;IACH8D,KAAK,EAAE,CACLvC,cAAc,CAAC0C,qBAAqB,EACpCjD,0BAA0B;EAC1B,gBAEFpB,KAAA,CAAA2C,aAAA,CAACnC,MAAM,EAAAoC,QAAA;IACL0B,KAAK,EAAE,CAAAnD,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAEmD,KAAK,KAAI,QAAS;IAC1CzB,OAAO,EAAEiB,uBAAwB;IACjCxB,QAAQ,EAAE,CAAC,CAAAV,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEuB,MAAM,KAAI,CAAC,KAAK;EAAE,GACvChC,eAAe,CACpB,CACG,CAEG,CACb,CAAC;AAEP","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Spacing } from '../../themes';
|
|
3
|
+
export const getStyle = () => {
|
|
4
|
+
const computedStyle = {};
|
|
5
|
+
computedStyle.flatListContentContainer = {};
|
|
6
|
+
computedStyle.bottomActionContainer = {
|
|
7
|
+
padding: Spacing[16],
|
|
8
|
+
paddingBottom: Spacing[24],
|
|
9
|
+
backgroundColor: 'transparent'
|
|
10
|
+
};
|
|
11
|
+
return StyleSheet.create(computedStyle);
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=selection-modal.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","Spacing","getStyle","computedStyle","flatListContentContainer","bottomActionContainer","padding","paddingBottom","backgroundColor","create"],"sourceRoot":"../../../../src","sources":["components/selection-modal/selection-modal.style.tsx"],"mappings":"AAAA,SAASA,UAAU,QAAmB,cAAc;AAEpD,SAASC,OAAO,QAAQ,cAAc;AAOtC,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EAC5B,MAAMC,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,wBAAwB,GAAG,CAAC,CAAC;EAE3CD,aAAa,CAACE,qBAAqB,GAAG;IACpCC,OAAO,EAAEL,OAAO,CAAC,EAAE,CAAC;IACpBM,aAAa,EAAEN,OAAO,CAAC,EAAE,CAAC;IAC1BO,eAAe,EAAE;EACnB,CAAC;EAED,OAAOR,UAAU,CAACS,MAAM,CAACN,aAAa,CAAC;AACzC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/selection-modal/selection-modal.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.component.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"ActionList.component.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+DzC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.styles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionList.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.styles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AAED,eAAO,MAAM,QAAQ,UAAW,eAAe,uBAqD9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.type.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.type.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,6BAA6B,EAC7B,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,oBAAY,eAAe,GAAG;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionList.type.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.type.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,6BAA6B,EAC7B,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,oBAAY,eAAe,GAAG;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,SAAS,CAAC;IAE3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,IAAI,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countdown.component.d.ts","sourceRoot":"","sources":["../../../../src/components/countdown/countdown.component.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,QAAA,MAAM,SAAS,UAAW,cAAc,
|
|
1
|
+
{"version":3,"file":"countdown.component.d.ts","sourceRoot":"","sources":["../../../../src/components/countdown/countdown.component.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,QAAA,MAAM,SAAS,UAAW,cAAc,gBAiFvC,CAAC;AAmBF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countdown.type.d.ts","sourceRoot":"","sources":["../../../../src/components/countdown/countdown.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAEvC,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;QAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"countdown.type.d.ts","sourceRoot":"","sources":["../../../../src/components/countdown/countdown.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAEvC,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;QAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;IAEJ,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB"}
|
|
@@ -25,6 +25,7 @@ export { CheckBoxInput } from './CheckBoxInput/CheckBoxInput.component';
|
|
|
25
25
|
export { Checkbox } from './Checkbox/Checkbox.component';
|
|
26
26
|
export { Appbar } from './Appbar/Appbar.component';
|
|
27
27
|
export { Snackbar, SnackbarComponent, SnackbarUI, } from './Snackbar/Snackbar.component';
|
|
28
|
+
export { SelectionModal } from './selection-modal/selection-modal.component';
|
|
28
29
|
export { Switch } from './switch/switch.component';
|
|
29
30
|
export { Dot } from './dot/dot.component';
|
|
30
31
|
export { InformationBox } from './information-box/information-box.component';
|
|
@@ -57,6 +58,7 @@ export type { DividerProps } from './Divider/Divider.type';
|
|
|
57
58
|
export type { TabsProps } from './Tabs/Tabs.type';
|
|
58
59
|
export type { SearchInputProps } from './search-input/search-input.type';
|
|
59
60
|
export type { SelectionCardProps } from './selection-card/SelectionCard.type';
|
|
61
|
+
export { SelectionModalProps, SelectionItemData, SelectionModalValue, } from './selection-modal/selection-modal.type';
|
|
60
62
|
export type { RibbonProps } from './Ribbon/Ribbon.type';
|
|
61
63
|
export type { StickyBarProps } from './StickyBar/StickyBar.type';
|
|
62
64
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM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YAAY,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,wCAAwC,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-modal.component.d.ts","sourceRoot":"","sources":["../../../../src/components/selection-modal/selection-modal.component.tsx"],"names":[],"mappings":";AAGA,OAAO,EAEL,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAWhC,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,sBAgIxD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
interface ComputedStyleProps {
|
|
3
|
+
flatListContentContainer?: ViewStyle;
|
|
4
|
+
bottomActionContainer?: ViewStyle;
|
|
5
|
+
}
|
|
6
|
+
export declare const getStyle: () => ComputedStyleProps;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=selection-modal.style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-modal.style.d.ts","sourceRoot":"","sources":["../../../../src/components/selection-modal/selection-modal.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,cAAc,CAAC;AAIrD,UAAU,kBAAkB;IAC1B,wBAAwB,CAAC,EAAE,SAAS,CAAC;IACrC,qBAAqB,CAAC,EAAE,SAAS,CAAC;CACnC;AAED,eAAO,MAAM,QAAQ,0BAYpB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FlatListProps, ViewStyle } from 'react-native';
|
|
3
|
+
import { ActionListProps } from '../ActionList/ActionList.type';
|
|
4
|
+
import { BottomSheetProps } from '../BottomSheet/BottomSheet.type';
|
|
5
|
+
import { ButtonProps } from '../button/button.type';
|
|
6
|
+
export declare type SelectionModalValue = FlatListProps<SelectionItemData>['data'];
|
|
7
|
+
export declare type SelectionModalProps = {
|
|
8
|
+
type: 'checkbox' | 'radio';
|
|
9
|
+
value: SelectionModalValue;
|
|
10
|
+
renderDisplayComponent: (openModal: () => void) => ReactNode;
|
|
11
|
+
listOptions: Omit<FlatListProps<SelectionItemData>, 'renderItem'> & Partial<Pick<FlatListProps<SelectionItemData>, 'renderItem'>>;
|
|
12
|
+
maxSelectedItem?: number;
|
|
13
|
+
bottomSheetOpt: Omit<BottomSheetProps, 'visibility' | 'onDismiss'>;
|
|
14
|
+
saveButtonProps?: ButtonProps;
|
|
15
|
+
bottomActionContainerStyle?: ViewStyle;
|
|
16
|
+
onSaveButtonPress: (data: SelectionModalValue) => void;
|
|
17
|
+
renderCutomBottomAction?: (handleOnSaveButtonPress: (data: SelectionModalValue) => void, closeModal?: () => void) => ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export declare type SelectionItemData = {
|
|
20
|
+
value: string;
|
|
21
|
+
} & ActionListProps;
|
|
22
|
+
//# sourceMappingURL=selection-modal.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-modal.type.d.ts","sourceRoot":"","sources":["../../../../src/components/selection-modal/selection-modal.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,oBAAY,mBAAmB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3E,oBAAY,mBAAmB,GAAG;IAChC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAE3B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,sBAAsB,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IAE7D,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,GAC/D,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IAEhE,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,cAAc,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,WAAW,CAAC,CAAC;IAEnE,eAAe,CAAC,EAAE,WAAW,CAAC;IAE9B,0BAA0B,CAAC,EAAE,SAAS,CAAC;IAEvC,iBAAiB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAEvD,uBAAuB,CAAC,EAAE,CACxB,uBAAuB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,EAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,KACpB,SAAS,CAAC;CAChB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adiraku/react-native-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10-canary-2",
|
|
4
4
|
"description": "UI library for Adiraku apps",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"bugs": {
|
|
49
49
|
"url": "https://bitbucket.org/dcoedev/adiraku-react-native-ui/issues"
|
|
50
50
|
},
|
|
51
|
-
"homepage": "https://
|
|
51
|
+
"homepage": "https://www.npmjs.com/package/@adiraku/react-native-ui?activeTab=readme",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@commitlint/config-conventional": "^17.0.2",
|
|
54
54
|
"@evilmartians/lefthook": "^1.2.2",
|
|
@@ -17,6 +17,8 @@ const ActionList: React.FC<ActionListProps> = (props) => {
|
|
|
17
17
|
leadingComponent,
|
|
18
18
|
trailingComponent,
|
|
19
19
|
containerStyle,
|
|
20
|
+
isLast,
|
|
21
|
+
testID = '',
|
|
20
22
|
...rest
|
|
21
23
|
} = props;
|
|
22
24
|
|
|
@@ -31,27 +33,40 @@ const ActionList: React.FC<ActionListProps> = (props) => {
|
|
|
31
33
|
{...rest}
|
|
32
34
|
underlayColor={Palettes.grey[50]}
|
|
33
35
|
>
|
|
34
|
-
<View
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
<View>
|
|
37
|
+
<View style={[computedStyle.container, containerStyle]}>
|
|
38
|
+
{leadingComponent && (
|
|
39
|
+
<View style={computedStyle.leadingWrapper}>{leadingComponent}</View>
|
|
40
|
+
)}
|
|
41
|
+
<View style={computedStyle.textContainer}>
|
|
42
|
+
{!!title && (
|
|
43
|
+
<Typography
|
|
44
|
+
variant={'subtitle2'}
|
|
45
|
+
textStyles={{ ...computedStyle.title, ...textStyles }}
|
|
46
|
+
testID={'action_list_title' + testID}
|
|
47
|
+
accessibilityLabel={'action_list_title' + testID}
|
|
48
|
+
>
|
|
49
|
+
{title}
|
|
50
|
+
</Typography>
|
|
51
|
+
)}
|
|
52
|
+
{!!description && (
|
|
53
|
+
<Typography
|
|
54
|
+
variant={'body2'}
|
|
55
|
+
textStyles={{ ...computedStyle.description, ...textStyles }}
|
|
56
|
+
testID={'action_list_subtitle' + testID}
|
|
57
|
+
accessibilityLabel={'action_list_subtitle' + testID}
|
|
58
|
+
>
|
|
59
|
+
{description}
|
|
60
|
+
</Typography>
|
|
61
|
+
)}
|
|
62
|
+
</View>
|
|
63
|
+
{trailingComponent && (
|
|
64
|
+
<View style={computedStyle.trailingWrapper}>
|
|
65
|
+
{trailingComponent}
|
|
66
|
+
</View>
|
|
67
|
+
)}
|
|
51
68
|
</View>
|
|
52
|
-
{
|
|
53
|
-
<View style={computedStyle.trailingWrapper}>{trailingComponent}</View>
|
|
54
|
-
)}
|
|
69
|
+
{!isLast && <View style={computedStyle.borderBottom} />}
|
|
55
70
|
</View>
|
|
56
71
|
</TouchableHighlight>
|
|
57
72
|
);
|
|
@@ -11,18 +11,17 @@ interface ComputedStyleProps {
|
|
|
11
11
|
textContainer?: TextStyle;
|
|
12
12
|
leadingWrapper?: ViewStyle;
|
|
13
13
|
trailingWrapper?: ViewStyle;
|
|
14
|
+
borderBottom?: ViewStyle;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export const getStyle = (props: ActionListProps) => {
|
|
17
|
-
const { disabled
|
|
18
|
+
const { disabled } = props;
|
|
18
19
|
|
|
19
20
|
const computedStyle: ComputedStyleProps = {};
|
|
20
21
|
|
|
21
22
|
computedStyle.container = {
|
|
22
|
-
|
|
23
|
-
paddingHorizontal: disabled ? 16 : 0,
|
|
23
|
+
padding: Spacing[16],
|
|
24
24
|
borderBottomColor: Palettes.black[400],
|
|
25
|
-
borderBottomWidth: disabled || isLast ? 0 : 0.5,
|
|
26
25
|
backgroundColor: disabled ? Palettes.grey[50] : 'transparent',
|
|
27
26
|
flexDirection: 'row',
|
|
28
27
|
justifyContent: 'flex-start',
|
|
@@ -60,5 +59,12 @@ export const getStyle = (props: ActionListProps) => {
|
|
|
60
59
|
alignItems: 'center',
|
|
61
60
|
};
|
|
62
61
|
|
|
62
|
+
computedStyle.borderBottom = {
|
|
63
|
+
marginHorizontal: Spacing[16],
|
|
64
|
+
height: 1,
|
|
65
|
+
flex: 1,
|
|
66
|
+
backgroundColor: Palettes.grey[100],
|
|
67
|
+
};
|
|
68
|
+
|
|
63
69
|
return StyleSheet.create(computedStyle);
|
|
64
70
|
};
|
|
@@ -15,6 +15,7 @@ const Countdown = (props: CountdownProps) => {
|
|
|
15
15
|
{ type: 'm' },
|
|
16
16
|
{ type: 's' },
|
|
17
17
|
],
|
|
18
|
+
testId = 'Countdown',
|
|
18
19
|
} = props;
|
|
19
20
|
|
|
20
21
|
const computedStyle = getStyle();
|
|
@@ -58,12 +59,21 @@ const Countdown = (props: CountdownProps) => {
|
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
return (
|
|
61
|
-
<View
|
|
62
|
+
<View
|
|
63
|
+
testID={testId + '_view'}
|
|
64
|
+
accessibilityLabel={testId + '_view'}
|
|
65
|
+
style={[computedStyle.container]}
|
|
66
|
+
>
|
|
62
67
|
{formats.map(({ type, leadingString = '', trailingString = '' }, idx) => {
|
|
63
68
|
return (
|
|
64
69
|
<>
|
|
65
70
|
<View style={[computedStyle.textContainer]}>
|
|
66
|
-
<Typography
|
|
71
|
+
<Typography
|
|
72
|
+
variant="overline"
|
|
73
|
+
style={[computedStyle.textLabel]}
|
|
74
|
+
testID={testId + '_' + type}
|
|
75
|
+
accessibilityLabel={testId + '_' + type}
|
|
76
|
+
>
|
|
67
77
|
{leadingString + formatTime(timeLeft)?.[type] + trailingString}
|
|
68
78
|
</Typography>
|
|
69
79
|
</View>
|
package/src/components/index.ts
CHANGED
|
@@ -32,6 +32,7 @@ export {
|
|
|
32
32
|
SnackbarComponent,
|
|
33
33
|
SnackbarUI,
|
|
34
34
|
} from './Snackbar/Snackbar.component';
|
|
35
|
+
export { SelectionModal } from './selection-modal/selection-modal.component';
|
|
35
36
|
export { Switch } from './switch/switch.component';
|
|
36
37
|
export { Dot } from './dot/dot.component';
|
|
37
38
|
export { InformationBox } from './information-box/information-box.component';
|
|
@@ -84,5 +85,10 @@ export type { DividerProps } from './Divider/Divider.type';
|
|
|
84
85
|
export type { TabsProps } from './Tabs/Tabs.type';
|
|
85
86
|
export type { SearchInputProps } from './search-input/search-input.type';
|
|
86
87
|
export type { SelectionCardProps } from './selection-card/SelectionCard.type';
|
|
88
|
+
export {
|
|
89
|
+
SelectionModalProps,
|
|
90
|
+
SelectionItemData,
|
|
91
|
+
SelectionModalValue,
|
|
92
|
+
} from './selection-modal/selection-modal.type';
|
|
87
93
|
export type { RibbonProps } from './Ribbon/Ribbon.type';
|
|
88
94
|
export type { StickyBarProps } from './StickyBar/StickyBar.type';
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React, { ElementRef, useRef, useState } from 'react';
|
|
2
|
+
import { FlatList, FlatListProps, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
SelectionItemData,
|
|
6
|
+
SelectionModalProps,
|
|
7
|
+
SelectionModalValue,
|
|
8
|
+
} from './selection-modal.type';
|
|
9
|
+
import { getStyle } from './selection-modal.style';
|
|
10
|
+
|
|
11
|
+
import { ActionList } from '../ActionList/ActionList.component';
|
|
12
|
+
import { BottomSheet } from '../BottomSheet/BottomSheet.component';
|
|
13
|
+
import { Button } from '../button/button.component';
|
|
14
|
+
import { Checkbox } from '../Checkbox/Checkbox.component';
|
|
15
|
+
import { RadioButton } from '../RadioButton/RadioButton.component';
|
|
16
|
+
import { IconArrowLeft } from '../../icons';
|
|
17
|
+
|
|
18
|
+
type BottomSheetHandler = ElementRef<typeof BottomSheet>;
|
|
19
|
+
export function SelectionModal(props: SelectionModalProps) {
|
|
20
|
+
const {
|
|
21
|
+
type = 'radio',
|
|
22
|
+
renderDisplayComponent,
|
|
23
|
+
listOptions,
|
|
24
|
+
maxSelectedItem = -1,
|
|
25
|
+
bottomSheetOpt,
|
|
26
|
+
saveButtonProps,
|
|
27
|
+
bottomActionContainerStyle,
|
|
28
|
+
onSaveButtonPress = () => {},
|
|
29
|
+
renderCutomBottomAction,
|
|
30
|
+
value = [],
|
|
31
|
+
} = props;
|
|
32
|
+
|
|
33
|
+
const { renderItem, ...listOptionsRest } = listOptions;
|
|
34
|
+
|
|
35
|
+
const ref = useRef<BottomSheetHandler>(null);
|
|
36
|
+
|
|
37
|
+
const computedStyles = getStyle();
|
|
38
|
+
|
|
39
|
+
const [selectedTemp, setSelectedTemp] = useState<SelectionModalValue>(value);
|
|
40
|
+
|
|
41
|
+
if (!renderDisplayComponent) {
|
|
42
|
+
console.warn(
|
|
43
|
+
'Please provide renderDisplayComponent props (SelectionModal - adiraku)'
|
|
44
|
+
);
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const renderActionList: FlatListProps<SelectionItemData>['renderItem'] = ({
|
|
49
|
+
item,
|
|
50
|
+
index,
|
|
51
|
+
}) => {
|
|
52
|
+
const { value: valueItem, title, disabled, ...itemRest } = item;
|
|
53
|
+
|
|
54
|
+
const isSelected = !!selectedTemp?.find((i) => i.value === valueItem);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<ActionList
|
|
58
|
+
title={title}
|
|
59
|
+
onPress={() => handleOnItemPress(item)}
|
|
60
|
+
trailingComponent={
|
|
61
|
+
type === 'radio' ? (
|
|
62
|
+
<RadioButton selected={isSelected} disabled={disabled} />
|
|
63
|
+
) : (
|
|
64
|
+
<Checkbox selected={isSelected} disabled={disabled} />
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
disabled={disabled}
|
|
68
|
+
isLast={index === (listOptions.data?.length ?? 0) - 1}
|
|
69
|
+
{...itemRest}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const handleOnItemPress = (item: SelectionItemData) => {
|
|
75
|
+
if (type === 'radio') {
|
|
76
|
+
setSelectedTemp([item]);
|
|
77
|
+
} else if (type === 'checkbox') {
|
|
78
|
+
const isItemExist = selectedTemp?.find((i) => i.value === item.value);
|
|
79
|
+
|
|
80
|
+
// Takeout current item if it's in the stack
|
|
81
|
+
if (isItemExist) {
|
|
82
|
+
const filterData = selectedTemp?.filter((i) => i.value !== item.value);
|
|
83
|
+
|
|
84
|
+
setSelectedTemp(filterData);
|
|
85
|
+
} else {
|
|
86
|
+
if (maxSelectedItem < 0) {
|
|
87
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
88
|
+
} else {
|
|
89
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const handleShowSheet = () => {
|
|
96
|
+
setSelectedTemp(value);
|
|
97
|
+
ref.current?.open();
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const handleCloseSheet = () => {
|
|
101
|
+
ref.current?.close();
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const handleOnSaveButtonPress = () => {
|
|
105
|
+
onSaveButtonPress(selectedTemp);
|
|
106
|
+
ref.current?.close();
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<>
|
|
111
|
+
{renderDisplayComponent?.(handleShowSheet)}
|
|
112
|
+
|
|
113
|
+
<BottomSheet
|
|
114
|
+
ref={ref}
|
|
115
|
+
dismissIcon={bottomSheetOpt?.dismissIcon ?? <IconArrowLeft />}
|
|
116
|
+
{...bottomSheetOpt}
|
|
117
|
+
>
|
|
118
|
+
<FlatList
|
|
119
|
+
renderItem={renderItem || renderActionList}
|
|
120
|
+
style={[
|
|
121
|
+
computedStyles.flatListContentContainer,
|
|
122
|
+
listOptions.contentContainerStyle,
|
|
123
|
+
]}
|
|
124
|
+
{...listOptionsRest}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
{renderCutomBottomAction ? (
|
|
128
|
+
renderCutomBottomAction(handleOnSaveButtonPress, handleCloseSheet)
|
|
129
|
+
) : (
|
|
130
|
+
<View
|
|
131
|
+
style={[
|
|
132
|
+
computedStyles.bottomActionContainer,
|
|
133
|
+
bottomActionContainerStyle,
|
|
134
|
+
]}
|
|
135
|
+
>
|
|
136
|
+
<Button
|
|
137
|
+
label={saveButtonProps?.label ?? 'Simpan'}
|
|
138
|
+
onPress={handleOnSaveButtonPress}
|
|
139
|
+
disabled={(selectedTemp?.length ?? 0) <= 0}
|
|
140
|
+
{...saveButtonProps}
|
|
141
|
+
/>
|
|
142
|
+
</View>
|
|
143
|
+
)}
|
|
144
|
+
</BottomSheet>
|
|
145
|
+
</>
|
|
146
|
+
);
|
|
147
|
+
}
|