@opexa/portal-components 0.0.931 → 0.0.933
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/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +2 -21
- 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/PortalProvider/SessionWatcher.js +2 -0
- package/dist/components/Search/Search.lazy.js +4 -2
- package/dist/components/SingleSignOn/SingleSignOn.d.ts +1 -1
- package/dist/components/SingleSignOn/SingleSignOn.js +15 -7
- package/dist/ui/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- package/package.json +1 -1
- package/dist/assets/providers/alize.png +0 -0
- package/dist/assets/providers/bigtime-gaming.png +0 -0
- package/dist/assets/providers/bng.png +0 -0
- package/dist/assets/providers/boongo.png +0 -0
- package/dist/assets/providers/btg.png +0 -0
- package/dist/assets/providers/cq9.png +0 -0
- package/dist/assets/providers/darwin.png +0 -0
- package/dist/assets/providers/digitain.png +0 -0
- package/dist/assets/providers/evolution.png +0 -0
- package/dist/assets/providers/fantasma-games.png +0 -0
- package/dist/assets/providers/fc.png +0 -0
- package/dist/assets/providers/fp.png +0 -0
- package/dist/assets/providers/habanero.png +0 -0
- package/dist/assets/providers/hacksaw.png +0 -0
- package/dist/assets/providers/jdb.png +0 -0
- package/dist/assets/providers/jili.png +0 -0
- package/dist/assets/providers/leap.png +0 -0
- package/dist/assets/providers/live-22-metaverse.png +0 -0
- package/dist/assets/providers/netent.png +0 -0
- package/dist/assets/providers/no-limit.png +0 -0
- package/dist/assets/providers/pg.png +0 -0
- package/dist/assets/providers/pgsoft.png +0 -0
- package/dist/assets/providers/pragmatic-play.png +0 -0
- package/dist/assets/providers/realtime-gaming.png +0 -0
- package/dist/assets/providers/redtiger.png +0 -0
- package/dist/assets/providers/rtg.png +0 -0
- package/dist/assets/providers/sagaming.png +0 -0
- package/dist/client/hooks/useAiOGCashDepositMutation.d.ts +0 -4
- package/dist/client/hooks/useAiOGCashDepositMutation.js +0 -90
- package/dist/client/hooks/useAiOGrabPayDepositMutation.d.ts +0 -4
- package/dist/client/hooks/useAiOGrabPayDepositMutation.js +0 -80
- package/dist/client/hooks/useAiOPalawanPayDepositMutation.d.ts +0 -4
- package/dist/client/hooks/useAiOPalawanPayDepositMutation.js +0 -80
- package/dist/client/hooks/useAiOPayMayaDepositMutation.d.ts +0 -4
- package/dist/client/hooks/useAiOPayMayaDepositMutation.js +0 -80
- package/dist/components/Banner/Banner.client.d.ts +0 -12
- package/dist/components/Banner/Banner.client.js +0 -49
- package/dist/components/DepositWithdrawal/AiOPaymentMethods.d.ts +0 -11
- package/dist/components/DepositWithdrawal/AiOPaymentMethods.js +0 -55
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +0 -99
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +0 -17
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +0 -116
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHQRCode.d.ts +0 -3
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHQRCode.js +0 -69
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositAlert.js +0 -99
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.d.ts +0 -25
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositDetails.js +0 -17
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositForm.js +0 -116
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHQRCode.d.ts +0 -3
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHQRCode.js +0 -69
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.js +0 -85
- package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGCashDeposit/AiOGCashDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGCashDeposit/AiOGCashDeposit.js +0 -173
- package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGrabPayDeposit/AiOGrabPayDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGrabPayDeposit/AiOGrabPayDeposit.js +0 -171
- package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPalawanPayDeposit/AiOPalawanPayDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPalawanPayDeposit/AiOPalawanPayDeposit.js +0 -171
- package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPayMayaDeposit/AiOPayMayaDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPayMayaDeposit/AiOPayMayaDeposit.js +0 -171
- package/dist/components/DepositWithdrawal/Deposit__legacy/AvailablePromos.d.ts +0 -8
- package/dist/components/DepositWithdrawal/Deposit__legacy/AvailablePromos.js +0 -33
- package/dist/components/DepositWithdrawal/Deposit__legacy/Deposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/Deposit.js +0 -120
- package/dist/components/DepositWithdrawal/Deposit__legacy/GCashDeposit/GCashDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/GCashDeposit/GCashDeposit.js +0 -163
- package/dist/components/DepositWithdrawal/Deposit__legacy/GCashWebpayDeposit/GCashWebpayDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/GCashWebpayDeposit/GCashWebpayDeposit.js +0 -165
- package/dist/components/DepositWithdrawal/Deposit__legacy/LibanganDeposit/LibanganDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/LibanganDeposit/LibanganDeposit.js +0 -186
- package/dist/components/DepositWithdrawal/Deposit__legacy/MayaAppDeposit/MayaAppDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/MayaAppDeposit/MayaAppDeposit.js +0 -157
- package/dist/components/DepositWithdrawal/Deposit__legacy/MayaDeposit/MayaDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/MayaDeposit/MayaDeposit.js +0 -163
- package/dist/components/DepositWithdrawal/Deposit__legacy/MayaWebpayDeposit/MayaWebpayDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/MayaWebpayDeposit/MayaWebpayDeposit.js +0 -166
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositAlert.js +0 -99
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +0 -25
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositDetails.js +0 -19
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositForm.js +0 -115
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.js +0 -81
- package/dist/components/DepositWithdrawal/Deposit__legacy/PisoPayDeposit/PisoPayDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/PisoPayDeposit/PisoPayDeposit.js +0 -180
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositAlert.js +0 -99
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +0 -25
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositDetails.js +0 -17
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositForm.js +0 -116
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHQRCode.d.ts +0 -3
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHQRCode.js +0 -69
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.js +0 -85
- package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
- package/dist/components/DigitainLauncher/Loading.js +0 -5
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
- package/dist/components/KYC/BasicInformation.d.ts +0 -1
- package/dist/components/KYC/BasicInformation.js +0 -101
- package/dist/components/KYC/IdentityVerification.d.ts +0 -1
- package/dist/components/KYC/IdentityVerification.js +0 -120
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -8
- package/dist/components/KYC/KYC.lazy.d.ts +0 -6
- package/dist/components/KYC/KYC.lazy.js +0 -45
- package/dist/components/KYC/KYCContext.d.ts +0 -6
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/KYCDefault/BasicInformation.d.ts +0 -1
- package/dist/components/KYC/KYCDefault/BasicInformation.js +0 -101
- package/dist/components/KYC/KYCVerificationStatus.d.ts +0 -1
- package/dist/components/KYC/KYCVerificationStatus.js +0 -10
- package/dist/components/KYC/KYCVerificationStatus.lazy.d.ts +0 -1
- package/dist/components/KYC/KYCVerificationStatus.lazy.js +0 -36
- package/dist/components/KYC/PersonalInformation.d.ts +0 -1
- package/dist/components/KYC/PersonalInformation.js +0 -122
- package/dist/components/KYC/useKYC.d.ts +0 -25
- package/dist/components/KYC/useKYC.js +0 -38
- package/dist/components/KYCNotRequired/KYCNotRequired.d.ts +0 -0
- package/dist/components/KYCNotRequired/KYCNotRequired.js +0 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +0 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +0 -12
- package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
- package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
- package/dist/components/Quests/MultiWageringQuest.d.ts +0 -1
- package/dist/components/Quests/MultiWageringQuest.js +0 -111
- package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
- package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
- package/dist/components/SessionWatcher/index.d.ts +0 -1
- package/dist/components/SessionWatcher/index.js +0 -1
- package/dist/components/SignIn/utils.d.ts +0 -8
- package/dist/components/SignIn/utils.js +0 -26
- package/dist/constants/Branches.d.ts +0 -2
- package/dist/constants/Branches.js +0 -42
- package/dist/images/game-providers/ALPHACHINKO.png +0 -0
- package/dist/images/responsible-gaming-yellow.png +0 -0
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +0 -1
- package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
- package/dist/third-parties/FacebookPixel/index.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
- package/dist/third-parties/index.d.ts +0 -2
- package/dist/third-parties/index.js +0 -2
- package/dist/utils/getLocaleInfo.d.ts +0 -79
- package/dist/utils/getLocaleInfo.js +0 -175
package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js
CHANGED
|
@@ -97,7 +97,7 @@ export function AurixPayGrabPayDeposit() {
|
|
|
97
97
|
const depositsCount = depositsCountQuery.data ?? 0;
|
|
98
98
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
99
99
|
const paymentSettings = paymentSettingsQuery.data;
|
|
100
|
-
const gatewaySettings = paymentSettings?.
|
|
100
|
+
const gatewaySettings = paymentSettings?.aioGCashDepositGatewaySettings;
|
|
101
101
|
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
102
102
|
const minimumAmount = depositsCount <= 0
|
|
103
103
|
? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
|
|
@@ -200,26 +200,7 @@ export function AurixPayGrabPayDeposit() {
|
|
|
200
200
|
accountNumber: data.accountNumber,
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
}), noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Account number" }), _jsx(Field.Input, { ...form.register('accountNumber', {
|
|
204
|
-
onChange: (e) => {
|
|
205
|
-
// Allow only digits and leading +
|
|
206
|
-
let value = e.target.value;
|
|
207
|
-
// Remove all non-digit except leading +
|
|
208
|
-
value = value.replace(/(?!^)\D/g, '');
|
|
209
|
-
if (value.startsWith('+')) {
|
|
210
|
-
// keep leading +
|
|
211
|
-
value = '+' + value.slice(1).replace(/\D/g, '');
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
// remove all non-digits
|
|
215
|
-
value = value.replace(/\D/g, '');
|
|
216
|
-
}
|
|
217
|
-
e.target.value = value;
|
|
218
|
-
form.setValue('accountNumber', value, {
|
|
219
|
-
shouldValidate: true,
|
|
220
|
-
});
|
|
221
|
-
},
|
|
222
|
-
}), inputMode: "tel", pattern: "^\\+?[0-9]*$", autoComplete: "tel" }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-lg", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
203
|
+
}), noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Account number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-lg", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
223
204
|
o.field.onChange(details.value);
|
|
224
205
|
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
|
|
225
206
|
form.setValue('amount', value.toString(), {
|
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/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;
|
|
@@ -10,10 +10,12 @@ import { toaster } from '../../client/utils/toaster.js';
|
|
|
10
10
|
export function SessionWatcher() {
|
|
11
11
|
const router = useRouter();
|
|
12
12
|
const sessionQuery = useSessionQuery();
|
|
13
|
+
console.log('sessionQuery', sessionQuery.data);
|
|
13
14
|
const sessionHealthQuery = useSessionHealthQuery({
|
|
14
15
|
enabled: sessionQuery.data?.status === 'authenticated',
|
|
15
16
|
refetchInterval: 1000 * 5,
|
|
16
17
|
});
|
|
18
|
+
console.log('sessionHealthQuery', sessionHealthQuery.data);
|
|
17
19
|
const { gameLaunch } = useGlobalStore(useShallow((ctx) => ({
|
|
18
20
|
gameLaunch: ctx.gameLaunch,
|
|
19
21
|
})));
|
|
@@ -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({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function SingleSignOn(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function SingleSignOn(): import("react/jsx-runtime").JSX.Element | null;
|
|
2
2
|
export declare function VerifyMobileNumber({ onClose }: {
|
|
3
3
|
onClose?: () => void;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
4
|
import Image from 'next/image';
|
|
5
5
|
import { useParams, useRouter, useSearchParams } from 'next/navigation';
|
|
@@ -45,6 +45,8 @@ export function SingleSignOn() {
|
|
|
45
45
|
toaster.error({
|
|
46
46
|
description: 'Account creation failed',
|
|
47
47
|
});
|
|
48
|
+
setIsSsoOpen(false);
|
|
49
|
+
router.push('/');
|
|
48
50
|
},
|
|
49
51
|
});
|
|
50
52
|
// biome-ignore lint/correctness/useExhaustiveDependencies: We only want to trigger the mutation when the URL parameters change.
|
|
@@ -54,12 +56,18 @@ export function SingleSignOn() {
|
|
|
54
56
|
ssoMutation.mutate({ partnerId, token });
|
|
55
57
|
}
|
|
56
58
|
}, [partnerId, token]);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
if (ssoMutation.isPending) {
|
|
60
|
+
return (_jsx(Dialog.Root, { open: isSsoOpen, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "flex items-center", children: _jsxs(Dialog.Content, { className: "flex h-[333px] w-[375px] flex-col items-center space-y-4 bg-[#111827] p-6 text-center", style: {
|
|
61
|
+
backgroundImage: `url(${lightBg.src})`,
|
|
62
|
+
}, children: [_jsx(Image, { src: inplayLogo, alt: "inplay logo", width: 82, height: 34, className: "h-auto w-[82px]" }), _jsx("div", { className: "mb-4 h-7 w-7 animate-spin rounded-full border-4 border-[#101730] border-t-[#F05027]" }), _jsx("div", { className: "text-[#CECFD2] text-sm", children: "We\u2019re creating an account for you..." }), _jsx("div", { className: "text-[#CECFD2] text-sm", children: "In the meantime, you can watch your favorite series on CinePop!" }), _jsxs("div", { className: "pt-3", children: [_jsx(Image, { src: cinePopLogo, alt: "cine poplogo", width: 151, height: 24, className: "mx-auto mb-2 h-auto w-[151px]" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { src: secretConfessionsLogo, alt: "secret confessions logo", width: 104, height: 53, className: "h-auto w-[104px]" }), _jsx(Image, { src: dearUtolLogo, alt: "dear utol logo", width: 105, height: 53, className: "h-auto w-[105px]" }), _jsx(Image, { src: mariasDiary, alt: "maria's diary logo", width: 104, height: 53, className: "h-auto w-[104px]" })] })] })] }) })] }) }));
|
|
63
|
+
}
|
|
64
|
+
if (showVerifyDialog) {
|
|
65
|
+
return (_jsx(VerifyMobileNumber, { onClose: () => {
|
|
66
|
+
setShowVerifyDialog(false);
|
|
67
|
+
router.push('/');
|
|
68
|
+
} }));
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
63
71
|
}
|
|
64
72
|
export function VerifyMobileNumber({ onClose }) {
|
|
65
73
|
const [step, setStep] = useState(1);
|
|
@@ -4,8 +4,8 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
4
4
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
5
5
|
pattern?: import("tailwind-variants").ClassValue;
|
|
6
6
|
root?: import("tailwind-variants").ClassValue;
|
|
7
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
8
7
|
overlay?: import("tailwind-variants").ClassValue;
|
|
8
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
9
9
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
@@ -14,29 +14,29 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
14
14
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
15
15
|
pattern?: import("tailwind-variants").ClassValue;
|
|
16
16
|
root?: import("tailwind-variants").ClassValue;
|
|
17
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
18
17
|
overlay?: import("tailwind-variants").ClassValue;
|
|
18
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
19
19
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
} | {}, Record<"pattern" | "root" | "
|
|
22
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, {
|
|
23
23
|
[key: string]: {
|
|
24
24
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
25
25
|
pattern?: import("tailwind-variants").ClassValue;
|
|
26
26
|
root?: import("tailwind-variants").ClassValue;
|
|
27
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
28
27
|
overlay?: import("tailwind-variants").ClassValue;
|
|
28
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
29
29
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
} | {}, Record<"pattern" | "root" | "
|
|
32
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
33
33
|
export declare const DownloadTrigger: import("react").ComponentType<import("@ark-ui/react").Assign<QrCode.DownloadTriggerProps & import("react").RefAttributes<HTMLButtonElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
34
34
|
[key: string]: {
|
|
35
35
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
36
36
|
pattern?: import("tailwind-variants").ClassValue;
|
|
37
37
|
root?: import("tailwind-variants").ClassValue;
|
|
38
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
39
38
|
overlay?: import("tailwind-variants").ClassValue;
|
|
39
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
40
40
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
@@ -45,29 +45,29 @@ export declare const DownloadTrigger: import("react").ComponentType<import("@ark
|
|
|
45
45
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
46
46
|
pattern?: import("tailwind-variants").ClassValue;
|
|
47
47
|
root?: import("tailwind-variants").ClassValue;
|
|
48
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
49
48
|
overlay?: import("tailwind-variants").ClassValue;
|
|
49
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
50
50
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
} | {}, Record<"pattern" | "root" | "
|
|
53
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, {
|
|
54
54
|
[key: string]: {
|
|
55
55
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
56
56
|
pattern?: import("tailwind-variants").ClassValue;
|
|
57
57
|
root?: import("tailwind-variants").ClassValue;
|
|
58
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
59
58
|
overlay?: import("tailwind-variants").ClassValue;
|
|
59
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
60
60
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
} | {}, Record<"pattern" | "root" | "
|
|
63
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
64
64
|
export declare const Frame: import("react").ComponentType<import("@ark-ui/react").Assign<QrCode.FrameProps & import("react").RefAttributes<SVGSVGElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
65
65
|
[key: string]: {
|
|
66
66
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
67
67
|
pattern?: import("tailwind-variants").ClassValue;
|
|
68
68
|
root?: import("tailwind-variants").ClassValue;
|
|
69
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
70
69
|
overlay?: import("tailwind-variants").ClassValue;
|
|
70
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
71
71
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
72
72
|
};
|
|
73
73
|
};
|
|
@@ -76,29 +76,29 @@ export declare const Frame: import("react").ComponentType<import("@ark-ui/react"
|
|
|
76
76
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
77
77
|
pattern?: import("tailwind-variants").ClassValue;
|
|
78
78
|
root?: import("tailwind-variants").ClassValue;
|
|
79
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
80
79
|
overlay?: import("tailwind-variants").ClassValue;
|
|
80
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
81
81
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
-
} | {}, Record<"pattern" | "root" | "
|
|
84
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, {
|
|
85
85
|
[key: string]: {
|
|
86
86
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
87
87
|
pattern?: import("tailwind-variants").ClassValue;
|
|
88
88
|
root?: import("tailwind-variants").ClassValue;
|
|
89
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
90
89
|
overlay?: import("tailwind-variants").ClassValue;
|
|
90
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
91
91
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
|
-
} | {}, Record<"pattern" | "root" | "
|
|
94
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
95
95
|
export declare const Overlay: import("react").ComponentType<import("@ark-ui/react").Assign<QrCode.OverlayProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
96
96
|
[key: string]: {
|
|
97
97
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
98
98
|
pattern?: import("tailwind-variants").ClassValue;
|
|
99
99
|
root?: import("tailwind-variants").ClassValue;
|
|
100
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
101
100
|
overlay?: import("tailwind-variants").ClassValue;
|
|
101
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
102
102
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
103
103
|
};
|
|
104
104
|
};
|
|
@@ -107,29 +107,29 @@ export declare const Overlay: import("react").ComponentType<import("@ark-ui/reac
|
|
|
107
107
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
108
108
|
pattern?: import("tailwind-variants").ClassValue;
|
|
109
109
|
root?: import("tailwind-variants").ClassValue;
|
|
110
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
111
110
|
overlay?: import("tailwind-variants").ClassValue;
|
|
111
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
112
112
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
|
-
} | {}, Record<"pattern" | "root" | "
|
|
115
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, {
|
|
116
116
|
[key: string]: {
|
|
117
117
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
118
118
|
pattern?: import("tailwind-variants").ClassValue;
|
|
119
119
|
root?: import("tailwind-variants").ClassValue;
|
|
120
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
121
120
|
overlay?: import("tailwind-variants").ClassValue;
|
|
121
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
122
122
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
|
-
} | {}, Record<"pattern" | "root" | "
|
|
125
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
126
126
|
export declare const Pattern: import("react").ComponentType<import("@ark-ui/react").Assign<QrCode.PatternProps & import("react").RefAttributes<SVGPathElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
127
127
|
[key: string]: {
|
|
128
128
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
129
129
|
pattern?: import("tailwind-variants").ClassValue;
|
|
130
130
|
root?: import("tailwind-variants").ClassValue;
|
|
131
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
132
131
|
overlay?: import("tailwind-variants").ClassValue;
|
|
132
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
133
133
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
134
134
|
};
|
|
135
135
|
};
|
|
@@ -138,20 +138,20 @@ export declare const Pattern: import("react").ComponentType<import("@ark-ui/reac
|
|
|
138
138
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
139
139
|
pattern?: import("tailwind-variants").ClassValue;
|
|
140
140
|
root?: import("tailwind-variants").ClassValue;
|
|
141
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
142
141
|
overlay?: import("tailwind-variants").ClassValue;
|
|
142
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
143
143
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
|
-
} | {}, Record<"pattern" | "root" | "
|
|
146
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, {
|
|
147
147
|
[key: string]: {
|
|
148
148
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
149
149
|
pattern?: import("tailwind-variants").ClassValue;
|
|
150
150
|
root?: import("tailwind-variants").ClassValue;
|
|
151
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
152
151
|
overlay?: import("tailwind-variants").ClassValue;
|
|
152
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
153
153
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
|
-
} | {}, Record<"pattern" | "root" | "
|
|
156
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
157
157
|
export declare const Context: (props: QrCode.ContextProps) => import("react").ReactNode;
|
|
@@ -3,8 +3,8 @@ export declare const qrCodeRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
3
3
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
4
4
|
pattern?: import("tailwind-variants").ClassValue;
|
|
5
5
|
root?: import("tailwind-variants").ClassValue;
|
|
6
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
7
6
|
overlay?: import("tailwind-variants").ClassValue;
|
|
7
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
8
8
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
@@ -13,19 +13,19 @@ export declare const qrCodeRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
13
13
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
14
14
|
pattern?: import("tailwind-variants").ClassValue;
|
|
15
15
|
root?: import("tailwind-variants").ClassValue;
|
|
16
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
17
16
|
overlay?: import("tailwind-variants").ClassValue;
|
|
17
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
18
18
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
} | {}, Record<"pattern" | "root" | "
|
|
21
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, {
|
|
22
22
|
[key: string]: {
|
|
23
23
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
24
24
|
pattern?: import("tailwind-variants").ClassValue;
|
|
25
25
|
root?: import("tailwind-variants").ClassValue;
|
|
26
|
-
frame?: import("tailwind-variants").ClassValue;
|
|
27
26
|
overlay?: import("tailwind-variants").ClassValue;
|
|
27
|
+
frame?: import("tailwind-variants").ClassValue;
|
|
28
28
|
downloadTrigger?: import("tailwind-variants").ClassValue;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
} | {}, Record<"pattern" | "root" | "
|
|
31
|
+
} | {}, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"pattern" | "root" | "overlay" | "frame" | "downloadTrigger", string | string[]>, undefined, unknown, unknown, undefined>>;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { SetOptional } from 'type-fest';
|
|
2
|
-
import { type CreateAiOGCashDepositInput } from '../../services/wallet';
|
|
3
|
-
import type { Deposit, Mutation } from '../../types';
|
|
4
|
-
export declare const useCreateAiOGCashDepositMutation: Mutation<Deposit, SetOptional<CreateAiOGCashDepositInput, 'id'>>;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { ObjectId } from '@opexa/object-id';
|
|
2
|
-
import { useMutation } from '@tanstack/react-query';
|
|
3
|
-
import { clamp } from 'lodash-es';
|
|
4
|
-
import invariant from 'tiny-invariant';
|
|
5
|
-
import { explainError } from '../../components/DepositWithdrawal/utils.js';
|
|
6
|
-
import { OPEXAPAY_ENDPOINT } from '../../constants/index.js';
|
|
7
|
-
import { ObjectType } from '../../services/ObjectType.js';
|
|
8
|
-
import { createAiOGCashDeposit, getDeposit, } from '../../services/wallet.js';
|
|
9
|
-
import { capitalize } from '../../utils/capitalize.js';
|
|
10
|
-
import { createPoll } from '../../utils/createPoll.js';
|
|
11
|
-
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
12
|
-
import { getCreateAiOGCashDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
13
|
-
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
14
|
-
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
15
|
-
import { getSession } from '../services/getSession.js';
|
|
16
|
-
export const useCreateAiOGCashDepositMutation = (config) => {
|
|
17
|
-
const queryClient = getQueryClient();
|
|
18
|
-
const mutation = useMutation({
|
|
19
|
-
...config,
|
|
20
|
-
mutationKey: getCreateAiOGCashDepositMutationKey(),
|
|
21
|
-
mutationFn: async (input) => {
|
|
22
|
-
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
23
|
-
const session = await getSession();
|
|
24
|
-
invariant(session.status === 'authenticated');
|
|
25
|
-
const successRedirectUrl = new URL('/transactions', input.redirectUrl);
|
|
26
|
-
successRedirectUrl.searchParams.set('tab', 'deposits');
|
|
27
|
-
successRedirectUrl.searchParams.set('id', id);
|
|
28
|
-
await createAiOGCashDeposit({
|
|
29
|
-
...input,
|
|
30
|
-
id,
|
|
31
|
-
redirectUrl: `${OPEXAPAY_ENDPOINT}/aio/success?redirectUrl=${encodeURIComponent(successRedirectUrl.toString())}`,
|
|
32
|
-
}, {
|
|
33
|
-
headers: {
|
|
34
|
-
Authorization: `Bearer ${session.token}`,
|
|
35
|
-
...(session.domain && {
|
|
36
|
-
Domain: session.domain,
|
|
37
|
-
}),
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
const poll = createPoll(async () => {
|
|
41
|
-
const session = await getSession();
|
|
42
|
-
invariant(session.status === 'authenticated');
|
|
43
|
-
return await getDeposit(id, {
|
|
44
|
-
headers: {
|
|
45
|
-
Authorization: `Bearer ${session.token}`,
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
}, {
|
|
49
|
-
until(res) {
|
|
50
|
-
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
51
|
-
},
|
|
52
|
-
interval: 1000,
|
|
53
|
-
maxAttempt: 20,
|
|
54
|
-
});
|
|
55
|
-
const res = await poll();
|
|
56
|
-
if (res?.error) {
|
|
57
|
-
const error = new Error();
|
|
58
|
-
error.name = capitalize(res.error, {
|
|
59
|
-
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
60
|
-
});
|
|
61
|
-
error.message = explainError(res.error);
|
|
62
|
-
throw error;
|
|
63
|
-
}
|
|
64
|
-
if (!res?.checkoutUrl) {
|
|
65
|
-
const error = new Error();
|
|
66
|
-
error.name = 'AiOGCashDepositError';
|
|
67
|
-
error.message = 'Failed to process GCash deposit';
|
|
68
|
-
throw error;
|
|
69
|
-
}
|
|
70
|
-
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
71
|
-
if (depositsCount <= 0) {
|
|
72
|
-
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
73
|
-
return prev?.map((quest) => {
|
|
74
|
-
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
75
|
-
if (quest.type === 'ONBOARDING') {
|
|
76
|
-
return {
|
|
77
|
-
...quest,
|
|
78
|
-
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
79
|
-
progressPercentage: progressPercentage.toFixed(2),
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
return quest;
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return res;
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
return mutation;
|
|
90
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { SetOptional } from 'type-fest';
|
|
2
|
-
import { type CreateAiOGrabPayDepositInput } from '../../services/wallet';
|
|
3
|
-
import type { Deposit, Mutation } from '../../types';
|
|
4
|
-
export declare const useCreateAiOGrabPayDepositMutation: Mutation<Deposit, SetOptional<CreateAiOGrabPayDepositInput, 'id'>>;
|