@opexa/portal-components 0.0.302 → 0.0.304
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 +8 -0
- package/dist/client/hooks/useGlobalStore.js +21 -0
- package/dist/client/utils/recaptcha.d.ts +14 -0
- package/dist/client/utils/recaptcha.js +18 -0
- package/dist/components/Account/Account.lazy.js +1 -1
- package/dist/components/Banner/Banner.client.d.ts +12 -0
- package/dist/components/Banner/Banner.client.js +49 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +26 -12
- package/dist/components/DepositWithdrawal/HasPendingBonuses.d.ts +5 -0
- package/dist/components/DepositWithdrawal/HasPendingBonuses.js +22 -0
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +5 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +6 -2
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +5 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +5 -0
- package/dist/components/DepositWithdrawal/Withdrawal/PisoPayWithdrawal/PisoPayWithdrawal.js +5 -0
- package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +5 -0
- package/dist/components/Disclaimer/DisclaimerV2.js +2 -2
- package/dist/components/ResponsibleGaming/ResponsibleGaming.lazy.js +2 -1
- package/dist/components/SignUp/SignUpDefault/SignUpDefault.lazy.js +1 -1
- package/dist/components/SignUp/SignUpKYC/SignUpKYC.lazy.js +1 -1
- package/dist/components/SignUp/SignUpKYC/SignUpKYCForm.js +1 -1
- package/dist/components/TermsAndConditions/TermsAndConditions.lazy.js +2 -1
- package/dist/components/TermsOfUse/TermsOfUse.lazy.js +2 -1
- package/dist/constants/EnvVar.d.ts +1 -1
- package/dist/handlers/postTransformIdFrontImage.js +21 -6
- package/dist/handlers/postTransformSelfieImage.js +20 -9
- package/dist/next.config.js +11 -36
- 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 +45 -45
- package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
- 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/Menu/Menu.d.ts +144 -144
- package/dist/ui/Menu/menu.recipe.d.ts +8 -8
- 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 +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- 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 +1 -1
- 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/SignUpForm.js +0 -284
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
- package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
- package/dist/components/shared/IdDocumentField.client.js +0 -204
- package/dist/components/shared/IdDocumentField.d.ts +0 -2
- package/dist/components/shared/IdDocumentField.js +0 -11
- package/dist/components/shared/SelfieField.client.d.ts +0 -20
- package/dist/components/shared/SelfieField.client.js +0 -327
- package/dist/components/shared/SelfieField.d.ts +0 -2
- package/dist/components/shared/SelfieField.js +0 -11
- package/dist/constants/BranchCode.d.ts +0 -4
- package/dist/constants/BranchCode.js +0 -42
- package/dist/handlers.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
|
@@ -53,6 +53,13 @@ export interface TermsOfUseStore extends TermsAndConditionsStore {
|
|
|
53
53
|
}
|
|
54
54
|
export interface ResponsibleGamingStore extends TermsAndConditionsStore {
|
|
55
55
|
}
|
|
56
|
+
export interface HasPendingBonusStore {
|
|
57
|
+
open: boolean;
|
|
58
|
+
setOpen: (open: boolean) => void;
|
|
59
|
+
'~touched': boolean;
|
|
60
|
+
shouldShowWarning: boolean;
|
|
61
|
+
setShouldShowWarning: (shouldShow: boolean) => void;
|
|
62
|
+
}
|
|
56
63
|
export interface GlobalStore {
|
|
57
64
|
signUp: PopupStore;
|
|
58
65
|
signIn: PopupStore;
|
|
@@ -73,6 +80,7 @@ export interface GlobalStore {
|
|
|
73
80
|
termsAndConditions: TermsAndConditionsStore;
|
|
74
81
|
termsOfUse: TermsOfUseStore;
|
|
75
82
|
responsibleGaming: ResponsibleGamingStore;
|
|
83
|
+
pendingBonus: HasPendingBonusStore;
|
|
76
84
|
}
|
|
77
85
|
export declare const useGlobalStore: import("zustand").UseBoundStore<import("zustand").StoreApi<GlobalStore>>;
|
|
78
86
|
export {};
|
|
@@ -371,4 +371,25 @@ export const useGlobalStore = create((set) => ({
|
|
|
371
371
|
},
|
|
372
372
|
'~touched': false,
|
|
373
373
|
},
|
|
374
|
+
pendingBonus: {
|
|
375
|
+
open: false,
|
|
376
|
+
setOpen(open) {
|
|
377
|
+
set((prev) => ({
|
|
378
|
+
pendingBonus: {
|
|
379
|
+
...prev.pendingBonus,
|
|
380
|
+
open,
|
|
381
|
+
'~touched': true,
|
|
382
|
+
},
|
|
383
|
+
}));
|
|
384
|
+
},
|
|
385
|
+
shouldShowWarning: false,
|
|
386
|
+
setShouldShowWarning: (shouldShowWarning) => set((state) => ({
|
|
387
|
+
pendingBonus: {
|
|
388
|
+
...state.pendingBonus,
|
|
389
|
+
shouldShowWarning,
|
|
390
|
+
'~touched': true,
|
|
391
|
+
},
|
|
392
|
+
})),
|
|
393
|
+
'~touched': false,
|
|
394
|
+
},
|
|
374
395
|
}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ReCAPTCHAExecuteOptions {
|
|
2
|
+
action: 'submit' | (string & {});
|
|
3
|
+
}
|
|
4
|
+
export interface ReCAPTCHA {
|
|
5
|
+
ready(callback: () => void): void;
|
|
6
|
+
execute(siteKey: string, options: ReCAPTCHAExecuteOptions): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare function ReCAPTCHAReady(): Promise<void>;
|
|
9
|
+
export declare function ReCAPTCHAExecute(options: ReCAPTCHAExecuteOptions): Promise<string>;
|
|
10
|
+
declare global {
|
|
11
|
+
interface Window {
|
|
12
|
+
grecaptcha: ReCAPTCHA;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RECAPTCHA_SITE_KEY } from '../../constants/index.js';
|
|
2
|
+
let loaded = false;
|
|
3
|
+
export function ReCAPTCHAReady() {
|
|
4
|
+
return new Promise((resolve) => {
|
|
5
|
+
if (!loaded) {
|
|
6
|
+
window.grecaptcha.ready(() => {
|
|
7
|
+
loaded = true;
|
|
8
|
+
resolve();
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
resolve();
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export async function ReCAPTCHAExecute(options) {
|
|
17
|
+
return await window.grecaptcha.execute(RECAPTCHA_SITE_KEY, options);
|
|
18
|
+
}
|
|
@@ -56,7 +56,7 @@ export function Account(props) {
|
|
|
56
56
|
: [props.offsetTop ?? '0px', props.offsetTop ?? '0px'];
|
|
57
57
|
return (_jsxs(AccountPropsContext, { value: Object.assign({}, defaultAccountProps, props), children: [_jsx(Drawer.Root, { open: globalStore.account__mobile.open, onOpenChange: (details) => {
|
|
58
58
|
globalStore.account__mobile.setOpen(details.open);
|
|
59
|
-
}, lazyMount: true, unmountOnExit: true, children: _jsx(Portal, { children: _jsx(Drawer.Positioner, { children: _jsxs(Drawer.Content, { className: twMerge('relative', 'flex', 'flex-col', 'top-[var(--offset-top-mobile)]', 'h-[calc(100%-var(--offset-top-mobile))]', 'w-full', 'px-xl', 'py-6', 'lg:top-[var(--offset-top-desktop)]', 'lg:h-[calc(100%-var(--offset-top-desktop))]'), style: {
|
|
59
|
+
}, lazyMount: true, unmountOnExit: true, children: _jsx(Portal, { children: _jsx(Drawer.Positioner, { children: _jsxs(Drawer.Content, { className: twMerge('relative', 'flex', 'flex-col', 'top-[var(--offset-top-mobile)]', 'h-[calc(100%-var(--offset-top-mobile))]', 'w-full', 'px-xl', 'py-6', 'lg:top-[var(--offset-top-desktop)]', 'lg:h-[calc(100%-var(--offset-top-desktop))]', 'overflow-auto'), style: {
|
|
60
60
|
['--offset-top-mobile']: mobileOffsetTop,
|
|
61
61
|
['--offset-top-desktop']: desktopOffsetTop,
|
|
62
62
|
}, children: [_jsx(Profile, {}), _jsx(Wallet, {}), _jsx(Links, { router: router })] }) }) }) }), _jsx(Popover.Root, { open: globalStore.account.open, onOpenChange: (details) => {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ImageProps } from 'next/image';
|
|
2
|
+
export interface BannerEntry {
|
|
3
|
+
src: ImageProps['src'];
|
|
4
|
+
redirectUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BannerProps {
|
|
7
|
+
banners: BannerEntry[];
|
|
8
|
+
imageWidth?: number | [mobile: number, desktop: number];
|
|
9
|
+
imageHeight?: number | [mobile: number, desktop: number];
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Banner__client(props: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import emblaCarouselAutoplay from 'embla-carousel-autoplay';
|
|
4
|
+
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
5
|
+
import isMobile from 'is-mobile';
|
|
6
|
+
import Image from 'next/image';
|
|
7
|
+
import Link from 'next/link';
|
|
8
|
+
import { Fragment, useEffect, useState } from 'react';
|
|
9
|
+
import { twMerge } from 'tailwind-merge';
|
|
10
|
+
import { dataAttr } from '../../utils/dataAttr.js';
|
|
11
|
+
export function Banner__client(props) {
|
|
12
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
13
|
+
loop: true,
|
|
14
|
+
align: 'start',
|
|
15
|
+
}, [
|
|
16
|
+
emblaCarouselAutoplay({
|
|
17
|
+
playOnInit: true,
|
|
18
|
+
delay: 5000,
|
|
19
|
+
}),
|
|
20
|
+
]);
|
|
21
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
function handler(detail) {
|
|
24
|
+
setCurrentIndex(detail?.selectedScrollSnap() ?? 0);
|
|
25
|
+
}
|
|
26
|
+
emblaApi?.on('scroll', handler);
|
|
27
|
+
emblaApi?.on('init', handler);
|
|
28
|
+
return () => {
|
|
29
|
+
emblaApi?.on('init', handler);
|
|
30
|
+
emblaApi?.off('scroll', handler);
|
|
31
|
+
};
|
|
32
|
+
}, [emblaApi]);
|
|
33
|
+
const imageWidth = !props.imageWidth
|
|
34
|
+
? [400, 1200]
|
|
35
|
+
: Array.isArray(props.imageWidth)
|
|
36
|
+
? props.imageWidth
|
|
37
|
+
: [props.imageWidth, props.imageWidth];
|
|
38
|
+
const imageHeight = !props.imageHeight
|
|
39
|
+
? [225, 300]
|
|
40
|
+
: Array.isArray(props.imageHeight)
|
|
41
|
+
? props.imageHeight
|
|
42
|
+
: [props.imageHeight, props.imageHeight];
|
|
43
|
+
return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
|
|
44
|
+
const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? imageWidth[0] : imageWidth[1], height: isMobile() ? imageHeight[0] : imageHeight[1], className: "block h-auto w-full", priority: index === 0 }));
|
|
45
|
+
return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
|
|
46
|
+
}) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
|
|
47
|
+
emblaApi?.scrollTo(index);
|
|
48
|
+
}, "aria-label": `Go to slide ${index + 1}`, "data-active": dataAttr(index === currentIndex) }, index))) })] }));
|
|
49
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect } from 'react';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
import { useShallow } from 'zustand/shallow';
|
|
6
|
+
import { useBonusesQuery } from '../../client/hooks/useBonusesQuery.js';
|
|
5
7
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
8
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
7
9
|
import { useWalletQuery } from '../../client/hooks/useWalletQuery.js';
|
|
@@ -14,24 +16,36 @@ import { Tabs } from '../../ui/Tabs/index.js';
|
|
|
14
16
|
import { formatNumber } from '../../utils/formatNumber.js';
|
|
15
17
|
import { Deposit } from './Deposit/Deposit.js';
|
|
16
18
|
import { DepositWithdrawalPropsProvider } from './DepositWithdrawalContext.js';
|
|
19
|
+
import HasPendingBonuses from './HasPendingBonuses.js';
|
|
17
20
|
import { Withdrawal } from './Withdrawal/Withdrawal.js';
|
|
18
21
|
export function DepositWithdrawal(props) {
|
|
19
22
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
20
23
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
24
|
+
pendingBonus: ctx.pendingBonus,
|
|
21
25
|
})));
|
|
26
|
+
const bonusesQuery = useBonusesQuery();
|
|
27
|
+
const hasPendingBonus = Boolean(bonusesQuery?.data &&
|
|
28
|
+
bonusesQuery?.data?.length > 0 &&
|
|
29
|
+
bonusesQuery.data?.some((bonus) => +bonus.currentTurnoverRequirementContributionPercentage < 100));
|
|
22
30
|
const localeInfo = useLocaleInfo();
|
|
23
31
|
const walletQuery = useWalletQuery({
|
|
24
32
|
refetchInterval: 5000,
|
|
25
33
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
//check if the user has pending/ongoing bonuses
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (hasPendingBonus && !globalStore.pendingBonus.shouldShowWarning) {
|
|
37
|
+
globalStore.pendingBonus.setShouldShowWarning(hasPendingBonus);
|
|
38
|
+
}
|
|
39
|
+
}, [hasPendingBonus]);
|
|
40
|
+
return (_jsxs(_Fragment, { children: [_jsx(DepositWithdrawalPropsProvider, { value: props, children: _jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.depositWithdrawal.open, onOpenChange: (details) => {
|
|
41
|
+
globalStore.depositWithdrawal.setOpen(details.open);
|
|
42
|
+
if (!details.open) {
|
|
43
|
+
globalStore.depositWithdrawal.setPromo(null);
|
|
44
|
+
}
|
|
45
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, 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: "lg:min-h-auto py-3xl mx-auto min-h-full w-full overflow-y-auto px-4 lg:w-[480px] lg:rounded-xl", children: [_jsxs(Dialog.Header, { className: "gap-xl flex items-center", children: [_jsx("div", { className: "border-border-primary shadow-xs text-text-secondary-700 flex size-10 items-center justify-center rounded-md border text-gray-700", children: _jsx(Wallet02Icon, { className: "size-5" }) }), _jsx(Dialog.Title, { className: "grow text-lg font-semibold", children: "Wallet" }), _jsx(Dialog.Context, { children: (api) => (_jsx(IconButton, { size: "sm", variant: "outline", colorScheme: "gray", onClick: () => api.setOpen(false), children: _jsx(XIcon, {}) })) })] }), _jsxs(Dialog.Body, { className: "mt-3xl", children: [_jsx("p", { className: "text-text-secondary-700 text-center text-sm", children: "Deposit Balance" }), _jsx("p", { className: "text-center text-3xl font-bold leading-tight tracking-tight", children: formatNumber(walletQuery.data?.balance, {
|
|
46
|
+
currency: localeInfo.currency.code,
|
|
47
|
+
minDecimalPlaces: 2,
|
|
48
|
+
}) }), _jsxs(Tabs.Root, { value: globalStore.depositWithdrawal.tab, onValueChange: (details) => {
|
|
49
|
+
globalStore.depositWithdrawal.setTab(z.enum(['DEPOSIT', 'WITHDRAWAL']).parse(details.value));
|
|
50
|
+
}, lazyMount: true, unmountOnExit: true, className: "mt-3xl space-y-4xl", children: [_jsxs(Tabs.List, { className: "w-full", children: [_jsx(Tabs.Trigger, { value: "DEPOSIT", className: "grow", children: "Deposit" }), _jsx(Tabs.Trigger, { value: "WITHDRAWAL", className: "grow", children: "Withdrawal" }), _jsx(Tabs.Indicator, {})] }), _jsx(Tabs.Content, { value: "DEPOSIT", className: "space-y-3xl", children: _jsx(Deposit, {}) }), _jsx(Tabs.Content, { value: "WITHDRAWAL", className: "space-y-3xl", children: _jsx(Withdrawal, {}) })] })] })] }) })] }) }) }), _jsx(HasPendingBonuses, {})] }));
|
|
37
51
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { useShallow } from 'zustand/shallow';
|
|
5
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
|
+
import { AlertTriangleIcon } from '../../icons/AlertTriangle.js';
|
|
7
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
8
|
+
import { Button } from '../../ui/Button/index.js';
|
|
9
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
10
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
11
|
+
function HasPendingBonuses(props) {
|
|
12
|
+
const hasPendingBonusStore = useGlobalStore(useShallow((ctx) => ctx.pendingBonus));
|
|
13
|
+
return (_jsx(Dialog.Root, { open: hasPendingBonusStore.open, onOpenChange: (details) => {
|
|
14
|
+
hasPendingBonusStore.setOpen(details.open);
|
|
15
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-tooltip flex items-center justify-center", children: _jsxs(Dialog.Content, { className: twMerge('bg-bg-primary-alt p-3xl pb-4xl mx-auto h-fit w-[90vw] overflow-y-auto rounded-2xl text-center lg:h-auto lg:w-[400px] lg:rounded-xl', props.className), children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "mb-xl bg-bg-warning-secondary mx-auto flex w-fit items-center justify-center rounded-full p-3", children: _jsx(AlertTriangleIcon, { className: "size-6 text-[#FEDF89]" }) }), _jsx("h1", { className: "text-text-primary-900 text-lg font-semibold", children: "Confirm Promo Cancellation" }), _jsx("p", { className: "text-text-tertiary-600 text-sm", children: "Proceeding will cancel the promo and result in the loss of your active bonus. Do you want to continue?" }), _jsxs(Dialog.Footer, { className: "mt-4xl flex items-center gap-2", children: [_jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
16
|
+
hasPendingBonusStore.setOpen(false);
|
|
17
|
+
}, children: "No" }), _jsx(Button, { type: "submit", onClick: () => {
|
|
18
|
+
hasPendingBonusStore.setOpen(false);
|
|
19
|
+
hasPendingBonusStore.setShouldShowWarning(false);
|
|
20
|
+
}, children: "Yes" })] })] }) })] }) }));
|
|
21
|
+
}
|
|
22
|
+
export default HasPendingBonuses;
|
|
@@ -31,6 +31,7 @@ export function GCashWithdrawal() {
|
|
|
31
31
|
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
32
32
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
33
33
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
34
|
+
hasPendingBonus: ctx.pendingBonus,
|
|
34
35
|
})));
|
|
35
36
|
const [status, setStatus] = useState('waiting');
|
|
36
37
|
const localeInfo = useLocaleInfo();
|
|
@@ -101,6 +102,10 @@ export function GCashWithdrawal() {
|
|
|
101
102
|
}
|
|
102
103
|
}, [form, minimumAmount]);
|
|
103
104
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
105
|
+
if (globalStore.hasPendingBonus.shouldShowWarning) {
|
|
106
|
+
globalStore.hasPendingBonus.setOpen(true);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
104
109
|
createWithdrawalMutation.mutate({
|
|
105
110
|
amount: data.amount,
|
|
106
111
|
recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
|
package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js
CHANGED
|
@@ -37,6 +37,7 @@ export function InstapayWithdrawal() {
|
|
|
37
37
|
const { enabled } = useFeatureFlag();
|
|
38
38
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
39
39
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
40
|
+
hasPendingBonus: ctx.pendingBonus,
|
|
40
41
|
})));
|
|
41
42
|
const [status, setStatus] = useState('waiting');
|
|
42
43
|
const createWithdrawalMutation = useCreateInstapayWithdrawalMutation({
|
|
@@ -59,8 +60,7 @@ export function InstapayWithdrawal() {
|
|
|
59
60
|
form.reset();
|
|
60
61
|
setStatus('success');
|
|
61
62
|
},
|
|
62
|
-
onError(
|
|
63
|
-
console.log(err, 'error');
|
|
63
|
+
onError() {
|
|
64
64
|
setStatus('failed');
|
|
65
65
|
},
|
|
66
66
|
});
|
|
@@ -137,6 +137,10 @@ export function InstapayWithdrawal() {
|
|
|
137
137
|
}
|
|
138
138
|
}, [form, instapayBankList]);
|
|
139
139
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
140
|
+
if (globalStore.hasPendingBonus.shouldShowWarning) {
|
|
141
|
+
globalStore.hasPendingBonus.setOpen(true);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
140
144
|
if (enabled) {
|
|
141
145
|
createWithdrawalNextMutation.mutate({
|
|
142
146
|
amount: data.amount,
|
|
@@ -29,6 +29,7 @@ export function MayaAppWithdrawal() {
|
|
|
29
29
|
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
30
30
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
31
31
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
32
|
+
pendingBonus: ctx.pendingBonus,
|
|
32
33
|
})));
|
|
33
34
|
const [status, setStatus] = useState('waiting');
|
|
34
35
|
const createWithdrawalMutation = useCreateMayaAppWithdrawalMutation({
|
|
@@ -92,6 +93,10 @@ export function MayaAppWithdrawal() {
|
|
|
92
93
|
}
|
|
93
94
|
}, [form, minimumAmount]);
|
|
94
95
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
96
|
+
if (globalStore.pendingBonus.shouldShowWarning) {
|
|
97
|
+
globalStore.pendingBonus.setOpen(true);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
95
100
|
createWithdrawalMutation.mutate({
|
|
96
101
|
amount: data.amount,
|
|
97
102
|
transactionPassword: data.password,
|
|
@@ -31,6 +31,7 @@ export function MayaWithdrawal() {
|
|
|
31
31
|
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
32
32
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
33
33
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
34
|
+
hasPendingBonus: ctx.pendingBonus,
|
|
34
35
|
})));
|
|
35
36
|
const [status, setStatus] = useState('waiting');
|
|
36
37
|
const localeInfo = useLocaleInfo();
|
|
@@ -101,6 +102,10 @@ export function MayaWithdrawal() {
|
|
|
101
102
|
}
|
|
102
103
|
}, [form, minimumAmount]);
|
|
103
104
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
105
|
+
if (globalStore.hasPendingBonus.shouldShowWarning) {
|
|
106
|
+
globalStore.hasPendingBonus.setOpen(true);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
104
109
|
createWithdrawalMutation.mutate({
|
|
105
110
|
amount: data.amount,
|
|
106
111
|
recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
|
|
@@ -33,6 +33,7 @@ export function PisoPayWithdrawal() {
|
|
|
33
33
|
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
34
34
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
35
35
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
36
|
+
pendingBonus: ctx.pendingBonus,
|
|
36
37
|
})));
|
|
37
38
|
const [status, setStatus] = useState('waiting');
|
|
38
39
|
const createWithdrawalMutation = useCreatePisoPayWithdrawalMutation({
|
|
@@ -115,6 +116,10 @@ export function PisoPayWithdrawal() {
|
|
|
115
116
|
}
|
|
116
117
|
}, [form]);
|
|
117
118
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
119
|
+
if (globalStore.pendingBonus.shouldShowWarning) {
|
|
120
|
+
globalStore.pendingBonus.setOpen(true);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
118
123
|
createWithdrawalMutation.mutate({
|
|
119
124
|
amount: data.amount,
|
|
120
125
|
transactionPassword: data.password,
|
|
@@ -33,6 +33,7 @@ export function VentajaWithdrawal() {
|
|
|
33
33
|
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
34
34
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
35
35
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
36
|
+
pendingBonus: ctx.pendingBonus,
|
|
36
37
|
})));
|
|
37
38
|
const [status, setStatus] = useState('waiting');
|
|
38
39
|
const createWithdrawalMutation = useCreateVentajaDisbursementWithdrawalMutation({
|
|
@@ -114,6 +115,10 @@ export function VentajaWithdrawal() {
|
|
|
114
115
|
}
|
|
115
116
|
}, [form, instapayBankList]);
|
|
116
117
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
118
|
+
if (globalStore.pendingBonus.shouldShowWarning) {
|
|
119
|
+
globalStore.pendingBonus.setOpen(true);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
117
122
|
createWithdrawalMutation.mutate({
|
|
118
123
|
input: {
|
|
119
124
|
amount: data.amount,
|
|
@@ -22,7 +22,7 @@ export function DisclaimerV2(props) {
|
|
|
22
22
|
})));
|
|
23
23
|
const checked = globalStore.termsOfUse.accepted && globalStore.responsibleGaming.accepted;
|
|
24
24
|
const [showWarning, setShowWarning] = useState(false);
|
|
25
|
-
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
|
|
25
|
+
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: "p-3xl lg:min-h-[80vh] flex h-full w-full flex-col items-start gap-y-4 overflow-y-auto lg:mx-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: "gap-3xl flex w-full items-center justify-center", 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) => {
|
|
26
26
|
if (e.checked === 'indeterminate')
|
|
27
27
|
return;
|
|
28
28
|
globalStore.termsOfUse.setAccepted(e.checked);
|
|
@@ -51,4 +51,4 @@ export function DisclaimerV2(props) {
|
|
|
51
51
|
disclaimer.close();
|
|
52
52
|
}, children: "Accept" })] })] }) })] }) }));
|
|
53
53
|
}
|
|
54
|
-
const Circle = () => (_jsx("div", { children: _jsx("div", { className: "border-brand-400
|
|
54
|
+
const Circle = () => (_jsx("div", { children: _jsx("div", { className: "border-brand-400 h-4.5 w-4.5 flex items-center justify-center rounded-full border", children: _jsx("div", { className: "bg-brand-400 h-3 w-3 rounded-full" }) }) }));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Image, {} from 'next/image';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
4
|
import { useShallow } from 'zustand/shallow';
|
|
4
5
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
5
6
|
import pagcorLogo from '../../images/pagcor.png';
|
|
@@ -29,7 +30,7 @@ export function ResponsibleGaming(props) {
|
|
|
29
30
|
globalStore.disclaimer.setOpen(true);
|
|
30
31
|
}
|
|
31
32
|
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:
|
|
33
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: twMerge('p-3xl flex h-full w-full flex-col items-start overflow-y-auto lg:mx-auto lg:min-h-[80vh] lg:w-[400px]', 'scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar:w-2 scrollbar-thumb:rounded-full'), children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[7.5rem]", 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: "gap-3xl mt-5 flex items-center justify-center", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[5.5rem] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[3.875rem] w-auto shrink-0", draggable: false })] })] }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { type: "button", className: "mt-3 py-2.5", onClick: () => {
|
|
33
34
|
api.setOpen(false);
|
|
34
35
|
}, children: "I Agree" })) })] }) })] }) }));
|
|
35
36
|
}
|
|
@@ -14,5 +14,5 @@ export function SignUpDefault(props) {
|
|
|
14
14
|
const signUpStore = useGlobalStore(useShallow((ctx) => ctx.signUp));
|
|
15
15
|
return (_jsx(SignUpDefaultPropsProvider, { value: props, children: _jsx(Dialog.Root, { open: signUpStore.open, onOpenChange: (details) => {
|
|
16
16
|
signUpStore.setOpen(details.open);
|
|
17
|
-
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('bg-bg-primary-alt p-3xl pb-4xl mx-auto h-full w-full items-start overflow-y-auto lg:h-
|
|
17
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('bg-bg-primary-alt p-3xl pb-4xl mx-auto h-full w-full items-start overflow-y-auto lg:min-h-[80vh] lg:w-[400px] lg:rounded-xl', 'scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar:w-2 scrollbar-thumb:rounded-full', props.className), children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsx(Suspense, { children: _jsx(SignUpDefaultForm, {}) })] }) })] }) }) }));
|
|
18
18
|
}
|
|
@@ -14,5 +14,5 @@ export function SignUpKYC(props) {
|
|
|
14
14
|
const signUpStore = useGlobalStore(useShallow((ctx) => ctx.signUp));
|
|
15
15
|
return (_jsx(SignUpKYCPropsProvider, { value: props, children: _jsx(Dialog.Root, { open: signUpStore.open, onOpenChange: (details) => {
|
|
16
16
|
signUpStore.setOpen(details.open);
|
|
17
|
-
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsx(Dialog.Content, { className: twMerge('bg-bg-primary-alt z-banner mx-auto flex size-full flex-col items-start overflow-y-auto
|
|
17
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsx(Dialog.Content, { className: twMerge('bg-bg-primary-alt z-banner p-3xl pb-4xl mx-auto flex size-full flex-col items-start overflow-y-auto lg:min-h-[80vh] lg:w-fit lg:rounded-xl', 'scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar:w-2 scrollbar-thumb:rounded-full', props.className), children: _jsxs("div", { className: "size-full lg:w-[400px]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[7.5rem]", draggable: false }), _jsx(Suspense, { children: _jsx(SignUpKYCForm, {}) })] }) }) })] }) }) }));
|
|
18
18
|
}
|
|
@@ -300,7 +300,7 @@ export function SignUpKYCForm() {
|
|
|
300
300
|
globalStore.responsibleGaming.setNext('SIGN_UP');
|
|
301
301
|
globalStore.signUp.setOpen(false);
|
|
302
302
|
}
|
|
303
|
-
}, children: "Responsible Gaming" }), ' ', "guidelines."] }), _jsx(Checkbox.HiddenInput, {})] }), _jsx(Field.ErrorText, { className: "ml-6 text-xs", children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: step1Form.formState.isSubmitting, children: "Create Account" })] }), _jsxs("div", { className: "gap-xs mt-6 flex w-full items-center justify-center text-sm", children: [_jsx("span", { className: "text-text-tertiary-600", children: "Already have an account?" }), _jsx("button", { type: "submit", className: "text-button-tertiary-fg font-semibold", onClick: () => {
|
|
303
|
+
}, children: "Responsible Gaming" }), ' ', "guidelines."] }), _jsx(Checkbox.HiddenInput, {})] }), _jsx(Field.ErrorText, { className: "ml-6 text-xs", children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: step1Form.formState.isSubmitting, children: "Create Account" })] }), _jsxs("div", { className: "gap-xs mt-6 flex w-full items-center justify-center text-sm pb-8", children: [_jsx("span", { className: "text-text-tertiary-600", children: "Already have an account?" }), _jsx("button", { type: "submit", className: "text-button-tertiary-fg font-semibold", onClick: () => {
|
|
304
304
|
dialog.setOpen(false);
|
|
305
305
|
globalStore.signIn.setOpen(true);
|
|
306
306
|
}, children: "Log In" })] })] })), step === 2 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "mt-xl text-center text-lg font-semibold", children: "Check your Phone" }), _jsxs("p", { className: "text-text-secondary-700 mt-xs text-center text-sm", children: ["We\u2019ve sent a verification code to your mobile number", ' ', _jsx("span", { className: "font-semibold", children: mobileNumberParser.format(step1Form.getValues('mobileNumber')) }), ' ', "via text"] }), _jsxs("form", { ref: form2Ref, className: "mt-5", onSubmit: step2Form.handleSubmit(async ({ verificationCode }) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Image, {} from 'next/image';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
4
|
import { useShallow } from 'zustand/shallow';
|
|
4
5
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
5
6
|
import pagcorLogo from '../../images/pagcor.png';
|
|
@@ -29,7 +30,7 @@ export function TermsAndConditions({ logo, siteName, content, ...props }) {
|
|
|
29
30
|
globalStore.disclaimer.setOpen(true);
|
|
30
31
|
}
|
|
31
32
|
globalStore.termsAndConditions.setNext(null);
|
|
32
|
-
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className:
|
|
33
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: twMerge('p-3xl flex h-full w-full flex-col items-start overflow-y-auto lg:mx-auto lg:min-h-[80vh] lg:w-[400px]', 'scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar:w-2 scrollbar-thumb:rounded-full'), children: [_jsx(Image, { src: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsxs(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: [siteName, " Terms of Use"] }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: content }), _jsxs("div", { className: "gap-3xl mt-5 flex items-center justify-center", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[5.5rem] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[3.875rem] w-auto shrink-0", draggable: false })] })] }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { type: "button", className: "mt-3 py-2.5", onClick: () => {
|
|
33
34
|
api.setOpen(false);
|
|
34
35
|
}, children: "I Agree" })) })] }) })] }) }));
|
|
35
36
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Image, {} from 'next/image';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
4
|
import { useShallow } from 'zustand/shallow';
|
|
4
5
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
5
6
|
import pagcorLogo from '../../images/pagcor.png';
|
|
@@ -29,7 +30,7 @@ export function TermsOfUse({ logo, siteName, content, ...props }) {
|
|
|
29
30
|
globalStore.disclaimer.setOpen(true);
|
|
30
31
|
}
|
|
31
32
|
globalStore.termsOfUse.setNext(null);
|
|
32
|
-
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className:
|
|
33
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: twMerge('p-3xl flex h-full w-full flex-col items-start overflow-y-auto lg:mx-auto lg:min-h-[80vh] lg:w-[400px]', 'scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar:w-2 scrollbar-thumb:rounded-full'), children: [_jsx(Image, { src: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsxs(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: [siteName, " Terms of Use"] }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: content }), _jsxs("div", { className: "gap-3xl mt-5 flex items-center justify-center", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[5.5rem] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[3.875rem] w-auto shrink-0", draggable: false })] })] }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { type: "button", className: "mt-3 py-2.5", onClick: () => {
|
|
33
34
|
api.setOpen(false);
|
|
34
35
|
}, children: "I Agree" })) })] }) })] }) }));
|
|
35
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const SITE_ID: string;
|
|
2
2
|
export declare const PLATFORM_ID: string;
|
|
3
3
|
export declare const PLATFORM_CODE: string;
|
|
4
|
-
export declare const ENVIRONMENT: "
|
|
4
|
+
export declare const ENVIRONMENT: "development" | "production";
|
|
5
5
|
export declare const INTERNALS__REPORT_WEB_VITALS: boolean;
|
|
@@ -44,19 +44,34 @@ export async function postTransformIdFrontImage(request) {
|
|
|
44
44
|
height: parsed.data.cropHeight,
|
|
45
45
|
})
|
|
46
46
|
.resize({
|
|
47
|
+
fit: 'contain',
|
|
47
48
|
width: 1200,
|
|
48
49
|
height: 757,
|
|
49
50
|
kernel: sharp.kernel.lanczos3,
|
|
50
51
|
withoutEnlargement: true,
|
|
51
52
|
})
|
|
52
53
|
.modulate({
|
|
53
|
-
brightness: 1.
|
|
54
|
-
saturation: 1.
|
|
54
|
+
brightness: 1.03,
|
|
55
|
+
saturation: 1.05,
|
|
56
|
+
})
|
|
57
|
+
.median(1)
|
|
58
|
+
.blur(0.3)
|
|
59
|
+
.sharpen({
|
|
60
|
+
sigma: 1,
|
|
61
|
+
m1: 0.5,
|
|
62
|
+
m2: 1.0,
|
|
63
|
+
x1: 2,
|
|
64
|
+
y2: 10,
|
|
65
|
+
y3: 20,
|
|
66
|
+
})
|
|
67
|
+
.webp({
|
|
68
|
+
effort: 6,
|
|
69
|
+
quality: 100,
|
|
70
|
+
alphaQuality: 100,
|
|
71
|
+
lossless: false,
|
|
72
|
+
nearLossless: false,
|
|
73
|
+
smartSubsample: true,
|
|
55
74
|
})
|
|
56
|
-
.median(3)
|
|
57
|
-
.blur()
|
|
58
|
-
.sharpen()
|
|
59
|
-
.webp()
|
|
60
75
|
.toBuffer();
|
|
61
76
|
return new NextResponse(cropped, {
|
|
62
77
|
headers: {
|
|
@@ -44,23 +44,34 @@ export async function postTransformSelfieImage(request) {
|
|
|
44
44
|
height: parsed.data.cropHeight,
|
|
45
45
|
})
|
|
46
46
|
.resize({
|
|
47
|
+
fit: 'contain',
|
|
47
48
|
width: 1200,
|
|
48
49
|
height: 1200,
|
|
49
50
|
kernel: sharp.kernel.lanczos3,
|
|
50
51
|
withoutEnlargement: true,
|
|
51
52
|
})
|
|
53
|
+
.modulate({
|
|
54
|
+
brightness: 1.03,
|
|
55
|
+
saturation: 1.05,
|
|
56
|
+
})
|
|
57
|
+
.median(1)
|
|
58
|
+
.blur(0.3)
|
|
52
59
|
.sharpen({
|
|
53
|
-
sigma: 1
|
|
54
|
-
m1:
|
|
55
|
-
m2:
|
|
60
|
+
sigma: 1,
|
|
61
|
+
m1: 0.5,
|
|
62
|
+
m2: 1.0,
|
|
63
|
+
x1: 2,
|
|
64
|
+
y2: 10,
|
|
65
|
+
y3: 20,
|
|
56
66
|
})
|
|
57
|
-
.
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
.webp({
|
|
68
|
+
effort: 6,
|
|
69
|
+
quality: 100,
|
|
70
|
+
alphaQuality: 100,
|
|
71
|
+
lossless: false,
|
|
72
|
+
nearLossless: false,
|
|
73
|
+
smartSubsample: true,
|
|
60
74
|
})
|
|
61
|
-
.median(3)
|
|
62
|
-
.blur()
|
|
63
|
-
.webp()
|
|
64
75
|
.toBuffer();
|
|
65
76
|
return new NextResponse(cropped, {
|
|
66
77
|
headers: {
|