@opexa/portal-components 0.0.918 → 0.0.920
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { lazy, Suspense, useEffect, useState } from 'react';
|
|
3
3
|
import { useShallow } from 'zustand/shallow';
|
|
4
4
|
import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
|
|
5
5
|
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
@@ -15,15 +15,33 @@ import { onMobileDevice } from '../../../utils/onMobileDevice.js';
|
|
|
15
15
|
import { parseDecimal } from '../../../utils/parseDecimal.js';
|
|
16
16
|
import { useDepositWithdrawalPropsContext } from '../DepositWithdrawalContext.js';
|
|
17
17
|
import { PaymentMethods } from '../PaymentMethods.js';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
const GCashStandardCashInWithdrawal = lazy(() => import('./GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js').then((m) => ({
|
|
19
|
+
default: m.GCashStandardCashInWithdrawal,
|
|
20
|
+
})));
|
|
21
|
+
const GCashWithdrawal = lazy(() => import('./GCashWithdrawal/GCashWithdrawal.js').then((m) => ({
|
|
22
|
+
default: m.GCashWithdrawal,
|
|
23
|
+
})));
|
|
24
|
+
const InstapayGCashWithdrawal = lazy(() => import('./InstapayGCashWithdrawal/InstapayGcashWithdrawal.js').then((m) => ({
|
|
25
|
+
default: m.InstapayGCashWithdrawal,
|
|
26
|
+
})));
|
|
27
|
+
const InstapayPaymayaWithdrawal = lazy(() => import('./InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js').then((m) => ({
|
|
28
|
+
default: m.InstapayPaymayaWithdrawal,
|
|
29
|
+
})));
|
|
30
|
+
const InstapayWithdrawal = lazy(() => import('./InstapayWithdrawal/InstapayWithdrawal.js').then((m) => ({
|
|
31
|
+
default: m.InstapayWithdrawal,
|
|
32
|
+
})));
|
|
33
|
+
const MayaAppWithdrawal = lazy(() => import('./MayaAppWithdrawal/MayaAppWithdrawal.js').then((m) => ({
|
|
34
|
+
default: m.MayaAppWithdrawal,
|
|
35
|
+
})));
|
|
36
|
+
const MayaWithdrawal = lazy(() => import('./MayaWithdrawal/MayaWithdrawal.js').then((m) => ({
|
|
37
|
+
default: m.MayaWithdrawal,
|
|
38
|
+
})));
|
|
39
|
+
const PisoPayWithdrawal = lazy(() => import('./PisoPayWithdrawal/PisoPayWithdrawal.js').then((m) => ({
|
|
40
|
+
default: m.PisoPayWithdrawal,
|
|
41
|
+
})));
|
|
42
|
+
const VentajaWithdrawal = lazy(() => import('./VentajaWithdrawal/VentajaWithdrawal.js').then((m) => ({
|
|
43
|
+
default: m.VentajaWithdrawal,
|
|
44
|
+
})));
|
|
27
45
|
export function Withdrawal() {
|
|
28
46
|
const { onMaya } = useMayaAuth();
|
|
29
47
|
const { allowUnverifiedAccounts } = useDepositWithdrawalPropsContext();
|
|
@@ -120,7 +138,7 @@ export function Withdrawal() {
|
|
|
120
138
|
if (enabledPaymentMethods.length <= 0) {
|
|
121
139
|
return _jsx(NoAvailablePaymentMethods, {});
|
|
122
140
|
}
|
|
123
|
-
return (_jsxs(_Fragment, { children: [enabledPaymentMethods.length > 1 && (_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods })), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'INSTAPAY_GCASH' && _jsx(InstapayGCashWithdrawal, {}), paymentMethod === 'INSTAPAY_PAYMAYA' && _jsx(InstapayPaymayaWithdrawal, {}), paymentMethod === 'VENTAJA_DISBURSEMENT' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {}), paymentMethod === 'GCASH_STANDARD_CASH_IN' && (_jsx(GCashStandardCashInWithdrawal, {}))] }));
|
|
141
|
+
return (_jsxs(_Fragment, { children: [enabledPaymentMethods.length > 1 && (_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods })), _jsxs(Suspense, { fallback: _jsx(SpinnerIcon, { className: "mx-auto size-6" }), children: [paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'INSTAPAY_GCASH' && _jsx(InstapayGCashWithdrawal, {}), paymentMethod === 'INSTAPAY_PAYMAYA' && _jsx(InstapayPaymayaWithdrawal, {}), paymentMethod === 'VENTAJA_DISBURSEMENT' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {}), paymentMethod === 'GCASH_STANDARD_CASH_IN' && (_jsx(GCashStandardCashInWithdrawal, {}))] })] }));
|
|
124
142
|
}
|
|
125
143
|
function AccountVerificationRequired() {
|
|
126
144
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|