@tap-payments/auth-jsconnect 2.0.45 → 2.0.46

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 (203) hide show
  1. package/build/@types/app.d.ts +47 -2
  2. package/build/@types/app.js +22 -0
  3. package/build/@types/form.d.ts +19 -1
  4. package/build/@types/index.d.ts +1 -0
  5. package/build/@types/index.js +1 -0
  6. package/build/@types/user.d.ts +141 -0
  7. package/build/@types/user.js +1 -0
  8. package/build/api/board.d.ts +16 -0
  9. package/build/api/board.js +10 -1
  10. package/build/api/country.d.ts +4 -0
  11. package/build/api/country.js +9 -1
  12. package/build/api/entity.d.ts +3 -3
  13. package/build/api/index.d.ts +8 -3
  14. package/build/api/individual.d.ts +54 -4
  15. package/build/api/individual.js +9 -1
  16. package/build/api/user.d.ts +6 -0
  17. package/build/api/user.js +9 -1
  18. package/build/app/settings.js +11 -8
  19. package/build/assets/locales/ar.json +28 -2
  20. package/build/assets/locales/en.json +28 -1
  21. package/build/components/SimpleList/SimpleList.d.ts +2 -0
  22. package/build/constants/api.d.ts +1 -0
  23. package/build/constants/api.js +3 -1
  24. package/build/constants/app.d.ts +1 -0
  25. package/build/constants/app.js +20 -7
  26. package/build/constants/assets.d.ts +4 -0
  27. package/build/constants/assets.js +4 -0
  28. package/build/features/app/bank/bankStore.d.ts +1 -0
  29. package/build/features/app/bank/bankStore.js +19 -13
  30. package/build/features/app/brand/brandStore.d.ts +2 -0
  31. package/build/features/app/brand/brandStore.js +69 -49
  32. package/build/features/app/business/businessStore.js +3 -3
  33. package/build/features/app/connect/connectStore.js +6 -6
  34. package/build/features/app/connectExpress/connectExpressStore.js +15 -9
  35. package/build/features/app/entity/entityStore.d.ts +2 -0
  36. package/build/features/app/entity/entityStore.js +5 -3
  37. package/build/features/app/individual/individualStore.d.ts +93 -4
  38. package/build/features/app/individual/individualStore.js +613 -129
  39. package/build/features/app/password/passwordStore.js +2 -2
  40. package/build/features/app/tax/taxStore.js +30 -29
  41. package/build/features/bank/Bank.js +2 -2
  42. package/build/features/bank/screens/BankDetails/BankDetails.js +8 -7
  43. package/build/features/bank/screens/BankDetails/BankName.js +13 -10
  44. package/build/features/bank/screens/BankDetails/BankStatement.js +8 -2
  45. package/build/features/bank/screens/BankDetails/Beneficiary.js +12 -13
  46. package/build/features/bank/screens/BankDetails/IBAN.js +14 -10
  47. package/build/features/bank/screens/BankDetails/validation.d.ts +14 -14
  48. package/build/features/bank/screens/BankDetails/validation.js +34 -15
  49. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  50. package/build/features/brand/Brand.js +2 -2
  51. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +3 -3
  52. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +8 -6
  53. package/build/features/brand/screens/BrandActivities/BrandActivities.js +12 -2
  54. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +2 -2
  55. package/build/features/brand/screens/BrandActivities/CustomerBase.js +9 -6
  56. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +10 -7
  57. package/build/features/brand/screens/BrandActivities/validation.d.ts +7 -7
  58. package/build/features/brand/screens/BrandActivities/validation.js +26 -15
  59. package/build/features/brand/screens/BrandInfo/BrandInfo.js +11 -4
  60. package/build/features/brand/screens/BrandInfo/BrandName.js +13 -12
  61. package/build/features/brand/screens/BrandInfo/SalesChannels.js +21 -9
  62. package/build/features/brand/screens/BrandInfo/validation.d.ts +7 -7
  63. package/build/features/brand/screens/BrandInfo/validation.js +46 -36
  64. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  65. package/build/features/business/Business.js +2 -2
  66. package/build/features/business/screens/Activities/ActivitiesList.d.ts +3 -3
  67. package/build/features/business/screens/BusinessType/LicenseCertificate.js +2 -1
  68. package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
  69. package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
  70. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  71. package/build/features/connect/Connect.js +2 -2
  72. package/build/features/connect/screens/Merchant/BrandList.js +4 -4
  73. package/build/features/connect/screens/Merchant/BrandName.js +6 -5
  74. package/build/features/connect/screens/Merchant/validation.js +2 -2
  75. package/build/features/connectExpress/ConnectExpress.js +2 -2
  76. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +1 -3
  77. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
  78. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +5 -5
  79. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +23 -3
  80. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -3
  81. package/build/features/entity/Entity.js +2 -2
  82. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +3 -3
  83. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +3 -3
  84. package/build/features/entity/screens/EntityName/LicenseCertificate.js +9 -3
  85. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  86. package/build/features/featuresScreens.js +10 -0
  87. package/build/features/individual/Individual.js +2 -2
  88. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +13 -0
  89. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +48 -25
  90. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +6 -1
  91. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +9 -2
  92. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +11 -17
  93. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +12 -16
  94. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
  95. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +9 -2
  96. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +6 -0
  97. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +35 -0
  98. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +6 -0
  99. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +41 -0
  100. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +8 -2
  101. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -6
  102. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +25 -23
  103. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +19 -25
  104. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +10 -0
  105. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +31 -0
  106. package/build/features/individual/screens/IndividualList/Email.d.ts +6 -0
  107. package/build/features/individual/screens/IndividualList/Email.js +48 -0
  108. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
  109. package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
  110. package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
  111. package/build/features/individual/screens/IndividualList/MobileNumber.js +143 -0
  112. package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
  113. package/build/features/individual/screens/IndividualList/UserList.js +186 -0
  114. package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
  115. package/build/features/individual/screens/IndividualList/index.js +2 -0
  116. package/build/features/individual/screens/IndividualList/validation.d.ts +12 -0
  117. package/build/features/individual/screens/IndividualList/validation.js +39 -0
  118. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +8 -0
  119. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +109 -0
  120. package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.d.ts → IndividualPersonalInfo/BirthCountry.d.ts} +2 -2
  121. package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/BirthCountry.js} +14 -24
  122. package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +7 -0
  123. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
  124. package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +6 -0
  125. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +50 -0
  126. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +7 -0
  127. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +50 -0
  128. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +34 -0
  129. package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +81 -0
  130. package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +6 -0
  131. package/build/features/individual/screens/IndividualPersonalInfo/ID.js +48 -0
  132. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
  133. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +139 -0
  134. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +10 -0
  135. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +88 -0
  136. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +10 -0
  137. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +145 -0
  138. package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +6 -0
  139. package/build/features/individual/screens/IndividualPersonalInfo/Name.js +52 -0
  140. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +10 -0
  141. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +88 -0
  142. package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
  143. package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
  144. package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
  145. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
  146. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  147. package/build/features/individual/screens/Verify/Verify.js +10 -17
  148. package/build/features/password/Password.js +2 -2
  149. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  150. package/build/features/shared/Address/Address.d.ts +6 -1
  151. package/build/features/shared/Address/Address.js +40 -30
  152. package/build/features/shared/Address/CountryList.d.ts +1 -1
  153. package/build/features/shared/Address/InputSelect.d.ts +1 -1
  154. package/build/features/shared/Address/InputText.d.ts +2 -1
  155. package/build/features/shared/Address/InputText.js +2 -2
  156. package/build/features/shared/Button/Button.js +11 -0
  157. package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
  158. package/build/features/shared/Button/FlowsButtons.js +5 -5
  159. package/build/features/shared/Button/ListButton.d.ts +18 -0
  160. package/build/features/shared/Button/ListButton.js +125 -0
  161. package/build/features/shared/Button/index.d.ts +2 -1
  162. package/build/features/shared/Button/index.js +2 -1
  163. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +2 -1
  164. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +2 -2
  165. package/build/features/shared/SalesChannels/SalesChannel.d.ts +2 -1
  166. package/build/features/shared/SalesChannels/SalesChannel.js +2 -2
  167. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -1
  168. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +8 -6
  169. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +6 -1
  170. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +33 -11
  171. package/build/features/signIn/SignIn.js +2 -2
  172. package/build/features/tax/Tax.js +2 -2
  173. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  174. package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -1
  175. package/build/features/tax/screens/TaxDetails/TaxDocument.js +8 -2
  176. package/build/features/tax/screens/TaxDetails/VATId.js +8 -3
  177. package/build/features/tax/screens/TaxDetails/validation.d.ts +4 -4
  178. package/build/features/tax/screens/TaxDetails/validation.js +10 -5
  179. package/build/utils/array.d.ts +1 -0
  180. package/build/utils/array.js +10 -2
  181. package/build/utils/common.d.ts +1 -0
  182. package/build/utils/common.js +6 -0
  183. package/build/utils/date.d.ts +1 -0
  184. package/build/utils/date.js +7 -1
  185. package/build/utils/error.d.ts +1 -0
  186. package/build/utils/error.js +3 -0
  187. package/build/utils/html.d.ts +1 -1
  188. package/build/utils/html.js +4 -1
  189. package/build/utils/index.d.ts +1 -0
  190. package/build/utils/index.js +1 -0
  191. package/build/utils/string.d.ts +15 -2
  192. package/build/utils/string.js +37 -3
  193. package/build/utils/validation.d.ts +1 -0
  194. package/build/utils/validation.js +3 -0
  195. package/package.json +129 -129
  196. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
  197. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +0 -46
  198. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
  199. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
  200. package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
  201. package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
  202. package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
  203. package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
@@ -16,7 +16,7 @@ import { brandSelector } from '../../../app/brand/brandStore';
16
16
  import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
17
17
  var SuccessWithFlowButtons = function () {
18
18
  var data = useAppSelector(brandSelector).data;
19
- var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name;
20
- return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, flows: flows || [] }));
19
+ var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
20
+ return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [] }));
21
21
  };
22
22
  export default memo(SuccessWithFlowButtons);
@@ -20,7 +20,7 @@ import AnimationFlow from '../../components/AnimationFlow';
20
20
  import { store } from '../../app/store';
21
21
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
22
22
  import Collapse from '../../components/Collapse';
23
- import { getParameterByName, createElementAndInject } from '../../utils';
23
+ import { getParameterByName, findOrCreateElementAndInject } from '../../utils';
24
24
  import { BUSINESS_SCREENS_NAVIGATION } from '../../constants';
25
25
  import { businessFeatureScreens } from '../featuresScreens';
26
26
  import CustomFooter from '../shared/Footer';
@@ -57,7 +57,7 @@ export function BusinessElement(props) {
57
57
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Business, __assign({}, props)) })));
58
58
  }
59
59
  export function renderBusinessLib(config, elementId) {
60
- var element = createElementAndInject(elementId);
60
+ var element = findOrCreateElementAndInject(elementId);
61
61
  var root = createRoot(element);
62
62
  root.render(_jsx(BusinessElement, __assign({}, config)));
63
63
  var unmount = function () { return root.unmount(); };
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
20
20
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
21
21
  children?: React.ReactNode;
22
22
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
23
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
23
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
24
24
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
25
25
  htmlColor?: string | undefined;
26
26
  inheritViewBox?: boolean | undefined;
@@ -34,7 +34,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
34
34
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
35
35
  children?: React.ReactNode;
36
36
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
37
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
37
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
38
38
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
39
39
  htmlColor?: string | undefined;
40
40
  inheritViewBox?: boolean | undefined;
@@ -56,7 +56,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
56
56
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
57
57
  children?: React.ReactNode;
58
58
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
59
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
59
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
60
60
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
61
61
  htmlColor?: string | undefined;
62
62
  inheritViewBox?: boolean | undefined;
@@ -13,6 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { useTranslation } from 'react-i18next';
14
14
  import { useController, useFormContext } from 'react-hook-form';
15
15
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
16
+ import { DocumentPurpose } from '../../../../@types';
16
17
  import { styled } from '@mui/material/styles';
17
18
  import Collapse from '../../../../components/Collapse';
18
19
  import { ScreenContainer } from '../../../shared/Containers';
@@ -37,6 +38,6 @@ var LicenseCertificate = function (_a) {
37
38
  var handleReset = function (ids) {
38
39
  certificateIdControl.field.onChange(ids);
39
40
  };
40
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadMultipleFile, { label: t('title_license_certificate'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop_certificate'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleLicenseCertificateChange, isSubmitting: loading, onDeleteFile: handleReset, maxLimit: 4, purpose: 'commercial_registration', fileUploadingStatus: function (uploading) { return dispatch(uploadingStatus(uploading)); } }) }) })));
41
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadMultipleFile, { id: 'certificateId', control: control, label: t('title_license_certificate'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop_certificate'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleLicenseCertificateChange, isSubmitting: loading, onDeleteFile: handleReset, maxLimit: 4, purpose: DocumentPurpose.CR, fileUploadingStatus: function (uploading) { return dispatch(uploadingStatus(uploading)); } }) }) })));
41
42
  };
42
43
  export default LicenseCertificate;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
3
3
  children?: React.ReactNode;
4
4
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
5
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
6
6
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
7
  htmlColor?: string | undefined;
8
8
  inheritViewBox?: boolean | undefined;
@@ -16,7 +16,7 @@ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
16
16
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
17
17
  children?: React.ReactNode;
18
18
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
19
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
20
20
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
21
  htmlColor?: string | undefined;
22
22
  inheritViewBox?: boolean | undefined;
@@ -48,7 +48,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
48
48
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
49
49
  children?: React.ReactNode;
50
50
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
51
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
51
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
52
52
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
53
53
  htmlColor?: string | undefined;
54
54
  inheritViewBox?: boolean | undefined;
@@ -62,7 +62,7 @@ export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<
62
62
  export declare const RemainingCheck: import("@emotion/styled").StyledComponent<{
63
63
  children?: React.ReactNode;
64
64
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
65
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
65
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
66
66
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
67
67
  htmlColor?: string | undefined;
68
68
  inheritViewBox?: boolean | undefined;
@@ -16,7 +16,7 @@ import { businessSelector } from '../../../app/business/businessStore';
16
16
  import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
17
17
  var SuccessWithFlowButtons = function () {
18
18
  var data = useAppSelector(businessSelector).data;
19
- var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name;
20
- return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, flows: flows || [] }));
19
+ var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
20
+ return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [] }));
21
21
  };
22
22
  export default memo(SuccessWithFlowButtons);
@@ -20,7 +20,7 @@ import { store } from '../../app/store';
20
20
  import { connectSelector, setDefaultCountryCode } from '../app/connect/connectStore';
21
21
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
22
22
  import Collapse from '../../components/Collapse';
23
- import { isKW, createElementAndInject } from '../../utils';
23
+ import { isKW, findOrCreateElementAndInject } from '../../utils';
24
24
  import { CONNECT_SCREENS_NAVIGATION } from '../../constants';
25
25
  import { connectFeatureScreens } from '../featuresScreens';
26
26
  import CustomFooter from '../shared/Footer';
@@ -59,7 +59,7 @@ export function ConnectElement(props) {
59
59
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Connect, __assign({}, props)) })));
60
60
  }
61
61
  export function renderConnectLib(config, elementId) {
62
- var element = createElementAndInject(elementId);
62
+ var element = findOrCreateElementAndInject(elementId);
63
63
  var root = createRoot(element);
64
64
  root.render(_jsx(ConnectElement, __assign({}, config)));
65
65
  var unmount = function () { return root.unmount(); };
@@ -88,14 +88,14 @@ var BrandList = function (_a) {
88
88
  setValue('brandName', '');
89
89
  }
90
90
  setValue('segment', segments_list.find(function (_a) {
91
- var _b;
91
+ var _b, _c;
92
92
  var id = _a.id;
93
- return ((_b = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _b === void 0 ? void 0 : _b.type) === id;
93
+ return ((_c = (_b = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.id) === id;
94
94
  }), { shouldValidate: true });
95
95
  setValue('teamSize', team_size_list.find(function (_a) {
96
- var _b;
96
+ var _b, _c;
97
97
  var id = _a.id;
98
- return ((_b = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _b === void 0 ? void 0 : _b.team) === id;
98
+ return ((_c = (_b = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _b === void 0 ? void 0 : _b.team) === null || _c === void 0 ? void 0 : _c.id) === id;
99
99
  }), { shouldValidate: true });
100
100
  onCloseBrandList();
101
101
  };
@@ -61,7 +61,6 @@ import Input from '../../../shared/Input';
61
61
  import ClearIcon from '../../../shared/ClearIcon';
62
62
  import Tooltip from '../../../../components/Tooltip';
63
63
  import Collapse from '../../../../components/Collapse';
64
- import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
65
64
  import CheckIcon from '../../../shared/CheckIcon';
66
65
  import { checkBrandNameAvailability, connectSelector } from '../../../app/connect/connectStore';
67
66
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
@@ -104,7 +103,7 @@ var BrandName = function (_a) {
104
103
  var _c = React.useState(false), isHovered = _c[0], setIsHovered = _c[1];
105
104
  var t = useTranslation().t;
106
105
  var data = useAppSelector(connectSelector).data;
107
- var control = useFormContext().control;
106
+ var _d = useFormContext(), control = _d.control, getValues = _d.getValues;
108
107
  var brandControl = useController({ control: control, name: 'brandName' });
109
108
  var brandNameValue = brandControl.field.value;
110
109
  var error = (_b = brandControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
@@ -122,14 +121,16 @@ var BrandName = function (_a) {
122
121
  }); }, 500);
123
122
  var handleBrandNameChange = function (_a) {
124
123
  var target = _a.target;
125
- var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
126
- brandControl.field.onChange(value);
124
+ brandControl.field.onChange(target.value);
127
125
  };
128
126
  React.useEffect(function () {
129
127
  var _a, _b, _c;
128
+ var brandList = (data.brandData.responseBody || {}).brand_list;
129
+ var brandListItem = getValues('selectedBrandItem');
130
+ var isOtherBrand = (brandList || []).length > 0 ? (brandListItem === null || brandListItem === void 0 ? void 0 : brandListItem.id) === 'other' : true;
130
131
  var isValid = brandNameValue && !error && brandNameValue.length > 2;
131
132
  var brand = (_c = (_b = (_a = data.otpData.responseBody) === null || _a === void 0 ? void 0 : _a.brand) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.en;
132
- if (isValid && (brandNameValue === null || brandNameValue === void 0 ? void 0 : brandNameValue.toLowerCase()) != brand) {
133
+ if (isValid && (brandNameValue === null || brandNameValue === void 0 ? void 0 : brandNameValue.toLowerCase()) != brand && isOtherBrand) {
133
134
  fetchingBrandName(true);
134
135
  checkBrand(brandNameValue);
135
136
  }
@@ -7,7 +7,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
7
7
  }
8
8
  return to.concat(ar || Array.prototype.slice.call(from));
9
9
  };
10
- import { REGEX_WEBSITE, REGEX_BRAND_NAME, LINKEDIN_URL, SOCIAL_USERNAME, DIGITS_ONLY, REGEX_ALPHANUMERIC } from '../../../../constants';
10
+ import { REGEX_WEBSITE, LINKEDIN_URL, SOCIAL_USERNAME, DIGITS_ONLY, REGEX_ALPHANUMERIC } from '../../../../constants';
11
11
  import * as yup from 'yup';
12
12
  var validationSalesChannels = function (channels) {
13
13
  if (channels === void 0) { channels = []; }
@@ -79,7 +79,7 @@ export var MerchantValidationSchema = function (isNewBrand) {
79
79
  test: function (value) {
80
80
  if ((value === null || value === void 0 ? void 0 : value.length) === 0)
81
81
  return true;
82
- if (value && value.length >= 3 && (value === null || value === void 0 ? void 0 : value.match(REGEX_BRAND_NAME)))
82
+ if (value && value.length >= 3)
83
83
  return true;
84
84
  return this.createError({ message: 'enter_brand_name_english_chars_numbers_space' });
85
85
  }
@@ -31,7 +31,7 @@ import { store } from '../../app/store';
31
31
  import { connectExpressSelector, setIsLeadIdPassed, setPostUrl, setLeadId, retrieveLeadIdentityByIdAsync, setShowBoard } from '../app/connectExpress/connectExpressStore';
32
32
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
33
33
  import Collapse from '../../components/Collapse';
34
- import { isKW, createElementAndInject } from '../../utils';
34
+ import { isKW, findOrCreateElementAndInject } from '../../utils';
35
35
  import { CONNECT_EXPRESS_SCREENS_NAVIGATION } from '../../constants';
36
36
  import { connectExpressFeatureScreens } from '../featuresScreens';
37
37
  import CustomFooter from '../shared/Footer';
@@ -76,7 +76,7 @@ export function ConnectExpressElement(props) {
76
76
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(ConnectExpress, __assign({}, props)) })));
77
77
  }
78
78
  export function renderConnectExpressLib(config, elementId) {
79
- var el = createElementAndInject(elementId);
79
+ var el = findOrCreateElementAndInject(elementId);
80
80
  var root = createRoot(el);
81
81
  root.render(_jsx(ConnectExpressElement, __assign({}, config)));
82
82
  var unmount = function () { return root.unmount(); };
@@ -57,7 +57,6 @@ import InfoIcon from '@mui/icons-material/Info';
57
57
  import CircularProgress from '@mui/material/CircularProgress';
58
58
  import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
59
59
  import { ScreenContainer } from '../../../shared/Containers';
60
- import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
61
60
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
62
61
  import Text from '../../../../components/Text';
63
62
  import Tooltip from '../../../../components/Tooltip';
@@ -122,8 +121,7 @@ var BrandName = function (_a) {
122
121
  }); }, 500);
123
122
  var handleBrandNameChange = function (_a) {
124
123
  var target = _a.target;
125
- var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
126
- brandControl.field.onChange(value);
124
+ brandControl.field.onChange(target.value);
127
125
  };
128
126
  React.useEffect(function () {
129
127
  var _a, _b, _c, _d;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
3
3
  children?: React.ReactNode;
4
4
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
5
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
6
6
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
7
  htmlColor?: string | undefined;
8
8
  inheritViewBox?: boolean | undefined;
@@ -16,7 +16,7 @@ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
16
16
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
17
17
  children?: React.ReactNode;
18
18
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
19
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
20
20
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
21
  htmlColor?: string | undefined;
22
22
  inheritViewBox?: boolean | undefined;
@@ -1,5 +1,5 @@
1
1
  import * as yup from 'yup';
2
- import { REGEX_BRAND_NAME, KW_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH, CR_MIN_LICENSE_LENGTH } from '../../../../constants';
2
+ import { KW_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH, CR_MIN_LICENSE_LENGTH } from '../../../../constants';
3
3
  import { BusinessType } from '../../../../@types';
4
4
  var objectElements = {
5
5
  legal_name: yup.object().shape({
@@ -20,7 +20,7 @@ export var BusinessDataSchema = function (isLeadIdPassed) {
20
20
  test: function (value) {
21
21
  if ((value === null || value === void 0 ? void 0 : value.length) === 0)
22
22
  return true;
23
- if (value && value.length >= 3 && (value === null || value === void 0 ? void 0 : value.match(REGEX_BRAND_NAME)))
23
+ if (value && value.length >= 3)
24
24
  return true;
25
25
  return this.createError({ message: 'enter_brand_name_english_chars_numbers_space' });
26
26
  }
@@ -53,7 +53,7 @@ export var BusinessDataSchema = function (isLeadIdPassed) {
53
53
  test: function (value) {
54
54
  if ((value === null || value === void 0 ? void 0 : value.length) === 0)
55
55
  return true;
56
- if (value && value.length >= 3 && (value === null || value === void 0 ? void 0 : value.match(REGEX_BRAND_NAME)))
56
+ if (value && value.length >= 3)
57
57
  return true;
58
58
  return this.createError({ message: 'enter_brand_name_english_chars_numbers_space' });
59
59
  }
@@ -87,7 +87,7 @@ export var KWBusinessDataSchema = function (isLeadIdPassed) {
87
87
  test: function (value) {
88
88
  if ((value === null || value === void 0 ? void 0 : value.length) === 0)
89
89
  return true;
90
- if (value && value.length >= 3 && (value === null || value === void 0 ? void 0 : value.match(REGEX_BRAND_NAME)))
90
+ if (value && value.length >= 3)
91
91
  return true;
92
92
  return this.createError({ message: 'enter_brand_name_english_chars_numbers_space' });
93
93
  }
@@ -124,7 +124,7 @@ export var KWBusinessDataSchema = function (isLeadIdPassed) {
124
124
  test: function (value) {
125
125
  if ((value === null || value === void 0 ? void 0 : value.length) === 0)
126
126
  return true;
127
- if (value && value.length >= 3 && (value === null || value === void 0 ? void 0 : value.match(REGEX_BRAND_NAME)))
127
+ if (value && value.length >= 3)
128
128
  return true;
129
129
  return this.createError({ message: 'enter_brand_name_english_chars_numbers_space' });
130
130
  }
@@ -1,14 +1,34 @@
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
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import * as React from 'react';
3
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { isNetworkError } from '../../../../utils';
16
+ import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
4
17
  import { connectExpressSelector, createAccountAsync } from '../../../app/connectExpress/connectExpressStore';
5
18
  import CreateAccountLoading from '../../../shared/CreateAccountLoading';
19
+ import Button from '../../../shared/Button';
6
20
  var CreateAccountLoader = function (_a) {
7
21
  var dispatch = useAppDispatch();
8
- var error = useAppSelector(connectExpressSelector).error;
22
+ var isAr = useLanguage().isAr;
23
+ var t = useTranslation().t;
24
+ var _b = useAppSelector(connectExpressSelector), error = _b.error, loading = _b.loading;
9
25
  React.useEffect(function () {
10
26
  dispatch(createAccountAsync());
11
27
  }, []);
12
- return _jsx(CreateAccountLoading, { error: error });
28
+ var onReTry = function () {
29
+ dispatch(createAccountAsync());
30
+ };
31
+ var isNE = React.useMemo(function () { return isNetworkError(error); }, [error]);
32
+ return (_jsx(CreateAccountLoading, __assign({ error: error }, { children: isNE && (_jsx(Button, __assign({ onClick: onReTry, disableBack: true, isAr: isAr, loading: loading }, { children: t('try_again') }))) })));
13
33
  };
14
34
  export default React.memo(CreateAccountLoader);
@@ -18,8 +18,8 @@ import { FlowsTypes } from '../../../../@types';
18
18
  var SuccessWithFlowButtons = function () {
19
19
  var data = useAppSelector(connectExpressSelector).data;
20
20
  var _a = data.responseData || {}, boardData = _a.boardData, leadData = _a.leadData, boardInfo = _a.boardInfo;
21
- var _b = leadData || {}, brand = _b.brand, entity = _b.entity, name = _b.name;
22
- var _c = boardData || {}, business = _c.business, merchant = _c.merchant, bank = _c.bank_account, user = _c.user;
21
+ var name = (leadData || {}).name;
22
+ var _b = boardData || {}, business = _b.business, merchant = _b.merchant, bank = _b.bank_account, user = _b.user, individuals = _b.individuals, entity = _b.entity, brand = _b.brand;
23
23
  var flows = (boardInfo || {}).info;
24
24
  var boardInfoId = boardInfo === null || boardInfo === void 0 ? void 0 : boardInfo.id;
25
25
  var boardId = boardData === null || boardData === void 0 ? void 0 : boardData.id;
@@ -27,6 +27,6 @@ var SuccessWithFlowButtons = function () {
27
27
  var name = _a.name;
28
28
  return name !== FlowsTypes.PASSWORD;
29
29
  }); }, [flows]);
30
- return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, boardId: boardId, boardInfoId: boardInfoId, brand: brand, business: business, entity: entity, flows: filteredFlows || [], merchant: merchant, user: __assign({ names: { en: name } }, user) }));
30
+ return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, boardId: boardId, boardInfoId: boardInfoId, brand: brand, business: business, entity: entity, flows: filteredFlows || [], merchant: merchant, individuals: individuals, user: __assign({ names: { en: name } }, user) }));
31
31
  };
32
32
  export default memo(SuccessWithFlowButtons);
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
31
  import Collapse from '../../components/Collapse';
32
- import { createElementAndInject } from '../../utils';
32
+ import { findOrCreateElementAndInject } from '../../utils';
33
33
  import { FeatureContainer } from '../shared/Containers';
34
34
  import { ENTITY_SCREENS_NAVIGATION } from '../../constants';
35
35
  import { entityFeatureScreens } from '../featuresScreens';
@@ -64,7 +64,7 @@ export function EntityElement(props) {
64
64
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Entity, __assign({}, props)) })));
65
65
  }
66
66
  export function renderEntityLib(config, elementId) {
67
- var element = createElementAndInject(elementId);
67
+ var element = findOrCreateElementAndInject(elementId);
68
68
  var root = createRoot(element);
69
69
  root.render(_jsx(EntityElement, __assign({}, config)));
70
70
  var unmount = function () { return root.unmount(); };
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
20
20
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
21
21
  children?: React.ReactNode;
22
22
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
23
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
23
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
24
24
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
25
25
  htmlColor?: string | undefined;
26
26
  inheritViewBox?: boolean | undefined;
@@ -34,7 +34,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
34
34
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
35
35
  children?: React.ReactNode;
36
36
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
37
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
37
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
38
38
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
39
39
  htmlColor?: string | undefined;
40
40
  inheritViewBox?: boolean | undefined;
@@ -56,7 +56,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
56
56
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
57
57
  children?: React.ReactNode;
58
58
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
59
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
59
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
60
60
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
61
61
  htmlColor?: string | undefined;
62
62
  inheritViewBox?: boolean | undefined;
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
20
20
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
21
21
  children?: React.ReactNode;
22
22
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
23
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
23
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
24
24
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
25
25
  htmlColor?: string | undefined;
26
26
  inheritViewBox?: boolean | undefined;
@@ -34,7 +34,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
34
34
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
35
35
  children?: React.ReactNode;
36
36
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
37
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
37
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
38
38
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
39
39
  htmlColor?: string | undefined;
40
40
  inheritViewBox?: boolean | undefined;
@@ -56,7 +56,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
56
56
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
57
57
  children?: React.ReactNode;
58
58
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
59
- color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
59
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
60
60
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
61
61
  htmlColor?: string | undefined;
62
62
  inheritViewBox?: boolean | undefined;
@@ -10,11 +10,14 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ import React from 'react';
13
14
  import { useTranslation } from 'react-i18next';
14
15
  import { useController, useFormContext } from 'react-hook-form';
15
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
16
16
  import { styled } from '@mui/material/styles';
17
17
  import Collapse from '../../../../components/Collapse';
18
+ import { DocumentPurpose } from '../../../../@types';
19
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
20
+ import { getRecentDocumentFiles } from '../../../../utils';
18
21
  import { ScreenContainer } from '../../../shared/Containers';
19
22
  import { entitySelector, uploadingStatus } from '../../../app/entity/entityStore';
20
23
  import UploadMultipleFile from '../../../shared/UploadMultipleFile';
@@ -25,18 +28,21 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
25
28
  });
26
29
  });
27
30
  var LicenseCertificate = function (_a) {
31
+ var _b;
28
32
  var show = _a.show;
29
33
  var t = useTranslation().t;
30
34
  var control = useFormContext().control;
31
35
  var dispatch = useAppDispatch();
32
36
  var certificateIdControl = useController({ name: 'certificateId', control: control });
33
- var loading = useAppSelector(entitySelector).loading;
37
+ var _c = useAppSelector(entitySelector), loading = _c.loading, data = _c.data;
38
+ var documents = (((_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) || {}).documents;
34
39
  var handleLicenseCertificateChange = function (ids) {
35
40
  certificateIdControl.field.onChange(ids);
36
41
  };
37
42
  var handleReset = function (ids) {
38
43
  certificateIdControl.field.onChange(ids);
39
44
  };
40
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadMultipleFile, { label: t('title_license_certificate'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop_certificate'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleLicenseCertificateChange, isSubmitting: loading, onDeleteFile: handleReset, maxLimit: 4, purpose: 'commercial_registration', fileUploadingStatus: function (uploading) { return dispatch(uploadingStatus(uploading)); } }) }) })));
45
+ var defaultFiles = React.useMemo(function () { return getRecentDocumentFiles(documents, DocumentPurpose.CR); }, [documents]);
46
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadMultipleFile, { id: 'certificateId', control: control, label: t('title_license_certificate'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop_certificate'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleLicenseCertificateChange, isSubmitting: loading, onDeleteFile: handleReset, maxLimit: 4, defaultFiles: defaultFiles, purpose: DocumentPurpose.CR, fileUploadingStatus: function (uploading) { return dispatch(uploadingStatus(uploading)); } }) }) })));
41
47
  };
42
48
  export default LicenseCertificate;
@@ -16,7 +16,7 @@ import { entitySelector } from '../../../app/entity/entityStore';
16
16
  import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
17
17
  var SuccessWithFlowButtons = function () {
18
18
  var data = useAppSelector(entitySelector).data;
19
- var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name;
20
- return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, flows: flows || [] }));
19
+ var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
20
+ return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [] }));
21
21
  };
22
22
  export default memo(SuccessWithFlowButtons);
@@ -38,6 +38,8 @@ import SuccessPasswordPage from './password/screens/Success';
38
38
  import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
39
39
  import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
40
40
  import IndividualVerifyPage from './individual/screens/Verify';
41
+ import IndividualListPage from './individual/screens/IndividualList';
42
+ import IndividualPersonalInfo from './individual/screens/IndividualPersonalInfo';
41
43
  import AdditionalIndividualInfoPage from './individual/screens/AdditionalIndividualInfo';
42
44
  import SuccessOwnerPage from './individual/screens/Success';
43
45
  import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
@@ -234,6 +236,14 @@ export var individualFeatureScreens = [
234
236
  name: 'INDIVIDUAL_LOADING_DATA_STEP',
235
237
  element: IndividualDataLoadingPage
236
238
  },
239
+ {
240
+ name: 'INDIVIDUAL_LIST_STEP',
241
+ element: IndividualListPage
242
+ },
243
+ {
244
+ name: 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP',
245
+ element: IndividualPersonalInfo
246
+ },
237
247
  {
238
248
  name: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
239
249
  element: AdditionalIndividualInfoPage
@@ -29,7 +29,7 @@ import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
31
  import Collapse from '../../components/Collapse';
32
- import { createElementAndInject } from '../../utils';
32
+ import { findOrCreateElementAndInject } from '../../utils';
33
33
  import { FeatureContainer } from '../shared/Containers';
34
34
  import { INDIVIDUAL_SCREENS_NAVIGATION } from '../../constants';
35
35
  import { individualFeatureScreens } from '../featuresScreens';
@@ -64,7 +64,7 @@ export function IndividualElement(props) {
64
64
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Individual, __assign({}, props)) })));
65
65
  }
66
66
  export function renderIndividualLib(config, elementId) {
67
- var element = createElementAndInject(elementId);
67
+ var element = findOrCreateElementAndInject(elementId);
68
68
  var root = createRoot(element);
69
69
  root.render(_jsx(IndividualElement, __assign({}, config)));
70
70
  var unmount = function () { return root.unmount(); };
@@ -1,4 +1,17 @@
1
1
  import * as React from 'react';
2
+ export declare const RoleTextStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
+ align?: "right" | "left" | "center" | "inherit" | "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" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
11
+ variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", 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
+ }, ("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" | keyof import("@mui/material/OverridableComponent").CommonProps | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
2
15
  export interface AdditionalIndividualInfoProps {
3
16
  }
4
17
  declare const _default: React.MemoExoticComponent<{