@opexa/portal-components 0.0.829 → 0.0.830
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/useBypassKycChecker.d.ts +5 -0
- package/dist/client/hooks/useBypassKycChecker.js +14 -0
- package/dist/components/AccountInfo/GoogleDisconnect.d.ts +7 -0
- package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .js +191 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.js +126 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.js +10 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.js +12 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +17 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.js +2 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.js +41 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +13 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.js +91 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +5 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +3 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawalContext.d.ts +3 -3
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +2 -1
- package/dist/components/FavoriteGames/FavoriteGames.client.js +3 -1
- package/dist/components/Games/GamesCarousel.client.d.ts +2 -1
- package/dist/components/Games/GamesCarousel.client.js +3 -1
- package/dist/components/Games/GamesList.client.d.ts +2 -1
- package/dist/components/Games/GamesList.client.js +3 -1
- package/dist/components/GamesSearch/GamesSearch.d.ts +2 -1
- package/dist/components/GamesSearch/GamesSearch.js +3 -1
- package/dist/components/KYC/KYCVerificationStatus.lazy.js +4 -7
- package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
- package/dist/components/Search/Search.lazy.d.ts +2 -1
- package/dist/components/Search/Search.lazy.js +3 -1
- package/dist/icons/LinkBrokenIcon.d.ts +2 -0
- package/dist/icons/LinkBrokenIcon.js +4 -0
- package/dist/ui/Avatar/Avatar.d.ts +9 -9
- package/dist/ui/Avatar/avatar.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- 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/NumberInput/NumberInput.d.ts +24 -24
- package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
- package/dist/ui/Popover/Popover.d.ts +154 -154
- package/dist/ui/Popover/popover.recipe.d.ts +14 -14
- package/dist/ui/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- 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/dist/ui/Tooltip/Tooltip.d.ts +30 -30
- package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
- package/package.json +1 -1
- package/dist/components/Banner/Banner.client.d.ts +0 -12
- package/dist/components/Banner/Banner.client.js +0 -49
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +0 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +0 -12
- package/dist/components/SignIn/utils.d.ts +0 -8
- package/dist/components/SignIn/utils.js +0 -26
- package/dist/constants/Branches.d.ts +0 -2
- package/dist/constants/Branches.js +0 -42
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +0 -1
- package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
- package/dist/third-parties/FacebookPixel/index.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
- package/dist/third-parties/index.d.ts +0 -2
- package/dist/third-parties/index.js +0 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import invariant from 'tiny-invariant';
|
|
3
|
+
import { useShallow } from 'zustand/shallow';
|
|
4
|
+
import { useCreateQRPHDepositMutation } from '../../../../client/hooks/useCreateQRPHDepositMutation.js';
|
|
5
|
+
import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
|
|
6
|
+
import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
|
|
7
|
+
import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
|
|
8
|
+
export function useQRPHDeposit() {
|
|
9
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
10
|
+
kycVerificationStatus: ctx.kycVerificationStatus,
|
|
11
|
+
})));
|
|
12
|
+
const inputRef = useRef(null);
|
|
13
|
+
const [deposit, setDeposit] = useState(null);
|
|
14
|
+
const [status, setStatus] = useState('idle');
|
|
15
|
+
const verificationQuery = useMemberVerificationQuery();
|
|
16
|
+
const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
|
|
17
|
+
const mutation = useCreateQRPHDepositMutation({
|
|
18
|
+
onMutate() {
|
|
19
|
+
setStatus('generating-qr-code');
|
|
20
|
+
},
|
|
21
|
+
onSuccess(data) {
|
|
22
|
+
invariant(data.qrCode);
|
|
23
|
+
setStatus('qr-code-generated');
|
|
24
|
+
setDeposit(data);
|
|
25
|
+
},
|
|
26
|
+
onError() {
|
|
27
|
+
setStatus('failed');
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const query = useDepositQuery(deposit?.id, {
|
|
31
|
+
enabled: !!deposit && status === 'qr-code-generated',
|
|
32
|
+
refetchInterval: (ctx) => {
|
|
33
|
+
if (ctx.state.data?.status === 'APPROVED' ||
|
|
34
|
+
ctx.state.data?.status === 'CONFIRMED' ||
|
|
35
|
+
ctx.state.data?.status === 'CANCELLED' ||
|
|
36
|
+
ctx.state.data?.status === 'REJECTED' ||
|
|
37
|
+
ctx.state.data?.status === 'FAILED') {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
return 2000;
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (query.data?.status === 'APPROVED' ||
|
|
45
|
+
query.data?.status === 'CONFIRMED') {
|
|
46
|
+
setStatus('confirmed');
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (query.data?.status === 'CANCELLED' ||
|
|
50
|
+
query.data?.status === 'REJECTED' ||
|
|
51
|
+
query.data?.status === 'FAILED') {
|
|
52
|
+
setStatus('failed');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}, [query.data?.status]);
|
|
56
|
+
const generateQRCode = async (input) => {
|
|
57
|
+
if (verificationStatus === 'PENDING' ||
|
|
58
|
+
verificationStatus === 'UNVERIFIED' ||
|
|
59
|
+
verificationStatus === 'REJECTED' ||
|
|
60
|
+
verificationStatus === 'CREATED') {
|
|
61
|
+
globalStore.kycVerificationStatus.setOpen(true);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
inputRef.current = input;
|
|
65
|
+
mutation.mutate({
|
|
66
|
+
amount: input.amount,
|
|
67
|
+
promo: input.promo ?? undefined,
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const regenerateQRCode = async () => {
|
|
71
|
+
invariant(inputRef.current);
|
|
72
|
+
mutation.reset();
|
|
73
|
+
await new Promise((resolve) => setTimeout(resolve, 1));
|
|
74
|
+
mutation.mutate({
|
|
75
|
+
amount: inputRef.current.amount,
|
|
76
|
+
promo: inputRef.current.promo ?? undefined,
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const reset = () => {
|
|
80
|
+
setStatus('idle');
|
|
81
|
+
setDeposit(null);
|
|
82
|
+
inputRef.current = null;
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
status,
|
|
86
|
+
deposit,
|
|
87
|
+
generateQRCode,
|
|
88
|
+
regenerateQRCode,
|
|
89
|
+
reset,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type BypassDomainConfig } from '../../client/hooks/useBypassKycChecker';
|
|
1
2
|
export interface DepositWithdrawalProps {
|
|
2
3
|
/** @default "/terms-of-use" */
|
|
3
4
|
termsOfUseUrl?: string;
|
|
@@ -8,6 +9,9 @@ export interface DepositWithdrawalProps {
|
|
|
8
9
|
allowUnverifiedAccounts?: boolean;
|
|
9
10
|
libanganRedirectionUrl?: string;
|
|
10
11
|
hasPrivacyPolicyAndTermsOfUse?: boolean;
|
|
11
|
-
|
|
12
|
+
bypassDomains?: BypassDomainConfig[];
|
|
13
|
+
}
|
|
14
|
+
export interface ExtendedDepositWithdrawalProps extends DepositWithdrawalProps {
|
|
15
|
+
bypassDepositKycCheck: boolean;
|
|
12
16
|
}
|
|
13
17
|
export declare function DepositWithdrawal(props: DepositWithdrawalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,7 @@ import { useEffect } from 'react';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { useShallow } from 'zustand/shallow';
|
|
6
6
|
import { useBonusesQuery } from '../../client/hooks/useBonusesQuery.js';
|
|
7
|
+
import { useBypassKycChecker, } from '../../client/hooks/useBypassKycChecker.js';
|
|
7
8
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
8
9
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
9
10
|
import { useWalletQuery } from '../../client/hooks/useWalletQuery.js';
|
|
@@ -19,10 +20,12 @@ import { DepositWithdrawalPropsProvider } from './DepositWithdrawalContext.js';
|
|
|
19
20
|
import { HasPendingBonuses } from './HasPendingBonuses.js';
|
|
20
21
|
import { Withdrawal } from './Withdrawal/Withdrawal.js';
|
|
21
22
|
export function DepositWithdrawal(props) {
|
|
23
|
+
const bypassDepositKycCheck = useBypassKycChecker(props.bypassDomains);
|
|
22
24
|
const { hasPrivacyPolicyAndTermsOfUse = true, ...restProps } = props;
|
|
23
25
|
const mergedProps = {
|
|
24
26
|
...restProps,
|
|
25
27
|
hasPrivacyPolicyAndTermsOfUse,
|
|
28
|
+
bypassDepositKycCheck,
|
|
26
29
|
};
|
|
27
30
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
28
31
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ExtendedDepositWithdrawalProps } from './DepositWithdrawal.lazy';
|
|
2
2
|
export declare const DepositWithdrawalPropsProvider: (props: {
|
|
3
|
-
value:
|
|
3
|
+
value: ExtendedDepositWithdrawalProps;
|
|
4
4
|
} & {
|
|
5
5
|
children?: import("react").ReactNode | undefined;
|
|
6
|
-
}) => React.ReactNode, useDepositWithdrawalPropsContext: () =>
|
|
6
|
+
}) => React.ReactNode, useDepositWithdrawalPropsContext: () => ExtendedDepositWithdrawalProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const OnlineBankDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
3
|
view: "form" | "vca";
|
|
4
|
-
status: "
|
|
4
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
5
5
|
verify: () => void;
|
|
6
6
|
reset: () => void;
|
|
7
7
|
deposit: import("../../../../types").Deposit | null;
|
|
@@ -14,7 +14,7 @@ export declare const OnlineBankDepositContext: (props: {
|
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useOnlineBankDepositContext: () => {
|
|
16
16
|
view: "form" | "vca";
|
|
17
|
-
status: "
|
|
17
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
18
18
|
verify: () => void;
|
|
19
19
|
reset: () => void;
|
|
20
20
|
deposit: import("../../../../types").Deposit | null;
|
|
@@ -2,7 +2,7 @@ import type { Deposit } from '../../../../types';
|
|
|
2
2
|
export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
|
|
3
3
|
export declare function useOnlineBankDeposit(): {
|
|
4
4
|
view: "form" | "vca";
|
|
5
|
-
status: "
|
|
5
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
6
|
verify: () => void;
|
|
7
7
|
reset: () => void;
|
|
8
8
|
deposit: Deposit | null;
|
package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const QRPHDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
3
|
view: "form" | "qrCode";
|
|
4
|
-
status: "
|
|
4
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
5
5
|
verify: () => void;
|
|
6
6
|
reset: () => void;
|
|
7
7
|
deposit: import("../../../../types").Deposit | null;
|
|
@@ -14,7 +14,7 @@ export declare const QRPHDepositContext: (props: {
|
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useQRPHDepositContext: () => {
|
|
16
16
|
view: "form" | "qrCode";
|
|
17
|
-
status: "
|
|
17
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
18
18
|
verify: () => void;
|
|
19
19
|
reset: () => void;
|
|
20
20
|
deposit: import("../../../../types").Deposit | null;
|
|
@@ -2,7 +2,7 @@ import type { Deposit } from '../../../../types';
|
|
|
2
2
|
export type UseQRPHDepositReturn = ReturnType<typeof useQRPHDeposit>;
|
|
3
3
|
export declare function useQRPHDeposit(): {
|
|
4
4
|
view: "form" | "qrCode";
|
|
5
|
-
status: "
|
|
5
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
6
|
verify: () => void;
|
|
7
7
|
reset: () => void;
|
|
8
8
|
deposit: Deposit | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
import { type BypassDomainConfig } from '../../client/hooks/useBypassKycChecker';
|
|
2
3
|
interface ClassNameEntries {
|
|
3
4
|
root?: string;
|
|
4
5
|
thumbnailRoot?: string;
|
|
@@ -8,7 +9,7 @@ export interface FavoriteGamesProps {
|
|
|
8
9
|
className?: string | ClassNameEntries;
|
|
9
10
|
/** @default 'Favorite Games' */
|
|
10
11
|
heading?: string | ReactNode;
|
|
11
|
-
|
|
12
|
+
bypassDomains?: BypassDomainConfig[];
|
|
12
13
|
}
|
|
13
14
|
export declare function FavoriteGames__client(props: FavoriteGamesProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
15
|
export {};
|
|
@@ -6,6 +6,7 @@ import Image from 'next/image';
|
|
|
6
6
|
import { useCallback, useEffect, useState } from 'react';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
8
|
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
9
|
+
import { useBypassKycChecker, } from '../../client/hooks/useBypassKycChecker.js';
|
|
9
10
|
import { useFavoriteGamesQuery } from '../../client/hooks/useFavoriteGamesQuery.js';
|
|
10
11
|
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
11
12
|
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
@@ -18,6 +19,7 @@ import { Button } from '../../ui/Button/index.js';
|
|
|
18
19
|
import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
|
|
19
20
|
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
20
21
|
export function FavoriteGames__client(props) {
|
|
22
|
+
const isBypass = useBypassKycChecker(props.bypassDomains);
|
|
21
23
|
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
22
24
|
align: 'start',
|
|
23
25
|
slidesToScroll: 3,
|
|
@@ -50,7 +52,7 @@ export function FavoriteGames__client(props) {
|
|
|
50
52
|
const classNames = isString(props.className)
|
|
51
53
|
? { root: props.className }
|
|
52
54
|
: (props.className ?? {});
|
|
53
|
-
return (_jsxs("div", { className: classNames.root, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Favorite Games' }), _jsx("div", { className: "grow" }), _jsx("div", { className: "flex items-center justify-center gap-xl", children: _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", onClick: onPrevButtonClick, disabled: prevBtnDisabled, "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", onClick: onNextButtonClick, disabled: nextBtnDisabled, "aria-label": "Next", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] }) })] }), _jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col grid-rows-1 gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md'), children: games.map((game) => (_jsx(Item, { bypassKycCheck:
|
|
55
|
+
return (_jsxs("div", { className: classNames.root, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Favorite Games' }), _jsx("div", { className: "grow" }), _jsx("div", { className: "flex items-center justify-center gap-xl", children: _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", onClick: onPrevButtonClick, disabled: prevBtnDisabled, "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", onClick: onNextButtonClick, disabled: nextBtnDisabled, "aria-label": "Next", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] }) })] }), _jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsx("div", { className: twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col grid-rows-1 gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md'), children: games.map((game) => (_jsx(Item, { bypassKycCheck: isBypass, game: game, className: {
|
|
54
56
|
thumbnailRoot: classNames.thumbnailRoot,
|
|
55
57
|
thumbnailTitle: classNames.thumbnailTitle,
|
|
56
58
|
} }, game.id))) }) })] }));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ImageProps } from 'next/image';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
+
import { type BypassDomainConfig } from '../../client/hooks/useBypassKycChecker';
|
|
3
4
|
import type { GamesInput__Next } from '../../services/cmsPortal';
|
|
4
5
|
import type { GameProvider } from '../../types';
|
|
5
6
|
interface ClassNameEntries {
|
|
@@ -24,7 +25,7 @@ export interface GamesCarouselProps {
|
|
|
24
25
|
sort?: GamesInput__Next['sort'];
|
|
25
26
|
className?: string | ClassNameEntries;
|
|
26
27
|
fallbackThumbnails?: Partial<Record<GameProvider, ImageProps['src']>>;
|
|
27
|
-
|
|
28
|
+
bypassDomains?: BypassDomainConfig[];
|
|
28
29
|
}
|
|
29
30
|
export declare function GamesCarousel__client(props: GamesCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export {};
|
|
@@ -5,6 +5,7 @@ import { isString } from 'lodash-es';
|
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import { useCallback, useEffect, useState } from 'react';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
|
+
import { useBypassKycChecker, } from '../../client/hooks/useBypassKycChecker.js';
|
|
8
9
|
import { useGamesQuery } from '../../client/hooks/useGamesQuery.js';
|
|
9
10
|
import { ArrowLeftIcon } from '../../icons/ArrowLeftIcon.js';
|
|
10
11
|
import { ArrowRightIcon } from '../../icons/ArrowRightIcon.js';
|
|
@@ -16,6 +17,7 @@ import { Empty } from '../shared/Empty.js';
|
|
|
16
17
|
import { Game } from './Game.js';
|
|
17
18
|
import { GameContext, GamesPropsContext } from './GamesContext.js';
|
|
18
19
|
export function GamesCarousel__client(props) {
|
|
20
|
+
const isBypass = useBypassKycChecker(props.bypassDomains);
|
|
19
21
|
const numOfRows = props.numOfRows ?? 1;
|
|
20
22
|
const gamesQuery = useGamesQuery({
|
|
21
23
|
first: (numOfRows + 1) * 6,
|
|
@@ -63,7 +65,7 @@ export function GamesCarousel__client(props) {
|
|
|
63
65
|
? 'grid-rows-3'
|
|
64
66
|
: numOfRows === 2
|
|
65
67
|
? 'grid-rows-2'
|
|
66
|
-
: 'grid-rows-1'), children: games.map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, { bypassKycCheck:
|
|
68
|
+
: 'grid-rows-1'), children: games.map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, { bypassKycCheck: isBypass, badge: props.badge, className: {
|
|
67
69
|
root: classNames.thumbnailRoot,
|
|
68
70
|
title: classNames.thumbnailTitle,
|
|
69
71
|
} }) }, game.id))) }) }))] }) }));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ImageProps } from 'next/image';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
+
import { type BypassDomainConfig } from '../../client/hooks/useBypassKycChecker';
|
|
3
4
|
import type { GamesInput__Next } from '../../services/cmsPortal';
|
|
4
5
|
import type { GameProvider } from '../../types';
|
|
5
6
|
interface ClassNameEntries {
|
|
@@ -24,7 +25,7 @@ export interface GamesListProps {
|
|
|
24
25
|
className?: string | ClassNameEntries;
|
|
25
26
|
pagination?: 'lazy-load' | 'paginated';
|
|
26
27
|
fallbackThumbnails?: Partial<Record<GameProvider, ImageProps['src']>>;
|
|
27
|
-
|
|
28
|
+
bypassDomains?: BypassDomainConfig[];
|
|
28
29
|
}
|
|
29
30
|
export declare function GamesList__client(props: GamesListProps): import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export {};
|
|
@@ -4,6 +4,7 @@ import { isString, noop } from 'lodash-es';
|
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
|
+
import { useBypassKycChecker, } from '../../client/hooks/useBypassKycChecker.js';
|
|
7
8
|
import { useGamesQuery } from '../../client/hooks/useGamesQuery.js';
|
|
8
9
|
import { useInfiniteQueryHelper } from '../../client/hooks/useInfiniteQueryHelper.js';
|
|
9
10
|
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
@@ -16,6 +17,7 @@ import { Game } from './Game.js';
|
|
|
16
17
|
import { GameContext, GamesPropsContext } from './GamesContext.js';
|
|
17
18
|
import { GamesPagination } from './GamesPagination.js';
|
|
18
19
|
export function GamesList__client(props) {
|
|
20
|
+
const isBypass = useBypassKycChecker(props.bypassDomains);
|
|
19
21
|
const { pagination = 'lazy-load' } = props;
|
|
20
22
|
const perPage = props.first ?? 24;
|
|
21
23
|
const { loading, availableRows, totalRows, totalAvailableRows, hasNextPage, next, } = useInfiniteQueryHelper(useGamesQuery, {
|
|
@@ -50,7 +52,7 @@ export function GamesList__client(props) {
|
|
|
50
52
|
? props.heading.replaceAll('OneAPI', '')
|
|
51
53
|
: (props.heading ?? 'Games') }), props.viewGameProvidersUrl && (_jsxs(Link, { href: props.viewGameProvidersUrl, className: "order-1 flex items-center gap-sm font-semibold text-button-tertiary-fg text-lg lg:order-none lg:text-sm", children: [_jsx(ChevronLeftIcon, { className: "size-5" }), "Back to all Providers"] }))] }), totalRows <= 0 && (_jsx(Empty, { icon: loading ? SpinnerIcon : GamingPad01Icon, title: loading ? 'Just a moment' : 'No games', message: loading
|
|
52
54
|
? 'Fetching latest games...'
|
|
53
|
-
: 'No game is currently available. Please check back later', className: "mt-lg" })), totalRows >= 1 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: (pagination === 'paginated' ? paginatedRows : availableRows).map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, { bypassKycCheck:
|
|
55
|
+
: 'No game is currently available. Please check back later', className: "mt-lg" })), totalRows >= 1 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: (pagination === 'paginated' ? paginatedRows : availableRows).map((game) => (_jsx(GameContext, { value: game, children: _jsx(Game, { bypassKycCheck: isBypass, badge: props.badge, className: {
|
|
54
56
|
root: classNames.thumbnailRoot,
|
|
55
57
|
title: classNames.thumbnailTitle,
|
|
56
58
|
} }) }, game.id))) }), _jsx("div", { className: "mt-2xl flex flex-col items-center lg:mt-3xl", children: pagination === 'paginated' && totalRows > 0 ? (_jsx(GamesPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (page) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type BypassDomainConfig } from '../../client/hooks/useBypassKycChecker';
|
|
1
2
|
import type { GamesInput__Next } from '../../services/cmsPortal';
|
|
2
3
|
export interface ClassNameEntries {
|
|
3
4
|
root?: string;
|
|
@@ -11,7 +12,7 @@ interface GamesSearchProps {
|
|
|
11
12
|
sort?: GamesInput__Next['sort'];
|
|
12
13
|
className?: string | ClassNameEntries;
|
|
13
14
|
placeholder?: string;
|
|
14
|
-
|
|
15
|
+
bypassDomains?: BypassDomainConfig[];
|
|
15
16
|
}
|
|
16
17
|
export declare function GamesSearch(props: GamesSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export {};
|
|
@@ -5,6 +5,7 @@ import { isString } from 'lodash-es';
|
|
|
5
5
|
import Image from 'next/image';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
|
+
import { useBypassKycChecker, } from '../../client/hooks/useBypassKycChecker.js';
|
|
8
9
|
import { useGamesQuery } from '../../client/hooks/useGamesQuery.js';
|
|
9
10
|
import { SearchLgIcon } from '../../icons/SearchLgIcon.js';
|
|
10
11
|
import { Button } from '../../ui/Button/index.js';
|
|
@@ -14,6 +15,7 @@ import { Presence } from '../../ui/Presence/index.js';
|
|
|
14
15
|
import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
|
|
15
16
|
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
16
17
|
export function GamesSearch(props) {
|
|
18
|
+
const isBypass = useBypassKycChecker(props.bypassDomains);
|
|
17
19
|
const [search, setSearch] = useState('');
|
|
18
20
|
const gamesQuery = useGamesQuery({
|
|
19
21
|
first: props.first ?? 18,
|
|
@@ -44,7 +46,7 @@ export function GamesSearch(props) {
|
|
|
44
46
|
api.setInputValue('');
|
|
45
47
|
api.focus();
|
|
46
48
|
}, children: "Clear" }));
|
|
47
|
-
} })] }), _jsx(Portal, { children: _jsx(Combobox.Context, { children: (api) => (_jsxs(_Fragment, { children: [_jsx(Presence, { present: api.open, children: _jsx("div", { className: "fixed inset-0 z-40 bg-black/50 backdrop-blur-sm", onClick: () => api.setOpen(false) }) }), _jsx(Combobox.Positioner, { children: search.trim().length > 0 && (_jsx(Combobox.Content, { className: "z-50 max-h-[33.25rem] overflow-y-auto p-0", children: search.length >= 1 && search.length <= 2 ? (_jsx(Alert, { message: "Search requires at least 3 characters." })) : (_jsxs(_Fragment, { children: [games.length <= 0 && (_jsx(Alert, { message: "No results found" })), games.length > 0 && (_jsxs("div", { className: "p-xl", children: [_jsx(Combobox.Context, { children: (api) => (_jsx("div", { className: "grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: games.map((game) => (_jsxs(GameLaunchTrigger, { bypassKycCheck:
|
|
49
|
+
} })] }), _jsx(Portal, { children: _jsx(Combobox.Context, { children: (api) => (_jsxs(_Fragment, { children: [_jsx(Presence, { present: api.open, children: _jsx("div", { className: "fixed inset-0 z-40 bg-black/50 backdrop-blur-sm", onClick: () => api.setOpen(false) }) }), _jsx(Combobox.Positioner, { children: search.trim().length > 0 && (_jsx(Combobox.Content, { className: "z-50 max-h-[33.25rem] overflow-y-auto p-0", children: search.length >= 1 && search.length <= 2 ? (_jsx(Alert, { message: "Search requires at least 3 characters." })) : (_jsxs(_Fragment, { children: [games.length <= 0 && (_jsx(Alert, { message: "No results found" })), games.length > 0 && (_jsxs("div", { className: "p-xl", children: [_jsx(Combobox.Context, { children: (api) => (_jsx("div", { className: "grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: games.map((game) => (_jsxs(GameLaunchTrigger, { bypassKycCheck: isBypass, game: game, onClick: () => {
|
|
48
50
|
api.setOpen(false);
|
|
49
51
|
}, className: twMerge('block w-full shadow-sm', classNames.thumbnailRoot), children: [_jsx(Image, { src: getGameImageUrl({
|
|
50
52
|
reference: game.reference,
|
|
@@ -19,18 +19,15 @@ export function KYCVerificationStatus() {
|
|
|
19
19
|
const icons = status === 'PENDING' ? bellIcon : alertIcon;
|
|
20
20
|
return (_jsx(Dialog.Root, { open: globalStore.kycVerificationStatus.open, onOpenChange: (details) => {
|
|
21
21
|
globalStore.kycVerificationStatus.setOpen(details.open);
|
|
22
|
-
}, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit w-[450px] overflow-y-auto rounded-lg bg-bg-primary", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mb-3xl grid h-[200px] w-full place-items-center rounded-xl bg-radial from-40% from-button-primary-bg to-bg-brand-solid", children: _jsx(Image, { src: icons, alt: "icon", className: "w-60 object-contain", draggable: false, width: 120, height: 120 }) }), _jsxs("h1", { className: "font-semibold text-lg text-white", children: [status === 'PENDING' && 'Verification in Progress', status === 'REJECTED' && 'Verification Rejected', status === 'UNVERIFIED'
|
|
23
|
-
(status === 'CREATED' && 'Verification Required')] }), _jsxs("p", { className: "mb-4xl text-[#94969C] text-base", children: [status === 'PENDING' &&
|
|
22
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit w-[450px] overflow-y-auto rounded-lg bg-bg-primary", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mb-3xl grid h-[200px] w-full place-items-center rounded-xl bg-radial from-40% from-button-primary-bg to-bg-brand-solid", children: _jsx(Image, { src: icons, alt: "icon", className: "w-60 object-contain", draggable: false, width: 120, height: 120 }) }), _jsxs("h1", { className: "font-semibold text-lg text-white", children: [status === 'PENDING' && 'Verification in Progress', status === 'REJECTED' && 'Verification Rejected', status === 'UNVERIFIED' && 'Verification Required'] }), _jsxs("p", { className: "mb-4xl text-[#94969C] text-base", children: [status === 'PENDING' &&
|
|
24
23
|
`Your account verification is still under review. Please wait
|
|
25
24
|
until it's approved before you can continue playing or
|
|
26
25
|
depositing.`, status === 'REJECTED' &&
|
|
27
|
-
'Your account verification was not approved. Please resubmit your verification to regain full access.', status === 'UNVERIFIED'
|
|
28
|
-
(status === '
|
|
29
|
-
'Your account is not yet verified. Please complete the verification process to continue playing or depositing.')] }), _jsxs(Button, { variant: "solid", className: twMerge('mb-2 w-full', status === 'PENDING' && 'hidden'), onClick: () => {
|
|
26
|
+
'Your account verification was not approved. Please resubmit your verification to regain full access.', status === 'UNVERIFIED' &&
|
|
27
|
+
'Your account is not yet verified. Please complete the verification process to continue playing or depositing.'] }), _jsxs(Button, { variant: "solid", className: twMerge('mb-2 w-full', status === 'PENDING' && 'hidden'), onClick: () => {
|
|
30
28
|
globalStore.kycVerificationStatus.setOpen(false);
|
|
31
29
|
globalStore.kyc.setOpen(true);
|
|
32
|
-
}, children: [status === 'REJECTED' && 'Resubmit Verification', status === 'UNVERIFIED'
|
|
33
|
-
(status === 'CREATED' && 'Verify Now')] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
30
|
+
}, children: [status === 'REJECTED' && 'Resubmit Verification', status === 'UNVERIFIED' && 'Verify Now'] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
34
31
|
globalStore.kycVerificationStatus.setOpen(false);
|
|
35
32
|
}, children: "Close" })] }) }) })] }) }));
|
|
36
33
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { addHours } from 'date-fns';
|
|
3
3
|
import { clamp } from 'lodash-es';
|
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
|
4
5
|
import { useLocalStorage, useTimeout } from 'usehooks-ts';
|
|
5
6
|
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
6
7
|
export function CXDTokenObserver() {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const [cxd, setCxd, removeCxd] = useLocalStorage('
|
|
8
|
+
const searchParams = useSearchParams();
|
|
9
|
+
const cxdToken = searchParams.get('cxd');
|
|
10
|
+
const accountQuery = useAccountQuery();
|
|
11
|
+
const account = accountQuery.data;
|
|
12
|
+
const [cxd, setCxd, removeCxd] = useLocalStorage('WebPortalCellxpertCxd', null);
|
|
12
13
|
const now = new Date();
|
|
14
|
+
const shouldTimeoutRun = cxdToken && account;
|
|
13
15
|
const removeCxdUntilInMs = cxd?.timestamp
|
|
14
16
|
? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
|
|
15
17
|
: 0;
|
|
16
18
|
useTimeout(() => {
|
|
17
|
-
const isSame = cxd?.cxd ===
|
|
19
|
+
const isSame = cxd?.cxd === cxdToken;
|
|
18
20
|
if (!isSame) {
|
|
19
21
|
const extendedTimestamp = addHours(new Date(), 6).getTime();
|
|
20
22
|
setCxd({
|
|
21
|
-
cxd:
|
|
23
|
+
cxd: cxdToken,
|
|
22
24
|
timestamp: extendedTimestamp,
|
|
23
25
|
});
|
|
24
26
|
}
|
|
25
|
-
},
|
|
26
|
-
useTimeout(() =>
|
|
27
|
-
removeCxd();
|
|
28
|
-
}, account ? removeCxdUntilInMs : null);
|
|
27
|
+
}, shouldTimeoutRun ? 100 : null);
|
|
28
|
+
useTimeout(() => removeCxd(), shouldTimeoutRun ? removeCxdUntilInMs : null);
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ImageProps } from 'next/image';
|
|
2
|
+
import { type BypassDomainConfig } from '../../client/hooks/useBypassKycChecker';
|
|
2
3
|
import type { GameProvider, GameProviderData, GameType } from '../../types';
|
|
3
4
|
export interface ClassNameEntries {
|
|
4
5
|
root?: string;
|
|
@@ -26,6 +27,6 @@ export interface SearchProps {
|
|
|
26
27
|
viewGamesUrl?: string | ((gameProvider: GameProviderData) => string);
|
|
27
28
|
gameProviderImages?: Partial<Record<GameProvider, ImageProps['src']>>;
|
|
28
29
|
placeholder?: string;
|
|
29
|
-
|
|
30
|
+
bypassDomains?: BypassDomainConfig[];
|
|
30
31
|
}
|
|
31
32
|
export declare function Search(props: SearchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,7 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
8
|
import { useDebounceCallback } from 'usehooks-ts';
|
|
9
9
|
import { useShallow } from 'zustand/shallow';
|
|
10
|
+
import { useBypassKycChecker, } from '../../client/hooks/useBypassKycChecker.js';
|
|
10
11
|
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
11
12
|
import { useGamesQuery } from '../../client/hooks/useGamesQuery.js';
|
|
12
13
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
@@ -29,6 +30,7 @@ function lookup(value, compare) {
|
|
|
29
30
|
.includes(compare.toLowerCase().replace(/\s+/g, ''));
|
|
30
31
|
}
|
|
31
32
|
export function Search(props) {
|
|
33
|
+
const isBypass = useBypassKycChecker(props.bypassDomains);
|
|
32
34
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
33
35
|
search: ctx.search,
|
|
34
36
|
})));
|
|
@@ -77,7 +79,7 @@ export function Search(props) {
|
|
|
77
79
|
}, children: "Clear" }) })] }) }), _jsx("div", { className: "flex max-h-[85dvh] min-h-0 flex-1 flex-col", children: _jsx("div", { className: "mt-2xl p-xl pb-3xl lg:mt-2 lg:max-h-[41rem] lg:overflow-y-auto lg:rounded-xl lg:border lg:border-border-primary lg:bg-bg-primary", children: search.length <= 0 ? (_jsx(Alert, { message: "Search for your favorite game or provider." })) : search.length === 1 ? (_jsx(Alert, { message: "Search requires at least 2 characters." })) : (_jsxs(_Fragment, { children: [empty && _jsx(Alert, { message: "No results found" }), !empty && (_jsxs(_Fragment, { children: [gameProviders.length > 0 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "font-semibold text-lg", children: "Providers" }), _jsx("div", { className: "mt-3.5 mb-3xl grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: gameProviders.map((provider) => (_jsx(Link, { href: viewGamesUrl(provider), "aria-label": `View ${provider.name} games`, className: twMerge('flex h-14 w-full items-center rounded-md bg-brand-800', classNames.providerThumbnailRoot), onClick: () => {
|
|
78
80
|
globalStore.search.setOpen(false);
|
|
79
81
|
}, children: _jsx(Image, { src: props.gameProviderImages?.[provider.id] ??
|
|
80
|
-
provider.logo, alt: "", width: 100, height: 50, className: twMerge('mx-auto h-auto w-full', classNames.providerThumbnailImage) }) }, provider.id))) })] })), games.length > 0 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "font-semibold text-lg", children: "Games" }), _jsx("div", { className: "mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: games.map((game) => (_jsxs(GameLaunchTrigger, { bypassKycCheck:
|
|
82
|
+
provider.logo, alt: "", width: 100, height: 50, className: twMerge('mx-auto h-auto w-full', classNames.providerThumbnailImage) }) }, provider.id))) })] })), games.length > 0 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "font-semibold text-lg", children: "Games" }), _jsx("div", { className: "mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: games.map((game) => (_jsxs(GameLaunchTrigger, { bypassKycCheck: isBypass, game: game, className: twMerge('block w-full shadow-sm', classNames.gameThumbnailRoot), onClick: () => {
|
|
81
83
|
globalStore.search.setOpen(false);
|
|
82
84
|
}, children: [_jsx(Image, { src: getGameImageUrl({
|
|
83
85
|
reference: game.reference,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function LinkBrokenIcon(props) {
|
|
3
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", ...props, children: _jsx("path", { d: "M8.5 15.5L15.5 8.49998M9 4V2M15 20V22M4 9H2M20 15H22M4.91421 4.91421L3.5 3.5M19.0858 19.0857L20.5 20.4999M12 17.6568L9.87871 19.7781C8.31662 21.3402 5.78396 21.3402 4.22186 19.7781C2.65976 18.216 2.65976 15.6833 4.22186 14.1212L6.34318 11.9999M17.6569 11.9999L19.7782 9.87859C21.3403 8.31649 21.3403 5.78383 19.7782 4.22174C18.2161 2.65964 15.6835 2.65964 14.1214 4.22174L12 6.34306", stroke: "#FEDF89", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
4
|
+
}
|
|
@@ -6,21 +6,21 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
6
6
|
fallback: string;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
}, Record<"image" | "
|
|
9
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, undefined, {
|
|
10
10
|
size: {
|
|
11
11
|
md: {
|
|
12
12
|
root: string;
|
|
13
13
|
fallback: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
}, Record<"image" | "
|
|
16
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
17
17
|
size: {
|
|
18
18
|
md: {
|
|
19
19
|
root: string;
|
|
20
20
|
fallback: string;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
}, Record<"image" | "
|
|
23
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
24
24
|
export declare const Image: import("react").ComponentType<import("@ark-ui/react").Assign<Avatar.ImageProps & import("react").RefAttributes<HTMLImageElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
25
25
|
size: {
|
|
26
26
|
md: {
|
|
@@ -28,21 +28,21 @@ export declare const Image: import("react").ComponentType<import("@ark-ui/react"
|
|
|
28
28
|
fallback: string;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
}, Record<"image" | "
|
|
31
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, undefined, {
|
|
32
32
|
size: {
|
|
33
33
|
md: {
|
|
34
34
|
root: string;
|
|
35
35
|
fallback: string;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
-
}, Record<"image" | "
|
|
38
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
39
39
|
size: {
|
|
40
40
|
md: {
|
|
41
41
|
root: string;
|
|
42
42
|
fallback: string;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
}, Record<"image" | "
|
|
45
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
46
46
|
export declare const Fallback: import("react").ComponentType<import("@ark-ui/react").Assign<Avatar.FallbackProps & import("react").RefAttributes<HTMLSpanElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
47
47
|
size: {
|
|
48
48
|
md: {
|
|
@@ -50,19 +50,19 @@ export declare const Fallback: import("react").ComponentType<import("@ark-ui/rea
|
|
|
50
50
|
fallback: string;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
}, Record<"image" | "
|
|
53
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, undefined, {
|
|
54
54
|
size: {
|
|
55
55
|
md: {
|
|
56
56
|
root: string;
|
|
57
57
|
fallback: string;
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
}, Record<"image" | "
|
|
60
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
61
61
|
size: {
|
|
62
62
|
md: {
|
|
63
63
|
root: string;
|
|
64
64
|
fallback: string;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
-
}, Record<"image" | "
|
|
67
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
68
68
|
export declare const Context: (props: Avatar.ContextProps) => import("react").ReactNode;
|
|
@@ -5,18 +5,18 @@ export declare const avatarRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
5
5
|
fallback: string;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
}, Record<"image" | "
|
|
8
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, undefined, {
|
|
9
9
|
size: {
|
|
10
10
|
md: {
|
|
11
11
|
root: string;
|
|
12
12
|
fallback: string;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
}, Record<"image" | "
|
|
15
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
16
16
|
size: {
|
|
17
17
|
md: {
|
|
18
18
|
root: string;
|
|
19
19
|
fallback: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
}, Record<"image" | "
|
|
22
|
+
}, Record<"image" | "root" | "fallback", string | string[]>, undefined, unknown, unknown, undefined>>;
|