@opexa/portal-components 0.0.18 → 0.0.19
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/index.d.ts +6 -3
- package/dist/client/hooks/useAuthenticateMutation.js +1 -1
- package/dist/client/hooks/useAuthenticateMutation.mjs +5 -4
- package/dist/client/hooks/useBonusesQuery.d.ts +3 -0
- package/dist/client/hooks/useBonusesQuery.js +1 -0
- package/dist/client/hooks/useBonusesQuery.mjs +38 -0
- package/dist/client/hooks/useCreateGameSessionMutation.d.ts +2 -2
- package/dist/client/hooks/useCreateGameSessionMutation.js +1 -1
- package/dist/client/hooks/useCreateGameSessionMutation.mjs +22 -22
- package/dist/client/hooks/useEndGameSessionMutation.d.ts +2 -2
- package/dist/client/hooks/useEndGameSessionMutation.js +1 -1
- package/dist/client/hooks/useEndGameSessionMutation.mjs +18 -18
- package/dist/client/hooks/useFavoriteGamesQuery.d.ts +3 -0
- package/dist/client/hooks/useFavoriteGamesQuery.js +1 -0
- package/dist/client/hooks/useFavoriteGamesQuery.mjs +38 -0
- package/dist/client/hooks/useGlobalStore.d.ts +30 -20
- package/dist/client/hooks/useGlobalStore.js +1 -1
- package/dist/client/hooks/useGlobalStore.mjs +39 -6
- package/dist/client/hooks/useJackpotPayoutsQuery.d.ts +3 -0
- package/dist/client/hooks/useJackpotPayoutsQuery.js +1 -0
- package/dist/client/hooks/useJackpotPayoutsQuery.mjs +31 -0
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.d.ts +2 -0
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +1 -0
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.mjs +37 -0
- package/dist/client/hooks/useMarkMessageAsReadMutation.d.ts +1 -5
- package/dist/client/hooks/useMarkMessageAsReadMutation.js +1 -1
- package/dist/client/hooks/useMarkMessageAsReadMutation.mjs +18 -18
- package/dist/client/hooks/useSignInMutation.js +1 -1
- package/dist/client/hooks/useSignInMutation.mjs +3 -2
- package/dist/client/hooks/useSignOutMutation.js +1 -1
- package/dist/client/hooks/useSignOutMutation.mjs +11 -10
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.d.ts +2 -0
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +1 -0
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.mjs +37 -0
- package/dist/client/services/getSession.d.ts +1 -1
- package/dist/client/services/getSession.js +1 -1
- package/dist/client/services/getSession.mjs +4 -3
- package/dist/client-hooks.js +1 -1
- package/dist/client-hooks.mjs +90 -84
- package/dist/components/Account/Account.d.ts +17 -10
- package/dist/components/Account/Account.js +1 -1
- package/dist/components/Account/Account.mjs +204 -148
- package/dist/components/Account/account.recipe.d.ts +61 -0
- package/dist/components/Account/account.recipe.js +1 -0
- package/dist/components/Account/account.recipe.mjs +35 -0
- package/dist/components/BetRecords/BetRecords.js +1 -1
- package/dist/components/BetRecords/BetRecords.mjs +174 -150
- package/dist/components/Bonus/Bonus.client.js +1 -0
- package/dist/components/Bonus/Bonus.client.mjs +143 -0
- package/dist/components/Bonus/Bonus.js +1 -0
- package/dist/components/Bonus/Bonus.mjs +8 -0
- package/dist/components/Bonuses/Bonuses.js +1 -1
- package/dist/components/Bonuses/Bonuses.mjs +6 -5
- package/dist/components/DepositWithdrawal/AmountChoices.js +1 -1
- package/dist/components/DepositWithdrawal/AmountChoices.mjs +4 -2
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.mjs +25 -23
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/Deposit.mjs +3 -2
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.mjs +15 -13
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.mjs +4 -2
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.mjs +4 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.mjs +4 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.mjs +3 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.mjs +9 -8
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.mjs +36 -34
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.mjs +3 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.mjs +7 -6
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.mjs +9 -8
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.mjs +12 -10
- package/dist/components/DepositWithdrawal/PaymentMethods.js +1 -1
- package/dist/components/DepositWithdrawal/PaymentMethods.mjs +4 -2
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.mjs +9 -7
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.mjs +4 -2
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.mjs +4 -2
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.mjs +9 -7
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.mjs +3 -2
- package/dist/components/Disclaimer/Disclaimer.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.mjs +7 -6
- package/dist/components/Empty.js +1 -0
- package/dist/components/{Empty/CloudIcon.mjs → Empty.mjs} +26 -11
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +2 -0
- package/dist/components/FavoriteGames/FavoriteGames.client.js +1 -0
- package/dist/components/FavoriteGames/FavoriteGames.client.mjs +132 -0
- package/dist/components/FavoriteGames/FavoriteGames.d.ts +6 -0
- package/dist/components/FavoriteGames/FavoriteGames.js +1 -0
- package/dist/components/FavoriteGames/FavoriteGames.mjs +17 -0
- package/dist/components/FavoriteGames/index.d.ts +1 -0
- package/dist/components/GameLaunch/GameLaunch.d.ts +1 -5
- package/dist/components/GameLaunch/GameLaunch.js +1 -1
- package/dist/components/GameLaunch/GameLaunch.mjs +147 -123
- package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +2 -2
- package/dist/components/GameLaunch/GameLaunchTrigger.js +1 -1
- package/dist/components/GameLaunch/GameLaunchTrigger.mjs +7 -6
- package/dist/components/GameProviders/GameProviders.d.ts +7 -10
- package/dist/components/GameProviders/GameProviders.js +1 -0
- package/dist/components/GameProviders/GameProviders.mjs +122 -0
- package/dist/components/GameProviders/index.d.ts +1 -0
- package/dist/components/Games/Games.client.js +1 -1
- package/dist/components/Games/Games.client.mjs +91 -66
- package/dist/components/Games/Games.js +1 -1
- package/dist/components/Games/Games.mjs +4 -2
- package/dist/components/GamesSearch/GamesSearch.d.ts +6 -0
- package/dist/components/GamesSearch/GamesSearch.js +1 -0
- package/dist/components/GamesSearch/GamesSearch.mjs +199 -0
- package/dist/components/GamesSearch/GamesSearchTrigger.d.ts +4 -0
- package/dist/components/GamesSearch/GamesSearchTrigger.js +1 -0
- package/dist/components/GamesSearch/GamesSearchTrigger.mjs +50 -0
- package/dist/components/GamesSearch/index.d.ts +2 -0
- package/dist/components/InfiniteScroll.d.ts +10 -0
- package/dist/components/InfiniteScroll.js +1 -0
- package/dist/components/InfiniteScroll.mjs +30 -0
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +2 -0
- package/dist/components/JackpotCounter/JackpotCounter.client.js +1 -0
- package/dist/components/JackpotCounter/JackpotCounter.client.mjs +139 -0
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +1 -1
- package/dist/components/JackpotCounter/JackpotCounter.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounter.mjs +10 -114
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +1 -0
- package/dist/components/JackpotCounter/JackpotCounterItem.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.mjs +206 -119
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css.mjs +11 -9
- package/dist/components/Jackpots/JackpotGameProviders.js +1 -0
- package/dist/components/Jackpots/JackpotGameProviders.mjs +105 -0
- package/dist/components/Jackpots/JackpotItem.d.ts +2 -2
- package/dist/components/Jackpots/JackpotItem.js +1 -0
- package/dist/components/Jackpots/JackpotItem.mjs +408 -0
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +2 -2
- package/dist/components/Jackpots/JackpotItemMobile.js +1 -0
- package/dist/components/Jackpots/JackpotItemMobile.mjs +427 -0
- package/dist/components/Jackpots/JackpotRules.d.ts +6 -0
- package/dist/components/Jackpots/JackpotRules.js +1 -0
- package/dist/components/Jackpots/JackpotRules.mjs +78 -0
- package/dist/components/Jackpots/Jackpots.d.ts +2 -2
- package/dist/components/Jackpots/Jackpots.js +1 -0
- package/dist/components/Jackpots/Jackpots.mjs +61 -0
- package/dist/components/KYC/KYC.d.ts +5 -0
- package/dist/components/KYC/KYC.js +1 -0
- package/dist/components/KYC/KYC.mjs +84 -0
- package/dist/components/KYC/KYCContext.d.ts +3 -0
- package/dist/components/KYC/KYCContext.js +1 -0
- package/dist/components/KYC/KYCContext.mjs +11 -0
- package/dist/components/KYC/KYCTrigger.d.ts +5 -0
- package/dist/components/KYC/KYCTrigger.js +1 -0
- package/dist/components/KYC/KYCTrigger.mjs +42 -0
- package/dist/components/KYC/Step1.d.ts +1 -0
- package/dist/components/KYC/Step1.js +1 -0
- package/dist/components/KYC/Step1.mjs +67 -0
- package/dist/components/KYC/Step2.d.ts +1 -0
- package/dist/components/KYC/Step2.js +1 -0
- package/dist/components/KYC/Step2.mjs +126 -0
- package/dist/components/KYC/Step3.d.ts +1 -0
- package/dist/components/KYC/Step3.js +1 -0
- package/dist/components/KYC/Step3.mjs +98 -0
- package/dist/components/KYC/StepIndicator.d.ts +1 -0
- package/dist/components/KYC/StepIndicator.js +1 -0
- package/dist/components/KYC/StepIndicator.mjs +42 -0
- package/dist/components/KYC/UploadDocument.d.ts +1 -0
- package/dist/components/KYC/UploadDocument.js +1 -0
- package/dist/components/KYC/UploadDocument.mjs +69 -0
- package/dist/components/KYC/UploadSelfie.d.ts +1 -0
- package/dist/components/KYC/UploadSelfie.js +1 -0
- package/dist/components/KYC/UploadSelfie.mjs +65 -0
- package/dist/components/KYC/index.d.ts +2 -0
- package/dist/components/KYC/useKYC.d.ts +14 -0
- package/dist/components/KYC/useKYC.js +1 -0
- package/dist/components/KYC/useKYC.mjs +43 -0
- package/dist/components/KYC/utils.d.ts +1 -0
- package/dist/components/Messages/MessageItem.js +1 -1
- package/dist/components/Messages/MessageItem.mjs +37 -28
- package/dist/components/Messages/MessagePopup.js +1 -1
- package/dist/components/Messages/MessagePopup.mjs +35 -29
- package/dist/components/Messages/Messages.js +1 -1
- package/dist/components/Messages/Messages.mjs +80 -61
- package/dist/components/PortalProvider/PortalProvider.client.d.ts +2 -0
- package/dist/components/PortalProvider/{Providers.js → PortalProvider.client.js} +1 -1
- package/dist/components/PortalProvider/{Providers.mjs → PortalProvider.client.mjs} +28 -15
- package/dist/components/PortalProvider/PortalProvider.d.ts +9 -2
- package/dist/components/PortalProvider/PortalProvider.js +1 -1
- package/dist/components/PortalProvider/PortalProvider.mjs +17 -11
- package/dist/components/Promo/Promo.d.ts +4 -1
- package/dist/components/Promo/Promo.js +1 -1
- package/dist/components/Promo/Promo.mjs +2 -2
- package/dist/components/Promo/PromoContent.js +1 -1
- package/dist/components/Promo/PromoContent.mjs +75 -22
- package/dist/components/Promos/PromoCarousel.js +1 -1
- package/dist/components/Promos/PromoCarousel.mjs +5 -3
- package/dist/components/Promos/PromoGrid.js +1 -1
- package/dist/components/Promos/PromoGrid.mjs +7 -6
- package/dist/components/Promos/PromoItem.js +1 -1
- package/dist/components/Promos/PromoItem.mjs +3 -2
- package/dist/components/Protected/Protected.js +1 -1
- package/dist/components/Protected/Protected.mjs +3 -2
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +1 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +1 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.mjs +154 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +1 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.mjs +66 -0
- package/dist/components/Quests/Quests.d.ts +1 -0
- package/dist/components/Quests/Quests.js +1 -0
- package/dist/components/Quests/Quests.mjs +15 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +1 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.js +1 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.mjs +109 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +8 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +1 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.mjs +63 -0
- package/dist/components/Quests/index.d.ts +1 -0
- package/dist/components/SignIn/SignIn.js +1 -1
- package/dist/components/SignIn/SignIn.mjs +4 -2
- package/dist/components/SignIn/SignInForm.js +1 -1
- package/dist/components/SignIn/SignInForm.mjs +4 -2
- package/dist/components/SignUp/SignUp.js +1 -1
- package/dist/components/SignUp/SignUp.mjs +4 -2
- package/dist/components/SignUp/SignUpForm.js +1 -1
- package/dist/components/SignUp/SignUpForm.mjs +4 -2
- package/dist/components/TopWins/TopWins.client.js +1 -1
- package/dist/components/TopWins/TopWins.client.mjs +3 -2
- package/dist/components/TopWins/TopWins.js +1 -1
- package/dist/components/TopWins/TopWins.mjs +4 -2
- package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +2 -0
- package/dist/components/TournamentCounter/TournamentCounter.client.js +1 -0
- package/dist/components/TournamentCounter/TournamentCounter.client.mjs +139 -0
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +1 -1
- package/dist/components/TournamentCounter/TournamentCounter.js +1 -1
- package/dist/components/TournamentCounter/TournamentCounter.mjs +17 -111
- package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +7 -5
- package/dist/components/TournamentCounter/TournamentCounterItem.js +1 -1
- package/dist/components/TournamentCounter/TournamentCounterItem.mjs +225 -86
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +1 -0
- package/dist/components/Tournaments/TournamentGameProviders.js +1 -0
- package/dist/components/Tournaments/TournamentGameProviders.mjs +105 -0
- package/dist/components/Tournaments/TournamentItem.d.ts +6 -0
- package/dist/components/Tournaments/TournamentItem.js +2 -0
- package/dist/components/Tournaments/TournamentItem.mjs +262 -0
- package/dist/components/Tournaments/TournamentItemMobile.d.ts +8 -0
- package/dist/components/Tournaments/TournamentItemMobile.js +2 -0
- package/dist/components/Tournaments/TournamentItemMobile.mjs +285 -0
- package/dist/components/Tournaments/TournamentRules.d.ts +6 -0
- package/dist/components/Tournaments/TournamentRules.js +1 -0
- package/dist/components/Tournaments/TournamentRules.mjs +78 -0
- package/dist/components/Tournaments/Tournaments.d.ts +8 -0
- package/dist/components/Tournaments/Tournaments.js +1 -0
- package/dist/components/Tournaments/Tournaments.mjs +47 -0
- package/dist/components/Tournaments/index.d.ts +1 -0
- package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.mjs +47 -38
- package/dist/components/TransactionRecords/TableFilters.js +1 -1
- package/dist/components/TransactionRecords/TableFilters.mjs +236 -194
- package/dist/components/TransactionRecords/TransactionRecords.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecords.mjs +3 -2
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.mjs +62 -53
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.mjs +61 -52
- package/dist/components/index.d.ts +8 -0
- package/dist/components.js +1 -1
- package/dist/components.mjs +56 -36
- package/dist/icons/ArrowNarrowDownIcon.js +1 -0
- package/dist/icons/ArrowNarrowDownIcon.mjs +22 -0
- package/dist/icons/ArrowNarrowUpIcon.js +1 -0
- package/dist/icons/ArrowNarrowUpIcon.mjs +22 -0
- package/dist/icons/Award01Icon.d.ts +2 -0
- package/dist/icons/Award01Icon.js +1 -0
- package/dist/icons/Award01Icon.mjs +22 -0
- package/dist/icons/CalendarIcon.d.ts +2 -0
- package/dist/icons/CalendarIcon.js +1 -0
- package/dist/icons/CalendarIcon.mjs +26 -0
- package/dist/icons/Camera01Icon.d.ts +2 -0
- package/dist/icons/Camera01Icon.js +1 -0
- package/dist/icons/Camera01Icon.mjs +25 -0
- package/dist/icons/CheckCircleIcon.d.ts +2 -0
- package/dist/icons/CheckCircleIcon.js +1 -0
- package/dist/icons/CheckCircleIcon.mjs +22 -0
- package/dist/icons/ClockStopWatchIcon.d.ts +2 -0
- package/dist/icons/ClockStopWatchIcon.js +1 -0
- package/dist/icons/ClockStopWatchIcon.mjs +26 -0
- package/dist/icons/CoinsHandIcon.d.ts +2 -0
- package/dist/icons/CoinsHandIcon.js +1 -0
- package/dist/icons/CoinsHandIcon.mjs +22 -0
- package/dist/icons/CoinsStacked02Icon.d.ts +2 -0
- package/dist/icons/CoinsStacked02Icon.js +1 -0
- package/dist/icons/CoinsStacked02Icon.mjs +22 -0
- package/dist/icons/CoinsSwap02Icon.d.ts +2 -0
- package/dist/icons/CoinsSwap02Icon.js +1 -0
- package/dist/icons/CoinsSwap02Icon.mjs +22 -0
- package/dist/icons/Flag06Icon.d.ts +2 -0
- package/dist/icons/Flag06Icon.js +1 -0
- package/dist/icons/Flag06Icon.mjs +22 -0
- package/dist/icons/HelpCircleIcon.d.ts +2 -0
- package/dist/icons/HelpCircleIcon.js +1 -0
- package/dist/icons/HelpCircleIcon.mjs +22 -0
- package/dist/icons/InfoCircleIcon.d.ts +2 -0
- package/dist/icons/InfoCircleIcon.js +1 -0
- package/dist/icons/InfoCircleIcon.mjs +27 -0
- package/dist/icons/Menu01Icon.d.ts +2 -0
- package/dist/icons/Menu01Icon.js +1 -0
- package/dist/icons/Menu01Icon.mjs +22 -0
- package/dist/icons/Menu03Icon.d.ts +2 -0
- package/dist/icons/Menu03Icon.js +1 -0
- package/dist/icons/Menu03Icon.mjs +22 -0
- package/dist/icons/SearchLgIcon.d.ts +2 -0
- package/dist/icons/SearchLgIcon.js +1 -0
- package/dist/icons/SearchLgIcon.mjs +22 -0
- package/dist/icons/Settings02Icon.d.ts +2 -0
- package/dist/icons/Settings02Icon.js +1 -0
- package/dist/icons/Settings02Icon.mjs +25 -0
- package/dist/icons/Star01Icon.d.ts +2 -0
- package/dist/icons/Star01Icon.js +1 -0
- package/dist/icons/Star01Icon.mjs +22 -0
- package/dist/icons/StarIcon.js +1 -1
- package/dist/icons/StarIcon.mjs +1 -2
- package/dist/icons/UploadCloud02Icon.d.ts +2 -0
- package/dist/icons/UploadCloud02Icon.js +1 -0
- package/dist/icons/UploadCloud02Icon.mjs +22 -0
- package/dist/icons/index.d.ts +16 -0
- package/dist/icons.js +1 -1
- package/dist/icons.mjs +80 -48
- package/dist/images/fantasma-games.png.js +1 -0
- package/dist/images/fantasma-games.png.mjs +4 -0
- package/dist/images/hacksaw-gaming.png.js +1 -0
- package/dist/images/hacksaw-gaming.png.mjs +4 -0
- package/dist/images/trophy-two.png.js +1 -0
- package/dist/images/trophy-two.png.mjs +4 -0
- package/dist/portal-components.css +1 -1
- package/dist/server/services/getSession.d.ts +1 -1
- package/dist/server/services/getSession.js +1 -1
- package/dist/server/services/getSession.mjs +6 -5
- package/dist/server/utils/index.d.ts +2 -1
- package/dist/server/utils/prefetchBonusesQuery.d.ts +1 -0
- package/dist/server/utils/prefetchBonusesQuery.js +1 -0
- package/dist/server/utils/prefetchBonusesQuery.mjs +26 -0
- package/dist/server/utils/prefetchFavoriteGamesQuery.d.ts +1 -0
- package/dist/server/utils/prefetchFavoriteGamesQuery.js +1 -0
- package/dist/server/utils/prefetchFavoriteGamesQuery.mjs +28 -0
- package/dist/server-utils.js +1 -1
- package/dist/server-utils.mjs +38 -36
- package/dist/theme.css +9 -2
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +1 -0
- package/dist/third-parties/FacebookPixel/FacebookPixel.mjs +6 -0
- package/dist/third-parties/FacebookPixel/api.d.ts +1 -0
- package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +1 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.mjs +6 -0
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +1 -0
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
- package/dist/third-parties/index.d.ts +2 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/dist/types.mjs +1 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
- package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
- package/dist/ui/AlertDialog/alertDialog.recipe.mjs +1 -1
- package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
- package/dist/ui/Checkbox/checkbox.recipe.mjs +6 -6
- package/dist/ui/Combobox/Combobox.d.ts +815 -1
- package/dist/ui/Combobox/Combobox.js +1 -1
- package/dist/ui/Combobox/Combobox.mjs +27 -2
- package/dist/ui/Combobox/combobox.recipe.d.ts +58 -1
- package/dist/ui/Combobox/combobox.recipe.js +1 -0
- package/dist/ui/Combobox/combobox.recipe.mjs +15 -0
- package/dist/ui/DatePicker/DatePicker.d.ts +192 -192
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +8 -8
- package/dist/ui/Dialog/Dialog.d.ts +88 -88
- package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
- package/dist/ui/Dialog/dialog.recipe.js +1 -1
- package/dist/ui/Dialog/dialog.recipe.mjs +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Drawer/drawer.recipe.js +1 -1
- package/dist/ui/Drawer/drawer.recipe.mjs +1 -1
- package/dist/ui/IconButton/iconButton.recipe.d.ts +1 -0
- package/dist/ui/IconButton/iconButton.recipe.js +1 -1
- package/dist/ui/IconButton/iconButton.recipe.mjs +3 -2
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Select/select.recipe.js +1 -1
- package/dist/ui/Select/select.recipe.mjs +2 -1
- package/dist/utils/queryKeys.d.ts +7 -3
- package/dist/utils/queryKeys.js +1 -1
- package/dist/utils/queryKeys.mjs +53 -43
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +43 -39
- package/package.json +16 -11
- package/dist/client/hooks/useSiteQuery.d.ts +0 -3
- package/dist/client/hooks/useSiteQuery.js +0 -1
- package/dist/client/hooks/useSiteQuery.mjs +0 -23
- package/dist/components/Empty/CloudIcon.d.ts +0 -2
- package/dist/components/Empty/CloudIcon.js +0 -1
- package/dist/components/Empty/Empty.js +0 -1
- package/dist/components/Empty/Empty.mjs +0 -20
- package/dist/components/Empty/index.d.ts +0 -1
- package/dist/components/PortalProvider/Providers.d.ts +0 -2
- package/dist/images/ball.png.js +0 -1
- package/dist/images/ball.png.mjs +0 -4
- package/dist/images/card.png.js +0 -1
- package/dist/images/card.png.mjs +0 -4
- package/dist/server/utils/prefetchSiteQuery.d.ts +0 -1
- package/dist/server/utils/prefetchSiteQuery.js +0 -1
- package/dist/server/utils/prefetchSiteQuery.mjs +0 -23
- /package/dist/components/{Empty/Empty.d.ts → Empty.d.ts} +0 -0
|
@@ -2,6 +2,7 @@ export * from './useAccountQuery';
|
|
|
2
2
|
export * from './useAuthenticateMutation';
|
|
3
3
|
export * from './useAvailablePromosQuery';
|
|
4
4
|
export * from './useBetRecordsQuery';
|
|
5
|
+
export * from './useBonusesQuery';
|
|
5
6
|
export * from './useCashbacksQuery';
|
|
6
7
|
export * from './useControllableState';
|
|
7
8
|
export * from './useCooldown';
|
|
@@ -20,6 +21,7 @@ export * from './useDepositRecordsQuery';
|
|
|
20
21
|
export * from './useDepositsCountQuery';
|
|
21
22
|
export * from './useDisclosure';
|
|
22
23
|
export * from './useEndGameSessionMutation';
|
|
24
|
+
export * from './useFavoriteGamesQuery';
|
|
23
25
|
export * from './useGamesQuery';
|
|
24
26
|
export * from './useGlobalStore';
|
|
25
27
|
export * from './useInfiniteQueryHelper';
|
|
@@ -27,7 +29,10 @@ export * from './useInstapayBankListQuery';
|
|
|
27
29
|
export * from './useIsMayaSessionValidQuery';
|
|
28
30
|
export * from './useJackpotsQuery';
|
|
29
31
|
export * from './useLocaleInfo';
|
|
32
|
+
export * from './useMarkGameAsFavoriteMutation';
|
|
33
|
+
export * from './useMarkMessageAsReadMutation';
|
|
30
34
|
export * from './useMemberVerificationQuery';
|
|
35
|
+
export * from './useMessagesQuery';
|
|
31
36
|
export * from './useMobileNumberParser';
|
|
32
37
|
export * from './useOnMMA';
|
|
33
38
|
export * from './usePaymentSettingsQuery';
|
|
@@ -39,12 +44,10 @@ export * from './useSessionQuery';
|
|
|
39
44
|
export * from './useSignInMutation';
|
|
40
45
|
export * from './useSignOutMutation';
|
|
41
46
|
export * from './useSignUpMutation';
|
|
42
|
-
export * from './useSiteQuery';
|
|
43
47
|
export * from './useTopWinsQuery';
|
|
44
48
|
export * from './useTournamentsQuery';
|
|
45
49
|
export * from './useTransactionRecordsQuery';
|
|
50
|
+
export * from './useUnmarkGameAsFavoriteMutation';
|
|
46
51
|
export * from './useUnreadMessagesCountQuery';
|
|
47
52
|
export * from './useWalletQuery';
|
|
48
53
|
export * from './useWithdrawalRecordsQuery';
|
|
49
|
-
export * from './useMessagesQuery';
|
|
50
|
-
export * from './useMarkMessageAsReadMutation';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@tanstack/react-query");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../constants/index.js");require("../../utils/getLocaleInfo.js");const n=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const e=require("../../utils/queryKeys.js"),a=require("../services/authenticate.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@tanstack/react-query");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../constants/index.js");require("../../utils/getLocaleInfo.js");const n=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const e=require("../../utils/queryKeys.js"),a=require("../services/authenticate.js");require("../services/getSession.js");const o=t=>{const u=n.getQueryClient();return i.useMutation({...t,mutationKey:e.getAuthenticateMutationKey(),mutationFn:async r=>{await a.authenticate(r),await u.invalidateQueries({queryKey:e.getSessionQueryKey()})}})};exports.useAuthenticateMutation=o;
|
|
@@ -6,19 +6,20 @@ import "../../utils/getLocaleInfo.mjs";
|
|
|
6
6
|
import { getQueryClient as r } from "../../utils/getQueryClient.mjs";
|
|
7
7
|
import "../../utils/isMobile.mjs";
|
|
8
8
|
import { getAuthenticateMutationKey as n, getSessionQueryKey as a } from "../../utils/queryKeys.mjs";
|
|
9
|
-
import { authenticate as
|
|
10
|
-
|
|
9
|
+
import { authenticate as m } from "../services/authenticate.mjs";
|
|
10
|
+
import "../services/getSession.mjs";
|
|
11
|
+
const M = (t) => {
|
|
11
12
|
const e = r();
|
|
12
13
|
return o({
|
|
13
14
|
...t,
|
|
14
15
|
mutationKey: n(),
|
|
15
16
|
mutationFn: async (i) => {
|
|
16
|
-
await
|
|
17
|
+
await m(i), await e.invalidateQueries({
|
|
17
18
|
queryKey: a()
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
22
|
};
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
M as useAuthenticateMutation
|
|
24
25
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("@opexa/portal-sdk-core"),a=require("@tanstack/react-query"),q=require("tiny-invariant"),t=require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const c=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const u=require("../../utils/queryKeys.js"),l=require("../services/getSession.js"),Q=require("./useSessionQuery.js"),d=e=>{var r;const n=c.getQueryClient(),o=Q.useSessionQuery();return a.useQuery({...e,enabled:(e==null?void 0:e.enabled)===!1?!1:((r=o.data)==null?void 0:r.status)==="authenticated",queryKey:u.getBonusesQueryKey(),queryFn:async({signal:i})=>{const s=await n.fetchQuery({queryKey:u.getSessionQueryKey(),queryFn:()=>l.getSession()});return q(s.status==="authenticated"),await y.getBonuses({signal:i,environment:t.ENVIRONMENT,headers:{"Platform-Code":t.PLATFORM_CODE,Authorization:`Bearer ${s.token}`}})}})};exports.useBonusesQuery=d;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getBonuses as n } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
3
|
+
import i from "tiny-invariant";
|
|
4
|
+
import { PLATFORM_CODE as m, ENVIRONMENT as y } from "../../constants/index.mjs";
|
|
5
|
+
import "../../utils/capitalize.mjs";
|
|
6
|
+
import "../../utils/parseDecimal.mjs";
|
|
7
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
8
|
+
import { getQueryClient as p } from "../../utils/getQueryClient.mjs";
|
|
9
|
+
import "../../utils/isMobile.mjs";
|
|
10
|
+
import { getBonusesQueryKey as Q, getSessionQueryKey as d } from "../../utils/queryKeys.mjs";
|
|
11
|
+
import { getSession as f } from "../services/getSession.mjs";
|
|
12
|
+
import { useSessionQuery as l } from "./useSessionQuery.mjs";
|
|
13
|
+
const w = (e) => {
|
|
14
|
+
var r;
|
|
15
|
+
const o = p(), s = l();
|
|
16
|
+
return a({
|
|
17
|
+
...e,
|
|
18
|
+
enabled: (e == null ? void 0 : e.enabled) === !1 ? !1 : ((r = s.data) == null ? void 0 : r.status) === "authenticated",
|
|
19
|
+
queryKey: Q(),
|
|
20
|
+
queryFn: async ({ signal: u }) => {
|
|
21
|
+
const t = await o.fetchQuery({
|
|
22
|
+
queryKey: d(),
|
|
23
|
+
queryFn: () => f()
|
|
24
|
+
});
|
|
25
|
+
return i(t.status === "authenticated"), await n({
|
|
26
|
+
signal: u,
|
|
27
|
+
environment: y,
|
|
28
|
+
headers: {
|
|
29
|
+
"Platform-Code": m,
|
|
30
|
+
Authorization: `Bearer ${t.token}`
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
w as useBonusesQuery
|
|
38
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Game, GameSession } from '@opexa/portal-sdk-core';
|
|
1
|
+
import { FavoriteGame, Game, GameSession } from '@opexa/portal-sdk-core';
|
|
2
2
|
import { Mutation } from '../../types';
|
|
3
|
-
export declare const useCreateGameSessionMutation: Mutation<GameSession, Game>;
|
|
3
|
+
export declare const useCreateGameSessionMutation: Mutation<GameSession, Game | FavoriteGame>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@opexa/portal-sdk-core"),y=require("@opexa/portal-sdk-core/object-id"),h=require("@tanstack/react-query"),c=require("tiny-invariant"),r=require("../../constants/index.js");require("../../utils/capitalize.js");const m=require("../../utils/createPoll.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const S=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@opexa/portal-sdk-core"),y=require("@opexa/portal-sdk-core/object-id"),h=require("@tanstack/react-query"),c=require("tiny-invariant"),r=require("../../constants/index.js");require("../../utils/capitalize.js");const m=require("../../utils/createPoll.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const S=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const i=require("../../utils/queryKeys.js"),l=require("../services/getSession.js"),q=d=>{const s=S.getQueryClient();return h.useMutation({...d,mutationKey:i.getCreateGameSessionMutationKey(),mutationFn:async n=>{const o=y.ObjectId.generate(y.ObjectType.GameSession).toString(),u=await s.fetchQuery({queryKey:i.getSessionQueryKey(),queryFn:()=>l.getSession()});if(c(u.status==="authenticated"),r.LEGACY_GAME_PROVIDERS.includes(n.provider)){await a.createGameSession__legacy({id:o,game:"reference"in n?n.reference:n.id},{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${u.token}`}});const t=await m.createPoll(async()=>{const e=await s.fetchQuery({queryKey:i.getSessionQueryKey(),queryFn:()=>l.getSession()});return c(e.status==="authenticated"),await a.getGameSession__legacy(o,{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${e.token}`}})},{until:e=>!!(e!=null&&e.launchUrl),interval:1e3,maxAttempt:5})();if(!(t!=null&&t.launchUrl)){const e=new Error;throw e.name="GameSessionError",e.message="Failed to launch game",e}return t}else{await a.createGameSession({id:o,game:"reference"in n?n.reference:n.id},{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${u.token}`}});const t=await m.createPoll(async()=>{const e=await s.fetchQuery({queryKey:i.getSessionQueryKey(),queryFn:()=>l.getSession()});return c(e.status==="authenticated"),await a.getGameSession(o,{environment:r.ENVIRONMENT,headers:{"Platform-Code":r.PLATFORM_CODE,Authorization:`Bearer ${e.token}`}})},{until:e=>!!(e!=null&&e.launchUrl),interval:1e3,maxAttempt:5})();if(!(t!=null&&t.launchUrl)){const e=new Error;throw e.name="GameSessionError",e.message="Failed to launch game",e}return t}}})};exports.useCreateGameSessionMutation=q;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createGameSession__legacy as
|
|
2
|
-
import { ObjectId as
|
|
3
|
-
import { useMutation as
|
|
1
|
+
import { createGameSession__legacy as f, getGameSession__legacy as h, createGameSession as p, getGameSession as d } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { ObjectId as w, ObjectType as S } from "@opexa/portal-sdk-core/object-id";
|
|
3
|
+
import { useMutation as G } from "@tanstack/react-query";
|
|
4
4
|
import m from "tiny-invariant";
|
|
5
|
-
import { LEGACY_GAME_PROVIDERS as
|
|
5
|
+
import { LEGACY_GAME_PROVIDERS as g, PLATFORM_CODE as o, ENVIRONMENT as a } from "../../constants/index.mjs";
|
|
6
6
|
import "../../utils/capitalize.mjs";
|
|
7
7
|
import { createPoll as l } from "../../utils/createPoll.mjs";
|
|
8
8
|
import "../../utils/parseDecimal.mjs";
|
|
@@ -12,23 +12,23 @@ import "../../utils/isMobile.mjs";
|
|
|
12
12
|
import { getCreateGameSessionMutationKey as E, getSessionQueryKey as u } from "../../utils/queryKeys.mjs";
|
|
13
13
|
import { getSession as c } from "../services/getSession.mjs";
|
|
14
14
|
const R = (y) => {
|
|
15
|
-
const
|
|
16
|
-
return
|
|
15
|
+
const i = C();
|
|
16
|
+
return G({
|
|
17
17
|
...y,
|
|
18
18
|
mutationKey: E(),
|
|
19
|
-
mutationFn: async (
|
|
20
|
-
const
|
|
19
|
+
mutationFn: async (r) => {
|
|
20
|
+
const n = w.generate(S.GameSession).toString(), s = await i.fetchQuery({
|
|
21
21
|
queryKey: u(),
|
|
22
22
|
queryFn: () => c()
|
|
23
23
|
});
|
|
24
|
-
if (m(s.status === "authenticated"),
|
|
25
|
-
await
|
|
24
|
+
if (m(s.status === "authenticated"), g.includes(r.provider)) {
|
|
25
|
+
await f(
|
|
26
26
|
{
|
|
27
|
-
id:
|
|
28
|
-
game:
|
|
27
|
+
id: n,
|
|
28
|
+
game: "reference" in r ? r.reference : r.id
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
environment:
|
|
31
|
+
environment: a,
|
|
32
32
|
headers: {
|
|
33
33
|
"Platform-Code": o,
|
|
34
34
|
Authorization: `Bearer ${s.token}`
|
|
@@ -37,12 +37,12 @@ const R = (y) => {
|
|
|
37
37
|
);
|
|
38
38
|
const t = await l(
|
|
39
39
|
async () => {
|
|
40
|
-
const e = await
|
|
40
|
+
const e = await i.fetchQuery({
|
|
41
41
|
queryKey: u(),
|
|
42
42
|
queryFn: () => c()
|
|
43
43
|
});
|
|
44
|
-
return m(e.status === "authenticated"), await
|
|
45
|
-
environment:
|
|
44
|
+
return m(e.status === "authenticated"), await h(n, {
|
|
45
|
+
environment: a,
|
|
46
46
|
headers: {
|
|
47
47
|
"Platform-Code": o,
|
|
48
48
|
Authorization: `Bearer ${e.token}`
|
|
@@ -63,11 +63,11 @@ const R = (y) => {
|
|
|
63
63
|
} else {
|
|
64
64
|
await p(
|
|
65
65
|
{
|
|
66
|
-
id:
|
|
67
|
-
game:
|
|
66
|
+
id: n,
|
|
67
|
+
game: "reference" in r ? r.reference : r.id
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
environment:
|
|
70
|
+
environment: a,
|
|
71
71
|
headers: {
|
|
72
72
|
"Platform-Code": o,
|
|
73
73
|
Authorization: `Bearer ${s.token}`
|
|
@@ -76,12 +76,12 @@ const R = (y) => {
|
|
|
76
76
|
);
|
|
77
77
|
const t = await l(
|
|
78
78
|
async () => {
|
|
79
|
-
const e = await
|
|
79
|
+
const e = await i.fetchQuery({
|
|
80
80
|
queryKey: u(),
|
|
81
81
|
queryFn: () => c()
|
|
82
82
|
});
|
|
83
|
-
return m(e.status === "authenticated"), await d(
|
|
84
|
-
environment:
|
|
83
|
+
return m(e.status === "authenticated"), await d(n, {
|
|
84
|
+
environment: a,
|
|
85
85
|
headers: {
|
|
86
86
|
"Platform-Code": o,
|
|
87
87
|
Authorization: `Bearer ${e.token}`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Game, GameSession } from '@opexa/portal-sdk-core';
|
|
1
|
+
import { FavoriteGame, Game, GameSession } from '@opexa/portal-sdk-core';
|
|
2
2
|
import { Mutation } from '../../types';
|
|
3
3
|
export declare const useEndGameSessionMutation: Mutation<void, {
|
|
4
|
-
game: Game;
|
|
4
|
+
game: Game | FavoriteGame;
|
|
5
5
|
session: GameSession;
|
|
6
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@opexa/portal-sdk-core"),a=require("@tanstack/react-query"),u=require("tiny-invariant"),e=require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const c=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const i=require("../../utils/queryKeys.js"),d=require("../services/getSession.js"),y=s=>{const o=c.getQueryClient();return a.useMutation({...s,mutationKey:i.getEndGameSessionMutationKey(),mutationFn:async t=>{const r=await o.fetchQuery({queryKey:i.getSessionQueryKey(),queryFn:()=>d.getSession()});u(r.status==="authenticated"),e.LEGACY_GAME_PROVIDERS.includes(t.game.provider)?await n.endGameSession__legacy(t.session.id,{environment:e.ENVIRONMENT,headers:{"Platform-Code":e.PLATFORM_CODE,Authorization:`Bearer ${r.token}`}}):await n.endGameSession(t.session.id,{environment:e.ENVIRONMENT,headers:{"Platform-Code":e.PLATFORM_CODE,Authorization:`Bearer ${r.token}`}})}})};exports.useEndGameSessionMutation=y;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { endGameSession__legacy as
|
|
2
|
-
import { useMutation as
|
|
3
|
-
import
|
|
4
|
-
import { LEGACY_GAME_PROVIDERS as d, PLATFORM_CODE as
|
|
1
|
+
import { endGameSession__legacy as s, endGameSession as a } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useMutation as m } from "@tanstack/react-query";
|
|
3
|
+
import u from "tiny-invariant";
|
|
4
|
+
import { LEGACY_GAME_PROVIDERS as d, PLATFORM_CODE as o, ENVIRONMENT as i } from "../../constants/index.mjs";
|
|
5
5
|
import "../../utils/capitalize.mjs";
|
|
6
6
|
import "../../utils/parseDecimal.mjs";
|
|
7
7
|
import "../../utils/getLocaleInfo.mjs";
|
|
@@ -9,27 +9,27 @@ import { getQueryClient as y } from "../../utils/getQueryClient.mjs";
|
|
|
9
9
|
import "../../utils/isMobile.mjs";
|
|
10
10
|
import { getEndGameSessionMutationKey as f, getSessionQueryKey as p } from "../../utils/queryKeys.mjs";
|
|
11
11
|
import { getSession as c } from "../services/getSession.mjs";
|
|
12
|
-
const K = (
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
...
|
|
12
|
+
const K = (r) => {
|
|
13
|
+
const n = y();
|
|
14
|
+
return m({
|
|
15
|
+
...r,
|
|
16
16
|
mutationKey: f(),
|
|
17
|
-
mutationFn: async (
|
|
18
|
-
const
|
|
17
|
+
mutationFn: async (e) => {
|
|
18
|
+
const t = await n.fetchQuery({
|
|
19
19
|
queryKey: p(),
|
|
20
20
|
queryFn: () => c()
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
environment:
|
|
22
|
+
u(t.status === "authenticated"), d.includes(e.game.provider) ? await s(e.session.id, {
|
|
23
|
+
environment: i,
|
|
24
24
|
headers: {
|
|
25
|
-
"Platform-Code":
|
|
26
|
-
Authorization: `Bearer ${
|
|
25
|
+
"Platform-Code": o,
|
|
26
|
+
Authorization: `Bearer ${t.token}`
|
|
27
27
|
}
|
|
28
|
-
}) : await
|
|
29
|
-
environment:
|
|
28
|
+
}) : await a(e.session.id, {
|
|
29
|
+
environment: i,
|
|
30
30
|
headers: {
|
|
31
|
-
"Platform-Code":
|
|
32
|
-
Authorization: `Bearer ${
|
|
31
|
+
"Platform-Code": o,
|
|
32
|
+
Authorization: `Bearer ${t.token}`
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@opexa/portal-sdk-core"),y=require("@tanstack/react-query"),q=require("tiny-invariant"),s=require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const c=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const u=require("../../utils/queryKeys.js"),l=require("../services/getSession.js"),Q=require("./useSessionQuery.js"),d=e=>{var r;const n=c.getQueryClient(),a=Q.useSessionQuery();return y.useQuery({...e,enabled:(e==null?void 0:e.enabled)===!1?!1:((r=a.data)==null?void 0:r.status)==="authenticated",queryKey:u.getFavoriteGamesQueryKey(),queryFn:async({signal:i})=>{const t=await n.fetchQuery({queryKey:u.getSessionQueryKey(),queryFn:()=>l.getSession()});return q(t.status==="authenticated"),o.getFavoriteGames({signal:i,environment:s.ENVIRONMENT,headers:{"Platform-Code":s.PLATFORM_CODE,Authorization:`Bearer ${t.token}`}})}})};exports.useFavoriteGamesQuery=d;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getFavoriteGames as i } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useQuery as m } from "@tanstack/react-query";
|
|
3
|
+
import u from "tiny-invariant";
|
|
4
|
+
import { PLATFORM_CODE as n, ENVIRONMENT as y } from "../../constants/index.mjs";
|
|
5
|
+
import "../../utils/capitalize.mjs";
|
|
6
|
+
import "../../utils/parseDecimal.mjs";
|
|
7
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
8
|
+
import { getQueryClient as p } from "../../utils/getQueryClient.mjs";
|
|
9
|
+
import "../../utils/isMobile.mjs";
|
|
10
|
+
import { getFavoriteGamesQueryKey as Q, getSessionQueryKey as d } from "../../utils/queryKeys.mjs";
|
|
11
|
+
import { getSession as f } from "../services/getSession.mjs";
|
|
12
|
+
import { useSessionQuery as l } from "./useSessionQuery.mjs";
|
|
13
|
+
const b = (e) => {
|
|
14
|
+
var r;
|
|
15
|
+
const o = p(), s = l();
|
|
16
|
+
return m({
|
|
17
|
+
...e,
|
|
18
|
+
enabled: (e == null ? void 0 : e.enabled) === !1 ? !1 : ((r = s.data) == null ? void 0 : r.status) === "authenticated",
|
|
19
|
+
queryKey: Q(),
|
|
20
|
+
queryFn: async ({ signal: a }) => {
|
|
21
|
+
const t = await o.fetchQuery({
|
|
22
|
+
queryKey: d(),
|
|
23
|
+
queryFn: () => f()
|
|
24
|
+
});
|
|
25
|
+
return u(t.status === "authenticated"), i({
|
|
26
|
+
signal: a,
|
|
27
|
+
environment: y,
|
|
28
|
+
headers: {
|
|
29
|
+
"Platform-Code": n,
|
|
30
|
+
Authorization: `Bearer ${t.token}`
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
b as useFavoriteGamesQuery
|
|
38
|
+
};
|
|
@@ -1,52 +1,62 @@
|
|
|
1
|
-
import { Game, GameSession, Message } from '@opexa/portal-sdk-core';
|
|
2
|
-
interface
|
|
1
|
+
import { FavoriteGame, Game, GameSession, Message } from '@opexa/portal-sdk-core';
|
|
2
|
+
interface PopupStore {
|
|
3
3
|
open: boolean;
|
|
4
4
|
setOpen: (open: boolean) => void;
|
|
5
5
|
}
|
|
6
|
+
interface Collapsible {
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
9
|
+
}
|
|
6
10
|
type GameLaunchDetails = {
|
|
7
11
|
status: 'WAITING';
|
|
8
12
|
game?: null;
|
|
9
13
|
session?: null;
|
|
10
14
|
} | {
|
|
11
15
|
status: 'LOADING';
|
|
12
|
-
game: Game;
|
|
16
|
+
game: Game | FavoriteGame;
|
|
13
17
|
session?: GameSession | null;
|
|
14
18
|
} | {
|
|
15
19
|
status: 'PLAYING';
|
|
16
|
-
game: Game;
|
|
20
|
+
game: Game | FavoriteGame;
|
|
17
21
|
session: GameSession;
|
|
18
22
|
} | {
|
|
19
23
|
status: 'FAILED';
|
|
20
|
-
game: Game;
|
|
24
|
+
game: Game | FavoriteGame;
|
|
21
25
|
session?: null;
|
|
22
26
|
};
|
|
23
|
-
interface
|
|
27
|
+
interface GamesSearchStore extends PopupStore {
|
|
28
|
+
}
|
|
29
|
+
interface GameLaunchStore {
|
|
24
30
|
details: GameLaunchDetails;
|
|
25
31
|
setDetails: (details: GameLaunchDetails) => void;
|
|
26
32
|
}
|
|
27
33
|
type DepositWithdrawalTab = 'DEPOSIT' | 'WITHDRAWAL';
|
|
28
34
|
type MessagesTab = 'ALL' | 'UNREAD';
|
|
29
|
-
interface
|
|
35
|
+
interface MessageStore extends PopupStore {
|
|
36
|
+
data: Message | null;
|
|
37
|
+
setData: (content: Message | null) => void;
|
|
38
|
+
}
|
|
39
|
+
interface MessagesStore extends PopupStore {
|
|
30
40
|
tab: MessagesTab;
|
|
31
41
|
setTab: (tab: MessagesTab) => void;
|
|
32
|
-
message:
|
|
33
|
-
setContent: (content: Message | null) => void;
|
|
34
|
-
content: Message | null;
|
|
35
|
-
};
|
|
42
|
+
message: MessageStore;
|
|
36
43
|
}
|
|
37
|
-
interface
|
|
44
|
+
interface DepositWithdrawalStore extends PopupStore {
|
|
38
45
|
tab: DepositWithdrawalTab;
|
|
39
46
|
setTab: (tab: DepositWithdrawalTab) => void;
|
|
40
47
|
}
|
|
41
48
|
interface GlobalStore {
|
|
42
|
-
signUp:
|
|
43
|
-
signIn:
|
|
44
|
-
disclaimer:
|
|
45
|
-
depositWithdrawal:
|
|
46
|
-
gameLaunch:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
signUp: PopupStore;
|
|
50
|
+
signIn: PopupStore;
|
|
51
|
+
disclaimer: PopupStore;
|
|
52
|
+
depositWithdrawal: DepositWithdrawalStore;
|
|
53
|
+
gameLaunch: GameLaunchStore;
|
|
54
|
+
gamesSearch: GamesSearchStore;
|
|
55
|
+
profile: PopupStore;
|
|
56
|
+
mobileProfile: PopupStore;
|
|
57
|
+
messages: MessagesStore;
|
|
58
|
+
sidebar: Collapsible;
|
|
59
|
+
kyc: PopupStore;
|
|
50
60
|
}
|
|
51
61
|
export declare const useGlobalStore: import('zustand').UseBoundStore<import('zustand').StoreApi<GlobalStore>>;
|
|
52
62
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("zustand"),i=l.create(a=>({signIn:{open:!1,setOpen(s){a(e=>({signIn:{...e.signIn,open:s}}))}},signUp:{open:!1,setOpen(s){a(e=>({signUp:{...e.signUp,open:s}}))}},disclaimer:{open:!1,setOpen(s){a(e=>({disclaimer:{...e.disclaimer,open:s}}))}},depositWithdrawal:{open:!1,setOpen(s){a(e=>({depositWithdrawal:{...e.depositWithdrawal,open:s}}))},tab:"DEPOSIT",setTab(s){a(e=>({depositWithdrawal:{...e.depositWithdrawal,tab:s}}))}},gameLaunch:{details:{status:"WAITING"},setDetails(s){a(e=>({gameLaunch:{...e.gameLaunch,details:s}}))}},profile:{open:!1,setOpen(s){a(e=>({profile:{...e.profile,open:s}}))}},mobileProfile:{open:!1,setOpen(s){a(e=>({mobileProfile:{...e.mobileProfile,open:s}}))}},messages:{open:!1,setOpen(s){a(e=>({messages:{...e.messages,open:s}}))},tab:"ALL",setTab(s){a(e=>({messages:{...e.messages,tab:s}}))},message:{data:null,open:!1,setOpen(s){a(e=>({messages:{...e.messages,message:{...e.messages.message,open:s}}}))},setData(s){a(e=>({messages:{...e.messages,message:{...e.messages.message,data:s}}}))}}},gamesSearch:{open:!1,setOpen(s){a(e=>({gamesSearch:{...e.gamesSearch,open:s}}))}},kyc:{open:!1,setOpen(s){a(e=>({kyc:{...e.kyc,open:s}}))}},sidebar:{collapsed:!1,setCollapsed(s){a(e=>({sidebar:{...e.sidebar,collapsed:s}}))}}}));exports.useGlobalStore=i;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { create as
|
|
2
|
-
const
|
|
1
|
+
import { create as l } from "zustand";
|
|
2
|
+
const n = l((a) => ({
|
|
3
3
|
signIn: {
|
|
4
4
|
open: !1,
|
|
5
5
|
setOpen(s) {
|
|
@@ -106,7 +106,7 @@ const l = i((a) => ({
|
|
|
106
106
|
}));
|
|
107
107
|
},
|
|
108
108
|
message: {
|
|
109
|
-
|
|
109
|
+
data: null,
|
|
110
110
|
open: !1,
|
|
111
111
|
setOpen(s) {
|
|
112
112
|
a((e) => ({
|
|
@@ -119,20 +119,53 @@ const l = i((a) => ({
|
|
|
119
119
|
}
|
|
120
120
|
}));
|
|
121
121
|
},
|
|
122
|
-
|
|
122
|
+
setData(s) {
|
|
123
123
|
a((e) => ({
|
|
124
124
|
messages: {
|
|
125
125
|
...e.messages,
|
|
126
126
|
message: {
|
|
127
127
|
...e.messages.message,
|
|
128
|
-
|
|
128
|
+
data: s
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}));
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
},
|
|
135
|
+
gamesSearch: {
|
|
136
|
+
open: !1,
|
|
137
|
+
setOpen(s) {
|
|
138
|
+
a((e) => ({
|
|
139
|
+
gamesSearch: {
|
|
140
|
+
...e.gamesSearch,
|
|
141
|
+
open: s
|
|
142
|
+
}
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
kyc: {
|
|
147
|
+
open: !1,
|
|
148
|
+
setOpen(s) {
|
|
149
|
+
a((e) => ({
|
|
150
|
+
kyc: {
|
|
151
|
+
...e.kyc,
|
|
152
|
+
open: s
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
sidebar: {
|
|
158
|
+
collapsed: !1,
|
|
159
|
+
setCollapsed(s) {
|
|
160
|
+
a((e) => ({
|
|
161
|
+
sidebar: {
|
|
162
|
+
...e.sidebar,
|
|
163
|
+
collapsed: s
|
|
164
|
+
}
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
134
167
|
}
|
|
135
168
|
}));
|
|
136
169
|
export {
|
|
137
|
-
|
|
170
|
+
n as useGlobalStore
|
|
138
171
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@opexa/portal-sdk-core"),i=require("@tanstack/react-query"),u=require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const y=require("../../utils/queryKeys.js"),a=(r,t)=>i.useInfiniteQuery({...t,queryKey:y.getJackpotPayoutsQueryKey(r),queryFn:({pageParam:e,signal:o})=>n.getJackpotPayouts({...r,after:e},{signal:o,environment:u.ENVIRONMENT,headers:{"Platform-Code":u.PLATFORM_CODE}}),initialPageParam:void 0,getNextPageParam(e){if(e!=null&&e.pageInfo.hasNextPage)return e.pageInfo.endCursor}});exports.useJackpotPayoutsQuery=a;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getJackpotPayouts as m } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useInfiniteQuery as i } from "@tanstack/react-query";
|
|
3
|
+
import { PLATFORM_CODE as u, ENVIRONMENT as n } from "../../constants/index.mjs";
|
|
4
|
+
import "../../utils/capitalize.mjs";
|
|
5
|
+
import "../../utils/parseDecimal.mjs";
|
|
6
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
7
|
+
import "../../utils/getQueryClient.mjs";
|
|
8
|
+
import "../../utils/isMobile.mjs";
|
|
9
|
+
import { getJackpotPayoutsQueryKey as p } from "../../utils/queryKeys.mjs";
|
|
10
|
+
const g = (o, e) => i({
|
|
11
|
+
...e,
|
|
12
|
+
queryKey: p(o),
|
|
13
|
+
queryFn: ({ pageParam: r, signal: t }) => m(
|
|
14
|
+
{ ...o, after: r },
|
|
15
|
+
{
|
|
16
|
+
signal: t,
|
|
17
|
+
environment: n,
|
|
18
|
+
headers: {
|
|
19
|
+
"Platform-Code": u
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
initialPageParam: void 0,
|
|
24
|
+
getNextPageParam(r) {
|
|
25
|
+
if (r != null && r.pageInfo.hasNextPage)
|
|
26
|
+
return r.pageInfo.endCursor;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
g as useJackpotPayoutsQuery
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@opexa/portal-sdk-core"),o=require("@tanstack/react-query"),s=require("tiny-invariant"),u=require("../../constants/index.js"),y=require("../services/getSession.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const c=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const e=require("../../utils/queryKeys.js"),q=a=>{const t=c.getQueryClient();return o.useMutation({...a,mutationKey:e.getMarkGameAsFavoriteMutationKey(),mutationFn:async r=>{const i=await t.fetchQuery({queryKey:e.getSessionQueryKey(),queryFn:()=>y.getSession()});return s(i.status==="authenticated"),await n.markGameAsFavorite(r,{environment:u.ENVIRONMENT,headers:{"Platform-Code":u.PLATFORM_CODE,Authorization:`Bearer ${i.token}`}}),r},onSuccess:()=>{t.invalidateQueries({queryKey:e.getGamesQueryKey({})}),t.invalidateQueries({queryKey:e.getFavoriteGamesQueryKey()})}})};exports.useMarkGameAsFavoriteMutation=q;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { markGameAsFavorite as i } from "@opexa/portal-sdk-core";
|
|
2
|
+
import { useMutation as a } from "@tanstack/react-query";
|
|
3
|
+
import n from "tiny-invariant";
|
|
4
|
+
import { PLATFORM_CODE as m, ENVIRONMENT as u } from "../../constants/index.mjs";
|
|
5
|
+
import { getSession as s } from "../services/getSession.mjs";
|
|
6
|
+
import "../../utils/capitalize.mjs";
|
|
7
|
+
import "../../utils/parseDecimal.mjs";
|
|
8
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
9
|
+
import { getQueryClient as y } from "../../utils/getQueryClient.mjs";
|
|
10
|
+
import "../../utils/isMobile.mjs";
|
|
11
|
+
import { getMarkGameAsFavoriteMutationKey as p, getGamesQueryKey as c, getFavoriteGamesQueryKey as f, getSessionQueryKey as v } from "../../utils/queryKeys.mjs";
|
|
12
|
+
const C = (o) => {
|
|
13
|
+
const e = y();
|
|
14
|
+
return a({
|
|
15
|
+
...o,
|
|
16
|
+
mutationKey: p(),
|
|
17
|
+
mutationFn: async (t) => {
|
|
18
|
+
const r = await e.fetchQuery({
|
|
19
|
+
queryKey: v(),
|
|
20
|
+
queryFn: () => s()
|
|
21
|
+
});
|
|
22
|
+
return n(r.status === "authenticated"), await i(t, {
|
|
23
|
+
environment: u,
|
|
24
|
+
headers: {
|
|
25
|
+
"Platform-Code": m,
|
|
26
|
+
Authorization: `Bearer ${r.token}`
|
|
27
|
+
}
|
|
28
|
+
}), t;
|
|
29
|
+
},
|
|
30
|
+
onSuccess: () => {
|
|
31
|
+
e.invalidateQueries({ queryKey: c({}) }), e.invalidateQueries({ queryKey: f() });
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
C as useMarkGameAsFavoriteMutation
|
|
37
|
+
};
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import { Mutation } from '../../types';
|
|
2
|
-
|
|
3
|
-
id: string;
|
|
4
|
-
};
|
|
5
|
-
export declare const useMarkMessageAsReadMutation: Mutation<string, MarkMessageAsReadInput>;
|
|
6
|
-
export {};
|
|
2
|
+
export declare const useMarkMessageAsReadMutation: Mutation<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@opexa/portal-sdk-core"),i=require("@tanstack/react-query"),o=require("tiny-invariant"),n=require("../../constants/index.js"),y=require("../services/getSession.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");const c=require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");const e=require("../../utils/queryKeys.js"),q=u=>{const t=c.getQueryClient();return i.useMutation({...u,mutationKey:e.getMarkMessageAsReadMutationKey(),mutationFn:async r=>{const s=await t.fetchQuery({queryKey:e.getSessionQueryKey(),queryFn:()=>y.getSession()});return o(s.status==="authenticated"),await a.markMessageAsRead(r,{environment:n.ENVIRONMENT,headers:{"Platform-Code":n.PLATFORM_CODE,Authorization:`Bearer ${s.token}`}}),r},onSuccess:()=>{t.invalidateQueries({queryKey:e.getMessagesQueryKey()}),t.invalidateQueries({queryKey:e.getUnreadMessagesCountQueryKey()})}})};exports.useMarkMessageAsReadMutation=q;
|