camunda-bpmn-js 0.24.0 → 0.24.1

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.
@@ -54,8 +54,9 @@
54
54
  --palette-background-color: var(--color-grey-225-10-97);
55
55
  --palette-border-color: var(--color-grey-225-10-75);
56
56
 
57
+ --popup-font-size: 14px;
57
58
  --popup-header-entry-selected-color: var(--color-blue-205-100-50);
58
- --popup-header-separator-color: var(--color-grey-225-10-75);
59
+ --popup-header-font-weight: bolder;
59
60
  --popup-background-color: var(--color-white);
60
61
  --popup-border-color: var(--color-grey-225-10-75);
61
62
  --popup-shadow-color: var(--color-grey-225-10-80);
@@ -536,12 +537,13 @@ marker.djs-dragger tspan {
536
537
  box-shadow: 0px 2px 10px var(--popup-shadow-color);
537
538
  min-width: 120px;
538
539
  outline: none;
540
+ font-size: var(--popup-font-size);
539
541
  }
540
542
 
541
543
  .djs-popup-search input {
542
544
  width: 100%;
543
545
  box-sizing: border-box;
544
- font-size: 14px;
546
+ font-size: var(--popup-font-size);
545
547
  padding: 3px 6px;
546
548
  border-radius: 2px;
547
549
  border: solid 1px var(--popup-search-border-color);
@@ -562,7 +564,6 @@ marker.djs-dragger tspan {
562
564
  }
563
565
 
564
566
  .djs-popup-header .entry {
565
- font-size: 19.5px;
566
567
  border-radius: 2px;
567
568
  }
568
569
 
@@ -579,11 +580,10 @@ marker.djs-dragger tspan {
579
580
  }
580
581
 
581
582
  .djs-popup-title {
582
- font-size: 14px;
583
- font-weight: 500;
583
+ font-size: var(--popup-font-size);
584
+ font-weight: var(--popup-header-font-weight);
584
585
  flex: 1;
585
586
  margin: 0;
586
- width: max-content;
587
587
  }
588
588
 
589
589
  .djs-popup-search {
@@ -620,19 +620,26 @@ marker.djs-dragger tspan {
620
620
  padding: 5px 7px;
621
621
  cursor: default;
622
622
  border-radius: 4px;
623
- font-size: 14px;
624
623
  }
625
624
 
626
625
  .djs-popup-body .entry-header {
627
- font-weight: 500;
626
+ font-weight: var(--popup-header-font-weight);
628
627
  color: var(--popup-entry-title-color);
629
628
  padding-left: 0;
630
629
  }
631
630
 
631
+ .djs-popup [class*="icon"] .djs-popup-label,
632
+ .djs-popup-label:not(:first-child) {
633
+ margin-left: .5em;
634
+ }
635
+
636
+ .djs-popup [class*="icon"]:before,
632
637
  .djs-popup-entry-icon {
633
- width: 16px;
634
- margin-right: 0.5rem;
635
- margin-bottom: -0.2rem;
638
+ width: 1em;
639
+ height: 1em;
640
+ display: inline-block;
641
+ font-size: 1.4em;
642
+ vertical-align: middle;
636
643
  }
637
644
 
638
645
  .djs-popup-body .entry-header:not(:first-child) {
@@ -666,10 +673,15 @@ marker.djs-dragger tspan {
666
673
  color: var(--popup-description-color);
667
674
  }
668
675
 
669
- .djs-popup-entry-name,
676
+ .djs-popup-label,
670
677
  .djs-popup-entry-description {
671
678
  line-height: 1.4em;
672
- display: block;
679
+ }
680
+
681
+ .djs-popup-title,
682
+ .djs-popup-label,
683
+ .djs-popup-entry-description,
684
+ .djs-popup .entry-header {
673
685
  overflow: hidden;
674
686
  text-overflow: ellipsis;
675
687
  white-space: nowrap;
@@ -686,15 +698,6 @@ marker.djs-dragger tspan {
686
698
  overflow: hidden;
687
699
  }
688
700
 
689
- .djs-popup-entry-name[class^="bpmn-icon-"]:before,
690
- .djs-popup-entry-name[class*=" bpmn-icon-"]:before,
691
- .djs-popup-entry-icon {
692
- display: inline-block;
693
- font-size: 1.4em;
694
- vertical-align: middle;
695
- margin-right: 0.5rem;
696
- }
697
-
698
701
  .djs-popup-body {
699
702
  flex-direction: column;
700
703
  width: auto;
@@ -711,13 +714,12 @@ marker.djs-dragger tspan {
711
714
 
712
715
  .djs-popup *::-webkit-scrollbar-track {
713
716
  box-shadow: none;
714
- background: transparent1;
717
+ background: transparent;
715
718
  margin: 0;
716
719
  padding: 5px;
717
720
  }
718
721
 
719
722
  .djs-popup-no-results {
720
- font-size: 14px;
721
723
  padding: 0 12px 12px 12px;
722
724
  color: var(--popup-no-results-color);
723
725
  }
@@ -28364,14 +28364,11 @@
28364
28364
  onClick
28365
28365
  } = props;
28366
28366
 
28367
- const createImage = imageUrl => {
28368
- return m$2`<img src=${ imageUrl } class="djs-popup-entry-icon" />`;
28369
- };
28370
-
28371
28367
  return m$2`
28372
28368
  <li
28373
28369
  class=${ clsx('entry', { selected }) }
28374
28370
  data-id=${ entry.id }
28371
+ title=${ entry.title || entry.label }
28375
28372
  onClick=${ onClick }
28376
28373
  onMouseEnter=${ onMouseEnter }
28377
28374
  onMouseLeave=${ onMouseLeave }
@@ -28379,10 +28376,16 @@
28379
28376
  <div class="djs-popup-entry-content">
28380
28377
  <span
28381
28378
  class=${ clsx('djs-popup-entry-name', entry.className) }
28382
- title=${ entry.label || entry.name }
28383
28379
  >
28384
- ${ entry.imageUrl ? createImage(entry.imageUrl) : null }
28385
- ${ entry.label || entry.name }
28380
+ ${ entry.imageUrl ? m$2`
28381
+ <img class="djs-popup-entry-icon" src=${ entry.imageUrl } />
28382
+ ` : null }
28383
+
28384
+ ${ entry.label ? m$2`
28385
+ <span class="djs-popup-label">
28386
+ ${ entry.label }
28387
+ </span>
28388
+ ` : null }
28386
28389
  </span>
28387
28390
  ${ entry.description && m$2`
28388
28391
  <span
@@ -28452,7 +28455,7 @@
28452
28455
  <div class="djs-popup-results" ref=${ resultsRef }>
28453
28456
  ${ groups.map(group => m$2`
28454
28457
  ${ group.name && m$2`
28455
- <div key=${ group.id } class="entry-header">
28458
+ <div key=${ group.id } class="entry-header" title=${ group.name }>
28456
28459
  ${ group.name }
28457
28460
  </div>
28458
28461
  ` }
@@ -28538,7 +28541,9 @@
28538
28541
  width,
28539
28542
  scale,
28540
28543
  search,
28541
- entries: originalEntries
28544
+ entries: originalEntries,
28545
+ onOpened,
28546
+ onClosed
28542
28547
  } = props;
28543
28548
 
28544
28549
  const searchable = F$2(() => {
@@ -28556,6 +28561,14 @@
28556
28561
  const [ entries, setEntries ] = p$3(originalEntries);
28557
28562
  const [ selectedEntry, setSelectedEntry ] = p$3(entries[0]);
28558
28563
 
28564
+ h$2(() => {
28565
+ onOpened();
28566
+
28567
+ return () => {
28568
+ onClosed();
28569
+ };
28570
+ }, []);
28571
+
28559
28572
  const updateEntries = T$3((newEntries) => {
28560
28573
 
28561
28574
  // select first entry if non is selected
@@ -28578,10 +28591,8 @@
28578
28591
  }
28579
28592
 
28580
28593
  const search = [
28581
- entry.name,
28582
28594
  entry.description || '',
28583
- entry.label || '',
28584
- entry.id || ''
28595
+ entry.label || ''
28585
28596
  ]
28586
28597
  .join('---')
28587
28598
  .toLowerCase();
@@ -28680,18 +28691,23 @@
28680
28691
  >
28681
28692
  ${ displayHeader && m$2`
28682
28693
  <div class="djs-popup-header">
28683
- <h3 class="djs-popup-title">${ title }</h3>
28694
+ <h3 class="djs-popup-title" title=${ title }>${ title }</h3>
28684
28695
  ${ headerEntries.map(entry => m$2`
28685
28696
  <span
28686
28697
  class=${ getHeaderClasses(entry, entry === selectedEntry) }
28687
28698
  onClick=${ event => onSelect(event, entry) }
28688
- title=${ entry.title }
28699
+ title=${ entry.title || entry.label }
28689
28700
  data-id=${ entry.id }
28690
28701
  onMouseEnter=${ () => setSelectedEntry(entry) }
28691
28702
  onMouseLeave=${ () => setSelectedEntry(null) }
28692
28703
  >
28693
- ${ entry.imageUrl ? m$2`<img src=${ entry.imageUrl } />` : null }
28694
- ${ entry.label ? entry.label : null }
28704
+ ${ entry.imageUrl ? m$2`
28705
+ <img class="djs-popup-entry-icon" src=${ entry.imageUrl } />
28706
+ ` : null }
28707
+
28708
+ ${ entry.label ? m$2`
28709
+ <span class="djs-popup-label">${ entry.label }</span>
28710
+ ` : null }
28695
28711
  </span>
28696
28712
  `) }
28697
28713
  </div>
@@ -28911,6 +28927,8 @@
28911
28927
  entries=${ entriesArray }
28912
28928
  headerEntries=${ headerEntriesArray }
28913
28929
  scale=${ scale }
28930
+ onOpened=${ this._onOpened.bind(this) }
28931
+ onClosed=${ this._onClosed.bind(this) }
28914
28932
  ...${{ ...options }}
28915
28933
  />
28916
28934
  `,
@@ -29014,6 +29032,14 @@
29014
29032
  this._eventBus.fire(`popupMenu.${ event }`, payload);
29015
29033
  };
29016
29034
 
29035
+ PopupMenu.prototype._onOpened = function() {
29036
+ this._emit('opened');
29037
+ };
29038
+
29039
+ PopupMenu.prototype._onClosed = function() {
29040
+ this._emit('closed');
29041
+ };
29042
+
29017
29043
  PopupMenu.prototype._createContainer = function(config) {
29018
29044
 
29019
29045
  let parent = config && config.parent || 'body';
@@ -29145,7 +29171,7 @@
29145
29171
  *
29146
29172
  * @example
29147
29173
  * const popupMenuProvider = {
29148
- * getPopupMenuEntries: function(element) {
29174
+ * getPopupMenuEntries(element) {
29149
29175
  * return {
29150
29176
  * 'entry-1': {
29151
29177
  * label: 'My Entry',
@@ -29156,6 +29182,22 @@
29156
29182
  * };
29157
29183
  *
29158
29184
  * popupMenu.registerProvider('myMenuID', popupMenuProvider);
29185
+ *
29186
+ * @example
29187
+ * const replacingPopupMenuProvider = {
29188
+ * getPopupMenuEntries(element) {
29189
+ * return (entries) => {
29190
+ * const {
29191
+ * someEntry,
29192
+ * ...remainingEntries
29193
+ * } = entries;
29194
+ *
29195
+ * return remainingEntries;
29196
+ * };
29197
+ * }
29198
+ * };
29199
+ *
29200
+ * popupMenu.registerProvider('myMenuID', replacingPopupMenuProvider);
29159
29201
  */
29160
29202
  PopupMenu.prototype.registerProvider = function(id, priority, provider) {
29161
29203
  if (!provider) {
@@ -36913,7 +36955,9 @@
36913
36955
  );
36914
36956
 
36915
36957
  var isTriggeredByEventEqual = (
36916
- businessObject.triggeredByEvent === target.triggeredByEvent
36958
+
36959
+ // coherse to <false>
36960
+ !!target.triggeredByEvent === !!businessObject.triggeredByEvent
36917
36961
  );
36918
36962
 
36919
36963
  var isExpandedEqual = (
@@ -37329,6 +37373,15 @@
37329
37373
  ];
37330
37374
 
37331
37375
  var TRANSACTION = [
37376
+ {
37377
+ label: 'Transaction',
37378
+ actionName: 'replace-with-transaction',
37379
+ className: 'bpmn-icon-transaction',
37380
+ target: {
37381
+ type: 'bpmn:Transaction',
37382
+ isExpanded: true
37383
+ }
37384
+ },
37332
37385
  {
37333
37386
  label: 'Sub Process',
37334
37387
  actionName: 'replace-with-subprocess',
@@ -37350,26 +37403,7 @@
37350
37403
  }
37351
37404
  ];
37352
37405
 
37353
- var EVENT_SUB_PROCESS = [
37354
- {
37355
- label: 'Sub Process',
37356
- actionName: 'replace-with-subprocess',
37357
- className: 'bpmn-icon-subprocess-expanded',
37358
- target: {
37359
- type: 'bpmn:SubProcess',
37360
- isExpanded: true
37361
- }
37362
- },
37363
- {
37364
- label: 'Transaction',
37365
- actionName: 'replace-with-transaction',
37366
- className: 'bpmn-icon-transaction',
37367
- target: {
37368
- type: 'bpmn:Transaction',
37369
- isExpanded: true
37370
- }
37371
- }
37372
- ];
37406
+ var EVENT_SUB_PROCESS = TRANSACTION;
37373
37407
 
37374
37408
  var TASK = [
37375
37409
  {