@opexa/portal-components 0.0.693 → 0.0.695

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 (80) hide show
  1. package/dist/client/hooks/useAiOGCashDepositMutation.js +10 -2
  2. package/dist/client/hooks/useAiOGrabPayDepositMutation.js +9 -1
  3. package/dist/client/hooks/useAiOPalawanPayDepositMutation.js +9 -1
  4. package/dist/client/hooks/useAiOPayMayaDepositMutation.js +9 -1
  5. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +7 -0
  6. package/dist/components/AccountInfo/GoogleDisconnect.js +11 -0
  7. package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
  8. package/dist/components/DigitainLauncher/Loading.js +5 -0
  9. package/dist/components/KYC/BasicInformation.d.ts +1 -0
  10. package/dist/components/KYC/BasicInformation.js +101 -0
  11. package/dist/components/KYC/IdentityVerification.d.ts +1 -0
  12. package/dist/components/KYC/IdentityVerification.js +120 -0
  13. package/dist/components/KYC/Indicator.d.ts +1 -0
  14. package/dist/components/KYC/Indicator.js +8 -0
  15. package/dist/components/KYC/KYC.lazy.d.ts +6 -0
  16. package/dist/components/KYC/KYC.lazy.js +45 -0
  17. package/dist/components/KYC/KYCContext.d.ts +6 -0
  18. package/dist/components/KYC/KYCContext.js +2 -0
  19. package/dist/components/KYC/PersonalInformation.d.ts +1 -0
  20. package/dist/components/KYC/PersonalInformation.js +122 -0
  21. package/dist/components/KYC/useKYC.d.ts +25 -0
  22. package/dist/components/KYC/useKYC.js +38 -0
  23. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +1 -0
  24. package/dist/components/PortalProvider/CXDTokenObserver.js +30 -0
  25. package/dist/components/TransactionRecords/TableFilters.js +4 -0
  26. package/dist/constants/Endpoint.d.ts +1 -0
  27. package/dist/constants/Endpoint.js +4 -0
  28. package/dist/icons/LinkBrokenIcon.d.ts +2 -0
  29. package/dist/icons/LinkBrokenIcon.js +4 -0
  30. package/dist/images/responsible-gaming-yellow.png +0 -0
  31. package/dist/types/index.d.ts +1 -1
  32. package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
  33. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
  34. package/dist/ui/Badge/Badge.d.ts +12 -12
  35. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  36. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  37. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  38. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  39. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  40. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  41. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  42. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  43. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  44. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  45. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  46. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  47. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  48. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  49. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  50. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  51. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  52. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  53. package/dist/ui/Field/Field.d.ts +21 -21
  54. package/dist/ui/Field/field.recipe.d.ts +3 -3
  55. package/dist/ui/Menu/Menu.d.ts +307 -307
  56. package/dist/ui/Menu/menu.recipe.d.ts +17 -17
  57. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  58. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  59. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  60. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  61. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  62. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  63. package/dist/ui/Popover/Popover.d.ts +154 -154
  64. package/dist/ui/Popover/popover.recipe.d.ts +14 -14
  65. package/dist/ui/Progress/Progress.d.ts +27 -27
  66. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  67. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  68. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  69. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  70. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  71. package/dist/ui/Select/Select.d.ts +45 -45
  72. package/dist/ui/Select/select.recipe.d.ts +3 -3
  73. package/dist/ui/Table/Table.d.ts +21 -21
  74. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  75. package/dist/ui/Table/table.recipe.d.ts +3 -3
  76. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  77. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  78. package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
  79. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  80. package/package.json +1 -1
@@ -0,0 +1,38 @@
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
+ }
@@ -0,0 +1 @@
1
+ export declare function CXDTokenObserver(): null;
@@ -0,0 +1,30 @@
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
+ }
@@ -38,6 +38,10 @@ const DEPOSIT_TYPES_MAP = {
38
38
  MANUAL_UPI: 'Manual UPI',
39
39
  PISO_PAY_CHECKOUT: 'Piso Pay Checkout',
40
40
  LIBANGAN_PAY_IN: 'Libangan Pay In',
41
+ AIO_GCASH: 'AiO GCash',
42
+ AIO_PAY_MAYA: 'AiO Maya',
43
+ AIO_GRAB_PAY: 'AiO Grab Pay',
44
+ AIO_PALAWAN_PAY: 'AiO Palawan Pay',
41
45
  };
42
46
  const DEPOSIT_STATUSES = [
43
47
  'ACCEPTED',
@@ -8,3 +8,4 @@ export declare const WALLET_GRAPHQL_ENDPOINT: string;
8
8
  export declare const AUTH_ENDPOINT: string;
9
9
  export declare const CMS_PORTAL_ENDPOINT: string;
10
10
  export declare const STATIC_ENDPOINT: string;
11
+ export declare const OPEXAPAY_ENDPOINT: string;
@@ -39,3 +39,7 @@ export const STATIC_ENDPOINT = {
39
39
  development: 'https://static.development.atalos.io',
40
40
  production: 'https://static.atalos.io',
41
41
  }[ENVIRONMENT];
42
+ export const OPEXAPAY_ENDPOINT = {
43
+ development: 'https://external.opexapay.development.opexa.io',
44
+ production: 'https://external.opexapay.opexa.io',
45
+ }[ENVIRONMENT];
@@ -0,0 +1,2 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ export declare function LinkBrokenIcon(props: ComponentPropsWithRef<'svg'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
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
+ }
@@ -255,7 +255,7 @@ export interface LatestBetRecord {
255
255
  dateTimeSettled: string;
256
256
  dateTimeCreated: string;
257
257
  }
258
- export type DepositType = 'BANK' | 'GCASH' | 'MANUAL' | 'MAYA' | 'MAYA_APP' | 'QR_PH' | 'ONLINE_BANK' | 'MANUAL_BANK' | 'MANUAL_UPI' | 'PISO_PAY_CHECKOUT' | 'LIBANGAN_PAY_IN';
258
+ export type DepositType = 'BANK' | 'GCASH' | 'MANUAL' | 'MAYA' | 'MAYA_APP' | 'QR_PH' | 'ONLINE_BANK' | 'MANUAL_BANK' | 'MANUAL_UPI' | 'PISO_PAY_CHECKOUT' | 'AIO_GCASH' | 'AIO_PAY_MAYA' | 'AIO_GRAB_PAY' | 'AIO_PALAWAN_PAY' | 'LIBANGAN_PAY_IN';
259
259
  export type DepositStatus = 'PENDING' | 'ACCEPTED' | 'APPROVED' | 'REJECTED' | 'CONFIRMED' | 'CANCELLED' | 'FAILED';
260
260
  export type KnownDepositError = 'INSUFFICIENT_BALANCE' | 'DEPOSIT_CREATION_REQUEST_FAILED' | 'DEPOSIT_EXECUTION_REQUEST_FAILED' | 'REQUEST_SESSION_EXPIRED' | 'REQUEST_TIMEOUT' | 'SYSTEM_CANCELLATION' | 'UNEXPECTED_ERROR' | 'FAILED_TO_PROCESS_PAYMENT' | 'MINIMUM_DEPOSIT_AMOUNT_NOT_MET' | 'UNTOUCHED';
261
261
  export interface DepositRecord {