@opexa/portal-components 0.0.16 → 0.0.18
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/index.d.ts +3 -0
- package/dist/client/hooks/useGlobalStore.d.ts +11 -1
- package/dist/client/hooks/useGlobalStore.js +1 -1
- package/dist/client/hooks/useGlobalStore.mjs +81 -35
- package/dist/client/hooks/useMarkMessageAsReadMutation.d.ts +6 -0
- package/dist/client/hooks/useMarkMessageAsReadMutation.js +1 -0
- package/dist/client/hooks/useMarkMessageAsReadMutation.mjs +39 -0
- package/dist/client/hooks/useMessagesQuery.d.ts +3 -0
- package/dist/client/hooks/useMessagesQuery.js +1 -0
- package/dist/client/hooks/useMessagesQuery.mjs +47 -0
- package/dist/client/hooks/useUnreadMessagesCountQuery.d.ts +3 -0
- package/dist/client/hooks/useUnreadMessagesCountQuery.js +1 -0
- package/dist/client/hooks/useUnreadMessagesCountQuery.mjs +38 -0
- package/dist/client-hooks.js +1 -1
- package/dist/client-hooks.mjs +38 -32
- package/dist/components/Account/Account.d.ts +3 -1
- package/dist/components/Account/Account.js +1 -1
- package/dist/components/Account/Account.mjs +163 -96
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Banner/Banner.mjs +6 -6
- package/dist/components/BetRecords/BetRecords.js +1 -1
- package/dist/components/BetRecords/BetRecords.mjs +357 -325
- package/dist/components/Bonus/Bonus.client.d.ts +2 -0
- package/dist/components/Bonus/Bonus.d.ts +10 -0
- package/dist/components/Bonus/index.d.ts +1 -0
- package/dist/components/Bonuses/Bonuses.d.ts +15 -0
- package/dist/components/Bonuses/Bonuses.js +1 -0
- package/dist/components/Bonuses/Bonuses.mjs +125 -0
- package/dist/components/Bonuses/index.d.ts +1 -0
- package/dist/components/DepositWithdrawal/AmountChoices.js +1 -1
- package/dist/components/DepositWithdrawal/AmountChoices.mjs +9 -6
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.mjs +11 -8
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.mjs +5 -2
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.mjs +5 -2
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.mjs +16 -13
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.mjs +5 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.mjs +9 -6
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.mjs +18 -15
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.mjs +9 -6
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.mjs +9 -6
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.mjs +46 -46
- package/dist/components/DepositWithdrawal/PaymentMethods.js +1 -1
- package/dist/components/DepositWithdrawal/PaymentMethods.mjs +26 -23
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.mjs +86 -76
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.mjs +118 -108
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.mjs +75 -65
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.mjs +96 -86
- package/dist/components/Disclaimer/Disclaimer.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.mjs +11 -8
- package/dist/components/Empty/Empty.js +1 -1
- package/dist/components/Empty/Empty.mjs +14 -10
- package/dist/components/GameLaunch/GameLaunch.js +1 -1
- package/dist/components/GameLaunch/GameLaunch.mjs +42 -39
- package/dist/components/Games/Games.client.js +1 -1
- package/dist/components/Games/Games.client.mjs +47 -44
- package/dist/components/Games/Games.d.ts +7 -2
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +4 -2
- package/dist/components/JackpotCounter/JackpotCounter.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounter.mjs +38 -34
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +3 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.mjs +282 -124
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css.mjs +11 -8
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +1 -0
- package/dist/components/Jackpots/JackpotItem.d.ts +7 -0
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +7 -0
- package/dist/components/Jackpots/Jackpots.d.ts +8 -0
- package/dist/components/Jackpots/index.d.ts +1 -0
- package/dist/components/Marquee/Marquee.js +1 -1
- package/dist/components/Marquee/Marquee.mjs +12 -14
- package/dist/components/Messages/MessageItem.d.ts +4 -0
- package/dist/components/Messages/MessageItem.js +1 -0
- package/dist/components/Messages/MessageItem.mjs +66 -0
- package/dist/components/Messages/MessagePopup.d.ts +1 -0
- package/dist/components/Messages/MessagePopup.js +1 -0
- package/dist/components/Messages/MessagePopup.mjs +89 -0
- package/dist/components/Messages/Messages.d.ts +1 -0
- package/dist/components/Messages/Messages.js +1 -0
- package/dist/components/Messages/Messages.mjs +147 -0
- package/dist/components/Messages/index.d.ts +1 -0
- package/dist/components/Messages/utils.d.ts +3 -0
- package/dist/components/Messages/utils.js +1 -0
- package/dist/components/Messages/utils.mjs +16 -0
- package/dist/components/Promos/PromoCarousel.js +1 -1
- package/dist/components/Promos/PromoCarousel.mjs +27 -24
- package/dist/components/Promos/PromoGrid.js +1 -1
- package/dist/components/Promos/PromoGrid.mjs +7 -7
- package/dist/components/Promos/PromoItem.js +1 -1
- package/dist/components/Promos/PromoItem.mjs +10 -7
- package/dist/components/Promos/Promos.d.ts +4 -2
- package/dist/components/SignIn/SignIn.d.ts +0 -1
- package/dist/components/SignIn/SignIn.js +1 -1
- package/dist/components/SignIn/SignIn.mjs +32 -41
- package/dist/components/SignIn/SignInForm.js +1 -1
- package/dist/components/SignIn/SignInForm.mjs +167 -160
- package/dist/components/SignUp/SignUp.d.ts +0 -1
- package/dist/components/SignUp/SignUp.js +1 -1
- package/dist/components/SignUp/SignUp.mjs +32 -41
- package/dist/components/SignUp/SignUpForm.js +1 -1
- package/dist/components/SignUp/SignUpForm.mjs +123 -116
- package/dist/components/TopWins/TopWins.client.js +1 -1
- package/dist/components/TopWins/TopWins.client.mjs +14 -14
- package/dist/components/TopWins/TopWins.d.ts +2 -1
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +4 -2
- package/dist/components/TournamentCounter/TournamentCounter.js +1 -1
- package/dist/components/TournamentCounter/TournamentCounter.mjs +27 -24
- package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.mjs +113 -99
- package/dist/components/TransactionRecords/TableFilters.d.ts +3 -1
- package/dist/components/TransactionRecords/TableFilters.js +1 -1
- package/dist/components/TransactionRecords/TableFilters.mjs +193 -132
- package/dist/components/TransactionRecords/TransactionRecords.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecords.mjs +21 -17
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.mjs +89 -77
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.mjs +105 -96
- package/dist/components/index.d.ts +2 -0
- package/dist/components.js +1 -1
- package/dist/components.mjs +36 -32
- package/dist/icons/ArrowNarrowDownIcon.d.ts +2 -0
- package/dist/icons/ArrowNarrowUpIcon.d.ts +2 -0
- package/dist/icons/Bell01Icon.d.ts +2 -0
- package/dist/icons/Bell01Icon.js +1 -0
- package/dist/icons/Bell01Icon.mjs +27 -0
- package/dist/icons/BellRingIcon.d.ts +2 -0
- package/dist/icons/BellRingIcon.js +1 -0
- package/dist/icons/BellRingIcon.mjs +27 -0
- package/dist/icons/EyeIcon.d.ts +2 -0
- package/dist/icons/EyeIcon.js +1 -0
- package/dist/icons/EyeIcon.mjs +25 -0
- package/dist/icons/EyeOffIcon.d.ts +2 -0
- package/dist/icons/EyeOffIcon.js +1 -0
- package/dist/icons/EyeOffIcon.mjs +22 -0
- package/dist/icons/StarIcon.d.ts +2 -0
- package/dist/icons/StarIcon.js +1 -0
- package/dist/icons/StarIcon.mjs +19 -0
- package/dist/icons/StopWatchIcon.d.ts +2 -0
- package/dist/icons/StopWatchIcon.js +1 -0
- package/dist/icons/StopWatchIcon.mjs +22 -0
- package/dist/icons/Trophy01Icon.d.ts +2 -0
- package/dist/icons/Trophy01Icon.js +1 -0
- package/dist/icons/Trophy01Icon.mjs +22 -0
- package/dist/icons/index.d.ts +6 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +1 -0
- package/dist/icons.mjs +62 -0
- package/dist/images/first-place.png.js +1 -0
- package/dist/images/first-place.png.mjs +4 -0
- package/dist/images/leaderboard.png.js +1 -0
- package/dist/images/leaderboard.png.mjs +4 -0
- package/dist/images/placeholder-avatar.png.js +1 -0
- package/dist/images/placeholder-avatar.png.mjs +4 -0
- package/dist/images/responsible-gaming.png.js +1 -1
- package/dist/images/responsible-gaming.png.mjs +2 -2
- package/dist/portal-components.css +1 -1
- package/dist/server/utils/prefetchUnreadMessagesCountQuery.d.ts +2 -0
- package/dist/theme.css +130 -4
- package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
- package/dist/ui/AlertDialog/alertDialog.recipe.mjs +6 -6
- package/dist/ui/Badge/Badge.d.ts +274 -27
- package/dist/ui/Badge/Badge.js +1 -1
- package/dist/ui/Badge/Badge.mjs +14 -10
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.anatomy.js +1 -1
- package/dist/ui/Badge/badge.anatomy.mjs +1 -0
- package/dist/ui/Badge/badge.recipe.d.ts +57 -9
- package/dist/ui/Badge/badge.recipe.js +1 -1
- package/dist/ui/Badge/badge.recipe.mjs +57 -21
- package/dist/ui/Button/button.recipe.d.ts +2 -2
- package/dist/ui/Button/button.recipe.js +1 -1
- package/dist/ui/Button/button.recipe.mjs +17 -7
- package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
- package/dist/ui/Checkbox/checkbox.recipe.mjs +6 -6
- package/dist/ui/Collapsible/Collapsible.d.ts +114 -0
- package/dist/ui/Collapsible/Collapsible.js +1 -0
- package/dist/ui/Collapsible/Collapsible.mjs +13 -0
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +28 -0
- package/dist/ui/Collapsible/collapsible.recipe.js +1 -0
- package/dist/ui/Collapsible/collapsible.recipe.mjs +18 -0
- package/dist/ui/Collapsible/index.d.ts +1 -0
- package/dist/ui/DatePicker/datePicker.recipe.js +1 -1
- package/dist/ui/DatePicker/datePicker.recipe.mjs +37 -6
- package/dist/ui/Dialog/dialog.recipe.js +1 -1
- package/dist/ui/Dialog/dialog.recipe.mjs +3 -3
- package/dist/ui/Drawer/drawer.recipe.js +1 -1
- package/dist/ui/Drawer/drawer.recipe.mjs +6 -6
- package/dist/ui/Field/field.recipe.js +1 -1
- package/dist/ui/Field/field.recipe.mjs +10 -12
- package/dist/ui/IconButton/iconButton.recipe.d.ts +2 -2
- package/dist/ui/IconButton/iconButton.recipe.js +1 -1
- package/dist/ui/IconButton/iconButton.recipe.mjs +6 -6
- package/dist/ui/NumberInput/numberInput.recipe.js +1 -1
- package/dist/ui/NumberInput/numberInput.recipe.mjs +8 -8
- package/dist/ui/PasswordInput/PasswordInput.d.ts +242 -1
- package/dist/ui/PasswordInput/PasswordInput.js +1 -0
- package/dist/ui/PasswordInput/PasswordInput.mjs +18 -0
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +6 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.js +1 -0
- package/dist/ui/PasswordInput/passwordInput.recipe.mjs +48 -0
- package/dist/ui/PinInput/pinInput.recipe.js +1 -1
- package/dist/ui/PinInput/pinInput.recipe.mjs +3 -3
- package/dist/ui/Popover/popover.recipe.js +1 -1
- package/dist/ui/Popover/popover.recipe.mjs +1 -1
- package/dist/ui/Progress/Progress.d.ts +335 -1
- package/dist/ui/Progress/Progress.js +1 -1
- package/dist/ui/Progress/Progress.mjs +15 -2
- package/dist/ui/Progress/progress.recipe.d.ts +37 -1
- package/dist/ui/Progress/progress.recipe.js +1 -0
- package/dist/ui/Progress/progress.recipe.mjs +41 -0
- package/dist/ui/Prose.d.ts +2 -0
- package/dist/ui/Prose.js +1 -0
- package/dist/ui/Prose.mjs +47 -0
- package/dist/ui/SegmentGroup/segmentGroup.recipe.js +1 -1
- package/dist/ui/SegmentGroup/segmentGroup.recipe.mjs +3 -3
- package/dist/ui/Select/select.recipe.js +1 -1
- package/dist/ui/Select/select.recipe.mjs +6 -6
- package/dist/ui/Table/table.recipe.js +1 -1
- package/dist/ui/Table/table.recipe.mjs +4 -4
- package/dist/ui/Tabs/tabs.recipe.js +1 -1
- package/dist/ui/Tabs/tabs.recipe.mjs +3 -3
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui.js +1 -1
- package/dist/ui.mjs +36 -30
- package/dist/utils/queryKeys.d.ts +4 -1
- package/dist/utils/queryKeys.js +1 -1
- package/dist/utils/queryKeys.mjs +34 -26
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +35 -32
- package/package.json +11 -5
- package/dist/components/Promos/PromosContent.d.ts +0 -2
package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { zodResolver as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useForm as
|
|
1
|
+
import { jsx as o, jsxs as e, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver as I } from "@hookform/resolvers/zod";
|
|
3
|
+
import { useEffect as C } from "react";
|
|
4
|
+
import { useForm as v, Controller as M } from "react-hook-form";
|
|
5
5
|
import { z as a } from "zod";
|
|
6
6
|
import { useShallow as P } from "zustand/shallow";
|
|
7
7
|
import "@opexa/portal-sdk-core";
|
|
@@ -15,64 +15,69 @@ import "../../../../utils/getQueryClient.mjs";
|
|
|
15
15
|
import "../../../../utils/isMobile.mjs";
|
|
16
16
|
import "lodash-es";
|
|
17
17
|
import "@opexa/portal-sdk-core/object-id";
|
|
18
|
-
import { useCreateMayaAppWithdrawalMutation as
|
|
19
|
-
import { useGlobalStore as
|
|
18
|
+
import { useCreateMayaAppWithdrawalMutation as V } from "../../../../client/hooks/useCreateMayaAppWithdrawalMutation.mjs";
|
|
19
|
+
import { useGlobalStore as W } from "../../../../client/hooks/useGlobalStore.mjs";
|
|
20
20
|
import "../../../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
21
21
|
import { useIsMayaSessionValidQuery as A } from "../../../../client/hooks/useIsMayaSessionValidQuery.mjs";
|
|
22
22
|
import "usehooks-ts";
|
|
23
|
-
import { usePaymentSettingsQuery as
|
|
23
|
+
import { usePaymentSettingsQuery as E } from "../../../../client/hooks/usePaymentSettingsQuery.mjs";
|
|
24
24
|
import { toaster as f } from "../../../../client/utils/toaster.mjs";
|
|
25
|
-
import { ChevronDownIcon as
|
|
26
|
-
import { ChevronUpIcon as
|
|
27
|
-
import {
|
|
25
|
+
import { ChevronDownIcon as R } from "../../../../icons/ChevronDownIcon.mjs";
|
|
26
|
+
import { ChevronUpIcon as $ } from "../../../../icons/ChevronUpIcon.mjs";
|
|
27
|
+
import { EyeIcon as D } from "../../../../icons/EyeIcon.mjs";
|
|
28
|
+
import { EyeOffIcon as Q } from "../../../../icons/EyeOffIcon.mjs";
|
|
29
|
+
import { SpinnerIcon as T } from "../../../../icons/SpinnerIcon.mjs";
|
|
28
30
|
import "../../../../ui/AlertDialog/AlertDialog.mjs";
|
|
29
31
|
import "../../../../ui/Avatar/Avatar.mjs";
|
|
30
32
|
import "../../../../ui/Badge/Badge.mjs";
|
|
31
33
|
import { Button as L } from "../../../../ui/Button/Button.mjs";
|
|
32
34
|
import "../../../../ui/Checkbox/Checkbox.mjs";
|
|
33
35
|
import "../../../../ui/Clipboard/Clipboard.mjs";
|
|
36
|
+
import "../../../../ui/Collapsible/Collapsible.mjs";
|
|
34
37
|
import "../../../../ui/DatePicker/DatePicker.mjs";
|
|
35
38
|
import "../../../../ui/Dialog/Dialog.mjs";
|
|
36
39
|
import "../../../../ui/Drawer/Drawer.mjs";
|
|
37
|
-
import { Root as h, ErrorText as g
|
|
40
|
+
import { Root as h, ErrorText as g } from "../../../../ui/Field/Field.mjs";
|
|
38
41
|
import "@ark-ui/react";
|
|
39
42
|
import "../../../../ui/IconButton/iconButton.recipe.mjs";
|
|
40
|
-
import { Root as
|
|
43
|
+
import { Root as N, Label as F, Control as j, Input as O, IncrementTrigger as U, DecrementTrigger as k } from "../../../../ui/NumberInput/NumberInput.mjs";
|
|
44
|
+
import { Root as z, Label as G, Control as Z, Input as _, VisibilityTrigger as q, Indicator as B } from "../../../../ui/PasswordInput/PasswordInput.mjs";
|
|
41
45
|
import "../../../../ui/PinInput/PinInput.mjs";
|
|
42
46
|
import "../../../../ui/Popover/Popover.mjs";
|
|
43
47
|
import "tailwind-merge";
|
|
48
|
+
import "../../../../ui/Progress/Progress.mjs";
|
|
44
49
|
import "../../../../ui/SegmentGroup/SegmentGroup.mjs";
|
|
45
50
|
import "../../../../ui/Select/Select.mjs";
|
|
46
51
|
import "../../../../ui/Table/Table.mjs";
|
|
47
52
|
import "../../../../ui/Tabs/Tabs.mjs";
|
|
48
|
-
import { AmountChoices as
|
|
49
|
-
import { MayaSessionExpired as
|
|
50
|
-
function
|
|
53
|
+
import { AmountChoices as H } from "../../AmountChoices.mjs";
|
|
54
|
+
import { MayaSessionExpired as J } from "../../MayaSessionExpired.mjs";
|
|
55
|
+
function or() {
|
|
51
56
|
var c;
|
|
52
|
-
const y =
|
|
53
|
-
P((
|
|
54
|
-
depositWithdrawal:
|
|
57
|
+
const y = W(
|
|
58
|
+
P((r) => ({
|
|
59
|
+
depositWithdrawal: r.depositWithdrawal
|
|
55
60
|
}))
|
|
56
|
-
), p =
|
|
61
|
+
), p = V({
|
|
57
62
|
onSuccess() {
|
|
58
|
-
|
|
63
|
+
t.reset(), y.depositWithdrawal.setOpen(!1), f.success({
|
|
59
64
|
description: "Withdrawal request submitted successfully."
|
|
60
65
|
});
|
|
61
66
|
},
|
|
62
|
-
onError(
|
|
67
|
+
onError(r) {
|
|
63
68
|
f.error({
|
|
64
|
-
description:
|
|
69
|
+
description: r.message
|
|
65
70
|
});
|
|
66
71
|
}
|
|
67
|
-
}),
|
|
68
|
-
amount: a.string().superRefine((
|
|
69
|
-
const u = l(
|
|
70
|
-
u <
|
|
72
|
+
}), b = A().data ?? !0, d = E().data, m = d == null ? void 0 : d.mayaAppWithdrawalGatewaySettings, n = l(m == null ? void 0 : m.maximumAmount, 0), i = l(m == null ? void 0 : m.minimumAmount, 0), w = a.object({
|
|
73
|
+
amount: a.string().superRefine((r, s) => {
|
|
74
|
+
const u = l(r, 0);
|
|
75
|
+
u < i && s.addIssue({
|
|
71
76
|
type: "number",
|
|
72
77
|
code: a.ZodIssueCode.too_small,
|
|
73
78
|
inclusive: !0,
|
|
74
|
-
minimum:
|
|
75
|
-
message: `Minimum amount is ${
|
|
79
|
+
minimum: i,
|
|
80
|
+
message: `Minimum amount is ${i.toLocaleString()}`
|
|
76
81
|
}), u > n && s.addIssue({
|
|
77
82
|
type: "number",
|
|
78
83
|
code: a.ZodIssueCode.too_big,
|
|
@@ -82,43 +87,43 @@ function Oo() {
|
|
|
82
87
|
});
|
|
83
88
|
}),
|
|
84
89
|
password: a.string().min(8, "Password must be 8 or more characters").max(64, "Password must be not be more than 64 characters")
|
|
85
|
-
}),
|
|
90
|
+
}), t = v({
|
|
86
91
|
mode: "all",
|
|
87
|
-
resolver:
|
|
92
|
+
resolver: I(w),
|
|
88
93
|
defaultValues: {
|
|
89
94
|
amount: "0",
|
|
90
95
|
password: ""
|
|
91
96
|
}
|
|
92
97
|
});
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
amount:
|
|
98
|
+
C(() => {
|
|
99
|
+
i && t.reset({
|
|
100
|
+
amount: i.toString(),
|
|
96
101
|
password: ""
|
|
97
102
|
});
|
|
98
|
-
}, [
|
|
99
|
-
const S =
|
|
103
|
+
}, [t, i]);
|
|
104
|
+
const S = t.handleSubmit(async (r) => {
|
|
100
105
|
p.mutate({
|
|
101
|
-
amount:
|
|
102
|
-
transactionPassword:
|
|
106
|
+
amount: r.amount,
|
|
107
|
+
transactionPassword: r.password
|
|
103
108
|
});
|
|
104
109
|
});
|
|
105
|
-
return
|
|
110
|
+
return b ? /* @__PURE__ */ e("form", { onSubmit: S, noValidate: !0, children: [
|
|
106
111
|
/* @__PURE__ */ o(
|
|
107
|
-
|
|
112
|
+
M,
|
|
108
113
|
{
|
|
109
|
-
control:
|
|
114
|
+
control: t.control,
|
|
110
115
|
name: "amount",
|
|
111
|
-
render: (
|
|
116
|
+
render: (r) => {
|
|
112
117
|
var s;
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
118
|
+
return /* @__PURE__ */ e(h, { invalid: !!t.formState.errors.amount, children: [
|
|
119
|
+
/* @__PURE__ */ e(
|
|
120
|
+
N,
|
|
116
121
|
{
|
|
117
122
|
min: 0,
|
|
118
123
|
step: 1,
|
|
119
|
-
value:
|
|
124
|
+
value: r.field.value,
|
|
120
125
|
onValueChange: (u) => {
|
|
121
|
-
|
|
126
|
+
r.field.onChange(u.value);
|
|
122
127
|
},
|
|
123
128
|
formatOptions: {
|
|
124
129
|
maximumFractionDigits: 2,
|
|
@@ -127,41 +132,46 @@ function Oo() {
|
|
|
127
132
|
allowMouseWheel: !0,
|
|
128
133
|
children: [
|
|
129
134
|
/* @__PURE__ */ o(F, { children: "Enter amount you want to deposit" }),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */ o(
|
|
132
|
-
/* @__PURE__ */ o(
|
|
133
|
-
/* @__PURE__ */ o(
|
|
135
|
+
/* @__PURE__ */ e(j, { children: [
|
|
136
|
+
/* @__PURE__ */ o(O, {}),
|
|
137
|
+
/* @__PURE__ */ o(U, { children: /* @__PURE__ */ o($, {}) }),
|
|
138
|
+
/* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(R, {}) })
|
|
134
139
|
] })
|
|
135
140
|
]
|
|
136
141
|
}
|
|
137
142
|
),
|
|
138
|
-
/* @__PURE__ */ o(g, { children: (s =
|
|
143
|
+
/* @__PURE__ */ o(g, { children: (s = t.formState.errors.amount) == null ? void 0 : s.message })
|
|
139
144
|
] });
|
|
140
145
|
}
|
|
141
146
|
}
|
|
142
147
|
),
|
|
143
148
|
/* @__PURE__ */ o(
|
|
144
|
-
|
|
149
|
+
H,
|
|
145
150
|
{
|
|
146
|
-
value: l(
|
|
147
|
-
onChange: (
|
|
148
|
-
|
|
151
|
+
value: l(t.watch("amount"), 0),
|
|
152
|
+
onChange: (r) => {
|
|
153
|
+
t.setValue("amount", r.toString(), {
|
|
149
154
|
shouldTouch: !0,
|
|
150
155
|
shouldDirty: !0,
|
|
151
156
|
shouldValidate: !0
|
|
152
157
|
});
|
|
153
158
|
},
|
|
154
|
-
min:
|
|
159
|
+
min: i,
|
|
155
160
|
max: n,
|
|
156
161
|
className: "mt-xl"
|
|
157
162
|
}
|
|
158
163
|
),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
/* @__PURE__ */ e(h, { className: "mt-3xl", invalid: !!t.formState.errors.password, children: [
|
|
165
|
+
/* @__PURE__ */ e(z, { children: [
|
|
166
|
+
/* @__PURE__ */ o(G, { children: "Password" }),
|
|
167
|
+
/* @__PURE__ */ e(Z, { children: [
|
|
168
|
+
/* @__PURE__ */ o(_, { ...t.register("password") }),
|
|
169
|
+
/* @__PURE__ */ o(q, { children: /* @__PURE__ */ o(B, { fallback: /* @__PURE__ */ o(Q, {}), asChild: !0, children: /* @__PURE__ */ o(D, {}) }) })
|
|
170
|
+
] })
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ o(g, { children: (c = t.formState.errors.password) == null ? void 0 : c.message })
|
|
163
173
|
] }),
|
|
164
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ e("p", { className: "mt-4xl text-xs", children: [
|
|
165
175
|
"Upon clicking the deposit button, you agree to the",
|
|
166
176
|
" ",
|
|
167
177
|
/* @__PURE__ */ o("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }),
|
|
@@ -173,14 +183,14 @@ function Oo() {
|
|
|
173
183
|
type: "submit",
|
|
174
184
|
className: "mt-4.5",
|
|
175
185
|
disabled: p.isPending,
|
|
176
|
-
children: p.isPending ? /* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */ o(
|
|
186
|
+
children: p.isPending ? /* @__PURE__ */ e(x, { children: [
|
|
187
|
+
/* @__PURE__ */ o(T, {}),
|
|
178
188
|
"Processing..."
|
|
179
189
|
] }) : "Withdraw"
|
|
180
190
|
}
|
|
181
191
|
)
|
|
182
|
-
] }) : /* @__PURE__ */ o(
|
|
192
|
+
] }) : /* @__PURE__ */ o(J, {});
|
|
183
193
|
}
|
|
184
194
|
export {
|
|
185
|
-
|
|
195
|
+
or as MayaAppWithdrawal
|
|
186
196
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("@hookform/resolvers/zod"),S=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("@hookform/resolvers/zod"),S=require("react"),f=require("react-hook-form"),n=require("zod"),v=require("zustand/shallow");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../../../constants/index.js");require("../../../../utils/capitalize.js");const d=require("../../../../utils/parseDecimal.js");require("../../../../utils/getLocaleInfo.js");require("../../../../utils/getQueryClient.js");require("../../../../utils/isMobile.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const C=require("../../../../client/hooks/useCreateMayaWithdrawalMutation.js"),P=require("../../../../client/hooks/useGlobalStore.js");require("../../../../client/hooks/useInfiniteQueryHelper.js");const M=require("../../../../client/hooks/useLocaleInfo.js"),D=require("../../../../client/hooks/useMobileNumberParser.js");require("usehooks-ts");const W=require("../../../../client/hooks/usePaymentSettingsQuery.js"),j=require("../../../../client/utils/toaster.js"),z=require("../../../../icons/ChevronDownIcon.js"),E=require("../../../../icons/ChevronUpIcon.js"),R=require("../../../../icons/EyeIcon.js"),T=require("../../../../icons/EyeOffIcon.js"),L=require("../../../../icons/SpinnerIcon.js");require("../../../../ui/AlertDialog/AlertDialog.js");require("../../../../ui/Avatar/Avatar.js");require("../../../../ui/Badge/Badge.js");const A=require("../../../../ui/Button/Button.js");require("../../../../ui/Checkbox/Checkbox.js");require("../../../../ui/Clipboard/Clipboard.js");require("../../../../ui/Collapsible/Collapsible.js");require("../../../../ui/DatePicker/DatePicker.js");require("../../../../ui/Dialog/Dialog.js");require("../../../../ui/Drawer/Drawer.js");const o=require("../../../../ui/Field/Field.js");require("@ark-ui/react");require("../../../../ui/IconButton/iconButton.recipe.js");const a=require("../../../../ui/NumberInput/NumberInput.js"),u=require("../../../../ui/PasswordInput/PasswordInput.js");require("../../../../ui/PinInput/PinInput.js");require("../../../../ui/Popover/Popover.js");require("tailwind-merge");require("../../../../ui/Progress/Progress.js");require("../../../../ui/SegmentGroup/SegmentGroup.js");require("../../../../ui/Select/Select.js");require("../../../../ui/Table/Table.js");require("../../../../ui/Tabs/Tabs.js");const F=require("../../AmountChoices.js");function V(){var x,p;const g=P.useGlobalStore(v.useShallow(s=>({depositWithdrawal:s.depositWithdrawal}))),q=M.useLocaleInfo(),y=D.useMobileNumberParser(),h=C.useCreateMayaWithdrawalMutation({onSuccess(){r.reset(),g.depositWithdrawal.setOpen(!1),j.toaster.success({description:"Withdrawal request submitted successfully."})},onError(s){j.toaster.error({description:s.message})}}),b=W.usePaymentSettingsQuery().data,i=b==null?void 0:b.mayaWithdrawalGatewaySettings,t=d.parseDecimal(i==null?void 0:i.minimumAmount,0),m=d.parseDecimal(i==null?void 0:i.maximumAmount,0),w=n.z.object({amount:n.z.string().superRefine((s,l)=>{const c=d.parseDecimal(s,0);c<t&&l.addIssue({type:"number",code:n.z.ZodIssueCode.too_small,inclusive:!0,minimum:t,message:`Minimum amount is ${t.toLocaleString()}`}),c>m&&l.addIssue({type:"number",code:n.z.ZodIssueCode.too_big,inclusive:!0,maximum:m,message:`Maximum amount is ${m.toLocaleString()}`})}),password:n.z.string().min(8,"Password must be 8 or more characters").max(64,"Password must be not be more than 64 characters"),mobileNumber:n.z.string().regex(q.mobileNumber.pattern,"Invalid mobile number")}),r=f.useForm({mode:"all",resolver:N.zodResolver(w),defaultValues:{amount:"0",password:"",mobileNumber:""}});S.useEffect(()=>{t&&r.reset({amount:t.toString(),password:"",mobileNumber:""})},[r,t]);const I=r.handleSubmit(async s=>{h.mutate({amount:s.amount,recipientMobileNumber:y.format(s.mobileNumber),transactionPassword:s.password})});return e.jsxs("form",{onSubmit:I,noValidate:!0,autoComplete:"off",children:[e.jsxs(o.Root,{invalid:!!r.formState.errors.mobileNumber,children:[e.jsx(o.Label,{children:"Mobile Number"}),e.jsxs("div",{className:"relative",children:[e.jsx(q.country.flag,{className:"pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2"}),e.jsx(o.Input,{className:"pl-10.5",...r.register("mobileNumber")})]}),e.jsx(o.ErrorText,{children:(x=r.formState.errors.mobileNumber)==null?void 0:x.message})]}),e.jsx(f.Controller,{control:r.control,name:"amount",render:s=>{var l;return e.jsxs(o.Root,{invalid:!!r.formState.errors.amount,className:"mt-3xl",children:[e.jsxs(a.Root,{min:0,step:1,value:s.field.value,onValueChange:c=>{s.field.onChange(c.value)},formatOptions:{maximumFractionDigits:2,minimumFractionDigits:0},allowMouseWheel:!0,children:[e.jsx(a.Label,{children:"Enter amount you want to withdraw"}),e.jsxs(a.Control,{children:[e.jsx(a.Input,{}),e.jsx(a.IncrementTrigger,{children:e.jsx(E.ChevronUpIcon,{})}),e.jsx(a.DecrementTrigger,{children:e.jsx(z.ChevronDownIcon,{})})]})]}),e.jsx(o.ErrorText,{children:(l=r.formState.errors.amount)==null?void 0:l.message})]})}}),e.jsx(F.AmountChoices,{value:d.parseDecimal(r.watch("amount"),0),onChange:s=>{r.setValue("amount",s.toString(),{shouldTouch:!0,shouldDirty:!0,shouldValidate:!0})},min:t,max:m,className:"mt-xl"}),e.jsxs(o.Root,{className:"mt-3xl",invalid:!!r.formState.errors.password,children:[e.jsxs(u.Root,{children:[e.jsx(u.Label,{children:"Password"}),e.jsxs(u.Control,{children:[e.jsx(u.Input,{...r.register("password")}),e.jsx(u.VisibilityTrigger,{children:e.jsx(u.Indicator,{fallback:e.jsx(T.EyeOffIcon,{}),asChild:!0,children:e.jsx(R.EyeIcon,{})})})]})]}),e.jsx(o.ErrorText,{children:(p=r.formState.errors.password)==null?void 0:p.message})]}),e.jsxs("p",{className:"mt-4xl text-xs",children:["Upon clicking the deposit button, you agree to the"," ",e.jsx("button",{type:"button",className:"underline underline-offset-2",children:"Terms of Use and Privacy Policy"}),"."]}),e.jsx(A.Button,{type:"submit",className:"mt-4.5",disabled:h.isPending,children:h.isPending?e.jsxs(e.Fragment,{children:[e.jsx(L.SpinnerIcon,{}),"Processing..."]}):"Deposit"})]})}exports.MayaWithdrawal=V;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
2
|
-
import { zodResolver as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useForm as
|
|
5
|
-
import { z as
|
|
6
|
-
import { useShallow as
|
|
1
|
+
import { jsxs as t, jsx as o, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver as x } from "@hookform/resolvers/zod";
|
|
3
|
+
import { useEffect as C } from "react";
|
|
4
|
+
import { useForm as P, Controller as M } from "react-hook-form";
|
|
5
|
+
import { z as n } from "zod";
|
|
6
|
+
import { useShallow as W } from "zustand/shallow";
|
|
7
7
|
import "@opexa/portal-sdk-core";
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "tiny-invariant";
|
|
@@ -15,16 +15,18 @@ import "../../../../utils/getQueryClient.mjs";
|
|
|
15
15
|
import "../../../../utils/isMobile.mjs";
|
|
16
16
|
import "lodash-es";
|
|
17
17
|
import "@opexa/portal-sdk-core/object-id";
|
|
18
|
-
import { useCreateMayaWithdrawalMutation as
|
|
19
|
-
import { useGlobalStore as
|
|
18
|
+
import { useCreateMayaWithdrawalMutation as $ } from "../../../../client/hooks/useCreateMayaWithdrawalMutation.mjs";
|
|
19
|
+
import { useGlobalStore as L } from "../../../../client/hooks/useGlobalStore.mjs";
|
|
20
20
|
import "../../../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
21
|
-
import { useLocaleInfo as
|
|
22
|
-
import { useMobileNumberParser as
|
|
21
|
+
import { useLocaleInfo as D } from "../../../../client/hooks/useLocaleInfo.mjs";
|
|
22
|
+
import { useMobileNumberParser as R } from "../../../../client/hooks/useMobileNumberParser.mjs";
|
|
23
23
|
import "usehooks-ts";
|
|
24
|
-
import { usePaymentSettingsQuery as
|
|
24
|
+
import { usePaymentSettingsQuery as E } from "../../../../client/hooks/usePaymentSettingsQuery.mjs";
|
|
25
25
|
import { toaster as w } from "../../../../client/utils/toaster.mjs";
|
|
26
|
-
import { ChevronDownIcon as
|
|
27
|
-
import { ChevronUpIcon as
|
|
26
|
+
import { ChevronDownIcon as T } from "../../../../icons/ChevronDownIcon.mjs";
|
|
27
|
+
import { ChevronUpIcon as V } from "../../../../icons/ChevronUpIcon.mjs";
|
|
28
|
+
import { EyeIcon as A } from "../../../../icons/EyeIcon.mjs";
|
|
29
|
+
import { EyeOffIcon as F } from "../../../../icons/EyeOffIcon.mjs";
|
|
28
30
|
import { SpinnerIcon as j } from "../../../../icons/SpinnerIcon.mjs";
|
|
29
31
|
import "../../../../ui/AlertDialog/AlertDialog.mjs";
|
|
30
32
|
import "../../../../ui/Avatar/Avatar.mjs";
|
|
@@ -32,110 +34,113 @@ import "../../../../ui/Badge/Badge.mjs";
|
|
|
32
34
|
import { Button as z } from "../../../../ui/Button/Button.mjs";
|
|
33
35
|
import "../../../../ui/Checkbox/Checkbox.mjs";
|
|
34
36
|
import "../../../../ui/Clipboard/Clipboard.mjs";
|
|
37
|
+
import "../../../../ui/Collapsible/Collapsible.mjs";
|
|
35
38
|
import "../../../../ui/DatePicker/DatePicker.mjs";
|
|
36
39
|
import "../../../../ui/Dialog/Dialog.mjs";
|
|
37
40
|
import "../../../../ui/Drawer/Drawer.mjs";
|
|
38
|
-
import { Root as d, Label as
|
|
41
|
+
import { Root as d, Label as O, Input as Q, ErrorText as f } from "../../../../ui/Field/Field.mjs";
|
|
39
42
|
import "@ark-ui/react";
|
|
40
43
|
import "../../../../ui/IconButton/iconButton.recipe.mjs";
|
|
41
|
-
import { Root as
|
|
44
|
+
import { Root as U, Label as k, Control as G, Input as Z, IncrementTrigger as _, DecrementTrigger as q } from "../../../../ui/NumberInput/NumberInput.mjs";
|
|
45
|
+
import { Root as B, Label as H, Control as J, Input as K, VisibilityTrigger as X, Indicator as Y } from "../../../../ui/PasswordInput/PasswordInput.mjs";
|
|
42
46
|
import "../../../../ui/PinInput/PinInput.mjs";
|
|
43
47
|
import "../../../../ui/Popover/Popover.mjs";
|
|
44
48
|
import "tailwind-merge";
|
|
49
|
+
import "../../../../ui/Progress/Progress.mjs";
|
|
45
50
|
import "../../../../ui/SegmentGroup/SegmentGroup.mjs";
|
|
46
51
|
import "../../../../ui/Select/Select.mjs";
|
|
47
52
|
import "../../../../ui/Table/Table.mjs";
|
|
48
53
|
import "../../../../ui/Tabs/Tabs.mjs";
|
|
49
|
-
import { AmountChoices as
|
|
50
|
-
function
|
|
51
|
-
var
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
depositWithdrawal:
|
|
54
|
+
import { AmountChoices as oo } from "../../AmountChoices.mjs";
|
|
55
|
+
function tr() {
|
|
56
|
+
var b, g;
|
|
57
|
+
const y = L(
|
|
58
|
+
W((e) => ({
|
|
59
|
+
depositWithdrawal: e.depositWithdrawal
|
|
55
60
|
}))
|
|
56
|
-
),
|
|
61
|
+
), h = D(), N = R(), c = $({
|
|
57
62
|
onSuccess() {
|
|
58
|
-
|
|
63
|
+
r.reset(), y.depositWithdrawal.setOpen(!1), w.success({
|
|
59
64
|
description: "Withdrawal request submitted successfully."
|
|
60
65
|
});
|
|
61
66
|
},
|
|
62
|
-
onError(
|
|
67
|
+
onError(e) {
|
|
63
68
|
w.error({
|
|
64
|
-
description:
|
|
69
|
+
description: e.message
|
|
65
70
|
});
|
|
66
71
|
}
|
|
67
|
-
}),
|
|
68
|
-
amount:
|
|
69
|
-
const l = u(
|
|
70
|
-
l <
|
|
72
|
+
}), p = E().data, m = p == null ? void 0 : p.mayaWithdrawalGatewaySettings, i = u(m == null ? void 0 : m.minimumAmount, 0), a = u(m == null ? void 0 : m.maximumAmount, 0), I = n.object({
|
|
73
|
+
amount: n.string().superRefine((e, s) => {
|
|
74
|
+
const l = u(e, 0);
|
|
75
|
+
l < i && s.addIssue({
|
|
71
76
|
type: "number",
|
|
72
|
-
code:
|
|
77
|
+
code: n.ZodIssueCode.too_small,
|
|
73
78
|
inclusive: !0,
|
|
74
|
-
minimum:
|
|
75
|
-
message: `Minimum amount is ${
|
|
76
|
-
}), l >
|
|
79
|
+
minimum: i,
|
|
80
|
+
message: `Minimum amount is ${i.toLocaleString()}`
|
|
81
|
+
}), l > a && s.addIssue({
|
|
77
82
|
type: "number",
|
|
78
|
-
code:
|
|
83
|
+
code: n.ZodIssueCode.too_big,
|
|
79
84
|
inclusive: !0,
|
|
80
|
-
maximum:
|
|
81
|
-
message: `Maximum amount is ${
|
|
85
|
+
maximum: a,
|
|
86
|
+
message: `Maximum amount is ${a.toLocaleString()}`
|
|
82
87
|
});
|
|
83
88
|
}),
|
|
84
|
-
password:
|
|
85
|
-
mobileNumber:
|
|
86
|
-
}),
|
|
89
|
+
password: n.string().min(8, "Password must be 8 or more characters").max(64, "Password must be not be more than 64 characters"),
|
|
90
|
+
mobileNumber: n.string().regex(h.mobileNumber.pattern, "Invalid mobile number")
|
|
91
|
+
}), r = P({
|
|
87
92
|
mode: "all",
|
|
88
|
-
resolver:
|
|
93
|
+
resolver: x(I),
|
|
89
94
|
defaultValues: {
|
|
90
95
|
amount: "0",
|
|
91
96
|
password: "",
|
|
92
97
|
mobileNumber: ""
|
|
93
98
|
}
|
|
94
99
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
amount:
|
|
100
|
+
C(() => {
|
|
101
|
+
i && r.reset({
|
|
102
|
+
amount: i.toString(),
|
|
98
103
|
password: "",
|
|
99
104
|
mobileNumber: ""
|
|
100
105
|
});
|
|
101
|
-
}, [
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
amount:
|
|
105
|
-
recipientMobileNumber:
|
|
106
|
-
transactionPassword:
|
|
106
|
+
}, [r, i]);
|
|
107
|
+
const v = r.handleSubmit(async (e) => {
|
|
108
|
+
c.mutate({
|
|
109
|
+
amount: e.amount,
|
|
110
|
+
recipientMobileNumber: N.format(e.mobileNumber),
|
|
111
|
+
transactionPassword: e.password
|
|
107
112
|
});
|
|
108
113
|
});
|
|
109
|
-
return /* @__PURE__ */ t("form", { onSubmit:
|
|
110
|
-
/* @__PURE__ */ t(d, { invalid: !!
|
|
111
|
-
/* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ t("form", { onSubmit: v, noValidate: !0, autoComplete: "off", children: [
|
|
115
|
+
/* @__PURE__ */ t(d, { invalid: !!r.formState.errors.mobileNumber, children: [
|
|
116
|
+
/* @__PURE__ */ o(O, { children: "Mobile Number" }),
|
|
112
117
|
/* @__PURE__ */ t("div", { className: "relative", children: [
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ o(h.country.flag, { className: "pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2" }),
|
|
119
|
+
/* @__PURE__ */ o(Q, { className: "pl-10.5", ...r.register("mobileNumber") })
|
|
115
120
|
] }),
|
|
116
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ o(f, { children: (b = r.formState.errors.mobileNumber) == null ? void 0 : b.message })
|
|
117
122
|
] }),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
|
|
123
|
+
/* @__PURE__ */ o(
|
|
124
|
+
M,
|
|
120
125
|
{
|
|
121
|
-
control:
|
|
126
|
+
control: r.control,
|
|
122
127
|
name: "amount",
|
|
123
|
-
render: (
|
|
124
|
-
var
|
|
128
|
+
render: (e) => {
|
|
129
|
+
var s;
|
|
125
130
|
return /* @__PURE__ */ t(
|
|
126
131
|
d,
|
|
127
132
|
{
|
|
128
|
-
invalid: !!
|
|
133
|
+
invalid: !!r.formState.errors.amount,
|
|
129
134
|
className: "mt-3xl",
|
|
130
135
|
children: [
|
|
131
136
|
/* @__PURE__ */ t(
|
|
132
|
-
|
|
137
|
+
U,
|
|
133
138
|
{
|
|
134
139
|
min: 0,
|
|
135
140
|
step: 1,
|
|
136
|
-
value:
|
|
141
|
+
value: e.field.value,
|
|
137
142
|
onValueChange: (l) => {
|
|
138
|
-
|
|
143
|
+
e.field.onChange(l.value);
|
|
139
144
|
},
|
|
140
145
|
formatOptions: {
|
|
141
146
|
maximumFractionDigits: 2,
|
|
@@ -143,57 +148,62 @@ function Oe() {
|
|
|
143
148
|
},
|
|
144
149
|
allowMouseWheel: !0,
|
|
145
150
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ o(k, { children: "Enter amount you want to withdraw" }),
|
|
147
152
|
/* @__PURE__ */ t(G, { children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ o(Z, {}),
|
|
154
|
+
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(V, {}) }),
|
|
155
|
+
/* @__PURE__ */ o(q, { children: /* @__PURE__ */ o(T, {}) })
|
|
151
156
|
] })
|
|
152
157
|
]
|
|
153
158
|
}
|
|
154
159
|
),
|
|
155
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ o(f, { children: (s = r.formState.errors.amount) == null ? void 0 : s.message })
|
|
156
161
|
]
|
|
157
162
|
}
|
|
158
163
|
);
|
|
159
164
|
}
|
|
160
165
|
}
|
|
161
166
|
),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
167
|
+
/* @__PURE__ */ o(
|
|
168
|
+
oo,
|
|
164
169
|
{
|
|
165
|
-
value: u(
|
|
166
|
-
onChange: (
|
|
167
|
-
|
|
170
|
+
value: u(r.watch("amount"), 0),
|
|
171
|
+
onChange: (e) => {
|
|
172
|
+
r.setValue("amount", e.toString(), {
|
|
168
173
|
shouldTouch: !0,
|
|
169
174
|
shouldDirty: !0,
|
|
170
175
|
shouldValidate: !0
|
|
171
176
|
});
|
|
172
177
|
},
|
|
173
|
-
min:
|
|
174
|
-
max:
|
|
178
|
+
min: i,
|
|
179
|
+
max: a,
|
|
175
180
|
className: "mt-xl"
|
|
176
181
|
}
|
|
177
182
|
),
|
|
178
|
-
/* @__PURE__ */ t(d, { className: "mt-3xl", invalid: !!
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
/* @__PURE__ */ t(d, { className: "mt-3xl", invalid: !!r.formState.errors.password, children: [
|
|
184
|
+
/* @__PURE__ */ t(B, { children: [
|
|
185
|
+
/* @__PURE__ */ o(H, { children: "Password" }),
|
|
186
|
+
/* @__PURE__ */ t(J, { children: [
|
|
187
|
+
/* @__PURE__ */ o(K, { ...r.register("password") }),
|
|
188
|
+
/* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(Y, { fallback: /* @__PURE__ */ o(F, {}), asChild: !0, children: /* @__PURE__ */ o(A, {}) }) })
|
|
189
|
+
] })
|
|
190
|
+
] }),
|
|
191
|
+
/* @__PURE__ */ o(f, { children: (g = r.formState.errors.password) == null ? void 0 : g.message })
|
|
182
192
|
] }),
|
|
183
193
|
/* @__PURE__ */ t("p", { className: "mt-4xl text-xs", children: [
|
|
184
194
|
"Upon clicking the deposit button, you agree to the",
|
|
185
195
|
" ",
|
|
186
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ o("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }),
|
|
187
197
|
"."
|
|
188
198
|
] }),
|
|
189
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ o(
|
|
190
200
|
z,
|
|
191
201
|
{
|
|
192
202
|
type: "submit",
|
|
193
203
|
className: "mt-4.5",
|
|
194
|
-
disabled:
|
|
195
|
-
children:
|
|
196
|
-
/* @__PURE__ */
|
|
204
|
+
disabled: c.isPending,
|
|
205
|
+
children: c.isPending ? /* @__PURE__ */ t(S, { children: [
|
|
206
|
+
/* @__PURE__ */ o(j, {}),
|
|
197
207
|
"Processing..."
|
|
198
208
|
] }) : "Deposit"
|
|
199
209
|
}
|
|
@@ -201,5 +211,5 @@ function Oe() {
|
|
|
201
211
|
] });
|
|
202
212
|
}
|
|
203
213
|
export {
|
|
204
|
-
|
|
214
|
+
tr as MayaWithdrawal
|
|
205
215
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@ark-ui/react"),t=require("next/image"),a=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@ark-ui/react"),t=require("next/image"),a=require("react"),u=require("../../images/pagcor.png.js"),c=require("../../images/responsible-gaming.png.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const o=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/DatePicker/DatePicker.js");const r=require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../constants/index.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../ui/IconButton/iconButton.recipe.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("tailwind-merge");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");const x=require("./useDisclaimer.js");function q(l){const i=x.useDisclaimer(),s=a.useRef(null);return e.jsx(r.Root,{open:i.open,lazyMount:!0,unmountOnExit:!0,closeOnEscape:!1,closeOnInteractOutside:!1,initialFocusEl:()=>s.current,children:e.jsxs(n.Portal,{children:[e.jsx(r.Backdrop,{}),e.jsx(r.Positioner,{children:e.jsxs(r.Content,{className:"flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl",children:[e.jsx(t,{src:l.logo,alt:"",width:200,height:100,className:"mx-auto h-auto w-[120px]",draggable:!1}),e.jsxs("div",{className:"w-full grow",children:[e.jsx(r.Title,{className:"mt-3xl text-center text-lg font-semibold",children:"Age Verification"}),e.jsxs(r.Description,{className:"text-text-tertiary-600 mt-xs text-center text-sm",children:["By entering this website I acknowledge and confirmI am 21 years of age and I agree with the"," ",e.jsx("button",{type:"button",className:"text-brand-400 underline underline-offset-2",children:"Terms and Conditions."})]}),e.jsxs("div",{className:"mt-5 flex items-center justify-center gap-3xl",children:[e.jsx(t,{src:u,alt:"",className:"h-[88px] w-auto shrink-0",draggable:!1}),e.jsx(t,{src:c,alt:"",className:"h-[62px] w-auto shrink-0",draggable:!1})]})]}),e.jsx(o.Button,{ref:s,type:"button",className:"mt-4xl",onClick:i.close,children:"Accept"})]})})]})})}exports.Disclaimer=q;
|