@opexa/portal-components 0.0.233 → 0.0.234
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/Bonus/Bonus.client.js +1 -1
- package/dist/components/Empty.d.ts +2 -1
- package/dist/components/KYC/Header.js +2 -4
- package/dist/components/KYC/Step1.js +2 -3
- package/dist/components/KYC/Step2.js +2 -3
- package/dist/components/KYC/Step3.js +2 -4
- package/dist/components/KYC/Step4.js +2 -3
- package/dist/components/KYC/backup/KYCContext.d.ts +1 -5
- package/dist/components/Messages/Message.js +3 -2
- package/dist/components/Messages/MessageContext.d.ts +1 -5
- package/dist/components/Messages/MessagePopup.js +3 -2
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +1 -1
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +5 -10
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +3 -4
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +1 -1
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +1 -1
- package/dist/components/Quests/WageringQuest/WageringQuest.js +2 -3
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +3 -4
- package/dist/components/SignUp/SignUpForm.js +1 -6
- package/dist/constants/gameProviders.d.ts +2 -1
- package/dist/constants/gameProviders.js +0 -6
- package/dist/constants/gameTypes.d.ts +2 -1
- package/dist/constants/headerKeys.d.ts +0 -1
- package/dist/constants/headerKeys.js +0 -1
- package/dist/constants/secretQuestions.d.ts +1 -1
- package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
- package/dist/ui/Avatar/avatar.recipe.d.ts +3 -3
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Carousel/Carousel.d.ts +45 -45
- package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
- 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 +88 -88
- package/dist/ui/Dialog/dialog.recipe.d.ts +11 -11
- 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 +20 -20
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +8 -8
- package/dist/ui/Presence.d.ts +1 -1
- package/dist/ui/Presence.js +1 -1
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- 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/dist/utils/constants.d.ts +2 -0
- package/dist/utils/constants.js +2 -0
- package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
- package/dist/utils/isBetween3amAnd3pm.js +5 -0
- package/package.json +1 -1
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +0 -2
- package/dist/components/CashbackBonus/CashbackBonus.client.js +0 -9
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +0 -10
- package/dist/components/CashbackBonus/CashbackBonus.js +0 -5
- package/dist/components/CashbackBonus/index.d.ts +0 -1
- package/dist/components/CashbackBonus/index.js +0 -1
- package/dist/components/KYC/loadModels.d.ts +0 -1
- package/dist/components/KYC/loadModels.js +0 -9
- package/dist/components/Promo/PromoContent.d.ts +0 -2
- package/dist/components/Promo/PromoContent.js +0 -9
- package/dist/components/Promos/PromoCarousel.d.ts +0 -2
- package/dist/components/Promos/PromoCarousel.js +0 -41
- package/dist/components/Promos/PromoGrid.d.ts +0 -2
- package/dist/components/Promos/PromoGrid.js +0 -12
- package/dist/components/Promos/PromoItem.d.ts +0 -7
- package/dist/components/Promos/PromoItem.js +0 -10
- package/dist/constants/BranchCode.d.ts +0 -4
- package/dist/constants/BranchCode.js +0 -42
- package/dist/constants/endpoints.d.ts +0 -10
- package/dist/constants/endpoints.js +0 -41
- package/dist/utils/createErrorFromCode.d.ts +0 -2
- package/dist/utils/createErrorFromCode.js +0 -11
|
@@ -26,7 +26,7 @@ export function Bonus__client(props) {
|
|
|
26
26
|
return null;
|
|
27
27
|
const turnoverRequirement = parseDecimal(bonus.turnoverRequirement, 0);
|
|
28
28
|
const currentTurnoverRequirementContribution = parseDecimal(bonus.currentTurnoverRequirementContribution, 0);
|
|
29
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/rewards', className: "text-button-tertiary-fg flex items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to Rewards"] }), _jsx("div", { className: "mt-3xl", children: bonus.promo.banner?.url ? (_jsx(Image, { src: bonus.promo.banner.url, alt: "", width: 1024, height: 600, unoptimized: true, priority: true, className: "h-auto w-full" })) : (_jsx(DefaultImage, {})) }), _jsxs(Badge.Root, { size: "lg", round: false, colorScheme: remainingTime.expired ? 'danger' : 'gray', className: "mt-xl lg:mt-6", children: [_jsx(Badge.Icon, { children: _jsx(StopWatchIcon, {}) }), _jsx(Badge.Label, { children: remainingTime.expired ? 'Expired' : remainingTime.toString() })] }), _jsx("h1", { className: "text-text-primary-900 mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: bonus.promo.name }), _jsx("p", { className: "text-text-primary-brand mt-xl text-base lg:mt-6 lg:text-lg", children: "Complete the wagering before time runs out to convert your bonus balance into real money!" }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Your bonus" }), _jsxs("p", { children: [_jsx("span", { className: "text-text-primary-900", children: formatNumber(bonus.balance) }), ' ', "/ ", formatNumber(bonus.amount), " ", localeInfo.currency.code] })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Required Turnover" }),
|
|
29
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/rewards', className: "text-button-tertiary-fg flex items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to Rewards"] }), _jsx("div", { className: "mt-3xl", children: bonus.promo.banner?.url ? (_jsx(Image, { src: bonus.promo.banner.url, alt: "", width: 1024, height: 600, unoptimized: true, priority: true, className: "h-auto w-full" })) : (_jsx(DefaultImage, {})) }), _jsxs(Badge.Root, { size: "lg", round: false, colorScheme: remainingTime.expired ? 'danger' : 'gray', className: "mt-xl lg:mt-6", children: [_jsx(Badge.Icon, { children: _jsx(StopWatchIcon, {}) }), _jsx(Badge.Label, { children: remainingTime.expired ? 'Expired' : remainingTime.toString() })] }), _jsx("h1", { className: "text-text-primary-900 mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: bonus.promo.name }), _jsx("p", { className: "text-text-primary-brand mt-xl text-base lg:mt-6 lg:text-lg", children: "Complete the wagering before time runs out to convert your bonus balance into real money!" }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Your bonus" }), _jsxs("p", { children: [_jsx("span", { className: "text-text-primary-900", children: formatNumber(bonus.balance) }), ' ', "/ ", formatNumber(bonus.amount), " ", localeInfo.currency.code] })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Required Turnover" }), _jsx("p", { children: turnoverRequirement })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { children: "Wagering" }), _jsxs("p", { children: [currentTurnoverRequirementContribution, "/", turnoverRequirement] })] }), _jsx(Progress.Root, { className: "mt-2", min: 0, max: turnoverRequirement, value: clamp(currentTurnoverRequirementContribution, 0, turnoverRequirement), children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] }), _jsxs(Collapsible.Root, { className: "mt-xl lg:mt-6", children: [_jsxs(Collapsible.Trigger, { className: "text-button-tertiary-fg flex w-fit items-center justify-center gap-sm text-sm font-semibold lg:mx-auto", children: ["Game Provider Contribution", _jsx(Collapsible.Indicator, { asChild: true, children: _jsx(ChevronRightIcon, { className: "size-5" }) })] }), _jsx(Collapsible.Content, { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl space-y-1.5 rounded-md border px-3.5 py-xl lg:mt-6", children: Object.entries(bonus.promo
|
|
30
30
|
.turnoverRequirementContributionPercentagePerGameProvider ?? {}).map(([provider, valueAsString]) => {
|
|
31
31
|
const value = parseDecimal(valueAsString, 0);
|
|
32
32
|
return (_jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: capitalize(provider, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, ComponentType } from 'react';
|
|
2
|
-
|
|
2
|
+
interface EmptyProps {
|
|
3
3
|
icon: ComponentType<ComponentProps<'svg'>>;
|
|
4
4
|
title: string;
|
|
5
5
|
message: string;
|
|
@@ -7,3 +7,4 @@ export interface EmptyProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare function Empty(props: EmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronLeftIcon } from '../../icons/
|
|
3
|
-
import {
|
|
4
|
-
import { Dialog } from '../../ui/Dialog/index.js';
|
|
5
|
-
import { IconButton } from '../../ui/IconButton/index.js';
|
|
2
|
+
import { ChevronLeftIcon, XIcon } from '../../icons/index.js';
|
|
3
|
+
import { Dialog, IconButton } from '../../ui/index.js';
|
|
6
4
|
export function Header() {
|
|
7
5
|
return (_jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "bg-bg-primary-alt relative flex items-center gap-xl px-xl py-md lg:justify-center lg:bg-transparent lg:p-0", children: [_jsx(IconButton, { size: "2xs", variant: "outline", colorScheme: "gray", className: "lg:hidden", onClick: () => api.setOpen(false), children: _jsx(ChevronLeftIcon, {}) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "Personal Verification" }), _jsx("button", { type: "button", className: "text-text-quinary absolute right-0 top-1/2 hidden -translate-y-1/2 lg:block", onClick: () => api.setOpen(false), children: _jsx(XIcon, { className: "size-6" }) })] })) }));
|
|
8
6
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Image from 'next/image';
|
|
3
|
-
import { CheckIcon } from '../../icons/
|
|
4
|
-
import { XIcon } from '../../icons/XIcon.js';
|
|
3
|
+
import { CheckIcon, XIcon } from '../../icons/index.js';
|
|
5
4
|
import uploadId from '../../images/capture-id-banner.png';
|
|
6
|
-
import { Button } from '../../ui/
|
|
5
|
+
import { Button } from '../../ui/index.js';
|
|
7
6
|
import { useKYCContext } from './KYCContext.js';
|
|
8
7
|
export function Step1() {
|
|
9
8
|
const context = useKYCContext();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Image from 'next/image';
|
|
3
|
-
import { CheckIcon } from '../../icons/
|
|
4
|
-
import { XIcon } from '../../icons/XIcon.js';
|
|
3
|
+
import { CheckIcon, XIcon } from '../../icons/index.js';
|
|
5
4
|
import selfie from '../../images/capture-selfie-banner.png';
|
|
6
|
-
import { Button } from '../../ui/
|
|
5
|
+
import { Button } from '../../ui/index.js';
|
|
7
6
|
import { useKYCContext } from './KYCContext.js';
|
|
8
7
|
export function Step2() {
|
|
9
8
|
const context = useKYCContext();
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CheckIcon } from '../../icons/
|
|
3
|
-
import { Button } from '../../ui/
|
|
4
|
-
import { Checkbox } from '../../ui/Checkbox/index.js';
|
|
5
|
-
import { Field } from '../../ui/Field/index.js';
|
|
2
|
+
import { CheckIcon } from '../../icons/index.js';
|
|
3
|
+
import { Button, Checkbox, Field } from '../../ui/index.js';
|
|
6
4
|
import { useKYCContext } from './KYCContext.js';
|
|
7
5
|
export function Step3() {
|
|
8
6
|
const context = useKYCContext();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CheckCircleIcon } from '../../icons/
|
|
3
|
-
import { Button } from '../../ui/
|
|
4
|
-
import { Dialog } from '../../ui/Dialog/index.js';
|
|
2
|
+
import { CheckCircleIcon } from '../../icons/index.js';
|
|
3
|
+
import { Button, Dialog } from '../../ui/index.js';
|
|
5
4
|
export function Step4() {
|
|
6
5
|
return (_jsxs("div", { children: [_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(CheckCircleIcon, {}) }), _jsx("h2", { className: "mt-3 text-center", children: "Submission Successful" }), _jsx("p", { className: "text-text-tertiary-600 text-center", children: "Your documents have been submitted successfully. They\u2019re now under review, and you\u2019ll receive a notification as soon as your account is verified." }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { className: "mt-3xl", onClick: () => api.setOpen(false), children: "Ok" })) })] }));
|
|
7
6
|
}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import type { UseKYCReturn } from './useKYC';
|
|
2
|
-
export declare const KYCContext: (
|
|
3
|
-
value: UseKYCReturn;
|
|
4
|
-
} & {
|
|
5
|
-
children?: import("react").ReactNode | undefined;
|
|
6
|
-
}) => React.ReactNode, useKYCContext: () => UseKYCReturn;
|
|
2
|
+
export declare const KYCContext: import("react").Context<UseKYCReturn>, useKYCContext: () => UseKYCReturn;
|
|
@@ -7,7 +7,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
|
7
7
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
8
8
|
import { useMarkMessageAsReadMutation } from '../../client/hooks/useMarkMessageAsReadMutation.js';
|
|
9
9
|
import { useMessageContext } from './MessageContext.js';
|
|
10
|
-
import {
|
|
10
|
+
import { getMessageIcon } from './utils.js';
|
|
11
11
|
export function Message() {
|
|
12
12
|
const message = useMessageContext();
|
|
13
13
|
const localeInfo = useLocaleInfo();
|
|
@@ -16,6 +16,7 @@ export function Message() {
|
|
|
16
16
|
messages: ctx.messages,
|
|
17
17
|
})));
|
|
18
18
|
const markMessageAsReadMutation = useMarkMessageAsReadMutation();
|
|
19
|
+
const Icon = getMessageIcon(message.icon);
|
|
19
20
|
const handleViewMessage = async () => {
|
|
20
21
|
globalStore.message.setData(message);
|
|
21
22
|
globalStore.message.setOpen(true);
|
|
@@ -30,5 +31,5 @@ export function Message() {
|
|
|
30
31
|
};
|
|
31
32
|
return (_jsxs("div", { role: "button", tabIndex: 0, className: "border-border-secondary rounded-xs bg-bg-secondary flex h-auto flex-shrink-0 cursor-pointer flex-col border px-3.5 py-2.5", onClick: handleViewMessage, "aria-pressed": "false", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-text-tertiary-600 text-xs font-normal", children: format(new Date(message.dateTimeCreated), 'M/d/yyyy - h:mma', {
|
|
32
33
|
in: tz(localeInfo.timezone),
|
|
33
|
-
}) }), !message.markedAsRead && (_jsx("div", { className: "bg-utility-success-500 h-2.5 w-2.5 rounded-full" }))] }), _jsxs("div", { className: "mb-2 flex items-center space-x-2", children: [_jsx(
|
|
34
|
+
}) }), !message.markedAsRead && (_jsx("div", { className: "bg-utility-success-500 h-2.5 w-2.5 rounded-full" }))] }), _jsxs("div", { className: "mb-2 flex items-center space-x-2", children: [_jsx(Icon, { className: "text-brand-400" }), _jsx("p", { className: "text-text-primary-brand text-sm font-semibold", children: message.title })] }), _jsx("p", { className: "line-clamp-3 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: message.content } }), message.actions.length > 0 && (_jsx("div", { className: "mt-2 flex flex-wrap items-center justify-end gap-2", children: message.actions.map((action, index) => (_jsx(Link, { className: "border-button-secondary-border text-button-secondary-fg rounded-md border px-3 py-2 text-sm", href: action.url, onClick: handleActionClick, children: action.name }, index))) }))] }));
|
|
34
35
|
}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import type { Message } from '../../types';
|
|
2
|
-
export declare const MessageContext: (
|
|
3
|
-
value: Message;
|
|
4
|
-
} & {
|
|
5
|
-
children?: import("react").ReactNode | undefined;
|
|
6
|
-
}) => React.ReactNode, useMessageContext: () => Message;
|
|
2
|
+
export declare const MessageContext: import("react").Context<Message>, useMessageContext: () => Message;
|
|
@@ -6,12 +6,13 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
|
6
6
|
import { XIcon } from '../../icons/XIcon.js';
|
|
7
7
|
import { Dialog } from '../../ui/Dialog/index.js';
|
|
8
8
|
import { Portal } from '../../ui/Portal/index.js';
|
|
9
|
-
import {
|
|
9
|
+
import { getMessageIcon } from './utils.js';
|
|
10
10
|
export const MessagePopup = () => {
|
|
11
11
|
const globalStore = useGlobalStore(useShallow((ctx) => ({ message: ctx.message })));
|
|
12
|
+
const Icon = getMessageIcon(globalStore.message.data?.icon ?? 'MESSAGE');
|
|
12
13
|
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.message.open, onOpenChange: ({ open }) => {
|
|
13
14
|
globalStore.message.setOpen(open);
|
|
14
|
-
}, 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: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl px-xl pb-0 pt-5 shadow-xl", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "pb-6", children: [_jsx("div", { className: "bg-bg-brand-secondary mx-auto w-fit rounded-full p-3", children: _jsx(
|
|
15
|
+
}, 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: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl px-xl pb-0 pt-5 shadow-xl", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "pb-6", children: [_jsx("div", { className: "bg-bg-brand-secondary mx-auto w-fit rounded-full p-3", children: _jsx(Icon, { className: "text-text-brand", height: "24", width: "24" }) }), _jsx("p", { className: "text-text-primary-brand mt-lg text-center text-lg font-semibold leading-tight", children: globalStore.message.data?.title }), _jsx("div", { className: "text-shadow-text-secondary-700 mt-xs text-center text-sm font-normal leading-tight", dangerouslySetInnerHTML: {
|
|
15
16
|
__html: globalStore.message.data?.content ?? '',
|
|
16
17
|
} })] }), globalStore.message.data?.actions.length ? (_jsx("div", { className: "flex flex-col space-y-2 px-4 pb-8 pt-6 text-center", children: globalStore.message.data.actions.map((action, index) => (_jsx(Link, { className: "bg-button-primary-bg rounded-xs text-button-primary-fg w-full px-4 py-2.5 text-base font-semibold", href: action.url, onClick: () => {
|
|
17
18
|
globalStore.message.setOpen(false);
|
|
@@ -3,16 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import { addDays, isEqual, startOfDay } from 'date-fns';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { useCheckInDailyCheckInQuestMutation } from '../../../client/hooks/
|
|
7
|
-
import { toaster } from '../../../client/utils/
|
|
8
|
-
import { CalendarIcon } from '../../../icons/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { InfoCircleIcon } from '../../../icons/InfoCircleIcon.js';
|
|
12
|
-
import { Badge } from '../../../ui/Badge/index.js';
|
|
13
|
-
import { Button } from '../../../ui/Button/index.js';
|
|
14
|
-
import { getQueryClient } from '../../../utils/getQueryClient.js';
|
|
15
|
-
import { getAvailableQuestsQueryKey } from '../../../utils/queryKeys.js';
|
|
6
|
+
import { useCheckInDailyCheckInQuestMutation } from '../../../client/hooks/index.js';
|
|
7
|
+
import { toaster } from '../../../client/utils/index.js';
|
|
8
|
+
import { CalendarIcon, CheckIcon, ClockStopWatchIcon, InfoCircleIcon, } from '../../../icons/index.js';
|
|
9
|
+
import { Badge, Button } from '../../../ui/index.js';
|
|
10
|
+
import { getAvailableQuestsQueryKey, getQueryClient } from '../../../utils/index.js';
|
|
16
11
|
import CountdownTimer from '../CountdownTimer.js';
|
|
17
12
|
import { DailyCheckInQuestModal } from './DailyCheckInQuestModal.js';
|
|
18
13
|
export function DailyCheckInQuest({ quest }) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Dialog } from '../../../ui/
|
|
6
|
-
import { Portal } from '../../../ui/Portal/index.js';
|
|
3
|
+
import { Portal } from '@ark-ui/react';
|
|
4
|
+
import { XIcon } from '../../../icons/index.js';
|
|
5
|
+
import { Button, Dialog } from '../../../ui/index.js';
|
|
7
6
|
export function DailyCheckInQuestModal(props) {
|
|
8
7
|
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: props.modalState.isOpen, onOpenChange: ({ open }) => props.modalState.setIsOpen(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: "min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("p", { className: "text-text-primary-900 text-lg font-semibold", children: "Daily Check-In Rules" }), _jsxs("ul", { className: "text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal", children: [_jsx("li", { children: "Earn rewards just for checking in each day!" }), _jsx("li", { children: "Stay consistent to unlock special rewards on the 3rd, 5th, and 7th day." }), _jsx("li", { children: "Missing a day will reset your streak, starting again from Day 1." }), _jsx("li", { children: "Each check-in unlocks the next one on the following day." }), _jsx("li", { children: "Successfully check in for 7 consecutive days to complete the quest and reset the cycle." })] })] }), _jsx("div", { className: "pb-4 pt-6", children: _jsx(Button, { onClick: () => props.modalState.setIsOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
9
8
|
}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { ClockStopWatchIcon } from '../../../icons/
|
|
6
|
-
import {
|
|
7
|
-
import { Badge } from '../../../ui/Badge/index.js';
|
|
5
|
+
import { ClockStopWatchIcon, InfoCircleIcon } from '../../../icons/index.js';
|
|
6
|
+
import { Badge } from '../../../ui/index.js';
|
|
8
7
|
import CountdownTimer from '../CountdownTimer.js';
|
|
9
8
|
import { WageringQuestModal } from './WageringQuestModal.js';
|
|
10
9
|
export function WageringQuest({ quest }) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Dialog } from '../../../ui/
|
|
6
|
-
import { Portal } from '../../../ui/Portal/index.js';
|
|
3
|
+
import { Portal } from '@ark-ui/react';
|
|
4
|
+
import { XIcon } from '../../../icons/index.js';
|
|
5
|
+
import { Button, Dialog } from '../../../ui/index.js';
|
|
7
6
|
export function WageringQuestModal(props) {
|
|
8
7
|
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: props.modalState.isOpen, onOpenChange: ({ open }) => props.modalState.setIsOpen(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: "min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("p", { className: "text-text-primary-900 text-lg font-semibold", children: props.questName }), _jsxs("ul", { className: "text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal", 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." })] })] }), _jsx("div", { className: "pb-4 pt-6", children: _jsx(Button, { onClick: () => props.modalState.setIsOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
9
8
|
}
|
|
@@ -46,9 +46,6 @@ export function SignUpForm() {
|
|
|
46
46
|
itemToValue: (item) => item.code,
|
|
47
47
|
itemToString: (item) => `${item.code} - ${item.name}`,
|
|
48
48
|
});
|
|
49
|
-
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
50
|
-
kyc: ctx.kyc,
|
|
51
|
-
})));
|
|
52
49
|
const [step, setStep] = useState(1);
|
|
53
50
|
const dialog = useDialogContext();
|
|
54
51
|
const search = useSearchParams();
|
|
@@ -195,7 +192,6 @@ export function SignUpForm() {
|
|
|
195
192
|
mobileNumber: mobileNumberParser.format(mobileNumber),
|
|
196
193
|
verificationCode: verificationCode.join(''),
|
|
197
194
|
referralCode: search.get('referralCode') ?? undefined,
|
|
198
|
-
domain: search.get('domain') ?? undefined,
|
|
199
195
|
btag: search.get('btag') ?? undefined,
|
|
200
196
|
});
|
|
201
197
|
const name = mobileNumberParser.format(mobileNumber);
|
|
@@ -242,7 +238,6 @@ export function SignUpForm() {
|
|
|
242
238
|
dialog.setOpen(false);
|
|
243
239
|
step1Form.reset();
|
|
244
240
|
step2Form.reset();
|
|
245
|
-
globalStore.kyc.setOpen(true);
|
|
246
241
|
setStep(1);
|
|
247
242
|
}
|
|
248
243
|
catch (error) {
|
|
@@ -256,7 +251,7 @@ export function SignUpForm() {
|
|
|
256
251
|
o.field.onChange(details.value);
|
|
257
252
|
}, onValueComplete: () => {
|
|
258
253
|
form2Ref.current?.requestSubmit();
|
|
259
|
-
}, children: [_jsxs(PinInput.Control, { className: "grid-cols-[1fr_1fr_1fr_auto_1fr_1fr_1fr] items-center gap-md", children: [_jsx(PinInput.Input, { index: 0 }), _jsx(PinInput.Input, { index: 1 }), _jsx(PinInput.Input, { index: 2 }), _jsx("span", { className: "text-text-placeholder-subtle text-2xl font-medium", children: "\u2013" }), _jsx(PinInput.Input, { index: 3 }), _jsx(PinInput.Input, { index: 4 }), _jsx(PinInput.Input, { index: 5 })] }), _jsx(PinInput.HiddenInput, {})] }), _jsx(Field.ErrorText, { children: o.formState.errors.verificationCode?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: step2Form.formState.isSubmitting, children: "Verify" }), _jsxs("div", { className: "mt-3 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-secondary-700", children: "Didn't recieve the code?" }), _jsx("button", { type: "button", className: "text-button-secondary-fg font-semibold disabled:cursor-not-allowed disabled:opacity-75", disabled: cooldown.cooling, onClick: async () => {
|
|
254
|
+
}, blurOnComplete: true, readOnly: step2Form.formState.isSubmitting, type: "numeric", children: [_jsxs(PinInput.Control, { className: "grid-cols-[1fr_1fr_1fr_auto_1fr_1fr_1fr] items-center gap-md", children: [_jsx(PinInput.Input, { index: 0 }), _jsx(PinInput.Input, { index: 1 }), _jsx(PinInput.Input, { index: 2 }), _jsx("span", { className: "text-text-placeholder-subtle text-2xl font-medium", children: "\u2013" }), _jsx(PinInput.Input, { index: 3 }), _jsx(PinInput.Input, { index: 4 }), _jsx(PinInput.Input, { index: 5 })] }), _jsx(PinInput.HiddenInput, {})] }), _jsx(Field.ErrorText, { children: o.formState.errors.verificationCode?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: step2Form.formState.isSubmitting, children: "Verify" }), _jsxs("div", { className: "mt-3 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-secondary-700", children: "Didn't recieve the code?" }), _jsx("button", { type: "button", className: "text-button-secondary-fg font-semibold disabled:cursor-not-allowed disabled:opacity-75", disabled: cooldown.cooling, onClick: async () => {
|
|
260
255
|
await sendVerificationCodeMutation.mutateAsync({
|
|
261
256
|
channel: 'SMS',
|
|
262
257
|
recipient: mobileNumberParser.format(step1Form.getValues('mobileNumber')),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { GameProvider
|
|
1
|
+
import type { GameProvider } from '@opexa/portal-sdk-core';
|
|
2
|
+
import type { GameProviderData } from '../types';
|
|
2
3
|
export declare const GAME_PROVIDER_DATA: Record<GameProvider, GameProviderData>;
|
|
3
4
|
export declare const GAME_PROVIDERS: ["ALIZE", "BGAMING", "BOOONGO", "EVOPLAY", "BTI", "CQ9", "DARWIN", "DG", "DRBINGO", "E2E", "ETENGJUE", "EVOLUTION", "EVOLUTION_REDTIGER", "EZUGI", "FACHAI", "HABANERO", "HACKSAW", "HOLLYWOODTV", "JDB", "JILI", "JDBGTF", "JOKER", "JDBSPRIBE", "JILI_BINGO", "KINGMAKER", "KINGMIDAS", "MEGA2SPIN", "MICROGAMING", "MEGABALL", "ONEAPI_EVOLUTION", "PGSOFT", "PLAYTECH", "PRAGMATICPLAY", "RELAXGAMING", "RTG", "SABA", "SPINIX", "SPRIBE", "YELLOWBAT", "EVOLUTIONNETENT", "EVOLUTION_NETENT"];
|
|
4
5
|
export declare const LEGACY_GAME_PROVIDERS: ["JILI", "PGSOFT", "FACHAI", "BTI", "DG", "PLAYTECH", "E2E", "ONEAPI_EVOLUTION", "CQ9", "JDB", "HABANERO", "SPINIX", "JOKER", "HACKSAW", "EVOLUTIONNETENT", "JDBGTF", "JDBSPRIBE", "MICROGAMING", "RELAXGAMING", "EVOPLAY", "BOOONGO", "BGAMING", "KINGMAKER", "KINGMIDAS", "YELLOWBAT", "ETENGJUE", "SABA", "PRAGMATICPLAY", "SPRIBE", "EZUGI", "ALIZE"];
|
|
@@ -283,12 +283,6 @@ export const GAME_PROVIDER_DATA = {
|
|
|
283
283
|
slug: 'evolution-netent',
|
|
284
284
|
logo: evolutionNetent,
|
|
285
285
|
},
|
|
286
|
-
DIGITAIN: {
|
|
287
|
-
id: 'DIGITAIN',
|
|
288
|
-
name: 'Digitain',
|
|
289
|
-
slug: 'digitain',
|
|
290
|
-
logo: '',
|
|
291
|
-
},
|
|
292
286
|
};
|
|
293
287
|
export const GAME_PROVIDERS = [
|
|
294
288
|
'ALIZE',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { GameType
|
|
1
|
+
import type { GameType } from '@opexa/portal-sdk-core';
|
|
2
|
+
import type { GameTypeData } from '../types';
|
|
2
3
|
export declare const GAME_TYPE_DATA: Record<GameType, GameTypeData>;
|
|
3
4
|
export declare const GAME_TYPES: ["ARCADE", "BINGO", "FISHING", "GAMES", "LIVE", "NUMERICAL", "SLOTS", "SPECIALTY", "SPORTS", "TABLE"];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SecretQuestion } from '
|
|
1
|
+
import type { SecretQuestion } from '@opexa/portal-sdk-core';
|
|
2
2
|
export declare const SECRET_QUESTIONS: ["BEST_CHILDHOOD_FRIEND", "BIRTH_PLACE", "FAVORITE_BOOK", "FAVORITE_MOVIE", "FAVORITE_TEACHER", "FIRST_CAR", "FIRST_PET", "FIRST_SCHOOL", "MOTHERS_MAIDEN_NAME", "PARENTS_MET_CITY"];
|
|
3
3
|
export declare const SECRET_QUESTIONS_MAP: Record<SecretQuestion, string>;
|