@opexa/portal-components 0.0.640 → 0.0.641
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/components/KYC/KYCVerificationStatus.lazy.js +4 -7
- package/dist/components/Quests/Quests.client.d.ts +13 -2
- package/dist/components/Quests/Quests.client.js +6 -5
- package/dist/components/Quests/QuestsContext.d.ts +5 -2
- package/dist/components/Quests/WageringQuest.d.ts +12 -0
- package/dist/components/Quests/WageringQuest.js +54 -2
- package/dist/handlers/postToken.d.ts +6 -6
- package/dist/types/index.d.ts +2 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +121 -121
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
- package/dist/ui/Carousel/Carousel.d.ts +45 -45
- package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
- 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 +306 -306
- package/dist/ui/Menu/menu.recipe.d.ts +17 -17
- 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/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- 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/Banner/Banner.client.d.ts +0 -12
- package/dist/components/Banner/Banner.client.js +0 -49
- package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
- package/dist/components/DigitainLauncher/Loading.js +0 -5
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
- package/dist/components/KYC/BasicInformation.d.ts +0 -1
- package/dist/components/KYC/BasicInformation.js +0 -101
- package/dist/components/KYC/IdentityVerification.d.ts +0 -1
- package/dist/components/KYC/IdentityVerification.js +0 -120
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -8
- package/dist/components/KYC/KYC.lazy.d.ts +0 -6
- package/dist/components/KYC/KYC.lazy.js +0 -45
- package/dist/components/KYC/KYCContext.d.ts +0 -6
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/PersonalInformation.d.ts +0 -1
- package/dist/components/KYC/PersonalInformation.js +0 -122
- package/dist/components/KYC/useKYC.d.ts +0 -25
- package/dist/components/KYC/useKYC.js +0 -38
- package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
- package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
- package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
- package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
- package/dist/components/SessionWatcher/index.d.ts +0 -1
- package/dist/components/SessionWatcher/index.js +0 -1
- 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/images/responsible-gaming-yellow.png +0 -0
- 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
|
@@ -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,13 +1,24 @@
|
|
|
1
|
+
import { type ImageProps } from 'next/image';
|
|
1
2
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
3
|
+
import type { GameProvider } from '../../types';
|
|
2
4
|
import { type ClassNameEntries as DailyCheckInQuestClassNameEntries } from './DailyCheckInQuest';
|
|
3
5
|
import { type ClassNameEntries as JourneyQuestClassNameEntries } from './JourneyQuest';
|
|
4
|
-
import { type ClassNameEntries as WageringQuestClassNameEntries } from './WageringQuest';
|
|
6
|
+
import { type WageringClassNameEntries, type ClassNameEntries as WageringQuestClassNameEntries } from './WageringQuest';
|
|
5
7
|
export interface ClassNameEntries {
|
|
6
8
|
root?: string;
|
|
7
9
|
wageringQuest?: string | WageringQuestClassNameEntries;
|
|
8
10
|
dailyCheckInQuest?: string | DailyCheckInQuestClassNameEntries;
|
|
9
11
|
journeyQuest?: string | JourneyQuestClassNameEntries;
|
|
10
12
|
}
|
|
13
|
+
export interface GameProviderSettings {
|
|
14
|
+
settings?: {
|
|
15
|
+
providers: GameProvider[];
|
|
16
|
+
url: string;
|
|
17
|
+
}[];
|
|
18
|
+
className?: string | WageringClassNameEntries;
|
|
19
|
+
gameProviderImages?: Partial<Record<GameProvider, ImageProps['src']>>;
|
|
20
|
+
heading?: string | ReactNode;
|
|
21
|
+
}
|
|
11
22
|
export interface QuestsProps {
|
|
12
23
|
/** @default "Quests" */
|
|
13
24
|
heading?: string | ReactNode;
|
|
@@ -18,6 +29,6 @@ export interface QuestsProps {
|
|
|
18
29
|
showTurnoverDecimals?: boolean;
|
|
19
30
|
/** Optional styling hook for checkbox control inside specific quests */
|
|
20
31
|
checkboxControlStyle?: CSSProperties;
|
|
21
|
-
|
|
32
|
+
gameProviderSettings?: GameProviderSettings;
|
|
22
33
|
}
|
|
23
34
|
export declare function Quests__client(props: QuestsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { isString } from 'lodash-es';
|
|
4
|
-
import Image from 'next/image';
|
|
4
|
+
import Image, {} from 'next/image';
|
|
5
5
|
import { Suspense, useState, } from 'react';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -53,7 +53,10 @@ export function Quests__client(props) {
|
|
|
53
53
|
setTab(TabDefinition.catch('AVAILABLE').parse(details.value));
|
|
54
54
|
}, className: "mt-3 w-full overflow-x-auto lg:mt-4.5 lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "AVAILABLE", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Available" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "COMPLETED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Completed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "FAILED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Failed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(SegmentGroup.Indicator, {})] }), _jsx("div", { className: "mt-3xl grid gap-3xl lg:mt-lg lg:grid-cols-3", children: quests.length > 0 ? (quests.map((quest) => {
|
|
55
55
|
const Quest = QUEST_COMPONENT_MAP[quest.type];
|
|
56
|
-
return (_jsx(QuestContext, { value:
|
|
56
|
+
return (_jsx(QuestContext, { value: {
|
|
57
|
+
...quest,
|
|
58
|
+
...props.gameProviderSettings,
|
|
59
|
+
}, children: _jsx(Suspense, { children: _jsx(Quest, { className: quest.type === 'WAGERING'
|
|
57
60
|
? classNames?.wageringQuest
|
|
58
61
|
: quest.type === 'DAILY_CHECKIN'
|
|
59
62
|
? classNames?.dailyCheckInQuest
|
|
@@ -61,9 +64,7 @@ export function Quests__client(props) {
|
|
|
61
64
|
? classNames?.journeyQuest
|
|
62
65
|
: '', uncompletedIcon: props.uncompletedIcon, customComplete: quest.type === 'WAGERING'
|
|
63
66
|
? props.customComplete
|
|
64
|
-
: undefined, ...(quest.type === '
|
|
65
|
-
gameProviderCarousel: props.gameProviderCarousel,
|
|
66
|
-
}), showTurnoverDecimals: props.showTurnoverDecimals, ...(quest.type === 'JOURNEY' || quest.type === 'ONBOARDING'
|
|
67
|
+
: undefined, showTurnoverDecimals: props.showTurnoverDecimals, ...(quest.type === 'JOURNEY' || quest.type === 'ONBOARDING'
|
|
67
68
|
? {
|
|
68
69
|
checkboxControlStyle: props.checkboxControlStyle,
|
|
69
70
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Quest } from '../../types';
|
|
2
|
+
import type { GameProviderSettings } from './Quests.client';
|
|
3
|
+
type QuestContextType = Quest & GameProviderSettings;
|
|
2
4
|
export declare const QuestContext: (props: {
|
|
3
|
-
value:
|
|
5
|
+
value: QuestContextType;
|
|
4
6
|
} & {
|
|
5
7
|
children?: import("react").ReactNode | undefined;
|
|
6
|
-
}) => React.ReactNode, useQuestContext: () =>
|
|
8
|
+
}) => React.ReactNode, useQuestContext: () => QuestContextType;
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { GameProvider } from '../../types';
|
|
2
3
|
export interface ClassNameEntries {
|
|
3
4
|
root?: string;
|
|
4
5
|
progressBarContainer?: string;
|
|
@@ -13,3 +14,14 @@ export declare function WageringQuest(props: {
|
|
|
13
14
|
showTurnoverDecimals?: boolean;
|
|
14
15
|
gameProviderCarousel?: ReactNode;
|
|
15
16
|
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface WageringClassNameEntries {
|
|
18
|
+
root?: string;
|
|
19
|
+
thumbnailRoot?: string;
|
|
20
|
+
thumbnailImage?: string;
|
|
21
|
+
thumbnailContainer?: string;
|
|
22
|
+
thumbnailRootContainer?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface GameProvidersCarouselProps {
|
|
25
|
+
gameProviders: GameProvider[];
|
|
26
|
+
}
|
|
27
|
+
export declare function GameProvidersCarousel({ ...props }: GameProvidersCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
3
4
|
import { isString } from 'lodash-es';
|
|
5
|
+
import Image from 'next/image';
|
|
6
|
+
import Link from 'next/link';
|
|
7
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
4
8
|
import { twMerge } from 'tailwind-merge';
|
|
5
9
|
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
6
10
|
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
7
11
|
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
8
12
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
9
13
|
import { useRemainingTime } from '../../client/hooks/useRemainingTime.js';
|
|
14
|
+
import { GAME_PROVIDER_DATA } from '../../constants/index.js';
|
|
15
|
+
import { ArrowLeftIcon } from '../../icons/ArrowLeftIcon.js';
|
|
16
|
+
import { ArrowRightIcon } from '../../icons/ArrowRightIcon.js';
|
|
10
17
|
import { InfoCircleIcon } from '../../icons/InfoCircleIcon.js';
|
|
11
18
|
import { XIcon } from '../../icons/XIcon.js';
|
|
12
19
|
import { Button } from '../../ui/Button/index.js';
|
|
@@ -35,7 +42,9 @@ export function WageringQuest(props) {
|
|
|
35
42
|
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('flex h-full w-full flex-col space-y-6 rounded-2xl border border-border-primary bg-bg-tertiary px-4 pt-5 pb-6', classNames?.root), children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "flex size-9 cursor-pointer items-center justify-center rounded-md border border-border-secondary bg-bg-primary", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "size-5 text-text-disabled" }) })] }), _jsx("p", { className: "font-semibold text-xl", children: name }), _jsx(Prose, { className: "text-wrap font-normal text-sm text-text-secondary-700", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsxs("div", { className: "group flex items-center justify-between text-text-primary-brand", children: [_jsxs("p", { children: ["Progress ", parseDecimal(progressPercentage, 0).toFixed(2), "%"] }), _jsxs("p", { children: [formatTurnover(turnover), _jsxs("span", { className: "text-text-quarterary-brand", children: ["/", targetTurnover, " ", localeInfo.currency.code] })] })] }), _jsx("div", { className: twMerge('h-2 w-full overflow-hidden rounded-full bg-bg-primary', classNames?.progressBarContainer), children: _jsx("div", { className: twMerge('h-full rounded-full bg-utility-brand-600 transition-all duration-300', classNames?.progressBar), style: { width: `${progressPercentage}%` } }) })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx("div", { className: twMerge('w-full rounded-md border border-bg-primary-hover bg-button-secondary-bg px-3.5 py-2.5 text-center', classNames?.bonusContainer), children: status === 'COMPLETED' && customComplete ? (_jsx("div", { className: twMerge(classNames?.bonusText), children: customComplete })) : (_jsxs("p", { className: twMerge((remainingTime.expired ||
|
|
36
43
|
status === 'COMPLETED' ||
|
|
37
44
|
status === 'FAILED') &&
|
|
38
|
-
'opacity-50 grayscale', classNames?.bonusText), children: ["Complete to get", ' ', _jsxs("span", { className: twMerge('text-brand-400', classNames?.bonusAmount), children: ["\u20B1", bonus] }), ' ', "bonus!"] })) }) })] }), _jsx(Rules, { open: disclosure.open, onOpenChange: disclosure.setOpen, gameProviderCarousel: props.gameProviderCarousel
|
|
45
|
+
'opacity-50 grayscale', classNames?.bonusText), children: ["Complete to get", ' ', _jsxs("span", { className: twMerge('text-brand-400', classNames?.bonusAmount), children: ["\u20B1", bonus] }), ' ', "bonus!"] })) }) })] }), _jsx(Rules, { open: disclosure.open, onOpenChange: disclosure.setOpen, gameProviderCarousel: props.gameProviderCarousel, gameProviders: Object.entries(quest.turnoverRequirementContributionPercentagePerGameProvider ?? [])
|
|
46
|
+
.filter(([_, value]) => +value > 0)
|
|
47
|
+
.map(([key]) => key) })] }));
|
|
39
48
|
}
|
|
40
49
|
function Rules(props) {
|
|
41
50
|
const quest = useQuestContext();
|
|
@@ -45,5 +54,48 @@ function Rules(props) {
|
|
|
45
54
|
defaultValue: props.defaultOpen ?? false,
|
|
46
55
|
onChange: props.onOpenChange,
|
|
47
56
|
});
|
|
48
|
-
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.open), 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)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto min-h-auto max-w-[21.438rem] overflow-y-auto rounded-xl px-4 pt-5 pb-0", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: quest.name }), _jsxs("ol", { className: "group list-disc text-wrap pl-4 font-normal text-sm text-text-tertiary-600", children: [_jsx("li", { children: "Earn extra rewards just by playing Slots, every bet counts, win or lose!" }), _jsx("li", { children: "Reach the wagering requirement in bets to complete the quest and claim your reward." })] })] }), featureFlag.enabled && props
|
|
57
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.open), 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)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto min-h-auto max-w-[21.438rem] overflow-y-auto rounded-xl px-4 pt-5 pb-0", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: quest.name }), _jsxs("ol", { className: "group list-disc text-wrap pl-4 font-normal text-sm text-text-tertiary-600", children: [_jsx("li", { children: "Earn extra rewards just by playing Slots, every bet counts, win or lose!" }), _jsx("li", { children: "Reach the wagering requirement in bets to complete the quest and claim your reward." })] })] }), featureFlag.enabled && (_jsx(GameProvidersCarousel, { gameProviders: props.gameProviders ?? [] })), _jsx("div", { className: "pt-6 pb-4", children: _jsx(Button, { onClick: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
58
|
+
}
|
|
59
|
+
export function GameProvidersCarousel({ ...props }) {
|
|
60
|
+
const context = useQuestContext();
|
|
61
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
62
|
+
align: 'start',
|
|
63
|
+
slidesToScroll: 3,
|
|
64
|
+
breakpoints: {
|
|
65
|
+
'(min-width: 1024px)': {
|
|
66
|
+
align: 'start',
|
|
67
|
+
slidesToScroll: 3,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
const [prevBtnDisabled, setPrevBtnDisabled] = useState(true);
|
|
72
|
+
const [nextBtnDisabled, setNextBtnDisabled] = useState(true);
|
|
73
|
+
const onPrevButtonClick = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
|
|
74
|
+
const onNextButtonClick = useCallback(async () => {
|
|
75
|
+
emblaApi?.scrollNext();
|
|
76
|
+
}, [emblaApi]);
|
|
77
|
+
const onSelect = useCallback((emblaApi) => {
|
|
78
|
+
setPrevBtnDisabled(!emblaApi?.canScrollPrev());
|
|
79
|
+
setNextBtnDisabled(!emblaApi?.canScrollNext());
|
|
80
|
+
}, []);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (!emblaApi)
|
|
83
|
+
return;
|
|
84
|
+
onSelect(emblaApi);
|
|
85
|
+
emblaApi.on('reInit', onSelect).on('select', onSelect);
|
|
86
|
+
}, [emblaApi, onSelect]);
|
|
87
|
+
const gameProviders = props.gameProviders.map((provider) => GAME_PROVIDER_DATA[provider]);
|
|
88
|
+
const classNames = isString(context.className)
|
|
89
|
+
? { root: context.className }
|
|
90
|
+
: (context.className ?? {});
|
|
91
|
+
return (_jsxs("div", { className: twMerge(classNames.root, gameProviders.length === 0 && 'hidden'), children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "font-semibold text-lg", children: context.heading ?? 'Providers' }), _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: twMerge('relative mt-lg overflow-hidden', classNames.thumbnailRootContainer), 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', classNames.thumbnailContainer), children: gameProviders.map((provider) => {
|
|
92
|
+
const url = context.settings
|
|
93
|
+
? (context.settings
|
|
94
|
+
.find(({ providers }) => providers.includes(provider.id))
|
|
95
|
+
?.url.replace(':slug', provider.slug)
|
|
96
|
+
.replace(':id', provider?.id) ??
|
|
97
|
+
`/providers/${provider.slug}`)
|
|
98
|
+
: `/providers/${provider.slug}`;
|
|
99
|
+
return (_jsx(Link, { href: url, className: twMerge('flex h-full w-full items-center overflow-hidden rounded-md bg-brand-800 lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View ${provider.name} games`, children: _jsx(Image, { src: context.gameProviderImages?.[provider.id] ?? provider.logo, alt: "", width: 300, height: 150, className: twMerge('mx-auto h-auto w-full', classNames.thumbnailImage) }) }, provider.id));
|
|
100
|
+
}) }) })] }));
|
|
49
101
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { type NextRequest, NextResponse } from 'next/server';
|
|
2
2
|
export declare function postToken(request: NextRequest): Promise<NextResponse<{
|
|
3
|
+
ok: true;
|
|
4
|
+
data?: never;
|
|
5
|
+
} | {
|
|
3
6
|
ok: false;
|
|
4
7
|
message: string;
|
|
5
8
|
__error?: unknown;
|
|
6
|
-
} | {
|
|
7
|
-
ok: true;
|
|
8
|
-
data: string;
|
|
9
9
|
}> | NextResponse<{
|
|
10
|
-
ok: true;
|
|
11
|
-
data?: never;
|
|
12
|
-
} | {
|
|
13
10
|
ok: false;
|
|
14
11
|
message: string;
|
|
15
12
|
__error?: unknown;
|
|
13
|
+
} | {
|
|
14
|
+
ok: true;
|
|
15
|
+
data: string;
|
|
16
16
|
}>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -755,6 +755,8 @@ export interface Quest {
|
|
|
755
755
|
accountVerificationCompleted?: boolean;
|
|
756
756
|
milestones?: JourneyQuestMilestone[];
|
|
757
757
|
dateTimeCompleted?: string;
|
|
758
|
+
turnoverRequirementContributionPercentagePerGameProvider?: Partial<Record<GameProvider, string>>;
|
|
759
|
+
stages?: WageringQuestStage[];
|
|
758
760
|
}
|
|
759
761
|
interface TopWinGame {
|
|
760
762
|
id: string;
|