bpmn-js 18.6.5 → 18.7.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.
@@ -63,6 +63,7 @@
63
63
  --popup-background-color: var(--color-white);
64
64
  --popup-border-color: transparent;
65
65
  --popup-shadow-color: var(--color-black-opacity-30);
66
+ --popup-disabled-color: var(--color-grey-225-10-35);
66
67
  --popup-description-color: var(--color-grey-225-10-55);
67
68
  --popup-no-results-color: var(--color-grey-225-10-55);
68
69
  --popup-entry-title-color: var(--color-grey-225-10-55);
@@ -674,6 +675,11 @@
674
675
  background-color: var(--popup-entry-hover-color);
675
676
  }
676
677
 
678
+ .djs-popup .entry.disabled {
679
+ color: var(--popup-disabled-color);
680
+ cursor: not-allowed;
681
+ }
682
+
677
683
  .djs-popup-body .entry:not(:first-child) {
678
684
  margin-top: 2px;
679
685
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v18.6.5
2
+ * bpmn-js - bpmn-modeler v18.7.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: 2025-09-19
11
+ * Date: 2025-09-23
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -27542,6 +27542,18 @@
27542
27542
 
27543
27543
  const groups = q(() => groupEntries$1(headerEntries), [ headerEntries ]);
27544
27544
 
27545
+ const isActionable = (entry) => {
27546
+ return entry.action && !entry.disabled;
27547
+ };
27548
+
27549
+ const handleClick = (event, entry) => {
27550
+ if (!isActionable(entry)) {
27551
+ return;
27552
+ }
27553
+
27554
+ return onSelect(event, entry);
27555
+ };
27556
+
27545
27557
  return m$1`
27546
27558
  <div class="djs-popup-header">
27547
27559
  <h3 class="djs-popup-title" title=${ title }>${ title }</h3>
@@ -27550,15 +27562,16 @@
27550
27562
 
27551
27563
  ${ group.entries.map(entry => m$1`
27552
27564
  <li key=${ entry.id }>
27553
- <${ entry.action ? 'button' : 'span' }
27565
+ <${ isActionable(entry) ? 'button' : 'span' }
27554
27566
  class=${ getHeaderClasses(entry, entry === selectedEntry) }
27555
- onClick=${ event => entry.action && onSelect(event, entry) }
27567
+ onClick=${ event => handleClick(event, entry) }
27556
27568
  title=${ entry.title || entry.label }
27557
27569
  data-id=${ entry.id }
27558
- onMouseEnter=${ () => entry.action && setSelectedEntry(entry) }
27559
- onMouseLeave=${ () => entry.action && setSelectedEntry(null) }
27560
- onFocus=${ () => entry.action && setSelectedEntry(entry) }
27561
- onBlur=${ () => entry.action && setSelectedEntry(null) }
27570
+ aria-disabled=${ entry.disabled || undefined }
27571
+ onMouseEnter=${ () => isActionable(entry) && setSelectedEntry(entry) }
27572
+ onMouseLeave=${ () => isActionable(entry) && setSelectedEntry(null) }
27573
+ onFocus=${ () => isActionable(entry) && setSelectedEntry(entry) }
27574
+ onBlur=${ () => isActionable(entry) && setSelectedEntry(null) }
27562
27575
  >
27563
27576
  ${(entry.imageUrl && m$1`<img class="djs-popup-entry-icon" src=${ entry.imageUrl } alt="" />`) ||
27564
27577
  (entry.imageHtml && m$1`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${ { __html: entry.imageHtml } } />`)}
@@ -27629,18 +27642,27 @@
27629
27642
  onAction
27630
27643
  } = props;
27631
27644
 
27645
+ const handleClick = (event, action) => {
27646
+ if (entry.disabled) {
27647
+ return;
27648
+ }
27649
+
27650
+ return onAction(event, entry, action);
27651
+ };
27652
+
27632
27653
  return m$1`
27633
27654
  <li
27634
- class=${ clsx('entry', { selected }) }
27655
+ class=${ clsx('entry', { selected, disabled: entry.disabled }) }
27635
27656
  data-id=${ entry.id }
27636
27657
  title=${ entry.title || entry.label }
27658
+ aria-disabled=${ entry.disabled || undefined }
27637
27659
  tabIndex="0"
27638
- onClick=${ onAction }
27660
+ onClick=${ handleClick }
27639
27661
  onFocus=${ onMouseEnter }
27640
27662
  onBlur=${ onMouseLeave }
27641
27663
  onMouseEnter=${ onMouseEnter }
27642
27664
  onMouseLeave=${ onMouseLeave }
27643
- onDragStart=${ (event) => onAction(event, entry, 'dragstart') }
27665
+ onDragStart=${ (event) => handleClick(event, 'dragstart') }
27644
27666
  draggable=${ true }
27645
27667
  >
27646
27668
  <div class="djs-popup-entry-content">
@@ -27875,6 +27897,10 @@
27875
27897
 
27876
27898
  const handleKeyDown = x(event => {
27877
27899
  if (event.key === 'Enter' && selectedEntry) {
27900
+ if (selectedEntry.disabled) {
27901
+ return;
27902
+ }
27903
+
27878
27904
  return onSelect(event, selectedEntry);
27879
27905
  }
27880
27906