@eclipse-glsp-examples/workflow-glsp 1.1.0-next.e711000.260 → 1.1.0-next.e8bdd69.287
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/lib/direct-task-editing/di.config.d.ts +17 -2
- package/lib/direct-task-editing/di.config.d.ts.map +1 -1
- package/lib/direct-task-editing/di.config.js +1 -2
- package/lib/direct-task-editing/di.config.js.map +1 -1
- package/lib/direct-task-editing/direct-task-editor.d.ts +3 -3
- package/lib/model.d.ts +5 -5
- package/lib/model.js +1 -1
- package/lib/workflow-diagram-module.d.ts +2 -2
- package/lib/workflow-diagram-module.d.ts.map +1 -1
- package/lib/workflow-diagram-module.js +10 -15
- package/lib/workflow-diagram-module.js.map +1 -1
- package/lib/workflow-views.d.ts +2 -2
- package/package.json +3 -3
- package/src/direct-task-editing/di.config.ts +2 -3
- package/src/direct-task-editing/direct-task-editor.ts +3 -3
- package/src/model.ts +7 -7
- package/src/workflow-diagram-module.ts +16 -27
- package/src/workflow-views.tsx +2 -2
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { FeatureModule } from '@eclipse-glsp/client';
|
|
17
|
+
export declare const directTaskEditor: FeatureModule;
|
|
3
18
|
//# sourceMappingURL=di.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/di.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAiB,aAAa,EAAS,MAAM,sBAAsB,CAAC;AAG3E,eAAO,MAAM,gBAAgB,eAE3B,CAAC"}
|
|
@@ -17,9 +17,8 @@ exports.directTaskEditor = void 0;
|
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
19
|
const client_1 = require("@eclipse-glsp/client");
|
|
20
|
-
const inversify_1 = require("inversify");
|
|
21
20
|
const direct_task_editor_1 = require("./direct-task-editor");
|
|
22
|
-
exports.directTaskEditor = new
|
|
21
|
+
exports.directTaskEditor = new client_1.FeatureModule((bind, _unbind, _isBound) => {
|
|
23
22
|
(0, client_1.bindAsService)(bind, client_1.TYPES.IUIExtension, direct_task_editor_1.TaskEditor);
|
|
24
23
|
});
|
|
25
24
|
//# sourceMappingURL=di.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../src/direct-task-editing/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../src/direct-task-editing/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAA2E;AAC3E,6DAAkD;AAErC,QAAA,gBAAgB,GAAG,IAAI,sBAAa,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;IAC1E,IAAA,sBAAa,EAAC,IAAI,EAAE,cAAK,CAAC,YAAY,EAAE,+BAAU,CAAC,CAAC;AACxD,CAAC,CAAC,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { AbstractUIExtension, Action, AutoCompleteWidget, DOMHelper, EditorContextService, GLSPActionDispatcher, ILogger, LabeledAction, Operation,
|
|
16
|
+
import { AbstractUIExtension, Action, AutoCompleteWidget, DOMHelper, EditorContextService, GLSPActionDispatcher, ILogger, LabeledAction, Operation, GModelRoot, ValidationStatus, ViewerOptions } from '@eclipse-glsp/client';
|
|
17
17
|
import { TaskNode } from '../model';
|
|
18
18
|
/**
|
|
19
19
|
* Is send from the {@link TaskEditor} to the GLSP server
|
|
@@ -61,8 +61,8 @@ export declare class TaskEditor extends AbstractUIExtension {
|
|
|
61
61
|
id(): string;
|
|
62
62
|
containerClass(): string;
|
|
63
63
|
protected initializeContents(containerElement: HTMLElement): void;
|
|
64
|
-
show(root: Readonly<
|
|
65
|
-
protected onBeforeShow(containerElement: HTMLElement, root: Readonly<
|
|
64
|
+
show(root: Readonly<GModelRoot>, ...contextElementIds: string[]): void;
|
|
65
|
+
protected onBeforeShow(containerElement: HTMLElement, root: Readonly<GModelRoot>, ...contextElementIds: string[]): void;
|
|
66
66
|
protected setPosition(containerElement: HTMLElement): void;
|
|
67
67
|
protected retrieveSuggestions(input: string): Promise<LabeledAction[]>;
|
|
68
68
|
protected validateInput(input: string): Promise<ValidationStatus>;
|
package/lib/model.d.ts
CHANGED
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { DiamondNode, EditableLabel, GEdge, LayoutContainer, Nameable, RectangularNode,
|
|
16
|
+
import { DiamondNode, EditableLabel, GEdge, LayoutContainer, Nameable, RectangularNode, GChildElement, GModelElement, GShapeElement, WithEditableLabel } from '@eclipse-glsp/client';
|
|
17
17
|
export declare class TaskNode extends RectangularNode implements Nameable, WithEditableLabel {
|
|
18
18
|
static readonly DEFAULT_FEATURES: symbol[];
|
|
19
19
|
duration?: number;
|
|
20
20
|
taskType?: string;
|
|
21
21
|
reference?: string;
|
|
22
|
-
get editableLabel(): (
|
|
22
|
+
get editableLabel(): (GChildElement & EditableLabel) | undefined;
|
|
23
23
|
get name(): string;
|
|
24
24
|
}
|
|
25
|
-
export declare function isTaskNode(element:
|
|
25
|
+
export declare function isTaskNode(element: GModelElement): element is TaskNode;
|
|
26
26
|
export declare class WeightedEdge extends GEdge {
|
|
27
27
|
probability?: string;
|
|
28
28
|
}
|
|
@@ -45,7 +45,7 @@ export declare namespace ActivityNode {
|
|
|
45
45
|
const UNDEFINED = "undefined";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
export declare class Icon extends
|
|
48
|
+
export declare class Icon extends GShapeElement implements LayoutContainer {
|
|
49
49
|
static readonly DEFAULT_FEATURES: symbol[];
|
|
50
50
|
layout: string;
|
|
51
51
|
layoutOptions?: {
|
|
@@ -59,6 +59,6 @@ export declare class Icon extends SShapeElement implements LayoutContainer {
|
|
|
59
59
|
export declare class CategoryNode extends RectangularNode implements Nameable, WithEditableLabel {
|
|
60
60
|
static readonly DEFAULT_FEATURES: symbol[];
|
|
61
61
|
name: string;
|
|
62
|
-
get editableLabel(): (
|
|
62
|
+
get editableLabel(): (GChildElement & EditableLabel) | undefined;
|
|
63
63
|
}
|
|
64
64
|
//# sourceMappingURL=model.d.ts.map
|
package/lib/model.js
CHANGED
|
@@ -76,7 +76,7 @@ exports.ActivityNode = ActivityNode;
|
|
|
76
76
|
Type.UNDEFINED = 'undefined';
|
|
77
77
|
})(Type = ActivityNode.Type || (ActivityNode.Type = {}));
|
|
78
78
|
})(ActivityNode || (exports.ActivityNode = ActivityNode = {}));
|
|
79
|
-
class Icon extends client_1.
|
|
79
|
+
class Icon extends client_1.GShapeElement {
|
|
80
80
|
constructor() {
|
|
81
81
|
super(...arguments);
|
|
82
82
|
this.size = {
|
|
@@ -19,6 +19,6 @@ import { Container, ContainerModule } from 'inversify';
|
|
|
19
19
|
import 'sprotty/css/edit-label.css';
|
|
20
20
|
import '../css/diagram.css';
|
|
21
21
|
export declare const workflowDiagramModule: ContainerModule;
|
|
22
|
-
export declare function createWorkflowDiagramContainer(
|
|
23
|
-
export declare function initializeWorkflowDiagramContainer(container: Container,
|
|
22
|
+
export declare function createWorkflowDiagramContainer(...containerConfiguration: ContainerConfiguration): Container;
|
|
23
|
+
export declare function initializeWorkflowDiagramContainer(container: Container, ...containerConfiguration: ContainerConfiguration): Container;
|
|
24
24
|
//# sourceMappingURL=workflow-diagram-module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAEH,sBAAsB,
|
|
1
|
+
{"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAEH,sBAAsB,EAwBzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAK5B,eAAO,MAAM,qBAAqB,iBA0BhC,CAAC;AAEH,wBAAgB,8BAA8B,CAAC,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAE3G;AAED,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAErI"}
|
|
@@ -34,10 +34,10 @@ exports.workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, i
|
|
|
34
34
|
(0, client_1.configureDefaultModelElements)(context);
|
|
35
35
|
(0, client_1.configureModelElement)(context, 'task:automated', model_1.TaskNode, client_1.RoundedCornerNodeView);
|
|
36
36
|
(0, client_1.configureModelElement)(context, 'task:manual', model_1.TaskNode, client_1.RoundedCornerNodeView);
|
|
37
|
-
(0, client_1.configureModelElement)(context, 'label:heading', client_1.
|
|
38
|
-
(0, client_1.configureModelElement)(context, 'comp:comp', client_1.
|
|
39
|
-
(0, client_1.configureModelElement)(context, 'comp:header', client_1.
|
|
40
|
-
(0, client_1.configureModelElement)(context, 'label:icon', client_1.
|
|
37
|
+
(0, client_1.configureModelElement)(context, 'label:heading', client_1.GLabel, client_1.GLabelView, { enable: [client_1.editLabelFeature] });
|
|
38
|
+
(0, client_1.configureModelElement)(context, 'comp:comp', client_1.GCompartment, client_1.GCompartmentView);
|
|
39
|
+
(0, client_1.configureModelElement)(context, 'comp:header', client_1.GCompartment, client_1.GCompartmentView);
|
|
40
|
+
(0, client_1.configureModelElement)(context, 'label:icon', client_1.GLabel, client_1.GLabelView);
|
|
41
41
|
(0, client_1.configureModelElement)(context, client_1.DefaultTypes.EDGE, client_1.GEdge, workflow_views_1.WorkflowEdgeView);
|
|
42
42
|
(0, client_1.configureModelElement)(context, 'edge:weighted', model_1.WeightedEdge, workflow_views_1.WorkflowEdgeView);
|
|
43
43
|
(0, client_1.configureModelElement)(context, 'icon', model_1.Icon, workflow_views_1.IconView);
|
|
@@ -45,21 +45,16 @@ exports.workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, i
|
|
|
45
45
|
(0, client_1.configureModelElement)(context, 'activityNode:decision', model_1.ActivityNode, client_1.DiamondNodeView);
|
|
46
46
|
(0, client_1.configureModelElement)(context, 'activityNode:fork', model_1.ActivityNode, client_1.RectangularNodeView);
|
|
47
47
|
(0, client_1.configureModelElement)(context, 'activityNode:join', model_1.ActivityNode, client_1.RectangularNodeView);
|
|
48
|
-
(0, client_1.configureModelElement)(context, client_1.DefaultTypes.GRAPH, client_1.
|
|
48
|
+
(0, client_1.configureModelElement)(context, client_1.DefaultTypes.GRAPH, client_1.GGraph, client_1.GLSPProjectionView);
|
|
49
49
|
(0, client_1.configureModelElement)(context, 'category', model_1.CategoryNode, client_1.RoundedCornerNodeView);
|
|
50
|
-
(0, client_1.configureModelElement)(context, 'struct', client_1.
|
|
50
|
+
(0, client_1.configureModelElement)(context, 'struct', client_1.GCompartment, client_1.StructureCompartmentView);
|
|
51
51
|
});
|
|
52
|
-
function createWorkflowDiagramContainer(
|
|
53
|
-
return initializeWorkflowDiagramContainer(new inversify_1.Container(),
|
|
52
|
+
function createWorkflowDiagramContainer(...containerConfiguration) {
|
|
53
|
+
return initializeWorkflowDiagramContainer(new inversify_1.Container(), ...containerConfiguration);
|
|
54
54
|
}
|
|
55
55
|
exports.createWorkflowDiagramContainer = createWorkflowDiagramContainer;
|
|
56
|
-
function initializeWorkflowDiagramContainer(container,
|
|
57
|
-
(0, client_1.initializeDiagramContainer)(container, exports.workflowDiagramModule, di_config_1.directTaskEditor,
|
|
58
|
-
(0, client_1.overrideViewerOptions)(container, {
|
|
59
|
-
baseDiv: widgetId,
|
|
60
|
-
hiddenDiv: widgetId + '_hidden'
|
|
61
|
-
});
|
|
62
|
-
return container;
|
|
56
|
+
function initializeWorkflowDiagramContainer(container, ...containerConfiguration) {
|
|
57
|
+
return (0, client_1.initializeDiagramContainer)(container, exports.workflowDiagramModule, di_config_1.directTaskEditor, ...containerConfiguration);
|
|
63
58
|
}
|
|
64
59
|
exports.initializeWorkflowDiagramContainer = initializeWorkflowDiagramContainer;
|
|
65
60
|
//# sourceMappingURL=workflow-diagram-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":"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"}
|
package/lib/workflow-views.d.ts
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Point, PolylineEdgeViewWithGapsOnIntersections, RenderingContext,
|
|
16
|
+
import { Point, PolylineEdgeViewWithGapsOnIntersections, RenderingContext, GEdge, ShapeView } from '@eclipse-glsp/client';
|
|
17
17
|
import { VNode } from 'snabbdom';
|
|
18
18
|
import { Icon } from './model';
|
|
19
19
|
export declare class WorkflowEdgeView extends PolylineEdgeViewWithGapsOnIntersections {
|
|
20
|
-
protected renderAdditionals(edge:
|
|
20
|
+
protected renderAdditionals(edge: GEdge, segments: Point[], context: RenderingContext): VNode[];
|
|
21
21
|
}
|
|
22
22
|
export declare class IconView extends ShapeView {
|
|
23
23
|
render(element: Icon, context: RenderingContext): VNode | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-glsp",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.e8bdd69.287+e8bdd69",
|
|
4
4
|
"description": "GLSP diagrams for the Workflow DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"glsp",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"watch": "tsc -w"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@eclipse-glsp/client": "1.1.0-next.
|
|
46
|
+
"@eclipse-glsp/client": "1.1.0-next.e8bdd69.287+e8bdd69",
|
|
47
47
|
"balloon-css": "^0.5.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "e8bdd696e0c391132c2d43edb1529d171b02b831"
|
|
56
56
|
}
|
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { bindAsService, TYPES } from '@eclipse-glsp/client';
|
|
17
|
-
import { ContainerModule } from 'inversify';
|
|
16
|
+
import { bindAsService, FeatureModule, TYPES } from '@eclipse-glsp/client';
|
|
18
17
|
import { TaskEditor } from './direct-task-editor';
|
|
19
18
|
|
|
20
|
-
export const directTaskEditor = new
|
|
19
|
+
export const directTaskEditor = new FeatureModule((bind, _unbind, _isBound) => {
|
|
21
20
|
bindAsService(bind, TYPES.IUIExtension, TaskEditor);
|
|
22
21
|
});
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
Operation,
|
|
27
27
|
RequestContextActions,
|
|
28
28
|
RequestEditValidationAction,
|
|
29
|
-
|
|
29
|
+
GModelRoot,
|
|
30
30
|
SetContextActions,
|
|
31
31
|
SetEditValidationResultAction,
|
|
32
32
|
TYPES,
|
|
@@ -137,12 +137,12 @@ export class TaskEditor extends AbstractUIExtension {
|
|
|
137
137
|
this.autoSuggestion.initialize(containerElement);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
override show(root: Readonly<
|
|
140
|
+
override show(root: Readonly<GModelRoot>, ...contextElementIds: string[]): void {
|
|
141
141
|
super.show(root, ...contextElementIds);
|
|
142
142
|
this.autoSuggestion.open(root);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
protected override onBeforeShow(containerElement: HTMLElement, root: Readonly<
|
|
145
|
+
protected override onBeforeShow(containerElement: HTMLElement, root: Readonly<GModelRoot>, ...contextElementIds: string[]): void {
|
|
146
146
|
this.task = getTask(contextElementIds, root.index)[0];
|
|
147
147
|
this.autoSuggestion.inputField.value = '';
|
|
148
148
|
this.setPosition(containerElement);
|
package/src/model.ts
CHANGED
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
nameFeature,
|
|
32
32
|
popupFeature,
|
|
33
33
|
RectangularNode,
|
|
34
|
-
|
|
34
|
+
GChildElement,
|
|
35
35
|
selectFeature,
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
GModelElement,
|
|
37
|
+
GShapeElement,
|
|
38
38
|
WithEditableLabel,
|
|
39
39
|
withEditLabelFeature
|
|
40
40
|
} from '@eclipse-glsp/client';
|
|
@@ -57,7 +57,7 @@ export class TaskNode extends RectangularNode implements Nameable, WithEditableL
|
|
|
57
57
|
taskType?: string;
|
|
58
58
|
reference?: string;
|
|
59
59
|
|
|
60
|
-
get editableLabel(): (
|
|
60
|
+
get editableLabel(): (GChildElement & EditableLabel) | undefined {
|
|
61
61
|
const label = this.children.find(element => element.type === 'label:heading');
|
|
62
62
|
if (label && isEditableLabel(label)) {
|
|
63
63
|
return label;
|
|
@@ -71,7 +71,7 @@ export class TaskNode extends RectangularNode implements Nameable, WithEditableL
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
export function isTaskNode(element:
|
|
74
|
+
export function isTaskNode(element: GModelElement): element is TaskNode {
|
|
75
75
|
return element instanceof TaskNode || false;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -100,7 +100,7 @@ export namespace ActivityNode {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export class Icon extends
|
|
103
|
+
export class Icon extends GShapeElement implements LayoutContainer {
|
|
104
104
|
static readonly DEFAULT_FEATURES = [boundsFeature, layoutContainerFeature, layoutableChildFeature, fadeFeature];
|
|
105
105
|
|
|
106
106
|
layout: string;
|
|
@@ -127,7 +127,7 @@ export class CategoryNode extends RectangularNode implements Nameable, WithEdita
|
|
|
127
127
|
|
|
128
128
|
name = '';
|
|
129
129
|
|
|
130
|
-
get editableLabel(): (
|
|
130
|
+
get editableLabel(): (GChildElement & EditableLabel) | undefined {
|
|
131
131
|
const label = this.children.find(element => element.type === 'label:heading');
|
|
132
132
|
if (label && isEditableLabel(label)) {
|
|
133
133
|
return label;
|
|
@@ -20,27 +20,25 @@ import {
|
|
|
20
20
|
DeleteElementContextMenuItemProvider,
|
|
21
21
|
DiamondNodeView,
|
|
22
22
|
GEdge,
|
|
23
|
-
|
|
23
|
+
GGraph,
|
|
24
24
|
GLSPProjectionView,
|
|
25
25
|
GridSnapper,
|
|
26
26
|
LogLevel,
|
|
27
27
|
RectangularNodeView,
|
|
28
28
|
RevealNamedElementActionProvider,
|
|
29
29
|
RoundedCornerNodeView,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
GCompartment,
|
|
31
|
+
GCompartmentView,
|
|
32
|
+
GLabel,
|
|
33
|
+
GLabelView,
|
|
34
34
|
StructureCompartmentView,
|
|
35
35
|
TYPES,
|
|
36
|
-
accessibilityModule,
|
|
37
36
|
bindAsService,
|
|
38
37
|
bindOrRebind,
|
|
39
38
|
configureDefaultModelElements,
|
|
40
39
|
configureModelElement,
|
|
41
40
|
editLabelFeature,
|
|
42
|
-
initializeDiagramContainer
|
|
43
|
-
overrideViewerOptions
|
|
41
|
+
initializeDiagramContainer
|
|
44
42
|
} from '@eclipse-glsp/client';
|
|
45
43
|
import 'balloon-css/balloon.min.css';
|
|
46
44
|
import { Container, ContainerModule } from 'inversify';
|
|
@@ -62,10 +60,10 @@ export const workflowDiagramModule = new ContainerModule((bind, unbind, isBound,
|
|
|
62
60
|
configureDefaultModelElements(context);
|
|
63
61
|
configureModelElement(context, 'task:automated', TaskNode, RoundedCornerNodeView);
|
|
64
62
|
configureModelElement(context, 'task:manual', TaskNode, RoundedCornerNodeView);
|
|
65
|
-
configureModelElement(context, 'label:heading',
|
|
66
|
-
configureModelElement(context, 'comp:comp',
|
|
67
|
-
configureModelElement(context, 'comp:header',
|
|
68
|
-
configureModelElement(context, 'label:icon',
|
|
63
|
+
configureModelElement(context, 'label:heading', GLabel, GLabelView, { enable: [editLabelFeature] });
|
|
64
|
+
configureModelElement(context, 'comp:comp', GCompartment, GCompartmentView);
|
|
65
|
+
configureModelElement(context, 'comp:header', GCompartment, GCompartmentView);
|
|
66
|
+
configureModelElement(context, 'label:icon', GLabel, GLabelView);
|
|
69
67
|
configureModelElement(context, DefaultTypes.EDGE, GEdge, WorkflowEdgeView);
|
|
70
68
|
configureModelElement(context, 'edge:weighted', WeightedEdge, WorkflowEdgeView);
|
|
71
69
|
configureModelElement(context, 'icon', Icon, IconView);
|
|
@@ -73,24 +71,15 @@ export const workflowDiagramModule = new ContainerModule((bind, unbind, isBound,
|
|
|
73
71
|
configureModelElement(context, 'activityNode:decision', ActivityNode, DiamondNodeView);
|
|
74
72
|
configureModelElement(context, 'activityNode:fork', ActivityNode, RectangularNodeView);
|
|
75
73
|
configureModelElement(context, 'activityNode:join', ActivityNode, RectangularNodeView);
|
|
76
|
-
configureModelElement(context, DefaultTypes.GRAPH,
|
|
74
|
+
configureModelElement(context, DefaultTypes.GRAPH, GGraph, GLSPProjectionView);
|
|
77
75
|
configureModelElement(context, 'category', CategoryNode, RoundedCornerNodeView);
|
|
78
|
-
configureModelElement(context, 'struct',
|
|
76
|
+
configureModelElement(context, 'struct', GCompartment, StructureCompartmentView);
|
|
79
77
|
});
|
|
80
78
|
|
|
81
|
-
export function createWorkflowDiagramContainer(
|
|
82
|
-
return initializeWorkflowDiagramContainer(new Container(),
|
|
79
|
+
export function createWorkflowDiagramContainer(...containerConfiguration: ContainerConfiguration): Container {
|
|
80
|
+
return initializeWorkflowDiagramContainer(new Container(), ...containerConfiguration);
|
|
83
81
|
}
|
|
84
82
|
|
|
85
|
-
export function initializeWorkflowDiagramContainer(
|
|
86
|
-
container
|
|
87
|
-
widgetId: string,
|
|
88
|
-
...containerConfiguration: ContainerConfiguration
|
|
89
|
-
): Container {
|
|
90
|
-
initializeDiagramContainer(container, workflowDiagramModule, directTaskEditor, accessibilityModule, ...containerConfiguration);
|
|
91
|
-
overrideViewerOptions(container, {
|
|
92
|
-
baseDiv: widgetId,
|
|
93
|
-
hiddenDiv: widgetId + '_hidden'
|
|
94
|
-
});
|
|
95
|
-
return container;
|
|
83
|
+
export function initializeWorkflowDiagramContainer(container: Container, ...containerConfiguration: ContainerConfiguration): Container {
|
|
84
|
+
return initializeDiagramContainer(container, workflowDiagramModule, directTaskEditor, ...containerConfiguration);
|
|
96
85
|
}
|
package/src/workflow-views.tsx
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
Point,
|
|
21
21
|
PolylineEdgeViewWithGapsOnIntersections,
|
|
22
22
|
RenderingContext,
|
|
23
|
-
|
|
23
|
+
GEdge,
|
|
24
24
|
setAttr,
|
|
25
25
|
ShapeView,
|
|
26
26
|
svg,
|
|
@@ -35,7 +35,7 @@ const JSX = { createElement: svg };
|
|
|
35
35
|
|
|
36
36
|
@injectable()
|
|
37
37
|
export class WorkflowEdgeView extends PolylineEdgeViewWithGapsOnIntersections {
|
|
38
|
-
protected override renderAdditionals(edge:
|
|
38
|
+
protected override renderAdditionals(edge: GEdge, segments: Point[], context: RenderingContext): VNode[] {
|
|
39
39
|
const additionals = super.renderAdditionals(edge, segments, context);
|
|
40
40
|
const p1 = segments[segments.length - 2];
|
|
41
41
|
const p2 = segments[segments.length - 1];
|