@opexa/portal-components 0.0.661 → 0.0.662
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.
|
@@ -106,9 +106,9 @@ export function MessageDetails() {
|
|
|
106
106
|
};
|
|
107
107
|
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.message.open, onOpenChange: (details) => {
|
|
108
108
|
globalStore.message.setOpen(details.open);
|
|
109
|
-
}, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto max-h-[80vh] min-w-[21.438rem] max-w-[21.438rem] overflow-y-auto rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message?.icon ?? 'INFO', className: "size-6" }) }), _jsx(Dialog.Title, { className: "mt-lg text-center font-semibold text-lg lg:mt-xl", children: message?.title }), message?.content && (_jsx(Dialog.Description, { className: "mt-xs
|
|
109
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto max-h-[80vh] min-w-[21.438rem] max-w-[21.438rem] overflow-y-auto rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message?.icon ?? 'INFO', className: "size-6" }) }), _jsx(Dialog.Title, { className: "mt-lg text-center font-semibold text-lg lg:mt-xl", children: message?.title }), message?.content && (_jsx(Dialog.Description, { className: "mt-xs text-center text-sm text-text-secondary-700 [&_li]:mb-1 [&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:text-left [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:text-left", dangerouslySetInnerHTML: {
|
|
110
110
|
__html: transformContent(message?.content),
|
|
111
|
-
} })), message?.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message?.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message?.actions.length ? (_jsx("div", { className: "mt-
|
|
111
|
+
} })), message?.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message?.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message?.actions.length ? (_jsx("div", { className: "mt-2xl flex flex-col gap-2 text-center lg:mt-2xl", children: message?.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, {
|
|
112
112
|
transactionsPageUrl,
|
|
113
113
|
questsPageUrl,
|
|
114
114
|
}), onClick: (e) => {
|
|
@@ -117,7 +117,7 @@ export function MessagesPopup() {
|
|
|
117
117
|
setIndex(details.page);
|
|
118
118
|
}, slideCount: messages.length, allowMouseDrag: true, autoplay: false, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: {
|
|
119
119
|
__html: transformContent(message.content),
|
|
120
|
-
}, className: "mt-xs pb-5 text-left text-sm text-text-secondary-700 [&_li>ol]:list-decimal [&_li>ol]:pl-5 [&_li>ul]:list-disc [&_li>ul]:pl-5 [&_li]:mb-1 [&_ol]:list-decimal [&_ol]:pl-5 [&_ul]:list-disc [&_ul]:pl-5" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-
|
|
120
|
+
}, className: "mt-xs pb-5 text-left text-sm text-text-secondary-700 [&_li>ol]:list-decimal [&_li>ol]:pl-5 [&_li>ul]:list-disc [&_li>ul]:pl-5 [&_li]:mb-1 [&_ol]:list-decimal [&_ol]:pl-5 [&_ul]:list-disc [&_ul]:pl-5" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-2xl flex flex-col gap-2 text-center lg:mt-2xl", children: message.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, {
|
|
121
121
|
questsPageUrl,
|
|
122
122
|
transactionsPageUrl,
|
|
123
123
|
}), onClick: () => {
|
|
@@ -30,7 +30,7 @@ export declare const INSTAPAY_BANK_LIST = "\n query InstapayBankList {\n ins
|
|
|
30
30
|
export declare const REMAINING_DAILY_WITHDRAWALS_COUNT = "\n query RemainingDailyWithdrawalsCount {\n remainingDailyWithdrawalsCount\n }\n";
|
|
31
31
|
export declare const DEPOSIT_RECORDS = "\n query DepositRecords(\n $after: Cursor\n $first: Int\n $filter: DepositRecordFilterInput\n ) {\n member {\n depositRecords(after: $after, first: $first, filter: $filter) {\n edges {\n cursor\n node {\n ... on DepositRecord {\n id\n type\n amount\n netAmount\n fee\n status\n deposit\n reference\n depositNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n";
|
|
32
32
|
export declare const CREATE_GCASH_DEPOSIT = "\n mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {\n createGCashDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
33
|
-
export declare const
|
|
33
|
+
export declare const CREATE_GCASH_WEBPAY_DEPOSIT = "\n mutation CreateGCashWebpayDeposit(\n $input: CreateGCashWebpayDepositInput!\n ) {\n createGCashWebpayDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n }\n }\n";
|
|
34
34
|
export declare const CREATE_LIBANGAN_DEPOSIT = "\n mutation CreateLibanganPayInDeposit(\n $input: CreateLibanganPayInDepositInput!\n ) {\n createLibanganPayInDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on ExpiredSessionError {\n name: __typename\n message\n }\n }\n }\n";
|
|
35
35
|
export declare const CREATE_PISO_PAY_DEPOSIT = "\n mutation CreatePisoPayDeposit($input: CreatePisoPayCheckoutDepositInput!) {\n createPisoPayCheckoutDeposit(input: $input) {\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n }\n }\n";
|
|
36
36
|
export declare const CREATE_MAYA_DEPOSIT = "\n mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {\n createMayaDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n }\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -878,11 +878,11 @@ export const CREATE_GCASH_DEPOSIT = /* GraphQL */ `
|
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
`;
|
|
881
|
-
export const
|
|
882
|
-
mutation
|
|
883
|
-
$input:
|
|
881
|
+
export const CREATE_GCASH_WEBPAY_DEPOSIT = /* GraphQL */ `
|
|
882
|
+
mutation CreateGCashWebpayDeposit(
|
|
883
|
+
$input: CreateGCashWebpayDepositInput!
|
|
884
884
|
) {
|
|
885
|
-
|
|
885
|
+
createGCashWebpayDeposit(input: $input) {
|
|
886
886
|
... on DepositPromoMaximumAmountExceededError {
|
|
887
887
|
name: __typename
|
|
888
888
|
message
|
|
@@ -176,18 +176,18 @@ export interface CreatePisoPayDepositMutationVariables {
|
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
export declare const createPisoPayDeposit: (input: CreatePisoPayDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
179
|
-
export interface
|
|
180
|
-
|
|
179
|
+
export interface CreateGCashWebpayDepositMutation {
|
|
180
|
+
createGCashWebpayDeposit?: null | CreateDepositError;
|
|
181
181
|
}
|
|
182
|
-
export interface
|
|
182
|
+
export interface CreateGCashWebpayDepositMutationVariables {
|
|
183
183
|
input: {
|
|
184
184
|
id: string;
|
|
185
185
|
amount: string;
|
|
186
186
|
promo?: string;
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
export type
|
|
190
|
-
export declare const
|
|
189
|
+
export type CreateGCashWebpayDepositInput = Simplify<CreateGCashWebpayDepositMutationVariables['input']>;
|
|
190
|
+
export declare const createGCashWebpayDeposit: (input: CreateGCashWebpayDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
191
191
|
export interface CreateMayaDepositMutation {
|
|
192
192
|
createMayaDeposit?: null | CreateDepositError;
|
|
193
193
|
}
|
package/dist/services/wallet.js
CHANGED
|
@@ -2,7 +2,7 @@ import { cache } from 'react';
|
|
|
2
2
|
import { WALLET_GRAPHQL_ENDPOINT } from '../constants/index.js';
|
|
3
3
|
import { parseDecimal } from '../utils/parseDecimal.js';
|
|
4
4
|
import { graphqlRequest } from './graphqlRequest.js';
|
|
5
|
-
import { AVAILABLE_PROMOS, BONUS, BONUS_BALANCES, BONUS_IDS, BONUSES, CASHBACK, CASHBACK_BONUS, CASHBACK_BONUS_IDS, CASHBACK_BONUSES, CASHBACKS, CLAIM_CASHBACK_BONUS, CLAIM_SPOT_BONUS, CREATE_AIO_INSTAPAY_WITHDRAWAL, CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT, CREATE_AIO_ONLINE_BANK_DEPOSIT, CREATE_AIO_QRPH_DEPOSIT, CREATE_BANK_WITHDRAWAL, CREATE_GAME_SESSION, CREATE_GCASH_DEPOSIT,
|
|
5
|
+
import { AVAILABLE_PROMOS, BONUS, BONUS_BALANCES, BONUS_IDS, BONUSES, CASHBACK, CASHBACK_BONUS, CASHBACK_BONUS_IDS, CASHBACK_BONUSES, CASHBACKS, CLAIM_CASHBACK_BONUS, CLAIM_SPOT_BONUS, CREATE_AIO_INSTAPAY_WITHDRAWAL, CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT, CREATE_AIO_ONLINE_BANK_DEPOSIT, CREATE_AIO_QRPH_DEPOSIT, CREATE_BANK_WITHDRAWAL, CREATE_GAME_SESSION, CREATE_GCASH_DEPOSIT, CREATE_GCASH_WEBPAY_DEPOSIT, CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL, CREATE_GCASH_WITHDRAWAL, CREATE_LIBANGAN_DEPOSIT, CREATE_MANUAL_BANK_DEPOSIT, CREATE_MANUAL_BANK_WITHDRAWAL, CREATE_MANUAL_UPI_DEPOSIT, CREATE_MANUAL_UPI_WITHDRAWAL, CREATE_MAYA_APP_DEPOSIT, CREATE_MAYA_APP_WITHDRAWAL, CREATE_MAYA_DEPOSIT, CREATE_MAYA_WITHDRAWAL, CREATE_PISO_PAY_DEPOSIT, CREATE_PISO_PAY_WITHDRAWAL, CREATE_VENTAJA_WITHDRAWAL, DEPOSIT, END_GAME_SESSION, FAVORITE_GAMES, GAME_SESSION, INSTAPAY_BANK_LIST, MARK_GAME_AS_FAVORITE, MAYA_SESSION, POINTS_WALLET, PROMO, PROMOS, REDEEM_POINTS_TO_CASH, REMAINING_DAILY_WITHDRAWALS_COUNT, TOUCH_GCASH_DEPOSIT, TOUCH_QRPH_DEPOSIT, UNMARK_GAME_AS_FAVORITE, VALIDATE_MAYA_SESSION, WALLET, } from './queries.js';
|
|
6
6
|
import { sha256 } from './sha256.js';
|
|
7
7
|
export const getPromos = cache(async (options) => {
|
|
8
8
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, PROMOS, undefined, {
|
|
@@ -134,14 +134,14 @@ export const createPisoPayDeposit = async (input, options) => {
|
|
|
134
134
|
throw error;
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
-
export const
|
|
138
|
-
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT,
|
|
139
|
-
if (res.
|
|
137
|
+
export const createGCashWebpayDeposit = async (input, options) => {
|
|
138
|
+
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CREATE_GCASH_WEBPAY_DEPOSIT, { input }, options);
|
|
139
|
+
if (res.createGCashWebpayDeposit) {
|
|
140
140
|
const error = new Error();
|
|
141
|
-
error.name = res.
|
|
141
|
+
error.name = res.createGCashWebpayDeposit.name;
|
|
142
142
|
error.message =
|
|
143
|
-
ERROR_CODES_MESSAGE_MAP[res.
|
|
144
|
-
Error.captureStackTrace?.(error,
|
|
143
|
+
ERROR_CODES_MESSAGE_MAP[res.createGCashWebpayDeposit.name];
|
|
144
|
+
Error.captureStackTrace?.(error, createGCashWebpayDeposit);
|
|
145
145
|
throw error;
|
|
146
146
|
}
|
|
147
147
|
};
|