@npm-zenwork/tax-remittance-ui 0.5.1 → 0.5.3

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.
@@ -17,4 +17,12 @@ interface CreateEntityDetailsResponse {
17
17
  export declare function getAllMyEntities(): Promise<EntityDetailsResponse[]>;
18
18
  export declare function createEntity(request: CreateEntityDetailsRequest): Promise<CreateEntityDetailsResponse>;
19
19
  export declare function updateEntity(entityId: number, request: UpdateEntityDetailsRequest): Promise<EntityDetailsResponse>;
20
+ /**
21
+ * Activates / deactivates an entity.
22
+ *
23
+ * The same PATCH endpoint as updateEntity — it merges only the fields present
24
+ * in the body (EntitiesController.Update), so status travels on its own rather
25
+ * than round-tripping the whole profile.
26
+ */
27
+ export declare function updateEntityStatus(entityId: number, status: string): Promise<EntityDetailsResponse>;
20
28
  export {};
@@ -9,6 +9,6 @@ interface PaymentRowMenuProps {
9
9
  isSubmitting?: boolean;
10
10
  isViewPdfLoading?: boolean;
11
11
  }
12
- /** Vertical-dots row menu — holds the actions available for the row's status. */
12
+ /** Vertical-dots row menu - holds the actions available for the row's status. */
13
13
  export declare function PaymentRowMenu(props: PaymentRowMenuProps): import("react").JSX.Element;
14
14
  export {};
@@ -9,3 +9,10 @@ export declare function getTaxPeriodYearBounds(): {
9
9
  minYear: number;
10
10
  maxYear: number;
11
11
  };
12
+ /**
13
+ * How a federal form's tax period should be read back. The form dictates the cadence:
14
+ * only 720/941 file per quarter, the annual forms (940, 943, 945, CT-1, …) file once for
15
+ * the whole tax year even though their period code carries the filing month.
16
+ */
17
+ export type FederalTaxPeriodKind = 'quarterly' | 'annual' | 'monthly';
18
+ export declare function getTaxPeriodKindForTaxForm(taxFormType: string | null | undefined): FederalTaxPeriodKind;
@@ -18,7 +18,11 @@ export interface RemittancePaymentRow {
18
18
  * gates whether the list's row-level "Submit & Pay" may submit directly (see PaymentsPage). */
19
19
  isAuthorized: boolean;
20
20
  }
21
- export declare function formatTaxPeriod(taxPeriod: string | null | undefined): string;
21
+ /**
22
+ * `taxFormType` is what makes a `YYYYMM` period readable: 202612 is Q4 on a 941 but the whole
23
+ * 2026 tax year on a 940. Without it the month is shown as-is rather than guessed at.
24
+ */
25
+ export declare function formatTaxPeriod(taxPeriod: string | null | undefined, taxFormType?: string | null): string;
22
26
  export declare function mapRemittancePaymentToRow(payment: {
23
27
  id: number;
24
28
  category: 'federal' | 'state';
@@ -30,6 +30,22 @@ interface ThemeProviderProps {
30
30
  theme?: TaxRemittanceTheme;
31
31
  children: ReactNode;
32
32
  }
33
+ /**
34
+ * The element modals, drawers, dropdowns and toasts must portal into.
35
+ *
36
+ * Do not portal to `document.body` directly. Every rule this package ships is scoped
37
+ * under `.tax-remittance-embedded` so it cannot leak into the host application, which
38
+ * means anything mounted outside that subtree receives none of it — a modal portaled
39
+ * to `document.body` renders as an unstyled static block at the end of the page, with
40
+ * no positioning, backdrop or z-index, and is effectively invisible.
41
+ *
42
+ * This root is a body-level sibling carrying the widget class and the theme variables,
43
+ * so portalled content is styled correctly while still escaping the host's overflow
44
+ * and stacking contexts the way `document.body` did.
45
+ *
46
+ * Always returns an element, so callers can hand it straight to `createPortal`.
47
+ */
48
+ export declare function usePortalRoot(): HTMLElement;
33
49
  /**
34
50
  * Injects the client's brand colors as CSS custom properties on the
35
51
  * `.tax-remittance-embedded` wrapper div.
@@ -42,6 +58,8 @@ interface ThemeProviderProps {
42
58
  * `index.css` maps Tailwind's `--color-brand-*` tokens to these vars
43
59
  * inside the `.tax-remittance-embedded` scope, so shared components
44
60
  * like `<Button>` and `<Input>` automatically respect client themes.
61
+ *
62
+ * It also owns the portal root — see `usePortalRoot`.
45
63
  */
46
64
  export declare function ThemeProvider({ theme, children }: ThemeProviderProps): import("react").JSX.Element;
47
65
  export {};