bpmn-js 14.0.0 → 14.1.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 v14.0.0
2
+ * bpmn-js - bpmn-modeler v14.1.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-08-30
11
+ * Date: 2023-10-17
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -25719,7 +25719,7 @@
25719
25719
  // pinch to zoom is mapped to wheel + ctrlKey = true
25720
25720
  // in modern browsers (!)
25721
25721
 
25722
- var isZoom = event.ctrlKey;
25722
+ var isZoom = event.ctrlKey || (isMac() && event.metaKey);
25723
25723
 
25724
25724
  var isHorizontalScroll = event.shiftKey;
25725
25725
 
@@ -39752,12 +39752,13 @@
39752
39752
  ];
39753
39753
 
39754
39754
  /**
39755
- * @typedef {import('../features/BpmnFactory').default} BpmnFactory
39755
+ * @typedef {import('../modeling/BpmnFactory').default} BpmnFactory
39756
39756
  * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').default} PopupMenu
39757
- * @typedef {import('../features/Modeling').default} Modeling
39758
- * @typedef {import('../features/BpmnReplace').default} BpmnReplace
39757
+ * @typedef {import('../modeling/Modeling').default} Modeling
39758
+ * @typedef {import('../replace/BpmnReplace').default} BpmnReplace
39759
39759
  * @typedef {import('diagram-js/lib/features/Rules').default} Rules
39760
39760
  * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
39761
+ * @typedef {import('../copy-paste/ModdleCopy').default} ModdleCopy
39761
39762
  *
39762
39763
  * @typedef {import('../../model/Types').Element} Element
39763
39764
  * @typedef {import('../../model/Types').Moddle} Moddle
@@ -39784,10 +39785,11 @@
39784
39785
  * @param {BpmnReplace} bpmnReplace
39785
39786
  * @param {Rules} rules
39786
39787
  * @param {Translate} translate
39788
+ * @param {ModdleCopy} moddleCopy
39787
39789
  */
39788
39790
  function ReplaceMenuProvider(
39789
39791
  bpmnFactory, popupMenu, modeling, moddle,
39790
- bpmnReplace, rules, translate) {
39792
+ bpmnReplace, rules, translate, moddleCopy) {
39791
39793
 
39792
39794
  this._bpmnFactory = bpmnFactory;
39793
39795
  this._popupMenu = popupMenu;
@@ -39796,6 +39798,7 @@
39796
39798
  this._bpmnReplace = bpmnReplace;
39797
39799
  this._rules = rules;
39798
39800
  this._translate = translate;
39801
+ this._moddleCopy = moddleCopy;
39799
39802
 
39800
39803
  this._register();
39801
39804
  }
@@ -39807,7 +39810,8 @@
39807
39810
  'moddle',
39808
39811
  'bpmnReplace',
39809
39812
  'rules',
39810
- 'translate'
39813
+ 'translate',
39814
+ 'moddleCopy'
39811
39815
  ];
39812
39816
 
39813
39817
  ReplaceMenuProvider.prototype._register = function() {
@@ -40191,18 +40195,24 @@
40191
40195
  var translate = this._translate;
40192
40196
 
40193
40197
  function toggleLoopEntry(event, entry) {
40194
- var newLoopCharacteristics = getBusinessObject(target).loopCharacteristics;
40195
40198
 
40199
+ // remove
40196
40200
  if (entry.active) {
40197
- newLoopCharacteristics = undefined;
40198
- } else {
40199
- if (isUndefined$2(entry.options.isSequential) || !newLoopCharacteristics
40200
- || !is$1(newLoopCharacteristics, entry.options.loopCharacteristics)) {
40201
- newLoopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
40202
- }
40201
+ self._modeling.updateProperties(target, { loopCharacteristics: undefined });
40202
+ return;
40203
+ }
40204
+
40205
+ const currentLoopCharacteristics = target.businessObject.get('loopCharacteristics'),
40206
+ newLoopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
40203
40207
 
40204
- newLoopCharacteristics.isSequential = entry.options.isSequential;
40208
+ // copy old properties
40209
+ if (currentLoopCharacteristics) {
40210
+ self._moddleCopy.copyElement(currentLoopCharacteristics, newLoopCharacteristics);
40205
40211
  }
40212
+
40213
+ // update `isSequential` property
40214
+ newLoopCharacteristics.set('isSequential', entry.options.isSequential);
40215
+
40206
40216
  self._modeling.updateProperties(target, { loopCharacteristics: newLoopCharacteristics });
40207
40217
  }
40208
40218
 
@@ -46551,6 +46561,16 @@
46551
46561
  }
46552
46562
  });
46553
46563
 
46564
+ // ensure lanes aren't resized without their parent participant when using
46565
+ // space tool
46566
+ eventBus.on('spaceTool.move', HIGHEST_PRIORITY, function(event) {
46567
+ var hover = event.hover;
46568
+
46569
+ if (hover && is$1(hover, 'bpmn:Lane')) {
46570
+ event.hover = getLanesRoot(hover);
46571
+ }
46572
+ });
46573
+
46554
46574
  }
46555
46575
 
46556
46576
  FixHoverBehavior.$inject = [
@@ -52631,7 +52651,14 @@
52631
52651
 
52632
52652
  var root = this._canvas.getRootElement();
52633
52653
 
52634
- var children = selfAndAllChildren(root, true);
52654
+ if (hasSecondaryModifier(event) && event.hover) {
52655
+ root = event.hover;
52656
+ }
52657
+
52658
+ var children = [
52659
+ ...selfAndAllChildren(root, true),
52660
+ ...(root.attachers || [])
52661
+ ];
52635
52662
 
52636
52663
  var elements = this.calculateAdjustments(children, axis, delta, start);
52637
52664