@opexa/portal-components 0.0.429 → 0.0.431
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/AccountInfo/GoogleDisconnect.d.ts +7 -0
- package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
- package/dist/components/BetRecords/BetRecords.client.js +3 -2
- package/dist/components/Disclaimer/DisclaimerV1.js +9 -9
- package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
- package/dist/components/SignIn/SignIn.lazy.js +1 -1
- package/dist/components/SignUp/SignUpDefault/SignUpDefault.lazy.js +1 -1
- package/dist/components/TopWins/TopWins.client.d.ts +9 -1
- package/dist/components/TopWins/TopWins.client.js +8 -3
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +5 -2
- package/dist/icons/LinkBrokenIcon.d.ts +2 -0
- package/dist/icons/LinkBrokenIcon.js +4 -0
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/package.json +1 -1
- package/dist/components/Banner/Banner.client.d.ts +0 -12
- package/dist/components/Banner/Banner.client.js +0 -49
- package/dist/components/SignIn/utils.d.ts +0 -8
- package/dist/components/SignIn/utils.js +0 -26
- package/dist/constants/Branches.d.ts +0 -2
- package/dist/constants/Branches.js +0 -42
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +0 -1
- package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
- package/dist/third-parties/FacebookPixel/index.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
- package/dist/third-parties/index.d.ts +0 -2
- package/dist/third-parties/index.js +0 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type UseDisclosureReturn } from '../../client/hooks/useDisclosure';
|
|
2
|
+
interface GoogleDisconnectProps {
|
|
3
|
+
onConfirmAction?: (ctx: UseDisclosureReturn) => React.ReactNode;
|
|
4
|
+
children?: (ctx: UseDisclosureReturn) => React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function GoogleDisconnect(props: GoogleDisconnectProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useDisclosure, } from '../../client/hooks/useDisclosure.js';
|
|
4
|
+
import { LinkBrokenIcon } from '../../icons/LinkBrokenIcon.js';
|
|
5
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
6
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
7
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
8
|
+
export function GoogleDisconnect(props) {
|
|
9
|
+
const disclosure = useDisclosure();
|
|
10
|
+
return (_jsxs(_Fragment, { children: [props.children?.(disclosure), _jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: disclosure.open, onOpenChange: (details) => disclosure.setOpen(details.open), 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: "mx-auto min-h-auto max-w-[25rem] overflow-y-auto rounded-xl p-6", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col ", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(LinkBrokenIcon, {}) }), _jsx("h2", { className: "mb-1 text-center font-semibold text-lg xl:mt-xl", children: "Disconnect Google Account" }), _jsx("p", { className: "text-center text-sm text-text-tertiary-600 leading-2xl", children: "Are you sure you want to disconnect your Google account? This may affect your ability to log in or sync data." })] }), _jsx("div", { className: "pt-6", children: props.onConfirmAction?.(disclosure) })] }) })] }) })] }));
|
|
11
|
+
}
|
|
@@ -140,7 +140,7 @@ export function BetRecords__client(props) {
|
|
|
140
140
|
e.stopPropagation();
|
|
141
141
|
}, children: "Clear" }) })) : (_jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })) })) })] }), _jsx(Portal, { children: _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: providerCollection.items.map((provider) => (_jsxs(Select.Item, { item: provider, children: [_jsx(Select.ItemText, { children: provider.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, provider.id))) }) }) }) })] }), _jsxs(Select.Root, { collection: statusCollection, value: state.status ? [state.status] : [], onValueChange: (details) => {
|
|
142
142
|
const value = z
|
|
143
|
-
.enum(
|
|
143
|
+
.enum(STATUSES)
|
|
144
144
|
.safeParse(details.value.at(0)).data;
|
|
145
145
|
firstPage();
|
|
146
146
|
setState({
|
|
@@ -185,8 +185,9 @@ export function BetRecords__client(props) {
|
|
|
185
185
|
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
186
186
|
}) }) }) }), _jsx(Table.Cell, { className: "!py-1", children: data.game.name }), _jsx(Table.Cell, { className: "!py-1", children: data.vendorRoundId })] }, data.id))) })] }) }), _jsxs("div", { className: "flex items-center justify-between gap-lg px-4 py-3", children: [_jsx(IconButton, { size: "xs", variant: "outline", colorScheme: "gray", disabled: !hasPrevPage || loading, onClick: () => prev(), children: _jsx(ChevronLeftIcon, { className: "size-5" }) }), _jsxs("p", { className: "font-medium text-sm text-text-secondary-700", children: ["Page ", page, " of ", totalPages] }), _jsx(IconButton, { size: "xs", variant: "outline", colorScheme: "gray", disabled: !hasNextPage || loading, onClick: () => next(), children: _jsx(ChevronRightIcon, { className: "size-5" }) })] })] }))] }));
|
|
187
187
|
}
|
|
188
|
+
const STATUSES = ['CANCELLED', 'SETTLED', 'STARTED'];
|
|
188
189
|
const statusCollection = createListCollection({
|
|
189
|
-
items:
|
|
190
|
+
items: STATUSES,
|
|
190
191
|
itemToValue: (item) => item,
|
|
191
192
|
itemToString: (item) => capitalize(item, {
|
|
192
193
|
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
@@ -24,21 +24,21 @@ export function DisclaimerV1(props) {
|
|
|
24
24
|
})));
|
|
25
25
|
const checked = globalStore.termsOfUse.accepted;
|
|
26
26
|
const [warn, setWarn] = useState(false);
|
|
27
|
-
return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:
|
|
27
|
+
return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:max-h-[80vh] lg:w-[400px] lg:rounded-xl", style: { msOverflowStyle: 'none', scrollbarWidth: 'none' }, children: [_jsx(Image, { src: props.logo, alt: "", width: 142, height: 30, className: "mx-auto h-auto w-[8.875rem]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 74, width: 88, className: "h-[5.5rem] w-auto shrink-0", draggable: false }), _jsx(Image, { src: responsibleGamingLogo, alt: "", height: 62, width: 185, className: "h-[3.875rem] w-auto shrink-0", draggable: false })] }), _jsx("p", { className: "mt-4 text-center text-sm", children: "The following individuals are prohibited from registering or participating in this online gaming platform." }), _jsx("div", { className: "mt-5", children: _jsx("ul", { className: "space-y-1", children: items.map((item, index) => (_jsxs("li", { className: "flex items-start gap-md text-sm text-text-secondary-700", children: [_jsx("div", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full bg-bg-brand-solid", children: _jsx("div", { className: "size-1.5 rounded-full bg-cyan-950" }) }), item] }, index))) }) }), _jsxs(Field.Root, { invalid: warn, className: "mt-2xl", children: [_jsxs(Checkbox.Root, { checked: checked, onCheckedChange: (e) => {
|
|
28
28
|
if (e.checked === 'indeterminate')
|
|
29
29
|
return;
|
|
30
30
|
globalStore.termsOfUse.setAccepted(e.checked);
|
|
31
31
|
setWarn(!e.checked);
|
|
32
32
|
}, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsxs(Checkbox.Label, { className: "text-sm", children: ["I am at least 21 years of age, I accept the", ' ', _jsx(Link, { href: props.termsOfUseUrl ?? '/terms-of-use', className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
33
33
|
globalStore.termsOfUse.setOpen(false);
|
|
34
|
-
}, children: "Terms of Use" }), ' ', "and I am not playing in open or public space."] }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.ErrorText, { className: "!mt-2xl flex items-center justify-center gap-2 text-error-600 text-sm", children: [_jsx(AlertCircleIcon, { className: "size-4 shrink-0 text-error-600" }), "Please agree to ", props.siteName, "\u2019s Terms of Use to proceed."] })] }), _jsx("p", { className: "mt-2xl text-sm", children: "Funds or credits in the account of any individual found ineligible to participate will be forfeited and turned over to the government as required by law." })
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
}, children: "Terms of Use" }), ' ', "and I am not playing in open or public space."] }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.ErrorText, { className: "!mt-2xl flex items-center justify-center gap-2 text-error-600 text-sm", children: [_jsx(AlertCircleIcon, { className: "size-4 shrink-0 text-error-600" }), "Please agree to ", props.siteName, "\u2019s Terms of Use to proceed."] })] }), _jsx("p", { className: "mt-2xl text-sm", children: "Funds or credits in the account of any individual found ineligible to participate will be forfeited and turned over to the government as required by law." }), _jsxs("div", { className: "flex w-full flex-col gap-lg", children: [_jsx(Button, { ref: acceptTriggerRef, type: "button", className: "mt-4xl", onClick: disclaimer.close, disabled: !checked, children: "Accept" }), _jsx(Button, { variant: "outline", type: "button", className: "mt-lg", onClick: () => {
|
|
35
|
+
if (!checked) {
|
|
36
|
+
setWarn(true);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
disclaimer.close();
|
|
40
|
+
}
|
|
41
|
+
}, children: "Exit" })] })] })] }) })] }) }));
|
|
42
42
|
}
|
|
43
43
|
const items = [
|
|
44
44
|
'Persons below the legal gambling age of 21.',
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { addHours } from 'date-fns';
|
|
3
3
|
import { clamp } from 'lodash-es';
|
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
|
4
5
|
import { useLocalStorage, useTimeout } from 'usehooks-ts';
|
|
5
6
|
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
6
7
|
export function CXDTokenObserver() {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const [cxd, setCxd, removeCxd] = useLocalStorage('
|
|
8
|
+
const searchParams = useSearchParams();
|
|
9
|
+
const cxdToken = searchParams.get('cxd');
|
|
10
|
+
const accountQuery = useAccountQuery();
|
|
11
|
+
const account = accountQuery.data;
|
|
12
|
+
const [cxd, setCxd, removeCxd] = useLocalStorage('WebPortalCellxpertCxd', null);
|
|
12
13
|
const now = new Date();
|
|
14
|
+
const shouldTimeoutRun = cxdToken && account;
|
|
13
15
|
const removeCxdUntilInMs = cxd?.timestamp
|
|
14
16
|
? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
|
|
15
17
|
: 0;
|
|
16
18
|
useTimeout(() => {
|
|
17
|
-
const isSame = cxd?.cxd ===
|
|
19
|
+
const isSame = cxd?.cxd === cxdToken;
|
|
18
20
|
if (!isSame) {
|
|
19
21
|
const extendedTimestamp = addHours(new Date(), 6).getTime();
|
|
20
22
|
setCxd({
|
|
21
|
-
cxd:
|
|
23
|
+
cxd: cxdToken,
|
|
22
24
|
timestamp: extendedTimestamp,
|
|
23
25
|
});
|
|
24
26
|
}
|
|
25
|
-
},
|
|
26
|
-
useTimeout(() =>
|
|
27
|
-
removeCxd();
|
|
28
|
-
}, account ? removeCxdUntilInMs : null);
|
|
27
|
+
}, shouldTimeoutRun ? 100 : null);
|
|
28
|
+
useTimeout(() => removeCxd(), shouldTimeoutRun ? removeCxdUntilInMs : null);
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
@@ -23,5 +23,5 @@ export function SignIn(props) {
|
|
|
23
23
|
// Reset checkbox state when dialog closes
|
|
24
24
|
globalStore.termsAndConditions.setAccepted(false);
|
|
25
25
|
globalStore.responsibleGaming.setAccepted(false);
|
|
26
|
-
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('mx-auto h-full w-full items-start overflow-y-auto bg-bg-primary-alt p-3xl pb-4xl lg:
|
|
26
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('mx-auto h-full w-full items-start overflow-y-auto bg-bg-primary-alt p-3xl pb-4xl lg:h-auto lg:max-h-[80vh] lg:w-[400px] lg:rounded-xl', props.className?.root), style: { msOverflowStyle: 'none', scrollbarWidth: 'none' }, children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-7.5 w-auto", draggable: false }), _jsx(SignInForm, {})] }) })] }) }) }) }));
|
|
27
27
|
}
|
|
@@ -22,5 +22,5 @@ export function SignUpDefault(props) {
|
|
|
22
22
|
// Reset checkbox state when dialog closes
|
|
23
23
|
globalStore.termsAndConditions.setAccepted(false);
|
|
24
24
|
globalStore.responsibleGaming.setAccepted(false);
|
|
25
|
-
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('mx-auto h-full w-full items-start overflow-y-auto bg-bg-primary-alt p-3xl pb-4xl lg:
|
|
25
|
+
}, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('mx-auto h-full w-full items-start overflow-y-auto bg-bg-primary-alt p-3xl pb-4xl lg:h-auto lg:max-h-[80vh] lg:w-[400px] lg:rounded-xl', 'scrollbar:h-2 scrollbar:w-2 scrollbar-thumb:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent', props.className?.root), style: { msOverflowStyle: 'none', scrollbarWidth: 'none' }, children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsx(Suspense, { children: _jsx(SignUpDefaultForm, {}) })] }) })] }) }) }));
|
|
26
26
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ClassNameEntries {
|
|
3
|
+
root?: string;
|
|
4
|
+
card?: string;
|
|
5
|
+
image?: string;
|
|
6
|
+
playerName?: string;
|
|
7
|
+
amount?: string;
|
|
8
|
+
multiplier?: string;
|
|
9
|
+
}
|
|
2
10
|
export interface TopWinsProps {
|
|
3
11
|
/** @default "Recent Big Wins" */
|
|
4
12
|
heading?: string | ReactNode;
|
|
5
|
-
className?: string;
|
|
13
|
+
className?: string | ClassNameEntries;
|
|
6
14
|
}
|
|
7
15
|
export declare function TopWins__client(props: TopWinsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
4
|
+
import { isString } from 'lodash-es';
|
|
4
5
|
import Image from 'next/image';
|
|
6
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
7
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
6
8
|
import { useTopWinsQuery } from '../../client/hooks/useTopWinsQuery.js';
|
|
7
9
|
import { formatNumber } from '../../utils/formatNumber.js';
|
|
@@ -16,13 +18,16 @@ export function TopWins__client(props) {
|
|
|
16
18
|
});
|
|
17
19
|
if (!topWins?.length)
|
|
18
20
|
return null;
|
|
19
|
-
|
|
21
|
+
const classNames = isString(props.className)
|
|
22
|
+
? { root: props.className }
|
|
23
|
+
: (props.className ?? {});
|
|
24
|
+
return (_jsxs("div", { className: twMerge('w-full', classNames.root), children: [_jsx("div", { className: twMerge('mb-3 font-semibold text-lg md:mb-4'), children: props.heading ?? 'Recent Big Wins' }), _jsx("div", { ref: emblaRef, className: twMerge('relative lg:overflow-hidden'), children: _jsx("div", { className: twMerge('flex gap-sm lg:gap-md'), children: topWins.map((topWin) => (_jsxs("div", { className: twMerge('flex w-[calc((100%-(0.375rem*2))/3)] shrink-0 flex-col space-y-2 rounded-sm border border-border-primary bg-bg-tertiary p-2 text-center lg:w-[calc((100%-(0.5rem*5))/6)] xl:w-[calc((100%-(0.5rem*9))/10)]', classNames.card), children: [_jsx("div", { className: twMerge('mx-auto aspect-square w-full', classNames.image), children: topWin.game && (_jsx(Image, { src: getGameImageUrl({
|
|
20
25
|
id: topWin.game.id,
|
|
21
26
|
provider: topWin.game.provider,
|
|
22
|
-
}), alt: "", width: 120, height: 120, loading: "lazy", unoptimized: true, className:
|
|
27
|
+
}), alt: "", width: 120, height: 120, loading: "lazy", unoptimized: true, className: twMerge('size-full rounded-sm object-cover', classNames.image) })) }), _jsxs("div", { className: twMerge('space-y-0.5'), children: [_jsx("div", { className: twMerge('text-text-secondary-700 text-xs', classNames.playerName), children: topWin.member.name }), _jsx("div", { className: twMerge('break-words font-semibold text-sm text-text-primary-brand', classNames.amount), children: formatNumber(topWin.payout, {
|
|
23
28
|
currency: localeInfo.currency.code,
|
|
24
29
|
minDecimalPlaces: 2,
|
|
25
|
-
}) }), _jsxs("div", { className:
|
|
30
|
+
}) }), _jsxs("div", { className: twMerge('break-words text-text-secondary-700 text-xs', classNames.multiplier), children: [formatNumber(topWin.multiplier, {
|
|
26
31
|
minDecimalPlaces: 2,
|
|
27
32
|
}), "x"] })] })] }, topWin.id))) }) })] }));
|
|
28
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { TZDateMini, tz } from '@date-fns/tz';
|
|
4
4
|
import { endOfDay, format, startOfDay } from 'date-fns';
|
|
5
5
|
import { useReducer } from 'react';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -55,7 +55,7 @@ export function TransactionRecordsTable() {
|
|
|
55
55
|
transactionType: true,
|
|
56
56
|
} }), rows.length <= 0 && (_jsx(Empty, { icon: loading ? SpinnerIcon : File02Icon, title: loading ? 'Just a moment' : 'No data', message: loading
|
|
57
57
|
? 'Fetching latest transaction records...'
|
|
58
|
-
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', 'bleed', 'lg:not-bleed', 'lg:mt-3xl', 'lg:w-full', 'lg:rounded-xl', 'lg:border-x'), children: [_jsx("div", { className: "scrollbar:h-2 overflow-hidden overflow-x-auto rounded-none scrollbar-thumb:rounded-full border-border-secondary border-b scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent lg:rounded-t-xl", children: _jsxs(Table.Root, { className: "border-0", children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.Heading, { children: "Transaction Type" }), _jsx(Table.Heading, { children: "Transaction Time" }), _jsx(Table.Heading, { children: "Transaction Amount" }), _jsx(Table.Heading, { children: "Current Balance" }), _jsx(Table.Heading, { children: "Reference Number" })] }) }), _jsx(Table.Body, { children: rows.map((data) => (_jsxs(Table.Row, { children: [_jsx(Table.Cell, { className: "!py-1", children: capitalize(data.type, {
|
|
58
|
+
: 'No data is currently available.', className: "mt-5xl" })), rows.length >= 1 && (_jsxs("div", { className: twMerge('mt-xl', 'border-y', 'border-border-secondary', 'bleed', 'lg:not-bleed', 'lg:mt-3xl', 'lg:w-full', 'lg:rounded-xl', 'lg:border-x'), children: [_jsx("div", { className: "scrollbar:h-2 overflow-hidden overflow-x-auto rounded-none scrollbar-thumb:rounded-full border-border-secondary border-b scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent lg:rounded-t-xl", children: _jsxs(Table.Root, { className: "border-0", children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.Heading, { children: "Transaction Type" }), _jsx(Table.Heading, { children: "Transaction Time" }), _jsx(Table.Heading, { children: "Transaction Amount" }), _jsx(Table.Heading, { children: "Current Balance" }), _jsx(Table.Heading, { children: "Bonus Balance" }), _jsx(Table.Heading, { children: "Reference Number" })] }) }), _jsx(Table.Body, { children: rows.map((data) => (_jsxs(Table.Row, { children: [_jsx(Table.Cell, { className: "!py-1", children: capitalize(data.type, {
|
|
59
59
|
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
60
60
|
}) }), _jsxs(Table.Cell, { className: "!py-1", children: [_jsx("div", { className: "leading-tight", children: format(data.dateTimeCreated, 'MM/dd/yyyy', {
|
|
61
61
|
in: tz(localeInfo.timezone),
|
|
@@ -67,5 +67,8 @@ export function TransactionRecordsTable() {
|
|
|
67
67
|
}) }), _jsx(Table.Cell, { className: "!py-1", children: formatNumber(data.currentBalance, {
|
|
68
68
|
currency: localeInfo.currency.code,
|
|
69
69
|
minDecimalPlaces: 2,
|
|
70
|
+
}) }), _jsx(Table.Cell, { className: "!py-1", children: formatNumber(data.currentBonusBalance, {
|
|
71
|
+
currency: localeInfo.currency.code,
|
|
72
|
+
minDecimalPlaces: 2,
|
|
70
73
|
}) }), _jsx(Table.Cell, { className: "!py-1", children: data.referenceNumber })] }, data.id))) })] }) }), _jsxs("div", { className: "flex items-center justify-between gap-lg px-4 py-3", children: [_jsx(IconButton, { size: "xs", variant: "outline", colorScheme: "gray", disabled: !hasPrevPage || loading, onClick: () => prev(), children: _jsx(ChevronLeftIcon, { className: "size-5" }) }), _jsxs("p", { className: "font-medium text-sm text-text-secondary-700", children: ["Page ", page, " of ", totalPages] }), _jsx(IconButton, { size: "xs", variant: "outline", colorScheme: "gray", disabled: !hasNextPage || loading, onClick: () => next(), children: _jsx(ChevronRightIcon, { className: "size-5" }) })] })] }))] }));
|
|
71
74
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function LinkBrokenIcon(props) {
|
|
3
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", ...props, children: _jsx("path", { d: "M8.5 15.5L15.5 8.49998M9 4V2M15 20V22M4 9H2M20 15H22M4.91421 4.91421L3.5 3.5M19.0858 19.0857L20.5 20.4999M12 17.6568L9.87871 19.7781C8.31662 21.3402 5.78396 21.3402 4.22186 19.7781C2.65976 18.216 2.65976 15.6833 4.22186 14.1212L6.34318 11.9999M17.6569 11.9999L19.7782 9.87859C21.3403 8.31649 21.3403 5.78383 19.7782 4.22174C18.2161 2.65964 15.6835 2.65964 14.1214 4.22174L12 6.34306", stroke: "#FEDF89", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
4
|
+
}
|
package/dist/ui/Table/Table.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
12
12
|
body: string;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
15
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, {
|
|
16
16
|
size: {
|
|
17
17
|
md: {
|
|
18
18
|
root: string;
|
|
@@ -26,7 +26,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
26
26
|
body: string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
29
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
30
30
|
size: {
|
|
31
31
|
md: {
|
|
32
32
|
root: string;
|
|
@@ -40,7 +40,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
40
40
|
body: string;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
43
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
44
44
|
export declare const Header: import("react").ComponentType<import("@ark-ui/react").Assign<import("react").ClassAttributes<HTMLTableSectionElement> & import("react").HTMLAttributes<HTMLTableSectionElement> & import("@ark-ui/react").PolymorphicProps, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
45
45
|
size: {
|
|
46
46
|
md: {
|
|
@@ -55,7 +55,7 @@ export declare const Header: import("react").ComponentType<import("@ark-ui/react
|
|
|
55
55
|
body: string;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
58
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, {
|
|
59
59
|
size: {
|
|
60
60
|
md: {
|
|
61
61
|
root: string;
|
|
@@ -69,7 +69,7 @@ export declare const Header: import("react").ComponentType<import("@ark-ui/react
|
|
|
69
69
|
body: string;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
72
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
73
73
|
size: {
|
|
74
74
|
md: {
|
|
75
75
|
root: string;
|
|
@@ -83,7 +83,7 @@ export declare const Header: import("react").ComponentType<import("@ark-ui/react
|
|
|
83
83
|
body: string;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
86
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
87
87
|
export declare const Body: import("react").ComponentType<import("@ark-ui/react").Assign<import("react").ClassAttributes<HTMLTableSectionElement> & import("react").HTMLAttributes<HTMLTableSectionElement> & import("@ark-ui/react").PolymorphicProps, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
88
88
|
size: {
|
|
89
89
|
md: {
|
|
@@ -98,7 +98,7 @@ export declare const Body: import("react").ComponentType<import("@ark-ui/react")
|
|
|
98
98
|
body: string;
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
101
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, {
|
|
102
102
|
size: {
|
|
103
103
|
md: {
|
|
104
104
|
root: string;
|
|
@@ -112,7 +112,7 @@ export declare const Body: import("react").ComponentType<import("@ark-ui/react")
|
|
|
112
112
|
body: string;
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
115
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
116
116
|
size: {
|
|
117
117
|
md: {
|
|
118
118
|
root: string;
|
|
@@ -126,7 +126,7 @@ export declare const Body: import("react").ComponentType<import("@ark-ui/react")
|
|
|
126
126
|
body: string;
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
129
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
130
130
|
export declare const Footer: import("react").ComponentType<import("@ark-ui/react").Assign<import("react").ClassAttributes<HTMLTableSectionElement> & import("react").HTMLAttributes<HTMLTableSectionElement> & import("@ark-ui/react").PolymorphicProps, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
131
131
|
size: {
|
|
132
132
|
md: {
|
|
@@ -141,7 +141,7 @@ export declare const Footer: import("react").ComponentType<import("@ark-ui/react
|
|
|
141
141
|
body: string;
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
144
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, {
|
|
145
145
|
size: {
|
|
146
146
|
md: {
|
|
147
147
|
root: string;
|
|
@@ -155,7 +155,7 @@ export declare const Footer: import("react").ComponentType<import("@ark-ui/react
|
|
|
155
155
|
body: string;
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
158
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
159
159
|
size: {
|
|
160
160
|
md: {
|
|
161
161
|
root: string;
|
|
@@ -169,7 +169,7 @@ export declare const Footer: import("react").ComponentType<import("@ark-ui/react
|
|
|
169
169
|
body: string;
|
|
170
170
|
};
|
|
171
171
|
};
|
|
172
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
172
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
173
173
|
export declare const Row: import("react").ComponentType<import("@ark-ui/react").Assign<import("react").ClassAttributes<HTMLTableRowElement> & import("react").HTMLAttributes<HTMLTableRowElement> & import("@ark-ui/react").PolymorphicProps, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
174
174
|
size: {
|
|
175
175
|
md: {
|
|
@@ -184,7 +184,7 @@ export declare const Row: import("react").ComponentType<import("@ark-ui/react").
|
|
|
184
184
|
body: string;
|
|
185
185
|
};
|
|
186
186
|
};
|
|
187
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
187
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, {
|
|
188
188
|
size: {
|
|
189
189
|
md: {
|
|
190
190
|
root: string;
|
|
@@ -198,7 +198,7 @@ export declare const Row: import("react").ComponentType<import("@ark-ui/react").
|
|
|
198
198
|
body: string;
|
|
199
199
|
};
|
|
200
200
|
};
|
|
201
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
201
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
202
202
|
size: {
|
|
203
203
|
md: {
|
|
204
204
|
root: string;
|
|
@@ -212,7 +212,7 @@ export declare const Row: import("react").ComponentType<import("@ark-ui/react").
|
|
|
212
212
|
body: string;
|
|
213
213
|
};
|
|
214
214
|
};
|
|
215
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
215
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
216
216
|
export declare const Heading: import("react").ComponentType<import("@ark-ui/react").Assign<import("react").ClassAttributes<HTMLTableHeaderCellElement> & import("react").ThHTMLAttributes<HTMLTableHeaderCellElement> & import("@ark-ui/react").PolymorphicProps, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
217
217
|
size: {
|
|
218
218
|
md: {
|
|
@@ -227,7 +227,7 @@ export declare const Heading: import("react").ComponentType<import("@ark-ui/reac
|
|
|
227
227
|
body: string;
|
|
228
228
|
};
|
|
229
229
|
};
|
|
230
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
230
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, {
|
|
231
231
|
size: {
|
|
232
232
|
md: {
|
|
233
233
|
root: string;
|
|
@@ -241,7 +241,7 @@ export declare const Heading: import("react").ComponentType<import("@ark-ui/reac
|
|
|
241
241
|
body: string;
|
|
242
242
|
};
|
|
243
243
|
};
|
|
244
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
244
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
245
245
|
size: {
|
|
246
246
|
md: {
|
|
247
247
|
root: string;
|
|
@@ -255,7 +255,7 @@ export declare const Heading: import("react").ComponentType<import("@ark-ui/reac
|
|
|
255
255
|
body: string;
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
258
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
259
259
|
export declare const Cell: import("react").ComponentType<import("@ark-ui/react").Assign<import("react").ClassAttributes<HTMLTableDataCellElement> & import("react").TdHTMLAttributes<HTMLTableDataCellElement> & import("@ark-ui/react").PolymorphicProps, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
260
260
|
size: {
|
|
261
261
|
md: {
|
|
@@ -270,7 +270,7 @@ export declare const Cell: import("react").ComponentType<import("@ark-ui/react")
|
|
|
270
270
|
body: string;
|
|
271
271
|
};
|
|
272
272
|
};
|
|
273
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
273
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, {
|
|
274
274
|
size: {
|
|
275
275
|
md: {
|
|
276
276
|
root: string;
|
|
@@ -284,7 +284,7 @@ export declare const Cell: import("react").ComponentType<import("@ark-ui/react")
|
|
|
284
284
|
body: string;
|
|
285
285
|
};
|
|
286
286
|
};
|
|
287
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
287
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
288
288
|
size: {
|
|
289
289
|
md: {
|
|
290
290
|
root: string;
|
|
@@ -298,4 +298,4 @@ export declare const Cell: import("react").ComponentType<import("@ark-ui/react")
|
|
|
298
298
|
body: string;
|
|
299
299
|
};
|
|
300
300
|
};
|
|
301
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
301
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const tableAnatomy: import("@ark-ui/react/anatomy").AnatomyInstance<"root" | "body" | "footer" | "header" | "
|
|
1
|
+
export declare const tableAnatomy: import("@ark-ui/react/anatomy").AnatomyInstance<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell">;
|
|
@@ -12,7 +12,7 @@ export declare const tableRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
12
12
|
body: string;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
15
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, {
|
|
16
16
|
size: {
|
|
17
17
|
md: {
|
|
18
18
|
root: string;
|
|
@@ -26,7 +26,7 @@ export declare const tableRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
26
26
|
body: string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
29
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
30
30
|
size: {
|
|
31
31
|
md: {
|
|
32
32
|
root: string;
|
|
@@ -40,4 +40,4 @@ export declare const tableRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
40
40
|
body: string;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
}, Record<"root" | "body" | "footer" | "header" | "
|
|
43
|
+
}, Record<"root" | "body" | "footer" | "header" | "heading" | "row" | "cell", string | string[]>, undefined, unknown, unknown, undefined>>;
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ImageProps } from 'next/image';
|
|
2
|
-
export interface BannerEntry {
|
|
3
|
-
src: ImageProps['src'];
|
|
4
|
-
redirectUrl?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface BannerProps {
|
|
7
|
-
banners: BannerEntry[];
|
|
8
|
-
imageWidth?: number | [mobile: number, desktop: number];
|
|
9
|
-
imageHeight?: number | [mobile: number, desktop: number];
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function Banner__client(props: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import emblaCarouselAutoplay from 'embla-carousel-autoplay';
|
|
4
|
-
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
5
|
-
import isMobile from 'is-mobile';
|
|
6
|
-
import Image from 'next/image';
|
|
7
|
-
import Link from 'next/link';
|
|
8
|
-
import { Fragment, useEffect, useState } from 'react';
|
|
9
|
-
import { twMerge } from 'tailwind-merge';
|
|
10
|
-
import { dataAttr } from '../../utils/dataAttr.js';
|
|
11
|
-
export function Banner__client(props) {
|
|
12
|
-
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
13
|
-
loop: true,
|
|
14
|
-
align: 'start',
|
|
15
|
-
}, [
|
|
16
|
-
emblaCarouselAutoplay({
|
|
17
|
-
playOnInit: true,
|
|
18
|
-
delay: 5000,
|
|
19
|
-
}),
|
|
20
|
-
]);
|
|
21
|
-
const [currentIndex, setCurrentIndex] = useState(0);
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
function handler(detail) {
|
|
24
|
-
setCurrentIndex(detail?.selectedScrollSnap() ?? 0);
|
|
25
|
-
}
|
|
26
|
-
emblaApi?.on('scroll', handler);
|
|
27
|
-
emblaApi?.on('init', handler);
|
|
28
|
-
return () => {
|
|
29
|
-
emblaApi?.on('init', handler);
|
|
30
|
-
emblaApi?.off('scroll', handler);
|
|
31
|
-
};
|
|
32
|
-
}, [emblaApi]);
|
|
33
|
-
const imageWidth = !props.imageWidth
|
|
34
|
-
? [400, 1200]
|
|
35
|
-
: Array.isArray(props.imageWidth)
|
|
36
|
-
? props.imageWidth
|
|
37
|
-
: [props.imageWidth, props.imageWidth];
|
|
38
|
-
const imageHeight = !props.imageHeight
|
|
39
|
-
? [225, 300]
|
|
40
|
-
: Array.isArray(props.imageHeight)
|
|
41
|
-
? props.imageHeight
|
|
42
|
-
: [props.imageHeight, props.imageHeight];
|
|
43
|
-
return (_jsxs("div", { className: twMerge('relative', props.className), children: [_jsx("div", { ref: emblaRef, className: "overflow-hidden", children: _jsx("div", { className: "flex gap-2", children: props.banners.map((banner, index) => {
|
|
44
|
-
const img = (_jsx(Image, { src: banner.src, alt: "", width: isMobile() ? imageWidth[0] : imageWidth[1], height: isMobile() ? imageHeight[0] : imageHeight[1], className: "block h-auto w-full", priority: index === 0 }));
|
|
45
|
-
return (_jsx(Fragment, { children: !banner.redirectUrl ? (_jsx("div", { className: "w-full shrink-0", children: img })) : (_jsx(Link, { href: banner.redirectUrl, className: "block w-full shrink-0", "aria-label": `Open ${banner.redirectUrl}`, children: img })) }, index));
|
|
46
|
-
}) }) }), _jsx("div", { className: "absolute bottom-lg left-1/2 flex w-fit -translate-x-1/2 gap-2", children: props.banners.map((_, index) => (_jsx("button", { type: "button", className: "ui-active:bg-brand-500 bg-gray-300 size-3 shrink-0 rounded-full border border-white transition-all duration-300 ui-active:w-9", onClick: () => {
|
|
47
|
-
emblaApi?.scrollTo(index);
|
|
48
|
-
}, "aria-label": `Go to slide ${index + 1}`, "data-active": dataAttr(index === currentIndex) }, index))) })] }));
|
|
49
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type Options = {
|
|
2
|
-
accountName?: string;
|
|
3
|
-
siteName?: string;
|
|
4
|
-
signInOptions?: 'MOBILE_NUMBER' | 'NAME_AND_PASSWORD';
|
|
5
|
-
};
|
|
6
|
-
export type ErrorCode = 'MEMBER_ACCOUNT_BLACKLISTED' | 'MEMBER_ACCOUNT_SUSPENDED' | 'INVALID_RECAPTCHA_RESPONSE' | 'MEMBER_NOT_FOUND' | 'RATE_LIMIT_REACH' | 'NOT_READY_TO_SEND_VERIFICATION_ERROR' | 'Forbidden';
|
|
7
|
-
export declare function getFriendlyErrorMessage(code: ErrorCode, options?: Options): string;
|
|
8
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export function getFriendlyErrorMessage(code, options) {
|
|
2
|
-
const accountName = options?.accountName ?? '';
|
|
3
|
-
const siteName = options?.siteName ?? '';
|
|
4
|
-
const signInOptions = options?.signInOptions ?? 'NAME_AND_PASSWORD';
|
|
5
|
-
switch (code) {
|
|
6
|
-
case 'MEMBER_ACCOUNT_BLACKLISTED':
|
|
7
|
-
return `Your account ${accountName} has been blacklisted due to a serious violation of our policies. For more information or to appeal, please contact the ${siteName} Chat Support team.`;
|
|
8
|
-
case 'MEMBER_ACCOUNT_SUSPENDED':
|
|
9
|
-
return `Your account ${accountName} has been temporarily suspended. Please reach out to the ${siteName} Chat Support team to learn more and get help with resolving the issue.`;
|
|
10
|
-
case 'INVALID_RECAPTCHA_RESPONSE':
|
|
11
|
-
return 'Invalid reCAPTCHA response';
|
|
12
|
-
case 'MEMBER_NOT_FOUND':
|
|
13
|
-
return 'Account not found. Please check your username and try again.';
|
|
14
|
-
case 'RATE_LIMIT_REACH':
|
|
15
|
-
return 'Rate limit exceeded';
|
|
16
|
-
case 'NOT_READY_TO_SEND_VERIFICATION_ERROR':
|
|
17
|
-
return 'Your account is not ready to send verification requests. Please try again later.';
|
|
18
|
-
case 'Forbidden':
|
|
19
|
-
if (signInOptions === 'MOBILE_NUMBER') {
|
|
20
|
-
return 'Invalid verification code. Please check the code and try again.';
|
|
21
|
-
}
|
|
22
|
-
return 'Invalid username or password, please try again.';
|
|
23
|
-
default:
|
|
24
|
-
return 'Something went wrong. Please try again later.';
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export const BRANCHES = [
|
|
2
|
-
{
|
|
3
|
-
code: 'BRCAL',
|
|
4
|
-
name: 'Bingo Republic 2nd floor Primark Center Deparo St., Caloocan City',
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
code: 'BRNAG',
|
|
8
|
-
name: 'Bingo Republic 3rd floor Robinsons Mall, Naga City, Camarines Sur',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
code: 'BRANT',
|
|
12
|
-
name: 'Bingo Republic 2nd floor Robinsons Mall, San Vicente,Antique',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
code: 'BRCLA',
|
|
16
|
-
name: 'Clark',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
code: 'BRLAG',
|
|
20
|
-
name: 'Laguna',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
code: 'BREAS',
|
|
24
|
-
name: 'Eastwood City, Quezon City',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
code: 'BRMAR',
|
|
28
|
-
name: 'Bingo ng Bayan 4th floor Marikina Public Market, Marikina City',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
code: 'BRILO',
|
|
32
|
-
name: 'Iloilo',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
code: 'BRFIM',
|
|
36
|
-
name: 'Fisher Mall,Quezon City',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
code: 'BRCAC',
|
|
40
|
-
name: 'Villa Caceres Hotel, Naga City,Camsur',
|
|
41
|
-
},
|
|
42
|
-
];
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FacebookPixel';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FacebookPixel.js';
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GoogleRecaptcha';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GoogleRecaptcha.js';
|