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

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 (1218) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +167 -167
  3. package/build/@types/app.d.ts +467 -222
  4. package/build/@types/app.js +82 -29
  5. package/build/@types/form.d.ts +142 -87
  6. package/build/@types/form.js +1 -1
  7. package/build/@types/index.d.ts +5 -4
  8. package/build/@types/index.js +5 -4
  9. package/build/@types/redux.d.ts +14 -14
  10. package/build/@types/redux.js +1 -1
  11. package/build/@types/theme.d.ts +14 -14
  12. package/build/@types/theme.js +15 -15
  13. package/build/@types/user.d.ts +141 -0
  14. package/build/@types/user.js +1 -0
  15. package/build/api/account.d.ts +19 -14
  16. package/build/api/account.js +21 -13
  17. package/build/api/auth.d.ts +93 -77
  18. package/build/api/auth.js +76 -44
  19. package/build/api/availabilityServices.d.ts +20 -20
  20. package/build/api/availabilityServices.js +17 -17
  21. package/build/api/axios.d.ts +7 -7
  22. package/build/api/axios.js +110 -110
  23. package/build/api/board.d.ts +43 -26
  24. package/build/api/board.js +72 -56
  25. package/build/api/brand.d.ts +16 -7
  26. package/build/api/brand.js +66 -40
  27. package/build/api/country.d.ts +10 -4
  28. package/build/api/country.js +22 -12
  29. package/build/api/data.d.ts +49 -36
  30. package/build/api/data.js +92 -61
  31. package/build/api/document.d.ts +25 -0
  32. package/build/api/document.js +38 -0
  33. package/build/api/entity.d.ts +124 -57
  34. package/build/api/entity.js +107 -59
  35. package/build/api/file.d.ts +14 -0
  36. package/build/api/file.js +37 -0
  37. package/build/api/firebase.d.ts +4 -4
  38. package/build/api/firebase.js +14 -12
  39. package/build/api/index.d.ts +154 -0
  40. package/build/api/index.js +39 -33
  41. package/build/api/individual.d.ts +145 -32
  42. package/build/api/individual.js +47 -12
  43. package/build/api/init.d.ts +16 -0
  44. package/build/api/init.js +13 -0
  45. package/build/api/lead.d.ts +105 -93
  46. package/build/api/lead.js +68 -45
  47. package/build/api/location.d.ts +5 -0
  48. package/build/api/location.js +19 -0
  49. package/build/api/operator.d.ts +12 -12
  50. package/build/api/operator.js +65 -65
  51. package/build/api/user.d.ts +14 -8
  52. package/build/api/user.js +20 -12
  53. package/build/app/rootReducer.d.ts +14 -14
  54. package/build/app/rootReducer.js +25 -25
  55. package/build/app/settings.d.ts +44 -37
  56. package/build/app/settings.js +281 -246
  57. package/build/app/store.d.ts +29 -29
  58. package/build/app/store.js +11 -11
  59. package/build/assets/locales/ar.json +400 -258
  60. package/build/assets/locales/en.json +430 -278
  61. package/build/components/AnimationFlow/AnimationFlow.d.ts +19 -16
  62. package/build/components/AnimationFlow/AnimationFlow.js +34 -34
  63. package/build/components/AnimationFlow/BottomSheet.d.ts +14 -10
  64. package/build/components/AnimationFlow/BottomSheet.js +89 -86
  65. package/build/components/AnimationFlow/Dialog.d.ts +17 -14
  66. package/build/components/AnimationFlow/Dialog.js +134 -110
  67. package/build/components/AnimationFlow/Error.d.ts +6 -6
  68. package/build/components/AnimationFlow/Error.js +32 -32
  69. package/build/components/AnimationFlow/Loader.d.ts +2 -2
  70. package/build/components/AnimationFlow/Loader.js +24 -24
  71. package/build/components/AnimationFlow/index.d.ts +2 -2
  72. package/build/components/AnimationFlow/index.js +2 -2
  73. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
  74. package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
  75. package/build/components/ArabicDatePicker/index.d.ts +2 -0
  76. package/build/components/ArabicDatePicker/index.js +2 -0
  77. package/build/components/ArabicDatePicker/style.css +24 -0
  78. package/build/components/Button/Button.d.ts +14 -14
  79. package/build/components/Button/Button.js +97 -101
  80. package/build/components/Button/index.d.ts +4 -4
  81. package/build/components/Button/index.js +2 -2
  82. package/build/components/CheckBox/CheckBox.d.ts +5 -5
  83. package/build/components/CheckBox/CheckBox.js +39 -39
  84. package/build/components/CheckBox/index.d.ts +4 -4
  85. package/build/components/CheckBox/index.js +2 -2
  86. package/build/components/Collapse/Collapse.d.ts +5 -5
  87. package/build/components/Collapse/Collapse.js +28 -28
  88. package/build/components/Collapse/index.d.ts +3 -3
  89. package/build/components/Collapse/index.js +2 -2
  90. package/build/components/DatePicker/DatePicker.d.ts +15 -14
  91. package/build/components/DatePicker/DatePicker.js +105 -101
  92. package/build/components/DatePicker/customStyle.css +86 -0
  93. package/build/components/DatePicker/index.d.ts +3 -3
  94. package/build/components/DatePicker/index.js +2 -2
  95. package/build/components/ExpandIcon/ExpandIcon.d.ts +7 -7
  96. package/build/components/ExpandIcon/ExpandIcon.js +24 -24
  97. package/build/components/ExpandIcon/index.d.ts +2 -2
  98. package/build/components/ExpandIcon/index.js +2 -2
  99. package/build/components/FileInput/DragAndDrop.d.ts +17 -15
  100. package/build/components/FileInput/DragAndDrop.js +136 -143
  101. package/build/components/FileInput/UploadInput.d.ts +7 -7
  102. package/build/components/FileInput/UploadInput.js +38 -38
  103. package/build/components/FileInput/index.d.ts +3 -3
  104. package/build/components/FileInput/index.js +3 -3
  105. package/build/components/Footer/Footer.d.ts +15 -15
  106. package/build/components/Footer/Footer.js +62 -62
  107. package/build/components/Footer/index.d.ts +4 -4
  108. package/build/components/Footer/index.js +2 -2
  109. package/build/components/Form/Form.d.ts +11 -11
  110. package/build/components/Form/Form.js +38 -38
  111. package/build/components/Form/index.d.ts +3 -3
  112. package/build/components/Form/index.js +2 -2
  113. package/build/components/Icon/Icon.d.ts +11 -11
  114. package/build/components/Icon/Icon.js +26 -26
  115. package/build/components/Icon/index.d.ts +3 -3
  116. package/build/components/Icon/index.js +2 -2
  117. package/build/components/Input/Input.d.ts +19 -19
  118. package/build/components/Input/Input.js +84 -84
  119. package/build/components/Input/index.d.ts +3 -3
  120. package/build/components/Input/index.js +2 -2
  121. package/build/components/InputAdornment/InputAdornment.d.ts +10 -10
  122. package/build/components/InputAdornment/InputAdornment.js +46 -46
  123. package/build/components/InputAdornment/index.d.ts +3 -3
  124. package/build/components/InputAdornment/index.js +2 -2
  125. package/build/components/List/List.d.ts +5 -5
  126. package/build/components/List/List.js +52 -52
  127. package/build/components/List/index.d.ts +3 -3
  128. package/build/components/List/index.js +2 -2
  129. package/build/components/ListItem/ListItem.d.ts +5 -5
  130. package/build/components/ListItem/ListItem.js +35 -35
  131. package/build/components/ListItem/index.d.ts +3 -3
  132. package/build/components/ListItem/index.js +2 -2
  133. package/build/components/Loader/Loader.d.ts +24 -24
  134. package/build/components/Loader/Loader.js +41 -41
  135. package/build/components/Loader/index.d.ts +4 -4
  136. package/build/components/Loader/index.js +2 -2
  137. package/build/components/LogoBadge/LogoBadge.d.ts +7 -7
  138. package/build/components/LogoBadge/LogoBadge.js +64 -61
  139. package/build/components/LogoBadge/index.d.ts +3 -3
  140. package/build/components/LogoBadge/index.js +2 -2
  141. package/build/components/Lottie/Lottie.d.ts +4203 -878
  142. package/build/components/Lottie/Lottie.js +66 -58
  143. package/build/components/Lottie/files/account_creating.json +732 -0
  144. package/build/components/Lottie/files/error.json +692 -0
  145. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -236
  146. package/build/components/Lottie/files/start_loading.json +1140 -0
  147. package/build/components/Lottie/files/still_loading.json +1140 -0
  148. package/build/components/Lottie/files/success.json +425 -425
  149. package/build/components/Lottie/index.d.ts +3 -3
  150. package/build/components/Lottie/index.js +3 -3
  151. package/build/components/OTPField/OTPField.d.ts +18 -17
  152. package/build/components/OTPField/OTPField.js +45 -45
  153. package/build/components/OTPField/index.d.ts +4 -4
  154. package/build/components/OTPField/index.js +2 -2
  155. package/build/components/OTPTimer/OTPTimer.d.ts +14 -14
  156. package/build/components/OTPTimer/OTPTimer.js +70 -70
  157. package/build/components/OTPTimer/index.d.ts +4 -4
  158. package/build/components/OTPTimer/index.js +2 -2
  159. package/build/components/ProgressBar/CircularProgressBar.d.ts +16 -14
  160. package/build/components/ProgressBar/CircularProgressBar.js +48 -48
  161. package/build/components/ProgressBar/ProgressBar.d.ts +6 -6
  162. package/build/components/ProgressBar/ProgressBar.js +45 -45
  163. package/build/components/ProgressBar/index.d.ts +6 -6
  164. package/build/components/ProgressBar/index.js +4 -4
  165. package/build/components/Providers/ReduxProvider.d.ts +7 -7
  166. package/build/components/Providers/ReduxProvider.js +17 -17
  167. package/build/components/Providers/ThemeProvider.d.ts +8 -8
  168. package/build/components/Providers/ThemeProvider.js +22 -22
  169. package/build/components/Providers/index.d.ts +3 -3
  170. package/build/components/Providers/index.js +3 -3
  171. package/build/components/Radio/Radio.d.ts +5 -5
  172. package/build/components/Radio/Radio.js +31 -31
  173. package/build/components/Radio/index.d.ts +3 -3
  174. package/build/components/Radio/index.js +2 -2
  175. package/build/components/RadioGroup/RadioGroup.d.ts +8 -5
  176. package/build/components/RadioGroup/RadioGroup.js +37 -41
  177. package/build/components/RadioGroup/index.d.ts +3 -3
  178. package/build/components/RadioGroup/index.js +2 -2
  179. package/build/components/RadioLabel/RadioLabel.d.ts +10 -7
  180. package/build/components/RadioLabel/RadioLabel.js +34 -34
  181. package/build/components/RadioLabel/index.d.ts +3 -3
  182. package/build/components/RadioLabel/index.js +2 -2
  183. package/build/components/SimpleList/SimpleList.d.ts +23 -18
  184. package/build/components/SimpleList/SimpleList.js +133 -104
  185. package/build/components/SimpleList/index.d.ts +3 -3
  186. package/build/components/SimpleList/index.js +2 -2
  187. package/build/components/Slide/Slide.d.ts +6 -6
  188. package/build/components/Slide/Slide.js +30 -30
  189. package/build/components/Slide/index.d.ts +3 -3
  190. package/build/components/Slide/index.js +2 -2
  191. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +11 -15
  192. package/build/components/SocialMediaGroup/SocialMediaGroup.js +34 -79
  193. package/build/components/SocialMediaGroup/index.d.ts +3 -3
  194. package/build/components/SocialMediaGroup/index.js +2 -2
  195. package/build/components/Text/Text.d.ts +5 -5
  196. package/build/components/Text/Text.js +35 -35
  197. package/build/components/Text/index.d.ts +3 -3
  198. package/build/components/Text/index.js +2 -2
  199. package/build/components/ToggleButton/ToggleButton.d.ts +5 -5
  200. package/build/components/ToggleButton/ToggleButton.js +44 -44
  201. package/build/components/ToggleButton/index.d.ts +3 -3
  202. package/build/components/ToggleButton/index.js +2 -2
  203. package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +5 -5
  204. package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +37 -37
  205. package/build/components/ToggleButtonGroup/index.d.ts +3 -3
  206. package/build/components/ToggleButtonGroup/index.js +2 -2
  207. package/build/components/Tooltip/Tooltip.d.ts +10 -10
  208. package/build/components/Tooltip/Tooltip.js +53 -44
  209. package/build/components/Tooltip/index.d.ts +3 -3
  210. package/build/components/Tooltip/index.js +2 -2
  211. package/build/components/Warning/Warning.d.ts +13 -13
  212. package/build/components/Warning/Warning.js +53 -53
  213. package/build/components/Warning/index.d.ts +4 -4
  214. package/build/components/Warning/index.js +2 -2
  215. package/build/constants/api.d.ts +51 -35
  216. package/build/constants/api.js +101 -69
  217. package/build/constants/app.d.ts +237 -172
  218. package/build/constants/app.js +725 -485
  219. package/build/constants/assets.d.ts +102 -85
  220. package/build/constants/assets.js +102 -85
  221. package/build/constants/dummy.d.ts +328 -328
  222. package/build/constants/dummy.js +6436 -6436
  223. package/build/constants/index.d.ts +5 -5
  224. package/build/constants/index.js +5 -5
  225. package/build/constants/validation.d.ts +28 -15
  226. package/build/constants/validation.js +28 -15
  227. package/build/features/app/bank/bankStore.d.ts +72 -64
  228. package/build/features/app/bank/bankStore.js +470 -442
  229. package/build/features/app/brand/brandStore.d.ts +109 -0
  230. package/build/features/app/brand/brandStore.js +716 -0
  231. package/build/features/app/business/businessStore.d.ts +128 -93
  232. package/build/features/app/business/businessStore.js +1130 -1001
  233. package/build/features/app/connect/connectStore.d.ts +101 -112
  234. package/build/features/app/connect/connectStore.js +922 -936
  235. package/build/features/app/connectExpress/connectExpressStore.d.ts +134 -0
  236. package/build/features/app/connectExpress/connectExpressStore.js +1145 -0
  237. package/build/features/app/entity/entityStore.d.ts +86 -53
  238. package/build/features/app/entity/entityStore.js +683 -461
  239. package/build/features/app/individual/individualStore.d.ts +142 -68
  240. package/build/features/app/individual/individualStore.js +1217 -460
  241. package/build/features/app/password/passwordStore.d.ts +83 -90
  242. package/build/features/app/password/passwordStore.js +538 -522
  243. package/build/features/app/signIn/signInStore.d.ts +33 -33
  244. package/build/features/app/signIn/signInStore.js +367 -390
  245. package/build/features/app/tax/taxStore.d.ts +55 -46
  246. package/build/features/app/tax/taxStore.js +422 -375
  247. package/build/features/bank/Bank.d.ts +9 -7
  248. package/build/features/bank/Bank.js +71 -69
  249. package/build/features/bank/index.d.ts +1 -1
  250. package/build/features/bank/index.js +1 -1
  251. package/build/features/bank/screens/BankDetails/BankDetails.d.ts +5 -5
  252. package/build/features/bank/screens/BankDetails/BankDetails.js +104 -66
  253. package/build/features/bank/screens/BankDetails/BankName.d.ts +6 -3
  254. package/build/features/bank/screens/BankDetails/BankName.js +64 -59
  255. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +9 -3
  256. package/build/features/bank/screens/BankDetails/BankStatement.js +32 -55
  257. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +6 -5
  258. package/build/features/bank/screens/BankDetails/Beneficiary.js +50 -51
  259. package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +6 -3
  260. package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +66 -67
  261. package/build/features/bank/screens/BankDetails/IBAN.d.ts +8 -7
  262. package/build/features/bank/screens/BankDetails/IBAN.js +104 -97
  263. package/build/features/bank/screens/BankDetails/index.d.ts +3 -3
  264. package/build/features/bank/screens/BankDetails/index.js +2 -2
  265. package/build/features/bank/screens/BankDetails/validation.d.ts +39 -23
  266. package/build/features/bank/screens/BankDetails/validation.js +24 -29
  267. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  268. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  269. package/build/features/bank/screens/PrepareDataLoading/index.d.ts +2 -0
  270. package/build/features/bank/screens/PrepareDataLoading/index.js +2 -0
  271. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  272. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -9
  273. package/build/features/bank/screens/ResetPasswordSuccess/index.d.ts +3 -3
  274. package/build/features/bank/screens/ResetPasswordSuccess/index.js +2 -2
  275. package/build/features/bank/screens/Success/Success.d.ts +5 -5
  276. package/build/features/bank/screens/Success/Success.js +20 -16
  277. package/build/features/bank/screens/Success/index.d.ts +3 -3
  278. package/build/features/bank/screens/Success/index.js +2 -2
  279. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  280. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  281. package/build/features/bank/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  282. package/build/features/bank/screens/SuccessWithFlowButtons/index.js +2 -2
  283. package/build/features/bank/screens/Verify/OTPInput.d.ts +7 -7
  284. package/build/features/bank/screens/Verify/OTPInput.js +49 -47
  285. package/build/features/bank/screens/Verify/Verify.d.ts +5 -5
  286. package/build/features/bank/screens/Verify/Verify.js +74 -78
  287. package/build/features/bank/screens/Verify/index.d.ts +2 -2
  288. package/build/features/bank/screens/Verify/index.js +2 -2
  289. package/build/features/bank/screens/Verify/validation.d.ts +8 -8
  290. package/build/features/bank/screens/Verify/validation.js +4 -4
  291. package/build/features/brand/Brand.d.ts +9 -0
  292. package/build/features/brand/Brand.js +71 -0
  293. package/build/features/brand/index.d.ts +1 -0
  294. package/build/features/brand/index.js +1 -0
  295. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +88 -0
  296. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +177 -0
  297. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
  298. package/build/features/brand/screens/BrandActivities/BrandActivities.js +91 -0
  299. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +78 -0
  300. package/build/features/brand/screens/BrandActivities/CustomerBase.js +147 -0
  301. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +9 -0
  302. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +110 -0
  303. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +9 -0
  304. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +144 -0
  305. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +43 -0
  306. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +93 -0
  307. package/build/features/brand/screens/BrandActivities/TAC.d.ts +19 -0
  308. package/build/features/brand/screens/BrandActivities/TAC.js +93 -0
  309. package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +6 -0
  310. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +56 -0
  311. package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
  312. package/build/features/brand/screens/BrandActivities/index.js +2 -0
  313. package/build/features/brand/screens/BrandActivities/validation.d.ts +71 -0
  314. package/build/features/brand/screens/BrandActivities/validation.js +23 -0
  315. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
  316. package/build/features/brand/screens/BrandInfo/BrandInfo.js +98 -0
  317. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +9 -0
  318. package/build/features/brand/screens/BrandInfo/BrandLogo.js +52 -0
  319. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +9 -0
  320. package/build/features/brand/screens/BrandInfo/BrandName.js +143 -0
  321. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +6 -0
  322. package/build/features/brand/screens/BrandInfo/SalesChannels.js +25 -0
  323. package/build/features/brand/screens/BrandInfo/Segments.d.ts +9 -0
  324. package/build/features/brand/screens/BrandInfo/Segments.js +84 -0
  325. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +9 -0
  326. package/build/features/brand/screens/BrandInfo/TeamSize.js +84 -0
  327. package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
  328. package/build/features/brand/screens/BrandInfo/index.js +2 -0
  329. package/build/features/brand/screens/BrandInfo/validation.d.ts +41 -0
  330. package/build/features/brand/screens/BrandInfo/validation.js +108 -0
  331. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  332. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  333. package/build/features/brand/screens/PrepareDataLoading/index.d.ts +2 -0
  334. package/build/features/brand/screens/PrepareDataLoading/index.js +2 -0
  335. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  336. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -0
  337. package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
  338. package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
  339. package/build/features/brand/screens/Success/Success.d.ts +5 -0
  340. package/build/features/brand/screens/Success/Success.js +20 -0
  341. package/build/features/brand/screens/Success/index.d.ts +3 -0
  342. package/build/features/brand/screens/Success/index.js +2 -0
  343. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  344. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -0
  345. package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  346. package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
  347. package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
  348. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/OTPInput.js +49 -47
  349. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/Verify.d.ts +5 -5
  350. package/build/features/{auth/screens/OTP/OTP.js → brand/screens/Verify/Verify.js} +78 -72
  351. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.d.ts +2 -2
  352. package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.js +2 -2
  353. package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.d.ts +8 -8
  354. package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.js +4 -4
  355. package/build/features/business/Business.d.ts +8 -7
  356. package/build/features/business/Business.js +64 -70
  357. package/build/features/business/index.d.ts +1 -1
  358. package/build/features/business/index.js +1 -1
  359. package/build/features/business/screens/Activities/Activities.d.ts +5 -5
  360. package/build/features/business/screens/Activities/Activities.js +69 -78
  361. package/build/features/business/screens/Activities/ActivitiesList.d.ts +85 -54
  362. package/build/features/business/screens/Activities/ActivitiesList.js +169 -131
  363. package/build/features/business/screens/Activities/LicenseName.d.ts +5 -5
  364. package/build/features/business/screens/Activities/LicenseName.js +30 -30
  365. package/build/features/business/screens/Activities/OperationStartDate.d.ts +20 -6
  366. package/build/features/business/screens/Activities/OperationStartDate.js +45 -26
  367. package/build/features/business/screens/Activities/index.d.ts +3 -3
  368. package/build/features/business/screens/Activities/index.js +2 -2
  369. package/build/features/business/screens/Activities/validation.d.ts +56 -107
  370. package/build/features/business/screens/Activities/validation.js +11 -17
  371. package/build/features/business/screens/BusinessType/Article.d.ts +8 -0
  372. package/build/features/business/screens/BusinessType/Article.js +52 -0
  373. package/build/features/business/screens/BusinessType/BusinessType.d.ts +5 -5
  374. package/build/features/business/screens/BusinessType/BusinessType.js +98 -60
  375. package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
  376. package/build/features/business/screens/BusinessType/EntityLicenseList.js +132 -0
  377. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  378. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  379. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  380. package/build/features/business/screens/BusinessType/LicenseCertificate.js +44 -0
  381. package/build/features/business/screens/BusinessType/LicenseList.d.ts +9 -8
  382. package/build/features/business/screens/BusinessType/LicenseList.js +136 -128
  383. package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +6 -7
  384. package/build/features/business/screens/BusinessType/LicenseNumber.js +54 -46
  385. package/build/features/business/screens/BusinessType/LicenseType.d.ts +34 -0
  386. package/build/features/business/screens/BusinessType/LicenseType.js +103 -0
  387. package/build/features/business/screens/BusinessType/SelectType.d.ts +8 -8
  388. package/build/features/business/screens/BusinessType/SelectType.js +106 -106
  389. package/build/features/business/screens/BusinessType/Switch.d.ts +7 -7
  390. package/build/features/business/screens/BusinessType/Switch.js +35 -35
  391. package/build/features/business/screens/BusinessType/index.d.ts +3 -3
  392. package/build/features/business/screens/BusinessType/index.js +2 -2
  393. package/build/features/business/screens/BusinessType/validation.d.ts +33 -11
  394. package/build/features/business/screens/BusinessType/validation.js +89 -32
  395. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
  396. package/build/features/business/screens/CivilID/CivilID.js +67 -0
  397. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
  398. package/build/features/business/screens/CivilID/IDNumber.js +59 -0
  399. package/build/features/business/screens/CivilID/index.d.ts +3 -0
  400. package/build/features/business/screens/CivilID/index.js +2 -0
  401. package/build/features/business/screens/CivilID/validation.d.ts +8 -0
  402. package/build/features/business/screens/CivilID/validation.js +4 -0
  403. package/build/features/business/screens/Customers/CustomerLocations.d.ts +77 -69
  404. package/build/features/business/screens/Customers/CustomerLocations.js +143 -138
  405. package/build/features/business/screens/Customers/Customers.d.ts +5 -5
  406. package/build/features/business/screens/Customers/Customers.js +90 -84
  407. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +8 -8
  408. package/build/features/business/screens/Customers/ExpectedCustomers.js +107 -98
  409. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +8 -8
  410. package/build/features/business/screens/Customers/ExpectedSalesRange.js +140 -127
  411. package/build/features/business/screens/Customers/RefundPolicy.d.ts +36 -36
  412. package/build/features/business/screens/Customers/RefundPolicy.js +82 -78
  413. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +3 -3
  414. package/build/features/business/screens/Customers/TransactionPolicy.js +42 -38
  415. package/build/features/business/screens/Customers/index.d.ts +3 -3
  416. package/build/features/business/screens/Customers/index.js +2 -2
  417. package/build/features/business/screens/Customers/validation.d.ts +20 -20
  418. package/build/features/business/screens/Customers/validation.js +13 -13
  419. package/build/features/business/screens/IDBOD/DOB.d.ts +6 -6
  420. package/build/features/business/screens/IDBOD/DOB.js +45 -45
  421. package/build/features/business/screens/IDBOD/ID.d.ts +5 -5
  422. package/build/features/business/screens/IDBOD/ID.js +28 -28
  423. package/build/features/business/screens/IDBOD/IDBOD.d.ts +5 -5
  424. package/build/features/business/screens/IDBOD/IDBOD.js +68 -55
  425. package/build/features/business/screens/IDBOD/index.d.ts +3 -3
  426. package/build/features/business/screens/IDBOD/index.js +2 -2
  427. package/build/features/business/screens/IDBOD/validation.d.ts +11 -11
  428. package/build/features/business/screens/IDBOD/validation.js +9 -9
  429. package/build/features/business/screens/OTP/OTP.d.ts +8 -8
  430. package/build/features/business/screens/OTP/OTP.js +90 -77
  431. package/build/features/business/screens/OTP/OTPInput.d.ts +5 -5
  432. package/build/features/business/screens/OTP/OTPInput.js +46 -46
  433. package/build/features/business/screens/OTP/index.d.ts +3 -3
  434. package/build/features/business/screens/OTP/index.js +2 -2
  435. package/build/features/business/screens/OTP/validation.d.ts +8 -8
  436. package/build/features/business/screens/OTP/validation.js +4 -4
  437. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  438. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -9
  439. package/build/features/business/screens/ResetPasswordSuccess/index.d.ts +3 -3
  440. package/build/features/business/screens/ResetPasswordSuccess/index.js +2 -2
  441. package/build/features/business/screens/Success/Success.d.ts +5 -5
  442. package/build/features/business/screens/Success/Success.js +23 -16
  443. package/build/features/business/screens/Success/index.d.ts +3 -3
  444. package/build/features/business/screens/Success/index.js +2 -2
  445. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  446. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  447. package/build/features/business/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  448. package/build/features/business/screens/SuccessWithFlowButtons/index.js +2 -2
  449. package/build/features/business/screens/Verify/OTPInput.d.ts +7 -7
  450. package/build/features/business/screens/Verify/OTPInput.js +49 -47
  451. package/build/features/business/screens/Verify/Verify.d.ts +5 -5
  452. package/build/features/business/screens/Verify/Verify.js +78 -78
  453. package/build/features/business/screens/Verify/index.d.ts +2 -2
  454. package/build/features/business/screens/Verify/index.js +2 -2
  455. package/build/features/business/screens/Verify/validation.d.ts +8 -8
  456. package/build/features/business/screens/Verify/validation.js +4 -4
  457. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  458. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +34 -0
  459. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
  460. package/build/features/business/screens/VerifyPACI/index.js +2 -0
  461. package/build/features/connect/Connect.d.ts +8 -8
  462. package/build/features/connect/Connect.js +66 -79
  463. package/build/features/connect/index.d.ts +1 -1
  464. package/build/features/connect/index.js +1 -1
  465. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -5
  466. package/build/features/connect/screens/CivilID/CivilID.js +102 -85
  467. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -7
  468. package/build/features/connect/screens/CivilID/IDNumber.js +59 -59
  469. package/build/features/connect/screens/CivilID/index.d.ts +3 -3
  470. package/build/features/connect/screens/CivilID/index.js +2 -2
  471. package/build/features/connect/screens/CivilID/validation.d.ts +8 -8
  472. package/build/features/connect/screens/CivilID/validation.js +4 -4
  473. package/build/features/connect/screens/Individual/Email.d.ts +8 -8
  474. package/build/features/connect/screens/Individual/Email.js +108 -108
  475. package/build/features/connect/screens/Individual/Individual.d.ts +5 -5
  476. package/build/features/connect/screens/Individual/Individual.js +101 -88
  477. package/build/features/connect/screens/Individual/MobileNumber.d.ts +10 -10
  478. package/build/features/connect/screens/Individual/MobileNumber.js +156 -152
  479. package/build/features/connect/screens/Individual/Name.d.ts +6 -6
  480. package/build/features/connect/screens/Individual/Name.js +48 -48
  481. package/build/features/connect/screens/Individual/index.d.ts +3 -3
  482. package/build/features/connect/screens/Individual/index.js +2 -2
  483. package/build/features/connect/screens/Individual/validation.d.ts +24 -24
  484. package/build/features/connect/screens/Individual/validation.js +35 -41
  485. package/build/features/connect/screens/Merchant/BrandList.d.ts +10 -10
  486. package/build/features/connect/screens/Merchant/BrandList.js +106 -85
  487. package/build/features/connect/screens/Merchant/BrandName.d.ts +8 -8
  488. package/build/features/connect/screens/Merchant/BrandName.js +142 -139
  489. package/build/features/connect/screens/Merchant/Merchant.d.ts +5 -5
  490. package/build/features/connect/screens/Merchant/Merchant.js +102 -133
  491. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +5 -5
  492. package/build/features/connect/screens/Merchant/SalesChannels.js +38 -114
  493. package/build/features/connect/screens/Merchant/Segments.d.ts +8 -0
  494. package/build/features/connect/screens/Merchant/Segments.js +79 -0
  495. package/build/features/connect/screens/Merchant/TAC.d.ts +6 -6
  496. package/build/features/connect/screens/Merchant/TAC.js +84 -80
  497. package/build/features/connect/screens/Merchant/TeamSize.d.ts +8 -0
  498. package/build/features/connect/screens/Merchant/TeamSize.js +79 -0
  499. package/build/features/connect/screens/Merchant/index.d.ts +3 -3
  500. package/build/features/connect/screens/Merchant/index.js +2 -2
  501. package/build/features/connect/screens/Merchant/validation.d.ts +38 -142
  502. package/build/features/connect/screens/Merchant/validation.js +134 -197
  503. package/build/features/connect/screens/Mobile/Mobile.d.ts +5 -5
  504. package/build/features/connect/screens/Mobile/Mobile.js +133 -115
  505. package/build/features/connect/screens/Mobile/MobileNumber.d.ts +12 -12
  506. package/build/features/connect/screens/Mobile/MobileNumber.js +154 -154
  507. package/build/features/connect/screens/Mobile/Title.d.ts +8 -8
  508. package/build/features/connect/screens/Mobile/Title.js +29 -29
  509. package/build/features/connect/screens/Mobile/index.d.ts +3 -3
  510. package/build/features/connect/screens/Mobile/index.js +2 -2
  511. package/build/features/connect/screens/Mobile/validation.d.ts +8 -8
  512. package/build/features/connect/screens/Mobile/validation.js +28 -28
  513. package/build/features/connect/screens/NID/DOB.d.ts +6 -6
  514. package/build/features/connect/screens/NID/DOB.js +47 -47
  515. package/build/features/connect/screens/NID/IDNumber.d.ts +6 -6
  516. package/build/features/connect/screens/NID/IDNumber.js +60 -60
  517. package/build/features/connect/screens/NID/NID.d.ts +5 -5
  518. package/build/features/connect/screens/NID/NID.js +94 -90
  519. package/build/features/connect/screens/NID/index.d.ts +3 -3
  520. package/build/features/connect/screens/NID/index.js +2 -2
  521. package/build/features/connect/screens/NID/validation.d.ts +11 -11
  522. package/build/features/connect/screens/NID/validation.js +9 -9
  523. package/build/features/connect/screens/OTP/OTP.d.ts +5 -5
  524. package/build/features/connect/screens/OTP/OTP.js +94 -80
  525. package/build/features/connect/screens/OTP/OTPInput.d.ts +5 -5
  526. package/build/features/connect/screens/OTP/OTPInput.js +54 -53
  527. package/build/features/connect/screens/OTP/index.d.ts +3 -3
  528. package/build/features/connect/screens/OTP/index.js +2 -2
  529. package/build/features/connect/screens/OTP/validation.d.ts +8 -8
  530. package/build/features/connect/screens/OTP/validation.js +4 -4
  531. package/build/features/connect/screens/ThankYou/ThankYou.d.ts +5 -5
  532. package/build/features/connect/screens/ThankYou/ThankYou.js +16 -9
  533. package/build/features/connect/screens/ThankYou/index.d.ts +3 -3
  534. package/build/features/connect/screens/ThankYou/index.js +2 -2
  535. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -5
  536. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +95 -169
  537. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -3
  538. package/build/features/connect/screens/VerifyPACI/index.js +2 -2
  539. package/build/features/connectExpress/ConnectExpress.d.ts +11 -0
  540. package/build/features/connectExpress/ConnectExpress.js +83 -0
  541. package/build/features/connectExpress/index.d.ts +1 -0
  542. package/build/features/connectExpress/index.js +1 -0
  543. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +5 -0
  544. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +15 -0
  545. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.d.ts +3 -0
  546. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.js +2 -0
  547. package/build/features/connectExpress/screens/Brand/Brand.d.ts +5 -0
  548. package/build/features/connectExpress/screens/Brand/Brand.js +71 -0
  549. package/build/features/connectExpress/screens/Brand/index.d.ts +2 -0
  550. package/build/features/connectExpress/screens/Brand/index.js +2 -0
  551. package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +5 -0
  552. package/build/features/connectExpress/screens/CivilID/CivilID.js +84 -0
  553. package/build/features/connectExpress/screens/CivilID/IDNumber.d.ts +7 -0
  554. package/build/features/connectExpress/screens/CivilID/IDNumber.js +55 -0
  555. package/build/features/connectExpress/screens/CivilID/index.d.ts +3 -0
  556. package/build/features/connectExpress/screens/CivilID/index.js +2 -0
  557. package/build/features/connectExpress/screens/CivilID/validation.d.ts +8 -0
  558. package/build/features/connectExpress/screens/CivilID/validation.js +4 -0
  559. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +5 -0
  560. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +53 -0
  561. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.d.ts +7 -0
  562. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +55 -0
  563. package/build/features/connectExpress/screens/CivilIDMissed/index.d.ts +3 -0
  564. package/build/features/connectExpress/screens/CivilIDMissed/index.js +2 -0
  565. package/build/features/connectExpress/screens/CivilIDMissed/validation.d.ts +8 -0
  566. package/build/features/connectExpress/screens/CivilIDMissed/validation.js +4 -0
  567. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +9 -0
  568. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +140 -0
  569. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
  570. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +82 -0
  571. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +9 -0
  572. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +142 -0
  573. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +7 -0
  574. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +52 -0
  575. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +35 -0
  576. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +96 -0
  577. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +19 -0
  578. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +82 -0
  579. package/build/features/connectExpress/screens/CollectBusinessInfo/index.d.ts +3 -0
  580. package/build/features/connectExpress/screens/CollectBusinessInfo/index.js +2 -0
  581. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +27 -0
  582. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +155 -0
  583. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +5 -0
  584. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +93 -0
  585. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +9 -0
  586. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +113 -0
  587. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +11 -0
  588. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +153 -0
  589. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +7 -0
  590. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +45 -0
  591. package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
  592. package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
  593. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
  594. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
  595. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
  596. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +34 -0
  597. package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
  598. package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
  599. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.d.ts +5 -5
  600. package/build/features/connectExpress/screens/IdentityOTP/OTP.js +87 -0
  601. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.d.ts +5 -5
  602. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.js +52 -44
  603. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.d.ts +3 -3
  604. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.js +2 -2
  605. package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.d.ts +8 -8
  606. package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.js +4 -4
  607. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +5 -0
  608. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +34 -0
  609. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.d.ts +3 -0
  610. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.js +2 -0
  611. package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +5 -0
  612. package/build/features/connectExpress/screens/Mobile/Mobile.js +111 -0
  613. package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +13 -0
  614. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +155 -0
  615. package/build/features/connectExpress/screens/Mobile/TAC.d.ts +7 -0
  616. package/build/features/connectExpress/screens/Mobile/TAC.js +85 -0
  617. package/build/features/connectExpress/screens/Mobile/Title.d.ts +8 -0
  618. package/build/features/connectExpress/screens/Mobile/Title.js +29 -0
  619. package/build/features/connectExpress/screens/Mobile/index.d.ts +3 -0
  620. package/build/features/connectExpress/screens/Mobile/index.js +2 -0
  621. package/build/features/connectExpress/screens/Mobile/validation.d.ts +8 -0
  622. package/build/features/connectExpress/screens/Mobile/validation.js +60 -0
  623. package/build/features/connectExpress/screens/NID/DOB.d.ts +7 -0
  624. package/build/features/connectExpress/screens/NID/DOB.js +47 -0
  625. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +7 -0
  626. package/build/features/connectExpress/screens/NID/IDNumber.js +61 -0
  627. package/build/features/connectExpress/screens/NID/NID.d.ts +5 -0
  628. package/build/features/connectExpress/screens/NID/NID.js +94 -0
  629. package/build/features/connectExpress/screens/NID/TAC.d.ts +19 -0
  630. package/build/features/connectExpress/screens/NID/TAC.js +82 -0
  631. package/build/features/connectExpress/screens/NID/index.d.ts +3 -0
  632. package/build/features/connectExpress/screens/NID/index.js +2 -0
  633. package/build/features/connectExpress/screens/NID/validation.d.ts +11 -0
  634. package/build/features/connectExpress/screens/NID/validation.js +22 -0
  635. package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +6 -0
  636. package/build/features/connectExpress/screens/NIDMissed/DOB.js +47 -0
  637. package/build/features/connectExpress/screens/NIDMissed/IDNumber.d.ts +6 -0
  638. package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +56 -0
  639. package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
  640. package/build/features/connectExpress/screens/NIDMissed/NID.js +59 -0
  641. package/build/features/connectExpress/screens/NIDMissed/index.d.ts +3 -0
  642. package/build/features/connectExpress/screens/NIDMissed/index.js +2 -0
  643. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +11 -0
  644. package/build/features/connectExpress/screens/NIDMissed/validation.js +9 -0
  645. package/build/features/connectExpress/screens/OTP/OTP.d.ts +5 -0
  646. package/build/features/connectExpress/screens/OTP/OTP.js +88 -0
  647. package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +5 -0
  648. package/build/features/connectExpress/screens/OTP/OTPInput.js +55 -0
  649. package/build/features/connectExpress/screens/OTP/index.d.ts +3 -0
  650. package/build/features/connectExpress/screens/OTP/index.js +2 -0
  651. package/build/features/connectExpress/screens/OTP/validation.d.ts +8 -0
  652. package/build/features/connectExpress/screens/OTP/validation.js +4 -0
  653. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  654. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
  655. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  656. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.js +2 -0
  657. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  658. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +34 -0
  659. package/build/features/connectExpress/screens/VerifyPACI/index.d.ts +3 -0
  660. package/build/features/connectExpress/screens/VerifyPACI/index.js +2 -0
  661. package/build/features/entity/Entity.d.ts +9 -7
  662. package/build/features/entity/Entity.js +71 -70
  663. package/build/features/entity/index.d.ts +1 -1
  664. package/build/features/entity/index.js +1 -1
  665. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +86 -0
  666. package/build/features/entity/screens/EntityCapital/ActivityList.js +170 -0
  667. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +6 -0
  668. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +50 -0
  669. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +6 -0
  670. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +45 -0
  671. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +6 -0
  672. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +50 -0
  673. package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
  674. package/build/features/entity/screens/EntityCapital/EntityCapital.js +77 -0
  675. package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
  676. package/build/features/entity/screens/EntityCapital/index.js +2 -0
  677. package/build/features/entity/screens/EntityCapital/validation.d.ts +62 -0
  678. package/build/features/entity/screens/EntityCapital/validation.js +15 -0
  679. package/build/features/entity/screens/EntityName/Article.d.ts +9 -0
  680. package/build/features/entity/screens/EntityName/Article.js +52 -0
  681. package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
  682. package/build/features/entity/screens/EntityName/EntityName.js +114 -0
  683. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +86 -0
  684. package/build/features/entity/screens/EntityName/EntityTypeList.js +146 -0
  685. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +20 -0
  686. package/build/features/entity/screens/EntityName/ExpiryDate.js +46 -0
  687. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +20 -0
  688. package/build/features/entity/screens/EntityName/IssuingDate.js +45 -0
  689. package/build/features/entity/screens/EntityName/LegalName.d.ts +6 -0
  690. package/build/features/entity/screens/EntityName/LegalName.js +50 -0
  691. package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +9 -0
  692. package/build/features/entity/screens/EntityName/LicenseCertificate.js +48 -0
  693. package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +7 -0
  694. package/build/features/entity/screens/EntityName/LicenseNumber.js +54 -0
  695. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +7 -0
  696. package/build/features/entity/screens/EntityName/UnifiedNumber.js +45 -0
  697. package/build/features/entity/screens/EntityName/index.d.ts +2 -0
  698. package/build/features/entity/screens/EntityName/index.js +2 -0
  699. package/build/features/entity/screens/EntityName/validation.d.ts +60 -0
  700. package/build/features/entity/screens/EntityName/validation.js +91 -0
  701. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  702. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  703. package/build/features/entity/screens/PrepareDataLoading/index.d.ts +2 -0
  704. package/build/features/entity/screens/PrepareDataLoading/index.js +2 -0
  705. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  706. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -9
  707. package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -3
  708. package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -2
  709. package/build/features/entity/screens/Success/Success.d.ts +5 -5
  710. package/build/features/entity/screens/Success/Success.js +20 -16
  711. package/build/features/entity/screens/Success/index.d.ts +3 -3
  712. package/build/features/entity/screens/Success/index.js +2 -2
  713. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  714. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  715. package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  716. package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -2
  717. package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -7
  718. package/build/features/entity/screens/Verify/OTPInput.js +49 -47
  719. package/build/features/entity/screens/Verify/Verify.d.ts +5 -5
  720. package/build/features/entity/screens/Verify/Verify.js +78 -78
  721. package/build/features/entity/screens/Verify/index.d.ts +2 -2
  722. package/build/features/entity/screens/Verify/index.js +2 -2
  723. package/build/features/entity/screens/Verify/validation.d.ts +8 -8
  724. package/build/features/entity/screens/Verify/validation.js +4 -4
  725. package/build/features/featuresScreens.d.ts +11 -11
  726. package/build/features/featuresScreens.js +383 -241
  727. package/build/features/individual/Individual.d.ts +9 -7
  728. package/build/features/individual/Individual.js +71 -70
  729. package/build/features/individual/index.d.ts +1 -1
  730. package/build/features/individual/index.js +1 -1
  731. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +21 -8
  732. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +138 -101
  733. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +9 -0
  734. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +48 -0
  735. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +7 -6
  736. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +56 -45
  737. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +11 -10
  738. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +100 -100
  739. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +11 -10
  740. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +92 -97
  741. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +35 -6
  742. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +75 -45
  743. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +7 -0
  744. package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +41 -0
  745. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +7 -0
  746. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +46 -0
  747. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +9 -0
  748. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +48 -0
  749. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +11 -10
  750. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +91 -89
  751. package/build/features/individual/screens/AdditionalIndividualInfo/index.d.ts +3 -3
  752. package/build/features/individual/screens/AdditionalIndividualInfo/index.js +2 -2
  753. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +33 -25
  754. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +15 -24
  755. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +12 -0
  756. package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +32 -0
  757. package/build/features/individual/screens/IndividualList/Email.d.ts +10 -0
  758. package/build/features/individual/screens/IndividualList/Email.js +113 -0
  759. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
  760. package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
  761. package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
  762. package/build/features/individual/screens/IndividualList/MobileNumber.js +142 -0
  763. package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
  764. package/build/features/individual/screens/IndividualList/UserList.js +203 -0
  765. package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
  766. package/build/features/individual/screens/IndividualList/index.js +2 -0
  767. package/build/features/individual/screens/IndividualList/validation.d.ts +12 -0
  768. package/build/features/individual/screens/IndividualList/validation.js +40 -0
  769. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +9 -0
  770. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +119 -0
  771. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +11 -0
  772. package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/BirthCountry.js} +92 -92
  773. package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +8 -0
  774. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
  775. package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +7 -0
  776. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +47 -0
  777. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +8 -0
  778. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +48 -0
  779. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +35 -0
  780. package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +83 -0
  781. package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +7 -0
  782. package/build/features/individual/screens/IndividualPersonalInfo/ID.js +42 -0
  783. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
  784. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +163 -0
  785. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +11 -0
  786. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +93 -0
  787. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +11 -0
  788. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +145 -0
  789. package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +7 -0
  790. package/build/features/individual/screens/IndividualPersonalInfo/Name.js +51 -0
  791. package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.d.ts → IndividualPersonalInfo/Nationality.d.ts} +11 -10
  792. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +93 -0
  793. package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
  794. package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
  795. package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
  796. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
  797. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +13 -0
  798. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +146 -0
  799. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +5 -0
  800. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +62 -0
  801. package/build/features/individual/screens/IndividualPhoneInfo/index.d.ts +3 -0
  802. package/build/features/individual/screens/IndividualPhoneInfo/index.js +2 -0
  803. package/build/features/individual/screens/IndividualPhoneInfo/validation.d.ts +8 -0
  804. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +31 -0
  805. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  806. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  807. package/build/features/individual/screens/PrepareDataLoading/index.d.ts +2 -0
  808. package/build/features/individual/screens/PrepareDataLoading/index.js +2 -0
  809. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  810. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -9
  811. package/build/features/individual/screens/ResetPasswordSuccess/index.d.ts +3 -3
  812. package/build/features/individual/screens/ResetPasswordSuccess/index.js +2 -2
  813. package/build/features/individual/screens/Success/Success.d.ts +5 -5
  814. package/build/features/individual/screens/Success/Success.js +20 -16
  815. package/build/features/individual/screens/Success/index.d.ts +3 -3
  816. package/build/features/individual/screens/Success/index.js +2 -2
  817. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  818. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  819. package/build/features/individual/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  820. package/build/features/individual/screens/SuccessWithFlowButtons/index.js +2 -2
  821. package/build/features/individual/screens/Verify/OTPInput.d.ts +7 -7
  822. package/build/features/individual/screens/Verify/OTPInput.js +49 -47
  823. package/build/features/individual/screens/Verify/Verify.d.ts +5 -5
  824. package/build/features/individual/screens/Verify/Verify.js +80 -78
  825. package/build/features/individual/screens/Verify/index.d.ts +2 -2
  826. package/build/features/individual/screens/Verify/index.js +2 -2
  827. package/build/features/individual/screens/Verify/validation.d.ts +8 -8
  828. package/build/features/individual/screens/Verify/validation.js +4 -4
  829. package/build/features/password/Password.d.ts +9 -7
  830. package/build/features/password/Password.js +71 -77
  831. package/build/features/password/index.d.ts +1 -1
  832. package/build/features/password/index.js +1 -1
  833. package/build/features/password/screens/CreatePassword/ConditionText.d.ts +7 -7
  834. package/build/features/password/screens/CreatePassword/ConditionText.js +23 -23
  835. package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +8 -8
  836. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +22 -22
  837. package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +5 -5
  838. package/build/features/password/screens/CreatePassword/CreatePassword.js +73 -60
  839. package/build/features/password/screens/CreatePassword/Password.d.ts +5 -5
  840. package/build/features/password/screens/CreatePassword/Password.js +76 -76
  841. package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +7 -7
  842. package/build/features/password/screens/CreatePassword/PasswordBar.js +29 -29
  843. package/build/features/password/screens/CreatePassword/index.d.ts +3 -3
  844. package/build/features/password/screens/CreatePassword/index.js +2 -2
  845. package/build/features/password/screens/CreatePassword/validation.d.ts +11 -11
  846. package/build/features/password/screens/CreatePassword/validation.js +8 -8
  847. package/build/features/password/screens/OTP/OTP.d.ts +8 -8
  848. package/build/features/password/screens/OTP/OTP.js +91 -78
  849. package/build/features/password/screens/OTP/OTPInput.d.ts +5 -5
  850. package/build/features/password/screens/OTP/OTPInput.js +46 -46
  851. package/build/features/password/screens/OTP/index.d.ts +3 -3
  852. package/build/features/password/screens/OTP/index.js +2 -2
  853. package/build/features/password/screens/OTP/validation.d.ts +8 -8
  854. package/build/features/password/screens/OTP/validation.js +4 -4
  855. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  856. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -9
  857. package/build/features/password/screens/ResetPasswordSuccess/index.d.ts +3 -3
  858. package/build/features/password/screens/ResetPasswordSuccess/index.js +2 -2
  859. package/build/features/password/screens/Success/Success.d.ts +5 -5
  860. package/build/features/password/screens/Success/Success.js +26 -22
  861. package/build/features/password/screens/Success/index.d.ts +3 -3
  862. package/build/features/password/screens/Success/index.js +2 -2
  863. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  864. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -110
  865. package/build/features/password/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  866. package/build/features/password/screens/SuccessWithFlowButtons/index.js +2 -2
  867. package/build/features/password/screens/Verify/OTPInput.d.ts +7 -7
  868. package/build/features/password/screens/Verify/OTPInput.js +49 -47
  869. package/build/features/password/screens/Verify/Verify.d.ts +5 -5
  870. package/build/features/password/screens/Verify/Verify.js +91 -78
  871. package/build/features/password/screens/Verify/index.d.ts +2 -2
  872. package/build/features/password/screens/Verify/index.js +2 -2
  873. package/build/features/password/screens/Verify/validation.d.ts +8 -8
  874. package/build/features/password/screens/Verify/validation.js +4 -4
  875. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.d.ts +7 -7
  876. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +65 -65
  877. package/build/features/shared/AcceptancePayouts/index.d.ts +2 -2
  878. package/build/features/shared/AcceptancePayouts/index.js +2 -2
  879. package/build/features/shared/Address/Address.d.ts +16 -0
  880. package/build/features/shared/Address/Address.js +73 -0
  881. package/build/features/shared/Address/CountryList.d.ts +72 -0
  882. package/build/features/shared/Address/CountryList.js +89 -0
  883. package/build/features/{entity/screens/EntityInfoConfirm/ActivitiesList.d.ts → shared/Address/InputSelect.d.ts} +71 -54
  884. package/build/features/shared/Address/InputSelect.js +172 -0
  885. package/build/features/shared/Address/InputText.d.ts +12 -0
  886. package/build/features/shared/Address/InputText.js +12 -0
  887. package/build/features/shared/Address/index.d.ts +2 -0
  888. package/build/features/shared/Address/index.js +2 -0
  889. package/build/features/shared/Background/Background.d.ts +12 -12
  890. package/build/features/shared/Background/Background.js +37 -41
  891. package/build/features/shared/Background/LogoBackground.d.ts +3 -3
  892. package/build/features/shared/Background/LogoBackground.js +42 -42
  893. package/build/features/shared/Background/index.d.ts +2 -2
  894. package/build/features/shared/Background/index.js +2 -2
  895. package/build/features/shared/BouncingDotsLoader/BouncingDotsLoader.d.ts +3 -3
  896. package/build/features/shared/BouncingDotsLoader/BouncingDotsLoader.js +31 -31
  897. package/build/features/shared/BouncingDotsLoader/index.d.ts +2 -2
  898. package/build/features/shared/BouncingDotsLoader/index.js +2 -2
  899. package/build/features/shared/Button/AbsherButton.d.ts +8 -8
  900. package/build/features/shared/Button/AbsherButton.js +46 -46
  901. package/build/features/shared/Button/Button.d.ts +12 -12
  902. package/build/features/shared/Button/Button.js +111 -101
  903. package/build/features/shared/Button/EmailProvidersButtons.d.ts +14 -13
  904. package/build/features/shared/Button/EmailProvidersButtons.js +67 -62
  905. package/build/features/shared/Button/FlowsButtons.d.ts +27 -24
  906. package/build/features/shared/Button/FlowsButtons.js +227 -194
  907. package/build/features/shared/Button/IndividualActionButtons.d.ts +19 -0
  908. package/build/features/shared/Button/IndividualActionButtons.js +132 -0
  909. package/build/features/shared/Button/MobileButton.d.ts +9 -8
  910. package/build/features/shared/Button/MobileButton.js +44 -44
  911. package/build/features/shared/Button/SuccessButton.d.ts +9 -9
  912. package/build/features/shared/Button/SuccessButton.js +86 -86
  913. package/build/features/shared/Button/index.d.ts +9 -8
  914. package/build/features/shared/Button/index.js +9 -8
  915. package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -2
  916. package/build/features/shared/CheckIcon/CheckIcon.js +14 -14
  917. package/build/features/shared/CheckIcon/index.d.ts +2 -2
  918. package/build/features/shared/CheckIcon/index.js +2 -2
  919. package/build/features/shared/ClearIcon/ClearIcon.d.ts +6 -6
  920. package/build/features/shared/ClearIcon/ClearIcon.js +26 -26
  921. package/build/features/shared/ClearIcon/index.d.ts +2 -2
  922. package/build/features/shared/ClearIcon/index.js +2 -2
  923. package/build/features/shared/Containers/FeatureContainer.d.ts +7 -4
  924. package/build/features/shared/Containers/FeatureContainer.js +37 -36
  925. package/build/features/shared/Containers/ScreenContainer.d.ts +4 -4
  926. package/build/features/shared/Containers/ScreenContainer.js +29 -29
  927. package/build/features/shared/Containers/index.d.ts +3 -3
  928. package/build/features/shared/Containers/index.js +3 -3
  929. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +7 -0
  930. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +58 -0
  931. package/build/features/shared/CreateAccountLoading/index.d.ts +2 -0
  932. package/build/features/shared/CreateAccountLoading/index.js +2 -0
  933. package/build/features/shared/DataLoading/DataLoading.d.ts +6 -0
  934. package/build/features/shared/DataLoading/DataLoading.js +58 -0
  935. package/build/features/shared/DataLoading/index.d.ts +2 -0
  936. package/build/features/shared/DataLoading/index.js +2 -0
  937. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -11
  938. package/build/features/shared/Dialog/CloseDialog.js +71 -62
  939. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -8
  940. package/build/features/shared/Dialog/DialogContainer.js +56 -56
  941. package/build/features/shared/Dialog/index.d.ts +4 -4
  942. package/build/features/shared/Dialog/index.js +4 -4
  943. package/build/features/shared/Footer/Footer.d.ts +2 -2
  944. package/build/features/shared/Footer/Footer.js +20 -20
  945. package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
  946. package/build/features/shared/Footer/PoweredByFooter.js +36 -0
  947. package/build/features/shared/Footer/index.d.ts +3 -2
  948. package/build/features/shared/Footer/index.js +3 -2
  949. package/build/features/shared/GenericError/GenericError.d.ts +7 -0
  950. package/build/features/shared/GenericError/GenericError.js +55 -0
  951. package/build/features/shared/GenericError/index.d.ts +2 -0
  952. package/build/features/shared/GenericError/index.js +2 -0
  953. package/build/features/shared/Input/Input.d.ts +28 -26
  954. package/build/features/shared/Input/Input.js +55 -56
  955. package/build/features/shared/Input/index.d.ts +2 -2
  956. package/build/features/shared/Input/index.js +2 -2
  957. package/build/features/shared/Mandatory/Mandatory.d.ts +2 -2
  958. package/build/features/shared/Mandatory/Mandatory.js +20 -20
  959. package/build/features/shared/Mandatory/index.d.ts +2 -2
  960. package/build/features/shared/Mandatory/index.js +2 -2
  961. package/build/features/shared/OTP/OTP.d.ts +11 -10
  962. package/build/features/shared/OTP/OTP.js +93 -93
  963. package/build/features/shared/OTP/index.d.ts +2 -2
  964. package/build/features/shared/OTP/index.js +2 -2
  965. package/build/features/shared/PaciVerification/PaciVerification.d.ts +12 -0
  966. package/build/features/shared/PaciVerification/PaciVerification.js +91 -0
  967. package/build/features/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACILoading.d.ts +7 -5
  968. package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
  969. package/build/features/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.d.ts +5 -5
  970. package/build/features/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.js +8 -8
  971. package/build/features/shared/PaciVerification/index.d.ts +2 -0
  972. package/build/features/shared/PaciVerification/index.js +2 -0
  973. package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +8 -8
  974. package/build/features/shared/PasswordIcon/PasswordIcon.js +37 -37
  975. package/build/features/shared/PasswordIcon/index.d.ts +2 -2
  976. package/build/features/shared/PasswordIcon/index.js +2 -2
  977. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +12 -0
  978. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +101 -0
  979. package/build/features/shared/SalesChannels/SalesChannel.d.ts +13 -0
  980. package/build/features/shared/SalesChannels/SalesChannel.js +150 -0
  981. package/build/features/shared/SalesChannels/index.d.ts +2 -0
  982. package/build/features/shared/SalesChannels/index.js +2 -0
  983. package/build/features/shared/Search/Search.d.ts +7 -7
  984. package/build/features/shared/Search/Search.js +13 -13
  985. package/build/features/shared/Search/index.d.ts +2 -2
  986. package/build/features/shared/Search/index.js +2 -2
  987. package/build/features/shared/SearchIcon/SearchIcon.d.ts +6 -6
  988. package/build/features/shared/SearchIcon/SearchIcon.js +26 -26
  989. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +17 -0
  990. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +125 -0
  991. package/build/features/shared/SuccessFlowButtons/index.d.ts +2 -0
  992. package/build/features/shared/SuccessFlowButtons/index.js +2 -0
  993. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +12 -12
  994. package/build/features/shared/SuccessScreen/SuccessScreen.js +62 -61
  995. package/build/features/shared/SuccessScreen/index.d.ts +2 -2
  996. package/build/features/shared/SuccessScreen/index.js +2 -2
  997. package/build/features/shared/UploadFile/FileUpload.d.ts +31 -0
  998. package/build/features/shared/UploadFile/FileUpload.js +267 -0
  999. package/build/features/shared/UploadFile/UploadFile.d.ts +29 -26
  1000. package/build/features/shared/UploadFile/UploadFile.js +91 -91
  1001. package/build/features/shared/UploadFile/UploadWrapper.d.ts +35 -0
  1002. package/build/features/shared/UploadFile/UploadWrapper.js +115 -0
  1003. package/build/features/shared/UploadFile/index.d.ts +3 -2
  1004. package/build/features/shared/UploadFile/index.js +3 -2
  1005. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +28 -0
  1006. package/build/features/shared/UploadMultipleFile/UploadFile.js +273 -0
  1007. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +35 -0
  1008. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +178 -0
  1009. package/build/features/shared/UploadMultipleFile/index.d.ts +2 -0
  1010. package/build/features/shared/UploadMultipleFile/index.js +2 -0
  1011. package/build/features/signIn/SignIn.d.ts +8 -7
  1012. package/build/features/signIn/SignIn.js +50 -57
  1013. package/build/features/signIn/index.d.ts +1 -1
  1014. package/build/features/signIn/index.js +1 -1
  1015. package/build/features/signIn/screens/Email/Email.d.ts +5 -5
  1016. package/build/features/signIn/screens/Email/Email.js +97 -95
  1017. package/build/features/signIn/screens/Email/EmailField.d.ts +5 -5
  1018. package/build/features/signIn/screens/Email/EmailField.js +55 -55
  1019. package/build/features/signIn/screens/Email/index.d.ts +3 -3
  1020. package/build/features/signIn/screens/Email/index.js +2 -2
  1021. package/build/features/signIn/screens/Email/validation.d.ts +8 -8
  1022. package/build/features/signIn/screens/Email/validation.js +5 -5
  1023. package/build/features/signIn/screens/Mobile/Mobile.d.ts +5 -5
  1024. package/build/features/signIn/screens/Mobile/Mobile.js +110 -106
  1025. package/build/features/signIn/screens/Mobile/MobileNumber.d.ts +11 -11
  1026. package/build/features/signIn/screens/Mobile/MobileNumber.js +151 -151
  1027. package/build/features/signIn/screens/Mobile/index.d.ts +3 -3
  1028. package/build/features/signIn/screens/Mobile/index.js +2 -2
  1029. package/build/features/signIn/screens/Mobile/validation.d.ts +8 -8
  1030. package/build/features/signIn/screens/Mobile/validation.js +28 -28
  1031. package/build/features/signIn/screens/OTP/OTP.d.ts +5 -5
  1032. package/build/features/signIn/screens/OTP/OTP.js +93 -80
  1033. package/build/features/signIn/screens/OTP/OTPInput.d.ts +5 -5
  1034. package/build/features/signIn/screens/OTP/OTPInput.js +53 -53
  1035. package/build/features/signIn/screens/OTP/index.d.ts +3 -3
  1036. package/build/features/signIn/screens/OTP/index.js +2 -2
  1037. package/build/features/signIn/screens/OTP/validation.d.ts +8 -8
  1038. package/build/features/signIn/screens/OTP/validation.js +4 -4
  1039. package/build/features/signIn/screens/Password/Password.d.ts +5 -5
  1040. package/build/features/signIn/screens/Password/Password.js +67 -54
  1041. package/build/features/signIn/screens/Password/PasswordInput.d.ts +5 -5
  1042. package/build/features/signIn/screens/Password/PasswordInput.js +28 -28
  1043. package/build/features/signIn/screens/Password/index.d.ts +3 -3
  1044. package/build/features/signIn/screens/Password/index.js +2 -2
  1045. package/build/features/signIn/screens/Password/validation.d.ts +8 -8
  1046. package/build/features/signIn/screens/Password/validation.js +4 -4
  1047. package/build/features/tax/Tax.d.ts +9 -7
  1048. package/build/features/tax/Tax.js +71 -71
  1049. package/build/features/tax/index.d.ts +1 -1
  1050. package/build/features/tax/index.js +1 -1
  1051. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  1052. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  1053. package/build/features/tax/screens/PrepareDataLoading/index.d.ts +2 -0
  1054. package/build/features/tax/screens/PrepareDataLoading/index.js +2 -0
  1055. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -5
  1056. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -9
  1057. package/build/features/tax/screens/ResetPasswordSuccess/index.d.ts +3 -3
  1058. package/build/features/tax/screens/ResetPasswordSuccess/index.js +2 -2
  1059. package/build/features/tax/screens/Success/Success.d.ts +5 -5
  1060. package/build/features/tax/screens/Success/Success.js +22 -16
  1061. package/build/features/tax/screens/Success/index.d.ts +3 -3
  1062. package/build/features/tax/screens/Success/index.js +2 -2
  1063. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -3
  1064. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -109
  1065. package/build/features/tax/screens/SuccessWithFlowButtons/index.d.ts +2 -2
  1066. package/build/features/tax/screens/SuccessWithFlowButtons/index.js +2 -2
  1067. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +6 -3
  1068. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +66 -66
  1069. package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +5 -5
  1070. package/build/features/tax/screens/TaxDetails/TaxDetails.js +71 -50
  1071. package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +9 -0
  1072. package/build/features/tax/screens/TaxDetails/TaxDocument.js +44 -0
  1073. package/build/features/tax/screens/TaxDetails/VATId.d.ts +6 -3
  1074. package/build/features/tax/screens/TaxDetails/VATId.js +44 -37
  1075. package/build/features/tax/screens/TaxDetails/index.d.ts +3 -3
  1076. package/build/features/tax/screens/TaxDetails/index.js +2 -2
  1077. package/build/features/tax/screens/TaxDetails/validation.d.ts +14 -11
  1078. package/build/features/tax/screens/TaxDetails/validation.js +8 -5
  1079. package/build/features/tax/screens/Verify/OTPInput.d.ts +7 -7
  1080. package/build/features/tax/screens/Verify/OTPInput.js +49 -47
  1081. package/build/features/tax/screens/Verify/Verify.d.ts +5 -5
  1082. package/build/features/tax/screens/Verify/Verify.js +75 -78
  1083. package/build/features/tax/screens/Verify/index.d.ts +2 -2
  1084. package/build/features/tax/screens/Verify/index.js +2 -2
  1085. package/build/features/tax/screens/Verify/validation.d.ts +8 -8
  1086. package/build/features/tax/screens/Verify/validation.js +4 -4
  1087. package/build/hooks/index.d.ts +20 -13
  1088. package/build/hooks/index.js +20 -13
  1089. package/build/hooks/useAppConfig.d.ts +10 -6
  1090. package/build/hooks/useAppConfig.js +68 -61
  1091. package/build/hooks/useAppDispatch.d.ts +13 -13
  1092. package/build/hooks/useAppDispatch.js +2 -2
  1093. package/build/hooks/useAppSelector.d.ts +3 -3
  1094. package/build/hooks/useAppSelector.js +2 -2
  1095. package/build/hooks/useAppTheme.d.ts +4 -4
  1096. package/build/hooks/useAppTheme.js +15 -15
  1097. package/build/hooks/useContainerDimensions.d.ts +4 -4
  1098. package/build/hooks/useContainerDimensions.js +21 -21
  1099. package/build/hooks/useCountUp.d.ts +9 -0
  1100. package/build/hooks/useCountUp.js +17 -0
  1101. package/build/hooks/useCountry.d.ts +4 -0
  1102. package/build/hooks/useCountry.js +7 -0
  1103. package/build/hooks/useDataNoneEditable.d.ts +2 -0
  1104. package/build/hooks/useDataNoneEditable.js +19 -0
  1105. package/build/hooks/useErrorListener.d.ts +1 -1
  1106. package/build/hooks/useErrorListener.js +12 -18
  1107. package/build/hooks/useEventListener.d.ts +5 -5
  1108. package/build/hooks/useEventListener.js +20 -20
  1109. package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +6 -0
  1110. package/build/hooks/useFormErrorAndUpdateReadOnly.js +48 -0
  1111. package/build/hooks/useFormReadOnly.d.ts +6 -0
  1112. package/build/hooks/useFormReadOnly.js +40 -0
  1113. package/build/hooks/useLanguage.d.ts +4 -4
  1114. package/build/hooks/useLanguage.js +8 -8
  1115. package/build/hooks/useRedirectionListener.d.ts +4 -4
  1116. package/build/hooks/useRedirectionListener.js +12 -12
  1117. package/build/hooks/useScreen.d.ts +3 -3
  1118. package/build/hooks/useScreen.js +14 -14
  1119. package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
  1120. package/build/hooks/useSetFromDefaultValues.js +26 -0
  1121. package/build/hooks/useStepStartedListener.d.ts +1 -1
  1122. package/build/hooks/useStepStartedListener.js +10 -10
  1123. package/build/hooks/useThemeMode.d.ts +4 -4
  1124. package/build/hooks/useThemeMode.js +7 -7
  1125. package/build/hooks/useVerifyToken.d.ts +15 -0
  1126. package/build/hooks/useVerifyToken.js +25 -0
  1127. package/build/hooks/useWindowSize.d.ts +6 -6
  1128. package/build/hooks/useWindowSize.js +19 -19
  1129. package/build/i18n.d.ts +2 -2
  1130. package/build/i18n.js +34 -34
  1131. package/build/index.css +140 -0
  1132. package/build/index.d.ts +14 -14
  1133. package/build/index.js +26 -36
  1134. package/build/theme/components.d.ts +2 -2
  1135. package/build/theme/components.js +19 -19
  1136. package/build/theme/index.d.ts +1 -1
  1137. package/build/theme/index.js +1 -1
  1138. package/build/theme/palette.d.ts +3 -3
  1139. package/build/theme/palette.js +68 -68
  1140. package/build/theme/shadows.d.ts +2 -2
  1141. package/build/theme/shadows.js +27 -27
  1142. package/build/theme/theme.d.ts +2 -2
  1143. package/build/theme/theme.js +43 -43
  1144. package/build/theme/typography.d.ts +2 -2
  1145. package/build/theme/typography.js +31 -31
  1146. package/build/utils/array.d.ts +67 -13
  1147. package/build/utils/array.js +181 -65
  1148. package/build/utils/common.d.ts +2 -0
  1149. package/build/utils/common.js +10 -0
  1150. package/build/utils/date.d.ts +2 -0
  1151. package/build/utils/date.js +11 -0
  1152. package/build/utils/device.d.ts +5 -5
  1153. package/build/utils/device.js +26 -26
  1154. package/build/utils/error.d.ts +2 -0
  1155. package/build/utils/error.js +6 -0
  1156. package/build/utils/html.d.ts +4 -5
  1157. package/build/utils/html.js +27 -32
  1158. package/build/utils/index.d.ts +12 -9
  1159. package/build/utils/index.js +12 -9
  1160. package/build/utils/locale.d.ts +2 -2
  1161. package/build/utils/locale.js +22 -22
  1162. package/build/utils/object.d.ts +9 -4
  1163. package/build/utils/object.js +52 -23
  1164. package/build/utils/rsa.d.ts +2 -2
  1165. package/build/utils/rsa.js +19 -19
  1166. package/build/utils/storage.d.ts +5 -5
  1167. package/build/utils/storage.js +21 -21
  1168. package/build/utils/string.d.ts +73 -45
  1169. package/build/utils/string.js +308 -178
  1170. package/build/utils/style.d.ts +1 -1
  1171. package/build/utils/style.js +1 -1
  1172. package/build/utils/validation.d.ts +18 -15
  1173. package/build/utils/validation.js +54 -45
  1174. package/package.json +129 -129
  1175. package/build/api/ip.d.ts +0 -4
  1176. package/build/api/ip.js +0 -12
  1177. package/build/features/app/auth/authStore.d.ts +0 -35
  1178. package/build/features/app/auth/authStore.js +0 -148
  1179. package/build/features/app/otp/otpStore.d.ts +0 -28
  1180. package/build/features/app/otp/otpStore.js +0 -153
  1181. package/build/features/auth/Auth.d.ts +0 -10
  1182. package/build/features/auth/Auth.js +0 -87
  1183. package/build/features/auth/index.d.ts +0 -1
  1184. package/build/features/auth/index.js +0 -1
  1185. package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
  1186. package/build/features/business/screens/Activities/SalesChannels.js +0 -112
  1187. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -9
  1188. package/build/features/connect/screens/Merchant/SocialMedia.js +0 -162
  1189. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -22
  1190. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +0 -139
  1191. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
  1192. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -56
  1193. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
  1194. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -17
  1195. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
  1196. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -28
  1197. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
  1198. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -38
  1199. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
  1200. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
  1201. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
  1202. package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
  1203. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -107
  1204. package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -17
  1205. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
  1206. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +0 -46
  1207. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
  1208. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
  1209. package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
  1210. package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
  1211. package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
  1212. package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
  1213. package/build/features/otp/OTP.d.ts +0 -7
  1214. package/build/features/otp/OTP.js +0 -58
  1215. package/build/features/otp/index.d.ts +0 -0
  1216. package/build/features/otp/index.js +0 -1
  1217. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  1218. package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
@@ -1,1001 +1,1130 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (this && this.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (_) try {
28
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
49
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
50
- if (ar || !(i in from)) {
51
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52
- ar[i] = from[i];
53
- }
54
- }
55
- return to.concat(ar || Array.prototype.slice.call(from));
56
- };
57
- var _a;
58
- import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
- import moment from 'moment';
60
- import API from '@api';
61
- import { BusinessType, FlowsTypes } from '@types';
62
- import { BUSINESS_FLOW_SUCCESS, BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '@constants';
63
- import { convertNumbers2English, getEighteenYearsAgo, hasKey } from '@utils';
64
- import { handleNextScreenStep } from '@app/settings';
65
- export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
- var payload, data, leadResponse, brandInfo, boardResponse, board_id, board_info_id, steps, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
67
- var _a, _b, _c, _d, _e, _f;
68
- return __generator(this, function (_g) {
69
- switch (_g.label) {
70
- case 0:
71
- payload = {
72
- service_name: 'tap_email',
73
- verify_token: token
74
- };
75
- return [4, API.leadService.verifyLeadToken(payload)];
76
- case 1:
77
- data = (_g.sent()).data;
78
- leadResponse = undefined;
79
- brandInfo = undefined;
80
- boardResponse = undefined;
81
- if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 17];
82
- return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
83
- case 2:
84
- leadResponse = _g.sent();
85
- board_id = (_a = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _a === void 0 ? void 0 : _a.board_id;
86
- board_info_id = (_b = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _b === void 0 ? void 0 : _b.board_info_id;
87
- if (!(!!board_id && !!board_info_id)) return [3, 4];
88
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
89
- case 3:
90
- boardResponse = _g.sent();
91
- _g.label = 4;
92
- case 4:
93
- if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH) {
94
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
95
- }
96
- if (!(data.step_name === 'business_info')) return [3, 17];
97
- steps = (_c = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _c === void 0 ? void 0 : _c.steps;
98
- brandID = (_e = (_d = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _d === void 0 ? void 0 : _d.brand) === null || _e === void 0 ? void 0 : _e.id;
99
- hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
100
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
101
- hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
102
- hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
103
- if (!hasBusinessCompleted) return [3, 6];
104
- return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
105
- case 5:
106
- _g.sent();
107
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
108
- return [3, 17];
109
- case 6:
110
- if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 7];
111
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
112
- return [3, 17];
113
- case 7:
114
- if (!hasBusinessCustomersCompleted) return [3, 8];
115
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
116
- return [3, 17];
117
- case 8:
118
- if (!hasBusinessCRActivitiesCompleted) return [3, 12];
119
- return [4, thunkApi.dispatch(retrieveChannels())];
120
- case 9:
121
- _g.sent();
122
- return [4, thunkApi.dispatch(retrieveDataList())];
123
- case 10:
124
- _g.sent();
125
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
126
- return [4, API.brandService.retrieveBrand(brandID)];
127
- case 11:
128
- brandInfo = _g.sent();
129
- return [3, 17];
130
- case 12:
131
- if (!hasBusinessCRInfoCompleted) return [3, 15];
132
- return [4, thunkApi.dispatch(retrieveChannels())];
133
- case 13:
134
- _g.sent();
135
- return [4, API.brandService.retrieveBrand(brandID)];
136
- case 14:
137
- brandInfo = _g.sent();
138
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
139
- return [3, 17];
140
- case 15: return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
141
- case 16:
142
- _g.sent();
143
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
144
- _g.label = 17;
145
- case 17: return [2, {
146
- data: data,
147
- leadData: __assign(__assign({}, leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data), { flows: BUSINESS_FLOW_SUCCESS.concat(boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) }),
148
- token: token,
149
- brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand,
150
- boardId: (_f = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _f === void 0 ? void 0 : _f.board_id
151
- }];
152
- }
153
- });
154
- }); });
155
- export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
156
- var business, payload, data;
157
- return __generator(this, function (_a) {
158
- switch (_a.label) {
159
- case 0:
160
- business = thunkApi.getState().business;
161
- payload = {
162
- service_name: 'tap_email',
163
- verify_token: business.data.verify.token
164
- };
165
- return [4, API.leadService.verifyLeadToken(payload)];
166
- case 1:
167
- data = (_a.sent()).data;
168
- return [2, { data: data }];
169
- }
170
- });
171
- }); });
172
- export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
173
- var _a, business, settings, isNID, responseBody, verifyResponse, stepName, brandID, payload, data, brandInfo, steps, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
174
- var _b, _c, _d, _e, _f, _g, _h, _j;
175
- return __generator(this, function (_k) {
176
- switch (_k.label) {
177
- case 0:
178
- _a = thunkApi.getState(), business = _a.business, settings = _a.settings;
179
- isNID = business.data.otpData.isNID;
180
- responseBody = (isNID ? business.data.nidData : business.data.verify).responseBody;
181
- verifyResponse = business.data.verify.responseBody;
182
- stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
183
- brandID = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
184
- payload = {
185
- data: params.otp,
186
- service_name: ((_e = (_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _d === void 0 ? void 0 : _d.verification_by) === null || _e === void 0 ? void 0 : _e.service_name) || ((_f = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _f === void 0 ? void 0 : _f.service_name),
187
- verify_token: ((_g = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _g === void 0 ? void 0 : _g.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
188
- step_name: stepName,
189
- encryption_contract: ['data']
190
- };
191
- return [4, API.leadService.verifyLeadOTP(payload)];
192
- case 1:
193
- data = (_k.sent()).data;
194
- brandInfo = undefined;
195
- if (!!data.errors) return [3, 14];
196
- thunkApi.dispatch(updateStepName(stepName));
197
- return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
198
- case 2:
199
- _k.sent();
200
- (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, { otp: params.otp });
201
- steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
202
- hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
203
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
204
- hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
205
- hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
206
- if (!isNID) return [3, 3];
207
- thunkApi.dispatch(handleNextScreenStep());
208
- return [3, 14];
209
- case 3:
210
- if (!hasBusinessCompleted) return [3, 5];
211
- return [4, thunkApi.dispatch(retrieveBoardDetails(verifyResponse === null || verifyResponse === void 0 ? void 0 : verifyResponse.board_id))];
212
- case 4:
213
- _k.sent();
214
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
215
- return [3, 14];
216
- case 5:
217
- if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 6];
218
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
219
- return [3, 14];
220
- case 6:
221
- if (!hasBusinessCustomersCompleted) return [3, 7];
222
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
223
- return [3, 14];
224
- case 7:
225
- if (!hasBusinessCRActivitiesCompleted) return [3, 10];
226
- thunkApi.dispatch(retrieveChannels());
227
- return [4, thunkApi.dispatch(retrieveDataList())];
228
- case 8:
229
- _k.sent();
230
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
231
- return [4, API.brandService.retrieveBrand(brandID)];
232
- case 9:
233
- brandInfo = _k.sent();
234
- return [3, 14];
235
- case 10:
236
- if (!hasBusinessCRInfoCompleted) return [3, 13];
237
- return [4, thunkApi.dispatch(retrieveChannels())];
238
- case 11:
239
- _k.sent();
240
- return [4, API.brandService.retrieveBrand(brandID)];
241
- case 12:
242
- brandInfo = _k.sent();
243
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
244
- return [3, 14];
245
- case 13:
246
- thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
247
- _k.label = 14;
248
- case 14: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand }];
249
- }
250
- });
251
- }); });
252
- export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
253
- var _a, settings, business, identification_id_type, stepName, requestBody, data;
254
- var _b, _c, _d;
255
- return __generator(this, function (_e) {
256
- switch (_e.label) {
257
- case 0:
258
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
259
- identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
260
- stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
261
- requestBody = {
262
- id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.id) || '',
263
- identification_id: params.nid,
264
- identification_id_type: identification_id_type,
265
- date_of_birth: params.dob,
266
- country_code: settings.data.businessCountry.iso2,
267
- step_name: stepName,
268
- encryption_contract: ['country_code', 'identification_id', 'identification_id_type', 'date_of_birth']
269
- };
270
- return [4, API.leadService.updateLead(requestBody)];
271
- case 1:
272
- data = _e.sent();
273
- thunkApi.dispatch(updateStepName(stepName));
274
- thunkApi.dispatch(handleNextScreenStep());
275
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, requestBody);
276
- return [2, { data: data, formData: __assign(__assign({}, params), { type: identification_id_type }) }];
277
- }
278
- });
279
- }); });
280
- export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
281
- var _a, settings, business, _b, nid, dob, type, stepName, requestBody, data;
282
- var _c;
283
- return __generator(this, function (_d) {
284
- switch (_d.label) {
285
- case 0:
286
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
287
- _b = business.data.nidData, nid = _b.nid, dob = _b.dob, type = _b.type;
288
- stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
289
- requestBody = {
290
- id: ((_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.id) || '',
291
- identification_id: nid,
292
- identification_id_type: type,
293
- date_of_birth: dob,
294
- country_code: settings.data.businessCountry.iso2,
295
- step_name: stepName,
296
- encryption_contract: ['country_code', 'identification_id', 'identification_id_type', 'date_of_birth']
297
- };
298
- return [4, API.leadService.updateLead(requestBody)];
299
- case 1:
300
- data = _d.sent();
301
- thunkApi.dispatch(updateStepName(stepName));
302
- return [2, data];
303
- }
304
- });
305
- }); });
306
- export var retrieveChannels = createAsyncThunk('retrieveChannels', function () { return __awaiter(void 0, void 0, void 0, function () {
307
- var body, data;
308
- return __generator(this, function (_a) {
309
- switch (_a.label) {
310
- case 0:
311
- body = {
312
- page: 0
313
- };
314
- return [4, API.dataService.getChannelsOfServices(body)];
315
- case 1:
316
- data = _a.sent();
317
- return [2, data];
318
- }
319
- });
320
- }); });
321
- export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function (params) { return __awaiter(void 0, void 0, void 0, function () {
322
- var data;
323
- return __generator(this, function (_a) {
324
- switch (_a.label) {
325
- case 0: return [4, API.leadService.retrieveEntityList(params.leadId)];
326
- case 1:
327
- data = (_a.sent()).data;
328
- return [2, data];
329
- }
330
- });
331
- }); });
332
- export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', function (boardID) { return __awaiter(void 0, void 0, void 0, function () {
333
- var data;
334
- var _a, _b;
335
- return __generator(this, function (_c) {
336
- switch (_c.label) {
337
- case 0: return [4, API.boardService.retrieveBoardDetails(boardID)];
338
- case 1:
339
- data = _c.sent();
340
- return [2, {
341
- 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 })
342
- }];
343
- }
344
- });
345
- }); });
346
- export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
347
- var _a, settings, business, payload, data, accountBody, accountData;
348
- var _b, _c, _d, _e, _f, _g;
349
- return __generator(this, function (_h) {
350
- switch (_h.label) {
351
- case 0:
352
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
353
- payload = {
354
- id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.id) || '',
355
- license_number: params.licenseNumber,
356
- license_type: ((_c = params.selectedLicense) === null || _c === void 0 ? void 0 : _c.type) === BusinessType.FL ? 'freelance' : 'commercial_registration',
357
- business_type: (_d = params.selectedLicense) === null || _d === void 0 ? void 0 : _d.type,
358
- step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO,
359
- encryption_contract: ['license_number', 'business_type', 'license_type']
360
- };
361
- return [4, API.leadService.updateLead(payload)];
362
- case 1:
363
- data = _h.sent();
364
- accountBody = {
365
- lead_id: (_e = business.data.verify.responseBody) === null || _e === void 0 ? void 0 : _e.id,
366
- notify: {
367
- email: false,
368
- phone: false
369
- },
370
- skip_legacy: false,
371
- is_acknowledged: true,
372
- step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
373
- };
374
- return [4, API.accountService.createAccount(accountBody)];
375
- case 2:
376
- accountData = _h.sent();
377
- return [4, thunkApi.dispatch(retrieveChannels())];
378
- case 3:
379
- _h.sent();
380
- thunkApi.dispatch(handleNextScreenStep());
381
- (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
382
- return [2, { data: data, formData: params, accountData: accountData }];
383
- }
384
- });
385
- }); });
386
- export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
387
- var _a, settings, business, channel, activities, stepName, id, requestBody, data;
388
- var _b, _c, _d, _e, _f;
389
- return __generator(this, function (_g) {
390
- switch (_g.label) {
391
- case 0:
392
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
393
- channel = params.salesChannels.map(function (_a) {
394
- var id = _a.id;
395
- return id;
396
- });
397
- activities = (_b = (params.activities || [])) === null || _b === void 0 ? void 0 : _b.map(function (_a) {
398
- var en = _a.en;
399
- return en;
400
- });
401
- stepName = BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES;
402
- id = (_d = (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.id;
403
- requestBody = {
404
- id: id,
405
- brand: {
406
- activities: activities,
407
- channel_services: channel,
408
- business_operation_start_at: params.operationStartDate
409
- },
410
- step_name: stepName,
411
- encryption_contract: ['brand.business_operation_start_at']
412
- };
413
- return [4, API.brandService.updateBrandInfo(requestBody)];
414
- case 1:
415
- data = _g.sent();
416
- thunkApi.dispatch(retrieveDataList());
417
- thunkApi.dispatch(updateStepName(stepName));
418
- thunkApi.dispatch(handleNextScreenStep());
419
- (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
420
- return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: __assign({}, params) }];
421
- }
422
- });
423
- }); });
424
- export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function () { return __awaiter(void 0, void 0, void 0, function () {
425
- var dataBody, _a, customerBases, expectedSales, expectedCustomerSales;
426
- return __generator(this, function (_b) {
427
- switch (_b.label) {
428
- case 0:
429
- dataBody = {
430
- page: 0
431
- };
432
- return [4, Promise.all([
433
- API.dataService.getCustomerBases(dataBody),
434
- API.dataService.getExpectedSales(dataBody),
435
- API.dataService.getExpectedCustomerSales(dataBody)
436
- ])];
437
- case 1:
438
- _a = _b.sent(), customerBases = _a[0], expectedSales = _a[1], expectedCustomerSales = _a[2];
439
- return [2, {
440
- customerBases: customerBases,
441
- expectedSales: expectedSales,
442
- expectedCustomerSales: expectedCustomerSales
443
- }];
444
- }
445
- });
446
- }); });
447
- export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
448
- var _a, settings, business, id, customerBase, stepName, requestBody, data;
449
- var _b, _c, _d, _e, _f, _g;
450
- return __generator(this, function (_h) {
451
- switch (_h.label) {
452
- case 0:
453
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
454
- id = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
455
- customerBase = params.customerLocations.map(function (_a) {
456
- var id = _a.id;
457
- return id;
458
- });
459
- stepName = BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS;
460
- requestBody = {
461
- brand: {
462
- customers_base: customerBase,
463
- customers_served_monthly: (_d = params.expectedCustomer) === null || _d === void 0 ? void 0 : _d.id,
464
- monthly_sales_range: ((_e = params.expectedSale) === null || _e === void 0 ? void 0 : _e.id) || '',
465
- agree_refund: params.refundPolicy,
466
- agree_chargeback: params.transactionPolicy
467
- },
468
- id: id,
469
- step_name: stepName,
470
- encryption_contract: ['brand.customers_served_monthly', 'brand.monthly_sales_range']
471
- };
472
- return [4, API.brandService.updateBrandInfo(requestBody)];
473
- case 1:
474
- data = _h.sent();
475
- thunkApi.dispatch(updateStepName(stepName));
476
- thunkApi.dispatch(handleNextScreenStep());
477
- (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
478
- return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: params }];
479
- }
480
- });
481
- }); });
482
- export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
483
- var _a, settings, business, _b, steps, id, flowCompleted, boardResponse, payload, data, board_id, board_info_id;
484
- var _c, _d, _e, _f;
485
- return __generator(this, function (_g) {
486
- switch (_g.label) {
487
- case 0:
488
- _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
489
- _b = business.data.verify.responseBody || {}, steps = _b.steps, id = _b.id;
490
- flowCompleted = Object.keys(steps).find(function (key) { return key === BUSINESS_STEP_NAMES.BUSINESS_SUCCESS; });
491
- if (flowCompleted || !id)
492
- return [2];
493
- boardResponse = undefined;
494
- payload = {
495
- lang: settings.data.language,
496
- step_name: BUSINESS_STEP_NAMES.BUSINESS_SUCCESS,
497
- id: id,
498
- encryption_contract: []
499
- };
500
- return [4, API.leadService.updateLead(payload)];
501
- case 1:
502
- data = _g.sent();
503
- board_id = data === null || data === void 0 ? void 0 : data.board_id;
504
- board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
505
- if (!(!!board_id && !!board_info_id)) return [3, 3];
506
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
507
- case 2:
508
- boardResponse = _g.sent();
509
- _g.label = 3;
510
- case 3:
511
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
512
- (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
513
- thunkApi.dispatch(handleNextScreenStep());
514
- return [2, {
515
- response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) }),
516
- formData: params
517
- }];
518
- }
519
- });
520
- }); });
521
- export var updateStepName = createAsyncThunk('updateStepName', function (stepName, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
522
- var business, payload, data;
523
- var _a;
524
- return __generator(this, function (_b) {
525
- switch (_b.label) {
526
- case 0:
527
- business = thunkApi.getState().business;
528
- payload = {
529
- step_name: stepName,
530
- id: ((_a = business.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.id) || '',
531
- encryption_contract: []
532
- };
533
- return [4, API.leadService.updateLead(payload)];
534
- case 1:
535
- data = _b.sent();
536
- return [2, { response: data }];
537
- }
538
- });
539
- }); });
540
- var initialState = {
541
- error: null,
542
- loading: false,
543
- customLoading: false,
544
- data: {
545
- flowName: FlowsTypes.BUSINESS,
546
- verify: {
547
- token: ''
548
- },
549
- otpData: {
550
- otp: '',
551
- isNID: false
552
- },
553
- nidData: {
554
- nid: '',
555
- dob: getEighteenYearsAgo(),
556
- type: ''
557
- },
558
- businessTypeData: {
559
- licenseNumber: ''
560
- },
561
- activitiesData: {
562
- activities: [],
563
- salesChannels: [],
564
- operationStartDate: '1998-08-22'
565
- },
566
- customersData: {
567
- customerLocations: [],
568
- expectedCustomer: undefined,
569
- expectedSale: undefined,
570
- refundPolicy: false,
571
- transactionPolicy: false
572
- }
573
- }
574
- };
575
- export var businessSlice = createSlice({
576
- name: 'business/store',
577
- initialState: initialState,
578
- reducers: {
579
- clearError: function (state) {
580
- state.error = null;
581
- },
582
- stopLoader: function (state) {
583
- state.loading = false;
584
- },
585
- resetOTPScreen: function (state) {
586
- state.data.otpData.otp = '';
587
- }
588
- },
589
- extraReducers: function (builder) {
590
- builder
591
- .addCase(verifyLeadToken.pending, function (state) {
592
- state.error = null;
593
- state.customLoading = true;
594
- })
595
- .addCase(verifyLeadToken.fulfilled, function (state, action) {
596
- var _a, _b, _c, _d, _e, _f;
597
- state.error = null;
598
- state.customLoading = false;
599
- var _g = action.payload, data = _g.data, token = _g.token, leadData = _g.leadData, brandInfo = _g.brandInfo, boardId = _g.boardId;
600
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
601
- if (description) {
602
- state.error = description;
603
- return;
604
- }
605
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody), { board_id: boardId });
606
- state.data.verify.token = token;
607
- state.data.otpData.isNID = false;
608
- var _h = state.data.verify.responseBody || {}, entity = _h.entity, entity_activities = _h.entity_activities, business_type = _h.business_type, brand = _h.brand;
609
- var issuingDate = (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at)
610
- ? brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at
611
- : (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
612
- if (!!issuingDate) {
613
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
614
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
615
- }
616
- var channels = (_c = state.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.channelList;
617
- var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
618
- var _j = brand || {}, website = _j.website, social = _j.social;
619
- var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
620
- var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
621
- var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
622
- var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
623
- var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
624
- if (isHasWebsite && (isHasTwitter || isHasInstagram))
625
- selectedChannels = [websiteData, socialData];
626
- else if (isHasTwitter || isHasInstagram)
627
- selectedChannels = [socialData];
628
- else if (isHasWebsite)
629
- selectedChannels = [websiteData];
630
- if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
631
- selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
632
- var _a;
633
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.id === storedChannel; });
634
- });
635
- }
636
- state.data.activitiesData.salesChannels = selectedChannels;
637
- var activities = entity_activities || [];
638
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
639
- var _a;
640
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.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(); });
641
- });
642
- state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]];
643
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
644
- if (!!(entity === null || entity === void 0 ? void 0 : entity.license)) {
645
- var licenseNumber_1 = (_e = entity === null || entity === void 0 ? void 0 : entity.license) === null || _e === void 0 ? void 0 : _e.number;
646
- var _k = state.data.businessTypeData || {}, responseBody = _k.responseBody, selectedLicense = _k.selectedLicense;
647
- var licenseList = (responseBody || {}).licenseList;
648
- var selectedLicenseData = selectedLicense;
649
- if (!!licenseNumber_1) {
650
- selectedLicenseData =
651
- ((_f = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _f === void 0 ? void 0 : _f.call(licenseList, function (_a) {
652
- var license = _a.license;
653
- return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber_1;
654
- })) ||
655
- business_type === BusinessType.CR
656
- ? __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: licenseNumber_1 } }) : __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: licenseNumber_1 } });
657
- state.data.businessTypeData.licenseNumber = licenseNumber_1 || '';
658
- }
659
- state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
660
- }
661
- })
662
- .addCase(verifyLeadToken.rejected, function (state, action) {
663
- state.error = action.error.message;
664
- state.customLoading = false;
665
- })
666
- .addCase(resendOTP.pending, function (state) {
667
- state.error = null;
668
- })
669
- .addCase(resendOTP.fulfilled, function (state, action) {
670
- var _a;
671
- state.error = null;
672
- var data = action.payload.data;
673
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
674
- if (description) {
675
- state.error = description;
676
- return;
677
- }
678
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
679
- })
680
- .addCase(resendOTP.rejected, function (state, action) {
681
- state.error = action.error.message;
682
- })
683
- .addCase(verifyLeadOTP.pending, function (state) {
684
- state.loading = true;
685
- state.error = null;
686
- })
687
- .addCase(verifyLeadOTP.fulfilled, function (state, action) {
688
- var _a, _b, _c, _d, _e, _f;
689
- state.loading = false;
690
- state.error = null;
691
- var _g = action.payload, data = _g.data, formData = _g.formData, brandInfo = _g.brandInfo;
692
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
693
- if (description) {
694
- state.error = description;
695
- return;
696
- }
697
- state.data.otpData = formData;
698
- state.data.otpData.responseBody = data;
699
- var _h = state.data.verify.responseBody || {}, entity = _h.entity, entity_activities = _h.entity_activities, business_type = _h.business_type, brand = _h.brand;
700
- var issuingDate = (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at)
701
- ? brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at
702
- : (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
703
- if (!!issuingDate) {
704
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
705
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
706
- }
707
- var channels = (_c = state.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.channelList;
708
- var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
709
- var _j = brand || {}, website = _j.website, social = _j.social;
710
- var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
711
- var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
712
- var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
713
- var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
714
- var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
715
- if (isHasWebsite && (isHasTwitter || isHasInstagram))
716
- selectedChannels = [websiteData, socialData];
717
- else if (isHasTwitter || isHasInstagram)
718
- selectedChannels = [socialData];
719
- else if (isHasWebsite)
720
- selectedChannels = [websiteData];
721
- if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
722
- selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
723
- var _a;
724
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name.en.toLowerCase() === storedChannel.toLowerCase(); });
725
- });
726
- }
727
- state.data.activitiesData.salesChannels = selectedChannels;
728
- var activities = entity_activities || [];
729
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
730
- var _a;
731
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.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(); });
732
- });
733
- state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]];
734
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
735
- if (!!(entity === null || entity === void 0 ? void 0 : entity.license)) {
736
- var licenseNumber_2 = (_e = entity === null || entity === void 0 ? void 0 : entity.license) === null || _e === void 0 ? void 0 : _e.number;
737
- var _k = state.data.businessTypeData || {}, responseBody = _k.responseBody, selectedLicense = _k.selectedLicense;
738
- var licenseList = (responseBody || {}).licenseList;
739
- var selectedLicenseData = selectedLicense;
740
- if (!!licenseNumber_2) {
741
- selectedLicenseData =
742
- ((_f = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _f === void 0 ? void 0 : _f.call(licenseList, function (_a) {
743
- var license = _a.license;
744
- return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber_2;
745
- })) ||
746
- business_type === BusinessType.CR
747
- ? __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: licenseNumber_2 } }) : __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: licenseNumber_2 } });
748
- state.data.businessTypeData.licenseNumber = licenseNumber_2 || '';
749
- }
750
- state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
751
- }
752
- })
753
- .addCase(verifyLeadOTP.rejected, function (state, action) {
754
- state.loading = false;
755
- state.error = action.error.message;
756
- })
757
- .addCase(updateLeadIdentity.pending, function (state) {
758
- state.loading = true;
759
- state.error = null;
760
- })
761
- .addCase(updateLeadIdentity.fulfilled, function (state, action) {
762
- var _a;
763
- state.loading = false;
764
- state.error = null;
765
- var _b = action.payload, data = _b.data, formData = _b.formData;
766
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
767
- if (description) {
768
- state.error = description;
769
- return;
770
- }
771
- state.data.nidData = formData;
772
- state.data.nidData.responseBody = data;
773
- state.data.otpData.otp = '';
774
- state.data.otpData.isNID = true;
775
- })
776
- .addCase(updateLeadIdentity.rejected, function (state, action) {
777
- state.loading = false;
778
- state.error = action.error.message;
779
- })
780
- .addCase(resendOTPLeadIdentity.pending, function (state) {
781
- state.error = null;
782
- })
783
- .addCase(resendOTPLeadIdentity.fulfilled, function (state, action) {
784
- var _a;
785
- state.error = null;
786
- var data = action.payload;
787
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
788
- if (description) {
789
- state.error = description;
790
- return;
791
- }
792
- state.data.nidData.responseBody = data;
793
- state.data.otpData.otp = '';
794
- state.data.otpData.isNID = true;
795
- })
796
- .addCase(resendOTPLeadIdentity.rejected, function (state, action) {
797
- state.error = action.error.message;
798
- })
799
- .addCase(retrieveEntityList.pending, function (state) {
800
- state.error = null;
801
- state.loading = true;
802
- })
803
- .addCase(retrieveEntityList.fulfilled, function (state, action) {
804
- var _a, _b, _c, _d;
805
- state.error = null;
806
- state.loading = false;
807
- var data = action.payload;
808
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
809
- var licenseList = [];
810
- if (!description) {
811
- var fl = data.fl, cr = data.cr;
812
- if (Array.isArray(cr) && cr.length > 0) {
813
- licenseList = cr.map(function (item) {
814
- return __assign(__assign({}, item), { type: BusinessType.CR });
815
- });
816
- }
817
- if (Array.isArray(fl) && fl.length > 0) {
818
- var mappedFL = fl.map(function (item) {
819
- return __assign(__assign({}, item), { type: BusinessType.FL });
820
- });
821
- licenseList = __spreadArray(__spreadArray([], licenseList, true), mappedFL, true);
822
- }
823
- }
824
- licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
825
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { licenseList: licenseList });
826
- var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
827
- var isOtherLicense = ((_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.number) === 'other_fl' || ((_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number) === 'other_cr';
828
- state.data.businessTypeData.selectedLicense = selectedLicense;
829
- if (!isOtherLicense)
830
- state.data.businessTypeData.licenseNumber = ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) || '';
831
- })
832
- .addCase(retrieveEntityList.rejected, function (state, action) {
833
- state.error = action.error.message;
834
- state.loading = false;
835
- })
836
- .addCase(retrieveBoardDetails.pending, function (state) {
837
- state.error = null;
838
- state.loading = true;
839
- })
840
- .addCase(retrieveBoardDetails.fulfilled, function (state, action) {
841
- state.error = null;
842
- state.loading = false;
843
- var data = (action.payload || {}).data;
844
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
845
- })
846
- .addCase(retrieveBoardDetails.rejected, function (state, action) {
847
- state.error = action.error.message;
848
- state.loading = false;
849
- })
850
- .addCase(retrieveChannels.pending, function (state) {
851
- state.error = null;
852
- state.loading = true;
853
- })
854
- .addCase(retrieveChannels.fulfilled, function (state, action) {
855
- var _a;
856
- state.error = null;
857
- state.loading = false;
858
- var data = action.payload || {};
859
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
860
- if (description) {
861
- state.error = description;
862
- return;
863
- }
864
- var channels = data.list || [];
865
- state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { channelList: channels });
866
- var brand = (state.data.verify.responseBody || {}).brand;
867
- var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
868
- var _b = brand || {}, website = _b.website, social = _b.social;
869
- var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
870
- var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
871
- var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
872
- var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
873
- var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
874
- if (isHasWebsite && (isHasTwitter || isHasInstagram))
875
- selectedChannels = [websiteData, socialData];
876
- else if (isHasTwitter || isHasInstagram)
877
- selectedChannels = [socialData];
878
- else if (isHasWebsite)
879
- selectedChannels = [websiteData];
880
- state.data.activitiesData.salesChannels = selectedChannels;
881
- })
882
- .addCase(retrieveChannels.rejected, function (state, action) {
883
- state.error = action.error.message;
884
- state.loading = false;
885
- })
886
- .addCase(updateLeadBusinessType.pending, function (state) {
887
- state.loading = true;
888
- state.error = null;
889
- })
890
- .addCase(updateLeadBusinessType.fulfilled, function (state, action) {
891
- var _a;
892
- state.loading = false;
893
- state.error = null;
894
- var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData;
895
- state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
896
- var entity = data.entity, entity_activities = data.entity_activities;
897
- var issuingDate = (_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date;
898
- if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
899
- state.error = 'signup_user_exists_error';
900
- return;
901
- }
902
- if (!!issuingDate) {
903
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
904
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
905
- }
906
- var activities = entity_activities || [];
907
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities[0];
908
- if (!!selectedActivity)
909
- state.data.activitiesData.activities = [selectedActivity];
910
- state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData);
911
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
912
- })
913
- .addCase(updateLeadBusinessType.rejected, function (state, action) {
914
- state.loading = false;
915
- state.error = action.error.message;
916
- })
917
- .addCase(updateActivitiesInfo.pending, function (state) {
918
- state.loading = true;
919
- state.error = null;
920
- })
921
- .addCase(updateActivitiesInfo.fulfilled, function (state, action) {
922
- state.loading = false;
923
- state.error = null;
924
- var _a = action.payload, data = _a.data, formData = _a.formData;
925
- state.data.activitiesData = formData;
926
- console.log('updateActivitiesInfo', state.data.activitiesData.responseBody);
927
- console.log('updateActivitiesInfo', data);
928
- state.data.activitiesData.responseBody = __assign(__assign({}, data), state.data.activitiesData.responseBody);
929
- console.log('updateActivitiesInfo', state.data.activitiesData.responseBody);
930
- })
931
- .addCase(updateActivitiesInfo.rejected, function (state, action) {
932
- state.loading = false;
933
- state.error = action.error.message;
934
- })
935
- .addCase(retrieveDataList.pending, function (state) {
936
- state.loading = true;
937
- state.error = null;
938
- })
939
- .addCase(retrieveDataList.fulfilled, function (state, action) {
940
- var _a, _b, _c, _d, _e;
941
- state.loading = false;
942
- state.error = null;
943
- var payload = action.payload;
944
- var customerBases = ((_a = payload.customerBases) === null || _a === void 0 ? void 0 : _a.list) || [];
945
- var customerBase = customerBases === null || customerBases === void 0 ? void 0 : customerBases[1];
946
- var expectedSales = ((_b = payload.expectedSales) === null || _b === void 0 ? void 0 : _b.list) || [];
947
- var expectedSale = (_d = (_c = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales[0]) === null || _c === void 0 ? void 0 : _c.sub) === null || _d === void 0 ? void 0 : _d[4];
948
- var expectedCustomerSales = ((_e = payload.expectedCustomerSales) === null || _e === void 0 ? void 0 : _e.list) || [];
949
- var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[3];
950
- state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
951
- if (!!customerBase)
952
- state.data.customersData.customerLocations = [customerBase];
953
- if (!!expectedSale)
954
- state.data.customersData.expectedSale = expectedSale;
955
- if (!!expectedCustomerSale)
956
- state.data.customersData.expectedCustomer = expectedCustomerSale;
957
- })
958
- .addCase(retrieveDataList.rejected, function (state, action) {
959
- state.loading = false;
960
- state.error = action.error.message;
961
- })
962
- .addCase(updateCustomersInfo.pending, function (state) {
963
- state.loading = true;
964
- state.error = null;
965
- })
966
- .addCase(updateCustomersInfo.fulfilled, function (state, action) {
967
- state.loading = false;
968
- state.error = null;
969
- var _a = action.payload, data = _a.data, formData = _a.formData;
970
- state.data.customersData = formData;
971
- state.data.customersData.responseBody = data;
972
- })
973
- .addCase(updateCustomersInfo.rejected, function (state, action) {
974
- state.loading = false;
975
- state.error = action.error.message;
976
- })
977
- .addCase(updateLeadSuccess.fulfilled, function (state, action) {
978
- var _a;
979
- state.loading = false;
980
- state.error = null;
981
- var response = (action.payload || {}).response;
982
- var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
983
- if (description) {
984
- state.error = description;
985
- return;
986
- }
987
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), response);
988
- })
989
- .addCase(updateLeadSuccess.pending, function (state) {
990
- state.loading = true;
991
- state.error = null;
992
- })
993
- .addCase(updateLeadSuccess.rejected, function (state, action) {
994
- state.loading = false;
995
- state.error = action.error.message;
996
- });
997
- }
998
- });
999
- export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
1000
- export default businessSlice.reducer;
1001
- export var businessSelector = function (state) { return state.business; };
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
49
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
50
+ if (ar || !(i in from)) {
51
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52
+ ar[i] = from[i];
53
+ }
54
+ }
55
+ return to.concat(ar || Array.prototype.slice.call(from));
56
+ };
57
+ var _a;
58
+ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
+ import API from '../../../api';
60
+ import { BusinessType, FlowsTypes, DocumentPurpose, LicenseType } from '../../../@types';
61
+ import { BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_ENTITY_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
62
+ import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense } from '../../../utils';
63
+ import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
64
+ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
65
+ var payload, data, countryIso2, boardData, brandData, leadData, entity_activities, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, activityList;
66
+ var _a;
67
+ return __generator(this, function (_b) {
68
+ switch (_b.label) {
69
+ case 0:
70
+ payload = {
71
+ service_name: 'tap_email',
72
+ verify_token: token
73
+ };
74
+ return [4, API.leadService.verifyLeadToken(payload)];
75
+ case 1:
76
+ data = (_b.sent()).data;
77
+ if ((_a = data.errors) === null || _a === void 0 ? void 0 : _a.length)
78
+ throw new Error(data.errors[0].description);
79
+ if (data.mw_error)
80
+ throw new Error(data.mw_error);
81
+ countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
82
+ if (countryIso2)
83
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
84
+ if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3, 20];
85
+ boardData = undefined;
86
+ brandData = undefined;
87
+ return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
88
+ case 2:
89
+ leadData = (_b.sent()).data;
90
+ countryIso2 = leadData === null || leadData === void 0 ? void 0 : leadData.country_code;
91
+ if (!countryIso2)
92
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
93
+ if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && isKW(countryIso2)) {
94
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
95
+ }
96
+ if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && !isKW(countryIso2)) {
97
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
98
+ }
99
+ if (!(data.step_name === BUSINESS_STEP_NAMES.BUSINESS_INFO)) return [3, 19];
100
+ entity_activities = leadData.entity_activities, steps = leadData.steps, brand = leadData.brand, board_id = leadData.board_id, business_id = leadData.business_id, entity = leadData.entity;
101
+ brandID = brand === null || brand === void 0 ? void 0 : brand.id;
102
+ hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
103
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
104
+ hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
105
+ hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
106
+ if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 4];
107
+ return [4, API.dataService.getActivities()];
108
+ case 3:
109
+ activityList = (_b.sent()).list;
110
+ leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
111
+ _b.label = 4;
112
+ case 4:
113
+ if (!hasBusinessCompleted) return [3, 8];
114
+ if (!board_id) return [3, 7];
115
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
116
+ case 5:
117
+ boardData = _b.sent();
118
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
119
+ case 6:
120
+ _b.sent();
121
+ _b.label = 7;
122
+ case 7:
123
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
124
+ return [3, 19];
125
+ case 8:
126
+ if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 9];
127
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
128
+ return [3, 19];
129
+ case 9:
130
+ if (!hasBusinessCustomersCompleted) return [3, 10];
131
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
132
+ return [3, 19];
133
+ case 10:
134
+ if (!hasBusinessCRActivitiesCompleted) return [3, 13];
135
+ return [4, thunkApi.dispatch(retrieveDataList())];
136
+ case 11:
137
+ _b.sent();
138
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
139
+ return [4, API.brandService.retrieveBrand(brandID)];
140
+ case 12:
141
+ brandData = _b.sent();
142
+ return [3, 19];
143
+ case 13:
144
+ if (!hasBusinessCRInfoCompleted) return [3, 15];
145
+ return [4, API.brandService.retrieveBrand(brandID)];
146
+ case 14:
147
+ brandData = _b.sent();
148
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
149
+ return [3, 19];
150
+ case 15: return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
151
+ case 16:
152
+ _b.sent();
153
+ if (!isSA(countryIso2)) return [3, 18];
154
+ return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
155
+ case 17:
156
+ _b.sent();
157
+ _b.label = 18;
158
+ case 18:
159
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
160
+ _b.label = 19;
161
+ case 19: return [2, {
162
+ data: data,
163
+ leadData: __assign(__assign({}, leadData), { flows: (boardData === null || boardData === void 0 ? void 0 : boardData.info) || [] }),
164
+ token: token,
165
+ brandData: (brandData === null || brandData === void 0 ? void 0 : brandData.brand) || {},
166
+ boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id
167
+ }];
168
+ case 20: return [2, { data: data, isRequireOTP: true, token: token }];
169
+ }
170
+ });
171
+ }); });
172
+ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
173
+ var business, payload, data;
174
+ return __generator(this, function (_a) {
175
+ switch (_a.label) {
176
+ case 0:
177
+ business = thunkApi.getState().business;
178
+ payload = {
179
+ service_name: 'tap_email',
180
+ verify_token: business.data.verify.token
181
+ };
182
+ return [4, API.leadService.verifyLeadToken(payload)];
183
+ case 1:
184
+ data = (_a.sent()).data;
185
+ return [2, { data: data }];
186
+ }
187
+ });
188
+ }); });
189
+ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
190
+ var _a, business, settings, isNID, responseBody, stepName, payload, data, brandData, leadData, brand, country_code, steps, board_id, business_id, entity, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, entity_activities, activityList, boardResponse;
191
+ var _b, _c, _d, _e, _f, _g, _h;
192
+ return __generator(this, function (_j) {
193
+ switch (_j.label) {
194
+ case 0:
195
+ _a = thunkApi.getState(), business = _a.business, settings = _a.settings;
196
+ isNID = business.data.otpData.isNID;
197
+ responseBody = (isNID ? business.data.nidData : business.data.verify).responseBody;
198
+ stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
199
+ payload = {
200
+ data: params.otp,
201
+ service_name: ((_c = (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _b === void 0 ? void 0 : _b.verification_by) === null || _c === void 0 ? void 0 : _c.service_name) || ((_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _d === void 0 ? void 0 : _d.service_name),
202
+ verify_token: ((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _e === void 0 ? void 0 : _e.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
203
+ step_name: stepName,
204
+ encryption_contract: ['data']
205
+ };
206
+ return [4, API.leadService.verifyLeadOTP(payload)];
207
+ case 1:
208
+ data = (_j.sent()).data;
209
+ if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
210
+ throw new Error(data.errors[0].description);
211
+ brandData = undefined;
212
+ return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
213
+ case 2:
214
+ leadData = (_j.sent()).data;
215
+ thunkApi.dispatch(updateStepName(stepName));
216
+ brand = leadData.brand, country_code = leadData.country_code, steps = leadData.steps, board_id = leadData.board_id, business_id = leadData.business_id, entity = leadData.entity;
217
+ brandID = brand === null || brand === void 0 ? void 0 : brand.id;
218
+ countryIso2 = country_code;
219
+ if (countryIso2)
220
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
221
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
222
+ hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
223
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
224
+ hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
225
+ hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
226
+ isIdentityAuthStep = data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH;
227
+ if (!(!isIdentityAuthStep && !hasBusinessCRInfoCompleted)) return [3, 4];
228
+ return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
229
+ case 3:
230
+ _j.sent();
231
+ _j.label = 4;
232
+ case 4:
233
+ if (!(isSA(countryIso2) && !isIdentityAuthStep && !hasBusinessCRInfoCompleted)) return [3, 6];
234
+ return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
235
+ case 5:
236
+ _j.sent();
237
+ _j.label = 6;
238
+ case 6:
239
+ entity_activities = leadData.entity_activities;
240
+ if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 8];
241
+ return [4, API.dataService.getActivities()];
242
+ case 7:
243
+ activityList = (_j.sent()).list;
244
+ leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
245
+ _j.label = 8;
246
+ case 8:
247
+ if (!isNID) return [3, 9];
248
+ thunkApi.dispatch(handleNextScreenStep());
249
+ return [3, 22];
250
+ case 9:
251
+ if (!(isIdentityAuthStep && isKW(countryIso2))) return [3, 10];
252
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
253
+ return [3, 22];
254
+ case 10:
255
+ if (!hasBusinessCompleted) return [3, 14];
256
+ if (!board_id) return [3, 13];
257
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
258
+ case 11:
259
+ boardResponse = _j.sent();
260
+ leadData = __assign(__assign({}, leadData), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] });
261
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
262
+ case 12:
263
+ _j.sent();
264
+ _j.label = 13;
265
+ case 13:
266
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
267
+ return [3, 22];
268
+ case 14:
269
+ if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 15];
270
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
271
+ return [3, 22];
272
+ case 15:
273
+ if (!hasBusinessCustomersCompleted) return [3, 16];
274
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
275
+ return [3, 22];
276
+ case 16:
277
+ if (!hasBusinessCRActivitiesCompleted) return [3, 19];
278
+ return [4, thunkApi.dispatch(retrieveDataList())];
279
+ case 17:
280
+ _j.sent();
281
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
282
+ return [4, API.brandService.retrieveBrand(brandID)];
283
+ case 18:
284
+ brandData = _j.sent();
285
+ return [3, 22];
286
+ case 19:
287
+ if (!hasBusinessCRInfoCompleted) return [3, 21];
288
+ return [4, API.brandService.retrieveBrand(brandID)];
289
+ case 20:
290
+ brandData = _j.sent();
291
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
292
+ return [3, 22];
293
+ case 21:
294
+ thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
295
+ _j.label = 22;
296
+ case 22: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brand: brandData === null || brandData === void 0 ? void 0 : brandData.brand, leadData: leadData }];
297
+ }
298
+ });
299
+ }); });
300
+ export var verifyPACI = createAsyncThunk('businessVerifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
301
+ var _a, settings, business, responseBody, _b, business_id, entity, expiry, interval, maxCalls, count, data, isSuccess;
302
+ var _c, _d, _e, _f;
303
+ return __generator(this, function (_g) {
304
+ switch (_g.label) {
305
+ case 0:
306
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
307
+ responseBody = business.data.civilIdData.responseBody;
308
+ _b = business.data.verify.responseBody || {}, business_id = _b.business_id, entity = _b.entity;
309
+ expiry = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120;
310
+ interval = 5;
311
+ maxCalls = Math.floor(expiry / interval);
312
+ if (thunkApi.signal.aborted) {
313
+ return [2, { response: null }];
314
+ }
315
+ count = 1;
316
+ _g.label = 1;
317
+ case 1:
318
+ if (!(count <= maxCalls)) return [3, 8];
319
+ return [4, API.authService.getTokenVerify(responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token)];
320
+ case 2:
321
+ data = _g.sent();
322
+ isSuccess = ((_c = data.status) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'success';
323
+ if (!isSuccess) return [3, 5];
324
+ return [4, thunkApi.dispatch(retrieveAllEntityList({ businessId: business_id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
325
+ case 3:
326
+ _g.sent();
327
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, {});
328
+ (_f = params === null || params === void 0 ? void 0 : params.onSuccess) === null || _f === void 0 ? void 0 : _f.call(params);
329
+ return [4, sleep(3000)];
330
+ case 4:
331
+ _g.sent();
332
+ thunkApi.dispatch(handleNextScreenStep());
333
+ return [2, { response: data }];
334
+ case 5: return [4, sleep(interval * 1000)];
335
+ case 6:
336
+ _g.sent();
337
+ _g.label = 7;
338
+ case 7:
339
+ count++;
340
+ return [3, 1];
341
+ case 8: throw new Error('paci_verification_failed');
342
+ }
343
+ });
344
+ }); });
345
+ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
346
+ var _a, settings, business, stepName, lead_id, requestBody, data;
347
+ var _b, _c;
348
+ return __generator(this, function (_d) {
349
+ switch (_d.label) {
350
+ case 0:
351
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
352
+ stepName = BUSINESS_STEP_NAMES.CREATE_AUTH_CIVIL_ID;
353
+ lead_id = (business.data.verify.responseBody || {}).lead_id;
354
+ requestBody = {
355
+ id: lead_id || '',
356
+ identification: {
357
+ id: params.civilId,
358
+ issued_country_code: settings.data.businessCountry.iso2,
359
+ type: 'civil_id'
360
+ },
361
+ step_name: stepName,
362
+ encryption_contract: ['identification.id', 'identification.issued_country_code', 'identification.type']
363
+ };
364
+ return [4, API.leadService.updateLead(requestBody)];
365
+ case 1:
366
+ data = _d.sent();
367
+ thunkApi.dispatch(handleNextScreenStep());
368
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
369
+ return [2, { response: data, formData: params }];
370
+ }
371
+ });
372
+ }); });
373
+ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
374
+ var _a, settings, business, identification_id_type, stepName, lead_id, requestBody, data;
375
+ var _b, _c;
376
+ return __generator(this, function (_d) {
377
+ switch (_d.label) {
378
+ case 0:
379
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
380
+ identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
381
+ stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
382
+ lead_id = (business.data.verify.responseBody || {}).lead_id;
383
+ requestBody = {
384
+ id: lead_id || '',
385
+ identification: {
386
+ id: params.nid,
387
+ issued_country_code: settings.data.businessCountry.iso2,
388
+ type: identification_id_type
389
+ },
390
+ date_of_birth: params.dob,
391
+ step_name: stepName,
392
+ encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
393
+ };
394
+ return [4, API.leadService.updateLead(requestBody)];
395
+ case 1:
396
+ data = _d.sent();
397
+ thunkApi.dispatch(handleNextScreenStep());
398
+ (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody);
399
+ return [2, { data: data, formData: __assign(__assign({}, params), { type: identification_id_type }) }];
400
+ }
401
+ });
402
+ }); });
403
+ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
404
+ var _a, settings, business, _b, nid, dob, type, stepName, lead_id, requestBody, data;
405
+ return __generator(this, function (_c) {
406
+ switch (_c.label) {
407
+ case 0:
408
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
409
+ _b = business.data.nidData, nid = _b.nid, dob = _b.dob, type = _b.type;
410
+ stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
411
+ lead_id = (business.data.verify.responseBody || {}).lead_id;
412
+ requestBody = {
413
+ id: lead_id || '',
414
+ identification: {
415
+ id: nid,
416
+ issued_country_code: settings.data.businessCountry.iso2,
417
+ type: type
418
+ },
419
+ date_of_birth: dob,
420
+ step_name: stepName,
421
+ encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
422
+ };
423
+ return [4, API.leadService.updateLead(requestBody)];
424
+ case 1:
425
+ data = _c.sent();
426
+ return [2, data];
427
+ }
428
+ });
429
+ }); });
430
+ export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function (params) { return __awaiter(void 0, void 0, void 0, function () {
431
+ var data;
432
+ return __generator(this, function (_a) {
433
+ switch (_a.label) {
434
+ case 0: return [4, API.leadService.retrieveEntityList(params.leadId)];
435
+ case 1:
436
+ data = (_a.sent()).data;
437
+ return [2, data];
438
+ }
439
+ });
440
+ }); });
441
+ export var retrieveAllEntityList = createAsyncThunk('retrieveAllEntityList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
442
+ var settings, data;
443
+ return __generator(this, function (_a) {
444
+ switch (_a.label) {
445
+ case 0:
446
+ settings = thunkApi.getState().settings;
447
+ return [4, API.entityService.retrieveAllEntities(params.businessId)];
448
+ case 1:
449
+ data = _a.sent();
450
+ return [2, { data: data, businessCountryCode: settings.data.businessCountry.iso2, entityId: params.entityId }];
451
+ }
452
+ });
453
+ }); });
454
+ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', function (boardID) { return __awaiter(void 0, void 0, void 0, function () {
455
+ var data;
456
+ var _a, _b;
457
+ return __generator(this, function (_c) {
458
+ switch (_c.label) {
459
+ case 0: return [4, API.boardService.retrieveBoardDetails(boardID)];
460
+ case 1:
461
+ data = _c.sent();
462
+ return [2, {
463
+ 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, board_id: data === null || data === void 0 ? void 0 : data.id })
464
+ }];
465
+ }
466
+ });
467
+ }); });
468
+ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
469
+ var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, documentBody, payload_1;
470
+ var _b, _c, _d, _e;
471
+ return __generator(this, function (_f) {
472
+ switch (_f.label) {
473
+ case 0:
474
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
475
+ isNonSA = !isSA(settings.data.businessCountry.iso2);
476
+ selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense;
477
+ isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
478
+ payload = __assign(__assign(__assign(__assign(__assign({ id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.lead_id) || '' }, ((selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) &&
479
+ (isNonSA ? !isFL : true) && {
480
+ entity: { id: selectedEntityLicense.id }
481
+ })), (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
482
+ license_number: isNonSA && isFL ? '' : licenseNumber,
483
+ license_type: isFL ? LicenseType.FL : LicenseType.CR,
484
+ business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type
485
+ })), { step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO }), (isNonSA && {
486
+ business_name: isFL ? undefined : { ar: entityLegalName, en: entityLegalName }
487
+ })), { encryption_contract: ['license_number', 'business_type', 'license_type'] });
488
+ return [4, API.leadService.updateLead(payload)];
489
+ case 1:
490
+ data = _f.sent();
491
+ entity_activities = data.entity_activities;
492
+ if (!!entity_activities) return [3, 3];
493
+ return [4, API.dataService.getActivities()];
494
+ case 2:
495
+ list = (_f.sent()).list;
496
+ data.entity_activities = list;
497
+ _f.label = 3;
498
+ case 3:
499
+ accountBody = {
500
+ lead_id: (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.lead_id,
501
+ notify: {
502
+ email: false,
503
+ phone: false
504
+ },
505
+ skip_legacy: false,
506
+ is_acknowledged: true,
507
+ step_name: BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM
508
+ };
509
+ return [4, API.accountService.createAccount(accountBody)];
510
+ case 4:
511
+ accountData = _f.sent();
512
+ entityData = undefined;
513
+ entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
514
+ if (!((certificateId || []).length > 0)) return [3, 6];
515
+ documentBody = {
516
+ entity_id: entityId || '',
517
+ documents: [
518
+ {
519
+ type: DocumentPurpose.CR,
520
+ images: certificateId
521
+ }
522
+ ]
523
+ };
524
+ return [4, API.documentService.updateDocumentInfo(documentBody)];
525
+ case 5:
526
+ documentData = _f.sent();
527
+ _f.label = 6;
528
+ case 6:
529
+ if (!(articleId && entityId)) return [3, 8];
530
+ payload_1 = {
531
+ id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
532
+ AOA_file_id: articleId
533
+ };
534
+ return [4, API.entityService.updateEntity(payload_1)];
535
+ case 7:
536
+ entityData = _f.sent();
537
+ _f.label = 8;
538
+ case 8:
539
+ thunkApi.dispatch(handleNextScreenStep());
540
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
541
+ return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
542
+ }
543
+ });
544
+ }); });
545
+ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
546
+ var _a, settings, business, activities, stepName, id, requestBody, data;
547
+ var _b, _c, _d, _e, _f;
548
+ return __generator(this, function (_g) {
549
+ switch (_g.label) {
550
+ case 0:
551
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
552
+ activities = (_b = (params.activities || [])) === null || _b === void 0 ? void 0 : _b.map(function (_a) {
553
+ var id = _a.id;
554
+ return ({ id: id });
555
+ });
556
+ stepName = BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES;
557
+ id = (_d = (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.id;
558
+ requestBody = {
559
+ id: id,
560
+ activities: activities,
561
+ operations: {
562
+ start_date: params.operationStartDate
563
+ },
564
+ step_name: stepName,
565
+ encryption_contract: ['operations.start_date']
566
+ };
567
+ return [4, API.brandService.updateBrandInfo(requestBody)];
568
+ case 1:
569
+ data = _g.sent();
570
+ thunkApi.dispatch(retrieveDataList());
571
+ thunkApi.dispatch(updateStepName(stepName));
572
+ thunkApi.dispatch(handleNextScreenStep());
573
+ (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
574
+ return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: __assign({}, params) }];
575
+ }
576
+ });
577
+ }); });
578
+ export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
579
+ var settings, countryISO2, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
580
+ return __generator(this, function (_b) {
581
+ switch (_b.label) {
582
+ case 0:
583
+ settings = thunkApi.getState().settings;
584
+ countryISO2 = settings.data.businessCountry.iso2;
585
+ dataBody = {
586
+ page: 0
587
+ };
588
+ salesDataBody = {
589
+ page: 0,
590
+ country_code: [countryISO2]
591
+ };
592
+ return [4, Promise.all([
593
+ API.dataService.getCustomerBases(dataBody),
594
+ API.dataService.getExpectedSales(salesDataBody),
595
+ API.dataService.getExpectedCustomerSales(dataBody)
596
+ ])];
597
+ case 1:
598
+ _a = _b.sent(), customerBases = _a[0].list, expectedSales = _a[1].list, expectedCustomerSales = _a[2].list;
599
+ return [2, {
600
+ customerBases: customerBases,
601
+ expectedSales: expectedSales,
602
+ expectedCustomerSales: expectedCustomerSales,
603
+ countryISO2: countryISO2
604
+ }];
605
+ }
606
+ });
607
+ }); });
608
+ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
609
+ var _a, settings, business, id, customerLocation, customerBase, sales, stepName, requestBody, data;
610
+ var _b, _c, _d, _e, _f, _g;
611
+ return __generator(this, function (_h) {
612
+ switch (_h.label) {
613
+ case 0:
614
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
615
+ id = (_c = (_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
616
+ customerLocation = params.customerLocations.map(function (location) { return ({
617
+ id: location === null || location === void 0 ? void 0 : location.id
618
+ }); });
619
+ customerBase = { id: ((_d = params.expectedCustomer) === null || _d === void 0 ? void 0 : _d.id) || '', period: 'monthly', locations: customerLocation };
620
+ sales = { id: ((_e = params.expectedSale) === null || _e === void 0 ? void 0 : _e.id) || '', period: 'monthly' };
621
+ stepName = BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS;
622
+ requestBody = {
623
+ operations: {
624
+ customer_base: customerBase,
625
+ sales: sales
626
+ },
627
+ term: ['refund', 'chargeback'],
628
+ id: id,
629
+ step_name: stepName,
630
+ encryption_contract: []
631
+ };
632
+ return [4, API.brandService.updateBrandInfo(requestBody)];
633
+ case 1:
634
+ data = _h.sent();
635
+ thunkApi.dispatch(updateStepName(stepName));
636
+ thunkApi.dispatch(handleNextScreenStep());
637
+ (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
638
+ return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: params }];
639
+ }
640
+ });
641
+ }); });
642
+ export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
643
+ var _a, settings, business, _b, steps, lead_id, flowCompleted, boardResponse, payload, data, board_id;
644
+ var _c, _d, _e, _f;
645
+ return __generator(this, function (_g) {
646
+ switch (_g.label) {
647
+ case 0:
648
+ _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
649
+ _b = business.data.verify.responseBody || {}, steps = _b.steps, lead_id = _b.lead_id;
650
+ flowCompleted = Object.keys(steps).find(function (key) { return key === BUSINESS_STEP_NAMES.BUSINESS_SUCCESS; });
651
+ if (flowCompleted || !lead_id)
652
+ return [2];
653
+ boardResponse = undefined;
654
+ payload = {
655
+ lang: settings.data.language,
656
+ step_name: BUSINESS_STEP_NAMES.BUSINESS_SUCCESS,
657
+ id: lead_id,
658
+ encryption_contract: []
659
+ };
660
+ return [4, API.leadService.updateLead(payload)];
661
+ case 1:
662
+ data = _g.sent();
663
+ board_id = data === null || data === void 0 ? void 0 : data.board_id;
664
+ if (!board_id) return [3, 4];
665
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
666
+ case 2:
667
+ boardResponse = _g.sent();
668
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
669
+ case 3:
670
+ _g.sent();
671
+ _g.label = 4;
672
+ case 4:
673
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
674
+ (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
675
+ thunkApi.dispatch(handleNextScreenStep());
676
+ return [2, {
677
+ response: __assign(__assign({}, data), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] }),
678
+ formData: params
679
+ }];
680
+ }
681
+ });
682
+ }); });
683
+ export var updateStepName = createAsyncThunk('updateStepName', function (stepName, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
684
+ var business, payload, data;
685
+ var _a;
686
+ return __generator(this, function (_b) {
687
+ switch (_b.label) {
688
+ case 0:
689
+ business = thunkApi.getState().business;
690
+ payload = {
691
+ step_name: stepName,
692
+ id: ((_a = business.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.lead_id) || '',
693
+ encryption_contract: []
694
+ };
695
+ return [4, API.leadService.updateLead(payload)];
696
+ case 1:
697
+ data = _b.sent();
698
+ return [2, { response: data }];
699
+ }
700
+ });
701
+ }); });
702
+ var initialState = {
703
+ error: null,
704
+ loading: false,
705
+ customLoading: false,
706
+ uploading: false,
707
+ uploadingArticle: false,
708
+ data: {
709
+ flowName: FlowsTypes.BUSINESS,
710
+ verify: {
711
+ token: ''
712
+ },
713
+ otpData: {
714
+ otp: '',
715
+ isNID: false
716
+ },
717
+ civilIdData: {
718
+ civilId: ''
719
+ },
720
+ nidData: {
721
+ nid: '',
722
+ dob: '',
723
+ type: ''
724
+ },
725
+ businessTypeData: {
726
+ licenseNumber: '',
727
+ entityLegalName: ''
728
+ },
729
+ activitiesData: {
730
+ activities: [],
731
+ operationStartDate: ''
732
+ },
733
+ customersData: {
734
+ customerLocations: [],
735
+ expectedCustomer: undefined,
736
+ expectedSale: undefined,
737
+ refundPolicy: false,
738
+ transactionPolicy: false
739
+ }
740
+ }
741
+ };
742
+ export var businessSlice = createSlice({
743
+ name: 'business/store',
744
+ initialState: initialState,
745
+ reducers: {
746
+ clearError: function (state) {
747
+ state.error = null;
748
+ },
749
+ stopLoader: function (state) {
750
+ state.loading = false;
751
+ },
752
+ resetOTPScreen: function (state) {
753
+ state.data.otpData.otp = '';
754
+ },
755
+ uploadingStatus: function (state, action) {
756
+ state.uploading = action.payload;
757
+ },
758
+ uploadingArticleStatus: function (state, action) {
759
+ state.uploadingArticle = action.payload;
760
+ },
761
+ clearAOAFile: function (state) {
762
+ var entity = (state.data.verify.responseBody || {}).entity;
763
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: __assign(__assign({}, entity), { AOA_file: undefined, AOA_file_id: undefined }) });
764
+ }
765
+ },
766
+ extraReducers: function (builder) {
767
+ builder
768
+ .addCase(verifyLeadToken.pending, function (state) {
769
+ state.error = null;
770
+ state.customLoading = true;
771
+ })
772
+ .addCase(verifyLeadToken.fulfilled, function (state, action) {
773
+ var _a, _b;
774
+ state.error = null;
775
+ state.customLoading = false;
776
+ var _c = action.payload, data = _c.data, boardId = _c.boardId, brandData = _c.brandData, leadData = _c.leadData, token = _c.token, isRequireOTP = _c.isRequireOTP;
777
+ var responseBody = state.data.verify.responseBody;
778
+ state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id });
779
+ if (token)
780
+ state.data.verify.token = token;
781
+ state.data.otpData.isNID = false;
782
+ if (isRequireOTP)
783
+ return;
784
+ var _d = state.data.verify.responseBody || {}, entity = _d.entity, entity_activities = _d.entity_activities, business_name = _d.business_name;
785
+ if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
786
+ state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
787
+ var issuingDate = ((_a = brandData === null || brandData === void 0 ? void 0 : brandData.operations) === null || _a === void 0 ? void 0 : _a.start_date) || ((_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date);
788
+ if (issuingDate)
789
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
790
+ var activities = entity_activities || [];
791
+ var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
792
+ var activities = (brandData || {}).activities;
793
+ return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return activity.id === value.id; });
794
+ });
795
+ state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
796
+ state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
797
+ })
798
+ .addCase(verifyLeadToken.rejected, function (state, action) {
799
+ state.error = action.error.message;
800
+ state.customLoading = false;
801
+ })
802
+ .addCase(resendOTP.pending, function (state) {
803
+ state.error = null;
804
+ })
805
+ .addCase(resendOTP.fulfilled, function (state, action) {
806
+ var _a;
807
+ state.error = null;
808
+ var data = action.payload.data;
809
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
810
+ if (description) {
811
+ state.error = description;
812
+ return;
813
+ }
814
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
815
+ })
816
+ .addCase(resendOTP.rejected, function (state, action) {
817
+ state.error = action.error.message;
818
+ })
819
+ .addCase(verifyLeadOTP.pending, function (state) {
820
+ state.loading = true;
821
+ state.error = null;
822
+ })
823
+ .addCase(verifyLeadOTP.fulfilled, function (state, action) {
824
+ var _a, _b;
825
+ state.loading = false;
826
+ state.error = null;
827
+ var _c = action.payload, data = _c.data, formData = _c.formData, brand = _c.brand, leadData = _c.leadData;
828
+ state.data.otpData = formData;
829
+ state.data.otpData.responseBody = data;
830
+ state.data.verify.responseBody = __assign(__assign(__assign({}, leadData), state.data.verify.responseBody), { flows: (leadData === null || leadData === void 0 ? void 0 : leadData.flows) || [] });
831
+ var _d = leadData || {}, entity = _d.entity, entity_activities = _d.entity_activities, business_name = _d.business_name;
832
+ if (business_name === null || business_name === void 0 ? void 0 : business_name.en)
833
+ state.data.businessTypeData.entityLegalName = business_name === null || business_name === void 0 ? void 0 : business_name.en;
834
+ var issuingDate = ((_a = brand === null || brand === void 0 ? void 0 : brand.operations) === null || _a === void 0 ? void 0 : _a.start_date) || ((_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date);
835
+ if (issuingDate)
836
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
837
+ var activities = entity_activities || [];
838
+ var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
839
+ var activities = (brand || {}).activities;
840
+ return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return value.id === activity.id; });
841
+ });
842
+ state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
843
+ state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
844
+ })
845
+ .addCase(verifyLeadOTP.rejected, function (state, action) {
846
+ state.loading = false;
847
+ state.error = action.error.message;
848
+ })
849
+ .addCase(createCivilIdAuth.pending, function (state) {
850
+ state.loading = true;
851
+ state.error = null;
852
+ })
853
+ .addCase(createCivilIdAuth.fulfilled, function (state, action) {
854
+ var _a;
855
+ state.loading = false;
856
+ state.error = null;
857
+ var _b = action.payload, formData = _b.formData, response = _b.response;
858
+ var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
859
+ if (description) {
860
+ state.error = description;
861
+ return;
862
+ }
863
+ state.data.civilIdData = __assign(__assign({}, formData), { responseBody: response });
864
+ })
865
+ .addCase(createCivilIdAuth.rejected, function (state, action) {
866
+ state.loading = false;
867
+ state.error = action.error.message;
868
+ })
869
+ .addCase(verifyPACI.pending, function (state) {
870
+ state.loading = true;
871
+ state.error = null;
872
+ })
873
+ .addCase(verifyPACI.fulfilled, function (state, action) {
874
+ state.loading = false;
875
+ state.error = null;
876
+ state.data.otpData.responseBody = action.payload.response;
877
+ })
878
+ .addCase(verifyPACI.rejected, function (state, action) {
879
+ state.loading = false;
880
+ var error = action.error.message;
881
+ if (error !== 'Aborted') {
882
+ state.error = error;
883
+ }
884
+ })
885
+ .addCase(updateLeadIdentity.pending, function (state) {
886
+ state.loading = true;
887
+ state.error = null;
888
+ })
889
+ .addCase(updateLeadIdentity.fulfilled, function (state, action) {
890
+ var _a;
891
+ state.loading = false;
892
+ state.error = null;
893
+ var _b = action.payload, data = _b.data, formData = _b.formData;
894
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
895
+ if (description) {
896
+ state.error = description;
897
+ return;
898
+ }
899
+ state.data.nidData = formData;
900
+ state.data.nidData.responseBody = data;
901
+ state.data.otpData.otp = '';
902
+ state.data.otpData.isNID = true;
903
+ })
904
+ .addCase(updateLeadIdentity.rejected, function (state, action) {
905
+ state.loading = false;
906
+ state.error = action.error.message;
907
+ })
908
+ .addCase(resendOTPLeadIdentity.pending, function (state) {
909
+ state.error = null;
910
+ })
911
+ .addCase(resendOTPLeadIdentity.fulfilled, function (state, action) {
912
+ var _a;
913
+ state.error = null;
914
+ var data = action.payload;
915
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
916
+ if (description) {
917
+ state.error = description;
918
+ return;
919
+ }
920
+ state.data.nidData.responseBody = data;
921
+ state.data.otpData.otp = '';
922
+ state.data.otpData.isNID = true;
923
+ })
924
+ .addCase(resendOTPLeadIdentity.rejected, function (state, action) {
925
+ state.error = action.error.message;
926
+ })
927
+ .addCase(retrieveEntityList.pending, function (state) {
928
+ state.error = null;
929
+ state.loading = true;
930
+ })
931
+ .addCase(retrieveEntityList.fulfilled, function (state, action) {
932
+ var _a, _b, _c, _d;
933
+ state.error = null;
934
+ state.loading = false;
935
+ var data = action.payload;
936
+ var entityLicenseList = (state.data.businessTypeData.responseBody || {}).entityLicenseList;
937
+ var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
938
+ var licenseList = [];
939
+ if (!description) {
940
+ var fl = data.fl, cr = data.cr;
941
+ if (Array.isArray(cr) && cr.length > 0) {
942
+ licenseList = cr.map(function (item) {
943
+ return __assign(__assign({}, item), { type: BusinessType.CR });
944
+ });
945
+ }
946
+ if (Array.isArray(fl) && fl.length > 0) {
947
+ var mappedFL = fl.map(function (item) {
948
+ return __assign(__assign({}, item), { type: BusinessType.FL });
949
+ });
950
+ licenseList = __spreadArray(__spreadArray([], licenseList, true), mappedFL, true);
951
+ licenseList = licenseList.filter(function (_a) {
952
+ var license = _a.license;
953
+ return !(entityLicenseList || []).some(function (e) { return e.license.number === license.number; });
954
+ });
955
+ }
956
+ }
957
+ licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
958
+ state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { licenseList: licenseList });
959
+ if (!(entityLicenseList === null || entityLicenseList === void 0 ? void 0 : entityLicenseList.length)) {
960
+ var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
961
+ var isOtherLicense_1 = ((_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.number) === 'other_fl' || ((_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number) === 'other_cr';
962
+ state.data.businessTypeData.selectedLicense = selectedLicense;
963
+ if (!isOtherLicense_1)
964
+ state.data.businessTypeData.licenseNumber = ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) || '';
965
+ }
966
+ })
967
+ .addCase(retrieveEntityList.rejected, function (state, action) {
968
+ state.error = action.error.message;
969
+ state.loading = false;
970
+ })
971
+ .addCase(retrieveAllEntityList.pending, function (state) {
972
+ state.error = null;
973
+ state.loading = true;
974
+ })
975
+ .addCase(retrieveAllEntityList.fulfilled, function (state, action) {
976
+ var _a;
977
+ state.error = null;
978
+ state.loading = false;
979
+ var _b = action.payload, data = _b.data, businessCountryCode = _b.businessCountryCode, entityId = _b.entityId;
980
+ var isKWCountry = isKW(businessCountryCode);
981
+ var list = (data === null || data === void 0 ? void 0 : data.entities_info) || [];
982
+ if (isKWCountry) {
983
+ list = list.filter(function (l) { var _a; return ((_a = l.license) === null || _a === void 0 ? void 0 : _a.type) !== LicenseType.FL; });
984
+ }
985
+ var entityLicenseList = [];
986
+ if (list.length > 0) {
987
+ entityLicenseList = list.map(function (item) {
988
+ var _a;
989
+ return __assign(__assign({}, item), { type: ((_a = item.license) === null || _a === void 0 ? void 0 : _a.type) === LicenseType.FL ? BusinessType.FL : BusinessType.CR });
990
+ });
991
+ entityLicenseList = __spreadArray(__spreadArray([], entityLicenseList, true), [OTHER_ENTITY_LICENSE], false);
992
+ state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entityLicenseList: entityLicenseList });
993
+ var findEntity = entityLicenseList.find(function (e) { return e.id === entityId; });
994
+ var selectedLicense = findEntity ? findEntity : entityLicenseList[0];
995
+ state.data.businessTypeData.selectedEntityLicense = selectedLicense;
996
+ state.data.businessTypeData.selectedLicense = selectedLicense;
997
+ if (!isOtherLicense(selectedLicense))
998
+ state.data.businessTypeData.licenseNumber = ((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _a === void 0 ? void 0 : _a.number) || '';
999
+ }
1000
+ })
1001
+ .addCase(retrieveAllEntityList.rejected, function (state, action) {
1002
+ state.error = action.error.message;
1003
+ state.loading = false;
1004
+ })
1005
+ .addCase(retrieveBoardDetails.pending, function (state) {
1006
+ state.error = null;
1007
+ state.loading = true;
1008
+ })
1009
+ .addCase(retrieveBoardDetails.fulfilled, function (state, action) {
1010
+ state.error = null;
1011
+ state.loading = false;
1012
+ var data = (action.payload || {}).data;
1013
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
1014
+ })
1015
+ .addCase(retrieveBoardDetails.rejected, function (state, action) {
1016
+ state.error = action.error.message;
1017
+ state.loading = false;
1018
+ })
1019
+ .addCase(updateLeadBusinessType.pending, function (state) {
1020
+ state.loading = true;
1021
+ state.error = null;
1022
+ })
1023
+ .addCase(updateLeadBusinessType.fulfilled, function (state, action) {
1024
+ var _a;
1025
+ state.loading = false;
1026
+ state.error = null;
1027
+ var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData, documentData = _b.documentData;
1028
+ state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
1029
+ var entity = data.entity, entity_activities = data.entity_activities;
1030
+ var issuingDate = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
1031
+ if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
1032
+ state.error = 'signup_user_exists_error';
1033
+ return;
1034
+ }
1035
+ if (issuingDate) {
1036
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
1037
+ }
1038
+ var activities = entity_activities || [];
1039
+ state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData), documentData);
1040
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
1041
+ })
1042
+ .addCase(updateLeadBusinessType.rejected, function (state, action) {
1043
+ state.loading = false;
1044
+ state.error = action.error.message;
1045
+ })
1046
+ .addCase(updateActivitiesInfo.pending, function (state) {
1047
+ state.loading = true;
1048
+ state.error = null;
1049
+ })
1050
+ .addCase(updateActivitiesInfo.fulfilled, function (state, action) {
1051
+ state.loading = false;
1052
+ state.error = null;
1053
+ var _a = action.payload, data = _a.data, formData = _a.formData;
1054
+ state.data.activitiesData = formData;
1055
+ state.data.activitiesData.responseBody = __assign(__assign({}, data), state.data.activitiesData.responseBody);
1056
+ })
1057
+ .addCase(updateActivitiesInfo.rejected, function (state, action) {
1058
+ state.loading = false;
1059
+ state.error = action.error.message;
1060
+ })
1061
+ .addCase(retrieveDataList.pending, function (state) {
1062
+ state.loading = true;
1063
+ state.error = null;
1064
+ })
1065
+ .addCase(retrieveDataList.fulfilled, function (state, action) {
1066
+ var _a, _b;
1067
+ state.loading = false;
1068
+ state.error = null;
1069
+ var _c = action.payload, customerBases = _c.customerBases, expectedSales = _c.expectedSales, expectedCustomerSales = _c.expectedCustomerSales, countryISO2 = _c.countryISO2;
1070
+ var regional = customerBases.at(1);
1071
+ var local = customerBases.at(0);
1072
+ var expectedSale = (_b = (_a = expectedSales.at(0)) === null || _a === void 0 ? void 0 : _a.sub) === null || _b === void 0 ? void 0 : _b.at(4);
1073
+ var expectedCustomerSale = expectedCustomerSales.at(3);
1074
+ state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
1075
+ if (local && isKW(countryISO2))
1076
+ state.data.customersData.customerLocations = [local];
1077
+ if (regional && local && isSA(countryISO2))
1078
+ state.data.customersData.customerLocations = [regional, local];
1079
+ if (!!expectedSale)
1080
+ state.data.customersData.expectedSale = expectedSale;
1081
+ if (!!expectedCustomerSale)
1082
+ state.data.customersData.expectedCustomer = expectedCustomerSale;
1083
+ })
1084
+ .addCase(retrieveDataList.rejected, function (state, action) {
1085
+ state.loading = false;
1086
+ state.error = action.error.message;
1087
+ })
1088
+ .addCase(updateCustomersInfo.pending, function (state) {
1089
+ state.loading = true;
1090
+ state.error = null;
1091
+ })
1092
+ .addCase(updateCustomersInfo.fulfilled, function (state, action) {
1093
+ state.loading = false;
1094
+ state.error = null;
1095
+ var _a = action.payload, data = _a.data, formData = _a.formData;
1096
+ state.data.customersData = formData;
1097
+ state.data.customersData.responseBody = data;
1098
+ })
1099
+ .addCase(updateCustomersInfo.rejected, function (state, action) {
1100
+ state.loading = false;
1101
+ state.error = action.error.message;
1102
+ })
1103
+ .addCase(updateLeadSuccess.fulfilled, function (state, action) {
1104
+ var _a, _b;
1105
+ state.loading = false;
1106
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: false });
1107
+ state.error = null;
1108
+ var response = (action.payload || {}).response;
1109
+ var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
1110
+ if (description) {
1111
+ state.error = description;
1112
+ return;
1113
+ }
1114
+ state.data.verify.responseBody = __assign(__assign(__assign({}, state.data.verify.responseBody), response), { name: (_b = state.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.name });
1115
+ })
1116
+ .addCase(updateLeadSuccess.pending, function (state) {
1117
+ state.loading = true;
1118
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: true });
1119
+ state.error = null;
1120
+ })
1121
+ .addCase(updateLeadSuccess.rejected, function (state, action) {
1122
+ state.loading = false;
1123
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateLeadSuccessLoading: false });
1124
+ state.error = action.error.message;
1125
+ });
1126
+ }
1127
+ });
1128
+ export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, uploadingArticleStatus = _a.uploadingArticleStatus, clearAOAFile = _a.clearAOAFile;
1129
+ export default businessSlice.reducer;
1130
+ export var businessSelector = function (state) { return state.business; };