@tap-payments/auth-jsconnect 1.0.85 → 1.0.88
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/@types/app.d.ts +9 -7
- package/build/app/settings.js +1 -1
- package/build/components/AnimationFlow/BottomSheet.js +4 -2
- package/build/components/AnimationFlow/Loader.js +1 -1
- package/build/constants/api.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/connect/Connect.js +1 -1
- package/build/features/shared/Background/Background.js +2 -2
- package/build/features/shared/Background/LogoBackground.d.ts +2 -2
- package/build/features/shared/Background/LogoBackground.js +42 -16
- package/build/features/shared/Button/FlowsButtons.js +35 -20
- package/build/features/shared/Containers/FeatureContainer.js +3 -0
- package/build/utils/array.js +6 -2
- package/build/utils/locale.d.ts +1 -1
- package/build/utils/locale.js +4 -3
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
|
@@ -152,14 +152,16 @@ export interface DeviceInfo {
|
|
|
152
152
|
entry: Entry;
|
|
153
153
|
}
|
|
154
154
|
export interface LocalProps {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
[country: string]: {
|
|
156
|
+
ar: {
|
|
157
|
+
translation: {
|
|
158
|
+
[key: string]: string;
|
|
159
|
+
};
|
|
158
160
|
};
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
en: {
|
|
162
|
+
translation: {
|
|
163
|
+
[key: string]: string;
|
|
164
|
+
};
|
|
163
165
|
};
|
|
164
166
|
};
|
|
165
167
|
}
|
package/build/app/settings.js
CHANGED
|
@@ -251,7 +251,7 @@ export var settingsSlice = createSlice({
|
|
|
251
251
|
.addCase(getLocale.fulfilled, function (state, action) {
|
|
252
252
|
state.loading = false;
|
|
253
253
|
state.error = null;
|
|
254
|
-
updateLocale(action.payload);
|
|
254
|
+
updateLocale(action.payload, state.data.appConfig.businessCountryCode);
|
|
255
255
|
})
|
|
256
256
|
.addCase(getLocale.rejected, function (state, action) {
|
|
257
257
|
state.loading = false;
|
|
@@ -36,7 +36,9 @@ var BottomSheetStyled = styled(BottomSheet)(function (_a) {
|
|
|
36
36
|
backgroundColor: 'transparent'
|
|
37
37
|
},
|
|
38
38
|
'[data-rsbs-header]': {
|
|
39
|
-
paddingBottom: theme.spacing(
|
|
39
|
+
paddingBottom: theme.spacing(6),
|
|
40
|
+
position: 'absolute',
|
|
41
|
+
width: '100vw'
|
|
40
42
|
},
|
|
41
43
|
'[data-rsbs-overlay]': {
|
|
42
44
|
backgroundColor: theme.palette.background.paper
|
|
@@ -60,7 +62,7 @@ var BottomSheetComponent = function (_a) {
|
|
|
60
62
|
var open = _a.open, children = _a.children, rest = __rest(_a, ["open", "children"]);
|
|
61
63
|
var getMinHeight = function (maxHeight) {
|
|
62
64
|
var element = document.getElementById('main-feature-container');
|
|
63
|
-
var height = element ? element.clientHeight +
|
|
65
|
+
var height = element ? element.clientHeight + 40 : 0;
|
|
64
66
|
return height || maxHeight * 0.7;
|
|
65
67
|
};
|
|
66
68
|
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
|
}
|
package/build/constants/api.js
CHANGED
|
@@ -22,7 +22,7 @@ var SIGNUP_PATH = '/signup';
|
|
|
22
22
|
var SOURCE_INCOME_PATH = '/v2/sourceOfIncome';
|
|
23
23
|
var MONTHLY_INCOME_PATH = '/v2/monthlyIncome';
|
|
24
24
|
var BRAND_LIST_PATH = '/brand/list';
|
|
25
|
-
var FIREBASE_URL = 'https://goconnect-195cd-default-rtdb.asia-southeast1.firebasedatabase.app/
|
|
25
|
+
var FIREBASE_URL = 'https://goconnect-195cd-default-rtdb.asia-southeast1.firebasedatabase.app/locale.json';
|
|
26
26
|
export var ENDPOINT_PATHS = {
|
|
27
27
|
BASE_URL: API_BASE_URL,
|
|
28
28
|
BUSINESS_COUNTRIES: API_BUSINESS_COUNTRIES,
|
|
@@ -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;
|
|
@@ -34,7 +34,7 @@ var Connect = memo(function (props) {
|
|
|
34
34
|
useEffect(function () {
|
|
35
35
|
dispatch(getCountries());
|
|
36
36
|
}, []);
|
|
37
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading, error: error, open: open,
|
|
37
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading, error: error, open: open, footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
|
|
38
38
|
var Element = _a.element, name = _a.name;
|
|
39
39
|
var isActive = activeScreen.name === name;
|
|
40
40
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -14,7 +14,7 @@ import { memo } from 'react';
|
|
|
14
14
|
import { styled } from '@mui/material/styles';
|
|
15
15
|
import Box from '@mui/material/Box';
|
|
16
16
|
import LogoBackground from './LogoBackground';
|
|
17
|
-
var BackgroundStyled = styled(Box)(function (_a) {
|
|
17
|
+
var BackgroundStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
|
|
18
18
|
var isTapOrigin = _a.isTapOrigin;
|
|
19
19
|
return ({
|
|
20
20
|
width: '100%',
|
|
@@ -24,6 +24,6 @@ var BackgroundStyled = styled(Box)(function (_a) {
|
|
|
24
24
|
});
|
|
25
25
|
var Background = function (_a) {
|
|
26
26
|
var children = _a.children, isTapOrigin = _a.isTapOrigin, loading = _a.loading;
|
|
27
|
-
return (_jsxs(BackgroundStyled, __assign({ isTapOrigin: isTapOrigin }, { children: [_jsx(LogoBackground, {
|
|
27
|
+
return (_jsxs(BackgroundStyled, __assign({ isTapOrigin: isTapOrigin }, { children: [_jsx(LogoBackground, { hide: loading || !isTapOrigin }), children] })));
|
|
28
28
|
};
|
|
29
29
|
export default memo(Background);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type LogoBackgroundProps = {
|
|
3
|
-
|
|
3
|
+
hide?: boolean;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: React.MemoExoticComponent<({
|
|
5
|
+
declare const _default: React.MemoExoticComponent<({ hide }: LogoBackgroundProps) => JSX.Element>;
|
|
6
6
|
export default _default;
|
|
@@ -9,39 +9,65 @@ 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
|
-
import { styled } from '@mui/material/styles';
|
|
14
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
15
15
|
import Collapse from '@mui/material/Collapse';
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import Icon from '../../../components/Icon';
|
|
18
18
|
import { ICONS_NAMES } from '../../../constants';
|
|
19
19
|
import { useLanguage } from '../../../hooks';
|
|
20
|
-
import Fade from '@mui/material/Fade';
|
|
21
20
|
var BoxStyled = styled(Box)(function (_a) {
|
|
21
|
+
var _b;
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return (_b = {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
paddingTop: theme.spacing(5),
|
|
29
|
+
paddingBottom: theme.spacing(2)
|
|
30
|
+
},
|
|
31
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
32
|
+
paddingTop: theme.spacing(11)
|
|
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.5),
|
|
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
|
-
var
|
|
66
|
+
var hide = _a.hide;
|
|
44
67
|
var isAr = useLanguage().isAr;
|
|
45
|
-
|
|
68
|
+
var theme = useTheme();
|
|
69
|
+
var style = getComputedStyle(document.body);
|
|
70
|
+
console.log(style.getPropertyValue('--rsbs-overlay-h'));
|
|
71
|
+
return (_jsx(Collapse, __assign({ in: !hide }, { 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
72
|
};
|
|
47
73
|
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
|
}
|
|
@@ -25,6 +25,9 @@ var Container = styled(Box)(function (_a) {
|
|
|
25
25
|
easing: theme.transitions.easing.easeInOut,
|
|
26
26
|
property: 'all'
|
|
27
27
|
},
|
|
28
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
29
|
+
paddingTop: theme.spacing(5)
|
|
30
|
+
},
|
|
28
31
|
_b);
|
|
29
32
|
});
|
|
30
33
|
var FeatureContainer = React.forwardRef(function (props, ref) {
|
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) {
|
package/build/utils/locale.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LocalProps } from '../@types';
|
|
2
|
-
export declare const updateLocale: (locale: LocalProps) => void;
|
|
2
|
+
export declare const updateLocale: (locale: LocalProps, country: string) => void;
|
package/build/utils/locale.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { initReactI18next } from 'react-i18next';
|
|
2
2
|
import i18n from '../i18n';
|
|
3
|
-
export var updateLocale = function (locale) {
|
|
3
|
+
export var updateLocale = function (locale, country) {
|
|
4
|
+
var data = locale[country] || locale['default'];
|
|
4
5
|
if (i18n.isInitialized) {
|
|
5
6
|
i18n.removeResourceBundle('*', 'translation');
|
|
6
|
-
i18n.addResourceBundle('en', 'translation',
|
|
7
|
-
i18n.addResourceBundle('ar', 'translation',
|
|
7
|
+
i18n.addResourceBundle('en', 'translation', data.en.translation);
|
|
8
|
+
i18n.addResourceBundle('ar', 'translation', data.ar.translation);
|
|
8
9
|
}
|
|
9
10
|
else {
|
|
10
11
|
i18n.use(initReactI18next).init({
|