@opexa/portal-components 0.0.806 → 0.0.808

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/components/DepositWithdrawal/DepositWithdrawal.lazy.js +4 -1
  2. package/dist/components/DepositWithdrawal/Deposit__next/AiOGCashDeposit/AiOGCashDeposit.d.ts +1 -0
  3. package/dist/components/DepositWithdrawal/Deposit__next/AiOGCashDeposit/AiOGCashDeposit.js +217 -0
  4. package/dist/components/DepositWithdrawal/Deposit__next/AiOGrabPayDeposit/AiOGrabPayDeposit.d.ts +1 -0
  5. package/dist/components/DepositWithdrawal/Deposit__next/AiOGrabPayDeposit/AiOGrabPayDeposit.js +215 -0
  6. package/dist/components/DepositWithdrawal/Deposit__next/AiOPalawanPayDeposit/AiOPalawanPayDeposit.d.ts +1 -0
  7. package/dist/components/DepositWithdrawal/Deposit__next/AiOPalawanPayDeposit/AiOPalawanPayDeposit.js +215 -0
  8. package/dist/components/DepositWithdrawal/Deposit__next/AiOPayMayaDeposit/AiOPayMayaDeposit.d.ts +1 -0
  9. package/dist/components/DepositWithdrawal/Deposit__next/AiOPayMayaDeposit/AiOPayMayaDeposit.js +215 -0
  10. package/dist/components/DepositWithdrawal/Deposit__next/AvailablePromos.d.ts +8 -0
  11. package/dist/components/DepositWithdrawal/Deposit__next/AvailablePromos.js +33 -0
  12. package/dist/components/DepositWithdrawal/Deposit__next/Deposit.d.ts +1 -0
  13. package/dist/components/DepositWithdrawal/Deposit__next/Deposit.js +120 -0
  14. package/dist/components/DepositWithdrawal/Deposit__next/GCashDeposit/GCashDeposit.d.ts +1 -0
  15. package/dist/components/DepositWithdrawal/Deposit__next/GCashDeposit/GCashDeposit.js +208 -0
  16. package/dist/components/DepositWithdrawal/Deposit__next/GCashWebpayDeposit/GCashWebpayDeposit.d.ts +1 -0
  17. package/dist/components/DepositWithdrawal/Deposit__next/GCashWebpayDeposit/GCashWebpayDeposit.js +210 -0
  18. package/dist/components/DepositWithdrawal/Deposit__next/LibanganDeposit/LibanganDeposit.d.ts +1 -0
  19. package/dist/components/DepositWithdrawal/Deposit__next/LibanganDeposit/LibanganDeposit.js +210 -0
  20. package/dist/components/DepositWithdrawal/Deposit__next/MayaAppDeposit/MayaAppDeposit.d.ts +1 -0
  21. package/dist/components/DepositWithdrawal/Deposit__next/MayaAppDeposit/MayaAppDeposit.js +157 -0
  22. package/dist/components/DepositWithdrawal/Deposit__next/MayaDeposit/MayaDeposit.d.ts +1 -0
  23. package/dist/components/DepositWithdrawal/Deposit__next/MayaDeposit/MayaDeposit.js +208 -0
  24. package/dist/components/DepositWithdrawal/Deposit__next/MayaWebpayDeposit/MayaWebpayDeposit.d.ts +1 -0
  25. package/dist/components/DepositWithdrawal/Deposit__next/MayaWebpayDeposit/MayaWebpayDeposit.js +211 -0
  26. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDeposit.d.ts +1 -0
  27. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDeposit.js +10 -0
  28. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +1 -0
  29. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDepositAlert.js +99 -0
  30. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDepositContext.d.ts +25 -0
  31. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDepositContext.js +2 -0
  32. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +1 -0
  33. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDepositDetails.js +19 -0
  34. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDepositForm.d.ts +1 -0
  35. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/OnlineBankDepositForm.js +115 -0
  36. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/useOnlineBankDeposit.d.ts +13 -0
  37. package/dist/components/DepositWithdrawal/Deposit__next/OnlineBankDeposit/useOnlineBankDeposit.js +81 -0
  38. package/dist/components/DepositWithdrawal/Deposit__next/PisoPayDeposit/PisoPayDeposit.d.ts +1 -0
  39. package/dist/components/DepositWithdrawal/Deposit__next/PisoPayDeposit/PisoPayDeposit.js +224 -0
  40. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDeposit.d.ts +1 -0
  41. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDeposit.js +10 -0
  42. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDepositAlert.d.ts +1 -0
  43. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDepositAlert.js +99 -0
  44. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDepositContext.d.ts +25 -0
  45. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDepositContext.js +2 -0
  46. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDepositDetails.d.ts +1 -0
  47. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDepositDetails.js +17 -0
  48. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDepositForm.d.ts +1 -0
  49. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHDepositForm.js +116 -0
  50. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHQRCode.d.ts +3 -0
  51. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/QRPHQRCode.js +69 -0
  52. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/useQRPHDeposit.d.ts +13 -0
  53. package/dist/components/DepositWithdrawal/Deposit__next/QRPHDeposit/useQRPHDeposit.js +85 -0
  54. package/dist/components/Disclaimer/DisclaimerV2.js +1 -1
  55. package/dist/styles/theme.css +4 -1
  56. package/package.json +1 -1
@@ -0,0 +1,85 @@
1
+ import { useEffect, useState } from 'react';
2
+ import invariant from 'tiny-invariant';
3
+ import { useShallow } from 'zustand/shallow';
4
+ import { useCreateQRPHDepositMutation } from '../../../../client/hooks/useCreateQRPHDepositMutation.js';
5
+ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
6
+ import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
7
+ import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
8
+ import { getQueryClient } from '../../../../utils/getQueryClient.js';
9
+ import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
10
+ export function useQRPHDeposit() {
11
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
12
+ kycVerificationStatus: ctx.kycVerificationStatus,
13
+ })));
14
+ const [deposit, setDeposit] = useState(null);
15
+ const verificationQuery = useMemberVerificationQuery();
16
+ const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
17
+ const [status, setStatus] = useState('waiting');
18
+ const view = status === 'verification-failed' ||
19
+ status === 'verification-waiting' ||
20
+ status === 'verification-success' ||
21
+ status === 'verification-processing'
22
+ ? 'qrCode'
23
+ : 'form';
24
+ const mutation = useCreateQRPHDepositMutation({
25
+ onMutate() {
26
+ setStatus('processing');
27
+ },
28
+ onSuccess(data) {
29
+ const queryClient = getQueryClient();
30
+ invariant(data.qrCode);
31
+ setStatus('verification-waiting');
32
+ queryClient.invalidateQueries({ queryKey: getDepositsCountQueryKey() });
33
+ setDeposit(data);
34
+ },
35
+ onError() {
36
+ setStatus('failed');
37
+ },
38
+ });
39
+ const generateQRCode = (input) => {
40
+ //handle new kyc process
41
+ if (verificationStatus === 'PENDING' ||
42
+ verificationStatus === 'UNVERIFIED' ||
43
+ verificationStatus === 'REJECTED' ||
44
+ verificationStatus === 'CREATED') {
45
+ globalStore.kycVerificationStatus.setOpen(true);
46
+ return;
47
+ }
48
+ else {
49
+ mutation.mutate({
50
+ amount: input.amount,
51
+ promo: input.promo ?? undefined,
52
+ });
53
+ }
54
+ };
55
+ const query = useDepositQuery(deposit?.id, {
56
+ enabled: !!deposit,
57
+ refetchInterval: 5000,
58
+ });
59
+ useEffect(() => {
60
+ if (query.data?.status === 'APPROVED' ||
61
+ query.data?.status === 'CONFIRMED') {
62
+ setStatus('verification-success');
63
+ }
64
+ if (query.data?.status === 'CANCELLED' ||
65
+ query.data?.status === 'REJECTED' ||
66
+ query.data?.status === 'FAILED') {
67
+ setStatus('verification-failed');
68
+ }
69
+ }, [query.data?.status]);
70
+ const reset = () => {
71
+ setDeposit(null);
72
+ setStatus('waiting');
73
+ };
74
+ const verify = () => {
75
+ setStatus('verification-processing');
76
+ };
77
+ return {
78
+ view,
79
+ status,
80
+ verify,
81
+ reset,
82
+ deposit,
83
+ generateQRCode,
84
+ };
85
+ }
@@ -48,7 +48,7 @@ export function DisclaimerV2(props) {
48
48
  sessionStorage.clear();
49
49
  },
50
50
  });
51
- return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "flex h-full scrollbar:h-2 scrollbar:w-2 w-full flex-col items-start gap-y-4 overflow-y-auto scrollbar-thumb:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent p-3xl lg:mx-auto lg:h-auto lg:max-h-[85vh] lg:w-[450px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx("div", { className: "text-sm", children: "The following individuals are prohibited from registering or participating in this online gaming platform." }), _jsx("div", { className: "w-full grow", children: _jsxs(Dialog.Description, { className: "space-y-2 text-sm", children: [_jsxs("ul", { className: "space-y-1.5 text-left", children: [_jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Persons below the legal gambling age of 21."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Any government official or employee directly involved in the operations of the government or its agencies."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Member of the Armed Forces of the Philippines, including the Army, Navy, Air Force and the Philippine National Police."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Individuals listed in PAGCOR's National Database of Restricted Persons (NDRP)"] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Holders of a valid Gaming Employment License (GEL)"] })] }), _jsxs(Checkbox.Root, { checked: checked, onCheckedChange: (e) => {
51
+ return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "flex h-full scrollbar:h-2 scrollbar:w-2 w-full flex-col items-start gap-y-4 overflow-y-auto scrollbar-thumb:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent p-3xl lg:mx-auto lg:h-auto lg:max-h-[85vh] lg:w-[450px] lg:rounded-xl", "aria-label": `${props.siteName} Player Disclaimer`, "aria-describedby": "disclaimer-description", children: [_jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx("div", { className: "text-sm", children: "The following individuals are prohibited from registering or participating in this online gaming platform." }), _jsx("div", { className: "w-full grow", children: _jsxs(Dialog.Description, { className: "space-y-2 text-sm", id: "disclaimer-description", children: [_jsxs("ul", { className: "space-y-1.5 text-left", "aria-label": "Restricted persons list", children: [_jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Persons below the legal gambling age of 21."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Any government official or employee directly involved in the operations of the government or its agencies."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Member of the Armed Forces of the Philippines, including the Army, Navy, Air Force and the Philippine National Police."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Individuals listed in PAGCOR's National Database of Restricted Persons (NDRP)"] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Holders of a valid Gaming Employment License (GEL)"] })] }), _jsxs(Checkbox.Root, { checked: checked, onCheckedChange: (e) => {
52
52
  if (e.checked === 'indeterminate')
53
53
  return;
54
54
  globalStore.termsOfUse.setAccepted(e.checked);
@@ -264,10 +264,13 @@
264
264
  --color-text-warning-primary: #f79009;
265
265
  --color-text-warning-primary-600: #fdb022;
266
266
  --color-text-error-primary: #f04438;
267
+ --color-dark-text: #cccccc;
268
+
267
269
  --color-text-featured-icon-light-success: #abefc6;
268
270
  --color-text-featured-icon-light-error: #fecdca;
269
271
  --color-text-featured-icon-light-warning: #fedf89;
270
- --color-dark-text: #cccccc;
272
+ --color-text-featured-icon-light-warning: #fedf89;
273
+ --color-text-featured-icon-light-brand: #E4D5A4;
271
274
 
272
275
  --color-border-primary: #373a41;
273
276
  --color-border-secondary: #22262f;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.806",
3
+ "version": "0.0.808",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",