@tap-payments/auth-jsconnect 1.0.4 → 1.0.7

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 (335) hide show
  1. package/build/@types/app.d.ts +74 -0
  2. package/build/@types/app.js +11 -1
  3. package/build/@types/theme.d.ts +12 -3
  4. package/build/@types/theme.js +15 -1
  5. package/build/app/rootReducer.d.ts +1 -1
  6. package/build/app/rootReducer.js +1 -1
  7. package/build/app/settings.d.ts +7 -2
  8. package/build/app/settings.js +36 -6
  9. package/build/app/store.d.ts +2 -2
  10. package/build/assets/locales/ar.json +70 -3
  11. package/build/assets/locales/en.json +69 -2
  12. package/build/components/AnimationFlow/BottomSheet.d.ts +3 -2
  13. package/build/components/AnimationFlow/BottomSheet.js +30 -3
  14. package/build/components/AnimationFlow/Dialog.d.ts +3 -2
  15. package/build/components/AnimationFlow/Dialog.js +26 -18
  16. package/build/components/Button/Button.d.ts +7 -3
  17. package/build/components/Button/Button.js +20 -2
  18. package/build/components/Collapse/Collapse.d.ts +5 -0
  19. package/build/components/Collapse/Collapse.js +28 -0
  20. package/build/components/Collapse/index.d.ts +3 -0
  21. package/build/components/Collapse/index.js +2 -0
  22. package/build/components/DatePicker/DatePicker.js +3 -3
  23. package/build/components/Footer/Footer.js +1 -1
  24. package/build/components/Input/Input.d.ts +4 -1
  25. package/build/components/Input/Input.js +7 -5
  26. package/build/components/Loader/Loader.d.ts +10 -8
  27. package/build/components/Loader/Loader.js +21 -41
  28. package/build/components/OTPField/OTPField.js +3 -23
  29. package/build/components/OTPTimer/OTPTimer.d.ts +4 -2
  30. package/build/components/OTPTimer/OTPTimer.js +20 -8
  31. package/build/components/Providers/ThemeProvider.js +6 -9
  32. package/build/components/SimpleList/SimpleList.d.ts +11 -3
  33. package/build/components/SimpleList/SimpleList.js +51 -22
  34. package/build/components/Slide/Slide.d.ts +6 -0
  35. package/build/components/Slide/Slide.js +30 -0
  36. package/build/components/Slide/index.d.ts +3 -0
  37. package/build/components/Slide/index.js +2 -0
  38. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +14 -0
  39. package/build/components/SocialMediaGroup/SocialMediaGroup.js +86 -0
  40. package/build/components/SocialMediaGroup/index.d.ts +3 -0
  41. package/build/components/SocialMediaGroup/index.js +2 -0
  42. package/build/components/ToggleButton/ToggleButton.d.ts +5 -0
  43. package/build/components/ToggleButton/ToggleButton.js +44 -0
  44. package/build/components/ToggleButton/index.d.ts +3 -0
  45. package/build/components/ToggleButton/index.js +2 -0
  46. package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +5 -0
  47. package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +37 -0
  48. package/build/components/ToggleButtonGroup/index.d.ts +3 -0
  49. package/build/components/ToggleButtonGroup/index.js +2 -0
  50. package/build/components/Tooltip/Tooltip.d.ts +10 -0
  51. package/build/components/Tooltip/Tooltip.js +44 -0
  52. package/build/components/Tooltip/index.d.ts +3 -0
  53. package/build/components/Tooltip/index.js +2 -0
  54. package/build/components/Warning/Warning.d.ts +2 -1
  55. package/build/components/Warning/Warning.js +4 -19
  56. package/build/constants/app.d.ts +14 -4
  57. package/build/constants/app.js +145 -4
  58. package/build/constants/assets.d.ts +11 -0
  59. package/build/constants/assets.js +12 -1
  60. package/build/constants/dummy.d.ts +103 -0
  61. package/build/constants/dummy.js +219 -0
  62. package/build/constants/index.d.ts +1 -0
  63. package/build/constants/index.js +1 -0
  64. package/build/constants/validation.d.ts +6 -0
  65. package/build/constants/validation.js +6 -0
  66. package/build/features/app/{midStore.d.ts → business/midStore.d.ts} +2 -2
  67. package/build/features/app/{midStore.js → business/midStore.js} +0 -0
  68. package/build/features/app/connect/midStore.d.ts +10 -0
  69. package/build/features/app/connect/midStore.js +18 -0
  70. package/build/features/bank/Bank.d.ts +6 -0
  71. package/build/features/bank/Bank.js +48 -0
  72. package/build/features/bank/index.d.ts +1 -0
  73. package/build/features/bank/index.js +1 -0
  74. package/build/features/bank/screens/BankDetails/BankDetails.d.ts +5 -0
  75. package/build/features/bank/screens/BankDetails/BankDetails.js +57 -0
  76. package/build/features/bank/screens/BankDetails/BankName.d.ts +3 -0
  77. package/build/features/bank/screens/BankDetails/BankName.js +27 -0
  78. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +5 -0
  79. package/build/features/bank/screens/BankDetails/Beneficiary.js +34 -0
  80. package/build/features/bank/screens/BankDetails/IBAN.d.ts +5 -0
  81. package/build/features/bank/screens/BankDetails/IBAN.js +35 -0
  82. package/build/features/bank/screens/BankDetails/index.d.ts +3 -0
  83. package/build/features/bank/screens/BankDetails/index.js +2 -0
  84. package/build/features/bank/screens/BankDetails/validation.d.ts +14 -0
  85. package/build/features/bank/screens/BankDetails/validation.js +9 -0
  86. package/build/features/business/Business.d.ts +6 -0
  87. package/build/features/business/Business.js +61 -0
  88. package/build/features/business/index.d.ts +1 -0
  89. package/build/features/business/index.js +1 -0
  90. package/build/features/business/screens/Activities/Activities.d.ts +5 -0
  91. package/build/features/business/screens/Activities/Activities.js +83 -0
  92. package/build/features/business/screens/Activities/ActivitiesList.d.ts +70 -0
  93. package/build/features/business/screens/Activities/ActivitiesList.js +136 -0
  94. package/build/features/business/screens/Activities/SalesChannels.d.ts +5 -0
  95. package/build/features/business/screens/Activities/SalesChannels.js +107 -0
  96. package/build/features/business/screens/Activities/index.d.ts +3 -0
  97. package/build/features/business/screens/Activities/index.js +2 -0
  98. package/build/features/business/screens/Activities/validation.d.ts +119 -0
  99. package/build/features/business/screens/Activities/validation.js +17 -0
  100. package/build/features/business/screens/BusinessType/BusinessType.d.ts +12 -0
  101. package/build/features/business/screens/BusinessType/BusinessType.js +85 -0
  102. package/build/features/business/screens/BusinessType/CRNumber.d.ts +6 -0
  103. package/build/features/business/screens/BusinessType/CRNumber.js +40 -0
  104. package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +11 -0
  105. package/build/features/business/screens/BusinessType/CompanyLicense.js +109 -0
  106. package/build/features/business/screens/BusinessType/FLNumber.d.ts +6 -0
  107. package/build/features/business/screens/BusinessType/FLNumber.js +40 -0
  108. package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +11 -0
  109. package/build/features/business/screens/BusinessType/FreelanceLicense.js +112 -0
  110. package/build/features/business/screens/BusinessType/SelectType.d.ts +8 -0
  111. package/build/features/business/screens/BusinessType/SelectType.js +106 -0
  112. package/build/features/business/screens/BusinessType/Switch.d.ts +7 -0
  113. package/build/features/business/screens/BusinessType/Switch.js +35 -0
  114. package/build/features/business/screens/BusinessType/index.d.ts +3 -0
  115. package/build/features/business/screens/BusinessType/index.js +2 -0
  116. package/build/features/business/screens/BusinessType/validation.d.ts +15 -0
  117. package/build/features/business/screens/BusinessType/validation.js +14 -0
  118. package/build/features/business/screens/Confirm/Confirm.d.ts +5 -0
  119. package/build/features/business/screens/Confirm/Confirm.js +53 -0
  120. package/build/features/business/screens/Confirm/index.d.ts +3 -0
  121. package/build/features/business/screens/Confirm/index.js +2 -0
  122. package/build/features/business/screens/Customers/CustomerLocations.d.ts +92 -0
  123. package/build/features/business/screens/Customers/CustomerLocations.js +122 -0
  124. package/build/features/business/screens/Customers/Customers.d.ts +5 -0
  125. package/build/features/business/screens/Customers/Customers.js +92 -0
  126. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +7 -0
  127. package/build/features/business/screens/Customers/ExpectedCustomers.js +78 -0
  128. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +7 -0
  129. package/build/features/business/screens/Customers/ExpectedSalesRange.js +74 -0
  130. package/build/features/business/screens/Customers/RefundPolicy.d.ts +44 -0
  131. package/build/features/business/screens/Customers/RefundPolicy.js +86 -0
  132. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +3 -0
  133. package/build/features/business/screens/Customers/TransactionPolicy.js +37 -0
  134. package/build/features/business/screens/Customers/index.d.ts +3 -0
  135. package/build/features/business/screens/Customers/index.js +2 -0
  136. package/build/features/business/screens/Customers/validation.d.ts +20 -0
  137. package/build/features/business/screens/Customers/validation.js +8 -0
  138. package/build/features/business/screens/IDBOD/DOB.d.ts +5 -0
  139. package/build/features/business/screens/IDBOD/DOB.js +44 -0
  140. package/build/features/business/screens/IDBOD/ID.d.ts +5 -0
  141. package/build/features/business/screens/IDBOD/ID.js +69 -0
  142. package/build/features/business/screens/IDBOD/IDBOD.d.ts +5 -0
  143. package/build/features/business/screens/IDBOD/IDBOD.js +85 -0
  144. package/build/features/business/screens/IDBOD/index.d.ts +3 -0
  145. package/build/features/business/screens/IDBOD/index.js +2 -0
  146. package/build/features/business/screens/IDBOD/validation.d.ts +11 -0
  147. package/build/features/business/screens/IDBOD/validation.js +5 -0
  148. package/build/features/business/screens/OTP/OTP.d.ts +11 -0
  149. package/build/features/business/screens/OTP/OTP.js +112 -0
  150. package/build/features/business/screens/OTP/OTPInput.d.ts +5 -0
  151. package/build/features/business/screens/OTP/OTPInput.js +51 -0
  152. package/build/features/business/screens/OTP/OTPTimer.d.ts +5 -0
  153. package/build/features/business/screens/OTP/OTPTimer.js +20 -0
  154. package/build/features/business/screens/OTP/index.d.ts +3 -0
  155. package/build/features/business/screens/OTP/index.js +2 -0
  156. package/build/features/business/screens/OTP/validation.d.ts +8 -0
  157. package/build/features/business/screens/OTP/validation.js +4 -0
  158. package/build/features/business/screens/Success/Success.d.ts +5 -0
  159. package/build/features/business/screens/Success/Success.js +15 -0
  160. package/build/features/business/screens/Success/index.d.ts +3 -0
  161. package/build/features/business/screens/Success/index.js +2 -0
  162. package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +6 -0
  163. package/build/features/business/screens/VerifyNumber/OTPInput.js +68 -0
  164. package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +5 -0
  165. package/build/features/business/screens/VerifyNumber/OTPTimer.js +20 -0
  166. package/build/features/business/screens/VerifyNumber/VerifyNumber.d.ts +13 -0
  167. package/build/features/business/screens/VerifyNumber/VerifyNumber.js +119 -0
  168. package/build/features/business/screens/VerifyNumber/index.d.ts +3 -0
  169. package/build/features/business/screens/VerifyNumber/index.js +2 -0
  170. package/build/features/business/screens/VerifyNumber/validation.d.ts +8 -0
  171. package/build/features/business/screens/VerifyNumber/validation.js +4 -0
  172. package/build/features/connect/Connect.js +20 -22
  173. package/build/features/connect/screens/Individual/Email.d.ts +5 -0
  174. package/build/features/connect/screens/Individual/Email.js +31 -0
  175. package/build/features/connect/screens/Individual/Individual.d.ts +5 -0
  176. package/build/features/connect/screens/Individual/Individual.js +77 -0
  177. package/build/features/connect/screens/Individual/Name.d.ts +5 -0
  178. package/build/features/connect/screens/Individual/Name.js +31 -0
  179. package/build/features/connect/screens/Individual/index.d.ts +3 -0
  180. package/build/features/connect/screens/Individual/index.js +2 -0
  181. package/build/features/connect/screens/Individual/validation.d.ts +11 -0
  182. package/build/features/connect/screens/Individual/validation.js +5 -0
  183. package/build/features/connect/screens/MID/BusinessCountry.d.ts +2 -6
  184. package/build/features/connect/screens/MID/BusinessCountry.js +20 -79
  185. package/build/features/connect/screens/MID/IDNumber.d.ts +0 -4
  186. package/build/features/connect/screens/MID/IDNumber.js +24 -36
  187. package/build/features/connect/screens/MID/MID.js +41 -24
  188. package/build/features/connect/screens/MID/MIDTitle.js +2 -2
  189. package/build/features/connect/screens/MID/MobileNumber.d.ts +2 -7
  190. package/build/features/connect/screens/MID/MobileNumber.js +40 -84
  191. package/build/features/connect/screens/MID/validation.d.ts +18 -0
  192. package/build/features/connect/screens/MID/validation.js +8 -0
  193. package/build/features/connect/screens/Merchant/BrandName.d.ts +5 -0
  194. package/build/features/connect/screens/Merchant/BrandName.js +73 -0
  195. package/build/features/connect/screens/Merchant/Merchant.d.ts +5 -0
  196. package/build/features/connect/screens/Merchant/Merchant.js +50 -0
  197. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +5 -0
  198. package/build/features/connect/screens/Merchant/SocialMedia.js +79 -0
  199. package/build/features/connect/screens/Merchant/TAC.d.ts +5 -0
  200. package/build/features/connect/screens/Merchant/TAC.js +79 -0
  201. package/build/features/connect/screens/Merchant/index.d.ts +3 -0
  202. package/build/features/connect/screens/Merchant/index.js +2 -0
  203. package/build/features/connect/screens/Merchant/validation.d.ts +50 -0
  204. package/build/features/connect/screens/Merchant/validation.js +23 -0
  205. package/build/features/connect/screens/OTP/OTP.d.ts +6 -2
  206. package/build/features/connect/screens/OTP/OTP.js +41 -46
  207. package/build/features/connect/screens/OTP/OTPInput.d.ts +5 -0
  208. package/build/features/connect/screens/OTP/OTPInput.js +38 -0
  209. package/build/features/connect/screens/OTP/validation.d.ts +8 -0
  210. package/build/features/connect/screens/OTP/validation.js +4 -0
  211. package/build/features/connect/screens/Password/Password.d.ts +5 -0
  212. package/build/features/connect/screens/Password/Password.js +49 -0
  213. package/build/features/connect/screens/Password/PasswordInput.d.ts +5 -0
  214. package/build/features/connect/screens/Password/PasswordInput.js +38 -0
  215. package/build/features/connect/screens/Password/index.d.ts +3 -0
  216. package/build/features/connect/screens/Password/index.js +2 -0
  217. package/build/features/connect/screens/Password/validation.d.ts +8 -0
  218. package/build/features/connect/screens/Password/validation.js +4 -0
  219. package/build/features/connect/screens/ThankYou/ThankYou.d.ts +5 -0
  220. package/build/features/connect/screens/ThankYou/ThankYou.js +15 -0
  221. package/build/features/connect/screens/ThankYou/index.d.ts +3 -0
  222. package/build/features/connect/screens/ThankYou/index.js +2 -0
  223. package/build/features/featuresScreens.d.ts +7 -0
  224. package/build/features/featuresScreens.js +99 -0
  225. package/build/features/owner/Owner.d.ts +6 -0
  226. package/build/features/owner/Owner.js +50 -0
  227. package/build/features/owner/index.d.ts +1 -0
  228. package/build/features/owner/index.js +1 -0
  229. package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.d.ts +19 -0
  230. package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +52 -0
  231. package/build/features/owner/screens/ShowOwnerInfo/index.d.ts +3 -0
  232. package/build/features/owner/screens/ShowOwnerInfo/index.js +2 -0
  233. package/build/features/owner/screens/ShowOwnerInfo/info.d.ts +7 -0
  234. package/build/features/owner/screens/ShowOwnerInfo/info.js +28 -0
  235. package/build/features/password/Password.d.ts +6 -0
  236. package/build/features/password/Password.js +50 -0
  237. package/build/features/password/index.d.ts +1 -0
  238. package/build/features/password/index.js +1 -0
  239. package/build/features/password/screens/CreatePassword/ConditionText.d.ts +7 -0
  240. package/build/features/password/screens/CreatePassword/ConditionText.js +23 -0
  241. package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +5 -0
  242. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +27 -0
  243. package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +5 -0
  244. package/build/features/password/screens/CreatePassword/CreatePassword.js +51 -0
  245. package/build/features/password/screens/CreatePassword/Password.d.ts +5 -0
  246. package/build/features/password/screens/CreatePassword/Password.js +75 -0
  247. package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +7 -0
  248. package/build/features/password/screens/CreatePassword/PasswordBar.js +29 -0
  249. package/build/features/password/screens/CreatePassword/index.d.ts +3 -0
  250. package/build/features/password/screens/CreatePassword/index.js +2 -0
  251. package/build/features/password/screens/CreatePassword/validation.d.ts +11 -0
  252. package/build/features/password/screens/CreatePassword/validation.js +8 -0
  253. package/build/features/shared/Button/Button.d.ts +8 -0
  254. package/build/features/shared/Button/Button.js +49 -0
  255. package/build/features/shared/Button/index.d.ts +2 -0
  256. package/build/features/shared/Button/index.js +2 -0
  257. package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -0
  258. package/build/features/shared/CheckIcon/CheckIcon.js +14 -0
  259. package/build/features/shared/CheckIcon/index.d.ts +2 -0
  260. package/build/features/shared/CheckIcon/index.js +2 -0
  261. package/build/features/shared/ClearIcon/ClearIcon.d.ts +6 -0
  262. package/build/features/shared/ClearIcon/ClearIcon.js +26 -0
  263. package/build/features/shared/ClearIcon/index.d.ts +2 -0
  264. package/build/features/shared/ClearIcon/index.js +2 -0
  265. package/build/features/shared/Containers/FeatureContainer.d.ts +4 -0
  266. package/build/features/shared/Containers/FeatureContainer.js +33 -0
  267. package/build/features/shared/Containers/ScreenContainer.d.ts +4 -0
  268. package/build/features/shared/Containers/ScreenContainer.js +28 -0
  269. package/build/features/shared/Containers/index.d.ts +3 -0
  270. package/build/features/shared/Containers/index.js +3 -0
  271. package/build/features/shared/ExpandIcon/ExpandIcon.d.ts +7 -0
  272. package/build/features/shared/ExpandIcon/ExpandIcon.js +24 -0
  273. package/build/features/shared/ExpandIcon/index.d.ts +2 -0
  274. package/build/features/shared/ExpandIcon/index.js +2 -0
  275. package/build/features/shared/Footer/Footer.d.ts +2 -0
  276. package/build/features/shared/Footer/Footer.js +16 -0
  277. package/build/features/shared/Footer/index.d.ts +2 -0
  278. package/build/features/shared/Footer/index.js +2 -0
  279. package/build/features/shared/Input/Input.d.ts +27 -0
  280. package/build/features/shared/Input/Input.js +59 -0
  281. package/build/features/shared/Input/index.d.ts +2 -0
  282. package/build/features/shared/Input/index.js +2 -0
  283. package/build/features/shared/OTP/OTP.d.ts +9 -0
  284. package/build/features/shared/OTP/OTP.js +85 -0
  285. package/build/features/shared/OTP/index.d.ts +2 -0
  286. package/build/features/shared/OTP/index.js +2 -0
  287. package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +8 -0
  288. package/build/features/shared/PasswordIcon/PasswordIcon.js +37 -0
  289. package/build/features/shared/PasswordIcon/index.d.ts +2 -0
  290. package/build/features/shared/PasswordIcon/index.js +2 -0
  291. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +7 -0
  292. package/build/features/shared/SuccessScreen/SuccessScreen.js +54 -0
  293. package/build/features/shared/SuccessScreen/index.d.ts +2 -0
  294. package/build/features/shared/SuccessScreen/index.js +2 -0
  295. package/build/features/tax/Tax.d.ts +6 -0
  296. package/build/features/tax/Tax.js +50 -0
  297. package/build/features/tax/index.d.ts +1 -0
  298. package/build/features/tax/index.js +1 -0
  299. package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +5 -0
  300. package/build/features/tax/screens/TaxDetails/TaxDetails.js +45 -0
  301. package/build/features/tax/screens/TaxDetails/VATId.d.ts +3 -0
  302. package/build/features/tax/screens/TaxDetails/VATId.js +27 -0
  303. package/build/features/tax/screens/TaxDetails/index.d.ts +3 -0
  304. package/build/features/tax/screens/TaxDetails/index.js +2 -0
  305. package/build/features/tax/screens/TaxDetails/validation.d.ts +8 -0
  306. package/build/features/tax/screens/TaxDetails/validation.js +4 -0
  307. package/build/hooks/index.d.ts +5 -0
  308. package/build/hooks/index.js +5 -0
  309. package/build/hooks/useAppDispatch.d.ts +4 -0
  310. package/build/hooks/useAppDispatch.js +2 -0
  311. package/build/hooks/useAppSelector.d.ts +3 -0
  312. package/build/hooks/useAppSelector.js +2 -0
  313. package/build/hooks/useAppTheme.js +3 -2
  314. package/build/hooks/useContainerDimensions.d.ts +4 -0
  315. package/build/hooks/useContainerDimensions.js +21 -0
  316. package/build/hooks/useEventListener.d.ts +5 -0
  317. package/build/hooks/useEventListener.js +20 -0
  318. package/build/hooks/useLanguage.d.ts +4 -0
  319. package/build/hooks/useLanguage.js +8 -0
  320. package/build/index.css +6 -1
  321. package/build/index.d.ts +7 -2
  322. package/build/index.js +17 -2
  323. package/build/theme/palette.js +11 -4
  324. package/build/theme/theme.d.ts +1 -1
  325. package/build/theme/theme.js +0 -1
  326. package/build/theme/typography.js +2 -2
  327. package/build/utils/array.d.ts +3 -1
  328. package/build/utils/array.js +7 -3
  329. package/build/utils/string.d.ts +3 -1
  330. package/build/utils/string.js +11 -2
  331. package/build/utils/validation.d.ts +10 -0
  332. package/build/utils/validation.js +30 -0
  333. package/package.json +120 -116
  334. package/build/app/hooks.d.ts +0 -7
  335. package/build/app/hooks.js +0 -3
@@ -0,0 +1,79 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
16
+ import { styled, alpha } from '@mui/material/styles';
17
+ import ClearIcon from '@mui/icons-material/Clear';
18
+ import { SocialMediaTypes } from '../../../../@types';
19
+ import Input from '../../../../components/Input';
20
+ import Text from '../../../../components/Text';
21
+ import Collapse from '../../../../components/Collapse';
22
+ import SocialMediaGroup from '../../../../components/SocialMediaGroup';
23
+ import { ScreenContainer } from '../../../shared/Containers';
24
+ var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
25
+ var theme = _a.theme, defaultValue = _a.defaultValue;
26
+ return ({
27
+ borderTop: "1px solid ".concat(alpha(theme.palette.divider, 0.8)),
28
+ borderBottom: !defaultValue ? "1px solid ".concat(alpha(theme.palette.divider, 0.8)) : ''
29
+ });
30
+ });
31
+ var InputStyled = styled(Input)(function (_a) {
32
+ var theme = _a.theme;
33
+ return ({
34
+ padding: theme.spacing(0, 2, 0, 0),
35
+ input: {
36
+ paddingInlineStart: theme.spacing(0)
37
+ }
38
+ });
39
+ });
40
+ var TextStyled = styled(Text)(function (_a) {
41
+ var theme = _a.theme;
42
+ return ({
43
+ padding: theme.spacing(0, 0, 0, 1.5)
44
+ });
45
+ });
46
+ var ClearIconStyled = styled(ClearIcon)(function (_a) {
47
+ var theme = _a.theme;
48
+ return ({
49
+ width: theme.spacing(2),
50
+ height: theme.spacing(2),
51
+ cursor: 'pointer',
52
+ color: alpha(theme.palette.text.primary, 0.4)
53
+ });
54
+ });
55
+ var SocialMedia = function (_a) {
56
+ var _b, _c, _d;
57
+ var _e = React.useState(SocialMediaTypes.WEB), socialMediaType = _e[0], setSocialMediaType = _e[1];
58
+ var t = useTranslation().t;
59
+ var control = useFormContext().control;
60
+ var linksControl = useController({ control: control, name: 'links' });
61
+ var links = linksControl.field.value;
62
+ var handleChange = function (_a) {
63
+ var _b;
64
+ var target = _a.target;
65
+ linksControl.field.onChange(__assign(__assign({}, links), (_b = {}, _b[socialMediaType] = target.value, _b)));
66
+ };
67
+ var handleClear = function () {
68
+ var _a;
69
+ linksControl.field.onChange(__assign(__assign({}, links), (_a = {}, _a[socialMediaType] = '', _a)));
70
+ };
71
+ var websiteValue = links.website || '';
72
+ var twitterValue = links.twitter || '';
73
+ var instagramValue = links.instagram || '';
74
+ var errors = linksControl.fieldState.error;
75
+ return (_jsxs(ScreenContainer, __assign({ sx: { mb: 3 } }, { children: [_jsx(SocialMediaGroupStyled, { defaultValue: socialMediaType, exclusive: true, onChange: function (e, value) {
76
+ setSocialMediaType(value);
77
+ } }), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.WEB, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: websiteValue, startAdornment: _jsx(TextStyled, { children: "https://" }), endAdornment: websiteValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('website_placeholder'), warningType: 'alert', warningMessage: (_b = errors === null || errors === void 0 ? void 0 : errors.website) === null || _b === void 0 ? void 0 : _b.message }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.TWITTER, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: twitterValue, startAdornment: _jsx(TextStyled, { children: "@" }), endAdornment: twitterValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('twitter_placeholder'), warningType: 'alert', warningMessage: (_c = errors === null || errors === void 0 ? void 0 : errors.twitter) === null || _c === void 0 ? void 0 : _c.message }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.INSTAGRAM, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: instagramValue, startAdornment: _jsx(TextStyled, { children: "@" }), endAdornment: instagramValue && _jsx(ClearIconStyled, { onClick: handleClear }), placeholder: t('instagram_placeholder'), warningType: 'alert', warningMessage: (_d = errors === null || errors === void 0 ? void 0 : errors.instagram) === null || _d === void 0 ? void 0 : _d.message }) }))] })));
78
+ };
79
+ export default React.memo(SocialMedia);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface TACProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: TACProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,79 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
16
+ import Box from '@mui/material/Box';
17
+ import { styled, alpha } from '@mui/material/styles';
18
+ import Link from '@mui/material/Link';
19
+ import CheckBox from '../../../../components/CheckBox';
20
+ import { ScreenContainer } from '../../../shared/Containers';
21
+ import Text from '../../../../components/Text';
22
+ import Warning from '../../../../components/Warning';
23
+ import { useLanguage } from '../../../../hooks';
24
+ import Collapse from '../../../../components/Collapse';
25
+ import { EXTERNAL_LINKS } from '../../../../constants';
26
+ var TACContainerStyled = styled(Box)(function (_a) {
27
+ var theme = _a.theme;
28
+ return ({
29
+ display: 'flex',
30
+ flexDirection: 'row',
31
+ alignItems: 'center',
32
+ paddingInlineStart: theme.spacing(2.5)
33
+ });
34
+ });
35
+ var TextStyled = styled(Text)(function (_a) {
36
+ var theme = _a.theme;
37
+ return (__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre', height: 'fit-content' }, theme.typography.body2));
38
+ });
39
+ var LinkStyled = styled(Link)(function (_a) {
40
+ var theme = _a.theme;
41
+ return ({
42
+ color: theme.palette.primary.main,
43
+ fontWeight: theme.typography.fontWeightMedium,
44
+ letterSpacing: theme.spacing(0)
45
+ });
46
+ });
47
+ var CheckboxStyled = styled(CheckBox)(function (_a) {
48
+ var theme = _a.theme;
49
+ return ({
50
+ margin: theme.spacing(0),
51
+ padding: theme.spacing(0),
52
+ marginInlineEnd: theme.spacing(1.5),
53
+ color: theme.palette.primary.main,
54
+ '& .MuiSvgIcon-root': {
55
+ fontSize: 30
56
+ },
57
+ '&.Mui-checked': {
58
+ color: theme.palette.text.primary,
59
+ borderRadius: theme.spacing(2.5)
60
+ }
61
+ });
62
+ });
63
+ var CollapseStyled = styled(Collapse)(function () { return ({
64
+ width: '100%'
65
+ }); });
66
+ var TAC = function (_a) {
67
+ var _b;
68
+ var t = useTranslation().t;
69
+ var isAr = useLanguage().isAr;
70
+ var control = useFormContext().control;
71
+ var tacControl = useController({ control: control, name: 'termAndConditionChecked' });
72
+ var tacChecked = tacControl.field.value;
73
+ var warningMessage = (_b = tacControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
74
+ var handleTACCheckedChange = function (event, checked) {
75
+ tacControl.field.onChange(checked);
76
+ };
77
+ return (_jsxs(ScreenContainer, __assign({ sx: { mb: 5 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.TOS_AR : EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage })) }))] })));
78
+ };
79
+ export default React.memo(TAC);
@@ -0,0 +1,3 @@
1
+ import Merchant, { MerchantProps } from './Merchant';
2
+ export type { MerchantProps };
3
+ export default Merchant;
@@ -0,0 +1,2 @@
1
+ import Merchant from './Merchant';
2
+ export default Merchant;
@@ -0,0 +1,50 @@
1
+ import * as yup from 'yup';
2
+ export declare const MerchantValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
+ termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
5
+ links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
6
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
7
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
8
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
9
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
10
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
12
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
13
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
14
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
15
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
16
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
17
+ }>>>;
18
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
19
+ brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
20
+ termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
21
+ links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
22
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
23
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
24
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
25
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
26
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
27
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
28
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
29
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
30
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
31
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
32
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
33
+ }>>>;
34
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
35
+ brandName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
36
+ termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
37
+ links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
38
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
39
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
40
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
41
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
42
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
43
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
44
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
45
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
46
+ website: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
47
+ instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
48
+ twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
49
+ }>>>;
50
+ }>>>;
@@ -0,0 +1,23 @@
1
+ import * as yup from 'yup';
2
+ export var MerchantValidationSchema = yup.object().shape({
3
+ brandName: yup.string().min(3, 'Please enter valid brand name').required('Brand Name is required'),
4
+ termAndConditionChecked: yup.boolean().required().isTrue('Please accept the terms and conditions'),
5
+ links: yup.object().shape({
6
+ website: yup
7
+ .string()
8
+ .matches(/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/, 'Please enter valid url')
9
+ .required('Website is required'),
10
+ instagram: yup
11
+ .string()
12
+ .notRequired()
13
+ .nullable()
14
+ .transform(function (value) { return (!!value ? value : null); })
15
+ .min(2, 'Invalid instagram username'),
16
+ twitter: yup
17
+ .string()
18
+ .notRequired()
19
+ .nullable()
20
+ .transform(function (value) { return (!!value ? value : null); })
21
+ .min(2, 'Invalid instagram username')
22
+ })
23
+ });
@@ -1,7 +1,11 @@
1
1
  import * as React from 'react';
2
2
  export interface OTPProps {
3
3
  phone?: string;
4
- onOTPChange?: (otp: string) => void;
5
4
  }
6
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<OTPProps & React.RefAttributes<unknown>>>;
5
+ declare const _default: React.MemoExoticComponent<{
6
+ ({ phone }: OTPProps): JSX.Element;
7
+ defaultProps: {
8
+ phone: string;
9
+ };
10
+ }>;
7
11
  export default _default;
@@ -12,64 +12,59 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import Box from '@mui/material/Box/Box';
14
14
  import { styled } from '@mui/material/styles';
15
- import OTPField from '../../../../components/OTPField';
16
15
  import * as React from 'react';
17
16
  import { useTranslation } from 'react-i18next';
18
17
  import Text from '../../../../components/Text';
19
- var BoxStyled = styled(Box)(function (_a) {
18
+ import Button from '../../../../features/shared/Button';
19
+ import { ScreenContainer } from '../../../shared/Containers';
20
+ import { useAppDispatch } from '../../../../hooks';
21
+ import { handleNextScreenStep } from '../../../../app/settings';
22
+ import { useLanguage } from '../../../../hooks';
23
+ import { useForm, FormProvider } from 'react-hook-form';
24
+ import { yupResolver } from '@hookform/resolvers/yup';
25
+ import Form from '../../../../components/Form';
26
+ import { maskPhone } from '../../../../utils';
27
+ import { OTPValidation } from './validation';
28
+ import OTPInput from './OTPInput';
29
+ var OTPTitleContainerStyled = styled(Box)(function (_a) {
20
30
  var theme = _a.theme;
21
31
  return ({
22
- display: 'flex',
23
- flexDirection: 'column'
32
+ background: theme.palette.common.white,
33
+ border: '1px solid',
34
+ borderColor: theme.palette.divider,
35
+ direction: theme.direction,
36
+ borderRadius: theme.spacing(0, 0, 1.25, 1.25),
37
+ marginBottom: theme.spacing(4)
24
38
  });
25
39
  });
26
- var OTPTitleContainerStyled = styled(Box)(function (_a) {
27
- var _b;
40
+ var OTPTitleStyled = styled(Text)(function (_a) {
28
41
  var theme = _a.theme;
29
- return (_b = {
30
- background: theme.palette.common.white,
31
- border: '1px solid',
32
- borderColor: theme.palette.divider,
33
- borderRadius: theme.spacing(0, 0, 1.25, 1.25)
34
- },
35
- _b[theme.breakpoints.up('sm')] = {
36
- marginBottom: theme.spacing(6)
37
- },
38
- _b);
42
+ return (__assign(__assign({}, theme.typography.subtitle1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightLight, marginBlock: theme.spacing(1.75), marginInlineStart: theme.spacing(2.5) }));
39
43
  });
40
- var OTPStyled = styled(OTPField)(function (_a) {
41
- var _b;
42
- var theme = _a.theme;
43
- return (_b = {
44
- marginInlineStart: theme.spacing(2.0),
45
- input: {
46
- width: "".concat(theme.spacing(3.75), " !important")
47
- }
48
- },
49
- _b[theme.breakpoints.down('sm')] = {
50
- marginInlineStart: theme.spacing(3)
44
+ var FormStyled = styled(Form)(function () { return ({
45
+ display: 'flex',
46
+ flexDirection: 'column'
47
+ }); });
48
+ var OTP = function (_a) {
49
+ var phone = _a.phone;
50
+ var dispatch = useAppDispatch();
51
+ var methods = useForm({
52
+ resolver: yupResolver(OTPValidation),
53
+ defaultValues: {
54
+ otp: ''
51
55
  },
52
- _b);
53
- });
54
- var OTPTitleStyled = styled(Text)(function (_a) {
55
- var theme = _a.theme;
56
- return ({
57
- fontSize: theme.spacing(1.75),
58
- color: theme.palette.text.primary,
59
- marginBlock: theme.spacing(1.75),
60
- marginInlineStart: theme.spacing(2.5)
56
+ mode: 'onChange'
61
57
  });
62
- });
63
- var OTP = React.forwardRef(function (_a, ref) {
64
- var onOTPChange = _a.onOTPChange, phone = _a.phone;
65
- var _b = React.useState(''), otpValue = _b[0], seOtpValue = _b[1];
66
- var _c = useTranslation(), t = _c.t, i18n = _c.i18n;
67
- var handleOnOTPChange = function (otp) {
68
- seOtpValue(otp);
69
- onOTPChange === null || onOTPChange === void 0 ? void 0 : onOTPChange(otp);
58
+ var t = useTranslation().t;
59
+ var isAr = useLanguage().isAr;
60
+ var onSubmit = function (data) {
61
+ console.log('data', data);
62
+ if (data.otp === '123456')
63
+ return dispatch(handleNextScreenStep('CONNECT_PASSWORD_STEP'));
64
+ dispatch(handleNextScreenStep('CONNECT_INDIVIDUAL_STEP'));
70
65
  };
71
- return (_jsxs(BoxStyled, __assign({ ref: ref }, { children: [_jsx(OTPTitleContainerStyled, __assign({ dir: i18n.dir() }, { children: _jsxs(OTPTitleStyled, { children: [t('ide_opt_sent_title'), " ", _jsx("span", __assign({ dir: 'ltr' }, { children: phone }))] }) })), _jsx(OTPStyled, { value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } })] })));
72
- });
66
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [t('ide_opt_sent_title'), " ", _jsx("span", __assign({ dir: 'ltr' }, { children: maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', isAr: isAr, loading: false }, { children: t('next') }))] })) })) }));
67
+ };
73
68
  OTP.defaultProps = {
74
69
  phone: '+996564656085'
75
70
  };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OTPProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,38 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import Box from '@mui/material/Box/Box';
15
+ import { styled } from '@mui/material/styles';
16
+ import OTPField from '../../../../features/shared/OTP';
17
+ import { useController, useFormContext } from 'react-hook-form';
18
+ import { useTranslation } from 'react-i18next';
19
+ import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
+ var BoxStyled = styled(Box)(function (_a) {
21
+ var theme = _a.theme;
22
+ return ({
23
+ display: 'flex',
24
+ flexDirection: 'column',
25
+ marginBottom: theme.spacing(5)
26
+ });
27
+ });
28
+ var OTPInput = function (_a) {
29
+ var control = useFormContext().control;
30
+ var t = useTranslation().t;
31
+ var otpControl = useController({ name: 'otp', control: control });
32
+ var handleOnOTPChange = function (otp) {
33
+ otpControl.field.onChange(otp);
34
+ };
35
+ var otpValue = otpControl.field.value;
36
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('resend_otp'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { }, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
37
+ };
38
+ export default React.memo(OTPInput);
@@ -0,0 +1,8 @@
1
+ import * as yup from 'yup';
2
+ export declare const OTPValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
5
+ otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
+ otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
+ }>>>;
@@ -0,0 +1,4 @@
1
+ import * as yup from 'yup';
2
+ export var OTPValidation = yup.object().shape({
3
+ otp: yup.string().min(6).required('OTP is required')
4
+ });
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface PasswordProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: PasswordProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,49 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useForm, FormProvider } from 'react-hook-form';
15
+ import { useTranslation } from 'react-i18next';
16
+ import { yupResolver } from '@hookform/resolvers/yup';
17
+ import { useAppDispatch } from '../../../../hooks';
18
+ import { styled } from '@mui/material/styles';
19
+ import { handleNextScreenStep } from '../../../../app/settings';
20
+ import Form from '../../../../components/Form';
21
+ import Button from '../../../shared/Button';
22
+ import { ScreenContainer } from '../../../shared/Containers';
23
+ import { useLanguage } from '../../../../hooks';
24
+ import { PasswordValidationSchema } from './validation';
25
+ import PasswordInput from './PasswordInput';
26
+ var FormStyled = styled(Form)(function () { return ({
27
+ display: 'flex',
28
+ flexDirection: 'column',
29
+ justifyContent: 'space-between',
30
+ height: '100%'
31
+ }); });
32
+ var Password = function (_a) {
33
+ var methods = useForm({
34
+ resolver: yupResolver(PasswordValidationSchema),
35
+ defaultValues: {
36
+ password: ''
37
+ },
38
+ mode: 'onChange'
39
+ });
40
+ var t = useTranslation().t;
41
+ var isAr = useLanguage().isAr;
42
+ var dispatch = useAppDispatch();
43
+ var onSubmit = function (data) {
44
+ console.log('data', data);
45
+ dispatch(handleNextScreenStep());
46
+ };
47
+ return (_jsx(ScreenContainer, __assign({ sx: { height: 240 } }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(PasswordInput, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, isAr: isAr, loading: false }, { children: t('next') }))] })) })) })));
48
+ };
49
+ export default React.memo(Password);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface PasswordInputProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: PasswordInputProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,38 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useController, useFormContext } from 'react-hook-form';
16
+ import PasswordIcon from '../../../shared/PasswordIcon';
17
+ import { ScreenContainer } from '../../../shared/Containers';
18
+ import Input from '../../../shared/Input';
19
+ var PasswordInput = function (_a) {
20
+ var _b;
21
+ var t = useTranslation().t;
22
+ var control = useFormContext().control;
23
+ var _c = React.useState(false), showPassword = _c[0], setShowPassword = _c[1];
24
+ var passwordControl = useController({ control: control, name: 'password' });
25
+ var handlePasswordChange = function (_a) {
26
+ var target = _a.target;
27
+ passwordControl.field.onChange(target.value);
28
+ };
29
+ var handleShowPassword = function () {
30
+ setShowPassword(true);
31
+ };
32
+ var handleHidePassword = function () {
33
+ setShowPassword(false);
34
+ };
35
+ var passwordValue = passwordControl.field.value;
36
+ return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 5 } }, { children: _jsx(Input, { label: t('password_label'), inputProps: { autoComplete: 'off' }, onChange: handlePasswordChange, value: passwordValue, endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('password_placeholder'), type: showPassword ? 'text' : 'password', warningType: 'alert', warningMessage: (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }) })));
37
+ };
38
+ export default React.memo(PasswordInput);
@@ -0,0 +1,3 @@
1
+ import Password, { PasswordProps } from './Password';
2
+ export type { PasswordProps };
3
+ export default Password;
@@ -0,0 +1,2 @@
1
+ import Password from './Password';
2
+ export default Password;
@@ -0,0 +1,8 @@
1
+ import * as yup from 'yup';
2
+ export declare const PasswordValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ password: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
5
+ password: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
+ password: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
+ }>>>;
@@ -0,0 +1,4 @@
1
+ import * as yup from 'yup';
2
+ export var PasswordValidationSchema = yup.object().shape({
3
+ password: yup.string().min(5).required('Password is required')
4
+ });
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface ThankYouProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: ThankYouProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import SuccessScreen from '../../../../features/shared/SuccessScreen';
5
+ var ThankYou = function (_a) {
6
+ var t = useTranslation().t;
7
+ var onSuccess = function () {
8
+ console.log('success');
9
+ alert('Account created successfully, please check your email');
10
+ alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
11
+ window.location.href = '/new/business';
12
+ };
13
+ return _jsx(SuccessScreen, { title: t('thankyou_message'), onSuccess: onSuccess });
14
+ };
15
+ export default React.memo(ThankYou);
@@ -0,0 +1,3 @@
1
+ import ThankYou, { ThankYouProps } from './ThankYou';
2
+ export type { ThankYouProps };
3
+ export default ThankYou;
@@ -0,0 +1,2 @@
1
+ import ThankYou from './ThankYou';
2
+ export default ThankYou;
@@ -0,0 +1,7 @@
1
+ import { FeatureScreenStep } from '../@types';
2
+ export declare const connectFeatureScreens: Array<FeatureScreenStep>;
3
+ export declare const businessFeatureScreens: Array<FeatureScreenStep>;
4
+ export declare const ownerFeatureScreens: Array<FeatureScreenStep>;
5
+ export declare const passwordFeatureScreens: Array<FeatureScreenStep>;
6
+ export declare const bankFeatureScreens: Array<FeatureScreenStep>;
7
+ export declare const taxFeatureScreens: Array<FeatureScreenStep>;