@opexa/portal-components 0.0.142 → 0.0.143

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 (215) hide show
  1. package/dist/components/Bonus/Bonus.client.js +1 -1
  2. package/dist/components/Bonuses/Bonuses.client.js +7 -4
  3. package/dist/components/Cashback/Cashback.client.js +1 -1
  4. package/dist/components/CustomPromo/CustomPromo.js +1 -1
  5. package/dist/components/GCashFailed/GCashFailed.d.ts +8 -0
  6. package/dist/components/GCashFailed/GCashFailed.js +17 -0
  7. package/dist/components/GCashFailed/index.d.ts +1 -0
  8. package/dist/components/GCashFailed/index.js +1 -0
  9. package/dist/components/GCashSuccess/GCashSuccess.d.ts +9 -0
  10. package/dist/components/GCashSuccess/GCashSuccess.js +88 -0
  11. package/dist/components/GCashSuccess/index.d.ts +1 -0
  12. package/dist/components/GCashSuccess/index.js +1 -0
  13. package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
  14. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  15. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  16. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  17. package/dist/components/Messages/Message.js +5 -6
  18. package/dist/components/News/News.js +1 -1
  19. package/dist/components/Promo/Promo.client.js +1 -1
  20. package/dist/components/Search/Search.lazy.js +1 -1
  21. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  22. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  23. package/dist/constants/EnvVar.d.ts +1 -1
  24. package/dist/icons/XCircleIcon.d.ts +1 -0
  25. package/dist/icons/XCircleIcon.js +4 -0
  26. package/dist/services/queries.js +2358 -2358
  27. package/dist/styles/theme.css +693 -693
  28. package/dist/ui/AlertDialog/AlertDialog.d.ts +121 -121
  29. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
  30. package/dist/ui/Avatar/Avatar.d.ts +9 -9
  31. package/dist/ui/Avatar/avatar.recipe.d.ts +3 -3
  32. package/dist/ui/Button/button.recipe.d.ts +2 -2
  33. package/dist/ui/Button/button.recipe.js +1 -1
  34. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  35. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  36. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  37. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  38. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  39. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  40. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  41. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  42. package/dist/ui/Dialog/Dialog.d.ts +121 -121
  43. package/dist/ui/Dialog/dialog.recipe.d.ts +11 -11
  44. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  45. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  46. package/dist/ui/IconButton/iconButton.recipe.d.ts +2 -2
  47. package/dist/ui/Menu/Menu.d.ts +360 -360
  48. package/dist/ui/Menu/menu.recipe.d.ts +20 -20
  49. package/dist/ui/Popover/Popover.d.ts +88 -88
  50. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  51. package/dist/ui/Progress/Progress.d.ts +27 -27
  52. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  53. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  54. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  55. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  56. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  57. package/dist/ui/Select/Select.d.ts +45 -45
  58. package/dist/ui/Select/select.recipe.d.ts +3 -3
  59. package/dist/ui/Table/Table.d.ts +21 -21
  60. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  61. package/dist/ui/Table/table.recipe.d.ts +3 -3
  62. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  63. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  64. package/dist/ui/Tooltip/Tooltip.d.ts +48 -48
  65. package/dist/ui/Tooltip/tooltip.recipe.d.ts +8 -8
  66. package/dist/ui/Tooltip/tooltip.recipe.js +1 -1
  67. package/package.json +164 -164
  68. package/dist/client/hooks/index.d.ts +0 -65
  69. package/dist/client/hooks/index.js +0 -65
  70. package/dist/client/services/index.d.ts +0 -4
  71. package/dist/client/services/index.js +0 -4
  72. package/dist/client/utils/index.d.ts +0 -3
  73. package/dist/client/utils/index.js +0 -3
  74. package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +0 -2
  75. package/dist/components/CashbackBonus/CashbackBonus.client.js +0 -9
  76. package/dist/components/CashbackBonus/CashbackBonus.d.ts +0 -10
  77. package/dist/components/CashbackBonus/CashbackBonus.js +0 -5
  78. package/dist/components/CashbackBonus/index.d.ts +0 -1
  79. package/dist/components/CashbackBonus/index.js +0 -1
  80. package/dist/components/Empty.d.ts +0 -9
  81. package/dist/components/Empty.js +0 -7
  82. package/dist/components/Games/GameContext.d.ts +0 -2
  83. package/dist/components/Games/GameContext.js +0 -2
  84. package/dist/components/InfiniteScroll.d.ts +0 -10
  85. package/dist/components/InfiniteScroll.js +0 -25
  86. package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
  87. package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -66
  88. package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -17
  89. package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
  90. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -18
  91. package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -109
  92. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +0 -184
  93. package/dist/components/JackpotCounter/index.d.ts +0 -1
  94. package/dist/components/JackpotCounter/index.js +0 -1
  95. package/dist/components/Jackpots/JackpotDesktop.d.ts +0 -1
  96. package/dist/components/Jackpots/JackpotDesktop.js +0 -45
  97. package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
  98. package/dist/components/Jackpots/JackpotGameProviders.js +0 -41
  99. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +0 -9
  100. package/dist/components/Jackpots/JackpotItemDesktop.js +0 -43
  101. package/dist/components/Jackpots/JackpotItemMobile.d.ts +0 -9
  102. package/dist/components/Jackpots/JackpotItemMobile.js +0 -44
  103. package/dist/components/Jackpots/JackpotMobile.d.ts +0 -1
  104. package/dist/components/Jackpots/JackpotMobile.js +0 -46
  105. package/dist/components/Jackpots/JackpotRules.d.ts +0 -5
  106. package/dist/components/Jackpots/JackpotRules.js +0 -11
  107. package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
  108. package/dist/components/Jackpots/Jackpots.client.js +0 -29
  109. package/dist/components/Jackpots/JackpotsContext.d.ts +0 -4
  110. package/dist/components/Jackpots/JackpotsContext.js +0 -3
  111. package/dist/components/Jackpots/useJackpotData.d.ts +0 -14
  112. package/dist/components/Jackpots/useJackpotData.js +0 -93
  113. package/dist/components/Jackpots/useJackpotItemData.d.ts +0 -20
  114. package/dist/components/Jackpots/useJackpotItemData.js +0 -87
  115. package/dist/components/KYC/Header.d.ts +0 -1
  116. package/dist/components/KYC/Header.js +0 -8
  117. package/dist/components/KYC/Step1.d.ts +0 -1
  118. package/dist/components/KYC/Step1.js +0 -13
  119. package/dist/components/KYC/Step2.d.ts +0 -1
  120. package/dist/components/KYC/Step2.js +0 -13
  121. package/dist/components/KYC/Step3.d.ts +0 -1
  122. package/dist/components/KYC/Step3.js +0 -13
  123. package/dist/components/KYC/Step4.d.ts +0 -1
  124. package/dist/components/KYC/Step4.js +0 -7
  125. package/dist/components/Messages/MessageItem.d.ts +0 -4
  126. package/dist/components/Messages/MessageItem.js +0 -34
  127. package/dist/components/PortalProvider/WebVitals.d.ts +0 -1
  128. package/dist/components/PortalProvider/WebVitals.js +0 -8
  129. package/dist/components/Promo/PromoContent.d.ts +0 -2
  130. package/dist/components/Promo/PromoContent.js +0 -9
  131. package/dist/components/Promos/PromoCarousel.d.ts +0 -2
  132. package/dist/components/Promos/PromoCarousel.js +0 -41
  133. package/dist/components/Promos/PromoGrid.d.ts +0 -2
  134. package/dist/components/Promos/PromoGrid.js +0 -12
  135. package/dist/components/Promos/PromoItem.d.ts +0 -7
  136. package/dist/components/Promos/PromoItem.js +0 -10
  137. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  138. package/dist/components/Quests/CountdownTimer.js +0 -33
  139. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  140. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  141. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  142. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  143. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  144. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  145. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  146. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  147. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  148. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  149. package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +0 -2
  150. package/dist/components/TournamentCounter/TournamentCounter.client.js +0 -50
  151. package/dist/components/TournamentCounter/TournamentCounter.d.ts +0 -8
  152. package/dist/components/TournamentCounter/TournamentCounter.js +0 -21
  153. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +0 -8
  154. package/dist/components/TournamentCounter/TournamentCounterItem.js +0 -106
  155. package/dist/components/TournamentCounter/index.d.ts +0 -1
  156. package/dist/components/TournamentCounter/index.js +0 -1
  157. package/dist/components/Tournaments/TournamentDesktop.d.ts +0 -1
  158. package/dist/components/Tournaments/TournamentDesktop.js +0 -57
  159. package/dist/components/Tournaments/TournamentGameProviders.d.ts +0 -5
  160. package/dist/components/Tournaments/TournamentGameProviders.js +0 -38
  161. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +0 -7
  162. package/dist/components/Tournaments/TournamentItemDesktop.js +0 -56
  163. package/dist/components/Tournaments/TournamentItemMobile.d.ts +0 -7
  164. package/dist/components/Tournaments/TournamentItemMobile.js +0 -54
  165. package/dist/components/Tournaments/TournamentMobile.d.ts +0 -1
  166. package/dist/components/Tournaments/TournamentMobile.js +0 -55
  167. package/dist/components/Tournaments/TournamentRules.d.ts +0 -5
  168. package/dist/components/Tournaments/TournamentRules.js +0 -11
  169. package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
  170. package/dist/components/Tournaments/Tournaments.client.js +0 -20
  171. package/dist/components/Tournaments/TournamentsContext.d.ts +0 -4
  172. package/dist/components/Tournaments/TournamentsContext.js +0 -3
  173. package/dist/components/Tournaments/useTournamentData.d.ts +0 -10
  174. package/dist/components/Tournaments/useTournamentData.js +0 -72
  175. package/dist/components/Tournaments/useTournamentItemData.d.ts +0 -16
  176. package/dist/components/Tournaments/useTournamentItemData.js +0 -64
  177. package/dist/components/index.d.ts +0 -33
  178. package/dist/components/index.js +0 -33
  179. package/dist/constants/endpoints.d.ts +0 -10
  180. package/dist/constants/endpoints.js +0 -41
  181. package/dist/constants/envVars.d.ts +0 -5
  182. package/dist/constants/envVars.js +0 -28
  183. package/dist/constants/gameProviders.d.ts +0 -4
  184. package/dist/constants/gameProviders.js +0 -368
  185. package/dist/constants/gameTypes.d.ts +0 -3
  186. package/dist/constants/gameTypes.js +0 -64
  187. package/dist/constants/headerKeys.d.ts +0 -2
  188. package/dist/constants/headerKeys.js +0 -2
  189. package/dist/constants/secretQuestions.d.ts +0 -3
  190. package/dist/constants/secretQuestions.js +0 -24
  191. package/dist/constants/storageKeys.d.ts +0 -2
  192. package/dist/constants/storageKeys.js +0 -2
  193. package/dist/icons/index.d.ts +0 -65
  194. package/dist/icons/index.js +0 -65
  195. package/dist/images/hacksaw-gaming.png +0 -0
  196. package/dist/server/services/index.d.ts +0 -4
  197. package/dist/server/services/index.js +0 -4
  198. package/dist/server/utils/index.d.ts +0 -29
  199. package/dist/server/utils/index.js +0 -29
  200. package/dist/ui/Presence.d.ts +0 -2
  201. package/dist/ui/Presence.js +0 -7
  202. package/dist/ui/Prose.d.ts +0 -2
  203. package/dist/ui/Prose.js +0 -5
  204. package/dist/ui/index.d.ts +0 -26
  205. package/dist/ui/index.js +0 -26
  206. package/dist/utils/createErrorFromCode.d.ts +0 -2
  207. package/dist/utils/createErrorFromCode.js +0 -11
  208. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  209. package/dist/utils/dataUrlToBlob.js +0 -11
  210. package/dist/utils/index.d.ts +0 -17
  211. package/dist/utils/index.js +0 -17
  212. package/dist/utils/isMobile.d.ts +0 -5
  213. package/dist/utils/isMobile.js +0 -9
  214. package/dist/utils/resizeImageSize.d.ts +0 -1
  215. package/dist/utils/resizeImageSize.js +0 -6
@@ -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.js';
16
+ import { Prose } from '../../ui/Prose/index.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';
@@ -20,6 +20,7 @@ import piggyBank from '../../images/piggy-bank.png';
20
20
  import ribbonEnvelope from '../../images/ribbon-envelope.png';
21
21
  import { Badge } from '../../ui/Badge/index.js';
22
22
  import { Button } from '../../ui/Button/index.js';
23
+ import { Popover } from '../../ui/Popover/index.js';
23
24
  import { Progress } from '../../ui/Progress/index.js';
24
25
  import { SegmentGroup } from '../../ui/SegmentGroup/index.js';
25
26
  import { capitalize } from '../../utils/capitalize.js';
@@ -91,11 +92,13 @@ function CashbackBonus(props) {
91
92
  currency: localeInfo.currency.code,
92
93
  }) }), _jsx("div", { className: "text-text-secondary-700 mt-2 line-clamp-1 text-center text-sm", dangerouslySetInnerHTML: {
93
94
  __html: cashback.description,
94
- } }), _jsx("div", { className: "grow" }), _jsx(Button, { size: "sm", className: "mt-6", disabled: claimCashbackBonusMutation.isPending || disabled, onClick: () => {
95
+ } }), _jsx("div", { className: "grow" }), disabled ? (_jsxs(Popover.Root, { lazyMount: true, unmountOnExit: true, positioning: {
96
+ placement: 'top',
97
+ }, children: [_jsx(Button, { size: "sm", className: "mt-6", "aria-disabled": true, asChild: true, children: _jsx(Popover.Trigger, { children: "Claim" }) }), _jsx(Popover.Positioner, { children: _jsxs(Popover.Content, { className: "bg-bg-quaternary rounded-md px-2.5 py-2 text-sm font-medium", children: [_jsx(Popover.Arrow, { className: "arrow-bg-bg-quaternary arrow-size-3", children: _jsx(Popover.ArrowTip, {}) }), "You need", ' ', formatNumber(minimumCashback - balance, {
98
+ currency: localeInfo.currency.code,
99
+ }), ' ', "to claim this cashback."] }) })] })) : (_jsx(Button, { size: "sm", className: "mt-6", disabled: claimCashbackBonusMutation.isPending || disabled, onClick: () => {
95
100
  claimCashbackBonusMutation.mutate(bonus.id);
96
- }, title: disabled
97
- ? `You need ${formatNumber(minimumCashback - balance)} to claim this cashback.`
98
- : undefined, children: "Claim" })] })] }));
101
+ }, children: "Claim" }))] })] }));
99
102
  }
100
103
  function SpotBonus() {
101
104
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -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.js';
14
+ import { Prose } from '../../ui/Prose/index.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 } from "react/jsx-runtime";
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.js';
6
+ import { Prose } from '../../ui/Prose/index.js';
7
7
  export function CustomPromo(props) {
8
8
  return (_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, 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: {
9
9
  __html: props.promo.description,
@@ -0,0 +1,8 @@
1
+ import type { ImageProps } from 'next/image';
2
+ import type { CSSProperties } from 'react';
3
+ export interface GCashFailedProps {
4
+ logo: ImageProps['src'];
5
+ style?: CSSProperties;
6
+ className?: string;
7
+ }
8
+ export declare function GCashFailed(props: GCashFailedProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Image from 'next/image';
4
+ import { useRouter } from 'next/navigation';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { useCooldown } from '../../client/hooks/useCooldown.js';
7
+ import { XCircleIcon } from '../../icons/XCircleIcon.js';
8
+ export function GCashFailed(props) {
9
+ const router = useRouter();
10
+ const cooldown = useCooldown({
11
+ autoplay: true,
12
+ onCooldown() {
13
+ router.replace('/');
14
+ },
15
+ });
16
+ return (_jsx("div", { style: props.style, className: twMerge('flex min-h-dvh items-center p-4 py-8', props.className), children: _jsxs("div", { className: "bg-bg-primary-alt mx-auto w-full max-w-[26.25rem] rounded-xl p-10", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto block h-7.5 w-auto" }), _jsxs("div", { className: "mt-16", children: [_jsx(XCircleIcon, { className: "text-utility-error-500 mx-auto size-[3.75rem]" }), _jsx("h2", { className: "mt-6 text-center text-3xl font-bold", children: "Deposit Error" }), _jsx("p", { className: "text-text-tertiary-600 mt-3 text-center", children: "Sorry, we encountered an error while processing your deposit request. Please try again later." }), _jsxs("div", { className: "text-text-tertiary-600 mt-[4.875rem] text-center text-sm", children: [_jsx("p", { children: "You will be redirected shortly," }), _jsxs("p", { children: ["in about", ' ', _jsx("span", { className: "text-brand-400 text-lg font-bold", children: cooldown.countdown }), ' ', "second/s."] })] })] })] }) }));
17
+ }
@@ -0,0 +1 @@
1
+ export * from './GCashFailed';
@@ -0,0 +1 @@
1
+ export * from './GCashFailed.js';
@@ -0,0 +1,9 @@
1
+ import type { ImageProps } from 'next/image';
2
+ import { type CSSProperties } from 'react';
3
+ interface GCashSuccessProps {
4
+ logo: ImageProps['src'];
5
+ style?: CSSProperties;
6
+ className?: string;
7
+ }
8
+ export declare function GCashSuccess(props: GCashSuccessProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,88 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import Image from 'next/image';
4
+ import Link from 'next/link';
5
+ import { useRouter } from 'next/navigation';
6
+ import { useCallback, useEffect, useState } from 'react';
7
+ import { twMerge } from 'tailwind-merge';
8
+ import { useCooldown } from '../../client/hooks/useCooldown.js';
9
+ import { getSession } from '../../client/services/getSession.js';
10
+ import { CheckCircleIcon } from '../../icons/CheckCircleIcon.js';
11
+ import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
12
+ import { getDepositRecords } from '../../services/report.js';
13
+ import { getDeposit, touchGCashDeposit } from '../../services/wallet.js';
14
+ import { Button } from '../../ui/Button/index.js';
15
+ import { createPoll } from '../../utils/createPoll.js';
16
+ export function GCashSuccess(props) {
17
+ const router = useRouter();
18
+ const [loading, setLoading] = useState(true);
19
+ const cooldown = useCooldown({
20
+ autoplay: true,
21
+ onCooldown() {
22
+ router.replace('/');
23
+ },
24
+ });
25
+ const init = useCallback(async () => {
26
+ try {
27
+ const session = await getSession();
28
+ if (session.status !== 'authenticated') {
29
+ router.replace('/');
30
+ return;
31
+ }
32
+ const depositRecords = await getDepositRecords({
33
+ first: 1,
34
+ filter: {
35
+ status: {
36
+ equal: 'ACCEPTED',
37
+ },
38
+ },
39
+ }, {
40
+ headers: {
41
+ Authorization: `Bearer ${session.token}`,
42
+ },
43
+ });
44
+ const depositRecord = depositRecords.edges.at(0)?.node;
45
+ if (!depositRecord) {
46
+ router.replace('/');
47
+ return;
48
+ }
49
+ await touchGCashDeposit(depositRecord.deposit, {
50
+ headers: {
51
+ Authorization: `Bearer ${session.token}`,
52
+ },
53
+ });
54
+ setLoading(false);
55
+ cooldown.start();
56
+ const deposit = await createPoll(() => getDeposit(depositRecord.deposit, {
57
+ headers: {
58
+ Authorization: `Bearer ${session.token}`,
59
+ },
60
+ }), {
61
+ until: (r) => {
62
+ if (r?.status === 'APPROVED' ||
63
+ r?.status === 'REJECTED' ||
64
+ r?.status === 'CONFIRMED') {
65
+ return true;
66
+ }
67
+ else {
68
+ return false;
69
+ }
70
+ },
71
+ interval: 1000,
72
+ maxAttempt: 10,
73
+ })();
74
+ if (deposit?.status === 'APPROVED' ||
75
+ deposit?.status === 'REJECTED' ||
76
+ deposit?.status === 'CONFIRMED') {
77
+ router.replace('/');
78
+ }
79
+ }
80
+ catch {
81
+ router.replace('/');
82
+ }
83
+ }, [cooldown, router]);
84
+ useEffect(() => {
85
+ init();
86
+ }, [init]);
87
+ return (_jsx("div", { style: props.style, className: twMerge('flex min-h-dvh items-center p-4 py-8', props.className), children: _jsxs("div", { className: "bg-bg-primary-alt mx-auto w-full max-w-[26.25rem] rounded-xl p-10", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto block h-7.5 w-auto" }), _jsx("div", { className: "mt-16", children: loading ? (_jsx(SpinnerIcon, { className: "mx-auto size-8" })) : (_jsxs(_Fragment, { children: [_jsx(CheckCircleIcon, { className: "text-utility-success-500 mx-auto size-[3.75rem]" }), _jsx("h2", { className: "mt-6 text-center text-3xl font-bold", children: "Success" }), _jsx("p", { className: "text-text-tertiary-600 mt-3 text-center", children: "Your deposit request has succeeded." }), _jsxs("div", { className: "text-text-tertiary-600 mt-10 text-center text-sm", children: [_jsx("p", { children: "You will be redirected shortly," }), _jsxs("p", { children: ["in about", ' ', _jsx("span", { className: "text-brand-400 text-lg font-bold", children: cooldown.countdown }), ' ', "second/s."] })] }), _jsx(Button, { variant: "outline", asChild: true, children: _jsx(Link, { href: "/", replace: true, className: "mt-14", children: "Proceed" }) })] })) })] }) }));
88
+ }
@@ -0,0 +1 @@
1
+ export * from './GCashSuccess';
@@ -0,0 +1 @@
1
+ export * from './GCashSuccess.js';
@@ -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.js';
25
+ import { Presence } from '../../ui/Presence/index.js';
26
26
  export function GameLaunch() {
27
27
  const globalStore = useGlobalStore(useShallow((ctx) => ({
28
28
  gameLaunch: ctx.gameLaunch,
@@ -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.js';
11
+ import { Presence } from '../../ui/Presence/index.js';
12
12
  import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
13
13
  import { GameLaunchTrigger } from '../GameLaunch/index.js';
14
14
  export function GamesSearch(props) {
@@ -1,184 +1,184 @@
1
- @keyframes arrow-green-flash {
2
- 0% {
3
- color: #abefc6;
4
- }
5
- 100% {
6
- color: #079455;
7
- }
8
- }
9
-
10
- .animate-arrow-green-flash-1 {
11
- animation: arrow-green-flash 0.4s infinite;
12
- animation-delay: -0.2s;
13
- }
14
-
15
- .animate-arrow-green-flash-2 {
16
- animation: arrow-green-flash 0.4s infinite;
17
- animation-delay: -0.1s;
18
- }
19
-
20
- .animate-arrow-green-flash-3 {
21
- animation: arrow-green-flash 0.4s infinite;
22
- }
23
-
24
- @keyframes arrow-red-flash {
25
- 0%,
26
- 100% {
27
- color: #f97066;
28
- }
29
- 50% {
30
- color: #fecdca;
31
- }
32
- }
33
-
34
- .animate-arrow-red-flash-1 {
35
- animation: arrow-red-flash 0.4s infinite;
36
- }
37
-
38
- .animate-arrow-red-flash-2 {
39
- animation: arrow-red-flash 0.4s infinite;
40
- animation-delay: -0.1s;
41
- }
42
-
43
- .animate-arrow-red-flash-3 {
44
- animation: arrow-red-flash 0.4s infinite;
45
- animation-delay: -0.2s;
46
- }
47
-
48
- /* Animated BG */
49
- @keyframes rotate {
50
- to {
51
- transform: rotate(1turn);
52
- }
53
- }
54
-
55
- .light-rays {
56
- position: absolute;
57
- top: 0;
58
- left: 0;
59
- right: 0;
60
- bottom: 0;
61
- overflow: hidden;
62
-
63
- --first: var(--color-bg-tertiary);
64
- --second: var(--color-bg-quaternary);
65
- }
66
-
67
- .light-rays::before,
68
- .light-rays::after {
69
- content: '';
70
- position: absolute;
71
- top: var(--light-rays-top, 150px);
72
- left: calc(50% - 90px);
73
- margin: -100vmax;
74
- width: 200vmax;
75
- height: 200vmax;
76
- opacity: 0.6;
77
- transform-origin: center;
78
- }
79
-
80
- .light-rays::before {
81
- background: conic-gradient(
82
- var(--first) 0deg 7.2deg,
83
- var(--second) 7.2deg 14.4deg,
84
- var(--first) 14.4deg 21.6deg,
85
- var(--second) 21.6deg 28.8deg,
86
- var(--first) 28.8deg 36deg,
87
- var(--second) 36deg 43.2deg,
88
- var(--first) 43.2deg 50.4deg,
89
- var(--second) 50.4deg 57.6deg,
90
- var(--first) 57.6deg 64.8deg,
91
- var(--second) 64.8deg 72deg,
92
- var(--first) 72deg 79.2deg,
93
- var(--second) 79.2deg 86.4deg,
94
- var(--first) 86.4deg 93.6deg,
95
- var(--second) 93.6deg 100.8deg,
96
- var(--first) 100.8deg 108deg,
97
- var(--second) 108deg 115.2deg,
98
- var(--first) 115.2deg 122.4deg,
99
- var(--second) 122.4deg 129.6deg,
100
- var(--first) 129.6deg 136.8deg,
101
- var(--second) 136.8deg 144deg,
102
- var(--first) 144deg 151.2deg,
103
- var(--second) 151.2deg 158.4deg,
104
- var(--first) 158.4deg 165.6deg,
105
- var(--second) 165.6deg 172.8deg,
106
- var(--first) 172.8deg 180deg,
107
- var(--second) 180deg 187.2deg,
108
- var(--first) 187.2deg 194.4deg,
109
- var(--second) 194.4deg 201.6deg,
110
- var(--first) 201.6deg 208.8deg,
111
- var(--second) 208.8deg 216deg,
112
- var(--first) 216deg 223.2deg,
113
- var(--second) 223.2deg 230.4deg,
114
- var(--first) 230.4deg 237.6deg,
115
- var(--second) 237.6deg 244.8deg,
116
- var(--first) 244.8deg 252deg,
117
- var(--second) 252deg 259.2deg,
118
- var(--first) 259.2deg 266.4deg,
119
- var(--second) 266.4deg 273.6deg,
120
- var(--first) 273.6deg 280.8deg,
121
- var(--second) 280.8deg 288deg,
122
- var(--first) 288deg 295.2deg,
123
- var(--second) 295.2deg 302.4deg,
124
- var(--first) 302.4deg 309.6deg,
125
- var(--second) 309.6deg 316.8deg,
126
- var(--first) 316.8deg 324deg,
127
- var(--second) 324deg 331.2deg,
128
- var(--first) 331.2deg 338.4deg,
129
- var(--second) 338.4deg 345.6deg,
130
- var(--first) 345.6deg 352.8deg,
131
- var(--second) 352.8deg 360deg
132
- );
133
- animation: rotate 20s linear infinite;
134
- }
135
-
136
- @media (max-width: 1024px) {
137
- .light-rays::before,
138
- .light-rays::after {
139
- left: auto;
140
- right: 11%;
141
- }
142
- }
143
-
144
- /* ScrollArea.module.css */
145
- .scrollArea {
146
- overflow-y: scroll;
147
- padding-right: 4px;
148
- }
149
-
150
- /* WebKit-based browsers */
151
- .scrollArea::-webkit-scrollbar {
152
- width: 8px;
153
- }
154
-
155
- .scrollArea::-webkit-scrollbar-track {
156
- background: var(--color-bg-primary-alt);
157
- border-radius: 9999px;
158
- }
159
-
160
- .scrollArea::-webkit-scrollbar-thumb {
161
- background-color: var(--color-bg-quaternary);
162
- border-radius: 9999px;
163
- }
164
-
165
- @keyframes waveColor {
166
- 0%,
167
- 2.5% {
168
- color: var(--wave-highlight-color);
169
- }
170
- 2.51%,
171
- 100% {
172
- color: var(--color-brand-300);
173
- }
174
- }
175
-
176
- .animate-wave-color-success {
177
- --wave-highlight-color: var(--color-success-800);
178
- animation: waveColor 4s ease-in-out infinite;
179
- }
180
-
181
- .animate-wave-color-error {
182
- --wave-highlight-color: var(--color-error-600);
183
- animation: waveColor 4s ease-in-out infinite;
184
- }
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }