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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/build/@types/app.d.ts +39 -14
  2. package/build/@types/app.js +9 -0
  3. package/build/@types/form.d.ts +11 -0
  4. package/build/api/account.js +1 -1
  5. package/build/api/auth.d.ts +15 -2
  6. package/build/api/auth.js +25 -2
  7. package/build/api/availabilityServices.js +1 -1
  8. package/build/api/axios.js +4 -4
  9. package/build/api/board.js +1 -1
  10. package/build/api/brand.d.ts +1 -1
  11. package/build/api/brand.js +1 -1
  12. package/build/api/country.js +1 -1
  13. package/build/api/data.d.ts +33 -7
  14. package/build/api/data.js +42 -17
  15. package/build/api/entity.d.ts +2 -0
  16. package/build/api/entity.js +1 -1
  17. package/build/api/firebase.js +1 -1
  18. package/build/api/individual.d.ts +1 -1
  19. package/build/api/individual.js +1 -1
  20. package/build/api/ip.js +1 -1
  21. package/build/api/lead.d.ts +1 -1
  22. package/build/api/lead.js +1 -1
  23. package/build/api/operator.js +1 -1
  24. package/build/api/user.js +1 -1
  25. package/build/app/rootReducer.d.ts +10 -7
  26. package/build/app/rootReducer.js +14 -8
  27. package/build/app/settings.d.ts +2 -2
  28. package/build/app/settings.js +11 -5
  29. package/build/app/store.d.ts +6 -0
  30. package/build/assets/locales/ar.json +14 -4
  31. package/build/assets/locales/en.json +14 -4
  32. package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
  33. package/build/components/AnimationFlow/AnimationFlow.js +5 -7
  34. package/build/components/AnimationFlow/BottomSheet.js +2 -1
  35. package/build/components/AnimationFlow/Dialog.d.ts +4 -1
  36. package/build/components/AnimationFlow/Dialog.js +10 -5
  37. package/build/components/DatePicker/DatePicker.js +3 -3
  38. package/build/components/FileInput/DragAndDrop.d.ts +9 -1
  39. package/build/components/FileInput/DragAndDrop.js +115 -10
  40. package/build/components/FileInput/UploadInput.js +2 -2
  41. package/build/components/Footer/Footer.js +3 -3
  42. package/build/components/Input/Input.js +2 -2
  43. package/build/components/Lottie/Lottie.d.ts +878 -0
  44. package/build/components/Lottie/Lottie.js +58 -0
  45. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  46. package/build/components/Lottie/files/success.json +425 -0
  47. package/build/components/Lottie/index.d.ts +3 -0
  48. package/build/components/Lottie/index.js +3 -0
  49. package/build/components/OTPTimer/OTPTimer.js +1 -1
  50. package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
  51. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  52. package/build/components/ProgressBar/index.d.ts +2 -0
  53. package/build/components/ProgressBar/index.js +2 -0
  54. package/build/components/Providers/ThemeProvider.d.ts +1 -1
  55. package/build/components/SimpleList/SimpleList.js +1 -1
  56. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +3 -2
  57. package/build/components/SocialMediaGroup/SocialMediaGroup.js +29 -36
  58. package/build/constants/api.d.ts +1 -0
  59. package/build/constants/api.js +10 -7
  60. package/build/constants/app.d.ts +16 -1
  61. package/build/constants/app.js +76 -4
  62. package/build/constants/assets.d.ts +17 -1
  63. package/build/constants/assets.js +22 -6
  64. package/build/constants/validation.d.ts +1 -0
  65. package/build/constants/validation.js +1 -0
  66. package/build/features/app/auth/authStore.d.ts +35 -0
  67. package/build/features/app/auth/authStore.js +148 -0
  68. package/build/features/app/bank/bankStore.d.ts +6 -2
  69. package/build/features/app/bank/bankStore.js +46 -26
  70. package/build/features/app/business/businessStore.d.ts +2 -2
  71. package/build/features/app/business/businessStore.js +58 -48
  72. package/build/features/app/connect/connectStore.d.ts +14 -2
  73. package/build/features/app/connect/connectStore.js +170 -10
  74. package/build/features/app/entity/entityStore.d.ts +53 -0
  75. package/build/features/app/entity/entityStore.js +461 -0
  76. package/build/features/app/individual/individualStore.d.ts +2 -2
  77. package/build/features/app/individual/individualStore.js +23 -15
  78. package/build/features/app/otp/otpStore.d.ts +28 -0
  79. package/build/features/app/otp/otpStore.js +153 -0
  80. package/build/features/app/password/passwordStore.d.ts +2 -2
  81. package/build/features/app/password/passwordStore.js +4 -4
  82. package/build/features/app/signIn/signInStore.d.ts +2 -2
  83. package/build/features/app/signIn/signInStore.js +6 -6
  84. package/build/features/app/tax/taxStore.d.ts +2 -2
  85. package/build/features/app/tax/taxStore.js +5 -5
  86. package/build/features/auth/Auth.d.ts +10 -0
  87. package/build/features/auth/Auth.js +87 -0
  88. package/build/features/auth/index.d.ts +1 -0
  89. package/build/features/auth/index.js +1 -0
  90. package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
  91. package/build/features/auth/screens/OTP/OTP.js +72 -0
  92. package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
  93. package/build/features/auth/screens/OTP/OTPInput.js +44 -0
  94. package/build/features/auth/screens/OTP/index.d.ts +3 -0
  95. package/build/features/auth/screens/OTP/index.js +2 -0
  96. package/build/features/auth/screens/OTP/validation.d.ts +8 -0
  97. package/build/features/auth/screens/OTP/validation.js +4 -0
  98. package/build/features/bank/Bank.d.ts +1 -1
  99. package/build/features/bank/Bank.js +18 -12
  100. package/build/features/bank/screens/BankDetails/BankDetails.js +9 -9
  101. package/build/features/bank/screens/BankDetails/BankName.js +8 -8
  102. package/build/features/bank/screens/BankDetails/BankStatement.js +35 -10
  103. package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
  104. package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +5 -5
  105. package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
  106. package/build/features/bank/screens/BankDetails/validation.js +1 -1
  107. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  108. package/build/features/bank/screens/Success/Success.js +3 -3
  109. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
  110. package/build/features/bank/screens/Verify/OTPInput.js +4 -4
  111. package/build/features/bank/screens/Verify/Verify.js +9 -9
  112. package/build/features/business/Business.d.ts +2 -2
  113. package/build/features/business/Business.js +20 -13
  114. package/build/features/business/screens/Activities/Activities.js +7 -7
  115. package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
  116. package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
  117. package/build/features/business/screens/Activities/LicenseName.js +6 -6
  118. package/build/features/business/screens/Activities/OperationStartDate.js +4 -4
  119. package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
  120. package/build/features/business/screens/Activities/SalesChannels.js +8 -8
  121. package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
  122. package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
  123. package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
  124. package/build/features/business/screens/BusinessType/SelectType.js +6 -6
  125. package/build/features/business/screens/BusinessType/validation.js +2 -2
  126. package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
  127. package/build/features/business/screens/Customers/CustomerLocations.js +33 -15
  128. package/build/features/business/screens/Customers/Customers.js +8 -8
  129. package/build/features/business/screens/Customers/ExpectedCustomers.js +22 -10
  130. package/build/features/business/screens/Customers/ExpectedSalesRange.js +39 -21
  131. package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
  132. package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
  133. package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
  134. package/build/features/business/screens/IDBOD/DOB.js +5 -5
  135. package/build/features/business/screens/IDBOD/ID.js +6 -6
  136. package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
  137. package/build/features/business/screens/OTP/OTP.js +9 -9
  138. package/build/features/business/screens/OTP/OTPInput.js +4 -4
  139. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  140. package/build/features/business/screens/Success/Success.js +3 -3
  141. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
  142. package/build/features/business/screens/Verify/OTPInput.js +4 -4
  143. package/build/features/business/screens/Verify/Verify.js +9 -9
  144. package/build/features/connect/Connect.d.ts +3 -2
  145. package/build/features/connect/Connect.js +46 -16
  146. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  147. package/build/features/connect/screens/CivilID/CivilID.js +85 -0
  148. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  149. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  150. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  151. package/build/features/connect/screens/CivilID/index.js +2 -0
  152. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  153. package/build/features/connect/screens/CivilID/validation.js +4 -0
  154. package/build/features/connect/screens/Individual/Email.js +7 -7
  155. package/build/features/connect/screens/Individual/Individual.js +14 -10
  156. package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
  157. package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
  158. package/build/features/connect/screens/Individual/Name.js +6 -6
  159. package/build/features/connect/screens/Individual/validation.js +1 -1
  160. package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
  161. package/build/features/connect/screens/Merchant/BrandList.js +8 -8
  162. package/build/features/connect/screens/Merchant/BrandName.js +10 -10
  163. package/build/features/connect/screens/Merchant/Merchant.js +42 -18
  164. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +5 -0
  165. package/build/features/connect/screens/Merchant/SalesChannels.js +114 -0
  166. package/build/features/connect/screens/Merchant/SocialMedia.js +65 -20
  167. package/build/features/connect/screens/Merchant/TAC.js +7 -7
  168. package/build/features/connect/screens/Merchant/validation.d.ts +87 -0
  169. package/build/features/connect/screens/Merchant/validation.js +69 -3
  170. package/build/features/connect/screens/Mobile/Mobile.js +16 -13
  171. package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
  172. package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
  173. package/build/features/connect/screens/Mobile/Title.js +2 -2
  174. package/build/features/connect/screens/NID/DOB.js +5 -5
  175. package/build/features/connect/screens/NID/IDNumber.js +8 -8
  176. package/build/features/connect/screens/NID/NID.js +8 -8
  177. package/build/features/connect/screens/OTP/OTP.js +9 -9
  178. package/build/features/connect/screens/OTP/OTPInput.js +4 -4
  179. package/build/features/connect/screens/ThankYou/ThankYou.js +1 -1
  180. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  181. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +169 -0
  182. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  183. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  184. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  185. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  186. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  187. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  188. package/build/features/entity/Entity.d.ts +7 -0
  189. package/build/features/entity/Entity.js +70 -0
  190. package/build/features/entity/index.d.ts +1 -0
  191. package/build/features/entity/index.js +1 -0
  192. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
  193. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +139 -0
  194. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +5 -0
  195. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +56 -0
  196. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
  197. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
  198. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
  199. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
  200. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
  201. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
  202. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +5 -0
  203. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +112 -0
  204. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +2 -0
  205. package/build/features/entity/screens/EntityInfoConfirm/index.js +2 -0
  206. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
  207. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
  208. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  209. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  210. package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -0
  211. package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -0
  212. package/build/features/entity/screens/Success/Success.d.ts +5 -0
  213. package/build/features/entity/screens/Success/Success.js +16 -0
  214. package/build/features/entity/screens/Success/index.d.ts +3 -0
  215. package/build/features/entity/screens/Success/index.js +2 -0
  216. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  217. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +109 -0
  218. package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  219. package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -0
  220. package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -0
  221. package/build/features/entity/screens/Verify/OTPInput.js +47 -0
  222. package/build/features/entity/screens/Verify/Verify.d.ts +5 -0
  223. package/build/features/entity/screens/Verify/Verify.js +78 -0
  224. package/build/features/entity/screens/Verify/index.d.ts +2 -0
  225. package/build/features/entity/screens/Verify/index.js +2 -0
  226. package/build/features/entity/screens/Verify/validation.d.ts +8 -0
  227. package/build/features/entity/screens/Verify/validation.js +4 -0
  228. package/build/features/featuresScreens.d.ts +4 -1
  229. package/build/features/featuresScreens.js +88 -40
  230. package/build/features/individual/Individual.d.ts +2 -2
  231. package/build/features/individual/Individual.js +20 -13
  232. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +9 -9
  233. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
  234. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
  235. package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
  236. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
  237. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
  238. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +23 -12
  239. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -1
  240. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +19 -11
  241. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
  242. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
  243. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +10 -10
  244. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
  245. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  246. package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
  247. package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
  248. package/build/features/individual/screens/Success/Success.js +3 -3
  249. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
  250. package/build/features/individual/screens/Verify/OTPInput.js +4 -4
  251. package/build/features/individual/screens/Verify/Verify.js +9 -9
  252. package/build/features/otp/OTP.d.ts +7 -0
  253. package/build/features/otp/OTP.js +58 -0
  254. package/build/features/otp/index.d.ts +0 -0
  255. package/build/features/otp/index.js +1 -0
  256. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +6 -0
  257. package/build/features/otp/screens/OTPVerify/OTPInput.js +47 -0
  258. package/build/features/otp/screens/OTPVerify/Verify.d.ts +5 -0
  259. package/build/features/otp/screens/OTPVerify/Verify.js +49 -0
  260. package/build/features/otp/screens/OTPVerify/index.d.ts +2 -0
  261. package/build/features/otp/screens/OTPVerify/index.js +2 -0
  262. package/build/features/otp/screens/OTPVerify/validation.d.ts +8 -0
  263. package/build/features/otp/screens/OTPVerify/validation.js +4 -0
  264. package/build/features/password/Password.d.ts +2 -2
  265. package/build/features/password/Password.js +20 -13
  266. package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
  267. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
  268. package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -8
  269. package/build/features/password/screens/CreatePassword/Password.js +6 -6
  270. package/build/features/password/screens/OTP/OTP.js +9 -9
  271. package/build/features/password/screens/OTP/OTPInput.js +4 -4
  272. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  273. package/build/features/password/screens/Success/Success.js +4 -4
  274. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
  275. package/build/features/password/screens/Verify/OTPInput.js +4 -4
  276. package/build/features/password/screens/Verify/Verify.js +9 -9
  277. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +4 -4
  278. package/build/features/shared/Background/Background.d.ts +7 -5
  279. package/build/features/shared/Background/Background.js +16 -5
  280. package/build/features/shared/Background/LogoBackground.js +3 -3
  281. package/build/features/shared/Button/AbsherButton.d.ts +1 -1
  282. package/build/features/shared/Button/AbsherButton.js +3 -3
  283. package/build/features/shared/Button/Button.d.ts +1 -1
  284. package/build/features/shared/Button/Button.js +7 -7
  285. package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
  286. package/build/features/shared/Button/EmailProvidersButtons.js +2 -2
  287. package/build/features/shared/Button/FlowsButtons.d.ts +2 -2
  288. package/build/features/shared/Button/FlowsButtons.js +6 -6
  289. package/build/features/shared/Button/MobileButton.d.ts +1 -1
  290. package/build/features/shared/Button/MobileButton.js +3 -3
  291. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  292. package/build/features/shared/Dialog/CloseDialog.js +62 -0
  293. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  294. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  295. package/build/features/shared/Dialog/index.d.ts +4 -0
  296. package/build/features/shared/Dialog/index.js +4 -0
  297. package/build/features/shared/Footer/Footer.js +4 -4
  298. package/build/features/shared/Input/Input.d.ts +2 -2
  299. package/build/features/shared/Input/Input.js +4 -4
  300. package/build/features/shared/OTP/OTP.d.ts +1 -1
  301. package/build/features/shared/OTP/OTP.js +3 -3
  302. package/build/features/shared/Search/Search.js +1 -1
  303. package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
  304. package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
  305. package/build/features/shared/UploadFile/UploadFile.d.ts +8 -3
  306. package/build/features/shared/UploadFile/UploadFile.js +27 -12
  307. package/build/features/signIn/SignIn.d.ts +2 -2
  308. package/build/features/signIn/SignIn.js +21 -13
  309. package/build/features/signIn/screens/Email/Email.js +8 -8
  310. package/build/features/signIn/screens/Email/EmailField.js +5 -5
  311. package/build/features/signIn/screens/Email/validation.js +1 -1
  312. package/build/features/signIn/screens/Mobile/Mobile.js +9 -9
  313. package/build/features/signIn/screens/Mobile/MobileNumber.d.ts +1 -1
  314. package/build/features/signIn/screens/Mobile/MobileNumber.js +12 -12
  315. package/build/features/signIn/screens/OTP/OTP.js +9 -9
  316. package/build/features/signIn/screens/OTP/OTPInput.js +4 -4
  317. package/build/features/signIn/screens/Password/Password.js +7 -7
  318. package/build/features/signIn/screens/Password/PasswordInput.js +3 -3
  319. package/build/features/tax/Tax.d.ts +2 -2
  320. package/build/features/tax/Tax.js +21 -13
  321. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
  322. package/build/features/tax/screens/Success/Success.js +3 -3
  323. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
  324. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +5 -5
  325. package/build/features/tax/screens/TaxDetails/TaxDetails.js +6 -6
  326. package/build/features/tax/screens/TaxDetails/VATId.js +5 -5
  327. package/build/features/tax/screens/Verify/OTPInput.js +4 -4
  328. package/build/features/tax/screens/Verify/Verify.js +9 -9
  329. package/build/hooks/index.d.ts +1 -0
  330. package/build/hooks/index.js +1 -0
  331. package/build/hooks/useAppConfig.d.ts +1 -1
  332. package/build/hooks/useAppConfig.js +6 -4
  333. package/build/hooks/useAppDispatch.d.ts +3 -0
  334. package/build/hooks/useAppSelector.d.ts +1 -1
  335. package/build/hooks/useAppTheme.d.ts +1 -1
  336. package/build/hooks/useAppTheme.js +3 -3
  337. package/build/hooks/useErrorListener.js +4 -3
  338. package/build/hooks/useLanguage.js +1 -1
  339. package/build/hooks/useRedirectionListener.js +1 -1
  340. package/build/hooks/useScreen.d.ts +3 -0
  341. package/build/hooks/useScreen.js +14 -0
  342. package/build/hooks/useStepStartedListener.js +1 -1
  343. package/build/i18n.js +1 -1
  344. package/build/index.d.ts +12 -9
  345. package/build/index.js +18 -9
  346. package/build/theme/theme.d.ts +1 -1
  347. package/build/utils/array.d.ts +1 -1
  348. package/build/utils/device.d.ts +1 -0
  349. package/build/utils/device.js +13 -0
  350. package/build/utils/html.d.ts +1 -0
  351. package/build/utils/html.js +6 -0
  352. package/build/utils/locale.d.ts +1 -1
  353. package/build/utils/locale.js +2 -2
  354. package/build/utils/rsa.d.ts +2 -2
  355. package/build/utils/rsa.js +2 -2
  356. package/build/utils/string.d.ts +23 -21
  357. package/build/utils/string.js +13 -4
  358. package/package.json +1 -1
  359. package/build/api/index.d.ts +0 -83
  360. package/build/components/DatePicker/customStyle.css +0 -86
  361. package/build/index.css +0 -140
@@ -1,4 +1,4 @@
1
- import { REGEX_WEBSITE, REGEX_BRAND_NAME } from '../../../../constants';
1
+ import { REGEX_WEBSITE, REGEX_BRAND_NAME } from '@constants';
2
2
  import * as yup from 'yup';
3
3
  export var ValidationOptions;
4
4
  (function (ValidationOptions) {
@@ -24,6 +24,15 @@ export var MerchantValidationSchema = function (userType) {
24
24
  })
25
25
  .required(''),
26
26
  termAndConditionChecked: yup.boolean().required().isTrue('check_terms_cond'),
27
+ salesChannels: yup
28
+ .array()
29
+ .min(1, 'choose_atleast_one_channel')
30
+ .of(yup.object().shape({
31
+ id: yup.string(),
32
+ name_en: yup.string(),
33
+ name_ar: yup.string()
34
+ }))
35
+ .required('choose_atleast_one_channel'),
27
36
  links: yup.object().shape({
28
37
  website: yup.string().when(['instagram', 'twitter'], function (instagram, twitter) {
29
38
  if (!instagram && !twitter) {
@@ -67,7 +76,31 @@ export var MerchantValidationSchema = function (userType) {
67
76
  else {
68
77
  return yup.string().optional();
69
78
  }
70
- })
79
+ }),
80
+ apple_store: yup
81
+ .string()
82
+ .nullable()
83
+ .transform(function (value) { return (!!value ? value : null); })
84
+ .min(2, 'enter_at_least_one')
85
+ .optional(),
86
+ play_store: yup
87
+ .string()
88
+ .nullable()
89
+ .transform(function (value) { return (!!value ? value : null); })
90
+ .min(2, 'enter_at_least_one')
91
+ .optional(),
92
+ call_center: yup
93
+ .string()
94
+ .nullable()
95
+ .transform(function (value) { return (!!value ? value : null); })
96
+ .min(2, 'enter_at_least_one')
97
+ .optional(),
98
+ physical_store: yup
99
+ .string()
100
+ .nullable()
101
+ .transform(function (value) { return (!!value ? value : null); })
102
+ .min(2, 'enter_at_least_one')
103
+ .optional()
71
104
  }, [
72
105
  ['instagram', 'website'],
73
106
  ['twitter', 'website'],
@@ -78,6 +111,15 @@ export var MerchantValidationSchema = function (userType) {
78
111
  return yup.object().shape({
79
112
  brandName: yup.string().optional(),
80
113
  termAndConditionChecked: yup.boolean().optional(),
114
+ salesChannels: yup
115
+ .array()
116
+ .min(1, 'choose_atleast_one_channel')
117
+ .of(yup.object().shape({
118
+ id: yup.string(),
119
+ name_en: yup.string(),
120
+ name_ar: yup.string()
121
+ }))
122
+ .required('choose_atleast_one_channel'),
81
123
  links: yup.object().shape({
82
124
  website: yup.string().when(['instagram', 'twitter'], function (instagram, twitter) {
83
125
  if (!instagram && !twitter) {
@@ -121,7 +163,31 @@ export var MerchantValidationSchema = function (userType) {
121
163
  else {
122
164
  return yup.string().optional();
123
165
  }
124
- })
166
+ }),
167
+ apple_store: yup
168
+ .string()
169
+ .nullable()
170
+ .transform(function (value) { return (!!value ? value : null); })
171
+ .min(2, 'enter_at_least_one')
172
+ .optional(),
173
+ play_store: yup
174
+ .string()
175
+ .nullable()
176
+ .transform(function (value) { return (!!value ? value : null); })
177
+ .min(2, 'enter_at_least_one')
178
+ .optional(),
179
+ call_center: yup
180
+ .string()
181
+ .nullable()
182
+ .transform(function (value) { return (!!value ? value : null); })
183
+ .min(2, 'enter_at_least_one')
184
+ .optional(),
185
+ physical_store: yup
186
+ .string()
187
+ .nullable()
188
+ .transform(function (value) { return (!!value ? value : null); })
189
+ .min(2, 'enter_at_least_one')
190
+ .optional()
125
191
  }, [
126
192
  ['instagram', 'website'],
127
193
  ['twitter', 'website'],
@@ -16,16 +16,17 @@ import { useForm, FormProvider } from 'react-hook-form';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { useTranslation } from 'react-i18next';
18
18
  import { styled, alpha } from '@mui/material/styles';
19
- import Collapse from '../../../../components/Collapse';
20
- import Form from '../../../../components/Form';
21
- import Button, { AbsherButton } from '../../../shared/Button';
22
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
23
- import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
24
- import ScreenContainer from '../../../shared/Containers/ScreenContainer';
25
- import { clearError, connectSelector, createMobileAuth } from '../../../app/connect/connectStore';
26
- import { useLanguage } from '../../../../hooks';
19
+ import Collapse from '@components/Collapse';
20
+ import Form from '@components/Form';
21
+ import Button, { AbsherButton } from '@features/shared/Button';
22
+ import { useAppDispatch, useAppSelector } from '@hooks';
23
+ import { handlePrevScreenStep, settingsSelector } from '@app/settings';
24
+ import ScreenContainer from '@features/shared/Containers/ScreenContainer';
25
+ import { clearError, connectSelector, createMobileAuth } from '@features/app/connect/connectStore';
26
+ import { useLanguage } from '@hooks';
27
27
  import Divider from '@mui/material/Divider';
28
- import Text from '../../../../components/Text';
28
+ import { isKW } from '@utils';
29
+ import Text from '@components/Text';
29
30
  import MIDTitle from './Title';
30
31
  import MobileNumber from './MobileNumber';
31
32
  import { PhoneValidationSchema } from './validation';
@@ -72,9 +73,10 @@ var ListType;
72
73
  ListType["CountryCodeList"] = "CountryCodeList";
73
74
  })(ListType || (ListType = {}));
74
75
  var Mobile = function (_a) {
76
+ var _b;
75
77
  var settingsStore = useAppSelector(settingsSelector);
76
- var _b = useAppSelector(connectSelector), data = _b.data, loading = _b.loading, error = _b.error;
77
- var _c = React.useState(), listType = _c[0], setListType = _c[1];
78
+ var _c = useAppSelector(connectSelector), data = _c.data, loading = _c.loading, error = _c.error;
79
+ var _d = React.useState(), listType = _d[0], setListType = _d[1];
78
80
  var dispatch = useAppDispatch();
79
81
  var methods = useForm({
80
82
  resolver: yupResolver(PhoneValidationSchema),
@@ -98,8 +100,9 @@ var Mobile = function (_a) {
98
100
  var onSubmit = function (formData) {
99
101
  dispatch(createMobileAuth(formData));
100
102
  };
103
+ var isKWCountry = React.useMemo(function () { var _a; return isKW((_a = settingsStore.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2); }, [(_b = settingsStore.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2]);
101
104
  var onBack = function () {
102
- dispatch(handlePrevScreenStep());
105
+ dispatch(handlePrevScreenStep(isKWCountry ? 'CONNECT_CIVIL_ID_STEP' : 'CONNECT_NID_STEP'));
103
106
  };
104
107
  var isBusinessListActive = listType === ListType.BusinessList;
105
108
  var isCountryListActive = listType === ListType.CountryCodeList;
@@ -107,6 +110,6 @@ var Mobile = function (_a) {
107
110
  var disabled = !methods.formState.isValid || !!error;
108
111
  var title = t('join_our_community');
109
112
  var subTitle = t('ide_terms_and_conditions_description');
110
- return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') }))] }))] }))] })) }))] }));
113
+ return (_jsxs(ScreenContainer, { children: [(title || subTitle) && _jsx(MIDTitle, { show: !listActive, title: title, description: subTitle }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, countries: settingsStore.data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); } }, { children: isKWCountry ? t('paci_button_label') : t('absher_button_label') }))] }))] }))] })) }))] }));
111
114
  };
112
115
  export default React.memo(Mobile);
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { CountryCode } from '../../../../@types';
2
+ import { CountryCode } from '@types';
3
3
  interface MobileNumberProps {
4
4
  countries: Array<CountryCode>;
5
5
  show: boolean;
@@ -26,18 +26,18 @@ import Box from '@mui/material/Box';
26
26
  import { useTranslation } from 'react-i18next';
27
27
  import { useController, useFormContext } from 'react-hook-form';
28
28
  import { styled, alpha } from '@mui/material/styles';
29
- import Text from '../../../../components/Text';
30
- import Collapse from '../../../../components/Collapse';
31
- import ClearIcon from '../../../shared/ClearIcon';
32
- import CheckIcon from '../../../shared/CheckIcon';
33
- import ScreenContainer from '../../../shared/Containers/ScreenContainer';
34
- import { connectSelector } from '../../../app/connect/connectStore';
35
- import ExpandIcon from '../../../../components/ExpandIcon';
36
- import Input from '../../../shared/Input';
37
- import SimpleList from '../../../../components/SimpleList';
38
- import { removeAllCharsFromNumber } from '../../../../utils';
39
- import { useLanguage, useAppSelector } from '../../../../hooks';
40
- import Search from '../../../shared/Search';
29
+ import Text from '@components/Text';
30
+ import Collapse from '@components/Collapse';
31
+ import ClearIcon from '@features/shared/ClearIcon';
32
+ import CheckIcon from '@features/shared/CheckIcon';
33
+ import ScreenContainer from '@features/shared/Containers/ScreenContainer';
34
+ import { connectSelector } from '@features/app/connect/connectStore';
35
+ import ExpandIcon from '@components/ExpandIcon';
36
+ import Input from '@features/shared/Input';
37
+ import SimpleList from '@components/SimpleList';
38
+ import { removeAllCharsFromNumber } from '@utils';
39
+ import { useLanguage, useAppSelector } from '@hooks';
40
+ import Search from '@features/shared/Search';
41
41
  var LabelContainerStyled = styled(Box)(function (_a) {
42
42
  var theme = _a.theme;
43
43
  return ({
@@ -12,8 +12,8 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import { styled, alpha } from '@mui/material/styles';
15
- import Collapse from '../../../../components/Collapse';
16
- import Text from '../../../../components/Text';
15
+ import Collapse from '@components/Collapse';
16
+ import Text from '@components/Text';
17
17
  var TitleStyled = styled(Text)(function (_a) {
18
18
  var theme = _a.theme;
19
19
  return (__assign(__assign({ color: theme.palette.text.primary, textAlign: 'center' }, theme.typography.body1), { fontWeight: theme.typography.fontWeightMedium, lineHeight: 1.21, padding: theme.spacing(0, 3, 0, 3) }));
@@ -12,12 +12,12 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useTranslation } from 'react-i18next';
14
14
  import { useController, useFormContext } from 'react-hook-form';
15
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
16
- import { ScreenContainer } from '../../../shared/Containers';
17
- import DatePicker from '../../../../components/DatePicker';
15
+ import { useAppDispatch, useAppSelector } from '@hooks';
16
+ import { ScreenContainer } from '@features/shared/Containers';
17
+ import DatePicker from '@components/DatePicker';
18
18
  import { alpha, styled } from '@mui/material/styles';
19
- import { clearError, connectSelector } from '../../../app/connect/connectStore';
20
- import Text from '../../../../components/Text';
19
+ import { clearError, connectSelector } from '@features/app/connect/connectStore';
20
+ import Text from '@components/Text';
21
21
  var InputLabelStyled = styled(Text)(function (_a) {
22
22
  var theme = _a.theme;
23
23
  return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
@@ -15,14 +15,14 @@ import Box from '@mui/material/Box';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import { useController, useFormContext } from 'react-hook-form';
17
17
  import { styled, alpha } from '@mui/material/styles';
18
- import Text from '../../../../components/Text';
19
- import Input from '../../../shared/Input';
20
- import ClearIcon from '../../../shared/ClearIcon';
21
- import CheckIcon from '../../../shared/CheckIcon';
22
- import Collapse from '../../../../components/Collapse';
23
- import ScreenContainer from '../../../shared/Containers/ScreenContainer';
24
- import { removeAllCharsFromNumber } from '../../../../utils';
25
- import { ID_NUMBER_LENGTH } from '../../../../constants';
18
+ import Text from '@components/Text';
19
+ import Input from '@features/shared/Input';
20
+ import ClearIcon from '@features/shared/ClearIcon';
21
+ import CheckIcon from '@features/shared/CheckIcon';
22
+ import Collapse from '@components/Collapse';
23
+ import ScreenContainer from '@features/shared/Containers/ScreenContainer';
24
+ import { removeAllCharsFromNumber } from '@utils';
25
+ import { ID_NUMBER_LENGTH } from '@constants';
26
26
  var LabelContainerStyled = styled(Box)(function (_a) {
27
27
  var theme = _a.theme;
28
28
  return ({
@@ -16,16 +16,16 @@ import { alpha, styled } from '@mui/material/styles';
16
16
  import { useForm, FormProvider } from 'react-hook-form';
17
17
  import { yupResolver } from '@hookform/resolvers/yup';
18
18
  import { NIDValidationSchema } from './validation';
19
- import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
20
- import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
21
- import { clearError, connectSelector, createNIDAuth } from '../../../app/connect/connectStore';
22
- import Form from '../../../../components/Form';
23
- import Button, { MobileButton } from '../../../shared/Button';
24
- import { ScreenContainer } from '../../../shared/Containers';
25
- import Collapse from '../../../../components/Collapse';
19
+ import { useAppDispatch, useLanguage, useAppSelector } from '@hooks';
20
+ import { handlePrevScreenStep, settingsSelector } from '@app/settings';
21
+ import { clearError, connectSelector, createNIDAuth } from '@features/app/connect/connectStore';
22
+ import Form from '@components/Form';
23
+ import Button, { MobileButton } from '@features/shared/Button';
24
+ import { ScreenContainer } from '@features/shared/Containers';
25
+ import Collapse from '@components/Collapse';
26
26
  import Box from '@mui/material/Box';
27
27
  import Divider from '@mui/material/Divider';
28
- import Text from '../../../../components/Text';
28
+ import Text from '@components/Text';
29
29
  import IDNumber from './IDNumber';
30
30
  import DOB from './DOB';
31
31
  var FormStyled = styled(Form)(function () { return ({
@@ -14,17 +14,17 @@ import Box from '@mui/material/Box/Box';
14
14
  import { styled } from '@mui/material/styles';
15
15
  import * as React from 'react';
16
16
  import { useTranslation } from 'react-i18next';
17
- import Text from '../../../../components/Text';
18
- import { clearError, connectSelector, resetOTPScreen, verifyAuth } from '../../../app/connect/connectStore';
19
- import Button from '../../../shared/Button';
20
- import { ScreenContainer } from '../../../shared/Containers';
21
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
22
- import { handlePrevScreenStep } from '../../../../app/settings';
23
- import { useLanguage } from '../../../../hooks';
17
+ import Text from '@components/Text';
18
+ import { clearError, connectSelector, resetOTPScreen, verifyAuth } from '@features/app/connect/connectStore';
19
+ import Button from '@features/shared/Button';
20
+ import { ScreenContainer } from '@features/shared/Containers';
21
+ import { useAppDispatch, useAppSelector } from '@hooks';
22
+ import { handlePrevScreenStep } from '@app/settings';
23
+ import { useLanguage } from '@hooks';
24
24
  import { useForm, FormProvider } from 'react-hook-form';
25
25
  import { yupResolver } from '@hookform/resolvers/yup';
26
- import Form from '../../../../components/Form';
27
- import { maskPhone, maskID } from '../../../../utils';
26
+ import Form from '@components/Form';
27
+ import { maskPhone, maskID } from '@utils';
28
28
  import { OTPValidation } from './validation';
29
29
  import OTPInput from './OTPInput';
30
30
  var OTPTitleContainerStyled = styled(Box)(function (_a) {
@@ -15,10 +15,10 @@ import { useController, useFormContext } from 'react-hook-form';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import Box from '@mui/material/Box/Box';
17
17
  import { styled } from '@mui/material/styles';
18
- import OTPField from '../../../shared/OTP';
19
- import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
- import { connectSelector, resendOTPMobile, resendOTPNID } from '../../../app/connect/connectStore';
21
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
+ import OTPField from '@features/shared/OTP';
19
+ import { DEFAULT_TIMER_VALUE } from '@constants';
20
+ import { connectSelector, resendOTPMobile, resendOTPNID } from '@features/app/connect/connectStore';
21
+ import { useAppDispatch, useAppSelector } from '@hooks';
22
22
  var BoxStyled = styled(Box)(function (_a) {
23
23
  var theme = _a.theme;
24
24
  return ({
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
- import SuccessScreen from '../../../shared/SuccessScreen';
4
+ import SuccessScreen from '@features/shared/SuccessScreen';
5
5
  var ThankYou = function (_a) {
6
6
  var t = useTranslation().t;
7
7
  return (_jsx(SuccessScreen, { title: t("connect_completed_title"), description: t("connect_completed_description"), showEmailProviders: true }));
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface VerifyPACIProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<() => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,169 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
+ import Box from '@mui/material/Box/Box';
50
+ import { styled } from '@mui/material/styles';
51
+ import * as React from 'react';
52
+ import { useTranslation } from 'react-i18next';
53
+ import Text from '@components/Text';
54
+ import { connectSelector, verifyPACI as verifyPACIFun } from '@features/app/connect/connectStore';
55
+ import { handlePrevScreenStep } from '@app/settings';
56
+ import { ScreenContainer } from '@features/shared/Containers';
57
+ import { MobileButton } from '@features/shared/Button';
58
+ import { useAppDispatch, useAppSelector } from '@hooks';
59
+ import Icon from '@src/components/Icon';
60
+ import { mobileOS } from '@utils';
61
+ import VerifyPACILoading from './VerifyPACILoading';
62
+ import VerifyPACISuccess from './VerifyPACISuccess';
63
+ var VerifyPACITitleContainerStyled = styled(Box)(function (_a) {
64
+ var theme = _a.theme;
65
+ return ({
66
+ direction: theme.direction,
67
+ borderRadius: theme.spacing(0, 0, 1.25, 1.25),
68
+ display: 'flex',
69
+ flexDirection: 'column',
70
+ alignItems: 'center',
71
+ marginBottom: theme.spacing(2.5)
72
+ });
73
+ });
74
+ var VerifyPACITitleStyled = styled(Text)(function (_a) {
75
+ var theme = _a.theme;
76
+ return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightBold, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line' }));
77
+ });
78
+ var VerifyPACISubTitleStyled = styled(Text)(function (_a) {
79
+ var theme = _a.theme;
80
+ return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightMedium, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line', textAlign: 'center' }));
81
+ });
82
+ var Container = styled(Box)(function (_a) {
83
+ var theme = _a.theme;
84
+ return ({
85
+ position: 'relative',
86
+ display: 'flex',
87
+ justifyContent: 'center',
88
+ alignItems: 'center',
89
+ maxHeight: '300px'
90
+ });
91
+ });
92
+ var IconStyled = styled(Icon)(function (_a) {
93
+ var theme = _a.theme;
94
+ return ({
95
+ position: 'absolute',
96
+ top: '50%',
97
+ left: '50%',
98
+ transform: 'translate(-50%, -50%)',
99
+ width: 64,
100
+ height: 64
101
+ });
102
+ });
103
+ var BackButton = styled('button')(function (_a) {
104
+ var theme = _a.theme;
105
+ return ({
106
+ cursor: 'pointer',
107
+ height: 44,
108
+ appearance: 'none',
109
+ background: 'none',
110
+ border: 'none',
111
+ color: theme.palette.primary.main,
112
+ fontSize: theme.typography.body1.fontSize,
113
+ fontWeight: theme.typography.fontWeightMedium,
114
+ textTransform: 'capitalize',
115
+ '&:hover': {
116
+ backgroundColor: 'transparent'
117
+ }
118
+ });
119
+ });
120
+ var VerifyPACI = function () {
121
+ var _a = React.useState(false), success = _a[0], setSuccess = _a[1];
122
+ var dispatch = useAppDispatch();
123
+ var data = useAppSelector(connectSelector).data;
124
+ var responseBody = data.civilIdData.responseBody;
125
+ var t = useTranslation().t;
126
+ var onSuccess = function () { return __awaiter(void 0, void 0, void 0, function () {
127
+ return __generator(this, function (_a) {
128
+ switch (_a.label) {
129
+ case 0: return [4, new Promise(function (resolve) {
130
+ setSuccess(true);
131
+ setTimeout(function () {
132
+ resolve('success');
133
+ }, 1000);
134
+ })];
135
+ case 1:
136
+ _a.sent();
137
+ return [2];
138
+ }
139
+ });
140
+ }); };
141
+ React.useEffect(function () {
142
+ if (responseBody)
143
+ dispatch(verifyPACIFun({ onSuccess: onSuccess }));
144
+ var interval = setInterval(function () {
145
+ if (responseBody)
146
+ dispatch(verifyPACIFun({ onSuccess: onSuccess }));
147
+ }, 10000);
148
+ setTimeout(function () {
149
+ clearInterval(interval);
150
+ }, ((responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120) * 1000);
151
+ return function () { return clearInterval(interval); };
152
+ }, [responseBody]);
153
+ var onRedirect = React.useCallback(function () {
154
+ if (os === 'Android') {
155
+ window.open(responseBody === null || responseBody === void 0 ? void 0 : responseBody.app_url_android, '_blank');
156
+ }
157
+ if (os === 'iOS') {
158
+ window.open(responseBody === null || responseBody === void 0 ? void 0 : responseBody.app_url_ios, '_blank');
159
+ }
160
+ }, [responseBody]);
161
+ var onBack = React.useCallback(function () {
162
+ dispatch(handlePrevScreenStep());
163
+ }, []);
164
+ var os = React.useMemo(function () { return mobileOS(); }, []);
165
+ var isAndroid = React.useMemo(function () { return os === 'Android' && (responseBody === null || responseBody === void 0 ? void 0 : responseBody.app_url_ios); }, [os, responseBody]);
166
+ var isIOS = React.useMemo(function () { return os === 'iOS' && (responseBody === null || responseBody === void 0 ? void 0 : responseBody.app_url_ios); }, [os, responseBody]);
167
+ return (_jsxs(ScreenContainer, __assign({ sx: { mb: 2.5 } }, { children: [_jsxs(VerifyPACITitleContainerStyled, { children: [_jsx(Container, { children: success ? _jsx(VerifyPACISuccess, {}) : _jsx(VerifyPACILoading, {}) }), _jsx(VerifyPACITitleStyled, { children: t('authenticate_kuwait_mobile_title') }), _jsx(VerifyPACISubTitleStyled, { children: t('authenticate_kuwait_mobile_description') })] }), (isAndroid || isIOS) && (_jsx(MobileButton, __assign({ onClick: onRedirect, hideIcon: true }, { children: t('Open Kuwait Mobile ID') }))), _jsx(BackButton, __assign({ onClick: onBack }, { children: t('back') }))] })));
168
+ };
169
+ export default React.memo(VerifyPACI);
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface VerifyPACILoadingProps {
3
+ }
4
+ declare const _default: React.NamedExoticComponent<VerifyPACILoadingProps>;
5
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import { styled } from '@mui/material/styles';
4
+ import LottieFile, { LottieAnimationFiles } from '@src/components/Lottie';
5
+ import { ICONS_NAMES } from '@src/constants';
6
+ import Icon from '@src/components/Icon';
7
+ var IconStyled = styled(Icon)(function (_a) {
8
+ var theme = _a.theme;
9
+ return ({
10
+ position: 'absolute',
11
+ top: '50%',
12
+ left: '50%',
13
+ transform: 'translate(-50%, -50%)',
14
+ width: 64,
15
+ height: 64
16
+ });
17
+ });
18
+ var VerifyPACILoading = function () {
19
+ return (_jsxs(_Fragment, { children: [_jsx(LottieFile, { file: LottieAnimationFiles.pulsating_circle_waves, width: '90%' }), _jsx(IconStyled, { src: ICONS_NAMES.PACI_VERIFY_ICON })] }));
20
+ };
21
+ VerifyPACILoading.defaultProps = {};
22
+ export default memo(VerifyPACILoading);
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface VerifyPACISuccessProps {
3
+ }
4
+ declare const _default: React.NamedExoticComponent<VerifyPACISuccessProps>;
5
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import LottieFile, { LottieAnimationFiles } from '@src/components/Lottie';
4
+ var VerifyPACISuccess = function () {
5
+ return (_jsx(_Fragment, { children: _jsx(LottieFile, { loop: false, file: LottieAnimationFiles.success, width: '90%' }) }));
6
+ };
7
+ VerifyPACISuccess.defaultProps = {};
8
+ export default memo(VerifyPACISuccess);
@@ -0,0 +1,3 @@
1
+ import VerifyPACI, { VerifyPACIProps } from './VerifyPACI';
2
+ export type { VerifyPACIProps };
3
+ export default VerifyPACI;
@@ -0,0 +1,2 @@
1
+ import VerifyPACI from './VerifyPACI';
2
+ export default VerifyPACI;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { LibConfig } from '@types';
3
+ export interface EntityLibProps extends LibConfig {
4
+ }
5
+ export declare function EntityLib(props: EntityLibProps): JSX.Element;
6
+ export declare function renderEntityLib(config: EntityLibProps, elementId: string): void;
7
+ export declare function unmountEntityLib(elementId: string, unmountTimeout?: number): void;