@opexa/portal-components 0.1.26 → 0.1.28

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.
@@ -19,11 +19,7 @@ import { useDepositWithdrawalPropsContext } from '../DepositWithdrawalContext.js
19
19
  import { PaymentMethods } from '../PaymentMethods.js';
20
20
  /** True when identity is verified on the member account, including Sumsub flows where nested `verification` is null. */
21
21
  function isMemberWithdrawalVerifiedByAccount(account) {
22
- const nested = account.verification?.status;
23
- return (account.verificationStatus === 'VERIFIED' ||
24
- account.verified === true ||
25
- nested === 'VERIFIED' ||
26
- nested === 'APPROVED');
22
+ return account.verificationStatus === 'VERIFIED';
27
23
  }
28
24
  const GCashStandardCashInWithdrawal = lazy(() => import('./GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js').then((m) => ({
29
25
  default: m.GCashStandardCashInWithdrawal,
@@ -154,8 +150,7 @@ export function Withdrawal() {
154
150
  return _jsx(MayaSessionSessionExpired, {});
155
151
  }
156
152
  const withdrawalVerified = account != null ? isMemberWithdrawalVerifiedByAccount(account) : false;
157
- if (account?.status === 'VERIFICATION_LOCKED' &&
158
- !withdrawalVerified) {
153
+ if (account?.status === 'VERIFICATION_LOCKED' && !withdrawalVerified) {
159
154
  return _jsx(AccountVerificationLockRequired, {});
160
155
  }
161
156
  if (parseDecimal(wallet?.balance, 0) < 1) {
@@ -18,7 +18,7 @@ function LoaderCard(props) {
18
18
  }
19
19
  /** Loading dialog with spinner, static copy, and mutation-driven progress. */
20
20
  export function MigrateLoadingDialog(props) {
21
- const content = (_jsx(Dialog.Content, { className: twMerge('relative mx-auto bg-transparent shadow-none lg:rounded-xl', props.contentClassName), children: _jsx(LoaderCard, { ...props }) }));
21
+ const content = (_jsx(Dialog.Content, { className: twMerge('relative mx-auto w-full max-w-[calc(100dvw-1rem)] bg-transparent shadow-none lg:max-w-[400px] lg:rounded-xl', props.contentClassName), children: _jsx(LoaderCard, { ...props }) }));
22
22
  if (props.contentOnly) {
23
23
  return content;
24
24
  }
@@ -1,5 +1,5 @@
1
1
  /** Shared shell for MigrateInitializing / MigrateLoadingDialog. */
2
- export declare const migrateCardClassName = "box-border w-full min-w-0 max-w-full self-stretch rounded-2xl border border-border-primary bg-bg-primary-alt p-5 text-center shadow-black/20 shadow-lg sm:p-6 md:w-[30dvw] md:max-w-[30dvw] md:shrink-0 md:self-center";
2
+ export declare const migrateCardClassName = "box-border mx-auto w-full min-w-0 max-w-full rounded-2xl border border-border-primary bg-bg-primary-alt p-5 text-center shadow-black/20 shadow-lg sm:p-6";
3
3
  /**
4
4
  * Merges the default migrate card shell with optional classes (e.g. `Migrate`’s
5
5
  * `cardClassName` or a subcomponent’s `className`).
@@ -1,6 +1,6 @@
1
1
  import { twMerge } from 'tailwind-merge';
2
2
  /** Shared shell for MigrateInitializing / MigrateLoadingDialog. */
3
- export const migrateCardClassName = 'box-border w-full min-w-0 max-w-full self-stretch rounded-2xl border border-border-primary bg-bg-primary-alt p-5 text-center shadow-black/20 shadow-lg sm:p-6 md:w-[30dvw] md:max-w-[30dvw] md:shrink-0 md:self-center';
3
+ export const migrateCardClassName = 'box-border mx-auto w-full min-w-0 max-w-full rounded-2xl border border-border-primary bg-bg-primary-alt p-5 text-center shadow-black/20 shadow-lg sm:p-6';
4
4
  /**
5
5
  * Merges the default migrate card shell with optional classes (e.g. `Migrate`’s
6
6
  * `cardClassName` or a subcomponent’s `className`).
@@ -31,6 +31,8 @@ export function DepositRecordsTable(props) {
31
31
  ...next,
32
32
  }), {
33
33
  type: enabledDepositTypes?.length === 1 ? enabledDepositTypes[0] : null,
34
+ status: null,
35
+ timestamp: null,
34
36
  });
35
37
  const localeInfo = useLocaleInfo();
36
38
  const { page, hasNextPage, hasPrevPage, next, prev, rows, totalPages, loading, firstPage, } = useInfiniteQueryHelper(useDepositRecordsQuery, {
@@ -73,14 +75,14 @@ export function DepositRecordsTable(props) {
73
75
  ? { scrollbarThumb: props.className }
74
76
  : (props.className ?? {});
75
77
  return (_jsxs(_Fragment, { children: [_jsx(TableFilters, { value: {
76
- timestamp: state.timestamp,
77
- depositType: state.type,
78
- depositStatus: state.status,
78
+ timestamp: state.timestamp ?? null,
79
+ depositType: state.type ?? null,
80
+ depositStatus: state.status ?? null,
79
81
  }, onChange: (value) => {
80
82
  setState({
81
- type: value.depositType,
82
- status: value.depositStatus,
83
- timestamp: value.timestamp,
83
+ type: value.depositType ?? null,
84
+ status: value.depositStatus ?? null,
85
+ timestamp: value.timestamp ?? null,
84
86
  });
85
87
  firstPage();
86
88
  if (searchParams.has('id')) {
@@ -22,7 +22,7 @@ export function TransactionRecordsTable(props) {
22
22
  const [state, setState] = useReducer((prev, next) => ({
23
23
  ...prev,
24
24
  ...next,
25
- }), {});
25
+ }), { type: null, timestamp: null });
26
26
  const localeInfo = useLocaleInfo();
27
27
  const { page, hasNextPage, hasPrevPage, next, prev, rows, totalPages, loading, firstPage, } = useInfiniteQueryHelper(useTransactionRecordsQuery, {
28
28
  filter: {
@@ -47,12 +47,12 @@ export function TransactionRecordsTable(props) {
47
47
  ? { scrollbarThumb: props.className }
48
48
  : (props.className ?? {});
49
49
  return (_jsxs(_Fragment, { children: [_jsx(TableFilters, { value: {
50
- timestamp: state.timestamp,
51
- transactionType: state.type,
50
+ timestamp: state.timestamp ?? null,
51
+ transactionType: state.type ?? null,
52
52
  }, onChange: (value) => {
53
53
  setState({
54
- type: value.transactionType,
55
- timestamp: value.timestamp,
54
+ type: value.transactionType ?? null,
55
+ timestamp: value.timestamp ?? null,
56
56
  });
57
57
  firstPage();
58
58
  }, enabledFilters: {
@@ -31,6 +31,8 @@ export function WithdrawalRecordsTable(props) {
31
31
  ...next,
32
32
  }), {
33
33
  type: enabledWithdrawalTypes?.length === 1 ? enabledWithdrawalTypes[0] : null,
34
+ status: null,
35
+ timestamp: null,
34
36
  });
35
37
  const localeInfo = useLocaleInfo();
36
38
  const { page, hasNextPage, hasPrevPage, next, prev, rows, totalPages, loading, firstPage, } = useInfiniteQueryHelper(useWithdrawalRecordsQuery, {
@@ -73,14 +75,14 @@ export function WithdrawalRecordsTable(props) {
73
75
  ? { scrollbarThumb: props.className }
74
76
  : (props.className ?? {});
75
77
  return (_jsxs(_Fragment, { children: [_jsx(TableFilters, { value: {
76
- timestamp: state.timestamp,
77
- withdrawalType: state.type,
78
- withdrawalStatus: state.status,
78
+ timestamp: state.timestamp ?? null,
79
+ withdrawalType: state.type ?? null,
80
+ withdrawalStatus: state.status ?? null,
79
81
  }, onChange: (value) => {
80
82
  setState({
81
- type: value.withdrawalType,
82
- status: value.withdrawalStatus,
83
- timestamp: value.timestamp,
83
+ type: value.withdrawalType ?? null,
84
+ status: value.withdrawalStatus ?? null,
85
+ timestamp: value.timestamp ?? null,
84
86
  });
85
87
  firstPage();
86
88
  if (searchParams.has('id')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",