@moh-sso/config 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.
Files changed (67) hide show
  1. package/README.md +20 -2
  2. package/dist/_types/packages/config/src/appMeta.d.ts +3 -0
  3. package/dist/_types/packages/config/src/index.d.ts +6 -0
  4. package/dist/_types/packages/config/src/lib/constants/api.constants.d.ts +178 -0
  5. package/dist/_types/packages/config/src/lib/constants/document-templates.d.ts +11 -0
  6. package/dist/_types/packages/config/src/lib/errors/errorMessages.d.ts +2 -0
  7. package/dist/_types/packages/config/src/lib/errors/errorSeverity.d.ts +3 -0
  8. package/dist/_types/packages/config/src/lib/errors/errorTypes.d.ts +1 -0
  9. package/dist/_types/packages/types/src/index.d.ts +6 -0
  10. package/dist/_types/packages/types/src/types/announcement-summary.types.d.ts +16 -0
  11. package/dist/_types/packages/types/src/types/client-role.types.d.ts +6 -0
  12. package/dist/_types/packages/types/src/types/client.types.d.ts +46 -0
  13. package/dist/_types/packages/types/src/types/document-processing.types.d.ts +1 -0
  14. package/dist/_types/packages/types/src/types/notifications.types.d.ts +96 -0
  15. package/dist/_types/packages/types/src/types/system-navigation.types.d.ts +18 -0
  16. package/dist/_types/packages/ui/src/accessibility/index.d.ts +1 -0
  17. package/dist/_types/packages/ui/src/accessibility/useFocusTrap.d.ts +10 -0
  18. package/dist/_types/packages/ui/src/branding/BuildMeta.d.ts +6 -0
  19. package/dist/_types/packages/ui/src/branding/PublicFooter.d.ts +6 -0
  20. package/dist/_types/packages/ui/src/branding/index.d.ts +2 -0
  21. package/dist/_types/packages/ui/src/data-display/DataTablePagination.d.ts +12 -0
  22. package/dist/_types/packages/ui/src/data-display/DataTableShell.d.ts +35 -0
  23. package/dist/_types/packages/ui/src/data-display/RowActionsCell.d.ts +7 -0
  24. package/dist/_types/packages/ui/src/data-display/TableEmptyState.d.ts +8 -0
  25. package/dist/_types/packages/ui/src/data-display/TableStatusTag.d.ts +8 -0
  26. package/dist/_types/packages/ui/src/data-display/index.d.ts +5 -0
  27. package/dist/_types/packages/ui/src/feedback/comingsoon/ComingSoon.d.ts +7 -0
  28. package/dist/_types/packages/ui/src/feedback/emptystate/EmptyState.d.ts +15 -0
  29. package/dist/_types/packages/ui/src/feedback/errorstate/ErrorState.d.ts +14 -0
  30. package/dist/_types/packages/ui/src/feedback/errorstate/MicrofrontendErrorBoundary.d.ts +16 -0
  31. package/dist/_types/packages/ui/src/feedback/index.d.ts +5 -0
  32. package/dist/_types/packages/ui/src/feedback/loadingstate/LoadingState.d.ts +5 -0
  33. package/dist/_types/packages/ui/src/forms/CaseFormsGrid.d.ts +1 -0
  34. package/dist/_types/packages/ui/src/forms/index.d.ts +1 -0
  35. package/dist/_types/packages/ui/src/index.d.ts +16 -0
  36. package/dist/_types/packages/ui/src/layout/PageShell/PageShell.d.ts +9 -0
  37. package/dist/_types/packages/ui/src/layout/SectionCard/SectionCard.d.ts +11 -0
  38. package/dist/_types/packages/ui/src/layout/index.d.ts +2 -0
  39. package/dist/_types/packages/ui/src/navigation/appmenu/AppGridContent.d.ts +12 -0
  40. package/dist/_types/packages/ui/src/navigation/appmenu/AppMenu.component.d.ts +6 -0
  41. package/dist/_types/packages/ui/src/navigation/appmenu/AppMenuItem.component.d.ts +13 -0
  42. package/dist/_types/packages/ui/src/navigation/appmenu/appMenuGroups.d.ts +11 -0
  43. package/dist/_types/packages/ui/src/navigation/breadcrumbs/AppBreadcrumbs.d.ts +12 -0
  44. package/dist/_types/packages/ui/src/navigation/breadcrumbs/BreadcrumbBar.d.ts +10 -0
  45. package/dist/_types/packages/ui/src/navigation/index.d.ts +2 -0
  46. package/dist/_types/packages/ui/src/navigation/sidenav/ClientSideNav.d.ts +14 -0
  47. package/dist/_types/packages/ui/src/notifications/FormInlineAlert.d.ts +7 -0
  48. package/dist/_types/packages/ui/src/notifications/NotificationsPanel.d.ts +14 -0
  49. package/dist/_types/packages/ui/src/notifications/index.d.ts +4 -0
  50. package/dist/_types/packages/ui/src/notifications/toast/ToastProvider.d.ts +20 -0
  51. package/dist/_types/packages/ui/src/notifications/toast/useToast.d.ts +20 -0
  52. package/dist/_types/packages/ui/src/overlays/header-panel/ReusableHeaderPanel.d.ts +17 -0
  53. package/dist/_types/packages/ui/src/overlays/header-panel/header-panel.context.d.ts +23 -0
  54. package/dist/_types/packages/ui/src/overlays/index.d.ts +4 -0
  55. package/dist/_types/packages/ui/src/overlays/modal/ReusableModal.d.ts +20 -0
  56. package/dist/_types/packages/ui/src/overlays/modal/modal.context.d.ts +14 -0
  57. package/dist/_types/packages/ui/src/shell/ExternalAppHeader.d.ts +22 -0
  58. package/dist/_types/packages/ui/src/shell/PublicHeader.component.d.ts +8 -0
  59. package/dist/_types/packages/ui/src/shell/UserHeader.component.d.ts +17 -0
  60. package/dist/_types/packages/ui/src/shell/index.d.ts +5 -0
  61. package/dist/_types/packages/ui/src/theme/ThemeProvider.d.ts +8 -0
  62. package/dist/_types/packages/ui/src/theme/index.d.ts +1 -0
  63. package/dist/_types/packages/ui/src/utils/severity.d.ts +22 -0
  64. package/dist/_types/packages/ui/src/utils/status.d.ts +1 -0
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.js +310 -0
  67. package/package.json +33 -4
@@ -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,2 @@
1
+ export { PageShell } from "./PageShell/PageShell";
2
+ export { SectionCard } from "./SectionCard/SectionCard";
@@ -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,6 @@
1
+ import React, { type ReactNode } from "react";
2
+ type AppMenuActionProps = {
3
+ children?: ReactNode | ((closeMenu: () => void) => ReactNode);
4
+ };
5
+ declare const AppMenuAction: React.FC<AppMenuActionProps>;
6
+ export default AppMenuAction;
@@ -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,2 @@
1
+ export * from "./breadcrumbs/AppBreadcrumbs";
2
+ export * from "./breadcrumbs/BreadcrumbBar";
@@ -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,7 @@
1
+ type Props = {
2
+ kind?: "error" | "warning" | "info" | "success";
3
+ title: string;
4
+ subtitle?: string;
5
+ };
6
+ export declare function FormInlineAlert({ kind, title, subtitle }: Props): import("react").JSX.Element;
7
+ 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,4 @@
1
+ export { FormInlineAlert } from "./FormInlineAlert";
2
+ export { NotificationsPanel } from "./NotificationsPanel";
3
+ export { ToastProvider } from "./toast/ToastProvider";
4
+ export { useToast } from "./toast/useToast";
@@ -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>;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { type ReusableModalProps } from "./ReusableModal";
3
+ type ModalState = Omit<ReusableModalProps, "open"> & {
4
+ open: boolean;
5
+ };
6
+ type ModalContextType = {
7
+ openModal: (config: Omit<ModalState, "open">) => void;
8
+ closeModal: () => void;
9
+ };
10
+ export declare function ModalProvider({ children }: {
11
+ children: React.ReactNode;
12
+ }): React.JSX.Element;
13
+ export declare function useModal(): ModalContextType;
14
+ export {};
@@ -0,0 +1,22 @@
1
+ export type ExternalAppLink = {
2
+ id: string;
3
+ name: string;
4
+ /** Absolute HTTP(S) launch URL approved by the application's backend. */
5
+ href: string;
6
+ };
7
+ export type ExternalAppHeaderProps = {
8
+ appName: string;
9
+ username: string;
10
+ /** Absolute portal launcher URL, including its deployment base path. */
11
+ portalUrl: string;
12
+ /** Supply only applications this user may launch. No portal API is called here. */
13
+ applications?: ExternalAppLink[];
14
+ isLoading?: boolean;
15
+ isError?: boolean;
16
+ onRetry?: () => void;
17
+ onProfile: () => void;
18
+ /** End the local application session and initiate the application's OIDC logout. */
19
+ onLogout: () => void;
20
+ };
21
+ /** Shared MOH chrome for independently hosted React apps. Requires no portal auth/store/router. */
22
+ export declare function ExternalAppHeader({ appName, username, portalUrl, applications, isLoading, isError, onRetry, onProfile, onLogout, }: ExternalAppHeaderProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type React from "react";
2
+ type PublicHeaderProps = {
3
+ onNavigateHome?: () => void;
4
+ homeHref?: string;
5
+ onLogin?: () => void;
6
+ };
7
+ declare const PublicHeader: React.FC<PublicHeaderProps>;
8
+ export default PublicHeader;
@@ -0,0 +1,17 @@
1
+ import type React from "react";
2
+ import type { ReactNode } from "react";
3
+ export type UserHeaderProps = {
4
+ appName?: string;
5
+ homeHref?: string;
6
+ username?: string | null;
7
+ appMenu?: ReactNode;
8
+ contextSelector?: ReactNode;
9
+ onNavigateHome?: () => void;
10
+ onLogout?: () => void;
11
+ onProfile?: () => void;
12
+ navigationExpanded?: boolean;
13
+ onToggleNavigation?: () => void;
14
+ onGlobalAction?: () => void;
15
+ };
16
+ declare const UserHeader: React.FC<UserHeaderProps>;
17
+ export default UserHeader;
@@ -0,0 +1,5 @@
1
+ export { default as PublicHeader } from "./PublicHeader.component";
2
+ export { default as UserHeader } from "./UserHeader.component";
3
+ export type { UserHeaderProps } from "./UserHeader.component";
4
+ export { ExternalAppHeader } from "./ExternalAppHeader";
5
+ export type { ExternalAppHeaderProps, ExternalAppLink } from "./ExternalAppHeader";
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from "react";
2
+ type MohTheme = "white" | "g10" | "g90" | "g100";
3
+ type MohThemeProviderProps = {
4
+ children: ReactNode;
5
+ theme?: MohTheme;
6
+ };
7
+ export declare function MohThemeProvider({ children, theme }: MohThemeProviderProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export { MohThemeProvider } from "./ThemeProvider";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * ---------------------------------------------------
3
+ * Domain Severity (Business Layer)
4
+ * ---------------------------------------------------
5
+ */
6
+ export type Severity = "info" | "success" | "warning" | "critical" | "danger";
7
+ /**
8
+ * ---------------------------------------------------
9
+ * Carbon Tag Type
10
+ * ---------------------------------------------------
11
+ */
12
+ export type CarbonTagType = "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | "outline";
13
+ export declare function isSeverity(value: unknown): value is Severity;
14
+ export declare function normalizeSeverity(value?: string | null): Severity;
15
+ /**
16
+ * ---------------------------------------------------
17
+ * Public Helpers
18
+ * ---------------------------------------------------
19
+ */
20
+ export declare const getSeverityTagType: (severity?: string | null) => CarbonTagType;
21
+ export declare const getSeverityLabel: (severity?: string | null) => string;
22
+ export declare const getSeverityRank: (severity?: string | null) => number;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./_types/packages/config/src/index.js";