@eclipse-glsp-examples/workflow-glsp 1.1.0-next.b15d96b.196 → 1.1.0-next.c341367.288
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/README.md +1 -1
- 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 +3 -5
- package/lib/direct-task-editing/di.config.js.map +1 -1
- package/lib/direct-task-editing/direct-task-editor.d.ts +19 -15
- package/lib/direct-task-editing/direct-task-editor.d.ts.map +1 -1
- package/lib/direct-task-editing/direct-task-editor.js +29 -17
- package/lib/direct-task-editing/direct-task-editor.js.map +1 -1
- package/lib/index.d.ts +3 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -6
- package/lib/index.js.map +1 -1
- package/lib/model.d.ts +8 -8
- package/lib/model.d.ts.map +1 -1
- package/lib/model.js +5 -5
- package/lib/model.js.map +1 -1
- package/lib/workflow-diagram-module.d.ts +24 -0
- package/lib/workflow-diagram-module.d.ts.map +1 -0
- package/lib/{di.config.js → workflow-diagram-module.js} +23 -24
- package/lib/workflow-diagram-module.js.map +1 -0
- package/lib/workflow-views.d.ts +2 -2
- package/lib/workflow-views.js +4 -6
- package/lib/workflow-views.js.map +1 -1
- package/package.json +24 -24
- package/src/direct-task-editing/di.config.ts +4 -6
- package/src/direct-task-editing/direct-task-editor.ts +41 -22
- package/src/index.ts +3 -5
- package/src/model.ts +11 -11
- package/src/{di.config.ts → workflow-diagram-module.ts} +36 -34
- package/src/workflow-views.tsx +2 -2
- package/lib/di.config.d.ts +0 -6
- package/lib/di.config.d.ts.map +0 -1
- package/lib/di.config.js.map +0 -1
- package/scripts/config.json +0 -9
- package/scripts/download.ts +0 -35
package/README.md
CHANGED
|
@@ -11,6 +11,6 @@ This package is built with `yarn` and is available from npm via [@eclipse-glsp-e
|
|
|
11
11
|
## More information
|
|
12
12
|
|
|
13
13
|
For more information, please visit the [Eclipse GLSP Umbrella repository](https://github.com/eclipse-glsp/glsp) and the [Eclipse GLSP Website](https://www.eclipse.org/glsp/).
|
|
14
|
-
If you have questions,
|
|
14
|
+
If you have questions, please raise them in the [discussions](https://github.com/eclipse-glsp/glsp/discussions) and have a look at our [communication and support options](https://www.eclipse.org/glsp/contact/).
|
|
15
15
|
|
|
16
16
|

|
|
@@ -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"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.directTaskEditor = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c)
|
|
5
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -17,10 +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
|
|
23
|
-
|
|
24
|
-
bind(client_1.TYPES.IUIExtension).toService(direct_task_editor_1.TaskEditor);
|
|
21
|
+
exports.directTaskEditor = new client_1.FeatureModule((bind, _unbind, _isBound) => {
|
|
22
|
+
(0, client_1.bindAsService)(bind, client_1.TYPES.IUIExtension, direct_task_editor_1.TaskEditor);
|
|
25
23
|
});
|
|
26
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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,31 +13,35 @@
|
|
|
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, EditorContextService, GLSPActionDispatcher, ILogger, LabeledAction, Operation,
|
|
17
|
-
import { DOMHelper } from 'sprotty/lib/base/views/dom-helper';
|
|
16
|
+
import { AbstractUIExtension, Action, AutoCompleteWidget, DOMHelper, EditorContextService, GLSPActionDispatcher, ILogger, LabeledAction, Operation, GModelRoot, ValidationStatus, ViewerOptions } from '@eclipse-glsp/client';
|
|
18
17
|
import { TaskNode } from '../model';
|
|
19
18
|
/**
|
|
20
19
|
* Is send from the {@link TaskEditor} to the GLSP server
|
|
21
|
-
* to
|
|
20
|
+
* to update a feature from a specified task.
|
|
22
21
|
*/
|
|
23
|
-
export interface
|
|
24
|
-
kind: typeof
|
|
22
|
+
export interface EditTaskOperation extends Operation {
|
|
23
|
+
kind: typeof EditTaskOperation.KIND;
|
|
25
24
|
/**
|
|
26
25
|
* Id of the task that should be edited
|
|
27
26
|
*/
|
|
28
27
|
taskId: string;
|
|
29
28
|
/**
|
|
30
|
-
* The
|
|
29
|
+
* The feature that is to be updated
|
|
31
30
|
*/
|
|
32
|
-
|
|
31
|
+
feature: 'duration' | 'taskType';
|
|
32
|
+
/**
|
|
33
|
+
* The new feature value
|
|
34
|
+
*/
|
|
35
|
+
value: string;
|
|
33
36
|
}
|
|
34
|
-
export declare namespace
|
|
35
|
-
const KIND = "
|
|
36
|
-
function is(object: any): object is
|
|
37
|
+
export declare namespace EditTaskOperation {
|
|
38
|
+
const KIND = "editTask";
|
|
39
|
+
function is(object: any): object is EditTaskOperation;
|
|
37
40
|
function create(options: {
|
|
38
41
|
taskId: string;
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
feature: 'duration' | 'taskType';
|
|
43
|
+
value: string;
|
|
44
|
+
}): EditTaskOperation;
|
|
41
45
|
}
|
|
42
46
|
export declare class TaskEditor extends AbstractUIExtension {
|
|
43
47
|
static readonly ID = "task-editor";
|
|
@@ -57,8 +61,8 @@ export declare class TaskEditor extends AbstractUIExtension {
|
|
|
57
61
|
id(): string;
|
|
58
62
|
containerClass(): string;
|
|
59
63
|
protected initializeContents(containerElement: HTMLElement): void;
|
|
60
|
-
show(root: Readonly<
|
|
61
|
-
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;
|
|
62
66
|
protected setPosition(containerElement: HTMLElement): void;
|
|
63
67
|
protected retrieveSuggestions(input: string): Promise<LabeledAction[]>;
|
|
64
68
|
protected validateInput(input: string): Promise<ValidationStatus>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direct-task-editor.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/direct-task-editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,mBAAmB,EACnB,MAAM,EACN,kBAAkB,EAClB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"direct-task-editor.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/direct-task-editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,mBAAmB,EACnB,MAAM,EACN,kBAAkB,EAClB,SAAS,EACT,oBAAo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,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;IAkBxD,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI;cAK5D,YAAY,CAAC,gBAAgB,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI;IAMhI,SAAS,CAAC,WAAW,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;cAe1C,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;cAU5D,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAUvE,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI;IAI/E,SAAS,CAAC,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAc9C,IAAI,IAAI,IAAI;CAIxB"}
|
|
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
var TaskEditor_1;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.TaskEditor = exports.
|
|
13
|
+
exports.TaskEditor = exports.EditTaskOperation = void 0;
|
|
14
14
|
/********************************************************************************
|
|
15
|
-
* Copyright (c) 2020-
|
|
15
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
16
16
|
*
|
|
17
17
|
* This program and the accompanying materials are made available under the
|
|
18
18
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -28,21 +28,23 @@ exports.TaskEditor = exports.ApplyTaskEditOperation = void 0;
|
|
|
28
28
|
********************************************************************************/
|
|
29
29
|
const client_1 = require("@eclipse-glsp/client");
|
|
30
30
|
const inversify_1 = require("inversify");
|
|
31
|
-
const dom_helper_1 = require("sprotty/lib/base/views/dom-helper");
|
|
32
31
|
const model_1 = require("../model");
|
|
33
|
-
var
|
|
34
|
-
(function (
|
|
35
|
-
|
|
32
|
+
var EditTaskOperation;
|
|
33
|
+
(function (EditTaskOperation) {
|
|
34
|
+
EditTaskOperation.KIND = 'editTask';
|
|
36
35
|
function is(object) {
|
|
37
|
-
return client_1.
|
|
36
|
+
return (client_1.Action.hasKind(object, EditTaskOperation.KIND) &&
|
|
37
|
+
(0, client_1.hasStringProp)(object, 'taskId') &&
|
|
38
|
+
(0, client_1.hasStringProp)(object, 'feature') &&
|
|
39
|
+
(0, client_1.hasStringProp)(object, 'value'));
|
|
38
40
|
}
|
|
39
|
-
|
|
41
|
+
EditTaskOperation.is = is;
|
|
40
42
|
function create(options) {
|
|
41
|
-
return Object.assign({ kind:
|
|
43
|
+
return Object.assign({ kind: EditTaskOperation.KIND, isOperation: true }, options);
|
|
42
44
|
}
|
|
43
|
-
|
|
44
|
-
})(
|
|
45
|
-
let TaskEditor = TaskEditor_1 = class TaskEditor extends client_1.AbstractUIExtension {
|
|
45
|
+
EditTaskOperation.create = create;
|
|
46
|
+
})(EditTaskOperation || (exports.EditTaskOperation = EditTaskOperation = {}));
|
|
47
|
+
let TaskEditor = exports.TaskEditor = TaskEditor_1 = class TaskEditor extends client_1.AbstractUIExtension {
|
|
46
48
|
constructor() {
|
|
47
49
|
super(...arguments);
|
|
48
50
|
this.autoSuggestionSettings = {
|
|
@@ -105,8 +107,19 @@ let TaskEditor = TaskEditor_1 = class TaskEditor extends client_1.AbstractUIExte
|
|
|
105
107
|
this.actionDispatcher.dispatchAll((0, client_1.toActionArray)(input));
|
|
106
108
|
}
|
|
107
109
|
executeFromTextOnlyInput(input) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
if (input.startsWith('duration:')) {
|
|
111
|
+
const value = input.substring('duration:'.length);
|
|
112
|
+
const action = EditTaskOperation.create({ taskId: this.task.id, feature: 'duration', value });
|
|
113
|
+
this.actionDispatcher.dispatch(action);
|
|
114
|
+
}
|
|
115
|
+
else if (input.startsWith('taskType:')) {
|
|
116
|
+
const value = input.substring('taskType:'.length);
|
|
117
|
+
const action = EditTaskOperation.create({ taskId: this.task.id, feature: 'taskType', value });
|
|
118
|
+
this.actionDispatcher.dispatch(action);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
throw new Error('Unsupported Task Editing: ' + input);
|
|
122
|
+
}
|
|
110
123
|
}
|
|
111
124
|
hide() {
|
|
112
125
|
this.autoSuggestion.dispose();
|
|
@@ -128,16 +141,15 @@ __decorate([
|
|
|
128
141
|
], TaskEditor.prototype, "viewerOptions", void 0);
|
|
129
142
|
__decorate([
|
|
130
143
|
(0, inversify_1.inject)(client_1.TYPES.DOMHelper),
|
|
131
|
-
__metadata("design:type",
|
|
144
|
+
__metadata("design:type", client_1.DOMHelper)
|
|
132
145
|
], TaskEditor.prototype, "domHelper", void 0);
|
|
133
146
|
__decorate([
|
|
134
147
|
(0, inversify_1.inject)(client_1.TYPES.ILogger),
|
|
135
148
|
__metadata("design:type", Object)
|
|
136
149
|
], TaskEditor.prototype, "logger", void 0);
|
|
137
|
-
TaskEditor = TaskEditor_1 = __decorate([
|
|
150
|
+
exports.TaskEditor = TaskEditor = TaskEditor_1 = __decorate([
|
|
138
151
|
(0, inversify_1.injectable)()
|
|
139
152
|
], TaskEditor);
|
|
140
|
-
exports.TaskEditor = TaskEditor;
|
|
141
153
|
function getTask(ids, index) {
|
|
142
154
|
return ids.map(id => index.getById(id)).filter(element => element && (0, model_1.isTaskNode)(element));
|
|
143
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direct-task-editor.js","sourceRoot":"","sources":["../../src/direct-task-editing/direct-task-editor.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"direct-task-editor.js","sourceRoot":"","sources":["../../src/direct-task-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oB;oDAAC;AAGvC;IADT,IAAA,kBAAM,EAAC,6BAAoB,CAAC;8BACG,6BAAoB;wDAAC;AAG3C;IADT,IAAA,kBAAM,EAAC,cAAK,CAAC,aAAa,CAAC;;iDACW;AAG7B;IADT,IAAA,kBAAM,EAAC,cAAK,CAAC,SAAS,CAAC;8BACH,kBAAS;6CAAC;AAGZ;IADlB,IAAA,kBAAM,EAAC,cAAK,CAAC,OAAO,CAAC;;0CACa;qBAtB1B,UAAU;IADtB,IAAA,sBAAU,GAAE;GACA,UAAU,CAwHtB;AAED,SAAS,OAAO,CAAC,GAAa,EAAE,KAAqB;IACjD,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,IAAI,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAe,CAAC;AAC5G,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
16
|
+
export * from './direct-task-editing/direct-task-editor';
|
|
17
17
|
export * from './model';
|
|
18
|
+
export * from './workflow-diagram-module';
|
|
18
19
|
export * from './workflow-views';
|
|
19
|
-
export * from './direct-task-editing/direct-task-editor';
|
|
20
|
-
export { createWorkflowDiagramContainer };
|
|
21
20
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,0CAA0C,CAAC;AACzD,cAAc,SAAS,CAAC;AACxB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -10,9 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.createWorkflowDiagramContainer = void 0;
|
|
14
17
|
/********************************************************************************
|
|
15
|
-
* Copyright (c) 2019-
|
|
18
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
16
19
|
*
|
|
17
20
|
* This program and the accompanying materials are made available under the
|
|
18
21
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -26,9 +29,8 @@ exports.createWorkflowDiagramContainer = void 0;
|
|
|
26
29
|
*
|
|
27
30
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
28
31
|
********************************************************************************/
|
|
29
|
-
|
|
30
|
-
exports.createWorkflowDiagramContainer = di_config_1.default;
|
|
32
|
+
__exportStar(require("./direct-task-editing/direct-task-editor"), exports);
|
|
31
33
|
__exportStar(require("./model"), exports);
|
|
34
|
+
__exportStar(require("./workflow-diagram-module"), exports);
|
|
32
35
|
__exportStar(require("./workflow-views"), exports);
|
|
33
|
-
__exportStar(require("./direct-task-editing/direct-task-editor"), exports);
|
|
34
36
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2EAAyD;AACzD,0CAAwB;AACxB,4DAA0C;AAC1C,mDAAiC"}
|
package/lib/model.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,17 +13,17 @@
|
|
|
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, 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:
|
|
26
|
-
export declare class WeightedEdge extends
|
|
25
|
+
export declare function isTaskNode(element: GModelElement): element is TaskNode;
|
|
26
|
+
export declare class WeightedEdge extends GEdge {
|
|
27
27
|
probability?: string;
|
|
28
28
|
}
|
|
29
29
|
export declare class ActivityNode extends DiamondNode {
|
|
@@ -36,7 +36,7 @@ export declare class ActivityNode extends DiamondNode {
|
|
|
36
36
|
}
|
|
37
37
|
export declare namespace ActivityNode {
|
|
38
38
|
namespace Type {
|
|
39
|
-
const INITIAL = "
|
|
39
|
+
const INITIAL = "initialNode";
|
|
40
40
|
const FINAL = "finalNode";
|
|
41
41
|
const DECISION = "decisionNode";
|
|
42
42
|
const MERGE = "mergeNode";
|
|
@@ -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.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAIH,WAAW,EACX,aAAa,
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAIH,WAAW,EACX,aAAa,EAEb,KAAK,EAIL,eAAe,EAGf,QAAQ,EAGR,eAAe,EACf,aAAa,EAEb,aAAa,EACb,aAAa,EACb,iBAAiB,EAEpB,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,QAAS,SAAQ,eAAgB,YAAW,QAAQ,EAAE,iBAAiB;IAChF,gBAAyB,gBAAgB,WAYvC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,IAAI,aAAa,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC,GAAG,SAAS,CAM/D;IAED,IAAI,IAAI,IAAI,MAAM,CAGjB;CACJ;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,IAAI,QAAQ,CAEtE;AAED,qBAAa,YAAa,SAAQ,KAAK;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,YAAa,SAAQ,WAAW;IACzC,QAAQ,EAAE,MAAM,CAA+B;IACtC,IAAI;;;MAGX;IACO,WAAW,SAAK;CAC5B;AAED,yBAAiB,YAAY,CAAC;IAC1B,UAAiB,IAAI,CAAC;QACX,MAAM,OAAO,gBAAgB,CAAC;QAC9B,MAAM,KAAK,cAAc,CAAC;QAC1B,MAAM,QAAQ,iBAAiB,CAAC;QAChC,MAAM,KAAK,cAAc,CAAC;QAC1B,MAAM,IAAI,aAAa,CAAC;QACxB,MAAM,IAAI,aAAa,CAAC;QACxB,MAAM,SAAS,cAAc,CAAC;KACxC;CACJ;AAED,qBAAa,IAAK,SAAQ,aAAc,YAAW,eAAe;IAC9D,MAAM,CAAC,QAAQ,CAAC,gBAAgB,WAAgF;IAEhH,MAAM,EAAE,MAAM,CAAC;IACN,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAC7D,IAAI;;;MAGX;CACL;AAED,qBAAa,YAAa,SAAQ,eAAgB,YAAW,QAAQ,EAAE,iBAAiB;IACpF,gBAAyB,gBAAgB,WAWvC;IAEF,IAAI,SAAM;IAEV,IAAI,aAAa,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC,GAAG,SAAS,CAM/D;CACJ"}
|
package/lib/model.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CategoryNode = exports.Icon = exports.ActivityNode = exports.WeightedEdge = exports.isTaskNode = exports.TaskNode = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2020-
|
|
5
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -49,7 +49,7 @@ function isTaskNode(element) {
|
|
|
49
49
|
return element instanceof TaskNode || false;
|
|
50
50
|
}
|
|
51
51
|
exports.isTaskNode = isTaskNode;
|
|
52
|
-
class WeightedEdge extends client_1.
|
|
52
|
+
class WeightedEdge extends client_1.GEdge {
|
|
53
53
|
}
|
|
54
54
|
exports.WeightedEdge = WeightedEdge;
|
|
55
55
|
class ActivityNode extends client_1.DiamondNode {
|
|
@@ -67,7 +67,7 @@ exports.ActivityNode = ActivityNode;
|
|
|
67
67
|
(function (ActivityNode) {
|
|
68
68
|
let Type;
|
|
69
69
|
(function (Type) {
|
|
70
|
-
Type.INITIAL = '
|
|
70
|
+
Type.INITIAL = 'initialNode';
|
|
71
71
|
Type.FINAL = 'finalNode';
|
|
72
72
|
Type.DECISION = 'decisionNode';
|
|
73
73
|
Type.MERGE = 'mergeNode';
|
|
@@ -75,8 +75,8 @@ exports.ActivityNode = ActivityNode;
|
|
|
75
75
|
Type.FORK = 'forkNode';
|
|
76
76
|
Type.UNDEFINED = 'undefined';
|
|
77
77
|
})(Type = ActivityNode.Type || (ActivityNode.Type = {}));
|
|
78
|
-
})(ActivityNode
|
|
79
|
-
class Icon extends client_1.
|
|
78
|
+
})(ActivityNode || (exports.ActivityNode = ActivityNode = {}));
|
|
79
|
+
class Icon extends client_1.GShapeElement {
|
|
80
80
|
constructor() {
|
|
81
81
|
super(...arguments);
|
|
82
82
|
this.size = {
|
package/lib/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAwB8B;AAE9B,MAAa,QAAS,SAAQ,wBAAe;IAkBzC,IAAI,aAAa;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC;QAC9E,IAAI,KAAK,IAAI,IAAA,wBAAe,EAAC,KAAK,CAAC,EAAE;YACjC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,IAAI,IAAI;;QACJ,MAAM,SAAS,GAAG,MAAA,IAAI,CAAC,aAAa,0CAAE,IAAI,CAAC;QAC3C,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;IAC/C,CAAC;;AA7BL,4BA8BC;AA7B4B,yBAAgB,GAA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AAe;IAAjD;;QAcI,SAAI,GAAG,EAAE,CAAC;IASd,CAAC;IAPG,IAAI,aAAa;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC;QAC9E,IAAI,KAAK,IAAI,IAAA,wBAAe,EAAC,KAAK,CAAC,EAAE;YACjC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;;AAtBL,oCAuBC;AAtB4B,6BAAgB,GAAG;IACxC,yBAAgB;IAChB,sBAAa;IACb,sBAAa;IACb,oBAAW;IACX,+BAAsB;IACtB,oBAAW;IACX,6BAAoB;IACpB,qBAAY;IACZ,oBAAW;IACX,6BAAoB;CACvB,AAXwC,CAWvC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { ContainerConfiguration } from '@eclipse-glsp/client';
|
|
17
|
+
import 'balloon-css/balloon.min.css';
|
|
18
|
+
import { Container, ContainerModule } from 'inversify';
|
|
19
|
+
import 'sprotty/css/edit-label.css';
|
|
20
|
+
import '../css/diagram.css';
|
|
21
|
+
export declare const workflowDiagramModule: ContainerModule;
|
|
22
|
+
export declare function createWorkflowDiagramContainer(...containerConfiguration: ContainerConfiguration): Container;
|
|
23
|
+
export declare function initializeWorkflowDiagramContainer(container: Container, ...containerConfiguration: ContainerConfiguration): Container;
|
|
24
|
+
//# sourceMappingURL=workflow-diagram-module.d.ts.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initializeWorkflowDiagramContainer = exports.createWorkflowDiagramContainer = exports.workflowDiagramModule = void 0;
|
|
3
4
|
/********************************************************************************
|
|
4
|
-
* Copyright (c) 2019-
|
|
5
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
5
6
|
*
|
|
6
7
|
* This program and the accompanying materials are made available under the
|
|
7
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -16,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
18
|
********************************************************************************/
|
|
18
19
|
const client_1 = require("@eclipse-glsp/client");
|
|
19
|
-
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
20
|
require("balloon-css/balloon.min.css");
|
|
21
21
|
const inversify_1 = require("inversify");
|
|
22
22
|
require("sprotty/css/edit-label.css");
|
|
@@ -24,38 +24,37 @@ require("../css/diagram.css");
|
|
|
24
24
|
const di_config_1 = require("./direct-task-editing/di.config");
|
|
25
25
|
const model_1 = require("./model");
|
|
26
26
|
const workflow_views_1 = require("./workflow-views");
|
|
27
|
-
|
|
28
|
-
rebind(client_1.TYPES.ILogger).to(client_1.ConsoleLogger).inSingletonScope();
|
|
29
|
-
rebind(client_1.TYPES.LogLevel).toConstantValue(client_1.LogLevel.warn);
|
|
30
|
-
bind(client_1.TYPES.ISnapper).to(client_1.GridSnapper);
|
|
31
|
-
bind(client_1.TYPES.ICommandPaletteActionProvider).to(client_1.RevealNamedElementActionProvider);
|
|
32
|
-
bind(client_1.TYPES.IContextMenuItemProvider).to(client_1.DeleteElementContextMenuItemProvider);
|
|
27
|
+
exports.workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
33
28
|
const context = { bind, unbind, isBound, rebind };
|
|
29
|
+
(0, client_1.bindOrRebind)(context, client_1.TYPES.ILogger).to(client_1.ConsoleLogger).inSingletonScope();
|
|
30
|
+
(0, client_1.bindOrRebind)(context, client_1.TYPES.LogLevel).toConstantValue(client_1.LogLevel.warn);
|
|
31
|
+
bind(client_1.TYPES.ISnapper).to(client_1.GridSnapper);
|
|
32
|
+
(0, client_1.bindAsService)(context, client_1.TYPES.ICommandPaletteActionProvider, client_1.RevealNamedElementActionProvider);
|
|
33
|
+
(0, client_1.bindAsService)(context, client_1.TYPES.IContextMenuItemProvider, client_1.DeleteElementContextMenuItemProvider);
|
|
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.
|
|
41
|
-
(0, client_1.configureModelElement)(context,
|
|
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
|
+
(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);
|
|
44
44
|
(0, client_1.configureModelElement)(context, 'activityNode:merge', model_1.ActivityNode, client_1.DiamondNodeView);
|
|
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,
|
|
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
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return container;
|
|
52
|
+
function createWorkflowDiagramContainer(...containerConfiguration) {
|
|
53
|
+
return initializeWorkflowDiagramContainer(new inversify_1.Container(), ...containerConfiguration);
|
|
54
|
+
}
|
|
55
|
+
exports.createWorkflowDiagramContainer = createWorkflowDiagramContainer;
|
|
56
|
+
function initializeWorkflowDiagramContainer(container, ...containerConfiguration) {
|
|
57
|
+
return (0, client_1.initializeDiagramContainer)(container, exports.workflowDiagramModule, di_config_1.directTaskEditor, ...containerConfiguration);
|
|
59
58
|
}
|
|
60
|
-
exports.
|
|
61
|
-
//# sourceMappingURL=
|
|
59
|
+
exports.initializeWorkflowDiagramContainer = initializeWorkflowDiagramContainer;
|
|
60
|
+
//# sourceMappingURL=workflow-diagram-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../src/workflow-diagram-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDA0B8B;AAC9B,uCAAqC;AACrC,yCAAuD;AACvD,sCAAoC;AACpC,8BAA4B;AAC5B,+DAAmE;AACnE,mCAAmF;AACnF,qDAA8D;AAEjD,QAAA,qBAAqB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACvF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;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
********************************************************************************/
|
|
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/lib/workflow-views.js
CHANGED
|
@@ -27,7 +27,7 @@ const inversify_1 = require("inversify");
|
|
|
27
27
|
const model_1 = require("./model");
|
|
28
28
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29
29
|
const JSX = { createElement: client_1.svg };
|
|
30
|
-
let WorkflowEdgeView = class WorkflowEdgeView extends client_1.PolylineEdgeViewWithGapsOnIntersections {
|
|
30
|
+
let WorkflowEdgeView = exports.WorkflowEdgeView = class WorkflowEdgeView extends client_1.PolylineEdgeViewWithGapsOnIntersections {
|
|
31
31
|
renderAdditionals(edge, segments, context) {
|
|
32
32
|
const additionals = super.renderAdditionals(edge, segments, context);
|
|
33
33
|
const p1 = segments[segments.length - 2];
|
|
@@ -37,11 +37,10 @@ let WorkflowEdgeView = class WorkflowEdgeView extends client_1.PolylineEdgeViewW
|
|
|
37
37
|
return additionals;
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
WorkflowEdgeView = __decorate([
|
|
40
|
+
exports.WorkflowEdgeView = WorkflowEdgeView = __decorate([
|
|
41
41
|
(0, inversify_1.injectable)()
|
|
42
42
|
], WorkflowEdgeView);
|
|
43
|
-
exports.
|
|
44
|
-
let IconView = class IconView extends client_1.ShapeView {
|
|
43
|
+
let IconView = exports.IconView = class IconView extends client_1.ShapeView {
|
|
45
44
|
render(element, context) {
|
|
46
45
|
const taskNode = (0, client_1.findParentByFeature)(element, model_1.isTaskNode);
|
|
47
46
|
if (!taskNode || !this.isVisible(element, context)) {
|
|
@@ -74,8 +73,7 @@ let IconView = class IconView extends client_1.ShapeView {
|
|
|
74
73
|
return vnode;
|
|
75
74
|
}
|
|
76
75
|
};
|
|
77
|
-
IconView = __decorate([
|
|
76
|
+
exports.IconView = IconView = __decorate([
|
|
78
77
|
(0, inversify_1.injectable)()
|
|
79
78
|
], IconView);
|
|
80
|
-
exports.IconView = IconView;
|
|
81
79
|
//# sourceMappingURL=workflow-views.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-views.js","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAY8B;AAC9B,yCAAuC;AAEvC,mCAA2C;AAE3C,6DAA6D;AAC7D,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,YAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-views.js","sourceRoot":"","sources":["../src/workflow-views.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAY8B;AAC9B,yCAAuC;AAEvC,mCAA2C;AAE3C,6DAA6D;AAC7D,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,YAAG,EAAE,CAAC;AAG5B,IAAM,gBAAgB,8BAAtB,MAAM,gBAAiB,SAAQ,gDAAuC;IACtD,iBAAiB,CAAC,IAAW,EAAE,QAAiB,EAAE,OAAyB;QAC1F,MAAM,WAAW,GAAG,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrE,MAAM,EAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACzC,MAAM,EAAE,GAAG,QAA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,IAAI,GACT;YACF,2DAA4B,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI;YAChE,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAChC,CACP,CAAC;QAEF,MAAM,OAAO,GAAG,IAAA,mBAAU,EAAC,OAAO,CAAC,CAAC;QACpC,IAAI,OAAO,EAAE;YACT,IAAA,gBAAO,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA;mBAxCY,QAAQ;IADpB,IAAA,sBAAU,GAAE;GACA,QAAQ,CAwCpB"}
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-glsp",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.c341367.288+c341367",
|
|
4
4
|
"description": "GLSP diagrams for the Workflow DSL",
|
|
5
|
-
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
|
|
6
5
|
"keywords": [
|
|
7
6
|
"glsp",
|
|
8
7
|
"workflow",
|
|
9
8
|
"diagram",
|
|
10
9
|
"example"
|
|
11
10
|
],
|
|
12
|
-
"author": {
|
|
13
|
-
"name": "Eclipse GLSP"
|
|
14
|
-
},
|
|
15
11
|
"homepage": "https://www.eclipse.org/glsp/",
|
|
12
|
+
"bugs": "https://github.com/eclipse-glsp/glsp/issues",
|
|
16
13
|
"repository": {
|
|
17
14
|
"type": "git",
|
|
18
15
|
"url": "https://github.com/eclipse-glsp/glsp-client.git"
|
|
19
16
|
},
|
|
20
|
-
"
|
|
17
|
+
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
|
|
18
|
+
"author": {
|
|
19
|
+
"name": "Eclipse GLSP"
|
|
20
|
+
},
|
|
21
21
|
"contributors": [
|
|
22
22
|
{
|
|
23
23
|
"name": "Eclipse GLSP Project",
|
|
@@ -25,21 +25,8 @@
|
|
|
25
25
|
"url": "https://projects.eclipse.org/projects/ecd.glsp"
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
"balloon-css": "^0.5.0"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"mvn-artifact-download": "5.1.0"
|
|
34
|
-
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"prepare": "yarn clean && yarn build && yarn lint",
|
|
37
|
-
"clean": "rimraf tsconfig.tsbuildinfo lib",
|
|
38
|
-
"build": "tsc",
|
|
39
|
-
"lint": "eslint --ext .ts,.tsx ./src",
|
|
40
|
-
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
|
|
41
|
-
"watch": "tsc -w"
|
|
42
|
-
},
|
|
28
|
+
"main": "lib/index",
|
|
29
|
+
"types": "lib/index",
|
|
43
30
|
"files": [
|
|
44
31
|
"lib",
|
|
45
32
|
"src",
|
|
@@ -47,10 +34,23 @@
|
|
|
47
34
|
"css",
|
|
48
35
|
"scripts"
|
|
49
36
|
],
|
|
50
|
-
"
|
|
51
|
-
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc -b",
|
|
39
|
+
"clean": "rimraf tsconfig.tsbuildinfo lib",
|
|
40
|
+
"lint": "eslint --ext .ts,.tsx ./src",
|
|
41
|
+
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
|
|
42
|
+
"prepare": "yarn clean && yarn build ",
|
|
43
|
+
"watch": "tsc -w"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@eclipse-glsp/client": "1.1.0-next.c341367.288+c341367",
|
|
47
|
+
"balloon-css": "^0.5.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"mvn-artifact-download": "5.1.0"
|
|
51
|
+
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "c341367ea87298b5ae0e2a8de2a5455e867df44b"
|
|
56
56
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,11 +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 { 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
|
|
21
|
-
bind
|
|
22
|
-
bind(TYPES.IUIExtension).toService(TaskEditor);
|
|
19
|
+
export const directTaskEditor = new FeatureModule((bind, _unbind, _isBound) => {
|
|
20
|
+
bindAsService(bind, TYPES.IUIExtension, TaskEditor);
|
|
23
21
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -17,35 +17,35 @@ import {
|
|
|
17
17
|
AbstractUIExtension,
|
|
18
18
|
Action,
|
|
19
19
|
AutoCompleteWidget,
|
|
20
|
+
DOMHelper,
|
|
20
21
|
EditorContextService,
|
|
21
|
-
getAbsoluteClientBounds,
|
|
22
22
|
GLSPActionDispatcher,
|
|
23
|
-
hasStringProp,
|
|
24
23
|
ILogger,
|
|
25
24
|
LabeledAction,
|
|
26
25
|
ModelIndexImpl,
|
|
27
26
|
Operation,
|
|
28
27
|
RequestContextActions,
|
|
29
28
|
RequestEditValidationAction,
|
|
29
|
+
GModelRoot,
|
|
30
30
|
SetContextActions,
|
|
31
31
|
SetEditValidationResultAction,
|
|
32
|
-
SModelRoot,
|
|
33
|
-
toActionArray,
|
|
34
32
|
TYPES,
|
|
35
33
|
ValidationDecorator,
|
|
36
34
|
ValidationStatus,
|
|
37
|
-
ViewerOptions
|
|
35
|
+
ViewerOptions,
|
|
36
|
+
getAbsoluteClientBounds,
|
|
37
|
+
hasStringProp,
|
|
38
|
+
toActionArray
|
|
38
39
|
} from '@eclipse-glsp/client';
|
|
39
40
|
import { inject, injectable } from 'inversify';
|
|
40
|
-
import {
|
|
41
|
-
import { isTaskNode, TaskNode } from '../model';
|
|
41
|
+
import { TaskNode, isTaskNode } from '../model';
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Is send from the {@link TaskEditor} to the GLSP server
|
|
45
|
-
* to
|
|
45
|
+
* to update a feature from a specified task.
|
|
46
46
|
*/
|
|
47
|
-
export interface
|
|
48
|
-
kind: typeof
|
|
47
|
+
export interface EditTaskOperation extends Operation {
|
|
48
|
+
kind: typeof EditTaskOperation.KIND;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Id of the task that should be edited
|
|
@@ -53,19 +53,29 @@ export interface ApplyTaskEditOperation extends Operation {
|
|
|
53
53
|
taskId: string;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* The
|
|
56
|
+
* The feature that is to be updated
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
feature: 'duration' | 'taskType';
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The new feature value
|
|
62
|
+
*/
|
|
63
|
+
value: string;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
|
-
export namespace
|
|
62
|
-
export const KIND = '
|
|
66
|
+
export namespace EditTaskOperation {
|
|
67
|
+
export const KIND = 'editTask';
|
|
63
68
|
|
|
64
|
-
export function is(object: any): object is
|
|
65
|
-
return
|
|
69
|
+
export function is(object: any): object is EditTaskOperation {
|
|
70
|
+
return (
|
|
71
|
+
Action.hasKind(object, KIND) &&
|
|
72
|
+
hasStringProp(object, 'taskId') &&
|
|
73
|
+
hasStringProp(object, 'feature') &&
|
|
74
|
+
hasStringProp(object, 'value')
|
|
75
|
+
);
|
|
66
76
|
}
|
|
67
77
|
|
|
68
|
-
export function create(options: { taskId: string;
|
|
78
|
+
export function create(options: { taskId: string; feature: 'duration' | 'taskType'; value: string }): EditTaskOperation {
|
|
69
79
|
return {
|
|
70
80
|
kind: KIND,
|
|
71
81
|
isOperation: true,
|
|
@@ -127,12 +137,12 @@ export class TaskEditor extends AbstractUIExtension {
|
|
|
127
137
|
this.autoSuggestion.initialize(containerElement);
|
|
128
138
|
}
|
|
129
139
|
|
|
130
|
-
override show(root: Readonly<
|
|
140
|
+
override show(root: Readonly<GModelRoot>, ...contextElementIds: string[]): void {
|
|
131
141
|
super.show(root, ...contextElementIds);
|
|
132
142
|
this.autoSuggestion.open(root);
|
|
133
143
|
}
|
|
134
144
|
|
|
135
|
-
protected override onBeforeShow(containerElement: HTMLElement, root: Readonly<
|
|
145
|
+
protected override onBeforeShow(containerElement: HTMLElement, root: Readonly<GModelRoot>, ...contextElementIds: string[]): void {
|
|
136
146
|
this.task = getTask(contextElementIds, root.index)[0];
|
|
137
147
|
this.autoSuggestion.inputField.value = '';
|
|
138
148
|
this.setPosition(containerElement);
|
|
@@ -178,8 +188,17 @@ export class TaskEditor extends AbstractUIExtension {
|
|
|
178
188
|
}
|
|
179
189
|
|
|
180
190
|
protected executeFromTextOnlyInput(input: string): void {
|
|
181
|
-
|
|
182
|
-
|
|
191
|
+
if (input.startsWith('duration:')) {
|
|
192
|
+
const value = input.substring('duration:'.length);
|
|
193
|
+
const action = EditTaskOperation.create({ taskId: this.task.id, feature: 'duration', value });
|
|
194
|
+
this.actionDispatcher.dispatch(action);
|
|
195
|
+
} else if (input.startsWith('taskType:')) {
|
|
196
|
+
const value = input.substring('taskType:'.length);
|
|
197
|
+
const action = EditTaskOperation.create({ taskId: this.task.id, feature: 'taskType', value });
|
|
198
|
+
this.actionDispatcher.dispatch(action);
|
|
199
|
+
} else {
|
|
200
|
+
throw new Error('Unsupported Task Editing: ' + input);
|
|
201
|
+
}
|
|
183
202
|
}
|
|
184
203
|
|
|
185
204
|
override hide(): void {
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
export * from './direct-task-editing/direct-task-editor';
|
|
18
17
|
export * from './model';
|
|
18
|
+
export * from './workflow-diagram-module';
|
|
19
19
|
export * from './workflow-views';
|
|
20
|
-
export * from './direct-task-editing/direct-task-editor';
|
|
21
|
-
export { createWorkflowDiagramContainer };
|
package/src/model.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
DiamondNode,
|
|
21
21
|
EditableLabel,
|
|
22
22
|
fadeFeature,
|
|
23
|
+
GEdge,
|
|
23
24
|
hoverFeedbackFeature,
|
|
24
25
|
isEditableLabel,
|
|
25
26
|
layoutableChildFeature,
|
|
@@ -30,11 +31,10 @@ import {
|
|
|
30
31
|
nameFeature,
|
|
31
32
|
popupFeature,
|
|
32
33
|
RectangularNode,
|
|
33
|
-
|
|
34
|
-
SEdge,
|
|
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,11 +71,11 @@ 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
|
|
|
78
|
-
export class WeightedEdge extends
|
|
78
|
+
export class WeightedEdge extends GEdge {
|
|
79
79
|
probability?: string;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -90,7 +90,7 @@ export class ActivityNode extends DiamondNode {
|
|
|
90
90
|
|
|
91
91
|
export namespace ActivityNode {
|
|
92
92
|
export namespace Type {
|
|
93
|
-
export const INITIAL = '
|
|
93
|
+
export const INITIAL = 'initialNode';
|
|
94
94
|
export const FINAL = 'finalNode';
|
|
95
95
|
export const DECISION = 'decisionNode';
|
|
96
96
|
export const MERGE = 'mergeNode';
|
|
@@ -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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -14,30 +14,32 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import {
|
|
17
|
-
configureDefaultModelElements,
|
|
18
|
-
configureModelElement,
|
|
19
17
|
ConsoleLogger,
|
|
20
|
-
|
|
18
|
+
ContainerConfiguration,
|
|
19
|
+
DefaultTypes,
|
|
21
20
|
DeleteElementContextMenuItemProvider,
|
|
22
21
|
DiamondNodeView,
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
GEdge,
|
|
23
|
+
GGraph,
|
|
25
24
|
GLSPProjectionView,
|
|
26
25
|
GridSnapper,
|
|
27
26
|
LogLevel,
|
|
28
|
-
overrideViewerOptions,
|
|
29
27
|
RectangularNodeView,
|
|
30
28
|
RevealNamedElementActionProvider,
|
|
31
29
|
RoundedCornerNodeView,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
SLabelView,
|
|
30
|
+
GCompartment,
|
|
31
|
+
GCompartmentView,
|
|
32
|
+
GLabel,
|
|
33
|
+
GLabelView,
|
|
37
34
|
StructureCompartmentView,
|
|
38
|
-
TYPES
|
|
35
|
+
TYPES,
|
|
36
|
+
bindAsService,
|
|
37
|
+
bindOrRebind,
|
|
38
|
+
configureDefaultModelElements,
|
|
39
|
+
configureModelElement,
|
|
40
|
+
editLabelFeature,
|
|
41
|
+
initializeDiagramContainer
|
|
39
42
|
} from '@eclipse-glsp/client';
|
|
40
|
-
import { DefaultTypes } from '@eclipse-glsp/protocol';
|
|
41
43
|
import 'balloon-css/balloon.min.css';
|
|
42
44
|
import { Container, ContainerModule } from 'inversify';
|
|
43
45
|
import 'sprotty/css/edit-label.css';
|
|
@@ -46,38 +48,38 @@ import { directTaskEditor } from './direct-task-editing/di.config';
|
|
|
46
48
|
import { ActivityNode, CategoryNode, Icon, TaskNode, WeightedEdge } from './model';
|
|
47
49
|
import { IconView, WorkflowEdgeView } from './workflow-views';
|
|
48
50
|
|
|
49
|
-
const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
50
|
-
rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
|
|
51
|
-
rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
|
|
52
|
-
bind(TYPES.ISnapper).to(GridSnapper);
|
|
53
|
-
bind(TYPES.ICommandPaletteActionProvider).to(RevealNamedElementActionProvider);
|
|
54
|
-
bind(TYPES.IContextMenuItemProvider).to(DeleteElementContextMenuItemProvider);
|
|
51
|
+
export const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
55
52
|
const context = { bind, unbind, isBound, rebind };
|
|
56
53
|
|
|
54
|
+
bindOrRebind(context, TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
|
|
55
|
+
bindOrRebind(context, TYPES.LogLevel).toConstantValue(LogLevel.warn);
|
|
56
|
+
bind(TYPES.ISnapper).to(GridSnapper);
|
|
57
|
+
bindAsService(context, TYPES.ICommandPaletteActionProvider, RevealNamedElementActionProvider);
|
|
58
|
+
bindAsService(context, TYPES.IContextMenuItemProvider, DeleteElementContextMenuItemProvider);
|
|
59
|
+
|
|
57
60
|
configureDefaultModelElements(context);
|
|
58
61
|
configureModelElement(context, 'task:automated', TaskNode, RoundedCornerNodeView);
|
|
59
62
|
configureModelElement(context, 'task:manual', TaskNode, RoundedCornerNodeView);
|
|
60
|
-
configureModelElement(context, 'label:heading',
|
|
61
|
-
configureModelElement(context, 'comp:comp',
|
|
62
|
-
configureModelElement(context, 'comp:header',
|
|
63
|
-
configureModelElement(context, 'label:icon',
|
|
64
|
-
configureModelElement(context, DefaultTypes.EDGE,
|
|
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);
|
|
67
|
+
configureModelElement(context, DefaultTypes.EDGE, GEdge, WorkflowEdgeView);
|
|
65
68
|
configureModelElement(context, 'edge:weighted', WeightedEdge, WorkflowEdgeView);
|
|
66
69
|
configureModelElement(context, 'icon', Icon, IconView);
|
|
67
70
|
configureModelElement(context, 'activityNode:merge', ActivityNode, DiamondNodeView);
|
|
68
71
|
configureModelElement(context, 'activityNode:decision', ActivityNode, DiamondNodeView);
|
|
69
72
|
configureModelElement(context, 'activityNode:fork', ActivityNode, RectangularNodeView);
|
|
70
73
|
configureModelElement(context, 'activityNode:join', ActivityNode, RectangularNodeView);
|
|
71
|
-
configureModelElement(context, DefaultTypes.GRAPH,
|
|
74
|
+
configureModelElement(context, DefaultTypes.GRAPH, GGraph, GLSPProjectionView);
|
|
72
75
|
configureModelElement(context, 'category', CategoryNode, RoundedCornerNodeView);
|
|
73
|
-
configureModelElement(context, 'struct',
|
|
76
|
+
configureModelElement(context, 'struct', GCompartment, StructureCompartmentView);
|
|
74
77
|
});
|
|
75
78
|
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return container;
|
|
79
|
+
export function createWorkflowDiagramContainer(...containerConfiguration: ContainerConfiguration): Container {
|
|
80
|
+
return initializeWorkflowDiagramContainer(new Container(), ...containerConfiguration);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function initializeWorkflowDiagramContainer(container: Container, ...containerConfiguration: ContainerConfiguration): Container {
|
|
84
|
+
return initializeDiagramContainer(container, workflowDiagramModule, directTaskEditor, ...containerConfiguration);
|
|
83
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];
|
package/lib/di.config.d.ts
DELETED
package/lib/di.config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":"AAwCA,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAmB,MAAM,WAAW,CAAC;AACvD,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAgC5B,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAOnE"}
|
package/lib/di.config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAuB8B;AAC9B,qDAAsD;AACtD,uCAAqC;AACrC,yCAAuD;AACvD,sCAAoC;AACpC,8BAA4B;AAC5B,+DAAmE;AACnE,mCAAmF;AACnF,qDAA8D;AAE9D,MAAM,qBAAqB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAChF,MAAM,CAAC,cAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,sBAAa,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC3D,MAAM,CAAC,cAAK,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,iBAAQ,CAAC,IAAI,CAAC,CAAC;IACtD,IAAI,CAAC,cAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,oBAAW,CAAC,CAAC;IACrC,IAAI,CAAC,cAAK,CAAC,6BAA6B,CAAC,CAAC,EAAE,CAAC,yCAAgC,CAAC,CAAC;IAC/E,IAAI,CAAC,cAAK,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,6CAAoC,CAAC,CAAC;IAC9E,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAElD,IAAA,sCAA6B,EAAC,OAAO,CAAC,CAAC;IACvC,IAAA,8BAAqB,EA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AAC,CAAC;IAClF,IAAA,8BAAqB,EAAC,OAAO,EAAE,UAAU,EAAE,oBAAY,EAAE,8BAAqB,CAAC,CAAC;IAChF,IAAA,8BAAqB,EAAC,OAAO,EAAE,QAAQ,EAAE,qBAAY,EAAE,iCAAwB,CAAC,CAAC;AACrF,CAAC,CAAC,CAAC;AAEH,SAAwB,eAAe,CAAC,QAAgB;IACpD,MAAM,SAAS,GAAG,IAAA,8BAAqB,EAAC,qBAAqB,EAAE,4BAAgB,CAAC,CAAC;IACjF,IAAA,8BAAqB,EAAC,SAAS,EAAE;QAC7B,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,QAAQ,GAAG,SAAS;KAClC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACrB,CAAC;AAPD,kCAOC"}
|
package/scripts/config.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"releaseRepository": "https://repo1.maven.org/maven2/",
|
|
3
|
-
"snapshotRepository": "https://oss.sonatype.org/content/repositories/snapshots/",
|
|
4
|
-
"groupId": "org.eclipse.glsp.example",
|
|
5
|
-
"artifactId": "org.eclipse.glsp.example.workflow",
|
|
6
|
-
"version": "1.1.0",
|
|
7
|
-
"isSnapShot": true,
|
|
8
|
-
"classifier": "glsp"
|
|
9
|
-
}
|
package/scripts/download.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-2022 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 download from 'mvn-artifact-download';
|
|
17
|
-
import { join, resolve } from 'path';
|
|
18
|
-
import * as config from './config.json';
|
|
19
|
-
|
|
20
|
-
const downloadDir = resolve(join(__dirname)) + '/../../..';
|
|
21
|
-
|
|
22
|
-
const { groupId, artifactId, classifier, version, isSnapShot } = config;
|
|
23
|
-
const mavenRepository = isSnapShot ? config.snapshotRepository : config.releaseRepository;
|
|
24
|
-
|
|
25
|
-
console.log('Downloading latest version of the Workflow Example Java Server from the maven repository...');
|
|
26
|
-
download({ groupId, artifactId, version, classifier, isSnapShot }, downloadDir, mavenRepository).then(() =>
|
|
27
|
-
console.log(
|
|
28
|
-
'Download completed. Start the server using this command: \njava -jar org.eclipse.glsp.example.workflow-' +
|
|
29
|
-
version +
|
|
30
|
-
`${isSnapShot ? '-SNAPSHOT' : ''}` +
|
|
31
|
-
'-glsp.jar org.eclipse.glsp.example.workflow.launch.ExampleServerLauncher --port=8081 --websocket\n\n' +
|
|
32
|
-
'After starting the server, access the following file locally in your browser to see the running example:\n' +
|
|
33
|
-
'./examples/workflow-standalone/app/diagram.html'
|
|
34
|
-
)
|
|
35
|
-
);
|