@e-llm-studio/federated-dashboard-components 2.2.7 → 2.2.9-rca-test
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/ExecutiveDashboard/ExecutiveDashboardWrapper.js +1 -1
- package/dist/ExecutiveDashboard/api/insightsApi.js +2 -0
- package/dist/ExecutiveDashboard/api/insightsApi.js.map +1 -0
- package/dist/ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.js +1 -1
- package/dist/ExecutiveDashboard/components/ExecutiveDashboard.js +1 -1
- package/dist/ExecutiveDashboard/components/Graph/Graph.js +1 -1
- package/dist/ExecutiveDashboard/components/Graph/LineChart.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/AgCharts.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/AgCharts.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/AgReport.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/AgReport.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/CommentsThread.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/CommentsThread.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/InsightTabs.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/InsightTabs.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/InsightsContext.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/InsightsContext.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/L1Report.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/L1Report.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/NeedsAttention.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/NeedsAttention.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/ReportDrawer.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/ReportDrawer.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/RowDetail.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/RowDetail.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/agPrimitives.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/agPrimitives.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/insightsContextCore.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/insightsContextCore.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/insightsUtils.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/insightsUtils.js.map +1 -0
- package/dist/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.js +1 -1
- package/dist/ExecutiveDashboard/utils/sectionOrder.js +1 -1
- package/dist/cjs/ExecutiveDashboard/ExecutiveDashboardWrapper.js +1 -1
- package/dist/cjs/ExecutiveDashboard/api/insightsApi.js +2 -0
- package/dist/cjs/ExecutiveDashboard/api/insightsApi.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/ExecutiveDashboard.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Graph/Graph.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Graph/LineChart.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/AgCharts.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/AgCharts.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/AgReport.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/AgReport.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/CommentsThread.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/CommentsThread.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/InsightTabs.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/InsightTabs.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/InsightsContext.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/InsightsContext.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/L1Report.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/L1Report.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/NeedsAttention.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/NeedsAttention.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/ReportDrawer.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/ReportDrawer.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/RowDetail.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/RowDetail.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/agPrimitives.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/agPrimitives.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/insightsContextCore.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/insightsContextCore.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/insightsUtils.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/insightsUtils.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.js +1 -1
- package/dist/cjs/ExecutiveDashboard/utils/sectionOrder.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/ExecutiveDashboard/ExecutiveDashboardWrapper.d.ts +1 -1
- package/dist/types/ExecutiveDashboard/ExecutiveDashboardWrapper.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/TestExecutiveDashboard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/api/insightsApi.d.ts +148 -0
- package/dist/types/ExecutiveDashboard/api/insightsApi.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.d.ts +12 -1
- package/dist/types/ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/ExecutiveDashboard.d.ts +12 -1
- package/dist/types/ExecutiveDashboard/components/ExecutiveDashboard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Graph/Graph.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Graph/LineChart.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Graph/types.d.ts +15 -0
- package/dist/types/ExecutiveDashboard/components/Graph/types.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/AgCharts.d.ts +66 -0
- package/dist/types/ExecutiveDashboard/components/Insights/AgCharts.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/AgReport.d.ts +109 -0
- package/dist/types/ExecutiveDashboard/components/Insights/AgReport.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/CommentsThread.d.ts +6 -0
- package/dist/types/ExecutiveDashboard/components/Insights/CommentsThread.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.d.ts +65 -0
- package/dist/types/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/InsightTabs.d.ts +17 -0
- package/dist/types/ExecutiveDashboard/components/Insights/InsightTabs.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/InsightsContext.d.ts +28 -0
- package/dist/types/ExecutiveDashboard/components/Insights/InsightsContext.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/L1Report.d.ts +32 -0
- package/dist/types/ExecutiveDashboard/components/Insights/L1Report.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/NeedsAttention.d.ts +6 -0
- package/dist/types/ExecutiveDashboard/components/Insights/NeedsAttention.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/ReportDrawer.d.ts +13 -0
- package/dist/types/ExecutiveDashboard/components/Insights/ReportDrawer.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/RowDetail.d.ts +12 -0
- package/dist/types/ExecutiveDashboard/components/Insights/RowDetail.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/agPrimitives.d.ts +147 -0
- package/dist/types/ExecutiveDashboard/components/Insights/agPrimitives.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/insightsContextCore.d.ts +61 -0
- package/dist/types/ExecutiveDashboard/components/Insights/insightsContextCore.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/insightsUtils.d.ts +56 -0
- package/dist/types/ExecutiveDashboard/components/Insights/insightsUtils.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.d.ts +12 -2
- package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/index.d.ts +1 -1
- package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/index.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/types.d.ts +20 -2
- package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/types.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/types/index.d.ts +24 -0
- package/dist/types/ExecutiveDashboard/types/index.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/types/insights.d.ts +475 -0
- package/dist/types/ExecutiveDashboard/types/insights.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/utils/sectionOrder.d.ts.map +1 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { InsightTabConfig, InsightsUiConfig } from "../../types/insights";
|
|
3
|
+
import "./agPrimitives.css";
|
|
4
|
+
import "./insights.css";
|
|
5
|
+
export interface InsightTabsProps {
|
|
6
|
+
tabs: InsightTabConfig[];
|
|
7
|
+
insightsConfig?: InsightsUiConfig | null;
|
|
8
|
+
/** Kept for hosts that pass it; the AI Governance layout has no filter button here. */
|
|
9
|
+
onOpenFilters?: () => void;
|
|
10
|
+
activeFilterCount?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The insights tabs, as the AI Governance leaderboard tabs: a pill strip,
|
|
14
|
+
* a one-line description and a search box, then the tab's L2 Report.
|
|
15
|
+
*/
|
|
16
|
+
export default function InsightTabs({ tabs, insightsConfig }: InsightTabsProps): import("react").JSX.Element | null;
|
|
17
|
+
//# sourceMappingURL=InsightTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightTabs.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/InsightTabs.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAe,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAM5F,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC;AAoExB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACzB,cAAc,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzC,uFAAuF;IACvF,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,gBAAgB,sCAoH7E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { InsightsUiConfig } from "../../types/insights";
|
|
3
|
+
import { type InsightsReportTarget } from "./insightsContextCore";
|
|
4
|
+
export { useInsights } from "./insightsContextCore";
|
|
5
|
+
export type { InsightsContextValue, InsightsReportTarget } from "./insightsContextCore";
|
|
6
|
+
export interface InsightsProviderProps {
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
configId?: string;
|
|
9
|
+
accessToken?: string;
|
|
10
|
+
startDate: Date;
|
|
11
|
+
endDate: Date;
|
|
12
|
+
workingDaysOnly?: boolean;
|
|
13
|
+
filtersActive?: boolean;
|
|
14
|
+
insights?: InsightsUiConfig | null;
|
|
15
|
+
/** Tier 1's primary graph line, so reports lead with it. */
|
|
16
|
+
headlineKpiId?: string | null;
|
|
17
|
+
/** The graph's day filter opens on working days. */
|
|
18
|
+
defaultWorkingDays?: boolean;
|
|
19
|
+
/** The report open in the drawer, or null. Held by the dashboard so its graph markers can open it too. */
|
|
20
|
+
reportTarget: InsightsReportTarget | null;
|
|
21
|
+
onReportTargetChange: (target: InsightsReportTarget | null) => void;
|
|
22
|
+
/** Incremented by the dashboard refresh button so every insights query reloads. */
|
|
23
|
+
refreshRevision?: number;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/** Shares the insights API settings with every Decision Advantage piece, and hosts the report drawer. */
|
|
27
|
+
export declare function InsightsProvider({ baseUrl, configId, accessToken, startDate, endDate, workingDaysOnly, filtersActive, insights, headlineKpiId, defaultWorkingDays, reportTarget, onReportTargetChange, refreshRevision, children, }: InsightsProviderProps): React.JSX.Element;
|
|
28
|
+
//# sourceMappingURL=InsightsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightsContext.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/InsightsContext.tsx"],"names":[],"mappings":"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1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { InsightsDriver } from "../../types/insights";
|
|
3
|
+
import "./agPrimitives.css";
|
|
4
|
+
/** The AI Governance entity-detail visual column used after opening a driver. */
|
|
5
|
+
export declare function EntityDetailVisuals({ nodeKey, label, kpiId, dataDay, tier2Kpis }: {
|
|
6
|
+
nodeKey: string;
|
|
7
|
+
label: string;
|
|
8
|
+
kpiId: string;
|
|
9
|
+
dataDay: string;
|
|
10
|
+
tier2Kpis?: string[];
|
|
11
|
+
}): import("react").JSX.Element | null;
|
|
12
|
+
/**
|
|
13
|
+
* The full L1 Report for one day, opened from a point on the trend, laid out
|
|
14
|
+
* as AI Governance's report popup: the analysis on the left, the trend and
|
|
15
|
+
* activity on the right. Clicking another point moves the popup to that day.
|
|
16
|
+
*/
|
|
17
|
+
export declare function L1ReportModal({ day: openedDay, workingDays: initialWorkingDays, initialAttention, initialDriver, onClose }: {
|
|
18
|
+
day: string;
|
|
19
|
+
workingDays: boolean;
|
|
20
|
+
initialAttention?: boolean;
|
|
21
|
+
initialDriver?: InsightsDriver | null;
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
}): import("react").JSX.Element | null;
|
|
24
|
+
/**
|
|
25
|
+
* The L1 Report on the dashboard: the latest report's Summary, Decision
|
|
26
|
+
* Advantage and Top Drivers on the left; the headline number's trend with its
|
|
27
|
+
* averages, User Activity and Correlation on the right. Takes the place of
|
|
28
|
+
* the executive graph while Decision Advantage is on. Clicking a day on the
|
|
29
|
+
* trend opens that day's full report.
|
|
30
|
+
*/
|
|
31
|
+
export default function L1Report(): import("react").JSX.Element | null;
|
|
32
|
+
//# sourceMappingURL=L1Report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"L1Report.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/L1Report.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,cAAc,EAA+C,MAAM,sBAAsB,CAAC;AAoBxG,OAAO,oBAAoB,CAAC;AAqO5B,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,sCAuC1K;AAeD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAwB,EAAE,aAAoB,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,sCAmHxQ;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,uCAsE/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeedsAttention.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/NeedsAttention.tsx"],"names":[],"mappings":";AA2BA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,sCAyFjG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type InsightsReportTarget } from "./insightsContextCore";
|
|
3
|
+
import "./insights.css";
|
|
4
|
+
/**
|
|
5
|
+
* Side panel for one report: the report itself, its full text and its
|
|
6
|
+
* comments. Opened on a change that has no report yet, it offers to write
|
|
7
|
+
* one, then polls the job every 5 seconds until the report is ready.
|
|
8
|
+
*/
|
|
9
|
+
export default function ReportDrawer({ target, onClose }: {
|
|
10
|
+
target: InsightsReportTarget;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}): import("react").JSX.Element | null;
|
|
13
|
+
//# sourceMappingURL=ReportDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportDrawer.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/ReportDrawer.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,gBAAgB,CAAC;AAUxB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,sCAqK9G"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export default function RowDetail({ nodeKey, kpiId, dataDay, reportId, embedded, onReportDay, onBack, backLabel }: {
|
|
3
|
+
nodeKey: string;
|
|
4
|
+
kpiId: string;
|
|
5
|
+
dataDay: string;
|
|
6
|
+
reportId?: string | null;
|
|
7
|
+
embedded?: boolean;
|
|
8
|
+
onReportDay?: (day: string) => void;
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
backLabel?: string;
|
|
11
|
+
}): import("react").JSX.Element | null;
|
|
12
|
+
//# sourceMappingURL=RowDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RowDetail.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/RowDetail.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAgB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAqC,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,sCA4DrU"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import "./agPrimitives.css";
|
|
3
|
+
import type { InsightsGraphGroup } from "../../types/insights";
|
|
4
|
+
export type GoodDirection = "up" | "down";
|
|
5
|
+
/**
|
|
6
|
+
* The day's colour, as on the AI Governance trend legend: a significant move
|
|
7
|
+
* is green when it went the good way and red when not, other movers are
|
|
8
|
+
* purple, a steady day is ink, and a day never classified is blue.
|
|
9
|
+
*/
|
|
10
|
+
export declare function movementColorHex(movementType: string | null | undefined, direction: string | null | undefined, good?: GoodDirection): "#DC2626" | "#059669" | "#5928ED" | "#0F172A" | "#2563EB";
|
|
11
|
+
/** Readable on the dark tooltip. */
|
|
12
|
+
export declare const tooltipSafeColorHex: (hex: string) => string;
|
|
13
|
+
/** The Summary title: "Significant change", "Trending up/down", "New entity"… */
|
|
14
|
+
export declare function movementVerdictLabel(movementType: string | null | undefined, direction?: string | null): "Significant change" | "Trending down" | "Trending up" | "New entity" | "Now dormant" | "Recovered" | "No significant change";
|
|
15
|
+
/** The narrative sentence shows for significant and trending days. */
|
|
16
|
+
export declare const showsMovementNarrative: (movementType: string | null | undefined) => boolean;
|
|
17
|
+
export type MovementPhrase = {
|
|
18
|
+
label: string;
|
|
19
|
+
dir: "up" | "down" | "flat";
|
|
20
|
+
};
|
|
21
|
+
/** The plain-English chip beside the criticality badge. */
|
|
22
|
+
export declare function getMovementPhrase(movementType: string | null | undefined, direction?: string | null): MovementPhrase | null;
|
|
23
|
+
export declare const CRITICALITY_TONE: Record<string, string>;
|
|
24
|
+
/** "Oct 8, 2026", as the AI Governance report headers show it. */
|
|
25
|
+
export declare function formatHeaderDate(day: string | null | undefined): string;
|
|
26
|
+
export declare function SectionHeader({ title, meta, action }: {
|
|
27
|
+
title: string;
|
|
28
|
+
meta?: string;
|
|
29
|
+
action?: ReactNode;
|
|
30
|
+
}): import("react").JSX.Element;
|
|
31
|
+
/** A titled visual block with its own collapse button, like "Trend" or "User Activity". */
|
|
32
|
+
export declare function CollapsibleVisualSection({ title, meta, action, children, className, }: {
|
|
33
|
+
title: string;
|
|
34
|
+
meta?: string;
|
|
35
|
+
action?: ReactNode;
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
className?: string;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
39
|
+
export declare function StatusToken({ children, tone, compact }: {
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
tone: string;
|
|
42
|
+
compact?: boolean;
|
|
43
|
+
}): import("react").JSX.Element;
|
|
44
|
+
export declare function MovementChip({ movementType, direction }: {
|
|
45
|
+
movementType: string | null | undefined;
|
|
46
|
+
direction?: string | null;
|
|
47
|
+
}): import("react").JSX.Element | null;
|
|
48
|
+
export declare function CriticalityChip({ criticality, compact }: {
|
|
49
|
+
criticality: string | null | undefined;
|
|
50
|
+
compact?: boolean;
|
|
51
|
+
}): import("react").JSX.Element | null;
|
|
52
|
+
/** A collapsible card section, like "Top Drivers". */
|
|
53
|
+
export declare function ReportAccordion({ title, defaultExpanded, children }: {
|
|
54
|
+
title: string;
|
|
55
|
+
defaultExpanded?: boolean;
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
}): import("react").JSX.Element;
|
|
58
|
+
/** Whether a change was good, bad, or no change, for its colour. */
|
|
59
|
+
export declare function toneOf(change: number | null | undefined, good: GoodDirection): "good" | "bad" | "flat" | null;
|
|
60
|
+
/** One average card: value, coloured by how the average is moving, and a "Going up / down" badge. */
|
|
61
|
+
export declare function Metric({ label, value, change, good, }: {
|
|
62
|
+
label: string;
|
|
63
|
+
value: string;
|
|
64
|
+
/** How the average is moving (e.g. 3-day minus 7-day); omitted for the daily value and the 7-day card. */
|
|
65
|
+
change?: number | null;
|
|
66
|
+
good?: GoodDirection;
|
|
67
|
+
}): import("react").JSX.Element;
|
|
68
|
+
/**
|
|
69
|
+
* Daily value plus the 3, 7 and 30-day averages, with AI Governance's
|
|
70
|
+
* badges: the 3-day card compares the 3-day average with the 7-day one, the
|
|
71
|
+
* 30-day card the 7-day with the 30-day; the 7-day card has none.
|
|
72
|
+
*/
|
|
73
|
+
export declare function TrendMetricsSection({ dailyLabel, daily, fast, slow, long, windows, good, format, }: {
|
|
74
|
+
dailyLabel?: string;
|
|
75
|
+
daily?: number | null;
|
|
76
|
+
fast: number | null;
|
|
77
|
+
slow: number | null;
|
|
78
|
+
long: number | null;
|
|
79
|
+
windows: {
|
|
80
|
+
fast: number;
|
|
81
|
+
slow: number;
|
|
82
|
+
long: number;
|
|
83
|
+
};
|
|
84
|
+
good: GoodDirection;
|
|
85
|
+
format: (value: number | null | undefined) => string;
|
|
86
|
+
}): import("react").JSX.Element;
|
|
87
|
+
/** Colours every "↑ 20%" / "↓ 1%" in a sentence: green when it moved the good way. */
|
|
88
|
+
export declare function ArrowColoredText({ text, good, tone }: {
|
|
89
|
+
text: string;
|
|
90
|
+
good?: GoodDirection;
|
|
91
|
+
tone?: "good" | "bad";
|
|
92
|
+
}): import("react").JSX.Element;
|
|
93
|
+
/** Splits the agent's "Good news - …" / "Bad news - …" opener off the sentence so only that word is coloured. */
|
|
94
|
+
export declare function splitVerdict(text: string): {
|
|
95
|
+
prefix: "Good news" | "Bad news";
|
|
96
|
+
rest: string;
|
|
97
|
+
} | {
|
|
98
|
+
prefix: null;
|
|
99
|
+
rest: string;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* "Good news" green, "Bad news" red, the rest plain, with arrows coloured. A line that opens with a verdict (a Root Cause line about any
|
|
103
|
+
* number) colours its arrows the verdict's way; otherwise they follow the headline number's good direction.
|
|
104
|
+
*/
|
|
105
|
+
export declare function VerdictSentence({ text, good, arrowsFollowVerdict }: {
|
|
106
|
+
text: string;
|
|
107
|
+
good?: GoodDirection;
|
|
108
|
+
arrowsFollowVerdict?: boolean;
|
|
109
|
+
}): import("react").JSX.Element;
|
|
110
|
+
/** "↑ 12%" / "↓ 4%" vs last day, coloured by the number's good direction. */
|
|
111
|
+
export declare function DayOverDayChange({ deltaPct, good, suffix, direction, tone: sentTone, }: {
|
|
112
|
+
deltaPct: number | null | undefined;
|
|
113
|
+
good?: GoodDirection;
|
|
114
|
+
suffix?: string;
|
|
115
|
+
direction?: string | null;
|
|
116
|
+
tone?: string | null;
|
|
117
|
+
}): import("react").JSX.Element | null;
|
|
118
|
+
/** The colour of a report's verdict from the backend's tone. */
|
|
119
|
+
export declare const verdictToneHex: (tone: string | null | undefined) => "#DC2626" | "#059669" | "#5928ED";
|
|
120
|
+
/** Shimmering text lines; widths in percent. */
|
|
121
|
+
export declare function SkeletonLines({ widths, label }: {
|
|
122
|
+
widths?: number[];
|
|
123
|
+
label?: string;
|
|
124
|
+
}): import("react").JSX.Element;
|
|
125
|
+
/** Placeholder for the daily value and average cards. */
|
|
126
|
+
export declare function MetricsSkeleton({ count }: {
|
|
127
|
+
count?: number;
|
|
128
|
+
}): import("react").JSX.Element;
|
|
129
|
+
/** Placeholder the height of a chart. */
|
|
130
|
+
export declare function ChartSkeleton({ height, label }: {
|
|
131
|
+
height?: number;
|
|
132
|
+
label?: string;
|
|
133
|
+
}): import("react").JSX.Element;
|
|
134
|
+
/**
|
|
135
|
+
* "Complete" / "Working Days" for a trend, as a styled listbox instead of
|
|
136
|
+
* the browser's select: opens on click, Enter, Space or the arrow keys,
|
|
137
|
+
* closes on Escape, Tab or a click outside.
|
|
138
|
+
*/
|
|
139
|
+
export declare function DaysDropdown({ value, onChange, disabled, groups, group, onGroupChange, }: {
|
|
140
|
+
value: boolean;
|
|
141
|
+
onChange: (workingDays: boolean) => void;
|
|
142
|
+
disabled?: boolean;
|
|
143
|
+
groups?: InsightsGraphGroup[];
|
|
144
|
+
group?: string | null;
|
|
145
|
+
onGroupChange?: (group: string) => void;
|
|
146
|
+
}): import("react").JSX.Element;
|
|
147
|
+
//# sourceMappingURL=agPrimitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agPrimitives.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/agPrimitives.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/F,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAU/D,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,MAAM,CAAC;AAW1C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,GAAE,aAAoB,6DASzI;AAED,oCAAoC;AACpC,eAAO,MAAM,mBAAmB,QAAS,MAAM,WAAiE,CAAC;AAEjH,iFAAiF;AACjF,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,iIAiBtG;AAED,sEAAsE;AACtE,eAAO,MAAM,sBAAsB,iBAAkB,MAAM,GAAG,IAAI,GAAG,SAAS,YAC0G,CAAC;AAEzL,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,CAA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AQhH;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,EAAE,KAAS,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAWhE;AAED,yCAAyC;AACzC,wBAAgB,aAAa,CAAC,EAAE,MAAY,EAAE,KAAuB,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAQ3G;AASD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,aAAa,GACd,EAAE;IACD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,+BAkGA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DashboardApiConfig } from "../../api/dashboardApi";
|
|
3
|
+
import type { InsightsRange } from "../../api/insightsApi";
|
|
4
|
+
import type { InsightsKpiConfig } from "../../types/insights";
|
|
5
|
+
/**
|
|
6
|
+
* What the report drawer opens on: a stored report, or a flagged change that
|
|
7
|
+
* has none yet (its row, number and day), which can then be written.
|
|
8
|
+
*/
|
|
9
|
+
export interface InsightsReportTarget {
|
|
10
|
+
reportId?: string | null;
|
|
11
|
+
nodeKey?: string;
|
|
12
|
+
kpiId?: string;
|
|
13
|
+
/** YYYY-MM-DD */
|
|
14
|
+
dataDay?: string;
|
|
15
|
+
/** Shown while the report loads, e.g. "eCG · AI Queries · 02 Oct". */
|
|
16
|
+
title?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InsightsContextValue {
|
|
19
|
+
api: DashboardApiConfig;
|
|
20
|
+
range: InsightsRange;
|
|
21
|
+
/** Changes whenever the range does; a dependency for fetches. */
|
|
22
|
+
rangeKey: string;
|
|
23
|
+
/** Sidebar filters are applied; insights still cover all data. */
|
|
24
|
+
filtersActive: boolean;
|
|
25
|
+
kpis: Record<string, InsightsKpiConfig>;
|
|
26
|
+
kpiLabel: (kpiId: string) => string;
|
|
27
|
+
goodDirection: (kpiId: string) => "up" | "down";
|
|
28
|
+
/**
|
|
29
|
+
* The headline number every report leads with: Tier 1's primary graph line
|
|
30
|
+
* when it's watched, otherwise the first watched Tier 1 number.
|
|
31
|
+
*/
|
|
32
|
+
headlineKpi: string | null;
|
|
33
|
+
/** Watched numbers on each graph tier, in config order. */
|
|
34
|
+
tierKpis: {
|
|
35
|
+
1: string[];
|
|
36
|
+
2: string[];
|
|
37
|
+
};
|
|
38
|
+
/** Charts open on working days only, as the graph's day filter says. */
|
|
39
|
+
defaultWorkingDays: boolean;
|
|
40
|
+
/** Days in the fast, slow and long moving averages, from `ui.insights.analysis`. */
|
|
41
|
+
windows: {
|
|
42
|
+
fast: number;
|
|
43
|
+
slow: number;
|
|
44
|
+
long: number;
|
|
45
|
+
};
|
|
46
|
+
/** The drill-down level (1 = total) of a part, from `ui.insights.hierarchy`. Unknown or none is 1. */
|
|
47
|
+
levelOf: (entityKey?: string | null) => number;
|
|
48
|
+
entityName: (entityKey: string) => string;
|
|
49
|
+
entityOrder: string[];
|
|
50
|
+
openReport: (target: InsightsReportTarget) => void;
|
|
51
|
+
viewer: {
|
|
52
|
+
email: string | null;
|
|
53
|
+
isAdmin: boolean;
|
|
54
|
+
};
|
|
55
|
+
minReasonLength: number;
|
|
56
|
+
revision: number;
|
|
57
|
+
refresh: () => void;
|
|
58
|
+
}
|
|
59
|
+
export declare const InsightsContext: import("react").Context<InsightsContextValue | null>;
|
|
60
|
+
export declare const useInsights: () => InsightsContextValue | null;
|
|
61
|
+
//# sourceMappingURL=insightsContextCore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightsContextCore.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/insightsContextCore.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,kBAAkB,CAAC;IACxB,KAAK,EAAE,aAAa,CAAC;IACrB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CAAC;IAChD;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,2DAA2D;IAC3D,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACvC,wEAAwE;IACxE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oFAAoF;IACpF,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,sGAAsG;IACtG,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;IAC/C,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACnD,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,sDAAmD,CAAC;AAEhF,eAAO,MAAM,WAAW,mCAAoC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { RcaDecisionItem, RcaDecisioning } from "../RcaDecisionComponent/types";
|
|
2
|
+
import type { DecisionAdvantageUiConfig, InsightsDecisionItem, InsightsReport, InsightsPeriod, InsightsUiConfig } from "../../types/insights";
|
|
3
|
+
import type { DashboardApiConfig } from "../../api/dashboardApi";
|
|
4
|
+
/** Insights are on when `ui.insights.enabled` is true, or a yes-like string as the backend accepts. */
|
|
5
|
+
export declare function isInsightsOn(insights: InsightsUiConfig | null | undefined): boolean;
|
|
6
|
+
/** The card's config when it should show, or null. A card saved without `enabled` shows. */
|
|
7
|
+
export declare function summaryCardConfig(da: DecisionAdvantageUiConfig | null | undefined): {
|
|
8
|
+
layoutKey?: string | undefined;
|
|
9
|
+
enabled?: boolean | undefined;
|
|
10
|
+
title?: string | undefined;
|
|
11
|
+
} | null;
|
|
12
|
+
/** Tabs worth showing: each needs the part it lists. */
|
|
13
|
+
export declare function insightTabItems(da: DecisionAdvantageUiConfig | null | undefined): import("../../types/insights").InsightTabConfig[];
|
|
14
|
+
/** "1–7 Oct 2026", "28 Sep – 4 Oct 2026" or "7 Oct 2026". */
|
|
15
|
+
export declare function formatPeriod(period: InsightsPeriod | null | undefined): string;
|
|
16
|
+
/** "8 Oct 2026": the day a report was written for, which is the last day of the period it covers. */
|
|
17
|
+
export declare const formatReportDate: (period: InsightsPeriod | null | undefined) => string;
|
|
18
|
+
/** "10/02" from "2026-10-02", for chart ticks and tooltips. */
|
|
19
|
+
export declare const shortDay: (x: string | number) => string;
|
|
20
|
+
export declare const formatValue: (value: number | null | undefined) => string;
|
|
21
|
+
/** Change against the previous period: whether it is good depends on the number's direction. */
|
|
22
|
+
export declare function deltaTone(deltaPct: number | null | undefined, goodDirection?: "up" | "down"): "flat" | "good" | "bad";
|
|
23
|
+
export declare const formatDelta: (deltaPct: number | null | undefined) => string;
|
|
24
|
+
export declare const movementLabel: (type: string | null | undefined) => string;
|
|
25
|
+
/** Green when the change moved the right way, red when not, amber when the direction is unknown. */
|
|
26
|
+
export declare function sentimentColor(direction: string | null | undefined, goodDirection?: "up" | "down"): "#d97706" | "#16a34a" | "#dc2626";
|
|
27
|
+
/** API decision lines in the shape RcaDecisionComponent draws. */
|
|
28
|
+
export declare const toRcaItems: (items: InsightsDecisionItem[] | null | undefined) => RcaDecisionItem[];
|
|
29
|
+
/**
|
|
30
|
+
* Reasoning for a whole report, for the brain button on its Summary and its
|
|
31
|
+
* Decision Advantage header: the report's own explanation, its overall score,
|
|
32
|
+
* and the factors and gaps behind its Root Cause and Next Steps lines.
|
|
33
|
+
* Null when the report carries no reasoning at all.
|
|
34
|
+
*/
|
|
35
|
+
export declare function reportDecisioning(report: InsightsReport | null | undefined, explanation?: string | null): RcaDecisioning | null;
|
|
36
|
+
/** Who is viewing, read from the token's claims. Only decides which buttons show; the backend checks again. */
|
|
37
|
+
export declare function viewerFromToken(accessToken?: string): {
|
|
38
|
+
email: string | null;
|
|
39
|
+
isAdmin: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Runs `load` whenever `deps` change and keeps the latest answer. A newer run
|
|
43
|
+
* aborts the one before, so a slow response never overwrites a newer one.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useInsightsFetch<T>(load: ((signal: AbortSignal) => Promise<T>) | null, deps: unknown[]): {
|
|
46
|
+
reload: () => void;
|
|
47
|
+
data?: T | undefined;
|
|
48
|
+
error?: Error | undefined;
|
|
49
|
+
loading: boolean;
|
|
50
|
+
};
|
|
51
|
+
/** Shared polling for every Insights write job. */
|
|
52
|
+
export declare function useJob(jobId: string | null, api: DashboardApiConfig | null, onSucceeded?: (reportId: string | null) => void): {
|
|
53
|
+
status: string | null;
|
|
54
|
+
error: string | null;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=insightsUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightsUtils.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/Insights/insightsUtils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAIjE,uGAAuG;AACvG,wBAAgB,YAAY,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAInF;AAED,4FAA4F;AAC5F,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,yBAAyB,GAAG,IAAI,GAAG,SAAS;;;;SAGjF;AAED,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,EAAE,EAAE,yBAAyB,GAAG,IAAI,GAAG,SAAS,qDAE/E;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EAAE,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;;;;aAC9B,OAAO;EA0B/E;AAED,mDAAmD;AACnD,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,kBAAkB,GAAG,IAAI,EAAE,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;YAC7E,MAAM,GAAG,IAAI;WAAS,MAAM,GAAG,IAAI;EA8BjF"}
|
package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { RcaDecisionComponentProps } from "./types";
|
|
2
|
+
import type { RcaDecisionComponentProps, RcaDecisioning } from "./types";
|
|
3
3
|
import "./rcaDecisionComponent.css";
|
|
4
|
+
/** The brain button that opens a line's cognitive decisioning. */
|
|
5
|
+
export declare function ReasoningTrigger({ open, onToggle, label, }: {
|
|
6
|
+
open: boolean;
|
|
7
|
+
onToggle: () => void;
|
|
8
|
+
label?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
/** Explanation, then the Cognitive Decisioning AI score with its factors and gaps. */
|
|
11
|
+
export declare function ReasoningPanel({ decisioning }: {
|
|
12
|
+
decisioning: RcaDecisioning;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
4
14
|
/**
|
|
5
15
|
* Reusable Decision Advantage RCA surface.
|
|
6
16
|
* Each line can expose its own cognitive decisioning without requiring API
|
|
@@ -18,6 +28,6 @@ import "./rcaDecisionComponent.css";
|
|
|
18
28
|
* nextSteps={[{ content: "Confirm the volume change with the owning team." }]}
|
|
19
29
|
* />
|
|
20
30
|
*/
|
|
21
|
-
export declare function RcaDecisionComponent({ title, score, rootCause, nextSteps, width, maxWidth, height, className, }: RcaDecisionComponentProps): import("react").JSX.Element;
|
|
31
|
+
export declare function RcaDecisionComponent({ title, score, summary, footer, evidenceNote, notice, headerActions, afterSections, decisioning, rootCause, nextSteps, width, maxWidth, height, className, }: RcaDecisionComponentProps): import("react").JSX.Element;
|
|
22
32
|
export default RcaDecisionComponent;
|
|
23
33
|
//# sourceMappingURL=RcaDecisionComponent.d.ts.map
|
package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RcaDecisionComponent.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EACV,yBAAyB,
|
|
1
|
+
{"version":3,"file":"RcaDecisionComponent.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EAEf,MAAM,SAAS,CAAC;AACjB,OAAO,4BAA4B,CAAC;AAsBpC,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,KAA+B,GAChC,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,+BAaA;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,EAAE;IAAE,WAAW,EAAE,cAAc,CAAA;CAAE,+BAmD9E;AA+HD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAA4B,EAC5B,KAAK,EACL,OAAO,EACP,MAAM,EACN,YAAY,EACZ,MAAM,EACN,aAAa,EACb,aAAa,EACb,WAAW,EACX,SAAS,EACT,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAM,EACN,SAAc,GACf,EAAE,yBAAyB,+BAsD3B;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default, RcaDecisionComponent } from "./RcaDecisionComponent";
|
|
1
|
+
export { default, RcaDecisionComponent, ReasoningPanel, ReasoningTrigger } from "./RcaDecisionComponent";
|
|
2
2
|
export type { RcaDecisionComponentProps, RcaDecisionItem, RcaDecisioning } from "./types";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/RcaDecisionComponent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/RcaDecisionComponent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACzG,YAAY,EAAE,yBAAyB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -40,8 +40,26 @@ export interface RcaDecisionItem {
|
|
|
40
40
|
export interface RcaDecisionComponentProps {
|
|
41
41
|
/** Header label shown above the report. Defaults to `Decision Advantage`. */
|
|
42
42
|
title?: string;
|
|
43
|
-
/** Overall confidence shown in the header, clamped to 0–100. */
|
|
44
|
-
score?: number;
|
|
43
|
+
/** Overall confidence shown in the header, clamped to 0–100. Hidden when absent. */
|
|
44
|
+
score?: number | null;
|
|
45
|
+
/** Short overview above Root Cause: a small eyebrow, a headline and a paragraph. */
|
|
46
|
+
summary?: {
|
|
47
|
+
eyebrow?: ReactNode;
|
|
48
|
+
headline?: ReactNode;
|
|
49
|
+
body?: ReactNode;
|
|
50
|
+
} | null;
|
|
51
|
+
/** Closing line under Next Steps. */
|
|
52
|
+
footer?: ReactNode;
|
|
53
|
+
/** How the evidence was ranked, shown under the summary. */
|
|
54
|
+
evidenceNote?: ReactNode;
|
|
55
|
+
/** A line above everything else, e.g. "Summary for 1–7 Oct". */
|
|
56
|
+
notice?: ReactNode;
|
|
57
|
+
/** Controls at the right of the header, before the score, e.g. a comments button. */
|
|
58
|
+
headerActions?: ReactNode;
|
|
59
|
+
/** Reasoning for the report as a whole, opened from a brain button in the header. */
|
|
60
|
+
decisioning?: RcaDecisioning | null;
|
|
61
|
+
/** More content after Next Steps, inside the scrolling body, e.g. the ranked evidence. */
|
|
62
|
+
afterSections?: ReactNode;
|
|
45
63
|
/** Numbered Root Cause lines. */
|
|
46
64
|
rootCause: RcaDecisionItem[];
|
|
47
65
|
/** Numbered Next Steps lines. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/RcaDecisionComponent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,qBAAqB,CAAC,EAAE,SAAS,EAAE,CAAC;IACpC,mDAAmD;IACnD,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,EAAE;QACT,8BAA8B;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,iDAAiD;QACjD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,qDAAqD;QACrD,WAAW,CAAC,EAAE,SAAS,CAAC;QACxB,6CAA6C;QAC7C,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;QACpB,uEAAuE;QACvE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,uDAAuD;QACvD,MAAM,CAAC,EAAE,SAAS,CAAC;KACpB,CAAC;IACF,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,OAAO,EAAE,SAAS,CAAC;IACnB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B;AAED,MAAM,WAAW,yBAAyB;IACxC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/ExecutiveDashboard/components/RcaDecisionComponent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,qBAAqB,CAAC,EAAE,SAAS,EAAE,CAAC;IACpC,mDAAmD;IACnD,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,EAAE;QACT,8BAA8B;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,iDAAiD;QACjD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,qDAAqD;QACrD,WAAW,CAAC,EAAE,SAAS,CAAC;QACxB,6CAA6C;QAC7C,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;QACpB,uEAAuE;QACvE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,uDAAuD;QACvD,MAAM,CAAC,EAAE,SAAS,CAAC;KACpB,CAAC;IACF,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,OAAO,EAAE,SAAS,CAAC;IACnB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B;AAED,MAAM,WAAW,yBAAyB;IACxC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oFAAoF;IACpF,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAE,GAAG,IAAI,CAAC;IACjF,qCAAqC;IACrC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,gEAAgE;IAChE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qFAAqF;IACrF,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,qFAAqF;IACrF,WAAW,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,0FAA0F;IAC1F,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,iCAAiC;IACjC,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,iCAAiC;IACjC,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC;;;;OAIG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -5,6 +5,7 @@ import type { TableSpan } from "../components/Table/TableGrid/spans";
|
|
|
5
5
|
import type { TableLayoutMode } from "../components/Table/TableGrid/TableLayoutToggle";
|
|
6
6
|
import { ReferenceConfig } from "../components/Graph/types";
|
|
7
7
|
import type { DashboardLayoutConfig } from "../components/DashboardGrid/layout";
|
|
8
|
+
import type { DecisionAdvantageUiConfig, InsightsUiConfig } from "./insights";
|
|
8
9
|
export type { TableSpan, TableLayoutMode };
|
|
9
10
|
/**
|
|
10
11
|
* A re-orderable dashboard section, named by the key it arrives under in the UI
|
|
@@ -22,6 +23,8 @@ export type { TableSpan, TableLayoutMode };
|
|
|
22
23
|
* throwing, since these lists are usually config-driven.
|
|
23
24
|
*/
|
|
24
25
|
export type DashboardSectionKey = "graphBuilder" | "kpiCards" | "tableBuilder" | "barCharts" | "pieCharts"
|
|
26
|
+
/** The Decision Advantage card and insights tabs, when insights are on. */
|
|
27
|
+
| "decisionAdvantage"
|
|
25
28
|
/** @deprecated earlier name for `barCharts`; still accepted. */
|
|
26
29
|
| "barChartBuilder"
|
|
27
30
|
/** @deprecated earlier name for `pieCharts`; still accepted. */
|
|
@@ -233,6 +236,15 @@ export interface DashboardContainerProps {
|
|
|
233
236
|
* `sectionOrder` is ignored while the grid is on (`items[].order` applies).
|
|
234
237
|
*/
|
|
235
238
|
layout?: DashboardLayoutConfig;
|
|
239
|
+
/**
|
|
240
|
+
* Decision Advantage reads only working days (Saturday and Sunday left out).
|
|
241
|
+
* Sent to the insights API as `workingDaysOnly`. Default false.
|
|
242
|
+
*/
|
|
243
|
+
workingDaysOnly?: boolean;
|
|
244
|
+
/** Show only the first KPI cards, with "View more KPIs" for the rest. See `DashboardUIData.kpiCardsCollapse`. */
|
|
245
|
+
kpiCardsCollapse?: false | {
|
|
246
|
+
initialCount?: number;
|
|
247
|
+
};
|
|
236
248
|
}
|
|
237
249
|
/** Handlers for the KPI card CTA buttons, keyed by card `ctaKey` / `key`. */
|
|
238
250
|
export type KpiCtaConfig = Record<string, (card?: KpiCardConfig) => void>;
|
|
@@ -419,6 +431,18 @@ export interface DashboardUIData {
|
|
|
419
431
|
* Overridden by the `sectionOrder` prop when both are present.
|
|
420
432
|
*/
|
|
421
433
|
sectionOrder?: DashboardSectionKey[];
|
|
434
|
+
/** Decision Advantage settings. The insights pieces show only while `enabled` is on. */
|
|
435
|
+
insights?: InsightsUiConfig;
|
|
436
|
+
/** The Decision Advantage card and insights tabs placed on the dashboard. */
|
|
437
|
+
decisionAdvantage?: DecisionAdvantageUiConfig;
|
|
438
|
+
/**
|
|
439
|
+
* Show only the first KPI cards, with "View more KPIs" for the rest, e.g.
|
|
440
|
+
* `{ initialCount: 3 }`; `false` shows every card. On by default (first 3)
|
|
441
|
+
* when Decision Advantage is on.
|
|
442
|
+
*/
|
|
443
|
+
kpiCardsCollapse?: false | {
|
|
444
|
+
initialCount?: number;
|
|
445
|
+
};
|
|
422
446
|
}
|
|
423
447
|
export interface DashboardComponentFlags {
|
|
424
448
|
dateConfig?: boolean;
|