@tap-payments/auth-jsconnect 2.0.17 → 2.0.19

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 (26) hide show
  1. package/build/api/availabilityServices.d.ts +1 -0
  2. package/build/constants/validation.d.ts +1 -1
  3. package/build/constants/validation.js +1 -1
  4. package/build/features/app/bank/bankStore.js +2 -1
  5. package/build/features/app/business/businessStore.d.ts +1 -3
  6. package/build/features/app/business/businessStore.js +22 -53
  7. package/build/features/app/connect/connectStore.js +8 -5
  8. package/build/features/bank/screens/BankDetails/BankDetails.js +6 -2
  9. package/build/features/bank/screens/BankDetails/BankStatement.js +6 -3
  10. package/build/features/bank/screens/BankDetails/validation.js +4 -2
  11. package/build/features/bank/screens/Verify/Verify.js +2 -2
  12. package/build/features/business/screens/Activities/OperationStartDate.js +6 -0
  13. package/build/features/business/screens/Activities/SalesChannels.js +6 -3
  14. package/build/features/business/screens/Customers/CustomerLocations.js +6 -3
  15. package/build/features/business/screens/Customers/ExpectedCustomers.js +6 -3
  16. package/build/features/business/screens/Customers/ExpectedSalesRange.js +6 -3
  17. package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
  18. package/build/features/business/screens/Verify/Verify.js +2 -2
  19. package/build/features/individual/screens/Verify/Verify.js +2 -2
  20. package/build/features/password/screens/Verify/Verify.js +2 -2
  21. package/build/features/shared/Button/Button.d.ts +2 -1
  22. package/build/features/shared/Button/Button.js +2 -2
  23. package/build/features/shared/Button/SuccessButton.js +1 -1
  24. package/build/features/shared/UploadFile/UploadFile.js +2 -3
  25. package/build/features/tax/screens/Verify/Verify.js +2 -2
  26. package/package.json +1 -1
@@ -5,6 +5,7 @@ export declare type CheckEmailBody = {
5
5
  };
6
6
  export declare type CheckBrandBody = {
7
7
  profile_name: string;
8
+ country_code: string;
8
9
  encryption_contract: Array<string>;
9
10
  };
10
11
  export declare type CheckIBanBody = {
@@ -5,7 +5,7 @@ export declare const MAX_IBAN_VALUE = 34;
5
5
  export declare const FL_NUMBER_LENGTH = 8;
6
6
  export declare const CR_NUMBER_LENGTH = 10;
7
7
  export declare const SAUDI_NUMBER_LENGTH = 9;
8
- export declare const MAX_FILE_SIZE = 1000000;
8
+ export declare const MAX_FILE_SIZE = 5000000;
9
9
  export declare const VALID_FILE_FORMATS: string[];
10
10
  export declare const REGEX_FULL_NAME: RegExp;
11
11
  export declare const REGEX_WEBSITE: RegExp;
@@ -5,7 +5,7 @@ export var MAX_IBAN_VALUE = 34;
5
5
  export var FL_NUMBER_LENGTH = 8;
6
6
  export var CR_NUMBER_LENGTH = 10;
7
7
  export var SAUDI_NUMBER_LENGTH = 9;
8
- export var MAX_FILE_SIZE = 1000000;
8
+ export var MAX_FILE_SIZE = 5000000;
9
9
  export var VALID_FILE_FORMATS = ['image/jpeg', 'image/png', 'image/jpg', 'application/pdf'];
10
10
  export var REGEX_FULL_NAME = /^([a-zA-Z]{2,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,})$/g;
11
11
  export var REGEX_WEBSITE = /^[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,63}(:[0-9]{1,5})?(\/.*)?$/;
@@ -213,10 +213,10 @@ export var checkIbanBank = createAsyncThunk('checkIbanBank', function (_a) {
213
213
  iban_number: iban,
214
214
  encryption_contract: ['iban_number']
215
215
  };
216
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
216
217
  return [4, API.availabilityServices.checkIbanBank(payload, { cancelToken: cancelToken })];
217
218
  case 1:
218
219
  data = (_b.sent()).data;
219
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
220
220
  return [2, { data: data }];
221
221
  }
222
222
  });
@@ -399,6 +399,7 @@ export var bankSlice = createSlice({
399
399
  state.data.bankData.responseBody = data;
400
400
  })
401
401
  .addCase(createBankAccount.rejected, function (state, action) {
402
+ state.loading = false;
402
403
  state.error = action.error.message;
403
404
  })
404
405
  .addCase(checkIbanBank.pending, function (state) {
@@ -37,10 +37,8 @@ export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk
37
37
  export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThunk<{
38
38
  data: any;
39
39
  formData: BusinessTypeFormValues;
40
+ accountData: any;
40
41
  }, BusinessTypeFormValues, {}>;
41
- export declare const createAccount: import("@reduxjs/toolkit").AsyncThunk<{
42
- data: any;
43
- }, void, {}>;
44
42
  export declare const updateActivitiesInfo: import("@reduxjs/toolkit").AsyncThunk<{
45
43
  data: any;
46
44
  formData: {
@@ -97,7 +97,7 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
97
97
  steps = (_c = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _c === void 0 ? void 0 : _c.steps;
98
98
  brandID = (_e = (_d = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _d === void 0 ? void 0 : _d.brand) === null || _e === void 0 ? void 0 : _e.id;
99
99
  hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
100
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO);
100
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
101
101
  hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
102
102
  hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
103
103
  if (!hasBusinessCompleted) return [3, 6];
@@ -200,7 +200,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
200
200
  (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, { otp: params.otp });
201
201
  steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
202
202
  hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
203
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO);
203
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
204
204
  hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
205
205
  hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
206
206
  if (!isNID) return [3, 3];
@@ -338,10 +338,10 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
338
338
  });
339
339
  }); });
340
340
  export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
341
- var _a, settings, business, payload, data;
342
- var _b, _c, _d, _e, _f;
343
- return __generator(this, function (_g) {
344
- switch (_g.label) {
341
+ var _a, settings, business, payload, data, accountBody, accountData;
342
+ var _b, _c, _d, _e, _f, _g;
343
+ return __generator(this, function (_h) {
344
+ switch (_h.label) {
345
345
  case 0:
346
346
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
347
347
  payload = {
@@ -354,24 +354,9 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
354
354
  };
355
355
  return [4, API.leadService.updateLead(payload)];
356
356
  case 1:
357
- data = _g.sent();
358
- return [4, thunkApi.dispatch(createAccount())];
359
- case 2:
360
- _g.sent();
361
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
362
- return [2, { data: data, formData: params }];
363
- }
364
- });
365
- }); });
366
- export var createAccount = createAsyncThunk('createAccount', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
367
- var _a, settings, business, requestBody, data;
368
- var _b, _c, _d;
369
- return __generator(this, function (_e) {
370
- switch (_e.label) {
371
- case 0:
372
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
373
- requestBody = {
374
- lead_id: (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.id,
357
+ data = _h.sent();
358
+ accountBody = {
359
+ lead_id: (_e = business.data.verify.responseBody) === null || _e === void 0 ? void 0 : _e.id,
375
360
  notify: {
376
361
  email: false,
377
362
  phone: false
@@ -380,17 +365,15 @@ export var createAccount = createAsyncThunk('createAccount', function (params, t
380
365
  is_acknowledged: true,
381
366
  step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
382
367
  };
383
- return [4, API.accountService.createAccount(requestBody)];
384
- case 1:
385
- data = _e.sent();
386
- if (!!data.errors) return [3, 3];
387
- return [4, thunkApi.dispatch(retrieveChannels())];
368
+ return [4, API.accountService.createAccount(accountBody)];
388
369
  case 2:
389
- _e.sent();
370
+ accountData = _h.sent();
371
+ return [4, thunkApi.dispatch(retrieveChannels())];
372
+ case 3:
373
+ _h.sent();
390
374
  thunkApi.dispatch(handleNextScreenStep());
391
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody);
392
- _e.label = 3;
393
- case 3: return [2, { data: data }];
375
+ (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
376
+ return [2, { data: data, formData: params, accountData: accountData }];
394
377
  }
395
378
  });
396
379
  }); });
@@ -837,10 +820,14 @@ export var businessSlice = createSlice({
837
820
  var _a;
838
821
  state.loading = false;
839
822
  state.error = null;
840
- var _b = action.payload, data = _b.data, formData = _b.formData;
823
+ var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData;
841
824
  state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
842
825
  var entity = data.entity, entity_activities = data.entity_activities;
843
826
  var issuingDate = (_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date;
827
+ if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
828
+ state.error = 'signup_user_exists_error';
829
+ return;
830
+ }
844
831
  if (!!issuingDate) {
845
832
  var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
846
833
  state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
@@ -849,30 +836,12 @@ export var businessSlice = createSlice({
849
836
  var selectedActivity = activities === null || activities === void 0 ? void 0 : activities[0];
850
837
  if (!!selectedActivity)
851
838
  state.data.activitiesData.activities = [selectedActivity];
852
- state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities });
839
+ state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData);
853
840
  state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
854
841
  })
855
842
  .addCase(updateLeadBusinessType.rejected, function (state, action) {
856
843
  state.loading = false;
857
844
  state.error = action.error.message;
858
- })
859
- .addCase(createAccount.pending, function (state) {
860
- state.loading = true;
861
- state.error = null;
862
- })
863
- .addCase(createAccount.fulfilled, function (state, action) {
864
- state.loading = false;
865
- state.error = null;
866
- var data = action.payload.data;
867
- if ((data === null || data === void 0 ? void 0 : data.status) === 'ALREADY_TAKEN') {
868
- state.error = 'signup_user_exists_error';
869
- return;
870
- }
871
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), data);
872
- })
873
- .addCase(createAccount.rejected, function (state, action) {
874
- state.loading = false;
875
- state.error = action.error.message;
876
845
  })
877
846
  .addCase(updateActivitiesInfo.pending, function (state) {
878
847
  state.loading = true;
@@ -391,20 +391,23 @@ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', f
391
391
  });
392
392
  });
393
393
  });
394
- export var checkBrandNameAvailability = createAsyncThunk('checkBrandNameAvailability', function (_a) {
394
+ export var checkBrandNameAvailability = createAsyncThunk('checkBrandNameAvailability', function (_a, thunkApi) {
395
395
  var cancelToken = _a.cancelToken, name = _a.name, onSuccess = _a.onSuccess;
396
396
  return __awaiter(void 0, void 0, void 0, function () {
397
- var requestBody, data;
398
- return __generator(this, function (_b) {
399
- switch (_b.label) {
397
+ var settings, requestBody, data;
398
+ var _b;
399
+ return __generator(this, function (_c) {
400
+ switch (_c.label) {
400
401
  case 0:
402
+ settings = thunkApi.getState().settings;
401
403
  requestBody = {
402
404
  profile_name: name,
405
+ country_code: (_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2,
403
406
  encryption_contract: ['profile_name']
404
407
  };
405
408
  return [4, API.availabilityServices.checkBrand(requestBody, { cancelToken: cancelToken })];
406
409
  case 1:
407
- data = (_b.sent()).data;
410
+ data = (_c.sent()).data;
408
411
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
409
412
  if (!data.errors)
410
413
  return [2, { response: data, formData: { name: name } }];
@@ -23,7 +23,7 @@ import { useForm, FormProvider } from 'react-hook-form';
23
23
  import { yupResolver } from '@hookform/resolvers/yup';
24
24
  import { useLanguage } from '../../../../hooks';
25
25
  import { styled } from '@mui/material/styles';
26
- import { bankSelector, createBankAccount } from '../../../app/bank/bankStore';
26
+ import { bankSelector, clearError, createBankAccount } from '../../../app/bank/bankStore';
27
27
  import Form from '../../../../components/Form';
28
28
  import { handleCurrentActiveScreen } from '../../../../app/settings';
29
29
  import ConfirmPolicy from './ConfirmPolicy';
@@ -56,7 +56,11 @@ var BankDetails = function () {
56
56
  var onBack = function () {
57
57
  dispatch(handleCurrentActiveScreen('BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
58
58
  };
59
- var disabled = ibanChecking || !methods.formState.isValid;
59
+ var disabled = ibanChecking || !methods.formState.isValid || !!error;
60
+ React.useEffect(function () {
61
+ if (error)
62
+ dispatch(clearError());
63
+ }, [methods.formState.isValid, methods.watch('bankStatementFile')]);
60
64
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(BankStatement, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
61
65
  };
62
66
  export default BankDetails;
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { styled } from '@mui/material/styles';
3
- import { ScreenContainer } from '../../../../features/shared/Containers';
3
+ import { ScreenContainer } from '../../../shared/Containers';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { useController, useFormContext } from 'react-hook-form';
6
- import UploadFile from '../../../../features/shared/UploadFile';
6
+ import { useAppSelector } from '../../../../hooks';
7
+ import { bankSelector } from '../../../app/bank/bankStore';
8
+ import UploadFile from '../../../shared/UploadFile';
7
9
  var FeatureStyled = styled(ScreenContainer)(function (_a) {
8
10
  var theme = _a.theme;
9
11
  return ({
@@ -15,6 +17,7 @@ var BankStatement = function () {
15
17
  var t = useTranslation().t;
16
18
  var control = useFormContext().control;
17
19
  var bankStatementFileControl = useController({ name: 'bankStatementFile', control: control });
20
+ var loading = useAppSelector(bankSelector).loading;
18
21
  var error = (_a = bankStatementFileControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
19
22
  var handleBankStatementChange = function (file) {
20
23
  bankStatementFileControl.field.onChange(file);
@@ -22,6 +25,6 @@ var BankStatement = function () {
22
25
  var handleReset = function () {
23
26
  bankStatementFileControl.field.onChange(null);
24
27
  };
25
- return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_bank_statement'), dragTitle: t('drag_and_drop'), uploadTitle: t('title_upload_file'), onFileUploaded: handleBankStatementChange, isSubmitting: bankStatementFileControl.formState.isSubmitted, onReset: handleReset, error: error && t(error) }) }));
28
+ return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_bank_statement'), dragTitle: t('drag_and_drop'), uploadTitle: t('title_upload_file'), onFileUploaded: handleBankStatementChange, isSubmitting: loading, onReset: handleReset, error: error && t(error) }) }));
26
29
  };
27
30
  export default BankStatement;
@@ -1,4 +1,4 @@
1
- import { REGEX_BENEFICIARY_NAME, VALID_FILE_FORMATS } from '../../../../constants';
1
+ import { REGEX_BENEFICIARY_NAME, MAX_FILE_SIZE, VALID_FILE_FORMATS } from '../../../../constants';
2
2
  import * as yup from 'yup';
3
3
  export var BankValidation = yup.object().shape({
4
4
  iban: yup
@@ -18,7 +18,9 @@ export var BankValidation = yup.object().shape({
18
18
  .test({
19
19
  test: function (value) {
20
20
  if (!!value)
21
- return VALID_FILE_FORMATS.includes(value === null || value === void 0 ? void 0 : value.type) ? true : this.createError({ message: 'alert_file_upload' });
21
+ return VALID_FILE_FORMATS.includes(value === null || value === void 0 ? void 0 : value.type) && (value === null || value === void 0 ? void 0 : value.size) < MAX_FILE_SIZE
22
+ ? true
23
+ : this.createError({ message: 'alert_file_upload' });
22
24
  return true;
23
25
  }
24
26
  })
@@ -58,8 +58,9 @@ var VerifyNumber = function (_a) {
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
60
  var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
61
+ var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
61
62
  React.useEffect(function () {
62
- if (error)
63
+ if (error && methods.formState.isValid && phone)
63
64
  dispatch(clearError());
64
65
  return function () {
65
66
  dispatch(resetOTPScreen());
@@ -71,7 +72,6 @@ var VerifyNumber = function (_a) {
71
72
  var onBack = function () {
72
73
  dispatch(handlePrevScreenStep());
73
74
  };
74
- var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
75
75
  var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
76
  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, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
77
77
  };
@@ -5,13 +5,19 @@ import { useController, useFormContext } from 'react-hook-form';
5
5
  import DatePicker from '../../../../components/DatePicker';
6
6
  import { ScreenContainer } from '../../../shared/Containers';
7
7
  import { MandatoryStyled } from './SalesChannels';
8
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
9
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
8
10
  var OperationStartDate = function (_a) {
9
11
  var _b;
10
12
  var onDateClicked = _a.onDateClicked;
11
13
  var t = useTranslation().t;
14
+ var dispatch = useAppDispatch();
12
15
  var control = useFormContext().control;
16
+ var error = useAppSelector(businessSelector).error;
13
17
  var oDateControl = useController({ control: control, name: 'operationStartDate' });
14
18
  var handleOperationStartDateChange = function (data) {
19
+ if (error)
20
+ dispatch(clearError());
15
21
  oDateControl.field.onChange(data);
16
22
  };
17
23
  var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
@@ -24,9 +24,9 @@ import Box from '@mui/material/Box';
24
24
  import { alpha, styled } from '@mui/material/styles';
25
25
  import { useTranslation } from 'react-i18next';
26
26
  import { useController, useFormContext } from 'react-hook-form';
27
- import { useLanguage, useAppSelector } from '../../../../hooks';
27
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
28
28
  import Text from '../../../../components/Text';
29
- import { businessSelector } from '../../../app/business/businessStore';
29
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
30
30
  import CheckBox from '../../../../components/CheckBox';
31
31
  import Warning from '../../../../components/Warning';
32
32
  import Collapse from '../../../../components/Collapse';
@@ -79,10 +79,11 @@ var SalesChannels = function () {
79
79
  var t = useTranslation().t;
80
80
  var isAr = useLanguage().isAr;
81
81
  var control = useFormContext().control;
82
+ var dispatch = useAppDispatch();
82
83
  var channelsControl = useController({ name: 'salesChannels', control: control });
83
84
  var channelsChecked = channelsControl.field.value;
84
85
  var warningMessage = (_a = channelsControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
85
- var data = useAppSelector(businessSelector).data;
86
+ var _c = useAppSelector(businessSelector), data = _c.data, error = _c.error;
86
87
  var channelList = (data.businessTypeData.responseBody || {}).channelList;
87
88
  React.useEffect(function () {
88
89
  if ((channelList === null || channelList === void 0 ? void 0 : channelList.length) > 0) {
@@ -98,6 +99,8 @@ var SalesChannels = function () {
98
99
  return;
99
100
  }
100
101
  channelsControl.field.onChange(__spreadArray(__spreadArray([], channelsChecked, true), [selected], false));
102
+ if (error)
103
+ dispatch(clearError());
101
104
  };
102
105
  var getSelectedChannelsFlag = function (item) {
103
106
  if (channelsChecked)
@@ -33,8 +33,8 @@ import ExpandIcon from '../../../../components/ExpandIcon';
33
33
  import Input from '../../../../components/Input';
34
34
  import SimpleList from '../../../../components/SimpleList';
35
35
  import { ScreenContainer } from '../../../shared/Containers';
36
- import { useLanguage, useAppSelector } from '../../../../hooks';
37
- import { businessSelector } from '../../../app/business/businessStore';
36
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
37
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
38
38
  export var InputLabelStyled = styled(Text)(function (_a) {
39
39
  var theme = _a.theme;
40
40
  return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
@@ -78,8 +78,9 @@ var customerLocations = function (_a) {
78
78
  var t = useTranslation().t;
79
79
  var isAr = useLanguage().isAr;
80
80
  var control = useFormContext().control;
81
+ var dispatch = useAppDispatch();
81
82
  var customerLocationsControl = useController({ name: 'customerLocations', control: control });
82
- var data = useAppSelector(businessSelector).data;
83
+ var _d = useAppSelector(businessSelector), data = _d.data, error = _d.error;
83
84
  var activitiesData = data.activitiesData;
84
85
  var response = activitiesData.responseBody;
85
86
  var onOpenList = function (event) {
@@ -106,6 +107,8 @@ var customerLocations = function (_a) {
106
107
  var onSelectItem = function (customerLocations) {
107
108
  onCloseList();
108
109
  var remaining = customerLocationsList.filter(function (location) { return location.id <= customerLocations.id; });
110
+ if (error)
111
+ dispatch(clearError());
109
112
  customerLocationsControl.field.onChange(remaining);
110
113
  };
111
114
  var customerLocationsValue = customerLocationsControl.field.value;
@@ -26,13 +26,13 @@ import Box from '@mui/material/Box';
26
26
  import { styled } from '@mui/material/styles';
27
27
  import { useTranslation } from 'react-i18next';
28
28
  import { useController, useFormContext } from 'react-hook-form';
29
- import { useLanguage, useAppSelector } from '../../../../hooks';
29
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
30
30
  import SimpleList from '../../../../components/SimpleList';
31
31
  import Collapse from '../../../../components/Collapse';
32
32
  import ExpandIcon from '../../../../components/ExpandIcon';
33
33
  import { ScreenContainer } from '../../../shared/Containers';
34
34
  import { CheckIconStyled, InputLabelStyled, InputStyled, NameContainer } from './CustomerLocations';
35
- import { businessSelector } from '../../../app/business/businessStore';
35
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
36
36
  var ListItemContainer = styled(Box)(function (_a) {
37
37
  var theme = _a.theme;
38
38
  return ({
@@ -49,9 +49,10 @@ var ExpectedCustomers = function (_a) {
49
49
  var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
50
50
  var t = useTranslation().t;
51
51
  var isAr = useLanguage().isAr;
52
+ var dispatch = useAppDispatch();
52
53
  var control = useFormContext().control;
53
54
  var expectedCustomerControl = useController({ name: 'expectedCustomer', control: control });
54
- var data = useAppSelector(businessSelector).data;
55
+ var _d = useAppSelector(businessSelector), data = _d.data, error = _d.error;
55
56
  var activitiesData = data.activitiesData;
56
57
  var response = activitiesData.responseBody;
57
58
  var onOpenList = function (event) {
@@ -72,6 +73,8 @@ var ExpectedCustomers = function (_a) {
72
73
  }, [response === null || response === void 0 ? void 0 : response.expectedCustomerSales]);
73
74
  var onSelectItem = function (expectedCustomers) {
74
75
  expectedCustomerControl.field.onChange(expectedCustomers);
76
+ if (error)
77
+ dispatch(clearError());
75
78
  onCloseList();
76
79
  };
77
80
  var expectedCustomersValue = expectedCustomerControl.field.value;
@@ -15,11 +15,11 @@ import Box from '@mui/material/Box';
15
15
  import { styled } from '@mui/material/styles';
16
16
  import { useTranslation } from 'react-i18next';
17
17
  import { useController, useFormContext } from 'react-hook-form';
18
- import { useLanguage, useAppSelector } from '../../../../hooks';
18
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
19
19
  import SimpleList from '../../../../components/SimpleList';
20
20
  import Collapse from '../../../../components/Collapse';
21
21
  import ExpandIcon from '../../../../components/ExpandIcon';
22
- import { businessSelector } from '../../../../features/app/business/businessStore';
22
+ import { businessSelector, clearError } from '../../../app/business/businessStore';
23
23
  import { isExist } from '../../../../utils';
24
24
  import { ScreenContainer } from '../../../shared/Containers';
25
25
  import { InputLabelStyled, CheckIconStyled, InputStyled, NameContainer } from './CustomerLocations';
@@ -51,8 +51,9 @@ var ExpectedSalesRange = function (_a) {
51
51
  var t = useTranslation().t;
52
52
  var isAr = useLanguage().isAr;
53
53
  var control = useFormContext().control;
54
+ var dispatch = useAppDispatch();
54
55
  var expectedSaleControl = useController({ name: 'expectedSale', control: control });
55
- var data = useAppSelector(businessSelector).data;
56
+ var _e = useAppSelector(businessSelector), data = _e.data, error = _e.error;
56
57
  var activitiesData = data.activitiesData;
57
58
  var expectedSales = (activitiesData.responseBody || {}).expectedSales;
58
59
  var expectedSalesRangeValue = expectedSaleControl.field.value;
@@ -81,6 +82,8 @@ var ExpectedSalesRange = function (_a) {
81
82
  }, [expectedSales]);
82
83
  var onSelectItem = function (expectedSalesRange) {
83
84
  handleCloseMainMenu();
85
+ if (error)
86
+ dispatch(clearError());
84
87
  expectedSaleControl.field.onChange(expectedSalesRange);
85
88
  };
86
89
  React.useEffect(function () {
@@ -24,7 +24,7 @@ export declare const TextStyled: import("@emotion/styled").StyledComponent<impor
24
24
  export declare const LinkStyled: import("@emotion/styled").StyledComponent<Omit<import("@mui/material/Link").LinkBaseProps, "classes"> & {
25
25
  children?: React.ReactNode;
26
26
  classes?: Partial<import("@mui/material/Link").LinkClasses> | undefined;
27
- color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined> | ((theme: import("@mui/material/styles").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined>);
27
+ color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<import("csstype").Property.Color | import("csstype").Property.Color[] | undefined> | ((theme: import("@mui/material/styles").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<import("csstype").Property.Color | import("csstype").Property.Color[] | undefined>);
28
28
  sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
29
29
  TypographyClasses?: (Partial<import("@mui/material").TypographyClasses> & Partial<import("@mui/material/styles").ClassNameMap<never>>) | undefined;
30
30
  underline?: "none" | "always" | "hover" | undefined;
@@ -58,8 +58,9 @@ var VerifyNumber = function (_a) {
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
60
  var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
61
+ var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
61
62
  React.useEffect(function () {
62
- if (error && methods.formState.isValid)
63
+ if (error && methods.formState.isValid && phone)
63
64
  dispatch(clearError());
64
65
  return function () {
65
66
  dispatch(resetOTPScreen());
@@ -71,7 +72,6 @@ var VerifyNumber = function (_a) {
71
72
  var onBack = function () {
72
73
  dispatch(handlePrevScreenStep());
73
74
  };
74
- var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
75
75
  var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
76
  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, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
77
77
  };
@@ -58,8 +58,9 @@ var VerifyNumber = function (_a) {
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
60
  var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
61
+ var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
61
62
  React.useEffect(function () {
62
- if (error)
63
+ if (error && methods.formState.isValid && phone)
63
64
  dispatch(clearError());
64
65
  return function () {
65
66
  dispatch(resetOTPScreen());
@@ -71,7 +72,6 @@ var VerifyNumber = function (_a) {
71
72
  var onBack = function () {
72
73
  dispatch(handlePrevScreenStep());
73
74
  };
74
- var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
75
75
  var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
76
  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, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
77
77
  };
@@ -58,8 +58,9 @@ var VerifyNumber = function (_a) {
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
60
  var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
61
+ var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
61
62
  React.useEffect(function () {
62
- if (error)
63
+ if (error && methods.formState.isValid && phone)
63
64
  dispatch(clearError());
64
65
  return function () {
65
66
  dispatch(resetOTPScreen());
@@ -71,7 +72,6 @@ var VerifyNumber = function (_a) {
71
72
  var onBack = function () {
72
73
  dispatch(handlePrevScreenStep());
73
74
  };
74
- var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
75
75
  var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
76
  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, onBackClicked: function () { return onBack(); }, disabled: disabled || resendLoading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
77
77
  };
@@ -7,5 +7,6 @@ export interface CustomButtonProps extends ButtonProps {
7
7
  disableNextIcon?: boolean;
8
8
  onBackClicked?: () => void;
9
9
  error?: string;
10
+ hideError?: boolean;
10
11
  }
11
- export default function CustomButton({ children, disabled, isAr, loading, disableBack, onBackClicked, error, disableNextIcon, ...props }: CustomButtonProps): JSX.Element;
12
+ export default function CustomButton({ children, disabled, isAr, loading, disableBack, onBackClicked, error, hideError, disableNextIcon, ...props }: CustomButtonProps): JSX.Element;
@@ -83,7 +83,7 @@ var BackButtonStyled = styled(Button, { shouldForwardProp: function (prop) { ret
83
83
  });
84
84
  });
85
85
  export default function CustomButton(_a) {
86
- var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, disableBack = _a.disableBack, onBackClicked = _a.onBackClicked, error = _a.error, disableNextIcon = _a.disableNextIcon, props = __rest(_a, ["children", "disabled", "isAr", "loading", "disableBack", "onBackClicked", "error", "disableNextIcon"]);
86
+ var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, disableBack = _a.disableBack, onBackClicked = _a.onBackClicked, error = _a.error, hideError = _a.hideError, disableNextIcon = _a.disableNextIcon, props = __rest(_a, ["children", "disabled", "isAr", "loading", "disableBack", "onBackClicked", "error", "hideError", "disableNextIcon"]);
87
87
  var _b = React.useState(false), btnLoading = _b[0], setBtnLoading = _b[1];
88
88
  var isBackEnabled = !disableBack && !btnLoading;
89
89
  React.useEffect(function () {
@@ -95,7 +95,7 @@ export default function CustomButton(_a) {
95
95
  React.useEffect(function () {
96
96
  setBtnLoading(false);
97
97
  }, []);
98
- return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false
98
+ return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false
99
99
  ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW })
100
100
  : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!loading })) }))] })] }));
101
101
  }
@@ -82,5 +82,5 @@ export default function SuccessButton(_a) {
82
82
  React.useEffect(function () {
83
83
  setBtnLoading(false);
84
84
  }, []);
85
- return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ isAr: isAr, loading: btnLoading, disabled: disabled, type: 'button', variant: btnLoading ? 'contained' : 'outlined' }, props, { children: children })) }));
85
+ return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ isAr: isAr, loading: btnLoading, disabled: disabled, type: 'button', variant: btnLoading ? 'contained' : 'outlined', error: error, hideError: true }, props, { children: children })) }));
86
86
  }
@@ -36,16 +36,15 @@ var LabelContainerStyled = styled(Box)(function (_a) {
36
36
  });
37
37
  var BoxStyled = styled(Box)(function (_a) {
38
38
  var theme = _a.theme;
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%' }));
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' }));
40
40
  });
41
41
  var UploadBoxStyled = styled(Box)(function (_a) {
42
42
  var theme = _a.theme;
43
- return (__assign(__assign({}, theme.typography.caption), { background: theme.palette.primary.main, color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, padding: theme.spacing(0.75, 1.75, 0), cursor: 'pointer', width: '15%', display: 'flex', justifyContent: 'center' }));
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' }));
44
44
  });
45
45
  var ClearIconStyled = styled(ClearIcon)(function (_a) {
46
46
  var theme = _a.theme;
47
47
  return ({
48
- marginBlockStart: theme.spacing(0.25),
49
48
  width: theme.spacing(3),
50
49
  height: theme.spacing(3),
51
50
  cursor: 'pointer',
@@ -58,8 +58,9 @@ var VerifyNumber = function (_a) {
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
60
  var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
61
+ var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.user.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
61
62
  React.useEffect(function () {
62
- if (error)
63
+ if (error && methods.formState.isValid && phone)
63
64
  dispatch(clearError());
64
65
  return function () {
65
66
  dispatch(resetOTPScreen());
@@ -71,7 +72,6 @@ var VerifyNumber = function (_a) {
71
72
  var onBack = function () {
72
73
  dispatch(handlePrevScreenStep());
73
74
  };
74
- var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.user.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
75
75
  var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
76
  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, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
77
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.17",
3
+ "version": "2.0.19",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",