@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,99 @@
1
+ import MIDScreen from './connect/screens/MID';
2
+ import IndividualScreen from './connect/screens/Individual';
3
+ import MerchantInfoScreen from './connect/screens/Merchant';
4
+ import ConnectOTPScreen from './connect/screens/OTP';
5
+ import ThankYouScreen from './connect/screens/ThankYou';
6
+ import PasswordScreen from './connect/screens/Password';
7
+ import CustomersPage from './business/screens/Customers';
8
+ import IDBODPage from './business/screens/IDBOD';
9
+ import VerifyNumberPage from './business/screens/VerifyNumber';
10
+ import BusinessOTPPage from '../features/business/screens/OTP';
11
+ import BusinessTypePage from './business/screens/BusinessType';
12
+ import ActivitiesPage from './business/screens/Activities';
13
+ import SuccessPage from './business/screens/Success';
14
+ import ConfirmPage from './business/screens/Confirm';
15
+ import CreatePasswordPage from './password/screens/CreatePassword';
16
+ import ShowOwnerInfoPage from './owner/screens/ShowOwnerInfo';
17
+ import BankDetailsPage from './bank/screens/BankDetails';
18
+ import TaxDetailsPage from './tax/screens/TaxDetails';
19
+ export var connectFeatureScreens = [
20
+ {
21
+ name: 'CONNECT_MID_STEP',
22
+ element: MIDScreen
23
+ },
24
+ {
25
+ name: 'CONNECT_OTP_STEP',
26
+ element: ConnectOTPScreen
27
+ },
28
+ {
29
+ name: 'CONNECT_INDIVIDUAL_STEP',
30
+ element: IndividualScreen
31
+ },
32
+ {
33
+ name: 'CONNECT_PASSWORD_STEP',
34
+ element: PasswordScreen
35
+ },
36
+ {
37
+ name: 'CONNECT_MERCHANT_INFO_STEP',
38
+ element: MerchantInfoScreen
39
+ },
40
+ {
41
+ name: 'CONNECT_THANK_YOU_STEP',
42
+ element: ThankYouScreen
43
+ }
44
+ ];
45
+ export var businessFeatureScreens = [
46
+ {
47
+ name: 'BUSINESS_VERIFY_NUMBER_STEP',
48
+ element: VerifyNumberPage
49
+ },
50
+ {
51
+ name: 'BUSINESS_IDBOD_STEP',
52
+ element: IDBODPage
53
+ },
54
+ {
55
+ name: 'BUSINESS_OTP_STEP',
56
+ element: BusinessOTPPage
57
+ },
58
+ {
59
+ name: 'BUSINESS_BUSINESS_TYPE_STEP',
60
+ element: BusinessTypePage
61
+ },
62
+ {
63
+ name: 'BUSINESS_CONFIRM_STEP',
64
+ element: ConfirmPage
65
+ },
66
+ {
67
+ name: 'BUSINESS_ACTIVITIES_STEP',
68
+ element: ActivitiesPage
69
+ },
70
+ {
71
+ name: 'BUSINESS_CUSTOMERS_STEP',
72
+ element: CustomersPage
73
+ },
74
+ { name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage }
75
+ ];
76
+ export var ownerFeatureScreens = [
77
+ {
78
+ name: 'OWNER_SHOW_OWNER_INFO_STEP',
79
+ element: ShowOwnerInfoPage
80
+ }
81
+ ];
82
+ export var passwordFeatureScreens = [
83
+ {
84
+ name: 'PASSWORD_CREATE_PASSWORD_STEP',
85
+ element: CreatePasswordPage
86
+ }
87
+ ];
88
+ export var bankFeatureScreens = [
89
+ {
90
+ name: 'BANK_DETAILS_STEP',
91
+ element: BankDetailsPage
92
+ }
93
+ ];
94
+ export var taxFeatureScreens = [
95
+ {
96
+ name: 'TAX_DETAILS_STEP',
97
+ element: TaxDetailsPage
98
+ }
99
+ ];
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface OwnerLibProps {
3
+ }
4
+ export declare function OwnerLib(props: OwnerLibProps): JSX.Element;
5
+ export declare function renderOwnerLib(config: OwnerLibProps, elementId: string): void;
6
+ export declare function unmountOwnerLib(elementId: string): void;
@@ -0,0 +1,50 @@
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 React, { memo, useEffect } from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useAppTheme, useAppDispatch, useAppSelector } from '../../hooks';
16
+ import { handleActiveFlowScreens, settingsSelector } from '../../app/settings';
17
+ import AnimationFlow from '../../components/AnimationFlow';
18
+ import { store } from '../../app/store';
19
+ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
20
+ import Collapse from '../../components/Collapse';
21
+ import { reactElement } from '../../utils';
22
+ import { OWNER_SCREENS_NAVIGATION } from '../../constants';
23
+ import { ownerFeatureScreens } from '../featuresScreens';
24
+ import CustomFooter from '../shared/Footer';
25
+ import { FeatureContainer } from '../shared/Containers';
26
+ var Owner = memo(function (props) {
27
+ var open = React.useState(true)[0];
28
+ var t = useTranslation().t;
29
+ var theme = useAppTheme().theme;
30
+ var dispatch = useAppDispatch();
31
+ var data = useAppSelector(settingsSelector).data;
32
+ var activeScreen = data.activeScreen;
33
+ useEffect(function () {
34
+ dispatch(handleActiveFlowScreens(OWNER_SCREENS_NAVIGATION));
35
+ }, []);
36
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: ownerFeatureScreens.map(function (_a, index) {
37
+ var Element = _a.element, name = _a.name;
38
+ var isActive = activeScreen.name === name;
39
+ return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 600, exit: 400, appear: 600 } }, { children: _jsx(Element, {}) }), index));
40
+ }) }) })) })));
41
+ });
42
+ export function OwnerLib(props) {
43
+ return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Owner, __assign({}, props)) })));
44
+ }
45
+ export function renderOwnerLib(config, elementId) {
46
+ reactElement(elementId).render(_jsx(OwnerLib, __assign({}, config)));
47
+ }
48
+ export function unmountOwnerLib(elementId) {
49
+ reactElement(elementId).unmount();
50
+ }
@@ -0,0 +1 @@
1
+ export * from './Owner';
@@ -0,0 +1 @@
1
+ export * from './Owner';
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ export interface ShowOwnerInfoProps {
3
+ citizenship: string;
4
+ nationalAddr: string;
5
+ birthDate: string;
6
+ placeOfBirth: string;
7
+ maritalStatus: string;
8
+ }
9
+ declare const _default: React.MemoExoticComponent<{
10
+ ({ citizenship, nationalAddr, birthDate, placeOfBirth, maritalStatus }: ShowOwnerInfoProps): JSX.Element;
11
+ defaultProps: {
12
+ citizenship: string;
13
+ nationalAddr: string;
14
+ birthDate: string;
15
+ placeOfBirth: string;
16
+ maritalStatus: string;
17
+ };
18
+ }>;
19
+ export default _default;
@@ -0,0 +1,52 @@
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 Box from '@mui/material/Box';
15
+ import { useTranslation } from 'react-i18next';
16
+ import { useAppDispatch } from '../../../../hooks';
17
+ import { handleNextScreenStep } from '../../../../app/settings';
18
+ import { styled } from '@mui/material/styles';
19
+ import Collapse from '../../../../components/Collapse';
20
+ import Button from '../../../../features/shared/Button';
21
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
22
+ import { useLanguage } from '../../../../hooks';
23
+ import Info from './info';
24
+ var InputsContainerStyled = styled(Box)(function (_a) {
25
+ var _b;
26
+ var theme = _a.theme;
27
+ return (_b = {
28
+ paddingBottom: theme.spacing(5)
29
+ },
30
+ _b[theme.transitions.create(['padding-bottom'])] = {
31
+ duration: theme.transitions.duration.standard
32
+ },
33
+ _b);
34
+ });
35
+ var ShowOwnerInfo = function (_a) {
36
+ var citizenship = _a.citizenship, nationalAddr = _a.nationalAddr, birthDate = _a.birthDate, placeOfBirth = _a.placeOfBirth, maritalStatus = _a.maritalStatus;
37
+ var t = useTranslation().t;
38
+ var isAr = useLanguage().isAr;
39
+ var dispatch = useAppDispatch();
40
+ var handleClickNext = function () {
41
+ dispatch(handleNextScreenStep());
42
+ };
43
+ return (_jsxs(ScreenContainer, { children: [_jsxs(InputsContainerStyled, { children: [_jsx(Collapse, __assign({ in: !!citizenship }, { children: _jsx(Info, { label: 'citizenship', value: citizenship }) })), _jsx(Collapse, __assign({ in: !!nationalAddr }, { children: _jsx(Info, { label: 'national_address', value: nationalAddr }) })), _jsx(Info, { label: 'birth_date', value: birthDate }), _jsx(Info, { label: 'place_of_birth', value: placeOfBirth }), _jsx(Collapse, __assign({ in: !!maritalStatus }, { children: _jsx(Info, { label: 'marital_status', value: maritalStatus }) }))] }), _jsx(Button, __assign({ isAr: isAr, disabled: false, loading: false, onClick: handleClickNext }, { children: t('next') }))] }));
44
+ };
45
+ export default React.memo(ShowOwnerInfo);
46
+ ShowOwnerInfo.defaultProps = {
47
+ citizenship: '',
48
+ nationalAddr: 'India',
49
+ birthDate: '03-06-1986',
50
+ placeOfBirth: 'India',
51
+ maritalStatus: ''
52
+ };
@@ -0,0 +1,3 @@
1
+ import ShowOwnerInfo, { ShowOwnerInfoProps } from './ShowOwnerInfo';
2
+ export type { ShowOwnerInfoProps };
3
+ export default ShowOwnerInfo;
@@ -0,0 +1,2 @@
1
+ import ShowOwnerInfo from './ShowOwnerInfo';
2
+ export default ShowOwnerInfo;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface InfoProps {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export default function Info({ label, value }: InfoProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,28 @@
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useTranslation } from 'react-i18next';
14
+ import { styled, alpha } from '@mui/material/styles';
15
+ import Text from '../../../../components/Text';
16
+ var LabelTextStyled = styled(Text)(function (_a) {
17
+ var theme = _a.theme;
18
+ return (__assign(__assign({}, theme.typography.caption), { color: alpha(theme.palette.text.primary, 0.6), paddingInlineStart: theme.spacing(2.5), marginBlockStart: theme.spacing(3.5), marginBlockEnd: theme.spacing(1.25) }));
19
+ });
20
+ var ValueTextStyled = styled(Text)(function (_a) {
21
+ var theme = _a.theme;
22
+ return (__assign(__assign({ background: theme.palette.common.white, color: theme.palette.text.primary, border: "".concat(theme.spacing(0.125), " solid ").concat(theme.palette.divider), maxHeight: theme.spacing(5.5), paddingBlock: theme.spacing(1.75), paddingInlineStart: theme.spacing(2.5), fontWeight: theme.typography.fontWeightLight }, theme.typography.body2), { lineHeight: theme.spacing(2.125) }));
23
+ });
24
+ export default function Info(_a) {
25
+ var label = _a.label, value = _a.value;
26
+ var t = useTranslation().t;
27
+ return (_jsxs(_Fragment, { children: [_jsx(LabelTextStyled, { children: t(label) }), _jsx(ValueTextStyled, { children: value })] }));
28
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface PasswordLibProps {
3
+ }
4
+ export declare function PasswordLib(props: PasswordLibProps): JSX.Element;
5
+ export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): void;
6
+ export declare function unmountPasswordLib(elementId: string): void;
@@ -0,0 +1,50 @@
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 React, { memo, useEffect } from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { useAppTheme, useAppDispatch, useAppSelector } from '../../hooks';
16
+ import { handleActiveFlowScreens, settingsSelector } from '../../app/settings';
17
+ import AnimationFlow from '../../components/AnimationFlow';
18
+ import { store } from '../../app/store';
19
+ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
20
+ import Collapse from '../../components/Collapse';
21
+ import { reactElement } from '../../utils';
22
+ import { PASSWORD_SCREENS_NAVIGATION } from '../../constants';
23
+ import { connectFeatureScreens } from '../featuresScreens';
24
+ import CustomFooter from '../shared/Footer';
25
+ import { FeatureContainer } from '../shared/Containers';
26
+ var Password = memo(function (props) {
27
+ var open = React.useState(true)[0];
28
+ var t = useTranslation().t;
29
+ var theme = useAppTheme().theme;
30
+ var dispatch = useAppDispatch();
31
+ var data = useAppSelector(settingsSelector).data;
32
+ var activeScreen = data.activeScreen;
33
+ useEffect(function () {
34
+ dispatch(handleActiveFlowScreens(PASSWORD_SCREENS_NAVIGATION));
35
+ }, []);
36
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
37
+ var Element = _a.element, name = _a.name;
38
+ var isActive = activeScreen.name === name;
39
+ return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 600, exit: 400, appear: 600 } }, { children: _jsx(Element, {}) }), index));
40
+ }) }) })) })));
41
+ });
42
+ export function PasswordLib(props) {
43
+ return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Password, __assign({}, props)) })));
44
+ }
45
+ export function renderPasswordLib(config, elementId) {
46
+ reactElement(elementId).render(_jsx(PasswordLib, __assign({}, config)));
47
+ }
48
+ export function unmountPasswordLib(elementId) {
49
+ reactElement(elementId).unmount();
50
+ }
@@ -0,0 +1 @@
1
+ export * from './Password';
@@ -0,0 +1 @@
1
+ export * from './Password';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface ConditionTextProps {
3
+ active: boolean;
4
+ text: string;
5
+ }
6
+ export default function ConditionText(props: ConditionTextProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,23 @@
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 { styled } from '@mui/material/styles';
14
+ import Text from '../../../../components/Text';
15
+ var TextStyled = styled(Text, {
16
+ shouldForwardProp: function (prop) { return prop !== 'active' && prop !== 'text'; }
17
+ })(function (_a) {
18
+ var theme = _a.theme, active = _a.active;
19
+ return (__assign(__assign({}, theme.typography.body2), { fontWeight: active ? theme.typography.fontWeightRegular : theme.typography.fontWeightLight, lineHeight: 1.5, color: active ? theme.palette.text.primary : theme.palette.text.disabled }));
20
+ });
21
+ export default function ConditionText(props) {
22
+ return _jsx(TextStyled, __assign({}, props, { children: props.text }));
23
+ }
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface ConfirmPasswordProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: ConfirmPasswordProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { useController, useFormContext } from 'react-hook-form';
5
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
6
+ import PasswordIcon from '../../../shared/PasswordIcon';
7
+ import Input from '../../../shared/Input';
8
+ var ConfirmPassword = function (_a) {
9
+ var _b;
10
+ var t = useTranslation().t;
11
+ var control = useFormContext().control;
12
+ var _c = React.useState(false), showPassword = _c[0], setShowPassword = _c[1];
13
+ var passwordControl = useController({ control: control, name: 'confirmPassword' });
14
+ var handlePasswordChange = function (_a) {
15
+ var target = _a.target;
16
+ passwordControl.field.onChange(target.value);
17
+ };
18
+ var handleShowPassword = function () {
19
+ setShowPassword(true);
20
+ };
21
+ var handleHidePassword = function () {
22
+ setShowPassword(false);
23
+ };
24
+ var passwordValue = passwordControl.field.value;
25
+ return (_jsx(ScreenContainer, { children: _jsx(Input, { onChange: handlePasswordChange, value: passwordValue, endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('confirm_password_placeholder'), warningType: 'alert', type: showPassword ? 'text' : 'password', warningMessage: (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }) }));
26
+ };
27
+ export default React.memo(ConfirmPassword);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface CreatePasswordProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: CreatePasswordProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,51 @@
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 Box from '@mui/material/Box';
18
+ import { styled } from '@mui/material/styles';
19
+ import { useAppDispatch } from '../../../../hooks';
20
+ import { handleNextScreenStep } from '../../../../app/settings';
21
+ import Form from '../../../../components/Form';
22
+ import { useLanguage } from '../../../../hooks';
23
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
24
+ import Button from '../../../shared/Button';
25
+ import { PasswordValidation } from './validation';
26
+ import Password from './Password';
27
+ var InputsContainerStyled = styled(Box)(function (_a) {
28
+ var theme = _a.theme;
29
+ return ({
30
+ paddingBottom: theme.spacing(5)
31
+ });
32
+ });
33
+ var CreatePassword = function (_a) {
34
+ var methods = useForm({
35
+ resolver: yupResolver(PasswordValidation),
36
+ defaultValues: {
37
+ password: '',
38
+ confirmPassword: ''
39
+ },
40
+ mode: 'onChange'
41
+ });
42
+ var t = useTranslation().t;
43
+ var isAr = useLanguage().isAr;
44
+ var dispatch = useAppDispatch();
45
+ var onSubmit = function (data) {
46
+ console.log('data', data);
47
+ dispatch(handleNextScreenStep());
48
+ };
49
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(Password, {}) }), _jsx(Button, __assign({ isAr: isAr, disabled: !methods.formState.isValid, loading: false }, { children: t('next') }))] })) })) }));
50
+ };
51
+ export default React.memo(CreatePassword);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface PasswordProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: PasswordProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,75 @@
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 } from '@mui/material/styles';
17
+ import Box from '@mui/material/Box';
18
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
19
+ import Input from '../../../shared/Input';
20
+ import PasswordIcon from '../../../shared/PasswordIcon';
21
+ import { PasswordMatchLength, isPasswordHasUpperLetter, isPasswordHasLowerLetter, isPasswordHasSpecialLetter } from '../../../../utils';
22
+ import Collapse from '../../../../components/Collapse';
23
+ import Text from '../../../../components/Text';
24
+ import List from '@mui/material/List';
25
+ import PasswordBar from './PasswordBar';
26
+ import ConditionText from './ConditionText';
27
+ import ConfirmPassword from './ConfirmPassword';
28
+ var BarBoxStyled = styled(Box)(function () { return ({
29
+ display: 'flex',
30
+ justifyContent: 'center'
31
+ }); });
32
+ var ListStyled = styled(List)(function (_a) {
33
+ var theme = _a.theme;
34
+ return ({
35
+ marginInlineStart: theme.spacing(2.5)
36
+ });
37
+ });
38
+ var TextStyled = styled(Text)(function (_a) {
39
+ var theme = _a.theme;
40
+ return (__assign(__assign({ marginBottom: theme.spacing(2.5), marginTop: theme.spacing(1.875) }, theme.typography.caption), { color: theme.palette.text.secondary, paddingInline: theme.spacing(2.5) }));
41
+ });
42
+ var Password = function (_a) {
43
+ var _b;
44
+ var t = useTranslation().t;
45
+ var control = useFormContext().control;
46
+ var _c = React.useState(false), showPassword = _c[0], setShowPassword = _c[1];
47
+ var passwordControl = useController({ control: control, name: 'password' });
48
+ var _d = React.useState(false), isPasswordMatchLength = _d[0], setIsPasswordMatchLength = _d[1];
49
+ var _e = React.useState(false), isPasswordHasUpper = _e[0], setIsPasswordHasUpper = _e[1];
50
+ var _f = React.useState(false), isPasswordHasLower = _f[0], setIsPasswordHasLower = _f[1];
51
+ var _g = React.useState(false), isPasswordHasSpecial = _g[0], setIsPasswordHasSpecial = _g[1];
52
+ var handlePasswordChange = function (_a) {
53
+ var target = _a.target;
54
+ passwordControl.field.onChange(target.value);
55
+ setIsPasswordMatchLength(PasswordMatchLength(target.value));
56
+ setIsPasswordHasUpper(isPasswordHasUpperLetter(target.value));
57
+ setIsPasswordHasLower(isPasswordHasLowerLetter(target.value));
58
+ setIsPasswordHasSpecial(isPasswordHasSpecialLetter(target.value));
59
+ };
60
+ var handleShowPassword = function () {
61
+ setShowPassword(true);
62
+ };
63
+ var handleHidePassword = function () {
64
+ setShowPassword(false);
65
+ };
66
+ var passwordValue = passwordControl.field.value;
67
+ var passwordConditions = [
68
+ PasswordMatchLength(passwordValue),
69
+ isPasswordHasUpperLetter(passwordValue),
70
+ isPasswordHasLowerLetter(passwordValue),
71
+ isPasswordHasSpecialLetter(passwordValue)
72
+ ];
73
+ return (_jsxs(ScreenContainer, { children: [_jsx(Input, { label: t('new_password_label'), onChange: handlePasswordChange, value: passwordValue, endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword }), placeholder: t('new_password_placeholder'), warningType: 'alert', type: showPassword ? 'text' : 'password', warningMessage: (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message }), _jsxs(BarBoxStyled, { children: [_jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 1 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 2 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 3 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 4, sx: { marginInlineEnd: 0 } })] }), _jsx(Collapse, __assign({ in: !(passwordConditions.filter(Boolean).length >= 4), timeout: { enter: 1000, exit: 800 } }, { children: _jsxs(ListStyled, { children: [_jsx(ConditionText, { active: isPasswordMatchLength, text: '- ' + t('password_length') }), _jsx(ConditionText, { active: isPasswordHasUpper, text: '- ' + t('password_upper') }), _jsx(ConditionText, { active: isPasswordHasLower, text: '- ' + t('password_lower') }), _jsx(ConditionText, { active: isPasswordHasSpecial, text: '- ' + t('password_special') })] }) })), _jsxs(Collapse, __assign({ in: passwordConditions.filter(Boolean).length === 4, timeout: { enter: 800, exit: 1000 } }, { children: [_jsx(TextStyled, { children: t('notify_strong_password') }), _jsx(ConfirmPassword, {})] }))] }));
74
+ };
75
+ export default React.memo(Password);
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { DividerProps } from '@mui/material/Divider';
3
+ interface PasswordBarProps extends DividerProps {
4
+ active: boolean;
5
+ }
6
+ export default function PasswordBar(props: PasswordBarProps): JSX.Element;
7
+ export {};
@@ -0,0 +1,29 @@
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 { styled } from '@mui/material/styles';
14
+ import Divider from '@mui/material/Divider';
15
+ var DividerStyled = styled(Divider, { shouldForwardProp: function (prop) { return prop !== 'active'; } })(function (_a) {
16
+ var theme = _a.theme, active = _a.active;
17
+ return ({
18
+ maxWidth: theme.spacing(10.375),
19
+ height: theme.spacing(0.375),
20
+ marginTop: theme.spacing(2.5),
21
+ marginInlineEnd: theme.spacing(0.625),
22
+ flex: 1,
23
+ border: 'none',
24
+ background: active ? theme.palette.success.light : theme.palette.primary.dark
25
+ });
26
+ });
27
+ export default function PasswordBar(props) {
28
+ return _jsx(DividerStyled, __assign({}, props));
29
+ }
@@ -0,0 +1,3 @@
1
+ import CreatePassword, { CreatePasswordProps } from './CreatePassword';
2
+ export type { CreatePasswordProps };
3
+ export default CreatePassword;
@@ -0,0 +1,2 @@
1
+ import CreatePassword from './CreatePassword';
2
+ export default CreatePassword;
@@ -0,0 +1,11 @@
1
+ import * as yup from 'yup';
2
+ export declare const PasswordValidation: 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
+ confirmPassword: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
5
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
6
+ password: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
7
+ confirmPassword: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
9
+ password: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
10
+ confirmPassword: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
+ }>>>;
@@ -0,0 +1,8 @@
1
+ import * as yup from 'yup';
2
+ export var PasswordValidation = yup.object().shape({
3
+ password: yup.string().required('Password is required'),
4
+ confirmPassword: yup
5
+ .string()
6
+ .oneOf([yup.ref('password'), 'Passwords are not the same'])
7
+ .required('Password confirmation is required')
8
+ });
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from '../../../components/Button';
3
+ interface CustomButtonProps extends ButtonProps {
4
+ isAr: boolean;
5
+ loading?: boolean;
6
+ }
7
+ export default function CustomButton({ children, disabled, isAr, loading, ...props }: CustomButtonProps): JSX.Element;
8
+ export {};