@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.
Files changed (89) hide show
  1. package/README.md +238 -0
  2. package/dist/client/hooks/useGlobalStore.d.ts +2 -8
  3. package/dist/client/hooks/useGlobalStore.js +1 -27
  4. package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +9 -1
  5. package/dist/client/hooks/useSignInMutation.js +2 -7
  6. package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +1 -1
  7. package/dist/client/hooks/useUpdateSessionMutation.js +1 -0
  8. package/dist/components/ForgotPassword/Crazywin/ForgotPassword.module.css +42 -42
  9. package/dist/components/Jackpots/Jackpots.module.css +288 -288
  10. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  11. package/dist/components/KYC/KYCNonPagCor/KYCVerificationStatus.lazy.js +2 -2
  12. package/dist/components/PortalProvider/SessionWatcher.js +19 -22
  13. package/dist/components/Promos/PromoCardClassNames.d.ts +11 -0
  14. package/dist/components/Promos/PromoCardClassNames.js +6 -0
  15. package/dist/components/SignIn/CrazyWin/MobileNumberSignIn.js +1 -0
  16. package/dist/components/SignIn/CrazyWin/NameAndPasswordSignIn.js +1 -0
  17. package/dist/components/SignIn/HappyBingo/MobileNumberSignIn.js +1 -0
  18. package/dist/components/SignIn/HappyBingo/NameAndPasswordSignIn.js +1 -0
  19. package/dist/components/SignIn/MobileNumberSignIn.js +2 -5
  20. package/dist/components/SignIn/SignIn.js +5 -1
  21. package/dist/components/SignIn/SignIn.lazy.d.ts +1 -1
  22. package/dist/components/SignIn/SignIn.lazy.js +16 -12
  23. package/dist/components/SignUp/SignUpDefault/SignUpDefaultForm.js +13 -26
  24. package/dist/components/SignUp/SignUpDefault/SignUpDefaultFormInternational.js +4 -11
  25. package/dist/components/TermsOfUse/TermsOfUseV2.lazy.js +4 -1
  26. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  27. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  28. package/dist/constants/StorageKey.d.ts +1 -0
  29. package/dist/constants/StorageKey.js +1 -0
  30. package/dist/handlers/deleteSession.js +2 -1
  31. package/dist/handlers/getSession.js +17 -1
  32. package/dist/images/phone-icon.svg +10 -10
  33. package/dist/middleware.js +11 -2
  34. package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
  35. package/dist/server/services/signOut.js +2 -1
  36. package/dist/services/account.d.ts +2 -6
  37. package/dist/services/account.js +0 -1
  38. package/dist/services/queries.d.ts +1 -1
  39. package/dist/services/queries.js +3613 -3617
  40. package/dist/styles/theme.css +776 -776
  41. package/dist/types/index.d.ts +3 -0
  42. package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
  43. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
  44. package/dist/ui/Badge/Badge.d.ts +12 -12
  45. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  46. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  47. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  48. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  49. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  50. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  51. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  52. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  53. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  54. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  55. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  56. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  57. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  58. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  59. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  60. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  61. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  62. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  63. package/dist/ui/Menu/Menu.d.ts +144 -144
  64. package/dist/ui/Menu/menu.recipe.d.ts +8 -8
  65. package/dist/ui/Popover/Popover.d.ts +121 -121
  66. package/dist/ui/Popover/popover.recipe.d.ts +11 -11
  67. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  68. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  69. package/dist/ui/Select/Select.d.ts +45 -45
  70. package/dist/ui/Select/select.recipe.d.ts +3 -3
  71. package/dist/ui/Table/Table.d.ts +21 -21
  72. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  73. package/dist/ui/Table/table.recipe.d.ts +3 -3
  74. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  75. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  76. package/dist/utils/session-invalid-reason.d.ts +3 -0
  77. package/dist/utils/session-invalid-reason.js +19 -0
  78. package/package.json +1 -1
  79. package/dist/components/BetDepositLimit/betDepositLimitStore.d.ts +0 -24
  80. package/dist/components/BetDepositLimit/betDepositLimitStore.js +0 -51
  81. package/dist/components/ResponsibleGamingLimits/ResponsibleGamingLimits.lazy.d.ts +0 -1
  82. package/dist/components/ResponsibleGamingLimits/ResponsibleGamingLimits.lazy.js +0 -117
  83. package/dist/components/UpdateMobilePhoneNumber/hooks/useAutoOpenWhenUnverified.d.ts +0 -6
  84. package/dist/components/UpdateMobilePhoneNumber/hooks/useAutoOpenWhenUnverified.js +0 -31
  85. package/dist/handlers/v4Cookies.d.ts +0 -9
  86. package/dist/handlers/v4Cookies.js +0 -49
  87. package/dist/images/game-providers/SEXYCASINO.webp +0 -0
  88. package/dist/utils/get-fingerprint.d.ts +0 -8
  89. 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
- }
@@ -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
- }