camunda-bpmn-js 3.2.0 → 3.3.1
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/bpmn-font/css/bpmn.css +1 -0
- package/dist/assets/bpmn-js.css +1 -0
- package/dist/base-modeler.development.js +476 -585
- package/dist/base-modeler.production.min.js +31 -31
- package/dist/base-navigated-viewer.development.js +12 -139
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +12 -139
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +864 -896
- package/dist/camunda-cloud-modeler.production.min.js +34 -34
- package/dist/camunda-cloud-navigated-viewer.development.js +12 -139
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +12 -139
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +476 -585
- package/dist/camunda-platform-modeler.production.min.js +31 -31
- package/dist/camunda-platform-navigated-viewer.development.js +12 -139
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +12 -139
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/package.json +4 -4
|
@@ -82,15 +82,14 @@
|
|
|
82
82
|
*
|
|
83
83
|
* @param {Seed} seed
|
|
84
84
|
*/
|
|
85
|
-
|
|
86
85
|
function Ids(seed) {
|
|
87
86
|
if (!(this instanceof Ids)) {
|
|
88
87
|
return new Ids(seed);
|
|
89
88
|
}
|
|
90
|
-
|
|
91
89
|
seed = seed || [128, 36, 1];
|
|
92
90
|
this._seed = seed.length ? hat_1.rack(seed[0], seed[1], seed[2]) : seed;
|
|
93
91
|
}
|
|
92
|
+
|
|
94
93
|
/**
|
|
95
94
|
* Generate a next id.
|
|
96
95
|
*
|
|
@@ -98,10 +97,10 @@
|
|
|
98
97
|
*
|
|
99
98
|
* @return {String} id
|
|
100
99
|
*/
|
|
101
|
-
|
|
102
100
|
Ids.prototype.next = function (element) {
|
|
103
101
|
return this._seed(element || true);
|
|
104
102
|
};
|
|
103
|
+
|
|
105
104
|
/**
|
|
106
105
|
* Generate a next id with a given prefix.
|
|
107
106
|
*
|
|
@@ -109,61 +108,54 @@
|
|
|
109
108
|
*
|
|
110
109
|
* @return {String} id
|
|
111
110
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
111
|
Ids.prototype.nextPrefixed = function (prefix, element) {
|
|
115
112
|
var id;
|
|
116
|
-
|
|
117
113
|
do {
|
|
118
114
|
id = prefix + this.next(true);
|
|
119
|
-
} while (this.assigned(id));
|
|
120
|
-
|
|
115
|
+
} while (this.assigned(id));
|
|
121
116
|
|
|
122
|
-
|
|
117
|
+
// claim {prefix}{random}
|
|
118
|
+
this.claim(id, element);
|
|
123
119
|
|
|
120
|
+
// return
|
|
124
121
|
return id;
|
|
125
122
|
};
|
|
123
|
+
|
|
126
124
|
/**
|
|
127
125
|
* Manually claim an existing id.
|
|
128
126
|
*
|
|
129
127
|
* @param {String} id
|
|
130
128
|
* @param {String} [element] element the id is claimed by
|
|
131
129
|
*/
|
|
132
|
-
|
|
133
|
-
|
|
134
130
|
Ids.prototype.claim = function (id, element) {
|
|
135
131
|
this._seed.set(id, element || true);
|
|
136
132
|
};
|
|
133
|
+
|
|
137
134
|
/**
|
|
138
135
|
* Returns true if the given id has already been assigned.
|
|
139
136
|
*
|
|
140
137
|
* @param {String} id
|
|
141
138
|
* @return {Boolean}
|
|
142
139
|
*/
|
|
143
|
-
|
|
144
|
-
|
|
145
140
|
Ids.prototype.assigned = function (id) {
|
|
146
141
|
return this._seed.get(id) || false;
|
|
147
142
|
};
|
|
143
|
+
|
|
148
144
|
/**
|
|
149
145
|
* Unclaim an id.
|
|
150
146
|
*
|
|
151
147
|
* @param {String} id the id to unclaim
|
|
152
148
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
149
|
Ids.prototype.unclaim = function (id) {
|
|
156
150
|
delete this._seed.hats[id];
|
|
157
151
|
};
|
|
152
|
+
|
|
158
153
|
/**
|
|
159
154
|
* Clear all claimed ids.
|
|
160
155
|
*/
|
|
161
|
-
|
|
162
|
-
|
|
163
156
|
Ids.prototype.clear = function () {
|
|
164
157
|
var hats = this._seed.hats,
|
|
165
|
-
|
|
166
|
-
|
|
158
|
+
id;
|
|
167
159
|
for (id in hats) {
|
|
168
160
|
this.unclaim(id);
|
|
169
161
|
}
|
|
@@ -16263,62 +16255,6 @@
|
|
|
16263
16255
|
* @typedef {import('../model/Types').ModdleElement} ModdleElement
|
|
16264
16256
|
*/
|
|
16265
16257
|
|
|
16266
|
-
// TODO(nikku): remove with future bpmn-js version
|
|
16267
|
-
|
|
16268
|
-
/**
|
|
16269
|
-
* Wraps APIs to check:
|
|
16270
|
-
*
|
|
16271
|
-
* 1) If a callback is passed -> Warn users about callback deprecation.
|
|
16272
|
-
* 2) If Promise class is implemented in current environment.
|
|
16273
|
-
*
|
|
16274
|
-
* @private
|
|
16275
|
-
*
|
|
16276
|
-
* @param {Function} api
|
|
16277
|
-
*
|
|
16278
|
-
* @return {Function}
|
|
16279
|
-
*/
|
|
16280
|
-
function wrapForCompatibility(api) {
|
|
16281
|
-
|
|
16282
|
-
return function() {
|
|
16283
|
-
|
|
16284
|
-
if (!window.Promise) {
|
|
16285
|
-
throw new Error('Promises is not supported in this environment. Please polyfill Promise.');
|
|
16286
|
-
}
|
|
16287
|
-
|
|
16288
|
-
var argLen = arguments.length;
|
|
16289
|
-
if (argLen >= 1 && isFunction$1(arguments[argLen - 1])) {
|
|
16290
|
-
|
|
16291
|
-
var callback = arguments[argLen - 1];
|
|
16292
|
-
|
|
16293
|
-
console.warn(new Error(
|
|
16294
|
-
'Passing callbacks to ' + api.name + ' is deprecated and will be removed in a future major release. ' +
|
|
16295
|
-
'Please switch to promises: https://bpmn.io/l/moving-to-promises.html'
|
|
16296
|
-
));
|
|
16297
|
-
|
|
16298
|
-
var argsWithoutCallback = Array.prototype.slice.call(arguments, 0, -1);
|
|
16299
|
-
|
|
16300
|
-
api.apply(this, argsWithoutCallback).then(function(result) {
|
|
16301
|
-
|
|
16302
|
-
var firstKey = Object.keys(result)[0];
|
|
16303
|
-
|
|
16304
|
-
// The APIs we are wrapping all resolve a single item depending on the API.
|
|
16305
|
-
// For instance, importXML resolves { warnings } and saveXML returns { xml }.
|
|
16306
|
-
// That's why we can call the callback with the first item of result.
|
|
16307
|
-
return callback(null, result[firstKey]);
|
|
16308
|
-
|
|
16309
|
-
// Passing a second paramter instead of catch because we don't want to
|
|
16310
|
-
// catch errors thrown by callback().
|
|
16311
|
-
}, function(err) {
|
|
16312
|
-
|
|
16313
|
-
return callback(err, err.warnings);
|
|
16314
|
-
});
|
|
16315
|
-
} else {
|
|
16316
|
-
|
|
16317
|
-
return api.apply(this, arguments);
|
|
16318
|
-
}
|
|
16319
|
-
};
|
|
16320
|
-
}
|
|
16321
|
-
|
|
16322
16258
|
|
|
16323
16259
|
// TODO(nikku): remove with future bpmn-js version
|
|
16324
16260
|
|
|
@@ -17316,28 +17252,7 @@
|
|
|
17316
17252
|
const self = this;
|
|
17317
17253
|
|
|
17318
17254
|
function ParseCompleteEvent(data) {
|
|
17319
|
-
|
|
17320
|
-
const event = self.get('eventBus').createEvent(data);
|
|
17321
|
-
|
|
17322
|
-
// TODO(nikku): remove with future bpmn-js version
|
|
17323
|
-
Object.defineProperty(event, 'context', {
|
|
17324
|
-
enumerable: true,
|
|
17325
|
-
get: function() {
|
|
17326
|
-
|
|
17327
|
-
console.warn(new Error(
|
|
17328
|
-
'import.parse.complete <context> is deprecated ' +
|
|
17329
|
-
'and will be removed in future library versions'
|
|
17330
|
-
));
|
|
17331
|
-
|
|
17332
|
-
return {
|
|
17333
|
-
warnings: data.warnings,
|
|
17334
|
-
references: data.references,
|
|
17335
|
-
elementsById: data.elementsById
|
|
17336
|
-
};
|
|
17337
|
-
}
|
|
17338
|
-
});
|
|
17339
|
-
|
|
17340
|
-
return event;
|
|
17255
|
+
return self.get('eventBus').createEvent(data);
|
|
17341
17256
|
}
|
|
17342
17257
|
|
|
17343
17258
|
let aggregatedWarnings = [];
|
|
@@ -17415,8 +17330,6 @@
|
|
|
17415
17330
|
}
|
|
17416
17331
|
};
|
|
17417
17332
|
|
|
17418
|
-
BaseViewer.prototype.importXML = wrapForCompatibility(BaseViewer.prototype.importXML);
|
|
17419
|
-
|
|
17420
17333
|
|
|
17421
17334
|
/**
|
|
17422
17335
|
* Import parsed definitions and render a BPMN 2.0 diagram.
|
|
@@ -17447,8 +17360,6 @@
|
|
|
17447
17360
|
return { warnings: result.warnings };
|
|
17448
17361
|
};
|
|
17449
17362
|
|
|
17450
|
-
BaseViewer.prototype.importDefinitions = wrapForCompatibility(BaseViewer.prototype.importDefinitions);
|
|
17451
|
-
|
|
17452
17363
|
|
|
17453
17364
|
/**
|
|
17454
17365
|
* Open diagram of previously imported XML.
|
|
@@ -17510,8 +17421,6 @@
|
|
|
17510
17421
|
return { warnings };
|
|
17511
17422
|
};
|
|
17512
17423
|
|
|
17513
|
-
BaseViewer.prototype.open = wrapForCompatibility(BaseViewer.prototype.open);
|
|
17514
|
-
|
|
17515
17424
|
/**
|
|
17516
17425
|
* Export the currently displayed BPMN 2.0 diagram as
|
|
17517
17426
|
* a BPMN 2.0 XML document.
|
|
@@ -17586,8 +17495,6 @@
|
|
|
17586
17495
|
return result;
|
|
17587
17496
|
};
|
|
17588
17497
|
|
|
17589
|
-
BaseViewer.prototype.saveXML = wrapForCompatibility(BaseViewer.prototype.saveXML);
|
|
17590
|
-
|
|
17591
17498
|
|
|
17592
17499
|
/**
|
|
17593
17500
|
* Export the currently displayed BPMN 2.0 diagram as
|
|
@@ -17655,40 +17562,6 @@
|
|
|
17655
17562
|
return { svg };
|
|
17656
17563
|
};
|
|
17657
17564
|
|
|
17658
|
-
BaseViewer.prototype.saveSVG = wrapForCompatibility(BaseViewer.prototype.saveSVG);
|
|
17659
|
-
|
|
17660
|
-
/**
|
|
17661
|
-
* Get a named diagram service.
|
|
17662
|
-
*
|
|
17663
|
-
* @example
|
|
17664
|
-
*
|
|
17665
|
-
* const elementRegistry = viewer.get('elementRegistry');
|
|
17666
|
-
* const startEventShape = elementRegistry.get('StartEvent_1');
|
|
17667
|
-
*
|
|
17668
|
-
* @param {string} name
|
|
17669
|
-
*
|
|
17670
|
-
* @return {Object} diagram service instance
|
|
17671
|
-
*
|
|
17672
|
-
* @method BaseViewer#get
|
|
17673
|
-
*/
|
|
17674
|
-
|
|
17675
|
-
/**
|
|
17676
|
-
* Invoke a function in the context of this viewer.
|
|
17677
|
-
*
|
|
17678
|
-
* @example
|
|
17679
|
-
*
|
|
17680
|
-
* viewer.invoke(function(elementRegistry) {
|
|
17681
|
-
* const startEventShape = elementRegistry.get('StartEvent_1');
|
|
17682
|
-
* });
|
|
17683
|
-
*
|
|
17684
|
-
* @param {Function} fn to be invoked
|
|
17685
|
-
*
|
|
17686
|
-
* @return {Object} the functions return value
|
|
17687
|
-
*
|
|
17688
|
-
* @method BaseViewer#invoke
|
|
17689
|
-
*/
|
|
17690
|
-
|
|
17691
|
-
|
|
17692
17565
|
BaseViewer.prototype._setDefinitions = function(definitions) {
|
|
17693
17566
|
this._definitions = definitions;
|
|
17694
17567
|
};
|
|
@@ -38311,7 +38184,7 @@
|
|
|
38311
38184
|
property = reference.property;
|
|
38312
38185
|
|
|
38313
38186
|
if (key === descriptor.id) {
|
|
38314
|
-
element
|
|
38187
|
+
element.set(property, businessObject);
|
|
38315
38188
|
|
|
38316
38189
|
array.push(descriptor.id);
|
|
38317
38190
|
}
|
|
@@ -41519,7 +41392,8 @@
|
|
|
41519
41392
|
assign$2(actions, {
|
|
41520
41393
|
'append.text-annotation': appendAction(
|
|
41521
41394
|
'bpmn:TextAnnotation',
|
|
41522
|
-
'bpmn-icon-text-annotation'
|
|
41395
|
+
'bpmn-icon-text-annotation',
|
|
41396
|
+
translate('Append TextAnnotation')
|
|
41523
41397
|
)
|
|
41524
41398
|
});
|
|
41525
41399
|
}
|
|
@@ -41535,7 +41409,8 @@
|
|
|
41535
41409
|
assign$2(actions, {
|
|
41536
41410
|
'append.text-annotation': appendAction(
|
|
41537
41411
|
'bpmn:TextAnnotation',
|
|
41538
|
-
'bpmn-icon-text-annotation'
|
|
41412
|
+
'bpmn-icon-text-annotation',
|
|
41413
|
+
translate('Append TextAnnotation')
|
|
41539
41414
|
),
|
|
41540
41415
|
|
|
41541
41416
|
'connect': {
|
|
@@ -41586,7 +41461,11 @@
|
|
|
41586
41461
|
|
|
41587
41462
|
if (is$6(businessObject, 'bpmn:Group')) {
|
|
41588
41463
|
assign$2(actions, {
|
|
41589
|
-
'append.text-annotation': appendAction(
|
|
41464
|
+
'append.text-annotation': appendAction(
|
|
41465
|
+
'bpmn:TextAnnotation',
|
|
41466
|
+
'bpmn-icon-text-annotation',
|
|
41467
|
+
translate('Append TextAnnotation')
|
|
41468
|
+
)
|
|
41590
41469
|
});
|
|
41591
41470
|
}
|
|
41592
41471
|
|
|
@@ -46707,12 +46586,18 @@
|
|
|
46707
46586
|
var sequenceFlows = [];
|
|
46708
46587
|
|
|
46709
46588
|
if (is$6(source, 'bpmn:EventBasedGateway')) {
|
|
46710
|
-
sequenceFlows = target.incoming
|
|
46589
|
+
sequenceFlows = target.incoming
|
|
46590
|
+
.filter(flow =>
|
|
46591
|
+
flow !== connection &&
|
|
46592
|
+
isSequenceFlow(flow)
|
|
46593
|
+
);
|
|
46711
46594
|
} else {
|
|
46712
|
-
sequenceFlows = target.incoming
|
|
46713
|
-
|
|
46714
|
-
|
|
46715
|
-
|
|
46595
|
+
sequenceFlows = target.incoming
|
|
46596
|
+
.filter(flow =>
|
|
46597
|
+
flow !== connection &&
|
|
46598
|
+
isSequenceFlow(flow) &&
|
|
46599
|
+
is$6(flow.source, 'bpmn:EventBasedGateway')
|
|
46600
|
+
);
|
|
46716
46601
|
}
|
|
46717
46602
|
|
|
46718
46603
|
sequenceFlows.forEach(function(sequenceFlow) {
|
|
@@ -48736,51 +48621,6 @@
|
|
|
48736
48621
|
};
|
|
48737
48622
|
}
|
|
48738
48623
|
|
|
48739
|
-
/**
|
|
48740
|
-
* @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
|
|
48741
|
-
* @typedef {import('diagram-js/lib/features/tooltips/Tooltips').default} Tooltips
|
|
48742
|
-
* @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
|
|
48743
|
-
*/
|
|
48744
|
-
|
|
48745
|
-
var COLLAB_ERR_MSG = 'flow elements must be children of pools/participants';
|
|
48746
|
-
|
|
48747
|
-
/**
|
|
48748
|
-
* @param {EventBus} eventBus
|
|
48749
|
-
* @param {Tooltips} tooltips
|
|
48750
|
-
* @param {Translate} translate
|
|
48751
|
-
*/
|
|
48752
|
-
function ModelingFeedback(eventBus, tooltips, translate) {
|
|
48753
|
-
|
|
48754
|
-
function showError(position, message, timeout) {
|
|
48755
|
-
tooltips.add({
|
|
48756
|
-
position: {
|
|
48757
|
-
x: position.x + 5,
|
|
48758
|
-
y: position.y + 5
|
|
48759
|
-
},
|
|
48760
|
-
type: 'error',
|
|
48761
|
-
timeout: timeout || 2000,
|
|
48762
|
-
html: '<div>' + message + '</div>'
|
|
48763
|
-
});
|
|
48764
|
-
}
|
|
48765
|
-
|
|
48766
|
-
eventBus.on([ 'shape.move.rejected', 'create.rejected' ], function(event) {
|
|
48767
|
-
var context = event.context,
|
|
48768
|
-
shape = context.shape,
|
|
48769
|
-
target = context.target;
|
|
48770
|
-
|
|
48771
|
-
if (is$6(target, 'bpmn:Collaboration') && is$6(shape, 'bpmn:FlowNode')) {
|
|
48772
|
-
showError(event, translate(COLLAB_ERR_MSG));
|
|
48773
|
-
}
|
|
48774
|
-
});
|
|
48775
|
-
|
|
48776
|
-
}
|
|
48777
|
-
|
|
48778
|
-
ModelingFeedback.$inject = [
|
|
48779
|
-
'eventBus',
|
|
48780
|
-
'tooltips',
|
|
48781
|
-
'translate'
|
|
48782
|
-
];
|
|
48783
|
-
|
|
48784
48624
|
/**
|
|
48785
48625
|
* @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
|
|
48786
48626
|
* @typedef {import('../Modeling').default} Modeling
|
|
@@ -50969,7 +50809,6 @@
|
|
|
50969
50809
|
'labelBehavior',
|
|
50970
50810
|
'layoutConnectionBehavior',
|
|
50971
50811
|
'messageFlowBehavior',
|
|
50972
|
-
'modelingFeedback',
|
|
50973
50812
|
'removeElementBehavior',
|
|
50974
50813
|
'removeEmbeddedLabelBoundsBehavior',
|
|
50975
50814
|
'removeParticipantBehavior',
|
|
@@ -51008,7 +50847,6 @@
|
|
|
51008
50847
|
labelBehavior: [ 'type', LabelBehavior ],
|
|
51009
50848
|
layoutConnectionBehavior: [ 'type', LayoutConnectionBehavior ],
|
|
51010
50849
|
messageFlowBehavior: [ 'type', MessageFlowBehavior ],
|
|
51011
|
-
modelingFeedback: [ 'type', ModelingFeedback ],
|
|
51012
50850
|
removeElementBehavior: [ 'type', RemoveElementBehavior ],
|
|
51013
50851
|
removeEmbeddedLabelBoundsBehavior: [ 'type', RemoveEmbeddedLabelBoundsBehavior ],
|
|
51014
50852
|
removeParticipantBehavior: [ 'type', RemoveParticipantBehavior ],
|
|
@@ -54318,393 +54156,6 @@
|
|
|
54318
54156
|
commandStack: [ 'type', CommandStack$1 ]
|
|
54319
54157
|
};
|
|
54320
54158
|
|
|
54321
|
-
/**
|
|
54322
|
-
* @typedef {import('../../core/Canvas').default} Canvas
|
|
54323
|
-
* @typedef {import('../../core/EventBus').default} EventBus
|
|
54324
|
-
*
|
|
54325
|
-
* @typedef {import('../../util/Types').RectTRBL} RectTRBL
|
|
54326
|
-
*
|
|
54327
|
-
* @typedef { {
|
|
54328
|
-
* html: string | HTMLElement;
|
|
54329
|
-
* position: RectTRBL;
|
|
54330
|
-
* show?: {
|
|
54331
|
-
* minZoom?: number;
|
|
54332
|
-
* maxZoom?: number;
|
|
54333
|
-
* };
|
|
54334
|
-
* timeout?: number;
|
|
54335
|
-
* } } Tooltip
|
|
54336
|
-
*/
|
|
54337
|
-
|
|
54338
|
-
// document wide unique tooltip ids
|
|
54339
|
-
var ids$1 = new IdGenerator('tt');
|
|
54340
|
-
|
|
54341
|
-
|
|
54342
|
-
function createRoot(parentNode) {
|
|
54343
|
-
var root = domify$1(
|
|
54344
|
-
'<div class="djs-tooltip-container" />'
|
|
54345
|
-
);
|
|
54346
|
-
|
|
54347
|
-
assign$1(root, {
|
|
54348
|
-
position: 'absolute',
|
|
54349
|
-
width: '0',
|
|
54350
|
-
height: '0'
|
|
54351
|
-
});
|
|
54352
|
-
|
|
54353
|
-
parentNode.insertBefore(root, parentNode.firstChild);
|
|
54354
|
-
|
|
54355
|
-
return root;
|
|
54356
|
-
}
|
|
54357
|
-
|
|
54358
|
-
|
|
54359
|
-
function setPosition(el, x, y) {
|
|
54360
|
-
assign$1(el, { left: x + 'px', top: y + 'px' });
|
|
54361
|
-
}
|
|
54362
|
-
|
|
54363
|
-
function setVisible(el, visible) {
|
|
54364
|
-
el.style.display = visible === false ? 'none' : '';
|
|
54365
|
-
}
|
|
54366
|
-
|
|
54367
|
-
|
|
54368
|
-
var tooltipClass = 'djs-tooltip',
|
|
54369
|
-
tooltipSelector = '.' + tooltipClass;
|
|
54370
|
-
|
|
54371
|
-
/**
|
|
54372
|
-
* A service that allows users to render tool tips on the diagram.
|
|
54373
|
-
*
|
|
54374
|
-
* The tooltip service will take care of updating the tooltip positioning
|
|
54375
|
-
* during navigation + zooming.
|
|
54376
|
-
*
|
|
54377
|
-
* @example
|
|
54378
|
-
*
|
|
54379
|
-
* ```javascript
|
|
54380
|
-
*
|
|
54381
|
-
* // add a pink badge on the top left of the shape
|
|
54382
|
-
* tooltips.add({
|
|
54383
|
-
* position: {
|
|
54384
|
-
* x: 50,
|
|
54385
|
-
* y: 100
|
|
54386
|
-
* },
|
|
54387
|
-
* html: '<div style="width: 10px; background: fuchsia; color: white;">0</div>'
|
|
54388
|
-
* });
|
|
54389
|
-
*
|
|
54390
|
-
* // or with optional life span
|
|
54391
|
-
* tooltips.add({
|
|
54392
|
-
* position: {
|
|
54393
|
-
* top: -5,
|
|
54394
|
-
* left: -5
|
|
54395
|
-
* },
|
|
54396
|
-
* html: '<div style="width: 10px; background: fuchsia; color: white;">0</div>',
|
|
54397
|
-
* ttl: 2000
|
|
54398
|
-
* });
|
|
54399
|
-
*
|
|
54400
|
-
* // remove a tool tip
|
|
54401
|
-
* var id = tooltips.add(...);
|
|
54402
|
-
*
|
|
54403
|
-
* tooltips.remove(id);
|
|
54404
|
-
* ```
|
|
54405
|
-
*
|
|
54406
|
-
* @param {EventBus} eventBus
|
|
54407
|
-
* @param {Canvas} canvas
|
|
54408
|
-
*/
|
|
54409
|
-
function Tooltips(eventBus, canvas) {
|
|
54410
|
-
|
|
54411
|
-
this._eventBus = eventBus;
|
|
54412
|
-
this._canvas = canvas;
|
|
54413
|
-
|
|
54414
|
-
this._ids = ids$1;
|
|
54415
|
-
|
|
54416
|
-
this._tooltipDefaults = {
|
|
54417
|
-
show: {
|
|
54418
|
-
minZoom: 0.7,
|
|
54419
|
-
maxZoom: 5.0
|
|
54420
|
-
}
|
|
54421
|
-
};
|
|
54422
|
-
|
|
54423
|
-
/**
|
|
54424
|
-
* @type {Record<string, Tooltip>}
|
|
54425
|
-
*/
|
|
54426
|
-
this._tooltips = {};
|
|
54427
|
-
|
|
54428
|
-
// root html element for all tooltips
|
|
54429
|
-
this._tooltipRoot = createRoot(canvas.getContainer());
|
|
54430
|
-
|
|
54431
|
-
|
|
54432
|
-
var self = this;
|
|
54433
|
-
|
|
54434
|
-
delegate.bind(this._tooltipRoot, tooltipSelector, 'mousedown', function(event) {
|
|
54435
|
-
event.stopPropagation();
|
|
54436
|
-
});
|
|
54437
|
-
|
|
54438
|
-
delegate.bind(this._tooltipRoot, tooltipSelector, 'mouseover', function(event) {
|
|
54439
|
-
self.trigger('mouseover', event);
|
|
54440
|
-
});
|
|
54441
|
-
|
|
54442
|
-
delegate.bind(this._tooltipRoot, tooltipSelector, 'mouseout', function(event) {
|
|
54443
|
-
self.trigger('mouseout', event);
|
|
54444
|
-
});
|
|
54445
|
-
|
|
54446
|
-
this._init();
|
|
54447
|
-
}
|
|
54448
|
-
|
|
54449
|
-
|
|
54450
|
-
Tooltips.$inject = [ 'eventBus', 'canvas' ];
|
|
54451
|
-
|
|
54452
|
-
|
|
54453
|
-
/**
|
|
54454
|
-
* Adds an HTML tooltip to the diagram.
|
|
54455
|
-
*
|
|
54456
|
-
* @param {Tooltip} tooltip
|
|
54457
|
-
*
|
|
54458
|
-
* @return {string} ID of the tooltip.
|
|
54459
|
-
*/
|
|
54460
|
-
Tooltips.prototype.add = function(tooltip) {
|
|
54461
|
-
|
|
54462
|
-
if (!tooltip.position) {
|
|
54463
|
-
throw new Error('must specifiy tooltip position');
|
|
54464
|
-
}
|
|
54465
|
-
|
|
54466
|
-
if (!tooltip.html) {
|
|
54467
|
-
throw new Error('must specifiy tooltip html');
|
|
54468
|
-
}
|
|
54469
|
-
|
|
54470
|
-
var id = this._ids.next();
|
|
54471
|
-
|
|
54472
|
-
tooltip = assign$2({}, this._tooltipDefaults, tooltip, {
|
|
54473
|
-
id: id
|
|
54474
|
-
});
|
|
54475
|
-
|
|
54476
|
-
this._addTooltip(tooltip);
|
|
54477
|
-
|
|
54478
|
-
if (tooltip.timeout) {
|
|
54479
|
-
this.setTimeout(tooltip);
|
|
54480
|
-
}
|
|
54481
|
-
|
|
54482
|
-
return id;
|
|
54483
|
-
};
|
|
54484
|
-
|
|
54485
|
-
/**
|
|
54486
|
-
* @param {string} action
|
|
54487
|
-
* @param {Event} event
|
|
54488
|
-
*/
|
|
54489
|
-
Tooltips.prototype.trigger = function(action, event) {
|
|
54490
|
-
|
|
54491
|
-
var node = event.delegateTarget || event.target;
|
|
54492
|
-
|
|
54493
|
-
var tooltip = this.get(attr$1(node, 'data-tooltip-id'));
|
|
54494
|
-
|
|
54495
|
-
if (!tooltip) {
|
|
54496
|
-
return;
|
|
54497
|
-
}
|
|
54498
|
-
|
|
54499
|
-
if (action === 'mouseover' && tooltip.timeout) {
|
|
54500
|
-
this.clearTimeout(tooltip);
|
|
54501
|
-
}
|
|
54502
|
-
|
|
54503
|
-
if (action === 'mouseout' && tooltip.timeout) {
|
|
54504
|
-
|
|
54505
|
-
// cut timeout after mouse out
|
|
54506
|
-
tooltip.timeout = 1000;
|
|
54507
|
-
|
|
54508
|
-
this.setTimeout(tooltip);
|
|
54509
|
-
}
|
|
54510
|
-
};
|
|
54511
|
-
|
|
54512
|
-
/**
|
|
54513
|
-
* Get tooltip with given ID.
|
|
54514
|
-
*
|
|
54515
|
-
* @param {Tooltip|string} id
|
|
54516
|
-
*
|
|
54517
|
-
* @return {Tooltip|undefined}
|
|
54518
|
-
*/
|
|
54519
|
-
Tooltips.prototype.get = function(id) {
|
|
54520
|
-
|
|
54521
|
-
if (typeof id !== 'string') {
|
|
54522
|
-
id = id.id;
|
|
54523
|
-
}
|
|
54524
|
-
|
|
54525
|
-
return this._tooltips[id];
|
|
54526
|
-
};
|
|
54527
|
-
|
|
54528
|
-
/**
|
|
54529
|
-
* @param {Tooltip} tooltip
|
|
54530
|
-
*/
|
|
54531
|
-
Tooltips.prototype.clearTimeout = function(tooltip) {
|
|
54532
|
-
|
|
54533
|
-
tooltip = this.get(tooltip);
|
|
54534
|
-
|
|
54535
|
-
if (!tooltip) {
|
|
54536
|
-
return;
|
|
54537
|
-
}
|
|
54538
|
-
|
|
54539
|
-
var removeTimer = tooltip.removeTimer;
|
|
54540
|
-
|
|
54541
|
-
if (removeTimer) {
|
|
54542
|
-
clearTimeout(removeTimer);
|
|
54543
|
-
tooltip.removeTimer = null;
|
|
54544
|
-
}
|
|
54545
|
-
};
|
|
54546
|
-
|
|
54547
|
-
/**
|
|
54548
|
-
* @param {Tooltip} tooltip
|
|
54549
|
-
*/
|
|
54550
|
-
Tooltips.prototype.setTimeout = function(tooltip) {
|
|
54551
|
-
|
|
54552
|
-
tooltip = this.get(tooltip);
|
|
54553
|
-
|
|
54554
|
-
if (!tooltip) {
|
|
54555
|
-
return;
|
|
54556
|
-
}
|
|
54557
|
-
|
|
54558
|
-
this.clearTimeout(tooltip);
|
|
54559
|
-
|
|
54560
|
-
var self = this;
|
|
54561
|
-
|
|
54562
|
-
tooltip.removeTimer = setTimeout(function() {
|
|
54563
|
-
self.remove(tooltip);
|
|
54564
|
-
}, tooltip.timeout);
|
|
54565
|
-
};
|
|
54566
|
-
|
|
54567
|
-
/**
|
|
54568
|
-
* Remove tooltip with given ID.
|
|
54569
|
-
*
|
|
54570
|
-
* @param {string | Tooltip} id
|
|
54571
|
-
*/
|
|
54572
|
-
Tooltips.prototype.remove = function(id) {
|
|
54573
|
-
|
|
54574
|
-
var tooltip = this.get(id);
|
|
54575
|
-
|
|
54576
|
-
if (tooltip) {
|
|
54577
|
-
remove$4(tooltip.html);
|
|
54578
|
-
remove$4(tooltip.htmlContainer);
|
|
54579
|
-
|
|
54580
|
-
delete tooltip.htmlContainer;
|
|
54581
|
-
|
|
54582
|
-
delete this._tooltips[tooltip.id];
|
|
54583
|
-
}
|
|
54584
|
-
};
|
|
54585
|
-
|
|
54586
|
-
|
|
54587
|
-
Tooltips.prototype.show = function() {
|
|
54588
|
-
setVisible(this._tooltipRoot);
|
|
54589
|
-
};
|
|
54590
|
-
|
|
54591
|
-
|
|
54592
|
-
Tooltips.prototype.hide = function() {
|
|
54593
|
-
setVisible(this._tooltipRoot, false);
|
|
54594
|
-
};
|
|
54595
|
-
|
|
54596
|
-
|
|
54597
|
-
Tooltips.prototype._updateRoot = function(viewbox) {
|
|
54598
|
-
var a = viewbox.scale || 1;
|
|
54599
|
-
var d = viewbox.scale || 1;
|
|
54600
|
-
|
|
54601
|
-
var matrix = 'matrix(' + a + ',0,0,' + d + ',' + (-1 * viewbox.x * a) + ',' + (-1 * viewbox.y * d) + ')';
|
|
54602
|
-
|
|
54603
|
-
this._tooltipRoot.style.transform = matrix;
|
|
54604
|
-
this._tooltipRoot.style['-ms-transform'] = matrix;
|
|
54605
|
-
};
|
|
54606
|
-
|
|
54607
|
-
|
|
54608
|
-
Tooltips.prototype._addTooltip = function(tooltip) {
|
|
54609
|
-
|
|
54610
|
-
var id = tooltip.id,
|
|
54611
|
-
html = tooltip.html,
|
|
54612
|
-
htmlContainer,
|
|
54613
|
-
tooltipRoot = this._tooltipRoot;
|
|
54614
|
-
|
|
54615
|
-
// unwrap jquery (for those who need it)
|
|
54616
|
-
if (html.get && html.constructor.prototype.jquery) {
|
|
54617
|
-
html = html.get(0);
|
|
54618
|
-
}
|
|
54619
|
-
|
|
54620
|
-
// create proper html elements from
|
|
54621
|
-
// tooltip HTML strings
|
|
54622
|
-
if (isString$2(html)) {
|
|
54623
|
-
html = domify$1(html);
|
|
54624
|
-
}
|
|
54625
|
-
|
|
54626
|
-
htmlContainer = domify$1('<div data-tooltip-id="' + id + '" class="' + tooltipClass + '">');
|
|
54627
|
-
assign$1(htmlContainer, { position: 'absolute' });
|
|
54628
|
-
|
|
54629
|
-
htmlContainer.appendChild(html);
|
|
54630
|
-
|
|
54631
|
-
if (tooltip.type) {
|
|
54632
|
-
classes$1(htmlContainer).add('djs-tooltip-' + tooltip.type);
|
|
54633
|
-
}
|
|
54634
|
-
|
|
54635
|
-
if (tooltip.className) {
|
|
54636
|
-
classes$1(htmlContainer).add(tooltip.className);
|
|
54637
|
-
}
|
|
54638
|
-
|
|
54639
|
-
tooltip.htmlContainer = htmlContainer;
|
|
54640
|
-
|
|
54641
|
-
tooltipRoot.appendChild(htmlContainer);
|
|
54642
|
-
|
|
54643
|
-
this._tooltips[id] = tooltip;
|
|
54644
|
-
|
|
54645
|
-
this._updateTooltip(tooltip);
|
|
54646
|
-
};
|
|
54647
|
-
|
|
54648
|
-
|
|
54649
|
-
Tooltips.prototype._updateTooltip = function(tooltip) {
|
|
54650
|
-
|
|
54651
|
-
var position = tooltip.position,
|
|
54652
|
-
htmlContainer = tooltip.htmlContainer;
|
|
54653
|
-
|
|
54654
|
-
// update overlay html based on tooltip x, y
|
|
54655
|
-
|
|
54656
|
-
setPosition(htmlContainer, position.x, position.y);
|
|
54657
|
-
};
|
|
54658
|
-
|
|
54659
|
-
|
|
54660
|
-
Tooltips.prototype._updateTooltipVisibilty = function(viewbox) {
|
|
54661
|
-
|
|
54662
|
-
forEach$2(this._tooltips, function(tooltip) {
|
|
54663
|
-
var show = tooltip.show,
|
|
54664
|
-
htmlContainer = tooltip.htmlContainer,
|
|
54665
|
-
visible = true;
|
|
54666
|
-
|
|
54667
|
-
if (show) {
|
|
54668
|
-
if (show.minZoom > viewbox.scale ||
|
|
54669
|
-
show.maxZoom < viewbox.scale) {
|
|
54670
|
-
visible = false;
|
|
54671
|
-
}
|
|
54672
|
-
|
|
54673
|
-
setVisible(htmlContainer, visible);
|
|
54674
|
-
}
|
|
54675
|
-
});
|
|
54676
|
-
};
|
|
54677
|
-
|
|
54678
|
-
Tooltips.prototype._init = function() {
|
|
54679
|
-
|
|
54680
|
-
var self = this;
|
|
54681
|
-
|
|
54682
|
-
// scroll/zoom integration
|
|
54683
|
-
|
|
54684
|
-
function updateViewbox(viewbox) {
|
|
54685
|
-
self._updateRoot(viewbox);
|
|
54686
|
-
self._updateTooltipVisibilty(viewbox);
|
|
54687
|
-
|
|
54688
|
-
self.show();
|
|
54689
|
-
}
|
|
54690
|
-
|
|
54691
|
-
this._eventBus.on('canvas.viewbox.changing', function(event) {
|
|
54692
|
-
self.hide();
|
|
54693
|
-
});
|
|
54694
|
-
|
|
54695
|
-
this._eventBus.on('canvas.viewbox.changed', function(event) {
|
|
54696
|
-
updateViewbox(event.viewbox);
|
|
54697
|
-
});
|
|
54698
|
-
};
|
|
54699
|
-
|
|
54700
|
-
/**
|
|
54701
|
-
* @type { import('didi').ModuleDeclaration }
|
|
54702
|
-
*/
|
|
54703
|
-
var TooltipsModule = {
|
|
54704
|
-
__init__: [ 'tooltips' ],
|
|
54705
|
-
tooltips: [ 'type', Tooltips ]
|
|
54706
|
-
};
|
|
54707
|
-
|
|
54708
54159
|
/**
|
|
54709
54160
|
* Remove from the beginning of a collection until it is empty.
|
|
54710
54161
|
*
|
|
@@ -61944,299 +61395,740 @@
|
|
|
61944
61395
|
return matches && matches[0];
|
|
61945
61396
|
}
|
|
61946
61397
|
|
|
61947
|
-
function isOppositeOrientation(a, b) {
|
|
61948
|
-
return oppositeOrientationMapping[a] === b;
|
|
61949
|
-
}
|
|
61398
|
+
function isOppositeOrientation(a, b) {
|
|
61399
|
+
return oppositeOrientationMapping[a] === b;
|
|
61400
|
+
}
|
|
61401
|
+
|
|
61402
|
+
function isOppositeHorizontalOrientation(a, b) {
|
|
61403
|
+
var horizontalOrientation = getHorizontalOrientation(a);
|
|
61404
|
+
|
|
61405
|
+
var oppositeHorizontalOrientation = oppositeOrientationMapping[horizontalOrientation];
|
|
61406
|
+
|
|
61407
|
+
return b.indexOf(oppositeHorizontalOrientation) !== -1;
|
|
61408
|
+
}
|
|
61409
|
+
|
|
61410
|
+
function isOppositeVerticalOrientation(a, b) {
|
|
61411
|
+
var verticalOrientation = getVerticalOrientation(a);
|
|
61412
|
+
|
|
61413
|
+
var oppositeVerticalOrientation = oppositeOrientationMapping[verticalOrientation];
|
|
61414
|
+
|
|
61415
|
+
return b.indexOf(oppositeVerticalOrientation) !== -1;
|
|
61416
|
+
}
|
|
61417
|
+
|
|
61418
|
+
function isHorizontalOrientation(orientation) {
|
|
61419
|
+
return orientation === 'right' || orientation === 'left';
|
|
61420
|
+
}
|
|
61421
|
+
|
|
61422
|
+
function getLoopPreferredLayout(source, connection) {
|
|
61423
|
+
var waypoints = connection.waypoints;
|
|
61424
|
+
|
|
61425
|
+
var orientation = waypoints && waypoints.length && getOrientation(waypoints[0], source);
|
|
61426
|
+
|
|
61427
|
+
if (orientation === 'top') {
|
|
61428
|
+
return [ 't:r' ];
|
|
61429
|
+
} else if (orientation === 'right') {
|
|
61430
|
+
return [ 'r:b' ];
|
|
61431
|
+
} else if (orientation === 'left') {
|
|
61432
|
+
return [ 'l:t' ];
|
|
61433
|
+
}
|
|
61434
|
+
|
|
61435
|
+
return [ 'b:l' ];
|
|
61436
|
+
}
|
|
61437
|
+
|
|
61438
|
+
function getBoundaryEventPreferredLayouts(source, target, end) {
|
|
61439
|
+
var sourceMid = getMid(source),
|
|
61440
|
+
targetMid = getMid(target),
|
|
61441
|
+
attachOrientation = getAttachOrientation(source),
|
|
61442
|
+
sourceLayout,
|
|
61443
|
+
targetLayout;
|
|
61444
|
+
|
|
61445
|
+
var isLoop = isSame(source.host, target);
|
|
61446
|
+
|
|
61447
|
+
var attachedToSide = isAnyOrientation(attachOrientation, [ 'top', 'right', 'bottom', 'left' ]);
|
|
61448
|
+
|
|
61449
|
+
var targetOrientation = getOrientation(targetMid, sourceMid, {
|
|
61450
|
+
x: source.width / 2 + target.width / 2,
|
|
61451
|
+
y: source.height / 2 + target.height / 2
|
|
61452
|
+
});
|
|
61453
|
+
|
|
61454
|
+
if (isLoop) {
|
|
61455
|
+
return getBoundaryEventLoopLayout(attachOrientation, attachedToSide, source, target, end);
|
|
61456
|
+
}
|
|
61457
|
+
|
|
61458
|
+
// source layout
|
|
61459
|
+
sourceLayout = getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide);
|
|
61460
|
+
|
|
61461
|
+
// target layout
|
|
61462
|
+
targetLayout = getBoundaryEventTargetLayout(attachOrientation, targetOrientation, attachedToSide);
|
|
61463
|
+
|
|
61464
|
+
return [ sourceLayout + ':' + targetLayout ];
|
|
61465
|
+
}
|
|
61466
|
+
|
|
61467
|
+
function getBoundaryEventLoopLayout(attachOrientation, attachedToSide, source, target, end) {
|
|
61468
|
+
var orientation = attachedToSide ? attachOrientation : getVerticalOrientation(attachOrientation),
|
|
61469
|
+
sourceLayout = orientationDirectionMapping[ orientation ],
|
|
61470
|
+
targetLayout;
|
|
61471
|
+
|
|
61472
|
+
if (attachedToSide) {
|
|
61473
|
+
if (isHorizontalOrientation(attachOrientation)) {
|
|
61474
|
+
targetLayout = shouldConnectToSameSide('y', source, target, end) ? 'h' : 'b';
|
|
61475
|
+
} else {
|
|
61476
|
+
targetLayout = shouldConnectToSameSide('x', source, target, end) ? 'v' : 'l';
|
|
61477
|
+
}
|
|
61478
|
+
} else {
|
|
61479
|
+
targetLayout = 'v';
|
|
61480
|
+
}
|
|
61481
|
+
|
|
61482
|
+
return [ sourceLayout + ':' + targetLayout ];
|
|
61483
|
+
}
|
|
61484
|
+
|
|
61485
|
+
function shouldConnectToSameSide(axis, source, target, end) {
|
|
61486
|
+
var threshold = BOUNDARY_TO_HOST_THRESHOLD$1;
|
|
61487
|
+
|
|
61488
|
+
return !(
|
|
61489
|
+
areCloseOnAxis(axis, end, target, threshold) ||
|
|
61490
|
+
areCloseOnAxis(axis, end, {
|
|
61491
|
+
x: target.x + target.width,
|
|
61492
|
+
y: target.y + target.height
|
|
61493
|
+
}, threshold) ||
|
|
61494
|
+
areCloseOnAxis(axis, end, getMid(source), threshold)
|
|
61495
|
+
);
|
|
61496
|
+
}
|
|
61497
|
+
|
|
61498
|
+
function areCloseOnAxis(axis, a, b, threshold) {
|
|
61499
|
+
return Math.abs(a[ axis ] - b[ axis ]) < threshold;
|
|
61500
|
+
}
|
|
61501
|
+
|
|
61502
|
+
function getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide) {
|
|
61503
|
+
|
|
61504
|
+
// attached to either top, right, bottom or left side
|
|
61505
|
+
if (attachedToSide) {
|
|
61506
|
+
return orientationDirectionMapping[ attachOrientation ];
|
|
61507
|
+
}
|
|
61508
|
+
|
|
61509
|
+
// attached to either top-right, top-left, bottom-right or bottom-left corner
|
|
61510
|
+
|
|
61511
|
+
// same vertical or opposite horizontal orientation
|
|
61512
|
+
if (isSame(
|
|
61513
|
+
getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)
|
|
61514
|
+
) || isOppositeOrientation(
|
|
61515
|
+
getHorizontalOrientation(attachOrientation), getHorizontalOrientation(targetOrientation)
|
|
61516
|
+
)) {
|
|
61517
|
+
return orientationDirectionMapping[ getVerticalOrientation(attachOrientation) ];
|
|
61518
|
+
}
|
|
61519
|
+
|
|
61520
|
+
// fallback
|
|
61521
|
+
return orientationDirectionMapping[ getHorizontalOrientation(attachOrientation) ];
|
|
61522
|
+
}
|
|
61523
|
+
|
|
61524
|
+
function getBoundaryEventTargetLayout(attachOrientation, targetOrientation, attachedToSide) {
|
|
61525
|
+
|
|
61526
|
+
// attached to either top, right, bottom or left side
|
|
61527
|
+
if (attachedToSide) {
|
|
61528
|
+
if (isHorizontalOrientation(attachOrientation)) {
|
|
61529
|
+
|
|
61530
|
+
// orientation is right or left
|
|
61531
|
+
|
|
61532
|
+
// opposite horizontal orientation or same orientation
|
|
61533
|
+
if (
|
|
61534
|
+
isOppositeHorizontalOrientation(attachOrientation, targetOrientation) ||
|
|
61535
|
+
isSame(attachOrientation, targetOrientation)
|
|
61536
|
+
) {
|
|
61537
|
+
return 'h';
|
|
61538
|
+
}
|
|
61539
|
+
|
|
61540
|
+
// fallback
|
|
61541
|
+
return 'v';
|
|
61542
|
+
} else {
|
|
61543
|
+
|
|
61544
|
+
// orientation is top or bottom
|
|
61545
|
+
|
|
61546
|
+
// opposite vertical orientation or same orientation
|
|
61547
|
+
if (
|
|
61548
|
+
isOppositeVerticalOrientation(attachOrientation, targetOrientation) ||
|
|
61549
|
+
isSame(attachOrientation, targetOrientation)
|
|
61550
|
+
) {
|
|
61551
|
+
return 'v';
|
|
61552
|
+
}
|
|
61553
|
+
|
|
61554
|
+
// fallback
|
|
61555
|
+
return 'h';
|
|
61556
|
+
}
|
|
61557
|
+
}
|
|
61558
|
+
|
|
61559
|
+
// attached to either top-right, top-left, bottom-right or bottom-left corner
|
|
61560
|
+
|
|
61561
|
+
// orientation is right, left
|
|
61562
|
+
// or same vertical orientation but also right or left
|
|
61563
|
+
if (isHorizontalOrientation(targetOrientation) ||
|
|
61564
|
+
(isSame(getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)) &&
|
|
61565
|
+
getHorizontalOrientation(targetOrientation))) {
|
|
61566
|
+
return 'h';
|
|
61567
|
+
} else {
|
|
61568
|
+
return 'v';
|
|
61569
|
+
}
|
|
61570
|
+
}
|
|
61571
|
+
|
|
61572
|
+
/**
|
|
61573
|
+
* @typedef {import('../core/ElementRegistry').default} ElementRegistry
|
|
61574
|
+
* @typedef {import('../core/GraphicsFactory').default} GraphicsFactory
|
|
61575
|
+
*/
|
|
61576
|
+
|
|
61577
|
+
function dockingToPoint(docking) {
|
|
61578
|
+
|
|
61579
|
+
// use the dockings actual point and
|
|
61580
|
+
// retain the original docking
|
|
61581
|
+
return assign$2({ original: docking.point.original || docking.point }, docking.actual);
|
|
61582
|
+
}
|
|
61583
|
+
|
|
61584
|
+
|
|
61585
|
+
/**
|
|
61586
|
+
* A {@link ConnectionDocking} that crops connection waypoints based on
|
|
61587
|
+
* the path(s) of the connection source and target.
|
|
61588
|
+
*
|
|
61589
|
+
* @param {ElementRegistry} elementRegistry
|
|
61590
|
+
* @param {GraphicsFactory} graphicsFactory
|
|
61591
|
+
*/
|
|
61592
|
+
function CroppingConnectionDocking(elementRegistry, graphicsFactory) {
|
|
61593
|
+
this._elementRegistry = elementRegistry;
|
|
61594
|
+
this._graphicsFactory = graphicsFactory;
|
|
61595
|
+
}
|
|
61596
|
+
|
|
61597
|
+
CroppingConnectionDocking.$inject = [ 'elementRegistry', 'graphicsFactory' ];
|
|
61598
|
+
|
|
61599
|
+
|
|
61600
|
+
/**
|
|
61601
|
+
* @inheritDoc ConnectionDocking#getCroppedWaypoints
|
|
61602
|
+
*/
|
|
61603
|
+
CroppingConnectionDocking.prototype.getCroppedWaypoints = function(connection, source, target) {
|
|
61604
|
+
|
|
61605
|
+
source = source || connection.source;
|
|
61606
|
+
target = target || connection.target;
|
|
61607
|
+
|
|
61608
|
+
var sourceDocking = this.getDockingPoint(connection, source, true),
|
|
61609
|
+
targetDocking = this.getDockingPoint(connection, target);
|
|
61610
|
+
|
|
61611
|
+
var croppedWaypoints = connection.waypoints.slice(sourceDocking.idx + 1, targetDocking.idx);
|
|
61612
|
+
|
|
61613
|
+
croppedWaypoints.unshift(dockingToPoint(sourceDocking));
|
|
61614
|
+
croppedWaypoints.push(dockingToPoint(targetDocking));
|
|
61615
|
+
|
|
61616
|
+
return croppedWaypoints;
|
|
61617
|
+
};
|
|
61618
|
+
|
|
61619
|
+
/**
|
|
61620
|
+
* Return the connection docking point on the specified shape
|
|
61621
|
+
*
|
|
61622
|
+
* @inheritDoc ConnectionDocking#getDockingPoint
|
|
61623
|
+
*/
|
|
61624
|
+
CroppingConnectionDocking.prototype.getDockingPoint = function(connection, shape, dockStart) {
|
|
61625
|
+
|
|
61626
|
+
var waypoints = connection.waypoints,
|
|
61627
|
+
dockingIdx,
|
|
61628
|
+
dockingPoint,
|
|
61629
|
+
croppedPoint;
|
|
61630
|
+
|
|
61631
|
+
dockingIdx = dockStart ? 0 : waypoints.length - 1;
|
|
61632
|
+
dockingPoint = waypoints[dockingIdx];
|
|
61633
|
+
|
|
61634
|
+
croppedPoint = this._getIntersection(shape, connection, dockStart);
|
|
61635
|
+
|
|
61636
|
+
return {
|
|
61637
|
+
point: dockingPoint,
|
|
61638
|
+
actual: croppedPoint || dockingPoint,
|
|
61639
|
+
idx: dockingIdx
|
|
61640
|
+
};
|
|
61641
|
+
};
|
|
61642
|
+
|
|
61643
|
+
|
|
61644
|
+
// helpers //////////////////////
|
|
61645
|
+
|
|
61646
|
+
CroppingConnectionDocking.prototype._getIntersection = function(shape, connection, takeFirst) {
|
|
61647
|
+
|
|
61648
|
+
var shapePath = this._getShapePath(shape),
|
|
61649
|
+
connectionPath = this._getConnectionPath(connection);
|
|
61650
|
+
|
|
61651
|
+
return getElementLineIntersection(shapePath, connectionPath, takeFirst);
|
|
61652
|
+
};
|
|
61653
|
+
|
|
61654
|
+
CroppingConnectionDocking.prototype._getConnectionPath = function(connection) {
|
|
61655
|
+
return this._graphicsFactory.getConnectionPath(connection);
|
|
61656
|
+
};
|
|
61657
|
+
|
|
61658
|
+
CroppingConnectionDocking.prototype._getShapePath = function(shape) {
|
|
61659
|
+
return this._graphicsFactory.getShapePath(shape);
|
|
61660
|
+
};
|
|
61661
|
+
|
|
61662
|
+
CroppingConnectionDocking.prototype._getGfx = function(element) {
|
|
61663
|
+
return this._elementRegistry.getGraphics(element);
|
|
61664
|
+
};
|
|
61665
|
+
|
|
61666
|
+
var ModelingModule = {
|
|
61667
|
+
__init__: [
|
|
61668
|
+
'modeling',
|
|
61669
|
+
'bpmnUpdater'
|
|
61670
|
+
],
|
|
61671
|
+
__depends__: [
|
|
61672
|
+
BehaviorModule,
|
|
61673
|
+
RulesModule,
|
|
61674
|
+
DiOrderingModule,
|
|
61675
|
+
OrderingModule,
|
|
61676
|
+
ReplaceModule,
|
|
61677
|
+
CommandModule,
|
|
61678
|
+
LabelSupportModule,
|
|
61679
|
+
AttachSupportModule,
|
|
61680
|
+
SelectionModule,
|
|
61681
|
+
ChangeSupportModule,
|
|
61682
|
+
SpaceToolModule
|
|
61683
|
+
],
|
|
61684
|
+
bpmnFactory: [ 'type', BpmnFactory ],
|
|
61685
|
+
bpmnUpdater: [ 'type', BpmnUpdater ],
|
|
61686
|
+
elementFactory: [ 'type', ElementFactory ],
|
|
61687
|
+
modeling: [ 'type', Modeling ],
|
|
61688
|
+
layouter: [ 'type', BpmnLayouter ],
|
|
61689
|
+
connectionDocking: [ 'type', CroppingConnectionDocking ]
|
|
61690
|
+
};
|
|
61691
|
+
|
|
61692
|
+
/**
|
|
61693
|
+
* @typedef {import('../../core/Canvas').default} Canvas
|
|
61694
|
+
* @typedef {import('../../core/EventBus').default} EventBus
|
|
61695
|
+
*
|
|
61696
|
+
* @typedef {import('../../util/Types').RectTRBL} RectTRBL
|
|
61697
|
+
*
|
|
61698
|
+
* @typedef { {
|
|
61699
|
+
* html: string | HTMLElement;
|
|
61700
|
+
* position: RectTRBL;
|
|
61701
|
+
* show?: {
|
|
61702
|
+
* minZoom?: number;
|
|
61703
|
+
* maxZoom?: number;
|
|
61704
|
+
* };
|
|
61705
|
+
* timeout?: number;
|
|
61706
|
+
* } } Tooltip
|
|
61707
|
+
*/
|
|
61708
|
+
|
|
61709
|
+
// document wide unique tooltip ids
|
|
61710
|
+
var ids$1 = new IdGenerator('tt');
|
|
61711
|
+
|
|
61712
|
+
|
|
61713
|
+
function createRoot(parentNode) {
|
|
61714
|
+
var root = domify$1(
|
|
61715
|
+
'<div class="djs-tooltip-container" />'
|
|
61716
|
+
);
|
|
61717
|
+
|
|
61718
|
+
assign$1(root, {
|
|
61719
|
+
position: 'absolute',
|
|
61720
|
+
width: '0',
|
|
61721
|
+
height: '0'
|
|
61722
|
+
});
|
|
61723
|
+
|
|
61724
|
+
parentNode.insertBefore(root, parentNode.firstChild);
|
|
61725
|
+
|
|
61726
|
+
return root;
|
|
61727
|
+
}
|
|
61728
|
+
|
|
61729
|
+
|
|
61730
|
+
function setPosition(el, x, y) {
|
|
61731
|
+
assign$1(el, { left: x + 'px', top: y + 'px' });
|
|
61732
|
+
}
|
|
61733
|
+
|
|
61734
|
+
function setVisible(el, visible) {
|
|
61735
|
+
el.style.display = visible === false ? 'none' : '';
|
|
61736
|
+
}
|
|
61737
|
+
|
|
61738
|
+
|
|
61739
|
+
var tooltipClass = 'djs-tooltip',
|
|
61740
|
+
tooltipSelector = '.' + tooltipClass;
|
|
61741
|
+
|
|
61742
|
+
/**
|
|
61743
|
+
* A service that allows users to render tool tips on the diagram.
|
|
61744
|
+
*
|
|
61745
|
+
* The tooltip service will take care of updating the tooltip positioning
|
|
61746
|
+
* during navigation + zooming.
|
|
61747
|
+
*
|
|
61748
|
+
* @example
|
|
61749
|
+
*
|
|
61750
|
+
* ```javascript
|
|
61751
|
+
*
|
|
61752
|
+
* // add a pink badge on the top left of the shape
|
|
61753
|
+
* tooltips.add({
|
|
61754
|
+
* position: {
|
|
61755
|
+
* x: 50,
|
|
61756
|
+
* y: 100
|
|
61757
|
+
* },
|
|
61758
|
+
* html: '<div style="width: 10px; background: fuchsia; color: white;">0</div>'
|
|
61759
|
+
* });
|
|
61760
|
+
*
|
|
61761
|
+
* // or with optional life span
|
|
61762
|
+
* tooltips.add({
|
|
61763
|
+
* position: {
|
|
61764
|
+
* top: -5,
|
|
61765
|
+
* left: -5
|
|
61766
|
+
* },
|
|
61767
|
+
* html: '<div style="width: 10px; background: fuchsia; color: white;">0</div>',
|
|
61768
|
+
* ttl: 2000
|
|
61769
|
+
* });
|
|
61770
|
+
*
|
|
61771
|
+
* // remove a tool tip
|
|
61772
|
+
* var id = tooltips.add(...);
|
|
61773
|
+
*
|
|
61774
|
+
* tooltips.remove(id);
|
|
61775
|
+
* ```
|
|
61776
|
+
*
|
|
61777
|
+
* @param {EventBus} eventBus
|
|
61778
|
+
* @param {Canvas} canvas
|
|
61779
|
+
*/
|
|
61780
|
+
function Tooltips(eventBus, canvas) {
|
|
61781
|
+
|
|
61782
|
+
this._eventBus = eventBus;
|
|
61783
|
+
this._canvas = canvas;
|
|
61784
|
+
|
|
61785
|
+
this._ids = ids$1;
|
|
61786
|
+
|
|
61787
|
+
this._tooltipDefaults = {
|
|
61788
|
+
show: {
|
|
61789
|
+
minZoom: 0.7,
|
|
61790
|
+
maxZoom: 5.0
|
|
61791
|
+
}
|
|
61792
|
+
};
|
|
61793
|
+
|
|
61794
|
+
/**
|
|
61795
|
+
* @type {Record<string, Tooltip>}
|
|
61796
|
+
*/
|
|
61797
|
+
this._tooltips = {};
|
|
61798
|
+
|
|
61799
|
+
// root html element for all tooltips
|
|
61800
|
+
this._tooltipRoot = createRoot(canvas.getContainer());
|
|
61801
|
+
|
|
61802
|
+
|
|
61803
|
+
var self = this;
|
|
61804
|
+
|
|
61805
|
+
delegate.bind(this._tooltipRoot, tooltipSelector, 'mousedown', function(event) {
|
|
61806
|
+
event.stopPropagation();
|
|
61807
|
+
});
|
|
61808
|
+
|
|
61809
|
+
delegate.bind(this._tooltipRoot, tooltipSelector, 'mouseover', function(event) {
|
|
61810
|
+
self.trigger('mouseover', event);
|
|
61811
|
+
});
|
|
61812
|
+
|
|
61813
|
+
delegate.bind(this._tooltipRoot, tooltipSelector, 'mouseout', function(event) {
|
|
61814
|
+
self.trigger('mouseout', event);
|
|
61815
|
+
});
|
|
61816
|
+
|
|
61817
|
+
this._init();
|
|
61818
|
+
}
|
|
61819
|
+
|
|
61820
|
+
|
|
61821
|
+
Tooltips.$inject = [ 'eventBus', 'canvas' ];
|
|
61822
|
+
|
|
61823
|
+
|
|
61824
|
+
/**
|
|
61825
|
+
* Adds an HTML tooltip to the diagram.
|
|
61826
|
+
*
|
|
61827
|
+
* @param {Tooltip} tooltip
|
|
61828
|
+
*
|
|
61829
|
+
* @return {string} ID of the tooltip.
|
|
61830
|
+
*/
|
|
61831
|
+
Tooltips.prototype.add = function(tooltip) {
|
|
61832
|
+
|
|
61833
|
+
if (!tooltip.position) {
|
|
61834
|
+
throw new Error('must specifiy tooltip position');
|
|
61835
|
+
}
|
|
61836
|
+
|
|
61837
|
+
if (!tooltip.html) {
|
|
61838
|
+
throw new Error('must specifiy tooltip html');
|
|
61839
|
+
}
|
|
61840
|
+
|
|
61841
|
+
var id = this._ids.next();
|
|
61842
|
+
|
|
61843
|
+
tooltip = assign$2({}, this._tooltipDefaults, tooltip, {
|
|
61844
|
+
id: id
|
|
61845
|
+
});
|
|
61846
|
+
|
|
61847
|
+
this._addTooltip(tooltip);
|
|
61950
61848
|
|
|
61951
|
-
|
|
61952
|
-
|
|
61849
|
+
if (tooltip.timeout) {
|
|
61850
|
+
this.setTimeout(tooltip);
|
|
61851
|
+
}
|
|
61953
61852
|
|
|
61954
|
-
|
|
61853
|
+
return id;
|
|
61854
|
+
};
|
|
61955
61855
|
|
|
61956
|
-
|
|
61957
|
-
|
|
61856
|
+
/**
|
|
61857
|
+
* @param {string} action
|
|
61858
|
+
* @param {Event} event
|
|
61859
|
+
*/
|
|
61860
|
+
Tooltips.prototype.trigger = function(action, event) {
|
|
61958
61861
|
|
|
61959
|
-
|
|
61960
|
-
var verticalOrientation = getVerticalOrientation(a);
|
|
61862
|
+
var node = event.delegateTarget || event.target;
|
|
61961
61863
|
|
|
61962
|
-
var
|
|
61864
|
+
var tooltip = this.get(attr$1(node, 'data-tooltip-id'));
|
|
61963
61865
|
|
|
61964
|
-
|
|
61965
|
-
|
|
61866
|
+
if (!tooltip) {
|
|
61867
|
+
return;
|
|
61868
|
+
}
|
|
61966
61869
|
|
|
61967
|
-
|
|
61968
|
-
|
|
61969
|
-
|
|
61870
|
+
if (action === 'mouseover' && tooltip.timeout) {
|
|
61871
|
+
this.clearTimeout(tooltip);
|
|
61872
|
+
}
|
|
61970
61873
|
|
|
61971
|
-
|
|
61972
|
-
var waypoints = connection.waypoints;
|
|
61874
|
+
if (action === 'mouseout' && tooltip.timeout) {
|
|
61973
61875
|
|
|
61974
|
-
|
|
61876
|
+
// cut timeout after mouse out
|
|
61877
|
+
tooltip.timeout = 1000;
|
|
61975
61878
|
|
|
61976
|
-
|
|
61977
|
-
return [ 't:r' ];
|
|
61978
|
-
} else if (orientation === 'right') {
|
|
61979
|
-
return [ 'r:b' ];
|
|
61980
|
-
} else if (orientation === 'left') {
|
|
61981
|
-
return [ 'l:t' ];
|
|
61879
|
+
this.setTimeout(tooltip);
|
|
61982
61880
|
}
|
|
61881
|
+
};
|
|
61983
61882
|
|
|
61984
|
-
|
|
61985
|
-
|
|
61883
|
+
/**
|
|
61884
|
+
* Get tooltip with given ID.
|
|
61885
|
+
*
|
|
61886
|
+
* @param {Tooltip|string} id
|
|
61887
|
+
*
|
|
61888
|
+
* @return {Tooltip|undefined}
|
|
61889
|
+
*/
|
|
61890
|
+
Tooltips.prototype.get = function(id) {
|
|
61986
61891
|
|
|
61987
|
-
|
|
61988
|
-
|
|
61989
|
-
|
|
61990
|
-
attachOrientation = getAttachOrientation(source),
|
|
61991
|
-
sourceLayout,
|
|
61992
|
-
targetLayout;
|
|
61892
|
+
if (typeof id !== 'string') {
|
|
61893
|
+
id = id.id;
|
|
61894
|
+
}
|
|
61993
61895
|
|
|
61994
|
-
|
|
61896
|
+
return this._tooltips[id];
|
|
61897
|
+
};
|
|
61995
61898
|
|
|
61996
|
-
|
|
61899
|
+
/**
|
|
61900
|
+
* @param {Tooltip} tooltip
|
|
61901
|
+
*/
|
|
61902
|
+
Tooltips.prototype.clearTimeout = function(tooltip) {
|
|
61997
61903
|
|
|
61998
|
-
|
|
61999
|
-
x: source.width / 2 + target.width / 2,
|
|
62000
|
-
y: source.height / 2 + target.height / 2
|
|
62001
|
-
});
|
|
61904
|
+
tooltip = this.get(tooltip);
|
|
62002
61905
|
|
|
62003
|
-
if (
|
|
62004
|
-
return
|
|
61906
|
+
if (!tooltip) {
|
|
61907
|
+
return;
|
|
62005
61908
|
}
|
|
62006
61909
|
|
|
62007
|
-
|
|
62008
|
-
sourceLayout = getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide);
|
|
61910
|
+
var removeTimer = tooltip.removeTimer;
|
|
62009
61911
|
|
|
62010
|
-
|
|
62011
|
-
|
|
61912
|
+
if (removeTimer) {
|
|
61913
|
+
clearTimeout(removeTimer);
|
|
61914
|
+
tooltip.removeTimer = null;
|
|
61915
|
+
}
|
|
61916
|
+
};
|
|
62012
61917
|
|
|
62013
|
-
|
|
62014
|
-
|
|
61918
|
+
/**
|
|
61919
|
+
* @param {Tooltip} tooltip
|
|
61920
|
+
*/
|
|
61921
|
+
Tooltips.prototype.setTimeout = function(tooltip) {
|
|
62015
61922
|
|
|
62016
|
-
|
|
62017
|
-
var orientation = attachedToSide ? attachOrientation : getVerticalOrientation(attachOrientation),
|
|
62018
|
-
sourceLayout = orientationDirectionMapping[ orientation ],
|
|
62019
|
-
targetLayout;
|
|
61923
|
+
tooltip = this.get(tooltip);
|
|
62020
61924
|
|
|
62021
|
-
if (
|
|
62022
|
-
|
|
62023
|
-
targetLayout = shouldConnectToSameSide('y', source, target, end) ? 'h' : 'b';
|
|
62024
|
-
} else {
|
|
62025
|
-
targetLayout = shouldConnectToSameSide('x', source, target, end) ? 'v' : 'l';
|
|
62026
|
-
}
|
|
62027
|
-
} else {
|
|
62028
|
-
targetLayout = 'v';
|
|
61925
|
+
if (!tooltip) {
|
|
61926
|
+
return;
|
|
62029
61927
|
}
|
|
62030
61928
|
|
|
62031
|
-
|
|
62032
|
-
}
|
|
61929
|
+
this.clearTimeout(tooltip);
|
|
62033
61930
|
|
|
62034
|
-
|
|
62035
|
-
var threshold = BOUNDARY_TO_HOST_THRESHOLD$1;
|
|
61931
|
+
var self = this;
|
|
62036
61932
|
|
|
62037
|
-
|
|
62038
|
-
|
|
62039
|
-
|
|
62040
|
-
|
|
62041
|
-
y: target.y + target.height
|
|
62042
|
-
}, threshold) ||
|
|
62043
|
-
areCloseOnAxis(axis, end, getMid(source), threshold)
|
|
62044
|
-
);
|
|
62045
|
-
}
|
|
61933
|
+
tooltip.removeTimer = setTimeout(function() {
|
|
61934
|
+
self.remove(tooltip);
|
|
61935
|
+
}, tooltip.timeout);
|
|
61936
|
+
};
|
|
62046
61937
|
|
|
62047
|
-
|
|
62048
|
-
|
|
62049
|
-
|
|
61938
|
+
/**
|
|
61939
|
+
* Remove tooltip with given ID.
|
|
61940
|
+
*
|
|
61941
|
+
* @param {string | Tooltip} id
|
|
61942
|
+
*/
|
|
61943
|
+
Tooltips.prototype.remove = function(id) {
|
|
62050
61944
|
|
|
62051
|
-
|
|
61945
|
+
var tooltip = this.get(id);
|
|
62052
61946
|
|
|
62053
|
-
|
|
62054
|
-
|
|
62055
|
-
|
|
62056
|
-
}
|
|
61947
|
+
if (tooltip) {
|
|
61948
|
+
remove$4(tooltip.html);
|
|
61949
|
+
remove$4(tooltip.htmlContainer);
|
|
62057
61950
|
|
|
62058
|
-
|
|
61951
|
+
delete tooltip.htmlContainer;
|
|
62059
61952
|
|
|
62060
|
-
|
|
62061
|
-
if (isSame(
|
|
62062
|
-
getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)
|
|
62063
|
-
) || isOppositeOrientation(
|
|
62064
|
-
getHorizontalOrientation(attachOrientation), getHorizontalOrientation(targetOrientation)
|
|
62065
|
-
)) {
|
|
62066
|
-
return orientationDirectionMapping[ getVerticalOrientation(attachOrientation) ];
|
|
61953
|
+
delete this._tooltips[tooltip.id];
|
|
62067
61954
|
}
|
|
61955
|
+
};
|
|
62068
61956
|
|
|
62069
|
-
// fallback
|
|
62070
|
-
return orientationDirectionMapping[ getHorizontalOrientation(attachOrientation) ];
|
|
62071
|
-
}
|
|
62072
61957
|
|
|
62073
|
-
function
|
|
61958
|
+
Tooltips.prototype.show = function() {
|
|
61959
|
+
setVisible(this._tooltipRoot);
|
|
61960
|
+
};
|
|
62074
61961
|
|
|
62075
|
-
// attached to either top, right, bottom or left side
|
|
62076
|
-
if (attachedToSide) {
|
|
62077
|
-
if (isHorizontalOrientation(attachOrientation)) {
|
|
62078
61962
|
|
|
62079
|
-
|
|
61963
|
+
Tooltips.prototype.hide = function() {
|
|
61964
|
+
setVisible(this._tooltipRoot, false);
|
|
61965
|
+
};
|
|
62080
61966
|
|
|
62081
|
-
// opposite horizontal orientation or same orientation
|
|
62082
|
-
if (
|
|
62083
|
-
isOppositeHorizontalOrientation(attachOrientation, targetOrientation) ||
|
|
62084
|
-
isSame(attachOrientation, targetOrientation)
|
|
62085
|
-
) {
|
|
62086
|
-
return 'h';
|
|
62087
|
-
}
|
|
62088
61967
|
|
|
62089
|
-
|
|
62090
|
-
|
|
62091
|
-
|
|
61968
|
+
Tooltips.prototype._updateRoot = function(viewbox) {
|
|
61969
|
+
var a = viewbox.scale || 1;
|
|
61970
|
+
var d = viewbox.scale || 1;
|
|
62092
61971
|
|
|
62093
|
-
|
|
61972
|
+
var matrix = 'matrix(' + a + ',0,0,' + d + ',' + (-1 * viewbox.x * a) + ',' + (-1 * viewbox.y * d) + ')';
|
|
62094
61973
|
|
|
62095
|
-
|
|
62096
|
-
|
|
62097
|
-
|
|
62098
|
-
isSame(attachOrientation, targetOrientation)
|
|
62099
|
-
) {
|
|
62100
|
-
return 'v';
|
|
62101
|
-
}
|
|
61974
|
+
this._tooltipRoot.style.transform = matrix;
|
|
61975
|
+
this._tooltipRoot.style['-ms-transform'] = matrix;
|
|
61976
|
+
};
|
|
62102
61977
|
|
|
62103
|
-
// fallback
|
|
62104
|
-
return 'h';
|
|
62105
|
-
}
|
|
62106
|
-
}
|
|
62107
61978
|
|
|
62108
|
-
|
|
61979
|
+
Tooltips.prototype._addTooltip = function(tooltip) {
|
|
62109
61980
|
|
|
62110
|
-
|
|
62111
|
-
|
|
62112
|
-
|
|
62113
|
-
|
|
62114
|
-
|
|
62115
|
-
|
|
62116
|
-
|
|
62117
|
-
|
|
61981
|
+
var id = tooltip.id,
|
|
61982
|
+
html = tooltip.html,
|
|
61983
|
+
htmlContainer,
|
|
61984
|
+
tooltipRoot = this._tooltipRoot;
|
|
61985
|
+
|
|
61986
|
+
// unwrap jquery (for those who need it)
|
|
61987
|
+
if (html.get && html.constructor.prototype.jquery) {
|
|
61988
|
+
html = html.get(0);
|
|
62118
61989
|
}
|
|
62119
|
-
}
|
|
62120
61990
|
|
|
62121
|
-
|
|
62122
|
-
|
|
62123
|
-
|
|
62124
|
-
|
|
61991
|
+
// create proper html elements from
|
|
61992
|
+
// tooltip HTML strings
|
|
61993
|
+
if (isString$2(html)) {
|
|
61994
|
+
html = domify$1(html);
|
|
61995
|
+
}
|
|
62125
61996
|
|
|
62126
|
-
|
|
61997
|
+
htmlContainer = domify$1('<div data-tooltip-id="' + id + '" class="' + tooltipClass + '">');
|
|
61998
|
+
assign$1(htmlContainer, { position: 'absolute' });
|
|
62127
61999
|
|
|
62128
|
-
|
|
62129
|
-
// retain the original docking
|
|
62130
|
-
return assign$2({ original: docking.point.original || docking.point }, docking.actual);
|
|
62131
|
-
}
|
|
62000
|
+
htmlContainer.appendChild(html);
|
|
62132
62001
|
|
|
62002
|
+
if (tooltip.type) {
|
|
62003
|
+
classes$1(htmlContainer).add('djs-tooltip-' + tooltip.type);
|
|
62004
|
+
}
|
|
62133
62005
|
|
|
62134
|
-
|
|
62135
|
-
|
|
62136
|
-
|
|
62137
|
-
*
|
|
62138
|
-
* @param {ElementRegistry} elementRegistry
|
|
62139
|
-
* @param {GraphicsFactory} graphicsFactory
|
|
62140
|
-
*/
|
|
62141
|
-
function CroppingConnectionDocking(elementRegistry, graphicsFactory) {
|
|
62142
|
-
this._elementRegistry = elementRegistry;
|
|
62143
|
-
this._graphicsFactory = graphicsFactory;
|
|
62144
|
-
}
|
|
62006
|
+
if (tooltip.className) {
|
|
62007
|
+
classes$1(htmlContainer).add(tooltip.className);
|
|
62008
|
+
}
|
|
62145
62009
|
|
|
62146
|
-
|
|
62010
|
+
tooltip.htmlContainer = htmlContainer;
|
|
62147
62011
|
|
|
62012
|
+
tooltipRoot.appendChild(htmlContainer);
|
|
62148
62013
|
|
|
62149
|
-
|
|
62150
|
-
* @inheritDoc ConnectionDocking#getCroppedWaypoints
|
|
62151
|
-
*/
|
|
62152
|
-
CroppingConnectionDocking.prototype.getCroppedWaypoints = function(connection, source, target) {
|
|
62014
|
+
this._tooltips[id] = tooltip;
|
|
62153
62015
|
|
|
62154
|
-
|
|
62155
|
-
|
|
62016
|
+
this._updateTooltip(tooltip);
|
|
62017
|
+
};
|
|
62156
62018
|
|
|
62157
|
-
var sourceDocking = this.getDockingPoint(connection, source, true),
|
|
62158
|
-
targetDocking = this.getDockingPoint(connection, target);
|
|
62159
62019
|
|
|
62160
|
-
|
|
62020
|
+
Tooltips.prototype._updateTooltip = function(tooltip) {
|
|
62161
62021
|
|
|
62162
|
-
|
|
62163
|
-
|
|
62022
|
+
var position = tooltip.position,
|
|
62023
|
+
htmlContainer = tooltip.htmlContainer;
|
|
62164
62024
|
|
|
62165
|
-
|
|
62025
|
+
// update overlay html based on tooltip x, y
|
|
62026
|
+
|
|
62027
|
+
setPosition(htmlContainer, position.x, position.y);
|
|
62166
62028
|
};
|
|
62167
62029
|
|
|
62168
|
-
/**
|
|
62169
|
-
* Return the connection docking point on the specified shape
|
|
62170
|
-
*
|
|
62171
|
-
* @inheritDoc ConnectionDocking#getDockingPoint
|
|
62172
|
-
*/
|
|
62173
|
-
CroppingConnectionDocking.prototype.getDockingPoint = function(connection, shape, dockStart) {
|
|
62174
62030
|
|
|
62175
|
-
|
|
62176
|
-
dockingIdx,
|
|
62177
|
-
dockingPoint,
|
|
62178
|
-
croppedPoint;
|
|
62031
|
+
Tooltips.prototype._updateTooltipVisibilty = function(viewbox) {
|
|
62179
62032
|
|
|
62180
|
-
|
|
62181
|
-
|
|
62033
|
+
forEach$2(this._tooltips, function(tooltip) {
|
|
62034
|
+
var show = tooltip.show,
|
|
62035
|
+
htmlContainer = tooltip.htmlContainer,
|
|
62036
|
+
visible = true;
|
|
62182
62037
|
|
|
62183
|
-
|
|
62038
|
+
if (show) {
|
|
62039
|
+
if (show.minZoom > viewbox.scale ||
|
|
62040
|
+
show.maxZoom < viewbox.scale) {
|
|
62041
|
+
visible = false;
|
|
62042
|
+
}
|
|
62184
62043
|
|
|
62185
|
-
|
|
62186
|
-
|
|
62187
|
-
|
|
62188
|
-
idx: dockingIdx
|
|
62189
|
-
};
|
|
62044
|
+
setVisible(htmlContainer, visible);
|
|
62045
|
+
}
|
|
62046
|
+
});
|
|
62190
62047
|
};
|
|
62191
62048
|
|
|
62049
|
+
Tooltips.prototype._init = function() {
|
|
62192
62050
|
|
|
62193
|
-
|
|
62051
|
+
var self = this;
|
|
62194
62052
|
|
|
62195
|
-
|
|
62053
|
+
// scroll/zoom integration
|
|
62196
62054
|
|
|
62197
|
-
|
|
62198
|
-
|
|
62055
|
+
function updateViewbox(viewbox) {
|
|
62056
|
+
self._updateRoot(viewbox);
|
|
62057
|
+
self._updateTooltipVisibilty(viewbox);
|
|
62199
62058
|
|
|
62200
|
-
|
|
62201
|
-
|
|
62059
|
+
self.show();
|
|
62060
|
+
}
|
|
62202
62061
|
|
|
62203
|
-
|
|
62204
|
-
|
|
62205
|
-
|
|
62062
|
+
this._eventBus.on('canvas.viewbox.changing', function(event) {
|
|
62063
|
+
self.hide();
|
|
62064
|
+
});
|
|
62206
62065
|
|
|
62207
|
-
|
|
62208
|
-
|
|
62066
|
+
this._eventBus.on('canvas.viewbox.changed', function(event) {
|
|
62067
|
+
updateViewbox(event.viewbox);
|
|
62068
|
+
});
|
|
62209
62069
|
};
|
|
62210
62070
|
|
|
62211
|
-
|
|
62212
|
-
|
|
62071
|
+
/**
|
|
62072
|
+
* @type { import('didi').ModuleDeclaration }
|
|
62073
|
+
*/
|
|
62074
|
+
var TooltipsModule = {
|
|
62075
|
+
__init__: [ 'tooltips' ],
|
|
62076
|
+
tooltips: [ 'type', Tooltips ]
|
|
62213
62077
|
};
|
|
62214
62078
|
|
|
62215
|
-
|
|
62216
|
-
|
|
62217
|
-
|
|
62218
|
-
|
|
62219
|
-
|
|
62079
|
+
/**
|
|
62080
|
+
* @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
|
|
62081
|
+
* @typedef {import('diagram-js/lib/features/tooltips/Tooltips').default} Tooltips
|
|
62082
|
+
* @typedef {import('diagram-js/lib/i18n/translate/translate').default} Translate
|
|
62083
|
+
*/
|
|
62084
|
+
|
|
62085
|
+
var COLLAB_ERR_MSG = 'flow elements must be children of pools/participants';
|
|
62086
|
+
|
|
62087
|
+
/**
|
|
62088
|
+
* @param {EventBus} eventBus
|
|
62089
|
+
* @param {Tooltips} tooltips
|
|
62090
|
+
* @param {Translate} translate
|
|
62091
|
+
*/
|
|
62092
|
+
function ModelingFeedback(eventBus, tooltips, translate) {
|
|
62093
|
+
|
|
62094
|
+
function showError(position, message, timeout) {
|
|
62095
|
+
tooltips.add({
|
|
62096
|
+
position: {
|
|
62097
|
+
x: position.x + 5,
|
|
62098
|
+
y: position.y + 5
|
|
62099
|
+
},
|
|
62100
|
+
type: 'error',
|
|
62101
|
+
timeout: timeout || 2000,
|
|
62102
|
+
html: '<div>' + message + '</div>'
|
|
62103
|
+
});
|
|
62104
|
+
}
|
|
62105
|
+
|
|
62106
|
+
eventBus.on([ 'shape.move.rejected', 'create.rejected' ], function(event) {
|
|
62107
|
+
var context = event.context,
|
|
62108
|
+
shape = context.shape,
|
|
62109
|
+
target = context.target;
|
|
62110
|
+
|
|
62111
|
+
if (is$6(target, 'bpmn:Collaboration') && is$6(shape, 'bpmn:FlowNode')) {
|
|
62112
|
+
showError(event, translate(COLLAB_ERR_MSG));
|
|
62113
|
+
}
|
|
62114
|
+
});
|
|
62115
|
+
|
|
62116
|
+
}
|
|
62117
|
+
|
|
62118
|
+
ModelingFeedback.$inject = [
|
|
62119
|
+
'eventBus',
|
|
62120
|
+
'tooltips',
|
|
62121
|
+
'translate'
|
|
62122
|
+
];
|
|
62123
|
+
|
|
62124
|
+
var ModelingFeedbackModule = {
|
|
62220
62125
|
__depends__: [
|
|
62221
|
-
|
|
62222
|
-
RulesModule,
|
|
62223
|
-
DiOrderingModule,
|
|
62224
|
-
OrderingModule,
|
|
62225
|
-
ReplaceModule,
|
|
62226
|
-
CommandModule,
|
|
62227
|
-
TooltipsModule,
|
|
62228
|
-
LabelSupportModule,
|
|
62229
|
-
AttachSupportModule,
|
|
62230
|
-
SelectionModule,
|
|
62231
|
-
ChangeSupportModule,
|
|
62232
|
-
SpaceToolModule
|
|
62126
|
+
TooltipsModule
|
|
62233
62127
|
],
|
|
62234
|
-
|
|
62235
|
-
|
|
62236
|
-
|
|
62237
|
-
|
|
62238
|
-
layouter: [ 'type', BpmnLayouter ],
|
|
62239
|
-
connectionDocking: [ 'type', CroppingConnectionDocking ]
|
|
62128
|
+
__init__: [
|
|
62129
|
+
'modelingFeedback'
|
|
62130
|
+
],
|
|
62131
|
+
modelingFeedback: [ 'type', ModelingFeedback ]
|
|
62240
62132
|
};
|
|
62241
62133
|
|
|
62242
62134
|
/**
|
|
@@ -66251,8 +66143,6 @@
|
|
|
66251
66143
|
return this.importXML(initialDiagram);
|
|
66252
66144
|
};
|
|
66253
66145
|
|
|
66254
|
-
Modeler$2.prototype.createDiagram = wrapForCompatibility(Modeler$2.prototype.createDiagram);
|
|
66255
|
-
|
|
66256
66146
|
|
|
66257
66147
|
Modeler$2.prototype._interactionModules = [
|
|
66258
66148
|
|
|
@@ -66284,6 +66174,7 @@
|
|
|
66284
66174
|
KeyboardMoveSelectionModule,
|
|
66285
66175
|
LabelEditingModule,
|
|
66286
66176
|
ModelingModule,
|
|
66177
|
+
ModelingFeedbackModule,
|
|
66287
66178
|
MoveModule,
|
|
66288
66179
|
PaletteModule,
|
|
66289
66180
|
ReplacePreviewModule,
|
|
@@ -118877,7 +118768,8 @@
|
|
|
118877
118768
|
feel: 'optional',
|
|
118878
118769
|
getValue,
|
|
118879
118770
|
setValue,
|
|
118880
|
-
debounce
|
|
118771
|
+
debounce,
|
|
118772
|
+
tooltip: translate('Specifies the number of times the job is retried when a worker signals failure. The default is three.')
|
|
118881
118773
|
});
|
|
118882
118774
|
}
|
|
118883
118775
|
|
|
@@ -119944,159 +119836,235 @@
|
|
|
119944
119836
|
const TooltipProvider = {
|
|
119945
119837
|
'group-assignmentDefinition': element => {
|
|
119946
119838
|
const translate = useService('translate');
|
|
119947
|
-
return o$3("
|
|
119948
|
-
|
|
119949
|
-
|
|
119950
|
-
|
|
119951
|
-
|
|
119952
|
-
|
|
119839
|
+
return o$3("div", {
|
|
119840
|
+
children: [translate('Define who the task is assigned to. One or all of the following attributes can be specified simultaneously. '), o$3("a", {
|
|
119841
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/user-tasks/#assignments",
|
|
119842
|
+
target: "_blank",
|
|
119843
|
+
rel: "noopener",
|
|
119844
|
+
title: translate('User task documentation'),
|
|
119845
|
+
children: translate('Learn more.')
|
|
119846
|
+
})]
|
|
119953
119847
|
});
|
|
119954
119848
|
},
|
|
119955
119849
|
'group-condition': element => {
|
|
119956
119850
|
const translate = useService('translate');
|
|
119957
|
-
return o$3("
|
|
119958
|
-
|
|
119959
|
-
|
|
119960
|
-
|
|
119961
|
-
|
|
119962
|
-
|
|
119851
|
+
return o$3("div", {
|
|
119852
|
+
children: [translate('Define a boolean condition expression that defines when this flow is taken. '), o$3("a", {
|
|
119853
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/exclusive-gateways/#conditions",
|
|
119854
|
+
target: "_blank",
|
|
119855
|
+
rel: "noopener",
|
|
119856
|
+
title: translate('Conditions documentation'),
|
|
119857
|
+
children: translate('Learn how to define conditions.')
|
|
119858
|
+
})]
|
|
119963
119859
|
});
|
|
119964
119860
|
},
|
|
119965
119861
|
'group-businessRuleImplementation': element => {
|
|
119966
119862
|
const translate = useService('translate');
|
|
119967
|
-
return o$3("
|
|
119968
|
-
|
|
119969
|
-
|
|
119970
|
-
|
|
119971
|
-
|
|
119972
|
-
|
|
119863
|
+
return o$3("div", {
|
|
119864
|
+
children: [translate('Evaluate a business rule, for example a DMN. To add a custom implementation, use a job worker. '), o$3("a", {
|
|
119865
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/business-rule-tasks/#defining-a-task",
|
|
119866
|
+
target: "_blank",
|
|
119867
|
+
rel: "noopener",
|
|
119868
|
+
title: translate('Business rule task documentation'),
|
|
119869
|
+
children: translate('Learn more.')
|
|
119870
|
+
})]
|
|
119871
|
+
});
|
|
119872
|
+
},
|
|
119873
|
+
'group-scriptImplementation': element => {
|
|
119874
|
+
const translate = useService('translate');
|
|
119875
|
+
return o$3("div", {
|
|
119876
|
+
children: [translate('Implement a script task using an inline FEEL expression. To add a custom implementation, use a job worker. '), o$3("a", {
|
|
119877
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/script-tasks/#defining-a-script-task",
|
|
119878
|
+
target: "_blank",
|
|
119879
|
+
rel: "noopener",
|
|
119880
|
+
title: translate('Script task documentation'),
|
|
119881
|
+
children: translate('Learn more.')
|
|
119882
|
+
})]
|
|
119973
119883
|
});
|
|
119974
119884
|
},
|
|
119975
119885
|
'group-form': element => {
|
|
119976
119886
|
const translate = useService('translate');
|
|
119977
|
-
return o$3("
|
|
119978
|
-
|
|
119979
|
-
|
|
119980
|
-
|
|
119981
|
-
|
|
119982
|
-
|
|
119887
|
+
return o$3("div", {
|
|
119888
|
+
children: [translate('Embed a form created with the Camunda Forms editor. To associate a custom form, application, or URL to the user task, specify a form key. '), o$3("a", {
|
|
119889
|
+
href: "https://docs.camunda.io/docs/guides/utilizing-forms/#connect-your-form-to-a-bpmn-diagram",
|
|
119890
|
+
target: "_blank",
|
|
119891
|
+
rel: "noopener",
|
|
119892
|
+
title: translate('User task form documentation'),
|
|
119893
|
+
children: translate('Learn more.')
|
|
119894
|
+
})]
|
|
119983
119895
|
});
|
|
119984
119896
|
},
|
|
119985
119897
|
'group-message': element => {
|
|
119986
119898
|
const translate = useService('translate');
|
|
119987
119899
|
if (is$6(element, 'bpmn:ReceiveTask')) {
|
|
119988
|
-
return o$3("
|
|
119989
|
-
|
|
119990
|
-
|
|
119991
|
-
|
|
119992
|
-
|
|
119993
|
-
|
|
119900
|
+
return o$3("div", {
|
|
119901
|
+
children: [translate('Define the name of the message (e.g. '), o$3("code", {
|
|
119902
|
+
children: "Money collected"
|
|
119903
|
+
}), translate(') and the '), o$3("code", {
|
|
119904
|
+
children: "correlationKey"
|
|
119905
|
+
}), translate(' expression (e.g. '), o$3("code", {
|
|
119906
|
+
children: "= orderId"
|
|
119907
|
+
}), translate(')'), translate(' to subscribe to. '), translate('Learn more how to '), o$3("a", {
|
|
119908
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/send-tasks",
|
|
119909
|
+
target: "_blank",
|
|
119910
|
+
rel: "noopener",
|
|
119911
|
+
title: translate('Send task documentation'),
|
|
119912
|
+
children: translate('send ')
|
|
119913
|
+
}), translate('and '), o$3("a", {
|
|
119914
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/receive-tasks",
|
|
119915
|
+
target: "_blank",
|
|
119916
|
+
rel: "noopener",
|
|
119917
|
+
title: translate('Receive task documentation'),
|
|
119918
|
+
children: translate('receive messages. ')
|
|
119919
|
+
})]
|
|
119994
119920
|
});
|
|
119995
119921
|
}
|
|
119996
|
-
return o$3("
|
|
119997
|
-
|
|
119998
|
-
|
|
119999
|
-
|
|
120000
|
-
|
|
120001
|
-
|
|
119922
|
+
return o$3("div", {
|
|
119923
|
+
children: [translate('Define the name of the message (e.g. '), o$3("code", {
|
|
119924
|
+
children: "Money collected"
|
|
119925
|
+
}), translate(') and the '), o$3("code", {
|
|
119926
|
+
children: "correlationKey"
|
|
119927
|
+
}), translate(' expression (e.g. '), o$3("code", {
|
|
119928
|
+
children: "= orderId"
|
|
119929
|
+
}), translate(')'), translate(' to subscribe to. '), o$3("a", {
|
|
119930
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#messages",
|
|
119931
|
+
target: "_blank",
|
|
119932
|
+
rel: "noopener",
|
|
119933
|
+
title: translate('Message event documentation'),
|
|
119934
|
+
children: translate('Learn more.')
|
|
119935
|
+
})]
|
|
120002
119936
|
});
|
|
120003
119937
|
},
|
|
120004
119938
|
'group-calledElement': element => {
|
|
120005
119939
|
const translate = useService('translate');
|
|
120006
|
-
return o$3("
|
|
120007
|
-
|
|
120008
|
-
|
|
120009
|
-
|
|
120010
|
-
|
|
120011
|
-
|
|
119940
|
+
return o$3("div", {
|
|
119941
|
+
children: [translate('Define the ID of the process to call (e.g. '), " ", o$3("code", {
|
|
119942
|
+
children: "shipping-process"
|
|
119943
|
+
}), translate(' or '), o$3("code", {
|
|
119944
|
+
children: "= \"shipping-\" + tenantId"
|
|
119945
|
+
}), " ", translate('). '), o$3("a", {
|
|
119946
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/call-activities/",
|
|
119947
|
+
target: "_blank",
|
|
119948
|
+
rel: "noopener",
|
|
119949
|
+
title: translate('Call activity documentation'),
|
|
119950
|
+
children: translate('Learn more.')
|
|
119951
|
+
})]
|
|
120012
119952
|
});
|
|
120013
119953
|
},
|
|
120014
119954
|
'group-taskDefinition': element => {
|
|
120015
119955
|
const translate = useService('translate');
|
|
120016
119956
|
if (is$6(element, 'bpmn:ServiceTask')) {
|
|
120017
|
-
return o$3("
|
|
120018
|
-
|
|
120019
|
-
|
|
120020
|
-
|
|
120021
|
-
|
|
120022
|
-
|
|
119957
|
+
return o$3("div", {
|
|
119958
|
+
children: [translate('Specify which job workers handle the task work to execute a service (e.g. '), o$3("code", {
|
|
119959
|
+
children: "order-items"
|
|
119960
|
+
}), translate('). '), o$3("a", {
|
|
119961
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/service-tasks",
|
|
119962
|
+
target: "_blank",
|
|
119963
|
+
rel: "noopener",
|
|
119964
|
+
title: translate('Service task documentation'),
|
|
119965
|
+
children: translate('Learn more.')
|
|
119966
|
+
})]
|
|
120023
119967
|
});
|
|
120024
119968
|
}
|
|
120025
119969
|
if (is$6(element, 'bpmn:BusinessRuleTask')) {
|
|
120026
|
-
return o$3("
|
|
120027
|
-
|
|
120028
|
-
|
|
120029
|
-
|
|
120030
|
-
|
|
120031
|
-
|
|
119970
|
+
return o$3("div", {
|
|
119971
|
+
children: [translate('Specify which job workers handle the task work to evaluate business rules. '), o$3("a", {
|
|
119972
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/business-rule-tasks/#job-worker-implementation",
|
|
119973
|
+
target: "_blank",
|
|
119974
|
+
rel: "noopener",
|
|
119975
|
+
title: translate('Business rule task documentation'),
|
|
119976
|
+
children: translate('Learn more.')
|
|
119977
|
+
})]
|
|
120032
119978
|
});
|
|
120033
119979
|
}
|
|
120034
119980
|
if (is$6(element, 'bpmn:ScriptTask')) {
|
|
120035
|
-
return o$3("
|
|
120036
|
-
|
|
120037
|
-
|
|
120038
|
-
|
|
120039
|
-
|
|
120040
|
-
|
|
119981
|
+
return o$3("div", {
|
|
119982
|
+
children: [translate('Specify which job workers handle the task work to execute a script. '), o$3("a", {
|
|
119983
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/script-tasks/#defining-a-task",
|
|
119984
|
+
target: "_blank",
|
|
119985
|
+
rel: "noopener",
|
|
119986
|
+
title: translate('Script task documentation'),
|
|
119987
|
+
children: translate('Learn more.')
|
|
119988
|
+
})]
|
|
120041
119989
|
});
|
|
120042
119990
|
}
|
|
120043
119991
|
if (is$6(element, 'bpmn:SendTask')) {
|
|
120044
|
-
return o$3("
|
|
120045
|
-
|
|
120046
|
-
|
|
120047
|
-
|
|
120048
|
-
|
|
120049
|
-
|
|
119992
|
+
return o$3("div", {
|
|
119993
|
+
children: [translate('Specify which job workers handle the task work to send a message (e.g. '), o$3("code", {
|
|
119994
|
+
children: "kafka"
|
|
119995
|
+
}), translate(' or '), o$3("code", {
|
|
119996
|
+
children: "mail"
|
|
119997
|
+
}), translate('). '), o$3("a", {
|
|
119998
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/send-tasks/#defining-a-task",
|
|
119999
|
+
target: "_blank",
|
|
120000
|
+
rel: "noopener",
|
|
120001
|
+
title: translate('Send task documentation'),
|
|
120002
|
+
children: translate('Learn more.')
|
|
120003
|
+
})]
|
|
120050
120004
|
});
|
|
120051
120005
|
}
|
|
120052
120006
|
if (is$6(element, 'bpmn:ThrowEvent')) {
|
|
120053
|
-
return o$3("
|
|
120054
|
-
|
|
120055
|
-
|
|
120056
|
-
|
|
120057
|
-
|
|
120058
|
-
|
|
120007
|
+
return o$3("div", {
|
|
120008
|
+
children: [translate('Specify which job workers handle the event work. '), o$3("a", {
|
|
120009
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#message-throw-events",
|
|
120010
|
+
target: "_blank",
|
|
120011
|
+
rel: "noopener",
|
|
120012
|
+
title: translate('Message throw event documentation'),
|
|
120013
|
+
children: translate('Learn more.')
|
|
120014
|
+
})]
|
|
120059
120015
|
});
|
|
120060
120016
|
}
|
|
120061
120017
|
},
|
|
120062
120018
|
'group-multiInstance': element => {
|
|
120063
120019
|
const translate = useService('translate');
|
|
120064
|
-
return o$3("
|
|
120065
|
-
|
|
120066
|
-
|
|
120067
|
-
|
|
120068
|
-
|
|
120069
|
-
|
|
120020
|
+
return o$3("div", {
|
|
120021
|
+
children: [translate('Execute this task for each element of a given collection. '), o$3("br", {}), translate('Define an input collection expression that defines the collection to iterate over (e.g. '), o$3("code", {
|
|
120022
|
+
children: "= items"
|
|
120023
|
+
}), translate('). '), translate('To collect the output define the output collection and the output element expressions. '), o$3("a", {
|
|
120024
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/multi-instance/#defining-the-collection-to-iterate-over",
|
|
120025
|
+
target: "_blank",
|
|
120026
|
+
rel: "noopener",
|
|
120027
|
+
title: translate('Multi instance documentation'),
|
|
120028
|
+
children: translate('Learn more.')
|
|
120029
|
+
})]
|
|
120070
120030
|
});
|
|
120071
120031
|
},
|
|
120072
120032
|
'group-error': element => {
|
|
120073
120033
|
const translate = useService('translate');
|
|
120074
|
-
return o$3("
|
|
120075
|
-
|
|
120076
|
-
|
|
120077
|
-
|
|
120078
|
-
|
|
120079
|
-
|
|
120034
|
+
return o$3("div", {
|
|
120035
|
+
children: [translate('Define an error code (e.g. '), o$3("code", {
|
|
120036
|
+
children: "order-not-found"
|
|
120037
|
+
}), translate('). '), o$3("a", {
|
|
120038
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/error-events/#defining-the-error",
|
|
120039
|
+
target: "_blank",
|
|
120040
|
+
rel: "noopener",
|
|
120041
|
+
title: translate('Error event documentation'),
|
|
120042
|
+
children: translate('Learn more.')
|
|
120043
|
+
})]
|
|
120080
120044
|
});
|
|
120081
120045
|
},
|
|
120082
120046
|
'group-inputs': element => {
|
|
120083
120047
|
const translate = useService('translate');
|
|
120084
|
-
return o$3("
|
|
120085
|
-
|
|
120086
|
-
|
|
120087
|
-
|
|
120088
|
-
|
|
120089
|
-
|
|
120048
|
+
return o$3("div", {
|
|
120049
|
+
children: [translate('Create a new local variable in the scope of this task. '), o$3("a", {
|
|
120050
|
+
href: "https://docs.camunda.io/docs/components/concepts/variables/#input-mappings",
|
|
120051
|
+
target: "_blank",
|
|
120052
|
+
rel: "noopener",
|
|
120053
|
+
title: translate('Input mappings documentation'),
|
|
120054
|
+
children: translate('Learn more.')
|
|
120055
|
+
})]
|
|
120090
120056
|
});
|
|
120091
120057
|
},
|
|
120092
120058
|
'group-outputs': element => {
|
|
120093
120059
|
const translate = useService('translate');
|
|
120094
|
-
return o$3("
|
|
120095
|
-
|
|
120096
|
-
|
|
120097
|
-
|
|
120098
|
-
|
|
120099
|
-
|
|
120060
|
+
return o$3("div", {
|
|
120061
|
+
children: [translate('Customize how result variables are merged into the global scope of the process instance. '), o$3("a", {
|
|
120062
|
+
href: "https://docs.camunda.io/docs/components/concepts/variables/#output-mappings",
|
|
120063
|
+
target: "_blank",
|
|
120064
|
+
rel: "noopener",
|
|
120065
|
+
title: translate('Output mappings documentation'),
|
|
120066
|
+
children: translate('Learn more.')
|
|
120067
|
+
})]
|
|
120100
120068
|
});
|
|
120101
120069
|
}
|
|
120102
120070
|
};
|