@opexa/portal-components 0.0.364 → 0.0.367

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 (264) hide show
  1. package/dist/client/hooks/useCellxpertCxd.d.ts +7 -0
  2. package/dist/client/hooks/useCellxpertCxd.js +4 -0
  3. package/dist/client/hooks/useCreateGCashStandardCashInWithdrawal.d.ts +4 -0
  4. package/dist/client/hooks/useCreateGCashStandardCashInWithdrawal.js +28 -0
  5. package/dist/client/hooks/useIdle.d.ts +1 -0
  6. package/dist/client/hooks/useIdle.js +35 -0
  7. package/dist/client/hooks/useIdleLogout.d.ts +4 -0
  8. package/dist/client/hooks/useIdleLogout.js +97 -0
  9. package/dist/client/hooks/useMarkAllMessagesAsReadMutation.d.ts +2 -0
  10. package/dist/client/hooks/useMarkAllMessagesAsReadMutation.js +48 -0
  11. package/dist/client/hooks/useMayaAuth.d.ts +5 -0
  12. package/dist/client/hooks/useMayaAuth.js +22 -0
  13. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +8 -9
  14. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +8 -9
  15. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +8 -8
  16. package/dist/components/ForgotPassword/ForgotPasswordForm.js +1 -1
  17. package/dist/components/IdleLogout/IdleLogout.d.ts +7 -0
  18. package/dist/components/IdleLogout/IdleLogout.js +6 -0
  19. package/dist/components/IdleLogout/index.d.ts +1 -0
  20. package/dist/components/IdleLogout/index.js +1 -0
  21. package/dist/components/Jackpots/Jackpots.module.css +184 -0
  22. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  23. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  24. package/dist/components/KYC/KYCReminder.lazy.js +1 -3
  25. package/dist/components/KYC/KycOpenOnHomeMount.d.ts +1 -0
  26. package/dist/components/KYC/KycOpenOnHomeMount.js +16 -0
  27. package/dist/components/Maya/Maya.d.ts +26 -0
  28. package/dist/components/Maya/Maya.js +90 -0
  29. package/dist/components/Maya/index.d.ts +1 -0
  30. package/dist/components/Maya/index.js +1 -0
  31. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +1 -0
  32. package/dist/components/PortalProvider/CXDTokenObserver.js +30 -0
  33. package/dist/components/PortalProvider/SocialAccountLinkObserver.d.ts +1 -0
  34. package/dist/components/PortalProvider/SocialAccountLinkObserver.js +39 -0
  35. package/dist/components/Quests/MultiWageringQuest.d.ts +1 -0
  36. package/dist/components/Quests/MultiWageringQuest.js +111 -0
  37. package/dist/components/Quests/NoQuests.d.ts +6 -0
  38. package/dist/components/Quests/NoQuests.js +6 -0
  39. package/dist/components/SignIn/MobileNumberSignIn.js +1 -1
  40. package/dist/components/SignUp/SignUpDefault/SignUpDefaultForm.js +1 -1
  41. package/dist/components/SignUp/SignUpKYC/SignUpKYCForm.js +1 -1
  42. package/dist/components/TopProgress/TopProgressBar.d.ts +6 -0
  43. package/dist/components/TopProgress/TopProgressBar.js +145 -0
  44. package/dist/components/TopProgress/index.d.ts +1 -0
  45. package/dist/components/TopProgress/index.js +1 -0
  46. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  47. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  48. package/dist/components/TransactionRecords/TransactionContext.d.ts +6 -0
  49. package/dist/components/TransactionRecords/TransactionContext.js +2 -0
  50. package/dist/handlers/index.d.ts +7 -7
  51. package/dist/icons/MinusIcon.d.ts +2 -0
  52. package/dist/icons/MinusIcon.js +4 -0
  53. package/dist/icons/NotifExitIcon.d.ts +2 -0
  54. package/dist/icons/NotifExitIcon.js +4 -0
  55. package/dist/images/game-providers/SAGAMING.png +0 -0
  56. package/dist/images/pagcor-round-icon.png +0 -0
  57. package/dist/services/queries.js +2662 -2662
  58. package/dist/styles/theme.css +706 -706
  59. package/dist/ui/Badge/Badge.d.ts +12 -12
  60. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  61. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  62. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  63. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  64. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  65. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  66. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  67. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  68. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  69. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  70. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  71. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  72. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  73. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  74. package/dist/ui/Menu/Menu.d.ts +144 -144
  75. package/dist/ui/Menu/menu.recipe.d.ts +8 -8
  76. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  77. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  78. package/dist/ui/Popover/Popover.d.ts +55 -55
  79. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  80. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  81. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  82. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  83. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  84. package/dist/ui/Select/Select.d.ts +45 -45
  85. package/dist/ui/Select/select.recipe.d.ts +3 -3
  86. package/dist/ui/Table/Table.d.ts +21 -21
  87. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  88. package/dist/ui/Table/table.recipe.d.ts +3 -3
  89. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  90. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  91. package/package.json +161 -161
  92. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  93. package/dist/components/DigitainLauncher/Loading.js +0 -5
  94. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  95. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  96. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  97. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  98. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  99. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  100. package/dist/components/FeatureFlag/index.d.ts +0 -1
  101. package/dist/components/FeatureFlag/index.js +0 -1
  102. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  103. package/dist/components/KYC/AutoOpen.js +0 -40
  104. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  105. package/dist/components/KYC/BasicInformation.js +0 -101
  106. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  107. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  108. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  109. package/dist/components/KYC/CaptureSelfie.js +0 -285
  110. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  111. package/dist/components/KYC/DisplayImage.js +0 -8
  112. package/dist/components/KYC/FileUpload.d.ts +0 -10
  113. package/dist/components/KYC/FileUpload.js +0 -72
  114. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  115. package/dist/components/KYC/IdentityVerification.js +0 -120
  116. package/dist/components/KYC/Indicator.d.ts +0 -1
  117. package/dist/components/KYC/Indicator.js +0 -8
  118. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  119. package/dist/components/KYC/KYC.lazy.js +0 -45
  120. package/dist/components/KYC/KYCContext.d.ts +0 -6
  121. package/dist/components/KYC/KYCContext.js +0 -2
  122. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  123. package/dist/components/KYC/NoCameraError.js +0 -6
  124. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  125. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  126. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  127. package/dist/components/KYC/PersonalInformation.js +0 -122
  128. package/dist/components/KYC/backup/Header.d.ts +0 -1
  129. package/dist/components/KYC/backup/Header.js +0 -8
  130. package/dist/components/KYC/backup/Indicator.d.ts +0 -1
  131. package/dist/components/KYC/backup/Indicator.js +0 -9
  132. package/dist/components/KYC/backup/KYC.d.ts +0 -1
  133. package/dist/components/KYC/backup/KYC.js +0 -14
  134. package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
  135. package/dist/components/KYC/backup/KYC.lazy.js +0 -26
  136. package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
  137. package/dist/components/KYC/backup/KYCContext.js +0 -2
  138. package/dist/components/KYC/backup/Step1.d.ts +0 -1
  139. package/dist/components/KYC/backup/Step1.js +0 -13
  140. package/dist/components/KYC/backup/Step2.d.ts +0 -1
  141. package/dist/components/KYC/backup/Step2.js +0 -13
  142. package/dist/components/KYC/backup/Step3.d.ts +0 -1
  143. package/dist/components/KYC/backup/Step3.js +0 -13
  144. package/dist/components/KYC/backup/Step4.d.ts +0 -1
  145. package/dist/components/KYC/backup/Step4.js +0 -7
  146. package/dist/components/KYC/backup/useKYC.d.ts +0 -10
  147. package/dist/components/KYC/backup/useKYC.js +0 -8
  148. package/dist/components/KYC/loadModels.d.ts +0 -1
  149. package/dist/components/KYC/loadModels.js +0 -9
  150. package/dist/components/KYC/useKYC.d.ts +0 -25
  151. package/dist/components/KYC/useKYC.js +0 -38
  152. package/dist/components/KYC/utils.d.ts +0 -9
  153. package/dist/components/KYC/utils.js +0 -79
  154. package/dist/components/Messages/Message.d.ts +0 -1
  155. package/dist/components/Messages/Message.js +0 -35
  156. package/dist/components/Messages/MessageContext.d.ts +0 -6
  157. package/dist/components/Messages/MessageContext.js +0 -2
  158. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  159. package/dist/components/Messages/MessagePopup.js +0 -20
  160. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  161. package/dist/components/Messages/MessageTrigger.js +0 -19
  162. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  163. package/dist/components/Quests/CountdownTimer.js +0 -33
  164. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  165. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  166. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  167. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  168. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  169. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  170. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  171. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  172. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  173. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  174. package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
  175. package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
  176. package/dist/components/SessionWatcher/index.d.ts +0 -1
  177. package/dist/components/SessionWatcher/index.js +0 -1
  178. package/dist/components/SignIn/utils.d.ts +0 -8
  179. package/dist/components/SignIn/utils.js +0 -26
  180. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  181. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  182. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  183. package/dist/components/SignUp/SignUpContext.js +0 -2
  184. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  185. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  186. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  187. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  188. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  189. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  190. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  191. package/dist/components/SignUp/SignUpForm.js +0 -284
  192. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  193. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  194. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  195. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  196. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  197. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  198. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  199. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  200. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  201. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  202. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  203. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  204. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  205. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  206. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  207. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  208. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  209. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  210. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  211. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  212. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  213. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  214. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  215. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  216. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  217. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  218. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  219. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  220. package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
  221. package/dist/components/shared/IdDocumentField.client.js +0 -204
  222. package/dist/components/shared/IdDocumentField.d.ts +0 -2
  223. package/dist/components/shared/IdDocumentField.js +0 -11
  224. package/dist/components/shared/SelfieField.client.d.ts +0 -20
  225. package/dist/components/shared/SelfieField.client.js +0 -327
  226. package/dist/components/shared/SelfieField.d.ts +0 -2
  227. package/dist/components/shared/SelfieField.js +0 -11
  228. package/dist/constants/BranchCode.d.ts +0 -4
  229. package/dist/constants/BranchCode.js +0 -42
  230. package/dist/constants/Branches.d.ts +0 -2
  231. package/dist/constants/Branches.js +0 -42
  232. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  233. package/dist/handlers/postTransformIdFrontImage.js +0 -67
  234. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  235. package/dist/handlers/postTransformSelfieImage.js +0 -71
  236. package/dist/handlers.d.ts +0 -43
  237. package/dist/handlers.js +0 -297
  238. package/dist/icons/BellRingIcon.d.ts +0 -2
  239. package/dist/icons/BellRingIcon.js +0 -4
  240. package/dist/images/responsible-gaming-yellow.png +0 -0
  241. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  242. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  243. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  244. package/dist/third-parties/FacebookPixel/index.js +0 -1
  245. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  246. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  247. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  248. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  249. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  250. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  251. package/dist/third-parties/index.d.ts +0 -2
  252. package/dist/third-parties/index.js +0 -2
  253. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  254. package/dist/utils/dataUrlToBlob.js +0 -11
  255. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  256. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  257. package/dist/utils/getGameName.d.ts +0 -1
  258. package/dist/utils/getGameName.js +0 -6
  259. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  260. package/dist/utils/isBetween3amAnd3pm.js +0 -5
  261. package/dist/utils/resizeImageSize.d.ts +0 -2
  262. package/dist/utils/resizeImageSize.js +0 -11
  263. /package/dist/{third-parties/FacebookPixel/api.d.ts → components/KYCNotRequired/KYCNotRequired.d.ts} +0 -0
  264. /package/dist/{third-parties/FacebookPixel/api.js → components/KYCNotRequired/KYCNotRequired.js} +0 -0
@@ -0,0 +1,7 @@
1
+ export declare function useCellxpertCxd(): [{
2
+ value: string;
3
+ expires: number;
4
+ } | null, import("react").Dispatch<import("react").SetStateAction<{
5
+ value: string;
6
+ expires: number;
7
+ } | null>>, () => void];
@@ -0,0 +1,4 @@
1
+ import { useLocalStorage } from 'usehooks-ts';
2
+ export function useCellxpertCxd() {
3
+ return useLocalStorage('WebPortalCellxpertCxd', null);
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { SetOptional } from "type-fest";
2
+ import { type CreateGCashStandardCashInWithdrawalInput } from "../../services/wallet";
3
+ import type { Mutation } from "../../types";
4
+ export declare const useCreateGCashStandardCashInWithdrawalMutation: Mutation<string, SetOptional<CreateGCashStandardCashInWithdrawalInput, "id">>;
@@ -0,0 +1,28 @@
1
+ import { ObjectId } from "@opexa/object-id";
2
+ import { useMutation } from "@tanstack/react-query";
3
+ import invariant from "tiny-invariant";
4
+ import { ObjectType } from "../../services/ObjectType.js";
5
+ import { createGCashStandardCashInWithdrawal, } from "../../services/wallet.js";
6
+ import { getCreateGCashStandardCashInWithdrawalMutationKey } from "../../utils/mutationKeys.js";
7
+ import { getSession } from "../services/getSession.js";
8
+ export const useCreateGCashStandardCashInWithdrawalMutation = (config) => {
9
+ const mutation = useMutation({
10
+ ...config,
11
+ mutationKey: getCreateGCashStandardCashInWithdrawalMutationKey(),
12
+ mutationFn: async (input) => {
13
+ const id = input.id ?? ObjectId.generate(ObjectType.Withdrawal).toString();
14
+ const session = await getSession();
15
+ invariant(session.status === "authenticated");
16
+ await createGCashStandardCashInWithdrawal({ ...input, id }, {
17
+ headers: {
18
+ Authorization: `Bearer ${session.token}`,
19
+ ...(session.domain && {
20
+ Domain: session.domain,
21
+ }),
22
+ },
23
+ });
24
+ return id;
25
+ },
26
+ });
27
+ return mutation;
28
+ };
@@ -0,0 +1 @@
1
+ export declare function useIdle(timeout: number): boolean;
@@ -0,0 +1,35 @@
1
+ 'use client';
2
+ import { useCallback, useEffect, useState } from 'react';
3
+ const IDLE_EVENTS = [
4
+ 'scroll',
5
+ 'resize',
6
+ 'keydown',
7
+ 'mousedown',
8
+ 'touchstart',
9
+ 'mousemove',
10
+ ];
11
+ export function useIdle(timeout) {
12
+ const [isIdle, setIsIdle] = useState(false);
13
+ const handleWorkerMessage = useCallback(() => {
14
+ setIsIdle(true);
15
+ }, []);
16
+ useEffect(() => {
17
+ const worker = new Worker('/idle-worker.js');
18
+ worker.onmessage = handleWorkerMessage;
19
+ const handleActivity = () => {
20
+ setIsIdle(false);
21
+ worker.postMessage({ command: 'reset', idleTime: timeout });
22
+ };
23
+ worker.postMessage({ command: 'start', idleTime: timeout });
24
+ for (const event of IDLE_EVENTS) {
25
+ window.addEventListener(event, handleActivity);
26
+ }
27
+ return () => {
28
+ worker.terminate();
29
+ for (const event of IDLE_EVENTS) {
30
+ window.removeEventListener(event, handleActivity);
31
+ }
32
+ };
33
+ }, [timeout, handleWorkerMessage]);
34
+ return isIdle;
35
+ }
@@ -0,0 +1,4 @@
1
+ export declare function useIdleLogout(timer?: number): {
2
+ isIdle: boolean;
3
+ isLoggingOut: boolean;
4
+ };
@@ -0,0 +1,97 @@
1
+ 'use client';
2
+ import { useRouter } from 'next/navigation';
3
+ import { startTransition, useCallback, useEffect, useRef } from 'react';
4
+ import { toaster } from '../utils/toaster.js';
5
+ import { useIdle } from './useIdle.js';
6
+ import { useSessionQuery } from './useSessionQuery.js';
7
+ import { useSignOutMutation } from './useSignOutMutation.js';
8
+ const IDLE_TIMESTAMP_KEY = 'idle-logout-timestamp';
9
+ const DEFAULT_IDLE_TIMER = 1000 * 60 * 15; // 15 minutes
10
+ export function useIdleLogout(timer = DEFAULT_IDLE_TIMER) {
11
+ const router = useRouter();
12
+ const logoutInitiated = useRef(false);
13
+ const isLoggingOut = useRef(false);
14
+ const sessionQuery = useSessionQuery();
15
+ const isIdle = useIdle(timer);
16
+ const signOutMutation = useSignOutMutation({
17
+ onSuccess: () => {
18
+ router.push('/');
19
+ try {
20
+ localStorage.removeItem(IDLE_TIMESTAMP_KEY);
21
+ }
22
+ catch (error) {
23
+ console.error('Error removing idle timestamp:', error);
24
+ }
25
+ logoutInitiated.current = false;
26
+ isLoggingOut.current = false;
27
+ },
28
+ onError: () => {
29
+ isLoggingOut.current = false;
30
+ logoutInitiated.current = false;
31
+ },
32
+ });
33
+ const handleIdleLogout = useCallback(() => {
34
+ if (!isIdle || logoutInitiated.current || isLoggingOut.current) {
35
+ return;
36
+ }
37
+ const isAuthenticated = sessionQuery.data?.status === 'authenticated';
38
+ if (!isAuthenticated) {
39
+ return;
40
+ }
41
+ startTransition(() => {
42
+ try {
43
+ logoutInitiated.current = true;
44
+ isLoggingOut.current = true;
45
+ localStorage.setItem(IDLE_TIMESTAMP_KEY, Date.now().toString());
46
+ signOutMutation.mutate();
47
+ }
48
+ catch (error) {
49
+ console.error('Error during idle logout:', error);
50
+ isLoggingOut.current = false;
51
+ logoutInitiated.current = false;
52
+ }
53
+ });
54
+ }, [isIdle, sessionQuery.data?.status, signOutMutation]);
55
+ useEffect(() => {
56
+ handleIdleLogout();
57
+ }, [handleIdleLogout]);
58
+ useEffect(() => {
59
+ if (sessionQuery.data?.status === 'unauthenticated') {
60
+ logoutInitiated.current = false;
61
+ isLoggingOut.current = false;
62
+ try {
63
+ localStorage.removeItem(IDLE_TIMESTAMP_KEY);
64
+ }
65
+ catch (error) {
66
+ console.error('Error removing idle timestamp:', error);
67
+ }
68
+ }
69
+ }, [sessionQuery.data?.status]);
70
+ useEffect(() => {
71
+ const handleStorageChange = (e) => {
72
+ if (e.key !== IDLE_TIMESTAMP_KEY || !e.newValue) {
73
+ return;
74
+ }
75
+ const isAuthenticated = sessionQuery.data?.status === 'authenticated';
76
+ if (!isAuthenticated || logoutInitiated.current) {
77
+ return;
78
+ }
79
+ try {
80
+ logoutInitiated.current = true;
81
+ router.push('/');
82
+ }
83
+ catch {
84
+ toaster.warning({
85
+ description: 'You have been logged out due to inactivity.',
86
+ });
87
+ window.location.href = '/';
88
+ }
89
+ };
90
+ window.addEventListener('storage', handleStorageChange);
91
+ return () => window.removeEventListener('storage', handleStorageChange);
92
+ }, [router, sessionQuery.data?.status]);
93
+ return {
94
+ isIdle,
95
+ isLoggingOut: isLoggingOut.current,
96
+ };
97
+ }
@@ -0,0 +1,2 @@
1
+ import type { Mutation } from '../../types';
2
+ export declare const useMarkAllMessagesAsReadMutation: Mutation<void, void>;
@@ -0,0 +1,48 @@
1
+ import { useMutation } from '@tanstack/react-query';
2
+ import invariant from 'tiny-invariant';
3
+ import { markAllMessagesAsRead } from '../../services/trigger.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getMessagesQueryKey, getUnreadMessagesCountQueryKey, } from '../../utils/queryKeys.js';
6
+ import { getSession } from '../services/getSession.js';
7
+ export const useMarkAllMessagesAsReadMutation = (config) => {
8
+ const queryClient = getQueryClient();
9
+ const mutation = useMutation({
10
+ ...config,
11
+ mutationFn: async () => {
12
+ const session = await getSession();
13
+ invariant(session.status === 'authenticated');
14
+ await markAllMessagesAsRead({
15
+ headers: {
16
+ Authorization: `Bearer ${session.token}`,
17
+ },
18
+ });
19
+ queryClient.setQueriesData({
20
+ queryKey: getMessagesQueryKey(),
21
+ exact: false,
22
+ type: 'all',
23
+ }, (prev) => {
24
+ if (!prev)
25
+ return prev;
26
+ return {
27
+ ...prev,
28
+ pages: prev.pages.map((page) => ({
29
+ ...page,
30
+ edges: page.edges.map((edge) => ({
31
+ ...edge,
32
+ node: {
33
+ ...edge.node,
34
+ markedAsRead: true,
35
+ },
36
+ })),
37
+ })),
38
+ };
39
+ });
40
+ queryClient.setQueriesData({
41
+ queryKey: getUnreadMessagesCountQueryKey(),
42
+ exact: false,
43
+ type: 'all',
44
+ }, () => 0);
45
+ },
46
+ });
47
+ return mutation;
48
+ };
@@ -0,0 +1,5 @@
1
+ export declare function useMayaAuth(): {
2
+ onMaya: boolean;
3
+ setOnMaya: (value: boolean) => void;
4
+ mayaSessIdKey: string;
5
+ };
@@ -0,0 +1,22 @@
1
+ import { useCallback, useEffect, useState } from 'react';
2
+ const mayaSessIdKey = 'mayaSessionId';
3
+ export function useMayaAuth() {
4
+ const [onMaya, setOnMayaState] = useState(false);
5
+ const setOnMaya = useCallback((value) => {
6
+ setOnMayaState(value);
7
+ }, []);
8
+ useEffect(() => {
9
+ const initialValue = !!localStorage.getItem(mayaSessIdKey);
10
+ setOnMayaState(initialValue);
11
+ const handleStorageChange = () => {
12
+ setOnMayaState(!!localStorage.getItem(mayaSessIdKey));
13
+ };
14
+ window.addEventListener('storage', handleStorageChange);
15
+ return () => window.removeEventListener('storage', handleStorageChange);
16
+ }, []);
17
+ return {
18
+ onMaya,
19
+ setOnMaya,
20
+ mayaSessIdKey,
21
+ };
22
+ }
@@ -15,15 +15,12 @@ import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
15
15
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
16
16
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
17
17
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
18
- import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
19
- import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
20
18
  import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
21
19
  import { XIcon } from '../../../../icons/XIcon.js';
22
20
  import { ObjectType } from '../../../../services/ObjectType.js';
23
21
  import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
24
22
  import { Button } from '../../../../ui/Button/index.js';
25
23
  import { Field } from '../../../../ui/Field/index.js';
26
- import { NumberInput } from '../../../../ui/NumberInput/index.js';
27
24
  import { Portal } from '../../../../ui/Portal/index.js';
28
25
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
29
26
  import { AmountChoices } from '../../AmountChoices.js';
@@ -89,6 +86,13 @@ export function PisoPayDeposit() {
89
86
  .object({
90
87
  amount: z.string().superRefine((val, ctx) => {
91
88
  const n = parseDecimal(val, 0);
89
+ if (val.includes('.')) {
90
+ ctx.addIssue({
91
+ code: z.ZodIssueCode.custom,
92
+ message: 'Amount must be a whole number',
93
+ });
94
+ return;
95
+ }
92
96
  if (n < minimumAmount) {
93
97
  ctx.addIssue({
94
98
  type: 'number',
@@ -160,12 +164,7 @@ export function PisoPayDeposit() {
160
164
  promo: data.promo,
161
165
  }),
162
166
  });
163
- }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
164
- o.field.onChange(details.value);
165
- }, formatOptions: {
166
- maximumFractionDigits: 2,
167
- minimumFractionDigits: 0,
168
- }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
167
+ }), noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
169
168
  form.setValue('amount', value.toString(), {
170
169
  shouldTouch: true,
171
170
  shouldDirty: true,
@@ -9,11 +9,8 @@ import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePr
9
9
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
10
10
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
11
11
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
12
- import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
13
- import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
14
12
  import { Button } from '../../../../ui/Button/index.js';
15
13
  import { Field } from '../../../../ui/Field/index.js';
16
- import { NumberInput } from '../../../../ui/NumberInput/index.js';
17
14
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
18
15
  import { AmountChoices } from '../../AmountChoices.js';
19
16
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
@@ -40,6 +37,13 @@ export function QRPHDepositForm() {
40
37
  .object({
41
38
  amount: z.string().superRefine((val, ctx) => {
42
39
  const n = parseDecimal(val, 0);
40
+ if (val.includes('.')) {
41
+ ctx.addIssue({
42
+ code: z.ZodIssueCode.custom,
43
+ message: 'Amount must be a whole number',
44
+ });
45
+ return;
46
+ }
43
47
  if (n < minimumAmount) {
44
48
  ctx.addIssue({
45
49
  type: 'number',
@@ -99,12 +103,7 @@ export function QRPHDepositForm() {
99
103
  }, [form, minimumAmount]);
100
104
  if (context.view !== 'form')
101
105
  return null;
102
- return (_jsxs("form", { onSubmit: form.handleSubmit(context.generateQRCode), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
103
- o.field.onChange(details.value);
104
- }, formatOptions: {
105
- maximumFractionDigits: 2,
106
- minimumFractionDigits: 0,
107
- }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
106
+ return (_jsxs("form", { onSubmit: form.handleSubmit(context.generateQRCode), noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
108
107
  form.setValue('amount', value.toString(), {
109
108
  shouldTouch: true,
110
109
  shouldDirty: true,
@@ -14,7 +14,6 @@ import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSett
14
14
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
15
15
  import { CheckIcon } from '../../../../icons/CheckIcon.js';
16
16
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
17
- import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
18
17
  import { EyeIcon } from '../../../../icons/EyeIcon.js';
19
18
  import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
20
19
  import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
@@ -22,7 +21,6 @@ import { XIcon } from '../../../../icons/XIcon.js';
22
21
  import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
23
22
  import { Button } from '../../../../ui/Button/index.js';
24
23
  import { Field } from '../../../../ui/Field/index.js';
25
- import { NumberInput } from '../../../../ui/NumberInput/index.js';
26
24
  import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
27
25
  import { Portal } from '../../../../ui/Portal/index.js';
28
26
  import { Select } from '../../../../ui/Select/index.js';
@@ -61,6 +59,13 @@ export function InstapayWithdrawal() {
61
59
  const definition = z.object({
62
60
  amount: z.string().superRefine((val, ctx) => {
63
61
  const n = parseDecimal(val, 0);
62
+ if (val.includes('.')) {
63
+ ctx.addIssue({
64
+ code: z.ZodIssueCode.custom,
65
+ message: 'Amount must be a whole number',
66
+ });
67
+ return;
68
+ }
64
69
  if (n < minimumAmount) {
65
70
  ctx.addIssue({
66
71
  type: 'number',
@@ -143,12 +148,7 @@ export function InstapayWithdrawal() {
143
148
  sameWidth: true,
144
149
  }, value: o.field.value ? [o.field.value] : [], onValueChange: (details) => {
145
150
  o.field.onChange(details.value.at(0) ?? '');
146
- }, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, item.id))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Bank account number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
147
- o.field.onChange(details.value);
148
- }, formatOptions: {
149
- maximumFractionDigits: 2,
150
- minimumFractionDigits: 0,
151
- }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
151
+ }, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, item.id))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Bank account number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
152
152
  form.setValue('amount', value.toString(), {
153
153
  shouldTouch: true,
154
154
  shouldDirty: true,
@@ -127,7 +127,7 @@ export function ForgotPasswordForm() {
127
127
  o.field.onChange(details.value);
128
128
  }, onValueComplete: () => {
129
129
  form2Ref.current?.requestSubmit();
130
- }, blurOnComplete: true, readOnly: step2Form.formState.isSubmitting, type: "numeric", children: [_jsxs(PinInput.Control, { className: "grid-cols-[1fr_1fr_1fr_auto_1fr_1fr_1fr] items-center gap-md", children: [_jsx(PinInput.Input, { index: 0 }), _jsx(PinInput.Input, { index: 1 }), _jsx(PinInput.Input, { index: 2 }), _jsx("span", { className: "font-medium text-2xl text-text-placeholder-subtle", children: "\u2013" }), _jsx(PinInput.Input, { index: 3 }), _jsx(PinInput.Input, { index: 4 }), _jsx(PinInput.Input, { index: 5 })] }), _jsx(PinInput.HiddenInput, {})] }), _jsx(Field.ErrorText, { children: o.formState.errors.verificationCode?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: resetPasswordMutation.isPending, children: "Verify" }), _jsxs("div", { className: "mt-3 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-secondary-700", children: "Didn't recieve the code?" }), _jsx("button", { type: "button", className: "font-semibold text-button-secondary-fg disabled:cursor-not-allowed disabled:opacity-75", disabled: cooldown.cooling, onClick: async () => {
130
+ }, blurOnComplete: true, readOnly: step2Form.formState.isSubmitting, type: "numeric", children: [_jsxs(PinInput.Control, { className: "grid-cols-[1fr_1fr_1fr_auto_1fr_1fr_1fr] items-center gap-md", children: [_jsx(PinInput.Input, { index: 0 }), _jsx(PinInput.Input, { index: 1 }), _jsx(PinInput.Input, { index: 2 }), _jsx("span", { className: "font-medium text-2xl text-text-placeholder-subtle", children: "\u2013" }), _jsx(PinInput.Input, { index: 3 }), _jsx(PinInput.Input, { index: 4 }), _jsx(PinInput.Input, { index: 5 })] }), _jsx(PinInput.HiddenInput, {})] }), _jsx(Field.ErrorText, { children: o.formState.errors.verificationCode?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: resetPasswordMutation.isPending, children: "Verify" }), _jsxs("div", { className: "mt-3 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-secondary-700", children: "Didn't receive the code?" }), _jsx("button", { type: "button", className: "font-semibold text-button-secondary-fg disabled:cursor-not-allowed disabled:opacity-75", disabled: cooldown.cooling, onClick: async () => {
131
131
  await sendVerificationCodeMutation.mutateAsync({
132
132
  channel: 'SMS',
133
133
  recipient: mobileNumberParser.format(step1Form.getValues('mobileNumber')),
@@ -0,0 +1,7 @@
1
+ export interface IdleLogoutProps {
2
+ /**
3
+ * Idle timer in milliseconds before logout. Defaults to 15 minutes (900000 ms).
4
+ */
5
+ timer?: number;
6
+ }
7
+ export declare function IdleLogout({ timer }: IdleLogoutProps): null;
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import { useIdleLogout } from '../../client/hooks/useIdleLogout.js';
3
+ export function IdleLogout({ timer }) {
4
+ useIdleLogout(timer);
5
+ return null;
6
+ }
@@ -0,0 +1 @@
1
+ export * from './IdleLogout';
@@ -0,0 +1 @@
1
+ export * from './IdleLogout.js';
@@ -0,0 +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-jackpot-rays-primary);
64
+ --second: var(--color-jackpot-rays-secondary);
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-jackpot-table-scrollbar-track);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-jackpot-table-scrollbar-thumb);
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
+ }