@opexa/portal-components 0.0.18 → 0.0.20

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 (427) hide show
  1. package/dist/client/hooks/index.d.ts +6 -3
  2. package/dist/client/hooks/useAuthenticateMutation.js +1 -1
  3. package/dist/client/hooks/useAuthenticateMutation.mjs +5 -4
  4. package/dist/client/hooks/useBonusesQuery.d.ts +3 -0
  5. package/dist/client/hooks/useBonusesQuery.js +1 -0
  6. package/dist/client/hooks/useBonusesQuery.mjs +38 -0
  7. package/dist/client/hooks/useCreateGameSessionMutation.d.ts +2 -2
  8. package/dist/client/hooks/useCreateGameSessionMutation.js +1 -1
  9. package/dist/client/hooks/useCreateGameSessionMutation.mjs +22 -22
  10. package/dist/client/hooks/useEndGameSessionMutation.d.ts +2 -2
  11. package/dist/client/hooks/useEndGameSessionMutation.js +1 -1
  12. package/dist/client/hooks/useEndGameSessionMutation.mjs +18 -18
  13. package/dist/client/hooks/useFavoriteGamesQuery.d.ts +3 -0
  14. package/dist/client/hooks/useFavoriteGamesQuery.js +1 -0
  15. package/dist/client/hooks/useFavoriteGamesQuery.mjs +38 -0
  16. package/dist/client/hooks/useGlobalStore.d.ts +30 -20
  17. package/dist/client/hooks/useGlobalStore.js +1 -1
  18. package/dist/client/hooks/useGlobalStore.mjs +39 -6
  19. package/dist/client/hooks/useJackpotPayoutsQuery.d.ts +3 -0
  20. package/dist/client/hooks/useJackpotPayoutsQuery.js +1 -0
  21. package/dist/client/hooks/useJackpotPayoutsQuery.mjs +31 -0
  22. package/dist/client/hooks/useMarkGameAsFavoriteMutation.d.ts +2 -0
  23. package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +1 -0
  24. package/dist/client/hooks/useMarkGameAsFavoriteMutation.mjs +37 -0
  25. package/dist/client/hooks/useMarkMessageAsReadMutation.d.ts +1 -5
  26. package/dist/client/hooks/useMarkMessageAsReadMutation.js +1 -1
  27. package/dist/client/hooks/useMarkMessageAsReadMutation.mjs +18 -18
  28. package/dist/client/hooks/useSignInMutation.js +1 -1
  29. package/dist/client/hooks/useSignInMutation.mjs +3 -2
  30. package/dist/client/hooks/useSignOutMutation.js +1 -1
  31. package/dist/client/hooks/useSignOutMutation.mjs +11 -10
  32. package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.d.ts +2 -0
  33. package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +1 -0
  34. package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.mjs +37 -0
  35. package/dist/client/services/getSession.d.ts +1 -1
  36. package/dist/client/services/getSession.js +1 -1
  37. package/dist/client/services/getSession.mjs +4 -3
  38. package/dist/client-hooks.js +1 -1
  39. package/dist/client-hooks.mjs +90 -84
  40. package/dist/components/Account/Account.d.ts +17 -10
  41. package/dist/components/Account/Account.js +1 -1
  42. package/dist/components/Account/Account.mjs +204 -148
  43. package/dist/components/Account/account.recipe.d.ts +61 -0
  44. package/dist/components/Account/account.recipe.js +1 -0
  45. package/dist/components/Account/account.recipe.mjs +35 -0
  46. package/dist/components/BetRecords/BetRecords.js +1 -1
  47. package/dist/components/BetRecords/BetRecords.mjs +174 -150
  48. package/dist/components/Bonus/Bonus.client.js +1 -0
  49. package/dist/components/Bonus/Bonus.client.mjs +143 -0
  50. package/dist/components/Bonus/Bonus.js +1 -0
  51. package/dist/components/Bonus/Bonus.mjs +8 -0
  52. package/dist/components/Bonuses/Bonuses.js +1 -1
  53. package/dist/components/Bonuses/Bonuses.mjs +6 -5
  54. package/dist/components/DepositWithdrawal/AmountChoices.js +1 -1
  55. package/dist/components/DepositWithdrawal/AmountChoices.mjs +4 -2
  56. package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +1 -1
  57. package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.mjs +25 -23
  58. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +1 -1
  59. package/dist/components/DepositWithdrawal/Deposit/Deposit.mjs +3 -2
  60. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
  61. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.mjs +15 -13
  62. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
  63. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.mjs +4 -2
  64. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
  65. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.mjs +4 -2
  66. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
  67. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.mjs +4 -2
  68. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +1 -1
  69. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.mjs +3 -2
  70. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +1 -1
  71. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.mjs +9 -8
  72. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +1 -1
  73. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.mjs +36 -34
  74. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +1 -1
  75. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.mjs +3 -2
  76. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.js +1 -1
  77. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.mjs +7 -6
  78. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +1 -1
  79. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.mjs +9 -8
  80. package/dist/components/DepositWithdrawal/DepositWithdrawal.js +1 -1
  81. package/dist/components/DepositWithdrawal/DepositWithdrawal.mjs +12 -10
  82. package/dist/components/DepositWithdrawal/PaymentMethods.js +1 -1
  83. package/dist/components/DepositWithdrawal/PaymentMethods.mjs +4 -2
  84. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +1 -1
  85. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.mjs +9 -7
  86. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
  87. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.mjs +4 -2
  88. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +1 -1
  89. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.mjs +4 -2
  90. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
  91. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.mjs +9 -7
  92. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +1 -1
  93. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.mjs +3 -2
  94. package/dist/components/Disclaimer/Disclaimer.js +1 -1
  95. package/dist/components/Disclaimer/Disclaimer.mjs +7 -6
  96. package/dist/components/Empty.js +1 -0
  97. package/dist/components/{Empty/CloudIcon.mjs → Empty.mjs} +26 -11
  98. package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +2 -0
  99. package/dist/components/FavoriteGames/FavoriteGames.client.js +1 -0
  100. package/dist/components/FavoriteGames/FavoriteGames.client.mjs +132 -0
  101. package/dist/components/FavoriteGames/FavoriteGames.d.ts +6 -0
  102. package/dist/components/FavoriteGames/FavoriteGames.js +1 -0
  103. package/dist/components/FavoriteGames/FavoriteGames.mjs +17 -0
  104. package/dist/components/FavoriteGames/index.d.ts +1 -0
  105. package/dist/components/GameLaunch/GameLaunch.d.ts +1 -5
  106. package/dist/components/GameLaunch/GameLaunch.js +1 -1
  107. package/dist/components/GameLaunch/GameLaunch.mjs +147 -123
  108. package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +2 -2
  109. package/dist/components/GameLaunch/GameLaunchTrigger.js +1 -1
  110. package/dist/components/GameLaunch/GameLaunchTrigger.mjs +7 -6
  111. package/dist/components/GameProviders/GameProviders.d.ts +7 -10
  112. package/dist/components/GameProviders/GameProviders.js +1 -0
  113. package/dist/components/GameProviders/GameProviders.mjs +122 -0
  114. package/dist/components/GameProviders/index.d.ts +1 -0
  115. package/dist/components/Games/Games.client.js +1 -1
  116. package/dist/components/Games/Games.client.mjs +91 -66
  117. package/dist/components/Games/Games.js +1 -1
  118. package/dist/components/Games/Games.mjs +4 -2
  119. package/dist/components/GamesSearch/GamesSearch.d.ts +6 -0
  120. package/dist/components/GamesSearch/GamesSearch.js +1 -0
  121. package/dist/components/GamesSearch/GamesSearch.mjs +199 -0
  122. package/dist/components/GamesSearch/GamesSearchTrigger.d.ts +4 -0
  123. package/dist/components/GamesSearch/GamesSearchTrigger.js +1 -0
  124. package/dist/components/GamesSearch/GamesSearchTrigger.mjs +50 -0
  125. package/dist/components/GamesSearch/index.d.ts +2 -0
  126. package/dist/components/InfiniteScroll.d.ts +10 -0
  127. package/dist/components/InfiniteScroll.js +1 -0
  128. package/dist/components/InfiniteScroll.mjs +30 -0
  129. package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +2 -0
  130. package/dist/components/JackpotCounter/JackpotCounter.client.js +1 -0
  131. package/dist/components/JackpotCounter/JackpotCounter.client.mjs +139 -0
  132. package/dist/components/JackpotCounter/JackpotCounter.d.ts +1 -1
  133. package/dist/components/JackpotCounter/JackpotCounter.js +1 -1
  134. package/dist/components/JackpotCounter/JackpotCounter.mjs +10 -114
  135. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +1 -0
  136. package/dist/components/JackpotCounter/JackpotCounterItem.js +1 -1
  137. package/dist/components/JackpotCounter/JackpotCounterItem.mjs +206 -119
  138. package/dist/components/JackpotCounter/JackpotCounterItem.module.css.js +1 -1
  139. package/dist/components/JackpotCounter/JackpotCounterItem.module.css.mjs +11 -9
  140. package/dist/components/Jackpots/JackpotGameProviders.js +1 -0
  141. package/dist/components/Jackpots/JackpotGameProviders.mjs +105 -0
  142. package/dist/components/Jackpots/JackpotItem.d.ts +2 -2
  143. package/dist/components/Jackpots/JackpotItem.js +1 -0
  144. package/dist/components/Jackpots/JackpotItem.mjs +408 -0
  145. package/dist/components/Jackpots/JackpotItemMobile.d.ts +2 -2
  146. package/dist/components/Jackpots/JackpotItemMobile.js +1 -0
  147. package/dist/components/Jackpots/JackpotItemMobile.mjs +427 -0
  148. package/dist/components/Jackpots/JackpotRules.d.ts +6 -0
  149. package/dist/components/Jackpots/JackpotRules.js +1 -0
  150. package/dist/components/Jackpots/JackpotRules.mjs +78 -0
  151. package/dist/components/Jackpots/Jackpots.d.ts +2 -2
  152. package/dist/components/Jackpots/Jackpots.js +1 -0
  153. package/dist/components/Jackpots/Jackpots.mjs +61 -0
  154. package/dist/components/KYC/KYC.d.ts +5 -0
  155. package/dist/components/KYC/KYC.js +1 -0
  156. package/dist/components/KYC/KYC.mjs +84 -0
  157. package/dist/components/KYC/KYCContext.d.ts +3 -0
  158. package/dist/components/KYC/KYCContext.js +1 -0
  159. package/dist/components/KYC/KYCContext.mjs +11 -0
  160. package/dist/components/KYC/KYCTrigger.d.ts +5 -0
  161. package/dist/components/KYC/KYCTrigger.js +1 -0
  162. package/dist/components/KYC/KYCTrigger.mjs +42 -0
  163. package/dist/components/KYC/Step1.d.ts +1 -0
  164. package/dist/components/KYC/Step1.js +1 -0
  165. package/dist/components/KYC/Step1.mjs +67 -0
  166. package/dist/components/KYC/Step2.d.ts +1 -0
  167. package/dist/components/KYC/Step2.js +1 -0
  168. package/dist/components/KYC/Step2.mjs +126 -0
  169. package/dist/components/KYC/Step3.d.ts +1 -0
  170. package/dist/components/KYC/Step3.js +1 -0
  171. package/dist/components/KYC/Step3.mjs +98 -0
  172. package/dist/components/KYC/StepIndicator.d.ts +1 -0
  173. package/dist/components/KYC/StepIndicator.js +1 -0
  174. package/dist/components/KYC/StepIndicator.mjs +42 -0
  175. package/dist/components/KYC/UploadDocument.d.ts +1 -0
  176. package/dist/components/KYC/UploadDocument.js +1 -0
  177. package/dist/components/KYC/UploadDocument.mjs +69 -0
  178. package/dist/components/KYC/UploadSelfie.d.ts +1 -0
  179. package/dist/components/KYC/UploadSelfie.js +1 -0
  180. package/dist/components/KYC/UploadSelfie.mjs +65 -0
  181. package/dist/components/KYC/index.d.ts +2 -0
  182. package/dist/components/KYC/useKYC.d.ts +14 -0
  183. package/dist/components/KYC/useKYC.js +1 -0
  184. package/dist/components/KYC/useKYC.mjs +43 -0
  185. package/dist/components/KYC/utils.d.ts +1 -0
  186. package/dist/components/Messages/MessageItem.js +1 -1
  187. package/dist/components/Messages/MessageItem.mjs +37 -28
  188. package/dist/components/Messages/MessagePopup.js +1 -1
  189. package/dist/components/Messages/MessagePopup.mjs +35 -29
  190. package/dist/components/Messages/Messages.js +1 -1
  191. package/dist/components/Messages/Messages.mjs +80 -61
  192. package/dist/components/PortalProvider/PortalProvider.client.d.ts +2 -0
  193. package/dist/components/PortalProvider/{Providers.js → PortalProvider.client.js} +1 -1
  194. package/dist/components/PortalProvider/{Providers.mjs → PortalProvider.client.mjs} +28 -15
  195. package/dist/components/PortalProvider/PortalProvider.d.ts +9 -2
  196. package/dist/components/PortalProvider/PortalProvider.js +1 -1
  197. package/dist/components/PortalProvider/PortalProvider.mjs +17 -11
  198. package/dist/components/Promo/Promo.d.ts +4 -1
  199. package/dist/components/Promo/Promo.js +1 -1
  200. package/dist/components/Promo/Promo.mjs +2 -2
  201. package/dist/components/Promo/PromoContent.js +1 -1
  202. package/dist/components/Promo/PromoContent.mjs +75 -22
  203. package/dist/components/Promos/PromoCarousel.js +1 -1
  204. package/dist/components/Promos/PromoCarousel.mjs +5 -3
  205. package/dist/components/Promos/PromoGrid.js +1 -1
  206. package/dist/components/Promos/PromoGrid.mjs +7 -6
  207. package/dist/components/Promos/PromoItem.js +1 -1
  208. package/dist/components/Promos/PromoItem.mjs +3 -2
  209. package/dist/components/Protected/Protected.js +1 -1
  210. package/dist/components/Protected/Protected.mjs +3 -2
  211. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +1 -0
  212. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +1 -0
  213. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.mjs +154 -0
  214. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
  215. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +1 -0
  216. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.mjs +66 -0
  217. package/dist/components/Quests/Quests.d.ts +1 -0
  218. package/dist/components/Quests/Quests.js +1 -0
  219. package/dist/components/Quests/Quests.mjs +15 -0
  220. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +1 -0
  221. package/dist/components/Quests/WageringQuest/WageringQuest.js +1 -0
  222. package/dist/components/Quests/WageringQuest/WageringQuest.mjs +109 -0
  223. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +8 -0
  224. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +1 -0
  225. package/dist/components/Quests/WageringQuest/WageringQuestModal.mjs +63 -0
  226. package/dist/components/Quests/index.d.ts +1 -0
  227. package/dist/components/SignIn/SignIn.js +1 -1
  228. package/dist/components/SignIn/SignIn.mjs +4 -2
  229. package/dist/components/SignIn/SignInForm.js +1 -1
  230. package/dist/components/SignIn/SignInForm.mjs +4 -2
  231. package/dist/components/SignUp/SignUp.js +1 -1
  232. package/dist/components/SignUp/SignUp.mjs +4 -2
  233. package/dist/components/SignUp/SignUpForm.js +1 -1
  234. package/dist/components/SignUp/SignUpForm.mjs +4 -2
  235. package/dist/components/TopWins/TopWins.client.js +1 -1
  236. package/dist/components/TopWins/TopWins.client.mjs +3 -2
  237. package/dist/components/TopWins/TopWins.js +1 -1
  238. package/dist/components/TopWins/TopWins.mjs +4 -2
  239. package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +2 -0
  240. package/dist/components/TournamentCounter/TournamentCounter.client.js +1 -0
  241. package/dist/components/TournamentCounter/TournamentCounter.client.mjs +139 -0
  242. package/dist/components/TournamentCounter/TournamentCounter.d.ts +1 -1
  243. package/dist/components/TournamentCounter/TournamentCounter.js +1 -1
  244. package/dist/components/TournamentCounter/TournamentCounter.mjs +17 -111
  245. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +7 -5
  246. package/dist/components/TournamentCounter/TournamentCounterItem.js +1 -1
  247. package/dist/components/TournamentCounter/TournamentCounterItem.mjs +227 -86
  248. package/dist/components/Tournaments/TournamentGameProviders.d.ts +1 -0
  249. package/dist/components/Tournaments/TournamentGameProviders.js +1 -0
  250. package/dist/components/Tournaments/TournamentGameProviders.mjs +105 -0
  251. package/dist/components/Tournaments/TournamentItem.d.ts +6 -0
  252. package/dist/components/Tournaments/TournamentItem.js +2 -0
  253. package/dist/components/Tournaments/TournamentItem.mjs +262 -0
  254. package/dist/components/Tournaments/TournamentItemMobile.d.ts +8 -0
  255. package/dist/components/Tournaments/TournamentItemMobile.js +2 -0
  256. package/dist/components/Tournaments/TournamentItemMobile.mjs +285 -0
  257. package/dist/components/Tournaments/TournamentRules.d.ts +6 -0
  258. package/dist/components/Tournaments/TournamentRules.js +1 -0
  259. package/dist/components/Tournaments/TournamentRules.mjs +78 -0
  260. package/dist/components/Tournaments/Tournaments.d.ts +8 -0
  261. package/dist/components/Tournaments/Tournaments.js +1 -0
  262. package/dist/components/Tournaments/Tournaments.mjs +47 -0
  263. package/dist/components/Tournaments/index.d.ts +1 -0
  264. package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
  265. package/dist/components/TransactionRecords/DepositRecordsTable.mjs +47 -38
  266. package/dist/components/TransactionRecords/TableFilters.js +1 -1
  267. package/dist/components/TransactionRecords/TableFilters.mjs +236 -194
  268. package/dist/components/TransactionRecords/TransactionRecords.js +1 -1
  269. package/dist/components/TransactionRecords/TransactionRecords.mjs +3 -2
  270. package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -1
  271. package/dist/components/TransactionRecords/TransactionRecordsTable.mjs +62 -53
  272. package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
  273. package/dist/components/TransactionRecords/WithdrawalRecordsTable.mjs +61 -52
  274. package/dist/components/index.d.ts +8 -0
  275. package/dist/components.js +1 -1
  276. package/dist/components.mjs +56 -36
  277. package/dist/icons/ArrowNarrowDownIcon.js +1 -0
  278. package/dist/icons/ArrowNarrowDownIcon.mjs +22 -0
  279. package/dist/icons/ArrowNarrowUpIcon.js +1 -0
  280. package/dist/icons/ArrowNarrowUpIcon.mjs +22 -0
  281. package/dist/icons/Award01Icon.d.ts +2 -0
  282. package/dist/icons/Award01Icon.js +1 -0
  283. package/dist/icons/Award01Icon.mjs +22 -0
  284. package/dist/icons/CalendarIcon.d.ts +2 -0
  285. package/dist/icons/CalendarIcon.js +1 -0
  286. package/dist/icons/CalendarIcon.mjs +26 -0
  287. package/dist/icons/Camera01Icon.d.ts +2 -0
  288. package/dist/icons/Camera01Icon.js +1 -0
  289. package/dist/icons/Camera01Icon.mjs +25 -0
  290. package/dist/icons/CheckCircleIcon.d.ts +2 -0
  291. package/dist/icons/CheckCircleIcon.js +1 -0
  292. package/dist/icons/CheckCircleIcon.mjs +22 -0
  293. package/dist/icons/ClockStopWatchIcon.d.ts +2 -0
  294. package/dist/icons/ClockStopWatchIcon.js +1 -0
  295. package/dist/icons/ClockStopWatchIcon.mjs +26 -0
  296. package/dist/icons/CoinsHandIcon.d.ts +2 -0
  297. package/dist/icons/CoinsHandIcon.js +1 -0
  298. package/dist/icons/CoinsHandIcon.mjs +22 -0
  299. package/dist/icons/CoinsStacked02Icon.d.ts +2 -0
  300. package/dist/icons/CoinsStacked02Icon.js +1 -0
  301. package/dist/icons/CoinsStacked02Icon.mjs +22 -0
  302. package/dist/icons/CoinsSwap02Icon.d.ts +2 -0
  303. package/dist/icons/CoinsSwap02Icon.js +1 -0
  304. package/dist/icons/CoinsSwap02Icon.mjs +22 -0
  305. package/dist/icons/Flag06Icon.d.ts +2 -0
  306. package/dist/icons/Flag06Icon.js +1 -0
  307. package/dist/icons/Flag06Icon.mjs +22 -0
  308. package/dist/icons/HelpCircleIcon.d.ts +2 -0
  309. package/dist/icons/HelpCircleIcon.js +1 -0
  310. package/dist/icons/HelpCircleIcon.mjs +22 -0
  311. package/dist/icons/InfoCircleIcon.d.ts +2 -0
  312. package/dist/icons/InfoCircleIcon.js +1 -0
  313. package/dist/icons/InfoCircleIcon.mjs +27 -0
  314. package/dist/icons/Menu01Icon.d.ts +2 -0
  315. package/dist/icons/Menu01Icon.js +1 -0
  316. package/dist/icons/Menu01Icon.mjs +22 -0
  317. package/dist/icons/Menu03Icon.d.ts +2 -0
  318. package/dist/icons/Menu03Icon.js +1 -0
  319. package/dist/icons/Menu03Icon.mjs +22 -0
  320. package/dist/icons/SearchLgIcon.d.ts +2 -0
  321. package/dist/icons/SearchLgIcon.js +1 -0
  322. package/dist/icons/SearchLgIcon.mjs +22 -0
  323. package/dist/icons/Settings02Icon.d.ts +2 -0
  324. package/dist/icons/Settings02Icon.js +1 -0
  325. package/dist/icons/Settings02Icon.mjs +25 -0
  326. package/dist/icons/Star01Icon.d.ts +2 -0
  327. package/dist/icons/Star01Icon.js +1 -0
  328. package/dist/icons/Star01Icon.mjs +22 -0
  329. package/dist/icons/StarIcon.js +1 -1
  330. package/dist/icons/StarIcon.mjs +1 -2
  331. package/dist/icons/UploadCloud02Icon.d.ts +2 -0
  332. package/dist/icons/UploadCloud02Icon.js +1 -0
  333. package/dist/icons/UploadCloud02Icon.mjs +22 -0
  334. package/dist/icons/index.d.ts +16 -0
  335. package/dist/icons.js +1 -1
  336. package/dist/icons.mjs +80 -48
  337. package/dist/images/fantasma-games.png.js +1 -0
  338. package/dist/images/fantasma-games.png.mjs +4 -0
  339. package/dist/images/hacksaw-gaming.png.js +1 -0
  340. package/dist/images/hacksaw-gaming.png.mjs +4 -0
  341. package/dist/images/trophy-two.png.js +1 -0
  342. package/dist/images/trophy-two.png.mjs +4 -0
  343. package/dist/portal-components.css +1 -1
  344. package/dist/server/services/getSession.d.ts +1 -1
  345. package/dist/server/services/getSession.js +1 -1
  346. package/dist/server/services/getSession.mjs +6 -5
  347. package/dist/server/utils/index.d.ts +2 -1
  348. package/dist/server/utils/prefetchBonusesQuery.d.ts +1 -0
  349. package/dist/server/utils/prefetchBonusesQuery.js +1 -0
  350. package/dist/server/utils/prefetchBonusesQuery.mjs +26 -0
  351. package/dist/server/utils/prefetchFavoriteGamesQuery.d.ts +1 -0
  352. package/dist/server/utils/prefetchFavoriteGamesQuery.js +1 -0
  353. package/dist/server/utils/prefetchFavoriteGamesQuery.mjs +28 -0
  354. package/dist/server-utils.js +1 -1
  355. package/dist/server-utils.mjs +38 -36
  356. package/dist/theme.css +9 -2
  357. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
  358. package/dist/third-parties/FacebookPixel/FacebookPixel.js +1 -0
  359. package/dist/third-parties/FacebookPixel/FacebookPixel.mjs +6 -0
  360. package/dist/third-parties/FacebookPixel/api.d.ts +1 -0
  361. package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
  362. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
  363. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +1 -0
  364. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.mjs +6 -0
  365. package/dist/third-parties/GoogleRecaptcha/api.d.ts +1 -0
  366. package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
  367. package/dist/third-parties/index.d.ts +2 -0
  368. package/dist/types/index.d.ts +8 -0
  369. package/dist/types.d.ts +1 -0
  370. package/dist/types.js +1 -0
  371. package/dist/types.mjs +1 -0
  372. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  373. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  374. package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
  375. package/dist/ui/AlertDialog/alertDialog.recipe.mjs +1 -1
  376. package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
  377. package/dist/ui/Checkbox/checkbox.recipe.mjs +6 -6
  378. package/dist/ui/Combobox/Combobox.d.ts +815 -1
  379. package/dist/ui/Combobox/Combobox.js +1 -1
  380. package/dist/ui/Combobox/Combobox.mjs +27 -2
  381. package/dist/ui/Combobox/combobox.recipe.d.ts +58 -1
  382. package/dist/ui/Combobox/combobox.recipe.js +1 -0
  383. package/dist/ui/Combobox/combobox.recipe.mjs +15 -0
  384. package/dist/ui/DatePicker/DatePicker.d.ts +192 -192
  385. package/dist/ui/DatePicker/datePicker.recipe.d.ts +8 -8
  386. package/dist/ui/Dialog/Dialog.d.ts +88 -88
  387. package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
  388. package/dist/ui/Dialog/dialog.recipe.js +1 -1
  389. package/dist/ui/Dialog/dialog.recipe.mjs +3 -3
  390. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  391. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  392. package/dist/ui/Drawer/drawer.recipe.js +1 -1
  393. package/dist/ui/Drawer/drawer.recipe.mjs +1 -1
  394. package/dist/ui/IconButton/iconButton.recipe.d.ts +1 -0
  395. package/dist/ui/IconButton/iconButton.recipe.js +1 -1
  396. package/dist/ui/IconButton/iconButton.recipe.mjs +3 -2
  397. package/dist/ui/Popover/Popover.d.ts +55 -55
  398. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  399. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  400. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  401. package/dist/ui/Select/Select.d.ts +45 -45
  402. package/dist/ui/Select/select.recipe.d.ts +3 -3
  403. package/dist/ui/Select/select.recipe.js +1 -1
  404. package/dist/ui/Select/select.recipe.mjs +2 -1
  405. package/dist/utils/queryKeys.d.ts +7 -3
  406. package/dist/utils/queryKeys.js +1 -1
  407. package/dist/utils/queryKeys.mjs +53 -43
  408. package/dist/utils.js +1 -1
  409. package/dist/utils.mjs +43 -39
  410. package/package.json +16 -11
  411. package/dist/client/hooks/useSiteQuery.d.ts +0 -3
  412. package/dist/client/hooks/useSiteQuery.js +0 -1
  413. package/dist/client/hooks/useSiteQuery.mjs +0 -23
  414. package/dist/components/Empty/CloudIcon.d.ts +0 -2
  415. package/dist/components/Empty/CloudIcon.js +0 -1
  416. package/dist/components/Empty/Empty.js +0 -1
  417. package/dist/components/Empty/Empty.mjs +0 -20
  418. package/dist/components/Empty/index.d.ts +0 -1
  419. package/dist/components/PortalProvider/Providers.d.ts +0 -2
  420. package/dist/images/ball.png.js +0 -1
  421. package/dist/images/ball.png.mjs +0 -4
  422. package/dist/images/card.png.js +0 -1
  423. package/dist/images/card.png.mjs +0 -4
  424. package/dist/server/utils/prefetchSiteQuery.d.ts +0 -1
  425. package/dist/server/utils/prefetchSiteQuery.js +0 -1
  426. package/dist/server/utils/prefetchSiteQuery.mjs +0 -23
  427. /package/dist/components/{Empty/Empty.d.ts → Empty.d.ts} +0 -0
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),w=require("embla-carousel-react"),j=require("next/image"),v=require("next/link"),i=require("react"),S=require("tailwind-merge");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const y=require("../../client/hooks/useGamesQuery.js");require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const b=require("../../icons/ArrowLeftIcon.js"),P=require("../../icons/ArrowRightIcon.js"),k=require("../../icons/ChevronRightIcon.js"),I=require("../../icons/SpinnerIcon.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const o=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");require("@ark-ui/react");require("../../ui/IconButton/iconButton.recipe.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");require("zustand/shallow");const C=require("../GameLaunch/GameLaunchTrigger.js");function B(n){var l;const a=n.numOfRows??1,t=y.useGamesQuery({first:(a+1)*6,filter:n.filter}),u=((l=t.data)==null?void 0:l.pages.map(s=>s.edges.map(N=>N.node)).flat())??[],[d,e]=w({align:"start",slidesToScroll:3,breakpoints:{"(min-width: 1024px)":{slidesToScroll:6}}}),[q,g]=i.useState(!0),[x,m]=i.useState(!0),h=i.useCallback(()=>e==null?void 0:e.scrollPrev(),[e]),f=i.useCallback(async()=>{!(e!=null&&e.canScrollNext())&&t.hasNextPage&&(await t.fetchNextPage(),e==null||e.reInit(),await new Promise(s=>setTimeout(s,1))),e==null||e.scrollNext()},[e,t]),c=i.useCallback(s=>{g(!(s!=null&&s.canScrollPrev())),m(!(s!=null&&s.canScrollNext()))},[]);return i.useEffect(()=>{e&&(c(e),e.on("reInit",c).on("select",c))},[e,c]),r.jsxs("div",{className:n.className,children:[r.jsxs("div",{className:"flex items-center",children:[r.jsx("h2",{className:"text-lg font-semibold",children:n.heading??"Games"}),r.jsx("div",{className:"grow"}),r.jsxs("div",{className:"flex items-center justify-center gap-xl",children:[r.jsxs(v,{href:n.viewAllUrl??"/games",className:"text-button-tertiary-fg flex gap-sm text-sm font-semibold",children:["See All",r.jsx(k.ChevronRightIcon,{className:"size-5 lg:hidden"})]}),r.jsxs("div",{className:"hidden lg:flex",children:[r.jsx(o.Button,{variant:"outline",colorScheme:"gray",className:"rounded-r-none border-r-0",onClick:h,disabled:q,"aria-label":"Previous",children:r.jsx(b.ArrowLeftIcon,{className:"size-5"})}),r.jsx(o.Button,{variant:"outline",colorScheme:"gray",className:"rounded-l-none",onClick:f,disabled:x&&!t.hasNextPage?!0:t.isFetchingNextPage,"aria-label":"Next",children:t.isFetchingNextPage?r.jsx(I.SpinnerIcon,{className:"size-5"}):r.jsx(P.ArrowRightIcon,{className:"size-5"})})]})]})]}),r.jsx("div",{ref:d,className:"relative mt-lg lg:overflow-hidden",children:r.jsx("div",{className:S.twMerge("grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md",a===3?"grid-rows-3":a===2?"grid-rows-2":"grid-rows-1"),children:u.map(s=>r.jsxs(C.GameLaunchTrigger,{game:s,className:"block w-full shadow-sm",children:[r.jsx(j,{src:s.image,alt:"",width:200,height:200,priority:!0,className:"aspect-square w-full rounded-t-md object-cover"}),r.jsx("span",{className:"bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold",children:s.name})]},s.id))})})]})}exports.Games__client=B;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),w=require("embla-carousel-react"),j=require("next/image"),y=require("next/link"),a=require("react"),g=require("tailwind-merge");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../client/services/getSession.js");const k=require("../../client/hooks/useSessionQuery.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const S=require("../../client/hooks/useFavoriteGamesQuery.js"),b=require("../../client/hooks/useGamesQuery.js");require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");const G=require("../../client/hooks/useMarkGameAsFavoriteMutation.js");require("usehooks-ts");const P=require("../../client/hooks/useUnmarkGameAsFavoriteMutation.js"),I=require("../../icons/ArrowLeftIcon.js"),M=require("../../icons/ArrowRightIcon.js"),C=require("../../icons/ChevronRightIcon.js"),F=require("../../icons/SpinnerIcon.js"),Q=require("../../icons/Star01Icon.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const x=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/Combobox/Combobox.js");require("../../ui/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");require("@ark-ui/react");require("../../ui/IconButton/iconButton.recipe.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");require("zustand/shallow");const B=require("../GameLaunch/GameLaunchTrigger.js");function R(s){var q;const u=s.numOfRows??1,i=b.useGamesQuery({first:(u+1)*6,filter:s.filter}),m=((q=i.data)==null?void 0:q.pages.map(t=>t.edges.map(N=>N.node)).flat())??[],[d,e]=w({align:"start",slidesToScroll:3,breakpoints:{"(min-width: 1024px)":{slidesToScroll:6}}}),[o,c]=a.useState(!0),[n,f]=a.useState(!0),h=a.useCallback(()=>e==null?void 0:e.scrollPrev(),[e]),v=a.useCallback(async()=>{!(e!=null&&e.canScrollNext())&&i.hasNextPage&&(await i.fetchNextPage(),e==null||e.reInit(),await new Promise(t=>setTimeout(t,1))),e==null||e.scrollNext()},[e,i]),l=a.useCallback(t=>{c(!(t!=null&&t.canScrollPrev())),f(!(t!=null&&t.canScrollNext()))},[]);return a.useEffect(()=>{e&&(l(e),e.on("reInit",l).on("select",l))},[e,l]),r.jsxs("div",{className:s.className,children:[r.jsxs("div",{className:"flex items-center",children:[r.jsx("h2",{className:"text-lg font-semibold",children:s.heading??"Games"}),r.jsx("div",{className:"grow"}),r.jsxs("div",{className:"flex items-center justify-center gap-xl",children:[r.jsxs(y,{href:s.viewAllUrl??"/games",className:"text-button-tertiary-fg flex gap-sm text-sm font-semibold",children:["See All",r.jsx(C.ChevronRightIcon,{className:"size-5 lg:hidden"})]}),r.jsxs("div",{className:"hidden lg:flex",children:[r.jsx(x.Button,{variant:"outline",colorScheme:"gray",className:"rounded-r-none border-r-0",onClick:h,disabled:o,"aria-label":"Previous",children:r.jsx(I.ArrowLeftIcon,{className:"size-5"})}),r.jsx(x.Button,{variant:"outline",colorScheme:"gray",className:"rounded-l-none",onClick:v,disabled:n&&!i.hasNextPage?!0:i.isFetchingNextPage,"aria-label":"Next",children:i.isFetchingNextPage?r.jsx(F.SpinnerIcon,{className:"size-5"}):r.jsx(M.ArrowRightIcon,{className:"size-5"})})]})]})]}),r.jsx("div",{ref:d,className:"relative mt-lg lg:overflow-hidden",children:r.jsx("div",{className:g.twMerge("grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md",u===3?"grid-rows-3":u===2?"grid-rows-2":"grid-rows-1"),children:m.map(t=>r.jsx(z,{game:t},t.id))})})]})}function z({game:s}){const i=k.useSessionQuery().data,d=S.useFavoriteGamesQuery().data??[],e=G.useMarkGameAsFavoriteMutation(),o=P.useUnmarkGameAsFavoriteMutation(),c=d.some(n=>n.id===s.id);return r.jsxs(B.GameLaunchTrigger,{game:s,className:"relative block w-full shadow-sm",children:[(i==null?void 0:i.status)==="authenticated"&&r.jsx("div",{role:"button",onClick:n=>{n.preventDefault(),n.stopPropagation(),!e.isPending&&(o.isPending||(c?o.mutate(s.reference):e.mutate(s.reference)))},"aria-disabled":e.isPending||o.isPending,className:"rounded-xs absolute right-2 top-2 flex size-9 items-center justify-center bg-black/65 blur-[0.5px]",children:r.jsx(Q.Star01Icon,{className:g.twMerge("size-5",c?"fill-yellow-400 text-yellow-400":"text-white")})}),r.jsx(j,{src:s.image,alt:"",width:200,height:200,priority:!0,className:"aspect-square w-full rounded-t-md object-cover"}),r.jsx("span",{className:"bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold",children:s.name})]})}exports.Games__client=R;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
3
- import y from "embla-carousel-react";
2
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
3
+ import k from "embla-carousel-react";
4
4
  import P from "next/image";
5
- import S from "next/link";
6
- import { useState as c, useCallback as a, useEffect as k } from "react";
7
- import { twMerge as b } from "tailwind-merge";
5
+ import b from "next/link";
6
+ import { useState as g, useCallback as u, useEffect as S } from "react";
7
+ import { twMerge as x } from "tailwind-merge";
8
8
  import "@opexa/portal-sdk-core";
9
9
  import "@tanstack/react-query";
10
10
  import "tiny-invariant";
@@ -14,23 +14,30 @@ import "../../utils/parseDecimal.mjs";
14
14
  import "../../utils/getLocaleInfo.mjs";
15
15
  import "../../utils/getQueryClient.mjs";
16
16
  import "../../utils/isMobile.mjs";
17
+ import "../../client/services/getSession.mjs";
18
+ import { useSessionQuery as G } from "../../client/hooks/useSessionQuery.mjs";
17
19
  import "lodash-es";
18
20
  import "@opexa/portal-sdk-core/object-id";
19
- import { useGamesQuery as B } from "../../client/hooks/useGamesQuery.mjs";
21
+ import { useFavoriteGamesQuery as I } from "../../client/hooks/useFavoriteGamesQuery.mjs";
22
+ import { useGamesQuery as C } from "../../client/hooks/useGamesQuery.mjs";
20
23
  import "../../client/hooks/useGlobalStore.mjs";
21
24
  import "../../client/hooks/useInfiniteQueryHelper.mjs";
25
+ import { useMarkGameAsFavoriteMutation as F } from "../../client/hooks/useMarkGameAsFavoriteMutation.mjs";
22
26
  import "usehooks-ts";
23
- import { ArrowLeftIcon as C } from "../../icons/ArrowLeftIcon.mjs";
24
- import { ArrowRightIcon as I } from "../../icons/ArrowRightIcon.mjs";
25
- import { ChevronRightIcon as R } from "../../icons/ChevronRightIcon.mjs";
27
+ import { useUnmarkGameAsFavoriteMutation as Q } from "../../client/hooks/useUnmarkGameAsFavoriteMutation.mjs";
28
+ import { ArrowLeftIcon as B } from "../../icons/ArrowLeftIcon.mjs";
29
+ import { ArrowRightIcon as z } from "../../icons/ArrowRightIcon.mjs";
30
+ import { ChevronRightIcon as M } from "../../icons/ChevronRightIcon.mjs";
26
31
  import { SpinnerIcon as j } from "../../icons/SpinnerIcon.mjs";
32
+ import { Star01Icon as D } from "../../icons/Star01Icon.mjs";
27
33
  import "../../ui/AlertDialog/AlertDialog.mjs";
28
34
  import "../../ui/Avatar/Avatar.mjs";
29
35
  import "../../ui/Badge/Badge.mjs";
30
- import { Button as d } from "../../ui/Button/Button.mjs";
36
+ import { Button as h } from "../../ui/Button/Button.mjs";
31
37
  import "../../ui/Checkbox/Checkbox.mjs";
32
38
  import "../../ui/Clipboard/Clipboard.mjs";
33
39
  import "../../ui/Collapsible/Collapsible.mjs";
40
+ import "../../ui/Combobox/Combobox.mjs";
34
41
  import "../../ui/DatePicker/DatePicker.mjs";
35
42
  import "../../ui/Dialog/Dialog.mjs";
36
43
  import "../../ui/Drawer/Drawer.mjs";
@@ -47,13 +54,13 @@ import "../../ui/Select/Select.mjs";
47
54
  import "../../ui/Table/Table.mjs";
48
55
  import "../../ui/Tabs/Tabs.mjs";
49
56
  import "zustand/shallow";
50
- import { GameLaunchTrigger as z } from "../GameLaunch/GameLaunchTrigger.mjs";
51
- function Ce(s) {
52
- var n;
53
- const m = s.numOfRows ?? 1, o = B({
57
+ import { GameLaunchTrigger as R } from "../GameLaunch/GameLaunchTrigger.mjs";
58
+ function Oe(o) {
59
+ var p;
60
+ const m = o.numOfRows ?? 1, i = C({
54
61
  first: (m + 1) * 6,
55
- filter: s.filter
56
- }), p = ((n = o.data) == null ? void 0 : n.pages.map((t) => t.edges.map((v) => v.node)).flat()) ?? [], [f, e] = y({
62
+ filter: o.filter
63
+ }), f = ((p = i.data) == null ? void 0 : p.pages.map((r) => r.edges.map((y) => y.node)).flat()) ?? [], [d, e] = k({
57
64
  align: "start",
58
65
  slidesToScroll: 3,
59
66
  breakpoints: {
@@ -61,93 +68,111 @@ function Ce(s) {
61
68
  slidesToScroll: 6
62
69
  }
63
70
  }
64
- }), [g, u] = c(!0), [h, x] = c(!0), N = a(
71
+ }), [n, l] = g(!0), [s, v] = g(!0), N = u(
65
72
  () => e == null ? void 0 : e.scrollPrev(),
66
73
  [e]
67
- ), w = a(async () => {
68
- !(e != null && e.canScrollNext()) && o.hasNextPage && (await o.fetchNextPage(), e == null || e.reInit(), await new Promise((t) => setTimeout(t, 1))), e == null || e.scrollNext();
69
- }, [e, o]), l = a((t) => {
70
- u(!(t != null && t.canScrollPrev())), x(!(t != null && t.canScrollNext()));
74
+ ), w = u(async () => {
75
+ !(e != null && e.canScrollNext()) && i.hasNextPage && (await i.fetchNextPage(), e == null || e.reInit(), await new Promise((r) => setTimeout(r, 1))), e == null || e.scrollNext();
76
+ }, [e, i]), c = u((r) => {
77
+ l(!(r != null && r.canScrollPrev())), v(!(r != null && r.canScrollNext()));
71
78
  }, []);
72
- return k(() => {
73
- e && (l(e), e.on("reInit", l).on("select", l));
74
- }, [e, l]), /* @__PURE__ */ i("div", { className: s.className, children: [
75
- /* @__PURE__ */ i("div", { className: "flex items-center", children: [
76
- /* @__PURE__ */ r("h2", { className: "text-lg font-semibold", children: s.heading ?? "Games" }),
77
- /* @__PURE__ */ r("div", { className: "grow" }),
78
- /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-xl", children: [
79
- /* @__PURE__ */ i(
80
- S,
79
+ return S(() => {
80
+ e && (c(e), e.on("reInit", c).on("select", c));
81
+ }, [e, c]), /* @__PURE__ */ a("div", { className: o.className, children: [
82
+ /* @__PURE__ */ a("div", { className: "flex items-center", children: [
83
+ /* @__PURE__ */ t("h2", { className: "text-lg font-semibold", children: o.heading ?? "Games" }),
84
+ /* @__PURE__ */ t("div", { className: "grow" }),
85
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-center gap-xl", children: [
86
+ /* @__PURE__ */ a(
87
+ b,
81
88
  {
82
- href: s.viewAllUrl ?? "/games",
89
+ href: o.viewAllUrl ?? "/games",
83
90
  className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold",
84
91
  children: [
85
92
  "See All",
86
- /* @__PURE__ */ r(R, { className: "size-5 lg:hidden" })
93
+ /* @__PURE__ */ t(M, { className: "size-5 lg:hidden" })
87
94
  ]
88
95
  }
89
96
  ),
90
- /* @__PURE__ */ i("div", { className: "hidden lg:flex", children: [
91
- /* @__PURE__ */ r(
92
- d,
97
+ /* @__PURE__ */ a("div", { className: "hidden lg:flex", children: [
98
+ /* @__PURE__ */ t(
99
+ h,
93
100
  {
94
101
  variant: "outline",
95
102
  colorScheme: "gray",
96
103
  className: "rounded-r-none border-r-0",
97
104
  onClick: N,
98
- disabled: g,
105
+ disabled: n,
99
106
  "aria-label": "Previous",
100
- children: /* @__PURE__ */ r(C, { className: "size-5" })
107
+ children: /* @__PURE__ */ t(B, { className: "size-5" })
101
108
  }
102
109
  ),
103
- /* @__PURE__ */ r(
104
- d,
110
+ /* @__PURE__ */ t(
111
+ h,
105
112
  {
106
113
  variant: "outline",
107
114
  colorScheme: "gray",
108
115
  className: "rounded-l-none",
109
116
  onClick: w,
110
- disabled: h && !o.hasNextPage ? !0 : o.isFetchingNextPage,
117
+ disabled: s && !i.hasNextPage ? !0 : i.isFetchingNextPage,
111
118
  "aria-label": "Next",
112
- children: o.isFetchingNextPage ? /* @__PURE__ */ r(j, { className: "size-5" }) : /* @__PURE__ */ r(I, { className: "size-5" })
119
+ children: i.isFetchingNextPage ? /* @__PURE__ */ t(j, { className: "size-5" }) : /* @__PURE__ */ t(z, { className: "size-5" })
113
120
  }
114
121
  )
115
122
  ] })
116
123
  ] })
117
124
  ] }),
118
- /* @__PURE__ */ r("div", { ref: f, className: "relative mt-lg lg:overflow-hidden", children: /* @__PURE__ */ r(
125
+ /* @__PURE__ */ t("div", { ref: d, className: "relative mt-lg lg:overflow-hidden", children: /* @__PURE__ */ t(
119
126
  "div",
120
127
  {
121
- className: b(
128
+ className: x(
122
129
  "grid auto-cols-[calc((100%-(0.375rem*2))/3)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/6)] lg:gap-md",
123
130
  m === 3 ? "grid-rows-3" : m === 2 ? "grid-rows-2" : "grid-rows-1"
124
131
  ),
125
- children: p.map((t) => /* @__PURE__ */ i(
126
- z,
127
- {
128
- game: t,
129
- className: "block w-full shadow-sm",
130
- children: [
131
- /* @__PURE__ */ r(
132
- P,
133
- {
134
- src: t.image,
135
- alt: "",
136
- width: 200,
137
- height: 200,
138
- priority: !0,
139
- className: "aspect-square w-full rounded-t-md object-cover"
140
- }
141
- ),
142
- /* @__PURE__ */ r("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: t.name })
143
- ]
144
- },
145
- t.id
146
- ))
132
+ children: f.map((r) => /* @__PURE__ */ t(T, { game: r }, r.id))
147
133
  }
148
134
  ) })
149
135
  ] });
150
136
  }
137
+ function T({ game: o }) {
138
+ const i = G().data, d = I().data ?? [], e = F(), n = Q(), l = d.some(
139
+ (s) => s.id === o.id
140
+ );
141
+ return /* @__PURE__ */ a(R, { game: o, className: "relative block w-full shadow-sm", children: [
142
+ (i == null ? void 0 : i.status) === "authenticated" && /* @__PURE__ */ t(
143
+ "div",
144
+ {
145
+ role: "button",
146
+ onClick: (s) => {
147
+ s.preventDefault(), s.stopPropagation(), !e.isPending && (n.isPending || (l ? n.mutate(o.reference) : e.mutate(o.reference)));
148
+ },
149
+ "aria-disabled": e.isPending || n.isPending,
150
+ className: "rounded-xs absolute right-2 top-2 flex size-9 items-center justify-center bg-black/65 blur-[0.5px]",
151
+ children: /* @__PURE__ */ t(
152
+ D,
153
+ {
154
+ className: x(
155
+ "size-5",
156
+ l ? "fill-yellow-400 text-yellow-400" : "text-white"
157
+ )
158
+ }
159
+ )
160
+ }
161
+ ),
162
+ /* @__PURE__ */ t(
163
+ P,
164
+ {
165
+ src: o.image,
166
+ alt: "",
167
+ width: 200,
168
+ height: 200,
169
+ priority: !0,
170
+ className: "aspect-square w-full rounded-t-md object-cover"
171
+ }
172
+ ),
173
+ /* @__PURE__ */ t("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: o.name })
174
+ ] });
175
+ }
151
176
  export {
152
- Ce as Games__client
177
+ Oe as Games__client
153
178
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime");require("@opexa/portal-sdk-core");require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("next/headers");const t=require("../../server/utils/prefetchGamesQuery.js"),u=require("./Games.client.js");async function s(e){const r=e.numOfRows??1;return await t.prefetchGamesQuery({first:(r+1)*6,filter:e.filter}),i.jsx(u.Games__client,{...e})}exports.Games=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime");require("@opexa/portal-sdk-core");require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../server/services/getSession.js");require("date-fns");require("next/headers");const u=require("../../server/utils/prefetchGamesQuery.js"),t=require("./Games.client.js");async function s(e){const r=e.numOfRows??1;return await u.prefetchGamesQuery({first:(r+1)*6,filter:e.filter}),i.jsx(t.Games__client,{...e})}exports.Games=s;
@@ -6,10 +6,12 @@ import "../../utils/parseDecimal.mjs";
6
6
  import "../../utils/getLocaleInfo.mjs";
7
7
  import "../../utils/getQueryClient.mjs";
8
8
  import "../../utils/isMobile.mjs";
9
+ import "../../server/services/getSession.mjs";
10
+ import "date-fns";
9
11
  import "next/headers";
10
12
  import { prefetchGamesQuery as i } from "../../server/utils/prefetchGamesQuery.mjs";
11
13
  import { Games__client as o } from "./Games.client.mjs";
12
- async function x(t) {
14
+ async function O(t) {
13
15
  const r = t.numOfRows ?? 1;
14
16
  return await i({
15
17
  first: (r + 1) * 6,
@@ -17,5 +19,5 @@ async function x(t) {
17
19
  }), /* @__PURE__ */ m(o, { ...t });
18
20
  }
19
21
  export {
20
- x as Games
22
+ O as Games
21
23
  };
@@ -0,0 +1,6 @@
1
+ import { ImageProps } from 'next/image';
2
+ interface GamesSearchProps {
3
+ logo: ImageProps['src'];
4
+ }
5
+ export declare function GamesSearch(props: GamesSearchProps): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("@ark-ui/react"),c=require("next/image"),x=require("react"),b=require("zustand/shallow");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../client/services/getSession.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const f=require("../../client/hooks/useGamesQuery.js"),y=require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const p=require("../../icons/SearchLgIcon.js"),g=require("../../icons/XIcon.js"),N=require("../../images/hacksaw-gaming.png.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const S=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/Combobox/Combobox.js");require("../../ui/DatePicker/DatePicker.js");const t=require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");const v=require("../../ui/Field/Field.js"),w=require("../../ui/IconButton/IconButton.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");const h=require("../../ui/Presence.js");require("../../ui/Progress/Progress.js");require("tailwind-merge");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");const C=require("../GameLaunch/GameLaunchTrigger.js");function G(a){var m;const l=y.useGlobalStore(b.useShallow(r=>({gamesSearch:r.gamesSearch}))),u=x.useRef(null),[s,d]=x.useState(""),i=f.useGamesQuery({first:18,search:s},{enabled:s.length>=3}),n=((m=i.data)==null?void 0:m.pages.map(r=>r.edges.map(q=>q.node)).flat())??[];return e.jsx(t.Root,{open:l.gamesSearch.open,onOpenChange:r=>l.gamesSearch.setOpen(r.open),lazyMount:!0,unmountOnExit:!0,children:e.jsxs(j.Portal,{children:[e.jsx(t.Backdrop,{}),e.jsx(t.Positioner,{children:e.jsxs(t.Content,{className:"bg-bg-primary lg:min-h-auto mx-auto min-h-full w-full pt-xl lg:mt-[132px] lg:max-w-[1136px] lg:bg-unset lg:pt-0",children:[e.jsx(t.Context,{children:r=>e.jsxs("div",{className:"flex items-center justify-between px-4 lg:hidden",children:[e.jsx(c,{src:a.logo,alt:"",width:200,height:40,className:"h-8 w-auto"}),e.jsx(w.IconButton,{size:"sm",colorScheme:"gray",onClick:()=>r.setOpen(!1),children:e.jsx(g.XIcon,{className:"text-text-quinary size-6"})})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(t.Context,{children:r=>e.jsx("button",{type:"button",onClick:()=>r.setOpen(!1),className:"hidden size-9 items-center justify-center rounded-md bg-white/20 lg:flex",children:e.jsx(g.XIcon,{className:"size-5 text-white"})})})}),e.jsx("div",{className:"mt-2xl px-4 lg:mt-xl lg:px-0",children:e.jsxs("div",{className:"relative",children:[e.jsx(p.SearchLgIcon,{className:"text-text-quinary pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2"}),e.jsx(v.Input,{ref:u,type:"search",value:s,onChange:r=>{d(r.target.value)},className:"pl-10 pr-16",placeholder:"Search",autoComplete:"off"}),e.jsx(h.Presence,{present:s.length>0,asChild:!0,lazyMount:!0,children:e.jsx("button",{type:"button",className:"text-text-secondary-700 absolute right-3.5 top-1/2 -translate-y-1/2 font-semibold",onClick:()=>{var r;d(""),(r=u.current)==null||r.focus()},children:"Clear"})})]})}),e.jsx("div",{className:"lg:bg-bg-primary lg:border-border-primary mt-2xl p-xl pb-3xl lg:mt-2 lg:rounded-xl lg:border",children:s.length<=0?e.jsx(o,{message:"Search for your favorite game or provider."}):s.length>=1&&s.length<=2?e.jsx(o,{message:"Search requires at least 3 characters."}):e.jsxs(e.Fragment,{children:[n.length<=0&&e.jsx(o,{message:"No results found"}),n.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Providers"}),e.jsx("div",{className:"mb-3xl mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5",children:e.jsx("div",{className:"bg-gray-800 flex h-14 w-full items-center rounded-md",children:e.jsx(c,{src:N,alt:"",width:100,height:50,className:"mx-auto h-auto w-full"})})}),e.jsx("h2",{className:"text-lg font-semibold",children:"Games"}),e.jsx("div",{className:"mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5",children:n.map(r=>e.jsxs(C.GameLaunchTrigger,{game:r,className:"block w-full shadow-sm",onClick:()=>{l.gamesSearch.setOpen(!1)},children:[e.jsx(c,{src:r.image,alt:"",width:200,height:200,priority:!0,className:"aspect-square w-full rounded-t-md object-cover"}),e.jsx("span",{className:"bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold",children:r.name})]},r.id))}),e.jsx(h.Presence,{present:i.hasNextPage,children:e.jsx(S.Button,{variant:"outline",className:"mx-auto mt-12 w-fit",onClick:()=>i.fetchNextPage(),children:"Load More"})})]})]})})]})})]})})}function o({message:a}){return e.jsxs("div",{className:"py-lg",role:"alert","aria-live":"polite",children:[e.jsx("div",{className:"bg-bg-secondary shadow-xs border-border-primary mx-auto flex size-12 items-center justify-center rounded-lg border",children:e.jsx(p.SearchLgIcon,{className:"text-text-secondary-700 size-6"})}),e.jsx("p",{className:"text-text-secondary-700 mt-4 text-center",children:a})]})}exports.GamesSearch=G;
@@ -0,0 +1,199 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as r, Fragment as h } from "react/jsx-runtime";
3
+ import { Portal as y } from "@ark-ui/react";
4
+ import m from "next/image";
5
+ import { useRef as N, useState as v } from "react";
6
+ import { useShallow as w } from "zustand/shallow";
7
+ import "@opexa/portal-sdk-core";
8
+ import "@tanstack/react-query";
9
+ import "tiny-invariant";
10
+ import "../../constants/index.mjs";
11
+ import "../../utils/capitalize.mjs";
12
+ import "../../utils/parseDecimal.mjs";
13
+ import "../../utils/getLocaleInfo.mjs";
14
+ import "../../utils/getQueryClient.mjs";
15
+ import "../../utils/isMobile.mjs";
16
+ import "../../client/services/getSession.mjs";
17
+ import "lodash-es";
18
+ import "@opexa/portal-sdk-core/object-id";
19
+ import { useGamesQuery as S } from "../../client/hooks/useGamesQuery.mjs";
20
+ import { useGlobalStore as C } from "../../client/hooks/useGlobalStore.mjs";
21
+ import "../../client/hooks/useInfiniteQueryHelper.mjs";
22
+ import "usehooks-ts";
23
+ import { SearchLgIcon as x } from "../../icons/SearchLgIcon.mjs";
24
+ import { XIcon as g } from "../../icons/XIcon.mjs";
25
+ import k from "../../images/hacksaw-gaming.png.mjs";
26
+ import "../../ui/AlertDialog/AlertDialog.mjs";
27
+ import "../../ui/Avatar/Avatar.mjs";
28
+ import "../../ui/Badge/Badge.mjs";
29
+ import { Button as z } from "../../ui/Button/Button.mjs";
30
+ import "../../ui/Checkbox/Checkbox.mjs";
31
+ import "../../ui/Clipboard/Clipboard.mjs";
32
+ import "../../ui/Collapsible/Collapsible.mjs";
33
+ import "../../ui/Combobox/Combobox.mjs";
34
+ import "../../ui/DatePicker/DatePicker.mjs";
35
+ import { Root as j, Backdrop as O, Positioner as P, Content as G, Context as u } from "../../ui/Dialog/Dialog.mjs";
36
+ import "../../ui/Drawer/Drawer.mjs";
37
+ import { Input as I } from "../../ui/Field/Field.mjs";
38
+ import { IconButton as q } from "../../ui/IconButton/IconButton.mjs";
39
+ import "../../ui/NumberInput/NumberInput.mjs";
40
+ import "../../ui/PasswordInput/PasswordInput.mjs";
41
+ import "../../ui/PinInput/PinInput.mjs";
42
+ import "../../ui/Popover/Popover.mjs";
43
+ import { Presence as f } from "../../ui/Presence.mjs";
44
+ import "../../ui/Progress/Progress.mjs";
45
+ import "tailwind-merge";
46
+ import "../../ui/SegmentGroup/SegmentGroup.mjs";
47
+ import "../../ui/Select/Select.mjs";
48
+ import "../../ui/Table/Table.mjs";
49
+ import "../../ui/Tabs/Tabs.mjs";
50
+ import { GameLaunchTrigger as B } from "../GameLaunch/GameLaunchTrigger.mjs";
51
+ function Pe(a) {
52
+ var d;
53
+ const l = C(
54
+ w((t) => ({
55
+ gamesSearch: t.gamesSearch
56
+ }))
57
+ ), c = N(null), [o, p] = v(""), i = S(
58
+ {
59
+ first: 18,
60
+ search: o
61
+ },
62
+ {
63
+ enabled: o.length >= 3
64
+ }
65
+ ), s = ((d = i.data) == null ? void 0 : d.pages.map((t) => t.edges.map((b) => b.node)).flat()) ?? [];
66
+ return /* @__PURE__ */ e(
67
+ j,
68
+ {
69
+ open: l.gamesSearch.open,
70
+ onOpenChange: (t) => l.gamesSearch.setOpen(t.open),
71
+ lazyMount: !0,
72
+ unmountOnExit: !0,
73
+ children: /* @__PURE__ */ r(y, { children: [
74
+ /* @__PURE__ */ e(O, {}),
75
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ r(G, { className: "bg-bg-primary lg:min-h-auto mx-auto min-h-full w-full pt-xl lg:mt-[132px] lg:max-w-[1136px] lg:bg-unset lg:pt-0", children: [
76
+ /* @__PURE__ */ e(u, { children: (t) => /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 lg:hidden", children: [
77
+ /* @__PURE__ */ e(
78
+ m,
79
+ {
80
+ src: a.logo,
81
+ alt: "",
82
+ width: 200,
83
+ height: 40,
84
+ className: "h-8 w-auto"
85
+ }
86
+ ),
87
+ /* @__PURE__ */ e(
88
+ q,
89
+ {
90
+ size: "sm",
91
+ colorScheme: "gray",
92
+ onClick: () => t.setOpen(!1),
93
+ children: /* @__PURE__ */ e(g, { className: "text-text-quinary size-6" })
94
+ }
95
+ )
96
+ ] }) }),
97
+ /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ e(u, { children: (t) => /* @__PURE__ */ e(
98
+ "button",
99
+ {
100
+ type: "button",
101
+ onClick: () => t.setOpen(!1),
102
+ className: "hidden size-9 items-center justify-center rounded-md bg-white/20 lg:flex",
103
+ children: /* @__PURE__ */ e(g, { className: "size-5 text-white" })
104
+ }
105
+ ) }) }),
106
+ /* @__PURE__ */ e("div", { className: "mt-2xl px-4 lg:mt-xl lg:px-0", children: /* @__PURE__ */ r("div", { className: "relative", children: [
107
+ /* @__PURE__ */ e(x, { className: "text-text-quinary pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2" }),
108
+ /* @__PURE__ */ e(
109
+ I,
110
+ {
111
+ ref: c,
112
+ type: "search",
113
+ value: o,
114
+ onChange: (t) => {
115
+ p(t.target.value);
116
+ },
117
+ className: "pl-10 pr-16",
118
+ placeholder: "Search",
119
+ autoComplete: "off"
120
+ }
121
+ ),
122
+ /* @__PURE__ */ e(f, { present: o.length > 0, asChild: !0, lazyMount: !0, children: /* @__PURE__ */ e(
123
+ "button",
124
+ {
125
+ type: "button",
126
+ className: "text-text-secondary-700 absolute right-3.5 top-1/2 -translate-y-1/2 font-semibold",
127
+ onClick: () => {
128
+ var t;
129
+ p(""), (t = c.current) == null || t.focus();
130
+ },
131
+ children: "Clear"
132
+ }
133
+ ) })
134
+ ] }) }),
135
+ /* @__PURE__ */ e("div", { className: "lg:bg-bg-primary lg:border-border-primary mt-2xl p-xl pb-3xl lg:mt-2 lg:rounded-xl lg:border", children: o.length <= 0 ? /* @__PURE__ */ e(n, { message: "Search for your favorite game or provider." }) : o.length >= 1 && o.length <= 2 ? /* @__PURE__ */ e(n, { message: "Search requires at least 3 characters." }) : /* @__PURE__ */ r(h, { children: [
136
+ s.length <= 0 && /* @__PURE__ */ e(n, { message: "No results found" }),
137
+ s.length > 0 && /* @__PURE__ */ r(h, { children: [
138
+ /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: "Providers" }),
139
+ /* @__PURE__ */ e("div", { className: "mb-3xl mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: /* @__PURE__ */ e("div", { className: "bg-gray-800 flex h-14 w-full items-center rounded-md", children: /* @__PURE__ */ e(
140
+ m,
141
+ {
142
+ src: k,
143
+ alt: "",
144
+ width: 100,
145
+ height: 50,
146
+ className: "mx-auto h-auto w-full"
147
+ }
148
+ ) }) }),
149
+ /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: "Games" }),
150
+ /* @__PURE__ */ e("div", { className: "mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: s.map((t) => /* @__PURE__ */ r(
151
+ B,
152
+ {
153
+ game: t,
154
+ className: "block w-full shadow-sm",
155
+ onClick: () => {
156
+ l.gamesSearch.setOpen(!1);
157
+ },
158
+ children: [
159
+ /* @__PURE__ */ e(
160
+ m,
161
+ {
162
+ src: t.image,
163
+ alt: "",
164
+ width: 200,
165
+ height: 200,
166
+ priority: !0,
167
+ className: "aspect-square w-full rounded-t-md object-cover"
168
+ }
169
+ ),
170
+ /* @__PURE__ */ e("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: t.name })
171
+ ]
172
+ },
173
+ t.id
174
+ )) }),
175
+ /* @__PURE__ */ e(f, { present: i.hasNextPage, children: /* @__PURE__ */ e(
176
+ z,
177
+ {
178
+ variant: "outline",
179
+ className: "mx-auto mt-12 w-fit",
180
+ onClick: () => i.fetchNextPage(),
181
+ children: "Load More"
182
+ }
183
+ ) })
184
+ ] })
185
+ ] }) })
186
+ ] }) })
187
+ ] })
188
+ }
189
+ );
190
+ }
191
+ function n({ message: a }) {
192
+ return /* @__PURE__ */ r("div", { className: "py-lg", role: "alert", "aria-live": "polite", children: [
193
+ /* @__PURE__ */ e("div", { className: "bg-bg-secondary shadow-xs border-border-primary mx-auto flex size-12 items-center justify-center rounded-lg border", children: /* @__PURE__ */ e(x, { className: "text-text-secondary-700 size-6" }) }),
194
+ /* @__PURE__ */ e("p", { className: "text-text-secondary-700 mt-4 text-center", children: a })
195
+ ] });
196
+ }
197
+ export {
198
+ Pe as GamesSearch
199
+ };
@@ -0,0 +1,4 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ export interface GamesSearchTriggerProps extends ComponentPropsWithRef<'button'> {
3
+ }
4
+ export declare function GamesSearchTrigger({ children, ...props }: GamesSearchTriggerProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("@ark-ui/react"),a=require("zustand/shallow");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");require("../../utils/capitalize.js");require("../../utils/parseDecimal.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../client/services/getSession.js");require("react");require("lodash-es");require("@opexa/portal-sdk-core/object-id");const c=require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");require("usehooks-ts");const o=require("../../icons/SearchLgIcon.js");function n({children:t,...i}){const r=c.useGlobalStore(a.useShallow(s=>({gamesSearch:s.gamesSearch})));return e.jsx(u.ark.button,{type:"button",onClick:()=>{r.gamesSearch.setOpen(!0)},"data-state":r.gamesSearch.open?"open":"closed",...i,asChild:!0,children:t??e.jsxs("button",{className:"bg-bg-primary text-text-secondary-700 flex size-10 items-center gap-lg rounded-sm px-lg",children:[e.jsx(o.SearchLgIcon,{className:"text-text-quinary size-6"}),"Search"]})})}exports.GamesSearchTrigger=n;
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
3
+ import { ark as a } from "@ark-ui/react";
4
+ import { useShallow as p } from "zustand/shallow";
5
+ import "@opexa/portal-sdk-core";
6
+ import "@tanstack/react-query";
7
+ import "tiny-invariant";
8
+ import "../../constants/index.mjs";
9
+ import "../../utils/capitalize.mjs";
10
+ import "../../utils/parseDecimal.mjs";
11
+ import "../../utils/getLocaleInfo.mjs";
12
+ import "../../utils/getQueryClient.mjs";
13
+ import "../../utils/isMobile.mjs";
14
+ import "../../client/services/getSession.mjs";
15
+ import "react";
16
+ import "lodash-es";
17
+ import "@opexa/portal-sdk-core/object-id";
18
+ import { useGlobalStore as s } from "../../client/hooks/useGlobalStore.mjs";
19
+ import "../../client/hooks/useInfiniteQueryHelper.mjs";
20
+ import "usehooks-ts";
21
+ import { SearchLgIcon as c } from "../../icons/SearchLgIcon.mjs";
22
+ function L({
23
+ children: e,
24
+ ...o
25
+ }) {
26
+ const r = s(
27
+ p((m) => ({
28
+ gamesSearch: m.gamesSearch
29
+ }))
30
+ );
31
+ return /* @__PURE__ */ t(
32
+ a.button,
33
+ {
34
+ type: "button",
35
+ onClick: () => {
36
+ r.gamesSearch.setOpen(!0);
37
+ },
38
+ "data-state": r.gamesSearch.open ? "open" : "closed",
39
+ ...o,
40
+ asChild: !0,
41
+ children: e ?? /* @__PURE__ */ i("button", { className: "bg-bg-primary text-text-secondary-700 flex size-10 items-center gap-lg rounded-sm px-lg", children: [
42
+ /* @__PURE__ */ t(c, { className: "text-text-quinary size-6" }),
43
+ "Search"
44
+ ] })
45
+ }
46
+ );
47
+ }
48
+ export {
49
+ L as GamesSearchTrigger
50
+ };
@@ -0,0 +1,2 @@
1
+ export * from './GamesSearch';
2
+ export * from './GamesSearchTrigger';
@@ -0,0 +1,10 @@
1
+ import { 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.Element;
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),s=require("usehooks-ts");function d(e){const{value:a,setValue:l}=s.useBoolean(!1),o=e.loader??null,n=e.hasMore??!1,i=s.useDebounceCallback(async()=>{a||n&&(l(!0),await e.loadMore(),l(!1))},300),[c]=s.useIntersectionObserver({onChange(u){u&&i()}});return t.jsxs(r.Fragment,{children:[e.children,t.jsx("div",{ref:c,role:"presentation",style:e.style,className:e.className,hidden:!n,children:!!n&&t.jsx(r.Fragment,{children:o})})]})}exports.InfiniteScroll=d;
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
3
+ import { Fragment as a } from "react";
4
+ import { useBoolean as u, useDebounceCallback as f, useIntersectionObserver as m } from "usehooks-ts";
5
+ function b(e) {
6
+ const { value: o, setValue: l } = u(!1), t = e.loader ?? null, n = e.hasMore ?? !1, s = f(async () => {
7
+ o || n && (l(!0), await e.loadMore(), l(!1));
8
+ }, 300), [i] = m({
9
+ onChange(c) {
10
+ c && s();
11
+ }
12
+ });
13
+ return /* @__PURE__ */ d(a, { children: [
14
+ e.children,
15
+ /* @__PURE__ */ r(
16
+ "div",
17
+ {
18
+ ref: i,
19
+ role: "presentation",
20
+ style: e.style,
21
+ className: e.className,
22
+ hidden: !n,
23
+ children: !!n && /* @__PURE__ */ r(a, { children: t })
24
+ }
25
+ )
26
+ ] });
27
+ }
28
+ export {
29
+ b as InfiniteScroll
30
+ };