bpmn-js 17.3.0 → 17.5.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-modeler v17.3.0
2
+ * bpmn-js - bpmn-modeler v17.5.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-17
11
+ * Date: 2024-04-26
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -16254,8 +16254,6 @@
16254
16254
  }
16255
16255
 
16256
16256
  /**
16257
- * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
16258
- *
16259
16257
  * @typedef {import('../model/Types').ModdleElement} ModdleElement
16260
16258
  */
16261
16259
 
@@ -16288,9 +16286,8 @@
16288
16286
 
16289
16287
  /**
16290
16288
  * @param {Record<'element' | 'root' | 'error', Function>} handler
16291
- * @param {Translate} translate
16292
16289
  */
16293
- function BpmnTreeWalker(handler, translate) {
16290
+ function BpmnTreeWalker(handler) {
16294
16291
 
16295
16292
  // list of containers already walked
16296
16293
  var handledElements = {};
@@ -16324,7 +16321,7 @@
16324
16321
  // avoid multiple rendering of elements
16325
16322
  if (gfx) {
16326
16323
  throw new Error(
16327
- translate('already rendered {element}', { element: elementToString(element) })
16324
+ 'already rendered ${ elementToString(element) }'
16328
16325
  );
16329
16326
  }
16330
16327
 
@@ -16344,11 +16341,10 @@
16344
16341
  handled(element);
16345
16342
 
16346
16343
  return gfx;
16347
- } catch (e) {
16348
- logError(e.message, { element: element, error: e });
16344
+ } catch (error) {
16345
+ logError(error.message, { element, error });
16349
16346
 
16350
- console.error(translate('failed to import {element}', { element: elementToString(element) }));
16351
- console.error(e);
16347
+ console.error(`failed to import ${ elementToString(element) }`, error);
16352
16348
  }
16353
16349
  }
16354
16350
 
@@ -16364,9 +16360,7 @@
16364
16360
  if (bpmnElement) {
16365
16361
  if (diMap[bpmnElement.id]) {
16366
16362
  logError(
16367
- translate('multiple DI elements defined for {element}', {
16368
- element: elementToString(bpmnElement)
16369
- }),
16363
+ `multiple DI elements defined for ${ elementToString(bpmnElement) }`,
16370
16364
  { element: bpmnElement }
16371
16365
  );
16372
16366
  } else {
@@ -16376,9 +16370,7 @@
16376
16370
  }
16377
16371
  } else {
16378
16372
  logError(
16379
- translate('no bpmnElement referenced in {element}', {
16380
- element: elementToString(di)
16381
- }),
16373
+ `no bpmnElement referenced in ${ elementToString(di) }`,
16382
16374
  { element: di }
16383
16375
  );
16384
16376
  }
@@ -16416,7 +16408,7 @@
16416
16408
  var diagrams = definitions.diagrams;
16417
16409
 
16418
16410
  if (diagram && diagrams.indexOf(diagram) === -1) {
16419
- throw new Error(translate('diagram not part of bpmn:Definitions'));
16411
+ throw new Error('diagram not part of <bpmn:Definitions />');
16420
16412
  }
16421
16413
 
16422
16414
  if (!diagram && diagrams && diagrams.length) {
@@ -16425,7 +16417,7 @@
16425
16417
 
16426
16418
  // no diagram -> nothing to import
16427
16419
  if (!diagram) {
16428
- throw new Error(translate('no diagram to display'));
16420
+ throw new Error('no diagram to display');
16429
16421
  }
16430
16422
 
16431
16423
  // load DI from selected diagram only
@@ -16436,10 +16428,9 @@
16436
16428
  var plane = diagram.plane;
16437
16429
 
16438
16430
  if (!plane) {
16439
- throw new Error(translate(
16440
- 'no plane for {element}',
16441
- { element: elementToString(diagram) }
16442
- ));
16431
+ throw new Error(
16432
+ `no plane for ${ elementToString(diagram) }`
16433
+ );
16443
16434
  }
16444
16435
 
16445
16436
  var rootElement = plane.bpmnElement;
@@ -16450,14 +16441,11 @@
16450
16441
  rootElement = findDisplayCandidate(definitions);
16451
16442
 
16452
16443
  if (!rootElement) {
16453
- throw new Error(translate('no process or collaboration to display'));
16444
+ throw new Error('no process or collaboration to display');
16454
16445
  } else {
16455
16446
 
16456
16447
  logError(
16457
- translate('correcting missing bpmnElement on {plane} to {rootElement}', {
16458
- plane: elementToString(plane),
16459
- rootElement: elementToString(rootElement)
16460
- })
16448
+ `correcting missing bpmnElement on ${ elementToString(plane) } to ${ elementToString(rootElement) }`
16461
16449
  );
16462
16450
 
16463
16451
  // correct DI on the fly
@@ -16478,10 +16466,7 @@
16478
16466
  handleUnhandledProcesses(definitions.rootElements, ctx);
16479
16467
  } else {
16480
16468
  throw new Error(
16481
- translate('unsupported bpmnElement for {plane}: {rootElement}', {
16482
- plane: elementToString(plane),
16483
- rootElement: elementToString(rootElement)
16484
- })
16469
+ `unsupported bpmnElement for ${ elementToString(plane) }: ${ elementToString(rootElement) }`
16485
16470
  );
16486
16471
  }
16487
16472
 
@@ -16643,28 +16628,28 @@
16643
16628
  }
16644
16629
 
16645
16630
  function handleFlowElements(flowElements, context) {
16646
- forEach$1(flowElements, function(e) {
16647
- if (is$2(e, 'bpmn:SequenceFlow')) {
16631
+ forEach$1(flowElements, function(flowElement) {
16632
+ if (is$2(flowElement, 'bpmn:SequenceFlow')) {
16648
16633
  deferred.push(function() {
16649
- handleSequenceFlow(e, context);
16634
+ handleSequenceFlow(flowElement, context);
16650
16635
  });
16651
- } else if (is$2(e, 'bpmn:BoundaryEvent')) {
16636
+ } else if (is$2(flowElement, 'bpmn:BoundaryEvent')) {
16652
16637
  deferred.unshift(function() {
16653
- handleFlowNode(e, context);
16638
+ handleFlowNode(flowElement, context);
16654
16639
  });
16655
- } else if (is$2(e, 'bpmn:FlowNode')) {
16656
- handleFlowNode(e, context);
16657
- } else if (is$2(e, 'bpmn:DataObject')) ; else if (is$2(e, 'bpmn:DataStoreReference')) {
16658
- handleDataElement(e, context);
16659
- } else if (is$2(e, 'bpmn:DataObjectReference')) {
16660
- handleDataElement(e, context);
16640
+ } else if (is$2(flowElement, 'bpmn:FlowNode')) {
16641
+ handleFlowNode(flowElement, context);
16642
+ } else if (is$2(flowElement, 'bpmn:DataObject')) ; else if (is$2(flowElement, 'bpmn:DataStoreReference')) {
16643
+ handleDataElement(flowElement, context);
16644
+ } else if (is$2(flowElement, 'bpmn:DataObjectReference')) {
16645
+ handleDataElement(flowElement, context);
16661
16646
  } else {
16662
16647
  logError(
16663
- translate('unrecognized flowElement {element} in context {context}', {
16664
- element: elementToString(e),
16665
- context: (context ? elementToString(context.businessObject) : 'null')
16666
- }),
16667
- { element: e, context: context }
16648
+ `unrecognized flowElement ${ elementToString(flowElement) } in context ${ elementToString(context && context.businessObject) }`,
16649
+ {
16650
+ element: flowElement,
16651
+ context
16652
+ }
16668
16653
  );
16669
16654
  }
16670
16655
  });
@@ -16787,7 +16772,6 @@
16787
16772
 
16788
16773
  var importer,
16789
16774
  eventBus,
16790
- translate,
16791
16775
  canvas;
16792
16776
 
16793
16777
  var error,
@@ -16817,7 +16801,7 @@
16817
16801
  }
16818
16802
  };
16819
16803
 
16820
- var walker = new BpmnTreeWalker(visitor, translate);
16804
+ var walker = new BpmnTreeWalker(visitor);
16821
16805
 
16822
16806
 
16823
16807
  bpmnDiagram = bpmnDiagram || (definitions.diagrams && definitions.diagrams[0]);
@@ -16825,7 +16809,7 @@
16825
16809
  var diagramsToImport = getDiagramsToImport(definitions, bpmnDiagram);
16826
16810
 
16827
16811
  if (!diagramsToImport) {
16828
- throw new Error(translate('no diagram to display'));
16812
+ throw new Error('no diagram to display');
16829
16813
  }
16830
16814
 
16831
16815
  // traverse BPMN 2.0 document model,
@@ -16848,7 +16832,6 @@
16848
16832
  try {
16849
16833
  importer = diagram.get('bpmnImporter');
16850
16834
  eventBus = diagram.get('eventBus');
16851
- translate = diagram.get('translate');
16852
16835
  canvas = diagram.get('canvas');
16853
16836
 
16854
16837
  eventBus.fire('import.render.start', { definitions: definitions });
@@ -21875,7 +21858,6 @@
21875
21858
  * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
21876
21859
  * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
21877
21860
  * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
21878
- * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
21879
21861
  *
21880
21862
  * @typedef {import('../features/modeling/ElementFactory').default} ElementFactory
21881
21863
  * @typedef {import('../draw/TextRenderer').default} TextRenderer
@@ -21917,12 +21899,10 @@
21917
21899
  });
21918
21900
  }
21919
21901
 
21920
- function notYetDrawn(translate, semantic, refSemantic, property) {
21921
- return new Error(translate('element {element} referenced by {referenced}#{property} not yet drawn', {
21922
- element: elementToString(refSemantic),
21923
- referenced: elementToString(semantic),
21924
- property: property
21925
- }));
21902
+ function notYetDrawn(semantic, refSemantic, property) {
21903
+ return new Error(
21904
+ `element ${ elementToString(refSemantic) } referenced by ${ elementToString(semantic) }#${ property } not yet drawn`
21905
+ );
21926
21906
  }
21927
21907
 
21928
21908
 
@@ -21933,18 +21913,16 @@
21933
21913
  * @param {Canvas} canvas
21934
21914
  * @param {ElementFactory} elementFactory
21935
21915
  * @param {ElementRegistry} elementRegistry
21936
- * @param {Function} translate
21937
21916
  * @param {TextRenderer} textRenderer
21938
21917
  */
21939
21918
  function BpmnImporter(
21940
21919
  eventBus, canvas, elementFactory,
21941
- elementRegistry, translate, textRenderer) {
21920
+ elementRegistry, textRenderer) {
21942
21921
 
21943
21922
  this._eventBus = eventBus;
21944
21923
  this._canvas = canvas;
21945
21924
  this._elementFactory = elementFactory;
21946
21925
  this._elementRegistry = elementRegistry;
21947
- this._translate = translate;
21948
21926
  this._textRenderer = textRenderer;
21949
21927
  }
21950
21928
 
@@ -21953,7 +21931,6 @@
21953
21931
  'canvas',
21954
21932
  'elementFactory',
21955
21933
  'elementRegistry',
21956
- 'translate',
21957
21934
  'textRenderer'
21958
21935
  ];
21959
21936
 
@@ -21970,7 +21947,6 @@
21970
21947
  */
21971
21948
  BpmnImporter.prototype.add = function(semantic, di, parentElement) {
21972
21949
  var element,
21973
- translate = this._translate,
21974
21950
  hidden;
21975
21951
 
21976
21952
  var parentIndex;
@@ -22056,10 +22032,9 @@
22056
22032
 
22057
22033
  this._canvas.addConnection(element, parentElement, parentIndex);
22058
22034
  } else {
22059
- throw new Error(translate('unknown di {di} for element {semantic}', {
22060
- di: elementToString(di),
22061
- semantic: elementToString(semantic)
22062
- }));
22035
+ throw new Error(
22036
+ `unknown di ${ elementToString(di) } for element ${ elementToString(semantic) }`
22037
+ );
22063
22038
  }
22064
22039
 
22065
22040
  // (optional) LABEL
@@ -22067,7 +22042,6 @@
22067
22042
  this.addLabel(semantic, di, element);
22068
22043
  }
22069
22044
 
22070
-
22071
22045
  this._eventBus.fire('bpmnElement.added', { element: element });
22072
22046
 
22073
22047
  return element;
@@ -22081,20 +22055,19 @@
22081
22055
  * @param {Shape} boundaryElement
22082
22056
  */
22083
22057
  BpmnImporter.prototype._attachBoundary = function(boundarySemantic, boundaryElement) {
22084
- var translate = this._translate;
22085
22058
  var hostSemantic = boundarySemantic.attachedToRef;
22086
22059
 
22087
22060
  if (!hostSemantic) {
22088
- throw new Error(translate('missing {semantic}#attachedToRef', {
22089
- semantic: elementToString(boundarySemantic)
22090
- }));
22061
+ throw new Error(
22062
+ `missing ${ elementToString(boundarySemantic) }#attachedToRef`
22063
+ );
22091
22064
  }
22092
22065
 
22093
22066
  var host = this._elementRegistry.get(hostSemantic.id),
22094
22067
  attachers = host && host.attachers;
22095
22068
 
22096
22069
  if (!host) {
22097
- throw notYetDrawn(translate, boundarySemantic, hostSemantic, 'attachedToRef');
22070
+ throw notYetDrawn(boundarySemantic, hostSemantic, 'attachedToRef');
22098
22071
  }
22099
22072
 
22100
22073
  // wire element.host <> host.attachers
@@ -22160,8 +22133,7 @@
22160
22133
 
22161
22134
  var element,
22162
22135
  refSemantic,
22163
- type = semantic.$type,
22164
- translate = this._translate;
22136
+ type = semantic.$type;
22165
22137
 
22166
22138
  refSemantic = semantic[side + 'Ref'];
22167
22139
 
@@ -22184,12 +22156,11 @@
22184
22156
  }
22185
22157
 
22186
22158
  if (refSemantic) {
22187
- throw notYetDrawn(translate, semantic, refSemantic, side + 'Ref');
22159
+ throw notYetDrawn(semantic, refSemantic, side + 'Ref');
22188
22160
  } else {
22189
- throw new Error(translate('{semantic}#{side} Ref not specified', {
22190
- semantic: elementToString(semantic),
22191
- side: side
22192
- }));
22161
+ throw new Error(
22162
+ `${ elementToString(semantic) }#${ side } Ref not specified`
22163
+ );
22193
22164
  }
22194
22165
  };
22195
22166
 
@@ -27000,7 +26971,7 @@
27000
26971
 
27001
26972
  var scale = isDefined(config && config.scale) ? config.scale : {
27002
26973
  min: 1,
27003
- max: 1.5
26974
+ max: 1
27004
26975
  };
27005
26976
 
27006
26977
  this._overlaysConfig = {
@@ -27994,7 +27965,8 @@
27994
27965
  function getPopupStyle(props) {
27995
27966
  return {
27996
27967
  transform: `scale(${props.scale})`,
27997
- width: `${props.width}px`
27968
+ width: `${props.width}px`,
27969
+ 'transform-origin': 'top left'
27998
27970
  };
27999
27971
  }
28000
27972
 
@@ -28057,7 +28029,7 @@
28057
28029
 
28058
28030
  var scale = isDefined(config && config.scale) ? config.scale : {
28059
28031
  min: 1,
28060
- max: 1.5
28032
+ max: 1
28061
28033
  };
28062
28034
 
28063
28035
  this._config = {
@@ -40759,7 +40731,6 @@
40759
40731
  /**
40760
40732
  * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
40761
40733
  * @typedef {import('../Modeling').default} Modeling
40762
- * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
40763
40734
  */
40764
40735
 
40765
40736
  var LOW_PRIORITY$c = 500,
@@ -40771,9 +40742,8 @@
40771
40742
  *
40772
40743
  * @param {EventBus} eventBus
40773
40744
  * @param {Modeling} modeling
40774
- * @param {Translate} translate
40775
40745
  */
40776
- function UpdateFlowNodeRefsBehavior(eventBus, modeling, translate) {
40746
+ function UpdateFlowNodeRefsBehavior(eventBus, modeling) {
40777
40747
 
40778
40748
  CommandInterceptor.call(this, eventBus);
40779
40749
 
@@ -40796,7 +40766,7 @@
40796
40766
 
40797
40767
  function getContext() {
40798
40768
  if (!context) {
40799
- throw new Error(translate('out of bounds release'));
40769
+ throw new Error('out of bounds release');
40800
40770
  }
40801
40771
 
40802
40772
  return context;
@@ -40805,7 +40775,7 @@
40805
40775
  function releaseContext() {
40806
40776
 
40807
40777
  if (!context) {
40808
- throw new Error(translate('out of bounds release'));
40778
+ throw new Error('out of bounds release');
40809
40779
  }
40810
40780
 
40811
40781
  var triggerUpdate = context.leave();
@@ -40877,8 +40847,7 @@
40877
40847
 
40878
40848
  UpdateFlowNodeRefsBehavior.$inject = [
40879
40849
  'eventBus',
40880
- 'modeling' ,
40881
- 'translate'
40850
+ 'modeling'
40882
40851
  ];
40883
40852
 
40884
40853
  e$2(UpdateFlowNodeRefsBehavior, CommandInterceptor);
@@ -42328,7 +42297,6 @@
42328
42297
  /**
42329
42298
  * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
42330
42299
  * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
42331
- * @typedef {import('diagram-js/i18n/translate/translate').default} Translate
42332
42300
  */
42333
42301
 
42334
42302
  /**
@@ -42336,9 +42304,8 @@
42336
42304
  *
42337
42305
  * @param {EventBus} eventBus
42338
42306
  * @param {Canvas} canvas
42339
- * @param {Translate} translate
42340
42307
  */
42341
- function BpmnOrderingProvider(eventBus, canvas, translate) {
42308
+ function BpmnOrderingProvider(eventBus, canvas) {
42342
42309
 
42343
42310
  OrderingProvider.call(this, eventBus);
42344
42311
 
@@ -42502,14 +42469,11 @@
42502
42469
  };
42503
42470
  }
42504
42471
 
42505
- BpmnOrderingProvider.$inject = [ 'eventBus', 'canvas', 'translate' ];
42472
+ BpmnOrderingProvider.$inject = [ 'eventBus', 'canvas' ];
42506
42473
 
42507
42474
  e$2(BpmnOrderingProvider, OrderingProvider);
42508
42475
 
42509
42476
  var OrderingModule = {
42510
- __depends__: [
42511
- TranslateModule
42512
- ],
42513
42477
  __init__: [ 'bpmnOrderingProvider' ],
42514
42478
  bpmnOrderingProvider: [ 'type', BpmnOrderingProvider ]
42515
42479
  };
@@ -44645,7 +44609,6 @@
44645
44609
  };
44646
44610
 
44647
44611
  /**
44648
- * @typedef {import('../dragging/Dragging').default} Dragging
44649
44612
  * @typedef {import('../../core/EventBus').default} EventBus
44650
44613
  *
44651
44614
  * @typedef {import('../../core/EventBus').Event} Event
@@ -44658,24 +44621,21 @@
44658
44621
  * it takes care of making sure that the correct active state is set.
44659
44622
  *
44660
44623
  * @param {EventBus} eventBus
44661
- * @param {Dragging} dragging
44662
44624
  */
44663
- function ToolManager(eventBus, dragging) {
44625
+ function ToolManager(eventBus) {
44664
44626
  this._eventBus = eventBus;
44665
- this._dragging = dragging;
44666
44627
 
44667
44628
  this._tools = [];
44668
44629
  this._active = null;
44669
44630
  }
44670
44631
 
44671
- ToolManager.$inject = [ 'eventBus', 'dragging' ];
44632
+ ToolManager.$inject = [ 'eventBus' ];
44672
44633
 
44673
44634
  /**
44674
44635
  * Register a tool.
44675
44636
  *
44676
44637
  * @param {string} name
44677
44638
  * @param { {
44678
- * dragging: string;
44679
44639
  * tool: string;
44680
44640
  * } } events
44681
44641
  */
@@ -44687,7 +44647,6 @@
44687
44647
  }
44688
44648
 
44689
44649
  tools.push(name);
44690
-
44691
44650
  this.bindEvents(name, events);
44692
44651
  };
44693
44652
 
@@ -44710,8 +44669,7 @@
44710
44669
  };
44711
44670
 
44712
44671
  ToolManager.prototype.bindEvents = function(name, events) {
44713
- var eventBus = this._eventBus,
44714
- dragging = this._dragging;
44672
+ var eventBus = this._eventBus;
44715
44673
 
44716
44674
  var eventsToRegister = [];
44717
44675
 
@@ -44722,7 +44680,6 @@
44722
44680
  if (!context.reactivate && this.isActive(name)) {
44723
44681
  this.setActive(null);
44724
44682
 
44725
- dragging.cancel();
44726
44683
  return;
44727
44684
  }
44728
44685
 
@@ -47167,7 +47124,6 @@
47167
47124
  * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
47168
47125
  * @typedef {import('./BpmnFactory').default} BpmnFactory
47169
47126
  * @typedef {import('diagram-js/lib/layout/CroppingConnectionDocking').default} CroppingConnectionDocking
47170
- * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
47171
47127
  *
47172
47128
  * @typedef {import('../../model/Types').Connection} Connection
47173
47129
  * @typedef {import('../../model/Types').Element} Element
@@ -47183,24 +47139,20 @@
47183
47139
  * @param {EventBus} eventBus
47184
47140
  * @param {BpmnFactory} bpmnFactory
47185
47141
  * @param {CroppingConnectionDocking} connectionDocking
47186
- * @param {Translate} translate
47187
47142
  */
47188
47143
  function BpmnUpdater(
47189
47144
  eventBus,
47190
47145
  bpmnFactory,
47191
- connectionDocking,
47192
- translate
47146
+ connectionDocking
47193
47147
  ) {
47194
47148
 
47195
47149
  CommandInterceptor.call(this, eventBus);
47196
47150
 
47197
47151
  this._bpmnFactory = bpmnFactory;
47198
- this._translate = translate;
47199
47152
 
47200
47153
  var self = this;
47201
47154
 
47202
47155
 
47203
-
47204
47156
  // connection cropping //////////////////////
47205
47157
 
47206
47158
  // crop connection ends during create/update
@@ -47455,8 +47407,7 @@
47455
47407
  BpmnUpdater.$inject = [
47456
47408
  'eventBus',
47457
47409
  'bpmnFactory',
47458
- 'connectionDocking',
47459
- 'translate'
47410
+ 'connectionDocking'
47460
47411
  ];
47461
47412
 
47462
47413
 
@@ -47695,8 +47646,7 @@
47695
47646
  */
47696
47647
  BpmnUpdater.prototype.updateSemanticParent = function(businessObject, newParent, visualParent) {
47697
47648
 
47698
- var containment,
47699
- translate = this._translate;
47649
+ var containment;
47700
47650
 
47701
47651
  if (businessObject.$parent === newParent) {
47702
47652
  return;
@@ -47801,13 +47751,7 @@
47801
47751
  }
47802
47752
 
47803
47753
  if (!containment) {
47804
- throw new Error(translate(
47805
- 'no parent for {element} in {parent}',
47806
- {
47807
- element: businessObject.id,
47808
- parent: newParent.id
47809
- }
47810
- ));
47754
+ throw new Error(`no parent for <${ businessObject.id }> in <${ newParent.id }>`);
47811
47755
  }
47812
47756
 
47813
47757
  var children;
@@ -47984,8 +47928,6 @@
47984
47928
  }
47985
47929
 
47986
47930
  /**
47987
- * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
47988
- *
47989
47931
  * @typedef {import('diagram-js/lib/util/Types').Dimensions} Dimensions
47990
47932
  *
47991
47933
  * @typedef {import('./BpmnFactory').default} BpmnFactory
@@ -48012,22 +47954,19 @@
48012
47954
  *
48013
47955
  * @param {BpmnFactory} bpmnFactory
48014
47956
  * @param {Moddle} moddle
48015
- * @param {Translate} translate
48016
47957
  */
48017
- function ElementFactory(bpmnFactory, moddle, translate) {
47958
+ function ElementFactory(bpmnFactory, moddle) {
48018
47959
  ElementFactory$1.call(this);
48019
47960
 
48020
47961
  this._bpmnFactory = bpmnFactory;
48021
47962
  this._moddle = moddle;
48022
- this._translate = translate;
48023
47963
  }
48024
47964
 
48025
47965
  e$2(ElementFactory, ElementFactory$1);
48026
47966
 
48027
47967
  ElementFactory.$inject = [
48028
47968
  'bpmnFactory',
48029
- 'moddle',
48030
- 'translate'
47969
+ 'moddle'
48031
47970
  ];
48032
47971
 
48033
47972
  ElementFactory.prototype._baseCreate = ElementFactory$1.prototype.create;
@@ -48105,17 +48044,17 @@
48105
48044
  * @return {T}
48106
48045
  */
48107
48046
  ElementFactory.prototype.createElement = function(elementType, attrs) {
48108
- var size,
48109
- translate = this._translate;
48110
48047
 
48111
48048
  attrs = assign$1({}, attrs || {});
48112
48049
 
48050
+ var size;
48051
+
48113
48052
  var businessObject = attrs.businessObject,
48114
48053
  di = attrs.di;
48115
48054
 
48116
48055
  if (!businessObject) {
48117
48056
  if (!attrs.type) {
48118
- throw new Error(translate('no shape type specified'));
48057
+ throw new Error('no shape type specified');
48119
48058
  }
48120
48059
 
48121
48060
  businessObject = this._bpmnFactory.create(attrs.type);
@@ -51213,7 +51152,6 @@
51213
51152
  *
51214
51153
  * @typedef {import('diagram-js/lib/core/ElementRegistry').default} ElementRegistry
51215
51154
  * @typedef {import('../../../model/Types').Moddle} Moddle
51216
- * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
51217
51155
  * @typedef {import('../Modeling').default} Modeling
51218
51156
  * @typedef {import('../../../draw/TextRenderer').default} TextRenderer
51219
51157
  *
@@ -51242,17 +51180,15 @@
51242
51180
  *
51243
51181
  * @param {ElementRegistry} elementRegistry
51244
51182
  * @param {Moddle} moddle
51245
- * @param {Translate} translate
51246
51183
  * @param {Modeling} modeling
51247
51184
  * @param {TextRenderer} textRenderer
51248
51185
  */
51249
51186
  function UpdatePropertiesHandler(
51250
- elementRegistry, moddle, translate,
51187
+ elementRegistry, moddle,
51251
51188
  modeling, textRenderer) {
51252
51189
 
51253
51190
  this._elementRegistry = elementRegistry;
51254
51191
  this._moddle = moddle;
51255
- this._translate = translate;
51256
51192
  this._modeling = modeling;
51257
51193
  this._textRenderer = textRenderer;
51258
51194
  }
@@ -51260,7 +51196,6 @@
51260
51196
  UpdatePropertiesHandler.$inject = [
51261
51197
  'elementRegistry',
51262
51198
  'moddle',
51263
- 'translate',
51264
51199
  'modeling',
51265
51200
  'textRenderer'
51266
51201
  ];
@@ -51281,11 +51216,10 @@
51281
51216
  UpdatePropertiesHandler.prototype.execute = function(context) {
51282
51217
 
51283
51218
  var element = context.element,
51284
- changed = [ element ],
51285
- translate = this._translate;
51219
+ changed = [ element ];
51286
51220
 
51287
51221
  if (!element) {
51288
- throw new Error(translate('element required'));
51222
+ throw new Error('element required');
51289
51223
  }
51290
51224
 
51291
51225
  var elementRegistry = this._elementRegistry,
@@ -51735,7 +51669,6 @@
51735
51669
  * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
51736
51670
  *
51737
51671
  * @typedef {import('../Modeling').default} Modeling
51738
- * @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
51739
51672
  */
51740
51673
 
51741
51674
  /**
@@ -51745,23 +51678,19 @@
51745
51678
  * @implements {CommandHandler}
51746
51679
  *
51747
51680
  * @param {Modeling} modeling
51748
- * @param {Translate} translate
51749
51681
  */
51750
- function SplitLaneHandler(modeling, translate) {
51682
+ function SplitLaneHandler(modeling) {
51751
51683
  this._modeling = modeling;
51752
- this._translate = translate;
51753
51684
  }
51754
51685
 
51755
51686
  SplitLaneHandler.$inject = [
51756
- 'modeling',
51757
- 'translate'
51687
+ 'modeling'
51758
51688
  ];
51759
51689
 
51760
51690
 
51761
51691
  SplitLaneHandler.prototype.preExecute = function(context) {
51762
51692
 
51763
- var modeling = this._modeling,
51764
- translate = this._translate;
51693
+ var modeling = this._modeling;
51765
51694
 
51766
51695
  var shape = context.shape,
51767
51696
  newLanesCount = context.count;
@@ -51770,7 +51699,7 @@
51770
51699
  existingLanesCount = childLanes.length;
51771
51700
 
51772
51701
  if (existingLanesCount > newLanesCount) {
51773
- throw new Error(translate('more than {count} child lanes', { count: newLanesCount }));
51702
+ throw new Error(`more than <${newLanesCount}> child lanes`);
51774
51703
  }
51775
51704
 
51776
51705
  var isHorizontalLane = isHorizontal$3(shape);
@@ -60133,6 +60062,13 @@
60133
60062
  assign$1(context, bounds);
60134
60063
 
60135
60064
  var options = {};
60065
+ var style = context.style || {};
60066
+
60067
+ // Remove background and border
60068
+ assign$1(style, {
60069
+ backgroundColor: null,
60070
+ border: null
60071
+ });
60136
60072
 
60137
60073
  // tasks
60138
60074
  if (
@@ -60154,6 +60090,12 @@
60154
60090
  assign$1(options, {
60155
60091
  autoResize: true
60156
60092
  });
60093
+
60094
+ // keep background and border for external labels
60095
+ assign$1(style, {
60096
+ backgroundColor: '#ffffff',
60097
+ border: '1px solid #ccc'
60098
+ });
60157
60099
  }
60158
60100
 
60159
60101
  // text annotations
@@ -60162,10 +60104,17 @@
60162
60104
  resizable: true,
60163
60105
  autoResize: true
60164
60106
  });
60107
+
60108
+ // keep background and border for text annotations
60109
+ assign$1(style, {
60110
+ backgroundColor: '#ffffff',
60111
+ border: '1px solid #ccc'
60112
+ });
60165
60113
  }
60166
60114
 
60167
60115
  assign$1(context, {
60168
- options: options
60116
+ options: options,
60117
+ style: style
60169
60118
  });
60170
60119
 
60171
60120
  return context;
@@ -61422,7 +61371,7 @@
61422
61371
  if (target) {
61423
61372
  if (canExecute === 'attach') {
61424
61373
  setMarker(target, MARKER_ATTACH);
61425
- } else if (context.canExecute && target && target.id !== parent.id) {
61374
+ } else if (context.canExecute && parent && target.id !== parent.id) {
61426
61375
  setMarker(target, MARKER_NEW_PARENT);
61427
61376
  } else {
61428
61377
  setMarker(target, context.canExecute ? MARKER_OK$1 : MARKER_NOT_OK$1);