@memberjunction/ng-flow-editor 6.1.0-edge.1 → 6.1.0-edge.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/LICENSE +180 -4
- package/dist/lib/agent-editor/agent-flow-transformer.service.d.ts +31 -0
- package/dist/lib/agent-editor/agent-flow-transformer.service.d.ts.map +1 -1
- package/dist/lib/agent-editor/agent-flow-transformer.service.js +85 -22
- package/dist/lib/agent-editor/agent-flow-transformer.service.js.map +1 -1
- package/dist/lib/agent-editor/flow-agent-editor.component.d.ts +46 -1
- package/dist/lib/agent-editor/flow-agent-editor.component.d.ts.map +1 -1
- package/dist/lib/agent-editor/flow-agent-editor.component.js +160 -97
- package/dist/lib/agent-editor/flow-agent-editor.component.js.map +1 -1
- package/dist/lib/components/flow-editor.component.d.ts +53 -5
- package/dist/lib/components/flow-editor.component.d.ts.map +1 -1
- package/dist/lib/components/flow-editor.component.js +354 -177
- package/dist/lib/components/flow-editor.component.js.map +1 -1
- package/dist/lib/components/flow-node.component.d.ts +5 -0
- package/dist/lib/components/flow-node.component.d.ts.map +1 -1
- package/dist/lib/components/flow-node.component.js +79 -44
- package/dist/lib/components/flow-node.component.js.map +1 -1
- package/dist/lib/components/flow-palette.component.d.ts +22 -3
- package/dist/lib/components/flow-palette.component.d.ts.map +1 -1
- package/dist/lib/components/flow-palette.component.js +48 -23
- package/dist/lib/components/flow-palette.component.js.map +1 -1
- package/dist/lib/components/flow-toolbar.component.d.ts +3 -1
- package/dist/lib/components/flow-toolbar.component.d.ts.map +1 -1
- package/dist/lib/components/flow-toolbar.component.js +32 -4
- package/dist/lib/components/flow-toolbar.component.js.map +1 -1
- package/dist/lib/flow-editor.module.d.ts +7 -6
- package/dist/lib/flow-editor.module.d.ts.map +1 -1
- package/dist/lib/flow-editor.module.js +6 -2
- package/dist/lib/flow-editor.module.js.map +1 -1
- package/dist/lib/interfaces/flow-types.d.ts +52 -3
- package/dist/lib/interfaces/flow-types.d.ts.map +1 -1
- package/dist/lib/interfaces/flow-types.js +33 -1
- package/dist/lib/interfaces/flow-types.js.map +1 -1
- package/package.json +10 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-types.js","sourceRoot":"","sources":["../../../src/lib/interfaces/flow-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * Core interfaces for the generic flow editor.\n * These types are entity-agnostic — consumers map their domain data to/from these.\n */\n\n// ---------------------------------------------------------------------------\n// Node Types\n// ---------------------------------------------------------------------------\n\n/** Position on the canvas */\nexport interface FlowPosition {\n X: number;\n Y: number;\n}\n\n/** Size dimensions */\nexport interface FlowSize {\n Width: number;\n Height: number;\n}\n\n/** A port (connector) on a node */\nexport interface FlowNodePort {\n ID: string;\n Direction: 'input' | 'output';\n Side?: 'left' | 'right' | 'top' | 'bottom' | 'auto';\n Multiple?: boolean;\n Disabled?: boolean;\n Label?: string;\n /** Category string for connection validation (matched against FlowNodePort on targets) */\n Category?: string;\n}\n\n/** A small info badge displayed on a node */\nexport interface FlowNodeBadge {\n Label: string;\n Value: string;\n Icon?: string;\n Color?: string;\n}\n\n/** Visual status of a node */\nexport type FlowNodeStatus = 'default' | 'success' | 'error' | 'warning' | 'running' | 'disabled' | 'pending';\n\n/** A node in the flow graph */\nexport interface FlowNode {\n ID: string;\n Type: string;\n Label: string;\n Subtitle?: string;\n Icon?: string;\n IconColor?: string;\n Status: FlowNodeStatus;\n StatusMessage?: string;\n Badges?: FlowNodeBadge[];\n Position: FlowPosition;\n Size?: FlowSize;\n Ports: FlowNodePort[];\n Collapsed?: boolean;\n Selected?: boolean;\n Locked?: boolean;\n IsStartNode?: boolean;\n /** Opaque data payload — consumers store domain-specific data here */\n Data?: Record<string, unknown>;\n}\n\n// ---------------------------------------------------------------------------\n// Connection Types\n// ---------------------------------------------------------------------------\n\n/** Visual style for a connection line */\nexport type FlowConnectionStyle = 'solid' | 'dashed' | 'dotted';\n\n/** A connection (edge) between two nodes */\nexport interface FlowConnection {\n ID: string;\n SourceNodeID: string;\n SourcePortID: string;\n TargetNodeID: string;\n TargetPortID: string;\n Label?: string;\n LabelDetail?: string;\n /** Font Awesome icon class shown before the label text (e.g., 'fa-check') */\n LabelIcon?: string;\n /** Color for the label icon */\n LabelIconColor?: string;\n Condition?: string;\n Priority?: number;\n Style?: FlowConnectionStyle;\n Color?: string;\n Animated?: boolean;\n Selected?: boolean;\n /** Opaque data payload — consumers store domain-specific data here */\n Data?: Record<string, unknown>;\n}\n\n// ---------------------------------------------------------------------------\n// Node Type Registration (for palette and rendering)\n// ---------------------------------------------------------------------------\n\n/** Configuration for a node type displayed in the palette */\nexport interface FlowNodeTypeConfig {\n /** Unique type identifier (e.g., 'Action', 'Prompt') */\n Type: string;\n /** Display label */\n Label: string;\n /** Font Awesome icon class (e.g., 'fa-bolt') */\n Icon: string;\n /** Hex color for the node header */\n Color: string;\n /** Default ports created when this node type is added */\n DefaultPorts?: FlowNodePort[];\n /** Palette category for grouping (e.g., 'Steps', 'Loops') */\n Category?: string;\n /** Whether this type can be dragged from the palette (default true) */\n Draggable?: boolean;\n /** Maximum number of instances allowed (0 = unlimited, default 0) */\n MaxInstances?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Event Payloads\n// ---------------------------------------------------------------------------\n\n/** Emitted when a new node is added from the palette */\nexport interface FlowNodeAddedEvent {\n Node: FlowNode;\n DropPosition: FlowPosition;\n}\n\n/** Emitted when a node is moved on the canvas */\nexport interface FlowNodeMovedEvent {\n NodeID: string;\n OldPosition: FlowPosition;\n NewPosition: FlowPosition;\n}\n\n/** Emitted when a new connection is drawn */\nexport interface FlowConnectionCreatedEvent {\n SourceNodeID: string;\n SourcePortID: string;\n TargetNodeID: string;\n TargetPortID: string;\n}\n\n/** Emitted when an existing connection is reassigned (endpoint dragged to a different node) */\nexport interface FlowConnectionReassignedEvent {\n ConnectionID: string;\n OldSourceNodeID: string;\n OldSourcePortID: string;\n OldTargetNodeID: string;\n OldTargetPortID: string;\n NewSourceNodeID: string;\n NewSourcePortID: string;\n NewTargetNodeID: string;\n NewTargetPortID: string;\n}\n\n/** Emitted when the selection state changes */\nexport interface FlowSelectionChangedEvent {\n SelectedNodeIDs: string[];\n SelectedConnectionIDs: string[];\n}\n\n/** Emitted when empty canvas is clicked */\nexport interface FlowCanvasClickEvent {\n Position: FlowPosition;\n}\n\n/** Context menu target type */\nexport type FlowContextMenuTarget = 'node' | 'connection';\n\n/**
|
|
1
|
+
{"version":3,"file":"flow-types.js","sourceRoot":"","sources":["../../../src/lib/interfaces/flow-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+LH;;;;GAIG;AACH,MAAM,OAAO,8BAA8B;IAGnB;IACA;IACA;IACA;IACT;IANJ,MAAM,GAAG,KAAK,CAAC;IACtB,YACoB,MAA6B,EAC7B,IAAqB,EACrB,UAAiC,EACjC,UAAsB,EAC/B,KAA4B;QAJnB,WAAM,GAAN,MAAM,CAAuB;QAC7B,SAAI,GAAJ,IAAI,CAAiB;QACrB,eAAU,GAAV,UAAU,CAAuB;QACjC,eAAU,GAAV,UAAU,CAAY;QAC/B,UAAK,GAAL,KAAK,CAAuB;IACpC,CAAC;CACP;AAED,6FAA6F;AAC7F,MAAM,OAAO,mCAAmC;IAExB;IACA;IACA;IACA;IAJpB,YACoB,QAAgB,EAChB,MAA6B,EAC7B,IAAqB,EACrB,UAAiC;QAHjC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAuB;QAC7B,SAAI,GAAJ,IAAI,CAAiB;QACrB,eAAU,GAAV,UAAU,CAAuB;IAClD,CAAC;CACP","sourcesContent":["/**\n * Core interfaces for the generic flow editor.\n * These types are entity-agnostic — consumers map their domain data to/from these.\n */\n\n// ---------------------------------------------------------------------------\n// Node Types\n// ---------------------------------------------------------------------------\n\n/** Position on the canvas */\nexport interface FlowPosition {\n X: number;\n Y: number;\n}\n\n/** Size dimensions */\nexport interface FlowSize {\n Width: number;\n Height: number;\n}\n\n/** A port (connector) on a node */\nexport interface FlowNodePort {\n ID: string;\n Direction: 'input' | 'output';\n Side?: 'left' | 'right' | 'top' | 'bottom' | 'auto';\n Multiple?: boolean;\n Disabled?: boolean;\n Label?: string;\n /** Category string for connection validation (matched against FlowNodePort on targets) */\n Category?: string;\n}\n\n/** A small info badge displayed on a node */\nexport interface FlowNodeBadge {\n Label: string;\n Value: string;\n Icon?: string;\n Color?: string;\n}\n\n/** Visual status of a node */\n/**\n * How a node presents its state.\n *\n * `skipped` is deliberately its own value rather than a shade of `disabled`. Disabled means \"this\n * cannot run\"; skipped means \"the graph chose another route\" — nothing is wrong, and a reader who\n * cannot tell them apart goes looking for a failure that never happened.\n */\nexport type FlowNodeStatus = 'default' | 'success' | 'error' | 'warning' | 'running' | 'disabled' | 'pending' | 'skipped';\n\n/** A node in the flow graph */\nexport interface FlowNode {\n ID: string;\n Type: string;\n Label: string;\n Subtitle?: string;\n Icon?: string;\n IconColor?: string;\n Status: FlowNodeStatus;\n StatusMessage?: string;\n Badges?: FlowNodeBadge[];\n Position: FlowPosition;\n Size?: FlowSize;\n Ports: FlowNodePort[];\n Collapsed?: boolean;\n Selected?: boolean;\n Locked?: boolean;\n IsStartNode?: boolean;\n /** Opaque data payload — consumers store domain-specific data here */\n Data?: Record<string, unknown>;\n}\n\n// ---------------------------------------------------------------------------\n// Connection Types\n// ---------------------------------------------------------------------------\n\n/** Visual style for a connection line */\nexport type FlowConnectionStyle = 'solid' | 'dashed' | 'dotted';\n\n/** A connection (edge) between two nodes */\nexport interface FlowConnection {\n ID: string;\n SourceNodeID: string;\n SourcePortID: string;\n TargetNodeID: string;\n TargetPortID: string;\n Label?: string;\n LabelDetail?: string;\n /** Font Awesome icon class shown before the label text (e.g., 'fa-check') */\n LabelIcon?: string;\n /** Color for the label icon */\n LabelIconColor?: string;\n Condition?: string;\n Priority?: number;\n Style?: FlowConnectionStyle;\n Color?: string;\n /** Stroke width in px. Active/flowing edges use a thicker value so they read at a glance. */\n StrokeWidth?: number;\n Animated?: boolean;\n Selected?: boolean;\n /** Opaque data payload — consumers store domain-specific data here */\n Data?: Record<string, unknown>;\n}\n\n// ---------------------------------------------------------------------------\n// Node Type Registration (for palette and rendering)\n// ---------------------------------------------------------------------------\n\n/** Configuration for a node type displayed in the palette */\nexport interface FlowNodeTypeConfig {\n /** Unique type identifier (e.g., 'Action', 'Prompt') */\n Type: string;\n /** Display label */\n Label: string;\n /** Font Awesome icon class (e.g., 'fa-bolt') */\n Icon: string;\n /** Hex color for the node header */\n Color: string;\n /** Default ports created when this node type is added */\n DefaultPorts?: FlowNodePort[];\n /** Palette category for grouping (e.g., 'Steps', 'Loops') */\n Category?: string;\n /** Whether this type can be dragged from the palette (default true) */\n Draggable?: boolean;\n /** Maximum number of instances allowed (0 = unlimited, default 0) */\n MaxInstances?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Event Payloads\n// ---------------------------------------------------------------------------\n\n/** Emitted when a new node is added from the palette */\nexport interface FlowNodeAddedEvent {\n Node: FlowNode;\n DropPosition: FlowPosition;\n}\n\n/** Emitted when a node is moved on the canvas */\nexport interface FlowNodeMovedEvent {\n NodeID: string;\n OldPosition: FlowPosition;\n NewPosition: FlowPosition;\n}\n\n/** Emitted when a new connection is drawn */\nexport interface FlowConnectionCreatedEvent {\n SourceNodeID: string;\n SourcePortID: string;\n TargetNodeID: string;\n TargetPortID: string;\n}\n\n/** Emitted when an existing connection is reassigned (endpoint dragged to a different node) */\nexport interface FlowConnectionReassignedEvent {\n ConnectionID: string;\n OldSourceNodeID: string;\n OldSourcePortID: string;\n OldTargetNodeID: string;\n OldTargetPortID: string;\n NewSourceNodeID: string;\n NewSourcePortID: string;\n NewTargetNodeID: string;\n NewTargetPortID: string;\n}\n\n/** Emitted when the selection state changes */\nexport interface FlowSelectionChangedEvent {\n SelectedNodeIDs: string[];\n SelectedConnectionIDs: string[];\n}\n\n/** Emitted when empty canvas is clicked */\nexport interface FlowCanvasClickEvent {\n Position: FlowPosition;\n}\n\n/** Context menu target type */\nexport type FlowContextMenuTarget = 'node' | 'connection';\n\n/** Built-in design-time actions. Hosts may emit any other `ID` string. */\nexport type FlowContextMenuAction = 'edit' | 'remove' | string;\n\n/** One row in the canvas context menu. The host may replace the default Edit/Remove set. */\nexport type FlowContextMenuItem = {\n ID: string;\n Label: string;\n Icon?: string;\n Danger?: boolean;\n Disabled?: boolean;\n Shortcut?: string;\n};\n\n/**\n * Fired BEFORE the canvas menu opens. Mutate `Items` to replace the default set; `Cancel = true`\n * suppresses the menu. A `Before*` handler must not be async — the emitter reads `Cancel`/`Items`\n * when `emit()` returns.\n */\nexport class FlowBeforeContextMenuEventArgs {\n public Cancel = false;\n constructor(\n public readonly Target: FlowContextMenuTarget,\n public readonly Node: FlowNode | null,\n public readonly Connection: FlowConnection | null,\n public readonly MouseEvent: MouseEvent,\n public Items: FlowContextMenuItem[],\n ) {}\n}\n\n/** Fired AFTER a menu item is chosen. Built-in `edit`/`remove` still run unless ReadOnly. */\nexport class FlowAfterContextMenuActionEventArgs {\n constructor(\n public readonly ActionID: string,\n public readonly Target: FlowContextMenuTarget,\n public readonly Node: FlowNode | null,\n public readonly Connection: FlowConnection | null,\n ) {}\n}\n\n// ---------------------------------------------------------------------------\n// State Types (for undo/redo)\n// ---------------------------------------------------------------------------\n\n/** A complete snapshot of the flow state */\nexport interface FlowSnapshot {\n Nodes: FlowNode[];\n Connections: FlowConnection[];\n}\n\n// ---------------------------------------------------------------------------\n// Layout Types\n// ---------------------------------------------------------------------------\n\n/** Direction for auto-layout */\nexport type FlowLayoutDirection = 'horizontal' | 'vertical';\n\n/**\n * How the canvas toolbar presents itself.\n *\n * `shown` is the full bar. `minimized` is a chip that restores it. `hidden` leaves only a\n * recover tab — otherwise a host that hid the bar would have no way back from the canvas.\n */\nexport type FlowToolbarVisibility = 'shown' | 'hidden' | 'minimized';\n\n/** Horizontal placement of the canvas toolbar (and of its minimized / hidden recover control). */\nexport type FlowToolbarAlign = 'left' | 'center' | 'right';\n\n/** Result of an auto-layout operation */\nexport interface FlowLayoutResult {\n Positions: Map<string, FlowPosition>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-flow-editor",
|
|
3
|
-
"version": "6.1.0-edge.
|
|
3
|
+
"version": "6.1.0-edge.3",
|
|
4
4
|
"description": "MemberJunction: Generic visual flow editor component powered by Foblex Flow, with an agent-specific Flow Agent Editor",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"memberjunction"
|
|
18
18
|
],
|
|
19
19
|
"author": "",
|
|
20
|
-
"license": "
|
|
20
|
+
"license": "BUSL-1.1",
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@angular/compiler": "21.1.3",
|
|
23
23
|
"@angular/compiler-cli": "21.1.3",
|
|
24
|
-
"@memberjunction/ng-test-utils": "6.1.0-edge.
|
|
24
|
+
"@memberjunction/ng-test-utils": "6.1.0-edge.3",
|
|
25
25
|
"sass": "^1.97.3",
|
|
26
26
|
"vitest": "^4.0.18"
|
|
27
27
|
},
|
|
@@ -32,18 +32,19 @@
|
|
|
32
32
|
"@angular/platform-browser": "^21.1.3"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@memberjunction/ng-ui-components": "6.1.0-edge.1",
|
|
36
35
|
"@dagrejs/dagre": "^1.1.8",
|
|
37
36
|
"@foblex/2d": "1.2.2",
|
|
38
37
|
"@foblex/flow": "^18.0.0",
|
|
39
38
|
"@foblex/mediator": "1.1.3",
|
|
40
39
|
"@foblex/platform": "1.0.4",
|
|
41
40
|
"@foblex/utils": "1.1.1",
|
|
42
|
-
"@memberjunction/core": "6.1.0-edge.
|
|
43
|
-
"@memberjunction/core-entities": "6.1.0-edge.
|
|
44
|
-
"@memberjunction/global": "6.1.0-edge.
|
|
45
|
-
"@memberjunction/ng-base-types": "6.1.0-edge.
|
|
46
|
-
"@memberjunction/ng-code-editor": "6.1.0-edge.
|
|
41
|
+
"@memberjunction/core": "6.1.0-edge.3",
|
|
42
|
+
"@memberjunction/core-entities": "6.1.0-edge.3",
|
|
43
|
+
"@memberjunction/global": "6.1.0-edge.3",
|
|
44
|
+
"@memberjunction/ng-base-types": "6.1.0-edge.3",
|
|
45
|
+
"@memberjunction/ng-code-editor": "6.1.0-edge.3",
|
|
46
|
+
"@memberjunction/ng-shared-generic": "6.1.0-edge.3",
|
|
47
|
+
"@memberjunction/ng-ui-components": "6.1.0-edge.3",
|
|
47
48
|
"rxjs": "^7.8.2",
|
|
48
49
|
"tslib": "^2.8.1"
|
|
49
50
|
},
|