@npm-zenwork/tax-remittance-ui 0.2.6 → 0.4.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.
@@ -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 {
@@ -1,4 +1,4 @@
1
- import { CreateStatePaymentRequest, StatePaymentFormMetadata, StatePaymentFormReferences, StatePaymentReasonOption, StatePaymentResponse, StatePaymentStateOption, UpdateStatePaymentRequest } from '../types/statePayment';
1
+ import { CreateStatePaymentRequest, StatePaymentFormMetadata, StatePaymentFormReferences, StatePaymentOption, StatePaymentReasonOption, StatePaymentResponse, StatePaymentStateOption, UpdateStatePaymentRequest } from '../types/statePayment';
2
2
  import { PagedResult } from '../types/pagination';
3
3
  import { PaymentStatus } from '../components/payments/paymentsTableConfig';
4
4
  export interface StatePaymentStatusCounts {
@@ -18,6 +18,23 @@ 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[]>;
30
+ /**
31
+ * Recomputes Tax Period options for a specific Deposit Frequency and Tax Year. The
32
+ * validation-metadata response's frequencyOptions[].taxPeriodOptions already carries a
33
+ * current-calendar-year default; call this once the caller has picked a different Tax Year —
34
+ * leap years and weekday alignment shift date-range boundaries year to year for some
35
+ * frequencies (Weekly, Semi-weekly, Quarter-monthly).
36
+ */
37
+ export declare function getStatePaymentTaxPeriods(entityId: number, state: string, reason: string, frequencyCode: string, taxYear: number, signal?: AbortSignal): Promise<StatePaymentOption[]>;
21
38
  export declare function getStatePayments({ entityId, status, pageNumber, pageSize, }: GetStatePaymentsQuery): Promise<PagedResult<StatePaymentResponse>>;
22
39
  export declare function getStatePaymentStatusCounts(entityId: number): Promise<StatePaymentStatusCounts>;
23
40
  export declare function getStatePaymentById(statePaymentDetailId: number): Promise<StatePaymentResponse>;
@@ -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 {};
@@ -17,10 +17,10 @@ interface RecurringPeriodRowsProps {
17
17
  /**
18
18
  * Extra tax period / amount / date rows for a recurring schedule.
19
19
  *
20
- * UI-only for now: StatePaymentDraft and CreateStatePaymentRequest each hold a
21
- * single period, so only the first row (owned by the form itself) is
22
- * submitted. These rows capture the intended schedule until the API accepts
23
- * one.
20
+ * Each row becomes its own occurrence in CreateStatePaymentRequest.occurrences on submit,
21
+ * alongside the primary row owned by the form itself — see AddStatePaymentForm's toDraft /
22
+ * statePaymentFlow's toCreateStatePaymentRequest. Using these rows takes over from the legacy
23
+ * server-generated Frequency/End Date schedule (they're mutually exclusive on the backend).
24
24
  */
25
25
  export declare function RecurringPeriodRows({ rows, taxPeriodOptions, onChange, onRemove, onAdd, disabled, }: RecurringPeriodRowsProps): import("react").JSX.Element;
26
26
  interface PeriodRowDeleteButtonProps {
@@ -0,0 +1,101 @@
1
+ import { ReactNode } from 'react';
2
+ export interface AmountParts {
3
+ dollars: string;
4
+ cents: string;
5
+ }
6
+ /** The white "paper" a return is laid out on. */
7
+ export declare function FormSheet({ children }: {
8
+ children: ReactNode;
9
+ }): import("react").JSX.Element;
10
+ /** Outer rule around a group of `BoxedRow`s. */
11
+ export declare function BoxedGroup({ children }: {
12
+ children: ReactNode;
13
+ }): import("react").JSX.Element;
14
+ /**
15
+ * One ruled row. `columns` is a grid template matching the printed cell widths.
16
+ * VA-15 runs its city/state/ZIP labels over a single unbroken fill, so the
17
+ * vertical rules are optional.
18
+ */
19
+ export declare function BoxedRow({ columns, dividers, children, }: {
20
+ columns?: string;
21
+ dividers?: boolean;
22
+ children: ReactNode;
23
+ }): import("react").JSX.Element;
24
+ /**
25
+ * Caption-over-value cell — the agency's boxed field.
26
+ *
27
+ * `filled` draws the value on the pale blue band the fillable vouchers print
28
+ * (VA-15); without it the value sits on plain paper (VA-16).
29
+ */
30
+ export declare function BoxedField({ label, value, filled, }: {
31
+ label: string;
32
+ value?: string;
33
+ filled?: boolean;
34
+ }): import("react").JSX.Element;
35
+ /** The OCR line the agency prints across the return. */
36
+ export declare function ScanLine({ value }: {
37
+ value: string;
38
+ }): import("react").JSX.Element;
39
+ /** Dollars box, decimal point, cents box — the split money field, read-only. */
40
+ export declare function AmountBox({ amount, label }: {
41
+ amount: AmountParts;
42
+ label: string;
43
+ }): import("react").JSX.Element;
44
+ /**
45
+ * The same field, filled in by the taxpayer. White rather than filled so a line
46
+ * that wants an entry reads differently from one the payment already answered.
47
+ */
48
+ export declare function AmountInput({ amount, label, onChange, }: {
49
+ amount: AmountParts;
50
+ label: string;
51
+ onChange: (amount: AmountParts) => void;
52
+ }): import("react").JSX.Element;
53
+ /** Read-only box or input, chosen by whether the caller passes a handler. */
54
+ export declare function AmountField({ amount, label, onChange, }: {
55
+ amount: AmountParts;
56
+ label: string;
57
+ onChange?: (amount: AmountParts) => void;
58
+ }): import("react").JSX.Element;
59
+ /**
60
+ * A rule with its caption underneath, as the return prints it. Supply
61
+ * `onChange` for the lines the taxpayer signs and dates; leave it off for
62
+ * anything the payment already answered.
63
+ */
64
+ export declare function SignatureLine({ caption, value, placeholder, onChange, maxLength, }: {
65
+ caption: string;
66
+ value?: string;
67
+ placeholder?: string;
68
+ onChange?: (value: string) => void;
69
+ maxLength?: number;
70
+ }): import("react").JSX.Element;
71
+ export type FormMode = 'preview' | 'edit';
72
+ /**
73
+ * A return opens in preview: nothing is editable and it cannot be submitted,
74
+ * so a filer reads what the payment produced before touching anything. Edit
75
+ * unlocks the taxpayer-entered fields and turns into Cancel.
76
+ */
77
+ export declare function FormActions({ mode, onBack, onEdit, onCancel, onSubmit, submitLabel, isSubmitting, }: {
78
+ mode: FormMode;
79
+ onBack?: () => void;
80
+ onEdit: () => void;
81
+ onCancel: () => void;
82
+ onSubmit?: () => void;
83
+ submitLabel: string;
84
+ isSubmitting?: boolean;
85
+ }): import("react").JSX.Element;
86
+ /**
87
+ * One numbered money line: `3. Adjustment Total [ 2,450 . 00 ]`.
88
+ *
89
+ * `columns` lets a form match its own printed proportions — VA-5 gives the
90
+ * amount more room than VA-16 does.
91
+ */
92
+ export declare function AmountLine({ number, label, hint, amount, onAmountChange, columns, }: {
93
+ number: number;
94
+ label: string;
95
+ /** Small print under the label, e.g. `(See Instructions)`. */
96
+ hint?: string;
97
+ amount: AmountParts;
98
+ /** Supplied for lines the taxpayer fills in; omitted for payment-bound lines. */
99
+ onAmountChange?: (amount: AmountParts) => void;
100
+ columns?: string;
101
+ }): import("react").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { AmountParts } from '../stateFormKit';
2
+ /** Filled in from the state payment — displayed, never edited here. */
3
+ export interface VA15BoundData {
4
+ /** Printed under the title, e.g. `315`. */
5
+ docId: string;
6
+ /** The quarter this voucher falls in, as printed. */
7
+ quarterlyPeriodEnding: string;
8
+ /** The OCR line across the middle of the voucher. */
9
+ scanLine: string;
10
+ accountNumber: string;
11
+ name: string;
12
+ address: string;
13
+ city: string;
14
+ state: string;
15
+ zipCode: string;
16
+ /** The payment being remitted — the voucher's only figure. */
17
+ totalAmountDue: AmountParts;
18
+ }
19
+ /** What the taxpayer completes on the voucher. */
20
+ export interface VA15EditableValues {
21
+ signature: string;
22
+ signatureDate: string;
23
+ phoneNumber: string;
24
+ }
25
+ interface VA15FormProps {
26
+ data: VA15BoundData;
27
+ /** Starting entries — anything omitted starts blank. */
28
+ initialValues?: Partial<VA15EditableValues>;
29
+ /** Fires on every keystroke with the complete set of entries. */
30
+ onValuesChange?: (values: VA15EditableValues) => void;
31
+ /** Leaves the voucher. Omit to hide the Back button. */
32
+ onBack?: () => void;
33
+ /** Offered only once the voucher is in edit mode. */
34
+ onSubmit?: (values: VA15EditableValues) => void;
35
+ isSubmitting?: boolean;
36
+ }
37
+ export declare function VA15Form({ data, initialValues, onValuesChange, onBack, onSubmit, isSubmitting, }: VA15FormProps): import("react").JSX.Element;
38
+ export {};
@@ -0,0 +1,2 @@
1
+ import { VA15BoundData } from './VA15Form';
2
+ export declare const VA15_TEMPORARY_BOUND_DATA: VA15BoundData;
@@ -1,7 +1,4 @@
1
- export interface AmountParts {
2
- dollars: string;
3
- cents: string;
4
- }
1
+ import { AmountParts } from '../stateFormKit';
5
2
  /** Filled in from the state payment — displayed, never edited here. */
6
3
  export interface VA16BoundData {
7
4
  /** Printed top-right, e.g. `316`. */
@@ -0,0 +1,49 @@
1
+ import { AmountParts } from '../stateFormKit';
2
+ /** Filled in from the state payment — displayed, never edited here. */
3
+ export interface VA5BoundData {
4
+ /** Printed under the title, e.g. `355`. */
5
+ docId: string;
6
+ /** Filing frequency printed beside the Doc ID — `M` monthly, `Q` quarterly. */
7
+ filingFrequency: string;
8
+ /** Period end, as printed: `03 / 31 / 2026`. */
9
+ period: string;
10
+ dueDate: string;
11
+ /** The OCR line across the middle of the return. */
12
+ scanLine: string;
13
+ accountNumber: string;
14
+ fein: string;
15
+ name: string;
16
+ address: string;
17
+ city: string;
18
+ state: string;
19
+ zipCode: string;
20
+ /** Line 1 — the payment's withheld tax. */
21
+ incomeTaxWithheld: AmountParts;
22
+ }
23
+ /** Money lines 2–6, which the taxpayer completes. */
24
+ export interface VA5EditableAmounts {
25
+ previousPeriodAdjustments: AmountParts;
26
+ adjustmentTotal: AmountParts;
27
+ penalty: AmountParts;
28
+ interest: AmountParts;
29
+ totalAmountDue: AmountParts;
30
+ }
31
+ export interface VA5EditableValues extends VA5EditableAmounts {
32
+ signature: string;
33
+ signatureDate: string;
34
+ phoneNumber: string;
35
+ }
36
+ interface VA5FormProps {
37
+ data: VA5BoundData;
38
+ /** Starting entries — anything omitted starts blank. */
39
+ initialValues?: Partial<VA5EditableValues>;
40
+ /** Fires on every keystroke with the complete set of entries. */
41
+ onValuesChange?: (values: VA5EditableValues) => void;
42
+ /** Leaves the return. Omit to hide the Back button. */
43
+ onBack?: () => void;
44
+ /** Offered only once the return is in edit mode. */
45
+ onSubmit?: (values: VA5EditableValues) => void;
46
+ isSubmitting?: boolean;
47
+ }
48
+ export declare function VA5Form({ data, initialValues, onValuesChange, onBack, onSubmit, isSubmitting, }: VA5FormProps): import("react").JSX.Element;
49
+ export {};
@@ -0,0 +1,2 @@
1
+ import { VA5BoundData } from './VA5Form';
2
+ export declare const VA5_TEMPORARY_BOUND_DATA: VA5BoundData;
@@ -0,0 +1,49 @@
1
+ import { AmountParts } from '../stateFormKit';
2
+ /** Filled in from the state payment — displayed, never edited here. */
3
+ export interface VA6BoundData {
4
+ /** Printed under the title, e.g. `306`. */
5
+ docId: string;
6
+ /** The year being summarised, as printed. */
7
+ calendarYear: string;
8
+ dueDate: string;
9
+ /** The OCR line across the middle of the return. */
10
+ scanLine: string;
11
+ accountNumber: string;
12
+ fein: string;
13
+ name: string;
14
+ address: string;
15
+ city: string;
16
+ state: string;
17
+ zipCode: string;
18
+ }
19
+ /** What the taxpayer completes on the return. */
20
+ export interface VA6EditableValues {
21
+ /** Lines 1–12, one per month, January first. */
22
+ monthlyPayments: AmountParts[];
23
+ /** 13 — Add Lines 1–12. */
24
+ totalPayments: AmountParts;
25
+ /** 14 — Total VA Tax Withheld. */
26
+ totalTaxWithheld: AmountParts;
27
+ /** 15 — Lines 13–14. */
28
+ additionalPayment: AmountParts;
29
+ paidElectronically: boolean;
30
+ /** 16 — count of W-2 and 1099 statements, not a money value. */
31
+ statementCount: string;
32
+ signature: string;
33
+ signatureDate: string;
34
+ phoneNumber: string;
35
+ }
36
+ interface VA6FormProps {
37
+ data: VA6BoundData;
38
+ /** Starting entries — anything omitted starts blank. */
39
+ initialValues?: Partial<VA6EditableValues>;
40
+ /** Fires on every keystroke with the complete set of entries. */
41
+ onValuesChange?: (values: VA6EditableValues) => void;
42
+ /** Leaves the return. Omit to hide the Back button. */
43
+ onBack?: () => void;
44
+ /** Offered only once the return is in edit mode. */
45
+ onSubmit?: (values: VA6EditableValues) => void;
46
+ isSubmitting?: boolean;
47
+ }
48
+ export declare function VA6Form({ data, initialValues, onValuesChange, onBack, onSubmit, isSubmitting, }: VA6FormProps): import("react").JSX.Element;
49
+ export {};
@@ -0,0 +1,2 @@
1
+ import { VA6BoundData } from './VA6Form';
2
+ export declare const VA6_TEMPORARY_BOUND_DATA: VA6BoundData;
@@ -0,0 +1,54 @@
1
+ import { AmountParts } from '../stateFormKit';
2
+ /** A Part I line is answered once per column. */
3
+ export interface ColumnPair {
4
+ /** Column A — spouse, when filing Status 4 on Form 760PY. */
5
+ a: AmountParts;
6
+ /** Column B — yourself; used by all other filers. */
7
+ b: AmountParts;
8
+ }
9
+ /** Filled in from the state payment — displayed, never edited here. */
10
+ export interface VA760ESBoundData {
11
+ /** The year being estimated. Every year printed on the worksheet derives from it. */
12
+ taxYear: string;
13
+ }
14
+ /** Part I — computed separately for each column. */
15
+ export interface VA760ESPairValues {
16
+ adjustedGrossIncome: ColumnPair;
17
+ itemizedDeductions: ColumnPair;
18
+ standardDeduction: ColumnPair;
19
+ childCareExpenses: ColumnPair;
20
+ personalExemptions: ColumnPair;
21
+ deductionsTotal: ColumnPair;
22
+ taxableIncome: ColumnPair;
23
+ incomeTax: ColumnPair;
24
+ taxAdjustments: ColumnPair;
25
+ estimatedIncomeTax: ColumnPair;
26
+ }
27
+ export interface VA760ESEditableValues extends VA760ESPairValues {
28
+ /** 10 — Line 9, Column A plus Column B. */
29
+ totalEstimatedTax: AmountParts;
30
+ /** 11 — the amount from Line 10. */
31
+ estimatedTax: AmountParts;
32
+ /** 12 — expected withholding for the year. */
33
+ expectedWithholding: AmountParts;
34
+ /** 13 — Line 11 less Line 12. */
35
+ estimatedTaxDue: AmountParts;
36
+ /** 14 — a count of payments, not a money value. */
37
+ numberOfPayments: string;
38
+ /** 15 — the installment to enclose payment for. */
39
+ installmentAmount: AmountParts;
40
+ }
41
+ interface VA760ESFormProps {
42
+ data: VA760ESBoundData;
43
+ /** Starting entries — anything omitted starts blank. */
44
+ initialValues?: Partial<VA760ESEditableValues>;
45
+ /** Fires on every keystroke with the complete set of entries. */
46
+ onValuesChange?: (values: VA760ESEditableValues) => void;
47
+ /** Leaves the worksheet. Omit to hide the Back button. */
48
+ onBack?: () => void;
49
+ /** Offered only once the worksheet is in edit mode. */
50
+ onSubmit?: (values: VA760ESEditableValues) => void;
51
+ isSubmitting?: boolean;
52
+ }
53
+ export declare function VA760ESForm({ data, initialValues, onValuesChange, onBack, onSubmit, isSubmitting, }: VA760ESFormProps): import("react").JSX.Element;
54
+ export {};
@@ -0,0 +1,2 @@
1
+ import { VA760ESBoundData } from './VA760ESForm';
2
+ export declare const VA760ES_TEMPORARY_BOUND_DATA: VA760ESBoundData;