@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
@@ -1,3 +1,14 @@
1
+ /**
2
+ * One row of an explicit Occurrences[] series — see CreateStatePaymentRequest.occurrences and
3
+ * the State Payment Rules plan, point 3. Each occurrence carries its own Tax Period, unlike the
4
+ * legacy IsRecurring/Frequency/RecurringEndDate path, which stamps one period across every
5
+ * server-generated date.
6
+ */
7
+ export interface StatePaymentOccurrenceRequest {
8
+ taxPeriod?: string | null;
9
+ taxAmount: number;
10
+ paymentDate: string;
11
+ }
1
12
  export interface CreateStatePaymentRequest {
2
13
  entityId: number;
3
14
  state: string;
@@ -6,14 +17,17 @@ export interface CreateStatePaymentRequest {
6
17
  accountId: string;
7
18
  letterId?: string | null;
8
19
  taxYear: string;
9
- /** Optional for bill payment; required for every other payment reason. */
20
+ /** Optional for bill payment; required for every other payment reason. Legacy single-payment
21
+ * path only — omitted (may be null) when occurrences is supplied. */
10
22
  taxPeriod?: string | null;
11
- taxAmount: number;
12
- paymentDate: string;
23
+ taxAmount?: number | null;
24
+ paymentDate?: string | null;
13
25
  bankAccountDetailId: number;
14
26
  isRecurring?: boolean;
15
27
  frequency?: string | null;
16
28
  recurringEndDate?: string | null;
29
+ formName?: string | null;
30
+ occurrences?: StatePaymentOccurrenceRequest[];
17
31
  }
18
32
  export interface UpdateStatePaymentRequest {
19
33
  state: string;
@@ -27,6 +41,7 @@ export interface UpdateStatePaymentRequest {
27
41
  taxAmount: number;
28
42
  paymentDate: string;
29
43
  bankAccountDetailId: number;
44
+ formName?: string | null;
30
45
  }
31
46
  export interface StatePaymentResponse {
32
47
  statePaymentDetailId: number;
@@ -49,6 +64,7 @@ export interface StatePaymentResponse {
49
64
  recurringEndDate: string | null;
50
65
  recurringGroupId: string | null;
51
66
  createdAt: string;
67
+ formName: string | null;
52
68
  }
53
69
  export interface StatePaymentStateOption {
54
70
  code: string;
@@ -74,6 +90,12 @@ export interface StatePaymentLetterIdRule {
74
90
  example: string | null;
75
91
  message: string;
76
92
  }
93
+ /** One Deposit Frequency valid for a (State, Reason), with the Tax Periods valid under it. */
94
+ export interface StatePaymentFrequencyOption {
95
+ code: string;
96
+ label: string;
97
+ taxPeriodOptions: StatePaymentOption[];
98
+ }
77
99
  export interface StatePaymentFormMetadata {
78
100
  rulesVersion: string;
79
101
  state: string;
@@ -88,6 +110,10 @@ export interface StatePaymentFormMetadata {
88
110
  taxPeriodRequired: boolean;
89
111
  letterId: StatePaymentLetterIdRule;
90
112
  notes: string[];
113
+ frequencyMode: 'Fixed' | 'AccountAssigned' | 'NotApplicable';
114
+ maxRecurringRows: number;
115
+ sourceNote: string | null;
116
+ frequencyOptions: StatePaymentFrequencyOption[];
91
117
  }
92
118
  export interface StatePaymentFormReferenceItem {
93
119
  formName: string;
@@ -1,4 +1,11 @@
1
1
  import { CreateStatePaymentRequest, StatePaymentResponse, UpdateStatePaymentRequest } from './statePayment';
2
+ /** One row of an explicit occurrence series — draft-form (string) counterpart of
3
+ * StatePaymentOccurrenceRequest, mirroring how the other draft fields stay strings until submit. */
4
+ export interface StatePaymentDraftOccurrence {
5
+ taxPeriod: string;
6
+ taxAmount: string;
7
+ paymentDate: string;
8
+ }
2
9
  export interface StatePaymentDraft {
3
10
  statePaymentDetailId?: number;
4
11
  state: string;
@@ -17,6 +24,8 @@ export interface StatePaymentDraft {
17
24
  isRecurring?: boolean;
18
25
  frequency?: string;
19
26
  recurringEndDate?: string;
27
+ formName?: string;
28
+ additionalOccurrences?: StatePaymentDraftOccurrence[];
20
29
  }
21
30
  export interface StatePaymentFlowState {
22
31
  from?: string;
@@ -1,50 +1,54 @@
1
1
  /**
2
2
  * Tax account detail types — mirror the backend `portal/tax-accounts` contract
3
- * (TaxAccountResponse + nested Virginia). Distinct from the list-summary
4
- * `TaxAccountResponse` in ./taxAccount.ts.
3
+ * (TaxAccountResponse). One generic shape for every state; no state-specific
4
+ * sub-fields — a saved account is scoped to State + ReasonForPayment. Address
5
+ * fields aren't part of the redesigned Tax Accounts UI and are optional.
5
6
  */
6
- export interface VirginiaTaxAccountRequest {
7
- virginiaTaxAccountId: string;
8
- virginiaWithholdingAccountingId: string;
9
- unemploymentTaxAccountId: string;
10
- virginiaDepartmentOfTaxationClientNumber: string;
11
- businessLocationCode: string;
12
- franchiseTaxAccount: string;
13
- transientOccupancyTaxAccountId?: string | null;
14
- certificateOfAuthorityNumber?: string | null;
15
- licensedProfessionalEmployerEntityNumber?: string | null;
16
- }
17
7
  export interface CreateTaxAccountRequest {
18
8
  entityId: number;
19
9
  state: string;
20
- city: string;
21
- zipCode: string;
22
- address1: string;
10
+ reasonForPayment: string;
11
+ stateAccountId: string;
12
+ accountId: string;
13
+ taxYear?: string | null;
14
+ frequency?: string | null;
15
+ notes?: string | null;
16
+ city?: string | null;
17
+ zipCode?: string | null;
18
+ address1?: string | null;
23
19
  address2?: string | null;
24
- virginia?: VirginiaTaxAccountRequest | null;
25
20
  }
26
21
  export interface UpdateTaxAccountRequest {
27
22
  state?: string;
28
- city?: string;
29
- zipCode?: string;
30
- address1?: string;
23
+ reasonForPayment?: string;
24
+ stateAccountId?: string;
25
+ accountId?: string;
26
+ taxYear?: string | null;
27
+ frequency?: string | null;
28
+ notes?: string | null;
29
+ city?: string | null;
30
+ zipCode?: string | null;
31
+ address1?: string | null;
31
32
  address2?: string | null;
32
33
  status?: string;
33
- virginia?: VirginiaTaxAccountRequest | null;
34
- }
35
- export interface VirginiaTaxAccountDetailResponse extends VirginiaTaxAccountRequest {
36
- virginiaTaxAccountDetailId: number;
37
34
  }
38
35
  export interface TaxAccountDetailResponse {
39
36
  taxAccountDetailId: number;
40
37
  entityId: number;
41
38
  state: string;
42
- city: string;
43
- zipCode: string;
44
- address1: string;
39
+ reasonForPayment: string;
40
+ stateAccountId: string;
41
+ accountId: string;
42
+ taxYear: string | null;
43
+ frequency: string | null;
44
+ notes: string | null;
45
+ city: string | null;
46
+ zipCode: string | null;
47
+ address1: string | null;
45
48
  address2: string | null;
46
- status: string | null;
49
+ status: string;
47
50
  createdAt: string;
48
51
  updatedAt: string;
49
- virginia: VirginiaTaxAccountDetailResponse | null;
52
+ frequencyValid: boolean;
53
+ frequencyValidationMessage: string | null;
50
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm-zenwork/tax-remittance-ui",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
4
4
  "description": "Embeddable Tax Remittance portal — React component library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,8 +0,0 @@
1
- import { MonthlyOverview } from '../../types/dashboard';
2
- interface MonthlyOverviewSectionProps {
3
- entityId: number | null;
4
- initialOverview?: MonthlyOverview;
5
- isDashboardLoading?: boolean;
6
- }
7
- export declare function MonthlyOverviewSection({ entityId, initialOverview, isDashboardLoading, }: MonthlyOverviewSectionProps): import("react").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { DashboardPaymentsPage } from '../../types/dashboard';
2
- interface MyPaymentsTableProps {
3
- entityId: number | null;
4
- initialPayments?: DashboardPaymentsPage;
5
- isDashboardLoading?: boolean;
6
- }
7
- export declare function MyPaymentsTable({ entityId, initialPayments, isDashboardLoading, }: MyPaymentsTableProps): import("react").JSX.Element;
8
- export {};
@@ -1,21 +0,0 @@
1
- import { PaymentCategorySummary as ApiPaymentCategorySummary } from '../../types/dashboard';
2
- type SummaryAmountKey = 'submitted' | 'paid' | 'scheduled' | 'failed';
3
- interface StatItem {
4
- label: string;
5
- key: SummaryAmountKey;
6
- dotClassName: string;
7
- }
8
- interface PaymentSummaryCardProps {
9
- entityId: number | null;
10
- category: 'federal' | 'state' | 'local';
11
- title: string;
12
- subtitlePrefix: string;
13
- defaultTaxYear: number;
14
- taxYearOptions: number[];
15
- initialSummary?: ApiPaymentCategorySummary;
16
- isDashboardLoading?: boolean;
17
- stats: StatItem[];
18
- comingSoon?: boolean;
19
- }
20
- export declare function PaymentSummaryCard({ entityId, category, title, subtitlePrefix, defaultTaxYear, taxYearOptions, initialSummary, isDashboardLoading, stats, comingSoon, }: PaymentSummaryCardProps): import("react").JSX.Element;
21
- export {};
@@ -1,32 +0,0 @@
1
- import { z } from 'zod';
2
- import { TaxAccountDetailResponse } from '../../types/taxAccountDetails';
3
- declare const taxAccountSchema: z.ZodObject<{
4
- state: z.ZodString;
5
- city: z.ZodString;
6
- zipCode: z.ZodString;
7
- address1: z.ZodString;
8
- address2: z.ZodOptional<z.ZodString>;
9
- virginiaTaxAccountId: z.ZodOptional<z.ZodString>;
10
- virginiaWithholdingAccountingId: z.ZodOptional<z.ZodString>;
11
- unemploymentTaxAccountId: z.ZodOptional<z.ZodString>;
12
- virginiaDepartmentOfTaxationClientNumber: z.ZodOptional<z.ZodString>;
13
- businessLocationCode: z.ZodOptional<z.ZodString>;
14
- franchiseTaxAccount: z.ZodOptional<z.ZodString>;
15
- transientOccupancyTaxAccountId: z.ZodOptional<z.ZodString>;
16
- certificateOfAuthorityNumber: z.ZodOptional<z.ZodString>;
17
- licensedProfessionalEmployerEntityNumber: z.ZodOptional<z.ZodString>;
18
- }, z.core.$strip>;
19
- export type TaxAccountFormValues = z.infer<typeof taxAccountSchema>;
20
- interface AddTaxAccountFormProps {
21
- entityId: number;
22
- /** When set, the form edits this tax account (PATCH) instead of creating one. */
23
- taxAccountDetailId?: number;
24
- initialValues?: TaxAccountFormValues;
25
- onCancel: () => void;
26
- onSuccess?: () => void;
27
- }
28
- export declare const emptyTaxAccountValues: TaxAccountFormValues;
29
- /** Maps a fetched tax account into form values for editing. */
30
- export declare function toTaxAccountFormValues(account: TaxAccountDetailResponse): TaxAccountFormValues;
31
- export declare function AddTaxAccountForm({ entityId, taxAccountDetailId, initialValues, onCancel, onSuccess, }: AddTaxAccountFormProps): import("react").JSX.Element;
32
- export {};
@@ -1,8 +0,0 @@
1
- import { EntityDetailsResponse } from '../../types/entity';
2
- interface EditEntityModalProps {
3
- open: boolean;
4
- entity: EntityDetailsResponse;
5
- onClose: () => void;
6
- }
7
- export declare function EditEntityModal({ open, entity, onClose }: EditEntityModalProps): import('react').ReactPortal | null;
8
- export {};
@@ -1,18 +0,0 @@
1
- export declare const virginiaCities: readonly ["Alexandria", "Arlington", "Chesapeake", "Hampton", "Lynchburg", "Newport News", "Norfolk", "Richmond", "Roanoke", "Virginia Beach"];
2
- export type TaxAccountFieldName = 'virginiaTaxAccountId' | 'virginiaWithholdingAccountingId' | 'unemploymentTaxAccountId' | 'virginiaDepartmentOfTaxationClientNumber' | 'businessLocationCode' | 'franchiseTaxAccount' | 'transientOccupancyTaxAccountId' | 'certificateOfAuthorityNumber' | 'licensedProfessionalEmployerEntityNumber';
3
- export interface TaxAccountFieldDef {
4
- name: TaxAccountFieldName;
5
- label: string;
6
- required: boolean;
7
- placeholder?: string;
8
- }
9
- export interface TaxAccountFieldGroup {
10
- title: string;
11
- fields: TaxAccountFieldDef[];
12
- }
13
- /**
14
- * State-specific field sections, keyed by state code. A state with no entry
15
- * here has no state-specific card rendered — supporting a new state is adding
16
- * a key here, never a change to the form's rendering components.
17
- */
18
- export declare const STATE_TAX_FIELD_GROUPS: Partial<Record<string, TaxAccountFieldGroup[]>>;
@@ -1 +0,0 @@
1
- export declare function AddTaxAccountPage(): import("react").JSX.Element;
@@ -1,9 +0,0 @@
1
- export interface TaxAccountResponse {
2
- taxAccountId: number;
3
- entityId: number;
4
- accountName: string;
5
- federalStateId: string;
6
- paymentCount: number;
7
- formTypes: string[];
8
- status: string | null;
9
- }