@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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
2
|
-
import { zodResolver as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useForm 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 W } from "react-hook-form";
|
|
5
5
|
import { z as s } from "zod";
|
|
6
|
-
import { useShallow as
|
|
6
|
+
import { useShallow as $ } 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 { useCreateGCashWithdrawalMutation as
|
|
19
|
-
import { useGlobalStore as
|
|
18
|
+
import { useCreateGCashWithdrawalMutation as L } from "../../../../client/hooks/useCreateGCashWithdrawalMutation.mjs";
|
|
19
|
+
import { useGlobalStore as M } 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 G } from "../../../../icons/SpinnerIcon.mjs";
|
|
29
31
|
import "../../../../ui/AlertDialog/AlertDialog.mjs";
|
|
30
32
|
import "../../../../ui/Avatar/Avatar.mjs";
|
|
@@ -32,47 +34,50 @@ import "../../../../ui/Badge/Badge.mjs";
|
|
|
32
34
|
import { Button as j } 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 z, Input as O, 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 Q, Label as U, Control as k, 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
|
|
54
|
+
import { AmountChoices as oo } from "../../AmountChoices.mjs";
|
|
55
|
+
function tr() {
|
|
51
56
|
var b, g;
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
depositWithdrawal:
|
|
57
|
+
const N = M(
|
|
58
|
+
$((e) => ({
|
|
59
|
+
depositWithdrawal: e.depositWithdrawal
|
|
55
60
|
}))
|
|
56
|
-
), h =
|
|
61
|
+
), h = D(), y = R(), c = L({
|
|
57
62
|
onSuccess() {
|
|
58
|
-
|
|
63
|
+
r.reset(), N.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: s.string().superRefine((
|
|
69
|
-
const l = u(
|
|
70
|
-
l <
|
|
72
|
+
}), p = E().data, m = p == null ? void 0 : p.gcashWithdrawalGatewaySettings, i = u(m == null ? void 0 : m.minimumAmount, 0), a = u(m == null ? void 0 : m.maximumAmount, 0), I = s.object({
|
|
73
|
+
amount: s.string().superRefine((e, n) => {
|
|
74
|
+
const l = u(e, 0);
|
|
75
|
+
l < i && n.addIssue({
|
|
71
76
|
type: "number",
|
|
72
77
|
code: s.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
|
}), l > a && n.addIssue({
|
|
77
82
|
type: "number",
|
|
78
83
|
code: s.ZodIssueCode.too_big,
|
|
@@ -83,59 +88,59 @@ function Oe() {
|
|
|
83
88
|
}),
|
|
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
|
mobileNumber: s.string().regex(h.mobileNumber.pattern, "Invalid mobile number")
|
|
86
|
-
}),
|
|
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: y.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(z, { 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(O, { 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
|
+
W,
|
|
120
125
|
{
|
|
121
|
-
control:
|
|
126
|
+
control: r.control,
|
|
122
127
|
name: "amount",
|
|
123
|
-
render: (
|
|
128
|
+
render: (e) => {
|
|
124
129
|
var n;
|
|
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
|
+
Q,
|
|
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__ */
|
|
147
|
-
/* @__PURE__ */ t(
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ o(U, { children: "Enter amount you want to withdraw" }),
|
|
152
|
+
/* @__PURE__ */ t(k, { children: [
|
|
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: (n = r.formState.errors.amount) == null ? void 0 : n.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:
|
|
178
|
+
min: i,
|
|
174
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
|
j,
|
|
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(G, {}),
|
|
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 GCashWithdrawal
|
|
205
215
|
};
|
package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js
CHANGED
|
@@ -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"),k=require("@ark-ui/react"),N=require("@hookform/resolvers/zod"),b=require("react"),g=require("react-hook-form"),c=require("zod"),T=require("zustand/shallow");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../../../constants/index.js");require("../../../../utils/capitalize.js");const x=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 P=require("../../../../client/hooks/useCreateInstapayWithdrawalMutation.js"),D=require("../../../../client/hooks/useGlobalStore.js");require("../../../../client/hooks/useInfiniteQueryHelper.js");const E=require("../../../../client/hooks/useInstapayBankListQuery.js");require("usehooks-ts");const W=require("../../../../client/hooks/usePaymentSettingsQuery.js"),I=require("../../../../client/utils/toaster.js"),R=require("../../../../icons/CheckIcon.js"),y=require("../../../../icons/ChevronDownIcon.js"),V=require("../../../../icons/ChevronUpIcon.js"),z=require("../../../../icons/EyeIcon.js"),L=require("../../../../icons/EyeOffIcon.js"),B=require("../../../../icons/SpinnerIcon.js");require("../../../../ui/AlertDialog/AlertDialog.js");require("../../../../ui/Avatar/Avatar.js");require("../../../../ui/Badge/Badge.js");const M=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 n=require("../../../../ui/Field/Field.js");require("../../../../ui/IconButton/iconButton.recipe.js");const m=require("../../../../ui/NumberInput/NumberInput.js"),d=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");const s=require("../../../../ui/Select/Select.js");require("../../../../ui/Table/Table.js");require("../../../../ui/Tabs/Tabs.js");const Q=require("../../AmountChoices.js");function A(){var f,C;const w=D.useGlobalStore(T.useShallow(r=>({depositWithdrawal:r.depositWithdrawal}))),q=P.useCreateInstapayWithdrawalMutation({onSuccess(){t.reset(),w.depositWithdrawal.setOpen(!1),I.toaster.success({description:"Withdrawal request submitted successfully."})},onError(r){I.toaster.error({description:r.message})}}),a=E.useInstapayBankListQuery().data,p=W.usePaymentSettingsQuery().data,l=p==null?void 0:p.instapayWithdrawalGatewaySettings,u=x.parseDecimal(l==null?void 0:l.minimumAmount,0),h=x.parseDecimal(l==null?void 0:l.maximumAmount,0),S=c.z.object({amount:c.z.string().superRefine((r,i)=>{const o=x.parseDecimal(r,0);o<u&&i.addIssue({type:"number",code:c.z.ZodIssueCode.too_small,inclusive:!0,minimum:u,message:`Minimum amount is ${u.toLocaleString()}`}),o>h&&i.addIssue({type:"number",code:c.z.ZodIssueCode.too_big,inclusive:!0,maximum:h,message:`Maximum amount is ${h.toLocaleString()}`})}),password:c.z.string().min(8,"Password must be 8 or more characters").max(64,"Password must be not be more than 64 characters"),accountNumber:c.z.string().min(1).trim(),bankCode:c.z.string().min(1,"Bank is required").trim()}),t=g.useForm({mode:"all",resolver:N.zodResolver(S),defaultValues:{amount:"0",password:"",accountNumber:"",bankCode:""}});b.useEffect(()=>{u&&t.reset({amount:u.toString(),bankCode:t.getValues("bankCode"),password:"",accountNumber:""})},[t,u]),b.useEffect(()=>{a!=null&&a.length&&t.reset({amount:t.getValues("amount"),bankCode:a[0].code,password:"",accountNumber:""})},[t,a]);const v=t.handleSubmit(async r=>{q.mutate({amount:r.amount,transactionPassword:r.password,accountNumber:r.accountNumber,bankCode:r.bankCode})}),j=b.useMemo(()=>k.createListCollection({items:a??[],itemToValue:r=>r.code,itemToString:r=>r.name}),[a]);return console.log(j.items),e.jsxs("form",{onSubmit:v,noValidate:!0,autoComplete:"off",children:[e.jsx(g.Controller,{control:t.control,name:"bankCode",render:r=>{var i;return e.jsxs(n.Root,{invalid:!!t.formState.errors.bankCode,children:[e.jsxs(s.Root,{collection:j,positioning:{sameWidth:!0},value:r.field.value?[r.field.value]:[],onValueChange:o=>{r.field.onChange(o.value.at(0)??"")},children:[e.jsx(s.Label,{children:"Bank"}),e.jsx(s.Control,{children:e.jsxs(s.Trigger,{children:[e.jsx(s.ValueText,{}),e.jsx(s.Indicator,{asChild:!0,children:e.jsx(y.ChevronDownIcon,{})})]})}),e.jsx(s.Positioner,{children:e.jsx(s.Content,{children:e.jsx(s.ItemGroup,{children:j.items.map(o=>e.jsxs(s.Item,{item:o,children:[e.jsx(s.ItemText,{children:o.name}),e.jsx(s.ItemIndicator,{asChild:!0,children:e.jsx(R.CheckIcon,{})})]},o.id))})})})]}),e.jsx(n.ErrorText,{children:(i=t.formState.errors.bankCode)==null?void 0:i.message})]})}}),e.jsxs(n.Root,{invalid:!!t.formState.errors.accountNumber,className:"mt-3xl",children:[e.jsx(n.Label,{children:"Bank account number"}),e.jsx(n.Input,{...t.register("accountNumber")}),e.jsx(n.ErrorText,{children:(f=t.formState.errors.accountNumber)==null?void 0:f.message})]}),e.jsx(g.Controller,{control:t.control,name:"amount",render:r=>{var i;return e.jsxs(n.Root,{invalid:!!t.formState.errors.amount,className:"mt-3xl",children:[e.jsxs(m.Root,{min:0,step:1,value:r.field.value,onValueChange:o=>{r.field.onChange(o.value)},formatOptions:{maximumFractionDigits:2,minimumFractionDigits:0},allowMouseWheel:!0,children:[e.jsx(m.Label,{children:"Enter amount you want to withdraw"}),e.jsxs(m.Control,{children:[e.jsx(m.Input,{}),e.jsx(m.IncrementTrigger,{children:e.jsx(V.ChevronUpIcon,{})}),e.jsx(m.DecrementTrigger,{children:e.jsx(y.ChevronDownIcon,{})})]})]}),e.jsx(n.ErrorText,{children:(i=t.formState.errors.amount)==null?void 0:i.message})]})}}),e.jsx(Q.AmountChoices,{value:x.parseDecimal(t.watch("amount"),0),onChange:r=>{t.setValue("amount",r.toString(),{shouldTouch:!0,shouldDirty:!0,shouldValidate:!0})},min:u,max:h,className:"mt-xl"}),e.jsxs(n.Root,{className:"mt-3xl",invalid:!!t.formState.errors.password,children:[e.jsxs(d.Root,{children:[e.jsx(d.Label,{children:"Password"}),e.jsxs(d.Control,{children:[e.jsx(d.Input,{...t.register("password")}),e.jsx(d.VisibilityTrigger,{children:e.jsx(d.Indicator,{fallback:e.jsx(L.EyeOffIcon,{}),asChild:!0,children:e.jsx(z.EyeIcon,{})})})]})]}),e.jsx(n.ErrorText,{children:(C=t.formState.errors.password)==null?void 0:C.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(M.Button,{type:"submit",className:"mt-4.5",disabled:q.isPending,children:q.isPending?e.jsxs(e.Fragment,{children:[e.jsx(B.SpinnerIcon,{}),"Processing..."]}):"Deposit"})]})}exports.InstapayWithdrawal=A;
|