@opexa/portal-components 0.0.695 → 0.0.697

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 (70) hide show
  1. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +7 -44
  2. package/dist/components/DepositWithdrawal/PaymentMethods.js +26 -9
  3. package/dist/components/DepositWithdrawal/utils.d.ts +1 -3
  4. package/dist/components/DepositWithdrawal/utils.js +0 -3
  5. package/dist/components/KYC/KycOpenOnHomeMount.js +10 -2
  6. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  7. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  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 +45 -45
  12. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  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/Field/Field.d.ts +21 -21
  28. package/dist/ui/Field/field.recipe.d.ts +3 -3
  29. package/dist/ui/Menu/Menu.d.ts +144 -144
  30. package/dist/ui/Menu/menu.recipe.d.ts +8 -8
  31. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  32. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  33. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  34. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  35. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  36. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  37. package/dist/ui/Popover/Popover.d.ts +55 -55
  38. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  39. package/dist/ui/Progress/Progress.d.ts +27 -27
  40. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  41. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  42. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  43. package/dist/ui/Select/Select.d.ts +45 -45
  44. package/dist/ui/Select/select.recipe.d.ts +3 -3
  45. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  46. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  47. package/package.json +1 -1
  48. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +0 -7
  49. package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
  50. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  51. package/dist/components/DigitainLauncher/Loading.js +0 -5
  52. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  53. package/dist/components/KYC/BasicInformation.js +0 -101
  54. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  55. package/dist/components/KYC/IdentityVerification.js +0 -120
  56. package/dist/components/KYC/Indicator.d.ts +0 -1
  57. package/dist/components/KYC/Indicator.js +0 -8
  58. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  59. package/dist/components/KYC/KYC.lazy.js +0 -45
  60. package/dist/components/KYC/KYCContext.d.ts +0 -6
  61. package/dist/components/KYC/KYCContext.js +0 -2
  62. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  63. package/dist/components/KYC/PersonalInformation.js +0 -122
  64. package/dist/components/KYC/useKYC.d.ts +0 -25
  65. package/dist/components/KYC/useKYC.js +0 -38
  66. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
  67. package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
  68. package/dist/icons/LinkBrokenIcon.d.ts +0 -2
  69. package/dist/icons/LinkBrokenIcon.js +0 -4
  70. package/dist/images/responsible-gaming-yellow.png +0 -0
@@ -7,7 +7,6 @@ import { usePaymentSettingsQuery } from '../../../client/hooks/usePaymentSetting
7
7
  import { AlertCircleIcon } from '../../../icons/AlertCircleIcon.js';
8
8
  import { SpinnerIcon } from '../../../icons/SpinnerIcon.js';
9
9
  import { onMobileDevice } from '../../../utils/onMobileDevice.js';
10
- import { AiOPaymentMethods } from '../AiOPaymentMethods.js';
11
10
  import { PaymentMethods } from '../PaymentMethods.js';
12
11
  import { AiOGCashDeposit } from './AiOGCashDeposit/AiOGCashDeposit.js';
13
12
  import { AiOGrabPayDeposit } from './AiOGrabPayDeposit/AiOGrabPayDeposit.js';
@@ -25,15 +24,6 @@ export function Deposit() {
25
24
  const paymentSettingsQuery = usePaymentSettingsQuery();
26
25
  const paymentSettings = paymentSettingsQuery.data;
27
26
  const featureFlag = useFeatureFlag();
28
- const aioDepositMethodEnabled = (() => {
29
- const isMobile = onMobileDevice();
30
- const enabledKey = isMobile ? 'mobileWebEnabled' : 'webEnabled';
31
- return (paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] ||
32
- paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] ||
33
- paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] ||
34
- paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] ||
35
- false);
36
- })();
37
27
  const enabledPaymentMethods = (() => {
38
28
  const l = [];
39
29
  if (onMaya) {
@@ -69,45 +59,24 @@ export function Deposit() {
69
59
  method: 'PISO_PAY',
70
60
  condition: () => paymentSettings?.pisoPayDepositGatewaySettings?.[enabledKey] || false,
71
61
  },
72
- {
73
- method: 'AIO_EWALLET',
74
- condition: () => featureFlag.enabled && aioDepositMethodEnabled,
75
- },
76
- ];
77
- paymentMethods.forEach(({ method, condition }) => {
78
- if (condition()) {
79
- l.push(method);
80
- }
81
- });
82
- return l;
83
- })();
84
- const enabledAiOeWalletPaymentMethods = (() => {
85
- const l = [];
86
- const isMobile = onMobileDevice();
87
- const enabledKey = isMobile ? 'mobileWebEnabled' : 'webEnabled';
88
- const m = [
89
62
  {
90
63
  method: 'AIO_GCASH',
91
- condition: () => paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] ||
92
- false,
64
+ condition: () => (paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] && featureFlag.enabled) || false,
93
65
  },
94
66
  {
95
67
  method: 'AIO_PAY_MAYA',
96
- condition: () => paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] ||
97
- false,
68
+ condition: () => (paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] && featureFlag.enabled) || false,
98
69
  },
99
70
  {
100
71
  method: 'AIO_GRAB_PAY',
101
- condition: () => paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] ||
102
- false,
72
+ condition: () => (paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] && featureFlag.enabled) || false,
103
73
  },
104
74
  {
105
75
  method: 'AIO_PALAWAN_PAY',
106
- condition: () => paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] ||
107
- false,
76
+ condition: () => (paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] && featureFlag.enabled) || false,
108
77
  },
109
78
  ];
110
- m.forEach(({ method, condition }) => {
79
+ paymentMethods.forEach(({ method, condition }) => {
111
80
  if (condition()) {
112
81
  l.push(method);
113
82
  }
@@ -115,7 +84,6 @@ export function Deposit() {
115
84
  return l;
116
85
  })();
117
86
  const [paymentMethod, setPaymentMethod] = useState();
118
- const [paymentMethodAiOeWallet, setPaymentMethodAiOeWallet] = useState('AIO_GCASH');
119
87
  useEffect(() => {
120
88
  if (enabledPaymentMethods.length > 0 && !paymentMethod) {
121
89
  setPaymentMethod(enabledPaymentMethods[0]);
@@ -129,15 +97,10 @@ export function Deposit() {
129
97
  if (!isMayaSessionValid) {
130
98
  return _jsx(MayaSessionSessionExpired, {});
131
99
  }
132
- if (enabledPaymentMethods.length <= 0 &&
133
- enabledAiOeWalletPaymentMethods.length <= 0) {
100
+ if (enabledPaymentMethods.length <= 0) {
134
101
  return _jsx(NoAvailablePaymentMethods, {});
135
102
  }
136
- return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_EWALLET' && (_jsxs(_Fragment, { children: [_jsx(AiOPaymentMethods, { value: paymentMethodAiOeWallet, onChange: setPaymentMethodAiOeWallet, options: enabledAiOeWalletPaymentMethods, label: "AIO eWallet payment methods", defaultValue: "AIO_GCASH" }), paymentMethodAiOeWallet === 'AIO_GCASH' &&
137
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOGCashDeposit, {}), paymentMethodAiOeWallet === 'AIO_PAY_MAYA' &&
138
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOPayMayaDeposit, {}), paymentMethodAiOeWallet === 'AIO_GRAB_PAY' &&
139
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOGrabPayDeposit, {}), paymentMethodAiOeWallet === 'AIO_PALAWAN_PAY' &&
140
- paymentMethod === 'AIO_EWALLET' && _jsx(AiOPalawanPayDeposit, {})] }))] }));
103
+ return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_GCASH' && _jsx(AiOGCashDeposit, {}), paymentMethod === 'AIO_PAY_MAYA' && _jsx(AiOPayMayaDeposit, {}), paymentMethod === 'AIO_GRAB_PAY' && _jsx(AiOGrabPayDeposit, {}), paymentMethod === 'AIO_PALAWAN_PAY' && _jsx(AiOPalawanPayDeposit, {})] }));
141
104
  }
142
105
  function MayaSessionSessionExpired() {
143
106
  return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-warning-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-warning" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg", children: "Session Expired" }), _jsx("p", { className: "mx-auto mt-xs max-w-[25rem] text-center text-sm text-text-tertiary-600", children: "Your session has timed out. To continue with deposits or withdrawals, Please try reloading the app." })] }));
@@ -10,7 +10,8 @@ import maya from '../../images/maya.png';
10
10
  import onlineBank from '../../images/online-bank.png';
11
11
  import pisoPay from '../../images/piso-pay.png';
12
12
  import qrph from '../../images/QRPH.png';
13
- import wallet from '../../images/wallet.png';
13
+ import palawanPay from '../../images/palawanpay.png';
14
+ import grabPay from '../../images/grabpay.png';
14
15
  import { Checkbox } from '../../ui/Checkbox/index.js';
15
16
  import { Field } from '../../ui/Field/index.js';
16
17
  import { PaymentMethodDefinition } from './utils.js';
@@ -61,9 +62,24 @@ const OPTIONS = [
61
62
  image: pisoPay,
62
63
  },
63
64
  {
64
- value: 'AIO_EWALLET',
65
- label: 'AIO eWallet',
66
- image: wallet,
65
+ value: 'AIO_GCASH',
66
+ label: 'GCash',
67
+ image: gcash,
68
+ },
69
+ {
70
+ value: 'AIO_PAY_MAYA',
71
+ label: 'Maya',
72
+ image: maya,
73
+ },
74
+ {
75
+ value: 'AIO_GRAB_PAY',
76
+ label: 'GrabPay',
77
+ image: grabPay,
78
+ },
79
+ {
80
+ value: 'AIO_PALAWAN_PAY',
81
+ label: 'Palawan Pay',
82
+ image: palawanPay,
67
83
  },
68
84
  ];
69
85
  export function PaymentMethods(props) {
@@ -80,9 +96,10 @@ export function PaymentMethods(props) {
80
96
  if (!lastValue)
81
97
  return;
82
98
  setValue(PaymentMethodDefinition.parse(lastValue));
83
- }, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "flex cursor-pointer items-center justify-between rounded-xl border border-border-secondary ui-checked:border-border-brand-solid p-lg", children: [_jsxs("div", { className: twMerge('rounded-xs bg-white px-sm py-[0.688rem]', option.value === 'GCASH' && 'bg-[#017EFF]', option.value === 'AIO_EWALLET' &&
84
- 'flex items-center space-x-sm bg-bg-secondary'), children: [_jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: twMerge('w-auto', option.value === 'LIBANGAN_PAY_IN' ||
85
- option.value === 'VENTAJA_DISBURSEMENT'
86
- ? 'h-[2.5rem]'
87
- : 'h-[1.063rem]'), draggable: false }), option.value === 'AIO_EWALLET' && (_jsx("p", { className: "text-text-secondary-700 text-xs leading-tight", children: "AIO eWallet" }))] }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
99
+ }, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "flex cursor-pointer items-center justify-between rounded-xl border border-border-secondary ui-checked:border-border-brand-solid p-lg", children: [_jsx("div", { className: twMerge('rounded-xs', option.value === 'AIO_GRAB_PAY'
100
+ ? 'bg-transparent px-0 py-0'
101
+ : 'bg-white px-sm py-[0.688rem]', option.value.includes('GCASH') && 'bg-[#017EFF]', option.value === 'AIO_PALAWAN_PAY' && 'bg-[#026308]', option.value === 'AIO_PAY_MAYA' && 'bg-black'), children: _jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: twMerge('w-auto', 'h-[1.063rem]', option.value === 'LIBANGAN_PAY_IN' ||
102
+ option.value === 'VENTAJA_DISBURSEMENT'
103
+ ? 'h-[2.5rem]'
104
+ : '', option.value === 'AIO_GRAB_PAY' && 'h-[3rem] rounded-[4px]', option.value === 'AIO_PALAWAN_PAY' && 'h-[2rem]'), draggable: false }) }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
88
105
  }
@@ -1,8 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { KnownDepositError, KnownWithdrawalError, WithdrawalError } from '../../types';
3
- export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_EWALLET"]>;
4
- export declare const AiOeWalletPaymentMethodDefinition: z.ZodEnum<["AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY"]>;
3
+ export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY"]>;
5
4
  export type PaymentMethod = z.infer<typeof PaymentMethodDefinition>;
6
- export type AiOeWalletPaymentMethod = z.infer<typeof AiOeWalletPaymentMethodDefinition>;
7
5
  export type DepositWithdrawalErrors = KnownDepositError | KnownWithdrawalError | WithdrawalError | string;
8
6
  export declare function explainError(error?: DepositWithdrawalErrors): string;
@@ -9,9 +9,6 @@ export const PaymentMethodDefinition = z.enum([
9
9
  'LIBANGAN_PAY_IN',
10
10
  'VENTAJA_DISBURSEMENT',
11
11
  'PISO_PAY',
12
- 'AIO_EWALLET',
13
- ]);
14
- export const AiOeWalletPaymentMethodDefinition = z.enum([
15
12
  'AIO_GCASH',
16
13
  'AIO_PAY_MAYA',
17
14
  'AIO_GRAB_PAY',
@@ -10,6 +10,7 @@ export function KycOpenOnHomeMount(props) {
10
10
  const { data: account, isLoading: accountLoading } = useAccountQuery();
11
11
  const isVerificationLocked = account?.status === 'VERIFICATION_LOCKED';
12
12
  const isPending = account?.verificationStatus === 'PENDING';
13
+ const isRejected = verification?.status === 'REJECTED';
13
14
  const hasntSubmittedCompliantDocs = account?.verified ||
14
15
  verification?.sumsubVerified ||
15
16
  verification?.status === 'APPROVED' ||
@@ -34,14 +35,20 @@ export function KycOpenOnHomeMount(props) {
34
35
  !verification?.address;
35
36
  useEffect(() => {
36
37
  if (!verificationLoading && !accountLoading) {
38
+ const shouldShowReminder = Boolean(props.isSkippable);
37
39
  // Handle pending case with feature flag
38
40
  if (isPending) {
39
41
  setkycOpen(false);
40
42
  setkycReminderOpen(true);
41
43
  }
42
- if (hasntSubmittedCompliantDocs || hasntCompletedKYC) {
44
+ // Handle rejected verification status
45
+ else if (isRejected) {
46
+ setkycReminderOpen(shouldShowReminder);
47
+ setkycOpen(!shouldShowReminder);
48
+ }
49
+ // Handle cases where user hasn't submitted compliant documents or hasn't completed KYC
50
+ else if (hasntSubmittedCompliantDocs || hasntCompletedKYC) {
43
51
  // Set modal states based on whether KYC can be skipped
44
- const shouldShowReminder = Boolean(props.isSkippable);
45
52
  setkycReminderOpen(shouldShowReminder);
46
53
  setkycOpen(!shouldShowReminder);
47
54
  }
@@ -62,6 +69,7 @@ export function KycOpenOnHomeMount(props) {
62
69
  hasntCompletedKYC,
63
70
  isVerificationLocked,
64
71
  isPending,
72
+ isRejected,
65
73
  props.isSkippable,
66
74
  ]);
67
75
  return null;