@eclipse-glsp-examples/workflow-server 0.9.0-next.5ce3b9a.1

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.
Files changed (162) hide show
  1. package/LICENSE +277 -0
  2. package/lib/app.d.ts +2 -0
  3. package/lib/app.d.ts.map +1 -0
  4. package/lib/app.js +34 -0
  5. package/lib/app.js.map +1 -0
  6. package/lib/graph-extension.d.ts +60 -0
  7. package/lib/graph-extension.d.ts.map +1 -0
  8. package/lib/graph-extension.js +156 -0
  9. package/lib/graph-extension.js.map +1 -0
  10. package/lib/handler/create-activity-node-handler.d.ts +23 -0
  11. package/lib/handler/create-activity-node-handler.d.ts.map +1 -0
  12. package/lib/handler/create-activity-node-handler.js +45 -0
  13. package/lib/handler/create-activity-node-handler.js.map +1 -0
  14. package/lib/handler/create-automated-task-handler.d.ts +9 -0
  15. package/lib/handler/create-automated-task-handler.d.ts.map +1 -0
  16. package/lib/handler/create-automated-task-handler.js +42 -0
  17. package/lib/handler/create-automated-task-handler.js.map +1 -0
  18. package/lib/handler/create-category-handler.d.ts +25 -0
  19. package/lib/handler/create-category-handler.d.ts.map +1 -0
  20. package/lib/handler/create-category-handler.js +41 -0
  21. package/lib/handler/create-category-handler.js.map +1 -0
  22. package/lib/handler/create-decision-node-handler.d.ts +9 -0
  23. package/lib/handler/create-decision-node-handler.d.ts.map +1 -0
  24. package/lib/handler/create-decision-node-handler.js +42 -0
  25. package/lib/handler/create-decision-node-handler.js.map +1 -0
  26. package/lib/handler/create-edge-handler.d.ts +22 -0
  27. package/lib/handler/create-edge-handler.d.ts.map +1 -0
  28. package/lib/handler/create-edge-handler.js +31 -0
  29. package/lib/handler/create-edge-handler.js.map +1 -0
  30. package/lib/handler/create-fork-node-handler.d.ts +6 -0
  31. package/lib/handler/create-fork-node-handler.d.ts.map +1 -0
  32. package/lib/handler/create-fork-node-handler.js +39 -0
  33. package/lib/handler/create-fork-node-handler.js.map +1 -0
  34. package/lib/handler/create-fork-or-join-node-handler.d.ts +22 -0
  35. package/lib/handler/create-fork-or-join-node-handler.d.ts.map +1 -0
  36. package/lib/handler/create-fork-or-join-node-handler.js +21 -0
  37. package/lib/handler/create-fork-or-join-node-handler.js.map +1 -0
  38. package/lib/handler/create-join-node-handler.d.ts +6 -0
  39. package/lib/handler/create-join-node-handler.d.ts.map +1 -0
  40. package/lib/handler/create-join-node-handler.js +39 -0
  41. package/lib/handler/create-join-node-handler.js.map +1 -0
  42. package/lib/handler/create-manual-task-handler.d.ts +9 -0
  43. package/lib/handler/create-manual-task-handler.d.ts.map +1 -0
  44. package/lib/handler/create-manual-task-handler.js +42 -0
  45. package/lib/handler/create-manual-task-handler.js.map +1 -0
  46. package/lib/handler/create-merge-node-handler.d.ts +9 -0
  47. package/lib/handler/create-merge-node-handler.d.ts.map +1 -0
  48. package/lib/handler/create-merge-node-handler.js +42 -0
  49. package/lib/handler/create-merge-node-handler.js.map +1 -0
  50. package/lib/handler/create-task-handler.d.ts +24 -0
  51. package/lib/handler/create-task-handler.d.ts.map +1 -0
  52. package/lib/handler/create-task-handler.js +48 -0
  53. package/lib/handler/create-task-handler.js.map +1 -0
  54. package/lib/handler/create-weighted-edge-handler.d.ts +22 -0
  55. package/lib/handler/create-weighted-edge-handler.d.ts.map +1 -0
  56. package/lib/handler/create-weighted-edge-handler.js +33 -0
  57. package/lib/handler/create-weighted-edge-handler.js.map +1 -0
  58. package/lib/handler/create-workflow-node-operation-handler.d.ts +24 -0
  59. package/lib/handler/create-workflow-node-operation-handler.d.ts.map +1 -0
  60. package/lib/handler/create-workflow-node-operation-handler.js +62 -0
  61. package/lib/handler/create-workflow-node-operation-handler.js.map +1 -0
  62. package/lib/handler/grid-snapper.d.ts +22 -0
  63. package/lib/handler/grid-snapper.d.ts.map +1 -0
  64. package/lib/handler/grid-snapper.js +20 -0
  65. package/lib/handler/grid-snapper.js.map +1 -0
  66. package/lib/index.d.ts +17 -0
  67. package/lib/index.d.ts.map +1 -0
  68. package/lib/index.js +21 -0
  69. package/lib/index.js.map +1 -0
  70. package/lib/labeledit/workflow-label-edit-validator.d.ts +21 -0
  71. package/lib/labeledit/workflow-label-edit-validator.d.ts.map +1 -0
  72. package/lib/labeledit/workflow-label-edit-validator.js +55 -0
  73. package/lib/labeledit/workflow-label-edit-validator.js.map +1 -0
  74. package/lib/marker/workflow-model-validator.d.ts +29 -0
  75. package/lib/marker/workflow-model-validator.d.ts.map +1 -0
  76. package/lib/marker/workflow-model-validator.js +150 -0
  77. package/lib/marker/workflow-model-validator.js.map +1 -0
  78. package/lib/model/workflow-navigation-target-resolver.d.ts +24 -0
  79. package/lib/model/workflow-navigation-target-resolver.d.ts.map +1 -0
  80. package/lib/model/workflow-navigation-target-resolver.js +40 -0
  81. package/lib/model/workflow-navigation-target-resolver.js.map +1 -0
  82. package/lib/provider/abstract-next-or-previous-navigation-target-provider.d.ts +29 -0
  83. package/lib/provider/abstract-next-or-previous-navigation-target-provider.d.ts.map +1 -0
  84. package/lib/provider/abstract-next-or-previous-navigation-target-provider.js +60 -0
  85. package/lib/provider/abstract-next-or-previous-navigation-target-provider.js.map +1 -0
  86. package/lib/provider/next-node-navigation-target-provider.d.ts +24 -0
  87. package/lib/provider/next-node-navigation-target-provider.d.ts.map +1 -0
  88. package/lib/provider/next-node-navigation-target-provider.js +28 -0
  89. package/lib/provider/next-node-navigation-target-provider.js.map +1 -0
  90. package/lib/provider/node-documentation-navigation-target-provider.d.ts +24 -0
  91. package/lib/provider/node-documentation-navigation-target-provider.d.ts.map +1 -0
  92. package/lib/provider/node-documentation-navigation-target-provider.js +50 -0
  93. package/lib/provider/node-documentation-navigation-target-provider.js.map +1 -0
  94. package/lib/provider/previous-node-navigation-target-provider.d.ts +24 -0
  95. package/lib/provider/previous-node-navigation-target-provider.d.ts.map +1 -0
  96. package/lib/provider/previous-node-navigation-target-provider.js +28 -0
  97. package/lib/provider/previous-node-navigation-target-provider.js.map +1 -0
  98. package/lib/provider/workflow-command-palette-action-provider.d.ts +25 -0
  99. package/lib/provider/workflow-command-palette-action-provider.d.ts.map +1 -0
  100. package/lib/provider/workflow-command-palette-action-provider.js +92 -0
  101. package/lib/provider/workflow-command-palette-action-provider.js.map +1 -0
  102. package/lib/provider/workflow-context-menu-item-provider.d.ts +21 -0
  103. package/lib/provider/workflow-context-menu-item-provider.d.ts.map +1 -0
  104. package/lib/provider/workflow-context-menu-item-provider.js +54 -0
  105. package/lib/provider/workflow-context-menu-item-provider.js.map +1 -0
  106. package/lib/util/model-types.d.ts +35 -0
  107. package/lib/util/model-types.d.ts.map +1 -0
  108. package/lib/util/model-types.js +60 -0
  109. package/lib/util/model-types.js.map +1 -0
  110. package/lib/workflow-diagram-configuration.d.ts +28 -0
  111. package/lib/workflow-diagram-configuration.d.ts.map +1 -0
  112. package/lib/workflow-diagram-configuration.js +125 -0
  113. package/lib/workflow-diagram-configuration.js.map +1 -0
  114. package/lib/workflow-diagram-module.d.ts +28 -0
  115. package/lib/workflow-diagram-module.d.ts.map +1 -0
  116. package/lib/workflow-diagram-module.js +100 -0
  117. package/lib/workflow-diagram-module.js.map +1 -0
  118. package/lib/workflow-glsp-server.d.ts +23 -0
  119. package/lib/workflow-glsp-server.d.ts.map +1 -0
  120. package/lib/workflow-glsp-server.js +54 -0
  121. package/lib/workflow-glsp-server.js.map +1 -0
  122. package/lib/workflow-model-index.d.ts +20 -0
  123. package/lib/workflow-model-index.d.ts.map +1 -0
  124. package/lib/workflow-model-index.js +43 -0
  125. package/lib/workflow-model-index.js.map +1 -0
  126. package/lib/workflow-popup-factory.d.ts +21 -0
  127. package/lib/workflow-popup-factory.d.ts.map +1 -0
  128. package/lib/workflow-popup-factory.js +54 -0
  129. package/lib/workflow-popup-factory.js.map +1 -0
  130. package/package.json +63 -0
  131. package/src/app.ts +32 -0
  132. package/src/graph-extension.ts +186 -0
  133. package/src/handler/create-activity-node-handler.ts +34 -0
  134. package/src/handler/create-automated-task-handler.ts +30 -0
  135. package/src/handler/create-category-handler.ts +36 -0
  136. package/src/handler/create-decision-node-handler.ts +30 -0
  137. package/src/handler/create-edge-handler.ts +25 -0
  138. package/src/handler/create-fork-node-handler.ts +24 -0
  139. package/src/handler/create-fork-or-join-node-handler.ts +26 -0
  140. package/src/handler/create-join-node-handler.ts +24 -0
  141. package/src/handler/create-manual-task-handler.ts +30 -0
  142. package/src/handler/create-merge-node-handler.ts +30 -0
  143. package/src/handler/create-task-handler.ts +38 -0
  144. package/src/handler/create-weighted-edge-handler.ts +27 -0
  145. package/src/handler/create-workflow-node-operation-handler.ts +56 -0
  146. package/src/handler/grid-snapper.ts +32 -0
  147. package/src/index.ts +19 -0
  148. package/src/labeledit/workflow-label-edit-validator.ts +39 -0
  149. package/src/marker/workflow-model-validator.ts +137 -0
  150. package/src/model/workflow-navigation-target-resolver.ts +40 -0
  151. package/src/provider/abstract-next-or-previous-navigation-target-provider.ts +53 -0
  152. package/src/provider/next-node-navigation-target-provider.ts +31 -0
  153. package/src/provider/node-documentation-navigation-target-provider.ts +52 -0
  154. package/src/provider/previous-node-navigation-target-provider.ts +31 -0
  155. package/src/provider/workflow-command-palette-action-provider.ts +124 -0
  156. package/src/provider/workflow-context-menu-item-provider.ts +38 -0
  157. package/src/util/model-types.ts +55 -0
  158. package/src/workflow-diagram-configuration.ts +122 -0
  159. package/src/workflow-diagram-module.ts +107 -0
  160. package/src/workflow-glsp-server.ts +37 -0
  161. package/src/workflow-model-index.ts +31 -0
  162. package/src/workflow-popup-factory.ts +46 -0
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModelTypes = void 0;
4
+ /********************************************************************************
5
+ * Copyright (c) 2022 STMicroelectronics and others.
6
+ *
7
+ * This program and the accompanying materials are made available under the
8
+ * terms of the Eclipse Public License v. 2.0 which is available at
9
+ * http://www.eclipse.org/legal/epl-2.0.
10
+ *
11
+ * This Source Code may also be made available under the following Secondary
12
+ * Licenses when the conditions for such availability set forth in the Eclipse
13
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
+ * with the GNU Classpath Exception which is available at
15
+ * https://www.gnu.org/software/classpath/license.html.
16
+ *
17
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
+ ********************************************************************************/
19
+ /* eslint-disable @typescript-eslint/padding-line-between-statements */
20
+ var ModelTypes;
21
+ (function (ModelTypes) {
22
+ ModelTypes.LABEL_HEADING = 'label:heading';
23
+ ModelTypes.LABEL_TEXT = 'label:text';
24
+ ModelTypes.COMP_HEADER = 'comp:header';
25
+ ModelTypes.LABEL_ICON = 'label:icon';
26
+ ModelTypes.WEIGHTED_EDGE = 'edge:weighted';
27
+ ModelTypes.ICON = 'icon';
28
+ ModelTypes.ACTIVITY_NODE = 'activityNode';
29
+ ModelTypes.DECISION_NODE = `${ModelTypes.ACTIVITY_NODE}:decision`;
30
+ ModelTypes.MERGE_NODE = `${ModelTypes.ACTIVITY_NODE}:merge`;
31
+ ModelTypes.FORK_NODE = `${ModelTypes.ACTIVITY_NODE}:fork`;
32
+ ModelTypes.JOIN_NODE = `${ModelTypes.ACTIVITY_NODE}:join`;
33
+ ModelTypes.TASK = 'task';
34
+ ModelTypes.MANUAL_TASK = `${ModelTypes.TASK}:manual`;
35
+ ModelTypes.AUTOMATED_TASK = `${ModelTypes.TASK}:automated`;
36
+ ModelTypes.CATEGORY = 'category';
37
+ ModelTypes.STRUCTURE = 'struct';
38
+ function toNodeType(type) {
39
+ switch (type) {
40
+ case ModelTypes.DECISION_NODE:
41
+ return 'decisionNode';
42
+ case ModelTypes.MERGE_NODE:
43
+ return 'mergeNode';
44
+ case ModelTypes.FORK_NODE:
45
+ return 'forkNode';
46
+ case ModelTypes.JOIN_NODE:
47
+ return 'joinNode';
48
+ case ModelTypes.MANUAL_TASK:
49
+ return 'manual';
50
+ case ModelTypes.AUTOMATED_TASK:
51
+ return 'automated';
52
+ case ModelTypes.CATEGORY:
53
+ return 'category';
54
+ default:
55
+ return 'unknown';
56
+ }
57
+ }
58
+ ModelTypes.toNodeType = toNodeType;
59
+ })(ModelTypes = exports.ModelTypes || (exports.ModelTypes = {}));
60
+ //# sourceMappingURL=model-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-types.js","sourceRoot":"","sources":["../../src/util/model-types.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,uEAAuE;AACvE,IAAiB,UAAU,CAsC1B;AAtCD,WAAiB,UAAU;IACV,wBAAa,GAAG,eAAe,CAAC;IAChC,qBAAU,GAAG,YAAY,CAAC;IAC1B,sBAAW,GAAG,aAAa,CAAC;IAC5B,qBAAU,GAAG,YAAY,CAAC;IAC1B,wBAAa,GAAG,eAAe,CAAC;IAChC,eAAI,GAAG,MAAM,CAAC;IACd,wBAAa,GAAG,cAAc,CAAC;IAC/B,wBAAa,GAAG,GAAG,WAAA,aAAa,WAAW,CAAC;IAC5C,qBAAU,GAAG,GAAG,WAAA,aAAa,QAAQ,CAAC;IACtC,oBAAS,GAAG,GAAG,WAAA,aAAa,OAAO,CAAC;IACpC,oBAAS,GAAG,GAAG,WAAA,aAAa,OAAO,CAAC;IACpC,eAAI,GAAG,MAAM,CAAC;IACd,sBAAW,GAAG,GAAG,WAAA,IAAI,SAAS,CAAC;IAC/B,yBAAc,GAAG,GAAG,WAAA,IAAI,YAAY,CAAC;IACrC,mBAAQ,GAAG,UAAU,CAAC;IACtB,oBAAS,GAAG,QAAQ,CAAC;IAElC,SAAgB,UAAU,CAAC,IAAY;QACnC,QAAQ,IAAI,EAAE;YACV,KAAK,WAAA,aAAa;gBACd,OAAO,cAAc,CAAC;YAC1B,KAAK,WAAA,UAAU;gBACX,OAAO,WAAW,CAAC;YACvB,KAAK,WAAA,SAAS;gBACV,OAAO,UAAU,CAAC;YACtB,KAAK,WAAA,SAAS;gBACV,OAAO,UAAU,CAAC;YACtB,KAAK,WAAA,WAAW;gBACZ,OAAO,QAAQ,CAAC;YACpB,KAAK,WAAA,cAAc;gBACf,OAAO,WAAW,CAAC;YACvB,KAAK,WAAA,QAAQ;gBACT,OAAO,UAAU,CAAC;YACtB;gBACI,OAAO,SAAS,CAAC;SACxB;IACL,CAAC;IAnBe,qBAAU,aAmBzB,CAAA;AACL,CAAC,EAtCgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAsC1B"}
@@ -0,0 +1,28 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 STMicroelectronics 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 { EdgeTypeHint, ShapeTypeHint } from '@eclipse-glsp/protocol';
17
+ import { DiagramConfiguration, GModelElementConstructor, ServerLayoutKind } from '@eclipse-glsp/server-node';
18
+ export declare class WorkflowDiagramConfiguration implements DiagramConfiguration {
19
+ get typeMapping(): Map<string, GModelElementConstructor>;
20
+ get shapeTypeHints(): ShapeTypeHint[];
21
+ get edgeTypeHints(): EdgeTypeHint[];
22
+ layoutKind: ServerLayoutKind;
23
+ needsClientLayout: boolean;
24
+ animatedUpdate: boolean;
25
+ }
26
+ export declare function createDefaultShapeTypeHint(elementId: string): ShapeTypeHint;
27
+ export declare function createDefaultEdgeTypeHint(elementId: string): EdgeTypeHint;
28
+ //# sourceMappingURL=workflow-diagram-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-diagram-configuration.d.ts","sourceRoot":"","sources":["../src/workflow-diagram-configuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAgB,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EACH,oBAAoB,EAKpB,wBAAwB,EACxB,gBAAgB,EACnB,MAAM,2BAA2B,CAAC;AAKnC,qBACa,4BAA6B,YAAW,oBAAoB;IACrE,IAAI,WAAW,IAAI,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAavD;IAED,IAAI,cAAc,IAAI,aAAa,EAAE,CAyBpC;IAED,IAAI,aAAa,IAAI,YAAY,EAAE,CAYlC;IAED,UAAU,mBAA2B;IACrC,iBAAiB,UAAQ;IACzB,cAAc,UAAQ;CACzB;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAE3E;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,CAyBzE"}
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.createDefaultEdgeTypeHint = exports.createDefaultShapeTypeHint = exports.WorkflowDiagramConfiguration = void 0;
10
+ /********************************************************************************
11
+ * Copyright (c) 2022 STMicroelectronics and others.
12
+ *
13
+ * This program and the accompanying materials are made available under the
14
+ * terms of the Eclipse Public License v. 2.0 which is available at
15
+ * http://www.eclipse.org/legal/epl-2.0.
16
+ *
17
+ * This Source Code may also be made available under the following Secondary
18
+ * Licenses when the conditions for such availability set forth in the Eclipse
19
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
20
+ * with the GNU Classpath Exception which is available at
21
+ * https://www.gnu.org/software/classpath/license.html.
22
+ *
23
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
24
+ ********************************************************************************/
25
+ const protocol_1 = require("@eclipse-glsp/protocol");
26
+ const server_node_1 = require("@eclipse-glsp/server-node");
27
+ const inversify_1 = require("inversify");
28
+ const graph_extension_1 = require("./graph-extension");
29
+ const model_types_1 = require("./util/model-types");
30
+ let WorkflowDiagramConfiguration = class WorkflowDiagramConfiguration {
31
+ constructor() {
32
+ this.layoutKind = server_node_1.ServerLayoutKind.MANUAL;
33
+ this.needsClientLayout = true;
34
+ this.animatedUpdate = true;
35
+ }
36
+ get typeMapping() {
37
+ const mapping = server_node_1.getDefaultMapping();
38
+ mapping.set(model_types_1.ModelTypes.LABEL_HEADING, server_node_1.GLabel);
39
+ mapping.set(model_types_1.ModelTypes.LABEL_TEXT, server_node_1.GLabel);
40
+ mapping.set(model_types_1.ModelTypes.COMP_HEADER, server_node_1.GCompartment);
41
+ mapping.set(model_types_1.ModelTypes.LABEL_ICON, server_node_1.GLabel);
42
+ mapping.set(model_types_1.ModelTypes.WEIGHTED_EDGE, server_node_1.GEdge);
43
+ mapping.set(model_types_1.ModelTypes.ICON, server_node_1.GCompartment);
44
+ mapping.set(model_types_1.ModelTypes.ACTIVITY_NODE, graph_extension_1.ActivityNode);
45
+ mapping.set(model_types_1.ModelTypes.TASK, graph_extension_1.TaskNode);
46
+ mapping.set(model_types_1.ModelTypes.CATEGORY, graph_extension_1.Category);
47
+ mapping.set(model_types_1.ModelTypes.STRUCTURE, server_node_1.GCompartment);
48
+ return mapping;
49
+ }
50
+ get shapeTypeHints() {
51
+ return [
52
+ createDefaultShapeTypeHint(model_types_1.ModelTypes.MANUAL_TASK),
53
+ createDefaultShapeTypeHint(model_types_1.ModelTypes.AUTOMATED_TASK),
54
+ createDefaultShapeTypeHint(model_types_1.ModelTypes.FORK_NODE),
55
+ createDefaultShapeTypeHint(model_types_1.ModelTypes.JOIN_NODE),
56
+ createDefaultShapeTypeHint(model_types_1.ModelTypes.DECISION_NODE),
57
+ createDefaultShapeTypeHint(model_types_1.ModelTypes.MERGE_NODE),
58
+ {
59
+ elementTypeId: model_types_1.ModelTypes.CATEGORY,
60
+ repositionable: true,
61
+ deletable: true,
62
+ resizable: true,
63
+ reparentable: true,
64
+ containableElementTypeIds: [
65
+ model_types_1.ModelTypes.DECISION_NODE,
66
+ model_types_1.ModelTypes.MERGE_NODE,
67
+ model_types_1.ModelTypes.FORK_NODE,
68
+ model_types_1.ModelTypes.JOIN_NODE,
69
+ model_types_1.ModelTypes.AUTOMATED_TASK,
70
+ model_types_1.ModelTypes.MANUAL_TASK,
71
+ model_types_1.ModelTypes.CATEGORY
72
+ ]
73
+ }
74
+ ];
75
+ }
76
+ get edgeTypeHints() {
77
+ return [
78
+ createDefaultEdgeTypeHint(protocol_1.DefaultTypes.EDGE),
79
+ {
80
+ elementTypeId: model_types_1.ModelTypes.WEIGHTED_EDGE,
81
+ repositionable: true,
82
+ deletable: true,
83
+ routable: true,
84
+ sourceElementTypeIds: [model_types_1.ModelTypes.DECISION_NODE],
85
+ targetElementTypeIds: [model_types_1.ModelTypes.MANUAL_TASK, model_types_1.ModelTypes.AUTOMATED_TASK, model_types_1.ModelTypes.FORK_NODE, model_types_1.ModelTypes.JOIN_NODE]
86
+ }
87
+ ];
88
+ }
89
+ };
90
+ WorkflowDiagramConfiguration = __decorate([
91
+ inversify_1.injectable()
92
+ ], WorkflowDiagramConfiguration);
93
+ exports.WorkflowDiagramConfiguration = WorkflowDiagramConfiguration;
94
+ function createDefaultShapeTypeHint(elementId) {
95
+ return { elementTypeId: elementId, repositionable: true, deletable: true, resizable: true, reparentable: true };
96
+ }
97
+ exports.createDefaultShapeTypeHint = createDefaultShapeTypeHint;
98
+ function createDefaultEdgeTypeHint(elementId) {
99
+ return {
100
+ elementTypeId: elementId,
101
+ repositionable: true,
102
+ deletable: true,
103
+ routable: true,
104
+ sourceElementTypeIds: [
105
+ model_types_1.ModelTypes.MANUAL_TASK,
106
+ model_types_1.ModelTypes.AUTOMATED_TASK,
107
+ model_types_1.ModelTypes.DECISION_NODE,
108
+ model_types_1.ModelTypes.MERGE_NODE,
109
+ model_types_1.ModelTypes.FORK_NODE,
110
+ model_types_1.ModelTypes.JOIN_NODE,
111
+ model_types_1.ModelTypes.CATEGORY
112
+ ],
113
+ targetElementTypeIds: [
114
+ model_types_1.ModelTypes.MANUAL_TASK,
115
+ model_types_1.ModelTypes.AUTOMATED_TASK,
116
+ model_types_1.ModelTypes.DECISION_NODE,
117
+ model_types_1.ModelTypes.MERGE_NODE,
118
+ model_types_1.ModelTypes.FORK_NODE,
119
+ model_types_1.ModelTypes.JOIN_NODE,
120
+ model_types_1.ModelTypes.CATEGORY
121
+ ]
122
+ };
123
+ }
124
+ exports.createDefaultEdgeTypeHint = createDefaultEdgeTypeHint;
125
+ //# sourceMappingURL=workflow-diagram-configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-diagram-configuration.js","sourceRoot":"","sources":["../src/workflow-diagram-configuration.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAmF;AACnF,2DAQmC;AACnC,yCAAuC;AACvC,uDAAqE;AACrE,oDAAyD;AAGzD,IAAa,4BAA4B,GAAzC,MAAa,4BAA4B;IAAzC;QAyDI,eAAU,GAAG,8BAAgB,CAAC,MAAM,CAAC;QACrC,sBAAiB,GAAG,IAAI,CAAC;QACzB,mBAAc,GAAG,IAAI,CAAC;IAC1B,CAAC;IA3DG,IAAI,WAAW;QACX,MAAM,OAAO,GAAG,+BAAiB,EAAE,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,wBAAK,CAAC,aAAa,EAAE,oBAAM,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,wBAAK,CAAC,UAAU,EAAE,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,wBAAK,CAAC,aAAa;YACnB,wBAAK,CAAC,UAAU;YAChB,wBAAK,CAAC,SAAS;YACf,wBAAK,CAAC,SAAS;YACf,wBAAK,CAAC,QAAQ;SACjB;KACJ,CAAC;AACN,CAAC;AAzBD,8DAyBC"}
@@ -0,0 +1,28 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 STMicroelectronics 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 { ClassMultiBinding, GModelDiagramModule, InstanceMultiBinding, OperationHandlerConstructor, ServerModule } from '@eclipse-glsp/server-node';
17
+ import { NavigationTargetProvider } from '@eclipse-glsp/server-node/lib/features/navigation/navigation-target-provider';
18
+ import { interfaces } from 'inversify';
19
+ export declare class WorkflowServerModule extends ServerModule {
20
+ configure(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void;
21
+ }
22
+ export declare class WorkflowDiagramModule extends GModelDiagramModule {
23
+ get diagramType(): string;
24
+ protected configure(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void;
25
+ protected configureOperationHandlers(binding: InstanceMultiBinding<OperationHandlerConstructor>): void;
26
+ protected configureNavigationTargetProviders(binding: ClassMultiBinding<NavigationTargetProvider>): void;
27
+ }
28
+ //# 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,EACH,iBAAiB,EAMjB,mBAAmB,EAEnB,oBAAoB,EAIpB,2BAA2B,EAE3B,YAAY,EAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,8EAA8E,CAAC;AAExH,OAAO,EAAc,UAAU,EAAE,MAAM,WAAW,CAAC;AAuBnD,qBACa,oBAAqB,SAAQ,YAAY;IAClD,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI;CAM5H;AAED,qBACa,qBAAsB,SAAQ,mBAAmB;IAC1D,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI;IAanI,SAAS,CAAC,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,IAAI;IAatG,SAAS,CAAC,kCAAkC,CAAC,OAAO,EAAE,iBAAiB,CAAC,wBAAwB,CAAC,GAAG,IAAI;CAM3G"}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.WorkflowDiagramModule = exports.WorkflowServerModule = void 0;
10
+ /********************************************************************************
11
+ * Copyright (c) 2022 STMicroelectronics and others.
12
+ *
13
+ * This program and the accompanying materials are made available under the
14
+ * terms of the Eclipse Public License v. 2.0 which is available at
15
+ * http://www.eclipse.org/legal/epl-2.0.
16
+ *
17
+ * This Source Code may also be made available under the following Secondary
18
+ * Licenses when the conditions for such availability set forth in the Eclipse
19
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
20
+ * with the GNU Classpath Exception which is available at
21
+ * https://www.gnu.org/software/classpath/license.html.
22
+ *
23
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
24
+ ********************************************************************************/
25
+ const server_node_1 = require("@eclipse-glsp/server-node");
26
+ const navigation_target_resolver_1 = require("@eclipse-glsp/server-node/lib/features/navigation/navigation-target-resolver");
27
+ const inversify_1 = require("inversify");
28
+ const create_automated_task_handler_1 = require("./handler/create-automated-task-handler");
29
+ const create_category_handler_1 = require("./handler/create-category-handler");
30
+ const create_decision_node_handler_1 = require("./handler/create-decision-node-handler");
31
+ const create_edge_handler_1 = require("./handler/create-edge-handler");
32
+ const create_fork_node_handler_1 = require("./handler/create-fork-node-handler");
33
+ const create_join_node_handler_1 = require("./handler/create-join-node-handler");
34
+ const create_manual_task_handler_1 = require("./handler/create-manual-task-handler");
35
+ const create_merge_node_handler_1 = require("./handler/create-merge-node-handler");
36
+ const create_weighted_edge_handler_1 = require("./handler/create-weighted-edge-handler");
37
+ const workflow_label_edit_validator_1 = require("./labeledit/workflow-label-edit-validator");
38
+ const workflow_model_validator_1 = require("./marker/workflow-model-validator");
39
+ const workflow_navigation_target_resolver_1 = require("./model/workflow-navigation-target-resolver");
40
+ const next_node_navigation_target_provider_1 = require("./provider/next-node-navigation-target-provider");
41
+ const node_documentation_navigation_target_provider_1 = require("./provider/node-documentation-navigation-target-provider");
42
+ const previous_node_navigation_target_provider_1 = require("./provider/previous-node-navigation-target-provider");
43
+ const workflow_command_palette_action_provider_1 = require("./provider/workflow-command-palette-action-provider");
44
+ const workflow_context_menu_item_provider_1 = require("./provider/workflow-context-menu-item-provider");
45
+ const workflow_diagram_configuration_1 = require("./workflow-diagram-configuration");
46
+ const workflow_glsp_server_1 = require("./workflow-glsp-server");
47
+ const workflow_model_index_1 = require("./workflow-model-index");
48
+ const workflow_popup_factory_1 = require("./workflow-popup-factory");
49
+ let WorkflowServerModule = class WorkflowServerModule extends server_node_1.ServerModule {
50
+ configure(bind, unbind, isBound, rebind) {
51
+ super.configure(bind, unbind, isBound, rebind);
52
+ bind(workflow_glsp_server_1.WorkflowGLSPServer).toSelf().inSingletonScope();
53
+ rebind(server_node_1.GLSPServer).toService(workflow_glsp_server_1.WorkflowGLSPServer);
54
+ rebind(server_node_1.JsonRpcGLSPServer).toService(workflow_glsp_server_1.WorkflowGLSPServer);
55
+ }
56
+ };
57
+ WorkflowServerModule = __decorate([
58
+ inversify_1.injectable()
59
+ ], WorkflowServerModule);
60
+ exports.WorkflowServerModule = WorkflowServerModule;
61
+ let WorkflowDiagramModule = class WorkflowDiagramModule extends server_node_1.GModelDiagramModule {
62
+ get diagramType() {
63
+ return 'workflow-diagram';
64
+ }
65
+ configure(bind, unbind, isBound, rebind) {
66
+ super.configure(bind, unbind, isBound, rebind);
67
+ bind(server_node_1.DiagramConfiguration).to(workflow_diagram_configuration_1.WorkflowDiagramConfiguration).inSingletonScope();
68
+ bind(navigation_target_resolver_1.NavigationTargetResolver).to(workflow_navigation_target_resolver_1.WorkflowNavigationTargetResolver).inSingletonScope();
69
+ bind(server_node_1.ContextMenuItemProvider).to(workflow_context_menu_item_provider_1.WorkflowContextMenuItemProvider).inSingletonScope();
70
+ bind(server_node_1.CommandPaletteActionProvider).to(workflow_command_palette_action_provider_1.WorkflowCommandPaletteActionProvider).inSingletonScope();
71
+ bind(server_node_1.LabelEditValidator).to(workflow_label_edit_validator_1.WorkflowLabelEditValidator).inSingletonScope();
72
+ bind(server_node_1.PopupModelFactory).to(workflow_popup_factory_1.WorkflowPopupFactory).inSingletonScope();
73
+ bind(server_node_1.ModelValidator).to(workflow_model_validator_1.WorkflowModelValidator).inSingletonScope();
74
+ bind(server_node_1.ToolPaletteItemProvider).to(server_node_1.DefaultToolPaletteItemProvider).inSingletonScope();
75
+ rebind(server_node_1.GModelIndex).to(workflow_model_index_1.WorkflowModelIndex).inSingletonScope();
76
+ }
77
+ configureOperationHandlers(binding) {
78
+ super.configureOperationHandlers(binding);
79
+ binding.add(create_automated_task_handler_1.CreateAutomatedTaskHandler);
80
+ binding.add(create_manual_task_handler_1.CreateManualTaskHandler);
81
+ binding.add(create_join_node_handler_1.CreateJoinNodeHandler);
82
+ binding.add(create_fork_node_handler_1.CreateForkNodeHandler);
83
+ binding.add(create_edge_handler_1.CreateEdgeHandler);
84
+ binding.add(create_weighted_edge_handler_1.CreateWeightedEdgeHandler);
85
+ binding.add(create_merge_node_handler_1.CreateMergeNodeHandler);
86
+ binding.add(create_decision_node_handler_1.CreateDecisionNodeHandler);
87
+ binding.add(create_category_handler_1.CreateCategoryHandler);
88
+ }
89
+ configureNavigationTargetProviders(binding) {
90
+ super.configureNavigationTargetProviders(binding);
91
+ binding.add(next_node_navigation_target_provider_1.NextNodeNavigationTargetProvider);
92
+ binding.add(previous_node_navigation_target_provider_1.PreviousNodeNavigationTargetProvider);
93
+ binding.add(node_documentation_navigation_target_provider_1.NodeDocumentationNavigationTargetProvider);
94
+ }
95
+ };
96
+ WorkflowDiagramModule = __decorate([
97
+ inversify_1.injectable()
98
+ ], WorkflowDiagramModule);
99
+ exports.WorkflowDiagramModule = WorkflowDiagramModule;
100
+ //# 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":";;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AAO,CAAC,GAAG,CAAC,wDAAyB,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,+CAAqB,CAAC,CAAC;IACvC,CAAC;IAES,kCAAkC,CAAC,OAAoD;QAC7F,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,uEAAgC,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,+EAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,yFAAyC,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAA;AArCY,qBAAqB;IADjC,sBAAU,EAAE;GACA,qBAAqB,CAqCjC;AArCY,sDAAqB"}
@@ -0,0 +1,23 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 STMicroelectronics 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 { Args, DefaultGLSPServer, InitializeResult, Logger, MaybePromise } from '@eclipse-glsp/server-node';
17
+ export declare class WorkflowGLSPServer extends DefaultGLSPServer {
18
+ MESSAGE_KEY: string;
19
+ TIMESTAMP_KEY: string;
20
+ protected logger: Logger;
21
+ protected handleInitializeArgs(result: InitializeResult, args: Args | undefined): MaybePromise<InitializeResult>;
22
+ }
23
+ //# sourceMappingURL=workflow-glsp-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-glsp-server.d.ts","sourceRoot":"","sources":["../src/workflow-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,IAAI,EAAY,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGtH,qBACa,kBAAmB,SAAQ,iBAAiB;IACrD,WAAW,SAAa;IACxB,aAAa,SAAe;IAG5B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,SAAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,YAAY,CAAC,gBAAgB,CAAC;CAUnH"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.WorkflowGLSPServer = void 0;
13
+ /********************************************************************************
14
+ * Copyright (c) 2022 STMicroelectronics and others.
15
+ *
16
+ * This program and the accompanying materials are made available under the
17
+ * terms of the Eclipse Public License v. 2.0 which is available at
18
+ * http://www.eclipse.org/legal/epl-2.0.
19
+ *
20
+ * This Source Code may also be made available under the following Secondary
21
+ * Licenses when the conditions for such availability set forth in the Eclipse
22
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
23
+ * with the GNU Classpath Exception which is available at
24
+ * https://www.gnu.org/software/classpath/license.html.
25
+ *
26
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
27
+ ********************************************************************************/
28
+ const server_node_1 = require("@eclipse-glsp/server-node");
29
+ const inversify_1 = require("inversify");
30
+ let WorkflowGLSPServer = class WorkflowGLSPServer extends server_node_1.DefaultGLSPServer {
31
+ constructor() {
32
+ super(...arguments);
33
+ this.MESSAGE_KEY = 'message';
34
+ this.TIMESTAMP_KEY = 'timestamp';
35
+ }
36
+ handleInitializeArgs(result, args) {
37
+ if (!args) {
38
+ return result;
39
+ }
40
+ const timestamp = server_node_1.ArgsUtil.get(args, this.TIMESTAMP_KEY);
41
+ const message = server_node_1.ArgsUtil.get(args, this.MESSAGE_KEY);
42
+ this.logger.debug(`${timestamp}: ${message}`);
43
+ return result;
44
+ }
45
+ };
46
+ __decorate([
47
+ inversify_1.inject(server_node_1.Logger),
48
+ __metadata("design:type", server_node_1.Logger)
49
+ ], WorkflowGLSPServer.prototype, "logger", void 0);
50
+ WorkflowGLSPServer = __decorate([
51
+ inversify_1.injectable()
52
+ ], WorkflowGLSPServer);
53
+ exports.WorkflowGLSPServer = WorkflowGLSPServer;
54
+ //# sourceMappingURL=workflow-glsp-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-glsp-server.js","sourceRoot":"","sources":["../src/workflow-glsp-server.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2DAAsH;AACtH,yCAA+C;AAG/C,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,+BAAiB;IAAzD;;QACI,gBAAW,GAAG,SAAS,CAAC;QACxB,kBAAa,GAAG,WAAW,CAAC;IAehC,CAAC;IAVa,oBAAoB,CAAC,MAAwB,EAAE,IAAsB;QAC3E,IAAI,CAAC,IAAI,EAAE;YACP,OAAO,MAAM,CAAC;SACjB;QACD,MAAM,SAAS,GAAG,sBAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,MAAM,OAAO,GAAG,sBAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAErD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,SAAS,KAAK,OAAO,EAAE,CAAC,CAAC;QAC9C,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AAZG;IADC,kBAAM,CAAC,oBAAM,CAAC;8BACG,oBAAM;kDAAC;AALhB,kBAAkB;IAD9B,sBAAU,EAAE;GACA,kBAAkB,CAiB9B;AAjBY,gDAAkB"}
@@ -0,0 +1,20 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 STMicroelectronics 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 { GEdge, GModelIndex } from '@eclipse-glsp/server-node';
17
+ export declare class WorkflowModelIndex extends GModelIndex {
18
+ getAllEdges(): GEdge[];
19
+ }
20
+ //# sourceMappingURL=workflow-model-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-model-index.d.ts","sourceRoot":"","sources":["../src/workflow-model-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAI/D,qBACa,kBAAmB,SAAQ,WAAW;IAC/C,WAAW,IAAI,KAAK,EAAE;CASzB"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.WorkflowModelIndex = void 0;
10
+ /********************************************************************************
11
+ * Copyright (c) 2022 STMicroelectronics and others.
12
+ *
13
+ * This program and the accompanying materials are made available under the
14
+ * terms of the Eclipse Public License v. 2.0 which is available at
15
+ * http://www.eclipse.org/legal/epl-2.0.
16
+ *
17
+ * This Source Code may also be made available under the following Secondary
18
+ * Licenses when the conditions for such availability set forth in the Eclipse
19
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
20
+ * with the GNU Classpath Exception which is available at
21
+ * https://www.gnu.org/software/classpath/license.html.
22
+ *
23
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
24
+ ********************************************************************************/
25
+ const server_node_1 = require("@eclipse-glsp/server-node");
26
+ const inversify_1 = require("inversify");
27
+ const model_types_1 = require("./util/model-types");
28
+ let WorkflowModelIndex = class WorkflowModelIndex extends server_node_1.GModelIndex {
29
+ getAllEdges() {
30
+ const edges = super.getAllEdges();
31
+ this.getElements(model_types_1.ModelTypes.WEIGHTED_EDGE).forEach(weighted => {
32
+ if (weighted instanceof server_node_1.GEdge) {
33
+ edges.push(weighted);
34
+ }
35
+ });
36
+ return edges;
37
+ }
38
+ };
39
+ WorkflowModelIndex = __decorate([
40
+ inversify_1.injectable()
41
+ ], WorkflowModelIndex);
42
+ exports.WorkflowModelIndex = WorkflowModelIndex;
43
+ //# sourceMappingURL=workflow-model-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-model-index.js","sourceRoot":"","sources":["../src/workflow-model-index.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2DAA+D;AAC/D,yCAAuC;AACvC,oDAAgD;AAGhD,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,yBAAW;IAC/C,WAAW;QACP,MAAM,KAAK,GAAY,KAAK,CAAC,WAAW,EAAE,CAAC;QAC3C,IAAI,CAAC,WAAW,CAAC,wBAAU,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC1D,IAAI,QAAQ,YAAY,mBAAK,EAAE;gBAC3B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACxB;QACL,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA;AAVY,kBAAkB;IAD9B,sBAAU,EAAE;GACA,kBAAkB,CAU9B;AAVY,gDAAkB"}
@@ -0,0 +1,21 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 STMicroelectronics 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 { GModelElement, GModelRoot, PopupModelFactory, RequestPopupModelAction } from '@eclipse-glsp/server-node';
17
+ export declare class WorkflowPopupFactory implements PopupModelFactory {
18
+ createPopupModel(element: GModelElement, action: RequestPopupModelAction): GModelRoot | undefined;
19
+ private generateBody;
20
+ }
21
+ //# sourceMappingURL=workflow-popup-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-popup-factory.d.ts","sourceRoot":"","sources":["../src/workflow-popup-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAuB,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAMvI,qBACa,oBAAqB,YAAW,iBAAiB;IAC1D,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,GAAG,UAAU,GAAG,SAAS;IAiBjG,OAAO,CAAC,YAAY;CAKvB"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.WorkflowPopupFactory = void 0;
10
+ /********************************************************************************
11
+ * Copyright (c) 2022 STMicroelectronics and others.
12
+ *
13
+ * This program and the accompanying materials are made available under the
14
+ * terms of the Eclipse Public License v. 2.0 which is available at
15
+ * http://www.eclipse.org/legal/epl-2.0.
16
+ *
17
+ * This Source Code may also be made available under the following Secondary
18
+ * Licenses when the conditions for such availability set forth in the Eclipse
19
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
20
+ * with the GNU Classpath Exception which is available at
21
+ * https://www.gnu.org/software/classpath/license.html.
22
+ *
23
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
24
+ ********************************************************************************/
25
+ const server_node_1 = require("@eclipse-glsp/server-node");
26
+ const graph_extension_1 = require("./graph-extension");
27
+ const inversify_1 = require("inversify");
28
+ const NL = '<br/>';
29
+ let WorkflowPopupFactory = class WorkflowPopupFactory {
30
+ createPopupModel(element, action) {
31
+ if (element && element instanceof graph_extension_1.TaskNode) {
32
+ const popupTitle = server_node_1.GPreRenderedElement.builder()
33
+ .id('popup-title')
34
+ .code(`<div class="sprotty-popup-title">${element.name}</div>`)
35
+ .build();
36
+ const popupBody = server_node_1.GPreRenderedElement.builder()
37
+ .id('popup-body')
38
+ .code(`<div class="sprotty-popup-body">${this.generateBody(element)}</div>`)
39
+ .build();
40
+ return server_node_1.GModelRoot.builder().type('html').canvasBounds(action.bounds).id('sprotty-popup').add(popupTitle).add(popupBody).build();
41
+ }
42
+ return undefined;
43
+ }
44
+ generateBody(task) {
45
+ return `Type: ${task.taskType} ${NL}
46
+ Duration: ${task.duration} ${NL}
47
+ Reference: ${task.references} ${NL}`;
48
+ }
49
+ };
50
+ WorkflowPopupFactory = __decorate([
51
+ inversify_1.injectable()
52
+ ], WorkflowPopupFactory);
53
+ exports.WorkflowPopupFactory = WorkflowPopupFactory;
54
+ //# sourceMappingURL=workflow-popup-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-popup-factory.js","sourceRoot":"","sources":["../src/workflow-popup-factory.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2DAAuI;AACvI,uDAA6C;AAC7C,yCAAuC;AAEvC,MAAM,EAAE,GAAG,OAAO,CAAC;AAGnB,IAAa,oBAAoB,GAAjC,MAAa,oBAAoB;IAC7B,gBAAgB,CAAC,OAAsB,EAAE,MAA+B;QACpE,IAAI,OAAO,IAAI,OAAO,YAAY,0BAAQ,EAAE;YACxC,MAAM,UAAU,GAAG,iCAAmB,CAAC,OAAO,EAAE;iBAC3C,EAAE,CAAC,aAAa,CAAC;iBACjB,IAAI,CAAC,oCAAoC,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