@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/InstapayWithdrawal/InstapayWithdrawal.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createListCollection as
|
|
3
|
-
import { zodResolver as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { useForm as
|
|
1
|
+
import { jsxs as t, jsx as o, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { createListCollection as $ } from "@ark-ui/react";
|
|
3
|
+
import { zodResolver as L } from "@hookform/resolvers/zod";
|
|
4
|
+
import { useEffect as I, useMemo as P } from "react";
|
|
5
|
+
import { useForm as T, Controller as w } from "react-hook-form";
|
|
6
6
|
import { z as s } from "zod";
|
|
7
|
-
import { useShallow as
|
|
7
|
+
import { useShallow as V } from "zustand/shallow";
|
|
8
8
|
import "@opexa/portal-sdk-core";
|
|
9
9
|
import "@tanstack/react-query";
|
|
10
10
|
import "tiny-invariant";
|
|
@@ -16,16 +16,18 @@ import "../../../../utils/getQueryClient.mjs";
|
|
|
16
16
|
import "../../../../utils/isMobile.mjs";
|
|
17
17
|
import "lodash-es";
|
|
18
18
|
import "@opexa/portal-sdk-core/object-id";
|
|
19
|
-
import { useCreateInstapayWithdrawalMutation as
|
|
20
|
-
import { useGlobalStore as
|
|
19
|
+
import { useCreateInstapayWithdrawalMutation as W } from "../../../../client/hooks/useCreateInstapayWithdrawalMutation.mjs";
|
|
20
|
+
import { useGlobalStore as R } from "../../../../client/hooks/useGlobalStore.mjs";
|
|
21
21
|
import "../../../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
22
|
-
import { useInstapayBankListQuery as
|
|
22
|
+
import { useInstapayBankListQuery as D } from "../../../../client/hooks/useInstapayBankListQuery.mjs";
|
|
23
23
|
import "usehooks-ts";
|
|
24
|
-
import { usePaymentSettingsQuery as
|
|
25
|
-
import { toaster as
|
|
26
|
-
import { CheckIcon as
|
|
24
|
+
import { usePaymentSettingsQuery as B } from "../../../../client/hooks/usePaymentSettingsQuery.mjs";
|
|
25
|
+
import { toaster as y } from "../../../../client/utils/toaster.mjs";
|
|
26
|
+
import { CheckIcon as E } from "../../../../icons/CheckIcon.mjs";
|
|
27
27
|
import { ChevronDownIcon as S } from "../../../../icons/ChevronDownIcon.mjs";
|
|
28
|
-
import { ChevronUpIcon as
|
|
28
|
+
import { ChevronUpIcon as M } from "../../../../icons/ChevronUpIcon.mjs";
|
|
29
|
+
import { EyeIcon as Q } from "../../../../icons/EyeIcon.mjs";
|
|
30
|
+
import { EyeOffIcon as A } from "../../../../icons/EyeOffIcon.mjs";
|
|
29
31
|
import { SpinnerIcon as F } from "../../../../icons/SpinnerIcon.mjs";
|
|
30
32
|
import "../../../../ui/AlertDialog/AlertDialog.mjs";
|
|
31
33
|
import "../../../../ui/Avatar/Avatar.mjs";
|
|
@@ -33,47 +35,50 @@ import "../../../../ui/Badge/Badge.mjs";
|
|
|
33
35
|
import { Button as j } from "../../../../ui/Button/Button.mjs";
|
|
34
36
|
import "../../../../ui/Checkbox/Checkbox.mjs";
|
|
35
37
|
import "../../../../ui/Clipboard/Clipboard.mjs";
|
|
38
|
+
import "../../../../ui/Collapsible/Collapsible.mjs";
|
|
36
39
|
import "../../../../ui/DatePicker/DatePicker.mjs";
|
|
37
40
|
import "../../../../ui/Dialog/Dialog.mjs";
|
|
38
41
|
import "../../../../ui/Drawer/Drawer.mjs";
|
|
39
|
-
import { Root as d, ErrorText as p, Label as
|
|
42
|
+
import { Root as d, ErrorText as p, Label as G, Input as O } from "../../../../ui/Field/Field.mjs";
|
|
40
43
|
import "../../../../ui/IconButton/iconButton.recipe.mjs";
|
|
41
|
-
import { Root as
|
|
44
|
+
import { Root as U, Label as q, Control as z, Input as Z, IncrementTrigger as _, DecrementTrigger as H } from "../../../../ui/NumberInput/NumberInput.mjs";
|
|
45
|
+
import { Root as J, Label as K, Control as X, Input as Y, VisibilityTrigger as oo, Indicator as eo } 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
|
-
import { Root as
|
|
51
|
+
import { Root as ro, Label as to, Control as io, Trigger as no, ValueText as ao, Indicator as mo, Positioner as so, Content as lo, ItemGroup as uo, Item as co, ItemText as po, ItemIndicator as ho } from "../../../../ui/Select/Select.mjs";
|
|
47
52
|
import "../../../../ui/Table/Table.mjs";
|
|
48
53
|
import "../../../../ui/Tabs/Tabs.mjs";
|
|
49
|
-
import { AmountChoices as
|
|
50
|
-
function
|
|
54
|
+
import { AmountChoices as fo } from "../../AmountChoices.mjs";
|
|
55
|
+
function Ce() {
|
|
51
56
|
var g, C;
|
|
52
|
-
const k =
|
|
53
|
-
|
|
54
|
-
depositWithdrawal:
|
|
57
|
+
const k = R(
|
|
58
|
+
V((e) => ({
|
|
59
|
+
depositWithdrawal: e.depositWithdrawal
|
|
55
60
|
}))
|
|
56
|
-
), h =
|
|
61
|
+
), h = W({
|
|
57
62
|
onSuccess() {
|
|
58
|
-
|
|
63
|
+
r.reset(), k.depositWithdrawal.setOpen(!1), y.success({
|
|
59
64
|
description: "Withdrawal request submitted successfully."
|
|
60
65
|
});
|
|
61
66
|
},
|
|
62
|
-
onError(
|
|
63
|
-
|
|
64
|
-
description:
|
|
67
|
+
onError(e) {
|
|
68
|
+
y.error({
|
|
69
|
+
description: e.message
|
|
65
70
|
});
|
|
66
71
|
}
|
|
67
|
-
}), a =
|
|
68
|
-
amount: s.string().superRefine((
|
|
69
|
-
const
|
|
70
|
-
|
|
72
|
+
}), a = D().data, f = B().data, l = f == null ? void 0 : f.instapayWithdrawalGatewaySettings, m = c(l == null ? void 0 : l.minimumAmount, 0), u = c(l == null ? void 0 : l.maximumAmount, 0), v = s.object({
|
|
73
|
+
amount: s.string().superRefine((e, n) => {
|
|
74
|
+
const i = c(e, 0);
|
|
75
|
+
i < m && n.addIssue({
|
|
71
76
|
type: "number",
|
|
72
77
|
code: s.ZodIssueCode.too_small,
|
|
73
78
|
inclusive: !0,
|
|
74
79
|
minimum: m,
|
|
75
80
|
message: `Minimum amount is ${m.toLocaleString()}`
|
|
76
|
-
}),
|
|
81
|
+
}), i > u && n.addIssue({
|
|
77
82
|
type: "number",
|
|
78
83
|
code: s.ZodIssueCode.too_big,
|
|
79
84
|
inclusive: !0,
|
|
@@ -84,9 +89,9 @@ function no() {
|
|
|
84
89
|
password: s.string().min(8, "Password must be 8 or more characters").max(64, "Password must be not be more than 64 characters"),
|
|
85
90
|
accountNumber: s.string().min(1).trim(),
|
|
86
91
|
bankCode: s.string().min(1, "Bank is required").trim()
|
|
87
|
-
}),
|
|
92
|
+
}), r = T({
|
|
88
93
|
mode: "all",
|
|
89
|
-
resolver:
|
|
94
|
+
resolver: L(v),
|
|
90
95
|
defaultValues: {
|
|
91
96
|
amount: "0",
|
|
92
97
|
password: "",
|
|
@@ -94,107 +99,107 @@ function no() {
|
|
|
94
99
|
bankCode: ""
|
|
95
100
|
}
|
|
96
101
|
});
|
|
97
|
-
|
|
98
|
-
m &&
|
|
102
|
+
I(() => {
|
|
103
|
+
m && r.reset({
|
|
99
104
|
amount: m.toString(),
|
|
100
|
-
bankCode:
|
|
105
|
+
bankCode: r.getValues("bankCode"),
|
|
101
106
|
password: "",
|
|
102
107
|
accountNumber: ""
|
|
103
108
|
});
|
|
104
|
-
}, [
|
|
105
|
-
a != null && a.length &&
|
|
106
|
-
amount:
|
|
109
|
+
}, [r, m]), I(() => {
|
|
110
|
+
a != null && a.length && r.reset({
|
|
111
|
+
amount: r.getValues("amount"),
|
|
107
112
|
bankCode: a[0].code,
|
|
108
113
|
password: "",
|
|
109
114
|
accountNumber: ""
|
|
110
115
|
});
|
|
111
|
-
}, [
|
|
112
|
-
const
|
|
116
|
+
}, [r, a]);
|
|
117
|
+
const x = r.handleSubmit(async (e) => {
|
|
113
118
|
h.mutate({
|
|
114
|
-
amount:
|
|
115
|
-
transactionPassword:
|
|
116
|
-
accountNumber:
|
|
117
|
-
bankCode:
|
|
119
|
+
amount: e.amount,
|
|
120
|
+
transactionPassword: e.password,
|
|
121
|
+
accountNumber: e.accountNumber,
|
|
122
|
+
bankCode: e.bankCode
|
|
118
123
|
});
|
|
119
|
-
}), b =
|
|
120
|
-
() =>
|
|
124
|
+
}), b = P(
|
|
125
|
+
() => $({
|
|
121
126
|
items: a ?? [],
|
|
122
|
-
itemToValue: (
|
|
123
|
-
itemToString: (
|
|
127
|
+
itemToValue: (e) => e.code,
|
|
128
|
+
itemToString: (e) => e.name
|
|
124
129
|
}),
|
|
125
130
|
[a]
|
|
126
131
|
);
|
|
127
|
-
return console.log(b.items), /* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
|
|
132
|
+
return console.log(b.items), /* @__PURE__ */ t("form", { onSubmit: x, noValidate: !0, autoComplete: "off", children: [
|
|
133
|
+
/* @__PURE__ */ o(
|
|
134
|
+
w,
|
|
130
135
|
{
|
|
131
|
-
control:
|
|
136
|
+
control: r.control,
|
|
132
137
|
name: "bankCode",
|
|
133
|
-
render: (
|
|
134
|
-
var
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
|
|
138
|
+
render: (e) => {
|
|
139
|
+
var n;
|
|
140
|
+
return /* @__PURE__ */ t(d, { invalid: !!r.formState.errors.bankCode, children: [
|
|
141
|
+
/* @__PURE__ */ t(
|
|
142
|
+
ro,
|
|
138
143
|
{
|
|
139
144
|
collection: b,
|
|
140
145
|
positioning: {
|
|
141
146
|
sameWidth: !0
|
|
142
147
|
},
|
|
143
|
-
value:
|
|
144
|
-
onValueChange: (
|
|
145
|
-
|
|
148
|
+
value: e.field.value ? [e.field.value] : [],
|
|
149
|
+
onValueChange: (i) => {
|
|
150
|
+
e.field.onChange(i.value.at(0) ?? "");
|
|
146
151
|
},
|
|
147
152
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ o(to, { children: "Bank" }),
|
|
154
|
+
/* @__PURE__ */ o(io, { children: /* @__PURE__ */ t(no, { children: [
|
|
155
|
+
/* @__PURE__ */ o(ao, {}),
|
|
156
|
+
/* @__PURE__ */ o(mo, { asChild: !0, children: /* @__PURE__ */ o(S, {}) })
|
|
152
157
|
] }) }),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
] },
|
|
158
|
+
/* @__PURE__ */ o(so, { children: /* @__PURE__ */ o(lo, { children: /* @__PURE__ */ o(uo, { children: b.items.map((i) => /* @__PURE__ */ t(co, { item: i, children: [
|
|
159
|
+
/* @__PURE__ */ o(po, { children: i.name }),
|
|
160
|
+
/* @__PURE__ */ o(ho, { asChild: !0, children: /* @__PURE__ */ o(E, {}) })
|
|
161
|
+
] }, i.id)) }) }) })
|
|
157
162
|
]
|
|
158
163
|
}
|
|
159
164
|
),
|
|
160
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ o(p, { children: (n = r.formState.errors.bankCode) == null ? void 0 : n.message })
|
|
161
166
|
] });
|
|
162
167
|
}
|
|
163
168
|
}
|
|
164
169
|
),
|
|
165
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ t(
|
|
166
171
|
d,
|
|
167
172
|
{
|
|
168
|
-
invalid: !!
|
|
173
|
+
invalid: !!r.formState.errors.accountNumber,
|
|
169
174
|
className: "mt-3xl",
|
|
170
175
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ o(G, { children: "Bank account number" }),
|
|
177
|
+
/* @__PURE__ */ o(O, { ...r.register("accountNumber") }),
|
|
178
|
+
/* @__PURE__ */ o(p, { children: (g = r.formState.errors.accountNumber) == null ? void 0 : g.message })
|
|
174
179
|
]
|
|
175
180
|
}
|
|
176
181
|
),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
182
|
+
/* @__PURE__ */ o(
|
|
183
|
+
w,
|
|
179
184
|
{
|
|
180
|
-
control:
|
|
185
|
+
control: r.control,
|
|
181
186
|
name: "amount",
|
|
182
|
-
render: (
|
|
183
|
-
var
|
|
184
|
-
return /* @__PURE__ */
|
|
187
|
+
render: (e) => {
|
|
188
|
+
var n;
|
|
189
|
+
return /* @__PURE__ */ t(
|
|
185
190
|
d,
|
|
186
191
|
{
|
|
187
|
-
invalid: !!
|
|
192
|
+
invalid: !!r.formState.errors.amount,
|
|
188
193
|
className: "mt-3xl",
|
|
189
194
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
|
|
195
|
+
/* @__PURE__ */ t(
|
|
196
|
+
U,
|
|
192
197
|
{
|
|
193
198
|
min: 0,
|
|
194
199
|
step: 1,
|
|
195
|
-
value:
|
|
196
|
-
onValueChange: (
|
|
197
|
-
|
|
200
|
+
value: e.field.value,
|
|
201
|
+
onValueChange: (i) => {
|
|
202
|
+
e.field.onChange(i.value);
|
|
198
203
|
},
|
|
199
204
|
formatOptions: {
|
|
200
205
|
maximumFractionDigits: 2,
|
|
@@ -202,28 +207,28 @@ function no() {
|
|
|
202
207
|
},
|
|
203
208
|
allowMouseWheel: !0,
|
|
204
209
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ o(q, { children: "Enter amount you want to withdraw" }),
|
|
211
|
+
/* @__PURE__ */ t(z, { children: [
|
|
212
|
+
/* @__PURE__ */ o(Z, {}),
|
|
213
|
+
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(M, {}) }),
|
|
214
|
+
/* @__PURE__ */ o(H, { children: /* @__PURE__ */ o(S, {}) })
|
|
210
215
|
] })
|
|
211
216
|
]
|
|
212
217
|
}
|
|
213
218
|
),
|
|
214
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ o(p, { children: (n = r.formState.errors.amount) == null ? void 0 : n.message })
|
|
215
220
|
]
|
|
216
221
|
}
|
|
217
222
|
);
|
|
218
223
|
}
|
|
219
224
|
}
|
|
220
225
|
),
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
-
|
|
226
|
+
/* @__PURE__ */ o(
|
|
227
|
+
fo,
|
|
223
228
|
{
|
|
224
|
-
value: c(
|
|
225
|
-
onChange: (
|
|
226
|
-
|
|
229
|
+
value: c(r.watch("amount"), 0),
|
|
230
|
+
onChange: (e) => {
|
|
231
|
+
r.setValue("amount", e.toString(), {
|
|
227
232
|
shouldTouch: !0,
|
|
228
233
|
shouldDirty: !0,
|
|
229
234
|
shouldValidate: !0
|
|
@@ -234,25 +239,30 @@ function no() {
|
|
|
234
239
|
className: "mt-xl"
|
|
235
240
|
}
|
|
236
241
|
),
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
|
|
240
|
-
|
|
242
|
+
/* @__PURE__ */ t(d, { className: "mt-3xl", invalid: !!r.formState.errors.password, children: [
|
|
243
|
+
/* @__PURE__ */ t(J, { children: [
|
|
244
|
+
/* @__PURE__ */ o(K, { children: "Password" }),
|
|
245
|
+
/* @__PURE__ */ t(X, { children: [
|
|
246
|
+
/* @__PURE__ */ o(Y, { ...r.register("password") }),
|
|
247
|
+
/* @__PURE__ */ o(oo, { children: /* @__PURE__ */ o(eo, { fallback: /* @__PURE__ */ o(A, {}), asChild: !0, children: /* @__PURE__ */ o(Q, {}) }) })
|
|
248
|
+
] })
|
|
249
|
+
] }),
|
|
250
|
+
/* @__PURE__ */ o(p, { children: (C = r.formState.errors.password) == null ? void 0 : C.message })
|
|
241
251
|
] }),
|
|
242
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ t("p", { className: "mt-4xl text-xs", children: [
|
|
243
253
|
"Upon clicking the deposit button, you agree to the",
|
|
244
254
|
" ",
|
|
245
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ o("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }),
|
|
246
256
|
"."
|
|
247
257
|
] }),
|
|
248
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ o(
|
|
249
259
|
j,
|
|
250
260
|
{
|
|
251
261
|
type: "submit",
|
|
252
262
|
className: "mt-4.5",
|
|
253
263
|
disabled: h.isPending,
|
|
254
|
-
children: h.isPending ? /* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
264
|
+
children: h.isPending ? /* @__PURE__ */ t(N, { children: [
|
|
265
|
+
/* @__PURE__ */ o(F, {}),
|
|
256
266
|
"Processing..."
|
|
257
267
|
] }) : "Deposit"
|
|
258
268
|
}
|
|
@@ -260,5 +270,5 @@ function no() {
|
|
|
260
270
|
] });
|
|
261
271
|
}
|
|
262
272
|
export {
|
|
263
|
-
|
|
273
|
+
Ce as InstapayWithdrawal
|
|
264
274
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),S=require("@hookform/resolvers/zod"),b=require("react"),x=require("react-hook-form"),u=require("zod"),I=require("zustand/shallow");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../../../constants/index.js");require("../../../../utils/capitalize.js");const m=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 M=require("../../../../client/hooks/useCreateMayaAppWithdrawalMutation.js"),C=require("../../../../client/hooks/useGlobalStore.js");require("../../../../client/hooks/useInfiniteQueryHelper.js");const v=require("../../../../client/hooks/useIsMayaSessionValidQuery.js");require("usehooks-ts");const P=require("../../../../client/hooks/usePaymentSettingsQuery.js"),y=require("../../../../client/utils/toaster.js"),W=require("../../../../icons/ChevronDownIcon.js"),A=require("../../../../icons/ChevronUpIcon.js"),D=require("../../../../icons/EyeIcon.js"),E=require("../../../../icons/EyeOffIcon.js"),V=require("../../../../icons/SpinnerIcon.js");require("../../../../ui/AlertDialog/AlertDialog.js");require("../../../../ui/Avatar/Avatar.js");require("../../../../ui/Badge/Badge.js");const z=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 d=require("../../../../ui/Field/Field.js");require("@ark-ui/react");require("../../../../ui/IconButton/iconButton.recipe.js");const i=require("../../../../ui/NumberInput/NumberInput.js"),n=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 Q=require("../../AmountChoices.js"),R=require("../../MayaSessionExpired.js");function T(){var p;const j=C.useGlobalStore(I.useShallow(r=>({depositWithdrawal:r.depositWithdrawal}))),h=M.useCreateMayaAppWithdrawalMutation({onSuccess(){s.reset(),j.depositWithdrawal.setOpen(!1),y.toaster.success({description:"Withdrawal request submitted successfully."})},onError(r){y.toaster.error({description:r.message})}}),g=v.useIsMayaSessionValidQuery().data??!0,q=P.usePaymentSettingsQuery().data,o=q==null?void 0:q.mayaAppWithdrawalGatewaySettings,c=m.parseDecimal(o==null?void 0:o.maximumAmount,0),t=m.parseDecimal(o==null?void 0:o.minimumAmount,0),f=u.z.object({amount:u.z.string().superRefine((r,a)=>{const l=m.parseDecimal(r,0);l<t&&a.addIssue({type:"number",code:u.z.ZodIssueCode.too_small,inclusive:!0,minimum:t,message:`Minimum amount is ${t.toLocaleString()}`}),l>c&&a.addIssue({type:"number",code:u.z.ZodIssueCode.too_big,inclusive:!0,maximum:c,message:`Maximum amount is ${c.toLocaleString()}`})}),password:u.z.string().min(8,"Password must be 8 or more characters").max(64,"Password must be not be more than 64 characters")}),s=x.useForm({mode:"all",resolver:S.zodResolver(f),defaultValues:{amount:"0",password:""}});b.useEffect(()=>{t&&s.reset({amount:t.toString(),password:""})},[s,t]);const w=s.handleSubmit(async r=>{h.mutate({amount:r.amount,transactionPassword:r.password})});return g?e.jsxs("form",{onSubmit:w,noValidate:!0,children:[e.jsx(x.Controller,{control:s.control,name:"amount",render:r=>{var a;return e.jsxs(d.Root,{invalid:!!s.formState.errors.amount,children:[e.jsxs(i.Root,{min:0,step:1,value:r.field.value,onValueChange:l=>{r.field.onChange(l.value)},formatOptions:{maximumFractionDigits:2,minimumFractionDigits:0},allowMouseWheel:!0,children:[e.jsx(i.Label,{children:"Enter amount you want to deposit"}),e.jsxs(i.Control,{children:[e.jsx(i.Input,{}),e.jsx(i.IncrementTrigger,{children:e.jsx(A.ChevronUpIcon,{})}),e.jsx(i.DecrementTrigger,{children:e.jsx(W.ChevronDownIcon,{})})]})]}),e.jsx(d.ErrorText,{children:(a=s.formState.errors.amount)==null?void 0:a.message})]})}}),e.jsx(Q.AmountChoices,{value:m.parseDecimal(s.watch("amount"),0),onChange:r=>{s.setValue("amount",r.toString(),{shouldTouch:!0,shouldDirty:!0,shouldValidate:!0})},min:t,max:c,className:"mt-xl"}),e.jsxs(d.Root,{className:"mt-3xl",invalid:!!s.formState.errors.password,children:[e.jsxs(n.Root,{children:[e.jsx(n.Label,{children:"Password"}),e.jsxs(n.Control,{children:[e.jsx(n.Input,{...s.register("password")}),e.jsx(n.VisibilityTrigger,{children:e.jsx(n.Indicator,{fallback:e.jsx(E.EyeOffIcon,{}),asChild:!0,children:e.jsx(D.EyeIcon,{})})})]})]}),e.jsx(d.ErrorText,{children:(p=s.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(z.Button,{type:"submit",className:"mt-4.5",disabled:h.isPending,children:h.isPending?e.jsxs(e.Fragment,{children:[e.jsx(V.SpinnerIcon,{}),"Processing..."]}):"Withdraw"})]}):e.jsx(R.MayaSessionExpired,{})}exports.MayaAppWithdrawal=T;
|