@opexa/portal-components 0.1.74 → 0.1.79
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/README.md +238 -0
- package/dist/client/hooks/useGlobalStore.d.ts +2 -8
- package/dist/client/hooks/useGlobalStore.js +1 -27
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +9 -1
- package/dist/client/hooks/useSignInMutation.js +2 -7
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +1 -1
- package/dist/client/hooks/useUpdateSessionMutation.js +1 -0
- package/dist/components/ForgotPassword/Crazywin/ForgotPassword.module.css +42 -42
- package/dist/components/Jackpots/Jackpots.module.css +288 -288
- package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
- package/dist/components/KYC/KYCNonPagCor/KYCVerificationStatus.lazy.js +2 -2
- package/dist/components/PortalProvider/SessionWatcher.js +19 -22
- package/dist/components/Promos/PromoCardClassNames.d.ts +11 -0
- package/dist/components/Promos/PromoCardClassNames.js +6 -0
- package/dist/components/SignIn/CrazyWin/MobileNumberSignIn.js +1 -0
- package/dist/components/SignIn/CrazyWin/NameAndPasswordSignIn.js +1 -0
- package/dist/components/SignIn/HappyBingo/MobileNumberSignIn.js +1 -0
- package/dist/components/SignIn/HappyBingo/NameAndPasswordSignIn.js +1 -0
- package/dist/components/SignIn/MobileNumberSignIn.js +2 -5
- package/dist/components/SignIn/SignIn.js +5 -1
- package/dist/components/SignIn/SignIn.lazy.d.ts +1 -1
- package/dist/components/SignIn/SignIn.lazy.js +16 -12
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultForm.js +13 -26
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultFormInternational.js +4 -11
- package/dist/components/TermsOfUse/TermsOfUseV2.lazy.js +4 -1
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/constants/StorageKey.d.ts +1 -0
- package/dist/constants/StorageKey.js +1 -0
- package/dist/handlers/deleteSession.js +2 -1
- package/dist/handlers/getSession.js +17 -1
- package/dist/images/phone-icon.svg +10 -10
- package/dist/middleware.js +11 -2
- package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
- package/dist/server/services/signOut.js +2 -1
- package/dist/services/account.d.ts +2 -6
- package/dist/services/account.js +0 -1
- package/dist/services/queries.d.ts +1 -1
- package/dist/services/queries.js +3613 -3617
- package/dist/styles/theme.css +776 -776
- package/dist/types/index.d.ts +3 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Carousel/Carousel.d.ts +99 -99
- package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +144 -144
- package/dist/ui/Menu/menu.recipe.d.ts +8 -8
- package/dist/ui/Popover/Popover.d.ts +121 -121
- package/dist/ui/Popover/popover.recipe.d.ts +11 -11
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- 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/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/utils/session-invalid-reason.d.ts +3 -0
- package/dist/utils/session-invalid-reason.js +19 -0
- package/package.json +1 -1
- package/dist/components/BetDepositLimit/betDepositLimitStore.d.ts +0 -24
- package/dist/components/BetDepositLimit/betDepositLimitStore.js +0 -51
- package/dist/components/ResponsibleGamingLimits/ResponsibleGamingLimits.lazy.d.ts +0 -1
- package/dist/components/ResponsibleGamingLimits/ResponsibleGamingLimits.lazy.js +0 -117
- package/dist/components/UpdateMobilePhoneNumber/hooks/useAutoOpenWhenUnverified.d.ts +0 -6
- package/dist/components/UpdateMobilePhoneNumber/hooks/useAutoOpenWhenUnverified.js +0 -31
- package/dist/handlers/v4Cookies.d.ts +0 -9
- package/dist/handlers/v4Cookies.js +0 -49
- package/dist/images/game-providers/SEXYCASINO.webp +0 -0
- package/dist/utils/get-fingerprint.d.ts +0 -8
- package/dist/utils/get-fingerprint.js +0 -37
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useEffect, useRef } from 'react';
|
|
3
|
-
import { useShallow } from 'zustand/shallow';
|
|
4
|
-
import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
|
|
5
|
-
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
6
|
-
/**
|
|
7
|
-
* Opens the UpdateMobilePhoneNumber dialog automatically (once per mount) if
|
|
8
|
-
* the account has finished loading and the user's mobile number is not yet
|
|
9
|
-
* verified. Closes it if it is verified.
|
|
10
|
-
*/
|
|
11
|
-
export function useAutoOpenWhenUnverified() {
|
|
12
|
-
const { setOpen } = useGlobalStore(useShallow((ctx) => ({
|
|
13
|
-
setOpen: ctx.updateMobilePhoneNumber.setOpen,
|
|
14
|
-
})));
|
|
15
|
-
const accountQuery = useAccountQuery();
|
|
16
|
-
const account = accountQuery.data;
|
|
17
|
-
const isAccountLoading = accountQuery.isLoading;
|
|
18
|
-
const isMobileNumberVerified = account?.mobileNumberVerified === true;
|
|
19
|
-
const hasExecuted = useRef(false);
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
if (!isAccountLoading && !!account && !hasExecuted.current) {
|
|
22
|
-
if (!isMobileNumberVerified) {
|
|
23
|
-
setOpen(true);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
setOpen(false);
|
|
27
|
-
}
|
|
28
|
-
hasExecuted.current = true;
|
|
29
|
-
}
|
|
30
|
-
}, [isAccountLoading, account, isMobileNumberVerified, setOpen]);
|
|
31
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NextResponse } from 'next/server';
|
|
2
|
-
/**
|
|
3
|
-
* Proxies AUTH `Set-Cookie` headers (the v4 refresh cookie) onto the outgoing
|
|
4
|
-
* Next.js response. In the proxy model the browser never talks to AUTH
|
|
5
|
-
* directly, so the cookie is re-scoped to the app domain (the `Domain`
|
|
6
|
-
* attribute from AUTH is dropped) and the route handler forwards it back to
|
|
7
|
-
* AUTH on subsequent requests via the `Cookie` header.
|
|
8
|
-
*/
|
|
9
|
-
export declare function applyV4SetCookie(response: NextResponse, setCookie: string[]): void;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Proxies AUTH `Set-Cookie` headers (the v4 refresh cookie) onto the outgoing
|
|
3
|
-
* Next.js response. In the proxy model the browser never talks to AUTH
|
|
4
|
-
* directly, so the cookie is re-scoped to the app domain (the `Domain`
|
|
5
|
-
* attribute from AUTH is dropped) and the route handler forwards it back to
|
|
6
|
-
* AUTH on subsequent requests via the `Cookie` header.
|
|
7
|
-
*/
|
|
8
|
-
export function applyV4SetCookie(response, setCookie) {
|
|
9
|
-
for (const raw of setCookie) {
|
|
10
|
-
const parsed = parseSetCookie(raw);
|
|
11
|
-
if (!parsed)
|
|
12
|
-
continue;
|
|
13
|
-
response.cookies.set(parsed.name, parsed.value, parsed.options);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function parseSetCookie(raw) {
|
|
17
|
-
const [pair, ...attrs] = raw.split(';');
|
|
18
|
-
const eq = pair.indexOf('=');
|
|
19
|
-
if (eq < 0)
|
|
20
|
-
return null;
|
|
21
|
-
const name = pair.slice(0, eq).trim();
|
|
22
|
-
const value = pair.slice(eq + 1).trim();
|
|
23
|
-
const options = {};
|
|
24
|
-
for (const attr of attrs) {
|
|
25
|
-
const [k, v] = attr.split('=').map((s) => s.trim());
|
|
26
|
-
const key = k.toLowerCase();
|
|
27
|
-
if (key === 'path')
|
|
28
|
-
options.path = v;
|
|
29
|
-
else if (key === 'max-age')
|
|
30
|
-
options.maxAge = Number(v);
|
|
31
|
-
else if (key === 'expires') {
|
|
32
|
-
const d = new Date(v);
|
|
33
|
-
if (!Number.isNaN(d.getTime()))
|
|
34
|
-
options.expires = d;
|
|
35
|
-
}
|
|
36
|
-
else if (key === 'httponly')
|
|
37
|
-
options.httpOnly = true;
|
|
38
|
-
else if (key === 'secure')
|
|
39
|
-
options.secure = true;
|
|
40
|
-
else if (key === 'samesite') {
|
|
41
|
-
const lv = (v ?? '').toLowerCase();
|
|
42
|
-
if (lv === 'strict' || lv === 'lax' || lv === 'none') {
|
|
43
|
-
options.sameSite = lv;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// `Domain` is intentionally dropped so the cookie scopes to the app.
|
|
47
|
-
}
|
|
48
|
-
return { name, value, options };
|
|
49
|
-
}
|
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function getFingerPrint(): Promise<string | null>;
|
|
2
|
-
/**
|
|
3
|
-
* Reads the session-version cookie (set by the `/api/sessions` route on
|
|
4
|
-
* sign-in). Used by the client to decide whether v4-only headers (e.g.
|
|
5
|
-
* `Fingerprint`) must accompany a request. The cookie is intentionally
|
|
6
|
-
* non-HttpOnly so it can be read here.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getSessionVersion(): string | null;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Thumbmark } from '@thumbmarkjs/thumbmarkjs';
|
|
2
|
-
import { SESSION_VERSION_COOKIE_NAME } from '../constants/index.js';
|
|
3
|
-
let thumbmark_instance;
|
|
4
|
-
export async function getFingerPrint() {
|
|
5
|
-
if (typeof window === 'undefined')
|
|
6
|
-
return null;
|
|
7
|
-
if (!thumbmark_instance) {
|
|
8
|
-
thumbmark_instance = new Thumbmark({
|
|
9
|
-
logging: false,
|
|
10
|
-
timeout: 30000,
|
|
11
|
-
cache_lifetime_in_ms: 1 * 60 * 60 * 1000 /* 1h */,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
try {
|
|
15
|
-
const cached = sessionStorage.getItem('fingerprint');
|
|
16
|
-
if (cached)
|
|
17
|
-
return cached;
|
|
18
|
-
const result = await thumbmark_instance.get();
|
|
19
|
-
sessionStorage.setItem('fingerprint', result.thumbmark);
|
|
20
|
-
return result.thumbmark;
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Reads the session-version cookie (set by the `/api/sessions` route on
|
|
28
|
-
* sign-in). Used by the client to decide whether v4-only headers (e.g.
|
|
29
|
-
* `Fingerprint`) must accompany a request. The cookie is intentionally
|
|
30
|
-
* non-HttpOnly so it can be read here.
|
|
31
|
-
*/
|
|
32
|
-
export function getSessionVersion() {
|
|
33
|
-
if (typeof document === 'undefined')
|
|
34
|
-
return null;
|
|
35
|
-
const match = document.cookie.match(`(?:^|; )${SESSION_VERSION_COOKIE_NAME}=([^;]*)`);
|
|
36
|
-
return match ? decodeURIComponent(match[1]) : null;
|
|
37
|
-
}
|