@memberjunction/ng-flow-editor 6.1.0-edge.2 → 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/components/flow-editor.component.d.ts +27 -4
- package/dist/lib/components/flow-editor.component.d.ts.map +1 -1
- package/dist/lib/components/flow-editor.component.js +281 -157
- 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-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/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 -10
|
@@ -5,9 +5,9 @@ function FlowToolbarComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
|
5
5
|
} }
|
|
6
6
|
function FlowToolbarComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
7
7
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
8
|
-
i0.ɵɵelementStart(0, "div", 1)(1, "button",
|
|
8
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "button", 24);
|
|
9
9
|
i0.ɵɵlistener("click", function FlowToolbarComponent_Conditional_17_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.AutoLayoutClicked.emit()); });
|
|
10
|
-
i0.ɵɵelement(2, "i",
|
|
10
|
+
i0.ɵɵelement(2, "i", 25);
|
|
11
11
|
i0.ɵɵelementEnd()();
|
|
12
12
|
} }
|
|
13
13
|
/**
|
|
@@ -29,8 +29,10 @@ export class FlowToolbarComponent {
|
|
|
29
29
|
MinimapToggled = new EventEmitter();
|
|
30
30
|
LegendToggled = new EventEmitter();
|
|
31
31
|
PanModeToggled = new EventEmitter();
|
|
32
|
+
MinimizeClicked = new EventEmitter();
|
|
33
|
+
HideClicked = new EventEmitter();
|
|
32
34
|
static ɵfac = function FlowToolbarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FlowToolbarComponent)(); };
|
|
33
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FlowToolbarComponent, selectors: [["mj-flow-toolbar"]], inputs: { ZoomLevel: "ZoomLevel", ShowGrid: "ShowGrid", ShowMinimap: "ShowMinimap", ShowLegend: "ShowLegend", ReadOnly: "ReadOnly", PanMode: "PanMode" }, outputs: { ZoomInClicked: "ZoomInClicked", ZoomOutClicked: "ZoomOutClicked", FitToScreenClicked: "FitToScreenClicked", AutoLayoutClicked: "AutoLayoutClicked", GridToggled: "GridToggled", MinimapToggled: "MinimapToggled", LegendToggled: "LegendToggled", PanModeToggled: "PanModeToggled" }, standalone: false, decls:
|
|
35
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FlowToolbarComponent, selectors: [["mj-flow-toolbar"]], inputs: { ZoomLevel: "ZoomLevel", ShowGrid: "ShowGrid", ShowMinimap: "ShowMinimap", ShowLegend: "ShowLegend", ReadOnly: "ReadOnly", PanMode: "PanMode" }, outputs: { ZoomInClicked: "ZoomInClicked", ZoomOutClicked: "ZoomOutClicked", FitToScreenClicked: "FitToScreenClicked", AutoLayoutClicked: "AutoLayoutClicked", GridToggled: "GridToggled", MinimapToggled: "MinimapToggled", LegendToggled: "LegendToggled", PanModeToggled: "PanModeToggled", MinimizeClicked: "MinimizeClicked", HideClicked: "HideClicked" }, standalone: false, decls: 32, vars: 13, consts: [[1, "mj-flow-toolbar"], [1, "mj-flow-toolbar-group"], ["title", "Zoom In", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-magnifying-glass-plus"], [1, "mj-flow-toolbar-zoom"], ["title", "Zoom Out", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-magnifying-glass-minus"], ["title", "Fit to Screen", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-expand"], [1, "mj-flow-toolbar-divider"], ["title", "Select Mode (pointer)", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-arrow-pointer"], ["title", "Pan Mode (drag to move canvas)", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-hand"], ["title", "Toggle Grid", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-border-all"], ["title", "Toggle Minimap", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-map"], ["title", "Toggle Legend", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-list-check"], ["title", "Minimize toolbar", "aria-label", "Minimize toolbar", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-compress"], ["title", "Hide toolbar", "aria-label", "Hide toolbar", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-xmark"], ["title", "Auto Arrange", 1, "mj-flow-toolbar-btn", 3, "click"], [1, "fa-solid", "fa-diagram-project"]], template: function FlowToolbarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
34
36
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "button", 2);
|
|
35
37
|
i0.ɵɵlistener("click", function FlowToolbarComponent_Template_button_click_2_listener() { return ctx.ZoomInClicked.emit(); });
|
|
36
38
|
i0.ɵɵelement(3, "i", 3);
|
|
@@ -69,6 +71,15 @@ export class FlowToolbarComponent {
|
|
|
69
71
|
i0.ɵɵelementStart(24, "button", 18);
|
|
70
72
|
i0.ɵɵlistener("click", function FlowToolbarComponent_Template_button_click_24_listener() { return ctx.LegendToggled.emit(!ctx.ShowLegend); });
|
|
71
73
|
i0.ɵɵelement(25, "i", 19);
|
|
74
|
+
i0.ɵɵelementEnd()();
|
|
75
|
+
i0.ɵɵelement(26, "div", 9);
|
|
76
|
+
i0.ɵɵelementStart(27, "div", 1)(28, "button", 20);
|
|
77
|
+
i0.ɵɵlistener("click", function FlowToolbarComponent_Template_button_click_28_listener() { return ctx.MinimizeClicked.emit(); });
|
|
78
|
+
i0.ɵɵelement(29, "i", 21);
|
|
79
|
+
i0.ɵɵelementEnd();
|
|
80
|
+
i0.ɵɵelementStart(30, "button", 22);
|
|
81
|
+
i0.ɵɵlistener("click", function FlowToolbarComponent_Template_button_click_30_listener() { return ctx.HideClicked.emit(); });
|
|
82
|
+
i0.ɵɵelement(31, "i", 23);
|
|
72
83
|
i0.ɵɵelementEnd()()();
|
|
73
84
|
} if (rf & 2) {
|
|
74
85
|
i0.ɵɵadvance(5);
|
|
@@ -157,6 +168,19 @@ export class FlowToolbarComponent {
|
|
|
157
168
|
<i class="fa-solid fa-list-check"></i>
|
|
158
169
|
</button>
|
|
159
170
|
</div>
|
|
171
|
+
|
|
172
|
+
<div class="mj-flow-toolbar-divider"></div>
|
|
173
|
+
|
|
174
|
+
<div class="mj-flow-toolbar-group">
|
|
175
|
+
<button class="mj-flow-toolbar-btn" (click)="MinimizeClicked.emit()"
|
|
176
|
+
title="Minimize toolbar" aria-label="Minimize toolbar">
|
|
177
|
+
<i class="fa-solid fa-compress"></i>
|
|
178
|
+
</button>
|
|
179
|
+
<button class="mj-flow-toolbar-btn" (click)="HideClicked.emit()"
|
|
180
|
+
title="Hide toolbar" aria-label="Hide toolbar">
|
|
181
|
+
<i class="fa-solid fa-xmark"></i>
|
|
182
|
+
</button>
|
|
183
|
+
</div>
|
|
160
184
|
</div>
|
|
161
185
|
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["\n .mj-flow-toolbar {\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 4px 8px;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n }\n\n .mj-flow-toolbar-group {\n display: flex;\n align-items: center;\n gap: 2px;\n }\n\n .mj-flow-toolbar-divider {\n width: 1px;\n height: 20px;\n background: #e2e8f0;\n margin: 0 4px;\n }\n\n .mj-flow-toolbar-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: #64748b;\n cursor: pointer;\n transition: all 0.15s ease;\n font-size: 13px;\n }\n\n .mj-flow-toolbar-btn:hover {\n background: #f1f5f9;\n color: #334155;\n }\n\n .mj-flow-toolbar-btn--active {\n background: #eff6ff;\n color: #3b82f6;\n }\n\n .mj-flow-toolbar-btn--active:hover {\n background: #dbeafe;\n color: #2563eb;\n }\n\n .mj-flow-toolbar-zoom {\n font-size: 11px;\n font-weight: 500;\n color: #64748b;\n min-width: 38px;\n text-align: center;\n user-select: none;\n }\n "] }]
|
|
162
186
|
}], null, { ZoomLevel: [{
|
|
@@ -187,6 +211,10 @@ export class FlowToolbarComponent {
|
|
|
187
211
|
type: Output
|
|
188
212
|
}], PanModeToggled: [{
|
|
189
213
|
type: Output
|
|
214
|
+
}], MinimizeClicked: [{
|
|
215
|
+
type: Output
|
|
216
|
+
}], HideClicked: [{
|
|
217
|
+
type: Output
|
|
190
218
|
}] }); })();
|
|
191
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FlowToolbarComponent, { className: "FlowToolbarComponent", filePath: "src/lib/components/flow-toolbar.component.ts", lineNumber:
|
|
219
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FlowToolbarComponent, { className: "FlowToolbarComponent", filePath: "src/lib/components/flow-toolbar.component.ts", lineNumber: 158 }); })();
|
|
192
220
|
//# sourceMappingURL=flow-toolbar.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-toolbar.component.js","sourceRoot":"","sources":["../../../src/lib/components/flow-toolbar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;;;IA0C3G,yBAA2C;;;;IAKzC,AADF,8BAAmC,iBAC2D;IAAxD,yLAAS,+BAAwB,KAAC;IACpE,wBAA2C;IAE/C,AADE,iBAAS,EACL;;AAhDd;;;GAGG;
|
|
1
|
+
{"version":3,"file":"flow-toolbar.component.js","sourceRoot":"","sources":["../../../src/lib/components/flow-toolbar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;;;IA0C3G,yBAA2C;;;;IAKzC,AADF,8BAAmC,iBAC2D;IAAxD,yLAAS,+BAAwB,KAAC;IACpE,wBAA2C;IAE/C,AADE,iBAAS,EACL;;AAhDd;;;GAGG;AAwJH,MAAM,OAAO,oBAAoB;IACtB,SAAS,GAAG,GAAG,CAAC;IAChB,QAAQ,GAAG,IAAI,CAAC;IAChB,WAAW,GAAG,IAAI,CAAC;IACnB,UAAU,GAAG,IAAI,CAAC;IAClB,QAAQ,GAAG,KAAK,CAAC;IACjB,OAAO,GAAG,KAAK,CAAC;IAEf,aAAa,GAAG,IAAI,YAAY,EAAQ,CAAC;IACzC,cAAc,GAAG,IAAI,YAAY,EAAQ,CAAC;IAC1C,kBAAkB,GAAG,IAAI,YAAY,EAAQ,CAAC;IAC9C,iBAAiB,GAAG,IAAI,YAAY,EAAQ,CAAC;IAC7C,WAAW,GAAG,IAAI,YAAY,EAAW,CAAC;IAC1C,cAAc,GAAG,IAAI,YAAY,EAAW,CAAC;IAC7C,aAAa,GAA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A7C,0DAA6C;YAOjD,eAEC;YAFD,yCAEC;YAED,cAMC;YAND,yCAMC;YAMG,eAA8C;YAA9C,2DAA8C;YAM9C,eAAiD;YAAjD,8DAAiD;YAMjD,eAAgD;YAAhD,6DAAgD;;;iFAwF7C,oBAAoB;cAvJhC,SAAS;6BACI,KAAK,YACP,iBAAiB,YACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFP,iBAiEY,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM;;kBAG9C,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFAjBI,oBAAoB","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\n\n/**\n * Internal toolbar for the generic flow editor canvas controls.\n * Provides zoom, fit-to-screen, auto-layout, and grid/minimap toggles.\n */\n@Component({\n standalone: false,\n selector: 'mj-flow-toolbar',\n template: `\n <div class=\"mj-flow-toolbar\">\n <div class=\"mj-flow-toolbar-group\">\n <button class=\"mj-flow-toolbar-btn\" (click)=\"ZoomInClicked.emit()\" title=\"Zoom In\">\n <i class=\"fa-solid fa-magnifying-glass-plus\"></i>\n </button>\n <span class=\"mj-flow-toolbar-zoom\">{{ ZoomLevel }}%</span>\n <button class=\"mj-flow-toolbar-btn\" (click)=\"ZoomOutClicked.emit()\" title=\"Zoom Out\">\n <i class=\"fa-solid fa-magnifying-glass-minus\"></i>\n </button>\n <button class=\"mj-flow-toolbar-btn\" (click)=\"FitToScreenClicked.emit()\" title=\"Fit to Screen\">\n <i class=\"fa-solid fa-expand\"></i>\n </button>\n </div>\n \n <div class=\"mj-flow-toolbar-divider\"></div>\n \n <div class=\"mj-flow-toolbar-group\">\n <button class=\"mj-flow-toolbar-btn\"\n [class.mj-flow-toolbar-btn--active]=\"!PanMode\"\n (click)=\"PanModeToggled.emit(false)\"\n title=\"Select Mode (pointer)\">\n <i class=\"fa-solid fa-arrow-pointer\"></i>\n </button>\n <button class=\"mj-flow-toolbar-btn\"\n [class.mj-flow-toolbar-btn--active]=\"PanMode\"\n (click)=\"PanModeToggled.emit(true)\"\n title=\"Pan Mode (drag to move canvas)\">\n <i class=\"fa-solid fa-hand\"></i>\n </button>\n </div>\n \n @if (!ReadOnly) {\n <div class=\"mj-flow-toolbar-divider\"></div>\n }\n \n @if (!ReadOnly) {\n <div class=\"mj-flow-toolbar-group\">\n <button class=\"mj-flow-toolbar-btn\" (click)=\"AutoLayoutClicked.emit()\" title=\"Auto Arrange\">\n <i class=\"fa-solid fa-diagram-project\"></i>\n </button>\n </div>\n }\n \n <div class=\"mj-flow-toolbar-divider\"></div>\n \n <div class=\"mj-flow-toolbar-group\">\n <button class=\"mj-flow-toolbar-btn\"\n [class.mj-flow-toolbar-btn--active]=\"ShowGrid\"\n (click)=\"GridToggled.emit(!ShowGrid)\"\n title=\"Toggle Grid\">\n <i class=\"fa-solid fa-border-all\"></i>\n </button>\n <button class=\"mj-flow-toolbar-btn\"\n [class.mj-flow-toolbar-btn--active]=\"ShowMinimap\"\n (click)=\"MinimapToggled.emit(!ShowMinimap)\"\n title=\"Toggle Minimap\">\n <i class=\"fa-solid fa-map\"></i>\n </button>\n <button class=\"mj-flow-toolbar-btn\"\n [class.mj-flow-toolbar-btn--active]=\"ShowLegend\"\n (click)=\"LegendToggled.emit(!ShowLegend)\"\n title=\"Toggle Legend\">\n <i class=\"fa-solid fa-list-check\"></i>\n </button>\n </div>\n\n <div class=\"mj-flow-toolbar-divider\"></div>\n\n <div class=\"mj-flow-toolbar-group\">\n <button class=\"mj-flow-toolbar-btn\" (click)=\"MinimizeClicked.emit()\"\n title=\"Minimize toolbar\" aria-label=\"Minimize toolbar\">\n <i class=\"fa-solid fa-compress\"></i>\n </button>\n <button class=\"mj-flow-toolbar-btn\" (click)=\"HideClicked.emit()\"\n title=\"Hide toolbar\" aria-label=\"Hide toolbar\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n </div>\n `,\n styles: [`\n .mj-flow-toolbar {\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 4px 8px;\n background: #ffffff;\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n }\n\n .mj-flow-toolbar-group {\n display: flex;\n align-items: center;\n gap: 2px;\n }\n\n .mj-flow-toolbar-divider {\n width: 1px;\n height: 20px;\n background: #e2e8f0;\n margin: 0 4px;\n }\n\n .mj-flow-toolbar-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: #64748b;\n cursor: pointer;\n transition: all 0.15s ease;\n font-size: 13px;\n }\n\n .mj-flow-toolbar-btn:hover {\n background: #f1f5f9;\n color: #334155;\n }\n\n .mj-flow-toolbar-btn--active {\n background: #eff6ff;\n color: #3b82f6;\n }\n\n .mj-flow-toolbar-btn--active:hover {\n background: #dbeafe;\n color: #2563eb;\n }\n\n .mj-flow-toolbar-zoom {\n font-size: 11px;\n font-weight: 500;\n color: #64748b;\n min-width: 38px;\n text-align: center;\n user-select: none;\n }\n `],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FlowToolbarComponent {\n @Input() ZoomLevel = 100;\n @Input() ShowGrid = true;\n @Input() ShowMinimap = true;\n @Input() ShowLegend = true;\n @Input() ReadOnly = false;\n @Input() PanMode = false;\n\n @Output() ZoomInClicked = new EventEmitter<void>();\n @Output() ZoomOutClicked = new EventEmitter<void>();\n @Output() FitToScreenClicked = new EventEmitter<void>();\n @Output() AutoLayoutClicked = new EventEmitter<void>();\n @Output() GridToggled = new EventEmitter<boolean>();\n @Output() MinimapToggled = new EventEmitter<boolean>();\n @Output() LegendToggled = new EventEmitter<boolean>();\n @Output() PanModeToggled = new EventEmitter<boolean>();\n @Output() MinimizeClicked = new EventEmitter<void>();\n @Output() HideClicked = new EventEmitter<void>();\n}\n"]}
|
|
@@ -31,7 +31,14 @@ export interface FlowNodeBadge {
|
|
|
31
31
|
Color?: string;
|
|
32
32
|
}
|
|
33
33
|
/** Visual status of a node */
|
|
34
|
-
|
|
34
|
+
/**
|
|
35
|
+
* How a node presents its state.
|
|
36
|
+
*
|
|
37
|
+
* `skipped` is deliberately its own value rather than a shade of `disabled`. Disabled means "this
|
|
38
|
+
* cannot run"; skipped means "the graph chose another route" — nothing is wrong, and a reader who
|
|
39
|
+
* cannot tell them apart goes looking for a failure that never happened.
|
|
40
|
+
*/
|
|
41
|
+
export type FlowNodeStatus = 'default' | 'success' | 'error' | 'warning' | 'running' | 'disabled' | 'pending' | 'skipped';
|
|
35
42
|
/** A node in the flow graph */
|
|
36
43
|
export interface FlowNode {
|
|
37
44
|
ID: string;
|
|
@@ -72,6 +79,8 @@ export interface FlowConnection {
|
|
|
72
79
|
Priority?: number;
|
|
73
80
|
Style?: FlowConnectionStyle;
|
|
74
81
|
Color?: string;
|
|
82
|
+
/** Stroke width in px. Active/flowing edges use a thicker value so they read at a glance. */
|
|
83
|
+
StrokeWidth?: number;
|
|
75
84
|
Animated?: boolean;
|
|
76
85
|
Selected?: boolean;
|
|
77
86
|
/** Opaque data payload — consumers store domain-specific data here */
|
|
@@ -137,8 +146,39 @@ export interface FlowCanvasClickEvent {
|
|
|
137
146
|
}
|
|
138
147
|
/** Context menu target type */
|
|
139
148
|
export type FlowContextMenuTarget = 'node' | 'connection';
|
|
140
|
-
/**
|
|
141
|
-
export type FlowContextMenuAction = 'edit' | 'remove';
|
|
149
|
+
/** Built-in design-time actions. Hosts may emit any other `ID` string. */
|
|
150
|
+
export type FlowContextMenuAction = 'edit' | 'remove' | string;
|
|
151
|
+
/** One row in the canvas context menu. The host may replace the default Edit/Remove set. */
|
|
152
|
+
export type FlowContextMenuItem = {
|
|
153
|
+
ID: string;
|
|
154
|
+
Label: string;
|
|
155
|
+
Icon?: string;
|
|
156
|
+
Danger?: boolean;
|
|
157
|
+
Disabled?: boolean;
|
|
158
|
+
Shortcut?: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Fired BEFORE the canvas menu opens. Mutate `Items` to replace the default set; `Cancel = true`
|
|
162
|
+
* suppresses the menu. A `Before*` handler must not be async — the emitter reads `Cancel`/`Items`
|
|
163
|
+
* when `emit()` returns.
|
|
164
|
+
*/
|
|
165
|
+
export declare class FlowBeforeContextMenuEventArgs {
|
|
166
|
+
readonly Target: FlowContextMenuTarget;
|
|
167
|
+
readonly Node: FlowNode | null;
|
|
168
|
+
readonly Connection: FlowConnection | null;
|
|
169
|
+
readonly MouseEvent: MouseEvent;
|
|
170
|
+
Items: FlowContextMenuItem[];
|
|
171
|
+
Cancel: boolean;
|
|
172
|
+
constructor(Target: FlowContextMenuTarget, Node: FlowNode | null, Connection: FlowConnection | null, MouseEvent: MouseEvent, Items: FlowContextMenuItem[]);
|
|
173
|
+
}
|
|
174
|
+
/** Fired AFTER a menu item is chosen. Built-in `edit`/`remove` still run unless ReadOnly. */
|
|
175
|
+
export declare class FlowAfterContextMenuActionEventArgs {
|
|
176
|
+
readonly ActionID: string;
|
|
177
|
+
readonly Target: FlowContextMenuTarget;
|
|
178
|
+
readonly Node: FlowNode | null;
|
|
179
|
+
readonly Connection: FlowConnection | null;
|
|
180
|
+
constructor(ActionID: string, Target: FlowContextMenuTarget, Node: FlowNode | null, Connection: FlowConnection | null);
|
|
181
|
+
}
|
|
142
182
|
/** A complete snapshot of the flow state */
|
|
143
183
|
export interface FlowSnapshot {
|
|
144
184
|
Nodes: FlowNode[];
|
|
@@ -146,6 +186,15 @@ export interface FlowSnapshot {
|
|
|
146
186
|
}
|
|
147
187
|
/** Direction for auto-layout */
|
|
148
188
|
export type FlowLayoutDirection = 'horizontal' | 'vertical';
|
|
189
|
+
/**
|
|
190
|
+
* How the canvas toolbar presents itself.
|
|
191
|
+
*
|
|
192
|
+
* `shown` is the full bar. `minimized` is a chip that restores it. `hidden` leaves only a
|
|
193
|
+
* recover tab — otherwise a host that hid the bar would have no way back from the canvas.
|
|
194
|
+
*/
|
|
195
|
+
export type FlowToolbarVisibility = 'shown' | 'hidden' | 'minimized';
|
|
196
|
+
/** Horizontal placement of the canvas toolbar (and of its minimized / hidden recover control). */
|
|
197
|
+
export type FlowToolbarAlign = 'left' | 'center' | 'right';
|
|
149
198
|
/** Result of an auto-layout operation */
|
|
150
199
|
export interface FlowLayoutResult {
|
|
151
200
|
Positions: Map<string, FlowPosition>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-types.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/flow-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,6BAA6B;AAC7B,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,sBAAsB;AACtB,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,mCAAmC;AACnC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,6CAA6C;AAC7C,MAAM,WAAW,aAAa;IAC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AE;CAE1C;AAED,6FAA6F;AAC7F,qBAAa,mCAAmC;aAExB,QAAQ,EAAE,MAAM;aAChB,MAAM,EAAE,qBAAqB;aAC7B,IAAI,EAAE,QAAQ,GAAG,IAAI;aACrB,UAAU,EAAE,cAAc,GAAG,IAAI;gBAHjC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,QAAQ,GAAG,IAAI,EACrB,UAAU,EAAE,cAAc,GAAG,IAAI;CAExD;AAMD,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAMD,gCAAgC;AAChC,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;AAErE,kGAAkG;AAClG,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3D,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACtC"}
|
|
@@ -2,5 +2,37 @@
|
|
|
2
2
|
* Core interfaces for the generic flow editor.
|
|
3
3
|
* These types are entity-agnostic — consumers map their domain data to/from these.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Fired BEFORE the canvas menu opens. Mutate `Items` to replace the default set; `Cancel = true`
|
|
7
|
+
* suppresses the menu. A `Before*` handler must not be async — the emitter reads `Cancel`/`Items`
|
|
8
|
+
* when `emit()` returns.
|
|
9
|
+
*/
|
|
10
|
+
export class FlowBeforeContextMenuEventArgs {
|
|
11
|
+
Target;
|
|
12
|
+
Node;
|
|
13
|
+
Connection;
|
|
14
|
+
MouseEvent;
|
|
15
|
+
Items;
|
|
16
|
+
Cancel = false;
|
|
17
|
+
constructor(Target, Node, Connection, MouseEvent, Items) {
|
|
18
|
+
this.Target = Target;
|
|
19
|
+
this.Node = Node;
|
|
20
|
+
this.Connection = Connection;
|
|
21
|
+
this.MouseEvent = MouseEvent;
|
|
22
|
+
this.Items = Items;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Fired AFTER a menu item is chosen. Built-in `edit`/`remove` still run unless ReadOnly. */
|
|
26
|
+
export class FlowAfterContextMenuActionEventArgs {
|
|
27
|
+
ActionID;
|
|
28
|
+
Target;
|
|
29
|
+
Node;
|
|
30
|
+
Connection;
|
|
31
|
+
constructor(ActionID, Target, Node, Connection) {
|
|
32
|
+
this.ActionID = ActionID;
|
|
33
|
+
this.Target = Target;
|
|
34
|
+
this.Node = Node;
|
|
35
|
+
this.Connection = Connection;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
6
38
|
//# sourceMappingURL=flow-types.js.map
|
|
@@ -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
|
},
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"@foblex/mediator": "1.1.3",
|
|
39
39
|
"@foblex/platform": "1.0.4",
|
|
40
40
|
"@foblex/utils": "1.1.1",
|
|
41
|
-
"@memberjunction/core": "6.1.0-edge.
|
|
42
|
-
"@memberjunction/core-entities": "6.1.0-edge.
|
|
43
|
-
"@memberjunction/global": "6.1.0-edge.
|
|
44
|
-
"@memberjunction/ng-base-types": "6.1.0-edge.
|
|
45
|
-
"@memberjunction/ng-code-editor": "6.1.0-edge.
|
|
46
|
-
"@memberjunction/ng-shared-generic": "6.1.0-edge.
|
|
47
|
-
"@memberjunction/ng-ui-components": "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",
|
|
48
48
|
"rxjs": "^7.8.2",
|
|
49
49
|
"tslib": "^2.8.1"
|
|
50
50
|
},
|