@opexa/portal-components 0.0.276 → 0.0.278
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/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/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +12 -1
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +12 -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/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/{SignUpPagcor/SignUpPagcor.lazy.d.ts → SignUpDefault/SignUpDefault.lazy.d.ts} +7 -6
- 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} +89 -54
- package/dist/components/SignUp/SignUpKYC/SignUpKYC.lazy.d.ts +5 -8
- package/dist/components/SignUp/SignUpKYC/SignUpKYCForm.js +37 -31
- 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/constants/EnvVar.d.ts +1 -1
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/postTransformIdFrontImage.js +21 -6
- package/dist/handlers/postTransformSelfieImage.js +20 -9
- package/dist/next.config.js +1 -0
- 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 +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- 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 +32 -32
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +8 -8
- 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 +3 -3
- 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/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 -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/SignUpForm.d.ts +0 -1
- 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.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.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/resizeImageSize.d.ts +0 -2
- package/dist/utils/resizeImageSize.js +0 -11
|
@@ -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,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
|
|
@@ -17,6 +17,7 @@ import closeChest from '../../../images/close-chest.png';
|
|
|
17
17
|
import firstPlace from '../../../images/first-place.png';
|
|
18
18
|
import leaderboard from '../../../images/leaderboard.png';
|
|
19
19
|
import openChest from '../../../images/open-chest.png';
|
|
20
|
+
import * as Tooltip from '../../../ui/Tooltip/Tooltip.js';
|
|
20
21
|
import { capitalize } from '../../../utils/capitalize.js';
|
|
21
22
|
import { formatNumber } from '../../../utils/formatNumber.js';
|
|
22
23
|
import { getPercentage } from '../../../utils/getPercentage.js';
|
|
@@ -69,7 +70,17 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
|
|
|
69
70
|
}) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
70
71
|
currency: localeInfo.currency.code,
|
|
71
72
|
compact: true,
|
|
72
|
-
}) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children:
|
|
73
|
+
}) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsxs(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: [_jsxs(Tooltip.Root, { openDelay: 0, closeDelay: 100, lazyMount: true, unmountOnExit: true, positioning: { strategy: 'fixed', placement: 'top' }, children: [_jsx(Tooltip.Trigger, { asChild: true, children: _jsx("div", { className: "absolute inset-0 h-full w-full" }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { children: [_jsxs("div", { className: "text-xs", children: ["Current\uD83D\uDCB0:", ' ', formatNumber(jackpot.pool, {
|
|
74
|
+
currency: localeInfo.currency.code,
|
|
75
|
+
minDecimalPlaces: 2,
|
|
76
|
+
maxDecimalPlaces: 2,
|
|
77
|
+
})] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] }), _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }), _jsxs(Tooltip.Root, { openDelay: 0, closeDelay: 100, lazyMount: true, unmountOnExit: true, positioning: { strategy: 'fixed', placement: 'top' }, children: [_jsx(Tooltip.Trigger, { asChild: true, children: _jsx("div", { className: "absolute inset-0 h-full bg-black opacity-30", style: {
|
|
78
|
+
width: `${getPercentage(jackpot.minimumJackpotPoolDrawingLimit, jackpot.pool)}%`,
|
|
79
|
+
} }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { children: [_jsxs("div", { className: "text-xs", children: ["Minimum Payout Limit:", ' ', formatNumber(jackpot.minimumJackpotPoolDrawingLimit, {
|
|
80
|
+
currency: localeInfo.currency.code,
|
|
81
|
+
minDecimalPlaces: 2,
|
|
82
|
+
maxDecimalPlaces: 2,
|
|
83
|
+
})] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] })] }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
|
|
73
84
|
? `The pot has hit ${formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
74
85
|
currency: localeInfo.currency.code,
|
|
75
86
|
compact: true,
|
|
@@ -12,6 +12,7 @@ import closeChest from '../../../images/close-chest.png';
|
|
|
12
12
|
import firstPlace from '../../../images/first-place.png';
|
|
13
13
|
import leaderboard from '../../../images/leaderboard.png';
|
|
14
14
|
import openChest from '../../../images/open-chest.png';
|
|
15
|
+
import { Tooltip } from '../../../ui/Tooltip/index.js';
|
|
15
16
|
import { capitalize } from '../../../utils/capitalize.js';
|
|
16
17
|
import { formatNumber } from '../../../utils/formatNumber.js';
|
|
17
18
|
import { getPercentage } from '../../../utils/getPercentage.js';
|
|
@@ -40,7 +41,17 @@ export function JackpotsListItemDesktop({ animate = true, ...props }) {
|
|
|
40
41
|
}) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
41
42
|
currency: localeInfo.currency.code,
|
|
42
43
|
compact: true,
|
|
43
|
-
}) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children:
|
|
44
|
+
}) })] })] }), _jsx(Progress.Root, { className: "bg-bg-primary h-2 w-full rounded-full lg:h-4", max: 100, value: getPercentage(jackpot.pool, jackpot.maximumJackpotPoolLimit), children: _jsx(Progress.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: _jsxs(Progress.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: [_jsxs(Tooltip.Root, { openDelay: 0, closeDelay: 100, lazyMount: true, unmountOnExit: true, positioning: { strategy: 'fixed', placement: 'top' }, children: [_jsx(Tooltip.Trigger, { asChild: true, children: _jsx("div", { className: "absolute inset-0 h-full w-full" }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { children: [_jsxs("div", { className: "text-xs", children: ["Current\uD83D\uDCB0:", ' ', formatNumber(jackpot.pool, {
|
|
45
|
+
currency: localeInfo.currency.code,
|
|
46
|
+
minDecimalPlaces: 2,
|
|
47
|
+
maxDecimalPlaces: 2,
|
|
48
|
+
})] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] }), _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }), _jsxs(Tooltip.Root, { openDelay: 0, closeDelay: 100, lazyMount: true, unmountOnExit: true, positioning: { strategy: 'fixed', placement: 'top' }, children: [_jsx(Tooltip.Trigger, { asChild: true, children: _jsx("div", { className: "absolute inset-0 h-full bg-black opacity-30", style: {
|
|
49
|
+
width: `${getPercentage(jackpot.minimumJackpotPoolDrawingLimit, jackpot.pool)}%`,
|
|
50
|
+
} }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { children: [_jsxs("div", { className: "text-xs", children: ["Minimum Payout Limit:", ' ', formatNumber(jackpot.minimumJackpotPoolDrawingLimit, {
|
|
51
|
+
currency: localeInfo.currency.code,
|
|
52
|
+
minDecimalPlaces: 2,
|
|
53
|
+
maxDecimalPlaces: 2,
|
|
54
|
+
})] }), _jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) })] }) })] })] }) }) }), _jsx("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: isPayingOut
|
|
44
55
|
? `The pot has hit ${formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
45
56
|
currency: localeInfo.currency.code,
|
|
46
57
|
compact: true,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import dynamic from 'next/dynamic';
|
|
4
|
+
import { useShallow } from 'zustand/shallow';
|
|
5
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
|
+
const Component = dynamic(() => import('./ResponsibleGaming.lazy.js').then((m) => m.ResponsibleGaming), {
|
|
7
|
+
ssr: false,
|
|
8
|
+
loading: () => null,
|
|
9
|
+
});
|
|
10
|
+
export function ResponsibleGaming(props) {
|
|
11
|
+
const touched = useGlobalStore(useShallow((ctx) => ctx.responsibleGaming['~touched']));
|
|
12
|
+
if (touched)
|
|
13
|
+
return _jsx(Component, { ...props });
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ImageProps } from 'next/image';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface ResponsibleGamingProps {
|
|
4
|
+
logo: ImageProps['src'];
|
|
5
|
+
content: string | ReactNode;
|
|
6
|
+
responsibleGamingLogo?: ImageProps['src'];
|
|
7
|
+
}
|
|
8
|
+
export declare function ResponsibleGaming(props: ResponsibleGamingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Image, {} from 'next/image';
|
|
3
|
+
import { useShallow } from 'zustand/shallow';
|
|
4
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
5
|
+
import pagcorLogo from '../../images/pagcor.png';
|
|
6
|
+
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
7
|
+
import { Button } from '../../ui/Button/index.js';
|
|
8
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
9
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
10
|
+
export function ResponsibleGaming(props) {
|
|
11
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
12
|
+
signIn: ctx.signIn,
|
|
13
|
+
signUp: ctx.signUp,
|
|
14
|
+
disclaimer: ctx.disclaimer,
|
|
15
|
+
responsibleGaming: ctx.responsibleGaming,
|
|
16
|
+
})));
|
|
17
|
+
return (_jsx(Dialog.Root, { open: globalStore.responsibleGaming.open, onOpenChange: (details) => {
|
|
18
|
+
globalStore.responsibleGaming.setOpen(details.open);
|
|
19
|
+
if (!details.open)
|
|
20
|
+
globalStore.responsibleGaming.setAccepted(true);
|
|
21
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
22
|
+
if (globalStore.responsibleGaming.next === 'SIGN_IN') {
|
|
23
|
+
globalStore.signIn.setOpen(true);
|
|
24
|
+
}
|
|
25
|
+
if (globalStore.responsibleGaming.next === 'SIGN_UP') {
|
|
26
|
+
globalStore.signUp.setOpen(true);
|
|
27
|
+
}
|
|
28
|
+
if (globalStore.responsibleGaming.next === 'DISCLAIMER') {
|
|
29
|
+
globalStore.disclaimer.setOpen(true);
|
|
30
|
+
}
|
|
31
|
+
globalStore.responsibleGaming.setNext(null);
|
|
32
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", 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: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: "Responsible Gaming" }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: props.content }), _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: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { type: "button", className: "mt-3", onClick: () => {
|
|
33
|
+
api.setOpen(false);
|
|
34
|
+
}, children: "I Agree" })) })] }) })] }) }));
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ResponsibleGaming';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ResponsibleGaming.js';
|