@opexa/portal-components 0.0.1021 → 0.0.1022
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.
- package/dist/client/hooks/useSignOutMutation.js +2 -0
- package/dist/components/Disclaimer/DisclaimerV2.js +2 -0
- package/dist/components/Disclaimer/DisclaimerV3.js +2 -0
- package/dist/components/TermsOfUse/TermsOfUse.js +9 -2
- package/dist/components/TermsOfUse/TermsOfUse.lazy.js +2 -0
- package/dist/components/TermsOfUse/TermsOfUseV2.lazy.js +2 -0
- package/dist/components/TermsOfUse/TermsOfUseV3.lazy.js +2 -0
- package/dist/constants/StorageKey.d.ts +1 -0
- package/dist/constants/StorageKey.js +1 -0
- package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
- package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
- package/dist/ui/Carousel/Carousel.d.ts +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +90 -90
- package/dist/ui/Menu/menu.recipe.d.ts +5 -5
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { TERMS_OF_USE_PENDING_STORAGE_KEY } from '../../constants/index.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { getSignOutMutationKey } from '../../utils/mutationKeys.js';
|
|
4
5
|
import { getSessionQueryKey } from '../../utils/queryKeys.js';
|
|
@@ -18,6 +19,7 @@ export const useSignOutMutation = (config) => {
|
|
|
18
19
|
queryClient.removeQueries();
|
|
19
20
|
localStorage.removeItem(IDLE_TIMESTAMP_KEY);
|
|
20
21
|
sessionStorage.removeItem('hasSeenKycModal');
|
|
22
|
+
sessionStorage.removeItem(TERMS_OF_USE_PENDING_STORAGE_KEY);
|
|
21
23
|
},
|
|
22
24
|
});
|
|
23
25
|
};
|
|
@@ -11,6 +11,7 @@ import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
|
11
11
|
import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
|
|
12
12
|
import { getSession } from '../../client/services/getSession.js';
|
|
13
13
|
import { BIOMETRIC_STORAGE_KEY } from '../../client/utils/biometric.js';
|
|
14
|
+
import { TERMS_OF_USE_PENDING_STORAGE_KEY } from '../../constants/index.js';
|
|
14
15
|
import { AlertCircleIcon } from '../../icons/AlertCircleIcon.js';
|
|
15
16
|
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
16
17
|
import pagcorLogo from '../../images/pagcor2.png';
|
|
@@ -112,6 +113,7 @@ export function DisclaimerV2(props) {
|
|
|
112
113
|
globalStore.responsibleGaming.setAccepted(false);
|
|
113
114
|
disclaimer.close();
|
|
114
115
|
if (isAuthenticated) {
|
|
116
|
+
sessionStorage.setItem(TERMS_OF_USE_PENDING_STORAGE_KEY, 'true');
|
|
115
117
|
globalStore.termsOfUse.setOpen(true);
|
|
116
118
|
return;
|
|
117
119
|
}
|
|
@@ -9,6 +9,7 @@ import { useShallow } from 'zustand/shallow';
|
|
|
9
9
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
10
10
|
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
11
11
|
import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
|
|
12
|
+
import { TERMS_OF_USE_PENDING_STORAGE_KEY } from '../../constants/index.js';
|
|
12
13
|
import { AlertCircleIcon } from '../../icons/AlertCircleIcon.js';
|
|
13
14
|
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
14
15
|
import pagcorLogo from '../../images/pagcor2.png';
|
|
@@ -84,6 +85,7 @@ export function DisclaimerV3(props) {
|
|
|
84
85
|
globalStore.responsibleGaming.setAccepted(false);
|
|
85
86
|
disclaimer.close();
|
|
86
87
|
if (isAuthenticated) {
|
|
88
|
+
sessionStorage.setItem(TERMS_OF_USE_PENDING_STORAGE_KEY, 'true');
|
|
87
89
|
globalStore.termsOfUse.setOpen(true);
|
|
88
90
|
return;
|
|
89
91
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import dynamic from 'next/dynamic';
|
|
4
|
-
import {
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
5
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
|
+
import { TERMS_OF_USE_PENDING_STORAGE_KEY } from '../../constants/index.js';
|
|
6
7
|
const V1 = dynamic(() => import('./TermsOfUse.lazy.js').then((m) => m.TermsOfUse), {
|
|
7
8
|
ssr: false,
|
|
8
9
|
loading: () => null,
|
|
@@ -16,7 +17,13 @@ const V3 = dynamic(() => import('./TermsOfUseV3.lazy.js').then((m) => m.TermsOfU
|
|
|
16
17
|
loading: () => null,
|
|
17
18
|
});
|
|
18
19
|
export function TermsOfUse({ version = '1', ...props }) {
|
|
19
|
-
const
|
|
20
|
+
const termsOfUse = useGlobalStore((ctx) => ctx.termsOfUse);
|
|
21
|
+
const touched = termsOfUse['~touched'];
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (sessionStorage.getItem(TERMS_OF_USE_PENDING_STORAGE_KEY) === 'true') {
|
|
24
|
+
termsOfUse.setOpen(true);
|
|
25
|
+
}
|
|
26
|
+
}, [termsOfUse.setOpen]);
|
|
20
27
|
if (!touched) {
|
|
21
28
|
return null;
|
|
22
29
|
}
|
|
@@ -3,6 +3,7 @@ import Image, {} from 'next/image';
|
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import { useShallow } from 'zustand/shallow';
|
|
5
5
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
|
+
import { TERMS_OF_USE_PENDING_STORAGE_KEY } from '../../constants/index.js';
|
|
6
7
|
import pagcorLogo from '../../images/pagcor.png';
|
|
7
8
|
import responsibleGamingLogo from '../../images/responsible-gaming.png';
|
|
8
9
|
import { Button } from '../../ui/Button/index.js';
|
|
@@ -21,6 +22,7 @@ export function TermsOfUse({ logo, siteName, content, ...props }) {
|
|
|
21
22
|
if (!details.open) {
|
|
22
23
|
globalStore.termsOfUse.setAccepted(true);
|
|
23
24
|
globalStore.responsibleGaming.setAccepted(true);
|
|
25
|
+
sessionStorage.removeItem(TERMS_OF_USE_PENDING_STORAGE_KEY);
|
|
24
26
|
}
|
|
25
27
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
26
28
|
if (globalStore.termsOfUse.next === 'SIGN_IN') {
|
|
@@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import { useShallow } from 'zustand/shallow';
|
|
6
6
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
7
|
+
import { TERMS_OF_USE_PENDING_STORAGE_KEY } from '../../constants/index.js';
|
|
7
8
|
import { ScrollToBottomIcon } from '../../icons/ScrollToBottomIcon.js';
|
|
8
9
|
import { ScrollToTopIcon } from '../../icons/ScrollToTopIcon.js';
|
|
9
10
|
import { Button } from '../../ui/Button/index.js';
|
|
@@ -41,6 +42,7 @@ export function TermsOfUseV2({ logo, content }) {
|
|
|
41
42
|
if (!details.open) {
|
|
42
43
|
globalStore.termsOfUse.setAccepted(true);
|
|
43
44
|
globalStore.responsibleGaming.setAccepted(true);
|
|
45
|
+
sessionStorage.removeItem(TERMS_OF_USE_PENDING_STORAGE_KEY);
|
|
44
46
|
}
|
|
45
47
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
46
48
|
if (globalStore.termsOfUse.next === 'SIGN_IN') {
|
|
@@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import { useShallow } from 'zustand/shallow';
|
|
6
6
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
7
|
+
import { TERMS_OF_USE_PENDING_STORAGE_KEY } from '../../constants/index.js';
|
|
7
8
|
import { ScrollToBottomIcon } from '../../icons/ScrollToBottomIcon.js';
|
|
8
9
|
import { ScrollToTopIcon } from '../../icons/ScrollToTopIcon.js';
|
|
9
10
|
import decorativebackground from '../../images/decorative-patern.png';
|
|
@@ -41,6 +42,7 @@ export function TermsOfUseV3({ logo, content }) {
|
|
|
41
42
|
if (!details.open) {
|
|
42
43
|
globalStore.termsOfUse.setAccepted(true);
|
|
43
44
|
globalStore.responsibleGaming.setAccepted(true);
|
|
45
|
+
sessionStorage.removeItem(TERMS_OF_USE_PENDING_STORAGE_KEY);
|
|
44
46
|
}
|
|
45
47
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
46
48
|
if (globalStore.termsOfUse.next === 'SIGN_IN') {
|
|
@@ -4,3 +4,4 @@ export const DOMAIN_COOKIE_NAME = 'WebPortalDomain';
|
|
|
4
4
|
export const BTAG_COOKIE_NAME = 'WebPortalBtag';
|
|
5
5
|
export const FEATURE_FLAG_LOCAL_STORAGE_KEY = 'WebPortalFeatureFlag';
|
|
6
6
|
export const CXD_STORAGE_KEY = 'WebPortalCellxpertCxd';
|
|
7
|
+
export const TERMS_OF_USE_PENDING_STORAGE_KEY = 'TermsOfUsePending';
|
|
@@ -8,23 +8,23 @@ 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
|
-
verificationCode: string;
|
|
12
11
|
password: string;
|
|
12
|
+
verificationCode: string;
|
|
13
13
|
mobileNumber: string;
|
|
14
14
|
confirmPassword: string;
|
|
15
15
|
}, {
|
|
16
|
-
verificationCode: string;
|
|
17
16
|
password: string;
|
|
17
|
+
verificationCode: string;
|
|
18
18
|
mobileNumber: string;
|
|
19
19
|
confirmPassword: string;
|
|
20
20
|
}>, {
|
|
21
|
-
verificationCode: string;
|
|
22
21
|
password: string;
|
|
22
|
+
verificationCode: string;
|
|
23
23
|
mobileNumber: string;
|
|
24
24
|
confirmPassword: string;
|
|
25
25
|
}, {
|
|
26
|
-
verificationCode: string;
|
|
27
26
|
password: string;
|
|
27
|
+
verificationCode: string;
|
|
28
28
|
mobileNumber: string;
|
|
29
29
|
confirmPassword: string;
|
|
30
30
|
}>;
|