@tap-payments/auth-jsconnect 2.0.47-test → 2.0.47

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 (711) hide show
  1. package/README.md +34 -34
  2. package/build/@types/app.d.ts +165 -27
  3. package/build/@types/app.js +44 -3
  4. package/build/@types/form.d.ts +88 -32
  5. package/build/@types/index.d.ts +1 -0
  6. package/build/@types/index.js +1 -0
  7. package/build/@types/theme.d.ts +1 -1
  8. package/build/@types/user.d.ts +141 -0
  9. package/build/@types/user.js +1 -0
  10. package/build/api/account.d.ts +6 -1
  11. package/build/api/account.js +9 -1
  12. package/build/api/auth.d.ts +42 -21
  13. package/build/api/auth.js +51 -4
  14. package/build/api/availabilityServices.d.ts +3 -3
  15. package/build/api/axios.js +3 -3
  16. package/build/api/board.d.ts +20 -3
  17. package/build/api/board.js +17 -1
  18. package/build/api/brand.d.ts +3 -1
  19. package/build/api/brand.js +18 -1
  20. package/build/api/country.d.ts +7 -1
  21. package/build/api/country.js +12 -2
  22. package/build/api/data.d.ts +46 -7
  23. package/build/api/data.js +73 -17
  24. package/build/api/entity.d.ts +91 -15
  25. package/build/api/entity.js +50 -10
  26. package/build/api/file.d.ts +13 -0
  27. package/build/api/file.js +24 -0
  28. package/build/api/firebase.d.ts +1 -1
  29. package/build/api/firebase.js +3 -1
  30. package/build/api/index.d.ts +75 -19
  31. package/build/api/index.js +5 -3
  32. package/build/api/individual.d.ts +136 -23
  33. package/build/api/individual.js +37 -2
  34. package/build/api/lead.d.ts +25 -16
  35. package/build/api/lead.js +24 -1
  36. package/build/api/location.d.ts +5 -0
  37. package/build/api/location.js +19 -0
  38. package/build/api/operator.d.ts +1 -1
  39. package/build/api/operator.js +1 -1
  40. package/build/api/user.d.ts +7 -1
  41. package/build/api/user.js +9 -1
  42. package/build/app/rootReducer.d.ts +2 -2
  43. package/build/app/rootReducer.js +4 -4
  44. package/build/app/settings.d.ts +20 -2
  45. package/build/app/settings.js +51 -33
  46. package/build/app/store.d.ts +9 -9
  47. package/build/assets/locales/ar.json +323 -183
  48. package/build/assets/locales/en.json +258 -108
  49. package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
  50. package/build/components/AnimationFlow/AnimationFlow.js +6 -8
  51. package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
  52. package/build/components/AnimationFlow/BottomSheet.js +4 -3
  53. package/build/components/AnimationFlow/Dialog.d.ts +4 -1
  54. package/build/components/AnimationFlow/Dialog.js +5 -3
  55. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
  56. package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
  57. package/build/components/ArabicDatePicker/index.d.ts +2 -0
  58. package/build/components/ArabicDatePicker/index.js +2 -0
  59. package/build/components/ArabicDatePicker/style.css +24 -0
  60. package/build/components/Button/Button.js +1 -5
  61. package/build/components/DatePicker/DatePicker.js +5 -3
  62. package/build/components/FileInput/DragAndDrop.d.ts +12 -2
  63. package/build/components/FileInput/DragAndDrop.js +109 -11
  64. package/build/components/Lottie/Lottie.d.ts +4204 -0
  65. package/build/components/Lottie/Lottie.js +66 -0
  66. package/build/components/Lottie/files/account_creating.json +732 -0
  67. package/build/components/Lottie/files/error.json +692 -0
  68. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  69. package/build/components/Lottie/files/start_loading.json +1140 -0
  70. package/build/components/Lottie/files/still_loading.json +1140 -0
  71. package/build/components/Lottie/files/success.json +425 -0
  72. package/build/components/Lottie/index.d.ts +3 -0
  73. package/build/components/Lottie/index.js +3 -0
  74. package/build/components/OTPField/OTPField.d.ts +2 -1
  75. package/build/components/OTPField/OTPField.js +2 -2
  76. package/build/components/OTPTimer/OTPTimer.js +1 -1
  77. package/build/components/ProgressBar/CircularProgressBar.d.ts +16 -0
  78. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  79. package/build/components/ProgressBar/index.d.ts +2 -0
  80. package/build/components/ProgressBar/index.js +2 -0
  81. package/build/components/Radio/Radio.js +1 -1
  82. package/build/components/RadioLabel/RadioLabel.d.ts +5 -2
  83. package/build/components/RadioLabel/RadioLabel.js +2 -2
  84. package/build/components/SimpleList/SimpleList.d.ts +4 -1
  85. package/build/components/SimpleList/SimpleList.js +22 -10
  86. package/build/components/Slide/Slide.d.ts +1 -1
  87. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -6
  88. package/build/components/SocialMediaGroup/SocialMediaGroup.js +4 -49
  89. package/build/components/Tooltip/Tooltip.d.ts +1 -1
  90. package/build/components/Tooltip/Tooltip.js +12 -3
  91. package/build/constants/api.d.ts +14 -0
  92. package/build/constants/api.js +30 -2
  93. package/build/constants/app.d.ts +27 -4
  94. package/build/constants/app.js +248 -39
  95. package/build/constants/assets.d.ts +21 -0
  96. package/build/constants/assets.js +23 -2
  97. package/build/constants/dummy.d.ts +1 -1
  98. package/build/constants/dummy.js +2 -2
  99. package/build/constants/validation.d.ts +13 -0
  100. package/build/constants/validation.js +14 -1
  101. package/build/features/app/bank/bankStore.d.ts +88 -15
  102. package/build/features/app/bank/bankStore.js +108 -81
  103. package/build/features/app/brand/brandStore.d.ts +193 -0
  104. package/build/features/app/brand/brandStore.js +674 -0
  105. package/build/features/app/business/businessStore.d.ts +200 -20
  106. package/build/features/app/business/businessStore.js +514 -363
  107. package/build/features/app/connect/connectStore.d.ts +148 -40
  108. package/build/features/app/connect/connectStore.js +465 -374
  109. package/build/features/app/connectExpress/connectExpressStore.d.ts +282 -0
  110. package/build/features/app/connectExpress/connectExpressStore.js +1019 -0
  111. package/build/features/app/entity/entityStore.d.ts +129 -18
  112. package/build/features/app/entity/entityStore.js +438 -192
  113. package/build/features/app/individual/individualStore.d.ts +186 -16
  114. package/build/features/app/individual/individualStore.js +767 -159
  115. package/build/features/app/password/passwordStore.d.ts +107 -24
  116. package/build/features/app/password/passwordStore.js +50 -34
  117. package/build/features/app/signIn/signInStore.d.ts +61 -7
  118. package/build/features/app/signIn/signInStore.js +24 -47
  119. package/build/features/app/tax/taxStore.d.ts +69 -9
  120. package/build/features/app/tax/taxStore.js +121 -102
  121. package/build/features/bank/Bank.d.ts +5 -3
  122. package/build/features/bank/Bank.js +39 -36
  123. package/build/features/bank/screens/BankDetails/BankDetails.js +28 -10
  124. package/build/features/bank/screens/BankDetails/BankName.js +15 -11
  125. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +4 -1
  126. package/build/features/bank/screens/BankDetails/BankStatement.js +19 -13
  127. package/build/features/bank/screens/BankDetails/Beneficiary.js +19 -21
  128. package/build/features/bank/screens/BankDetails/IBAN.js +16 -9
  129. package/build/features/bank/screens/BankDetails/validation.d.ts +29 -13
  130. package/build/features/bank/screens/BankDetails/validation.js +34 -28
  131. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  132. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  133. package/build/features/bank/screens/PrepareDataLoading/index.d.ts +2 -0
  134. package/build/features/bank/screens/PrepareDataLoading/index.js +2 -0
  135. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  136. package/build/features/bank/screens/Success/Success.js +7 -3
  137. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
  138. package/build/features/brand/Brand.d.ts +9 -0
  139. package/build/features/brand/Brand.js +72 -0
  140. package/build/features/brand/index.d.ts +1 -0
  141. package/build/features/brand/index.js +1 -0
  142. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +91 -0
  143. package/build/features/{entity/screens/EntityInfoConfirm → brand/screens/BrandActivities}/ActivitiesList.js +58 -33
  144. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
  145. package/build/features/brand/screens/BrandActivities/BrandActivities.js +82 -0
  146. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
  147. package/build/features/brand/screens/BrandActivities/CustomerBase.js +146 -0
  148. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +8 -0
  149. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +97 -0
  150. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +8 -0
  151. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +133 -0
  152. package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +20 -0
  153. package/build/features/brand/screens/BrandActivities/OperationStartDate.js +45 -0
  154. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +36 -0
  155. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +82 -0
  156. package/build/features/brand/screens/BrandActivities/TAC.d.ts +6 -0
  157. package/build/features/brand/screens/BrandActivities/TAC.js +84 -0
  158. package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +3 -0
  159. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +42 -0
  160. package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
  161. package/build/features/brand/screens/BrandActivities/index.js +2 -0
  162. package/build/features/brand/screens/BrandActivities/validation.d.ts +71 -0
  163. package/build/features/brand/screens/BrandActivities/validation.js +32 -0
  164. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
  165. package/build/features/brand/screens/BrandInfo/BrandInfo.js +79 -0
  166. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
  167. package/build/features/brand/screens/BrandInfo/BrandName.js +143 -0
  168. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
  169. package/build/features/brand/screens/BrandInfo/SalesChannels.js +42 -0
  170. package/build/features/brand/screens/BrandInfo/Segments.d.ts +8 -0
  171. package/build/features/brand/screens/BrandInfo/Segments.js +74 -0
  172. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +8 -0
  173. package/build/features/brand/screens/BrandInfo/TeamSize.js +74 -0
  174. package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
  175. package/build/features/brand/screens/BrandInfo/index.js +2 -0
  176. package/build/features/brand/screens/BrandInfo/validation.d.ts +41 -0
  177. package/build/features/brand/screens/BrandInfo/validation.js +116 -0
  178. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  179. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  180. package/build/features/brand/screens/PrepareDataLoading/index.d.ts +2 -0
  181. package/build/features/brand/screens/PrepareDataLoading/index.js +2 -0
  182. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  183. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -0
  184. package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
  185. package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
  186. package/build/features/brand/screens/Success/Success.d.ts +5 -0
  187. package/build/features/brand/screens/Success/Success.js +20 -0
  188. package/build/features/brand/screens/Success/index.d.ts +3 -0
  189. package/build/features/brand/screens/Success/index.js +2 -0
  190. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  191. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -0
  192. package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  193. package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
  194. package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
  195. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/OTPInput.js +2 -2
  196. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/Verify.d.ts +0 -0
  197. package/build/features/brand/screens/Verify/Verify.js +91 -0
  198. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.d.ts +0 -0
  199. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.js +0 -0
  200. package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.d.ts +0 -0
  201. package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.js +0 -0
  202. package/build/features/business/Business.d.ts +4 -3
  203. package/build/features/business/Business.js +12 -17
  204. package/build/features/business/screens/Activities/Activities.js +8 -17
  205. package/build/features/business/screens/Activities/ActivitiesList.d.ts +44 -8
  206. package/build/features/business/screens/Activities/ActivitiesList.js +49 -16
  207. package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
  208. package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
  209. package/build/features/business/screens/Activities/validation.d.ts +0 -51
  210. package/build/features/business/screens/Activities/validation.js +4 -10
  211. package/build/features/business/screens/BusinessType/Article.d.ts +6 -0
  212. package/build/features/business/screens/BusinessType/Article.js +87 -0
  213. package/build/features/business/screens/BusinessType/BusinessType.js +23 -9
  214. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  215. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  216. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  217. package/build/features/business/screens/BusinessType/LicenseCertificate.js +43 -0
  218. package/build/features/business/screens/BusinessType/LicenseList.js +27 -7
  219. package/build/features/business/screens/BusinessType/LicenseNumber.js +12 -6
  220. package/build/features/business/screens/BusinessType/LicenseType.d.ts +34 -0
  221. package/build/features/business/screens/BusinessType/LicenseType.js +103 -0
  222. package/build/features/business/screens/BusinessType/validation.d.ts +22 -0
  223. package/build/features/business/screens/BusinessType/validation.js +60 -3
  224. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
  225. package/build/features/business/screens/CivilID/CivilID.js +67 -0
  226. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
  227. package/build/features/business/screens/CivilID/IDNumber.js +59 -0
  228. package/build/features/business/screens/CivilID/index.d.ts +3 -0
  229. package/build/features/business/screens/CivilID/index.js +2 -0
  230. package/build/features/business/screens/CivilID/validation.d.ts +8 -0
  231. package/build/features/business/screens/CivilID/validation.js +4 -0
  232. package/build/features/business/screens/Customers/CustomerLocations.d.ts +24 -11
  233. package/build/features/business/screens/Customers/CustomerLocations.js +31 -8
  234. package/build/features/business/screens/Customers/Customers.js +15 -9
  235. package/build/features/business/screens/Customers/ExpectedCustomers.js +15 -4
  236. package/build/features/business/screens/Customers/ExpectedSalesRange.js +36 -15
  237. package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
  238. package/build/features/business/screens/Customers/RefundPolicy.js +6 -2
  239. package/build/features/business/screens/Customers/TransactionPolicy.js +6 -2
  240. package/build/features/business/screens/IDBOD/IDBOD.js +15 -2
  241. package/build/features/business/screens/OTP/OTP.js +15 -2
  242. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  243. package/build/features/business/screens/Success/Success.js +10 -3
  244. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
  245. package/build/features/business/screens/Verify/Verify.js +4 -4
  246. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  247. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +34 -0
  248. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
  249. package/build/features/business/screens/VerifyPACI/index.js +2 -0
  250. package/build/features/connect/Connect.d.ts +4 -4
  251. package/build/features/connect/Connect.js +32 -21
  252. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  253. package/build/features/connect/screens/CivilID/CivilID.js +102 -0
  254. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  255. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  256. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  257. package/build/features/connect/screens/CivilID/index.js +2 -0
  258. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  259. package/build/features/connect/screens/CivilID/validation.js +4 -0
  260. package/build/features/connect/screens/Individual/Email.js +12 -4
  261. package/build/features/connect/screens/Individual/Individual.js +46 -29
  262. package/build/features/connect/screens/Individual/validation.js +2 -8
  263. package/build/features/connect/screens/Merchant/BrandList.js +29 -8
  264. package/build/features/connect/screens/Merchant/BrandName.js +13 -9
  265. package/build/features/connect/screens/Merchant/Merchant.js +46 -73
  266. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +4 -4
  267. package/build/features/connect/screens/Merchant/SalesChannels.js +26 -102
  268. package/build/features/connect/screens/Merchant/Segments.d.ts +8 -0
  269. package/build/features/connect/screens/Merchant/Segments.js +74 -0
  270. package/build/features/connect/screens/Merchant/TAC.js +6 -2
  271. package/build/features/connect/screens/Merchant/TeamSize.d.ts +8 -0
  272. package/build/features/connect/screens/Merchant/TeamSize.js +74 -0
  273. package/build/features/connect/screens/Merchant/validation.d.ts +19 -123
  274. package/build/features/connect/screens/Merchant/validation.js +110 -173
  275. package/build/features/connect/screens/Mobile/Mobile.js +33 -12
  276. package/build/features/connect/screens/NID/NID.js +5 -1
  277. package/build/features/connect/screens/OTP/OTP.js +20 -6
  278. package/build/features/connect/screens/OTP/OTPInput.js +3 -2
  279. package/build/features/connect/screens/ThankYou/ThankYou.js +9 -2
  280. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  281. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +95 -0
  282. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  283. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  284. package/build/features/connectExpress/ConnectExpress.d.ts +11 -0
  285. package/build/features/connectExpress/ConnectExpress.js +84 -0
  286. package/build/features/connectExpress/index.d.ts +1 -0
  287. package/build/features/connectExpress/index.js +1 -0
  288. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +5 -0
  289. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +15 -0
  290. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.d.ts +3 -0
  291. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.js +2 -0
  292. package/build/features/connectExpress/screens/Brand/Brand.d.ts +5 -0
  293. package/build/features/connectExpress/screens/Brand/Brand.js +71 -0
  294. package/build/features/connectExpress/screens/Brand/index.d.ts +2 -0
  295. package/build/features/connectExpress/screens/Brand/index.js +2 -0
  296. package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +5 -0
  297. package/build/features/connectExpress/screens/CivilID/CivilID.js +84 -0
  298. package/build/features/connectExpress/screens/CivilID/IDNumber.d.ts +7 -0
  299. package/build/features/connectExpress/screens/CivilID/IDNumber.js +55 -0
  300. package/build/features/connectExpress/screens/CivilID/index.d.ts +3 -0
  301. package/build/features/connectExpress/screens/CivilID/index.js +2 -0
  302. package/build/features/connectExpress/screens/CivilID/validation.d.ts +8 -0
  303. package/build/features/connectExpress/screens/CivilID/validation.js +4 -0
  304. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +5 -0
  305. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +53 -0
  306. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.d.ts +7 -0
  307. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +55 -0
  308. package/build/features/connectExpress/screens/CivilIDMissed/index.d.ts +3 -0
  309. package/build/features/connectExpress/screens/CivilIDMissed/index.js +2 -0
  310. package/build/features/connectExpress/screens/CivilIDMissed/validation.d.ts +8 -0
  311. package/build/features/connectExpress/screens/CivilIDMissed/validation.js +4 -0
  312. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +8 -0
  313. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +140 -0
  314. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
  315. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +80 -0
  316. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +8 -0
  317. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +144 -0
  318. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +7 -0
  319. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +52 -0
  320. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +34 -0
  321. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +94 -0
  322. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +6 -0
  323. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +83 -0
  324. package/build/features/connectExpress/screens/CollectBusinessInfo/index.d.ts +3 -0
  325. package/build/features/connectExpress/screens/CollectBusinessInfo/index.js +2 -0
  326. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +27 -0
  327. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +155 -0
  328. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +5 -0
  329. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +89 -0
  330. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +8 -0
  331. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +113 -0
  332. package/build/features/{individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts → connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts} +2 -2
  333. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +149 -0
  334. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +6 -0
  335. package/build/features/{individual/screens/AdditionalIndividualInfo/EmployerName.js → connectExpress/screens/CollectIndividualInfo/Name.js} +15 -16
  336. package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
  337. package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
  338. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
  339. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
  340. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
  341. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +34 -0
  342. package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
  343. package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
  344. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.d.ts +0 -0
  345. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.js +26 -11
  346. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.d.ts +0 -0
  347. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.js +10 -2
  348. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.d.ts +0 -0
  349. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.js +0 -0
  350. package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.d.ts +0 -0
  351. package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.js +0 -0
  352. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +5 -0
  353. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +34 -0
  354. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.d.ts +3 -0
  355. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.js +2 -0
  356. package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +5 -0
  357. package/build/features/connectExpress/screens/Mobile/Mobile.js +110 -0
  358. package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +12 -0
  359. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +151 -0
  360. package/build/features/connectExpress/screens/Mobile/TAC.d.ts +6 -0
  361. package/build/features/connectExpress/screens/Mobile/TAC.js +83 -0
  362. package/build/features/connectExpress/screens/Mobile/Title.d.ts +8 -0
  363. package/build/features/connectExpress/screens/Mobile/Title.js +29 -0
  364. package/build/features/connectExpress/screens/Mobile/index.d.ts +3 -0
  365. package/build/features/connectExpress/screens/Mobile/index.js +2 -0
  366. package/build/features/connectExpress/screens/Mobile/validation.d.ts +8 -0
  367. package/build/features/connectExpress/screens/Mobile/validation.js +60 -0
  368. package/build/features/connectExpress/screens/NID/DOB.d.ts +6 -0
  369. package/build/features/connectExpress/screens/NID/DOB.js +47 -0
  370. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +6 -0
  371. package/build/features/connectExpress/screens/NID/IDNumber.js +61 -0
  372. package/build/features/connectExpress/screens/NID/NID.d.ts +5 -0
  373. package/build/features/connectExpress/screens/NID/NID.js +92 -0
  374. package/build/features/connectExpress/screens/NID/TAC.d.ts +6 -0
  375. package/build/features/connectExpress/screens/NID/TAC.js +83 -0
  376. package/build/features/connectExpress/screens/NID/index.d.ts +3 -0
  377. package/build/features/connectExpress/screens/NID/index.js +2 -0
  378. package/build/features/connectExpress/screens/NID/validation.d.ts +11 -0
  379. package/build/features/connectExpress/screens/NID/validation.js +22 -0
  380. package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +6 -0
  381. package/build/features/connectExpress/screens/NIDMissed/DOB.js +47 -0
  382. package/build/features/connectExpress/screens/NIDMissed/IDNumber.d.ts +6 -0
  383. package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +56 -0
  384. package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
  385. package/build/features/connectExpress/screens/NIDMissed/NID.js +59 -0
  386. package/build/features/connectExpress/screens/NIDMissed/index.d.ts +3 -0
  387. package/build/features/connectExpress/screens/NIDMissed/index.js +2 -0
  388. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +11 -0
  389. package/build/features/connectExpress/screens/NIDMissed/validation.js +9 -0
  390. package/build/features/connectExpress/screens/OTP/OTP.d.ts +5 -0
  391. package/build/features/connectExpress/screens/OTP/OTP.js +88 -0
  392. package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +5 -0
  393. package/build/features/connectExpress/screens/OTP/OTPInput.js +55 -0
  394. package/build/features/connectExpress/screens/OTP/index.d.ts +3 -0
  395. package/build/features/connectExpress/screens/OTP/index.js +2 -0
  396. package/build/features/connectExpress/screens/OTP/validation.d.ts +8 -0
  397. package/build/features/connectExpress/screens/OTP/validation.js +4 -0
  398. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  399. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
  400. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  401. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.js +2 -0
  402. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  403. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +34 -0
  404. package/build/features/connectExpress/screens/VerifyPACI/index.d.ts +3 -0
  405. package/build/features/connectExpress/screens/VerifyPACI/index.js +2 -0
  406. package/build/features/entity/Entity.d.ts +5 -3
  407. package/build/features/entity/Entity.js +39 -37
  408. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +90 -0
  409. package/build/features/entity/screens/EntityCapital/ActivityList.js +175 -0
  410. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +5 -0
  411. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +47 -0
  412. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +5 -0
  413. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +42 -0
  414. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +5 -0
  415. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +47 -0
  416. package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
  417. package/build/features/entity/screens/EntityCapital/EntityCapital.js +75 -0
  418. package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
  419. package/build/features/entity/screens/EntityCapital/index.js +2 -0
  420. package/build/features/entity/screens/EntityCapital/validation.d.ts +62 -0
  421. package/build/features/entity/screens/EntityCapital/validation.js +21 -0
  422. package/build/features/entity/screens/EntityName/Article.d.ts +6 -0
  423. package/build/features/entity/screens/EntityName/Article.js +87 -0
  424. package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
  425. package/build/features/entity/screens/EntityName/EntityName.js +93 -0
  426. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +90 -0
  427. package/build/features/entity/screens/EntityName/EntityTypeList.js +151 -0
  428. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +19 -0
  429. package/build/features/entity/screens/EntityName/ExpiryDate.js +46 -0
  430. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +19 -0
  431. package/build/features/entity/screens/EntityName/IssuingDate.js +46 -0
  432. package/build/features/entity/screens/EntityName/LegalName.d.ts +5 -0
  433. package/build/features/entity/screens/EntityName/LegalName.js +48 -0
  434. package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +6 -0
  435. package/build/features/entity/screens/EntityName/LicenseCertificate.js +48 -0
  436. package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +6 -0
  437. package/build/features/entity/screens/EntityName/LicenseNumber.js +51 -0
  438. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +6 -0
  439. package/build/features/entity/screens/EntityName/UnifiedNumber.js +43 -0
  440. package/build/features/entity/screens/EntityName/index.d.ts +2 -0
  441. package/build/features/entity/screens/EntityName/index.js +2 -0
  442. package/build/features/entity/screens/EntityName/validation.d.ts +60 -0
  443. package/build/features/entity/screens/EntityName/validation.js +116 -0
  444. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  445. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  446. package/build/features/entity/screens/PrepareDataLoading/index.d.ts +2 -0
  447. package/build/features/entity/screens/PrepareDataLoading/index.js +2 -0
  448. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  449. package/build/features/entity/screens/Success/Success.js +7 -3
  450. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
  451. package/build/features/entity/screens/Verify/Verify.js +18 -5
  452. package/build/features/featuresScreens.d.ts +2 -2
  453. package/build/features/featuresScreens.js +161 -14
  454. package/build/features/individual/Individual.d.ts +5 -3
  455. package/build/features/individual/Individual.js +39 -37
  456. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +13 -0
  457. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +64 -46
  458. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +3 -0
  459. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +35 -0
  460. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +12 -1
  461. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +19 -7
  462. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -7
  463. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +28 -0
  464. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +31 -1
  465. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +6 -0
  466. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +35 -0
  467. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +6 -0
  468. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +41 -0
  469. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +6 -0
  470. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +48 -0
  471. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +10 -7
  472. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +31 -23
  473. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +19 -23
  474. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +10 -0
  475. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +31 -0
  476. package/build/features/individual/screens/IndividualList/Email.d.ts +6 -0
  477. package/build/features/individual/screens/IndividualList/Email.js +48 -0
  478. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
  479. package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
  480. package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
  481. package/build/features/individual/screens/IndividualList/MobileNumber.js +143 -0
  482. package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
  483. package/build/features/individual/screens/IndividualList/UserList.js +186 -0
  484. package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
  485. package/build/features/individual/screens/IndividualList/index.js +2 -0
  486. package/build/features/individual/screens/IndividualList/validation.d.ts +12 -0
  487. package/build/features/individual/screens/IndividualList/validation.js +39 -0
  488. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +8 -0
  489. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +109 -0
  490. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +10 -0
  491. package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/BirthCountry.js} +14 -24
  492. package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +7 -0
  493. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
  494. package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +6 -0
  495. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +50 -0
  496. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +7 -0
  497. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +50 -0
  498. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +34 -0
  499. package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +81 -0
  500. package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +6 -0
  501. package/build/features/individual/screens/IndividualPersonalInfo/ID.js +48 -0
  502. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
  503. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +139 -0
  504. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +10 -0
  505. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +88 -0
  506. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +10 -0
  507. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +145 -0
  508. package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +6 -0
  509. package/build/features/individual/screens/IndividualPersonalInfo/Name.js +52 -0
  510. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +10 -0
  511. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +88 -0
  512. package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
  513. package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
  514. package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
  515. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
  516. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  517. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  518. package/build/features/individual/screens/PrepareDataLoading/index.d.ts +2 -0
  519. package/build/features/individual/screens/PrepareDataLoading/index.js +2 -0
  520. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  521. package/build/features/individual/screens/Success/Success.js +7 -3
  522. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
  523. package/build/features/individual/screens/Verify/Verify.js +13 -7
  524. package/build/features/password/Password.d.ts +5 -3
  525. package/build/features/password/Password.js +12 -17
  526. package/build/features/password/screens/CreatePassword/CreatePassword.js +16 -3
  527. package/build/features/password/screens/OTP/OTP.js +15 -2
  528. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  529. package/build/features/password/screens/Success/Success.js +7 -3
  530. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -94
  531. package/build/features/password/screens/Verify/Verify.js +16 -3
  532. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
  533. package/build/features/shared/Address/Address.d.ts +16 -0
  534. package/build/features/shared/Address/Address.js +73 -0
  535. package/build/features/shared/Address/CountryList.d.ts +72 -0
  536. package/build/features/shared/Address/CountryList.js +89 -0
  537. package/build/features/shared/Address/InputSelect.d.ts +71 -0
  538. package/build/features/shared/Address/InputSelect.js +172 -0
  539. package/build/features/shared/Address/InputText.d.ts +12 -0
  540. package/build/features/shared/Address/InputText.js +12 -0
  541. package/build/features/shared/Address/index.d.ts +2 -0
  542. package/build/features/shared/Address/index.js +2 -0
  543. package/build/features/shared/Background/Background.d.ts +2 -5
  544. package/build/features/shared/Background/Background.js +7 -9
  545. package/build/features/shared/Button/Button.js +13 -3
  546. package/build/features/shared/Button/EmailProvidersButtons.d.ts +3 -2
  547. package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
  548. package/build/features/shared/Button/FlowsButtons.d.ts +4 -1
  549. package/build/features/shared/Button/FlowsButtons.js +43 -11
  550. package/build/features/shared/Button/ListButton.d.ts +18 -0
  551. package/build/features/shared/Button/ListButton.js +125 -0
  552. package/build/features/shared/Button/MobileButton.d.ts +2 -1
  553. package/build/features/shared/Button/MobileButton.js +2 -2
  554. package/build/features/shared/Button/index.d.ts +2 -1
  555. package/build/features/shared/Button/index.js +2 -1
  556. package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
  557. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  558. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +7 -0
  559. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +58 -0
  560. package/build/features/shared/CreateAccountLoading/index.d.ts +2 -0
  561. package/build/features/shared/CreateAccountLoading/index.js +2 -0
  562. package/build/features/shared/DataLoading/DataLoading.d.ts +6 -0
  563. package/build/features/shared/DataLoading/DataLoading.js +58 -0
  564. package/build/features/shared/DataLoading/index.d.ts +2 -0
  565. package/build/features/shared/DataLoading/index.js +2 -0
  566. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  567. package/build/features/shared/Dialog/CloseDialog.js +71 -0
  568. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  569. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  570. package/build/features/shared/Dialog/index.d.ts +4 -0
  571. package/build/features/shared/Dialog/index.js +4 -0
  572. package/build/features/shared/Footer/Footer.js +1 -1
  573. package/build/features/shared/GenericError/GenericError.d.ts +7 -0
  574. package/build/features/shared/GenericError/GenericError.js +55 -0
  575. package/build/features/shared/GenericError/index.d.ts +2 -0
  576. package/build/features/shared/GenericError/index.js +2 -0
  577. package/build/features/shared/Input/Input.d.ts +9 -7
  578. package/build/features/shared/Input/Input.js +2 -2
  579. package/build/features/shared/PaciVerification/PaciVerification.d.ts +12 -0
  580. package/build/features/shared/PaciVerification/PaciVerification.js +91 -0
  581. package/build/features/shared/PaciVerification/VerifyPACILoading.d.ts +7 -0
  582. package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
  583. package/build/features/shared/PaciVerification/VerifyPACISuccess.d.ts +5 -0
  584. package/build/features/shared/PaciVerification/VerifyPACISuccess.js +8 -0
  585. package/build/features/shared/PaciVerification/index.d.ts +2 -0
  586. package/build/features/shared/PaciVerification/index.js +2 -0
  587. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +11 -0
  588. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +100 -0
  589. package/build/features/shared/SalesChannels/SalesChannel.d.ts +12 -0
  590. package/build/features/shared/SalesChannels/SalesChannel.js +149 -0
  591. package/build/features/shared/SalesChannels/index.d.ts +2 -0
  592. package/build/features/shared/SalesChannels/index.js +2 -0
  593. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +17 -0
  594. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +115 -0
  595. package/build/features/shared/SuccessFlowButtons/index.d.ts +2 -0
  596. package/build/features/shared/SuccessFlowButtons/index.js +2 -0
  597. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
  598. package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
  599. package/build/features/shared/UploadFile/UploadFile.d.ts +14 -6
  600. package/build/features/shared/UploadFile/UploadFile.js +32 -17
  601. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +38 -0
  602. package/build/features/shared/UploadMultipleFile/UploadFile.js +184 -0
  603. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +32 -0
  604. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +171 -0
  605. package/build/features/shared/UploadMultipleFile/index.d.ts +2 -0
  606. package/build/features/shared/UploadMultipleFile/index.js +2 -0
  607. package/build/features/signIn/SignIn.d.ts +4 -3
  608. package/build/features/signIn/SignIn.js +12 -18
  609. package/build/features/signIn/screens/Email/Email.js +4 -2
  610. package/build/features/signIn/screens/Mobile/Mobile.js +5 -1
  611. package/build/features/signIn/screens/OTP/OTP.js +14 -1
  612. package/build/features/signIn/screens/Password/Password.js +15 -2
  613. package/build/features/tax/Tax.d.ts +5 -3
  614. package/build/features/tax/Tax.js +39 -38
  615. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  616. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  617. package/build/features/tax/screens/PrepareDataLoading/index.d.ts +2 -0
  618. package/build/features/tax/screens/PrepareDataLoading/index.js +2 -0
  619. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  620. package/build/features/tax/screens/Success/Success.js +9 -3
  621. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
  622. package/build/features/tax/screens/TaxDetails/TaxDetails.js +23 -11
  623. package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +6 -0
  624. package/build/features/tax/screens/TaxDetails/TaxDocument.js +48 -0
  625. package/build/features/tax/screens/TaxDetails/VATId.js +14 -4
  626. package/build/features/tax/screens/TaxDetails/validation.d.ts +7 -4
  627. package/build/features/tax/screens/TaxDetails/validation.js +10 -4
  628. package/build/features/tax/screens/Verify/Verify.js +16 -3
  629. package/build/hooks/index.d.ts +5 -0
  630. package/build/hooks/index.js +5 -0
  631. package/build/hooks/useAppConfig.d.ts +5 -1
  632. package/build/hooks/useAppConfig.js +6 -4
  633. package/build/hooks/useAppDispatch.d.ts +2 -2
  634. package/build/hooks/useCountUp.d.ts +9 -0
  635. package/build/hooks/useCountUp.js +17 -0
  636. package/build/hooks/useCountry.d.ts +4 -0
  637. package/build/hooks/useCountry.js +7 -0
  638. package/build/hooks/useErrorListener.js +0 -6
  639. package/build/hooks/useScreen.d.ts +3 -0
  640. package/build/hooks/useScreen.js +14 -0
  641. package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
  642. package/build/hooks/useSetFromDefaultValues.js +26 -0
  643. package/build/hooks/useVerifyToken.d.ts +15 -0
  644. package/build/hooks/useVerifyToken.js +25 -0
  645. package/build/index.d.ts +12 -12
  646. package/build/index.js +13 -24
  647. package/build/theme/typography.js +1 -1
  648. package/build/utils/array.d.ts +53 -1
  649. package/build/utils/array.js +90 -3
  650. package/build/utils/common.d.ts +2 -0
  651. package/build/utils/common.js +10 -0
  652. package/build/utils/date.d.ts +2 -0
  653. package/build/utils/date.js +11 -0
  654. package/build/utils/device.d.ts +1 -0
  655. package/build/utils/device.js +13 -0
  656. package/build/utils/error.d.ts +1 -0
  657. package/build/utils/error.js +3 -0
  658. package/build/utils/html.d.ts +1 -2
  659. package/build/utils/html.js +6 -11
  660. package/build/utils/index.d.ts +3 -0
  661. package/build/utils/index.js +3 -0
  662. package/build/utils/locale.js +1 -1
  663. package/build/utils/object.d.ts +1 -0
  664. package/build/utils/object.js +12 -0
  665. package/build/utils/string.d.ts +30 -2
  666. package/build/utils/string.js +131 -6
  667. package/build/utils/validation.d.ts +3 -0
  668. package/build/utils/validation.js +9 -0
  669. package/package.json +4 -3
  670. package/build/api/ip.d.ts +0 -4
  671. package/build/api/ip.js +0 -12
  672. package/build/features/app/auth/authStore.d.ts +0 -35
  673. package/build/features/app/auth/authStore.js +0 -143
  674. package/build/features/app/otp/otpStore.d.ts +0 -28
  675. package/build/features/app/otp/otpStore.js +0 -153
  676. package/build/features/auth/Auth.d.ts +0 -9
  677. package/build/features/auth/Auth.js +0 -72
  678. package/build/features/auth/index.d.ts +0 -1
  679. package/build/features/auth/index.js +0 -1
  680. package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
  681. package/build/features/business/screens/Activities/SalesChannels.js +0 -112
  682. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -9
  683. package/build/features/connect/screens/Merchant/SocialMedia.js +0 -162
  684. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +0 -54
  685. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
  686. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -56
  687. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
  688. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -17
  689. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
  690. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -28
  691. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
  692. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -38
  693. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
  694. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
  695. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
  696. package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
  697. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -107
  698. package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -17
  699. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
  700. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
  701. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
  702. package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
  703. package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
  704. package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
  705. package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
  706. package/build/features/otp/OTP.d.ts +0 -7
  707. package/build/features/otp/OTP.js +0 -58
  708. package/build/features/otp/index.d.ts +0 -0
  709. package/build/features/otp/index.js +0 -1
  710. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  711. package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
@@ -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 (_) try {
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) 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]) {
@@ -45,59 +45,102 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
+ var __rest = (this && this.__rest) || function (s, e) {
49
+ var t = {};
50
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
+ t[p] = s[p];
52
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
+ t[p[i]] = s[p[i]];
56
+ }
57
+ return t;
58
+ };
48
59
  var _a;
49
60
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
61
  import API from '../../../api';
51
- import { FlowsTypes } from '../../../@types';
52
- import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
53
- import { ENTITY_STEP_NAMES, BUSINESS_FLOW_SUCCESS } from '../../../constants';
62
+ import { BusinessType, DocumentPurpose, FieldType, FlowsTypes } from '../../../@types';
63
+ import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
64
+ import { ENTITY_STEP_NAMES } from '../../../constants';
54
65
  import moment from 'moment';
55
66
  import { convertNumbers2English } from '../../../utils';
56
- export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
57
- var payload, data, boardInfoData, board_id, board_info_id, info, hasEntityCompleted;
58
- var _a;
59
- return __generator(this, function (_b) {
60
- switch (_b.label) {
61
- case 0:
62
- payload = {
63
- service_name: 'tap_email',
64
- verify_token: token
65
- };
66
- return [4, API.leadService.verifyLeadToken(payload)];
67
- case 1:
68
- data = (_b.sent()).data;
69
- return [4, thunkApi.dispatch(retrieveChannels())];
70
- case 2:
71
- _b.sent();
72
- boardInfoData = undefined;
73
- if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 6];
74
- board_id = data === null || data === void 0 ? void 0 : data.id;
75
- board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
76
- if (!(!!board_id && !!board_info_id)) return [3, 4];
77
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
78
- case 3:
79
- boardInfoData = _b.sent();
80
- _b.label = 4;
81
- case 4: return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
82
- case 5:
83
- _b.sent();
84
- info = boardInfoData.info;
85
- hasEntityCompleted = ((_a = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _a === void 0 ? void 0 : _a.status) === 'completed';
86
- thunkApi.dispatch(handleCurrentActiveScreen('ENTITY_INFO_STEP'));
87
- if (data.step_name === ENTITY_STEP_NAMES.PHONE_AUTH) {
88
- thunkApi.dispatch(handleCurrentActiveScreen('ENTITY_INFO_STEP'));
89
- }
90
- else if (hasEntityCompleted) {
67
+ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (_a, thunkApi) {
68
+ var token = _a.token, isInternally = _a.isInternally;
69
+ return __awaiter(void 0, void 0, void 0, function () {
70
+ var payload, data, boardData, entityData, boardInfoData, entityTypes, countryIso2, board_id, entityId, info, hasEntityCompleted;
71
+ var _b, _c, _d, _e;
72
+ return __generator(this, function (_f) {
73
+ switch (_f.label) {
74
+ case 0:
75
+ payload = {
76
+ service_name: 'tap_email',
77
+ verify_token: token
78
+ };
79
+ return [4, API.leadService.verifyLeadToken(payload)];
80
+ case 1:
81
+ data = (_f.sent()).data;
82
+ countryIso2 = undefined;
83
+ if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 9];
84
+ if (isInternally)
85
+ data.step_name = ENTITY_STEP_NAMES.ENTITY_INFO;
86
+ if (data === null || data === void 0 ? void 0 : data.country_code) {
87
+ countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
88
+ if (countryIso2)
89
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
90
+ }
91
+ if (!(data.step_name !== ENTITY_STEP_NAMES.PHONE_AUTH)) return [3, 9];
92
+ board_id = data === null || data === void 0 ? void 0 : data.id;
93
+ if (!board_id) return [3, 4];
94
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
95
+ case 2:
96
+ boardInfoData = _f.sent();
97
+ return [4, API.boardService.retrieveBoardDetails(board_id)];
98
+ case 3:
99
+ boardData = _f.sent();
100
+ _f.label = 4;
101
+ case 4:
102
+ entityId = (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.id;
103
+ if (!entityId) return [3, 6];
104
+ return [4, API.entityService.retrieveEntity(entityId)];
105
+ case 5:
106
+ entityData = _f.sent();
107
+ _f.label = 6;
108
+ case 6:
109
+ if (!countryIso2) {
110
+ countryIso2 = entityData.country;
111
+ if (countryIso2)
112
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
113
+ }
114
+ info = (boardInfoData || {}).info;
115
+ hasEntityCompleted = ((_c = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _c === void 0 ? void 0 : _c.status) === 'completed';
116
+ if (!hasEntityCompleted) return [3, 7];
91
117
  thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
92
- }
93
- else if (data.step_name === ENTITY_STEP_NAMES.ENTITY_INFO) {
94
- thunkApi.dispatch(handleNextScreenStep('ENTITY_INFO_STEP'));
95
- }
96
- _b.label = 6;
97
- case 6: return [2, { data: data, boardResponse: { flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) }, token: token }];
98
- }
118
+ return [3, 9];
119
+ case 7: return [4, API.entityService.retrieveEntityType()];
120
+ case 8:
121
+ entityTypes = _f.sent();
122
+ thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
123
+ _f.label = 9;
124
+ case 9: return [2, {
125
+ data: data,
126
+ boardResponse: {
127
+ user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
128
+ brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
129
+ bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
130
+ entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
131
+ merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
132
+ name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names,
133
+ contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact,
134
+ individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
135
+ flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
136
+ entityTypes: entityTypes
137
+ },
138
+ token: token
139
+ }];
140
+ }
141
+ });
99
142
  });
100
- }); });
143
+ });
101
144
  export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
102
145
  var entity, payload, data;
103
146
  return __generator(this, function (_a) {
@@ -116,14 +159,13 @@ export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thu
116
159
  });
117
160
  }); });
118
161
  export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
119
- var _a, entity, settings, responseBody, flows, payload, data, hasEntityCompleted;
120
- var _b, _c, _d, _e;
121
- return __generator(this, function (_f) {
122
- switch (_f.label) {
162
+ var _a, entity, settings, responseBody, payload, data, boardData, entityData, entityTypes, boardInfoData, board_id, entityId, info, hasEntityCompleted;
163
+ var _b, _c, _d, _e, _f, _g, _h;
164
+ return __generator(this, function (_j) {
165
+ switch (_j.label) {
123
166
  case 0:
124
167
  _a = thunkApi.getState(), entity = _a.entity, settings = _a.settings;
125
168
  responseBody = entity.data.verify.responseBody;
126
- flows = (responseBody || {}).flows;
127
169
  payload = {
128
170
  data: params.otp,
129
171
  service_name: (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _b === void 0 ? void 0 : _b.service_name,
@@ -133,18 +175,53 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
133
175
  };
134
176
  return [4, API.leadService.verifyLeadOTP(payload)];
135
177
  case 1:
136
- data = (_f.sent()).data;
137
- if (!data.errors) {
138
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
139
- hasEntityCompleted = ((_e = flows === null || flows === void 0 ? void 0 : flows.find(function (flow) { return flow.name === 'entity'; })) === null || _e === void 0 ? void 0 : _e.status) === 'completed';
140
- if (hasEntityCompleted) {
141
- thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
142
- }
143
- else {
144
- thunkApi.dispatch(handleNextScreenStep('ENTITY_INFO_STEP'));
145
- }
146
- }
147
- return [2, { data: data, formData: params }];
178
+ data = (_j.sent()).data;
179
+ boardInfoData = undefined;
180
+ if (!!data.errors) return [3, 9];
181
+ board_id = responseBody === null || responseBody === void 0 ? void 0 : responseBody.id;
182
+ if (!board_id) return [3, 4];
183
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
184
+ case 2:
185
+ boardInfoData = _j.sent();
186
+ return [4, API.boardService.retrieveBoardDetails(board_id)];
187
+ case 3:
188
+ boardData = _j.sent();
189
+ _j.label = 4;
190
+ case 4:
191
+ entityId = (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.id;
192
+ if (!entityId) return [3, 6];
193
+ return [4, API.entityService.retrieveEntity(entityId)];
194
+ case 5:
195
+ entityData = _j.sent();
196
+ _j.label = 6;
197
+ case 6:
198
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
199
+ info = (boardInfoData || {}).info;
200
+ hasEntityCompleted = ((_f = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
201
+ if (!hasEntityCompleted) return [3, 7];
202
+ thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
203
+ return [3, 9];
204
+ case 7: return [4, API.entityService.retrieveEntityType()];
205
+ case 8:
206
+ entityTypes = _j.sent();
207
+ thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
208
+ _j.label = 9;
209
+ case 9: return [2, {
210
+ data: data,
211
+ boardResponse: {
212
+ user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
213
+ brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
214
+ bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
215
+ entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
216
+ merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
217
+ name: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.names,
218
+ contact: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.contact,
219
+ individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
220
+ flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
221
+ entityTypes: entityTypes
222
+ },
223
+ formData: params
224
+ }];
148
225
  }
149
226
  });
150
227
  }); });
@@ -157,42 +234,158 @@ export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', f
157
234
  case 1:
158
235
  data = _c.sent();
159
236
  return [2, {
160
- data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.name, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact })
237
+ data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.names, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact, individuals: data === null || data === void 0 ? void 0 : data.individuals })
161
238
  }];
162
239
  }
163
240
  });
164
241
  }); });
165
- export var updateEntityInfo = createAsyncThunk('updateEntityInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
166
- var _a, settings, entity, requestBody, data;
167
- var _b, _c, _d, _e, _f;
168
- return __generator(this, function (_g) {
169
- switch (_g.label) {
242
+ export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
243
+ var _a, settings, entity, entityData, _b, id, data_status, articleId, issuingDate, expiryDate, isFL, isLegalNameEditable, isLicenseTypeEditable, isEntityTypeEditable, isLicenseNumberEditable, isUnifiedNumberEditable, isIssuingDateEditable, isExpiryDateEditable, payload, data, documentBody, _c, list;
244
+ var _d, _e, _f, _g, _h, _j, _k;
245
+ return __generator(this, function (_l) {
246
+ switch (_l.label) {
170
247
  case 0:
171
248
  _a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
172
- requestBody = {
173
- id: (_c = (_b = entity.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) === null || _c === void 0 ? void 0 : _c.id,
174
- activities: (_d = (params.activities || [])) === null || _d === void 0 ? void 0 : _d.map(function (_a) {
175
- var en = _a.en;
176
- return en;
177
- }),
178
- license_name: params.licenseName,
179
- license_number: params.licenseNumber,
180
- business_operation_start_at: params.operationStartDate,
181
- step_name: ENTITY_STEP_NAMES.ENTITY_INFO
249
+ entityData = (entity.data.verify.responseBody || {}).entity;
250
+ _b = entityData || {}, id = _b.id, data_status = _b.data_status;
251
+ articleId = entity.data.entityNameData.articleId;
252
+ issuingDate = new Date(params.issuingDate).getTime();
253
+ expiryDate = new Date(params.expiryDate).getTime();
254
+ isFL = params.licenseType === BusinessType.FL;
255
+ isLegalNameEditable = (data_status === null || data_status === void 0 ? void 0 : data_status.legal_name) === FieldType.EDITABLE;
256
+ isLicenseTypeEditable = ((_d = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _d === void 0 ? void 0 : _d.type) === FieldType.EDITABLE;
257
+ isEntityTypeEditable = (data_status === null || data_status === void 0 ? void 0 : data_status.type) === FieldType.EDITABLE;
258
+ isLicenseNumberEditable = ((_e = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _e === void 0 ? void 0 : _e.number) === FieldType.EDITABLE;
259
+ isUnifiedNumberEditable = ((_f = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _f === void 0 ? void 0 : _f.additional_info) === FieldType.EDITABLE;
260
+ isIssuingDateEditable = ((_g = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _g === void 0 ? void 0 : _g.issuing_date) === FieldType.EDITABLE;
261
+ isExpiryDateEditable = ((_h = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _h === void 0 ? void 0 : _h.expiry_date) === FieldType.EDITABLE;
262
+ payload = {
263
+ id: id,
264
+ AOA_file_id: articleId,
265
+ license: {
266
+ number: isLicenseNumberEditable && params.licenseNumber ? params.licenseNumber : undefined,
267
+ type: isLicenseTypeEditable ? (isFL ? 'freelance' : 'commercial_registration') : undefined,
268
+ issuing_date: isIssuingDateEditable ? issuingDate === null || issuingDate === void 0 ? void 0 : issuingDate.toString() : undefined,
269
+ expiry_date: isExpiryDateEditable ? expiryDate === null || expiryDate === void 0 ? void 0 : expiryDate.toString() : undefined,
270
+ additional_info: isUnifiedNumberEditable && params.unifiedNumber
271
+ ? {
272
+ unified_number: params.unifiedNumber
273
+ }
274
+ : undefined
275
+ },
276
+ type: isEntityTypeEditable && params.entityType ? params.entityType : undefined,
277
+ legal_name: isLegalNameEditable && params.legalName
278
+ ? {
279
+ ar: params.legalName,
280
+ en: params.legalName
281
+ }
282
+ : undefined,
283
+ encryption_contract: [
284
+ 'license.number',
285
+ 'legal_name.ar',
286
+ 'legal_name.en',
287
+ 'license.type',
288
+ 'license.issuing_date',
289
+ 'license.expiry_date',
290
+ 'license.additional_info.unified_number',
291
+ 'type'
292
+ ]
182
293
  };
183
- return [4, API.entityService.updateEntityInfo(requestBody)];
294
+ return [4, API.entityService.updateEntity(payload)];
184
295
  case 1:
185
- data = (_g.sent()).data;
186
- if (!data.errors) {
187
- thunkApi.dispatch(handleNextScreenStep());
188
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
189
- }
296
+ data = _l.sent();
297
+ if (!((params.certificateId || []).length > 0)) return [3, 3];
298
+ documentBody = {
299
+ entity_id: id || '',
300
+ documents: [
301
+ {
302
+ images: params.certificateId
303
+ }
304
+ ]
305
+ };
306
+ _c = data;
307
+ return [4, API.entityService.updateDocumentInfo(documentBody)];
308
+ case 2:
309
+ _c.documentData = _l.sent();
310
+ _l.label = 3;
311
+ case 3: return [4, API.dataService.getActivities()];
312
+ case 4:
313
+ list = (_l.sent()).list;
314
+ data.activityList = list;
315
+ thunkApi.dispatch(handleNextScreenStep());
316
+ (_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, id);
317
+ return [2, { data: data, formData: params }];
318
+ }
319
+ });
320
+ }); });
321
+ export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a) {
322
+ var file = _a.file, onProgress = _a.onProgress;
323
+ return __awaiter(void 0, void 0, void 0, function () {
324
+ var typeArray, type, uploadPayload, onUploadProgress, data;
325
+ var _b;
326
+ return __generator(this, function (_c) {
327
+ switch (_c.label) {
328
+ case 0:
329
+ typeArray = ((_b = file === null || file === void 0 ? void 0 : file.type) === null || _b === void 0 ? void 0 : _b.split('/')) || [];
330
+ type = typeArray[1] || '';
331
+ uploadPayload = {
332
+ file_link_create: true,
333
+ title: file === null || file === void 0 ? void 0 : file.name,
334
+ purpose: DocumentPurpose.ARTICLE_ASSOCIATION,
335
+ type: type,
336
+ file: file
337
+ };
338
+ onUploadProgress = function (progressEvent) {
339
+ var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
340
+ onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
341
+ };
342
+ return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
343
+ case 1:
344
+ data = _c.sent();
345
+ return [2, { data: data }];
346
+ }
347
+ });
348
+ });
349
+ });
350
+ export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
351
+ var _a, settings, entity, entityData, _b, id, data_status, isCapitalPaidEditable, isCapitalShareEditable, activities, payload, data;
352
+ var _c, _d, _e, _f, _g;
353
+ return __generator(this, function (_h) {
354
+ switch (_h.label) {
355
+ case 0:
356
+ _a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
357
+ entityData = (entity.data.verify.responseBody || {}).entity;
358
+ _b = entityData || {}, id = _b.id, data_status = _b.data_status;
359
+ isCapitalPaidEditable = ((_c = data_status === null || data_status === void 0 ? void 0 : data_status.capital) === null || _c === void 0 ? void 0 : _c.paid) === FieldType.EDITABLE;
360
+ isCapitalShareEditable = ((_d = data_status === null || data_status === void 0 ? void 0 : data_status.capital) === null || _d === void 0 ? void 0 : _d.shares) === FieldType.EDITABLE;
361
+ activities = (_e = (params.activities || [])) === null || _e === void 0 ? void 0 : _e.map(function (_a) {
362
+ var id = _a.id;
363
+ return ({ id: id, action: 'add' });
364
+ });
365
+ payload = {
366
+ id: id,
367
+ activities: (activities === null || activities === void 0 ? void 0 : activities.length) > 0 ? activities : undefined,
368
+ capital: {
369
+ paid: isCapitalPaidEditable ? params.capitalPaid : undefined,
370
+ shares: isCapitalShareEditable
371
+ ? {
372
+ count: params.capitalShareCount,
373
+ value: params.capitalShareValue
374
+ }
375
+ : undefined
376
+ }
377
+ };
378
+ return [4, API.entityService.updateEntity(payload)];
379
+ case 1:
380
+ data = _h.sent();
381
+ thunkApi.dispatch(handleNextScreenStep());
382
+ (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, id);
190
383
  return [2, { data: data, formData: params }];
191
384
  }
192
385
  });
193
386
  }); });
194
387
  export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
195
- var _a, settings, entity, _b, id, infoId, payload, data;
388
+ var _a, settings, entity, _b, id, infoId, payload, data, boardInfoData;
196
389
  var _c, _d, _e, _f;
197
390
  return __generator(this, function (_g) {
198
391
  switch (_g.label) {
@@ -209,24 +402,16 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', fun
209
402
  return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
210
403
  case 1:
211
404
  data = _g.sent();
212
- return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
405
+ return [4, API.boardService.retrieveBoardInfoStatus(id)];
213
406
  case 2:
407
+ boardInfoData = _g.sent();
408
+ return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
409
+ case 3:
214
410
  _g.sent();
215
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
411
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
216
412
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
217
413
  thunkApi.dispatch(handleNextScreenStep());
218
- return [2, { response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(data === null || data === void 0 ? void 0 : data.info) }), formData: params }];
219
- }
220
- });
221
- }); });
222
- export var retrieveChannels = createAsyncThunk('retrieveChannelsEntity', function () { return __awaiter(void 0, void 0, void 0, function () {
223
- var data;
224
- return __generator(this, function (_a) {
225
- switch (_a.label) {
226
- case 0: return [4, API.dataService.getChannelsOfServices()];
227
- case 1:
228
- data = (_a.sent()).data;
229
- return [2, data];
414
+ return [2, { response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] }), formData: params }];
230
415
  }
231
416
  });
232
417
  }); });
@@ -234,6 +419,9 @@ var initialState = {
234
419
  error: null,
235
420
  loading: false,
236
421
  customLoading: false,
422
+ uploading: false,
423
+ uploadingArticle: false,
424
+ uploadingArticleError: null,
237
425
  data: {
238
426
  flowName: FlowsTypes.ENTITY,
239
427
  verify: {
@@ -242,10 +430,20 @@ var initialState = {
242
430
  otpData: {
243
431
  otp: ''
244
432
  },
245
- entityData: {
433
+ entityNameData: {
434
+ legalName: '',
435
+ licenseNumber: '',
436
+ licenseType: '',
437
+ entityType: '',
438
+ issuingDate: '',
439
+ expiryDate: '',
440
+ unifiedNumber: ''
441
+ },
442
+ entityCapitalData: {
246
443
  activities: [],
247
- salesChannels: [],
248
- operationStartDate: '1998-08-22'
444
+ capitalPaid: '',
445
+ capitalShareCount: '',
446
+ capitalShareValue: ''
249
447
  }
250
448
  }
251
449
  };
@@ -261,6 +459,12 @@ export var entitySlice = createSlice({
261
459
  },
262
460
  resetOTPScreen: function (state) {
263
461
  state.data.otpData.otp = '';
462
+ },
463
+ uploadingStatus: function (state, action) {
464
+ state.uploading = action.payload;
465
+ },
466
+ clearArticleId: function (state) {
467
+ state.data.entityNameData.articleId = '';
264
468
  }
265
469
  },
266
470
  extraReducers: function (builder) {
@@ -270,51 +474,60 @@ export var entitySlice = createSlice({
270
474
  state.customLoading = true;
271
475
  })
272
476
  .addCase(verifyLeadToken.fulfilled, function (state, action) {
273
- var _a, _b, _c;
477
+ var _a, _b, _c, _d;
274
478
  state.error = null;
275
479
  state.customLoading = false;
276
- var _d = action.payload, data = _d.data, token = _d.token, boardResponse = _d.boardResponse;
480
+ var _e = action.payload, data = _e.data, token = _e.token, boardResponse = _e.boardResponse;
277
481
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
278
482
  if (description) {
279
483
  state.error = description;
280
484
  return;
281
485
  }
282
- var _e = state.data.verify.responseBody || {}, brand = _e.brand, entity = _e.entity;
283
- var issuingDate = brand === null || brand === void 0 ? void 0 : brand.business_operation_start_at;
284
- if (!!issuingDate) {
285
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
286
- state.data.entityData.operationStartDate = convertNumbers2English(formattedDate);
287
- }
288
- var channels = (_b = state.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.channelList;
289
- var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
290
- var _f = brand || {}, website = _f.website, social = _f.social;
291
- var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
292
- var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
293
- var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
294
- var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
295
- var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
296
- if (isHasWebsite && (isHasTwitter || isHasInstagram))
297
- selectedChannels = [websiteData, socialData];
298
- else if (isHasTwitter || isHasInstagram)
299
- selectedChannels = [socialData];
300
- else if (isHasWebsite)
301
- selectedChannels = [websiteData];
302
- if (((_c = brand === null || brand === void 0 ? void 0 : brand.channel_services) === null || _c === void 0 ? void 0 : _c.length) > 0) {
303
- selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
304
- var _a;
305
- return (_a = brand === null || brand === void 0 ? void 0 : brand.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name_en.toLowerCase() === storedChannel.toLowerCase(); });
306
- });
307
- }
308
- state.data.entityData.salesChannels = selectedChannels;
309
- var activities = (entity === null || entity === void 0 ? void 0 : entity.activities) || [];
310
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
311
- var _a;
312
- return (_a = brand === null || brand === void 0 ? void 0 : brand.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { var _a; return ((_a = activity.en) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === value.toLowerCase(); });
313
- });
314
- state.data.entityData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]];
315
- state.data.entityData.responseBody = __assign(__assign({}, state.data.entityData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities, selectedActivities: (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]] });
316
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id });
486
+ state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
317
487
  state.data.verify.token = token;
488
+ var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
489
+ if (entity) {
490
+ var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
491
+ var legalName = legal_name;
492
+ var licenseNumber = license === null || license === void 0 ? void 0 : license.number;
493
+ var unifiedNumber = (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number;
494
+ var licenseType = (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR;
495
+ var entityType = type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]);
496
+ var _h = capital || {}, paid = _h.paid, shares = _h.shares;
497
+ var entityIssueDate = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date;
498
+ var entityExpiredDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.expiry_date;
499
+ var issuingDate = void 0, expiryDate = undefined;
500
+ if (entityIssueDate) {
501
+ var date = new Date(entityIssueDate);
502
+ var formattedDate = moment(date).format('YYYY-MM-DD');
503
+ issuingDate = convertNumbers2English(formattedDate);
504
+ }
505
+ if (entityExpiredDate) {
506
+ var date = new Date(entityExpiredDate);
507
+ var formattedDate = moment(date).format('YYYY-MM-DD');
508
+ expiryDate = convertNumbers2English(formattedDate);
509
+ }
510
+ if ((legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar))
511
+ state.data.entityNameData.legalName = (legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar);
512
+ if (licenseNumber)
513
+ state.data.entityNameData.licenseNumber = licenseNumber;
514
+ if (unifiedNumber)
515
+ state.data.entityNameData.unifiedNumber = unifiedNumber;
516
+ state.data.entityNameData.licenseType = licenseType;
517
+ if (entityType)
518
+ state.data.entityNameData.entityType = entityType;
519
+ state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
520
+ state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
521
+ if (activities)
522
+ state.data.entityCapitalData.activities = activities;
523
+ if (paid)
524
+ state.data.entityCapitalData.capitalPaid = paid;
525
+ if (shares === null || shares === void 0 ? void 0 : shares.count)
526
+ state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
527
+ if (shares === null || shares === void 0 ? void 0 : shares.value)
528
+ state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
529
+ state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id });
530
+ }
318
531
  })
319
532
  .addCase(verifyLeadToken.rejected, function (state, action) {
320
533
  state.error = action.error.message;
@@ -342,10 +555,10 @@ export var entitySlice = createSlice({
342
555
  state.error = null;
343
556
  })
344
557
  .addCase(verifyEntityLeadOTP.fulfilled, function (state, action) {
345
- var _a;
558
+ var _a, _b, _c, _d;
346
559
  state.loading = false;
347
560
  state.error = null;
348
- var _b = action.payload, data = _b.data, formData = _b.formData;
561
+ var _e = action.payload, data = _e.data, boardResponse = _e.boardResponse, formData = _e.formData;
349
562
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
350
563
  if (description) {
351
564
  state.error = description;
@@ -353,29 +566,98 @@ export var entitySlice = createSlice({
353
566
  }
354
567
  state.data.otpData = formData;
355
568
  state.data.otpData.responseBody = data;
569
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
570
+ var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
571
+ var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
572
+ var legalName = legal_name;
573
+ var licenseNumber = license === null || license === void 0 ? void 0 : license.number;
574
+ var unifiedNumber = (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number;
575
+ var licenseType = (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR;
576
+ var entityType = type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]);
577
+ var _h = capital || {}, paid = _h.paid, shares = _h.shares;
578
+ var entityIssueDate = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date;
579
+ var entityExpiredDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.expiry_date;
580
+ var issuingDate, expiryDate = undefined;
581
+ if (entityIssueDate) {
582
+ var date = new Date(entityIssueDate);
583
+ var formattedDate = moment(date).format('YYYY-MM-DD');
584
+ issuingDate = convertNumbers2English(formattedDate);
585
+ }
586
+ if (entityExpiredDate) {
587
+ var date = new Date(entityExpiredDate);
588
+ var formattedDate = moment(date).format('YYYY-MM-DD');
589
+ expiryDate = convertNumbers2English(formattedDate);
590
+ }
591
+ if ((legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar))
592
+ state.data.entityNameData.legalName = (legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar);
593
+ if (licenseNumber)
594
+ state.data.entityNameData.licenseNumber = licenseNumber;
595
+ if (unifiedNumber)
596
+ state.data.entityNameData.unifiedNumber = unifiedNumber;
597
+ state.data.entityNameData.licenseType = licenseType;
598
+ if (entityType)
599
+ state.data.entityNameData.entityType = entityType;
600
+ state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
601
+ state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
602
+ if (activities)
603
+ state.data.entityCapitalData.activities = activities;
604
+ if (paid)
605
+ state.data.entityCapitalData.capitalPaid = paid;
606
+ if (shares === null || shares === void 0 ? void 0 : shares.count)
607
+ state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
608
+ if (shares === null || shares === void 0 ? void 0 : shares.value)
609
+ state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
610
+ state.data.entityNameData = __assign(__assign({}, state.data.entityNameData), { responseBody: __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id }) });
356
611
  })
357
612
  .addCase(verifyEntityLeadOTP.rejected, function (state, action) {
358
613
  state.loading = false;
359
614
  state.error = action.error.message;
360
615
  })
361
- .addCase(updateEntityInfo.pending, function (state) {
616
+ .addCase(updateEntityName.pending, function (state) {
362
617
  state.loading = true;
363
618
  state.error = null;
364
619
  })
365
- .addCase(updateEntityInfo.fulfilled, function (state, action) {
366
- var _a;
620
+ .addCase(updateEntityName.fulfilled, function (state, action) {
367
621
  state.loading = false;
368
622
  state.error = null;
369
- var _b = action.payload, data = _b.data, formData = _b.formData;
370
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
371
- if (description) {
372
- state.error = description;
373
- return;
374
- }
375
- state.data.entityData = formData;
376
- state.data.entityData.responseBody = data;
623
+ var _a = action.payload, data = _a.data, formData = _a.formData;
624
+ var _b = data || {}, activityList = _b.activityList, rest = __rest(_b, ["activityList"]);
625
+ state.data.entityNameData = formData;
626
+ state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { rest: rest });
627
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { activityList: activityList });
628
+ if (rest === null || rest === void 0 ? void 0 : rest.activities)
629
+ state.data.entityCapitalData = __assign(__assign({}, state.data.entityCapitalData), { activities: rest === null || rest === void 0 ? void 0 : rest.activities });
377
630
  })
378
- .addCase(updateEntityInfo.rejected, function (state, action) {
631
+ .addCase(updateEntityName.rejected, function (state, action) {
632
+ state.loading = false;
633
+ state.error = action.error.message;
634
+ })
635
+ .addCase(uploadArticle.pending, function (state) {
636
+ state.uploadingArticleError = null;
637
+ state.uploadingArticle = true;
638
+ })
639
+ .addCase(uploadArticle.fulfilled, function (state, action) {
640
+ state.uploadingArticleError = null;
641
+ state.uploadingArticle = false;
642
+ var data = action.payload.data;
643
+ state.data.entityNameData.articleId = data === null || data === void 0 ? void 0 : data.id;
644
+ })
645
+ .addCase(uploadArticle.rejected, function (state) {
646
+ state.uploadingArticle = false;
647
+ state.uploadingArticleError = 'file_upload_article_error';
648
+ })
649
+ .addCase(updateEntityCapital.pending, function (state) {
650
+ state.loading = true;
651
+ state.error = null;
652
+ })
653
+ .addCase(updateEntityCapital.fulfilled, function (state, action) {
654
+ state.loading = false;
655
+ state.error = null;
656
+ var _a = action.payload, data = _a.data, formData = _a.formData;
657
+ state.data.entityCapitalData = formData;
658
+ state.data.entityCapitalData.responseBody = __assign(__assign({}, state.data.entityCapitalData.responseBody), { data: data });
659
+ })
660
+ .addCase(updateEntityCapital.rejected, function (state, action) {
379
661
  state.loading = false;
380
662
  state.error = action.error.message;
381
663
  })
@@ -413,45 +695,9 @@ export var entitySlice = createSlice({
413
695
  .addCase(updateBoardSuccess.rejected, function (state, action) {
414
696
  state.loading = false;
415
697
  state.error = action.error.message;
416
- })
417
- .addCase(retrieveChannels.pending, function (state) {
418
- state.error = null;
419
- state.loading = true;
420
- })
421
- .addCase(retrieveChannels.fulfilled, function (state, action) {
422
- var _a;
423
- state.error = null;
424
- state.loading = false;
425
- var data = action.payload || {};
426
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
427
- if (description) {
428
- state.error = description;
429
- return;
430
- }
431
- var channels = data || [];
432
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { channelList: channels });
433
- var brand = (state.data.verify.responseBody || {}).brand;
434
- var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
435
- var _b = brand || {}, website = _b.website, social = _b.social;
436
- var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
437
- var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
438
- var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
439
- var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
440
- var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
441
- if (isHasWebsite && (isHasTwitter || isHasInstagram))
442
- selectedChannels = [websiteData, socialData];
443
- else if (isHasTwitter || isHasInstagram)
444
- selectedChannels = [socialData];
445
- else if (isHasWebsite)
446
- selectedChannels = [websiteData];
447
- state.data.entityData.salesChannels = selectedChannels;
448
- })
449
- .addCase(retrieveChannels.rejected, function (state, action) {
450
- state.error = action.error.message;
451
- state.loading = false;
452
698
  });
453
699
  }
454
700
  });
455
- export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
701
+ export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, clearArticleId = _a.clearArticleId;
456
702
  export default entitySlice.reducer;
457
703
  export var entitySelector = function (state) { return state.entity; };