@tap-payments/auth-jsconnect 2.10.20-development → 2.11.1-beta
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 +1 -2
- package/build/@types/app.js +0 -1
- package/build/@types/form.d.ts +0 -2
- package/build/@types/index.d.ts +0 -1
- package/build/@types/index.js +0 -1
- package/build/api/auth.d.ts +1 -9
- package/build/api/entity.d.ts +0 -3
- package/build/api/index.d.ts +1 -7
- package/build/api/index.js +1 -3
- package/build/api/lead.d.ts +0 -1
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +1 -3
- package/build/app/store.d.ts +0 -2
- package/build/assets/locales/ar.json +16 -48
- package/build/assets/locales/en.json +45 -51
- package/build/components/OTPTimer/OTPTimer.d.ts +1 -2
- package/build/components/OTPTimer/OTPTimer.js +4 -4
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +2 -0
- package/build/constants/app.d.ts +3 -21
- package/build/constants/app.js +5 -122
- package/build/constants/flows.d.ts +0 -15
- package/build/constants/flows.js +0 -15
- package/build/constants/validation.d.ts +0 -2
- package/build/constants/validation.js +0 -2
- package/build/features/app/business/businessStore.js +10 -15
- package/build/features/app/connectExpress/connectExpressStore.js +3 -17
- package/build/features/app/individual/individualStore.js +1 -0
- package/build/features/app/tax/taxStore.js +1 -1
- package/build/features/auth/screens/AuthenticationList/EntityList.js +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -13
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +5 -11
- package/build/features/business/screens/BusinessType/LicenseList.js +7 -15
- package/build/features/business/screens/BusinessType/validation.d.ts +3 -6
- package/build/features/business/screens/BusinessType/validation.js +10 -31
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +0 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +7 -23
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +3 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +21 -57
- package/build/features/entity/screens/EntityName/EntityName.js +1 -2
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
- package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
- package/build/features/entity/screens/EntityName/validation.js +3 -14
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +0 -67
- package/build/features/shared/Button/Button.js +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +0 -1
- package/build/features/shared/Button/FlowsButtons.js +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +4 -5
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -3
- package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/index.d.ts +2 -3
- package/build/index.js +2 -4
- package/build/theme/palette.js +0 -12
- package/build/theme/typography.js +0 -4
- package/build/utils/common.js +4 -4
- package/build/utils/string.d.ts +1 -2
- package/build/utils/string.js +2 -11
- package/package.json +2 -2
- package/build/@types/terminal.d.ts +0 -116
- package/build/@types/terminal.js +0 -1
- package/build/api/terminal.d.ts +0 -28
- package/build/api/terminal.js +0 -45
- package/build/components/DeviceCard/DeviceCard.d.ts +0 -18
- package/build/components/DeviceCard/DeviceCard.js +0 -103
- package/build/components/DeviceCard/index.d.ts +0 -3
- package/build/components/DeviceCard/index.js +0 -2
- package/build/features/app/terminal/terminalStore.d.ts +0 -110
- package/build/features/app/terminal/terminalStore.js +0 -676
- package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +0 -35
- package/build/features/business/screens/BusinessType/UnifiedNumber.js +0 -84
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +0 -36
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +0 -81
- package/build/features/shared/PushNotification/PushNotification.d.ts +0 -11
- package/build/features/shared/PushNotification/PushNotification.js +0 -34
- package/build/features/shared/PushNotification/index.d.ts +0 -2
- package/build/features/shared/PushNotification/index.js +0 -2
- package/build/features/terminal/Terminal.d.ts +0 -14
- package/build/features/terminal/Terminal.js +0 -95
- package/build/features/terminal/index.d.ts +0 -1
- package/build/features/terminal/index.js +0 -1
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +0 -3
- package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +0 -69
- package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkNewTerminal/index.js +0 -2
- package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +0 -10
- package/build/features/terminal/screens/LinkNewTerminal/styles.js +0 -28
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +0 -3
- package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +0 -51
- package/build/features/terminal/screens/LinkedSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkedSuccess/index.js +0 -2
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +0 -3
- package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +0 -55
- package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +0 -2
- package/build/features/terminal/screens/LinkedTerminalInfo/index.js +0 -2
- package/build/features/terminal/screens/Loading/Loading.d.ts +0 -4
- package/build/features/terminal/screens/Loading/Loading.js +0 -10
- package/build/features/terminal/screens/Loading/index.d.ts +0 -2
- package/build/features/terminal/screens/Loading/index.js +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +0 -3
- package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +0 -58
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +0 -2
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +0 -36
- package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +0 -34
- package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +0 -5
- package/build/features/terminal/screens/OperatorError/OperatorError.js +0 -9
- package/build/features/terminal/screens/OperatorError/index.d.ts +0 -2
- package/build/features/terminal/screens/OperatorError/index.js +0 -2
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -3
- package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -21
- package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/ResetPasswordSuccess/index.js +0 -2
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
- package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -32
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +0 -2
- package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +0 -9
- package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +0 -20
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +0 -3
- package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +0 -153
- package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/index.js +0 -2
- package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +0 -9
- package/build/features/terminal/screens/TerminalDeviceList/styles.js +0 -13
- package/build/features/terminal/screens/TerminalListPage/TerminalListPage.d.ts +0 -3
- package/build/features/terminal/screens/TerminalListPage/TerminalListPage.js +0 -47
- package/build/features/terminal/screens/TerminalListPage/index.d.ts +0 -2
- package/build/features/terminal/screens/TerminalListPage/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +0 -3
- package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +0 -53
- package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +0 -2
- package/build/features/terminal/screens/UnlinkedSuccess/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +0 -3
- package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +0 -98
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +0 -2
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +0 -26
- package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +0 -30
- package/build/features/terminal/screens/Verify/OTPInput.d.ts +0 -7
- package/build/features/terminal/screens/Verify/OTPInput.js +0 -51
- package/build/features/terminal/screens/Verify/Verify.d.ts +0 -5
- package/build/features/terminal/screens/Verify/Verify.js +0 -85
- package/build/features/terminal/screens/Verify/index.d.ts +0 -2
- package/build/features/terminal/screens/Verify/index.js +0 -2
- package/build/features/terminal/screens/Verify/validation.d.ts +0 -8
- package/build/features/terminal/screens/Verify/validation.js +0 -4
- package/build/features/terminal/screens/shared/Header.d.ts +0 -10
- package/build/features/terminal/screens/shared/Header.js +0 -30
- package/build/features/terminal/screens/shared/TerminalList.d.ts +0 -11
- package/build/features/terminal/screens/shared/TerminalList.js +0 -25
- package/build/features/terminal/screens/shared/index.d.ts +0 -5
- package/build/features/terminal/screens/shared/index.js +0 -5
- package/build/features/terminal/screens/shared/styles.d.ts +0 -196
- package/build/features/terminal/screens/shared/styles.js +0 -155
- package/build/features/terminal/screens/shared/utils.d.ts +0 -7
- package/build/features/terminal/screens/shared/utils.js +0 -24
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const QRCodeImage: import("@emotion/styled").StyledComponent<import("../../../../components/Icon").IconProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
3
|
-
export declare const CodeDescription: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
4
|
-
children?: import("react").ReactNode;
|
|
5
|
-
component?: import("react").ElementType<any> | undefined;
|
|
6
|
-
ref?: import("react").Ref<unknown> | undefined;
|
|
7
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
8
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
9
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("left" | "right" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import Box from '@mui/material/Box';
|
|
13
|
-
import { styled } from '@mui/material/styles';
|
|
14
|
-
import Icon from '../../../../components/Icon';
|
|
15
|
-
export var QRCodeImage = styled(Icon)(function (_a) {
|
|
16
|
-
var spacing = _a.theme.spacing;
|
|
17
|
-
return ({
|
|
18
|
-
margin: '0px auto',
|
|
19
|
-
width: spacing(31.25),
|
|
20
|
-
height: spacing(31.25),
|
|
21
|
-
marginTop: spacing(2.5),
|
|
22
|
-
marginBottom: spacing(2.5)
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
export var CodeDescription = styled(Box)(function (_a) {
|
|
26
|
-
var _b = _a.theme, palette = _b.palette, spacing = _b.spacing, typography = _b.typography;
|
|
27
|
-
return (__assign(__assign({ backgroundColor: palette.common.white, padding: spacing(1.375, 2), color: palette.components.deviceCard.title }, typography.h4_small), { fontWeight: typography.fontWeightBold, display: 'flex', justifyContent: 'center' }));
|
|
28
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import Box from '@mui/material/Box';
|
|
16
|
-
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
|
-
import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
|
|
18
|
-
import { retrieveBoardDetails, retrieveBoardStatus, retrieveTerminalDeviceList, terminalSelector } from '../../../app/terminal/terminalStore';
|
|
19
|
-
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
20
|
-
import Button from '../../../shared/Button';
|
|
21
|
-
import { getTerminalName, SuccessContainerStyled } from '../shared';
|
|
22
|
-
import { CONNECT_FLOWS } from '../../../../constants';
|
|
23
|
-
var LinkedSuccess = function () {
|
|
24
|
-
var t = useTranslation().t;
|
|
25
|
-
var isAr = useLanguage().isAr;
|
|
26
|
-
var dispatch = useAppDispatch();
|
|
27
|
-
var _a = useAppSelector(terminalSelector), error = _a.error, loading = _a.loading, _b = _a.data, selectedTerminal = _b.terminalInfo.selectedTerminal, responseData = _b.responseData;
|
|
28
|
-
var _c = responseData || {}, boardData = _c.boardData, authData = _c.authData;
|
|
29
|
-
var deviceName = getTerminalName(selectedTerminal);
|
|
30
|
-
var handleGoToBoard = function () {
|
|
31
|
-
var board_id = (boardData || {}).id;
|
|
32
|
-
var _a = (authData === null || authData === void 0 ? void 0 : authData.recipient) || {}, id = _a.id, type = _a.type;
|
|
33
|
-
dispatch(retrieveTerminalDeviceList());
|
|
34
|
-
dispatch(retrieveBoardStatus({ boardId: board_id }))
|
|
35
|
-
.unwrap()
|
|
36
|
-
.then(function () {
|
|
37
|
-
dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type }))
|
|
38
|
-
.unwrap()
|
|
39
|
-
.then(function () {
|
|
40
|
-
dispatch(handleNextScreenStep(CONNECT_FLOWS.terminal.board));
|
|
41
|
-
})
|
|
42
|
-
.catch(function () { });
|
|
43
|
-
})
|
|
44
|
-
.catch(function () { });
|
|
45
|
-
};
|
|
46
|
-
var handleOnBack = function () {
|
|
47
|
-
dispatch(handlePrevScreenStep());
|
|
48
|
-
};
|
|
49
|
-
return (_jsxs(SuccessContainerStyled, { children: [_jsx(SuccessScreen, { sx: { minHeight: 'unset', ml: 2.5, mr: 2.5 }, title: t('terminal_linked_success', { device: deviceName }), successTitle: t('terminal_go_to_board'), loading: loading, error: error || '' }), _jsx(Box, __assign({ sx: { width: '100%' } }, { children: _jsx(Button, __assign({ loading: loading, disableBack: true, onBackClicked: handleOnBack, onClick: handleGoToBoard, isAr: isAr }, { children: t('terminal_go_to_board') })) }))] }));
|
|
50
|
-
};
|
|
51
|
-
export default React.memo(LinkedSuccess);
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
|
|
16
|
-
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
|
-
import { useTheme } from '@mui/material';
|
|
18
|
-
import { CONNECT_FLOWS, ICONS_NAMES } from '../../../../constants';
|
|
19
|
-
import DeviceCard from '../../../../components/DeviceCard';
|
|
20
|
-
import Warning from '../../../../components/Warning';
|
|
21
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
22
|
-
import Button from '../../../shared/Button';
|
|
23
|
-
import { clearError, terminalSelector, unlinkTerminalDevice } from '../../../app/terminal/terminalStore';
|
|
24
|
-
import { Container, getId, getIdLabel, getPairedWith, LinkWithText } from '../shared';
|
|
25
|
-
var LinkedTerminalInfo = function () {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
27
|
-
var t = useTranslation().t;
|
|
28
|
-
var _h = useTheme(), spacing = _h.spacing, palette = _h.palette;
|
|
29
|
-
var dispatch = useAppDispatch();
|
|
30
|
-
var isAr = useLanguage().isAr;
|
|
31
|
-
var _j = useAppSelector(terminalSelector), error = _j.error, selectedTerminalDevice = _j.data.terminalInfo.selectedTerminalDevice, loading = _j.loading;
|
|
32
|
-
var model = selectedTerminalDevice.model, linked = selectedTerminalDevice.linked, display_name = selectedTerminalDevice.display_name, terminal = selectedTerminalDevice.terminal, platform = selectedTerminalDevice.platform;
|
|
33
|
-
var _k = (model || {}).image_url, image_url = _k === void 0 ? ICONS_NAMES.device_image : _k;
|
|
34
|
-
var deviceName = (_b = (_a = terminal === null || terminal === void 0 ? void 0 : terminal.device) === null || _a === void 0 ? void 0 : _a.display_name) !== null && _b !== void 0 ? _b : (_c = terminal === null || terminal === void 0 ? void 0 : terminal.name) === null || _c === void 0 ? void 0 : _c.en;
|
|
35
|
-
var deviceImage = (_e = (_d = platform === null || platform === void 0 ? void 0 : platform.brand) === null || _d === void 0 ? void 0 : _d.logo) !== null && _e !== void 0 ? _e : ICONS_NAMES.platform_image;
|
|
36
|
-
var deviceId = (_g = (_f = terminal === null || terminal === void 0 ? void 0 : terminal.device) === null || _f === void 0 ? void 0 : _f.id) !== null && _g !== void 0 ? _g : terminal === null || terminal === void 0 ? void 0 : terminal.legacy_id;
|
|
37
|
-
React.useEffect(function () {
|
|
38
|
-
if (error)
|
|
39
|
-
dispatch(clearError());
|
|
40
|
-
}, []);
|
|
41
|
-
var handleOnNext = function () {
|
|
42
|
-
dispatch(unlinkTerminalDevice())
|
|
43
|
-
.unwrap()
|
|
44
|
-
.then(function (_a) {
|
|
45
|
-
var nextScreen = _a.nextScreen;
|
|
46
|
-
dispatch(handleNextScreenStep(nextScreen));
|
|
47
|
-
})
|
|
48
|
-
.catch(function () { });
|
|
49
|
-
};
|
|
50
|
-
var handleOnBack = function () {
|
|
51
|
-
dispatch(handlePrevScreenStep(CONNECT_FLOWS.terminal.terminalDeviceList));
|
|
52
|
-
};
|
|
53
|
-
return (_jsxs(ScreenContainer, __assign({ minHeight: 224, justifyContent: 'space-between' }, { children: [_jsxs(Container, __assign({ sx: { pl: 2.5, pr: 2.5 } }, { children: [_jsx(DeviceCard, { badge: true, image: image_url, name: display_name, deviceId: getId(selectedTerminalDevice), deviceIdLabel: getIdLabel(selectedTerminalDevice), pairedWith: getPairedWith(selectedTerminalDevice), isLinked: linked }), _jsx(LinkWithText, { children: t('terminal_linked_with') }), _jsx(DeviceCard, { sx: { minHeight: spacing(10), borderRadius: spacing(1), background: palette.components.deviceCard.deviceInfoBackground }, image: deviceImage || '', name: deviceName || '', deviceId: deviceId !== null && deviceId !== void 0 ? deviceId : '', isLinked: linked })] })), error && _jsx(Warning, __assign({ sx: { mt: 2 } }, { children: t(error) })), _jsx(Button, __assign({ loading: loading, onBackClicked: handleOnBack, onClick: handleOnNext, isAr: isAr }, { children: t('terminal_unlink') }))] })));
|
|
54
|
-
};
|
|
55
|
-
export default React.memo(LinkedTerminalInfo);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { useAppSelector } from '../../../../hooks';
|
|
4
|
-
import DataLoading from '../../../shared/DataLoading';
|
|
5
|
-
import { terminalSelector } from '../../../app/terminal/terminalStore';
|
|
6
|
-
export var Loading = function () {
|
|
7
|
-
var error = useAppSelector(terminalSelector).error;
|
|
8
|
-
return _jsx(DataLoading, { error: error });
|
|
9
|
-
};
|
|
10
|
-
export default memo(Loading);
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
16
|
-
import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
|
|
17
|
-
import Button from '../../../../components/Button';
|
|
18
|
-
import Loader from '../../../../components/Loader';
|
|
19
|
-
import { ICONS_NAMES } from '../../../../constants';
|
|
20
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
|
-
import { linkNewTerminal, retrieveBoardDetails, retrieveBoardStatus, terminalSelector } from '../../../app/terminal/terminalStore';
|
|
22
|
-
import { DescriptionTypography, DeviceImage, NoTerminalDeviceLinkedContainer, TitleTypography } from './styles';
|
|
23
|
-
var NoTerminalDeviceLinked = function () {
|
|
24
|
-
var t = useTranslation().t;
|
|
25
|
-
var isAr = useLanguage().isAr;
|
|
26
|
-
var dispatch = useAppDispatch();
|
|
27
|
-
var _a = useAppSelector(terminalSelector), loading = _a.loading, data = _a.data;
|
|
28
|
-
var _b = data.responseData || {}, boardFlows = _b.boardFlows, authData = _b.authData, boardData = _b.boardData;
|
|
29
|
-
var handleOnClickNewTerminalLink = function () {
|
|
30
|
-
dispatch(linkNewTerminal())
|
|
31
|
-
.unwrap()
|
|
32
|
-
.then(function (_a) {
|
|
33
|
-
var nextScreen = _a.nextScreen;
|
|
34
|
-
dispatch(handleNextScreenStep(nextScreen));
|
|
35
|
-
})
|
|
36
|
-
.catch(function () { });
|
|
37
|
-
};
|
|
38
|
-
var handleOnBack = function () {
|
|
39
|
-
if ((boardFlows === null || boardFlows === void 0 ? void 0 : boardFlows.length) > 0) {
|
|
40
|
-
dispatch(handlePrevScreenStep());
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
var _a = (authData === null || authData === void 0 ? void 0 : authData.recipient) || {}, id = _a.id, type = _a.type;
|
|
44
|
-
var board_id = (boardData || {}).id;
|
|
45
|
-
dispatch(retrieveBoardStatus({ boardId: board_id }))
|
|
46
|
-
.unwrap()
|
|
47
|
-
.then(function () {
|
|
48
|
-
dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type }))
|
|
49
|
-
.unwrap()
|
|
50
|
-
.then(function () {
|
|
51
|
-
dispatch(handlePrevScreenStep());
|
|
52
|
-
});
|
|
53
|
-
})
|
|
54
|
-
.catch(function () { });
|
|
55
|
-
};
|
|
56
|
-
return (_jsxs(ScreenContainer, __assign({ sx: { ml: 2.5, mr: 2.5 }, minHeight: 280, justifyContent: 'space-between' }, { children: [_jsxs(NoTerminalDeviceLinkedContainer, { children: [_jsx(DeviceImage, { src: ICONS_NAMES.terminal_device }), _jsx(TitleTypography, { children: t('terminal_no_terminal_linked') }), _jsx(DescriptionTypography, { children: t('terminal_no_terminal_linked_description') })] }), _jsx(Button, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: function () { return handleOnBack(); }, variant: 'text' }, { children: loading ? _jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 15, toggleAnimation: !!loading }) : t('back') }))] })));
|
|
57
|
-
};
|
|
58
|
-
export default React.memo(NoTerminalDeviceLinked);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const NoTerminalDeviceLinkedContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
-
children?: import("react").ReactNode;
|
|
4
|
-
component?: import("react").ElementType<any> | undefined;
|
|
5
|
-
ref?: import("react").Ref<unknown> | undefined;
|
|
6
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
7
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("left" | "right" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
10
|
-
export declare const DeviceImage: import("@emotion/styled").StyledComponent<import("../../../../components/Icon").IconProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
11
|
-
export declare const TitleTypography: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
12
|
-
align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
|
|
13
|
-
children?: import("react").ReactNode;
|
|
14
|
-
classes?: Partial<import("@mui/material/Typography").TypographyClasses> | undefined;
|
|
15
|
-
gutterBottom?: boolean | undefined;
|
|
16
|
-
noWrap?: boolean | undefined;
|
|
17
|
-
paragraph?: boolean | undefined;
|
|
18
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
19
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
|
|
20
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
21
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
22
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
23
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("left" | "right" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
24
|
-
export declare const DescriptionTypography: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
25
|
-
align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
|
|
26
|
-
children?: import("react").ReactNode;
|
|
27
|
-
classes?: Partial<import("@mui/material/Typography").TypographyClasses> | undefined;
|
|
28
|
-
gutterBottom?: boolean | undefined;
|
|
29
|
-
noWrap?: boolean | undefined;
|
|
30
|
-
paragraph?: boolean | undefined;
|
|
31
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
32
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
|
|
33
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
34
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
35
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
36
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("left" | "right" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { alpha, styled } from '@mui/material/styles';
|
|
13
|
-
import Typography from '@mui/material/Typography';
|
|
14
|
-
import Icon from '../../../../components/Icon';
|
|
15
|
-
import { Container } from '../shared';
|
|
16
|
-
export var NoTerminalDeviceLinkedContainer = styled(Container)(function () { return ({
|
|
17
|
-
alignItems: 'center'
|
|
18
|
-
}); });
|
|
19
|
-
export var DeviceImage = styled(Icon)(function (_a) {
|
|
20
|
-
var spacing = _a.theme.spacing;
|
|
21
|
-
return ({
|
|
22
|
-
margin: '0px auto',
|
|
23
|
-
width: spacing(8.25),
|
|
24
|
-
height: spacing(8.25)
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
export var TitleTypography = styled(Typography)(function (_a) {
|
|
28
|
-
var _b = _a.theme, palette = _b.palette, typography = _b.typography, spacing = _b.spacing;
|
|
29
|
-
return (__assign(__assign({}, typography.body1), { fontWeight: typography.fontWeightBold, color: palette.info.dark, marginTop: spacing(3.25) }));
|
|
30
|
-
});
|
|
31
|
-
export var DescriptionTypography = styled(Typography)(function (_a) {
|
|
32
|
-
var _b = _a.theme, palette = _b.palette, typography = _b.typography, spacing = _b.spacing;
|
|
33
|
-
return (__assign(__assign({}, typography.caption), { fontWeight: typography.fontWeightMedium, color: alpha(palette.components.deviceCard.title, 0.5), marginTop: spacing(1) }));
|
|
34
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import GenericError from '../../../shared/GenericError';
|
|
5
|
-
var OperatorError = function (_a) {
|
|
6
|
-
var t = useTranslation().t;
|
|
7
|
-
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
-
};
|
|
9
|
-
export default React.memo(OperatorError);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Trans, useTranslation } from 'react-i18next';
|
|
4
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
5
|
-
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
6
|
-
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
7
|
-
import { maskEmail } from '../../../../utils';
|
|
8
|
-
import { terminalSelector } from '../../../app/terminal/terminalStore';
|
|
9
|
-
var ResetPasswordSuccess = function () {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
var t = useTranslation().t;
|
|
12
|
-
var dispatch = useAppDispatch();
|
|
13
|
-
var data = useAppSelector(terminalSelector).data;
|
|
14
|
-
var email = (((_b = (_a = data.responseData) === null || _a === void 0 ? void 0 : _a.business) === null || _b === void 0 ? void 0 : _b.primary_contact) || {}).email;
|
|
15
|
-
var maskedEmail = maskEmail(email);
|
|
16
|
-
var onBack = function () {
|
|
17
|
-
dispatch(handlePrevScreenStep());
|
|
18
|
-
};
|
|
19
|
-
return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }));
|
|
20
|
-
};
|
|
21
|
-
export default React.memo(ResetPasswordSuccess);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { memo } from 'react';
|
|
14
|
-
import { settingsSelector } from '../../../../app/settings';
|
|
15
|
-
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
16
|
-
import { CONNECT_FLOWS, SCOPE_AUTH } from '../../../../constants';
|
|
17
|
-
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
18
|
-
import { onCloseCompleteTerminal, terminalSelector } from '../../../app/terminal/terminalStore';
|
|
19
|
-
var SuccessWithFlowButtons = function () {
|
|
20
|
-
var _a;
|
|
21
|
-
var dispatch = useAppDispatch();
|
|
22
|
-
var _b = useAppSelector(terminalSelector), data = _b.data, loading = _b.loading;
|
|
23
|
-
var settingsData = useAppSelector(settingsSelector).data;
|
|
24
|
-
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
25
|
-
var _c = data.responseData || {}, boardFlows = _c.boardFlows, boardData = _c.boardData, terminalData = _c.terminalData;
|
|
26
|
-
var _d = boardData || {}, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, user = _d.user, business = _d.business, board_id = _d.board_id, board_info_id = _d.board_info_id, name = _d.name, individuals = _d.individuals, recipient = _d.recipient, board_status = _d.board_status;
|
|
27
|
-
var onClose = function () {
|
|
28
|
-
dispatch(onCloseCompleteTerminal());
|
|
29
|
-
};
|
|
30
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: boardFlows || [], onClose: isScopeAuthentication ? onClose : undefined, recipient: recipient, status: board_status, terminalStepName: ((_a = terminalData === null || terminalData === void 0 ? void 0 : terminalData.terminal_devices) === null || _a === void 0 ? void 0 : _a.length) ? CONNECT_FLOWS.terminal.terminalDeviceList : CONNECT_FLOWS.terminal.noTerminalLinked }));
|
|
31
|
-
};
|
|
32
|
-
export default memo(SuccessWithFlowButtons);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TerminalDeviceInfo } from '../../../../@types';
|
|
3
|
-
interface DeviceListProps {
|
|
4
|
-
devices: TerminalDeviceInfo[];
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
onClick: (device: TerminalDeviceInfo) => void;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: React.MemoExoticComponent<({ devices, onClick, loading }: DeviceListProps) => JSX.Element>;
|
|
9
|
-
export default _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useState } from 'react';
|
|
3
|
-
import DeviceCard from '../../../../components/DeviceCard';
|
|
4
|
-
import { ICONS_NAMES } from '../../../../constants';
|
|
5
|
-
import { DeviceListContainer } from './styles';
|
|
6
|
-
import { getId, getIdLabel, getPairedWith } from '../shared';
|
|
7
|
-
var DeviceList = function (_a) {
|
|
8
|
-
var devices = _a.devices, onClick = _a.onClick, loading = _a.loading;
|
|
9
|
-
var defaultImage = ICONS_NAMES.device_image;
|
|
10
|
-
var _b = useState(), selected = _b[0], setSelected = _b[1];
|
|
11
|
-
var handleOnClick = function (device) {
|
|
12
|
-
setSelected(device);
|
|
13
|
-
onClick(device);
|
|
14
|
-
};
|
|
15
|
-
return (_jsx(DeviceListContainer, { children: devices.map(function (device, index) {
|
|
16
|
-
var _a;
|
|
17
|
-
return (_jsx(DeviceCard, { onClick: function () { return handleOnClick(device); }, loading: device.id === (selected === null || selected === void 0 ? void 0 : selected.id) && loading, image: (_a = device.model.image_url) !== null && _a !== void 0 ? _a : defaultImage, name: device.display_name, deviceId: getId(device), pairedWith: getPairedWith(device), deviceIdLabel: getIdLabel(device), isLinked: device.linked, arrow: true, badge: true }, index));
|
|
18
|
-
}) }));
|
|
19
|
-
};
|
|
20
|
-
export default memo(DeviceList);
|