@npm-zenwork/tax-remittance-ui 0.2.5 → 0.3.0

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 (85) hide show
  1. package/dist/api/bankAccounts.d.ts +4 -4
  2. package/dist/api/dashboard.d.ts +3 -1
  3. package/dist/api/entities.d.ts +5 -5
  4. package/dist/api/remittancePayments.d.ts +2 -1
  5. package/dist/api/statePayments.d.ts +9 -0
  6. package/dist/api/taxAccounts.d.ts +10 -1
  7. package/dist/components/dashboard/DashboardKpiCards.d.ts +10 -0
  8. package/dist/components/dashboard/FederalPaymentsChartCard.d.ts +11 -0
  9. package/dist/components/dashboard/NeedAttentionCarousel.d.ts +6 -0
  10. package/dist/components/dashboard/PaymentsTypeCard.d.ts +7 -0
  11. package/dist/components/dashboard/RecentPaymentsCard.d.ts +6 -0
  12. package/dist/components/dashboard/RowActionsMenu.d.ts +13 -0
  13. package/dist/components/dashboard/StatePaymentsChartCard.d.ts +11 -0
  14. package/dist/components/dashboard/TaxYearSelect.d.ts +9 -0
  15. package/dist/components/dashboard/UpcomingPaymentsCard.d.ts +6 -0
  16. package/dist/components/dashboard/dashboardMockData.d.ts +63 -0
  17. package/dist/components/dashboard/dashboardOverviewMappers.d.ts +15 -0
  18. package/dist/components/dashboard/dashboardUtils.d.ts +18 -0
  19. package/dist/components/dashboard/useSetupProgress.d.ts +6 -1
  20. package/dist/components/entities/entityListUtils.d.ts +5 -14
  21. package/dist/components/forms/PhoneInputGroup.d.ts +5 -7
  22. package/dist/components/forms/SegmentedControl.d.ts +5 -5
  23. package/dist/components/onboarding/EntityAccountTypeRow.d.ts +5 -3
  24. package/dist/components/onboarding/EntityBusinessFields.d.ts +1 -3
  25. package/dist/components/onboarding/EntityPhoneField.d.ts +2 -3
  26. package/dist/components/onboarding/EntityPrimaryTaxpayerFields.d.ts +1 -2
  27. package/dist/components/onboarding/SecondaryTaxpayerSection.d.ts +4 -2
  28. package/dist/components/onboarding/SecondaryTaxpayerToggle.d.ts +10 -0
  29. package/dist/components/onboarding/useEntityForm.d.ts +5 -3
  30. package/dist/components/payments/FederalPaymentReviewPanel.d.ts +14 -0
  31. package/dist/components/payments/FederalPaymentReviewStep.d.ts +13 -0
  32. package/dist/components/payments/PaymentActionsFooter.d.ts +43 -0
  33. package/dist/components/payments/RecurringPaymentToggle.d.ts +4 -8
  34. package/dist/components/payments/RecurringPeriodRows.d.ts +4 -4
  35. package/dist/components/payments/eftpsIndividualEnrollmentConfig.d.ts +3 -3
  36. package/dist/components/settings/EditEntityForm.d.ts +12 -0
  37. package/dist/components/settings/TaxAccountDrawer.d.ts +2 -2
  38. package/dist/components/settings/taxAccountDrawerConfig.d.ts +0 -4
  39. package/dist/components/tax-forms/states/stateFormKit.d.ts +101 -0
  40. package/dist/components/tax-forms/states/virginia/VA15Form.d.ts +38 -0
  41. package/dist/components/tax-forms/states/virginia/VA15Form.preview.d.ts +2 -0
  42. package/dist/components/tax-forms/states/virginia/VA16Form.d.ts +50 -0
  43. package/dist/components/tax-forms/states/virginia/VA16Form.preview.d.ts +2 -0
  44. package/dist/components/tax-forms/states/virginia/VA5Form.d.ts +49 -0
  45. package/dist/components/tax-forms/states/virginia/VA5Form.preview.d.ts +2 -0
  46. package/dist/components/tax-forms/states/virginia/VA6Form.d.ts +49 -0
  47. package/dist/components/tax-forms/states/virginia/VA6Form.preview.d.ts +2 -0
  48. package/dist/components/tax-forms/states/virginia/VA760ESForm.d.ts +54 -0
  49. package/dist/components/tax-forms/states/virginia/VA760ESForm.preview.d.ts +2 -0
  50. package/dist/components/ui/ToastProvider.d.ts +2 -2
  51. package/dist/embedded/EmbeddedContext.d.ts +4 -1
  52. package/dist/embedded/EmbeddedWidgetBase.d.ts +3 -1
  53. package/dist/embedded/TaxRemittanceEmbedded.d.ts +6 -0
  54. package/dist/embedded/pages/EmbeddedEntityEditPage.d.ts +6 -0
  55. package/dist/index.cjs +22 -22
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.ts +2 -0
  58. package/dist/index.mjs +10850 -9252
  59. package/dist/index.mjs.map +1 -1
  60. package/dist/lib/entityFormUtils.d.ts +19 -7
  61. package/dist/lib/fieldRules.d.ts +92 -0
  62. package/dist/lib/fieldSchemas.d.ts +12 -0
  63. package/dist/lib/jwt.d.ts +10 -0
  64. package/dist/lib/paymentFrequency.d.ts +10 -0
  65. package/dist/lib/paymentStatus.d.ts +7 -0
  66. package/dist/lib/paymentsNavigation.d.ts +12 -0
  67. package/dist/lib/useElementWidth.d.ts +9 -0
  68. package/dist/pages/FederalPaymentReviewPage.d.ts +1 -0
  69. package/dist/styles.css +1 -1
  70. package/dist/types/bankAccount.d.ts +2 -0
  71. package/dist/types/createBankAccount.d.ts +2 -0
  72. package/dist/types/dashboard.d.ts +59 -0
  73. package/dist/types/entity.d.ts +3 -2
  74. package/dist/types/statePayment.d.ts +29 -3
  75. package/dist/types/statePaymentFlow.d.ts +9 -0
  76. package/dist/types/taxAccountDetails.d.ts +33 -29
  77. package/package.json +1 -1
  78. package/dist/components/dashboard/MonthlyOverviewSection.d.ts +0 -8
  79. package/dist/components/dashboard/MyPaymentsTable.d.ts +0 -8
  80. package/dist/components/dashboard/PaymentSummaryCard.d.ts +0 -21
  81. package/dist/components/settings/AddTaxAccountForm.d.ts +0 -32
  82. package/dist/components/settings/EditEntityModal.d.ts +0 -8
  83. package/dist/components/settings/taxAccountFormConfig.d.ts +0 -18
  84. package/dist/pages/AddTaxAccountPage.d.ts +0 -1
  85. package/dist/types/taxAccount.d.ts +0 -9
@@ -3,10 +3,10 @@ import { CreateBankAccountRequest, UpdateBankAccountRequest } from '../types/cre
3
3
  /**
4
4
  * The entity's bank accounts.
5
5
  *
6
- * The backend paginates this endpoint, but every `['bank-accounts', entityId]`
7
- * consumer filters/paginates the full list client-side, so this fetches every
8
- * account in one page rather than threading server-side paging through those
9
- * call sites.
6
+ * GET /portal/bank-accounts returns a paged envelope in `data`
7
+ * (BankAccountController.List). Every `['bank-accounts', entityId]` consumer
8
+ * filters/paginates client-side, so this requests one large page and unwraps
9
+ * it to a bare array rather than exposing pagination to callers.
10
10
  */
11
11
  export declare function getBankAccounts(entityId: number): Promise<BankAccountResponse[]>;
12
12
  export declare function createBankAccount(request: CreateBankAccountRequest): Promise<BankAccountResponse>;
@@ -1,5 +1,7 @@
1
- import { DashboardPaymentsPage, DashboardPaymentsQuery, DashboardResponse, MonthlyOverview, PaymentCategorySummary } from '../types/dashboard';
1
+ import { DashboardCharts, DashboardOverview, DashboardPaymentsPage, DashboardPaymentsQuery, DashboardResponse, MonthlyOverview, PaymentCategorySummary } from '../types/dashboard';
2
2
  export declare function getDashboard(entityId: number, taxYear?: number): Promise<DashboardResponse>;
3
3
  export declare function getDashboardSummary(entityId: number, category: string, taxYear: number): Promise<PaymentCategorySummary>;
4
4
  export declare function getDashboardMonthlyOverview(entityId: number, month: number, year?: number): Promise<MonthlyOverview>;
5
5
  export declare function getDashboardPayments({ entityId, search, taxYear, status, page, pageSize, }: DashboardPaymentsQuery): Promise<DashboardPaymentsPage>;
6
+ export declare function getDashboardOverview(entityId: number, taxYear?: number): Promise<DashboardOverview>;
7
+ export declare function getDashboardCharts(entityId: number, taxYear?: number): Promise<DashboardCharts>;
@@ -8,11 +8,11 @@ interface CreateEntityDetailsResponse {
8
8
  /**
9
9
  * The caller's entity list.
10
10
  *
11
- * The backend supports real search/pagination on this endpoint, but this is what
12
- * backs the shared `['entities', 'mine']` query used by EmbeddedContext, the
13
- * entity list page and the entity form — all of which filter/paginate a full
14
- * list client-side, so this fetches every entity in one page rather than
15
- * threading server-side paging through those call sites.
11
+ * GET /portal/entities/mine returns a paged envelope in `data`
12
+ * (EntitiesController.GetMine). Backs the shared `['entities', 'mine']` query
13
+ * used by EmbeddedContext, the entity list page and the entity form, all of
14
+ * which filter/paginate client-side, so this requests one large page and
15
+ * unwraps it to a bare array rather than exposing pagination to callers.
16
16
  */
17
17
  export declare function getAllMyEntities(): Promise<EntityDetailsResponse[]>;
18
18
  export declare function createEntity(request: CreateEntityDetailsRequest): Promise<CreateEntityDetailsResponse>;
@@ -11,7 +11,8 @@ export interface RemittancePaymentResponse {
11
11
  paymentDate: string;
12
12
  status: string | null;
13
13
  reason: string | null;
14
- /** Federal tax form / state reason for payment — not served by the API yet. */
14
+ /** Federal IRS form type, or the state agency form actually chosen for the payment
15
+ * (falls back to Reason for Payment when no form applies, e.g. Bill Payment). */
15
16
  formType?: string | null;
16
17
  }
17
18
  export interface RemittancePaymentStatusCounts {
@@ -18,6 +18,15 @@ export declare function getStatePaymentStates(signal?: AbortSignal): Promise<Sta
18
18
  export declare function getStatePaymentReasons(entityId: number, state: string, signal?: AbortSignal): Promise<StatePaymentReasonOption[]>;
19
19
  export declare function getStatePaymentValidationMetadata(entityId: number, state: string, reason: string, signal?: AbortSignal): Promise<StatePaymentFormMetadata>;
20
20
  export declare function getStatePaymentFormReferences(entityId: number, state: string, reason: string, signal?: AbortSignal): Promise<StatePaymentFormReferences>;
21
+ /**
22
+ * Suggests occurrence dates for a recurring series on the rule-scoped Deposit Frequency
23
+ * vocabulary (frequencyCode from validation-metadata's frequencyOptions) — a convenience the
24
+ * caller reviews/edits before submitting as explicit Occurrences[] rows. Replaces the legacy
25
+ * IsRecurring/Frequency/RecurringEndDate server-generated path; see the State Payment Rules
26
+ * plan, point 4. Rejects (422) when the frequency has no unambiguous fixed interval to generate
27
+ * from (e.g. SEMI_WEEKLY) — the caller falls back to adding rows manually in that case.
28
+ */
29
+ export declare function getStatePaymentOccurrenceDates(entityId: number, state: string, reason: string, frequencyCode: string, startDate: string, endDate: string, signal?: AbortSignal): Promise<string[]>;
21
30
  export declare function getStatePayments({ entityId, status, pageNumber, pageSize, }: GetStatePaymentsQuery): Promise<PagedResult<StatePaymentResponse>>;
22
31
  export declare function getStatePaymentStatusCounts(entityId: number): Promise<StatePaymentStatusCounts>;
23
32
  export declare function getStatePaymentById(statePaymentDetailId: number): Promise<StatePaymentResponse>;
@@ -2,10 +2,19 @@ import { CreateTaxAccountRequest, TaxAccountDetailResponse, UpdateTaxAccountRequ
2
2
  import { PagedResult } from '../types/pagination';
3
3
  export interface GetTaxAccountsQuery {
4
4
  entityId: number;
5
+ state?: string;
6
+ reasonForPayment?: string;
7
+ status?: string;
5
8
  pageNumber?: number;
6
9
  pageSize?: number;
7
10
  }
8
- export declare function getTaxAccounts({ entityId, pageNumber, pageSize, }: GetTaxAccountsQuery): Promise<PagedResult<TaxAccountDetailResponse>>;
11
+ /**
12
+ * Lists tax accounts for an entity. When `state` and `reasonForPayment` are
13
+ * both supplied, this is also the State Payment autobind lookup — the
14
+ * EntityId+State+ReasonForPayment unique index guarantees at most one item
15
+ * comes back.
16
+ */
17
+ export declare function getTaxAccounts({ entityId, state, reasonForPayment, status, pageNumber, pageSize, }: GetTaxAccountsQuery): Promise<PagedResult<TaxAccountDetailResponse>>;
9
18
  export declare function getTaxAccount(taxAccountDetailId: number): Promise<TaxAccountDetailResponse>;
10
19
  export declare function createTaxAccount(request: CreateTaxAccountRequest): Promise<TaxAccountDetailResponse>;
11
20
  export declare function updateTaxAccount(taxAccountDetailId: number, request: UpdateTaxAccountRequest): Promise<TaxAccountDetailResponse>;
@@ -0,0 +1,10 @@
1
+ import { DashboardKpi } from './dashboardMockData';
2
+ interface DashboardKpiCardsProps {
3
+ items: DashboardKpi[];
4
+ }
5
+ /**
6
+ * Top row of the redesigned dashboard: four at-a-glance figures.
7
+ * Each card is label / value / caption with no chrome beyond a hairline border.
8
+ */
9
+ export declare function DashboardKpiCards({ items }: DashboardKpiCardsProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import { TaxYearOption } from './dashboardUtils';
2
+ import { FederalQuarterPoint } from './dashboardMockData';
3
+ interface FederalPaymentsChartCardProps {
4
+ points: FederalQuarterPoint[];
5
+ /** Owned by the dashboard page — changing it refetches `points` for that year. */
6
+ taxYear: number;
7
+ taxYearOptions: TaxYearOption[];
8
+ onTaxYearChange: (taxYear: number) => void;
9
+ }
10
+ export declare function FederalPaymentsChartCard({ points, taxYear, taxYearOptions, onTaxYearChange, }: FederalPaymentsChartCardProps): import("react").JSX.Element;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ import { AttentionAlert } from './dashboardMockData';
2
+ interface NeedAttentionCarouselProps {
3
+ alerts: AttentionAlert[];
4
+ }
5
+ export declare function NeedAttentionCarousel({ alerts }: NeedAttentionCarouselProps): import("react").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { PaymentTypeBar } from './dashboardMockData';
2
+ interface PaymentsTypeCardProps {
3
+ bars: PaymentTypeBar[];
4
+ year: number;
5
+ }
6
+ export declare function PaymentsTypeCard({ bars, year }: PaymentsTypeCardProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { RecentPaymentRow } from './dashboardMockData';
2
+ interface RecentPaymentsCardProps {
3
+ payments: RecentPaymentRow[];
4
+ }
5
+ export declare function RecentPaymentsCard({ payments }: RecentPaymentsCardProps): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ export interface RowAction {
2
+ key: string;
3
+ label: string;
4
+ onSelect: () => void;
5
+ }
6
+ interface RowActionsMenuProps {
7
+ /** Accessible name, e.g. "Actions for IRS — Federal Q2 2026". */
8
+ label: string;
9
+ actions: RowAction[];
10
+ }
11
+ /** The `⋮` row menu used by the Recent and Upcoming payment lists. */
12
+ export declare function RowActionsMenu({ label, actions }: RowActionsMenuProps): import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,11 @@
1
+ import { TaxYearOption } from './dashboardUtils';
2
+ import { StatePaymentSlice } from './dashboardMockData';
3
+ interface StatePaymentsChartCardProps {
4
+ slices: StatePaymentSlice[];
5
+ /** Owned by the dashboard page — changing it refetches `slices` for that year. */
6
+ taxYear: number;
7
+ taxYearOptions: TaxYearOption[];
8
+ onTaxYearChange: (taxYear: number) => void;
9
+ }
10
+ export declare function StatePaymentsChartCard({ slices, taxYear, taxYearOptions, onTaxYearChange, }: StatePaymentsChartCardProps): import("react").JSX.Element;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import { TaxYearOption } from './dashboardUtils';
2
+ interface TaxYearSelectProps {
3
+ value: number;
4
+ options: TaxYearOption[];
5
+ onChange: (value: number) => void;
6
+ }
7
+ /** Calendar-icon year picker sitting in the Federal and State chart headers. */
8
+ export declare function TaxYearSelect({ value, options, onChange }: TaxYearSelectProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import { UpcomingPaymentRow } from './dashboardMockData';
2
+ interface UpcomingPaymentsCardProps {
3
+ payments: UpcomingPaymentRow[];
4
+ }
5
+ export declare function UpcomingPaymentsCard({ payments }: UpcomingPaymentsCardProps): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,63 @@
1
+ import { DashboardPaymentStatus } from './dashboardUtils';
2
+ export interface AttentionAlert {
3
+ /** Composite `category-id`, unique across both payment categories. */
4
+ id: string;
5
+ /** The payment this alert is about — the View / Re-Submit buttons open it. */
6
+ paymentId: number;
7
+ category: string;
8
+ amount: number;
9
+ /** Why it needs attention, e.g. `Payment Rejected`. */
10
+ reason: string;
11
+ /** Meta line parts, joined with `·` — jurisdiction, tax type, period. */
12
+ details: string[];
13
+ /** Label on the primary (red) action button. */
14
+ actionLabel: string;
15
+ }
16
+ export interface DashboardKpi {
17
+ key: string;
18
+ label: string;
19
+ value: string;
20
+ caption: string;
21
+ tone: 'default' | 'danger';
22
+ }
23
+ export interface RecentPaymentRow {
24
+ id: string;
25
+ jurisdiction: string;
26
+ period: string;
27
+ paymentDate: string;
28
+ /** Drives the badge colour; `statusLabel` is what the badge prints. */
29
+ status: DashboardPaymentStatus;
30
+ statusLabel: string;
31
+ formType: string;
32
+ amount: number;
33
+ }
34
+ export interface UpcomingPaymentRow {
35
+ id: string;
36
+ /** Three-letter month for the date chip, e.g. `JUL`. */
37
+ month: string;
38
+ /** Day of month for the date chip, e.g. `31`. */
39
+ day: string;
40
+ title: string;
41
+ dueLabel: string;
42
+ jurisdiction: string;
43
+ amount: number;
44
+ }
45
+ export interface FederalQuarterPoint {
46
+ label: string;
47
+ amount: number;
48
+ }
49
+ export interface StatePaymentSlice {
50
+ state: string;
51
+ count: number;
52
+ amount: number;
53
+ /** Donut segment + legend dot colour. Category colours, not theme colours. */
54
+ color: string;
55
+ }
56
+ export interface PaymentTypeBar {
57
+ /** Printed verbatim — the design only shows a percentage on some rows. */
58
+ label: string;
59
+ amount: number;
60
+ /** Bar fill width, 0-100. */
61
+ percent: number;
62
+ color: string;
63
+ }
@@ -0,0 +1,15 @@
1
+ import { DashboardNeedsAttentionItem, DashboardPaymentItem, DashboardUpcomingPayment, FederalQuarterAmount, StateJurisdictionAmount, StatePaymentTypeAmount } from '../../types/dashboard';
2
+ import { AttentionAlert, FederalQuarterPoint, PaymentTypeBar, RecentPaymentRow, StatePaymentSlice, UpcomingPaymentRow } from './dashboardMockData';
3
+ /** `2026-09-26` -> `09-26-2026`, matching the redesigned dashboard's table style. */
4
+ export declare function formatDashboardDate(isoDate: string): string;
5
+ /**
6
+ * item.status/statusLabel are already the backend's canonical dashboard bucket
7
+ * (`"paid" | "scheduled" | "submitted" | "failed" | "draft"`) and its display
8
+ * label — no re-derivation needed, just carried through.
9
+ */
10
+ export declare function mapRecentPaymentRow(item: DashboardPaymentItem): RecentPaymentRow;
11
+ export declare function mapUpcomingPaymentRow(payment: DashboardUpcomingPayment, today?: Date): UpcomingPaymentRow;
12
+ export declare function mapNeedsAttentionAlerts(items: DashboardNeedsAttentionItem[]): AttentionAlert[];
13
+ export declare function mapFederalQuarterPoints(rows: FederalQuarterAmount[]): FederalQuarterPoint[];
14
+ export declare function mapStatePaymentSlices(rows: StateJurisdictionAmount[]): StatePaymentSlice[];
15
+ export declare function mapPaymentTypeBars(rows: StatePaymentTypeAmount[]): PaymentTypeBar[];
@@ -20,6 +20,24 @@ export interface PaymentCategorySummary {
20
20
  percentDone: number;
21
21
  }
22
22
  export declare function formatDashboardCurrency(amount: number): string;
23
+ /**
24
+ * Currency with cents always shown. The redesigned dashboard tables and charts
25
+ * print `$12,450.00` rather than dropping `.00`, unlike formatDashboardCurrency.
26
+ */
27
+ export declare function formatDashboardAmount(amount: number): string;
28
+ export interface TaxYearOption {
29
+ /** The year sent to the charts endpoint. */
30
+ value: number;
31
+ label: string;
32
+ }
33
+ /**
34
+ * Builds the `Current TY 2026 / TY 2025 / TY 2024` choices for the chart card
35
+ * headers. The numeric `value` is what the dashboard queries key on — the
36
+ * label is display only.
37
+ */
38
+ export declare function buildTaxYearOptions(currentYear: number): TaxYearOption[];
39
+ /** Compact currency used by the State Payments legend, e.g. `$90.4k`. */
40
+ export declare function formatDashboardCompact(amount: number): string;
23
41
  export declare function normalizePaymentStatus(status: string | null): DashboardPaymentStatus;
24
42
  export declare function getStatusLabel(status: DashboardPaymentStatus, rawStatus?: string | null): string;
25
43
  export declare function mapFederalPaymentToRow(payment: FederalPaymentResponse): DashboardPaymentRow;
@@ -3,6 +3,11 @@ interface UseSetupProgressArgs {
3
3
  entityId: number | null;
4
4
  entityCount: number;
5
5
  dashboard: DashboardResponse | undefined;
6
+ /**
7
+ * Full name of the signed-in user, when the host app supplies one. Embedded
8
+ * hosts own the session, so the widget's own storage is empty there.
9
+ */
10
+ userName?: string;
6
11
  }
7
12
  export interface SetupProgress {
8
13
  hasEntity: boolean;
@@ -21,5 +26,5 @@ export interface SetupProgress {
21
26
  * are filled in, and scheduling happens later from the drafts tab. The API has
22
27
  * no separate authorization flag to read.
23
28
  */
24
- export declare function useSetupProgress({ entityId, entityCount, dashboard, }: UseSetupProgressArgs): SetupProgress;
29
+ export declare function useSetupProgress({ entityId, entityCount, dashboard, userName, }: UseSetupProgressArgs): SetupProgress;
25
30
  export {};
@@ -1,20 +1,11 @@
1
1
  import { EntityDetailsResponse } from '../../types/entity';
2
- export declare function formatEin(idNumber: string): string;
3
- export declare function formatSsn(idNumber: string): string;
4
- /** Mask an EIN for display, revealing only the last 4 digits: `**-***6789`. */
5
- export declare function maskEin(idNumber: string): string;
6
- /** Mask an SSN for display, revealing only the last 4 digits: `***-**-6789`. */
7
- export declare function maskSsn(idNumber: string): string;
8
- /** Mask a stored 9-digit id for display: SSN shape for Individual, EIN otherwise. */
9
- export declare function maskIdNumber(idNumber: string, accountType: string): string;
10
- /** Format a stored 9-digit id for display: SSN for Individual, EIN otherwise. */
11
- export declare function formatIdNumber(idNumber: string, accountType: string): string;
12
2
  /**
13
- * Format an id as the user types — strips non-digits, caps at 9 digits, and
14
- * inserts dashes for the appropriate mask (SSN `XXX-XX-XXXX`, EIN `XX-XXXXXXX`).
3
+ * Taxpayer-id and phone formatting now lives in `@/lib/fieldRules`, alongside
4
+ * the validation rules for the same fields, so the two can never drift apart.
5
+ * Re-exported here because the entity, settings and payment screens already
6
+ * import them from this module.
15
7
  */
16
- export declare function formatIdNumberInput(value: string, accountType: string): string;
17
- export declare function formatPhone(phoneNumber: string): string;
8
+ export { formatEin, formatSsn, maskEin, maskSsn, maskIdNumber, formatIdNumber, formatIdNumberInput, formatPhone, } from '../../lib/fieldRules';
18
9
  export declare function formatJoinedDate(date: string): string;
19
10
  export declare function getJoinedYear(date: string): string;
20
11
  export declare function matchesEntitySearch(entity: EntityDetailsResponse, query: string): boolean;
@@ -1,16 +1,14 @@
1
- import { InputHTMLAttributes, SelectHTMLAttributes } from 'react';
1
+ import { InputHTMLAttributes } from 'react';
2
2
  interface PhoneInputGroupProps {
3
3
  label?: string;
4
4
  required?: boolean;
5
5
  error?: string;
6
- countryCodeSelectProps: SelectHTMLAttributes<HTMLSelectElement>;
7
6
  phoneInputProps: InputHTMLAttributes<HTMLInputElement>;
8
7
  }
9
8
  /**
10
- * Country-code select + phone number input rendered as one connected control
11
- * with a shared focus ring, instead of two visually disconnected inputs.
12
- * countryCode and phoneNumber stay separate registered fields — this is a
13
- * purely visual grouping.
9
+ * Phone number input with a shared focus ring on its wrapper.
10
+ * The country code is not user-editable — forms keep it in state as "+1" and
11
+ * prefix it onto the number when building the API payload.
14
12
  */
15
- export declare function PhoneInputGroup({ label, required, error, countryCodeSelectProps, phoneInputProps, }: PhoneInputGroupProps): import("react").JSX.Element;
13
+ export declare function PhoneInputGroup({ label, required, error, phoneInputProps, }: PhoneInputGroupProps): import("react").JSX.Element;
16
14
  export {};
@@ -10,17 +10,17 @@ interface SegmentedControlProps<T extends string> {
10
10
  options: SegmentedControlOption<T>[];
11
11
  value: T;
12
12
  onChange: (value: T) => void;
13
- /** false renders compact, content-width buttons instead of stretching to fill the row. */
13
+ /** false hugs the option labels instead of filling the column. */
14
14
  fullWidth?: boolean;
15
15
  /** Fires when any option receives focus — lets a contextual help panel follow the group. */
16
16
  onFocus?: () => void;
17
17
  }
18
18
  /**
19
19
  * Accessible segmented control (WAI-ARIA radiogroup pattern) for a small,
20
- * mutually-exclusive set of options — e.g. Account Type. Renders as equal-width
21
- * bordered cards (not a compact pill toggle) so it reads clearly at any
22
- * viewport width, from a full row on desktop down to two narrow cards on
23
- * mobile. Generic — not tied to any specific option set.
20
+ * mutually-exclusive set of options — e.g. Account Type. The options share one
21
+ * bordered track and split it evenly, so the control matches the height and
22
+ * width of an input sitting beside it in the same grid row. Generic — not tied
23
+ * to any specific option set.
24
24
  */
25
25
  export declare function SegmentedControl<T extends string>({ label, required, options, value, onChange, fullWidth, onFocus, }: SegmentedControlProps<T>): import("react").JSX.Element;
26
26
  export {};
@@ -4,11 +4,13 @@ interface EntityAccountTypeRowProps {
4
4
  accountType: EntityFormValues['accountType'];
5
5
  onAccountTypeChange: (next: EntityFormValues['accountType']) => void;
6
6
  isIndividual: boolean;
7
- filingStatus: string;
8
- onFilingStatusChange: (value: string) => void;
7
+ filingStatus?: string;
8
+ onFilingStatusChange?: (value: string) => void;
9
9
  focusHelp: (key: HelpKey) => () => void;
10
10
  resetHelp: () => void;
11
+ /** Off where filing status isn't part of the payload (edit flow). */
12
+ showFilingStatus?: boolean;
11
13
  }
12
14
  /** Account Type toggle, plus Filing Status for individual accounts. */
13
- export declare function EntityAccountTypeRow({ accountType, onAccountTypeChange, isIndividual, filingStatus, onFilingStatusChange, focusHelp, resetHelp, }: EntityAccountTypeRowProps): import("react").JSX.Element;
15
+ export declare function EntityAccountTypeRow({ accountType, onAccountTypeChange, isIndividual, filingStatus, onFilingStatusChange, focusHelp, resetHelp, showFilingStatus, }: EntityAccountTypeRowProps): import("react").JSX.Element;
14
16
  export {};
@@ -6,8 +6,6 @@ interface EntityBusinessFieldsProps {
6
6
  errors: FieldErrors<EntityFormValues>;
7
7
  einRegister: UseFormRegisterReturn;
8
8
  phoneRegister: UseFormRegisterReturn;
9
- countryCodeRegister: UseFormRegisterReturn;
10
- entityTypeOptions: string[];
11
9
  accountType: string;
12
10
  idLabel: string;
13
11
  idPlaceholder: string;
@@ -15,5 +13,5 @@ interface EntityBusinessFieldsProps {
15
13
  focusHelp: (key: HelpKey) => () => void;
16
14
  }
17
15
  /** Business account fields: names, contact details, entity type and EIN. */
18
- export declare function EntityBusinessFields({ register, errors, einRegister, phoneRegister, countryCodeRegister, entityTypeOptions, accountType, idLabel, idPlaceholder, idMaxLength, focusHelp, }: EntityBusinessFieldsProps): import("react").JSX.Element;
16
+ export declare function EntityBusinessFields({ register, errors, einRegister, phoneRegister, accountType, idLabel, idPlaceholder, idMaxLength, focusHelp, }: EntityBusinessFieldsProps): import("react").JSX.Element;
19
17
  export {};
@@ -1,10 +1,9 @@
1
1
  import { UseFormRegisterReturn } from 'react-hook-form';
2
2
  interface EntityPhoneFieldProps {
3
- countryCodeRegister: UseFormRegisterReturn;
4
3
  phoneRegister: UseFormRegisterReturn;
5
4
  error?: string;
6
5
  onFocus: () => void;
7
6
  }
8
- /** Country code + 10-digit phone number, stripped to digits as the user types. */
9
- export declare function EntityPhoneField({ countryCodeRegister, phoneRegister, error, onFocus, }: EntityPhoneFieldProps): import("react").JSX.Element;
7
+ /** National phone number, stripped to digits as the user types. */
8
+ export declare function EntityPhoneField({ phoneRegister, error, onFocus }: EntityPhoneFieldProps): import("react").JSX.Element;
10
9
  export {};
@@ -5,7 +5,6 @@ interface EntityPrimaryTaxpayerFieldsProps {
5
5
  errors: FieldErrors<EntityFormValues>;
6
6
  einRegister: UseFormRegisterReturn;
7
7
  phoneRegister: UseFormRegisterReturn;
8
- countryCodeRegister: UseFormRegisterReturn;
9
8
  accountType: string;
10
9
  idLabel: string;
11
10
  idPlaceholder: string;
@@ -13,5 +12,5 @@ interface EntityPrimaryTaxpayerFieldsProps {
13
12
  resetHelp: () => void;
14
13
  }
15
14
  /** Individual account fields: the primary taxpayer's name, SSN and contact details. */
16
- export declare function EntityPrimaryTaxpayerFields({ register, errors, einRegister, phoneRegister, countryCodeRegister, accountType, idLabel, idPlaceholder, idMaxLength, resetHelp, }: EntityPrimaryTaxpayerFieldsProps): import("react").JSX.Element;
15
+ export declare function EntityPrimaryTaxpayerFields({ register, errors, einRegister, phoneRegister, accountType, idLabel, idPlaceholder, idMaxLength, resetHelp, }: EntityPrimaryTaxpayerFieldsProps): import("react").JSX.Element;
17
16
  export {};
@@ -1,5 +1,5 @@
1
1
  import { ChangeEvent } from 'react';
2
- import { AddressParts, SecondaryTaxpayer } from '../../lib/entityFormUtils';
2
+ import { AddressParts, SecondaryTaxpayer, SecondaryTaxpayerErrors } from '../../lib/entityFormUtils';
3
3
  import { StateOption } from '../../lib/useAddressReference';
4
4
  type SecondaryField = keyof Omit<SecondaryTaxpayer, 'sameAsPrimaryAddress'>;
5
5
  interface SecondaryTaxpayerSectionProps {
@@ -9,6 +9,8 @@ interface SecondaryTaxpayerSectionProps {
9
9
  country: string;
10
10
  };
11
11
  stateOptions: StateOption[];
12
+ /** Per-field messages, populated on submit. */
13
+ errors: SecondaryTaxpayerErrors;
12
14
  onFieldChange: (field: SecondaryField) => (event: ChangeEvent<HTMLInputElement | HTMLSelectElement>) => void;
13
15
  onSsnChange: (value: string) => void;
14
16
  onSameAsPrimaryChange: (checked: boolean) => void;
@@ -17,5 +19,5 @@ interface SecondaryTaxpayerSectionProps {
17
19
  * Joint-filer details, shown for Individual + "Married Filing Jointly".
18
20
  * UI-only — nothing here is submitted yet (see SecondaryTaxpayer).
19
21
  */
20
- export declare function SecondaryTaxpayerSection({ values, address, stateOptions, onFieldChange, onSsnChange, onSameAsPrimaryChange, }: SecondaryTaxpayerSectionProps): import("react").JSX.Element;
22
+ export declare function SecondaryTaxpayerSection({ values, address, stateOptions, errors, onFieldChange, onSsnChange, onSameAsPrimaryChange, }: SecondaryTaxpayerSectionProps): import("react").JSX.Element;
21
23
  export {};
@@ -0,0 +1,10 @@
1
+ interface SecondaryTaxpayerToggleProps {
2
+ checked: boolean;
3
+ onChange: (checked: boolean) => void;
4
+ }
5
+ /**
6
+ * Opt-in for the joint filer's details. Shown for Individual + "Married Filing
7
+ * Jointly"; the fields themselves stay hidden until this is ticked.
8
+ */
9
+ export declare function SecondaryTaxpayerToggle({ checked, onChange }: SecondaryTaxpayerToggleProps): import("react").JSX.Element;
10
+ export {};
@@ -20,14 +20,12 @@ export declare function useEntityForm(): {
20
20
  einRegister: import('react-hook-form').UseFormRegisterReturn<"ein">;
21
21
  phoneRegister: import('react-hook-form').UseFormRegisterReturn<"phoneNumber">;
22
22
  zipRegister: import('react-hook-form').UseFormRegisterReturn<"zipCode">;
23
- countryCodeRegister: import('react-hook-form').UseFormRegisterReturn<"countryCode">;
24
23
  accountType: "Business" | "Individual";
25
24
  isIndividual: boolean;
26
25
  isUS: boolean;
27
26
  idLabel: string;
28
27
  idPlaceholder: string;
29
28
  idMaxLength: number;
30
- entityTypeOptions: string[];
31
29
  stateOptions: import('../../lib/useAddressReference').StateOption[];
32
30
  state: string;
33
31
  zipStateMismatch: boolean;
@@ -56,7 +54,11 @@ export declare function useEntityForm(): {
56
54
  focusHelp: (key: HelpKey) => () => void;
57
55
  resetHelp: () => void;
58
56
  filingStatus: string;
59
- setFilingStatus: import('react').Dispatch<import('react').SetStateAction<string>>;
57
+ setFilingStatus: (next: string) => void;
58
+ canAddSecondaryTaxpayer: boolean;
59
+ includeSecondaryTaxpayer: boolean;
60
+ setIncludeSecondaryTaxpayer: (checked: boolean) => void;
61
+ secondaryErrors: Partial<Record<"state" | "country" | "email" | "firstName" | "lastName" | "address1" | "address2" | "city" | "zipCode" | "ssn" | "phone", string>>;
60
62
  showSecondaryTaxpayer: boolean;
61
63
  secondaryTaxpayer: SecondaryTaxpayer;
62
64
  secondaryAddress: {
@@ -0,0 +1,14 @@
1
+ import { FederalPaymentDraft } from '../../types/federalPaymentFlow';
2
+ interface FederalPaymentReviewPanelProps {
3
+ entityId: number | null;
4
+ paymentDraft: FederalPaymentDraft;
5
+ }
6
+ /**
7
+ * Read-only recap of step 1 for the Review & Submit step. Labels, asterisks and
8
+ * info copy mirror AddFederalPaymentForm so the review reads like the form the
9
+ * values came from; the values themselves are resolved through the same cached
10
+ * reference queries, falling back to the raw draft when a lookup isn't
11
+ * available (e.g. a draft opened straight from the payments list).
12
+ */
13
+ export declare function FederalPaymentReviewPanel({ entityId, paymentDraft, }: FederalPaymentReviewPanelProps): import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import { EntityDetailsResponse } from '../../types/entity';
2
+ import { FederalPaymentDraft } from '../../types/federalPaymentFlow';
3
+ interface FederalPaymentReviewStepProps {
4
+ entity: EntityDetailsResponse | null;
5
+ paymentDraft: FederalPaymentDraft;
6
+ }
7
+ /**
8
+ * Step 3 of the federal flow — a read-only recap of what steps 1 and 2 saved,
9
+ * with the final submit to the IRS. The payment and its authorization are
10
+ * already persisted as a draft by step 2, so this screen only submits.
11
+ */
12
+ export declare function FederalPaymentReviewStep({ entity, paymentDraft }: FederalPaymentReviewStepProps): import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Action row shared by the federal and state payment steps, pinned to the bottom
3
+ * of the page so the primary action stays reachable on these long forms.
4
+ *
5
+ * "Save as Draft" is a split control: the label saves and leaves, while the
6
+ * chevron opens the destructive alternative (Discard Payment) rather than
7
+ * spending a third button on it. The menu opens upward — the bar sits at the
8
+ * bottom of the viewport, so there is no room below it.
9
+ */
10
+ interface BackAction {
11
+ /** `Back` on later steps, `Cancel` on the first one. */
12
+ label: string;
13
+ onClick: () => void;
14
+ /** Later steps go back to a previous step, so they show the arrow. */
15
+ showArrow?: boolean;
16
+ disabled?: boolean;
17
+ }
18
+ interface DraftAction {
19
+ onSave: () => void;
20
+ onDiscard: () => void;
21
+ isSaving?: boolean;
22
+ disabled?: boolean;
23
+ }
24
+ interface SubmitAction {
25
+ /** `Next` on the first two steps, `Submit Payment` on the last. */
26
+ label: string;
27
+ disabled?: boolean;
28
+ isSubmitting?: boolean;
29
+ /**
30
+ * Steps that are a `<form>` leave this off and let the button submit. The
31
+ * federal review step is a plain `<div>`, so it passes its handler here.
32
+ */
33
+ onClick?: () => void;
34
+ }
35
+ interface PaymentActionsFooterProps {
36
+ back?: BackAction;
37
+ /** Omitted when the payment is being viewed rather than filled in. */
38
+ draft?: DraftAction;
39
+ /** Omitted when the payment is being viewed rather than filled in. */
40
+ submit?: SubmitAction;
41
+ }
42
+ export declare function PaymentActionsFooter({ back, draft, submit, }: PaymentActionsFooterProps): import("react").JSX.Element;
43
+ export {};
@@ -1,16 +1,12 @@
1
1
  interface RecurringPaymentToggleProps {
2
2
  enabled: boolean;
3
3
  onChange: (enabled: boolean) => void;
4
- frequency: string;
5
- endDate: string;
6
- onEndDateChange: (endDate: string) => void;
7
- endDateError?: string;
8
4
  disabled?: boolean;
9
5
  }
10
6
  /**
11
- * "Make This a Recurring Payment" panel. When enabled, the backend generates
12
- * one scheduled payment per occurrence of the chosen frequency, up to the end
13
- * date entered here.
7
+ * "Make This a Recurring Payment" panel. When enabled, the caller adds each occurrence
8
+ * explicitly ("+ Add New" in the Tax Periods & Amounts section below) — every occurrence keeps
9
+ * its own Tax Period, Tax Amount, and Payment Date, submitted together as one series.
14
10
  */
15
- export declare function RecurringPaymentToggle({ enabled, onChange, frequency, endDate, onEndDateChange, endDateError, disabled, }: RecurringPaymentToggleProps): import("react").JSX.Element;
11
+ export declare function RecurringPaymentToggle({ enabled, onChange, disabled, }: RecurringPaymentToggleProps): import("react").JSX.Element;
16
12
  export {};