@genexus/diagram-editors 18.2.27 → 18.4.27

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 (39) hide show
  1. package/dist/cjs/{editor-386996a2.js → editor-39f75f41.js} +79 -6
  2. package/dist/cjs/gx-bpmn-editor.cjs.entry.js +203 -82
  3. package/dist/cjs/gx-report-layout-editor.cjs.entry.js +1 -1
  4. package/dist/collection/components/bpmn/bpmn-editor.js +88 -8
  5. package/dist/collection/components/bpmn/bpmn-graph.js +19 -3
  6. package/dist/collection/components/bpmn/cell-types.js +2 -1
  7. package/dist/collection/components/bpmn/properties.js +8 -0
  8. package/dist/collection/components/bpmn/shapes/text-annotation-shape.js +26 -0
  9. package/dist/collection/components/bpmn/style-tokens.js +4 -0
  10. package/dist/collection/components/bpmn/style-types.js +6 -0
  11. package/dist/collection/components/common/cell-descriptor.js +4 -0
  12. package/dist/collection/components/common/connection-handler.js +18 -1
  13. package/dist/collection/components/common/graph.js +30 -1
  14. package/dist/collection/components/common/mx.js +6 -1
  15. package/dist/collection/components/common/vertex-tool-handler.js +6 -3
  16. package/dist/diagram-editors/diagram-editors.esm.js +1 -1
  17. package/dist/diagram-editors/{p-80e1f1a5.system.js → p-0dea64d7.system.js} +1 -1
  18. package/dist/diagram-editors/p-36601737.system.entry.js +1 -0
  19. package/dist/diagram-editors/{p-f022f8f7.entry.js → p-3a040373.entry.js} +1 -1
  20. package/dist/diagram-editors/{p-009a6590.system.entry.js → p-54b997ae.system.entry.js} +1 -1
  21. package/dist/diagram-editors/{p-52c75d65.js → p-690fb19a.js} +1 -1
  22. package/dist/diagram-editors/{p-0cbf75ed.entry.js → p-d6be927a.entry.js} +1 -1
  23. package/dist/diagram-editors/p-e435d3dc.system.js +1 -1
  24. package/dist/esm/{editor-4d1ececd.js → editor-61f535ce.js} +79 -7
  25. package/dist/esm/gx-bpmn-editor.entry.js +147 -26
  26. package/dist/esm/gx-report-layout-editor.entry.js +1 -1
  27. package/dist/esm-es5/{editor-4d1ececd.js → editor-61f535ce.js} +132 -55
  28. package/dist/esm-es5/gx-bpmn-editor.entry.js +157 -31
  29. package/dist/esm-es5/gx-report-layout-editor.entry.js +1 -1
  30. package/dist/types/components/bpmn/cell-types.d.ts +1 -0
  31. package/dist/types/components/bpmn/properties.d.ts +8 -1
  32. package/dist/types/components/bpmn/shapes/text-annotation-shape.d.ts +7 -0
  33. package/dist/types/components/bpmn/style-tokens.d.ts +4 -0
  34. package/dist/types/components/bpmn/style-types.d.ts +6 -0
  35. package/dist/types/components/common/cell-descriptor.d.ts +8 -0
  36. package/dist/types/components/common/connection-handler.d.ts +1 -0
  37. package/dist/types/components/common/graph.d.ts +2 -0
  38. package/package.json +2 -2
  39. package/dist/diagram-editors/p-60b39e5b.system.entry.js +0 -1
@@ -3,22 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e8fa91cf.js');
6
- const editor = require('./editor-386996a2.js');
7
-
8
- const CellTypes = {
9
- TASK: 'Task',
10
- SUB_PROCESS: 'SubProcess',
11
- EMBEDDED_SUB_PROCESS: 'EmbeddedSubProcess',
12
- EXPANDED_EMBEDDED_SUB_PROCESS: 'ExpandedEmbeddedSubProcess',
13
- SUB_PROCESS_CHILDREN_SLOT: 'SubProcessChildrenSlot',
14
- START_EVENT: 'StartEvent',
15
- INTERMEDIATE_EVENT: 'IntermediateEvent',
16
- END_EVENT: 'EndEvent',
17
- GATEWAY: 'Gateway',
18
- POOL: 'Pool',
19
- LANE: 'Lane',
20
- CONNECTOR: 'Connector'
21
- };
6
+ const editor = require('./editor-39f75f41.js');
22
7
 
23
8
  class StackLayout extends editor.mx.mxStackLayout {
24
9
  constructor(graph) {
@@ -27,7 +12,7 @@ class StackLayout extends editor.mx.mxStackLayout {
27
12
  this.fill = true;
28
13
  }
29
14
  isVertexIgnored(cell) {
30
- return !(editor.Utils.cellOfType(cell, CellTypes.POOL) || editor.Utils.cellOfType(cell, CellTypes.LANE));
15
+ return !(editor.Utils.cellOfType(cell, editor.CellTypes.POOL) || editor.Utils.cellOfType(cell, editor.CellTypes.LANE));
31
16
  }
32
17
  isVertexMovable() {
33
18
  return true;
@@ -39,14 +24,14 @@ class LayoutManager extends editor.mx.mxLayoutManager {
39
24
  this.layout = new StackLayout(graph);
40
25
  }
41
26
  getLayout(cell) {
42
- if (editor.Utils.cellOfType(cell, CellTypes.POOL))
27
+ if (editor.Utils.cellOfType(cell, editor.CellTypes.POOL))
43
28
  return this.layout;
44
29
  return null;
45
30
  }
46
31
  }
47
32
  class SwimlaneManager extends editor.mx.mxSwimlaneManager {
48
33
  isSwimlaneIgnored(cell) {
49
- return !(editor.Utils.cellOfType(cell, CellTypes.LANE));
34
+ return !(editor.Utils.cellOfType(cell, editor.CellTypes.LANE));
50
35
  }
51
36
  }
52
37
 
@@ -65,6 +50,7 @@ var TaskTypeValues;
65
50
  })(TaskTypeValues || (TaskTypeValues = {}));
66
51
  var ActivityLoopTypeValues;
67
52
  (function (ActivityLoopTypeValues) {
53
+ ActivityLoopTypeValues["None"] = "None";
68
54
  ActivityLoopTypeValues["Standard"] = "Standard";
69
55
  ActivityLoopTypeValues["MultiInstance"] = "Multi-Instance";
70
56
  })(ActivityLoopTypeValues || (ActivityLoopTypeValues = {}));
@@ -106,10 +92,17 @@ var EventTriggerValues;
106
92
  EventTriggerValues["Terminate"] = "Terminate";
107
93
  EventTriggerValues["Timer"] = "Timer";
108
94
  })(EventTriggerValues || (EventTriggerValues = {}));
95
+ var ConnectorType;
96
+ (function (ConnectorType) {
97
+ ConnectorType["SequenceFlow"] = "SequenceFlow";
98
+ ConnectorType["Association"] = "Association";
99
+ ConnectorType["MessageFlow"] = "MessageFlow";
100
+ })(ConnectorType || (ConnectorType = {}));
109
101
  var ConnectorProperties;
110
102
  (function (ConnectorProperties) {
111
103
  ConnectorProperties["Text"] = "PWFSeqConnText";
112
104
  ConnectorProperties["SequenceType"] = "PWFSeqConnType";
105
+ ConnectorProperties["ConnectorType"] = "PWFConnType";
113
106
  })(ConnectorProperties || (ConnectorProperties = {}));
114
107
  var SequenceConnectorType;
115
108
  (function (SequenceConnectorType) {
@@ -125,6 +118,8 @@ var ArtifactProperties;
125
118
  var StyleTokens;
126
119
  (function (StyleTokens) {
127
120
  StyleTokens.ACTIVITY_SIZE = { width: 130, height: 50 };
121
+ StyleTokens.TEXT_ANNOTATION_SIZE = { width: 130, height: 50 };
122
+ StyleTokens.TEXT_ANNOTATION_BRACKET_WIDTH = 17;
128
123
  StyleTokens.EVENT_SIZE = { width: 32, height: 32 };
129
124
  StyleTokens.ATTACHED_EVENT_SIZE = { width: 24, height: 24 };
130
125
  StyleTokens.GATEWAY_SIZE = { width: 40, height: 40 };
@@ -144,6 +139,8 @@ var StyleTokens;
144
139
  StyleTokens.TASK_USER_STROKE_COLOR = '#96e3b0';
145
140
  StyleTokens.TASK_SCRIPT_BACKGROUND_COLOR = 'rgb(40,41,45)';
146
141
  StyleTokens.TASK_SCRIPT_STROKE_COLOR = '#5bb2ff';
142
+ StyleTokens.TEXT_ANNOTATION_BACKGROUND_COLOR = '#35363A';
143
+ StyleTokens.TEXT_ANNOTATION_STROKE_COLOR = '#a4a5a6';
147
144
  StyleTokens.SUB_PROCESS_BACKGROUND_COLOR = 'rgb(40,41,45)';
148
145
  StyleTokens.SUB_PROCESS_STROKE_COLOR = '#f89491';
149
146
  StyleTokens.GATEWAY_STROKE_COLOR = '#2dcf76';
@@ -156,9 +153,16 @@ var StyleTokens;
156
153
  StyleTokens.CONNECTOR_OPTIONAL_COLOR = '#5bb2ff';
157
154
  })(StyleTokens || (StyleTokens = {}));
158
155
 
156
+ const StyleTypes = {
157
+ SEQUENCE_FLOW: 'sequenceFlow',
158
+ MESSAGE_FLOW: 'messageFlow',
159
+ ASSOSIATION: 'association',
160
+ };
161
+
159
162
  class BpmnGraph extends editor.Graph {
160
163
  constructor(options) {
161
164
  super(options);
165
+ this.multigraph = false;
162
166
  this.tolerance = 20;
163
167
  this.swimlaneManager = new SwimlaneManager(this, false, undefined, undefined);
164
168
  this.layoutManager = new LayoutManager(this);
@@ -210,17 +214,15 @@ class BpmnGraph extends editor.Graph {
210
214
  }
211
215
  isSwimlane(cell) {
212
216
  return editor.Utils.cellOfType(cell, [
213
- CellTypes.TASK,
214
- CellTypes.SUB_PROCESS,
215
- CellTypes.EMBEDDED_SUB_PROCESS,
216
- CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS,
217
- CellTypes.SUB_PROCESS_CHILDREN_SLOT,
218
- CellTypes.POOL,
219
- CellTypes.LANE
217
+ editor.CellTypes.SUB_PROCESS,
218
+ editor.CellTypes.EMBEDDED_SUB_PROCESS,
219
+ editor.CellTypes.SUB_PROCESS_CHILDREN_SLOT,
220
+ editor.CellTypes.POOL,
221
+ editor.CellTypes.LANE
220
222
  ]);
221
223
  }
222
224
  isCellSelectable(cell) {
223
- return !editor.Utils.cellOfType(cell, CellTypes.SUB_PROCESS_CHILDREN_SLOT);
225
+ return !editor.Utils.cellOfType(cell, editor.CellTypes.SUB_PROCESS_CHILDREN_SLOT);
224
226
  }
225
227
  isCellFoldable(cell) {
226
228
  return false;
@@ -229,17 +231,17 @@ class BpmnGraph extends editor.Graph {
229
231
  super.dblClick(evt, cell);
230
232
  }
231
233
  isValidRoot(cell) {
232
- return this.getModel().root === cell || editor.Utils.cellOfType(cell, CellTypes.SUB_PROCESS_CHILDREN_SLOT);
234
+ return this.getModel().root === cell || editor.Utils.cellOfType(cell, editor.CellTypes.SUB_PROCESS_CHILDREN_SLOT);
233
235
  }
234
236
  constrainChild(cell) {
235
237
  let parent = cell.getParent();
236
- if (editor.Utils.cellOfType(cell, CellTypes.INTERMEDIATE_EVENT)) {
237
- if (editor.Utils.cellOfType(parent, [CellTypes.TASK, CellTypes.EMBEDDED_SUB_PROCESS, CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS]))
238
+ if (editor.Utils.cellOfType(cell, editor.CellTypes.INTERMEDIATE_EVENT)) {
239
+ if (editor.Utils.cellOfType(parent, [editor.CellTypes.TASK, editor.CellTypes.EMBEDDED_SUB_PROCESS, editor.CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS]))
238
240
  this._constrainAttachedEvent(cell);
239
241
  else
240
242
  this._constrainNonAttachedEvent(cell);
241
243
  }
242
- else if (editor.Utils.cellOfType(parent, CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS) && editor.Utils.cellOfType(cell, CellTypes.SUB_PROCESS_CHILDREN_SLOT)) {
244
+ else if (editor.Utils.cellOfType(parent, editor.CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS) && editor.Utils.cellOfType(cell, editor.CellTypes.SUB_PROCESS_CHILDREN_SLOT)) {
243
245
  this._constrainSubProcessChildrenSlot(cell);
244
246
  }
245
247
  }
@@ -307,14 +309,17 @@ class BpmnGraph extends editor.Graph {
307
309
  return super.getDropTarget(cells, evt, cell, clone);
308
310
  }
309
311
  _onCellConnected(evt) {
312
+ let edge = evt.getProperty('edge');
313
+ edge.style = StyleTypes.SEQUENCE_FLOW;
314
+ console.log('onCellConnected', evt);
310
315
  if (evt.getProperty('source')) {
311
316
  let vertex = evt.getProperty('terminal');
312
- if (editor.Utils.cellOfType(vertex, CellTypes.GATEWAY)) {
317
+ if (editor.Utils.cellOfType(vertex, editor.CellTypes.GATEWAY)) {
313
318
  let gatewayProps = vertex.getValue() || {};
314
319
  let gatewayType = gatewayProps[GatewayProperties.Type] || GatewayTypeValues.Exclusive;
315
320
  if (gatewayType === GatewayTypeValues.Exclusive || gatewayType === GatewayTypeValues.Inclusive) {
316
321
  let edge = evt.getProperty('edge');
317
- if (editor.Utils.cellOfType(edge, CellTypes.CONNECTOR)) {
322
+ if (editor.Utils.cellOfType(edge, editor.CellTypes.CONNECTOR)) {
318
323
  let connectorProps = edge.getValue() || {};
319
324
  if (connectorProps[ConnectorProperties.SequenceType] != SequenceConnectorType.Conditional)
320
325
  this.getModel().setValue(edge, Object.assign({}, connectorProps, { [ConnectorProperties.SequenceType]: SequenceConnectorType.Conditional }));
@@ -322,20 +327,33 @@ class BpmnGraph extends editor.Graph {
322
327
  }
323
328
  }
324
329
  }
330
+ if (evt.getProperty('terminal')) {
331
+ let vertex = evt.getProperty('terminal');
332
+ if (editor.Utils.cellOfType(vertex, editor.CellTypes.TEXT_ANNOTATION)) {
333
+ let edge = evt.getProperty('edge');
334
+ edge.style = StyleTypes.ASSOSIATION;
335
+ if (editor.Utils.cellOfType(edge, editor.CellTypes.CONNECTOR)) {
336
+ let connectorProps = edge.getValue() || {};
337
+ if (connectorProps[ConnectorProperties.ConnectorType] != ConnectorType.Association) {
338
+ this.getModel().setValue(edge, Object.assign({}, connectorProps, { [ConnectorProperties.ConnectorType]: ConnectorType.Association }));
339
+ }
340
+ }
341
+ }
342
+ }
325
343
  }
326
344
  _onSplitEdge(evt) {
327
345
  let cells = evt.getProperty('cells');
328
346
  if (cells.length > 0) {
329
347
  let parent = cells[0].getParent();
330
- if (editor.Utils.cellOfType(parent, CellTypes.POOL) &&
331
- parent.children && parent.children.find((c) => editor.Utils.cellOfType(c, CellTypes.LANE))) {
348
+ if (editor.Utils.cellOfType(parent, editor.CellTypes.POOL) &&
349
+ parent.children && parent.children.find((c) => editor.Utils.cellOfType(c, editor.CellTypes.LANE))) {
332
350
  for (let cell of cells) {
333
351
  let geo = cell.getGeometry();
334
352
  let pt = editor.Utils.convertToAbsolutePosition(cell.getParent(), geo);
335
353
  let t = this.view.getTranslate();
336
354
  pt.x += t.x;
337
355
  pt.y += t.y;
338
- let lane = this.getCellAt(pt.x, pt.y, undefined, true, false, (c) => !editor.Utils.cellOfType(c.cell, CellTypes.LANE));
356
+ let lane = this.getCellAt(pt.x, pt.y, undefined, true, false, (c) => !editor.Utils.cellOfType(c.cell, editor.CellTypes.LANE));
339
357
  if (lane) {
340
358
  setTimeout(() => {
341
359
  this.moveCells([cell], 0, 0, false, lane);
@@ -369,7 +387,7 @@ class ActivityShape extends editor.mx.mxShape {
369
387
  break;
370
388
  default:
371
389
  c.setStrokeColor(StyleTokens.TASK_NONE_STROKE_COLOR);
372
- if (((_a = cell.descriptor) === null || _a === void 0 ? void 0 : _a.id) === CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS)
390
+ if (((_a = cell.descriptor) === null || _a === void 0 ? void 0 : _a.id) === editor.CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS)
373
391
  c.setFillColor(StyleTokens.BACKGROUND_COLOR);
374
392
  else
375
393
  c.setFillColor(StyleTokens.TASK_NONE_BACKGROUND_COLOR);
@@ -398,7 +416,7 @@ class ActivityShape extends editor.mx.mxShape {
398
416
  let scale = this.getScale(c);
399
417
  let cell = this.state.cell;
400
418
  let value = cell.getValue();
401
- let collpasedSubProcess = ((_a = cell.descriptor) === null || _a === void 0 ? void 0 : _a.id) === CellTypes.EMBEDDED_SUB_PROCESS || ((_b = cell.descriptor) === null || _b === void 0 ? void 0 : _b.id) === CellTypes.SUB_PROCESS;
419
+ let collpasedSubProcess = ((_a = cell.descriptor) === null || _a === void 0 ? void 0 : _a.id) === editor.CellTypes.EMBEDDED_SUB_PROCESS || ((_b = cell.descriptor) === null || _b === void 0 ? void 0 : _b.id) === editor.CellTypes.SUB_PROCESS;
402
420
  c.beginSvgGroup({ transform: `translate(${(x + w / 2 - (collpasedSubProcess ? 28 : 12)) * scale}, ${(y + h - 16) * scale})` });
403
421
  switch (value[ActivityProperties.LoopType]) {
404
422
  case ActivityLoopTypeValues.Standard:
@@ -536,6 +554,31 @@ class ActivityShape extends editor.mx.mxShape {
536
554
  }
537
555
  }
538
556
 
557
+ class TextAnnotationShape extends editor.mx.mxShape {
558
+ paintBackground(c, x, y, w, h) {
559
+ this.paintBorder(c, x, y, w, h);
560
+ }
561
+ paintBorder(c, x, y, w, h) {
562
+ let cell = this.state.cell;
563
+ let value = cell.getValue();
564
+ c.setFillColor(StyleTokens.TEXT_ANNOTATION_BACKGROUND_COLOR);
565
+ c.setStrokeColor(StyleTokens.TEXT_ANNOTATION_STROKE_COLOR);
566
+ c.rect(x, y, w, h);
567
+ c.fill();
568
+ c.begin();
569
+ c.moveTo(x + StyleTokens.TEXT_ANNOTATION_BRACKET_WIDTH, y);
570
+ c.lineTo(x, y);
571
+ c.lineTo(x, y + h);
572
+ c.lineTo(x + StyleTokens.TEXT_ANNOTATION_BRACKET_WIDTH, y + h);
573
+ c.stroke();
574
+ c.end();
575
+ }
576
+ getScale(c) {
577
+ let state = c.state;
578
+ return state.scale;
579
+ }
580
+ }
581
+
539
582
  class ConnectorShape extends editor.mx.mxConnector {
540
583
  paintEdgeShape(c, pts) {
541
584
  super.paintEdgeShape(c, pts);
@@ -548,23 +591,23 @@ class EventShape extends editor.mx.mxShape {
548
591
  let cell = this.state.cell;
549
592
  let descriptor = cell.descriptor;
550
593
  let value = cell.getValue();
551
- let attached = (cell.parent instanceof editor.Cell) && cell.parent.descriptor.id === CellTypes.TASK;
552
- let isIntermediate = descriptor.id === CellTypes.INTERMEDIATE_EVENT;
594
+ let attached = (cell.parent instanceof editor.Cell) && cell.parent.descriptor.id === editor.CellTypes.TASK;
595
+ let isIntermediate = descriptor.id === editor.CellTypes.INTERMEDIATE_EVENT;
553
596
  let isThrow = editor.Utils.convertToBoolean(value[EventProperties.IsThrow]);
554
597
  let interrupts = !attached || editor.Utils.convertToBoolean(isIntermediate && value[EventProperties.Interrupts]);
555
598
  let scale = this.getScale(c);
556
599
  let cx = EVENT_SHAPE_SIZE / 2 * scale;
557
600
  let cy = EVENT_SHAPE_SIZE / 2 * scale;
558
601
  switch (descriptor.id) {
559
- case CellTypes.START_EVENT:
602
+ case editor.CellTypes.START_EVENT:
560
603
  c.setStrokeColor(StyleTokens.EVENT_START_STROKE_COLOR);
561
604
  c.setStrokeWidth(StyleTokens.DEFAULT_STROKE_WIDTH);
562
605
  break;
563
- case CellTypes.INTERMEDIATE_EVENT:
606
+ case editor.CellTypes.INTERMEDIATE_EVENT:
564
607
  c.setStrokeColor(StyleTokens.EVENT_INTERMEDIATE_STROKE_COLOR);
565
608
  c.setStrokeWidth(StyleTokens.STROKE_WIDTH_LIGHT);
566
609
  break;
567
- case CellTypes.END_EVENT:
610
+ case editor.CellTypes.END_EVENT:
568
611
  c.setStrokeColor(StyleTokens.EVENT_END_STROKE_COLOR);
569
612
  c.setStrokeWidth(StyleTokens.STROKE_WIDTH_THICK);
570
613
  break;
@@ -841,12 +884,13 @@ class GatewayShape extends editor.mx.mxShape {
841
884
 
842
885
  const _SLOT_ACTIVITY_EVENTS = 'Events';
843
886
  const NEW_VERTEX_TYPES = [
844
- CellTypes.TASK,
845
- CellTypes.EMBEDDED_SUB_PROCESS,
846
- CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS,
847
- CellTypes.INTERMEDIATE_EVENT,
848
- CellTypes.END_EVENT,
849
- CellTypes.GATEWAY
887
+ editor.CellTypes.TASK,
888
+ editor.CellTypes.EMBEDDED_SUB_PROCESS,
889
+ editor.CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS,
890
+ editor.CellTypes.INTERMEDIATE_EVENT,
891
+ editor.CellTypes.END_EVENT,
892
+ editor.CellTypes.GATEWAY,
893
+ editor.CellTypes.TEXT_ANNOTATION,
850
894
  ];
851
895
  var CustomTools;
852
896
  (function (CustomTools) {
@@ -1021,6 +1065,12 @@ var CustomTools;
1021
1065
  [ActivityProperties.LoopType]: ActivityLoopTypeValues.Standard
1022
1066
  }
1023
1067
  };
1068
+ CustomTools.ACTIVITY_LOOP_NONE = {
1069
+ icon: 'bpmn-icon-lasso-tool',
1070
+ label: 'Parallel Multi Instance', value: {
1071
+ [ActivityProperties.LoopType]: ActivityLoopTypeValues.None
1072
+ }
1073
+ };
1024
1074
  })(CustomTools || (CustomTools = {}));
1025
1075
  const _SWIMLANE_RADIAL_MANEU = {
1026
1076
  customTools: {
@@ -1050,8 +1100,8 @@ class BpmnEditor extends editor.Editor {
1050
1100
  undoManager: true,
1051
1101
  cellDescriptors: [
1052
1102
  new editor.CellDescriptor({
1053
- id: CellTypes.TASK,
1054
- baseName: CellTypes.TASK,
1103
+ id: editor.CellTypes.TASK,
1104
+ baseName: editor.CellTypes.TASK,
1055
1105
  icon: 'bpmn-icon-task',
1056
1106
  isSlot: true,
1057
1107
  slotId: _SLOT_ACTIVITY_EVENTS,
@@ -1071,13 +1121,14 @@ class BpmnEditor extends editor.Editor {
1071
1121
  CustomTools.ACTIVITY_LOOP_MULTI_PARALLEL,
1072
1122
  CustomTools.ACTIVITY_LOOP_MULTI_SEQUENTIAL,
1073
1123
  CustomTools.ACTIVITY_LOOP_STANDARD,
1124
+ CustomTools.ACTIVITY_LOOP_NONE,
1074
1125
  ]
1075
1126
  }
1076
1127
  },
1077
1128
  style: `defaultVertex;`
1078
1129
  }),
1079
1130
  new editor.CellDescriptor({
1080
- id: CellTypes.SUB_PROCESS_CHILDREN_SLOT,
1131
+ id: editor.CellTypes.SUB_PROCESS_CHILDREN_SLOT,
1081
1132
  baseName: '',
1082
1133
  icon: '',
1083
1134
  isVertex: true,
@@ -1087,8 +1138,8 @@ class BpmnEditor extends editor.Editor {
1087
1138
  style: `defaultVertex;${editor.mx.mxConstants.STYLE_RESIZABLE}=1;${editor.mx.mxConstants.STYLE_MOVABLE}=0;${editor.mx.mxConstants.STYLE_STROKECOLOR}=transparent;${editor.mx.mxConstants.STYLE_STARTSIZE}=0`
1088
1139
  }),
1089
1140
  new editor.CellDescriptor({
1090
- id: CellTypes.EMBEDDED_SUB_PROCESS,
1091
- baseName: CellTypes.SUB_PROCESS,
1141
+ id: editor.CellTypes.EMBEDDED_SUB_PROCESS,
1142
+ baseName: editor.CellTypes.SUB_PROCESS,
1092
1143
  icon: 'bpmn-icon-subprocess-collapsed',
1093
1144
  isSlot: true,
1094
1145
  slotId: _SLOT_ACTIVITY_EVENTS,
@@ -1111,6 +1162,7 @@ class BpmnEditor extends editor.Editor {
1111
1162
  CustomTools.ACTIVITY_LOOP_MULTI_PARALLEL,
1112
1163
  CustomTools.ACTIVITY_LOOP_MULTI_SEQUENTIAL,
1113
1164
  CustomTools.ACTIVITY_LOOP_STANDARD,
1165
+ CustomTools.ACTIVITY_LOOP_NONE
1114
1166
  ]
1115
1167
  }
1116
1168
  },
@@ -1122,7 +1174,7 @@ class BpmnEditor extends editor.Editor {
1122
1174
  slotGeo.width = 0;
1123
1175
  slotGeo.height = 0;
1124
1176
  let slotCell = options.graph.newCellInstance({
1125
- type: CellTypes.SUB_PROCESS_CHILDREN_SLOT,
1177
+ type: editor.CellTypes.SUB_PROCESS_CHILDREN_SLOT,
1126
1178
  geometry: slotGeo,
1127
1179
  });
1128
1180
  slotCell.style = `${editor.mx.mxConstants.STYLE_RESIZABLE}=0;${editor.mx.mxConstants.STYLE_FILLCOLOR}=transparent;${editor.mx.mxConstants.STYLE_STROKECOLOR}=transparent`;
@@ -1133,8 +1185,8 @@ class BpmnEditor extends editor.Editor {
1133
1185
  }
1134
1186
  }),
1135
1187
  new editor.CellDescriptor({
1136
- id: CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS,
1137
- baseName: CellTypes.SUB_PROCESS,
1188
+ id: editor.CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS,
1189
+ baseName: editor.CellTypes.SUB_PROCESS,
1138
1190
  icon: 'bpmn-icon-subprocess-expanded',
1139
1191
  isSlot: true,
1140
1192
  slotId: _SLOT_ACTIVITY_EVENTS,
@@ -1151,6 +1203,7 @@ class BpmnEditor extends editor.Editor {
1151
1203
  CustomTools.ACTIVITY_LOOP_MULTI_PARALLEL,
1152
1204
  CustomTools.ACTIVITY_LOOP_MULTI_SEQUENTIAL,
1153
1205
  CustomTools.ACTIVITY_LOOP_STANDARD,
1206
+ CustomTools.ACTIVITY_LOOP_NONE,
1154
1207
  ]
1155
1208
  }
1156
1209
  },
@@ -1164,7 +1217,7 @@ class BpmnEditor extends editor.Editor {
1164
1217
  slotGeo.width -= BpmnGraph.EXPANDED_SUB_PROCESS_MARGIN * 2;
1165
1218
  slotGeo.height -= BpmnGraph.EXPANDED_SUB_PROCESS_MARGIN * 2;
1166
1219
  let slotCell = options.graph.newCellInstance({
1167
- type: CellTypes.SUB_PROCESS_CHILDREN_SLOT,
1220
+ type: editor.CellTypes.SUB_PROCESS_CHILDREN_SLOT,
1168
1221
  geometry: slotGeo
1169
1222
  });
1170
1223
  slotCell.setConnectable(false);
@@ -1173,7 +1226,7 @@ class BpmnEditor extends editor.Editor {
1173
1226
  }
1174
1227
  }),
1175
1228
  new editor.CellDescriptor({
1176
- id: CellTypes.START_EVENT,
1229
+ id: editor.CellTypes.START_EVENT,
1177
1230
  baseName: 'StartEvent',
1178
1231
  labelAttribute: EventProperties.Name,
1179
1232
  icon: 'bpmn-icon-start-event-none',
@@ -1184,7 +1237,14 @@ class BpmnEditor extends editor.Editor {
1184
1237
  resizable: false,
1185
1238
  style: `defaultVertex;${editor.mx.mxConstants.STYLE_PERIMETER}=${editor.mx.mxConstants.PERIMETER_ELLIPSE};${editor.mx.mxConstants.STYLE_NOLABEL}=1`,
1186
1239
  radialMenu: {
1187
- newVertexTypes: NEW_VERTEX_TYPES,
1240
+ newVertexTypes: [
1241
+ editor.CellTypes.TASK,
1242
+ editor.CellTypes.EMBEDDED_SUB_PROCESS,
1243
+ editor.CellTypes.EXPANDED_EMBEDDED_SUB_PROCESS,
1244
+ editor.CellTypes.INTERMEDIATE_EVENT,
1245
+ editor.CellTypes.GATEWAY,
1246
+ editor.CellTypes.TEXT_ANNOTATION,
1247
+ ],
1188
1248
  customTools: {
1189
1249
  subMenuMain: [
1190
1250
  CustomTools.StartEvents.NONE,
@@ -1196,8 +1256,8 @@ class BpmnEditor extends editor.Editor {
1196
1256
  },
1197
1257
  }),
1198
1258
  new editor.CellDescriptor({
1199
- id: CellTypes.INTERMEDIATE_EVENT,
1200
- baseName: CellTypes.INTERMEDIATE_EVENT,
1259
+ id: editor.CellTypes.INTERMEDIATE_EVENT,
1260
+ baseName: editor.CellTypes.INTERMEDIATE_EVENT,
1201
1261
  labelAttribute: EventProperties.Name,
1202
1262
  icon: 'bpmn-icon-intermediate-event-none',
1203
1263
  isVertex: true,
@@ -1228,8 +1288,8 @@ class BpmnEditor extends editor.Editor {
1228
1288
  }
1229
1289
  }),
1230
1290
  new editor.CellDescriptor({
1231
- id: CellTypes.END_EVENT,
1232
- baseName: CellTypes.END_EVENT,
1291
+ id: editor.CellTypes.END_EVENT,
1292
+ baseName: editor.CellTypes.END_EVENT,
1233
1293
  labelAttribute: EventProperties.Name,
1234
1294
  icon: 'bpmn-icon-end-event-none',
1235
1295
  isVertex: true,
@@ -1239,7 +1299,7 @@ class BpmnEditor extends editor.Editor {
1239
1299
  resizable: false,
1240
1300
  style: `defaultVertex;${editor.mx.mxConstants.STYLE_PERIMETER}=${editor.mx.mxConstants.PERIMETER_ELLIPSE};${editor.mx.mxConstants.STYLE_NOLABEL}=1`,
1241
1301
  radialMenu: {
1242
- newVertexTypes: NEW_VERTEX_TYPES,
1302
+ newVertexTypes: [editor.CellTypes.TEXT_ANNOTATION],
1243
1303
  customTools: {
1244
1304
  subMenuMain: [
1245
1305
  CustomTools.EndEvents.NONE,
@@ -1250,10 +1310,16 @@ class BpmnEditor extends editor.Editor {
1250
1310
  CustomTools.EndEvents.TERMINATE
1251
1311
  ]
1252
1312
  }
1253
- }
1313
+ },
1314
+ cellConectionRestrictions: new Map([
1315
+ [editor.CellTypes.TEXT_ANNOTATION, {
1316
+ to: editor.CellTypes.TEXT_ANNOTATION,
1317
+ isValidConnection: () => true
1318
+ }],
1319
+ ])
1254
1320
  }),
1255
1321
  new editor.CellDescriptor({
1256
- id: CellTypes.GATEWAY,
1322
+ id: editor.CellTypes.GATEWAY,
1257
1323
  baseName: 'Gateway',
1258
1324
  icon: 'bpmn-icon-gateway-none',
1259
1325
  labelAttribute: GatewayProperties.Name,
@@ -1276,7 +1342,7 @@ class BpmnEditor extends editor.Editor {
1276
1342
  }
1277
1343
  }),
1278
1344
  new editor.CellDescriptor({
1279
- id: CellTypes.POOL,
1345
+ id: editor.CellTypes.POOL,
1280
1346
  baseName: 'Pool',
1281
1347
  isSlot: true,
1282
1348
  icon: 'bpmn-icon-pool',
@@ -1288,7 +1354,7 @@ class BpmnEditor extends editor.Editor {
1288
1354
  radialMenu: _SWIMLANE_RADIAL_MANEU
1289
1355
  }),
1290
1356
  new editor.CellDescriptor({
1291
- id: CellTypes.LANE,
1357
+ id: editor.CellTypes.LANE,
1292
1358
  isSlot: true,
1293
1359
  baseName: 'Lane',
1294
1360
  icon: 'bpmn-icon-pool',
@@ -1300,15 +1366,32 @@ class BpmnEditor extends editor.Editor {
1300
1366
  radialMenu: _SWIMLANE_RADIAL_MANEU
1301
1367
  }),
1302
1368
  new editor.CellDescriptor({
1303
- id: CellTypes.CONNECTOR,
1369
+ id: editor.CellTypes.CONNECTOR,
1304
1370
  icon: '',
1305
1371
  labelAttribute: ConnectorProperties.Text,
1306
1372
  isEdge: true,
1307
- style: `defaultEdge`,
1373
+ style: StyleTypes.SEQUENCE_FLOW,
1308
1374
  shape: ConnectorShape
1309
- })
1375
+ }),
1376
+ new editor.CellDescriptor({
1377
+ id: editor.CellTypes.TEXT_ANNOTATION,
1378
+ baseName: editor.CellTypes.TEXT_ANNOTATION,
1379
+ icon: 'bpmn-icon-text-annotation',
1380
+ isSlot: true,
1381
+ slotId: _SLOT_ACTIVITY_EVENTS,
1382
+ labelAttribute: ActivityProperties.Name,
1383
+ isVertex: true,
1384
+ size: StyleTokens.TEXT_ANNOTATION_SIZE,
1385
+ shape: TextAnnotationShape,
1386
+ radialMenu: {
1387
+ delete: true,
1388
+ newEdge: false,
1389
+ newVertexTypes: [],
1390
+ },
1391
+ style: `defaultVertex;`,
1392
+ }),
1310
1393
  ],
1311
- defaultEdgeDescriptorId: CellTypes.CONNECTOR,
1394
+ defaultEdgeDescriptorId: editor.CellTypes.CONNECTOR,
1312
1395
  globalStyles: [
1313
1396
  {
1314
1397
  name: 'defaultVertex',
@@ -1322,14 +1405,51 @@ class BpmnEditor extends editor.Editor {
1322
1405
  [editor.mx.mxConstants.STYLE_FONTCOLOR]: StyleTokens.DEFAULT_FONT_COLOR,
1323
1406
  [editor.mx.mxConstants.STYLE_FONTSIZE]: StyleTokens.DEFAULT_FONT_SIZE,
1324
1407
  [editor.mx.mxConstants.STYLE_STROKEWIDTH]: StyleTokens.DEFAULT_STROKE_WIDTH,
1325
- [editor.mx.mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]: StyleTokens.LABEL_BACKGROUND_COLOR
1408
+ [editor.mx.mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]: StyleTokens.LABEL_BACKGROUND_COLOR,
1409
+ [editor.mx.mxConstants.STYLE_WHITE_SPACE]: editor.mx.mxConstants.WORD_WRAP,
1410
+ }
1411
+ },
1412
+ {
1413
+ name: StyleTypes.SEQUENCE_FLOW,
1414
+ value: {
1415
+ [editor.mx.mxConstants.STYLE_SHAPE]: editor.mx.mxConstants.SHAPE_CONNECTOR,
1416
+ [editor.mx.mxConstants.STYLE_ENDARROW]: editor.mx.mxConstants.ARROW_BLOCK,
1417
+ [editor.mx.mxConstants.STYLE_EDGE]: editor.mx.mxConstants.EDGESTYLE_ORTHOGONAL,
1418
+ [editor.mx.mxConstants.STYLE_ROUNDED]: '1',
1419
+ [editor.mx.mxConstants.STYLE_ARCSIZE]: 10,
1420
+ [editor.mx.mxConstants.STYLE_VERTICAL_ALIGN]: editor.mx.mxConstants.ALIGN_MIDDLE,
1421
+ [editor.mx.mxConstants.STYLE_ALIGN]: editor.mx.mxConstants.ALIGN_CENTER,
1422
+ [editor.mx.mxConstants.STYLE_STROKECOLOR]: StyleTokens.CONNECTOR_STROKE_COLOR,
1423
+ [editor.mx.mxConstants.STYLE_FONTCOLOR]: StyleTokens.DEFAULT_FONT_COLOR,
1424
+ [editor.mx.mxConstants.STYLE_STROKEWIDTH]: StyleTokens.DEFAULT_STROKE_WIDTH,
1425
+ }
1426
+ },
1427
+ {
1428
+ name: StyleTypes.ASSOSIATION,
1429
+ value: {
1430
+ [editor.mx.mxConstants.STYLE_SHAPE]: editor.mx.mxConstants.SHAPE_CONNECTOR,
1431
+ [editor.mx.mxConstants.STYLE_ENDARROW]: undefined,
1432
+ [editor.mx.mxConstants.STYLE_DASHED]: 1,
1433
+ [editor.mx.mxConstants.STYLE_DASH_PATTERN]: "1 2",
1434
+ [editor.mx.mxConstants.STYLE_EDGE]: editor.mx.mxConstants.EDGESTYLE_ORTHOGONAL,
1435
+ [editor.mx.mxConstants.STYLE_ROUNDED]: '1',
1436
+ [editor.mx.mxConstants.STYLE_ARCSIZE]: 10,
1437
+ [editor.mx.mxConstants.STYLE_VERTICAL_ALIGN]: editor.mx.mxConstants.ALIGN_MIDDLE,
1438
+ [editor.mx.mxConstants.STYLE_ALIGN]: editor.mx.mxConstants.ALIGN_CENTER,
1439
+ [editor.mx.mxConstants.STYLE_STROKECOLOR]: StyleTokens.CONNECTOR_STROKE_COLOR,
1440
+ [editor.mx.mxConstants.STYLE_FONTCOLOR]: StyleTokens.DEFAULT_FONT_COLOR,
1441
+ [editor.mx.mxConstants.STYLE_STROKEWIDTH]: StyleTokens.DEFAULT_STROKE_WIDTH,
1326
1442
  }
1327
1443
  },
1328
1444
  {
1329
- name: 'defaultEdge',
1445
+ name: StyleTypes.MESSAGE_FLOW,
1330
1446
  value: {
1331
1447
  [editor.mx.mxConstants.STYLE_SHAPE]: editor.mx.mxConstants.SHAPE_CONNECTOR,
1448
+ [editor.mx.mxConstants.STYLE_STARTARROW]: editor.mx.mxConstants.ARROW_OVAL,
1449
+ [editor.mx.mxConstants.STYLE_STARTFILL]: false,
1332
1450
  [editor.mx.mxConstants.STYLE_ENDARROW]: editor.mx.mxConstants.ARROW_BLOCK,
1451
+ [editor.mx.mxConstants.STYLE_ENDFILL]: false,
1452
+ [editor.mx.mxConstants.STYLE_DASHED]: 1,
1333
1453
  [editor.mx.mxConstants.STYLE_EDGE]: editor.mx.mxConstants.EDGESTYLE_ORTHOGONAL,
1334
1454
  [editor.mx.mxConstants.STYLE_ROUNDED]: '1',
1335
1455
  [editor.mx.mxConstants.STYLE_ARCSIZE]: 10,
@@ -1342,6 +1462,7 @@ class BpmnEditor extends editor.Editor {
1342
1462
  }
1343
1463
  ]
1344
1464
  });
1465
+ console.log("asdadsad");
1345
1466
  }
1346
1467
  createGraph(options) {
1347
1468
  return new BpmnGraph(options);
@@ -1350,9 +1471,9 @@ class BpmnEditor extends editor.Editor {
1350
1471
  if (this.undoManager)
1351
1472
  this.undoManager.enabled = false;
1352
1473
  try {
1353
- if (editor.Utils.cellOfType(cell, CellTypes.EMBEDDED_SUB_PROCESS)) {
1474
+ if (editor.Utils.cellOfType(cell, editor.CellTypes.EMBEDDED_SUB_PROCESS)) {
1354
1475
  for (let child of cell.children) {
1355
- if (editor.Utils.cellOfType(child, CellTypes.SUB_PROCESS_CHILDREN_SLOT)) {
1476
+ if (editor.Utils.cellOfType(child, editor.CellTypes.SUB_PROCESS_CHILDREN_SLOT)) {
1356
1477
  this.graph.enterGroup(child);
1357
1478
  this.graph.zoomActual();
1358
1479
  this.fireEvent(new editor.mx.mxEventObject(BpmnEditor.EVENT_ROOT_CHANGED));
@@ -1381,9 +1502,9 @@ class BpmnEditor extends editor.Editor {
1381
1502
  BpmnEditor.EVENT_ROOT_CHANGED = 'rootChanged';
1382
1503
  class ActionsHelper {
1383
1504
  static addLane(graph, cell, before) {
1384
- if (editor.Utils.cellOfType(cell, CellTypes.POOL)) {
1505
+ if (editor.Utils.cellOfType(cell, editor.CellTypes.POOL)) {
1385
1506
  graph.transaction(() => {
1386
- let lane = graph.newCellInstance({ type: CellTypes.LANE, assignName: true });
1507
+ let lane = graph.newCellInstance({ type: editor.CellTypes.LANE, assignName: true });
1387
1508
  if (!ActionsHelper.hasLanes(cell) && cell.getChildCount() > 0) {
1388
1509
  let children = cell.children;
1389
1510
  graph.addCell(lane, cell);
@@ -1395,9 +1516,9 @@ class ActionsHelper {
1395
1516
  graph.addCell(lane, cell);
1396
1517
  });
1397
1518
  }
1398
- else if (editor.Utils.cellOfType(cell, CellTypes.LANE)) {
1519
+ else if (editor.Utils.cellOfType(cell, editor.CellTypes.LANE)) {
1399
1520
  graph.transaction(() => {
1400
- let lane = graph.newCellInstance({ type: CellTypes.LANE, assignName: true });
1521
+ let lane = graph.newCellInstance({ type: editor.CellTypes.LANE, assignName: true });
1401
1522
  let index = cell.parent.getIndex(cell);
1402
1523
  graph.addCell(lane, cell.parent, before ? index : index + 1);
1403
1524
  });
@@ -1406,7 +1527,7 @@ class ActionsHelper {
1406
1527
  static hasLanes(cell) {
1407
1528
  if (cell.getChildCount() > 0) {
1408
1529
  for (let child of cell.children) {
1409
- if (editor.Utils.cellOfType(child, CellTypes.LANE))
1530
+ if (editor.Utils.cellOfType(child, editor.CellTypes.LANE))
1410
1531
  return true;
1411
1532
  }
1412
1533
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e8fa91cf.js');
6
- const editor = require('./editor-386996a2.js');
6
+ const editor = require('./editor-39f75f41.js');
7
7
 
8
8
  const CellTypes = {
9
9
  PRINT_BLOCK: 'PrintBlock',