@burdenoff/microfe-bigconsole 2026.1122.6 → 2026.1123.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/components/fleet/FleetBadge.d.ts +12 -0
- package/dist/bigconsole/components/fleet/FleetBadge.js +61 -0
- package/dist/bigconsole/components/fleet/FleetBreadcrumb.d.ts +14 -0
- package/dist/bigconsole/components/fleet/FleetBreadcrumb.js +46 -0
- package/dist/bigconsole/components/fleet/FleetCardActions.d.ts +17 -0
- package/dist/bigconsole/components/fleet/FleetCardActions.js +78 -0
- package/dist/bigconsole/components/fleet/LinkToMasterDialog.d.ts +24 -0
- package/dist/bigconsole/components/fleet/LinkToMasterDialog.js +108 -0
- package/dist/bigconsole/hooks/useDashboardOperations.d.ts +8 -0
- package/dist/bigconsole/hooks/useDashboardOperations.js +2 -0
- package/dist/bigconsole/hooks/useFleetBoardActions.d.ts +18 -0
- package/dist/bigconsole/hooks/useFleetBoardActions.js +54 -0
- package/dist/bigconsole/hooks/useFleetBreadcrumb.d.ts +13 -0
- package/dist/bigconsole/hooks/useFleetBreadcrumb.js +52 -0
- package/dist/bigconsole/hooks/useFleetCopyTotals.d.ts +11 -0
- package/dist/bigconsole/hooks/useFleetCopyTotals.js +52 -0
- package/dist/bigconsole/hooks/useFleetLinks.d.ts +19 -0
- package/dist/bigconsole/hooks/useFleetLinks.js +74 -0
- package/dist/bigconsole/hooks/useFleetMasterSearch.d.ts +13 -0
- package/dist/bigconsole/hooks/useFleetMasterSearch.js +62 -0
- package/dist/bigconsole/pages/DashboardViewPage.js +313 -303
- package/dist/bigconsole/pages/DashboardsPage.js +733 -435
- package/dist/bigconsole/pages/InsightsPage.js +490 -425
- package/dist/bigconsole/utils/fleetTree.d.ts +50 -0
- package/dist/bigconsole/utils/fleetTree.js +64 -0
- package/dist/generated/global-types.d.ts +39 -7
- package/dist/generated/wspace-operations.d.ts +86 -0
- package/dist/generated/wspace-operations.js +602 -147
- package/dist/generated/wspace-types.d.ts +3847 -23
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import "../context/index.js";
|
|
2
|
+
import { useBigConsole as e } from "../context/BigConsoleContext.js";
|
|
3
|
+
import { FleetLinksDocument as t } from "../../generated/wspace-operations.js";
|
|
4
|
+
import { useCallback as n, useEffect as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
|
|
5
|
+
import { useApolloClient as s } from "@apollo/client/react";
|
|
6
|
+
// src/bigconsole/hooks/useFleetLinks.ts
|
|
7
|
+
var c = [], l = [];
|
|
8
|
+
function u({ skip: u = !1 } = {}) {
|
|
9
|
+
let [d, f] = o({
|
|
10
|
+
owner: "",
|
|
11
|
+
links: [],
|
|
12
|
+
requests: [],
|
|
13
|
+
error: null
|
|
14
|
+
}), [p, m] = o(!u), { workspaceId: h, currentUser: g } = e(), _ = s(), v = `${h ?? ""}:${g?.id ?? ""}`, y = a(v), b = a(0);
|
|
15
|
+
i(() => (y.current = v, () => {
|
|
16
|
+
y.current = "", b.current += 1;
|
|
17
|
+
}), [v]);
|
|
18
|
+
let x = n(async () => {
|
|
19
|
+
let e = ++b.current, n = () => y.current === v && b.current === e;
|
|
20
|
+
try {
|
|
21
|
+
m(!0);
|
|
22
|
+
let e = await _.query({
|
|
23
|
+
query: t,
|
|
24
|
+
fetchPolicy: "no-cache",
|
|
25
|
+
errorPolicy: "none",
|
|
26
|
+
context: {
|
|
27
|
+
requiredWorkspaceAuth: !0,
|
|
28
|
+
requiredWorkspaceId: h,
|
|
29
|
+
queryDeduplication: !1
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
if (!n()) return;
|
|
33
|
+
f({
|
|
34
|
+
owner: v,
|
|
35
|
+
links: (e.data?.dashboardLinks ?? []).map((e) => ({
|
|
36
|
+
childDashboardId: e.childDashboardId,
|
|
37
|
+
masterDashboardId: e.masterDashboardId,
|
|
38
|
+
status: e.status === "PENDING" ? "PENDING" : "ACTIVE"
|
|
39
|
+
})),
|
|
40
|
+
requests: (e.data?.pendingDashboardLinks ?? []).map((e) => ({
|
|
41
|
+
childDashboardId: e.childDashboardId,
|
|
42
|
+
childName: e.childName,
|
|
43
|
+
masterName: e.masterName
|
|
44
|
+
})),
|
|
45
|
+
error: null
|
|
46
|
+
});
|
|
47
|
+
} catch (e) {
|
|
48
|
+
n() && f({
|
|
49
|
+
owner: v,
|
|
50
|
+
links: [],
|
|
51
|
+
requests: [],
|
|
52
|
+
error: e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load linked boards")
|
|
53
|
+
});
|
|
54
|
+
} finally {
|
|
55
|
+
n() && m(!1);
|
|
56
|
+
}
|
|
57
|
+
}, [
|
|
58
|
+
_,
|
|
59
|
+
v,
|
|
60
|
+
h
|
|
61
|
+
]);
|
|
62
|
+
r(() => {
|
|
63
|
+
u || x();
|
|
64
|
+
}, [x, u]);
|
|
65
|
+
let S = d.owner === v;
|
|
66
|
+
return {
|
|
67
|
+
links: S ? d.links : c,
|
|
68
|
+
requests: S ? d.requests : l,
|
|
69
|
+
loading: p || !u && !S,
|
|
70
|
+
error: S ? d.error : null,
|
|
71
|
+
refetch: x
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export { u as useFleetLinks };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useFleetMasterSearch (BOFF-15410)
|
|
3
|
+
*
|
|
4
|
+
* Boards matching what is typed in the "Link to master" dialog, searched on the server. The dashboards list
|
|
5
|
+
* holds only its first page, so a master beyond it could never be chosen from that list alone. A failed search
|
|
6
|
+
* just adds nothing: the boards already loaded stay choosable.
|
|
7
|
+
*/
|
|
8
|
+
export interface FleetMasterMatch {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
isMaster: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function useFleetMasterSearch(query: string, enabled: boolean): FleetMasterMatch[];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import "../context/index.js";
|
|
2
|
+
import { useBigConsole as e } from "../context/BigConsoleContext.js";
|
|
3
|
+
import { ListDashboardsDocument as t } from "../../generated/wspace-operations.js";
|
|
4
|
+
import { useEffect as n, useState as r } from "react";
|
|
5
|
+
import { useApolloClient as i } from "@apollo/client/react";
|
|
6
|
+
// src/bigconsole/hooks/useFleetMasterSearch.ts
|
|
7
|
+
var a = 250, o = 20;
|
|
8
|
+
function s(s, c) {
|
|
9
|
+
let [l, u] = r({
|
|
10
|
+
owner: "",
|
|
11
|
+
query: "",
|
|
12
|
+
items: []
|
|
13
|
+
}), { workspaceId: d, currentUser: f } = e(), p = `${d ?? ""}:${f?.id ?? ""}`, m = i(), h = s.trim();
|
|
14
|
+
return n(() => {
|
|
15
|
+
if (!c || !h) return;
|
|
16
|
+
let e = !0, n = setTimeout(() => {
|
|
17
|
+
m.query({
|
|
18
|
+
query: t,
|
|
19
|
+
variables: {
|
|
20
|
+
first: o,
|
|
21
|
+
search: h,
|
|
22
|
+
includeArchived: !1
|
|
23
|
+
},
|
|
24
|
+
fetchPolicy: "no-cache",
|
|
25
|
+
errorPolicy: "none",
|
|
26
|
+
context: {
|
|
27
|
+
requiredWorkspaceAuth: !0,
|
|
28
|
+
requiredWorkspaceId: d,
|
|
29
|
+
queryDeduplication: !1
|
|
30
|
+
}
|
|
31
|
+
}).then((t) => {
|
|
32
|
+
if (!e) return;
|
|
33
|
+
let n = (t.data?.listDashboards?.edges ?? []).map((e) => ({
|
|
34
|
+
id: e.node.id,
|
|
35
|
+
name: e.node.name,
|
|
36
|
+
isMaster: e.node.isMaster === !0
|
|
37
|
+
}));
|
|
38
|
+
u({
|
|
39
|
+
owner: p,
|
|
40
|
+
query: h,
|
|
41
|
+
items: n
|
|
42
|
+
});
|
|
43
|
+
}).catch(() => {
|
|
44
|
+
e && u({
|
|
45
|
+
owner: p,
|
|
46
|
+
query: h,
|
|
47
|
+
items: []
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}, a);
|
|
51
|
+
return () => {
|
|
52
|
+
e = !1, clearTimeout(n);
|
|
53
|
+
};
|
|
54
|
+
}, [
|
|
55
|
+
m,
|
|
56
|
+
c,
|
|
57
|
+
h,
|
|
58
|
+
p,
|
|
59
|
+
d
|
|
60
|
+
]), c && h && l.owner === p && l.query === h ? l.items : [];
|
|
61
|
+
}
|
|
62
|
+
export { s as useFleetMasterSearch };
|