@opexa/portal-components 0.0.611 → 0.0.613

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/dist/client/hooks/useGlobalStore.d.ts +1 -0
  2. package/dist/client/hooks/useGlobalStore.js +13 -0
  3. package/dist/components/Account/Account.lazy.js +2 -39
  4. package/dist/components/Account/Wallet.d.ts +17 -0
  5. package/dist/components/Account/Wallet.example.d.ts +33 -0
  6. package/dist/components/Account/Wallet.example.js +36 -0
  7. package/dist/components/Account/Wallet.js +44 -0
  8. package/dist/components/Account/index.d.ts +1 -0
  9. package/dist/components/Account/index.js +1 -0
  10. package/dist/components/DigitainLauncher/Loading.js +1 -1
  11. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +10 -0
  12. package/dist/components/Disclaimer/ResponsibleGaming.js +13 -0
  13. package/dist/components/Disclaimer/TermsOfUse.d.ts +11 -0
  14. package/dist/components/Disclaimer/TermsOfUse.js +13 -0
  15. package/dist/components/FeatureFlag/FeatureFlag.d.ts +1 -0
  16. package/dist/components/FeatureFlag/FeatureFlag.js +29 -0
  17. package/dist/components/FeatureFlag/index.d.ts +1 -0
  18. package/dist/components/FeatureFlag/index.js +1 -0
  19. package/dist/components/Jackpots/Jackpots.module.css +184 -184
  20. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  21. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  22. package/dist/components/KYC/AutoOpen.d.ts +1 -0
  23. package/dist/components/KYC/AutoOpen.js +40 -0
  24. package/dist/components/KYC/BasicInformation.js +1 -1
  25. package/dist/components/KYC/CaptureIdDocument.d.ts +1 -0
  26. package/dist/components/KYC/CaptureIdDocument.js +219 -0
  27. package/dist/components/KYC/CaptureSelfie.d.ts +1 -0
  28. package/dist/components/KYC/CaptureSelfie.js +285 -0
  29. package/dist/components/KYC/DisplayImage.d.ts +5 -0
  30. package/dist/components/KYC/DisplayImage.js +8 -0
  31. package/dist/components/KYC/FileUpload.d.ts +10 -0
  32. package/dist/components/KYC/FileUpload.js +72 -0
  33. package/dist/components/KYC/IdentityVerification.js +1 -1
  34. package/dist/components/KYC/KYC.lazy.js +1 -1
  35. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  36. package/dist/components/KYC/KYCReminder.lazy.js +1 -1
  37. package/dist/components/KYC/KYCVerificationStatus.lazy.js +2 -2
  38. package/dist/components/KYC/NoCameraError.d.ts +7 -0
  39. package/dist/components/KYC/NoCameraError.js +6 -0
  40. package/dist/components/KYC/PersonOverlayDesktop.d.ts +7 -0
  41. package/dist/components/KYC/PersonOverlayDesktop.js +9 -0
  42. package/dist/components/KYC/PersonalInformation.js +1 -1
  43. package/dist/components/KYC/backup/Header.d.ts +1 -0
  44. package/dist/components/KYC/backup/Header.js +8 -0
  45. package/dist/components/KYC/backup/Indicator.d.ts +1 -0
  46. package/dist/components/KYC/backup/Indicator.js +9 -0
  47. package/dist/components/KYC/backup/KYC.d.ts +1 -0
  48. package/dist/components/KYC/backup/KYC.js +14 -0
  49. package/dist/components/KYC/backup/KYC.lazy.d.ts +1 -0
  50. package/dist/components/KYC/backup/KYC.lazy.js +26 -0
  51. package/dist/components/KYC/backup/KYCContext.d.ts +6 -0
  52. package/dist/components/KYC/backup/KYCContext.js +2 -0
  53. package/dist/components/KYC/backup/Step1.d.ts +1 -0
  54. package/dist/components/KYC/backup/Step1.js +13 -0
  55. package/dist/components/KYC/backup/Step2.d.ts +1 -0
  56. package/dist/components/KYC/backup/Step2.js +13 -0
  57. package/dist/components/KYC/backup/Step3.d.ts +1 -0
  58. package/dist/components/KYC/backup/Step3.js +13 -0
  59. package/dist/components/KYC/backup/Step4.d.ts +1 -0
  60. package/dist/components/KYC/backup/Step4.js +7 -0
  61. package/dist/components/KYC/backup/useKYC.d.ts +10 -0
  62. package/dist/components/KYC/backup/useKYC.js +8 -0
  63. package/dist/components/KYC/loadModels.d.ts +1 -0
  64. package/dist/components/KYC/loadModels.js +9 -0
  65. package/dist/components/KYC/utils.d.ts +9 -0
  66. package/dist/components/KYC/utils.js +79 -0
  67. package/dist/components/Messages/Message.d.ts +1 -0
  68. package/dist/components/Messages/Message.js +35 -0
  69. package/dist/components/Messages/MessageContext.d.ts +6 -0
  70. package/dist/components/Messages/MessageContext.js +2 -0
  71. package/dist/components/Messages/MessagePopup.d.ts +1 -0
  72. package/dist/components/Messages/MessagePopup.js +20 -0
  73. package/dist/components/Messages/MessageTrigger.d.ts +8 -0
  74. package/dist/components/Messages/MessageTrigger.js +19 -0
  75. package/dist/components/Quests/CountdownTimer.d.ts +15 -0
  76. package/dist/components/Quests/CountdownTimer.js +33 -0
  77. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
  78. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +78 -0
  79. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
  80. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +9 -0
  81. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
  82. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
  83. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
  84. package/dist/components/Quests/WageringQuest/WageringQuest.js +20 -0
  85. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
  86. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +9 -0
  87. package/dist/components/SignIn/utils.d.ts +8 -0
  88. package/dist/components/SignIn/utils.js +26 -0
  89. package/dist/components/SignUp/SignUp.lazy.d.ts +12 -0
  90. package/dist/components/SignUp/SignUp.lazy.js +18 -0
  91. package/dist/components/SignUp/SignUpContext.d.ts +6 -0
  92. package/dist/components/SignUp/SignUpContext.js +2 -0
  93. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +17 -0
  94. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +18 -0
  95. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +6 -0
  96. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +2 -0
  97. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +1 -0
  98. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +310 -0
  99. package/dist/components/SignUp/SignUpForm.d.ts +1 -0
  100. package/dist/components/SignUp/SignUpForm.js +284 -0
  101. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +1 -0
  102. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +198 -0
  103. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +1 -0
  104. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +251 -0
  105. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +10 -0
  106. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +42 -0
  107. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +7 -0
  108. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +9 -0
  109. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +1 -0
  110. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +464 -0
  111. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +11 -0
  112. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +20 -0
  113. package/dist/components/SignUp/SignUpKYC/utils.d.ts +9 -0
  114. package/dist/components/SignUp/SignUpKYC/utils.js +79 -0
  115. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +1 -0
  116. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +198 -0
  117. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +1 -0
  118. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +251 -0
  119. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +10 -0
  120. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +41 -0
  121. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +1 -0
  122. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +429 -0
  123. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +13 -0
  124. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +26 -0
  125. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +7 -0
  126. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +2 -0
  127. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +11 -0
  128. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +20 -0
  129. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  130. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  131. package/dist/components/shared/IdDocumentField.client.d.ts +25 -0
  132. package/dist/components/shared/IdDocumentField.client.js +204 -0
  133. package/dist/components/shared/IdDocumentField.d.ts +2 -0
  134. package/dist/components/shared/IdDocumentField.js +11 -0
  135. package/dist/components/shared/SelfieField.client.d.ts +20 -0
  136. package/dist/components/shared/SelfieField.client.js +327 -0
  137. package/dist/components/shared/SelfieField.d.ts +2 -0
  138. package/dist/components/shared/SelfieField.js +11 -0
  139. package/dist/constants/BranchCode.d.ts +4 -0
  140. package/dist/constants/BranchCode.js +42 -0
  141. package/dist/constants/Branches.d.ts +2 -0
  142. package/dist/constants/Branches.js +42 -0
  143. package/dist/handlers/postTransformIdFrontImage.d.ts +3 -0
  144. package/dist/handlers/postTransformIdFrontImage.js +67 -0
  145. package/dist/handlers/postTransformSelfieImage.d.ts +3 -0
  146. package/dist/handlers/postTransformSelfieImage.js +71 -0
  147. package/dist/handlers.d.ts +43 -0
  148. package/dist/handlers.js +297 -0
  149. package/dist/icons/BellRingIcon.d.ts +2 -0
  150. package/dist/icons/BellRingIcon.js +4 -0
  151. package/dist/services/queries.js +2758 -2758
  152. package/dist/services/trigger.d.ts +2 -2
  153. package/dist/services/trigger.js +1 -1
  154. package/dist/styles/theme.css +762 -762
  155. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
  156. package/dist/third-parties/FacebookPixel/FacebookPixel.js +4 -0
  157. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  158. package/dist/third-parties/FacebookPixel/api.js +1 -0
  159. package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
  160. package/dist/third-parties/FacebookPixel/index.js +1 -0
  161. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
  162. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +4 -0
  163. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  164. package/dist/third-parties/GoogleRecaptcha/api.js +1 -0
  165. package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
  166. package/dist/third-parties/GoogleRecaptcha/index.js +1 -0
  167. package/dist/third-parties/index.d.ts +2 -0
  168. package/dist/third-parties/index.js +2 -0
  169. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  170. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  171. package/dist/ui/Badge/Badge.d.ts +12 -12
  172. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  173. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  174. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  175. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  176. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  177. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  178. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  179. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  180. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  181. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  182. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  183. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  184. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  185. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  186. package/dist/ui/Menu/Menu.d.ts +252 -252
  187. package/dist/ui/Menu/menu.recipe.d.ts +14 -14
  188. package/dist/ui/Popover/Popover.d.ts +55 -55
  189. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  190. package/dist/ui/Progress/Progress.d.ts +27 -27
  191. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  192. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  193. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  194. package/dist/ui/Select/Select.d.ts +45 -45
  195. package/dist/ui/Select/select.recipe.d.ts +3 -3
  196. package/dist/ui/Table/Table.d.ts +21 -21
  197. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  198. package/dist/ui/Table/table.recipe.d.ts +3 -3
  199. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  200. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  201. package/dist/utils/dataUrlToBlob.d.ts +1 -0
  202. package/dist/utils/dataUrlToBlob.js +11 -0
  203. package/dist/utils/gamesAvailable3pmTo3am.d.ts +1 -0
  204. package/dist/utils/gamesAvailable3pmTo3am.js +1 -0
  205. package/dist/utils/getGameName.d.ts +1 -0
  206. package/dist/utils/getGameName.js +6 -0
  207. package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
  208. package/dist/utils/isBetween3amAnd3pm.js +5 -0
  209. package/dist/utils/resizeImageSize.d.ts +2 -0
  210. package/dist/utils/resizeImageSize.js +11 -0
  211. package/package.json +163 -163
  212. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +0 -7
  213. package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
  214. package/dist/icons/LinkBrokenIcon.d.ts +0 -2
  215. package/dist/icons/LinkBrokenIcon.js +0 -4
@@ -88,6 +88,7 @@ export interface GlobalStore {
88
88
  responsibleGamingReminder: ResponsibleGamingReminderStore;
89
89
  pendingBonus: HasPendingBonusStore;
90
90
  kycVerificationStatus: PopupStore;
91
+ bankInformationDetails: PopupStore;
91
92
  }
92
93
  export declare const useGlobalStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<GlobalStore>, "setState" | "devtools"> & {
93
94
  setState(partial: GlobalStore | Partial<GlobalStore> | ((state: GlobalStore) => GlobalStore | Partial<GlobalStore>), replace?: false | undefined, action?: (string | {
@@ -431,6 +431,19 @@ export const useGlobalStore = create()(devtools(subscribeWithSelector((set) => (
431
431
  },
432
432
  '~touched': false,
433
433
  },
434
+ bankInformationDetails: {
435
+ open: false,
436
+ setOpen(open) {
437
+ set((prev) => ({
438
+ bankInformationDetails: {
439
+ ...prev.bankInformationDetails,
440
+ open,
441
+ '~touched': true,
442
+ },
443
+ }));
444
+ },
445
+ '~touched': false,
446
+ },
434
447
  pendingBonus: {
435
448
  open: false,
436
449
  setOpen(open) {
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { isString } from 'lodash-es';
4
4
  import Image from 'next/image';
5
5
  import Link from 'next/link';
@@ -10,12 +10,10 @@ import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
10
10
  import { useBonusesCountQuery } from '../../client/hooks/useBonusesCountQuery.js';
11
11
  import { useCashbackBonusesCountQuery } from '../../client/hooks/useCashbackBonusesCountQuery.js';
12
12
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
13
- import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
14
13
  import { useMayaAuth } from '../../client/hooks/useMayaAuth.js';
15
14
  import { useProfileCompletionQuery } from '../../client/hooks/useProfileCompletionQuery.js';
16
15
  import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
17
16
  import { useUnreadMessagesCountQuery } from '../../client/hooks/useUnreadMessagesCountQuery.js';
18
- import { useWalletQuery } from '../../client/hooks/useWalletQuery.js';
19
17
  import { AlertCircleIcon } from '../../icons/AlertCircleIcon.js';
20
18
  import { Bell01Icon } from '../../icons/Bell01Icon.js';
21
19
  import { ChevronRightIcon } from '../../icons/ChevronRightIcon.js';
@@ -26,15 +24,14 @@ import { Logout01Icon } from '../../icons/Logout01Icon.js';
26
24
  import { Settings02Icon } from '../../icons/Settings02Icon.js';
27
25
  import avatarPlaceholder from '../../images/placeholder-avatar.png';
28
26
  import { Badge } from '../../ui/Badge/index.js';
29
- import { Button } from '../../ui/Button/index.js';
30
27
  import { Drawer } from '../../ui/Drawer/index.js';
31
28
  import { Popover } from '../../ui/Popover/index.js';
32
29
  import { Portal } from '../../ui/Portal/index.js';
33
30
  import { capitalize } from '../../utils/capitalize.js';
34
- import { formatNumber } from '../../utils/formatNumber.js';
35
31
  import { parseDecimal } from '../../utils/parseDecimal.js';
36
32
  import { AccountPropsContext, useAccountPropsContext } from './AccountContext.js';
37
33
  import { accountRecipe } from './account.recipe.js';
34
+ import { Wallet } from './Wallet.js';
38
35
  const defaultAccountProps = {
39
36
  offsetTop: '0px',
40
37
  rewardsUrl: '/rewards',
@@ -96,40 +93,6 @@ function Profile() {
96
93
  };
97
94
  return (_jsxs("div", { className: "flex shrink-0 items-center gap-lg", children: [_jsx(Image, { src: avatarPlaceholder, alt: "", width: 48, height: 48, className: "size-12" }), _jsxs("div", { className: "grow", children: [_jsx("p", { className: "font-semibold text-text-secondary-700 leading-tight", children: account?.name }), _jsxs("div", { className: "flex", children: [_jsxs("p", { className: "grow items-center text-text-tertiary-600 leading-tight", children: ["ID: ", account?.id] }), accountProps.shouldShowAccountStatus && (_jsxs(Badge.Root, { colorScheme: getVerificationColorScheme(account?.verificationStatus), className: "self-start", children: [_jsx(Badge.Indicator, {}), _jsx(Badge.Label, { children: capitalize(account?.verificationStatus || '') })] }))] })] })] }));
98
95
  }
99
- function Wallet({ classNames }) {
100
- const localeInfo = useLocaleInfo();
101
- const walletQuery = useWalletQuery({
102
- refetchInterval: 1000,
103
- });
104
- const globalStore = useGlobalStore(useShallow((ctx) => ({
105
- profile: ctx.account,
106
- mobileProfile: ctx.account__mobile,
107
- depositWithdrawal: ctx.depositWithdrawal,
108
- })));
109
- const depositBalance = parseDecimal(walletQuery.data?.balance, 0);
110
- const bonusBalance = parseDecimal(walletQuery.data?.bonus, 0);
111
- const totalBalance = depositBalance + bonusBalance;
112
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('mt-3 rounded-xl border border-border-primary bg-bg-tertiary p-xl', classNames.walletBalanceContainer), children: [_jsx("div", { className: twMerge('text-sm text-text-secondary-700', classNames.totalBalanceLabel), children: "Total Balance" }), _jsx("div", { className: twMerge('font-bold text-3xl', classNames.totalBalanceAmount), children: formatNumber(totalBalance, {
113
- currency: localeInfo?.currency.code,
114
- minDecimalPlaces: 2,
115
- }) }), _jsxs("div", { className: twMerge('mt-1.5 flex gap-7xl', classNames.balanceDetailsContainer), children: [_jsxs("div", { children: [_jsx("p", { className: twMerge('text-2xs text-text-secondary-700', classNames.depositBalanceLabel), children: "Deposit Balance" }), _jsx("p", { className: twMerge('text-medium text-text-primary-brand', classNames.depositBalanceAmount), children: formatNumber(depositBalance, {
116
- currency: localeInfo?.currency.code,
117
- minDecimalPlaces: 2,
118
- }) })] }), _jsxs("div", { children: [_jsx("p", { className: twMerge('text-2xs text-text-secondary-700', classNames.bonusBalanceLabel), children: "Bonus Balance" }), _jsx("p", { className: twMerge('text-medium text-text-primary-brand', classNames.bonusBalanceAmount), children: formatNumber(bonusBalance, {
119
- currency: localeInfo?.currency.code,
120
- minDecimalPlaces: 2,
121
- }) })] })] })] }), ' ', _jsxs("div", { className: twMerge('mt-3 flex gap-lg', classNames.walletActions), children: [_jsx(Button, { size: "xs", variant: "outline", className: classNames.withdrawButton, onClick: () => {
122
- globalStore.depositWithdrawal.setOpen(true);
123
- globalStore.depositWithdrawal.setTab('WITHDRAWAL');
124
- globalStore.profile.setOpen(false);
125
- globalStore.mobileProfile.setOpen(false);
126
- }, children: "Withdraw" }), _jsx(Button, { size: "xs", className: classNames.depositButton, onClick: () => {
127
- globalStore.depositWithdrawal.setOpen(true);
128
- globalStore.depositWithdrawal.setTab('DEPOSIT');
129
- globalStore.profile.setOpen(false);
130
- globalStore.mobileProfile.setOpen(false);
131
- }, children: "Deposit" })] })] }));
132
- }
133
96
  function Links({ router, classNames, }) {
134
97
  const accountProps = useAccountPropsContext();
135
98
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -0,0 +1,17 @@
1
+ export interface WalletClassNames {
2
+ walletActions?: string;
3
+ withdrawButton?: string;
4
+ depositButton?: string;
5
+ walletBalanceContainer?: string;
6
+ totalBalanceLabel?: string;
7
+ totalBalanceAmount?: string;
8
+ balanceDetailsContainer?: string;
9
+ depositBalanceLabel?: string;
10
+ depositBalanceAmount?: string;
11
+ bonusBalanceLabel?: string;
12
+ bonusBalanceAmount?: string;
13
+ }
14
+ export interface WalletProps {
15
+ classNames?: WalletClassNames;
16
+ }
17
+ export declare function Wallet({ classNames }: WalletProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Example usage of the Wallet component
3
+ *
4
+ * Import the Wallet component:
5
+ * ```tsx
6
+ * import { Wallet } from '@opexa/portal-components/Account/Wallet';
7
+ * ```
8
+ *
9
+ * Basic usage:
10
+ * ```tsx
11
+ * <Wallet />
12
+ * ```
13
+ *
14
+ * With custom class names:
15
+ * ```tsx
16
+ * <Wallet
17
+ * classNames={{
18
+ * walletBalanceContainer: "custom-balance-container",
19
+ * totalBalanceAmount: "custom-total-amount",
20
+ * depositButton: "custom-deposit-btn",
21
+ * withdrawButton: "custom-withdraw-btn"
22
+ * }}
23
+ * />
24
+ * ```
25
+ *
26
+ * The Wallet component includes:
27
+ * - Total balance display
28
+ * - Deposit and bonus balance breakdown
29
+ * - Deposit and Withdraw buttons
30
+ * - Automatic wallet data fetching with 1-second refresh interval
31
+ * - Integration with global store for deposit/withdrawal modals
32
+ */
33
+ export declare const WalletExample: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Example usage of the Wallet component
4
+ *
5
+ * Import the Wallet component:
6
+ * ```tsx
7
+ * import { Wallet } from '@opexa/portal-components/Account/Wallet';
8
+ * ```
9
+ *
10
+ * Basic usage:
11
+ * ```tsx
12
+ * <Wallet />
13
+ * ```
14
+ *
15
+ * With custom class names:
16
+ * ```tsx
17
+ * <Wallet
18
+ * classNames={{
19
+ * walletBalanceContainer: "custom-balance-container",
20
+ * totalBalanceAmount: "custom-total-amount",
21
+ * depositButton: "custom-deposit-btn",
22
+ * withdrawButton: "custom-withdraw-btn"
23
+ * }}
24
+ * />
25
+ * ```
26
+ *
27
+ * The Wallet component includes:
28
+ * - Total balance display
29
+ * - Deposit and bonus balance breakdown
30
+ * - Deposit and Withdraw buttons
31
+ * - Automatic wallet data fetching with 1-second refresh interval
32
+ * - Integration with global store for deposit/withdrawal modals
33
+ */
34
+ export const WalletExample = () => {
35
+ return (_jsxs("div", { className: "p-4", children: [_jsx("h2", { className: 'mb-4 font-bold text-xl', children: "Wallet Component Example" }), _jsx("p", { className: 'mb-4 text-gray-600', children: "The Wallet component is now available as a standalone component that you can use anywhere in your application." }), _jsxs("div", { className: 'rounded-lg bg-gray-100 p-4', children: [_jsx("h3", { className: 'mb-2 font-semibold', children: "Import:" }), _jsxs("code", { className: 'block rounded bg-white p-2 text-sm', children: ["import ", `{ Wallet }`, " from '@opexa/portal-components/Account/Wallet';"] })] }), _jsxs("div", { className: 'mt-4 rounded-lg bg-gray-100 p-4', children: [_jsx("h3", { className: 'mb-2 font-semibold', children: "Usage:" }), _jsx("code", { className: 'block rounded bg-white p-2 text-sm', children: `<Wallet classNames={{ walletActions: "custom-actions" }} />` })] })] }));
36
+ };
@@ -0,0 +1,44 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { useShallow } from 'zustand/shallow';
5
+ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
6
+ import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
7
+ import { useWalletQuery } from '../../client/hooks/useWalletQuery.js';
8
+ import { Button } from '../../ui/Button/index.js';
9
+ import { formatNumber } from '../../utils/formatNumber.js';
10
+ import { parseDecimal } from '../../utils/parseDecimal.js';
11
+ export function Wallet({ classNames = {} }) {
12
+ const localeInfo = useLocaleInfo();
13
+ const walletQuery = useWalletQuery({
14
+ refetchInterval: 1000,
15
+ });
16
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
17
+ profile: ctx.account,
18
+ mobileProfile: ctx.account__mobile,
19
+ depositWithdrawal: ctx.depositWithdrawal,
20
+ })));
21
+ const depositBalance = parseDecimal(walletQuery.data?.balance, 0);
22
+ const bonusBalance = parseDecimal(walletQuery.data?.bonus, 0);
23
+ const totalBalance = depositBalance + bonusBalance;
24
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('mt-3 rounded-xl border border-border-primary bg-bg-tertiary p-xl', classNames.walletBalanceContainer), children: [_jsx("div", { className: twMerge('text-sm text-text-secondary-700', classNames.totalBalanceLabel), children: "Total Balance" }), _jsx("div", { className: twMerge('font-bold text-3xl', classNames.totalBalanceAmount), children: formatNumber(totalBalance, {
25
+ currency: localeInfo?.currency.code,
26
+ minDecimalPlaces: 2,
27
+ }) }), _jsxs("div", { className: twMerge('mt-1.5 flex gap-7xl', classNames.balanceDetailsContainer), children: [_jsxs("div", { children: [_jsx("p", { className: twMerge('text-2xs text-text-secondary-700', classNames.depositBalanceLabel), children: "Deposit Balance" }), _jsx("p", { className: twMerge('text-medium text-text-primary-brand', classNames.depositBalanceAmount), children: formatNumber(depositBalance, {
28
+ currency: localeInfo?.currency.code,
29
+ minDecimalPlaces: 2,
30
+ }) })] }), _jsxs("div", { children: [_jsx("p", { className: twMerge('text-2xs text-text-secondary-700', classNames.bonusBalanceLabel), children: "Bonus Balance" }), _jsx("p", { className: twMerge('text-medium text-text-primary-brand', classNames.bonusBalanceAmount), children: formatNumber(bonusBalance, {
31
+ currency: localeInfo?.currency.code,
32
+ minDecimalPlaces: 2,
33
+ }) })] })] })] }), _jsxs("div", { className: twMerge('mt-3 flex gap-lg', classNames.walletActions), children: [_jsx(Button, { size: "xs", variant: "outline", className: classNames.withdrawButton, onClick: () => {
34
+ globalStore.depositWithdrawal.setOpen(true);
35
+ globalStore.depositWithdrawal.setTab('WITHDRAWAL');
36
+ globalStore.profile.setOpen(false);
37
+ globalStore.mobileProfile.setOpen(false);
38
+ }, children: "Withdraw" }), _jsx(Button, { size: "xs", className: classNames.depositButton, onClick: () => {
39
+ globalStore.depositWithdrawal.setOpen(true);
40
+ globalStore.depositWithdrawal.setTab('DEPOSIT');
41
+ globalStore.profile.setOpen(false);
42
+ globalStore.mobileProfile.setOpen(false);
43
+ }, children: "Deposit" })] })] }));
44
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './Account';
2
2
  export * from './AccountTrigger';
3
+ export * from './Wallet';
@@ -1,2 +1,3 @@
1
1
  export * from './Account.js';
2
2
  export * from './AccountTrigger.js';
3
+ export * from './Wallet.js';
@@ -1,5 +1,5 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  export function Loading() {
4
- return (_jsx("div", { className: "flex h-[calc(100vh-400px)] w-full items-center justify-center px-4", children: _jsxs("div", { className: "flex flex-col items-center space-y-4", children: [_jsx("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-blue-500 border-t-transparent" }), _jsx("p", { className: "font-medium text-gray-700 text-lg", children: "Loading Sports Book\u2026" })] }) }));
4
+ return (_jsx("div", { className: "flex h-[calc(100vh-400px)] w-full items-center justify-center px-4", children: _jsxs("div", { className: "flex flex-col items-center space-y-4", children: [_jsx("div", { className: "border-blue-500 h-10 w-10 animate-spin rounded-full border-4 border-t-transparent" }), _jsx("p", { className: "text-gray-700 text-lg font-medium", children: "Loading Sports Book\u2026" })] }) }));
5
5
  }
@@ -0,0 +1,10 @@
1
+ import { type ImageProps } from 'next/image';
2
+ import type { ReactNode } from 'react';
3
+ export interface ResponsibleGamingProps {
4
+ responsibleGamingContent: string | ReactNode;
5
+ logo: ImageProps['src'];
6
+ open: boolean;
7
+ onCloseAction: () => void;
8
+ responsibleGamingLogo?: ImageProps['src'];
9
+ }
10
+ export declare function ResponsibleGaming({ logo, open, responsibleGamingContent, onCloseAction, ...props }: ResponsibleGamingProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Image, {} from 'next/image';
4
+ import pagcorLogo from '../../images/pagcor.png';
5
+ import responsibleGamingLogo from '../../images/responsible-gaming.png';
6
+ import { Button } from '../../ui/Button/index.js';
7
+ import { Dialog } from '../../ui/Dialog/index.js';
8
+ import { Portal } from '../../ui/Portal/index.js';
9
+ export function ResponsibleGaming({ logo, open, responsibleGamingContent, onCloseAction, ...props }) {
10
+ return (_jsx(Dialog.Root, { open: open, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: "Responsible Gaming" }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: responsibleGamingContent }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx("div", { className: "w-full", children: _jsx(Button, { type: "button", className: "mt-3", onClick: () => {
11
+ onCloseAction();
12
+ }, children: "I Agree" }) })] }) })] }) }));
13
+ }
@@ -0,0 +1,11 @@
1
+ import { type ImageProps } from 'next/image';
2
+ import type { ReactNode } from 'react';
3
+ export interface TermsOfUseProps {
4
+ logo: ImageProps['src'];
5
+ open: boolean;
6
+ onCloseAction: () => void;
7
+ termsOfUseContent: string | ReactNode;
8
+ siteName: string;
9
+ responsibleGamingLogo?: ImageProps['src'];
10
+ }
11
+ export declare function TermsOfUse({ logo, open, onCloseAction, siteName, termsOfUseContent, ...props }: TermsOfUseProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Image, {} from 'next/image';
4
+ import pagcorLogo from '../../images/pagcor.png';
5
+ import responsibleGamingLogo from '../../images/responsible-gaming.png';
6
+ import { Button } from '../../ui/Button/index.js';
7
+ import { Dialog } from '../../ui/Dialog/index.js';
8
+ import { Portal } from '../../ui/Portal/index.js';
9
+ export function TermsOfUse({ logo, open, onCloseAction, siteName, termsOfUseContent, ...props }) {
10
+ return (_jsx(Dialog.Root, { open: open, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsxs(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: [siteName, " Terms of Use"] }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: termsOfUseContent }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx("div", { className: "w-full", children: _jsx(Button, { type: "button", className: "mt-3", onClick: () => {
11
+ onCloseAction();
12
+ }, children: "I Agree" }) })] }) })] }) }));
13
+ }
@@ -0,0 +1 @@
1
+ export declare function FeatureFlag(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
+ import { useRouter, useSearchParams } from 'next/navigation';
4
+ import { useEffect } from 'react';
5
+ import { FEATURE_FLAG_KEY, useFeatureFlag, } from '../../client/hooks/useFeatureFlag.js';
6
+ export function FeatureFlag() {
7
+ const { featureFlagEnabled, setFeatureFlagEnabled } = useFeatureFlag();
8
+ const searchParams = useSearchParams();
9
+ const router = useRouter();
10
+ useEffect(() => {
11
+ const futureFlagParam = searchParams.get('future');
12
+ if (futureFlagParam !== null) {
13
+ const isEnabled = futureFlagParam === 'true';
14
+ setFeatureFlagEnabled(isEnabled);
15
+ localStorage.setItem(FEATURE_FLAG_KEY, isEnabled.toString());
16
+ }
17
+ }, [searchParams, setFeatureFlagEnabled]);
18
+ function disableFeatureFlag() {
19
+ setFeatureFlagEnabled(false);
20
+ localStorage.removeItem(FEATURE_FLAG_KEY);
21
+ const params = new URLSearchParams(searchParams.toString());
22
+ params.delete('future');
23
+ router.replace(`?${params.toString()}`, { scroll: false });
24
+ }
25
+ if (!featureFlagEnabled) {
26
+ return null;
27
+ }
28
+ return (_jsx("div", { className: "fixed bottom-3 flex w-full flex-col items-center justify-center", children: _jsxs("div", { className: "bg-black/70 p-1", children: ["Experimental features are enabled.", ' ', _jsxs("button", { onClick: () => disableFeatureFlag(), className: "cursor-pointer underline", children: [' ', "Disable"] })] }) }));
29
+ }
@@ -0,0 +1 @@
1
+ export * from './FeatureFlag';
@@ -0,0 +1 @@
1
+ export * from './FeatureFlag.js';