@opexa/portal-components 0.0.822 → 0.0.823
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/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/Disclaimer/DisclaimerV3.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- 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/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +198 -198
- package/dist/ui/Menu/menu.recipe.d.ts +11 -11
- package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
- package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/PinInput/PinInput.d.ts +12 -12
- package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
- package/dist/ui/Popover/Popover.d.ts +121 -121
- package/dist/ui/Popover/popover.recipe.d.ts +11 -11
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/QrCode/QrCode.d.ts +40 -40
- package/dist/ui/QrCode/qrCode.recipe.d.ts +8 -8
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.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/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
- package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
- package/package.json +1 -1
- package/dist/components/AccountInfo/GoogleDisconnect.d.ts +0 -7
- package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .js +0 -191
- package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
- package/dist/components/DigitainLauncher/Loading.js +0 -5
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
- package/dist/components/KYC/BasicInformation.d.ts +0 -1
- package/dist/components/KYC/BasicInformation.js +0 -101
- package/dist/components/KYC/IdentityVerification.d.ts +0 -1
- package/dist/components/KYC/IdentityVerification.js +0 -120
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -8
- package/dist/components/KYC/KYC.lazy.d.ts +0 -6
- package/dist/components/KYC/KYC.lazy.js +0 -45
- package/dist/components/KYC/KYCContext.d.ts +0 -6
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/KYCDefault/BasicInformation.d.ts +0 -1
- package/dist/components/KYC/KYCDefault/BasicInformation.js +0 -101
- package/dist/components/KYC/KYCVerificationStatus.d.ts +0 -1
- package/dist/components/KYC/KYCVerificationStatus.js +0 -10
- package/dist/components/KYC/KYCVerificationStatus.lazy.d.ts +0 -1
- package/dist/components/KYC/KYCVerificationStatus.lazy.js +0 -33
- package/dist/components/KYC/PersonalInformation.d.ts +0 -1
- package/dist/components/KYC/PersonalInformation.js +0 -122
- package/dist/components/KYC/useKYC.d.ts +0 -25
- package/dist/components/KYC/useKYC.js +0 -38
- package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
- package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
- package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
- package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
- package/dist/components/SessionWatcher/index.d.ts +0 -1
- package/dist/components/SessionWatcher/index.js +0 -1
- package/dist/icons/LinkBrokenIcon.d.ts +0 -2
- package/dist/icons/LinkBrokenIcon.js +0 -4
- package/dist/images/responsible-gaming-yellow.png +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useRef, useState } from 'react';
|
|
2
|
-
export function useKYC() {
|
|
3
|
-
const [step, setStep] = useState(2);
|
|
4
|
-
const [done, setDone] = useState(false);
|
|
5
|
-
const [idFrontImageId, setFrontImageId] = useState(null);
|
|
6
|
-
const [selfieImageId, setSelfieImageId] = useState(null);
|
|
7
|
-
const subscribers = useRef([]);
|
|
8
|
-
const subscribe = (subscriber) => {
|
|
9
|
-
subscribers.current.push(subscriber);
|
|
10
|
-
return () => {
|
|
11
|
-
subscribers.current = subscribers.current.filter((item) => item !== subscriber);
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
const triggerEvent = (detail) => {
|
|
15
|
-
subscribers.current.forEach((subscriber) => {
|
|
16
|
-
subscriber(detail);
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
const reset = () => {
|
|
20
|
-
setStep(1);
|
|
21
|
-
setDone(false);
|
|
22
|
-
setFrontImageId(null);
|
|
23
|
-
setSelfieImageId(null);
|
|
24
|
-
};
|
|
25
|
-
return {
|
|
26
|
-
step,
|
|
27
|
-
setStep,
|
|
28
|
-
done,
|
|
29
|
-
setDone,
|
|
30
|
-
idFrontImageId,
|
|
31
|
-
setFrontImageId,
|
|
32
|
-
selfieImageId,
|
|
33
|
-
setSelfieImageId,
|
|
34
|
-
subscribe,
|
|
35
|
-
triggerEvent,
|
|
36
|
-
reset,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function CXDTokenObserver(): null;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { addHours } from 'date-fns';
|
|
3
|
-
import { clamp } from 'lodash-es';
|
|
4
|
-
import { useSearchParams } from 'next/navigation';
|
|
5
|
-
import { useLocalStorage, useTimeout } from 'usehooks-ts';
|
|
6
|
-
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
7
|
-
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);
|
|
13
|
-
const now = new Date();
|
|
14
|
-
const shouldTimeoutRun = cxdToken && account;
|
|
15
|
-
const removeCxdUntilInMs = cxd?.timestamp
|
|
16
|
-
? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
|
|
17
|
-
: 0;
|
|
18
|
-
useTimeout(() => {
|
|
19
|
-
const isSame = cxd?.cxd === cxdToken;
|
|
20
|
-
if (!isSame) {
|
|
21
|
-
const extendedTimestamp = addHours(new Date(), 6).getTime();
|
|
22
|
-
setCxd({
|
|
23
|
-
cxd: cxdToken,
|
|
24
|
-
timestamp: extendedTimestamp,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}, shouldTimeoutRun ? 100 : null);
|
|
28
|
-
useTimeout(() => removeCxd(), shouldTimeoutRun ? removeCxdUntilInMs : null);
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function LinkGoogleAccountObserver(): null;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useSearchParams } from 'next/navigation';
|
|
3
|
-
import { useTimeout } from 'usehooks-ts';
|
|
4
|
-
import { toaster } from '../../client/utils/toaster.js';
|
|
5
|
-
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
6
|
-
import { getSessionQueryKey } from '../../utils/queryKeys.js';
|
|
7
|
-
export function LinkGoogleAccountObserver() {
|
|
8
|
-
const searchParams = useSearchParams();
|
|
9
|
-
const code = searchParams.get('message') ?? searchParams.get('status');
|
|
10
|
-
const queryClient = getQueryClient();
|
|
11
|
-
useTimeout(() => {
|
|
12
|
-
if (code === 'duplicate') {
|
|
13
|
-
return toaster.error({
|
|
14
|
-
title: 'Duplicate Account',
|
|
15
|
-
description: 'An account with this email already exists. Please try signing in instead.',
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
if (code === 'linked') {
|
|
19
|
-
queryClient.invalidateQueries({
|
|
20
|
-
queryKey: getSessionQueryKey(),
|
|
21
|
-
});
|
|
22
|
-
return toaster.success({
|
|
23
|
-
title: 'Google Account Linked Successfully',
|
|
24
|
-
description: 'Your Google account has been successfully connected.',
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}, code ? 100 : null);
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function SessionWatcher(): null;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useRouter } from 'next/navigation';
|
|
3
|
-
import { useCallback, useEffect } from 'react';
|
|
4
|
-
import { useSessionHealthQuery } from '../../client/hooks/useSessionHealthQuery.js';
|
|
5
|
-
import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
|
|
6
|
-
export function SessionWatcher() {
|
|
7
|
-
const router = useRouter();
|
|
8
|
-
const query = useSessionHealthQuery({ refetchInterval: 1000 * 5 });
|
|
9
|
-
const healthy = query.data ?? true;
|
|
10
|
-
const mutation = useSignOutMutation();
|
|
11
|
-
const signOut = useCallback(async () => {
|
|
12
|
-
await mutation.mutateAsync();
|
|
13
|
-
router.refresh();
|
|
14
|
-
}, [mutation, router]);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
if (!healthy)
|
|
17
|
-
signOut();
|
|
18
|
-
}, [healthy, signOut]);
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SessionWatcher';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SessionWatcher.js';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export function LinkBrokenIcon(props) {
|
|
3
|
-
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", ...props, children: _jsx("path", { d: "M8.5 15.5L15.5 8.49998M9 4V2M15 20V22M4 9H2M20 15H22M4.91421 4.91421L3.5 3.5M19.0858 19.0857L20.5 20.4999M12 17.6568L9.87871 19.7781C8.31662 21.3402 5.78396 21.3402 4.22186 19.7781C2.65976 18.216 2.65976 15.6833 4.22186 14.1212L6.34318 11.9999M17.6569 11.9999L19.7782 9.87859C21.3403 8.31649 21.3403 5.78383 19.7782 4.22174C18.2161 2.65964 15.6835 2.65964 14.1214 4.22174L12 6.34306", stroke: "#FEDF89", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
4
|
-
}
|
|
Binary file
|