@npm-zenwork/tax-remittance-ui 0.1.2 → 0.1.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.
- package/dist/embedded/EmbeddedContext.d.ts +4 -1
- package/dist/embedded/EmbeddedWidgetBase.d.ts +4 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1721 -1683
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { EntityDetailsResponse } from '../types/entity';
|
|
3
|
+
export type PaymentType = 'federal' | 'state';
|
|
3
4
|
interface EmbeddedContextValue {
|
|
4
5
|
entities: EntityDetailsResponse[];
|
|
5
6
|
isLoading: boolean;
|
|
@@ -7,11 +8,13 @@ interface EmbeddedContextValue {
|
|
|
7
8
|
selectedEntity: EntityDetailsResponse | null;
|
|
8
9
|
setSelectedEntityId: (id: number) => void;
|
|
9
10
|
refetchEntities: () => Promise<void>;
|
|
11
|
+
enabledPayments: PaymentType[];
|
|
10
12
|
}
|
|
11
13
|
interface EmbeddedContextProviderProps {
|
|
12
14
|
onOrganizationCreated?: (org: EntityDetailsResponse) => void;
|
|
15
|
+
enabledPayments?: PaymentType[];
|
|
13
16
|
children: ReactNode;
|
|
14
17
|
}
|
|
15
|
-
export declare function EmbeddedContextProvider({ onOrganizationCreated, children, }: EmbeddedContextProviderProps): import("react").JSX.Element;
|
|
18
|
+
export declare function EmbeddedContextProvider({ onOrganizationCreated, enabledPayments, children, }: EmbeddedContextProviderProps): import("react").JSX.Element;
|
|
16
19
|
export declare function useEmbeddedContext(): EmbeddedContextValue;
|
|
17
20
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MutableRefObject, ReactNode } from 'react';
|
|
2
|
+
import { PaymentType } from './EmbeddedContext';
|
|
2
3
|
import { TaxRemittanceTheme } from './ThemeProvider';
|
|
3
4
|
import { EmbeddedRouteKey } from './TaxRemittanceEmbedded';
|
|
4
5
|
import { EntityDetailsResponse } from '../types/entity';
|
|
@@ -13,6 +14,8 @@ export interface EmbeddedWidgetBaseProps {
|
|
|
13
14
|
onNavigate?: (routeKey: EmbeddedRouteKey, pathname: string) => void;
|
|
14
15
|
navigateFnRef: MutableRefObject<((path: string) => void) | null>;
|
|
15
16
|
selectEntityFnRef: MutableRefObject<((id: number) => void) | null>;
|
|
17
|
+
/** Payment types this widget instance supports. Controls which dashboard action cards appear. */
|
|
18
|
+
enabledPayments?: PaymentType[];
|
|
16
19
|
/** The <Routes> subtree specific to this widget. */
|
|
17
20
|
children: ReactNode;
|
|
18
21
|
}
|
|
@@ -26,4 +29,4 @@ export interface EmbeddedWidgetBaseProps {
|
|
|
26
29
|
*
|
|
27
30
|
* Children should be a <Routes> element with the widget-specific route tree.
|
|
28
31
|
*/
|
|
29
|
-
export declare function EmbeddedWidgetBase({ appKey, accessToken, apiBaseUrl, theme, onSessionExpired, onOrganizationCreated, onNavigate, navigateFnRef, selectEntityFnRef, children, }: EmbeddedWidgetBaseProps): import("react").JSX.Element;
|
|
32
|
+
export declare function EmbeddedWidgetBase({ appKey, accessToken, apiBaseUrl, theme, onSessionExpired, onOrganizationCreated, onNavigate, navigateFnRef, selectEntityFnRef, enabledPayments, children, }: EmbeddedWidgetBaseProps): import("react").JSX.Element;
|