rete-angular-plugin 2.2.0 → 2.3.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 +26 -2
- package/12/bundles/rete-angular-plugin-ng12.umd.js.map +1 -1
- package/12/esm2015/core.js +3 -3
- package/12/esm2015/presets/classic/components/node/node.component.js +2 -1
- package/12/esm2015/presets/context-menu/components/menu/menu.component.js +3 -1
- package/12/esm2015/presets/minimap/components/minimap/minimap.component.js +3 -1
- package/12/esm2015/presets/reroute/components/pins/pins.component.js +3 -1
- package/12/esm2015/reflect.js +18 -0
- package/12/fesm2015/rete-angular-plugin-ng12.js +26 -2
- package/12/fesm2015/rete-angular-plugin-ng12.js.map +1 -1
- package/12/reflect.d.ts +1 -0
- package/13/esm2020/core.mjs +3 -3
- package/13/esm2020/presets/classic/components/node/node.component.mjs +1 -1
- package/13/esm2020/presets/context-menu/components/menu/menu.component.mjs +2 -1
- package/13/esm2020/presets/minimap/components/minimap/minimap.component.mjs +2 -1
- package/13/esm2020/presets/reroute/components/pins/pins.component.mjs +2 -1
- package/13/esm2020/reflect.mjs +18 -0
- package/13/fesm2015/rete-angular-plugin-ng13.mjs +22 -2
- package/13/fesm2015/rete-angular-plugin-ng13.mjs.map +1 -1
- package/13/fesm2020/rete-angular-plugin-ng13.mjs +22 -2
- package/13/fesm2020/rete-angular-plugin-ng13.mjs.map +1 -1
- package/13/reflect.d.ts +1 -0
- package/14/esm2020/core.mjs +3 -3
- package/14/esm2020/presets/classic/components/node/node.component.mjs +1 -1
- package/14/esm2020/presets/context-menu/components/menu/menu.component.mjs +2 -1
- package/14/esm2020/presets/minimap/components/minimap/minimap.component.mjs +2 -1
- package/14/esm2020/presets/reroute/components/pins/pins.component.mjs +2 -1
- package/14/esm2020/reflect.mjs +18 -0
- package/14/fesm2015/rete-angular-plugin-ng14.mjs +22 -2
- package/14/fesm2015/rete-angular-plugin-ng14.mjs.map +1 -1
- package/14/fesm2020/rete-angular-plugin-ng14.mjs +22 -2
- package/14/fesm2020/rete-angular-plugin-ng14.mjs.map +1 -1
- package/14/reflect.d.ts +1 -0
- package/15/esm2020/core.mjs +3 -3
- package/15/esm2020/presets/classic/components/node/node.component.mjs +1 -1
- package/15/esm2020/presets/context-menu/components/menu/menu.component.mjs +2 -1
- package/15/esm2020/presets/minimap/components/minimap/minimap.component.mjs +2 -1
- package/15/esm2020/presets/reroute/components/pins/pins.component.mjs +2 -1
- package/15/esm2020/reflect.mjs +18 -0
- package/15/fesm2015/rete-angular-plugin-ng15.mjs +22 -2
- package/15/fesm2015/rete-angular-plugin-ng15.mjs.map +1 -1
- package/15/fesm2020/rete-angular-plugin-ng15.mjs +22 -2
- package/15/fesm2020/rete-angular-plugin-ng15.mjs.map +1 -1
- package/15/reflect.d.ts +1 -0
- package/16/esm2022/core.mjs +3 -3
- package/16/esm2022/presets/classic/components/node/node.component.mjs +1 -1
- package/16/esm2022/presets/context-menu/components/menu/menu.component.mjs +2 -1
- package/16/esm2022/presets/minimap/components/minimap/minimap.component.mjs +2 -1
- package/16/esm2022/presets/reroute/components/pins/pins.component.mjs +2 -1
- package/16/esm2022/reflect.mjs +18 -0
- package/16/fesm2022/rete-angular-plugin-ng16.mjs +22 -2
- package/16/fesm2022/rete-angular-plugin-ng16.mjs.map +1 -1
- package/16/reflect.d.ts +1 -0
- package/17/esm2022/core.mjs +3 -3
- package/17/esm2022/presets/classic/components/node/node.component.mjs +2 -2
- package/17/esm2022/presets/context-menu/components/menu/menu.component.mjs +3 -2
- package/17/esm2022/presets/minimap/components/minimap/minimap.component.mjs +3 -2
- package/17/esm2022/presets/reroute/components/pins/pins.component.mjs +3 -2
- package/17/esm2022/reflect.mjs +18 -0
- package/17/fesm2022/rete-angular-plugin-ng17.mjs +26 -6
- package/17/fesm2022/rete-angular-plugin-ng17.mjs.map +1 -1
- package/17/reflect.d.ts +1 -0
- package/18/esm2022/core.mjs +3 -3
- package/18/esm2022/presets/classic/components/node/node.component.mjs +2 -2
- package/18/esm2022/presets/context-menu/components/menu/menu.component.mjs +3 -2
- package/18/esm2022/presets/minimap/components/minimap/minimap.component.mjs +3 -2
- package/18/esm2022/presets/reroute/components/pins/pins.component.mjs +3 -2
- package/18/esm2022/reflect.mjs +18 -0
- package/18/fesm2022/rete-angular-plugin-ng18.mjs +26 -6
- package/18/fesm2022/rete-angular-plugin-ng18.mjs.map +1 -1
- package/18/reflect.d.ts +1 -0
- package/19/core.d.ts +68 -0
- package/19/fesm2022/rete-angular-plugin-ng18.mjs +1557 -0
- package/19/fesm2022/rete-angular-plugin-ng18.mjs.map +1 -0
- package/19/index.d.ts +13 -0
- package/19/module.d.ts +13 -0
- package/19/package.json +22 -0
- package/19/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
- package/19/presets/classic/components/connection/connection.component.d.ts +11 -0
- package/19/presets/classic/components/control/control.component.d.ts +14 -0
- package/19/presets/classic/components/index.d.ts +5 -0
- package/19/presets/classic/components/node/node.component.d.ts +25 -0
- package/19/presets/classic/components/socket/socket.component.d.ts +12 -0
- package/19/presets/classic/index.d.ts +21 -0
- package/19/presets/classic/types.d.ts +49 -0
- package/19/presets/context-menu/components/index.d.ts +3 -0
- package/19/presets/context-menu/components/item/item.component.d.ts +26 -0
- package/19/presets/context-menu/components/menu/menu.component.d.ts +27 -0
- package/19/presets/context-menu/components/search/search.component.d.ts +8 -0
- package/19/presets/context-menu/debounce.d.ts +5 -0
- package/19/presets/context-menu/index.d.ts +9 -0
- package/19/presets/context-menu/module.d.ts +10 -0
- package/19/presets/context-menu/types.d.ts +12 -0
- package/19/presets/index.d.ts +8 -0
- package/19/presets/minimap/components/index.d.ts +3 -0
- package/19/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
- package/19/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
- package/19/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
- package/19/presets/minimap/index.d.ts +9 -0
- package/19/presets/minimap/module.d.ts +10 -0
- package/19/presets/minimap/types.d.ts +22 -0
- package/19/presets/reroute/components/index.d.ts +2 -0
- package/19/presets/reroute/components/pin/pin.component.d.ts +30 -0
- package/19/presets/reroute/components/pins/pins.component.d.ts +17 -0
- package/19/presets/reroute/index.d.ts +13 -0
- package/19/presets/reroute/module.d.ts +9 -0
- package/19/presets/reroute/types.d.ts +18 -0
- package/19/presets/types.d.ts +15 -0
- package/19/ref.d.ts +12 -0
- package/19/reflect.d.ts +1 -0
- package/19/shared/drag.d.ts +10 -0
- package/19/types.d.ts +29 -0
- package/CHANGELOG.md +19 -0
- package/bundles/rete-angular-plugin.umd.js +26 -2
- package/bundles/rete-angular-plugin.umd.js.map +1 -1
- package/esm2015/core.js +3 -3
- package/esm2015/presets/classic/components/node/node.component.js +2 -1
- package/esm2015/presets/context-menu/components/menu/menu.component.js +3 -1
- package/esm2015/presets/minimap/components/minimap/minimap.component.js +3 -1
- package/esm2015/presets/reroute/components/pins/pins.component.js +3 -1
- package/esm2015/reflect.js +18 -0
- package/fesm2015/rete-angular-plugin.js +26 -2
- package/fesm2015/rete-angular-plugin.js.map +1 -1
- package/package.json +5 -5
- package/reflect.d.ts +1 -0
- package/rete-angular-plugin.metadata.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MinimapData } from '../../types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MiniViewportComponent {
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
containerWidth: number;
|
|
9
|
+
translate: MinimapData['translate'];
|
|
10
|
+
drag: {
|
|
11
|
+
start(e: {
|
|
12
|
+
pageX: number;
|
|
13
|
+
pageY: number;
|
|
14
|
+
}): void;
|
|
15
|
+
};
|
|
16
|
+
get styleLeft(): string;
|
|
17
|
+
get styleTop(): string;
|
|
18
|
+
get styleWidth(): string;
|
|
19
|
+
get styleHeight(): string;
|
|
20
|
+
pointerdown(event: PointerEvent): void;
|
|
21
|
+
px(value: number): string;
|
|
22
|
+
scale(v: number): number;
|
|
23
|
+
invert(v: number): number;
|
|
24
|
+
onDrag(dx: number, dy: number): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MiniViewportComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MiniViewportComponent, "minimap-mini-viewport", never, { "left": { "alias": "left"; "required": false; }; "top": { "alias": "top"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "containerWidth": { "alias": "containerWidth"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; }, {}, never, never, true, never>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnChanges, ElementRef } from '@angular/core';
|
|
2
|
+
import { MinimapData } from '../../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MinimapComponent implements OnChanges {
|
|
5
|
+
el: ElementRef;
|
|
6
|
+
private cdr;
|
|
7
|
+
rendered: () => void;
|
|
8
|
+
size: number;
|
|
9
|
+
ratio: MinimapData['ratio'];
|
|
10
|
+
nodes: MinimapData['nodes'];
|
|
11
|
+
viewport: MinimapData['viewport'];
|
|
12
|
+
translate: MinimapData['translate'];
|
|
13
|
+
point: MinimapData['point'];
|
|
14
|
+
get width(): string;
|
|
15
|
+
get height(): string;
|
|
16
|
+
pointerdown(event: PointerEvent): void;
|
|
17
|
+
dblclick(event: MouseEvent): void;
|
|
18
|
+
constructor(el: ElementRef, cdr: ChangeDetectorRef);
|
|
19
|
+
ngOnChanges(): void;
|
|
20
|
+
px(value: number): string;
|
|
21
|
+
scale(value: number): number;
|
|
22
|
+
identifyMiniNode(_: number, item: MinimapData['nodes'][number]): string;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MinimapComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MinimapComponent, "ng-component", never, { "rendered": { "alias": "rendered"; "required": false; }; "size": { "alias": "size"; "required": false; }; "ratio": { "alias": "ratio"; "required": false; }; "nodes": { "alias": "nodes"; "required": false; }; "viewport": { "alias": "viewport"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; "point": { "alias": "point"; "required": false; }; }, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseSchemes } from 'rete';
|
|
2
|
+
import { RenderPreset } from '../types';
|
|
3
|
+
import { MinimapRender } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Preset for rendering minimap.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setup<Schemes extends BaseSchemes, K extends MinimapRender>(props?: {
|
|
8
|
+
size?: number;
|
|
9
|
+
}): RenderPreset<Schemes, K>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
import * as i2 from "./components/minimap/minimap.component";
|
|
4
|
+
import * as i3 from "./components/mini-viewport/mini-viewport.component";
|
|
5
|
+
import * as i4 from "./components/mini-node/mini-node.component";
|
|
6
|
+
export declare class ReteMinimapModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReteMinimapModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ReteMinimapModule, never, [typeof i1.CommonModule, typeof i2.MinimapComponent, typeof i3.MiniViewportComponent, typeof i4.MiniNodeComponent], [typeof i2.MinimapComponent, typeof i3.MiniViewportComponent, typeof i4.MiniNodeComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ReteMinimapModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RenderSignal } from '../../types';
|
|
2
|
+
export type Rect = {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
};
|
|
8
|
+
export type Transform = {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
k: number;
|
|
12
|
+
};
|
|
13
|
+
export type Translate = (dx: number, dy: number) => void;
|
|
14
|
+
export type MinimapData = {
|
|
15
|
+
ratio: number;
|
|
16
|
+
nodes: Rect[];
|
|
17
|
+
viewport: Rect;
|
|
18
|
+
start(): Transform;
|
|
19
|
+
translate: Translate;
|
|
20
|
+
point(x: number, y: number): void;
|
|
21
|
+
};
|
|
22
|
+
export type MinimapRender = RenderSignal<'minimap', MinimapData>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnChanges, EventEmitter } from '@angular/core';
|
|
2
|
+
import { Position } from '../../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class PinComponent implements OnChanges {
|
|
5
|
+
private cdr;
|
|
6
|
+
position: Position;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
getPointer: () => Position;
|
|
9
|
+
menu: EventEmitter<void>;
|
|
10
|
+
translate: EventEmitter<{
|
|
11
|
+
dx: number;
|
|
12
|
+
dy: number;
|
|
13
|
+
}>;
|
|
14
|
+
down: EventEmitter<void>;
|
|
15
|
+
drag: {
|
|
16
|
+
start(e: {
|
|
17
|
+
pageX: number;
|
|
18
|
+
pageY: number;
|
|
19
|
+
}): void;
|
|
20
|
+
};
|
|
21
|
+
get _selected(): boolean;
|
|
22
|
+
get top(): string;
|
|
23
|
+
get left(): string;
|
|
24
|
+
pointerdown(event: PointerEvent): void;
|
|
25
|
+
contextmenu(event: MouseEvent): void;
|
|
26
|
+
constructor(cdr: ChangeDetectorRef);
|
|
27
|
+
ngOnChanges(): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PinComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PinComponent, "reroute-pin", never, { "position": { "alias": "position"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "getPointer": { "alias": "getPointer"; "required": false; }; }, { "menu": "menu"; "translate": "translate"; "down": "down"; }, never, never, true, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnChanges } from '@angular/core';
|
|
2
|
+
import { Pin, PinData, Position } from '../../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class PinsComponent implements OnChanges {
|
|
5
|
+
private cdr;
|
|
6
|
+
rendered: () => void;
|
|
7
|
+
pins: PinData['pins'];
|
|
8
|
+
down?: (id: string) => void;
|
|
9
|
+
translate?: (id: string, dx: number, dy: number) => void;
|
|
10
|
+
menu?: (id: string) => void;
|
|
11
|
+
getPointer?: () => Position;
|
|
12
|
+
constructor(cdr: ChangeDetectorRef);
|
|
13
|
+
ngOnChanges(): void;
|
|
14
|
+
track(_: number, item: Pin): string;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PinsComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PinsComponent, "ng-component", never, { "rendered": { "alias": "rendered"; "required": false; }; "pins": { "alias": "pins"; "required": false; }; "down": { "alias": "down"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; "getPointer": { "alias": "getPointer"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseSchemes } from 'rete';
|
|
2
|
+
import { RenderPreset } from '../types';
|
|
3
|
+
import { PinsRender } from './types';
|
|
4
|
+
type Props = {
|
|
5
|
+
translate?: (id: string, dx: number, dy: number) => void;
|
|
6
|
+
contextMenu?: (id: string) => void;
|
|
7
|
+
pointerdown?: (id: string) => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Preset for rendering pins.
|
|
11
|
+
*/
|
|
12
|
+
export declare function setup<Schemes extends BaseSchemes, K extends PinsRender>(props?: Props): RenderPreset<Schemes, K>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
import * as i2 from "./components/pins/pins.component";
|
|
4
|
+
import * as i3 from "./components/pin/pin.component";
|
|
5
|
+
export declare class ReteRerouteModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReteRerouteModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ReteRerouteModule, never, [typeof i1.CommonModule, typeof i2.PinsComponent, typeof i3.PinComponent], [typeof i2.PinsComponent, typeof i3.PinComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ReteRerouteModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ConnectionId } from 'rete';
|
|
2
|
+
import { RenderSignal } from '../../types';
|
|
3
|
+
export type Position = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
export type Pin = {
|
|
8
|
+
id: string;
|
|
9
|
+
position: Position;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type PinData = {
|
|
13
|
+
id: ConnectionId;
|
|
14
|
+
pins: Pin[];
|
|
15
|
+
};
|
|
16
|
+
export type PinsRender = RenderSignal<'reroute-pins', {
|
|
17
|
+
data: PinData;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseSchemes } from 'rete';
|
|
2
|
+
import { AngularPlugin } from '../core';
|
|
3
|
+
export type RenderPreset<Schemes extends BaseSchemes, T> = {
|
|
4
|
+
attach?: (plugin: AngularPlugin<Schemes, T>) => void;
|
|
5
|
+
update: (context: Extract<T, {
|
|
6
|
+
type: 'render';
|
|
7
|
+
}>, plugin: AngularPlugin<Schemes, T>) => Record<string, unknown> | undefined | null | void;
|
|
8
|
+
mount: (context: Extract<T, {
|
|
9
|
+
type: 'render';
|
|
10
|
+
}>, plugin: AngularPlugin<Schemes, T>) => {
|
|
11
|
+
key: string;
|
|
12
|
+
component: any;
|
|
13
|
+
props: Record<string, unknown>;
|
|
14
|
+
} | undefined | null | void;
|
|
15
|
+
};
|
package/19/ref.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ElementRef, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RefDirective implements OnChanges, OnDestroy {
|
|
4
|
+
private el;
|
|
5
|
+
data: any;
|
|
6
|
+
emit: any;
|
|
7
|
+
constructor(el: ElementRef);
|
|
8
|
+
ngOnChanges(): void;
|
|
9
|
+
ngOnDestroy(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RefDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RefDirective, "[refComponent]", never, { "data": { "alias": "data"; "required": false; }; "emit": { "alias": "emit"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
package/19/reflect.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function reflect(obj: unknown): unknown;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Position } from '../types';
|
|
2
|
+
type Translate = (dx: number, dy: number) => void;
|
|
3
|
+
type StartEvent = {
|
|
4
|
+
pageX: number;
|
|
5
|
+
pageY: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function useDrag(translate: Translate, getPointer: (e: StartEvent) => Position): {
|
|
8
|
+
start(e: StartEvent): void;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
package/19/types.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { NgElement as NgEl, NgElementStrategy } from '@angular/elements';
|
|
2
|
+
export type NgElement = NgEl & {
|
|
3
|
+
ngElementStrategy: NgElementStrategy & {
|
|
4
|
+
setInputValue(key: string, value: any): void;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export type NodeProps = {
|
|
8
|
+
data: any;
|
|
9
|
+
rendered: any;
|
|
10
|
+
emit: any;
|
|
11
|
+
} & NgElement;
|
|
12
|
+
export type Position = {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
export type RenderSignal<Type extends string, Data> = {
|
|
17
|
+
type: 'render';
|
|
18
|
+
data: {
|
|
19
|
+
element: HTMLElement;
|
|
20
|
+
filled?: boolean;
|
|
21
|
+
type: Type;
|
|
22
|
+
} & Data;
|
|
23
|
+
} | {
|
|
24
|
+
type: 'rendered';
|
|
25
|
+
data: {
|
|
26
|
+
element: HTMLElement;
|
|
27
|
+
type: Type;
|
|
28
|
+
} & Data;
|
|
29
|
+
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [2.3.0](https://github.com/retejs/angular-plugin/compare/v2.2.1...v2.3.0) (2024-12-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update in angular 19 ([e77caef](https://github.com/retejs/angular-plugin/commit/e77caef983586bf1fe808337421a43f2ff9a72b3))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* support angular 19 ([3b517a7](https://github.com/retejs/angular-plugin/commit/3b517a7a729334d2cfd264018cc9739619f50911))
|
|
12
|
+
|
|
13
|
+
## [2.2.1](https://github.com/retejs/angular-plugin/compare/v2.2.0...v2.2.1) (2024-09-14)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* fix peer dependencies constraints ([5870f77](https://github.com/retejs/angular-plugin/commit/5870f773b4029d211f99af1490af12196e3b0ccb))
|
|
19
|
+
|
|
1
20
|
# [2.2.0](https://github.com/retejs/angular-plugin/compare/v2.1.2...v2.2.0) (2024-09-14)
|
|
2
21
|
|
|
3
22
|
|
|
@@ -432,6 +432,7 @@
|
|
|
432
432
|
}());
|
|
433
433
|
NodeComponent.decorators = [
|
|
434
434
|
{ type: core.Component, args: [{
|
|
435
|
+
// [component-directive]
|
|
435
436
|
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",
|
|
436
437
|
host: {
|
|
437
438
|
'data-testid': 'node'
|
|
@@ -802,6 +803,7 @@
|
|
|
802
803
|
};
|
|
803
804
|
}
|
|
804
805
|
|
|
806
|
+
// [imports]
|
|
805
807
|
var ContextMenuComponent = /** @class */ (function () {
|
|
806
808
|
function ContextMenuComponent(cdr) {
|
|
807
809
|
var _this = this;
|
|
@@ -844,6 +846,7 @@
|
|
|
844
846
|
}());
|
|
845
847
|
ContextMenuComponent.decorators = [
|
|
846
848
|
{ type: core.Component, args: [{
|
|
849
|
+
// [component-directive]
|
|
847
850
|
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",
|
|
848
851
|
host: {
|
|
849
852
|
'data-testid': 'context-menu'
|
|
@@ -910,6 +913,7 @@
|
|
|
910
913
|
setup: setup$2
|
|
911
914
|
});
|
|
912
915
|
|
|
916
|
+
// [imports]
|
|
913
917
|
var MinimapComponent = /** @class */ (function () {
|
|
914
918
|
function MinimapComponent(el, cdr) {
|
|
915
919
|
this.el = el;
|
|
@@ -964,6 +968,7 @@
|
|
|
964
968
|
}());
|
|
965
969
|
MinimapComponent.decorators = [
|
|
966
970
|
{ type: core.Component, args: [{
|
|
971
|
+
// [component-directive]
|
|
967
972
|
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",
|
|
968
973
|
host: {
|
|
969
974
|
'data-testid': 'minimap'
|
|
@@ -1038,6 +1043,7 @@
|
|
|
1038
1043
|
setup: setup$1
|
|
1039
1044
|
});
|
|
1040
1045
|
|
|
1046
|
+
// [imports]
|
|
1041
1047
|
var PinsComponent = /** @class */ (function () {
|
|
1042
1048
|
function PinsComponent(cdr) {
|
|
1043
1049
|
this.cdr = cdr;
|
|
@@ -1055,6 +1061,7 @@
|
|
|
1055
1061
|
}());
|
|
1056
1062
|
PinsComponent.decorators = [
|
|
1057
1063
|
{ type: core.Component, args: [{
|
|
1064
|
+
// [component-directive]
|
|
1058
1065
|
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"
|
|
1059
1066
|
},] }
|
|
1060
1067
|
];
|
|
@@ -1576,6 +1583,24 @@
|
|
|
1576
1583
|
},] }
|
|
1577
1584
|
];
|
|
1578
1585
|
|
|
1586
|
+
function reflect(obj) {
|
|
1587
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
1588
|
+
return obj;
|
|
1589
|
+
}
|
|
1590
|
+
return new Proxy(obj, {
|
|
1591
|
+
get: function (target, prop) {
|
|
1592
|
+
return target[prop];
|
|
1593
|
+
},
|
|
1594
|
+
set: function (target, prop, value) {
|
|
1595
|
+
target[prop] = value;
|
|
1596
|
+
return true;
|
|
1597
|
+
},
|
|
1598
|
+
has: function (target, prop) { return prop in target; },
|
|
1599
|
+
deleteProperty: function (target, prop) { return delete target[prop]; },
|
|
1600
|
+
ownKeys: function (target) { return Reflect.ownKeys(target); }
|
|
1601
|
+
});
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1579
1604
|
function getRenderer() {
|
|
1580
1605
|
var elements$1 = new WeakMap();
|
|
1581
1606
|
return {
|
|
@@ -1598,9 +1623,8 @@
|
|
|
1598
1623
|
update: function (_a, props) {
|
|
1599
1624
|
var ngElement = _a.ngElement;
|
|
1600
1625
|
Object.keys(props).forEach(function (key) {
|
|
1601
|
-
ngElement.ngElementStrategy.setInputValue(key, props[key]);
|
|
1626
|
+
ngElement.ngElementStrategy.setInputValue(key, reflect(props[key]));
|
|
1602
1627
|
});
|
|
1603
|
-
ngElement.ngElementStrategy.setInputValue('seed', Math.random());
|
|
1604
1628
|
},
|
|
1605
1629
|
unmount: function (element) {
|
|
1606
1630
|
var existing = elements$1.get(element);
|