@burdenoff/microfe-bigconsole 2026.1104.2 → 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/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/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/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,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 };
|