@opexa/portal-components 0.0.287 → 0.0.288
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/useAuthenticateMutation.js +4 -0
- package/dist/client/hooks/useSignInMutation.js +4 -0
- package/dist/client/utils/recaptcha.d.ts +14 -0
- package/dist/client/utils/recaptcha.js +18 -0
- package/dist/components/Banner/Banner.client.d.ts +12 -0
- package/dist/components/Banner/Banner.client.js +49 -0
- package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +2 -3
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +2 -2
- package/dist/components/DigitainLauncher/DigitianContainter.js +2 -2
- package/dist/components/DigitainLauncher/types.d.ts +6 -1
- package/dist/components/PortalProvider/PortalProvider.d.ts +1 -5
- package/dist/components/PortalProvider/PortalProvider.js +4 -5
- package/dist/constants/EnvVar.d.ts +2 -1
- package/dist/constants/EnvVar.js +6 -0
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/postTransformIdFrontImage.js +21 -6
- package/dist/handlers/postTransformSelfieImage.js +20 -9
- package/dist/styles/theme.css +4 -0
- 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 +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +8 -8
- 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 +8 -8
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +306 -306
- package/dist/ui/Menu/menu.recipe.d.ts +17 -17
- 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 +88 -88
- package/dist/ui/Popover/popover.recipe.d.ts +8 -8
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- 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/FeatureFlag/FeatureFlag.d.ts +0 -1
- package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
- package/dist/components/FeatureFlag/index.d.ts +0 -1
- package/dist/components/FeatureFlag/index.js +0 -1
- package/dist/components/KYC/AutoOpen.d.ts +0 -1
- package/dist/components/KYC/AutoOpen.js +0 -40
- package/dist/components/KYC/backup/Header.d.ts +0 -1
- package/dist/components/KYC/backup/Header.js +0 -8
- package/dist/components/KYC/backup/Indicator.d.ts +0 -1
- package/dist/components/KYC/backup/Indicator.js +0 -9
- package/dist/components/KYC/backup/KYC.d.ts +0 -1
- package/dist/components/KYC/backup/KYC.js +0 -14
- package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
- package/dist/components/KYC/backup/KYC.lazy.js +0 -26
- package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
- package/dist/components/KYC/backup/KYCContext.js +0 -2
- package/dist/components/KYC/backup/Step1.d.ts +0 -1
- package/dist/components/KYC/backup/Step1.js +0 -13
- package/dist/components/KYC/backup/Step2.d.ts +0 -1
- package/dist/components/KYC/backup/Step2.js +0 -13
- package/dist/components/KYC/backup/Step3.d.ts +0 -1
- package/dist/components/KYC/backup/Step3.js +0 -13
- package/dist/components/KYC/backup/Step4.d.ts +0 -1
- package/dist/components/KYC/backup/Step4.js +0 -7
- package/dist/components/KYC/backup/useKYC.d.ts +0 -10
- package/dist/components/KYC/backup/useKYC.js +0 -8
- package/dist/components/KYC/loadModels.d.ts +0 -1
- package/dist/components/KYC/loadModels.js +0 -9
- package/dist/components/Messages/Message.d.ts +0 -1
- package/dist/components/Messages/Message.js +0 -35
- package/dist/components/Messages/MessageContext.d.ts +0 -6
- package/dist/components/Messages/MessageContext.js +0 -2
- package/dist/components/Messages/MessagePopup.d.ts +0 -1
- package/dist/components/Messages/MessagePopup.js +0 -20
- package/dist/components/Messages/MessageTrigger.d.ts +0 -8
- package/dist/components/Messages/MessageTrigger.js +0 -19
- package/dist/components/Quests/CountdownTimer.d.ts +0 -15
- package/dist/components/Quests/CountdownTimer.js +0 -33
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
- package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
- package/dist/components/SignUp/SignUp.lazy.js +0 -18
- package/dist/components/SignUp/SignUpContext.d.ts +0 -6
- package/dist/components/SignUp/SignUpContext.js +0 -2
- package/dist/components/SignUp/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpForm.js +0 -284
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
- package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
- package/dist/components/shared/IdDocumentField.client.js +0 -204
- package/dist/components/shared/IdDocumentField.d.ts +0 -2
- package/dist/components/shared/IdDocumentField.js +0 -11
- package/dist/components/shared/SelfieField.client.d.ts +0 -20
- package/dist/components/shared/SelfieField.client.js +0 -327
- package/dist/components/shared/SelfieField.d.ts +0 -2
- package/dist/components/shared/SelfieField.js +0 -11
- package/dist/constants/BranchCode.d.ts +0 -4
- package/dist/constants/BranchCode.js +0 -42
- package/dist/handlers.d.ts +0 -43
- package/dist/handlers.js +0 -297
- package/dist/icons/BellRingIcon.d.ts +0 -2
- package/dist/icons/BellRingIcon.js +0 -4
- package/dist/utils/dataUrlToBlob.d.ts +0 -1
- package/dist/utils/dataUrlToBlob.js +0 -11
- package/dist/utils/resizeImageSize.d.ts +0 -2
- package/dist/utils/resizeImageSize.js +0 -11
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { RECAPTCHA_HEADER_KEY } from '../../constants/index.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { getAuthenticateMutationKey } from '../../utils/mutationKeys.js';
|
|
4
5
|
import { getSessionQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { authenticate } from '../services/authenticate.js';
|
|
6
7
|
import { getSession } from '../services/getSession.js';
|
|
8
|
+
import { ReCAPTCHAExecute, ReCAPTCHAReady } from '../utils/recaptcha.js';
|
|
7
9
|
export const useAuthenticateMutation = (config) => {
|
|
8
10
|
const queryClient = getQueryClient();
|
|
9
11
|
return useMutation({
|
|
@@ -11,8 +13,10 @@ export const useAuthenticateMutation = (config) => {
|
|
|
11
13
|
mutationKey: getAuthenticateMutationKey(),
|
|
12
14
|
mutationFn: async (input) => {
|
|
13
15
|
const session = await getSession();
|
|
16
|
+
await ReCAPTCHAReady();
|
|
14
17
|
await authenticate(input, {
|
|
15
18
|
headers: {
|
|
19
|
+
[RECAPTCHA_HEADER_KEY]: await ReCAPTCHAExecute({ action: 'submit' }),
|
|
16
20
|
...(session.domain && {
|
|
17
21
|
Domain: session.domain,
|
|
18
22
|
}),
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { RECAPTCHA_HEADER_KEY } from '../../constants/index.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { getSignInMutationKey } from '../../utils/mutationKeys.js';
|
|
4
5
|
import { getSessionQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
7
|
import { signIn } from '../services/signIn.js';
|
|
8
|
+
import { ReCAPTCHAExecute, ReCAPTCHAReady } from '../utils/recaptcha.js';
|
|
7
9
|
export const useSignInMutation = (config) => {
|
|
8
10
|
const queryClient = getQueryClient();
|
|
9
11
|
return useMutation({
|
|
@@ -11,8 +13,10 @@ export const useSignInMutation = (config) => {
|
|
|
11
13
|
mutationKey: getSignInMutationKey(),
|
|
12
14
|
mutationFn: async (input) => {
|
|
13
15
|
const session = await getSession();
|
|
16
|
+
await ReCAPTCHAReady();
|
|
14
17
|
const authenticator = await signIn(input, {
|
|
15
18
|
headers: {
|
|
19
|
+
[RECAPTCHA_HEADER_KEY]: await ReCAPTCHAExecute({ action: 'submit' }),
|
|
16
20
|
...(session.domain && {
|
|
17
21
|
Domain: session.domain,
|
|
18
22
|
}),
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ReCAPTCHAExecuteOptions {
|
|
2
|
+
action: 'submit' | (string & {});
|
|
3
|
+
}
|
|
4
|
+
export interface ReCAPTCHA {
|
|
5
|
+
ready(callback: () => void): void;
|
|
6
|
+
execute(siteKey: string, options: ReCAPTCHAExecuteOptions): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare function ReCAPTCHAReady(): Promise<void>;
|
|
9
|
+
export declare function ReCAPTCHAExecute(options: ReCAPTCHAExecuteOptions): Promise<string>;
|
|
10
|
+
declare global {
|
|
11
|
+
interface Window {
|
|
12
|
+
grecaptcha: ReCAPTCHA;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RECAPTCHA_SITE_KEY } from '../../constants/index.js';
|
|
2
|
+
let loaded = false;
|
|
3
|
+
export function ReCAPTCHAReady() {
|
|
4
|
+
return new Promise((resolve) => {
|
|
5
|
+
if (!loaded) {
|
|
6
|
+
window.grecaptcha.ready(() => {
|
|
7
|
+
loaded = true;
|
|
8
|
+
resolve();
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
resolve();
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export async function ReCAPTCHAExecute(options) {
|
|
17
|
+
return await window.grecaptcha.execute(RECAPTCHA_SITE_KEY, options);
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ImageProps } from 'next/image';
|
|
2
|
+
export interface BannerEntry {
|
|
3
|
+
src: ImageProps['src'];
|
|
4
|
+
redirectUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BannerProps {
|
|
7
|
+
banners: BannerEntry[];
|
|
8
|
+
imageWidth?: number | [mobile: number, desktop: number];
|
|
9
|
+
imageHeight?: number | [mobile: number, desktop: number];
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Banner__client(props: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import emblaCarouselAutoplay from 'embla-carousel-autoplay';
|
|
4
|
+
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
5
|
+
import isMobile from 'is-mobile';
|
|
6
|
+
import Image from 'next/image';
|
|
7
|
+
import Link from 'next/link';
|
|
8
|
+
import { Fragment, useEffect, useState } from 'react';
|
|
9
|
+
import { twMerge } from 'tailwind-merge';
|
|
10
|
+
import { dataAttr } from '../../utils/dataAttr.js';
|
|
11
|
+
export function Banner__client(props) {
|
|
12
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
13
|
+
loop: true,
|
|
14
|
+
align: 'start',
|
|
15
|
+
}, [
|
|
16
|
+
emblaCarouselAutoplay({
|
|
17
|
+
playOnInit: true,
|
|
18
|
+
delay: 5000,
|
|
19
|
+
}),
|
|
20
|
+
]);
|
|
21
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
function handler(detail) {
|
|
24
|
+
setCurrentIndex(detail?.selectedScrollSnap() ?? 0);
|
|
25
|
+
}
|
|
26
|
+
emblaApi?.on('scroll', handler);
|
|
27
|
+
emblaApi?.on('init', handler);
|
|
28
|
+
return () => {
|
|
29
|
+
emblaApi?.on('init', handler);
|
|
30
|
+
emblaApi?.off('scroll', handler);
|
|
31
|
+
};
|
|
32
|
+
}, [emblaApi]);
|
|
33
|
+
const imageWidth = !props.imageWidth
|
|
34
|
+
? [400, 1200]
|
|
35
|
+
: Array.isArray(props.imageWidth)
|
|
36
|
+
? props.imageWidth
|
|
37
|
+
: [props.imageWidth, props.imageWidth];
|
|
38
|
+
const imageHeight = !props.imageHeight
|
|
39
|
+
? [225, 300]
|
|
40
|
+
: Array.isArray(props.imageHeight)
|
|
41
|
+
? props.imageHeight
|
|
42
|
+
: [props.imageHeight, props.imageHeight];
|
|
43
|
+
return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
|
|
44
|
+
const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? imageWidth[0] : imageWidth[1], height: isMobile() ? imageHeight[0] : imageHeight[1], className: "block h-auto w-full", priority: index === 0 }));
|
|
45
|
+
return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
|
|
46
|
+
}) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
|
|
47
|
+
emblaApi?.scrollTo(index);
|
|
48
|
+
}, "aria-label": `Go to slide ${index + 1}`, "data-active": dataAttr(index === currentIndex) }, index))) })] }));
|
|
49
|
+
}
|
|
@@ -149,7 +149,7 @@ export function LibanganDeposit() {
|
|
|
149
149
|
createDepositMutation.mutate({
|
|
150
150
|
amount: data.amount.toString(),
|
|
151
151
|
promo: data.promo ?? undefined,
|
|
152
|
-
redirectionUrl: depositWithdrawalProps.
|
|
152
|
+
redirectionUrl: depositWithdrawalProps.libanganRedirectionUrl,
|
|
153
153
|
});
|
|
154
154
|
}), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
155
155
|
o.field.onChange(details.value);
|
|
@@ -149,7 +149,7 @@ export function PisoPayDeposit() {
|
|
|
149
149
|
return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
|
|
150
150
|
const id = ObjectId.generate(ObjectType.Deposit).toString();
|
|
151
151
|
const domain = window.location.hostname === 'localhost'
|
|
152
|
-
? 'https://
|
|
152
|
+
? 'https://opexa.io'
|
|
153
153
|
: window.location.origin;
|
|
154
154
|
createDepositMutation.reset();
|
|
155
155
|
createDepositMutation.mutate({
|
|
@@ -5,8 +5,7 @@ export interface DepositWithdrawalProps {
|
|
|
5
5
|
privacyPolicyUrl?: string;
|
|
6
6
|
/** @default "/account/security" */
|
|
7
7
|
accountSecurityUrl?: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
canWithdrawWithoutVerification?: boolean;
|
|
8
|
+
allowUnverifiedAccounts?: boolean;
|
|
9
|
+
libanganRedirectionUrl?: string;
|
|
11
10
|
}
|
|
12
11
|
export declare function DepositWithdrawal(props: DepositWithdrawalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,7 +28,7 @@ export function DepositWithdrawal(props) {
|
|
|
28
28
|
if (!details.open) {
|
|
29
29
|
globalStore.depositWithdrawal.setPromo(null);
|
|
30
30
|
}
|
|
31
|
-
}, 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)]", children: _jsxs(Dialog.Content, { className: "lg:min-h-auto mx-auto min-h-full w-full px-4 py-3xl lg:w-[480px] lg:rounded-xl
|
|
31
|
+
}, 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)]", children: _jsxs(Dialog.Content, { className: "lg:min-h-auto mx-auto min-h-full w-full overflow-y-auto px-4 py-3xl lg:w-[480px] lg:rounded-xl", children: [_jsxs(Dialog.Header, { className: "flex items-center gap-xl", children: [_jsx("div", { className: "border-border-primary shadow-xs text-gray-700 text-text-secondary-700 flex size-10 items-center justify-center rounded-md border", children: _jsx(Wallet02Icon, { className: "size-5" }) }), _jsx(Dialog.Title, { className: "grow text-lg font-semibold", children: "Wallet" }), _jsx(Dialog.Context, { children: (api) => (_jsx(IconButton, { size: "sm", variant: "outline", colorScheme: "gray", onClick: () => api.setOpen(false), children: _jsx(XIcon, {}) })) })] }), _jsxs(Dialog.Body, { className: "mt-3xl", children: [_jsx("p", { className: "text-text-secondary-700 text-center text-sm", children: "Deposit Balance" }), _jsx("p", { className: "text-center text-3xl font-bold leading-tight tracking-tight", children: formatNumber(walletQuery.data?.balance, {
|
|
32
32
|
currency: localeInfo.currency.code,
|
|
33
33
|
minDecimalPlaces: 2,
|
|
34
34
|
}) }), _jsxs(Tabs.Root, { value: globalStore.depositWithdrawal.tab, onValueChange: (details) => {
|
|
@@ -22,7 +22,7 @@ import { PisoPayWithdrawal } from './PisoPayWithdrawal/PisoPayWithdrawal.js';
|
|
|
22
22
|
import { VentajaWithdrawal } from './VentajaWithdrawal/VentajaWithdrawal.js';
|
|
23
23
|
export function Withdrawal() {
|
|
24
24
|
const [onMMA] = useOnMMA();
|
|
25
|
-
const {
|
|
25
|
+
const { allowUnverifiedAccounts } = useDepositWithdrawalPropsContext();
|
|
26
26
|
const walletQuery = useWalletQuery();
|
|
27
27
|
const wallet = walletQuery.data;
|
|
28
28
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
@@ -93,7 +93,7 @@ export function Withdrawal() {
|
|
|
93
93
|
if ((!memberVerification ||
|
|
94
94
|
memberVerification.status === 'REJECTED' ||
|
|
95
95
|
memberVerification.status === 'UNVERIFIED') &&
|
|
96
|
-
!
|
|
96
|
+
!allowUnverifiedAccounts) {
|
|
97
97
|
return _jsx(AccountVerificationRequired, {});
|
|
98
98
|
}
|
|
99
99
|
if (enabledPaymentMethods.length <= 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import isMobile from 'is-mobile';
|
|
4
4
|
import { useRouter } from 'next/navigation';
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
@@ -43,5 +43,5 @@ export function DigitainContainer(props) {
|
|
|
43
43
|
const intervalId = setInterval(checkAndBoot, 500);
|
|
44
44
|
return () => clearInterval(intervalId);
|
|
45
45
|
}, [props.params]);
|
|
46
|
-
return (_jsxs(_Fragment, { children: [
|
|
46
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: twJoin(!isLoading && 'hidden'), children: _jsx(Loading, {}) }), _jsx("div", { id: "digitain-container", className: twJoin(isLoading && 'hidden') })] }));
|
|
47
47
|
}
|
|
@@ -43,7 +43,12 @@ interface SportAppInstance {
|
|
|
43
43
|
}) => void;
|
|
44
44
|
addEventListener: (eventName: 'sportAppEventDispatch', listener: SportAppEventListener) => void;
|
|
45
45
|
}
|
|
46
|
-
export interface
|
|
46
|
+
export interface DigitiainBootstrapper {
|
|
47
47
|
boot: (params: DigitainBootstrapperParams, options: BootstrapperOptions) => Promise<SportAppInstance>;
|
|
48
48
|
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface Window {
|
|
51
|
+
Bootstrapper: DigitiainBootstrapper;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
49
54
|
export {};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export interface PortalProviderProps {
|
|
3
|
-
googleAnalyticsId?: string;
|
|
4
|
-
googleTagManagerId?: string;
|
|
5
|
-
googleRecaptchaSiteKey?: string;
|
|
6
|
-
facebookPixelId?: string;
|
|
7
3
|
children: ReactNode;
|
|
8
4
|
}
|
|
9
|
-
export declare function PortalProvider({ children
|
|
5
|
+
export declare function PortalProvider({ children }: PortalProviderProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';
|
|
3
2
|
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
|
|
3
|
+
import Script from 'next/script';
|
|
4
4
|
import { Suspense } from 'react';
|
|
5
|
-
import { INTERNALS__REPORT_WEB_VITALS } from '../../constants/index.js';
|
|
5
|
+
import { INTERNALS__REPORT_WEB_VITALS, RECAPTCHA_SITE_KEY, } from '../../constants/index.js';
|
|
6
6
|
import { prefetchAccountQuery } from '../../server/utils/prefetchAccountQuery.js';
|
|
7
7
|
import { prefetchPlatformQuery } from '../../server/utils/prefetchPlatformQuery.js';
|
|
8
8
|
import { prefetchSessionQuery } from '../../server/utils/prefetchSessionQuery.js';
|
|
9
9
|
import { prefetchWalletQuery } from '../../server/utils/prefetchWalletQuery.js';
|
|
10
|
-
import { FacebookPixel, GoogleRecaptcha } from '../../third-parties/index.js';
|
|
11
10
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
12
11
|
import { FeatureFlag } from './FeatureFlag.js';
|
|
13
12
|
import { Providers } from './Providers.js';
|
|
14
13
|
import { SetupDomain } from './SetupDomain.js';
|
|
15
14
|
import { Snackbar } from './Snackbar.js';
|
|
16
15
|
import { WebVitals } from './WebVitals.js';
|
|
17
|
-
export async function PortalProvider({ children
|
|
16
|
+
export async function PortalProvider({ children }) {
|
|
18
17
|
const queryClient = getQueryClient();
|
|
19
18
|
await Promise.allSettled([
|
|
20
19
|
prefetchPlatformQuery(),
|
|
@@ -22,5 +21,5 @@ export async function PortalProvider({ children, facebookPixelId, googleAnalytic
|
|
|
22
21
|
prefetchAccountQuery(),
|
|
23
22
|
prefetchWalletQuery(),
|
|
24
23
|
]);
|
|
25
|
-
return (_jsxs(_Fragment, { children: [INTERNALS__REPORT_WEB_VITALS && _jsx(WebVitals, {}), _jsx(Providers, { children: _jsxs(HydrationBoundary, { state: dehydrate(queryClient), children: [children, _jsx(Suspense, { fallback: null, children: _jsx(SetupDomain, {}) })] }) }), _jsx(Snackbar, {}), _jsx(Suspense, { fallback: null, children: _jsx(FeatureFlag, {}) }),
|
|
24
|
+
return (_jsxs(_Fragment, { children: [INTERNALS__REPORT_WEB_VITALS && _jsx(WebVitals, {}), _jsx(Providers, { children: _jsxs(HydrationBoundary, { state: dehydrate(queryClient), children: [children, _jsx(Suspense, { fallback: null, children: _jsx(SetupDomain, {}) })] }) }), _jsx(Snackbar, {}), _jsx(Suspense, { fallback: null, children: _jsx(FeatureFlag, {}) }), RECAPTCHA_SITE_KEY && (_jsx(Script, { src: `https://www.google.com/recaptcha/api.js?render=${RECAPTCHA_SITE_KEY}` }))] }));
|
|
26
25
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
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
|
+
export declare const RECAPTCHA_SITE_KEY: string;
|
|
5
6
|
export declare const BYPASS_RECAPTCHA: boolean;
|
|
6
7
|
export declare const INTERNALS__REPORT_WEB_VITALS: boolean;
|
package/dist/constants/EnvVar.js
CHANGED
|
@@ -18,6 +18,12 @@ export const ENVIRONMENT = z
|
|
|
18
18
|
.enum(['production', 'development'])
|
|
19
19
|
.catch('development')
|
|
20
20
|
.parse(process.env.NEXT_PUBLIC_ENVIRONMENT);
|
|
21
|
+
export const RECAPTCHA_SITE_KEY = z
|
|
22
|
+
.string()
|
|
23
|
+
.optional()
|
|
24
|
+
.default('')
|
|
25
|
+
.catch('')
|
|
26
|
+
.parse(process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY);
|
|
21
27
|
export const BYPASS_RECAPTCHA = z
|
|
22
28
|
.any()
|
|
23
29
|
.transform(Boolean)
|
package/dist/handlers/index.d.ts
CHANGED
|
@@ -18,14 +18,14 @@ export declare const GET: (req: NextRequest, { params }: Context) => Promise<Nex
|
|
|
18
18
|
__error?: unknown;
|
|
19
19
|
} | {
|
|
20
20
|
ok: true;
|
|
21
|
-
data:
|
|
21
|
+
data: Record<string, unknown>;
|
|
22
22
|
}> | NextResponse<{
|
|
23
23
|
ok: false;
|
|
24
24
|
message: string;
|
|
25
25
|
__error?: unknown;
|
|
26
26
|
} | {
|
|
27
27
|
ok: true;
|
|
28
|
-
data:
|
|
28
|
+
data: import("../types").Session;
|
|
29
29
|
}>>;
|
|
30
30
|
export declare const DELETE: (req: NextRequest, { params }: Context) => Promise<NextResponse<{
|
|
31
31
|
ok: true;
|
|
@@ -44,19 +44,34 @@ export async function postTransformIdFrontImage(request) {
|
|
|
44
44
|
height: parsed.data.cropHeight,
|
|
45
45
|
})
|
|
46
46
|
.resize({
|
|
47
|
+
fit: 'contain',
|
|
47
48
|
width: 1200,
|
|
48
49
|
height: 757,
|
|
49
50
|
kernel: sharp.kernel.lanczos3,
|
|
50
51
|
withoutEnlargement: true,
|
|
51
52
|
})
|
|
52
53
|
.modulate({
|
|
53
|
-
brightness: 1.
|
|
54
|
-
saturation: 1.
|
|
54
|
+
brightness: 1.03,
|
|
55
|
+
saturation: 1.05,
|
|
56
|
+
})
|
|
57
|
+
.median(1)
|
|
58
|
+
.blur(0.3)
|
|
59
|
+
.sharpen({
|
|
60
|
+
sigma: 1,
|
|
61
|
+
m1: 0.5,
|
|
62
|
+
m2: 1.0,
|
|
63
|
+
x1: 2,
|
|
64
|
+
y2: 10,
|
|
65
|
+
y3: 20,
|
|
66
|
+
})
|
|
67
|
+
.webp({
|
|
68
|
+
effort: 6,
|
|
69
|
+
quality: 100,
|
|
70
|
+
alphaQuality: 100,
|
|
71
|
+
lossless: false,
|
|
72
|
+
nearLossless: false,
|
|
73
|
+
smartSubsample: true,
|
|
55
74
|
})
|
|
56
|
-
.median(3)
|
|
57
|
-
.blur()
|
|
58
|
-
.sharpen()
|
|
59
|
-
.webp()
|
|
60
75
|
.toBuffer();
|
|
61
76
|
return new NextResponse(cropped, {
|
|
62
77
|
headers: {
|
|
@@ -44,23 +44,34 @@ export async function postTransformSelfieImage(request) {
|
|
|
44
44
|
height: parsed.data.cropHeight,
|
|
45
45
|
})
|
|
46
46
|
.resize({
|
|
47
|
+
fit: 'contain',
|
|
47
48
|
width: 1200,
|
|
48
49
|
height: 1200,
|
|
49
50
|
kernel: sharp.kernel.lanczos3,
|
|
50
51
|
withoutEnlargement: true,
|
|
51
52
|
})
|
|
53
|
+
.modulate({
|
|
54
|
+
brightness: 1.03,
|
|
55
|
+
saturation: 1.05,
|
|
56
|
+
})
|
|
57
|
+
.median(1)
|
|
58
|
+
.blur(0.3)
|
|
52
59
|
.sharpen({
|
|
53
|
-
sigma: 1
|
|
54
|
-
m1:
|
|
55
|
-
m2:
|
|
60
|
+
sigma: 1,
|
|
61
|
+
m1: 0.5,
|
|
62
|
+
m2: 1.0,
|
|
63
|
+
x1: 2,
|
|
64
|
+
y2: 10,
|
|
65
|
+
y3: 20,
|
|
56
66
|
})
|
|
57
|
-
.
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
.webp({
|
|
68
|
+
effort: 6,
|
|
69
|
+
quality: 100,
|
|
70
|
+
alphaQuality: 100,
|
|
71
|
+
lossless: false,
|
|
72
|
+
nearLossless: false,
|
|
73
|
+
smartSubsample: true,
|
|
60
74
|
})
|
|
61
|
-
.median(3)
|
|
62
|
-
.blur()
|
|
63
|
-
.webp()
|
|
64
75
|
.toBuffer();
|
|
65
76
|
return new NextResponse(cropped, {
|
|
66
77
|
headers: {
|