camunda-bpmn-js 2.0.1 → 2.1.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/camunda-cloud-modeler.css +2 -1
- package/dist/assets/element-template-chooser.css +5 -0
- package/dist/base-modeler.development.js +14001 -10194
- package/dist/base-modeler.production.min.js +41 -38
- package/dist/base-navigated-viewer.development.js +161 -121
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +155 -119
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +45602 -38158
- package/dist/camunda-cloud-modeler.production.min.js +35 -32
- package/dist/camunda-cloud-navigated-viewer.development.js +191 -141
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +185 -139
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +35553 -30664
- package/dist/camunda-platform-modeler.production.min.js +35 -32
- package/dist/camunda-platform-navigated-viewer.development.js +161 -121
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +155 -119
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/base/Modeler.js +13 -8
- package/lib/camunda-cloud/Modeler.js +9 -7
- package/lib/camunda-platform/Modeler.js +6 -3
- package/package.json +18 -16
- package/styles/camunda-cloud-modeler.css +2 -1
- package/lib/camunda-cloud/features/create-append-anything/ElementTemplatesAppendProvider.js +0 -162
- package/lib/camunda-cloud/features/create-append-anything/ElementTemplatesCreateProvider.js +0 -114
- package/lib/camunda-cloud/features/create-append-anything/index.js +0 -11
- package/lib/camunda-cloud/features/replace/ElementTemplatesReplaceProvider.js +0 -118
- package/lib/camunda-cloud/features/replace/index.js +0 -6
- package/lib/shared/features/replace/UnlinkTemplateReplaceProvider.js +0 -178
- package/lib/shared/features/replace/index.js +0 -8
- package/lib/shared/features/replace/util/ReplaceOptionsUtil.js +0 -7
|
@@ -11042,7 +11042,11 @@
|
|
|
11042
11042
|
}
|
|
11043
11043
|
};
|
|
11044
11044
|
|
|
11045
|
-
var
|
|
11045
|
+
var objectRefsExports = {};
|
|
11046
|
+
var objectRefs = {
|
|
11047
|
+
get exports(){ return objectRefsExports; },
|
|
11048
|
+
set exports(v){ objectRefsExports = v; },
|
|
11049
|
+
};
|
|
11046
11050
|
|
|
11047
11051
|
var collection = {};
|
|
11048
11052
|
|
|
@@ -11362,7 +11366,7 @@
|
|
|
11362
11366
|
module.exports.Collection = collection;
|
|
11363
11367
|
} (objectRefs));
|
|
11364
11368
|
|
|
11365
|
-
var Refs = /*@__PURE__*/getDefaultExportFromCjs(
|
|
11369
|
+
var Refs = /*@__PURE__*/getDefaultExportFromCjs(objectRefsExports);
|
|
11366
11370
|
|
|
11367
11371
|
var parentRefs = new Refs({ name: 'children', enumerable: true, collection: true }, { name: 'parent' }),
|
|
11368
11372
|
labelRefs = new Refs({ name: 'labels', enumerable: true, collection: true }, { name: 'labelTarget' }),
|
|
@@ -21076,7 +21080,20 @@
|
|
|
21076
21080
|
|
|
21077
21081
|
|
|
21078
21082
|
/**
|
|
21079
|
-
* @typedef {
|
|
21083
|
+
* @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
|
|
21084
|
+
*
|
|
21085
|
+
* @typedef {import('./BaseViewer').BaseModelerOptions} BaseModelerOptions
|
|
21086
|
+
* @typedef {import('./BaseViewer').ModdleElement} ModdleElement
|
|
21087
|
+
* @typedef {import('./BaseViewer').ImportXMLResult} ImportXMLResult
|
|
21088
|
+
* @typedef {import('./BaseViewer').ImportXMLError} ImportXMLError
|
|
21089
|
+
* @typedef {import('./BaseViewer').ImportDefinitionsResult} ImportDefinitionsResult
|
|
21090
|
+
* @typedef {import('./BaseViewer').ImportDefinitionsError} ImportDefinitionsError
|
|
21091
|
+
* @typedef {import('./BaseViewer').ModdleElement} ModdleElement
|
|
21092
|
+
* @typedef {import('./BaseViewer').ModdleElementsById} ModdleElementsById
|
|
21093
|
+
* @typedef {import('./BaseViewer').OpenResult} OpenResult
|
|
21094
|
+
* @typedef {import('./BaseViewer').OpenError} OpenError
|
|
21095
|
+
* @typedef {import('./BaseViewer').SaveXMLOptions} SaveXMLOptions
|
|
21096
|
+
* @typedef {import('./BaseViewer').SaveXMLResult} SaveXMLResult
|
|
21080
21097
|
*/
|
|
21081
21098
|
|
|
21082
21099
|
/**
|
|
@@ -21085,20 +21102,20 @@
|
|
|
21085
21102
|
* Have a look at {@link Viewer}, {@link NavigatedViewer} or {@link Modeler} for
|
|
21086
21103
|
* bundles that include actual features.
|
|
21087
21104
|
*
|
|
21088
|
-
* @param {
|
|
21089
|
-
* @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
|
|
21090
|
-
* @param {string|number} [options.width] the width of the viewer
|
|
21091
|
-
* @param {string|number} [options.height] the height of the viewer
|
|
21092
|
-
* @param {Object} [options.moddleExtensions] extension packages to provide
|
|
21093
|
-
* @param {Module[]} [options.modules] a list of modules to override the default modules
|
|
21094
|
-
* @param {Module[]} [options.additionalModules] a list of modules to use with the default modules
|
|
21105
|
+
* @param {BaseModelerOptions} [options] The options to configure the viewer.
|
|
21095
21106
|
*/
|
|
21096
21107
|
function BaseViewer(options) {
|
|
21097
21108
|
|
|
21109
|
+
/**
|
|
21110
|
+
* @type {BaseModelerOptions}
|
|
21111
|
+
*/
|
|
21098
21112
|
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
21099
21113
|
|
|
21100
21114
|
this._moddle = this._createModdle(options);
|
|
21101
21115
|
|
|
21116
|
+
/**
|
|
21117
|
+
* @type {HTMLElement}
|
|
21118
|
+
*/
|
|
21102
21119
|
this._container = this._createContainer(options);
|
|
21103
21120
|
|
|
21104
21121
|
/* <project-logo> */
|
|
@@ -21112,22 +21129,6 @@
|
|
|
21112
21129
|
|
|
21113
21130
|
e(BaseViewer, Diagram);
|
|
21114
21131
|
|
|
21115
|
-
/**
|
|
21116
|
-
* The importXML result.
|
|
21117
|
-
*
|
|
21118
|
-
* @typedef {Object} ImportXMLResult
|
|
21119
|
-
*
|
|
21120
|
-
* @property {Array<string>} warnings
|
|
21121
|
-
*/
|
|
21122
|
-
|
|
21123
|
-
/**
|
|
21124
|
-
* The importXML error.
|
|
21125
|
-
*
|
|
21126
|
-
* @typedef {Error} ImportXMLError
|
|
21127
|
-
*
|
|
21128
|
-
* @property {Array<string>} warnings
|
|
21129
|
-
*/
|
|
21130
|
-
|
|
21131
21132
|
/**
|
|
21132
21133
|
* Parse and render a BPMN 2.0 diagram.
|
|
21133
21134
|
*
|
|
@@ -21138,7 +21139,7 @@
|
|
|
21138
21139
|
*
|
|
21139
21140
|
* During import the viewer will fire life-cycle events:
|
|
21140
21141
|
*
|
|
21141
|
-
* * import.parse.start (about to read model from
|
|
21142
|
+
* * import.parse.start (about to read model from XML)
|
|
21142
21143
|
* * import.parse.complete (model read; may have worked or not)
|
|
21143
21144
|
* * import.render.start (graphical import start)
|
|
21144
21145
|
* * import.render.complete (graphical import finished)
|
|
@@ -21146,10 +21147,18 @@
|
|
|
21146
21147
|
*
|
|
21147
21148
|
* You can use these events to hook into the life-cycle.
|
|
21148
21149
|
*
|
|
21149
|
-
* @
|
|
21150
|
-
*
|
|
21150
|
+
* @throws {ImportXMLError} An error thrown during the import of the XML.
|
|
21151
|
+
*
|
|
21152
|
+
* @fires BaseViewer#ImportParseStart
|
|
21153
|
+
* @fires BaseViewer#ImportParseComplete
|
|
21154
|
+
* @fires Importer#ImportRenderStart
|
|
21155
|
+
* @fires Importer#ImportRenderComplete
|
|
21156
|
+
* @fires BaseViewer#ImportDone
|
|
21157
|
+
*
|
|
21158
|
+
* @param {string} xml The BPMN 2.0 XML to be imported.
|
|
21159
|
+
* @param {ModdleElement|string} [bpmnDiagram] The optional diagram or Id of the BPMN diagram to open.
|
|
21151
21160
|
*
|
|
21152
|
-
*
|
|
21161
|
+
* @return {Promise<ImportXMLResult>} A promise resolving with warnings that were produced during the import.
|
|
21153
21162
|
*/
|
|
21154
21163
|
BaseViewer.prototype.importXML = wrapForCompatibility(async function importXML(xml, bpmnDiagram) {
|
|
21155
21164
|
|
|
@@ -21185,6 +21194,14 @@
|
|
|
21185
21194
|
|
|
21186
21195
|
// hook in pre-parse listeners +
|
|
21187
21196
|
// allow xml manipulation
|
|
21197
|
+
|
|
21198
|
+
/**
|
|
21199
|
+
* A `import.parse.start` event.
|
|
21200
|
+
*
|
|
21201
|
+
* @event BaseViewer#ImportParseStart
|
|
21202
|
+
* @type {Object}
|
|
21203
|
+
* @property {string} xml The XML that is to be parsed.
|
|
21204
|
+
*/
|
|
21188
21205
|
xml = this._emit('import.parse.start', { xml: xml }) || xml;
|
|
21189
21206
|
|
|
21190
21207
|
let parseResult;
|
|
@@ -21207,6 +21224,18 @@
|
|
|
21207
21224
|
|
|
21208
21225
|
// hook in post parse listeners +
|
|
21209
21226
|
// allow definitions manipulation
|
|
21227
|
+
|
|
21228
|
+
/**
|
|
21229
|
+
* A `import.parse.complete` event.
|
|
21230
|
+
*
|
|
21231
|
+
* @event BaseViewer#ImportParseComplete
|
|
21232
|
+
* @type {Object}
|
|
21233
|
+
* @property {Error|null} error An error thrown when parsing the XML.
|
|
21234
|
+
* @property {ModdleElement} definitions The definitions model element.
|
|
21235
|
+
* @property {ModdleElementsById} elementsById The model elements by ID.
|
|
21236
|
+
* @property {ModdleElement[]} references The referenced model elements.
|
|
21237
|
+
* @property {string[]} warnings The warnings produced when parsing the XML.
|
|
21238
|
+
*/
|
|
21210
21239
|
definitions = this._emit('import.parse.complete', ParseCompleteEvent({
|
|
21211
21240
|
error: null,
|
|
21212
21241
|
definitions: definitions,
|
|
@@ -21219,6 +21248,14 @@
|
|
|
21219
21248
|
|
|
21220
21249
|
aggregatedWarnings = aggregatedWarnings.concat(importResult.warnings);
|
|
21221
21250
|
|
|
21251
|
+
/**
|
|
21252
|
+
* A `import.parse.complete` event.
|
|
21253
|
+
*
|
|
21254
|
+
* @event BaseViewer#ImportDone
|
|
21255
|
+
* @type {Object}
|
|
21256
|
+
* @property {ImportXMLError|null} error An error thrown during import.
|
|
21257
|
+
* @property {string[]} warnings The warnings.
|
|
21258
|
+
*/
|
|
21222
21259
|
this._emit('import.done', { error: null, warnings: aggregatedWarnings });
|
|
21223
21260
|
|
|
21224
21261
|
return { warnings: aggregatedWarnings };
|
|
@@ -21235,21 +21272,6 @@
|
|
|
21235
21272
|
}
|
|
21236
21273
|
});
|
|
21237
21274
|
|
|
21238
|
-
/**
|
|
21239
|
-
* The importDefinitions result.
|
|
21240
|
-
*
|
|
21241
|
-
* @typedef {Object} ImportDefinitionsResult
|
|
21242
|
-
*
|
|
21243
|
-
* @property {Array<string>} warnings
|
|
21244
|
-
*/
|
|
21245
|
-
|
|
21246
|
-
/**
|
|
21247
|
-
* The importDefinitions error.
|
|
21248
|
-
*
|
|
21249
|
-
* @typedef {Error} ImportDefinitionsError
|
|
21250
|
-
*
|
|
21251
|
-
* @property {Array<string>} warnings
|
|
21252
|
-
*/
|
|
21253
21275
|
|
|
21254
21276
|
/**
|
|
21255
21277
|
* Import parsed definitions and render a BPMN 2.0 diagram.
|
|
@@ -21266,10 +21288,12 @@
|
|
|
21266
21288
|
*
|
|
21267
21289
|
* You can use these events to hook into the life-cycle.
|
|
21268
21290
|
*
|
|
21269
|
-
* @
|
|
21270
|
-
*
|
|
21291
|
+
* @throws {ImportDefinitionsError} An error thrown during the import of the definitions.
|
|
21292
|
+
*
|
|
21293
|
+
* @param {ModdleElement} definitions The definitions.
|
|
21294
|
+
* @param {ModdleElement|string} [bpmnDiagram] The optional diagram or ID of the BPMN diagram to open.
|
|
21271
21295
|
*
|
|
21272
|
-
*
|
|
21296
|
+
* @return {Promise<ImportDefinitionsResult>} A promise resolving with warnings that were produced during the import.
|
|
21273
21297
|
*/
|
|
21274
21298
|
BaseViewer.prototype.importDefinitions = wrapForCompatibility(async function importDefinitions(definitions, bpmnDiagram) {
|
|
21275
21299
|
this._setDefinitions(definitions);
|
|
@@ -21278,21 +21302,6 @@
|
|
|
21278
21302
|
return { warnings: result.warnings };
|
|
21279
21303
|
});
|
|
21280
21304
|
|
|
21281
|
-
/**
|
|
21282
|
-
* The open result.
|
|
21283
|
-
*
|
|
21284
|
-
* @typedef {Object} OpenResult
|
|
21285
|
-
*
|
|
21286
|
-
* @property {Array<string>} warnings
|
|
21287
|
-
*/
|
|
21288
|
-
|
|
21289
|
-
/**
|
|
21290
|
-
* The open error.
|
|
21291
|
-
*
|
|
21292
|
-
* @typedef {Error} OpenError
|
|
21293
|
-
*
|
|
21294
|
-
* @property {Array<string>} warnings
|
|
21295
|
-
*/
|
|
21296
21305
|
|
|
21297
21306
|
/**
|
|
21298
21307
|
* Open diagram of previously imported XML.
|
|
@@ -21309,9 +21318,11 @@
|
|
|
21309
21318
|
*
|
|
21310
21319
|
* You can use these events to hook into the life-cycle.
|
|
21311
21320
|
*
|
|
21312
|
-
* @
|
|
21321
|
+
* @throws {OpenError} An error thrown during opening.
|
|
21322
|
+
*
|
|
21323
|
+
* @param {ModdleElement|string} bpmnDiagramOrId The diagram or Id of the BPMN diagram to open.
|
|
21313
21324
|
*
|
|
21314
|
-
*
|
|
21325
|
+
* @return {Promise<OpenResult>} A promise resolving with warnings that were produced during opening.
|
|
21315
21326
|
*/
|
|
21316
21327
|
BaseViewer.prototype.open = wrapForCompatibility(async function open(bpmnDiagramOrId) {
|
|
21317
21328
|
|
|
@@ -21352,14 +21363,6 @@
|
|
|
21352
21363
|
return { warnings };
|
|
21353
21364
|
});
|
|
21354
21365
|
|
|
21355
|
-
/**
|
|
21356
|
-
* The saveXML result.
|
|
21357
|
-
*
|
|
21358
|
-
* @typedef {Object} SaveXMLResult
|
|
21359
|
-
*
|
|
21360
|
-
* @property {string} xml
|
|
21361
|
-
*/
|
|
21362
|
-
|
|
21363
21366
|
/**
|
|
21364
21367
|
* Export the currently displayed BPMN 2.0 diagram as
|
|
21365
21368
|
* a BPMN 2.0 XML document.
|
|
@@ -21374,11 +21377,14 @@
|
|
|
21374
21377
|
*
|
|
21375
21378
|
* You can use these events to hook into the life-cycle.
|
|
21376
21379
|
*
|
|
21377
|
-
* @
|
|
21378
|
-
*
|
|
21379
|
-
* @
|
|
21380
|
+
* @throws {Error} An error thrown during export.
|
|
21381
|
+
*
|
|
21382
|
+
* @fires BaseViewer#SaveXMLStart
|
|
21383
|
+
* @fires BaseViewer#SaveXMLDone
|
|
21384
|
+
*
|
|
21385
|
+
* @param {SaveXMLOptions} [options] The options.
|
|
21380
21386
|
*
|
|
21381
|
-
*
|
|
21387
|
+
* @return {Promise<SaveXMLResult>} A promise resolving with the XML.
|
|
21382
21388
|
*/
|
|
21383
21389
|
BaseViewer.prototype.saveXML = wrapForCompatibility(async function saveXML(options) {
|
|
21384
21390
|
|
|
@@ -21393,6 +21399,14 @@
|
|
|
21393
21399
|
}
|
|
21394
21400
|
|
|
21395
21401
|
// allow to fiddle around with definitions
|
|
21402
|
+
|
|
21403
|
+
/**
|
|
21404
|
+
* A `saveXML.start` event.
|
|
21405
|
+
*
|
|
21406
|
+
* @event BaseViewer#SaveXMLStart
|
|
21407
|
+
* @type {Object}
|
|
21408
|
+
* @property {ModdleElement} definitions The definitions model element.
|
|
21409
|
+
*/
|
|
21396
21410
|
definitions = this._emit('saveXML.start', {
|
|
21397
21411
|
definitions
|
|
21398
21412
|
}) || definitions;
|
|
@@ -21409,6 +21423,14 @@
|
|
|
21409
21423
|
|
|
21410
21424
|
const result = error ? { error } : { xml };
|
|
21411
21425
|
|
|
21426
|
+
/**
|
|
21427
|
+
* A `saveXML.done` event.
|
|
21428
|
+
*
|
|
21429
|
+
* @event BaseViewer#SaveXMLDone
|
|
21430
|
+
* @type {Object}
|
|
21431
|
+
* @property {Error} [error] An error thrown when saving the XML.
|
|
21432
|
+
* @property {string} [xml] The saved XML.
|
|
21433
|
+
*/
|
|
21412
21434
|
this._emit('saveXML.done', result);
|
|
21413
21435
|
|
|
21414
21436
|
if (error) {
|
|
@@ -21418,13 +21440,6 @@
|
|
|
21418
21440
|
return result;
|
|
21419
21441
|
});
|
|
21420
21442
|
|
|
21421
|
-
/**
|
|
21422
|
-
* The saveSVG result.
|
|
21423
|
-
*
|
|
21424
|
-
* @typedef {Object} SaveSVGResult
|
|
21425
|
-
*
|
|
21426
|
-
* @property {string} svg
|
|
21427
|
-
*/
|
|
21428
21443
|
|
|
21429
21444
|
/**
|
|
21430
21445
|
* Export the currently displayed BPMN 2.0 diagram as
|
|
@@ -21439,11 +21454,13 @@
|
|
|
21439
21454
|
*
|
|
21440
21455
|
* You can use these events to hook into the life-cycle.
|
|
21441
21456
|
*
|
|
21442
|
-
* @
|
|
21457
|
+
* @throws {Error} An error thrown during export.
|
|
21458
|
+
*
|
|
21459
|
+
* @fires BaseViewer#SaveSVGDone
|
|
21443
21460
|
*
|
|
21444
|
-
*
|
|
21461
|
+
* @return {Promise<SaveSVGResult>} A promise resolving with the SVG.
|
|
21445
21462
|
*/
|
|
21446
|
-
BaseViewer.prototype.saveSVG = wrapForCompatibility(async function saveSVG(
|
|
21463
|
+
BaseViewer.prototype.saveSVG = wrapForCompatibility(async function saveSVG() {
|
|
21447
21464
|
this._emit('saveSVG.start');
|
|
21448
21465
|
|
|
21449
21466
|
let svg, err;
|
|
@@ -21472,6 +21489,14 @@
|
|
|
21472
21489
|
err = e;
|
|
21473
21490
|
}
|
|
21474
21491
|
|
|
21492
|
+
/**
|
|
21493
|
+
* A `saveSVG.done` event.
|
|
21494
|
+
*
|
|
21495
|
+
* @event BaseViewer#SaveSVGDone
|
|
21496
|
+
* @type {Object}
|
|
21497
|
+
* @property {Error} [error] An error thrown when saving the SVG.
|
|
21498
|
+
* @property {string} [svg] The saved SVG.
|
|
21499
|
+
*/
|
|
21475
21500
|
this._emit('saveSVG.done', {
|
|
21476
21501
|
error: err,
|
|
21477
21502
|
svg: svg
|
|
@@ -21523,21 +21548,17 @@
|
|
|
21523
21548
|
/**
|
|
21524
21549
|
* Return modules to instantiate with.
|
|
21525
21550
|
*
|
|
21526
|
-
* @
|
|
21527
|
-
*
|
|
21528
|
-
* @return {Module[]}
|
|
21551
|
+
* @return {ModuleDeclaration[]} The modules.
|
|
21529
21552
|
*/
|
|
21530
|
-
BaseViewer.prototype.getModules = function(
|
|
21553
|
+
BaseViewer.prototype.getModules = function() {
|
|
21531
21554
|
return this._modules;
|
|
21532
21555
|
};
|
|
21533
21556
|
|
|
21534
21557
|
/**
|
|
21535
21558
|
* Remove all drawn elements from the viewer.
|
|
21536
21559
|
*
|
|
21537
|
-
* After calling this method the viewer can still
|
|
21538
|
-
*
|
|
21539
|
-
*
|
|
21540
|
-
* @method BaseViewer#clear
|
|
21560
|
+
* After calling this method the viewer can still be reused for opening another
|
|
21561
|
+
* diagram.
|
|
21541
21562
|
*/
|
|
21542
21563
|
BaseViewer.prototype.clear = function() {
|
|
21543
21564
|
if (!this.getDefinitions()) {
|
|
@@ -21551,8 +21572,8 @@
|
|
|
21551
21572
|
};
|
|
21552
21573
|
|
|
21553
21574
|
/**
|
|
21554
|
-
* Destroy the viewer instance and remove all its
|
|
21555
|
-
*
|
|
21575
|
+
* Destroy the viewer instance and remove all its remainders from the document
|
|
21576
|
+
* tree.
|
|
21556
21577
|
*/
|
|
21557
21578
|
BaseViewer.prototype.destroy = function() {
|
|
21558
21579
|
|
|
@@ -21564,29 +21585,34 @@
|
|
|
21564
21585
|
};
|
|
21565
21586
|
|
|
21566
21587
|
/**
|
|
21567
|
-
* Register an event listener
|
|
21588
|
+
* Register an event listener.
|
|
21568
21589
|
*
|
|
21569
|
-
* Remove
|
|
21590
|
+
* Remove an event listener via {@link BaseViewer#off}.
|
|
21570
21591
|
*
|
|
21571
|
-
* @param {string} event
|
|
21572
|
-
* @param {number} [priority]
|
|
21573
|
-
* @param {
|
|
21574
|
-
* @param {
|
|
21592
|
+
* @param {string|string[]} events The event(s) to listen to.
|
|
21593
|
+
* @param {number} [priority] The priority with which to listen.
|
|
21594
|
+
* @param {EventCallback} callback The callback.
|
|
21595
|
+
* @param {*} [that] Value of `this` the callback will be called with.
|
|
21575
21596
|
*/
|
|
21576
|
-
BaseViewer.prototype.on = function(
|
|
21577
|
-
return this.get('eventBus').on(
|
|
21597
|
+
BaseViewer.prototype.on = function(events, priority, callback, that) {
|
|
21598
|
+
return this.get('eventBus').on(events, priority, callback, that);
|
|
21578
21599
|
};
|
|
21579
21600
|
|
|
21580
21601
|
/**
|
|
21581
|
-
*
|
|
21602
|
+
* Remove an event listener.
|
|
21582
21603
|
*
|
|
21583
|
-
* @param {string} event
|
|
21584
|
-
* @param {Function} callback
|
|
21604
|
+
* @param {string|string[]} events The event(s).
|
|
21605
|
+
* @param {Function} [callback] The callback.
|
|
21585
21606
|
*/
|
|
21586
|
-
BaseViewer.prototype.off = function(
|
|
21587
|
-
this.get('eventBus').off(
|
|
21607
|
+
BaseViewer.prototype.off = function(events, callback) {
|
|
21608
|
+
this.get('eventBus').off(events, callback);
|
|
21588
21609
|
};
|
|
21589
21610
|
|
|
21611
|
+
/**
|
|
21612
|
+
* Attach the viewer to an HTML element.
|
|
21613
|
+
*
|
|
21614
|
+
* @param {HTMLElement} parentNode The parent node to attach to.
|
|
21615
|
+
*/
|
|
21590
21616
|
BaseViewer.prototype.attachTo = function(parentNode) {
|
|
21591
21617
|
|
|
21592
21618
|
if (!parentNode) {
|
|
@@ -21613,10 +21639,20 @@
|
|
|
21613
21639
|
this.get('canvas').resized();
|
|
21614
21640
|
};
|
|
21615
21641
|
|
|
21642
|
+
/**
|
|
21643
|
+
* Get the definitions model element.
|
|
21644
|
+
*
|
|
21645
|
+
* @returns {ModdleElement} The definitions model element.
|
|
21646
|
+
*/
|
|
21616
21647
|
BaseViewer.prototype.getDefinitions = function() {
|
|
21617
21648
|
return this._definitions;
|
|
21618
21649
|
};
|
|
21619
21650
|
|
|
21651
|
+
/**
|
|
21652
|
+
* Detach the viewer.
|
|
21653
|
+
*
|
|
21654
|
+
* @fires BaseViewer#DetachEvent
|
|
21655
|
+
*/
|
|
21620
21656
|
BaseViewer.prototype.detach = function() {
|
|
21621
21657
|
|
|
21622
21658
|
const container = this._container,
|
|
@@ -21626,6 +21662,12 @@
|
|
|
21626
21662
|
return;
|
|
21627
21663
|
}
|
|
21628
21664
|
|
|
21665
|
+
/**
|
|
21666
|
+
* A `detach` event.
|
|
21667
|
+
*
|
|
21668
|
+
* @event BaseViewer#DetachEvent
|
|
21669
|
+
* @type {Object}
|
|
21670
|
+
*/
|
|
21629
21671
|
this._emit('detach', {});
|
|
21630
21672
|
|
|
21631
21673
|
parentNode.removeChild(container);
|
|
@@ -21663,7 +21705,7 @@
|
|
|
21663
21705
|
* @param {string} type
|
|
21664
21706
|
* @param {Object} event
|
|
21665
21707
|
*
|
|
21666
|
-
* @return {Object}
|
|
21708
|
+
* @return {Object} The return value after calling all event listeners.
|
|
21667
21709
|
*/
|
|
21668
21710
|
BaseViewer.prototype._emit = function(type, event) {
|
|
21669
21711
|
return this.get('eventBus').fire(type, event);
|
|
@@ -21789,7 +21831,7 @@
|
|
|
21789
21831
|
/* </project-logo> */
|
|
21790
21832
|
|
|
21791
21833
|
/**
|
|
21792
|
-
* @typedef { import('
|
|
21834
|
+
* @typedef { import('./BaseViewer').BaseViewerOptions } BaseViewerOptions
|
|
21793
21835
|
*/
|
|
21794
21836
|
|
|
21795
21837
|
/**
|
|
@@ -21831,13 +21873,7 @@
|
|
|
21831
21873
|
* bpmnViewer.importXML(...);
|
|
21832
21874
|
* ```
|
|
21833
21875
|
*
|
|
21834
|
-
* @param {
|
|
21835
|
-
* @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
|
|
21836
|
-
* @param {string|number} [options.width] the width of the viewer
|
|
21837
|
-
* @param {string|number} [options.height] the height of the viewer
|
|
21838
|
-
* @param {Object} [options.moddleExtensions] extension packages to provide
|
|
21839
|
-
* @param {Module[]} [options.modules] a list of modules to override the default modules
|
|
21840
|
-
* @param {Module[]} [options.additionalModules] a list of modules to use with the default modules
|
|
21876
|
+
* @param {BaseViewerOptions} [options] The options to configure the viewer.
|
|
21841
21877
|
*/
|
|
21842
21878
|
function Viewer(options) {
|
|
21843
21879
|
BaseViewer.call(this, options);
|
|
@@ -22848,9 +22884,13 @@
|
|
|
22848
22884
|
};
|
|
22849
22885
|
|
|
22850
22886
|
/**
|
|
22851
|
-
*
|
|
22887
|
+
* @typedef { import('./BaseViewer').BaseViewerOptions } BaseViewerOptions
|
|
22888
|
+
*/
|
|
22889
|
+
|
|
22890
|
+
/**
|
|
22891
|
+
* A viewer with mouse and keyboard navigation features.
|
|
22852
22892
|
*
|
|
22853
|
-
* @param {
|
|
22893
|
+
* @param {BaseViewerOptions} [options]
|
|
22854
22894
|
*/
|
|
22855
22895
|
function NavigatedViewer$1(options) {
|
|
22856
22896
|
Viewer.call(this, options);
|
|
@@ -22870,7 +22910,11 @@
|
|
|
22870
22910
|
NavigatedViewer$1.prototype._navigationModules
|
|
22871
22911
|
);
|
|
22872
22912
|
|
|
22873
|
-
var
|
|
22913
|
+
var inherits_browserExports = {};
|
|
22914
|
+
var inherits_browser = {
|
|
22915
|
+
get exports(){ return inherits_browserExports; },
|
|
22916
|
+
set exports(v){ inherits_browserExports = v; },
|
|
22917
|
+
};
|
|
22874
22918
|
|
|
22875
22919
|
if (typeof Object.create === 'function') {
|
|
22876
22920
|
// implementation from standard node.js 'util' module
|
|
@@ -22917,7 +22961,7 @@
|
|
|
22917
22961
|
BaseRenderer.call(this, eventBus, HIGH_PRIORITY);
|
|
22918
22962
|
}
|
|
22919
22963
|
|
|
22920
|
-
|
|
22964
|
+
inherits_browserExports(IconsRenderer, BaseRenderer);
|
|
22921
22965
|
|
|
22922
22966
|
IconsRenderer.prototype.canRender = function(element) {
|
|
22923
22967
|
|
|
@@ -23300,6 +23344,29 @@
|
|
|
23300
23344
|
}
|
|
23301
23345
|
]
|
|
23302
23346
|
},
|
|
23347
|
+
{
|
|
23348
|
+
name: "TaskSchedule",
|
|
23349
|
+
superClass: [
|
|
23350
|
+
"Element"
|
|
23351
|
+
],
|
|
23352
|
+
meta: {
|
|
23353
|
+
allowedIn: [
|
|
23354
|
+
"bpmn:UserTask"
|
|
23355
|
+
]
|
|
23356
|
+
},
|
|
23357
|
+
properties: [
|
|
23358
|
+
{
|
|
23359
|
+
name: "dueDate",
|
|
23360
|
+
type: "String",
|
|
23361
|
+
isAttr: true
|
|
23362
|
+
},
|
|
23363
|
+
{
|
|
23364
|
+
name: "followUpDate",
|
|
23365
|
+
type: "String",
|
|
23366
|
+
isAttr: true
|
|
23367
|
+
}
|
|
23368
|
+
]
|
|
23369
|
+
},
|
|
23303
23370
|
{
|
|
23304
23371
|
name: "Properties",
|
|
23305
23372
|
superClass: [
|
|
@@ -23311,12 +23378,7 @@
|
|
|
23311
23378
|
type: "Property",
|
|
23312
23379
|
isMany: true
|
|
23313
23380
|
}
|
|
23314
|
-
]
|
|
23315
|
-
meta: {
|
|
23316
|
-
allowedIn: [
|
|
23317
|
-
"zeebe:PropertiesHolder"
|
|
23318
|
-
]
|
|
23319
|
-
}
|
|
23381
|
+
]
|
|
23320
23382
|
},
|
|
23321
23383
|
{
|
|
23322
23384
|
name: "Property",
|
|
@@ -23331,18 +23393,6 @@
|
|
|
23331
23393
|
type: "String",
|
|
23332
23394
|
isAttr: true
|
|
23333
23395
|
}
|
|
23334
|
-
],
|
|
23335
|
-
meta: {
|
|
23336
|
-
allowedIn: [
|
|
23337
|
-
"zeebe:PropertiesHolder"
|
|
23338
|
-
]
|
|
23339
|
-
}
|
|
23340
|
-
},
|
|
23341
|
-
{
|
|
23342
|
-
name: "PropertiesHolder",
|
|
23343
|
-
isAbstract: true,
|
|
23344
|
-
"extends": [
|
|
23345
|
-
"bpmn:FlowNode"
|
|
23346
23396
|
]
|
|
23347
23397
|
},
|
|
23348
23398
|
{
|