@opexa/portal-components 0.0.208 → 0.0.209

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.
@@ -3,5 +3,7 @@ export interface DepositWithdrawalProps {
3
3
  termsOfUseUrl?: string;
4
4
  /** @default "/privacy-policy" */
5
5
  privacyPolicyUrl?: string;
6
+ /** @default "/account/security" */
7
+ accountSecurityUrl?: string;
6
8
  }
7
9
  export declare function DepositWithdrawal(props: DepositWithdrawalProps): import("react/jsx-runtime").JSX.Element;
@@ -26,6 +26,7 @@ import { Portal } from '../../../../ui/Portal/index.js';
26
26
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
27
  import { AmountChoices } from '../../AmountChoices.js';
28
28
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
29
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
29
30
  export function GCashWithdrawal() {
30
31
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
31
32
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -117,7 +118,7 @@ export function GCashWithdrawal() {
117
118
  shouldDirty: true,
118
119
  shouldValidate: true,
119
120
  });
120
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
121
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
121
122
  if (!details.open) {
122
123
  setStatus('waiting');
123
124
  }
@@ -28,6 +28,7 @@ import { Select } from '../../../../ui/Select/index.js';
28
28
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
29
29
  import { AmountChoices } from '../../AmountChoices.js';
30
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
31
32
  export function InstapayWithdrawal() {
32
33
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
33
34
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -141,7 +142,7 @@ export function InstapayWithdrawal() {
141
142
  shouldDirty: true,
142
143
  shouldValidate: true,
143
144
  });
144
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
145
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
145
146
  if (!details.open) {
146
147
  setStatus('waiting');
147
148
  }
@@ -24,6 +24,7 @@ import { Portal } from '../../../../ui/Portal/index.js';
24
24
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
25
25
  import { AmountChoices } from '../../AmountChoices.js';
26
26
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
27
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
27
28
  export function MayaAppWithdrawal() {
28
29
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
29
30
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -107,7 +108,7 @@ export function MayaAppWithdrawal() {
107
108
  shouldDirty: true,
108
109
  shouldValidate: true,
109
110
  });
110
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
111
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
111
112
  if (!details.open) {
112
113
  setStatus('waiting');
113
114
  }
@@ -26,6 +26,7 @@ import { Portal } from '../../../../ui/Portal/index.js';
26
26
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
27
  import { AmountChoices } from '../../AmountChoices.js';
28
28
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
29
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
29
30
  export function MayaWithdrawal() {
30
31
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
31
32
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -117,7 +118,7 @@ export function MayaWithdrawal() {
117
118
  shouldDirty: true,
118
119
  shouldValidate: true,
119
120
  });
120
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
121
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
121
122
  if (!details.open) {
122
123
  setStatus('waiting');
123
124
  }
@@ -28,6 +28,7 @@ import { Select } from '../../../../ui/Select/index.js';
28
28
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
29
29
  import { AmountChoices } from '../../AmountChoices.js';
30
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
31
32
  export function PisoPayWithdrawal() {
32
33
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
33
34
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -138,7 +139,7 @@ export function PisoPayWithdrawal() {
138
139
  shouldDirty: true,
139
140
  shouldValidate: true,
140
141
  });
141
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
142
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
142
143
  if (!details.open) {
143
144
  setStatus('waiting');
144
145
  }
@@ -0,0 +1 @@
1
+ export declare function TransactionPasswordNotSet(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Link from 'next/link';
3
+ import { useShallow } from 'zustand/shallow';
4
+ import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
5
+ import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
6
+ import { ArrowRightIcon } from '../../../icons/ArrowRightIcon.js';
7
+ import { PasscodeLockIcon } from '../../../icons/PasscodeLockIcon.js';
8
+ import { useDepositWithdrawalPropsContext } from '../DepositWithdrawalContext.js';
9
+ export function TransactionPasswordNotSet() {
10
+ const depositWithdrawalProps = useDepositWithdrawalPropsContext();
11
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
12
+ depositWithdrawal: ctx.depositWithdrawal,
13
+ })));
14
+ const accountQuery = useAccountQuery();
15
+ const account = accountQuery.data;
16
+ if (!account)
17
+ return null;
18
+ if (account.transactionPassword)
19
+ return null;
20
+ return (_jsxs("div", { className: "border-border-primary bg-bg-primary-alt mt-lg rounded-xl border p-xl", children: [_jsx("div", { className: "border-text-warning-primary/10 flex size-8.5 items-center justify-center rounded-full border-[1.667px]", children: _jsx("div", { className: "border-text-warning-primary/30 flex size-6.5 items-center justify-center rounded-full border-[1.667px]", children: _jsx(PasscodeLockIcon, { className: "text-text-warning-primary size-5" }) }) }), _jsx("p", { className: "text-text-tertiary-600 mt-lg text-sm", children: "It looks like you haven\u2019t set up your transaction password yet. You can do it now." }), _jsxs(Link, { href: depositWithdrawalProps.accountSecurityUrl ?? '/account/security', className: "text-brand- text-brand-400 mt-lg flex items-center gap-sm text-sm font-semibold", onClick: () => {
21
+ globalStore.depositWithdrawal.setOpen(false);
22
+ }, children: ["Set transaction password", _jsx(ArrowRightIcon, { className: "text-text-brand-700 size-5" })] })] }));
23
+ }
@@ -28,6 +28,7 @@ import { Select } from '../../../../ui/Select/index.js';
28
28
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
29
29
  import { AmountChoices } from '../../AmountChoices.js';
30
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
31
32
  export function VentajaWithdrawal() {
32
33
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
33
34
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -141,7 +142,7 @@ export function VentajaWithdrawal() {
141
142
  shouldDirty: true,
142
143
  shouldValidate: true,
143
144
  });
144
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
145
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
145
146
  if (!details.open) {
146
147
  setStatus('waiting');
147
148
  }
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
3
  import { useShallow } from 'zustand/shallow';
4
- import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
5
4
  import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
6
5
  import { useIsMayaSessionValidQuery } from '../../../client/hooks/useIsMayaSessionValidQuery.js';
7
6
  import { useMemberVerificationQuery } from '../../../client/hooks/useMemberVerificationQuery.js';
@@ -24,8 +23,6 @@ export function Withdrawal() {
24
23
  const [onMMA] = useOnMMA();
25
24
  const walletQuery = useWalletQuery();
26
25
  const wallet = walletQuery.data;
27
- const accountQuery = useAccountQuery();
28
- const account = accountQuery.data;
29
26
  const paymentSettingsQuery = usePaymentSettingsQuery();
30
27
  const paymentSettings = paymentSettingsQuery.data;
31
28
  const isMayaSessionValidQuery = useIsMayaSessionValidQuery();
@@ -79,8 +76,7 @@ export function Withdrawal() {
79
76
  setPaymentMethod(enabledPaymentMethods[0]);
80
77
  }
81
78
  }, [enabledPaymentMethods, paymentMethod]);
82
- if (accountQuery.isLoading ||
83
- walletQuery.isLoading ||
79
+ if (walletQuery.isLoading ||
84
80
  paymentSettingsQuery.isLoading ||
85
81
  isMayaSessionValidQuery.isLoading ||
86
82
  memberVerificationQuery.isLoading) {
@@ -92,9 +88,6 @@ export function Withdrawal() {
92
88
  if (parseDecimal(wallet?.balance, 0) < 1) {
93
89
  return _jsx(InsufficientBalance, {});
94
90
  }
95
- if (!account?.transactionPassword) {
96
- return _jsx(TransactionPasswordNotSet, {});
97
- }
98
91
  if (!memberVerification ||
99
92
  memberVerification.status === 'REJECTED' ||
100
93
  memberVerification.status === 'UNVERIFIED') {
@@ -105,9 +98,6 @@ export function Withdrawal() {
105
98
  }
106
99
  return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'VENTAJA' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {})] }));
107
100
  }
108
- function TransactionPasswordNotSet() {
109
- return (_jsxs("div", { className: "pt-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Transaction Password Not Set" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "To proceed with withdrawals, you must first set up a transaction password. This ensures the security of your account and transactions." })] }));
110
- }
111
101
  function AccountVerificationRequired() {
112
102
  const globalStore = useGlobalStore(useShallow((ctx) => ({
113
103
  kyc: ctx.kyc,
@@ -1,11 +1,12 @@
1
1
  import * as faceapi from 'face-api.js';
2
2
  import Resizer from 'react-image-file-resizer';
3
3
  export async function loadFaceApiModels() {
4
- const MODEL_URL = '/models';
4
+ // const url = `${STATIC_ENDPOINT}/models`;
5
+ const url = '/models';
5
6
  await Promise.all([
6
- faceapi.nets.tinyFaceDetector.loadFromUri(MODEL_URL),
7
- faceapi.nets.faceLandmark68Net.loadFromUri(MODEL_URL),
8
- faceapi.nets.faceRecognitionNet.loadFromUri(MODEL_URL),
7
+ faceapi.nets.tinyFaceDetector.loadFromUri(url),
8
+ faceapi.nets.faceLandmark68Net.loadFromUri(url),
9
+ faceapi.nets.faceRecognitionNet.loadFromUri(url),
9
10
  ]);
10
11
  }
11
12
  export function dataURLtoBlob(dataURL) {
@@ -0,0 +1,2 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ export declare function PasscodeLockIcon(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 PasscodeLockIcon(props) {
3
+ return (_jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: _jsx("path", { d: "M22 11V8.2C22 7.0799 22 6.51984 21.782 6.09202C21.5903 5.71569 21.2843 5.40973 20.908 5.21799C20.4802 5 19.9201 5 18.8 5H5.2C4.0799 5 3.51984 5 3.09202 5.21799C2.71569 5.40973 2.40973 5.71569 2.21799 6.09202C2 6.51984 2 7.0799 2 8.2V11.8C2 12.9201 2 13.4802 2.21799 13.908C2.40973 14.2843 2.71569 14.5903 3.09202 14.782C3.51984 15 4.0799 15 5.2 15H11M12 10H12.005M17 10H17.005M7 10H7.005M19.25 17V15.25C19.25 14.2835 18.4665 13.5 17.5 13.5C16.5335 13.5 15.75 14.2835 15.75 15.25V17M12.25 10C12.25 10.1381 12.1381 10.25 12 10.25C11.8619 10.25 11.75 10.1381 11.75 10C11.75 9.86193 11.8619 9.75 12 9.75C12.1381 9.75 12.25 9.86193 12.25 10ZM17.25 10C17.25 10.1381 17.1381 10.25 17 10.25C16.8619 10.25 16.75 10.1381 16.75 10C16.75 9.86193 16.8619 9.75 17 9.75C17.1381 9.75 17.25 9.86193 17.25 10ZM7.25 10C7.25 10.1381 7.13807 10.25 7 10.25C6.86193 10.25 6.75 10.1381 6.75 10C6.75 9.86193 6.86193 9.75 7 9.75C7.13807 9.75 7.25 9.86193 7.25 10ZM15.6 21H19.4C19.9601 21 20.2401 21 20.454 20.891C20.6422 20.7951 20.7951 20.6422 20.891 20.454C21 20.2401 21 19.9601 21 19.4V18.6C21 18.0399 21 17.7599 20.891 17.546C20.7951 17.3578 20.6422 17.2049 20.454 17.109C20.2401 17 19.9601 17 19.4 17H15.6C15.0399 17 14.7599 17 14.546 17.109C14.3578 17.2049 14.2049 17.3578 14.109 17.546C14 17.7599 14 18.0399 14 18.6V19.4C14 19.9601 14 20.2401 14.109 20.454C14.2049 20.6422 14.3578 20.7951 14.546 20.891C14.7599 21 15.0399 21 15.6 21Z" }) }));
4
+ }
@@ -219,6 +219,7 @@
219
219
  --color-bg-warning-secondary: #dc6803;
220
220
 
221
221
  --color-text-brand: #feee95;
222
+ --color-text-brand-700: #a15c07;
222
223
  --color-text-brand-primary-600: #eaaa08;
223
224
  --color-text-primary-900: #f5f5f6;
224
225
  --color-text-primary-brand: #f5f5f6;
@@ -1,8 +1,8 @@
1
1
  import { STATIC_ENDPOINT } from '../constants/index.js';
2
- import marbleGameOffline from './custom-images/marble-game-offline.webp';
3
- import marbleGameOnline from './custom-images/marble-game.webp';
4
- import rainbowBallOffline from './custom-images/rainbow-ball-offline.webp';
5
- import rainbowBallOnline from './custom-images/rainbow-ball-online.webp';
2
+ import marbleGameOffline from '../../lib/images/games/marble-game-offline.webp';
3
+ import marbleGameOnline from '../../lib/images/games/marble-game.webp';
4
+ import rainbowBallOffline from '../../lib/images/games/rainbow-ball-offline.webp';
5
+ import rainbowBallOnline from '../../lib/images/games/rainbow-ball-online.webp';
6
6
  const VERSION = '1';
7
7
  export function getGameImageUrl(args) {
8
8
  const id = args.id ?? args.reference;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.208",
3
+ "version": "0.0.209",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",