@tap-payments/auth-jsconnect 2.0.52-test → 2.0.54-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 +4 -15
- package/build/@types/app.js +0 -9
- package/build/@types/form.d.ts +0 -11
- package/build/api/auth.d.ts +1 -14
- package/build/api/auth.js +1 -24
- package/build/api/axios.js +2 -2
- package/build/api/data.d.ts +1 -4
- package/build/api/data.js +2 -6
- package/build/api/entity.d.ts +0 -2
- package/build/api/index.d.ts +1 -5
- package/build/app/rootReducer.d.ts +0 -3
- package/build/app/rootReducer.js +1 -7
- package/build/app/settings.js +2 -8
- package/build/app/store.d.ts +1 -7
- package/build/assets/locales/ar.json +4 -14
- package/build/assets/locales/en.json +4 -14
- package/build/components/AnimationFlow/AnimationFlow.d.ts +1 -4
- package/build/components/AnimationFlow/AnimationFlow.js +7 -5
- package/build/components/AnimationFlow/BottomSheet.js +1 -2
- package/build/components/AnimationFlow/Dialog.d.ts +1 -4
- package/build/components/AnimationFlow/Dialog.js +4 -9
- package/build/components/FileInput/DragAndDrop.d.ts +1 -9
- package/build/components/FileInput/DragAndDrop.js +8 -113
- package/build/components/ProgressBar/index.d.ts +0 -2
- package/build/components/ProgressBar/index.js +0 -2
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -2
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +34 -27
- package/build/constants/api.d.ts +0 -1
- package/build/constants/api.js +2 -5
- package/build/constants/app.d.ts +0 -15
- package/build/constants/app.js +3 -75
- package/build/constants/assets.d.ts +1 -17
- package/build/constants/assets.js +6 -22
- package/build/constants/validation.d.ts +0 -1
- package/build/constants/validation.js +0 -1
- package/build/features/app/bank/bankStore.d.ts +0 -4
- package/build/features/app/bank/bankStore.js +22 -42
- package/build/features/app/business/businessStore.js +12 -16
- package/build/features/app/connect/connectStore.d.ts +1 -13
- package/build/features/app/connect/connectStore.js +4 -164
- package/build/features/app/signIn/signInStore.js +2 -2
- package/build/features/bank/Bank.js +4 -10
- package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
- package/build/features/bank/screens/BankDetails/BankStatement.js +8 -33
- package/build/features/business/Business.d.ts +1 -1
- package/build/features/business/Business.js +5 -12
- 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/connect/Connect.d.ts +1 -2
- package/build/features/connect/Connect.js +10 -40
- package/build/features/connect/screens/Individual/Individual.js +2 -6
- package/build/features/connect/screens/Merchant/Merchant.js +11 -35
- package/build/features/connect/screens/Merchant/SocialMedia.js +11 -56
- package/build/features/connect/screens/Merchant/validation.d.ts +0 -87
- package/build/features/connect/screens/Merchant/validation.js +2 -68
- package/build/features/connect/screens/Mobile/Mobile.js +4 -7
- package/build/features/featuresScreens.d.ts +0 -3
- package/build/features/featuresScreens.js +0 -48
- package/build/features/individual/Individual.d.ts +1 -1
- package/build/features/individual/Individual.js +5 -12
- package/build/features/password/Password.d.ts +1 -1
- package/build/features/password/Password.js +5 -12
- package/build/features/shared/Background/Background.d.ts +5 -7
- package/build/features/shared/Background/Background.js +5 -16
- 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 +3 -8
- package/build/features/shared/UploadFile/UploadFile.js +8 -23
- package/build/features/signIn/SignIn.d.ts +1 -1
- package/build/features/signIn/SignIn.js +4 -12
- package/build/features/tax/Tax.d.ts +1 -1
- package/build/features/tax/Tax.js +4 -12
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/useAppConfig.js +0 -2
- package/build/hooks/useAppDispatch.d.ts +0 -3
- package/build/hooks/useErrorListener.js +2 -3
- package/build/index.d.ts +2 -5
- package/build/index.js +2 -11
- package/build/utils/device.d.ts +0 -1
- package/build/utils/device.js +0 -13
- package/build/utils/html.d.ts +0 -1
- package/build/utils/html.js +0 -6
- 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 +20 -22
- package/build/utils/string.js +0 -9
- package/package.json +129 -129
- package/build/components/Lottie/Lottie.d.ts +0 -878
- package/build/components/Lottie/Lottie.js +0 -58
- package/build/components/Lottie/files/pulsating_circle_waves.json +0 -236
- package/build/components/Lottie/files/success.json +0 -425
- package/build/components/Lottie/index.d.ts +0 -3
- package/build/components/Lottie/index.js +0 -3
- package/build/components/ProgressBar/CircularProgressBar.d.ts +0 -14
- package/build/components/ProgressBar/CircularProgressBar.js +0 -48
- package/build/features/app/auth/authStore.d.ts +0 -35
- package/build/features/app/auth/authStore.js +0 -148
- package/build/features/app/entity/entityStore.d.ts +0 -53
- package/build/features/app/entity/entityStore.js +0 -461
- package/build/features/app/otp/otpStore.d.ts +0 -28
- package/build/features/app/otp/otpStore.js +0 -153
- package/build/features/auth/Auth.d.ts +0 -10
- package/build/features/auth/Auth.js +0 -87
- package/build/features/auth/index.d.ts +0 -1
- package/build/features/auth/index.js +0 -1
- package/build/features/auth/screens/OTP/OTP.d.ts +0 -5
- package/build/features/auth/screens/OTP/OTP.js +0 -72
- package/build/features/auth/screens/OTP/OTPInput.d.ts +0 -5
- package/build/features/auth/screens/OTP/OTPInput.js +0 -44
- package/build/features/auth/screens/OTP/index.d.ts +0 -3
- package/build/features/auth/screens/OTP/index.js +0 -2
- package/build/features/auth/screens/OTP/validation.d.ts +0 -8
- package/build/features/auth/screens/OTP/validation.js +0 -4
- package/build/features/connect/screens/CivilID/CivilID.d.ts +0 -5
- package/build/features/connect/screens/CivilID/CivilID.js +0 -85
- package/build/features/connect/screens/CivilID/IDNumber.d.ts +0 -7
- package/build/features/connect/screens/CivilID/IDNumber.js +0 -59
- package/build/features/connect/screens/CivilID/index.d.ts +0 -3
- package/build/features/connect/screens/CivilID/index.js +0 -2
- package/build/features/connect/screens/CivilID/validation.d.ts +0 -8
- package/build/features/connect/screens/CivilID/validation.js +0 -4
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +0 -5
- package/build/features/connect/screens/Merchant/SalesChannels.js +0 -114
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +0 -5
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +0 -169
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +0 -5
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -22
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +0 -5
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +0 -8
- package/build/features/connect/screens/VerifyPACI/index.d.ts +0 -3
- package/build/features/connect/screens/VerifyPACI/index.js +0 -2
- package/build/features/entity/Entity.d.ts +0 -7
- package/build/features/entity/Entity.js +0 -70
- package/build/features/entity/index.d.ts +0 -1
- package/build/features/entity/index.js +0 -1
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +0 -54
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +0 -139
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -56
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -17
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -28
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -38
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
- package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
- package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
- package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -107
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -17
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -5
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -9
- package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +0 -3
- package/build/features/entity/screens/ResetPasswordSuccess/index.js +0 -2
- package/build/features/entity/screens/Success/Success.d.ts +0 -5
- package/build/features/entity/screens/Success/Success.js +0 -16
- package/build/features/entity/screens/Success/index.d.ts +0 -3
- package/build/features/entity/screens/Success/index.js +0 -2
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -109
- package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +0 -2
- package/build/features/entity/screens/SuccessWithFlowButtons/index.js +0 -2
- package/build/features/entity/screens/Verify/OTPInput.d.ts +0 -7
- package/build/features/entity/screens/Verify/OTPInput.js +0 -47
- package/build/features/entity/screens/Verify/Verify.d.ts +0 -5
- package/build/features/entity/screens/Verify/Verify.js +0 -78
- package/build/features/entity/screens/Verify/index.d.ts +0 -2
- package/build/features/entity/screens/Verify/index.js +0 -2
- package/build/features/entity/screens/Verify/validation.d.ts +0 -8
- package/build/features/entity/screens/Verify/validation.js +0 -4
- package/build/features/otp/OTP.d.ts +0 -7
- package/build/features/otp/OTP.js +0 -58
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +0 -1
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
- package/build/features/otp/screens/OTPVerify/OTPInput.js +0 -47
- package/build/features/otp/screens/OTPVerify/Verify.d.ts +0 -5
- package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
- package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
- package/build/features/otp/screens/OTPVerify/index.js +0 -2
- package/build/features/otp/screens/OTPVerify/validation.d.ts +0 -8
- package/build/features/otp/screens/OTPVerify/validation.js +0 -4
- package/build/features/shared/Dialog/CloseDialog.d.ts +0 -11
- package/build/features/shared/Dialog/CloseDialog.js +0 -62
- package/build/features/shared/Dialog/DialogContainer.d.ts +0 -8
- package/build/features/shared/Dialog/DialogContainer.js +0 -56
- package/build/features/shared/Dialog/index.d.ts +0 -4
- package/build/features/shared/Dialog/index.js +0 -4
- package/build/hooks/useScreen.d.ts +0 -3
- package/build/hooks/useScreen.js +0 -14
|
@@ -24,15 +24,6 @@ export var MerchantValidationSchema = function (userType) {
|
|
|
24
24
|
})
|
|
25
25
|
.required(''),
|
|
26
26
|
termAndConditionChecked: yup.boolean().required().isTrue('check_terms_cond'),
|
|
27
|
-
salesChannels: yup
|
|
28
|
-
.array()
|
|
29
|
-
.min(1, 'choose_atleast_one_channel')
|
|
30
|
-
.of(yup.object().shape({
|
|
31
|
-
id: yup.string(),
|
|
32
|
-
name_en: yup.string(),
|
|
33
|
-
name_ar: yup.string()
|
|
34
|
-
}))
|
|
35
|
-
.required('choose_atleast_one_channel'),
|
|
36
27
|
links: yup.object().shape({
|
|
37
28
|
website: yup.string().when(['instagram', 'twitter'], function (instagram, twitter) {
|
|
38
29
|
if (!instagram && !twitter) {
|
|
@@ -76,31 +67,7 @@ export var MerchantValidationSchema = function (userType) {
|
|
|
76
67
|
else {
|
|
77
68
|
return yup.string().optional();
|
|
78
69
|
}
|
|
79
|
-
})
|
|
80
|
-
apple_store: yup
|
|
81
|
-
.string()
|
|
82
|
-
.nullable()
|
|
83
|
-
.transform(function (value) { return (!!value ? value : null); })
|
|
84
|
-
.min(2, 'enter_at_least_one')
|
|
85
|
-
.optional(),
|
|
86
|
-
play_store: yup
|
|
87
|
-
.string()
|
|
88
|
-
.nullable()
|
|
89
|
-
.transform(function (value) { return (!!value ? value : null); })
|
|
90
|
-
.min(2, 'enter_at_least_one')
|
|
91
|
-
.optional(),
|
|
92
|
-
call_center: yup
|
|
93
|
-
.string()
|
|
94
|
-
.nullable()
|
|
95
|
-
.transform(function (value) { return (!!value ? value : null); })
|
|
96
|
-
.min(2, 'enter_at_least_one')
|
|
97
|
-
.optional(),
|
|
98
|
-
physical_store: yup
|
|
99
|
-
.string()
|
|
100
|
-
.nullable()
|
|
101
|
-
.transform(function (value) { return (!!value ? value : null); })
|
|
102
|
-
.min(2, 'enter_at_least_one')
|
|
103
|
-
.optional()
|
|
70
|
+
})
|
|
104
71
|
}, [
|
|
105
72
|
['instagram', 'website'],
|
|
106
73
|
['twitter', 'website'],
|
|
@@ -111,15 +78,6 @@ export var MerchantValidationSchema = function (userType) {
|
|
|
111
78
|
return yup.object().shape({
|
|
112
79
|
brandName: yup.string().optional(),
|
|
113
80
|
termAndConditionChecked: yup.boolean().optional(),
|
|
114
|
-
salesChannels: yup
|
|
115
|
-
.array()
|
|
116
|
-
.min(1, 'choose_atleast_one_channel')
|
|
117
|
-
.of(yup.object().shape({
|
|
118
|
-
id: yup.string(),
|
|
119
|
-
name_en: yup.string(),
|
|
120
|
-
name_ar: yup.string()
|
|
121
|
-
}))
|
|
122
|
-
.required('choose_atleast_one_channel'),
|
|
123
81
|
links: yup.object().shape({
|
|
124
82
|
website: yup.string().when(['instagram', 'twitter'], function (instagram, twitter) {
|
|
125
83
|
if (!instagram && !twitter) {
|
|
@@ -163,31 +121,7 @@ export var MerchantValidationSchema = function (userType) {
|
|
|
163
121
|
else {
|
|
164
122
|
return yup.string().optional();
|
|
165
123
|
}
|
|
166
|
-
})
|
|
167
|
-
apple_store: yup
|
|
168
|
-
.string()
|
|
169
|
-
.nullable()
|
|
170
|
-
.transform(function (value) { return (!!value ? value : null); })
|
|
171
|
-
.min(2, 'enter_at_least_one')
|
|
172
|
-
.optional(),
|
|
173
|
-
play_store: yup
|
|
174
|
-
.string()
|
|
175
|
-
.nullable()
|
|
176
|
-
.transform(function (value) { return (!!value ? value : null); })
|
|
177
|
-
.min(2, 'enter_at_least_one')
|
|
178
|
-
.optional(),
|
|
179
|
-
call_center: yup
|
|
180
|
-
.string()
|
|
181
|
-
.nullable()
|
|
182
|
-
.transform(function (value) { return (!!value ? value : null); })
|
|
183
|
-
.min(2, 'enter_at_least_one')
|
|
184
|
-
.optional(),
|
|
185
|
-
physical_store: yup
|
|
186
|
-
.string()
|
|
187
|
-
.nullable()
|
|
188
|
-
.transform(function (value) { return (!!value ? value : null); })
|
|
189
|
-
.min(2, 'enter_at_least_one')
|
|
190
|
-
.optional()
|
|
124
|
+
})
|
|
191
125
|
}, [
|
|
192
126
|
['instagram', 'website'],
|
|
193
127
|
['twitter', 'website'],
|
|
@@ -25,7 +25,6 @@ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
|
25
25
|
import { clearError, connectSelector, createMobileAuth } from '../../../app/connect/connectStore';
|
|
26
26
|
import { useLanguage } from '../../../../hooks';
|
|
27
27
|
import Divider from '@mui/material/Divider';
|
|
28
|
-
import { isKW } from '../../../../utils';
|
|
29
28
|
import Text from '../../../../components/Text';
|
|
30
29
|
import MIDTitle from './Title';
|
|
31
30
|
import MobileNumber from './MobileNumber';
|
|
@@ -73,10 +72,9 @@ var ListType;
|
|
|
73
72
|
ListType["CountryCodeList"] = "CountryCodeList";
|
|
74
73
|
})(ListType || (ListType = {}));
|
|
75
74
|
var Mobile = function (_a) {
|
|
76
|
-
var _b;
|
|
77
75
|
var settingsStore = useAppSelector(settingsSelector);
|
|
78
|
-
var
|
|
79
|
-
var
|
|
76
|
+
var _b = useAppSelector(connectSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
77
|
+
var _c = React.useState(), listType = _c[0], setListType = _c[1];
|
|
80
78
|
var dispatch = useAppDispatch();
|
|
81
79
|
var methods = useForm({
|
|
82
80
|
resolver: yupResolver(PhoneValidationSchema),
|
|
@@ -100,9 +98,8 @@ var Mobile = function (_a) {
|
|
|
100
98
|
var onSubmit = function (formData) {
|
|
101
99
|
dispatch(createMobileAuth(formData));
|
|
102
100
|
};
|
|
103
|
-
var isKWCountry = React.useMemo(function () { var _a; return isKW((_a = settingsStore.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2); }, [(_b = settingsStore.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2]);
|
|
104
101
|
var onBack = function () {
|
|
105
|
-
dispatch(handlePrevScreenStep(
|
|
102
|
+
dispatch(handlePrevScreenStep());
|
|
106
103
|
};
|
|
107
104
|
var isBusinessListActive = listType === ListType.BusinessList;
|
|
108
105
|
var isCountryListActive = listType === ListType.CountryCodeList;
|
|
@@ -110,6 +107,6 @@ var Mobile = function (_a) {
|
|
|
110
107
|
var disabled = !methods.formState.isValid || !!error;
|
|
111
108
|
var title = t('join_our_community');
|
|
112
109
|
var subTitle = t('ide_terms_and_conditions_description');
|
|
113
|
-
return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); } }, { children:
|
|
110
|
+
return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') }))] }))] }))] })) }))] }));
|
|
114
111
|
};
|
|
115
112
|
export default React.memo(Mobile);
|
|
@@ -6,6 +6,3 @@ export declare const individualFeatureScreens: Array<FeatureScreenStep>;
|
|
|
6
6
|
export declare const bankFeatureScreens: Array<FeatureScreenStep>;
|
|
7
7
|
export declare const taxFeatureScreens: Array<FeatureScreenStep>;
|
|
8
8
|
export declare const signInFeatureScreens: Array<FeatureScreenStep>;
|
|
9
|
-
export declare const entityFeatureScreens: Array<FeatureScreenStep>;
|
|
10
|
-
export declare const otpFeatureScreens: Array<FeatureScreenStep>;
|
|
11
|
-
export declare const authFeatureScreens: Array<FeatureScreenStep>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import MobileScreen from './connect/screens/Mobile';
|
|
2
2
|
import NIDScreen from './connect/screens/NID';
|
|
3
|
-
import CivilIDScreen from '../features/connect/screens/CivilID';
|
|
4
|
-
import VerifyPACIScreen from './connect/screens/VerifyPACI';
|
|
5
3
|
import IndividualScreen from './connect/screens/Individual';
|
|
6
4
|
import MerchantInfoScreen from './connect/screens/Merchant';
|
|
7
5
|
import ConnectOTPScreen from './connect/screens/OTP';
|
|
@@ -40,22 +38,11 @@ import SignInMobilePage from './signIn/screens/Mobile';
|
|
|
40
38
|
import SignInEmailPage from './signIn/screens/Email';
|
|
41
39
|
import SignInOTPPage from './signIn/screens/OTP';
|
|
42
40
|
import SignInPasswordPage from './signIn/screens/Password';
|
|
43
|
-
import EntityVerifyPage from './entity/screens/Verify';
|
|
44
|
-
import EntityInfoConfirmPage from './entity/screens/EntityInfoConfirm';
|
|
45
|
-
import EntitySuccessPage from './entity/screens/Success';
|
|
46
|
-
import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
|
|
47
|
-
import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
|
|
48
|
-
import OtpVerifyPage from '../features/otp/screens/OTPVerify';
|
|
49
|
-
import AuthVerifyPage from './auth/screens/OTP';
|
|
50
41
|
export var connectFeatureScreens = [
|
|
51
42
|
{
|
|
52
43
|
name: 'CONNECT_NID_STEP',
|
|
53
44
|
element: NIDScreen
|
|
54
45
|
},
|
|
55
|
-
{
|
|
56
|
-
name: 'CONNECT_CIVIL_ID_STEP',
|
|
57
|
-
element: CivilIDScreen
|
|
58
|
-
},
|
|
59
46
|
{
|
|
60
47
|
name: 'CONNECT_MOBILE_STEP',
|
|
61
48
|
element: MobileScreen
|
|
@@ -64,10 +51,6 @@ export var connectFeatureScreens = [
|
|
|
64
51
|
name: 'CONNECT_OTP_STEP',
|
|
65
52
|
element: ConnectOTPScreen
|
|
66
53
|
},
|
|
67
|
-
{
|
|
68
|
-
name: 'CONNECT_VERIFY_PACI_STEP',
|
|
69
|
-
element: VerifyPACIScreen
|
|
70
|
-
},
|
|
71
54
|
{
|
|
72
55
|
name: 'CONNECT_INDIVIDUAL_STEP',
|
|
73
56
|
element: IndividualScreen
|
|
@@ -208,34 +191,3 @@ export var signInFeatureScreens = [
|
|
|
208
191
|
element: SignInPasswordPage
|
|
209
192
|
}
|
|
210
193
|
];
|
|
211
|
-
export var entityFeatureScreens = [
|
|
212
|
-
{
|
|
213
|
-
name: 'ENTITY_VERIFY_STEP',
|
|
214
|
-
element: EntityVerifyPage
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
name: 'ENTITY_INFO_STEP',
|
|
218
|
-
element: EntityInfoConfirmPage
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
name: 'ENTITY_DETAILS_SUCCESS_STEP',
|
|
222
|
-
element: EntitySuccessPage
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
name: 'ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
226
|
-
element: EntitySuccessWithFlowPage
|
|
227
|
-
},
|
|
228
|
-
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
|
|
229
|
-
];
|
|
230
|
-
export var otpFeatureScreens = [
|
|
231
|
-
{
|
|
232
|
-
name: 'OTP_VERIFY_STEP',
|
|
233
|
-
element: OtpVerifyPage
|
|
234
|
-
}
|
|
235
|
-
];
|
|
236
|
-
export var authFeatureScreens = [
|
|
237
|
-
{
|
|
238
|
-
name: 'AUTH_VERIFY_STEP',
|
|
239
|
-
element: AuthVerifyPage
|
|
240
|
-
}
|
|
241
|
-
];
|
|
@@ -4,4 +4,4 @@ export interface IndividualLibProps extends LibConfig {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function IndividualLib(props: IndividualLibProps): JSX.Element;
|
|
6
6
|
export declare function renderIndividualLib(config: IndividualLibProps, elementId: string): void;
|
|
7
|
-
export declare function unmountIndividualLib(elementId: string
|
|
7
|
+
export declare function unmountIndividualLib(elementId: string): void;
|
|
@@ -17,9 +17,9 @@ import AnimationFlow from '../../components/AnimationFlow';
|
|
|
17
17
|
import { store } from '../../app/store';
|
|
18
18
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
19
19
|
import Collapse from '../../components/Collapse';
|
|
20
|
-
import { getParameterByName, reactElement
|
|
20
|
+
import { getParameterByName, reactElement } from '../../utils';
|
|
21
21
|
import { FeatureContainer } from '../shared/Containers';
|
|
22
|
-
import {
|
|
22
|
+
import { INDIVIDUAL_SCREENS_NAVIGATION } from '../../constants';
|
|
23
23
|
import { individualFeatureScreens } from '../featuresScreens';
|
|
24
24
|
import { individualSelector, verifyLeadToken } from '../app/individual/individualStore';
|
|
25
25
|
import CustomFooter from '../shared/Footer';
|
|
@@ -46,7 +46,7 @@ var Individual = memo(function (props) {
|
|
|
46
46
|
if (!settingLoading)
|
|
47
47
|
verifyToken();
|
|
48
48
|
}, [settingLoading]);
|
|
49
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({
|
|
49
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: individualFeatureScreens.map(function (_a, index) {
|
|
50
50
|
var Element = _a.element, name = _a.name;
|
|
51
51
|
var isActive = activeScreen.name === name;
|
|
52
52
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -58,13 +58,6 @@ export function IndividualLib(props) {
|
|
|
58
58
|
export function renderIndividualLib(config, elementId) {
|
|
59
59
|
reactElement(elementId).render(_jsx(IndividualLib, __assign({}, config)));
|
|
60
60
|
}
|
|
61
|
-
export function unmountIndividualLib(elementId
|
|
62
|
-
|
|
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);
|
|
61
|
+
export function unmountIndividualLib(elementId) {
|
|
62
|
+
reactElement(elementId).unmount();
|
|
70
63
|
}
|
|
@@ -4,4 +4,4 @@ export interface PasswordLibProps extends LibConfig {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function PasswordLib(props: PasswordLibProps): JSX.Element;
|
|
6
6
|
export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): void;
|
|
7
|
-
export declare function unmountPasswordLib(elementId: string
|
|
7
|
+
export declare function unmountPasswordLib(elementId: string): void;
|
|
@@ -18,8 +18,8 @@ import { store } from '../../app/store';
|
|
|
18
18
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
19
19
|
import Collapse from '../../components/Collapse';
|
|
20
20
|
import { FeatureContainer } from '../shared/Containers';
|
|
21
|
-
import { getParameterByName, reactElement
|
|
22
|
-
import {
|
|
21
|
+
import { getParameterByName, reactElement } from '../../utils';
|
|
22
|
+
import { PASSWORD_OPERATION_TYPE, PASSWORD_SCREENS_NAVIGATION } from '../../constants';
|
|
23
23
|
import { passwordFeatureScreens } from '../featuresScreens';
|
|
24
24
|
import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
|
|
25
25
|
import CustomFooter from '../shared/Footer';
|
|
@@ -53,7 +53,7 @@ var Password = memo(function (props) {
|
|
|
53
53
|
if (!settingLoading)
|
|
54
54
|
verifyToken();
|
|
55
55
|
}, [settingLoading]);
|
|
56
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({
|
|
56
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
57
57
|
var Element = _a.element, name = _a.name;
|
|
58
58
|
var isActive = activeScreen.name === name;
|
|
59
59
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -65,13 +65,6 @@ export function PasswordLib(props) {
|
|
|
65
65
|
export function renderPasswordLib(config, elementId) {
|
|
66
66
|
reactElement(elementId).render(_jsx(PasswordLib, __assign({}, config)));
|
|
67
67
|
}
|
|
68
|
-
export function unmountPasswordLib(elementId
|
|
69
|
-
|
|
70
|
-
var element = document.getElementById(elementId);
|
|
71
|
-
setTimeout(function () {
|
|
72
|
-
var _a;
|
|
73
|
-
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
74
|
-
removeElement(DIALOG_ID);
|
|
75
|
-
reactElement(elementId).unmount();
|
|
76
|
-
}, unmountTimeout);
|
|
68
|
+
export function unmountPasswordLib(elementId) {
|
|
69
|
+
reactElement(elementId).unmount();
|
|
77
70
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare type TapOrigin = {
|
|
3
|
+
isTapOrigin: boolean;
|
|
4
|
+
};
|
|
5
|
+
interface BackgroundProps extends TapOrigin {
|
|
4
6
|
children: React.ReactNode;
|
|
5
7
|
loading?: boolean;
|
|
6
|
-
hideLogo?: boolean;
|
|
7
|
-
sx?: SxProps<Theme>;
|
|
8
|
-
open: boolean;
|
|
9
|
-
isTapOrigin: boolean;
|
|
10
8
|
}
|
|
11
|
-
declare const _default: React.MemoExoticComponent<({ children, isTapOrigin, loading
|
|
9
|
+
declare const _default: React.MemoExoticComponent<({ children, isTapOrigin, loading }: BackgroundProps) => JSX.Element>;
|
|
12
10
|
export default _default;
|
|
@@ -14,28 +14,17 @@ import { memo } from 'react';
|
|
|
14
14
|
import { styled } from '@mui/material/styles';
|
|
15
15
|
import Box from '@mui/material/Box';
|
|
16
16
|
import LogoBackground from './LogoBackground';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var BackgroundStyled = styled(Box, {
|
|
20
|
-
shouldForwardProp: function (prop) { return !['isTapOrigin', 'open', 'isSmall'].includes(prop); }
|
|
21
|
-
})(function (_a) {
|
|
22
|
-
var isTapOrigin = _a.isTapOrigin, open = _a.open, isSmall = _a.isSmall;
|
|
17
|
+
var BackgroundStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
|
|
18
|
+
var isTapOrigin = _a.isTapOrigin, theme = _a.theme;
|
|
23
19
|
return ({
|
|
24
20
|
width: '100vw',
|
|
25
21
|
height: '100vh',
|
|
26
|
-
|
|
27
|
-
position: 'absolute',
|
|
28
|
-
background: !open
|
|
29
|
-
? 'inherit'
|
|
30
|
-
: isTapOrigin
|
|
31
|
-
? 'linear-gradient(180deg, #98ABAF 0%, #D9D6CC 100%)'
|
|
32
|
-
: 'rgba(0, 0, 0, 0.5)'
|
|
22
|
+
background: isTapOrigin ? 'linear-gradient(180deg, #98ABAF 0%, #D9D6CC 100%)' : 'rgba(0, 0, 0, 0.5)'
|
|
33
23
|
});
|
|
34
24
|
});
|
|
35
25
|
var Background = function (_a) {
|
|
36
|
-
var children = _a.children, isTapOrigin = _a.isTapOrigin, loading = _a.loading
|
|
26
|
+
var children = _a.children, isTapOrigin = _a.isTapOrigin, loading = _a.loading;
|
|
37
27
|
var showLogo = !loading && isTapOrigin;
|
|
38
|
-
|
|
39
|
-
return (_jsxs(BackgroundStyled, __assign({ id: BACKGROUND_ID, isSmall: small, isTapOrigin: isTapOrigin, sx: sx, open: open }, { children: [showLogo && !hideLogo && _jsx(LogoBackground, {}), children] })));
|
|
28
|
+
return (_jsxs(BackgroundStyled, __assign({ id: 'background', isTapOrigin: isTapOrigin }, { children: [showLogo && _jsx(LogoBackground, {}), children] })));
|
|
40
29
|
};
|
|
41
30
|
export default memo(Background);
|
|
@@ -22,5 +22,5 @@ interface CustomButtonProps extends InputProps {
|
|
|
22
22
|
label?: string;
|
|
23
23
|
required?: boolean;
|
|
24
24
|
}
|
|
25
|
-
export default function CustomInput({ label, required,
|
|
25
|
+
export default function CustomInput({ label, required, ...props }: CustomButtonProps): JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -51,6 +51,6 @@ var LabelContainerStyled = styled(Box)(function (_a) {
|
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
53
|
export default function CustomInput(_a) {
|
|
54
|
-
var label = _a.label, required = _a.required,
|
|
55
|
-
return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] })), _jsx(InputStyled, __assign({}, props
|
|
54
|
+
var label = _a.label, required = _a.required, props = __rest(_a, ["label", "required"]);
|
|
55
|
+
return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] })), _jsx(InputStyled, __assign({}, props))] }));
|
|
56
56
|
}
|
|
@@ -10,17 +10,12 @@ export declare const InputContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
10
10
|
interface UploadFileProps {
|
|
11
11
|
label: string;
|
|
12
12
|
required?: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
dragDescription: string;
|
|
16
|
-
uploadingTitle: string;
|
|
17
|
-
successTitle: string;
|
|
13
|
+
dragTitle: string;
|
|
14
|
+
uploadTitle: string;
|
|
18
15
|
error?: string;
|
|
19
16
|
isSubmitting?: boolean;
|
|
20
|
-
isUploading?: boolean;
|
|
21
|
-
isFileUploaded?: boolean;
|
|
22
17
|
onFileUploaded: (file: File) => void;
|
|
23
18
|
onReset: () => void;
|
|
24
19
|
}
|
|
25
|
-
declare const UploadFile: ({ label, required,
|
|
20
|
+
declare const UploadFile: ({ label, required, dragTitle, uploadTitle, isSubmitting, error, onFileUploaded, onReset }: UploadFileProps) => JSX.Element;
|
|
26
21
|
export default UploadFile;
|
|
@@ -16,14 +16,10 @@ import { ScreenContainer } from '../../shared/Containers';
|
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { InputLabelStyled } from '../../shared/Input/Input';
|
|
18
18
|
import Mandatory from '../../shared/Mandatory';
|
|
19
|
-
import { DragAndDrop } from '../../../components/FileInput';
|
|
19
|
+
import { DragAndDrop, UploadInput } from '../../../components/FileInput';
|
|
20
20
|
import Collapse from '../../../components/Collapse';
|
|
21
|
+
import Warning from '../../../components/Warning';
|
|
21
22
|
import ClearIcon from '@mui/icons-material/Clear';
|
|
22
|
-
import CheckIcon from '../../../features/shared/CheckIcon';
|
|
23
|
-
import { maskFileName } from '../../../utils';
|
|
24
|
-
import Icon from '../../../components/Icon';
|
|
25
|
-
import { ICONS_NAMES } from '../../../constants';
|
|
26
|
-
import Text from '../../../components/Text';
|
|
27
23
|
var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
28
24
|
var theme = _a.theme;
|
|
29
25
|
return ({
|
|
@@ -40,11 +36,11 @@ var LabelContainerStyled = styled(Box)(function (_a) {
|
|
|
40
36
|
});
|
|
41
37
|
var BoxStyled = styled(Box)(function (_a) {
|
|
42
38
|
var theme = _a.theme;
|
|
43
|
-
return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: theme.palette.primary.main, fontWeight: theme.typography.fontWeightBold, background: theme.palette.background.default, padding: theme.spacing(1.5, 2.5, 1.5), width: '
|
|
39
|
+
return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: theme.palette.primary.main, fontWeight: theme.typography.fontWeightBold, background: theme.palette.background.default, padding: theme.spacing(1.5, 2.5, 1.5), width: '85%', wordBreak: 'break-all' }));
|
|
44
40
|
});
|
|
45
41
|
var UploadBoxStyled = styled(Box)(function (_a) {
|
|
46
42
|
var theme = _a.theme;
|
|
47
|
-
return (__assign(__assign({}, theme.typography.caption), { background: theme.palette.primary.main, color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, cursor: 'pointer', width: '
|
|
43
|
+
return (__assign(__assign({}, theme.typography.caption), { background: theme.palette.primary.main, color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, cursor: 'pointer', width: '15%', display: 'flex', justifyContent: 'center', alignItems: 'center' }));
|
|
48
44
|
});
|
|
49
45
|
var ClearIconStyled = styled(ClearIcon)(function (_a) {
|
|
50
46
|
var theme = _a.theme;
|
|
@@ -59,16 +55,14 @@ export var InputContainerStyled = styled(Box)(function (_a) {
|
|
|
59
55
|
var theme = _a.theme;
|
|
60
56
|
return ({
|
|
61
57
|
display: 'flex',
|
|
62
|
-
width: '100%'
|
|
63
|
-
justifyContent: 'center'
|
|
58
|
+
width: '100%'
|
|
64
59
|
});
|
|
65
60
|
});
|
|
66
61
|
var UploadFile = function (_a) {
|
|
67
|
-
var label = _a.label, required = _a.required,
|
|
62
|
+
var label = _a.label, required = _a.required, dragTitle = _a.dragTitle, uploadTitle = _a.uploadTitle, isSubmitting = _a.isSubmitting, error = _a.error, onFileUploaded = _a.onFileUploaded, onReset = _a.onReset;
|
|
68
63
|
var _b = React.useState(''), fileName = _b[0], setFileName = _b[1];
|
|
69
|
-
var _c = React.useState(false), showFile = _c[0], setShowFile = _c[1];
|
|
70
64
|
var handleFileChange = function (file) {
|
|
71
|
-
setFileName(
|
|
65
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
72
66
|
onFileUploaded === null || onFileUploaded === void 0 ? void 0 : onFileUploaded(file);
|
|
73
67
|
};
|
|
74
68
|
var handleReset = function () {
|
|
@@ -77,15 +71,6 @@ var UploadFile = function (_a) {
|
|
|
77
71
|
onReset === null || onReset === void 0 ? void 0 : onReset();
|
|
78
72
|
}
|
|
79
73
|
};
|
|
80
|
-
|
|
81
|
-
if (isFileUploaded && !!fileName) {
|
|
82
|
-
setTimeout(function () {
|
|
83
|
-
setShowFile(true);
|
|
84
|
-
}, 800);
|
|
85
|
-
}
|
|
86
|
-
else
|
|
87
|
-
setShowFile(false);
|
|
88
|
-
}, [isFileUploaded]);
|
|
89
|
-
return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }), _jsx(Collapse, __assign({ in: !showFile }, { children: _jsx(InputContainerStyled, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: !!fileName, uploadingTitle: uploadingTitle, successTitle: successTitle, uploading: isUploading, uploadSuccess: isFileUploaded, onSuccess: handleFileChange, error: error }) }) })), _jsx(Collapse, __assign({ in: showFile, timeout: 300 }, { children: _jsxs(InputContainerStyled, { children: [_jsxs(BoxStyled, { children: [_jsxs(Box, __assign({ sx: { display: 'flex' } }, { children: [_jsx(Icon, { src: ICONS_NAMES.DOC_ICON }), _jsx(Text, { children: fileName })] })), _jsx(Box, { children: _jsx(CheckIcon, {}) })] }), _jsx(UploadBoxStyled, __assign({ onClick: handleReset }, { children: _jsx(ClearIconStyled, {}) }))] }) }))] }));
|
|
74
|
+
return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }), _jsx(Collapse, __assign({ in: !fileName }, { children: _jsxs(InputContainerStyled, { children: [_jsx(DragAndDrop, { title: dragTitle, onSuccess: handleFileChange }), _jsx(UploadInput, { title: uploadTitle, onChange: handleFileChange })] }) })), _jsx(Collapse, __assign({ in: !!fileName }, { children: _jsxs(InputContainerStyled, { children: [_jsx(BoxStyled, { children: fileName }), _jsx(UploadBoxStyled, __assign({ onClick: handleReset }, { children: _jsx(ClearIconStyled, {}) }))] }) })), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: error })) }))] }));
|
|
90
75
|
};
|
|
91
76
|
export default UploadFile;
|
|
@@ -4,4 +4,4 @@ export interface SignInLibProps extends LibConfig {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function SignInLib(props: SignInLibProps): JSX.Element;
|
|
6
6
|
export declare function renderSignInLib(config: SignInLibProps, elementId: string): void;
|
|
7
|
-
export declare function unmountSignInLib(elementId: string
|
|
7
|
+
export declare function unmountSignInLib(elementId: string): void;
|
|
@@ -19,7 +19,7 @@ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
|
19
19
|
import Collapse from '../../components/Collapse';
|
|
20
20
|
import { reactElement } from '../../utils';
|
|
21
21
|
import { FeatureContainer } from '../shared/Containers';
|
|
22
|
-
import {
|
|
22
|
+
import { SigIn_SCREENS_NAVIGATION } from '../../constants';
|
|
23
23
|
import { signInFeatureScreens } from '../featuresScreens';
|
|
24
24
|
import CustomFooter from '../shared/Footer';
|
|
25
25
|
import { signInSelector } from '../app/signIn/signInStore';
|
|
@@ -32,7 +32,7 @@ var SignIn = memo(function (props) {
|
|
|
32
32
|
useErrorListener(signInError || error);
|
|
33
33
|
useStepStartedListener();
|
|
34
34
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
35
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({
|
|
35
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: loading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, open: open, error: error, loading: loading, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: signInFeatureScreens.map(function (_a, index) {
|
|
36
36
|
var Element = _a.element, name = _a.name;
|
|
37
37
|
var isActive = activeScreen.name === name;
|
|
38
38
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -44,14 +44,6 @@ export function SignInLib(props) {
|
|
|
44
44
|
export function renderSignInLib(config, elementId) {
|
|
45
45
|
reactElement(elementId).render(_jsx(SignInLib, __assign({}, config)));
|
|
46
46
|
}
|
|
47
|
-
export function unmountSignInLib(elementId
|
|
48
|
-
|
|
49
|
-
var element = document.getElementById(elementId);
|
|
50
|
-
var dialogEl = document.getElementById(DIALOG_ID);
|
|
51
|
-
setTimeout(function () {
|
|
52
|
-
var _a;
|
|
53
|
-
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
54
|
-
dialogEl && dialogEl.remove();
|
|
55
|
-
reactElement(elementId).unmount();
|
|
56
|
-
}, unmountTimeout);
|
|
47
|
+
export function unmountSignInLib(elementId) {
|
|
48
|
+
reactElement(elementId).unmount();
|
|
57
49
|
}
|
|
@@ -4,4 +4,4 @@ export interface TaxLibProps extends LibConfig {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function TaxLib(props: TaxLibProps): JSX.Element;
|
|
6
6
|
export declare function renderTaxLib(config: TaxLibProps, elementId: string): void;
|
|
7
|
-
export declare function unmountTaxLib(elementId: string
|
|
7
|
+
export declare function unmountTaxLib(elementId: string): void;
|
|
@@ -19,7 +19,7 @@ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
|
19
19
|
import Collapse from '../../components/Collapse';
|
|
20
20
|
import { getParameterByName, reactElement } from '../../utils';
|
|
21
21
|
import { FeatureContainer } from '../shared/Containers';
|
|
22
|
-
import {
|
|
22
|
+
import { TAX_SCREENS_NAVIGATION } from '../../constants';
|
|
23
23
|
import { taxFeatureScreens } from '../featuresScreens';
|
|
24
24
|
import CustomFooter from '../shared/Footer';
|
|
25
25
|
import { taxSelector, verifyLeadToken } from '../app/tax/taxStore';
|
|
@@ -46,7 +46,7 @@ var Tax = memo(function (props) {
|
|
|
46
46
|
if (!loading)
|
|
47
47
|
verifyToken();
|
|
48
48
|
}, [loading]);
|
|
49
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({
|
|
49
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ 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: taxFeatureScreens.map(function (_a, index) {
|
|
50
50
|
var Element = _a.element, name = _a.name;
|
|
51
51
|
var isActive = activeScreen.name === name;
|
|
52
52
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -58,14 +58,6 @@ export function TaxLib(props) {
|
|
|
58
58
|
export function renderTaxLib(config, elementId) {
|
|
59
59
|
reactElement(elementId).render(_jsx(TaxLib, __assign({}, config)));
|
|
60
60
|
}
|
|
61
|
-
export function unmountTaxLib(elementId
|
|
62
|
-
|
|
63
|
-
var element = document.getElementById(elementId);
|
|
64
|
-
var dialogEl = document.getElementById(DIALOG_ID);
|
|
65
|
-
setTimeout(function () {
|
|
66
|
-
var _a;
|
|
67
|
-
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
68
|
-
dialogEl && dialogEl.remove();
|
|
69
|
-
reactElement(elementId).unmount();
|
|
70
|
-
}, unmountTimeout);
|
|
61
|
+
export function unmountTaxLib(elementId) {
|
|
62
|
+
reactElement(elementId).unmount();
|
|
71
63
|
}
|
package/build/hooks/index.d.ts
CHANGED
package/build/hooks/index.js
CHANGED
|
@@ -7,7 +7,4 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
|
|
|
7
7
|
individual: import("../features/app/individual/individualStore").IndividualState;
|
|
8
8
|
password: import("../features/app/password/passwordStore").PasswordState;
|
|
9
9
|
signIn: import("../features/app/signIn/signInStore").SignInState;
|
|
10
|
-
entity: import("../features/app/entity/entityStore").EntityState;
|
|
11
|
-
otp: import("../features/app/otp/otpStore").OtpState;
|
|
12
|
-
auth: import("../features/app/auth/authStore").AuthState;
|
|
13
10
|
}, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
|
|
@@ -11,8 +11,7 @@ export var useErrorListener = function (error) {
|
|
|
11
11
|
}, [error]);
|
|
12
12
|
useEffect(function () {
|
|
13
13
|
var _a, _b;
|
|
14
|
-
if (!settings.error
|
|
14
|
+
if (!settings.error)
|
|
15
15
|
(_b = (_a = settings.data.appConfig).onReady) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
16
|
-
|
|
17
|
-
}, [settings.error, settings.loading]);
|
|
16
|
+
}, [settings.error]);
|
|
18
17
|
};
|
package/build/index.d.ts
CHANGED
|
@@ -7,8 +7,5 @@ import { IndividualLib, renderIndividualLib, IndividualLibProps, unmountIndividu
|
|
|
7
7
|
import { BankLib, renderBankLib, BankLibProps, unmountBankLib } from './features/bank';
|
|
8
8
|
import { TaxLib, renderTaxLib, TaxLibProps, unmountTaxLib } from './features/tax';
|
|
9
9
|
import { SignInLib, renderSignInLib, SignInLibProps, unmountSignInLib } from './features/signIn';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import { AuthLib, AuthLibProps, renderAuthLib, unmountAuthLib } from './features/auth';
|
|
13
|
-
export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, OTPLibProps, AuthLibProps, SignInLibProps };
|
|
14
|
-
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, EntityLib, renderEntityLib, unmountEntityLib, OTPLib, renderOTPLib, unmountOTPLib, SignInLib, renderSignInLib, unmountSignInLib, AuthLib, renderAuthLib, unmountAuthLib };
|
|
10
|
+
export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, SignInLibProps };
|
|
11
|
+
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, SignInLib, renderSignInLib, unmountSignInLib };
|