@moh-sso/e-services 0.0.0-stage → 1.3.2
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/README.md +24 -2
- package/dist/_types/apps/e-services/src/components/eservice-empty-state.component.d.ts +8 -0
- package/dist/_types/apps/e-services/src/components/eservice-page-shell.component.d.ts +10 -0
- package/dist/_types/apps/e-services/src/index.d.ts +2 -0
- package/dist/_types/apps/e-services/src/pages/action-tracker.page.d.ts +1 -0
- package/dist/_types/apps/e-services/src/pages/activity-reporting.page.d.ts +1 -0
- package/dist/_types/apps/e-services/src/pages/budget-tracker.page.d.ts +1 -0
- package/dist/_types/apps/e-services/src/pages/clinician-outputs.page.d.ts +1 -0
- package/dist/_types/apps/e-services/src/pages/leave-absence-management.page.d.ts +1 -0
- package/dist/_types/apps/e-services/src/pages/meeting-manager.page.d.ts +1 -0
- package/dist/_types/apps/e-services/src/pages/workplans.page.d.ts +1 -0
- package/dist/_types/apps/e-services/src/root.component.d.ts +2 -0
- package/dist/_types/apps/e-services/src/routes.d.ts +2 -0
- package/dist/_types/apps/e-services/src/single-spa.d.ts +1 -0
- package/dist/_types/packages/api/src/api/baseApi.d.ts +2 -0
- package/dist/_types/packages/api/src/index.d.ts +1 -0
- package/dist/_types/packages/auth/src/api/auth.api.d.ts +531 -0
- package/dist/_types/packages/auth/src/api/health-context.api.d.ts +374 -0
- package/dist/_types/packages/auth/src/auth/AuthBootstrap.d.ts +1 -0
- package/dist/_types/packages/auth/src/auth/HealthContextProvider.d.ts +20 -0
- package/dist/_types/packages/auth/src/auth/PermissionGuard.d.ts +10 -0
- package/dist/_types/packages/auth/src/auth/auth.selectors.d.ts +896 -0
- package/dist/_types/packages/auth/src/auth/auth.slice.d.ts +14 -0
- package/dist/_types/packages/auth/src/auth/auth.types.d.ts +61 -0
- package/dist/_types/packages/auth/src/auth/login-url.d.ts +2 -0
- package/dist/_types/packages/auth/src/auth/permissions.d.ts +58 -0
- package/dist/_types/packages/auth/src/auth/rbac.d.ts +8 -0
- package/dist/_types/packages/auth/src/auth/system-launch-url.d.ts +9 -0
- package/dist/_types/packages/auth/src/auth/useAuthorization.d.ts +14 -0
- package/dist/_types/packages/auth/src/index.d.ts +14 -0
- package/dist/_types/packages/config/src/appMeta.d.ts +3 -0
- package/dist/_types/packages/config/src/index.d.ts +6 -0
- package/dist/_types/packages/config/src/lib/constants/api.constants.d.ts +178 -0
- package/dist/_types/packages/config/src/lib/constants/document-templates.d.ts +11 -0
- package/dist/_types/packages/config/src/lib/errors/errorMessages.d.ts +2 -0
- package/dist/_types/packages/config/src/lib/errors/errorSeverity.d.ts +3 -0
- package/dist/_types/packages/config/src/lib/errors/errorTypes.d.ts +1 -0
- package/dist/_types/packages/microfrontend/src/basename.d.ts +1 -0
- package/dist/_types/packages/microfrontend/src/index.d.ts +6 -0
- package/dist/_types/packages/microfrontend/src/lifecycle.d.ts +6 -0
- package/dist/_types/packages/microfrontend/src/navigation.d.ts +2 -0
- package/dist/_types/packages/microfrontend/src/props.d.ts +44 -0
- package/dist/_types/packages/microfrontend/src/react-lifecycle.d.ts +11 -0
- package/dist/_types/packages/microfrontend/src/routes.d.ts +13 -0
- package/dist/_types/packages/state/src/clients/clients.selectors.d.ts +534 -0
- package/dist/_types/packages/state/src/clients/clients.slice.d.ts +4 -0
- package/dist/_types/packages/state/src/document/documents.selectors.d.ts +1 -0
- package/dist/_types/packages/state/src/index.d.ts +29 -0
- package/dist/_types/packages/state/src/ui/ui.state.d.ts +1 -0
- package/dist/_types/packages/types/src/index.d.ts +6 -0
- package/dist/_types/packages/types/src/types/announcement-summary.types.d.ts +16 -0
- package/dist/_types/packages/types/src/types/client-role.types.d.ts +6 -0
- package/dist/_types/packages/types/src/types/client.types.d.ts +46 -0
- package/dist/_types/packages/types/src/types/document-processing.types.d.ts +1 -0
- package/dist/_types/packages/types/src/types/notifications.types.d.ts +96 -0
- package/dist/_types/packages/types/src/types/system-navigation.types.d.ts +18 -0
- package/dist/_types/packages/ui/src/accessibility/index.d.ts +1 -0
- package/dist/_types/packages/ui/src/accessibility/useFocusTrap.d.ts +10 -0
- package/dist/_types/packages/ui/src/branding/BuildMeta.d.ts +6 -0
- package/dist/_types/packages/ui/src/branding/PublicFooter.d.ts +6 -0
- package/dist/_types/packages/ui/src/branding/index.d.ts +2 -0
- package/dist/_types/packages/ui/src/data-display/DataTablePagination.d.ts +12 -0
- package/dist/_types/packages/ui/src/data-display/DataTableShell.d.ts +35 -0
- package/dist/_types/packages/ui/src/data-display/RowActionsCell.d.ts +7 -0
- package/dist/_types/packages/ui/src/data-display/TableEmptyState.d.ts +8 -0
- package/dist/_types/packages/ui/src/data-display/TableStatusTag.d.ts +8 -0
- package/dist/_types/packages/ui/src/data-display/index.d.ts +5 -0
- package/dist/_types/packages/ui/src/feedback/comingsoon/ComingSoon.d.ts +7 -0
- package/dist/_types/packages/ui/src/feedback/emptystate/EmptyState.d.ts +15 -0
- package/dist/_types/packages/ui/src/feedback/errorstate/ErrorState.d.ts +14 -0
- package/dist/_types/packages/ui/src/feedback/errorstate/MicrofrontendErrorBoundary.d.ts +16 -0
- package/dist/_types/packages/ui/src/feedback/index.d.ts +5 -0
- package/dist/_types/packages/ui/src/feedback/loadingstate/LoadingState.d.ts +5 -0
- package/dist/_types/packages/ui/src/forms/CaseFormsGrid.d.ts +1 -0
- package/dist/_types/packages/ui/src/forms/index.d.ts +1 -0
- package/dist/_types/packages/ui/src/index.d.ts +16 -0
- package/dist/_types/packages/ui/src/layout/PageShell/PageShell.d.ts +9 -0
- package/dist/_types/packages/ui/src/layout/SectionCard/SectionCard.d.ts +11 -0
- package/dist/_types/packages/ui/src/layout/index.d.ts +2 -0
- package/dist/_types/packages/ui/src/navigation/appmenu/AppGridContent.d.ts +12 -0
- package/dist/_types/packages/ui/src/navigation/appmenu/AppMenu.component.d.ts +6 -0
- package/dist/_types/packages/ui/src/navigation/appmenu/AppMenuItem.component.d.ts +13 -0
- package/dist/_types/packages/ui/src/navigation/appmenu/appMenuGroups.d.ts +11 -0
- package/dist/_types/packages/ui/src/navigation/breadcrumbs/AppBreadcrumbs.d.ts +12 -0
- package/dist/_types/packages/ui/src/navigation/breadcrumbs/BreadcrumbBar.d.ts +10 -0
- package/dist/_types/packages/ui/src/navigation/index.d.ts +2 -0
- package/dist/_types/packages/ui/src/navigation/sidenav/ClientSideNav.d.ts +14 -0
- package/dist/_types/packages/ui/src/notifications/FormInlineAlert.d.ts +7 -0
- package/dist/_types/packages/ui/src/notifications/NotificationsPanel.d.ts +14 -0
- package/dist/_types/packages/ui/src/notifications/index.d.ts +4 -0
- package/dist/_types/packages/ui/src/notifications/toast/ToastProvider.d.ts +20 -0
- package/dist/_types/packages/ui/src/notifications/toast/useToast.d.ts +20 -0
- package/dist/_types/packages/ui/src/overlays/header-panel/ReusableHeaderPanel.d.ts +17 -0
- package/dist/_types/packages/ui/src/overlays/header-panel/header-panel.context.d.ts +23 -0
- package/dist/_types/packages/ui/src/overlays/index.d.ts +4 -0
- package/dist/_types/packages/ui/src/overlays/modal/ReusableModal.d.ts +20 -0
- package/dist/_types/packages/ui/src/overlays/modal/modal.context.d.ts +14 -0
- package/dist/_types/packages/ui/src/shell/ExternalAppHeader.d.ts +22 -0
- package/dist/_types/packages/ui/src/shell/PublicHeader.component.d.ts +8 -0
- package/dist/_types/packages/ui/src/shell/UserHeader.component.d.ts +17 -0
- package/dist/_types/packages/ui/src/shell/index.d.ts +5 -0
- package/dist/_types/packages/ui/src/theme/ThemeProvider.d.ts +8 -0
- package/dist/_types/packages/ui/src/theme/index.d.ts +1 -0
- package/dist/_types/packages/ui/src/utils/severity.d.ts +22 -0
- package/dist/_types/packages/ui/src/utils/status.d.ts +1 -0
- package/dist/assets/e-services-DSyYLmlE.css +1 -0
- package/dist/assets/root.component-CP4U4iq0.js +242 -0
- package/dist/assets/root.component-CP4U4iq0.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/routes.d.ts +1 -0
- package/dist/routes.js +32 -0
- package/dist/routes.js.map +1 -0
- package/dist/single-spa.d.ts +1 -0
- package/dist/single-spa.js +32 -0
- package/dist/single-spa.js.map +1 -0
- package/package.json +52 -4
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ClientRole } from "./client-role.types";
|
|
2
|
+
export interface Client {
|
|
3
|
+
id: string;
|
|
4
|
+
clientId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
publicClient: boolean;
|
|
10
|
+
rootUrl?: string;
|
|
11
|
+
baseUrl?: string;
|
|
12
|
+
redirectUris: string[];
|
|
13
|
+
webOrigins?: string[];
|
|
14
|
+
roles?: ClientRole[];
|
|
15
|
+
attributes?: ClientAttributes;
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
updatedAt?: string;
|
|
18
|
+
}
|
|
19
|
+
export type ClientAttributes = Record<string, string | undefined>;
|
|
20
|
+
export interface CreateClientPayload {
|
|
21
|
+
clientId: string;
|
|
22
|
+
name: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
publicClient?: boolean;
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
rootUrl?: string;
|
|
28
|
+
baseUrl?: string;
|
|
29
|
+
redirectUris?: string[];
|
|
30
|
+
webOrigins?: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface UpdateClientPayload {
|
|
33
|
+
name?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
publicClient?: boolean;
|
|
37
|
+
enabled?: boolean;
|
|
38
|
+
rootUrl?: string;
|
|
39
|
+
baseUrl?: string;
|
|
40
|
+
redirectUris?: string[];
|
|
41
|
+
webOrigins?: string[];
|
|
42
|
+
}
|
|
43
|
+
export type ClientsState = {
|
|
44
|
+
items: Client[];
|
|
45
|
+
activeClientId: string | null;
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DocumentProcessType = "SURVEILLANCE_CSV_IMPORT" | "CSV_IMPORT" | "EXCEL_IMPORT" | "FHIR_IMPORT" | "USER_BULK_IMPORT" | "SURVEILLANCE_EXCEL_IMPORT" | "FACILITY_IMPORT" | "LAB_RESULT_IMPORT" | "INVENTORY_IMPORT" | "HISTORICAL_BACKFILL_IMPORT" | "DRY_RUN_IMPORT" | "ETL_IMPORT" | "ARCHIVE_IMPORT" | "IMAGE_PROCESSING" | "DOCUMENT_EXTRACTION" | "NO_OP_UPLOAD";
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Severity } from "../../../ui/src/index.js";
|
|
2
|
+
export type Notification = {
|
|
3
|
+
id: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
severity: Severity;
|
|
8
|
+
target_role?: string;
|
|
9
|
+
client_id?: string;
|
|
10
|
+
user_id?: string;
|
|
11
|
+
metadata?: Record<string, unknown>;
|
|
12
|
+
created_at: string;
|
|
13
|
+
read: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type GetNotificationsParams = {
|
|
16
|
+
unread?: boolean;
|
|
17
|
+
limit?: number;
|
|
18
|
+
offset?: number;
|
|
19
|
+
};
|
|
20
|
+
export type NotificationDeliveryStatus = "PENDING" | "PROCESSING" | "SENT" | "FAILED" | "RETRY" | "CANCELLED";
|
|
21
|
+
export type NotificationDelivery = {
|
|
22
|
+
id: string;
|
|
23
|
+
notification_id: string;
|
|
24
|
+
channel: string;
|
|
25
|
+
status: NotificationDeliveryStatus | string;
|
|
26
|
+
recipient?: Record<string, unknown>;
|
|
27
|
+
template_name?: string;
|
|
28
|
+
template_data?: Record<string, unknown>;
|
|
29
|
+
payload?: Record<string, unknown>;
|
|
30
|
+
scheduled_at?: string;
|
|
31
|
+
locked_at?: string;
|
|
32
|
+
sent_at?: string;
|
|
33
|
+
attempts: number;
|
|
34
|
+
max_attempts: number;
|
|
35
|
+
last_error?: string;
|
|
36
|
+
provider?: string;
|
|
37
|
+
provider_message_id?: string;
|
|
38
|
+
provider_status?: string;
|
|
39
|
+
provider_metadata?: Record<string, unknown>;
|
|
40
|
+
created_at: string;
|
|
41
|
+
updated_at: string;
|
|
42
|
+
};
|
|
43
|
+
export type NotificationDeliveryListParams = {
|
|
44
|
+
channel?: "in_app" | "email" | "sms" | "webhook" | string;
|
|
45
|
+
status?: NotificationDeliveryStatus | string;
|
|
46
|
+
search?: string;
|
|
47
|
+
limit?: number;
|
|
48
|
+
offset?: number;
|
|
49
|
+
};
|
|
50
|
+
export type NotificationDeliveryList = {
|
|
51
|
+
items: NotificationDelivery[];
|
|
52
|
+
total: number;
|
|
53
|
+
limit: number;
|
|
54
|
+
offset: number;
|
|
55
|
+
};
|
|
56
|
+
export type NotificationDeliveryMetric = {
|
|
57
|
+
channel: string;
|
|
58
|
+
provider?: string;
|
|
59
|
+
total: number;
|
|
60
|
+
pending: number;
|
|
61
|
+
processing: number;
|
|
62
|
+
sent: number;
|
|
63
|
+
failed: number;
|
|
64
|
+
retry: number;
|
|
65
|
+
cancelled: number;
|
|
66
|
+
avg_processing_seconds: number;
|
|
67
|
+
};
|
|
68
|
+
export type NotificationDeliveryMetrics = {
|
|
69
|
+
items: NotificationDeliveryMetric[];
|
|
70
|
+
};
|
|
71
|
+
export type TestSMSRequest = {
|
|
72
|
+
to: string;
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
export type TestSMSResponse = {
|
|
76
|
+
notification_id: string;
|
|
77
|
+
status: string;
|
|
78
|
+
};
|
|
79
|
+
export type NotificationPreferences = {
|
|
80
|
+
user_id: string;
|
|
81
|
+
email_enabled: boolean;
|
|
82
|
+
sms_enabled: boolean;
|
|
83
|
+
phone_number?: string;
|
|
84
|
+
phone_verified: boolean;
|
|
85
|
+
quiet_hours_start?: string;
|
|
86
|
+
quiet_hours_end?: string;
|
|
87
|
+
created_at?: string;
|
|
88
|
+
updated_at?: string;
|
|
89
|
+
};
|
|
90
|
+
export type UpdateNotificationPreferencesRequest = {
|
|
91
|
+
email_enabled?: boolean;
|
|
92
|
+
sms_enabled?: boolean;
|
|
93
|
+
phone_number?: string;
|
|
94
|
+
quiet_hours_start?: string;
|
|
95
|
+
quiet_hours_end?: string;
|
|
96
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type NavigationLaunchMode = "internal" | "new_tab" | "same_tab";
|
|
2
|
+
export interface SystemNavigationItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
path?: string;
|
|
6
|
+
permission?: string;
|
|
7
|
+
requiredPermissions?: string[];
|
|
8
|
+
requiredAnyPermissions?: string[];
|
|
9
|
+
order?: number;
|
|
10
|
+
icon?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Optional launcher category; otherwise inherits the system category. */
|
|
13
|
+
category?: string;
|
|
14
|
+
displayInLauncher?: boolean;
|
|
15
|
+
displayInSideNav?: boolean;
|
|
16
|
+
launchMode?: NavigationLaunchMode;
|
|
17
|
+
children?: SystemNavigationItem[];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFocusTrap } from "./useFocusTrap";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
type FocusTrapOptions = {
|
|
3
|
+
active: boolean;
|
|
4
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
5
|
+
restoreFocus?: boolean;
|
|
6
|
+
initialFocusRef?: RefObject<HTMLElement | HTMLButtonElement | null>;
|
|
7
|
+
initialFocusSelector?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function useFocusTrap({ active, containerRef, restoreFocus, initialFocusRef, initialFocusSelector, }: FocusTrapOptions): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type FooterVersionInfo = {
|
|
2
|
+
frontendVersion?: string;
|
|
3
|
+
backendVersion?: string;
|
|
4
|
+
backendUnavailable?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function PublicFooter({ frontendVersion, backendVersion, backendUnavailable, }?: FooterVersionInfo): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type DataTablePaginationProps = {
|
|
2
|
+
page: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
totalItems: number;
|
|
5
|
+
pageSizes?: number[];
|
|
6
|
+
onChange: (pagination: {
|
|
7
|
+
page: number;
|
|
8
|
+
pageSize: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function DataTablePagination({ page, pageSize, totalItems, pageSizes, onChange, }: DataTablePaginationProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type DataTableHeader = {
|
|
3
|
+
key: string;
|
|
4
|
+
header: string;
|
|
5
|
+
};
|
|
6
|
+
type DataTableShellProps<T> = {
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
rows: T[];
|
|
10
|
+
headers: DataTableHeader[];
|
|
11
|
+
getRowId: (row: T) => string;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
isFetching?: boolean;
|
|
14
|
+
loadingDescription?: string;
|
|
15
|
+
tableState?: ReactNode;
|
|
16
|
+
emptyTitle?: string;
|
|
17
|
+
emptyDescription?: string;
|
|
18
|
+
emptyActions?: ReactNode;
|
|
19
|
+
searchValue?: string;
|
|
20
|
+
resultsDescription?: string;
|
|
21
|
+
searchPlaceholder?: string;
|
|
22
|
+
onSearch?: (value: string) => void;
|
|
23
|
+
toolbarActions?: ReactNode;
|
|
24
|
+
topContent?: ReactNode;
|
|
25
|
+
filters?: ReactNode;
|
|
26
|
+
bulkActions?: ReactNode;
|
|
27
|
+
children: (args: {
|
|
28
|
+
rows: Array<T & {
|
|
29
|
+
id: string;
|
|
30
|
+
}>;
|
|
31
|
+
headers: DataTableHeader[];
|
|
32
|
+
}) => ReactNode;
|
|
33
|
+
};
|
|
34
|
+
export declare function DataTableShell<T extends object>({ title, description, rows, headers, getRowId, isLoading, isFetching, searchValue, searchPlaceholder, onSearch, resultsDescription, toolbarActions, loadingDescription, tableState, emptyTitle, emptyDescription, emptyActions, filters, topContent, bulkActions, children, }: DataTableShellProps<T>): import("react").JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type TableEmptyStateProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function TableEmptyState({ title, description, actions }: TableEmptyStateProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type TagKind = "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | "outline";
|
|
2
|
+
type TableStatusTagProps = {
|
|
3
|
+
status: string;
|
|
4
|
+
kind?: TagKind;
|
|
5
|
+
mapStatusToKind?: (status: string) => TagKind;
|
|
6
|
+
};
|
|
7
|
+
export declare function TableStatusTag({ status, kind, mapStatusToKind }: TableStatusTagProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DataTableShell, type DataTableHeader } from "./DataTableShell";
|
|
2
|
+
export { DataTablePagination } from "./DataTablePagination";
|
|
3
|
+
export { RowActionsCell } from "./RowActionsCell";
|
|
4
|
+
export { TableEmptyState } from "./TableEmptyState";
|
|
5
|
+
export { TableStatusTag } from "./TableStatusTag";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface EmptyStateProps {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
primaryAction?: {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
icon?: React.ElementType;
|
|
8
|
+
};
|
|
9
|
+
secondaryAction?: {
|
|
10
|
+
label: string;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function EmptyState({ title, description, primaryAction, secondaryAction, }: EmptyStateProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface ErrorStateProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
description: string;
|
|
4
|
+
primaryAction?: {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
8
|
+
secondaryAction?: {
|
|
9
|
+
label: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function ErrorState({ title, description, primaryAction, secondaryAction, }: ErrorStateProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
appName: string;
|
|
5
|
+
}
|
|
6
|
+
interface State {
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
}
|
|
10
|
+
export declare class MicrofrontendErrorBoundary extends Component<Props, State> {
|
|
11
|
+
state: State;
|
|
12
|
+
static getDerivedStateFromError(error: Error): State;
|
|
13
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
14
|
+
render(): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ComingSoon } from "./comingsoon/ComingSoon";
|
|
2
|
+
export { EmptyState } from "./emptystate/EmptyState";
|
|
3
|
+
export { ErrorState } from "./errorstate/ErrorState";
|
|
4
|
+
export { MicrofrontendErrorBoundary } from "./errorstate/MicrofrontendErrorBoundary";
|
|
5
|
+
export { LoadingState } from "./loadingstate/LoadingState";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CaseFormsGrid(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CaseFormsGrid } from "./CaseFormsGrid";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./forms";
|
|
2
|
+
export * from "./feedback";
|
|
3
|
+
export * from "./layout";
|
|
4
|
+
export * from "./data-display";
|
|
5
|
+
export * from "./branding";
|
|
6
|
+
export * from "./shell";
|
|
7
|
+
export * from "./overlays";
|
|
8
|
+
export * from "./notifications";
|
|
9
|
+
export * from "./accessibility";
|
|
10
|
+
export { default as AppGridContent } from "./navigation/appmenu/AppGridContent";
|
|
11
|
+
export { default as AppMenu } from "./navigation/appmenu/AppMenu.component";
|
|
12
|
+
export { ClientSideNav, hasVisibleClientSideNav } from "./navigation/sidenav/ClientSideNav";
|
|
13
|
+
export * from "./utils/severity";
|
|
14
|
+
export * from "./utils/status";
|
|
15
|
+
export * from "./theme";
|
|
16
|
+
export * from "./navigation";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type PageShellProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
actions?: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare function PageShell({ title, subtitle, actions, children }: PageShellProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type SectionCardProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: React.ElementType;
|
|
6
|
+
actions?: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function SectionCard({ title, description, icon: Icon, actions, children, className, }: SectionCardProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Client } from "../../../../types/src/index.js";
|
|
3
|
+
type AppGridContentProps = {
|
|
4
|
+
clients?: Client[];
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
isError?: boolean;
|
|
7
|
+
onSelect?: () => void;
|
|
8
|
+
onRetry?: () => void;
|
|
9
|
+
onOpenClient?: (href: string, clientId?: string) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const AppGridContent: React.FC<AppGridContentProps>;
|
|
12
|
+
export default AppGridContent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface AppTileProps {
|
|
3
|
+
icon: React.ElementType;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
href: string;
|
|
7
|
+
clientId?: string;
|
|
8
|
+
onSelect?: () => void;
|
|
9
|
+
onOpen?: (href: string, clientId?: string) => void;
|
|
10
|
+
launchMode?: "internal" | "new_tab" | "same_tab";
|
|
11
|
+
}
|
|
12
|
+
declare const AppTile: React.FC<AppTileProps>;
|
|
13
|
+
export default AppTile;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Client } from "../../../../types/src/index.js";
|
|
2
|
+
type Category = {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export type AppMenuGroup = Category & {
|
|
7
|
+
clients: Client[];
|
|
8
|
+
};
|
|
9
|
+
export declare function getAppMenuCategory(client: Client): Category;
|
|
10
|
+
export declare function groupAppMenuClients(clients: Client[]): AppMenuGroup[];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type AppBreadcrumbItem = {
|
|
2
|
+
label: string;
|
|
3
|
+
href?: string;
|
|
4
|
+
current?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type AppBreadcrumbsProps = {
|
|
7
|
+
items: AppBreadcrumbItem[];
|
|
8
|
+
className?: string;
|
|
9
|
+
separator?: string;
|
|
10
|
+
onNavigate?: (href: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function AppBreadcrumbs({ items, className, separator, onNavigate, }: AppBreadcrumbsProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AppBreadcrumbItem } from "./AppBreadcrumbs";
|
|
2
|
+
type BreadcrumbBarProps = {
|
|
3
|
+
items: AppBreadcrumbItem[];
|
|
4
|
+
onNavigate?: (href: string) => void;
|
|
5
|
+
onBack?: () => void;
|
|
6
|
+
showBackButton?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function BreadcrumbBar({ items, onNavigate, onBack, showBackButton, className, }: BreadcrumbBarProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Client } from "../../../../types/src/index.js";
|
|
2
|
+
type ClientSideNavProps = {
|
|
3
|
+
clients?: Client[];
|
|
4
|
+
activeClient?: Client | null;
|
|
5
|
+
currentPath: string;
|
|
6
|
+
onNavigate: (path: string) => void;
|
|
7
|
+
hrefPrefix?: string;
|
|
8
|
+
hasPermission?: (permission: string) => boolean;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
onToggleVisibility?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function ClientSideNav({ clients, activeClient, currentPath, onNavigate, hasPermission, visible, onToggleVisibility, hrefPrefix, }: ClientSideNavProps): import("react").JSX.Element | null;
|
|
13
|
+
export declare function hasVisibleClientSideNav(clients: Client[], hasPermission?: (permission: string) => boolean): boolean;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Notification } from "../../../types/src/index.js";
|
|
2
|
+
type Props = {
|
|
3
|
+
notifications: Notification[];
|
|
4
|
+
unreadCount?: number;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
isError?: boolean;
|
|
7
|
+
showHeading?: boolean;
|
|
8
|
+
onRetry?: () => void;
|
|
9
|
+
onMarkRead?: (id: string) => void | Promise<void>;
|
|
10
|
+
onDelete?: (id: string) => void | Promise<void>;
|
|
11
|
+
onView?: (notification: Notification) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function NotificationsPanel({ notifications, unreadCount, isLoading, isError, showHeading, onRetry, onMarkRead, onDelete, onView, }: Props): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { ToastAction } from "./useToast";
|
|
3
|
+
export type ToastKind = "success" | "error" | "info" | "warning";
|
|
4
|
+
export type Toast = {
|
|
5
|
+
id: string;
|
|
6
|
+
kind: ToastKind;
|
|
7
|
+
title: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
timeout: number;
|
|
10
|
+
dismissible: boolean;
|
|
11
|
+
actions?: ToastAction[];
|
|
12
|
+
};
|
|
13
|
+
type ToastContextType = {
|
|
14
|
+
push: (toast: Omit<Toast, "id">) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare function ToastProvider({ children }: {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export declare function useToastContext(): ToastContextType;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ToastKind = "success" | "error" | "info" | "warning";
|
|
2
|
+
export type ToastAction = {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
};
|
|
6
|
+
export type ToastOptions = {
|
|
7
|
+
title: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
kind?: ToastKind;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
dismissible?: boolean;
|
|
12
|
+
actions?: ToastAction[];
|
|
13
|
+
};
|
|
14
|
+
export declare function useToast(): {
|
|
15
|
+
show: (options: ToastOptions) => void;
|
|
16
|
+
success: (options: Omit<ToastOptions, "kind"> | string, subtitle?: string) => void;
|
|
17
|
+
error: (options: Omit<ToastOptions, "kind"> | string, subtitle?: string) => void;
|
|
18
|
+
info: (options: Omit<ToastOptions, "kind"> | string, subtitle?: string) => void;
|
|
19
|
+
warning: (options: Omit<ToastOptions, "kind"> | string, subtitle?: string) => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PanelSize } from "./header-panel.context";
|
|
2
|
+
type Props = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
content?: React.ReactNode;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
size: PanelSize;
|
|
8
|
+
primaryActionLabel?: string;
|
|
9
|
+
secondaryActionLabel?: string;
|
|
10
|
+
onPrimaryAction?: () => void;
|
|
11
|
+
onSecondaryAction?: () => void;
|
|
12
|
+
disablePrimaryAction?: boolean;
|
|
13
|
+
maximizable?: boolean;
|
|
14
|
+
defaultMaximized?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function ReusableHeaderPanel({ isOpen, title, content, onClose, size, primaryActionLabel, secondaryActionLabel, onPrimaryAction, onSecondaryAction, disablePrimaryAction, maximizable, defaultMaximized, }: Props): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type PanelSize = "sm" | "md" | "lg";
|
|
3
|
+
type OpenPanelOptions = {
|
|
4
|
+
title?: string;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
size?: PanelSize;
|
|
7
|
+
primaryActionLabel?: string;
|
|
8
|
+
secondaryActionLabel?: string;
|
|
9
|
+
onPrimaryAction?: () => void;
|
|
10
|
+
onSecondaryAction?: () => void;
|
|
11
|
+
disablePrimaryAction?: boolean;
|
|
12
|
+
maximizable?: boolean;
|
|
13
|
+
defaultMaximized?: boolean;
|
|
14
|
+
};
|
|
15
|
+
type HeaderPanelContextType = {
|
|
16
|
+
openPanel: (opts: OpenPanelOptions) => void;
|
|
17
|
+
closePanel: () => void;
|
|
18
|
+
};
|
|
19
|
+
export declare function HeaderPanelProvider({ children }: {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
export declare function useHeaderPanel(): HeaderPanelContextType;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ReusableHeaderPanel } from "./header-panel/ReusableHeaderPanel";
|
|
2
|
+
export { HeaderPanelProvider, useHeaderPanel, } from "./header-panel/header-panel.context";
|
|
3
|
+
export { ReusableModal } from "./modal/ReusableModal";
|
|
4
|
+
export { ModalProvider, useModal } from "./modal/modal.context";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ModalSize = "sm" | "md" | "lg";
|
|
3
|
+
export type ReusableModalProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
primaryAction?: {
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
kind?: "primary" | "danger";
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
secondaryAction?: {
|
|
14
|
+
label: string;
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
};
|
|
17
|
+
size?: ModalSize;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
};
|
|
20
|
+
export declare const ReusableModal: React.FC<ReusableModalProps>;
|