@tap-payments/auth-jsconnect 2.12.7-development → 2.12.7-sandbox

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.
Files changed (42) hide show
  1. package/README.md +60 -10
  2. package/build/api/file.d.ts +1 -0
  3. package/build/api/file.js +9 -1
  4. package/build/api/index.d.ts +1 -0
  5. package/build/components/Tooltip/Tooltip.js +1 -1
  6. package/build/constants/api.js +1 -1
  7. package/build/constants/app.d.ts +3 -0
  8. package/build/constants/app.js +15 -6
  9. package/build/features/app/connectExpress/connectExpressStore.d.ts +11 -1
  10. package/build/features/app/connectExpress/connectExpressStore.js +196 -18
  11. package/build/features/app/individual/individualStore.js +2 -1
  12. package/build/features/app/terminal/terminalStore.d.ts +3 -0
  13. package/build/features/app/terminal/terminalStore.js +34 -1
  14. package/build/features/connectExpress/ConnectExpress.js +6 -3
  15. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +11 -8
  16. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +5 -1
  17. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +8 -7
  18. package/build/features/connectExpress/screens/Email/Email.d.ts +5 -0
  19. package/build/features/connectExpress/screens/Email/Email.js +57 -0
  20. package/build/features/connectExpress/screens/Email/EmailField.d.ts +8 -0
  21. package/build/features/connectExpress/screens/Email/EmailField.js +52 -0
  22. package/build/features/connectExpress/screens/Email/index.d.ts +3 -0
  23. package/build/features/connectExpress/screens/Email/index.js +2 -0
  24. package/build/features/connectExpress/screens/Email/validation.d.ts +8 -0
  25. package/build/features/connectExpress/screens/Email/validation.js +4 -0
  26. package/build/features/connectExpress/screens/NIDMissed/NID.js +7 -4
  27. package/build/features/connectExpress/screens/OTP/OTP.js +19 -12
  28. package/build/features/connectExpress/screens/OTP/OTPInput.js +15 -6
  29. package/build/features/featuresScreens.js +5 -0
  30. package/build/features/kyc/screens/Terms/Terms.js +6 -5
  31. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +2 -1
  32. package/build/features/terminal/screens/shared/POSDeviceList.js +5 -5
  33. package/build/hooks/useCountry.d.ts +1 -0
  34. package/build/hooks/useCountry.js +3 -2
  35. package/build/utils/common.js +3 -3
  36. package/build/utils/file.d.ts +1 -0
  37. package/build/utils/file.js +6 -0
  38. package/build/utils/index.d.ts +1 -0
  39. package/build/utils/index.js +1 -0
  40. package/build/utils/string.d.ts +1 -0
  41. package/build/utils/string.js +5 -0
  42. package/package.json +2 -2
@@ -51,7 +51,7 @@ import { handleCurrentActiveScreen, handlePublicKey, handleSetCountryByIso2, onC
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { CONNECT_FLOWS, NAFATH_PACI_TIMEOUT_DURATION, SELECTED_POS_DEFAULT_INFO, SELECTED_TERMINAL_DEFAULT_INFO, TERMINAL_PUSH_NOTIFICATION_DURATION, TERMINAL_PUSH_NOTIFICATION_FAILED, TERMINAL_STEP_NAMES } from '../../../constants';
53
53
  import API, { setAuthSessionToGlobalHeaders } from '../../../api';
54
- import { isAuthenticationVerificationFailed, isNetworkError, isNoDataFoundError, isTimeoutError, retrieveIndividualData, sleep } from '../../../utils';
54
+ import { createImageObjectURL, isAuthenticationVerificationFailed, isNetworkError, isNoDataFoundError, isTimeoutError, retrieveIndividualData, sleep } from '../../../utils';
55
55
  export var verifyToken = createAsyncThunk('terminal/verifyLeadToken', function (_a, thunkApi) {
56
56
  var token = _a.token, isInternally = _a.isInternally;
57
57
  return __awaiter(void 0, void 0, void 0, function () {
@@ -262,6 +262,25 @@ export var retrievePOSDevices = createAsyncThunk('terminal/retrievePOSDevices',
262
262
  }
263
263
  });
264
264
  }); });
265
+ export var retrieveTerminalPlatformBrandLogo = createAsyncThunk('terminal/retrieveTerminalPlatformBrandLogo', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
266
+ var terminal, list, logoFileId, data, logo;
267
+ var _a, _b, _c, _d, _e, _f;
268
+ return __generator(this, function (_g) {
269
+ switch (_g.label) {
270
+ case 0:
271
+ terminal = thunkApi.getState().terminal;
272
+ list = (_c = (_b = (_a = terminal.data.responseData) === null || _a === void 0 ? void 0 : _a.terminalData) === null || _b === void 0 ? void 0 : _b.list) !== null && _c !== void 0 ? _c : [];
273
+ logoFileId = (_f = (_e = (_d = list === null || list === void 0 ? void 0 : list[0]) === null || _d === void 0 ? void 0 : _d.platform) === null || _e === void 0 ? void 0 : _e.brand) === null || _f === void 0 ? void 0 : _f.logo;
274
+ if (!logoFileId)
275
+ return [2, { logo: '' }];
276
+ return [4, API.fileService.retrieveFileInfo(logoFileId)];
277
+ case 1:
278
+ data = _g.sent();
279
+ logo = createImageObjectURL(data);
280
+ return [2, { logo: logo }];
281
+ }
282
+ });
283
+ }); });
265
284
  export var pushNotificationLinkNewTerminal = createAsyncThunk('terminal/pushNotificationLinkNewTerminal', function (_a, thunkApi) {
266
285
  var newTerminal = _a.newTerminal, onSuccess = _a.onSuccess, onFailure = _a.onFailure;
267
286
  return __awaiter(void 0, void 0, void 0, function () {
@@ -655,6 +674,20 @@ export var terminalSlice = createSlice({
655
674
  .addCase(retrievePOSDevices.pending, function (state) {
656
675
  state.posDevicesLoading = true;
657
676
  state.error = null;
677
+ })
678
+ .addCase(retrieveTerminalPlatformBrandLogo.pending, function (state) {
679
+ state.error = null;
680
+ })
681
+ .addCase(retrieveTerminalPlatformBrandLogo.fulfilled, function (state, action) {
682
+ var _a;
683
+ state.error = null;
684
+ var prevLogo = (_a = state.data.responseData) === null || _a === void 0 ? void 0 : _a.terminalPlatformBrandLogo;
685
+ if (prevLogo)
686
+ URL.revokeObjectURL(prevLogo);
687
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { terminalPlatformBrandLogo: action.payload.logo });
688
+ })
689
+ .addCase(retrieveTerminalPlatformBrandLogo.rejected, function (state) {
690
+ state.error = null;
658
691
  })
659
692
  .addCase(retrieveTerminalList.pending, function (state) {
660
693
  state.error = null;
@@ -67,7 +67,7 @@ import { store } from '../../app/store';
67
67
  import { connectExpressSelector, setIsLeadIdPassed, setLeadId, retrieveLeadIdentityByIdAsync, setDefaultCountryCode, clearError, createAuthSessionExpiredAsync } from '../app/connectExpress/connectExpressStore';
68
68
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
69
69
  import Collapse from '../../components/Collapse';
70
- import { isKW, findOrCreateElementAndInject, sendPageView, isOtherThanKWOrSA, initializeGTM, sendCustomEventToGTM, sendCustomDimension } from '../../utils';
70
+ import { isKW, isQA, findOrCreateElementAndInject, sendPageView, isOtherThanKWOrSA, initializeGTM, sendCustomEventToGTM, sendCustomDimension } from '../../utils';
71
71
  import { CONNECT_EXPRESS_SCREENS_NAVIGATION } from '../../constants';
72
72
  import { connectExpressFeatureScreens } from '../featuresScreens';
73
73
  import Background from '../shared/Background';
@@ -123,7 +123,7 @@ var ConnectExpress = memo(function (_a) {
123
123
  }
124
124
  }, [data.businessCountry]);
125
125
  React.useEffect(function () {
126
- var _a, _b;
126
+ var _a, _b, _c;
127
127
  if (settingLoading || !props.open)
128
128
  return;
129
129
  if (!data.isValidOperator) {
@@ -146,7 +146,10 @@ var ConnectExpress = memo(function (_a) {
146
146
  dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_BUSINESS_COUNTRY_STEP'));
147
147
  return;
148
148
  }
149
- if (((_b = data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2) && (isKW(data.businessCountry.iso2) || isOtherThanKWOrSA(data.businessCountry.iso2))) {
149
+ if (((_b = data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2) && isQA(data.businessCountry.iso2)) {
150
+ dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_EMAIL_STEP'));
151
+ }
152
+ else if (((_c = data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2) && (isKW(data.businessCountry.iso2) || isOtherThanKWOrSA(data.businessCountry.iso2))) {
150
153
  dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
151
154
  }
152
155
  }, [data.isValidOperator, settingLoading]);
@@ -17,7 +17,7 @@ import Collapse from '@mui/material/Collapse';
17
17
  import { yupResolver } from '@hookform/resolvers/yup';
18
18
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
19
19
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
20
- import { deepCopy, isKW, isSA, sendCustomEventToGTM } from '../../../../utils';
20
+ import { deepCopy, isKW, isSA, isQA, sendCustomEventToGTM } from '../../../../utils';
21
21
  import { AuthForType } from '../../../../@types';
22
22
  import Form from '../../../../components/Form';
23
23
  import { ScreenContainer } from '../../../shared/Containers';
@@ -36,15 +36,16 @@ var ListType;
36
36
  ListType["EntityList"] = "EntityList";
37
37
  })(ListType || (ListType = {}));
38
38
  var AuthenticationList = function (_a) {
39
- var _b, _c;
39
+ var _b, _c, _d;
40
40
  var settingsData = useAppSelector(settingsSelector).data;
41
- var _d = useAppSelector(connectExpressSelector), data = _d.data, loading = _d.loading, error = _d.error;
42
- var _e = data.authenticationData, brandInfo = _e.brandInfo, entityInfo = _e.entityInfo;
43
- var _f = React.useState(), listActive = _f[0], setListActive = _f[1];
41
+ var _e = useAppSelector(connectExpressSelector), data = _e.data, loading = _e.loading, error = _e.error;
42
+ var _f = data.authenticationData, brandInfo = _f.brandInfo, entityInfo = _f.entityInfo;
43
+ var _g = React.useState(), listActive = _g[0], setListActive = _g[1];
44
44
  var brandList = (((_b = data.responseData) === null || _b === void 0 ? void 0 : _b.authenticationData) || {}).brandList;
45
- var _g = React.useState(false), isAddEntity = _g[0], setIsAddEntity = _g[1];
45
+ var _h = React.useState(false), isAddEntity = _h[0], setIsAddEntity = _h[1];
46
46
  var otpData = data.otpData;
47
47
  var startWithNID = otpData.authFor === AuthForType.NATIONAL_ID;
48
+ var startWithEmail = isQA((_c = settingsData.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2);
48
49
  React.useEffect(function () {
49
50
  sendCustomEventToGTM({
50
51
  event: 'Send Event',
@@ -63,7 +64,7 @@ var AuthenticationList = function (_a) {
63
64
  var t = useTranslation().t;
64
65
  var isAr = useLanguage().isAr;
65
66
  var dispatch = useAppDispatch();
66
- var code = (_c = settingsData.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2;
67
+ var code = (_d = settingsData.businessCountry) === null || _d === void 0 ? void 0 : _d.iso2;
67
68
  var isSACountry = React.useMemo(function () { return isSA(code); }, [code]);
68
69
  var onSubmit = function (formData) {
69
70
  if (isAddEntity) {
@@ -83,7 +84,9 @@ var AuthenticationList = function (_a) {
83
84
  methods.setValue('entityInfo', undefined, { shouldValidate: true });
84
85
  return;
85
86
  }
86
- var screen = startWithNID ? (isKW(code) ? 'CONNECT_EXPRESS_CIVIL_ID_STEP' : 'CONNECT_EXPRESS_NID_STEP') : 'CONNECT_EXPRESS_MOBILE_STEP';
87
+ var screen = startWithEmail ? 'CONNECT_EXPRESS_EMAIL_STEP' : 'CONNECT_EXPRESS_MOBILE_STEP';
88
+ if (startWithNID)
89
+ screen = isKW(code) ? 'CONNECT_EXPRESS_CIVIL_ID_STEP' : 'CONNECT_EXPRESS_NID_STEP';
87
90
  dispatch(resetAuthenticationScreen());
88
91
  dispatch(handlePrevScreenStep(screen));
89
92
  };
@@ -53,7 +53,7 @@ import { ScreenContainer } from '../../../shared/Containers';
53
53
  import BusinessCountry from '../../../shared/BusinessCountry';
54
54
  import Button from '../../../shared/Button';
55
55
  import Collapse from '../../../../components/Collapse';
56
- import { findCountryByIso2, isKW, isOtherThanKWOrSA, sendCustomEventToGTM } from '../../../../utils';
56
+ import { findCountryByIso2, isKW, isQA, isOtherThanKWOrSA, sendCustomEventToGTM } from '../../../../utils';
57
57
  import { handleNextScreenStep, handleSetCountryByIso2, settingsSelector } from '../../../../app/settings';
58
58
  import { clearError, connectExpressSelector, setDefaultCountryCode, storeIsStartFromBusinessCountry, updateBusinessCountryAsync } from '../../../app/connectExpress/connectExpressStore';
59
59
  var BusinessCountryScreen = function (_a) {
@@ -95,6 +95,10 @@ var BusinessCountryScreen = function (_a) {
95
95
  case 2:
96
96
  if (countryCode)
97
97
  dispatch(setDefaultCountryCode(countryCode));
98
+ if (isQA(iso2)) {
99
+ dispatch(handleNextScreenStep('CONNECT_EXPRESS_EMAIL_STEP'));
100
+ return [2];
101
+ }
98
102
  if (isOtherThanKWOrSA(iso2) || isKW(iso2)) {
99
103
  dispatch(handleNextScreenStep('CONNECT_EXPRESS_MOBILE_STEP'));
100
104
  return [2];
@@ -18,7 +18,7 @@ import { styled } from '@mui/material/styles';
18
18
  import { useAppDispatch, useAppSelector, useExcludeReadOnlyFelids, useFormErrorAndUpdateReadOnly, useFormReadOnly, useSetFromDefaultValues } from '../../../../hooks';
19
19
  import { AuthForType } from '../../../../@types';
20
20
  import { useLanguage } from '../../../../hooks';
21
- import { deepCopy, isKW, sendCustomEventToGTM } from '../../../../utils';
21
+ import { deepCopy, isKW, isQA, sendCustomEventToGTM } from '../../../../utils';
22
22
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
23
23
  import Form from '../../../../components/Form';
24
24
  import Collapse from '../../../../components/Collapse';
@@ -36,15 +36,16 @@ var FormStyled = styled(Form)(function () { return ({
36
36
  justifyContent: 'space-between'
37
37
  }); });
38
38
  var CollectIndividualInfo = function (_a) {
39
- var _b;
40
- var _c = React.useState(false), listActive = _c[0], setListActive = _c[1];
41
- var _d = React.useState(false), emailChecking = _d[0], setEmailChecking = _d[1];
39
+ var _b, _c;
40
+ var _d = React.useState(false), listActive = _d[0], setListActive = _d[1];
41
+ var _e = React.useState(false), emailChecking = _e[0], setEmailChecking = _e[1];
42
42
  var settingsData = useAppSelector(settingsSelector).data;
43
- var _e = useAppSelector(connectExpressSelector), data = _e.data, loading = _e.loading, error = _e.error;
43
+ var _f = useAppSelector(connectExpressSelector), data = _f.data, loading = _f.loading, error = _f.error;
44
44
  var dispatch = useAppDispatch();
45
45
  var t = useTranslation().t;
46
46
  var isAr = useLanguage().isAr;
47
47
  var individualData = data.individualData, otpData = data.otpData, responseData = data.responseData;
48
+ var startWithEmail = isQA((_b = settingsData.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2);
48
49
  var startWithNID = otpData.authFor === AuthForType.NATIONAL_ID;
49
50
  var startWithNIDMissed = otpData.authFor === AuthForType.NATIONAL_ID_MISSED;
50
51
  var contact = ((responseData === null || responseData === void 0 ? void 0 : responseData.leadData) || {}).contact;
@@ -82,7 +83,7 @@ var CollectIndividualInfo = function (_a) {
82
83
  dispatch(resetIndividualScreen());
83
84
  }
84
85
  var code = (_a = settingsData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2;
85
- var screen = 'CONNECT_EXPRESS_MOBILE_STEP';
86
+ var screen = startWithEmail ? 'CONNECT_EXPRESS_EMAIL_STEP' : 'CONNECT_EXPRESS_MOBILE_STEP';
86
87
  if (startWithNID) {
87
88
  if (isKW(code))
88
89
  screen = 'CONNECT_EXPRESS_CIVIL_ID_STEP';
@@ -118,7 +119,7 @@ var CollectIndividualInfo = function (_a) {
118
119
  var isEmailValid = typeof isEmailAvailable === 'undefined' ? isLeadEmailAvailable : isEmailAvailable;
119
120
  var emailErrChecks = !methods.formState.isValid || !!methods.formState.errors.email;
120
121
  var disabled = emailErrChecks || emailChecking || !isEmailValid;
121
- var emailReadOnly = readOnly['email'] && !((_b = methods.getFieldState('email').error) === null || _b === void 0 ? void 0 : _b.message) && !methods.getFieldState('email').isDirty;
122
+ var emailReadOnly = readOnly['email'] && !((_c = methods.getFieldState('email').error) === null || _c === void 0 ? void 0 : _c.message) && !methods.getFieldState('email').isDirty;
122
123
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Name, { readOnly: readOnly['name'], show: !listActive }), _jsx(MobileNumber, { readOnly: readOnly['mobile'], show: true, onListOpen: function () { return handleMenuListClick(); }, onListClose: function () { return handleMenuListClick(); }, countries: settingsData.countries }), _jsx(Email, { readOnly: emailReadOnly, show: !listActive, fetchingEmail: function (v) { return setEmailChecking(v); }, emailChecking: emailChecking }), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
123
124
  };
124
125
  export default React.memo(CollectIndividualInfo);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface EmailProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: EmailProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,57 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useForm, FormProvider } from 'react-hook-form';
16
+ import { styled } from '@mui/material/styles';
17
+ import { yupResolver } from '@hookform/resolvers/yup';
18
+ import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
19
+ import { handleCurrentActiveScreen } from '../../../../app/settings';
20
+ import { clearError, connectExpressSelector, createEmailAuthAsync, resetStore } from '../../../app/connectExpress/connectExpressStore';
21
+ import Form from '../../../../components/Form';
22
+ import Button from '../../../shared/Button';
23
+ import { ScreenContainer } from '../../../shared/Containers';
24
+ import { deepCopy } from '../../../../utils';
25
+ import { EmailInfoValidation } from './validation';
26
+ import EmailField from './EmailField';
27
+ var FormStyled = styled(Form)(function () { return ({
28
+ display: 'flex',
29
+ flexDirection: 'column'
30
+ }); });
31
+ var Email = function (_a) {
32
+ var isAr = useLanguage().isAr;
33
+ var dispatch = useAppDispatch();
34
+ var t = useTranslation().t;
35
+ var _b = useAppSelector(connectExpressSelector), data = _b.data, loading = _b.loading, error = _b.error;
36
+ var methods = useForm({
37
+ resolver: yupResolver(EmailInfoValidation),
38
+ defaultValues: data.emailData,
39
+ mode: 'onChange'
40
+ });
41
+ React.useEffect(function () {
42
+ if (error)
43
+ dispatch(clearError());
44
+ }, [methods.formState.isValid]);
45
+ React.useEffect(function () {
46
+ dispatch(resetStore());
47
+ }, []);
48
+ var onSubmit = function (formData) {
49
+ dispatch(createEmailAuthAsync(deepCopy(formData)));
50
+ };
51
+ var onBackToCountryList = function () {
52
+ dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_BUSINESS_COUNTRY_STEP'));
53
+ };
54
+ var disabled = !methods.formState.isValid;
55
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(EmailField, { sx: { mb: 5, transition: 'mb 0.3s' } }), _jsx(Button, __assign({ loading: loading, isAr: isAr, onBackClicked: onBackToCountryList, disableBack: !data.isStartFromBusinessCountry, disabled: disabled, error: t(error || '') }, { children: t('next') }))] })) })) }));
56
+ };
57
+ export default React.memo(Email);
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { SxProps, Theme } from '@mui/material/styles';
3
+ interface EmailFieldProps {
4
+ sx: SxProps<Theme> | undefined;
5
+ readOnly?: boolean;
6
+ }
7
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<EmailFieldProps & React.RefAttributes<unknown>>>;
8
+ export default _default;
@@ -0,0 +1,52 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
16
+ import Box from '@mui/material/Box';
17
+ import { styled, alpha } from '@mui/material/styles';
18
+ import Text from '../../../../components/Text';
19
+ import { MAX_EMAIL_LENGTH } from '../../../../constants';
20
+ import Input from '../../../shared/Input';
21
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
22
+ import { EndAdornment } from '../../../shared/EndAdornment';
23
+ var LabelContainerStyled = styled(Box)(function (_a) {
24
+ var theme = _a.theme;
25
+ return ({
26
+ display: 'flex',
27
+ justifyContent: 'space-between',
28
+ padding: theme.spacing(0, 2.5, 1.25, 2.5)
29
+ });
30
+ });
31
+ var InputLabelStyled = styled(Text)(function (_a) {
32
+ var theme = _a.theme;
33
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
34
+ });
35
+ var EmailField = React.forwardRef(function (_a, ref) {
36
+ var _b;
37
+ var sx = _a.sx, readOnly = _a.readOnly;
38
+ var t = useTranslation().t;
39
+ var control = useFormContext().control;
40
+ var emailControl = useController({ control: control, name: 'email' });
41
+ var handleEmailChange = function (_a) {
42
+ var target = _a.target;
43
+ emailControl.field.onChange(target.value);
44
+ };
45
+ var clearEmail = function () {
46
+ emailControl.field.onChange('');
47
+ };
48
+ var emailValue = emailControl.field.value;
49
+ var error = (_b = emailControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
50
+ return (_jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_email_lable') }) }), _jsx(Input, { type: 'email', readOnly: readOnly, inputProps: { maxLength: MAX_EMAIL_LENGTH }, onChange: handleEmailChange, value: emailValue, endAdornment: _jsx(EndAdornment, { value: emailValue, error: error, onClear: clearEmail }), placeholder: t('signup_email_placeholder'), warningType: 'alert', warningMessage: error && t(error), required: true })] })));
51
+ });
52
+ export default React.memo(EmailField);
@@ -0,0 +1,3 @@
1
+ import Email, { EmailProps } from './Email';
2
+ export type { EmailProps };
3
+ export default Email;
@@ -0,0 +1,2 @@
1
+ import Email from './Email';
2
+ export default Email;
@@ -0,0 +1,8 @@
1
+ import * as yup from 'yup';
2
+ export declare const EmailInfoValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ email: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
5
+ email: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
+ email: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
+ }>>>;
@@ -0,0 +1,4 @@
1
+ import * as yup from 'yup';
2
+ export var EmailInfoValidation = yup.object().shape({
3
+ email: yup.string().email('email_not_valid').required('email_not_valid')
4
+ });
@@ -25,19 +25,21 @@ import { ScreenContainer } from '../../../shared/Containers';
25
25
  import Collapse from '../../../../components/Collapse';
26
26
  import IDNumber from './IDNumber';
27
27
  import DOB from './DOB';
28
- import { deepCopy, isOtherThanKWOrSA } from '../../../../utils';
28
+ import { deepCopy, isOtherThanKWOrSA, isQA } from '../../../../utils';
29
29
  var FormStyled = styled(Form)(function () { return ({
30
30
  display: 'flex',
31
31
  flexDirection: 'column'
32
32
  }); });
33
33
  var NID = function (_a) {
34
- var _b = React.useState(false), collapse = _b[0], setCollapse = _b[1];
34
+ var _b;
35
+ var _c = React.useState(false), collapse = _c[0], setCollapse = _c[1];
35
36
  var isAr = useLanguage().isAr;
36
37
  var dispatch = useAppDispatch();
37
38
  var t = useTranslation().t;
38
39
  var settingsData = useAppSelector(settingsSelector).data;
39
- var _c = useAppSelector(connectExpressSelector), data = _c.data, loading = _c.loading, error = _c.error;
40
+ var _d = useAppSelector(connectExpressSelector), data = _d.data, loading = _d.loading, error = _d.error;
40
41
  var isOtherCountry = React.useMemo(function () { return isOtherThanKWOrSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
42
+ var startWithEmail = isQA((_b = settingsData.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2);
41
43
  var methods = useForm({
42
44
  resolver: yupResolver(isOtherCountry ? NIDOtherCountryValidationSchema : NIDValidationSchema),
43
45
  defaultValues: data.nidData,
@@ -54,7 +56,8 @@ var NID = function (_a) {
54
56
  setCollapse(flag);
55
57
  };
56
58
  var onBack = function () {
57
- dispatch(handlePrevScreenStep());
59
+ var screen = startWithEmail ? 'CONNECT_EXPRESS_EMAIL_STEP' : 'CONNECT_EXPRESS_MOBILE_STEP';
60
+ dispatch(handlePrevScreenStep(screen));
58
61
  };
59
62
  var disabled = !methods.formState.isValid;
60
63
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(Collapse, __assign({ in: isOtherCountry }, { children: _jsx(DOB, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(Button, __assign({ sx: !isOtherCountry ? { mt: 10 } : {}, loading: loading, isAr: isAr, onBackClicked: onBack, disabled: disabled, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
@@ -13,18 +13,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import Box from '@mui/material/Box/Box';
14
14
  import { styled } from '@mui/material/styles';
15
15
  import * as React from 'react';
16
- import { useTranslation } from 'react-i18next';
17
16
  import Text from '../../../../components/Text';
18
- import { clearError, connectExpressSelector, verifyMobileOtpAsync, resetOTPValue } from '../../../app/connectExpress/connectExpressStore';
17
+ import { clearError, connectExpressSelector, verifyMobileOtpAsync, verifyEmailOtpAsync, resetOTPValue } from '../../../app/connectExpress/connectExpressStore';
19
18
  import Button from '../../../shared/Button';
20
19
  import { ScreenContainer } from '../../../shared/Containers';
21
20
  import { useAppDispatch, useAppSelector, useSanitizedTranslation } from '../../../../hooks';
22
- import { handlePrevScreenStep } from '../../../../app/settings';
21
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
23
22
  import { useLanguage } from '../../../../hooks';
24
23
  import { useForm, FormProvider } from 'react-hook-form';
25
24
  import { yupResolver } from '@hookform/resolvers/yup';
26
25
  import Form from '../../../../components/Form';
27
- import { maskPhone, deepCopy, sendCustomEventToGTM } from '../../../../utils';
26
+ import { maskPhone, deepCopy, sendCustomEventToGTM, maskEmail, isQA } from '../../../../utils';
28
27
  import { OTPValidation } from './validation';
29
28
  import OTPInput from './OTPInput';
30
29
  var OTPTitleContainerStyled = styled(Box)(function (_a) {
@@ -47,12 +46,13 @@ var FormStyled = styled(Form)(function () { return ({
47
46
  flexDirection: 'column'
48
47
  }); });
49
48
  var OTP = function () {
50
- var _a;
49
+ var _a, _b;
51
50
  var dispatch = useAppDispatch();
52
- var _b = useAppSelector(connectExpressSelector), data = _b.data, loading = _b.loading, error = _b.error;
53
- var t = useTranslation().t;
51
+ var _c = useAppSelector(connectExpressSelector), data = _c.data, loading = _c.loading, error = _c.error;
52
+ var settingsData = useAppSelector(settingsSelector).data;
54
53
  var st = useSanitizedTranslation();
55
54
  var isAr = useLanguage().isAr;
55
+ var isEmailFlow = isQA((_a = settingsData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2);
56
56
  var methods = useForm({
57
57
  resolver: yupResolver(OTPValidation),
58
58
  defaultValues: data.otpData,
@@ -73,14 +73,21 @@ var OTP = function () {
73
73
  };
74
74
  }, []);
75
75
  var onSubmit = function (formData) {
76
- dispatch(verifyMobileOtpAsync(deepCopy(formData)));
76
+ if (isEmailFlow) {
77
+ dispatch(verifyEmailOtpAsync(deepCopy(formData)));
78
+ }
79
+ else {
80
+ dispatch(verifyMobileOtpAsync(deepCopy(formData)));
81
+ }
77
82
  };
78
83
  var onBack = function () {
79
- dispatch(handlePrevScreenStep());
84
+ var screen = isEmailFlow ? 'CONNECT_EXPRESS_EMAIL_STEP' : 'CONNECT_EXPRESS_MOBILE_STEP';
85
+ dispatch(handlePrevScreenStep(screen));
80
86
  };
81
87
  var disabled = !methods.formState.isValid;
82
- var phone = data.mobileData.mobile ? ((_a = data.mobileData.countryCode) === null || _a === void 0 ? void 0 : _a.idd_prefix) + data.mobileData.mobile : '';
83
- var title = t('ide_opt_sent_title');
84
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? st('ide_otp_waiting_title') : title, !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: st(error || '') }, { children: t('next') }))] })) })) }));
88
+ var phone = data.mobileData.mobile ? ((_b = data.mobileData.countryCode) === null || _b === void 0 ? void 0 : _b.idd_prefix) + data.mobileData.mobile : '';
89
+ var contactInfo = isEmailFlow ? maskEmail(data.emailData.email) : maskPhone(phone);
90
+ var title = isEmailFlow ? st('otp_email_sent_title') : st('ide_opt_sent_title');
91
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? st('ide_otp_waiting_title') : title, !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: contactInfo }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: st(error || '') }, { children: st('next') }))] })) })) }));
85
92
  };
86
93
  export default React.memo(OTP);
@@ -17,9 +17,10 @@ import Box from '@mui/material/Box/Box';
17
17
  import { styled } from '@mui/material/styles';
18
18
  import OTPField from '../../../shared/OTP';
19
19
  import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
- import { resendMobileAuthOTP, connectExpressSelector, clearError } from '../../../app/connectExpress/connectExpressStore';
20
+ import { resendMobileAuthOTP, resendEmailAuthOTP, connectExpressSelector, clearError } from '../../../app/connectExpress/connectExpressStore';
21
21
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
22
- import { sendCustomEventToGTM } from '../../../../utils';
22
+ import { sendCustomEventToGTM, isQA } from '../../../../utils';
23
+ import { settingsSelector } from '../../../../app/settings';
23
24
  var BoxStyled = styled(Box)(function (_a) {
24
25
  var theme = _a.theme;
25
26
  return ({
@@ -29,12 +30,15 @@ var BoxStyled = styled(Box)(function (_a) {
29
30
  });
30
31
  });
31
32
  var OTPInput = function (_a) {
32
- var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
33
+ var _b;
34
+ var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
33
35
  var t = useTranslation().t;
34
36
  var dispatch = useAppDispatch();
35
37
  var otpControl = useController({ name: 'otp', control: control });
36
- var _c = useAppSelector(connectExpressSelector), data = _c.data, error = _c.error;
37
- var mobileData = data.mobileData;
38
+ var _d = useAppSelector(connectExpressSelector), data = _d.data, error = _d.error;
39
+ var settingsData = useAppSelector(settingsSelector).data;
40
+ var mobileData = data.mobileData, emailData = data.emailData;
41
+ var isEmailFlow = isQA((_b = settingsData.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2);
38
42
  var sendEventAskAnotherOTP = function () {
39
43
  sendCustomEventToGTM({
40
44
  event: 'Send Event',
@@ -51,7 +55,12 @@ var OTPInput = function (_a) {
51
55
  if (otpControl.field.value)
52
56
  setValue('otp', '', { shouldValidate: true });
53
57
  sendEventAskAnotherOTP();
54
- dispatch(resendMobileAuthOTP(mobileData));
58
+ if (isEmailFlow) {
59
+ dispatch(resendEmailAuthOTP(emailData));
60
+ }
61
+ else {
62
+ dispatch(resendMobileAuthOTP(mobileData));
63
+ }
55
64
  };
56
65
  var otpValue = otpControl.field.value;
57
66
  return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
@@ -17,6 +17,7 @@ import OTPVerifySecurityError from './shared/OTPVerifySecurityError';
17
17
  import OTPSessionExpired from './connect/screens/OTPSessionExpired';
18
18
  import ConnectExpressBusinessCountry from './connectExpress/screens/BusinessCountry/BusinessCountry';
19
19
  import ConnectExpressMobileScreen from './connectExpress/screens/Mobile';
20
+ import ConnectExpressEmailScreen from './connectExpress/screens/Email';
20
21
  import ConnectExpressNIDScreen from './connectExpress/screens/NID';
21
22
  import ConnectExpressVerifyNafathScreen from './connectExpress/screens/VerifyNafath';
22
23
  import ConnectExpressCivilIDScreen from './connectExpress/screens/CivilID';
@@ -261,6 +262,10 @@ export var connectExpressFeatureScreens = [
261
262
  name: 'CONNECT_EXPRESS_MOBILE_STEP',
262
263
  element: ConnectExpressMobileScreen
263
264
  },
265
+ {
266
+ name: 'CONNECT_EXPRESS_EMAIL_STEP',
267
+ element: ConnectExpressEmailScreen
268
+ },
264
269
  {
265
270
  name: 'CONNECT_EXPRESS_OTP_STEP',
266
271
  element: ConnectExpressOTPScreen
@@ -42,14 +42,15 @@ var redirect = function (link) {
42
42
  window.open(link, '_blank');
43
43
  };
44
44
  export var Terms = function () {
45
- var _a, _b, _c;
45
+ var _a, _b, _c, _d, _e;
46
46
  var st = useSanitizedTranslation();
47
47
  var isAr = useLanguage().isAr;
48
48
  var dispatch = useAppDispatch();
49
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;
50
+ var _f = useAppSelector(kycSelector), loading = _f.loading, error = _f.error, data = _f.data;
51
+ var hasUsers = (_b = (_a = data.responseData) === null || _a === void 0 ? void 0 : _a.userList) === null || _b === void 0 ? void 0 : _b.length;
52
+ var hasOneUserOnly = ((_d = (_c = data.responseData) === null || _c === void 0 ? void 0 : _c.userList) === null || _d === void 0 ? void 0 : _d.length) === 1;
53
+ var user = hasOneUserOnly ? (_e = data.responseData) === null || _e === void 0 ? void 0 : _e.userList[0] : undefined;
53
54
  var idNumber = user ? maskIDNumber(user.identification.id) : '';
54
55
  var countryCode = settingsData.businessCountry.iso2.toLowerCase();
55
56
  var termsAndConditionsLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.TERMS_CONDITIONS);
@@ -82,6 +83,6 @@ export var Terms = function () {
82
83
  return st('continue');
83
84
  return isSACountry ? st('approve_with_nafath_app') : st('approve_with_paci_app');
84
85
  };
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
+ 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 ? true : !hasUsers, sx: { mt: 3 }, disableBack: true, isAr: isAr, loading: loading, error: st(error || ''), onClick: onNext }, { children: getNextButtonTitle() }))] }));
86
87
  };
87
88
  export default memo(Terms);
@@ -56,7 +56,7 @@ import Button from '../../../../components/Button';
56
56
  import Loader from '../../../../components/Loader';
57
57
  import Warning from '../../../../components/Warning';
58
58
  import Box from '@mui/material/Box';
59
- import { clearError, resetTerminalLinkResponse, retrieveBoardDetails, retrieveBoardStatus, retrievePOSDevices, storeSelectedTerminal, terminalSelector } from '../../../app/terminal/terminalStore';
59
+ import { clearError, resetTerminalLinkResponse, retrieveBoardDetails, retrieveBoardStatus, retrievePOSDevices, retrieveTerminalPlatformBrandLogo, storeSelectedTerminal, terminalSelector } from '../../../app/terminal/terminalStore';
60
60
  import { Header, Container, TextTypography } from '../shared';
61
61
  import DeviceList from './DeviceList';
62
62
  var TerminalDeviceList = function () {
@@ -100,6 +100,7 @@ var TerminalDeviceList = function () {
100
100
  _a.label = 1;
101
101
  case 1:
102
102
  _a.trys.push([1, 3, , 4]);
103
+ dispatch(retrieveTerminalPlatformBrandLogo());
103
104
  return [4, dispatch(retrievePOSDevices()).unwrap()];
104
105
  case 2:
105
106
  _a.sent();
@@ -9,14 +9,14 @@ import { useAppSelector } from '../../../../hooks';
9
9
  import { terminalSelector } from '../../../../features/app/terminal/terminalStore';
10
10
  import { useTheme } from '@mui/material/styles';
11
11
  var POSDeviceList = function (_a) {
12
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13
- var posDevices = _a.posDevices, onClick = _a.onClick, selectedPOS = _a.selectedPOS, _m = _a.select, select = _m === void 0 ? true : _m, loading = _a.loading;
12
+ var _b, _c, _d, _e, _f, _g;
13
+ var posDevices = _a.posDevices, onClick = _a.onClick, selectedPOS = _a.selectedPOS, _h = _a.select, select = _h === void 0 ? true : _h, loading = _a.loading;
14
14
  var t = useTranslation().t;
15
15
  var typography = useTheme().typography;
16
16
  var responseData = useAppSelector(terminalSelector).data.responseData;
17
- var terminalData = (responseData || {}).terminalData;
18
- var platformImage = ((_e = (_d = (_c = (_b = terminalData === null || terminalData === void 0 ? void 0 : terminalData.list) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.platform) === null || _d === void 0 ? void 0 : _d.brand) === null || _e === void 0 ? void 0 : _e.logo) || ICONS_NAMES.platform_image;
19
- var platformName = (_l = (_k = (_j = (_h = (_g = (_f = terminalData === null || terminalData === void 0 ? void 0 : terminalData.list) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.platform) === null || _h === void 0 ? void 0 : _h.brand) === null || _j === void 0 ? void 0 : _j.name) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.text;
17
+ var _j = responseData || {}, terminalData = _j.terminalData, terminalPlatformBrandLogo = _j.terminalPlatformBrandLogo;
18
+ var platformImage = terminalPlatformBrandLogo || ICONS_NAMES.platform_image;
19
+ var platformName = (_g = (_f = (_e = (_d = (_c = (_b = terminalData === null || terminalData === void 0 ? void 0 : terminalData.list) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.platform) === null || _d === void 0 ? void 0 : _d.brand) === null || _e === void 0 ? void 0 : _e.name) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.text;
20
20
  var getEndComponent = function (pos) {
21
21
  if (loading && (selectedPOS === null || selectedPOS === void 0 ? void 0 : selectedPOS.id) === (pos === null || pos === void 0 ? void 0 : pos.id))
22
22
  return _jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 10, style: { height: 24, width: 24 }, toggleAnimation: !!loading });
@@ -1,5 +1,6 @@
1
1
  export declare const useCountry: (code: string) => {
2
2
  isKuwait: boolean;
3
3
  isSaudi: boolean;
4
+ isQatar: boolean;
4
5
  isOther: boolean;
5
6
  };