@npm-zenwork/tax-remittance-ui 0.12.2 → 0.13.1
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.
- package/dist/api/federalPayments.d.ts +1 -0
- package/dist/api/statePayments.d.ts +1 -0
- package/dist/components/dashboard/dashboardOverviewMappers.d.ts +3 -2
- package/dist/components/forms/CustomSelect.d.ts +3 -1
- package/dist/components/payments/PaymentRowMenu.d.ts +1 -0
- package/dist/components/payments/PaymentTableRow.d.ts +2 -1
- package/dist/components/payments/SettlementDatePicker.d.ts +3 -1
- package/dist/components/payments/federalPaymentUtils.d.ts +6 -1
- package/dist/components/payments/paymentsTableConfig.d.ts +1 -1
- package/dist/components/payments/settlementDateRules.d.ts +10 -4
- package/dist/components/payments/statePaymentReasonRules.d.ts +1 -0
- package/dist/components/ui/ConfirmDialog.d.ts +26 -0
- package/dist/index.cjs +32 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +12415 -12187
- package/dist/index.mjs.map +1 -1
- package/dist/lib/bankAccountInputRules.d.ts +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -22,3 +22,4 @@ export declare function getFederalTaxTypeCodes(formType: string): Promise<Federa
|
|
|
22
22
|
export declare function createFederalPayment(request: CreateFederalPaymentRequest): Promise<FederalPaymentResponse>;
|
|
23
23
|
export declare function updateFederalPayment(federalPaymentId: number, request: UpdateFederalPaymentRequest): Promise<FederalPaymentResponse>;
|
|
24
24
|
export declare function submitFederalPayment(federalPaymentId: number): Promise<FederalPaymentResponse>;
|
|
25
|
+
export declare function blockFederalPayment(federalPaymentId: number): Promise<FederalPaymentResponse>;
|
|
@@ -41,3 +41,4 @@ export declare function getStatePaymentById(statePaymentDetailId: number): Promi
|
|
|
41
41
|
export declare function createStatePayment(request: CreateStatePaymentRequest): Promise<StatePaymentResponse>;
|
|
42
42
|
export declare function updateStatePayment(statePaymentDetailId: number, request: UpdateStatePaymentRequest): Promise<StatePaymentResponse>;
|
|
43
43
|
export declare function submitStatePayment(statePaymentDetailId: number, authorization?: StatePaymentAuthorizationRequest): Promise<StatePaymentResponse>;
|
|
44
|
+
export declare function blockStatePayment(statePaymentDetailId: number): Promise<StatePaymentResponse>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DashboardNeedsAttentionItem, DashboardPaymentItem, DashboardUpcomingPayment, FederalQuarterAmount, StateJurisdictionAmount, StatePaymentTypeAmount } from '../../types/dashboard';
|
|
2
2
|
import { AttentionAlert, FederalQuarterPoint, PaymentTypeBar, RecentPaymentRow, StatePaymentSlice, UpcomingPaymentRow } from './dashboardMockData';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { formatDisplayDate } from '../payments/federalPaymentUtils';
|
|
4
|
+
/** `2026-09-26` -> `09/26/2026` — the app-wide MM/DD/YYYY display format. */
|
|
5
|
+
export declare const formatDashboardDate: typeof formatDisplayDate;
|
|
5
6
|
/**
|
|
6
7
|
* item.status/statusLabel are already the backend's canonical dashboard bucket
|
|
7
8
|
* (`"paid" | "scheduled" | "submitted" | "failed" | "draft"`) and its display
|
|
@@ -28,6 +28,8 @@ interface CustomSelectProps {
|
|
|
28
28
|
size?: 'md' | 'sm';
|
|
29
29
|
/** Icon pinned inside the control's left edge, as on the tax-year picker. */
|
|
30
30
|
leadingIcon?: ReactNode;
|
|
31
|
+
/** Shows a filter box atop the list — for long lists like the 50+ states. */
|
|
32
|
+
searchable?: boolean;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
35
|
* The one dropdown in the app. Every select goes through it so hover/focus/selected
|
|
@@ -36,5 +38,5 @@ interface CustomSelectProps {
|
|
|
36
38
|
* can't restyle, and can't show a badge (see the Reason for Payment "Coming Soon"
|
|
37
39
|
* case) at all. Change it here and every dropdown changes with it.
|
|
38
40
|
*/
|
|
39
|
-
export declare function CustomSelect({ value, onChange, options, placeholder, disabled, hasError, loading, loadingLabel, label, required, error, id, ariaLabel, size, leadingIcon, }: CustomSelectProps): import("react").JSX.Element;
|
|
41
|
+
export declare function CustomSelect({ value, onChange, options, placeholder, disabled, hasError, loading, loadingLabel, label, required, error, id, ariaLabel, size, leadingIcon, searchable, }: CustomSelectProps): import("react").JSX.Element;
|
|
40
42
|
export {};
|
|
@@ -9,6 +9,7 @@ interface PaymentTableRowProps {
|
|
|
9
9
|
onEdit: () => void;
|
|
10
10
|
onViewPdf: () => void;
|
|
11
11
|
onSubmit: () => void;
|
|
12
|
+
onCancel?: () => void;
|
|
12
13
|
}
|
|
13
|
-
export declare function PaymentTableRow({ row, layout, isSubmitting, isViewPdfLoading, onView, onEdit, onViewPdf, onSubmit, }: PaymentTableRowProps): import("react").JSX.Element;
|
|
14
|
+
export declare function PaymentTableRow({ row, layout, isSubmitting, isViewPdfLoading, onView, onEdit, onViewPdf, onSubmit, onCancel, }: PaymentTableRowProps): import("react").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -3,6 +3,8 @@ interface SettlementDatePickerProps {
|
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
hasError?: boolean;
|
|
6
|
+
/** Business days of lead time before the earliest selectable date (state payments: T+2). */
|
|
7
|
+
leadBusinessDays?: number;
|
|
6
8
|
}
|
|
7
|
-
export declare function SettlementDatePicker({ value, onChange, disabled, hasError, }: SettlementDatePickerProps): import("react").JSX.Element;
|
|
9
|
+
export declare function SettlementDatePicker({ value, onChange, disabled, hasError, leadBusinessDays, }: SettlementDatePickerProps): import("react").JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -2,8 +2,13 @@ export { getMinSettlementDate } from './settlementDateRules';
|
|
|
2
2
|
export declare function maskAccountNumber(accountNumber: string): string;
|
|
3
3
|
/** `XXXX-1234` — the mask used by the bank account cards and pickers. */
|
|
4
4
|
export declare function maskAccountNumberDashed(accountNumber: string): string;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The app's one display format for a date: ISO `2026-08-18` (or a full ISO
|
|
7
|
+
* timestamp) → `08/18/2026`. Returns the input unchanged if unparseable.
|
|
8
|
+
*/
|
|
6
9
|
export declare function formatDisplayDate(isoDate: string): string;
|
|
10
|
+
/** A `Date` in the same `MM/DD/YYYY` display format. */
|
|
11
|
+
export declare function formatDisplayDateFromDate(date: Date): string;
|
|
7
12
|
export declare function getTaxPeriodOptions(): Array<{
|
|
8
13
|
value: string;
|
|
9
14
|
label: string;
|
|
@@ -3,7 +3,7 @@ import { ComponentType, SVGProps } from 'react';
|
|
|
3
3
|
export type PaymentStatus = 'drafts' | 'scheduled' | 'submitted' | 'rejected' | 'paid';
|
|
4
4
|
/** Tabs on the Tax Payments table — every bucket, plus the unfiltered "All". */
|
|
5
5
|
export type PaymentTab = 'all' | PaymentStatus;
|
|
6
|
-
export type PaymentActionType = 'draft-actions' | 'view-pdf' | 'view-link' | 'rejected-actions';
|
|
6
|
+
export type PaymentActionType = 'draft-actions' | 'view-pdf' | 'view-link' | 'rejected-actions' | 'cancel-only';
|
|
7
7
|
export declare const statusTabs: {
|
|
8
8
|
key: PaymentTab;
|
|
9
9
|
label: string;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export declare const SETTLEMENT_DATE_NOON_CUTOFF_HOUR = 12;
|
|
2
|
+
/** State payments settle T+2: the earliest date is two business days after today. */
|
|
3
|
+
export declare const STATE_SETTLEMENT_LEAD_BUSINESS_DAYS = 2;
|
|
2
4
|
export declare function toDateString(date: Date): string;
|
|
3
5
|
export declare function parseDateString(value: string): Date | null;
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Earliest selectable date. With no lead time: today before noon, otherwise
|
|
8
|
+
* tomorrow (Tax1099). With `leadBusinessDays`: that many weekdays after today.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getMinSettlementDate(reference?: Date, leadBusinessDays?: number): string;
|
|
6
11
|
/** Latest selectable date: one year from today (Tax1099). */
|
|
7
12
|
export declare function getMaxSettlementDate(reference?: Date): string;
|
|
8
13
|
/** Latest selectable date of birth for a minimum age (inclusive). */
|
|
@@ -16,7 +21,8 @@ export declare function getMaxDateOfBirth(minimumAge?: number, reference?: Date)
|
|
|
16
21
|
*/
|
|
17
22
|
export declare function isAtLeastAge(value: string, minimumAge: number, reference?: Date): boolean;
|
|
18
23
|
export declare function isWeekday(date: Date): boolean;
|
|
19
|
-
export declare function isSettlementDateSelectable(date: Date, reference?: Date): boolean;
|
|
20
|
-
export declare function isValidSettlementDate(value: string, reference?: Date): boolean;
|
|
24
|
+
export declare function isSettlementDateSelectable(date: Date, reference?: Date, leadBusinessDays?: number): boolean;
|
|
25
|
+
export declare function isValidSettlementDate(value: string, reference?: Date, leadBusinessDays?: number): boolean;
|
|
26
|
+
export declare function isValidStateSettlementDate(value: string, reference?: Date): boolean;
|
|
21
27
|
export declare function formatSettlementMonthLabel(year: number, monthIndex: number): string;
|
|
22
28
|
export declare function getCalendarDays(year: number, monthIndex: number): Array<Date | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COMING_SOON_REASON_CODES: Set<string>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface ConfirmDialogProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
confirmLabel: string;
|
|
6
|
+
cancelLabel: string;
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
/** Destructive styling on the confirm button — red outline, not filled, so the safer
|
|
10
|
+
* Cancel path stays the visually prominent one. Defaults to true — this component only
|
|
11
|
+
* exists today for destructive confirmations. */
|
|
12
|
+
danger?: boolean;
|
|
13
|
+
/** Disables both buttons and shows a spinner on confirm while a request is
|
|
14
|
+
* in flight, so a second click can't fire a duplicate submission. */
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Generic confirm/cancel modal — same portal + escape-to-close + role="dialog" shape as
|
|
19
|
+
* BankConnectionMethodModal.tsx, generalized for any destructive confirmation (first use:
|
|
20
|
+
* "Block this scheduled payment?"). Layout follows the design reference: centered warning
|
|
21
|
+
* badge, centered title/description, and the destructive action rendered as a lighter
|
|
22
|
+
* outlined button (left) next to the prominent solid Cancel button (right) — the safe path
|
|
23
|
+
* stays visually dominant, not the destructive one.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ConfirmDialog({ open, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, danger, isLoading, }: ConfirmDialogProps): import('react').ReactPortal | null;
|
|
26
|
+
export {};
|