@opexa/portal-components 0.0.788 → 0.0.790
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/Messages/MessagesPopup.js +3 -7
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +1 -0
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +12 -0
- package/dist/components/Quests/WageringQuest__next.d.ts +5 -1
- package/dist/components/Quests/WageringQuest__next.js +3 -3
- 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/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/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +90 -90
- package/dist/ui/Menu/menu.recipe.d.ts +5 -5
- 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/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/AccountInfo/GoogleDisconnect.d.ts +0 -7
- package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
- package/dist/components/DepositWithdrawal/AiOPaymentMethods.d.ts +0 -11
- package/dist/components/DepositWithdrawal/AiOPaymentMethods.js +0 -55
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .js +0 -191
- 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/icons/LinkBrokenIcon.d.ts +0 -2
- package/dist/icons/LinkBrokenIcon.js +0 -4
- package/dist/images/responsible-gaming-yellow.png +0 -0
|
@@ -5,7 +5,6 @@ import { useState } from 'react';
|
|
|
5
5
|
import { useInterval } from 'usehooks-ts';
|
|
6
6
|
import { useShallow } from 'zustand/shallow';
|
|
7
7
|
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
8
|
-
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
9
8
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
10
9
|
import { useMarkMessageAsReadMutation } from '../../client/hooks/useMarkMessageAsReadMutation.js';
|
|
11
10
|
import { useMessagesQuery } from '../../client/hooks/useMessagesQuery.js';
|
|
@@ -61,8 +60,6 @@ export function MessagesPopup() {
|
|
|
61
60
|
}
|
|
62
61
|
},
|
|
63
62
|
});
|
|
64
|
-
const future = useFeatureFlag();
|
|
65
|
-
const isGameLaunchWaiting = globalStore.gameLaunch.details.status === 'WAITING' || future.enabled;
|
|
66
63
|
const messagesQuery = useMessagesQuery({
|
|
67
64
|
first: 20,
|
|
68
65
|
filter: {
|
|
@@ -74,8 +71,7 @@ export function MessagesPopup() {
|
|
|
74
71
|
},
|
|
75
72
|
},
|
|
76
73
|
}, {
|
|
77
|
-
enabled:
|
|
78
|
-
!globalStore.depositWithdrawal.open &&
|
|
74
|
+
enabled: !globalStore.depositWithdrawal.open &&
|
|
79
75
|
!globalStore.messages.open &&
|
|
80
76
|
!globalStore.message.open &&
|
|
81
77
|
!globalStore.account.open &&
|
|
@@ -86,7 +82,7 @@ export function MessagesPopup() {
|
|
|
86
82
|
refetchInterval: disclosure.open ? undefined : 1000 * 10,
|
|
87
83
|
});
|
|
88
84
|
const messages = messagesQuery.data?.pages.flatMap((page) => page.edges
|
|
89
|
-
.filter((edge) => globalStore.gameLaunch.details.status === 'PLAYING'
|
|
85
|
+
.filter((edge) => globalStore.gameLaunch.details.status === 'PLAYING'
|
|
90
86
|
? edge.node.force
|
|
91
87
|
: true)
|
|
92
88
|
.map((edge) => edge.node)) ?? [];
|
|
@@ -132,7 +128,7 @@ export function MessagesPopup() {
|
|
|
132
128
|
setIndex(details.page);
|
|
133
129
|
}, slideCount: messages.length, allowMouseDrag: true, autoplay: false, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: {
|
|
134
130
|
__html: transformContent(message.content),
|
|
135
|
-
}, className: "mt-xs pb-5 text-
|
|
131
|
+
}, className: "mt-xs pb-5 text-center text-sm text-text-secondary-700 [&_li>ol]:list-decimal [&_li>ol]:pl-5 [&_li>ul]:list-disc [&_li>ul]:pl-5 [&_li]:mb-1 [&_ol]:list-decimal [&_ol]:pl-5 [&_ul]:list-disc [&_ul]:pl-5" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, session?.token || '', {
|
|
136
132
|
questsPageUrl,
|
|
137
133
|
transactionsPageUrl,
|
|
138
134
|
}), onClick: () => {
|
|
@@ -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
|
+
}
|
|
@@ -4,7 +4,8 @@ export interface StageItemUnlockedClassNameEntries {
|
|
|
4
4
|
root?: string;
|
|
5
5
|
header?: string;
|
|
6
6
|
stageTitle?: string;
|
|
7
|
-
|
|
7
|
+
statusBadgeCompleted?: string;
|
|
8
|
+
statusBadgeOngoing?: string;
|
|
8
9
|
body?: string;
|
|
9
10
|
progressText?: string;
|
|
10
11
|
bonusBadge?: string;
|
|
@@ -19,6 +20,9 @@ export interface StageItemLockedClassNameEntries {
|
|
|
19
20
|
}
|
|
20
21
|
export interface ClassNameEntries {
|
|
21
22
|
root?: string;
|
|
23
|
+
stageBadge?: string;
|
|
24
|
+
stageBadgeIcon?: string;
|
|
25
|
+
stageBadgeText?: string;
|
|
22
26
|
progressBarContainer?: string;
|
|
23
27
|
progressBar?: string;
|
|
24
28
|
bonusText?: string;
|
|
@@ -45,7 +45,7 @@ export function WageringQuestNext(props) {
|
|
|
45
45
|
const numericValue = parseFloat(value);
|
|
46
46
|
return Math.floor(numericValue).toString();
|
|
47
47
|
};
|
|
48
|
-
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 gap-2", children: [_jsxs("div", { className:
|
|
48
|
+
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 gap-2", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-md border border-[#9E165F] bg-[#4E0D30] px-2 py-1', classNames?.stageBadge), children: [_jsx(Flag05Icon, { className: twMerge('size-4 text-[#EE46BC]', classNames?.stageBadgeIcon) }), _jsxs("p", { className: twMerge('font-medium text-[#FAA7E0] text-sm', classNames?.stageBadgeText), children: ["Stage ", currentStage] })] }), _jsx(RemainingTime, {})] }), _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(0), "%"] }), _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}%` } }) }), _jsxs("div", { className: "group flex items-center justify-between text-text-primary-brand", children: [_jsxs("p", { children: ["Stage ", currentStage, " of ", quest?.program.stages?.length] }), _jsxs("div", { className: twMerge('rounded-[6px] border border-utility-brand-200 bg-utility-brand-50 px-1.5 py-0.5 font-medium text-utility-brand-700 text-xs leading-tight'), children: ["+", formatNumber(bonus, {
|
|
49
49
|
currency: localeInfo.currency.code,
|
|
50
50
|
}), ' ', "Bonus"] })] })] }), status === 'IN_PROGRESS' && (_jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: () => disclosure.setOpen(true), "aria-label": "View Details", disabled: false, className: "disabled:bg-bg-primary disabled:text-text-disabled", children: "View Details" }) }))] }), _jsx(Rules, { open: disclosure.open, onOpenChange: disclosure.setOpen, gameProviderCarousel: props.gameProviderCarousel, gameProviders: Object.entries(quest.turnoverRequirementContributionPercentagePerGameProvider ?? [])
|
|
51
51
|
.filter(([_, value]) => +value > 0)
|
|
@@ -66,7 +66,7 @@ function Rules(props) {
|
|
|
66
66
|
? (quest?.stage ?? 0) + 1
|
|
67
67
|
: quest.stage;
|
|
68
68
|
}, [quest.stage]);
|
|
69
|
-
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:
|
|
69
|
+
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 flex max-h-[80vh] min-h-auto max-w-[400px] flex-col rounded-xl px-4 pt-5 pb-0", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-shrink-0 flex-col space-y-5", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: quest.name }), _jsx("p", { className: "mb-4 font-normal text-sm text-text-tertiary-600", children: "Play and roll your way to rewards! Ready for a challenge? Complete them all and get amazing rewards!" })] }), _jsx("div", { className: "flex-1 overflow-y-auto md:scrollbar:w-2 md:scrollbar-thumb:rounded-full md:scrollbar-thumb:bg-bg-quaternary md:scrollbar-track:bg-transparent", children: (quest?.program.stages ?? []).map((stage, index) => currentStage >= index + 1 ? (_jsx(StageItemUnlocked, { stageDetails: stage, stageLevel: currentStage, index: index, writableBonus: quest.bonus, questCompleted: quest.status === 'COMPLETED', className: props.className?.stageItemUnlocked }, index)) : (_jsx(StageItemLocked, { index: index, className: props.className?.stageItemLocked }, index))) }), _jsxs("div", { className: "flex-shrink-0", children: [((!featureFlag.enabled &&
|
|
70
70
|
typeof window !== 'undefined' &&
|
|
71
71
|
(window.location.href.includes('blucky') ||
|
|
72
72
|
window.location.href.includes('powerplay') ||
|
|
@@ -121,7 +121,7 @@ function StageItemUnlocked({ stageLevel, stageDetails, index, writableBonus, que
|
|
|
121
121
|
const progress = stageLevel > index + 1
|
|
122
122
|
? 100
|
|
123
123
|
: Math.round(Number(quest.progressPercentage ?? 0));
|
|
124
|
-
return (_jsxs("div", { className: twMerge('mb-4 flex flex-col justify-between rounded-xl bg-bg-tertiary p-3', className?.root), children: [_jsxs("div", { className: twMerge('flex items-center justify-between space-x-2', className?.header), children: [_jsxs("p", { className: twMerge('font-medium', className?.stageTitle), children: ["Stage ", index + 1] }), isCompleted ? (_jsx("div", { className: twMerge('w-fit rounded-full border border-[#085D3A] bg-[#053321] px-2 py-0.5
|
|
124
|
+
return (_jsxs("div", { className: twMerge('mb-4 flex flex-col justify-between rounded-xl bg-bg-tertiary p-3', className?.root), children: [_jsxs("div", { className: twMerge('flex items-center justify-between space-x-2', className?.header), children: [_jsxs("p", { className: twMerge('font-medium', className?.stageTitle), children: ["Stage ", index + 1] }), isCompleted ? (_jsx("div", { className: twMerge('w-fit rounded-full border border-[#085D3A] bg-[#053321] px-2 py-0.5 font-medium text-[#75E0A7] text-sm', className?.statusBadgeCompleted), children: "Completed" })) : (_jsx("div", { className: twMerge('w-fit rounded-full border border-[#065986] bg-[#062C41] px-2 py-0.5 font-medium text-[#7CD4FD] text-sm', className?.statusBadgeOngoing), children: "Ongoing" }))] }), _jsxs("div", { className: twMerge('flex justify-between pt-[11px] pb-2', className?.body), children: [_jsxs("p", { className: twMerge('text-sm', className?.progressText), children: ["Progress: ", progress, "%"] }), _jsx("div", { className: twMerge('rounded-[6px] border border-utility-brand-200 bg-utility-brand-50 px-1.5 py-0.5 font-medium text-utility-brand-700 text-xs leading-tight', className?.bonusBadge), children: stageLevel > index + 1
|
|
125
125
|
? `+ ${stageDetails.bonusAmount} Bonus`
|
|
126
126
|
: `+ ${writableBonus} Bonus` })] }), _jsx("div", { className: twMerge('h-2 w-full overflow-hidden rounded-full bg-bg-primary', className?.progressBarContainer), children: _jsx("div", { className: twMerge('h-full rounded-full bg-utility-brand-600 transition-all duration-300', className?.progressBar), style: { width: `${progress}%` } }) })] }));
|
|
127
127
|
}
|