@opexa/portal-components 0.0.477 → 0.0.478

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 (55) hide show
  1. package/dist/components/KYC/KYCDefault/IdentityVerification.js +3 -1
  2. package/dist/components/KYC/KYCDefault/KYCDefault.js +5 -3
  3. package/dist/components/KYC/KYCDefault/PersonalInformation.js +7 -2
  4. package/dist/components/KYC/KYCReminder.lazy.js +1 -2
  5. package/dist/ui/Menu/Menu.d.ts +90 -90
  6. package/dist/ui/Menu/menu.recipe.d.ts +5 -5
  7. package/dist/ui/Table/Table.d.ts +21 -21
  8. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  9. package/dist/ui/Table/table.recipe.d.ts +3 -3
  10. package/package.json +1 -1
  11. package/dist/components/Banner/Banner.client.d.ts +0 -12
  12. package/dist/components/Banner/Banner.client.js +0 -49
  13. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  14. package/dist/components/DigitainLauncher/Loading.js +0 -5
  15. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
  16. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
  17. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  18. package/dist/components/KYC/BasicInformation.js +0 -101
  19. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  20. package/dist/components/KYC/IdentityVerification.js +0 -120
  21. package/dist/components/KYC/Indicator.d.ts +0 -1
  22. package/dist/components/KYC/Indicator.js +0 -8
  23. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  24. package/dist/components/KYC/KYC.lazy.js +0 -45
  25. package/dist/components/KYC/KYCContext.d.ts +0 -6
  26. package/dist/components/KYC/KYCContext.js +0 -2
  27. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  28. package/dist/components/KYC/PersonalInformation.js +0 -122
  29. package/dist/components/KYC/useKYC.d.ts +0 -25
  30. package/dist/components/KYC/useKYC.js +0 -38
  31. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
  32. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
  33. package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
  34. package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
  35. package/dist/components/SessionWatcher/index.d.ts +0 -1
  36. package/dist/components/SessionWatcher/index.js +0 -1
  37. package/dist/components/SignIn/utils.d.ts +0 -8
  38. package/dist/components/SignIn/utils.js +0 -26
  39. package/dist/constants/Branches.d.ts +0 -2
  40. package/dist/constants/Branches.js +0 -42
  41. package/dist/images/responsible-gaming-yellow.png +0 -0
  42. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  43. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  44. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  45. package/dist/third-parties/FacebookPixel/api.js +0 -1
  46. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  47. package/dist/third-parties/FacebookPixel/index.js +0 -1
  48. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  49. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  50. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  51. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  52. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  53. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  54. package/dist/third-parties/index.d.ts +0 -2
  55. package/dist/third-parties/index.js +0 -2
@@ -19,12 +19,14 @@ import { IdFrontImageField } from '../../shared/IdFrontImageField/index.js';
19
19
  import { SelfieImageField } from '../../shared/SelfieImageField/index.js';
20
20
  import { useKYCDefaultContext } from './KYCDefaultContext.js';
21
21
  import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
22
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
22
23
  const formSchema = z.object({
23
24
  selfieImage: z.string().min(1, 'Selfie image is required.'),
24
25
  idFrontImage: z.string().min(1, 'Front image of ID is required.'),
25
26
  });
26
27
  export function IdentityVerification() {
27
28
  const kyc = useKYCDefaultContext();
29
+ const featureFlag = useFeatureFlag();
28
30
  const { data: account, isLoading: accountLoading } = useAccountQuery();
29
31
  const isVerificationLocked = account?.status === 'VERIFICATION_LOCKED';
30
32
  const { mutate: createMemberVerification, isPending: createPending } = useCreateMemberVerificationMutation({
@@ -117,7 +119,7 @@ export function IdentityVerification() {
117
119
  type: 'validate',
118
120
  message: error.message,
119
121
  });
120
- } }), _jsx(Field.ErrorText, { children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-6", disabled: createPending || updatePending, children: "Continue" }), !isVerificationLocked && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", type: "button", onClick: () => {
122
+ } }), _jsx(Field.ErrorText, { children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-6", disabled: createPending || updatePending, children: "Continue" }), !(featureFlag.enabled && isVerificationLocked) && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", type: "button", onClick: () => {
121
123
  globalStore.kyc.setOpen(false);
122
124
  }, children: "Skip for now" }))] })] }));
123
125
  }
@@ -15,8 +15,10 @@ import { Indicator } from './Indicator.js';
15
15
  import { KYCDefaultContext } from './KYCDefaultContext.js';
16
16
  import { PersonalInformation } from './PersonalInformation.js';
17
17
  import { useKYCDefault } from './useKYCDefault.js';
18
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
18
19
  export function KYCDefault(props) {
19
- const globalStore = useGlobalStore(useShallow((ctx) => ({ kyc: ctx.kyc })));
20
+ const globalStore = useGlobalStore(useShallow((ctx) => ({ kyc: ctx.kyc, kycReminder: ctx.kycReminder })));
21
+ const featureFlag = useFeatureFlag();
20
22
  const kyc = useKYCDefault();
21
23
  const { data: account } = useAccountQuery();
22
24
  const { data: verification } = useMemberVerificationQuery();
@@ -40,7 +42,7 @@ export function KYCDefault(props) {
40
42
  kyc.setStep(steps);
41
43
  }
42
44
  }, [steps, kyc]);
43
- return (_jsxs(_Fragment, { children: [_jsx(KYCDefaultContext, { value: kyc, children: _jsx(Dialog.Root, { open: globalStore.kyc.open && hasMissingData, onOpenChange: (details) => {
45
+ return (_jsxs(_Fragment, { children: [_jsx(KYCDefaultContext, { value: kyc, children: _jsx(Dialog.Root, { open: featureFlag.enabled ? !globalStore.kycReminder.open && globalStore.kyc.open && hasMissingData : globalStore.kyc.open && hasMissingData, onOpenChange: (details) => {
44
46
  globalStore.kyc.setOpen(details.open);
45
- }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: kyc.reset, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsx(Dialog.Content, { className: "mx-auto min-h-full w-full overflow-y-auto bg-bg-primary-alt lg:min-h-auto lg:w-fit", children: _jsxs("div", { className: "flex h-dvh w-full flex-col overflow-y-auto p-3xl sm:h-fit sm:overflow-auto lg:w-[400px]", children: [!isVerificationLocked && (_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) })), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto mb-5 block h-7.5 w-auto", draggable: false }), _jsx(Indicator, {}), kyc.step === 1 && _jsx(BasicInformation, {}), kyc.step === 2 && _jsx(IdentityVerification, {}), kyc.step === 3 && _jsx(PersonalInformation, {})] }) }) })] }) }) }), _jsx(KYCReminder, { ...props })] }));
47
+ }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: kyc.reset, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsx(Dialog.Content, { className: "mx-auto min-h-full w-full overflow-y-auto bg-bg-primary-alt lg:min-h-auto lg:w-fit", children: _jsxs("div", { className: "flex h-dvh w-full flex-col overflow-y-auto p-3xl sm:h-fit sm:overflow-auto lg:w-[400px]", children: [!(featureFlag.enabled && isVerificationLocked) && (_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) })), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto mb-5 block h-7.5 w-auto", draggable: false }), _jsx(Indicator, {}), kyc.step === 1 && _jsx(BasicInformation, {}), kyc.step === 2 && _jsx(IdentityVerification, {}), kyc.step === 3 && _jsx(PersonalInformation, {})] }) }) })] }) }) }), _jsx(KYCReminder, { ...props })] }));
46
48
  }
@@ -17,6 +17,8 @@ import { Field } from '../../../ui/Field/index.js';
17
17
  import { getQueryClient } from '../../../utils/getQueryClient.js';
18
18
  import { getMemberVerificationQueryKey } from '../../../utils/queryKeys.js';
19
19
  import { useKYCDefaultContext } from './KYCDefaultContext.js';
20
+ import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
21
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
20
22
  const definition = z.object({
21
23
  address: z.string().trim().min(1, 'Current address is required'),
22
24
  permanentAddress: z.string().trim().min(1, 'Permanent address is required'),
@@ -27,11 +29,14 @@ const definition = z.object({
27
29
  });
28
30
  export function PersonalInformation() {
29
31
  const kyc = useKYCDefaultContext();
32
+ const featureFlag = useFeatureFlag();
30
33
  const globalStore = useGlobalStore(useShallow((ctx) => ({
31
34
  kyc: ctx.kyc,
32
35
  })));
33
36
  const memberVerificationQuery = useMemberVerificationQuery();
34
37
  const memberVerificationId = memberVerificationQuery.data?.id;
38
+ const { data: account, isLoading: accountLoading } = useAccountQuery();
39
+ const isVerificationLocked = account?.status === 'VERIFICATION_LOCKED';
35
40
  const approveMemberVerificationMutation = useApproveMemberVerification();
36
41
  const updateMemberVerificationMutation = useUpdateMemberVerificationMutation({
37
42
  onError(error) {
@@ -112,8 +117,8 @@ export function PersonalInformation() {
112
117
  });
113
118
  }
114
119
  }, disabled: !permanentAddress, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { children: "Use permanent address as current address" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.sourceOfIncome, children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, { placeholder: "Enter your source of income", ...form.register('sourceOfIncome') }), _jsx(Field.ErrorText, { children: form.formState.errors.sourceOfIncome?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.natureOfWork, children: [_jsx(Field.Label, { children: "Work Description" }), _jsx(Field.Input, { placeholder: "Enter your work description", ...form.register('natureOfWork') }), _jsx(Field.ErrorText, { children: form.formState.errors.natureOfWork?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.placeOfBirth, children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, { placeholder: "Enter your place of birth", ...form.register('placeOfBirth') }), _jsx(Field.ErrorText, { children: form.formState.errors.placeOfBirth?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.nationality, children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, { placeholder: "Enter your nationality", ...form.register('nationality') }), _jsx(Field.ErrorText, { children: form.formState.errors.nationality?.message })] }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: updateMemberVerificationMutation.isPending ||
115
- createMemberVerificationMutation.isPending, children: "Continue" }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", onClick: () => {
120
+ createMemberVerificationMutation.isPending, children: "Continue" }), !(featureFlag.enabled && isVerificationLocked) && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", onClick: () => {
116
121
  globalStore.kyc.setOpen(false);
117
122
  }, disabled: updateMemberVerificationMutation.isPending ||
118
- createMemberVerificationMutation.isPending, children: "Skip for now" })] })] }));
123
+ createMemberVerificationMutation.isPending, children: "Skip for now" }))] })] }));
119
124
  }
@@ -48,8 +48,7 @@ export function KYCReminder(props) {
48
48
  !verificationLoading &&
49
49
  globalStore.kycReminder.open &&
50
50
  session?.status === 'authenticated' &&
51
- hasMissingData ||
52
- isVerificationLocked, onOpenChange: (details) => {
51
+ hasMissingData, onOpenChange: (details) => {
53
52
  globalStore.kycReminder.setOpen(details.open);
54
53
  }, 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-alt lg:max-w-[400px]", children: isVerificationLocked && enabled ? (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-warning-secondary p-2 mb-4", 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 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: "flex w-full items-center justify-center gap-3xl mt-6", 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: () => {
55
54
  api.setOpen(false);