@opexa/portal-components 0.0.17 → 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 +7 -7
- 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 +123 -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 -4
- package/dist/components/Promos/PromosContent.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import o from "embla-carousel-react";
|
|
4
4
|
import c from "next/image";
|
|
5
5
|
import "@opexa/portal-sdk-core";
|
|
@@ -7,7 +7,7 @@ import "@tanstack/react-query";
|
|
|
7
7
|
import "tiny-invariant";
|
|
8
8
|
import "../../constants/index.mjs";
|
|
9
9
|
import "../../utils/capitalize.mjs";
|
|
10
|
-
import { formatNumber as
|
|
10
|
+
import { formatNumber as a } from "../../utils/formatNumber.mjs";
|
|
11
11
|
import { getGameImageUrl as d } from "../../utils/getGameImageUrl.mjs";
|
|
12
12
|
import "../../utils/getLocaleInfo.mjs";
|
|
13
13
|
import "../../utils/getQueryClient.mjs";
|
|
@@ -21,17 +21,17 @@ import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
|
21
21
|
import { useLocaleInfo as n } from "../../client/hooks/useLocaleInfo.mjs";
|
|
22
22
|
import "usehooks-ts";
|
|
23
23
|
import { useTopWinsQuery as p } from "../../client/hooks/useTopWinsQuery.mjs";
|
|
24
|
-
function
|
|
25
|
-
const
|
|
24
|
+
function E(i) {
|
|
25
|
+
const l = n(), m = p().data ?? [], [s] = o({
|
|
26
26
|
align: "start",
|
|
27
27
|
slidesToScroll: 1
|
|
28
28
|
});
|
|
29
|
-
return m != null && m.length ? /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */ e("div", { className: "
|
|
31
|
-
/* @__PURE__ */ e("div", { ref: s, className: "relative lg:overflow-hidden", children: /* @__PURE__ */ e("div", { className: "flex gap-sm lg:gap-md", children: m.map((r) => /* @__PURE__ */
|
|
29
|
+
return m != null && m.length ? /* @__PURE__ */ t("div", { className: i.className, children: [
|
|
30
|
+
/* @__PURE__ */ e("div", { className: "mb-3 text-lg font-semibold md:mb-4", children: i.heading ?? "Recent Big Wins" }),
|
|
31
|
+
/* @__PURE__ */ e("div", { ref: s, className: "relative lg:overflow-hidden", children: /* @__PURE__ */ e("div", { className: "flex gap-sm lg:gap-md", children: m.map((r) => /* @__PURE__ */ t(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
|
-
className: "bg-
|
|
34
|
+
className: "bg-bg-tertiary border-border-primary flex w-[calc((100%-(0.375rem*2))/3)] shrink-0 flex-col space-y-2 rounded-sm border p-2 text-center lg:w-[calc((100%-(0.5rem*5))/6)] xl:w-[calc((100%-(0.5rem*9))/10)]",
|
|
35
35
|
children: [
|
|
36
36
|
/* @__PURE__ */ e("div", { className: "mx-auto aspect-square w-full", children: r.game && /* @__PURE__ */ e(
|
|
37
37
|
c,
|
|
@@ -43,13 +43,13 @@ function L(l) {
|
|
|
43
43
|
className: "size-full rounded-sm object-cover"
|
|
44
44
|
}
|
|
45
45
|
) }),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ e("div", { className: "text-
|
|
48
|
-
/* @__PURE__ */ e("div", { className: "text-
|
|
49
|
-
currency:
|
|
46
|
+
/* @__PURE__ */ t("div", { className: "space-y-0.5", children: [
|
|
47
|
+
/* @__PURE__ */ e("div", { className: "text-text-secondary-700 text-xs", children: r.member.name }),
|
|
48
|
+
/* @__PURE__ */ e("div", { className: "text-text-primary-brand text-sm font-semibold", children: a(r.payout, {
|
|
49
|
+
currency: l.currency.code,
|
|
50
50
|
minDecimalPlaces: 2
|
|
51
51
|
}) }),
|
|
52
|
-
/* @__PURE__ */ e("div", { className: "text-
|
|
52
|
+
/* @__PURE__ */ e("div", { className: "text-text-secondary-700 text-xs", children: a(r.multiplier, {
|
|
53
53
|
minDecimalPlaces: 2
|
|
54
54
|
}) })
|
|
55
55
|
] })
|
|
@@ -60,5 +60,5 @@ function L(l) {
|
|
|
60
60
|
] }) : null;
|
|
61
61
|
}
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
E as TopWins__client
|
|
64
64
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface TournamentCounterProps {
|
|
2
|
+
/** @default "Tournaments" */
|
|
3
|
+
heading?: string;
|
|
4
|
+
/** @default "/tournaments" */
|
|
5
|
+
viewAllUrl?: string;
|
|
2
6
|
className?: string;
|
|
3
|
-
heading: string;
|
|
4
|
-
seeAllUrl: string;
|
|
5
7
|
}
|
|
6
8
|
export declare function TournamentCounter(props: TournamentCounterProps): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("embla-carousel-react"),N=require("next/link"),s=require("react");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");require("../../utils/capitalize.js");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");require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const v=require("../../client/hooks/useTournamentsQuery.js"),b=require("../../icons/ArrowLeftIcon.js"),j=require("../../icons/ArrowRightIcon.js"),C=require("../../icons/ChevronRightIcon.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/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");require("@ark-ui/react");require("../../ui/IconButton/iconButton.recipe.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("tailwind-merge");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");const S=require("./TournamentCounterItem.js");function w(n){var u;const[
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("embla-carousel-react"),N=require("next/link"),s=require("react");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");require("../../utils/capitalize.js");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");require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const v=require("../../client/hooks/useTournamentsQuery.js"),b=require("../../icons/ArrowLeftIcon.js"),j=require("../../icons/ArrowRightIcon.js"),C=require("../../icons/ChevronRightIcon.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");require("../../ui/Field/Field.js");require("@ark-ui/react");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 S=require("./TournamentCounterItem.js");function w(n){var u;const[o,e]=g({align:"start",slidesToScroll:1}),c=s.useCallback(()=>{e&&e.scrollPrev()},[e]),m=s.useCallback(()=>{e&&e.scrollNext()},[e]),[q,d]=s.useState(!1),[f,x]=s.useState(!1),l=s.useCallback(()=>{e&&(d(e.canScrollPrev()),x(e.canScrollNext()))},[e]);s.useEffect(()=>{e&&(l(),e.on("select",l),e.on("reInit",l))},[e,l]);const t=((u=v.useTournamentsQuery({first:100,filter:{status:{equal:"ACTIVE"}}}).data)==null?void 0:u.pages[0].edges.map(i=>i.node))??[];return t.length<=0?null:r.jsxs("div",{className:n.className,children:[r.jsxs("div",{className:"mb-3 flex items-center justify-between md:mb-4",children:[r.jsx("div",{className:"text-lg font-semibold",children:n.heading??"Tournaments"}),r.jsxs("div",{className:"flex items-center md:gap-3xl",children:[r.jsxs(N,{href:n.viewAllUrl??"/tournaments",className:"flex gap-sm text-sm font-semibold",children:["See All",r.jsx(C.ChevronRightIcon,{className:"size-5 lg:hidden"})]}),r.jsxs("div",{className:"hidden lg:flex",children:[r.jsx(a.Button,{disabled:!q,onClick:c,variant:"outline",colorScheme:"gray",className:"rounded-r-none border-r-0","aria-label":"Previous",children:r.jsx(b.ArrowLeftIcon,{className:"size-5"})}),r.jsx(a.Button,{disabled:!f,onClick:m,variant:"outline",colorScheme:"gray",className:"rounded-l-none","aria-label":"Next",children:r.jsx(j.ArrowRightIcon,{className:"size-5"})})]})]})]}),r.jsx("div",{className:"w-full overflow-hidden",ref:o,children:r.jsx("div",{className:"flex gap-2.5",children:t.map((i,h)=>r.jsx(S.TournamentCounterItem,{index:h,tournament:i,className:t.length<2?"w-full":"w-full lg:w-[calc((100%-0.75rem)/2)]"},i.id))})})]})}exports.TournamentCounter=w;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import x from "embla-carousel-react";
|
|
4
4
|
import b from "next/link";
|
|
5
|
-
import { useCallback as
|
|
5
|
+
import { useCallback as n, useState as a, useEffect as S } from "react";
|
|
6
6
|
import "@opexa/portal-sdk-core";
|
|
7
7
|
import "@tanstack/react-query";
|
|
8
8
|
import "tiny-invariant";
|
|
@@ -27,6 +27,7 @@ import "../../ui/Badge/Badge.mjs";
|
|
|
27
27
|
import { Button as c } from "../../ui/Button/Button.mjs";
|
|
28
28
|
import "../../ui/Checkbox/Checkbox.mjs";
|
|
29
29
|
import "../../ui/Clipboard/Clipboard.mjs";
|
|
30
|
+
import "../../ui/Collapsible/Collapsible.mjs";
|
|
30
31
|
import "../../ui/DatePicker/DatePicker.mjs";
|
|
31
32
|
import "../../ui/Dialog/Dialog.mjs";
|
|
32
33
|
import "../../ui/Drawer/Drawer.mjs";
|
|
@@ -34,45 +35,47 @@ import "../../ui/Field/Field.mjs";
|
|
|
34
35
|
import "@ark-ui/react";
|
|
35
36
|
import "../../ui/IconButton/iconButton.recipe.mjs";
|
|
36
37
|
import "../../ui/NumberInput/NumberInput.mjs";
|
|
38
|
+
import "../../ui/PasswordInput/PasswordInput.mjs";
|
|
37
39
|
import "../../ui/PinInput/PinInput.mjs";
|
|
38
40
|
import "../../ui/Popover/Popover.mjs";
|
|
39
41
|
import "tailwind-merge";
|
|
42
|
+
import "../../ui/Progress/Progress.mjs";
|
|
40
43
|
import "../../ui/SegmentGroup/SegmentGroup.mjs";
|
|
41
44
|
import "../../ui/Select/Select.mjs";
|
|
42
45
|
import "../../ui/Table/Table.mjs";
|
|
43
46
|
import "../../ui/Tabs/Tabs.mjs";
|
|
44
47
|
import { TournamentCounterItem as I } from "./TournamentCounterItem.mjs";
|
|
45
|
-
function
|
|
46
|
-
var
|
|
48
|
+
function be(l) {
|
|
49
|
+
var s;
|
|
47
50
|
const [p, e] = x({
|
|
48
51
|
align: "start",
|
|
49
52
|
slidesToScroll: 1
|
|
50
|
-
}), d =
|
|
53
|
+
}), d = n(() => {
|
|
51
54
|
e && e.scrollPrev();
|
|
52
|
-
}, [e]), f =
|
|
55
|
+
}, [e]), f = n(() => {
|
|
53
56
|
e && e.scrollNext();
|
|
54
|
-
}, [e]), [u, h] = a(!1), [N,
|
|
55
|
-
e && (h(e.canScrollPrev()),
|
|
57
|
+
}, [e]), [u, h] = a(!1), [N, v] = a(!1), o = n(() => {
|
|
58
|
+
e && (h(e.canScrollPrev()), v(e.canScrollNext()));
|
|
56
59
|
}, [e]);
|
|
57
60
|
S(() => {
|
|
58
|
-
e && (
|
|
59
|
-
}, [e,
|
|
60
|
-
const m = ((
|
|
61
|
+
e && (o(), e.on("select", o), e.on("reInit", o));
|
|
62
|
+
}, [e, o]);
|
|
63
|
+
const m = ((s = C({
|
|
61
64
|
first: 100,
|
|
62
65
|
filter: {
|
|
63
66
|
status: {
|
|
64
67
|
equal: "ACTIVE"
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
|
-
}).data) == null ? void 0 :
|
|
68
|
-
return m.length <= 0 ? null : /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */ r("div", { className: "text-lg font-semibold", children:
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
70
|
+
}).data) == null ? void 0 : s.pages[0].edges.map((i) => i.node)) ?? [];
|
|
71
|
+
return m.length <= 0 ? null : /* @__PURE__ */ t("div", { className: l.className, children: [
|
|
72
|
+
/* @__PURE__ */ t("div", { className: "mb-3 flex items-center justify-between md:mb-4", children: [
|
|
73
|
+
/* @__PURE__ */ r("div", { className: "text-lg font-semibold", children: l.heading ?? "Tournaments" }),
|
|
74
|
+
/* @__PURE__ */ t("div", { className: "flex items-center md:gap-3xl", children: [
|
|
75
|
+
/* @__PURE__ */ t(
|
|
73
76
|
b,
|
|
74
77
|
{
|
|
75
|
-
href:
|
|
78
|
+
href: l.viewAllUrl ?? "/tournaments",
|
|
76
79
|
className: "flex gap-sm text-sm font-semibold",
|
|
77
80
|
children: [
|
|
78
81
|
"See All",
|
|
@@ -80,7 +83,7 @@ function ge(i) {
|
|
|
80
83
|
]
|
|
81
84
|
}
|
|
82
85
|
),
|
|
83
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ t("div", { className: "hidden lg:flex", children: [
|
|
84
87
|
/* @__PURE__ */ r(
|
|
85
88
|
c,
|
|
86
89
|
{
|
|
@@ -108,17 +111,17 @@ function ge(i) {
|
|
|
108
111
|
] })
|
|
109
112
|
] })
|
|
110
113
|
] }),
|
|
111
|
-
/* @__PURE__ */ r("div", { className: "w-full overflow-hidden", ref: p, children: /* @__PURE__ */ r("div", { className: "flex gap-2.5", children: m.map((
|
|
114
|
+
/* @__PURE__ */ r("div", { className: "w-full overflow-hidden", ref: p, children: /* @__PURE__ */ r("div", { className: "flex gap-2.5", children: m.map((i, g) => /* @__PURE__ */ r(
|
|
112
115
|
I,
|
|
113
116
|
{
|
|
114
|
-
index:
|
|
115
|
-
tournament:
|
|
117
|
+
index: g,
|
|
118
|
+
tournament: i,
|
|
116
119
|
className: m.length < 2 ? "w-full" : "w-full lg:w-[calc((100%-0.75rem)/2)]"
|
|
117
120
|
},
|
|
118
|
-
|
|
121
|
+
i.id
|
|
119
122
|
)) }) })
|
|
120
123
|
] });
|
|
121
124
|
}
|
|
122
125
|
export {
|
|
123
|
-
|
|
126
|
+
be as TournamentCounter
|
|
124
127
|
};
|
|
@@ -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"),j=require("@ark-ui/react"),l=require("@date-fns/tz");require("@opexa/portal-sdk-core");const o=require("date-fns"),x=require("react");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");const c=require("../../utils/capitalize.js"),m=require("../../utils/formatNumber.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../utils/parseDecimal.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const w=require("../../client/hooks/useDepositRecordsQuery.js");require("../../client/hooks/useGlobalStore.js");const y=require("../../client/hooks/useInfiniteQueryHelper.js"),P=require("../../client/hooks/useLocaleInfo.js");require("usehooks-ts");const H=require("../../icons/ChevronDownIcon.js"),F=require("../../icons/ChevronLeftIcon.js"),L=require("../../icons/ChevronRightIcon.js"),O=require("../../icons/File02Icon.js"),M=require("../../icons/SpinnerIcon.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");const p=require("../../ui/Badge/Badge.js");require("../../ui/Button/button.recipe.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");require("../../ui/Field/Field.js");const q=require("../../ui/IconButton/IconButton.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");const n=require("../../ui/Select/Select.js"),i=require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");const A=require("../Empty/Empty.js"),k=require("./TableFilters.js");function B(){const[s,N]=x.useState(),[d,b]=x.useState(),t=P.useLocaleInfo(),{page:f,pageSize:C,hasNextPage:v,hasPrevPage:I,next:S,prev:z,rows:u,setPageSize:D,totalPages:T,loading:a,firstPage:R}=y.useInfiniteQueryHelper(w.useDepositRecordsQuery,{filter:{...d&&{status:{equal:d}},...s&&{dateTimeCreated:{...s.start&&{greaterThanOrEqual:new l.TZDateMini(o.startOfDay(s.start),t.timezone).toISOString()},...s.end&&{lesserThanOrEqual:new l.TZDateMini(o.endOfDay(s.end),t.timezone).toISOString()}}}}});return e.jsxs(e.Fragment,{children:[e.jsx(k.TableFilters,{enabledFilters:{depositStatus:!0},value:{timestamp:s,depositStatus:d},onChange:r=>{R(),N(r.timestamp),b(r.depositStatus)}}),u.length<=0&&e.jsx(A.Empty,{icon:a?M.SpinnerIcon:O.File02Icon,title:a?"Just a moment":"No data",message:a?"Fetching latest deposit records...":"No data is currently available.",className:"mt-5xl"}),u.length>=1&&e.jsxs("div",{className:"border-border-primary -ml-4 mt-3xl w-dvw border-y lg:-ml-0 lg:w-full lg:rounded-xl lg:border-x",children:[e.jsx("div",{className:"border-border-primary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-xl rounded-b-none border-b",children:e.jsxs(i.Root,{className:"border-0",children:[e.jsx(i.Header,{children:e.jsxs(i.Row,{children:[e.jsx(i.Heading,{children:"Deposit No."}),e.jsx(i.Heading,{children:"Reference"}),e.jsx(i.Heading,{children:"Deposit Method"}),e.jsx(i.Heading,{children:"Applied Amount"}),e.jsx(i.Heading,{children:"Recieved Amount"}),e.jsx(i.Heading,{children:"Transaction Fee"}),e.jsx(i.Heading,{children:"Deposit Time"}),e.jsx(i.Heading,{children:"Recieved Time"}),e.jsx(i.Heading,{children:"Status"})]})}),e.jsx(i.Body,{children:u.map(r=>e.jsxs(i.Row,{children:[e.jsx(i.Cell,{className:"!py-1",children:r.depositNumber}),e.jsx(i.Cell,{className:"!py-1",children:r.reference}),e.jsx(i.Cell,{className:"!py-1",children:c.capitalize(r.type,{delimiter:c.capitalize.delimiters.UNDERSCORE})}),e.jsx(i.Cell,{className:"!py-1",children:m.formatNumber(r.amount,{currency:t.currency.code,minDecimalPlaces:2})}),e.jsx(i.Cell,{className:"!py-1",children:m.formatNumber(r.netAmount,{currency:t.currency.code,minDecimalPlaces:2})}),e.jsx(i.Cell,{className:"!py-1",children:m.formatNumber(r.fee,{currency:t.currency.code,minDecimalPlaces:2})}),e.jsxs(i.Cell,{className:"!py-1",children:[e.jsx("div",{className:"leading-tight",children:o.format(r.dateTimeCreated,"MM/dd/yyyy",{in:l.tz(t.timezone)})}),e.jsx("div",{className:"text-text-tertiary-600 leading-tight",children:o.format(r.dateTimeCreated,"hh:mm a",{in:l.tz(t.timezone)})})]}),e.jsx(i.Cell,{className:"!py-1",children:(r.status==="CONFIRMED"||r.status==="APPROVED")&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"leading-tight",children:o.format(r.dateTimeLastUpdated,"MM/dd/yyyy",{in:l.tz(t.timezone)})}),e.jsx("div",{className:"text-text-tertiary-600 leading-tight",children:o.format(r.dateTimeLastUpdated,"hh:mm a",{in:l.tz(t.timezone)})})]})}),e.jsx(i.Cell,{className:"!py-1",children:e.jsx(p.Root,{variant:"subtle",colorScheme:r.status==="FAILED"||r.status==="REJECTED"||r.status==="CANCELLED"?"danger":r.status==="PENDING"?"warning":"success",children:e.jsx(p.Label,{children:c.capitalize(r.status,{delimiter:c.capitalize.delimiters.UNDERSCORE})})})})]},r.id))})]})}),e.jsxs("div",{className:"flex items-center gap-lg px-4 py-3",children:[e.jsxs("p",{className:"text-text-secondary-700 order-2 grow text-center text-sm font-medium lg:order-none lg:grow-0",children:["Page ",f," of ",T]}),e.jsx("div",{className:"hidden grow lg:block"}),e.jsx(n.Root,{size:"sm",value:[C.toString()],onValueChange:r=>{const g=parseInt(r.value[0]),E=isNaN(g)?10:g;D(E)},collection:h,lazyMount:!0,className:"hidden lg:block",children:e.jsxs(n.Trigger,{children:[e.jsx(n.ValueText,{}),e.jsx(n.Indicator,{asChild:!0,children:e.jsx(H.ChevronDownIcon,{})}),e.jsx(j.Portal,{children:e.jsx(n.Positioner,{children:e.jsx(n.Content,{children:h.items.map(r=>e.jsx(n.Item,{item:r,children:h.stringifyItem(r)},r))})})})]})}),e.jsxs("div",{className:"contents lg:flex",children:[e.jsx(q.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",className:"order-1 lg:order-none lg:rounded-r-none lg:border-r-0",disabled:!I||a,onClick:()=>z(),children:e.jsx(F.ChevronLeftIcon,{className:"size-5"})}),e.jsx(q.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",className:"order-3 lg:order-none lg:rounded-l-none",disabled:!v||a,onClick:()=>S(),children:e.jsx(L.ChevronRightIcon,{className:"size-5"})})]})]})]})]})}const h=j.createListCollection({items:y.useInfiniteQueryHelper.config.pageSizes,itemToValue:s=>s.toString(),itemToString:s=>`${s} items per page`});exports.DepositRecordsTable=B;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as t, Fragment as
|
|
2
|
-
import { createListCollection as F, Portal as
|
|
3
|
-
import { TZDateMini as
|
|
1
|
+
import { jsxs as t, Fragment as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { createListCollection as F, Portal as M } from "@ark-ui/react";
|
|
3
|
+
import { TZDateMini as y, tz as s } from "@date-fns/tz";
|
|
4
4
|
import "@opexa/portal-sdk-core";
|
|
5
|
-
import { endOfDay as A, startOfDay as
|
|
6
|
-
import { useState as
|
|
5
|
+
import { endOfDay as A, startOfDay as k, format as a } from "date-fns";
|
|
6
|
+
import { useState as N } from "react";
|
|
7
7
|
import "@tanstack/react-query";
|
|
8
8
|
import "tiny-invariant";
|
|
9
9
|
import "../../constants/index.mjs";
|
|
10
|
-
import { capitalize as
|
|
11
|
-
import { formatNumber as
|
|
10
|
+
import { capitalize as c } from "../../utils/capitalize.mjs";
|
|
11
|
+
import { formatNumber as h } from "../../utils/formatNumber.mjs";
|
|
12
12
|
import "../../utils/getLocaleInfo.mjs";
|
|
13
13
|
import "../../utils/getQueryClient.mjs";
|
|
14
14
|
import "../../utils/isMobile.mjs";
|
|
@@ -17,13 +17,13 @@ import "lodash-es";
|
|
|
17
17
|
import "@opexa/portal-sdk-core/object-id";
|
|
18
18
|
import { useDepositRecordsQuery as q } from "../../client/hooks/useDepositRecordsQuery.mjs";
|
|
19
19
|
import "../../client/hooks/useGlobalStore.mjs";
|
|
20
|
-
import { useInfiniteQueryHelper as
|
|
21
|
-
import { useLocaleInfo as
|
|
20
|
+
import { useInfiniteQueryHelper as x } from "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
21
|
+
import { useLocaleInfo as U } from "../../client/hooks/useLocaleInfo.mjs";
|
|
22
22
|
import "usehooks-ts";
|
|
23
|
-
import { ChevronDownIcon as
|
|
24
|
-
import { ChevronLeftIcon as
|
|
25
|
-
import { ChevronRightIcon as
|
|
26
|
-
import { File02Icon as
|
|
23
|
+
import { ChevronDownIcon as V } from "../../icons/ChevronDownIcon.mjs";
|
|
24
|
+
import { ChevronLeftIcon as H } from "../../icons/ChevronLeftIcon.mjs";
|
|
25
|
+
import { ChevronRightIcon as $ } from "../../icons/ChevronRightIcon.mjs";
|
|
26
|
+
import { File02Icon as j } from "../../icons/File02Icon.mjs";
|
|
27
27
|
import { SpinnerIcon as B } from "../../icons/SpinnerIcon.mjs";
|
|
28
28
|
import "../../ui/AlertDialog/AlertDialog.mjs";
|
|
29
29
|
import "../../ui/Avatar/Avatar.mjs";
|
|
@@ -31,60 +31,63 @@ import { Root as J, Label as Q } from "../../ui/Badge/Badge.mjs";
|
|
|
31
31
|
import "../../ui/Button/button.recipe.mjs";
|
|
32
32
|
import "../../ui/Checkbox/Checkbox.mjs";
|
|
33
33
|
import "../../ui/Clipboard/Clipboard.mjs";
|
|
34
|
+
import "../../ui/Collapsible/Collapsible.mjs";
|
|
34
35
|
import "../../ui/DatePicker/DatePicker.mjs";
|
|
35
36
|
import "../../ui/Dialog/Dialog.mjs";
|
|
36
37
|
import "../../ui/Drawer/Drawer.mjs";
|
|
37
38
|
import "../../ui/Field/Field.mjs";
|
|
38
|
-
import { IconButton as
|
|
39
|
+
import { IconButton as b } from "../../ui/IconButton/IconButton.mjs";
|
|
39
40
|
import "../../ui/NumberInput/NumberInput.mjs";
|
|
41
|
+
import "../../ui/PasswordInput/PasswordInput.mjs";
|
|
40
42
|
import "../../ui/PinInput/PinInput.mjs";
|
|
41
43
|
import "../../ui/Popover/Popover.mjs";
|
|
42
44
|
import "tailwind-merge";
|
|
45
|
+
import "../../ui/Progress/Progress.mjs";
|
|
43
46
|
import "../../ui/SegmentGroup/SegmentGroup.mjs";
|
|
44
47
|
import { Root as G, Trigger as Z, ValueText as K, Indicator as W, Positioner as X, Content as Y, Item as _ } from "../../ui/Select/Select.mjs";
|
|
45
|
-
import { Root as ee, Header as re, Row as
|
|
48
|
+
import { Root as ee, Header as re, Row as v, Heading as n, Body as te, Cell as l } from "../../ui/Table/Table.mjs";
|
|
46
49
|
import "../../ui/Tabs/Tabs.mjs";
|
|
47
|
-
import { Empty as
|
|
50
|
+
import { Empty as ie } from "../Empty/Empty.mjs";
|
|
48
51
|
import { TableFilters as oe } from "./TableFilters.mjs";
|
|
49
|
-
function
|
|
50
|
-
const [i,
|
|
51
|
-
page:
|
|
52
|
-
pageSize:
|
|
53
|
-
hasNextPage:
|
|
54
|
-
hasPrevPage:
|
|
55
|
-
next:
|
|
52
|
+
function tr() {
|
|
53
|
+
const [i, S] = N(), [d, C] = N(), o = U(), {
|
|
54
|
+
page: D,
|
|
55
|
+
pageSize: R,
|
|
56
|
+
hasNextPage: T,
|
|
57
|
+
hasPrevPage: z,
|
|
58
|
+
next: I,
|
|
56
59
|
prev: E,
|
|
57
|
-
rows:
|
|
60
|
+
rows: p,
|
|
58
61
|
setPageSize: P,
|
|
59
|
-
totalPages:
|
|
60
|
-
loading:
|
|
61
|
-
firstPage:
|
|
62
|
-
} =
|
|
62
|
+
totalPages: w,
|
|
63
|
+
loading: m,
|
|
64
|
+
firstPage: O
|
|
65
|
+
} = x(q, {
|
|
63
66
|
filter: {
|
|
64
|
-
...
|
|
67
|
+
...d && {
|
|
65
68
|
status: {
|
|
66
|
-
equal:
|
|
69
|
+
equal: d
|
|
67
70
|
}
|
|
68
71
|
},
|
|
69
72
|
...i && {
|
|
70
73
|
dateTimeCreated: {
|
|
71
74
|
...i.start && {
|
|
72
|
-
greaterThanOrEqual: new
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
greaterThanOrEqual: new y(
|
|
76
|
+
k(i.start),
|
|
77
|
+
o.timezone
|
|
75
78
|
).toISOString()
|
|
76
79
|
},
|
|
77
80
|
...i.end && {
|
|
78
|
-
lesserThanOrEqual: new
|
|
81
|
+
lesserThanOrEqual: new y(
|
|
79
82
|
A(i.end),
|
|
80
|
-
|
|
83
|
+
o.timezone
|
|
81
84
|
).toISOString()
|
|
82
85
|
}
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
});
|
|
87
|
-
return /* @__PURE__ */ t(
|
|
90
|
+
return /* @__PURE__ */ t(f, { children: [
|
|
88
91
|
/* @__PURE__ */ e(
|
|
89
92
|
oe,
|
|
90
93
|
{
|
|
@@ -93,120 +96,131 @@ function _e() {
|
|
|
93
96
|
},
|
|
94
97
|
value: {
|
|
95
98
|
timestamp: i,
|
|
96
|
-
depositStatus:
|
|
99
|
+
depositStatus: d
|
|
97
100
|
},
|
|
98
101
|
onChange: (r) => {
|
|
99
|
-
|
|
102
|
+
O(), S(r.timestamp), C(r.depositStatus);
|
|
100
103
|
}
|
|
101
104
|
}
|
|
102
105
|
),
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
p.length <= 0 && /* @__PURE__ */ e(
|
|
107
|
+
ie,
|
|
105
108
|
{
|
|
106
|
-
icon:
|
|
107
|
-
title:
|
|
108
|
-
message:
|
|
109
|
-
className: "mt-
|
|
109
|
+
icon: m ? B : j,
|
|
110
|
+
title: m ? "Just a moment" : "No data",
|
|
111
|
+
message: m ? "Fetching latest deposit records..." : "No data is currently available.",
|
|
112
|
+
className: "mt-5xl"
|
|
110
113
|
}
|
|
111
114
|
),
|
|
112
|
-
|
|
113
|
-
/* @__PURE__ */ e("div", { className: "border-
|
|
114
|
-
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ t(
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
/* @__PURE__ */ e(
|
|
117
|
-
/* @__PURE__ */ e(
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
-
/* @__PURE__ */ e(
|
|
120
|
-
/* @__PURE__ */ e(
|
|
121
|
-
/* @__PURE__ */ e(
|
|
122
|
-
/* @__PURE__ */ e(
|
|
123
|
-
/* @__PURE__ */ e(
|
|
115
|
+
p.length >= 1 && /* @__PURE__ */ t("div", { className: "border-border-primary -ml-4 mt-3xl w-dvw border-y lg:-ml-0 lg:w-full lg:rounded-xl lg:border-x", children: [
|
|
116
|
+
/* @__PURE__ */ e("div", { className: "border-border-primary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-xl rounded-b-none border-b", children: /* @__PURE__ */ t(ee, { className: "border-0", children: [
|
|
117
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ t(v, { children: [
|
|
118
|
+
/* @__PURE__ */ e(n, { children: "Deposit No." }),
|
|
119
|
+
/* @__PURE__ */ e(n, { children: "Reference" }),
|
|
120
|
+
/* @__PURE__ */ e(n, { children: "Deposit Method" }),
|
|
121
|
+
/* @__PURE__ */ e(n, { children: "Applied Amount" }),
|
|
122
|
+
/* @__PURE__ */ e(n, { children: "Recieved Amount" }),
|
|
123
|
+
/* @__PURE__ */ e(n, { children: "Transaction Fee" }),
|
|
124
|
+
/* @__PURE__ */ e(n, { children: "Deposit Time" }),
|
|
125
|
+
/* @__PURE__ */ e(n, { children: "Recieved Time" }),
|
|
126
|
+
/* @__PURE__ */ e(n, { children: "Status" })
|
|
124
127
|
] }) }),
|
|
125
|
-
/* @__PURE__ */ e(
|
|
126
|
-
/* @__PURE__ */ e(
|
|
127
|
-
/* @__PURE__ */ e(
|
|
128
|
-
/* @__PURE__ */ e(
|
|
129
|
-
delimiter:
|
|
128
|
+
/* @__PURE__ */ e(te, { children: p.map((r) => /* @__PURE__ */ t(v, { children: [
|
|
129
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: r.depositNumber }),
|
|
130
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: r.reference }),
|
|
131
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: c(r.type, {
|
|
132
|
+
delimiter: c.delimiters.UNDERSCORE
|
|
130
133
|
}) }),
|
|
131
|
-
/* @__PURE__ */ e(
|
|
132
|
-
currency:
|
|
134
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: h(r.amount, {
|
|
135
|
+
currency: o.currency.code,
|
|
133
136
|
minDecimalPlaces: 2
|
|
134
137
|
}) }),
|
|
135
|
-
/* @__PURE__ */ e(
|
|
136
|
-
currency:
|
|
138
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: h(r.netAmount, {
|
|
139
|
+
currency: o.currency.code,
|
|
137
140
|
minDecimalPlaces: 2
|
|
138
141
|
}) }),
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
-
currency:
|
|
142
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: h(r.fee, {
|
|
143
|
+
currency: o.currency.code,
|
|
141
144
|
minDecimalPlaces: 2
|
|
142
145
|
}) }),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
/* @__PURE__ */ t(l, { className: "!py-1", children: [
|
|
147
|
+
/* @__PURE__ */ e("div", { className: "leading-tight", children: a(r.dateTimeCreated, "MM/dd/yyyy", {
|
|
148
|
+
in: s(o.timezone)
|
|
149
|
+
}) }),
|
|
150
|
+
/* @__PURE__ */ e("div", { className: "text-text-tertiary-600 leading-tight", children: a(r.dateTimeCreated, "hh:mm a", {
|
|
151
|
+
in: s(o.timezone)
|
|
152
|
+
}) })
|
|
153
|
+
] }),
|
|
154
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: (r.status === "CONFIRMED" || r.status === "APPROVED") && /* @__PURE__ */ t(f, { children: [
|
|
155
|
+
/* @__PURE__ */ e("div", { className: "leading-tight", children: a(r.dateTimeLastUpdated, "MM/dd/yyyy", {
|
|
156
|
+
in: s(o.timezone)
|
|
157
|
+
}) }),
|
|
158
|
+
/* @__PURE__ */ e("div", { className: "text-text-tertiary-600 leading-tight", children: a(r.dateTimeLastUpdated, "hh:mm a", {
|
|
159
|
+
in: s(o.timezone)
|
|
160
|
+
}) })
|
|
161
|
+
] }) }),
|
|
162
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: /* @__PURE__ */ e(
|
|
150
163
|
J,
|
|
151
164
|
{
|
|
152
165
|
variant: "subtle",
|
|
153
166
|
colorScheme: r.status === "FAILED" || r.status === "REJECTED" || r.status === "CANCELLED" ? "danger" : r.status === "PENDING" ? "warning" : "success",
|
|
154
|
-
children: /* @__PURE__ */ e(Q, { children:
|
|
155
|
-
delimiter:
|
|
167
|
+
children: /* @__PURE__ */ e(Q, { children: c(r.status, {
|
|
168
|
+
delimiter: c.delimiters.UNDERSCORE
|
|
156
169
|
}) })
|
|
157
170
|
}
|
|
158
171
|
) })
|
|
159
172
|
] }, r.id)) })
|
|
160
173
|
] }) }),
|
|
161
174
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-lg px-4 py-3", children: [
|
|
162
|
-
/* @__PURE__ */ t("p", { children: [
|
|
175
|
+
/* @__PURE__ */ t("p", { className: "text-text-secondary-700 order-2 grow text-center text-sm font-medium lg:order-none lg:grow-0", children: [
|
|
163
176
|
"Page ",
|
|
164
|
-
|
|
177
|
+
D,
|
|
165
178
|
" of ",
|
|
166
|
-
|
|
179
|
+
w
|
|
167
180
|
] }),
|
|
168
|
-
/* @__PURE__ */ e("div", { className: "grow" }),
|
|
181
|
+
/* @__PURE__ */ e("div", { className: "hidden grow lg:block" }),
|
|
169
182
|
/* @__PURE__ */ e(
|
|
170
183
|
G,
|
|
171
184
|
{
|
|
172
185
|
size: "sm",
|
|
173
|
-
value: [
|
|
186
|
+
value: [R.toString()],
|
|
174
187
|
onValueChange: (r) => {
|
|
175
|
-
const
|
|
176
|
-
P(
|
|
188
|
+
const u = parseInt(r.value[0]), L = isNaN(u) ? 10 : u;
|
|
189
|
+
P(L);
|
|
177
190
|
},
|
|
178
|
-
collection:
|
|
191
|
+
collection: g,
|
|
179
192
|
lazyMount: !0,
|
|
193
|
+
className: "hidden lg:block",
|
|
180
194
|
children: /* @__PURE__ */ t(Z, { children: [
|
|
181
195
|
/* @__PURE__ */ e(K, {}),
|
|
182
|
-
/* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e(
|
|
183
|
-
/* @__PURE__ */ e(
|
|
196
|
+
/* @__PURE__ */ e(W, { asChild: !0, children: /* @__PURE__ */ e(V, {}) }),
|
|
197
|
+
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(Y, { children: g.items.map((r) => /* @__PURE__ */ e(_, { item: r, children: g.stringifyItem(r) }, r)) }) }) })
|
|
184
198
|
] })
|
|
185
199
|
}
|
|
186
200
|
),
|
|
187
|
-
/* @__PURE__ */ t("div", { children: [
|
|
201
|
+
/* @__PURE__ */ t("div", { className: "contents lg:flex", children: [
|
|
188
202
|
/* @__PURE__ */ e(
|
|
189
|
-
|
|
203
|
+
b,
|
|
190
204
|
{
|
|
191
205
|
size: "sm",
|
|
192
206
|
variant: "outline",
|
|
193
207
|
colorScheme: "gray",
|
|
194
|
-
className: "rounded-r-none border-r-0",
|
|
195
|
-
disabled: !
|
|
208
|
+
className: "order-1 lg:order-none lg:rounded-r-none lg:border-r-0",
|
|
209
|
+
disabled: !z || m,
|
|
196
210
|
onClick: () => E(),
|
|
197
|
-
children: /* @__PURE__ */ e(
|
|
211
|
+
children: /* @__PURE__ */ e(H, { className: "size-5" })
|
|
198
212
|
}
|
|
199
213
|
),
|
|
200
214
|
/* @__PURE__ */ e(
|
|
201
|
-
|
|
215
|
+
b,
|
|
202
216
|
{
|
|
203
217
|
size: "sm",
|
|
204
218
|
variant: "outline",
|
|
205
219
|
colorScheme: "gray",
|
|
206
|
-
className: "rounded-l-none",
|
|
207
|
-
disabled: !
|
|
208
|
-
onClick: () =>
|
|
209
|
-
children: /* @__PURE__ */ e(
|
|
220
|
+
className: "order-3 lg:order-none lg:rounded-l-none",
|
|
221
|
+
disabled: !T || m,
|
|
222
|
+
onClick: () => I(),
|
|
223
|
+
children: /* @__PURE__ */ e($, { className: "size-5" })
|
|
210
224
|
}
|
|
211
225
|
)
|
|
212
226
|
] })
|
|
@@ -214,11 +228,11 @@ function _e() {
|
|
|
214
228
|
] })
|
|
215
229
|
] });
|
|
216
230
|
}
|
|
217
|
-
const
|
|
218
|
-
items:
|
|
231
|
+
const g = F({
|
|
232
|
+
items: x.config.pageSizes,
|
|
219
233
|
itemToValue: (i) => i.toString(),
|
|
220
234
|
itemToString: (i) => `${i} items per page`
|
|
221
235
|
});
|
|
222
236
|
export {
|
|
223
|
-
|
|
237
|
+
tr as DepositRecordsTable
|
|
224
238
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DepositStatus, GameProvider, GameType, WithdrawalStatus } from '@opexa/portal-sdk-core';
|
|
1
|
+
import { DepositStatus, GameProvider, GameType, TransactionType, WithdrawalStatus } from '@opexa/portal-sdk-core';
|
|
2
2
|
import { DateRange } from '../../types';
|
|
3
3
|
interface EnabledFilters {
|
|
4
4
|
timestamp?: boolean;
|
|
@@ -6,6 +6,7 @@ interface EnabledFilters {
|
|
|
6
6
|
gameProvider?: boolean;
|
|
7
7
|
depositStatus?: boolean;
|
|
8
8
|
withdrawalStatus?: boolean;
|
|
9
|
+
transactionType?: boolean;
|
|
9
10
|
}
|
|
10
11
|
interface Value {
|
|
11
12
|
timestamp?: Partial<DateRange> | null;
|
|
@@ -13,6 +14,7 @@ interface Value {
|
|
|
13
14
|
gameProvider?: GameProvider | null;
|
|
14
15
|
depositStatus?: DepositStatus | null;
|
|
15
16
|
withdrawalStatus?: WithdrawalStatus | null;
|
|
17
|
+
transactionType?: TransactionType | null;
|
|
16
18
|
}
|
|
17
19
|
interface TableFiltersProps {
|
|
18
20
|
value?: Value;
|