@opexa/portal-components 0.0.948 → 0.0.950

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 (220) hide show
  1. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +17 -10
  2. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  3. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  4. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +1 -0
  5. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +2 -1
  6. package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
  7. package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
  8. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
  9. package/dist/ui/Badge/Badge.d.ts +12 -12
  10. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  11. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  12. package/dist/ui/Carousel/Carousel.d.ts +72 -72
  13. package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
  14. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  15. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  16. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  17. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  18. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  19. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  20. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  21. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  22. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  23. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  24. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  25. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  26. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  27. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  28. package/dist/ui/Menu/Menu.d.ts +198 -198
  29. package/dist/ui/Menu/menu.recipe.d.ts +11 -11
  30. package/dist/ui/Popover/Popover.d.ts +88 -88
  31. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  32. package/dist/ui/Select/Select.d.ts +45 -45
  33. package/dist/ui/Select/select.recipe.d.ts +3 -3
  34. package/dist/ui/Table/Table.d.ts +21 -21
  35. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  36. package/dist/ui/Table/table.recipe.d.ts +3 -3
  37. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  38. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  39. package/package.json +1 -1
  40. package/dist/assets/providers/alize.png +0 -0
  41. package/dist/assets/providers/bigtime-gaming.png +0 -0
  42. package/dist/assets/providers/bng.png +0 -0
  43. package/dist/assets/providers/boongo.png +0 -0
  44. package/dist/assets/providers/btg.png +0 -0
  45. package/dist/assets/providers/cq9.png +0 -0
  46. package/dist/assets/providers/darwin.png +0 -0
  47. package/dist/assets/providers/digitain.png +0 -0
  48. package/dist/assets/providers/evolution.png +0 -0
  49. package/dist/assets/providers/fantasma-games.png +0 -0
  50. package/dist/assets/providers/fc.png +0 -0
  51. package/dist/assets/providers/fp.png +0 -0
  52. package/dist/assets/providers/habanero.png +0 -0
  53. package/dist/assets/providers/hacksaw.png +0 -0
  54. package/dist/assets/providers/jdb.png +0 -0
  55. package/dist/assets/providers/jili.png +0 -0
  56. package/dist/assets/providers/leap.png +0 -0
  57. package/dist/assets/providers/live-22-metaverse.png +0 -0
  58. package/dist/assets/providers/netent.png +0 -0
  59. package/dist/assets/providers/no-limit.png +0 -0
  60. package/dist/assets/providers/pg.png +0 -0
  61. package/dist/assets/providers/pgsoft.png +0 -0
  62. package/dist/assets/providers/pragmatic-play.png +0 -0
  63. package/dist/assets/providers/realtime-gaming.png +0 -0
  64. package/dist/assets/providers/redtiger.png +0 -0
  65. package/dist/assets/providers/rtg.png +0 -0
  66. package/dist/assets/providers/sagaming.png +0 -0
  67. package/dist/client/hooks/useAiOGCashDepositMutation.d.ts +0 -4
  68. package/dist/client/hooks/useAiOGCashDepositMutation.js +0 -90
  69. package/dist/client/hooks/useAiOGrabPayDepositMutation.d.ts +0 -4
  70. package/dist/client/hooks/useAiOGrabPayDepositMutation.js +0 -80
  71. package/dist/client/hooks/useAiOPalawanPayDepositMutation.d.ts +0 -4
  72. package/dist/client/hooks/useAiOPalawanPayDepositMutation.js +0 -80
  73. package/dist/client/hooks/useAiOPayMayaDepositMutation.d.ts +0 -4
  74. package/dist/client/hooks/useAiOPayMayaDepositMutation.js +0 -80
  75. package/dist/client/hooks/useVerifyMobileNumber.d.ts +0 -3
  76. package/dist/client/hooks/useVerifyMobileNumber.js +0 -20
  77. package/dist/components/Banner/Banner.client.d.ts +0 -12
  78. package/dist/components/Banner/Banner.client.js +0 -49
  79. package/dist/components/DepositWithdrawal/AiOPaymentMethods.d.ts +0 -11
  80. package/dist/components/DepositWithdrawal/AiOPaymentMethods.js +0 -55
  81. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +0 -1
  82. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +0 -260
  83. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
  84. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +0 -99
  85. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
  86. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +0 -17
  87. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
  88. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +0 -116
  89. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHQRCode.d.ts +0 -3
  90. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHQRCode.js +0 -69
  91. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDeposit.d.ts +0 -1
  92. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDeposit.js +0 -10
  93. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositAlert.d.ts +0 -1
  94. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositAlert.js +0 -99
  95. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.d.ts +0 -25
  96. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.js +0 -2
  97. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositDetails.d.ts +0 -1
  98. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositDetails.js +0 -17
  99. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositForm.d.ts +0 -1
  100. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositForm.js +0 -116
  101. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHQRCode.d.ts +0 -3
  102. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHQRCode.js +0 -69
  103. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.d.ts +0 -13
  104. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.js +0 -85
  105. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGCashDeposit/AiOGCashDeposit.d.ts +0 -1
  106. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGCashDeposit/AiOGCashDeposit.js +0 -173
  107. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGrabPayDeposit/AiOGrabPayDeposit.d.ts +0 -1
  108. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOGrabPayDeposit/AiOGrabPayDeposit.js +0 -171
  109. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPalawanPayDeposit/AiOPalawanPayDeposit.d.ts +0 -1
  110. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPalawanPayDeposit/AiOPalawanPayDeposit.js +0 -171
  111. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPayMayaDeposit/AiOPayMayaDeposit.d.ts +0 -1
  112. package/dist/components/DepositWithdrawal/Deposit__legacy/AiOPayMayaDeposit/AiOPayMayaDeposit.js +0 -171
  113. package/dist/components/DepositWithdrawal/Deposit__legacy/AvailablePromos.d.ts +0 -8
  114. package/dist/components/DepositWithdrawal/Deposit__legacy/AvailablePromos.js +0 -33
  115. package/dist/components/DepositWithdrawal/Deposit__legacy/Deposit.d.ts +0 -1
  116. package/dist/components/DepositWithdrawal/Deposit__legacy/Deposit.js +0 -120
  117. package/dist/components/DepositWithdrawal/Deposit__legacy/GCashDeposit/GCashDeposit.d.ts +0 -1
  118. package/dist/components/DepositWithdrawal/Deposit__legacy/GCashDeposit/GCashDeposit.js +0 -163
  119. package/dist/components/DepositWithdrawal/Deposit__legacy/GCashWebpayDeposit/GCashWebpayDeposit.d.ts +0 -1
  120. package/dist/components/DepositWithdrawal/Deposit__legacy/GCashWebpayDeposit/GCashWebpayDeposit.js +0 -165
  121. package/dist/components/DepositWithdrawal/Deposit__legacy/LibanganDeposit/LibanganDeposit.d.ts +0 -1
  122. package/dist/components/DepositWithdrawal/Deposit__legacy/LibanganDeposit/LibanganDeposit.js +0 -186
  123. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaAppDeposit/MayaAppDeposit.d.ts +0 -1
  124. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaAppDeposit/MayaAppDeposit.js +0 -157
  125. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaDeposit/MayaDeposit.d.ts +0 -1
  126. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaDeposit/MayaDeposit.js +0 -163
  127. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaWebpayDeposit/MayaWebpayDeposit.d.ts +0 -1
  128. package/dist/components/DepositWithdrawal/Deposit__legacy/MayaWebpayDeposit/MayaWebpayDeposit.js +0 -166
  129. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDeposit.d.ts +0 -1
  130. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDeposit.js +0 -10
  131. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +0 -1
  132. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositAlert.js +0 -99
  133. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +0 -25
  134. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.js +0 -2
  135. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +0 -1
  136. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositDetails.js +0 -19
  137. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositForm.d.ts +0 -1
  138. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositForm.js +0 -115
  139. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +0 -13
  140. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.js +0 -81
  141. package/dist/components/DepositWithdrawal/Deposit__legacy/PisoPayDeposit/PisoPayDeposit.d.ts +0 -1
  142. package/dist/components/DepositWithdrawal/Deposit__legacy/PisoPayDeposit/PisoPayDeposit.js +0 -180
  143. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDeposit.d.ts +0 -1
  144. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDeposit.js +0 -10
  145. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
  146. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositAlert.js +0 -99
  147. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +0 -25
  148. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.js +0 -2
  149. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
  150. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositDetails.js +0 -17
  151. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
  152. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositForm.js +0 -116
  153. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHQRCode.d.ts +0 -3
  154. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHQRCode.js +0 -69
  155. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +0 -13
  156. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.js +0 -85
  157. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  158. package/dist/components/DigitainLauncher/Loading.js +0 -5
  159. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
  160. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
  161. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  162. package/dist/components/KYC/BasicInformation.js +0 -101
  163. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  164. package/dist/components/KYC/IdentityVerification.js +0 -120
  165. package/dist/components/KYC/Indicator.d.ts +0 -1
  166. package/dist/components/KYC/Indicator.js +0 -8
  167. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  168. package/dist/components/KYC/KYC.lazy.js +0 -45
  169. package/dist/components/KYC/KYCContext.d.ts +0 -6
  170. package/dist/components/KYC/KYCContext.js +0 -2
  171. package/dist/components/KYC/KYCDefault/BasicInformation.d.ts +0 -1
  172. package/dist/components/KYC/KYCDefault/BasicInformation.js +0 -101
  173. package/dist/components/KYC/KYCVerificationStatus.d.ts +0 -1
  174. package/dist/components/KYC/KYCVerificationStatus.js +0 -10
  175. package/dist/components/KYC/KYCVerificationStatus.lazy.d.ts +0 -1
  176. package/dist/components/KYC/KYCVerificationStatus.lazy.js +0 -36
  177. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  178. package/dist/components/KYC/PersonalInformation.js +0 -122
  179. package/dist/components/KYC/useKYC.d.ts +0 -25
  180. package/dist/components/KYC/useKYC.js +0 -38
  181. package/dist/components/KYCNotRequired/KYCNotRequired.d.ts +0 -0
  182. package/dist/components/KYCNotRequired/KYCNotRequired.js +0 -1
  183. package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +0 -1
  184. package/dist/components/PortalProvider/AndroidOnlyComponents.js +0 -12
  185. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
  186. package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
  187. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
  188. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
  189. package/dist/components/Quests/MultiWageringQuest.d.ts +0 -1
  190. package/dist/components/Quests/MultiWageringQuest.js +0 -111
  191. package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
  192. package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
  193. package/dist/components/SessionWatcher/index.d.ts +0 -1
  194. package/dist/components/SessionWatcher/index.js +0 -1
  195. package/dist/components/SignIn/utils.d.ts +0 -8
  196. package/dist/components/SignIn/utils.js +0 -26
  197. package/dist/components/SingleSignOn/SingleSignOn.d.ts +0 -4
  198. package/dist/components/SingleSignOn/SingleSignOn.js +0 -177
  199. package/dist/components/SingleSignOn/index.d.ts +0 -1
  200. package/dist/components/SingleSignOn/index.js +0 -1
  201. package/dist/constants/Branches.d.ts +0 -2
  202. package/dist/constants/Branches.js +0 -42
  203. package/dist/images/game-providers/ALPHACHINKO.png +0 -0
  204. package/dist/images/responsible-gaming-yellow.png +0 -0
  205. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  206. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  207. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  208. package/dist/third-parties/FacebookPixel/api.js +0 -1
  209. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  210. package/dist/third-parties/FacebookPixel/index.js +0 -1
  211. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  212. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  213. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  214. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  215. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  216. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  217. package/dist/third-parties/index.d.ts +0 -2
  218. package/dist/third-parties/index.js +0 -2
  219. package/dist/utils/getLocaleInfo.d.ts +0 -79
  220. package/dist/utils/getLocaleInfo.js +0 -175
@@ -1,38 +0,0 @@
1
- import { useRef, useState } from 'react';
2
- export function useKYC() {
3
- const [step, setStep] = useState(2);
4
- const [done, setDone] = useState(false);
5
- const [idFrontImageId, setFrontImageId] = useState(null);
6
- const [selfieImageId, setSelfieImageId] = useState(null);
7
- const subscribers = useRef([]);
8
- const subscribe = (subscriber) => {
9
- subscribers.current.push(subscriber);
10
- return () => {
11
- subscribers.current = subscribers.current.filter((item) => item !== subscriber);
12
- };
13
- };
14
- const triggerEvent = (detail) => {
15
- subscribers.current.forEach((subscriber) => {
16
- subscriber(detail);
17
- });
18
- };
19
- const reset = () => {
20
- setStep(1);
21
- setDone(false);
22
- setFrontImageId(null);
23
- setSelfieImageId(null);
24
- };
25
- return {
26
- step,
27
- setStep,
28
- done,
29
- setDone,
30
- idFrontImageId,
31
- setFrontImageId,
32
- selfieImageId,
33
- setSelfieImageId,
34
- subscribe,
35
- triggerEvent,
36
- reset,
37
- };
38
- }
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- export declare function AndroidOnlyComponents(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,12 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Capacitor } from '@capacitor/core';
4
- import { AndroidRoutingHandler } from './AndroidRoutingHandler.js';
5
- import PushNotification from './PushNotifications.js';
6
- export function AndroidOnlyComponents() {
7
- const platform = Capacitor.getPlatform();
8
- const isNative = platform === 'android' || platform === 'ios';
9
- if (!isNative)
10
- return null;
11
- return (_jsxs(_Fragment, { children: [_jsx(PushNotification, {}), _jsx(AndroidRoutingHandler, {})] }));
12
- }
@@ -1 +0,0 @@
1
- export declare function CXDTokenObserver(): null;
@@ -1,30 +0,0 @@
1
- 'use client';
2
- import { addHours } from 'date-fns';
3
- import { clamp } from 'lodash-es';
4
- import { useLocalStorage, useTimeout } from 'usehooks-ts';
5
- import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
6
- export function CXDTokenObserver() {
7
- const { data: account } = useAccountQuery();
8
- const accountCxd = {
9
- cxd: account?.cellxpertDetails?.cxd,
10
- };
11
- const [cxd, setCxd, removeCxd] = useLocalStorage('cxd', null);
12
- const now = new Date();
13
- const removeCxdUntilInMs = cxd?.timestamp
14
- ? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
15
- : 0;
16
- useTimeout(() => {
17
- const isSame = cxd?.cxd === accountCxd.cxd;
18
- if (!isSame) {
19
- const extendedTimestamp = addHours(new Date(), 6).getTime();
20
- setCxd({
21
- cxd: accountCxd.cxd,
22
- timestamp: extendedTimestamp,
23
- });
24
- }
25
- }, account ? 100 : null);
26
- useTimeout(() => {
27
- removeCxd();
28
- }, account ? removeCxdUntilInMs : null);
29
- return null;
30
- }
@@ -1 +0,0 @@
1
- export declare function LinkGoogleAccountObserver(): null;
@@ -1,29 +0,0 @@
1
- 'use client';
2
- import { useSearchParams } from 'next/navigation';
3
- import { useTimeout } from 'usehooks-ts';
4
- import { toaster } from '../../client/utils/toaster.js';
5
- import { getQueryClient } from '../../utils/getQueryClient.js';
6
- import { getSessionQueryKey } from '../../utils/queryKeys.js';
7
- export function LinkGoogleAccountObserver() {
8
- const searchParams = useSearchParams();
9
- const code = searchParams.get('message') ?? searchParams.get('status');
10
- const queryClient = getQueryClient();
11
- useTimeout(() => {
12
- if (code === 'duplicate') {
13
- return toaster.error({
14
- title: 'Duplicate Account',
15
- description: 'An account with this email already exists. Please try signing in instead.',
16
- });
17
- }
18
- if (code === 'linked') {
19
- queryClient.invalidateQueries({
20
- queryKey: getSessionQueryKey(),
21
- });
22
- return toaster.success({
23
- title: 'Google Account Linked Successfully',
24
- description: 'Your Google account has been successfully connected.',
25
- });
26
- }
27
- }, code ? 100 : null);
28
- return null;
29
- }
@@ -1 +0,0 @@
1
- export declare function MultiWageringQuest(): import("react/jsx-runtime").JSX.Element;
@@ -1,111 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useRouter, useSearchParams } from 'next/navigation';
3
- import { useCallback, useMemo } from 'react';
4
- import { useControllableState } from '../../client/hooks/useControllableState.js';
5
- import { useDisclosure } from '../../client/hooks/useDisclosure.js';
6
- import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
7
- import { Lock01Icon } from '../../icons/Lock01Icon.js';
8
- import { XIcon } from '../../icons/XIcon.js';
9
- import { Badge } from '../../ui/Badge/index.js';
10
- import { Button } from '../../ui/Button/index.js';
11
- import { Dialog } from '../../ui/Dialog/index.js';
12
- import { Portal } from '../../ui/Portal/index.js';
13
- import { Progress } from '../../ui/Progress/index.js';
14
- import { Prose } from '../../ui/Prose/index.js';
15
- import { formatNumber } from '../../utils/formatNumber.js';
16
- import { useQuestContext } from './QuestsContext.js';
17
- import { RemainingTime } from './RemainingTime.js';
18
- export function MultiWageringQuest() {
19
- const disclosure = useDisclosure();
20
- const quest = useQuestContext();
21
- const { stages, totalStage, currentStage, progressPercentage } = useMemo(() => {
22
- const currentStage = quest.stages.filter((m) => m.cleared).length;
23
- const progress = [];
24
- const turnover = parseFloat(quest.turnover || '0');
25
- let remaining = turnover;
26
- const stageTargets = quest.stages.map((s) => parseFloat(s.targetTurnover));
27
- for (const target of stageTargets) {
28
- if (remaining <= 0) {
29
- progress.push(0);
30
- }
31
- else if (remaining >= target) {
32
- progress.push(100);
33
- }
34
- else {
35
- progress.push((remaining / target) * 100);
36
- }
37
- remaining -= target;
38
- }
39
- if (!quest?.stages) {
40
- return {
41
- stages: [],
42
- totalStage: 0,
43
- currentStage: 0,
44
- progressPercentage: 0,
45
- };
46
- }
47
- const transformedStages = quest.stages.map((stage, idx) => ({
48
- ...stage,
49
- progressValue: progress[idx],
50
- }));
51
- return {
52
- stages: transformedStages,
53
- totalStage: quest.stages.length,
54
- currentStage: currentStage === 0 ? 1 : currentStage,
55
- progressPercentage: +quest.progressPercentage,
56
- };
57
- }, [quest]);
58
- const handleViewDetails = useCallback(() => {
59
- disclosure.setOpen(true);
60
- }, [disclosure]);
61
- const localeInfo = useLocaleInfo();
62
- const params = useSearchParams();
63
- const questId = params.get('id');
64
- const isOpen = useMemo(() => {
65
- return questId === quest.id;
66
- }, [questId, quest.id]);
67
- const router = useRouter();
68
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex h-full w-full flex-col space-y-6 rounded-2xl border border-border-primary bg-bg-tertiary px-4 pt-5 pb-6", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsx("div", { className: "flex max-h-7.5 items-center justify-between", children: _jsx(RemainingTime, { endOfDay: true }) }), _jsx("p", { className: "font-semibold text-xl", children: quest?.name || 'Multi Stage Wagering Quest' }), _jsx("div", { className: "text-[#CECFD2] text-sm", dangerouslySetInnerHTML: {
69
- __html: quest?.description ||
70
- 'Ready for a challenge? Complete them all and get amazing rewards!',
71
- } }), _jsxs("div", { className: "flex items-center justify-between pt-5", children: [_jsxs("p", { className: "text-[#F5F5F6] text-sm", children: ["Progress: ", quest.progressPercentage, "%"] }), _jsxs("p", { className: "text-[#F5F5F6] text-sm", children: [quest.turnover, _jsxs("span", { className: "text-[#94969C]", children: ["/", quest.targetTurnover, " PHP"] })] })] }), _jsx(Progress.Root, { max: 100, className: "h-2 rounded-full bg-bg-primary", value: progressPercentage, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, { className: "bg-utility-brand-600" }) }) }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "text-[#F5F5F6] text-sm", children: ["Stage ", currentStage, " of ", totalStage] }), _jsx(Badge.Root, { size: "lg", className: "border border-border-badge bg-bg-badge", round: false, children: _jsxs(Badge.Label, { className: "!text-text-badge flex items-center justify-center text-xs", children: [_jsx("p", { className: "flex h-[10px] items-center justify-center", children: "+" }), ' ', formatNumber(quest.stages?.reduce((curr, prev) => {
72
- return curr + Number(prev.bonusAmount || 0);
73
- }, 0), {
74
- currency: localeInfo.currency.code,
75
- maxDecimalPlaces: 0,
76
- minDecimalPlaces: 0,
77
- }), ' ', "Bonus"] }) })] })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: handleViewDetails, "aria-label": "View Details", disabled: quest.status === 'FAILED' || quest.status === 'COMPLETED', className: "disabled:bg-bg-primary disabled:text-text-disabled", children: "View Details" }) })] }), _jsx(Stages, { open: disclosure.open || isOpen, onOpenChange: (open) => {
78
- disclosure.setOpen(open);
79
- router.push('/quests');
80
- }, quest: quest, stages: stages })] }));
81
- }
82
- function Stages(props) {
83
- const [open, setOpen] = useControllableState({
84
- value: props.open,
85
- defaultValue: props.defaultOpen ?? false,
86
- onChange: props.onOpenChange,
87
- });
88
- const currentStage = useMemo(() => {
89
- const stage = props?.stages?.findLastIndex((stage) => stage.cleared) ?? 0;
90
- return stage !== -1 ? stage + 1 : 1;
91
- }, [props.stages]);
92
- return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto mt-40 min-h-auto min-w-[23rem] max-w-[25rem] overflow-y-auto rounded-xl border border-border-wagering-popup px-4 py-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "group flex flex-col space-y-5 text-sm text-text-quarterary-brand", children: [_jsx("h2", { className: "font-semibold text-lg text-text-primary-900", children: props.quest?.name || 'Quest' }), _jsx(Prose, { dangerouslySetInnerHTML: {
93
- __html: props.quest?.description ?? '',
94
- } }), _jsx("div", { className: "flex w-full flex-col space-y-3", children: props.stages.map((stage, idx) => {
95
- if (currentStage >= idx + 1) {
96
- return (_jsx(QuestWageringStageUnlocked, { data: stage, progressValue: stage.progressValue, bonus: stage.bonusAmount, stage: idx, isCompleted: stage.cleared }, idx));
97
- }
98
- else {
99
- return _jsx(QuestWageringStageLocked, { stage: idx }, idx);
100
- }
101
- }) }), _jsx(Button, { size: "sm", onClick: () => setOpen(false), "aria-label": "Close", className: "w-full", children: "Close" })] })] }) })] }) }));
102
- }
103
- function QuestWageringStageUnlocked({ bonus, stage, progressValue, data, isCompleted = false, }) {
104
- const localeInfo = useLocaleInfo();
105
- return (_jsxs("div", { className: "mb-4 flex flex-col justify-between rounded-xl border border-border-wagering-stage-popup bg-bg-wagering-stage-popup p-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "font-medium", children: ["Stage ", stage + 1] }), _jsx(Badge.Root, { colorScheme: isCompleted ? 'success' : 'blue', size: "md", round: true, children: _jsx(Badge.Label, { children: data.cleared ? 'Completed' : 'Ongoing' }) })] }), _jsxs("div", { className: "mt-2.5 flex items-center justify-between", children: [_jsxs("p", { children: ["Progress ", progressValue, "%"] }), _jsx(Badge.Root, { size: "md", className: "border border-border-badge bg-bg-badge", round: false, children: _jsxs(Badge.Label, { className: "!text-text-badge", children: ["+", formatNumber(bonus, {
106
- currency: localeInfo.currency.code,
107
- }), ' ', "Bonus"] }) })] }), _jsx(Progress.Root, { max: 100, className: "mt-2 h-2 rounded-full bg-bg-primary", value: progressValue ?? 0, children: _jsx(Progress.Track, { children: _jsx(Progress.Range, { className: "bg-utility-brand-600" }) }) })] }));
108
- }
109
- function QuestWageringStageLocked({ stage }) {
110
- return (_jsxs("div", { className: "mb-4 flex items-center justify-between rounded-xl border border-border-wagering-stage-popup bg-bg-wagering-stage-popup p-3", children: [_jsxs("p", { className: "font-medium", children: ["Stage ", stage + 1] }), _jsx("div", { className: "flex items-center justify-center rounded-full border border-border-lock bg-bg-lock p-1", children: _jsx(Lock01Icon, { className: "size-3 stroke-3 font-medium text-text-lock" }) })] }));
111
- }
@@ -1 +0,0 @@
1
- export declare function SessionWatcher(): null;
@@ -1,20 +0,0 @@
1
- 'use client';
2
- import { useRouter } from 'next/navigation';
3
- import { useCallback, useEffect } from 'react';
4
- import { useSessionHealthQuery } from '../../client/hooks/useSessionHealthQuery.js';
5
- import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
6
- export function SessionWatcher() {
7
- const router = useRouter();
8
- const query = useSessionHealthQuery({ refetchInterval: 1000 * 5 });
9
- const healthy = query.data ?? true;
10
- const mutation = useSignOutMutation();
11
- const signOut = useCallback(async () => {
12
- await mutation.mutateAsync();
13
- router.refresh();
14
- }, [mutation, router]);
15
- useEffect(() => {
16
- if (!healthy)
17
- signOut();
18
- }, [healthy, signOut]);
19
- return null;
20
- }
@@ -1 +0,0 @@
1
- export * from './SessionWatcher';
@@ -1 +0,0 @@
1
- export * from './SessionWatcher.js';
@@ -1,8 +0,0 @@
1
- type Options = {
2
- accountName?: string;
3
- siteName?: string;
4
- signInOptions?: 'MOBILE_NUMBER' | 'NAME_AND_PASSWORD';
5
- };
6
- export type ErrorCode = 'MEMBER_ACCOUNT_BLACKLISTED' | 'MEMBER_ACCOUNT_SUSPENDED' | 'INVALID_RECAPTCHA_RESPONSE' | 'MEMBER_NOT_FOUND' | 'RATE_LIMIT_REACH' | 'NOT_READY_TO_SEND_VERIFICATION_ERROR' | 'Forbidden';
7
- export declare function getFriendlyErrorMessage(code: ErrorCode, options?: Options): string;
8
- export {};
@@ -1,26 +0,0 @@
1
- export function getFriendlyErrorMessage(code, options) {
2
- const accountName = options?.accountName ?? '';
3
- const siteName = options?.siteName ?? '';
4
- const signInOptions = options?.signInOptions ?? 'NAME_AND_PASSWORD';
5
- switch (code) {
6
- case 'MEMBER_ACCOUNT_BLACKLISTED':
7
- return `Your account ${accountName} has been blacklisted due to a serious violation of our policies. For more information or to appeal, please contact the ${siteName} Chat Support team.`;
8
- case 'MEMBER_ACCOUNT_SUSPENDED':
9
- return `Your account ${accountName} has been temporarily suspended. Please reach out to the ${siteName} Chat Support team to learn more and get help with resolving the issue.`;
10
- case 'INVALID_RECAPTCHA_RESPONSE':
11
- return 'Invalid reCAPTCHA response';
12
- case 'MEMBER_NOT_FOUND':
13
- return 'Account not found. Please check your username and try again.';
14
- case 'RATE_LIMIT_REACH':
15
- return 'Rate limit exceeded';
16
- case 'NOT_READY_TO_SEND_VERIFICATION_ERROR':
17
- return 'Your account is not ready to send verification requests. Please try again later.';
18
- case 'Forbidden':
19
- if (signInOptions === 'MOBILE_NUMBER') {
20
- return 'Invalid verification code. Please check the code and try again.';
21
- }
22
- return 'Invalid username or password, please try again.';
23
- default:
24
- return 'Something went wrong. Please try again later.';
25
- }
26
- }
@@ -1,4 +0,0 @@
1
- export declare function SingleSignOn(): import("react/jsx-runtime").JSX.Element;
2
- export declare function VerifyMobileNumber({ onClose }: {
3
- onClose?: () => void;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,177 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { zodResolver } from '@hookform/resolvers/zod';
4
- import Image from 'next/image';
5
- import { useParams, useRouter, useSearchParams } from 'next/navigation';
6
- import { useEffect, useRef, useState } from 'react';
7
- import { Controller, useForm } from 'react-hook-form';
8
- import z from 'zod';
9
- import { useCooldown } from '../../client/hooks/useCooldown.js';
10
- import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
11
- import { useMobileNumberParser } from '../../client/hooks/useMobileNumberParser.js';
12
- import { useSendVerificationCodeMutation } from '../../client/hooks/useSendVerificationCodeMutation.js';
13
- import { useSignInSSOMutation } from '../../client/hooks/useSignInSSOMutation.js';
14
- import { useVerifyMobileNumber } from '../../client/hooks/useVerifyMobileNumber.js';
15
- import { toaster } from '../../client/utils/toaster.js';
16
- import { ArrowLeftIcon } from '../../icons/ArrowLeftIcon.js';
17
- import cinePopLogo from '../../images/cinepop-logo.png';
18
- import dearUtolLogo from '../../images/dear-utol-logo.png';
19
- import inplayLogo from '../../images/inplay-logo.png';
20
- import lightBg from '../../images/light-bg.png';
21
- import mariasDiary from '../../images/marias-diary-logo.png';
22
- import secretConfessionsLogo from '../../images/secret-confessions-logo.png';
23
- import { Button } from '../../ui/Button/index.js';
24
- import { Dialog } from '../../ui/Dialog/index.js';
25
- import { Field } from '../../ui/Field/index.js';
26
- import { PinInput } from '../../ui/PinInput/index.js';
27
- import { Portal } from '../../ui/Portal/index.js';
28
- export function SingleSignOn() {
29
- const params = useParams();
30
- const searchParams = useSearchParams();
31
- const router = useRouter();
32
- const partnerId = params.partnerId;
33
- const token = searchParams.get('token');
34
- const [isSsoOpen, setIsSsoOpen] = useState(true);
35
- const [showVerifyDialog, setShowVerifyDialog] = useState(false);
36
- const ssoMutation = useSignInSSOMutation({
37
- onSuccess: () => {
38
- toaster.success({
39
- description: 'Account created successfully',
40
- });
41
- setIsSsoOpen(false);
42
- setShowVerifyDialog(true);
43
- },
44
- onError: () => {
45
- toaster.error({
46
- description: 'Account creation failed',
47
- });
48
- },
49
- });
50
- // biome-ignore lint/correctness/useExhaustiveDependencies: We only want to trigger the mutation when the URL parameters change.
51
- useEffect(() => {
52
- // Trigger SSO login when component mounts
53
- if (partnerId && token && !ssoMutation.isPending) {
54
- ssoMutation.mutate({ partnerId, token });
55
- }
56
- }, [partnerId, token]);
57
- return (_jsxs(_Fragment, { children: [_jsx(Dialog.Root, { open: isSsoOpen, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "flex items-center", children: _jsxs(Dialog.Content, { className: "flex h-[333px] w-[375px] flex-col items-center space-y-4 bg-[#111827] p-6 text-center justify-between", style: {
58
- backgroundImage: `url(${lightBg.src})`,
59
- }, children: [_jsxs("div", { className: 'flex flex-col items-center', children: [_jsx(Image, { src: inplayLogo, alt: "inplay logo", width: 82, height: 34, className: "h-auto w-[82px] " }), ssoMutation.isError ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-[#CECFD2] text-sm mt-4", children: "Account creation failed. Please try again." }), _jsx(Button, { type: "button", className: 'mt-4', onClick: () => router.push('/'), children: "Back to home page" })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "mb-4 h-7 w-7 animate-spin rounded-full border-4 border-[#101730] border-t-[#F05027]" }), _jsx("div", { className: "text-[#CECFD2] text-sm", children: "We're creating an account for you..." }), _jsx("div", { className: "text-[#CECFD2] text-sm", children: "In the meantime, you can watch your favorite series on CinePop!" })] }))] }), _jsxs("div", { className: "pt-3", children: [_jsx(Image, { src: cinePopLogo, alt: "cine poplogo", width: 151, height: 24, className: "mx-auto mb-2 h-auto w-[151px]" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { src: secretConfessionsLogo, alt: "secret confessions logo", width: 104, height: 53, className: "h-auto w-[104px]" }), _jsx(Image, { src: dearUtolLogo, alt: "dear utol logo", width: 105, height: 53, className: "h-auto w-[105px]" }), _jsx(Image, { src: mariasDiary, alt: "maria's diary logo", width: 104, height: 53, className: "h-auto w-[104px]" })] })] })] }) })] }) }), showVerifyDialog && (_jsx(VerifyMobileNumber, { onClose: () => {
60
- setShowVerifyDialog(false);
61
- router.push('/');
62
- } }))] }));
63
- }
64
- export function VerifyMobileNumber({ onClose }) {
65
- const [step, setStep] = useState(1);
66
- const sendVerificationCodeMutation = useSendVerificationCodeMutation({
67
- onSuccess: () => {
68
- setStep(2);
69
- cooldown.start();
70
- },
71
- onError: (err) => {
72
- toaster.error({
73
- title: 'Sign In Failed',
74
- description: err.message,
75
- });
76
- },
77
- });
78
- const verifyMobileNumberMutation = useVerifyMobileNumber({
79
- onSuccess: async () => {
80
- step1Form.reset();
81
- step2Form.reset();
82
- setStep(1);
83
- toaster.success({
84
- title: 'Verification Successful',
85
- description: 'Your mobile number has been verified.',
86
- });
87
- onClose?.();
88
- },
89
- onError: (err) => {
90
- const errorMessage = err.name === 'Forbidden'
91
- ? 'Please enter the correct verification code'
92
- : err.message;
93
- toaster.error({
94
- title: 'Sign In Failed',
95
- description: errorMessage,
96
- });
97
- },
98
- });
99
- const localeInfo = useLocaleInfo();
100
- const mobileNumberParser = useMobileNumberParser();
101
- const Step1Definition = z.object({
102
- mobileNumber: z
103
- .string()
104
- .min(1, 'Mobile number is required')
105
- .superRefine((v, ctx) => {
106
- if (!mobileNumberParser.validate(v)) {
107
- ctx.addIssue({
108
- code: z.ZodIssueCode.custom,
109
- message: 'Invalid mobile number',
110
- });
111
- }
112
- }),
113
- });
114
- const Step2Definition = z.object({
115
- verificationCode: z.array(z.string()).superRefine((val, ctx) => {
116
- if (val.length !== 6 || val.some((v) => v.length !== 1)) {
117
- ctx.addIssue({
118
- code: z.ZodIssueCode.custom,
119
- message: 'Please enter your 6-digit verification code.',
120
- });
121
- }
122
- }),
123
- });
124
- const step1Form = useForm({
125
- resolver: zodResolver(Step1Definition),
126
- defaultValues: {
127
- mobileNumber: '',
128
- },
129
- });
130
- const step2Form = useForm({
131
- resolver: zodResolver(Step2Definition),
132
- defaultValues: {
133
- verificationCode: Array.from({ length: 6 }).fill(''),
134
- },
135
- });
136
- const cooldown = useCooldown({
137
- max: 60,
138
- duration: 1000 * 60,
139
- });
140
- const formRef = useRef(null);
141
- return (_jsx(Dialog.Root, { open: true, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "flex items-center", children: _jsxs(Dialog.Content, { className: "flex w-[375px] flex-col items-center space-y-4 rounded-xl bg-[#111827] p-6 text-center", style: {
142
- backgroundImage: `url(${lightBg.src})`,
143
- }, children: [_jsx(Image, { src: inplayLogo, alt: "inplay logo", width: 82, height: 34, className: "h-auto w-[82px]" }), _jsxs("div", { children: [step === 1 && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "font-bold text-sm", children: ["Get ", _jsx("span", { className: "text-[#F05127]", children: "\u20B150 Bonus" }), " when you verify your account and play."] }), _jsxs("form", { className: "mt-3xl", onSubmit: step1Form.handleSubmit(async (data) => {
144
- sendVerificationCodeMutation.mutateAsync({
145
- channel: 'SMS',
146
- recipient: mobileNumberParser.format(data.mobileNumber),
147
- strict: true,
148
- });
149
- }), children: [_jsxs(Field.Root, { invalid: !!step1Form.formState.errors.mobileNumber, className: "text-left", children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx("div", { className: "-translate-y-1/2 absolute top-1/2 left-3.5 flex shrink-0 items-center gap-md", children: _jsx("span", { className: "text-text-placeholder", children: localeInfo.mobileNumber.areaCode }) }), _jsx(Field.Input, { style: {
150
- paddingLeft: `calc(1.25rem + ${localeInfo.mobileNumber.areaCode.length}ch)`,
151
- }, ...step1Form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: step1Form.formState.errors.mobileNumber?.message })] }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: step1Form.formState.isSubmitting, children: "Send Code" })] })] })), step === 2 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "mt-xl text-center font-semibold text-lg", children: "Check your Phone" }), _jsxs("p", { className: "mt-xs text-center text-sm text-text-secondary-700", children: ["We\u2019ve sent a verification code to your mobile number", ' ', _jsx("span", { className: "font-semibold text-[#F05127]", children: mobileNumberParser.format(step1Form.getValues('mobileNumber')) }), ' ', "via text"] }), _jsxs("form", { ref: formRef, className: "mt-5", onSubmit: step2Form.handleSubmit(async ({ verificationCode }) => {
152
- verifyMobileNumberMutation.mutateAsync({
153
- verificationCode: verificationCode.join(''),
154
- });
155
- }), children: [_jsx(Controller, { name: "verificationCode", control: step2Form.control, render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, children: [_jsxs(PinInput.Root, { placeholder: "0", onKeyDown: (e) => {
156
- if (e.key === 'Backspace') {
157
- step2Form.reset();
158
- }
159
- }, value: o.field.value, onValueChange: (details) => {
160
- o.field.onChange(details.value);
161
- o.field.onBlur();
162
- }, otp: true, onValueComplete: () => {
163
- formRef.current?.requestSubmit();
164
- }, 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.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: step2Form.formState.isSubmitting, children: "Verify" }), _jsxs("div", { className: "mt-4 flex w-full items-center justify-center gap-xs text-xs", children: [_jsx("span", { className: "text-[#9CA3AF]", children: "Didn't receive the code?" }), _jsx("button", { type: "button", className: "font-semibold text-[#C084FC]", disabled: cooldown.cooling, onClick: async () => {
165
- await sendVerificationCodeMutation.mutateAsync({
166
- channel: 'SMS',
167
- recipient: mobileNumberParser.format(step1Form.getValues('mobileNumber')),
168
- });
169
- cooldown.start();
170
- }, children: cooldown.cooling
171
- ? `Resend in ${cooldown.countdown}s`
172
- : 'Resend' })] }), _jsx("button", { type: "button", className: "absolute top-0 left-6 mx-auto mt-3xl flex h-8 w-8 items-center gap-1 rounded-full bg-[#1f2638] font-semibold text-sm text-text-tertiary-600", onClick: () => {
173
- setStep(1);
174
- step2Form.reset();
175
- cooldown.stop();
176
- }, children: _jsx(ArrowLeftIcon, { className: "mx-auto size-5" }) })] })] }))] })] }) })] }) }));
177
- }
@@ -1 +0,0 @@
1
- export * from './SingleSignOn';
@@ -1 +0,0 @@
1
- export * from './SingleSignOn.js';
@@ -1,2 +0,0 @@
1
- import type { Branch } from '../types';
2
- export declare const BRANCHES: Branch[];
@@ -1,42 +0,0 @@
1
- export const BRANCHES = [
2
- {
3
- code: 'BRCAL',
4
- name: 'Bingo Republic 2nd floor Primark Center Deparo St., Caloocan City',
5
- },
6
- {
7
- code: 'BRNAG',
8
- name: 'Bingo Republic 3rd floor Robinsons Mall, Naga City, Camarines Sur',
9
- },
10
- {
11
- code: 'BRANT',
12
- name: 'Bingo Republic 2nd floor Robinsons Mall, San Vicente,Antique',
13
- },
14
- {
15
- code: 'BRCLA',
16
- name: 'Clark',
17
- },
18
- {
19
- code: 'BRLAG',
20
- name: 'Laguna',
21
- },
22
- {
23
- code: 'BREAS',
24
- name: 'Eastwood City, Quezon City',
25
- },
26
- {
27
- code: 'BRMAR',
28
- name: 'Bingo ng Bayan 4th floor Marikina Public Market, Marikina City',
29
- },
30
- {
31
- code: 'BRILO',
32
- name: 'Iloilo',
33
- },
34
- {
35
- code: 'BRFIM',
36
- name: 'Fisher Mall,Quezon City',
37
- },
38
- {
39
- code: 'BRCAC',
40
- name: 'Villa Caceres Hotel, Naga City,Camsur',
41
- },
42
- ];
@@ -1,4 +0,0 @@
1
- export interface FacebookPixelProps {
2
- fbId: string;
3
- }
4
- export declare function FacebookPixel(props: FacebookPixelProps): null;
@@ -1,4 +0,0 @@
1
- export function FacebookPixel(props) {
2
- console.log(props);
3
- return null;
4
- }
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- export * from './FacebookPixel';
@@ -1 +0,0 @@
1
- export * from './FacebookPixel.js';
@@ -1,4 +0,0 @@
1
- export interface GoogleRecaptchaProps {
2
- siteKey: string;
3
- }
4
- export declare function GoogleRecaptcha(props: GoogleRecaptchaProps): null;
@@ -1,4 +0,0 @@
1
- export function GoogleRecaptcha(props) {
2
- console.log(props);
3
- return null;
4
- }
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- export * from './GoogleRecaptcha';
@@ -1 +0,0 @@
1
- export * from './GoogleRecaptcha.js';
@@ -1,2 +0,0 @@
1
- export * from './FacebookPixel';
2
- export * from './GoogleRecaptcha';
@@ -1,2 +0,0 @@
1
- export * from './FacebookPixel/index.js';
2
- export * from './GoogleRecaptcha/index.js';