@opexa/portal-components 0.0.983 → 0.0.984

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 (56) hide show
  1. package/dist/client/hooks/useSignOutMutation.js +1 -0
  2. package/dist/components/KYC/KYCDefault/KYCDefault.js +3 -1
  3. package/dist/components/KYC/KYCReminder.lazy.js +11 -4
  4. package/dist/components/KYC/KycOpenOnHomeMount.js +14 -20
  5. package/dist/schemas/forgotPasswordSchema.d.ts +5 -5
  6. package/dist/ui/AlertDialog/AlertDialog.d.ts +187 -187
  7. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +17 -17
  8. package/dist/ui/Badge/Badge.d.ts +12 -12
  9. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  10. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  11. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  12. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  13. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  14. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  15. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  16. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  17. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  18. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  19. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  20. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  21. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  22. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  23. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  24. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  25. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  26. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  27. package/dist/ui/Menu/Menu.d.ts +360 -360
  28. package/dist/ui/Menu/menu.recipe.d.ts +20 -20
  29. package/dist/ui/Popover/Popover.d.ts +154 -154
  30. package/dist/ui/Popover/popover.recipe.d.ts +14 -14
  31. package/dist/ui/Progress/Progress.d.ts +27 -27
  32. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  33. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  34. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  35. package/dist/ui/Select/Select.d.ts +45 -45
  36. package/dist/ui/Select/select.recipe.d.ts +3 -3
  37. package/dist/ui/Table/Table.d.ts +21 -21
  38. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  39. package/dist/ui/Table/table.recipe.d.ts +3 -3
  40. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  41. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  42. package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
  43. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  44. package/package.json +1 -1
  45. package/dist/client/hooks/useVerifyMobileNumber.d.ts +0 -3
  46. package/dist/client/hooks/useVerifyMobileNumber.js +0 -20
  47. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +0 -1
  48. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +0 -241
  49. package/dist/components/SingleSignOn/SingleSignOn.d.ts +0 -4
  50. package/dist/components/SingleSignOn/SingleSignOn.js +0 -185
  51. package/dist/components/SingleSignOn/index.d.ts +0 -1
  52. package/dist/components/SingleSignOn/index.js +0 -1
  53. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.d.ts +0 -1
  54. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.js +0 -152
  55. package/dist/lib/components/UpdateMobilePhoneNumber/index.d.ts +0 -1
  56. package/dist/lib/components/UpdateMobilePhoneNumber/index.js +0 -1
@@ -14,6 +14,7 @@ export const useSignOutMutation = (config) => {
14
14
  await queryClient.invalidateQueries({ queryKey: getSessionQueryKey() });
15
15
  queryClient.removeQueries();
16
16
  localStorage.removeItem(IDLE_TIMESTAMP_KEY);
17
+ sessionStorage.removeItem('hasSeenKycModal');
17
18
  },
18
19
  });
19
20
  };
@@ -19,6 +19,7 @@ export function KYCDefault(props) {
19
19
  kycReminder: ctx.kycReminder,
20
20
  responsibleGamingReminder: ctx.responsibleGamingReminder,
21
21
  updateMobilePhoneNumber: ctx.updateMobilePhoneNumber,
22
+ termsOfUse: ctx.termsOfUse,
22
23
  })));
23
24
  const kyc = useKYCDefault(props?.isSkippable ?? false, props?.hasKYCReviewPromo ?? false);
24
25
  const { isLoading: sessionLoading } = useSessionQuery();
@@ -26,7 +27,8 @@ export function KYCDefault(props) {
26
27
  !globalStore.kycReminder.open &&
27
28
  !sessionLoading &&
28
29
  !globalStore.disclaimer.open &&
29
- !globalStore.updateMobilePhoneNumber.open;
30
+ !globalStore.updateMobilePhoneNumber.open &&
31
+ !globalStore.termsOfUse.open;
30
32
  return (_jsxs(_Fragment, { children: [_jsx(KYCDefaultContext, { value: kyc, children: _jsx(Dialog.Root, { open: isDialogOpen, onOpenChange: (details) => {
31
33
  globalStore.kyc.setOpen(details.open);
32
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, {})] }));
@@ -30,6 +30,8 @@ export function KYCReminder(props) {
30
30
  account: ctx.account,
31
31
  account__mobile: ctx.account__mobile,
32
32
  responsibleGamingReminder: ctx.responsibleGamingReminder,
33
+ disclaimer: ctx.disclaimer,
34
+ termsOfUse: ctx.termsOfUse,
33
35
  })));
34
36
  const signOutMutation = useSignOutMutation({
35
37
  async onSuccess() {
@@ -63,7 +65,7 @@ export function KYCReminder(props) {
63
65
  const isAccountReady = !accountLoading;
64
66
  const isSessionReady = !sessionLoading && session?.status === 'authenticated';
65
67
  const isKYCReminderOpen = globalStore.kycReminder.open && !globalStore.kyc.open;
66
- const isResponsibleGamingReminderClosed = !globalStore.responsibleGamingReminder.open;
68
+ const isDisclaimerClosed = !globalStore.disclaimer.open && !globalStore.termsOfUse.open;
67
69
  const isKYCStateRelevant = isNotVerified ||
68
70
  (isPending && isVerificationLocked) ||
69
71
  (isNotVerified && isVerificationLocked);
@@ -71,9 +73,11 @@ export function KYCReminder(props) {
71
73
  isAccountReady &&
72
74
  isKYCReminderOpen &&
73
75
  isKYCStateRelevant &&
74
- isResponsibleGamingReminderClosed, onOpenChange: (details) => {
76
+ isDisclaimerClosed, onOpenChange: (details) => {
77
+ if (!details.open && isVerificationLocked)
78
+ return;
75
79
  globalStore.kycReminder.setOpen(details.open);
76
- }, 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: _jsxs(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: [!isPending && isNotVerified && isVerificationLocked && (_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 ${props.descriptionBgColor}`, 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: props.pagcorLogo?.logo ?? pagcorLogo, alt: "PAGCOR logo", height: 88, width: 88, className: `h-[88px] w-auto shrink-0 ${props.pagcorLogo?.styles ?? ''}`, draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo?.logo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: `h-[50px] w-auto shrink-0 ${props.responsibleGamingLogo?.styles ?? ''}`, draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-6 space-y-lg", children: [_jsx(Button, { onClick: () => {
80
+ }, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-[999]" }), _jsx(Dialog.Positioner, { className: "z-[999] flex items-center justify-center", children: _jsxs(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: [!isPending && isNotVerified && isVerificationLocked && (_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 ${props.descriptionBgColor}`, 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: props.pagcorLogo?.logo ?? pagcorLogo, alt: "PAGCOR logo", height: 88, width: 88, className: `h-[88px] w-auto shrink-0 ${props.pagcorLogo?.styles ?? ''}`, draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo?.logo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: `h-[50px] w-auto shrink-0 ${props.responsibleGamingLogo?.styles ?? ''}`, draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-6 space-y-lg", children: [_jsx(Button, { onClick: () => {
77
81
  api.setOpen(false);
78
82
  globalStore.kyc.setOpen(true);
79
83
  }, children: "Complete KYC" }), ' ', _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: async () => {
@@ -126,7 +130,10 @@ export function KYCReminder(props) {
126
130
  !(daysFromCreationToNow <= 3 && daysFromCreationToNow > 1) && (_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-primary 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 ${props.descriptionBgColor}`, 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: () => {
127
131
  api.setOpen(false);
128
132
  globalStore.kyc.setOpen(true);
129
- }, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => api.setOpen(false), children: "Do it later" })] })) })] })] })), isPending && isVerificationLocked && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary 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: "VERIFICATION IN PROGRESS" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account is verification-locked. Please wait for approval to regain full access to this platform." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo?.logo ?? pagcorLogo, alt: "PAGCOR logo", height: 88, width: 88, className: `h-[88px] w-auto shrink-0 ${props.pagcorLogo?.styles ?? ''}`, draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo?.logo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: `h-[50px] w-auto shrink-0 ${props.responsibleGamingLogo?.styles ?? ''}`, draggable: false, unoptimized: true })] }), _jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: async () => {
133
+ }, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => {
134
+ api.setOpen(false);
135
+ globalStore.responsibleGamingReminder.setOpen(true);
136
+ }, children: "Do it later" })] })) })] })] })), isPending && isVerificationLocked && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary 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: "VERIFICATION IN PROGRESS" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account is verification-locked. Please wait for approval to regain full access to this platform." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo?.logo ?? pagcorLogo, alt: "PAGCOR logo", height: 88, width: 88, className: `h-[88px] w-auto shrink-0 ${props.pagcorLogo?.styles ?? ''}`, draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo?.logo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: `h-[50px] w-auto shrink-0 ${props.responsibleGamingLogo?.styles ?? ''}`, draggable: false, unoptimized: true })] }), _jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: async () => {
130
137
  if (Capacitor.isNativePlatform()) {
131
138
  const session = await getQueryClient().fetchQuery({
132
139
  queryKey: getSessionQueryKey(),
@@ -16,7 +16,6 @@ export function KycOpenOnHomeMount(props) {
16
16
  const isKycCompleted = account?.verified ||
17
17
  verification?.sumsubVerified ||
18
18
  verification?.status === 'APPROVED' ||
19
- verification?.status === 'PENDING' ||
20
19
  verification?.status === 'VERIFIED'; //add default value on null return
21
20
  useEffect(() => {
22
21
  // If bypass is enabled, do nothing.
@@ -27,9 +26,21 @@ export function KycOpenOnHomeMount(props) {
27
26
  const shouldShowReminder = Boolean(props.isSkippable);
28
27
  const hasSeenKycModal = sessionStorage.getItem('hasSeenKycModal');
29
28
  const isFirstVisit = !hasSeenKycModal;
30
- // Handle member verification locked FIRST (highest priority)
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
+ }
31
42
  // Handle rejected verification status
32
- if (isRejected) {
43
+ else if (isRejected) {
33
44
  if (isFirstVisit) {
34
45
  setkycReminderOpen(false);
35
46
  setkycOpen(true);
@@ -52,23 +63,6 @@ export function KycOpenOnHomeMount(props) {
52
63
  setkycOpen(!shouldShowReminder);
53
64
  }
54
65
  }
55
- else if (isVerificationLocked) {
56
- if (isFirstVisit) {
57
- setkycReminderOpen(true);
58
- setkycOpen(false);
59
- }
60
- else {
61
- sessionStorage.setItem('hasSeenKycModal', 'true');
62
- setkycReminderOpen(!shouldShowReminder);
63
- setkycOpen(shouldShowReminder);
64
- }
65
- }
66
- // Handle completed kyc progress
67
- else if (isKycCompleted) {
68
- setkycReminderOpen(false);
69
- setkycOpen(false);
70
- sessionStorage.removeItem('hasSeenKycModal');
71
- }
72
66
  }
73
67
  }, [
74
68
  setkycReminderOpen,
@@ -8,25 +8,25 @@ export declare const createForgotPasswordSchema: (mobileNumberParser: MobileNumb
8
8
  mobileNumber: z.ZodEffects<z.ZodString, string, string>;
9
9
  verificationCode: z.ZodEffects<z.ZodString, string, string>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- password: string;
12
- confirmPassword: string;
13
11
  mobileNumber: string;
14
12
  verificationCode: string;
15
- }, {
16
13
  password: string;
17
14
  confirmPassword: string;
15
+ }, {
18
16
  mobileNumber: string;
19
17
  verificationCode: string;
20
- }>, {
21
18
  password: string;
22
19
  confirmPassword: string;
20
+ }>, {
23
21
  mobileNumber: string;
24
22
  verificationCode: string;
25
- }, {
26
23
  password: string;
27
24
  confirmPassword: string;
25
+ }, {
28
26
  mobileNumber: string;
29
27
  verificationCode: string;
28
+ password: string;
29
+ confirmPassword: string;
30
30
  }>;
31
31
  export type ForgotPasswordSchema = z.infer<ReturnType<typeof createForgotPasswordSchema>>;
32
32
  export {};