@opexa/portal-components 0.0.70 → 0.0.72

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 (142) hide show
  1. package/dist/client/hooks/useGamesQuery.d.ts +2 -2
  2. package/dist/client/hooks/useGamesQuery.js +2 -2
  3. package/dist/components/BetRecords/BetRecords.js +10 -15
  4. package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +2 -0
  5. package/dist/components/CashbackBonus/CashbackBonus.client.js +9 -0
  6. package/dist/components/CashbackBonus/CashbackBonus.d.ts +10 -0
  7. package/dist/components/CashbackBonus/CashbackBonus.js +5 -0
  8. package/dist/components/CashbackBonus/index.d.ts +1 -0
  9. package/dist/components/CashbackBonus/index.js +1 -0
  10. package/dist/components/GameProviders/GameProviders.d.ts +14 -2
  11. package/dist/components/GameProviders/GameProviders.js +12 -2
  12. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +184 -184
  13. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +1 -9
  14. package/dist/components/Jackpots/JackpotItemDesktop.js +5 -3
  15. package/dist/components/Jackpots/JackpotItemMobile.d.ts +1 -9
  16. package/dist/components/Jackpots/JackpotItemMobile.js +5 -3
  17. package/dist/components/Jackpots/JackpotRules.d.ts +0 -1
  18. package/dist/components/Jackpots/JackpotRules.js +3 -1
  19. package/dist/components/Jackpots/Jackpots.client.js +2 -1
  20. package/dist/components/Jackpots/Jackpots.d.ts +3 -5
  21. package/dist/components/Jackpots/JackpotsContext.d.ts +4 -0
  22. package/dist/components/Jackpots/JackpotsContext.js +3 -0
  23. package/dist/components/Jackpots/useJackpotItemData.d.ts +2 -8
  24. package/dist/components/Jackpots/useJackpotItemData.js +7 -1
  25. package/dist/components/Search/Search.d.ts +15 -0
  26. package/dist/components/Search/Search.js +32 -5
  27. package/dist/components/TopWins/TopWins.client.js +3 -3
  28. package/dist/components/Tournaments/TournamentDesktop.d.ts +1 -0
  29. package/dist/components/Tournaments/TournamentDesktop.js +57 -0
  30. package/dist/components/Tournaments/TournamentMobile.d.ts +1 -0
  31. package/dist/components/Tournaments/TournamentMobile.js +55 -0
  32. package/dist/components/Tournaments/TournamentRules.d.ts +0 -1
  33. package/dist/components/Tournaments/TournamentRules.js +3 -1
  34. package/dist/components/Tournaments/Tournaments.client.js +4 -3
  35. package/dist/components/Tournaments/Tournaments.d.ts +2 -4
  36. package/dist/components/Tournaments/TournamentsContext.d.ts +4 -0
  37. package/dist/components/Tournaments/TournamentsContext.js +3 -0
  38. package/dist/components/Tournaments/useTournamentData.d.ts +10 -0
  39. package/dist/components/Tournaments/useTournamentData.js +72 -0
  40. package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -0
  41. package/dist/components/TransactionRecords/TableFilters.d.ts +1 -7
  42. package/dist/components/TransactionRecords/TableFilters.js +1 -53
  43. package/dist/components/TransactionRecords/TransactionRecords.d.ts +0 -3
  44. package/dist/components/TransactionRecords/TransactionRecords.js +0 -1
  45. package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -0
  46. package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -0
  47. package/dist/constants/envVars.d.ts +5 -0
  48. package/dist/constants/envVars.js +28 -0
  49. package/dist/constants/gameProviders.d.ts +4 -0
  50. package/dist/constants/gameProviders.js +319 -0
  51. package/dist/constants/gameTypes.d.ts +4 -0
  52. package/dist/constants/gameTypes.js +64 -0
  53. package/dist/constants/headerKeys.d.ts +1 -0
  54. package/dist/constants/headerKeys.js +1 -0
  55. package/dist/constants/index.d.ts +6 -12
  56. package/dist/constants/index.js +6 -88
  57. package/dist/constants/secretQuestions.d.ts +3 -0
  58. package/dist/constants/secretQuestions.js +24 -0
  59. package/dist/constants/storageKeys.d.ts +2 -0
  60. package/dist/constants/storageKeys.js +2 -0
  61. package/dist/images/game-providers/ALIZE.png +0 -0
  62. package/dist/images/game-providers/BGAMING.png +0 -0
  63. package/dist/images/game-providers/BOOOONGO.png +0 -0
  64. package/dist/images/game-providers/BTI.png +0 -0
  65. package/dist/images/game-providers/CQ9.png +0 -0
  66. package/dist/images/game-providers/DARWIN.png +0 -0
  67. package/dist/images/game-providers/DG.png +0 -0
  68. package/dist/images/game-providers/DRBINGO.png +0 -0
  69. package/dist/images/game-providers/E2E.png +0 -0
  70. package/dist/images/game-providers/EVOLUTION.png +0 -0
  71. package/dist/images/game-providers/EVOLUTION_NETENT.png +0 -0
  72. package/dist/images/game-providers/EVOLUTION_REDTIGER.png +0 -0
  73. package/dist/images/game-providers/EVOPLAY.png +0 -0
  74. package/dist/images/game-providers/EZUGI.png +0 -0
  75. package/dist/images/game-providers/FACHAI.png +0 -0
  76. package/dist/images/game-providers/HABANERO.png +0 -0
  77. package/dist/images/game-providers/HACKSAW.png +0 -0
  78. package/dist/images/game-providers/HOLLYWOODTV.png +0 -0
  79. package/dist/images/game-providers/JDB.png +0 -0
  80. package/dist/images/game-providers/JDB_GTF.png +0 -0
  81. package/dist/images/game-providers/JDB_SPRIBE.png +0 -0
  82. package/dist/images/game-providers/JILI.png +0 -0
  83. package/dist/images/game-providers/JOKER.png +0 -0
  84. package/dist/images/game-providers/KINGMAKER.png +0 -0
  85. package/dist/images/game-providers/KINGMIDAS.png +0 -0
  86. package/dist/images/game-providers/MEGA2SPIN.png +0 -0
  87. package/dist/images/game-providers/MEGABALL.png +0 -0
  88. package/dist/images/game-providers/MICROGAMING.png +0 -0
  89. package/dist/images/game-providers/ONEAPI.png +0 -0
  90. package/dist/images/game-providers/PGSOFT.png +0 -0
  91. package/dist/images/game-providers/PLAYTECH.png +0 -0
  92. package/dist/images/game-providers/PRAGMATIC_PLAY.png +0 -0
  93. package/dist/images/game-providers/RELAX_GAMING.png +0 -0
  94. package/dist/images/game-providers/RTG.png +0 -0
  95. package/dist/images/game-providers/SABA.png +0 -0
  96. package/dist/images/game-providers/SPINIX.png +0 -0
  97. package/dist/images/game-providers/SPRIBE.png +0 -0
  98. package/dist/images/game-providers/YELLOWBAT.png +0 -0
  99. package/dist/middleware.d.ts +3 -2
  100. package/dist/middleware.js +7 -4
  101. package/dist/server/utils/prefetchGamesQuery.d.ts +2 -2
  102. package/dist/server/utils/prefetchGamesQuery.js +2 -2
  103. package/dist/styles/theme.css +696 -696
  104. package/dist/types/index.d.ts +6 -1
  105. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  106. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  107. package/dist/ui/Badge/Badge.d.ts +12 -12
  108. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  109. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  110. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  111. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  112. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  113. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  114. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  115. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  116. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  117. package/dist/ui/DatePicker/DatePicker.d.ts +336 -336
  118. package/dist/ui/DatePicker/datePicker.recipe.d.ts +14 -14
  119. package/dist/ui/Dialog/Dialog.d.ts +88 -88
  120. package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
  121. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  122. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  123. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  124. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  125. package/dist/ui/Popover/Popover.d.ts +88 -88
  126. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  127. package/dist/ui/Progress/Progress.d.ts +27 -27
  128. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  129. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  130. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  131. package/dist/ui/Select/Select.d.ts +45 -45
  132. package/dist/ui/Select/select.recipe.d.ts +3 -3
  133. package/dist/ui/Table/Table.d.ts +21 -21
  134. package/dist/ui/Table/table.recipe.d.ts +3 -3
  135. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  136. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  137. package/dist/utils/callIfFn.d.ts +1 -0
  138. package/dist/utils/callIfFn.js +6 -0
  139. package/dist/utils/index.d.ts +1 -0
  140. package/dist/utils/index.js +1 -0
  141. package/dist/utils/queryKeys.d.ts +2 -2
  142. package/package.json +160 -157
@@ -1,88 +1,6 @@
1
- import { z } from 'zod';
2
- export const SITE_ID = z
3
- .string()
4
- .min(1, 'Environment variable "NEXT_PUBLIC_SITE_ID" must be 1 or more characters')
5
- .max(32, 'Environment variable "NEXT_PUBLIC_SITE_ID" must not be more than 32 characters')
6
- .trim()
7
- .parse(process.env.NEXT_PUBLIC_SITE_ID);
8
- export const PLATFORM_ID = z
9
- .string()
10
- .min(1, 'Environment variable "NEXT_PUBLIC_PLATFORM_ID" must be 1 or more characters')
11
- .max(32, 'Environment variable "NEXT_PUBLIC_PLATFORM_ID" must not be more than 32 characters')
12
- .trim()
13
- .parse(process.env.NEXT_PUBLIC_PLATFORM_ID);
14
- export const PLATFORM_CODE = z
15
- .string()
16
- .min(4, 'Environment variable "NEXT_PUBLIC_PLATFORM_CODE" must be at least 4 characters')
17
- .max(8, 'Environment variable "NEXT_PUBLIC_PLATFORM_CODE" must not be more than 8 characters')
18
- .trim()
19
- .parse(process.env.NEXT_PUBLIC_PLATFORM_CODE);
20
- export const ENVIRONMENT = z
21
- .enum(['production', 'development'])
22
- .catch('development')
23
- .parse(process.env.NEXT_PUBLIC_ENVIRONMENT);
24
- export const BYPASS_RECAPTCHA = z
25
- .any()
26
- .transform(Boolean)
27
- .catch(false)
28
- .parse(process.env.NEXT_PUBLIC_BYPASS_RECAPTCHA);
29
- export const ACCESS_TOKEN_COOKIE_NAME = 'WebPortalAuthAccessToken';
30
- export const REFRESH_TOKEN_COOKIE_NAME = 'WebPortalAuthRefreshToken';
31
- export const LEGACY_GAME_PROVIDERS = [
32
- 'JILI',
33
- 'PGSOFT',
34
- 'FACHAI',
35
- 'BTI',
36
- 'DG',
37
- 'PLAYTECH',
38
- 'E2E',
39
- 'ONEAPI_EVOLUTION',
40
- 'CQ9',
41
- 'JDB',
42
- 'HABANERO',
43
- 'SPINIX',
44
- 'JOKER',
45
- 'HACKSAW',
46
- 'EVOLUTIONNETENT',
47
- 'JDBGTF',
48
- 'JDBSPRIBE',
49
- 'MICROGAMING',
50
- 'RELAXGAMING',
51
- 'EVOPLAY',
52
- 'BOOONGO',
53
- 'BGAMING',
54
- 'KINGMAKER',
55
- 'KINGMIDAS',
56
- 'YELLOWBAT',
57
- 'ETENGJUE',
58
- 'SABA',
59
- 'PRAGMATICPLAY',
60
- 'SPRIBE',
61
- 'EZUGI',
62
- 'ALIZE',
63
- ];
64
- export const RECAPTCHA_HEADER_KEY = 'Google-Recaptcha-Response';
65
- export const SECRET_QUESTIONS = [
66
- 'BEST_CHILDHOOD_FRIEND',
67
- 'BIRTH_PLACE',
68
- 'FAVORITE_BOOK',
69
- 'FAVORITE_MOVIE',
70
- 'FAVORITE_TEACHER',
71
- 'FIRST_CAR',
72
- 'FIRST_PET',
73
- 'FIRST_SCHOOL',
74
- 'MOTHERS_MAIDEN_NAME',
75
- 'PARENTS_MET_CITY',
76
- ];
77
- export const SECRET_QUESTIONS_MAP = {
78
- BEST_CHILDHOOD_FRIEND: 'What was the name of your best childhood friend?',
79
- BIRTH_PLACE: 'What city were you born in?',
80
- FAVORITE_BOOK: 'What is your favorite book?',
81
- FAVORITE_MOVIE: 'What is your favorite movie?',
82
- FAVORITE_TEACHER: 'Who was your favorite teacher in school?',
83
- FIRST_CAR: 'What was the make and model of your first car?',
84
- FIRST_PET: 'What was the name of your first pet?',
85
- FIRST_SCHOOL: 'What was the name of your first school?',
86
- MOTHERS_MAIDEN_NAME: "What is your mother's maiden name?",
87
- PARENTS_MET_CITY: 'In what city did your parents meet?',
88
- };
1
+ export * from './envVars.js';
2
+ export * from './gameProviders.js';
3
+ export * from './gameTypes.js';
4
+ export * from './headerKeys.js';
5
+ export * from './secretQuestions.js';
6
+ export * from './storageKeys.js';
@@ -0,0 +1,3 @@
1
+ import type { SecretQuestion } from '@opexa/portal-sdk-core';
2
+ export declare const SECRET_QUESTIONS: ["BEST_CHILDHOOD_FRIEND", "BIRTH_PLACE", "FAVORITE_BOOK", "FAVORITE_MOVIE", "FAVORITE_TEACHER", "FIRST_CAR", "FIRST_PET", "FIRST_SCHOOL", "MOTHERS_MAIDEN_NAME", "PARENTS_MET_CITY"];
3
+ export declare const SECRET_QUESTIONS_MAP: Record<SecretQuestion, string>;
@@ -0,0 +1,24 @@
1
+ export const SECRET_QUESTIONS = [
2
+ 'BEST_CHILDHOOD_FRIEND',
3
+ 'BIRTH_PLACE',
4
+ 'FAVORITE_BOOK',
5
+ 'FAVORITE_MOVIE',
6
+ 'FAVORITE_TEACHER',
7
+ 'FIRST_CAR',
8
+ 'FIRST_PET',
9
+ 'FIRST_SCHOOL',
10
+ 'MOTHERS_MAIDEN_NAME',
11
+ 'PARENTS_MET_CITY',
12
+ ];
13
+ export const SECRET_QUESTIONS_MAP = {
14
+ BEST_CHILDHOOD_FRIEND: 'What was the name of your best childhood friend?',
15
+ BIRTH_PLACE: 'What city were you born in?',
16
+ FAVORITE_BOOK: 'What is your favorite book?',
17
+ FAVORITE_MOVIE: 'What is your favorite movie?',
18
+ FAVORITE_TEACHER: 'Who was your favorite teacher in school?',
19
+ FIRST_CAR: 'What was the make and model of your first car?',
20
+ FIRST_PET: 'What was the name of your first pet?',
21
+ FIRST_SCHOOL: 'What was the name of your first school?',
22
+ MOTHERS_MAIDEN_NAME: "What is your mother's maiden name?",
23
+ PARENTS_MET_CITY: 'In what city did your parents meet?',
24
+ };
@@ -0,0 +1,2 @@
1
+ export declare const ACCESS_TOKEN_COOKIE_NAME: string;
2
+ export declare const REFRESH_TOKEN_COOKIE_NAME: string;
@@ -0,0 +1,2 @@
1
+ export const ACCESS_TOKEN_COOKIE_NAME = 'WebPortalAuthAccessToken';
2
+ export const REFRESH_TOKEN_COOKIE_NAME = 'WebPortalAuthRefreshToken';
@@ -1,6 +1,7 @@
1
- import { type NextRequest, NextResponse } from 'next/server';
1
+ import { NextFetchEvent, type NextMiddleware, type NextRequest, NextResponse } from 'next/server';
2
2
  export declare const config: {
3
3
  runtime: string;
4
4
  matcher: string[];
5
5
  };
6
- export declare function middleware(request: NextRequest): Promise<NextResponse<unknown>>;
6
+ export declare const middleware: (req: NextRequest) => Promise<NextResponse>;
7
+ export declare function extendMiddleware<T>(fn: (req: NextRequest, evt: NextFetchEvent, res: NextResponse) => NextResponse<T> | Promise<NextResponse<T>>): NextMiddleware;
@@ -1,6 +1,6 @@
1
1
  import { refreshSession } from '@opexa/portal-sdk-core';
2
2
  import { addMinutes } from 'date-fns';
3
- import { NextResponse } from 'next/server';
3
+ import { NextFetchEvent, NextResponse, } from 'next/server';
4
4
  import { ACCESS_TOKEN_COOKIE_NAME, ENVIRONMENT, REFRESH_TOKEN_COOKIE_NAME, } from './constants/index.js';
5
5
  export const config = {
6
6
  runtime: 'nodejs',
@@ -8,9 +8,9 @@ export const config = {
8
8
  '/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)',
9
9
  ],
10
10
  };
11
- export async function middleware(request) {
12
- const accessToken = request.cookies.get(ACCESS_TOKEN_COOKIE_NAME)?.value;
13
- const refreshToken = request.cookies.get(REFRESH_TOKEN_COOKIE_NAME)?.value;
11
+ export const middleware = async (req) => {
12
+ const accessToken = req.cookies.get(ACCESS_TOKEN_COOKIE_NAME)?.value;
13
+ const refreshToken = req.cookies.get(REFRESH_TOKEN_COOKIE_NAME)?.value;
14
14
  const response = NextResponse.next();
15
15
  if (!accessToken && refreshToken) {
16
16
  try {
@@ -31,4 +31,7 @@ export async function middleware(request) {
31
31
  }
32
32
  }
33
33
  return response;
34
+ };
35
+ export function extendMiddleware(fn) {
36
+ return async (req, evt) => fn(req, evt, await middleware(req));
34
37
  }
@@ -1,2 +1,2 @@
1
- import { type GamesInput } from '@opexa/portal-sdk-core';
2
- export declare const prefetchGamesQuery: (input?: GamesInput) => Promise<void>;
1
+ import { type GamesInput__Next } from '@opexa/portal-sdk-core';
2
+ export declare const prefetchGamesQuery: (input?: GamesInput__Next) => Promise<void>;
@@ -1,11 +1,11 @@
1
- import { getGames } from '@opexa/portal-sdk-core';
1
+ import { getGames__next } from '@opexa/portal-sdk-core';
2
2
  import { ENVIRONMENT, PLATFORM_ID, SITE_ID } from '../../constants/index.js';
3
3
  import { getGamesQueryKey, getQueryClient } from '../../utils/index.js';
4
4
  export const prefetchGamesQuery = async (input) => {
5
5
  await getQueryClient().prefetchInfiniteQuery({
6
6
  queryKey: getGamesQueryKey(input),
7
7
  queryFn: async ({ pageParam, signal }) => {
8
- return await getGames({
8
+ return await getGames__next({
9
9
  ...input,
10
10
  after: pageParam,
11
11
  }, {