@opexa/portal-components 0.0.438 → 0.0.440

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 (256) 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/useMayaAuth.d.ts +6 -0
  24. package/dist/client/hooks/useMayaAuth.js +43 -0
  25. package/dist/client/hooks/useMemberVerificationQuery.js +6 -2
  26. package/dist/client/hooks/useMessagesQuery.js +6 -2
  27. package/dist/client/hooks/useOnboardingStatusQuery.js +6 -2
  28. package/dist/client/hooks/usePaymentSettingsQuery.js +6 -2
  29. package/dist/client/hooks/useProfileCompletionQuery.js +6 -2
  30. package/dist/client/hooks/useRecommendedGamesQuery.js +6 -2
  31. package/dist/client/hooks/useSessionHealthQuery.js +6 -2
  32. package/dist/client/hooks/useTransactionRecordsQuery.js +6 -2
  33. package/dist/client/hooks/useUnreadMessagesCountQuery.js +6 -2
  34. package/dist/client/hooks/useWalletQuery.js +6 -2
  35. package/dist/client/hooks/useWithdrawalRecordsQuery.js +6 -2
  36. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +7 -0
  37. package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
  38. package/dist/components/DigitainLauncher/Loading.js +1 -1
  39. package/dist/components/FavoriteGames/FavoriteGames.client.js +11 -1
  40. package/dist/components/GameLaunch/GameLaunchTrigger.js +10 -3
  41. package/dist/components/Games/Game.js +11 -1
  42. package/dist/components/Jackpots/Jackpots.module.css +184 -184
  43. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  44. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  45. package/dist/components/KYC/BasicInformation.js +1 -1
  46. package/dist/components/KYC/IdentityVerification.js +1 -1
  47. package/dist/components/KYC/KYC.lazy.js +1 -1
  48. package/dist/components/KYC/KYCDefault/PersonalInformation.js +1 -4
  49. package/dist/components/KYC/PersonalInformation.js +1 -1
  50. package/dist/components/Maya/Maya.d.ts +1 -0
  51. package/dist/components/Maya/Maya.js +90 -0
  52. package/dist/components/Maya/index.d.ts +1 -0
  53. package/dist/components/Maya/index.js +1 -0
  54. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  55. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  56. package/dist/constants/EnvVar.d.ts +1 -1
  57. package/dist/icons/LinkBrokenIcon.d.ts +2 -0
  58. package/dist/icons/LinkBrokenIcon.js +4 -0
  59. package/dist/services/queries.js +2687 -2687
  60. package/dist/styles/theme.css +719 -719
  61. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  62. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  63. package/dist/ui/Badge/Badge.d.ts +12 -12
  64. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  65. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  66. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  67. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  68. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  69. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  70. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  71. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  72. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  73. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  74. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  75. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  76. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  77. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  78. package/dist/ui/Field/Field.d.ts +21 -21
  79. package/dist/ui/Field/field.recipe.d.ts +3 -3
  80. package/dist/ui/Menu/Menu.d.ts +90 -90
  81. package/dist/ui/Menu/menu.recipe.d.ts +5 -5
  82. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  83. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  84. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  85. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  86. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  87. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  88. package/dist/ui/Popover/Popover.d.ts +55 -55
  89. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  90. package/dist/ui/Progress/Progress.d.ts +27 -27
  91. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  92. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  93. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  94. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  95. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  96. package/dist/ui/Select/Select.d.ts +45 -45
  97. package/dist/ui/Select/select.recipe.d.ts +3 -3
  98. package/dist/ui/Table/Table.d.ts +21 -21
  99. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  100. package/dist/ui/Table/table.recipe.d.ts +3 -3
  101. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  102. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  103. package/dist/utils/getQueryClient.js +2 -1
  104. package/package.json +162 -161
  105. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  106. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  107. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  108. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  109. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  110. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  111. package/dist/components/FeatureFlag/index.d.ts +0 -1
  112. package/dist/components/FeatureFlag/index.js +0 -1
  113. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  114. package/dist/components/KYC/AutoOpen.js +0 -40
  115. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  116. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  117. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  118. package/dist/components/KYC/CaptureSelfie.js +0 -285
  119. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  120. package/dist/components/KYC/DisplayImage.js +0 -8
  121. package/dist/components/KYC/FileUpload.d.ts +0 -10
  122. package/dist/components/KYC/FileUpload.js +0 -72
  123. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  124. package/dist/components/KYC/NoCameraError.js +0 -6
  125. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  126. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  127. package/dist/components/KYC/backup/Header.d.ts +0 -1
  128. package/dist/components/KYC/backup/Header.js +0 -8
  129. package/dist/components/KYC/backup/Indicator.d.ts +0 -1
  130. package/dist/components/KYC/backup/Indicator.js +0 -9
  131. package/dist/components/KYC/backup/KYC.d.ts +0 -1
  132. package/dist/components/KYC/backup/KYC.js +0 -14
  133. package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
  134. package/dist/components/KYC/backup/KYC.lazy.js +0 -26
  135. package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
  136. package/dist/components/KYC/backup/KYCContext.js +0 -2
  137. package/dist/components/KYC/backup/Step1.d.ts +0 -1
  138. package/dist/components/KYC/backup/Step1.js +0 -13
  139. package/dist/components/KYC/backup/Step2.d.ts +0 -1
  140. package/dist/components/KYC/backup/Step2.js +0 -13
  141. package/dist/components/KYC/backup/Step3.d.ts +0 -1
  142. package/dist/components/KYC/backup/Step3.js +0 -13
  143. package/dist/components/KYC/backup/Step4.d.ts +0 -1
  144. package/dist/components/KYC/backup/Step4.js +0 -7
  145. package/dist/components/KYC/backup/useKYC.d.ts +0 -10
  146. package/dist/components/KYC/backup/useKYC.js +0 -8
  147. package/dist/components/KYC/loadModels.d.ts +0 -1
  148. package/dist/components/KYC/loadModels.js +0 -9
  149. package/dist/components/KYC/utils.d.ts +0 -9
  150. package/dist/components/KYC/utils.js +0 -79
  151. package/dist/components/Messages/Message.d.ts +0 -1
  152. package/dist/components/Messages/Message.js +0 -35
  153. package/dist/components/Messages/MessageContext.d.ts +0 -6
  154. package/dist/components/Messages/MessageContext.js +0 -2
  155. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  156. package/dist/components/Messages/MessagePopup.js +0 -20
  157. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  158. package/dist/components/Messages/MessageTrigger.js +0 -19
  159. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  160. package/dist/components/Quests/CountdownTimer.js +0 -33
  161. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  162. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  163. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  164. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  165. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  166. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  167. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  168. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  169. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  170. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  171. package/dist/components/SignIn/utils.d.ts +0 -8
  172. package/dist/components/SignIn/utils.js +0 -26
  173. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  174. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  175. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  176. package/dist/components/SignUp/SignUpContext.js +0 -2
  177. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  178. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  179. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  180. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  181. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  182. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  183. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  184. package/dist/components/SignUp/SignUpForm.js +0 -284
  185. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  186. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  187. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  188. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  189. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  190. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  191. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  192. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  193. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  194. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  195. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  196. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  197. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  198. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  199. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  200. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  201. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  202. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  203. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  204. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  205. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  206. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  207. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  208. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  209. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  210. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  211. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  212. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  213. package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
  214. package/dist/components/shared/IdDocumentField.client.js +0 -204
  215. package/dist/components/shared/IdDocumentField.d.ts +0 -2
  216. package/dist/components/shared/IdDocumentField.js +0 -11
  217. package/dist/components/shared/SelfieField.client.d.ts +0 -20
  218. package/dist/components/shared/SelfieField.client.js +0 -327
  219. package/dist/components/shared/SelfieField.d.ts +0 -2
  220. package/dist/components/shared/SelfieField.js +0 -11
  221. package/dist/constants/BranchCode.d.ts +0 -4
  222. package/dist/constants/BranchCode.js +0 -42
  223. package/dist/constants/Branches.d.ts +0 -2
  224. package/dist/constants/Branches.js +0 -42
  225. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  226. package/dist/handlers/postTransformIdFrontImage.js +0 -67
  227. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  228. package/dist/handlers/postTransformSelfieImage.js +0 -71
  229. package/dist/handlers.d.ts +0 -43
  230. package/dist/handlers.js +0 -297
  231. package/dist/icons/BellRingIcon.d.ts +0 -2
  232. package/dist/icons/BellRingIcon.js +0 -4
  233. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  234. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  235. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  236. package/dist/third-parties/FacebookPixel/api.js +0 -1
  237. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  238. package/dist/third-parties/FacebookPixel/index.js +0 -1
  239. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  240. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  241. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  242. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  243. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  244. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  245. package/dist/third-parties/index.d.ts +0 -2
  246. package/dist/third-parties/index.js +0 -2
  247. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  248. package/dist/utils/dataUrlToBlob.js +0 -11
  249. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  250. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  251. package/dist/utils/getGameName.d.ts +0 -1
  252. package/dist/utils/getGameName.js +0 -6
  253. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  254. package/dist/utils/isBetween3amAnd3pm.js +0 -5
  255. package/dist/utils/resizeImageSize.d.ts +0 -2
  256. 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 { getPaymentSettings } from '../../services/account.js';
4
- import { getPaymentSettingsQueryKey } from '../../utils/queryKeys.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getPaymentSettingsQueryKey, getSessionQueryKey, } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
7
  import { useSessionQuery } from './useSessionQuery.js';
7
8
  export const usePaymentSettingsQuery = (config) => {
@@ -13,7 +14,10 @@ export const usePaymentSettingsQuery = (config) => {
13
14
  : sessionQuery.data?.status === 'authenticated',
14
15
  queryKey: getPaymentSettingsQueryKey(),
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
  return await getPaymentSettings({
19
23
  signal,
@@ -1,7 +1,8 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
2
  import invariant from 'tiny-invariant';
3
3
  import { getProfileCompletion } from '../../services/account.js';
4
- import { getProfileCompletionQueryKey } from '../../utils/queryKeys.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getProfileCompletionQueryKey, getSessionQueryKey, } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
7
  import { useSessionQuery } from './useSessionQuery.js';
7
8
  export const useProfileCompletionQuery = (config) => {
@@ -13,7 +14,10 @@ export const useProfileCompletionQuery = (config) => {
13
14
  : sessionQuery.data?.status === 'authenticated',
14
15
  queryKey: getProfileCompletionQueryKey(),
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
  return await getProfileCompletion({
19
23
  signal,
@@ -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,7 @@
1
+ import { type UseDisclosureReturn } from '../../client/hooks/useDisclosure';
2
+ interface GoogleDisconnectProps {
3
+ onConfirmAction?: (ctx: UseDisclosureReturn) => React.ReactNode;
4
+ children?: (ctx: UseDisclosureReturn) => React.ReactNode;
5
+ }
6
+ export declare function GoogleDisconnect(props: GoogleDisconnectProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useDisclosure, } from '../../client/hooks/useDisclosure.js';
4
+ import { LinkBrokenIcon } from '../../icons/LinkBrokenIcon.js';
5
+ import { XIcon } from '../../icons/XIcon.js';
6
+ import { Dialog } from '../../ui/Dialog/index.js';
7
+ import { Portal } from '../../ui/Portal/index.js';
8
+ export function GoogleDisconnect(props) {
9
+ const disclosure = useDisclosure();
10
+ return (_jsxs(_Fragment, { children: [props.children?.(disclosure), _jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: disclosure.open, onOpenChange: (details) => disclosure.setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto min-h-auto max-w-[25rem] overflow-y-auto rounded-xl p-6", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col ", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(LinkBrokenIcon, {}) }), _jsx("h2", { className: "mb-1 text-center font-semibold text-lg xl:mt-xl", children: "Disconnect Google Account" }), _jsx("p", { className: "text-center text-sm text-text-tertiary-600 leading-2xl", children: "Are you sure you want to disconnect your Google account? This may affect your ability to log in or sync data." })] }), _jsx("div", { className: "pt-6", children: props.onConfirmAction?.(disclosure) })] }) })] }) })] }));
11
+ }
@@ -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)