@tap-payments/auth-jsconnect 1.0.85 → 1.0.86
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/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/AnimationFlow/Loader.js +1 -1
- package/build/constants/assets.d.ts +2 -0
- package/build/constants/assets.js +3 -1
- package/build/features/app/business/businessStore.js +10 -9
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/shared/Background/LogoBackground.js +36 -13
- package/build/features/shared/Button/FlowsButtons.js +35 -20
- package/build/utils/array.js +6 -2
- package/package.json +1 -1
|
@@ -60,7 +60,7 @@ var BottomSheetComponent = function (_a) {
|
|
|
60
60
|
var open = _a.open, children = _a.children, rest = __rest(_a, ["open", "children"]);
|
|
61
61
|
var getMinHeight = function (maxHeight) {
|
|
62
62
|
var element = document.getElementById('main-feature-container');
|
|
63
|
-
var height = element ? element.clientHeight +
|
|
63
|
+
var height = element ? element.clientHeight + 40 : 0;
|
|
64
64
|
return height || maxHeight * 0.7;
|
|
65
65
|
};
|
|
66
66
|
return (_jsx(BottomSheetStyled, __assign({ open: open, snapPoints: function (_a) {
|
|
@@ -12,5 +12,5 @@ var BoxStyled = styled(Box)(function () { return ({
|
|
|
12
12
|
zIndex: 2
|
|
13
13
|
}); });
|
|
14
14
|
export default function FlowLoading() {
|
|
15
|
-
return (_jsx(BoxStyled, { children: _jsx(Loader, { svgStyle: { width: 60, height: 60 }, innerColor: '
|
|
15
|
+
return (_jsx(BoxStyled, { children: _jsx(Loader, { svgStyle: { width: 60, height: 60 }, innerColor: 'white', outerColor: 'white', toggleAnimation: true }) }));
|
|
16
16
|
}
|
|
@@ -25,7 +25,9 @@ export var ICONS_NAMES = {
|
|
|
25
25
|
CR_ICON: ICONS_FULL_PATH + '/cr' + ICONS_EXTENSION,
|
|
26
26
|
CR_ACTIVE_ICON: ICONS_FULL_PATH + '/cr_active' + ICONS_EXTENSION,
|
|
27
27
|
INSTAGRAM_ACTIVE_ICON: ICONS_FULL_PATH + '/Insta-active' + ICONS_EXTENSION,
|
|
28
|
-
TAP_LOGO_EN_ICON: ICONS_FULL_PATH + '/tap-
|
|
28
|
+
TAP_LOGO_EN_ICON: ICONS_FULL_PATH + '/tap-white-logo' + ICONS_EXTENSION,
|
|
29
|
+
TAP_LOGO_TEXT_AR: ICONS_FULL_PATH + '/tap-white-text-ar' + ICONS_EXTENSION,
|
|
30
|
+
TAP_LOGO_TEXT_EN: ICONS_FULL_PATH + '/tap-white-text-en' + ICONS_EXTENSION,
|
|
29
31
|
TAP_EN: 'https://tap-connecet.b-cdn.net/imgs/tapEN' + ICONS_EXTENSION,
|
|
30
32
|
TAP_AR: 'https://tap-connecet.b-cdn.net/imgs/tapAR' + ICONS_EXTENSION,
|
|
31
33
|
ID_IMAGE: 'https://villageofwarwick.org/wp-content/uploads/2020/02/ICON99-512-1.png',
|
|
@@ -299,15 +299,13 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
|
|
|
299
299
|
return [4, API.entityService.createEntityInfo(requestBody)];
|
|
300
300
|
case 1:
|
|
301
301
|
data = (_f.sent()).data;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
_f.label = 3;
|
|
310
|
-
case 3: return [2, { data: data, formData: __assign({}, params) }];
|
|
302
|
+
thunkApi.dispatch(retrieveDataList());
|
|
303
|
+
if (!data.errors) {
|
|
304
|
+
thunkApi.dispatch(updateStepName(stepName));
|
|
305
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
306
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, requestBody);
|
|
307
|
+
}
|
|
308
|
+
return [2, { data: data, formData: __assign({}, params) }];
|
|
311
309
|
}
|
|
312
310
|
});
|
|
313
311
|
}); });
|
|
@@ -707,7 +705,10 @@ export var businessSlice = createSlice({
|
|
|
707
705
|
return;
|
|
708
706
|
}
|
|
709
707
|
state.data.activitiesData = formData;
|
|
708
|
+
console.log('updateActivitiesInfo', state.data.activitiesData.responseBody);
|
|
709
|
+
console.log('updateActivitiesInfo', data);
|
|
710
710
|
state.data.activitiesData.responseBody = __assign(__assign({}, data), state.data.activitiesData.responseBody);
|
|
711
|
+
console.log('updateActivitiesInfo', state.data.activitiesData.responseBody);
|
|
711
712
|
})
|
|
712
713
|
.addCase(updateActivitiesInfo.rejected, function (state, action) {
|
|
713
714
|
state.loading = false;
|
|
@@ -87,7 +87,7 @@ var ExpectedSalesRange = function (_a) {
|
|
|
87
87
|
var item = isExist(expectedSales || [], expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id);
|
|
88
88
|
if (item)
|
|
89
89
|
setSubIndex(item.id);
|
|
90
|
-
}, [anchorEl]);
|
|
90
|
+
}, [anchorEl, expectedSalesRangeValue]);
|
|
91
91
|
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_sales_yearly') }), _jsx(InputStyled, { readOnly: true, value: (isAr ? expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name_ar : expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name_en) || '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_expected_sales'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: expectedSalesRangeList, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (item) {
|
|
92
92
|
var isOnlyOneItem = !item.sub || item.sub.length === 1;
|
|
93
93
|
if (isOnlyOneItem)
|
|
@@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
16
16
|
import { FlowsButtons } from '../../../shared/Button';
|
|
17
17
|
import { ICONS_NAMES } from '../../../../constants';
|
|
18
|
-
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
18
|
+
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
19
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
20
20
|
import { allAreTruthy, showLastFour } from '../../../../utils';
|
|
21
21
|
import Box from '@mui/material/Box';
|
|
@@ -46,6 +46,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
46
46
|
var _a, _b, _c;
|
|
47
47
|
var t = useTranslation().t;
|
|
48
48
|
var isAr = useLanguage().isAr;
|
|
49
|
+
var dispatch = useAppDispatch();
|
|
49
50
|
var _d = React.useState(false), isAcceptance = _d[0], setIsAcceptance = _d[1];
|
|
50
51
|
var _e = React.useState(false), isPayout = _e[0], setIsPayout = _e[1];
|
|
51
52
|
var data = useAppSelector(businessSelector).data;
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { memo } from 'react';
|
|
14
14
|
import { styled } from '@mui/material/styles';
|
|
15
15
|
import Collapse from '@mui/material/Collapse';
|
|
@@ -19,29 +19,52 @@ import { ICONS_NAMES } from '../../../constants';
|
|
|
19
19
|
import { useLanguage } from '../../../hooks';
|
|
20
20
|
import Fade from '@mui/material/Fade';
|
|
21
21
|
var BoxStyled = styled(Box)(function (_a) {
|
|
22
|
+
var _b;
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return (_b = {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
paddingTop: theme.spacing(5)
|
|
30
|
+
},
|
|
31
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
32
|
+
paddingTop: theme.spacing(11.5)
|
|
33
|
+
},
|
|
34
|
+
_b);
|
|
35
|
+
});
|
|
36
|
+
var LogoBadgeStyled = styled(Icon)(function (_a) {
|
|
22
37
|
var theme = _a.theme;
|
|
23
38
|
return ({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
justifyContent: 'center',
|
|
27
|
-
alignItems: 'center',
|
|
28
|
-
marginTop: theme.spacing(5)
|
|
39
|
+
height: theme.spacing(8.875),
|
|
40
|
+
width: theme.spacing(8.875)
|
|
29
41
|
});
|
|
30
42
|
});
|
|
31
|
-
var LogoBadgeStyled = styled(Icon)(function () { return ({
|
|
32
|
-
height: '100%',
|
|
33
|
-
width: '100%'
|
|
34
|
-
}); });
|
|
35
43
|
var LogoIconBoxStyled = styled(Box)(function (_a) {
|
|
44
|
+
var _b;
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return (_b = {
|
|
47
|
+
paddingTop: theme.spacing(2.125),
|
|
48
|
+
width: '100%',
|
|
49
|
+
display: 'flex',
|
|
50
|
+
justifyContent: 'center'
|
|
51
|
+
},
|
|
52
|
+
_b[theme.transitions.create(['top'])] = {
|
|
53
|
+
duration: theme.transitions.duration.standard
|
|
54
|
+
},
|
|
55
|
+
_b);
|
|
56
|
+
});
|
|
57
|
+
var LogoIconStyled = styled(Icon)(function (_a) {
|
|
36
58
|
var theme = _a.theme;
|
|
37
59
|
return ({
|
|
38
|
-
|
|
39
|
-
|
|
60
|
+
width: theme.spacing(5.875),
|
|
61
|
+
height: theme.spacing(3.625),
|
|
62
|
+
padding: theme.spacing(0)
|
|
40
63
|
});
|
|
41
64
|
});
|
|
42
65
|
var LogoBackground = function (_a) {
|
|
43
66
|
var isTapOrigin = _a.isTapOrigin;
|
|
44
67
|
var isAr = useLanguage().isAr;
|
|
45
|
-
return (_jsx(Collapse, __assign({ in: isTapOrigin }, { children: _jsx(Fade, __assign({ in: isTapOrigin }, { children:
|
|
68
|
+
return (_jsx(Collapse, __assign({ in: isTapOrigin }, { children: _jsx(Fade, __assign({ in: isTapOrigin }, { children: _jsxs(BoxStyled, { children: [_jsx(LogoBadgeStyled, { src: ICONS_NAMES.TAP_LOGO_EN_ICON }), _jsx(LogoIconBoxStyled, { children: _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_LOGO_TEXT_AR : ICONS_NAMES.TAP_LOGO_TEXT_EN, alt: 'tap logo' }) })] }) })) })));
|
|
46
69
|
};
|
|
47
70
|
export default memo(LogoBackground);
|
|
@@ -10,14 +10,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { createElement as _createElement } from "react";
|
|
14
13
|
import React from 'react';
|
|
15
14
|
import Button from '../../../components/Button';
|
|
16
|
-
import { alpha, styled } from '@mui/material/styles';
|
|
15
|
+
import { alpha, styled, useTheme } from '@mui/material/styles';
|
|
17
16
|
import Box from '@mui/material/Box';
|
|
18
17
|
import Link from '@mui/material/Link';
|
|
19
18
|
import { ICONS_NAMES } from '../../../constants';
|
|
20
19
|
import CheckIcon from '@mui/icons-material/Check';
|
|
20
|
+
import { useAppDispatch } from '../../../hooks';
|
|
21
|
+
import { handleOpen } from '../../../app/settings';
|
|
22
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
21
23
|
var Image = styled('img', { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
22
24
|
var theme = _a.theme;
|
|
23
25
|
return ({
|
|
@@ -43,23 +45,23 @@ var ButtonStyled = styled(Button, {
|
|
|
43
45
|
paddingInlineEnd: theme.spacing(1.625),
|
|
44
46
|
color: theme.palette.success.main,
|
|
45
47
|
border: "1px solid ".concat(theme.palette.success.main)
|
|
46
|
-
})), { '&:hover': __assign(
|
|
47
|
-
backgroundColor: theme.palette.common.white,
|
|
48
|
-
border: "1px solid ".concat(theme.palette.success.main),
|
|
49
|
-
color: theme.palette.success.main,
|
|
50
|
-
cursor: 'initial'
|
|
51
|
-
})), (_b = {}, _b[theme.breakpoints.down('sm')] = {
|
|
52
|
-
'&:hover': __assign({ backgroundColor: touched ? theme.palette.primary.main : theme.palette.common.white, border: "1px solid ".concat(theme.palette.primary.main), color: touched ? theme.palette.common.white : theme.palette.primary.main }, (isCompleted && {
|
|
48
|
+
})), (_b = { '&:hover': __assign({ backgroundColor: theme.palette.primary.main, color: theme.palette.common.white }, (isCompleted && {
|
|
53
49
|
backgroundColor: theme.palette.common.white,
|
|
54
50
|
border: "1px solid ".concat(theme.palette.success.main),
|
|
55
|
-
paddingInlineEnd: theme.spacing(1.625),
|
|
56
51
|
color: theme.palette.success.main,
|
|
57
52
|
cursor: 'initial'
|
|
58
|
-
}))
|
|
59
|
-
|
|
53
|
+
})) }, _b[theme.breakpoints.down('sm')] = {
|
|
54
|
+
'&:hover': __assign({ backgroundColor: touched ? theme.palette.primary.main : theme.palette.common.white, border: "1px solid ".concat(theme.palette.primary.main), color: touched ? theme.palette.common.white : theme.palette.primary.main }, (isCompleted && {
|
|
60
55
|
backgroundColor: theme.palette.common.white,
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
border: "1px solid ".concat(theme.palette.success.main),
|
|
57
|
+
paddingInlineEnd: theme.spacing(1.625),
|
|
58
|
+
color: theme.palette.success.main,
|
|
59
|
+
cursor: 'initial'
|
|
60
|
+
}))
|
|
61
|
+
}, _b['&:disabled'] = {
|
|
62
|
+
backgroundColor: theme.palette.common.white,
|
|
63
|
+
color: alpha(theme.palette.primary.main, 0.3)
|
|
64
|
+
}, _b)));
|
|
63
65
|
});
|
|
64
66
|
var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
65
67
|
var theme = _a.theme;
|
|
@@ -73,17 +75,30 @@ export default function FlowsButtons(_a) {
|
|
|
73
75
|
var buttons = _a.buttons;
|
|
74
76
|
var _b = React.useState(), index = _b[0], setIndex = _b[1];
|
|
75
77
|
var _c = React.useState(false), touched = _c[0], setTouched = _c[1];
|
|
78
|
+
var dispatch = useAppDispatch();
|
|
79
|
+
var theme = useTheme();
|
|
80
|
+
var isMobile = useMediaQuery(theme.breakpoints.down('sm'));
|
|
76
81
|
var handleTouch = function () {
|
|
77
82
|
setTouched(true);
|
|
78
83
|
};
|
|
84
|
+
var onRedirect = function (item) {
|
|
85
|
+
if (item.isCompleted)
|
|
86
|
+
return;
|
|
87
|
+
dispatch(handleOpen(false));
|
|
88
|
+
setTimeout(function () {
|
|
89
|
+
window.location.href = item.href;
|
|
90
|
+
}, 500);
|
|
91
|
+
};
|
|
79
92
|
return (_jsx(ButtonBoxStyled, { children: buttons.map(function (_a, idx) {
|
|
80
93
|
var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc, isCompleted = _a.isCompleted, sx = _a.sx;
|
|
81
94
|
var isLast = idx === buttons.length - 1;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
return (_jsx(Link, __assign({ underline: 'none', onMouseEnter: function () { return !isCompleted && setIndex(idx); }, onMouseLeave: function () { return setIndex(undefined); }, onClick: function () {
|
|
96
|
+
setTouched(false);
|
|
97
|
+
onRedirect({ title: title, href: href, src: src, hoverSrc: hoverSrc, isCompleted: isCompleted });
|
|
98
|
+
} }, { children: _jsx(ButtonStyled, __assign({ onTouchStart: handleTouch, touched: touched, isCompleted: isCompleted, sx: __assign({ mb: isLast ? 0 : 1.8 }, sx), endIcon: isCompleted ? (_jsx(CheckIconStyled, {})) : isMobile ? (_jsx(Image, { sx: { height: 15 }, src: index === idx
|
|
99
|
+
? touched
|
|
100
|
+
? ICONS_NAMES.Arrow_white_right_icon
|
|
101
|
+
: ICONS_NAMES.Arrow_filled_right_icon
|
|
102
|
+
: ICONS_NAMES.Arrow_filled_right_icon })) : (_jsx(Image, { sx: { height: 15 }, src: index === idx ? ICONS_NAMES.Arrow_white_right_icon : ICONS_NAMES.Arrow_filled_right_icon })), startIcon: isMobile ? (_jsx(Image, { src: index === idx ? (touched ? hoverSrc : src) : src, alt: title })) : (_jsx(Image, { src: index === idx ? hoverSrc : src, alt: title })), type: 'button' }, { children: title })) }), idx));
|
|
88
103
|
}) }));
|
|
89
104
|
}
|
package/build/utils/array.js
CHANGED
|
@@ -38,8 +38,12 @@ export var findItem = function (items, key) {
|
|
|
38
38
|
};
|
|
39
39
|
export var isExist = function (items, id) {
|
|
40
40
|
return items.find(function (_a) {
|
|
41
|
-
var sub = _a.sub;
|
|
42
|
-
|
|
41
|
+
var sub = _a.sub, itemID = _a.id;
|
|
42
|
+
if (!sub)
|
|
43
|
+
return itemID === id;
|
|
44
|
+
return sub.some(function (item) {
|
|
45
|
+
return item.id === id;
|
|
46
|
+
});
|
|
43
47
|
});
|
|
44
48
|
};
|
|
45
49
|
export var allAreTruthy = function (items, condition, key, exclude) {
|