@opexa/portal-components 0.0.930 → 0.0.932
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/Deposit/AurixPayQRPHDeposit/AurixPayQRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +7 -0
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +26 -14
- package/dist/components/Search/Search.lazy.js +4 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const AurixPayQRPHDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
|
-
status: "idle" | "
|
|
3
|
+
status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
|
|
4
4
|
deposit: import("../../../../types").Deposit | null;
|
|
5
5
|
errorMessage: {
|
|
6
6
|
name: string;
|
|
@@ -13,7 +13,7 @@ export declare const AurixPayQRPHDepositContext: (props: {
|
|
|
13
13
|
} & {
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useAurixPayQRPHDepositContext: () => {
|
|
16
|
-
status: "idle" | "
|
|
16
|
+
status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
|
|
17
17
|
deposit: import("../../../../types").Deposit | null;
|
|
18
18
|
errorMessage: {
|
|
19
19
|
name: string;
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface GenerateQRCodeInput {
|
|
|
5
5
|
promo?: string | null;
|
|
6
6
|
}
|
|
7
7
|
export declare function useAurixPayQRPHDeposit(): {
|
|
8
|
-
status: "idle" | "
|
|
8
|
+
status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
|
|
9
9
|
deposit: Deposit | null;
|
|
10
10
|
errorMessage: {
|
|
11
11
|
name: string;
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const OnlineBankDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
3
|
view: "form" | "vca";
|
|
4
|
-
status: "
|
|
4
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
5
5
|
verify: () => void;
|
|
6
6
|
reset: () => void;
|
|
7
7
|
deposit: import("../../../../types").Deposit | null;
|
|
@@ -14,7 +14,7 @@ export declare const OnlineBankDepositContext: (props: {
|
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useOnlineBankDepositContext: () => {
|
|
16
16
|
view: "form" | "vca";
|
|
17
|
-
status: "
|
|
17
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
18
18
|
verify: () => void;
|
|
19
19
|
reset: () => void;
|
|
20
20
|
deposit: import("../../../../types").Deposit | null;
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Deposit } from '../../../../types';
|
|
|
2
2
|
export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
|
|
3
3
|
export declare function useOnlineBankDeposit(): {
|
|
4
4
|
view: "form" | "vca";
|
|
5
|
-
status: "
|
|
5
|
+
status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
6
|
verify: () => void;
|
|
7
7
|
reset: () => void;
|
|
8
8
|
deposit: Deposit | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const QRPHDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
|
-
status: "idle" | "
|
|
3
|
+
status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
|
|
4
4
|
deposit: import("../../../../types").Deposit | null;
|
|
5
5
|
errorMessage: {
|
|
6
6
|
name: string;
|
|
@@ -13,7 +13,7 @@ export declare const QRPHDepositContext: (props: {
|
|
|
13
13
|
} & {
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useQRPHDepositContext: () => {
|
|
16
|
-
status: "idle" | "
|
|
16
|
+
status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
|
|
17
17
|
deposit: import("../../../../types").Deposit | null;
|
|
18
18
|
errorMessage: {
|
|
19
19
|
name: string;
|
|
@@ -5,7 +5,7 @@ export interface GenerateQRCodeInput {
|
|
|
5
5
|
promo?: string | null;
|
|
6
6
|
}
|
|
7
7
|
export declare function useQRPHDeposit(): {
|
|
8
|
-
status: "idle" | "
|
|
8
|
+
status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
|
|
9
9
|
deposit: Deposit | null;
|
|
10
10
|
errorMessage: {
|
|
11
11
|
name: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BypassDomainConfig } from '../../client/hooks/useBypassKycChecker';
|
|
2
|
+
import type { PaymentMethod } from './utils';
|
|
2
3
|
export interface DepositWithdrawalProps {
|
|
3
4
|
/** @default "/terms-of-use" */
|
|
4
5
|
termsOfUseUrl?: string;
|
|
@@ -10,6 +11,12 @@ export interface DepositWithdrawalProps {
|
|
|
10
11
|
libanganRedirectionUrl?: string;
|
|
11
12
|
hasPrivacyPolicyAndTermsOfUse?: boolean;
|
|
12
13
|
bypassDomains?: BypassDomainConfig[];
|
|
14
|
+
/**
|
|
15
|
+
* List of enabled withdrawal providers
|
|
16
|
+
* @example ['GCASH', 'MAYA_APP', 'VENTAJA_DISBURSEMENT']
|
|
17
|
+
* this is to bypass backoffice showing/hiding of payment providers
|
|
18
|
+
*/
|
|
19
|
+
enabledWithdrawalProviders?: PaymentMethod[];
|
|
13
20
|
bypassDepositKycCheck?: boolean;
|
|
14
21
|
/**
|
|
15
22
|
* @default "/deposits/<id>/status"
|
|
@@ -44,7 +44,7 @@ const VentajaWithdrawal = lazy(() => import('./VentajaWithdrawal/VentajaWithdraw
|
|
|
44
44
|
})));
|
|
45
45
|
export function Withdrawal() {
|
|
46
46
|
const { onMaya } = useMayaAuth();
|
|
47
|
-
const { allowUnverifiedAccounts } = useDepositWithdrawalPropsContext();
|
|
47
|
+
const { allowUnverifiedAccounts, enabledWithdrawalProviders } = useDepositWithdrawalPropsContext();
|
|
48
48
|
const walletQuery = useWalletQuery();
|
|
49
49
|
const featureFlag = useFeatureFlag();
|
|
50
50
|
const wallet = walletQuery.data;
|
|
@@ -65,37 +65,49 @@ export function Withdrawal() {
|
|
|
65
65
|
const paymentMethods = [
|
|
66
66
|
{
|
|
67
67
|
method: 'GCASH',
|
|
68
|
-
condition: () =>
|
|
69
|
-
|
|
68
|
+
condition: () => enabledWithdrawalProviders?.length
|
|
69
|
+
? Boolean(enabledWithdrawalProviders?.find((method) => method === 'GCASH'))
|
|
70
|
+
: paymentSettings?.gcashWithdrawalGatewaySettings?.[enabledKey] ||
|
|
71
|
+
false,
|
|
70
72
|
},
|
|
71
73
|
{
|
|
72
74
|
method: 'INSTAPAY_GCASH',
|
|
73
|
-
condition: () =>
|
|
74
|
-
|
|
75
|
+
condition: () => enabledWithdrawalProviders?.length
|
|
76
|
+
? Boolean(enabledWithdrawalProviders?.find((method) => method === 'INSTAPAY_GCASH'))
|
|
77
|
+
: paymentSettings?.instapayWithdrawalGatewaySettings?.[enabledKey] || false,
|
|
75
78
|
},
|
|
76
79
|
{
|
|
77
80
|
method: 'INSTAPAY_PAYMAYA',
|
|
78
|
-
condition: () =>
|
|
79
|
-
|
|
81
|
+
condition: () => enabledWithdrawalProviders?.length
|
|
82
|
+
? Boolean(enabledWithdrawalProviders?.find((method) => method === 'INSTAPAY_PAYMAYA'))
|
|
83
|
+
: paymentSettings?.instapayWithdrawalGatewaySettings?.[enabledKey] || false,
|
|
80
84
|
},
|
|
81
85
|
{
|
|
82
86
|
method: 'MAYA',
|
|
83
|
-
condition: () =>
|
|
87
|
+
condition: () => enabledWithdrawalProviders?.length
|
|
88
|
+
? Boolean(enabledWithdrawalProviders?.find((method) => method === 'MAYA'))
|
|
89
|
+
: paymentSettings?.mayaWithdrawalGatewaySettings?.[enabledKey] ||
|
|
90
|
+
false,
|
|
84
91
|
},
|
|
85
92
|
{
|
|
86
93
|
method: 'INSTAPAY',
|
|
87
|
-
condition: () =>
|
|
88
|
-
|
|
94
|
+
condition: () => enabledWithdrawalProviders?.length
|
|
95
|
+
? Boolean(enabledWithdrawalProviders?.find((method) => method === 'INSTAPAY'))
|
|
96
|
+
: paymentSettings?.instapayWithdrawalGatewaySettings?.[enabledKey] || false,
|
|
89
97
|
},
|
|
90
98
|
{
|
|
91
99
|
method: 'VENTAJA_DISBURSEMENT',
|
|
92
|
-
condition: () =>
|
|
93
|
-
|
|
100
|
+
condition: () => enabledWithdrawalProviders?.length
|
|
101
|
+
? Boolean(enabledWithdrawalProviders?.find((method) => method === 'VENTAJA_DISBURSEMENT'))
|
|
102
|
+
: paymentSettings?.ventajaWithdrawalGatewaySettings?.[enabledKey] ||
|
|
103
|
+
false,
|
|
94
104
|
},
|
|
95
105
|
{
|
|
96
106
|
method: 'PISO_PAY',
|
|
97
|
-
condition: () =>
|
|
98
|
-
|
|
107
|
+
condition: () => enabledWithdrawalProviders?.length
|
|
108
|
+
? Boolean(enabledWithdrawalProviders?.find((method) => method === 'PISO_PAY'))
|
|
109
|
+
: paymentSettings?.pisoPayWithdrawalGatewaySettings?.[enabledKey] ||
|
|
110
|
+
false,
|
|
99
111
|
},
|
|
100
112
|
{
|
|
101
113
|
method: 'GCASH_STANDARD_CASH_IN',
|
|
@@ -72,7 +72,9 @@ export function Search(props) {
|
|
|
72
72
|
const classNames = isString(props.className)
|
|
73
73
|
? { root: props.className }
|
|
74
74
|
: (props.className ?? {});
|
|
75
|
-
|
|
75
|
+
function fixMojibake(str) {
|
|
76
|
+
return str.replace(/ÔÇÖ/g, "'").replace(/ÔÇô/g, '');
|
|
77
|
+
}
|
|
76
78
|
return (_jsx(Dialog.Root, { open: globalStore.search.open, onOpenChange: (details) => {
|
|
77
79
|
globalStore.search.setOpen(details.open);
|
|
78
80
|
setSearch('');
|
|
@@ -88,7 +90,7 @@ export function Search(props) {
|
|
|
88
90
|
reference: game.reference,
|
|
89
91
|
provider: game.provider,
|
|
90
92
|
image: game.image,
|
|
91
|
-
}), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('block w-full rounded-b-md bg-bg-tertiary px-2 py-2.5 text-center font-semibold text-text-primary-brand text-xs', props.variant !== '88play' && 'truncate', classNames.gameThumbnailTitle), children: game.name })] }, game.id))) })] })), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: twMerge('mx-auto mt-12 w-fit', classNames.loadMoreButton), onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) }) })] }) })] }) }));
|
|
93
|
+
}), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('block w-full rounded-b-md bg-bg-tertiary px-2 py-2.5 text-center font-semibold text-text-primary-brand text-xs', props.variant !== '88play' && 'truncate', classNames.gameThumbnailTitle), children: fixMojibake(game.name) })] }, game.id))) })] })), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: twMerge('mx-auto mt-12 w-fit', classNames.loadMoreButton), onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) }) })] }) })] }) }));
|
|
92
94
|
}
|
|
93
95
|
function DebouncedInput(props) {
|
|
94
96
|
const [value, setValue] = useControllableState({
|