@tap-payments/auth-jsconnect 2.6.87-test → 2.6.89-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 (407) hide show
  1. package/build/@types/app.d.ts +19 -19
  2. package/build/@types/form.d.ts +23 -21
  3. package/build/@types/theme.d.ts +1 -1
  4. package/build/api/account.d.ts +2 -2
  5. package/build/api/auth.d.ts +13 -13
  6. package/build/api/availabilityServices.d.ts +3 -3
  7. package/build/api/axios.js +1 -1
  8. package/build/api/board.d.ts +3 -3
  9. package/build/api/brand.d.ts +1 -1
  10. package/build/api/country.d.ts +1 -1
  11. package/build/api/data.d.ts +11 -11
  12. package/build/api/document.d.ts +2 -2
  13. package/build/api/entity.d.ts +22 -9
  14. package/build/api/entity.js +9 -1
  15. package/build/api/file.d.ts +1 -1
  16. package/build/api/index.d.ts +3 -2
  17. package/build/api/individual.d.ts +5 -5
  18. package/build/api/init.d.ts +1 -1
  19. package/build/api/lead.d.ts +12 -12
  20. package/build/api/lead.js +1 -1
  21. package/build/api/operator.d.ts +2 -2
  22. package/build/api/operator.js +1 -1
  23. package/build/api/user.d.ts +2 -2
  24. package/build/app/settings.d.ts +3 -21
  25. package/build/app/settings.js +1 -1
  26. package/build/app/store.d.ts +4 -4
  27. package/build/components/AnimationFlow/AnimationFlow.d.ts +1 -1
  28. package/build/components/AnimationFlow/BottomSheet.d.ts +1 -1
  29. package/build/components/AnimationFlow/Dialog.d.ts +1 -1
  30. package/build/components/AnimationFlow/Error.d.ts +2 -1
  31. package/build/components/AnimationFlow/Loader.d.ts +2 -1
  32. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
  33. package/build/components/Button/Button.d.ts +1 -1
  34. package/build/components/CheckBox/CheckBox.d.ts +1 -1
  35. package/build/components/Collapse/Collapse.d.ts +2 -1
  36. package/build/components/DatePicker/DatePicker.d.ts +1 -1
  37. package/build/components/ExpandIcon/ExpandIcon.d.ts +2 -1
  38. package/build/components/FileInput/DragAndDrop.d.ts +2 -1
  39. package/build/components/FileInput/UploadInput.d.ts +2 -1
  40. package/build/components/Footer/Footer.d.ts +1 -1
  41. package/build/components/Form/Form.d.ts +1 -1
  42. package/build/components/Input/Input.d.ts +1 -1
  43. package/build/components/InputAdornment/InputAdornment.d.ts +1 -1
  44. package/build/components/List/List.d.ts +1 -1
  45. package/build/components/ListItem/ListItem.d.ts +1 -1
  46. package/build/components/Loader/Loader.d.ts +1 -1
  47. package/build/components/LogoBadge/LogoBadge.d.ts +1 -1
  48. package/build/components/OTPField/OTPField.d.ts +1 -1
  49. package/build/components/OTPTimer/OTPTimer.d.ts +1 -1
  50. package/build/components/ProgressBar/CircularProgressBar.d.ts +2 -1
  51. package/build/components/ProgressBar/ProgressBar.d.ts +1 -1
  52. package/build/components/Providers/ReduxProvider.d.ts +1 -1
  53. package/build/components/Providers/ThemeProvider.d.ts +1 -1
  54. package/build/components/Radio/Radio.d.ts +1 -1
  55. package/build/components/RadioGroup/RadioGroup.d.ts +1 -1
  56. package/build/components/RadioLabel/RadioLabel.d.ts +1 -1
  57. package/build/components/SimpleList/SimpleList.d.ts +1 -1
  58. package/build/components/Slide/Slide.d.ts +1 -1
  59. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
  60. package/build/components/Text/Text.d.ts +1 -1
  61. package/build/components/ToggleButton/ToggleButton.d.ts +1 -1
  62. package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
  63. package/build/components/Tooltip/Tooltip.d.ts +1 -1
  64. package/build/components/Warning/Warning.d.ts +1 -1
  65. package/build/constants/app.d.ts +15 -1
  66. package/build/constants/app.js +14 -0
  67. package/build/constants/validation.d.ts +3 -0
  68. package/build/constants/validation.js +3 -0
  69. package/build/features/app/auth/authStore.d.ts +15 -141
  70. package/build/features/app/auth/authStore.js +1 -1
  71. package/build/features/app/bank/bankStore.d.ts +11 -92
  72. package/build/features/app/bank/bankStore.js +1 -1
  73. package/build/features/app/board/boardStore.d.ts +5 -41
  74. package/build/features/app/board/boardStore.js +1 -1
  75. package/build/features/app/brand/brandStore.d.ts +16 -142
  76. package/build/features/app/brand/brandStore.js +1 -1
  77. package/build/features/app/business/businessStore.d.ts +18 -162
  78. package/build/features/app/business/businessStore.js +1 -1
  79. package/build/features/app/connect/connectStore.d.ts +16 -151
  80. package/build/features/app/connect/connectStore.js +1 -1
  81. package/build/features/app/connectExpress/connectExpressStore.d.ts +32 -261
  82. package/build/features/app/connectExpress/connectExpressStore.js +57 -6
  83. package/build/features/app/entity/entityStore.d.ts +11 -92
  84. package/build/features/app/entity/entityStore.js +1 -1
  85. package/build/features/app/individual/individualStore.d.ts +23 -185
  86. package/build/features/app/individual/individualStore.js +1 -1
  87. package/build/features/app/password/passwordStore.d.ts +13 -112
  88. package/build/features/app/password/passwordStore.js +1 -1
  89. package/build/features/app/signIn/signInStore.d.ts +7 -61
  90. package/build/features/app/signIn/signInStore.js +1 -1
  91. package/build/features/app/tax/taxStore.d.ts +10 -82
  92. package/build/features/app/tax/taxStore.js +1 -1
  93. package/build/features/auth/Auth.d.ts +2 -1
  94. package/build/features/auth/Auth.js +1 -1
  95. package/build/features/auth/screens/AccountNotFound/AccountNotFound.d.ts +1 -1
  96. package/build/features/auth/screens/AuthenticationList/AuthenticationList.d.ts +1 -1
  97. package/build/features/auth/screens/AuthenticationList/BrandList.d.ts +1 -1
  98. package/build/features/auth/screens/AuthenticationList/EntityList.d.ts +1 -1
  99. package/build/features/auth/screens/BusinessCountry/BusinessCountry.d.ts +1 -1
  100. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +1 -1
  101. package/build/features/auth/screens/CivilID/CivilID.d.ts +1 -1
  102. package/build/features/auth/screens/Mobile/Mobile.d.ts +1 -1
  103. package/build/features/auth/screens/NID/DOB.d.ts +2 -1
  104. package/build/features/auth/screens/NID/NID.d.ts +1 -1
  105. package/build/features/auth/screens/OTP/OTP.d.ts +1 -1
  106. package/build/features/auth/screens/OTP/OTPInput.d.ts +1 -1
  107. package/build/features/auth/screens/PreparingData/PreparingData.d.ts +1 -1
  108. package/build/features/auth/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  109. package/build/features/bank/Bank.d.ts +2 -1
  110. package/build/features/bank/screens/BankDetails/BankDetails.d.ts +2 -1
  111. package/build/features/bank/screens/BankDetails/BankName.d.ts +3 -2
  112. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +3 -2
  113. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +2 -1
  114. package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +3 -2
  115. package/build/features/bank/screens/BankDetails/IBAN.d.ts +2 -1
  116. package/build/features/bank/screens/BankDetails/IBAN.js +1 -1
  117. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  118. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  119. package/build/features/bank/screens/Success/Success.d.ts +1 -1
  120. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  121. package/build/features/bank/screens/Verify/OTPInput.d.ts +1 -1
  122. package/build/features/bank/screens/Verify/Verify.d.ts +1 -1
  123. package/build/features/board/Board.d.ts +2 -1
  124. package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  125. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  126. package/build/features/board/screens/Verify/OTPInput.d.ts +1 -1
  127. package/build/features/board/screens/Verify/Verify.d.ts +1 -1
  128. package/build/features/brand/Brand.d.ts +2 -1
  129. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +29 -13
  130. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +2 -1
  131. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +37 -13
  132. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
  133. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +2 -1
  134. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +20 -12
  135. package/build/features/brand/screens/BrandActivities/TAC.d.ts +3 -3
  136. package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +3 -2
  137. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +2 -1
  138. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +3 -2
  139. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +1 -1
  140. package/build/features/brand/screens/BrandInfo/BrandName.js +1 -1
  141. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +2 -1
  142. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +2 -1
  143. package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +2 -1
  144. package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +2 -1
  145. package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +2 -1
  146. package/build/features/brand/screens/BrandSegmentInfo/TeamSize.d.ts +2 -1
  147. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  148. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  149. package/build/features/brand/screens/Success/Success.d.ts +1 -1
  150. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  151. package/build/features/brand/screens/Verify/OTPInput.d.ts +1 -1
  152. package/build/features/brand/screens/Verify/Verify.d.ts +1 -1
  153. package/build/features/business/Business.d.ts +2 -1
  154. package/build/features/business/screens/Activities/Activities.d.ts +2 -1
  155. package/build/features/business/screens/Activities/ActivitiesList.d.ts +25 -9
  156. package/build/features/business/screens/Activities/LicenseName.d.ts +1 -1
  157. package/build/features/business/screens/Activities/OperationStartDate.d.ts +13 -5
  158. package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +1 -1
  159. package/build/features/business/screens/BrandDetails/BrandName.d.ts +1 -1
  160. package/build/features/business/screens/BrandDetails/Header.d.ts +1 -1
  161. package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +1 -1
  162. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +13 -5
  163. package/build/features/business/screens/BusinessType/Article.d.ts +3 -2
  164. package/build/features/business/screens/BusinessType/BusinessType.d.ts +1 -1
  165. package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +1 -1
  166. package/build/features/business/screens/BusinessType/EntityName.d.ts +2 -1
  167. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +2 -1
  168. package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -1
  169. package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -1
  170. package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -4
  171. package/build/features/business/screens/BusinessType/SelectType.d.ts +1 -1
  172. package/build/features/business/screens/BusinessType/Switch.d.ts +1 -1
  173. package/build/features/business/screens/CivilID/CivilID.d.ts +1 -1
  174. package/build/features/business/screens/Customers/CustomerLocations.d.ts +41 -17
  175. package/build/features/business/screens/Customers/Customers.d.ts +1 -1
  176. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +2 -1
  177. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +2 -1
  178. package/build/features/business/screens/Customers/RefundPolicy.d.ts +19 -11
  179. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +2 -1
  180. package/build/features/business/screens/IDBOD/DOB.d.ts +1 -1
  181. package/build/features/business/screens/IDBOD/ID.d.ts +1 -1
  182. package/build/features/business/screens/IDBOD/IDBOD.d.ts +1 -1
  183. package/build/features/business/screens/OTP/OTP.d.ts +1 -1
  184. package/build/features/business/screens/OTP/OTPInput.d.ts +1 -1
  185. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  186. package/build/features/business/screens/Success/Success.d.ts +1 -1
  187. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  188. package/build/features/business/screens/Verify/OTPInput.d.ts +1 -1
  189. package/build/features/business/screens/Verify/Verify.d.ts +1 -1
  190. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  191. package/build/features/connect/Connect.d.ts +2 -1
  192. package/build/features/connect/Connect.js +1 -1
  193. package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +1 -1
  194. package/build/features/connect/screens/BrandSegment/TeamSize.d.ts +2 -1
  195. package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +1 -1
  196. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +1 -1
  197. package/build/features/connect/screens/CivilID/CivilID.d.ts +1 -1
  198. package/build/features/connect/screens/Individual/Email.d.ts +1 -1
  199. package/build/features/connect/screens/Individual/Email.js +1 -1
  200. package/build/features/connect/screens/Individual/Individual.d.ts +1 -1
  201. package/build/features/connect/screens/Individual/Name.d.ts +1 -1
  202. package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
  203. package/build/features/connect/screens/Merchant/BrandName.d.ts +1 -1
  204. package/build/features/connect/screens/Merchant/BrandName.js +1 -1
  205. package/build/features/connect/screens/Merchant/Merchant.d.ts +1 -1
  206. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +2 -1
  207. package/build/features/connect/screens/Merchant/TAC.d.ts +1 -1
  208. package/build/features/connect/screens/Mobile/Mobile.d.ts +1 -1
  209. package/build/features/connect/screens/Mobile/Title.d.ts +1 -1
  210. package/build/features/connect/screens/NID/DOB.d.ts +2 -1
  211. package/build/features/connect/screens/NID/NID.d.ts +1 -1
  212. package/build/features/connect/screens/OTP/OTP.d.ts +1 -1
  213. package/build/features/connect/screens/OTP/OTPInput.d.ts +1 -1
  214. package/build/features/connect/screens/OperatorError/OperatorError.d.ts +1 -1
  215. package/build/features/connect/screens/ThankYou/ThankYou.d.ts +1 -1
  216. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  217. package/build/features/connectExpress/ConnectExpress.d.ts +2 -1
  218. package/build/features/connectExpress/ConnectExpress.js +1 -1
  219. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +1 -1
  220. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +1 -1
  221. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +22 -5
  222. package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +1 -1
  223. package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
  224. package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.js +48 -0
  225. package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +2 -1
  226. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +26 -7
  227. package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
  228. package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +36 -0
  229. package/build/features/connectExpress/screens/AuthenticationList/MerchantList.js +17 -4
  230. package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +14 -1
  231. package/build/features/connectExpress/screens/AuthenticationList/validation.js +32 -7
  232. package/build/features/connectExpress/screens/Brand/Brand.d.ts +1 -1
  233. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +1 -1
  234. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -1
  235. package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +1 -1
  236. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +1 -1
  237. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +1 -1
  238. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +1 -1
  239. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +1 -1
  240. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +1 -1
  241. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
  242. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -4
  243. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +3 -3
  244. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +1 -1
  245. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +1 -1
  246. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -1
  247. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +1 -1
  248. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +1 -1
  249. package/build/features/connectExpress/screens/IdentityOTP/OTP.d.ts +1 -1
  250. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +1 -1
  251. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +1 -1
  252. package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +1 -1
  253. package/build/features/connectExpress/screens/Mobile/TAC.d.ts +1 -1
  254. package/build/features/connectExpress/screens/Mobile/Title.d.ts +1 -1
  255. package/build/features/connectExpress/screens/NID/DOB.d.ts +2 -1
  256. package/build/features/connectExpress/screens/NID/NID.d.ts +1 -1
  257. package/build/features/connectExpress/screens/NID/TAC.d.ts +3 -3
  258. package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +2 -1
  259. package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +1 -1
  260. package/build/features/connectExpress/screens/OTP/OTP.d.ts +1 -1
  261. package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +1 -1
  262. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  263. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  264. package/build/features/entity/Entity.d.ts +2 -1
  265. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +25 -9
  266. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +1 -1
  267. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +1 -1
  268. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +1 -1
  269. package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +2 -1
  270. package/build/features/entity/screens/EntityName/Article.d.ts +3 -2
  271. package/build/features/entity/screens/EntityName/EntityName.d.ts +2 -1
  272. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +29 -13
  273. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +13 -5
  274. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +13 -5
  275. package/build/features/entity/screens/EntityName/LegalName.d.ts +1 -1
  276. package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +2 -1
  277. package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +1 -1
  278. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +1 -1
  279. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  280. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  281. package/build/features/entity/screens/Success/Success.d.ts +1 -1
  282. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  283. package/build/features/entity/screens/Verify/OTPInput.d.ts +1 -1
  284. package/build/features/entity/screens/Verify/Verify.d.ts +1 -1
  285. package/build/features/individual/Individual.d.ts +2 -1
  286. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +13 -5
  287. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +3 -2
  288. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +1 -1
  289. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
  290. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +2 -1
  291. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +3 -3
  292. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +1 -1
  293. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +1 -1
  294. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +2 -1
  295. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
  296. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +1 -1
  297. package/build/features/individual/screens/IndividualList/Email.d.ts +1 -1
  298. package/build/features/individual/screens/IndividualList/Email.js +1 -1
  299. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +25 -9
  300. package/build/features/individual/screens/IndividualList/UserList.d.ts +2 -1
  301. package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
  302. package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +1 -1
  303. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -1
  304. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -4
  305. package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +1 -1
  306. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +13 -5
  307. package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +1 -1
  308. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +1 -1
  309. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  310. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  311. package/build/features/individual/screens/Success/Success.d.ts +1 -1
  312. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  313. package/build/features/individual/screens/Verify/OTPInput.d.ts +1 -1
  314. package/build/features/individual/screens/Verify/Verify.d.ts +1 -1
  315. package/build/features/password/Password.d.ts +2 -1
  316. package/build/features/password/screens/CreatePassword/ConditionText.d.ts +2 -1
  317. package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +1 -1
  318. package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +1 -1
  319. package/build/features/password/screens/CreatePassword/Password.d.ts +1 -1
  320. package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +2 -1
  321. package/build/features/password/screens/OTP/OTP.d.ts +1 -1
  322. package/build/features/password/screens/OTP/OTPInput.d.ts +1 -1
  323. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  324. package/build/features/password/screens/Success/Success.d.ts +1 -1
  325. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  326. package/build/features/password/screens/Verify/OTPInput.d.ts +1 -1
  327. package/build/features/password/screens/Verify/Verify.d.ts +1 -1
  328. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.d.ts +2 -1
  329. package/build/features/shared/Address/Address.d.ts +2 -1
  330. package/build/features/shared/Address/CountryList.d.ts +29 -13
  331. package/build/features/shared/Address/InputSelect.d.ts +29 -13
  332. package/build/features/shared/Address/InputSelect.js +1 -1
  333. package/build/features/shared/Address/InputText.d.ts +1 -1
  334. package/build/features/shared/Background/Background.d.ts +1 -1
  335. package/build/features/shared/Background/LogoBackground.d.ts +1 -1
  336. package/build/features/shared/BouncingDotsLoader/BouncingDotsLoader.d.ts +2 -1
  337. package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +2 -1
  338. package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
  339. package/build/features/shared/Button/AbsherButton.d.ts +2 -1
  340. package/build/features/shared/Button/Button.d.ts +2 -1
  341. package/build/features/shared/Button/Button.js +8 -4
  342. package/build/features/shared/Button/EmailProvidersButtons.d.ts +3 -2
  343. package/build/features/shared/Button/FlowsButtons.d.ts +3 -2
  344. package/build/features/shared/Button/FlowsButtons.js +1 -1
  345. package/build/features/shared/Button/IndividualActionButtons.d.ts +2 -2
  346. package/build/features/shared/Button/MobileButton.d.ts +2 -1
  347. package/build/features/shared/Button/SuccessButton.d.ts +2 -1
  348. package/build/features/shared/Calender/Calender.d.ts +2 -1
  349. package/build/features/shared/CheckIcon/CheckIcon.d.ts +3 -2
  350. package/build/features/shared/Chip/Chip.d.ts +2 -1
  351. package/build/features/shared/ClearIcon/ClearIcon.d.ts +2 -1
  352. package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
  353. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  354. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +1 -1
  355. package/build/features/shared/DataLoading/DataLoading.d.ts +1 -1
  356. package/build/features/shared/Dialog/CloseDialog.d.ts +2 -1
  357. package/build/features/shared/Dialog/DialogContainer.d.ts +1 -1
  358. package/build/features/shared/Dot/Dot.d.ts +2 -1
  359. package/build/features/shared/EndAdornment/EndAdornment.d.ts +2 -1
  360. package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +2 -1
  361. package/build/features/shared/Footer/Footer.d.ts +2 -1
  362. package/build/features/shared/Footer/PoweredByFooter.d.ts +3 -2
  363. package/build/features/shared/GenericError/GenericError.d.ts +1 -1
  364. package/build/features/shared/Input/Input.d.ts +14 -6
  365. package/build/features/shared/InputSelect/InputSelect.d.ts +2 -1
  366. package/build/features/shared/Mandatory/Mandatory.d.ts +2 -1
  367. package/build/features/shared/OTP/OTP.d.ts +1 -1
  368. package/build/features/shared/PaciVerification/PaciVerification.d.ts +1 -1
  369. package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +2 -1
  370. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +2 -1
  371. package/build/features/shared/SalesChannels/SalesChannel.d.ts +1 -1
  372. package/build/features/shared/Search/Search.d.ts +2 -1
  373. package/build/features/shared/SearchIcon/SearchIcon.d.ts +2 -1
  374. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -1
  375. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
  376. package/build/features/shared/UploadFile/FileUpload.d.ts +4 -4
  377. package/build/features/shared/UploadFile/FileUpload.js +1 -1
  378. package/build/features/shared/UploadFile/UploadFile.d.ts +3 -3
  379. package/build/features/shared/UploadFile/UploadWrapper.d.ts +3 -3
  380. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +4 -4
  381. package/build/features/shared/UploadMultipleFile/UploadFile.js +1 -1
  382. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +3 -3
  383. package/build/features/signIn/SignIn.d.ts +2 -1
  384. package/build/features/signIn/screens/Email/Email.d.ts +1 -1
  385. package/build/features/signIn/screens/Mobile/Mobile.d.ts +1 -1
  386. package/build/features/signIn/screens/OTP/OTP.d.ts +1 -1
  387. package/build/features/signIn/screens/OTP/OTPInput.d.ts +1 -1
  388. package/build/features/signIn/screens/Password/Password.d.ts +1 -1
  389. package/build/features/signIn/screens/Password/PasswordInput.d.ts +1 -1
  390. package/build/features/tax/Tax.d.ts +2 -1
  391. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +2 -2
  392. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +1 -1
  393. package/build/features/tax/screens/Success/Success.d.ts +1 -1
  394. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +1 -1
  395. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +3 -2
  396. package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +2 -1
  397. package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +2 -1
  398. package/build/features/tax/screens/TaxDetails/VATId.d.ts +3 -2
  399. package/build/features/tax/screens/Verify/OTPInput.d.ts +1 -1
  400. package/build/features/tax/screens/Verify/Verify.d.ts +1 -1
  401. package/build/hooks/useDataVerified.d.ts +1 -1
  402. package/build/hooks/useExcludeReadOnlyFelids.d.ts +2 -2
  403. package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +2 -2
  404. package/build/hooks/useFormReadOnly.d.ts +2 -2
  405. package/build/hooks/useSetFromDefaultValues.d.ts +1 -1
  406. package/build/utils/array.js +1 -1
  407. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  interface DOBProps {
2
3
  onDateClicked?: (flag: boolean) => void;
3
4
  }
4
- declare const DOB: ({ onDateClicked }: DOBProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const DOB: ({ onDateClicked }: DOBProps) => JSX.Element;
5
6
  export default DOB;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface NIDProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: NIDProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: NIDProps) => JSX.Element>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface OTPProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<() => JSX.Element>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface OTPProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: OTPProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface OperatorErrorProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => JSX.Element>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface ThankYouProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: ThankYouProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: ThankYouProps) => JSX.Element>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface VerifyPACIProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element | null>;
4
+ declare const _default: React.MemoExoticComponent<() => JSX.Element | null>;
5
5
  export default _default;
@@ -1,10 +1,11 @@
1
+ /// <reference types="react" />
1
2
  import { LibConfig } from '../../@types';
2
3
  export interface ConnectExpressLibProps extends LibConfig {
3
4
  leadId?: string;
4
5
  showBoard?: boolean;
5
6
  configToken?: string;
6
7
  }
7
- export declare function ConnectExpressElement(props: ConnectExpressLibProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ConnectExpressElement(props: ConnectExpressLibProps): JSX.Element;
8
9
  export declare function renderConnectExpressLib(config: ConnectExpressLibProps, elementId: string): {
9
10
  unmount: () => void;
10
11
  };
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
27
+ while (_) try {
28
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
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface AccountAlreadyCreatedProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: AccountAlreadyCreatedProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: AccountAlreadyCreatedProps) => JSX.Element>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface AuthenticationListProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: AuthenticationListProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: AuthenticationListProps) => JSX.Element>;
5
5
  export default _default;
@@ -22,12 +22,14 @@ import { AuthForType } from '../../../../@types';
22
22
  import Form from '../../../../components/Form';
23
23
  import { ScreenContainer } from '../../../shared/Containers';
24
24
  import Button from '../../../shared/Button';
25
- import { clearError, connectExpressSelector, updateOperatorInfoAsync } from '../../../app/connectExpress/connectExpressStore';
25
+ import { clearError, connectExpressSelector, createEntity, resetAuthenticationScreen, updateOperatorInfoAsync } from '../../../app/connectExpress/connectExpressStore';
26
26
  import { useLanguage } from '../../../../hooks';
27
- import { AuthenticationListValidationSchema } from './validation';
27
+ import { AddEntityValidationSchema, AuthenticationListValidationSchema } from './validation';
28
28
  import BrandList from './BrandList';
29
29
  import EntityList from './EntityList';
30
30
  import MerchantList from './MerchantList';
31
+ import LicenseNumber from './LicenseNumber';
32
+ import EntityLegalName from './EntityLegalName';
31
33
  var ListType;
32
34
  (function (ListType) {
33
35
  ListType["BrandList"] = "BrandList";
@@ -40,7 +42,8 @@ var AuthenticationList = function (_a) {
40
42
  var _c = useAppSelector(connectExpressSelector), data = _c.data, loading = _c.loading, error = _c.error, merchantLoading = _c.merchantLoading, terminalLoading = _c.terminalLoading;
41
43
  var _d = data.authenticationData, brandInfo = _d.brandInfo, entityInfo = _d.entityInfo, merchantInfo = _d.merchantInfo;
42
44
  var _e = React.useState(), listActive = _e[0], setListActive = _e[1];
43
- var brandList = (((_b = data.responseData) === null || _b === void 0 ? void 0 : _b.authenticationData) || {}).brandList;
45
+ var _f = ((_b = data.responseData) === null || _b === void 0 ? void 0 : _b.authenticationData) || {}, brandList = _f.brandList, merchantList = _f.merchantList;
46
+ var _g = React.useState(false), isAddEntity = _g[0], setIsAddEntity = _g[1];
44
47
  var otpData = data.otpData;
45
48
  var startWithNID = otpData.authFor === AuthForType.NATIONAL_ID;
46
49
  React.useEffect(function () {
@@ -51,7 +54,7 @@ var AuthenticationList = function (_a) {
51
54
  });
52
55
  }, []);
53
56
  var methods = useForm({
54
- resolver: yupResolver(AuthenticationListValidationSchema()),
57
+ resolver: yupResolver(isAddEntity ? AddEntityValidationSchema : AuthenticationListValidationSchema),
55
58
  defaultValues: {
56
59
  brandInfo: brandInfo,
57
60
  entityInfo: entityInfo,
@@ -63,12 +66,25 @@ var AuthenticationList = function (_a) {
63
66
  var isAr = useLanguage().isAr;
64
67
  var dispatch = useAppDispatch();
65
68
  var onSubmit = function (formData) {
69
+ if (isAddEntity) {
70
+ var data_1 = { licenseNumber: formData.licenseNumber, legalName: formData.legalName, brandInfo: formData.brandInfo };
71
+ dispatch(createEntity(deepCopy(data_1)));
72
+ return;
73
+ }
66
74
  dispatch(updateOperatorInfoAsync(deepCopy(formData)));
67
75
  };
68
76
  var onBack = function () {
69
77
  var _a;
78
+ if (isAddEntity) {
79
+ setIsAddEntity(false);
80
+ methods.setValue('licenseNumber', '');
81
+ methods.setValue('legalName', '');
82
+ methods.setValue('entityInfo', undefined, { shouldValidate: true });
83
+ return;
84
+ }
70
85
  var code = (_a = settingsData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2;
71
86
  var screen = startWithNID ? (isKW(code) ? 'CONNECT_EXPRESS_CIVIL_ID_STEP' : 'CONNECT_EXPRESS_NID_STEP') : 'CONNECT_EXPRESS_MOBILE_STEP';
87
+ dispatch(resetAuthenticationScreen());
72
88
  dispatch(handlePrevScreenStep(screen));
73
89
  };
74
90
  React.useEffect(function () {
@@ -88,6 +104,7 @@ var AuthenticationList = function (_a) {
88
104
  var isBrandList = listActive === ListType.BrandList;
89
105
  var isEntityList = listActive === ListType.EntityList;
90
106
  var isMerchantList = listActive === ListType.MerchantList;
91
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { list: brandList || [], show: !isEntityList && !isMerchantList, onListOpen: function () { return handleMenuClick(ListType.BrandList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityList, { countryList: settingsData.countries || [], show: !isBrandList && !isMerchantList, onListOpen: function () { return handleMenuClick(ListType.EntityList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(MerchantList, { show: !isBrandList && !isEntityList, onListOpen: function () { return handleMenuClick(ListType.MerchantList); }, onListClose: function () { return handleMenuClick(); } }), _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') })) }))] })) })) }));
107
+ var showLoader = !(merchantList === null || merchantList === void 0 ? void 0 : merchantList.length) ? merchantLoading : merchantList.length === 1 && merchantLoading;
108
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { list: brandList || [], show: !isAddEntity && !isEntityList && !isMerchantList, onListOpen: function () { return handleMenuClick(ListType.BrandList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityList, { countryList: settingsData.countries || [], show: !isBrandList && !isMerchantList, handleAddEntity: function (flag) { return setIsAddEntity(flag); }, onListOpen: function () { return handleMenuClick(ListType.EntityList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: isAddEntity && !isBrandList && !isEntityList }, { children: [_jsx(EntityLegalName, {}), _jsx(LicenseNumber, {})] })), _jsx(Collapse, __assign({ in: !isAddEntity }, { children: _jsx(MerchantList, { show: !isBrandList && !isEntityList, onListOpen: function () { return handleMenuClick(ListType.MerchantList); }, onListClose: function () { return handleMenuClick(); } }) })), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading || showLoader }, { children: isAddEntity ? t('create_new_entity') : t('next') })) }))] })) })) }));
92
109
  };
93
110
  export default React.memo(AuthenticationList);
@@ -6,5 +6,5 @@ interface BrandListProps {
6
6
  onListOpen?: () => void;
7
7
  onListClose?: () => void;
8
8
  }
9
- declare const _default: React.MemoExoticComponent<({ show, list, ...rest }: BrandListProps) => import("react/jsx-runtime").JSX.Element>;
9
+ declare const _default: React.MemoExoticComponent<({ show, list, ...rest }: BrandListProps) => JSX.Element>;
10
10
  export default _default;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const EntityLegalName: () => JSX.Element;
3
+ export default EntityLegalName;
@@ -0,0 +1,48 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { useTranslation } from 'react-i18next';
14
+ import { useController, useFormContext } from 'react-hook-form';
15
+ import { styled } from '@mui/material/styles';
16
+ import Box from '@mui/material/Box';
17
+ import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
18
+ import Input from '../../../shared/Input';
19
+ import { EndAdornment } from '../../../shared/EndAdornment';
20
+ var BoxStyled = styled(Box)(function (_a) {
21
+ var theme = _a.theme;
22
+ return ({
23
+ display: 'flex',
24
+ flexDirection: 'column',
25
+ direction: theme.direction,
26
+ fontFamily: theme.typography.fontFamily,
27
+ overflow: 'hidden',
28
+ paddingBlockEnd: theme.spacing(2.5)
29
+ });
30
+ });
31
+ var EntityLegalName = function () {
32
+ var _a;
33
+ var t = useTranslation().t;
34
+ var control = useFormContext().control;
35
+ var entityNameControl = useController({ control: control, name: 'legalName' });
36
+ var entityNameValue = entityNameControl.field.value;
37
+ var error = (_a = entityNameControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
38
+ var handleChange = function (_a) {
39
+ var target = _a.target;
40
+ var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
41
+ entityNameControl.field.onChange(value);
42
+ };
43
+ var clearEntityLegalName = function () {
44
+ entityNameControl.field.onChange('');
45
+ };
46
+ return (_jsx(BoxStyled, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { label: t('license_name_label'), onChange: handleChange, required: true, value: entityNameValue || '', endAdornment: _jsx(EndAdornment, { value: entityNameValue, error: error, onClear: clearEntityLegalName }), placeholder: t('license_name_hint'), warningType: 'alert', warningMessage: error && t(error) }) })));
47
+ };
48
+ export default EntityLegalName;
@@ -5,6 +5,7 @@ interface EntityListProps {
5
5
  countryList: Array<CountryCode>;
6
6
  onListOpen?: () => void;
7
7
  onListClose?: () => void;
8
+ handleAddEntity?: (flag: boolean) => void;
8
9
  }
9
- declare const _default: React.MemoExoticComponent<({ show, countryList, ...rest }: EntityListProps) => import("react/jsx-runtime").JSX.Element>;
10
+ declare const _default: React.MemoExoticComponent<({ show, countryList, handleAddEntity, ...rest }: EntityListProps) => JSX.Element>;
10
11
  export default _default;
@@ -20,6 +20,15 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
24
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
25
+ if (ar || !(i in from)) {
26
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
27
+ ar[i] = from[i];
28
+ }
29
+ }
30
+ return to.concat(ar || Array.prototype.slice.call(from));
31
+ };
23
32
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
33
  import * as React from 'react';
25
34
  import { useTranslation } from 'react-i18next';
@@ -36,6 +45,7 @@ import ExpandIcon from '../../../../components/ExpandIcon';
36
45
  import Collapse from '../../../../components/Collapse';
37
46
  import Icon from '../../../../components/Icon';
38
47
  import { connectExpressSelector } from '../../../../features/app/connectExpress/connectExpressStore';
48
+ import { ADD_ENTITY } from '../../../../constants';
39
49
  var EntityContainer = styled(Box)(function () { return ({
40
50
  display: 'flex',
41
51
  alignItems: 'center'
@@ -53,7 +63,7 @@ var EntityNameText = styled(Text, { shouldForwardProp: function (prop) { return
53
63
  });
54
64
  var EntityList = function (_a) {
55
65
  var _b, _c;
56
- var show = _a.show, countryList = _a.countryList, rest = __rest(_a, ["show", "countryList"]);
66
+ var show = _a.show, countryList = _a.countryList, handleAddEntity = _a.handleAddEntity, rest = __rest(_a, ["show", "countryList", "handleAddEntity"]);
57
67
  var _d = React.useState([]), list = _d[0], setList = _d[1];
58
68
  var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
59
69
  var t = useTranslation().t;
@@ -66,10 +76,13 @@ var EntityList = function (_a) {
66
76
  React.useEffect(function () {
67
77
  if (entityList.length > 0) {
68
78
  var filteredEntityList = entityList.filter(function (entity) { return (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_id) && entity.business_id === brandInfo.business_id; });
69
- var list_1 = filteredEntityList || [];
79
+ var list_1 = __spreadArray(__spreadArray([], filteredEntityList, true), [entityList[entityList.length - 1]], false) || [];
70
80
  setList(list_1);
71
- if (list_1.length) {
72
- setValue('entityInfo', list_1[0], { shouldValidate: true });
81
+ if (filteredEntityList.length) {
82
+ setValue('entityInfo', filteredEntityList[0], { shouldValidate: true });
83
+ setValue('licenseNumber', '');
84
+ setValue('legalName', '');
85
+ handleAddEntity === null || handleAddEntity === void 0 ? void 0 : handleAddEntity(false);
73
86
  }
74
87
  else {
75
88
  setValue('merchantInfo', undefined);
@@ -104,13 +117,19 @@ var EntityList = function (_a) {
104
117
  return '';
105
118
  return ((_a = countryList.find(function (country) { return country.iso2.toLocaleLowerCase() === entity.country.toLocaleLowerCase(); })) === null || _a === void 0 ? void 0 : _a.logo) || '';
106
119
  };
107
- var onSelectItem = function (brand) {
108
- selectedEntityControl.field.onChange(brand);
120
+ var onSelectItem = function (entity) {
121
+ selectedEntityControl.field.onChange(entity);
122
+ if (entity.id === ADD_ENTITY) {
123
+ setValue('merchantInfo', undefined);
124
+ handleAddEntity === null || handleAddEntity === void 0 ? void 0 : handleAddEntity(true);
125
+ }
126
+ else
127
+ handleAddEntity === null || handleAddEntity === void 0 ? void 0 : handleAddEntity(false);
109
128
  onCloseEntityList();
110
129
  };
111
130
  var selectedEntity = selectedEntityControl.field.value;
112
131
  return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsx(InputSelect, { label: t('select_entity_label'), onClick: !!anchorEl ? onCloseEntityList : onOpenEntityList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('select_entity_placeholder'), value: getLegalName(getValues('entityInfo')) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { space: 140, list: list, onSelectItem: onSelectItem, renderItem: function (entity) {
113
- return (_jsxs(_Fragment, { children: [_jsxs(EntityContainer, { children: [_jsx(EntityCountryFlag, { src: getCountryFlag(entity) }), _jsx(EntityNameText, __assign({ isSelected: getEntityId(entity) === getEntityId(selectedEntity) }, { children: t(getLegalName(entity)) }))] }), getEntityId(entity) === getEntityId(selectedEntity) && _jsx(CheckIcon, {})] }));
132
+ return (_jsxs(_Fragment, { children: [_jsxs(EntityContainer, { children: [(entity === null || entity === void 0 ? void 0 : entity.country) && _jsx(EntityCountryFlag, { src: getCountryFlag(entity) }), _jsx(EntityNameText, __assign({ isSelected: getEntityId(entity) === getEntityId(selectedEntity) }, { children: t(getLegalName(entity)) }))] }), getEntityId(entity) === getEntityId(selectedEntity) && _jsx(CheckIcon, {})] }));
114
133
  } }) }))] })) })));
115
134
  };
116
135
  export default React.memo(EntityList);
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const _default: React.MemoExoticComponent<() => JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { useController, useFormContext } from 'react-hook-form';
5
+ import { KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH, LICENSE_NUMBER_MAX_LENGTH, LICENSE_NUMBER_MIN_LENGTH } from '../../../../constants';
6
+ import { removeAllOtherThanCharsAndNumber, isSA } from '../../../../utils';
7
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
8
+ import ClearIcon from '../../../shared/ClearIcon';
9
+ import CheckIcon from '../../../shared/CheckIcon';
10
+ import Input from '../../../shared/Input';
11
+ import { useAppSelector } from '../../../../hooks';
12
+ import { settingsSelector } from '../../../../app/settings';
13
+ var LicenseNumber = function () {
14
+ var _a;
15
+ var t = useTranslation().t;
16
+ var control = useFormContext().control;
17
+ var licenseNumberControl = useController({ control: control, name: 'licenseNumber' });
18
+ var settingsData = useAppSelector(settingsSelector).data;
19
+ var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
20
+ var handleFLNumberChange = function (_a) {
21
+ var target = _a.target;
22
+ var value = removeAllOtherThanCharsAndNumber(target.value);
23
+ licenseNumberControl.field.onChange(value);
24
+ };
25
+ var clearLicenseNumber = function () {
26
+ licenseNumberControl.field.onChange('');
27
+ };
28
+ var licenseNumberValue = licenseNumberControl.field.value;
29
+ var error = (_a = licenseNumberControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
30
+ var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : LICENSE_NUMBER_MAX_LENGTH;
31
+ var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH : LICENSE_NUMBER_MIN_LENGTH;
32
+ var label = 'license_number';
33
+ var showCheckIcon = (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) >= minLength;
34
+ return (_jsx(ScreenContainer, { children: _jsx(Input, { label: t(label), required: true, onChange: handleFLNumberChange, inputProps: { maxLength: length }, value: licenseNumberValue || '', endAdornment: showCheckIcon ? _jsx(CheckIcon, {}) : licenseNumberValue && _jsx(ClearIcon, { onClick: clearLicenseNumber }), placeholder: t('license_number_hint'), warningType: 'alert', warningMessage: error && t(error, { length: minLength }) }) }));
35
+ };
36
+ export default React.memo(LicenseNumber);
@@ -34,6 +34,8 @@ import InputSelect from '../../../shared/InputSelect';
34
34
  import { getMerchantListAsync, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
35
35
  import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
36
36
  import CheckIcon from '../../../shared/CheckIcon';
37
+ import { ADD_ENTITY } from '../../../../constants';
38
+ import { isNetworkError } from '../../../../utils';
37
39
  var MerchantContainer = styled(Box)(function () { return ({
38
40
  display: 'flex'
39
41
  }); });
@@ -45,11 +47,12 @@ var MerchantList = React.forwardRef(function (_a, ref) {
45
47
  var _b, _c;
46
48
  var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, readOnly = _a.readOnly, isVerified = _a.isVerified;
47
49
  var _d = React.useState([]), list = _d[0], setList = _d[1];
48
- var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
50
+ var _e = React.useState(0), count = _e[0], setCount = _e[1];
51
+ var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
49
52
  var t = useTranslation().t;
50
53
  var dispatch = useAppDispatch();
51
- var _f = useFormContext(), control = _f.control, watch = _f.watch, setValue = _f.setValue, getValues = _f.getValues;
52
- var _g = useAppSelector(connectExpressSelector), data = _g.data, merchantLoading = _g.merchantLoading;
54
+ var _g = useFormContext(), control = _g.control, watch = _g.watch, setValue = _g.setValue, getValues = _g.getValues;
55
+ var _h = useAppSelector(connectExpressSelector), data = _h.data, merchantLoading = _h.merchantLoading, bckError = _h.error;
53
56
  var merchantList = (((_b = data.responseData) === null || _b === void 0 ? void 0 : _b.authenticationData) || {}).merchantList;
54
57
  var merchantInfoControl = useController({ control: control, name: 'merchantInfo' });
55
58
  var entityInfo = watch('entityInfo');
@@ -62,6 +65,16 @@ var MerchantList = React.forwardRef(function (_a, ref) {
62
65
  setList(list_1);
63
66
  }
64
67
  }, [merchantList]);
68
+ React.useEffect(function () {
69
+ if (!bckError)
70
+ return;
71
+ if (!isNetworkError(bckError) || count > 2)
72
+ return;
73
+ if ((brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id) && (entityInfo === null || entityInfo === void 0 ? void 0 : entityInfo.id)) {
74
+ setCount(count + 1);
75
+ dispatch(getMerchantListAsync({ entityId: entityInfo.id, brandId: brandInfo.id }));
76
+ }
77
+ }, [bckError]);
65
78
  React.useEffect(function () {
66
79
  var _a;
67
80
  if (!entityInfo)
@@ -71,7 +84,7 @@ var MerchantList = React.forwardRef(function (_a, ref) {
71
84
  var brandInfoId = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.id;
72
85
  var entityId = (merchantList === null || merchantList === void 0 ? void 0 : merchantList.length) > 0 ? (_a = merchantList[0]) === null || _a === void 0 ? void 0 : _a.business_entity_id : '';
73
86
  var id = (entityInfo || {}).id;
74
- if (!id)
87
+ if (!id || id === ADD_ENTITY)
75
88
  return;
76
89
  if (entityId && id && entityId !== id) {
77
90
  setValue('merchantInfo', undefined);
@@ -1,5 +1,5 @@
1
1
  import * as yup from 'yup';
2
- export declare const AuthenticationListValidationSchema: () => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
2
+ export declare const AuthenticationListValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
3
  brandInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
4
4
  entityInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
5
5
  merchantInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
@@ -12,3 +12,16 @@ export declare const AuthenticationListValidationSchema: () => yup.ObjectSchema<
12
12
  entityInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
13
13
  merchantInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
14
14
  }>>>;
15
+ export declare const AddEntityValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
16
+ brandInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
17
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
18
+ legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
19
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
20
+ brandInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
21
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
22
+ legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
23
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
24
+ brandInfo: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
25
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
26
+ legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
27
+ }>>>;
@@ -1,8 +1,33 @@
1
1
  import * as yup from 'yup';
2
- export var AuthenticationListValidationSchema = function () {
3
- return yup.object().shape({
4
- brandInfo: yup.object().required('auth_brand_required'),
5
- entityInfo: yup.object().required('auth_entity_required'),
6
- merchantInfo: yup.object().required('auth_merchant_required')
7
- });
8
- };
2
+ import { LICENSE_NUMBER_MIN_LENGTH, REGEX_LEGAL_NAME } from '../../../../constants';
3
+ export var AuthenticationListValidationSchema = yup.object().shape({
4
+ brandInfo: yup.object().required('auth_brand_required'),
5
+ entityInfo: yup.object().required('auth_entity_required'),
6
+ merchantInfo: yup.object().required('auth_merchant_required')
7
+ });
8
+ export var AddEntityValidationSchema = yup.object().shape({
9
+ brandInfo: yup.object().required('auth_brand_required'),
10
+ licenseNumber: yup
11
+ .string()
12
+ .test({
13
+ test: function (value) {
14
+ var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
15
+ if (length === 0)
16
+ return true;
17
+ return length >= LICENSE_NUMBER_MIN_LENGTH ? true : this.createError({ message: 'enter_license_number' });
18
+ }
19
+ })
20
+ .required(''),
21
+ legalName: yup
22
+ .string()
23
+ .required('')
24
+ .test({
25
+ test: function (value) {
26
+ var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
27
+ if (length === 0)
28
+ return true;
29
+ return (value === null || value === void 0 ? void 0 : value.match(REGEX_LEGAL_NAME)) && length >= 3 ? true : this.createError({ message: 'enter_valid_legal_name' });
30
+ }
31
+ })
32
+ .required('')
33
+ });
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  interface BrandProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: BrandProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: BrandProps) => JSX.Element>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface BusinessCountryScreenProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: BusinessCountryScreenProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: BusinessCountryScreenProps) => JSX.Element>;
5
5
  export default _default;
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
27
+ while (_) try {
28
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
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface CivilIDProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: CivilIDProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: CivilIDProps) => JSX.Element>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface CivilIDProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: CivilIDProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: CivilIDProps) => JSX.Element>;
5
5
  export default _default;
@@ -5,5 +5,5 @@ interface BrandNameProps {
5
5
  brandNameChecking: boolean;
6
6
  readOnly?: boolean;
7
7
  }
8
- declare const _default: React.MemoExoticComponent<({ show, brandNameChecking, fetchingBrandName, readOnly }: BrandNameProps) => import("react/jsx-runtime").JSX.Element>;
8
+ declare const _default: React.MemoExoticComponent<({ show, brandNameChecking, fetchingBrandName, readOnly }: BrandNameProps) => JSX.Element>;
9
9
  export default _default;
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
27
+ while (_) try {
28
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
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface CollectBusinessInfoProps {
3
3
  }
4
- declare const _default: React.MemoExoticComponent<({}: CollectBusinessInfoProps) => import("react/jsx-runtime").JSX.Element>;
4
+ declare const _default: React.MemoExoticComponent<({}: CollectBusinessInfoProps) => JSX.Element>;
5
5
  export default _default;
@@ -5,5 +5,5 @@ interface LicenseListProps {
5
5
  onListClose?: () => void;
6
6
  readOnly?: boolean;
7
7
  }
8
- declare const _default: React.MemoExoticComponent<({ readOnly, ...rest }: LicenseListProps) => import("react/jsx-runtime").JSX.Element>;
8
+ declare const _default: React.MemoExoticComponent<({ readOnly, ...rest }: LicenseListProps) => JSX.Element>;
9
9
  export default _default;
@@ -3,5 +3,5 @@ interface LicenseNumberProps {
3
3
  show: boolean;
4
4
  readOnly?: boolean;
5
5
  }
6
- declare const _default: React.MemoExoticComponent<({ show, readOnly }: LicenseNumberProps) => import("react/jsx-runtime").JSX.Element>;
6
+ declare const _default: React.MemoExoticComponent<({ show, readOnly }: LicenseNumberProps) => JSX.Element>;
7
7
  export default _default;