@opexa/portal-components 0.0.986 → 0.0.988

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 (72) hide show
  1. package/dist/client/hooks/useGlobalStore.d.ts +0 -1
  2. package/dist/client/hooks/useGlobalStore.js +0 -13
  3. package/dist/components/AccountInfo/AccountInfo.js +0 -2
  4. package/dist/components/KYC/KYCDefault/KYCDefault.d.ts +0 -1
  5. package/dist/components/KYC/KYCDefault/KYCDefault.js +2 -3
  6. package/dist/components/KYC/KYCDefault/PersonalInformation.js +0 -7
  7. package/dist/components/KYC/KYCDefault/useKYCDefault.d.ts +1 -2
  8. package/dist/components/KYC/KYCDefault/useKYCDefault.js +1 -2
  9. package/dist/components/KYC/KYCReview.js +2 -5
  10. package/dist/components/KYC/KycOpenOnHomeMount.js +61 -37
  11. package/dist/components/Messages/MessagesPopup.js +1 -3
  12. package/dist/components/SignUp/SignUp.d.ts +2 -1
  13. package/dist/components/SignUp/SignUp.js +7 -0
  14. package/dist/components/SignUp/SignUpKYC/SignUpKYCForm.js +22 -2
  15. package/dist/components/SignUp/SignUpLongForm/SignUpLongForm.d.ts +1 -0
  16. package/dist/components/SignUp/SignUpLongForm/SignUpLongForm.js +468 -0
  17. package/dist/components/SignUp/SignUpLongForm/SignUpLongForm.lazy.d.ts +18 -0
  18. package/dist/components/SignUp/SignUpLongForm/SignUpLongForm.lazy.js +26 -0
  19. package/dist/components/SignUp/SignUpLongForm/SignUpLongFormContext.d.ts +6 -0
  20. package/dist/components/SignUp/SignUpLongForm/SignUpLongFormContext.js +2 -0
  21. package/dist/schemas/forgotPasswordSchema.d.ts +5 -5
  22. package/dist/ui/AlertDialog/AlertDialog.d.ts +187 -187
  23. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +17 -17
  24. package/dist/ui/Badge/Badge.d.ts +12 -12
  25. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  26. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  27. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  28. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  29. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  30. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  31. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  32. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  33. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  34. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  35. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  36. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  37. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  38. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  39. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  40. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  41. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  42. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  43. package/dist/ui/Menu/Menu.d.ts +360 -360
  44. package/dist/ui/Menu/menu.recipe.d.ts +20 -20
  45. package/dist/ui/Popover/Popover.d.ts +154 -154
  46. package/dist/ui/Popover/popover.recipe.d.ts +14 -14
  47. package/dist/ui/Progress/Progress.d.ts +27 -27
  48. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  49. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  50. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  51. package/dist/ui/Select/Select.d.ts +45 -45
  52. package/dist/ui/Select/select.recipe.d.ts +3 -3
  53. package/dist/ui/Table/Table.d.ts +21 -21
  54. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  55. package/dist/ui/Table/table.recipe.d.ts +3 -3
  56. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  57. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  58. package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
  59. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  60. package/package.json +1 -1
  61. package/dist/client/hooks/useVerifyMobileNumber.d.ts +0 -3
  62. package/dist/client/hooks/useVerifyMobileNumber.js +0 -20
  63. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +0 -1
  64. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +0 -241
  65. package/dist/components/SingleSignOn/SingleSignOn.d.ts +0 -4
  66. package/dist/components/SingleSignOn/SingleSignOn.js +0 -185
  67. package/dist/components/SingleSignOn/index.d.ts +0 -1
  68. package/dist/components/SingleSignOn/index.js +0 -1
  69. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.d.ts +0 -1
  70. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.js +0 -152
  71. package/dist/lib/components/UpdateMobilePhoneNumber/index.d.ts +0 -1
  72. package/dist/lib/components/UpdateMobilePhoneNumber/index.js +0 -1
@@ -80,7 +80,6 @@ export interface GlobalStore {
80
80
  sidebar__mobile: PopupStore;
81
81
  kyc: PopupStore;
82
82
  kycReminder: PopupStore;
83
- kycReview: PopupStore;
84
83
  updateMobilePhoneNumber: PopupStore;
85
84
  spotBonus: PopupStore;
86
85
  registerBiometrics: PopupStore;
@@ -226,19 +226,6 @@ export const useGlobalStore = create()(devtools(subscribeWithSelector((set) => (
226
226
  },
227
227
  '~touched': false,
228
228
  },
229
- kycReview: {
230
- open: false,
231
- setOpen(open) {
232
- set((prev) => ({
233
- kycReview: {
234
- ...prev.kycReview,
235
- open,
236
- '~touched': true,
237
- },
238
- }));
239
- },
240
- '~touched': false,
241
- },
242
229
  updateMobilePhoneNumber: {
243
230
  open: false,
244
231
  setOpen(open) {
@@ -13,7 +13,6 @@ import { z } from 'zod';
13
13
  import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
14
14
  import { useDisclosure } from '../../client/hooks/useDisclosure.js';
15
15
  import { useFacebookClientQuery } from '../../client/hooks/useFacebookClientQuery.js';
16
- import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
17
16
  import { useGoogleClientIdQuery } from '../../client/hooks/useGoogleClientIdQuery.js';
18
17
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
19
18
  import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
@@ -95,7 +94,6 @@ function ProfileInfo({ avatar }) {
95
94
  function PersonalInfo(props) {
96
95
  const accountQuery = useAccountQuery();
97
96
  const account = accountQuery.data;
98
- const featureFlag = useFeatureFlag();
99
97
  const verificationQuery = useMemberVerificationQuery();
100
98
  const verification = verificationQuery.data;
101
99
  const updateAccountMutation = useUpdateAccountMutation({
@@ -4,6 +4,5 @@ export interface KYCDefaultProps extends KYCReminderProps {
4
4
  provider?: 'opexa';
5
5
  logo: ImageProps['src'];
6
6
  isSkippable?: boolean;
7
- hasKYCReviewPromo?: boolean;
8
7
  }
9
8
  export declare function KYCDefault(props: KYCDefaultProps): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,6 @@ import { useSessionQuery } from '../../../client/hooks/useSessionQuery.js';
6
6
  import { Dialog } from '../../../ui/Dialog/index.js';
7
7
  import { Portal } from '../../../ui/Portal/index.js';
8
8
  import { KYCReminder } from '../KYCReminder.js';
9
- import { KYCReview } from '../KYCReview.js';
10
9
  import { IdentityVerification } from './IdentityVerification.js';
11
10
  import { Indicator } from './Indicator.js';
12
11
  import { KYCDefaultContext } from './KYCDefaultContext.js';
@@ -21,7 +20,7 @@ export function KYCDefault(props) {
21
20
  updateMobilePhoneNumber: ctx.updateMobilePhoneNumber,
22
21
  termsOfUse: ctx.termsOfUse,
23
22
  })));
24
- const kyc = useKYCDefault(props?.isSkippable ?? false, props?.hasKYCReviewPromo ?? false);
23
+ const kyc = useKYCDefault(props?.isSkippable ?? false);
25
24
  const { isLoading: sessionLoading } = useSessionQuery();
26
25
  const isDialogOpen = globalStore.kyc.open &&
27
26
  !globalStore.kycReminder.open &&
@@ -31,5 +30,5 @@ export function KYCDefault(props) {
31
30
  !globalStore.termsOfUse.open;
32
31
  return (_jsxs(_Fragment, { children: [_jsx(KYCDefaultContext, { value: kyc, children: _jsx(Dialog.Root, { open: isDialogOpen, onOpenChange: (details) => {
33
32
  globalStore.kyc.setOpen(details.open);
34
- }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: kyc.reset, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "fixed top-[57px] overflow-hidden", children: _jsx(Dialog.Content, { className: "mx-auto h-full w-full overflow-y-auto bg-bg-primary-alt md:max-h-[95vh] lg:w-fit", children: _jsxs("div", { className: "mt-[calc(var(--safe-area-inset-top)*3)] flex h-dvh w-full flex-col overflow-y-auto p-3xl sm:h-fit lg:w-[400px]", children: [_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(IdentityVerification, {}), kyc.step === 2 && _jsx(PersonalInformation, {})] }) }) })] }) }) }), _jsx(KYCReminder, { ...props }), _jsx(KYCReview, {})] }));
33
+ }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: kyc.reset, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "fixed top-[57px] overflow-hidden", children: _jsx(Dialog.Content, { className: "mx-auto h-full w-full overflow-y-auto bg-bg-primary-alt md:max-h-[95vh] lg:w-fit", children: _jsxs("div", { className: "mt-[calc(var(--safe-area-inset-top)*3)] flex h-dvh w-full flex-col overflow-y-auto p-3xl sm:h-fit lg:w-[400px]", children: [_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(IdentityVerification, {}), kyc.step === 2 && _jsx(PersonalInformation, {})] }) }) })] }) }) }), _jsx(KYCReminder, { ...props })] }));
35
34
  }
@@ -37,7 +37,6 @@ export function PersonalInformation() {
37
37
  const globalStore = useGlobalStore(useShallow((ctx) => ({
38
38
  kyc: ctx.kyc,
39
39
  kycReminder: ctx.kycReminder,
40
- kycReview: ctx.kycReview,
41
40
  })));
42
41
  const memberVerificationQuery = useMemberVerificationQuery();
43
42
  const memberVerificationId = memberVerificationQuery.data?.id;
@@ -77,9 +76,6 @@ export function PersonalInformation() {
77
76
  });
78
77
  kyc.setDone(true);
79
78
  globalStore.kyc.setOpen(false);
80
- if (kyc.hasKYCReviewPromo) {
81
- globalStore.kycReview.setOpen(true);
82
- }
83
79
  toaster.success({
84
80
  title: 'Success',
85
81
  description: 'Personal information has been set successfully.',
@@ -95,9 +91,6 @@ export function PersonalInformation() {
95
91
  onSuccess() {
96
92
  kyc.setDone(true);
97
93
  globalStore.kyc.setOpen(false);
98
- if (kyc.hasKYCReviewPromo) {
99
- globalStore.kycReview.setOpen(true);
100
- }
101
94
  toaster.success({
102
95
  title: 'Success',
103
96
  description: 'Personal information has been set successfully.',
@@ -21,7 +21,6 @@ export interface UseKYCDefaultReturn {
21
21
  setSelfieImageId: (id: string | null) => void;
22
22
  reset: () => void;
23
23
  isSkippable: boolean;
24
- hasKYCReviewPromo: boolean;
25
24
  }
26
- export declare function useKYCDefault(isSkippable: boolean, hasKYCReviewPromo: boolean): UseKYCDefaultReturn;
25
+ export declare function useKYCDefault(isSkippable: boolean): UseKYCDefaultReturn;
27
26
  export {};
@@ -1,5 +1,5 @@
1
1
  import { useRef, useState } from 'react';
2
- export function useKYCDefault(isSkippable, hasKYCReviewPromo) {
2
+ export function useKYCDefault(isSkippable) {
3
3
  const [step, setStep] = useState(1);
4
4
  const [done, setDone] = useState(false);
5
5
  const [idFrontImageId, setFrontImageId] = useState(null);
@@ -35,6 +35,5 @@ export function useKYCDefault(isSkippable, hasKYCReviewPromo) {
35
35
  triggerEvent,
36
36
  reset,
37
37
  isSkippable,
38
- hasKYCReviewPromo,
39
38
  };
40
39
  }
@@ -3,7 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Image from 'next/image';
4
4
  import { useState } from 'react';
5
5
  import { useShallow } from 'zustand/shallow';
6
- import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
7
6
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
8
7
  import { getSession } from '../../client/services/getSession.js';
9
8
  import { toaster } from '../../client/utils/toaster.js';
@@ -16,9 +15,7 @@ import { Portal } from '../../ui/Portal/index.js';
16
15
  export function KYCReview() {
17
16
  const { kycReview } = useGlobalStore(useShallow((s) => ({ kycReview: s.kycReview })));
18
17
  const [isLoading, setIsLoading] = useState(false);
19
- const featureFlag = useFeatureFlag();
20
- const isDialogOpen = kycReview.open && featureFlag.enabled;
21
- return (_jsx(Dialog.Root, { open: isDialogOpen, 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 justify-between space-y-4 rounded-lg bg-[#232443] p-6 text-center", children: [_jsxs("div", { className: "flex flex-col items-center", children: [_jsx("div", { className: "mb-4 h-7 w-7 animate-spin rounded-full border-4 border-[#101730] border-t-[#F05027]" }), _jsx("div", { className: "font-semibold text-[#F5F5F6] text-lg", children: "Thanks for your submission." }), _jsxs("div", { className: "mt-1 text-[#CECFD2] text-sm", children: ["We\u2019re now ", '', _jsxs("span", { className: "text-[#F96B47]", children: ["reviewing your KYC information ", ''] }), "and will notify you once the verification is complete."] }), _jsx("div", { className: "mt-6 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]" })] })] }), _jsx("button", { disabled: isLoading, type: "button", className: "h-[44px] w-full rounded-md font-semibold", style: {
18
+ return (_jsx(Dialog.Root, { open: kycReview.open, 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 justify-between space-y-4 rounded-lg bg-[#232443] p-6 text-center", children: [_jsxs("div", { className: "flex flex-col items-center", children: [_jsx("div", { className: "mb-4 h-7 w-7 animate-spin rounded-full border-4 border-[#101730] border-t-[#F05027]" }), _jsx("div", { className: "font-semibold text-[#F5F5F6] text-lg", children: "Thanks for your submission." }), _jsxs("div", { className: "mt-1 text-[#CECFD2] text-sm", children: ["We\u2019re now ", '', _jsxs("span", { className: "text-[#F96B47]", children: ["reviewing your KYC information ", ''] }), "and will notify you once the verification is complete."] }), _jsx("div", { className: "mt-6 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]" })] })] }), _jsx("button", { disabled: isLoading, type: "button", className: "h-[44px] w-full rounded-md font-semibold", style: {
22
19
  background: 'linear-gradient(90deg, #9333E8 0%, #D92778 100%)',
23
20
  }, onClick: async () => {
24
21
  const session = await getSession();
@@ -32,7 +29,7 @@ export function KYCReview() {
32
29
  'Content-Type': 'application/json',
33
30
  },
34
31
  });
35
- const data = (await response.json());
32
+ const data = await response.json();
36
33
  window.open(data.data.redirectionUrl, '_blank');
37
34
  }
38
35
  catch {
@@ -1,13 +1,23 @@
1
1
  'use client';
2
+ import { useIsMutating } from '@tanstack/react-query';
2
3
  import { useEffect } from 'react';
3
4
  import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
4
5
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
5
6
  import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
7
+ import { getApproveMemberVerificationQueryKey, getCreateMemberVerificationQueryKey, } from '../../utils/mutationKeys.js';
6
8
  export function KycOpenOnHomeMount(props) {
7
9
  const setkycReminderOpen = useGlobalStore((s) => s.kycReminder.setOpen);
8
10
  const setkycOpen = useGlobalStore((s) => s.kyc.setOpen);
9
- const { data: verification, isLoading: verificationLoading } = useMemberVerificationQuery();
11
+ const isSignUpOpen = useGlobalStore((s) => s.signUp.open);
12
+ const { data: verification, isLoading: verificationLoading, isRefetching: verificationRefetching, } = useMemberVerificationQuery();
10
13
  const { data: account, isLoading: accountLoading } = useAccountQuery();
14
+ const isCreatingVerification = useIsMutating({
15
+ mutationKey: getCreateMemberVerificationQueryKey(),
16
+ });
17
+ const isApprovingVerification = useIsMutating({
18
+ mutationKey: getApproveMemberVerificationQueryKey(),
19
+ });
20
+ const isMutating = isCreatingVerification > 0 || isApprovingVerification > 0;
11
21
  const isVerificationLocked = account?.status === 'VERIFICATION_LOCKED';
12
22
  const isRejected = verification?.status === 'REJECTED';
13
23
  const isUnverified = verification === null ||
@@ -17,62 +27,76 @@ export function KycOpenOnHomeMount(props) {
17
27
  verification?.sumsubVerified ||
18
28
  verification?.status === 'APPROVED' ||
19
29
  verification?.status === 'VERIFIED'; //add default value on null return
30
+ const isPending = verification?.status === 'PENDING';
20
31
  useEffect(() => {
21
32
  // If bypass is enabled, do nothing.
22
33
  if (props.bypassKycCheck) {
23
34
  return;
24
35
  }
25
- if (!verificationLoading && !accountLoading) {
26
- const shouldShowReminder = Boolean(props.isSkippable);
27
- const hasSeenKycModal = sessionStorage.getItem('hasSeenKycModal');
28
- const isFirstVisit = !hasSeenKycModal;
29
- // 1. If KYC is completed, early return
30
- if (isKycCompleted) {
31
- setkycReminderOpen(false);
32
- setkycOpen(false);
33
- sessionStorage.removeItem('hasSeenKycModal');
34
- return;
35
- }
36
- // 2. Handle member verification locked
37
- if (isVerificationLocked) {
38
- setkycReminderOpen(true);
39
- setkycOpen(false);
40
- return;
41
- }
42
- // Handle rejected verification status
43
- else if (isRejected) {
44
- if (isFirstVisit) {
36
+ const timeoutId = setTimeout(() => {
37
+ if (!verificationLoading &&
38
+ !accountLoading &&
39
+ !verificationRefetching &&
40
+ !isMutating &&
41
+ !isSignUpOpen) {
42
+ const shouldShowReminder = Boolean(props.isSkippable);
43
+ const hasSeenKycModal = sessionStorage.getItem('hasSeenKycModal');
44
+ const isFirstVisit = !hasSeenKycModal;
45
+ // 1. If KYC is completed or pending, close both
46
+ if (isKycCompleted || isPending) {
45
47
  setkycReminderOpen(false);
46
- setkycOpen(true);
47
- sessionStorage.setItem('hasSeenKycModal', 'true');
48
+ setkycOpen(false);
49
+ if (isKycCompleted) {
50
+ sessionStorage.removeItem('hasSeenKycModal');
51
+ }
52
+ return;
48
53
  }
49
- else {
50
- setkycReminderOpen(shouldShowReminder);
51
- setkycOpen(!shouldShowReminder);
54
+ // 2. Handle member verification locked
55
+ if (isVerificationLocked) {
56
+ setkycReminderOpen(true);
57
+ setkycOpen(false);
58
+ return;
52
59
  }
53
- }
54
- // Handle unverified verification status
55
- else if (isUnverified) {
56
- if (isFirstVisit) {
57
- setkycReminderOpen(false);
58
- setkycOpen(true);
59
- sessionStorage.setItem('hasSeenKycModal', 'true');
60
+ // Handle rejected verification status
61
+ else if (isRejected) {
62
+ if (isFirstVisit) {
63
+ setkycReminderOpen(false);
64
+ setkycOpen(true);
65
+ sessionStorage.setItem('hasSeenKycModal', 'true');
66
+ }
67
+ else {
68
+ setkycReminderOpen(shouldShowReminder);
69
+ setkycOpen(!shouldShowReminder);
70
+ }
60
71
  }
61
- else {
62
- setkycReminderOpen(shouldShowReminder);
63
- setkycOpen(!shouldShowReminder);
72
+ // Handle unverified verification status
73
+ else if (isUnverified) {
74
+ if (isFirstVisit) {
75
+ setkycReminderOpen(false);
76
+ setkycOpen(true);
77
+ sessionStorage.setItem('hasSeenKycModal', 'true');
78
+ }
79
+ else {
80
+ setkycReminderOpen(shouldShowReminder);
81
+ setkycOpen(!shouldShowReminder);
82
+ }
64
83
  }
65
84
  }
66
- }
85
+ }, 1000);
86
+ return () => clearTimeout(timeoutId);
67
87
  }, [
68
88
  setkycReminderOpen,
69
89
  setkycOpen,
70
90
  verificationLoading,
71
91
  accountLoading,
92
+ verificationRefetching,
93
+ isMutating,
94
+ isSignUpOpen,
72
95
  isVerificationLocked,
73
96
  isRejected,
74
97
  isUnverified,
75
98
  isKycCompleted,
99
+ isPending,
76
100
  props.isSkippable,
77
101
  props.bypassKycCheck,
78
102
  ]);
@@ -34,7 +34,6 @@ export function MessagesPopup() {
34
34
  gameLaunch: ctx.gameLaunch,
35
35
  depositWithdrawal: ctx.depositWithdrawal,
36
36
  kycReminder: ctx.kycReminder,
37
- kycReview: ctx.kycReview,
38
37
  responsibleGamingReminder: ctx.responsibleGamingReminder,
39
38
  signIn: ctx.signIn,
40
39
  signUp: ctx.signUp,
@@ -84,7 +83,6 @@ export function MessagesPopup() {
84
83
  !globalStore.account__mobile.open &&
85
84
  !globalStore.kyc.open &&
86
85
  !globalStore.kycReminder.open &&
87
- !globalStore.kycReview.open &&
88
86
  !globalStore.responsibleGamingReminder.open,
89
87
  refetchInterval: disclosure.open ? undefined : 1000 * 10,
90
88
  });
@@ -124,7 +122,7 @@ export function MessagesPopup() {
124
122
  };
125
123
  const sessionQuery = useSessionQuery();
126
124
  const session = sessionQuery.data;
127
- const isKycClosed = !globalStore.kyc.open && !globalStore.kycReminder.open && !globalStore.kycReview.open;
125
+ const isKycClosed = !globalStore.kyc.open && !globalStore.kycReminder.open;
128
126
  const isResponsibleGamingReminderClosed = !globalStore.responsibleGamingReminder.open;
129
127
  useEffect(() => {
130
128
  if (globalStore.gameLaunch.details.status === 'PLAYING')
@@ -2,6 +2,7 @@ import type { SignUpCrazyWinProps } from './SignUpCrazyWin/SignUpCrazyWin.lazy';
2
2
  import type { SignUpDefaultProps } from './SignUpDefault/SignUpDefault.lazy';
3
3
  import type { SignUpHappyBingoProps } from './SignUpHappyBingo/SignUpHappyBingo.lazy';
4
4
  import type { SignUpKYCProps } from './SignUpKYC/SignUpKYC.lazy';
5
+ import type { SignUpLongFormProps } from './SignUpLongForm/SignUpLongForm.lazy';
5
6
  import type { SignUpNameAndPasswordProps } from './SignUpNameAndPassword/SignUpNameAndPassword.lazy';
6
- export type SignUpProps = SignUpDefaultProps | SignUpKYCProps | SignUpNameAndPasswordProps | SignUpCrazyWinProps | SignUpHappyBingoProps;
7
+ export type SignUpProps = SignUpDefaultProps | SignUpKYCProps | SignUpNameAndPasswordProps | SignUpCrazyWinProps | SignUpHappyBingoProps | SignUpLongFormProps;
7
8
  export declare function SignUp(props: SignUpProps): import("react/jsx-runtime").JSX.Element | null;
@@ -23,6 +23,10 @@ const SignUpHappyBingo = dynamic(() => import('./SignUpHappyBingo/SignUpHappyBin
23
23
  ssr: false,
24
24
  loading: () => null,
25
25
  });
26
+ const SignUpLongForm = dynamic(() => import('./SignUpLongForm/SignUpLongForm.lazy.js').then((m) => m.default), {
27
+ ssr: false,
28
+ loading: () => null,
29
+ });
26
30
  export function SignUp(props) {
27
31
  const touched = useGlobalStore(useShallow((ctx) => ctx.signUp['~touched']));
28
32
  if (!touched) {
@@ -40,6 +44,9 @@ export function SignUp(props) {
40
44
  else if (props.layout === 'happybingo') {
41
45
  return _jsx(SignUpHappyBingo, { ...props });
42
46
  }
47
+ else if (props.layout === 'long-form') {
48
+ return _jsx(SignUpLongForm, { ...props });
49
+ }
43
50
  else {
44
51
  return _jsx(SignUpDefault, { ...props });
45
52
  }
@@ -25,6 +25,7 @@ import { useSignUpMutation } from '../../../client/hooks/useSignUpMutation.js';
25
25
  import { useUpdateAccountMutation } from '../../../client/hooks/useUpdateAccountMutation.js';
26
26
  import { useUpdateMemberVerificationMutation } from '../../../client/hooks/useUpdateMemberVerificationMutation.js';
27
27
  import { useUploadImageFileMutation } from '../../../client/hooks/useUploadImageFileMutation.js';
28
+ import { getSession } from '../../../client/services/getSession.js';
28
29
  import { toaster } from '../../../client/utils/toaster.js';
29
30
  import { ArrowLeftIcon } from '../../../icons/ArrowLeftIcon.js';
30
31
  import { CalendarIcon } from '../../../icons/CalendarIcon.js';
@@ -36,6 +37,7 @@ import { EyeIcon } from '../../../icons/EyeIcon.js';
36
37
  import { EyeOffIcon } from '../../../icons/EyeOffIcon.js';
37
38
  import pagcorLogo from '../../../images/pagcor-round-icon.png';
38
39
  import responsibleGamingLogo from '../../../images/responsible-gaming-gold.png';
40
+ import { getFile } from '../../../services/file.js';
39
41
  import { ObjectType } from '../../../services/ObjectType.js';
40
42
  import { Button } from '../../../ui/Button/index.js';
41
43
  import { Checkbox } from '../../../ui/Checkbox/index.js';
@@ -387,12 +389,30 @@ export function SignUpKYCForm() {
387
389
  }
388
390
  const selfieImageId = await uploadImage(selfieFile);
389
391
  const frontImageId = await uploadImage(frontFile);
392
+ const session = await getSession();
393
+ const pollImageStatus = (id) => createPoll(async () => {
394
+ const file = await getFile(id, {
395
+ headers: {
396
+ Authorization: `Bearer ${session.token}`,
397
+ },
398
+ });
399
+ return file?.status === 'READY';
400
+ }, {
401
+ until: (ok) => ok,
402
+ interval: 500,
403
+ maxAttempt: 10,
404
+ })();
405
+ const [selfieReady, frontReady] = await Promise.all([
406
+ pollImageStatus(selfieImageId),
407
+ pollImageStatus(frontImageId),
408
+ ]);
409
+ if (!selfieReady || !frontReady) {
410
+ throw new Error('Images were not processed in time');
411
+ }
390
412
  const data = {
391
413
  selfieImage: selfieImageId,
392
414
  idFrontImage: frontImageId,
393
415
  };
394
- const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
395
- await delay(2000);
396
416
  if (!memberId) {
397
417
  await createMemberVerification({
398
418
  ...data,
@@ -0,0 +1 @@
1
+ export default function SignUpLongForm(): import("react/jsx-runtime").JSX.Element;