@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,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
3
|
-
import { Portal as
|
|
3
|
+
import { Portal as l } from "@ark-ui/react";
|
|
4
4
|
import r from "next/image";
|
|
5
5
|
import { useRef as a } from "react";
|
|
6
6
|
import s from "../../images/pagcor.png.mjs";
|
|
@@ -11,6 +11,7 @@ import "../../ui/Badge/Badge.mjs";
|
|
|
11
11
|
import { Button as c } from "../../ui/Button/Button.mjs";
|
|
12
12
|
import "../../ui/Checkbox/Checkbox.mjs";
|
|
13
13
|
import "../../ui/Clipboard/Clipboard.mjs";
|
|
14
|
+
import "../../ui/Collapsible/Collapsible.mjs";
|
|
14
15
|
import "../../ui/DatePicker/DatePicker.mjs";
|
|
15
16
|
import { Root as p, Backdrop as f, Positioner as u, Content as d, Title as g, Description as x } from "../../ui/Dialog/Dialog.mjs";
|
|
16
17
|
import "../../ui/Drawer/Drawer.mjs";
|
|
@@ -23,15 +24,17 @@ import "../../utils/getQueryClient.mjs";
|
|
|
23
24
|
import "../../utils/isMobile.mjs";
|
|
24
25
|
import "../../ui/IconButton/iconButton.recipe.mjs";
|
|
25
26
|
import "../../ui/NumberInput/NumberInput.mjs";
|
|
27
|
+
import "../../ui/PasswordInput/PasswordInput.mjs";
|
|
26
28
|
import "../../ui/PinInput/PinInput.mjs";
|
|
27
29
|
import "../../ui/Popover/Popover.mjs";
|
|
28
30
|
import "tailwind-merge";
|
|
31
|
+
import "../../ui/Progress/Progress.mjs";
|
|
29
32
|
import "../../ui/SegmentGroup/SegmentGroup.mjs";
|
|
30
33
|
import "../../ui/Select/Select.mjs";
|
|
31
34
|
import "../../ui/Table/Table.mjs";
|
|
32
35
|
import "../../ui/Tabs/Tabs.mjs";
|
|
33
36
|
import { useDisclaimer as h } from "./useDisclaimer.mjs";
|
|
34
|
-
function
|
|
37
|
+
function $(m) {
|
|
35
38
|
const o = h(), i = a(null);
|
|
36
39
|
return /* @__PURE__ */ t(
|
|
37
40
|
p,
|
|
@@ -42,13 +45,13 @@ function Y(l) {
|
|
|
42
45
|
closeOnEscape: !1,
|
|
43
46
|
closeOnInteractOutside: !1,
|
|
44
47
|
initialFocusEl: () => i.current,
|
|
45
|
-
children: /* @__PURE__ */ e(
|
|
48
|
+
children: /* @__PURE__ */ e(l, { children: [
|
|
46
49
|
/* @__PURE__ */ t(f, {}),
|
|
47
|
-
/* @__PURE__ */ t(u, { children: /* @__PURE__ */ e(d, { className: "flex h-full w-full flex-col items-start
|
|
50
|
+
/* @__PURE__ */ t(u, { children: /* @__PURE__ */ e(d, { className: "flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [
|
|
48
51
|
/* @__PURE__ */ t(
|
|
49
52
|
r,
|
|
50
53
|
{
|
|
51
|
-
src:
|
|
54
|
+
src: m.logo,
|
|
52
55
|
alt: "",
|
|
53
56
|
width: 200,
|
|
54
57
|
height: 100,
|
|
@@ -58,14 +61,14 @@ function Y(l) {
|
|
|
58
61
|
),
|
|
59
62
|
/* @__PURE__ */ e("div", { className: "w-full grow", children: [
|
|
60
63
|
/* @__PURE__ */ t(g, { className: "mt-3xl text-center text-lg font-semibold", children: "Age Verification" }),
|
|
61
|
-
/* @__PURE__ */ e(x, { className: "text-
|
|
64
|
+
/* @__PURE__ */ e(x, { className: "text-text-tertiary-600 mt-xs text-center text-sm", children: [
|
|
62
65
|
"By entering this website I acknowledge and confirmI am 21 years of age and I agree with the",
|
|
63
66
|
" ",
|
|
64
67
|
/* @__PURE__ */ t(
|
|
65
68
|
"button",
|
|
66
69
|
{
|
|
67
70
|
type: "button",
|
|
68
|
-
className: "text-
|
|
71
|
+
className: "text-brand-400 underline underline-offset-2",
|
|
69
72
|
children: "Terms and Conditions."
|
|
70
73
|
}
|
|
71
74
|
)
|
|
@@ -107,5 +110,5 @@ function Y(l) {
|
|
|
107
110
|
);
|
|
108
111
|
}
|
|
109
112
|
export {
|
|
110
|
-
|
|
113
|
+
$ as Disclaimer
|
|
111
114
|
};
|
|
@@ -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"),l=require("./CloudIcon.js");function s(t){return e.jsxs("div",{role:"alert","aria-live":"polite",className:t.className,children:[e.jsxs("div",{className:"relative mx-auto w-[9.5rem] pt-4",children:[e.jsx("div",{className:"bg-utility-gray-200 absolute left-1/2 top-0 size-[6.5rem] -translate-x-1/2 rounded-full"}),e.jsx(l.CloudIcon,{className:"relative h-auto w-full shrink-0"}),e.jsx("div",{className:"bg-utility-gray-200/40 absolute bottom-2 left-1/2 flex size-12 -translate-x-1/2 items-center justify-center rounded-full backdrop-blur-sm",children:e.jsx(t.icon,{className:"size-6 text-white"})}),e.jsx("div",{className:"bg-utility-gray-200 absolute left-4 top-3.5 size-2.5 rounded-full"}),e.jsx("div",{className:"bg-utility-gray-200 absolute bottom-0.5 left-3 size-3.5 rounded-full"}),e.jsx("div",{className:"bg-utility-gray-200 absolute right-3.5 top-1 size-2 rounded-full"}),e.jsx("div",{className:"bg-utility-gray-200 absolute right-0 top-6.5 size-3.5 rounded-full"})]}),e.jsx("h2",{className:"mt-xl text-center font-semibold",children:t.title}),e.jsx("p",{className:"text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm",children:t.message})]})}exports.Empty=s;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { CloudIcon as
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */ e("div", { className: "bg-gray-
|
|
7
|
-
/* @__PURE__ */ e(
|
|
8
|
-
/* @__PURE__ */ e("div", { className: "bg-gray-
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { CloudIcon as a } from "./CloudIcon.mjs";
|
|
3
|
+
function r(t) {
|
|
4
|
+
return /* @__PURE__ */ l("div", { role: "alert", "aria-live": "polite", className: t.className, children: [
|
|
5
|
+
/* @__PURE__ */ l("div", { className: "relative mx-auto w-[9.5rem] pt-4", children: [
|
|
6
|
+
/* @__PURE__ */ e("div", { className: "bg-utility-gray-200 absolute left-1/2 top-0 size-[6.5rem] -translate-x-1/2 rounded-full" }),
|
|
7
|
+
/* @__PURE__ */ e(a, { className: "relative h-auto w-full shrink-0" }),
|
|
8
|
+
/* @__PURE__ */ e("div", { className: "bg-utility-gray-200/40 absolute bottom-2 left-1/2 flex size-12 -translate-x-1/2 items-center justify-center rounded-full backdrop-blur-sm", children: /* @__PURE__ */ e(t.icon, { className: "size-6 text-white" }) }),
|
|
9
|
+
/* @__PURE__ */ e("div", { className: "bg-utility-gray-200 absolute left-4 top-3.5 size-2.5 rounded-full" }),
|
|
10
|
+
/* @__PURE__ */ e("div", { className: "bg-utility-gray-200 absolute bottom-0.5 left-3 size-3.5 rounded-full" }),
|
|
11
|
+
/* @__PURE__ */ e("div", { className: "bg-utility-gray-200 absolute right-3.5 top-1 size-2 rounded-full" }),
|
|
12
|
+
/* @__PURE__ */ e("div", { className: "bg-utility-gray-200 absolute right-0 top-6.5 size-3.5 rounded-full" })
|
|
9
13
|
] }),
|
|
10
14
|
/* @__PURE__ */ e("h2", { className: "mt-xl text-center font-semibold", children: t.title }),
|
|
11
|
-
/* @__PURE__ */ e("p", { className: "text-
|
|
15
|
+
/* @__PURE__ */ e("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: t.message })
|
|
12
16
|
] });
|
|
13
17
|
}
|
|
14
18
|
export {
|
|
15
|
-
|
|
19
|
+
r as Empty
|
|
16
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("@ark-ui/react"),p=require("next/image"),I=require("react"),L=require("zustand/shallow");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");const g=require("../../client/hooks/useDisclosure.js"),N=require("../../client/hooks/useEndGameSessionMutation.js"),y=require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const z=require("../../icons/AlertCircleIcon.js"),b=require("../../icons/ChevronLeftIcon.js"),j=require("../../icons/Expand03Icon.js"),f=require("../../icons/SpinnerIcon.js"),G=require("../../icons/Wallet02Icon.js"),q=require("../../icons/XIcon.js"),i=require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const u=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");const l=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");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");function O(d){var h;const m=I.useRef(null),t=g.useDisclosure({defaultOpen:!0,onOpenChange(r){r||setTimeout(()=>{var x;(x=m.current)==null||x.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})},25)}}),n=g.useDisclosure(),c=N.useEndGameSessionMutation(),s=y.useGlobalStore(L.useShallow(r=>({gameLaunch:r.gameLaunch,depositWithdrawal:r.depositWithdrawal})));async function o(){s.gameLaunch.details.status==="PLAYING"&&await c.mutateAsync({game:s.gameLaunch.details.game,session:s.gameLaunch.details.session}),t.setOpen(!0),s.gameLaunch.setDetails({status:"WAITING",session:null,game:null})}return e.jsxs(e.Fragment,{children:[e.jsxs(a.Presence,{ref:m,present:s.gameLaunch.details.status!=="WAITING"&&!t.open,lazyMount:!0,unmountOnExit:s.gameLaunch.details.status==="WAITING",className:"border-border-primary bg-bg-primary-alt w-full overflow-hidden rounded-lg border ui-open:animate-fade-in ui-closed:animate-fade-out",children:[e.jsxs("section",{className:"aspect-[960/540] w-full",children:[s.gameLaunch.details.status==="LOADING"&&e.jsx("div",{className:"flex size-full items-center justify-center",children:e.jsx(f.SpinnerIcon,{className:"size-8"})}),s.gameLaunch.details.status==="FAILED"&&e.jsx("div",{}),s.gameLaunch.details.status==="PLAYING"&&e.jsx("iframe",{src:((h=s.gameLaunch.details.session)==null?void 0:h.launchUrl)??"",className:"size-full"})]}),e.jsxs("section",{className:"border-border-primary flex justify-end gap-lg border-t p-2",children:[e.jsx(l.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",onClick:()=>{if(s.gameLaunch.details.status!=="PLAYING"){o();return}n.setOpen(!0)},disabled:s.gameLaunch.details.status==="LOADING","aria-label":"Quit Game",title:"Quit",children:e.jsx(q.XIcon,{className:"size-5"})}),e.jsx(l.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",onClick:()=>t.setOpen(!0),title:"Maximize","aria-label":"Maximize",children:e.jsx(j.Expand03Icon,{className:"size-5"})})]})]}),e.jsx(a.Dialog.Root,{open:s.gameLaunch.details.status!=="WAITING"&&t.open&&!n.open,lazyMount:!0,closeOnEscape:!1,closeOnInteractOutside:!1,children:e.jsx(a.Portal,{children:e.jsx(a.Dialog.Positioner,{className:"z-dialog fixed inset-0",children:e.jsxs(a.Dialog.Content,{className:"ui-open:animate-dialog-in ui-closed:animate-dialog-out bg-bg-primary-alt flex size-full flex-col",children:[e.jsxs("section",{className:"grid grid-cols-[22rem_auto_22rem] items-center px-4 py-2",children:[e.jsx("div",{className:"flex items-center justify-start gap-2",children:e.jsx(l.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",onClick:()=>{if(s.gameLaunch.details.status!=="PLAYING"){o();return}n.setOpen(!0)},disabled:s.gameLaunch.details.status==="LOADING",title:"Quit","aria-label":"Quit Game",children:e.jsx(b.ChevronLeftIcon,{className:"size-5"})})}),e.jsx("div",{className:"flex items-center justify-center",children:!!d.logo&&e.jsx(p,{src:d.logo,height:40,width:80,alt:"",className:"h-9 w-auto shrink-0"})}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(u.Button,{size:"sm",fullWidth:!1,onClick:()=>{s.depositWithdrawal.setOpen(!0)},children:[e.jsx(G.Wallet02Icon,{className:"size-5"}),"Wallet"]}),e.jsx(l.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",onClick:()=>t.setOpen(!1),title:"Minimize","aria-label":"Minimize",children:e.jsx(j.Expand03Icon,{className:"size-5"})})]})]}),e.jsxs("section",{className:"grow",children:[s.gameLaunch.details.status==="LOADING"&&e.jsx("div",{className:"flex size-full items-center justify-center",children:e.jsx(f.SpinnerIcon,{className:"size-8"})}),s.gameLaunch.details.status==="FAILED"&&e.jsx("div",{}),s.gameLaunch.details.status==="PLAYING"&&e.jsx("iframe",{src:s.gameLaunch.details.session.launchUrl??"",className:"size-full"})]})]})})})}),e.jsx(i.Root,{role:"alertdialog",open:n.open,onOpenChange:r=>{n.setOpen(r.open)},lazyMount:!0,closeOnEscape:!1,closeOnInteractOutside:!1,children:e.jsxs(a.Portal,{children:[e.jsx(i.Backdrop,{}),e.jsx(i.Positioner,{children:e.jsxs(i.Content,{children:[e.jsxs(i.Header,{children:[e.jsx("div",{className:"bg-error-700/25 text-error-200 flex size-12 items-center justify-center rounded-full",children:e.jsx(z.AlertCircleIcon,{})}),e.jsx(i.CloseTrigger,{children:e.jsx(q.XIcon,{})})]}),e.jsxs(i.Body,{children:[e.jsx(i.Title,{children:"Quit Game"}),e.jsx(i.Description,{children:"Are you sure you want to quit?"})]}),e.jsx(i.Context,{children:r=>e.jsxs(i.Footer,{children:[e.jsx(u.Button,{variant:"outline",colorScheme:"gray",disabled:c.isPending,onClick:()=>{r.setOpen(!1)},children:"Cancel"}),e.jsx(u.Button,{colorScheme:"danger",disabled:c.isPending,onClick:async()=>{await o(),r.setOpen(!1)},children:"Proceed"})]})})]})})]})})]})}exports.GameLaunch=O;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as t, Fragment as z, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { Presence as y, Dialog as c, Portal as f } from "@ark-ui/react";
|
|
4
|
-
import
|
|
5
|
-
import { useRef as
|
|
6
|
-
import { useShallow as
|
|
4
|
+
import b from "next/image";
|
|
5
|
+
import { useRef as O } from "react";
|
|
6
|
+
import { useShallow as G } from "zustand/shallow";
|
|
7
7
|
import "@opexa/portal-sdk-core";
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "tiny-invariant";
|
|
@@ -16,7 +16,7 @@ import "../../utils/isMobile.mjs";
|
|
|
16
16
|
import "lodash-es";
|
|
17
17
|
import "@opexa/portal-sdk-core/object-id";
|
|
18
18
|
import { useDisclosure as g } from "../../client/hooks/useDisclosure.mjs";
|
|
19
|
-
import { useEndGameSessionMutation as
|
|
19
|
+
import { useEndGameSessionMutation as x } from "../../client/hooks/useEndGameSessionMutation.mjs";
|
|
20
20
|
import { useGlobalStore as A } from "../../client/hooks/useGlobalStore.mjs";
|
|
21
21
|
import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
22
22
|
import "usehooks-ts";
|
|
@@ -26,28 +26,31 @@ import { Expand03Icon as N } from "../../icons/Expand03Icon.mjs";
|
|
|
26
26
|
import { SpinnerIcon as L } from "../../icons/SpinnerIcon.mjs";
|
|
27
27
|
import { Wallet02Icon as w } from "../../icons/Wallet02Icon.mjs";
|
|
28
28
|
import { XIcon as I } from "../../icons/XIcon.mjs";
|
|
29
|
-
import { Root as
|
|
29
|
+
import { Root as S, Backdrop as D, Positioner as P, Content as k, Header as W, CloseTrigger as j, Body as M, Title as E, Description as T, Context as Q, Footer as Y } from "../../ui/AlertDialog/AlertDialog.mjs";
|
|
30
30
|
import "../../ui/Avatar/Avatar.mjs";
|
|
31
31
|
import "../../ui/Badge/Badge.mjs";
|
|
32
32
|
import { Button as m } from "../../ui/Button/Button.mjs";
|
|
33
33
|
import "../../ui/Checkbox/Checkbox.mjs";
|
|
34
34
|
import "../../ui/Clipboard/Clipboard.mjs";
|
|
35
|
+
import "../../ui/Collapsible/Collapsible.mjs";
|
|
35
36
|
import "../../ui/DatePicker/DatePicker.mjs";
|
|
36
37
|
import "../../ui/Dialog/Dialog.mjs";
|
|
37
38
|
import "../../ui/Drawer/Drawer.mjs";
|
|
38
39
|
import "../../ui/Field/Field.mjs";
|
|
39
|
-
import { IconButton as
|
|
40
|
+
import { IconButton as o } from "../../ui/IconButton/IconButton.mjs";
|
|
40
41
|
import "../../ui/NumberInput/NumberInput.mjs";
|
|
42
|
+
import "../../ui/PasswordInput/PasswordInput.mjs";
|
|
41
43
|
import "../../ui/PinInput/PinInput.mjs";
|
|
42
44
|
import "../../ui/Popover/Popover.mjs";
|
|
43
45
|
import "tailwind-merge";
|
|
46
|
+
import "../../ui/Progress/Progress.mjs";
|
|
44
47
|
import "../../ui/SegmentGroup/SegmentGroup.mjs";
|
|
45
48
|
import "../../ui/Select/Select.mjs";
|
|
46
49
|
import "../../ui/Table/Table.mjs";
|
|
47
50
|
import "../../ui/Tabs/Tabs.mjs";
|
|
48
|
-
function
|
|
51
|
+
function Me(u) {
|
|
49
52
|
var p;
|
|
50
|
-
const d =
|
|
53
|
+
const d = O(null), s = g({
|
|
51
54
|
defaultOpen: !0,
|
|
52
55
|
onOpenChange(a) {
|
|
53
56
|
a || setTimeout(() => {
|
|
@@ -59,14 +62,14 @@ function ke(u) {
|
|
|
59
62
|
});
|
|
60
63
|
}, 25);
|
|
61
64
|
}
|
|
62
|
-
}),
|
|
63
|
-
|
|
65
|
+
}), r = g(), l = x(), i = A(
|
|
66
|
+
G((a) => ({
|
|
64
67
|
gameLaunch: a.gameLaunch,
|
|
65
68
|
depositWithdrawal: a.depositWithdrawal
|
|
66
69
|
}))
|
|
67
70
|
);
|
|
68
|
-
async function
|
|
69
|
-
i.gameLaunch.details.status === "PLAYING" && await
|
|
71
|
+
async function n() {
|
|
72
|
+
i.gameLaunch.details.status === "PLAYING" && await l.mutateAsync({
|
|
70
73
|
game: i.gameLaunch.details.game,
|
|
71
74
|
session: i.gameLaunch.details.session
|
|
72
75
|
}), s.setOpen(!0), i.gameLaunch.setDetails({
|
|
@@ -83,7 +86,7 @@ function ke(u) {
|
|
|
83
86
|
present: i.gameLaunch.details.status !== "WAITING" && !s.open,
|
|
84
87
|
lazyMount: !0,
|
|
85
88
|
unmountOnExit: i.gameLaunch.details.status === "WAITING",
|
|
86
|
-
className: "border-
|
|
89
|
+
className: "border-border-primary bg-bg-primary-alt w-full overflow-hidden rounded-lg border ui-open:animate-fade-in ui-closed:animate-fade-out",
|
|
87
90
|
children: [
|
|
88
91
|
/* @__PURE__ */ t("section", { className: "aspect-[960/540] w-full", children: [
|
|
89
92
|
i.gameLaunch.details.status === "LOADING" && /* @__PURE__ */ e("div", { className: "flex size-full items-center justify-center", children: /* @__PURE__ */ e(L, { className: "size-8" }) }),
|
|
@@ -96,19 +99,19 @@ function ke(u) {
|
|
|
96
99
|
}
|
|
97
100
|
)
|
|
98
101
|
] }),
|
|
99
|
-
/* @__PURE__ */ t("section", { className: "border-
|
|
102
|
+
/* @__PURE__ */ t("section", { className: "border-border-primary flex justify-end gap-lg border-t p-2", children: [
|
|
100
103
|
/* @__PURE__ */ e(
|
|
101
|
-
|
|
104
|
+
o,
|
|
102
105
|
{
|
|
103
106
|
size: "sm",
|
|
104
107
|
variant: "outline",
|
|
105
108
|
colorScheme: "gray",
|
|
106
109
|
onClick: () => {
|
|
107
110
|
if (i.gameLaunch.details.status !== "PLAYING") {
|
|
108
|
-
|
|
111
|
+
n();
|
|
109
112
|
return;
|
|
110
113
|
}
|
|
111
|
-
|
|
114
|
+
r.setOpen(!0);
|
|
112
115
|
},
|
|
113
116
|
disabled: i.gameLaunch.details.status === "LOADING",
|
|
114
117
|
"aria-label": "Quit Game",
|
|
@@ -117,7 +120,7 @@ function ke(u) {
|
|
|
117
120
|
}
|
|
118
121
|
),
|
|
119
122
|
/* @__PURE__ */ e(
|
|
120
|
-
|
|
123
|
+
o,
|
|
121
124
|
{
|
|
122
125
|
size: "sm",
|
|
123
126
|
variant: "outline",
|
|
@@ -135,24 +138,24 @@ function ke(u) {
|
|
|
135
138
|
/* @__PURE__ */ e(
|
|
136
139
|
c.Root,
|
|
137
140
|
{
|
|
138
|
-
open: i.gameLaunch.details.status !== "WAITING" && s.open && !
|
|
141
|
+
open: i.gameLaunch.details.status !== "WAITING" && s.open && !r.open,
|
|
139
142
|
lazyMount: !0,
|
|
140
143
|
closeOnEscape: !1,
|
|
141
144
|
closeOnInteractOutside: !1,
|
|
142
|
-
children: /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(c.Positioner, { className: "z-dialog fixed inset-0", children: /* @__PURE__ */ t(c.Content, { className: "ui-open:animate-dialog-in ui-closed:animate-dialog-out flex size-full flex-col
|
|
145
|
+
children: /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(c.Positioner, { className: "z-dialog fixed inset-0", children: /* @__PURE__ */ t(c.Content, { className: "ui-open:animate-dialog-in ui-closed:animate-dialog-out bg-bg-primary-alt flex size-full flex-col", children: [
|
|
143
146
|
/* @__PURE__ */ t("section", { className: "grid grid-cols-[22rem_auto_22rem] items-center px-4 py-2", children: [
|
|
144
147
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-start gap-2", children: /* @__PURE__ */ e(
|
|
145
|
-
|
|
148
|
+
o,
|
|
146
149
|
{
|
|
147
150
|
size: "sm",
|
|
148
151
|
variant: "outline",
|
|
149
152
|
colorScheme: "gray",
|
|
150
153
|
onClick: () => {
|
|
151
154
|
if (i.gameLaunch.details.status !== "PLAYING") {
|
|
152
|
-
|
|
155
|
+
n();
|
|
153
156
|
return;
|
|
154
157
|
}
|
|
155
|
-
|
|
158
|
+
r.setOpen(!0);
|
|
156
159
|
},
|
|
157
160
|
disabled: i.gameLaunch.details.status === "LOADING",
|
|
158
161
|
title: "Quit",
|
|
@@ -161,7 +164,7 @@ function ke(u) {
|
|
|
161
164
|
}
|
|
162
165
|
) }),
|
|
163
166
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: !!u.logo && /* @__PURE__ */ e(
|
|
164
|
-
|
|
167
|
+
b,
|
|
165
168
|
{
|
|
166
169
|
src: u.logo,
|
|
167
170
|
height: 40,
|
|
@@ -186,7 +189,7 @@ function ke(u) {
|
|
|
186
189
|
}
|
|
187
190
|
),
|
|
188
191
|
/* @__PURE__ */ e(
|
|
189
|
-
|
|
192
|
+
o,
|
|
190
193
|
{
|
|
191
194
|
size: "sm",
|
|
192
195
|
variant: "outline",
|
|
@@ -214,34 +217,34 @@ function ke(u) {
|
|
|
214
217
|
}
|
|
215
218
|
),
|
|
216
219
|
/* @__PURE__ */ e(
|
|
217
|
-
|
|
220
|
+
S,
|
|
218
221
|
{
|
|
219
222
|
role: "alertdialog",
|
|
220
|
-
open:
|
|
223
|
+
open: r.open,
|
|
221
224
|
onOpenChange: (a) => {
|
|
222
|
-
|
|
225
|
+
r.setOpen(a.open);
|
|
223
226
|
},
|
|
224
227
|
lazyMount: !0,
|
|
225
228
|
closeOnEscape: !1,
|
|
226
229
|
closeOnInteractOutside: !1,
|
|
227
230
|
children: /* @__PURE__ */ t(f, { children: [
|
|
228
|
-
/* @__PURE__ */ e(
|
|
231
|
+
/* @__PURE__ */ e(D, {}),
|
|
229
232
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ t(k, { children: [
|
|
230
|
-
/* @__PURE__ */ t(
|
|
231
|
-
/* @__PURE__ */ e("div", { className: "flex size-12 items-center justify-center rounded-full
|
|
232
|
-
/* @__PURE__ */ e(
|
|
233
|
+
/* @__PURE__ */ t(W, { children: [
|
|
234
|
+
/* @__PURE__ */ e("div", { className: "bg-error-700/25 text-error-200 flex size-12 items-center justify-center rounded-full", children: /* @__PURE__ */ e(v, {}) }),
|
|
235
|
+
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(I, {}) })
|
|
233
236
|
] }),
|
|
234
|
-
/* @__PURE__ */ t(
|
|
235
|
-
/* @__PURE__ */ e(
|
|
237
|
+
/* @__PURE__ */ t(M, { children: [
|
|
238
|
+
/* @__PURE__ */ e(E, { children: "Quit Game" }),
|
|
236
239
|
/* @__PURE__ */ e(T, { children: "Are you sure you want to quit?" })
|
|
237
240
|
] }),
|
|
238
|
-
/* @__PURE__ */ e(
|
|
241
|
+
/* @__PURE__ */ e(Q, { children: (a) => /* @__PURE__ */ t(Y, { children: [
|
|
239
242
|
/* @__PURE__ */ e(
|
|
240
243
|
m,
|
|
241
244
|
{
|
|
242
245
|
variant: "outline",
|
|
243
246
|
colorScheme: "gray",
|
|
244
|
-
disabled:
|
|
247
|
+
disabled: l.isPending,
|
|
245
248
|
onClick: () => {
|
|
246
249
|
a.setOpen(!1);
|
|
247
250
|
},
|
|
@@ -252,9 +255,9 @@ function ke(u) {
|
|
|
252
255
|
m,
|
|
253
256
|
{
|
|
254
257
|
colorScheme: "danger",
|
|
255
|
-
disabled:
|
|
258
|
+
disabled: l.isPending,
|
|
256
259
|
onClick: async () => {
|
|
257
|
-
await
|
|
260
|
+
await n(), a.setOpen(!1);
|
|
258
261
|
},
|
|
259
262
|
children: "Proceed"
|
|
260
263
|
}
|
|
@@ -267,5 +270,5 @@ function ke(u) {
|
|
|
267
270
|
] });
|
|
268
271
|
}
|
|
269
272
|
export {
|
|
270
|
-
|
|
273
|
+
Me as GameLaunch
|
|
271
274
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),w=require("embla-carousel-react"),j=require("next/image"),v=require("next/link"),i=require("react"),S=require("tailwind-merge");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");const y=require("../../client/hooks/useGamesQuery.js");require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const b=require("../../icons/ArrowLeftIcon.js"),P=require("../../icons/ArrowRightIcon.js"),k=require("../../icons/ChevronRightIcon.js"),I=require("../../icons/SpinnerIcon.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const o=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/DatePicker/DatePicker.js");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("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");require("zustand/shallow");const C=require("../GameLaunch/GameLaunchTrigger.js");function B(n){var l;const a=n.numOfRows??1,t=y.useGamesQuery({first:(a+1)*6,filter:n.filter}),u=((l=t.data)==null?void 0:l.pages.map(s=>s.edges.map(N=>N.node)).flat())??[],[d,e]=w({align:"start",slidesToScroll:3,breakpoints:{"(min-width: 1024px)":{slidesToScroll:6}}}),[q,g]=i.useState(!0),[x,m]=i.useState(!0),h=i.useCallback(()=>e==null?void 0:e.scrollPrev(),[e]),f=i.useCallback(async()=>{!(e!=null&&e.canScrollNext())&&t.hasNextPage&&(await t.fetchNextPage(),e==null||e.reInit(),await new Promise(s=>setTimeout(s,1))),e==null||e.scrollNext()},[e,t]),c=i.useCallback(s=>{g(!(s!=null&&s.canScrollPrev())),m(!(s!=null&&s.canScrollNext()))},[]);return i.useEffect(()=>{e&&(c(e),e.on("reInit",c).on("select",c))},[e,c]),r.jsxs("div",{className:n.className,children:[r.jsxs("div",{className:"flex items-center",children:[r.jsx("h2",{className:"text-lg font-semibold",children:n.heading??"Games"}),r.jsx("div",{className:"grow"}),r.jsxs("div",{className:"flex items-center justify-center gap-xl",children:[r.jsxs(v,{href:n.viewAllUrl??"/games",className:"text-button-tertiary-fg flex gap-sm text-sm font-semibold",children:["See All",r.jsx(k.ChevronRightIcon,{className:"size-5 lg:hidden"})]}),r.jsxs("div",{className:"hidden lg:flex",children:[r.jsx(o.Button,{variant:"outline",colorScheme:"gray",className:"rounded-r-none border-r-0",onClick:h,disabled:q,"aria-label":"Previous",children:r.jsx(b.ArrowLeftIcon,{className:"size-5"})}),r.jsx(o.Button,{variant:"outline",colorScheme:"gray",className:"rounded-l-none",onClick:f,disabled:x&&!t.hasNextPage?!0:t.isFetchingNextPage,"aria-label":"Next",children:t.isFetchingNextPage?r.jsx(I.SpinnerIcon,{className:"size-5"}):r.jsx(P.ArrowRightIcon,{className:"size-5"})})]})]})]}),r.jsx("div",{ref:d,className:"relative mt-lg lg:overflow-hidden",children:r.jsx("div",{className:S.twMerge("grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md",a===3?"grid-rows-3":a===2?"grid-rows-2":"grid-rows-1"),children:u.map(s=>r.jsxs(C.GameLaunchTrigger,{game:s,className:"block w-full shadow-sm",children:[r.jsx(j,{src:s.image,alt:"",width:200,height:200,priority:!0,className:"aspect-square w-full rounded-t-md object-cover"}),r.jsx("span",{className:"bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold",children:s.name})]},s.id))})})]})}exports.Games__client=B;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as i, jsx as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useState as
|
|
7
|
-
import { twMerge as
|
|
2
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import y from "embla-carousel-react";
|
|
4
|
+
import P from "next/image";
|
|
5
|
+
import S from "next/link";
|
|
6
|
+
import { useState as c, useCallback as a, useEffect as k } from "react";
|
|
7
|
+
import { twMerge as b } from "tailwind-merge";
|
|
8
8
|
import "@opexa/portal-sdk-core";
|
|
9
9
|
import "@tanstack/react-query";
|
|
10
10
|
import "tiny-invariant";
|
|
@@ -16,12 +16,12 @@ 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 { useGamesQuery as
|
|
19
|
+
import { useGamesQuery as B } from "../../client/hooks/useGamesQuery.mjs";
|
|
20
20
|
import "../../client/hooks/useGlobalStore.mjs";
|
|
21
21
|
import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
22
22
|
import "usehooks-ts";
|
|
23
|
-
import { ArrowLeftIcon as
|
|
24
|
-
import { ArrowRightIcon as
|
|
23
|
+
import { ArrowLeftIcon as C } from "../../icons/ArrowLeftIcon.mjs";
|
|
24
|
+
import { ArrowRightIcon as I } from "../../icons/ArrowRightIcon.mjs";
|
|
25
25
|
import { ChevronRightIcon as R } from "../../icons/ChevronRightIcon.mjs";
|
|
26
26
|
import { SpinnerIcon as j } from "../../icons/SpinnerIcon.mjs";
|
|
27
27
|
import "../../ui/AlertDialog/AlertDialog.mjs";
|
|
@@ -30,6 +30,7 @@ import "../../ui/Badge/Badge.mjs";
|
|
|
30
30
|
import { Button as d } from "../../ui/Button/Button.mjs";
|
|
31
31
|
import "../../ui/Checkbox/Checkbox.mjs";
|
|
32
32
|
import "../../ui/Clipboard/Clipboard.mjs";
|
|
33
|
+
import "../../ui/Collapsible/Collapsible.mjs";
|
|
33
34
|
import "../../ui/DatePicker/DatePicker.mjs";
|
|
34
35
|
import "../../ui/Dialog/Dialog.mjs";
|
|
35
36
|
import "../../ui/Drawer/Drawer.mjs";
|
|
@@ -37,20 +38,22 @@ import "../../ui/Field/Field.mjs";
|
|
|
37
38
|
import "@ark-ui/react";
|
|
38
39
|
import "../../ui/IconButton/iconButton.recipe.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";
|
|
44
|
+
import "../../ui/Progress/Progress.mjs";
|
|
42
45
|
import "../../ui/SegmentGroup/SegmentGroup.mjs";
|
|
43
46
|
import "../../ui/Select/Select.mjs";
|
|
44
47
|
import "../../ui/Table/Table.mjs";
|
|
45
48
|
import "../../ui/Tabs/Tabs.mjs";
|
|
46
49
|
import "zustand/shallow";
|
|
47
50
|
import { GameLaunchTrigger as z } from "../GameLaunch/GameLaunchTrigger.mjs";
|
|
48
|
-
function
|
|
49
|
-
var
|
|
50
|
-
const
|
|
51
|
-
first: (
|
|
51
|
+
function Ce(s) {
|
|
52
|
+
var n;
|
|
53
|
+
const m = s.numOfRows ?? 1, o = B({
|
|
54
|
+
first: (m + 1) * 6,
|
|
52
55
|
filter: s.filter
|
|
53
|
-
}),
|
|
56
|
+
}), p = ((n = o.data) == null ? void 0 : n.pages.map((t) => t.edges.map((v) => v.node)).flat()) ?? [], [f, e] = y({
|
|
54
57
|
align: "start",
|
|
55
58
|
slidesToScroll: 3,
|
|
56
59
|
breakpoints: {
|
|
@@ -58,77 +61,77 @@ function ye(s) {
|
|
|
58
61
|
slidesToScroll: 6
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
|
-
}), [g, u] =
|
|
64
|
+
}), [g, u] = c(!0), [h, x] = c(!0), N = a(
|
|
62
65
|
() => e == null ? void 0 : e.scrollPrev(),
|
|
63
66
|
[e]
|
|
64
|
-
),
|
|
65
|
-
!(e != null && e.canScrollNext()) && o.hasNextPage && (await o.fetchNextPage(), e == null || e.reInit(), await new Promise((
|
|
66
|
-
}, [e, o]), l =
|
|
67
|
-
u(!(
|
|
67
|
+
), w = a(async () => {
|
|
68
|
+
!(e != null && e.canScrollNext()) && o.hasNextPage && (await o.fetchNextPage(), e == null || e.reInit(), await new Promise((t) => setTimeout(t, 1))), e == null || e.scrollNext();
|
|
69
|
+
}, [e, o]), l = a((t) => {
|
|
70
|
+
u(!(t != null && t.canScrollPrev())), x(!(t != null && t.canScrollNext()));
|
|
68
71
|
}, []);
|
|
69
|
-
return
|
|
72
|
+
return k(() => {
|
|
70
73
|
e && (l(e), e.on("reInit", l).on("select", l));
|
|
71
74
|
}, [e, l]), /* @__PURE__ */ i("div", { className: s.className, children: [
|
|
72
75
|
/* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ r("h2", { className: "text-lg font-semibold", children: s.heading ?? "Games" }),
|
|
77
|
+
/* @__PURE__ */ r("div", { className: "grow" }),
|
|
75
78
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-xl", children: [
|
|
76
79
|
/* @__PURE__ */ i(
|
|
77
|
-
|
|
80
|
+
S,
|
|
78
81
|
{
|
|
79
|
-
href: s.
|
|
80
|
-
className: "flex gap-sm text-sm font-semibold",
|
|
82
|
+
href: s.viewAllUrl ?? "/games",
|
|
83
|
+
className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold",
|
|
81
84
|
children: [
|
|
82
85
|
"See All",
|
|
83
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ r(R, { className: "size-5 lg:hidden" })
|
|
84
87
|
]
|
|
85
88
|
}
|
|
86
89
|
),
|
|
87
90
|
/* @__PURE__ */ i("div", { className: "hidden lg:flex", children: [
|
|
88
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ r(
|
|
89
92
|
d,
|
|
90
93
|
{
|
|
91
94
|
variant: "outline",
|
|
92
95
|
colorScheme: "gray",
|
|
93
96
|
className: "rounded-r-none border-r-0",
|
|
94
|
-
onClick:
|
|
97
|
+
onClick: N,
|
|
95
98
|
disabled: g,
|
|
96
99
|
"aria-label": "Previous",
|
|
97
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ r(C, { className: "size-5" })
|
|
98
101
|
}
|
|
99
102
|
),
|
|
100
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ r(
|
|
101
104
|
d,
|
|
102
105
|
{
|
|
103
106
|
variant: "outline",
|
|
104
107
|
colorScheme: "gray",
|
|
105
108
|
className: "rounded-l-none",
|
|
106
|
-
onClick:
|
|
109
|
+
onClick: w,
|
|
107
110
|
disabled: h && !o.hasNextPage ? !0 : o.isFetchingNextPage,
|
|
108
111
|
"aria-label": "Next",
|
|
109
|
-
children: o.isFetchingNextPage ? /* @__PURE__ */
|
|
112
|
+
children: o.isFetchingNextPage ? /* @__PURE__ */ r(j, { className: "size-5" }) : /* @__PURE__ */ r(I, { className: "size-5" })
|
|
110
113
|
}
|
|
111
114
|
)
|
|
112
115
|
] })
|
|
113
116
|
] })
|
|
114
117
|
] }),
|
|
115
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ r("div", { ref: f, className: "relative mt-lg lg:overflow-hidden", children: /* @__PURE__ */ r(
|
|
116
119
|
"div",
|
|
117
120
|
{
|
|
118
|
-
className:
|
|
121
|
+
className: b(
|
|
119
122
|
"grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md",
|
|
120
|
-
|
|
123
|
+
m === 3 ? "grid-rows-3" : m === 2 ? "grid-rows-2" : "grid-rows-1"
|
|
121
124
|
),
|
|
122
|
-
children:
|
|
125
|
+
children: p.map((t) => /* @__PURE__ */ i(
|
|
123
126
|
z,
|
|
124
127
|
{
|
|
125
|
-
game:
|
|
126
|
-
className: "block w-full",
|
|
128
|
+
game: t,
|
|
129
|
+
className: "block w-full shadow-sm",
|
|
127
130
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
|
|
131
|
+
/* @__PURE__ */ r(
|
|
132
|
+
P,
|
|
130
133
|
{
|
|
131
|
-
src:
|
|
134
|
+
src: t.image,
|
|
132
135
|
alt: "",
|
|
133
136
|
width: 200,
|
|
134
137
|
height: 200,
|
|
@@ -136,15 +139,15 @@ function ye(s) {
|
|
|
136
139
|
className: "aspect-square w-full rounded-t-md object-cover"
|
|
137
140
|
}
|
|
138
141
|
),
|
|
139
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ r("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: t.name })
|
|
140
143
|
]
|
|
141
144
|
},
|
|
142
|
-
|
|
145
|
+
t.id
|
|
143
146
|
))
|
|
144
147
|
}
|
|
145
148
|
) })
|
|
146
149
|
] });
|
|
147
150
|
}
|
|
148
151
|
export {
|
|
149
|
-
|
|
152
|
+
Ce as Games__client
|
|
150
153
|
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { GamesInput } from '@opexa/portal-sdk-core';
|
|
2
2
|
export interface GamesProps {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/** @default "Games" */
|
|
4
|
+
heading?: string;
|
|
5
|
+
/**
|
|
6
|
+
* @description URL for viewing all games
|
|
7
|
+
* @default "/games"
|
|
8
|
+
*/
|
|
9
|
+
viewAllUrl?: string;
|
|
5
10
|
/** @default 1 */
|
|
6
11
|
numOfRows?: 1 | 2 | 3;
|
|
7
12
|
className?: string;
|