bpmn-js 11.0.0 → 11.0.3

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.
@@ -514,7 +514,7 @@ marker.djs-dragger tspan {
514
514
  /**
515
515
  * popup styles
516
516
  */
517
- .djs-popup {
517
+ .djs-popup-backdrop {
518
518
  position: fixed;
519
519
  width: 100vw;
520
520
  height: 100vh;
@@ -527,15 +527,15 @@ marker.djs-dragger tspan {
527
527
  border-radius: 2px;
528
528
  }
529
529
 
530
- .djs-popup-overlay {
530
+ .djs-popup {
531
531
  width: min-content;
532
532
  background: var(--popup-background-color);
533
533
  overflow: hidden;
534
534
  position: absolute;
535
535
 
536
536
  box-shadow: 0px 2px 10px var(--popup-shadow-color);
537
- padding-top: 12px;
538
537
  min-width: 120px;
538
+ outline: none;
539
539
  }
540
540
 
541
541
  .djs-popup-search input {
@@ -554,18 +554,11 @@ marker.djs-dragger tspan {
554
554
  outline: none;
555
555
  }
556
556
 
557
- .djs-popup_header {
558
- display: flex;
559
- align-items: stretch;
560
- line-height: 20px;
561
- margin: 12px 12px 10px 12px;
562
- }
563
-
564
557
  .djs-popup-header {
565
558
  display: flex;
566
559
  align-items: stretch;
567
560
  line-height: 20px;
568
- margin: 0 12px 10px 12px;
561
+ margin: 10px 12px 10px 12px;
569
562
  }
570
563
 
571
564
  .djs-popup-header .entry {
@@ -609,7 +602,7 @@ marker.djs-dragger tspan {
609
602
  }
610
603
 
611
604
  .djs-popup-results {
612
- margin: 0 3px 7px 12px;
605
+ margin: 7px 3px 7px 12px;
613
606
  list-style: none;
614
607
  max-height: 280px;
615
608
  overflow: overlay;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v11.0.0
2
+ * bpmn-js - bpmn-modeler v11.0.3
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: 2022-11-24
11
+ * Date: 2022-12-05
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -28505,28 +28505,26 @@
28505
28505
 
28506
28506
  const checkClose = T((event) => {
28507
28507
 
28508
- const overlay = closest(event.target, '.djs-popup .djs-popup-overlay', true);
28508
+ const popup = closest(event.target, '.djs-popup', true);
28509
28509
 
28510
- if (overlay) {
28510
+ if (popup) {
28511
28511
  return;
28512
28512
  }
28513
28513
 
28514
28514
  onClose();
28515
28515
  }, [ onClose ]);
28516
28516
 
28517
- const overlayRef = _();
28518
-
28519
28517
  s(() => {
28520
28518
  if (typeof positionGetter !== 'function') {
28521
28519
  return;
28522
28520
  }
28523
28521
 
28524
- const overlayEl = overlayRef.current;
28525
- const position = positionGetter(overlayEl);
28522
+ const popupEl = popupRef.current;
28523
+ const position = positionGetter(popupEl);
28526
28524
 
28527
- overlayEl.style.left = `${position.x}px`;
28528
- overlayEl.style.top = `${position.y}px`;
28529
- }, [ overlayRef.current, positionGetter ]);
28525
+ popupEl.style.left = `${position.x}px`;
28526
+ popupEl.style.top = `${position.y}px`;
28527
+ }, [ popupRef.current, positionGetter ]);
28530
28528
 
28531
28529
  // focus popup initially, on mount
28532
28530
  s(() => {
@@ -28535,17 +28533,16 @@
28535
28533
 
28536
28534
  return m`
28537
28535
  <div
28538
- class=${ clsx('djs-popup', className) }
28536
+ class="djs-popup-backdrop"
28539
28537
  onClick=${ checkClose }
28540
- onKeydown=${ onKeydown }
28541
- onKeyup=${ onKeyup }
28542
- ref=${ popupRef }
28543
- tabIndex="-1"
28544
28538
  >
28545
28539
  <div
28546
- class="djs-popup-overlay"
28547
- ref=${ overlayRef }
28548
- style=${ getOverlayStyle(props) }
28540
+ class=${ clsx('djs-popup', className) }
28541
+ style=${ getPopupStyle(props) }
28542
+ onKeydown=${ onKeydown }
28543
+ onKeyup=${ onKeyup }
28544
+ ref=${ popupRef }
28545
+ tabIndex="-1"
28549
28546
  >
28550
28547
  ${children}
28551
28548
  </div>
@@ -28555,7 +28552,7 @@
28555
28552
 
28556
28553
  // helpers //////////////////////
28557
28554
 
28558
- function getOverlayStyle(props) {
28555
+ function getPopupStyle(props) {
28559
28556
  return {
28560
28557
  transform: `scale(${props.scale})`,
28561
28558
  width: `${props.width}px`
@@ -28599,7 +28596,8 @@
28599
28596
  function PopupMenu(config, eventBus, canvas) {
28600
28597
  this._eventBus = eventBus;
28601
28598
  this._canvas = canvas;
28602
- this._current = {};
28599
+
28600
+ this._current = null;
28603
28601
 
28604
28602
  var scale = isDefined(config && config.scale) ? config.scale : {
28605
28603
  min: 1,
@@ -28612,7 +28610,7 @@
28612
28610
 
28613
28611
 
28614
28612
  eventBus.on('diagram.destroy', () => {
28615
- this._destroy();
28613
+ this.close();
28616
28614
  });
28617
28615
 
28618
28616
  eventBus.on('element.changed', event => {
@@ -28663,19 +28661,20 @@
28663
28661
  const onClose = result => this.close(result);
28664
28662
  const onSelect = (event, entry) => this.trigger(event, entry);
28665
28663
 
28666
- P(m`
28667
- <${PopupMenuComponent}
28668
- onClose=${ onClose }
28669
- onSelect=${ onSelect }
28670
- position=${ position }
28671
- className=${ className }
28672
- entries=${ entriesArray }
28673
- headerEntries=${ headerEntriesArray }
28674
- scale=${ scale }
28675
- ...${{ ...options }}
28676
- />
28677
- `,
28678
- this._current.container
28664
+ P(
28665
+ m`
28666
+ <${PopupMenuComponent}
28667
+ onClose=${ onClose }
28668
+ onSelect=${ onSelect }
28669
+ position=${ position }
28670
+ className=${ className }
28671
+ entries=${ entriesArray }
28672
+ headerEntries=${ headerEntriesArray }
28673
+ scale=${ scale }
28674
+ ...${{ ...options }}
28675
+ />
28676
+ `,
28677
+ this._current.container
28679
28678
  );
28680
28679
  };
28681
28680
 
@@ -28705,6 +28704,7 @@
28705
28704
  if (this.isOpen()) {
28706
28705
  this.close();
28707
28706
  }
28707
+
28708
28708
  const {
28709
28709
  entries,
28710
28710
  headerEntries
@@ -28725,8 +28725,6 @@
28725
28725
  this._bindAutoClose();
28726
28726
 
28727
28727
  this._render();
28728
-
28729
-
28730
28728
  };
28731
28729
 
28732
28730
 
@@ -28761,11 +28759,15 @@
28761
28759
 
28762
28760
  this.reset();
28763
28761
 
28764
- this._current.container = null;
28762
+ this._current = null;
28765
28763
  };
28766
28764
 
28767
28765
  PopupMenu.prototype.reset = function() {
28768
- P(null, this._current.container);
28766
+ const container = this._current.container;
28767
+
28768
+ P(null, container);
28769
+
28770
+ remove$2(container);
28769
28771
  };
28770
28772
 
28771
28773
  PopupMenu.prototype._emit = function(event, payload) {
@@ -28803,11 +28805,6 @@
28803
28805
  };
28804
28806
 
28805
28807
 
28806
- PopupMenu.prototype._destroy = function() {
28807
- this._current.container && remove$2(this._current.container);
28808
- };
28809
-
28810
-
28811
28808
  /**
28812
28809
  * Updates popup style.transform with respect to the config and zoom level.
28813
28810
  *
@@ -29027,7 +29024,7 @@
29027
29024
  * @return {boolean} true if open
29028
29025
  */
29029
29026
  PopupMenu.prototype.isOpen = function() {
29030
- return !!this._current.container;
29027
+ return !!this._current;
29031
29028
  };
29032
29029
 
29033
29030
 
@@ -36676,7 +36673,9 @@
36676
36673
  );
36677
36674
 
36678
36675
  var isTriggeredByEventEqual = (
36679
- businessObject.triggeredByEvent === target.triggeredByEvent
36676
+
36677
+ // coherse to <false>
36678
+ !!target.triggeredByEvent === !!businessObject.triggeredByEvent
36680
36679
  );
36681
36680
 
36682
36681
  var isExpandedEqual = (
@@ -37092,6 +37091,15 @@
37092
37091
  ];
37093
37092
 
37094
37093
  var TRANSACTION = [
37094
+ {
37095
+ label: 'Transaction',
37096
+ actionName: 'replace-with-transaction',
37097
+ className: 'bpmn-icon-transaction',
37098
+ target: {
37099
+ type: 'bpmn:Transaction',
37100
+ isExpanded: true
37101
+ }
37102
+ },
37095
37103
  {
37096
37104
  label: 'Sub Process',
37097
37105
  actionName: 'replace-with-subprocess',
@@ -37113,26 +37121,7 @@
37113
37121
  }
37114
37122
  ];
37115
37123
 
37116
- var EVENT_SUB_PROCESS = [
37117
- {
37118
- label: 'Sub Process',
37119
- actionName: 'replace-with-subprocess',
37120
- className: 'bpmn-icon-subprocess-expanded',
37121
- target: {
37122
- type: 'bpmn:SubProcess',
37123
- isExpanded: true
37124
- }
37125
- },
37126
- {
37127
- label: 'Transaction',
37128
- actionName: 'replace-with-transaction',
37129
- className: 'bpmn-icon-transaction',
37130
- target: {
37131
- type: 'bpmn:Transaction',
37132
- isExpanded: true
37133
- }
37134
- }
37135
- ];
37124
+ var EVENT_SUB_PROCESS = TRANSACTION;
37136
37125
 
37137
37126
  var TASK = [
37138
37127
  {