@opexa/portal-components 0.0.438 → 0.0.439

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 (231) hide show
  1. package/dist/client/hooks/useAccountQuery.js +6 -2
  2. package/dist/client/hooks/useApproveMemberVerification.d.ts +1 -3
  3. package/dist/client/hooks/useApproveMemberVerification.js +3 -6
  4. package/dist/client/hooks/useAvailablePromosQuery.js +6 -2
  5. package/dist/client/hooks/useAvailableQuestsCountQuery.js +6 -2
  6. package/dist/client/hooks/useAvailableQuestsQuery.js +5 -2
  7. package/dist/client/hooks/useBetRecordsQuery.js +6 -2
  8. package/dist/client/hooks/useBonusQuery.js +6 -2
  9. package/dist/client/hooks/useBonusesCountQuery.js +6 -2
  10. package/dist/client/hooks/useBonusesQuery.js +5 -2
  11. package/dist/client/hooks/useCashbackBonusQuery.js +6 -2
  12. package/dist/client/hooks/useCashbackBonusesCountQuery.js +6 -2
  13. package/dist/client/hooks/useCashbackBonusesQuery.js +5 -2
  14. package/dist/client/hooks/useControllableState.d.ts +8 -5
  15. package/dist/client/hooks/useControllableState.js +6 -27
  16. package/dist/client/hooks/useDepositQuery.js +6 -2
  17. package/dist/client/hooks/useDepositRecordsQuery.js +6 -2
  18. package/dist/client/hooks/useDepositsCountQuery.js +6 -2
  19. package/dist/client/hooks/useFavoriteGamesQuery.js +6 -2
  20. package/dist/client/hooks/useFileQuery.js +6 -2
  21. package/dist/client/hooks/useInstapayBankListQuery.js +6 -2
  22. package/dist/client/hooks/useIsMayaSessionValidQuery.js +6 -2
  23. package/dist/client/hooks/useMemberVerificationQuery.js +6 -2
  24. package/dist/client/hooks/useMessagesQuery.js +6 -2
  25. package/dist/client/hooks/useOnboardingStatusQuery.js +6 -2
  26. package/dist/client/hooks/usePaymentSettingsQuery.js +6 -2
  27. package/dist/client/hooks/useProfileCompletionQuery.js +6 -2
  28. package/dist/client/hooks/useRecommendedGamesQuery.js +6 -2
  29. package/dist/client/hooks/useSessionHealthQuery.js +6 -2
  30. package/dist/client/hooks/useTransactionRecordsQuery.js +6 -2
  31. package/dist/client/hooks/useUnreadMessagesCountQuery.js +6 -2
  32. package/dist/client/hooks/useWalletQuery.js +6 -2
  33. package/dist/client/hooks/useWithdrawalRecordsQuery.js +6 -2
  34. package/dist/components/Banner/Banner.client.d.ts +12 -0
  35. package/dist/components/Banner/Banner.client.js +49 -0
  36. package/dist/components/DigitainLauncher/Loading.js +1 -1
  37. package/dist/components/FavoriteGames/FavoriteGames.client.js +11 -1
  38. package/dist/components/GameLaunch/GameLaunchTrigger.js +10 -3
  39. package/dist/components/Games/Game.js +11 -1
  40. package/dist/components/Jackpots/Jackpots.module.css +184 -184
  41. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  42. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  43. package/dist/components/KYC/BasicInformation.js +1 -1
  44. package/dist/components/KYC/IdentityVerification.js +1 -1
  45. package/dist/components/KYC/KYC.lazy.js +1 -1
  46. package/dist/components/KYC/KYCDefault/PersonalInformation.js +1 -4
  47. package/dist/components/KYC/PersonalInformation.js +1 -1
  48. package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
  49. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  50. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  51. package/dist/constants/EnvVar.d.ts +1 -1
  52. package/dist/services/queries.js +2687 -2687
  53. package/dist/styles/theme.css +719 -719
  54. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  55. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  56. package/dist/ui/Badge/Badge.d.ts +12 -12
  57. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  58. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  59. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  60. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  61. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  62. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  63. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  64. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  65. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  66. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  67. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  68. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  69. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  70. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  71. package/dist/ui/Field/Field.d.ts +21 -21
  72. package/dist/ui/Field/field.recipe.d.ts +3 -3
  73. package/dist/ui/Menu/Menu.d.ts +90 -90
  74. package/dist/ui/Menu/menu.recipe.d.ts +5 -5
  75. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  76. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  77. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  78. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  79. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  80. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  81. package/dist/ui/Popover/Popover.d.ts +55 -55
  82. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  83. package/dist/ui/Progress/Progress.d.ts +27 -27
  84. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  85. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  86. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  87. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  88. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  89. package/dist/ui/Select/Select.d.ts +45 -45
  90. package/dist/ui/Select/select.recipe.d.ts +3 -3
  91. package/dist/ui/Table/Table.d.ts +21 -21
  92. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  93. package/dist/ui/Table/table.recipe.d.ts +3 -3
  94. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  95. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  96. package/dist/utils/getQueryClient.js +2 -1
  97. package/package.json +162 -161
  98. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  99. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  100. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  101. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  102. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  103. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  104. package/dist/components/FeatureFlag/index.d.ts +0 -1
  105. package/dist/components/FeatureFlag/index.js +0 -1
  106. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  107. package/dist/components/KYC/AutoOpen.js +0 -40
  108. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  109. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  110. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  111. package/dist/components/KYC/CaptureSelfie.js +0 -285
  112. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  113. package/dist/components/KYC/DisplayImage.js +0 -8
  114. package/dist/components/KYC/FileUpload.d.ts +0 -10
  115. package/dist/components/KYC/FileUpload.js +0 -72
  116. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  117. package/dist/components/KYC/NoCameraError.js +0 -6
  118. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  119. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  120. package/dist/components/KYC/backup/Header.d.ts +0 -1
  121. package/dist/components/KYC/backup/Header.js +0 -8
  122. package/dist/components/KYC/backup/Indicator.d.ts +0 -1
  123. package/dist/components/KYC/backup/Indicator.js +0 -9
  124. package/dist/components/KYC/backup/KYC.d.ts +0 -1
  125. package/dist/components/KYC/backup/KYC.js +0 -14
  126. package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
  127. package/dist/components/KYC/backup/KYC.lazy.js +0 -26
  128. package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
  129. package/dist/components/KYC/backup/KYCContext.js +0 -2
  130. package/dist/components/KYC/backup/Step1.d.ts +0 -1
  131. package/dist/components/KYC/backup/Step1.js +0 -13
  132. package/dist/components/KYC/backup/Step2.d.ts +0 -1
  133. package/dist/components/KYC/backup/Step2.js +0 -13
  134. package/dist/components/KYC/backup/Step3.d.ts +0 -1
  135. package/dist/components/KYC/backup/Step3.js +0 -13
  136. package/dist/components/KYC/backup/Step4.d.ts +0 -1
  137. package/dist/components/KYC/backup/Step4.js +0 -7
  138. package/dist/components/KYC/backup/useKYC.d.ts +0 -10
  139. package/dist/components/KYC/backup/useKYC.js +0 -8
  140. package/dist/components/KYC/loadModels.d.ts +0 -1
  141. package/dist/components/KYC/loadModels.js +0 -9
  142. package/dist/components/KYC/utils.d.ts +0 -9
  143. package/dist/components/KYC/utils.js +0 -79
  144. package/dist/components/Messages/Message.d.ts +0 -1
  145. package/dist/components/Messages/Message.js +0 -35
  146. package/dist/components/Messages/MessageContext.d.ts +0 -6
  147. package/dist/components/Messages/MessageContext.js +0 -2
  148. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  149. package/dist/components/Messages/MessagePopup.js +0 -20
  150. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  151. package/dist/components/Messages/MessageTrigger.js +0 -19
  152. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  153. package/dist/components/Quests/CountdownTimer.js +0 -33
  154. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  155. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  156. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  157. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  158. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  159. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  160. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  161. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  162. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  163. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  164. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  165. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  166. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  167. package/dist/components/SignUp/SignUpContext.js +0 -2
  168. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  169. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  170. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  171. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  172. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  173. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  174. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  175. package/dist/components/SignUp/SignUpForm.js +0 -284
  176. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  177. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  178. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  179. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  180. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  181. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  182. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  183. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  184. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  185. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  186. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  187. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  188. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  189. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  190. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  191. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  192. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  193. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  194. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  195. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  196. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  197. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  198. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  199. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  200. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  201. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  202. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  203. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  204. package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
  205. package/dist/components/shared/IdDocumentField.client.js +0 -204
  206. package/dist/components/shared/IdDocumentField.d.ts +0 -2
  207. package/dist/components/shared/IdDocumentField.js +0 -11
  208. package/dist/components/shared/SelfieField.client.d.ts +0 -20
  209. package/dist/components/shared/SelfieField.client.js +0 -327
  210. package/dist/components/shared/SelfieField.d.ts +0 -2
  211. package/dist/components/shared/SelfieField.js +0 -11
  212. package/dist/constants/BranchCode.d.ts +0 -4
  213. package/dist/constants/BranchCode.js +0 -42
  214. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  215. package/dist/handlers/postTransformIdFrontImage.js +0 -67
  216. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  217. package/dist/handlers/postTransformSelfieImage.js +0 -71
  218. package/dist/handlers.d.ts +0 -43
  219. package/dist/handlers.js +0 -297
  220. package/dist/icons/BellRingIcon.d.ts +0 -2
  221. package/dist/icons/BellRingIcon.js +0 -4
  222. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  223. package/dist/utils/dataUrlToBlob.js +0 -11
  224. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  225. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  226. package/dist/utils/getGameName.d.ts +0 -1
  227. package/dist/utils/getGameName.js +0 -6
  228. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  229. package/dist/utils/isBetween3amAnd3pm.js +0 -5
  230. package/dist/utils/resizeImageSize.d.ts +0 -2
  231. package/dist/utils/resizeImageSize.js +0 -11
@@ -1,7 +1,8 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { getRecommendedGames } from '../../services/portal.js';
4
- import { getRecommendedGamesQueryKey } from '../../utils/queryKeys.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getRecommendedGamesQueryKey, getSessionQueryKey, } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
7
  import { useSessionQuery } from './useSessionQuery.js';
7
8
  export const useRecommendedGamesQuery = (config) => {
@@ -16,7 +17,10 @@ export const useRecommendedGamesQuery = (config) => {
16
17
  : sessionQuery.data?.status === 'authenticated',
17
18
  queryKey: getRecommendedGamesQueryKey(),
18
19
  queryFn: async ({ signal }) => {
19
- const session = await getSession();
20
+ const session = await getQueryClient().fetchQuery({
21
+ queryKey: getSessionQueryKey(),
22
+ queryFn: async () => getSession(),
23
+ });
20
24
  invariant(session.status === 'authenticated');
21
25
  return await getRecommendedGames({
22
26
  signal,
@@ -1,7 +1,8 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { getSessionHealth } from '../../services/auth.js';
4
- import { getSessionHealthQueryKey } from '../../utils/queryKeys.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getSessionHealthQueryKey, getSessionQueryKey, } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
7
  import { useSessionQuery } from './useSessionQuery.js';
7
8
  export const useSessionHealthQuery = (config) => {
@@ -15,7 +16,10 @@ export const useSessionHealthQuery = (config) => {
15
16
  : sessionQuery.data?.status === 'authenticated',
16
17
  queryKey: getSessionHealthQueryKey(),
17
18
  queryFn: async ({ signal }) => {
18
- const session = await getSession({ signal });
19
+ const session = await getQueryClient().fetchQuery({
20
+ queryKey: getSessionQueryKey(),
21
+ queryFn: async () => getSession(),
22
+ });
19
23
  invariant(session.status === 'authenticated');
20
24
  const ok = await getSessionHealth({
21
25
  signal,
@@ -1,7 +1,8 @@
1
1
  import { useInfiniteQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { getTransactionRecords, } from '../../services/report.js';
4
- import { getTransactionRecordsQueryKey } from '../../utils/queryKeys.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getSessionQueryKey, getTransactionRecordsQueryKey, } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
7
  import { useSessionQuery } from './useSessionQuery.js';
7
8
  export const useTransactionRecordsQuery = (input, config) => {
@@ -14,7 +15,10 @@ export const useTransactionRecordsQuery = (input, config) => {
14
15
  : sessionQuery.data?.status === 'authenticated',
15
16
  queryKey: getTransactionRecordsQueryKey(input),
16
17
  queryFn: async ({ pageParam, signal }) => {
17
- const session = await getSession({ signal });
18
+ const session = await getQueryClient().fetchQuery({
19
+ queryKey: getSessionQueryKey(),
20
+ queryFn: async () => getSession(),
21
+ });
18
22
  invariant(session.status === 'authenticated');
19
23
  return getTransactionRecords({ ...input, after: pageParam }, {
20
24
  signal,
@@ -1,7 +1,8 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { getUnreadMessagesCount, } from '../../services/trigger.js';
4
- import { getUnreadMessagesCountQueryKey } from '../../utils/queryKeys.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getSessionQueryKey, getUnreadMessagesCountQueryKey, } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
7
  import { useSessionQuery } from './useSessionQuery.js';
7
8
  export const useUnreadMessagesCountQuery = (input, config) => {
@@ -14,7 +15,10 @@ export const useUnreadMessagesCountQuery = (input, config) => {
14
15
  : sessionQuery.data?.status === 'authenticated',
15
16
  queryKey: getUnreadMessagesCountQueryKey(input),
16
17
  queryFn: async ({ signal }) => {
17
- const session = await getSession();
18
+ const session = await getQueryClient().fetchQuery({
19
+ queryKey: getSessionQueryKey(),
20
+ queryFn: async () => getSession(),
21
+ });
18
22
  invariant(session.status === 'authenticated');
19
23
  return await getUnreadMessagesCount(input, {
20
24
  signal,
@@ -1,7 +1,8 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { getWallet } from '../../services/wallet.js';
4
- import { getWalletQueryKey } from '../../utils/queryKeys.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getSessionQueryKey, getWalletQueryKey } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
7
  import { useSessionQuery } from './useSessionQuery.js';
7
8
  export const useWalletQuery = (config) => {
@@ -13,7 +14,10 @@ export const useWalletQuery = (config) => {
13
14
  : sessionQuery.data?.status === 'authenticated',
14
15
  queryKey: getWalletQueryKey(),
15
16
  queryFn: async ({ signal }) => {
16
- const session = await getSession({ signal });
17
+ const session = await getQueryClient().fetchQuery({
18
+ queryKey: getSessionQueryKey(),
19
+ queryFn: async () => getSession(),
20
+ });
17
21
  invariant(session.status === 'authenticated');
18
22
  const wallet = await getWallet({
19
23
  signal,
@@ -1,7 +1,8 @@
1
1
  import { useInfiniteQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { getWithdrawalRecords, } from '../../services/report.js';
4
- import { getWithdrawalRecordsQueryKey } from '../../utils/queryKeys.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getSessionQueryKey, getWithdrawalRecordsQueryKey, } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
7
  import { useSessionQuery } from './useSessionQuery.js';
7
8
  export const useWithdrawalRecordsQuery = (input, config) => {
@@ -14,7 +15,10 @@ export const useWithdrawalRecordsQuery = (input, config) => {
14
15
  : sessionQuery.data?.status === 'authenticated',
15
16
  queryKey: getWithdrawalRecordsQueryKey(input),
16
17
  queryFn: async ({ pageParam, signal }) => {
17
- const session = await getSession();
18
+ const session = await getQueryClient().fetchQuery({
19
+ queryKey: getSessionQueryKey(),
20
+ queryFn: async () => getSession(),
21
+ });
18
22
  invariant(session.status === 'authenticated');
19
23
  return await getWithdrawalRecords({ ...input, after: pageParam }, {
20
24
  signal,
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,49 @@
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,5 +1,5 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  export function Loading() {
4
- return (_jsx("div", { className: "flex h-[calc(100vh-400px)] w-full items-center justify-center px-4", children: _jsxs("div", { className: "flex flex-col items-center space-y-4", children: [_jsx("div", { className: "border-blue-500 h-10 w-10 animate-spin rounded-full border-4 border-t-transparent" }), _jsx("p", { className: "text-gray-700 text-lg font-medium", children: "Loading Sports Book\u2026" })] }) }));
4
+ return (_jsx("div", { className: "flex h-[calc(100vh-400px)] w-full items-center justify-center px-4", children: _jsxs("div", { className: "flex flex-col items-center space-y-4", children: [_jsx("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-blue-500 border-t-transparent" }), _jsx("p", { className: "font-medium text-gray-700 text-lg", children: "Loading Sports Book\u2026" })] }) }));
5
5
  }
@@ -5,7 +5,9 @@ import { isString } from 'lodash-es';
5
5
  import Image from 'next/image';
6
6
  import { useCallback, useEffect, useState } from 'react';
7
7
  import { twMerge } from 'tailwind-merge';
8
+ import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
8
9
  import { useFavoriteGamesQuery } from '../../client/hooks/useFavoriteGamesQuery.js';
10
+ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
9
11
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
10
12
  import { useUnmarkGameAsFavoriteMutation } from '../../client/hooks/useUnmarkGameAsFavoriteMutation.js';
11
13
  import { toaster } from '../../client/utils/toaster.js';
@@ -54,8 +56,11 @@ export function FavoriteGames__client(props) {
54
56
  } }, game.id))) }) })] }));
55
57
  }
56
58
  function Item({ game, className, }) {
59
+ const featureFlag = useFeatureFlag();
57
60
  const sessionQuery = useSessionQuery();
58
61
  const session = sessionQuery.data;
62
+ const accountQuery = useAccountQuery();
63
+ const account = accountQuery.data;
59
64
  const unmarkGameAsFavoriteMutation = useUnmarkGameAsFavoriteMutation({
60
65
  onSuccess() {
61
66
  toaster.success({
@@ -68,7 +73,12 @@ function Item({ game, className, }) {
68
73
  });
69
74
  },
70
75
  });
71
- return (_jsxs(GameLaunchTrigger, { game: game, className: twMerge('hover:-translate-y-1 relative block w-full animate-scale-in shadow-sm transition-transform duration-200', className?.thumbnailRoot), children: [session?.status === 'authenticated' && (_jsx("div", { role: "button", tabIndex: 0, onClick: (e) => {
76
+ const markUnmarkGameAsFavoriteEnabled = session?.status !== 'authenticated'
77
+ ? false
78
+ : featureFlag.enabled
79
+ ? account?.status !== 'VERIFICATION_LOCKED'
80
+ : true;
81
+ return (_jsxs(GameLaunchTrigger, { game: game, className: twMerge('hover:-translate-y-1 relative block w-full animate-scale-in shadow-sm transition-transform duration-200', className?.thumbnailRoot), children: [markUnmarkGameAsFavoriteEnabled && (_jsx("div", { role: "button", tabIndex: 0, onClick: (e) => {
72
82
  e.preventDefault();
73
83
  e.stopPropagation();
74
84
  if (unmarkGameAsFavoriteMutation.isPending)
@@ -2,12 +2,16 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { ark } from '@ark-ui/react/factory';
4
4
  import { useShallow } from 'zustand/shallow';
5
+ import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
5
6
  import { useCreateGameSessionMutation } from '../../client/hooks/useCreateGameSessionMutation.js';
7
+ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
6
8
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
7
9
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
8
10
  import { toaster } from '../../client/utils/toaster.js';
9
11
  export function GameLaunchTrigger(props) {
12
+ const featureFlag = useFeatureFlag();
10
13
  const sessionQuery = useSessionQuery();
14
+ const accountQuery = useAccountQuery();
11
15
  const createGameSessionMutation = useCreateGameSessionMutation();
12
16
  const globalStore = useGlobalStore(useShallow((ctx) => ({
13
17
  signIn: ctx.signIn,
@@ -17,13 +21,16 @@ export function GameLaunchTrigger(props) {
17
21
  const between3amAnd3pm = currentHour >= 15 || currentHour < 3;
18
22
  const unavailable = !between3amAnd3pm &&
19
23
  ['Hwd1wEWHU6Gvfwecuh', 'HwdcKd7wDpwSPHGksq'].includes('reference' in props.game ? props.game.reference : props.game.id);
24
+ const locked = featureFlag.enabled && accountQuery.data?.status === 'VERIFICATION_LOCKED';
20
25
  const disabled = sessionQuery.data?.status === 'unauthenticated'
21
26
  ? false
22
- : unavailable
27
+ : locked
23
28
  ? true
24
- : globalStore.gameLaunch.details.status !== 'WAITING'
29
+ : unavailable
25
30
  ? true
26
- : props.disabled;
31
+ : globalStore.gameLaunch.details.status !== 'WAITING'
32
+ ? true
33
+ : props.disabled;
27
34
  return (_jsx(ark.button, { type: "button", "aria-label": `Play ${props.game.name}`, "data-state": sessionQuery.data?.status === 'unauthenticated'
28
35
  ? globalStore.signIn.open
29
36
  ? 'open'
@@ -2,7 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { isString } from 'lodash-es';
3
3
  import Image from 'next/image';
4
4
  import { twMerge } from 'tailwind-merge';
5
+ import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
5
6
  import { useFavoriteGamesQuery } from '../../client/hooks/useFavoriteGamesQuery.js';
7
+ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
6
8
  import { useMarkGameAsFavoriteMutation } from '../../client/hooks/useMarkGameAsFavoriteMutation.js';
7
9
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
8
10
  import { useUnmarkGameAsFavoriteMutation } from '../../client/hooks/useUnmarkGameAsFavoriteMutation.js';
@@ -16,8 +18,11 @@ import { BadgeTop } from './BadgeTop.js';
16
18
  import { useGameContext } from './GamesContext.js';
17
19
  export function Game(props) {
18
20
  const game = useGameContext();
21
+ const featureFlag = useFeatureFlag();
19
22
  const sessionQuery = useSessionQuery();
20
23
  const session = sessionQuery.data;
24
+ const accountQuery = useAccountQuery();
25
+ const account = accountQuery.data;
21
26
  const favoriteGamesQuery = useFavoriteGamesQuery();
22
27
  const favoriteGames = favoriteGamesQuery.data ?? [];
23
28
  const markGameAsFavoriteMutation = useMarkGameAsFavoriteMutation({
@@ -48,7 +53,12 @@ export function Game(props) {
48
53
  const classNames = isString(props.className)
49
54
  ? { root: props.className }
50
55
  : (props.className ?? {});
51
- return (_jsxs(GameLaunchTrigger, { game: game, className: twMerge('group md:hover:-translate-y-1 relative block w-full animate-scale-in shadow-sm transition-transform duration-200', classNames.root), "aria-label": `Play ${game.name} game`, children: [props.badge === 'new' && (_jsx(BadgeNew, { className: "absolute top-0 left-0 size-[3.75rem]" })), props.badge === 'top' && (_jsx(BadgeTop, { className: "absolute top-0 left-0 size-[3.75rem]" })), props.badge === 'popular' && (_jsx(BadgePopular, { className: "absolute top-0 left-0 size-[3.75rem]" })), session?.status === 'authenticated' && (_jsx("div", { role: "button", tabIndex: 0, onClick: (e) => {
56
+ const markUnmarkGameAsFavoriteEnabled = session?.status !== 'authenticated'
57
+ ? false
58
+ : featureFlag.enabled
59
+ ? account?.status !== 'VERIFICATION_LOCKED'
60
+ : true;
61
+ return (_jsxs(GameLaunchTrigger, { game: game, className: twMerge('group md:hover:-translate-y-1 relative block w-full animate-scale-in shadow-sm transition-transform duration-200', classNames.root), "aria-label": `Play ${game.name} game`, children: [props.badge === 'new' && (_jsx(BadgeNew, { className: "absolute top-0 left-0 size-[3.75rem]" })), props.badge === 'top' && (_jsx(BadgeTop, { className: "absolute top-0 left-0 size-[3.75rem]" })), props.badge === 'popular' && (_jsx(BadgePopular, { className: "absolute top-0 left-0 size-[3.75rem]" })), markUnmarkGameAsFavoriteEnabled && (_jsx("div", { role: "button", tabIndex: 0, onClick: (e) => {
52
62
  e.preventDefault();
53
63
  e.stopPropagation();
54
64
  if (markGameAsFavoriteMutation.isPending)