@eclipse-glsp-examples/workflow-glsp 1.1.0-next.903b293.202 → 1.1.0-next.93fd4ec.241
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/di.config.d.ts +5 -2
- package/lib/di.config.d.ts.map +1 -1
- package/lib/di.config.js +16 -11
- package/lib/di.config.js.map +1 -1
- package/lib/direct-task-editing/di.config.d.ts.map +1 -1
- package/lib/direct-task-editing/di.config.js +3 -4
- package/lib/direct-task-editing/di.config.js.map +1 -1
- package/lib/direct-task-editing/direct-task-editor.d.ts +16 -11
- package/lib/direct-task-editing/direct-task-editor.d.ts.map +1 -1
- package/lib/direct-task-editing/direct-task-editor.js +26 -12
- 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 +3 -5
- package/lib/index.js.map +1 -1
- package/lib/model.d.ts +4 -4
- package/lib/model.d.ts.map +1 -1
- package/lib/model.js +3 -3
- package/lib/model.js.map +1 -1
- package/package.json +24 -24
- package/src/di.config.ts +23 -13
- package/src/direct-task-editing/di.config.ts +4 -5
- package/src/direct-task-editing/direct-task-editor.ts +32 -13
- package/src/index.ts +3 -5
- package/src/model.ts +4 -4
- package/scripts/config.json +0 -9
- package/scripts/download.ts +0 -35
package/lib/di.config.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { ContainerConfiguration } from '@eclipse-glsp/protocol';
|
|
1
2
|
import 'balloon-css/balloon.min.css';
|
|
2
|
-
import { Container } from 'inversify';
|
|
3
|
+
import { Container, ContainerModule } from 'inversify';
|
|
3
4
|
import 'sprotty/css/edit-label.css';
|
|
4
5
|
import '../css/diagram.css';
|
|
5
|
-
export
|
|
6
|
+
export declare const workflowDiagramModule: ContainerModule;
|
|
7
|
+
export declare function createWorkflowDiagramContainer(widgetId: string, ...containerConfiguration: ContainerConfiguration): Container;
|
|
8
|
+
export declare function initializeWorkflowDiagramContainer(container: Container, widgetId: string, ...containerConfiguration: ContainerConfiguration): Container;
|
|
6
9
|
//# sourceMappingURL=di.config.d.ts.map
|
package/lib/di.config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":"AAwCA,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":"AAwCA,OAAO,EAAgB,sBAAsB,EAAgB,MAAM,wBAAwB,CAAC;AAC5F,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,QAAQ,EAAE,MAAM,EAAE,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAE7H;AAED,wBAAgB,kCAAkC,CAC9C,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,MAAM,EAChB,GAAG,sBAAsB,EAAE,sBAAsB,GAClD,SAAS,CAOX"}
|
package/lib/di.config.js
CHANGED
|
@@ -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
|
|
@@ -24,13 +25,13 @@ require("../css/diagram.css");
|
|
|
24
25
|
const di_config_1 = require("./direct-task-editing/di.config");
|
|
25
26
|
const model_1 = require("./model");
|
|
26
27
|
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);
|
|
28
|
+
exports.workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
33
29
|
const context = { bind, unbind, isBound, rebind };
|
|
30
|
+
(0, protocol_1.bindOrRebind)(context, client_1.TYPES.ILogger).to(client_1.ConsoleLogger).inSingletonScope();
|
|
31
|
+
(0, protocol_1.bindOrRebind)(context, client_1.TYPES.LogLevel).toConstantValue(client_1.LogLevel.warn);
|
|
32
|
+
bind(client_1.TYPES.ISnapper).to(client_1.GridSnapper);
|
|
33
|
+
(0, client_1.bindAsService)(context, client_1.TYPES.ICommandPaletteActionProvider, client_1.RevealNamedElementActionProvider);
|
|
34
|
+
(0, client_1.bindAsService)(context, client_1.TYPES.IContextMenuItemProvider, client_1.DeleteElementContextMenuItemProvider);
|
|
34
35
|
(0, client_1.configureDefaultModelElements)(context);
|
|
35
36
|
(0, client_1.configureModelElement)(context, 'task:automated', model_1.TaskNode, client_1.RoundedCornerNodeView);
|
|
36
37
|
(0, client_1.configureModelElement)(context, 'task:manual', model_1.TaskNode, client_1.RoundedCornerNodeView);
|
|
@@ -38,7 +39,7 @@ const workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, isB
|
|
|
38
39
|
(0, client_1.configureModelElement)(context, 'comp:comp', client_1.SCompartment, client_1.SCompartmentView);
|
|
39
40
|
(0, client_1.configureModelElement)(context, 'comp:header', client_1.SCompartment, client_1.SCompartmentView);
|
|
40
41
|
(0, client_1.configureModelElement)(context, 'label:icon', client_1.SLabel, client_1.SLabelView);
|
|
41
|
-
(0, client_1.configureModelElement)(context, protocol_1.DefaultTypes.EDGE, client_1.
|
|
42
|
+
(0, client_1.configureModelElement)(context, protocol_1.DefaultTypes.EDGE, client_1.GEdge, workflow_views_1.WorkflowEdgeView);
|
|
42
43
|
(0, client_1.configureModelElement)(context, 'edge:weighted', model_1.WeightedEdge, workflow_views_1.WorkflowEdgeView);
|
|
43
44
|
(0, client_1.configureModelElement)(context, 'icon', model_1.Icon, workflow_views_1.IconView);
|
|
44
45
|
(0, client_1.configureModelElement)(context, 'activityNode:merge', model_1.ActivityNode, client_1.DiamondNodeView);
|
|
@@ -49,13 +50,17 @@ const workflowDiagramModule = new inversify_1.ContainerModule((bind, unbind, isB
|
|
|
49
50
|
(0, client_1.configureModelElement)(context, 'category', model_1.CategoryNode, client_1.RoundedCornerNodeView);
|
|
50
51
|
(0, client_1.configureModelElement)(context, 'struct', client_1.SCompartment, client_1.StructureCompartmentView);
|
|
51
52
|
});
|
|
52
|
-
function
|
|
53
|
-
|
|
53
|
+
function createWorkflowDiagramContainer(widgetId, ...containerConfiguration) {
|
|
54
|
+
return initializeWorkflowDiagramContainer(new inversify_1.Container(), widgetId, ...containerConfiguration);
|
|
55
|
+
}
|
|
56
|
+
exports.createWorkflowDiagramContainer = createWorkflowDiagramContainer;
|
|
57
|
+
function initializeWorkflowDiagramContainer(container, widgetId, ...containerConfiguration) {
|
|
58
|
+
(0, client_1.initializeDiagramContainer)(container, exports.workflowDiagramModule, di_config_1.directTaskEditor, ...containerConfiguration);
|
|
54
59
|
(0, client_1.overrideViewerOptions)(container, {
|
|
55
60
|
baseDiv: widgetId,
|
|
56
61
|
hiddenDiv: widgetId + '_hidden'
|
|
57
62
|
});
|
|
58
63
|
return container;
|
|
59
64
|
}
|
|
60
|
-
exports.
|
|
65
|
+
exports.initializeWorkflowDiagramContainer = initializeWorkflowDiagramContainer;
|
|
61
66
|
//# sourceMappingURL=di.config.js.map
|
package/lib/di.config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAwB8B;AAC9B,qDAA4F;AAC5F,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;IAElD,IAAA,uBAAY,EAAC,OAAO,EAAE,cAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,sBAAa,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC1E,IAAA,uBAAY,EAAC,OAAO,EAAE,cAAK,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,iBAAQ,CAAC,IAAI,CAAC,CAAC;IACrE,IAAI,CAAC,cAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,oBAAW,CAAC,CAAC;IACrC,IAAA,sBAAa,EAAC,OAAO,EAAE,cAAK,CAAC,6BAA6B,EAAE,yCAAgC,CAAC,CAAC;IAC9F,IAAA,sBAAa,EAAC,OAAO,EAAE,cAAK,CAAC,wBAAwB,EAAE,6CAAoC,CAAC,CAAC;IAE7F,IAAA,sCAA6B,EAAC,OAAO,CAAC,CAAC;IACvC,IAAA,8BAAqB,EAAC,OAAO,EAAE,gBAAgB,EAAE,gBAAQ,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AAO,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,SAAgB,8BAA8B,CAAC,QAAgB,EAAE,GAAG,sBAA8C;IAC9G,OAAO,kCAAkC,CAAC,IAAI,qBAAS,EAAE,EAAE,QAAQ,EAAE,GAAG,sBAAsB,CAAC,CAAC;AACpG,CAAC;AAFD,wEAEC;AAED,SAAgB,kCAAkC,CAC9C,SAAoB,EACpB,QAAgB,EAChB,GAAG,sBAA8C;IAEjD,IAAA,mCAA0B,EAAC,SAAS,EAAE,6BAAqB,EAAE,4BAAgB,EAAE,GAAG,sBAAsB,CAAC,CAAC;IAC1G,IAAA,8BAAqB,EAAC,SAAS,EAAE;QAC7B,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,QAAQ,GAAG,SAAS;KAClC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACrB,CAAC;AAXD,gFAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/di.config.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../src/direct-task-editing/di.config.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,eAAO,MAAM,gBAAgB,iBAE3B,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
|
|
@@ -19,8 +19,7 @@ exports.directTaskEditor = void 0;
|
|
|
19
19
|
const client_1 = require("@eclipse-glsp/client");
|
|
20
20
|
const inversify_1 = require("inversify");
|
|
21
21
|
const direct_task_editor_1 = require("./direct-task-editor");
|
|
22
|
-
exports.directTaskEditor = new inversify_1.ContainerModule((bind, _unbind,
|
|
23
|
-
|
|
24
|
-
bind(client_1.TYPES.IUIExtension).toService(direct_task_editor_1.TaskEditor);
|
|
22
|
+
exports.directTaskEditor = new inversify_1.ContainerModule((bind, _unbind, _isBound) => {
|
|
23
|
+
(0, client_1.bindAsService)(bind, client_1.TYPES.IUIExtension, direct_task_editor_1.TaskEditor);
|
|
25
24
|
});
|
|
26
25
|
//# 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,iDAA4D;AAC5D,yCAA4C;AAC5C,6DAAkD;AAErC,QAAA,gBAAgB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;IAC5E,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
|
|
@@ -18,26 +18,31 @@ import { DOMHelper } from 'sprotty/lib/base/views/dom-helper';
|
|
|
18
18
|
import { TaskNode } from '../model';
|
|
19
19
|
/**
|
|
20
20
|
* Is send from the {@link TaskEditor} to the GLSP server
|
|
21
|
-
* to
|
|
21
|
+
* to update a feature from a specified task.
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
24
|
-
kind: typeof
|
|
23
|
+
export interface EditTaskOperation extends Operation {
|
|
24
|
+
kind: typeof EditTaskOperation.KIND;
|
|
25
25
|
/**
|
|
26
26
|
* Id of the task that should be edited
|
|
27
27
|
*/
|
|
28
28
|
taskId: string;
|
|
29
29
|
/**
|
|
30
|
-
* The
|
|
30
|
+
* The feature that is to be updated
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
feature: 'duration' | 'taskType';
|
|
33
|
+
/**
|
|
34
|
+
* The new feature value
|
|
35
|
+
*/
|
|
36
|
+
value: string;
|
|
33
37
|
}
|
|
34
|
-
export declare namespace
|
|
35
|
-
const KIND = "
|
|
36
|
-
function is(object: any): object is
|
|
38
|
+
export declare namespace EditTaskOperation {
|
|
39
|
+
const KIND = "editTask";
|
|
40
|
+
function is(object: any): object is EditTaskOperation;
|
|
37
41
|
function create(options: {
|
|
38
42
|
taskId: string;
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
feature: 'duration' | 'taskType';
|
|
44
|
+
value: string;
|
|
45
|
+
}): EditTaskOperation;
|
|
41
46
|
}
|
|
42
47
|
export declare class TaskEditor extends AbstractUIExtension {
|
|
43
48
|
static readonly ID = "task-editor";
|
|
@@ -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,EAEpB,oB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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
|
|
@@ -30,18 +30,21 @@ const client_1 = require("@eclipse-glsp/client");
|
|
|
30
30
|
const inversify_1 = require("inversify");
|
|
31
31
|
const dom_helper_1 = require("sprotty/lib/base/views/dom-helper");
|
|
32
32
|
const model_1 = require("../model");
|
|
33
|
-
var
|
|
34
|
-
(function (
|
|
35
|
-
|
|
33
|
+
var EditTaskOperation;
|
|
34
|
+
(function (EditTaskOperation) {
|
|
35
|
+
EditTaskOperation.KIND = 'editTask';
|
|
36
36
|
function is(object) {
|
|
37
|
-
return client_1.
|
|
37
|
+
return (client_1.Action.hasKind(object, EditTaskOperation.KIND) &&
|
|
38
|
+
(0, client_1.hasStringProp)(object, 'taskId') &&
|
|
39
|
+
(0, client_1.hasStringProp)(object, 'feature') &&
|
|
40
|
+
(0, client_1.hasStringProp)(object, 'value'));
|
|
38
41
|
}
|
|
39
|
-
|
|
42
|
+
EditTaskOperation.is = is;
|
|
40
43
|
function create(options) {
|
|
41
|
-
return Object.assign({ kind:
|
|
44
|
+
return Object.assign({ kind: EditTaskOperation.KIND, isOperation: true }, options);
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
})(
|
|
46
|
+
EditTaskOperation.create = create;
|
|
47
|
+
})(EditTaskOperation = exports.EditTaskOperation || (exports.EditTaskOperation = {}));
|
|
45
48
|
let TaskEditor = TaskEditor_1 = class TaskEditor extends client_1.AbstractUIExtension {
|
|
46
49
|
constructor() {
|
|
47
50
|
super(...arguments);
|
|
@@ -105,8 +108,19 @@ let TaskEditor = TaskEditor_1 = class TaskEditor extends client_1.AbstractUIExte
|
|
|
105
108
|
this.actionDispatcher.dispatchAll((0, client_1.toActionArray)(input));
|
|
106
109
|
}
|
|
107
110
|
executeFromTextOnlyInput(input) {
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
if (input.startsWith('duration:')) {
|
|
112
|
+
const value = input.substring('duration:'.length);
|
|
113
|
+
const action = EditTaskOperation.create({ taskId: this.task.id, feature: 'duration', value });
|
|
114
|
+
this.actionDispatcher.dispatch(action);
|
|
115
|
+
}
|
|
116
|
+
else if (input.startsWith('taskType:')) {
|
|
117
|
+
const value = input.substring('taskType:'.length);
|
|
118
|
+
const action = EditTaskOperation.create({ taskId: this.task.id, feature: 'taskType', value });
|
|
119
|
+
this.actionDispatcher.dispatch(action);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
throw new Error('Unsupported Task Editing: ' + input);
|
|
123
|
+
}
|
|
110
124
|
}
|
|
111
125
|
hide() {
|
|
112
126
|
this.autoSuggestion.dispose();
|
|
@@ -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,iDAsB8B;AAC9B,yCAA+C;AAC/C,kEAA8D;AAC9D,oCAAgD;
|
|
1
|
+
{"version":3,"file":"direct-task-editor.js","sourceRoot":"","sources":["../../src/direct-task-editing/direct-task-editor.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAsB8B;AAC9B,yCAA+C;AAC/C,kEAA8D;AAC9D,oCAAgD;AAyBhD,IAAiB,iBAAiB,CAmBjC;AAnBD,WAAiB,iBAAiB;IACjB,sBAAI,GAAG,UAAU,CAAC;IAE/B,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,CACH,eAAM,CAAC,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,OAAO,CAAC;;0CACa;AAtB1B,UAAU;IADtB,IAAA,sBAAU,GAAE;GACA,UAAU,CAwHtB;AAxHY,gCAAU;AA0HvB,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 './di.config';
|
|
17
|
+
export * from './direct-task-editing/direct-task-editor';
|
|
17
18
|
export * from './model';
|
|
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,aAAa,CAAC;AAC5B,cAAc,0CAA0C,CAAC;AACzD,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -14,9 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createWorkflowDiagramContainer = void 0;
|
|
18
17
|
/********************************************************************************
|
|
19
|
-
* Copyright (c) 2019-
|
|
18
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
20
19
|
*
|
|
21
20
|
* This program and the accompanying materials are made available under the
|
|
22
21
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -30,9 +29,8 @@ exports.createWorkflowDiagramContainer = void 0;
|
|
|
30
29
|
*
|
|
31
30
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
32
31
|
********************************************************************************/
|
|
33
|
-
|
|
34
|
-
exports
|
|
32
|
+
__exportStar(require("./di.config"), exports);
|
|
33
|
+
__exportStar(require("./direct-task-editing/direct-task-editor"), exports);
|
|
35
34
|
__exportStar(require("./model"), exports);
|
|
36
35
|
__exportStar(require("./workflow-views"), exports);
|
|
37
|
-
__exportStar(require("./direct-task-editing/direct-task-editor"), exports);
|
|
38
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,8CAA4B;AAC5B,2EAAyD;AACzD,0CAAwB;AACxB,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,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 { DiamondNode, EditableLabel, LayoutContainer, Nameable, RectangularNode, SChildElement,
|
|
16
|
+
import { DiamondNode, EditableLabel, GEdge, LayoutContainer, Nameable, RectangularNode, SChildElement, SModelElement, SShapeElement, 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;
|
|
@@ -23,7 +23,7 @@ export declare class TaskNode extends RectangularNode implements Nameable, WithE
|
|
|
23
23
|
get name(): string;
|
|
24
24
|
}
|
|
25
25
|
export declare function isTaskNode(element: SModelElement): element is TaskNode;
|
|
26
|
-
export declare class WeightedEdge extends
|
|
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";
|
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';
|
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,GAAG;IACxC,2BAAkB;IAClB,yBAAgB;IAChB,sBAAa;IACb,sBAAa;IACb,oBAAW;IACX,+BAAsB;IACtB,oBAAW;IACX,6BAAoB;IACpB,qBAAY;IACZ,oBAAW;IACX,6BAAoB;CACvB,CAAC;AAmBN,SAAgB,UAAU,CAAC,OAAsB;IAC7C,OAAO,OAAO,YAAY,QAAQ,IAAI,KAAK,CAAC;AAChD,CAAC;AAFD,gCAEC;AAED,MAAa,YAAa,SAAQ,cAAK;CAEtC;AAFD,oCAEC;AAED,MAAa,YAAa,SAAQ,oBAAW;IAA7C;;QACI,aAAQ,GAAW,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;QACtC,SAAI,GAAG;YACZ,KAAK,EAAE,EAAE;YACT,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B;IACpB,qBAAY;IACZ,oBAAW;IACX,6BAAoB;CACvB,CAAC"}
|
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.93fd4ec.241+93fd4ec",
|
|
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
|
-
"clean": "rimraf tsconfig.tsbuildinfo lib",
|
|
37
|
-
"build": "tsc -b",
|
|
38
|
-
"lint": "eslint --ext .ts,.tsx ./src",
|
|
39
|
-
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
|
|
40
|
-
"prepare": "yarn clean && yarn build ",
|
|
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.93fd4ec.241+93fd4ec",
|
|
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": "93fd4ece3dc9e1de392040d5bc481e8720a780b1"
|
|
56
56
|
}
|
package/src/di.config.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
|
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import {
|
|
17
|
+
bindAsService,
|
|
17
18
|
configureDefaultModelElements,
|
|
18
19
|
configureModelElement,
|
|
19
20
|
ConsoleLogger,
|
|
20
|
-
createClientContainer,
|
|
21
21
|
DeleteElementContextMenuItemProvider,
|
|
22
22
|
DiamondNodeView,
|
|
23
23
|
editLabelFeature,
|
|
24
|
+
GEdge,
|
|
24
25
|
GLSPGraph,
|
|
25
26
|
GLSPProjectionView,
|
|
26
27
|
GridSnapper,
|
|
28
|
+
initializeDiagramContainer,
|
|
27
29
|
LogLevel,
|
|
28
30
|
overrideViewerOptions,
|
|
29
31
|
RectangularNodeView,
|
|
@@ -31,13 +33,12 @@ import {
|
|
|
31
33
|
RoundedCornerNodeView,
|
|
32
34
|
SCompartment,
|
|
33
35
|
SCompartmentView,
|
|
34
|
-
SEdge,
|
|
35
36
|
SLabel,
|
|
36
37
|
SLabelView,
|
|
37
38
|
StructureCompartmentView,
|
|
38
39
|
TYPES
|
|
39
40
|
} from '@eclipse-glsp/client';
|
|
40
|
-
import { DefaultTypes } from '@eclipse-glsp/protocol';
|
|
41
|
+
import { bindOrRebind, ContainerConfiguration, DefaultTypes } from '@eclipse-glsp/protocol';
|
|
41
42
|
import 'balloon-css/balloon.min.css';
|
|
42
43
|
import { Container, ContainerModule } from 'inversify';
|
|
43
44
|
import 'sprotty/css/edit-label.css';
|
|
@@ -46,14 +47,15 @@ import { directTaskEditor } from './direct-task-editing/di.config';
|
|
|
46
47
|
import { ActivityNode, CategoryNode, Icon, TaskNode, WeightedEdge } from './model';
|
|
47
48
|
import { IconView, WorkflowEdgeView } from './workflow-views';
|
|
48
49
|
|
|
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);
|
|
50
|
+
export const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
55
51
|
const context = { bind, unbind, isBound, rebind };
|
|
56
52
|
|
|
53
|
+
bindOrRebind(context, TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
|
|
54
|
+
bindOrRebind(context, TYPES.LogLevel).toConstantValue(LogLevel.warn);
|
|
55
|
+
bind(TYPES.ISnapper).to(GridSnapper);
|
|
56
|
+
bindAsService(context, TYPES.ICommandPaletteActionProvider, RevealNamedElementActionProvider);
|
|
57
|
+
bindAsService(context, TYPES.IContextMenuItemProvider, DeleteElementContextMenuItemProvider);
|
|
58
|
+
|
|
57
59
|
configureDefaultModelElements(context);
|
|
58
60
|
configureModelElement(context, 'task:automated', TaskNode, RoundedCornerNodeView);
|
|
59
61
|
configureModelElement(context, 'task:manual', TaskNode, RoundedCornerNodeView);
|
|
@@ -61,7 +63,7 @@ const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind
|
|
|
61
63
|
configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
|
|
62
64
|
configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
|
|
63
65
|
configureModelElement(context, 'label:icon', SLabel, SLabelView);
|
|
64
|
-
configureModelElement(context, DefaultTypes.EDGE,
|
|
66
|
+
configureModelElement(context, DefaultTypes.EDGE, GEdge, WorkflowEdgeView);
|
|
65
67
|
configureModelElement(context, 'edge:weighted', WeightedEdge, WorkflowEdgeView);
|
|
66
68
|
configureModelElement(context, 'icon', Icon, IconView);
|
|
67
69
|
configureModelElement(context, 'activityNode:merge', ActivityNode, DiamondNodeView);
|
|
@@ -73,8 +75,16 @@ const workflowDiagramModule = new ContainerModule((bind, unbind, isBound, rebind
|
|
|
73
75
|
configureModelElement(context, 'struct', SCompartment, StructureCompartmentView);
|
|
74
76
|
});
|
|
75
77
|
|
|
76
|
-
export
|
|
77
|
-
|
|
78
|
+
export function createWorkflowDiagramContainer(widgetId: string, ...containerConfiguration: ContainerConfiguration): Container {
|
|
79
|
+
return initializeWorkflowDiagramContainer(new Container(), widgetId, ...containerConfiguration);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function initializeWorkflowDiagramContainer(
|
|
83
|
+
container: Container,
|
|
84
|
+
widgetId: string,
|
|
85
|
+
...containerConfiguration: ContainerConfiguration
|
|
86
|
+
): Container {
|
|
87
|
+
initializeDiagramContainer(container, workflowDiagramModule, directTaskEditor, ...containerConfiguration);
|
|
78
88
|
overrideViewerOptions(container, {
|
|
79
89
|
baseDiv: widgetId,
|
|
80
90
|
hiddenDiv: widgetId + '_hidden'
|
|
@@ -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,10 @@
|
|
|
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';
|
|
16
|
+
import { bindAsService, TYPES } from '@eclipse-glsp/client';
|
|
17
17
|
import { ContainerModule } from 'inversify';
|
|
18
18
|
import { TaskEditor } from './direct-task-editor';
|
|
19
19
|
|
|
20
|
-
export const directTaskEditor = new ContainerModule((bind, _unbind,
|
|
21
|
-
bind
|
|
22
|
-
bind(TYPES.IUIExtension).toService(TaskEditor);
|
|
20
|
+
export const directTaskEditor = new ContainerModule((bind, _unbind, _isBound) => {
|
|
21
|
+
bindAsService(bind, TYPES.IUIExtension, TaskEditor);
|
|
23
22
|
});
|
|
@@ -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
|
|
@@ -42,10 +42,10 @@ import { isTaskNode, TaskNode } 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,
|
|
@@ -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 './di.config';
|
|
17
|
+
export * from './direct-task-editing/direct-task-editor';
|
|
18
18
|
export * from './model';
|
|
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,
|
|
@@ -31,7 +32,6 @@ import {
|
|
|
31
32
|
popupFeature,
|
|
32
33
|
RectangularNode,
|
|
33
34
|
SChildElement,
|
|
34
|
-
SEdge,
|
|
35
35
|
selectFeature,
|
|
36
36
|
SModelElement,
|
|
37
37
|
SShapeElement,
|
|
@@ -75,7 +75,7 @@ export function isTaskNode(element: SModelElement): 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';
|
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
|
-
);
|