@opexa/portal-components 0.0.899 → 0.0.900
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/useGlobalStore.d.ts +2 -0
- package/dist/client/hooks/useGlobalStore.js +5 -0
- package/dist/components/Banner/Banner.client.d.ts +12 -0
- package/dist/components/Banner/Banner.client.js +49 -0
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/AurixPayQRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DigitainLauncher/Loading.js +1 -1
- package/dist/components/ForgotPassword/Crazywin/ForgotPassword.module.css +42 -42
- package/dist/components/GameLaunch/GameLaunchTrigger.js +3 -1
- package/dist/components/Jackpots/Jackpots.module.css +288 -288
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/KYC/BasicInformation.js +1 -1
- package/dist/components/KYC/IdentityVerification.js +1 -1
- package/dist/components/KYC/KYC.lazy.js +1 -1
- package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
- package/dist/components/KYC/KYCNonPagCor/KYCVerificationStatus.lazy.js +2 -2
- package/dist/components/KYC/KYCVerificationStatus.lazy.js +5 -8
- package/dist/components/KYC/PersonalInformation.js +1 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +1 -0
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +12 -0
- package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
- package/dist/components/PortalProvider/PortalProvider.d.ts +1 -1
- package/dist/components/PortalProvider/PortalProvider.js +2 -2
- package/dist/components/PortalProvider/Providers.d.ts +3 -2
- package/dist/components/PortalProvider/Providers.js +12 -1
- package/dist/components/Quests/Crazywin/CWDailyCheckInQuest.d.ts +15 -0
- package/dist/components/Quests/Crazywin/CWDailyCheckInQuest.js +116 -0
- package/dist/components/Quests/Crazywin/CWJourneyQuest.d.ts +18 -0
- package/dist/components/Quests/Crazywin/CWJourneyQuest.js +137 -0
- package/dist/components/Quests/Crazywin/CWOnboardingQuest.d.ts +6 -0
- package/dist/components/Quests/Crazywin/CWOnboardingQuest.js +81 -0
- package/dist/components/Quests/Crazywin/CWWageringQuestNext.d.ts +23 -0
- package/dist/components/Quests/Crazywin/CWWageringQuestNext.js +53 -0
- package/dist/components/Quests/Crazywin/components/Countdown.d.ts +7 -0
- package/dist/components/Quests/Crazywin/components/Countdown.js +62 -0
- package/dist/components/Quests/Crazywin/components/DialogCheckin.d.ts +8 -0
- package/dist/components/Quests/Crazywin/components/DialogCheckin.js +12 -0
- package/dist/components/Quests/Crazywin/components/DialogJourney.d.ts +17 -0
- package/dist/components/Quests/Crazywin/components/DialogJourney.js +43 -0
- package/dist/components/Quests/Crazywin/components/DialogOnboarding.d.ts +13 -0
- package/dist/components/Quests/Crazywin/components/DialogOnboarding.js +19 -0
- package/dist/components/Quests/Crazywin/components/DialogWagering.d.ts +9 -0
- package/dist/components/Quests/Crazywin/components/DialogWagering.js +22 -0
- package/dist/components/Quests/Crazywin/components/GameProviders.d.ts +8 -0
- package/dist/components/Quests/Crazywin/components/GameProviders.js +143 -0
- package/dist/components/Quests/Crazywin/components/ObjectiveItem.d.ts +15 -0
- package/dist/components/Quests/Crazywin/components/ObjectiveItem.js +8 -0
- package/dist/components/Quests/Crazywin/components/QuestBadge.d.ts +8 -0
- package/dist/components/Quests/Crazywin/components/QuestBadge.js +21 -0
- package/dist/components/Quests/Crazywin/components/StageItemLocked.d.ts +4 -0
- package/dist/components/Quests/Crazywin/components/StageItemLocked.js +6 -0
- package/dist/components/Quests/Crazywin/components/StageItemUnlocked.d.ts +10 -0
- package/dist/components/Quests/Crazywin/components/StageItemUnlocked.js +26 -0
- package/dist/components/Quests/Crazywin/components/index.d.ts +10 -0
- package/dist/components/Quests/Crazywin/components/index.js +10 -0
- package/dist/components/Quests/JourneyQuest.d.ts +6 -0
- package/dist/components/Quests/JourneyQuest.js +5 -2
- package/dist/components/Quests/Quests.client.d.ts +3 -0
- package/dist/components/Quests/Quests.client.js +30 -7
- package/dist/components/Quests/RemainingTime.d.ts +3 -0
- package/dist/components/Quests/RemainingTime.js +1 -1
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/icons/PlusIcon.d.ts +2 -0
- package/dist/icons/PlusIcon.js +4 -0
- package/dist/images/crazywin-game-providers/alize-mobile.webp +0 -0
- package/dist/images/crazywin-game-providers/bigtime-gaming.webp +0 -0
- package/dist/images/crazywin-game-providers/bti.png +0 -0
- package/dist/images/crazywin-game-providers/cq9.webp +0 -0
- package/dist/images/crazywin-game-providers/darwin.webp +0 -0
- package/dist/images/crazywin-game-providers/dg.webp +0 -0
- package/dist/images/crazywin-game-providers/digitain.png +0 -0
- package/dist/images/crazywin-game-providers/drbingo.webp +0 -0
- package/dist/images/crazywin-game-providers/evolution.webp +0 -0
- package/dist/images/crazywin-game-providers/fachai.webp +0 -0
- package/dist/images/crazywin-game-providers/habanero.webp +0 -0
- package/dist/images/crazywin-game-providers/hacksaw.png +0 -0
- package/dist/images/crazywin-game-providers/hollywoodtv.webp +0 -0
- package/dist/images/crazywin-game-providers/jdb.webp +0 -0
- package/dist/images/crazywin-game-providers/jili.webp +0 -0
- package/dist/images/crazywin-game-providers/kingmidas.webp +0 -0
- package/dist/images/crazywin-game-providers/netent.webp +0 -0
- package/dist/images/crazywin-game-providers/no-limit.webp +0 -0
- package/dist/images/crazywin-game-providers/pg.webp +0 -0
- package/dist/images/crazywin-game-providers/playtech.webp +0 -0
- package/dist/images/crazywin-game-providers/pragmaticplay.webp +0 -0
- package/dist/images/crazywin-game-providers/redtiger.webp +0 -0
- package/dist/images/crazywin-game-providers/rtg.webp +0 -0
- package/dist/images/crazywin-game-providers/rubyplay.webp +0 -0
- package/dist/images/crazywin-game-providers/sagaming.webp +0 -0
- package/dist/images/crazywin-game-providers/web/alize.webp +0 -0
- package/dist/images/crazywin-game-providers/web/bigtimegaming.png +0 -0
- package/dist/images/crazywin-game-providers/web/bti.png +0 -0
- package/dist/images/crazywin-game-providers/web/cq9.webp +0 -0
- package/dist/images/crazywin-game-providers/web/darwin.webp +0 -0
- package/dist/images/crazywin-game-providers/web/dg-bingo.png +0 -0
- package/dist/images/crazywin-game-providers/web/digitain.png +0 -0
- package/dist/images/crazywin-game-providers/web/drbingo-bingo.png +0 -0
- package/dist/images/crazywin-game-providers/web/evolution.webp +0 -0
- package/dist/images/crazywin-game-providers/web/fachai.webp +0 -0
- package/dist/images/crazywin-game-providers/web/habanero.webp +0 -0
- package/dist/images/crazywin-game-providers/web/hacksaw.webp +0 -0
- package/dist/images/crazywin-game-providers/web/hollywoodtv.png +0 -0
- package/dist/images/crazywin-game-providers/web/jdb.webp +0 -0
- package/dist/images/crazywin-game-providers/web/jili.webp +0 -0
- package/dist/images/crazywin-game-providers/web/jili_bingo.png +0 -0
- package/dist/images/crazywin-game-providers/web/kingmidas.webp +0 -0
- package/dist/images/crazywin-game-providers/web/netent.webp +0 -0
- package/dist/images/crazywin-game-providers/web/nolimitcity.png +0 -0
- package/dist/images/crazywin-game-providers/web/pg.webp +0 -0
- package/dist/images/crazywin-game-providers/web/playtech.webp +0 -0
- package/dist/images/crazywin-game-providers/web/pragmaticplay.webp +0 -0
- package/dist/images/crazywin-game-providers/web/redtiger.webp +0 -0
- package/dist/images/crazywin-game-providers/web/rtg.webp +0 -0
- package/dist/images/crazywin-game-providers/web/sagaming.png +0 -0
- package/dist/images/crazywin-game-providers/web/yellowbat-bingo.png +0 -0
- package/dist/images/crazywin-game-providers/yellowbat.webp +0 -0
- package/dist/images/phone-icon.svg +10 -10
- package/dist/schemas/forgotPasswordSchema.d.ts +8 -8
- package/dist/services/queries.js +3339 -3339
- package/dist/styles/theme.css +776 -776
- package/dist/types/crazywinTypes.d.ts +30 -0
- package/dist/types/crazywinTypes.js +19 -0
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +198 -198
- package/dist/ui/Menu/menu.recipe.d.ts +11 -11
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/utils/formatter.d.ts +2 -0
- package/dist/utils/formatter.js +9 -0
- package/dist/utils/getProviderData.d.ts +2 -0
- package/dist/utils/getProviderData.js +310 -0
- package/dist/utils/withMarketId.d.ts +1 -0
- package/dist/utils/withMarketId.js +5 -0
- package/package.json +177 -177
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.js +0 -11
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.js +0 -11
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.js +0 -126
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.js +0 -12
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +0 -17
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.js +0 -41
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.js +0 -91
- package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
- package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
- package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
- package/dist/components/Disclaimer/TermsOfUse.js +0 -13
- package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
- package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
- package/dist/components/FeatureFlag/index.d.ts +0 -1
- package/dist/components/FeatureFlag/index.js +0 -1
- package/dist/components/KYC/AutoOpen.d.ts +0 -1
- package/dist/components/KYC/AutoOpen.js +0 -40
- package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
- package/dist/components/KYC/CaptureIdDocument.js +0 -219
- package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
- package/dist/components/KYC/CaptureSelfie.js +0 -285
- package/dist/components/KYC/DisplayImage.d.ts +0 -5
- package/dist/components/KYC/DisplayImage.js +0 -8
- package/dist/components/KYC/FileUpload.d.ts +0 -10
- package/dist/components/KYC/FileUpload.js +0 -72
- package/dist/components/KYC/NoCameraError.d.ts +0 -7
- package/dist/components/KYC/NoCameraError.js +0 -6
- package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
- package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
- package/dist/components/KYC/backup/Header.d.ts +0 -1
- package/dist/components/KYC/backup/Header.js +0 -8
- package/dist/components/KYC/backup/Indicator.d.ts +0 -1
- package/dist/components/KYC/backup/Indicator.js +0 -9
- package/dist/components/KYC/backup/KYC.d.ts +0 -1
- package/dist/components/KYC/backup/KYC.js +0 -14
- package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
- package/dist/components/KYC/backup/KYC.lazy.js +0 -26
- package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
- package/dist/components/KYC/backup/KYCContext.js +0 -2
- package/dist/components/KYC/backup/Step1.d.ts +0 -1
- package/dist/components/KYC/backup/Step1.js +0 -13
- package/dist/components/KYC/backup/Step2.d.ts +0 -1
- package/dist/components/KYC/backup/Step2.js +0 -13
- package/dist/components/KYC/backup/Step3.d.ts +0 -1
- package/dist/components/KYC/backup/Step3.js +0 -13
- package/dist/components/KYC/backup/Step4.d.ts +0 -1
- package/dist/components/KYC/backup/Step4.js +0 -7
- package/dist/components/KYC/backup/useKYC.d.ts +0 -10
- package/dist/components/KYC/backup/useKYC.js +0 -8
- package/dist/components/KYC/loadModels.d.ts +0 -1
- package/dist/components/KYC/loadModels.js +0 -9
- package/dist/components/KYC/utils.d.ts +0 -9
- package/dist/components/KYC/utils.js +0 -79
- package/dist/components/Messages/Message.d.ts +0 -1
- package/dist/components/Messages/Message.js +0 -35
- package/dist/components/Messages/MessageContext.d.ts +0 -6
- package/dist/components/Messages/MessageContext.js +0 -2
- package/dist/components/Messages/MessagePopup.d.ts +0 -1
- package/dist/components/Messages/MessagePopup.js +0 -20
- package/dist/components/Messages/MessageTrigger.d.ts +0 -8
- package/dist/components/Messages/MessageTrigger.js +0 -19
- package/dist/components/Quests/CountdownTimer.d.ts +0 -15
- package/dist/components/Quests/CountdownTimer.js +0 -33
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
- package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
- package/dist/components/SignUp/SignUp.lazy.js +0 -18
- package/dist/components/SignUp/SignUpContext.d.ts +0 -6
- package/dist/components/SignUp/SignUpContext.js +0 -2
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
- package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
- package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
- package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
- package/dist/components/SignUp/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpForm.js +0 -284
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
- package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
- package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
- package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
- package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
- package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
- package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
- package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
- package/dist/components/shared/IdDocumentField.client.js +0 -204
- package/dist/components/shared/IdDocumentField.d.ts +0 -2
- package/dist/components/shared/IdDocumentField.js +0 -11
- package/dist/components/shared/SelfieField.client.d.ts +0 -20
- package/dist/components/shared/SelfieField.client.js +0 -327
- package/dist/components/shared/SelfieField.d.ts +0 -2
- package/dist/components/shared/SelfieField.js +0 -11
- package/dist/constants/BranchCode.d.ts +0 -4
- package/dist/constants/BranchCode.js +0 -42
- package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
- package/dist/handlers/postTransformIdFrontImage.js +0 -67
- package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
- package/dist/handlers/postTransformSelfieImage.js +0 -71
- package/dist/handlers.d.ts +0 -43
- package/dist/handlers.js +0 -297
- package/dist/icons/BellRingIcon.d.ts +0 -2
- package/dist/icons/BellRingIcon.js +0 -4
- package/dist/utils/dataUrlToBlob.d.ts +0 -1
- package/dist/utils/dataUrlToBlob.js +0 -11
- package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
- package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
- package/dist/utils/getGameName.d.ts +0 -1
- package/dist/utils/getGameName.js +0 -6
- package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
- package/dist/utils/isBetween3amAnd3pm.js +0 -5
- package/dist/utils/resizeImageSize.d.ts +0 -2
- package/dist/utils/resizeImageSize.js +0 -11
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MemberVerificationStatus } from '../../../../types';
|
|
2
|
+
import type { QuestContextType } from '../../QuestsContext';
|
|
3
|
+
type TaskType = 'ACCOUNT_VERIFICATION' | 'FIRST_DEPOSIT';
|
|
4
|
+
type Props = {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
quest: QuestContextType;
|
|
7
|
+
handleOpenChange: (open: boolean) => void;
|
|
8
|
+
getTaskDescription: (taskType: TaskType) => string;
|
|
9
|
+
handleTaskButtonClick: (taskType: TaskType) => void;
|
|
10
|
+
verificationStatus: MemberVerificationStatus;
|
|
11
|
+
};
|
|
12
|
+
declare const DialogQuest: ({ isOpen, quest, handleOpenChange, getTaskDescription, handleTaskButtonClick, verificationStatus, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default DialogQuest;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { XIcon } from '../../../../icons/XIcon.js';
|
|
3
|
+
import { Dialog } from '../../../../ui/Dialog/index.js';
|
|
4
|
+
import { Portal } from '../../../../ui/Portal/index.js';
|
|
5
|
+
const DialogQuest = ({ isOpen, quest, handleOpenChange, getTaskDescription, handleTaskButtonClick, verificationStatus, }) => {
|
|
6
|
+
return (_jsx(Dialog.Root, { open: isOpen, onOpenChange: (details) => {
|
|
7
|
+
handleOpenChange(details.open);
|
|
8
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "z-tooltip flex items-center justify-center", children: _jsx(Dialog.Content, { className: "", children: _jsxs("div", { className: "overflow-y-invisible mx-auto flex h-full w-full max-w-[400px] flex-col bg-[#0C0E12] px-4 py-5 lg:h-auto lg:rounded-xl", children: [_jsx("div", { className: "relative w-full pb-5", children: _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsx("h2", { className: "font-semibold text-xl", children: quest?.name }), _jsx(Dialog.CloseTrigger, { className: "relative top-0 right-0", children: _jsx(XIcon, {}) })] }) }), _jsx("p", { className: "text-[#CECFD2] text-sm", dangerouslySetInnerHTML: { __html: quest.description } }), _jsxs("div", { className: "mt-4 flex w-full flex-col space-y-4", children: [_jsxs("div", { className: "flex flex-col space-y-2.5 rounded-xl bg-[#0D1217] py-3", children: [_jsxs("div", { className: "flex w-full items-center justify-between px-3", children: [_jsx("p", { className: "font-medium text-base", children: "First Deposit" }), quest?.firstDepositCompleted && (_jsx("div", { className: "rounded-full border border-[#085D3A] bg-[#053321] px-2 py-0.5", children: _jsx("p", { className: "font-medium text-[#75E0A7] text-xs", children: "Completed" }) }))] }), _jsx("p", { className: "px-4 font-normal text-[#94969C] text-sm", children: getTaskDescription('FIRST_DEPOSIT') }), !quest?.firstDepositCompleted && (_jsx("div", { className: "px-4", children: _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
|
|
9
|
+
background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
|
|
10
|
+
}, onClick: () => handleTaskButtonClick('FIRST_DEPOSIT'), children: "Deposit" }) }))] }), _jsxs("div", { className: "flex flex-col space-y-2.5 rounded-xl bg-[#0D1217] py-3", children: [_jsxs("div", { className: "flex w-full items-center justify-between px-3", children: [_jsx("p", { className: "font-medium text-base", children: "Account Verification" }), quest?.accountVerificationCompleted && (_jsx("div", { className: "rounded-full border border-[#085D3A] bg-[#053321] px-2 py-0.5", children: _jsx("p", { className: "font-medium text-[#75E0A7] text-xs", children: "Completed" }) }))] }), _jsx("p", { className: "px-4 font-normal text-[#94969C] text-sm", children: getTaskDescription('ACCOUNT_VERIFICATION') }), !quest?.accountVerificationCompleted && (_jsx("div", { className: "px-4", children: _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
|
|
11
|
+
background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
|
|
12
|
+
}, onClick: () => handleTaskButtonClick('ACCOUNT_VERIFICATION'), disabled: verificationStatus === 'PENDING' ||
|
|
13
|
+
verificationStatus === 'VERIFIED', children: "Verify Account" }) }))] })] }), quest.bonus &&
|
|
14
|
+
quest?.firstDepositCompleted &&
|
|
15
|
+
quest?.accountVerificationCompleted ? (_jsx("div", { className: "mt-4", children: _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
|
|
16
|
+
background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
|
|
17
|
+
}, onClick: () => handleOpenChange(false), children: "Close" }) })) : (_jsx("div", { className: "mt-6 w-full rounded-lg border border-[#22262F] bg-[#13161B] px-3.5 py-2.5 text-center", children: _jsxs("p", { className: "text-sm", children: ["Complete to get", ' ', _jsxs("span", { className: "font-semibold text-[#FFE5AF]", children: ["\u20B1", quest.bonus] }), ' ', "bonus!"] }) }))] }) }) })] }) }));
|
|
18
|
+
};
|
|
19
|
+
export default DialogQuest;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { QuestContextType } from '../../QuestsContext';
|
|
2
|
+
type Props = {
|
|
3
|
+
quest: QuestContextType;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
handleOpenChange: (open: boolean) => void;
|
|
6
|
+
currentStage: number;
|
|
7
|
+
};
|
|
8
|
+
declare const DialogWagering: ({ quest, isOpen, handleOpenChange, currentStage, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default DialogWagering;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import { XIcon } from '../../../../icons/XIcon.js';
|
|
4
|
+
import { Dialog } from '../../../../ui/Dialog/index.js';
|
|
5
|
+
import { Portal } from '../../../../ui/Portal/index.js';
|
|
6
|
+
import StageItemLocked from './StageItemLocked.js';
|
|
7
|
+
import StageItemUnlocked from './StageItemUnlocked.js';
|
|
8
|
+
const DialogWagering = ({ quest, isOpen, handleOpenChange, currentStage, }) => {
|
|
9
|
+
return (_jsx(Dialog.Root, { open: isOpen, onOpenChange: (details) => {
|
|
10
|
+
handleOpenChange(details.open);
|
|
11
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "z-tooltip flex items-center justify-center", children: _jsx(Dialog.Content, { className: "", children: _jsxs("div", { className: "overflow-y-invisible mx-auto flex h-full w-full max-w-[400px] flex-col bg-[#0C0E12] px-4 py-5 lg:h-auto lg:rounded-xl", children: [_jsx("div", { className: "relative w-full pb-5", children: _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsx("h2", { className: "font-semibold text-xl", children: quest?.name }), _jsx(Dialog.CloseTrigger, { className: "relative top-0 right-0", children: _jsx(XIcon, {}) })] }) }), _jsxs("div", { className: "flex flex-col", children: [_jsx("p", { className: twMerge('prose', 'prose-h1:m-0', 'prose-h2:m-0', 'prose-h3:m-0', 'prose-h4:m-0', 'prose-h5:m-0', 'prose-h6:m-0', 'prose-a:m-0', 'prose-p:m-0', 'text-start', 'text-sm', 'text-[#A3A3A3]', 'lg:text-base', '*:text-inherit', '[&_strong]:text-inherit', 'mb-4'), dangerouslySetInnerHTML: { __html: quest.description } }), quest.program?.stages?.map((stage, index) => {
|
|
12
|
+
if (currentStage >= index + 1) {
|
|
13
|
+
return (_jsx(StageItemUnlocked, { stageLevel: currentStage, index: index, writableBonus: +quest.bonus, questCompleted: quest.status === 'COMPLETED', progressPercentage: +quest.progressPercentage, bonusAmount: stage.bonusAmount }, index));
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return _jsx(StageItemLocked, { index: index }, index);
|
|
17
|
+
}
|
|
18
|
+
}), _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
|
|
19
|
+
background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
|
|
20
|
+
}, onClick: () => handleOpenChange(false), children: "Close" })] })] }) }) })] }) }));
|
|
21
|
+
};
|
|
22
|
+
export default DialogWagering;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GameProvider } from '../../../../types';
|
|
2
|
+
import { type GameProviderConfig } from '../../../../types/crazywinTypes';
|
|
3
|
+
type Props = {
|
|
4
|
+
providers: GameProvider[];
|
|
5
|
+
gameProviderConfig: GameProviderConfig;
|
|
6
|
+
};
|
|
7
|
+
declare const GameProviders: ({ providers, gameProviderConfig }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export default GameProviders;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
4
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { useFeatureFlag } from '../../../../client/hooks/useFeatureFlag.js';
|
|
7
|
+
import { ArrowLeftIcon } from '../../../../icons/ArrowLeftIcon.js';
|
|
8
|
+
import { ArrowRightIcon } from '../../../../icons/ArrowRightIcon.js';
|
|
9
|
+
import Chest from '../../../../images/treasure.webp';
|
|
10
|
+
import { BINGO_REQUIRES_FUTURE_FLAG, CASINO_REQUIRES_FUTURE_FLAG, SLOT_REQUIRES_FUTURE_FLAG, SPECIALTY_REQUIRES_FUTURE_FLAG, TABLE_REQUIRES_FUTURE_FLAG, } from '../../../../types/crazywinTypes.js';
|
|
11
|
+
import { getProviderData } from '../../../../utils/getProviderData.js';
|
|
12
|
+
import { withMarketId } from '../../../../utils/withMarketId.js';
|
|
13
|
+
const GameProviders = ({ providers, gameProviderConfig }) => {
|
|
14
|
+
const router = useRouter();
|
|
15
|
+
const searchParams = useSearchParams();
|
|
16
|
+
const featureFlag = useFeatureFlag();
|
|
17
|
+
const mParam = searchParams.get('m'); // replaces Svelte `page.url.searchParams.get('m')`
|
|
18
|
+
const [isScrollLeftDisabled, setIsScrollLeftDisabled] = useState(true);
|
|
19
|
+
const [isScrollRightDisabled, setIsScrollRightDisabled] = useState(false);
|
|
20
|
+
const providerMenuRef = useRef(null);
|
|
21
|
+
// Scroll handler (Svelte $effect that sets scroll buttons enabled/disabled)
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
const el = providerMenuRef.current;
|
|
24
|
+
if (!el)
|
|
25
|
+
return;
|
|
26
|
+
const handleScroll = () => {
|
|
27
|
+
setIsScrollLeftDisabled(el.scrollLeft === 0);
|
|
28
|
+
setIsScrollRightDisabled(el.scrollLeft + el.clientWidth >= el.scrollWidth);
|
|
29
|
+
};
|
|
30
|
+
el.addEventListener('scroll', handleScroll);
|
|
31
|
+
// run once to initialize
|
|
32
|
+
handleScroll();
|
|
33
|
+
return () => {
|
|
34
|
+
el.removeEventListener('scroll', handleScroll);
|
|
35
|
+
};
|
|
36
|
+
}, []);
|
|
37
|
+
// Horizontal scroll with wheel (Svelte $effect handleHorizScroll)
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const el = providerMenuRef.current;
|
|
40
|
+
if (!el)
|
|
41
|
+
return;
|
|
42
|
+
const handle = (e) => {
|
|
43
|
+
const sw = el.scrollWidth;
|
|
44
|
+
const sl = el.scrollLeft;
|
|
45
|
+
const cw = el.clientWidth;
|
|
46
|
+
const scrollable = sw > cw;
|
|
47
|
+
if (!scrollable)
|
|
48
|
+
return;
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
const left = sl + e.deltaY;
|
|
51
|
+
el.scrollBy({ left });
|
|
52
|
+
};
|
|
53
|
+
// passive: false so we can call preventDefault
|
|
54
|
+
el.addEventListener('wheel', handle, { passive: false });
|
|
55
|
+
return () => {
|
|
56
|
+
el.removeEventListener('wheel', handle);
|
|
57
|
+
};
|
|
58
|
+
}, []);
|
|
59
|
+
// Derived options (Svelte $derived.by)
|
|
60
|
+
const options = useMemo(() => {
|
|
61
|
+
const filtered = providers?.filter((provider) => {
|
|
62
|
+
if (featureFlag.enabled)
|
|
63
|
+
return true;
|
|
64
|
+
const requiresFutureFlag = [
|
|
65
|
+
...BINGO_REQUIRES_FUTURE_FLAG,
|
|
66
|
+
...CASINO_REQUIRES_FUTURE_FLAG,
|
|
67
|
+
...SLOT_REQUIRES_FUTURE_FLAG,
|
|
68
|
+
...SPECIALTY_REQUIRES_FUTURE_FLAG,
|
|
69
|
+
...TABLE_REQUIRES_FUTURE_FLAG,
|
|
70
|
+
].includes(provider);
|
|
71
|
+
return !requiresFutureFlag;
|
|
72
|
+
});
|
|
73
|
+
return filtered?.map((provider) => getProviderData(provider));
|
|
74
|
+
}, [providers, featureFlag.enabled]);
|
|
75
|
+
const next = () => {
|
|
76
|
+
const el = providerMenuRef.current;
|
|
77
|
+
if (!el)
|
|
78
|
+
return;
|
|
79
|
+
el.scrollLeft += 300;
|
|
80
|
+
};
|
|
81
|
+
const prev = () => {
|
|
82
|
+
const el = providerMenuRef.current;
|
|
83
|
+
if (!el)
|
|
84
|
+
return;
|
|
85
|
+
if (el.scrollLeft > 0) {
|
|
86
|
+
el.scrollLeft -= 300;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const onProviderChange = async (value) => {
|
|
90
|
+
if (!value)
|
|
91
|
+
return;
|
|
92
|
+
// questStore.isOpen = false;
|
|
93
|
+
if (gameProviderConfig.bingoGameProviders.includes(value)) {
|
|
94
|
+
router.push(withMarketId(`/bingo/${value.toLowerCase()}`, mParam), {
|
|
95
|
+
scroll: false,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
else if (gameProviderConfig.casinoGameProviders.includes(value)) {
|
|
99
|
+
router.push(withMarketId(`/casino/${value.toLowerCase()}`, mParam), {
|
|
100
|
+
scroll: false,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
else if (gameProviderConfig.sportsGameProviders.includes(value)) {
|
|
104
|
+
// Temp removed
|
|
105
|
+
// if (value === 'BTI') {
|
|
106
|
+
// router.push(withMarketId(`/sports`), { scroll: false });
|
|
107
|
+
// await gameStore.play('SPORTS:BTI');
|
|
108
|
+
// }
|
|
109
|
+
// if (value === 'DIGITAIN') {
|
|
110
|
+
// router.push(withMarketId(`/sports`), { scroll: false });
|
|
111
|
+
// await gameStore.play__DIGITAIN();
|
|
112
|
+
// }
|
|
113
|
+
}
|
|
114
|
+
else if (gameProviderConfig.slotsGameProviders.includes(value)) {
|
|
115
|
+
router.push(withMarketId(`/slot/${value.toLowerCase()}`, mParam), {
|
|
116
|
+
scroll: false,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
else if (gameProviderConfig.specialtyGameProviders.includes(value)) {
|
|
120
|
+
router.push(withMarketId(`/specialty/${value.toLowerCase()}`, mParam), {
|
|
121
|
+
scroll: false,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
else if (gameProviderConfig.tableGameProviders.includes(value)) {
|
|
125
|
+
router.push(withMarketId(`/table/${value.toLowerCase()}`, mParam), {
|
|
126
|
+
scroll: false,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
if (!options.length) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
return (_jsxs("div", { className: "h-fit", children: [_jsxs("div", { className: "mb-[12px] flex w-full items-center justify-between", children: [_jsxs("div", { className: "flex items-end gap-2", children: [_jsx(Image, { src: Chest.src, alt: "Chest Treasure Quest", className: "block h-auto w-full", priority: true, width: 28, height: 28 }), _jsx("p", { className: "font-semibold text-lg", children: "Game Provider" })] }), _jsxs("div", { className: "flex h-[2.5rem]", children: [_jsx("button", { type: "button", onClick: prev, className: "flex h-[inherit] w-11 items-center justify-center rounded-l-full border border-[#333741] bg-[#0C111D] bg-primary text-white disabled:cursor-not-allowed disabled:text-[#98A2B3]", disabled: isScrollLeftDisabled, children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx("button", { type: "button", onClick: next, className: "flex h-[inherit] w-11 items-center justify-center rounded-r-full border border-[#333741] border-l-0 bg-[#0C111D] bg-primary text-white disabled:cursor-not-allowed disabled:text-[#98A2B3]", disabled: options.length <= 2 || isScrollRightDisabled, children: _jsx(ArrowRightIcon, { className: "size-5" }) })] })] }), _jsx("section", { ref: providerMenuRef, className: "slider overflow-x-invisible flex h-fit w-full items-end gap-1.5 scroll-smooth rounded", "data-testid": "providers-container ", children: options.map((item, index) => {
|
|
134
|
+
const imageCandidate = Array.isArray(item.image)
|
|
135
|
+
? (item.image[1] ?? item.image[0])
|
|
136
|
+
: item.image;
|
|
137
|
+
const src = typeof imageCandidate === 'string' ? imageCandidate : null;
|
|
138
|
+
return (_jsx("button", { type: "button", className: twMerge('flex h-fit shrink-0 grow-0 items-center rounded', 'relative', 'transform transition-transform duration-300', 'data-selected:translate-y-[-8px]', 'h-fit w-[8.625rem]'), onClick: () => {
|
|
139
|
+
onProviderChange(item.value);
|
|
140
|
+
}, "data-testid": "game-provider.{item.label.replaceAll(' ', '_').toLowerCase()}-button", children: src ? (_jsx(Image, { alt: item.label, src: src, className: "h-auto w-auto", draggable: "false" })) : (_jsx("div", { className: "flex w-[inherit] items-center justify-center rounded-xl bg-black/80", children: _jsx("span", { className: twMerge('bg-clip-text align-center font-lilita-one text-2xl', 'uppercase leading-none tracking-[0.075rem]', 'bg-[linear-gradient(180deg,#c7ddff_0%,#418dff_100%)]', 'drop-shadow-[0px_2px_2.8px_rgba(215,100,255,0.5)]', '[-webkit-background-clip:text]', '[-webkit-text-fill-color:transparent]', 'lg:2xl'), children: "All" }) })) }, index));
|
|
141
|
+
}) })] }));
|
|
142
|
+
};
|
|
143
|
+
export default GameProviders;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
id: string;
|
|
4
|
+
cleared: boolean;
|
|
5
|
+
name: string;
|
|
6
|
+
type: 'JOURNEY' | 'ONBOARDING' | 'WAGERING' | 'DAILY_CHECKIN';
|
|
7
|
+
bonusAmount?: number;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
className?: {
|
|
10
|
+
name?: string;
|
|
11
|
+
bonus?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare const ObjectiveItem: ({ id, cleared, name, type, bonusAmount, style, className, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default ObjectiveItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import { CheckIcon } from '../../../../icons/CheckIcon.js';
|
|
4
|
+
import { Checkbox } from '../../../../ui/Checkbox/index.js';
|
|
5
|
+
const ObjectiveItem = ({ id, cleared, name, type, bonusAmount, style, className, }) => {
|
|
6
|
+
return (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "flex items-center space-x-2", children: _jsxs(Checkbox.Root, { id: id, checked: cleared, className: "items-center", children: [_jsx(Checkbox.Control, { className: "bg-transparent", style: style, children: _jsx(Checkbox.Indicator, { asChild: true, className: "flex size-4 shrink-0 items-center justify-center rounded border border-[#FFE5AF] bg-[#FFE5AF] transition-colors duration-150", children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: twMerge(className?.name), children: _jsx("p", { className: "font-medium text-sm", children: name }) }), _jsx(Checkbox.HiddenInput, {})] }) }), type === 'JOURNEY' && (_jsxs("div", { className: twMerge('rounded-md border border-[#333741] bg-[#0C111D] py-0.5 pr-1.5 pl-1 text-[#CECFD2] text-xs', className?.bonus), children: ["+ \u20B1", bonusAmount, " Bonus"] }))] }));
|
|
7
|
+
};
|
|
8
|
+
export default ObjectiveItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
status?: string;
|
|
3
|
+
isExpired: boolean;
|
|
4
|
+
type: 'JOURNEY' | 'ONBOARDING' | 'WAGERING' | 'DAILY_CHECKIN';
|
|
5
|
+
bonusAmount?: number;
|
|
6
|
+
};
|
|
7
|
+
declare const QuestBadge: ({ status, isExpired, type, bonusAmount }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default QuestBadge;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import { currencyFormatter } from '../../../../utils/formatter.js';
|
|
4
|
+
const QuestBadge = ({ status, isExpired, type, bonusAmount }) => {
|
|
5
|
+
const variant = status === 'COMPLETED'
|
|
6
|
+
? 'completed'
|
|
7
|
+
: isExpired || status === 'FAILED'
|
|
8
|
+
? 'failed'
|
|
9
|
+
: 'default';
|
|
10
|
+
const label = variant === 'completed'
|
|
11
|
+
? 'Completed'
|
|
12
|
+
: variant === 'failed'
|
|
13
|
+
? 'Failed'
|
|
14
|
+
: null;
|
|
15
|
+
const body = (_jsx("div", { className: twMerge('w-fit rounded-full border px-2 py-0.5', variant === 'completed' && 'border-[#085D3A] bg-[#053321]', variant === 'failed' && 'border-[#7A1E1E] bg-[#3D0F0F]'), children: _jsx("p", { className: twMerge('font-medium text-sm', variant === 'completed' && 'text-[#75E0A7]', variant === 'failed' && 'text-[#F87171]'), children: label }) }));
|
|
16
|
+
if (type === 'JOURNEY') {
|
|
17
|
+
return variant === 'completed' ? (_jsxs("div", { className: "flex items-center justify-between", children: [body, _jsx("div", { className: "w-fit rounded-lg border border-[#085D3A] bg-[#053321] px-2.5 py-1", children: _jsxs("p", { className: "font-medium text-[#75E0A7] text-sm", children: ["Final Bonus ", currencyFormatter.format(bonusAmount ?? 0)] }) })] })) : (body);
|
|
18
|
+
}
|
|
19
|
+
return body;
|
|
20
|
+
};
|
|
21
|
+
export default QuestBadge;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Lock01Icon } from '../../../../icons/Lock01Icon.js';
|
|
3
|
+
const StageItemLocked = ({ index }) => {
|
|
4
|
+
return (_jsxs("div", { className: "mb-4 flex items-center justify-between rounded-xl bg-[#0D1217] p-3", children: [_jsxs("p", { className: "font-medium", children: ["Stage ", index + 1] }), _jsx("div", { className: "flex items-center justify-center rounded-full border border-[#333741] bg-[#0D1217] p-1 text-[#161B26]", children: _jsx(Lock01Icon, { className: "size-3 stroke-2 font-medium text-[#667085]" }) })] }));
|
|
5
|
+
};
|
|
6
|
+
export default StageItemLocked;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
index: number;
|
|
3
|
+
stageLevel: number;
|
|
4
|
+
questCompleted: boolean;
|
|
5
|
+
progressPercentage: number;
|
|
6
|
+
writableBonus: number;
|
|
7
|
+
bonusAmount: number;
|
|
8
|
+
};
|
|
9
|
+
declare const StageItemUnlocked: ({ index, stageLevel, questCompleted, progressPercentage, writableBonus, bonusAmount, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default StageItemUnlocked;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { Progress } from '../../../../ui/Progress/index.js';
|
|
5
|
+
const StageItemUnlocked = ({ index, stageLevel, questCompleted, progressPercentage, writableBonus, bonusAmount, }) => {
|
|
6
|
+
const numberFormatter = useMemo(() => new Intl.NumberFormat('en-US', {
|
|
7
|
+
minimumFractionDigits: 0,
|
|
8
|
+
maximumFractionDigits: 0,
|
|
9
|
+
currency: 'PHP',
|
|
10
|
+
style: 'currency',
|
|
11
|
+
}), []);
|
|
12
|
+
const progressStyle = {
|
|
13
|
+
'--width': `${stageLevel > index + 1 ? 100 : progressPercentage.toFixed(0)}%`,
|
|
14
|
+
};
|
|
15
|
+
let badge = (_jsx("div", { className: "w-fit rounded-full border border-[#065986] bg-[#062C41] px-2 py-0.5", children: _jsx("p", { className: "font-medium text-[#7CD4FD] text-sm", children: "Ongoing" }) }));
|
|
16
|
+
if (questCompleted) {
|
|
17
|
+
badge = (_jsx("div", { className: "w-fit rounded-full border border-[#085D3A] bg-[#053321] px-2 py-0.5", children: _jsx("p", { className: "font-medium text-[#75E0A7] text-sm", children: "Completed" }) }));
|
|
18
|
+
}
|
|
19
|
+
else if (stageLevel > index + 1) {
|
|
20
|
+
badge = (_jsx("div", { className: "w-fit rounded-full border border-[#085D3A] bg-[#053321] px-2 py-0.5", children: _jsx("p", { className: "font-medium text-[#75E0A7] text-sm", children: "Completed" }) }));
|
|
21
|
+
}
|
|
22
|
+
return (_jsxs("div", { className: "mb-4 flex flex-col justify-between rounded-xl border-[#EAECF0] bg-[#0D1217] p-3 text-[#CECFD2]", children: [_jsxs("div", { className: "flex items-center justify-between space-x-2", children: [_jsxs("p", { className: "font-medium", children: ["Stage ", index + 1] }), badge] }), _jsxs("div", { className: "flex justify-between pt-[11px] pb-2", children: [_jsxs("p", { className: "text-sm", children: ["Progress:", ' ', stageLevel > index + 1 ? 100 : progressPercentage.toFixed(0), "%"] }), _jsx("div", { className: "flex items-center justify-center rounded-md border border-[#333741] bg-[#0C111D] p-1 font-medium text-[#CECFD2] text-xs dark:border-[#333741] dark:bg-[#0C111D]", children: stageLevel > index + 1
|
|
23
|
+
? `+ ${numberFormatter.format(bonusAmount)} Bonus`
|
|
24
|
+
: `+ ${numberFormatter.format(writableBonus)} Bonus` })] }), _jsx(Progress.Root, { max: 100, value: stageLevel > index + 1 ? 100 : parseInt(progressPercentage.toFixed(0)), className: "relative h-2 rounded-full bg-[#0C0E12] md:w-full", children: _jsx("div", { className: twMerge('h-full w-[var(--width,0)] flex-1 rounded-full bg-[#FFE5AF] transition-all duration-1000 ease-in-out'), style: progressStyle }) })] }));
|
|
25
|
+
};
|
|
26
|
+
export default StageItemUnlocked;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Countdown from './Countdown';
|
|
2
|
+
import DialogCheckin from './DialogCheckin';
|
|
3
|
+
import DialogJourney from './DialogJourney';
|
|
4
|
+
import DialogOnboarding from './DialogOnboarding';
|
|
5
|
+
import DialogWagering from './DialogWagering';
|
|
6
|
+
import ObjectiveItem from './ObjectiveItem';
|
|
7
|
+
import QuestBadge from './QuestBadge';
|
|
8
|
+
import StageItemLocked from './StageItemLocked';
|
|
9
|
+
import StageItemUnlocked from './StageItemUnlocked';
|
|
10
|
+
export { Countdown, DialogCheckin, DialogJourney, DialogOnboarding, DialogWagering, ObjectiveItem, QuestBadge, StageItemLocked, StageItemUnlocked, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Countdown from './Countdown.js';
|
|
2
|
+
import DialogCheckin from './DialogCheckin.js';
|
|
3
|
+
import DialogJourney from './DialogJourney.js';
|
|
4
|
+
import DialogOnboarding from './DialogOnboarding.js';
|
|
5
|
+
import DialogWagering from './DialogWagering.js';
|
|
6
|
+
import ObjectiveItem from './ObjectiveItem.js';
|
|
7
|
+
import QuestBadge from './QuestBadge.js';
|
|
8
|
+
import StageItemLocked from './StageItemLocked.js';
|
|
9
|
+
import StageItemUnlocked from './StageItemUnlocked.js';
|
|
10
|
+
export { Countdown, DialogCheckin, DialogJourney, DialogOnboarding, DialogWagering, ObjectiveItem, QuestBadge, StageItemLocked, StageItemUnlocked, };
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
2
|
export interface ClassNameEntries {
|
|
3
3
|
root?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
timeBadgeRoot?: string;
|
|
6
|
+
timeBadgeIcon?: string;
|
|
7
|
+
timeBadgeLabel?: string;
|
|
4
8
|
completedBadgeRoot?: string;
|
|
5
9
|
completedBadgeLabel?: string;
|
|
6
10
|
failedBadgeRoot?: string;
|
|
7
11
|
failedBadgeLabel?: string;
|
|
12
|
+
finalBonusBadgeRoot?: string;
|
|
13
|
+
finalBonusBadgeLabel?: string;
|
|
8
14
|
progressRoot?: string;
|
|
9
15
|
progressTrack?: string;
|
|
10
16
|
progressRange?: string;
|
|
@@ -86,13 +86,16 @@ export function JourneyQuest(props) {
|
|
|
86
86
|
}, [disclosure]);
|
|
87
87
|
const localeInfo = useLocaleInfo();
|
|
88
88
|
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('flex h-full w-full flex-col space-y-6 rounded-2xl border border-border-primary bg-bg-tertiary px-4 pt-5 pb-6', classNames?.root), children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-center justify-between", children: [_jsx(RemainingTime, { endOfDay: true, className: {
|
|
89
|
+
timeBadgeRoot: classNames?.timeBadgeRoot,
|
|
90
|
+
timeBadgeIcon: classNames?.timeBadgeIcon,
|
|
91
|
+
timeBadgeLabel: classNames?.timeBadgeLabel,
|
|
89
92
|
completedBadgeRoot: classNames?.completedBadgeRoot,
|
|
90
93
|
completedBadgeLabel: classNames?.completedBadgeLabel,
|
|
91
94
|
failedBadgeRoot: classNames?.failedBadgeRoot,
|
|
92
95
|
failedBadgeLabel: classNames?.failedBadgeLabel,
|
|
93
|
-
} }), quest.status === 'COMPLETED' && (_jsx(Badge.Root, { colorScheme: "success", size: "lg", round: false, children: _jsxs(Badge.Label, { children: ["Final Bonus:", ' ', formatNumber(quest.bonus, {
|
|
96
|
+
} }), quest.status === 'COMPLETED' && (_jsx(Badge.Root, { colorScheme: "success", size: "lg", round: false, className: classNames?.finalBonusBadgeRoot, children: _jsxs(Badge.Label, { className: classNames?.finalBonusBadgeLabel, children: ["Final Bonus:", ' ', formatNumber(quest.bonus, {
|
|
94
97
|
currency: localeInfo.currency.code,
|
|
95
|
-
})] }) }))] }), _jsx("p", { className:
|
|
98
|
+
})] }) }))] }), _jsx("p", { className: twMerge('font-semibold text-xl', classNames?.title), children: quest?.name || 'Journey Quest' }), _jsxs("div", { className: "flex w-full items-center space-x-2", children: [_jsx(Progress.Root, { max: 100, className: twMerge('h-2 rounded-full bg-bg-primary', classNames?.progressRoot), value: progressValue, children: _jsx(Progress.Track, { className: classNames?.progressTrack, children: _jsx(Progress.Range, { className: classNames?.progressRange }) }) }), _jsxs("p", { className: twMerge('text-text-quarterary-brand text-xs', classNames?.progressLabel), children: [currentMilestone, "/", totalMilestones] })] }), _jsx("div", { className: "flex w-full flex-col space-y-3", children: milestones.map((milestone, index) => (_jsx(QuestMilestone, { label: milestone.label, bonus: milestone.bonus, isCompleted: milestone.isCompleted, checkboxControlStyle: props.checkboxControlStyle, className: {
|
|
96
99
|
name: classNames?.checkboxName,
|
|
97
100
|
bonus: classNames?.checkboxBonus,
|
|
98
101
|
} }, index))) })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: handleViewDetails, "aria-label": "View Details", disabled: false, className: "disabled:bg-bg-primary disabled:text-text-disabled", children: "View Details" }) })] }), _jsx(Rules, { open: disclosure.open, onOpenChange: disclosure.setOpen, quest: quest, milestones: milestones, className: {
|
|
@@ -22,6 +22,7 @@ export interface GameProviderSettings {
|
|
|
22
22
|
gameProviderImages?: Partial<Record<GameProvider, ImageProps['src']>>;
|
|
23
23
|
heading?: string | ReactNode;
|
|
24
24
|
}
|
|
25
|
+
type Variant = 'crazywin' | 'default';
|
|
25
26
|
export interface QuestsProps {
|
|
26
27
|
/** @default "Quests" */
|
|
27
28
|
heading?: string | ReactNode;
|
|
@@ -35,5 +36,7 @@ export interface QuestsProps {
|
|
|
35
36
|
gameProviderSettings?: GameProviderSettings;
|
|
36
37
|
/** Custom URL template for game provider links. Use :slug and :id as placeholders */
|
|
37
38
|
gameProviderViewPageUrl?: string;
|
|
39
|
+
variant?: Variant;
|
|
38
40
|
}
|
|
39
41
|
export declare function Quests__client(props: QuestsProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { isString } from 'lodash-es';
|
|
4
4
|
import Image, {} from 'next/image';
|
|
5
|
-
import { Suspense, useState, } from 'react';
|
|
5
|
+
import { Suspense, useEffect, useState, } from 'react';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
@@ -11,6 +11,10 @@ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
|
11
11
|
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
12
12
|
import closeChest from '../../images/close-chest.png';
|
|
13
13
|
import { SegmentGroup } from '../../ui/SegmentGroup/index.js';
|
|
14
|
+
import CWDailyCheckInQuest from './Crazywin/CWDailyCheckInQuest.js';
|
|
15
|
+
import CWJourneyQuest from './Crazywin/CWJourneyQuest.js';
|
|
16
|
+
import CWOnboardingQuest from './Crazywin/CWOnboardingQuest.js';
|
|
17
|
+
import CWWageringQuestNext from './Crazywin/CWWageringQuestNext.js';
|
|
14
18
|
import { DailyCheckInQuest, } from './DailyCheckInQuest.js';
|
|
15
19
|
import { JourneyQuest, } from './JourneyQuest.js';
|
|
16
20
|
import { NoQuests } from './NoQuests.js';
|
|
@@ -26,11 +30,20 @@ export function Quests__client(props) {
|
|
|
26
30
|
const isNextWageringBrandSite = typeof window !== 'undefined' &&
|
|
27
31
|
NEXT_WAGERING_SITE_MATCHES.some((m) => window.location.href.includes(m));
|
|
28
32
|
const useNextWagering = featureFlag.enabled || isNextWageringBrandSite;
|
|
33
|
+
const [variant, setVariant] = useState('default');
|
|
29
34
|
const QUEST_COMPONENT_MAP = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
crazywin: {
|
|
36
|
+
DAILY_CHECKIN: CWDailyCheckInQuest,
|
|
37
|
+
ONBOARDING: CWOnboardingQuest,
|
|
38
|
+
WAGERING: CWWageringQuestNext,
|
|
39
|
+
JOURNEY: CWJourneyQuest,
|
|
40
|
+
},
|
|
41
|
+
default: {
|
|
42
|
+
DAILY_CHECKIN: DailyCheckInQuest,
|
|
43
|
+
ONBOARDING: OnboardingQuest,
|
|
44
|
+
WAGERING: useNextWagering ? WageringQuestNext : WageringQuest,
|
|
45
|
+
JOURNEY: JourneyQuest,
|
|
46
|
+
},
|
|
34
47
|
};
|
|
35
48
|
const { className, style, heading } = props;
|
|
36
49
|
const classNames = isString(className) ? { root: className } : className;
|
|
@@ -52,6 +65,16 @@ export function Quests__client(props) {
|
|
|
52
65
|
}
|
|
53
66
|
return false;
|
|
54
67
|
});
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
setVariant(() => {
|
|
70
|
+
switch (props.variant) {
|
|
71
|
+
case 'crazywin':
|
|
72
|
+
return 'crazywin';
|
|
73
|
+
default:
|
|
74
|
+
return 'default';
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}, [props.variant]);
|
|
55
78
|
if (questsQuery.isLoading) {
|
|
56
79
|
return (_jsxs("div", { style: style, className: classNames?.root, children: [_jsx("h2", { className: "mb-3 font-semibold text-lg", children: heading ?? 'Quests' }), _jsx(SpinnerIcon, { className: "mx-auto size-5 h-[50vh]" })] }));
|
|
57
80
|
}
|
|
@@ -61,11 +84,11 @@ export function Quests__client(props) {
|
|
|
61
84
|
return (_jsxs("div", { style: style, className: twMerge(classNames?.root), children: [_jsx("h2", { className: "font-semibold text-lg", children: heading ?? 'Quests' }), _jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
62
85
|
setTab(TabDefinition.catch('AVAILABLE').parse(details.value));
|
|
63
86
|
}, className: "mt-3 w-full overflow-x-auto lg:mt-4.5 lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "AVAILABLE", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Available" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "COMPLETED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Completed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "FAILED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Failed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(SegmentGroup.Indicator, {})] }), _jsx("div", { className: "mt-3xl grid gap-3xl lg:mt-lg lg:grid-cols-3", children: quests.length > 0 ? (quests.map((quest) => {
|
|
64
|
-
const Quest = QUEST_COMPONENT_MAP[quest.type];
|
|
87
|
+
const Quest = QUEST_COMPONENT_MAP[variant][quest.type];
|
|
65
88
|
return (_jsx(QuestContext, { value: {
|
|
66
89
|
...quest,
|
|
67
90
|
...props.gameProviderSettings,
|
|
68
|
-
verificationStatus: accountQuery.data?.verificationStatus ?? 'UNVERIFIED'
|
|
91
|
+
verificationStatus: accountQuery.data?.verificationStatus ?? 'UNVERIFIED',
|
|
69
92
|
}, children: _jsx(Suspense, { children: _jsx(Quest, { className: quest.type === 'WAGERING'
|
|
70
93
|
? featureFlag.enabled
|
|
71
94
|
? classNames?.wageringQuestNext
|
|
@@ -5,6 +5,9 @@ interface RemainingTimeProps {
|
|
|
5
5
|
completedBadgeLabel?: string;
|
|
6
6
|
failedBadgeRoot?: string;
|
|
7
7
|
failedBadgeLabel?: string;
|
|
8
|
+
timeBadgeRoot?: string;
|
|
9
|
+
timeBadgeIcon?: string;
|
|
10
|
+
timeBadgeLabel?: string;
|
|
8
11
|
};
|
|
9
12
|
}
|
|
10
13
|
export declare function RemainingTime({ endOfDay: useEndOfDay, className, }: RemainingTimeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,5 +16,5 @@ export function RemainingTime({ endOfDay: useEndOfDay = false, className, }) {
|
|
|
16
16
|
if (quest.status === 'FAILED' || remainingTime.expired) {
|
|
17
17
|
return (_jsx(Badge.Root, { size: "lg", colorScheme: "danger", round: false, className: className?.failedBadgeRoot, children: _jsx(Badge.Label, { className: className?.failedBadgeLabel, children: "Failed" }) }));
|
|
18
18
|
}
|
|
19
|
-
return (_jsxs(Badge.Root, { size: "lg", colorScheme: "brand", round: false, children: [_jsx(Badge.Icon, { children: _jsx(ClockStopWatchIcon, {}) }), _jsx(Badge.Label, { children: remainingTime.toString() })] }));
|
|
19
|
+
return (_jsxs(Badge.Root, { size: "lg", colorScheme: "brand", round: false, className: className?.timeBadgeRoot, children: [_jsx(Badge.Icon, { className: className?.timeBadgeIcon, children: _jsx(ClockStopWatchIcon, {}) }), _jsx(Badge.Label, { className: className?.timeBadgeLabel, children: remainingTime.toString() })] }));
|
|
20
20
|
}
|