@burdenoff/microfe-bigconsole 2026.1118.10 → 2026.1119.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/dist/bigconsole/asof/AsOfBanner.d.ts +3 -0
- package/dist/bigconsole/asof/AsOfBanner.js +52 -0
- package/dist/bigconsole/asof/AsOfControl.d.ts +4 -0
- package/dist/bigconsole/asof/AsOfControl.js +164 -0
- package/dist/bigconsole/asof/AsOfProvider.d.ts +31 -0
- package/dist/bigconsole/asof/AsOfProvider.js +98 -0
- package/dist/bigconsole/asof/asOfMessage.d.ts +12 -0
- package/dist/bigconsole/asof/asOfMessage.js +12 -0
- package/dist/bigconsole/asof/asOfParam.d.ts +48 -0
- package/dist/bigconsole/asof/asOfParam.js +34 -0
- package/dist/bigconsole/asof/index.d.ts +7 -0
- package/dist/bigconsole/asof/index.js +6 -0
- package/dist/bigconsole/compare/compareEngine.d.ts +104 -0
- package/dist/bigconsole/compare/compareEngine.js +172 -0
- package/dist/bigconsole/compare/compareParam.d.ts +9 -0
- package/dist/bigconsole/compare/compareParam.js +13 -0
- package/dist/bigconsole/compare/compareSide.d.ts +5 -0
- package/dist/bigconsole/compare/compareSide.js +39 -0
- package/dist/bigconsole/compare/index.d.ts +3 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +142 -138
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +97 -92
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +78 -74
- package/dist/bigconsole/components/widgets/WidgetCompareView.d.ts +12 -0
- package/dist/bigconsole/components/widgets/WidgetCompareView.js +215 -0
- package/dist/bigconsole/components/widgets/WidgetMenu.js +98 -96
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +399 -311
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +47 -148
- package/dist/bigconsole/components/widgets/metric-card/metricData.d.ts +23 -0
- package/dist/bigconsole/components/widgets/metric-card/metricData.js +105 -0
- package/dist/bigconsole/components/widgets/table/TableCell.d.ts +2 -1
- package/dist/bigconsole/components/widgets/table/TableCell.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableWidget.js +142 -168
- package/dist/bigconsole/components/widgets/table/tableRows.d.ts +17 -0
- package/dist/bigconsole/components/widgets/table/tableRows.js +35 -0
- package/dist/bigconsole/hooks/index.d.ts +1 -0
- package/dist/bigconsole/hooks/index.js +25 -24
- package/dist/bigconsole/hooks/useFilterFieldValues.js +52 -22
- package/dist/bigconsole/hooks/useWidgetCompareData.d.ts +8 -0
- package/dist/bigconsole/hooks/useWidgetCompareData.js +24 -0
- package/dist/bigconsole/hooks/useWidgetData.d.ts +7 -0
- package/dist/bigconsole/hooks/useWidgetData.js +53 -43
- package/dist/bigconsole/pages/DashboardViewPage.d.ts +7 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +300 -278
- package/dist/bigconsole/pages/index.d.ts +1 -1
- package/dist/bigconsole/types/index.d.ts +13 -0
- package/dist/bigconsole/utils/widgetDisplayData.d.ts +16 -0
- package/dist/bigconsole/utils/widgetDisplayData.js +12 -1
- package/dist/generated/wspace-operations.d.ts +47 -0
- package/dist/generated/wspace-operations.js +261 -16
- package/dist/generated/wspace-types.d.ts +78 -0
- package/package.json +1 -1
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import e from "./useWidgetData.js";
|
|
2
|
+
import { useWidgetCompareData as t } from "./useWidgetCompareData.js";
|
|
2
3
|
import "./useWidgetCatalog.js";
|
|
3
|
-
import { formatTimeUntilRefresh as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
4
|
+
import { formatTimeUntilRefresh as n, useWidgetAutoRefresh as r } from "./useAutoRefresh.js";
|
|
5
|
+
import i from "./useWidgetOperations.js";
|
|
6
|
+
import a from "./useWidgetComments.js";
|
|
7
|
+
import o from "./useWidgetConfigPersist.js";
|
|
8
|
+
import s from "./useDashboardOperations.js";
|
|
9
|
+
import c from "./useWidgetExport.js";
|
|
9
10
|
import "./useDashboardImageExport.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
11
|
+
import l from "./useDrilldown.js";
|
|
12
|
+
import u from "./useDrilldownOperations.js";
|
|
12
13
|
import "./useWidgetEvents.js";
|
|
13
14
|
import "./useWidgetActions.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import d from "./useExportDashboard.js";
|
|
16
|
+
import f from "./useImportDashboard.js";
|
|
17
|
+
import p from "./useBoardMigrationPreview.js";
|
|
17
18
|
import "./useEventWebhooks.js";
|
|
18
19
|
import "./useEventLogs.js";
|
|
19
|
-
import
|
|
20
|
+
import m from "./useDataSinkOperations.js";
|
|
20
21
|
import "./useBigConsoleAnalytics.js";
|
|
21
|
-
import
|
|
22
|
+
import h from "./useParserOperations.js";
|
|
22
23
|
import "./useWorkflowOperations.js";
|
|
23
24
|
import "./usePipelineOperations.js";
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
25
|
+
import g from "./useGlobalFilters.js";
|
|
26
|
+
import _ from "./useDashboardSharing.js";
|
|
27
|
+
import v from "./useDashboardViews.js";
|
|
27
28
|
import "./useDashboardTemplates.js";
|
|
28
|
-
import
|
|
29
|
-
import
|
|
29
|
+
import y from "./useFilterUrlSync.js";
|
|
30
|
+
import b from "./useFilterPresets.js";
|
|
30
31
|
import "./useCrossFilter.js";
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
32
|
+
import x from "./usePageOperations.js";
|
|
33
|
+
import S from "./useExportParser.js";
|
|
34
|
+
import C from "./useImportParser.js";
|
|
34
35
|
import "./useDetectAnomalies.js";
|
|
35
|
-
import
|
|
36
|
-
import
|
|
36
|
+
import w from "./useExportDataSink.js";
|
|
37
|
+
import T from "./useImportDataSink.js";
|
|
37
38
|
import "./useWidgetNarrative.js";
|
|
38
39
|
import "./useDashboardDigest.js";
|
|
39
|
-
export {
|
|
40
|
+
export { n as formatTimeUntilRefresh, p as useBoardMigrationPreview, s as useDashboardOperations, _ as useDashboardSharing, v as useDashboardViews, m as useDataSinkOperations, l as useDrilldown, u as useDrilldownOperations, d as useExportDashboard, w as useExportDataSink, S as useExportParser, b as useFilterPresets, y as useFilterUrlSync, g as useGlobalFilters, f as useImportDashboard, T as useImportDataSink, C as useImportParser, x as usePageOperations, h as useParserOperations, r as useWidgetAutoRefresh, a as useWidgetComments, t as useWidgetCompareData, o as useWidgetConfigPersist, e as useWidgetData, c as useWidgetExport, i as useWidgetOperations };
|
|
@@ -1,36 +1,66 @@
|
|
|
1
1
|
import { useWidgetStore as e } from "../store/widgetStore.js";
|
|
2
|
-
import {
|
|
2
|
+
import { GetWidgetDataAsOfDocument as t, GetWidgetDocument as n } from "../../generated/wspace-operations.js";
|
|
3
|
+
import "../asof/index.js";
|
|
4
|
+
import { useAsOf as r } from "../asof/AsOfProvider.js";
|
|
3
5
|
import "../store/index.js";
|
|
4
|
-
import { distinctFieldValues as
|
|
5
|
-
import { useCallback as
|
|
6
|
-
import { useApolloClient as
|
|
6
|
+
import { distinctFieldValues as i } from "../utils/globalFilterMatching.js";
|
|
7
|
+
import { useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
|
|
8
|
+
import { useApolloClient as l } from "@apollo/client/react";
|
|
7
9
|
// src/bigconsole/hooks/useFilterFieldValues.ts
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
if (!
|
|
10
|
+
function u(u, d) {
|
|
11
|
+
let f = l(), p = e((e) => e.widgets), [m, h] = c(0), { asOf: g } = r(), _ = g ? g.toISOString() : null, v = a(() => {
|
|
12
|
+
if (!u || !d?.trim()) return [];
|
|
11
13
|
let e = [];
|
|
12
|
-
for (let
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
14
|
+
for (let r of p.values()) {
|
|
15
|
+
if (r.dashboardId !== u) continue;
|
|
16
|
+
let i;
|
|
15
17
|
try {
|
|
16
|
-
|
|
18
|
+
i = _ ? f.readQuery({
|
|
17
19
|
query: t,
|
|
18
|
-
variables: {
|
|
20
|
+
variables: {
|
|
21
|
+
id: r.id,
|
|
22
|
+
asOf: _
|
|
23
|
+
}
|
|
24
|
+
})?.getWidget?.data : f.readQuery({
|
|
25
|
+
query: n,
|
|
26
|
+
variables: { id: r.id }
|
|
19
27
|
})?.getWidget?.data;
|
|
20
28
|
} catch {}
|
|
21
|
-
let
|
|
22
|
-
|
|
29
|
+
let a = _ ? i : i ?? r.data;
|
|
30
|
+
a && e.push(a);
|
|
23
31
|
}
|
|
24
|
-
return
|
|
32
|
+
return i(e, d);
|
|
25
33
|
}, [
|
|
26
|
-
|
|
34
|
+
f,
|
|
35
|
+
p,
|
|
27
36
|
u,
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
d,
|
|
38
|
+
_
|
|
30
39
|
]);
|
|
31
|
-
return {
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
return o(() => {
|
|
41
|
+
if (!_ || !u) return;
|
|
42
|
+
let e = [];
|
|
43
|
+
for (let n of p.values()) n.dashboardId === u && e.push(f.cache.watch({
|
|
44
|
+
query: t,
|
|
45
|
+
variables: {
|
|
46
|
+
id: n.id,
|
|
47
|
+
asOf: _
|
|
48
|
+
},
|
|
49
|
+
optimistic: !1,
|
|
50
|
+
returnPartialData: !0,
|
|
51
|
+
callback: () => h((e) => e + 1)
|
|
52
|
+
}));
|
|
53
|
+
return () => {
|
|
54
|
+
for (let t of e) t();
|
|
55
|
+
};
|
|
56
|
+
}, [
|
|
57
|
+
f,
|
|
58
|
+
p,
|
|
59
|
+
u,
|
|
60
|
+
_
|
|
61
|
+
]), {
|
|
62
|
+
values: s(() => m >= 0 ? v() : [], [v, m]),
|
|
63
|
+
refresh: a(() => (h((e) => e + 1), v()), [v])
|
|
34
64
|
};
|
|
35
65
|
}
|
|
36
|
-
export {
|
|
66
|
+
export { u as useFilterFieldValues };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CompareTarget } from '../compare/compareParam';
|
|
2
|
+
import { WidgetData } from '../types';
|
|
3
|
+
export interface WidgetCompareData {
|
|
4
|
+
data: WidgetData | null;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
error: Error | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function useWidgetCompareData(widgetId: string, target: CompareTarget | null, skip?: boolean): WidgetCompareData;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GetWidgetDataAsOfDocument as e, GetWidgetDocument as t } from "../../generated/wspace-operations.js";
|
|
2
|
+
import { useMemo as n } from "react";
|
|
3
|
+
import { useQuery as r } from "@apollo/client/react";
|
|
4
|
+
// src/bigconsole/hooks/useWidgetCompareData.ts
|
|
5
|
+
function i(i, a, o = !1) {
|
|
6
|
+
let s = a instanceof Date ? a : null, c = a === "now", l = o || !i || a === null, u = r(t, {
|
|
7
|
+
variables: { id: i },
|
|
8
|
+
skip: l || !c,
|
|
9
|
+
fetchPolicy: "network-only"
|
|
10
|
+
}), d = r(e, {
|
|
11
|
+
variables: {
|
|
12
|
+
id: i,
|
|
13
|
+
asOf: (s ?? /* @__PURE__ */ new Date(0)).toISOString()
|
|
14
|
+
},
|
|
15
|
+
skip: l || s === null,
|
|
16
|
+
fetchPolicy: "cache-first"
|
|
17
|
+
}), f = c ? u : d, p = f.data?.getWidget?.data ?? null, m = f.error?.message, h = n(() => m ? Error(m) : null, [m]);
|
|
18
|
+
return {
|
|
19
|
+
data: p,
|
|
20
|
+
loading: !l && f.loading,
|
|
21
|
+
error: h
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export { i as useWidgetCompareData };
|
|
@@ -10,6 +10,11 @@ interface UseWidgetDataOptions {
|
|
|
10
10
|
onError?: (error: Error) => void;
|
|
11
11
|
/** Global filter values to apply */
|
|
12
12
|
filterValues?: Record<string, unknown>;
|
|
13
|
+
/**
|
|
14
|
+
* Read the data as it was at this time (BOFF-14757). Live data is not fetched
|
|
15
|
+
* or polled meanwhile, and a refresh does nothing.
|
|
16
|
+
*/
|
|
17
|
+
asOf?: Date | null;
|
|
13
18
|
}
|
|
14
19
|
interface UseWidgetDataResult {
|
|
15
20
|
/** The widget with its data */
|
|
@@ -26,6 +31,8 @@ interface UseWidgetDataResult {
|
|
|
26
31
|
refetch: () => Promise<void>;
|
|
27
32
|
/** Is currently refreshing */
|
|
28
33
|
isRefreshing: boolean;
|
|
34
|
+
/** What an as-of read used. Null for a live read. */
|
|
35
|
+
asOfInfo: WidgetData['asOf'] | null;
|
|
29
36
|
}
|
|
30
37
|
export declare function useWidgetData(widgetId: string, options?: UseWidgetDataOptions): UseWidgetDataResult;
|
|
31
38
|
interface UseWidgetsDataOptions {
|
|
@@ -2,43 +2,50 @@ import { useWidgetStore as e } from "../store/widgetStore.js";
|
|
|
2
2
|
import { useQueryLifecycle as t } from "./useQueryLifecycle.js";
|
|
3
3
|
import "./useWidgetOperations.js";
|
|
4
4
|
import "../store/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import { useCallback as
|
|
7
|
-
import { useMutation as
|
|
5
|
+
import { GetWidgetDataAsOfDocument as n, GetWidgetDocument as r, RefreshWidgetDataDocument as i } from "../../generated/wspace-operations.js";
|
|
6
|
+
import { useCallback as a, useMemo as o } from "react";
|
|
7
|
+
import { useMutation as s, useQuery as c } from "@apollo/client/react";
|
|
8
8
|
// src/bigconsole/hooks/useWidgetData.ts
|
|
9
|
-
function
|
|
10
|
-
let { skip:
|
|
11
|
-
variables: { id:
|
|
12
|
-
skip:
|
|
13
|
-
pollInterval:
|
|
9
|
+
function l(l, u = {}) {
|
|
10
|
+
let { skip: d = !1, pollInterval: f = 0, onSuccess: p, onError: m, asOf: h = null } = u, g = h !== null, _ = e((e) => e.setWidgetLoading), v = e((e) => e.setWidgetError), { data: y, dataState: b, observable: x, loading: S, error: C, refetch: w } = c(r, {
|
|
11
|
+
variables: { id: l },
|
|
12
|
+
skip: d || !l || g,
|
|
13
|
+
pollInterval: f,
|
|
14
14
|
fetchPolicy: "cache-and-network",
|
|
15
15
|
returnPartialData: !1,
|
|
16
16
|
notifyOnNetworkStatusChange: !0
|
|
17
|
-
}),
|
|
17
|
+
}), { data: T, loading: E, error: D } = c(n, {
|
|
18
|
+
variables: {
|
|
19
|
+
id: l,
|
|
20
|
+
asOf: (h ?? /* @__PURE__ */ new Date(0)).toISOString()
|
|
21
|
+
},
|
|
22
|
+
skip: d || !l || !g,
|
|
23
|
+
fetchPolicy: "cache-first"
|
|
24
|
+
}), O = t(x, l, !d && !!l, {
|
|
18
25
|
onCompleted: (e) => {
|
|
19
|
-
|
|
26
|
+
_(l, !1), v(l, null);
|
|
20
27
|
let t = e.getWidget?.data;
|
|
21
|
-
t &&
|
|
28
|
+
t && p?.(t);
|
|
22
29
|
},
|
|
23
30
|
onError: (e) => {
|
|
24
|
-
|
|
31
|
+
_(l, !1), v(l, e.message), m && m(e);
|
|
25
32
|
}
|
|
26
|
-
}), [
|
|
33
|
+
}), [k, { loading: A }] = s(i, {
|
|
27
34
|
onCompleted: (e) => {
|
|
28
|
-
if (!
|
|
29
|
-
|
|
35
|
+
if (!O()) return;
|
|
36
|
+
_(l, !1), v(l, null);
|
|
30
37
|
let t = e.refreshWidgetData;
|
|
31
|
-
t &&
|
|
38
|
+
t && p && p(t);
|
|
32
39
|
},
|
|
33
40
|
onError: (e) => {
|
|
34
|
-
|
|
41
|
+
O() && (_(l, !1), v(l, e.message), m && m(e));
|
|
35
42
|
},
|
|
36
43
|
update: (e, { data: t }) => {
|
|
37
44
|
let n = t?.refreshWidgetData;
|
|
38
45
|
n && e.modify({
|
|
39
46
|
id: e.identify({
|
|
40
47
|
__typename: "BigConsoleWidget",
|
|
41
|
-
id:
|
|
48
|
+
id: l
|
|
42
49
|
}),
|
|
43
50
|
fields: {
|
|
44
51
|
data: () => n,
|
|
@@ -46,40 +53,43 @@ function c(c, l = {}) {
|
|
|
46
53
|
}
|
|
47
54
|
});
|
|
48
55
|
}
|
|
49
|
-
}),
|
|
50
|
-
if (!
|
|
51
|
-
|
|
56
|
+
}), j = a(async () => {
|
|
57
|
+
if (!l || !O() || g) return null;
|
|
58
|
+
_(l, !0);
|
|
52
59
|
try {
|
|
53
|
-
return (await
|
|
60
|
+
return (await k({ variables: { widgetId: l } })).data?.refreshWidgetData ?? null;
|
|
54
61
|
} catch {
|
|
55
62
|
return null;
|
|
56
63
|
}
|
|
57
64
|
}, [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
l,
|
|
66
|
+
k,
|
|
67
|
+
_,
|
|
68
|
+
O,
|
|
69
|
+
g
|
|
70
|
+
]), M = a(async () => {
|
|
71
|
+
if (l && O() && !g) {
|
|
72
|
+
_(l, !0);
|
|
65
73
|
try {
|
|
66
|
-
await
|
|
74
|
+
await w();
|
|
67
75
|
} catch {}
|
|
68
76
|
}
|
|
69
77
|
}, [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
l,
|
|
79
|
+
w,
|
|
80
|
+
_,
|
|
81
|
+
O,
|
|
82
|
+
g
|
|
83
|
+
]), N = (!d && l && b === "complete" ? y : void 0)?.getWidget, P = o(() => N || null, [N]), F = g ? T?.getWidget?.data : null, I = g ? F : P?.data, L = o(() => I || null, [I]), R = g ? D : C, z = o(() => R ? Error(R.message) : null, [R]);
|
|
75
84
|
return {
|
|
76
|
-
widget:
|
|
77
|
-
data:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
widget: g ? null : P,
|
|
86
|
+
data: L,
|
|
87
|
+
asOfInfo: L?.asOf ?? null,
|
|
88
|
+
loading: g ? E : S,
|
|
89
|
+
error: z,
|
|
90
|
+
refresh: j,
|
|
91
|
+
refetch: M,
|
|
92
|
+
isRefreshing: A
|
|
83
93
|
};
|
|
84
94
|
}
|
|
85
|
-
export {
|
|
95
|
+
export { l as default, l as useWidgetData };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
export declare const DashboardViewPage: FC;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The dashboard view. The as-of provider sits outside the page body so that every
|
|
5
|
+
* part of the page, header and assistant tools included, can see whether a past
|
|
6
|
+
* time is shown (BOFF-14757).
|
|
7
|
+
*/
|
|
8
|
+
declare const DashboardViewPageWithAsOf: FC;
|
|
9
|
+
export default DashboardViewPageWithAsOf;
|