@moh-sso/data-visualizer 1.12.0 → 1.14.0

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.
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from "react";
2
+ type StatTileProps = {
3
+ label: string;
4
+ /** `null`, `undefined` or `""` renders an em dash, e.g. when the data failed to load. */
5
+ value?: number | string | null;
6
+ /** Short line under the number, e.g. "3 disabled" or "Sent 45 · Failed 0". */
7
+ helperText?: ReactNode;
8
+ loading?: boolean;
9
+ /** Optional route that opens the list behind this number. */
10
+ href?: string;
11
+ };
12
+ /** One summary number on an admin page. Put several in a `StatTileGroup`. */
13
+ export declare function StatTile({ label, value, helperText, loading, href }: StatTileProps): import("react").JSX.Element;
14
+ type StatTileGroupProps = {
15
+ /** Accessible name for the group, e.g. "System totals". */
16
+ label: string;
17
+ children: ReactNode;
18
+ };
19
+ /** Responsive row of `StatTile`s with the same spacing on every page. */
20
+ export declare function StatTileGroup({ label, children }: StatTileGroupProps): import("react").JSX.Element;
21
+ export {};
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from "react";
2
+ type TableBulkActionsProps = {
3
+ /** Number of rows currently selected. The bar is hidden when this is 0. */
4
+ totalSelected: number;
5
+ /** Clears the selection. Pass `getBatchActionProps().onCancel` from Carbon's DataTable. */
6
+ onCancel: () => void;
7
+ /** Accessible name for the toolbar, e.g. "User bulk actions". */
8
+ label?: string;
9
+ /** Shows a spinner in the bar while a bulk action runs. */
10
+ busy?: boolean;
11
+ busyLabel?: string;
12
+ /** Optional warning shown under the bar while rows are selected. */
13
+ notice?: string;
14
+ /** `TableBatchAction` buttons from `@carbon/react`. */
15
+ children: ReactNode;
16
+ };
17
+ /**
18
+ * Standard bulk-action bar for selectable admin tables: "N items selected",
19
+ * the actions, and a Cancel button that clears the selection.
20
+ */
21
+ export declare function TableBulkActions({ totalSelected, onCancel, label, busy, busyLabel, notice, children, }: TableBulkActionsProps): import("react").JSX.Element | null;
22
+ export {};
@@ -1,5 +1,7 @@
1
1
  export { DataTableShell, type DataTableHeader } from "./DataTableShell";
2
2
  export { DataTablePagination } from "./DataTablePagination";
3
3
  export { RowActionsCell } from "./RowActionsCell";
4
+ export { StatTile, StatTileGroup } from "./StatTile";
5
+ export { TableBulkActions } from "./TableBulkActions";
4
6
  export { TableEmptyState } from "./TableEmptyState";
5
7
  export { TableStatusTag } from "./TableStatusTag";
@@ -12,5 +12,7 @@ export { default as AppMenu } from "./navigation/appmenu/AppMenu.component";
12
12
  export { ClientSideNav, hasVisibleClientSideNav } from "./navigation/sidenav/ClientSideNav";
13
13
  export * from "./utils/severity";
14
14
  export * from "./utils/status";
15
+ export * from "./utils/dates";
16
+ export * from "./utils/labels";
15
17
  export * from "./theme";
16
18
  export * from "./navigation";
@@ -0,0 +1,2 @@
1
+ export declare function formatDateTime(value?: string | number | null): string;
2
+ export declare function formatRelativeTime(value?: string | number | null): string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Turns a stored code such as `PENDING`, `in_app` or `new_tab` into a
3
+ * readable label ("Pending", "In-app", "New tab"). Acronyms stay upper
4
+ * case ("sms" → "SMS"). Empty values become "—".
5
+ */
6
+ export declare function formatCodeLabel(value?: string | null): string;
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "import": "./dist/routes.js"
18
18
  }
19
19
  },
20
- "version": "1.12.0",
20
+ "version": "1.14.0",
21
21
  "license": "UNLICENSED",
22
22
  "module": "./dist/index.js",
23
23
  "files": [
@@ -34,10 +34,10 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@moh-sso/api": "^1.13.0",
38
- "@moh-sso/config": "^1.13.0",
39
- "@moh-sso/microfrontend": "^1.13.0",
40
- "@moh-sso/ui": "^1.13.0"
37
+ "@moh-sso/api": "^1.15.0",
38
+ "@moh-sso/config": "^1.15.0",
39
+ "@moh-sso/microfrontend": "^1.15.0",
40
+ "@moh-sso/ui": "^1.15.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@carbon/react": "^1.95.0",