bpmn-js 11.3.1 → 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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v11.3.1
2
+ * bpmn-js - bpmn-modeler v11.4.0
3
3
  *
4
4
  * Copyright (c) 2014-present, camunda Services GmbH
5
5
  *
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Source Code: https://github.com/bpmn-io/bpmn-js
10
10
  *
11
- * Date: 2023-02-08
11
+ * Date: 2023-02-16
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -17463,7 +17463,11 @@
17463
17463
  ...shapeStyle({
17464
17464
  fill: fill,
17465
17465
  stroke: stroke,
17466
- strokeWidth: 1
17466
+ strokeWidth: 1,
17467
+
17468
+ // fix for safari / chrome / firefox bug not correctly
17469
+ // resetting stroke dash array
17470
+ strokeDasharray: [ 10000, 1 ]
17467
17471
  })
17468
17472
  });
17469
17473
 
@@ -17479,7 +17483,11 @@
17479
17483
  ...shapeStyle({
17480
17484
  fill: fill,
17481
17485
  stroke: stroke,
17482
- strokeWidth: 1
17486
+ strokeWidth: 1,
17487
+
17488
+ // fix for safari / chrome / firefox bug not correctly
17489
+ // resetting stroke dash array
17490
+ strokeDasharray: [ 10000, 1 ]
17483
17491
  })
17484
17492
  });
17485
17493
 
@@ -17495,7 +17503,11 @@
17495
17503
  ...lineStyle({
17496
17504
  fill: 'none',
17497
17505
  stroke: stroke,
17498
- strokeWidth: 1.5
17506
+ strokeWidth: 1.5,
17507
+
17508
+ // fix for safari / chrome / firefox bug not correctly
17509
+ // resetting stroke dash array
17510
+ strokeDasharray: [ 10000, 1 ]
17499
17511
  })
17500
17512
  });
17501
17513
 
@@ -17512,7 +17524,11 @@
17512
17524
  ...lineStyle({
17513
17525
  fill: 'none',
17514
17526
  stroke: stroke,
17515
- strokeWidth: 1.5
17527
+ strokeWidth: 1.5,
17528
+
17529
+ // fix for safari / chrome / firefox bug not correctly
17530
+ // resetting stroke dash array
17531
+ strokeDasharray: [ 10000, 1 ]
17516
17532
  })
17517
17533
  });
17518
17534
 
@@ -40462,16 +40478,23 @@
40462
40478
  var selection = this._injector.get('selection', false);
40463
40479
  var contextPad = this._injector.get('contextPad', false);
40464
40480
  var palette = this._injector.get('palette', false);
40481
+ var popupMenu = this._injector.get('popupMenu', false);
40465
40482
 
40466
40483
  const actions = {};
40467
40484
 
40468
40485
  // append
40469
- if (selection && contextPad) {
40486
+ if (selection && contextPad && palette && popupMenu && palette) {
40470
40487
  assign$1(actions, {
40471
40488
  'appendElement': function(event) {
40472
- contextPad.triggerEntry('append', 'click', event);
40473
- } }
40474
- );
40489
+ const selected = selection && selection.get();
40490
+
40491
+ if (selected.length == 1 && !popupMenu.isEmpty(selected[0], 'bpmn-append')) {
40492
+ contextPad.triggerEntry('append', 'click', event);
40493
+ } else {
40494
+ palette.triggerEntry('create', 'click', event);
40495
+ }
40496
+ }
40497
+ });
40475
40498
  }
40476
40499
 
40477
40500
  // create
@@ -40497,7 +40520,6 @@
40497
40520
  this._injector = injector;
40498
40521
  this._keyboard = this._injector.get('keyboard', false);
40499
40522
  this._editorActions = this._injector.get('editorActions', false);
40500
- this._selection = this._injector.get('selection', false);
40501
40523
 
40502
40524
  if (this._keyboard) {
40503
40525
  this._injector.invoke(KeyboardBindings, this);
@@ -40521,7 +40543,6 @@
40521
40543
 
40522
40544
  var keyboard = this._keyboard;
40523
40545
  var editorActions = this._editorActions;
40524
- var selection = this._selection;
40525
40546
 
40526
40547
  // inherit default bindings
40527
40548
  KeyboardBindings.prototype.registerBindings.call(this, keyboard, editorActions);
@@ -40552,12 +40573,7 @@
40552
40573
 
40553
40574
  if (keyboard && keyboard.isKey([ 'a', 'A' ], event)) {
40554
40575
 
40555
- if (selection && selection.get().length == 1) {
40556
- editorActions && editorActions.trigger('appendElement', event);
40557
- } else {
40558
- editorActions && editorActions.trigger('createElement', event);
40559
- }
40560
-
40576
+ editorActions && editorActions.trigger('appendElement', event);
40561
40577
  return true;
40562
40578
  }
40563
40579
  });
@@ -40589,7 +40605,8 @@
40589
40605
  create,
40590
40606
  autoPlace,
40591
40607
  rules,
40592
- mouse
40608
+ mouse,
40609
+ translate
40593
40610
  ) {
40594
40611
  this._elementFactory = elementFactory;
40595
40612
  this._popupMenu = popupMenu;
@@ -40598,6 +40615,7 @@
40598
40615
  this._rules = rules;
40599
40616
  this._create = create;
40600
40617
  this._mouse = mouse;
40618
+ this._translate = translate;
40601
40619
 
40602
40620
  this.register();
40603
40621
  }
@@ -40608,7 +40626,8 @@
40608
40626
  'create',
40609
40627
  'autoPlace',
40610
40628
  'rules',
40611
- 'mouse'
40629
+ 'mouse',
40630
+ 'translate'
40612
40631
  ];
40613
40632
 
40614
40633
  /**
@@ -40627,6 +40646,8 @@
40627
40646
  */
40628
40647
  AppendMenuProvider.prototype.getPopupMenuEntries = function(element) {
40629
40648
  const rules = this._rules;
40649
+ const translate = this._translate;
40650
+
40630
40651
  const entries = {};
40631
40652
 
40632
40653
  if (!rules.allowed('shape.append', { element: element })) {
@@ -40650,10 +40671,13 @@
40650
40671
  } = option;
40651
40672
 
40652
40673
  entries[`append-${actionName}`] = {
40653
- label,
40674
+ label: label && translate(label),
40654
40675
  className,
40655
40676
  description,
40656
- group,
40677
+ group: group && {
40678
+ ...group,
40679
+ name: translate(group.name)
40680
+ },
40657
40681
  search,
40658
40682
  rank,
40659
40683
  action: this._createEntryAction(element, target)
@@ -40721,7 +40745,9 @@
40721
40745
  event = mouse.getLastMoveEvent();
40722
40746
  }
40723
40747
 
40724
- return create.start(event, newElement);
40748
+ return create.start(event, newElement, {
40749
+ source: element
40750
+ });
40725
40751
  };
40726
40752
 
40727
40753
  return {
@@ -43615,7 +43641,7 @@
43615
43641
 
43616
43642
  function activateDirectEdit(element, force) {
43617
43643
  if (force ||
43618
- isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation' ]) ||
43644
+ isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation', 'bpmn:Participant' ]) ||
43619
43645
  isCollapsedSubProcess(element)) {
43620
43646
 
43621
43647
  directEditing.activate(element);