@opexa/portal-components 0.0.99 → 0.0.100
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/client/hooks/useAccountQuery.js +3 -3
- package/dist/client/hooks/useAuthenticateMutation.d.ts +1 -1
- package/dist/client/hooks/useAuthenticateMutation.js +3 -2
- package/dist/client/hooks/useAvailablePromosQuery.d.ts +1 -1
- package/dist/client/hooks/useAvailablePromosQuery.js +3 -3
- package/dist/client/hooks/useAvailableQuestsCountQuery.js +3 -3
- package/dist/client/hooks/useAvailableQuestsQuery.js +3 -3
- package/dist/client/hooks/useBetRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useBetRecordsQuery.js +3 -3
- package/dist/client/hooks/useBonusQuery.js +3 -3
- package/dist/client/hooks/useBonusesCountQuery.js +3 -3
- package/dist/client/hooks/useBonusesQuery.js +3 -3
- package/dist/client/hooks/useCashbackBonusQuery.js +3 -3
- package/dist/client/hooks/useCashbackBonusesCountQuery.js +3 -3
- package/dist/client/hooks/useCashbackBonusesQuery.js +3 -3
- package/dist/client/hooks/useCashbackQuery.js +2 -2
- package/dist/client/hooks/useCashbacksQuery.js +2 -2
- package/dist/client/hooks/useCheckInDailyCheckInQuestMutation.js +3 -3
- package/dist/client/hooks/useClaimCashbackBonusMutation.js +4 -3
- package/dist/client/hooks/useClaimSpotBonusMutation.js +4 -3
- package/dist/client/hooks/useCreateGCashDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateGCashDepositMutation.js +5 -3
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.js +3 -3
- package/dist/client/hooks/useCreateGameSessionMutation.js +5 -3
- package/dist/client/hooks/useCreateInstapayWithdrawalMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateInstapayWithdrawalMutation.js +3 -3
- package/dist/client/hooks/useCreateMayaAppDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaAppDepositMutation.js +5 -3
- package/dist/client/hooks/useCreateMayaAppWithdrawalMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaAppWithdrawalMutation.js +3 -3
- package/dist/client/hooks/useCreateMayaDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaDepositMutation.js +5 -3
- package/dist/client/hooks/useCreateMayaWithdrawalMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaWithdrawalMutation.js +3 -3
- package/dist/client/hooks/useCreateOnlineBankDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateOnlineBankDepositMutation.js +5 -3
- package/dist/client/hooks/useCreateQRPHDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateQRPHDepositMutation.js +5 -3
- package/dist/client/hooks/useDepositQuery.js +3 -3
- package/dist/client/hooks/useDepositRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useDepositRecordsQuery.js +3 -3
- package/dist/client/hooks/useDepositsCountQuery.js +3 -3
- package/dist/client/hooks/useEndGameSessionMutation.js +4 -3
- package/dist/client/hooks/useFavoriteGamesQuery.js +3 -3
- package/dist/client/hooks/useGamesQuery.d.ts +1 -1
- package/dist/client/hooks/useGamesQuery.js +2 -2
- package/dist/client/hooks/useGlobalStore.d.ts +3 -0
- package/dist/client/hooks/useGlobalStore.js +41 -1
- package/dist/client/hooks/useInstapayBankListQuery.js +3 -3
- package/dist/client/hooks/useIsMayaSessionValidQuery.js +5 -5
- package/dist/client/hooks/useJackpotPayoutsQuery.d.ts +1 -1
- package/dist/client/hooks/useJackpotPayoutsQuery.js +2 -2
- package/dist/client/hooks/useJackpotsCountQuery.d.ts +1 -1
- package/dist/client/hooks/useJackpotsCountQuery.js +2 -2
- package/dist/client/hooks/useJackpotsQuery.d.ts +1 -1
- package/dist/client/hooks/useJackpotsQuery.js +2 -2
- package/dist/client/hooks/useLocaleInfo.d.ts +1 -1
- package/dist/client/hooks/useLocaleInfo.js +1 -1
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +4 -3
- package/dist/client/hooks/useMarkMessageAsReadMutation.js +4 -3
- package/dist/client/hooks/useMemberVerificationQuery.js +3 -3
- package/dist/client/hooks/useMessagesQuery.d.ts +1 -1
- package/dist/client/hooks/useMessagesQuery.js +3 -3
- package/dist/client/hooks/usePaymentSettingsQuery.js +3 -3
- package/dist/client/hooks/usePlatformQuery.js +2 -2
- package/dist/client/hooks/useProfileCompletionQuery.js +3 -3
- package/dist/client/hooks/usePromoQuery.js +2 -2
- package/dist/client/hooks/usePromosQuery.js +2 -2
- package/dist/client/hooks/useSendVerificationCodeMutation.d.ts +1 -1
- package/dist/client/hooks/useSendVerificationCodeMutation.js +2 -2
- package/dist/client/hooks/useSessionQuery.js +4 -4
- package/dist/client/hooks/useSignInMutation.d.ts +1 -1
- package/dist/client/hooks/useSignInMutation.js +3 -2
- package/dist/client/hooks/useSignOutMutation.js +3 -2
- package/dist/client/hooks/useSignUpMutation.d.ts +1 -1
- package/dist/client/hooks/useSignUpMutation.js +2 -2
- package/dist/client/hooks/useTopWinsQuery.js +2 -2
- package/dist/client/hooks/useTournamentsCountQuery.d.ts +1 -1
- package/dist/client/hooks/useTournamentsCountQuery.js +2 -2
- package/dist/client/hooks/useTournamentsQuery.d.ts +1 -1
- package/dist/client/hooks/useTournamentsQuery.js +2 -2
- package/dist/client/hooks/useTransactionRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useTransactionRecordsQuery.js +3 -3
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +4 -3
- package/dist/client/hooks/useUnreadMessagesCountQuery.d.ts +1 -1
- package/dist/client/hooks/useUnreadMessagesCountQuery.js +3 -3
- package/dist/client/hooks/useUpdateAccountMutation.d.ts +1 -1
- package/dist/client/hooks/useUpdateAccountMutation.js +4 -3
- package/dist/client/hooks/useWalletQuery.js +3 -3
- package/dist/client/hooks/useWithdrawalRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useWithdrawalRecordsQuery.js +3 -3
- package/dist/client/services/authenticate.d.ts +1 -1
- package/dist/client/services/signIn.d.ts +1 -1
- package/dist/client/utils/createRecipeContext.js +1 -1
- package/dist/client/utils/toaster.d.ts +1 -1
- package/dist/client/utils/toaster.js +1 -1
- package/dist/components/Account/Account.d.ts +3 -23
- package/dist/components/Account/Account.js +10 -115
- package/dist/components/Account/Account.lazy.d.ts +23 -0
- package/dist/components/Account/Account.lazy.js +138 -0
- package/dist/components/Account/AccountTrigger.js +2 -2
- package/dist/components/AccountInfo/AccountInfo.js +10 -4
- package/dist/components/AccountSecurity/AccountSecurity.js +13 -4
- package/dist/components/AccountVerification/AccountVerification.js +12 -3
- package/dist/components/Banner/Banner.d.ts +2 -2
- package/dist/components/Banner/Banner.js +2 -2
- package/dist/components/BetRecords/BetRecords.client.d.ts +7 -0
- package/dist/components/BetRecords/BetRecords.client.js +189 -0
- package/dist/components/BetRecords/BetRecords.d.ts +3 -7
- package/dist/components/BetRecords/BetRecords.js +8 -174
- package/dist/components/Bonus/Bonus.client.d.ts +9 -1
- package/dist/components/Bonus/Bonus.client.js +13 -4
- package/dist/components/Bonus/Bonus.d.ts +2 -9
- package/dist/components/Bonus/Bonus.js +22 -6
- package/dist/components/Bonuses/Bonuses.client.d.ts +9 -1
- package/dist/components/Bonuses/Bonuses.client.js +14 -4
- package/dist/components/Bonuses/Bonuses.d.ts +2 -9
- package/dist/components/Bonuses/Bonuses.js +3 -2
- package/dist/components/Bonuses/BonusesTrigger.js +7 -6
- package/dist/components/Cashback/Cashback.client.d.ts +6 -1
- package/dist/components/Cashback/Cashback.client.js +7 -3
- package/dist/components/Cashback/Cashback.d.ts +2 -6
- package/dist/components/Cashback/Cashback.js +11 -6
- package/dist/components/DepositWithdrawal/AmountChoices.js +5 -3
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +5 -3
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +6 -3
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +15 -4
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +15 -4
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +15 -4
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.js +5 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +5 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +10 -4
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +2 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +5 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +4 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +10 -4
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +2 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +10 -27
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +1 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +36 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +5 -2
- package/dist/components/DepositWithdrawal/PaymentMethods.js +4 -3
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +17 -4
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +18 -4
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +15 -4
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +17 -4
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +11 -4
- package/dist/components/Disclaimer/DisclaimerV1.js +2 -1
- package/dist/components/Disclaimer/DisclaimerV2.js +2 -1
- package/dist/components/Disclaimer/ResponsibleGaming.js +2 -1
- package/dist/components/Disclaimer/TermsOfUse.js +3 -2
- package/dist/components/Empty.d.ts +1 -2
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +5 -1
- package/dist/components/FavoriteGames/FavoriteGames.client.js +8 -4
- package/dist/components/FavoriteGames/FavoriteGames.d.ts +2 -5
- package/dist/components/FavoriteGames/FavoriteGames.js +2 -2
- package/dist/components/GameLaunch/GameLaunch.d.ts +1 -1
- package/dist/components/GameLaunch/GameLaunch.js +10 -71
- package/dist/components/GameLaunch/GameLaunch.lazy.d.ts +1 -0
- package/dist/components/GameLaunch/GameLaunch.lazy.js +90 -0
- package/dist/components/GameLaunch/GameLaunchTrigger.js +4 -2
- package/dist/components/GameProviders/GameProvidersCarousel.js +5 -3
- package/dist/components/GameProviders/GameProvidersList.js +4 -3
- package/dist/components/Games/Game.js +14 -5
- package/dist/components/Games/GamesCarousel.client.d.ts +24 -1
- package/dist/components/Games/GamesCarousel.client.js +7 -3
- package/dist/components/Games/GamesCarousel.d.ts +2 -23
- package/dist/components/Games/GamesCarousel.js +2 -2
- package/dist/components/Games/GamesContext.js +1 -1
- package/dist/components/Games/GamesList.client.d.ts +19 -1
- package/dist/components/Games/GamesList.client.js +6 -3
- package/dist/components/Games/GamesList.d.ts +2 -18
- package/dist/components/Games/GamesList.js +1 -1
- package/dist/components/GamesSearch/GamesSearch.d.ts +1 -1
- package/dist/components/GamesSearch/GamesSearch.js +10 -4
- package/dist/components/Jackpots/Jackpots.js +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarousel.js +6 -4
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselContext.js +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +9 -3
- package/dist/components/Jackpots/JackpotsList/JackpotsList.js +2 -2
- package/dist/components/Jackpots/JackpotsList/JackpotsListContext.js +1 -1
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +8 -2
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemGameProviders.js +3 -2
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +12 -3
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemRules.js +2 -2
- package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.d.ts +1 -1
- package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.js +3 -2
- package/dist/components/KYC/Header.js +4 -2
- package/dist/components/KYC/Indicator.js +2 -2
- package/dist/components/KYC/KYC.d.ts +1 -1
- package/dist/components/KYC/KYC.js +10 -22
- package/dist/components/KYC/KYC.lazy.d.ts +1 -0
- package/dist/components/KYC/KYC.lazy.js +26 -0
- package/dist/components/KYC/KYCContext.js +1 -1
- package/dist/components/KYC/KYCTrigger.js +1 -1
- package/dist/components/KYC/Step1.js +3 -2
- package/dist/components/KYC/Step2.js +3 -2
- package/dist/components/KYC/Step3.js +4 -2
- package/dist/components/KYC/Step4.js +3 -2
- package/dist/components/Messages/Message.js +3 -1
- package/dist/components/Messages/MessageContext.js +1 -1
- package/dist/components/Messages/MessagePopup.js +3 -3
- package/dist/components/Messages/MessageTrigger.js +2 -1
- package/dist/components/Messages/Messages.d.ts +3 -13
- package/dist/components/Messages/Messages.js +10 -35
- package/dist/components/Messages/Messages.lazy.d.ts +13 -0
- package/dist/components/Messages/Messages.lazy.js +48 -0
- package/dist/components/Messages/MessagesTrigger.js +7 -4
- package/dist/components/Messages/utils.d.ts +1 -1
- package/dist/components/Messages/utils.js +1 -1
- package/dist/components/PortalProvider/PortalProvider.js +8 -5
- package/dist/components/PortalProvider/Providers.js +1 -1
- package/dist/components/PortalProvider/Snackbar.js +4 -3
- package/dist/components/Promo/Promo.client.d.ts +6 -1
- package/dist/components/Promo/Promo.client.js +7 -3
- package/dist/components/Promo/Promo.d.ts +2 -6
- package/dist/components/Promo/Promo.js +11 -6
- package/dist/components/Promos/Cashback.js +3 -2
- package/dist/components/Promos/Promo.js +3 -2
- package/dist/components/Promos/Promos.js +3 -2
- package/dist/components/Promos/PromosCarousel.js +7 -3
- package/dist/components/Promos/PromosGrid.js +2 -1
- package/dist/components/Protected/Protected.d.ts +1 -2
- package/dist/components/Protected/Protected.js +1 -1
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +10 -5
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +3 -2
- package/dist/components/Quests/Quests.client.d.ts +5 -1
- package/dist/components/Quests/Quests.client.js +2 -2
- package/dist/components/Quests/Quests.d.ts +2 -5
- package/dist/components/Quests/Quests.js +1 -1
- package/dist/components/Quests/WageringQuest/WageringQuest.js +3 -2
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +3 -2
- package/dist/components/Search/Search.d.ts +3 -21
- package/dist/components/Search/Search.js +10 -64
- package/dist/components/Search/Search.lazy.d.ts +20 -0
- package/dist/components/Search/Search.lazy.js +78 -0
- package/dist/components/Search/SearchTrigger.js +1 -1
- package/dist/components/SignIn/MobileNumberSignIn.js +16 -5
- package/dist/components/SignIn/NameAndPasswordSignIn.js +16 -7
- package/dist/components/SignIn/SignIn.d.ts +3 -7
- package/dist/components/SignIn/SignIn.js +10 -14
- package/dist/components/SignIn/SignIn.lazy.d.ts +7 -0
- package/dist/components/SignIn/SignIn.lazy.js +18 -0
- package/dist/components/SignIn/SignInContext.js +1 -1
- package/dist/components/SignIn/SignInMethod.js +1 -1
- package/dist/components/SignIn/SignInTrigger.js +1 -1
- package/dist/components/SignUp/SignUp.d.ts +3 -7
- package/dist/components/SignUp/SignUp.js +10 -12
- package/dist/components/SignUp/SignUp.lazy.d.ts +7 -0
- package/dist/components/SignUp/SignUp.lazy.js +16 -0
- package/dist/components/SignUp/SignUpForm.js +15 -5
- package/dist/components/SignUp/SignUpTrigger.js +1 -1
- package/dist/components/TopWins/TopWins.client.d.ts +5 -1
- package/dist/components/TopWins/TopWins.client.js +8 -3
- package/dist/components/TopWins/TopWins.d.ts +2 -5
- package/dist/components/TopWins/TopWins.js +1 -1
- package/dist/components/Tournaments/Tournaments.js +1 -1
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarousel.js +6 -4
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselContext.js +1 -1
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.js +8 -3
- package/dist/components/Tournaments/TournamentsList/TournamentsList.js +2 -2
- package/dist/components/Tournaments/TournamentsList/TournamentsListContext.js +1 -1
- package/dist/components/Tournaments/TournamentsList/TournamentsListItemDesktop.js +7 -2
- package/dist/components/Tournaments/TournamentsList/TournamentsListItemGameProviders.js +3 -2
- package/dist/components/Tournaments/TournamentsList/TournamentsListItemMobile.js +10 -3
- package/dist/components/Tournaments/TournamentsList/TournamentsListItemRules.js +3 -2
- package/dist/components/Tournaments/TournamentsList/useTournamentListItemData.d.ts +1 -1
- package/dist/components/Tournaments/TournamentsList/useTournamentListItemData.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +12 -4
- package/dist/components/TransactionRecords/TableFilters.js +9 -4
- package/dist/components/TransactionRecords/TransactionRecords.d.ts +1 -1
- package/dist/components/TransactionRecords/TransactionRecords.js +7 -2
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +11 -4
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +12 -4
- package/dist/constants/endpoints.js +2 -2
- package/dist/handlers.js +1 -1
- package/dist/middleware.js +1 -1
- package/dist/server/services/authenticate.d.ts +1 -1
- package/dist/server/services/authenticate.js +1 -1
- package/dist/server/services/signIn.d.ts +1 -1
- package/dist/server/services/signIn.js +1 -1
- package/dist/server/services/signOut.js +1 -1
- package/dist/server/utils/prefetchAccountQuery.js +3 -2
- package/dist/server/utils/prefetchAvailablePromosQuery.d.ts +1 -1
- package/dist/server/utils/prefetchAvailablePromosQuery.js +3 -2
- package/dist/server/utils/prefetchAvailableQuestsCountQuery.js +3 -2
- package/dist/server/utils/prefetchAvailableQuestsQuery.js +3 -2
- package/dist/server/utils/prefetchBetRecordsQuery.d.ts +1 -1
- package/dist/server/utils/prefetchBetRecordsQuery.js +3 -2
- package/dist/server/utils/prefetchBonusQuery.js +3 -2
- package/dist/server/utils/prefetchBonusesCountQuery.js +3 -2
- package/dist/server/utils/prefetchBonusesQuery.js +3 -2
- package/dist/server/utils/prefetchCashbackBonusQuery.js +3 -2
- package/dist/server/utils/prefetchCashbackBonusesCountQuery.js +4 -3
- package/dist/server/utils/prefetchCashbackBonusesQuery.js +4 -3
- package/dist/server/utils/prefetchCashbackQuery.js +3 -2
- package/dist/server/utils/prefetchCashbacksQuery.js +3 -2
- package/dist/server/utils/prefetchDepositQuery.js +3 -2
- package/dist/server/utils/prefetchDepositRecordsQuery.d.ts +1 -1
- package/dist/server/utils/prefetchDepositRecordsQuery.js +3 -2
- package/dist/server/utils/prefetchDepositsCountQuery.js +3 -2
- package/dist/server/utils/prefetchFavoriteGamesQuery.js +4 -3
- package/dist/server/utils/prefetchGamesQuery.d.ts +1 -1
- package/dist/server/utils/prefetchGamesQuery.js +3 -2
- package/dist/server/utils/prefetchInstapayBankListQuery.js +3 -2
- package/dist/server/utils/prefetchIsMayaSessionValidQuery.js +3 -2
- package/dist/server/utils/prefetchJackpotsCountQuery.d.ts +1 -1
- package/dist/server/utils/prefetchJackpotsCountQuery.js +3 -2
- package/dist/server/utils/prefetchJackpotsQuery.d.ts +1 -1
- package/dist/server/utils/prefetchJackpotsQuery.js +3 -2
- package/dist/server/utils/prefetchMemberVerificationQuery.js +3 -2
- package/dist/server/utils/prefetchPaymentSettingsQuery.js +3 -2
- package/dist/server/utils/prefetchPlatformQuery.js +3 -2
- package/dist/server/utils/prefetchProfileCompletionQuery.js +3 -2
- package/dist/server/utils/prefetchPromoQuery.js +3 -2
- package/dist/server/utils/prefetchPromosQuery.js +3 -2
- package/dist/server/utils/prefetchSessionQuery.js +2 -1
- package/dist/server/utils/prefetchTopWinsQuery.js +3 -2
- package/dist/server/utils/prefetchTournamentsCountQuery.d.ts +1 -1
- package/dist/server/utils/prefetchTournamentsCountQuery.js +3 -2
- package/dist/server/utils/prefetchTournamentsQuery.d.ts +1 -1
- package/dist/server/utils/prefetchTournamentsQuery.js +3 -2
- package/dist/server/utils/prefetchTransactionRecordsQuery.d.ts +1 -1
- package/dist/server/utils/prefetchTransactionRecordsQuery.js +3 -2
- package/dist/server/utils/prefetchUnreadMessagesCountQuery.d.ts +1 -1
- package/dist/server/utils/prefetchUnreadMessagesCountQuery.js +3 -2
- package/dist/server/utils/prefetchWalletQuery.js +3 -2
- package/dist/server/utils/prefetchWithdrawalRecordsQuery.d.ts +1 -1
- package/dist/server/utils/prefetchWithdrawalRecordsQuery.js +3 -2
- package/dist/services/account.d.ts +341 -0
- package/dist/services/account.js +233 -0
- package/dist/services/auth.d.ts +80 -0
- package/dist/services/auth.js +152 -0
- package/dist/services/cmsPortal.d.ts +43 -0
- package/dist/services/cmsPortal.js +148 -0
- package/dist/services/file.d.ts +33 -0
- package/dist/services/file.js +18 -0
- package/dist/services/game.d.ts +44 -0
- package/dist/services/game.js +33 -0
- package/dist/services/portal.d.ts +37 -0
- package/dist/services/portal.js +44 -0
- package/dist/services/report.d.ts +223 -0
- package/dist/services/report.js +72 -0
- package/dist/services/trigger.d.ts +94 -0
- package/dist/services/trigger.js +88 -0
- package/dist/services/wallet.d.ts +475 -0
- package/dist/services/wallet.js +365 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
- package/dist/ui/AlertDialog/AlertDialog.js +1 -1
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
- package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
- package/dist/ui/Avatar/Avatar.js +1 -1
- package/dist/ui/Avatar/avatar.recipe.js +1 -1
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/Badge.js +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Badge/badge.recipe.js +1 -1
- package/dist/ui/Button/Button.js +2 -1
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/Checkbox.js +1 -1
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/Clipboard.js +1 -1
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/clipboard.recipe.js +1 -1
- package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
- package/dist/ui/Collapsible/Collapsible.js +1 -1
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +8 -8
- package/dist/ui/Collapsible/collapsible.recipe.js +1 -1
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/Combobox.js +1 -1
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/Combobox/combobox.recipe.js +1 -1
- package/dist/ui/DatePicker/DatePicker.d.ts +336 -336
- package/dist/ui/DatePicker/DatePicker.js +1 -1
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +14 -14
- package/dist/ui/DatePicker/datePicker.recipe.js +1 -1
- package/dist/ui/Dialog/Dialog.d.ts +154 -154
- package/dist/ui/Dialog/Dialog.js +1 -1
- package/dist/ui/Dialog/dialog.recipe.d.ts +14 -14
- package/dist/ui/Dialog/dialog.recipe.js +1 -1
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/Drawer.js +1 -1
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Drawer/drawer.recipe.js +1 -1
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/Field.js +1 -1
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Field/field.recipe.js +1 -1
- package/dist/ui/IconButton/IconButton.js +2 -1
- package/dist/ui/NumberInput/NumberInput.js +1 -1
- package/dist/ui/NumberInput/numberInput.recipe.js +1 -1
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/PasswordInput.js +1 -1
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/PasswordInput/passwordInput.recipe.js +1 -1
- package/dist/ui/PinInput/PinInput.js +1 -1
- package/dist/ui/PinInput/pinInput.recipe.js +1 -1
- package/dist/ui/Popover/Popover.d.ts +121 -121
- package/dist/ui/Popover/Popover.js +1 -1
- package/dist/ui/Popover/popover.recipe.d.ts +11 -11
- package/dist/ui/Popover/popover.recipe.js +1 -1
- package/dist/ui/Presence.d.ts +1 -1
- package/dist/ui/Presence.js +1 -1
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/Progress.js +1 -1
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/Progress/progress.recipe.js +1 -1
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/SegmentGroup.js +1 -1
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/SegmentGroup/segmentGroup.recipe.js +1 -1
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/Select.js +1 -1
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Select/select.recipe.js +1 -1
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/Table.js +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Table/table.recipe.js +1 -1
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/Tabs.js +1 -1
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/ui/Tabs/tabs.recipe.js +1 -1
- package/dist/utils/getQueryClient.js +2 -2
- package/dist/utils/onMobileDevice.d.ts +5 -0
- package/dist/utils/onMobileDevice.js +9 -0
- package/dist/utils/queryKeys.d.ts +4 -1
- package/package.json +29 -30
- package/dist/client/hooks/index.d.ts +0 -70
- package/dist/client/hooks/index.js +0 -70
- package/dist/client/services/index.d.ts +0 -4
- package/dist/client/services/index.js +0 -4
- package/dist/client/utils/index.d.ts +0 -3
- package/dist/client/utils/index.js +0 -3
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
- package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -66
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -17
- package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -18
- package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -109
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css +0 -184
- package/dist/components/JackpotCounter/index.d.ts +0 -1
- package/dist/components/JackpotCounter/index.js +0 -1
- package/dist/components/Jackpots/JackpotDesktop.d.ts +0 -1
- package/dist/components/Jackpots/JackpotDesktop.js +0 -45
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
- package/dist/components/Jackpots/JackpotGameProviders.js +0 -41
- package/dist/components/Jackpots/JackpotMobile.d.ts +0 -1
- package/dist/components/Jackpots/JackpotMobile.js +0 -46
- package/dist/components/Jackpots/JackpotRules.d.ts +0 -5
- package/dist/components/Jackpots/JackpotRules.js +0 -11
- package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
- package/dist/components/Jackpots/Jackpots.client.js +0 -29
- package/dist/components/Jackpots/JackpotsContext.d.ts +0 -4
- package/dist/components/Jackpots/JackpotsContext.js +0 -3
- package/dist/components/Jackpots/useJackpotData.d.ts +0 -14
- package/dist/components/Jackpots/useJackpotData.js +0 -92
- package/dist/components/PortalProvider/WebVitals.d.ts +0 -1
- package/dist/components/PortalProvider/WebVitals.js +0 -8
- 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/TournamentDesktop.d.ts +0 -1
- package/dist/components/Tournaments/TournamentDesktop.js +0 -57
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +0 -5
- package/dist/components/Tournaments/TournamentGameProviders.js +0 -38
- package/dist/components/Tournaments/TournamentMobile.d.ts +0 -1
- package/dist/components/Tournaments/TournamentMobile.js +0 -55
- package/dist/components/Tournaments/TournamentRules.d.ts +0 -5
- package/dist/components/Tournaments/TournamentRules.js +0 -11
- package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
- package/dist/components/Tournaments/Tournaments.client.js +0 -20
- package/dist/components/Tournaments/TournamentsContext.d.ts +0 -4
- package/dist/components/Tournaments/TournamentsContext.js +0 -3
- package/dist/components/Tournaments/useTournamentData.d.ts +0 -10
- package/dist/components/Tournaments/useTournamentData.js +0 -71
- package/dist/components/index.d.ts +0 -31
- package/dist/components/index.js +0 -31
- package/dist/icons/index.d.ts +0 -66
- package/dist/icons/index.js +0 -66
- package/dist/server/services/index.d.ts +0 -4
- package/dist/server/services/index.js +0 -4
- package/dist/server/utils/index.d.ts +0 -34
- package/dist/server/utils/index.js +0 -34
- package/dist/services/ObjectId.d.ts +0 -10
- package/dist/services/ObjectId.js +0 -72
- package/dist/services/index.d.ts +0 -13
- package/dist/services/index.js +0 -13
- package/dist/ui/index.d.ts +0 -26
- package/dist/ui/index.js +0 -26
- package/dist/utils/index.d.ts +0 -18
- package/dist/utils/index.js +0 -18
|
@@ -4,10 +4,23 @@ import { zodResolver } from '@hookform/resolvers/zod';
|
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
5
|
import { Controller, useForm } from 'react-hook-form';
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import { useCreateMayaWithdrawalMutation
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { useCreateMayaWithdrawalMutation } from '../../../../client/hooks/useCreateMayaWithdrawalMutation.js';
|
|
8
|
+
import { useLocaleInfo } from '../../../../client/hooks/useLocaleInfo.js';
|
|
9
|
+
import { useMobileNumberParser } from '../../../../client/hooks/useMobileNumberParser.js';
|
|
10
|
+
import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
|
|
11
|
+
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
12
|
+
import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
|
|
13
|
+
import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
|
|
14
|
+
import { EyeIcon } from '../../../../icons/EyeIcon.js';
|
|
15
|
+
import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
|
|
16
|
+
import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
|
|
17
|
+
import { XIcon } from '../../../../icons/XIcon.js';
|
|
18
|
+
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
19
|
+
import { Button } from '../../../../ui/Button/index.js';
|
|
20
|
+
import { Field } from '../../../../ui/Field/index.js';
|
|
21
|
+
import { NumberInput } from '../../../../ui/NumberInput/index.js';
|
|
22
|
+
import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
|
|
23
|
+
import { parseDecimal } from '../../../../utils/parseDecimal.js';
|
|
11
24
|
import { AmountChoices } from '../../AmountChoices.js';
|
|
12
25
|
export function MayaWithdrawal() {
|
|
13
26
|
const [status, setStatus] = useState('waiting');
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { useShallow } from 'zustand/shallow';
|
|
4
|
-
import { useAccountQuery
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
|
|
5
|
+
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
6
|
+
import { useIsMayaSessionValidQuery } from '../../../client/hooks/useIsMayaSessionValidQuery.js';
|
|
7
|
+
import { useOnMMA } from '../../../client/hooks/useOnMMA.js';
|
|
8
|
+
import { usePaymentSettingsQuery } from '../../../client/hooks/usePaymentSettingsQuery.js';
|
|
9
|
+
import { useWalletQuery } from '../../../client/hooks/useWalletQuery.js';
|
|
10
|
+
import { AlertCircleIcon } from '../../../icons/AlertCircleIcon.js';
|
|
11
|
+
import { SpinnerIcon } from '../../../icons/SpinnerIcon.js';
|
|
12
|
+
import { Button } from '../../../ui/Button/index.js';
|
|
13
|
+
import { onMobileDevice } from '../../../utils/onMobileDevice.js';
|
|
14
|
+
import { parseDecimal } from '../../../utils/parseDecimal.js';
|
|
8
15
|
import { PaymentMethods } from '../PaymentMethods.js';
|
|
9
16
|
import { GCashWithdrawal } from './GCashWithdrawal/GCashWithdrawal.js';
|
|
10
17
|
import { InstapayWithdrawal } from './InstapayWithdrawal/InstapayWithdrawal.js';
|
|
@@ -5,7 +5,8 @@ import Image from 'next/image';
|
|
|
5
5
|
import { useRef } from 'react';
|
|
6
6
|
import pagcorLogo from '../../images/pagcor.png';
|
|
7
7
|
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
8
|
-
import { Button
|
|
8
|
+
import { Button } from '../../ui/Button/index.js';
|
|
9
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
9
10
|
import { useDisclaimer } from './useDisclaimer.js';
|
|
10
11
|
export function DisclaimerV1(props) {
|
|
11
12
|
const disclaimer = useDisclaimer();
|
|
@@ -5,7 +5,8 @@ import Image from 'next/image';
|
|
|
5
5
|
import { useRef, useState } from 'react';
|
|
6
6
|
import pagcorLogo from '../../images/pagcor.png';
|
|
7
7
|
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
8
|
-
import { Button
|
|
8
|
+
import { Button } from '../../ui/Button/index.js';
|
|
9
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
9
10
|
import { ResponsibleGaming } from './ResponsibleGaming.js';
|
|
10
11
|
import { TermsOfUse } from './TermsOfUse.js';
|
|
11
12
|
import { useDisclaimer } from './useDisclaimer.js';
|
|
@@ -4,7 +4,8 @@ import { Portal } from '@ark-ui/react';
|
|
|
4
4
|
import Image, {} from 'next/image';
|
|
5
5
|
import pagcorLogo from '../../images/pagcor.png';
|
|
6
6
|
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
7
|
-
import { Button
|
|
7
|
+
import { Button } from '../../ui/Button/index.js';
|
|
8
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
8
9
|
export function ResponsibleGaming({ logo, open, responsibleGamingContent, onCloseAction, }) {
|
|
9
10
|
return (_jsx(Dialog.Root, { open: open, 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: 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: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: "Responsible Gaming" }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: responsibleGamingContent }), _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, { type: "button", className: "mt-3", onClick: () => {
|
|
10
11
|
onCloseAction();
|
|
@@ -3,10 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Portal } from '@ark-ui/react';
|
|
4
4
|
import Image, {} from 'next/image';
|
|
5
5
|
import { useShallow } from 'zustand/shallow';
|
|
6
|
-
import { useGlobalStore } from '../../client/hooks/
|
|
6
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
7
7
|
import pagcorLogo from '../../images/pagcor.png';
|
|
8
8
|
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
9
|
-
import { Button
|
|
9
|
+
import { Button } from '../../ui/Button/index.js';
|
|
10
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
10
11
|
export function TermsOfUse({ logo, open, onCloseAction, siteName, termsOfUseContent, }) {
|
|
11
12
|
const disclaimerStore = useGlobalStore(useShallow((state) => state.disclaimer));
|
|
12
13
|
return (_jsx(Dialog.Root, { open: open, 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: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsxs(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: [siteName, " Terms of Use"] }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: termsOfUseContent }), _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, { type: "button", className: "mt-3", onClick: () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, ComponentType } from 'react';
|
|
2
|
-
interface EmptyProps {
|
|
2
|
+
export interface EmptyProps {
|
|
3
3
|
icon: ComponentType<ComponentProps<'svg'>>;
|
|
4
4
|
title: string;
|
|
5
5
|
message: string;
|
|
@@ -7,4 +7,3 @@ interface EmptyProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare function Empty(props: EmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
export interface FavoriteGamesProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
/** @default 'Favorite Games' */
|
|
4
|
+
heading?: string;
|
|
5
|
+
}
|
|
2
6
|
export declare function FavoriteGames__client(props: FavoriteGamesProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { useFavoriteGamesQuery
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { useFavoriteGamesQuery } from '../../client/hooks/useFavoriteGamesQuery.js';
|
|
6
|
+
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
7
|
+
import { useUnmarkGameAsFavoriteMutation } from '../../client/hooks/useUnmarkGameAsFavoriteMutation.js';
|
|
8
|
+
import { ArrowLeftIcon } from '../../icons/ArrowLeftIcon.js';
|
|
9
|
+
import { ArrowRightIcon } from '../../icons/ArrowRightIcon.js';
|
|
10
|
+
import { Star01Icon } from '../../icons/Star01Icon.js';
|
|
11
|
+
import { Button } from '../../ui/Button/index.js';
|
|
12
|
+
import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
|
|
9
13
|
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
10
14
|
export function FavoriteGames__client(props) {
|
|
11
15
|
const gamesQuery = useFavoriteGamesQuery();
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
className?: string;
|
|
3
|
-
/** @default 'Favorite Games' */
|
|
4
|
-
heading?: string;
|
|
5
|
-
}
|
|
1
|
+
import { type FavoriteGamesProps } from './FavoriteGames.client';
|
|
6
2
|
export declare function FavoriteGames(props: FavoriteGamesProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export type { FavoriteGamesProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { prefetchFavoriteGamesQuery } from '../../server/utils/
|
|
3
|
-
import { FavoriteGames__client } from './FavoriteGames.client.js';
|
|
2
|
+
import { prefetchFavoriteGamesQuery } from '../../server/utils/prefetchFavoriteGamesQuery.js';
|
|
3
|
+
import { FavoriteGames__client, } from './FavoriteGames.client.js';
|
|
4
4
|
export async function FavoriteGames(props) {
|
|
5
5
|
await prefetchFavoriteGamesQuery();
|
|
6
6
|
return _jsx(FavoriteGames__client, { ...props });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function GameLaunch(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function GameLaunch(): import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,75 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import dynamic from 'next/dynamic';
|
|
5
4
|
import { useShallow } from 'zustand/shallow';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
|
+
const Component = dynamic(() => import('./GameLaunch.lazy.js').then((m) => m.GameLaunch), {
|
|
7
|
+
ssr: false,
|
|
8
|
+
loading: () => null,
|
|
9
|
+
});
|
|
9
10
|
export function GameLaunch() {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
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" })] })) })] }) })] }) })] }));
|
|
11
|
+
const touched = useGlobalStore(useShallow((ctx) => ctx.gameLaunch['~touched']));
|
|
12
|
+
if (touched)
|
|
13
|
+
return _jsx(Component, {});
|
|
75
14
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function GameLaunch(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,90 @@
|
|
|
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 } from '../../client/hooks/useDisclosure.js';
|
|
7
|
+
import { useEndGameSessionMutation } from '../../client/hooks/useEndGameSessionMutation.js';
|
|
8
|
+
import { useFavoriteGamesQuery } from '../../client/hooks/useFavoriteGamesQuery.js';
|
|
9
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
10
|
+
import { useMarkGameAsFavoriteMutation } from '../../client/hooks/useMarkGameAsFavoriteMutation.js';
|
|
11
|
+
import { useUnmarkGameAsFavoriteMutation } from '../../client/hooks/useUnmarkGameAsFavoriteMutation.js';
|
|
12
|
+
import { AlertCircleIcon } from '../../icons/AlertCircleIcon.js';
|
|
13
|
+
import { ChevronDownIcon } from '../../icons/ChevronDownIcon.js';
|
|
14
|
+
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
15
|
+
import { CoinsHandIcon } from '../../icons/CoinsHandIcon.js';
|
|
16
|
+
import { Expand03Icon } from '../../icons/Expand03Icon.js';
|
|
17
|
+
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
18
|
+
import { Star01Icon } from '../../icons/Star01Icon.js';
|
|
19
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
20
|
+
import { AlertDialog } from '../../ui/AlertDialog/index.js';
|
|
21
|
+
import { Button } from '../../ui/Button/index.js';
|
|
22
|
+
import { IconButton } from '../../ui/IconButton/index.js';
|
|
23
|
+
import { Presence } from '../../ui/Presence.js';
|
|
24
|
+
export function GameLaunch() {
|
|
25
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
26
|
+
gameLaunch: ctx.gameLaunch,
|
|
27
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
28
|
+
})));
|
|
29
|
+
const maximizeDisclosure = useDisclosure({ defaultOpen: true });
|
|
30
|
+
const cancelDisclosure = useDisclosure();
|
|
31
|
+
async function endGameSession() {
|
|
32
|
+
if (globalStore.gameLaunch.details.status === 'PLAYING') {
|
|
33
|
+
await endGameSessionMutation.mutateAsync({
|
|
34
|
+
game: globalStore.gameLaunch.details.game,
|
|
35
|
+
session: globalStore.gameLaunch.details.session,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
maximizeDisclosure.setOpen(true);
|
|
39
|
+
globalStore.gameLaunch.setDetails({
|
|
40
|
+
status: 'WAITING',
|
|
41
|
+
session: null,
|
|
42
|
+
game: null,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const favoriteGamesQuery = useFavoriteGamesQuery();
|
|
46
|
+
const favoriteGames = favoriteGamesQuery.data ?? [];
|
|
47
|
+
const endGameSessionMutation = useEndGameSessionMutation();
|
|
48
|
+
const markGameAsFavoriteMutation = useMarkGameAsFavoriteMutation();
|
|
49
|
+
const unmarkGameAsFavoriteMutation = useUnmarkGameAsFavoriteMutation();
|
|
50
|
+
const markedAsFavorite = favoriteGames.some((favoriteGame) => {
|
|
51
|
+
return !globalStore.gameLaunch.details.game
|
|
52
|
+
? false
|
|
53
|
+
: 'reference' in globalStore.gameLaunch.details.game
|
|
54
|
+
? favoriteGame.id === globalStore.gameLaunch.details.game.reference
|
|
55
|
+
: favoriteGame.id === globalStore.gameLaunch.details.game.id;
|
|
56
|
+
});
|
|
57
|
+
return (_jsxs(_Fragment, { children: [_jsx(Dialog.Root, { open: globalStore.gameLaunch.details.status !== 'WAITING' &&
|
|
58
|
+
!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: () => {
|
|
59
|
+
if (globalStore.gameLaunch.details.status !== 'PLAYING') {
|
|
60
|
+
endGameSession();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
cancelDisclosure.setOpen(true);
|
|
64
|
+
}, 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 ||
|
|
65
|
+
markGameAsFavoriteMutation.isPending, onClick: () => {
|
|
66
|
+
if (!globalStore.gameLaunch.details.game)
|
|
67
|
+
return;
|
|
68
|
+
if (markedAsFavorite) {
|
|
69
|
+
unmarkGameAsFavoriteMutation.mutate('reference' in globalStore.gameLaunch.details.game
|
|
70
|
+
? globalStore.gameLaunch.details.game.reference
|
|
71
|
+
: globalStore.gameLaunch.details.game.id);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
markGameAsFavoriteMutation.mutate('reference' in globalStore.gameLaunch.details.game
|
|
75
|
+
? globalStore.gameLaunch.details.game.reference
|
|
76
|
+
: globalStore.gameLaunch.details.game.id);
|
|
77
|
+
}
|
|
78
|
+
}, children: _jsx(Star01Icon, { className: twMerge('size-5', markedAsFavorite
|
|
79
|
+
? 'text-yellow-400 fill-yellow-400'
|
|
80
|
+
: '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: () => {
|
|
81
|
+
globalStore.depositWithdrawal.setOpen(true);
|
|
82
|
+
}, 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) => {
|
|
83
|
+
cancelDisclosure.setOpen(details.open);
|
|
84
|
+
}, 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: () => {
|
|
85
|
+
api.setOpen(false);
|
|
86
|
+
}, children: "Cancel" }), _jsx(Button, { colorScheme: "danger", disabled: endGameSessionMutation.isPending, onClick: async () => {
|
|
87
|
+
await endGameSession();
|
|
88
|
+
api.setOpen(false);
|
|
89
|
+
}, children: "Proceed" })] })) })] }) })] }) })] }));
|
|
90
|
+
}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ark } from '@ark-ui/react';
|
|
4
4
|
import { useShallow } from 'zustand/shallow';
|
|
5
|
-
import { useCreateGameSessionMutation
|
|
6
|
-
import {
|
|
5
|
+
import { useCreateGameSessionMutation } from '../../client/hooks/useCreateGameSessionMutation.js';
|
|
6
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
7
|
+
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
8
|
+
import { toaster } from '../../client/utils/toaster.js';
|
|
7
9
|
export function GameLaunchTrigger(props) {
|
|
8
10
|
const sessionQuery = useSessionQuery();
|
|
9
11
|
const createGameSessionMutation = useCreateGameSessionMutation();
|
|
@@ -7,9 +7,11 @@ import Link from 'next/link';
|
|
|
7
7
|
import { useCallback, useEffect, useState } from 'react';
|
|
8
8
|
import { twMerge } from 'tailwind-merge';
|
|
9
9
|
import { GAME_PROVIDER_DATA } from '../../constants/index.js';
|
|
10
|
-
import { ArrowLeftIcon
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { ArrowLeftIcon } from '../../icons/ArrowLeftIcon.js';
|
|
11
|
+
import { ArrowRightIcon } from '../../icons/ArrowRightIcon.js';
|
|
12
|
+
import { ChevronRightIcon } from '../../icons/ChevronRightIcon.js';
|
|
13
|
+
import { Button } from '../../ui/Button/index.js';
|
|
14
|
+
import { callIfFn } from '../../utils/callIfFn.js';
|
|
13
15
|
export function GameProvidersCarousel(props) {
|
|
14
16
|
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
15
17
|
align: 'start',
|
|
@@ -4,10 +4,11 @@ import { isString, noop } from 'lodash-es';
|
|
|
4
4
|
import Image, {} from 'next/image';
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
|
-
import { useChunk } from '../../client/hooks/
|
|
7
|
+
import { useChunk } from '../../client/hooks/useChunk.js';
|
|
8
8
|
import { GAME_PROVIDER_DATA } from '../../constants/index.js';
|
|
9
|
-
import { Button
|
|
10
|
-
import {
|
|
9
|
+
import { Button } from '../../ui/Button/index.js';
|
|
10
|
+
import { Progress } from '../../ui/Progress/index.js';
|
|
11
|
+
import { callIfFn } from '../../utils/callIfFn.js';
|
|
11
12
|
export function GameProvidersList(props) {
|
|
12
13
|
const viewGamesUrl = (data) => {
|
|
13
14
|
return props.viewGamesUrl
|
|
@@ -2,8 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { isString } from 'lodash-es';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { useFavoriteGamesQuery
|
|
6
|
-
import {
|
|
5
|
+
import { useFavoriteGamesQuery } from '../../client/hooks/useFavoriteGamesQuery.js';
|
|
6
|
+
import { useMarkGameAsFavoriteMutation } from '../../client/hooks/useMarkGameAsFavoriteMutation.js';
|
|
7
|
+
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
8
|
+
import { useUnmarkGameAsFavoriteMutation } from '../../client/hooks/useUnmarkGameAsFavoriteMutation.js';
|
|
9
|
+
import { Star01Icon } from '../../icons/Star01Icon.js';
|
|
10
|
+
import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
|
|
7
11
|
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
8
12
|
import { BadgeNew } from './BadgeNew.js';
|
|
9
13
|
import { BadgePopular } from './BadgePopular.js';
|
|
@@ -21,7 +25,7 @@ export function Game(props) {
|
|
|
21
25
|
const classNames = isString(props.className)
|
|
22
26
|
? { root: props.className }
|
|
23
27
|
: (props.className ?? {});
|
|
24
|
-
return (_jsxs(GameLaunchTrigger, { game: game, className: twMerge('animate-scale-in relative block w-full shadow-sm', classNames.root), children: [props.badge === 'new' && (_jsx(BadgeNew, { className: "absolute left-0 top-0 size-[3.75rem]" })), props.badge === 'top' && (_jsx(BadgeTop, { className: "absolute left-0 top-0 size-[3.75rem]" })), props.badge === 'popular' && (_jsx(BadgePopular, { className: "absolute left-0 top-0 size-[3.75rem]" })), session?.status === 'authenticated' && (_jsx("div", { role: "button", onClick: (e) => {
|
|
28
|
+
return (_jsxs(GameLaunchTrigger, { game: game, className: twMerge('animate-scale-in relative block w-full shadow-sm', classNames.root), "aria-label": `Play ${game.name} game`, children: [props.badge === 'new' && (_jsx(BadgeNew, { className: "absolute left-0 top-0 size-[3.75rem]" })), props.badge === 'top' && (_jsx(BadgeTop, { className: "absolute left-0 top-0 size-[3.75rem]" })), props.badge === 'popular' && (_jsx(BadgePopular, { className: "absolute left-0 top-0 size-[3.75rem]" })), session?.status === 'authenticated' && (_jsx("div", { role: "button", onClick: (e) => {
|
|
25
29
|
e.preventDefault();
|
|
26
30
|
e.stopPropagation();
|
|
27
31
|
if (markGameAsFavoriteMutation.isPending)
|
|
@@ -34,8 +38,13 @@ export function Game(props) {
|
|
|
34
38
|
else {
|
|
35
39
|
markGameAsFavoriteMutation.mutate(game.reference);
|
|
36
40
|
}
|
|
37
|
-
}, "aria-
|
|
41
|
+
}, "aria-label": markedAsFavorite
|
|
42
|
+
? 'Unmark as favorite game'
|
|
43
|
+
: 'Mark as favorite game', "aria-disabled": markGameAsFavoriteMutation.isPending ||
|
|
38
44
|
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: twMerge('size-5', markedAsFavorite
|
|
39
45
|
? 'fill-yellow-400 text-yellow-400'
|
|
40
|
-
: 'text-white') }) })), _jsx(Image, { src:
|
|
46
|
+
: 'text-white') }) })), _jsx(Image, { src: getGameImageUrl({
|
|
47
|
+
reference: game.reference,
|
|
48
|
+
provider: game.provider,
|
|
49
|
+
}), alt: "", width: 200, height: 200, priority: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-3.5 text-center text-xs font-semibold', classNames.title), children: game.name })] }));
|
|
41
50
|
}
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GamesInput__Next } from '../../services/cmsPortal';
|
|
2
|
+
interface ClassNameEntries {
|
|
3
|
+
root?: string;
|
|
4
|
+
thumbnailRoot?: string;
|
|
5
|
+
thumbnailTitle?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GamesCarouselProps {
|
|
8
|
+
layout: 'carousel';
|
|
9
|
+
/** @default "Games" */
|
|
10
|
+
heading?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @description URL for viewing all games
|
|
13
|
+
* @default "/games"
|
|
14
|
+
*/
|
|
15
|
+
viewAllUrl?: string;
|
|
16
|
+
/** @default 1 */
|
|
17
|
+
numOfRows?: 1 | 2 | 3;
|
|
18
|
+
badge?: 'top' | 'new' | 'popular';
|
|
19
|
+
filter?: GamesInput__Next['filter'];
|
|
20
|
+
search?: string;
|
|
21
|
+
sort?: GamesInput__Next['sort'];
|
|
22
|
+
className?: string | ClassNameEntries;
|
|
23
|
+
}
|
|
2
24
|
export declare function GamesCarousel__client(props: GamesCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -5,9 +5,13 @@ import { isString } from 'lodash-es';
|
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import { useCallback, useEffect, useState } from 'react';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
|
-
import { useGamesQuery } from '../../client/hooks/
|
|
9
|
-
import { ArrowLeftIcon
|
|
10
|
-
import {
|
|
8
|
+
import { useGamesQuery } from '../../client/hooks/useGamesQuery.js';
|
|
9
|
+
import { ArrowLeftIcon } from '../../icons/ArrowLeftIcon.js';
|
|
10
|
+
import { ArrowRightIcon } from '../../icons/ArrowRightIcon.js';
|
|
11
|
+
import { ChevronRightIcon } from '../../icons/ChevronRightIcon.js';
|
|
12
|
+
import { GamingPad01Icon } from '../../icons/GamingPad01Icon.js';
|
|
13
|
+
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
14
|
+
import { Button } from '../../ui/Button/index.js';
|
|
11
15
|
import { Empty } from '../Empty.js';
|
|
12
16
|
import { Game } from './Game.js';
|
|
13
17
|
import { GameContext } from './GamesContext.js';
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export interface ClassNameEntries {
|
|
3
|
-
root?: string;
|
|
4
|
-
thumbnailRoot?: string;
|
|
5
|
-
thumbnailTitle?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface GamesCarouselProps {
|
|
8
|
-
layout: 'carousel';
|
|
9
|
-
/** @default "Games" */
|
|
10
|
-
heading?: string;
|
|
11
|
-
/**
|
|
12
|
-
* @description URL for viewing all games
|
|
13
|
-
* @default "/games"
|
|
14
|
-
*/
|
|
15
|
-
viewAllUrl?: string;
|
|
16
|
-
/** @default 1 */
|
|
17
|
-
numOfRows?: 1 | 2 | 3;
|
|
18
|
-
badge?: 'top' | 'new' | 'popular';
|
|
19
|
-
filter?: GamesInput__Next['filter'];
|
|
20
|
-
search?: string;
|
|
21
|
-
sort?: GamesInput__Next['sort'];
|
|
22
|
-
className?: string | ClassNameEntries;
|
|
23
|
-
}
|
|
1
|
+
import { type GamesCarouselProps } from './GamesCarousel.client';
|
|
24
2
|
export declare function GamesCarousel(props: GamesCarouselProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export type { GamesCarouselProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { prefetchGamesQuery } from '../../server/utils/
|
|
3
|
-
import { GamesCarousel__client } from './GamesCarousel.client.js';
|
|
2
|
+
import { prefetchGamesQuery } from '../../server/utils/prefetchGamesQuery.js';
|
|
3
|
+
import { GamesCarousel__client, } from './GamesCarousel.client.js';
|
|
4
4
|
export async function GamesCarousel(props) {
|
|
5
5
|
const numOfRows = props.numOfRows ?? 1;
|
|
6
6
|
await prefetchGamesQuery({
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GamesInput__Next } from '../../services/cmsPortal';
|
|
2
|
+
interface ClassNameEntries {
|
|
3
|
+
root?: string;
|
|
4
|
+
thumbnailRoot?: string;
|
|
5
|
+
thumbnailTitle?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GamesListProps {
|
|
8
|
+
layout: 'list';
|
|
9
|
+
badge?: 'top' | 'new' | 'popular';
|
|
10
|
+
/** @default 24 */
|
|
11
|
+
first?: number;
|
|
12
|
+
filter?: GamesInput__Next['filter'];
|
|
13
|
+
sort?: GamesInput__Next['sort'];
|
|
14
|
+
search?: string;
|
|
15
|
+
/** @default "Games"*/
|
|
16
|
+
heading?: string;
|
|
17
|
+
className?: string | ClassNameEntries;
|
|
18
|
+
}
|
|
2
19
|
export declare function GamesList__client(props: GamesListProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { isString, noop } from 'lodash-es';
|
|
4
|
-
import { useGamesQuery
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { useGamesQuery } from '../../client/hooks/useGamesQuery.js';
|
|
5
|
+
import { useInfiniteQueryHelper } from '../../client/hooks/useInfiniteQueryHelper.js';
|
|
6
|
+
import { GamingPad01Icon } from '../../icons/GamingPad01Icon.js';
|
|
7
|
+
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
8
|
+
import { Button } from '../../ui/Button/index.js';
|
|
9
|
+
import { Progress } from '../../ui/Progress/index.js';
|
|
7
10
|
import { Empty } from '../Empty.js';
|
|
8
11
|
import { Game } from './Game.js';
|
|
9
12
|
import { GameContext } from './GamesContext.js';
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export interface ClassNameEntries {
|
|
3
|
-
root?: string;
|
|
4
|
-
thumbnailRoot?: string;
|
|
5
|
-
thumbnailTitle?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface GamesListProps {
|
|
8
|
-
layout: 'list';
|
|
9
|
-
badge?: 'top' | 'new' | 'popular';
|
|
10
|
-
/** @default 24 */
|
|
11
|
-
first?: number;
|
|
12
|
-
filter?: GamesInput__Next['filter'];
|
|
13
|
-
sort?: GamesInput__Next['sort'];
|
|
14
|
-
search?: string;
|
|
15
|
-
/** @default "Games"*/
|
|
16
|
-
heading?: string;
|
|
17
|
-
className?: string | ClassNameEntries;
|
|
18
|
-
}
|
|
1
|
+
import { type GamesListProps } from './GamesList.client';
|
|
19
2
|
export declare function GamesList(props: GamesListProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export type { GamesListProps };
|