@tap-payments/auth-jsconnect 2.0.54-test → 2.0.56-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +39 -14
- package/build/@types/app.js +9 -0
- package/build/@types/form.d.ts +11 -0
- package/build/api/auth.d.ts +14 -1
- package/build/api/auth.js +24 -1
- package/build/api/axios.js +2 -2
- package/build/api/data.d.ts +33 -7
- package/build/api/data.js +41 -16
- package/build/api/entity.d.ts +2 -0
- package/build/api/index.d.ts +11 -8
- package/build/api/individual.d.ts +1 -1
- package/build/app/rootReducer.d.ts +3 -0
- package/build/app/rootReducer.js +7 -1
- package/build/app/settings.js +8 -2
- package/build/app/store.d.ts +7 -1
- package/build/assets/locales/ar.json +14 -4
- package/build/assets/locales/en.json +14 -4
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
- package/build/components/AnimationFlow/AnimationFlow.js +5 -7
- package/build/components/AnimationFlow/BottomSheet.js +2 -1
- package/build/components/AnimationFlow/Dialog.d.ts +4 -1
- package/build/components/AnimationFlow/Dialog.js +9 -4
- package/build/components/FileInput/DragAndDrop.d.ts +9 -1
- package/build/components/FileInput/DragAndDrop.js +113 -8
- package/build/components/Lottie/Lottie.d.ts +878 -0
- package/build/components/Lottie/Lottie.js +58 -0
- package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
- package/build/components/Lottie/files/success.json +425 -0
- package/build/components/Lottie/index.d.ts +3 -0
- package/build/components/Lottie/index.js +3 -0
- package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
- package/build/components/ProgressBar/CircularProgressBar.js +48 -0
- package/build/components/ProgressBar/index.d.ts +2 -0
- package/build/components/ProgressBar/index.js +2 -0
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +27 -34
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +10 -7
- package/build/constants/app.d.ts +15 -0
- package/build/constants/app.js +75 -3
- package/build/constants/assets.d.ts +17 -1
- package/build/constants/assets.js +22 -6
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/auth/authStore.d.ts +35 -0
- package/build/features/app/auth/authStore.js +148 -0
- package/build/features/app/bank/bankStore.d.ts +4 -0
- package/build/features/app/bank/bankStore.js +42 -22
- package/build/features/app/business/businessStore.js +53 -43
- package/build/features/app/connect/connectStore.d.ts +13 -1
- package/build/features/app/connect/connectStore.js +164 -4
- package/build/features/app/entity/entityStore.d.ts +53 -0
- package/build/features/app/entity/entityStore.js +461 -0
- package/build/features/app/individual/individualStore.js +19 -11
- package/build/features/app/otp/otpStore.d.ts +28 -0
- package/build/features/app/otp/otpStore.js +153 -0
- package/build/features/app/signIn/signInStore.js +2 -2
- package/build/features/auth/Auth.d.ts +10 -0
- package/build/features/auth/Auth.js +87 -0
- package/build/features/auth/index.d.ts +1 -0
- package/build/features/auth/index.js +1 -0
- package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
- package/build/features/auth/screens/OTP/OTP.js +72 -0
- package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/auth/screens/OTP/OTPInput.js +44 -0
- package/build/features/auth/screens/OTP/index.d.ts +3 -0
- package/build/features/auth/screens/OTP/index.js +2 -0
- package/build/features/auth/screens/OTP/validation.d.ts +8 -0
- package/build/features/auth/screens/OTP/validation.js +4 -0
- package/build/features/bank/Bank.js +10 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
- package/build/features/bank/screens/BankDetails/BankStatement.js +33 -8
- package/build/features/business/Business.d.ts +1 -1
- package/build/features/business/Business.js +12 -5
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.js +25 -7
- package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
- package/build/features/connect/Connect.d.ts +2 -1
- package/build/features/connect/Connect.js +40 -10
- package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connect/screens/CivilID/CivilID.js +85 -0
- package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
- package/build/features/connect/screens/CivilID/index.d.ts +3 -0
- package/build/features/connect/screens/CivilID/index.js +2 -0
- package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connect/screens/CivilID/validation.js +4 -0
- package/build/features/connect/screens/Individual/Individual.js +6 -2
- package/build/features/connect/screens/Merchant/Merchant.js +35 -11
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +5 -0
- package/build/features/connect/screens/Merchant/SalesChannels.js +114 -0
- package/build/features/connect/screens/Merchant/SocialMedia.js +56 -11
- package/build/features/connect/screens/Merchant/validation.d.ts +87 -0
- package/build/features/connect/screens/Merchant/validation.js +68 -2
- package/build/features/connect/screens/Mobile/Mobile.js +7 -4
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +169 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
- package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyPACI/index.js +2 -0
- package/build/features/entity/Entity.d.ts +7 -0
- package/build/features/entity/Entity.js +70 -0
- package/build/features/entity/index.d.ts +1 -0
- package/build/features/entity/index.js +1 -0
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +139 -0
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +56 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +112 -0
- package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +2 -0
- package/build/features/entity/screens/EntityInfoConfirm/index.js +2 -0
- package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
- package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/entity/screens/Success/Success.d.ts +5 -0
- package/build/features/entity/screens/Success/Success.js +16 -0
- package/build/features/entity/screens/Success/index.d.ts +3 -0
- package/build/features/entity/screens/Success/index.js +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +109 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/entity/screens/Verify/OTPInput.js +47 -0
- package/build/features/entity/screens/Verify/Verify.d.ts +5 -0
- package/build/features/entity/screens/Verify/Verify.js +78 -0
- package/build/features/entity/screens/Verify/index.d.ts +2 -0
- package/build/features/entity/screens/Verify/index.js +2 -0
- package/build/features/entity/screens/Verify/validation.d.ts +8 -0
- package/build/features/entity/screens/Verify/validation.js +4 -0
- package/build/features/featuresScreens.d.ts +3 -0
- package/build/features/featuresScreens.js +48 -0
- package/build/features/individual/Individual.d.ts +1 -1
- package/build/features/individual/Individual.js +12 -5
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +14 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
- package/build/features/otp/OTP.d.ts +7 -0
- package/build/features/otp/OTP.js +58 -0
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +1 -0
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +6 -0
- package/build/features/otp/screens/OTPVerify/OTPInput.js +47 -0
- package/build/features/otp/screens/OTPVerify/Verify.d.ts +5 -0
- package/build/features/otp/screens/OTPVerify/Verify.js +49 -0
- package/build/features/otp/screens/OTPVerify/index.d.ts +2 -0
- package/build/features/otp/screens/OTPVerify/index.js +2 -0
- package/build/features/otp/screens/OTPVerify/validation.d.ts +8 -0
- package/build/features/otp/screens/OTPVerify/validation.js +4 -0
- package/build/features/password/Password.d.ts +1 -1
- package/build/features/password/Password.js +12 -5
- package/build/features/shared/Background/Background.d.ts +7 -5
- package/build/features/shared/Background/Background.js +16 -5
- package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
- package/build/features/shared/Dialog/CloseDialog.js +62 -0
- package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
- package/build/features/shared/Dialog/DialogContainer.js +56 -0
- package/build/features/shared/Dialog/index.d.ts +4 -0
- package/build/features/shared/Dialog/index.js +4 -0
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/shared/UploadFile/UploadFile.d.ts +8 -3
- package/build/features/shared/UploadFile/UploadFile.js +23 -8
- package/build/features/signIn/SignIn.d.ts +1 -1
- package/build/features/signIn/SignIn.js +12 -4
- package/build/features/tax/Tax.d.ts +1 -1
- package/build/features/tax/Tax.js +12 -4
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.js +2 -0
- package/build/hooks/useAppDispatch.d.ts +3 -0
- package/build/hooks/useErrorListener.js +3 -2
- package/build/hooks/useScreen.d.ts +3 -0
- package/build/hooks/useScreen.js +14 -0
- package/build/index.d.ts +5 -2
- package/build/index.js +11 -2
- package/build/utils/device.d.ts +1 -0
- package/build/utils/device.js +13 -0
- package/build/utils/html.d.ts +1 -0
- package/build/utils/html.js +6 -0
- package/build/utils/locale.js +1 -1
- package/build/utils/rsa.d.ts +2 -2
- package/build/utils/rsa.js +1 -1
- package/build/utils/string.d.ts +22 -20
- package/build/utils/string.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
|
+
import Box from '@mui/material/Box/Box';
|
|
50
|
+
import { styled } from '@mui/material/styles';
|
|
51
|
+
import * as React from 'react';
|
|
52
|
+
import { useTranslation } from 'react-i18next';
|
|
53
|
+
import Text from '../../../../components/Text';
|
|
54
|
+
import { connectSelector, verifyPACI as verifyPACIFun } from '../../../app/connect/connectStore';
|
|
55
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
56
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
57
|
+
import { MobileButton } from '../../../shared/Button';
|
|
58
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
59
|
+
import Icon from '../../../../components/Icon';
|
|
60
|
+
import { mobileOS } from '../../../../utils';
|
|
61
|
+
import VerifyPACILoading from './VerifyPACILoading';
|
|
62
|
+
import VerifyPACISuccess from './VerifyPACISuccess';
|
|
63
|
+
var VerifyPACITitleContainerStyled = styled(Box)(function (_a) {
|
|
64
|
+
var theme = _a.theme;
|
|
65
|
+
return ({
|
|
66
|
+
direction: theme.direction,
|
|
67
|
+
borderRadius: theme.spacing(0, 0, 1.25, 1.25),
|
|
68
|
+
display: 'flex',
|
|
69
|
+
flexDirection: 'column',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
marginBottom: theme.spacing(2.5)
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
var VerifyPACITitleStyled = styled(Text)(function (_a) {
|
|
75
|
+
var theme = _a.theme;
|
|
76
|
+
return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightBold, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line' }));
|
|
77
|
+
});
|
|
78
|
+
var VerifyPACISubTitleStyled = styled(Text)(function (_a) {
|
|
79
|
+
var theme = _a.theme;
|
|
80
|
+
return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightMedium, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line', textAlign: 'center' }));
|
|
81
|
+
});
|
|
82
|
+
var Container = styled(Box)(function (_a) {
|
|
83
|
+
var theme = _a.theme;
|
|
84
|
+
return ({
|
|
85
|
+
position: 'relative',
|
|
86
|
+
display: 'flex',
|
|
87
|
+
justifyContent: 'center',
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
maxHeight: '300px'
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
var IconStyled = styled(Icon)(function (_a) {
|
|
93
|
+
var theme = _a.theme;
|
|
94
|
+
return ({
|
|
95
|
+
position: 'absolute',
|
|
96
|
+
top: '50%',
|
|
97
|
+
left: '50%',
|
|
98
|
+
transform: 'translate(-50%, -50%)',
|
|
99
|
+
width: 64,
|
|
100
|
+
height: 64
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
var BackButton = styled('button')(function (_a) {
|
|
104
|
+
var theme = _a.theme;
|
|
105
|
+
return ({
|
|
106
|
+
cursor: 'pointer',
|
|
107
|
+
height: 44,
|
|
108
|
+
appearance: 'none',
|
|
109
|
+
background: 'none',
|
|
110
|
+
border: 'none',
|
|
111
|
+
color: theme.palette.primary.main,
|
|
112
|
+
fontSize: theme.typography.body1.fontSize,
|
|
113
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
114
|
+
textTransform: 'capitalize',
|
|
115
|
+
'&:hover': {
|
|
116
|
+
backgroundColor: 'transparent'
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
var VerifyPACI = function () {
|
|
121
|
+
var _a = React.useState(false), success = _a[0], setSuccess = _a[1];
|
|
122
|
+
var dispatch = useAppDispatch();
|
|
123
|
+
var data = useAppSelector(connectSelector).data;
|
|
124
|
+
var responseBody = data.civilIdData.responseBody;
|
|
125
|
+
var t = useTranslation().t;
|
|
126
|
+
var onSuccess = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
127
|
+
return __generator(this, function (_a) {
|
|
128
|
+
switch (_a.label) {
|
|
129
|
+
case 0: return [4, new Promise(function (resolve) {
|
|
130
|
+
setSuccess(true);
|
|
131
|
+
setTimeout(function () {
|
|
132
|
+
resolve('success');
|
|
133
|
+
}, 1000);
|
|
134
|
+
})];
|
|
135
|
+
case 1:
|
|
136
|
+
_a.sent();
|
|
137
|
+
return [2];
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}); };
|
|
141
|
+
React.useEffect(function () {
|
|
142
|
+
if (responseBody)
|
|
143
|
+
dispatch(verifyPACIFun({ onSuccess: onSuccess }));
|
|
144
|
+
var interval = setInterval(function () {
|
|
145
|
+
if (responseBody)
|
|
146
|
+
dispatch(verifyPACIFun({ onSuccess: onSuccess }));
|
|
147
|
+
}, 10000);
|
|
148
|
+
setTimeout(function () {
|
|
149
|
+
clearInterval(interval);
|
|
150
|
+
}, ((responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120) * 1000);
|
|
151
|
+
return function () { return clearInterval(interval); };
|
|
152
|
+
}, [responseBody]);
|
|
153
|
+
var onRedirect = React.useCallback(function () {
|
|
154
|
+
if (os === 'Android') {
|
|
155
|
+
window.open(responseBody === null || responseBody === void 0 ? void 0 : responseBody.app_url_android, '_blank');
|
|
156
|
+
}
|
|
157
|
+
if (os === 'iOS') {
|
|
158
|
+
window.open(responseBody === null || responseBody === void 0 ? void 0 : responseBody.app_url_ios, '_blank');
|
|
159
|
+
}
|
|
160
|
+
}, [responseBody]);
|
|
161
|
+
var onBack = React.useCallback(function () {
|
|
162
|
+
dispatch(handlePrevScreenStep());
|
|
163
|
+
}, []);
|
|
164
|
+
var os = React.useMemo(function () { return mobileOS(); }, []);
|
|
165
|
+
var isAndroid = React.useMemo(function () { return os === 'Android' && (responseBody === null || responseBody === void 0 ? void 0 : responseBody.app_url_ios); }, [os, responseBody]);
|
|
166
|
+
var isIOS = React.useMemo(function () { return os === 'iOS' && (responseBody === null || responseBody === void 0 ? void 0 : responseBody.app_url_ios); }, [os, responseBody]);
|
|
167
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mb: 2.5 } }, { children: [_jsxs(VerifyPACITitleContainerStyled, { children: [_jsx(Container, { children: success ? _jsx(VerifyPACISuccess, {}) : _jsx(VerifyPACILoading, {}) }), _jsx(VerifyPACITitleStyled, { children: t('authenticate_kuwait_mobile_title') }), _jsx(VerifyPACISubTitleStyled, { children: t('authenticate_kuwait_mobile_description') })] }), (isAndroid || isIOS) && (_jsx(MobileButton, __assign({ onClick: onRedirect, hideIcon: true }, { children: t('Open Kuwait Mobile ID') }))), _jsx(BackButton, __assign({ onClick: onBack }, { children: t('back') }))] })));
|
|
168
|
+
};
|
|
169
|
+
export default React.memo(VerifyPACI);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import LottieFile, { LottieAnimationFiles } from '../../../../components/Lottie';
|
|
5
|
+
import { ICONS_NAMES } from '../../../../constants';
|
|
6
|
+
import Icon from '../../../../components/Icon';
|
|
7
|
+
var IconStyled = styled(Icon)(function (_a) {
|
|
8
|
+
var theme = _a.theme;
|
|
9
|
+
return ({
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
top: '50%',
|
|
12
|
+
left: '50%',
|
|
13
|
+
transform: 'translate(-50%, -50%)',
|
|
14
|
+
width: 64,
|
|
15
|
+
height: 64
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
var VerifyPACILoading = function () {
|
|
19
|
+
return (_jsxs(_Fragment, { children: [_jsx(LottieFile, { file: LottieAnimationFiles.pulsating_circle_waves, width: '90%' }), _jsx(IconStyled, { src: ICONS_NAMES.PACI_VERIFY_ICON })] }));
|
|
20
|
+
};
|
|
21
|
+
VerifyPACILoading.defaultProps = {};
|
|
22
|
+
export default memo(VerifyPACILoading);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import LottieFile, { LottieAnimationFiles } from '../../../../components/Lottie';
|
|
4
|
+
var VerifyPACISuccess = function () {
|
|
5
|
+
return (_jsx(_Fragment, { children: _jsx(LottieFile, { loop: false, file: LottieAnimationFiles.success, width: '90%' }) }));
|
|
6
|
+
};
|
|
7
|
+
VerifyPACISuccess.defaultProps = {};
|
|
8
|
+
export default memo(VerifyPACISuccess);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LibConfig } from '../../@types';
|
|
3
|
+
export interface EntityLibProps extends LibConfig {
|
|
4
|
+
}
|
|
5
|
+
export declare function EntityLib(props: EntityLibProps): JSX.Element;
|
|
6
|
+
export declare function renderEntityLib(config: EntityLibProps, elementId: string): void;
|
|
7
|
+
export declare function unmountEntityLib(elementId: string, unmountTimeout?: number): void;
|
|
@@ -0,0 +1,70 @@
|
|
|
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, useEffect } from 'react';
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
15
|
+
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
|
+
import AnimationFlow from '../../components/AnimationFlow';
|
|
17
|
+
import { store } from '../../app/store';
|
|
18
|
+
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
19
|
+
import Collapse from '../../components/Collapse';
|
|
20
|
+
import { getParameterByName, reactElement, removeElement } from '../../utils';
|
|
21
|
+
import { FeatureContainer } from '../shared/Containers';
|
|
22
|
+
import { DIALOG_ID, ENTITY_SCREENS_NAVIGATION } from '../../constants';
|
|
23
|
+
import { entityFeatureScreens } from '../featuresScreens';
|
|
24
|
+
import CustomFooter from '../shared/Footer';
|
|
25
|
+
import { entitySelector, verifyLeadToken } from '../app/entity/entityStore';
|
|
26
|
+
import Background from '../shared/Background';
|
|
27
|
+
var Entity = memo(function (props) {
|
|
28
|
+
var theme = useAppTheme().theme;
|
|
29
|
+
var dispatch = useAppDispatch();
|
|
30
|
+
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, loading = _a.loading;
|
|
31
|
+
var _b = useAppSelector(entitySelector), customLoading = _b.customLoading, entityError = _b.error;
|
|
32
|
+
useAppConfig(__assign({ navigation: ENTITY_SCREENS_NAVIGATION }, props));
|
|
33
|
+
useErrorListener(entityError || error);
|
|
34
|
+
useStepStartedListener();
|
|
35
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
36
|
+
var verifyToken = function () {
|
|
37
|
+
var token = getParameterByName('token');
|
|
38
|
+
var lang = getParameterByName('lang');
|
|
39
|
+
if (lang)
|
|
40
|
+
dispatch(handleLanguage(lang));
|
|
41
|
+
if (!token)
|
|
42
|
+
throw new Error('Auth token is not found!');
|
|
43
|
+
dispatch(verifyLeadToken(token));
|
|
44
|
+
};
|
|
45
|
+
useEffect(function () {
|
|
46
|
+
if (!loading)
|
|
47
|
+
verifyToken();
|
|
48
|
+
}, [loading]);
|
|
49
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: loading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, open: open, error: error, loading: loading || customLoading, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: entityFeatureScreens.map(function (_a, index) {
|
|
50
|
+
var Element = _a.element, name = _a.name;
|
|
51
|
+
var isActive = activeScreen.name === name;
|
|
52
|
+
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
53
|
+
}) }) })) })) })));
|
|
54
|
+
});
|
|
55
|
+
export function EntityLib(props) {
|
|
56
|
+
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Entity, __assign({}, props)) })));
|
|
57
|
+
}
|
|
58
|
+
export function renderEntityLib(config, elementId) {
|
|
59
|
+
reactElement(elementId).render(_jsx(EntityLib, __assign({}, config)));
|
|
60
|
+
}
|
|
61
|
+
export function unmountEntityLib(elementId, unmountTimeout) {
|
|
62
|
+
if (unmountTimeout === void 0) { unmountTimeout = 1000; }
|
|
63
|
+
var element = document.getElementById(elementId);
|
|
64
|
+
setTimeout(function () {
|
|
65
|
+
var _a;
|
|
66
|
+
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
67
|
+
removeElement(DIALOG_ID);
|
|
68
|
+
reactElement(elementId).unmount();
|
|
69
|
+
}, unmountTimeout);
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Entity';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Entity';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
+
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
6
|
+
gutterBottom?: boolean | undefined;
|
|
7
|
+
noWrap?: boolean | undefined;
|
|
8
|
+
paragraph?: boolean | undefined;
|
|
9
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
10
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
11
|
+
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
12
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
13
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
14
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("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" | "right" | "bottom" | "left" | "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>, {}, {}>;
|
|
15
|
+
export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
|
|
16
|
+
placeholder?: string | undefined;
|
|
17
|
+
hide?: boolean | undefined;
|
|
18
|
+
warningType?: "alert" | "error" | "hint" | undefined;
|
|
19
|
+
} & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
20
|
+
export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
23
|
+
color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
24
|
+
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
25
|
+
htmlColor?: string | undefined;
|
|
26
|
+
inheritViewBox?: boolean | undefined;
|
|
27
|
+
shapeRendering?: string | undefined;
|
|
28
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
29
|
+
titleAccess?: string | undefined;
|
|
30
|
+
viewBox?: string | undefined;
|
|
31
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "origin" | "method" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "min" | "viewBox" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
32
|
+
ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
|
|
33
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
34
|
+
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
35
|
+
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
38
|
+
gutterBottom?: boolean | undefined;
|
|
39
|
+
noWrap?: boolean | undefined;
|
|
40
|
+
paragraph?: boolean | undefined;
|
|
41
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
42
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
43
|
+
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
44
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
45
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
46
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("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" | "right" | "bottom" | "left" | "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> & {
|
|
47
|
+
isSelected: boolean;
|
|
48
|
+
}, {}, {}>;
|
|
49
|
+
export interface ActivitiesListProps {
|
|
50
|
+
onListOpen?: () => void;
|
|
51
|
+
onListClose?: () => void;
|
|
52
|
+
}
|
|
53
|
+
declare const ActivitiesList: ({ ...rest }: ActivitiesListProps) => JSX.Element;
|
|
54
|
+
export default ActivitiesList;
|
|
@@ -0,0 +1,139 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
24
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
25
|
+
if (ar || !(i in from)) {
|
|
26
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
27
|
+
ar[i] = from[i];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
|
+
};
|
|
32
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
|
+
import * as React from 'react';
|
|
34
|
+
import Box from '@mui/material/Box';
|
|
35
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
36
|
+
import Text from '../../../../components/Text';
|
|
37
|
+
import Input from '../../../../components/Input';
|
|
38
|
+
import { useTranslation } from 'react-i18next';
|
|
39
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
40
|
+
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
41
|
+
import { BusinessType } from '../../../../@types';
|
|
42
|
+
import Collapse from '../../../../components/Collapse';
|
|
43
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
44
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
45
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
46
|
+
import { entitySelector } from '../../../app/entity/entityStore';
|
|
47
|
+
import CheckIcon from '@mui/icons-material/Check';
|
|
48
|
+
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
49
|
+
var theme = _a.theme;
|
|
50
|
+
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
51
|
+
});
|
|
52
|
+
export var InputStyled = styled(Input)(function (_a) {
|
|
53
|
+
var theme = _a.theme;
|
|
54
|
+
return ({
|
|
55
|
+
paddingInlineEnd: theme.spacing(2.5),
|
|
56
|
+
'& .MuiInputBase-input': {
|
|
57
|
+
cursor: 'pointer'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
62
|
+
height: 'fit-content'
|
|
63
|
+
}); });
|
|
64
|
+
export var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
65
|
+
var theme = _a.theme;
|
|
66
|
+
return ({
|
|
67
|
+
color: theme.palette.primary.main,
|
|
68
|
+
display: 'flex',
|
|
69
|
+
alignItems: 'flex-end'
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
73
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
|
74
|
+
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
75
|
+
});
|
|
76
|
+
var ActivitiesList = function (_a) {
|
|
77
|
+
var _b, _c, _d, _e;
|
|
78
|
+
var rest = __rest(_a, []);
|
|
79
|
+
var _f = React.useState([]), activitiesMenuList = _f[0], setActivitiesMenuList = _f[1];
|
|
80
|
+
var _g = React.useState([]), storedActivities = _g[0], setStoredActivities = _g[1];
|
|
81
|
+
var _h = React.useState(null), anchorEl = _h[0], setAnchorEl = _h[1];
|
|
82
|
+
var t = useTranslation().t;
|
|
83
|
+
var isAr = useLanguage().isAr;
|
|
84
|
+
var control = useFormContext().control;
|
|
85
|
+
var data = useAppSelector(entitySelector).data;
|
|
86
|
+
var activitiesControl = useController({ name: 'activities', control: control });
|
|
87
|
+
var controlValue = activitiesControl.field.value;
|
|
88
|
+
var verify = data.verify, entityData = data.entityData;
|
|
89
|
+
var activities = (((_b = verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) || {}).activities;
|
|
90
|
+
var selectedActivities = (entityData.responseBody || {}).selectedActivities;
|
|
91
|
+
var businessType = (_e = (_d = (_c = verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) === null || _d === void 0 ? void 0 : _d.license) === null || _e === void 0 ? void 0 : _e.type;
|
|
92
|
+
var isCR = businessType === BusinessType.CR;
|
|
93
|
+
React.useEffect(function () {
|
|
94
|
+
if ((activities === null || activities === void 0 ? void 0 : activities.length) > 0) {
|
|
95
|
+
setActivitiesMenuList(activities);
|
|
96
|
+
}
|
|
97
|
+
}, [activities]);
|
|
98
|
+
React.useEffect(function () {
|
|
99
|
+
if ((selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.length) > 0) {
|
|
100
|
+
setStoredActivities(selectedActivities);
|
|
101
|
+
}
|
|
102
|
+
}, []);
|
|
103
|
+
var onOpenList = function (event) {
|
|
104
|
+
var _a;
|
|
105
|
+
setAnchorEl(event.currentTarget);
|
|
106
|
+
(_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
107
|
+
};
|
|
108
|
+
var onCloseList = function () {
|
|
109
|
+
var _a;
|
|
110
|
+
setAnchorEl(null);
|
|
111
|
+
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
112
|
+
};
|
|
113
|
+
var onSelectItem = function (item) {
|
|
114
|
+
var isActivityExists = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.en === (item === null || item === void 0 ? void 0 : item.en); });
|
|
115
|
+
var storedActivity = storedActivities === null || storedActivities === void 0 ? void 0 : storedActivities.find(function (activity) { return activity.en === (item === null || item === void 0 ? void 0 : item.en); });
|
|
116
|
+
if (isActivityExists && !storedActivity) {
|
|
117
|
+
var updatedIdList = controlValue === null || controlValue === void 0 ? void 0 : controlValue.filter(function (activity) { return activity.en !== (item === null || item === void 0 ? void 0 : item.en); });
|
|
118
|
+
if (updatedIdList.length >= 1)
|
|
119
|
+
activitiesControl.field.onChange(updatedIdList);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (!storedActivity)
|
|
123
|
+
activitiesControl.field.onChange(__spreadArray(__spreadArray([], controlValue, true), [item], false));
|
|
124
|
+
};
|
|
125
|
+
var getSelectedActivities = function () {
|
|
126
|
+
var _a, _b;
|
|
127
|
+
if ((controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) > 1) {
|
|
128
|
+
return (controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) + ' ' + t('activities_selected');
|
|
129
|
+
}
|
|
130
|
+
return isAr ? (_a = controlValue[0]) === null || _a === void 0 ? void 0 : _a.ar : (_b = controlValue[0]) === null || _b === void 0 ? void 0 : _b.en;
|
|
131
|
+
};
|
|
132
|
+
var getSelectedActivityFlag = function (item) {
|
|
133
|
+
return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.en === (item === null || item === void 0 ? void 0 : item.en); });
|
|
134
|
+
};
|
|
135
|
+
return (_jsx(Collapse, __assign({ in: (activitiesMenuList === null || activitiesMenuList === void 0 ? void 0 : activitiesMenuList.length) > 0 }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t(isCR ? 'activities' : 'category') }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
136
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.en) === getSelectedActivityFlag(item) }, { children: isAr ? item === null || item === void 0 ? void 0 : item.ar : item === null || item === void 0 ? void 0 : item.en })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
|
|
137
|
+
} }) }))] })] }) })));
|
|
138
|
+
};
|
|
139
|
+
export default ActivitiesList;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { ScreenContainer } from '../../../shared/Containers';
|
|
14
|
+
import LicenseName from './LicenseName';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
import LicenseNumber from './LicenseNumber';
|
|
17
|
+
import ActivitiesList from './ActivitiesList';
|
|
18
|
+
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
+
import { entitySelector, updateEntityInfo } from '../../../app/entity/entityStore';
|
|
20
|
+
import { FormProvider, useForm } from 'react-hook-form';
|
|
21
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
22
|
+
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
23
|
+
import { styled } from '@mui/system';
|
|
24
|
+
import { EntityInfoValidationSchema } from './validation';
|
|
25
|
+
import Form from '../../../../components/Form';
|
|
26
|
+
import Collapse from '../../../../components/Collapse';
|
|
27
|
+
import Button from '../../../shared/Button';
|
|
28
|
+
import { useTranslation } from 'react-i18next';
|
|
29
|
+
import OperationStartDate from './OperationStartDate';
|
|
30
|
+
var FormStyled = styled(Form)(function () { return ({
|
|
31
|
+
display: 'flex',
|
|
32
|
+
flexDirection: 'column'
|
|
33
|
+
}); });
|
|
34
|
+
var EntityInfo = function (_a) {
|
|
35
|
+
var _b = React.useState(false), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
36
|
+
var _c = useAppSelector(entitySelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
37
|
+
var isAr = useLanguage().isAr;
|
|
38
|
+
var t = useTranslation().t;
|
|
39
|
+
var dispatch = useAppDispatch();
|
|
40
|
+
var methods = useForm({
|
|
41
|
+
resolver: yupResolver(EntityInfoValidationSchema),
|
|
42
|
+
defaultValues: data.entityData,
|
|
43
|
+
mode: 'onChange'
|
|
44
|
+
});
|
|
45
|
+
var onSubmit = function (data) {
|
|
46
|
+
dispatch(updateEntityInfo(__assign({}, data)));
|
|
47
|
+
};
|
|
48
|
+
var onBack = function () {
|
|
49
|
+
dispatch(handlePrevScreenStep());
|
|
50
|
+
};
|
|
51
|
+
var handleMenuClick = function () {
|
|
52
|
+
anchorEl ? setAnchorEl(false) : setAnchorEl(true);
|
|
53
|
+
};
|
|
54
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(LicenseName, {}), _jsx(LicenseNumber, {})] })), _jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(OperationStartDate, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] }))] })) })) }));
|
|
55
|
+
};
|
|
56
|
+
export default EntityInfo;
|