@tap-payments/auth-jsconnect 2.1.43-test → 2.1.45-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 (103) hide show
  1. package/build/@types/form.d.ts +8 -5
  2. package/build/api/account.d.ts +5 -0
  3. package/build/api/account.js +9 -1
  4. package/build/api/auth.d.ts +8 -4
  5. package/build/api/auth.js +18 -2
  6. package/build/api/index.d.ts +6 -2
  7. package/build/api/lead.d.ts +1 -0
  8. package/build/api/lead.js +10 -1
  9. package/build/assets/locales/ar.json +2 -0
  10. package/build/assets/locales/en.json +2 -0
  11. package/build/components/Lottie/Lottie.d.ts +320 -0
  12. package/build/components/Lottie/Lottie.js +3 -1
  13. package/build/components/Lottie/files/account_creating.json +732 -0
  14. package/build/constants/api.d.ts +3 -0
  15. package/build/constants/api.js +8 -2
  16. package/build/constants/app.d.ts +5 -2
  17. package/build/constants/app.js +60 -4
  18. package/build/features/app/auth/authStore.d.ts +3 -3
  19. package/build/features/app/business/businessStore.d.ts +1 -0
  20. package/build/features/app/connect/connectStore.d.ts +1 -0
  21. package/build/features/app/connect/connectStore.js +6 -5
  22. package/build/features/app/connectExpress/connectExpressStore.d.ts +61 -6
  23. package/build/features/app/connectExpress/connectExpressStore.js +614 -66
  24. package/build/features/connect/screens/Merchant/Merchant.js +11 -8
  25. package/build/features/connect/screens/Merchant/Segments.js +3 -3
  26. package/build/features/connect/screens/Merchant/TeamSize.js +2 -2
  27. package/build/features/connectExpress/ConnectExpress.js +1 -1
  28. package/build/features/connectExpress/screens/CivilID/CivilID.js +3 -3
  29. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +5 -0
  30. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +53 -0
  31. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.d.ts +7 -0
  32. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +55 -0
  33. package/build/features/connectExpress/screens/CivilIDMissed/index.d.ts +3 -0
  34. package/build/features/connectExpress/screens/CivilIDMissed/index.js +2 -0
  35. package/build/features/connectExpress/screens/CivilIDMissed/validation.d.ts +8 -0
  36. package/build/features/connectExpress/screens/CivilIDMissed/validation.js +4 -0
  37. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +8 -0
  38. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +142 -0
  39. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
  40. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +77 -0
  41. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +8 -0
  42. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +144 -0
  43. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +7 -0
  44. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +52 -0
  45. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +34 -0
  46. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +94 -0
  47. package/build/features/connectExpress/screens/CollectBusinessInfo/index.d.ts +3 -0
  48. package/build/features/connectExpress/screens/CollectBusinessInfo/index.js +2 -0
  49. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +27 -0
  50. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +79 -0
  51. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +5 -0
  52. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +89 -0
  53. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +8 -0
  54. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +113 -0
  55. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +10 -0
  56. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +149 -0
  57. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +6 -0
  58. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +45 -0
  59. package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
  60. package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
  61. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
  62. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
  63. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
  64. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +61 -0
  65. package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
  66. package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
  67. package/build/features/connectExpress/screens/IdentityOTP/OTP.d.ts +5 -0
  68. package/build/features/connectExpress/screens/IdentityOTP/OTP.js +87 -0
  69. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +5 -0
  70. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +52 -0
  71. package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +3 -0
  72. package/build/features/connectExpress/screens/IdentityOTP/index.js +2 -0
  73. package/build/features/connectExpress/screens/IdentityOTP/validation.d.ts +8 -0
  74. package/build/features/connectExpress/screens/IdentityOTP/validation.js +4 -0
  75. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +5 -0
  76. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +34 -0
  77. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.d.ts +3 -0
  78. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.js +2 -0
  79. package/build/features/connectExpress/screens/Mobile/Mobile.js +0 -3
  80. package/build/features/connectExpress/screens/NID/NID.js +7 -6
  81. package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +6 -0
  82. package/build/features/connectExpress/screens/NIDMissed/DOB.js +47 -0
  83. package/build/features/connectExpress/screens/NIDMissed/IDNumber.d.ts +6 -0
  84. package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +60 -0
  85. package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
  86. package/build/features/connectExpress/screens/NIDMissed/NID.js +59 -0
  87. package/build/features/connectExpress/screens/NIDMissed/index.d.ts +3 -0
  88. package/build/features/connectExpress/screens/NIDMissed/index.js +2 -0
  89. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +11 -0
  90. package/build/features/connectExpress/screens/NIDMissed/validation.js +9 -0
  91. package/build/features/connectExpress/screens/OTP/OTP.js +10 -6
  92. package/build/features/connectExpress/screens/OTP/OTPInput.js +7 -6
  93. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  94. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +119 -0
  95. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  96. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.js +2 -0
  97. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +7 -68
  98. package/build/features/featuresScreens.js +40 -0
  99. package/build/features/shared/FlowButtons/FlowButtons.d.ts +4 -0
  100. package/build/features/shared/FlowButtons/FlowButtons.js +6 -0
  101. package/build/features/shared/FlowButtons/index.d.ts +2 -0
  102. package/build/features/shared/FlowButtons/index.js +2 -0
  103. package/package.json +1 -1
@@ -33,11 +33,11 @@ var ListType;
33
33
  (function (ListType) {
34
34
  ListType["SegmentsList"] = "SegmentsList";
35
35
  ListType["TeamSizeList"] = "TeamSizeList";
36
+ ListType["BrandList"] = "BrandList";
36
37
  })(ListType || (ListType = {}));
37
38
  var Merchant = function (_a) {
38
- var _b;
39
- var _c = React.useState(false), brandNameChecking = _c[0], setBrandNameChecking = _c[1];
40
- var _d = React.useState(false), isBrandListOpen = _d[0], setIsBrandListOpen = _d[1];
39
+ var _b, _c;
40
+ var _d = React.useState(false), brandNameChecking = _d[0], setBrandNameChecking = _d[1];
41
41
  var _e = React.useState(false), isRequiredNewBrand = _e[0], setIsRequiredNewBrand = _e[1];
42
42
  var _f = useAppSelector(connectSelector), data = _f.data, loading = _f.loading, error = _f.error;
43
43
  var _g = data.brandData, brandName = _g.brandName, selectedBrandItem = _g.selectedBrandItem, termAndConditionChecked = _g.termAndConditionChecked, responseBody = _g.responseBody, salesChannels = _g.salesChannels, segment = _g.segment, teamSize = _g.teamSize;
@@ -46,7 +46,7 @@ var Merchant = function (_a) {
46
46
  var methods = useForm({
47
47
  resolver: yupResolver(MerchantValidationSchema(isRequiredNewBrand)),
48
48
  defaultValues: {
49
- brandName: brandName,
49
+ brandName: brandName || ((_b = selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.name) === null || _b === void 0 ? void 0 : _b.en),
50
50
  selectedBrandItem: selectedBrandItem,
51
51
  termAndConditionChecked: termAndConditionChecked,
52
52
  salesChannels: salesChannels,
@@ -68,7 +68,9 @@ var Merchant = function (_a) {
68
68
  React.useEffect(function () {
69
69
  methods.setValue('segment', segment);
70
70
  methods.setValue('teamSize', teamSize);
71
- }, [segment, teamSize]);
71
+ if (brandName)
72
+ methods.trigger('brandName');
73
+ }, [segment, teamSize, brandName]);
72
74
  React.useEffect(function () {
73
75
  if (error)
74
76
  dispatch(clearError());
@@ -81,8 +83,8 @@ var Merchant = function (_a) {
81
83
  if (termAndConditionChecked === true)
82
84
  methods.setValue('termAndConditionChecked', termAndConditionChecked);
83
85
  }, [termAndConditionChecked]);
84
- var brandErrChecks = !!Object.entries(methods.formState.errors).length || !methods.formState.isValid || !!error;
85
- var disabled = brandErrChecks || brandNameChecking || ((_b = data.brandData.responseBody) === null || _b === void 0 ? void 0 : _b.response_code) === '5';
86
+ var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName || !!error;
87
+ var disabled = brandErrChecks || brandNameChecking || ((_c = data.brandData.responseBody) === null || _c === void 0 ? void 0 : _c.response_code) === '5';
86
88
  var hasBrandList = (brandList === null || brandList === void 0 ? void 0 : brandList.length) > 0;
87
89
  var isOtherBrand = (brandListItem === null || brandListItem === void 0 ? void 0 : brandListItem.id) === 'other' && hasBrandList;
88
90
  var isNewBrand = (brandList === null || brandList === void 0 ? void 0 : brandList.length) === 0 || BrandList === undefined;
@@ -94,6 +96,7 @@ var Merchant = function (_a) {
94
96
  };
95
97
  var isSegmentsListActive = listActive === ListType.SegmentsList;
96
98
  var isTeamSizeListActive = listActive === ListType.TeamSizeList;
97
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { show: !(isOtherBrand || isNewBrand), list: brandList, onListOpen: function () { return setIsBrandListOpen(true); }, onListClose: function () { return setIsBrandListOpen(false); } }), _jsx(BrandName, { show: (isNewBrand || isOtherBrand) && !isBrandListOpen, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(Segments, { show: !isTeamSizeListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(TeamSize, { show: !isSegmentsListActive, onListOpen: function () { return handleMenuClick(ListType.TeamSizeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !isBrandListOpen }, { children: _jsx(SalesChannels, {}) })), _jsx(TAC, { show: (isNewBrand || isOtherBrand) && !isBrandListOpen }), _jsx(Collapse, __assign({ in: !isBrandListOpen, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') })) }))] })) })) }));
99
+ var isBrandListActive = listActive === ListType.BrandList;
100
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { show: !(isOtherBrand || isNewBrand) && !isTeamSizeListActive && !isSegmentsListActive, list: brandList, onListOpen: function () { return handleMenuClick(ListType.BrandList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(BrandName, { show: (isNewBrand || isOtherBrand) && !listActive, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(Segments, { show: !isTeamSizeListActive && !isBrandListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(TeamSize, { show: !isSegmentsListActive && !isBrandListActive, onListOpen: function () { return handleMenuClick(ListType.TeamSizeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(SalesChannels, {}) })), _jsx(TAC, { show: (isNewBrand || isOtherBrand) && !listActive }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') })) }))] })) })) }));
98
101
  };
99
102
  export default React.memo(Merchant);
@@ -20,7 +20,7 @@ import { useTranslation } from 'react-i18next';
20
20
  import { useController, useFormContext } from 'react-hook-form';
21
21
  import SimpleList from '../../../../components/SimpleList';
22
22
  import ExpandIcon from '../../../../components/ExpandIcon';
23
- import Container from '@mui/material/Container';
23
+ import Box from '@mui/material/Box';
24
24
  import { styled } from '@mui/material/styles';
25
25
  import Text from '../../../../components/Text';
26
26
  import CheckIcon from '@mui/icons-material/Check';
@@ -66,9 +66,9 @@ var Segments = function (_a) {
66
66
  onCloseList();
67
67
  segmentControl.field.onChange(segment);
68
68
  };
69
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(Input, { required: true, label: t('segment_title'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en', 'name.ar'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
69
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(Input, { required: true, label: t('segment_title'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
70
70
  var _a, _b;
71
- return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) }), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIconStyled, {})] }));
71
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIconStyled, {})] }));
72
72
  } }) }))] })) })));
73
73
  };
74
74
  export default Segments;
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { connectSelector } from '../../../app/connect/connectStore';
14
+ import Box from '@mui/material/Box';
14
15
  import Collapse from '../../../../components/Collapse';
15
16
  import { ScreenContainer } from '../../../../features/shared/Containers';
16
17
  import Input from '../../../../features/shared/Input';
@@ -20,7 +21,6 @@ import { useTranslation } from 'react-i18next';
20
21
  import { useController, useFormContext } from 'react-hook-form';
21
22
  import SimpleList from '../../../../components/SimpleList';
22
23
  import ExpandIcon from '../../../../components/ExpandIcon';
23
- import Container from '@mui/material/Container';
24
24
  import { styled } from '@mui/material/styles';
25
25
  import Text from '../../../../components/Text';
26
26
  import CheckIcon from '@mui/icons-material/Check';
@@ -68,7 +68,7 @@ var TeamSize = function (_a) {
68
68
  };
69
69
  return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(Input, { required: true, label: t('team_size_title'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_team_size'), value: (isAr ? (_d = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en', 'name.ar'], list: teamSizeList, onSelectItem: onSelectItem, renderItem: function (item) {
70
70
  var _a, _b;
71
- return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) }), item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) && _jsx(CheckIconStyled, {})] }));
71
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) && _jsx(CheckIconStyled, {})] }));
72
72
  } }) }))] })) })));
73
73
  };
74
74
  export default TeamSize;
@@ -90,7 +90,7 @@ var ConnectExpress = memo(function (_a) {
90
90
  return [2];
91
91
  dispatch(setIsLeadIdPassed(true));
92
92
  dispatch(setLeadId(leadId));
93
- return [4, API.leadService.getLeadById(leadId)];
93
+ return [4, API.leadService.retrieveLeadIdentity(leadId)];
94
94
  case 1:
95
95
  leadData = _a.sent();
96
96
  dispatch(setResponseData({ leadData: leadData }));
@@ -18,7 +18,7 @@ import { yupResolver } from '@hookform/resolvers/yup';
18
18
  import { civilIDValidationSchema } from './validation';
19
19
  import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
20
20
  import { handlePrevScreenStep } from '../../../../app/settings';
21
- import { clearError, connectExpressSelector, createCivilAuthAsync, resetStore } from '../../../app/connectExpress/connectExpressStore';
21
+ import { clearError, connectExpressSelector, createCivilIdAuthAsync, resetStore } from '../../../app/connectExpress/connectExpressStore';
22
22
  import Form from '../../../../components/Form';
23
23
  import Button, { MobileButton } from '../../../shared/Button';
24
24
  import { ScreenContainer } from '../../../shared/Containers';
@@ -73,10 +73,10 @@ var CivilID = function (_a) {
73
73
  dispatch(resetStore());
74
74
  }, []);
75
75
  var onSubmit = function (data) {
76
- dispatch(createCivilAuthAsync(data));
76
+ dispatch(createCivilIdAuthAsync(data));
77
77
  };
78
78
  var onBack = function () {
79
- dispatch(handlePrevScreenStep('CONNECT_EXPRESS_MOBILE_STEP'));
79
+ dispatch(handlePrevScreenStep());
80
80
  };
81
81
  var disabled = !methods.formState.isValid || !!error;
82
82
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(IDNumber, { sx: { mb: methods.formState.isValid ? 7.5 : 0, transition: 'mb 0.3s' } }), _jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading }, { children: t('mobile_button_label') }))] }))] })) })) }));
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface CivilIDProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: CivilIDProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,53 @@
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 { styled } from '@mui/material/styles';
16
+ import { useForm, FormProvider } from 'react-hook-form';
17
+ import { yupResolver } from '@hookform/resolvers/yup';
18
+ import { civilIDValidationSchema } from './validation';
19
+ import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
20
+ import { handlePrevScreenStep } from '../../../../app/settings';
21
+ import { clearError, connectExpressSelector, createCivilIDAuthIdentityAsync } from '../../../app/connectExpress/connectExpressStore';
22
+ import Form from '../../../../components/Form';
23
+ import Button from '../../../shared/Button';
24
+ import { ScreenContainer } from '../../../shared/Containers';
25
+ import IDNumber from './IDNumber';
26
+ var FormStyled = styled(Form)(function () { return ({
27
+ display: 'flex',
28
+ flexDirection: 'column'
29
+ }); });
30
+ var CivilID = function (_a) {
31
+ var isAr = useLanguage().isAr;
32
+ var dispatch = useAppDispatch();
33
+ var t = useTranslation().t;
34
+ var _b = useAppSelector(connectExpressSelector), data = _b.data, loading = _b.loading, error = _b.error;
35
+ var methods = useForm({
36
+ resolver: yupResolver(civilIDValidationSchema),
37
+ defaultValues: data.civilIdData,
38
+ mode: 'onChange'
39
+ });
40
+ React.useEffect(function () {
41
+ if (error)
42
+ dispatch(clearError());
43
+ }, [methods.formState.isValid]);
44
+ var onSubmit = function (data) {
45
+ dispatch(createCivilIDAuthIdentityAsync(data));
46
+ };
47
+ var onBack = function () {
48
+ dispatch(handlePrevScreenStep());
49
+ };
50
+ var disabled = !methods.formState.isValid || !!error;
51
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(IDNumber, { sx: { mb: methods.formState.isValid ? 7.5 : 0, transition: 'mb 0.3s' } }), _jsx(Button, __assign({ loading: loading, isAr: isAr, onBackClicked: onBack, disabled: disabled, error: t(error || '') }, { children: t('next') }))] })) })) }));
52
+ };
53
+ export default React.memo(CivilID);
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { SxProps, Theme } from '@mui/material/styles';
3
+ interface IDNumberProps {
4
+ sx: SxProps<Theme> | undefined;
5
+ }
6
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IDNumberProps & React.RefAttributes<unknown>>>;
7
+ export default _default;
@@ -0,0 +1,55 @@
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 Box from '@mui/material/Box';
15
+ import { useTranslation } from 'react-i18next';
16
+ import { useController, useFormContext } from 'react-hook-form';
17
+ import { styled, alpha } from '@mui/material/styles';
18
+ import Text from '../../../../components/Text';
19
+ import Input from '../../../shared/Input';
20
+ import ClearIcon from '../../../shared/ClearIcon';
21
+ import CheckIcon from '../../../shared/CheckIcon';
22
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
+ import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
24
+ import { CIVIL_ID_NUMBER_LENGTH } from '../../../../constants';
25
+ var LabelContainerStyled = styled(Box)(function (_a) {
26
+ var theme = _a.theme;
27
+ return ({
28
+ display: 'flex',
29
+ justifyContent: 'space-between',
30
+ padding: theme.spacing(0, 2.5, 1.25, 2.5)
31
+ });
32
+ });
33
+ var InputLabelStyled = styled(Text)(function (_a) {
34
+ var theme = _a.theme;
35
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
36
+ });
37
+ var IDNumber = React.forwardRef(function (_a, ref) {
38
+ var _b;
39
+ var sx = _a.sx;
40
+ var t = useTranslation().t;
41
+ var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
42
+ var civilIdControl = useController({ control: control, name: 'civilId' });
43
+ var handleIdChange = function (_a) {
44
+ var target = _a.target;
45
+ var value = removeAllOtherThanCharsAndNumber(target.value);
46
+ civilIdControl.field.onChange(value);
47
+ };
48
+ var clearIdNumber = function () {
49
+ civilIdControl.field.onChange('');
50
+ };
51
+ var idValue = civilIdControl.field.value;
52
+ var error = (_b = civilIdControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
53
+ return (_jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_civil_id') }) }), _jsx(Input, { dir: 'ltr', type: 'text', inputProps: { maxLength: CIVIL_ID_NUMBER_LENGTH }, onChange: handleIdChange, value: idValue, endAdornment: !error && idValue ? _jsx(CheckIcon, {}) : idValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: t('civil_id_placeholder'), warningType: 'alert', warningMessage: error && t(error), required: true })] })));
54
+ });
55
+ export default React.memo(IDNumber);
@@ -0,0 +1,3 @@
1
+ import CivilID, { CivilIDProps } from './CivilID';
2
+ export type { CivilIDProps };
3
+ export default CivilID;
@@ -0,0 +1,2 @@
1
+ import CivilID from './CivilID';
2
+ export default CivilID;
@@ -0,0 +1,8 @@
1
+ import * as yup from 'yup';
2
+ export declare const civilIDValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ civilId: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
5
+ civilId: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
+ civilId: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
+ }>>>;
@@ -0,0 +1,4 @@
1
+ import * as yup from 'yup';
2
+ export var civilIDValidationSchema = yup.object().shape({
3
+ civilId: yup.string().matches(/^\d+$/, 'invalid_civil_id').min(12, 'invalid_civil_id').required('invalid_civil_id')
4
+ });
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface BrandNameProps {
3
+ show: boolean;
4
+ fetchingBrandName: (flag: boolean) => void;
5
+ brandNameChecking: boolean;
6
+ }
7
+ declare const _default: React.MemoExoticComponent<({ show, brandNameChecking, fetchingBrandName }: BrandNameProps) => JSX.Element>;
8
+ export default _default;
@@ -0,0 +1,142 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
+ import * as React from 'react';
50
+ import { useTranslation } from 'react-i18next';
51
+ import { useController, useFormContext } from 'react-hook-form';
52
+ import { debounce } from 'lodash-es';
53
+ import axios from 'axios';
54
+ import Box from '@mui/material/Box';
55
+ import { styled, alpha } from '@mui/material/styles';
56
+ import InfoIcon from '@mui/icons-material/Info';
57
+ import CircularProgress from '@mui/material/CircularProgress';
58
+ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
59
+ import { ScreenContainer } from '../../../shared/Containers';
60
+ import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
61
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
62
+ import Text from '../../../../components/Text';
63
+ import Tooltip from '../../../../components/Tooltip';
64
+ import Collapse from '../../../../components/Collapse';
65
+ import Input from '../../../shared/Input';
66
+ import ClearIcon from '../../../shared/ClearIcon';
67
+ import CheckIcon from '../../../shared/CheckIcon';
68
+ import { checkBrandNameAvailabilityAsync, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
69
+ var LabelContainerStyled = styled(Box)(function (_a) {
70
+ var theme = _a.theme;
71
+ return ({
72
+ display: 'flex',
73
+ justifyContent: 'space-between',
74
+ padding: theme.spacing(0, 2.5, 1, 2.5)
75
+ });
76
+ });
77
+ var InputLabelStyled = styled(Text)(function (_a) {
78
+ var theme = _a.theme;
79
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
80
+ });
81
+ var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
82
+ var theme = _a.theme;
83
+ return ({
84
+ width: theme.spacing(2.75),
85
+ height: theme.spacing(2.125),
86
+ cursor: 'pointer',
87
+ color: alpha(theme.palette.text.primary, 0.4)
88
+ });
89
+ });
90
+ var InfoIconStyled = styled(InfoIcon)(function (_a) {
91
+ var theme = _a.theme;
92
+ return ({
93
+ width: theme.spacing(2.75),
94
+ height: theme.spacing(2.125),
95
+ cursor: 'pointer',
96
+ color: alpha(theme.palette.text.primary, 0.4)
97
+ });
98
+ });
99
+ var cancelToken = null;
100
+ var BrandName = function (_a) {
101
+ var _b;
102
+ var show = _a.show, brandNameChecking = _a.brandNameChecking, fetchingBrandName = _a.fetchingBrandName;
103
+ var dispatch = useAppDispatch();
104
+ var _c = React.useState(false), isHovered = _c[0], setIsHovered = _c[1];
105
+ var t = useTranslation().t;
106
+ var data = useAppSelector(connectExpressSelector).data;
107
+ var control = useFormContext().control;
108
+ var brandControl = useController({ control: control, name: 'brandName' });
109
+ var brandNameValue = brandControl.field.value;
110
+ var error = (_b = brandControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
111
+ var checkBrand = debounce(function (value) { return __awaiter(void 0, void 0, void 0, function () {
112
+ var onSuccess;
113
+ return __generator(this, function (_a) {
114
+ if (cancelToken) {
115
+ cancelToken.cancel('Aborted');
116
+ }
117
+ cancelToken = axios.CancelToken.source();
118
+ onSuccess = function () { return fetchingBrandName(false); };
119
+ dispatch(checkBrandNameAvailabilityAsync({ name: value, cancelToken: cancelToken.token, onSuccess: onSuccess }));
120
+ return [2];
121
+ });
122
+ }); }, 500);
123
+ var handleBrandNameChange = function (_a) {
124
+ var target = _a.target;
125
+ var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
126
+ brandControl.field.onChange(value);
127
+ };
128
+ React.useEffect(function () {
129
+ var _a, _b, _c, _d;
130
+ var isValid = brandNameValue && !error && brandNameValue.length > 2;
131
+ var brand = (_d = (_c = (_b = (_a = data.responseData) === null || _a === void 0 ? void 0 : _a.leadData) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.name) === null || _d === void 0 ? void 0 : _d.en;
132
+ if (isValid && (brandNameValue === null || brandNameValue === void 0 ? void 0 : brandNameValue.toLowerCase()) != brand) {
133
+ fetchingBrandName(true);
134
+ checkBrand(brandNameValue);
135
+ }
136
+ }, [brandNameValue, error]);
137
+ var clearBrandName = function () {
138
+ brandControl.field.onChange('');
139
+ };
140
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 2.5 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue || '', placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: brandNameChecking ? (_jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } })) : !error && brandNameValue ? (_jsx(CheckIcon, {})) : (brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName })) })] })) })));
141
+ };
142
+ export default React.memo(BrandName);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface CollectBusinessInfoProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: CollectBusinessInfoProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,77 @@
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 { useForm, FormProvider } from 'react-hook-form';
15
+ import { useTranslation } from 'react-i18next';
16
+ import { yupResolver } from '@hookform/resolvers/yup';
17
+ import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage } from '../../../../hooks';
18
+ import { isSA } from '../../../../utils';
19
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
20
+ import Form from '../../../../components/Form';
21
+ import Collapse from '../../../../components/Collapse';
22
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
+ import { connectExpressSelector, clearError, updateLeadBusinessDataAsync } from '../../../app/connectExpress/connectExpressStore';
24
+ import Button from '../../../shared/Button';
25
+ import { KWBusinessDataSchema, BusinessDataSchema } from './validation';
26
+ import LicenseList from './LicenseList';
27
+ import BrandName from './BrandName';
28
+ var CollectBusinessInfo = function (_a) {
29
+ var _b = useAppSelector(connectExpressSelector), data = _b.data, loading = _b.loading, error = _b.error;
30
+ var settingsData = useAppSelector(settingsSelector).data;
31
+ var responseData = data.responseData, businessData = data.businessData;
32
+ var isBrandNameAvailable = (responseData || {}).isBrandNameAvailable;
33
+ var selectedLicense = businessData.selectedLicense, licenseNumber = businessData.licenseNumber, brandName = businessData.brandName;
34
+ var t = useTranslation().t;
35
+ var isAr = useLanguage().isAr;
36
+ var dispatch = useAppDispatch();
37
+ var _c = React.useState(false), listActive = _c[0], setListActive = _c[1];
38
+ var _d = React.useState(false), brandNameChecking = _d[0], setBrandNameChecking = _d[1];
39
+ var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
40
+ var methods = useForm({
41
+ resolver: yupResolver(!isSACountry ? KWBusinessDataSchema : BusinessDataSchema),
42
+ defaultValues: {
43
+ brandName: brandName,
44
+ selectedLicense: selectedLicense,
45
+ licenseNumber: licenseNumber
46
+ },
47
+ mode: 'onChange'
48
+ });
49
+ useSetFromDefaultValues(methods, data.businessData);
50
+ React.useEffect(function () {
51
+ if (error)
52
+ dispatch(clearError());
53
+ }, [methods.formState.isValid]);
54
+ React.useEffect(function () {
55
+ if (isBrandNameAvailable == false)
56
+ methods.setError('brandName', { message: 'brand_name_already_exist' });
57
+ }, [responseData]);
58
+ var onSubmit = function (data) {
59
+ var dataValues = {
60
+ brandName: data.brandName,
61
+ selectedLicense: data.selectedLicense,
62
+ licenseNumber: data.licenseNumber
63
+ };
64
+ dispatch(updateLeadBusinessDataAsync(dataValues));
65
+ };
66
+ var onBack = function () {
67
+ dispatch(handlePrevScreenStep());
68
+ };
69
+ var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName || !!error;
70
+ var disabled = brandErrChecks || brandNameChecking || isBrandNameAvailable == false;
71
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandName, { show: true, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(LicenseList, { onListOpen: function () {
72
+ setListActive(true);
73
+ }, onListClose: function () {
74
+ setListActive(false);
75
+ } }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
76
+ };
77
+ export default React.memo(CollectBusinessInfo);
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface LicenseListProps {
3
+ onSelectLicense?: (number: string) => void;
4
+ onListOpen?: () => void;
5
+ onListClose?: () => void;
6
+ }
7
+ declare const _default: React.MemoExoticComponent<({ ...rest }: LicenseListProps) => JSX.Element>;
8
+ export default _default;