camunda-bpmn-js 2.4.0 → 2.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.
- package/dist/assets/properties-panel.css +40 -12
- package/dist/base-modeler.development.js +158 -220
- package/dist/base-modeler.production.min.js +31 -31
- package/dist/base-navigated-viewer.development.js +48 -24
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +48 -24
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +707 -379
- package/dist/camunda-cloud-modeler.production.min.js +32 -32
- package/dist/camunda-cloud-navigated-viewer.development.js +118 -92
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +118 -92
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +543 -305
- package/dist/camunda-platform-modeler.production.min.js +31 -31
- package/dist/camunda-platform-navigated-viewer.development.js +48 -24
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +48 -24
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/camunda-cloud/util/commonModules.js +1 -1
- package/package.json +7 -8
|
@@ -722,6 +722,28 @@
|
|
|
722
722
|
return element && !!getBusinessObject(element).triggeredByEvent;
|
|
723
723
|
}
|
|
724
724
|
|
|
725
|
+
/**
|
|
726
|
+
* Checks whether a value is an instance of Connection.
|
|
727
|
+
*
|
|
728
|
+
* @param {any} value
|
|
729
|
+
*
|
|
730
|
+
* @return {boolean}
|
|
731
|
+
*/
|
|
732
|
+
function isConnection(value) {
|
|
733
|
+
return isObject(value) && has$1(value, 'waypoints');
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Checks whether a value is an instance of Label.
|
|
738
|
+
*
|
|
739
|
+
* @param {any} value
|
|
740
|
+
*
|
|
741
|
+
* @return {boolean}
|
|
742
|
+
*/
|
|
743
|
+
function isLabel(value) {
|
|
744
|
+
return isObject(value) && has$1(value, 'labelTarget');
|
|
745
|
+
}
|
|
746
|
+
|
|
725
747
|
/**
|
|
726
748
|
* @typedef {import('diagram-js/lib/util/Types').Point} Point
|
|
727
749
|
* @typedef {import('diagram-js/lib/util/Types').Rect} Rect
|
|
@@ -878,19 +900,10 @@
|
|
|
878
900
|
}
|
|
879
901
|
|
|
880
902
|
/**
|
|
881
|
-
* @param {
|
|
903
|
+
* @param {ModdleElement} semantic
|
|
882
904
|
*
|
|
883
|
-
* @
|
|
905
|
+
* @returns {string}
|
|
884
906
|
*/
|
|
885
|
-
function isLabel(element) {
|
|
886
|
-
return element && !!element.labelTarget;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
/**
|
|
891
|
-
* @typedef { import('../model').DiagramElement } DiagramElement
|
|
892
|
-
*/
|
|
893
|
-
|
|
894
907
|
function getLabelAttr(semantic) {
|
|
895
908
|
if (
|
|
896
909
|
is$1(semantic, 'bpmn:FlowElement') ||
|
|
@@ -913,6 +926,11 @@
|
|
|
913
926
|
}
|
|
914
927
|
}
|
|
915
928
|
|
|
929
|
+
/**
|
|
930
|
+
* @param {ModdleElement} semantic
|
|
931
|
+
*
|
|
932
|
+
* @returns {string}
|
|
933
|
+
*/
|
|
916
934
|
function getCategoryValue(semantic) {
|
|
917
935
|
var categoryValueRef = semantic['categoryValueRef'];
|
|
918
936
|
|
|
@@ -925,9 +943,9 @@
|
|
|
925
943
|
}
|
|
926
944
|
|
|
927
945
|
/**
|
|
928
|
-
* @param {
|
|
946
|
+
* @param {Element} element
|
|
929
947
|
*
|
|
930
|
-
* @return {string}
|
|
948
|
+
* @return {string}
|
|
931
949
|
*/
|
|
932
950
|
function getLabel(element) {
|
|
933
951
|
var semantic = element.businessObject,
|
|
@@ -2750,7 +2768,7 @@
|
|
|
2750
2768
|
*/
|
|
2751
2769
|
|
|
2752
2770
|
/**
|
|
2753
|
-
* @typedef { import('../model').
|
|
2771
|
+
* @typedef { import('../model/Types').Element } Element
|
|
2754
2772
|
*/
|
|
2755
2773
|
|
|
2756
2774
|
/**
|
|
@@ -3116,8 +3134,8 @@
|
|
|
3116
3134
|
}
|
|
3117
3135
|
|
|
3118
3136
|
function as(type) {
|
|
3119
|
-
return function(parentGfx, element) {
|
|
3120
|
-
return renderer(type)(parentGfx, element);
|
|
3137
|
+
return function(parentGfx, element, options) {
|
|
3138
|
+
return renderer(type)(parentGfx, element, options);
|
|
3121
3139
|
};
|
|
3122
3140
|
}
|
|
3123
3141
|
|
|
@@ -3256,7 +3274,7 @@
|
|
|
3256
3274
|
|
|
3257
3275
|
return drawCircle(parentGfx, element.width, element.height, attrs);
|
|
3258
3276
|
},
|
|
3259
|
-
'bpmn:StartEvent': function(parentGfx, element) {
|
|
3277
|
+
'bpmn:StartEvent': function(parentGfx, element, options) {
|
|
3260
3278
|
var attrs = {
|
|
3261
3279
|
fill: getFillColor(element, defaultFillColor),
|
|
3262
3280
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
@@ -3274,7 +3292,9 @@
|
|
|
3274
3292
|
|
|
3275
3293
|
var circle = renderer('bpmn:Event')(parentGfx, element, attrs);
|
|
3276
3294
|
|
|
3277
|
-
|
|
3295
|
+
if (!options || options.renderIcon !== false) {
|
|
3296
|
+
renderEventContent(element, parentGfx);
|
|
3297
|
+
}
|
|
3278
3298
|
|
|
3279
3299
|
return circle;
|
|
3280
3300
|
},
|
|
@@ -3527,14 +3547,16 @@
|
|
|
3527
3547
|
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
3528
3548
|
});
|
|
3529
3549
|
},
|
|
3530
|
-
'bpmn:EndEvent': function(parentGfx, element) {
|
|
3550
|
+
'bpmn:EndEvent': function(parentGfx, element, options) {
|
|
3531
3551
|
var circle = renderer('bpmn:Event')(parentGfx, element, {
|
|
3532
3552
|
strokeWidth: 4,
|
|
3533
3553
|
fill: getFillColor(element, defaultFillColor),
|
|
3534
3554
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
3535
3555
|
});
|
|
3536
3556
|
|
|
3537
|
-
|
|
3557
|
+
if (!options || options.renderIcon !== false) {
|
|
3558
|
+
renderEventContent(element, parentGfx);
|
|
3559
|
+
}
|
|
3538
3560
|
|
|
3539
3561
|
return circle;
|
|
3540
3562
|
},
|
|
@@ -3547,7 +3569,7 @@
|
|
|
3547
3569
|
|
|
3548
3570
|
return circle;
|
|
3549
3571
|
},
|
|
3550
|
-
'bpmn:IntermediateEvent': function(parentGfx, element) {
|
|
3572
|
+
'bpmn:IntermediateEvent': function(parentGfx, element, options) {
|
|
3551
3573
|
var outer = renderer('bpmn:Event')(parentGfx, element, {
|
|
3552
3574
|
strokeWidth: 1.5,
|
|
3553
3575
|
fill: getFillColor(element, defaultFillColor),
|
|
@@ -3561,7 +3583,9 @@
|
|
|
3561
3583
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
3562
3584
|
});
|
|
3563
3585
|
|
|
3564
|
-
|
|
3586
|
+
if (!options || options.renderIcon !== false) {
|
|
3587
|
+
renderEventContent(element, parentGfx);
|
|
3588
|
+
}
|
|
3565
3589
|
|
|
3566
3590
|
return outer;
|
|
3567
3591
|
},
|
|
@@ -4279,7 +4303,7 @@
|
|
|
4279
4303
|
|
|
4280
4304
|
return elementStore;
|
|
4281
4305
|
},
|
|
4282
|
-
'bpmn:BoundaryEvent': function(parentGfx, element) {
|
|
4306
|
+
'bpmn:BoundaryEvent': function(parentGfx, element, options) {
|
|
4283
4307
|
|
|
4284
4308
|
var semantic = getBusinessObject(element),
|
|
4285
4309
|
cancel = semantic.cancelActivity;
|
|
@@ -4310,7 +4334,9 @@
|
|
|
4310
4334
|
|
|
4311
4335
|
/* inner path */ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
|
|
4312
4336
|
|
|
4313
|
-
|
|
4337
|
+
if (!options || options.renderIcon !== false) {
|
|
4338
|
+
renderEventContent(element, parentGfx);
|
|
4339
|
+
}
|
|
4314
4340
|
|
|
4315
4341
|
return outer;
|
|
4316
4342
|
},
|
|
@@ -4591,7 +4617,7 @@
|
|
|
4591
4617
|
|
|
4592
4618
|
|
|
4593
4619
|
/**
|
|
4594
|
-
* @param {
|
|
4620
|
+
* @param {Element} element
|
|
4595
4621
|
*
|
|
4596
4622
|
* @return {boolean}
|
|
4597
4623
|
*/
|
|
@@ -4603,7 +4629,7 @@
|
|
|
4603
4629
|
* Draw shape into parentGfx.
|
|
4604
4630
|
*
|
|
4605
4631
|
* @param {SVGElement} parentGfx
|
|
4606
|
-
* @param {
|
|
4632
|
+
* @param {Element} element
|
|
4607
4633
|
*
|
|
4608
4634
|
* @return {SVGElement} mainGfx
|
|
4609
4635
|
*/
|
|
@@ -4619,7 +4645,7 @@
|
|
|
4619
4645
|
* Draw connection into parentGfx.
|
|
4620
4646
|
*
|
|
4621
4647
|
* @param {SVGElement} parentGfx
|
|
4622
|
-
* @param {
|
|
4648
|
+
* @param {Element} element
|
|
4623
4649
|
*
|
|
4624
4650
|
* @return {SVGElement} mainGfx
|
|
4625
4651
|
*/
|
|
@@ -4634,7 +4660,7 @@
|
|
|
4634
4660
|
/**
|
|
4635
4661
|
* Get shape path.
|
|
4636
4662
|
*
|
|
4637
|
-
* @param {
|
|
4663
|
+
* @param {Element} element
|
|
4638
4664
|
*
|
|
4639
4665
|
* @return {string} path
|
|
4640
4666
|
*/
|
|
@@ -5898,10 +5924,6 @@
|
|
|
5898
5924
|
return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2));
|
|
5899
5925
|
}
|
|
5900
5926
|
|
|
5901
|
-
function isConnection(element) {
|
|
5902
|
-
return !!element.waypoints;
|
|
5903
|
-
}
|
|
5904
|
-
|
|
5905
5927
|
function elementToString(e) {
|
|
5906
5928
|
if (!e) {
|
|
5907
5929
|
return '<null>';
|
|
@@ -12403,6 +12425,7 @@
|
|
|
12403
12425
|
*
|
|
12404
12426
|
* @return {Root}
|
|
12405
12427
|
*/
|
|
12428
|
+
|
|
12406
12429
|
/**
|
|
12407
12430
|
* Creates a connection.
|
|
12408
12431
|
*
|
|
@@ -12426,6 +12449,7 @@
|
|
|
12426
12449
|
*
|
|
12427
12450
|
* @return {Connection}
|
|
12428
12451
|
*/
|
|
12452
|
+
|
|
12429
12453
|
/**
|
|
12430
12454
|
* Creates a shape.
|
|
12431
12455
|
*
|
|
@@ -12449,6 +12473,7 @@
|
|
|
12449
12473
|
*
|
|
12450
12474
|
* @return {Shape}
|
|
12451
12475
|
*/
|
|
12476
|
+
|
|
12452
12477
|
/**
|
|
12453
12478
|
* Creates a label.
|
|
12454
12479
|
*
|
|
@@ -12468,6 +12493,7 @@
|
|
|
12468
12493
|
*
|
|
12469
12494
|
* @param {'label'} type
|
|
12470
12495
|
* @param {Object} [attrs]
|
|
12496
|
+
*
|
|
12471
12497
|
* @return {Label}
|
|
12472
12498
|
*/
|
|
12473
12499
|
function create(type, attrs) {
|
|
@@ -16674,7 +16700,7 @@
|
|
|
16674
16700
|
}
|
|
16675
16701
|
}
|
|
16676
16702
|
|
|
16677
|
-
function inherits
|
|
16703
|
+
function inherits(ctor, superCtor) {
|
|
16678
16704
|
ctor.super_ = superCtor;
|
|
16679
16705
|
ctor.prototype = Object.create(superCtor.prototype, {
|
|
16680
16706
|
constructor: {
|
|
@@ -16840,7 +16866,7 @@
|
|
|
16840
16866
|
this.tagName = tagName;
|
|
16841
16867
|
}
|
|
16842
16868
|
|
|
16843
|
-
inherits
|
|
16869
|
+
inherits(ValueSerializer, BodySerializer);
|
|
16844
16870
|
|
|
16845
16871
|
ValueSerializer.prototype.serializeTo = function(writer) {
|
|
16846
16872
|
|
|
@@ -17333,7 +17359,7 @@
|
|
|
17333
17359
|
ElementSerializer.call(this, parent, propertyDescriptor);
|
|
17334
17360
|
}
|
|
17335
17361
|
|
|
17336
|
-
inherits
|
|
17362
|
+
inherits(TypeSerializer, ElementSerializer);
|
|
17337
17363
|
|
|
17338
17364
|
TypeSerializer.prototype.parseNsAttributes = function(element) {
|
|
17339
17365
|
|
|
@@ -24023,100 +24049,100 @@
|
|
|
24023
24049
|
NavigatedViewer$1.prototype._navigationModules
|
|
24024
24050
|
);
|
|
24025
24051
|
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
|
|
24031
|
-
|
|
24032
|
-
|
|
24033
|
-
|
|
24034
|
-
|
|
24035
|
-
|
|
24036
|
-
enumerable: false,
|
|
24037
|
-
writable: true,
|
|
24038
|
-
configurable: true
|
|
24039
|
-
}
|
|
24040
|
-
});
|
|
24041
|
-
}
|
|
24042
|
-
};
|
|
24043
|
-
} else {
|
|
24044
|
-
// old school shim for old browsers
|
|
24045
|
-
inherits_browser.exports = function inherits(ctor, superCtor) {
|
|
24046
|
-
if (superCtor) {
|
|
24047
|
-
ctor.super_ = superCtor;
|
|
24048
|
-
var TempCtor = function () {};
|
|
24049
|
-
TempCtor.prototype = superCtor.prototype;
|
|
24050
|
-
ctor.prototype = new TempCtor();
|
|
24051
|
-
ctor.prototype.constructor = ctor;
|
|
24052
|
-
}
|
|
24053
|
-
};
|
|
24054
|
-
}
|
|
24055
|
-
|
|
24056
|
-
var inherits_browserExports = inherits_browser.exports;
|
|
24057
|
-
var inherits = /*@__PURE__*/getDefaultExportFromCjs(inherits_browserExports);
|
|
24052
|
+
/**
|
|
24053
|
+
* Get icon defined on a moddle element.
|
|
24054
|
+
*
|
|
24055
|
+
* @param { ModdleElement } element
|
|
24056
|
+
* @param { string } iconProperty
|
|
24057
|
+
*
|
|
24058
|
+
* @return { string }
|
|
24059
|
+
*/
|
|
24060
|
+
function getModelerTemplateIcon(element, iconProperty) {
|
|
24061
|
+
iconProperty = iconProperty || 'zeebe:modelerTemplateIcon';
|
|
24058
24062
|
|
|
24059
|
-
|
|
24060
|
-
var modelerTemplateIcon = getBusinessObject(element).get('zeebe:modelerTemplateIcon');
|
|
24061
|
-
return modelerTemplateIcon;
|
|
24063
|
+
return getBusinessObject(element).get(iconProperty);
|
|
24062
24064
|
}
|
|
24063
24065
|
|
|
24064
24066
|
var HIGH_PRIORITY = 1250;
|
|
24065
24067
|
|
|
24066
24068
|
|
|
24067
|
-
function
|
|
24069
|
+
function ElementTemplateIconRenderer(
|
|
24070
|
+
config,
|
|
24068
24071
|
bpmnRenderer,
|
|
24069
|
-
eventBus
|
|
24070
|
-
|
|
24072
|
+
eventBus) {
|
|
24073
|
+
|
|
24071
24074
|
this._bpmnRenderer = bpmnRenderer;
|
|
24072
24075
|
|
|
24076
|
+
this._iconProperty = config && config.iconProperty;
|
|
24077
|
+
|
|
24073
24078
|
BaseRenderer.call(this, eventBus, HIGH_PRIORITY);
|
|
24074
24079
|
}
|
|
24075
24080
|
|
|
24076
|
-
|
|
24081
|
+
e(ElementTemplateIconRenderer, BaseRenderer);
|
|
24077
24082
|
|
|
24078
|
-
|
|
24083
|
+
ElementTemplateIconRenderer.prototype.canRender = function(element) {
|
|
24079
24084
|
|
|
24080
24085
|
if (isLabel(element)) {
|
|
24081
24086
|
return false;
|
|
24082
24087
|
}
|
|
24083
24088
|
|
|
24084
|
-
return (
|
|
24085
|
-
|
|
24086
|
-
!!getModelerTemplateIcon(element)
|
|
24089
|
+
return !!(
|
|
24090
|
+
isAny(element, [ 'bpmn:Task', 'bpmn:Event' ]) && this._getIcon(element)
|
|
24087
24091
|
);
|
|
24088
24092
|
};
|
|
24089
24093
|
|
|
24090
|
-
|
|
24094
|
+
ElementTemplateIconRenderer.prototype._getIcon = function(element) {
|
|
24095
|
+
return getModelerTemplateIcon(element, this._iconProperty);
|
|
24096
|
+
};
|
|
24097
|
+
|
|
24098
|
+
ElementTemplateIconRenderer.prototype.drawShape = function(parentGfx, element) {
|
|
24091
24099
|
|
|
24092
|
-
var renderer = this._bpmnRenderer.handlers[
|
|
24100
|
+
var renderer = this._bpmnRenderer.handlers[
|
|
24101
|
+
[
|
|
24102
|
+
'bpmn:Task',
|
|
24103
|
+
'bpmn:StartEvent',
|
|
24104
|
+
'bpmn:IntermediateEvent',
|
|
24105
|
+
'bpmn:BoundaryEvent',
|
|
24106
|
+
'bpmn:EndEvent'
|
|
24107
|
+
].find(t => is$1(element, t))
|
|
24108
|
+
];
|
|
24109
|
+
|
|
24110
|
+
var gfx = renderer(parentGfx, element, { renderIcon: false });
|
|
24093
24111
|
|
|
24094
|
-
var
|
|
24112
|
+
var icon = this._getIcon(element);
|
|
24095
24113
|
|
|
24096
|
-
var
|
|
24114
|
+
var size = 18;
|
|
24097
24115
|
|
|
24098
|
-
var
|
|
24099
|
-
attr$1(icon, {
|
|
24100
|
-
href: modelerTemplateIcon,
|
|
24116
|
+
var padding = is$1(element, 'bpmn:Task') ? {
|
|
24101
24117
|
x: 5,
|
|
24102
|
-
y: 5
|
|
24103
|
-
|
|
24104
|
-
|
|
24118
|
+
y: 5
|
|
24119
|
+
} : {
|
|
24120
|
+
x: (element.width - size) / 2,
|
|
24121
|
+
y: (element.height - size) / 2
|
|
24122
|
+
};
|
|
24123
|
+
|
|
24124
|
+
var img = create$1('image');
|
|
24125
|
+
attr$1(img, {
|
|
24126
|
+
href: icon,
|
|
24127
|
+
width: size,
|
|
24128
|
+
height: size,
|
|
24129
|
+
...padding
|
|
24105
24130
|
});
|
|
24106
24131
|
|
|
24107
|
-
append(parentGfx,
|
|
24132
|
+
append(parentGfx, img);
|
|
24108
24133
|
|
|
24109
24134
|
return gfx;
|
|
24110
24135
|
};
|
|
24111
24136
|
|
|
24112
|
-
|
|
24137
|
+
ElementTemplateIconRenderer.$inject = [
|
|
24138
|
+
'config.elementTemplateIconRenderer',
|
|
24113
24139
|
'bpmnRenderer',
|
|
24114
24140
|
'eventBus'
|
|
24115
24141
|
];
|
|
24116
24142
|
|
|
24117
24143
|
var iconRendererModule = {
|
|
24118
|
-
__init__: [ '
|
|
24119
|
-
|
|
24144
|
+
__init__: [ 'elementTemplateIconRenderer' ],
|
|
24145
|
+
elementTemplateIconRenderer: [ 'type', ElementTemplateIconRenderer ]
|
|
24120
24146
|
};
|
|
24121
24147
|
|
|
24122
24148
|
var name = "zeebe";
|