@opexa/portal-components 0.1.56 → 0.1.59
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/useAddFavoriteGameMutation.d.ts +2 -0
- package/dist/client/hooks/useAddFavoriteGameMutation.js +39 -0
- package/dist/client/hooks/useCreateGameSessionMutation.js +2 -2
- package/dist/client/hooks/useEndGameSessionMutation.js +1 -1
- package/dist/client/hooks/useFavoriteGamesQuery.d.ts +2 -2
- package/dist/client/hooks/useFavoriteGamesQuery.js +10 -3
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +1 -9
- package/dist/client/hooks/useRecentGamesQuery.js +3 -11
- package/dist/client/hooks/useRemoveFavoriteGameMutation.d.ts +2 -0
- package/dist/client/hooks/useRemoveFavoriteGameMutation.js +27 -0
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +1 -1
- package/dist/components/FavoriteGames/FavoriteGames.client.js +9 -8
- package/dist/components/GameLaunch/GameLaunch.lazy.js +11 -14
- package/dist/components/GameLaunch/GameLaunchTrigger.js +1 -1
- package/dist/components/Games/Game.js +13 -13
- package/dist/constants/GameProvider.js +7 -0
- package/dist/handlers/v4Cookies.d.ts +9 -0
- package/dist/handlers/v4Cookies.js +49 -0
- package/dist/images/game-providers/SEXYCASINO.webp +0 -0
- package/dist/server/utils/prefetchFavoriteGamesQuery.js +9 -2
- package/dist/services/portal.d.ts +23 -1
- package/dist/services/portal.js +25 -1
- package/dist/services/queries.d.ts +3 -3
- package/dist/services/queries.js +7 -12
- package/dist/services/wallet.d.ts +1 -23
- package/dist/services/wallet.js +1 -25
- package/dist/types/crazywinTypes.js +4 -1
- package/dist/types/index.d.ts +1 -4
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/utils/get-fingerprint.d.ts +8 -0
- package/dist/utils/get-fingerprint.js +37 -0
- package/dist/utils/getProviderData.js +6 -0
- package/dist/utils/mutationKeys.d.ts +2 -2
- package/dist/utils/mutationKeys.js +4 -4
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ export declare const datePickerRecipe: import("tailwind-variants").TVReturnType<
|
|
|
13
13
|
trigger: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
}, Record<"content" | "
|
|
16
|
+
}, Record<"content" | "table" | "input" | "label" | "view" | "root" | "control" | "nextTrigger" | "prevTrigger" | "trigger" | "positioner" | "clearTrigger" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect", string | string[]>, undefined, {
|
|
17
17
|
size: {
|
|
18
18
|
md: {
|
|
19
19
|
control: string;
|
|
@@ -28,7 +28,7 @@ export declare const datePickerRecipe: import("tailwind-variants").TVReturnType<
|
|
|
28
28
|
trigger: string;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
}, Record<"content" | "
|
|
31
|
+
}, Record<"content" | "table" | "input" | "label" | "view" | "root" | "control" | "nextTrigger" | "prevTrigger" | "trigger" | "positioner" | "clearTrigger" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
32
32
|
size: {
|
|
33
33
|
md: {
|
|
34
34
|
control: string;
|
|
@@ -43,4 +43,4 @@ export declare const datePickerRecipe: import("tailwind-variants").TVReturnType<
|
|
|
43
43
|
trigger: string;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
}, Record<"content" | "
|
|
46
|
+
}, Record<"content" | "table" | "input" | "label" | "view" | "root" | "control" | "nextTrigger" | "prevTrigger" | "trigger" | "positioner" | "clearTrigger" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect", string | string[]>, undefined, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
}
|
|
@@ -23,6 +23,7 @@ import providerRedTiger from '../images/crazywin-game-providers/redtiger.webp';
|
|
|
23
23
|
import providerRtg from '../images/crazywin-game-providers/rtg.webp';
|
|
24
24
|
import providerRubyPlay from '../images/crazywin-game-providers/rubyplay.webp';
|
|
25
25
|
import providerSagaming from '../images/crazywin-game-providers/sagaming.webp';
|
|
26
|
+
import providerSexyCasino from '../images/game-providers/SEXYCASINO.webp';
|
|
26
27
|
import providerAlize__web from '../images/crazywin-game-providers/web/alize.webp';
|
|
27
28
|
import providerBigTimeGaming__web from '../images/crazywin-game-providers/web/bigtimegaming.png';
|
|
28
29
|
import providerBti__web from '../images/crazywin-game-providers/web/bti.png';
|
|
@@ -246,6 +247,11 @@ const GAME_PROVIDER_MAP = {
|
|
|
246
247
|
value: 'SAGAMING',
|
|
247
248
|
image: [providerSagaming.src, providerSagaming__web.src],
|
|
248
249
|
},
|
|
250
|
+
SEXYCASINO: {
|
|
251
|
+
label: 'SexyCasino',
|
|
252
|
+
value: 'SEXYCASINO',
|
|
253
|
+
image: [providerSexyCasino.src, providerSexyCasino.src],
|
|
254
|
+
},
|
|
249
255
|
ONEAPI_EVOLUTION: {
|
|
250
256
|
label: 'OneAPI Evolution',
|
|
251
257
|
value: 'ONEAPI_EVOLUTION',
|
|
@@ -30,8 +30,8 @@ export declare const getMarkMessageAsReadMutationKey: () => MutationKey;
|
|
|
30
30
|
export declare const getCreateMemberVerificationQueryKey: () => MutationKey;
|
|
31
31
|
export declare const getApproveMemberVerificationQueryKey: () => MutationKey;
|
|
32
32
|
export declare const getEndGameSessionMutationKey: () => MutationKey;
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
33
|
+
export declare const getAddFavoriteGameMutationKey: () => MutationKey;
|
|
34
|
+
export declare const getRemoveFavoriteGameMutationKey: () => MutationKey;
|
|
35
35
|
export declare const getUpdateAccountMutationKey: () => MutationKey;
|
|
36
36
|
export declare const getUpdateMemberVerificationQueryKey: () => MutationKey;
|
|
37
37
|
export declare const getSendVerificationCodeMutationKey: () => MutationKey;
|
|
@@ -117,13 +117,13 @@ export const getEndGameSessionMutationKey = () => [
|
|
|
117
117
|
PARENT_KEY,
|
|
118
118
|
'endGameSession',
|
|
119
119
|
];
|
|
120
|
-
export const
|
|
120
|
+
export const getAddFavoriteGameMutationKey = () => [
|
|
121
121
|
PARENT_KEY,
|
|
122
|
-
'
|
|
122
|
+
'addFavoriteGame',
|
|
123
123
|
];
|
|
124
|
-
export const
|
|
124
|
+
export const getRemoveFavoriteGameMutationKey = () => [
|
|
125
125
|
PARENT_KEY,
|
|
126
|
-
'
|
|
126
|
+
'removeFavoriteGame',
|
|
127
127
|
];
|
|
128
128
|
export const getUpdateAccountMutationKey = () => [
|
|
129
129
|
PARENT_KEY,
|