@opexa/portal-components 0.0.64 → 0.0.65

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 (353) hide show
  1. package/dist/components/Bonuses/Bonuses.client.js +4 -4
  2. package/dist/components/Bonuses/BonusesTrigger.d.ts +5 -0
  3. package/dist/components/Bonuses/BonusesTrigger.js +19 -0
  4. package/dist/components/Bonuses/index.d.ts +1 -0
  5. package/dist/components/Bonuses/index.js +2 -1
  6. package/package.json +1 -1
  7. package/dist/components/Account/Account.d.ts +0 -23
  8. package/dist/components/Account/Account.js +0 -107
  9. package/dist/components/Account/AccountTrigger.d.ts +0 -6
  10. package/dist/components/Account/AccountTrigger.js +0 -13
  11. package/dist/components/Account/account.recipe.d.ts +0 -61
  12. package/dist/components/Account/account.recipe.js +0 -32
  13. package/dist/components/Account/index.d.ts +0 -2
  14. package/dist/components/Account/index.js +0 -2
  15. package/dist/components/AccountInfo/AccountInfo.d.ts +0 -4
  16. package/dist/components/AccountInfo/AccountInfo.js +0 -143
  17. package/dist/components/AccountInfo/index.d.ts +0 -1
  18. package/dist/components/AccountInfo/index.js +0 -1
  19. package/dist/components/AccountSecurity/AccountSecurity.d.ts +0 -4
  20. package/dist/components/AccountSecurity/AccountSecurity.js +0 -171
  21. package/dist/components/AccountSecurity/index.d.ts +0 -1
  22. package/dist/components/AccountSecurity/index.js +0 -1
  23. package/dist/components/AccountVerification/AccountVerification.d.ts +0 -4
  24. package/dist/components/AccountVerification/AccountVerification.js +0 -37
  25. package/dist/components/AccountVerification/index.d.ts +0 -1
  26. package/dist/components/AccountVerification/index.js +0 -1
  27. package/dist/components/Banner/Banner.d.ts +0 -11
  28. package/dist/components/Banner/Banner.js +0 -38
  29. package/dist/components/Banner/index.d.ts +0 -1
  30. package/dist/components/Banner/index.js +0 -1
  31. package/dist/components/BetRecords/BetRecords.d.ts +0 -7
  32. package/dist/components/BetRecords/BetRecords.js +0 -181
  33. package/dist/components/BetRecords/index.d.ts +0 -1
  34. package/dist/components/BetRecords/index.js +0 -1
  35. package/dist/components/Bonus/Bonus.client.d.ts +0 -2
  36. package/dist/components/Bonus/Bonus.client.js +0 -9
  37. package/dist/components/Bonus/Bonus.d.ts +0 -10
  38. package/dist/components/Bonus/Bonus.js +0 -5
  39. package/dist/components/Bonus/index.d.ts +0 -1
  40. package/dist/components/Bonus/index.js +0 -1
  41. package/dist/components/Bonuses/Bonuses.d.ts +0 -15
  42. package/dist/components/Bonuses/Bonuses.js +0 -7
  43. package/dist/components/Cashback/Cashback.client.d.ts +0 -2
  44. package/dist/components/Cashback/Cashback.client.js +0 -27
  45. package/dist/components/Cashback/Cashback.d.ts +0 -7
  46. package/dist/components/Cashback/Cashback.js +0 -15
  47. package/dist/components/Cashback/index.d.ts +0 -1
  48. package/dist/components/Cashback/index.js +0 -1
  49. package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +0 -2
  50. package/dist/components/CashbackBonus/CashbackBonus.client.js +0 -9
  51. package/dist/components/CashbackBonus/CashbackBonus.d.ts +0 -10
  52. package/dist/components/CashbackBonus/CashbackBonus.js +0 -5
  53. package/dist/components/CashbackBonus/index.d.ts +0 -1
  54. package/dist/components/CashbackBonus/index.js +0 -1
  55. package/dist/components/DepositWithdrawal/AmountChoices.d.ts +0 -11
  56. package/dist/components/DepositWithdrawal/AmountChoices.js +0 -25
  57. package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.d.ts +0 -8
  58. package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +0 -31
  59. package/dist/components/DepositWithdrawal/Deposit/Deposit.d.ts +0 -1
  60. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +0 -75
  61. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.d.ts +0 -1
  62. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +0 -129
  63. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.d.ts +0 -1
  64. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +0 -126
  65. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.d.ts +0 -1
  66. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +0 -129
  67. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.d.ts +0 -1
  68. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.js +0 -10
  69. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +0 -1
  70. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.js +0 -96
  71. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +0 -21
  72. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js +0 -2
  73. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +0 -1
  74. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +0 -16
  75. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.d.ts +0 -1
  76. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +0 -102
  77. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +0 -13
  78. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +0 -60
  79. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.d.ts +0 -1
  80. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.js +0 -10
  81. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
  82. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +0 -96
  83. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +0 -21
  84. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.js +0 -2
  85. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
  86. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +0 -16
  87. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
  88. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +0 -101
  89. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +0 -13
  90. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +0 -60
  91. package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +0 -6
  92. package/dist/components/DepositWithdrawal/DepositWithdrawal.js +0 -39
  93. package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +0 -5
  94. package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +0 -21
  95. package/dist/components/DepositWithdrawal/PaymentMethods.d.ts +0 -10
  96. package/dist/components/DepositWithdrawal/PaymentMethods.js +0 -60
  97. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.d.ts +0 -1
  98. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +0 -109
  99. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.d.ts +0 -1
  100. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +0 -131
  101. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.d.ts +0 -1
  102. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +0 -101
  103. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.d.ts +0 -1
  104. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +0 -109
  105. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.d.ts +0 -1
  106. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +0 -91
  107. package/dist/components/DepositWithdrawal/index.d.ts +0 -1
  108. package/dist/components/DepositWithdrawal/index.js +0 -1
  109. package/dist/components/DepositWithdrawal/utils.d.ts +0 -3
  110. package/dist/components/DepositWithdrawal/utils.js +0 -9
  111. package/dist/components/Disclaimer/Disclaimer.d.ts +0 -5
  112. package/dist/components/Disclaimer/Disclaimer.js +0 -14
  113. package/dist/components/Disclaimer/index.d.ts +0 -1
  114. package/dist/components/Disclaimer/index.js +0 -1
  115. package/dist/components/Disclaimer/useDisclaimer.d.ts +0 -4
  116. package/dist/components/Disclaimer/useDisclaimer.js +0 -37
  117. package/dist/components/Empty.d.ts +0 -10
  118. package/dist/components/Empty.js +0 -7
  119. package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +0 -2
  120. package/dist/components/FavoriteGames/FavoriteGames.client.js +0 -31
  121. package/dist/components/FavoriteGames/FavoriteGames.d.ts +0 -6
  122. package/dist/components/FavoriteGames/FavoriteGames.js +0 -7
  123. package/dist/components/FavoriteGames/index.d.ts +0 -1
  124. package/dist/components/FavoriteGames/index.js +0 -1
  125. package/dist/components/GameLaunch/GameLaunch.d.ts +0 -1
  126. package/dist/components/GameLaunch/GameLaunch.js +0 -75
  127. package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +0 -7
  128. package/dist/components/GameLaunch/GameLaunchTrigger.js +0 -57
  129. package/dist/components/GameLaunch/index.d.ts +0 -2
  130. package/dist/components/GameLaunch/index.js +0 -2
  131. package/dist/components/GameProviders/GameProviders.d.ts +0 -11
  132. package/dist/components/GameProviders/GameProviders.js +0 -32
  133. package/dist/components/GameProviders/index.d.ts +0 -1
  134. package/dist/components/GameProviders/index.js +0 -1
  135. package/dist/components/Games/BadgeNew.d.ts +0 -2
  136. package/dist/components/Games/BadgeNew.js +0 -4
  137. package/dist/components/Games/BadgePopular.d.ts +0 -2
  138. package/dist/components/Games/BadgePopular.js +0 -4
  139. package/dist/components/Games/BadgeTop.d.ts +0 -2
  140. package/dist/components/Games/BadgeTop.js +0 -4
  141. package/dist/components/Games/Game.d.ts +0 -4
  142. package/dist/components/Games/Game.js +0 -37
  143. package/dist/components/Games/GameContext.d.ts +0 -2
  144. package/dist/components/Games/GameContext.js +0 -2
  145. package/dist/components/Games/Games.d.ts +0 -8
  146. package/dist/components/Games/Games.js +0 -6
  147. package/dist/components/Games/GamesCarousel.client.d.ts +0 -2
  148. package/dist/components/Games/GamesCarousel.client.js +0 -58
  149. package/dist/components/Games/GamesCarousel.d.ts +0 -16
  150. package/dist/components/Games/GamesCarousel.js +0 -11
  151. package/dist/components/Games/GamesList.client.d.ts +0 -2
  152. package/dist/components/Games/GamesList.client.js +0 -14
  153. package/dist/components/Games/GamesList.d.ts +0 -11
  154. package/dist/components/Games/GamesList.js +0 -10
  155. package/dist/components/Games/index.d.ts +0 -1
  156. package/dist/components/Games/index.js +0 -1
  157. package/dist/components/GamesSearch/GamesSearch.d.ts +0 -8
  158. package/dist/components/GamesSearch/GamesSearch.js +0 -45
  159. package/dist/components/GamesSearch/index.d.ts +0 -1
  160. package/dist/components/GamesSearch/index.js +0 -1
  161. package/dist/components/InfiniteScroll.d.ts +0 -10
  162. package/dist/components/InfiniteScroll.js +0 -25
  163. package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
  164. package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -57
  165. package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -8
  166. package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
  167. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -8
  168. package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -103
  169. package/dist/components/JackpotCounter/index.d.ts +0 -1
  170. package/dist/components/JackpotCounter/index.js +0 -1
  171. package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
  172. package/dist/components/Jackpots/JackpotGameProviders.js +0 -38
  173. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +0 -9
  174. package/dist/components/Jackpots/JackpotItemDesktop.js +0 -43
  175. package/dist/components/Jackpots/JackpotItemMobile.d.ts +0 -9
  176. package/dist/components/Jackpots/JackpotItemMobile.js +0 -44
  177. package/dist/components/Jackpots/JackpotRules.d.ts +0 -6
  178. package/dist/components/Jackpots/JackpotRules.js +0 -9
  179. package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
  180. package/dist/components/Jackpots/Jackpots.client.js +0 -28
  181. package/dist/components/Jackpots/Jackpots.d.ts +0 -10
  182. package/dist/components/Jackpots/Jackpots.js +0 -21
  183. package/dist/components/Jackpots/index.d.ts +0 -1
  184. package/dist/components/Jackpots/index.js +0 -1
  185. package/dist/components/Jackpots/useJackpotItemData.d.ts +0 -20
  186. package/dist/components/Jackpots/useJackpotItemData.js +0 -87
  187. package/dist/components/KYC/Header.d.ts +0 -1
  188. package/dist/components/KYC/Header.js +0 -6
  189. package/dist/components/KYC/Indicator.d.ts +0 -1
  190. package/dist/components/KYC/Indicator.js +0 -9
  191. package/dist/components/KYC/KYC.d.ts +0 -1
  192. package/dist/components/KYC/KYC.js +0 -26
  193. package/dist/components/KYC/KYCContext.d.ts +0 -2
  194. package/dist/components/KYC/KYCContext.js +0 -2
  195. package/dist/components/KYC/KYCTrigger.d.ts +0 -5
  196. package/dist/components/KYC/KYCTrigger.js +0 -14
  197. package/dist/components/KYC/Step1.d.ts +0 -1
  198. package/dist/components/KYC/Step1.js +0 -12
  199. package/dist/components/KYC/Step2.d.ts +0 -1
  200. package/dist/components/KYC/Step2.js +0 -12
  201. package/dist/components/KYC/Step3.d.ts +0 -1
  202. package/dist/components/KYC/Step3.js +0 -11
  203. package/dist/components/KYC/Step4.d.ts +0 -1
  204. package/dist/components/KYC/Step4.js +0 -6
  205. package/dist/components/KYC/index.d.ts +0 -2
  206. package/dist/components/KYC/index.js +0 -2
  207. package/dist/components/KYC/useKYC.d.ts +0 -10
  208. package/dist/components/KYC/useKYC.js +0 -8
  209. package/dist/components/Marquee/Marquee.d.ts +0 -5
  210. package/dist/components/Marquee/Marquee.js +0 -5
  211. package/dist/components/Marquee/index.d.ts +0 -1
  212. package/dist/components/Marquee/index.js +0 -1
  213. package/dist/components/Messages/MessageItem.d.ts +0 -4
  214. package/dist/components/Messages/MessageItem.js +0 -34
  215. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  216. package/dist/components/Messages/MessagePopup.js +0 -20
  217. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  218. package/dist/components/Messages/MessageTrigger.js +0 -18
  219. package/dist/components/Messages/Messages.d.ts +0 -14
  220. package/dist/components/Messages/Messages.js +0 -38
  221. package/dist/components/Messages/MessagesTrigger.d.ts +0 -6
  222. package/dist/components/Messages/MessagesTrigger.js +0 -14
  223. package/dist/components/Messages/index.d.ts +0 -4
  224. package/dist/components/Messages/index.js +0 -4
  225. package/dist/components/Messages/utils.d.ts +0 -3
  226. package/dist/components/Messages/utils.js +0 -27
  227. package/dist/components/PortalProvider/PortalProvider.d.ts +0 -9
  228. package/dist/components/PortalProvider/PortalProvider.js +0 -18
  229. package/dist/components/PortalProvider/Providers.d.ts +0 -4
  230. package/dist/components/PortalProvider/Providers.js +0 -12
  231. package/dist/components/PortalProvider/Snackbar.d.ts +0 -1
  232. package/dist/components/PortalProvider/Snackbar.js +0 -21
  233. package/dist/components/PortalProvider/WebVitals.d.ts +0 -1
  234. package/dist/components/PortalProvider/WebVitals.js +0 -8
  235. package/dist/components/PortalProvider/index.d.ts +0 -1
  236. package/dist/components/PortalProvider/index.js +0 -1
  237. package/dist/components/Promo/Promo.client.d.ts +0 -2
  238. package/dist/components/Promo/Promo.client.js +0 -27
  239. package/dist/components/Promo/Promo.d.ts +0 -7
  240. package/dist/components/Promo/Promo.js +0 -15
  241. package/dist/components/Promo/index.d.ts +0 -1
  242. package/dist/components/Promo/index.js +0 -1
  243. package/dist/components/Promos/Cashback.d.ts +0 -7
  244. package/dist/components/Promos/Cashback.js +0 -17
  245. package/dist/components/Promos/Promo.d.ts +0 -7
  246. package/dist/components/Promos/Promo.js +0 -17
  247. package/dist/components/Promos/Promos.d.ts +0 -15
  248. package/dist/components/Promos/Promos.js +0 -13
  249. package/dist/components/Promos/PromosCarousel.d.ts +0 -2
  250. package/dist/components/Promos/PromosCarousel.js +0 -45
  251. package/dist/components/Promos/PromosGrid.d.ts +0 -2
  252. package/dist/components/Promos/PromosGrid.js +0 -16
  253. package/dist/components/Promos/index.d.ts +0 -1
  254. package/dist/components/Promos/index.js +0 -1
  255. package/dist/components/Protected/Protected.d.ts +0 -6
  256. package/dist/components/Protected/Protected.js +0 -8
  257. package/dist/components/Protected/index.d.ts +0 -1
  258. package/dist/components/Protected/index.js +0 -1
  259. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  260. package/dist/components/Quests/CountdownTimer.js +0 -33
  261. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  262. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -73
  263. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  264. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -8
  265. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  266. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  267. package/dist/components/Quests/Quests.client.d.ts +0 -2
  268. package/dist/components/Quests/Quests.client.js +0 -27
  269. package/dist/components/Quests/Quests.d.ts +0 -6
  270. package/dist/components/Quests/Quests.js +0 -7
  271. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  272. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -19
  273. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  274. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -8
  275. package/dist/components/Quests/index.d.ts +0 -1
  276. package/dist/components/Quests/index.js +0 -1
  277. package/dist/components/Search/Search.d.ts +0 -6
  278. package/dist/components/Search/Search.js +0 -38
  279. package/dist/components/Search/SearchTrigger.d.ts +0 -5
  280. package/dist/components/Search/SearchTrigger.js +0 -14
  281. package/dist/components/Search/index.d.ts +0 -2
  282. package/dist/components/Search/index.js +0 -2
  283. package/dist/components/SignIn/MobileNumberSignIn.d.ts +0 -1
  284. package/dist/components/SignIn/MobileNumberSignIn.js +0 -121
  285. package/dist/components/SignIn/NameAndPasswordSignIn.d.ts +0 -1
  286. package/dist/components/SignIn/NameAndPasswordSignIn.js +0 -116
  287. package/dist/components/SignIn/SignIn.d.ts +0 -7
  288. package/dist/components/SignIn/SignIn.js +0 -18
  289. package/dist/components/SignIn/SignInContext.d.ts +0 -2
  290. package/dist/components/SignIn/SignInContext.js +0 -2
  291. package/dist/components/SignIn/SignInForm.d.ts +0 -1
  292. package/dist/components/SignIn/SignInForm.js +0 -10
  293. package/dist/components/SignIn/SignInMethod.d.ts +0 -1
  294. package/dist/components/SignIn/SignInMethod.js +0 -19
  295. package/dist/components/SignIn/SignInTrigger.d.ts +0 -6
  296. package/dist/components/SignIn/SignInTrigger.js +0 -14
  297. package/dist/components/SignIn/index.d.ts +0 -2
  298. package/dist/components/SignIn/index.js +0 -2
  299. package/dist/components/SignIn/useSignIn.d.ts +0 -10
  300. package/dist/components/SignIn/useSignIn.js +0 -11
  301. package/dist/components/SignUp/SignUp.d.ts +0 -7
  302. package/dist/components/SignUp/SignUp.js +0 -16
  303. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  304. package/dist/components/SignUp/SignUpForm.js +0 -133
  305. package/dist/components/SignUp/SignUpTrigger.d.ts +0 -6
  306. package/dist/components/SignUp/SignUpTrigger.js +0 -14
  307. package/dist/components/SignUp/index.d.ts +0 -2
  308. package/dist/components/SignUp/index.js +0 -2
  309. package/dist/components/TopWins/TopWins.client.d.ts +0 -2
  310. package/dist/components/TopWins/TopWins.client.js +0 -23
  311. package/dist/components/TopWins/TopWins.d.ts +0 -6
  312. package/dist/components/TopWins/TopWins.js +0 -7
  313. package/dist/components/TopWins/index.d.ts +0 -1
  314. package/dist/components/TopWins/index.js +0 -1
  315. package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +0 -2
  316. package/dist/components/TournamentCounter/TournamentCounter.client.js +0 -50
  317. package/dist/components/TournamentCounter/TournamentCounter.d.ts +0 -8
  318. package/dist/components/TournamentCounter/TournamentCounter.js +0 -21
  319. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +0 -8
  320. package/dist/components/TournamentCounter/TournamentCounterItem.js +0 -106
  321. package/dist/components/TournamentCounter/index.d.ts +0 -1
  322. package/dist/components/TournamentCounter/index.js +0 -1
  323. package/dist/components/Tournaments/TournamentGameProviders.d.ts +0 -5
  324. package/dist/components/Tournaments/TournamentGameProviders.js +0 -38
  325. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +0 -7
  326. package/dist/components/Tournaments/TournamentItemDesktop.js +0 -56
  327. package/dist/components/Tournaments/TournamentItemMobile.d.ts +0 -7
  328. package/dist/components/Tournaments/TournamentItemMobile.js +0 -54
  329. package/dist/components/Tournaments/TournamentRules.d.ts +0 -6
  330. package/dist/components/Tournaments/TournamentRules.js +0 -9
  331. package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
  332. package/dist/components/Tournaments/Tournaments.client.js +0 -19
  333. package/dist/components/Tournaments/Tournaments.d.ts +0 -10
  334. package/dist/components/Tournaments/Tournaments.js +0 -14
  335. package/dist/components/Tournaments/index.d.ts +0 -1
  336. package/dist/components/Tournaments/index.js +0 -1
  337. package/dist/components/Tournaments/useTournamentItemData.d.ts +0 -16
  338. package/dist/components/Tournaments/useTournamentItemData.js +0 -64
  339. package/dist/components/TransactionRecords/DepositRecordsTable.d.ts +0 -1
  340. package/dist/components/TransactionRecords/DepositRecordsTable.js +0 -76
  341. package/dist/components/TransactionRecords/TableFilters.d.ts +0 -28
  342. package/dist/components/TransactionRecords/TableFilters.js +0 -212
  343. package/dist/components/TransactionRecords/TransactionRecords.d.ts +0 -7
  344. package/dist/components/TransactionRecords/TransactionRecords.js +0 -9
  345. package/dist/components/TransactionRecords/TransactionRecordsTable.d.ts +0 -1
  346. package/dist/components/TransactionRecords/TransactionRecordsTable.js +0 -51
  347. package/dist/components/TransactionRecords/WithdrawalRecordsTable.d.ts +0 -1
  348. package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +0 -70
  349. package/dist/components/TransactionRecords/index.d.ts +0 -1
  350. package/dist/components/TransactionRecords/index.js +0 -1
  351. package/dist/components/index.js +0 -34
  352. /package/dist/{components/Bonuses → images}/money-on-hand.png +0 -0
  353. /package/dist/{components/Bonuses → images}/piggy-bank.png +0 -0
@@ -1,129 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Portal } from '@ark-ui/react';
3
- import { zodResolver } from '@hookform/resolvers/zod';
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 { useAvailablePromosQuery, useCreateMayaDepositMutation, useDepositsCountQuery, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
9
- import { AlertCircleIcon, ChevronDownIcon, ChevronUpIcon, SpinnerIcon, XIcon, } from '../../../../icons/index.js';
10
- import { AlertDialog, Button, Field, NumberInput } from '../../../../ui/index.js';
11
- import { parseDecimal } from '../../../../utils/index.js';
12
- import { AmountChoices } from '../../AmountChoices.js';
13
- import { AvailablePromos } from '../AvailablePromos.js';
14
- export function MayaDeposit() {
15
- const [status, setStatus] = useState('waiting');
16
- const createDepositMutation = useCreateMayaDepositMutation({
17
- onMutate() {
18
- setStatus('processing');
19
- },
20
- onSuccess(data) {
21
- invariant(data.checkoutUrl);
22
- window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
23
- form.reset();
24
- setStatus('success');
25
- },
26
- onError() {
27
- setStatus('failed');
28
- },
29
- });
30
- const depositsCountQuery = useDepositsCountQuery();
31
- const depositsCount = depositsCountQuery.data ?? 0;
32
- const paymentSettingsQuery = usePaymentSettingsQuery();
33
- const paymentSettings = paymentSettingsQuery.data;
34
- const gatewaySettings = paymentSettings?.mayaDepositGatewaySettings;
35
- const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
36
- const minimumAmount = depositsCount <= 0
37
- ? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
38
- : parseDecimal(gatewaySettings?.minimumAmount, 0);
39
- const promosQuery = useAvailablePromosQuery();
40
- const promos = promosQuery.data ?? [];
41
- const definition = z
42
- .object({
43
- amount: z.string().superRefine((val, ctx) => {
44
- const n = parseDecimal(val, 0);
45
- if (n < minimumAmount) {
46
- ctx.addIssue({
47
- type: 'number',
48
- code: z.ZodIssueCode.too_small,
49
- inclusive: true,
50
- minimum: minimumAmount,
51
- message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
52
- });
53
- }
54
- if (n > maximumAmount) {
55
- ctx.addIssue({
56
- type: 'number',
57
- code: z.ZodIssueCode.too_big,
58
- inclusive: true,
59
- maximum: maximumAmount,
60
- message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
61
- });
62
- }
63
- }),
64
- promo: z.string().optional().nullable(),
65
- })
66
- .superRefine((value, ctx) => {
67
- const promo = promos.find((o) => o.id === value.promo);
68
- const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
69
- const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
70
- const amount = parseDecimal(value.amount, 0);
71
- if (promo && amount < promoMinAmount) {
72
- ctx.addIssue({
73
- path: ['amount'],
74
- code: z.ZodIssueCode.custom,
75
- message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
76
- });
77
- }
78
- if (promo && amount > promoMaxAmount) {
79
- ctx.addIssue({
80
- path: ['amount'],
81
- code: z.ZodIssueCode.custom,
82
- message: `Maximum amount for this promo is ${promoMaxAmount}`,
83
- });
84
- }
85
- });
86
- const form = useForm({
87
- mode: 'all',
88
- resolver: zodResolver(definition),
89
- defaultValues: {
90
- amount: '0',
91
- promo: null,
92
- },
93
- });
94
- useEffect(() => {
95
- if (minimumAmount) {
96
- form.reset({
97
- amount: minimumAmount.toString(),
98
- promo: null,
99
- });
100
- }
101
- }, [form, minimumAmount]);
102
- const handleSubmit = form.handleSubmit(async (data) => {
103
- createDepositMutation.mutate({
104
- amount: data.amount.toString(),
105
- promo: data.promo ?? undefined,
106
- });
107
- });
108
- return (_jsxs("form", { onSubmit: handleSubmit, 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) => {
109
- o.field.onChange(details.value);
110
- }, formatOptions: {
111
- maximumFractionDigits: 2,
112
- minimumFractionDigits: 0,
113
- }, 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) => {
114
- form.setValue('amount', value.toString(), {
115
- shouldTouch: true,
116
- shouldDirty: true,
117
- shouldValidate: true,
118
- });
119
- }, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: o.field.onChange, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
120
- if (!details.open) {
121
- setStatus('waiting');
122
- }
123
- }, lazyMount: true, unmountOnExit: true, 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, { disabled: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "text-text-brand-primary-600 size-12" })), status === 'success' && (_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "bg-bg-error-secondary text-text-featured-icon-light-error flex size-12 items-center justify-center rounded-full", 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' &&
124
- "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
125
- 'Your deposit has been successfully processed.', status === 'failed' &&
126
- 'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
127
- api.setOpen(false);
128
- }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
129
- }
@@ -1 +0,0 @@
1
- export declare function OnlineBankDeposit(): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { OnlineBankDepositAlert } from './OnlineBankDepositAlert.js';
3
- import { OnlineBankDepositContext } from './OnlineBankDepositContext.js';
4
- import { OnlineBankDepositDetails } from './OnlineBankDepositDetails.js';
5
- import { OnlineBankDepositForm } from './OnlineBankDepositForm.js';
6
- import { useOnlineBankDeposit } from './useOnlineBankDeposit.js';
7
- export function OnlineBankDeposit() {
8
- const context = useOnlineBankDeposit();
9
- return (_jsxs(OnlineBankDepositContext, { value: context, children: [_jsx(OnlineBankDepositForm, {}), _jsx(OnlineBankDepositDetails, {}), _jsx(OnlineBankDepositAlert, {})] }));
10
- }
@@ -1 +0,0 @@
1
- export declare function OnlineBankDepositAlert(): import("react/jsx-runtime").JSX.Element;
@@ -1,96 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Portal } from '@ark-ui/react';
3
- import { AlertCircleIcon, SpinnerIcon, XIcon } from '../../../../icons/index.js';
4
- import { AlertDialog, Button } from '../../../../ui/index.js';
5
- import { useOnlineBankDepositContext } from './OnlineBankDepositContext.js';
6
- export function OnlineBankDepositAlert() {
7
- const context = useOnlineBankDepositContext();
8
- const details = useDetails();
9
- return (_jsx(AlertDialog.Root, { open: context.status !== 'waiting' &&
10
- context.status !== 'verification-waiting', onOpenChange: (details) => {
11
- if (!details.open) {
12
- context.reset();
13
- }
14
- }, lazyMount: true, unmountOnExit: true, 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, { disabled: details.type === 'loading', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [details.type === 'loading' && (_jsx(SpinnerIcon, { className: "text-text-brand-primary-600 size-12" })), details.type === 'success' && (_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, {}) })), details.type === 'erorr' && (_jsx("div", { className: "bg-bg-error-secondary text-text-featured-icon-light-error flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: details.title }), _jsx(AlertDialog.Description, { children: details.description })] }), (details.type === 'erorr' || details.type === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
15
- api.setOpen(false);
16
- }, children: details.type === 'success' ? 'Ok' : 'Try Again' })) }) }))] }) })] }) }));
17
- }
18
- function useDetails() {
19
- const context = useOnlineBankDepositContext();
20
- const title = (() => {
21
- let s = '';
22
- if (context.status === 'processing') {
23
- s = 'Processing Deposit';
24
- }
25
- else if (context.status === 'failed') {
26
- s = 'Deposit Failed';
27
- }
28
- else if (context.status === 'verification-success') {
29
- s = 'Deposit Successful';
30
- }
31
- else if (context.status === 'verification-processing') {
32
- s = 'Verifying Deposit';
33
- }
34
- else if (context.status === 'verification-failed') {
35
- if (context.deposit?.status === 'CANCELLED') {
36
- s = 'Deposit Cancelled';
37
- }
38
- else if (context.deposit?.status === 'REJECTED') {
39
- s = 'Deposit Rejected';
40
- }
41
- else {
42
- s = 'Deposit Failed';
43
- }
44
- }
45
- return s;
46
- })();
47
- const description = (() => {
48
- let d = '';
49
- if (context.status === 'processing') {
50
- d = "We're verifying your account and amount. Please hold a moment.";
51
- }
52
- else if (context.status === 'failed') {
53
- d =
54
- 'Something went wrong while processing your deposit. ' +
55
- 'Please try again or contact support.';
56
- }
57
- else if (context.status === 'verification-success') {
58
- d = 'Your deposit has been successfully processed.';
59
- }
60
- else if (context.status === 'verification-processing') {
61
- d = 'Your deposit is being processed.';
62
- }
63
- else if (context.status === 'verification-failed') {
64
- if (context.deposit?.status === 'CANCELLED') {
65
- d = 'Your deposit has been cancelled.';
66
- }
67
- else if (context.deposit?.status === 'REJECTED') {
68
- d = 'Your deposit has been rejected.';
69
- }
70
- else if (context.deposit?.status === 'FAILED') {
71
- d = context.deposit.error ?? 'Your deposit has failed.';
72
- }
73
- else {
74
- d =
75
- 'Something went wrong while processing your deposit. ' +
76
- 'Please try again or contact support.';
77
- }
78
- }
79
- return d;
80
- })();
81
- const type = (() => {
82
- if (context.status === 'failed' ||
83
- context.status === 'verification-failed') {
84
- return 'erorr';
85
- }
86
- if (context.status === 'verification-success') {
87
- return 'success';
88
- }
89
- return 'loading';
90
- })();
91
- return {
92
- type,
93
- title,
94
- description,
95
- };
96
- }
@@ -1,21 +0,0 @@
1
- export declare const OnlineBankDepositContext: import("react").Context<{
2
- view: "form" | "vca";
3
- status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
4
- verify: () => void;
5
- reset: () => void;
6
- deposit: import("@opexa/portal-sdk-core").Deposit | null;
7
- generateVCA: (input: {
8
- amount: string;
9
- promo?: string | null;
10
- }) => void;
11
- }>, useOnlineBankDepositContext: () => {
12
- view: "form" | "vca";
13
- status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
14
- verify: () => void;
15
- reset: () => void;
16
- deposit: import("@opexa/portal-sdk-core").Deposit | null;
17
- generateVCA: (input: {
18
- amount: string;
19
- promo?: string | null;
20
- }) => void;
21
- };
@@ -1,2 +0,0 @@
1
- import { createContext } from '../../../../client/utils/index.js';
2
- export const [OnlineBankDepositContext, useOnlineBankDepositContext] = createContext();
@@ -1 +0,0 @@
1
- export declare function OnlineBankDepositDetails(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Portal } from '@ark-ui/react';
3
- import Image from 'next/image';
4
- import { BankIcon, XIcon } from '../../../../icons/index.js';
5
- import bankIcon from '../../../../images/bank-icon.png';
6
- import { Button, Clipboard, Dialog } from '../../../../ui/index.js';
7
- import { useOnlineBankDepositContext } from './OnlineBankDepositContext.js';
8
- export function OnlineBankDepositDetails() {
9
- const context = useOnlineBankDepositContext();
10
- if (context.view !== 'vca')
11
- return null;
12
- return (_jsxs("div", { className: "bg-bg-primary-alt rounded-lg p-2xl", children: [_jsx(Image, { src: bankIcon, alt: "", width: 52, height: 44.2, className: "mx-auto h-auto w-[3.25rem]" }), _jsx("p", { className: "mt-8 text-center font-semibold", children: "Your unique Virtual Collection Account (VCA) is:" }), _jsx(Clipboard.Root, { value: context.deposit?.vca ?? '', className: "mx-auto mt-6 max-w-[22.5rem]", children: _jsxs(Clipboard.Control, { className: "flex flex-col gap-4 lg:flex-row", children: [_jsx(Clipboard.Input, { className: "lg:grow" }), _jsx(Clipboard.Context, { children: (ctx) => (_jsx(Clipboard.Trigger, { asChild: true, children: _jsx(Button, { fullWidth: false, className: "w-full shrink-0 lg:w-28", children: ctx.copied ? 'Copied' : 'Copy VCA' }) })) })] }) }), _jsx(Instruction, {})] }));
13
- }
14
- function Instruction() {
15
- return (_jsxs("p", { className: "text-text-tertiary-600 mt-6 text-center text-xs", children: ["Need help using the online bank for payment?", ' ', _jsxs(Dialog.Root, { lazyMount: true, unmountOnExit: true, children: [_jsx(Dialog.Trigger, { className: "text-text-warning-primary-600", children: "See instructions" }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto w-[calc(100%-2rem)] rounded-lg p-4xl lg:w-[33.625rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Dialog.Body, { children: [_jsxs("div", { className: "flex items-center gap-xl", children: [_jsx("div", { className: "border-border-primary shadow-xs text-gray-700 text-text-secondary-700 flex size-11 items-center justify-center rounded-lg border", children: _jsx(BankIcon, { className: "size-6" }) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "How to Use Online Bank for Payment" })] }), _jsx(Dialog.Description, { className: "mt-5", children: "Follow these simple steps to complete your transaction:" }), _jsxs("ol", { className: "mt-3 list-inside list-decimal space-y-3", children: [_jsx("li", { children: "Click the 'Copy VCA' button to save your unique account number." }), _jsx("li", { children: "Log in to your Online Banking: Open your bank's app or website." }), _jsx("li", { children: "Initiate a Deposit: Choose the option to make a deposit." }), _jsx("li", { children: "Enter VCA: Paste your VCA in the designated field." }), _jsx("li", { children: "Complete Transaction: Follow your bank's prompts to finalize the deposit." })] }), _jsx("p", { className: "mt-3", children: "Note: Please ensure that the deposit amount you enter matches exactly." })] })] }) })] })] })] }));
16
- }
@@ -1 +0,0 @@
1
- export declare function OnlineBankDepositForm(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,102 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { zodResolver } from '@hookform/resolvers/zod';
3
- import { noop } from 'lodash-es';
4
- import { useEffect } from 'react';
5
- import { Controller, useForm } from 'react-hook-form';
6
- import { z } from 'zod';
7
- import { useAvailablePromosQuery, useDepositsCountQuery, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
8
- import { ChevronDownIcon, ChevronUpIcon } from '../../../../icons/index.js';
9
- import { Button, Field, NumberInput } from '../../../../ui/index.js';
10
- import { parseDecimal } from '../../../../utils/index.js';
11
- import { AmountChoices } from '../../AmountChoices.js';
12
- import { AvailablePromos } from '../AvailablePromos.js';
13
- import { useOnlineBankDepositContext } from './OnlineBankDepositContext.js';
14
- export function OnlineBankDepositForm() {
15
- const context = useOnlineBankDepositContext();
16
- const depositsCountQuery = useDepositsCountQuery();
17
- const depositsCount = depositsCountQuery.data ?? 0;
18
- const paymentSettingsQuery = usePaymentSettingsQuery();
19
- const paymentSettings = paymentSettingsQuery.data;
20
- const gatewaySettings = paymentSettings?.onlineBankDepositGatewaySettings;
21
- const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
22
- const minimumAmount = depositsCount <= 0
23
- ? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
24
- : parseDecimal(gatewaySettings?.minimumAmount, 0);
25
- const promosQuery = useAvailablePromosQuery();
26
- const promos = promosQuery.data ?? [];
27
- const definition = z
28
- .object({
29
- amount: z.string().superRefine((val, ctx) => {
30
- const n = parseDecimal(val, 0);
31
- if (n < minimumAmount) {
32
- ctx.addIssue({
33
- type: 'number',
34
- code: z.ZodIssueCode.too_small,
35
- inclusive: true,
36
- minimum: minimumAmount,
37
- message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
38
- });
39
- }
40
- if (n > maximumAmount) {
41
- ctx.addIssue({
42
- type: 'number',
43
- code: z.ZodIssueCode.too_big,
44
- inclusive: true,
45
- maximum: maximumAmount,
46
- message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
47
- });
48
- }
49
- }),
50
- promo: z.string().optional().nullable(),
51
- })
52
- .superRefine((value, ctx) => {
53
- const promo = promos.find((o) => o.id === value.promo);
54
- const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
55
- const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
56
- const amount = parseDecimal(value.amount, 0);
57
- if (promo && amount < promoMinAmount) {
58
- ctx.addIssue({
59
- path: ['amount'],
60
- code: z.ZodIssueCode.custom,
61
- message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
62
- });
63
- }
64
- if (promo && amount > promoMaxAmount) {
65
- ctx.addIssue({
66
- path: ['amount'],
67
- code: z.ZodIssueCode.custom,
68
- message: `Maximum amount for this promo is ${promoMaxAmount}`,
69
- });
70
- }
71
- });
72
- const form = useForm({
73
- mode: 'all',
74
- resolver: zodResolver(definition),
75
- defaultValues: {
76
- amount: '0',
77
- promo: null,
78
- },
79
- });
80
- useEffect(() => {
81
- if (minimumAmount) {
82
- form.reset({
83
- amount: minimumAmount.toString(),
84
- promo: null,
85
- });
86
- }
87
- }, [form, minimumAmount]);
88
- if (context.view !== 'form')
89
- return null;
90
- return (_jsxs("form", { onSubmit: form.handleSubmit(context.generateVCA), noValidate: true, children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Bank" }), _jsx(Field.Input, { value: "BANKNET", onChange: noop, readOnly: true })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
91
- o.field.onChange(details.value);
92
- }, formatOptions: {
93
- maximumFractionDigits: 2,
94
- minimumFractionDigits: 0,
95
- }, 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) => {
96
- form.setValue('amount', value.toString(), {
97
- shouldTouch: true,
98
- shouldDirty: true,
99
- shouldValidate: true,
100
- });
101
- }, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { className: "mt-3xl", value: o.field.value, onChange: o.field.onChange })) }), _jsx(Button, { type: "submit", className: "mt-3xl", children: "Deposit" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] })] }));
102
- }
@@ -1,13 +0,0 @@
1
- import type { Deposit } from '@opexa/portal-sdk-core';
2
- export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
3
- export declare function useOnlineBankDeposit(): {
4
- view: "form" | "vca";
5
- status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
6
- verify: () => void;
7
- reset: () => void;
8
- deposit: Deposit | null;
9
- generateVCA: (input: {
10
- amount: string;
11
- promo?: string | null;
12
- }) => void;
13
- };
@@ -1,60 +0,0 @@
1
- import { useEffect, useState } from 'react';
2
- import invariant from 'tiny-invariant';
3
- import { useCreateOnlineBankDepositMutation, useDepositQuery, } from '../../../../client/hooks/index.js';
4
- export function useOnlineBankDeposit() {
5
- const [deposit, setDeposit] = useState(null);
6
- const [status, setStatus] = useState('waiting');
7
- const view = status === 'verification-failed' ||
8
- status === 'verification-waiting' ||
9
- status === 'verification-success' ||
10
- status === 'verification-processing'
11
- ? 'vca'
12
- : 'form';
13
- const mutation = useCreateOnlineBankDepositMutation({
14
- onMutate() {
15
- setStatus('processing');
16
- },
17
- onSuccess(data) {
18
- invariant(data.vca);
19
- setStatus('verification-waiting');
20
- setDeposit(data);
21
- },
22
- onError() {
23
- setStatus('failed');
24
- },
25
- });
26
- const generateVCA = (input) => mutation.mutate({
27
- amount: input.amount,
28
- promo: input.promo ?? undefined,
29
- });
30
- const query = useDepositQuery(deposit?.id, {
31
- enabled: !!deposit,
32
- refetchInterval: 5000,
33
- });
34
- useEffect(() => {
35
- if (query.data?.status === 'APPROVED' ||
36
- query.data?.status === 'CONFIRMED') {
37
- setStatus('verification-success');
38
- }
39
- if (query.data?.status === 'CANCELLED' ||
40
- query.data?.status === 'REJECTED' ||
41
- query.data?.status === 'FAILED') {
42
- setStatus('verification-failed');
43
- }
44
- }, [query.data?.status]);
45
- const reset = () => {
46
- setDeposit(null);
47
- setStatus('waiting');
48
- };
49
- const verify = () => {
50
- setStatus('verification-processing');
51
- };
52
- return {
53
- view,
54
- status,
55
- verify,
56
- reset,
57
- deposit,
58
- generateVCA,
59
- };
60
- }
@@ -1 +0,0 @@
1
- export declare function QRPHDeposit(): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { QRPHDepositAlert } from './QRPHDepositAlert.js';
3
- import { QRPHDepositContext } from './QRPHDepositContext.js';
4
- import { QRPHDepositDetails } from './QRPHDepositDetails.js';
5
- import { QRPHDepositForm } from './QRPHDepositForm.js';
6
- import { useQRPHDeposit } from './useQRPHDeposit.js';
7
- export function QRPHDeposit() {
8
- const context = useQRPHDeposit();
9
- return (_jsxs(QRPHDepositContext, { value: context, children: [_jsx(QRPHDepositForm, {}), _jsx(QRPHDepositDetails, {}), _jsx(QRPHDepositAlert, {})] }));
10
- }
@@ -1 +0,0 @@
1
- export declare function QRPHDepositAlert(): import("react/jsx-runtime").JSX.Element;
@@ -1,96 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Portal } from '@ark-ui/react';
3
- import { AlertCircleIcon, SpinnerIcon, XIcon } from '../../../../icons/index.js';
4
- import { AlertDialog, Button } from '../../../../ui/index.js';
5
- import { useQRPHDepositContext } from './QRPHDepositContext.js';
6
- export function QRPHDepositAlert() {
7
- const context = useQRPHDepositContext();
8
- const details = useDetails();
9
- return (_jsx(AlertDialog.Root, { open: context.status !== 'waiting' &&
10
- context.status !== 'verification-waiting', onOpenChange: (details) => {
11
- if (!details.open) {
12
- context.reset();
13
- }
14
- }, lazyMount: true, unmountOnExit: true, 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, { disabled: details.type === 'loading', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [details.type === 'loading' && (_jsx(SpinnerIcon, { className: "text-text-brand-primary-600 size-12" })), details.type === 'success' && (_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, {}) })), details.type === 'erorr' && (_jsx("div", { className: "bg-bg-error-secondary text-text-featured-icon-light-error flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: details.title }), _jsx(AlertDialog.Description, { children: details.description })] }), (details.type === 'erorr' || details.type === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
15
- api.setOpen(false);
16
- }, children: details.type === 'success' ? 'Ok' : 'Try Again' })) }) }))] }) })] }) }));
17
- }
18
- function useDetails() {
19
- const context = useQRPHDepositContext();
20
- const title = (() => {
21
- let s = '';
22
- if (context.status === 'processing') {
23
- s = 'Processing Deposit';
24
- }
25
- else if (context.status === 'failed') {
26
- s = 'Deposit Failed';
27
- }
28
- else if (context.status === 'verification-success') {
29
- s = 'Deposit Successful';
30
- }
31
- else if (context.status === 'verification-processing') {
32
- s = 'Verifying Deposit';
33
- }
34
- else if (context.status === 'verification-failed') {
35
- if (context.deposit?.status === 'CANCELLED') {
36
- s = 'Deposit Cancelled';
37
- }
38
- else if (context.deposit?.status === 'REJECTED') {
39
- s = 'Deposit Rejected';
40
- }
41
- else {
42
- s = 'Deposit Failed';
43
- }
44
- }
45
- return s;
46
- })();
47
- const description = (() => {
48
- let d = '';
49
- if (context.status === 'processing') {
50
- d = "We're verifying your account and amount. Please hold a moment.";
51
- }
52
- else if (context.status === 'failed') {
53
- d =
54
- 'Something went wrong while processing your deposit. ' +
55
- 'Please try again or contact support.';
56
- }
57
- else if (context.status === 'verification-success') {
58
- d = 'Your deposit has been successfully processed.';
59
- }
60
- else if (context.status === 'verification-processing') {
61
- d = 'Your deposit is being processed.';
62
- }
63
- else if (context.status === 'verification-failed') {
64
- if (context.deposit?.status === 'CANCELLED') {
65
- d = 'Your deposit has been cancelled.';
66
- }
67
- else if (context.deposit?.status === 'REJECTED') {
68
- d = 'Your deposit has been rejected.';
69
- }
70
- else if (context.deposit?.status === 'FAILED') {
71
- d = context.deposit.error ?? 'Your deposit has failed.';
72
- }
73
- else {
74
- d =
75
- 'Something went wrong while processing your deposit. ' +
76
- 'Please try again or contact support.';
77
- }
78
- }
79
- return d;
80
- })();
81
- const type = (() => {
82
- if (context.status === 'failed' ||
83
- context.status === 'verification-failed') {
84
- return 'erorr';
85
- }
86
- if (context.status === 'verification-success') {
87
- return 'success';
88
- }
89
- return 'loading';
90
- })();
91
- return {
92
- type,
93
- title,
94
- description,
95
- };
96
- }
@@ -1,21 +0,0 @@
1
- export declare const QRPHDepositContext: import("react").Context<{
2
- view: "form" | "qrCode";
3
- status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
4
- verify: () => void;
5
- reset: () => void;
6
- deposit: import("@opexa/portal-sdk-core").Deposit | null;
7
- generateQRCode: (input: {
8
- amount: string;
9
- promo?: string | null;
10
- }) => void;
11
- }>, useQRPHDepositContext: () => {
12
- view: "form" | "qrCode";
13
- status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
14
- verify: () => void;
15
- reset: () => void;
16
- deposit: import("@opexa/portal-sdk-core").Deposit | null;
17
- generateQRCode: (input: {
18
- amount: string;
19
- promo?: string | null;
20
- }) => void;
21
- };
@@ -1,2 +0,0 @@
1
- import { createContext } from '../../../../client/utils/index.js';
2
- export const [QRPHDepositContext, useQRPHDepositContext] = createContext();
@@ -1 +0,0 @@
1
- export declare function QRPHDepositDetails(): import("react/jsx-runtime").JSX.Element | null;