@opexa/portal-components 0.0.1083 → 0.0.1085
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +3 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +2 -2
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +2 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +2 -2
- package/dist/components/KYC/KYCReminder.lazy.js +5 -3
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import { type BypassDomainConfig } from '../../client/hooks/useBypassKycChecker';
|
|
2
3
|
import type { PaymentMethod } from './utils';
|
|
3
4
|
export interface DepositWithdrawalProps {
|
|
@@ -25,5 +26,7 @@ export interface DepositWithdrawalProps {
|
|
|
25
26
|
* "/hello/:id/world"
|
|
26
27
|
*/
|
|
27
28
|
depositSuccessPageUrl?: string;
|
|
29
|
+
/** @default "Convenience Fee may apply" */
|
|
30
|
+
note?: ReactNode;
|
|
28
31
|
}
|
|
29
32
|
export declare function DepositWithdrawal(props: DepositWithdrawalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,7 +21,7 @@ import { HasPendingBonuses } from './HasPendingBonuses.js';
|
|
|
21
21
|
import { Withdrawal } from './Withdrawal/Withdrawal.js';
|
|
22
22
|
export function DepositWithdrawal(props) {
|
|
23
23
|
const bypassDepositKycCheck = useBypassKycChecker(props.bypassDomains) || props.bypassDepositKycCheck;
|
|
24
|
-
const { hasPrivacyPolicyAndTermsOfUse = true, isOfWinSite = false, ...restProps } = props;
|
|
24
|
+
const { hasPrivacyPolicyAndTermsOfUse = true, isOfWinSite = false, note = null, ...restProps } = props;
|
|
25
25
|
const mergedProps = {
|
|
26
26
|
...restProps,
|
|
27
27
|
hasPrivacyPolicyAndTermsOfUse,
|
|
@@ -67,5 +67,5 @@ export function DepositWithdrawal(props) {
|
|
|
67
67
|
currency: localeInfo.currency.code,
|
|
68
68
|
minDecimalPlaces: 2,
|
|
69
69
|
truncate: false
|
|
70
|
-
}) }), _jsxs(Tabs.Root, { value: globalStore.depositWithdrawal.tab, onValueChange: handleTabChange, lazyMount: true, unmountOnExit: true, className: "mt-3xl space-y-4xl", children: [_jsxs(Tabs.List, { className: "w-full", children: [_jsx(Tabs.Trigger, { value: "DEPOSIT", className: "grow", children: "Deposit" }), _jsx(Tabs.Trigger, { value: "WITHDRAWAL", className: "grow", children: "Withdrawal" }), _jsx(Tabs.Indicator, {})] }), _jsx(Tabs.Content, { value: "DEPOSIT", className: "space-y-3xl", children: _jsx(Deposit, {}) }), _jsx(Tabs.Content, { value: "WITHDRAWAL", className: "space-y-3xl", children: _jsx(Withdrawal, {}) })] })] })] }) })] }) }) }), _jsx(HasPendingBonuses, {})] }));
|
|
70
|
+
}) }), note ? (_jsx("p", { className: "text-center text-xs text-text-secondary-700", children: note })) : null, _jsxs(Tabs.Root, { value: globalStore.depositWithdrawal.tab, onValueChange: handleTabChange, lazyMount: true, unmountOnExit: true, className: "mt-3xl space-y-4xl", children: [_jsxs(Tabs.List, { className: "w-full", children: [_jsx(Tabs.Trigger, { value: "DEPOSIT", className: "grow", children: "Deposit" }), _jsx(Tabs.Trigger, { value: "WITHDRAWAL", className: "grow", children: "Withdrawal" }), _jsx(Tabs.Indicator, {})] }), _jsx(Tabs.Content, { value: "DEPOSIT", className: "space-y-3xl", children: _jsx(Deposit, {}) }), _jsx(Tabs.Content, { value: "WITHDRAWAL", className: "space-y-3xl", children: _jsx(Withdrawal, {}) })] })] })] }) })] }) }) }), _jsx(HasPendingBonuses, {})] }));
|
|
71
71
|
}
|
|
@@ -2,5 +2,6 @@ import type { ComponentPropsWithRef } from 'react';
|
|
|
2
2
|
export interface DepositWithdrawalTriggerProps extends ComponentPropsWithRef<'button'> {
|
|
3
3
|
asChild?: boolean;
|
|
4
4
|
colorScheme?: 'primary' | 'dark';
|
|
5
|
+
label?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function DepositWithdrawalTrigger({ asChild, children, colorScheme, ...props }: DepositWithdrawalTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function DepositWithdrawalTrigger({ asChild, children, colorScheme, label, ...props }: DepositWithdrawalTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,7 @@ import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
|
10
10
|
import { useWalletQuery } from '../../client/hooks/useWalletQuery.js';
|
|
11
11
|
import { formatNumber } from '../../utils/formatNumber.js';
|
|
12
12
|
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
13
|
-
export function DepositWithdrawalTrigger({ asChild, children, colorScheme = 'primary', ...props }) {
|
|
13
|
+
export function DepositWithdrawalTrigger({ asChild, children, colorScheme = 'primary', label = 'Deposit', ...props }) {
|
|
14
14
|
const sessionQuery = useSessionQuery();
|
|
15
15
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
16
16
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
@@ -38,5 +38,5 @@ export function DepositWithdrawalTrigger({ asChild, children, colorScheme = 'pri
|
|
|
38
38
|
currency: localeInfo.currency.code,
|
|
39
39
|
minDecimalPlaces: 2,
|
|
40
40
|
truncate: false
|
|
41
|
-
}) }), _jsx("div", { className: "flex h-10 items-center gap-1.5 rounded-r-md bg-button-primary-bg px-3.5 font-semibold text-button-primary-fg text-sm", children:
|
|
41
|
+
}) }), _jsx("div", { className: "flex h-10 items-center gap-1.5 rounded-r-md bg-button-primary-bg px-3.5 font-semibold text-button-primary-fg text-sm", children: label })] })) }));
|
|
42
42
|
}
|
|
@@ -72,7 +72,9 @@ export function KYCReminder(props) {
|
|
|
72
72
|
!globalStore.kyc.open &&
|
|
73
73
|
!globalStore.kycVerificationRequired.open;
|
|
74
74
|
const isDisclaimerClosed = !globalStore.disclaimer.open && !globalStore.termsOfUse.open;
|
|
75
|
-
const isKYCStateRelevant = isNotVerified ||
|
|
75
|
+
const isKYCStateRelevant = isNotVerified ||
|
|
76
|
+
(isPending && isVerificationLocked) ||
|
|
77
|
+
(isNotVerified && isVerificationLocked);
|
|
76
78
|
return (_jsx(Dialog.Root, { open: isSessionReady &&
|
|
77
79
|
isAccountReady &&
|
|
78
80
|
isKYCReminderOpen &&
|
|
@@ -107,7 +109,7 @@ export function KYCReminder(props) {
|
|
|
107
109
|
globalStore.account.setOpen(false);
|
|
108
110
|
globalStore.account__mobile.setOpen(false);
|
|
109
111
|
router.push('/');
|
|
110
|
-
}, children: "Log Out" })] })) })] })),
|
|
112
|
+
}, children: "Log Out" })] })) })] })), isNotVerified &&
|
|
111
113
|
daysFromCreationToNow <= 3 &&
|
|
112
114
|
daysFromCreationToNow > 1 &&
|
|
113
115
|
!isVerificationLocked && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "JUST A FRIENDLY REMINDER" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["Please complete your KYC information within", ' ', _jsx("span", { className: "font-semibold text-[#FF0000]", children: "3 days" }), ' ', "to avoid temporary lock on your account."] }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo?.logo ?? pagcorLogo, alt: "PAGCOR logo", height: 88, width: 88, className: `h-[88px] w-auto shrink-0 ${props.pagcorLogo?.styles ?? ''}`, draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo?.logo ??
|
|
@@ -134,7 +136,7 @@ export function KYCReminder(props) {
|
|
|
134
136
|
globalStore.account.setOpen(false);
|
|
135
137
|
globalStore.account__mobile.setOpen(false);
|
|
136
138
|
router.push('/');
|
|
137
|
-
}, children: "Log Out" })] })) })] })] })),
|
|
139
|
+
}, children: "Log Out" })] })) })] })] })), isNotVerified &&
|
|
138
140
|
!isVerificationLocked &&
|
|
139
141
|
!(daysFromCreationToNow <= 3 && daysFromCreationToNow > 1) && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-primary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Personal Verification" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, ' ', "services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
|
|
140
142
|
api.setOpen(false);
|