bpmn-js 11.3.0 → 11.4.0

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 (25) hide show
  1. package/dist/bpmn-modeler.development.js +87 -61
  2. package/dist/bpmn-modeler.production.min.js +3 -3
  3. package/dist/bpmn-navigated-viewer.development.js +22 -6
  4. package/dist/bpmn-navigated-viewer.production.min.js +2 -2
  5. package/dist/bpmn-viewer.development.js +22 -6
  6. package/dist/bpmn-viewer.production.min.js +2 -2
  7. package/lib/draw/BpmnRenderer.js +20 -4
  8. package/lib/features/align-elements/dist/align-bottom-tool.svg +1 -0
  9. package/lib/features/align-elements/dist/align-horizontal-center-tool.svg +1 -0
  10. package/lib/features/align-elements/dist/align-left-tool.svg +1 -0
  11. package/lib/features/align-elements/dist/align-right-tool.svg +1 -0
  12. package/lib/features/align-elements/dist/align-tool.svg +1 -0
  13. package/lib/features/align-elements/dist/align-top-tool.svg +1 -0
  14. package/lib/features/align-elements/dist/align-vertical-center-tool.svg +1 -0
  15. package/lib/features/create-append-anything/AppendContextPadProvider.js +3 -3
  16. package/lib/features/create-append-anything/AppendMenuProvider.js +15 -5
  17. package/lib/features/create-append-anything/CreateAppendEditorActions.js +11 -4
  18. package/lib/features/create-append-anything/CreateAppendKeyboardBindings.js +1 -8
  19. package/lib/features/create-append-anything/CreatePaletteProvider.js +7 -11
  20. package/lib/features/label-editing/LabelEditingProvider.js +1 -1
  21. package/lib/{icons → features/palette}/dist/create.svg +0 -0
  22. package/package.json +1 -1
  23. package/lib/icons/dist/append.svg +0 -1
  24. package/lib/icons/dist/connect-context-pad.svg +0 -1
  25. package/lib/icons/dist/connect-palette.svg +0 -1
@@ -177,7 +177,11 @@ export default function BpmnRenderer(
177
177
  ...shapeStyle({
178
178
  fill: fill,
179
179
  stroke: stroke,
180
- strokeWidth: 1
180
+ strokeWidth: 1,
181
+
182
+ // fix for safari / chrome / firefox bug not correctly
183
+ // resetting stroke dash array
184
+ strokeDasharray: [ 10000, 1 ]
181
185
  })
182
186
  });
183
187
 
@@ -193,7 +197,11 @@ export default function BpmnRenderer(
193
197
  ...shapeStyle({
194
198
  fill: fill,
195
199
  stroke: stroke,
196
- strokeWidth: 1
200
+ strokeWidth: 1,
201
+
202
+ // fix for safari / chrome / firefox bug not correctly
203
+ // resetting stroke dash array
204
+ strokeDasharray: [ 10000, 1 ]
197
205
  })
198
206
  });
199
207
 
@@ -209,7 +217,11 @@ export default function BpmnRenderer(
209
217
  ...lineStyle({
210
218
  fill: 'none',
211
219
  stroke: stroke,
212
- strokeWidth: 1.5
220
+ strokeWidth: 1.5,
221
+
222
+ // fix for safari / chrome / firefox bug not correctly
223
+ // resetting stroke dash array
224
+ strokeDasharray: [ 10000, 1 ]
213
225
  })
214
226
  });
215
227
 
@@ -226,7 +238,11 @@ export default function BpmnRenderer(
226
238
  ...lineStyle({
227
239
  fill: 'none',
228
240
  stroke: stroke,
229
- strokeWidth: 1.5
241
+ strokeWidth: 1.5,
242
+
243
+ // fix for safari / chrome / firefox bug not correctly
244
+ // resetting stroke dash array
245
+ strokeDasharray: [ 10000, 1 ]
230
246
  })
231
247
  });
232
248
 
@@ -0,0 +1 @@
1
+ data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M150%25201650h1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%25221300%2522%2520x%253D%2522150%2522%2520y%253D%2522350%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%2522800%2522%2520x%253D%25221050%2522%2520y%253D%2522850%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -0,0 +1 @@
1
+ data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M900%2520150v1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%25221300%2522%2520height%253D%2522600%2522%2520x%253D%2522250%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522800%2522%2520height%253D%2522600%2522%2520x%253D%2522500%2522%2520y%253D%25221050%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -0,0 +1 @@
1
+ data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M100%2520150v1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%25221300%2522%2520height%253D%2522600%2522%2520x%253D%2522100%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522800%2522%2520height%253D%2522600%2522%2520x%253D%2522100%2522%2520y%253D%25221050%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -0,0 +1 @@
1
+ data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M1650%2520150v1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%25221300%2522%2520height%253D%2522600%2522%2520x%253D%2522350%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522800%2522%2520height%253D%2522600%2522%2520x%253D%2522850%2522%2520y%253D%25221050%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -0,0 +1 @@
1
+ data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25202000%25202000%2522%253E%253Cpath%2520d%253D%2522M200%2520150v1700%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%25221300%2522%2520height%253D%2522700%2522%2520x%253D%2522500%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522700%2522%2520height%253D%2522700%2522%2520x%253D%2522500%2522%2520y%253D%25221150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -0,0 +1 @@
1
+ data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M150%2520150h1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%25221300%2522%2520x%253D%2522150%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%2522800%2522%2520x%253D%25221050%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -0,0 +1 @@
1
+ data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M150%2520900h1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%25221300%2522%2520x%253D%2522150%2522%2520y%253D%2522250%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%2522800%2522%2520x%253D%25221050%2522%2520y%253D%2522500%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -12,12 +12,12 @@ var LOW_PRIORITY = 900;
12
12
  * A provider for align elements context pad button
13
13
  */
14
14
  export default function AppendContextPadProvider(contextPad, popupMenu, translate, canvas) {
15
+ contextPad.registerProvider(LOW_PRIORITY, this);
16
+
15
17
  this._contextPad = contextPad;
16
18
  this._popupMenu = popupMenu;
17
19
  this._translate = translate;
18
20
  this._canvas = canvas;
19
-
20
- contextPad.registerProvider(this);
21
21
  }
22
22
 
23
23
  AppendContextPadProvider.$inject = [
@@ -34,7 +34,7 @@ AppendContextPadProvider.prototype.getContextPadEntries = function(element) {
34
34
 
35
35
  if (!popupMenu.isEmpty(element, 'bpmn-append')) {
36
36
 
37
- // Replace menu entry
37
+ // append menu entry
38
38
  return {
39
39
  'append': {
40
40
  group: 'model',
@@ -10,7 +10,8 @@ export default function AppendMenuProvider(
10
10
  create,
11
11
  autoPlace,
12
12
  rules,
13
- mouse
13
+ mouse,
14
+ translate
14
15
  ) {
15
16
  this._elementFactory = elementFactory;
16
17
  this._popupMenu = popupMenu;
@@ -19,6 +20,7 @@ export default function AppendMenuProvider(
19
20
  this._rules = rules;
20
21
  this._create = create;
21
22
  this._mouse = mouse;
23
+ this._translate = translate;
22
24
 
23
25
  this.register();
24
26
  }
@@ -29,7 +31,8 @@ AppendMenuProvider.$inject = [
29
31
  'create',
30
32
  'autoPlace',
31
33
  'rules',
32
- 'mouse'
34
+ 'mouse',
35
+ 'translate'
33
36
  ];
34
37
 
35
38
  /**
@@ -48,6 +51,8 @@ AppendMenuProvider.prototype.register = function() {
48
51
  */
49
52
  AppendMenuProvider.prototype.getPopupMenuEntries = function(element) {
50
53
  const rules = this._rules;
54
+ const translate = this._translate;
55
+
51
56
  const entries = {};
52
57
 
53
58
  if (!rules.allowed('shape.append', { element: element })) {
@@ -71,10 +76,13 @@ AppendMenuProvider.prototype.getPopupMenuEntries = function(element) {
71
76
  } = option;
72
77
 
73
78
  entries[`append-${actionName}`] = {
74
- label,
79
+ label: label && translate(label),
75
80
  className,
76
81
  description,
77
- group,
82
+ group: group && {
83
+ ...group,
84
+ name: translate(group.name)
85
+ },
78
86
  search,
79
87
  rank,
80
88
  action: this._createEntryAction(element, target)
@@ -142,7 +150,9 @@ AppendMenuProvider.prototype._createEntryAction = function(element, target) {
142
150
  event = mouse.getLastMoveEvent();
143
151
  }
144
152
 
145
- return create.start(event, newElement);
153
+ return create.start(event, newElement, {
154
+ source: element
155
+ });
146
156
  };
147
157
 
148
158
  return {
@@ -25,16 +25,23 @@ CreateAppendEditorActions.prototype.registerActions = function() {
25
25
  var selection = this._injector.get('selection', false);
26
26
  var contextPad = this._injector.get('contextPad', false);
27
27
  var palette = this._injector.get('palette', false);
28
+ var popupMenu = this._injector.get('popupMenu', false);
28
29
 
29
30
  const actions = {};
30
31
 
31
32
  // append
32
- if (selection && contextPad) {
33
+ if (selection && contextPad && palette && popupMenu && palette) {
33
34
  assign(actions, {
34
35
  'appendElement': function(event) {
35
- contextPad.triggerEntry('append', 'click', event);
36
- } }
37
- );
36
+ const selected = selection && selection.get();
37
+
38
+ if (selected.length == 1 && !popupMenu.isEmpty(selected[0], 'bpmn-append')) {
39
+ contextPad.triggerEntry('append', 'click', event);
40
+ } else {
41
+ palette.triggerEntry('create', 'click', event);
42
+ }
43
+ }
44
+ });
38
45
  }
39
46
 
40
47
  // create
@@ -13,7 +13,6 @@ export default function CreateAppendKeyboardBindings(injector) {
13
13
  this._injector = injector;
14
14
  this._keyboard = this._injector.get('keyboard', false);
15
15
  this._editorActions = this._injector.get('editorActions', false);
16
- this._selection = this._injector.get('selection', false);
17
16
 
18
17
  if (this._keyboard) {
19
18
  this._injector.invoke(KeyboardBindings, this);
@@ -37,7 +36,6 @@ CreateAppendKeyboardBindings.prototype.registerBindings = function() {
37
36
 
38
37
  var keyboard = this._keyboard;
39
38
  var editorActions = this._editorActions;
40
- var selection = this._selection;
41
39
 
42
40
  // inherit default bindings
43
41
  KeyboardBindings.prototype.registerBindings.call(this, keyboard, editorActions);
@@ -68,12 +66,7 @@ CreateAppendKeyboardBindings.prototype.registerBindings = function() {
68
66
 
69
67
  if (keyboard && keyboard.isKey([ 'a', 'A' ], event)) {
70
68
 
71
- if (selection && selection.get().length == 1) {
72
- editorActions && editorActions.trigger('appendElement', event);
73
- } else {
74
- editorActions && editorActions.trigger('createElement', event);
75
- }
76
-
69
+ editorActions && editorActions.trigger('appendElement', event);
77
70
  return true;
78
71
  }
79
72
  });
@@ -1,7 +1,5 @@
1
- import {
2
- assign
3
- } from 'min-dash';
4
1
  import { createIcon } from '../../icons/Icons';
2
+
5
3
  import { query as domQuery } from 'min-dom';
6
4
 
7
5
 
@@ -9,12 +7,13 @@ import { query as domQuery } from 'min-dom';
9
7
  * A palette provider for the create elements menu.
10
8
  */
11
9
  export default function CreatePaletteProvider(palette, translate, popupMenu, canvas, mouse) {
10
+
12
11
  this._translate = translate;
13
12
  this._popupMenu = popupMenu;
14
13
  this._canvas = canvas;
15
14
  this._mouse = mouse;
16
15
 
17
- palette.registerProvider(this);
16
+ palette.registerProvider(800,this);
18
17
  }
19
18
 
20
19
  CreatePaletteProvider.$inject = [
@@ -27,8 +26,7 @@ CreatePaletteProvider.$inject = [
27
26
 
28
27
 
29
28
  CreatePaletteProvider.prototype.getPaletteEntries = function(element) {
30
- const actions = {},
31
- translate = this._translate,
29
+ const translate = this._translate,
32
30
  popupMenu = this._popupMenu,
33
31
  canvas = this._canvas,
34
32
  mouse = this._mouse;
@@ -51,7 +49,7 @@ CreatePaletteProvider.prototype.getPaletteEntries = function(element) {
51
49
  };
52
50
  };
53
51
 
54
- assign(actions, {
52
+ return {
55
53
  'create': {
56
54
  group: 'create',
57
55
  imageUrl: createIcon,
@@ -69,8 +67,6 @@ CreatePaletteProvider.prototype.getPaletteEntries = function(element) {
69
67
  });
70
68
  }
71
69
  }
72
- },
73
- });
74
-
75
- return actions;
70
+ }
71
+ };
76
72
  };
@@ -114,7 +114,7 @@ export default function LabelEditingProvider(
114
114
 
115
115
  function activateDirectEdit(element, force) {
116
116
  if (force ||
117
- isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation' ]) ||
117
+ isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation', 'bpmn:Participant' ]) ||
118
118
  isCollapsedSubProcess(element)) {
119
119
 
120
120
  directEditing.activate(element);
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-js",
3
- "version": "11.3.0",
3
+ "version": "11.4.0",
4
4
  "description": "A bpmn 2.0 toolkit and web modeler",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520width%253D%252222%2522%2520height%253D%252222%2522%2520viewBox%253D%25220%25200%25205.82%25205.82%2522%253E%253Cpath%2520d%253D%2522M1.3%25203.4c.3%25200%2520.5-.2.5-.5s-.2-.4-.5-.4c-.2%25200-.4.1-.4.4%25200%2520.3.2.5.4.5zm1.7%25200c.2%25200%2520.4-.2.4-.5s-.2-.4-.4-.4c-.3%25200-.5.1-.5.4%25200%2520.3.2.5.5.5zm1.6%25200c.2%25200%2520.4-.2.4-.5s-.2-.4-.4-.4c-.3%25200-.5.1-.5.4%25200%2520.3.2.5.5.5z%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25202048%25202048%2522%253E%253Cpath%2520d%253D%2522M2013.823%2520158.247%2520995.866%2520525.177l143.206%2520181.698L34.177%25201595.041l136.637%2520158.712%25201104.89-888.123%2520140.894%2520182.578Z%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25202048%25202048%2522%253E%253Cpath%2520d%253D%2522M2013.823%2520158.247%2520995.866%2520525.177l143.206%2520181.698L34.177%25201595.041l136.637%2520158.712%25201104.89-888.123%2520140.894%2520182.578Z%2522%252F%253E%253C%252Fsvg%253E