@tap-payments/auth-jsconnect 2.4.39-test → 2.4.41-test
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.
|
@@ -38,9 +38,9 @@ import { styled } from '@mui/material/styles';
|
|
|
38
38
|
import get from 'lodash-es/get';
|
|
39
39
|
import { useEventListener } from '../../hooks';
|
|
40
40
|
import Search from '../../features/shared/Search';
|
|
41
|
-
var ListStyled = styled(List)(function (_a) {
|
|
41
|
+
var ListStyled = styled(List, { shouldForwardProp: function (prop) { return prop !== 'height'; } })(function (_a) {
|
|
42
42
|
var _b;
|
|
43
|
-
var theme = _a.theme;
|
|
43
|
+
var theme = _a.theme, height = _a.height;
|
|
44
44
|
return (_b = {
|
|
45
45
|
overflowY: 'auto',
|
|
46
46
|
listStyle: 'none',
|
|
@@ -50,7 +50,7 @@ var ListStyled = styled(List)(function (_a) {
|
|
|
50
50
|
},
|
|
51
51
|
_b[theme.breakpoints.down('sm')] = {
|
|
52
52
|
height: 'unset',
|
|
53
|
-
maxHeight:
|
|
53
|
+
maxHeight: height
|
|
54
54
|
},
|
|
55
55
|
_b['&::-webkit-scrollbar'] = {
|
|
56
56
|
width: '0px'
|
|
@@ -80,9 +80,14 @@ var ListItemStyled = styled(ListItem)(function (_a) {
|
|
|
80
80
|
function SimpleList(_a) {
|
|
81
81
|
var list = _a.list, listItemProps = _a.listItemProps, onSelectItem = _a.onSelectItem, renderItem = _a.renderItem, children = _a.children, searchKeyPath = _a.searchKeyPath, searchValuePath = _a.searchValuePath, selectedItems = _a.selectedItems, getSelectedItemCondition = _a.getSelectedItemCondition, rest = __rest(_a, ["list", "listItemProps", "onSelectItem", "renderItem", "children", "searchKeyPath", "searchValuePath", "selectedItems", "getSelectedItemCondition"]);
|
|
82
82
|
var _b = React.useState(list), items = _b[0], setItems = _b[1];
|
|
83
|
+
var el = document.querySelector('[data-rsbs-overlay]');
|
|
84
|
+
var bottomSheetHeight = el ? el.clientHeight : 0;
|
|
83
85
|
React.useEffect(function () {
|
|
84
86
|
setItems(list);
|
|
85
87
|
}, [list]);
|
|
88
|
+
var maxHeight = React.useMemo(function () {
|
|
89
|
+
return bottomSheetHeight - 140;
|
|
90
|
+
}, [bottomSheetHeight]);
|
|
86
91
|
var mapSelectedItemBeginning = React.useMemo(function () {
|
|
87
92
|
if (getSelectedItemCondition && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length)) {
|
|
88
93
|
var mapSelectedListFirst = __spreadArray(__spreadArray([], items.filter(function (a) { return selectedItems.some(function (c) { return getSelectedItemCondition(a, c); }); }), true), items.filter(function (a) { return !selectedItems.some(function (c) { return getSelectedItemCondition(a, c); }); }), true);
|
|
@@ -119,7 +124,7 @@ function SimpleList(_a) {
|
|
|
119
124
|
}
|
|
120
125
|
setItems(list);
|
|
121
126
|
};
|
|
122
|
-
return (_jsxs(_Fragment, { children: [(searchValuePath === null || searchValuePath === void 0 ? void 0 : searchValuePath.length) && _jsx(Search, { onSearchValue: onSearch }), _jsx(ListStyled, __assign({}, rest, { children: children ||
|
|
127
|
+
return (_jsxs(_Fragment, { children: [(searchValuePath === null || searchValuePath === void 0 ? void 0 : searchValuePath.length) && _jsx(Search, { onSearchValue: onSearch }), _jsx(ListStyled, __assign({ height: maxHeight }, rest, { children: children ||
|
|
123
128
|
mapSelectedItemBeginning.map(function (item, idx) {
|
|
124
129
|
return (_createElement(ListItemStyled, __assign({}, listItemProps, { onClick: function (e) {
|
|
125
130
|
onSelectItem(item, e);
|
|
@@ -81,7 +81,7 @@ var SuccessFlowButtons = function (_a) {
|
|
|
81
81
|
var _b;
|
|
82
82
|
var name = _a.name, url = _a.url, flowStatus = _a.status, token = _a.token;
|
|
83
83
|
var status = name === 'password' ? flowStatus : (_b = flowsDetails.find(function (flow) { return flow.name === name; })) === null || _b === void 0 ? void 0 : _b.status;
|
|
84
|
-
var type = status === 'reviewed' || status === 'completed' ? 'completed' : 'pending';
|
|
84
|
+
var type = status === 'reviewed' || status === 'completed' || status === 'complete' || status === 'verified' ? 'completed' : 'pending';
|
|
85
85
|
var title = t("".concat(name, "_flow_").concat(type), {
|
|
86
86
|
individual_name: (is_authorized && count > 1 ? t('company_individuals_details', { count: count }) : username.toLowerCase() + maskedId) || t('individual'),
|
|
87
87
|
brand: brandName,
|