@opexa/portal-components 0.0.486 → 0.0.487

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 (73) hide show
  1. package/dist/components/KYC/KYCReminder.lazy.d.ts +2 -0
  2. package/dist/components/KYC/KYCReminder.lazy.js +3 -3
  3. package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
  4. package/dist/ui/AlertDialog/AlertDialog.d.ts +121 -121
  5. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
  6. package/dist/ui/Badge/Badge.d.ts +12 -12
  7. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  8. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  9. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  10. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  11. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  12. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  13. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  14. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  15. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  16. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  17. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  18. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  19. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  20. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  21. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  22. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  23. package/dist/ui/Field/Field.d.ts +21 -21
  24. package/dist/ui/Field/field.recipe.d.ts +3 -3
  25. package/dist/ui/Menu/Menu.d.ts +198 -198
  26. package/dist/ui/Menu/menu.recipe.d.ts +11 -11
  27. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  28. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  29. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  30. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  31. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  32. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  33. package/dist/ui/Popover/Popover.d.ts +55 -55
  34. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  35. package/dist/ui/Progress/Progress.d.ts +27 -27
  36. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  37. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  38. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  39. package/dist/ui/Select/Select.d.ts +45 -45
  40. package/dist/ui/Select/select.recipe.d.ts +3 -3
  41. package/dist/ui/Table/Table.d.ts +21 -21
  42. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  43. package/dist/ui/Table/table.recipe.d.ts +3 -3
  44. package/package.json +1 -1
  45. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +0 -7
  46. package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
  47. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  48. package/dist/components/DigitainLauncher/Loading.js +0 -5
  49. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
  50. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
  51. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  52. package/dist/components/KYC/BasicInformation.js +0 -101
  53. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  54. package/dist/components/KYC/IdentityVerification.js +0 -120
  55. package/dist/components/KYC/Indicator.d.ts +0 -1
  56. package/dist/components/KYC/Indicator.js +0 -8
  57. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  58. package/dist/components/KYC/KYC.lazy.js +0 -45
  59. package/dist/components/KYC/KYCContext.d.ts +0 -6
  60. package/dist/components/KYC/KYCContext.js +0 -2
  61. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  62. package/dist/components/KYC/PersonalInformation.js +0 -122
  63. package/dist/components/KYC/useKYC.d.ts +0 -25
  64. package/dist/components/KYC/useKYC.js +0 -38
  65. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
  66. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
  67. package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
  68. package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
  69. package/dist/components/SessionWatcher/index.d.ts +0 -1
  70. package/dist/components/SessionWatcher/index.js +0 -1
  71. package/dist/icons/LinkBrokenIcon.d.ts +0 -2
  72. package/dist/icons/LinkBrokenIcon.js +0 -4
  73. package/dist/images/responsible-gaming-yellow.png +0 -0
@@ -2,5 +2,7 @@ import type { ImageProps } from 'next/image';
2
2
  export interface KYCReminderProps {
3
3
  siteName: string;
4
4
  logo: ImageProps['src'];
5
+ titleBgColor?: string;
6
+ responsibleGamingLogo?: ImageProps['src'];
5
7
  }
6
8
  export declare function KYCReminder(props: KYCReminderProps): import("react/jsx-runtime").JSX.Element;
@@ -51,15 +51,15 @@ export function KYCReminder(props) {
51
51
  session?.status === 'authenticated' &&
52
52
  hasMissingData, onOpenChange: (details) => {
53
53
  globalStore.kycReminder.setOpen(details.open);
54
- }, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit max-w-[calc(100dvw-1rem)] overflow-y-auto rounded-lg bg-bg-primary lg:max-w-[400px]", children: isVerificationLocked && enabled ? (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: "mt-4 font-semibold text-lg", children: "Temporarily Locked" }), _jsx("p", { className: "mt-xs text-sm text-text-tertiary-600", children: "Your account has been locked due to incomplete verification. Please complete your verification to restore full access." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
54
+ }, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit max-w-[calc(100dvw-1rem)] overflow-y-auto rounded-lg bg-bg-primary lg:max-w-[400px]", children: isVerificationLocked && enabled ? (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Temporarily Locked" }), _jsx("p", { className: "mt-xs text-sm text-text-tertiary-600", children: "Your account has been locked due to incomplete verification. Please complete your verification to restore full access." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
55
55
  api.setOpen(false);
56
56
  globalStore.kyc.setOpen(true);
57
57
  }, children: "Complete KYC" }) })) })] })) : enabled &&
58
58
  daysFromCreationToNow <= 3 &&
59
- daysFromCreationToNow >= 1 ? (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-warning-secondary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: "mt-4 font-semibold text-lg", children: "JUST A FRIENDLY REMINDER" }), _jsxs("p", { className: "mt-xs text-sm text-text-tertiary-600", children: ["Please complete your KYC information within", ' ', _jsx("span", { className: "font-semibold text-[#FF0000]", children: "3 days" }), ' ', "to avoid temporary lock on your account."] }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
59
+ daysFromCreationToNow >= 1 ? (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-warning-secondary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "JUST A FRIENDLY REMINDER" }), _jsxs("p", { className: "mt-xs text-sm text-text-tertiary-600", children: ["Please complete your KYC information within", ' ', _jsx("span", { className: "font-semibold text-[#FF0000]", children: "3 days" }), ' ', "to avoid temporary lock on your account."] }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
60
60
  api.setOpen(false);
61
61
  globalStore.kyc.setOpen(true);
62
- }, children: "Complete KYC" }) })) })] })] })) : (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-warning-secondary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: "mt-4 font-semibold text-lg", children: "Personal Verification" }), _jsxs("p", { className: "mt-xs text-sm text-text-tertiary-600", children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, " services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
62
+ }, children: "Complete KYC" }) })) })] })] })) : (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-warning-secondary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Personal Verification" }), _jsxs("p", { className: "mt-xs text-sm text-text-tertiary-600", children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, " services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
63
63
  api.setOpen(false);
64
64
  globalStore.kyc.setOpen(true);
65
65
  }, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => api.setOpen(false), children: "Do it later" })] })) })] })] })) }) })] }) }));
@@ -1,30 +1,30 @@
1
1
  'use client';
2
2
  import { addHours } from 'date-fns';
3
3
  import { clamp } from 'lodash-es';
4
- import { useSearchParams } from 'next/navigation';
5
4
  import { useLocalStorage, useTimeout } from 'usehooks-ts';
6
5
  import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
7
6
  export function CXDTokenObserver() {
8
- const searchParams = useSearchParams();
9
- const cxdToken = searchParams.get('cxd');
10
- const accountQuery = useAccountQuery();
11
- const account = accountQuery.data;
12
- const [cxd, setCxd, removeCxd] = useLocalStorage('WebPortalCellxpertCxd', null);
7
+ const { data: account } = useAccountQuery();
8
+ const accountCxd = {
9
+ cxd: account?.cellxpertDetails?.cxd,
10
+ };
11
+ const [cxd, setCxd, removeCxd] = useLocalStorage('cxd', null);
13
12
  const now = new Date();
14
- const shouldTimeoutRun = cxdToken && account;
15
13
  const removeCxdUntilInMs = cxd?.timestamp
16
14
  ? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
17
15
  : 0;
18
16
  useTimeout(() => {
19
- const isSame = cxd?.cxd === cxdToken;
17
+ const isSame = cxd?.cxd === accountCxd.cxd;
20
18
  if (!isSame) {
21
19
  const extendedTimestamp = addHours(new Date(), 6).getTime();
22
20
  setCxd({
23
- cxd: cxdToken,
21
+ cxd: accountCxd.cxd,
24
22
  timestamp: extendedTimestamp,
25
23
  });
26
24
  }
27
- }, shouldTimeoutRun ? 100 : null);
28
- useTimeout(() => removeCxd(), shouldTimeoutRun ? removeCxdUntilInMs : null);
25
+ }, account ? 100 : null);
26
+ useTimeout(() => {
27
+ removeCxd();
28
+ }, account ? removeCxdUntilInMs : null);
29
29
  return null;
30
30
  }