@tap-payments/auth-jsconnect 2.0.54 → 2.0.55
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 +38 -0
- package/build/@types/app.js +5 -0
- package/build/@types/form.d.ts +2 -1
- package/build/api/entity.d.ts +1 -0
- package/build/api/entity.js +8 -1
- package/build/api/index.d.ts +6 -1
- package/build/api/index.js +3 -1
- package/build/api/init.d.ts +16 -0
- package/build/api/init.js +13 -0
- package/build/api/lead.d.ts +4 -1
- package/build/app/settings.d.ts +4 -8
- package/build/app/settings.js +28 -19
- package/build/assets/locales/ar.json +5 -1
- package/build/assets/locales/en.json +5 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
- package/build/components/AnimationFlow/BottomSheet.js +23 -20
- package/build/components/AnimationFlow/Dialog.d.ts +4 -2
- package/build/components/AnimationFlow/Dialog.js +30 -7
- package/build/components/DatePicker/DatePicker.d.ts +2 -1
- package/build/components/DatePicker/DatePicker.js +9 -8
- package/build/components/LogoBadge/LogoBadge.js +3 -0
- package/build/components/SimpleList/SimpleList.d.ts +3 -1
- package/build/components/SimpleList/SimpleList.js +19 -2
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/api.d.ts +2 -0
- package/build/constants/api.js +5 -1
- package/build/constants/app.d.ts +11 -0
- package/build/constants/app.js +33 -32
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +4 -0
- package/build/features/app/bank/bankStore.d.ts +3 -0
- package/build/features/app/bank/bankStore.js +33 -4
- package/build/features/app/brand/brandStore.d.ts +3 -2
- package/build/features/app/brand/brandStore.js +45 -24
- package/build/features/app/business/businessStore.d.ts +8 -0
- package/build/features/app/business/businessStore.js +166 -157
- package/build/features/app/connect/connectStore.js +2 -2
- package/build/features/app/connectExpress/connectExpressStore.js +4 -4
- package/build/features/app/entity/entityStore.d.ts +3 -0
- package/build/features/app/entity/entityStore.js +32 -3
- package/build/features/app/individual/individualStore.d.ts +5 -0
- package/build/features/app/individual/individualStore.js +76 -41
- package/build/features/app/tax/taxStore.d.ts +3 -0
- package/build/features/app/tax/taxStore.js +33 -4
- package/build/features/bank/Bank.js +3 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +9 -5
- package/build/features/bank/screens/Verify/Verify.js +1 -5
- package/build/features/brand/Brand.js +3 -4
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +8 -8
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +14 -5
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +8 -8
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +1 -1
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +16 -10
- package/build/features/brand/screens/Verify/Verify.js +7 -20
- package/build/features/business/Business.js +3 -4
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +8 -8
- package/build/features/business/screens/Activities/ActivitiesList.js +6 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +32 -8
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +132 -0
- package/build/features/business/screens/BusinessType/EntityName.js +6 -6
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +4 -16
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseNumber.js +4 -2
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +8 -8
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +1 -1
- package/build/features/connect/Connect.js +3 -4
- package/build/features/connect/screens/Individual/Email.js +10 -18
- package/build/features/connect/screens/Individual/MobileNumber.js +10 -6
- package/build/features/connect/screens/NID/DOB.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +3 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +1 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/Mobile/Mobile.js +1 -2
- package/build/features/connectExpress/screens/NID/DOB.js +1 -1
- package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +1 -1
- package/build/features/entity/Entity.js +3 -4
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +8 -8
- package/build/features/entity/screens/EntityCapital/ActivityList.js +6 -4
- package/build/features/entity/screens/EntityName/EntityName.js +11 -4
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -8
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/Verify/Verify.js +7 -20
- package/build/features/individual/Individual.js +3 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +6 -6
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +17 -9
- package/build/features/individual/screens/Verify/Verify.js +1 -5
- package/build/features/password/Password.js +3 -4
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Button/FlowsButtons.js +6 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -4
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
- package/build/features/shared/Footer/PoweredByFooter.js +36 -0
- package/build/features/shared/Footer/index.d.ts +3 -2
- package/build/features/shared/Footer/index.js +3 -2
- package/build/features/shared/Input/Input.d.ts +3 -3
- package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
- package/build/features/signIn/SignIn.js +3 -4
- package/build/features/tax/Tax.js +3 -4
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +10 -6
- package/build/features/tax/screens/Verify/Verify.js +6 -22
- package/build/hooks/useAppConfig.js +5 -2
- package/build/utils/string.d.ts +2 -1
- package/build/utils/string.js +5 -0
- package/package.json +1 -1
|
@@ -33,7 +33,6 @@ import { findOrCreateElementAndInject } from '../../utils';
|
|
|
33
33
|
import { FeatureContainer } from '../shared/Containers';
|
|
34
34
|
import { TAX_SCREENS_NAVIGATION } from '../../constants';
|
|
35
35
|
import { taxFeatureScreens } from '../featuresScreens';
|
|
36
|
-
import CustomFooter from '../shared/Footer';
|
|
37
36
|
import { taxSelector, verifyLeadToken } from '../app/tax/taxStore';
|
|
38
37
|
import Background from '../shared/Background';
|
|
39
38
|
var Tax = memo(function (_a) {
|
|
@@ -44,7 +43,7 @@ var Tax = memo(function (_a) {
|
|
|
44
43
|
useAppConfig(__assign(__assign({ navigation: TAX_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
45
44
|
useErrorListener(taxError || error);
|
|
46
45
|
useStepStartedListener();
|
|
47
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation;
|
|
46
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
48
47
|
useVerifyToken({
|
|
49
48
|
verify: verifyLeadToken,
|
|
50
49
|
loadingScreenName: 'TAX_LOADING_DATA_STEP',
|
|
@@ -54,11 +53,11 @@ var Tax = memo(function (_a) {
|
|
|
54
53
|
settingLoading: settingLoading
|
|
55
54
|
});
|
|
56
55
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
57
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, breakpoint: 'sm',
|
|
56
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
|
|
58
57
|
var Element = _a.element, name = _a.name;
|
|
59
58
|
var isActive = activeScreen.name === name;
|
|
60
59
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
61
|
-
}) }) })) })) })));
|
|
60
|
+
}) })) })) })) })));
|
|
62
61
|
});
|
|
63
62
|
export function TaxElement(props) {
|
|
64
63
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Tax, __assign({}, props)) })));
|
|
@@ -17,12 +17,12 @@ import { yupResolver } from '@hookform/resolvers/yup';
|
|
|
17
17
|
import { styled } from '@mui/material/styles';
|
|
18
18
|
import Form from '../../../../components/Form';
|
|
19
19
|
import { useAppDispatch, useLanguage, useAppSelector, useSetFromDefaultValues, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
|
|
20
|
-
import {
|
|
20
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
21
21
|
import { DocumentPurpose } from '../../../../@types';
|
|
22
22
|
import { getFileDetailsFromDocument, isSA } from '../../../../utils';
|
|
23
23
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
24
|
import Button from '../../../shared/Button';
|
|
25
|
-
import { taxSelector, updateTaxInfo } from '../../../app/tax/taxStore';
|
|
25
|
+
import { retrieveBoardStatus, taxSelector, updateTaxInfo } from '../../../app/tax/taxStore';
|
|
26
26
|
import { Validation } from './validation';
|
|
27
27
|
import VATId from './VATId';
|
|
28
28
|
import ConfirmPolicy from './ConfirmPolicy';
|
|
@@ -36,9 +36,9 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
36
36
|
var TaxDetails = function () {
|
|
37
37
|
var dispatch = useAppDispatch();
|
|
38
38
|
var _a = useAppSelector(taxSelector), data = _a.data, loading = _a.loading, error = _a.error, uploading = _a.uploading;
|
|
39
|
-
var
|
|
39
|
+
var _b = data.verify.responseBody || {}, entity = _b.entity, flows = _b.flows;
|
|
40
40
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
41
|
-
var
|
|
41
|
+
var _c = data.taxData, vatId = _c.vatId, confirmPolicy = _c.confirmPolicy, documentId = _c.documentId;
|
|
42
42
|
var methods = useForm({
|
|
43
43
|
resolver: yupResolver(Validation()),
|
|
44
44
|
defaultValues: {
|
|
@@ -60,8 +60,12 @@ var TaxDetails = function () {
|
|
|
60
60
|
dispatch(updateTaxInfo(data));
|
|
61
61
|
};
|
|
62
62
|
var onBack = function () {
|
|
63
|
-
|
|
63
|
+
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
|
|
64
|
+
dispatch(handlePrevScreenStep());
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
dispatch(retrieveBoardStatus());
|
|
64
68
|
};
|
|
65
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(VATId, { readOnly: readOnly['vatId'] || noneEditable['tax_number'] }), _jsx(TaxDocument, { show: isSACountry, defaultFiles: defaultTaxFiles, readOnly: readOnly['documentId'] || noneEditable['documents'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['documentId'] || noneEditable['is_vat_acknowledged'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr,
|
|
69
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(VATId, { readOnly: readOnly['vatId'] || noneEditable['tax_number'] }), _jsx(TaxDocument, { show: isSACountry, defaultFiles: defaultTaxFiles, readOnly: readOnly['documentId'] || noneEditable['documents'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['documentId'] || noneEditable['is_vat_acknowledged'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid || uploading, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
66
70
|
};
|
|
67
71
|
export default TaxDetails;
|
|
@@ -9,17 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
13
|
import * as React from 'react';
|
|
25
14
|
import { useAppDispatch, useSetFromDefaultValues } from '../../../../hooks';
|
|
@@ -28,7 +17,6 @@ import { useForm, FormProvider } from 'react-hook-form';
|
|
|
28
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
29
18
|
import Box from '@mui/material/Box/Box';
|
|
30
19
|
import { styled } from '@mui/material/styles';
|
|
31
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
32
20
|
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
33
21
|
import { maskPhone } from '../../../../utils';
|
|
34
22
|
import Form from '../../../../components/Form';
|
|
@@ -58,20 +46,19 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
58
46
|
flexDirection: 'column'
|
|
59
47
|
}); });
|
|
60
48
|
var VerifyNumber = function (_a) {
|
|
61
|
-
var _b, _c, _d;
|
|
49
|
+
var _b, _c, _d, _e;
|
|
62
50
|
var dispatch = useAppDispatch();
|
|
63
|
-
var
|
|
64
|
-
var _f = data.otpData, responseBody = _f.responseBody, defaultValues = __rest(_f, ["responseBody"]);
|
|
51
|
+
var _f = useAppSelector(taxSelector), data = _f.data, loading = _f.loading, error = _f.error;
|
|
65
52
|
var methods = useForm({
|
|
66
53
|
resolver: yupResolver(OTPValidation),
|
|
67
|
-
defaultValues:
|
|
54
|
+
defaultValues: data.otpData,
|
|
68
55
|
mode: 'onChange'
|
|
69
56
|
});
|
|
70
|
-
useSetFromDefaultValues(methods,
|
|
57
|
+
useSetFromDefaultValues(methods, data.otpData);
|
|
71
58
|
var t = useTranslation().t;
|
|
72
59
|
var isAr = useLanguage().isAr;
|
|
73
60
|
var _g = React.useState(false), resendLoading = _g[0], setResendLoading = _g[1];
|
|
74
|
-
var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.user
|
|
61
|
+
var phone = (_e = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.user) === null || _c === void 0 ? void 0 : _c.contact) === null || _d === void 0 ? void 0 : _d.phone) === null || _e === void 0 ? void 0 : _e.number;
|
|
75
62
|
React.useEffect(function () {
|
|
76
63
|
if (error && methods.formState.isValid && phone)
|
|
77
64
|
dispatch(clearError());
|
|
@@ -82,10 +69,7 @@ var VerifyNumber = function (_a) {
|
|
|
82
69
|
var onSubmit = function (formData) {
|
|
83
70
|
dispatch(verifyTaxLeadOTP(formData));
|
|
84
71
|
};
|
|
85
|
-
var onBack = function () {
|
|
86
|
-
dispatch(handlePrevScreenStep());
|
|
87
|
-
};
|
|
88
72
|
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
89
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true,
|
|
73
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
90
74
|
};
|
|
91
75
|
export default React.memo(VerifyNumber);
|
|
@@ -21,14 +21,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { useEffect } from 'react';
|
|
24
|
-
import { handleActiveFlowScreens, handleSetAppConfig, handleLanguage, handleOpen, handleIsTapOrigin, fetchAppSettingsSync, handelBoardMaturity } from '../app/settings';
|
|
24
|
+
import { handleActiveFlowScreens, handleSetAppConfig, handleLanguage, handleOpen, handleIsTapOrigin, fetchAppSettingsSync, handelBoardMaturity, settingsSelector } from '../app/settings';
|
|
25
25
|
import { useAppDispatch } from './useAppDispatch';
|
|
26
|
+
import { useAppSelector } from './useAppSelector';
|
|
26
27
|
import { axiosInstance } from '../api';
|
|
27
28
|
import { isTapDomain, removeRequestHeaders } from '../utils';
|
|
28
29
|
import { ENDPOINT_PATHS } from '../constants';
|
|
29
30
|
export var useAppConfig = function (_a) {
|
|
30
31
|
var appInfo = _a.appInfo, navigation = _a.navigation, publicKey = _a.publicKey, disableCountries = _a.disableCountries, disableLocale = _a.disableLocale, disableSettingFetching = _a.disableSettingFetching, maturity = _a.maturity, boardMaturity = _a.boardMaturity, rest = __rest(_a, ["appInfo", "navigation", "publicKey", "disableCountries", "disableLocale", "disableSettingFetching", "maturity", "boardMaturity"]);
|
|
31
32
|
var dispatch = useAppDispatch();
|
|
33
|
+
var data = useAppSelector(settingsSelector).data;
|
|
32
34
|
var setBaseUrl = function () {
|
|
33
35
|
var isProd = publicKey.includes('pk_live');
|
|
34
36
|
if (isProd) {
|
|
@@ -58,7 +60,8 @@ export var useAppConfig = function (_a) {
|
|
|
58
60
|
setAppConfig();
|
|
59
61
|
if (typeof boardMaturity === 'boolean')
|
|
60
62
|
dispatch(handelBoardMaturity(boardMaturity));
|
|
61
|
-
|
|
63
|
+
if (!data.isMaturityExpress)
|
|
64
|
+
dispatch(handleLanguage(rest.language));
|
|
62
65
|
if (!disableSettingFetching)
|
|
63
66
|
dispatch(fetchAppSettingsSync({ disableCountries: disableCountries, disableLocale: disableLocale, mdn: rest.merchantDomain, maturity: maturity }));
|
|
64
67
|
}, []);
|
package/build/utils/string.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeviceInfo, User } from '../@types';
|
|
1
|
+
import { DeviceInfo, License, User } from '../@types';
|
|
2
2
|
export declare const maskPhone: (str?: string) => string;
|
|
3
3
|
export declare const shortenString: (str: string, length: number) => string;
|
|
4
4
|
export declare const maskID: (str: string) => string;
|
|
@@ -70,3 +70,4 @@ export declare const getUserNameObject: (name: string) => {
|
|
|
70
70
|
};
|
|
71
71
|
export declare const getFileType: (type: string) => "" | "image/jpeg" | "image/png" | "image/jpg" | "application/pdf";
|
|
72
72
|
export declare const isStringMasked: (value: string) => boolean;
|
|
73
|
+
export declare const isOtherLicense: (item?: License) => boolean;
|
package/build/utils/string.js
CHANGED
|
@@ -301,3 +301,8 @@ export var getFileType = function (type) {
|
|
|
301
301
|
export var isStringMasked = function (value) {
|
|
302
302
|
return value.includes('*') ? true : false;
|
|
303
303
|
};
|
|
304
|
+
export var isOtherLicense = function (item) {
|
|
305
|
+
var _a;
|
|
306
|
+
var number = (_a = item === null || item === void 0 ? void 0 : item.license) === null || _a === void 0 ? void 0 : _a.number;
|
|
307
|
+
return number === 'other_fl' || number === 'other_cr' || number === 'other_entity';
|
|
308
|
+
};
|