camunda-bpmn-js 0.13.0-alpha.3 → 0.13.0-alpha.4
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/CHANGELOG.md +6 -0
- package/dist/base-modeler.development.js +122 -45
- package/dist/base-modeler.production.min.js +2 -2
- package/dist/camunda-cloud-modeler.development.js +122 -45
- package/dist/camunda-cloud-modeler.production.min.js +2 -2
- package/dist/camunda-platform-modeler.development.js +122 -45
- package/dist/camunda-platform-modeler.production.min.js +4 -4
- package/package.json +11 -6
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ All notable changes to [camunda-bpmn-js](https://github.com/camunda/camunda-bpmn
|
|
|
6
6
|
|
|
7
7
|
___Note:__ Yet to be released changes appear here._
|
|
8
8
|
|
|
9
|
+
## 0.13.0-alpha.4
|
|
10
|
+
|
|
11
|
+
* `FIX`: move properties panel deps to peer dependencies
|
|
12
|
+
* `CHORE`: add prepare script
|
|
13
|
+
* `DEPS`: update to `bpmn-js@9.0.3`
|
|
14
|
+
|
|
9
15
|
## 0.13.0-alpha.3
|
|
10
16
|
|
|
11
17
|
* `FEAT`: add cloud element templates ([#95](https://github.com/camunda/camunda-bpmn-js/pull/95))
|
|
@@ -2444,7 +2444,7 @@
|
|
|
2444
2444
|
}
|
|
2445
2445
|
});
|
|
2446
2446
|
|
|
2447
|
-
eventBus.on([ 'render.getShapePath', 'render.getConnectionPath'], renderPriority, function(evt, element) {
|
|
2447
|
+
eventBus.on([ 'render.getShapePath', 'render.getConnectionPath' ], renderPriority, function(evt, element) {
|
|
2448
2448
|
if (self.canRender(element)) {
|
|
2449
2449
|
if (evt.type === 'render.getShapePath') {
|
|
2450
2450
|
return self.getShapePath(element);
|
|
@@ -2756,7 +2756,7 @@
|
|
|
2756
2756
|
|
|
2757
2757
|
stopRecursion = !!stopRecursion;
|
|
2758
2758
|
if (!isArray(elements)) {
|
|
2759
|
-
elements = [elements];
|
|
2759
|
+
elements = [ elements ];
|
|
2760
2760
|
}
|
|
2761
2761
|
|
|
2762
2762
|
var minX,
|
|
@@ -2936,11 +2936,11 @@
|
|
|
2936
2936
|
height = shape.height;
|
|
2937
2937
|
|
|
2938
2938
|
var shapePath = [
|
|
2939
|
-
['M', x, y],
|
|
2940
|
-
['l', width, 0],
|
|
2941
|
-
['l', 0, height],
|
|
2942
|
-
['l', -width, 0],
|
|
2943
|
-
['z']
|
|
2939
|
+
[ 'M', x, y ],
|
|
2940
|
+
[ 'l', width, 0 ],
|
|
2941
|
+
[ 'l', 0, height ],
|
|
2942
|
+
[ 'l', -width, 0 ],
|
|
2943
|
+
[ 'z' ]
|
|
2944
2944
|
];
|
|
2945
2945
|
|
|
2946
2946
|
return componentsToPath(shapePath);
|
|
@@ -4666,6 +4666,25 @@
|
|
|
4666
4666
|
return layer.group;
|
|
4667
4667
|
};
|
|
4668
4668
|
|
|
4669
|
+
/**
|
|
4670
|
+
* For a given index, return the number of layers that have a higher index and
|
|
4671
|
+
* are visible.
|
|
4672
|
+
*
|
|
4673
|
+
* This is used to determine the node a layer should be inserted at.
|
|
4674
|
+
*
|
|
4675
|
+
* @param {Number} index
|
|
4676
|
+
* @returns {Number}
|
|
4677
|
+
*/
|
|
4678
|
+
Canvas.prototype._getChildIndex = function(index) {
|
|
4679
|
+
return reduce(this._layers, function(childIndex, layer) {
|
|
4680
|
+
if (layer.visible && index >= layer.index) {
|
|
4681
|
+
childIndex++;
|
|
4682
|
+
}
|
|
4683
|
+
|
|
4684
|
+
return childIndex;
|
|
4685
|
+
}, 0);
|
|
4686
|
+
};
|
|
4687
|
+
|
|
4669
4688
|
/**
|
|
4670
4689
|
* Creates a given layer and returns it.
|
|
4671
4690
|
*
|
|
@@ -4680,19 +4699,80 @@
|
|
|
4680
4699
|
index = UTILITY_LAYER_INDEX;
|
|
4681
4700
|
}
|
|
4682
4701
|
|
|
4683
|
-
var childIndex =
|
|
4684
|
-
if (index >= layer.index) {
|
|
4685
|
-
childIndex++;
|
|
4686
|
-
}
|
|
4687
|
-
|
|
4688
|
-
return childIndex;
|
|
4689
|
-
}, 0);
|
|
4702
|
+
var childIndex = this._getChildIndex(index);
|
|
4690
4703
|
|
|
4691
4704
|
return {
|
|
4692
4705
|
group: createGroup(this._viewport, 'layer-' + name, childIndex),
|
|
4693
|
-
index: index
|
|
4706
|
+
index: index,
|
|
4707
|
+
visible: true
|
|
4694
4708
|
};
|
|
4709
|
+
};
|
|
4710
|
+
|
|
4711
|
+
|
|
4712
|
+
/**
|
|
4713
|
+
* Shows a given layer.
|
|
4714
|
+
*
|
|
4715
|
+
* @param {String} layer
|
|
4716
|
+
* @returns {SVGElement}
|
|
4717
|
+
*/
|
|
4718
|
+
Canvas.prototype.showLayer = function(name) {
|
|
4719
|
+
|
|
4720
|
+
if (!name) {
|
|
4721
|
+
throw new Error('must specify a name');
|
|
4722
|
+
}
|
|
4723
|
+
|
|
4724
|
+
var layer = this._layers[name];
|
|
4725
|
+
|
|
4726
|
+
if (!layer) {
|
|
4727
|
+
throw new Error('layer <' + name + '> does not exist');
|
|
4728
|
+
}
|
|
4729
|
+
|
|
4730
|
+
var viewport = this._viewport;
|
|
4731
|
+
var group = layer.group;
|
|
4732
|
+
var index = layer.index;
|
|
4733
|
+
|
|
4734
|
+
if (layer.visible) {
|
|
4735
|
+
return group;
|
|
4736
|
+
}
|
|
4695
4737
|
|
|
4738
|
+
var childIndex = this._getChildIndex(index);
|
|
4739
|
+
|
|
4740
|
+
viewport.insertBefore(group, viewport.childNodes[childIndex] || null);
|
|
4741
|
+
|
|
4742
|
+
layer.visible = true;
|
|
4743
|
+
|
|
4744
|
+
return group;
|
|
4745
|
+
};
|
|
4746
|
+
|
|
4747
|
+
/**
|
|
4748
|
+
* Hides a given layer.
|
|
4749
|
+
*
|
|
4750
|
+
* @param {String} layer
|
|
4751
|
+
* @returns {SVGElement}
|
|
4752
|
+
*/
|
|
4753
|
+
Canvas.prototype.hideLayer = function(name) {
|
|
4754
|
+
|
|
4755
|
+
if (!name) {
|
|
4756
|
+
throw new Error('must specify a name');
|
|
4757
|
+
}
|
|
4758
|
+
|
|
4759
|
+
var layer = this._layers[name];
|
|
4760
|
+
|
|
4761
|
+
if (!layer) {
|
|
4762
|
+
throw new Error('layer <' + name + '> does not exist');
|
|
4763
|
+
}
|
|
4764
|
+
|
|
4765
|
+
var group = layer.group;
|
|
4766
|
+
|
|
4767
|
+
if (!layer.visible) {
|
|
4768
|
+
return group;
|
|
4769
|
+
}
|
|
4770
|
+
|
|
4771
|
+
remove$1(group);
|
|
4772
|
+
|
|
4773
|
+
layer.visible = false;
|
|
4774
|
+
|
|
4775
|
+
return group;
|
|
4696
4776
|
};
|
|
4697
4777
|
|
|
4698
4778
|
|
|
@@ -4935,7 +5015,7 @@
|
|
|
4935
5015
|
|
|
4936
5016
|
var layer = this.getLayer(layerName, PLANE_LAYER_INDEX);
|
|
4937
5017
|
|
|
4938
|
-
|
|
5018
|
+
this.hideLayer(layerName);
|
|
4939
5019
|
|
|
4940
5020
|
this._addRoot(rootElement, layer);
|
|
4941
5021
|
|
|
@@ -5054,17 +5134,13 @@
|
|
|
5054
5134
|
|
|
5055
5135
|
var currentRoot = this._rootElement;
|
|
5056
5136
|
|
|
5057
|
-
var currentLayer;
|
|
5058
|
-
|
|
5059
5137
|
if (currentRoot) {
|
|
5060
5138
|
|
|
5061
5139
|
// un-associate previous root element <svg>
|
|
5062
5140
|
this._elementRegistry.updateGraphics(currentRoot, null, true);
|
|
5063
5141
|
|
|
5064
5142
|
// hide previous layer
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
attr$1(currentLayer, 'display', 'none');
|
|
5143
|
+
this.hideLayer(currentRoot.layer);
|
|
5068
5144
|
}
|
|
5069
5145
|
|
|
5070
5146
|
if (rootElement) {
|
|
@@ -5077,7 +5153,7 @@
|
|
|
5077
5153
|
this._elementRegistry.updateGraphics(rootElement, this._svg, true);
|
|
5078
5154
|
|
|
5079
5155
|
// show root layer
|
|
5080
|
-
|
|
5156
|
+
this.showLayer(rootElement.layer);
|
|
5081
5157
|
}
|
|
5082
5158
|
|
|
5083
5159
|
this._rootElement = rootElement;
|
|
@@ -7473,7 +7549,7 @@
|
|
|
7473
7549
|
options = options || {};
|
|
7474
7550
|
|
|
7475
7551
|
var configModule = {
|
|
7476
|
-
'config': ['value', options]
|
|
7552
|
+
'config': [ 'value', options ]
|
|
7477
7553
|
};
|
|
7478
7554
|
|
|
7479
7555
|
var modules = [ configModule, CoreModule ].concat(options.modules || []);
|
|
@@ -21046,7 +21122,7 @@
|
|
|
21046
21122
|
};
|
|
21047
21123
|
|
|
21048
21124
|
|
|
21049
|
-
Outline.$inject = ['eventBus', 'styles', 'elementRegistry'];
|
|
21125
|
+
Outline.$inject = [ 'eventBus', 'styles', 'elementRegistry' ];
|
|
21050
21126
|
|
|
21051
21127
|
var OutlineModule = {
|
|
21052
21128
|
__init__: [ 'outline' ],
|
|
@@ -22076,7 +22152,7 @@
|
|
|
22076
22152
|
];
|
|
22077
22153
|
|
|
22078
22154
|
var ChangeSupportModule = {
|
|
22079
|
-
__init__: [ 'changeSupport'],
|
|
22155
|
+
__init__: [ 'changeSupport' ],
|
|
22080
22156
|
changeSupport: [ 'type', ChangeSupport ]
|
|
22081
22157
|
};
|
|
22082
22158
|
|
|
@@ -22248,7 +22324,7 @@
|
|
|
22248
22324
|
|
|
22249
22325
|
inherits_browser(RootElementsBehavior, CommandInterceptor);
|
|
22250
22326
|
|
|
22251
|
-
RootElementsBehavior.$inject = [ 'canvas', 'injector'];
|
|
22327
|
+
RootElementsBehavior.$inject = [ 'canvas', 'injector' ];
|
|
22252
22328
|
|
|
22253
22329
|
var RootElementsModule = {
|
|
22254
22330
|
__init__: [ 'rootElementsBehavior' ],
|
|
@@ -23353,7 +23429,7 @@
|
|
|
23353
23429
|
var KEYCODE_Y = 89;
|
|
23354
23430
|
var KEYCODE_Z = 90;
|
|
23355
23431
|
|
|
23356
|
-
var KEYS_COPY = ['c', 'C', KEYCODE_C ];
|
|
23432
|
+
var KEYS_COPY = [ 'c', 'C', KEYCODE_C ];
|
|
23357
23433
|
var KEYS_PASTE = [ 'v', 'V', KEYCODE_V ];
|
|
23358
23434
|
var KEYS_REDO = [ 'y', 'Y', KEYCODE_Y ];
|
|
23359
23435
|
var KEYS_UNDO = [ 'z', 'Z', KEYCODE_Z ];
|
|
@@ -23509,7 +23585,7 @@
|
|
|
23509
23585
|
|
|
23510
23586
|
var event = context.keyEvent;
|
|
23511
23587
|
|
|
23512
|
-
if (isKey(['Backspace', 'Delete', 'Del' ], event)) {
|
|
23588
|
+
if (isKey([ 'Backspace', 'Delete', 'Del' ], event)) {
|
|
23513
23589
|
editorActions.trigger('removeSelection');
|
|
23514
23590
|
|
|
23515
23591
|
return true;
|
|
@@ -29255,11 +29331,11 @@
|
|
|
29255
29331
|
y = center.y;
|
|
29256
29332
|
|
|
29257
29333
|
return [
|
|
29258
|
-
['M', x, y],
|
|
29259
|
-
['m', 0, -r],
|
|
29260
|
-
['a', r, r, 0, 1, 1, 0, 2 * r],
|
|
29261
|
-
['a', r, r, 0, 1, 1, 0, -2 * r],
|
|
29262
|
-
['z']
|
|
29334
|
+
[ 'M', x, y ],
|
|
29335
|
+
[ 'm', 0, -r ],
|
|
29336
|
+
[ 'a', r, r, 0, 1, 1, 0, 2 * r ],
|
|
29337
|
+
[ 'a', r, r, 0, 1, 1, 0, -2 * r ],
|
|
29338
|
+
[ 'z' ]
|
|
29263
29339
|
];
|
|
29264
29340
|
}
|
|
29265
29341
|
|
|
@@ -30835,7 +30911,7 @@
|
|
|
30835
30911
|
return parent.children || [];
|
|
30836
30912
|
}
|
|
30837
30913
|
|
|
30838
|
-
var abs$2= Math.abs,
|
|
30914
|
+
var abs$2 = Math.abs,
|
|
30839
30915
|
round$5 = Math.round;
|
|
30840
30916
|
|
|
30841
30917
|
var TOLERANCE = 10;
|
|
@@ -40726,7 +40802,8 @@
|
|
|
40726
40802
|
'canvas.viewbox.changing',
|
|
40727
40803
|
'drag.init',
|
|
40728
40804
|
'element.mousedown',
|
|
40729
|
-
'popupMenu.open'
|
|
40805
|
+
'popupMenu.open',
|
|
40806
|
+
'root.set'
|
|
40730
40807
|
], function(event) {
|
|
40731
40808
|
|
|
40732
40809
|
if (directEditing.isActive()) {
|
|
@@ -48853,7 +48930,7 @@
|
|
|
48853
48930
|
}
|
|
48854
48931
|
|
|
48855
48932
|
var LabelSupportModule = {
|
|
48856
|
-
__init__: [ 'labelSupport'],
|
|
48933
|
+
__init__: [ 'labelSupport' ],
|
|
48857
48934
|
labelSupport: [ 'type', LabelSupport ]
|
|
48858
48935
|
};
|
|
48859
48936
|
|
|
@@ -49041,7 +49118,7 @@
|
|
|
49041
49118
|
saveClear(oldShape.attachers, function(attacher) {
|
|
49042
49119
|
var allowed = rules.allowed('elements.move', {
|
|
49043
49120
|
target: newShape,
|
|
49044
|
-
shapes: [attacher]
|
|
49121
|
+
shapes: [ attacher ]
|
|
49045
49122
|
});
|
|
49046
49123
|
|
|
49047
49124
|
if (allowed === 'attach') {
|
|
@@ -50175,7 +50252,7 @@
|
|
|
50175
50252
|
}
|
|
50176
50253
|
|
|
50177
50254
|
var SpaceToolModule = {
|
|
50178
|
-
__init__: ['spaceToolPreview'],
|
|
50255
|
+
__init__: [ 'spaceToolPreview' ],
|
|
50179
50256
|
__depends__: [
|
|
50180
50257
|
DraggingModule,
|
|
50181
50258
|
RulesModule,
|
|
@@ -50183,8 +50260,8 @@
|
|
|
50183
50260
|
PreviewSupportModule,
|
|
50184
50261
|
MouseModule
|
|
50185
50262
|
],
|
|
50186
|
-
spaceTool: ['type', SpaceTool ],
|
|
50187
|
-
spaceToolPreview: ['type', SpaceToolPreview ]
|
|
50263
|
+
spaceTool: [ 'type', SpaceTool ],
|
|
50264
|
+
spaceToolPreview: [ 'type', SpaceToolPreview ]
|
|
50188
50265
|
};
|
|
50189
50266
|
|
|
50190
50267
|
function BpmnFactory(moddle) {
|
|
@@ -52304,7 +52381,7 @@
|
|
|
52304
52381
|
newParentIndex = context.newParentIndex,
|
|
52305
52382
|
oldParent = shape.parent;
|
|
52306
52383
|
|
|
52307
|
-
context.oldBounds = pick(shape, [ 'x', 'y', 'width', 'height']);
|
|
52384
|
+
context.oldBounds = pick(shape, [ 'x', 'y', 'width', 'height' ]);
|
|
52308
52385
|
|
|
52309
52386
|
// save old parent in context
|
|
52310
52387
|
context.oldParent = oldParent;
|
|
@@ -52950,7 +53027,7 @@
|
|
|
52950
53027
|
// recursively hide/show children
|
|
52951
53028
|
var result = setHiddenRecursive(children, shape.collapsed);
|
|
52952
53029
|
|
|
52953
|
-
return [shape].concat(result);
|
|
53030
|
+
return [ shape ].concat(result);
|
|
52954
53031
|
};
|
|
52955
53032
|
|
|
52956
53033
|
|
|
@@ -52967,7 +53044,7 @@
|
|
|
52967
53044
|
// retoggle state
|
|
52968
53045
|
shape.collapsed = !shape.collapsed;
|
|
52969
53046
|
|
|
52970
|
-
return [shape].concat(result);
|
|
53047
|
+
return [ shape ].concat(result);
|
|
52971
53048
|
};
|
|
52972
53049
|
|
|
52973
53050
|
|
|
@@ -59568,8 +59645,8 @@
|
|
|
59568
59645
|
var h = box.height + offset * 2;
|
|
59569
59646
|
|
|
59570
59647
|
var styles = [
|
|
59571
|
-
'width: '+ w +'px',
|
|
59572
|
-
'height: '+ h + 'px'
|
|
59648
|
+
'width: ' + w + 'px',
|
|
59649
|
+
'height: ' + h + 'px'
|
|
59573
59650
|
].join('; ');
|
|
59574
59651
|
|
|
59575
59652
|
return {
|