bpmn-js 17.5.0 → 17.6.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-navigated-viewer v17.5.0
2
+ * bpmn-js - bpmn-navigated-viewer v17.6.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: 2024-04-26
11
+ * Date: 2024-04-30
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -22152,7 +22152,7 @@
22152
22152
  // avoid multiple rendering of elements
22153
22153
  if (gfx) {
22154
22154
  throw new Error(
22155
- 'already rendered ${ elementToString(element) }'
22155
+ `already rendered ${ elementToString(element) }`
22156
22156
  );
22157
22157
  }
22158
22158
 
@@ -22828,6 +22828,12 @@
22828
22828
  * @see http://bpmn.io/license for more information.
22829
22829
  */
22830
22830
 
22831
+ /**
22832
+ * @template T
22833
+ *
22834
+ * @typedef { import('diagram-js/lib/core/EventBus').default<T> } EventBus
22835
+ */
22836
+
22831
22837
  /**
22832
22838
  * @template T
22833
22839
  *
@@ -22913,12 +22919,22 @@
22913
22919
  * } } SaveSVGDoneEvent
22914
22920
  */
22915
22921
 
22922
+ /**
22923
+ * @template Type
22924
+ *
22925
+ * @typedef { Type extends { eventBus: EventBus<infer X> } ? X : never } EventMap
22926
+ */
22927
+
22916
22928
  /**
22917
22929
  * A base viewer for BPMN 2.0 diagrams.
22918
22930
  *
22919
- * Have a look at {@link Viewer}, {@link NavigatedViewer} or {@link Modeler} for
22931
+ * Have a look at {@link bpmn-js/lib/Viewer}, {@link bpmn-js/lib/NavigatedViewer} or {@link bpmn-js/lib/Modeler} for
22920
22932
  * bundles that include actual features.
22921
22933
  *
22934
+ * @template [ServiceMap=null]
22935
+ *
22936
+ * @extends Diagram<ServiceMap>
22937
+ *
22922
22938
  * @param {BaseViewerOptions} [options] The options to configure the viewer.
22923
22939
  */
22924
22940
  function BaseViewer(options) {
@@ -23339,9 +23355,18 @@
23339
23355
  };
23340
23356
 
23341
23357
  /**
23342
- * Register an event listener.
23358
+ * @overlord
23359
+ *
23360
+ * Register an event listener for events with the given name.
23361
+ *
23362
+ * The callback will be invoked with `event, ...additionalArguments`
23363
+ * that have been passed to {@link EventBus#fire}.
23343
23364
  *
23344
- * Remove an event listener via {@link BaseViewer#off}.
23365
+ * Returning false from a listener will prevent the events default action
23366
+ * (if any is specified). To stop an event from being processed further in
23367
+ * other listeners execute {@link Event#stopPropagation}.
23368
+ *
23369
+ * Returning anything but `undefined` from a listener will stop the listener propagation.
23345
23370
  *
23346
23371
  * @template T
23347
23372
  *
@@ -23350,6 +23375,25 @@
23350
23375
  * @param {EventBusEventCallback<T>} callback The callback.
23351
23376
  * @param {any} [that] Value of `this` the callback will be called with.
23352
23377
  */
23378
+ /**
23379
+ * Register an event listener for events with the given name.
23380
+ *
23381
+ * The callback will be invoked with `event, ...additionalArguments`
23382
+ * that have been passed to {@link EventBus#fire}.
23383
+ *
23384
+ * Returning false from a listener will prevent the events default action
23385
+ * (if any is specified). To stop an event from being processed further in
23386
+ * other listeners execute {@link Event#stopPropagation}.
23387
+ *
23388
+ * Returning anything but `undefined` from a listener will stop the listener propagation.
23389
+ *
23390
+ * @template {keyof EventMap<ServiceMap>} EventName
23391
+ *
23392
+ * @param {EventName} events to subscribe to
23393
+ * @param {number} [priority=1000] listen priority
23394
+ * @param {EventBusEventCallback<(EventMap<ServiceMap>)[EventName]>} callback
23395
+ * @param {any} [that] callback context
23396
+ */
23353
23397
  BaseViewer.prototype.on = function(events, priority, callback, that) {
23354
23398
  return this.get('eventBus').on(events, priority, callback, that);
23355
23399
  };
@@ -23603,7 +23647,7 @@
23603
23647
  /**
23604
23648
  * A viewer for BPMN 2.0 diagrams.
23605
23649
  *
23606
- * Have a look at {@link NavigatedViewer} or {@link Modeler} for bundles that include
23650
+ * Have a look at {@link bpmn-js/lib/NavigatedViewer} or {@link bpmn-js/lib/Modeler} for bundles that include
23607
23651
  * additional features.
23608
23652
  *
23609
23653
  *
@@ -23639,6 +23683,10 @@
23639
23683
  * bpmnViewer.importXML(...);
23640
23684
  * ```
23641
23685
  *
23686
+ * @template [ServiceMap=null]
23687
+ *
23688
+ * @extends BaseViewer<ServiceMap>
23689
+ *
23642
23690
  * @param {BaseViewerOptions} [options] The options to configure the viewer.
23643
23691
  */
23644
23692
  function Viewer(options) {
@@ -24750,6 +24798,10 @@
24750
24798
  /**
24751
24799
  * A viewer with mouse and keyboard navigation features.
24752
24800
  *
24801
+ * @template [ServiceMap=null]
24802
+ *
24803
+ * @extends Viewer<ServiceMap>
24804
+ *
24753
24805
  * @param {BaseViewerOptions} [options]
24754
24806
  */
24755
24807
  function NavigatedViewer(options) {