nuxeo-development-framework 4.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/nuxeo-development-framework.umd.js +1661 -81
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/diagrams/components/base-node.component.js +41 -0
- package/esm2015/lib/components/diagrams/components/circle-node/circle-node.component.js +20 -0
- package/esm2015/lib/components/diagrams/components/content-node/content-node.component.js +21 -0
- package/esm2015/lib/components/diagrams/components/custom-connection.component.js +48 -0
- package/esm2015/lib/components/diagrams/components/custom-socket.component.js +34 -0
- package/esm2015/lib/components/diagrams/components/index.js +12 -0
- package/esm2015/lib/components/diagrams/components/node-icon.component.js +35 -0
- package/esm2015/lib/components/diagrams/components/node-inputs.component.js +62 -0
- package/esm2015/lib/components/diagrams/components/node-outputs.component.js +58 -0
- package/esm2015/lib/components/diagrams/components/remove-button.component.js +65 -0
- package/esm2015/lib/components/diagrams/components/status-icon.component.js +37 -0
- package/esm2015/lib/components/diagrams/components/template-node/template-node.component.js +41 -0
- package/esm2015/lib/components/diagrams/components/zoom-control.component.js +62 -0
- package/esm2015/lib/components/diagrams/constants/defaults.js +19 -0
- package/esm2015/lib/components/diagrams/constants/direction.js +7 -0
- package/esm2015/lib/components/diagrams/constants/index.js +8 -0
- package/esm2015/lib/components/diagrams/constants/message-type.js +5 -0
- package/esm2015/lib/components/diagrams/constants/node-type.js +7 -0
- package/esm2015/lib/components/diagrams/constants/notify-events.js +4 -0
- package/esm2015/lib/components/diagrams/constants/sizes.js +7 -0
- package/esm2015/lib/components/diagrams/constants/status.js +9 -0
- package/esm2015/lib/components/diagrams/diagrams.module.js +73 -0
- package/esm2015/lib/components/diagrams/directive/diagram.directive.js +83 -0
- package/esm2015/lib/components/diagrams/directive/index.js +2 -0
- package/esm2015/lib/components/diagrams/editor/customize.js +58 -0
- package/esm2015/lib/components/diagrams/editor/editor.js +95 -0
- package/esm2015/lib/components/diagrams/editor/index.js +5 -0
- package/esm2015/lib/components/diagrams/editor/overrides/connection-path.transformers.js +25 -0
- package/esm2015/lib/components/diagrams/editor/overrides/index.js +2 -0
- package/esm2015/lib/components/diagrams/editor/path-plugin.js +17 -0
- package/esm2015/lib/components/diagrams/editor/socket-position-watcher.js +7 -0
- package/esm2015/lib/components/diagrams/index.js +2 -0
- package/esm2015/lib/components/diagrams/models/base-node.model.js +25 -0
- package/esm2015/lib/components/diagrams/models/circle-node.model.js +10 -0
- package/esm2015/lib/components/diagrams/models/connection.model.js +8 -0
- package/esm2015/lib/components/diagrams/models/content-node.model.js +7 -0
- package/esm2015/lib/components/diagrams/models/index.js +7 -0
- package/esm2015/lib/components/diagrams/models/socket.model.js +8 -0
- package/esm2015/lib/components/diagrams/models/template-node.model.js +12 -0
- package/esm2015/lib/components/diagrams/public-api.js +9 -0
- package/esm2015/lib/components/diagrams/services/diagram-plugins.service.js +19 -0
- package/esm2015/lib/components/diagrams/services/diagram.service.js +174 -0
- package/esm2015/lib/components/diagrams/services/index.js +5 -0
- package/esm2015/lib/components/diagrams/services/message.service.js +24 -0
- package/esm2015/lib/components/diagrams/services/workflow.service.js +244 -0
- package/esm2015/lib/components/diagrams/types/common.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/customization.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/diagram-config.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/diagram-editor.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/emitter-type.js +2 -0
- package/esm2015/lib/components/diagrams/types/index.js +14 -0
- package/esm2015/lib/components/diagrams/types/layout.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/node-content.js +2 -0
- package/esm2015/lib/components/diagrams/types/node-definition.js +2 -0
- package/esm2015/lib/components/diagrams/types/node-status.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/node.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/notify-event.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/path.type.js +2 -0
- package/esm2015/lib/components/diagrams/types/schemes.type.js +2 -0
- package/esm2015/lib/components/diagrams/utilities/index.js +3 -0
- package/esm2015/lib/components/diagrams/utilities/remove.util.js +95 -0
- package/esm2015/lib/components/diagrams/utilities/serialize.js +23 -0
- package/esm2015/lib/components/documents/components/document-scan/document-scan.component.js +2 -1
- package/esm2015/lib/components/dynamic-form/components/dynamic-form-department/services/department-api.service.js +25 -2
- package/esm2015/public-api.js +3 -2
- package/fesm2015/nuxeo-development-framework.js +1561 -75
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/diagrams/components/base-node.component.d.ts +29 -0
- package/lib/components/diagrams/components/circle-node/circle-node.component.d.ts +7 -0
- package/lib/components/diagrams/components/content-node/content-node.component.d.ts +8 -0
- package/lib/components/diagrams/components/custom-connection.component.d.ts +8 -0
- package/lib/components/diagrams/components/custom-socket.component.d.ts +6 -0
- package/lib/components/diagrams/components/index.d.ts +11 -0
- package/lib/components/diagrams/components/node-icon.component.d.ts +8 -0
- package/lib/components/diagrams/components/node-inputs.component.d.ts +12 -0
- package/lib/components/diagrams/components/node-outputs.component.d.ts +12 -0
- package/lib/components/diagrams/components/remove-button.component.d.ts +7 -0
- package/lib/components/diagrams/components/status-icon.component.d.ts +8 -0
- package/lib/components/diagrams/components/template-node/template-node.component.d.ts +17 -0
- package/lib/components/diagrams/components/zoom-control.component.d.ts +11 -0
- package/lib/components/diagrams/constants/defaults.d.ts +2 -0
- package/lib/components/diagrams/constants/direction.d.ts +6 -0
- package/lib/components/diagrams/constants/index.d.ts +7 -0
- package/lib/components/diagrams/constants/message-type.d.ts +4 -0
- package/lib/components/diagrams/constants/node-type.d.ts +6 -0
- package/lib/components/diagrams/constants/notify-events.d.ts +3 -0
- package/lib/components/diagrams/constants/sizes.d.ts +6 -0
- package/lib/components/diagrams/constants/status.d.ts +8 -0
- package/lib/components/diagrams/diagrams.module.d.ts +25 -0
- package/lib/components/diagrams/directive/diagram.directive.d.ts +27 -0
- package/lib/components/diagrams/directive/index.d.ts +1 -0
- package/lib/components/diagrams/editor/customize.d.ts +25 -0
- package/lib/components/diagrams/editor/editor.d.ts +3 -0
- package/lib/components/diagrams/editor/index.d.ts +4 -0
- package/lib/components/diagrams/editor/overrides/connection-path.transformers.d.ts +7 -0
- package/lib/components/diagrams/editor/overrides/index.d.ts +1 -0
- package/lib/components/diagrams/editor/path-plugin.d.ts +4 -0
- package/lib/components/diagrams/editor/socket-position-watcher.d.ts +3 -0
- package/lib/components/diagrams/index.d.ts +1 -0
- package/lib/components/diagrams/models/base-node.model.d.ts +21 -0
- package/lib/components/diagrams/models/circle-node.model.d.ts +7 -0
- package/lib/components/diagrams/models/connection.model.d.ts +8 -0
- package/lib/components/diagrams/models/content-node.model.d.ts +5 -0
- package/lib/components/diagrams/models/index.d.ts +6 -0
- package/lib/components/diagrams/models/socket.model.d.ts +5 -0
- package/lib/components/diagrams/models/template-node.model.d.ts +8 -0
- package/lib/components/diagrams/public-api.d.ts +8 -0
- package/lib/components/diagrams/services/diagram-plugins.service.d.ts +16 -0
- package/lib/components/diagrams/services/diagram.service.d.ts +42 -0
- package/lib/components/diagrams/services/index.d.ts +4 -0
- package/lib/components/diagrams/services/message.service.d.ts +10 -0
- package/lib/components/diagrams/services/workflow.service.d.ts +81 -0
- package/lib/components/diagrams/types/common.type.d.ts +4 -0
- package/lib/components/diagrams/types/customization.type.d.ts +10 -0
- package/lib/components/diagrams/types/diagram-config.type.d.ts +36 -0
- package/lib/components/diagrams/types/diagram-editor.type.d.ts +25 -0
- package/lib/components/diagrams/types/emitter-type.d.ts +5 -0
- package/lib/components/diagrams/types/index.d.ts +13 -0
- package/lib/components/diagrams/types/layout.type.d.ts +13 -0
- package/lib/components/diagrams/types/node-content.d.ts +9 -0
- package/lib/components/diagrams/types/node-definition.d.ts +19 -0
- package/lib/components/diagrams/types/node-status.type.d.ts +2 -0
- package/lib/components/diagrams/types/node.type.d.ts +2 -0
- package/lib/components/diagrams/types/notify-event.type.d.ts +2 -0
- package/lib/components/diagrams/types/path.type.d.ts +17 -0
- package/lib/components/diagrams/types/schemes.type.d.ts +3 -0
- package/lib/components/diagrams/utilities/index.d.ts +2 -0
- package/lib/components/diagrams/utilities/remove.util.d.ts +30 -0
- package/lib/components/diagrams/utilities/serialize.d.ts +15 -0
- package/lib/components/dynamic-form/components/dynamic-form-department/services/department-api.service.d.ts +1 -0
- package/package.json +14 -2
- package/public-api.d.ts +2 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { NodeComponent } from 'rete-angular-plugin';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { BaseNodeClass, ContentNode } from '../models';
|
|
5
|
+
import { MessageService } from '../services';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class BaseNodeComponent<TData extends BaseNodeClass = ContentNode> extends NodeComponent implements OnDestroy {
|
|
8
|
+
private _messageService;
|
|
9
|
+
data: TData;
|
|
10
|
+
_cdr: ChangeDetectorRef;
|
|
11
|
+
nodeTypes: {
|
|
12
|
+
readonly start: "start";
|
|
13
|
+
readonly content: "content";
|
|
14
|
+
readonly template: "template";
|
|
15
|
+
readonly end: "end";
|
|
16
|
+
};
|
|
17
|
+
directions: {
|
|
18
|
+
readonly start: "start";
|
|
19
|
+
readonly end: "end";
|
|
20
|
+
readonly top: "top";
|
|
21
|
+
readonly bottom: "bottom";
|
|
22
|
+
};
|
|
23
|
+
destroy$: Subject<void>;
|
|
24
|
+
constructor(cdr: ChangeDetectorRef, _messageService: MessageService);
|
|
25
|
+
removeNode(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseNodeComponent<any>, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseNodeComponent<any>, "ng-component", never, { "data": "data"; }, {}, never, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CircleNode } from '../../models';
|
|
2
|
+
import { BaseNodeComponent } from '../base-node.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CircleNodeComponent extends BaseNodeComponent<CircleNode> {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CircleNodeComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CircleNodeComponent, "ng-component", never, {}, {}, never, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import { ContentNode } from '../../models';
|
|
3
|
+
import { BaseNodeComponent } from '../base-node.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ContentNodeComponent extends BaseNodeComponent<ContentNode<any>> implements OnChanges {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContentNodeComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContentNodeComponent, "ng-component", never, {}, {}, never, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConnectionComponent } from 'rete-angular-plugin';
|
|
2
|
+
import { Connection } from '../models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CustomConnectionComponent extends ConnectionComponent {
|
|
5
|
+
data: Connection;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomConnectionComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomConnectionComponent, "connection", never, { "data": "data"; }, {}, never, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SocketComponent } from 'rete-angular-plugin';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CustomSocketComponent extends SocketComponent {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomSocketComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomSocketComponent, "ng-component", never, {}, {}, never, never>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './circle-node/circle-node.component';
|
|
2
|
+
export * from './content-node/content-node.component';
|
|
3
|
+
export * from './custom-connection.component';
|
|
4
|
+
export * from './custom-socket.component';
|
|
5
|
+
export * from './node-icon.component';
|
|
6
|
+
export * from './node-inputs.component';
|
|
7
|
+
export * from './node-outputs.component';
|
|
8
|
+
export * from './remove-button.component';
|
|
9
|
+
export * from './status-icon.component';
|
|
10
|
+
export * from './template-node/template-node.component';
|
|
11
|
+
export * from './zoom-control.component';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NodeIconComponent {
|
|
4
|
+
icon: string | TemplateRef<any>;
|
|
5
|
+
isIconTemplate(icon: string | TemplateRef<any>): boolean;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeIconComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NodeIconComponent, "node-icon", never, { "icon": "icon"; }, {}, never, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseNodeClass } from '../models';
|
|
2
|
+
import { DirectionType } from '../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NodeInputsComponent {
|
|
5
|
+
direction: DirectionType;
|
|
6
|
+
data: BaseNodeClass;
|
|
7
|
+
seed: number;
|
|
8
|
+
emit: (data: any) => void;
|
|
9
|
+
sortByIndex: (a: unknown, b: unknown) => number;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeInputsComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NodeInputsComponent, "node-inputs", never, { "direction": "direction"; "data": "data"; "seed": "seed"; "emit": "emit"; "sortByIndex": "sortByIndex"; }, {}, never, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseNodeClass } from '../models';
|
|
2
|
+
import { DirectionType } from '../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NodeOutputsComponent {
|
|
5
|
+
direction: DirectionType;
|
|
6
|
+
data: BaseNodeClass;
|
|
7
|
+
seed: number;
|
|
8
|
+
emit: (data: any) => void;
|
|
9
|
+
sortByIndex: (a: unknown, b: unknown) => number;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeOutputsComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NodeOutputsComponent, "node-outputs", never, { "direction": "direction"; "data": "data"; "seed": "seed"; "emit": "emit"; "sortByIndex": "sortByIndex"; }, {}, never, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RemoveButtonComponent {
|
|
4
|
+
remove: EventEmitter<any>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoveButtonComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RemoveButtonComponent, "node-remove-button", never, {}, { "remove": "remove"; }, never, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NodeStatus } from '../types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class StatusIconComponent {
|
|
4
|
+
status: NodeStatus;
|
|
5
|
+
getIcon(): "" | "cancel" | "check_circle";
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StatusIconComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StatusIconComponent, "status-icon", never, { "status": "status"; }, {}, never, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TemplateNode } from '../../models';
|
|
2
|
+
import { BaseNodeComponent } from '../base-node.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TemplateNodeComponent extends BaseNodeComponent<TemplateNode> {
|
|
5
|
+
ngOnInit(): void;
|
|
6
|
+
get templateOutletContext(): {
|
|
7
|
+
$implicit: {
|
|
8
|
+
content: import("nuxeo-development-framework").NodeContent<Record<string, any>>;
|
|
9
|
+
description: string;
|
|
10
|
+
name: string;
|
|
11
|
+
status: string;
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TemplateNodeComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TemplateNodeComponent, "ng-component", never, {}, {}, never, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DiagramPluginsService } from '../services';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ZoomControlComponent {
|
|
4
|
+
_plugins: DiagramPluginsService;
|
|
5
|
+
private delta;
|
|
6
|
+
constructor(_plugins: DiagramPluginsService);
|
|
7
|
+
zoomOut(): void;
|
|
8
|
+
zoomIn(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZoomControlComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZoomControlComponent, "app-zoom-control", never, {}, {}, never, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./components/circle-node/circle-node.component";
|
|
3
|
+
import * as i2 from "./components/content-node/content-node.component";
|
|
4
|
+
import * as i3 from "./components/custom-connection.component";
|
|
5
|
+
import * as i4 from "./components/custom-socket.component";
|
|
6
|
+
import * as i5 from "./components/template-node/template-node.component";
|
|
7
|
+
import * as i6 from "./directive/diagram.directive";
|
|
8
|
+
import * as i7 from "./components/remove-button.component";
|
|
9
|
+
import * as i8 from "./components/zoom-control.component";
|
|
10
|
+
import * as i9 from "./components/node-icon.component";
|
|
11
|
+
import * as i10 from "./components/status-icon.component";
|
|
12
|
+
import * as i11 from "./components/node-inputs.component";
|
|
13
|
+
import * as i12 from "./components/node-outputs.component";
|
|
14
|
+
import * as i13 from "@angular/common";
|
|
15
|
+
import * as i14 from "rete-angular-plugin";
|
|
16
|
+
import * as i15 from "@angular/material/button";
|
|
17
|
+
import * as i16 from "@angular/material/icon";
|
|
18
|
+
import * as i17 from "@angular/forms";
|
|
19
|
+
import * as i18 from "@ngx-translate/core";
|
|
20
|
+
import * as i19 from "@angular/material/tooltip";
|
|
21
|
+
export declare class DiagramsModule {
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramsModule, never>;
|
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DiagramsModule, [typeof i1.CircleNodeComponent, typeof i2.ContentNodeComponent, typeof i3.CustomConnectionComponent, typeof i4.CustomSocketComponent, typeof i5.TemplateNodeComponent, typeof i6.DiagramDirective, typeof i7.RemoveButtonComponent, typeof i8.ZoomControlComponent, typeof i9.NodeIconComponent, typeof i10.StatusIconComponent, typeof i11.NodeInputsComponent, typeof i12.NodeOutputsComponent], [typeof i13.CommonModule, typeof i14.ReteModule, typeof i15.MatButtonModule, typeof i16.MatIconModule, typeof i17.FormsModule, typeof i18.TranslateModule, typeof i19.MatTooltipModule], [typeof i6.DiagramDirective, typeof i8.ZoomControlComponent]>;
|
|
24
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DiagramsModule>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AfterViewInit, ComponentFactoryResolver, ElementRef, EventEmitter, Injector, OnInit, Renderer2, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { DiagramPluginsService, DiagramService } from '../services';
|
|
3
|
+
import { DiagramConfig, DiagramEditorWithPlugins } from '../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DiagramDirective implements AfterViewInit, OnInit {
|
|
6
|
+
private _elementRef;
|
|
7
|
+
private _renderer;
|
|
8
|
+
private _injector;
|
|
9
|
+
private _viewContainerRef;
|
|
10
|
+
private _resolver;
|
|
11
|
+
private _diagramService;
|
|
12
|
+
private _pluginsService;
|
|
13
|
+
height: string;
|
|
14
|
+
width: string;
|
|
15
|
+
config: DiagramConfig;
|
|
16
|
+
zoomCtrl: boolean;
|
|
17
|
+
onDiagramReady: EventEmitter<DiagramEditorWithPlugins>;
|
|
18
|
+
diagramEditor: DiagramEditorWithPlugins;
|
|
19
|
+
constructor(_elementRef: ElementRef, _renderer: Renderer2, _injector: Injector, _viewContainerRef: ViewContainerRef, _resolver: ComponentFactoryResolver, _diagramService: DiagramService, _pluginsService: DiagramPluginsService);
|
|
20
|
+
get clientRect(): DOMRect;
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
private _appendZoomComponent;
|
|
23
|
+
ngAfterViewInit(): Promise<void>;
|
|
24
|
+
private _appendStyles;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramDirective, never>;
|
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DiagramDirective, "[appDiagram]", ["diagram"], { "height": "height"; "width": "width"; "config": "config"; "zoomCtrl": "zoomCtrl"; }, { "onDiagramReady": "onDiagramReady"; }, never>;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './diagram.directive';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NodeEditor } from 'rete';
|
|
2
|
+
import { ExtractPayload } from 'rete-angular-plugin/presets/classic/types';
|
|
3
|
+
import { ContentNode } from '../models';
|
|
4
|
+
import { AngularComponent, DiagramConfig, NodeDefinitionData, NodeType, Schemes } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param config
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare const customizeSocket: (config: DiagramConfig) => (data: ExtractPayload<Schemes, 'socket'>) => AngularComponent | null;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param config
|
|
14
|
+
* @param editor
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare const customizeNode: (config: DiagramConfig, editor: NodeEditor<Schemes>) => (data: ExtractPayload<Schemes, 'node'>) => AngularComponent | null;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param config
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export declare const customizeConnection: (config: DiagramConfig) => (data: ExtractPayload<Schemes, 'connection'>) => AngularComponent | null;
|
|
24
|
+
export declare const initNodeByType: (type: NodeType, config: NodeDefinitionData) => ContentNode<unknown>;
|
|
25
|
+
export declare const initAngularComponentByType: (type: NodeType) => AngularComponent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Position } from 'rete-connection-plugin/_types/types';
|
|
2
|
+
import { Connection } from '../../models';
|
|
3
|
+
export declare type Transformer = (points: Position[]) => Position[];
|
|
4
|
+
export declare const createSegmentedPath: (connection: Connection, options: {
|
|
5
|
+
multiPoints?: boolean;
|
|
6
|
+
offset?: number;
|
|
7
|
+
}) => Transformer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './connection-path.transformers';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Area2D } from 'rete-area-plugin';
|
|
2
|
+
import { ConnectionPathPlugin } from 'rete-connection-path-plugin';
|
|
3
|
+
import { PathPluginConfig, Schemes } from '../types';
|
|
4
|
+
export declare const initPathPlugin: (config?: PathPluginConfig) => ConnectionPathPlugin<Schemes, Area2D<Schemes>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { ClassicPreset } from 'rete';
|
|
3
|
+
import { DiagramConfig, DirectionType, NodeContent, NodeDefinitionData, NodeType, NotifyEventType, Optional } from '../types';
|
|
4
|
+
export declare abstract class BaseNodeClass<T = unknown> extends ClassicPreset.Node implements NodeDefinitionData {
|
|
5
|
+
label: string;
|
|
6
|
+
template?: TemplateRef<any>;
|
|
7
|
+
name?: Optional<string>;
|
|
8
|
+
description?: Optional<string>;
|
|
9
|
+
type: NodeType;
|
|
10
|
+
status?: string;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
content?: Optional<NodeContent<Record<string, any>>>;
|
|
14
|
+
parent?: Optional<string>;
|
|
15
|
+
config?: Optional<DiagramConfig['node']>;
|
|
16
|
+
children?: BaseNodeClass<T>[];
|
|
17
|
+
styleClass?: string;
|
|
18
|
+
directions: Record<'inputs' | 'outputs', DirectionType>;
|
|
19
|
+
notify: (eventType: NotifyEventType, payload: Record<string, any>) => void;
|
|
20
|
+
constructor(config: NodeDefinitionData);
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CurveFactory } from 'd3-shape';
|
|
2
|
+
import { ClassicPreset } from 'rete';
|
|
3
|
+
import { BaseNodeClass } from './base-node.model';
|
|
4
|
+
export declare class Connection<NOD extends BaseNodeClass = BaseNodeClass> extends ClassicPreset.Connection<NOD, NOD> {
|
|
5
|
+
curve?: CurveFactory;
|
|
6
|
+
renderType?: 'default' | 'custom';
|
|
7
|
+
status?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { NodeDefinitionData } from '../types';
|
|
3
|
+
import { BaseNodeClass } from './base-node.model';
|
|
4
|
+
export declare class TemplateNode<T = unknown> extends BaseNodeClass<T> {
|
|
5
|
+
template: TemplateRef<T>;
|
|
6
|
+
type: "template";
|
|
7
|
+
constructor(config: NodeDefinitionData);
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AreaPlugin } from 'rete-area-plugin';
|
|
2
|
+
import { AutoArrangePlugin } from 'rete-auto-arrange-plugin';
|
|
3
|
+
import { ReroutePlugin } from 'rete-connection-reroute-plugin';
|
|
4
|
+
import { ReadonlyPlugin } from 'rete-readonly-plugin';
|
|
5
|
+
import { AreaExtra, DiagramEditorWithPlugins, Schemes } from '../types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DiagramPluginsService {
|
|
8
|
+
area: AreaPlugin<Schemes, AreaExtra>;
|
|
9
|
+
readonly: ReadonlyPlugin<Schemes>;
|
|
10
|
+
arrange: AutoArrangePlugin<Schemes, never>;
|
|
11
|
+
reroute: ReroutePlugin<Schemes>;
|
|
12
|
+
setPlugins({ plugins, layout }: DiagramEditorWithPlugins): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramPluginsService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DiagramPluginsService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ClassicPreset, NodeEditor } from 'rete';
|
|
2
|
+
import { BaseNodeClass, Connection, ContentNode } from '../models';
|
|
3
|
+
import { DiagramEditorWithPlugins, NodeDefinitionData, NodeType, NotifyEventType, Schemes } from '../types';
|
|
4
|
+
import { DiagramPluginsService } from './diagram-plugins.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DiagramService {
|
|
7
|
+
plugins: DiagramPluginsService;
|
|
8
|
+
private _editorSub;
|
|
9
|
+
editor: NodeEditor<Schemes>;
|
|
10
|
+
socket: ClassicPreset.Socket;
|
|
11
|
+
onReady$: import("rxjs").Observable<DiagramEditorWithPlugins>;
|
|
12
|
+
destroy: () => void;
|
|
13
|
+
fitToZoom: () => void;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
constructor(plugins: DiagramPluginsService);
|
|
18
|
+
setEditor(editor: DiagramEditorWithPlugins): void;
|
|
19
|
+
getContentNodes(): ContentNode<unknown>[];
|
|
20
|
+
getNodesData(): Record<string, any>[];
|
|
21
|
+
canAddNode(nodeType: NodeType): boolean;
|
|
22
|
+
addNode(node: BaseNodeClass): Promise<void>;
|
|
23
|
+
createNode<T extends BaseNodeClass = ContentNode>(type: NodeType, config: NodeDefinitionData): T;
|
|
24
|
+
shouldAddStart(nodeType: string): boolean;
|
|
25
|
+
getLastNode(): ContentNode<unknown>;
|
|
26
|
+
getNodesByType(type: NodeType): ContentNode<unknown>[];
|
|
27
|
+
getLastViewNode(): import("rete-area-plugin").NodeView;
|
|
28
|
+
createInputs(node: BaseNodeClass): BaseNodeClass<unknown>;
|
|
29
|
+
createOutputs(node: BaseNodeClass): BaseNodeClass<unknown>;
|
|
30
|
+
addConnection(sourceNode: BaseNodeClass, targetNode: BaseNodeClass): Promise<void>;
|
|
31
|
+
createConnection(sourceNode: BaseNodeClass, targetNode: BaseNodeClass): Connection<BaseNodeClass<unknown>>;
|
|
32
|
+
appendConnection(connection: Connection): Promise<void>;
|
|
33
|
+
clear(): Promise<boolean>;
|
|
34
|
+
redraw(): void;
|
|
35
|
+
notifyListener(node: BaseNodeClass): (eventType: NotifyEventType, payload: NotifyEventType extends 'remove' ? {
|
|
36
|
+
nodeId: string;
|
|
37
|
+
} : Record<string, any>) => any;
|
|
38
|
+
private _removeNode;
|
|
39
|
+
translateView(): Promise<void>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramService, never>;
|
|
41
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DiagramService>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { MessageType } from '../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MessageService {
|
|
5
|
+
private messageSubject;
|
|
6
|
+
sendMessage(key: MessageType, payload: any): void;
|
|
7
|
+
onMessage(key: MessageType): Observable<any>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MessageService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { NodeEditor } from 'rete';
|
|
2
|
+
import { DiagramConfig, NodeContent, NodeType, Schemes } from '../types';
|
|
3
|
+
import { DiagramPluginsService } from './diagram-plugins.service';
|
|
4
|
+
import { DiagramService } from './diagram.service';
|
|
5
|
+
import { MessageService } from './message.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class WorkflowService {
|
|
8
|
+
private _diagram;
|
|
9
|
+
private _plugins;
|
|
10
|
+
private _message;
|
|
11
|
+
private _config;
|
|
12
|
+
private _defaultNodeHeight;
|
|
13
|
+
private _defaultNodeWidth;
|
|
14
|
+
private _defaultNodeCircleSize;
|
|
15
|
+
private _defaultNodeMargin;
|
|
16
|
+
private _offset;
|
|
17
|
+
constructor(_diagram: DiagramService, _plugins: DiagramPluginsService, _message: MessageService);
|
|
18
|
+
private get _diagramClientRect();
|
|
19
|
+
setConfig(_config: DiagramConfig): void;
|
|
20
|
+
addNode<T = any>(nodeType: NodeType, data: NodeContent<T>): Promise<void>;
|
|
21
|
+
removeEndNode(): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @param _node
|
|
25
|
+
* @param lastNode
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
private _calculatePosition;
|
|
29
|
+
private _createNode;
|
|
30
|
+
addWrapNodesPipe(editor: NodeEditor<Schemes>): void;
|
|
31
|
+
private _changeNodeSocketPosition;
|
|
32
|
+
private _linkToLastNode;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
private _isReadonlyDisabled;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
private _isReadonlyEnabled;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param position
|
|
46
|
+
*/
|
|
47
|
+
addStartNode(position: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
}): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @param nodeType
|
|
54
|
+
* @param y
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
private _calculatePositionY;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @param nodeType
|
|
61
|
+
* @param lastNodePositionX
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
private _calculatePositionX;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @param node
|
|
68
|
+
* @param previousNode
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
private _isOverEndBoundary;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @param previousNode
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
private _isNearEndBoundary;
|
|
78
|
+
private _updateNodePosition;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowService, never>;
|
|
80
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowService>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IN_OUT_DIRECTION, MESSAGE_TYPE } from '../constants';
|
|
2
|
+
export declare type DirectionType = (typeof IN_OUT_DIRECTION)[keyof typeof IN_OUT_DIRECTION];
|
|
3
|
+
export declare type Optional<T = unknown> = T | undefined;
|
|
4
|
+
export declare type MessageType = (typeof MESSAGE_TYPE)[keyof typeof MESSAGE_TYPE];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { ExtractPayload } from 'rete-angular-plugin/presets/classic/types';
|
|
3
|
+
import { ClassicScheme } from 'rete-connection-plugin/_types/types';
|
|
4
|
+
export declare type AngularComponent = Type<any>;
|
|
5
|
+
export declare type CustomizationProps<Schemes extends ClassicScheme> = {
|
|
6
|
+
node?: (data: ExtractPayload<Schemes, 'node'>) => AngularComponent | null;
|
|
7
|
+
connection?: (data: ExtractPayload<Schemes, 'connection'>) => AngularComponent | null;
|
|
8
|
+
socket?: (data: ExtractPayload<Schemes, 'socket'>) => AngularComponent | null;
|
|
9
|
+
control?: (data: ExtractPayload<Schemes, 'control'>) => AngularComponent | null;
|
|
10
|
+
};
|