@opexa/portal-components 0.0.63 → 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.
- package/dist/components/Bonuses/Bonuses.client.js +4 -4
- package/dist/components/Bonuses/BonusesTrigger.d.ts +5 -0
- package/dist/components/Bonuses/BonusesTrigger.js +19 -0
- package/dist/components/Bonuses/index.d.ts +1 -0
- package/dist/components/Bonuses/index.js +2 -1
- package/package.json +1 -1
- package/dist/components/Account/Account.d.ts +0 -23
- package/dist/components/Account/Account.js +0 -107
- package/dist/components/Account/AccountTrigger.d.ts +0 -6
- package/dist/components/Account/AccountTrigger.js +0 -13
- package/dist/components/Account/account.recipe.d.ts +0 -61
- package/dist/components/Account/account.recipe.js +0 -32
- package/dist/components/Account/index.d.ts +0 -2
- package/dist/components/Account/index.js +0 -2
- package/dist/components/AccountInfo/AccountInfo.d.ts +0 -4
- package/dist/components/AccountInfo/AccountInfo.js +0 -143
- package/dist/components/AccountInfo/index.d.ts +0 -1
- package/dist/components/AccountInfo/index.js +0 -1
- package/dist/components/AccountSecurity/AccountSecurity.d.ts +0 -4
- package/dist/components/AccountSecurity/AccountSecurity.js +0 -171
- package/dist/components/AccountSecurity/index.d.ts +0 -1
- package/dist/components/AccountSecurity/index.js +0 -1
- package/dist/components/AccountVerification/AccountVerification.d.ts +0 -4
- package/dist/components/AccountVerification/AccountVerification.js +0 -37
- package/dist/components/AccountVerification/index.d.ts +0 -1
- package/dist/components/AccountVerification/index.js +0 -1
- package/dist/components/Banner/Banner.d.ts +0 -11
- package/dist/components/Banner/Banner.js +0 -38
- package/dist/components/Banner/index.d.ts +0 -1
- package/dist/components/Banner/index.js +0 -1
- package/dist/components/BetRecords/BetRecords.d.ts +0 -7
- package/dist/components/BetRecords/BetRecords.js +0 -181
- package/dist/components/BetRecords/index.d.ts +0 -1
- package/dist/components/BetRecords/index.js +0 -1
- package/dist/components/Bonus/Bonus.client.d.ts +0 -2
- package/dist/components/Bonus/Bonus.client.js +0 -9
- package/dist/components/Bonus/Bonus.d.ts +0 -10
- package/dist/components/Bonus/Bonus.js +0 -5
- package/dist/components/Bonus/index.d.ts +0 -1
- package/dist/components/Bonus/index.js +0 -1
- package/dist/components/Bonuses/Bonuses.d.ts +0 -15
- package/dist/components/Bonuses/Bonuses.js +0 -7
- package/dist/components/Cashback/Cashback.client.d.ts +0 -2
- package/dist/components/Cashback/Cashback.client.js +0 -27
- package/dist/components/Cashback/Cashback.d.ts +0 -7
- package/dist/components/Cashback/Cashback.js +0 -15
- package/dist/components/Cashback/index.d.ts +0 -1
- package/dist/components/Cashback/index.js +0 -1
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +0 -2
- package/dist/components/CashbackBonus/CashbackBonus.client.js +0 -9
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +0 -10
- package/dist/components/CashbackBonus/CashbackBonus.js +0 -5
- package/dist/components/CashbackBonus/index.d.ts +0 -1
- package/dist/components/CashbackBonus/index.js +0 -1
- package/dist/components/DepositWithdrawal/AmountChoices.d.ts +0 -11
- package/dist/components/DepositWithdrawal/AmountChoices.js +0 -25
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.d.ts +0 -8
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +0 -31
- package/dist/components/DepositWithdrawal/Deposit/Deposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +0 -75
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +0 -129
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +0 -126
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +0 -129
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.js +0 -96
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +0 -21
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +0 -16
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +0 -102
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +0 -60
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +0 -96
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +0 -21
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +0 -16
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +0 -101
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +0 -60
- package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +0 -6
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +0 -39
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +0 -5
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +0 -21
- package/dist/components/DepositWithdrawal/PaymentMethods.d.ts +0 -10
- package/dist/components/DepositWithdrawal/PaymentMethods.js +0 -60
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +0 -109
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +0 -131
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +0 -101
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +0 -109
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +0 -91
- package/dist/components/DepositWithdrawal/index.d.ts +0 -1
- package/dist/components/DepositWithdrawal/index.js +0 -1
- package/dist/components/DepositWithdrawal/utils.d.ts +0 -3
- package/dist/components/DepositWithdrawal/utils.js +0 -9
- package/dist/components/Disclaimer/Disclaimer.d.ts +0 -5
- package/dist/components/Disclaimer/Disclaimer.js +0 -14
- package/dist/components/Disclaimer/index.d.ts +0 -1
- package/dist/components/Disclaimer/index.js +0 -1
- package/dist/components/Disclaimer/useDisclaimer.d.ts +0 -4
- package/dist/components/Disclaimer/useDisclaimer.js +0 -37
- package/dist/components/Empty.d.ts +0 -10
- package/dist/components/Empty.js +0 -7
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +0 -2
- package/dist/components/FavoriteGames/FavoriteGames.client.js +0 -31
- package/dist/components/FavoriteGames/FavoriteGames.d.ts +0 -6
- package/dist/components/FavoriteGames/FavoriteGames.js +0 -7
- package/dist/components/FavoriteGames/index.d.ts +0 -1
- package/dist/components/FavoriteGames/index.js +0 -1
- package/dist/components/GameLaunch/GameLaunch.d.ts +0 -1
- package/dist/components/GameLaunch/GameLaunch.js +0 -75
- package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +0 -7
- package/dist/components/GameLaunch/GameLaunchTrigger.js +0 -57
- package/dist/components/GameLaunch/index.d.ts +0 -2
- package/dist/components/GameLaunch/index.js +0 -2
- package/dist/components/GameProviders/GameProviders.d.ts +0 -11
- package/dist/components/GameProviders/GameProviders.js +0 -32
- package/dist/components/GameProviders/index.d.ts +0 -1
- package/dist/components/GameProviders/index.js +0 -1
- package/dist/components/Games/BadgeNew.d.ts +0 -2
- package/dist/components/Games/BadgeNew.js +0 -4
- package/dist/components/Games/BadgePopular.d.ts +0 -2
- package/dist/components/Games/BadgePopular.js +0 -4
- package/dist/components/Games/BadgeTop.d.ts +0 -2
- package/dist/components/Games/BadgeTop.js +0 -4
- package/dist/components/Games/Game.d.ts +0 -4
- package/dist/components/Games/Game.js +0 -37
- package/dist/components/Games/GameContext.d.ts +0 -2
- package/dist/components/Games/GameContext.js +0 -2
- package/dist/components/Games/Games.d.ts +0 -8
- package/dist/components/Games/Games.js +0 -6
- package/dist/components/Games/GamesCarousel.client.d.ts +0 -2
- package/dist/components/Games/GamesCarousel.client.js +0 -58
- package/dist/components/Games/GamesCarousel.d.ts +0 -16
- package/dist/components/Games/GamesCarousel.js +0 -11
- package/dist/components/Games/GamesList.client.d.ts +0 -2
- package/dist/components/Games/GamesList.client.js +0 -14
- package/dist/components/Games/GamesList.d.ts +0 -11
- package/dist/components/Games/GamesList.js +0 -10
- package/dist/components/Games/index.d.ts +0 -1
- package/dist/components/Games/index.js +0 -1
- package/dist/components/GamesSearch/GamesSearch.d.ts +0 -8
- package/dist/components/GamesSearch/GamesSearch.js +0 -45
- package/dist/components/GamesSearch/index.d.ts +0 -1
- package/dist/components/GamesSearch/index.js +0 -1
- package/dist/components/InfiniteScroll.d.ts +0 -10
- package/dist/components/InfiniteScroll.js +0 -25
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
- package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -57
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -8
- package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -8
- package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -103
- package/dist/components/JackpotCounter/index.d.ts +0 -1
- package/dist/components/JackpotCounter/index.js +0 -1
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
- package/dist/components/Jackpots/JackpotGameProviders.js +0 -38
- package/dist/components/Jackpots/JackpotItemDesktop.d.ts +0 -9
- package/dist/components/Jackpots/JackpotItemDesktop.js +0 -43
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +0 -9
- package/dist/components/Jackpots/JackpotItemMobile.js +0 -44
- package/dist/components/Jackpots/JackpotRules.d.ts +0 -6
- package/dist/components/Jackpots/JackpotRules.js +0 -9
- package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
- package/dist/components/Jackpots/Jackpots.client.js +0 -28
- package/dist/components/Jackpots/Jackpots.d.ts +0 -10
- package/dist/components/Jackpots/Jackpots.js +0 -21
- package/dist/components/Jackpots/index.d.ts +0 -1
- package/dist/components/Jackpots/index.js +0 -1
- package/dist/components/Jackpots/useJackpotItemData.d.ts +0 -20
- package/dist/components/Jackpots/useJackpotItemData.js +0 -87
- package/dist/components/KYC/Header.d.ts +0 -1
- package/dist/components/KYC/Header.js +0 -6
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -9
- package/dist/components/KYC/KYC.d.ts +0 -1
- package/dist/components/KYC/KYC.js +0 -26
- package/dist/components/KYC/KYCContext.d.ts +0 -2
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/KYCTrigger.d.ts +0 -5
- package/dist/components/KYC/KYCTrigger.js +0 -14
- package/dist/components/KYC/Step1.d.ts +0 -1
- package/dist/components/KYC/Step1.js +0 -12
- package/dist/components/KYC/Step2.d.ts +0 -1
- package/dist/components/KYC/Step2.js +0 -12
- package/dist/components/KYC/Step3.d.ts +0 -1
- package/dist/components/KYC/Step3.js +0 -11
- package/dist/components/KYC/Step4.d.ts +0 -1
- package/dist/components/KYC/Step4.js +0 -6
- package/dist/components/KYC/index.d.ts +0 -2
- package/dist/components/KYC/index.js +0 -2
- package/dist/components/KYC/useKYC.d.ts +0 -10
- package/dist/components/KYC/useKYC.js +0 -8
- package/dist/components/Marquee/Marquee.d.ts +0 -5
- package/dist/components/Marquee/Marquee.js +0 -5
- package/dist/components/Marquee/index.d.ts +0 -1
- package/dist/components/Marquee/index.js +0 -1
- package/dist/components/Messages/MessageItem.d.ts +0 -4
- package/dist/components/Messages/MessageItem.js +0 -34
- package/dist/components/Messages/MessagePopup.d.ts +0 -1
- package/dist/components/Messages/MessagePopup.js +0 -20
- package/dist/components/Messages/MessageTrigger.d.ts +0 -8
- package/dist/components/Messages/MessageTrigger.js +0 -18
- package/dist/components/Messages/Messages.d.ts +0 -14
- package/dist/components/Messages/Messages.js +0 -38
- package/dist/components/Messages/MessagesTrigger.d.ts +0 -6
- package/dist/components/Messages/MessagesTrigger.js +0 -14
- package/dist/components/Messages/index.d.ts +0 -4
- package/dist/components/Messages/index.js +0 -4
- package/dist/components/Messages/utils.d.ts +0 -3
- package/dist/components/Messages/utils.js +0 -27
- package/dist/components/PortalProvider/PortalProvider.d.ts +0 -9
- package/dist/components/PortalProvider/PortalProvider.js +0 -18
- package/dist/components/PortalProvider/Providers.d.ts +0 -4
- package/dist/components/PortalProvider/Providers.js +0 -12
- package/dist/components/PortalProvider/Snackbar.d.ts +0 -1
- package/dist/components/PortalProvider/Snackbar.js +0 -21
- package/dist/components/PortalProvider/WebVitals.d.ts +0 -1
- package/dist/components/PortalProvider/WebVitals.js +0 -8
- package/dist/components/PortalProvider/index.d.ts +0 -1
- package/dist/components/PortalProvider/index.js +0 -1
- package/dist/components/Promo/Promo.client.d.ts +0 -2
- package/dist/components/Promo/Promo.client.js +0 -27
- package/dist/components/Promo/Promo.d.ts +0 -7
- package/dist/components/Promo/Promo.js +0 -15
- package/dist/components/Promo/index.d.ts +0 -1
- package/dist/components/Promo/index.js +0 -1
- package/dist/components/Promos/Cashback.d.ts +0 -7
- package/dist/components/Promos/Cashback.js +0 -17
- package/dist/components/Promos/Promo.d.ts +0 -7
- package/dist/components/Promos/Promo.js +0 -17
- package/dist/components/Promos/Promos.d.ts +0 -15
- package/dist/components/Promos/Promos.js +0 -13
- package/dist/components/Promos/PromosCarousel.d.ts +0 -2
- package/dist/components/Promos/PromosCarousel.js +0 -45
- package/dist/components/Promos/PromosGrid.d.ts +0 -2
- package/dist/components/Promos/PromosGrid.js +0 -16
- package/dist/components/Promos/index.d.ts +0 -1
- package/dist/components/Promos/index.js +0 -1
- package/dist/components/Protected/Protected.d.ts +0 -6
- package/dist/components/Protected/Protected.js +0 -8
- package/dist/components/Protected/index.d.ts +0 -1
- package/dist/components/Protected/index.js +0 -1
- package/dist/components/Quests/CountdownTimer.d.ts +0 -15
- package/dist/components/Quests/CountdownTimer.js +0 -33
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -73
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -8
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
- package/dist/components/Quests/Quests.client.d.ts +0 -2
- package/dist/components/Quests/Quests.client.js +0 -27
- package/dist/components/Quests/Quests.d.ts +0 -6
- package/dist/components/Quests/Quests.js +0 -7
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -19
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -8
- package/dist/components/Quests/index.d.ts +0 -1
- package/dist/components/Quests/index.js +0 -1
- package/dist/components/Search/Search.d.ts +0 -6
- package/dist/components/Search/Search.js +0 -38
- package/dist/components/Search/SearchTrigger.d.ts +0 -5
- package/dist/components/Search/SearchTrigger.js +0 -14
- package/dist/components/Search/index.d.ts +0 -2
- package/dist/components/Search/index.js +0 -2
- package/dist/components/SignIn/MobileNumberSignIn.d.ts +0 -1
- package/dist/components/SignIn/MobileNumberSignIn.js +0 -121
- package/dist/components/SignIn/NameAndPasswordSignIn.d.ts +0 -1
- package/dist/components/SignIn/NameAndPasswordSignIn.js +0 -116
- package/dist/components/SignIn/SignIn.d.ts +0 -7
- package/dist/components/SignIn/SignIn.js +0 -18
- package/dist/components/SignIn/SignInContext.d.ts +0 -2
- package/dist/components/SignIn/SignInContext.js +0 -2
- package/dist/components/SignIn/SignInForm.d.ts +0 -1
- package/dist/components/SignIn/SignInForm.js +0 -10
- package/dist/components/SignIn/SignInMethod.d.ts +0 -1
- package/dist/components/SignIn/SignInMethod.js +0 -19
- package/dist/components/SignIn/SignInTrigger.d.ts +0 -6
- package/dist/components/SignIn/SignInTrigger.js +0 -14
- package/dist/components/SignIn/index.d.ts +0 -2
- package/dist/components/SignIn/index.js +0 -2
- package/dist/components/SignIn/useSignIn.d.ts +0 -10
- package/dist/components/SignIn/useSignIn.js +0 -11
- package/dist/components/SignUp/SignUp.d.ts +0 -7
- package/dist/components/SignUp/SignUp.js +0 -16
- package/dist/components/SignUp/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpForm.js +0 -133
- package/dist/components/SignUp/SignUpTrigger.d.ts +0 -6
- package/dist/components/SignUp/SignUpTrigger.js +0 -14
- package/dist/components/SignUp/index.d.ts +0 -2
- package/dist/components/SignUp/index.js +0 -2
- package/dist/components/TopWins/TopWins.client.d.ts +0 -2
- package/dist/components/TopWins/TopWins.client.js +0 -23
- package/dist/components/TopWins/TopWins.d.ts +0 -6
- package/dist/components/TopWins/TopWins.js +0 -7
- package/dist/components/TopWins/index.d.ts +0 -1
- package/dist/components/TopWins/index.js +0 -1
- package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +0 -2
- package/dist/components/TournamentCounter/TournamentCounter.client.js +0 -50
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +0 -8
- package/dist/components/TournamentCounter/TournamentCounter.js +0 -21
- package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +0 -8
- package/dist/components/TournamentCounter/TournamentCounterItem.js +0 -106
- package/dist/components/TournamentCounter/index.d.ts +0 -1
- package/dist/components/TournamentCounter/index.js +0 -1
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +0 -5
- package/dist/components/Tournaments/TournamentGameProviders.js +0 -38
- package/dist/components/Tournaments/TournamentItemDesktop.d.ts +0 -7
- package/dist/components/Tournaments/TournamentItemDesktop.js +0 -56
- package/dist/components/Tournaments/TournamentItemMobile.d.ts +0 -7
- package/dist/components/Tournaments/TournamentItemMobile.js +0 -54
- package/dist/components/Tournaments/TournamentRules.d.ts +0 -6
- package/dist/components/Tournaments/TournamentRules.js +0 -9
- package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
- package/dist/components/Tournaments/Tournaments.client.js +0 -19
- package/dist/components/Tournaments/Tournaments.d.ts +0 -10
- package/dist/components/Tournaments/Tournaments.js +0 -14
- package/dist/components/Tournaments/index.d.ts +0 -1
- package/dist/components/Tournaments/index.js +0 -1
- package/dist/components/Tournaments/useTournamentItemData.d.ts +0 -16
- package/dist/components/Tournaments/useTournamentItemData.js +0 -64
- package/dist/components/TransactionRecords/DepositRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +0 -76
- package/dist/components/TransactionRecords/TableFilters.d.ts +0 -28
- package/dist/components/TransactionRecords/TableFilters.js +0 -212
- package/dist/components/TransactionRecords/TransactionRecords.d.ts +0 -7
- package/dist/components/TransactionRecords/TransactionRecords.js +0 -9
- package/dist/components/TransactionRecords/TransactionRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +0 -51
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +0 -70
- package/dist/components/TransactionRecords/index.d.ts +0 -1
- package/dist/components/TransactionRecords/index.js +0 -1
- package/dist/components/index.js +0 -34
- /package/dist/{components/Bonuses → images}/money-on-hand.png +0 -0
- /package/dist/{components/Bonuses → images}/piggy-bank.png +0 -0
|
@@ -1,101 +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 { z } from 'zod';
|
|
7
|
-
import { useCreateMayaAppWithdrawalMutation, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
8
|
-
import { AlertCircleIcon, ChevronDownIcon, ChevronUpIcon, EyeIcon, EyeOffIcon, SpinnerIcon, XIcon, } from '../../../../icons/index.js';
|
|
9
|
-
import { AlertDialog, Button, Field, NumberInput, PasswordInput, } from '../../../../ui/index.js';
|
|
10
|
-
import { parseDecimal } from '../../../../utils/index.js';
|
|
11
|
-
import { AmountChoices } from '../../AmountChoices.js';
|
|
12
|
-
export function MayaAppWithdrawal() {
|
|
13
|
-
const [status, setStatus] = useState('waiting');
|
|
14
|
-
const createWithdrawalMutation = useCreateMayaAppWithdrawalMutation({
|
|
15
|
-
onMutate() {
|
|
16
|
-
setStatus('processing');
|
|
17
|
-
},
|
|
18
|
-
onSuccess() {
|
|
19
|
-
form.reset();
|
|
20
|
-
setStatus('success');
|
|
21
|
-
},
|
|
22
|
-
onError() {
|
|
23
|
-
setStatus('failed');
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
27
|
-
const paymentSettings = paymentSettingsQuery.data;
|
|
28
|
-
const gatewaySettings = paymentSettings?.mayaAppWithdrawalGatewaySettings;
|
|
29
|
-
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
30
|
-
const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
31
|
-
const definition = z.object({
|
|
32
|
-
amount: z.string().superRefine((val, ctx) => {
|
|
33
|
-
const n = parseDecimal(val, 0);
|
|
34
|
-
if (n < minimumAmount) {
|
|
35
|
-
ctx.addIssue({
|
|
36
|
-
type: 'number',
|
|
37
|
-
code: z.ZodIssueCode.too_small,
|
|
38
|
-
inclusive: true,
|
|
39
|
-
minimum: minimumAmount,
|
|
40
|
-
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
if (n > maximumAmount) {
|
|
44
|
-
ctx.addIssue({
|
|
45
|
-
type: 'number',
|
|
46
|
-
code: z.ZodIssueCode.too_big,
|
|
47
|
-
inclusive: true,
|
|
48
|
-
maximum: maximumAmount,
|
|
49
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}),
|
|
53
|
-
password: z
|
|
54
|
-
.string()
|
|
55
|
-
.min(8, 'Password must be 8 or more characters')
|
|
56
|
-
.max(64, 'Password must be not be more than 64 characters'),
|
|
57
|
-
});
|
|
58
|
-
const form = useForm({
|
|
59
|
-
mode: 'all',
|
|
60
|
-
resolver: zodResolver(definition),
|
|
61
|
-
defaultValues: {
|
|
62
|
-
amount: '0',
|
|
63
|
-
password: '',
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
useEffect(() => {
|
|
67
|
-
if (minimumAmount) {
|
|
68
|
-
form.reset({
|
|
69
|
-
amount: minimumAmount.toString(),
|
|
70
|
-
password: '',
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}, [form, minimumAmount]);
|
|
74
|
-
const handleSubmit = form.handleSubmit(async (data) => {
|
|
75
|
-
createWithdrawalMutation.mutate({
|
|
76
|
-
amount: data.amount,
|
|
77
|
-
transactionPassword: data.password,
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
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) => {
|
|
81
|
-
o.field.onChange(details.value);
|
|
82
|
-
}, formatOptions: {
|
|
83
|
-
maximumFractionDigits: 2,
|
|
84
|
-
minimumFractionDigits: 0,
|
|
85
|
-
}, 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) => {
|
|
86
|
-
form.setValue('amount', value.toString(), {
|
|
87
|
-
shouldTouch: true,
|
|
88
|
-
shouldDirty: true,
|
|
89
|
-
shouldValidate: true,
|
|
90
|
-
});
|
|
91
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
|
|
92
|
-
if (!details.open) {
|
|
93
|
-
setStatus('waiting');
|
|
94
|
-
}
|
|
95
|
-
}, 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 Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
|
|
96
|
-
"We're verifying your account and amount. Please hold a moment.", status === 'success' &&
|
|
97
|
-
'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
|
|
98
|
-
'Something went wrong while processing your withdrawal. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
99
|
-
api.setOpen(false);
|
|
100
|
-
}, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
|
|
101
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function MayaWithdrawal(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,109 +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 { z } from 'zod';
|
|
7
|
-
import { useCreateMayaWithdrawalMutation, useLocaleInfo, useMobileNumberParser, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
8
|
-
import { AlertCircleIcon, ChevronDownIcon, ChevronUpIcon, EyeIcon, EyeOffIcon, SpinnerIcon, XIcon, } from '../../../../icons/index.js';
|
|
9
|
-
import { AlertDialog, Button, Field, NumberInput, PasswordInput, } from '../../../../ui/index.js';
|
|
10
|
-
import { parseDecimal } from '../../../../utils/index.js';
|
|
11
|
-
import { AmountChoices } from '../../AmountChoices.js';
|
|
12
|
-
export function MayaWithdrawal() {
|
|
13
|
-
const [status, setStatus] = useState('waiting');
|
|
14
|
-
const localeInfo = useLocaleInfo();
|
|
15
|
-
const mobileNumberParser = useMobileNumberParser();
|
|
16
|
-
const createWithdrawalMutation = useCreateMayaWithdrawalMutation({
|
|
17
|
-
onMutate() {
|
|
18
|
-
setStatus('processing');
|
|
19
|
-
},
|
|
20
|
-
onSuccess() {
|
|
21
|
-
form.reset();
|
|
22
|
-
setStatus('success');
|
|
23
|
-
},
|
|
24
|
-
onError() {
|
|
25
|
-
setStatus('failed');
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
29
|
-
const paymentSettings = paymentSettingsQuery.data;
|
|
30
|
-
const gatewaySettings = paymentSettings?.mayaWithdrawalGatewaySettings;
|
|
31
|
-
const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
32
|
-
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
33
|
-
const definition = z.object({
|
|
34
|
-
amount: z.string().superRefine((val, ctx) => {
|
|
35
|
-
const n = parseDecimal(val, 0);
|
|
36
|
-
if (n < minimumAmount) {
|
|
37
|
-
ctx.addIssue({
|
|
38
|
-
type: 'number',
|
|
39
|
-
code: z.ZodIssueCode.too_small,
|
|
40
|
-
inclusive: true,
|
|
41
|
-
minimum: minimumAmount,
|
|
42
|
-
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
if (n > maximumAmount) {
|
|
46
|
-
ctx.addIssue({
|
|
47
|
-
type: 'number',
|
|
48
|
-
code: z.ZodIssueCode.too_big,
|
|
49
|
-
inclusive: true,
|
|
50
|
-
maximum: maximumAmount,
|
|
51
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}),
|
|
55
|
-
password: z
|
|
56
|
-
.string()
|
|
57
|
-
.min(8, 'Password must be 8 or more characters')
|
|
58
|
-
.max(64, 'Password must be not be more than 64 characters'),
|
|
59
|
-
mobileNumber: z
|
|
60
|
-
.string()
|
|
61
|
-
.regex(localeInfo.mobileNumber.pattern, 'Invalid mobile number'),
|
|
62
|
-
});
|
|
63
|
-
const form = useForm({
|
|
64
|
-
mode: 'all',
|
|
65
|
-
resolver: zodResolver(definition),
|
|
66
|
-
defaultValues: {
|
|
67
|
-
amount: '0',
|
|
68
|
-
password: '',
|
|
69
|
-
mobileNumber: '',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
if (minimumAmount) {
|
|
74
|
-
form.reset({
|
|
75
|
-
amount: minimumAmount.toString(),
|
|
76
|
-
password: '',
|
|
77
|
-
mobileNumber: '',
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}, [form, minimumAmount]);
|
|
81
|
-
const handleSubmit = form.handleSubmit(async (data) => {
|
|
82
|
-
createWithdrawalMutation.mutate({
|
|
83
|
-
amount: data.amount,
|
|
84
|
-
recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
|
|
85
|
-
transactionPassword: data.password,
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx(localeInfo.country.flag, { className: "pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2" }), _jsx(Field.Input, { className: "pl-10.5", ...form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: form.formState.errors.mobileNumber?.message })] }), _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) => {
|
|
89
|
-
o.field.onChange(details.value);
|
|
90
|
-
}, formatOptions: {
|
|
91
|
-
maximumFractionDigits: 2,
|
|
92
|
-
minimumFractionDigits: 0,
|
|
93
|
-
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _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) => {
|
|
94
|
-
form.setValue('amount', value.toString(), {
|
|
95
|
-
shouldTouch: true,
|
|
96
|
-
shouldDirty: true,
|
|
97
|
-
shouldValidate: true,
|
|
98
|
-
});
|
|
99
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
|
|
100
|
-
if (!details.open) {
|
|
101
|
-
setStatus('waiting');
|
|
102
|
-
}
|
|
103
|
-
}, 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 Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
|
|
104
|
-
"We're verifying your account and amount. Please hold a moment.", status === 'success' &&
|
|
105
|
-
'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
|
|
106
|
-
'Something went wrong while processing your withdrawal. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
107
|
-
api.setOpen(false);
|
|
108
|
-
}, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
|
|
109
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Withdrawal(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import { useShallow } from 'zustand/shallow';
|
|
4
|
-
import { useAccountQuery, useGlobalStore, useIsMayaSessionValidQuery, useOnMMA, usePaymentSettingsQuery, useWalletQuery, } from '../../../client/hooks/index.js';
|
|
5
|
-
import { AlertCircleIcon, SpinnerIcon } from '../../../icons/index.js';
|
|
6
|
-
import { Button } from '../../../ui/index.js';
|
|
7
|
-
import { onMobileDevice, parseDecimal } from '../../../utils/index.js';
|
|
8
|
-
import { PaymentMethods } from '../PaymentMethods.js';
|
|
9
|
-
import { GCashWithdrawal } from './GCashWithdrawal/GCashWithdrawal.js';
|
|
10
|
-
import { InstapayWithdrawal } from './InstapayWithdrawal/InstapayWithdrawal.js';
|
|
11
|
-
import { MayaAppWithdrawal } from './MayaAppWithdrawal/MayaAppWithdrawal.js';
|
|
12
|
-
import { MayaWithdrawal } from './MayaWithdrawal/MayaWithdrawal.js';
|
|
13
|
-
export function Withdrawal() {
|
|
14
|
-
const [onMMA] = useOnMMA();
|
|
15
|
-
const walletQuery = useWalletQuery();
|
|
16
|
-
const wallet = walletQuery.data;
|
|
17
|
-
const accountQuery = useAccountQuery();
|
|
18
|
-
const account = accountQuery.data;
|
|
19
|
-
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
20
|
-
const paymentSettings = paymentSettingsQuery.data;
|
|
21
|
-
const isMayaSessionValidQuery = useIsMayaSessionValidQuery();
|
|
22
|
-
const isMayaSessionValid = isMayaSessionValidQuery.data ?? true;
|
|
23
|
-
const enabledPaymentMethods = (() => {
|
|
24
|
-
const l = [];
|
|
25
|
-
if (onMMA) {
|
|
26
|
-
l.push('MAYA_APP');
|
|
27
|
-
}
|
|
28
|
-
else if (onMobileDevice()) {
|
|
29
|
-
if (paymentSettings?.gcashWithdrawalGatewaySettings?.mobileWebEnabled) {
|
|
30
|
-
l.push('GCASH');
|
|
31
|
-
}
|
|
32
|
-
if (paymentSettings?.mayaWithdrawalGatewaySettings?.mobileWebEnabled) {
|
|
33
|
-
l.push('MAYA');
|
|
34
|
-
}
|
|
35
|
-
if (paymentSettings?.instapayWithdrawalGatewaySettings?.mobileWebEnabled) {
|
|
36
|
-
l.push('INSTAPAY');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
if (paymentSettings?.gcashWithdrawalGatewaySettings?.webEnabled) {
|
|
41
|
-
l.push('GCASH');
|
|
42
|
-
}
|
|
43
|
-
if (paymentSettings?.mayaWithdrawalGatewaySettings?.webEnabled) {
|
|
44
|
-
l.push('MAYA');
|
|
45
|
-
}
|
|
46
|
-
if (paymentSettings?.instapayWithdrawalGatewaySettings?.mobileWebEnabled) {
|
|
47
|
-
l.push('INSTAPAY');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return l;
|
|
51
|
-
})();
|
|
52
|
-
const [paymentMethod, setPaymentMethod] = useState();
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
if (enabledPaymentMethods.length > 0 && !paymentMethod) {
|
|
55
|
-
setPaymentMethod(enabledPaymentMethods[0]);
|
|
56
|
-
}
|
|
57
|
-
}, [enabledPaymentMethods, paymentMethod]);
|
|
58
|
-
if (accountQuery.isLoading ||
|
|
59
|
-
walletQuery.isLoading ||
|
|
60
|
-
paymentSettingsQuery.isLoading ||
|
|
61
|
-
isMayaSessionValidQuery.isLoading) {
|
|
62
|
-
return _jsx(SpinnerIcon, { className: "mx-auto size-6" });
|
|
63
|
-
}
|
|
64
|
-
if (!isMayaSessionValid) {
|
|
65
|
-
return _jsx(MayaSessionSessionExpired, {});
|
|
66
|
-
}
|
|
67
|
-
if (parseDecimal(wallet?.balance, 0) < 1) {
|
|
68
|
-
return _jsx(InsufficientBalance, {});
|
|
69
|
-
}
|
|
70
|
-
if (!account?.transactionPassword ||
|
|
71
|
-
account.verificationStatus !== 'VERIFIED') {
|
|
72
|
-
return _jsx(AccountVerificationRequired, {});
|
|
73
|
-
}
|
|
74
|
-
if (enabledPaymentMethods.length <= 0) {
|
|
75
|
-
return _jsx(NoAvailablePaymentMethods, {});
|
|
76
|
-
}
|
|
77
|
-
return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {})] }));
|
|
78
|
-
}
|
|
79
|
-
function AccountVerificationRequired() {
|
|
80
|
-
return (_jsxs("div", { className: "pt-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Personal Verification" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "To withdraw funds, you must first verify your identity. Complete personal verification to ensure your account\u2019s security." }), _jsx(Button, { className: "mt-3xl", children: "Verify Now" })] }));
|
|
81
|
-
}
|
|
82
|
-
function InsufficientBalance() {
|
|
83
|
-
const setTab = useGlobalStore(useShallow((ctx) => ctx.depositWithdrawal.setTab));
|
|
84
|
-
return (_jsxs("div", { className: "pt-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Balance is very low" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "No funds available for withdrawal. Please make a deposit." }), _jsx(Button, { className: "mt-3xl", onClick: () => setTab('DEPOSIT'), children: "Deposit" })] }));
|
|
85
|
-
}
|
|
86
|
-
function NoAvailablePaymentMethods() {
|
|
87
|
-
return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Not Available" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "Withdrawal is not available at this time. Please try again later or contact support for assistance." })] }));
|
|
88
|
-
}
|
|
89
|
-
function MayaSessionSessionExpired() {
|
|
90
|
-
return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Session Expired" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "Your session has timed out. To continue with deposits or withdrawals, Please try reloading the app." })] }));
|
|
91
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DepositWithdrawal';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DepositWithdrawal.js';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Portal } from '@ark-ui/react';
|
|
4
|
-
import Image from 'next/image';
|
|
5
|
-
import { useRef } from 'react';
|
|
6
|
-
import pagcorLogo from '../../images/pagcor.png';
|
|
7
|
-
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
8
|
-
import { Button, Dialog } from '../../ui/index.js';
|
|
9
|
-
import { useDisclaimer } from './useDisclaimer.js';
|
|
10
|
-
export function Disclaimer(props) {
|
|
11
|
-
const disclaimer = useDisclaimer();
|
|
12
|
-
const acceptTriggerRef = useRef(null);
|
|
13
|
-
return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "mt-3xl text-center text-lg font-semibold", children: "Age Verification" }), _jsxs(Dialog.Description, { className: "text-text-tertiary-600 mt-xs text-center text-sm", children: ["By entering this website I acknowledge and confirmI am 21 years of age and I agree with the", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", children: "Terms and Conditions." })] }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx(Button, { ref: acceptTriggerRef, type: "button", className: "mt-4xl", onClick: disclaimer.close, children: "Accept" })] }) })] }) }));
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Disclaimer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Disclaimer.js';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { addMinutes } from 'date-fns';
|
|
2
|
-
import { clamp } from 'lodash-es';
|
|
3
|
-
import { useLocalStorage, useTimeout } from 'usehooks-ts';
|
|
4
|
-
import { useShallow } from 'zustand/shallow';
|
|
5
|
-
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
|
-
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
7
|
-
export function useDisclaimer() {
|
|
8
|
-
'use no memo';
|
|
9
|
-
const sessionQuery = useSessionQuery();
|
|
10
|
-
const disclaimerStore = useGlobalStore(useShallow((state) => state.disclaimer));
|
|
11
|
-
const [refreshPausedUntil, setRefreshPausedUntil] = useLocalStorage('WebPortalDisclaimerRefreshPausedUntil', null, {
|
|
12
|
-
serializer(v) {
|
|
13
|
-
return v?.toISOString() ?? '';
|
|
14
|
-
},
|
|
15
|
-
deserializer(v) {
|
|
16
|
-
return v ? new Date(v) : null;
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
const now = new Date();
|
|
20
|
-
const refetchPausedUntilInMs = refreshPausedUntil
|
|
21
|
-
? clamp(refreshPausedUntil.getTime() - now.getTime(), 0, Infinity)
|
|
22
|
-
: /* set to zero to trigger timeout function */ 0;
|
|
23
|
-
useTimeout(() => {
|
|
24
|
-
disclaimerStore.setOpen(true);
|
|
25
|
-
}, refetchPausedUntilInMs);
|
|
26
|
-
return {
|
|
27
|
-
open: sessionQuery.isLoading
|
|
28
|
-
? false
|
|
29
|
-
: sessionQuery.data?.status === 'authenticated'
|
|
30
|
-
? false
|
|
31
|
-
: disclaimerStore.open,
|
|
32
|
-
close: () => {
|
|
33
|
-
disclaimerStore.setOpen(false);
|
|
34
|
-
setRefreshPausedUntil(addMinutes(new Date(), 30));
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ComponentType } from 'react';
|
|
2
|
-
interface EmptyProps {
|
|
3
|
-
icon: ComponentType<ComponentProps<'svg'>>;
|
|
4
|
-
title: string;
|
|
5
|
-
message: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function Empty(props: EmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
package/dist/components/Empty.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function Empty(props) {
|
|
3
|
-
return (_jsxs("div", { role: "alert", "aria-live": "polite", style: props.style, className: props.className, children: [_jsxs("div", { className: "relative mx-auto w-[9.5rem] pt-4", children: [_jsx("div", { className: "bg-utility-gray-200 absolute left-1/2 top-0 size-[6.5rem] -translate-x-1/2 rounded-full" }), _jsx(CloudIcon, { className: "relative h-auto w-full shrink-0" }), _jsx("div", { className: "bg-utility-gray-200/40 absolute bottom-2 left-1/2 flex size-12 -translate-x-1/2 items-center justify-center rounded-full backdrop-blur-sm", children: _jsx(props.icon, { className: "size-6 text-white" }) }), _jsx("div", { className: "bg-utility-gray-200 absolute left-4 top-3.5 size-2.5 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute bottom-0.5 left-3 size-3.5 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute right-3.5 top-1 size-2 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute right-0 top-6.5 size-3.5 rounded-full" })] }), _jsx("h2", { className: "mt-xl text-center font-semibold", children: props.title }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: props.message })] }));
|
|
4
|
-
}
|
|
5
|
-
function CloudIcon(props) {
|
|
6
|
-
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152 104", fill: "none", ...props, children: [_jsxs("g", { filter: "url(#filter0_dd_2719_19242)", children: [_jsx("path", { d: "M77.6 0C66.8273 0 57.2978 5.32329 51.4987 13.4829C49.605 13.0363 47.6301 12.8 45.6 12.8C31.4615 12.8 20 24.2615 20 38.4C20 52.5385 31.4615 64 45.6 64L109.6 64C121.971 64 132 53.9712 132 41.6C132 29.2288 121.971 19.2 109.6 19.2C108.721 19.2 107.854 19.2506 107.002 19.349C102.098 7.9677 90.7797 0 77.6 0Z", fill: "#F9FAFB" }), _jsx("ellipse", { cx: "45.6", cy: "38.4008", rx: "25.6", ry: "25.6", fill: "url(#paint0_linear_2719_19242)" }), _jsx("circle", { cx: "77.6", cy: "32", r: "32", fill: "url(#paint1_linear_2719_19242)" }), _jsx("ellipse", { cx: "109.6", cy: "41.5992", rx: "22.4", ry: "22.4", fill: "url(#paint2_linear_2719_19242)" })] }), _jsxs("defs", { children: [_jsxs("filter", { id: "filter0_dd_2719_19242", x: "0", y: "0", width: "152", height: "104", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [_jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), _jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), _jsx("feMorphology", { radius: "4", operator: "erode", in: "SourceAlpha", result: "effect1_dropShadow_2719_19242" }), _jsx("feOffset", { dy: "8" }), _jsx("feGaussianBlur", { stdDeviation: "4" }), _jsx("feComposite", { in2: "hardAlpha", operator: "out" }), _jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.03 0" }), _jsx("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_2719_19242" }), _jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), _jsx("feMorphology", { radius: "4", operator: "erode", in: "SourceAlpha", result: "effect2_dropShadow_2719_19242" }), _jsx("feOffset", { dy: "20" }), _jsx("feGaussianBlur", { stdDeviation: "12" }), _jsx("feComposite", { in2: "hardAlpha", operator: "out" }), _jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.08 0" }), _jsx("feBlend", { mode: "normal", in2: "effect1_dropShadow_2719_19242", result: "effect2_dropShadow_2719_19242" }), _jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect2_dropShadow_2719_19242", result: "shape" })] }), _jsxs("linearGradient", { id: "paint0_linear_2719_19242", x1: "25.9429", y1: "21.4865", x2: "71.2", y2: "64.0007", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] }), _jsxs("linearGradient", { id: "paint1_linear_2719_19242", x1: "53.0286", y1: "10.8571", x2: "109.6", y2: "64", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] }), _jsxs("linearGradient", { id: "paint2_linear_2719_19242", x1: "92.4", y1: "26.7992", x2: "132", y2: "63.9992", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] })] })] }));
|
|
7
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Image from 'next/image';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { useFavoriteGamesQuery, useSessionQuery, useUnmarkGameAsFavoriteMutation, } from '../../client/hooks/index.js';
|
|
6
|
-
import { ArrowLeftIcon, ArrowRightIcon, Star01Icon } from '../../icons/index.js';
|
|
7
|
-
import { Button } from '../../ui/index.js';
|
|
8
|
-
import { getGameImageUrl } from '../../utils/index.js';
|
|
9
|
-
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
10
|
-
export function FavoriteGames__client(props) {
|
|
11
|
-
const gamesQuery = useFavoriteGamesQuery();
|
|
12
|
-
const games = gamesQuery.data ?? [];
|
|
13
|
-
if (games.length <= 0)
|
|
14
|
-
return null;
|
|
15
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Favorite Games' }), _jsx("div", { className: "grow" }), _jsx("div", { className: "flex items-center justify-center gap-xl", children: _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] }) })] }), _jsx("div", { className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col grid-rows-1 gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md'), children: games.map((game) => (_jsx(Item, { game: game }, game.id))) }) })] }));
|
|
16
|
-
}
|
|
17
|
-
function Item({ game }) {
|
|
18
|
-
const sessionQuery = useSessionQuery();
|
|
19
|
-
const session = sessionQuery.data;
|
|
20
|
-
const unmarkGameAsFavoriteMutation = useUnmarkGameAsFavoriteMutation();
|
|
21
|
-
return (_jsxs(GameLaunchTrigger, { game: game, className: "relative block w-full shadow-sm", children: [session?.status === 'authenticated' && (_jsx("div", { role: "button", onClick: (e) => {
|
|
22
|
-
e.preventDefault();
|
|
23
|
-
e.stopPropagation();
|
|
24
|
-
if (unmarkGameAsFavoriteMutation.isPending)
|
|
25
|
-
return;
|
|
26
|
-
unmarkGameAsFavoriteMutation.mutate(game.id);
|
|
27
|
-
}, "aria-disabled": unmarkGameAsFavoriteMutation.isPending, className: "rounded-xs absolute right-2 top-2 flex size-9 items-center justify-center bg-black/65 blur-[0.5px]", children: _jsx(Star01Icon, { className: "fill-yellow-400 text-yellow-400 size-5" }) })), _jsx(Image, { src: getGameImageUrl({
|
|
28
|
-
id: game.id,
|
|
29
|
-
provider: game.provider,
|
|
30
|
-
}), alt: "", width: 200, height: 200, priority: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: game.name })] }));
|
|
31
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { prefetchFavoriteGamesQuery } from '../../server/utils/index.js';
|
|
3
|
-
import { FavoriteGames__client } from './FavoriteGames.client.js';
|
|
4
|
-
export async function FavoriteGames(props) {
|
|
5
|
-
await prefetchFavoriteGamesQuery();
|
|
6
|
-
return _jsx(FavoriteGames__client, { ...props });
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FavoriteGames';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FavoriteGames.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function GameLaunch(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { Dialog, Portal } from '@ark-ui/react';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { useShallow } from 'zustand/shallow';
|
|
6
|
-
import { useDisclosure, useEndGameSessionMutation, useFavoriteGamesQuery, useGlobalStore, useMarkGameAsFavoriteMutation, useUnmarkGameAsFavoriteMutation, } from '../../client/hooks/index.js';
|
|
7
|
-
import { AlertCircleIcon, ChevronDownIcon, ChevronLeftIcon, CoinsHandIcon, Expand03Icon, SpinnerIcon, Star01Icon, XIcon, } from '../../icons/index.js';
|
|
8
|
-
import { AlertDialog, Button, IconButton, Presence } from '../../ui/index.js';
|
|
9
|
-
export function GameLaunch() {
|
|
10
|
-
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
11
|
-
gameLaunch: ctx.gameLaunch,
|
|
12
|
-
depositWithdrawal: ctx.depositWithdrawal,
|
|
13
|
-
})));
|
|
14
|
-
const maximizeDisclosure = useDisclosure({ defaultOpen: true });
|
|
15
|
-
const cancelDisclosure = useDisclosure();
|
|
16
|
-
async function endGameSession() {
|
|
17
|
-
if (globalStore.gameLaunch.details.status === 'PLAYING') {
|
|
18
|
-
await endGameSessionMutation.mutateAsync({
|
|
19
|
-
game: globalStore.gameLaunch.details.game,
|
|
20
|
-
session: globalStore.gameLaunch.details.session,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
maximizeDisclosure.setOpen(true);
|
|
24
|
-
globalStore.gameLaunch.setDetails({
|
|
25
|
-
status: 'WAITING',
|
|
26
|
-
session: null,
|
|
27
|
-
game: null,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
const favoriteGamesQuery = useFavoriteGamesQuery();
|
|
31
|
-
const favoriteGames = favoriteGamesQuery.data ?? [];
|
|
32
|
-
const endGameSessionMutation = useEndGameSessionMutation();
|
|
33
|
-
const markGameAsFavoriteMutation = useMarkGameAsFavoriteMutation();
|
|
34
|
-
const unmarkGameAsFavoriteMutation = useUnmarkGameAsFavoriteMutation();
|
|
35
|
-
const markedAsFavorite = favoriteGames.some((favoriteGame) => {
|
|
36
|
-
return !globalStore.gameLaunch.details.game
|
|
37
|
-
? false
|
|
38
|
-
: 'reference' in globalStore.gameLaunch.details.game
|
|
39
|
-
? favoriteGame.id === globalStore.gameLaunch.details.game.reference
|
|
40
|
-
: favoriteGame.id === globalStore.gameLaunch.details.game.id;
|
|
41
|
-
});
|
|
42
|
-
return (_jsxs(_Fragment, { children: [_jsx(Dialog.Root, { open: globalStore.gameLaunch.details.status !== 'WAITING' &&
|
|
43
|
-
!cancelDisclosure.open, lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsx(Portal, { children: _jsx(Dialog.Positioner, { className: "z-dialog fixed inset-0", children: _jsxs(Dialog.Content, { className: "ui-open:animate-dialog-in ui-closed:animate-dialog-out bg-bg-primary-alt relative size-full", children: [_jsx(Presence, { asChild: true, lazyMount: true, unmountOnExit: true, present: !maximizeDisclosure.open, children: _jsxs("section", { className: "ui-open:animate-slide-in-down ui-closed:animate-slide-out-down bg-bg-primary-alt z-1 absolute left-0 top-0 flex h-[3.25rem] w-full items-center gap-2 px-4 py-2", children: [_jsx(IconButton, { size: "xs", variant: "outline", onClick: () => {
|
|
44
|
-
if (globalStore.gameLaunch.details.status !== 'PLAYING') {
|
|
45
|
-
endGameSession();
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
cancelDisclosure.setOpen(true);
|
|
49
|
-
}, disabled: globalStore.gameLaunch.details.status === 'LOADING', children: _jsx(ChevronLeftIcon, { className: "size-5" }) }), _jsx("div", { className: "grow" }), _jsx(IconButton, { size: "xs", variant: "outline", disabled: unmarkGameAsFavoriteMutation.isPending ||
|
|
50
|
-
markGameAsFavoriteMutation.isPending, onClick: () => {
|
|
51
|
-
if (!globalStore.gameLaunch.details.game)
|
|
52
|
-
return;
|
|
53
|
-
if (markedAsFavorite) {
|
|
54
|
-
unmarkGameAsFavoriteMutation.mutate('reference' in globalStore.gameLaunch.details.game
|
|
55
|
-
? globalStore.gameLaunch.details.game.reference
|
|
56
|
-
: globalStore.gameLaunch.details.game.id);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
markGameAsFavoriteMutation.mutate('reference' in globalStore.gameLaunch.details.game
|
|
60
|
-
? globalStore.gameLaunch.details.game.reference
|
|
61
|
-
: globalStore.gameLaunch.details.game.id);
|
|
62
|
-
}
|
|
63
|
-
}, children: _jsx(Star01Icon, { className: twMerge('size-5', markedAsFavorite
|
|
64
|
-
? 'text-yellow-400 fill-yellow-400'
|
|
65
|
-
: 'text-inherit') }) }), _jsx(IconButton, { size: "xs", variant: "outline", onClick: () => maximizeDisclosure.setOpen(true), children: _jsx(Expand03Icon, { className: "size-5" }) }), _jsx(IconButton, { size: "xs", fullWidth: false, onClick: () => {
|
|
66
|
-
globalStore.depositWithdrawal.setOpen(true);
|
|
67
|
-
}, children: _jsx(CoinsHandIcon, { className: "size-5" }) })] }) }), _jsx(Presence, { asChild: true, lazyMount: true, unmountOnExit: true, present: maximizeDisclosure.open, children: _jsx("button", { type: "button", onClick: () => maximizeDisclosure.setOpen(false), className: "shadow-xs ui-open:animate-slide-in-down ui-closed:animate-slide-out-down z-1 absolute left-1/2 top-0 flex h-7.5 w-[4.5rem] -translate-x-1/2 items-center justify-center rounded-b-md bg-white/30 backdrop-blur-sm", children: _jsx(ChevronDownIcon, {}) }) }), _jsxs("section", { className: "size-full", children: [globalStore.gameLaunch.details.status === 'LOADING' && (_jsx("div", { className: "flex size-full items-center justify-center", children: _jsx(SpinnerIcon, { className: "size-8" }) })), globalStore.gameLaunch.details.status === 'FAILED' && (_jsx("div", {})), globalStore.gameLaunch.details.status === 'PLAYING' && (_jsx("iframe", { src: globalStore.gameLaunch.details.session.launchUrl ?? '', className: "size-full" }))] })] }) }) }) }), _jsx(AlertDialog.Root, { role: "alertdialog", open: cancelDisclosure.open, onOpenChange: (details) => {
|
|
68
|
-
cancelDisclosure.setOpen(details.open);
|
|
69
|
-
}, lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, {}), _jsx(AlertDialog.Positioner, { children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(AlertDialog.Header, { children: _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, { className: "size-6" }) }) }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: "Quit Game" }), _jsx(AlertDialog.Description, { children: "Are you sure you want to quit?" })] }), _jsx(AlertDialog.Context, { children: (api) => (_jsxs(AlertDialog.Footer, { children: [_jsx(Button, { variant: "outline", colorScheme: "gray", disabled: endGameSessionMutation.isPending, onClick: () => {
|
|
70
|
-
api.setOpen(false);
|
|
71
|
-
}, children: "Cancel" }), _jsx(Button, { colorScheme: "danger", disabled: endGameSessionMutation.isPending, onClick: async () => {
|
|
72
|
-
await endGameSession();
|
|
73
|
-
api.setOpen(false);
|
|
74
|
-
}, children: "Proceed" })] })) })] }) })] }) })] }));
|
|
75
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '@ark-ui/react';
|
|
2
|
-
import type { FavoriteGame, Game } from '@opexa/portal-sdk-core';
|
|
3
|
-
export interface GameLaunchTriggerProps extends HTMLArkProps<'button'> {
|
|
4
|
-
game: Game | FavoriteGame;
|
|
5
|
-
asChild?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function GameLaunchTrigger(props: GameLaunchTriggerProps): import("react/jsx-runtime").JSX.Element;
|