@opexa/portal-components 0.0.219 → 0.0.220

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 (225) hide show
  1. package/dist/client/hooks/index.d.ts +65 -0
  2. package/dist/client/hooks/index.js +65 -0
  3. package/dist/client/hooks/useCreateDigitainGameSessionMutatio.d.ts +1 -1
  4. package/dist/client/hooks/useCreateDigitainGameSessionMutatio.js +8 -2
  5. package/dist/client/services/index.d.ts +4 -0
  6. package/dist/client/services/index.js +4 -0
  7. package/dist/client/utils/index.d.ts +3 -0
  8. package/dist/client/utils/index.js +3 -0
  9. package/dist/components/Bonus/Bonus.client.js +1 -1
  10. package/dist/components/Cashback/Cashback.client.js +1 -1
  11. package/dist/components/CustomPromo/CustomPromo.js +1 -1
  12. package/dist/components/DigitainLauncher/DigitainLauncher.d.ts +4 -0
  13. package/dist/components/DigitainLauncher/DigitainLauncher.js +13 -0
  14. package/dist/components/DigitainLauncher/DigitianContainter.d.ts +5 -0
  15. package/dist/components/DigitainLauncher/DigitianContainter.js +40 -0
  16. package/dist/components/DigitainLauncher/types.d.ts +49 -0
  17. package/dist/components/DigitainLauncher/types.js +1 -0
  18. package/dist/components/DigitainLauncher/utils.d.ts +3 -0
  19. package/dist/components/DigitainLauncher/utils.js +63 -0
  20. package/dist/components/Empty.d.ts +10 -0
  21. package/dist/components/Empty.js +7 -0
  22. package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
  23. package/dist/components/Games/GameContext.d.ts +2 -0
  24. package/dist/components/Games/GameContext.js +2 -0
  25. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  26. package/dist/components/InfiniteScroll.d.ts +10 -0
  27. package/dist/components/InfiniteScroll.js +25 -0
  28. package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +2 -0
  29. package/dist/components/JackpotCounter/JackpotCounter.client.js +66 -0
  30. package/dist/components/JackpotCounter/JackpotCounter.d.ts +17 -0
  31. package/dist/components/JackpotCounter/JackpotCounter.js +21 -0
  32. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +18 -0
  33. package/dist/components/JackpotCounter/JackpotCounterItem.js +109 -0
  34. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +184 -0
  35. package/dist/components/JackpotCounter/index.d.ts +1 -0
  36. package/dist/components/JackpotCounter/index.js +1 -0
  37. package/dist/components/Jackpots/JackpotDesktop.d.ts +1 -0
  38. package/dist/components/Jackpots/JackpotDesktop.js +45 -0
  39. package/dist/components/Jackpots/JackpotGameProviders.d.ts +5 -0
  40. package/dist/components/Jackpots/JackpotGameProviders.js +41 -0
  41. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +9 -0
  42. package/dist/components/Jackpots/JackpotItemDesktop.js +43 -0
  43. package/dist/components/Jackpots/JackpotItemMobile.d.ts +9 -0
  44. package/dist/components/Jackpots/JackpotItemMobile.js +44 -0
  45. package/dist/components/Jackpots/JackpotMobile.d.ts +1 -0
  46. package/dist/components/Jackpots/JackpotMobile.js +46 -0
  47. package/dist/components/Jackpots/JackpotRules.d.ts +5 -0
  48. package/dist/components/Jackpots/JackpotRules.js +11 -0
  49. package/dist/components/Jackpots/Jackpots.client.d.ts +2 -0
  50. package/dist/components/Jackpots/Jackpots.client.js +29 -0
  51. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  52. package/dist/components/Jackpots/JackpotsContext.d.ts +4 -0
  53. package/dist/components/Jackpots/JackpotsContext.js +3 -0
  54. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  55. package/dist/components/Jackpots/useJackpotData.d.ts +14 -0
  56. package/dist/components/Jackpots/useJackpotData.js +93 -0
  57. package/dist/components/Jackpots/useJackpotItemData.d.ts +20 -0
  58. package/dist/components/Jackpots/useJackpotItemData.js +87 -0
  59. package/dist/components/KYC/Header.d.ts +1 -0
  60. package/dist/components/KYC/Header.js +6 -0
  61. package/dist/components/KYC/Step1.d.ts +1 -0
  62. package/dist/components/KYC/Step1.js +12 -0
  63. package/dist/components/KYC/Step2.d.ts +1 -0
  64. package/dist/components/KYC/Step2.js +12 -0
  65. package/dist/components/KYC/Step3.d.ts +1 -0
  66. package/dist/components/KYC/Step3.js +11 -0
  67. package/dist/components/KYC/Step4.d.ts +1 -0
  68. package/dist/components/KYC/Step4.js +6 -0
  69. package/dist/components/KYC/backup/Header.d.ts +1 -0
  70. package/dist/components/KYC/backup/Header.js +8 -0
  71. package/dist/components/KYC/backup/Indicator.d.ts +1 -0
  72. package/dist/components/KYC/backup/Indicator.js +9 -0
  73. package/dist/components/KYC/backup/KYC.d.ts +1 -0
  74. package/dist/components/KYC/backup/KYC.js +14 -0
  75. package/dist/components/KYC/backup/KYC.lazy.d.ts +1 -0
  76. package/dist/components/KYC/backup/KYC.lazy.js +26 -0
  77. package/dist/components/KYC/backup/KYCContext.d.ts +2 -0
  78. package/dist/components/KYC/backup/KYCContext.js +2 -0
  79. package/dist/components/KYC/backup/Step1.d.ts +1 -0
  80. package/dist/components/KYC/backup/Step1.js +13 -0
  81. package/dist/components/KYC/backup/Step2.d.ts +1 -0
  82. package/dist/components/KYC/backup/Step2.js +13 -0
  83. package/dist/components/KYC/backup/Step3.d.ts +1 -0
  84. package/dist/components/KYC/backup/Step3.js +13 -0
  85. package/dist/components/KYC/backup/Step4.d.ts +1 -0
  86. package/dist/components/KYC/backup/Step4.js +7 -0
  87. package/dist/components/KYC/backup/useKYC.d.ts +10 -0
  88. package/dist/components/KYC/backup/useKYC.js +8 -0
  89. package/dist/components/KYC/utils.js +18 -18
  90. package/dist/components/Messages/Message.d.ts +1 -0
  91. package/dist/components/Messages/Message.js +35 -0
  92. package/dist/components/Messages/MessageContext.d.ts +2 -0
  93. package/dist/components/Messages/MessageContext.js +2 -0
  94. package/dist/components/Messages/MessageItem.d.ts +4 -0
  95. package/dist/components/Messages/MessageItem.js +34 -0
  96. package/dist/components/Messages/MessagePopup.d.ts +1 -0
  97. package/dist/components/Messages/MessagePopup.js +20 -0
  98. package/dist/components/Messages/MessageTrigger.d.ts +8 -0
  99. package/dist/components/Messages/MessageTrigger.js +19 -0
  100. package/dist/components/News/News.js +1 -1
  101. package/dist/components/Promo/Promo.client.js +1 -1
  102. package/dist/components/Quests/CountdownTimer.d.ts +15 -0
  103. package/dist/components/Quests/CountdownTimer.js +33 -0
  104. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
  105. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +73 -0
  106. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
  107. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +8 -0
  108. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
  109. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
  110. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
  111. package/dist/components/Quests/WageringQuest/WageringQuest.js +19 -0
  112. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
  113. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +8 -0
  114. package/dist/components/Search/Search.lazy.js +1 -1
  115. package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +2 -0
  116. package/dist/components/TournamentCounter/TournamentCounter.client.js +50 -0
  117. package/dist/components/TournamentCounter/TournamentCounter.d.ts +8 -0
  118. package/dist/components/TournamentCounter/TournamentCounter.js +21 -0
  119. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +8 -0
  120. package/dist/components/TournamentCounter/TournamentCounterItem.js +106 -0
  121. package/dist/components/TournamentCounter/index.d.ts +1 -0
  122. package/dist/components/TournamentCounter/index.js +1 -0
  123. package/dist/components/Tournaments/TournamentDesktop.d.ts +1 -0
  124. package/dist/components/Tournaments/TournamentDesktop.js +57 -0
  125. package/dist/components/Tournaments/TournamentGameProviders.d.ts +5 -0
  126. package/dist/components/Tournaments/TournamentGameProviders.js +38 -0
  127. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +7 -0
  128. package/dist/components/Tournaments/TournamentItemDesktop.js +56 -0
  129. package/dist/components/Tournaments/TournamentItemMobile.d.ts +7 -0
  130. package/dist/components/Tournaments/TournamentItemMobile.js +54 -0
  131. package/dist/components/Tournaments/TournamentMobile.d.ts +1 -0
  132. package/dist/components/Tournaments/TournamentMobile.js +55 -0
  133. package/dist/components/Tournaments/TournamentRules.d.ts +5 -0
  134. package/dist/components/Tournaments/TournamentRules.js +11 -0
  135. package/dist/components/Tournaments/Tournaments.client.d.ts +2 -0
  136. package/dist/components/Tournaments/Tournaments.client.js +20 -0
  137. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  138. package/dist/components/Tournaments/TournamentsContext.d.ts +4 -0
  139. package/dist/components/Tournaments/TournamentsContext.js +3 -0
  140. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  141. package/dist/components/Tournaments/useTournamentData.d.ts +10 -0
  142. package/dist/components/Tournaments/useTournamentData.js +72 -0
  143. package/dist/components/Tournaments/useTournamentItemData.d.ts +16 -0
  144. package/dist/components/Tournaments/useTournamentItemData.js +64 -0
  145. package/dist/components/index.d.ts +33 -0
  146. package/dist/components/index.js +33 -0
  147. package/dist/constants/envVars.d.ts +5 -0
  148. package/dist/constants/envVars.js +28 -0
  149. package/dist/constants/gameProviders.d.ts +5 -0
  150. package/dist/constants/gameProviders.js +362 -0
  151. package/dist/constants/gameTypes.d.ts +4 -0
  152. package/dist/constants/gameTypes.js +64 -0
  153. package/dist/constants/headerKeys.d.ts +1 -0
  154. package/dist/constants/headerKeys.js +1 -0
  155. package/dist/constants/secretQuestions.d.ts +3 -0
  156. package/dist/constants/secretQuestions.js +24 -0
  157. package/dist/constants/storageKeys.d.ts +2 -0
  158. package/dist/constants/storageKeys.js +2 -0
  159. package/dist/icons/BellRingIcon.d.ts +2 -0
  160. package/dist/icons/BellRingIcon.js +4 -0
  161. package/dist/icons/index.d.ts +65 -0
  162. package/dist/icons/index.js +65 -0
  163. package/dist/images/hacksaw-gaming.png +0 -0
  164. package/dist/server/services/index.d.ts +4 -0
  165. package/dist/server/services/index.js +4 -0
  166. package/dist/server/utils/index.d.ts +29 -0
  167. package/dist/server/utils/index.js +29 -0
  168. package/dist/services/queries.js +2527 -2527
  169. package/dist/styles/theme.css +694 -694
  170. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  171. package/dist/ui/Avatar/Avatar.d.ts +9 -9
  172. package/dist/ui/Badge/Badge.d.ts +12 -12
  173. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  174. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  175. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  176. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  177. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  178. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  179. package/dist/ui/Dialog/Dialog.d.ts +88 -88
  180. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  181. package/dist/ui/Field/Field.d.ts +21 -21
  182. package/dist/ui/Menu/Menu.d.ts +90 -90
  183. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  184. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  185. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  186. package/dist/ui/Popover/Popover.d.ts +88 -88
  187. package/dist/ui/Presence.d.ts +2 -0
  188. package/dist/ui/Presence.js +7 -0
  189. package/dist/ui/Progress/Progress.d.ts +27 -27
  190. package/dist/ui/Prose.d.ts +2 -0
  191. package/dist/ui/Prose.js +5 -0
  192. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  193. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  194. package/dist/ui/Select/Select.d.ts +45 -45
  195. package/dist/ui/Table/Table.d.ts +21 -21
  196. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  197. package/dist/ui/index.d.ts +26 -0
  198. package/dist/ui/index.js +26 -0
  199. package/dist/utils/constants.d.ts +2 -0
  200. package/dist/utils/constants.js +2 -0
  201. package/dist/utils/dataUrlToBlob.d.ts +1 -0
  202. package/dist/utils/dataUrlToBlob.js +11 -0
  203. package/dist/utils/index.d.ts +17 -0
  204. package/dist/utils/index.js +17 -0
  205. package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
  206. package/dist/utils/isBetween3amAnd3pm.js +5 -0
  207. package/dist/utils/isMobile.d.ts +5 -0
  208. package/dist/utils/isMobile.js +9 -0
  209. package/dist/utils/resizeImageSize.d.ts +1 -0
  210. package/dist/utils/resizeImageSize.js +6 -0
  211. package/package.json +164 -164
  212. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  213. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  214. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  215. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  216. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  217. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  218. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  219. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  220. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  221. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  222. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  223. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  224. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  225. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
@@ -0,0 +1,65 @@
1
+ export * from './useAccountQuery';
2
+ export * from './useAuthenticateMutation';
3
+ export * from './useAvailablePromosQuery';
4
+ export * from './useAvailableQuestsQuery';
5
+ export * from './useBetRecordsQuery';
6
+ export * from './useBonusesQuery';
7
+ export * from './useBonusQuery';
8
+ export * from './useCashbackBonusesQuery';
9
+ export * from './useCashbackBonusQuery';
10
+ export * from './useCashbackQuery';
11
+ export * from './useCashbacksQuery';
12
+ export * from './useCheckInDailyCheckInQuestMutation';
13
+ export * from './useChunk';
14
+ export * from './useClaimCashbackBonusMutation';
15
+ export * from './useClaimSpotBonusMutation';
16
+ export * from './useControllableState';
17
+ export * from './useCooldown';
18
+ export * from './useCreateGameSessionMutation';
19
+ export * from './useCreateGCashDepositMutation';
20
+ export * from './useCreateGCashWithdrawalMutation';
21
+ export * from './useCreateInstapayWithdrawalMutation';
22
+ export * from './useCreateMayaAppDepositMutation';
23
+ export * from './useCreateMayaAppWithdrawalMutation';
24
+ export * from './useCreateMayaDepositMutation';
25
+ export * from './useCreateMayaWithdrawalMutation';
26
+ export * from './useCreateOnlineBankDepositMutation';
27
+ export * from './useCreateQRPHDepositMutation';
28
+ export * from './useDepositQuery';
29
+ export * from './useDepositRecordsQuery';
30
+ export * from './useDepositsCountQuery';
31
+ export * from './useDisclosure';
32
+ export * from './useEndGameSessionMutation';
33
+ export * from './useFavoriteGamesQuery';
34
+ export * from './useGamesQuery';
35
+ export * from './useGlobalStore';
36
+ export * from './useInfiniteQueryHelper';
37
+ export * from './useInstapayBankListQuery';
38
+ export * from './useIsMayaSessionValidQuery';
39
+ export * from './useJackpotsQuery';
40
+ export * from './useLocaleInfo';
41
+ export * from './useMarkGameAsFavoriteMutation';
42
+ export * from './useMarkMessageAsReadMutation';
43
+ export * from './useMemberVerificationQuery';
44
+ export * from './useMessagesQuery';
45
+ export * from './useMobileNumberParser';
46
+ export * from './useOnMMA';
47
+ export * from './usePaymentSettingsQuery';
48
+ export * from './usePlatformQuery';
49
+ export * from './useProfileCompletionQuery';
50
+ export * from './usePromoQuery';
51
+ export * from './usePromosQuery';
52
+ export * from './useRemainingTime';
53
+ export * from './useSendVerificationCodeMutation';
54
+ export * from './useSessionQuery';
55
+ export * from './useSignInMutation';
56
+ export * from './useSignOutMutation';
57
+ export * from './useSignUpMutation';
58
+ export * from './useTopWinsQuery';
59
+ export * from './useTournamentsQuery';
60
+ export * from './useTransactionRecordsQuery';
61
+ export * from './useUnmarkGameAsFavoriteMutation';
62
+ export * from './useUnreadMessagesCountQuery';
63
+ export * from './useUpdateAccountMutation';
64
+ export * from './useWalletQuery';
65
+ export * from './useWithdrawalRecordsQuery';
@@ -0,0 +1,65 @@
1
+ export * from './useAccountQuery.js';
2
+ export * from './useAuthenticateMutation.js';
3
+ export * from './useAvailablePromosQuery.js';
4
+ export * from './useAvailableQuestsQuery.js';
5
+ export * from './useBetRecordsQuery.js';
6
+ export * from './useBonusesQuery.js';
7
+ export * from './useBonusQuery.js';
8
+ export * from './useCashbackBonusesQuery.js';
9
+ export * from './useCashbackBonusQuery.js';
10
+ export * from './useCashbackQuery.js';
11
+ export * from './useCashbacksQuery.js';
12
+ export * from './useCheckInDailyCheckInQuestMutation.js';
13
+ export * from './useChunk.js';
14
+ export * from './useClaimCashbackBonusMutation.js';
15
+ export * from './useClaimSpotBonusMutation.js';
16
+ export * from './useControllableState.js';
17
+ export * from './useCooldown.js';
18
+ export * from './useCreateGameSessionMutation.js';
19
+ export * from './useCreateGCashDepositMutation.js';
20
+ export * from './useCreateGCashWithdrawalMutation.js';
21
+ export * from './useCreateInstapayWithdrawalMutation.js';
22
+ export * from './useCreateMayaAppDepositMutation.js';
23
+ export * from './useCreateMayaAppWithdrawalMutation.js';
24
+ export * from './useCreateMayaDepositMutation.js';
25
+ export * from './useCreateMayaWithdrawalMutation.js';
26
+ export * from './useCreateOnlineBankDepositMutation.js';
27
+ export * from './useCreateQRPHDepositMutation.js';
28
+ export * from './useDepositQuery.js';
29
+ export * from './useDepositRecordsQuery.js';
30
+ export * from './useDepositsCountQuery.js';
31
+ export * from './useDisclosure.js';
32
+ export * from './useEndGameSessionMutation.js';
33
+ export * from './useFavoriteGamesQuery.js';
34
+ export * from './useGamesQuery.js';
35
+ export * from './useGlobalStore.js';
36
+ export * from './useInfiniteQueryHelper.js';
37
+ export * from './useInstapayBankListQuery.js';
38
+ export * from './useIsMayaSessionValidQuery.js';
39
+ export * from './useJackpotsQuery.js';
40
+ export * from './useLocaleInfo.js';
41
+ export * from './useMarkGameAsFavoriteMutation.js';
42
+ export * from './useMarkMessageAsReadMutation.js';
43
+ export * from './useMemberVerificationQuery.js';
44
+ export * from './useMessagesQuery.js';
45
+ export * from './useMobileNumberParser.js';
46
+ export * from './useOnMMA.js';
47
+ export * from './usePaymentSettingsQuery.js';
48
+ export * from './usePlatformQuery.js';
49
+ export * from './useProfileCompletionQuery.js';
50
+ export * from './usePromoQuery.js';
51
+ export * from './usePromosQuery.js';
52
+ export * from './useRemainingTime.js';
53
+ export * from './useSendVerificationCodeMutation.js';
54
+ export * from './useSessionQuery.js';
55
+ export * from './useSignInMutation.js';
56
+ export * from './useSignOutMutation.js';
57
+ export * from './useSignUpMutation.js';
58
+ export * from './useTopWinsQuery.js';
59
+ export * from './useTournamentsQuery.js';
60
+ export * from './useTransactionRecordsQuery.js';
61
+ export * from './useUnmarkGameAsFavoriteMutation.js';
62
+ export * from './useUnreadMessagesCountQuery.js';
63
+ export * from './useUpdateAccountMutation.js';
64
+ export * from './useWalletQuery.js';
65
+ export * from './useWithdrawalRecordsQuery.js';
@@ -1,2 +1,2 @@
1
1
  import type { FavoriteGame, Game, GameSession, Mutation } from '../../types';
2
- export declare const useCreateDigitainGameSessionMutatio: Mutation<GameSession | null, Game | FavoriteGame>;
2
+ export declare const useCreateDigitainGameSessionMutation: Mutation<GameSession | null, Game | FavoriteGame>;
@@ -6,13 +6,19 @@ import { createGameSession, getGameSession } from '../../services/wallet.js';
6
6
  import { createPoll } from '../../utils/createPoll.js';
7
7
  import { getCreateDigitainGameSessionMutationKey } from '../../utils/mutationKeys.js';
8
8
  import { getSession } from '../services/getSession.js';
9
- export const useCreateDigitainGameSessionMutatio = (config) => {
9
+ import { useSessionQuery } from './useSessionQuery.js';
10
+ export const useCreateDigitainGameSessionMutation = (config) => {
11
+ const session = useSessionQuery();
10
12
  return useMutation({
11
13
  ...config,
12
- mutationKey: getCreateDigitainGameSessionMutationKey(),
14
+ mutationKey: [
15
+ getCreateDigitainGameSessionMutationKey(),
16
+ session.data?.status,
17
+ ],
13
18
  mutationFn: async (game) => {
14
19
  const id = ObjectId.generate(ObjectType.GameSession).toString();
15
20
  const session = await getSession();
21
+ console.log('Creating Digitain game session');
16
22
  invariant(session.status === 'authenticated');
17
23
  await createGameSession({
18
24
  id,
@@ -0,0 +1,4 @@
1
+ export * from './authenticate';
2
+ export * from './getSession';
3
+ export * from './signIn';
4
+ export * from './signOut';
@@ -0,0 +1,4 @@
1
+ export * from './authenticate.js';
2
+ export * from './getSession.js';
3
+ export * from './signIn.js';
4
+ export * from './signOut.js';
@@ -0,0 +1,3 @@
1
+ export * from './createContext';
2
+ export * from './createRecipeContext';
3
+ export * from './toaster';
@@ -0,0 +1,3 @@
1
+ export * from './createContext.js';
2
+ export * from './createRecipeContext.js';
3
+ export * from './toaster.js';
@@ -13,7 +13,7 @@ import piggyBank from '../../images/piggy-bank.png';
13
13
  import { Badge } from '../../ui/Badge/index.js';
14
14
  import { Collapsible } from '../../ui/Collapsible/index.js';
15
15
  import { Progress } from '../../ui/Progress/index.js';
16
- import { Prose } from '../../ui/Prose/index.js';
16
+ import { Prose } from '../../ui/Prose.js';
17
17
  import { capitalize } from '../../utils/capitalize.js';
18
18
  import { formatNumber } from '../../utils/formatNumber.js';
19
19
  import { parseDecimal } from '../../utils/parseDecimal.js';
@@ -11,7 +11,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
11
11
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
12
12
  import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
13
13
  import { Button } from '../../ui/Button/index.js';
14
- import { Prose } from '../../ui/Prose/index.js';
14
+ import { Prose } from '../../ui/Prose.js';
15
15
  export function Cashback__client(props) {
16
16
  const availablePromosQuery = useAvailablePromosQuery();
17
17
  const cashbackQuery = useCashbackQuery(props.id);
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import Image from 'next/image';
4
4
  import Link from 'next/link';
5
5
  import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
6
- import { Prose } from '../../ui/Prose/index.js';
6
+ import { Prose } from '../../ui/Prose.js';
7
7
  import { stripTags } from '../../utils/stripTags.js';
8
8
  export function CustomPromo(props) {
9
9
  return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:title", content: props.promo.name }), _jsx("meta", { name: "og:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:title", content: props.promo.name }), _jsx("meta", { name: "twitter:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "twitter:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "text-button-tertiary-fg flex w-fit items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), _jsx(Image, { src: props.promo.banner, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: props.promo.name }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
@@ -0,0 +1,4 @@
1
+ export interface DigitainBootstrapperParams {
2
+ hostname: string;
3
+ }
4
+ export declare function DigitainLauncher(props: DigitainBootstrapperParams): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Script from 'next/script';
3
+ import { getSession } from '../../server/services/getSession.js';
4
+ import { DigitainContainer } from './DigitianContainter.js';
5
+ import { defaultDigitainParams, getDigitainLaunchToken } from './utils.js';
6
+ export async function DigitainLauncher(props) {
7
+ const session = await getSession();
8
+ const params = defaultDigitainParams;
9
+ if (session.status === 'authenticated') {
10
+ params.token = await getDigitainLaunchToken();
11
+ }
12
+ return (_jsxs(_Fragment, { children: [_jsx(Script, { src: `//${props.hostname}/js/partner/bootstrapper.min.js` }), _jsx(DigitainContainer, { params: params })] }));
13
+ }
@@ -0,0 +1,5 @@
1
+ import type { DigitainBootstrapperParams } from './types';
2
+ export interface DigitainContainerProps {
3
+ params: DigitainBootstrapperParams;
4
+ }
5
+ export declare function DigitainContainer(props: DigitainContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,40 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect, useState } from 'react';
4
+ import { useCreateDigitainGameSessionMutation } from '../../client/hooks/useCreateDigitainGameSessionMutatio.js';
5
+ import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
6
+ export function DigitainContainer(props) {
7
+ const session = useSessionQuery();
8
+ const [loading, setLoading] = useState(false);
9
+ const [sportsBookLoaded, setSportsBookLoaded] = useState(false);
10
+ const digitainSession = useCreateDigitainGameSessionMutation();
11
+ useEffect(() => {
12
+ console.log('did account change?', session.data?.status);
13
+ setLoading(true);
14
+ let attempts = 0;
15
+ const maxAttempts = 5; // e.g. wait up to ~10 seconds
16
+ console.log('Waiting for Bootstrapper to load...');
17
+ function checkAndBoot() {
18
+ if (typeof window !== 'undefined' && window.Bootstrapper) {
19
+ const params = {
20
+ ...props.params,
21
+ token: digitainSession.data?.launchUrl,
22
+ };
23
+ window.Bootstrapper.boot(params, { name: 'AsianView' }).then(() => {
24
+ console.log('Sportsbook booted!');
25
+ });
26
+ setLoading(false);
27
+ setSportsBookLoaded(true);
28
+ clearInterval(intervalId);
29
+ }
30
+ else if (++attempts >= maxAttempts) {
31
+ setLoading(false);
32
+ console.warn('Bootstrapper did not load in time.');
33
+ clearInterval(intervalId);
34
+ }
35
+ }
36
+ const intervalId = setInterval(checkAndBoot, 500);
37
+ return () => clearInterval(intervalId);
38
+ }, [props.params, session.data?.status, digitainSession.data?.launchUrl]);
39
+ return _jsx("div", { id: "digitain-container" });
40
+ }
@@ -0,0 +1,49 @@
1
+ export interface DigitainBootstrapperParams {
2
+ server: string;
3
+ containerId: string;
4
+ token: string;
5
+ parent?: string[];
6
+ sportPartner?: string;
7
+ defaultLanguage?: string;
8
+ projectTheme?: 'default' | 'alternative';
9
+ view?: string;
10
+ bottomNavBar?: boolean;
11
+ oddsFormatList?: [0 | 1 | 2 | 3 | 4 | 5];
12
+ oddsFormat?: 0 | 1 | 2 | 3 | 4 | 5;
13
+ zIndex?: {
14
+ closed?: number;
15
+ opened?: number;
16
+ fullOpened?: number;
17
+ };
18
+ initialRoute?: {
19
+ path: string;
20
+ qs?: Record<string, string | number | boolean | undefined | null>;
21
+ hashData?: string;
22
+ };
23
+ betslipBookNumber?: number;
24
+ betslipCopyLinkUrl?: string;
25
+ }
26
+ interface BootstrapperOptions {
27
+ name: 'Mobile' | 'AsianView' | 'EsportView' | 'LatinoView' | 'ModernView' | 'SimpleEast';
28
+ }
29
+ interface SportAppEventData {
30
+ path?: string;
31
+ qs?: Record<string, unknown>;
32
+ hashData?: string;
33
+ additionalData?: Record<string, unknown>;
34
+ }
35
+ type SportAppEventListener = (event: {
36
+ data: SportAppEventData;
37
+ }) => void;
38
+ interface SportAppInstance {
39
+ dispatchEvent: (eventName: 'sportAppEventDispatch', payload: {
40
+ type: number;
41
+ message?: unknown;
42
+ command?: unknown;
43
+ }) => void;
44
+ addEventListener: (eventName: 'sportAppEventDispatch', listener: SportAppEventListener) => void;
45
+ }
46
+ export interface DigitiainBootstrapperInterface {
47
+ boot: (params: DigitainBootstrapperParams, options: BootstrapperOptions) => Promise<SportAppInstance>;
48
+ }
49
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { DigitainBootstrapperParams } from './types';
2
+ export declare const defaultDigitainParams: DigitainBootstrapperParams;
3
+ export declare const getDigitainLaunchToken: () => Promise<string>;
@@ -0,0 +1,63 @@
1
+ import { ObjectId } from '@opexa/object-id';
2
+ import { env } from 'process';
3
+ import invariant from 'tiny-invariant';
4
+ import { getSession } from '../../server/services/getSession.js';
5
+ import { getGames } from '../../services/cmsPortal.js';
6
+ import { ObjectType } from '../../services/ObjectType.js';
7
+ import { createGameSession, getGameSession } from '../../services/wallet.js';
8
+ import { createPoll } from '../../utils/createPoll.js';
9
+ export const defaultDigitainParams = {
10
+ server: env.NEXT_PUBLIC_ENVIRONMENT === 'development'
11
+ ? 'sport-uat.ofwin.fun'
12
+ : 'sport.ofwin.fun',
13
+ containerId: 'digitain-container',
14
+ token: '',
15
+ defaultLanguage: 'en',
16
+ oddsFormatList: [2],
17
+ oddsFormat: 2,
18
+ zIndex: {
19
+ closed: 1990,
20
+ opened: 1923,
21
+ fullOpened: 1827,
22
+ },
23
+ initialRoute: {
24
+ path: '/results',
25
+ hashData: '',
26
+ },
27
+ };
28
+ export const getDigitainLaunchToken = async () => {
29
+ const session = await getSession();
30
+ const digitainGameQuery = await getGames({
31
+ filter: {
32
+ provider: {
33
+ equal: 'DIGITAIN',
34
+ },
35
+ },
36
+ });
37
+ const digitainGame = digitainGameQuery.edges[0]?.node;
38
+ const sessionId = ObjectId.generate(ObjectType.GameSession).toString();
39
+ await createGameSession({
40
+ game: digitainGame.reference,
41
+ id: sessionId,
42
+ }, {
43
+ headers: {
44
+ Authorization: `Bearer ${session.token}`,
45
+ ...(session.domain && {
46
+ Domain: session.domain,
47
+ }),
48
+ },
49
+ });
50
+ const gameSession = await createPoll(async () => {
51
+ invariant(session.status === 'authenticated');
52
+ return await getGameSession(sessionId, {
53
+ headers: {
54
+ Authorization: `Bearer ${session.token}`,
55
+ },
56
+ });
57
+ }, {
58
+ until: (r) => !!r?.launchOptions,
59
+ interval: 1000,
60
+ maxAttempt: 5,
61
+ })();
62
+ return gameSession?.launchOptions?.token || '';
63
+ };
@@ -0,0 +1,10 @@
1
+ import type { ComponentProps, ComponentType } from 'react';
2
+ interface EmptyProps {
3
+ icon: ComponentType<ComponentProps<'svg'>>;
4
+ title: string;
5
+ message: string;
6
+ style?: React.CSSProperties;
7
+ className?: string;
8
+ }
9
+ export declare function Empty(props: EmptyProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function Empty(props) {
3
+ return (_jsxs("div", { role: "alert", "aria-live": "polite", style: props.style, className: props.className, children: [_jsxs("div", { className: "relative mx-auto w-[9.5rem] pt-4", children: [_jsx("div", { className: "bg-utility-gray-200 absolute left-1/2 top-0 size-[6.5rem] -translate-x-1/2 rounded-full" }), _jsx(CloudIcon, { className: "relative h-auto w-full shrink-0" }), _jsx("div", { className: "bg-utility-gray-200/40 absolute bottom-2 left-1/2 flex size-12 -translate-x-1/2 items-center justify-center rounded-full backdrop-blur-sm", children: _jsx(props.icon, { className: "size-6 text-white" }) }), _jsx("div", { className: "bg-utility-gray-200 absolute left-4 top-3.5 size-2.5 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute bottom-0.5 left-3 size-3.5 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute right-3.5 top-1 size-2 rounded-full" }), _jsx("div", { className: "bg-utility-gray-200 absolute right-0 top-6.5 size-3.5 rounded-full" })] }), _jsx("h2", { className: "mt-xl text-center font-semibold", children: props.title }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: props.message })] }));
4
+ }
5
+ function CloudIcon(props) {
6
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152 104", fill: "none", ...props, children: [_jsxs("g", { filter: "url(#filter0_dd_2719_19242)", children: [_jsx("path", { d: "M77.6 0C66.8273 0 57.2978 5.32329 51.4987 13.4829C49.605 13.0363 47.6301 12.8 45.6 12.8C31.4615 12.8 20 24.2615 20 38.4C20 52.5385 31.4615 64 45.6 64L109.6 64C121.971 64 132 53.9712 132 41.6C132 29.2288 121.971 19.2 109.6 19.2C108.721 19.2 107.854 19.2506 107.002 19.349C102.098 7.9677 90.7797 0 77.6 0Z", fill: "#F9FAFB" }), _jsx("ellipse", { cx: "45.6", cy: "38.4008", rx: "25.6", ry: "25.6", fill: "url(#paint0_linear_2719_19242)" }), _jsx("circle", { cx: "77.6", cy: "32", r: "32", fill: "url(#paint1_linear_2719_19242)" }), _jsx("ellipse", { cx: "109.6", cy: "41.5992", rx: "22.4", ry: "22.4", fill: "url(#paint2_linear_2719_19242)" })] }), _jsxs("defs", { children: [_jsxs("filter", { id: "filter0_dd_2719_19242", x: "0", y: "0", width: "152", height: "104", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [_jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), _jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), _jsx("feMorphology", { radius: "4", operator: "erode", in: "SourceAlpha", result: "effect1_dropShadow_2719_19242" }), _jsx("feOffset", { dy: "8" }), _jsx("feGaussianBlur", { stdDeviation: "4" }), _jsx("feComposite", { in2: "hardAlpha", operator: "out" }), _jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.03 0" }), _jsx("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_2719_19242" }), _jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), _jsx("feMorphology", { radius: "4", operator: "erode", in: "SourceAlpha", result: "effect2_dropShadow_2719_19242" }), _jsx("feOffset", { dy: "20" }), _jsx("feGaussianBlur", { stdDeviation: "12" }), _jsx("feComposite", { in2: "hardAlpha", operator: "out" }), _jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.08 0" }), _jsx("feBlend", { mode: "normal", in2: "effect1_dropShadow_2719_19242", result: "effect2_dropShadow_2719_19242" }), _jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect2_dropShadow_2719_19242", result: "shape" })] }), _jsxs("linearGradient", { id: "paint0_linear_2719_19242", x1: "25.9429", y1: "21.4865", x2: "71.2", y2: "64.0007", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] }), _jsxs("linearGradient", { id: "paint1_linear_2719_19242", x1: "53.0286", y1: "10.8571", x2: "109.6", y2: "64", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] }), _jsxs("linearGradient", { id: "paint2_linear_2719_19242", x1: "92.4", y1: "26.7992", x2: "132", y2: "63.9992", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#D0D5DD" }), _jsx("stop", { offset: "0.350715", stopColor: "white", stopOpacity: "0" })] })] })] }));
7
+ }
@@ -22,7 +22,7 @@ import { AlertDialog } from '../../ui/AlertDialog/index.js';
22
22
  import { Button } from '../../ui/Button/index.js';
23
23
  import { IconButton } from '../../ui/IconButton/index.js';
24
24
  import { Portal } from '../../ui/Portal/index.js';
25
- import { Presence } from '../../ui/Presence/index.js';
25
+ import { Presence } from '../../ui/Presence.js';
26
26
  export function GameLaunch() {
27
27
  const globalStore = useGlobalStore(useShallow((ctx) => ({
28
28
  gameLaunch: ctx.gameLaunch,
@@ -0,0 +1,2 @@
1
+ import type { Game } from '@opexa/portal-sdk-core';
2
+ export declare const GameContext: import("react").Context<Game>, useGameContext: () => Game;
@@ -0,0 +1,2 @@
1
+ import { createContext } from '../../client/utils/index.js';
2
+ export const [GameContext, useGameContext] = createContext();
@@ -8,7 +8,7 @@ import { SearchLgIcon } from '../../icons/SearchLgIcon.js';
8
8
  import { Button } from '../../ui/Button/index.js';
9
9
  import { Combobox } from '../../ui/Combobox/index.js';
10
10
  import { Portal } from '../../ui/Portal/index.js';
11
- import { Presence } from '../../ui/Presence/index.js';
11
+ import { Presence } from '../../ui/Presence.js';
12
12
  import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
13
13
  import { GameLaunchTrigger } from '../GameLaunch/index.js';
14
14
  export function GamesSearch(props) {
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface InfiniteScrollProps {
3
+ loader?: ReactNode;
4
+ hasMore?: boolean;
5
+ loadMore: () => Promise<void> | void;
6
+ children?: ReactNode;
7
+ style?: React.CSSProperties;
8
+ className?: string;
9
+ }
10
+ export declare function InfiniteScroll(props: InfiniteScrollProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Fragment } from 'react';
4
+ import { useBoolean, useDebounceCallback, useIntersectionObserver, } from 'usehooks-ts';
5
+ export function InfiniteScroll(props) {
6
+ const { value: loading, setValue: setLoading } = useBoolean(false);
7
+ const loader = props.loader ?? null;
8
+ const hasMore = props.hasMore ?? false;
9
+ const loadMore = useDebounceCallback(async () => {
10
+ if (loading)
11
+ return;
12
+ if (!hasMore)
13
+ return;
14
+ setLoading(true);
15
+ await props.loadMore();
16
+ setLoading(false);
17
+ }, 300);
18
+ const [ref] = useIntersectionObserver({
19
+ onChange(isIntersecting) {
20
+ if (isIntersecting)
21
+ loadMore();
22
+ },
23
+ });
24
+ return (_jsxs(Fragment, { children: [props.children, _jsx("div", { ref: ref, role: "presentation", style: props.style, className: props.className, hidden: !hasMore, children: !!hasMore && _jsx(Fragment, { children: loader }) })] }));
25
+ }
@@ -0,0 +1,2 @@
1
+ import type { JackpotCounterProps } from './JackpotCounter';
2
+ export declare function JackpotCounter__client(props: JackpotCounterProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,66 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import useEmblaCarousel from 'embla-carousel-react';
4
+ import { isString } from 'lodash-es';
5
+ import Link from 'next/link';
6
+ import { useCallback, useEffect, useState } from 'react';
7
+ import { useJackpotsQuery } from '../../client/hooks/index.js';
8
+ import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon } from '../../icons/index.js';
9
+ import { Button } from '../../ui/index.js';
10
+ import { JackpotCounterItem } from './JackpotCounterItem.js';
11
+ export function JackpotCounter__client(props) {
12
+ const [emblaRef, emblaApi] = useEmblaCarousel({
13
+ align: 'start',
14
+ slidesToScroll: 1,
15
+ });
16
+ const scrollPrev = useCallback(() => {
17
+ if (emblaApi)
18
+ emblaApi.scrollPrev();
19
+ }, [emblaApi]);
20
+ const scrollNext = useCallback(() => {
21
+ if (emblaApi)
22
+ emblaApi.scrollNext();
23
+ }, [emblaApi]);
24
+ const [canScrollPrev, setCanScrollPrev] = useState(false);
25
+ const [canScrollNext, setCanScrollNext] = useState(false);
26
+ const onSelect = useCallback(() => {
27
+ if (!emblaApi)
28
+ return;
29
+ setCanScrollPrev(emblaApi.canScrollPrev());
30
+ setCanScrollNext(emblaApi.canScrollNext());
31
+ }, [emblaApi]);
32
+ useEffect(() => {
33
+ if (!emblaApi)
34
+ return;
35
+ onSelect();
36
+ emblaApi.on('select', onSelect);
37
+ emblaApi.on('reInit', onSelect);
38
+ }, [emblaApi, onSelect]);
39
+ const jackpotsQuery = useJackpotsQuery({
40
+ first: 100,
41
+ filter: {
42
+ status: {
43
+ equal: 'ACTIVE',
44
+ },
45
+ deleted: {
46
+ equal: false,
47
+ },
48
+ },
49
+ sort: {
50
+ cursor: 'POOL',
51
+ order: 'DESC',
52
+ },
53
+ });
54
+ const jackpots = jackpotsQuery.data?.pages[0].edges.map((edge) => edge.node) ?? [];
55
+ if (jackpots.length <= 0)
56
+ return null;
57
+ const classNames = isString(props.className)
58
+ ? { root: props.className }
59
+ : (props.className ?? {});
60
+ return (_jsxs("div", { className: classNames.root, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "text-lg font-semibold", children: props.heading ?? 'Jackpots' }), _jsxs("div", { className: "flex items-center md:gap-3xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/jackpots', className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { disabled: !canScrollPrev, onClick: scrollPrev, variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsxs(Button, { disabled: !canScrollNext, onClick: scrollNext, variant: "outline", colorScheme: "gray", className: "rounded-l-none", "aria-label": "Next", children: [_jsx("span", { className: "sr-only", children: "Next" }), _jsx(ArrowRightIcon, { className: "size-5" })] })] })] })] }), _jsx("div", { className: "relative mt-lg lg:overflow-hidden", ref: emblaRef, children: _jsx("div", { className: "flex gap-2.5", children: jackpots.map((jackpot) => (_jsx(JackpotCounterItem, { jackpot: jackpot, className: {
61
+ root: {
62
+ className: classNames.jackpotCounterItemRoot?.className,
63
+ style: classNames.jackpotCounterItemRoot?.style,
64
+ },
65
+ }, viewAllUrl: props.viewAllUrl, hideAnimation: props.hideAnimation }, jackpot.id))) }) })] }));
66
+ }
@@ -0,0 +1,17 @@
1
+ import type { CSSProperties } from 'react';
2
+ export interface ClassNameEntries {
3
+ root?: string;
4
+ jackpotCounterItemRoot?: {
5
+ className?: string;
6
+ style?: CSSProperties;
7
+ };
8
+ }
9
+ export interface JackpotCounterProps {
10
+ /** @default "Promos" */
11
+ heading?: string;
12
+ /** @default "/jackpots" */
13
+ viewAllUrl?: string;
14
+ className?: string | ClassNameEntries;
15
+ hideAnimation?: boolean;
16
+ }
17
+ export declare function JackpotCounter(props: JackpotCounterProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { prefetchJackpotsQuery } from '../../server/utils/index.js';
3
+ import { JackpotCounter__client } from './JackpotCounter.client.js';
4
+ export async function JackpotCounter(props) {
5
+ await prefetchJackpotsQuery({
6
+ first: 100,
7
+ filter: {
8
+ status: {
9
+ equal: 'ACTIVE',
10
+ },
11
+ deleted: {
12
+ equal: false,
13
+ },
14
+ },
15
+ sort: {
16
+ cursor: 'POOL',
17
+ order: 'DESC',
18
+ },
19
+ });
20
+ return _jsx(JackpotCounter__client, { ...props });
21
+ }
@@ -0,0 +1,18 @@
1
+ import type { Jackpot } from '@opexa/portal-sdk-core';
2
+ import { type CSSProperties } from 'react';
3
+ interface ClassNameEntries {
4
+ root?: {
5
+ className?: string;
6
+ style?: CSSProperties;
7
+ };
8
+ }
9
+ export interface JackpotCounterCardProps {
10
+ jackpot: Jackpot;
11
+ className?: string | ClassNameEntries;
12
+ style?: string;
13
+ /** @default "/jackpots" */
14
+ viewAllUrl?: string;
15
+ hideAnimation?: boolean;
16
+ }
17
+ export declare function JackpotCounterItem({ jackpot, className, viewAllUrl, hideAnimation, }: JackpotCounterCardProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};