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

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 (70) 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/taxAccounts.d.ts +10 -1
  5. package/dist/components/dashboard/DashboardKpiCards.d.ts +10 -0
  6. package/dist/components/dashboard/FederalPaymentsChartCard.d.ts +11 -0
  7. package/dist/components/dashboard/NeedAttentionCarousel.d.ts +6 -0
  8. package/dist/components/dashboard/PaymentsTypeCard.d.ts +7 -0
  9. package/dist/components/dashboard/RecentPaymentsCard.d.ts +6 -0
  10. package/dist/components/dashboard/RowActionsMenu.d.ts +13 -0
  11. package/dist/components/dashboard/StatePaymentsChartCard.d.ts +11 -0
  12. package/dist/components/dashboard/TaxYearSelect.d.ts +9 -0
  13. package/dist/components/dashboard/UpcomingPaymentsCard.d.ts +6 -0
  14. package/dist/components/dashboard/dashboardMockData.d.ts +63 -0
  15. package/dist/components/dashboard/dashboardOverviewMappers.d.ts +15 -0
  16. package/dist/components/dashboard/dashboardUtils.d.ts +18 -0
  17. package/dist/components/dashboard/useSetupProgress.d.ts +6 -1
  18. package/dist/components/entities/entityListUtils.d.ts +5 -14
  19. package/dist/components/forms/PhoneInputGroup.d.ts +5 -7
  20. package/dist/components/forms/SegmentedControl.d.ts +5 -5
  21. package/dist/components/onboarding/EntityAccountTypeRow.d.ts +5 -3
  22. package/dist/components/onboarding/EntityBusinessFields.d.ts +1 -3
  23. package/dist/components/onboarding/EntityPhoneField.d.ts +2 -3
  24. package/dist/components/onboarding/EntityPrimaryTaxpayerFields.d.ts +1 -2
  25. package/dist/components/onboarding/SecondaryTaxpayerSection.d.ts +4 -2
  26. package/dist/components/onboarding/SecondaryTaxpayerToggle.d.ts +10 -0
  27. package/dist/components/onboarding/useEntityForm.d.ts +5 -3
  28. package/dist/components/payments/FederalPaymentReviewPanel.d.ts +14 -0
  29. package/dist/components/payments/FederalPaymentReviewStep.d.ts +13 -0
  30. package/dist/components/payments/PaymentActionsFooter.d.ts +43 -0
  31. package/dist/components/payments/eftpsIndividualEnrollmentConfig.d.ts +3 -3
  32. package/dist/components/settings/EditEntityForm.d.ts +12 -0
  33. package/dist/components/settings/TaxAccountDrawer.d.ts +2 -2
  34. package/dist/components/settings/taxAccountDrawerConfig.d.ts +0 -4
  35. package/dist/components/tax-forms/states/virginia/VA16Form.d.ts +53 -0
  36. package/dist/components/tax-forms/states/virginia/VA16Form.preview.d.ts +2 -0
  37. package/dist/components/ui/ToastProvider.d.ts +2 -2
  38. package/dist/embedded/EmbeddedContext.d.ts +4 -1
  39. package/dist/embedded/EmbeddedWidgetBase.d.ts +3 -1
  40. package/dist/embedded/TaxRemittanceEmbedded.d.ts +6 -0
  41. package/dist/embedded/pages/EmbeddedEntityEditPage.d.ts +6 -0
  42. package/dist/index.cjs +22 -22
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.ts +2 -0
  45. package/dist/index.mjs +8240 -7750
  46. package/dist/index.mjs.map +1 -1
  47. package/dist/lib/entityFormUtils.d.ts +19 -7
  48. package/dist/lib/fieldRules.d.ts +92 -0
  49. package/dist/lib/fieldSchemas.d.ts +12 -0
  50. package/dist/lib/jwt.d.ts +10 -0
  51. package/dist/lib/paymentFrequency.d.ts +10 -0
  52. package/dist/lib/paymentStatus.d.ts +7 -0
  53. package/dist/lib/paymentsNavigation.d.ts +12 -0
  54. package/dist/lib/useElementWidth.d.ts +9 -0
  55. package/dist/pages/FederalPaymentReviewPage.d.ts +1 -0
  56. package/dist/styles.css +1 -1
  57. package/dist/types/bankAccount.d.ts +2 -0
  58. package/dist/types/createBankAccount.d.ts +2 -0
  59. package/dist/types/dashboard.d.ts +59 -0
  60. package/dist/types/entity.d.ts +3 -2
  61. package/dist/types/taxAccountDetails.d.ts +31 -29
  62. package/package.json +1 -1
  63. package/dist/components/dashboard/MonthlyOverviewSection.d.ts +0 -8
  64. package/dist/components/dashboard/MyPaymentsTable.d.ts +0 -8
  65. package/dist/components/dashboard/PaymentSummaryCard.d.ts +0 -21
  66. package/dist/components/settings/AddTaxAccountForm.d.ts +0 -32
  67. package/dist/components/settings/EditEntityModal.d.ts +0 -8
  68. package/dist/components/settings/taxAccountFormConfig.d.ts +0 -18
  69. package/dist/pages/AddTaxAccountPage.d.ts +0 -1
  70. package/dist/types/taxAccount.d.ts +0 -9
@@ -1,50 +1,52 @@
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;
50
52
  }
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.2.6",
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
- }