@opexa/portal-components 0.0.531 → 0.0.532
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/useSignUpByNameMutation.d.ts +5 -0
- package/dist/client/hooks/useSignUpByNameMutation.js +39 -0
- package/dist/components/SignIn/SignIn.lazy.d.ts +2 -1
- package/dist/components/SignIn/SignIn.lazy.js +1 -1
- package/dist/components/SignIn/SignInMethod.js +1 -1
- package/dist/components/SignIn/useSignIn.d.ts +6 -4
- package/dist/components/SignIn/useSignIn.js +2 -2
- package/dist/components/SignUp/SignUp.d.ts +2 -1
- package/dist/components/SignUp/SignUp.js +7 -0
- package/dist/components/SignUp/SignUpNameAndPassword/SignUpNameAndPassword.lazy.d.ts +22 -0
- package/dist/components/SignUp/SignUpNameAndPassword/SignUpNameAndPassword.lazy.js +25 -0
- package/dist/components/SignUp/SignUpNameAndPassword/SignUpNameAndPasswordContext.d.ts +6 -0
- package/dist/components/SignUp/SignUpNameAndPassword/SignUpNameAndPasswordContext.js +2 -0
- package/dist/components/SignUp/SignUpNameAndPassword/SignUpNameAndPasswordForm.d.ts +1 -0
- package/dist/components/SignUp/SignUpNameAndPassword/SignUpNameAndPasswordForm.js +288 -0
- package/dist/constants/EnvVar.d.ts +1 -1
- package/dist/services/account.d.ts +7 -1
- package/dist/services/account.js +9 -3
- package/dist/services/queries.d.ts +1 -1
- package/dist/services/queries.js +2 -2
- package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
- 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 +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/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +306 -306
- package/dist/ui/Menu/menu.recipe.d.ts +17 -17
- package/dist/ui/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/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/QrCode/QrCode.d.ts +40 -40
- package/dist/ui/QrCode/qrCode.recipe.d.ts +8 -8
- 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/DigitainLauncher/Loading.d.ts +0 -1
- package/dist/components/DigitainLauncher/Loading.js +0 -5
- 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/icons/LinkBrokenIcon.d.ts +0 -2
- package/dist/icons/LinkBrokenIcon.js +0 -4
- package/dist/images/responsible-gaming-yellow.png +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type RegisterMemberAccountByNameInput } from '../../services/account';
|
|
2
|
+
import type { Mutation } from '../../types';
|
|
3
|
+
export interface SignUpByNameMutationInput extends Omit<RegisterMemberAccountByNameInput, 'btag' | 'cellxpertCxd'> {
|
|
4
|
+
}
|
|
5
|
+
export declare const useSignUpByNameMutation: Mutation<void, SignUpByNameMutationInput>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { useReCaptcha } from 'next-recaptcha-v3';
|
|
3
|
+
import { RECAPTCHA_HEADER_KEY } from '../../constants/index.js';
|
|
4
|
+
import { registerMemberAccountByName, } from '../../services/account.js';
|
|
5
|
+
import { getSignUpMutationKey } from '../../utils/mutationKeys.js';
|
|
6
|
+
import { getSession } from '../services/getSession.js';
|
|
7
|
+
import { useCellxpertCxd } from './useCellxpertCxd.js';
|
|
8
|
+
export const useSignUpByNameMutation = (config) => {
|
|
9
|
+
const recaptcha = useReCaptcha();
|
|
10
|
+
const [cellxpertCxd] = useCellxpertCxd();
|
|
11
|
+
return useMutation({
|
|
12
|
+
...config,
|
|
13
|
+
mutationKey: getSignUpMutationKey(),
|
|
14
|
+
mutationFn: async (input) => {
|
|
15
|
+
const session = await getSession();
|
|
16
|
+
const token = recaptcha.reCaptchaKey
|
|
17
|
+
? await recaptcha.executeRecaptcha('submit')
|
|
18
|
+
: null;
|
|
19
|
+
return await registerMemberAccountByName({
|
|
20
|
+
...input,
|
|
21
|
+
...(session.btag && {
|
|
22
|
+
btag: session.btag,
|
|
23
|
+
}),
|
|
24
|
+
...(cellxpertCxd && {
|
|
25
|
+
cellxpertCxd: cellxpertCxd.value,
|
|
26
|
+
}),
|
|
27
|
+
}, {
|
|
28
|
+
headers: {
|
|
29
|
+
...(token && {
|
|
30
|
+
[RECAPTCHA_HEADER_KEY]: token,
|
|
31
|
+
}),
|
|
32
|
+
...(session.domain && {
|
|
33
|
+
Domain: session.domain,
|
|
34
|
+
}),
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type ImageProps } from 'next/image';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
+
import { type UseSignInProps } from './useSignIn';
|
|
3
4
|
export interface ClassNameEntries {
|
|
4
5
|
root?: string;
|
|
5
6
|
publicPlayProhibitionRoot?: string;
|
|
6
7
|
publicPlayProhibitionLogoContainer?: string;
|
|
7
8
|
}
|
|
8
|
-
export interface SignInProps {
|
|
9
|
+
export interface SignInProps extends UseSignInProps {
|
|
9
10
|
logo: ImageProps['src'];
|
|
10
11
|
pagcorLogo?: ImageProps['src'];
|
|
11
12
|
responsibleGamingLogo?: ImageProps['src'];
|
|
@@ -11,7 +11,7 @@ import { SignInPropsProvider, SignInProvider } from './SignInContext.js';
|
|
|
11
11
|
import { SignInForm } from './SignInForm.js';
|
|
12
12
|
import { useSignIn } from './useSignIn.js';
|
|
13
13
|
export function SignIn(props) {
|
|
14
|
-
const signIn = useSignIn();
|
|
14
|
+
const signIn = useSignIn(props);
|
|
15
15
|
const signInStore = useGlobalStore(useShallow((ctx) => ctx.signIn));
|
|
16
16
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
17
17
|
termsAndConditions: ctx.termsAndConditions,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
type SignInStep = 1 | 2 | (number & {});
|
|
2
|
-
type SignInType = 'NAME_AND_PASSWORD' | 'MOBILE_NUMBER';
|
|
1
|
+
export type SignInStep = 1 | 2 | (number & {});
|
|
2
|
+
export type SignInType = 'NAME_AND_PASSWORD' | 'MOBILE_NUMBER';
|
|
3
|
+
export interface UseSignInProps {
|
|
4
|
+
defaultType?: SignInType;
|
|
5
|
+
}
|
|
3
6
|
export interface UseSignInReturn {
|
|
4
7
|
step: SignInStep;
|
|
5
8
|
setStep: (step: SignInStep) => void;
|
|
6
9
|
type: SignInType;
|
|
7
10
|
setType: (type: SignInType) => void;
|
|
8
11
|
}
|
|
9
|
-
export declare function useSignIn(): UseSignInReturn;
|
|
10
|
-
export {};
|
|
12
|
+
export declare function useSignIn(props?: UseSignInProps): UseSignInReturn;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
export function useSignIn() {
|
|
2
|
+
export function useSignIn(props) {
|
|
3
3
|
const [step, setStep] = useState(1);
|
|
4
|
-
const [type, setType] = useState('MOBILE_NUMBER');
|
|
4
|
+
const [type, setType] = useState(props?.defaultType ?? 'MOBILE_NUMBER');
|
|
5
5
|
return {
|
|
6
6
|
step,
|
|
7
7
|
setStep,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SignUpDefaultProps } from './SignUpDefault/SignUpDefault.lazy';
|
|
2
2
|
import type { SignUpKYCProps } from './SignUpKYC/SignUpKYC.lazy';
|
|
3
|
-
|
|
3
|
+
import type { SignUpNameAndPasswordProps } from './SignUpNameAndPassword/SignUpNameAndPassword.lazy';
|
|
4
|
+
export type SignUpProps = SignUpDefaultProps | SignUpKYCProps | SignUpNameAndPasswordProps;
|
|
4
5
|
export declare function SignUp(props: SignUpProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -11,6 +11,10 @@ const SignUpKYC = dynamic(() => import('./SignUpKYC/SignUpKYC.lazy.js').then((m)
|
|
|
11
11
|
ssr: false,
|
|
12
12
|
loading: () => null,
|
|
13
13
|
});
|
|
14
|
+
const SignUpNameAndPassword = dynamic(() => import('./SignUpNameAndPassword/SignUpNameAndPassword.lazy.js').then((m) => m.SignUpNameAndPassword), {
|
|
15
|
+
ssr: false,
|
|
16
|
+
loading: () => null,
|
|
17
|
+
});
|
|
14
18
|
export function SignUp(props) {
|
|
15
19
|
const touched = useGlobalStore(useShallow((ctx) => ctx.signUp['~touched']));
|
|
16
20
|
if (!touched) {
|
|
@@ -19,6 +23,9 @@ export function SignUp(props) {
|
|
|
19
23
|
else if (props.layout === 'kyc') {
|
|
20
24
|
return _jsx(SignUpKYC, { ...props });
|
|
21
25
|
}
|
|
26
|
+
else if (props.layout === 'nameAndPassword') {
|
|
27
|
+
return _jsx(SignUpNameAndPassword, { ...props });
|
|
28
|
+
}
|
|
22
29
|
else {
|
|
23
30
|
return _jsx(SignUpDefault, { ...props });
|
|
24
31
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ImageProps } from 'next/image';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import type { Branch } from '../../../types';
|
|
4
|
+
export interface ClassNameEntries {
|
|
5
|
+
root?: string;
|
|
6
|
+
publicPlayProhibitionRoot?: string;
|
|
7
|
+
publicPlayProhibitionLogoContainer?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SignUpNameAndPasswordProps {
|
|
10
|
+
layout: 'nameAndPassword';
|
|
11
|
+
logo: ImageProps['src'];
|
|
12
|
+
branches?: Branch[];
|
|
13
|
+
termsAndConditionsUrl?: string;
|
|
14
|
+
responsibleGamingUrl?: string;
|
|
15
|
+
className?: ClassNameEntries;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
showPublicPlayProhibition?: boolean;
|
|
18
|
+
pagcorLogo?: ImageProps['src'];
|
|
19
|
+
responsibleGamingLogo?: ImageProps['src'];
|
|
20
|
+
isRegulated?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function SignUpNameAndPassword(props: SignUpNameAndPasswordProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image, {} from 'next/image';
|
|
4
|
+
import { Suspense } from 'react';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { useShallow } from 'zustand/shallow';
|
|
7
|
+
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
8
|
+
import { XIcon } from '../../../icons/XIcon.js';
|
|
9
|
+
import { Dialog } from '../../../ui/Dialog/index.js';
|
|
10
|
+
import { Portal } from '../../../ui/Portal/index.js';
|
|
11
|
+
import { SignUpNameAndPasswordPropsProvider } from './SignUpNameAndPasswordContext.js';
|
|
12
|
+
import { SignUpNameAndPasswordForm } from './SignUpNameAndPasswordForm.js';
|
|
13
|
+
export function SignUpNameAndPassword(props) {
|
|
14
|
+
const signUpStore = useGlobalStore(useShallow((ctx) => ctx.signUp));
|
|
15
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
16
|
+
termsAndConditions: ctx.termsAndConditions,
|
|
17
|
+
responsibleGaming: ctx.responsibleGaming,
|
|
18
|
+
})));
|
|
19
|
+
return (_jsx(SignUpNameAndPasswordPropsProvider, { value: props, children: _jsx(Dialog.Root, { open: signUpStore.open, onOpenChange: (details) => {
|
|
20
|
+
signUpStore.setOpen(details.open);
|
|
21
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
22
|
+
globalStore.termsAndConditions.setAccepted(false);
|
|
23
|
+
globalStore.responsibleGaming.setAccepted(false);
|
|
24
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('mx-auto h-full w-full items-start overflow-y-auto bg-bg-primary-alt p-3xl pb-4xl lg:h-auto lg:max-h-[80vh] lg:w-[400px] lg:rounded-xl', 'scrollbar:h-2 scrollbar:w-2 scrollbar-thumb:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent', props.className?.root), style: { msOverflowStyle: 'none', scrollbarWidth: 'none' }, children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsx(Suspense, { children: _jsx(SignUpNameAndPasswordForm, {}) })] }) })] }) }) }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SignUpNameAndPasswordProps } from './SignUpNameAndPassword.lazy';
|
|
2
|
+
export declare const SignUpNameAndPasswordPropsProvider: (props: {
|
|
3
|
+
value: SignUpNameAndPasswordProps;
|
|
4
|
+
} & {
|
|
5
|
+
children?: import("react").ReactNode | undefined;
|
|
6
|
+
}) => React.ReactNode, useSignUpNameAndPasswordPropsContext: () => SignUpNameAndPasswordProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SignUpNameAndPasswordForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { createListCollection, parseDate } from '@ark-ui/react';
|
|
4
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
5
|
+
import { ObjectId } from '@opexa/object-id';
|
|
6
|
+
import { differenceInYears, format } from 'date-fns';
|
|
7
|
+
import Image from 'next/image';
|
|
8
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
9
|
+
import { Controller, useForm } from 'react-hook-form';
|
|
10
|
+
import { twMerge } from 'tailwind-merge';
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
import { useShallow } from 'zustand/shallow';
|
|
13
|
+
import { useControllableState } from '../../../client/hooks/useControllableState.js';
|
|
14
|
+
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
15
|
+
import { useSignInMutation } from '../../../client/hooks/useSignInMutation.js';
|
|
16
|
+
import { useSignUpByNameMutation } from '../../../client/hooks/useSignUpByNameMutation.js';
|
|
17
|
+
import { toaster } from '../../../client/utils/toaster.js';
|
|
18
|
+
import { CalendarIcon } from '../../../icons/CalendarIcon.js';
|
|
19
|
+
import { CheckIcon } from '../../../icons/CheckIcon.js';
|
|
20
|
+
import { ChevronDownIcon } from '../../../icons/ChevronDownIcon.js';
|
|
21
|
+
import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
|
|
22
|
+
import { ChevronRightIcon } from '../../../icons/ChevronRightIcon.js';
|
|
23
|
+
import { HelpCircleIcon } from '../../../icons/HelpCircleIcon.js';
|
|
24
|
+
import pagcorLogo from '../../../images/pagcor-round-icon.png';
|
|
25
|
+
import responsibleGamingLogo from '../../../images/responsible-gaming-gold.png';
|
|
26
|
+
import { ObjectType } from '../../../services/ObjectType.js';
|
|
27
|
+
import { sha256 } from '../../../services/sha256.js';
|
|
28
|
+
import { Button } from '../../../ui/Button/index.js';
|
|
29
|
+
import { Checkbox } from '../../../ui/Checkbox/index.js';
|
|
30
|
+
import { DatePicker } from '../../../ui/DatePicker/index.js';
|
|
31
|
+
import { Field } from '../../../ui/Field/index.js';
|
|
32
|
+
import { Select } from '../../../ui/Select/index.js';
|
|
33
|
+
import { Tooltip } from '../../../ui/Tooltip/index.js';
|
|
34
|
+
import { createPoll } from '../../../utils/createPoll.js';
|
|
35
|
+
import { useSignUpNameAndPasswordPropsContext } from './SignUpNameAndPasswordContext.js';
|
|
36
|
+
export function SignUpNameAndPasswordForm() {
|
|
37
|
+
const signUpProps = useSignUpNameAndPasswordPropsContext();
|
|
38
|
+
const signInMutation = useSignInMutation();
|
|
39
|
+
const signUpMutation = useSignUpByNameMutation();
|
|
40
|
+
const branchCollection = createListCollection({
|
|
41
|
+
items: signUpProps.branches ?? [],
|
|
42
|
+
itemToValue: (item) => item.code,
|
|
43
|
+
itemToString: (item) => `${item.code} - ${item.name}`,
|
|
44
|
+
});
|
|
45
|
+
const router = useRouter();
|
|
46
|
+
const search = useSearchParams();
|
|
47
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
48
|
+
kycReminder: ctx.kycReminder,
|
|
49
|
+
signIn: ctx.signIn,
|
|
50
|
+
signUp: ctx.signUp,
|
|
51
|
+
termsAndConditions: ctx.termsAndConditions,
|
|
52
|
+
responsibleGaming: ctx.responsibleGaming,
|
|
53
|
+
kyc: ctx.kyc,
|
|
54
|
+
})));
|
|
55
|
+
const definition = z.object({
|
|
56
|
+
name: z
|
|
57
|
+
.string()
|
|
58
|
+
.trim()
|
|
59
|
+
.min(5, 'Name must be 5 or more characters')
|
|
60
|
+
.max(100, 'Name must not be more that 100 characters'),
|
|
61
|
+
password: z
|
|
62
|
+
.string()
|
|
63
|
+
.trim()
|
|
64
|
+
.min(8, 'Password must be 8 or more characters')
|
|
65
|
+
.max(100, 'Password must not be more that 100 characters'),
|
|
66
|
+
termsAccepted: z.boolean().superRefine((v, ctx) => {
|
|
67
|
+
if (!v) {
|
|
68
|
+
ctx.addIssue({
|
|
69
|
+
code: z.ZodIssueCode.custom,
|
|
70
|
+
message: 'You must accept the terms and conditions and the responsible gaming guidelines',
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}),
|
|
74
|
+
firstName: z
|
|
75
|
+
.string()
|
|
76
|
+
.regex(/^[a-z ]+$/gi, 'First name must contain only letters')
|
|
77
|
+
.transform((val) => val.trim())
|
|
78
|
+
.refine((val) => val.length >= 2, {
|
|
79
|
+
message: 'First name must be 2 or more characters',
|
|
80
|
+
})
|
|
81
|
+
.refine((val) => val.length <= 50, {
|
|
82
|
+
message: 'First name must not be more than 50 characters',
|
|
83
|
+
}),
|
|
84
|
+
lastName: z
|
|
85
|
+
.string()
|
|
86
|
+
.regex(/^[a-z ]+$/gi, 'Last name must contain only letters')
|
|
87
|
+
.transform((val) => val.trim())
|
|
88
|
+
.refine((val) => val.length >= 2, {
|
|
89
|
+
message: 'Last name must be 2 or more characters',
|
|
90
|
+
})
|
|
91
|
+
.refine((val) => val.length <= 50, {
|
|
92
|
+
message: 'Last name must not be more than 50 characters',
|
|
93
|
+
}),
|
|
94
|
+
birthDay: z
|
|
95
|
+
.date({
|
|
96
|
+
invalid_type_error: 'Date of birth is required',
|
|
97
|
+
required_error: 'Date of birth is required',
|
|
98
|
+
})
|
|
99
|
+
.superRefine((val, ctx) => {
|
|
100
|
+
const now = new Date();
|
|
101
|
+
const age = differenceInYears(now, val);
|
|
102
|
+
if (age < 21) {
|
|
103
|
+
return ctx.addIssue({
|
|
104
|
+
code: z.ZodIssueCode.custom,
|
|
105
|
+
message: 'You must be at least 21 years old',
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}),
|
|
109
|
+
branchCode: (signUpProps?.branches ?? []).length > 0
|
|
110
|
+
? z.string().min(1, 'Branch is required').trim()
|
|
111
|
+
: z.string().optional(),
|
|
112
|
+
});
|
|
113
|
+
const form = useForm({
|
|
114
|
+
mode: 'all',
|
|
115
|
+
resolver: zodResolver(definition),
|
|
116
|
+
defaultValues: {
|
|
117
|
+
name: '',
|
|
118
|
+
password: '',
|
|
119
|
+
firstName: '',
|
|
120
|
+
lastName: '',
|
|
121
|
+
branchCode: signUpProps?.branches?.length
|
|
122
|
+
? signUpProps.branches[0]?.code
|
|
123
|
+
: '',
|
|
124
|
+
termsAccepted: globalStore.responsibleGaming.accepted &&
|
|
125
|
+
globalStore.termsAndConditions.accepted
|
|
126
|
+
? true
|
|
127
|
+
: false,
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
return (_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: form.handleSubmit(async (data) => {
|
|
131
|
+
const id = ObjectId.generate(ObjectType.MemberAccount).toString();
|
|
132
|
+
const name = data.name;
|
|
133
|
+
const password = await sha256(data.password);
|
|
134
|
+
try {
|
|
135
|
+
await signUpMutation.mutateAsync({
|
|
136
|
+
id,
|
|
137
|
+
name,
|
|
138
|
+
password,
|
|
139
|
+
realName: `${data.firstName} ${data.lastName}`,
|
|
140
|
+
birthDay: format(data.birthDay, 'yyyy-MM-dd'),
|
|
141
|
+
branchCode: signUpProps?.branches?.length && data.branchCode
|
|
142
|
+
? data.branchCode
|
|
143
|
+
: '',
|
|
144
|
+
referralCode: search.get('referralCode') ?? undefined,
|
|
145
|
+
});
|
|
146
|
+
const pollLogin = createPoll(async () => {
|
|
147
|
+
try {
|
|
148
|
+
await signInMutation.mutateAsync({
|
|
149
|
+
type: 'NAME_AND_PASSWORD',
|
|
150
|
+
name,
|
|
151
|
+
password,
|
|
152
|
+
});
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
}, {
|
|
159
|
+
until: (ok) => ok,
|
|
160
|
+
maxAttempt: 5,
|
|
161
|
+
});
|
|
162
|
+
const ok = await pollLogin();
|
|
163
|
+
if (!ok) {
|
|
164
|
+
globalStore.signIn.setOpen(true);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
globalStore.signUp.setOpen(false);
|
|
168
|
+
globalStore.kyc.setOpen(true);
|
|
169
|
+
form.reset();
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
toaster.error({
|
|
173
|
+
description: error instanceof Error ? error.message : 'Something went wrong',
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}), children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.name, className: "mt-xl", children: [_jsx(Field.Label, { children: "Name" }), _jsx(Field.Input, { placeholder: "Enter your name", ...form.register('name') }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.password, className: "mt-xl", children: [_jsx(Field.Label, { children: "Password" }), _jsx(Field.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.firstName, className: "mt-xl", children: [_jsx(Field.Label, { children: "First Name" }), _jsx(Field.Input, { placeholder: "Enter your first name", ...form.register('firstName') }), _jsx(Field.ErrorText, { children: form.formState.errors.firstName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.lastName, className: "mt-xl", children: [_jsx(Field.Label, { children: "Last Name" }), _jsx(Field.Input, { placeholder: "Enter your last name", ...form.register('lastName') }), _jsx(Field.ErrorText, { children: form.formState.errors.lastName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.birthDay, className: "mt-xl", children: [_jsx(DateOfBirthField, { value: form.watch('birthDay'), onChange: (value) => {
|
|
177
|
+
if (!value)
|
|
178
|
+
return;
|
|
179
|
+
form.setValue('birthDay', value, {
|
|
180
|
+
shouldDirty: true,
|
|
181
|
+
shouldTouch: true,
|
|
182
|
+
shouldValidate: true,
|
|
183
|
+
});
|
|
184
|
+
}, onBlur: () => {
|
|
185
|
+
form.trigger('birthDay');
|
|
186
|
+
} }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), signUpProps.branches && (_jsxs(Field.Root, { invalid: !!form.formState.errors.branchCode, className: "mt-xl", children: [_jsxs(Select.Root, { value: [form.watch('branchCode') ?? ''], onValueChange: (details) => {
|
|
187
|
+
form.setValue('branchCode', details.value?.[0], {
|
|
188
|
+
shouldDirty: true,
|
|
189
|
+
shouldTouch: true,
|
|
190
|
+
shouldValidate: true,
|
|
191
|
+
});
|
|
192
|
+
}, collection: branchCollection, positioning: {
|
|
193
|
+
sameWidth: true,
|
|
194
|
+
placement: 'bottom',
|
|
195
|
+
}, lazyMount: true, unmountOnExit: true, children: [_jsxs(Select.Label, { className: "flex items-center gap-1", children: ["Branch", _jsxs(Tooltip.Root, { openDelay: 0, closeDelay: 100, lazyMount: true, unmountOnExit: true, positioning: {
|
|
196
|
+
placement: 'top',
|
|
197
|
+
}, children: [_jsx(Tooltip.Trigger, { asChild: true, children: _jsx(HelpCircleIcon, { className: "size-4 text-text-nav-item-button-icon" }) }), _jsx(Tooltip.Positioner, { children: _jsxs(Tooltip.Content, { children: [_jsx(Tooltip.Arrow, { children: _jsx(Tooltip.ArrowTip, {}) }), "Choose branch closest to your residence."] }) })] })] }), _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: branchCollection.items.map((item) => {
|
|
198
|
+
const label = branchCollection.stringifyItem(item) ?? '';
|
|
199
|
+
return (_jsx(Select.Item, { item: item, "aria-disabled": item.disabled, className: twMerge(item.disabled && 'text-border-disabled'), children: _jsx("div", { title: label, className: "line-clamp-1", children: label }) }, item.code));
|
|
200
|
+
}) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.branchCode?.message })] })), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { className: "mt-2xl", invalid: o.fieldState.invalid, children: [_jsxs(Checkbox.Root, { checked: o.field.value, onCheckedChange: (details) => {
|
|
201
|
+
if (details.checked === 'indeterminate')
|
|
202
|
+
return;
|
|
203
|
+
o.field.onChange(details.checked);
|
|
204
|
+
globalStore.termsAndConditions.setAccepted(details.checked);
|
|
205
|
+
globalStore.responsibleGaming.setAccepted(details.checked);
|
|
206
|
+
}, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsxs(Checkbox.Label, { children: ["I am at least 21 years of age and I have read and accept the", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
207
|
+
if (signUpProps.termsAndConditionsUrl) {
|
|
208
|
+
globalStore.signUp.setOpen(false);
|
|
209
|
+
router.push(signUpProps.termsAndConditionsUrl);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
globalStore.termsAndConditions.setOpen(true);
|
|
213
|
+
globalStore.termsAndConditions.setNext('SIGN_UP');
|
|
214
|
+
globalStore.signUp.setOpen(false);
|
|
215
|
+
}
|
|
216
|
+
}, children: "Terms and Conditions" }), ' ', "and", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
217
|
+
if (signUpProps.responsibleGamingUrl) {
|
|
218
|
+
globalStore.signUp.setOpen(false);
|
|
219
|
+
router.push(signUpProps.responsibleGamingUrl);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
globalStore.responsibleGaming.setOpen(true);
|
|
223
|
+
globalStore.responsibleGaming.setNext('SIGN_UP');
|
|
224
|
+
globalStore.signUp.setOpen(false);
|
|
225
|
+
}
|
|
226
|
+
}, children: "Responsible Gaming" }), ' ', "guidelines."] }), _jsx(Checkbox.HiddenInput, {})] }), _jsx(Field.ErrorText, { className: "ml-6 text-xs", children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: form.formState.isSubmitting, children: signUpProps.isRegulated ? 'Continue' : 'Create Account' })] }), signUpProps.showPublicPlayProhibition && (_jsxs("div", { className: twMerge('mt-3xl text-center text-sm', signUpProps.className?.publicPlayProhibitionRoot), children: ["Prohibition to play in open and public places", _jsxs("div", { className: twMerge('mx-auto mt-5 flex h-13 w-fit items-center justify-center gap-3xl rounded-[60px] bg-[#1D0201] px-5 py-2', signUpProps.className?.publicPlayProhibitionLogoContainer), children: [_jsx(Image, { src: signUpProps.pagcorLogo ?? pagcorLogo, alt: "", draggable: false, height: 62, width: 186, className: "h-10 w-auto" }), _jsx(Image, { src: signUpProps.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-10 w-auto", draggable: false })] })] })), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-tertiary-600", children: "Already have an account?" }), _jsx("button", { type: "submit", className: "font-semibold text-button-tertiary-fg", onClick: () => {
|
|
227
|
+
globalStore.signUp.setOpen(false);
|
|
228
|
+
globalStore.signIn.setOpen(true);
|
|
229
|
+
}, children: "Log In" })] })] }));
|
|
230
|
+
}
|
|
231
|
+
const DEVICE_TIMEZONE = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
232
|
+
function DateOfBirthField(props) {
|
|
233
|
+
const [value, setValue] = useControllableState({
|
|
234
|
+
value: props.value,
|
|
235
|
+
defaultValue: props.defaultValue ?? null,
|
|
236
|
+
onChange: props.onChange,
|
|
237
|
+
});
|
|
238
|
+
// Custom input handler to automatically add slashes
|
|
239
|
+
const handleInput = (e) => {
|
|
240
|
+
const input = e.currentTarget;
|
|
241
|
+
const oldValue = input.value;
|
|
242
|
+
const oldCursorPosition = input.selectionStart ?? 0;
|
|
243
|
+
// Get digits only from the current input value string
|
|
244
|
+
const digitsOnly = input.value.replace(/\D/g, '');
|
|
245
|
+
let formattedValue = '';
|
|
246
|
+
// Format MM/DD/YYYY
|
|
247
|
+
if (digitsOnly.length > 0) {
|
|
248
|
+
formattedValue += digitsOnly.substring(0, 2);
|
|
249
|
+
if (digitsOnly.length > 2) {
|
|
250
|
+
formattedValue += '/' + digitsOnly.substring(2, 4);
|
|
251
|
+
}
|
|
252
|
+
if (digitsOnly.length > 4) {
|
|
253
|
+
formattedValue += '/' + digitsOnly.substring(4, 8);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
formattedValue = formattedValue.substring(0, 10); // Limit length
|
|
257
|
+
if (formattedValue !== oldValue) {
|
|
258
|
+
input.value = formattedValue;
|
|
259
|
+
let newCursorPosition = oldCursorPosition;
|
|
260
|
+
// Calculate the number of slashes before the old cursor position in the old value
|
|
261
|
+
const oldSlashesBeforeCursor = (oldValue.substring(0, oldCursorPosition).match(/\//g) || []).length;
|
|
262
|
+
// Calculate the number of slashes before the new cursor position in the new formatted value
|
|
263
|
+
// We take the substring of the new formatted value up to where the cursor *would* be based on the old digits
|
|
264
|
+
const digitsBeforeOldCursor = oldValue
|
|
265
|
+
.substring(0, oldCursorPosition)
|
|
266
|
+
.replace(/\D/g, '').length;
|
|
267
|
+
const newSlashesBeforeCursor = (formattedValue
|
|
268
|
+
.substring(0, digitsBeforeOldCursor + oldSlashesBeforeCursor)
|
|
269
|
+
.match(/\//g) || []).length;
|
|
270
|
+
// Adjust newCursorPosition based on the difference in slash count
|
|
271
|
+
newCursorPosition += newSlashesBeforeCursor - oldSlashesBeforeCursor;
|
|
272
|
+
// Ensure cursor stays within bounds
|
|
273
|
+
newCursorPosition = Math.min(newCursorPosition, formattedValue.length);
|
|
274
|
+
newCursorPosition = Math.max(0, newCursorPosition);
|
|
275
|
+
setTimeout(() => {
|
|
276
|
+
input.setSelectionRange(newCursorPosition, newCursorPosition);
|
|
277
|
+
}, 0);
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
return (_jsxs(DatePicker.Root, { size: "md", variant: "outline", placeholder: "MM/DD/YYYY", lazyMount: true, unmountOnExit: true, fixedWeeks: true, selectionMode: "single", value: value ? [parseDate(value)] : [], onValueChange: (details) => {
|
|
281
|
+
const value = details.value.at(0)?.toDate(DEVICE_TIMEZONE);
|
|
282
|
+
setValue(value ?? null);
|
|
283
|
+
}, children: [_jsx(DatePicker.Label, { children: "Date of Birth" }), _jsxs(DatePicker.Control, { children: [_jsx(DatePicker.Input, { onBlur: props.onBlur, onFocus: props.onFocus, onInput: handleInput }), _jsx(DatePicker.Trigger, { children: _jsx(CalendarIcon, {}) })] }), _jsx(DatePicker.Positioner, { children: _jsxs(DatePicker.Content, { children: [_jsx(DatePicker.View, { view: "day", children: _jsx(DatePicker.Context, { children: (api) => (_jsxs(_Fragment, { children: [_jsxs(DatePicker.ViewControl, { children: [_jsx(DatePicker.PrevTrigger, { children: _jsx(ChevronLeftIcon, {}) }), _jsx(DatePicker.ViewTrigger, { children: _jsx(DatePicker.RangeText, {}) }), _jsx(DatePicker.NextTrigger, { children: _jsx(ChevronRightIcon, {}) })] }), _jsxs(DatePicker.Table, { children: [_jsx(DatePicker.TableHead, { children: _jsx(DatePicker.TableRow, { children: api.weekDays.map((weekDay, id) => (_jsx(DatePicker.TableHeader, { children: weekDay.short.substring(0, 2) }, id))) }) }), _jsx(DatePicker.TableBody, { children: api.weeks.map((week, id) => (_jsx(DatePicker.TableRow, { children: week.map((day, id) => (_jsx(DatePicker.TableCell, { value: day, children: _jsx(DatePicker.TableCellTrigger, { children: day.day }) }, id))) }, id))) })] })] })) }) }), _jsx(DatePicker.View, { view: "month", children: _jsx(DatePicker.Context, { children: (datePicker) => (_jsxs(_Fragment, { children: [_jsxs(DatePicker.ViewControl, { children: [_jsx(DatePicker.PrevTrigger, { children: _jsx(ChevronLeftIcon, {}) }), _jsx(DatePicker.ViewTrigger, { children: _jsx(DatePicker.RangeText, {}) }), _jsx(DatePicker.NextTrigger, { children: _jsx(ChevronRightIcon, {}) })] }), _jsx(DatePicker.Table, { children: _jsx(DatePicker.TableBody, { children: datePicker
|
|
284
|
+
.getMonthsGrid({ columns: 4, format: 'short' })
|
|
285
|
+
.map((months, id) => (_jsx(DatePicker.TableRow, { children: months.map((month, id) => (_jsx(DatePicker.TableCell, { value: month.value, children: _jsx(DatePicker.TableCellTrigger, { className: "w-[4.425rem]", children: month.label }) }, id))) }, id))) }) })] })) }) }), _jsx(DatePicker.View, { view: "year", children: _jsx(DatePicker.Context, { children: (datePicker) => (_jsxs(_Fragment, { children: [_jsxs(DatePicker.ViewControl, { children: [_jsx(DatePicker.PrevTrigger, { children: _jsx(ChevronLeftIcon, {}) }), _jsx(DatePicker.ViewTrigger, { children: _jsx(DatePicker.RangeText, {}) }), _jsx(DatePicker.NextTrigger, { children: _jsx(ChevronRightIcon, {}) })] }), _jsx(DatePicker.Table, { children: _jsx(DatePicker.TableBody, { children: datePicker
|
|
286
|
+
.getYearsGrid({ columns: 4 })
|
|
287
|
+
.map((years, id) => (_jsx(DatePicker.TableRow, { children: years.map((year, id) => (_jsx(DatePicker.TableCell, { value: year.value, children: _jsx(DatePicker.TableCellTrigger, { className: "w-[4.425rem]", children: year.label }) }, id))) }, id))) }) })] })) }) })] }) })] }));
|
|
288
|
+
}
|
|
@@ -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: "production" | "development";
|
|
5
5
|
export declare const INTERNALS__REPORT_WEB_VITALS: boolean;
|
|
@@ -118,12 +118,18 @@ export interface RegisterMemberAccountByNameMutationVariables {
|
|
|
118
118
|
id: string;
|
|
119
119
|
name: string;
|
|
120
120
|
password: string;
|
|
121
|
+
btag?: string;
|
|
122
|
+
cellxpertCxd?: string;
|
|
123
|
+
realName?: string;
|
|
124
|
+
birthDay?: string;
|
|
125
|
+
branchCode?: string;
|
|
121
126
|
};
|
|
127
|
+
referralCode?: string;
|
|
122
128
|
}
|
|
123
129
|
export interface RegisterMemberAccountByNameMutation {
|
|
124
130
|
registerMemberAccountByName?: null | RegisterMemberAccountByNameError;
|
|
125
131
|
}
|
|
126
|
-
export type RegisterMemberAccountByNameInput = Simplify<RegisterMemberAccountByNameMutationVariables['input']
|
|
132
|
+
export type RegisterMemberAccountByNameInput = Simplify<RegisterMemberAccountByNameMutationVariables['input'] & Omit<RegisterMemberAccountByNameMutationVariables, 'input'>>;
|
|
127
133
|
export declare const registerMemberAccountByName: (input: RegisterMemberAccountByNameInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
128
134
|
export type UpdateMemberAccountError = {
|
|
129
135
|
name: 'AccountNameNotAvailableError';
|
package/dist/services/account.js
CHANGED
|
@@ -78,12 +78,18 @@ export const registerMemberAccount__next = async (input, options) => {
|
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
export const registerMemberAccountByName = async (input, options) => {
|
|
81
|
-
const { password, ...rest } = input;
|
|
82
81
|
const res = await graphqlRequest(ACCOUNT_GRAPHQL_ENDPOINT, REGISTER_MEMBER_ACCOUNT_BY_NAME, {
|
|
83
82
|
input: {
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
id: input.id,
|
|
84
|
+
name: input.name,
|
|
85
|
+
password: input.password,
|
|
86
|
+
btag: input.btag,
|
|
87
|
+
cellxpertCxd: input.cellxpertCxd,
|
|
88
|
+
realName: input.realName,
|
|
89
|
+
birthDay: input.birthDay,
|
|
90
|
+
branchCode: input.branchCode,
|
|
86
91
|
},
|
|
92
|
+
referralCode: input.referralCode,
|
|
87
93
|
}, options);
|
|
88
94
|
if (res.registerMemberAccountByName) {
|
|
89
95
|
const error = new Error();
|
|
@@ -71,7 +71,7 @@ export declare const MEMBER = "\n query Member {\n member {\n dateTimeL
|
|
|
71
71
|
export declare const MEMBER_ACCOUNT = "\n query MemberAccount {\n memberAccount: self {\n ... on MemberAccount {\n id\n name\n status\n realName\n emailAddress\n mobileNumber\n birthDay\n verified\n verificationStatus\n nickName\n validId\n mobileNumberVerified\n mobileNumberVerificationRequired\n transactionPassword\n secretAnswerSubmitted\n dateTimeCreated\n dateTimeLastUpdated\n googleId\n facebookId\n cellxpertDetails {\n cxd\n dateTimeLastUpdated\n }\n }\n }\n }\n";
|
|
72
72
|
export declare const MEMBER_VERIFICATION = "\n \n fragment FileFragment on File {\n id\n url\n status\n }\n\n\n query MemberVerification {\n memberAccount: self {\n ... on MemberAccount {\n verification {\n id\n status\n address\n permanentAddress\n sourceOfIncome\n natureOfWork\n nationality\n placeOfBirth\n idFrontImage {\n ...FileFragment\n }\n selfieImage {\n ...FileFragment\n }\n sumsubVerified\n }\n }\n }\n }\n";
|
|
73
73
|
export declare const REGISTER_MEMBER_ACCOUNT = "\n mutation RegisterMemberAccount(\n $input: RegisterMemberAccountInput!\n $referralCode: String\n $verificationCode: String\n $reCAPTCHAResponse: String\n ) {\n registerMemberAccount(\n input: $input\n referralCode: $referralCode\n verificationCode: $verificationCode\n reCAPTCHAResponse: $reCAPTCHAResponse\n ) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidReCAPTCHAResponseError {\n name: __typename\n message\n }\n ... on InvalidSMSVerificationCodeError {\n name: __typename\n message\n }\n ... on MinimumAgeRequirementError {\n name: __typename\n message\n }\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
74
|
-
export declare const REGISTER_MEMBER_ACCOUNT_BY_NAME = "\n mutation RegisterMemberAccountByName(\n $input: RegisterMemberAccountByNameInput!\n $
|
|
74
|
+
export declare const REGISTER_MEMBER_ACCOUNT_BY_NAME = "\n mutation RegisterMemberAccountByName(\n $input: RegisterMemberAccountByNameInput!\n $referralCode: String\n ) {\n registerMemberAccountByName(\n input: $input\n referralCode: $referralCode\n ) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidReCAPTCHAResponseError {\n name: __typename\n message\n }\n }\n }\n";
|
|
75
75
|
export declare const REGISTER_MEMBER_ACCOUNT_VIA_MOBILE = "\n mutation RegisterMemberAccountViaMobile(\n $input: RegisterMemberAccountViaMobileInput!\n $referralCode: String\n $reCAPTCHAResponse: String\n $verificationCode: String\n ) {\n registerMemberAccountViaMobile(\n input: $input\n referralCode: $referralCode\n verificationCode: $verificationCode\n reCAPTCHAResponse: $reCAPTCHAResponse\n ) {\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidReCAPTCHAResponseError {\n name: __typename\n message\n }\n ... on InvalidSMSVerificationCodeError {\n name: __typename\n message\n }\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
76
76
|
export declare const REGISTER_MEMBER_ACCOUNT__NEXT = "\n mutation RegisterMemberAccount(\n $input: RegisterMemberAccountInput_next!\n $reCAPTCHAResponse: String\n ) {\n registerMemberAccount: registerMemberAccount_next(\n input: $input\n reCAPTCHAResponse: $reCAPTCHAResponse\n ) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidReCAPTCHAResponseError {\n name: __typename\n message\n }\n ... on InvalidSMSVerificationCodeError {\n name: __typename\n message\n }\n ... on MinimumAgeRequirementError {\n name: __typename\n message\n }\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
77
77
|
export declare const REGISTER_MAYA_MEMBER_ACCOUNT = "\n mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {\n registerMayaMemberAccount(input: $input) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n }\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -1699,11 +1699,11 @@ export const REGISTER_MEMBER_ACCOUNT = /* GraphQL */ `
|
|
|
1699
1699
|
export const REGISTER_MEMBER_ACCOUNT_BY_NAME = /* GraphQL */ `
|
|
1700
1700
|
mutation RegisterMemberAccountByName(
|
|
1701
1701
|
$input: RegisterMemberAccountByNameInput!
|
|
1702
|
-
$
|
|
1702
|
+
$referralCode: String
|
|
1703
1703
|
) {
|
|
1704
1704
|
registerMemberAccountByName(
|
|
1705
1705
|
input: $input
|
|
1706
|
-
|
|
1706
|
+
referralCode: $referralCode
|
|
1707
1707
|
) {
|
|
1708
1708
|
... on AccountNameNotAvailableError {
|
|
1709
1709
|
name: __typename
|