@opexa/portal-components 0.0.277 → 0.0.279
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 +16 -6
- package/dist/client/hooks/useGlobalStore.js +99 -0
- package/dist/client/hooks/useJackpotsQuery.js +1 -1
- package/dist/components/BetRecords/BetRecords.client.js +76 -38
- package/dist/components/Bonus/Bonus.client.js +1 -1
- package/dist/components/Bonuses/ClaimSpotBonus.lazy.js +6 -2
- package/dist/components/Cashback/Cashback.client.js +1 -1
- package/dist/components/CustomPromo/CustomPromo.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.d.ts +3 -14
- package/dist/components/Disclaimer/Disclaimer.js +14 -5
- package/dist/components/Disclaimer/DisclaimerV1.d.ts +1 -1
- package/dist/components/Disclaimer/DisclaimerV1.js +1 -1
- package/dist/components/Disclaimer/DisclaimerV2.d.ts +3 -7
- package/dist/components/Disclaimer/DisclaimerV2.js +23 -51
- package/dist/components/Disclaimer/useDisclaimer.js +1 -1
- package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
- package/dist/components/GamesSearch/GamesSearch.js +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +12 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +12 -1
- package/dist/components/KYC/utils.js +18 -18
- package/dist/components/News/News.js +1 -1
- package/dist/components/PortalProvider/FeatureFlag.js +1 -1
- package/dist/components/Promo/Promo.client.js +1 -1
- package/dist/components/ResponsibleGaming/ResponsibleGaming.d.ts +3 -0
- package/dist/components/ResponsibleGaming/ResponsibleGaming.js +14 -0
- package/dist/components/ResponsibleGaming/ResponsibleGaming.lazy.d.ts +8 -0
- package/dist/components/ResponsibleGaming/ResponsibleGaming.lazy.js +35 -0
- package/dist/components/ResponsibleGaming/index.d.ts +1 -0
- package/dist/components/ResponsibleGaming/index.js +1 -0
- package/dist/components/Search/Search.lazy.js +1 -1
- package/dist/components/SignIn/MobileNumberSignIn.js +32 -26
- package/dist/components/SignIn/NameAndPasswordSignIn.js +31 -26
- package/dist/components/SignIn/SignIn.lazy.d.ts +4 -7
- package/dist/components/SignIn/SignIn.lazy.js +1 -0
- package/dist/components/SignUp/SignUp.d.ts +3 -3
- package/dist/components/SignUp/SignUp.js +7 -4
- package/dist/components/SignUp/SignUpDefault/SignUpDefault.lazy.d.ts +14 -0
- package/dist/components/SignUp/SignUpDefault/SignUpDefault.lazy.js +18 -0
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultContext.d.ts +6 -0
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultContext.js +2 -0
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultForm.d.ts +1 -0
- package/dist/components/SignUp/{SignUpForm.js → SignUpDefault/SignUpDefaultForm.js} +88 -57
- package/dist/components/SignUp/SignUpDefault/SignUpForm.js +3 -7
- package/dist/components/SignUp/SignUpKYC/SignUpKYC.lazy.d.ts +5 -8
- package/dist/components/SignUp/SignUpKYC/SignUpKYCForm.js +37 -31
- package/dist/components/SignUp/SignUpKYC/utils.js +18 -18
- package/dist/components/TermsAndConditions/TermsAndConditions.d.ts +2 -0
- package/dist/components/TermsAndConditions/TermsAndConditions.js +14 -0
- package/dist/components/TermsAndConditions/TermsAndConditions.lazy.d.ts +9 -0
- package/dist/components/TermsAndConditions/TermsAndConditions.lazy.js +35 -0
- package/dist/components/TermsAndConditions/index.d.ts +1 -0
- package/dist/components/TermsAndConditions/index.js +1 -0
- package/dist/components/TermsOfUse/TermsOfUse.d.ts +3 -0
- package/dist/components/TermsOfUse/TermsOfUse.js +14 -0
- package/dist/components/TermsOfUse/TermsOfUse.lazy.d.ts +9 -0
- package/dist/components/TermsOfUse/TermsOfUse.lazy.js +35 -0
- package/dist/components/TermsOfUse/index.d.ts +1 -0
- package/dist/components/TermsOfUse/index.js +1 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/components/TransactionRecords/TableFilters.js +72 -32
- package/dist/handlers/postTransformIdFrontImage.d.ts +3 -0
- package/dist/handlers/postTransformIdFrontImage.js +82 -0
- package/dist/handlers/postTransformSelfieImage.d.ts +3 -0
- package/dist/handlers/postTransformSelfieImage.js +82 -0
- package/dist/next.config.js +1 -0
- package/dist/services/queries.js +2570 -2570
- package/dist/styles/theme.css +695 -695
- package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Carousel/Carousel.d.ts +99 -99
- package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +88 -88
- package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +306 -306
- package/dist/ui/Menu/menu.recipe.d.ts +17 -17
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/Popover/Popover.d.ts +88 -88
- package/dist/ui/Popover/popover.recipe.d.ts +8 -8
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/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/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/package.json +163 -163
- package/dist/client/hooks/index.d.ts +0 -65
- package/dist/client/hooks/index.js +0 -65
- package/dist/client/services/index.d.ts +0 -4
- package/dist/client/services/index.js +0 -4
- package/dist/client/utils/index.d.ts +0 -3
- package/dist/client/utils/index.js +0 -3
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +0 -2
- package/dist/components/CashbackBonus/CashbackBonus.client.js +0 -9
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +0 -10
- package/dist/components/CashbackBonus/CashbackBonus.js +0 -5
- package/dist/components/CashbackBonus/index.d.ts +0 -1
- package/dist/components/CashbackBonus/index.js +0 -1
- package/dist/components/Empty.d.ts +0 -9
- package/dist/components/Empty.js +0 -7
- 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/Games/GameContext.d.ts +0 -2
- package/dist/components/Games/GameContext.js +0 -2
- package/dist/components/InfiniteScroll.d.ts +0 -10
- package/dist/components/InfiniteScroll.js +0 -25
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
- package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -66
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -17
- package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -18
- package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -109
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css +0 -184
- package/dist/components/JackpotCounter/index.d.ts +0 -1
- package/dist/components/JackpotCounter/index.js +0 -1
- package/dist/components/Jackpots/JackpotDesktop.d.ts +0 -1
- package/dist/components/Jackpots/JackpotDesktop.js +0 -45
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
- package/dist/components/Jackpots/JackpotGameProviders.js +0 -41
- package/dist/components/Jackpots/JackpotItemDesktop.d.ts +0 -9
- package/dist/components/Jackpots/JackpotItemDesktop.js +0 -43
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +0 -9
- package/dist/components/Jackpots/JackpotItemMobile.js +0 -44
- package/dist/components/Jackpots/JackpotMobile.d.ts +0 -1
- package/dist/components/Jackpots/JackpotMobile.js +0 -46
- package/dist/components/Jackpots/JackpotRules.d.ts +0 -5
- package/dist/components/Jackpots/JackpotRules.js +0 -11
- package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
- package/dist/components/Jackpots/Jackpots.client.js +0 -29
- package/dist/components/Jackpots/JackpotsContext.d.ts +0 -4
- package/dist/components/Jackpots/JackpotsContext.js +0 -3
- package/dist/components/Jackpots/useJackpotData.d.ts +0 -14
- package/dist/components/Jackpots/useJackpotData.js +0 -93
- package/dist/components/Jackpots/useJackpotItemData.d.ts +0 -20
- package/dist/components/Jackpots/useJackpotItemData.js +0 -87
- package/dist/components/KYC/AutoOpen.d.ts +0 -1
- package/dist/components/KYC/AutoOpen.js +0 -45
- package/dist/components/KYC/Header.d.ts +0 -1
- package/dist/components/KYC/Header.js +0 -8
- package/dist/components/KYC/Step1.d.ts +0 -1
- package/dist/components/KYC/Step1.js +0 -13
- package/dist/components/KYC/Step2.d.ts +0 -1
- package/dist/components/KYC/Step2.js +0 -13
- package/dist/components/KYC/Step3.d.ts +0 -1
- package/dist/components/KYC/Step3.js +0 -13
- package/dist/components/KYC/Step4.d.ts +0 -1
- package/dist/components/KYC/Step4.js +0 -7
- 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/Messages/Message.d.ts +0 -1
- package/dist/components/Messages/Message.js +0 -34
- package/dist/components/Messages/MessageContext.d.ts +0 -6
- package/dist/components/Messages/MessageContext.js +0 -2
- package/dist/components/Messages/MessageItem.d.ts +0 -4
- package/dist/components/Messages/MessageItem.js +0 -34
- package/dist/components/Messages/MessagePopup.d.ts +0 -1
- package/dist/components/Messages/MessagePopup.js +0 -19
- package/dist/components/Messages/MessageTrigger.d.ts +0 -8
- package/dist/components/Messages/MessageTrigger.js +0 -19
- package/dist/components/Promo/PromoContent.d.ts +0 -2
- package/dist/components/Promo/PromoContent.js +0 -9
- package/dist/components/Promos/PromoCarousel.d.ts +0 -2
- package/dist/components/Promos/PromoCarousel.js +0 -41
- package/dist/components/Promos/PromoGrid.d.ts +0 -2
- package/dist/components/Promos/PromoGrid.js +0 -12
- package/dist/components/Promos/PromoItem.d.ts +0 -7
- package/dist/components/Promos/PromoItem.js +0 -10
- 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/SignUpForm.d.ts +0 -1
- package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +0 -2
- package/dist/components/TournamentCounter/TournamentCounter.client.js +0 -50
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +0 -8
- package/dist/components/TournamentCounter/TournamentCounter.js +0 -21
- package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +0 -8
- package/dist/components/TournamentCounter/TournamentCounterItem.js +0 -106
- package/dist/components/TournamentCounter/index.d.ts +0 -1
- package/dist/components/TournamentCounter/index.js +0 -1
- package/dist/components/Tournaments/TournamentDesktop.d.ts +0 -1
- package/dist/components/Tournaments/TournamentDesktop.js +0 -57
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +0 -5
- package/dist/components/Tournaments/TournamentGameProviders.js +0 -38
- package/dist/components/Tournaments/TournamentItemDesktop.d.ts +0 -7
- package/dist/components/Tournaments/TournamentItemDesktop.js +0 -56
- package/dist/components/Tournaments/TournamentItemMobile.d.ts +0 -7
- package/dist/components/Tournaments/TournamentItemMobile.js +0 -54
- package/dist/components/Tournaments/TournamentMobile.d.ts +0 -1
- package/dist/components/Tournaments/TournamentMobile.js +0 -55
- package/dist/components/Tournaments/TournamentRules.d.ts +0 -5
- package/dist/components/Tournaments/TournamentRules.js +0 -11
- package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
- package/dist/components/Tournaments/Tournaments.client.js +0 -20
- package/dist/components/Tournaments/TournamentsContext.d.ts +0 -4
- package/dist/components/Tournaments/TournamentsContext.js +0 -3
- package/dist/components/Tournaments/useTournamentData.d.ts +0 -10
- package/dist/components/Tournaments/useTournamentData.js +0 -72
- package/dist/components/Tournaments/useTournamentItemData.d.ts +0 -16
- package/dist/components/Tournaments/useTournamentItemData.js +0 -64
- package/dist/components/index.d.ts +0 -33
- package/dist/components/index.js +0 -33
- 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/constants/endpoints.d.ts +0 -10
- package/dist/constants/endpoints.js +0 -41
- package/dist/constants/envVars.d.ts +0 -5
- package/dist/constants/envVars.js +0 -28
- package/dist/constants/gameProviders.d.ts +0 -76
- package/dist/constants/gameProviders.js +0 -361
- package/dist/constants/gameTypes.d.ts +0 -3
- package/dist/constants/gameTypes.js +0 -64
- package/dist/constants/headerKeys.d.ts +0 -2
- package/dist/constants/headerKeys.js +0 -2
- package/dist/constants/secretQuestions.d.ts +0 -3
- package/dist/constants/secretQuestions.js +0 -24
- package/dist/constants/storageKeys.d.ts +0 -2
- package/dist/constants/storageKeys.js +0 -2
- 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/icons/index.d.ts +0 -65
- package/dist/icons/index.js +0 -65
- package/dist/images/hacksaw-gaming.png +0 -0
- package/dist/server/services/index.d.ts +0 -4
- package/dist/server/services/index.js +0 -4
- package/dist/server/utils/index.d.ts +0 -29
- package/dist/server/utils/index.js +0 -29
- package/dist/ui/Presence.d.ts +0 -2
- package/dist/ui/Presence.js +0 -7
- package/dist/ui/Prose.d.ts +0 -2
- package/dist/ui/Prose.js +0 -5
- package/dist/ui/index.d.ts +0 -26
- package/dist/ui/index.js +0 -26
- package/dist/utils/createErrorFromCode.d.ts +0 -2
- package/dist/utils/createErrorFromCode.js +0 -11
- package/dist/utils/dataUrlToBlob.d.ts +0 -1
- package/dist/utils/dataUrlToBlob.js +0 -11
- package/dist/utils/index.d.ts +0 -17
- package/dist/utils/index.js +0 -17
- package/dist/utils/isMobile.d.ts +0 -5
- package/dist/utils/isMobile.js +0 -9
- package/dist/utils/resizeImageSize.d.ts +0 -1
- package/dist/utils/resizeImageSize.js +0 -6
|
@@ -26,16 +26,12 @@ export interface GameLaunchStore {
|
|
|
26
26
|
setDetails: (details: GameLaunchStore__Details) => void;
|
|
27
27
|
'~touched': boolean;
|
|
28
28
|
}
|
|
29
|
-
export interface SearchStore extends PopupStore {
|
|
30
|
-
}
|
|
31
29
|
export type MessagesStore__Tab = 'ALL' | 'UNREAD';
|
|
32
30
|
export interface MessagesStore extends PopupStore {
|
|
33
31
|
tab: MessagesStore__Tab;
|
|
34
32
|
setTab: (tab: MessagesStore__Tab) => void;
|
|
35
33
|
}
|
|
36
34
|
export interface MessageStore extends PopupStore {
|
|
37
|
-
open: boolean;
|
|
38
|
-
setOpen: (open: boolean) => void;
|
|
39
35
|
data: Message | null;
|
|
40
36
|
setData: (data: Message | null) => void;
|
|
41
37
|
}
|
|
@@ -46,14 +42,25 @@ export interface DepositWithdrawalStore extends PopupStore {
|
|
|
46
42
|
promo: string | null;
|
|
47
43
|
setPromo: (promo: string | null) => void;
|
|
48
44
|
}
|
|
49
|
-
|
|
45
|
+
type TermsAndConditionsAction = 'SIGN_IN' | 'SIGN_UP' | 'DISCLAIMER';
|
|
46
|
+
export interface TermsAndConditionsStore extends PopupStore {
|
|
47
|
+
next: TermsAndConditionsAction | null;
|
|
48
|
+
setNext: (next: TermsAndConditionsAction | null) => void;
|
|
49
|
+
accepted: boolean;
|
|
50
|
+
setAccepted: (accepted: boolean) => void;
|
|
51
|
+
}
|
|
52
|
+
export interface TermsOfUseStore extends TermsAndConditionsStore {
|
|
53
|
+
}
|
|
54
|
+
export interface ResponsibleGamingStore extends TermsAndConditionsStore {
|
|
55
|
+
}
|
|
56
|
+
export interface GlobalStore {
|
|
50
57
|
signUp: PopupStore;
|
|
51
58
|
signIn: PopupStore;
|
|
52
59
|
forgotPassword: PopupStore;
|
|
53
60
|
disclaimer: PopupStore;
|
|
54
61
|
depositWithdrawal: DepositWithdrawalStore;
|
|
55
62
|
gameLaunch: GameLaunchStore;
|
|
56
|
-
search:
|
|
63
|
+
search: PopupStore;
|
|
57
64
|
account: PopupStore;
|
|
58
65
|
account__mobile: PopupStore;
|
|
59
66
|
messages: MessagesStore;
|
|
@@ -63,6 +70,9 @@ interface GlobalStore {
|
|
|
63
70
|
kyc: PopupStore;
|
|
64
71
|
kycReminder: PopupStore;
|
|
65
72
|
spotBonus: PopupStore;
|
|
73
|
+
termsAndConditions: TermsAndConditionsStore;
|
|
74
|
+
termsOfUse: TermsOfUseStore;
|
|
75
|
+
responsibleGaming: ResponsibleGamingStore;
|
|
66
76
|
}
|
|
67
77
|
export declare const useGlobalStore: import("zustand").UseBoundStore<import("zustand").StoreApi<GlobalStore>>;
|
|
68
78
|
export {};
|
|
@@ -272,4 +272,103 @@ export const useGlobalStore = create((set) => ({
|
|
|
272
272
|
},
|
|
273
273
|
'~touched': false,
|
|
274
274
|
},
|
|
275
|
+
termsAndConditions: {
|
|
276
|
+
open: false,
|
|
277
|
+
setOpen(open) {
|
|
278
|
+
set((prev) => ({
|
|
279
|
+
termsAndConditions: {
|
|
280
|
+
...prev.termsAndConditions,
|
|
281
|
+
open,
|
|
282
|
+
'~touched': true,
|
|
283
|
+
},
|
|
284
|
+
}));
|
|
285
|
+
},
|
|
286
|
+
next: null,
|
|
287
|
+
setNext(next) {
|
|
288
|
+
set((prev) => ({
|
|
289
|
+
termsAndConditions: {
|
|
290
|
+
...prev.termsAndConditions,
|
|
291
|
+
next,
|
|
292
|
+
'~touched': true,
|
|
293
|
+
},
|
|
294
|
+
}));
|
|
295
|
+
},
|
|
296
|
+
accepted: false,
|
|
297
|
+
setAccepted(accepted) {
|
|
298
|
+
set((prev) => ({
|
|
299
|
+
termsAndConditions: {
|
|
300
|
+
...prev.termsAndConditions,
|
|
301
|
+
accepted,
|
|
302
|
+
'~touched': true,
|
|
303
|
+
},
|
|
304
|
+
}));
|
|
305
|
+
},
|
|
306
|
+
'~touched': false,
|
|
307
|
+
},
|
|
308
|
+
termsOfUse: {
|
|
309
|
+
open: false,
|
|
310
|
+
setOpen(open) {
|
|
311
|
+
set((prev) => ({
|
|
312
|
+
termsOfUse: {
|
|
313
|
+
...prev.termsOfUse,
|
|
314
|
+
open,
|
|
315
|
+
'~touched': true,
|
|
316
|
+
},
|
|
317
|
+
}));
|
|
318
|
+
},
|
|
319
|
+
next: null,
|
|
320
|
+
setNext(next) {
|
|
321
|
+
set((prev) => ({
|
|
322
|
+
termsOfUse: {
|
|
323
|
+
...prev.termsOfUse,
|
|
324
|
+
next,
|
|
325
|
+
'~touched': true,
|
|
326
|
+
},
|
|
327
|
+
}));
|
|
328
|
+
},
|
|
329
|
+
accepted: false,
|
|
330
|
+
setAccepted(accepted) {
|
|
331
|
+
set((prev) => ({
|
|
332
|
+
termsOfUse: {
|
|
333
|
+
...prev.termsOfUse,
|
|
334
|
+
accepted,
|
|
335
|
+
'~touched': true,
|
|
336
|
+
},
|
|
337
|
+
}));
|
|
338
|
+
},
|
|
339
|
+
'~touched': false,
|
|
340
|
+
},
|
|
341
|
+
responsibleGaming: {
|
|
342
|
+
open: false,
|
|
343
|
+
setOpen(open) {
|
|
344
|
+
set((prev) => ({
|
|
345
|
+
responsibleGaming: {
|
|
346
|
+
...prev.responsibleGaming,
|
|
347
|
+
open,
|
|
348
|
+
'~touched': true,
|
|
349
|
+
},
|
|
350
|
+
}));
|
|
351
|
+
},
|
|
352
|
+
next: null,
|
|
353
|
+
setNext(next) {
|
|
354
|
+
set((prev) => ({
|
|
355
|
+
responsibleGaming: {
|
|
356
|
+
...prev.responsibleGaming,
|
|
357
|
+
next,
|
|
358
|
+
'~touched': true,
|
|
359
|
+
},
|
|
360
|
+
}));
|
|
361
|
+
},
|
|
362
|
+
accepted: false,
|
|
363
|
+
setAccepted(accepted) {
|
|
364
|
+
set((prev) => ({
|
|
365
|
+
responsibleGaming: {
|
|
366
|
+
...prev.responsibleGaming,
|
|
367
|
+
accepted,
|
|
368
|
+
'~touched': true,
|
|
369
|
+
},
|
|
370
|
+
}));
|
|
371
|
+
},
|
|
372
|
+
'~touched': false,
|
|
373
|
+
},
|
|
275
374
|
}));
|
|
@@ -6,7 +6,7 @@ export const useJackpotsQuery = (input, config) => {
|
|
|
6
6
|
refetchOnMount: false,
|
|
7
7
|
refetchOnReconnect: false,
|
|
8
8
|
refetchOnWindowFocus: false,
|
|
9
|
-
refetchInterval:
|
|
9
|
+
refetchInterval: 3000, // 3 seconds
|
|
10
10
|
...config,
|
|
11
11
|
queryKey: getJackpotsQueryKey(input),
|
|
12
12
|
queryFn: ({ pageParam, signal }) => {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { createListCollection } from '@ark-ui/react/collection';
|
|
4
|
-
import { parseDate } from '@ark-ui/react/date-picker';
|
|
4
|
+
import { parseDate, useDatePickerContext } from '@ark-ui/react/date-picker';
|
|
5
5
|
import { tz, TZDateMini } from '@date-fns/tz';
|
|
6
6
|
import { endOfDay, format, startOfDay } from 'date-fns';
|
|
7
7
|
import { useReducer, useState } from 'react';
|
|
8
8
|
import { twMerge } from 'tailwind-merge';
|
|
9
|
+
import { useMediaQuery } from 'usehooks-ts';
|
|
9
10
|
import { z } from 'zod';
|
|
10
11
|
import { useBetRecordsQuery } from '../../client/hooks/useBetRecordsQuery.js';
|
|
12
|
+
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
13
|
+
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
11
14
|
import { useInfiniteQueryHelper } from '../../client/hooks/useInfiniteQueryHelper.js';
|
|
12
15
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
13
16
|
import { GAME_PROVIDER_DATA, GAME_TYPE_DATA, GAME_TYPES, } from '../../constants/index.js';
|
|
@@ -84,50 +87,46 @@ export function BetRecords__client(props) {
|
|
|
84
87
|
}),
|
|
85
88
|
},
|
|
86
89
|
});
|
|
90
|
+
const disclosure = useDisclosure({
|
|
91
|
+
onOpenChange(open) {
|
|
92
|
+
if (!open && !state.timestamp)
|
|
93
|
+
setTab('all');
|
|
94
|
+
},
|
|
95
|
+
});
|
|
87
96
|
return (_jsxs("div", { className: props.className, children: [_jsx("h2", { className: "text-sm font-semibold leading-tight lg:text-lg", children: "Bet Records" }), _jsx("p", { className: "text-text-tertiary-600 mt-xs text-sm leading-tight", children: "Review your betting history" }), _jsx("div", { className: "mt-lg lg:mt-2xl", children: _jsxs(SegmentGroup.Root, { value: state.type ?? 'all', onValueChange: (details) => {
|
|
88
97
|
firstPage();
|
|
89
98
|
setState({
|
|
90
99
|
type: z.enum(GAME_TYPES).safeParse(details.value).data ?? null,
|
|
91
100
|
provider: null,
|
|
92
101
|
});
|
|
93
|
-
}, className: "w-full overflow-x-auto lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "all", children: [_jsx(SegmentGroup.ItemText, { children: "All" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), gameTypes.map((type) => (_jsxs(SegmentGroup.Item, { value: type.id, children: [_jsx(SegmentGroup.ItemText, { children: type.name }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }, type.id))), _jsx(SegmentGroup.Indicator, {})] }) }), _jsx("div", { className: "border-border-secondary mt-2xl hidden border-t lg:block" }), _jsx("h3", { className: "text-text-secondary-700 mt-3xl text-sm font-semibold", children: "Table" }), _jsxs("div", { className: "mt-xl flex flex-col gap-lg lg:flex-row lg:items-center", children: [_jsxs(
|
|
94
|
-
.
|
|
95
|
-
|
|
102
|
+
}, className: "w-full overflow-x-auto lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "all", children: [_jsx(SegmentGroup.ItemText, { children: "All" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), gameTypes.map((type) => (_jsxs(SegmentGroup.Item, { value: type.id, children: [_jsx(SegmentGroup.ItemText, { children: type.name }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }, type.id))), _jsx(SegmentGroup.Indicator, {})] }) }), _jsx("div", { className: "border-border-secondary mt-2xl hidden border-t lg:block" }), _jsx("h3", { className: "text-text-secondary-700 mt-3xl text-sm font-semibold", children: "Table" }), _jsxs("div", { className: "mt-xl flex flex-col gap-lg lg:flex-row lg:items-center", children: [_jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
103
|
+
const value = TabDefinition.parse(details.value);
|
|
104
|
+
if (value === 'today') {
|
|
105
|
+
const now = new Date();
|
|
106
|
+
setState({
|
|
107
|
+
timestamp: {
|
|
108
|
+
start: startOfDay(now),
|
|
109
|
+
end: endOfDay(now),
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
setState({
|
|
115
|
+
timestamp: null,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
96
118
|
firstPage();
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
setTab('all');
|
|
109
|
-
}, selectionMode: "range", closeOnSelect: false, positioning: {
|
|
110
|
-
gutter: 20,
|
|
111
|
-
placement: 'bottom',
|
|
112
|
-
}, children: [_jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
113
|
-
const value = TabDefinition.parse(details.value);
|
|
114
|
-
if (value === 'today') {
|
|
115
|
-
const now = new Date();
|
|
116
|
-
setState({
|
|
117
|
-
timestamp: {
|
|
118
|
-
start: startOfDay(now),
|
|
119
|
-
end: endOfDay(now),
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
setState({
|
|
125
|
-
timestamp: null,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
firstPage();
|
|
129
|
-
setTab(value);
|
|
130
|
-
}, className: "w-full lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "all", className: "w-full lg:w-auto", children: [_jsx(SegmentGroup.ItemText, { children: "All" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "today", className: "w-full lg:w-auto", children: [_jsx(SegmentGroup.ItemText, { children: "Today" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(DatePicker.Context, { children: (api) => (_jsx(SegmentGroup.Item, { value: "custom", onClick: () => api.setOpen(true), className: "w-full lg:w-auto", children: _jsxs(DatePicker.Control, { children: [_jsx(SegmentGroup.ItemText, { children: "Custom" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }) })) }), _jsx(SegmentGroup.Indicator, {})] }), _jsx(Portal, { children: _jsx(DatePicker.Positioner, { children: _jsx(DatePicker.Content, { children: _jsx(DatePicker.View, { view: "day", children: _jsx(DatePicker.Context, { children: (api) => (_jsxs(_Fragment, { children: [_jsxs(DatePicker.ViewControl, { children: [_jsx(DatePicker.PrevTrigger, { children: _jsx(ChevronLeftIcon, {}) }), _jsx(DatePicker.ViewTrigger, { children: _jsx(DatePicker.RangeText, {}) }), _jsx(DatePicker.NextTrigger, { children: _jsx(ChevronRightIcon, {}) })] }), _jsxs(DatePicker.Table, { children: [_jsx(DatePicker.TableHead, { children: _jsx(DatePicker.TableRow, { children: api.weekDays.map((weekDay, id) => (_jsx(DatePicker.TableHeader, { children: weekDay.short.substring(0, 2) }, id))) }) }), _jsx(DatePicker.TableBody, { children: api.weeks.map((week, id) => (_jsx(DatePicker.TableRow, { children: week.map((day, id) => (_jsx(DatePicker.TableCell, { value: day, children: _jsx(DatePicker.TableCellTrigger, { children: day.day }) }, id))) }, id))) })] })] })) }) }) }) }) })] }), _jsx("div", { className: "hidden grow lg:block" }), _jsxs(Select.Root, { collection: providerCollection, value: state.provider ? [state.provider] : [], onValueChange: (details) => {
|
|
119
|
+
setTab(value);
|
|
120
|
+
}, ids: {
|
|
121
|
+
item(value) {
|
|
122
|
+
return `segment-group:item:${value}`;
|
|
123
|
+
},
|
|
124
|
+
}, className: "w-full lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "all", className: "w-full lg:w-auto", children: [_jsx(SegmentGroup.ItemText, { children: "All" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "today", className: "w-full lg:w-auto", children: [_jsx(SegmentGroup.ItemText, { children: "Today" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "custom", onClick: () => disclosure.setOpen(true), className: "w-full lg:w-auto", children: [_jsx(SegmentGroup.ItemText, { children: "Custom" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(SegmentGroup.Indicator, {})] }), _jsx(RangeDatePicker, { value: {
|
|
125
|
+
start: state.timestamp?.start,
|
|
126
|
+
end: state.timestamp?.end,
|
|
127
|
+
}, onValueChange: (timestamp) => {
|
|
128
|
+
setState({ timestamp });
|
|
129
|
+
}, open: disclosure.open, onOpenChange: disclosure.setOpen }), _jsx("div", { className: "hidden grow lg:block" }), _jsxs(Select.Root, { collection: providerCollection, value: state.provider ? [state.provider] : [], onValueChange: (details) => {
|
|
131
130
|
const value = z
|
|
132
131
|
.enum((props.gameProviders ?? []))
|
|
133
132
|
.safeParse(details.value.at(0)).data;
|
|
@@ -200,3 +199,42 @@ const statusCollection = createListCollection({
|
|
|
200
199
|
});
|
|
201
200
|
const TabDefinition = z.enum(['all', 'today', 'custom']);
|
|
202
201
|
const DEVICE_TIMEZONE = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
202
|
+
function RangeDatePicker(props) {
|
|
203
|
+
const [value, setValue] = useControllableState({
|
|
204
|
+
value: props.value,
|
|
205
|
+
defaultValue: props.defaultValue ?? null,
|
|
206
|
+
onChange: (value) => {
|
|
207
|
+
props.onValueChange?.(value);
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
const [open, setOpen] = useControllableState({
|
|
211
|
+
value: props.open,
|
|
212
|
+
defaultValue: props.defaultOpen ?? false,
|
|
213
|
+
onChange: (open) => {
|
|
214
|
+
props.onOpenChange?.(open);
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
const desktop = useMediaQuery('(min-width: 1024px)');
|
|
218
|
+
return (_jsx(DatePicker.Root, { lazyMount: true, unmountOnExit: true, value: [value?.start, value?.end]
|
|
219
|
+
.filter(Boolean)
|
|
220
|
+
.map((d) => parseDate(d)), onValueChange: (details) => {
|
|
221
|
+
setValue({
|
|
222
|
+
start: details.value.at(0)?.toDate(DEVICE_TIMEZONE),
|
|
223
|
+
end: details.value.at(1)?.toDate(DEVICE_TIMEZONE),
|
|
224
|
+
});
|
|
225
|
+
}, open: open, onOpenChange: (details) => {
|
|
226
|
+
setOpen(details.open);
|
|
227
|
+
}, selectionMode: "range", closeOnSelect: false, fixedWeeks: true, numOfMonths: desktop ? 2 : 1, positioning: {
|
|
228
|
+
gutter: 16,
|
|
229
|
+
placement: 'bottom',
|
|
230
|
+
}, ids: {
|
|
231
|
+
control: 'segment-group:item:custom',
|
|
232
|
+
}, children: _jsx(Portal, { children: _jsx(DatePicker.Positioner, { children: _jsx(DatePicker.Content, { className: "p-0", children: _jsxs("div", { className: "flex", children: [_jsx(RangeDatePickerCalendar, { monthOffset: 0 }), desktop && _jsx(RangeDatePickerCalendar, { monthOffset: 1 })] }) }) }) }) }));
|
|
233
|
+
}
|
|
234
|
+
function RangeDatePickerCalendar({ monthOffset }) {
|
|
235
|
+
const datePicker = useDatePickerContext();
|
|
236
|
+
const offset = datePicker.getOffset({
|
|
237
|
+
months: monthOffset,
|
|
238
|
+
});
|
|
239
|
+
return (_jsxs(DatePicker.View, { view: "day", className: "border-border-secondary px-6 py-5 lg:first:border-r", children: [_jsxs(DatePicker.ViewControl, { children: [_jsx(DatePicker.PrevTrigger, { children: _jsx(ChevronLeftIcon, {}) }), _jsx("span", { className: "text-text-secondary-700 text-base font-semibold", children: offset.visibleRangeText.start }), _jsx(DatePicker.NextTrigger, { children: _jsx(ChevronRightIcon, {}) })] }), _jsxs(DatePicker.Table, { children: [_jsx(DatePicker.TableHead, { children: _jsx(DatePicker.TableRow, { children: datePicker.weekDays.map((weekDay, id) => (_jsx(DatePicker.TableHeader, { children: weekDay.short.slice(0, 2) }, id))) }) }), _jsx(DatePicker.TableBody, { children: offset.weeks.map((week, id) => (_jsx(DatePicker.TableRow, { children: week.map((day, id) => (_jsx(DatePicker.TableCell, { value: day, visibleRange: offset.visibleRange, children: _jsx(DatePicker.TableCellTrigger, { children: day.day }) }, id))) }, id))) })] })] }));
|
|
240
|
+
}
|
|
@@ -13,7 +13,7 @@ import piggyBank from '../../images/piggy-bank.png';
|
|
|
13
13
|
import { Badge } from '../../ui/Badge/index.js';
|
|
14
14
|
import { Collapsible } from '../../ui/Collapsible/index.js';
|
|
15
15
|
import { Progress } from '../../ui/Progress/index.js';
|
|
16
|
-
import { Prose } from '../../ui/Prose.js';
|
|
16
|
+
import { Prose } from '../../ui/Prose/index.js';
|
|
17
17
|
import { capitalize } from '../../utils/capitalize.js';
|
|
18
18
|
import { formatNumber } from '../../utils/formatNumber.js';
|
|
19
19
|
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
@@ -13,7 +13,11 @@ import { Dialog } from '../../ui/Dialog/index.js';
|
|
|
13
13
|
import { Field } from '../../ui/Field/index.js';
|
|
14
14
|
import { Portal } from '../../ui/Portal/index.js';
|
|
15
15
|
const definition = z.object({
|
|
16
|
-
code: z
|
|
16
|
+
code: z
|
|
17
|
+
.string()
|
|
18
|
+
.min(1, 'Code is required')
|
|
19
|
+
.max(10, 'Promo code is too long (max 10 characters)')
|
|
20
|
+
.trim(),
|
|
17
21
|
});
|
|
18
22
|
export function ClaimSpotBonus() {
|
|
19
23
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
@@ -39,7 +43,7 @@ export function ClaimSpotBonus() {
|
|
|
39
43
|
code: '',
|
|
40
44
|
},
|
|
41
45
|
});
|
|
42
|
-
return (_jsx(Dialog.Root, { open: globalStore.spotBonus.open, onOpenChange: (details) => globalStore.spotBonus.setOpen(details.open), lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "flex items-center lg:items-start", children: _jsxs(Dialog.Content, { className: "mx-auto w-[25rem] max-w-full rounded-xl p-3xl
|
|
46
|
+
return (_jsx(Dialog.Root, { open: globalStore.spotBonus.open, onOpenChange: (details) => globalStore.spotBonus.setOpen(details.open), lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "flex items-center lg:items-start", children: _jsxs(Dialog.Content, { className: "mx-auto w-[25rem] max-w-full overflow-y-auto rounded-xl p-3xl", children: [_jsx("div", { className: "overflow-hidden rounded-md", style: {
|
|
43
47
|
background: 'radial-gradient(75.21% 75.21% at 50% 50%, rgba(249, 163, 8, 0.3) 0%, rgba(0, 0, 0, 0) 100%), var(--color-bg-primary-alt)',
|
|
44
48
|
}, children: _jsx(Image, { src: ribbonEnvelope, alt: "", className: "mx-auto h-[12.5rem] w-[80%] object-cover", draggable: false, width: 600, height: 341 }) }), _jsxs("form", { className: "mt-3xl", onSubmit: form.handleSubmit((data) => {
|
|
45
49
|
claimSpotBonusMutation.mutate(data.code);
|
|
@@ -11,7 +11,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
|
11
11
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
12
12
|
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
13
13
|
import { Button } from '../../ui/Button/index.js';
|
|
14
|
-
import { Prose } from '../../ui/Prose.js';
|
|
14
|
+
import { Prose } from '../../ui/Prose/index.js';
|
|
15
15
|
export function Cashback__client(props) {
|
|
16
16
|
const availablePromosQuery = useAvailablePromosQuery();
|
|
17
17
|
const cashbackQuery = useCashbackQuery(props.id);
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
6
|
-
import { Prose } from '../../ui/Prose.js';
|
|
6
|
+
import { Prose } from '../../ui/Prose/index.js';
|
|
7
7
|
import { stripTags } from '../../utils/stripTags.js';
|
|
8
8
|
export function CustomPromo(props) {
|
|
9
9
|
return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:title", content: props.promo.name }), _jsx("meta", { name: "og:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:title", content: props.promo.name }), _jsx("meta", { name: "twitter:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "twitter:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "text-button-tertiary-fg flex w-fit items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), _jsx(Image, { src: props.promo.banner, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: props.promo.name }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
type DisclaimerProps = DisclaimerV1Props | {
|
|
5
|
-
version: 'v2';
|
|
6
|
-
logo: ImageProps['src'];
|
|
7
|
-
siteName: string;
|
|
8
|
-
responsibleGamingContent: string | ReactNode;
|
|
9
|
-
termsOfUseContent: string | ReactNode;
|
|
10
|
-
responsibleGamingLogo?: ImageProps['src'];
|
|
11
|
-
redirectUrlOnNoConsent?: string;
|
|
12
|
-
hasNoCheckbox?: boolean;
|
|
13
|
-
};
|
|
1
|
+
import type { DisclaimerV1Props } from './DisclaimerV1';
|
|
2
|
+
import type { DisclaimerV2Props } from './DisclaimerV2';
|
|
3
|
+
export type DisclaimerProps = DisclaimerV1Props | DisclaimerV2Props;
|
|
14
4
|
export declare function Disclaimer(props: DisclaimerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import dynamic from 'next/dynamic';
|
|
4
|
+
const DisclaimerV1 = dynamic(() => import('./DisclaimerV1.js').then((mod) => mod.DisclaimerV1), {
|
|
5
|
+
ssr: false,
|
|
6
|
+
loading: () => null,
|
|
7
|
+
});
|
|
8
|
+
const DisclaimerV2 = dynamic(() => import('./DisclaimerV2.js').then((mod) => mod.DisclaimerV2), {
|
|
9
|
+
ssr: false,
|
|
10
|
+
loading: () => null,
|
|
11
|
+
});
|
|
5
12
|
export function Disclaimer(props) {
|
|
6
|
-
if (props.version === '
|
|
7
|
-
return
|
|
13
|
+
if (props.version === '2') {
|
|
14
|
+
return _jsx(DisclaimerV2, { ...props });
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return _jsx(DisclaimerV1, { ...props });
|
|
8
18
|
}
|
|
9
|
-
return _jsx(DisclaimerV1, { ...props });
|
|
10
19
|
}
|
|
@@ -12,5 +12,5 @@ import { useDisclaimer } from './useDisclaimer.js';
|
|
|
12
12
|
export function DisclaimerV1(props) {
|
|
13
13
|
const disclaimer = useDisclaimer();
|
|
14
14
|
const acceptTriggerRef = useRef(null);
|
|
15
|
-
return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl
|
|
15
|
+
return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "mt-3xl text-center text-lg font-semibold", children: "Age Verification" }), _jsxs(Dialog.Description, { className: "text-text-tertiary-600 mt-xs text-center text-sm", children: ["By entering this website I acknowledge and confirm I am 21 years of age and I agree with the", ' ', _jsx(Link, { href: props.termsAndConditionsUrl ?? '/terms-and-conditions', target: "_blank", rel: "noopener noreferrer", className: "text-brand-400 whitespace-nowrap underline underline-offset-2", prefetch: false, children: "Terms and Conditions." })] }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx(Button, { ref: acceptTriggerRef, type: "button", className: "mt-4xl", onClick: disclaimer.close, children: "Accept" })] }) })] }) }));
|
|
16
16
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { ImageProps } from 'next/image';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface DisclaimerV2Props {
|
|
3
|
+
version: '2';
|
|
4
4
|
logo: ImageProps['src'];
|
|
5
5
|
siteName: string;
|
|
6
|
-
responsibleGamingContent: ReactNode;
|
|
7
|
-
termsOfUseContent: ReactNode;
|
|
8
6
|
responsibleGamingLogo?: ImageProps['src'];
|
|
9
|
-
redirectUrlOnNoConsent?: string;
|
|
10
|
-
hasNoCheckbox?: boolean;
|
|
11
7
|
}
|
|
12
|
-
export declare function DisclaimerV2(props:
|
|
8
|
+
export declare function DisclaimerV2(props: DisclaimerV2Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Image from 'next/image';
|
|
4
|
-
import {
|
|
4
|
+
import { useShallow } from 'zustand/shallow';
|
|
5
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
5
6
|
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
6
7
|
import pagcorLogo from '../../images/pagcor2.png';
|
|
7
8
|
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
@@ -9,58 +10,29 @@ import { Button } from '../../ui/Button/index.js';
|
|
|
9
10
|
import { Checkbox } from '../../ui/Checkbox/index.js';
|
|
10
11
|
import { Dialog } from '../../ui/Dialog/index.js';
|
|
11
12
|
import { Portal } from '../../ui/Portal/index.js';
|
|
12
|
-
import { ResponsibleGaming } from './ResponsibleGaming.js';
|
|
13
|
-
import { TermsOfUse } from './TermsOfUse.js';
|
|
14
13
|
import { useDisclaimer } from './useDisclaimer.js';
|
|
15
14
|
export function DisclaimerV2(props) {
|
|
16
15
|
const disclaimer = useDisclaimer();
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, responsibleGamingLogo: props.responsibleGamingLogo }), _jsx(TermsOfUse, { termsOfUseContent: props.termsOfUseContent, siteName: props.siteName, logo: props.logo, open: isTermsOfUseOpen, onCloseAction: () => {
|
|
32
|
-
setIsTermsOfUseAccepted(true);
|
|
33
|
-
setTermsOfUseOpen(false);
|
|
34
|
-
}, responsibleGamingLogo: props.responsibleGamingLogo }), _jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start gap-y-4 overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false })] }), _jsx("div", { className: "text-sm", children: "The following individuals are prohibited from registering or participating in this online gaming platform." }), _jsx("div", { className: "w-full grow", children: _jsxs(Dialog.Description, { className: "space-y-4 text-sm", children: [_jsxs("ul", { className: "space-y-1.5 text-left", children: [_jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Persons below the legal gambling age of 21."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Any government official or employee directly involved in the operations of the government or its agencies."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Member of the Armed Forces of the Philippines, including the Army, Navy, Air Force and the Philippine National Police."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Individuals listed in PAGCOR's National Database of Restricted Persons (NDRP)"] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Holders of a valid Gaming Employment License (GEL)"] })] }), !props.hasNoCheckbox ? (_jsxs(Checkbox.Root, { checked: isChecked, onCheckedChange: (e) => {
|
|
35
|
-
setIsChecked(!!e.checked);
|
|
36
|
-
if (!e.checked) {
|
|
37
|
-
setIsTermsOfUseAccepted(false);
|
|
38
|
-
setIsResponsibleGamingAccepted(false);
|
|
39
|
-
}
|
|
40
|
-
}, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsxs(Checkbox.Label, { children: ["I have read and agreed to ", props.siteName, ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
41
|
-
setTermsOfUseOpen(true);
|
|
42
|
-
}, children: "Terms of Use" }), ' ', "and", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
43
|
-
setResponsibleGamingOpen(true);
|
|
44
|
-
}, children: "Responsible Gaming" })] }), _jsx(Checkbox.HiddenInput, {})] })) : (_jsxs("div", { children: ["I have read and agreed to ", props.siteName, ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
45
|
-
setTermsOfUseOpen(true);
|
|
16
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
17
|
+
termsOfUse: ctx.termsOfUse,
|
|
18
|
+
responsibleGaming: ctx.responsibleGaming,
|
|
19
|
+
})));
|
|
20
|
+
const checked = globalStore.termsOfUse.accepted && globalStore.responsibleGaming.accepted;
|
|
21
|
+
return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start gap-y-4 overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false })] }), _jsx("div", { className: "text-sm", children: "The following individuals are prohibited from registering or participating in this online gaming platform." }), _jsx("div", { className: "w-full grow", children: _jsxs(Dialog.Description, { className: "space-y-4 text-sm", children: [_jsxs("ul", { className: "space-y-1.5 text-left", children: [_jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Persons below the legal gambling age of 21."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Any government official or employee directly involved in the operations of the government or its agencies."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Member of the Armed Forces of the Philippines, including the Army, Navy, Air Force and the Philippine National Police."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Individuals listed in PAGCOR's National Database of Restricted Persons (NDRP)"] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Holders of a valid Gaming Employment License (GEL)"] })] }), _jsxs(Checkbox.Root, { checked: checked, onCheckedChange: (e) => {
|
|
22
|
+
if (e.checked === 'indeterminate')
|
|
23
|
+
return;
|
|
24
|
+
globalStore.termsOfUse.setAccepted(e.checked);
|
|
25
|
+
globalStore.responsibleGaming.setAccepted(e.checked);
|
|
26
|
+
}, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsxs(Checkbox.Label, { children: ["I have read and agreed to ", props.siteName, ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
27
|
+
globalStore.termsOfUse.setOpen(true);
|
|
28
|
+
globalStore.termsOfUse.setNext('DISCLAIMER');
|
|
29
|
+
disclaimer.close();
|
|
46
30
|
}, children: "Terms of Use" }), ' ', "and", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
disclaimer.close();
|
|
54
|
-
}
|
|
55
|
-
}, variant: "outline", children: "Exit" }), _jsx(Button, { ref: acceptTriggerRef, type: "button", disabled: !isChecked, "aria-disabled": !isChecked, onClick: () => {
|
|
56
|
-
if (isChecked) {
|
|
57
|
-
disclaimer.close();
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
if (props.redirectUrlOnNoConsent) {
|
|
61
|
-
window.location.href = props.redirectUrlOnNoConsent;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}, children: "Accept" })] })] }) })] }) })] }));
|
|
31
|
+
globalStore.responsibleGaming.setOpen(true);
|
|
32
|
+
globalStore.responsibleGaming.setNext('DISCLAIMER');
|
|
33
|
+
disclaimer.close();
|
|
34
|
+
}, children: "Responsible Gaming" })] }), _jsx(Checkbox.HiddenInput, {})] }), _jsx("div", { children: "Funds or credits in the account of any individual found ineligible to participate will be forfeited and turned over to the government as required by law" })] }) }), _jsx("div", { className: "mt-4 flex w-full gap-3", children: _jsx(Button, { type: "button", onClick: () => {
|
|
35
|
+
disclaimer.close();
|
|
36
|
+
}, disabled: !checked, className: "mt-4", children: "Accept" }) })] }) })] }) }));
|
|
65
37
|
}
|
|
66
38
|
const Circle = () => (_jsx("div", { children: _jsx("div", { className: "border-brand-400 flex h-4.5 w-4.5 items-center justify-center rounded-full border", children: _jsx("div", { className: "bg-brand-400 h-3 w-3 rounded-full" }) }) }));
|
|
@@ -22,7 +22,7 @@ export function useDisclaimer() {
|
|
|
22
22
|
: /* set to zero to trigger timeout function */ 0;
|
|
23
23
|
useTimeout(() => {
|
|
24
24
|
disclaimerStore.setOpen(true);
|
|
25
|
-
}, refetchPausedUntilInMs);
|
|
25
|
+
}, disclaimerStore.open ? null : refetchPausedUntilInMs);
|
|
26
26
|
return {
|
|
27
27
|
open: sessionQuery.isLoading
|
|
28
28
|
? false
|
|
@@ -22,7 +22,7 @@ import { AlertDialog } from '../../ui/AlertDialog/index.js';
|
|
|
22
22
|
import { Button } from '../../ui/Button/index.js';
|
|
23
23
|
import { IconButton } from '../../ui/IconButton/index.js';
|
|
24
24
|
import { Portal } from '../../ui/Portal/index.js';
|
|
25
|
-
import { Presence } from '../../ui/Presence.js';
|
|
25
|
+
import { Presence } from '../../ui/Presence/index.js';
|
|
26
26
|
export function GameLaunch() {
|
|
27
27
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
28
28
|
gameLaunch: ctx.gameLaunch,
|
|
@@ -10,7 +10,7 @@ import { SearchLgIcon } from '../../icons/SearchLgIcon.js';
|
|
|
10
10
|
import { Button } from '../../ui/Button/index.js';
|
|
11
11
|
import { Combobox } from '../../ui/Combobox/index.js';
|
|
12
12
|
import { Portal } from '../../ui/Portal/index.js';
|
|
13
|
-
import { Presence } from '../../ui/Presence.js';
|
|
13
|
+
import { Presence } from '../../ui/Presence/index.js';
|
|
14
14
|
import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
|
|
15
15
|
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
16
16
|
export function GamesSearch(props) {
|