@opexa/portal-components 0.0.20 → 0.0.22
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/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +3 -2
- package/dist/components/FavoriteGames/FavoriteGames.client.js +1 -1
- package/dist/components/FavoriteGames/FavoriteGames.client.mjs +43 -49
- package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +1 -0
- package/dist/components/GameLaunch/GameLaunchTrigger.js +1 -1
- package/dist/components/GameLaunch/GameLaunchTrigger.mjs +15 -17
- package/dist/components/GamesSearch/GamesSearchTrigger.d.ts +2 -1
- package/dist/components/GamesSearch/GamesSearchTrigger.js +1 -1
- package/dist/components/GamesSearch/GamesSearchTrigger.mjs +16 -24
- package/dist/components/Messages/MessagesTrigger.d.ts +6 -0
- package/dist/components/Messages/MessagesTrigger.js +1 -0
- package/dist/components/Messages/MessagesTrigger.mjs +42 -0
- package/dist/components/Messages/index.d.ts +1 -0
- package/dist/components/SignIn/SignInTrigger.d.ts +6 -0
- package/dist/components/SignIn/SignInTrigger.js +1 -0
- package/dist/components/SignIn/SignInTrigger.mjs +42 -0
- package/dist/components/SignIn/index.d.ts +1 -0
- package/dist/components/SignUp/SignUpTrigger.d.ts +6 -0
- package/dist/components/SignUp/SignUpTrigger.js +1 -0
- package/dist/components/SignUp/SignUpTrigger.mjs +42 -0
- package/dist/components/SignUp/index.d.ts +1 -0
- package/dist/components.js +1 -1
- package/dist/components.mjs +54 -48
- package/dist/icons/Announcement01Icon.d.ts +2 -0
- package/dist/icons/Announcement01Icon.js +1 -0
- package/dist/icons/Announcement01Icon.mjs +22 -0
- package/dist/icons/Diamond01Icon.d.ts +2 -0
- package/dist/icons/Diamond01Icon.js +1 -0
- package/dist/icons/Diamond01Icon.mjs +22 -0
- package/dist/icons/MarkerPin06Icon.d.ts +2 -0
- package/dist/icons/MarkerPin06Icon.js +1 -0
- package/dist/icons/MarkerPin06Icon.mjs +22 -0
- package/dist/icons/PiggyBank02Icon.d.ts +2 -0
- package/dist/icons/PiggyBank02Icon.js +1 -0
- package/dist/icons/PiggyBank02Icon.mjs +22 -0
- package/dist/icons/SearchRefractionIcon.d.ts +2 -0
- package/dist/icons/SearchRefractionIcon.js +1 -0
- package/dist/icons/SearchRefractionIcon.mjs +22 -0
- package/dist/icons/Target04Icon.d.ts +2 -0
- package/dist/icons/Target04Icon.js +1 -0
- package/dist/icons/Target04Icon.mjs +22 -0
- package/dist/icons/index.d.ts +6 -0
- package/dist/icons.js +1 -1
- package/dist/icons.mjs +96 -84
- package/dist/theme.css +2 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface DepositWithdrawalTriggerProps extends
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
export interface DepositWithdrawalTriggerProps extends ComponentPropsWithRef<'button'> {
|
|
3
|
+
asChild?: boolean;
|
|
3
4
|
}
|
|
4
5
|
export declare function DepositWithdrawalTrigger(props: DepositWithdrawalTriggerProps): import("react").JSX.Element;
|
|
@@ -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"),n=require("next/image"),o=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");const l=require("../../utils/getGameImageUrl.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../client/services/getSession.js");const c=require("../../client/hooks/useSessionQuery.js");require("react");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const d=require("../../client/hooks/useFavoriteGamesQuery.js");require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const m=require("../../client/hooks/useUnmarkGameAsFavoriteMutation.js"),q=require("../../icons/ArrowLeftIcon.js"),g=require("../../icons/ArrowRightIcon.js"),x=require("../../icons/Star01Icon.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/Combobox/Combobox.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 h=require("../GameLaunch/GameLaunchTrigger.js");function v(r){const i=d.useFavoriteGamesQuery().data??[];return i.length<=0?null:e.jsxs("div",{className:r.className,children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("h2",{className:"text-lg font-semibold",children:r.heading??"Favorite Games"}),e.jsx("div",{className:"grow"}),e.jsx("div",{className:"flex items-center justify-center gap-xl",children:e.jsxs("div",{className:"hidden lg:flex",children:[e.jsx(a.Button,{variant:"outline",colorScheme:"gray",className:"rounded-r-none border-r-0","aria-label":"Previous",children:e.jsx(q.ArrowLeftIcon,{className:"size-5"})}),e.jsx(a.Button,{variant:"outline",colorScheme:"gray",className:"rounded-l-none",children:e.jsx(g.ArrowRightIcon,{className:"size-5"})})]})})]}),e.jsx("div",{className:"relative mt-lg lg:overflow-hidden",children:e.jsx("div",{className:o.twMerge("grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col grid-rows-1 gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md"),children:i.map(s=>e.jsx(j,{game:s},s.id))})})]})}function j({game:r}){const i=c.useSessionQuery().data,s=m.useUnmarkGameAsFavoriteMutation();return e.jsxs(h.GameLaunchTrigger,{game:r,className:"relative block w-full shadow-sm",children:[(i==null?void 0:i.status)==="authenticated"&&e.jsx("div",{role:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),!s.isPending&&s.mutate(r.id)},"aria-disabled":s.isPending,className:"rounded-xs absolute right-2 top-2 flex size-9 items-center justify-center bg-black/65 blur-[0.5px]",children:e.jsx(x.Star01Icon,{className:"fill-yellow-400 text-yellow-400 size-5"})}),e.jsx(n,{src:l.getGameImageUrl({id:r.id,provider:r.provider}),alt:"",width:200,height:200,priority:!0,className:"aspect-square w-full rounded-t-md object-cover"}),e.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:r.name})]})}exports.FavoriteGames__client=v;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { twMerge as
|
|
2
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import l from "next/image";
|
|
4
|
+
import { twMerge as n } from "tailwind-merge";
|
|
5
5
|
import "@opexa/portal-sdk-core";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
7
|
import "tiny-invariant";
|
|
8
8
|
import "../../constants/index.mjs";
|
|
9
9
|
import "../../utils/capitalize.mjs";
|
|
10
10
|
import "../../utils/parseDecimal.mjs";
|
|
11
|
-
import { getGameImageUrl as
|
|
11
|
+
import { getGameImageUrl as c } from "../../utils/getGameImageUrl.mjs";
|
|
12
12
|
import "../../utils/getLocaleInfo.mjs";
|
|
13
13
|
import "../../utils/getQueryClient.mjs";
|
|
14
14
|
import "../../utils/isMobile.mjs";
|
|
15
15
|
import "../../client/services/getSession.mjs";
|
|
16
|
-
import { useSessionQuery as
|
|
16
|
+
import { useSessionQuery as p } from "../../client/hooks/useSessionQuery.mjs";
|
|
17
17
|
import "react";
|
|
18
18
|
import "lodash-es";
|
|
19
19
|
import "@opexa/portal-sdk-core/object-id";
|
|
20
|
-
import { useFavoriteGamesQuery as
|
|
20
|
+
import { useFavoriteGamesQuery as d } from "../../client/hooks/useFavoriteGamesQuery.mjs";
|
|
21
21
|
import "../../client/hooks/useGlobalStore.mjs";
|
|
22
22
|
import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
23
23
|
import "usehooks-ts";
|
|
24
|
-
import { useUnmarkGameAsFavoriteMutation as
|
|
25
|
-
import { ArrowLeftIcon as
|
|
26
|
-
import { ArrowRightIcon as
|
|
27
|
-
import { Star01Icon as
|
|
24
|
+
import { useUnmarkGameAsFavoriteMutation as u } from "../../client/hooks/useUnmarkGameAsFavoriteMutation.mjs";
|
|
25
|
+
import { ArrowLeftIcon as f } from "../../icons/ArrowLeftIcon.mjs";
|
|
26
|
+
import { ArrowRightIcon as g } from "../../icons/ArrowRightIcon.mjs";
|
|
27
|
+
import { Star01Icon as h } from "../../icons/Star01Icon.mjs";
|
|
28
28
|
import "../../ui/AlertDialog/AlertDialog.mjs";
|
|
29
29
|
import "../../ui/Avatar/Avatar.mjs";
|
|
30
30
|
import "../../ui/Badge/Badge.mjs";
|
|
31
|
-
import { Button as
|
|
31
|
+
import { Button as a } from "../../ui/Button/Button.mjs";
|
|
32
32
|
import "../../ui/Checkbox/Checkbox.mjs";
|
|
33
33
|
import "../../ui/Clipboard/Clipboard.mjs";
|
|
34
34
|
import "../../ui/Collapsible/Collapsible.mjs";
|
|
@@ -49,73 +49,67 @@ import "../../ui/Select/Select.mjs";
|
|
|
49
49
|
import "../../ui/Table/Table.mjs";
|
|
50
50
|
import "../../ui/Tabs/Tabs.mjs";
|
|
51
51
|
import "zustand/shallow";
|
|
52
|
-
import { GameLaunchTrigger as
|
|
53
|
-
function
|
|
54
|
-
const t =
|
|
55
|
-
return
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
63
|
-
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: r.heading ?? "Favorite Games" }),
|
|
64
|
-
/* @__PURE__ */ e("div", { className: "grow" }),
|
|
65
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-xl", children: /* @__PURE__ */ i("div", { className: "hidden lg:flex", children: [
|
|
66
|
-
/* @__PURE__ */ e(
|
|
67
|
-
s,
|
|
52
|
+
import { GameLaunchTrigger as v } from "../GameLaunch/GameLaunchTrigger.mjs";
|
|
53
|
+
function hr(e) {
|
|
54
|
+
const t = d().data ?? [];
|
|
55
|
+
return t.length <= 0 ? null : /* @__PURE__ */ o("div", { className: e.className, children: [
|
|
56
|
+
/* @__PURE__ */ o("div", { className: "flex items-center", children: [
|
|
57
|
+
/* @__PURE__ */ r("h2", { className: "text-lg font-semibold", children: e.heading ?? "Favorite Games" }),
|
|
58
|
+
/* @__PURE__ */ r("div", { className: "grow" }),
|
|
59
|
+
/* @__PURE__ */ r("div", { className: "flex items-center justify-center gap-xl", children: /* @__PURE__ */ o("div", { className: "hidden lg:flex", children: [
|
|
60
|
+
/* @__PURE__ */ r(
|
|
61
|
+
a,
|
|
68
62
|
{
|
|
69
63
|
variant: "outline",
|
|
70
64
|
colorScheme: "gray",
|
|
71
65
|
className: "rounded-r-none border-r-0",
|
|
72
66
|
"aria-label": "Previous",
|
|
73
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ r(f, { className: "size-5" })
|
|
74
68
|
}
|
|
75
69
|
),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
70
|
+
/* @__PURE__ */ r(
|
|
71
|
+
a,
|
|
78
72
|
{
|
|
79
73
|
variant: "outline",
|
|
80
74
|
colorScheme: "gray",
|
|
81
75
|
className: "rounded-l-none",
|
|
82
|
-
children: /* @__PURE__ */
|
|
76
|
+
children: /* @__PURE__ */ r(g, { className: "size-5" })
|
|
83
77
|
}
|
|
84
78
|
)
|
|
85
79
|
] }) })
|
|
86
80
|
] }),
|
|
87
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ r("div", { className: "relative mt-lg lg:overflow-hidden", children: /* @__PURE__ */ r(
|
|
88
82
|
"div",
|
|
89
83
|
{
|
|
90
|
-
className:
|
|
84
|
+
className: n(
|
|
91
85
|
"grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col grid-rows-1 gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md"
|
|
92
86
|
),
|
|
93
|
-
children:
|
|
87
|
+
children: t.map((i) => /* @__PURE__ */ r(x, { game: i }, i.id))
|
|
94
88
|
}
|
|
95
89
|
) })
|
|
96
90
|
] });
|
|
97
91
|
}
|
|
98
|
-
function
|
|
99
|
-
const t =
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
(t == null ? void 0 : t.status) === "authenticated" && /* @__PURE__ */
|
|
92
|
+
function x({ game: e }) {
|
|
93
|
+
const t = p().data, i = u();
|
|
94
|
+
return /* @__PURE__ */ o(v, { game: e, className: "relative block w-full shadow-sm", children: [
|
|
95
|
+
(t == null ? void 0 : t.status) === "authenticated" && /* @__PURE__ */ r(
|
|
102
96
|
"div",
|
|
103
97
|
{
|
|
104
98
|
role: "button",
|
|
105
|
-
onClick: (
|
|
106
|
-
|
|
99
|
+
onClick: (m) => {
|
|
100
|
+
m.preventDefault(), m.stopPropagation(), !i.isPending && i.mutate(e.id);
|
|
107
101
|
},
|
|
108
|
-
"aria-disabled":
|
|
102
|
+
"aria-disabled": i.isPending,
|
|
109
103
|
className: "rounded-xs absolute right-2 top-2 flex size-9 items-center justify-center bg-black/65 blur-[0.5px]",
|
|
110
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ r(h, { className: "fill-yellow-400 text-yellow-400 size-5" })
|
|
111
105
|
}
|
|
112
106
|
),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
|
|
107
|
+
/* @__PURE__ */ r(
|
|
108
|
+
l,
|
|
115
109
|
{
|
|
116
|
-
src:
|
|
117
|
-
id:
|
|
118
|
-
provider:
|
|
110
|
+
src: c({
|
|
111
|
+
id: e.id,
|
|
112
|
+
provider: e.provider
|
|
119
113
|
}),
|
|
120
114
|
alt: "",
|
|
121
115
|
width: 200,
|
|
@@ -124,9 +118,9 @@ function b({ game: r }) {
|
|
|
124
118
|
className: "aspect-square w-full rounded-t-md object-cover"
|
|
125
119
|
}
|
|
126
120
|
),
|
|
127
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__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: e.name })
|
|
128
122
|
] });
|
|
129
123
|
}
|
|
130
124
|
export {
|
|
131
|
-
|
|
125
|
+
hr as FavoriteGames__client
|
|
132
126
|
};
|
|
@@ -2,5 +2,6 @@ import { HTMLArkProps } from '@ark-ui/react';
|
|
|
2
2
|
import { FavoriteGame, Game } from '@opexa/portal-sdk-core';
|
|
3
3
|
export interface GameLaunchTriggerProps extends HTMLArkProps<'button'> {
|
|
4
4
|
game: Game | FavoriteGame;
|
|
5
|
+
asChild?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare function GameLaunchTrigger(props: GameLaunchTriggerProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),m=require("@ark-ui/react"),q=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("../../client/services/getSession.js");const d=require("../../client/hooks/useSessionQuery.js");require("react");require("lodash-es");const h=require("../../client/hooks/useCreateGameSessionMutation.js");require("@opexa/portal-sdk-core/object-id");const L=require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const G=require("../../client/utils/toaster.js");function I(e){var r,n;const u=d.useSessionQuery(),c=h.useCreateGameSessionMutation(),t=L.useGlobalStore(q.useShallow(a=>({signIn:a.signIn,gameLaunch:a.gameLaunch}))),l=((r=u.data)==null?void 0:r.status)==="unauthenticated"?!1:t.gameLaunch.details.status!=="WAITING"?!0:e.disabled;return g.jsx(m.ark.button,{type:"button",...e,onClick:async a=>{var i,o;if((i=e.onClick)==null||i.call(e,a),((o=u.data)==null?void 0:o.status)==="unauthenticated")return t.signIn.setOpen(!0);t.gameLaunch.setDetails({game:e.game,status:"LOADING",session:null});try{const s=await c.mutateAsync(e.game);t.gameLaunch.setDetails({game:e.game,session:s,status:"PLAYING"})}catch(s){t.gameLaunch.setDetails({game:e.game,session:null,status:"FAILED"}),G.toaster.error({description:s instanceof Error?s.message:"Failed to launch game"})}},disabled:l,"data-state":((n=u.data)==null?void 0:n.status)==="unauthenticated"?t.signIn.open?"open":"closed":t.gameLaunch.details.status==="WAITING"?"closed":"open"})}exports.GameLaunchTrigger=I;
|
|
@@ -7,37 +7,36 @@ import "@tanstack/react-query";
|
|
|
7
7
|
import "tiny-invariant";
|
|
8
8
|
import "../../constants/index.mjs";
|
|
9
9
|
import "../../utils/capitalize.mjs";
|
|
10
|
-
import { dataAttr as h } from "../../utils/dataAttr.mjs";
|
|
11
10
|
import "../../utils/parseDecimal.mjs";
|
|
12
11
|
import "../../utils/getLocaleInfo.mjs";
|
|
13
12
|
import "../../utils/getQueryClient.mjs";
|
|
14
13
|
import "../../utils/isMobile.mjs";
|
|
15
14
|
import "../../client/services/getSession.mjs";
|
|
16
|
-
import { useSessionQuery as
|
|
15
|
+
import { useSessionQuery as h } from "../../client/hooks/useSessionQuery.mjs";
|
|
17
16
|
import "react";
|
|
18
17
|
import "lodash-es";
|
|
19
|
-
import { useCreateGameSessionMutation as
|
|
18
|
+
import { useCreateGameSessionMutation as f } from "../../client/hooks/useCreateGameSessionMutation.mjs";
|
|
20
19
|
import "@opexa/portal-sdk-core/object-id";
|
|
21
|
-
import { useGlobalStore as
|
|
20
|
+
import { useGlobalStore as I } from "../../client/hooks/useGlobalStore.mjs";
|
|
22
21
|
import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
23
22
|
import "usehooks-ts";
|
|
24
|
-
import { toaster as
|
|
25
|
-
function
|
|
26
|
-
var
|
|
27
|
-
const
|
|
23
|
+
import { toaster as L } from "../../client/utils/toaster.mjs";
|
|
24
|
+
function q(t) {
|
|
25
|
+
var i, o;
|
|
26
|
+
const n = h(), u = f(), e = I(
|
|
28
27
|
d((a) => ({
|
|
29
28
|
signIn: a.signIn,
|
|
30
29
|
gameLaunch: a.gameLaunch
|
|
31
30
|
}))
|
|
32
|
-
),
|
|
31
|
+
), c = ((i = n.data) == null ? void 0 : i.status) === "unauthenticated" ? !1 : e.gameLaunch.details.status !== "WAITING" ? !0 : t.disabled;
|
|
33
32
|
return /* @__PURE__ */ l(
|
|
34
33
|
g.button,
|
|
35
34
|
{
|
|
36
35
|
type: "button",
|
|
37
36
|
...t,
|
|
38
37
|
onClick: async (a) => {
|
|
39
|
-
var
|
|
40
|
-
if ((
|
|
38
|
+
var m, r;
|
|
39
|
+
if ((m = t.onClick) == null || m.call(t, a), ((r = n.data) == null ? void 0 : r.status) === "unauthenticated")
|
|
41
40
|
return e.signIn.setOpen(!0);
|
|
42
41
|
e.gameLaunch.setDetails({
|
|
43
42
|
game: t.game,
|
|
@@ -45,7 +44,7 @@ function z(t) {
|
|
|
45
44
|
session: null
|
|
46
45
|
});
|
|
47
46
|
try {
|
|
48
|
-
const s = await
|
|
47
|
+
const s = await u.mutateAsync(
|
|
49
48
|
t.game
|
|
50
49
|
);
|
|
51
50
|
e.gameLaunch.setDetails({
|
|
@@ -58,17 +57,16 @@ function z(t) {
|
|
|
58
57
|
game: t.game,
|
|
59
58
|
session: null,
|
|
60
59
|
status: "FAILED"
|
|
61
|
-
}),
|
|
60
|
+
}), L.error({
|
|
62
61
|
description: s instanceof Error ? s.message : "Failed to launch game"
|
|
63
62
|
});
|
|
64
63
|
}
|
|
65
64
|
},
|
|
66
|
-
disabled:
|
|
67
|
-
"data-
|
|
68
|
-
"data-state": ((m = i.data) == null ? void 0 : m.status) === "unauthenticated" ? e.signIn.open ? "open" : "closed" : e.gameLaunch.details.status === "WAITING" ? "closed" : "open"
|
|
65
|
+
disabled: c,
|
|
66
|
+
"data-state": ((o = n.data) == null ? void 0 : o.status) === "unauthenticated" ? e.signIn.open ? "open" : "closed" : e.gameLaunch.details.status === "WAITING" ? "closed" : "open"
|
|
69
67
|
}
|
|
70
68
|
);
|
|
71
69
|
}
|
|
72
70
|
export {
|
|
73
|
-
|
|
71
|
+
q as GameLaunchTrigger
|
|
74
72
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
export interface GamesSearchTriggerProps extends ComponentPropsWithRef<'button'> {
|
|
3
|
+
asChild?: boolean;
|
|
3
4
|
}
|
|
4
|
-
export declare function GamesSearchTrigger(
|
|
5
|
+
export declare function GamesSearchTrigger(props: GamesSearchTriggerProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("@ark-ui/react"),n=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("../../client/services/getSession.js");require("react");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const o=require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");function c(e){const r=o.useGlobalStore(n.useShallow(u=>({gamesSearch:u.gamesSearch})));return t.jsx(a.ark.button,{type:"button",...e,onClick:u=>{var i;return r.gamesSearch.setOpen(!r.gamesSearch.open),(i=e.onClick)==null?void 0:i.call(e,u)},"data-state":r.gamesSearch.open?"open":"closed"})}exports.GamesSearchTrigger=c;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { ark as
|
|
4
|
-
import { useShallow as
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { ark as i } from "@ark-ui/react";
|
|
4
|
+
import { useShallow as a } from "zustand/shallow";
|
|
5
5
|
import "@opexa/portal-sdk-core";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
7
|
import "tiny-invariant";
|
|
@@ -15,36 +15,28 @@ import "../../client/services/getSession.mjs";
|
|
|
15
15
|
import "react";
|
|
16
16
|
import "lodash-es";
|
|
17
17
|
import "@opexa/portal-sdk-core/object-id";
|
|
18
|
-
import { useGlobalStore as
|
|
18
|
+
import { useGlobalStore as p } from "../../client/hooks/useGlobalStore.mjs";
|
|
19
19
|
import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
20
20
|
import "usehooks-ts";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}) {
|
|
26
|
-
const r = s(
|
|
27
|
-
p((m) => ({
|
|
28
|
-
gamesSearch: m.gamesSearch
|
|
21
|
+
function T(t) {
|
|
22
|
+
const o = p(
|
|
23
|
+
a((r) => ({
|
|
24
|
+
gamesSearch: r.gamesSearch
|
|
29
25
|
}))
|
|
30
26
|
);
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
27
|
+
return /* @__PURE__ */ m(
|
|
28
|
+
i.button,
|
|
33
29
|
{
|
|
34
30
|
type: "button",
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
...t,
|
|
32
|
+
onClick: (r) => {
|
|
33
|
+
var e;
|
|
34
|
+
return o.gamesSearch.setOpen(!o.gamesSearch.open), (e = t.onClick) == null ? void 0 : e.call(t, r);
|
|
37
35
|
},
|
|
38
|
-
"data-state":
|
|
39
|
-
...o,
|
|
40
|
-
asChild: !0,
|
|
41
|
-
children: e ?? /* @__PURE__ */ i("button", { className: "bg-bg-primary text-text-secondary-700 flex size-10 items-center gap-lg rounded-sm px-lg", children: [
|
|
42
|
-
/* @__PURE__ */ t(c, { className: "text-text-quinary size-6" }),
|
|
43
|
-
"Search"
|
|
44
|
-
] })
|
|
36
|
+
"data-state": o.gamesSearch.open ? "open" : "closed"
|
|
45
37
|
}
|
|
46
38
|
);
|
|
47
39
|
}
|
|
48
40
|
export {
|
|
49
|
-
|
|
41
|
+
T as GamesSearchTrigger
|
|
50
42
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),t=require("@ark-ui/react"),n=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("../../client/services/getSession.js");require("react");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const o=require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");function a(e){const r=o.useGlobalStore(n.useShallow(s=>({messages:s.messages})));return i.jsx(t.ark.button,{type:"button",...e,onClick:s=>{var u;return r.messages.setOpen(!r.messages.open),(u=e.onClick)==null?void 0:u.call(e,s)},"data-state":r.messages.open?"open":"closed"})}exports.MessagesTrigger=a;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { ark as i } from "@ark-ui/react";
|
|
4
|
+
import { useShallow as s } from "zustand/shallow";
|
|
5
|
+
import "@opexa/portal-sdk-core";
|
|
6
|
+
import "@tanstack/react-query";
|
|
7
|
+
import "tiny-invariant";
|
|
8
|
+
import "../../constants/index.mjs";
|
|
9
|
+
import "../../utils/capitalize.mjs";
|
|
10
|
+
import "../../utils/parseDecimal.mjs";
|
|
11
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
12
|
+
import "../../utils/getQueryClient.mjs";
|
|
13
|
+
import "../../utils/isMobile.mjs";
|
|
14
|
+
import "../../client/services/getSession.mjs";
|
|
15
|
+
import "react";
|
|
16
|
+
import "lodash-es";
|
|
17
|
+
import "@opexa/portal-sdk-core/object-id";
|
|
18
|
+
import { useGlobalStore as p } from "../../client/hooks/useGlobalStore.mjs";
|
|
19
|
+
import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
20
|
+
import "usehooks-ts";
|
|
21
|
+
function O(t) {
|
|
22
|
+
const o = p(
|
|
23
|
+
s((e) => ({
|
|
24
|
+
messages: e.messages
|
|
25
|
+
}))
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ r(
|
|
28
|
+
i.button,
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
...t,
|
|
32
|
+
onClick: (e) => {
|
|
33
|
+
var m;
|
|
34
|
+
return o.messages.setOpen(!o.messages.open), (m = t.onClick) == null ? void 0 : m.call(t, e);
|
|
35
|
+
},
|
|
36
|
+
"data-state": o.messages.open ? "open" : "closed"
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
O as MessagesTrigger
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),t=require("@ark-ui/react"),o=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("../../client/services/getSession.js");require("react");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const q=require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");function l(e){const r=q.useGlobalStore(o.useShallow(i=>({signIn:i.signIn})));return u.jsx(t.ark.button,{type:"button",...e,onClick:i=>{var n;return r.signIn.setOpen(!r.signIn.open),(n=e.onClick)==null?void 0:n.call(e,i)},"data-state":r.signIn.open?"open":"closed"})}exports.SignInTrigger=l;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { ark as m } from "@ark-ui/react";
|
|
4
|
+
import { useShallow as e } from "zustand/shallow";
|
|
5
|
+
import "@opexa/portal-sdk-core";
|
|
6
|
+
import "@tanstack/react-query";
|
|
7
|
+
import "tiny-invariant";
|
|
8
|
+
import "../../constants/index.mjs";
|
|
9
|
+
import "../../utils/capitalize.mjs";
|
|
10
|
+
import "../../utils/parseDecimal.mjs";
|
|
11
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
12
|
+
import "../../utils/getQueryClient.mjs";
|
|
13
|
+
import "../../utils/isMobile.mjs";
|
|
14
|
+
import "../../client/services/getSession.mjs";
|
|
15
|
+
import "react";
|
|
16
|
+
import "lodash-es";
|
|
17
|
+
import "@opexa/portal-sdk-core/object-id";
|
|
18
|
+
import { useGlobalStore as p } from "../../client/hooks/useGlobalStore.mjs";
|
|
19
|
+
import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
20
|
+
import "usehooks-ts";
|
|
21
|
+
function O(t) {
|
|
22
|
+
const o = p(
|
|
23
|
+
e((i) => ({
|
|
24
|
+
signIn: i.signIn
|
|
25
|
+
}))
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ n(
|
|
28
|
+
m.button,
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
...t,
|
|
32
|
+
onClick: (i) => {
|
|
33
|
+
var r;
|
|
34
|
+
return o.signIn.setOpen(!o.signIn.open), (r = t.onClick) == null ? void 0 : r.call(t, i);
|
|
35
|
+
},
|
|
36
|
+
"data-state": o.signIn.open ? "open" : "closed"
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
O as SignInTrigger
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("@ark-ui/react"),o=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("../../client/services/getSession.js");require("react");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const q=require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");function l(e){const r=q.useGlobalStore(o.useShallow(i=>({signUp:i.signUp})));return t.jsx(n.ark.button,{type:"button",...e,onClick:i=>{var u;return r.signUp.setOpen(!r.signUp.open),(u=e.onClick)==null?void 0:u.call(e,i)},"data-state":r.signUp.open?"open":"closed"})}exports.SignUpTrigger=l;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { ark as p } from "@ark-ui/react";
|
|
4
|
+
import { useShallow as n } from "zustand/shallow";
|
|
5
|
+
import "@opexa/portal-sdk-core";
|
|
6
|
+
import "@tanstack/react-query";
|
|
7
|
+
import "tiny-invariant";
|
|
8
|
+
import "../../constants/index.mjs";
|
|
9
|
+
import "../../utils/capitalize.mjs";
|
|
10
|
+
import "../../utils/parseDecimal.mjs";
|
|
11
|
+
import "../../utils/getLocaleInfo.mjs";
|
|
12
|
+
import "../../utils/getQueryClient.mjs";
|
|
13
|
+
import "../../utils/isMobile.mjs";
|
|
14
|
+
import "../../client/services/getSession.mjs";
|
|
15
|
+
import "react";
|
|
16
|
+
import "lodash-es";
|
|
17
|
+
import "@opexa/portal-sdk-core/object-id";
|
|
18
|
+
import { useGlobalStore as e } from "../../client/hooks/useGlobalStore.mjs";
|
|
19
|
+
import "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
20
|
+
import "usehooks-ts";
|
|
21
|
+
function O(t) {
|
|
22
|
+
const o = e(
|
|
23
|
+
n((i) => ({
|
|
24
|
+
signUp: i.signUp
|
|
25
|
+
}))
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ m(
|
|
28
|
+
p.button,
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
...t,
|
|
32
|
+
onClick: (i) => {
|
|
33
|
+
var r;
|
|
34
|
+
return o.signUp.setOpen(!o.signUp.open), (r = t.onClick) == null ? void 0 : r.call(t, i);
|
|
35
|
+
},
|
|
36
|
+
"data-state": o.signUp.open ? "open" : "closed"
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
O as SignUpTrigger
|
|
42
|
+
};
|
package/dist/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/Account/Account.js"),r=require("./components/Banner/Banner.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/Account/Account.js"),r=require("./components/Banner/Banner.js"),s=require("./components/BetRecords/BetRecords.js"),o=require("./components/Bonus/Bonus.js"),n=require("./components/Bonuses/Bonuses.js"),i=require("./components/DepositWithdrawal/DepositWithdrawal.js"),t=require("./components/Disclaimer/Disclaimer.js"),a=require("./components/FavoriteGames/FavoriteGames.js"),c=require("./components/GameLaunch/GameLaunch.js"),u=require("./components/GameLaunch/GameLaunchTrigger.js"),g=require("./components/GameProviders/GameProviders.js"),m=require("./components/Games/Games.js"),q=require("./components/GamesSearch/GamesSearch.js"),T=require("./components/GamesSearch/GamesSearchTrigger.js"),G=require("./components/JackpotCounter/JackpotCounter.js"),d=require("./components/Jackpots/Jackpots.js"),S=require("./components/KYC/KYC.js"),p=require("./components/KYC/KYCTrigger.js"),P=require("./components/Marquee/Marquee.js"),h=require("./components/Messages/Messages.js"),l=require("./components/Messages/MessagesTrigger.js"),B=require("./components/PortalProvider/PortalProvider.js"),C=require("./components/Promo/Promo.js"),v=require("./components/Promos/Promos.js"),M=require("./components/Protected/Protected.js"),k=require("./components/Quests/Quests.js"),D=require("./components/SignIn/SignIn.js"),I=require("./components/SignIn/SignInTrigger.js"),J=require("./components/SignUp/SignUp.js"),K=require("./components/SignUp/SignUpTrigger.js"),L=require("./components/TopWins/TopWins.js"),R=require("./components/TournamentCounter/TournamentCounter.js"),U=require("./components/Tournaments/Tournaments.js"),W=require("./components/TransactionRecords/TransactionRecords.js");exports.Account=e.Account;exports.Banner=r.Banner;exports.BetRecords=s.BetRecords;exports.Bonus=o.Bonus;exports.Bonuses=n.Bonuses;exports.DepositWithdrawal=i.DepositWithdrawal;exports.Disclaimer=t.Disclaimer;exports.FavoriteGames=a.FavoriteGames;exports.GameLaunch=c.GameLaunch;exports.GameLaunchTrigger=u.GameLaunchTrigger;exports.GameProviders=g.GameProviders;exports.Games=m.Games;exports.GamesSearch=q.GamesSearch;exports.GamesSearchTrigger=T.GamesSearchTrigger;exports.JackpotCounter=G.JackpotCounter;exports.Jackpots=d.Jackpots;exports.KYC=S.KYC;exports.KYCTrigger=p.KYCTrigger;exports.Marquee=P.Marquee;exports.Messages=h.Messages;exports.MessagesTrigger=l.MessagesTrigger;exports.PortalProvider=B.PortalProvider;exports.Promo=C.Promo;exports.Promos=v.Promos;exports.Protected=M.Protected;exports.Quests=k.Quests;exports.SignIn=D.SignIn;exports.SignInTrigger=I.SignInTrigger;exports.SignUp=J.SignUp;exports.SignUpTrigger=K.SignUpTrigger;exports.TopWins=L.TopWins;exports.TournamentCounter=R.TournamentCounter;exports.Tournaments=U.Tournaments;exports.TransactionRecords=W.TransactionRecords;
|