@opexa/portal-components 0.0.746 → 0.0.747
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/Jackpots/JackpotsCarouselNext/JackpotsCarouselStageItem.js +4 -19
- package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageDesktop.js +5 -5
- package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageMobile.js +5 -11
- package/dist/components/Messages/MessagesPopup.js +1 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +1 -0
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +12 -0
- package/dist/constants/EnvVar.d.ts +1 -1
- package/dist/ui/AlertDialog/AlertDialog.d.ts +121 -121
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Carousel/Carousel.d.ts +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/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/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.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/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/PinInput/PinInput.d.ts +12 -12
- package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
- 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/package.json +1 -1
- package/dist/components/DepositWithdrawal/AiOPaymentMethods.d.ts +0 -11
- package/dist/components/DepositWithdrawal/AiOPaymentMethods.js +0 -55
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
- 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
|
@@ -8,7 +8,6 @@ import Link from 'next/link';
|
|
|
8
8
|
import { useCallback, useEffect, useMemo, useState, } from 'react';
|
|
9
9
|
import { twMerge } from 'tailwind-merge';
|
|
10
10
|
import { useIntersectionObserver } from 'usehooks-ts';
|
|
11
|
-
import { useJackpotPayoutsQuery } from '../../../client/hooks/useJackpotPayoutsQuery.js';
|
|
12
11
|
import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
|
|
13
12
|
import { ArrowNarrowUpRightIcon } from '../../../icons/ArrowNarrowUpRightIcon.js';
|
|
14
13
|
import { CheckCircleBrokenIcon } from '../../../icons/CheckCircleBrokenIcon.js';
|
|
@@ -56,22 +55,8 @@ export function JackpotsCarouselStageItem({ style, className, viewAllUrl, animat
|
|
|
56
55
|
};
|
|
57
56
|
};
|
|
58
57
|
const chestImages = getChestImages(jackpot.stage ?? 1);
|
|
59
|
-
const jackpotPayoutsQuery = useJackpotPayoutsQuery({
|
|
60
|
-
first: 30,
|
|
61
|
-
filter: {
|
|
62
|
-
jackpot: {
|
|
63
|
-
equal: jackpot.id,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
}, {
|
|
67
|
-
enabled: typeof window !== 'undefined' && inView,
|
|
68
|
-
refetchInterval: 10_000,
|
|
69
|
-
});
|
|
70
|
-
const jackpotPayouts = jackpotPayoutsQuery.data?.pages[0].edges.map((edge) => edge.node) ?? [];
|
|
71
|
-
const latestJackpotPayout = jackpotPayouts[0] ?? [];
|
|
72
58
|
const localeInfo = useLocaleInfo();
|
|
73
59
|
const isPayingOut = jackpot.drawing;
|
|
74
|
-
const jackpotAmount = jackpot.pool;
|
|
75
60
|
const overallPercentage = parseInt(jackpot.overallProgressPercentage ?? '0');
|
|
76
61
|
const Arrow = useCallback(({ index }) => {
|
|
77
62
|
const Icon = isPayingOut ? ChevronLeftIcon : ChevronRightIcon;
|
|
@@ -106,7 +91,7 @@ export function JackpotsCarouselStageItem({ style, className, viewAllUrl, animat
|
|
|
106
91
|
return () => clearTimeout(timeout);
|
|
107
92
|
}
|
|
108
93
|
}, [minLimitTooltipOpen, isMobileDevice]);
|
|
109
|
-
const ProfileIcon = () => jackpotProfileShape === 'oval' ? (
|
|
94
|
+
const ProfileIcon = () => jackpotProfileShape === 'oval' ? (_jsx("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: _jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }) })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" })] }));
|
|
110
95
|
const PayoutBadge = () => (_jsxs("div", { className: twMerge('flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs', className?.latestPayoutBadgeRoot), children: [_jsx(Trophy01Icon, { className: twMerge('size-3.5 text-utility-brand-600', className?.latestPayoutBadgeIcon) }), "Winner"] }));
|
|
111
96
|
const OverallProgressBar = () => {
|
|
112
97
|
return (_jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-[0.3125rem] flex items-center justify-between font-semibold text-sm text-text-primary-900", children: [_jsx("p", { children: "Overall Progress" }), overallPercentage, "%"] }), _jsx(Progress.Root, { className: "h-2 w-full rounded-full bg-bg-primary lg:h-4", max: 100, value: overallPercentage, children: _jsx(Progress.Track, { className: twMerge('h-full overflow-hidden rounded-full bg-bg-primary', className?.progressBarTrack), children: _jsx(Progress.Range, { className: "relative h-full overflow-hidden rounded-full bg-brand-500 pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) })] }));
|
|
@@ -115,7 +100,7 @@ export function JackpotsCarouselStageItem({ style, className, viewAllUrl, animat
|
|
|
115
100
|
return null;
|
|
116
101
|
}
|
|
117
102
|
return (_jsxs("div", { ref: ref, className: twMerge('relative flex w-full shrink-0 rounded-2xl border border-border-primary bg-bg-tertiary p-3 text-center lg:gap-4 lg:p-5', className?.itemRoot, window.location.href.includes('blucky') &&
|
|
118
|
-
styles['animate-multi-stage-gradient-blucky']), style: style, children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage, ' '] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(
|
|
103
|
+
styles['animate-multi-stage-gradient-blucky']), style: style, children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage, ' '] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
|
|
119
104
|
currency: localeInfo.currency.code,
|
|
120
105
|
minDecimalPlaces: 2,
|
|
121
106
|
maxDecimalPlaces: 2,
|
|
@@ -123,10 +108,10 @@ export function JackpotsCarouselStageItem({ style, className, viewAllUrl, animat
|
|
|
123
108
|
currency: localeInfo.currency.code,
|
|
124
109
|
minDecimalPlaces: 2,
|
|
125
110
|
maxDecimalPlaces: 2,
|
|
126
|
-
})] })] })] }), _jsx("div", { className: "hidden min-w-25 lg:block" }), chestImages.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 min-w-30 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 150, height: 150, src: chestImages.image, alt: "chest", className: twMerge('size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }), _jsx("div", { className: twMerge('relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex', className?.latestPayoutRoot), children:
|
|
111
|
+
})] })] })] }), _jsx("div", { className: "hidden min-w-25 lg:block" }), chestImages.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 min-w-30 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 150, height: 150, src: chestImages.image, alt: "chest", className: twMerge('size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }), _jsx("div", { className: twMerge('relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex', className?.latestPayoutRoot), children: jackpot.stages?.[jackpot.stage - 1]?.member?.name ? (_jsxs(_Fragment, { children: [_jsx(ProfileIcon, {}), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsx(PayoutBadge, {}), _jsx("div", { className: "font-semibold", children: maskFirstLast(jackpot.stages?.[jackpot.stage - 1]?.member?.name, {
|
|
127
112
|
firstCharsCount: 3,
|
|
128
113
|
midLength: 3,
|
|
129
|
-
}) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(
|
|
114
|
+
}) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
|
|
130
115
|
currency: localeInfo.currency.code,
|
|
131
116
|
minDecimalPlaces: 2,
|
|
132
117
|
maxDecimalPlaces: 2,
|
|
@@ -22,7 +22,7 @@ import { JackpotsListItemRules } from './JackpotsListItemRules.js';
|
|
|
22
22
|
import { useJackpotsListItemData } from './useJackpotsListItemData.js';
|
|
23
23
|
export function JackpotMultiStageDesktop({ animate = true, customJackpotChestImage, jackpotProfileShape = 'oval', customJackpotStageChest, className, ...props }) {
|
|
24
24
|
const jackpot = useJackpotsListItemContext();
|
|
25
|
-
const { rootRef,
|
|
25
|
+
const { rootRef, filteredGameProviders, localeInfo, isPayingOut, arrowImages, } = useJackpotsListItemData();
|
|
26
26
|
const getChestImages = (stage) => {
|
|
27
27
|
if (stage === 1) {
|
|
28
28
|
return {
|
|
@@ -56,7 +56,7 @@ export function JackpotMultiStageDesktop({ animate = true, customJackpotChestIma
|
|
|
56
56
|
: parsed;
|
|
57
57
|
const overallPercentage = parseInt(jackpot.overallProgressPercentage ?? '0');
|
|
58
58
|
const isCompleted = overallPercentage >= 100;
|
|
59
|
-
const ProfileIcon = () => jackpotProfileShape === 'oval' ? (
|
|
59
|
+
const ProfileIcon = () => jackpotProfileShape === 'oval' ? (_jsx("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: _jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }) })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" })] }));
|
|
60
60
|
const PayoutBadge = () => (_jsxs("div", { className: twMerge('flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs', className?.latestPayoutBadgeRoot), children: [_jsx(Trophy01Icon, { className: twMerge('size-3.5 text-utility-brand-600', className?.latestPayoutBadgeIcon) }), "Winner"] }));
|
|
61
61
|
const ProgressBar = () => (_jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "font-semibold text-sm text-text-primary-900", children: ["Stage ", jackpot.stage, " Progress"] }), isCompleted ? 100 : currStageProgressPercentage, "%"] }), _jsx(Progress.Root, { className: "h-2 w-full rounded-full bg-bg-primary lg:h-4", max: 100, value: isCompleted ? 100 : currStageProgressPercentage, children: _jsx(Progress.Track, { className: twMerge('h-full overflow-hidden rounded-full bg-bg-primary', className?.progressBarTrack), children: _jsx(Progress.Range, { className: "relative h-full overflow-hidden rounded-full bg-brand-500 pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) })] }));
|
|
62
62
|
const OverallProgressBar = () => {
|
|
@@ -84,7 +84,7 @@ export function JackpotMultiStageDesktop({ animate = true, customJackpotChestIma
|
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
86
|
return (_jsxs("div", { ref: rootRef, className: twMerge('rounded-2xl border border-border-primary bg-bg-tertiary', className?.itemRoot), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5', window.location.href.includes('blucky') &&
|
|
87
|
-
styles['animate-multi-stage-gradient-blucky']), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-semibold text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(
|
|
87
|
+
styles['animate-multi-stage-gradient-blucky']), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "flex w-full flex-col", children: [_jsxs("div", { className: "relative flex w-full justify-between", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-semibold text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
|
|
88
88
|
currency: localeInfo.currency.code,
|
|
89
89
|
minDecimalPlaces: 2,
|
|
90
90
|
maxDecimalPlaces: 2,
|
|
@@ -92,10 +92,10 @@ export function JackpotMultiStageDesktop({ animate = true, customJackpotChestIma
|
|
|
92
92
|
currency: localeInfo.currency.code,
|
|
93
93
|
minDecimalPlaces: 2,
|
|
94
94
|
maxDecimalPlaces: 2,
|
|
95
|
-
})] })] })] }), _jsx("div", { className: "min-w-30" }), chestImages.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 min-w-30 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 150, height: 150, src: chestImages.image, alt: "chest", className: twMerge('size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }), _jsx("div", { className: twMerge('relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex', className?.latestPayoutRoot), children:
|
|
95
|
+
})] })] })] }), _jsx("div", { className: "min-w-30" }), chestImages.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 min-w-30 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 150, height: 150, src: chestImages.image, alt: "chest", className: twMerge('size-full h-25 w-25 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }), _jsx("div", { className: twMerge('relative mt-4 hidden w-full gap-4 rounded-lg bg-bg-primary p-4 lg:flex', className?.latestPayoutRoot), children: jackpot.stages?.[jackpot.stage - 1]?.member?.name ? (_jsxs(_Fragment, { children: [_jsx(ProfileIcon, {}), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsx(PayoutBadge, {}), _jsx("div", { className: "font-semibold", children: maskFirstLast(jackpot.stages?.[jackpot.stage - 1]?.member?.name, {
|
|
96
96
|
firstCharsCount: 3,
|
|
97
97
|
midLength: 3,
|
|
98
|
-
}) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(
|
|
98
|
+
}) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
|
|
99
99
|
currency: localeInfo.currency.code,
|
|
100
100
|
minDecimalPlaces: 2,
|
|
101
101
|
maxDecimalPlaces: 2,
|
|
@@ -18,20 +18,14 @@ import leaderboard from '../../../images/leaderboard.png';
|
|
|
18
18
|
import { Button } from '../../../ui/Button/index.js';
|
|
19
19
|
import { formatNumber } from '../../../utils/formatNumber.js';
|
|
20
20
|
import { maskFirstLast } from '../../../utils/mask.js';
|
|
21
|
-
import { parseDecimal } from '../../../utils/parseDecimal.js';
|
|
22
21
|
import styles from '../Jackpots.module.css';
|
|
23
22
|
import { useJackpotsListItemContext } from './JackpotsListContext.js';
|
|
24
23
|
import { JackpotsListItemGameProviders } from './JackpotsListItemGameProviders.js';
|
|
25
24
|
import { JackpotsListItemRules } from './JackpotsListItemRules.js';
|
|
26
25
|
import { useJackpotsListItemData } from './useJackpotsListItemData.js';
|
|
27
|
-
function getPercentage(value, total) {
|
|
28
|
-
const v = parseDecimal(value, 0);
|
|
29
|
-
const t = parseDecimal(total, 0);
|
|
30
|
-
return t === 0 ? 0 : (v / t) * 100;
|
|
31
|
-
}
|
|
32
26
|
export function JackpotMultiStageMobile({ animate = true, customJackpotChestImage, jackpotProfileShape = 'oval', customJackpotStageChest, chestImagesByTier, className, ...props }) {
|
|
33
27
|
const jackpot = useJackpotsListItemContext();
|
|
34
|
-
const { rootRef,
|
|
28
|
+
const { rootRef, filteredGameProviders, localeInfo, isPayingOut, arrowImages, } = useJackpotsListItemData();
|
|
35
29
|
const getChestImages = (stage) => {
|
|
36
30
|
if (stage === 1) {
|
|
37
31
|
return {
|
|
@@ -80,7 +74,7 @@ export function JackpotMultiStageMobile({ animate = true, customJackpotChestImag
|
|
|
80
74
|
: parsed;
|
|
81
75
|
const overallPercentage = parseInt(jackpot.overallProgressPercentage ?? '0');
|
|
82
76
|
const isCompleted = overallPercentage >= 100;
|
|
83
|
-
const ProfileIcon = () => jackpotProfileShape === 'oval' ? (
|
|
77
|
+
const ProfileIcon = () => jackpotProfileShape === 'oval' ? (_jsx("div", { className: "relative flex h-18 w-18 items-center justify-center rounded-full bg-bg-tertiary", children: _jsx(User01Icon, { className: "size-9 text-text-quarterary-500" }) })) : (_jsxs("div", { className: "relative grid h-18 w-18", children: [_jsx(StarIcon, { className: "col-start-1 row-start-1 h-full w-full" }), _jsx(User01Icon, { className: "z-10 col-start-1 row-start-1 size-9 place-self-center text-text-quarterary-500" })] }));
|
|
84
78
|
const PayoutBadge = () => (_jsxs("div", { className: twMerge('flex h-fit w-fit items-center gap-1 rounded-sm border border-utility-brand-200 bg-utility-brand-50 px-2 py-0.5 font-medium text-utility-brand-700 text-xs', className?.latestPayoutBadgeRoot), children: [_jsx(Trophy01Icon, { className: twMerge('size-3.5 text-utility-brand-600', className?.latestPayoutBadgeIcon) }), "Winner"] }));
|
|
85
79
|
const ProgressBar = () => (_jsxs("div", { className: "flex w-full flex-col items-center justify-between", children: [_jsxs("div", { className: "mb-[5px] flex w-full items-center justify-between", children: [_jsxs("div", { className: "font-semibold text-text-primary-900 text-xs", children: ["Stage ", jackpot.stage] }), isCompleted ? 100 : currStageProgressPercentage, "%"] }), _jsx(Progress.Root, { className: "h-2 w-full rounded-full bg-bg-primary", max: 100, value: isCompleted ? 100 : currStageProgressPercentage, "aria-valuemax": 100, "aria-label": "Stage progress", children: _jsx(Progress.Track, { className: twMerge('h-full overflow-hidden rounded-full bg-bg-primary', className?.progressBarTrack), children: _jsx(Progress.Range, { className: "relative h-full overflow-hidden rounded-full bg-brand-500 pl-1.5", children: _jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5", "aria-hidden": "true", children: arrowImages }) }) }) })] }));
|
|
86
80
|
const OverallProgressBar = () => {
|
|
@@ -108,7 +102,7 @@ export function JackpotMultiStageMobile({ animate = true, customJackpotChestImag
|
|
|
108
102
|
return null;
|
|
109
103
|
}
|
|
110
104
|
return (_jsxs("div", { ref: rootRef, className: twMerge('rounded-2xl border border-border-primary bg-bg-primary', className?.itemRoot), children: [_jsxs("div", { style: props.style, className: twMerge('relative flex shrink-0 rounded-2xl bg-bg-tertiary p-3 text-center lg:gap-4 lg:p-5', window.location.href.includes('blucky') &&
|
|
111
|
-
styles['animate-multi-stage-gradient-blucky']), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsx("div", { className: "flex w-full flex-col", children: _jsxs("div", { className: "relative flex w-full items-center justify-between", children: [_jsxs("div", { className: "w-full", children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(
|
|
105
|
+
styles['animate-multi-stage-gradient-blucky']), children: [_jsxs("div", { className: "relative z-1 flex flex-1 flex-col", children: [_jsx("div", { className: "flex h-full flex-col justify-between", children: _jsx("div", { className: "flex w-full justify-between", children: _jsx("div", { className: "flex w-full flex-col", children: _jsxs("div", { className: "relative flex w-full items-center justify-between", children: [_jsxs("div", { className: "w-full", children: [_jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-full border border-[#3F100B] bg-[#CDA95B] px-2 py-0.5 font-medium text-[#1D0201] text-xs', className?.jackpotBadgeRoot), children: [_jsx(Flag05Icon, { className: "size-3.5 text-[inherit]" }), "Stage ", jackpot.stage] }), jackpot.status !== 'CLOSED' ? (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-blue-200 bg-utility-blue-50 px-2 py-0.5 font-medium text-utility-blue-700 text-xs", children: [_jsx(ArrowNarrowUpRightIcon, { className: "size-3.5 text-utility-blue-500" }), "In Progress"] })) : (_jsxs("div", { className: "flex w-fit items-center gap-1 rounded-full border border-utility-success-200 bg-utility-success-50 px-2 py-0.5 font-medium text-utility-success-700 text-xs", children: [_jsx(CheckCircleBrokenIcon, { className: "size-3.5 text-utility-success-500" }), "Completed"] }))] }), _jsx("div", { className: "mt-1 text-left font-medium text-lg text-text-primary-900 lg:mt-5 lg:text-2xl", children: jackpot.name }), _jsx("div", { className: twMerge('mt-1.5 w-fit rounded-md bg-bg-primary px-2 py-1 font-bold text-2xl text-brand-400 lg:mt-2 lg:text-4xl', className?.jackpotAmountRoot), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
|
|
112
106
|
currency: localeInfo.currency.code,
|
|
113
107
|
minDecimalPlaces: 2,
|
|
114
108
|
maxDecimalPlaces: 2,
|
|
@@ -116,9 +110,9 @@ export function JackpotMultiStageMobile({ animate = true, customJackpotChestImag
|
|
|
116
110
|
currency: localeInfo.currency.code,
|
|
117
111
|
minDecimalPlaces: 2,
|
|
118
112
|
maxDecimalPlaces: 2,
|
|
119
|
-
})] })] }), _jsx(ProgressBar, {})] }), chestImages?.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 block min-w-34.5 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 100, height: 100, src: chestImages?.image, alt: "chest", className: twMerge('size-full h-34.5 w-34.5 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }) }) }) }), _jsx("div", { className: twMerge('relative mt-4 flex w-full gap-4 rounded-lg bg-bg-primary p-4', className?.latestPayoutRoot), children:
|
|
113
|
+
})] })] }), _jsx(ProgressBar, {})] }), chestImages?.image && (_jsx("div", { className: twMerge('right-0 bottom-[-60] z-1 block min-w-34.5 lg:absolute', chestImages?.style?.wrapper), children: _jsx(Image, { width: 100, height: 100, src: chestImages?.image, alt: "chest", className: twMerge('size-full h-34.5 w-34.5 p-2 lg:h-37.5 lg:w-37.5', chestImages?.style?.image) }) }))] }) }) }) }), _jsx("div", { className: twMerge('relative mt-4 flex w-full gap-4 rounded-lg bg-bg-primary p-4', className?.latestPayoutRoot), children: jackpot.stages?.[jackpot.stage - 1]?.member?.name ? (_jsxs(_Fragment, { children: [_jsx(ProfileIcon, {}), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_jsx(PayoutBadge, {}), _jsx("div", { className: "font-semibold", children: maskFirstLast(jackpot.stages?.[jackpot.stage - 1]?.member?.name, {
|
|
120
114
|
firstCharsCount: 3,
|
|
121
|
-
}) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(
|
|
115
|
+
}) }), _jsx("div", { className: twMerge('text-2xl text-brand-400', className?.latestPayoutAmount), children: formatNumber(jackpot.stages?.[jackpot.stage - 1]?.jackpotPayout, {
|
|
122
116
|
currency: localeInfo.currency.code,
|
|
123
117
|
minDecimalPlaces: 2,
|
|
124
118
|
maxDecimalPlaces: 2,
|
|
@@ -85,7 +85,7 @@ export function MessagesPopup() {
|
|
|
85
85
|
});
|
|
86
86
|
const messages = messagesQuery.data?.pages.flatMap((page) => page.edges
|
|
87
87
|
.filter((edge) => globalStore.gameLaunch.details.status === 'PLAYING' && future.enabled
|
|
88
|
-
? edge.node.force
|
|
88
|
+
? edge.node.force
|
|
89
89
|
: true)
|
|
90
90
|
.map((edge) => edge.node)) ?? [];
|
|
91
91
|
const [index, setIndex_] = useState(0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AndroidOnlyComponents(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Capacitor } from '@capacitor/core';
|
|
4
|
+
import { AndroidRoutingHandler } from './AndroidRoutingHandler.js';
|
|
5
|
+
import PushNotification from './PushNotifications.js';
|
|
6
|
+
export function AndroidOnlyComponents() {
|
|
7
|
+
const platform = Capacitor.getPlatform();
|
|
8
|
+
const isNative = platform === 'android' || platform === 'ios';
|
|
9
|
+
if (!isNative)
|
|
10
|
+
return null;
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(PushNotification, {}), _jsx(AndroidRoutingHandler, {})] }));
|
|
12
|
+
}
|
|
@@ -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;
|