@burdenoff/microfe-bigconsole 2026.1104.1 → 2026.1104.3
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/dashboard/LiveCanvasToggle.js +17 -16
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.d.ts +4 -0
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +80 -55
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.d.ts +13 -0
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +80 -0
- package/dist/bigconsole/pages/DashboardViewPage.js +247 -238
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +144 -111
- package/dist/bigconsole/pages/DataSinkViewPage.js +305 -287
- package/dist/bigconsole/utils/dataSinkOwner.d.ts +26 -0
- package/dist/bigconsole/utils/dataSinkOwner.js +17 -0
- package/dist/bigconsole/utils/liveBoardRefresh.d.ts +31 -0
- package/dist/bigconsole/utils/liveBoardRefresh.js +7 -0
- package/dist/bigconsole/utils/sinkWorkflowLink.d.ts +14 -0
- package/dist/bigconsole/utils/sinkWorkflowLink.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data sink owner (BOFF-10079).
|
|
3
|
+
*
|
|
4
|
+
* A manual sink for plan numbers (budget, targets) has no system of record, so
|
|
5
|
+
* the person accountable for its figures is recorded as `metadata.owner`. The
|
|
6
|
+
* sink's `metadata` JSON already round-trips through create, update and every
|
|
7
|
+
* read, so no schema change is needed.
|
|
8
|
+
*
|
|
9
|
+
* The update mutation REPLACES `metadata`, so an edit must merge the owner into
|
|
10
|
+
* the stored metadata rather than send `{ owner }` alone — other keys (source
|
|
11
|
+
* info, workflow config) would otherwise be wiped.
|
|
12
|
+
*/
|
|
13
|
+
/** Longest owner text accepted — a name, team or email, never a document. */
|
|
14
|
+
export declare const SINK_OWNER_MAX_LENGTH = 120;
|
|
15
|
+
/** The owner recorded on a sink, or '' when there is none. */
|
|
16
|
+
export declare function readSinkOwner(metadata: Record<string, unknown> | null | undefined): string;
|
|
17
|
+
/** Trim and cap owner input the way it will be stored. */
|
|
18
|
+
export declare function normalizeSinkOwner(owner: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Metadata with the owner set (or removed when blank), keeping every other
|
|
21
|
+
* key. Returns undefined when the result is empty and there was no metadata to
|
|
22
|
+
* begin with, so a create without an owner sends no metadata at all.
|
|
23
|
+
*/
|
|
24
|
+
export declare function withSinkOwner(metadata: Record<string, unknown> | null | undefined, owner: string): Record<string, unknown> | undefined;
|
|
25
|
+
/** Whether the owner input differs from what is stored. */
|
|
26
|
+
export declare function sinkOwnerChanged(metadata: Record<string, unknown> | null | undefined, owner: string): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var e = "owner";
|
|
2
|
+
function t(t) {
|
|
3
|
+
let n = t?.[e];
|
|
4
|
+
return typeof n == "string" ? n.trim() : "";
|
|
5
|
+
}
|
|
6
|
+
function n(e) {
|
|
7
|
+
return e.trim().slice(0, 120);
|
|
8
|
+
}
|
|
9
|
+
function r(t, r) {
|
|
10
|
+
let i = { ...t ?? {} }, a = n(r);
|
|
11
|
+
if (a ? i[e] = a : delete i[e], !(Object.keys(i).length === 0 && !t)) return i;
|
|
12
|
+
}
|
|
13
|
+
function i(e, r) {
|
|
14
|
+
return t(e) !== n(r);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { n as normalizeSinkOwner, t as readSinkOwner, i as sinkOwnerChanged, r as withSinkOwner };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live board refresh cadence (BOFF-10201).
|
|
3
|
+
*
|
|
4
|
+
* While GO LIVE is on, the dashboard view refetches two things:
|
|
5
|
+
*
|
|
6
|
+
* - the board STRUCTURE (dashboard + widget list) every few seconds, so new
|
|
7
|
+
* widgets and pages appear without a reload;
|
|
8
|
+
* - every on-screen widget's DATA (`GetWidget`), so a changed sink payload
|
|
9
|
+
* shows up within seconds.
|
|
10
|
+
*
|
|
11
|
+
* The widget list (`WidgetListFields`) carries no data, so before this change
|
|
12
|
+
* GO LIVE only refreshed structure and the numbers moved on each widget's own
|
|
13
|
+
* `refreshInterval` — 300s on generated boards, never when it is 0. A wall
|
|
14
|
+
* display therefore lagged a sink change by up to five minutes.
|
|
15
|
+
*
|
|
16
|
+
* The data cadence matches fe-libs' short-lived GraphQL read cache
|
|
17
|
+
* (`RECENT_QUERY_CACHE_TTL_MS`, 15s): refetching any faster would be answered
|
|
18
|
+
* from that cache and add requests without adding freshness.
|
|
19
|
+
*/
|
|
20
|
+
/** How often live mode refetches the dashboard and widget list. */
|
|
21
|
+
export declare const LIVE_STRUCTURE_POLL_MS = 3500;
|
|
22
|
+
/** How often live mode refetches every visible widget's data. */
|
|
23
|
+
export declare const LIVE_DATA_REFRESH_MS = 15000;
|
|
24
|
+
/** Whole seconds of the data cadence, for user-facing copy. */
|
|
25
|
+
export declare const LIVE_DATA_REFRESH_SECONDS: number;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the live data refetch is due. `lastRefreshAt` is null before the
|
|
28
|
+
* first refetch, which is always due so the board catches up the moment live
|
|
29
|
+
* mode is switched on or the tab becomes visible again.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isLiveDataRefreshDue(lastRefreshAt: number | null, now: number): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/bigconsole/utils/liveBoardRefresh.ts
|
|
2
|
+
var e = 3500, t = 15e3, n = Math.round(t / 1e3);
|
|
3
|
+
function r(e, n) {
|
|
4
|
+
return e === null || n - e >= t;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as LIVE_DATA_REFRESH_MS, n as LIVE_DATA_REFRESH_SECONDS, e as LIVE_STRUCTURE_POLL_MS, r as isLiveDataRefreshDue };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataSinkWorkflowLink, FluidGridsWorkflowStatus } from '../types';
|
|
2
|
+
interface LinkableWorkflow {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
key: string;
|
|
6
|
+
status: FluidGridsWorkflowStatus;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Workflows that can still be linked to the sink: not already linked (enabled
|
|
10
|
+
* or disabled — a disabled link is re-enabled from the workflow, not
|
|
11
|
+
* duplicated) and not archived. Sorted by name for a stable picker.
|
|
12
|
+
*/
|
|
13
|
+
export declare function linkableWorkflowsForSink<W extends LinkableWorkflow>(workflows: readonly W[], links: readonly Pick<DataSinkWorkflowLink, 'workflowId'>[] | undefined): W[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/bigconsole/utils/sinkWorkflowLink.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
let n = new Set((t ?? []).map((e) => e.workflowId));
|
|
4
|
+
return e.filter((e) => e.status !== "archived" && !n.has(e.id)).sort((e, t) => (e.name || e.key).localeCompare(t.name || t.key));
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as linkableWorkflowsForSink };
|