@burdenoff/microfe-bigconsole 2026.1104.2 → 2026.1104.4
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/pages/ParserBuilderPage.js +529 -476
- package/dist/bigconsole/utils/dataSinkOwner.d.ts +26 -0
- package/dist/bigconsole/utils/dataSinkOwner.js +17 -0
- package/dist/bigconsole/utils/parserTestGate.d.ts +43 -0
- package/dist/bigconsole/utils/parserTestGate.js +18 -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,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser wizard test gate (BOFF-10084).
|
|
3
|
+
*
|
|
4
|
+
* "Parsers you can test before you trust": the Expression & Test step must not
|
|
5
|
+
* be left, and the parser not created, until the CURRENT expression has passed
|
|
6
|
+
* a test. A test belongs to the exact (type, expression) pair it ran on, so
|
|
7
|
+
* editing the expression or switching JQ ↔ JSONata after a pass needs a new
|
|
8
|
+
* run; a failed run clears the pass.
|
|
9
|
+
*
|
|
10
|
+
* Users who may not run tests (no `bigconsole-parser:test`) cannot satisfy the
|
|
11
|
+
* gate, so for them it degrades to a warning instead of a dead end.
|
|
12
|
+
*/
|
|
13
|
+
/** Identity of what a test ran on: the parser type and the trimmed expression. */
|
|
14
|
+
export declare function parserTestSignature(type: string, expression: string): string;
|
|
15
|
+
/** Whether the last passing test was of exactly this type + expression. */
|
|
16
|
+
export declare function isExpressionTested(passedSignature: string | null, type: string, expression: string): boolean;
|
|
17
|
+
export type ExpressionGateState = 'empty' | 'untested' | 'tested' | 'untestable';
|
|
18
|
+
/**
|
|
19
|
+
* Where the expression step stands:
|
|
20
|
+
* - `empty`: nothing to test yet (blocks Next).
|
|
21
|
+
* - `untested`: needs a passing run of the current expression (blocks Next).
|
|
22
|
+
* - `tested`: the current expression passed (Next allowed).
|
|
23
|
+
* - `untestable`: the user cannot run tests, so Next is allowed with a warning.
|
|
24
|
+
*/
|
|
25
|
+
export declare function expressionGateState(input: {
|
|
26
|
+
type: string;
|
|
27
|
+
expression: string;
|
|
28
|
+
passedSignature: string | null;
|
|
29
|
+
canTest: boolean;
|
|
30
|
+
}): ExpressionGateState;
|
|
31
|
+
/** Whether the gate lets the user move past the expression step / create. */
|
|
32
|
+
export declare function expressionGateAllows(state: ExpressionGateState): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether a key press on the read-only (Reference mode) input is an attempt to
|
|
35
|
+
* edit it — printable characters, deletion, Enter. Navigation, selection and
|
|
36
|
+
* shortcuts such as Ctrl/Cmd+C stay silent.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isEditAttemptKey(event: {
|
|
39
|
+
key: string;
|
|
40
|
+
ctrlKey?: boolean;
|
|
41
|
+
metaKey?: boolean;
|
|
42
|
+
altKey?: boolean;
|
|
43
|
+
}): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/bigconsole/utils/parserTestGate.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
return `${e}\u0000${t.trim()}`;
|
|
4
|
+
}
|
|
5
|
+
function t(t, n, r) {
|
|
6
|
+
return t !== null && r.trim().length > 0 && t === e(n, r);
|
|
7
|
+
}
|
|
8
|
+
function n(e) {
|
|
9
|
+
return e.expression.trim() ? t(e.passedSignature, e.type, e.expression) ? "tested" : e.canTest ? "untested" : "untestable" : "empty";
|
|
10
|
+
}
|
|
11
|
+
function r(e) {
|
|
12
|
+
return e === "tested" || e === "untestable";
|
|
13
|
+
}
|
|
14
|
+
function i(e) {
|
|
15
|
+
return e.ctrlKey || e.metaKey || e.altKey ? !1 : e.key === "Backspace" || e.key === "Delete" || e.key === "Enter" || e.key.length === 1;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as expressionGateAllows, n as expressionGateState, i as isEditAttemptKey, t as isExpressionTested, e as parserTestSignature };
|
|
@@ -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 };
|