@tap-payments/auth-jsconnect 2.8.98-development → 2.9.0
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/README.md +2 -2
- package/build/@types/app.d.ts +13 -4
- package/build/@types/app.js +8 -0
- package/build/@types/config.d.ts +4 -0
- package/build/@types/form.d.ts +7 -0
- package/build/api/account.d.ts +3 -1
- package/build/api/account.js +7 -0
- package/build/api/auth.d.ts +20 -1
- package/build/api/index.d.ts +8 -4
- package/build/api/lead.d.ts +2 -0
- package/build/api/lead.js +16 -0
- package/build/api/user.d.ts +7 -0
- package/build/api/user.js +9 -1
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/settings.d.ts +1 -0
- package/build/app/settings.js +14 -8
- package/build/app/store.d.ts +2 -0
- package/build/assets/currencies/AEDSymbol.d.ts +7 -0
- package/build/assets/currencies/AEDSymbol.js +28 -0
- package/build/assets/currencies/SARSymbol.d.ts +7 -0
- package/build/assets/currencies/SARSymbol.js +28 -0
- package/build/assets/currencies/index.d.ts +2 -0
- package/build/assets/currencies/index.js +2 -0
- package/build/assets/currencies/utils.d.ts +4 -0
- package/build/assets/currencies/utils.js +6 -0
- package/build/assets/locales/ar.json +40 -12
- package/build/assets/locales/en.json +63 -9
- package/build/components/AnimationFlow/BottomSheet.js +16 -12
- package/build/components/AnimationFlow/Dialog.js +3 -1
- package/build/components/Input/Input.js +1 -1
- package/build/components/TextWithCurrency/TextWithCurrency.d.ts +7 -0
- package/build/components/TextWithCurrency/TextWithCurrency.js +14 -0
- package/build/components/TextWithCurrency/index.d.ts +2 -0
- package/build/components/TextWithCurrency/index.js +2 -0
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +2 -0
- package/build/constants/api.js +4 -0
- package/build/constants/app.d.ts +27 -0
- package/build/constants/app.js +151 -17
- package/build/constants/assets.d.ts +12 -3
- package/build/constants/assets.js +123 -105
- package/build/constants/dummy.js +27 -20
- package/build/constants/flows.d.ts +26 -0
- package/build/constants/flows.js +27 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/auth/authStore.d.ts +24 -5
- package/build/features/app/auth/authStore.js +197 -95
- package/build/features/app/board/boardStore.d.ts +5 -1
- package/build/features/app/board/boardStore.js +40 -35
- package/build/features/app/business/businessStore.d.ts +10 -1
- package/build/features/app/business/businessStore.js +164 -35
- package/build/features/app/connect/connectStore.d.ts +8 -1
- package/build/features/app/connect/connectStore.js +181 -68
- package/build/features/app/connectExpress/connectExpressStore.d.ts +21 -3
- package/build/features/app/connectExpress/connectExpressStore.js +448 -117
- package/build/features/app/individual/individualStore.d.ts +1 -1
- package/build/features/app/individual/individualStore.js +40 -33
- package/build/features/app/kyc/kycStore.d.ts +67 -0
- package/build/features/app/kyc/kycStore.js +432 -0
- package/build/features/app/signIn/signInStore.js +19 -15
- package/build/features/auth/Auth.d.ts +1 -1
- package/build/features/auth/screens/Mobile/MobileNumber.js +5 -7
- package/build/features/auth/screens/Mobile/validation.js +5 -2
- package/build/features/auth/screens/OTP/OTP.d.ts +13 -2
- package/build/features/auth/screens/OTP/OTP.js +15 -3
- package/build/features/auth/screens/OTP/index.d.ts +1 -2
- package/build/features/auth/screens/Passcode/Passcode.d.ts +16 -0
- package/build/features/auth/screens/Passcode/Passcode.js +82 -0
- package/build/features/auth/screens/Passcode/PasscodeInput.d.ts +6 -0
- package/build/features/auth/screens/Passcode/PasscodeInput.js +42 -0
- package/build/features/auth/screens/Passcode/index.d.ts +2 -0
- package/build/features/auth/screens/Passcode/index.js +2 -0
- package/build/features/auth/screens/Passcode/validation.d.ts +8 -0
- package/build/features/auth/screens/Passcode/validation.js +4 -0
- package/build/features/bank/Bank.d.ts +5 -1
- package/build/features/bank/Bank.js +15 -7
- package/build/features/board/Board.js +1 -1
- package/build/features/brand/Brand.d.ts +5 -1
- package/build/features/brand/Brand.js +15 -7
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -8
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -8
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +103 -0
- package/build/features/business/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/business/screens/MobileOwnership/index.js +2 -0
- package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/business/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connect/Connect.js +1 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +5 -7
- package/build/features/connect/screens/Individual/validation.js +5 -2
- package/build/features/connect/screens/Mobile/MobileNumber.js +5 -7
- package/build/features/connect/screens/Mobile/validation.js +5 -2
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +104 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connect/screens/MobileOwnership/index.js +2 -0
- package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connectExpress/ConnectExpress.js +1 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +5 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +5 -2
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.d.ts +3 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.js +9 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +5 -7
- package/build/features/connectExpress/screens/Mobile/validation.js +9 -4
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.js +49 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.js +88 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.js +2 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.js +4 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +9 -3
- package/build/features/entity/Entity.d.ts +4 -1
- package/build/features/entity/Entity.js +15 -7
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -7
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -7
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +73 -0
- package/build/features/individual/Individual.d.ts +4 -1
- package/build/features/individual/Individual.js +15 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +3 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
- package/build/features/individual/screens/IndividualList/MobileNumber.js +5 -10
- package/build/features/individual/screens/IndividualList/validation.js +5 -3
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +3 -5
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +5 -2
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +5 -10
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +5 -2
- package/build/features/kyc/KYC.d.ts +11 -0
- package/build/features/kyc/KYC.js +99 -0
- package/build/features/kyc/index.d.ts +1 -0
- package/build/features/kyc/index.js +1 -0
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +5 -0
- package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.js +19 -0
- package/build/features/kyc/screens/AlreadySubmitted/index.d.ts +2 -0
- package/build/features/kyc/screens/AlreadySubmitted/index.js +2 -0
- package/build/features/kyc/screens/Loading/Loading.d.ts +4 -0
- package/build/features/kyc/screens/Loading/Loading.js +10 -0
- package/build/features/kyc/screens/Loading/index.d.ts +2 -0
- package/build/features/kyc/screens/Loading/index.js +2 -0
- package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/kyc/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/kyc/screens/OperatorError/index.d.ts +2 -0
- package/build/features/kyc/screens/OperatorError/index.js +2 -0
- package/build/features/kyc/screens/Success/Success.d.ts +5 -0
- package/build/features/kyc/screens/Success/Success.js +32 -0
- package/build/features/kyc/screens/Success/index.d.ts +2 -0
- package/build/features/kyc/screens/Success/index.js +2 -0
- package/build/features/kyc/screens/Terms/Header.d.ts +6 -0
- package/build/features/kyc/screens/Terms/Header.js +36 -0
- package/build/features/kyc/screens/Terms/Terms.d.ts +4 -0
- package/build/features/kyc/screens/Terms/Terms.js +87 -0
- package/build/features/kyc/screens/Terms/index.d.ts +2 -0
- package/build/features/kyc/screens/Terms/index.js +2 -0
- package/build/features/kyc/screens/TokenError/TokenError.d.ts +5 -0
- package/build/features/kyc/screens/TokenError/TokenError.js +9 -0
- package/build/features/kyc/screens/TokenError/index.d.ts +2 -0
- package/build/features/kyc/screens/TokenError/index.js +2 -0
- package/build/features/kyc/screens/Users/Users.d.ts +3 -0
- package/build/features/kyc/screens/Users/Users.js +76 -0
- package/build/features/kyc/screens/Users/index.d.ts +2 -0
- package/build/features/kyc/screens/Users/index.js +2 -0
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +45 -0
- package/build/features/kyc/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/kyc/screens/VerifyNafath/index.js +2 -0
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +5 -0
- package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +44 -0
- package/build/features/kyc/screens/VerifyPaci/index.d.ts +3 -0
- package/build/features/kyc/screens/VerifyPaci/index.js +2 -0
- package/build/features/password/Password.d.ts +4 -1
- package/build/features/password/Password.js +13 -6
- package/build/features/shared/Background/LogoBackground.js +5 -17
- package/build/features/shared/Button/Button.js +1 -2
- package/build/features/shared/Button/FlowsButtons.js +5 -2
- package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -3
- package/build/features/shared/Dialog/DialogContainer.js +5 -4
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/signIn/screens/Mobile/MobileNumber.js +5 -7
- package/build/features/signIn/screens/Mobile/validation.js +5 -2
- package/build/features/tax/Tax.d.ts +4 -1
- package/build/features/tax/Tax.js +15 -7
- package/build/hooks/useAppConfig.js +1 -1
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/hooks/useSanitizedTranslation.d.ts +2 -1
- package/build/hooks/useSanitizedTranslation.js +2 -2
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/theme/shadows.js +1 -1
- package/build/utils/common.d.ts +1 -1
- package/build/utils/common.js +6 -5
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +16 -2
- package/package.json +3 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
|
+
import { useAppSelector } from '../../../../hooks';
|
|
6
|
+
import { kycSelector } from '../../../app/kyc/kycStore';
|
|
7
|
+
var AlreadySubmitted = function (_a) {
|
|
8
|
+
var t = useTranslation().t;
|
|
9
|
+
var _b = useAppSelector(kycSelector), error = _b.error, loading = _b.loading, data = _b.data;
|
|
10
|
+
var redirectToBoard = function () {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
var baseUrl = window.location.origin;
|
|
13
|
+
var boardId = ((_b = (_a = data.responseData) === null || _a === void 0 ? void 0 : _a.verifyTokenData) === null || _b === void 0 ? void 0 : _b.boardId) || '';
|
|
14
|
+
var boardUrl = "".concat(baseUrl, "/board?board_id=").concat(boardId);
|
|
15
|
+
window.open(boardUrl, '_self');
|
|
16
|
+
};
|
|
17
|
+
return (_jsx(SuccessScreen, { title: t('kyc_already_submitted_title'), onSuccess: redirectToBoard, successTitle: t('kyc_success_button'), loading: loading, error: error || '' }));
|
|
18
|
+
};
|
|
19
|
+
export default React.memo(AlreadySubmitted);
|
|
@@ -0,0 +1,10 @@
|
|
|
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 { kycSelector } from '../../../app/kyc/kycStore';
|
|
6
|
+
export var Loading = function () {
|
|
7
|
+
var error = useAppSelector(kycSelector).error;
|
|
8
|
+
return _jsx(DataLoading, { error: error });
|
|
9
|
+
};
|
|
10
|
+
export default memo(Loading);
|
|
@@ -0,0 +1,9 @@
|
|
|
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);
|
|
@@ -0,0 +1,32 @@
|
|
|
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 * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
16
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
|
+
import { kycSelector } from '../../../app/kyc/kycStore';
|
|
18
|
+
import { handleSetAppConfig, settingsSelector } from '../../../../app/settings';
|
|
19
|
+
var Success = function (_a) {
|
|
20
|
+
var t = useTranslation().t;
|
|
21
|
+
var dispatch = useAppDispatch();
|
|
22
|
+
var _b = useAppSelector(kycSelector), error = _b.error, loading = _b.loading, data = _b.data;
|
|
23
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
24
|
+
var redirectToBoard = function () {
|
|
25
|
+
var _a, _b, _c, _d;
|
|
26
|
+
var boardId = ((_b = (_a = data.responseData) === null || _a === void 0 ? void 0 : _a.verifyTokenData) === null || _b === void 0 ? void 0 : _b.boardId) || '';
|
|
27
|
+
dispatch(handleSetAppConfig(__assign(__assign({}, settingsData.appConfig), { scope: 'merchant' })));
|
|
28
|
+
(_d = (_c = settingsData.appConfig).onSwitchToBoard) === null || _d === void 0 ? void 0 : _d.call(_c, boardId || '', '');
|
|
29
|
+
};
|
|
30
|
+
return (_jsx(SuccessScreen, { title: t('kyc_success_title'), onSuccess: redirectToBoard, successTitle: t('kyc_success_button'), loading: loading, error: error || '' }));
|
|
31
|
+
};
|
|
32
|
+
export default React.memo(Success);
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { styled } from '@mui/material/styles';
|
|
15
|
+
import { useSanitizedTranslation } from '../../../../hooks';
|
|
16
|
+
import Text from '../../../../components/Text';
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
var ScreenContainerStyled = styled(ScreenContainer)(function () { return ({
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
textAlign: 'center'
|
|
22
|
+
}); });
|
|
23
|
+
var TitleStyled = styled(Text)(function (_a) {
|
|
24
|
+
var theme = _a.theme;
|
|
25
|
+
return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightBold, color: theme.palette.info.dark, marginBlockEnd: theme.spacing(2), padding: theme.spacing(0, 2.5), lineHeight: '19.2px' }));
|
|
26
|
+
});
|
|
27
|
+
var DescriptionStyled = styled(Text)(function (_a) {
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return (__assign(__assign({}, theme.typography.body2), { fontWeight: theme.typography.fontWeightMedium, color: theme.palette.info.dark, marginBlockEnd: theme.spacing(2), padding: theme.spacing(0, 2.5), lineHeight: '16.8px' }));
|
|
30
|
+
});
|
|
31
|
+
var Header = function (_a) {
|
|
32
|
+
var idNumber = _a.idNumber;
|
|
33
|
+
var st = useSanitizedTranslation();
|
|
34
|
+
return (_jsxs(ScreenContainerStyled, { children: [_jsx(TitleStyled, { children: st('kyc_terms_title') }), _jsx(DescriptionStyled, { children: idNumber ? st('kyc_terms_description_single_user', { id_number: idNumber }) : st('kyc_terms_description') })] }));
|
|
35
|
+
};
|
|
36
|
+
export default React.memo(Header);
|
|
@@ -0,0 +1,87 @@
|
|
|
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 React, { memo } from 'react';
|
|
14
|
+
import { handleNextScreenStep, settingsSelector } from '../../../../app/settings';
|
|
15
|
+
import Box from '@mui/material/Box';
|
|
16
|
+
import { styled } from '@mui/material/styles';
|
|
17
|
+
import { useAppDispatch, useAppSelector, useLanguage, useSanitizedTranslation } from '../../../../hooks';
|
|
18
|
+
import { getWebsiteLink, isOtherThanKWOrSA, isSA, maskIDNumber } from '../../../../utils';
|
|
19
|
+
import { CONNECT_FLOWS, EXTERNAL_LINKS } from '../../../../constants';
|
|
20
|
+
import Button from '../../../shared/Button';
|
|
21
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
22
|
+
import { createNafathAuth, createPaciAuth, kycSelector } from '../../../app/kyc/kycStore';
|
|
23
|
+
import Header from './Header';
|
|
24
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
25
|
+
var theme = _a.theme;
|
|
26
|
+
return ({
|
|
27
|
+
margin: theme.spacing(0, 2.5),
|
|
28
|
+
marginTop: theme.spacing(1.5),
|
|
29
|
+
boxShadow: theme.shadows[3],
|
|
30
|
+
backgroundColor: theme.palette.common.white,
|
|
31
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
32
|
+
fontSize: theme.spacing(1.875),
|
|
33
|
+
padding: theme.spacing(1.5),
|
|
34
|
+
borderRadius: theme.spacing(3.875),
|
|
35
|
+
textAlign: 'center',
|
|
36
|
+
'&:hover': {
|
|
37
|
+
cursor: 'pointer'
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
var redirect = function (link) {
|
|
42
|
+
window.open(link, '_blank');
|
|
43
|
+
};
|
|
44
|
+
export var Terms = function () {
|
|
45
|
+
var _a, _b, _c;
|
|
46
|
+
var st = useSanitizedTranslation();
|
|
47
|
+
var isAr = useLanguage().isAr;
|
|
48
|
+
var dispatch = useAppDispatch();
|
|
49
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
50
|
+
var _d = useAppSelector(kycSelector), loading = _d.loading, error = _d.error, data = _d.data;
|
|
51
|
+
var hasOneUserOnly = ((_b = (_a = data.responseData) === null || _a === void 0 ? void 0 : _a.userList) === null || _b === void 0 ? void 0 : _b.length) === 1;
|
|
52
|
+
var user = hasOneUserOnly ? (_c = data.responseData) === null || _c === void 0 ? void 0 : _c.userList[0] : undefined;
|
|
53
|
+
var idNumber = user ? maskIDNumber(user.identification.id) : '';
|
|
54
|
+
var countryCode = settingsData.businessCountry.iso2.toLowerCase();
|
|
55
|
+
var termsAndConditionsLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.TERMS_CONDITIONS);
|
|
56
|
+
var privacyPolicyLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.PRIVACY_POLICY);
|
|
57
|
+
var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
58
|
+
var isOtherThanKWOrSACountry = React.useMemo(function () { return isOtherThanKWOrSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
59
|
+
var onNext = function () {
|
|
60
|
+
if (hasOneUserOnly) {
|
|
61
|
+
if (isSACountry) {
|
|
62
|
+
dispatch(createNafathAuth(user))
|
|
63
|
+
.unwrap()
|
|
64
|
+
.then(function () {
|
|
65
|
+
dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.verifyNafath));
|
|
66
|
+
})
|
|
67
|
+
.catch(function () { });
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
dispatch(createPaciAuth(user))
|
|
71
|
+
.unwrap()
|
|
72
|
+
.then(function () {
|
|
73
|
+
dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.verifyPACI));
|
|
74
|
+
})
|
|
75
|
+
.catch(function () { });
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.users));
|
|
79
|
+
};
|
|
80
|
+
var getNextButtonTitle = function () {
|
|
81
|
+
if (isOtherThanKWOrSACountry)
|
|
82
|
+
return st('continue');
|
|
83
|
+
return isSACountry ? st('approve_with_nafath_app') : st('approve_with_paci_app');
|
|
84
|
+
};
|
|
85
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Header, { idNumber: idNumber }), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_terms_conditions') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_refund_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_dispute_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(privacyPolicyLink); }, sx: { mb: error ? 3 : 0 } }, { children: st('kyc_privacy_policy') })), _jsx(Button, __assign({ disabled: isOtherThanKWOrSACountry, sx: { mt: 3 }, disableBack: true, isAr: isAr, loading: loading, error: st(error || ''), onClick: onNext }, { children: getNextButtonTitle() }))] }));
|
|
86
|
+
};
|
|
87
|
+
export default memo(Terms);
|
|
@@ -0,0 +1,9 @@
|
|
|
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 TokenError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('kyc_token_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(TokenError);
|
|
@@ -0,0 +1,76 @@
|
|
|
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import React, { memo } from 'react';
|
|
14
|
+
import Box from '@mui/material/Box';
|
|
15
|
+
import { styled } from '@mui/material/styles';
|
|
16
|
+
import { handleNextScreenStep, settingsSelector } from '../../../../app/settings';
|
|
17
|
+
import Text from '../../../../components/Text';
|
|
18
|
+
import Loader from '../../../../components/Loader';
|
|
19
|
+
import Warning from '../../../../components/Warning';
|
|
20
|
+
import { isSA, maskIDNumber } from '../../../../utils';
|
|
21
|
+
import { CONNECT_FLOWS, ICONS_NAMES } from '../../../../constants';
|
|
22
|
+
import { useAppDispatch, useAppSelector, useSanitizedTranslation } from '../../../../hooks';
|
|
23
|
+
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
24
|
+
import { clearError, createNafathAuth, createPaciAuth, kycSelector } from '../../../app/kyc/kycStore';
|
|
25
|
+
var BoxStyled = styled(Box, { shouldForwardProp: function (prop) { return !['loading'].includes(prop.toString()); } })(function (_a) {
|
|
26
|
+
var theme = _a.theme, loading = _a.loading;
|
|
27
|
+
return (__assign({ marginTop: theme.spacing(1), boxShadow: theme.shadows[3], backgroundColor: theme.palette.common.white, fontWeight: theme.typography.fontWeightMedium, fontSize: theme.spacing(1.875), padding: theme.spacing(1.5), borderRadius: theme.spacing(3.875), textAlign: 'center', cursor: 'pointer', display: 'flex', justifyContent: 'space-between' }, (loading && {
|
|
28
|
+
justifyContent: 'center'
|
|
29
|
+
})));
|
|
30
|
+
});
|
|
31
|
+
var DescriptionStyled = styled(Text)(function (_a) {
|
|
32
|
+
var theme = _a.theme;
|
|
33
|
+
return (__assign(__assign({}, theme.typography.body2), { fontWeight: theme.typography.fontWeightMedium, color: theme.palette.info.dark, marginBlockEnd: theme.spacing(2), padding: '0px 20px', lineHeight: '16.8px', textAlign: 'center' }));
|
|
34
|
+
});
|
|
35
|
+
var ImgStyled = styled('img')(function (_a) {
|
|
36
|
+
var theme = _a.theme;
|
|
37
|
+
return ({
|
|
38
|
+
filter: 'brightness(0)',
|
|
39
|
+
width: theme.spacing(2.25),
|
|
40
|
+
height: theme.spacing(2.25)
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
var Users = function () {
|
|
44
|
+
var _a;
|
|
45
|
+
var st = useSanitizedTranslation();
|
|
46
|
+
var dispatch = useAppDispatch();
|
|
47
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
48
|
+
var _b = useAppSelector(kycSelector), loading = _b.loading, error = _b.error, data = _b.data;
|
|
49
|
+
var _c = React.useState(), activeUser = _c[0], setActiveUser = _c[1];
|
|
50
|
+
var userList = ((_a = data.responseData) === null || _a === void 0 ? void 0 : _a.userList) || [];
|
|
51
|
+
var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
52
|
+
var onClickUser = function (user) {
|
|
53
|
+
if (error)
|
|
54
|
+
dispatch(clearError());
|
|
55
|
+
setActiveUser(user);
|
|
56
|
+
if (isSACountry) {
|
|
57
|
+
dispatch(createNafathAuth(user))
|
|
58
|
+
.unwrap()
|
|
59
|
+
.then(function () {
|
|
60
|
+
dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.verifyNafath));
|
|
61
|
+
})
|
|
62
|
+
.catch(function () { });
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
dispatch(createPaciAuth(user))
|
|
66
|
+
.unwrap()
|
|
67
|
+
.then(function () {
|
|
68
|
+
dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.verifyPACI));
|
|
69
|
+
})
|
|
70
|
+
.catch(function () { });
|
|
71
|
+
};
|
|
72
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { pl: 2, pr: 2, pb: 3 } }, { children: [_jsx(DescriptionStyled, { children: st('kyc_users_description', { provider: isSACountry ? 'NAFATH' : 'PACI' }) }), userList.map(function (user, index) {
|
|
73
|
+
return (_jsx(BoxStyled, __assign({ onClick: function () { return onClickUser(user); } }, { children: (activeUser === null || activeUser === void 0 ? void 0 : activeUser.id) === user.id && loading ? (_jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 8, style: { height: 20, width: 20 }, toggleAnimation: !!loading })) : (_jsxs(_Fragment, { children: [_jsx(ImgStyled, { src: ICONS_NAMES.individual_filled_icon }), maskIDNumber(user.identification.id), _jsx("span", {})] })) }), index));
|
|
74
|
+
}), error && (_jsx(Warning, __assign({ sx: { mt: 3, mb: 3 }, warningType: 'error' }, { children: error })))] })));
|
|
75
|
+
};
|
|
76
|
+
export default memo(Users);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { kycSelector, verifyNafath } from '../../../app/kyc/kycStore';
|
|
4
|
+
import NafathVerification from '../../../shared/NafathVerification';
|
|
5
|
+
import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
|
|
6
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
7
|
+
import { CONNECT_FLOWS } from '../../../../constants';
|
|
8
|
+
var VerifyNafathPage = function () {
|
|
9
|
+
var _a = React.useState(false), success = _a[0], setSuccess = _a[1];
|
|
10
|
+
var _b = React.useState(false), failed = _b[0], setFailed = _b[1];
|
|
11
|
+
var _c = React.useState(false), isReady = _c[0], setIsReady = _c[1];
|
|
12
|
+
var dispatch = useAppDispatch();
|
|
13
|
+
var data = useAppSelector(kycSelector).data;
|
|
14
|
+
var _d = data.responseData || {}, createAuthData = _d.createAuthData, userList = _d.userList;
|
|
15
|
+
var _e = createAuthData || {}, expiry = _e.expiry, app_url_android = _e.app_url_android, app_url_ios = _e.app_url_ios, random = _e.random;
|
|
16
|
+
var hasOneUserOnly = (userList === null || userList === void 0 ? void 0 : userList.length) === 1;
|
|
17
|
+
React.useEffect(function () {
|
|
18
|
+
if (createAuthData && !isReady) {
|
|
19
|
+
setIsReady(true);
|
|
20
|
+
}
|
|
21
|
+
}, [createAuthData]);
|
|
22
|
+
React.useEffect(function () {
|
|
23
|
+
if (!isReady)
|
|
24
|
+
return;
|
|
25
|
+
var promise = dispatch(verifyNafath({ onSuccess: function () { return setSuccess(true); }, onFailure: function () { return setFailed(true); } }));
|
|
26
|
+
promise
|
|
27
|
+
.unwrap()
|
|
28
|
+
.then(function (_a) {
|
|
29
|
+
var nextScreen = _a.nextScreen;
|
|
30
|
+
if (nextScreen)
|
|
31
|
+
dispatch(handleNextScreenStep(nextScreen));
|
|
32
|
+
})
|
|
33
|
+
.catch(function () { });
|
|
34
|
+
return function () {
|
|
35
|
+
promise === null || promise === void 0 ? void 0 : promise.abort();
|
|
36
|
+
};
|
|
37
|
+
}, [isReady]);
|
|
38
|
+
var onBack = React.useCallback(function () {
|
|
39
|
+
dispatch(handlePrevScreenStep(hasOneUserOnly ? CONNECT_FLOWS.kyc.terms : CONNECT_FLOWS.kyc.users));
|
|
40
|
+
}, []);
|
|
41
|
+
if (!isReady)
|
|
42
|
+
return null;
|
|
43
|
+
return (_jsx(NafathVerification, { randomNumber: random, expiryInSeconds: expiry, success: success, failed: failed, urls: { android: app_url_android, ios: app_url_ios }, onFinish: function () { return onBack(); } }));
|
|
44
|
+
};
|
|
45
|
+
export default React.memo(VerifyNafathPage);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
|
|
4
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
5
|
+
import { CONNECT_FLOWS } from '../../../../constants';
|
|
6
|
+
import { kycSelector, verifyPaci } from '../../../app/kyc/kycStore';
|
|
7
|
+
import PaciVerification from '../../../shared/PaciVerification';
|
|
8
|
+
var VerifyPaciPage = function () {
|
|
9
|
+
var _a = React.useState(false), success = _a[0], setSuccess = _a[1];
|
|
10
|
+
var _b = React.useState(false), isReady = _b[0], setIsReady = _b[1];
|
|
11
|
+
var dispatch = useAppDispatch();
|
|
12
|
+
var data = useAppSelector(kycSelector).data;
|
|
13
|
+
var _c = data.responseData || {}, createAuthData = _c.createAuthData, userList = _c.userList;
|
|
14
|
+
var _d = createAuthData || {}, expiry = _d.expiry, app_url_android = _d.app_url_android, app_url_ios = _d.app_url_ios, random = _d.random;
|
|
15
|
+
var hasOneUserOnly = (userList === null || userList === void 0 ? void 0 : userList.length) === 1;
|
|
16
|
+
React.useEffect(function () {
|
|
17
|
+
if (createAuthData && !isReady) {
|
|
18
|
+
setIsReady(true);
|
|
19
|
+
}
|
|
20
|
+
}, [createAuthData]);
|
|
21
|
+
React.useEffect(function () {
|
|
22
|
+
if (!isReady)
|
|
23
|
+
return;
|
|
24
|
+
var promise = dispatch(verifyPaci({ onSuccess: function () { return setSuccess(true); } }));
|
|
25
|
+
promise
|
|
26
|
+
.unwrap()
|
|
27
|
+
.then(function (_a) {
|
|
28
|
+
var nextScreen = _a.nextScreen;
|
|
29
|
+
if (nextScreen)
|
|
30
|
+
dispatch(handleNextScreenStep(nextScreen));
|
|
31
|
+
})
|
|
32
|
+
.catch(function () { });
|
|
33
|
+
return function () {
|
|
34
|
+
promise === null || promise === void 0 ? void 0 : promise.abort();
|
|
35
|
+
};
|
|
36
|
+
}, [isReady]);
|
|
37
|
+
var onBack = React.useCallback(function () {
|
|
38
|
+
dispatch(handlePrevScreenStep(hasOneUserOnly ? CONNECT_FLOWS.kyc.terms : CONNECT_FLOWS.kyc.users));
|
|
39
|
+
}, []);
|
|
40
|
+
if (!isReady)
|
|
41
|
+
return null;
|
|
42
|
+
return (_jsx(PaciVerification, { expiryInSeconds: expiry, success: success, urls: { android: app_url_android, ios: app_url_ios }, onFinish: function () { return onBack(); } }));
|
|
43
|
+
};
|
|
44
|
+
export default React.memo(VerifyPaciPage);
|
|
@@ -5,7 +5,10 @@ export interface PasswordLibProps extends LibConfig {
|
|
|
5
5
|
configToken?: string;
|
|
6
6
|
loaderColor?: string;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export interface PasswordLibFullProps extends PasswordLibProps {
|
|
9
|
+
unmount?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function PasswordElement(props: PasswordLibFullProps): JSX.Element;
|
|
9
12
|
export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): {
|
|
10
13
|
unmount: () => void;
|
|
11
14
|
};
|
|
@@ -60,7 +60,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
60
60
|
import { memo } from 'react';
|
|
61
61
|
import { createRoot } from 'react-dom/client';
|
|
62
62
|
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
63
|
-
import { settingsSelector } from '../../app/settings';
|
|
63
|
+
import { handleOpen, settingsSelector } from '../../app/settings';
|
|
64
64
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
65
65
|
import { store } from '../../app/store';
|
|
66
66
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -72,12 +72,12 @@ import { passwordFeatureScreens } from '../featuresScreens';
|
|
|
72
72
|
import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
|
|
73
73
|
import Background from '../shared/Background';
|
|
74
74
|
var Password = memo(function (_a) {
|
|
75
|
-
var _b, _c;
|
|
75
|
+
var _b, _c, _d;
|
|
76
76
|
var configToken = _a.configToken, loaderColor = _a.loaderColor, verifyToken = _a.verifyToken, props = __rest(_a, ["configToken", "loaderColor", "verifyToken"]);
|
|
77
77
|
var theme = useAppTheme().theme;
|
|
78
78
|
var dispatch = useAppDispatch();
|
|
79
|
-
var
|
|
80
|
-
var
|
|
79
|
+
var _e = useAppSelector(settingsSelector), data = _e.data, error = _e.error, settingLoading = _e.loading;
|
|
80
|
+
var _f = useAppSelector(passwordSelector), customLoading = _f.customLoading, passwordError = _f.error, loading = _f.loading;
|
|
81
81
|
useAppConfig(__assign({ navigation: PASSWORD_SCREENS_NAVIGATION, disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }, props));
|
|
82
82
|
useErrorListener(passwordError || error);
|
|
83
83
|
useStepStartedListener();
|
|
@@ -117,8 +117,15 @@ var Password = memo(function (_a) {
|
|
|
117
117
|
isValidOperator: data.isValidOperator,
|
|
118
118
|
operatorErrorScreenName: 'PASSWORD_OPERATOR_ERROR_STEP'
|
|
119
119
|
});
|
|
120
|
+
var handleDialogClose = function () {
|
|
121
|
+
dispatch(handleOpen(false));
|
|
122
|
+
setTimeout(function () {
|
|
123
|
+
var _a;
|
|
124
|
+
(_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
125
|
+
}, 1100);
|
|
126
|
+
};
|
|
120
127
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
121
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, animationDirection: animationDirection, loading: initialLoading, error: error, open: open, breakpoint: 'sm', loaderColor: loaderColor, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
128
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, animationDirection: animationDirection, loading: initialLoading, error: error, open: open, breakpoint: 'sm', loaderColor: loaderColor, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
122
129
|
var Element = _a.element, name = _a.name;
|
|
123
130
|
var isActive = activeScreen.name === name;
|
|
124
131
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -130,7 +137,7 @@ export function PasswordElement(props) {
|
|
|
130
137
|
export function renderPasswordLib(config, elementId) {
|
|
131
138
|
var el = findOrCreateElementAndInject(elementId);
|
|
132
139
|
var root = createRoot(el);
|
|
133
|
-
root.render(_jsx(PasswordElement, __assign({}, config)));
|
|
134
140
|
var unmount = function () { return root.unmount(); };
|
|
141
|
+
root.render(_jsx(PasswordElement, __assign({}, config, { unmount: unmount })));
|
|
135
142
|
return { unmount: unmount };
|
|
136
143
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import Box from '@mui/material/Box';
|
|
5
5
|
import Icon from '../../../components/Icon';
|
|
6
6
|
import { ICONS_NAMES } from '../../../constants';
|
|
7
|
-
import { useLanguage } from '../../../hooks';
|
|
8
7
|
var BoxStyled = styled(Box)(function (_a) {
|
|
9
8
|
var _b;
|
|
10
9
|
var theme = _a.theme;
|
|
11
10
|
return (_b = {
|
|
12
11
|
display: 'flex',
|
|
13
|
-
flexDirection: 'column',
|
|
14
12
|
justifyContent: 'center',
|
|
15
|
-
|
|
16
|
-
paddingTop: theme.spacing(5)
|
|
13
|
+
paddingTop: theme.spacing(10)
|
|
17
14
|
},
|
|
18
15
|
_b[theme.breakpoints.down('sm')] = {
|
|
19
16
|
paddingTop: theme.spacing(11)
|
|
@@ -23,20 +20,11 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
23
20
|
var LogoBadgeStyled = styled(Icon)(function (_a) {
|
|
24
21
|
var theme = _a.theme;
|
|
25
22
|
return ({
|
|
26
|
-
height: theme.spacing(
|
|
27
|
-
width: theme.spacing(
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
var LogoIconStyled = styled(Icon)(function (_a) {
|
|
31
|
-
var theme = _a.theme;
|
|
32
|
-
return ({
|
|
33
|
-
width: theme.spacing(5.875),
|
|
34
|
-
height: theme.spacing(3.625),
|
|
35
|
-
marginTop: theme.spacing(2.5)
|
|
23
|
+
height: theme.spacing(9.5),
|
|
24
|
+
width: theme.spacing(19.322)
|
|
36
25
|
});
|
|
37
26
|
});
|
|
38
27
|
var LogoBackground = function () {
|
|
39
|
-
|
|
40
|
-
return (_jsxs(BoxStyled, { children: [_jsx(LogoBadgeStyled, { src: ICONS_NAMES.TAP_LOGO_EN_ICON }), _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_LOGO_TEXT_AR : ICONS_NAMES.TAP_LOGO_TEXT_EN, alt: 'tap logo' })] }));
|
|
28
|
+
return (_jsx(BoxStyled, { children: _jsx(LogoBadgeStyled, { src: ICONS_NAMES.TAP_LOGO, alt: 'tap logo' }) }));
|
|
41
29
|
};
|
|
42
30
|
export default memo(LogoBackground);
|