rete-angular-plugin 2.0.2 → 2.1.0
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/12/bundles/rete-angular-plugin-ng12.umd.js +28 -0
- package/12/bundles/rete-angular-plugin-ng12.umd.js.map +1 -1
- package/12/core.d.ts +21 -1
- package/12/esm2015/core.js +17 -1
- package/12/esm2015/presets/classic/index.js +4 -1
- package/12/esm2015/presets/context-menu/index.js +4 -1
- package/12/esm2015/presets/index.js +5 -1
- package/12/esm2015/presets/minimap/index.js +4 -1
- package/12/esm2015/presets/reroute/index.js +4 -1
- package/12/fesm2015/rete-angular-plugin-ng12.js +33 -0
- package/12/fesm2015/rete-angular-plugin-ng12.js.map +1 -1
- package/12/presets/classic/index.d.ts +3 -0
- package/12/presets/context-menu/index.d.ts +3 -0
- package/12/presets/index.d.ts +4 -0
- package/12/presets/minimap/index.d.ts +3 -0
- package/12/presets/reroute/index.d.ts +3 -0
- package/13/core.d.ts +21 -1
- package/13/esm2020/core.mjs +17 -1
- package/13/esm2020/presets/classic/index.mjs +4 -1
- package/13/esm2020/presets/context-menu/index.mjs +4 -1
- package/13/esm2020/presets/index.mjs +5 -1
- package/13/esm2020/presets/minimap/index.mjs +4 -1
- package/13/esm2020/presets/reroute/index.mjs +4 -1
- package/13/fesm2015/rete-angular-plugin-ng13.mjs +33 -0
- package/13/fesm2015/rete-angular-plugin-ng13.mjs.map +1 -1
- package/13/fesm2020/rete-angular-plugin-ng13.mjs +33 -0
- package/13/fesm2020/rete-angular-plugin-ng13.mjs.map +1 -1
- package/13/presets/classic/index.d.ts +3 -0
- package/13/presets/context-menu/index.d.ts +3 -0
- package/13/presets/index.d.ts +4 -0
- package/13/presets/minimap/index.d.ts +3 -0
- package/13/presets/reroute/index.d.ts +3 -0
- package/14/core.d.ts +21 -1
- package/14/esm2020/core.mjs +17 -1
- package/14/esm2020/presets/classic/index.mjs +4 -1
- package/14/esm2020/presets/context-menu/index.mjs +4 -1
- package/14/esm2020/presets/index.mjs +5 -1
- package/14/esm2020/presets/minimap/index.mjs +4 -1
- package/14/esm2020/presets/reroute/index.mjs +4 -1
- package/14/fesm2015/rete-angular-plugin-ng14.mjs +33 -0
- package/14/fesm2015/rete-angular-plugin-ng14.mjs.map +1 -1
- package/14/fesm2020/rete-angular-plugin-ng14.mjs +33 -0
- package/14/fesm2020/rete-angular-plugin-ng14.mjs.map +1 -1
- package/14/presets/classic/index.d.ts +3 -0
- package/14/presets/context-menu/index.d.ts +3 -0
- package/14/presets/index.d.ts +4 -0
- package/14/presets/minimap/index.d.ts +3 -0
- package/14/presets/reroute/index.d.ts +3 -0
- package/15/core.d.ts +21 -1
- package/15/esm2020/core.mjs +17 -1
- package/15/esm2020/presets/classic/index.mjs +4 -1
- package/15/esm2020/presets/context-menu/index.mjs +4 -1
- package/15/esm2020/presets/index.mjs +5 -1
- package/15/esm2020/presets/minimap/index.mjs +4 -1
- package/15/esm2020/presets/reroute/index.mjs +4 -1
- package/15/fesm2015/rete-angular-plugin-ng15.mjs +33 -0
- package/15/fesm2015/rete-angular-plugin-ng15.mjs.map +1 -1
- package/15/fesm2020/rete-angular-plugin-ng15.mjs +33 -0
- package/15/fesm2020/rete-angular-plugin-ng15.mjs.map +1 -1
- package/15/presets/classic/index.d.ts +3 -0
- package/15/presets/context-menu/index.d.ts +3 -0
- package/15/presets/index.d.ts +4 -0
- package/15/presets/minimap/index.d.ts +3 -0
- package/15/presets/reroute/index.d.ts +3 -0
- package/16/core.d.ts +21 -1
- package/16/esm2022/core.mjs +17 -1
- package/16/esm2022/presets/classic/index.mjs +4 -1
- package/16/esm2022/presets/context-menu/index.mjs +4 -1
- package/16/esm2022/presets/index.mjs +5 -1
- package/16/esm2022/presets/minimap/index.mjs +4 -1
- package/16/esm2022/presets/reroute/index.mjs +4 -1
- package/16/fesm2022/rete-angular-plugin-ng16.mjs +33 -0
- package/16/fesm2022/rete-angular-plugin-ng16.mjs.map +1 -1
- package/16/presets/classic/index.d.ts +3 -0
- package/16/presets/context-menu/index.d.ts +3 -0
- package/16/presets/index.d.ts +4 -0
- package/16/presets/minimap/index.d.ts +3 -0
- package/16/presets/reroute/index.d.ts +3 -0
- package/17/core.d.ts +68 -0
- package/17/esm2022/core.mjs +127 -0
- package/17/esm2022/index.mjs +12 -0
- package/17/esm2022/module.mjs +50 -0
- package/17/esm2022/presets/classic/components/connection/connection-wrapper.component.mjs +91 -0
- package/17/esm2022/presets/classic/components/connection/connection.component.mjs +33 -0
- package/17/esm2022/presets/classic/components/control/control.component.mjs +55 -0
- package/17/esm2022/presets/classic/components/index.mjs +6 -0
- package/17/esm2022/presets/classic/components/node/node.component.mjs +122 -0
- package/17/esm2022/presets/classic/components/socket/socket.component.mjs +35 -0
- package/17/esm2022/presets/classic/index.mjs +114 -0
- package/17/esm2022/presets/classic/types.mjs +2 -0
- package/17/esm2022/presets/context-menu/components/index.mjs +4 -0
- package/17/esm2022/presets/context-menu/components/item/item.component.mjs +115 -0
- package/17/esm2022/presets/context-menu/components/menu/menu.component.mjs +111 -0
- package/17/esm2022/presets/context-menu/components/search/search.component.mjs +24 -0
- package/17/esm2022/presets/context-menu/debounce.mjs +17 -0
- package/17/esm2022/presets/context-menu/index.mjs +41 -0
- package/17/esm2022/presets/context-menu/module.mjs +35 -0
- package/17/esm2022/presets/context-menu/types.mjs +2 -0
- package/17/esm2022/presets/index.mjs +9 -0
- package/17/esm2022/presets/minimap/components/index.mjs +4 -0
- package/17/esm2022/presets/minimap/components/mini-node/mini-node.component.mjs +55 -0
- package/17/esm2022/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +81 -0
- package/17/esm2022/presets/minimap/components/minimap/minimap.component.mjs +110 -0
- package/17/esm2022/presets/minimap/index.mjs +45 -0
- package/17/esm2022/presets/minimap/module.mjs +35 -0
- package/17/esm2022/presets/minimap/types.mjs +2 -0
- package/17/esm2022/presets/reroute/components/index.mjs +3 -0
- package/17/esm2022/presets/reroute/components/pin/pin.component.mjs +86 -0
- package/17/esm2022/presets/reroute/components/pins/pins.component.mjs +58 -0
- package/17/esm2022/presets/reroute/index.mjs +43 -0
- package/17/esm2022/presets/reroute/module.mjs +30 -0
- package/17/esm2022/presets/reroute/types.mjs +2 -0
- package/17/esm2022/presets/types.mjs +2 -0
- package/17/esm2022/ref.mjs +30 -0
- package/17/esm2022/rete-angular-plugin-ng17.mjs +5 -0
- package/17/esm2022/shared/drag.mjs +23 -0
- package/17/esm2022/types.mjs +2 -0
- package/17/fesm2022/rete-angular-plugin-ng17.mjs +1527 -0
- package/17/fesm2022/rete-angular-plugin-ng17.mjs.map +1 -0
- package/17/index.d.ts +13 -0
- package/17/module.d.ts +13 -0
- package/17/package.json +24 -0
- package/17/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
- package/17/presets/classic/components/connection/connection.component.d.ts +11 -0
- package/17/presets/classic/components/control/control.component.d.ts +14 -0
- package/17/presets/classic/components/index.d.ts +5 -0
- package/17/presets/classic/components/node/node.component.d.ts +19 -0
- package/17/presets/classic/components/socket/socket.component.d.ts +12 -0
- package/17/presets/classic/index.d.ts +21 -0
- package/17/presets/classic/types.d.ts +49 -0
- package/17/presets/context-menu/components/index.d.ts +3 -0
- package/17/presets/context-menu/components/item/item.component.d.ts +26 -0
- package/17/presets/context-menu/components/menu/menu.component.d.ts +27 -0
- package/17/presets/context-menu/components/search/search.component.d.ts +8 -0
- package/17/presets/context-menu/debounce.d.ts +5 -0
- package/17/presets/context-menu/index.d.ts +9 -0
- package/17/presets/context-menu/module.d.ts +10 -0
- package/17/presets/context-menu/types.d.ts +12 -0
- package/17/presets/index.d.ts +8 -0
- package/17/presets/minimap/components/index.d.ts +3 -0
- package/17/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
- package/17/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
- package/17/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
- package/17/presets/minimap/index.d.ts +9 -0
- package/17/presets/minimap/module.d.ts +10 -0
- package/17/presets/minimap/types.d.ts +22 -0
- package/17/presets/reroute/components/index.d.ts +2 -0
- package/17/presets/reroute/components/pin/pin.component.d.ts +30 -0
- package/17/presets/reroute/components/pins/pins.component.d.ts +17 -0
- package/17/presets/reroute/index.d.ts +13 -0
- package/17/presets/reroute/module.d.ts +9 -0
- package/17/presets/reroute/types.d.ts +18 -0
- package/17/presets/types.d.ts +15 -0
- package/17/ref.d.ts +12 -0
- package/17/shared/drag.d.ts +10 -0
- package/17/types.d.ts +29 -0
- package/CHANGELOG.md +7 -0
- package/bundles/rete-angular-plugin.umd.js +28 -0
- package/bundles/rete-angular-plugin.umd.js.map +1 -1
- package/core.d.ts +21 -1
- package/esm2015/core.js +17 -1
- package/esm2015/presets/classic/index.js +4 -1
- package/esm2015/presets/context-menu/index.js +4 -1
- package/esm2015/presets/index.js +1 -1
- package/esm2015/presets/minimap/index.js +4 -1
- package/esm2015/presets/reroute/index.js +4 -1
- package/fesm2015/rete-angular-plugin.js +28 -0
- package/fesm2015/rete-angular-plugin.js.map +1 -1
- package/package.json +5 -5
- package/presets/classic/index.d.ts +3 -0
- package/presets/context-menu/index.d.ts +3 -0
- package/presets/index.d.ts +4 -0
- package/presets/minimap/index.d.ts +3 -0
- package/presets/reroute/index.d.ts +3 -0
- package/rete-angular-plugin.metadata.json +1 -1
|
@@ -0,0 +1,1527 @@
|
|
|
1
|
+
import { getUID, ClassicPreset, Scope } from 'rete';
|
|
2
|
+
import { getDOMSocketPosition, loopConnectionPath, classicConnectionPath } from 'rete-render-utils';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Directive, Input, Component, HostBinding, HostListener, EventEmitter, Output, NgModule } from '@angular/core';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { BaseAreaPlugin } from 'rete-area-plugin';
|
|
8
|
+
import { createCustomElement } from '@angular/elements';
|
|
9
|
+
|
|
10
|
+
class RefDirective {
|
|
11
|
+
el;
|
|
12
|
+
data;
|
|
13
|
+
emit;
|
|
14
|
+
constructor(el) {
|
|
15
|
+
this.el = el;
|
|
16
|
+
}
|
|
17
|
+
ngOnChanges() {
|
|
18
|
+
this.emit({ type: 'render', data: { ...this.data, element: this.el.nativeElement } });
|
|
19
|
+
}
|
|
20
|
+
ngOnDestroy() {
|
|
21
|
+
this.emit({ type: 'unmount', data: { element: this.el.nativeElement } });
|
|
22
|
+
}
|
|
23
|
+
static ɵfac = function RefDirective_Factory(t) { return new (t || RefDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
24
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: RefDirective, selectors: [["", "refComponent", ""]], inputs: { data: "data", emit: "emit" }, features: [i0.ɵɵNgOnChangesFeature] });
|
|
25
|
+
}
|
|
26
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RefDirective, [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
|
+
selector: '[refComponent]'
|
|
30
|
+
}]
|
|
31
|
+
}], () => [{ type: i0.ElementRef }], { data: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], emit: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}] }); })();
|
|
36
|
+
|
|
37
|
+
const _c0$1 = (a2, a3, a4, a5) => ({ type: "socket", side: "output", key: a2, nodeId: a3, payload: a4, seed: a5 });
|
|
38
|
+
function NodeComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
+
i0.ɵɵelementStart(0, "div", 4)(1, "div", 5);
|
|
40
|
+
i0.ɵɵtext(2);
|
|
41
|
+
i0.ɵɵelementEnd();
|
|
42
|
+
i0.ɵɵelement(3, "div", 6);
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
const output_r3 = ctx.$implicit;
|
|
46
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
47
|
+
i0.ɵɵattribute("data-testid", "output-" + output_r3.key);
|
|
48
|
+
i0.ɵɵadvance(2);
|
|
49
|
+
i0.ɵɵtextInterpolate(output_r3.value == null ? null : output_r3.value.label);
|
|
50
|
+
i0.ɵɵadvance(1);
|
|
51
|
+
i0.ɵɵproperty("data", i0.ɵɵpureFunction4(4, _c0$1, output_r3.key, ctx_r0.data.id, output_r3.value == null ? null : output_r3.value.socket, ctx_r0.seed))("emit", ctx_r0.emit);
|
|
52
|
+
} }
|
|
53
|
+
const _c1 = a1 => ({ type: "control", payload: a1 });
|
|
54
|
+
function NodeComponent_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
+
i0.ɵɵelement(0, "div", 7);
|
|
56
|
+
} if (rf & 2) {
|
|
57
|
+
const control_r4 = ctx.$implicit;
|
|
58
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
59
|
+
i0.ɵɵproperty("data", i0.ɵɵpureFunction1(3, _c1, control_r4.value))("emit", ctx_r1.emit);
|
|
60
|
+
i0.ɵɵattribute("data-testid", "control-" + control_r4.key);
|
|
61
|
+
} }
|
|
62
|
+
function NodeComponent_div_6_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
63
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
64
|
+
i0.ɵɵtext(1);
|
|
65
|
+
i0.ɵɵelementEnd();
|
|
66
|
+
} if (rf & 2) {
|
|
67
|
+
const input_r5 = i0.ɵɵnextContext().$implicit;
|
|
68
|
+
i0.ɵɵadvance(1);
|
|
69
|
+
i0.ɵɵtextInterpolate(input_r5.value == null ? null : input_r5.value.label);
|
|
70
|
+
} }
|
|
71
|
+
const _c2 = (a2, a3, a4, a5) => ({ type: "socket", side: "input", key: a2, nodeId: a3, payload: a4, seed: a5 });
|
|
72
|
+
function NodeComponent_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
+
i0.ɵɵelementStart(0, "div", 8);
|
|
74
|
+
i0.ɵɵelement(1, "div", 9);
|
|
75
|
+
i0.ɵɵtemplate(2, NodeComponent_div_6_div_2_Template, 2, 1, "div", 10);
|
|
76
|
+
i0.ɵɵelement(3, "div", 11);
|
|
77
|
+
i0.ɵɵelementEnd();
|
|
78
|
+
} if (rf & 2) {
|
|
79
|
+
const input_r5 = ctx.$implicit;
|
|
80
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
81
|
+
i0.ɵɵattribute("data-testid", "input-" + input_r5.key);
|
|
82
|
+
i0.ɵɵadvance(1);
|
|
83
|
+
i0.ɵɵproperty("data", i0.ɵɵpureFunction4(8, _c2, input_r5.key, ctx_r2.data.id, input_r5.value == null ? null : input_r5.value.socket, ctx_r2.seed))("emit", ctx_r2.emit);
|
|
84
|
+
i0.ɵɵadvance(1);
|
|
85
|
+
i0.ɵɵproperty("ngIf", !(input_r5.value == null ? null : input_r5.value.control) || !(input_r5.value == null ? null : input_r5.value.showControl));
|
|
86
|
+
i0.ɵɵadvance(1);
|
|
87
|
+
i0.ɵɵstyleProp("display", (input_r5.value == null ? null : input_r5.value.control) && (input_r5.value == null ? null : input_r5.value.showControl) ? "" : "none");
|
|
88
|
+
i0.ɵɵproperty("data", i0.ɵɵpureFunction1(13, _c1, input_r5.value == null ? null : input_r5.value.control))("emit", ctx_r2.emit);
|
|
89
|
+
} }
|
|
90
|
+
class NodeComponent {
|
|
91
|
+
cdr;
|
|
92
|
+
data;
|
|
93
|
+
emit;
|
|
94
|
+
rendered;
|
|
95
|
+
seed = 0;
|
|
96
|
+
get selected() {
|
|
97
|
+
return this.data.selected;
|
|
98
|
+
}
|
|
99
|
+
constructor(cdr) {
|
|
100
|
+
this.cdr = cdr;
|
|
101
|
+
this.cdr.detach();
|
|
102
|
+
}
|
|
103
|
+
ngOnChanges() {
|
|
104
|
+
this.cdr.detectChanges();
|
|
105
|
+
requestAnimationFrame(() => this.rendered());
|
|
106
|
+
this.seed++; // force render sockets
|
|
107
|
+
}
|
|
108
|
+
sortByIndex(a, b) {
|
|
109
|
+
const ai = a.value?.index || 0;
|
|
110
|
+
const bi = b.value?.index || 0;
|
|
111
|
+
return ai - bi;
|
|
112
|
+
}
|
|
113
|
+
static ɵfac = function NodeComponent_Factory(t) { return new (t || NodeComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
114
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NodeComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "node"], hostVars: 2, hostBindings: function NodeComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
115
|
+
i0.ɵɵclassProp("selected", ctx.selected);
|
|
116
|
+
} }, inputs: { data: "data", emit: "emit", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 8, vars: 13, consts: [["data-testid", "title", 1, "title"], ["class", "output", 4, "ngFor", "ngForOf"], ["class", "control", "refComponent", "", 3, "data", "emit", 4, "ngFor", "ngForOf"], ["class", "input", 4, "ngFor", "ngForOf"], [1, "output"], ["data-testid", "output-title", 1, "output-title"], ["refComponent", "", "data-testid", "output-socket", 1, "output-socket", 3, "data", "emit"], ["refComponent", "", 1, "control", 3, "data", "emit"], [1, "input"], ["refComponent", "", "data-testid", "input-socket", 1, "input-socket", 3, "data", "emit"], ["class", "input-title", "data-testid", "input-title", 4, "ngIf"], ["refComponent", "", "data-testid", "input-control", 1, "input-control", 3, "data", "emit"], ["data-testid", "input-title", 1, "input-title"]], template: function NodeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
117
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
118
|
+
i0.ɵɵtext(1);
|
|
119
|
+
i0.ɵɵelementEnd();
|
|
120
|
+
i0.ɵɵtemplate(2, NodeComponent_div_2_Template, 4, 9, "div", 1);
|
|
121
|
+
i0.ɵɵpipe(3, "keyvalue");
|
|
122
|
+
i0.ɵɵtemplate(4, NodeComponent_div_4_Template, 1, 5, "div", 2);
|
|
123
|
+
i0.ɵɵpipe(5, "keyvalue");
|
|
124
|
+
i0.ɵɵtemplate(6, NodeComponent_div_6_Template, 4, 15, "div", 3);
|
|
125
|
+
i0.ɵɵpipe(7, "keyvalue");
|
|
126
|
+
} if (rf & 2) {
|
|
127
|
+
i0.ɵɵadvance(1);
|
|
128
|
+
i0.ɵɵtextInterpolate(ctx.data.label);
|
|
129
|
+
i0.ɵɵadvance(1);
|
|
130
|
+
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(3, 4, ctx.data.outputs, ctx.sortByIndex));
|
|
131
|
+
i0.ɵɵadvance(2);
|
|
132
|
+
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(5, 7, ctx.data.controls, ctx.sortByIndex));
|
|
133
|
+
i0.ɵɵadvance(2);
|
|
134
|
+
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(7, 10, ctx.data.inputs, ctx.sortByIndex));
|
|
135
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, RefDirective, i1.KeyValuePipe], styles: ["[_nghost-%COMP%]{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;min-width:180px;height:auto;padding-bottom:6px;position:relative;-webkit-user-select:none;user-select:none;line-height:initial;font-family:Arial}[_nghost-%COMP%]:hover{background:rgba(130,153,255,.8)}.selected[_nghost-%COMP%]{background:#ffd92c;border-color:#e3c000}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}[_nghost-%COMP%] .output[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%] .input[_ngcontent-%COMP%]{text-align:left}[_nghost-%COMP%] .input-title[_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[_ngcontent-%COMP%]{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}[_nghost-%COMP%] .input-title[hidden][_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[hidden][_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .output-socket[_ngcontent-%COMP%]{text-align:right;margin-right:-18px;display:inline-block}[_nghost-%COMP%] .input-socket[_ngcontent-%COMP%]{text-align:left;margin-left:-18px;display:inline-block}[_nghost-%COMP%] .input-control[_ngcontent-%COMP%]{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}[_nghost-%COMP%] .control[_ngcontent-%COMP%]{padding:6px 18px}"] });
|
|
136
|
+
}
|
|
137
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NodeComponent, [{
|
|
138
|
+
type: Component,
|
|
139
|
+
args: [{ host: {
|
|
140
|
+
'data-testid': 'node'
|
|
141
|
+
}, template: "<div class=\"title\" data-testid=\"title\">{{data.label}}</div>\n<div class=\"output\" *ngFor=\"let output of data.outputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'output-'+output.key\">\n <div class=\"output-title\" data-testid=\"output-title\">{{output.value?.label}}</div>\n <div\n class=\"output-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'output', key: output.key, nodeId: data.id, payload: output.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"output-socket\"\n ></div>\n</div>\n<div\n class=\"control\"\n *ngFor=\"let control of data.controls | keyvalue: sortByIndex\"\n refComponent\n [data]=\"{type: 'control', payload: control.value }\"\n [emit]=\"emit\"\n [attr.data-testid]=\"'control-'+control.key\"\n></div>\n<div class=\"input\" *ngFor=\"let input of data.inputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'input-'+input.key\">\n <div\n class=\"input-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'input', key: input.key, nodeId: data.id, payload: input.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"input-socket\"\n ></div>\n <div class=\"input-title\" data-testid=\"input-title\" *ngIf=\"!input.value?.control || !input.value?.showControl\">{{input.value?.label}}</div>\n <div\n class=\"input-control\"\n [style.display]=\"input.value?.control && input.value?.showControl ? '' : 'none'\"\n refComponent\n [data]=\"{type: 'control', payload: input.value?.control }\"\n [emit]=\"emit\"\n data-testid=\"input-control\"\n ></div>\n</div>\n", styles: [":host{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;min-width:180px;height:auto;padding-bottom:6px;position:relative;-webkit-user-select:none;user-select:none;line-height:initial;font-family:Arial}:host:hover{background:rgba(130,153,255,.8)}:host.selected{background:#ffd92c;border-color:#e3c000}:host .title{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}:host .output{text-align:right}:host .input{text-align:left}:host .input-title,:host .output-title{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}:host .input-title[hidden],:host .output-title[hidden]{display:none}:host .output-socket{text-align:right;margin-right:-18px;display:inline-block}:host .input-socket{text-align:left;margin-left:-18px;display:inline-block}:host .input-control{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}:host .control{padding:6px 18px}\n"] }]
|
|
142
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { data: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], emit: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], rendered: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}], selected: [{
|
|
149
|
+
type: HostBinding,
|
|
150
|
+
args: ['class.selected']
|
|
151
|
+
}] }); })();
|
|
152
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NodeComponent, { className: "NodeComponent", filePath: "presets/classic/components/node/node.component.ts", lineNumber: 14 }); })();
|
|
153
|
+
|
|
154
|
+
class SocketComponent {
|
|
155
|
+
cdr;
|
|
156
|
+
data;
|
|
157
|
+
rendered;
|
|
158
|
+
get title() {
|
|
159
|
+
return this.data.name;
|
|
160
|
+
}
|
|
161
|
+
constructor(cdr) {
|
|
162
|
+
this.cdr = cdr;
|
|
163
|
+
this.cdr.detach();
|
|
164
|
+
}
|
|
165
|
+
ngOnChanges() {
|
|
166
|
+
this.cdr.detectChanges();
|
|
167
|
+
requestAnimationFrame(() => this.rendered());
|
|
168
|
+
}
|
|
169
|
+
static ɵfac = function SocketComponent_Factory(t) { return new (t || SocketComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
170
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SocketComponent, selectors: [["ng-component"]], hostVars: 1, hostBindings: function SocketComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
171
|
+
i0.ɵɵhostProperty("title", ctx.title);
|
|
172
|
+
} }, inputs: { data: "data", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function SocketComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:inline-block;cursor:pointer;border:1px solid white;border-radius:12px;width:24px;height:24px;margin:6px;vertical-align:middle;background:#96b38a;z-index:2;box-sizing:border-box}[_nghost-%COMP%]:hover{border-width:4px}.multiple[_nghost-%COMP%]{border-color:#ff0}.output[_nghost-%COMP%]{margin-right:-12px}.input[_nghost-%COMP%]{margin-left:-12px}"] });
|
|
173
|
+
}
|
|
174
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SocketComponent, [{
|
|
175
|
+
type: Component,
|
|
176
|
+
args: [{ template: ``, styles: [":host{display:inline-block;cursor:pointer;border:1px solid white;border-radius:12px;width:24px;height:24px;margin:6px;vertical-align:middle;background:#96b38a;z-index:2;box-sizing:border-box}:host:hover{border-width:4px}:host.multiple{border-color:#ff0}:host.output{margin-right:-12px}:host.input{margin-left:-12px}\n"] }]
|
|
177
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { data: [{
|
|
178
|
+
type: Input
|
|
179
|
+
}], rendered: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}], title: [{
|
|
182
|
+
type: HostBinding,
|
|
183
|
+
args: ['title']
|
|
184
|
+
}] }); })();
|
|
185
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SocketComponent, { className: "SocketComponent", filePath: "presets/classic/components/socket/socket.component.ts", lineNumber: 7 }); })();
|
|
186
|
+
|
|
187
|
+
class ControlComponent {
|
|
188
|
+
cdr;
|
|
189
|
+
data;
|
|
190
|
+
rendered;
|
|
191
|
+
pointerdown(event) {
|
|
192
|
+
event.stopPropagation();
|
|
193
|
+
}
|
|
194
|
+
constructor(cdr) {
|
|
195
|
+
this.cdr = cdr;
|
|
196
|
+
this.cdr.detach();
|
|
197
|
+
}
|
|
198
|
+
ngOnChanges(changes) {
|
|
199
|
+
const seed = changes['seed'];
|
|
200
|
+
const data = changes['data'];
|
|
201
|
+
if ((seed && seed.currentValue !== seed.previousValue)
|
|
202
|
+
|| (data && data.currentValue !== data.previousValue)) {
|
|
203
|
+
this.cdr.detectChanges();
|
|
204
|
+
}
|
|
205
|
+
requestAnimationFrame(() => this.rendered());
|
|
206
|
+
}
|
|
207
|
+
onChange(e) {
|
|
208
|
+
const target = e.target;
|
|
209
|
+
const value = (this.data.type === 'number'
|
|
210
|
+
? +target.value
|
|
211
|
+
: target.value);
|
|
212
|
+
this.data.setValue(value);
|
|
213
|
+
this.cdr.detectChanges();
|
|
214
|
+
}
|
|
215
|
+
static ɵfac = function ControlComponent_Factory(t) { return new (t || ControlComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
216
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ControlComponent, selectors: [["ng-component"]], hostBindings: function ControlComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
217
|
+
i0.ɵɵlistener("pointerdown", function ControlComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); });
|
|
218
|
+
} }, inputs: { data: "data", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 3, consts: [[3, "value", "readonly", "type", "input"]], template: function ControlComponent_Template(rf, ctx) { if (rf & 1) {
|
|
219
|
+
i0.ɵɵelementStart(0, "input", 0);
|
|
220
|
+
i0.ɵɵlistener("input", function ControlComponent_Template_input_input_0_listener($event) { return ctx.onChange($event); });
|
|
221
|
+
i0.ɵɵelementEnd();
|
|
222
|
+
} if (rf & 2) {
|
|
223
|
+
i0.ɵɵproperty("value", ctx.data.value)("readonly", ctx.data.readonly)("type", ctx.data.type);
|
|
224
|
+
} }, styles: ["input[_ngcontent-%COMP%]{width:130px;border-radius:30px;background-color:#fff;padding:2px 6px;border:1px solid #999;font-size:110%}"] });
|
|
225
|
+
}
|
|
226
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ControlComponent, [{
|
|
227
|
+
type: Component,
|
|
228
|
+
args: [{ template: "<input\n [value]=\"data.value\"\n [readonly]=\"data.readonly\"\n [type]=\"data.type\"\n (input)=\"onChange($event)\"\n/>\n", styles: ["input{width:130px;border-radius:30px;background-color:#fff;padding:2px 6px;border:1px solid #999;font-size:110%}\n"] }]
|
|
229
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { data: [{
|
|
230
|
+
type: Input
|
|
231
|
+
}], rendered: [{
|
|
232
|
+
type: Input
|
|
233
|
+
}], pointerdown: [{
|
|
234
|
+
type: HostListener,
|
|
235
|
+
args: ['pointerdown', ['$event']]
|
|
236
|
+
}] }); })();
|
|
237
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ControlComponent, { className: "ControlComponent", filePath: "presets/classic/components/control/control.component.ts", lineNumber: 8 }); })();
|
|
238
|
+
|
|
239
|
+
class ConnectionComponent {
|
|
240
|
+
data;
|
|
241
|
+
start;
|
|
242
|
+
end;
|
|
243
|
+
path;
|
|
244
|
+
static ɵfac = function ConnectionComponent_Factory(t) { return new (t || ConnectionComponent)(); };
|
|
245
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConnectionComponent, selectors: [["connection"]], inputs: { data: "data", start: "start", end: "end", path: "path" }, decls: 2, vars: 1, consts: [["data-testid", "connection"]], template: function ConnectionComponent_Template(rf, ctx) { if (rf & 1) {
|
|
246
|
+
i0.ɵɵnamespaceSVG();
|
|
247
|
+
i0.ɵɵelementStart(0, "svg", 0);
|
|
248
|
+
i0.ɵɵelement(1, "path");
|
|
249
|
+
i0.ɵɵelementEnd();
|
|
250
|
+
} if (rf & 2) {
|
|
251
|
+
i0.ɵɵadvance(1);
|
|
252
|
+
i0.ɵɵattribute("d", ctx.path);
|
|
253
|
+
} }, styles: ["svg[_ngcontent-%COMP%]{overflow:visible!important;position:absolute;pointer-events:none;width:9999px;height:9999px}svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:none;stroke-width:5px;stroke:#4682b4;pointer-events:auto}"] });
|
|
254
|
+
}
|
|
255
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConnectionComponent, [{
|
|
256
|
+
type: Component,
|
|
257
|
+
args: [{ selector: 'connection', template: "<svg data-testid=\"connection\">\n <path [attr.d]=\"path\" />\n</svg>\n", styles: ["svg{overflow:visible!important;position:absolute;pointer-events:none;width:9999px;height:9999px}svg path{fill:none;stroke-width:5px;stroke:#4682b4;pointer-events:auto}\n"] }]
|
|
258
|
+
}], null, { data: [{
|
|
259
|
+
type: Input
|
|
260
|
+
}], start: [{
|
|
261
|
+
type: Input
|
|
262
|
+
}], end: [{
|
|
263
|
+
type: Input
|
|
264
|
+
}], path: [{
|
|
265
|
+
type: Input
|
|
266
|
+
}] }); })();
|
|
267
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConnectionComponent, { className: "ConnectionComponent", filePath: "presets/classic/components/connection/connection.component.ts", lineNumber: 12 }); })();
|
|
268
|
+
|
|
269
|
+
class ConnectionWrapperComponent {
|
|
270
|
+
cdr;
|
|
271
|
+
viewContainerRef;
|
|
272
|
+
componentFactoryResolver;
|
|
273
|
+
data;
|
|
274
|
+
start;
|
|
275
|
+
end;
|
|
276
|
+
path;
|
|
277
|
+
rendered;
|
|
278
|
+
connectionComponent;
|
|
279
|
+
ref;
|
|
280
|
+
startOb = null;
|
|
281
|
+
get _start() {
|
|
282
|
+
return 'x' in this.start ? this.start : this.startOb;
|
|
283
|
+
}
|
|
284
|
+
endOb = null;
|
|
285
|
+
get _end() {
|
|
286
|
+
return 'x' in this.end ? this.end : this.endOb;
|
|
287
|
+
}
|
|
288
|
+
_path;
|
|
289
|
+
constructor(cdr, viewContainerRef, componentFactoryResolver) {
|
|
290
|
+
this.cdr = cdr;
|
|
291
|
+
this.viewContainerRef = viewContainerRef;
|
|
292
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
293
|
+
this.cdr.detach();
|
|
294
|
+
}
|
|
295
|
+
async ngOnChanges() {
|
|
296
|
+
await this.updatePath();
|
|
297
|
+
requestAnimationFrame(() => this.rendered());
|
|
298
|
+
this.cdr.detectChanges();
|
|
299
|
+
this.update();
|
|
300
|
+
}
|
|
301
|
+
async updatePath() {
|
|
302
|
+
if (this._start && this._end) {
|
|
303
|
+
this._path = await this.path(this._start, this._end);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
ngOnInit() {
|
|
307
|
+
if (typeof this.start === 'function') {
|
|
308
|
+
this.start(async (value) => {
|
|
309
|
+
this.startOb = value;
|
|
310
|
+
await this.updatePath();
|
|
311
|
+
this.cdr.detectChanges();
|
|
312
|
+
this.update();
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
if (typeof this.end === 'function') {
|
|
316
|
+
this.end(async (value) => {
|
|
317
|
+
this.endOb = value;
|
|
318
|
+
await this.updatePath();
|
|
319
|
+
this.cdr.detectChanges();
|
|
320
|
+
this.update();
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.connectionComponent);
|
|
324
|
+
this.viewContainerRef.clear();
|
|
325
|
+
this.ref = this.viewContainerRef.createComponent(componentFactory);
|
|
326
|
+
this.update();
|
|
327
|
+
}
|
|
328
|
+
update() {
|
|
329
|
+
this.ref.instance.data = this.data;
|
|
330
|
+
this.ref.instance.start = this._start;
|
|
331
|
+
this.ref.instance.end = this._end;
|
|
332
|
+
this.ref.instance.path = this._path;
|
|
333
|
+
}
|
|
334
|
+
static ɵfac = function ConnectionWrapperComponent_Factory(t) { return new (t || ConnectionWrapperComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
|
|
335
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConnectionWrapperComponent, selectors: [["ng-component"]], inputs: { data: "data", start: "start", end: "end", path: "path", rendered: "rendered", connectionComponent: "connectionComponent" }, features: [i0.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function ConnectionWrapperComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
336
|
+
}
|
|
337
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConnectionWrapperComponent, [{
|
|
338
|
+
type: Component,
|
|
339
|
+
args: [{
|
|
340
|
+
template: ''
|
|
341
|
+
}]
|
|
342
|
+
}], () => [{ type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }], { data: [{
|
|
343
|
+
type: Input
|
|
344
|
+
}], start: [{
|
|
345
|
+
type: Input
|
|
346
|
+
}], end: [{
|
|
347
|
+
type: Input
|
|
348
|
+
}], path: [{
|
|
349
|
+
type: Input
|
|
350
|
+
}], rendered: [{
|
|
351
|
+
type: Input
|
|
352
|
+
}], connectionComponent: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}] }); })();
|
|
355
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConnectionWrapperComponent, { className: "ConnectionWrapperComponent", filePath: "presets/classic/components/connection/connection-wrapper.component.ts", lineNumber: 10 }); })();
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Classic preset for rendering nodes, connections, controls and sockets.
|
|
359
|
+
*/
|
|
360
|
+
function setup$3(props) {
|
|
361
|
+
const positionWatcher = typeof props?.socketPositionWatcher === 'undefined'
|
|
362
|
+
? getDOMSocketPosition() // fix Type instantiation is excessively deep and possibly infinite.
|
|
363
|
+
: props?.socketPositionWatcher;
|
|
364
|
+
const { node, connection, socket, control } = props?.customize || {};
|
|
365
|
+
return {
|
|
366
|
+
attach(plugin) {
|
|
367
|
+
positionWatcher.attach(plugin);
|
|
368
|
+
},
|
|
369
|
+
update(context) {
|
|
370
|
+
const data = context.data.payload;
|
|
371
|
+
if (context.data.type === 'connection') {
|
|
372
|
+
const { start, end } = context.data;
|
|
373
|
+
return {
|
|
374
|
+
data,
|
|
375
|
+
...(start ? { start } : {}),
|
|
376
|
+
...(end ? { end } : {}),
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
return { data };
|
|
380
|
+
},
|
|
381
|
+
mount(context, plugin) {
|
|
382
|
+
const parent = plugin.parentScope();
|
|
383
|
+
const emit = parent.emit.bind(parent);
|
|
384
|
+
const rendered = () => {
|
|
385
|
+
emit({ type: 'rendered', data: context.data });
|
|
386
|
+
};
|
|
387
|
+
if (context.data.type === 'node') {
|
|
388
|
+
const component = node ? node(context.data) : NodeComponent;
|
|
389
|
+
return {
|
|
390
|
+
key: `node-${context.data.payload.id}`,
|
|
391
|
+
component,
|
|
392
|
+
props: {
|
|
393
|
+
data: context.data.payload,
|
|
394
|
+
emit,
|
|
395
|
+
rendered
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
if (context.data.type === 'connection') {
|
|
400
|
+
const component = connection ? connection(context.data) : ConnectionComponent;
|
|
401
|
+
const id = context.data.payload.id;
|
|
402
|
+
const { sourceOutput, targetInput, source, target } = context.data.payload;
|
|
403
|
+
const { start, end, payload } = context.data;
|
|
404
|
+
return {
|
|
405
|
+
key: `connection-${id}`,
|
|
406
|
+
component: ConnectionWrapperComponent,
|
|
407
|
+
props: {
|
|
408
|
+
connectionComponent: component,
|
|
409
|
+
data: payload,
|
|
410
|
+
start: start || ((change) => positionWatcher.listen(source, 'output', sourceOutput, change)),
|
|
411
|
+
end: end || ((change) => positionWatcher.listen(target, 'input', targetInput, change)),
|
|
412
|
+
path: async (start, end) => {
|
|
413
|
+
const response = await plugin.emit({ type: 'connectionpath', data: { payload, points: [start, end] } });
|
|
414
|
+
if (!response)
|
|
415
|
+
return '';
|
|
416
|
+
const { path, points } = response.data;
|
|
417
|
+
const curvature = 0.3;
|
|
418
|
+
if (!path && points.length !== 2)
|
|
419
|
+
throw new Error('cannot render connection with a custom number of points');
|
|
420
|
+
if (!path)
|
|
421
|
+
return payload.isLoop
|
|
422
|
+
? loopConnectionPath(points, curvature, 120)
|
|
423
|
+
: classicConnectionPath(points, curvature);
|
|
424
|
+
return path;
|
|
425
|
+
},
|
|
426
|
+
rendered
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
if (context.data.type === 'socket') {
|
|
431
|
+
const component = socket ? socket(context.data) : SocketComponent;
|
|
432
|
+
return {
|
|
433
|
+
key: `socket-${getUID()}`,
|
|
434
|
+
component,
|
|
435
|
+
props: {
|
|
436
|
+
data: context.data.payload,
|
|
437
|
+
rendered
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
if (context.data.type === 'control') {
|
|
442
|
+
const component = control
|
|
443
|
+
? control(context.data)
|
|
444
|
+
: (context.data.payload instanceof ClassicPreset.InputControl
|
|
445
|
+
? ControlComponent
|
|
446
|
+
: null);
|
|
447
|
+
if (component) {
|
|
448
|
+
return {
|
|
449
|
+
key: `control-${context.data.payload.id}`,
|
|
450
|
+
component,
|
|
451
|
+
props: {
|
|
452
|
+
data: context.data.payload,
|
|
453
|
+
rendered
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
465
|
+
__proto__: null,
|
|
466
|
+
setup: setup$3
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
function debounce(cb) {
|
|
470
|
+
return {
|
|
471
|
+
timeout: null,
|
|
472
|
+
cancel() {
|
|
473
|
+
if (this.timeout) {
|
|
474
|
+
window.clearTimeout(this.timeout);
|
|
475
|
+
this.timeout = null;
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
call(delay) {
|
|
479
|
+
this.timeout = window.setTimeout(() => {
|
|
480
|
+
cb();
|
|
481
|
+
}, delay);
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
class ContextMenuSearchComponent {
|
|
487
|
+
value;
|
|
488
|
+
update = new EventEmitter();
|
|
489
|
+
static ɵfac = function ContextMenuSearchComponent_Factory(t) { return new (t || ContextMenuSearchComponent)(); };
|
|
490
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextMenuSearchComponent, selectors: [["context-menu-search"]], inputs: { value: "value" }, outputs: { update: "update" }, decls: 1, vars: 1, consts: [["data-testid", "context-menu-search-input", 1, "search", 3, "value", "input"]], template: function ContextMenuSearchComponent_Template(rf, ctx) { if (rf & 1) {
|
|
491
|
+
i0.ɵɵelementStart(0, "input", 0);
|
|
492
|
+
i0.ɵɵlistener("input", function ContextMenuSearchComponent_Template_input_input_0_listener($event) { let tmp_b_0; return ctx.update.emit(((tmp_b_0 = $event.target) == null ? null : tmp_b_0.value) || ""); });
|
|
493
|
+
i0.ɵɵelementEnd();
|
|
494
|
+
} if (rf & 2) {
|
|
495
|
+
i0.ɵɵproperty("value", ctx.value);
|
|
496
|
+
} }, styles: [".search[_ngcontent-%COMP%]{color:#fff;padding:1px 8px;border:1px solid white;border-radius:10px;font-size:16px;font-family:serif;width:100%;box-sizing:border-box;background:transparent}"] });
|
|
497
|
+
}
|
|
498
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextMenuSearchComponent, [{
|
|
499
|
+
type: Component,
|
|
500
|
+
args: [{ selector: 'context-menu-search', template: "<input class=\"search\" [value]=\"value\" (input)=\"update.emit($any($event.target)?.value || '')\"\n data-testid=\"context-menu-search-input\" />\n", styles: [".search{color:#fff;padding:1px 8px;border:1px solid white;border-radius:10px;font-size:16px;font-family:serif;width:100%;box-sizing:border-box;background:transparent}\n"] }]
|
|
501
|
+
}], null, { value: [{
|
|
502
|
+
type: Input
|
|
503
|
+
}], update: [{
|
|
504
|
+
type: Output
|
|
505
|
+
}] }); })();
|
|
506
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ContextMenuSearchComponent, { className: "ContextMenuSearchComponent", filePath: "presets/context-menu/components/search/search.component.ts", lineNumber: 8 }); })();
|
|
507
|
+
|
|
508
|
+
function ContextMenuItemComponent_div_1_context_menu_item_1_Template(rf, ctx) { if (rf & 1) {
|
|
509
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
510
|
+
i0.ɵɵelementStart(0, "context-menu-item", 3);
|
|
511
|
+
i0.ɵɵlistener("select", function ContextMenuItemComponent_div_1_context_menu_item_1_Template_context_menu_item_select_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const item_r2 = restoredCtx.$implicit; return i0.ɵɵresetView(item_r2.handler()); })("hide", function ContextMenuItemComponent_div_1_context_menu_item_1_Template_context_menu_item_hide_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r5.hide.emit()); });
|
|
512
|
+
i0.ɵɵtext(1);
|
|
513
|
+
i0.ɵɵelementEnd();
|
|
514
|
+
} if (rf & 2) {
|
|
515
|
+
const item_r2 = ctx.$implicit;
|
|
516
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
517
|
+
i0.ɵɵproperty("delay", ctx_r1.delay);
|
|
518
|
+
i0.ɵɵadvance(1);
|
|
519
|
+
i0.ɵɵtextInterpolate1(" ", item_r2.label, " ");
|
|
520
|
+
} }
|
|
521
|
+
function ContextMenuItemComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
522
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
523
|
+
i0.ɵɵtemplate(1, ContextMenuItemComponent_div_1_context_menu_item_1_Template, 2, 2, "context-menu-item", 2);
|
|
524
|
+
i0.ɵɵelementEnd();
|
|
525
|
+
} if (rf & 2) {
|
|
526
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
527
|
+
i0.ɵɵadvance(1);
|
|
528
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.subitems);
|
|
529
|
+
} }
|
|
530
|
+
const _c0 = ["*"];
|
|
531
|
+
class ContextMenuItemComponent {
|
|
532
|
+
cdr;
|
|
533
|
+
subitems;
|
|
534
|
+
delay;
|
|
535
|
+
select = new EventEmitter();
|
|
536
|
+
hide = new EventEmitter();
|
|
537
|
+
get block() { return true; }
|
|
538
|
+
get hasSubitems() { return this.subitems; }
|
|
539
|
+
click(event) {
|
|
540
|
+
event.stopPropagation();
|
|
541
|
+
this.select.emit();
|
|
542
|
+
this.hide.emit();
|
|
543
|
+
}
|
|
544
|
+
pointerdown(event) {
|
|
545
|
+
event.stopPropagation();
|
|
546
|
+
}
|
|
547
|
+
wheel(event) {
|
|
548
|
+
event.stopPropagation();
|
|
549
|
+
}
|
|
550
|
+
hideSubitems = debounce(() => {
|
|
551
|
+
this.visibleSubitems = false;
|
|
552
|
+
this.cdr.detectChanges();
|
|
553
|
+
});
|
|
554
|
+
visibleSubitems = false;
|
|
555
|
+
pointerover() {
|
|
556
|
+
this.hideSubitems.cancel();
|
|
557
|
+
this.visibleSubitems = true;
|
|
558
|
+
this.cdr.detectChanges();
|
|
559
|
+
}
|
|
560
|
+
pointerleave() {
|
|
561
|
+
this.hideSubitems.call(this.delay);
|
|
562
|
+
this.cdr.detectChanges();
|
|
563
|
+
}
|
|
564
|
+
constructor(cdr) {
|
|
565
|
+
this.cdr = cdr;
|
|
566
|
+
this.cdr.detach();
|
|
567
|
+
}
|
|
568
|
+
static ɵfac = function ContextMenuItemComponent_Factory(t) { return new (t || ContextMenuItemComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
569
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextMenuItemComponent, selectors: [["context-menu-item"]], hostAttrs: ["data-testid", "context-menu-item"], hostVars: 4, hostBindings: function ContextMenuItemComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
570
|
+
i0.ɵɵlistener("click", function ContextMenuItemComponent_click_HostBindingHandler($event) { return ctx.click($event); })("pointerdown", function ContextMenuItemComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("wheel", function ContextMenuItemComponent_wheel_HostBindingHandler($event) { return ctx.wheel($event); })("pointerover", function ContextMenuItemComponent_pointerover_HostBindingHandler() { return ctx.pointerover(); })("pointerleave", function ContextMenuItemComponent_pointerleave_HostBindingHandler() { return ctx.pointerleave(); });
|
|
571
|
+
} if (rf & 2) {
|
|
572
|
+
i0.ɵɵclassProp("block", ctx.block)("hasSubitems", ctx.hasSubitems);
|
|
573
|
+
} }, inputs: { subitems: "subitems", delay: "delay" }, outputs: { select: "select", hide: "hide" }, ngContentSelectors: _c0, decls: 2, vars: 1, consts: [["class", "subitems", 4, "ngIf"], [1, "subitems"], [3, "delay", "select", "hide", 4, "ngFor", "ngForOf"], [3, "delay", "select", "hide"]], template: function ContextMenuItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
574
|
+
i0.ɵɵprojectionDef();
|
|
575
|
+
i0.ɵɵprojection(0);
|
|
576
|
+
i0.ɵɵtemplate(1, ContextMenuItemComponent_div_1_Template, 2, 1, "div", 0);
|
|
577
|
+
} if (rf & 2) {
|
|
578
|
+
i0.ɵɵadvance(1);
|
|
579
|
+
i0.ɵɵproperty("ngIf", ctx.subitems && ctx.visibleSubitems);
|
|
580
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, ContextMenuItemComponent], styles: ["@charset \"UTF-8\";.hasSubitems[_nghost-%COMP%]:after{content:\"\\25ba\";position:absolute;opacity:.6;right:5px;top:5px;font-family:initial}.subitems[_ngcontent-%COMP%]{position:absolute;top:0;left:100%;width:120px}", ".block[_ngcontent-%COMP%]{display:block;color:#fff;padding:4px;border-bottom:1px solid rgba(69,103,255,.8);background-color:#6e88ffcc;cursor:pointer;width:100%;position:relative}.block[_ngcontent-%COMP%]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block[_ngcontent-%COMP%]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block[_ngcontent-%COMP%]:hover{background-color:#8299ffcc}"] });
|
|
581
|
+
}
|
|
582
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextMenuItemComponent, [{
|
|
583
|
+
type: Component,
|
|
584
|
+
args: [{ selector: 'context-menu-item', host: {
|
|
585
|
+
'data-testid': 'context-menu-item'
|
|
586
|
+
}, template: "<ng-content></ng-content>\n<div class=\"subitems\" *ngIf=\"subitems && visibleSubitems\">\n <context-menu-item *ngFor=\"let item of subitems\" [delay]=\"delay\" (select)=\"item.handler()\" (hide)=\"hide.emit()\">\n {{ item.label }}\n </context-menu-item>\n</div>\n", styles: ["@charset \"UTF-8\";:host(.hasSubitems):after{content:\"\\25ba\";position:absolute;opacity:.6;right:5px;top:5px;font-family:initial}.subitems{position:absolute;top:0;left:100%;width:120px}\n", ".block{display:block;color:#fff;padding:4px;border-bottom:1px solid rgba(69,103,255,.8);background-color:#6e88ffcc;cursor:pointer;width:100%;position:relative}.block:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block:hover{background-color:#8299ffcc}\n"] }]
|
|
587
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { subitems: [{
|
|
588
|
+
type: Input
|
|
589
|
+
}], delay: [{
|
|
590
|
+
type: Input
|
|
591
|
+
}], select: [{
|
|
592
|
+
type: Output
|
|
593
|
+
}], hide: [{
|
|
594
|
+
type: Output
|
|
595
|
+
}], block: [{
|
|
596
|
+
type: HostBinding,
|
|
597
|
+
args: ['class.block']
|
|
598
|
+
}], hasSubitems: [{
|
|
599
|
+
type: HostBinding,
|
|
600
|
+
args: ['class.hasSubitems']
|
|
601
|
+
}], click: [{
|
|
602
|
+
type: HostListener,
|
|
603
|
+
args: ['click', ['$event']]
|
|
604
|
+
}], pointerdown: [{
|
|
605
|
+
type: HostListener,
|
|
606
|
+
args: ['pointerdown', ['$event']]
|
|
607
|
+
}], wheel: [{
|
|
608
|
+
type: HostListener,
|
|
609
|
+
args: ['wheel', ['$event']]
|
|
610
|
+
}], pointerover: [{
|
|
611
|
+
type: HostListener,
|
|
612
|
+
args: ['pointerover']
|
|
613
|
+
}], pointerleave: [{
|
|
614
|
+
type: HostListener,
|
|
615
|
+
args: ['pointerleave']
|
|
616
|
+
}] }); })();
|
|
617
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ContextMenuItemComponent, { className: "ContextMenuItemComponent", filePath: "presets/context-menu/components/item/item.component.ts", lineNumber: 13 }); })();
|
|
618
|
+
|
|
619
|
+
function ContextMenuComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
620
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
621
|
+
i0.ɵɵelementStart(0, "div", 2)(1, "context-menu-search", 3);
|
|
622
|
+
i0.ɵɵlistener("update", function ContextMenuComponent_div_0_Template_context_menu_search_update_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.setFilter($event)); });
|
|
623
|
+
i0.ɵɵelementEnd()();
|
|
624
|
+
} if (rf & 2) {
|
|
625
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
626
|
+
i0.ɵɵadvance(1);
|
|
627
|
+
i0.ɵɵproperty("value", ctx_r0.filter);
|
|
628
|
+
} }
|
|
629
|
+
function ContextMenuComponent_context_menu_item_1_Template(rf, ctx) { if (rf & 1) {
|
|
630
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
631
|
+
i0.ɵɵelementStart(0, "context-menu-item", 4);
|
|
632
|
+
i0.ɵɵlistener("select", function ContextMenuComponent_context_menu_item_1_Template_context_menu_item_select_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r6); const item_r4 = restoredCtx.$implicit; return i0.ɵɵresetView(item_r4.handler()); })("hide", function ContextMenuComponent_context_menu_item_1_Template_context_menu_item_hide_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.onHide()); });
|
|
633
|
+
i0.ɵɵtext(1);
|
|
634
|
+
i0.ɵɵelementEnd();
|
|
635
|
+
} if (rf & 2) {
|
|
636
|
+
const item_r4 = ctx.$implicit;
|
|
637
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
638
|
+
i0.ɵɵproperty("delay", ctx_r1.delay)("subitems", item_r4.subitems);
|
|
639
|
+
i0.ɵɵadvance(1);
|
|
640
|
+
i0.ɵɵtextInterpolate1(" ", item_r4.label, "\n");
|
|
641
|
+
} }
|
|
642
|
+
class ContextMenuComponent {
|
|
643
|
+
cdr;
|
|
644
|
+
items;
|
|
645
|
+
delay;
|
|
646
|
+
searchBar;
|
|
647
|
+
onHide;
|
|
648
|
+
rendered;
|
|
649
|
+
filter = '';
|
|
650
|
+
hide = debounce(() => {
|
|
651
|
+
this.onHide();
|
|
652
|
+
this.cdr.detectChanges();
|
|
653
|
+
});
|
|
654
|
+
customAttribute = '';
|
|
655
|
+
pointerover() {
|
|
656
|
+
this.hide.cancel();
|
|
657
|
+
this.cdr.detectChanges();
|
|
658
|
+
}
|
|
659
|
+
pointerleave() {
|
|
660
|
+
this.hide.call(this.delay);
|
|
661
|
+
this.cdr.detectChanges();
|
|
662
|
+
}
|
|
663
|
+
constructor(cdr) {
|
|
664
|
+
this.cdr = cdr;
|
|
665
|
+
this.cdr.detach();
|
|
666
|
+
}
|
|
667
|
+
ngOnChanges() {
|
|
668
|
+
this.cdr.detectChanges();
|
|
669
|
+
requestAnimationFrame(() => this.rendered());
|
|
670
|
+
}
|
|
671
|
+
setFilter(value) {
|
|
672
|
+
this.filter = value;
|
|
673
|
+
this.cdr.detectChanges();
|
|
674
|
+
}
|
|
675
|
+
getItems() {
|
|
676
|
+
const filterRegexp = new RegExp(this.filter, 'i');
|
|
677
|
+
const filteredList = this.items.filter(item => (item.label.match(filterRegexp)));
|
|
678
|
+
return filteredList;
|
|
679
|
+
}
|
|
680
|
+
ngOnDestroy() {
|
|
681
|
+
if (this.hide)
|
|
682
|
+
this.hide.cancel();
|
|
683
|
+
}
|
|
684
|
+
static ɵfac = function ContextMenuComponent_Factory(t) { return new (t || ContextMenuComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
685
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextMenuComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "context-menu"], hostVars: 1, hostBindings: function ContextMenuComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
686
|
+
i0.ɵɵlistener("mouseover", function ContextMenuComponent_mouseover_HostBindingHandler() { return ctx.pointerover(); })("mouseleave", function ContextMenuComponent_mouseleave_HostBindingHandler() { return ctx.pointerleave(); });
|
|
687
|
+
} if (rf & 2) {
|
|
688
|
+
i0.ɵɵattribute("rete-context-menu", ctx.customAttribute);
|
|
689
|
+
} }, inputs: { items: "items", delay: "delay", searchBar: "searchBar", onHide: "onHide", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 2, consts: [["class", "block", 4, "ngIf"], [3, "delay", "subitems", "select", "hide", 4, "ngFor", "ngForOf"], [1, "block"], [3, "value", "update"], [3, "delay", "subitems", "select", "hide"]], template: function ContextMenuComponent_Template(rf, ctx) { if (rf & 1) {
|
|
690
|
+
i0.ɵɵtemplate(0, ContextMenuComponent_div_0_Template, 2, 1, "div", 0)(1, ContextMenuComponent_context_menu_item_1_Template, 2, 3, "context-menu-item", 1);
|
|
691
|
+
} if (rf & 2) {
|
|
692
|
+
i0.ɵɵproperty("ngIf", ctx.searchBar);
|
|
693
|
+
i0.ɵɵadvance(1);
|
|
694
|
+
i0.ɵɵproperty("ngForOf", ctx.getItems());
|
|
695
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, ContextMenuSearchComponent, ContextMenuItemComponent], styles: ["[_nghost-%COMP%]{display:block;padding:10px;width:120px;margin-top:-20px;margin-left:-60px}", ".block[_ngcontent-%COMP%]{display:block;color:#fff;padding:4px;border-bottom:1px solid rgba(69,103,255,.8);background-color:#6e88ffcc;cursor:pointer;width:100%;position:relative}.block[_ngcontent-%COMP%]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block[_ngcontent-%COMP%]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block[_ngcontent-%COMP%]:hover{background-color:#8299ffcc}"] });
|
|
696
|
+
}
|
|
697
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextMenuComponent, [{
|
|
698
|
+
type: Component,
|
|
699
|
+
args: [{ host: {
|
|
700
|
+
'data-testid': 'context-menu'
|
|
701
|
+
}, template: "<div class=\"block\" *ngIf=\"searchBar\">\n <context-menu-search [value]=\"filter\" (update)=\"setFilter($event)\"></context-menu-search>\n</div>\n\n<context-menu-item *ngFor=\"let item of getItems()\" [delay]=\"delay\" (select)=\"item.handler()\" [subitems]=\"item.subitems\"\n (hide)=\"onHide()\">\n {{ item.label }}\n</context-menu-item>\n", styles: [":host{display:block;padding:10px;width:120px;margin-top:-20px;margin-left:-60px}\n", ".block{display:block;color:#fff;padding:4px;border-bottom:1px solid rgba(69,103,255,.8);background-color:#6e88ffcc;cursor:pointer;width:100%;position:relative}.block:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block:hover{background-color:#8299ffcc}\n"] }]
|
|
702
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { items: [{
|
|
703
|
+
type: Input
|
|
704
|
+
}], delay: [{
|
|
705
|
+
type: Input
|
|
706
|
+
}], searchBar: [{
|
|
707
|
+
type: Input
|
|
708
|
+
}], onHide: [{
|
|
709
|
+
type: Input
|
|
710
|
+
}], rendered: [{
|
|
711
|
+
type: Input
|
|
712
|
+
}], customAttribute: [{
|
|
713
|
+
type: HostBinding,
|
|
714
|
+
args: ['attr.rete-context-menu']
|
|
715
|
+
}], pointerover: [{
|
|
716
|
+
type: HostListener,
|
|
717
|
+
args: ['mouseover']
|
|
718
|
+
}], pointerleave: [{
|
|
719
|
+
type: HostListener,
|
|
720
|
+
args: ['mouseleave']
|
|
721
|
+
}] }); })();
|
|
722
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ContextMenuComponent, { className: "ContextMenuComponent", filePath: "presets/context-menu/components/menu/menu.component.ts", lineNumber: 12 }); })();
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Preset for rendering context menu.
|
|
726
|
+
*/
|
|
727
|
+
function setup$2(props) {
|
|
728
|
+
const delay = typeof props?.delay === 'undefined' ? 1000 : props.delay;
|
|
729
|
+
return {
|
|
730
|
+
update(context) {
|
|
731
|
+
if (context.data.type === 'contextmenu') {
|
|
732
|
+
return {
|
|
733
|
+
items: context.data.items,
|
|
734
|
+
delay,
|
|
735
|
+
searchBar: context.data.searchBar,
|
|
736
|
+
onHide: context.data.onHide
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
mount(context, plugin) {
|
|
741
|
+
const parent = plugin.parentScope();
|
|
742
|
+
const emit = parent.emit.bind(parent);
|
|
743
|
+
const rendered = () => {
|
|
744
|
+
emit({ type: 'rendered', data: context.data });
|
|
745
|
+
};
|
|
746
|
+
if (context.data.type === 'contextmenu') {
|
|
747
|
+
return {
|
|
748
|
+
key: 'context-menu',
|
|
749
|
+
component: ContextMenuComponent,
|
|
750
|
+
props: {
|
|
751
|
+
items: context.data.items,
|
|
752
|
+
delay,
|
|
753
|
+
searchBar: context.data.searchBar,
|
|
754
|
+
onHide: context.data.onHide,
|
|
755
|
+
rendered
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
return null;
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
765
|
+
__proto__: null,
|
|
766
|
+
setup: setup$2
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
function useDrag(translate, getPointer) {
|
|
770
|
+
return {
|
|
771
|
+
start(e) {
|
|
772
|
+
let previous = { ...getPointer(e) };
|
|
773
|
+
function move(moveEvent) {
|
|
774
|
+
const current = { ...getPointer(moveEvent) };
|
|
775
|
+
const dx = current.x - previous.x;
|
|
776
|
+
const dy = current.y - previous.y;
|
|
777
|
+
previous = current;
|
|
778
|
+
translate(dx, dy);
|
|
779
|
+
}
|
|
780
|
+
function up() {
|
|
781
|
+
window.removeEventListener('pointermove', move);
|
|
782
|
+
window.removeEventListener('pointerup', up);
|
|
783
|
+
window.removeEventListener('pointercancel', up);
|
|
784
|
+
}
|
|
785
|
+
window.addEventListener('pointermove', move);
|
|
786
|
+
window.addEventListener('pointerup', up);
|
|
787
|
+
window.addEventListener('pointercancel', up);
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
class MiniViewportComponent {
|
|
793
|
+
left;
|
|
794
|
+
top;
|
|
795
|
+
width;
|
|
796
|
+
height;
|
|
797
|
+
containerWidth;
|
|
798
|
+
translate;
|
|
799
|
+
drag = useDrag((dx, dy) => this.onDrag(dx, dy), e => ({ x: e.pageX, y: e.pageY }));
|
|
800
|
+
get styleLeft() {
|
|
801
|
+
return this.px(this.scale(this.left));
|
|
802
|
+
}
|
|
803
|
+
get styleTop() {
|
|
804
|
+
return this.px(this.scale(this.top));
|
|
805
|
+
}
|
|
806
|
+
get styleWidth() {
|
|
807
|
+
return this.px(this.scale(this.width));
|
|
808
|
+
}
|
|
809
|
+
get styleHeight() {
|
|
810
|
+
return this.px(this.scale(this.height));
|
|
811
|
+
}
|
|
812
|
+
pointerdown(event) {
|
|
813
|
+
event.stopPropagation();
|
|
814
|
+
this.drag.start(event);
|
|
815
|
+
}
|
|
816
|
+
px(value) {
|
|
817
|
+
return `${value}px`;
|
|
818
|
+
}
|
|
819
|
+
scale(v) {
|
|
820
|
+
return v * this.containerWidth;
|
|
821
|
+
}
|
|
822
|
+
invert(v) {
|
|
823
|
+
return v / this.containerWidth;
|
|
824
|
+
}
|
|
825
|
+
onDrag(dx, dy) {
|
|
826
|
+
this.translate(this.invert(-dx), this.invert(-dy));
|
|
827
|
+
}
|
|
828
|
+
static ɵfac = function MiniViewportComponent_Factory(t) { return new (t || MiniViewportComponent)(); };
|
|
829
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MiniViewportComponent, selectors: [["minimap-mini-viewport"]], hostAttrs: ["data-testid", "minimap-viewport"], hostVars: 8, hostBindings: function MiniViewportComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
830
|
+
i0.ɵɵlistener("pointerdown", function MiniViewportComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); });
|
|
831
|
+
} if (rf & 2) {
|
|
832
|
+
i0.ɵɵstyleProp("left", ctx.styleLeft)("top", ctx.styleTop)("width", ctx.styleWidth)("height", ctx.styleHeight);
|
|
833
|
+
} }, inputs: { left: "left", top: "top", width: "width", height: "height", containerWidth: "containerWidth", translate: "translate" }, decls: 0, vars: 0, template: function MiniViewportComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;position:absolute;background:rgba(255,251,128,.32);border:1px solid #ffe52b}"] });
|
|
834
|
+
}
|
|
835
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MiniViewportComponent, [{
|
|
836
|
+
type: Component,
|
|
837
|
+
args: [{ selector: 'minimap-mini-viewport', host: {
|
|
838
|
+
'data-testid': 'minimap-viewport'
|
|
839
|
+
}, template: "", styles: [":host{display:block;position:absolute;background:rgba(255,251,128,.32);border:1px solid #ffe52b}\n"] }]
|
|
840
|
+
}], null, { left: [{
|
|
841
|
+
type: Input
|
|
842
|
+
}], top: [{
|
|
843
|
+
type: Input
|
|
844
|
+
}], width: [{
|
|
845
|
+
type: Input
|
|
846
|
+
}], height: [{
|
|
847
|
+
type: Input
|
|
848
|
+
}], containerWidth: [{
|
|
849
|
+
type: Input
|
|
850
|
+
}], translate: [{
|
|
851
|
+
type: Input
|
|
852
|
+
}], styleLeft: [{
|
|
853
|
+
type: HostBinding,
|
|
854
|
+
args: ['style.left']
|
|
855
|
+
}], styleTop: [{
|
|
856
|
+
type: HostBinding,
|
|
857
|
+
args: ['style.top']
|
|
858
|
+
}], styleWidth: [{
|
|
859
|
+
type: HostBinding,
|
|
860
|
+
args: ['style.width']
|
|
861
|
+
}], styleHeight: [{
|
|
862
|
+
type: HostBinding,
|
|
863
|
+
args: ['style.height']
|
|
864
|
+
}], pointerdown: [{
|
|
865
|
+
type: HostListener,
|
|
866
|
+
args: ['pointerdown', ['$event']]
|
|
867
|
+
}] }); })();
|
|
868
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MiniViewportComponent, { className: "MiniViewportComponent", filePath: "presets/minimap/components/mini-viewport/mini-viewport.component.ts", lineNumber: 13 }); })();
|
|
869
|
+
|
|
870
|
+
class MiniNodeComponent {
|
|
871
|
+
left;
|
|
872
|
+
top;
|
|
873
|
+
width;
|
|
874
|
+
height;
|
|
875
|
+
get styleLeft() {
|
|
876
|
+
return this.px(this.left);
|
|
877
|
+
}
|
|
878
|
+
get styleTop() {
|
|
879
|
+
return this.px(this.top);
|
|
880
|
+
}
|
|
881
|
+
get styleWidth() {
|
|
882
|
+
return this.px(this.width);
|
|
883
|
+
}
|
|
884
|
+
get styleHeight() {
|
|
885
|
+
return this.px(this.height);
|
|
886
|
+
}
|
|
887
|
+
px(value) {
|
|
888
|
+
return `${value}px`;
|
|
889
|
+
}
|
|
890
|
+
static ɵfac = function MiniNodeComponent_Factory(t) { return new (t || MiniNodeComponent)(); };
|
|
891
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MiniNodeComponent, selectors: [["minimap-mini-node"]], hostAttrs: ["data-testid", "minimap-node"], hostVars: 8, hostBindings: function MiniNodeComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
892
|
+
i0.ɵɵstyleProp("left", ctx.styleLeft)("top", ctx.styleTop)("width", ctx.styleWidth)("height", ctx.styleHeight);
|
|
893
|
+
} }, inputs: { left: "left", top: "top", width: "width", height: "height" }, decls: 0, vars: 0, template: function MiniNodeComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;position:absolute;background:rgba(110,136,255,.8);border:1px solid rgba(192,206,212,.6)}"] });
|
|
894
|
+
}
|
|
895
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MiniNodeComponent, [{
|
|
896
|
+
type: Component,
|
|
897
|
+
args: [{ selector: 'minimap-mini-node', host: {
|
|
898
|
+
'data-testid': 'minimap-node'
|
|
899
|
+
}, template: "", styles: [":host{display:block;position:absolute;background:rgba(110,136,255,.8);border:1px solid rgba(192,206,212,.6)}\n"] }]
|
|
900
|
+
}], null, { left: [{
|
|
901
|
+
type: Input
|
|
902
|
+
}], top: [{
|
|
903
|
+
type: Input
|
|
904
|
+
}], width: [{
|
|
905
|
+
type: Input
|
|
906
|
+
}], height: [{
|
|
907
|
+
type: Input
|
|
908
|
+
}], styleLeft: [{
|
|
909
|
+
type: HostBinding,
|
|
910
|
+
args: ['style.left']
|
|
911
|
+
}], styleTop: [{
|
|
912
|
+
type: HostBinding,
|
|
913
|
+
args: ['style.top']
|
|
914
|
+
}], styleWidth: [{
|
|
915
|
+
type: HostBinding,
|
|
916
|
+
args: ['style.width']
|
|
917
|
+
}], styleHeight: [{
|
|
918
|
+
type: HostBinding,
|
|
919
|
+
args: ['style.height']
|
|
920
|
+
}] }); })();
|
|
921
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MiniNodeComponent, { className: "MiniNodeComponent", filePath: "presets/minimap/components/mini-node/mini-node.component.ts", lineNumber: 11 }); })();
|
|
922
|
+
|
|
923
|
+
function MinimapComponent_minimap_mini_node_0_Template(rf, ctx) { if (rf & 1) {
|
|
924
|
+
i0.ɵɵelement(0, "minimap-mini-node", 2);
|
|
925
|
+
} if (rf & 2) {
|
|
926
|
+
const node_r1 = ctx.$implicit;
|
|
927
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
928
|
+
i0.ɵɵproperty("left", ctx_r0.scale(node_r1.left))("top", ctx_r0.scale(node_r1.top))("width", ctx_r0.scale(node_r1.width))("height", ctx_r0.scale(node_r1.height));
|
|
929
|
+
} }
|
|
930
|
+
class MinimapComponent {
|
|
931
|
+
el;
|
|
932
|
+
cdr;
|
|
933
|
+
rendered;
|
|
934
|
+
size;
|
|
935
|
+
ratio;
|
|
936
|
+
nodes;
|
|
937
|
+
viewport;
|
|
938
|
+
translate;
|
|
939
|
+
point;
|
|
940
|
+
get width() {
|
|
941
|
+
return this.px(this.size * this.ratio);
|
|
942
|
+
}
|
|
943
|
+
get height() {
|
|
944
|
+
return this.px(this.size);
|
|
945
|
+
}
|
|
946
|
+
pointerdown(event) {
|
|
947
|
+
event.stopPropagation();
|
|
948
|
+
event.preventDefault();
|
|
949
|
+
}
|
|
950
|
+
dblclick(event) {
|
|
951
|
+
event.stopPropagation();
|
|
952
|
+
event.preventDefault();
|
|
953
|
+
if (!this.el.nativeElement)
|
|
954
|
+
return;
|
|
955
|
+
const box = this.el.nativeElement.getBoundingClientRect();
|
|
956
|
+
const x = (event.clientX - box.left) / (this.size * this.ratio);
|
|
957
|
+
const y = (event.clientY - box.top) / (this.size * this.ratio);
|
|
958
|
+
this.point(x, y);
|
|
959
|
+
}
|
|
960
|
+
constructor(el, cdr) {
|
|
961
|
+
this.el = el;
|
|
962
|
+
this.cdr = cdr;
|
|
963
|
+
this.cdr.detach();
|
|
964
|
+
}
|
|
965
|
+
ngOnChanges() {
|
|
966
|
+
this.cdr.detectChanges();
|
|
967
|
+
requestAnimationFrame(() => this.rendered());
|
|
968
|
+
}
|
|
969
|
+
px(value) {
|
|
970
|
+
return `${value}px`;
|
|
971
|
+
}
|
|
972
|
+
scale(value) {
|
|
973
|
+
if (!this.el.nativeElement)
|
|
974
|
+
return 0;
|
|
975
|
+
return value * this.el.nativeElement.clientWidth;
|
|
976
|
+
}
|
|
977
|
+
identifyMiniNode(_, item) {
|
|
978
|
+
return [item.top, item.left].join('_');
|
|
979
|
+
}
|
|
980
|
+
static ɵfac = function MinimapComponent_Factory(t) { return new (t || MinimapComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
981
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MinimapComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "minimap"], hostVars: 4, hostBindings: function MinimapComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
982
|
+
i0.ɵɵlistener("pointerdown", function MinimapComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("dblclick", function MinimapComponent_dblclick_HostBindingHandler($event) { return ctx.dblclick($event); });
|
|
983
|
+
} if (rf & 2) {
|
|
984
|
+
i0.ɵɵstyleProp("width", ctx.width)("height", ctx.height);
|
|
985
|
+
} }, inputs: { rendered: "rendered", size: "size", ratio: "ratio", nodes: "nodes", viewport: "viewport", translate: "translate", point: "point" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 8, consts: [[3, "left", "top", "width", "height", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "left", "top", "width", "height", "containerWidth", "translate"], [3, "left", "top", "width", "height"]], template: function MinimapComponent_Template(rf, ctx) { if (rf & 1) {
|
|
986
|
+
i0.ɵɵtemplate(0, MinimapComponent_minimap_mini_node_0_Template, 1, 4, "minimap-mini-node", 0);
|
|
987
|
+
i0.ɵɵelement(1, "minimap-mini-viewport", 1);
|
|
988
|
+
} if (rf & 2) {
|
|
989
|
+
i0.ɵɵproperty("ngForOf", ctx.nodes)("ngForTrackBy", ctx.identifyMiniNode);
|
|
990
|
+
i0.ɵɵadvance(1);
|
|
991
|
+
i0.ɵɵproperty("left", ctx.viewport.left)("top", ctx.viewport.top)("width", ctx.viewport.width)("height", ctx.viewport.height)("containerWidth", ctx.el.nativeElement == null ? null : ctx.el.nativeElement.clientWidth)("translate", ctx.translate);
|
|
992
|
+
} }, dependencies: [i1.NgForOf, MiniViewportComponent, MiniNodeComponent], styles: ["[_nghost-%COMP%]{position:absolute;right:24px;bottom:24px;background:rgba(229,234,239,.65);padding:20px;overflow:hidden;border:1px solid #b1b7ff;border-radius:8px;box-sizing:border-box}"] });
|
|
993
|
+
}
|
|
994
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MinimapComponent, [{
|
|
995
|
+
type: Component,
|
|
996
|
+
args: [{ host: {
|
|
997
|
+
'data-testid': 'minimap'
|
|
998
|
+
}, template: "<minimap-mini-node *ngFor=\"let node of nodes; trackBy: identifyMiniNode\" [left]=\"scale(node.left)\"\n [top]=\"scale(node.top)\" [width]=\"scale(node.width)\" [height]=\"scale(node.height)\">\n\n</minimap-mini-node>\n<minimap-mini-viewport [left]=\"viewport.left\" [top]=\"viewport.top\" [width]=\"viewport.width\" [height]=\"viewport.height\"\n [containerWidth]=\"el.nativeElement?.clientWidth\" [translate]=\"translate\"></minimap-mini-viewport>\n", styles: [":host{position:absolute;right:24px;bottom:24px;background:rgba(229,234,239,.65);padding:20px;overflow:hidden;border:1px solid #b1b7ff;border-radius:8px;box-sizing:border-box}\n"] }]
|
|
999
|
+
}], () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], { rendered: [{
|
|
1000
|
+
type: Input
|
|
1001
|
+
}], size: [{
|
|
1002
|
+
type: Input
|
|
1003
|
+
}], ratio: [{
|
|
1004
|
+
type: Input
|
|
1005
|
+
}], nodes: [{
|
|
1006
|
+
type: Input
|
|
1007
|
+
}], viewport: [{
|
|
1008
|
+
type: Input
|
|
1009
|
+
}], translate: [{
|
|
1010
|
+
type: Input
|
|
1011
|
+
}], point: [{
|
|
1012
|
+
type: Input
|
|
1013
|
+
}], width: [{
|
|
1014
|
+
type: HostBinding,
|
|
1015
|
+
args: ['style.width']
|
|
1016
|
+
}], height: [{
|
|
1017
|
+
type: HostBinding,
|
|
1018
|
+
args: ['style.height']
|
|
1019
|
+
}], pointerdown: [{
|
|
1020
|
+
type: HostListener,
|
|
1021
|
+
args: ['pointerdown', ['$event']]
|
|
1022
|
+
}], dblclick: [{
|
|
1023
|
+
type: HostListener,
|
|
1024
|
+
args: ['dblclick', ['$event']]
|
|
1025
|
+
}] }); })();
|
|
1026
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MinimapComponent, { className: "MinimapComponent", filePath: "presets/minimap/components/minimap/minimap.component.ts", lineNumber: 11 }); })();
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Preset for rendering minimap.
|
|
1030
|
+
*/
|
|
1031
|
+
function setup$1(props) {
|
|
1032
|
+
return {
|
|
1033
|
+
update(context) {
|
|
1034
|
+
if (context.data.type === 'minimap') {
|
|
1035
|
+
return {
|
|
1036
|
+
nodes: context.data.nodes,
|
|
1037
|
+
size: props?.size || 200,
|
|
1038
|
+
ratio: context.data.ratio,
|
|
1039
|
+
viewport: context.data.viewport,
|
|
1040
|
+
translate: context.data.translate,
|
|
1041
|
+
point: context.data.point
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
return null;
|
|
1045
|
+
},
|
|
1046
|
+
mount(context, plugin) {
|
|
1047
|
+
const parent = plugin.parentScope();
|
|
1048
|
+
const emit = parent.emit.bind(parent);
|
|
1049
|
+
const rendered = () => {
|
|
1050
|
+
emit({ type: 'rendered', data: context.data });
|
|
1051
|
+
};
|
|
1052
|
+
if (context.data.type === 'minimap') {
|
|
1053
|
+
return {
|
|
1054
|
+
key: 'rete-minimap',
|
|
1055
|
+
component: MinimapComponent,
|
|
1056
|
+
props: {
|
|
1057
|
+
nodes: context.data.nodes,
|
|
1058
|
+
size: props?.size || 200,
|
|
1059
|
+
ratio: context.data.ratio,
|
|
1060
|
+
viewport: context.data.viewport,
|
|
1061
|
+
translate: context.data.translate,
|
|
1062
|
+
point: context.data.point,
|
|
1063
|
+
rendered
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
return null;
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
var index$2 = /*#__PURE__*/Object.freeze({
|
|
1073
|
+
__proto__: null,
|
|
1074
|
+
setup: setup$1
|
|
1075
|
+
});
|
|
1076
|
+
|
|
1077
|
+
const pinSize = 20;
|
|
1078
|
+
class PinComponent {
|
|
1079
|
+
cdr;
|
|
1080
|
+
position;
|
|
1081
|
+
selected;
|
|
1082
|
+
getPointer;
|
|
1083
|
+
menu = new EventEmitter();
|
|
1084
|
+
translate = new EventEmitter();
|
|
1085
|
+
down = new EventEmitter();
|
|
1086
|
+
drag = useDrag((dx, dy) => {
|
|
1087
|
+
this.translate.emit({ dx, dy });
|
|
1088
|
+
}, () => this.getPointer());
|
|
1089
|
+
get _selected() {
|
|
1090
|
+
return this.selected;
|
|
1091
|
+
}
|
|
1092
|
+
get top() {
|
|
1093
|
+
return `${this.position.y - pinSize / 2}px`;
|
|
1094
|
+
}
|
|
1095
|
+
get left() {
|
|
1096
|
+
return `${this.position.x - pinSize / 2}px`;
|
|
1097
|
+
}
|
|
1098
|
+
pointerdown(event) {
|
|
1099
|
+
event.stopPropagation();
|
|
1100
|
+
event.preventDefault();
|
|
1101
|
+
this.drag.start(event);
|
|
1102
|
+
this.down.emit();
|
|
1103
|
+
}
|
|
1104
|
+
contextmenu(event) {
|
|
1105
|
+
event.stopPropagation();
|
|
1106
|
+
event.preventDefault();
|
|
1107
|
+
this.menu.emit();
|
|
1108
|
+
}
|
|
1109
|
+
constructor(cdr) {
|
|
1110
|
+
this.cdr = cdr;
|
|
1111
|
+
// this.cdr.detach()
|
|
1112
|
+
}
|
|
1113
|
+
ngOnChanges() {
|
|
1114
|
+
// this.cdr.detectChanges()
|
|
1115
|
+
// requestAnimationFrame(() => this.rendered())
|
|
1116
|
+
}
|
|
1117
|
+
static ɵfac = function PinComponent_Factory(t) { return new (t || PinComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
1118
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PinComponent, selectors: [["reroute-pin"]], hostAttrs: ["data-testid", "pin"], hostVars: 6, hostBindings: function PinComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1119
|
+
i0.ɵɵlistener("pointerdown", function PinComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("contextmenu", function PinComponent_contextmenu_HostBindingHandler($event) { return ctx.contextmenu($event); });
|
|
1120
|
+
} if (rf & 2) {
|
|
1121
|
+
i0.ɵɵstyleProp("top", ctx.top)("left", ctx.left);
|
|
1122
|
+
i0.ɵɵclassProp("selected", ctx._selected);
|
|
1123
|
+
} }, inputs: { position: "position", selected: "selected", getPointer: "getPointer" }, outputs: { menu: "menu", translate: "translate", down: "down" }, features: [i0.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function PinComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;width:20px;height:20px;box-sizing:border-box;background:steelblue;border:2px solid white;border-radius:20px;position:absolute}.selected[_nghost-%COMP%]{background:#ffd92c}"] });
|
|
1124
|
+
}
|
|
1125
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PinComponent, [{
|
|
1126
|
+
type: Component,
|
|
1127
|
+
args: [{ selector: 'reroute-pin', template: '', host: {
|
|
1128
|
+
'data-testid': 'pin'
|
|
1129
|
+
}, styles: [":host{display:block;width:20px;height:20px;box-sizing:border-box;background:steelblue;border:2px solid white;border-radius:20px;position:absolute}:host.selected{background:#ffd92c}\n"] }]
|
|
1130
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { position: [{
|
|
1131
|
+
type: Input
|
|
1132
|
+
}], selected: [{
|
|
1133
|
+
type: Input
|
|
1134
|
+
}], getPointer: [{
|
|
1135
|
+
type: Input
|
|
1136
|
+
}], menu: [{
|
|
1137
|
+
type: Output
|
|
1138
|
+
}], translate: [{
|
|
1139
|
+
type: Output
|
|
1140
|
+
}], down: [{
|
|
1141
|
+
type: Output
|
|
1142
|
+
}], _selected: [{
|
|
1143
|
+
type: HostBinding,
|
|
1144
|
+
args: ['class.selected']
|
|
1145
|
+
}], top: [{
|
|
1146
|
+
type: HostBinding,
|
|
1147
|
+
args: ['style.top']
|
|
1148
|
+
}], left: [{
|
|
1149
|
+
type: HostBinding,
|
|
1150
|
+
args: ['style.left']
|
|
1151
|
+
}], pointerdown: [{
|
|
1152
|
+
type: HostListener,
|
|
1153
|
+
args: ['pointerdown', ['$event']]
|
|
1154
|
+
}], contextmenu: [{
|
|
1155
|
+
type: HostListener,
|
|
1156
|
+
args: ['contextmenu', ['$event']]
|
|
1157
|
+
}] }); })();
|
|
1158
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PinComponent, { className: "PinComponent", filePath: "presets/reroute/components/pin/pin.component.ts", lineNumber: 15 }); })();
|
|
1159
|
+
|
|
1160
|
+
function PinsComponent_reroute_pin_0_Template(rf, ctx) { if (rf & 1) {
|
|
1161
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
1162
|
+
i0.ɵɵelementStart(0, "reroute-pin", 1);
|
|
1163
|
+
i0.ɵɵlistener("menu", function PinsComponent_reroute_pin_0_Template_reroute_pin_menu_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r3); const pin_r1 = restoredCtx.$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.menu && ctx_r2.menu(pin_r1.id)); })("translate", function PinsComponent_reroute_pin_0_Template_reroute_pin_translate_0_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r3); const pin_r1 = restoredCtx.$implicit; const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.translate && ctx_r4.translate(pin_r1.id, $event.dx, $event.dy)); })("down", function PinsComponent_reroute_pin_0_Template_reroute_pin_down_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r3); const pin_r1 = restoredCtx.$implicit; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.down && ctx_r5.down(pin_r1.id)); });
|
|
1164
|
+
i0.ɵɵelementEnd();
|
|
1165
|
+
} if (rf & 2) {
|
|
1166
|
+
const pin_r1 = ctx.$implicit;
|
|
1167
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
1168
|
+
i0.ɵɵproperty("position", pin_r1.position)("selected", pin_r1.selected)("getPointer", ctx_r0.getPointer);
|
|
1169
|
+
} }
|
|
1170
|
+
class PinsComponent {
|
|
1171
|
+
cdr;
|
|
1172
|
+
rendered;
|
|
1173
|
+
pins;
|
|
1174
|
+
down;
|
|
1175
|
+
translate;
|
|
1176
|
+
menu;
|
|
1177
|
+
getPointer;
|
|
1178
|
+
constructor(cdr) {
|
|
1179
|
+
this.cdr = cdr;
|
|
1180
|
+
this.cdr.detach();
|
|
1181
|
+
}
|
|
1182
|
+
ngOnChanges() {
|
|
1183
|
+
this.cdr.detectChanges();
|
|
1184
|
+
requestAnimationFrame(() => this.rendered());
|
|
1185
|
+
}
|
|
1186
|
+
track(_, item) {
|
|
1187
|
+
return item.id;
|
|
1188
|
+
}
|
|
1189
|
+
static ɵfac = function PinsComponent_Factory(t) { return new (t || PinsComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
1190
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PinsComponent, selectors: [["ng-component"]], inputs: { rendered: "rendered", pins: "pins", down: "down", translate: "translate", menu: "menu", getPointer: "getPointer" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 2, consts: [[3, "position", "selected", "getPointer", "menu", "translate", "down", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "position", "selected", "getPointer", "menu", "translate", "down"]], template: function PinsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1191
|
+
i0.ɵɵtemplate(0, PinsComponent_reroute_pin_0_Template, 1, 3, "reroute-pin", 0);
|
|
1192
|
+
} if (rf & 2) {
|
|
1193
|
+
i0.ɵɵproperty("ngForOf", ctx.pins)("ngForTrackBy", ctx.track);
|
|
1194
|
+
} }, dependencies: [i1.NgForOf, PinComponent], encapsulation: 2 });
|
|
1195
|
+
}
|
|
1196
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PinsComponent, [{
|
|
1197
|
+
type: Component,
|
|
1198
|
+
args: [{ template: "<reroute-pin *ngFor=\"let pin of pins; trackBy: track\" [position]=\"pin.position\" [selected]=\"pin.selected\"\n (menu)=\"menu && menu(pin.id)\" (translate)=\"translate && translate(pin.id, $event.dx, $event.dy)\"\n (down)=\"down && down(pin.id)\" [getPointer]=\"getPointer\"></reroute-pin>\n" }]
|
|
1199
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { rendered: [{
|
|
1200
|
+
type: Input
|
|
1201
|
+
}], pins: [{
|
|
1202
|
+
type: Input
|
|
1203
|
+
}], down: [{
|
|
1204
|
+
type: Input
|
|
1205
|
+
}], translate: [{
|
|
1206
|
+
type: Input
|
|
1207
|
+
}], menu: [{
|
|
1208
|
+
type: Input
|
|
1209
|
+
}], getPointer: [{
|
|
1210
|
+
type: Input
|
|
1211
|
+
}] }); })();
|
|
1212
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PinsComponent, { className: "PinsComponent", filePath: "presets/reroute/components/pins/pins.component.ts", lineNumber: 7 }); })();
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Preset for rendering pins.
|
|
1216
|
+
*/
|
|
1217
|
+
function setup(props) {
|
|
1218
|
+
const getProps = () => ({
|
|
1219
|
+
menu: props?.contextMenu || (() => null),
|
|
1220
|
+
translate: props?.translate || (() => null),
|
|
1221
|
+
down: props?.pointerdown || (() => null)
|
|
1222
|
+
});
|
|
1223
|
+
return {
|
|
1224
|
+
update(context) {
|
|
1225
|
+
if (context.data.type === 'reroute-pins') {
|
|
1226
|
+
return {
|
|
1227
|
+
...getProps(),
|
|
1228
|
+
pins: context.data.data.pins
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
return null;
|
|
1232
|
+
},
|
|
1233
|
+
mount(context, plugin) {
|
|
1234
|
+
const area = plugin.parentScope(BaseAreaPlugin);
|
|
1235
|
+
const rendered = () => {
|
|
1236
|
+
area.emit({ type: 'rendered', data: context.data });
|
|
1237
|
+
};
|
|
1238
|
+
if (context.data.type === 'reroute-pins') {
|
|
1239
|
+
return {
|
|
1240
|
+
key: 'rete-reroute',
|
|
1241
|
+
component: PinsComponent,
|
|
1242
|
+
props: {
|
|
1243
|
+
...getProps(),
|
|
1244
|
+
pins: context.data.data.pins,
|
|
1245
|
+
rendered,
|
|
1246
|
+
getPointer: () => area.area.pointer
|
|
1247
|
+
}
|
|
1248
|
+
};
|
|
1249
|
+
}
|
|
1250
|
+
return null;
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
1256
|
+
__proto__: null,
|
|
1257
|
+
setup: setup
|
|
1258
|
+
});
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Built-in presets, responsible for rendering different parts of the editor.
|
|
1262
|
+
* @module
|
|
1263
|
+
*/
|
|
1264
|
+
|
|
1265
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
1266
|
+
__proto__: null,
|
|
1267
|
+
classic: index$4,
|
|
1268
|
+
contextMenu: index$3,
|
|
1269
|
+
minimap: index$2,
|
|
1270
|
+
reroute: index$1
|
|
1271
|
+
});
|
|
1272
|
+
|
|
1273
|
+
class ReteModule {
|
|
1274
|
+
static ɵfac = function ReteModule_Factory(t) { return new (t || ReteModule)(); };
|
|
1275
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ReteModule });
|
|
1276
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule] });
|
|
1277
|
+
}
|
|
1278
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReteModule, [{
|
|
1279
|
+
type: NgModule,
|
|
1280
|
+
args: [{
|
|
1281
|
+
declarations: [
|
|
1282
|
+
RefDirective,
|
|
1283
|
+
NodeComponent,
|
|
1284
|
+
ConnectionComponent,
|
|
1285
|
+
ConnectionWrapperComponent,
|
|
1286
|
+
SocketComponent,
|
|
1287
|
+
ControlComponent
|
|
1288
|
+
],
|
|
1289
|
+
imports: [
|
|
1290
|
+
CommonModule
|
|
1291
|
+
],
|
|
1292
|
+
exports: [
|
|
1293
|
+
RefDirective,
|
|
1294
|
+
NodeComponent,
|
|
1295
|
+
ConnectionComponent,
|
|
1296
|
+
ConnectionWrapperComponent,
|
|
1297
|
+
SocketComponent,
|
|
1298
|
+
ControlComponent
|
|
1299
|
+
]
|
|
1300
|
+
}]
|
|
1301
|
+
}], null, null); })();
|
|
1302
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ReteModule, { declarations: [RefDirective,
|
|
1303
|
+
NodeComponent,
|
|
1304
|
+
ConnectionComponent,
|
|
1305
|
+
ConnectionWrapperComponent,
|
|
1306
|
+
SocketComponent,
|
|
1307
|
+
ControlComponent], imports: [CommonModule], exports: [RefDirective,
|
|
1308
|
+
NodeComponent,
|
|
1309
|
+
ConnectionComponent,
|
|
1310
|
+
ConnectionWrapperComponent,
|
|
1311
|
+
SocketComponent,
|
|
1312
|
+
ControlComponent] }); })();
|
|
1313
|
+
|
|
1314
|
+
class ReteContextMenuModule {
|
|
1315
|
+
static ɵfac = function ReteContextMenuModule_Factory(t) { return new (t || ReteContextMenuModule)(); };
|
|
1316
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ReteContextMenuModule });
|
|
1317
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule] });
|
|
1318
|
+
}
|
|
1319
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReteContextMenuModule, [{
|
|
1320
|
+
type: NgModule,
|
|
1321
|
+
args: [{
|
|
1322
|
+
declarations: [
|
|
1323
|
+
ContextMenuComponent,
|
|
1324
|
+
ContextMenuSearchComponent,
|
|
1325
|
+
ContextMenuItemComponent
|
|
1326
|
+
],
|
|
1327
|
+
imports: [
|
|
1328
|
+
CommonModule
|
|
1329
|
+
],
|
|
1330
|
+
exports: [
|
|
1331
|
+
ContextMenuComponent,
|
|
1332
|
+
ContextMenuSearchComponent,
|
|
1333
|
+
ContextMenuItemComponent,
|
|
1334
|
+
]
|
|
1335
|
+
}]
|
|
1336
|
+
}], null, null); })();
|
|
1337
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ReteContextMenuModule, { declarations: [ContextMenuComponent,
|
|
1338
|
+
ContextMenuSearchComponent,
|
|
1339
|
+
ContextMenuItemComponent], imports: [CommonModule], exports: [ContextMenuComponent,
|
|
1340
|
+
ContextMenuSearchComponent,
|
|
1341
|
+
ContextMenuItemComponent] }); })();
|
|
1342
|
+
|
|
1343
|
+
class ReteMinimapModule {
|
|
1344
|
+
static ɵfac = function ReteMinimapModule_Factory(t) { return new (t || ReteMinimapModule)(); };
|
|
1345
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ReteMinimapModule });
|
|
1346
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule] });
|
|
1347
|
+
}
|
|
1348
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReteMinimapModule, [{
|
|
1349
|
+
type: NgModule,
|
|
1350
|
+
args: [{
|
|
1351
|
+
declarations: [
|
|
1352
|
+
MinimapComponent,
|
|
1353
|
+
MiniViewportComponent,
|
|
1354
|
+
MiniNodeComponent
|
|
1355
|
+
],
|
|
1356
|
+
imports: [
|
|
1357
|
+
CommonModule
|
|
1358
|
+
],
|
|
1359
|
+
exports: [
|
|
1360
|
+
MinimapComponent,
|
|
1361
|
+
MiniViewportComponent,
|
|
1362
|
+
MiniNodeComponent
|
|
1363
|
+
]
|
|
1364
|
+
}]
|
|
1365
|
+
}], null, null); })();
|
|
1366
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ReteMinimapModule, { declarations: [MinimapComponent,
|
|
1367
|
+
MiniViewportComponent,
|
|
1368
|
+
MiniNodeComponent], imports: [CommonModule], exports: [MinimapComponent,
|
|
1369
|
+
MiniViewportComponent,
|
|
1370
|
+
MiniNodeComponent] }); })();
|
|
1371
|
+
|
|
1372
|
+
class ReteRerouteModule {
|
|
1373
|
+
static ɵfac = function ReteRerouteModule_Factory(t) { return new (t || ReteRerouteModule)(); };
|
|
1374
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ReteRerouteModule });
|
|
1375
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule] });
|
|
1376
|
+
}
|
|
1377
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReteRerouteModule, [{
|
|
1378
|
+
type: NgModule,
|
|
1379
|
+
args: [{
|
|
1380
|
+
declarations: [
|
|
1381
|
+
PinsComponent,
|
|
1382
|
+
PinComponent,
|
|
1383
|
+
],
|
|
1384
|
+
imports: [
|
|
1385
|
+
CommonModule
|
|
1386
|
+
],
|
|
1387
|
+
exports: [
|
|
1388
|
+
PinsComponent,
|
|
1389
|
+
PinComponent,
|
|
1390
|
+
]
|
|
1391
|
+
}]
|
|
1392
|
+
}], null, null); })();
|
|
1393
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ReteRerouteModule, { declarations: [PinsComponent,
|
|
1394
|
+
PinComponent], imports: [CommonModule], exports: [PinsComponent,
|
|
1395
|
+
PinComponent] }); })();
|
|
1396
|
+
|
|
1397
|
+
function getRenderer() {
|
|
1398
|
+
const elements = new WeakMap();
|
|
1399
|
+
return {
|
|
1400
|
+
get(element) {
|
|
1401
|
+
return elements.get(element);
|
|
1402
|
+
},
|
|
1403
|
+
mount(element, key, component, injector, props) {
|
|
1404
|
+
// LIMITATION: If an element is remounted with the same identifier, the component cannot be replaced
|
|
1405
|
+
const exists = customElements.get(key);
|
|
1406
|
+
if (!exists) {
|
|
1407
|
+
customElements.define(key, createCustomElement(component, { injector }));
|
|
1408
|
+
}
|
|
1409
|
+
const ngElement = document.createElement(key);
|
|
1410
|
+
Object.keys(props).forEach(key => {
|
|
1411
|
+
ngElement[key] = props[key];
|
|
1412
|
+
});
|
|
1413
|
+
element.appendChild(ngElement);
|
|
1414
|
+
elements.set(element, { key, ngElement });
|
|
1415
|
+
},
|
|
1416
|
+
update({ ngElement }, props) {
|
|
1417
|
+
Object.keys(props).forEach(key => {
|
|
1418
|
+
ngElement.ngElementStrategy.setInputValue(key, props[key]);
|
|
1419
|
+
});
|
|
1420
|
+
ngElement.ngElementStrategy.setInputValue('seed', Math.random());
|
|
1421
|
+
},
|
|
1422
|
+
unmount(element) {
|
|
1423
|
+
const existing = elements.get(element);
|
|
1424
|
+
if (existing) {
|
|
1425
|
+
existing.ngElement.remove();
|
|
1426
|
+
elements.delete(element);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Angular plugin. Renders nodes, connections and other elements using React.
|
|
1433
|
+
* @priority 9
|
|
1434
|
+
* @emits connectionpath
|
|
1435
|
+
* @listens render
|
|
1436
|
+
* @listens unmount
|
|
1437
|
+
*/
|
|
1438
|
+
class AngularPlugin extends Scope {
|
|
1439
|
+
params;
|
|
1440
|
+
presets = [];
|
|
1441
|
+
renderer;
|
|
1442
|
+
owners = new WeakMap();
|
|
1443
|
+
/**
|
|
1444
|
+
* @constructor
|
|
1445
|
+
* @param params Plugin properties
|
|
1446
|
+
* @param params.injector Angular's Injector instance
|
|
1447
|
+
*/
|
|
1448
|
+
constructor(params) {
|
|
1449
|
+
super('angular-render');
|
|
1450
|
+
this.params = params;
|
|
1451
|
+
this.renderer = getRenderer();
|
|
1452
|
+
this.addPipe(context => {
|
|
1453
|
+
if (!context || typeof context !== 'object' || !('type' in context))
|
|
1454
|
+
return context;
|
|
1455
|
+
if (context.type === 'unmount') {
|
|
1456
|
+
this.unmount(context.data.element);
|
|
1457
|
+
}
|
|
1458
|
+
else if (context.type === 'render') {
|
|
1459
|
+
if ('filled' in context.data && context.data.filled) {
|
|
1460
|
+
return context;
|
|
1461
|
+
}
|
|
1462
|
+
if (this.mount(context.data.element, context)) {
|
|
1463
|
+
return {
|
|
1464
|
+
...context,
|
|
1465
|
+
data: {
|
|
1466
|
+
...context.data,
|
|
1467
|
+
filled: true
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
return context;
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
setParent(scope) {
|
|
1476
|
+
super.setParent(scope);
|
|
1477
|
+
this.presets.forEach(preset => {
|
|
1478
|
+
if (preset.attach)
|
|
1479
|
+
preset.attach(this);
|
|
1480
|
+
});
|
|
1481
|
+
}
|
|
1482
|
+
unmount(element) {
|
|
1483
|
+
this.owners.delete(element);
|
|
1484
|
+
this.renderer.unmount(element);
|
|
1485
|
+
}
|
|
1486
|
+
mount(element, context) {
|
|
1487
|
+
const existing = this.renderer.get(element);
|
|
1488
|
+
if (existing) {
|
|
1489
|
+
this.presets.forEach(preset => {
|
|
1490
|
+
if (this.owners.get(element) !== preset)
|
|
1491
|
+
return;
|
|
1492
|
+
const result = preset.update(context, this);
|
|
1493
|
+
if (result) {
|
|
1494
|
+
this.renderer.update(existing, result);
|
|
1495
|
+
}
|
|
1496
|
+
});
|
|
1497
|
+
return true;
|
|
1498
|
+
}
|
|
1499
|
+
for (const preset of this.presets) {
|
|
1500
|
+
const result = preset.mount(context, this);
|
|
1501
|
+
if (!result)
|
|
1502
|
+
continue;
|
|
1503
|
+
const { key, component, props } = result;
|
|
1504
|
+
this.renderer.mount(element, key, component, this.params.injector, props);
|
|
1505
|
+
this.owners.set(element, preset);
|
|
1506
|
+
return true;
|
|
1507
|
+
}
|
|
1508
|
+
return;
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* Adds a preset to the plugin.
|
|
1512
|
+
* @param preset Preset that can render nodes, connections and other elements.
|
|
1513
|
+
*/
|
|
1514
|
+
addPreset(preset) {
|
|
1515
|
+
const local = preset;
|
|
1516
|
+
if (local.attach)
|
|
1517
|
+
local.attach(this);
|
|
1518
|
+
this.presets.push(local);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
/**
|
|
1523
|
+
* Generated bundle index. Do not edit.
|
|
1524
|
+
*/
|
|
1525
|
+
|
|
1526
|
+
export { AngularPlugin, ConnectionComponent, ConnectionWrapperComponent, ContextMenuComponent, ContextMenuItemComponent, ContextMenuSearchComponent, ControlComponent, MiniNodeComponent, MiniViewportComponent, MinimapComponent, NodeComponent, PinComponent, PinsComponent, index as Presets, RefDirective, ReteContextMenuModule, ReteMinimapModule, ReteModule, ReteRerouteModule, SocketComponent };
|
|
1527
|
+
//# sourceMappingURL=rete-angular-plugin-ng17.mjs.map
|