camunda-bpmn-js 2.3.1 → 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 +173 -250
- package/dist/base-modeler.production.min.js +31 -33
- package/dist/base-navigated-viewer.development.js +52 -33
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +52 -33
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +867 -460
- package/dist/camunda-cloud-modeler.production.min.js +32 -34
- package/dist/camunda-cloud-navigated-viewer.development.js +119 -99
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +119 -99
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +591 -346
- package/dist/camunda-platform-modeler.production.min.js +31 -33
- package/dist/camunda-platform-navigated-viewer.development.js +52 -33
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +52 -33
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/camunda-cloud/util/commonModules.js +1 -1
- package/package.json +9 -10
|
@@ -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>';
|
|
@@ -11843,11 +11865,7 @@
|
|
|
11843
11865
|
}
|
|
11844
11866
|
};
|
|
11845
11867
|
|
|
11846
|
-
var
|
|
11847
|
-
var objectRefs = {
|
|
11848
|
-
get exports(){ return objectRefsExports; },
|
|
11849
|
-
set exports(v){ objectRefsExports = v; },
|
|
11850
|
-
};
|
|
11868
|
+
var objectRefs = {exports: {}};
|
|
11851
11869
|
|
|
11852
11870
|
var collection = {};
|
|
11853
11871
|
|
|
@@ -12161,12 +12179,11 @@
|
|
|
12161
12179
|
|
|
12162
12180
|
var refs = Refs$1;
|
|
12163
12181
|
|
|
12164
|
-
|
|
12165
|
-
module.exports = refs;
|
|
12182
|
+
objectRefs.exports = refs;
|
|
12166
12183
|
|
|
12167
|
-
|
|
12168
|
-
} (objectRefs));
|
|
12184
|
+
objectRefs.exports.Collection = collection;
|
|
12169
12185
|
|
|
12186
|
+
var objectRefsExports = objectRefs.exports;
|
|
12170
12187
|
var Refs = /*@__PURE__*/getDefaultExportFromCjs(objectRefsExports);
|
|
12171
12188
|
|
|
12172
12189
|
var parentRefs = new Refs({ name: 'children', enumerable: true, collection: true }, { name: 'parent' }),
|
|
@@ -12408,6 +12425,7 @@
|
|
|
12408
12425
|
*
|
|
12409
12426
|
* @return {Root}
|
|
12410
12427
|
*/
|
|
12428
|
+
|
|
12411
12429
|
/**
|
|
12412
12430
|
* Creates a connection.
|
|
12413
12431
|
*
|
|
@@ -12431,6 +12449,7 @@
|
|
|
12431
12449
|
*
|
|
12432
12450
|
* @return {Connection}
|
|
12433
12451
|
*/
|
|
12452
|
+
|
|
12434
12453
|
/**
|
|
12435
12454
|
* Creates a shape.
|
|
12436
12455
|
*
|
|
@@ -12454,6 +12473,7 @@
|
|
|
12454
12473
|
*
|
|
12455
12474
|
* @return {Shape}
|
|
12456
12475
|
*/
|
|
12476
|
+
|
|
12457
12477
|
/**
|
|
12458
12478
|
* Creates a label.
|
|
12459
12479
|
*
|
|
@@ -12473,6 +12493,7 @@
|
|
|
12473
12493
|
*
|
|
12474
12494
|
* @param {'label'} type
|
|
12475
12495
|
* @param {Object} [attrs]
|
|
12496
|
+
*
|
|
12476
12497
|
* @return {Label}
|
|
12477
12498
|
*/
|
|
12478
12499
|
function create(type, attrs) {
|
|
@@ -24028,101 +24049,100 @@
|
|
|
24028
24049
|
NavigatedViewer$1.prototype._navigationModules
|
|
24029
24050
|
);
|
|
24030
24051
|
|
|
24031
|
-
|
|
24032
|
-
|
|
24033
|
-
|
|
24034
|
-
|
|
24035
|
-
|
|
24036
|
-
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
|
|
24040
|
-
|
|
24041
|
-
ctor.super_ = superCtor;
|
|
24042
|
-
ctor.prototype = Object.create(superCtor.prototype, {
|
|
24043
|
-
constructor: {
|
|
24044
|
-
value: ctor,
|
|
24045
|
-
enumerable: false,
|
|
24046
|
-
writable: true,
|
|
24047
|
-
configurable: true
|
|
24048
|
-
}
|
|
24049
|
-
});
|
|
24050
|
-
}
|
|
24051
|
-
};
|
|
24052
|
-
} else {
|
|
24053
|
-
// old school shim for old browsers
|
|
24054
|
-
inherits_browser.exports = function inherits(ctor, superCtor) {
|
|
24055
|
-
if (superCtor) {
|
|
24056
|
-
ctor.super_ = superCtor;
|
|
24057
|
-
var TempCtor = function () {};
|
|
24058
|
-
TempCtor.prototype = superCtor.prototype;
|
|
24059
|
-
ctor.prototype = new TempCtor();
|
|
24060
|
-
ctor.prototype.constructor = ctor;
|
|
24061
|
-
}
|
|
24062
|
-
};
|
|
24063
|
-
}
|
|
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';
|
|
24064
24062
|
|
|
24065
|
-
|
|
24066
|
-
var modelerTemplateIcon = getBusinessObject(element).get('zeebe:modelerTemplateIcon');
|
|
24067
|
-
return modelerTemplateIcon;
|
|
24063
|
+
return getBusinessObject(element).get(iconProperty);
|
|
24068
24064
|
}
|
|
24069
24065
|
|
|
24070
24066
|
var HIGH_PRIORITY = 1250;
|
|
24071
24067
|
|
|
24072
24068
|
|
|
24073
|
-
function
|
|
24069
|
+
function ElementTemplateIconRenderer(
|
|
24070
|
+
config,
|
|
24074
24071
|
bpmnRenderer,
|
|
24075
|
-
eventBus
|
|
24076
|
-
|
|
24072
|
+
eventBus) {
|
|
24073
|
+
|
|
24077
24074
|
this._bpmnRenderer = bpmnRenderer;
|
|
24078
24075
|
|
|
24076
|
+
this._iconProperty = config && config.iconProperty;
|
|
24077
|
+
|
|
24079
24078
|
BaseRenderer.call(this, eventBus, HIGH_PRIORITY);
|
|
24080
24079
|
}
|
|
24081
24080
|
|
|
24082
|
-
|
|
24081
|
+
e(ElementTemplateIconRenderer, BaseRenderer);
|
|
24083
24082
|
|
|
24084
|
-
|
|
24083
|
+
ElementTemplateIconRenderer.prototype.canRender = function(element) {
|
|
24085
24084
|
|
|
24086
24085
|
if (isLabel(element)) {
|
|
24087
24086
|
return false;
|
|
24088
24087
|
}
|
|
24089
24088
|
|
|
24090
|
-
return (
|
|
24091
|
-
|
|
24092
|
-
!!getModelerTemplateIcon(element)
|
|
24089
|
+
return !!(
|
|
24090
|
+
isAny(element, [ 'bpmn:Task', 'bpmn:Event' ]) && this._getIcon(element)
|
|
24093
24091
|
);
|
|
24094
24092
|
};
|
|
24095
24093
|
|
|
24096
|
-
|
|
24094
|
+
ElementTemplateIconRenderer.prototype._getIcon = function(element) {
|
|
24095
|
+
return getModelerTemplateIcon(element, this._iconProperty);
|
|
24096
|
+
};
|
|
24097
|
+
|
|
24098
|
+
ElementTemplateIconRenderer.prototype.drawShape = function(parentGfx, element) {
|
|
24097
24099
|
|
|
24098
|
-
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 });
|
|
24099
24111
|
|
|
24100
|
-
var
|
|
24112
|
+
var icon = this._getIcon(element);
|
|
24101
24113
|
|
|
24102
|
-
var
|
|
24114
|
+
var size = 18;
|
|
24103
24115
|
|
|
24104
|
-
var
|
|
24105
|
-
attr$1(icon, {
|
|
24106
|
-
href: modelerTemplateIcon,
|
|
24116
|
+
var padding = is$1(element, 'bpmn:Task') ? {
|
|
24107
24117
|
x: 5,
|
|
24108
|
-
y: 5
|
|
24109
|
-
|
|
24110
|
-
|
|
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
|
|
24111
24130
|
});
|
|
24112
24131
|
|
|
24113
|
-
append(parentGfx,
|
|
24132
|
+
append(parentGfx, img);
|
|
24114
24133
|
|
|
24115
24134
|
return gfx;
|
|
24116
24135
|
};
|
|
24117
24136
|
|
|
24118
|
-
|
|
24137
|
+
ElementTemplateIconRenderer.$inject = [
|
|
24138
|
+
'config.elementTemplateIconRenderer',
|
|
24119
24139
|
'bpmnRenderer',
|
|
24120
24140
|
'eventBus'
|
|
24121
24141
|
];
|
|
24122
24142
|
|
|
24123
24143
|
var iconRendererModule = {
|
|
24124
|
-
__init__: [ '
|
|
24125
|
-
|
|
24144
|
+
__init__: [ 'elementTemplateIconRenderer' ],
|
|
24145
|
+
elementTemplateIconRenderer: [ 'type', ElementTemplateIconRenderer ]
|
|
24126
24146
|
};
|
|
24127
24147
|
|
|
24128
24148
|
var name = "zeebe";
|