@opexa/portal-components 0.0.959 → 0.0.960
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/useCamera.d.ts +1 -1
- package/dist/client/hooks/useCamera.js +22 -66
- package/dist/components/AccountInfo/AccountInfo.js +1 -1
- package/dist/components/AccountSecurity/AccountSecurity.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AiOGCashDeposit/AiOGCashDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AiOGrabPayDeposit/AiOGrabPayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AiOPayMayaDeposit/AiOPayMayaDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayPayMayaDeposit.js +2 -2
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Form.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +20 -10
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit/GCashWebpayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaWebpayDeposit/MayaWebpayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/Form.js +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +1 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +2 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.js +2 -2
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js +2 -2
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +1 -1
- package/dist/components/Disclaimer/DisclaimerV3.js +21 -12
- package/dist/components/ForgotPassword/Crazywin/CWForgotPassword.js +1 -1
- package/dist/components/ForgotPassword/Crazywin/CWForgotPasswordForm.js +2 -2
- package/dist/components/ForgotPassword/ForgotPasswordForm.js +3 -3
- package/dist/components/GameProviders/GameProvidersCarousel.d.ts +8 -0
- package/dist/components/GameProviders/GameProvidersCarousel.js +32 -0
- package/dist/components/Games/Game.js +6 -1
- package/dist/components/Jackpots/JackpotsCarouselNext/JackpotsCarouselStageItem.js +1 -1
- package/dist/components/Quests/Crazywin/components/Countdown.js +1 -1
- package/dist/components/SignUp/SignUpKYC/SelfieImageField/useSelfieImageField.js +0 -1
- package/dist/components/TermsOfUse/TermsOfUseV2.lazy.d.ts +1 -1
- package/dist/components/TermsOfUse/TermsOfUseV2.lazy.js +1 -1
- package/dist/components/TermsOfUse/TermsOfUseV3.lazy.d.ts +1 -1
- package/dist/components/TermsOfUse/TermsOfUseV3.lazy.js +1 -1
- package/dist/components/shared/SelfieImageField/useSelfieImageField.js +1 -3
- package/dist/handlers/index.d.ts +2 -2
- package/dist/lib/components/Banner/Banner.test.js +1 -1
- package/dist/lib/components/Disclaimer/Disclaimer.test.js +7 -7
- package/dist/lib/components/Games/Game.js +1 -5
- package/dist/lib/components/SignIn/MobileNumberSignIn.test.js +9 -8
- package/dist/lib/components/SignIn/NameAndPasswordSignIn.test.js +14 -10
- package/dist/lib/components/SignIn/SignIn.test.js +4 -3
- package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
- package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
- 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 +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 +198 -198
- package/dist/ui/Menu/menu.recipe.d.ts +11 -11
- package/dist/ui/Popover/Popover.d.ts +88 -88
- package/dist/ui/Popover/popover.recipe.d.ts +8 -8
- package/dist/ui/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- 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/client/hooks/useVerifyMobileNumber.d.ts +0 -3
- package/dist/client/hooks/useVerifyMobileNumber.js +0 -20
- package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +0 -241
- package/dist/components/SingleSignOn/SingleSignOn.d.ts +0 -4
- package/dist/components/SingleSignOn/SingleSignOn.js +0 -185
- package/dist/components/SingleSignOn/index.d.ts +0 -1
- package/dist/components/SingleSignOn/index.js +0 -1
|
@@ -13,7 +13,7 @@ export interface UseCameraReturn<T extends string = never> {
|
|
|
13
13
|
open(): Promise<void>;
|
|
14
14
|
openNativeCamera(direction: 'front' | 'back'): Promise<File | null>;
|
|
15
15
|
close(): Promise<void>;
|
|
16
|
-
snap():
|
|
16
|
+
snap(): CameraData | null;
|
|
17
17
|
reopen(): Promise<void>;
|
|
18
18
|
reset(): Promise<void>;
|
|
19
19
|
data: CameraData | null;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CameraDirection } from '@capacitor/camera';
|
|
2
2
|
import { isBoolean } from 'lodash-es';
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
4
|
-
import invariant from 'tiny-invariant';
|
|
5
4
|
import { useMediaQuery } from 'usehooks-ts';
|
|
6
5
|
export function useCamera(options = {}) {
|
|
7
6
|
const videoRef = useRef(null);
|
|
@@ -102,7 +101,7 @@ export function useCamera(options = {}) {
|
|
|
102
101
|
const file = new File([blob], 'photo.jpg', { type: blob.type });
|
|
103
102
|
return file;
|
|
104
103
|
}
|
|
105
|
-
catch (
|
|
104
|
+
catch (_e) {
|
|
106
105
|
setError({
|
|
107
106
|
name: 'CameraError',
|
|
108
107
|
message: 'Failed to open native camera. Check your device settings and try again.',
|
|
@@ -122,76 +121,33 @@ export function useCamera(options = {}) {
|
|
|
122
121
|
resolve();
|
|
123
122
|
});
|
|
124
123
|
}, []);
|
|
125
|
-
const snap = useCallback(
|
|
126
|
-
setData(null);
|
|
127
|
-
setError(null);
|
|
128
|
-
setSnapping(true);
|
|
124
|
+
const snap = useCallback(() => {
|
|
129
125
|
const video = videoRef.current;
|
|
126
|
+
if (!video)
|
|
127
|
+
return null;
|
|
130
128
|
const canvas = document.createElement('canvas');
|
|
131
129
|
const context = canvas.getContext('2d');
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
video.currentTime = 1;
|
|
130
|
+
if (!context)
|
|
131
|
+
return null;
|
|
135
132
|
canvas.width = video.videoWidth;
|
|
136
133
|
canvas.height = video.videoHeight;
|
|
137
|
-
context.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return setError({
|
|
146
|
-
name: 'CameraError',
|
|
147
|
-
message: "'canvas.toBlob' failed to create blob",
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
const url = canvas.toDataURL('image/jpeg', 1);
|
|
151
|
-
const file = new File([blob], `${crypto.randomUUID()}.jpeg`, {
|
|
152
|
-
type: 'image/jpeg',
|
|
153
|
-
endings: 'native',
|
|
154
|
-
lastModified: Date.now(),
|
|
155
|
-
});
|
|
156
|
-
const image = new Image();
|
|
157
|
-
image.src = url;
|
|
158
|
-
image.alt = '';
|
|
159
|
-
image.width = canvas.width;
|
|
160
|
-
image.height = canvas.height;
|
|
161
|
-
if (!image.complete || image.naturalWidth === 0) {
|
|
162
|
-
await new Promise((resolve, reject) => {
|
|
163
|
-
image.onload = () => resolve();
|
|
164
|
-
image.onerror = () => reject();
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
const data = {
|
|
168
|
-
url,
|
|
169
|
-
file,
|
|
170
|
-
image,
|
|
171
|
-
};
|
|
172
|
-
if (!options.transform) {
|
|
173
|
-
setData(data);
|
|
174
|
-
setSnapping(false);
|
|
175
|
-
resolve(data);
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
const transformResult = await options.transform({
|
|
179
|
-
...data,
|
|
180
|
-
video,
|
|
181
|
-
canvas,
|
|
182
|
-
});
|
|
183
|
-
if (transformResult.ok) {
|
|
184
|
-
setData(transformResult.data);
|
|
185
|
-
resolve(transformResult.data);
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
setError(transformResult.error);
|
|
189
|
-
resolve(null);
|
|
190
|
-
}
|
|
191
|
-
setSnapping(false);
|
|
192
|
-
}, 'image/jpeg', 1);
|
|
134
|
+
context.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
135
|
+
const url = canvas.toDataURL('image/jpeg', 0.9);
|
|
136
|
+
const arr = atob(url.split(',')[1]);
|
|
137
|
+
const u8arr = new Uint8Array(arr.length);
|
|
138
|
+
for (let i = 0; i < arr.length; i++)
|
|
139
|
+
u8arr[i] = arr.charCodeAt(i);
|
|
140
|
+
const file = new File([u8arr], `${crypto.randomUUID()}.jpeg`, {
|
|
141
|
+
type: 'image/jpeg',
|
|
193
142
|
});
|
|
194
|
-
|
|
143
|
+
const image = new Image();
|
|
144
|
+
image.src = url;
|
|
145
|
+
image.width = canvas.width;
|
|
146
|
+
image.height = canvas.height;
|
|
147
|
+
const data = { url, file, image };
|
|
148
|
+
setData(data);
|
|
149
|
+
return data;
|
|
150
|
+
}, []);
|
|
195
151
|
const reset = useCallback(() => {
|
|
196
152
|
setData(null);
|
|
197
153
|
setError(null);
|
|
@@ -205,7 +205,7 @@ function ContactInfo({ variant }) {
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
}, [account, form, parse]);
|
|
208
|
-
return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "grow font-semibold text-sm text-text-secondary-700", children: "Contact Info" }), profileCompletion?.personalInformation ? (_jsx(ark.svg, { asChild: true, className: "size-6 text-text-success-primary", children: _jsx(CheckVerified02Icon, {}) })) : (_jsxs("div", { className: "flex items-center gap-1 rounded-sm border border-[#93370d] bg-[#4e1d09] px-sm py-xs", children: [_jsx(AlertCircleIcon, { className: "h-5 w-5 text-[#FEC84B]" }), _jsx("span", { className: "m-0 text-[#FEC84B] text-xs", children: "Not Set" })] }))] }), _jsx(AlertWarning, { title: "Please add an email address to your account to receive important notifications.", className: "my-3" }), _jsxs("form", { className: "rounded-xl border border-border-secondary bg-bg-primary-alt shadow-xs", onSubmit: form.handleSubmit((data) => {
|
|
208
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "grow font-semibold text-sm text-text-secondary-700", children: "Contact Info" }), profileCompletion?.personalInformation ? (_jsx(ark.svg, { asChild: true, className: "size-6 text-text-success-primary", children: _jsx(CheckVerified02Icon, {}) })) : (_jsxs("div", { className: "flex items-center gap-1 rounded-sm border border-[#93370d] bg-[#4e1d09] px-sm py-xs", children: [_jsx(AlertCircleIcon, { className: "h-5 w-5 text-[#FEC84B]" }), _jsx("span", { className: "m-0 text-[#FEC84B] text-xs", children: "Not Set" })] }))] }), !profileCompletion?.personalInformation && (_jsx(AlertWarning, { title: "Please add an email address to your account to receive important notifications.", className: "my-3" })), _jsxs("form", { className: "rounded-xl border border-border-secondary bg-bg-primary-alt shadow-xs", onSubmit: form.handleSubmit((data) => {
|
|
209
209
|
updateAccountMutation.mutate({
|
|
210
210
|
emailAddress: data.emailAddress && account?.emailAddress !== data.emailAddress
|
|
211
211
|
? data.emailAddress
|
|
@@ -160,7 +160,7 @@ function TransactionPassword() {
|
|
|
160
160
|
confirmPassword: '',
|
|
161
161
|
},
|
|
162
162
|
});
|
|
163
|
-
return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-start gap-8", children: [_jsxs("div", { className: "grow", children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Transaction password" }), _jsx("p", { className: "text-sm text-text-tertiary-600", children: "The transaction password secures and confirms your wallet withdrawals." })] }), profileCompletion?.
|
|
163
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: "flex items-start gap-8", children: [_jsxs("div", { className: "grow", children: [_jsx("h2", { className: "font-semibold text-sm text-text-secondary-700", children: "Transaction password" }), _jsx("p", { className: "text-sm text-text-tertiary-600", children: "The transaction password secures and confirms your wallet withdrawals." })] }), profileCompletion?.transactionPassword ? (_jsx(ark.svg, { asChild: true, className: "size-6 text-text-success-primary", children: _jsx(CheckVerified02Icon, {}) })) : (_jsxs("div", { className: "flex items-center gap-1 rounded-sm border border-[#93370d] bg-[#4e1d09] px-sm py-xs", children: [_jsx(AlertCircleIcon, { className: "h-5 w-5 text-[#FEC84B]" }), _jsx("span", { className: "m-0 text-nowrap text-[#FEC84B] text-xs", children: "Not Set" })] }))] }), !profileCompletion?.transactionPassword && (_jsx(AlertWarning, { title: "Please set your transaction password. This is required when making withdrawals and helps secure your account.", className: "my-3" })), _jsxs("form", { className: "mt-5 rounded-xl border border-border-secondary bg-bg-primary-alt shadow-xs", onSubmit: form.handleSubmit((data) => {
|
|
164
164
|
updateAccountMutation.mutate({
|
|
165
165
|
transactionPassword: data.password,
|
|
166
166
|
});
|
|
@@ -121,7 +121,7 @@ export function AiOGCashDeposit() {
|
|
|
121
121
|
code: z.ZodIssueCode.too_big,
|
|
122
122
|
inclusive: true,
|
|
123
123
|
maximum: maximumAmount,
|
|
124
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
124
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
}),
|
|
@@ -114,7 +114,7 @@ export function AiOGrabPayDeposit() {
|
|
|
114
114
|
code: z.ZodIssueCode.too_big,
|
|
115
115
|
inclusive: true,
|
|
116
116
|
maximum: maximumAmount,
|
|
117
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
117
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
}),
|
|
@@ -119,7 +119,7 @@ export function AiOPayMayaDeposit() {
|
|
|
119
119
|
code: z.ZodIssueCode.too_big,
|
|
120
120
|
inclusive: true,
|
|
121
121
|
maximum: maximumAmount,
|
|
122
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
122
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
}),
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.js
CHANGED
|
@@ -123,7 +123,7 @@ export function AurixPayGCashDeposit() {
|
|
|
123
123
|
code: z.ZodIssueCode.too_big,
|
|
124
124
|
inclusive: true,
|
|
125
125
|
maximum: maximumAmount,
|
|
126
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
126
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
}),
|
|
@@ -208,7 +208,7 @@ export function AurixPayGCashDeposit() {
|
|
|
208
208
|
value = value.replace(/(?!^)\D/g, '');
|
|
209
209
|
if (value.startsWith('+')) {
|
|
210
210
|
// keep leading +
|
|
211
|
-
value =
|
|
211
|
+
value = `+${value.slice(1).replace(/\D/g, '')}`;
|
|
212
212
|
}
|
|
213
213
|
else {
|
|
214
214
|
// remove all non-digits
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js
CHANGED
|
@@ -125,7 +125,7 @@ export function AurixPayGrabPayDeposit() {
|
|
|
125
125
|
code: z.ZodIssueCode.too_big,
|
|
126
126
|
inclusive: true,
|
|
127
127
|
maximum: maximumAmount,
|
|
128
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
128
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
}),
|
|
@@ -210,7 +210,7 @@ export function AurixPayGrabPayDeposit() {
|
|
|
210
210
|
value = value.replace(/(?!^)\D/g, '');
|
|
211
211
|
if (value.startsWith('+')) {
|
|
212
212
|
// keep leading +
|
|
213
|
-
value =
|
|
213
|
+
value = `+${value.slice(1).replace(/\D/g, '')}`;
|
|
214
214
|
}
|
|
215
215
|
else {
|
|
216
216
|
// remove all non-digits
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayPayMayaDeposit.js
CHANGED
|
@@ -123,7 +123,7 @@ export function AurixPayPayMayaDeposit() {
|
|
|
123
123
|
code: z.ZodIssueCode.too_big,
|
|
124
124
|
inclusive: true,
|
|
125
125
|
maximum: maximumAmount,
|
|
126
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
126
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
}),
|
|
@@ -208,7 +208,7 @@ export function AurixPayPayMayaDeposit() {
|
|
|
208
208
|
value = value.replace(/(?!^)\D/g, '');
|
|
209
209
|
if (value.startsWith('+')) {
|
|
210
210
|
// keep leading +
|
|
211
|
-
value =
|
|
211
|
+
value = `+${value.slice(1).replace(/\D/g, '')}`;
|
|
212
212
|
}
|
|
213
213
|
else {
|
|
214
214
|
// remove all non-digits
|
|
@@ -64,7 +64,7 @@ export function Form() {
|
|
|
64
64
|
code: z.ZodIssueCode.too_big,
|
|
65
65
|
inclusive: true,
|
|
66
66
|
maximum: maximumAmount,
|
|
67
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
67
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
}),
|
|
@@ -7,6 +7,7 @@ import { usePaymentSettingsQuery } from '../../../client/hooks/usePaymentSetting
|
|
|
7
7
|
import { AlertCircleIcon } from '../../../icons/AlertCircleIcon.js';
|
|
8
8
|
import { SpinnerIcon } from '../../../icons/SpinnerIcon.js';
|
|
9
9
|
import { onMobileDevice } from '../../../utils/onMobileDevice.js';
|
|
10
|
+
import { useDepositWithdrawalPropsContext } from '../DepositWithdrawalContext.js';
|
|
10
11
|
import { PaymentMethods } from '../PaymentMethods.js';
|
|
11
12
|
import { Voucher } from './Voucher/Voucher.js';
|
|
12
13
|
const QRPHDeposit = lazy(() => import('./QRPHDeposit/QRPHDeposit.js').then((m) => ({ default: m.QRPHDeposit })));
|
|
@@ -49,6 +50,7 @@ export function Deposit() {
|
|
|
49
50
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
50
51
|
const paymentSettings = paymentSettingsQuery.data;
|
|
51
52
|
const featureFlag = useFeatureFlag();
|
|
53
|
+
const { isOfWinSite } = useDepositWithdrawalPropsContext();
|
|
52
54
|
const aurixComponents = useMemo(() => {
|
|
53
55
|
return {
|
|
54
56
|
gcash: lazy(() => import('./AurixPayGCashDeposit/AurixPayGCashDeposit.js').then((m) => ({
|
|
@@ -76,23 +78,31 @@ export function Deposit() {
|
|
|
76
78
|
const paymentMethods = [
|
|
77
79
|
{
|
|
78
80
|
method: 'GCASH',
|
|
79
|
-
enabled:
|
|
80
|
-
|
|
81
|
+
enabled: isOfWinSite
|
|
82
|
+
? paymentSettings?.gcashDepositGatewaySettings?.[enabledKey] &&
|
|
83
|
+
featureFlag.enabled
|
|
84
|
+
: paymentSettings?.gcashDepositGatewaySettings?.[enabledKey],
|
|
81
85
|
},
|
|
82
86
|
{
|
|
83
87
|
method: 'MAYA',
|
|
84
|
-
enabled:
|
|
85
|
-
|
|
88
|
+
enabled: isOfWinSite
|
|
89
|
+
? paymentSettings?.mayaDepositGatewaySettings?.[enabledKey] &&
|
|
90
|
+
featureFlag.enabled
|
|
91
|
+
: paymentSettings?.mayaDepositGatewaySettings?.[enabledKey],
|
|
86
92
|
},
|
|
87
93
|
{
|
|
88
94
|
method: 'QRPH',
|
|
89
|
-
enabled:
|
|
90
|
-
|
|
95
|
+
enabled: isOfWinSite
|
|
96
|
+
? paymentSettings?.qrphDepositGatewaySettings?.[enabledKey] &&
|
|
97
|
+
featureFlag.enabled
|
|
98
|
+
: paymentSettings?.qrphDepositGatewaySettings?.[enabledKey],
|
|
91
99
|
},
|
|
92
100
|
{
|
|
93
101
|
method: 'ONLINE_BANK',
|
|
94
|
-
enabled:
|
|
95
|
-
|
|
102
|
+
enabled: isOfWinSite
|
|
103
|
+
? paymentSettings?.onlineBankDepositGatewaySettings?.[enabledKey] &&
|
|
104
|
+
featureFlag.enabled
|
|
105
|
+
: paymentSettings?.onlineBankDepositGatewaySettings?.[enabledKey],
|
|
96
106
|
},
|
|
97
107
|
{
|
|
98
108
|
method: 'LIBANGAN_PAY_IN',
|
|
@@ -149,7 +159,7 @@ export function Deposit() {
|
|
|
149
159
|
{
|
|
150
160
|
method: 'VOUCHER',
|
|
151
161
|
enabled: featureFlag.enabled,
|
|
152
|
-
}
|
|
162
|
+
},
|
|
153
163
|
];
|
|
154
164
|
paymentMethods.forEach((o) => {
|
|
155
165
|
if (o.enabled) {
|
|
@@ -157,7 +167,7 @@ export function Deposit() {
|
|
|
157
167
|
}
|
|
158
168
|
});
|
|
159
169
|
return l;
|
|
160
|
-
}, [featureFlag.enabled, onMaya, paymentSettings]);
|
|
170
|
+
}, [featureFlag.enabled, onMaya, paymentSettings, isOfWinSite]);
|
|
161
171
|
const [paymentMethod, setPaymentMethod] = useState();
|
|
162
172
|
useEffect(() => {
|
|
163
173
|
if (enabledPaymentMethods.length > 0 && !paymentMethod) {
|
|
@@ -115,7 +115,7 @@ export function GCashDeposit() {
|
|
|
115
115
|
code: z.ZodIssueCode.too_big,
|
|
116
116
|
inclusive: true,
|
|
117
117
|
maximum: maximumAmount,
|
|
118
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
118
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
}),
|
|
@@ -110,7 +110,7 @@ export function GCashWebpayDeposit() {
|
|
|
110
110
|
code: z.ZodIssueCode.too_big,
|
|
111
111
|
inclusive: true,
|
|
112
112
|
maximum: maximumAmount,
|
|
113
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
113
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
}),
|
|
@@ -110,7 +110,7 @@ export function LibanganDeposit() {
|
|
|
110
110
|
code: z.ZodIssueCode.too_big,
|
|
111
111
|
inclusive: true,
|
|
112
112
|
maximum: maximumAmount,
|
|
113
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
113
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
}),
|
|
@@ -81,7 +81,7 @@ export function MayaAppDeposit() {
|
|
|
81
81
|
code: z.ZodIssueCode.too_big,
|
|
82
82
|
inclusive: true,
|
|
83
83
|
maximum: maximumAmount,
|
|
84
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
84
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
}),
|
|
@@ -115,7 +115,7 @@ export function MayaDeposit() {
|
|
|
115
115
|
code: z.ZodIssueCode.too_big,
|
|
116
116
|
inclusive: true,
|
|
117
117
|
maximum: maximumAmount,
|
|
118
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
118
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
}),
|
|
@@ -110,7 +110,7 @@ export function MayaWebpayDeposit() {
|
|
|
110
110
|
code: z.ZodIssueCode.too_big,
|
|
111
111
|
inclusive: true,
|
|
112
112
|
maximum: maximumAmount,
|
|
113
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
113
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
}),
|
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: "waiting" | "failed" | "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: "waiting" | "failed" | "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/OnlineBankDepositForm.js
CHANGED
|
@@ -56,7 +56,7 @@ export function OnlineBankDepositForm() {
|
|
|
56
56
|
code: z.ZodIssueCode.too_big,
|
|
57
57
|
inclusive: true,
|
|
58
58
|
maximum: maximumAmount,
|
|
59
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
59
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
}),
|
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: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
6
|
verify: () => void;
|
|
7
7
|
reset: () => void;
|
|
8
8
|
deposit: Deposit | null;
|
|
@@ -120,7 +120,7 @@ export function PisoPayDeposit() {
|
|
|
120
120
|
code: z.ZodIssueCode.too_big,
|
|
121
121
|
inclusive: true,
|
|
122
122
|
maximum: maximumAmount,
|
|
123
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
123
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
}),
|
|
@@ -64,7 +64,7 @@ export function Form() {
|
|
|
64
64
|
code: z.ZodIssueCode.too_big,
|
|
65
65
|
inclusive: true,
|
|
66
66
|
maximum: maximumAmount,
|
|
67
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
67
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
}),
|
|
@@ -11,6 +11,7 @@ export interface DepositWithdrawalProps {
|
|
|
11
11
|
libanganRedirectionUrl?: string;
|
|
12
12
|
hasPrivacyPolicyAndTermsOfUse?: boolean;
|
|
13
13
|
bypassDomains?: BypassDomainConfig[];
|
|
14
|
+
isOfWinSite?: boolean;
|
|
14
15
|
/**
|
|
15
16
|
* List of enabled withdrawal providers
|
|
16
17
|
* @example ['GCASH', 'MAYA_APP', 'VENTAJA_DISBURSEMENT']
|
|
@@ -21,10 +21,11 @@ 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, ...restProps } = props;
|
|
24
|
+
const { hasPrivacyPolicyAndTermsOfUse = true, isOfWinSite = false, ...restProps } = props;
|
|
25
25
|
const mergedProps = {
|
|
26
26
|
...restProps,
|
|
27
27
|
hasPrivacyPolicyAndTermsOfUse,
|
|
28
|
+
isOfWinSite,
|
|
28
29
|
bypassDepositKycCheck,
|
|
29
30
|
};
|
|
30
31
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
@@ -77,7 +77,7 @@ export function GCashStandardCashInWithdrawal() {
|
|
|
77
77
|
code: z.ZodIssueCode.too_big,
|
|
78
78
|
inclusive: true,
|
|
79
79
|
maximum: maximumAmount,
|
|
80
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
80
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}),
|
|
@@ -77,7 +77,7 @@ export function GCashWithdrawal() {
|
|
|
77
77
|
code: z.ZodIssueCode.too_big,
|
|
78
78
|
inclusive: true,
|
|
79
79
|
maximum: maximumAmount,
|
|
80
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
80
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}),
|
|
@@ -79,7 +79,7 @@ export function InstapayGCashWithdrawal() {
|
|
|
79
79
|
code: z.ZodIssueCode.too_big,
|
|
80
80
|
inclusive: true,
|
|
81
81
|
maximum: maximumAmount,
|
|
82
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
82
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}),
|
|
@@ -121,7 +121,7 @@ export function InstapayGCashWithdrawal() {
|
|
|
121
121
|
transactionPassword: data.password,
|
|
122
122
|
accountNumber: data.accountNumber,
|
|
123
123
|
accountName: data.accountName,
|
|
124
|
-
bankCode:
|
|
124
|
+
bankCode: 'BNKGCH',
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
127
|
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Phone Number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
|
|
@@ -79,7 +79,7 @@ export function InstapayPaymayaWithdrawal() {
|
|
|
79
79
|
code: z.ZodIssueCode.too_big,
|
|
80
80
|
inclusive: true,
|
|
81
81
|
maximum: maximumAmount,
|
|
82
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
82
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}),
|
|
@@ -121,7 +121,7 @@ export function InstapayPaymayaWithdrawal() {
|
|
|
121
121
|
transactionPassword: data.password,
|
|
122
122
|
accountNumber: data.accountNumber,
|
|
123
123
|
accountName: data.accountName,
|
|
124
|
-
bankCode:
|
|
124
|
+
bankCode: 'BNKMYA',
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
127
|
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Phone Number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
|
package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js
CHANGED
|
@@ -98,7 +98,7 @@ export function InstapayWithdrawal() {
|
|
|
98
98
|
code: z.ZodIssueCode.too_big,
|
|
99
99
|
inclusive: true,
|
|
100
100
|
maximum: maximumAmount,
|
|
101
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
101
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
}),
|
|
@@ -77,7 +77,7 @@ export function MayaWithdrawal() {
|
|
|
77
77
|
code: z.ZodIssueCode.too_big,
|
|
78
78
|
inclusive: true,
|
|
79
79
|
maximum: maximumAmount,
|
|
80
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
80
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}),
|
|
@@ -86,7 +86,7 @@ export function VentajaWithdrawal() {
|
|
|
86
86
|
code: z.ZodIssueCode.too_big,
|
|
87
87
|
inclusive: true,
|
|
88
88
|
maximum: maximumAmount,
|
|
89
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}
|
|
89
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}. Please contact support.`,
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
}),
|