bpmn-js 11.0.3 → 11.0.5

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
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v11.0.3
2
+ * bpmn-js - bpmn-modeler v11.0.5
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-12-05
11
+ * Date: 2022-12-08
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -28124,14 +28124,11 @@
28124
28124
  onClick
28125
28125
  } = props;
28126
28126
 
28127
- const createImage = imageUrl => {
28128
- return m`<img src=${ imageUrl } class="djs-popup-entry-icon" />`;
28129
- };
28130
-
28131
28127
  return m`
28132
28128
  <li
28133
28129
  class=${ clsx('entry', { selected }) }
28134
28130
  data-id=${ entry.id }
28131
+ title=${ entry.title || entry.label }
28135
28132
  onClick=${ onClick }
28136
28133
  onMouseEnter=${ onMouseEnter }
28137
28134
  onMouseLeave=${ onMouseLeave }
@@ -28139,10 +28136,16 @@
28139
28136
  <div class="djs-popup-entry-content">
28140
28137
  <span
28141
28138
  class=${ clsx('djs-popup-entry-name', entry.className) }
28142
- title=${ entry.label || entry.name }
28143
28139
  >
28144
- ${ entry.imageUrl ? createImage(entry.imageUrl) : null }
28145
- ${ entry.label || entry.name }
28140
+ ${ entry.imageUrl ? m`
28141
+ <img class="djs-popup-entry-icon" src=${ entry.imageUrl } />
28142
+ ` : null }
28143
+
28144
+ ${ entry.label ? m`
28145
+ <span class="djs-popup-label">
28146
+ ${ entry.label }
28147
+ </span>
28148
+ ` : null }
28146
28149
  </span>
28147
28150
  ${ entry.description && m`
28148
28151
  <span
@@ -28212,7 +28215,7 @@
28212
28215
  <div class="djs-popup-results" ref=${ resultsRef }>
28213
28216
  ${ groups.map(group => m`
28214
28217
  ${ group.name && m`
28215
- <div key=${ group.id } class="entry-header">
28218
+ <div key=${ group.id } class="entry-header" title=${ group.name }>
28216
28219
  ${ group.name }
28217
28220
  </div>
28218
28221
  ` }
@@ -28298,7 +28301,9 @@
28298
28301
  width,
28299
28302
  scale,
28300
28303
  search,
28301
- entries: originalEntries
28304
+ entries: originalEntries,
28305
+ onOpened,
28306
+ onClosed
28302
28307
  } = props;
28303
28308
 
28304
28309
  const searchable = F(() => {
@@ -28316,6 +28321,14 @@
28316
28321
  const [ entries, setEntries ] = p(originalEntries);
28317
28322
  const [ selectedEntry, setSelectedEntry ] = p(entries[0]);
28318
28323
 
28324
+ h(() => {
28325
+ onOpened();
28326
+
28327
+ return () => {
28328
+ onClosed();
28329
+ };
28330
+ }, []);
28331
+
28319
28332
  const updateEntries = T((newEntries) => {
28320
28333
 
28321
28334
  // select first entry if non is selected
@@ -28338,10 +28351,8 @@
28338
28351
  }
28339
28352
 
28340
28353
  const search = [
28341
- entry.name,
28342
28354
  entry.description || '',
28343
- entry.label || '',
28344
- entry.id || ''
28355
+ entry.label || ''
28345
28356
  ]
28346
28357
  .join('---')
28347
28358
  .toLowerCase();
@@ -28440,18 +28451,23 @@
28440
28451
  >
28441
28452
  ${ displayHeader && m`
28442
28453
  <div class="djs-popup-header">
28443
- <h3 class="djs-popup-title">${ title }</h3>
28454
+ <h3 class="djs-popup-title" title=${ title }>${ title }</h3>
28444
28455
  ${ headerEntries.map(entry => m`
28445
28456
  <span
28446
28457
  class=${ getHeaderClasses(entry, entry === selectedEntry) }
28447
28458
  onClick=${ event => onSelect(event, entry) }
28448
- title=${ entry.title }
28459
+ title=${ entry.title || entry.label }
28449
28460
  data-id=${ entry.id }
28450
28461
  onMouseEnter=${ () => setSelectedEntry(entry) }
28451
28462
  onMouseLeave=${ () => setSelectedEntry(null) }
28452
28463
  >
28453
- ${ entry.imageUrl ? m`<img src=${ entry.imageUrl } />` : null }
28454
- ${ entry.label ? entry.label : null }
28464
+ ${ entry.imageUrl ? m`
28465
+ <img class="djs-popup-entry-icon" src=${ entry.imageUrl } />
28466
+ ` : null }
28467
+
28468
+ ${ entry.label ? m`
28469
+ <span class="djs-popup-label">${ entry.label }</span>
28470
+ ` : null }
28455
28471
  </span>
28456
28472
  `) }
28457
28473
  </div>
@@ -28671,6 +28687,8 @@
28671
28687
  entries=${ entriesArray }
28672
28688
  headerEntries=${ headerEntriesArray }
28673
28689
  scale=${ scale }
28690
+ onOpened=${ this._onOpened.bind(this) }
28691
+ onClosed=${ this._onClosed.bind(this) }
28674
28692
  ...${{ ...options }}
28675
28693
  />
28676
28694
  `,
@@ -28774,6 +28792,14 @@
28774
28792
  this._eventBus.fire(`popupMenu.${ event }`, payload);
28775
28793
  };
28776
28794
 
28795
+ PopupMenu.prototype._onOpened = function() {
28796
+ this._emit('opened');
28797
+ };
28798
+
28799
+ PopupMenu.prototype._onClosed = function() {
28800
+ this._emit('closed');
28801
+ };
28802
+
28777
28803
  PopupMenu.prototype._createContainer = function(config) {
28778
28804
 
28779
28805
  let parent = config && config.parent || 'body';
@@ -28905,7 +28931,7 @@
28905
28931
  *
28906
28932
  * @example
28907
28933
  * const popupMenuProvider = {
28908
- * getPopupMenuEntries: function(element) {
28934
+ * getPopupMenuEntries(element) {
28909
28935
  * return {
28910
28936
  * 'entry-1': {
28911
28937
  * label: 'My Entry',
@@ -28916,6 +28942,22 @@
28916
28942
  * };
28917
28943
  *
28918
28944
  * popupMenu.registerProvider('myMenuID', popupMenuProvider);
28945
+ *
28946
+ * @example
28947
+ * const replacingPopupMenuProvider = {
28948
+ * getPopupMenuEntries(element) {
28949
+ * return (entries) => {
28950
+ * const {
28951
+ * someEntry,
28952
+ * ...remainingEntries
28953
+ * } = entries;
28954
+ *
28955
+ * return remainingEntries;
28956
+ * };
28957
+ * }
28958
+ * };
28959
+ *
28960
+ * popupMenu.registerProvider('myMenuID', replacingPopupMenuProvider);
28919
28961
  */
28920
28962
  PopupMenu.prototype.registerProvider = function(id, priority, provider) {
28921
28963
  if (!provider) {