@opexa/portal-components 0.0.151 → 0.0.153
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/useGlobalStore.d.ts +6 -4
- package/dist/client/hooks/useGlobalStore.js +6 -6
- package/dist/client/hooks/useMarkMessageAsReadMutation.js +25 -10
- package/dist/components/KYC/IdentityVerification.js +1 -1
- package/dist/components/KYC/KYC.d.ts +1 -1
- package/dist/components/KYC/KYC.js +3 -3
- package/dist/components/Messages/Messages.d.ts +1 -1
- package/dist/components/Messages/Messages.js +7 -3
- package/dist/components/Messages/Messages.lazy.d.ts +1 -0
- package/dist/components/Messages/Messages.lazy.js +56 -9
- package/dist/components/Messages/MessagesContext.d.ts +6 -0
- package/dist/components/Messages/MessagesContext.js +1 -0
- package/dist/components/Messages/MessagesPopup.d.ts +1 -0
- package/dist/components/Messages/MessagesPopup.js +79 -0
- package/dist/components/Messages/index.d.ts +0 -2
- package/dist/components/Messages/index.js +0 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/ui/Carousel/Carousel.d.ts +389 -0
- package/dist/ui/Carousel/Carousel.js +15 -0
- package/dist/ui/Carousel/carousel.recipe.d.ts +43 -0
- package/dist/ui/Carousel/carousel.recipe.js +6 -0
- package/dist/ui/Carousel/index.d.ts +1 -0
- package/dist/ui/Carousel/index.js +1 -0
- package/dist/utils/queryKeys.js +42 -128
- package/package.json +1 -1
|
@@ -35,14 +35,16 @@ interface SearchStore extends PopupStore {
|
|
|
35
35
|
}
|
|
36
36
|
type DepositWithdrawalTab = 'DEPOSIT' | 'WITHDRAWAL';
|
|
37
37
|
type MessagesTab = 'ALL' | 'UNREAD';
|
|
38
|
-
interface MessageStore extends PopupStore {
|
|
39
|
-
data: Message | null;
|
|
40
|
-
setData: (content: Message | null) => void;
|
|
41
|
-
}
|
|
42
38
|
interface MessagesStore extends PopupStore {
|
|
43
39
|
tab: MessagesTab;
|
|
44
40
|
setTab: (tab: MessagesTab) => void;
|
|
45
41
|
}
|
|
42
|
+
interface MessageStore extends PopupStore {
|
|
43
|
+
open: boolean;
|
|
44
|
+
setOpen: (open: boolean) => void;
|
|
45
|
+
data: Message | null;
|
|
46
|
+
setData: (data: Message | null) => void;
|
|
47
|
+
}
|
|
46
48
|
interface DepositWithdrawalStore extends PopupStore {
|
|
47
49
|
tab: DepositWithdrawalTab;
|
|
48
50
|
setTab: (tab: DepositWithdrawalTab) => void;
|
|
@@ -126,10 +126,6 @@ export const useGlobalStore = create((set) => ({
|
|
|
126
126
|
open,
|
|
127
127
|
'~touched': true,
|
|
128
128
|
},
|
|
129
|
-
message: {
|
|
130
|
-
...prev.message,
|
|
131
|
-
'~touched': true,
|
|
132
|
-
},
|
|
133
129
|
}));
|
|
134
130
|
},
|
|
135
131
|
'~touched': false,
|
|
@@ -140,6 +136,10 @@ export const useGlobalStore = create((set) => ({
|
|
|
140
136
|
...prev.messages,
|
|
141
137
|
tab,
|
|
142
138
|
},
|
|
139
|
+
message: {
|
|
140
|
+
...prev.message,
|
|
141
|
+
'~touched': true,
|
|
142
|
+
},
|
|
143
143
|
}));
|
|
144
144
|
},
|
|
145
145
|
},
|
|
@@ -160,11 +160,11 @@ export const useGlobalStore = create((set) => ({
|
|
|
160
160
|
},
|
|
161
161
|
'~touched': false,
|
|
162
162
|
data: null,
|
|
163
|
-
setData(
|
|
163
|
+
setData(data) {
|
|
164
164
|
set((prev) => ({
|
|
165
165
|
message: {
|
|
166
166
|
...prev.message,
|
|
167
|
-
data
|
|
167
|
+
data,
|
|
168
168
|
},
|
|
169
169
|
}));
|
|
170
170
|
},
|
|
@@ -18,16 +18,31 @@ export const useMarkMessageAsReadMutation = (config) => {
|
|
|
18
18
|
Authorization: `Bearer ${session.token}`,
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
|
-
queryClient.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
queryClient.setQueriesData({
|
|
22
|
+
queryKey: getMessagesQueryKey(),
|
|
23
|
+
exact: false,
|
|
24
|
+
type: 'all',
|
|
25
|
+
}, (prev) => {
|
|
26
|
+
if (!prev)
|
|
27
|
+
return prev;
|
|
28
|
+
return {
|
|
29
|
+
...prev,
|
|
30
|
+
pages: prev.pages.map((page) => ({
|
|
31
|
+
...page,
|
|
32
|
+
edges: page.edges.map((edge) => {
|
|
33
|
+
if (edge.node.id === id) {
|
|
34
|
+
return {
|
|
35
|
+
...edge,
|
|
36
|
+
node: {
|
|
37
|
+
...edge.node,
|
|
38
|
+
markedAsRead: true,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return edge;
|
|
43
|
+
}),
|
|
44
|
+
})),
|
|
45
|
+
};
|
|
31
46
|
});
|
|
32
47
|
queryClient.setQueryData(getUnreadMessagesCountQueryKey(), (prev) => {
|
|
33
48
|
return prev && prev > 0 ? prev - 1 : 0;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import dynamic from 'next/dynamic';
|
|
4
|
+
import Script from 'next/script';
|
|
4
5
|
import { useShallow } from 'zustand/shallow';
|
|
5
6
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
7
|
const Component = dynamic(() => import('./KYC.lazy.js').then((m) => m.KYC), {
|
|
@@ -9,6 +10,5 @@ const Component = dynamic(() => import('./KYC.lazy.js').then((m) => m.KYC), {
|
|
|
9
10
|
});
|
|
10
11
|
export function KYC(props) {
|
|
11
12
|
const touched = useGlobalStore(useShallow((ctx) => ctx.kyc['~touched']));
|
|
12
|
-
|
|
13
|
-
return _jsx(Component, { ...props });
|
|
13
|
+
return (_jsxs(_Fragment, { children: [touched && _jsx(Component, { ...props }), _jsx(Script, { src: "https://docs.opencv.org/4.7.0/opencv.js", async: true }), _jsx(Script, { src: "https://cdn.jsdelivr.net/gh/ColonelParrot/jscanify@master/src/jscanify.min.js", strategy: "afterInteractive" })] }));
|
|
14
14
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { MessagesProps } from './Messages.lazy';
|
|
2
|
-
export declare function Messages(props: MessagesProps): import("react/jsx-runtime").JSX.Element
|
|
2
|
+
export declare function Messages(props: MessagesProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export type { MessagesProps };
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import dynamic from 'next/dynamic';
|
|
4
4
|
import { useShallow } from 'zustand/shallow';
|
|
5
5
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
|
+
import { MessagesPropsProvider } from './MessagesContext.js';
|
|
6
7
|
const Component = dynamic(() => import('./Messages.lazy.js').then((mod) => mod.Messages), {
|
|
7
8
|
ssr: false,
|
|
8
9
|
loading: () => null,
|
|
9
10
|
});
|
|
11
|
+
const MessagesPopup = dynamic(() => import('./MessagesPopup.js').then((mod) => mod.MessagesPopup), {
|
|
12
|
+
ssr: false,
|
|
13
|
+
loading: () => null,
|
|
14
|
+
});
|
|
10
15
|
export function Messages(props) {
|
|
11
16
|
const touched = useGlobalStore(useShallow((ctx) => ctx.messages['~touched']));
|
|
12
|
-
|
|
13
|
-
return _jsx(Component, { ...props });
|
|
17
|
+
return (_jsxs(MessagesPropsProvider, { value: props, children: [touched && _jsx(Component, { ...props }), _jsx(MessagesPopup, {})] }));
|
|
14
18
|
}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { tz } from '@date-fns/tz';
|
|
4
|
+
import { format } from 'date-fns';
|
|
5
|
+
import Image from 'next/image';
|
|
6
|
+
import Link from 'next/link';
|
|
3
7
|
import { twMerge } from 'tailwind-merge';
|
|
4
8
|
import { z } from 'zod';
|
|
5
9
|
import { useShallow } from 'zustand/shallow';
|
|
6
10
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
11
|
+
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
12
|
+
import { useMarkMessageAsReadMutation } from '../../client/hooks/useMarkMessageAsReadMutation.js';
|
|
7
13
|
import { useMessagesQuery } from '../../client/hooks/useMessagesQuery.js';
|
|
8
14
|
import { useUnreadMessagesCountQuery } from '../../client/hooks/useUnreadMessagesCountQuery.js';
|
|
9
15
|
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
10
16
|
import { XIcon } from '../../icons/XIcon.js';
|
|
17
|
+
import { Button } from '../../ui/Button/index.js';
|
|
18
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
11
19
|
import { Drawer } from '../../ui/Drawer/index.js';
|
|
12
20
|
import { Portal } from '../../ui/Portal/index.js';
|
|
13
21
|
import { Tabs } from '../../ui/Tabs/index.js';
|
|
14
22
|
import { InfiniteScroll } from '../shared/InfiniteScroll.js';
|
|
15
|
-
import {
|
|
16
|
-
import { MessageProvider } from './
|
|
17
|
-
import {
|
|
18
|
-
import { MessagesPropsProvider } from './MessagesContext.js';
|
|
23
|
+
import { MessageIcon } from './MessageIcon.js';
|
|
24
|
+
import { MessageProvider, useMessageContext, useMessagesPropsContext, } from './MessagesContext.js';
|
|
25
|
+
import { normalizeActionUrl } from './utils.js';
|
|
19
26
|
const TABS = ['ALL', 'UNREAD'];
|
|
20
27
|
export function Messages(props) {
|
|
21
28
|
const globalStore = useGlobalStore(useShallow((ctx) => ({ messages: ctx.messages })));
|
|
22
29
|
const unreadMessagesCountQuery = useUnreadMessagesCountQuery({}, {
|
|
23
|
-
refetchInterval: globalStore.messages.open ?
|
|
30
|
+
refetchInterval: globalStore.messages.open ? 5_000 : 10_000,
|
|
24
31
|
});
|
|
25
32
|
const unreadMessagesCount = unreadMessagesCountQuery.data ?? 0;
|
|
26
33
|
const messagesQuery = useMessagesQuery({
|
|
@@ -34,16 +41,56 @@ export function Messages(props) {
|
|
|
34
41
|
}),
|
|
35
42
|
}, {
|
|
36
43
|
enabled: globalStore.messages.open,
|
|
37
|
-
refetchInterval:
|
|
44
|
+
refetchInterval: 5_000,
|
|
38
45
|
});
|
|
39
46
|
const messages = messagesQuery.data?.pages.flatMap((page) => page.edges.map((e) => e.node)) ?? [];
|
|
40
47
|
const [mobileOffsetTop, desktopOffsetTop] = Array.isArray(props.offsetTop)
|
|
41
48
|
? props.offsetTop
|
|
42
49
|
: [props.offsetTop ?? '0px', props.offsetTop ?? '0px'];
|
|
43
|
-
return (_jsxs(
|
|
50
|
+
return (_jsxs(_Fragment, { children: [_jsx(Drawer.Root, { open: globalStore.messages.open, onOpenChange: ({ open }) => globalStore.messages.setOpen(open), lazyMount: true, unmountOnExit: true, children: _jsx(Portal, { children: _jsx(Drawer.Positioner, { children: _jsx(Drawer.Content, { className: twMerge('flex', 'flex-col', 'border-border-secondary', 'top-[var(--offset-top-mobile)]', 'h-[calc(100%-var(--offset-top-mobile))]', 'lg:border-l', 'lg:top-[var(--offset-top-desktop)]', 'lg:h-[calc(100%-var(--offset-top-desktop))]'), style: {
|
|
44
51
|
['--offset-top-mobile']: mobileOffsetTop,
|
|
45
52
|
['--offset-top-desktop']: desktopOffsetTop,
|
|
46
53
|
}, children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsxs("div", { className: "flex items-end justify-between p-xl", children: [_jsx("p", { className: "text-text-primary-brand text-xl font-semibold", children: "Notifications" }), _jsx(Drawer.CloseTrigger, { className: "p-2", children: _jsx(XIcon, {}) })] }), _jsxs(Tabs.Root, { value: globalStore.messages.tab, onValueChange: (details) => globalStore.messages.setTab(z.enum(TABS).parse(details.value)), lazyMount: true, unmountOnExit: true, className: "flex grow flex-col overflow-y-auto", children: [_jsx("div", { className: "p-xl pt-0", children: _jsxs(Tabs.List, { className: "w-full", children: [_jsx(Tabs.Trigger, { value: "ALL", className: "w-full", children: "All" }), _jsxs(Tabs.Trigger, { value: "UNREAD", className: "w-full", children: ["Unread", !!unreadMessagesCount && (_jsx("span", { className: "border-border-primary bg-bg-secondary ml-md rounded-full border px-2 py-0.5", children: unreadMessagesCount }))] }), _jsx(Tabs.Indicator, {})] }) }), TABS.map((tab) => (_jsxs(Tabs.Content, { value: tab, className: "scrollbar:w-2 scrollbar-track:bg-bg-primary-alt scrollbar-track:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-thumb:rounded-full border-border-secondary grow overflow-y-auto border-t p-xl", children: [messages.length > 0 && (_jsx("div", { className: "flex flex-col space-y-3", children: messages.map((message) => (_jsx(MessageProvider, { value: message, children: _jsx(Message, {}) }, message.id))) })), _jsx(InfiniteScroll, { loader: _jsx(SpinnerIcon, { className: "mx-auto size-5" }), hasMore: !!messagesQuery.hasNextPage, loadMore: async () => {
|
|
47
54
|
await messagesQuery.fetchNextPage();
|
|
48
|
-
}, className: "mt-4" })] }, tab)))] })] }) }) }) }) }), _jsx(
|
|
55
|
+
}, className: "mt-4" })] }, tab)))] })] }) }) }) }) }), _jsx(MessageDetails, {})] }));
|
|
56
|
+
}
|
|
57
|
+
function Message() {
|
|
58
|
+
const messagesProps = useMessagesPropsContext();
|
|
59
|
+
const transactionsPageUrl = messagesProps.transactionsPageUrl ?? '/transactions';
|
|
60
|
+
const message = useMessageContext();
|
|
61
|
+
const localeInfo = useLocaleInfo();
|
|
62
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
63
|
+
messages: ctx.messages,
|
|
64
|
+
message: ctx.message,
|
|
65
|
+
})));
|
|
66
|
+
const markMessageAsReadMutation = useMarkMessageAsReadMutation();
|
|
67
|
+
return (_jsxs("button", { className: "border-border-secondary rounded-xs bg-bg-secondary flex h-auto flex-shrink-0 cursor-pointer flex-col border px-3.5 py-2.5 text-left", onClick: () => {
|
|
68
|
+
globalStore.messages.setOpen(false);
|
|
69
|
+
globalStore.message.setOpen(true);
|
|
70
|
+
globalStore.message.setData(message);
|
|
71
|
+
if (!message.markedAsRead) {
|
|
72
|
+
markMessageAsReadMutation.mutate(message.id);
|
|
73
|
+
}
|
|
74
|
+
}, children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-text-tertiary-600 text-xs font-normal", children: format(new Date(message.dateTimeCreated), 'M/d/yyyy - h:mma', {
|
|
75
|
+
in: tz(localeInfo.timezone),
|
|
76
|
+
}) }), !message.markedAsRead && (_jsx("span", { className: "bg-utility-success-500 block size-2.5 rounded-full" }))] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(MessageIcon, { type: message.icon, className: "text-brand-400 size-5" }), _jsx("h2", { className: "text-text-primary-brand text-sm font-semibold", children: message.title })] }), message.content && (_jsx("div", { className: "mt-2 line-clamp-3 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: message.content } })), message.actions.length > 0 && (_jsx("div", { className: "mt-2 flex flex-wrap items-center justify-end gap-2", children: message.actions.map((action, index) => (_jsx(Link, { className: "border-button-secondary-border text-button-secondary-fg rounded-md border px-3 py-2 text-sm", href: normalizeActionUrl(transactionsPageUrl, action.url), onClick: (e) => {
|
|
77
|
+
e.stopPropagation();
|
|
78
|
+
globalStore.messages.setOpen(false);
|
|
79
|
+
}, children: action.name }, index))) }))] }));
|
|
80
|
+
}
|
|
81
|
+
export function MessageDetails() {
|
|
82
|
+
const messagesProps = useMessagesPropsContext();
|
|
83
|
+
const transactionsPageUrl = messagesProps.transactionsPageUrl ?? '/transactions';
|
|
84
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
85
|
+
message: ctx.message,
|
|
86
|
+
})));
|
|
87
|
+
const message = globalStore.message.data;
|
|
88
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.message.open, onOpenChange: (details) => {
|
|
89
|
+
globalStore.message.setOpen(details.open);
|
|
90
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "bg-bg-brand-secondary text-text-brand mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(MessageIcon, { type: message?.icon ?? 'INFO', className: "size-6" }) }), _jsx(Dialog.Title, { className: "mt-lg text-center text-lg font-semibold lg:mt-xl", children: message?.title }), message?.content && (_jsx(Dialog.Description, { className: "text-text-secondary-700 mt-xs pb-5 text-center text-sm", dangerouslySetInnerHTML: {
|
|
91
|
+
__html: message?.content,
|
|
92
|
+
} })), message?.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message?.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message?.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message?.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(transactionsPageUrl, action.url), onClick: (e) => {
|
|
93
|
+
e.stopPropagation();
|
|
94
|
+
globalStore.message.setOpen(false);
|
|
95
|
+
}, children: action.name }) }, index))) })) : null] }) })] }) }));
|
|
49
96
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import type { Message } from '../../types';
|
|
1
2
|
import type { MessagesProps } from './Messages.lazy';
|
|
2
3
|
export declare const MessagesPropsProvider: (props: {
|
|
3
4
|
value: MessagesProps;
|
|
4
5
|
} & {
|
|
5
6
|
children?: import("react").ReactNode | undefined;
|
|
6
7
|
}) => React.ReactNode, useMessagesPropsContext: () => MessagesProps;
|
|
8
|
+
export declare const MessageProvider: (props: {
|
|
9
|
+
value: Message;
|
|
10
|
+
} & {
|
|
11
|
+
children?: import("react").ReactNode | undefined;
|
|
12
|
+
}) => React.ReactNode, useMessageContext: () => Message;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MessagesPopup(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import { useInterval } from 'usehooks-ts';
|
|
6
|
+
import { useShallow } from 'zustand/shallow';
|
|
7
|
+
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
8
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
9
|
+
import { useMarkMessageAsReadMutation } from '../../client/hooks/useMarkMessageAsReadMutation.js';
|
|
10
|
+
import { useMessagesQuery } from '../../client/hooks/useMessagesQuery.js';
|
|
11
|
+
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
12
|
+
import { ChevronRightIcon } from '../../icons/ChevronRightIcon.js';
|
|
13
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
14
|
+
import { Button } from '../../ui/Button/index.js';
|
|
15
|
+
import { Carousel } from '../../ui/Carousel/index.js';
|
|
16
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
17
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
18
|
+
import { MessageIcon } from './MessageIcon.js';
|
|
19
|
+
import { useMessagesPropsContext } from './MessagesContext.js';
|
|
20
|
+
import { normalizeActionUrl } from './utils.js';
|
|
21
|
+
export function MessagesPopup() {
|
|
22
|
+
const messagesProps = useMessagesPropsContext();
|
|
23
|
+
const transactionsPageUrl = messagesProps.transactionsPageUrl ?? '/transactions';
|
|
24
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
25
|
+
message: ctx.message,
|
|
26
|
+
messages: ctx.messages,
|
|
27
|
+
})));
|
|
28
|
+
const markMessageAsReadMutation = useMarkMessageAsReadMutation();
|
|
29
|
+
const [paused, setPaused] = useState(false);
|
|
30
|
+
useInterval(() => setPaused(false), paused ? 1000 * 30 : null);
|
|
31
|
+
const disclosure = useDisclosure({
|
|
32
|
+
onOpenChange(open) {
|
|
33
|
+
if (open) {
|
|
34
|
+
const message = messages.at(0);
|
|
35
|
+
if (!message || message.markedAsRead)
|
|
36
|
+
return;
|
|
37
|
+
markMessageAsReadMutation.mutate(message.id);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
setPaused(true);
|
|
41
|
+
setPage(1);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
const messagesQuery = useMessagesQuery({
|
|
46
|
+
first: 10,
|
|
47
|
+
filter: {
|
|
48
|
+
popup: {
|
|
49
|
+
equal: true,
|
|
50
|
+
},
|
|
51
|
+
markedAsRead: {
|
|
52
|
+
equal: false,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
}, {
|
|
56
|
+
enabled: !globalStore.messages.open && !globalStore.message.open && !paused,
|
|
57
|
+
refetchInterval: disclosure.open ? undefined : 10_000,
|
|
58
|
+
});
|
|
59
|
+
const messages = messagesQuery.data?.pages.flatMap((page) => page.edges.map((edge) => edge.node)) ?? [];
|
|
60
|
+
const [page, setPage] = useState(1);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (messages.length > 0) {
|
|
63
|
+
disclosure.setOpen(true);
|
|
64
|
+
}
|
|
65
|
+
}, [disclosure, messages.length, paused]);
|
|
66
|
+
return (_jsx(Dialog.Root, { open: disclosure.open, onOpenChange: (details) => {
|
|
67
|
+
disclosure.setOpen(details.open);
|
|
68
|
+
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Carousel.Root, { page: page, onPageChange: (details) => {
|
|
69
|
+
setPage(details.page);
|
|
70
|
+
const message = messages.at(details.page - 1);
|
|
71
|
+
if (!message)
|
|
72
|
+
return;
|
|
73
|
+
if (message.markedAsRead)
|
|
74
|
+
return;
|
|
75
|
+
markMessageAsReadMutation.mutate(message.id);
|
|
76
|
+
}, slideCount: messages.length, allowMouseDrag: true, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "bg-bg-brand-secondary text-text-brand mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: { __html: message.content }, className: "text-text-secondary-700 mt-xs pb-5 text-center text-sm" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(transactionsPageUrl, action.url), onClick: () => {
|
|
77
|
+
disclosure.setOpen(false);
|
|
78
|
+
}, children: action.name }) }, index))) })) : null] }, message.id))) }), _jsxs(Carousel.Control, { className: "mt-5 flex items-center lg:mt-3xl", children: [_jsxs(Carousel.PrevTrigger, { className: "text-text-quarterary-500 hidden items-center gap-md font-semibold disabled:invisible lg:flex", children: [_jsx(ChevronLeftIcon, { className: "size-5" }), "Back"] }), _jsx(Carousel.IndicatorGroup, { className: "flex grow justify-center gap-xs", children: messages.map((message, index) => (_jsx(Carousel.Indicator, { index: index, className: "bg-bg-quaternary ui-current:bg-brand-400 size-2.5 rounded-full transition-all duration-150 ui-current:w-5" }, message.id))) }), _jsxs(Carousel.NextTrigger, { className: "text-text-quarterary-500 hidden items-center gap-md font-semibold disabled:invisible lg:flex", children: ["Next", _jsx(ChevronRightIcon, { className: "size-5" })] })] })] })] }) })] }) }));
|
|
79
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -431,7 +431,7 @@ export interface PointsWalletTransaction {
|
|
|
431
431
|
}
|
|
432
432
|
export type MemberAccountStatus = 'ACTIVE' | 'DISABLED' | 'BLACKLISTED' | 'SUSPENDED';
|
|
433
433
|
export type MemberAccountVerificationStatus = 'UNVERIFIED' | 'PENDING' | 'VERIFIED';
|
|
434
|
-
export type MemberVerificationStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'VERIFIED' | 'UNVERIFIED';
|
|
434
|
+
export type MemberVerificationStatus = 'CREATED' | 'PENDING' | 'APPROVED' | 'REJECTED' | 'VERIFIED' | 'UNVERIFIED';
|
|
435
435
|
export interface MemberAccount {
|
|
436
436
|
id: string;
|
|
437
437
|
name: string;
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import { Carousel } from '@ark-ui/react/carousel';
|
|
2
|
+
export declare const Root: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.RootProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
3
|
+
[key: string]: {
|
|
4
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
5
|
+
root?: import("tailwind-variants").ClassValue;
|
|
6
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
7
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
8
|
+
item?: import("tailwind-variants").ClassValue;
|
|
9
|
+
control?: import("tailwind-variants").ClassValue;
|
|
10
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
11
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
12
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
13
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
} | {
|
|
17
|
+
[x: string]: {
|
|
18
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
19
|
+
root?: import("tailwind-variants").ClassValue;
|
|
20
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
21
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
22
|
+
item?: import("tailwind-variants").ClassValue;
|
|
23
|
+
control?: import("tailwind-variants").ClassValue;
|
|
24
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
25
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
26
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
27
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
31
|
+
[key: string]: {
|
|
32
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
33
|
+
root?: import("tailwind-variants").ClassValue;
|
|
34
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
35
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
36
|
+
item?: import("tailwind-variants").ClassValue;
|
|
37
|
+
control?: import("tailwind-variants").ClassValue;
|
|
38
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
39
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
40
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
41
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
45
|
+
export declare const AutoplayTrigger: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.AutoplayTriggerProps & import("react").RefAttributes<HTMLButtonElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
46
|
+
[key: string]: {
|
|
47
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
48
|
+
root?: import("tailwind-variants").ClassValue;
|
|
49
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
50
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
51
|
+
item?: import("tailwind-variants").ClassValue;
|
|
52
|
+
control?: import("tailwind-variants").ClassValue;
|
|
53
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
54
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
55
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
56
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
} | {
|
|
60
|
+
[x: string]: {
|
|
61
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
62
|
+
root?: import("tailwind-variants").ClassValue;
|
|
63
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
64
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
65
|
+
item?: import("tailwind-variants").ClassValue;
|
|
66
|
+
control?: import("tailwind-variants").ClassValue;
|
|
67
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
68
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
69
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
70
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
74
|
+
[key: string]: {
|
|
75
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
76
|
+
root?: import("tailwind-variants").ClassValue;
|
|
77
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
78
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
79
|
+
item?: import("tailwind-variants").ClassValue;
|
|
80
|
+
control?: import("tailwind-variants").ClassValue;
|
|
81
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
82
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
83
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
84
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
88
|
+
export declare const Control: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.ControlProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
89
|
+
[key: string]: {
|
|
90
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
91
|
+
root?: import("tailwind-variants").ClassValue;
|
|
92
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
93
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
94
|
+
item?: import("tailwind-variants").ClassValue;
|
|
95
|
+
control?: import("tailwind-variants").ClassValue;
|
|
96
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
97
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
98
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
99
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
} | {
|
|
103
|
+
[x: string]: {
|
|
104
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
105
|
+
root?: import("tailwind-variants").ClassValue;
|
|
106
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
107
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
108
|
+
item?: import("tailwind-variants").ClassValue;
|
|
109
|
+
control?: import("tailwind-variants").ClassValue;
|
|
110
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
111
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
112
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
113
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
117
|
+
[key: string]: {
|
|
118
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
119
|
+
root?: import("tailwind-variants").ClassValue;
|
|
120
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
121
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
122
|
+
item?: import("tailwind-variants").ClassValue;
|
|
123
|
+
control?: import("tailwind-variants").ClassValue;
|
|
124
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
125
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
126
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
127
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
131
|
+
export declare const Indicator: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.IndicatorProps & import("react").RefAttributes<HTMLButtonElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
132
|
+
[key: string]: {
|
|
133
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
134
|
+
root?: import("tailwind-variants").ClassValue;
|
|
135
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
136
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
137
|
+
item?: import("tailwind-variants").ClassValue;
|
|
138
|
+
control?: import("tailwind-variants").ClassValue;
|
|
139
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
140
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
141
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
142
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
} | {
|
|
146
|
+
[x: string]: {
|
|
147
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
148
|
+
root?: import("tailwind-variants").ClassValue;
|
|
149
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
150
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
151
|
+
item?: import("tailwind-variants").ClassValue;
|
|
152
|
+
control?: import("tailwind-variants").ClassValue;
|
|
153
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
154
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
155
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
156
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
160
|
+
[key: string]: {
|
|
161
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
162
|
+
root?: import("tailwind-variants").ClassValue;
|
|
163
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
164
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
165
|
+
item?: import("tailwind-variants").ClassValue;
|
|
166
|
+
control?: import("tailwind-variants").ClassValue;
|
|
167
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
168
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
169
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
170
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
174
|
+
export declare const IndicatorGroup: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.IndicatorGroupProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
175
|
+
[key: string]: {
|
|
176
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
177
|
+
root?: import("tailwind-variants").ClassValue;
|
|
178
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
179
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
180
|
+
item?: import("tailwind-variants").ClassValue;
|
|
181
|
+
control?: import("tailwind-variants").ClassValue;
|
|
182
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
183
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
184
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
185
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
} | {
|
|
189
|
+
[x: string]: {
|
|
190
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
191
|
+
root?: import("tailwind-variants").ClassValue;
|
|
192
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
193
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
194
|
+
item?: import("tailwind-variants").ClassValue;
|
|
195
|
+
control?: import("tailwind-variants").ClassValue;
|
|
196
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
197
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
198
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
199
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
203
|
+
[key: string]: {
|
|
204
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
205
|
+
root?: import("tailwind-variants").ClassValue;
|
|
206
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
207
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
208
|
+
item?: import("tailwind-variants").ClassValue;
|
|
209
|
+
control?: import("tailwind-variants").ClassValue;
|
|
210
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
211
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
212
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
213
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
217
|
+
export declare const Item: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.ItemProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
218
|
+
[key: string]: {
|
|
219
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
220
|
+
root?: import("tailwind-variants").ClassValue;
|
|
221
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
222
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
223
|
+
item?: import("tailwind-variants").ClassValue;
|
|
224
|
+
control?: import("tailwind-variants").ClassValue;
|
|
225
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
226
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
227
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
228
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
} | {
|
|
232
|
+
[x: string]: {
|
|
233
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
234
|
+
root?: import("tailwind-variants").ClassValue;
|
|
235
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
236
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
237
|
+
item?: import("tailwind-variants").ClassValue;
|
|
238
|
+
control?: import("tailwind-variants").ClassValue;
|
|
239
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
240
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
241
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
242
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
246
|
+
[key: string]: {
|
|
247
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
248
|
+
root?: import("tailwind-variants").ClassValue;
|
|
249
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
250
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
251
|
+
item?: import("tailwind-variants").ClassValue;
|
|
252
|
+
control?: import("tailwind-variants").ClassValue;
|
|
253
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
254
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
255
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
256
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
260
|
+
export declare const ItemGroup: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.ItemGroupProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
261
|
+
[key: string]: {
|
|
262
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
263
|
+
root?: import("tailwind-variants").ClassValue;
|
|
264
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
265
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
266
|
+
item?: import("tailwind-variants").ClassValue;
|
|
267
|
+
control?: import("tailwind-variants").ClassValue;
|
|
268
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
269
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
270
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
271
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
} | {
|
|
275
|
+
[x: string]: {
|
|
276
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
277
|
+
root?: import("tailwind-variants").ClassValue;
|
|
278
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
279
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
280
|
+
item?: import("tailwind-variants").ClassValue;
|
|
281
|
+
control?: import("tailwind-variants").ClassValue;
|
|
282
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
283
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
284
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
285
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
289
|
+
[key: string]: {
|
|
290
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
291
|
+
root?: import("tailwind-variants").ClassValue;
|
|
292
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
293
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
294
|
+
item?: import("tailwind-variants").ClassValue;
|
|
295
|
+
control?: import("tailwind-variants").ClassValue;
|
|
296
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
297
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
298
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
299
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
303
|
+
export declare const NextTrigger: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.NextTriggerProps & import("react").RefAttributes<HTMLButtonElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
304
|
+
[key: string]: {
|
|
305
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
306
|
+
root?: import("tailwind-variants").ClassValue;
|
|
307
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
308
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
309
|
+
item?: import("tailwind-variants").ClassValue;
|
|
310
|
+
control?: import("tailwind-variants").ClassValue;
|
|
311
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
312
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
313
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
314
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
} | {
|
|
318
|
+
[x: string]: {
|
|
319
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
320
|
+
root?: import("tailwind-variants").ClassValue;
|
|
321
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
322
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
323
|
+
item?: import("tailwind-variants").ClassValue;
|
|
324
|
+
control?: import("tailwind-variants").ClassValue;
|
|
325
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
326
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
327
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
328
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
332
|
+
[key: string]: {
|
|
333
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
334
|
+
root?: import("tailwind-variants").ClassValue;
|
|
335
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
336
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
337
|
+
item?: import("tailwind-variants").ClassValue;
|
|
338
|
+
control?: import("tailwind-variants").ClassValue;
|
|
339
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
340
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
341
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
342
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
346
|
+
export declare const PrevTrigger: import("react").ComponentType<import("@ark-ui/react").Assign<Carousel.PrevTriggerProps & import("react").RefAttributes<HTMLButtonElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
347
|
+
[key: string]: {
|
|
348
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
349
|
+
root?: import("tailwind-variants").ClassValue;
|
|
350
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
351
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
352
|
+
item?: import("tailwind-variants").ClassValue;
|
|
353
|
+
control?: import("tailwind-variants").ClassValue;
|
|
354
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
355
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
356
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
357
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
} | {
|
|
361
|
+
[x: string]: {
|
|
362
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
363
|
+
root?: import("tailwind-variants").ClassValue;
|
|
364
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
365
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
366
|
+
item?: import("tailwind-variants").ClassValue;
|
|
367
|
+
control?: import("tailwind-variants").ClassValue;
|
|
368
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
369
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
370
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
371
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
375
|
+
[key: string]: {
|
|
376
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
377
|
+
root?: import("tailwind-variants").ClassValue;
|
|
378
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
379
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
380
|
+
item?: import("tailwind-variants").ClassValue;
|
|
381
|
+
control?: import("tailwind-variants").ClassValue;
|
|
382
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
383
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
384
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
385
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
389
|
+
export declare const Context: (props: Carousel.ContextProps) => import("react").ReactNode;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Carousel } from '@ark-ui/react/carousel';
|
|
3
|
+
import { createRecipeContext } from '../../client/utils/createRecipeContext.js';
|
|
4
|
+
import { carouselRecipe } from './carousel.recipe.js';
|
|
5
|
+
const { withProvider, withContext } = createRecipeContext(carouselRecipe);
|
|
6
|
+
export const Root = withProvider(Carousel.Root, 'root');
|
|
7
|
+
export const AutoplayTrigger = withContext(Carousel.AutoplayTrigger, 'autoplayTrigger');
|
|
8
|
+
export const Control = withContext(Carousel.Control, 'control');
|
|
9
|
+
export const Indicator = withContext(Carousel.Indicator, 'indicator');
|
|
10
|
+
export const IndicatorGroup = withContext(Carousel.IndicatorGroup, 'indicatorGroup');
|
|
11
|
+
export const Item = withContext(Carousel.Item, 'item');
|
|
12
|
+
export const ItemGroup = withContext(Carousel.ItemGroup, 'itemGroup');
|
|
13
|
+
export const NextTrigger = withContext(Carousel.NextTrigger, 'nextTrigger');
|
|
14
|
+
export const PrevTrigger = withContext(Carousel.PrevTrigger, 'prevTrigger');
|
|
15
|
+
export const Context = Carousel.Context;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const carouselRecipe: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
4
|
+
root?: import("tailwind-variants").ClassValue;
|
|
5
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
6
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
7
|
+
item?: import("tailwind-variants").ClassValue;
|
|
8
|
+
control?: import("tailwind-variants").ClassValue;
|
|
9
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
10
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
11
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
12
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} | {
|
|
16
|
+
[x: string]: {
|
|
17
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
18
|
+
root?: import("tailwind-variants").ClassValue;
|
|
19
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
20
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
21
|
+
item?: import("tailwind-variants").ClassValue;
|
|
22
|
+
control?: import("tailwind-variants").ClassValue;
|
|
23
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
24
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
25
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
26
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, {
|
|
30
|
+
[key: string]: {
|
|
31
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
32
|
+
root?: import("tailwind-variants").ClassValue;
|
|
33
|
+
indicator?: import("tailwind-variants").ClassValue;
|
|
34
|
+
itemGroup?: import("tailwind-variants").ClassValue;
|
|
35
|
+
item?: import("tailwind-variants").ClassValue;
|
|
36
|
+
control?: import("tailwind-variants").ClassValue;
|
|
37
|
+
nextTrigger?: import("tailwind-variants").ClassValue;
|
|
38
|
+
prevTrigger?: import("tailwind-variants").ClassValue;
|
|
39
|
+
indicatorGroup?: import("tailwind-variants").ClassValue;
|
|
40
|
+
autoplayTrigger?: import("tailwind-variants").ClassValue;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
} | {}, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, import("tailwind-variants").TVReturnType<unknown, Record<"root" | "indicator" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger", string | string[]>, undefined, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { carouselAnatomy } from '@ark-ui/react/carousel';
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
import { anatomyToRecipeSlots } from '../../utils/anatomyToRecipeSlots.js';
|
|
4
|
+
export const carouselRecipe = tv({
|
|
5
|
+
slots: anatomyToRecipeSlots(carouselAnatomy, {}),
|
|
6
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as Carousel from './Carousel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as Carousel from './Carousel.js';
|
package/dist/utils/queryKeys.js
CHANGED
|
@@ -1,130 +1,44 @@
|
|
|
1
1
|
import { SITE_ID } from '../constants/index.js';
|
|
2
2
|
const PARENT_KEY = 'queries';
|
|
3
|
-
export const getAccountQueryKey = () => [PARENT_KEY, 'account'];
|
|
4
|
-
export const getProfileCompletionQueryKey = () => [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
];
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
];
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
];
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
];
|
|
23
|
-
export const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
];
|
|
27
|
-
export const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
];
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
];
|
|
37
|
-
export const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
];
|
|
42
|
-
export const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
];
|
|
46
|
-
export const getInstapayBankListQueryKey = () => [
|
|
47
|
-
PARENT_KEY,
|
|
48
|
-
'instapayBankList',
|
|
49
|
-
];
|
|
50
|
-
export const getIsMayaSessionValidQueryKey = () => [
|
|
51
|
-
PARENT_KEY,
|
|
52
|
-
'isMayaSessionValidQueryKey',
|
|
53
|
-
];
|
|
54
|
-
export const getJackpotsQueryKey = (input) => [
|
|
55
|
-
PARENT_KEY,
|
|
56
|
-
'jackpots',
|
|
57
|
-
input,
|
|
58
|
-
];
|
|
59
|
-
export const getJackpotsCountQueryKey = (input) => [PARENT_KEY, 'jackpotsCount', input];
|
|
60
|
-
export const getJackpotPayoutsQueryKey = (input) => [PARENT_KEY, 'jackpotPayouts', input];
|
|
61
|
-
export const getMemberVerificationQueryKey = () => [
|
|
62
|
-
PARENT_KEY,
|
|
63
|
-
'memberVerification',
|
|
64
|
-
];
|
|
65
|
-
export const getPaymentSettingsQueryKey = () => [
|
|
66
|
-
PARENT_KEY,
|
|
67
|
-
'paymentSettings',
|
|
68
|
-
];
|
|
69
|
-
export const getPlatformQueryKey = () => [PARENT_KEY, 'platform'];
|
|
70
|
-
export const getPromoQueryKey = (id) => [
|
|
71
|
-
PARENT_KEY,
|
|
72
|
-
'promo',
|
|
73
|
-
id,
|
|
74
|
-
];
|
|
75
|
-
export const getCashbackQueryKey = (id) => [
|
|
76
|
-
PARENT_KEY,
|
|
77
|
-
'cashback',
|
|
78
|
-
id,
|
|
79
|
-
];
|
|
80
|
-
export const getPromosQueryKey = () => [PARENT_KEY, 'promos'];
|
|
81
|
-
export const getSessionQueryKey = () => [PARENT_KEY, 'session'];
|
|
82
|
-
export const getTopWinsQueryKey = () => [PARENT_KEY, 'topWins'];
|
|
83
|
-
export const getTournamentsQueryKey = (input) => [
|
|
84
|
-
PARENT_KEY,
|
|
85
|
-
'tournaments',
|
|
86
|
-
input,
|
|
87
|
-
];
|
|
88
|
-
export const getTournamentsCountQueryKey = (input) => [PARENT_KEY, 'tournamentsCount', input];
|
|
89
|
-
export const getTransactionRecordsQueryKey = (input) => [PARENT_KEY, 'transactionRecords', input];
|
|
90
|
-
export const getMessagesQueryKey = (input) => [
|
|
91
|
-
PARENT_KEY,
|
|
92
|
-
'messages',
|
|
93
|
-
input,
|
|
94
|
-
];
|
|
95
|
-
export const getWalletQueryKey = () => [PARENT_KEY, 'wallet'];
|
|
96
|
-
export const getWithdrawalRecordsQueryKey = (input) => [PARENT_KEY, 'withdrawalRecords', input];
|
|
97
|
-
export const getUnreadMessagesCountQueryKey = (input) => [PARENT_KEY, 'unreadMessagesCount', input];
|
|
98
|
-
export const getBonusQueryKey = (id) => [
|
|
99
|
-
PARENT_KEY,
|
|
100
|
-
'bonus',
|
|
101
|
-
id,
|
|
102
|
-
];
|
|
103
|
-
export const getCashbackBonusQueryKey = (id) => [
|
|
104
|
-
PARENT_KEY,
|
|
105
|
-
'cashbackBonus',
|
|
106
|
-
id,
|
|
107
|
-
];
|
|
108
|
-
export const getBonusesQueryKey = () => [PARENT_KEY, 'bonuses'];
|
|
109
|
-
export const getBonusesCountQueryKey = () => [
|
|
110
|
-
PARENT_KEY,
|
|
111
|
-
'bonusesCount',
|
|
112
|
-
];
|
|
113
|
-
export const getAvailableQuestsCountQueryKey = () => [
|
|
114
|
-
PARENT_KEY,
|
|
115
|
-
'availableQuestsCount',
|
|
116
|
-
];
|
|
117
|
-
export const getOnboardingStatusQueryKey = () => [
|
|
118
|
-
PARENT_KEY,
|
|
119
|
-
'onboardingStatus',
|
|
120
|
-
];
|
|
121
|
-
export const getRecommendedGamesQueryKey = () => [
|
|
122
|
-
PARENT_KEY,
|
|
123
|
-
'recommendedGames',
|
|
124
|
-
];
|
|
125
|
-
export const getFileQueryKey = (id) => [
|
|
126
|
-
PARENT_KEY,
|
|
127
|
-
'file',
|
|
128
|
-
id,
|
|
129
|
-
];
|
|
130
|
-
export const getSiteQueryKey = () => [PARENT_KEY, 'site', SITE_ID];
|
|
3
|
+
export const getAccountQueryKey = () => [PARENT_KEY, 'account'].filter(Boolean);
|
|
4
|
+
export const getProfileCompletionQueryKey = () => [PARENT_KEY, 'profileCompletion'].filter(Boolean);
|
|
5
|
+
export const getAvailablePromosQueryKey = (input) => [PARENT_KEY, 'availablePromos', input].filter(Boolean);
|
|
6
|
+
export const getAvailableQuestsQueryKey = () => [PARENT_KEY, 'availableQuests'].filter(Boolean);
|
|
7
|
+
export const getBetRecordsQueryKey = (input) => [PARENT_KEY, 'betRecords', input].filter(Boolean);
|
|
8
|
+
export const getCashbacksQueryKey = () => [PARENT_KEY, 'cashbacks'].filter(Boolean);
|
|
9
|
+
export const getCashbackBonusesQueryKey = () => [PARENT_KEY, 'cashbackBonuses'].filter(Boolean);
|
|
10
|
+
export const getCashbackBonusesCountQueryKey = () => [PARENT_KEY, 'cashbackBonusesCount'].filter(Boolean);
|
|
11
|
+
export const getDepositQueryKey = (id) => [PARENT_KEY, 'deposit', id].filter(Boolean);
|
|
12
|
+
export const getDepositRecordsQueryKey = (input) => [PARENT_KEY, 'depositRecords', input].filter(Boolean);
|
|
13
|
+
export const getDepositsCountQueryKey = () => [PARENT_KEY, 'depositsCount'].filter(Boolean);
|
|
14
|
+
export const getGamesQueryKey = (input) => [PARENT_KEY, 'games', input].filter(Boolean);
|
|
15
|
+
export const getFavoriteGamesQueryKey = () => [PARENT_KEY, 'favoriteGames'].filter(Boolean);
|
|
16
|
+
export const getInstapayBankListQueryKey = () => [PARENT_KEY, 'instapayBankList'].filter(Boolean);
|
|
17
|
+
export const getIsMayaSessionValidQueryKey = () => [PARENT_KEY, 'isMayaSessionValidQueryKey'].filter(Boolean);
|
|
18
|
+
export const getJackpotsQueryKey = (input) => [PARENT_KEY, 'jackpots', input].filter(Boolean);
|
|
19
|
+
export const getJackpotsCountQueryKey = (input) => [PARENT_KEY, 'jackpotsCount', input].filter(Boolean);
|
|
20
|
+
export const getJackpotPayoutsQueryKey = (input) => [PARENT_KEY, 'jackpotPayouts', input].filter(Boolean);
|
|
21
|
+
export const getMemberVerificationQueryKey = () => [PARENT_KEY, 'memberVerification'].filter(Boolean);
|
|
22
|
+
export const getPaymentSettingsQueryKey = () => [PARENT_KEY, 'paymentSettings'].filter(Boolean);
|
|
23
|
+
export const getPlatformQueryKey = () => [PARENT_KEY, 'platform'].filter(Boolean);
|
|
24
|
+
export const getPromoQueryKey = (id) => [PARENT_KEY, 'promo', id].filter(Boolean);
|
|
25
|
+
export const getCashbackQueryKey = (id) => [PARENT_KEY, 'cashback', id].filter(Boolean);
|
|
26
|
+
export const getPromosQueryKey = () => [PARENT_KEY, 'promos'].filter(Boolean);
|
|
27
|
+
export const getSessionQueryKey = () => [PARENT_KEY, 'session'].filter(Boolean);
|
|
28
|
+
export const getTopWinsQueryKey = () => [PARENT_KEY, 'topWins'].filter(Boolean);
|
|
29
|
+
export const getTournamentsQueryKey = (input) => [PARENT_KEY, 'tournaments', input].filter(Boolean);
|
|
30
|
+
export const getTournamentsCountQueryKey = (input) => [PARENT_KEY, 'tournamentsCount', input].filter(Boolean);
|
|
31
|
+
export const getTransactionRecordsQueryKey = (input) => [PARENT_KEY, 'transactionRecords', input].filter(Boolean);
|
|
32
|
+
export const getMessagesQueryKey = (input) => [PARENT_KEY, 'messages', input].filter(Boolean);
|
|
33
|
+
export const getWalletQueryKey = () => [PARENT_KEY, 'wallet'].filter(Boolean);
|
|
34
|
+
export const getWithdrawalRecordsQueryKey = (input) => [PARENT_KEY, 'withdrawalRecords', input].filter(Boolean);
|
|
35
|
+
export const getUnreadMessagesCountQueryKey = (input) => [PARENT_KEY, 'unreadMessagesCount', input].filter(Boolean);
|
|
36
|
+
export const getBonusQueryKey = (id) => [PARENT_KEY, 'bonus', id].filter(Boolean);
|
|
37
|
+
export const getCashbackBonusQueryKey = (id) => [PARENT_KEY, 'cashbackBonus', id].filter(Boolean);
|
|
38
|
+
export const getBonusesQueryKey = () => [PARENT_KEY, 'bonuses'].filter(Boolean);
|
|
39
|
+
export const getBonusesCountQueryKey = () => [PARENT_KEY, 'bonusesCount'].filter(Boolean);
|
|
40
|
+
export const getAvailableQuestsCountQueryKey = () => [PARENT_KEY, 'availableQuestsCount'].filter(Boolean);
|
|
41
|
+
export const getOnboardingStatusQueryKey = () => [PARENT_KEY, 'onboardingStatus'].filter(Boolean);
|
|
42
|
+
export const getRecommendedGamesQueryKey = () => [PARENT_KEY, 'recommendedGames'].filter(Boolean);
|
|
43
|
+
export const getFileQueryKey = (id) => [PARENT_KEY, 'file', id].filter(Boolean);
|
|
44
|
+
export const getSiteQueryKey = () => [PARENT_KEY, 'site', SITE_ID].filter(Boolean);
|