@opexa/portal-components 0.1.52 → 0.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/hooks/useCreateGCashStandardCashInWithdrawal.d.ts +4 -4
- package/dist/client/hooks/useCreateGCashStandardCashInWithdrawal.js +8 -8
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.d.ts +4 -4
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.js +8 -8
- package/dist/client/hooks/useGlobalStore.d.ts +8 -2
- package/dist/client/hooks/useGlobalStore.js +27 -1
- package/dist/client/hooks/useRecaptcha.js +3 -1
- package/dist/client/hooks/useRedeemVoucherMutation.js +1 -1
- package/dist/client/hooks/useRequireFirstDepositQuery.js +1 -1
- package/dist/components/Account/Wallet.example.js +1 -1
- package/dist/components/Account/Wallet.js +2 -2
- package/dist/components/AccountInfo/AccountInfo.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/Failed.js +3 -1
- package/dist/components/DepositWithdrawal/Deposit/Voucher/Voucher.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/Voucher/definition.js +2 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +1 -1
- package/dist/components/DepositWithdrawal/PaymentMethods.js +3 -3
- package/dist/components/ForgotPassword/Crazywin/CWForgotPassword.js +1 -1
- package/dist/components/ForgotPassword/Crazywin/CWForgotPasswordForm.js +3 -3
- package/dist/components/ForgotPassword/ForgotPassword.lazy.js +4 -2
- package/dist/components/ForgotPassword/ForgotPasswordForm.js +19 -7
- package/dist/components/GameExit/GameExit.lazy.js +1 -1
- package/dist/components/Games/GamesPagination.js +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +8 -3
- package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageDesktop.js +1 -1
- package/dist/components/KYC/KYCReminder.lazy.js +2 -1
- package/dist/components/NewsFeed/NewsFeedCarousel.js +1 -1
- package/dist/components/ResponsibleGamingLimits/ResponsibleGamingLimits.js +1 -1
- package/dist/components/ResponsibleGamingLimits/ResponsibleGamingLimitsForm.lazy.js +8 -4
- package/dist/components/ResponsibleGamingLimits/index.d.ts +1 -1
- package/dist/components/ResponsibleGamingLimits/index.js +1 -1
- package/dist/components/SignIn/HappyBingo/NameAndPasswordSignIn.js +1 -1
- package/dist/components/SignIn/MobileNumberSignIn.js +4 -1
- package/dist/components/SignIn/SignIn.lazy.d.ts +1 -1
- package/dist/components/SignIn/SignIn.lazy.js +12 -0
- package/dist/components/SignIn/useSignIn.js +1 -1
- package/dist/components/SignUp/SignUpCrazyWin/SignUpCrazyWin.lazy.js +1 -1
- package/dist/components/SignUp/SignUpCrazyWin/SignUpCrazyWinContext.js +1 -1
- package/dist/components/SignUp/SignUpDefault/SignUpDefault.lazy.d.ts +2 -0
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultForm.js +34 -0
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultFormInternational.js +20 -0
- package/dist/components/SignUp/SignUpHappyBingo/SignUpHappyBingoForm.js +3 -1
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.HappyBingo.js +1 -1
- package/dist/components/Tournaments/TournamentsList/TournamentListItemTable.CrazyWin.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecords.suspense.js +1 -1
- package/dist/components/UpdateMobilePhoneNumber/components/Step1MobileNumberForm.js +1 -1
- package/dist/components/UpdateMobilePhoneNumber/hooks/useUpdateMobileFlow.js +1 -2
- package/dist/constants/PisoPayBanks.js +181 -181
- package/dist/handlers/index.d.ts +2 -2
- package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
- package/dist/schemas/forgotPasswordSchema.js +24 -7
- package/dist/services/account.d.ts +3 -0
- package/dist/services/account.js +1 -0
- package/dist/services/auth.d.ts +4 -0
- package/dist/services/auth.js +7 -0
- package/dist/utils/countries/getLocaleInfo.js +1 -2
- package/package.json +1 -1
|
@@ -265,7 +265,7 @@ export function NameAndPasswordSignIn() {
|
|
|
265
265
|
signInMutation.reset();
|
|
266
266
|
form.setValue('secretAnswer', '');
|
|
267
267
|
},
|
|
268
|
-
}) }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.password, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { className: "text-[#344054] dark:text-[#CECFD2]", children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { className: "border-[#D0D5DD] bg-white text-[#101828] dark:border-[#333741] dark:bg-[#1D2939] dark:text-[#F5F5F6]", children: [_jsx(PasswordInput.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, className:
|
|
268
|
+
}) }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.password, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { className: "text-[#344054] dark:text-[#CECFD2]", children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { className: "border-[#D0D5DD] bg-white text-[#101828] dark:border-[#333741] dark:bg-[#1D2939] dark:text-[#F5F5F6]", children: [_jsx(PasswordInput.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, className: "text-[#98A2B3] dark:text-[#94969C]", children: _jsx(EyeIcon, {}) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx("div", { className: "mt-2 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "font-semibold text-[#A15C07] text-sm dark:text-[#CECFD2]", onClick: () => {
|
|
269
269
|
globalStore.forgotPassword.setOpen(true);
|
|
270
270
|
dialog.setOpen(false);
|
|
271
271
|
}, children: "Forgot Password?" }) })] }) }), signInMutation.data && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { variant: "outline", checked: o.field.value, onCheckedChange: (details) => {
|
|
@@ -182,7 +182,7 @@ export function MobileNumberSignIn() {
|
|
|
182
182
|
const step1Form = useForm({
|
|
183
183
|
resolver: zodResolver(Step1Definition),
|
|
184
184
|
defaultValues: {
|
|
185
|
-
mobileNumber: '',
|
|
185
|
+
mobileNumber: globalStore.signIn.prefillMobileNumber ?? '',
|
|
186
186
|
termsAccepted: globalStore.responsibleGaming.accepted &&
|
|
187
187
|
globalStore.termsAndConditions.accepted
|
|
188
188
|
? true
|
|
@@ -200,6 +200,9 @@ export function MobileNumberSignIn() {
|
|
|
200
200
|
globalStore.responsibleGaming.accepted,
|
|
201
201
|
step1Form,
|
|
202
202
|
]);
|
|
203
|
+
useEffect(() => {
|
|
204
|
+
globalStore.signIn.setPrefillMobileNumber(null);
|
|
205
|
+
}, [globalStore.signIn.setPrefillMobileNumber]);
|
|
203
206
|
const step2Form = useForm({
|
|
204
207
|
resolver: zodResolver(Step2Definition),
|
|
205
208
|
defaultValues: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ImageProps } from 'next/image';
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
3
|
import type { VersionSession } from '../../services/auth';
|
|
4
4
|
import type { CountryCode } from '../../utils/countries/types';
|
|
5
5
|
import { type UseSignInProps } from './useSignIn';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useIsMutating } from '@tanstack/react-query';
|
|
4
4
|
import Image, {} from 'next/image';
|
|
5
|
+
import { useEffect } from 'react';
|
|
5
6
|
import { twMerge } from 'tailwind-merge';
|
|
6
7
|
import { useShallow } from 'zustand/shallow';
|
|
7
8
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
@@ -26,6 +27,17 @@ export function SignIn(props) {
|
|
|
26
27
|
const showLoader = mutating &&
|
|
27
28
|
props.versionSession === 'Inplay' &&
|
|
28
29
|
(signIn.type === 'NAME_AND_PASSWORD' || signIn.type === 'MOBILE_NUMBER');
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (signInStore.open && signInStore.pendingType) {
|
|
32
|
+
signIn.setType(signInStore.pendingType);
|
|
33
|
+
signInStore.setPendingType(null);
|
|
34
|
+
}
|
|
35
|
+
}, [
|
|
36
|
+
signInStore.open,
|
|
37
|
+
signInStore.pendingType,
|
|
38
|
+
signInStore.setPendingType,
|
|
39
|
+
signIn,
|
|
40
|
+
]);
|
|
29
41
|
return (_jsx(SignInPropsProvider, { value: props, children: _jsx(SignInProvider, { value: signIn, children: _jsx(Dialog.Root, { open: signInStore.open, onOpenChange: (details) => {
|
|
30
42
|
signInStore.setOpen(details.open);
|
|
31
43
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
@@ -9,7 +9,7 @@ export function useSignIn(props) {
|
|
|
9
9
|
: props.types;
|
|
10
10
|
const defaultActiveType = props?.defaultActiveTab
|
|
11
11
|
? ACTIVE_TAB_TYPE_MAP[props.defaultActiveTab]
|
|
12
|
-
: props?.defaultType ?? ACTIVE_TAB_TYPE_MAP.Mobile;
|
|
12
|
+
: (props?.defaultType ?? ACTIVE_TAB_TYPE_MAP.Mobile);
|
|
13
13
|
const initialType = types.includes(defaultActiveType)
|
|
14
14
|
? defaultActiveType
|
|
15
15
|
: types[0];
|
|
@@ -21,5 +21,5 @@ export function SignUpCrazyWin(props) {
|
|
|
21
21
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
22
22
|
globalStore.termsAndConditions.setAccepted(false);
|
|
23
23
|
globalStore.responsibleGaming.setAccepted(false);
|
|
24
|
-
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('h-full w-full lg:mx-auto lg:grid lg:h-[50rem] lg:w-[44.25rem] lg:grid-cols-2', props.className?.root), children: [_jsx("div", { className: "hidden h-full overflow-hidden rounded-l-xl lg:block", children: _jsx(Image, { src: "https://assets.opexacms.atalos.io/hd48QiKmacXs1XWnY", alt: "login banner", width: 1000, height: 1000, className: "h-full w-full", draggable: false }) }), _jsxs("div", { className:
|
|
24
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('h-full w-full lg:mx-auto lg:grid lg:h-[50rem] lg:w-[44.25rem] lg:grid-cols-2', props.className?.root), children: [_jsx("div", { className: "hidden h-full overflow-hidden rounded-l-xl lg:block", children: _jsx(Image, { src: "https://assets.opexacms.atalos.io/hd48QiKmacXs1XWnY", alt: "login banner", width: 1000, height: 1000, className: "h-full w-full", draggable: false }) }), _jsxs("div", { className: "border-white/10 bg-[radial-gradient(103.87%_100%_at_50.15%_0%,_#072b37_20.3%,_#051125_100%)] backdrop-blur-[25px] lg:rounded-r-xl", children: [_jsx(Dialog.CloseTrigger, { className: "md:-right-10 -top-15 absolute right-2 z-10 size-5.5 rounded-md bg-gradient-to-t from-[#FFE5AF] to-[#EAC467] p-0.5", children: _jsx(XIcon, { className: "h-4.5 w-4.5 text-[#6C5200]" }) }), _jsx(Suspense, { children: _jsx(SignUpCrazyWinForm, {}) })] })] }) })] }) }) }));
|
|
25
25
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createContext } from '../../../client/utils/createContext.js';
|
|
2
|
-
export const [SignUpCrazyWinPropsProvider, useSignUpCrazyWinPropsContext
|
|
2
|
+
export const [SignUpCrazyWinPropsProvider, useSignUpCrazyWinPropsContext] = createContext();
|
|
@@ -2,6 +2,7 @@ import { type ImageProps } from 'next/image';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import type { Branch } from '../../../types';
|
|
4
4
|
import type { CountryCode } from '../../../utils/countries/types';
|
|
5
|
+
import type { VersionSession } from '../../../services/auth';
|
|
5
6
|
export interface ClassNameEntries {
|
|
6
7
|
root?: string;
|
|
7
8
|
publicPlayProhibitionRoot?: string;
|
|
@@ -22,6 +23,7 @@ export interface SignUpDefaultProps {
|
|
|
22
23
|
responsibleGamingLogo?: ImageProps['src'];
|
|
23
24
|
isRegulated?: boolean;
|
|
24
25
|
variant?: string;
|
|
26
|
+
versionSession?: VersionSession;
|
|
25
27
|
showMiddleNameField?: boolean;
|
|
26
28
|
showEmailAddressField?: boolean;
|
|
27
29
|
branchItemToValue?: 'code' | 'name';
|
|
@@ -12,6 +12,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { useShallow } from 'zustand/shallow';
|
|
14
14
|
import { useCooldown } from '../../../client/hooks/useCooldown.js';
|
|
15
|
+
import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
|
|
15
16
|
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
16
17
|
import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
|
|
17
18
|
import { useMobileNumberParser } from '../../../client/hooks/useMobileNumberParser.js';
|
|
@@ -26,6 +27,7 @@ import { HelpCircleIcon } from '../../../icons/HelpCircleIcon.js';
|
|
|
26
27
|
import pagcorLogo from '../../../images/pagcor-round-icon.png';
|
|
27
28
|
import responsibleGamingLogo from '../../../images/responsible-gaming-gold.png';
|
|
28
29
|
import { ObjectType } from '../../../services/ObjectType.js';
|
|
30
|
+
import { checkInplayMemberExists } from '../../../services/auth.js';
|
|
29
31
|
import { Button } from '../../../ui/Button/index.js';
|
|
30
32
|
import { Checkbox } from '../../../ui/Checkbox/index.js';
|
|
31
33
|
import { Field } from '../../../ui/Field/index.js';
|
|
@@ -62,11 +64,14 @@ export function SignUpDefaultForm() {
|
|
|
62
64
|
kyc: ctx.kyc,
|
|
63
65
|
termsOfUse: ctx.termsOfUse,
|
|
64
66
|
setFirstTimeSignUp: ctx.setFirstTimeSignUp,
|
|
67
|
+
setPrefillMobileNumber: ctx.signIn.setPrefillMobileNumber,
|
|
68
|
+
setPendingType: ctx.signIn.setPendingType,
|
|
65
69
|
})));
|
|
66
70
|
const search = useSearchParams();
|
|
67
71
|
const signUpMutation = useSignUpMutation();
|
|
68
72
|
const signInMutation = useSignInMutation();
|
|
69
73
|
const sendVerificationCodeMutation = useSendVerificationCodeMutation();
|
|
74
|
+
const featureFlag = useFeatureFlag();
|
|
70
75
|
const localeInfo = useLocaleInfo();
|
|
71
76
|
const mobileNumberParser = useMobileNumberParser();
|
|
72
77
|
const [branchTipOpen, setBranchTipOpen] = useState(false);
|
|
@@ -241,6 +246,21 @@ export function SignUpDefaultForm() {
|
|
|
241
246
|
}
|
|
242
247
|
return (_jsxs(_Fragment, { children: [step === 1 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "mt-xl text-center font-semibold text-lg", children: "Create an account" }), _jsx("p", { className: "mt-xs text-center text-sm text-text-secondary-700", children: "Register instantly and start playing!" }), _jsxs("form", { className: "mt-3xl", autoComplete: "off", onSubmit: step1Form.handleSubmit(async (data) => {
|
|
243
248
|
try {
|
|
249
|
+
if (signUpProps.versionSession === 'Inplay' &&
|
|
250
|
+
featureFlag.enabled) {
|
|
251
|
+
const exists = await checkInplayMemberExists(mobileNumberParser.format(data.mobileNumber));
|
|
252
|
+
if (exists) {
|
|
253
|
+
toaster.warning({
|
|
254
|
+
description: 'This mobile number is already registered. Please try to log in.',
|
|
255
|
+
});
|
|
256
|
+
globalStore.setPrefillMobileNumber(data.mobileNumber);
|
|
257
|
+
globalStore.setPendingType('MOBILE_NUMBER');
|
|
258
|
+
globalStore.signUp.setOpen(false);
|
|
259
|
+
globalStore.signIn.setOpen(true);
|
|
260
|
+
step1Form.reset();
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
244
264
|
await sendVerificationCodeMutation.mutateAsync({
|
|
245
265
|
channel: 'SMS',
|
|
246
266
|
recipient: mobileNumberParser.format(data.mobileNumber),
|
|
@@ -370,6 +390,20 @@ export function SignUpDefaultForm() {
|
|
|
370
390
|
setStep(1);
|
|
371
391
|
}
|
|
372
392
|
catch (error) {
|
|
393
|
+
if (error instanceof Error &&
|
|
394
|
+
error.name === 'MemberAccountAlreadyExistsError') {
|
|
395
|
+
toaster.warning({
|
|
396
|
+
description: 'This mobile number is already registered. Please try to log in.',
|
|
397
|
+
});
|
|
398
|
+
globalStore.setPrefillMobileNumber(mobileNumber);
|
|
399
|
+
globalStore.setPendingType('MOBILE_NUMBER');
|
|
400
|
+
globalStore.signUp.setOpen(false);
|
|
401
|
+
globalStore.signIn.setOpen(true);
|
|
402
|
+
step1Form.reset();
|
|
403
|
+
step2Form.reset();
|
|
404
|
+
setStep(1);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
373
407
|
toaster.error({
|
|
374
408
|
description: error instanceof Error
|
|
375
409
|
? error.message
|
|
@@ -12,6 +12,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { useShallow } from 'zustand/shallow';
|
|
14
14
|
import { useCooldown } from '../../../client/hooks/useCooldown.js';
|
|
15
|
+
import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
|
|
15
16
|
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
16
17
|
import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
|
|
17
18
|
import { useSendVerificationCodeMutation } from '../../../client/hooks/useSendVerificationCodeMutation.js';
|
|
@@ -25,6 +26,7 @@ import { HelpCircleIcon } from '../../../icons/HelpCircleIcon.js';
|
|
|
25
26
|
import pagcorLogo from '../../../images/pagcor-round-icon.png';
|
|
26
27
|
import responsibleGamingLogo from '../../../images/responsible-gaming-gold.png';
|
|
27
28
|
import { ObjectType } from '../../../services/ObjectType.js';
|
|
29
|
+
import { checkInplayMemberExists } from '../../../services/auth.js';
|
|
28
30
|
import { Button } from '../../../ui/Button/index.js';
|
|
29
31
|
import { Checkbox } from '../../../ui/Checkbox/index.js';
|
|
30
32
|
import { Field } from '../../../ui/Field/index.js';
|
|
@@ -61,11 +63,14 @@ export function SignUpDefaultFormInternational() {
|
|
|
61
63
|
termsAndConditions: ctx.termsAndConditions,
|
|
62
64
|
responsibleGaming: ctx.responsibleGaming,
|
|
63
65
|
kyc: ctx.kyc,
|
|
66
|
+
setPrefillMobileNumber: ctx.signIn.setPrefillMobileNumber,
|
|
67
|
+
setPendingType: ctx.signIn.setPendingType,
|
|
64
68
|
})));
|
|
65
69
|
const search = useSearchParams();
|
|
66
70
|
const signUpMutation = useSignUpMutation();
|
|
67
71
|
const signInMutation = useSignInMutation();
|
|
68
72
|
const sendVerificationCodeMutation = useSendVerificationCodeMutation();
|
|
73
|
+
const featureFlag = useFeatureFlag();
|
|
69
74
|
const firstNameBaseSchema = z
|
|
70
75
|
.string()
|
|
71
76
|
.regex(/^[a-z ]+$/gi, 'First name must contain only letters')
|
|
@@ -175,6 +180,21 @@ export function SignUpDefaultFormInternational() {
|
|
|
175
180
|
const branchCode = step1Form.watch('branchCode', '');
|
|
176
181
|
return (_jsxs(_Fragment, { children: [step === 1 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "mt-xl text-center font-semibold text-lg", children: "Create an account" }), _jsx("p", { className: "mt-xs text-center text-sm text-text-secondary-700", children: "Register instantly and start playing!" }), _jsxs("form", { className: "mt-3xl", autoComplete: "off", onSubmit: step1Form.handleSubmit(async (data) => {
|
|
177
182
|
try {
|
|
183
|
+
if (signUpProps.versionSession === 'Inplay' &&
|
|
184
|
+
featureFlag.enabled) {
|
|
185
|
+
const exists = await checkInplayMemberExists(countryCodeParser(areaCode, data.mobileNumber));
|
|
186
|
+
if (exists) {
|
|
187
|
+
toaster.warning({
|
|
188
|
+
description: 'This mobile number is already registered. Please try to log in.',
|
|
189
|
+
});
|
|
190
|
+
globalStore.setPrefillMobileNumber(countryCodeParser(areaCode, data.mobileNumber));
|
|
191
|
+
globalStore.setPendingType('MOBILE_NUMBER');
|
|
192
|
+
globalStore.signUp.setOpen(false);
|
|
193
|
+
globalStore.signIn.setOpen(true);
|
|
194
|
+
step1Form.reset();
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
178
198
|
await sendVerificationCodeMutation.mutateAsync({
|
|
179
199
|
channel: 'SMS',
|
|
180
200
|
recipient: countryCodeParser(areaCode, data.mobileNumber),
|
|
@@ -131,7 +131,9 @@ export function SignUpHappyBingoForm() {
|
|
|
131
131
|
firstName: '',
|
|
132
132
|
lastName: '',
|
|
133
133
|
mobileNumber: '',
|
|
134
|
-
branchCode: SHARED_BRANCH_CODES.length > 0
|
|
134
|
+
branchCode: SHARED_BRANCH_CODES.length > 0
|
|
135
|
+
? SHARED_BRANCH_CODES[0].code
|
|
136
|
+
: undefined,
|
|
135
137
|
termsAccepted: globalStore.responsibleGaming.accepted &&
|
|
136
138
|
globalStore.termsAndConditions.accepted
|
|
137
139
|
? true
|
package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.HappyBingo.js
CHANGED
|
@@ -34,7 +34,7 @@ export function TournamentsCarouselItemHappyBingo() {
|
|
|
34
34
|
loop: true,
|
|
35
35
|
duration: 0,
|
|
36
36
|
}, [Autoplay()]);
|
|
37
|
-
return (_jsxs("div", { className: "w-full shrink-0 overflow-hidden rounded-2xl border border-[#FEDF89] shadow-[inset_0_0_20px_#FFD238,0_0_10px_#FFD238] lg:shadow-none", children: [_jsx("div", { className: twMerge('bg-[linear-gradient(242deg,#FFD238_1.19%,#FF7D02_100%)]', 'relative flex flex-col p-3 text-center lg:gap-6 lg:p-5'), children: _jsx("div", { className: "relative z-1 flex w-full 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", { className: "w-full", children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsxs("div", { className: twMerge('mb-3.5 inline-flex h-fit items-center gap-1 rounded-full bg-[#FFFAEB] px-2.5 py-1 font-medium text-[#B54708] text-xs shadow-sm dark:bg-[#4E1D09] dark:text-[#FEC84B]'), children: [_jsx(Award01Icon, { className: "size-3" }), _jsx("span", { children: "Multiplier" })] }), _jsxs("div", { className: "flex flex-col", children: [isEnded && (_jsxs("div", { className: twMerge('mb-2 flex flex-col items-center justify-center whitespace-nowrap rounded-md bg-bg-primary px-2 py-1.5 font-semibold text-[#EAAA08] text-sm'), children: [_jsx("span", { className: "font-semibold", children: "Ended" }), _jsx("span", { className: twMerge('text-[9px] text-text-secondary-700'), children: format(tournament.activationEndDateTime, 'MMMM dd, yyyy') })] })), !isLaunchStarts && !isEnded && (_jsx("div", { className: twMerge('mb-2 flex items-center justify-center rounded-md bg-bg-primary py-1 font-semibold text-brand-500 text-sm'), children: "Launching Soon" })), !isEnded && (_jsx("div", { className: "flex h-fit gap-4.5", children: timeParts.map((part) => (_jsx(React.Fragment, { children: _jsxs("div", { className: twMerge('flex h-fit w-9 flex-col items-center rounded-[0.25rem] bg-[linear-gradient(180deg,#FFDE21_0%,#FFD012_47%,#FFBF00_100%)] pb-1.5 text-[#713B12]'), children: [_jsx("span", { className: "font-medium text-xl", children: String(part.value).padStart(2, '0') }), _jsx("span", { className: "text-3xs", children: part.label })] }) }, part.label))) }))] })] }), _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "w-full", children: [_jsx("div", { className:
|
|
37
|
+
return (_jsxs("div", { className: "w-full shrink-0 overflow-hidden rounded-2xl border border-[#FEDF89] shadow-[inset_0_0_20px_#FFD238,0_0_10px_#FFD238] lg:shadow-none", children: [_jsx("div", { className: twMerge('bg-[linear-gradient(242deg,#FFD238_1.19%,#FF7D02_100%)]', 'relative flex flex-col p-3 text-center lg:gap-6 lg:p-5'), children: _jsx("div", { className: "relative z-1 flex w-full 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", { className: "w-full", children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsxs("div", { className: twMerge('mb-3.5 inline-flex h-fit items-center gap-1 rounded-full bg-[#FFFAEB] px-2.5 py-1 font-medium text-[#B54708] text-xs shadow-sm dark:bg-[#4E1D09] dark:text-[#FEC84B]'), children: [_jsx(Award01Icon, { className: "size-3" }), _jsx("span", { children: "Multiplier" })] }), _jsxs("div", { className: "flex flex-col", children: [isEnded && (_jsxs("div", { className: twMerge('mb-2 flex flex-col items-center justify-center whitespace-nowrap rounded-md bg-bg-primary px-2 py-1.5 font-semibold text-[#EAAA08] text-sm'), children: [_jsx("span", { className: "font-semibold", children: "Ended" }), _jsx("span", { className: twMerge('text-[9px] text-text-secondary-700'), children: format(tournament.activationEndDateTime, 'MMMM dd, yyyy') })] })), !isLaunchStarts && !isEnded && (_jsx("div", { className: twMerge('mb-2 flex items-center justify-center rounded-md bg-bg-primary py-1 font-semibold text-brand-500 text-sm'), children: "Launching Soon" })), !isEnded && (_jsx("div", { className: "flex h-fit gap-4.5", children: timeParts.map((part) => (_jsx(React.Fragment, { children: _jsxs("div", { className: twMerge('flex h-fit w-9 flex-col items-center rounded-[0.25rem] bg-[linear-gradient(180deg,#FFDE21_0%,#FFD012_47%,#FFBF00_100%)] pb-1.5 text-[#713B12]'), children: [_jsx("span", { className: "font-medium text-xl", children: String(part.value).padStart(2, '0') }), _jsx("span", { className: "text-3xs", children: part.label })] }) }, part.label))) }))] })] }), _jsx("div", { className: "flex w-full justify-between", children: _jsxs("div", { className: "w-full", children: [_jsx("div", { className: "w-1/2 text-left font-bold text-lg lg:w-[68%] lg:text-2xl", children: tournament.name }), _jsx("div", { className: "mt-1.5 w-fit rounded-md bg-[linear-gradient(180deg,#FFDE21_0%,#FFD012_47%,#FFBF00_100%)] px-2 py-1 font-bold text-2xl text-[#713B12] lg:mt-2 lg:text-4xl", children: formatNumber(tournamentReward, {
|
|
38
38
|
currency: localeInfo.currency.code,
|
|
39
39
|
minDecimalPlaces: 2,
|
|
40
40
|
maxDecimalPlaces: 2,
|
|
@@ -89,6 +89,6 @@ export const TournamentTable = ({ leaderboard, rewardSettings, winnersCount, })
|
|
|
89
89
|
return (_jsx(TableRow, { winner: item, rank: globalRank, idx: idx }, item.id || `winner-${globalRank}`));
|
|
90
90
|
}) })] }) }));
|
|
91
91
|
};
|
|
92
|
-
return (_jsxs("div", { className: "mt-4 flex flex-col gap-0 lg:gap-7", children: [_jsx("div", { className: "flex gap-[10px]", children: Array.from({ length: tablesPerPage }, (_, tableIndex) => (_jsx(Table, { tableIndex: tableIndex }, tableIndex))) }), _jsxs("div", { className:
|
|
92
|
+
return (_jsxs("div", { className: "mt-4 flex flex-col gap-0 lg:gap-7", children: [_jsx("div", { className: "flex gap-[10px]", children: Array.from({ length: tablesPerPage }, (_, tableIndex) => (_jsx(Table, { tableIndex: tableIndex }, tableIndex))) }), _jsxs("div", { className: "hidden items-center justify-between pb-4 pl-1 text-[#CECFD2] text-sm lg:flex", children: [_jsxs("div", { className: "font-medium", children: ["Page ", currentPage, " of ", numberOfPages] }), _jsxs("div", { className: "flex gap-3 font-semibold", children: [_jsx("button", { type: "button", onClick: goPrev, disabled: !canGoPrev, className: "rounded-lg border border-[#333741] px-[14px] py-2 disabled:cursor-not-allowed disabled:text-[#98A2B3]", children: "Previous" }), _jsx("button", { type: "button", onClick: goNext, disabled: !canGoNext, className: "rounded-lg border border-[#333741] px-[14px] py-2 disabled:cursor-not-allowed disabled:text-[#98A2B3]", children: "Next" })] })] }), _jsxs("div", { className: "flex items-center justify-between rounded-b-lg border-none bg-[#0C111D] px-4 py-3 text-sm lg:hidden", children: [_jsxs("button", { type: "button", onClick: goPrev, disabled: !canGoPrev, className: "flex h-9 w-9 items-center justify-center rounded-lg border border-[#333741] bg-[#0C111D] text-[#CECFD2] disabled:cursor-not-allowed disabled:text-[#85888E]", children: [_jsx("span", { className: "sr-only", children: "Previous" }), _jsx(ArrowLeftIcon, { className: "size-5" })] }), _jsxs("p", { className: "text-[#CECFD2]", children: ["Page ", currentPage, " of ", numberOfPages] }), _jsxs("button", { type: "button", onClick: goNext, disabled: !canGoNext, className: "flex h-9 w-9 items-center justify-center rounded-lg border border-[#333741] bg-[#0C111D] text-[#CECFD2] disabled:cursor-not-allowed disabled:text-[#85888E]", children: [_jsx("span", { className: "sr-only", children: "Next" }), _jsx(ArrowRightIcon, { className: "size-5" })] })] })] }));
|
|
93
93
|
};
|
|
94
94
|
export default TournamentTable;
|
|
@@ -30,7 +30,7 @@ export function TransactionRecords__suspense(props) {
|
|
|
30
30
|
? {
|
|
31
31
|
transactionRecordsTable: props.className,
|
|
32
32
|
depositRecordsTable: props.className,
|
|
33
|
-
withdrawalRecordsTable: props.className
|
|
33
|
+
withdrawalRecordsTable: props.className,
|
|
34
34
|
}
|
|
35
35
|
: (props.className ?? {});
|
|
36
36
|
return (_jsx(TransactionPropsContext, { value: props, children: _jsxs("div", { className: typeof props.className === 'string' ? props.className : undefined, children: [_jsx("h2", { className: "font-semibold text-sm leading-tight lg:text-lg", children: "Transactions" }), _jsx("p", { className: "mt-xs text-sm text-text-tertiary-600 leading-tight", children: "View your transaction records" }), _jsxs(Tabs.Root, { className: "mt-lg lg:mt-2xl", value: tab, onValueChange: (details) => setTab(TabSchema.parse(details.value)), lazyMount: true, unmountOnExit: true, children: [_jsxs(Tabs.List, { children: [_jsx(Tabs.Trigger, { value: "transactions", children: "All Transactions" }), _jsx(Tabs.Trigger, { value: "deposits", children: "Deposits" }), _jsx(Tabs.Trigger, { value: "withdrawals", children: "Withdrawals" }), _jsx(Tabs.Indicator, {})] }), _jsx("div", { className: "mt-2xl hidden border-[1.5px] border-border-secondary border-t lg:block" }), _jsx("h3", { className: "mt-3xl font-semibold text-sm text-text-secondary-700", children: "Table" }), _jsx(Tabs.Content, { value: "transactions", className: "mt-xl", children: _jsx(TransactionRecordsTable, { className: classNames.transactionRecordsTable }) }), _jsx(Tabs.Content, { value: "deposits", className: "mt-xl", children: _jsx(Suspense, { fallback: null, children: _jsx(DepositRecordsTable, { className: classNames.depositRecordsTable }) }) }), _jsx(Tabs.Content, { value: "withdrawals", className: "mt-xl", children: _jsx(Suspense, { fallback: null, children: _jsx(WithdrawalRecordsTable, { className: classNames.withdrawalRecordsTable }) }) })] })] }) }));
|
|
@@ -6,7 +6,7 @@ import { Field } from '../../../ui/Field/index.js';
|
|
|
6
6
|
import { LogoutButton } from './LogoutButton.js';
|
|
7
7
|
export function Step1MobileNumberForm({ step1Form, submitStep1, }) {
|
|
8
8
|
const localeInfo = useLocaleInfo();
|
|
9
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className:
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex flex-col items-center justify-center gap-1", children: [_jsx("h2", { className: "mt-xl text-center font-semibold text-lg", children: "Verify Your Account" }), _jsx("div", { className: "text-text-secondary-700 text-xs", children: "Please enter your mobile phone number to verify your account." })] }), _jsxs("form", { className: "mt-3xl", onSubmit: submitStep1, children: [_jsxs(Field.Root, { invalid: !!step1Form.formState.errors.mobileNumber, className: "text-left", children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx("div", { className: "-translate-y-1/2 absolute top-1/2 left-3.5 flex shrink-0 items-center gap-md", children: _jsx("span", { className: "text-text-placeholder", children: localeInfo.mobileNumber.areaCode }) }), _jsx(Field.Input, { style: {
|
|
10
10
|
paddingLeft: `calc(1.25rem + ${localeInfo.mobileNumber.areaCode.length}ch)`,
|
|
11
11
|
}, ...step1Form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: step1Form.formState.errors.mobileNumber?.message })] }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: step1Form.formState.isSubmitting, children: "Send Code" }), _jsx(LogoutButton, {})] })] }));
|
|
12
12
|
}
|
|
@@ -48,8 +48,7 @@ export function useUpdateMobileFlow(shouldOnlyShow = 'MobileVerified') {
|
|
|
48
48
|
: undefined);
|
|
49
49
|
useTimeout(() => {
|
|
50
50
|
globalStore.updateMobilePhoneNumber.setOpen(false);
|
|
51
|
-
}, pollForMobileVerified &&
|
|
52
|
-
accountQuery.data?.mobileNumberVerified === true
|
|
51
|
+
}, pollForMobileVerified && accountQuery.data?.mobileNumberVerified === true
|
|
53
52
|
? 1
|
|
54
53
|
: null);
|
|
55
54
|
const mobileNumberParser = useMobileNumberParser();
|