@opexa/portal-components 0.0.945 → 0.0.947

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 (345) hide show
  1. package/dist/client/hooks/useGlobalStore.d.ts +1 -0
  2. package/dist/client/hooks/useGlobalStore.js +13 -0
  3. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +2 -21
  4. package/dist/components/ForgotPassword/Crazywin/ForgotPassword.module.css +42 -42
  5. package/dist/components/Jackpots/Jackpots.module.css +288 -288
  6. package/dist/components/KYC/KYCDefault/KYCDefault.d.ts +1 -0
  7. package/dist/components/KYC/KYCDefault/KYCDefault.js +3 -2
  8. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  9. package/dist/components/KYC/KYCDefault/PersonalInformation.js +7 -0
  10. package/dist/components/KYC/KYCDefault/useKYCDefault.d.ts +2 -1
  11. package/dist/components/KYC/KYCDefault/useKYCDefault.js +2 -1
  12. package/dist/components/KYC/KYCNonPagCor/IdentityVerification.js +4 -5
  13. package/dist/components/KYC/KYCNonPagCor/KYCVerificationStatus.lazy.js +2 -2
  14. package/dist/components/KYC/KYCReview.d.ts +1 -0
  15. package/dist/components/KYC/KYCReview.js +20 -0
  16. package/dist/components/SingleSignOn/SingleSignOn.d.ts +1 -1
  17. package/dist/components/SingleSignOn/SingleSignOn.js +15 -7
  18. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  19. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  20. package/dist/handlers/index.d.ts +2 -2
  21. package/dist/images/phone-icon.svg +10 -10
  22. package/dist/services/queries.js +3369 -3369
  23. package/dist/styles/theme.css +776 -776
  24. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  25. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  26. package/package.json +179 -179
  27. package/dist/assets/providers/alize.png +0 -0
  28. package/dist/assets/providers/bigtime-gaming.png +0 -0
  29. package/dist/assets/providers/bng.png +0 -0
  30. package/dist/assets/providers/boongo.png +0 -0
  31. package/dist/assets/providers/btg.png +0 -0
  32. package/dist/assets/providers/cq9.png +0 -0
  33. package/dist/assets/providers/darwin.png +0 -0
  34. package/dist/assets/providers/digitain.png +0 -0
  35. package/dist/assets/providers/evolution.png +0 -0
  36. package/dist/assets/providers/fantasma-games.png +0 -0
  37. package/dist/assets/providers/fc.png +0 -0
  38. package/dist/assets/providers/fp.png +0 -0
  39. package/dist/assets/providers/habanero.png +0 -0
  40. package/dist/assets/providers/hacksaw.png +0 -0
  41. package/dist/assets/providers/jdb.png +0 -0
  42. package/dist/assets/providers/jili.png +0 -0
  43. package/dist/assets/providers/leap.png +0 -0
  44. package/dist/assets/providers/live-22-metaverse.png +0 -0
  45. package/dist/assets/providers/netent.png +0 -0
  46. package/dist/assets/providers/no-limit.png +0 -0
  47. package/dist/assets/providers/pg.png +0 -0
  48. package/dist/assets/providers/pgsoft.png +0 -0
  49. package/dist/assets/providers/pragmatic-play.png +0 -0
  50. package/dist/assets/providers/realtime-gaming.png +0 -0
  51. package/dist/assets/providers/redtiger.png +0 -0
  52. package/dist/assets/providers/rtg.png +0 -0
  53. package/dist/assets/providers/sagaming.png +0 -0
  54. package/dist/client/hooks/useAiOGCashDepositMutation.d.ts +0 -4
  55. package/dist/client/hooks/useAiOGCashDepositMutation.js +0 -90
  56. package/dist/client/hooks/useAiOGrabPayDepositMutation.d.ts +0 -4
  57. package/dist/client/hooks/useAiOGrabPayDepositMutation.js +0 -80
  58. package/dist/client/hooks/useAiOPalawanPayDepositMutation.d.ts +0 -4
  59. package/dist/client/hooks/useAiOPalawanPayDepositMutation.js +0 -80
  60. package/dist/client/hooks/useAiOPayMayaDepositMutation.d.ts +0 -4
  61. package/dist/client/hooks/useAiOPayMayaDepositMutation.js +0 -80
  62. package/dist/components/DepositWithdrawal/AiOPaymentMethods.d.ts +0 -11
  63. package/dist/components/DepositWithdrawal/AiOPaymentMethods.js +0 -55
  64. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
  65. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +0 -99
  66. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
  67. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +0 -17
  68. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
  69. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +0 -116
  70. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHQRCode.d.ts +0 -3
  71. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHQRCode.js +0 -69
  72. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDeposit.d.ts +0 -1
  73. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDeposit.js +0 -10
  74. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositAlert.d.ts +0 -1
  75. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositAlert.js +0 -99
  76. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.d.ts +0 -25
  77. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.js +0 -2
  78. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositDetails.d.ts +0 -1
  79. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositDetails.js +0 -17
  80. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositForm.d.ts +0 -1
  81. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositForm.js +0 -116
  82. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHQRCode.d.ts +0 -3
  83. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHQRCode.js +0 -69
  84. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.d.ts +0 -13
  85. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.js +0 -85
  86. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.d.ts +0 -1
  87. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.js +0 -11
  88. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.d.ts +0 -1
  89. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.js +0 -11
  90. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.d.ts +0 -1
  91. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.js +0 -126
  92. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.d.ts +0 -1
  93. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.js +0 -10
  94. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.d.ts +0 -1
  95. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.js +0 -12
  96. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +0 -17
  97. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.js +0 -2
  98. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.d.ts +0 -1
  99. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.js +0 -41
  100. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +0 -13
  101. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.js +0 -91
  102. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGCashDeposit/AiOGCashDeposit.d.ts +0 -1
  103. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGCashDeposit/AiOGCashDeposit.js +0 -173
  104. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGrabPayDeposit/AiOGrabPayDeposit.d.ts +0 -1
  105. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGrabPayDeposit/AiOGrabPayDeposit.js +0 -171
  106. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPalawanPayDeposit/AiOPalawanPayDeposit.d.ts +0 -1
  107. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPalawanPayDeposit/AiOPalawanPayDeposit.js +0 -171
  108. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPayMayaDeposit/AiOPayMayaDeposit.d.ts +0 -1
  109. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPayMayaDeposit/AiOPayMayaDeposit.js +0 -171
  110. package/dist/components/DepositWithdrawal/Deposit__legacy/AvailablePromos.d.ts +0 -8
  111. package/dist/components/DepositWithdrawal/Deposit__legacy/AvailablePromos.js +0 -33
  112. package/dist/components/DepositWithdrawal/Deposit__legacy/Deposit.d.ts +0 -1
  113. package/dist/components/DepositWithdrawal/Deposit__legacy/Deposit.js +0 -120
  114. package/dist/components/DepositWithdrawal/Deposit__legacy/GCashDeposit/GCashDeposit.d.ts +0 -1
  115. package/dist/components/DepositWithdrawal/Deposit__legacy/GCashDeposit/GCashDeposit.js +0 -163
  116. package/dist/components/DepositWithdrawal/Deposit__legacy/GCashWebpayDeposit/GCashWebpayDeposit.d.ts +0 -1
  117. package/dist/components/DepositWithdrawal/Deposit__legacy/GCashWebpayDeposit/GCashWebpayDeposit.js +0 -165
  118. package/dist/components/DepositWithdrawal/Deposit__legacy/LibanganDeposit/LibanganDeposit.d.ts +0 -1
  119. package/dist/components/DepositWithdrawal/Deposit__legacy/LibanganDeposit/LibanganDeposit.js +0 -186
  120. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaAppDeposit/MayaAppDeposit.d.ts +0 -1
  121. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaAppDeposit/MayaAppDeposit.js +0 -157
  122. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaDeposit/MayaDeposit.d.ts +0 -1
  123. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaDeposit/MayaDeposit.js +0 -163
  124. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaWebpayDeposit/MayaWebpayDeposit.d.ts +0 -1
  125. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaWebpayDeposit/MayaWebpayDeposit.js +0 -166
  126. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDeposit.d.ts +0 -1
  127. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDeposit.js +0 -10
  128. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +0 -1
  129. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositAlert.js +0 -99
  130. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +0 -25
  131. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.js +0 -2
  132. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +0 -1
  133. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositDetails.js +0 -19
  134. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositForm.d.ts +0 -1
  135. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositForm.js +0 -115
  136. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +0 -13
  137. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.js +0 -81
  138. package/dist/components/DepositWithdrawal/Deposit__legacy/PisoPayDeposit/PisoPayDeposit.d.ts +0 -1
  139. package/dist/components/DepositWithdrawal/Deposit__legacy/PisoPayDeposit/PisoPayDeposit.js +0 -180
  140. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDeposit.d.ts +0 -1
  141. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDeposit.js +0 -10
  142. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
  143. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositAlert.js +0 -99
  144. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +0 -25
  145. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.js +0 -2
  146. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
  147. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositDetails.js +0 -17
  148. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
  149. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositForm.js +0 -116
  150. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHQRCode.d.ts +0 -3
  151. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHQRCode.js +0 -69
  152. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +0 -13
  153. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.js +0 -85
  154. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  155. package/dist/components/DigitainLauncher/Loading.js +0 -5
  156. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  157. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  158. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  159. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  160. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  161. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  162. package/dist/components/FeatureFlag/index.d.ts +0 -1
  163. package/dist/components/FeatureFlag/index.js +0 -1
  164. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
  165. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
  166. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  167. package/dist/components/KYC/AutoOpen.js +0 -40
  168. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  169. package/dist/components/KYC/BasicInformation.js +0 -101
  170. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  171. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  172. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  173. package/dist/components/KYC/CaptureSelfie.js +0 -285
  174. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  175. package/dist/components/KYC/DisplayImage.js +0 -8
  176. package/dist/components/KYC/FileUpload.d.ts +0 -10
  177. package/dist/components/KYC/FileUpload.js +0 -72
  178. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  179. package/dist/components/KYC/IdentityVerification.js +0 -120
  180. package/dist/components/KYC/Indicator.d.ts +0 -1
  181. package/dist/components/KYC/Indicator.js +0 -8
  182. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  183. package/dist/components/KYC/KYC.lazy.js +0 -45
  184. package/dist/components/KYC/KYCContext.d.ts +0 -6
  185. package/dist/components/KYC/KYCContext.js +0 -2
  186. package/dist/components/KYC/KYCDefault/BasicInformation.d.ts +0 -1
  187. package/dist/components/KYC/KYCDefault/BasicInformation.js +0 -101
  188. package/dist/components/KYC/KYCVerificationStatus.d.ts +0 -1
  189. package/dist/components/KYC/KYCVerificationStatus.js +0 -10
  190. package/dist/components/KYC/KYCVerificationStatus.lazy.d.ts +0 -1
  191. package/dist/components/KYC/KYCVerificationStatus.lazy.js +0 -39
  192. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  193. package/dist/components/KYC/NoCameraError.js +0 -6
  194. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  195. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  196. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  197. package/dist/components/KYC/PersonalInformation.js +0 -122
  198. package/dist/components/KYC/backup/Header.d.ts +0 -1
  199. package/dist/components/KYC/backup/Header.js +0 -8
  200. package/dist/components/KYC/backup/Indicator.d.ts +0 -1
  201. package/dist/components/KYC/backup/Indicator.js +0 -9
  202. package/dist/components/KYC/backup/KYC.d.ts +0 -1
  203. package/dist/components/KYC/backup/KYC.js +0 -14
  204. package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
  205. package/dist/components/KYC/backup/KYC.lazy.js +0 -26
  206. package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
  207. package/dist/components/KYC/backup/KYCContext.js +0 -2
  208. package/dist/components/KYC/backup/Step1.d.ts +0 -1
  209. package/dist/components/KYC/backup/Step1.js +0 -13
  210. package/dist/components/KYC/backup/Step2.d.ts +0 -1
  211. package/dist/components/KYC/backup/Step2.js +0 -13
  212. package/dist/components/KYC/backup/Step3.d.ts +0 -1
  213. package/dist/components/KYC/backup/Step3.js +0 -13
  214. package/dist/components/KYC/backup/Step4.d.ts +0 -1
  215. package/dist/components/KYC/backup/Step4.js +0 -7
  216. package/dist/components/KYC/backup/useKYC.d.ts +0 -10
  217. package/dist/components/KYC/backup/useKYC.js +0 -8
  218. package/dist/components/KYC/loadModels.d.ts +0 -1
  219. package/dist/components/KYC/loadModels.js +0 -9
  220. package/dist/components/KYC/useKYC.d.ts +0 -25
  221. package/dist/components/KYC/useKYC.js +0 -38
  222. package/dist/components/KYC/utils.d.ts +0 -9
  223. package/dist/components/KYC/utils.js +0 -79
  224. package/dist/components/KYCNotRequired/KYCNotRequired.d.ts +0 -0
  225. package/dist/components/KYCNotRequired/KYCNotRequired.js +0 -1
  226. package/dist/components/Messages/Message.d.ts +0 -1
  227. package/dist/components/Messages/Message.js +0 -35
  228. package/dist/components/Messages/MessageContext.d.ts +0 -6
  229. package/dist/components/Messages/MessageContext.js +0 -2
  230. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  231. package/dist/components/Messages/MessagePopup.js +0 -20
  232. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  233. package/dist/components/Messages/MessageTrigger.js +0 -19
  234. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
  235. package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
  236. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
  237. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
  238. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  239. package/dist/components/Quests/CountdownTimer.js +0 -33
  240. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  241. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  242. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  243. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  244. package/dist/components/Quests/MultiWageringQuest.d.ts +0 -1
  245. package/dist/components/Quests/MultiWageringQuest.js +0 -111
  246. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  247. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  248. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  249. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  250. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  251. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  252. package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
  253. package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
  254. package/dist/components/SessionWatcher/index.d.ts +0 -1
  255. package/dist/components/SessionWatcher/index.js +0 -1
  256. package/dist/components/SignIn/utils.d.ts +0 -8
  257. package/dist/components/SignIn/utils.js +0 -26
  258. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  259. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  260. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  261. package/dist/components/SignUp/SignUpContext.js +0 -2
  262. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  263. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  264. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  265. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  266. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  267. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  268. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  269. package/dist/components/SignUp/SignUpForm.js +0 -284
  270. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  271. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  272. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  273. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  274. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  275. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  276. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  277. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  278. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  279. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  280. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  281. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  282. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  283. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  284. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  285. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  286. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  287. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  288. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  289. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  290. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  291. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  292. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  293. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  294. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  295. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  296. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  297. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  298. package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
  299. package/dist/components/shared/IdDocumentField.client.js +0 -204
  300. package/dist/components/shared/IdDocumentField.d.ts +0 -2
  301. package/dist/components/shared/IdDocumentField.js +0 -11
  302. package/dist/components/shared/SelfieField.client.d.ts +0 -20
  303. package/dist/components/shared/SelfieField.client.js +0 -327
  304. package/dist/components/shared/SelfieField.d.ts +0 -2
  305. package/dist/components/shared/SelfieField.js +0 -11
  306. package/dist/constants/BranchCode.d.ts +0 -4
  307. package/dist/constants/BranchCode.js +0 -42
  308. package/dist/constants/Branches.d.ts +0 -2
  309. package/dist/constants/Branches.js +0 -42
  310. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  311. package/dist/handlers/postTransformIdFrontImage.js +0 -67
  312. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  313. package/dist/handlers/postTransformSelfieImage.js +0 -71
  314. package/dist/handlers.d.ts +0 -43
  315. package/dist/handlers.js +0 -297
  316. package/dist/icons/BellRingIcon.d.ts +0 -2
  317. package/dist/icons/BellRingIcon.js +0 -4
  318. package/dist/images/game-providers/ALPHACHINKO.png +0 -0
  319. package/dist/images/responsible-gaming-yellow.png +0 -0
  320. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  321. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  322. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  323. package/dist/third-parties/FacebookPixel/api.js +0 -1
  324. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  325. package/dist/third-parties/FacebookPixel/index.js +0 -1
  326. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  327. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  328. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  329. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  330. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  331. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  332. package/dist/third-parties/index.d.ts +0 -2
  333. package/dist/third-parties/index.js +0 -2
  334. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  335. package/dist/utils/dataUrlToBlob.js +0 -11
  336. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  337. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  338. package/dist/utils/getGameName.d.ts +0 -1
  339. package/dist/utils/getGameName.js +0 -6
  340. package/dist/utils/getLocaleInfo.d.ts +0 -79
  341. package/dist/utils/getLocaleInfo.js +0 -175
  342. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  343. package/dist/utils/isBetween3amAnd3pm.js +0 -5
  344. package/dist/utils/resizeImageSize.d.ts +0 -2
  345. package/dist/utils/resizeImageSize.js +0 -11
@@ -1,173 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { zodResolver } from '@hookform/resolvers/zod';
3
- import Link from 'next/link';
4
- import { useEffect, useState } from 'react';
5
- import { Controller, useForm } from 'react-hook-form';
6
- import invariant from 'tiny-invariant';
7
- import { z } from 'zod';
8
- import { useShallow } from 'zustand/shallow';
9
- import { useCreateAiOGCashDepositMutation } from '../../../../client/hooks/useAiOGCashDepositMutation.js';
10
- import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
11
- import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
12
- import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
13
- import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
14
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
15
- import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
16
- import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
17
- import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
18
- import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
19
- import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
20
- import { XIcon } from '../../../../icons/XIcon.js';
21
- import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
22
- import { Button } from '../../../../ui/Button/index.js';
23
- import { Field } from '../../../../ui/Field/index.js';
24
- import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
- import { Portal } from '../../../../ui/Portal/index.js';
26
- import { getQueryClient } from '../../../../utils/getQueryClient.js';
27
- import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
- import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
29
- import { AmountChoices } from '../../AmountChoices.js';
30
- import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
- import { explainError } from '../../utils.js';
32
- import { AvailablePromos } from '../AvailablePromos.js';
33
- export function AiOGCashDeposit() {
34
- const depositWithdrawalProps = useDepositWithdrawalPropsContext();
35
- const disclosure = useDisclosure();
36
- const globalStore = useGlobalStore(useShallow((ctx) => ({
37
- depositWithdrawal: ctx.depositWithdrawal,
38
- kycVerificationStatus: ctx.kycVerificationStatus,
39
- })));
40
- const verificationQuery = useMemberVerificationQuery();
41
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
42
- const [status, setStatus] = useState('waiting');
43
- const createDepositMutation = useCreateAiOGCashDepositMutation({
44
- onMutate() {
45
- disclosure.setOpen(true);
46
- setStatus('processing');
47
- },
48
- onSuccess(data) {
49
- const queryClient = getQueryClient();
50
- invariant(data.checkoutUrl);
51
- window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
52
- queryClient.invalidateQueries({
53
- queryKey: getDepositsCountQueryKey(),
54
- });
55
- setStatus('success');
56
- },
57
- onError() {
58
- setStatus('failed');
59
- },
60
- });
61
- const depositsCountQuery = useDepositsCountQuery();
62
- const depositsCount = depositsCountQuery.data ?? 0;
63
- const paymentSettingsQuery = usePaymentSettingsQuery();
64
- const paymentSettings = paymentSettingsQuery.data;
65
- const gatewaySettings = paymentSettings?.aioGCashDepositGatewaySettings;
66
- const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
67
- const minimumAmount = depositsCount <= 0
68
- ? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
69
- : parseDecimal(gatewaySettings?.minimumAmount, 0);
70
- const promosQuery = useAvailablePromosQuery();
71
- const promos = promosQuery.data ?? [];
72
- const definition = z
73
- .object({
74
- amount: z.string().superRefine((val, ctx) => {
75
- const n = parseDecimal(val, 0);
76
- if (n < minimumAmount) {
77
- ctx.addIssue({
78
- type: 'number',
79
- code: z.ZodIssueCode.too_small,
80
- inclusive: true,
81
- minimum: minimumAmount,
82
- message: `Please enter ${minimumAmount.toLocaleString()} or more to proceed with your deposit.`,
83
- });
84
- }
85
- if (n > maximumAmount) {
86
- ctx.addIssue({
87
- type: 'number',
88
- code: z.ZodIssueCode.too_big,
89
- inclusive: true,
90
- maximum: maximumAmount,
91
- message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
92
- });
93
- }
94
- }),
95
- promo: z.string().optional().nullable(),
96
- })
97
- .superRefine((value, ctx) => {
98
- const promo = promos.find((o) => o.id === value.promo);
99
- const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
100
- const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
101
- const amount = parseDecimal(value.amount, 0);
102
- if (promo && amount < promoMinAmount) {
103
- ctx.addIssue({
104
- path: ['amount'],
105
- code: z.ZodIssueCode.custom,
106
- message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
107
- });
108
- }
109
- if (promo && amount > promoMaxAmount) {
110
- ctx.addIssue({
111
- path: ['amount'],
112
- code: z.ZodIssueCode.custom,
113
- message: `Maximum amount for this promo is ${promoMaxAmount}`,
114
- });
115
- }
116
- });
117
- const form = useForm({
118
- mode: 'all',
119
- resolver: zodResolver(definition),
120
- defaultValues: {
121
- amount: '0',
122
- promo: globalStore.depositWithdrawal.promo ?? null,
123
- },
124
- });
125
- useEffect(() => {
126
- if (minimumAmount) {
127
- form.reset({
128
- amount: minimumAmount.toString(),
129
- promo: form.getValues('promo') ?? null,
130
- });
131
- }
132
- }, [form, minimumAmount]);
133
- return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
134
- if (verificationStatus === 'PENDING' ||
135
- verificationStatus === 'UNVERIFIED' ||
136
- verificationStatus === 'REJECTED' ||
137
- verificationStatus === 'CREATED') {
138
- globalStore.kycVerificationStatus.setOpen(true);
139
- return;
140
- }
141
- else {
142
- createDepositMutation.reset();
143
- createDepositMutation.mutate({
144
- amount: data.amount.toString(),
145
- promo: data.promo ?? undefined,
146
- redirectUrl: window.location.origin.includes('localhost')
147
- ? 'https://uat.powerplay.ph'
148
- : window.location.origin,
149
- });
150
- }
151
- }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
152
- o.field.onChange(details.value);
153
- }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
154
- form.setValue('amount', value.toString(), {
155
- shouldTouch: true,
156
- shouldDirty: true,
157
- shouldValidate: true,
158
- });
159
- }, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: (value) => {
160
- o.field.onChange(value);
161
- globalStore.depositWithdrawal.setPromo(null);
162
- }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
163
- disclosure.setOpen(details.open);
164
- if (!details.open) {
165
- setStatus('waiting');
166
- form.reset();
167
- }
168
- }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
169
- "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
170
- explainError(createDepositMutation?.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
171
- api.setOpen(false);
172
- }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
173
- }
@@ -1 +0,0 @@
1
- export declare function AiOGrabPayDeposit(): import("react/jsx-runtime").JSX.Element;
@@ -1,171 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { zodResolver } from '@hookform/resolvers/zod';
3
- import Link from 'next/link';
4
- import { useEffect, useState } from 'react';
5
- import { Controller, useForm } from 'react-hook-form';
6
- import invariant from 'tiny-invariant';
7
- import { z } from 'zod';
8
- import { useShallow } from 'zustand/shallow';
9
- import { useCreateAiOGrabPayDepositMutation } from '../../../../client/hooks/useAiOGrabPayDepositMutation.js';
10
- import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
11
- import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
12
- import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
13
- import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
14
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
15
- import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
16
- import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
17
- import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
18
- import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
19
- import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
20
- import { XIcon } from '../../../../icons/XIcon.js';
21
- import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
22
- import { Button } from '../../../../ui/Button/index.js';
23
- import { Field } from '../../../../ui/Field/index.js';
24
- import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
- import { Portal } from '../../../../ui/Portal/index.js';
26
- import { getQueryClient } from '../../../../utils/getQueryClient.js';
27
- import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
- import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
29
- import { AmountChoices } from '../../AmountChoices.js';
30
- import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
- import { explainError } from '../../utils.js';
32
- import { AvailablePromos } from '../AvailablePromos.js';
33
- export function AiOGrabPayDeposit() {
34
- const depositWithdrawalProps = useDepositWithdrawalPropsContext();
35
- const disclosure = useDisclosure();
36
- const globalStore = useGlobalStore(useShallow((ctx) => ({
37
- depositWithdrawal: ctx.depositWithdrawal,
38
- kycVerificationStatus: ctx.kycVerificationStatus,
39
- })));
40
- const verificationQuery = useMemberVerificationQuery();
41
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
42
- const [status, setStatus] = useState('waiting');
43
- const createDepositMutation = useCreateAiOGrabPayDepositMutation({
44
- onMutate() {
45
- disclosure.setOpen(true);
46
- setStatus('processing');
47
- },
48
- onSuccess(data) {
49
- const queryClient = getQueryClient();
50
- invariant(data.checkoutUrl);
51
- window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
52
- queryClient.invalidateQueries({ queryKey: getDepositsCountQueryKey() });
53
- setStatus('success');
54
- },
55
- onError() {
56
- setStatus('failed');
57
- },
58
- });
59
- const depositsCountQuery = useDepositsCountQuery();
60
- const depositsCount = depositsCountQuery.data ?? 0;
61
- const paymentSettingsQuery = usePaymentSettingsQuery();
62
- const paymentSettings = paymentSettingsQuery.data;
63
- const gatewaySettings = paymentSettings?.aioGrabPayDepositGatewaySettings;
64
- const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
65
- const minimumAmount = depositsCount <= 0
66
- ? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
67
- : parseDecimal(gatewaySettings?.minimumAmount, 0);
68
- const promosQuery = useAvailablePromosQuery();
69
- const promos = promosQuery.data ?? [];
70
- const definition = z
71
- .object({
72
- amount: z.string().superRefine((val, ctx) => {
73
- const n = parseDecimal(val, 0);
74
- if (n < minimumAmount) {
75
- ctx.addIssue({
76
- type: 'number',
77
- code: z.ZodIssueCode.too_small,
78
- inclusive: true,
79
- minimum: minimumAmount,
80
- message: `Please enter ${minimumAmount.toLocaleString()} or more to proceed with your deposit.`,
81
- });
82
- }
83
- if (n > maximumAmount) {
84
- ctx.addIssue({
85
- type: 'number',
86
- code: z.ZodIssueCode.too_big,
87
- inclusive: true,
88
- maximum: maximumAmount,
89
- message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
90
- });
91
- }
92
- }),
93
- promo: z.string().optional().nullable(),
94
- })
95
- .superRefine((value, ctx) => {
96
- const promo = promos.find((o) => o.id === value.promo);
97
- const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
98
- const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
99
- const amount = parseDecimal(value.amount, 0);
100
- if (promo && amount < promoMinAmount) {
101
- ctx.addIssue({
102
- path: ['amount'],
103
- code: z.ZodIssueCode.custom,
104
- message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
105
- });
106
- }
107
- if (promo && amount > promoMaxAmount) {
108
- ctx.addIssue({
109
- path: ['amount'],
110
- code: z.ZodIssueCode.custom,
111
- message: `Maximum amount for this promo is ${promoMaxAmount}`,
112
- });
113
- }
114
- });
115
- const form = useForm({
116
- mode: 'all',
117
- resolver: zodResolver(definition),
118
- defaultValues: {
119
- amount: '0',
120
- promo: globalStore.depositWithdrawal.promo ?? null,
121
- },
122
- });
123
- useEffect(() => {
124
- if (minimumAmount) {
125
- form.reset({
126
- amount: minimumAmount.toString(),
127
- promo: form.getValues('promo') ?? null,
128
- });
129
- }
130
- }, [form, minimumAmount]);
131
- return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
132
- if (verificationStatus === 'PENDING' ||
133
- verificationStatus === 'UNVERIFIED' ||
134
- verificationStatus === 'REJECTED' ||
135
- verificationStatus === 'CREATED') {
136
- globalStore.kycVerificationStatus.setOpen(true);
137
- return;
138
- }
139
- else {
140
- createDepositMutation.reset();
141
- createDepositMutation.mutate({
142
- amount: data.amount.toString(),
143
- promo: data.promo ?? undefined,
144
- redirectUrl: window.location.origin.includes('localhost')
145
- ? 'https://uat.powerplay.ph'
146
- : window.location.origin,
147
- });
148
- }
149
- }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
150
- o.field.onChange(details.value);
151
- }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
152
- form.setValue('amount', value.toString(), {
153
- shouldTouch: true,
154
- shouldDirty: true,
155
- shouldValidate: true,
156
- });
157
- }, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: (value) => {
158
- o.field.onChange(value);
159
- globalStore.depositWithdrawal.setPromo(null);
160
- }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
161
- disclosure.setOpen(details.open);
162
- if (!details.open) {
163
- setStatus('waiting');
164
- form.reset();
165
- }
166
- }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
167
- "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
168
- explainError(createDepositMutation?.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
169
- api.setOpen(false);
170
- }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
171
- }
@@ -1 +0,0 @@
1
- export declare function AiOPalawanPayDeposit(): import("react/jsx-runtime").JSX.Element;
@@ -1,171 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { zodResolver } from '@hookform/resolvers/zod';
3
- import Link from 'next/link';
4
- import { useEffect, useState } from 'react';
5
- import { Controller, useForm } from 'react-hook-form';
6
- import invariant from 'tiny-invariant';
7
- import { z } from 'zod';
8
- import { useShallow } from 'zustand/shallow';
9
- import { useCreateAiOPalawanPayDepositMutation } from '../../../../client/hooks/useAiOPalawanPayDepositMutation.js';
10
- import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
11
- import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
12
- import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
13
- import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
14
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
15
- import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
16
- import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
17
- import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
18
- import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
19
- import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
20
- import { XIcon } from '../../../../icons/XIcon.js';
21
- import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
22
- import { Button } from '../../../../ui/Button/index.js';
23
- import { Field } from '../../../../ui/Field/index.js';
24
- import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
- import { Portal } from '../../../../ui/Portal/index.js';
26
- import { getQueryClient } from '../../../../utils/getQueryClient.js';
27
- import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
- import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
29
- import { AmountChoices } from '../../AmountChoices.js';
30
- import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
- import { explainError } from '../../utils.js';
32
- import { AvailablePromos } from '../AvailablePromos.js';
33
- export function AiOPalawanPayDeposit() {
34
- const depositWithdrawalProps = useDepositWithdrawalPropsContext();
35
- const disclosure = useDisclosure();
36
- const globalStore = useGlobalStore(useShallow((ctx) => ({
37
- depositWithdrawal: ctx.depositWithdrawal,
38
- kycVerificationStatus: ctx.kycVerificationStatus,
39
- })));
40
- const verificationQuery = useMemberVerificationQuery();
41
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
42
- const [status, setStatus] = useState('waiting');
43
- const createDepositMutation = useCreateAiOPalawanPayDepositMutation({
44
- onMutate() {
45
- disclosure.setOpen(true);
46
- setStatus('processing');
47
- },
48
- onSuccess(data) {
49
- const queryClient = getQueryClient();
50
- invariant(data.checkoutUrl);
51
- window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
52
- queryClient.invalidateQueries({ queryKey: getDepositsCountQueryKey() });
53
- setStatus('success');
54
- },
55
- onError() {
56
- setStatus('failed');
57
- },
58
- });
59
- const depositsCountQuery = useDepositsCountQuery();
60
- const depositsCount = depositsCountQuery.data ?? 0;
61
- const paymentSettingsQuery = usePaymentSettingsQuery();
62
- const paymentSettings = paymentSettingsQuery.data;
63
- const gatewaySettings = paymentSettings?.aioPalawanPayDepositGatewaySettings;
64
- const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
65
- const minimumAmount = depositsCount <= 0
66
- ? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
67
- : parseDecimal(gatewaySettings?.minimumAmount, 0);
68
- const promosQuery = useAvailablePromosQuery();
69
- const promos = promosQuery.data ?? [];
70
- const definition = z
71
- .object({
72
- amount: z.string().superRefine((val, ctx) => {
73
- const n = parseDecimal(val, 0);
74
- if (n < minimumAmount) {
75
- ctx.addIssue({
76
- type: 'number',
77
- code: z.ZodIssueCode.too_small,
78
- inclusive: true,
79
- minimum: minimumAmount,
80
- message: `Please enter ${minimumAmount.toLocaleString()} or more to proceed with your deposit.`,
81
- });
82
- }
83
- if (n > maximumAmount) {
84
- ctx.addIssue({
85
- type: 'number',
86
- code: z.ZodIssueCode.too_big,
87
- inclusive: true,
88
- maximum: maximumAmount,
89
- message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
90
- });
91
- }
92
- }),
93
- promo: z.string().optional().nullable(),
94
- })
95
- .superRefine((value, ctx) => {
96
- const promo = promos.find((o) => o.id === value.promo);
97
- const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
98
- const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
99
- const amount = parseDecimal(value.amount, 0);
100
- if (promo && amount < promoMinAmount) {
101
- ctx.addIssue({
102
- path: ['amount'],
103
- code: z.ZodIssueCode.custom,
104
- message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
105
- });
106
- }
107
- if (promo && amount > promoMaxAmount) {
108
- ctx.addIssue({
109
- path: ['amount'],
110
- code: z.ZodIssueCode.custom,
111
- message: `Maximum amount for this promo is ${promoMaxAmount}`,
112
- });
113
- }
114
- });
115
- const form = useForm({
116
- mode: 'all',
117
- resolver: zodResolver(definition),
118
- defaultValues: {
119
- amount: '0',
120
- promo: globalStore.depositWithdrawal.promo ?? null,
121
- },
122
- });
123
- useEffect(() => {
124
- if (minimumAmount) {
125
- form.reset({
126
- amount: minimumAmount.toString(),
127
- promo: form.getValues('promo') ?? null,
128
- });
129
- }
130
- }, [form, minimumAmount]);
131
- return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
132
- if (verificationStatus === 'PENDING' ||
133
- verificationStatus === 'UNVERIFIED' ||
134
- verificationStatus === 'REJECTED' ||
135
- verificationStatus === 'CREATED') {
136
- globalStore.kycVerificationStatus.setOpen(true);
137
- return;
138
- }
139
- else {
140
- createDepositMutation.reset();
141
- createDepositMutation.mutate({
142
- amount: data.amount.toString(),
143
- promo: data.promo ?? undefined,
144
- redirectUrl: window.location.origin.includes('localhost')
145
- ? 'https://uat.powerplay.ph'
146
- : window.location.origin,
147
- });
148
- }
149
- }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
150
- o.field.onChange(details.value);
151
- }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
152
- form.setValue('amount', value.toString(), {
153
- shouldTouch: true,
154
- shouldDirty: true,
155
- shouldValidate: true,
156
- });
157
- }, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: (value) => {
158
- o.field.onChange(value);
159
- globalStore.depositWithdrawal.setPromo(null);
160
- }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
161
- disclosure.setOpen(details.open);
162
- if (!details.open) {
163
- setStatus('waiting');
164
- form.reset();
165
- }
166
- }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
167
- "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
168
- explainError(createDepositMutation?.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
169
- api.setOpen(false);
170
- }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
171
- }
@@ -1 +0,0 @@
1
- export declare function AiOPayMayaDeposit(): import("react/jsx-runtime").JSX.Element;