@opexa/portal-components 0.0.65 β 0.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Account/Account.d.ts +23 -0
- package/dist/components/Account/Account.js +107 -0
- package/dist/components/Account/AccountTrigger.d.ts +6 -0
- package/dist/components/Account/AccountTrigger.js +13 -0
- package/dist/components/Account/account.recipe.d.ts +61 -0
- package/dist/components/Account/account.recipe.js +32 -0
- package/dist/components/Account/index.d.ts +2 -0
- package/dist/components/Account/index.js +2 -0
- package/dist/components/AccountInfo/AccountInfo.d.ts +4 -0
- package/dist/components/AccountInfo/AccountInfo.js +143 -0
- package/dist/components/AccountInfo/index.d.ts +1 -0
- package/dist/components/AccountInfo/index.js +1 -0
- package/dist/components/AccountSecurity/AccountSecurity.d.ts +4 -0
- package/dist/components/AccountSecurity/AccountSecurity.js +171 -0
- package/dist/components/AccountSecurity/index.d.ts +1 -0
- package/dist/components/AccountSecurity/index.js +1 -0
- package/dist/components/AccountVerification/AccountVerification.d.ts +4 -0
- package/dist/components/AccountVerification/AccountVerification.js +37 -0
- package/dist/components/AccountVerification/index.d.ts +1 -0
- package/dist/components/AccountVerification/index.js +1 -0
- package/dist/components/Banner/Banner.d.ts +11 -0
- package/dist/components/Banner/Banner.js +38 -0
- package/dist/components/Banner/index.d.ts +1 -0
- package/dist/components/Banner/index.js +1 -0
- package/dist/components/BetRecords/BetRecords.d.ts +7 -0
- package/dist/components/BetRecords/BetRecords.js +181 -0
- package/dist/components/BetRecords/index.d.ts +1 -0
- package/dist/components/BetRecords/index.js +1 -0
- package/dist/components/Bonus/Bonus.client.d.ts +2 -0
- package/dist/components/Bonus/Bonus.client.js +9 -0
- package/dist/components/Bonus/Bonus.d.ts +10 -0
- package/dist/components/Bonus/Bonus.js +5 -0
- package/dist/components/Bonus/index.d.ts +1 -0
- package/dist/components/Bonus/index.js +1 -0
- package/dist/components/Bonuses/Bonuses.client.js +1 -1
- package/dist/components/Bonuses/Bonuses.d.ts +15 -0
- package/dist/components/Bonuses/Bonuses.js +7 -0
- package/dist/components/Bonuses/index.js +1 -1
- package/dist/components/Cashback/Cashback.client.d.ts +2 -0
- package/dist/components/Cashback/Cashback.client.js +27 -0
- package/dist/components/Cashback/Cashback.d.ts +7 -0
- package/dist/components/Cashback/Cashback.js +15 -0
- package/dist/components/Cashback/index.d.ts +1 -0
- package/dist/components/Cashback/index.js +1 -0
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +2 -0
- package/dist/components/CashbackBonus/CashbackBonus.client.js +9 -0
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +10 -0
- package/dist/components/CashbackBonus/CashbackBonus.js +5 -0
- package/dist/components/CashbackBonus/index.d.ts +1 -0
- package/dist/components/CashbackBonus/index.js +1 -0
- package/dist/components/DepositWithdrawal/AmountChoices.d.ts +11 -0
- package/dist/components/DepositWithdrawal/AmountChoices.js +25 -0
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.d.ts +8 -0
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +31 -0
- package/dist/components/DepositWithdrawal/Deposit/Deposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +75 -0
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +129 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +126 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +129 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.js +10 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.js +96 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +21 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js +2 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +16 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +102 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +13 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +60 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.js +10 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +96 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +21 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.js +2 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +16 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +101 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +13 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +60 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +6 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +39 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +5 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +21 -0
- package/dist/components/DepositWithdrawal/PaymentMethods.d.ts +10 -0
- package/dist/components/DepositWithdrawal/PaymentMethods.js +60 -0
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +109 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +131 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +101 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +109 -0
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +91 -0
- package/dist/components/DepositWithdrawal/index.d.ts +1 -0
- package/dist/components/DepositWithdrawal/index.js +1 -0
- package/dist/components/DepositWithdrawal/utils.d.ts +3 -0
- package/dist/components/DepositWithdrawal/utils.js +9 -0
- package/dist/components/Disclaimer/Disclaimer.d.ts +5 -0
- package/dist/components/Disclaimer/Disclaimer.js +14 -0
- package/dist/components/Disclaimer/index.d.ts +1 -0
- package/dist/components/Disclaimer/index.js +1 -0
- package/dist/components/Disclaimer/useDisclaimer.d.ts +4 -0
- package/dist/components/Disclaimer/useDisclaimer.js +37 -0
- package/dist/components/Empty.d.ts +10 -0
- package/dist/components/Empty.js +7 -0
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +2 -0
- package/dist/components/FavoriteGames/FavoriteGames.client.js +31 -0
- package/dist/components/FavoriteGames/FavoriteGames.d.ts +6 -0
- package/dist/components/FavoriteGames/FavoriteGames.js +7 -0
- package/dist/components/FavoriteGames/index.d.ts +1 -0
- package/dist/components/FavoriteGames/index.js +1 -0
- package/dist/components/GameLaunch/GameLaunch.d.ts +1 -0
- package/dist/components/GameLaunch/GameLaunch.js +75 -0
- package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +7 -0
- package/dist/components/GameLaunch/GameLaunchTrigger.js +57 -0
- package/dist/components/GameLaunch/index.d.ts +2 -0
- package/dist/components/GameLaunch/index.js +2 -0
- package/dist/components/GameProviders/GameProviders.d.ts +11 -0
- package/dist/components/GameProviders/GameProviders.js +32 -0
- package/dist/components/GameProviders/index.d.ts +1 -0
- package/dist/components/GameProviders/index.js +1 -0
- package/dist/components/Games/BadgeNew.d.ts +2 -0
- package/dist/components/Games/BadgeNew.js +4 -0
- package/dist/components/Games/BadgePopular.d.ts +2 -0
- package/dist/components/Games/BadgePopular.js +4 -0
- package/dist/components/Games/BadgeTop.d.ts +2 -0
- package/dist/components/Games/BadgeTop.js +4 -0
- package/dist/components/Games/Game.d.ts +4 -0
- package/dist/components/Games/Game.js +37 -0
- package/dist/components/Games/GameContext.d.ts +2 -0
- package/dist/components/Games/GameContext.js +2 -0
- package/dist/components/Games/Games.d.ts +8 -0
- package/dist/components/Games/Games.js +6 -0
- package/dist/components/Games/GamesCarousel.client.d.ts +2 -0
- package/dist/components/Games/GamesCarousel.client.js +58 -0
- package/dist/components/Games/GamesCarousel.d.ts +16 -0
- package/dist/components/Games/GamesCarousel.js +11 -0
- package/dist/components/Games/GamesList.client.d.ts +2 -0
- package/dist/components/Games/GamesList.client.js +14 -0
- package/dist/components/Games/GamesList.d.ts +11 -0
- package/dist/components/Games/GamesList.js +10 -0
- package/dist/components/Games/index.d.ts +1 -0
- package/dist/components/Games/index.js +1 -0
- package/dist/components/GamesSearch/GamesSearch.d.ts +8 -0
- package/dist/components/GamesSearch/GamesSearch.js +45 -0
- package/dist/components/GamesSearch/index.d.ts +1 -0
- package/dist/components/GamesSearch/index.js +1 -0
- package/dist/components/InfiniteScroll.d.ts +10 -0
- package/dist/components/InfiniteScroll.js +25 -0
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +2 -0
- package/dist/components/JackpotCounter/JackpotCounter.client.js +57 -0
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +8 -0
- package/dist/components/JackpotCounter/JackpotCounter.js +21 -0
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +8 -0
- package/dist/components/JackpotCounter/JackpotCounterItem.js +103 -0
- package/dist/components/JackpotCounter/index.d.ts +1 -0
- package/dist/components/JackpotCounter/index.js +1 -0
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +5 -0
- package/dist/components/Jackpots/JackpotGameProviders.js +38 -0
- package/dist/components/Jackpots/JackpotItemDesktop.d.ts +9 -0
- package/dist/components/Jackpots/JackpotItemDesktop.js +43 -0
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +9 -0
- package/dist/components/Jackpots/JackpotItemMobile.js +44 -0
- package/dist/components/Jackpots/JackpotRules.d.ts +6 -0
- package/dist/components/Jackpots/JackpotRules.js +9 -0
- package/dist/components/Jackpots/Jackpots.client.d.ts +2 -0
- package/dist/components/Jackpots/Jackpots.client.js +28 -0
- package/dist/components/Jackpots/Jackpots.d.ts +10 -0
- package/dist/components/Jackpots/Jackpots.js +21 -0
- package/dist/components/Jackpots/index.d.ts +1 -0
- package/dist/components/Jackpots/index.js +1 -0
- package/dist/components/Jackpots/useJackpotItemData.d.ts +20 -0
- package/dist/components/Jackpots/useJackpotItemData.js +87 -0
- package/dist/components/KYC/Header.d.ts +1 -0
- package/dist/components/KYC/Header.js +6 -0
- package/dist/components/KYC/Indicator.d.ts +1 -0
- package/dist/components/KYC/Indicator.js +9 -0
- package/dist/components/KYC/KYC.d.ts +1 -0
- package/dist/components/KYC/KYC.js +26 -0
- package/dist/components/KYC/KYCContext.d.ts +2 -0
- package/dist/components/KYC/KYCContext.js +2 -0
- package/dist/components/KYC/KYCTrigger.d.ts +5 -0
- package/dist/components/KYC/KYCTrigger.js +14 -0
- package/dist/components/KYC/Step1.d.ts +1 -0
- package/dist/components/KYC/Step1.js +12 -0
- package/dist/components/KYC/Step2.d.ts +1 -0
- package/dist/components/KYC/Step2.js +12 -0
- package/dist/components/KYC/Step3.d.ts +1 -0
- package/dist/components/KYC/Step3.js +11 -0
- package/dist/components/KYC/Step4.d.ts +1 -0
- package/dist/components/KYC/Step4.js +6 -0
- package/dist/components/KYC/index.d.ts +2 -0
- package/dist/components/KYC/index.js +2 -0
- package/dist/components/KYC/useKYC.d.ts +10 -0
- package/dist/components/KYC/useKYC.js +8 -0
- package/dist/components/Marquee/Marquee.d.ts +5 -0
- package/dist/components/Marquee/Marquee.js +5 -0
- package/dist/components/Marquee/index.d.ts +1 -0
- package/dist/components/Marquee/index.js +1 -0
- package/dist/components/Messages/MessageItem.d.ts +4 -0
- package/dist/components/Messages/MessageItem.js +34 -0
- package/dist/components/Messages/MessagePopup.d.ts +1 -0
- package/dist/components/Messages/MessagePopup.js +20 -0
- package/dist/components/Messages/MessageTrigger.d.ts +8 -0
- package/dist/components/Messages/MessageTrigger.js +18 -0
- package/dist/components/Messages/Messages.d.ts +14 -0
- package/dist/components/Messages/Messages.js +38 -0
- package/dist/components/Messages/MessagesTrigger.d.ts +6 -0
- package/dist/components/Messages/MessagesTrigger.js +14 -0
- package/dist/components/Messages/index.d.ts +4 -0
- package/dist/components/Messages/index.js +4 -0
- package/dist/components/Messages/utils.d.ts +3 -0
- package/dist/components/Messages/utils.js +27 -0
- package/dist/components/PortalProvider/PortalProvider.d.ts +9 -0
- package/dist/components/PortalProvider/PortalProvider.js +18 -0
- package/dist/components/PortalProvider/Providers.d.ts +4 -0
- package/dist/components/PortalProvider/Providers.js +12 -0
- package/dist/components/PortalProvider/Snackbar.d.ts +1 -0
- package/dist/components/PortalProvider/Snackbar.js +21 -0
- package/dist/components/PortalProvider/WebVitals.d.ts +1 -0
- package/dist/components/PortalProvider/WebVitals.js +8 -0
- package/dist/components/PortalProvider/index.d.ts +1 -0
- package/dist/components/PortalProvider/index.js +1 -0
- package/dist/components/Promo/Promo.client.d.ts +2 -0
- package/dist/components/Promo/Promo.client.js +27 -0
- package/dist/components/Promo/Promo.d.ts +7 -0
- package/dist/components/Promo/Promo.js +15 -0
- package/dist/components/Promo/index.d.ts +1 -0
- package/dist/components/Promo/index.js +1 -0
- package/dist/components/Promos/Cashback.d.ts +7 -0
- package/dist/components/Promos/Cashback.js +17 -0
- package/dist/components/Promos/Promo.d.ts +7 -0
- package/dist/components/Promos/Promo.js +17 -0
- package/dist/components/Promos/Promos.d.ts +15 -0
- package/dist/components/Promos/Promos.js +13 -0
- package/dist/components/Promos/PromosCarousel.d.ts +2 -0
- package/dist/components/Promos/PromosCarousel.js +45 -0
- package/dist/components/Promos/PromosGrid.d.ts +2 -0
- package/dist/components/Promos/PromosGrid.js +16 -0
- package/dist/components/Promos/index.d.ts +1 -0
- package/dist/components/Promos/index.js +1 -0
- package/dist/components/Protected/Protected.d.ts +6 -0
- package/dist/components/Protected/Protected.js +8 -0
- package/dist/components/Protected/index.d.ts +1 -0
- package/dist/components/Protected/index.js +1 -0
- package/dist/components/Quests/CountdownTimer.d.ts +15 -0
- package/dist/components/Quests/CountdownTimer.js +33 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +73 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +8 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
- package/dist/components/Quests/Quests.client.d.ts +2 -0
- package/dist/components/Quests/Quests.client.js +27 -0
- package/dist/components/Quests/Quests.d.ts +6 -0
- package/dist/components/Quests/Quests.js +7 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.js +19 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +8 -0
- package/dist/components/Quests/index.d.ts +1 -0
- package/dist/components/Quests/index.js +1 -0
- package/dist/components/Search/Search.d.ts +6 -0
- package/dist/components/Search/Search.js +38 -0
- package/dist/components/Search/SearchTrigger.d.ts +5 -0
- package/dist/components/Search/SearchTrigger.js +14 -0
- package/dist/components/Search/index.d.ts +2 -0
- package/dist/components/Search/index.js +2 -0
- package/dist/components/SignIn/MobileNumberSignIn.d.ts +1 -0
- package/dist/components/SignIn/MobileNumberSignIn.js +121 -0
- package/dist/components/SignIn/NameAndPasswordSignIn.d.ts +1 -0
- package/dist/components/SignIn/NameAndPasswordSignIn.js +116 -0
- package/dist/components/SignIn/SignIn.d.ts +7 -0
- package/dist/components/SignIn/SignIn.js +18 -0
- package/dist/components/SignIn/SignInContext.d.ts +2 -0
- package/dist/components/SignIn/SignInContext.js +2 -0
- package/dist/components/SignIn/SignInForm.d.ts +1 -0
- package/dist/components/SignIn/SignInForm.js +10 -0
- package/dist/components/SignIn/SignInMethod.d.ts +1 -0
- package/dist/components/SignIn/SignInMethod.js +19 -0
- package/dist/components/SignIn/SignInTrigger.d.ts +6 -0
- package/dist/components/SignIn/SignInTrigger.js +14 -0
- package/dist/components/SignIn/index.d.ts +2 -0
- package/dist/components/SignIn/index.js +2 -0
- package/dist/components/SignIn/useSignIn.d.ts +10 -0
- package/dist/components/SignIn/useSignIn.js +11 -0
- package/dist/components/SignUp/SignUp.d.ts +7 -0
- package/dist/components/SignUp/SignUp.js +16 -0
- package/dist/components/SignUp/SignUpForm.d.ts +1 -0
- package/dist/components/SignUp/SignUpForm.js +133 -0
- package/dist/components/SignUp/SignUpTrigger.d.ts +6 -0
- package/dist/components/SignUp/SignUpTrigger.js +14 -0
- package/dist/components/SignUp/index.d.ts +2 -0
- package/dist/components/SignUp/index.js +2 -0
- package/dist/components/TopWins/TopWins.client.d.ts +2 -0
- package/dist/components/TopWins/TopWins.client.js +23 -0
- package/dist/components/TopWins/TopWins.d.ts +6 -0
- package/dist/components/TopWins/TopWins.js +7 -0
- package/dist/components/TopWins/index.d.ts +1 -0
- package/dist/components/TopWins/index.js +1 -0
- package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +2 -0
- package/dist/components/TournamentCounter/TournamentCounter.client.js +50 -0
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +8 -0
- package/dist/components/TournamentCounter/TournamentCounter.js +21 -0
- package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +8 -0
- package/dist/components/TournamentCounter/TournamentCounterItem.js +106 -0
- package/dist/components/TournamentCounter/index.d.ts +1 -0
- package/dist/components/TournamentCounter/index.js +1 -0
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +5 -0
- package/dist/components/Tournaments/TournamentGameProviders.js +38 -0
- package/dist/components/Tournaments/TournamentItemDesktop.d.ts +7 -0
- package/dist/components/Tournaments/TournamentItemDesktop.js +56 -0
- package/dist/components/Tournaments/TournamentItemMobile.d.ts +7 -0
- package/dist/components/Tournaments/TournamentItemMobile.js +54 -0
- package/dist/components/Tournaments/TournamentRules.d.ts +6 -0
- package/dist/components/Tournaments/TournamentRules.js +9 -0
- package/dist/components/Tournaments/Tournaments.client.d.ts +2 -0
- package/dist/components/Tournaments/Tournaments.client.js +19 -0
- package/dist/components/Tournaments/Tournaments.d.ts +10 -0
- package/dist/components/Tournaments/Tournaments.js +14 -0
- package/dist/components/Tournaments/index.d.ts +1 -0
- package/dist/components/Tournaments/index.js +1 -0
- package/dist/components/Tournaments/useTournamentItemData.d.ts +16 -0
- package/dist/components/Tournaments/useTournamentItemData.js +64 -0
- package/dist/components/TransactionRecords/DepositRecordsTable.d.ts +1 -0
- package/dist/components/TransactionRecords/DepositRecordsTable.js +76 -0
- package/dist/components/TransactionRecords/TableFilters.d.ts +28 -0
- package/dist/components/TransactionRecords/TableFilters.js +212 -0
- package/dist/components/TransactionRecords/TransactionRecords.d.ts +7 -0
- package/dist/components/TransactionRecords/TransactionRecords.js +9 -0
- package/dist/components/TransactionRecords/TransactionRecordsTable.d.ts +1 -0
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +51 -0
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.d.ts +1 -0
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +70 -0
- package/dist/components/TransactionRecords/index.d.ts +1 -0
- package/dist/components/TransactionRecords/index.js +1 -0
- package/dist/components/index.js +34 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type GamesCarouselProps } from './GamesCarousel';
|
|
2
|
+
import { type GamesListProps } from './GamesList';
|
|
3
|
+
export type GamesProps = ({
|
|
4
|
+
layout: 'list';
|
|
5
|
+
} & GamesListProps) | ({
|
|
6
|
+
layout?: 'carousel';
|
|
7
|
+
} & GamesCarouselProps);
|
|
8
|
+
export declare function Games(props: GamesProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { GamesCarousel } from './GamesCarousel.js';
|
|
3
|
+
import { GamesList } from './GamesList.js';
|
|
4
|
+
export async function Games(props) {
|
|
5
|
+
return props.layout === 'list' ? (_jsx(GamesList, { ...props })) : (_jsx(GamesCarousel, { ...props }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
4
|
+
import Link from 'next/link';
|
|
5
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
6
|
+
import { twMerge } from 'tailwind-merge';
|
|
7
|
+
import { useGamesQuery } from '../../client/hooks/index.js';
|
|
8
|
+
import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon, SpinnerIcon, } from '../../icons/index.js';
|
|
9
|
+
import { Button } from '../../ui/index.js';
|
|
10
|
+
import { Game } from './Game.js';
|
|
11
|
+
import { GameContext } from './GameContext.js';
|
|
12
|
+
export function GamesCarousel__client(props) {
|
|
13
|
+
const numOfRows = props.numOfRows ?? 1;
|
|
14
|
+
const gamesQuery = useGamesQuery({
|
|
15
|
+
first: (numOfRows + 1) * 6,
|
|
16
|
+
filter: props.filter,
|
|
17
|
+
});
|
|
18
|
+
const games = gamesQuery.data?.pages
|
|
19
|
+
.map((page) => page.edges.map((edge) => edge.node))
|
|
20
|
+
.flat() ?? [];
|
|
21
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
22
|
+
align: 'start',
|
|
23
|
+
slidesToScroll: 3,
|
|
24
|
+
breakpoints: {
|
|
25
|
+
'(min-width: 1024px)': {
|
|
26
|
+
slidesToScroll: 6,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const [prevBtnDisabled, setPrevBtnDisabled] = useState(true);
|
|
31
|
+
const [nextBtnDisabled, setNextBtnDisabled] = useState(true);
|
|
32
|
+
const onPrevButtonClick = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
|
|
33
|
+
const onNextButtonClick = useCallback(async () => {
|
|
34
|
+
if (!emblaApi?.canScrollNext() && gamesQuery.hasNextPage) {
|
|
35
|
+
await gamesQuery.fetchNextPage();
|
|
36
|
+
emblaApi?.reInit();
|
|
37
|
+
await new Promise((resolve) => setTimeout(resolve, 1));
|
|
38
|
+
}
|
|
39
|
+
emblaApi?.scrollNext();
|
|
40
|
+
}, [emblaApi, gamesQuery]);
|
|
41
|
+
const onSelect = useCallback((emblaApi) => {
|
|
42
|
+
setPrevBtnDisabled(!emblaApi?.canScrollPrev());
|
|
43
|
+
setNextBtnDisabled(!emblaApi?.canScrollNext());
|
|
44
|
+
}, []);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!emblaApi)
|
|
47
|
+
return;
|
|
48
|
+
onSelect(emblaApi);
|
|
49
|
+
emblaApi.on('reInit', onSelect).on('select', onSelect);
|
|
50
|
+
}, [emblaApi, onSelect]);
|
|
51
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Games' }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/games', className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", onClick: onPrevButtonClick, disabled: prevBtnDisabled, "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", onClick: onNextButtonClick, disabled: nextBtnDisabled && !gamesQuery.hasNextPage
|
|
52
|
+
? true
|
|
53
|
+
: gamesQuery.isFetchingNextPage, "aria-label": "Next", children: gamesQuery.isFetchingNextPage ? (_jsx(SpinnerIcon, { className: "size-5" })) : (_jsx(ArrowRightIcon, { className: "size-5" })) })] })] })] }), _jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md', numOfRows === 3
|
|
54
|
+
? 'grid-rows-3'
|
|
55
|
+
: numOfRows === 2
|
|
56
|
+
? 'grid-rows-2'
|
|
57
|
+
: 'grid-rows-1'), children: games.map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, { badge: props.badge }) }, game.id))) }) })] }));
|
|
58
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GamesInput } from '@opexa/portal-sdk-core';
|
|
2
|
+
export interface GamesCarouselProps {
|
|
3
|
+
/** @default "Games" */
|
|
4
|
+
heading?: string;
|
|
5
|
+
/**
|
|
6
|
+
* @description URL for viewing all games
|
|
7
|
+
* @default "/games"
|
|
8
|
+
*/
|
|
9
|
+
viewAllUrl?: string;
|
|
10
|
+
/** @default 1 */
|
|
11
|
+
numOfRows?: 1 | 2 | 3;
|
|
12
|
+
badge?: 'top' | 'new' | 'popular';
|
|
13
|
+
filter?: GamesInput['filter'];
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function GamesCarousel(props: GamesCarouselProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { prefetchGamesQuery } from '../../server/utils/index.js';
|
|
3
|
+
import { GamesCarousel__client } from './GamesCarousel.client.js';
|
|
4
|
+
export async function GamesCarousel(props) {
|
|
5
|
+
const numOfRows = props.numOfRows ?? 1;
|
|
6
|
+
await prefetchGamesQuery({
|
|
7
|
+
first: (numOfRows + 1) * 6,
|
|
8
|
+
filter: props.filter,
|
|
9
|
+
});
|
|
10
|
+
return _jsx(GamesCarousel__client, { ...props });
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { noop } from 'lodash-es';
|
|
4
|
+
import { useGamesQuery, useInfiniteQueryHelper } from '../../client/hooks/index.js';
|
|
5
|
+
import { Button, Progress } from '../../ui/index.js';
|
|
6
|
+
import { Game } from './Game.js';
|
|
7
|
+
import { GameContext } from './GameContext.js';
|
|
8
|
+
export function GamesList__client(props) {
|
|
9
|
+
const { availableRows, totalRows, totalAvailableRows, hasNextPage, next } = useInfiniteQueryHelper(useGamesQuery, {
|
|
10
|
+
first: props.first ?? 24,
|
|
11
|
+
filter: props.filter,
|
|
12
|
+
});
|
|
13
|
+
return (_jsxs("div", { className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Games' }), _jsx("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: availableRows.map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, { badge: props.badge }) }, game.id))) }), _jsxs("div", { className: "mt-3xl flex flex-col items-center", children: [_jsx(Progress.Root, { min: 0, max: totalRows, value: totalAvailableRows, onValueChange: noop, className: "w-[12.5rem]", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "text-button-tertiary-fg mt-md text-sm", children: `Displaying ${totalAvailableRows} of ${totalRows}` }), hasNextPage && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: next, className: "mt-lg", children: "Load More" }))] })] }));
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GamesInput } from '@opexa/portal-sdk-core';
|
|
2
|
+
export interface GamesListProps {
|
|
3
|
+
badge?: 'top' | 'new' | 'popular';
|
|
4
|
+
/** @default 24 */
|
|
5
|
+
first?: number;
|
|
6
|
+
filter?: GamesInput['filter'];
|
|
7
|
+
/** @default "Games"*/
|
|
8
|
+
heading?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function GamesList(props: GamesListProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { prefetchGamesQuery } from '../../server/utils/index.js';
|
|
3
|
+
import { GamesList__client } from './GamesList.client.js';
|
|
4
|
+
export async function GamesList(props) {
|
|
5
|
+
await prefetchGamesQuery({
|
|
6
|
+
first: props.first ?? 24,
|
|
7
|
+
filter: props.filter,
|
|
8
|
+
});
|
|
9
|
+
return _jsx(GamesList__client, { ...props });
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Games';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Games.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GamesInput } from '@opexa/portal-sdk-core';
|
|
2
|
+
interface GamesSearchProps {
|
|
3
|
+
first?: number;
|
|
4
|
+
filter?: GamesInput['filter'];
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function GamesSearch(props: GamesSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { createListCollection, Portal } from '@ark-ui/react';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { useGamesQuery } from '../../client/hooks/index.js';
|
|
7
|
+
import { SearchLgIcon } from '../../icons/index.js';
|
|
8
|
+
import { Button, Combobox, Presence } from '../../ui/index.js';
|
|
9
|
+
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
10
|
+
export function GamesSearch(props) {
|
|
11
|
+
const [search, setSearch] = useState('');
|
|
12
|
+
const gamesQuery = useGamesQuery({
|
|
13
|
+
first: props.first ?? 18,
|
|
14
|
+
filter: props.filter,
|
|
15
|
+
search,
|
|
16
|
+
}, {
|
|
17
|
+
enabled: search.length >= 3,
|
|
18
|
+
});
|
|
19
|
+
const games = gamesQuery.data?.pages
|
|
20
|
+
.map((page) => page.edges.map((edge) => edge.node))
|
|
21
|
+
.flat() ?? [];
|
|
22
|
+
const collection = createListCollection({
|
|
23
|
+
items: games,
|
|
24
|
+
itemToValue: (item) => item.id,
|
|
25
|
+
itemToString: (item) => item.name,
|
|
26
|
+
});
|
|
27
|
+
return (_jsx("div", { className: props.className, children: _jsxs(Combobox.Root, { collection: collection, positioning: {
|
|
28
|
+
sameWidth: true,
|
|
29
|
+
placement: 'bottom',
|
|
30
|
+
}, inputValue: search, onInputValueChange: (details) => {
|
|
31
|
+
setSearch(details.inputValue);
|
|
32
|
+
}, selectionBehavior: "preserve", allowCustomValue: true, children: [_jsxs(Combobox.Control, { children: [_jsx(Combobox.Input, { placeholder: "Search" }), _jsx(Combobox.Context, { children: (api) => {
|
|
33
|
+
if (api.inputValue.length <= 0)
|
|
34
|
+
return null;
|
|
35
|
+
return (_jsx("span", { className: "text-text-secondary-700 px-3.5 font-semibold", tabIndex: 0, onClick: () => {
|
|
36
|
+
api.setInputValue('');
|
|
37
|
+
api.focus();
|
|
38
|
+
}, children: "Clear" }));
|
|
39
|
+
} })] }), _jsx(Portal, { children: _jsx(Combobox.Positioner, { children: search.trim().length > 0 && (_jsx(Combobox.Content, { className: "max-h-[33.25rem] overflow-y-auto p-0", children: search.length >= 1 && search.length <= 2 ? (_jsx(Alert, { message: "Search requires at least 3 characters." })) : (_jsxs(_Fragment, { children: [games.length <= 0 && _jsx(Alert, { message: "No results found" }), games.length > 0 && (_jsxs("div", { className: "p-xl", children: [_jsx(Combobox.Context, { children: (api) => (_jsx("div", { className: "grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: games.map((game) => (_jsxs(GameLaunchTrigger, { game: game, onClick: () => {
|
|
40
|
+
api.setOpen(false);
|
|
41
|
+
}, className: "block w-full shadow-sm", children: [_jsx(Image, { src: game.image, alt: "", width: 200, height: 200, priority: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: game.name })] }, game.id))) })) }), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: "mx-auto mt-4xl w-fit", onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) })) }) })] }) }));
|
|
42
|
+
}
|
|
43
|
+
function Alert({ message }) {
|
|
44
|
+
return (_jsxs("div", { className: "py-lg", role: "alert", "aria-live": "polite", children: [_jsx("div", { className: "bg-bg-secondary shadow-xs border-border-primary mx-auto flex size-12 items-center justify-center rounded-lg border", children: _jsx(SearchLgIcon, { className: "text-text-secondary-700 size-6" }) }), _jsx("p", { className: "text-text-secondary-700 mt-4 text-center", children: message })] }));
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GamesSearch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GamesSearch.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface InfiniteScrollProps {
|
|
3
|
+
loader?: ReactNode;
|
|
4
|
+
hasMore?: boolean;
|
|
5
|
+
loadMore: () => Promise<void> | void;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function InfiniteScroll(props: InfiniteScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Fragment } from 'react';
|
|
4
|
+
import { useBoolean, useDebounceCallback, useIntersectionObserver, } from 'usehooks-ts';
|
|
5
|
+
export function InfiniteScroll(props) {
|
|
6
|
+
const { value: loading, setValue: setLoading } = useBoolean(false);
|
|
7
|
+
const loader = props.loader ?? null;
|
|
8
|
+
const hasMore = props.hasMore ?? false;
|
|
9
|
+
const loadMore = useDebounceCallback(async () => {
|
|
10
|
+
if (loading)
|
|
11
|
+
return;
|
|
12
|
+
if (!hasMore)
|
|
13
|
+
return;
|
|
14
|
+
setLoading(true);
|
|
15
|
+
await props.loadMore();
|
|
16
|
+
setLoading(false);
|
|
17
|
+
}, 300);
|
|
18
|
+
const [ref] = useIntersectionObserver({
|
|
19
|
+
onChange(isIntersecting) {
|
|
20
|
+
if (isIntersecting)
|
|
21
|
+
loadMore();
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
return (_jsxs(Fragment, { children: [props.children, _jsx("div", { ref: ref, role: "presentation", style: props.style, className: props.className, hidden: !hasMore, children: !!hasMore && _jsx(Fragment, { children: loader }) })] }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
4
|
+
import Link from 'next/link';
|
|
5
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
6
|
+
import { useJackpotsQuery } from '../../client/hooks/index.js';
|
|
7
|
+
import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon } from '../../icons/index.js';
|
|
8
|
+
import { Button } from '../../ui/index.js';
|
|
9
|
+
import { JackpotCounterItem } from './JackpotCounterItem.js';
|
|
10
|
+
export function JackpotCounter__client(props) {
|
|
11
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
12
|
+
align: 'start',
|
|
13
|
+
slidesToScroll: 1,
|
|
14
|
+
});
|
|
15
|
+
const scrollPrev = useCallback(() => {
|
|
16
|
+
if (emblaApi)
|
|
17
|
+
emblaApi.scrollPrev();
|
|
18
|
+
}, [emblaApi]);
|
|
19
|
+
const scrollNext = useCallback(() => {
|
|
20
|
+
if (emblaApi)
|
|
21
|
+
emblaApi.scrollNext();
|
|
22
|
+
}, [emblaApi]);
|
|
23
|
+
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
|
24
|
+
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
25
|
+
const onSelect = useCallback(() => {
|
|
26
|
+
if (!emblaApi)
|
|
27
|
+
return;
|
|
28
|
+
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
29
|
+
setCanScrollNext(emblaApi.canScrollNext());
|
|
30
|
+
}, [emblaApi]);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (!emblaApi)
|
|
33
|
+
return;
|
|
34
|
+
onSelect();
|
|
35
|
+
emblaApi.on('select', onSelect);
|
|
36
|
+
emblaApi.on('reInit', onSelect);
|
|
37
|
+
}, [emblaApi, onSelect]);
|
|
38
|
+
const jackpotsQuery = useJackpotsQuery({
|
|
39
|
+
first: 100,
|
|
40
|
+
filter: {
|
|
41
|
+
status: {
|
|
42
|
+
equal: 'ACTIVE',
|
|
43
|
+
},
|
|
44
|
+
deleted: {
|
|
45
|
+
equal: false,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
sort: {
|
|
49
|
+
cursor: 'POOL',
|
|
50
|
+
order: 'DESC',
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
const jackpots = jackpotsQuery.data?.pages[0].edges.map((edge) => edge.node) ?? [];
|
|
54
|
+
if (jackpots.length <= 0)
|
|
55
|
+
return null;
|
|
56
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "text-lg font-semibold", children: props.heading ?? 'Jackpots' }), _jsxs("div", { className: "flex items-center md:gap-3xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/jackpots', className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { disabled: !canScrollPrev, onClick: scrollPrev, variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsxs(Button, { disabled: !canScrollNext, onClick: scrollNext, variant: "outline", colorScheme: "gray", className: "rounded-l-none", "aria-label": "Next", children: [_jsx("span", { className: "sr-only", children: "Next" }), _jsx(ArrowRightIcon, { className: "size-5" })] })] })] })] }), _jsx("div", { className: "relative mt-lg lg:overflow-hidden", ref: emblaRef, children: _jsx("div", { className: "flex gap-2.5", children: jackpots.map((jackpot) => (_jsx(JackpotCounterItem, { jackpot: jackpot, className: "w-full", viewAllUrl: props.viewAllUrl }, jackpot.id))) }) })] }));
|
|
57
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface JackpotCounterProps {
|
|
2
|
+
/** @default "Promos" */
|
|
3
|
+
heading?: string;
|
|
4
|
+
/** @default "/jackpots" */
|
|
5
|
+
viewAllUrl?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function JackpotCounter(props: JackpotCounterProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { prefetchJackpotsQuery } from '../../server/utils/index.js';
|
|
3
|
+
import { JackpotCounter__client } from './JackpotCounter.client.js';
|
|
4
|
+
export async function JackpotCounter(props) {
|
|
5
|
+
await prefetchJackpotsQuery({
|
|
6
|
+
first: 100,
|
|
7
|
+
filter: {
|
|
8
|
+
status: {
|
|
9
|
+
equal: 'ACTIVE',
|
|
10
|
+
},
|
|
11
|
+
deleted: {
|
|
12
|
+
equal: false,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
sort: {
|
|
16
|
+
cursor: 'POOL',
|
|
17
|
+
order: 'DESC',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
return _jsx(JackpotCounter__client, { ...props });
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Jackpot } from '@opexa/portal-sdk-core';
|
|
2
|
+
export interface JackpotCounterCardProps {
|
|
3
|
+
jackpot: Jackpot;
|
|
4
|
+
className?: string;
|
|
5
|
+
/** @default "/jackpots" */
|
|
6
|
+
viewAllUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function JackpotCounterItem({ jackpot, className, viewAllUrl, }: JackpotCounterCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Progress } from '@ark-ui/react';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import Link from 'next/link';
|
|
6
|
+
import { useCallback, useMemo } from 'react';
|
|
7
|
+
import { twMerge } from 'tailwind-merge';
|
|
8
|
+
import { useLocaleInfo } from '../../client/hooks/index.js';
|
|
9
|
+
import { useJackpotPayoutsQuery } from '../../client/hooks/useJackpotPayoutsQuery.js';
|
|
10
|
+
import { ArrowNarrowUpRightIcon, ChevronLeftIcon, ChevronRightIcon, Trophy01Icon, User01Icon, } from '../../icons/index.js';
|
|
11
|
+
import { StarIcon } from '../../icons/StarIcon.js';
|
|
12
|
+
import closeChest from '../../images/close-chest.png';
|
|
13
|
+
import firstPlace from '../../images/first-place.png';
|
|
14
|
+
import leaderboard from '../../images/leaderboard.png';
|
|
15
|
+
import openChest from '../../images/open-chest.png';
|
|
16
|
+
import { formatNumber, getPercentage, mask } from '../../utils/index.js';
|
|
17
|
+
import styles from './JackpotCounterItem.module.css';
|
|
18
|
+
export function JackpotCounterItem({ jackpot, className, viewAllUrl, }) {
|
|
19
|
+
const jackpotPayoutsQuery = useJackpotPayoutsQuery({
|
|
20
|
+
first: 30,
|
|
21
|
+
filter: {
|
|
22
|
+
jackpot: {
|
|
23
|
+
equal: jackpot.id,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
sort: {
|
|
27
|
+
cursor: 'AMOUNT',
|
|
28
|
+
order: 'DESC',
|
|
29
|
+
},
|
|
30
|
+
}, {
|
|
31
|
+
enabled: typeof window !== 'undefined',
|
|
32
|
+
});
|
|
33
|
+
const jackpotPayouts = jackpotPayoutsQuery.data?.pages[0].edges.map((edge) => edge.node) ?? [];
|
|
34
|
+
const topJackpotPayout = jackpotPayouts[0] ?? [];
|
|
35
|
+
const localeInfo = useLocaleInfo();
|
|
36
|
+
const isPayingOut = jackpot.drawing;
|
|
37
|
+
const jackpotAmount = isPayingOut
|
|
38
|
+
? jackpot.maximumJackpotPoolLimit
|
|
39
|
+
: jackpot.pool;
|
|
40
|
+
const Arrow = useCallback(({ index }) => {
|
|
41
|
+
const Icon = isPayingOut ? ChevronLeftIcon : ChevronRightIcon;
|
|
42
|
+
return (_jsx(Icon, { className: twMerge('scale-400 lg:scale-250 text-brand-300 min-w-2.5 lg:min-w-4', isPayingOut
|
|
43
|
+
? styles['animate-wave-color-error']
|
|
44
|
+
: styles['animate-wave-color-success']), style: {
|
|
45
|
+
animationDelay: isPayingOut
|
|
46
|
+
? `${(40 - index - 1) * 0.1}s`
|
|
47
|
+
: `${index * 0.1}s`,
|
|
48
|
+
} }));
|
|
49
|
+
}, [isPayingOut]);
|
|
50
|
+
const arrowImages = useMemo(() => Array.from({ length: 40 }, (_, i) => (_jsx(Arrow, { isFirst: i === 0, index: i }, i))), [Arrow]);
|
|
51
|
+
return (_jsxs("div", { className: twMerge('bg-bg-tertiary border-border-primary relative flex shrink-0 rounded-2xl border p-3 text-center lg:gap-4 lg:p-5', className), children: [_jsxs("div", { className: "z-1 relative flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [isPayingOut ? (_jsxs("div", { className: "border-utility-success-200 bg-utility-success-50 text-utility-success-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium", children: [_jsx("span", { className: "full bg-utility-success-500 size-1.5 animate-pulse rounded" }), "Paying Out"] })) : (_jsxs("div", { className: "border-utility-blue-200 bg-utility-blue-50 text-utility-blue-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium", children: [_jsx(ArrowNarrowUpRightIcon, { className: "text-utility-blue-500 size-3.5" }), "Accumulating"] })), _jsx("div", { className: "text-text-primary-900 mt-1 text-left text-lg font-medium lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: "bg-bg-primary text-brand-400 mt-1.5 w-fit rounded-md px-2 py-1 text-2xl font-bold lg:mt-2 lg:text-4xl", children: formatNumber(jackpotAmount, {
|
|
52
|
+
currency: localeInfo.currency.code,
|
|
53
|
+
minDecimalPlaces: 2,
|
|
54
|
+
maxDecimalPlaces: 2,
|
|
55
|
+
}) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsx("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: "1st" })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: topJackpotPayout.member.name }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
|
|
56
|
+
currency: localeInfo.currency.code,
|
|
57
|
+
minDecimalPlaces: 2,
|
|
58
|
+
maxDecimalPlaces: 2,
|
|
59
|
+
}) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "firstPlace", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsxs("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Top Payout"] }), _jsx("div", { className: "font-semibold", children: "No winners yet" }), _jsx("div", { className: "text-text-secondary-700 text-xs", children: "You could be the first to win the tournament!" })] })] }))] }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(0, {
|
|
60
|
+
currency: localeInfo.currency.code,
|
|
61
|
+
compact: true,
|
|
62
|
+
}) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
63
|
+
currency: localeInfo.currency.code,
|
|
64
|
+
compact: true,
|
|
65
|
+
}) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsx(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
|
|
66
|
+
? `The pot has hit ${formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
67
|
+
currency: localeInfo.currency.code,
|
|
68
|
+
compact: true,
|
|
69
|
+
})} Play now for your chance to win big! π₯`
|
|
70
|
+
: getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] })] }), _jsxs("div", { className: "z-1 hidden flex-1 space-y-4 lg:block", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { width: 24, height: 24, src: leaderboard, quality: 100, alt: "leaderboardIcon", className: "size-full h-auto w-6" }), _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Leaderboard' : 'Starting soon!' })] }), _jsxs(Link, { className: "text-button-tertiary-fg flex text-sm font-semibold", href: viewAllUrl ?? '/jackpots', children: ["See details", _jsx(ChevronRightIcon, { className: "size-5" })] })] }), _jsx("div", { className: twMerge('max-h-[272px] overflow-y-scroll', styles['scrollArea']), children: _jsx("div", { className: "border-gray-200 overflow-hidden rounded-xl", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-xs font-medium", children: [_jsx("th", { className: "w-[52px]", children: "#" }), _jsx("th", { children: "Player" }), _jsx("th", { children: "Multiplier" }), _jsx("th", { children: "Prize" })] }) }), _jsx("tbody", { children: jackpotPayouts.length ? (_jsx(_Fragment, { children: jackpotPayouts.map((jackpotPayout, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: mask(jackpotPayout.member.name) }), _jsxs("td", { className: "border-border-secondary h-12 border-t-2", children: [jackpotPayout.multiplier, "x"] }), _jsx("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: formatNumber(jackpotPayout.amount, {
|
|
71
|
+
currency: localeInfo.currency.code,
|
|
72
|
+
minDecimalPlaces: 2,
|
|
73
|
+
maxDecimalPlaces: 2,
|
|
74
|
+
}) })] }, i))) })) : (_jsx(_Fragment, { children: Array.from({ length: 10 }).map((_, i) => (_jsxs("tr", { className: "bg-bg-primary text-text-secondary-700 text-sm", children: [_jsx("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: i + 1 < 6 ? (_jsxs("div", { className: "relative", children: [_jsx(StarIcon, { className: twMerge('mx-auto size-6.5', starTierStyles[i].starColor) }), _jsx("span", { className: twMerge('absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold', starTierStyles[i].numberColor), children: i + 1 })] })) : (i + 1) }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }), _jsx("td", { className: "border-border-secondary h-12 border-t-2", children: "-" })] }, i))) })) })] }) }) })] }), isPayingOut && (_jsx("div", { className: twMerge(styles['light-rays'], 'absolute right-0 top-0 rounded-2xl [--light-rays-top:25%] lg:[--light-rays-top:150px]') }))] }));
|
|
75
|
+
}
|
|
76
|
+
const getAccumulatingJackpotDescription = (part, total) => {
|
|
77
|
+
const percentage = total === 0 ? 0 : (part / total) * 100;
|
|
78
|
+
return percentage <= 90
|
|
79
|
+
? 'The jackpot is heating up! Keep playing to stay in the action and watch it grow!'
|
|
80
|
+
: 'π₯ Itβs about to pop! Stay in the game for your shot at the prize!';
|
|
81
|
+
};
|
|
82
|
+
const starTierStyles = [
|
|
83
|
+
{
|
|
84
|
+
starColor: 'text-yellow-400',
|
|
85
|
+
numberColor: 'text-bg-primary',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
starColor: 'text-utility-gray-700',
|
|
89
|
+
numberColor: 'text-bg-primary',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
starColor: 'text-yellow-700',
|
|
93
|
+
numberColor: 'text-bg-primary',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
starColor: 'text-bg-quaternary',
|
|
97
|
+
numberColor: 'text-text-primary-900',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
starColor: 'text-bg-quaternary',
|
|
101
|
+
numberColor: 'text-text-primary-900',
|
|
102
|
+
},
|
|
103
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JackpotCounter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JackpotCounter.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GameProviderData } from '../../types';
|
|
2
|
+
export interface JackpotGameProvidersProps {
|
|
3
|
+
gameProviders: GameProviderData[];
|
|
4
|
+
}
|
|
5
|
+
export declare function JackpotGameProviders({ gameProviders, }: JackpotGameProvidersProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import Link from 'next/link';
|
|
6
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
7
|
+
import { ArrowLeftIcon, ArrowRightIcon } from '../../icons/index.js';
|
|
8
|
+
import { Button } from '../../ui/index.js';
|
|
9
|
+
export function JackpotGameProviders({ gameProviders, }) {
|
|
10
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
11
|
+
align: 'start',
|
|
12
|
+
slidesToScroll: 1,
|
|
13
|
+
});
|
|
14
|
+
const scrollPrev = useCallback(() => {
|
|
15
|
+
if (emblaApi)
|
|
16
|
+
emblaApi.scrollPrev();
|
|
17
|
+
}, [emblaApi]);
|
|
18
|
+
const scrollNext = useCallback(() => {
|
|
19
|
+
if (emblaApi)
|
|
20
|
+
emblaApi.scrollNext();
|
|
21
|
+
}, [emblaApi]);
|
|
22
|
+
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
|
23
|
+
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
24
|
+
const onSelect = useCallback(() => {
|
|
25
|
+
if (!emblaApi)
|
|
26
|
+
return;
|
|
27
|
+
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
28
|
+
setCanScrollNext(emblaApi.canScrollNext());
|
|
29
|
+
}, [emblaApi]);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!emblaApi)
|
|
32
|
+
return;
|
|
33
|
+
onSelect();
|
|
34
|
+
emblaApi.on('select', onSelect);
|
|
35
|
+
emblaApi.on('reInit', onSelect);
|
|
36
|
+
}, [emblaApi, onSelect]);
|
|
37
|
+
return (_jsxs("div", { className: "p-4 pb-8", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: "Jackpot Game Providers" }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { disabled: !canScrollPrev, onClick: scrollPrev, variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsxs(Button, { disabled: !canScrollNext, onClick: scrollNext, variant: "outline", colorScheme: "gray", className: "rounded-l-none", "aria-label": "Next", children: [_jsx("span", { className: "sr-only", children: "Next" }), _jsx(ArrowRightIcon, { className: "size-5" })] })] })] }), _jsx("div", { className: "relative mt-3 overflow-hidden", ref: emblaRef, children: _jsx("div", { className: "flex gap-3.5", children: gameProviders.map((provider, i) => (_jsx(Link, { href: `/${provider.slug}`, className: "bg-gray-800 lg:bg-bg-primary-900 min-w-27.5 rounded-md", children: _jsx(Image, { src: provider.logo, alt: "provider", className: "size-full" }) }, i))) }) })] }));
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Jackpot } from '@opexa/portal-sdk-core';
|
|
2
|
+
import type { GameProviderData } from '../../types';
|
|
3
|
+
export interface JackpotItemProps {
|
|
4
|
+
jackpot: Jackpot;
|
|
5
|
+
/** @default "/jackpots" */
|
|
6
|
+
viewAllUrl?: string;
|
|
7
|
+
gameProviders: GameProviderData[];
|
|
8
|
+
}
|
|
9
|
+
export declare function JackpotItemDesktop({ jackpot, gameProviders, }: JackpotItemProps): import("react/jsx-runtime").JSX.Element;
|