@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,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnInit, OnChanges, OnDestroy, SimpleChanges, ChangeDetectorRef, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
+
import { TransactionGroupBase } from '@memberjunction/core';
|
|
2
3
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
3
4
|
import { MJAIAgentStepEntity, MJAIAgentStepPathEntity } from '@memberjunction/core-entities';
|
|
4
5
|
import { FlowNode, FlowConnection, FlowNodeAddedEvent, FlowConnectionCreatedEvent, FlowConnectionReassignedEvent, FlowNodeTypeConfig } from '../interfaces/flow-types';
|
|
@@ -20,6 +21,27 @@ export declare class FlowAgentEditorComponent extends BaseAngularComponent imple
|
|
|
20
21
|
AgentID: string | null;
|
|
21
22
|
EditMode: boolean;
|
|
22
23
|
FullScreen: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether this editor shows its own Save / Edit / Cancel controls.
|
|
26
|
+
*
|
|
27
|
+
* **Off by default, and that default is the safe one.** When a host form owns the record's save —
|
|
28
|
+
* which is the normal case, since the flow is one part of an agent — a Save button here is a
|
|
29
|
+
* second save button for the same record. The user then has two, they disagree about what "saved"
|
|
30
|
+
* means, and the unsaved indicator on one says nothing about the other.
|
|
31
|
+
*
|
|
32
|
+
* A host that turns this ON is declaring that this editor owns its own persistence (the standalone
|
|
33
|
+
* or fullscreen self-contained case). A host that leaves it off MUST call
|
|
34
|
+
* {@link FlowAgentEditorComponent.QueueSaveInto} from its own save, or flow edits will have no way
|
|
35
|
+
* to reach the database at all.
|
|
36
|
+
*/
|
|
37
|
+
ShowSaveControls: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The title shown in the centre of the toolbar. `null` hides it.
|
|
40
|
+
*
|
|
41
|
+
* Hidden by hosts whose own page chrome already names the record — repeating it inside the canvas
|
|
42
|
+
* is a second, smaller title competing with the real one.
|
|
43
|
+
*/
|
|
44
|
+
CanvasTitle: string | null;
|
|
23
45
|
FlowSaved: EventEmitter<void>;
|
|
24
46
|
FlowChanged: EventEmitter<boolean>;
|
|
25
47
|
FullScreenToggled: EventEmitter<boolean>;
|
|
@@ -83,7 +105,30 @@ export declare class FlowAgentEditorComponent extends BaseAngularComponent imple
|
|
|
83
105
|
private setupInitialZoomObserver;
|
|
84
106
|
private applyInitialZoom;
|
|
85
107
|
private teardownResizeObserver;
|
|
108
|
+
/**
|
|
109
|
+
* Saves the flow on its own — creates a transaction, queues everything into it, submits.
|
|
110
|
+
*
|
|
111
|
+
* Used when this editor owns the save (the standalone / fullscreen self-contained mode). A host
|
|
112
|
+
* that owns the record's save should call {@link QueueSaveInto} instead so the flow lands in the
|
|
113
|
+
* same transaction as the rest of the record.
|
|
114
|
+
*/
|
|
86
115
|
Save(): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Queues every step and path change onto a transaction the CALLER owns and will submit.
|
|
118
|
+
*
|
|
119
|
+
* Split out of {@link Save} so a host form can make the flow part of the record's own atomic save
|
|
120
|
+
* rather than a second, separate one. Two independent saves is how a record ends up looking saved
|
|
121
|
+
* while the user's step edits are gone — the form succeeds, the flow fails, and nothing says so.
|
|
122
|
+
*
|
|
123
|
+
* Deliberately does NOT submit and does NOT clear dirty state: the caller decides whether the
|
|
124
|
+
* transaction commits, and only the caller knows whether it did. Call {@link MarkSaved} after a
|
|
125
|
+
* successful submit.
|
|
126
|
+
*/
|
|
127
|
+
QueueSaveInto(tg: TransactionGroupBase): Promise<void>;
|
|
128
|
+
/** Clears dirty state after the owning transaction actually committed. */
|
|
129
|
+
MarkSaved(): void;
|
|
130
|
+
/** Whether the flow holds edits that have not been written yet. Read by a host that owns the save. */
|
|
131
|
+
get HasUnsavedChanges(): boolean;
|
|
87
132
|
private syncPositionsFromCanvas;
|
|
88
133
|
/** Write current FlowNode positions back to the underlying step entities.
|
|
89
134
|
* Called on every node move so that rebuildFlowModel() never loses drag changes. */
|
|
@@ -130,6 +175,6 @@ export declare class FlowAgentEditorComponent extends BaseAngularComponent imple
|
|
|
130
175
|
protected onLegendPrefChanged(show: boolean): void;
|
|
131
176
|
private markDirty;
|
|
132
177
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowAgentEditorComponent, never>;
|
|
133
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FlowAgentEditorComponent, "mj-flow-agent-editor", never, { "AgentID": { "alias": "AgentID"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "FullScreen": { "alias": "FullScreen"; "required": false; }; }, { "FlowSaved": "FlowSaved"; "FlowChanged": "FlowChanged"; "FullScreenToggled": "FullScreenToggled"; "StepSelected": "StepSelected"; }, never, never, false, never>;
|
|
178
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlowAgentEditorComponent, "mj-flow-agent-editor", never, { "AgentID": { "alias": "AgentID"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "FullScreen": { "alias": "FullScreen"; "required": false; }; "ShowSaveControls": { "alias": "ShowSaveControls"; "required": false; }; "CanvasTitle": { "alias": "CanvasTitle"; "required": false; }; }, { "FlowSaved": "FlowSaved"; "FlowChanged": "FlowChanged"; "FullScreenToggled": "FullScreenToggled"; "StepSelected": "StepSelected"; }, never, never, false, never>;
|
|
134
179
|
}
|
|
135
180
|
//# sourceMappingURL=flow-agent-editor.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-agent-editor.component.d.ts","sourceRoot":"","sources":["../../../src/lib/agent-editor/flow-agent-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAAa,MAAM,EAAE,SAAS,EAAE,SAAS,EAC/E,aAAa,EAAE,iBAAiB,EAChC,UAAU,EAAE,SAAS,EACtB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"flow-agent-editor.component.d.ts","sourceRoot":"","sources":["../../../src/lib/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