bpmn-js 14.1.3 → 14.2.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.
- package/dist/assets/diagram-js.css +27 -4
- package/dist/bpmn-modeler.development.js +69 -37
- package/dist/bpmn-modeler.production.min.js +5 -5
- package/dist/bpmn-navigated-viewer.development.js +10 -13
- package/dist/bpmn-navigated-viewer.production.min.js +2 -2
- package/dist/bpmn-viewer.development.js +10 -13
- package/dist/bpmn-viewer.production.min.js +2 -2
- package/package.json +7 -4
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
--context-pad-entry-hover-background-color: var(--color-grey-225-10-95);
|
|
41
41
|
|
|
42
42
|
--element-dragger-color: var(--color-blue-205-100-50);
|
|
43
|
+
--element-dragging-color: var(--color-grey-225-10-75);
|
|
43
44
|
--element-hover-outline-fill-color: var(--color-blue-205-100-45);
|
|
44
45
|
--element-selected-outline-stroke-color: var(--color-blue-205-100-50);
|
|
45
46
|
--element-selected-outline-secondary-stroke-color: var(--color-blue-205-100-70);
|
|
@@ -280,10 +281,6 @@ marker.djs-dragger tspan {
|
|
|
280
281
|
stroke: var(--element-dragger-color) !important;
|
|
281
282
|
}
|
|
282
283
|
|
|
283
|
-
.djs-dragging {
|
|
284
|
-
opacity: 0.3;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
284
|
.djs-dragging,
|
|
288
285
|
.djs-dragging > * {
|
|
289
286
|
pointer-events: none !important;
|
|
@@ -294,6 +291,32 @@ marker.djs-dragger tspan {
|
|
|
294
291
|
display: none !important;
|
|
295
292
|
}
|
|
296
293
|
|
|
294
|
+
.djs-dragging * {
|
|
295
|
+
fill: none !important;
|
|
296
|
+
stroke: var(--element-dragging-color) !important;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.djs-dragging tspan,
|
|
300
|
+
.djs-dragging text {
|
|
301
|
+
fill: var(--element-dragging-color) !important;
|
|
302
|
+
stroke: none !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
marker.djs-dragging circle,
|
|
306
|
+
marker.djs-dragging path,
|
|
307
|
+
marker.djs-dragging polygon,
|
|
308
|
+
marker.djs-dragging polyline,
|
|
309
|
+
marker.djs-dragging rect {
|
|
310
|
+
fill: var(--element-dragging-color) !important;
|
|
311
|
+
stroke: none !important;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
marker.djs-dragging text,
|
|
315
|
+
marker.djs-dragging tspan {
|
|
316
|
+
fill: none !important;
|
|
317
|
+
stroke: var(--element-dragging-color) !important;
|
|
318
|
+
}
|
|
319
|
+
|
|
297
320
|
/**
|
|
298
321
|
* no pointer events for visual
|
|
299
322
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler v14.
|
|
2
|
+
* bpmn-js - bpmn-modeler v14.2.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-present, camunda Services GmbH
|
|
5
5
|
*
|
|
@@ -18,9 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
function e$3(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}
|
|
20
20
|
|
|
21
|
-
function createCommonjsModule(fn) {
|
|
22
|
-
|
|
23
|
-
return fn(module, module.exports), module.exports;
|
|
21
|
+
function createCommonjsModule(fn, module) {
|
|
22
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
var hat_1 = createCommonjsModule(function (module) {
|
|
@@ -88,16 +87,12 @@
|
|
|
88
87
|
};
|
|
89
88
|
});
|
|
90
89
|
|
|
91
|
-
/**
|
|
92
|
-
* @typedef { [ number, number ] | [ number, number, number ] } Seed
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
90
|
/**
|
|
96
91
|
* Create a new id generator / cache instance.
|
|
97
92
|
*
|
|
98
93
|
* You may optionally provide a seed that is used internally.
|
|
99
94
|
*
|
|
100
|
-
* @param {Seed}
|
|
95
|
+
* @param {Seed} seed
|
|
101
96
|
*/
|
|
102
97
|
function Ids(seed) {
|
|
103
98
|
if (!(this instanceof Ids)) {
|
|
@@ -8212,13 +8207,14 @@
|
|
|
8212
8207
|
*
|
|
8213
8208
|
* @param {SVGElement} visual The graphical element.
|
|
8214
8209
|
* @param {ShapeLike} element The shape.
|
|
8210
|
+
* @param {Object} attrs Optional attributes.
|
|
8215
8211
|
*
|
|
8216
8212
|
* @return {SVGElement}
|
|
8217
8213
|
*/
|
|
8218
|
-
GraphicsFactory.prototype.drawShape = function(visual, element) {
|
|
8214
|
+
GraphicsFactory.prototype.drawShape = function(visual, element, attrs = {}) {
|
|
8219
8215
|
var eventBus = this._eventBus;
|
|
8220
8216
|
|
|
8221
|
-
return eventBus.fire('render.shape', { gfx: visual, element
|
|
8217
|
+
return eventBus.fire('render.shape', { gfx: visual, element, attrs });
|
|
8222
8218
|
};
|
|
8223
8219
|
|
|
8224
8220
|
/**
|
|
@@ -8239,13 +8235,14 @@
|
|
|
8239
8235
|
*
|
|
8240
8236
|
* @param {SVGElement} visual The graphical element.
|
|
8241
8237
|
* @param {ConnectionLike} element The connection.
|
|
8238
|
+
* @param {Object} attrs Optional attributes.
|
|
8242
8239
|
*
|
|
8243
8240
|
* @return {SVGElement}
|
|
8244
8241
|
*/
|
|
8245
|
-
GraphicsFactory.prototype.drawConnection = function(visual, element) {
|
|
8242
|
+
GraphicsFactory.prototype.drawConnection = function(visual, element, attrs = {}) {
|
|
8246
8243
|
var eventBus = this._eventBus;
|
|
8247
8244
|
|
|
8248
|
-
return eventBus.fire('render.connection', { gfx: visual, element
|
|
8245
|
+
return eventBus.fire('render.connection', { gfx: visual, element, attrs });
|
|
8249
8246
|
};
|
|
8250
8247
|
|
|
8251
8248
|
/**
|
|
@@ -29173,6 +29170,7 @@
|
|
|
29173
29170
|
|
|
29174
29171
|
var DEFAULT_PRIORITY$2 = 1000;
|
|
29175
29172
|
var CONTEXT_PAD_PADDING = 12;
|
|
29173
|
+
var HOVER_DELAY = 300;
|
|
29176
29174
|
|
|
29177
29175
|
/**
|
|
29178
29176
|
* A context pad that displays element specific, contextual actions next
|
|
@@ -29347,11 +29345,25 @@
|
|
|
29347
29345
|
entry = attr$1(button, 'data-action');
|
|
29348
29346
|
originalEvent = event.originalEvent || event;
|
|
29349
29347
|
|
|
29348
|
+
if (action === 'mouseover') {
|
|
29349
|
+
this._timeout = setTimeout(() => {
|
|
29350
|
+
this._mouseout = this.triggerEntry(entry, 'hover', originalEvent, autoActivate);
|
|
29351
|
+
}, HOVER_DELAY);
|
|
29352
|
+
} else if (action === 'mouseout') {
|
|
29353
|
+
clearTimeout(this._timeout);
|
|
29354
|
+
|
|
29355
|
+
if (this._mouseout) {
|
|
29356
|
+
this._mouseout();
|
|
29357
|
+
|
|
29358
|
+
this._mouseout = null;
|
|
29359
|
+
}
|
|
29360
|
+
}
|
|
29361
|
+
|
|
29350
29362
|
return this.triggerEntry(entry, action, originalEvent, autoActivate);
|
|
29351
29363
|
};
|
|
29352
29364
|
|
|
29353
29365
|
/**
|
|
29354
|
-
* Trigger context pad entry entry.
|
|
29366
|
+
* Trigger action on context pad entry entry, e.g. click, mouseover or mouseout.
|
|
29355
29367
|
*
|
|
29356
29368
|
* @param {string} entryId
|
|
29357
29369
|
* @param {string} action
|
|
@@ -29509,6 +29521,14 @@
|
|
|
29509
29521
|
self.trigger('dragstart', event);
|
|
29510
29522
|
});
|
|
29511
29523
|
|
|
29524
|
+
delegate.bind(html, entrySelector, 'mouseover', function(event) {
|
|
29525
|
+
self.trigger('mouseover', event);
|
|
29526
|
+
});
|
|
29527
|
+
|
|
29528
|
+
delegate.bind(html, entrySelector, 'mouseout', function(event) {
|
|
29529
|
+
self.trigger('mouseout', event);
|
|
29530
|
+
});
|
|
29531
|
+
|
|
29512
29532
|
// stop propagation of mouse events
|
|
29513
29533
|
event.bind(html, 'mousedown', function(event) {
|
|
29514
29534
|
event.stopPropagation();
|
|
@@ -34227,7 +34247,7 @@
|
|
|
34227
34247
|
MARKER_NOT_OK$4 = 'connect-not-ok',
|
|
34228
34248
|
MARKER_CONNECT_HOVER$1 = 'connect-hover',
|
|
34229
34249
|
MARKER_CONNECT_UPDATING$1 = 'djs-updating',
|
|
34230
|
-
|
|
34250
|
+
MARKER_DRAGGER = 'djs-dragging';
|
|
34231
34251
|
|
|
34232
34252
|
var HIGH_PRIORITY$i = 1100;
|
|
34233
34253
|
|
|
@@ -34267,7 +34287,7 @@
|
|
|
34267
34287
|
|
|
34268
34288
|
classes(draggerGfx).add('djs-dragging');
|
|
34269
34289
|
|
|
34270
|
-
canvas.addMarker(connection,
|
|
34290
|
+
canvas.addMarker(connection, MARKER_DRAGGER);
|
|
34271
34291
|
canvas.addMarker(connection, MARKER_CONNECT_UPDATING$1);
|
|
34272
34292
|
});
|
|
34273
34293
|
|
|
@@ -34397,7 +34417,7 @@
|
|
|
34397
34417
|
remove$1(draggerGfx);
|
|
34398
34418
|
|
|
34399
34419
|
canvas.removeMarker(connection, MARKER_CONNECT_UPDATING$1);
|
|
34400
|
-
canvas.removeMarker(connection,
|
|
34420
|
+
canvas.removeMarker(connection, MARKER_DRAGGER);
|
|
34401
34421
|
|
|
34402
34422
|
if (hover) {
|
|
34403
34423
|
canvas.removeMarker(hover, MARKER_OK$4);
|
|
@@ -35510,7 +35530,7 @@
|
|
|
35510
35530
|
* @typedef {import('../../core/GraphicsFactory').default} GraphicsFactory
|
|
35511
35531
|
*/
|
|
35512
35532
|
|
|
35513
|
-
var MARKER_CONNECTION_PREVIEW = 'djs-
|
|
35533
|
+
var MARKER_CONNECTION_PREVIEW = 'djs-dragger';
|
|
35514
35534
|
|
|
35515
35535
|
/**
|
|
35516
35536
|
* Draws connection preview. Optionally, this can use layouter and connection docking to draw
|
|
@@ -35626,7 +35646,9 @@
|
|
|
35626
35646
|
connection.waypoints = this._connectionDocking.getCroppedWaypoints(connection, source, target);
|
|
35627
35647
|
}
|
|
35628
35648
|
|
|
35629
|
-
this._graphicsFactory.drawConnection(connectionPreviewGfx, connection
|
|
35649
|
+
this._graphicsFactory.drawConnection(connectionPreviewGfx, connection, {
|
|
35650
|
+
stroke: 'var(--element-dragger-color)'
|
|
35651
|
+
});
|
|
35630
35652
|
};
|
|
35631
35653
|
|
|
35632
35654
|
/**
|
|
@@ -36476,11 +36498,7 @@
|
|
|
36476
36498
|
var self = this;
|
|
36477
36499
|
|
|
36478
36500
|
eventBus.on('drag.cleanup', function() {
|
|
36479
|
-
|
|
36480
|
-
remove$1(clonedMarker);
|
|
36481
|
-
});
|
|
36482
|
-
|
|
36483
|
-
self._clonedMarkers = {};
|
|
36501
|
+
self.cleanUp();
|
|
36484
36502
|
});
|
|
36485
36503
|
}
|
|
36486
36504
|
|
|
@@ -36491,6 +36509,15 @@
|
|
|
36491
36509
|
'styles'
|
|
36492
36510
|
];
|
|
36493
36511
|
|
|
36512
|
+
PreviewSupport.prototype.cleanUp = function() {
|
|
36513
|
+
var self = this;
|
|
36514
|
+
|
|
36515
|
+
forEach$1(self._clonedMarkers, function(clonedMarker) {
|
|
36516
|
+
remove$1(clonedMarker);
|
|
36517
|
+
});
|
|
36518
|
+
|
|
36519
|
+
self._clonedMarkers = {};
|
|
36520
|
+
};
|
|
36494
36521
|
|
|
36495
36522
|
/**
|
|
36496
36523
|
* Returns graphics of an element.
|
|
@@ -36509,24 +36536,27 @@
|
|
|
36509
36536
|
* @param {Element} element The element to be moved.
|
|
36510
36537
|
* @param {SVGElement} group The SVG group to add the preview to.
|
|
36511
36538
|
* @param {SVGElement} [gfx] The optional graphical element of the element.
|
|
36539
|
+
* @param {string} [className="djs-dragger"] The optional class name to add to the preview.
|
|
36512
36540
|
*
|
|
36513
36541
|
* @return {SVGElement} The preview.
|
|
36514
36542
|
*/
|
|
36515
|
-
PreviewSupport.prototype.addDragger = function(element, group, gfx) {
|
|
36543
|
+
PreviewSupport.prototype.addDragger = function(element, group, gfx, className = 'djs-dragger') {
|
|
36516
36544
|
gfx = gfx || this.getGfx(element);
|
|
36517
36545
|
|
|
36518
36546
|
var dragger = clone$1(gfx);
|
|
36519
36547
|
var bbox = gfx.getBoundingClientRect();
|
|
36520
36548
|
|
|
36521
|
-
this._cloneMarkers(getVisual(dragger));
|
|
36549
|
+
this._cloneMarkers(getVisual(dragger), className);
|
|
36522
36550
|
|
|
36523
|
-
attr(dragger, this._styles.cls(
|
|
36551
|
+
attr(dragger, this._styles.cls(className, [], {
|
|
36524
36552
|
x: bbox.top,
|
|
36525
36553
|
y: bbox.left
|
|
36526
36554
|
}));
|
|
36527
36555
|
|
|
36528
36556
|
append(group, dragger);
|
|
36529
36557
|
|
|
36558
|
+
attr(dragger, 'data-preview-support-element-id', element.id);
|
|
36559
|
+
|
|
36530
36560
|
return dragger;
|
|
36531
36561
|
};
|
|
36532
36562
|
|
|
@@ -36550,6 +36580,8 @@
|
|
|
36550
36580
|
|
|
36551
36581
|
append(group, frame);
|
|
36552
36582
|
|
|
36583
|
+
attr(frame, 'data-preview-support-element-id', shape.id);
|
|
36584
|
+
|
|
36553
36585
|
return frame;
|
|
36554
36586
|
};
|
|
36555
36587
|
|
|
@@ -36557,8 +36589,9 @@
|
|
|
36557
36589
|
* Clone all markers referenced by a node and its child nodes.
|
|
36558
36590
|
*
|
|
36559
36591
|
* @param {SVGElement} gfx
|
|
36592
|
+
* @param {string} [className="djs-dragger"]
|
|
36560
36593
|
*/
|
|
36561
|
-
PreviewSupport.prototype._cloneMarkers = function(gfx) {
|
|
36594
|
+
PreviewSupport.prototype._cloneMarkers = function(gfx, className = 'djs-dragger') {
|
|
36562
36595
|
var self = this;
|
|
36563
36596
|
|
|
36564
36597
|
if (gfx.childNodes) {
|
|
@@ -36567,7 +36600,7 @@
|
|
|
36567
36600
|
for (var i = 0; i < gfx.childNodes.length; i++) {
|
|
36568
36601
|
|
|
36569
36602
|
// recursively clone markers of child nodes
|
|
36570
|
-
self._cloneMarkers(gfx.childNodes[ i ]);
|
|
36603
|
+
self._cloneMarkers(gfx.childNodes[ i ], className);
|
|
36571
36604
|
}
|
|
36572
36605
|
}
|
|
36573
36606
|
|
|
@@ -36579,7 +36612,7 @@
|
|
|
36579
36612
|
if (attr(gfx, markerType)) {
|
|
36580
36613
|
var marker = getMarker(gfx, markerType, self._canvas.getContainer());
|
|
36581
36614
|
|
|
36582
|
-
self._cloneMarker(gfx, marker, markerType);
|
|
36615
|
+
self._cloneMarker(gfx, marker, markerType, className);
|
|
36583
36616
|
}
|
|
36584
36617
|
});
|
|
36585
36618
|
};
|
|
@@ -36590,9 +36623,10 @@
|
|
|
36590
36623
|
* @param {SVGElement} gfx
|
|
36591
36624
|
* @param {SVGElement} marker
|
|
36592
36625
|
* @param {string} markerType
|
|
36626
|
+
* @param {string} [className="djs-dragger"]
|
|
36593
36627
|
*/
|
|
36594
|
-
PreviewSupport.prototype._cloneMarker = function(gfx, marker, markerType) {
|
|
36595
|
-
var markerId = marker.id;
|
|
36628
|
+
PreviewSupport.prototype._cloneMarker = function(gfx, marker, markerType, className = 'djs-dragger') {
|
|
36629
|
+
var markerId = marker.id + '-' + className;
|
|
36596
36630
|
|
|
36597
36631
|
var clonedMarker = this._clonedMarkers[ markerId ];
|
|
36598
36632
|
|
|
@@ -36603,9 +36637,7 @@
|
|
|
36603
36637
|
|
|
36604
36638
|
clonedMarker.id = clonedMarkerId;
|
|
36605
36639
|
|
|
36606
|
-
classes(clonedMarker)
|
|
36607
|
-
.add('djs-dragger')
|
|
36608
|
-
.add('djs-dragger-marker');
|
|
36640
|
+
classes(clonedMarker).add(className);
|
|
36609
36641
|
|
|
36610
36642
|
this._clonedMarkers[ markerId ] = clonedMarker;
|
|
36611
36643
|
|
|
@@ -37465,7 +37497,7 @@
|
|
|
37465
37497
|
*
|
|
37466
37498
|
* @param {Object} [context]
|
|
37467
37499
|
* @param {Shape} [context.element] The optional parent.
|
|
37468
|
-
* @param {Point} [context.point] The optional
|
|
37500
|
+
* @param {Point} [context.point] The optional position.
|
|
37469
37501
|
* @param {Object} [context.hints] The optional hints.
|
|
37470
37502
|
*/
|
|
37471
37503
|
CopyPaste.prototype.paste = function(context) {
|
|
@@ -52651,7 +52683,7 @@
|
|
|
52651
52683
|
|
|
52652
52684
|
var root = this._canvas.getRootElement();
|
|
52653
52685
|
|
|
52654
|
-
if (hasSecondaryModifier(event) && event.hover) {
|
|
52686
|
+
if (!hasSecondaryModifier(event) && event.hover) {
|
|
52655
52687
|
root = event.hover;
|
|
52656
52688
|
}
|
|
52657
52689
|
|