@tap-payments/auth-jsconnect 2.3.94-test → 2.3.96-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.
Files changed (33) hide show
  1. package/build/api/board.d.ts +0 -1
  2. package/build/assets/locales/ar.json +12 -1
  3. package/build/assets/locales/en.json +12 -1
  4. package/build/constants/app.d.ts +1 -0
  5. package/build/constants/app.js +10 -2
  6. package/build/constants/assets.d.ts +1 -2
  7. package/build/constants/assets.js +1 -2
  8. package/build/features/app/business/businessStore.js +38 -17
  9. package/build/features/app/individual/individualStore.js +9 -12
  10. package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +5 -0
  11. package/build/features/business/screens/BrandDetails/BrandDetails.js +39 -0
  12. package/build/features/business/screens/BrandDetails/BrandName.d.ts +5 -0
  13. package/build/features/business/screens/BrandDetails/BrandName.js +36 -0
  14. package/build/features/business/screens/BrandDetails/Header.d.ts +5 -0
  15. package/build/features/business/screens/BrandDetails/Header.js +49 -0
  16. package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +5 -0
  17. package/build/features/business/screens/BrandDetails/LicenseInfo.js +38 -0
  18. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +18 -0
  19. package/build/features/business/screens/BrandDetails/SalesChannel.js +48 -0
  20. package/build/features/business/screens/BrandDetails/index.d.ts +3 -0
  21. package/build/features/business/screens/BrandDetails/index.js +2 -0
  22. package/build/features/featuresScreens.js +3 -1
  23. package/build/features/individual/screens/IndividualList/UserList.js +1 -11
  24. package/build/features/shared/Button/Button.d.ts +3 -1
  25. package/build/features/shared/Button/Button.js +2 -2
  26. package/build/features/shared/Button/IndividualActionButtons.d.ts +1 -3
  27. package/build/features/shared/Button/IndividualActionButtons.js +1 -24
  28. package/build/features/shared/Chip/Chip.d.ts +3 -0
  29. package/build/features/shared/Chip/Chip.js +21 -0
  30. package/build/features/shared/Chip/index.d.ts +2 -0
  31. package/build/features/shared/Chip/index.js +2 -0
  32. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +1 -8
  33. package/package.json +1 -1
@@ -3,7 +3,6 @@ export declare type UpdateBoardBody = {
3
3
  infoId?: string;
4
4
  step_name: string;
5
5
  lang: string;
6
- object_id?: string;
7
6
  encryption_contract?: string;
8
7
  };
9
8
  export declare type RetrieveBoardInfoBody = {
@@ -396,5 +396,16 @@
396
396
  "powered_by": "بواسطة",
397
397
  "add_other": "أخرى",
398
398
  "choose_entity_license": "اختر ترخيص المنشأة",
399
- "choose_license_entity": "- الرجاء الاختيار -"
399
+ "choose_license_entity": "- الرجاء الاختيار -",
400
+ "your_brand_details": "تفاصيل علامتك التجارية",
401
+ "signed_up": "تسجيل الدخول",
402
+ "login_to_dashboard": "تسجيل الدخول لادارة الحساب",
403
+ "review_account": "مراجعة الحساب",
404
+ "license_info": "معلومات الترخيص",
405
+ "sales_channels": "قنوات المبيعات",
406
+ "website_label": "موقع الويب",
407
+ "call_center_label": "مركز الاتصال",
408
+ "mobile_app_label": "تطبيقات هاتف",
409
+ "physical_store_label": "متجر",
410
+ "social_media_label": "وسائل التواصل الاجتماعي"
400
411
  }
@@ -426,5 +426,16 @@
426
426
  "powered_by": "Powered by",
427
427
  "add_other": "Other",
428
428
  "choose_entity_license": "Choose Entity License",
429
- "choose_license_entity": "- Please select -"
429
+ "choose_license_entity": "- Please select -",
430
+ "your_brand_details": "Your brand details",
431
+ "signed_up": "Signed up",
432
+ "login_to_dashboard": "Login to dashboard",
433
+ "review_account": "Review account",
434
+ "license_info": "License information",
435
+ "sales_channels": "Sales channels",
436
+ "website_label": "Website",
437
+ "call_center_label": "Call Center",
438
+ "mobile_app_label": "Mobile App",
439
+ "physical_store_label": "Physical Store",
440
+ "social_media_label": "Social Media"
430
441
  }
@@ -1,6 +1,7 @@
1
1
  import { ScreenStepNavigation, BusinessType } from '../@types';
2
2
  export declare const CLIENT_ORIGIN: string;
3
3
  export declare const TAP_WEBSITE = "https://www.tap.company/";
4
+ export declare const BUSINESS_WEBSITE = "https://businesses.tap.company/";
4
5
  export declare const LOCAL_STORAGE_KEYS: {
5
6
  themeMode: string;
6
7
  languageMode: string;
@@ -1,6 +1,7 @@
1
1
  import { BusinessType } from '../@types';
2
2
  export var CLIENT_ORIGIN = window.location.origin;
3
3
  export var TAP_WEBSITE = 'https://www.tap.company/';
4
+ export var BUSINESS_WEBSITE = 'https://businesses.tap.company/';
4
5
  export var LOCAL_STORAGE_KEYS = {
5
6
  themeMode: 'themeMode',
6
7
  languageMode: 'languageMode'
@@ -166,7 +167,8 @@ export var BUSINESS_SCREENS_NAVIGATION = [
166
167
  'BUSINESS_SUCCESS_STEP',
167
168
  'BUSINESS_ACTIVITIES_STEP',
168
169
  'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
169
- 'BUSINESS_CIVIL_ID_STEP'
170
+ 'BUSINESS_CIVIL_ID_STEP',
171
+ 'BUSINESS_VERIFY_BRAND_INFO'
170
172
  ],
171
173
  prev: '',
172
174
  order: 1
@@ -197,10 +199,16 @@ export var BUSINESS_SCREENS_NAVIGATION = [
197
199
  },
198
200
  {
199
201
  name: 'BUSINESS_BUSINESS_TYPE_STEP',
200
- next: 'BUSINESS_ACTIVITIES_STEP',
202
+ next: ['BUSINESS_ACTIVITIES_STEP', 'BUSINESS_VERIFY_BRAND_INFO'],
201
203
  prev: 'BUSINESS_IDBOD_STEP',
202
204
  order: 2
203
205
  },
206
+ {
207
+ name: 'BUSINESS_VERIFY_BRAND_INFO',
208
+ next: '',
209
+ prev: 'BUSINESS_BUSINESS_TYPE_STEP',
210
+ order: 2
211
+ },
204
212
  {
205
213
  name: 'BUSINESS_CONFIRM_STEP',
206
214
  next: 'BUSINESS_ACTIVITIES_STEP',
@@ -49,11 +49,9 @@ export declare const ICONS_NAMES: {
49
49
  WHITE_ARROW: string;
50
50
  BLACK_ARROW: string;
51
51
  BLUE_ARROW: string;
52
- GREEN_ARROW: string;
53
52
  REQUEST_EMAIL: string;
54
53
  REQUEST_EMAIL_GREEN: string;
55
54
  ADD_DETAIL: string;
56
- ADD_DETAIL_GREEN: string;
57
55
  SUCCESS: string;
58
56
  UNFINISHED: string;
59
57
  ABSHER_LOGO: string;
@@ -71,6 +69,7 @@ export declare const ICONS_NAMES: {
71
69
  DROP_FILE_ICON: string;
72
70
  CLOSE_ICON: string;
73
71
  PACI_ICON: string;
72
+ SIGNED_UP_SUCCESS: string;
74
73
  GMAIL_Filled_ICON: string;
75
74
  GMAIL_White_ICON: string;
76
75
  outlook_Filled_ICON: string;
@@ -49,11 +49,9 @@ export var ICONS_NAMES = {
49
49
  WHITE_ARROW: 'https://tap-connecet.b-cdn.net/imgs/whiteArrow.svg',
50
50
  BLACK_ARROW: 'https://dash.b-cdn.net/icons/menu/arrow_right_icon.svg',
51
51
  BLUE_ARROW: 'https://dash.b-cdn.net/icons/menu/blue_arrow_next.svg',
52
- GREEN_ARROW: 'https://dash.b-cdn.net/icons/menu/green_arrow_next.svg',
53
52
  REQUEST_EMAIL: 'https://dash.b-cdn.net/icons/menu/request_email.svg',
54
53
  REQUEST_EMAIL_GREEN: 'https://dash.b-cdn.net/icons/menu/request_email_green.svg',
55
54
  ADD_DETAIL: 'https://dash.b-cdn.net/icons/menu/add_detail.svg',
56
- ADD_DETAIL_GREEN: 'https://dash.b-cdn.net/icons/menu/add_detail_green.svg',
57
55
  SUCCESS: 'https://dash.b-cdn.net/icons/menu/image.png',
58
56
  UNFINISHED: 'https://dash.b-cdn.net/icons/menu/not-finished.png',
59
57
  ABSHER_LOGO: 'https://dash.b-cdn.net/icons/menu/Absher.svg',
@@ -71,6 +69,7 @@ export var ICONS_NAMES = {
71
69
  DROP_FILE_ICON: 'https://dash.b-cdn.net/icons/menu/upload-file-sample.svg',
72
70
  CLOSE_ICON: 'https://dash.b-cdn.net/icons/menu/close-btn.svg',
73
71
  PACI_ICON: 'https://dash.b-cdn.net/icons/menu/PACI-filled.svg',
72
+ SIGNED_UP_SUCCESS: 'https://dash.b-cdn.net/icons/menu/signed_up_success.svg',
74
73
  GMAIL_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-filled.svg',
75
74
  GMAIL_White_ICON: 'https://dash.b-cdn.net/icons/menu/Gmail-white.svg',
76
75
  outlook_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Outlook-filled.svg',
@@ -466,8 +466,8 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
466
466
  });
467
467
  }); });
468
468
  export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
469
- var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, documentBody, payload_1;
470
- var _b, _c, _d, _e;
469
+ var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, entity_activities, list, accountBody, accountData, brandData, _c, message, error, brandRes, documentData, entityData, entityId, documentBody, payload_1;
470
+ var _d, _e;
471
471
  return __generator(this, function (_f) {
472
472
  switch (_f.label) {
473
473
  case 0:
@@ -475,7 +475,9 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
475
475
  isNonSA = !isSA(settings.data.businessCountry.iso2);
476
476
  selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense;
477
477
  isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
478
- payload = __assign(__assign(__assign(__assign({ id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.lead_id) || '', entity: {
478
+ _b = business.data.verify.responseBody || {}, lead_id = _b.lead_id, brand = _b.brand;
479
+ stepName = 'BUSINESS_ACTIVITIES_STEP';
480
+ payload = __assign(__assign(__assign(__assign({ id: lead_id || '', entity: {
479
481
  id: (selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && (isNonSA ? !isFL : true) ? selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id : ''
480
482
  } }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
481
483
  license_number: isNonSA && isFL ? '' : licenseNumber,
@@ -496,7 +498,7 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
496
498
  _f.label = 3;
497
499
  case 3:
498
500
  accountBody = {
499
- lead_id: (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.lead_id,
501
+ lead_id: lead_id,
500
502
  notify: {
501
503
  email: false,
502
504
  phone: false
@@ -505,12 +507,31 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
505
507
  is_acknowledged: true,
506
508
  step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
507
509
  };
508
- return [4, API.accountService.createAccount(accountBody)];
510
+ brandData = undefined;
511
+ _f.label = 4;
509
512
  case 4:
513
+ _f.trys.push([4, 6, , 10]);
514
+ return [4, API.accountService.createAccount(accountBody)];
515
+ case 5:
510
516
  accountData = _f.sent();
517
+ return [3, 10];
518
+ case 6:
519
+ _c = _f.sent();
520
+ message = _c.message;
521
+ error = message;
522
+ if (!((error === null || error === void 0 ? void 0 : error.toLowerCase()) === 'entity with license already exist')) return [3, 8];
523
+ return [4, API.brandService.retrieveBrand(brand === null || brand === void 0 ? void 0 : brand.id)];
524
+ case 7:
525
+ brandRes = (_f.sent()).brand;
526
+ brandData = brandRes;
527
+ stepName = 'BUSINESS_VERIFY_BRAND_INFO';
528
+ return [3, 9];
529
+ case 8: throw new Error(error);
530
+ case 9: return [3, 10];
531
+ case 10:
511
532
  entityData = undefined;
512
533
  entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
513
- if (!((certificateId || []).length > 0)) return [3, 6];
534
+ if (!((certificateId || []).length > 0)) return [3, 12];
514
535
  documentBody = {
515
536
  entity_id: entityId || '',
516
537
  documents: [
@@ -521,23 +542,23 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
521
542
  ]
522
543
  };
523
544
  return [4, API.documentService.updateDocumentInfo(documentBody)];
524
- case 5:
545
+ case 11:
525
546
  documentData = _f.sent();
526
- _f.label = 6;
527
- case 6:
528
- if (!(articleId && entityId)) return [3, 8];
547
+ _f.label = 12;
548
+ case 12:
549
+ if (!(articleId && entityId)) return [3, 14];
529
550
  payload_1 = {
530
551
  id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
531
552
  AOA_file_id: articleId
532
553
  };
533
554
  return [4, API.entityService.updateEntity(payload_1)];
534
- case 7:
555
+ case 13:
535
556
  entityData = _f.sent();
536
- _f.label = 8;
537
- case 8:
538
- thunkApi.dispatch(handleNextScreenStep());
557
+ _f.label = 14;
558
+ case 14:
559
+ thunkApi.dispatch(handleNextScreenStep(stepName));
539
560
  (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
540
- return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
561
+ return [2, { data: __assign(__assign({}, data), { brand: brandData }), formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
541
562
  }
542
563
  });
543
564
  }); });
@@ -1025,7 +1046,7 @@ export var businessSlice = createSlice({
1025
1046
  state.error = null;
1026
1047
  var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData, documentData = _b.documentData;
1027
1048
  state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
1028
- var entity = data.entity, entity_activities = data.entity_activities;
1049
+ var entity = data.entity, entity_activities = data.entity_activities, brand = data.brand;
1029
1050
  var issuingDate = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
1030
1051
  if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
1031
1052
  state.error = 'signup_user_exists_error';
@@ -1036,7 +1057,7 @@ export var businessSlice = createSlice({
1036
1057
  }
1037
1058
  var activities = entity_activities || [];
1038
1059
  state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData), documentData);
1039
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
1060
+ state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), { entity: entity }), (brand && { brand: brand }));
1040
1061
  })
1041
1062
  .addCase(updateLeadBusinessType.rejected, function (state, action) {
1042
1063
  state.loading = false;
@@ -763,34 +763,31 @@ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', f
763
763
  });
764
764
  });
765
765
  export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
766
- var _a, settings, individual, _b, id, infoId, _c, notification, user, userId, payload, data, boardInfoStatus;
767
- var _d, _e, _f, _g;
768
- return __generator(this, function (_h) {
769
- switch (_h.label) {
766
+ var _a, settings, individual, _b, id, infoId, payload, data, boardInfoStatus;
767
+ var _c, _d, _e, _f;
768
+ return __generator(this, function (_g) {
769
+ switch (_g.label) {
770
770
  case 0:
771
771
  _a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
772
772
  _b = individual.data.verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id;
773
- _c = individual.data.verify.responseBody || {}, notification = _c.notification, user = _c.user;
774
- userId = (((user === null || user === void 0 ? void 0 : user.is_authorized) ? user : notification === null || notification === void 0 ? void 0 : notification.recipient) || {}).id;
775
773
  if (!id)
776
774
  return [2];
777
775
  payload = {
778
776
  lang: settings.data.language,
779
- object_id: userId,
780
777
  step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_SUCCESS,
781
778
  id: id
782
779
  };
783
780
  return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
784
781
  case 1:
785
- data = _h.sent();
782
+ data = _g.sent();
786
783
  return [4, API.boardService.retrieveBoardInfoStatus(id)];
787
784
  case 2:
788
- boardInfoStatus = _h.sent();
785
+ boardInfoStatus = _g.sent();
789
786
  return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
790
787
  case 3:
791
- _h.sent();
792
- (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, {});
793
- (_g = (_f = settings.data.appConfig).onFlowCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, { data: data });
788
+ _g.sent();
789
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
790
+ (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
794
791
  thunkApi.dispatch(handleNextScreenStep());
795
792
  return [2, { response: __assign(__assign({}, data), { flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || [] }), formData: params }];
796
793
  }
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface BrandDetailsProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: BrandDetailsProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,39 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { handlePrevScreenStep } from '../../../../app/settings';
16
+ import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
17
+ import { BUSINESS_WEBSITE } from '../../../../constants';
18
+ import FlatButton from '../../../../components/Button';
19
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
20
+ import { businessSelector } from '../../../app/business/businessStore';
21
+ import Button from '../../../shared/Button';
22
+ import Header from './Header';
23
+ import BrandName from './BrandName';
24
+ import LicenseInfo from './LicenseInfo';
25
+ import SalesChannel from './SalesChannel';
26
+ var BrandDetails = function (_a) {
27
+ var t = useTranslation().t;
28
+ var isAr = useLanguage().isAr;
29
+ var dispatch = useAppDispatch();
30
+ var _b = useAppSelector(businessSelector), loading = _b.loading, error = _b.error;
31
+ var onBack = function () {
32
+ dispatch(handlePrevScreenStep());
33
+ };
34
+ var loginToDashboard = function () {
35
+ window.open(BUSINESS_WEBSITE, '_blank');
36
+ };
37
+ return (_jsxs(ScreenContainer, { children: [_jsx(Header, {}), _jsx(BrandName, {}), _jsx(LicenseInfo, {}), _jsx(SalesChannel, {}), _jsx(FlatButton, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: function () { return onBack(); }, variant: 'text' }, { children: t('review_account') })), _jsx(Button, __assign({ sx: { mt: 0 }, disableBack: true, onClick: function () { return loginToDashboard(); }, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('login_to_dashboard') }))] }));
38
+ };
39
+ export default React.memo(BrandDetails);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface BrandNameProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: BrandNameProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,36 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { styled } from '@mui/material/styles';
16
+ import { useAppSelector, useLanguage } from '../../../../hooks';
17
+ import { ScreenContainer } from '../../../shared/Containers';
18
+ import Input from '../../../shared/Input';
19
+ import { businessSelector } from '../../../app/business/businessStore';
20
+ var InputStyled = styled(Input)(function (_a) {
21
+ var theme = _a.theme;
22
+ return ({
23
+ opacity: 1,
24
+ '& .MuiInputBase-input': { cursor: 'auto', color: theme.palette.text.primary }
25
+ });
26
+ });
27
+ var BrandName = function (_a) {
28
+ var _b, _c, _d;
29
+ var t = useTranslation().t;
30
+ var isAr = useLanguage().isAr;
31
+ var data = useAppSelector(businessSelector).data;
32
+ var brand = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).brand;
33
+ var name = isAr ? (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = brand === null || brand === void 0 ? void 0 : brand.name) === null || _d === void 0 ? void 0 : _d.en;
34
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 3 } }, { children: _jsx(InputStyled, { label: t('signup_brand_name_label'), readOnly: true, value: name }) })));
35
+ };
36
+ export default React.memo(BrandName);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface HeaderProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: HeaderProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,49 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { alpha, styled } from '@mui/material/styles';
16
+ import { useLanguage } from '../../../../hooks';
17
+ import { ICONS_NAMES } from '../../../../constants';
18
+ import Text from '../../../../components/Text';
19
+ import { ScreenContainer } from '../../../shared/Containers';
20
+ import Chip from '../../../shared/Chip';
21
+ var ScreenContainerStyled = styled(ScreenContainer)(function () { return ({
22
+ alignItems: 'center',
23
+ justifyContent: 'center'
24
+ }); });
25
+ var TitleStyled = styled(Text)(function (_a) {
26
+ var theme = _a.theme;
27
+ return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightBold, color: theme.palette.text.primary, marginBlockEnd: theme.spacing(1), lineHeight: 1.75, padding: '0px 20px' }));
28
+ });
29
+ var ChipStyled = styled(Chip, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
30
+ var theme = _a.theme, isAr = _a.isAr;
31
+ return (__assign(__assign({ background: alpha(theme.palette.success.main, 0.1), color: theme.palette.success.main, height: theme.spacing(3.125) }, theme.typography.subtitle2), { '& .MuiChip-icon': {
32
+ marginLeft: isAr ? '-6px' : '5px',
33
+ marginRight: isAr ? '5px' : '-6px'
34
+ } }));
35
+ });
36
+ var Image = styled('img')(function (_a) {
37
+ var theme = _a.theme;
38
+ return ({
39
+ width: theme.spacing(1.6),
40
+ height: theme.spacing(1.6),
41
+ fontSize: theme.spacing(1.6)
42
+ });
43
+ });
44
+ var Header = function (_a) {
45
+ var t = useTranslation().t;
46
+ var isAr = useLanguage().isAr;
47
+ return (_jsxs(ScreenContainerStyled, { children: [_jsx(TitleStyled, { children: t('your_brand_details') }), _jsx(ChipStyled, { isAr: isAr, label: t('signed_up'), icon: _jsx(Image, { src: ICONS_NAMES.SIGNED_UP_SUCCESS }) })] }));
48
+ };
49
+ export default React.memo(Header);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface LicenseInfoProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: LicenseInfoProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,38 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { styled } from '@mui/material/styles';
16
+ import { useAppSelector, useLanguage } from '../../../../hooks';
17
+ import { ScreenContainer } from '../../../shared/Containers';
18
+ import Input from '../../../shared/Input';
19
+ import { businessSelector } from '../../../app/business/businessStore';
20
+ var InputStyled = styled(Input)(function (_a) {
21
+ var theme = _a.theme;
22
+ return ({
23
+ opacity: 1,
24
+ '& .MuiInputBase-input': { cursor: 'auto', color: theme.palette.text.primary }
25
+ });
26
+ });
27
+ var LicenseInfo = function (_a) {
28
+ var _b;
29
+ var t = useTranslation().t;
30
+ var isAr = useLanguage().isAr;
31
+ var data = useAppSelector(businessSelector).data;
32
+ var entity = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).entity;
33
+ var getLicenseNumber = React.useMemo(function () { var _a; return ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || ''; }, [entity]);
34
+ var getLicenseName = React.useMemo(function () { var _a, _b; return t((isAr ? (_a = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _a === void 0 ? void 0 : _a.ar : (_b = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _b === void 0 ? void 0 : _b.en) || ''); }, [entity]);
35
+ var name = getLicenseNumber ? "".concat(getLicenseNumber, " - ").concat(getLicenseName) : getLicenseName;
36
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(InputStyled, { label: t('license_info'), readOnly: true, value: name }) })));
37
+ };
38
+ export default React.memo(LicenseInfo);
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
+ align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
4
+ children?: React.ReactNode;
5
+ classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
6
+ gutterBottom?: boolean | undefined;
7
+ noWrap?: boolean | undefined;
8
+ paragraph?: boolean | undefined;
9
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
10
+ variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
11
+ variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
12
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
13
+ ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
14
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
15
+ interface SalesChannelProps {
16
+ }
17
+ declare const _default: React.MemoExoticComponent<({}: SalesChannelProps) => JSX.Element>;
18
+ export default _default;
@@ -0,0 +1,48 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { alpha, styled } from '@mui/material/styles';
16
+ import Box from '@mui/material/Box';
17
+ import { useAppSelector } from '../../../../hooks';
18
+ import Text from '../../../../components/Text';
19
+ import { ScreenContainer } from '../../../shared/Containers';
20
+ import Chip from '../../../shared/Chip';
21
+ import { businessSelector } from '../../../app/business/businessStore';
22
+ var LabelContainerStyled = styled(Box)(function (_a) {
23
+ var theme = _a.theme;
24
+ return ({
25
+ display: 'flex',
26
+ justifyContent: 'flex-start',
27
+ padding: theme.spacing(0, 2.5, 0.25, 2.5)
28
+ });
29
+ });
30
+ export var InputLabelStyled = styled(Text)(function (_a) {
31
+ var theme = _a.theme;
32
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
33
+ });
34
+ var ChipContainerStyled = styled(Box)(function (_a) {
35
+ var theme = _a.theme;
36
+ return ({
37
+ display: 'block',
38
+ padding: theme.spacing(0, 2.5, 1.25, 2.5)
39
+ });
40
+ });
41
+ var SalesChannel = function (_a) {
42
+ var _b, _c;
43
+ var t = useTranslation().t;
44
+ var data = useAppSelector(businessSelector).data;
45
+ var channels = ((_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.channel_services) || [];
46
+ return (_jsxs(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('sales_channels') }) }), _jsx(ChipContainerStyled, { children: channels.map(function (channel, index) { return (_jsx(Chip, { label: t("".concat(channel.code, "_label")), sx: { marginInlineEnd: index !== channels.length - 1 ? '8px' : '0px', marginTop: '8px' } }, index)); }) })] })));
47
+ };
48
+ export default React.memo(SalesChannel);
@@ -0,0 +1,3 @@
1
+ import BrandDetails, { BrandDetailsProps } from './BrandDetails';
2
+ export type { BrandDetailsProps };
3
+ export default BrandDetails;
@@ -0,0 +1,2 @@
1
+ import BrandDetails from './BrandDetails';
2
+ export default BrandDetails;
@@ -31,6 +31,7 @@ import SuccessWithFlowButtonsPage from './business/screens/SuccessWithFlowButton
31
31
  import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
32
32
  import BusCivilIDscreen from './business/screens/CivilID';
33
33
  import BusVerifyPACIScreen from './business/screens/VerifyPACI';
34
+ import BrandVerifyScreen from './business/screens/BrandDetails';
34
35
  import PasswordVerifyPage from './password/screens/Verify';
35
36
  import CreatePasswordPage from './password/screens/CreatePassword';
36
37
  import PasswordOTPPage from './password/screens/OTP';
@@ -203,7 +204,8 @@ export var businessFeatureScreens = [
203
204
  },
204
205
  { name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
205
206
  { name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
206
- { name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage }
207
+ { name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage },
208
+ { name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
207
209
  ];
208
210
  export var passwordFeatureScreens = [
209
211
  {
@@ -88,7 +88,7 @@ var UserList = function (_a) {
88
88
  var _l = data.individualCollectData, email = _l.email, mobile = _l.mobile, responseBody = _l.responseBody;
89
89
  var is_available = (responseBody || {}).is_available;
90
90
  var verify = data.verify;
91
- var _m = verify.responseBody || {}, userList = _m.userList, notification = _m.notification, flows = _m.flows;
91
+ var _m = verify.responseBody || {}, userList = _m.userList, notification = _m.notification;
92
92
  var methods = useForm({
93
93
  resolver: yupResolver(IndividualCollectInfoValidationSchema(activeUser)),
94
94
  defaultValues: {
@@ -160,15 +160,6 @@ var UserList = function (_a) {
160
160
  var _a;
161
161
  return (user === null || user === void 0 ? void 0 : user.id) === ((_a = notification === null || notification === void 0 ? void 0 : notification.recipient) === null || _a === void 0 ? void 0 : _a.id);
162
162
  };
163
- var isUserCompleted = function (user) {
164
- var _a;
165
- var status = (flows || []).find(function (_a) {
166
- var name = _a.name;
167
- return name === 'individual';
168
- });
169
- var isCompleted = ((_a = status === null || status === void 0 ? void 0 : status.object_status) === null || _a === void 0 ? void 0 : _a[user.id]) === 'completed';
170
- return isCompleted;
171
- };
172
163
  var isPhoneAndEmailAvailable = function (user) {
173
164
  var _a = (user === null || user === void 0 ? void 0 : user.contact) || { email: '' }, resEmail = _a.email, phone = _a.phone;
174
165
  return !!(isValidEmail(resEmail) && (phone === null || phone === void 0 ? void 0 : phone.country_code) && (phone === null || phone === void 0 ? void 0 : phone.number));
@@ -195,7 +186,6 @@ var UserList = function (_a) {
195
186
  return (_jsxs(Box, __assign({ sx: index !== usersMenuList.length - 1 ? { borderBottom: "1px solid ".concat(alpha(theme.palette.divider, 0.8)) } : {} }, { children: [_jsxs(TextBoxStyled, __assign({ sx: {
196
187
  cursor: emailChecking ? 'default' : 'pointer'
197
188
  }, onClick: !!anchorEl && isActiveUser(user) ? function () { return onCloseUserAction(); } : function (e) { return onClickUser(user, e); } }, { children: [_jsxs(TextStyled, { children: [_jsx("span", { children: getName(user) || '' }), _jsx(RoleTextStyled, { children: getUserRole(user) || '' })] }), (user === null || user === void 0 ? void 0 : user.isRequestedEmail) ? _jsx(CheckIcon, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl && isActiveUser(user) })] })), _jsx(Collapse, __assign({ in: !!anchorEl && isActiveUser(user), timeout: 300 }, { children: _jsx(IndividualActionButtons, { isAr: isAr, addDetails: {
198
- isCompleted: isUserCompleted(user),
199
189
  title: t('add_details'),
200
190
  onClick: onAddDetails,
201
191
  loading: isActiveUser(user) && loading && type === IndividualRequestType.ADD
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from '../../../components/Button';
3
+ import { SxProps, Theme } from '@mui/material/styles';
3
4
  export interface CustomButtonProps extends ButtonProps {
4
5
  isAr: boolean;
5
6
  loading?: boolean;
@@ -8,5 +9,6 @@ export interface CustomButtonProps extends ButtonProps {
8
9
  onBackClicked?: () => void;
9
10
  error?: string;
10
11
  hideError?: boolean;
12
+ sx?: SxProps<Theme>;
11
13
  }
12
- export default function CustomButton({ children, disabled, isAr, loading, disableBack, onBackClicked, error, hideError, disableNextIcon, ...props }: CustomButtonProps): JSX.Element;
14
+ export default function CustomButton({ children, disabled, isAr, loading, disableBack, onBackClicked, error, hideError, disableNextIcon, sx, ...props }: CustomButtonProps): JSX.Element;
@@ -84,7 +84,7 @@ var BackButtonStyled = styled(Button, { shouldForwardProp: function (prop) { ret
84
84
  });
85
85
  });
86
86
  export default function CustomButton(_a) {
87
- 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
+ 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, sx = _a.sx, props = __rest(_a, ["children", "disabled", "isAr", "loading", "disableBack", "onBackClicked", "error", "hideError", "disableNextIcon", "sx"]);
88
88
  var _b = React.useState(false), btnLoading = _b[0], setBtnLoading = _b[1];
89
89
  var isBackEnabled = !disableBack && !btnLoading;
90
90
  React.useEffect(function () {
@@ -107,5 +107,5 @@ export default function CustomButton(_a) {
107
107
  }, 500);
108
108
  };
109
109
  }, []);
110
- 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 ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!btnLoading })) }))] })] }));
110
+ return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, __assign({ sx: sx }, { 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 ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!btnLoading })) }))] }))] }));
111
111
  }
@@ -13,9 +13,7 @@ interface IndividualActionButtonsProps extends ButtonProps {
13
13
  show: boolean;
14
14
  children?: React.ReactNode;
15
15
  };
16
- addDetails: buttonProps & {
17
- isCompleted: boolean;
18
- };
16
+ addDetails: buttonProps;
19
17
  }
20
18
  export default function IndividualActionButtons({ isAr, requestEmail, addDetails }: IndividualActionButtonsProps): JSX.Element;
21
19
  export {};
@@ -81,29 +81,6 @@ var LoaderStyled = styled(Loader)(function (_a) {
81
81
  height: theme.spacing(3.75)
82
82
  });
83
83
  });
84
- var AddDetailsButtonStyled = styled(ButtonStyled, {
85
- shouldForwardProp: function (prop) { return prop !== 'isCompleted'; }
86
- })(function (_a) {
87
- var theme = _a.theme, isCompleted = _a.isCompleted;
88
- return (__assign({}, (isCompleted && {
89
- '&.MuiButton-outlined': {
90
- backgroundColor: theme.palette.common.white,
91
- border: "1px solid ".concat(theme.palette.success.main),
92
- color: theme.palette.success.main,
93
- '&:hover': {
94
- cursor: 'pointer',
95
- backgroundColor: theme.palette.success.main,
96
- color: theme.palette.common.white,
97
- img: {
98
- filter: 'brightness(0) invert(1)'
99
- },
100
- svg: {
101
- filter: 'brightness(0) invert(1)'
102
- }
103
- }
104
- }
105
- })));
106
- });
107
84
  var RequestEmailButtonStyled = styled(ButtonStyled, {
108
85
  shouldForwardProp: function (prop) { return prop !== 'isRequested' && prop !== 'disabled'; }
109
86
  })(function (_a) {
@@ -151,5 +128,5 @@ export default function IndividualActionButtons(_a) {
151
128
  var theme = useTheme();
152
129
  var isRequestedAndNotLoading = requestEmail.isRequested && !requestEmail.loading;
153
130
  var requestEmailLoaderColor = isRequestedAndNotLoading ? theme.palette.success.main : theme.palette.primary.main;
154
- return (_jsxs(ButtonBoxStyled, { children: [_jsxs(AddDetailsButtonStyled, __assign({ isCompleted: addDetails.isCompleted, isLoading: addDetails.loading, type: 'button', variant: 'outlined', onClick: addDetails.onClick, startIcon: _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(Image, { src: addDetails.isCompleted ? ICONS_NAMES.ADD_DETAIL_GREEN : ICONS_NAMES.ADD_DETAIL }) })), endIcon: _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(ArrowIconStyled, { isAr: isAr, src: addDetails.isCompleted ? ICONS_NAMES.GREEN_ARROW : ICONS_NAMES.BLUE_ARROW }) })) }, { children: [_jsx(Collapse, __assign({ in: addDetails.loading }, { children: _jsx(LoaderStyled, { innerColor: addDetails.isCompleted ? theme.palette.success.main : theme.palette.primary.main, outerColor: addDetails.isCompleted ? theme.palette.success.main : theme.palette.primary.main, size: 15, toggleAnimation: addDetails.loading }) })), _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(TextStyled, { children: t(addDetails.title) }) }))] })), requestEmail.show && (_jsxs(_Fragment, { children: [requestEmail.children, _jsxs(RequestEmailButtonStyled, __assign({ isRequested: requestEmail.isRequested, isLoading: requestEmail.loading, variant: 'outlined', disabled: requestEmail.disabled, type: 'button', onClick: requestEmail.onClick, startIcon: _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: _jsx(Image, { src: isRequestedAndNotLoading ? ICONS_NAMES.REQUEST_EMAIL_GREEN : ICONS_NAMES.REQUEST_EMAIL }) })), endIcon: _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: isRequestedAndNotLoading ? _jsx(CheckIconStyled, {}) : _jsx(ArrowIconStyled, { isAr: isAr, src: ICONS_NAMES.BLUE_ARROW }) })) }, { children: [_jsx(Collapse, __assign({ in: requestEmail.loading }, { children: _jsx(LoaderStyled, { innerColor: requestEmailLoaderColor, outerColor: requestEmailLoaderColor, size: 15, toggleAnimation: requestEmail.loading }) })), _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: _jsx(TextStyled, { children: t(requestEmail.title) }) }))] }))] }))] }));
131
+ return (_jsxs(ButtonBoxStyled, { children: [_jsxs(ButtonStyled, __assign({ isLoading: addDetails.loading, type: 'button', variant: 'outlined', onClick: addDetails.onClick, startIcon: _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(Image, { src: ICONS_NAMES.ADD_DETAIL }) })), endIcon: _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(ArrowIconStyled, { isAr: isAr, src: ICONS_NAMES.BLUE_ARROW }) })) }, { children: [_jsx(Collapse, __assign({ in: addDetails.loading }, { children: _jsx(LoaderStyled, { innerColor: theme.palette.primary.main, outerColor: theme.palette.primary.main, size: 15, toggleAnimation: addDetails.loading }) })), _jsx(Collapse, __assign({ in: !addDetails.loading }, { children: _jsx(TextStyled, { children: t(addDetails.title) }) }))] })), requestEmail.show && (_jsxs(_Fragment, { children: [requestEmail.children, _jsxs(RequestEmailButtonStyled, __assign({ isRequested: requestEmail.isRequested, isLoading: requestEmail.loading, variant: 'outlined', disabled: requestEmail.disabled, type: 'button', onClick: requestEmail.onClick, startIcon: _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: _jsx(Image, { src: isRequestedAndNotLoading ? ICONS_NAMES.REQUEST_EMAIL_GREEN : ICONS_NAMES.REQUEST_EMAIL }) })), endIcon: _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: isRequestedAndNotLoading ? _jsx(CheckIconStyled, {}) : _jsx(ArrowIconStyled, { isAr: isAr, src: ICONS_NAMES.BLUE_ARROW }) })) }, { children: [_jsx(Collapse, __assign({ in: requestEmail.loading }, { children: _jsx(LoaderStyled, { innerColor: requestEmailLoaderColor, outerColor: requestEmailLoaderColor, size: 15, toggleAnimation: requestEmail.loading }) })), _jsx(Collapse, __assign({ in: !requestEmail.loading }, { children: _jsx(TextStyled, { children: t(requestEmail.title) }) }))] }))] }))] }));
155
132
  }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ChipProps } from '@mui/material/Chip';
3
+ export default function CustomChip(props: ChipProps): JSX.Element;
@@ -0,0 +1,21 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { styled } from '@mui/material/styles';
14
+ import Chip from '@mui/material/Chip';
15
+ var ChipStyled = styled(Chip)(function (_a) {
16
+ var theme = _a.theme;
17
+ return (__assign(__assign({ borderRadius: theme.spacing(12.625), padding: theme.spacing(0.25, 0.5, 0.25, 0.5), background: theme.palette.common.white }, theme.typography.caption), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightRegular }));
18
+ });
19
+ export default function CustomChip(props) {
20
+ return _jsx(ChipStyled, __assign({}, props));
21
+ }
@@ -0,0 +1,2 @@
1
+ import Chip from './Chip';
2
+ export default Chip;
@@ -0,0 +1,2 @@
1
+ import Chip from './Chip';
2
+ export default Chip;
@@ -71,7 +71,6 @@ var SuccessFlowButtons = function (_a) {
71
71
  var mappedFlows = flows
72
72
  .filter(function (item) { return item === null || item === void 0 ? void 0 : item.name; })
73
73
  .map(function (_a) {
74
- var _b;
75
74
  var name = _a.name, url = _a.url, status = _a.status, token = _a.token;
76
75
  var type = status === 'completed' ? 'completed' : 'pending';
77
76
  var title = t("".concat(name, "_flow_").concat(type), {
@@ -83,14 +82,8 @@ var SuccessFlowButtons = function (_a) {
83
82
  iban: iban ? t('masking_symbols') + iban : '',
84
83
  tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
85
84
  });
86
- var individualStatus = ((_b = (flows || []).find(function (_a) {
87
- var name = _a.name;
88
- return name === 'individual';
89
- })) === null || _b === void 0 ? void 0 : _b.object_status) || {};
90
- var isIndividualAllCompleted = Object.keys(individualStatus).length === count;
91
- var isIndividualCompleted = is_authorized && count > 1 ? isIndividualAllCompleted : status === 'completed';
85
+ var isCompleted = status === 'completed' && name !== 'password';
92
86
  var isIndividual = name === 'individual';
93
- var isCompleted = isIndividual ? isIndividualCompleted : status === 'completed' && name !== 'password';
94
87
  var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
95
88
  var hoverSrc = "".concat(name, "_white_icon");
96
89
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.3.94-test",
3
+ "version": "2.3.96-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",