camunda-bpmn-js 2.0.2 → 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/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 +17 -15
- 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
|
@@ -11025,7 +11025,11 @@
|
|
|
11025
11025
|
}
|
|
11026
11026
|
};
|
|
11027
11027
|
|
|
11028
|
-
var
|
|
11028
|
+
var objectRefsExports = {};
|
|
11029
|
+
var objectRefs = {
|
|
11030
|
+
get exports(){ return objectRefsExports; },
|
|
11031
|
+
set exports(v){ objectRefsExports = v; },
|
|
11032
|
+
};
|
|
11029
11033
|
|
|
11030
11034
|
var collection = {};
|
|
11031
11035
|
|
|
@@ -11345,7 +11349,7 @@
|
|
|
11345
11349
|
module.exports.Collection = collection;
|
|
11346
11350
|
} (objectRefs));
|
|
11347
11351
|
|
|
11348
|
-
var Refs = /*@__PURE__*/getDefaultExportFromCjs(
|
|
11352
|
+
var Refs = /*@__PURE__*/getDefaultExportFromCjs(objectRefsExports);
|
|
11349
11353
|
|
|
11350
11354
|
var parentRefs = new Refs({ name: 'children', enumerable: true, collection: true }, { name: 'parent' }),
|
|
11351
11355
|
labelRefs = new Refs({ name: 'labels', enumerable: true, collection: true }, { name: 'labelTarget' }),
|
|
@@ -21059,7 +21063,20 @@
|
|
|
21059
21063
|
|
|
21060
21064
|
|
|
21061
21065
|
/**
|
|
21062
|
-
* @typedef {
|
|
21066
|
+
* @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
|
|
21067
|
+
*
|
|
21068
|
+
* @typedef {import('./BaseViewer').BaseModelerOptions} BaseModelerOptions
|
|
21069
|
+
* @typedef {import('./BaseViewer').ModdleElement} ModdleElement
|
|
21070
|
+
* @typedef {import('./BaseViewer').ImportXMLResult} ImportXMLResult
|
|
21071
|
+
* @typedef {import('./BaseViewer').ImportXMLError} ImportXMLError
|
|
21072
|
+
* @typedef {import('./BaseViewer').ImportDefinitionsResult} ImportDefinitionsResult
|
|
21073
|
+
* @typedef {import('./BaseViewer').ImportDefinitionsError} ImportDefinitionsError
|
|
21074
|
+
* @typedef {import('./BaseViewer').ModdleElement} ModdleElement
|
|
21075
|
+
* @typedef {import('./BaseViewer').ModdleElementsById} ModdleElementsById
|
|
21076
|
+
* @typedef {import('./BaseViewer').OpenResult} OpenResult
|
|
21077
|
+
* @typedef {import('./BaseViewer').OpenError} OpenError
|
|
21078
|
+
* @typedef {import('./BaseViewer').SaveXMLOptions} SaveXMLOptions
|
|
21079
|
+
* @typedef {import('./BaseViewer').SaveXMLResult} SaveXMLResult
|
|
21063
21080
|
*/
|
|
21064
21081
|
|
|
21065
21082
|
/**
|
|
@@ -21068,20 +21085,20 @@
|
|
|
21068
21085
|
* Have a look at {@link Viewer}, {@link NavigatedViewer} or {@link Modeler} for
|
|
21069
21086
|
* bundles that include actual features.
|
|
21070
21087
|
*
|
|
21071
|
-
* @param {
|
|
21072
|
-
* @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
|
|
21073
|
-
* @param {string|number} [options.width] the width of the viewer
|
|
21074
|
-
* @param {string|number} [options.height] the height of the viewer
|
|
21075
|
-
* @param {Object} [options.moddleExtensions] extension packages to provide
|
|
21076
|
-
* @param {Module[]} [options.modules] a list of modules to override the default modules
|
|
21077
|
-
* @param {Module[]} [options.additionalModules] a list of modules to use with the default modules
|
|
21088
|
+
* @param {BaseModelerOptions} [options] The options to configure the viewer.
|
|
21078
21089
|
*/
|
|
21079
21090
|
function BaseViewer(options) {
|
|
21080
21091
|
|
|
21092
|
+
/**
|
|
21093
|
+
* @type {BaseModelerOptions}
|
|
21094
|
+
*/
|
|
21081
21095
|
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
21082
21096
|
|
|
21083
21097
|
this._moddle = this._createModdle(options);
|
|
21084
21098
|
|
|
21099
|
+
/**
|
|
21100
|
+
* @type {HTMLElement}
|
|
21101
|
+
*/
|
|
21085
21102
|
this._container = this._createContainer(options);
|
|
21086
21103
|
|
|
21087
21104
|
/* <project-logo> */
|
|
@@ -21095,22 +21112,6 @@
|
|
|
21095
21112
|
|
|
21096
21113
|
e(BaseViewer, Diagram);
|
|
21097
21114
|
|
|
21098
|
-
/**
|
|
21099
|
-
* The importXML result.
|
|
21100
|
-
*
|
|
21101
|
-
* @typedef {Object} ImportXMLResult
|
|
21102
|
-
*
|
|
21103
|
-
* @property {Array<string>} warnings
|
|
21104
|
-
*/
|
|
21105
|
-
|
|
21106
|
-
/**
|
|
21107
|
-
* The importXML error.
|
|
21108
|
-
*
|
|
21109
|
-
* @typedef {Error} ImportXMLError
|
|
21110
|
-
*
|
|
21111
|
-
* @property {Array<string>} warnings
|
|
21112
|
-
*/
|
|
21113
|
-
|
|
21114
21115
|
/**
|
|
21115
21116
|
* Parse and render a BPMN 2.0 diagram.
|
|
21116
21117
|
*
|
|
@@ -21121,7 +21122,7 @@
|
|
|
21121
21122
|
*
|
|
21122
21123
|
* During import the viewer will fire life-cycle events:
|
|
21123
21124
|
*
|
|
21124
|
-
* * import.parse.start (about to read model from
|
|
21125
|
+
* * import.parse.start (about to read model from XML)
|
|
21125
21126
|
* * import.parse.complete (model read; may have worked or not)
|
|
21126
21127
|
* * import.render.start (graphical import start)
|
|
21127
21128
|
* * import.render.complete (graphical import finished)
|
|
@@ -21129,10 +21130,18 @@
|
|
|
21129
21130
|
*
|
|
21130
21131
|
* You can use these events to hook into the life-cycle.
|
|
21131
21132
|
*
|
|
21132
|
-
* @
|
|
21133
|
-
*
|
|
21133
|
+
* @throws {ImportXMLError} An error thrown during the import of the XML.
|
|
21134
|
+
*
|
|
21135
|
+
* @fires BaseViewer#ImportParseStart
|
|
21136
|
+
* @fires BaseViewer#ImportParseComplete
|
|
21137
|
+
* @fires Importer#ImportRenderStart
|
|
21138
|
+
* @fires Importer#ImportRenderComplete
|
|
21139
|
+
* @fires BaseViewer#ImportDone
|
|
21134
21140
|
*
|
|
21135
|
-
*
|
|
21141
|
+
* @param {string} xml The BPMN 2.0 XML to be imported.
|
|
21142
|
+
* @param {ModdleElement|string} [bpmnDiagram] The optional diagram or Id of the BPMN diagram to open.
|
|
21143
|
+
*
|
|
21144
|
+
* @return {Promise<ImportXMLResult>} A promise resolving with warnings that were produced during the import.
|
|
21136
21145
|
*/
|
|
21137
21146
|
BaseViewer.prototype.importXML = wrapForCompatibility(async function importXML(xml, bpmnDiagram) {
|
|
21138
21147
|
|
|
@@ -21168,6 +21177,14 @@
|
|
|
21168
21177
|
|
|
21169
21178
|
// hook in pre-parse listeners +
|
|
21170
21179
|
// allow xml manipulation
|
|
21180
|
+
|
|
21181
|
+
/**
|
|
21182
|
+
* A `import.parse.start` event.
|
|
21183
|
+
*
|
|
21184
|
+
* @event BaseViewer#ImportParseStart
|
|
21185
|
+
* @type {Object}
|
|
21186
|
+
* @property {string} xml The XML that is to be parsed.
|
|
21187
|
+
*/
|
|
21171
21188
|
xml = this._emit('import.parse.start', { xml: xml }) || xml;
|
|
21172
21189
|
|
|
21173
21190
|
let parseResult;
|
|
@@ -21190,6 +21207,18 @@
|
|
|
21190
21207
|
|
|
21191
21208
|
// hook in post parse listeners +
|
|
21192
21209
|
// allow definitions manipulation
|
|
21210
|
+
|
|
21211
|
+
/**
|
|
21212
|
+
* A `import.parse.complete` event.
|
|
21213
|
+
*
|
|
21214
|
+
* @event BaseViewer#ImportParseComplete
|
|
21215
|
+
* @type {Object}
|
|
21216
|
+
* @property {Error|null} error An error thrown when parsing the XML.
|
|
21217
|
+
* @property {ModdleElement} definitions The definitions model element.
|
|
21218
|
+
* @property {ModdleElementsById} elementsById The model elements by ID.
|
|
21219
|
+
* @property {ModdleElement[]} references The referenced model elements.
|
|
21220
|
+
* @property {string[]} warnings The warnings produced when parsing the XML.
|
|
21221
|
+
*/
|
|
21193
21222
|
definitions = this._emit('import.parse.complete', ParseCompleteEvent({
|
|
21194
21223
|
error: null,
|
|
21195
21224
|
definitions: definitions,
|
|
@@ -21202,6 +21231,14 @@
|
|
|
21202
21231
|
|
|
21203
21232
|
aggregatedWarnings = aggregatedWarnings.concat(importResult.warnings);
|
|
21204
21233
|
|
|
21234
|
+
/**
|
|
21235
|
+
* A `import.parse.complete` event.
|
|
21236
|
+
*
|
|
21237
|
+
* @event BaseViewer#ImportDone
|
|
21238
|
+
* @type {Object}
|
|
21239
|
+
* @property {ImportXMLError|null} error An error thrown during import.
|
|
21240
|
+
* @property {string[]} warnings The warnings.
|
|
21241
|
+
*/
|
|
21205
21242
|
this._emit('import.done', { error: null, warnings: aggregatedWarnings });
|
|
21206
21243
|
|
|
21207
21244
|
return { warnings: aggregatedWarnings };
|
|
@@ -21218,21 +21255,6 @@
|
|
|
21218
21255
|
}
|
|
21219
21256
|
});
|
|
21220
21257
|
|
|
21221
|
-
/**
|
|
21222
|
-
* The importDefinitions result.
|
|
21223
|
-
*
|
|
21224
|
-
* @typedef {Object} ImportDefinitionsResult
|
|
21225
|
-
*
|
|
21226
|
-
* @property {Array<string>} warnings
|
|
21227
|
-
*/
|
|
21228
|
-
|
|
21229
|
-
/**
|
|
21230
|
-
* The importDefinitions error.
|
|
21231
|
-
*
|
|
21232
|
-
* @typedef {Error} ImportDefinitionsError
|
|
21233
|
-
*
|
|
21234
|
-
* @property {Array<string>} warnings
|
|
21235
|
-
*/
|
|
21236
21258
|
|
|
21237
21259
|
/**
|
|
21238
21260
|
* Import parsed definitions and render a BPMN 2.0 diagram.
|
|
@@ -21249,10 +21271,12 @@
|
|
|
21249
21271
|
*
|
|
21250
21272
|
* You can use these events to hook into the life-cycle.
|
|
21251
21273
|
*
|
|
21252
|
-
* @
|
|
21253
|
-
*
|
|
21274
|
+
* @throws {ImportDefinitionsError} An error thrown during the import of the definitions.
|
|
21275
|
+
*
|
|
21276
|
+
* @param {ModdleElement} definitions The definitions.
|
|
21277
|
+
* @param {ModdleElement|string} [bpmnDiagram] The optional diagram or ID of the BPMN diagram to open.
|
|
21254
21278
|
*
|
|
21255
|
-
*
|
|
21279
|
+
* @return {Promise<ImportDefinitionsResult>} A promise resolving with warnings that were produced during the import.
|
|
21256
21280
|
*/
|
|
21257
21281
|
BaseViewer.prototype.importDefinitions = wrapForCompatibility(async function importDefinitions(definitions, bpmnDiagram) {
|
|
21258
21282
|
this._setDefinitions(definitions);
|
|
@@ -21261,21 +21285,6 @@
|
|
|
21261
21285
|
return { warnings: result.warnings };
|
|
21262
21286
|
});
|
|
21263
21287
|
|
|
21264
|
-
/**
|
|
21265
|
-
* The open result.
|
|
21266
|
-
*
|
|
21267
|
-
* @typedef {Object} OpenResult
|
|
21268
|
-
*
|
|
21269
|
-
* @property {Array<string>} warnings
|
|
21270
|
-
*/
|
|
21271
|
-
|
|
21272
|
-
/**
|
|
21273
|
-
* The open error.
|
|
21274
|
-
*
|
|
21275
|
-
* @typedef {Error} OpenError
|
|
21276
|
-
*
|
|
21277
|
-
* @property {Array<string>} warnings
|
|
21278
|
-
*/
|
|
21279
21288
|
|
|
21280
21289
|
/**
|
|
21281
21290
|
* Open diagram of previously imported XML.
|
|
@@ -21292,9 +21301,11 @@
|
|
|
21292
21301
|
*
|
|
21293
21302
|
* You can use these events to hook into the life-cycle.
|
|
21294
21303
|
*
|
|
21295
|
-
* @
|
|
21304
|
+
* @throws {OpenError} An error thrown during opening.
|
|
21296
21305
|
*
|
|
21297
|
-
*
|
|
21306
|
+
* @param {ModdleElement|string} bpmnDiagramOrId The diagram or Id of the BPMN diagram to open.
|
|
21307
|
+
*
|
|
21308
|
+
* @return {Promise<OpenResult>} A promise resolving with warnings that were produced during opening.
|
|
21298
21309
|
*/
|
|
21299
21310
|
BaseViewer.prototype.open = wrapForCompatibility(async function open(bpmnDiagramOrId) {
|
|
21300
21311
|
|
|
@@ -21335,14 +21346,6 @@
|
|
|
21335
21346
|
return { warnings };
|
|
21336
21347
|
});
|
|
21337
21348
|
|
|
21338
|
-
/**
|
|
21339
|
-
* The saveXML result.
|
|
21340
|
-
*
|
|
21341
|
-
* @typedef {Object} SaveXMLResult
|
|
21342
|
-
*
|
|
21343
|
-
* @property {string} xml
|
|
21344
|
-
*/
|
|
21345
|
-
|
|
21346
21349
|
/**
|
|
21347
21350
|
* Export the currently displayed BPMN 2.0 diagram as
|
|
21348
21351
|
* a BPMN 2.0 XML document.
|
|
@@ -21357,11 +21360,14 @@
|
|
|
21357
21360
|
*
|
|
21358
21361
|
* You can use these events to hook into the life-cycle.
|
|
21359
21362
|
*
|
|
21360
|
-
* @
|
|
21361
|
-
*
|
|
21362
|
-
* @
|
|
21363
|
+
* @throws {Error} An error thrown during export.
|
|
21364
|
+
*
|
|
21365
|
+
* @fires BaseViewer#SaveXMLStart
|
|
21366
|
+
* @fires BaseViewer#SaveXMLDone
|
|
21367
|
+
*
|
|
21368
|
+
* @param {SaveXMLOptions} [options] The options.
|
|
21363
21369
|
*
|
|
21364
|
-
*
|
|
21370
|
+
* @return {Promise<SaveXMLResult>} A promise resolving with the XML.
|
|
21365
21371
|
*/
|
|
21366
21372
|
BaseViewer.prototype.saveXML = wrapForCompatibility(async function saveXML(options) {
|
|
21367
21373
|
|
|
@@ -21376,6 +21382,14 @@
|
|
|
21376
21382
|
}
|
|
21377
21383
|
|
|
21378
21384
|
// allow to fiddle around with definitions
|
|
21385
|
+
|
|
21386
|
+
/**
|
|
21387
|
+
* A `saveXML.start` event.
|
|
21388
|
+
*
|
|
21389
|
+
* @event BaseViewer#SaveXMLStart
|
|
21390
|
+
* @type {Object}
|
|
21391
|
+
* @property {ModdleElement} definitions The definitions model element.
|
|
21392
|
+
*/
|
|
21379
21393
|
definitions = this._emit('saveXML.start', {
|
|
21380
21394
|
definitions
|
|
21381
21395
|
}) || definitions;
|
|
@@ -21392,6 +21406,14 @@
|
|
|
21392
21406
|
|
|
21393
21407
|
const result = error ? { error } : { xml };
|
|
21394
21408
|
|
|
21409
|
+
/**
|
|
21410
|
+
* A `saveXML.done` event.
|
|
21411
|
+
*
|
|
21412
|
+
* @event BaseViewer#SaveXMLDone
|
|
21413
|
+
* @type {Object}
|
|
21414
|
+
* @property {Error} [error] An error thrown when saving the XML.
|
|
21415
|
+
* @property {string} [xml] The saved XML.
|
|
21416
|
+
*/
|
|
21395
21417
|
this._emit('saveXML.done', result);
|
|
21396
21418
|
|
|
21397
21419
|
if (error) {
|
|
@@ -21401,13 +21423,6 @@
|
|
|
21401
21423
|
return result;
|
|
21402
21424
|
});
|
|
21403
21425
|
|
|
21404
|
-
/**
|
|
21405
|
-
* The saveSVG result.
|
|
21406
|
-
*
|
|
21407
|
-
* @typedef {Object} SaveSVGResult
|
|
21408
|
-
*
|
|
21409
|
-
* @property {string} svg
|
|
21410
|
-
*/
|
|
21411
21426
|
|
|
21412
21427
|
/**
|
|
21413
21428
|
* Export the currently displayed BPMN 2.0 diagram as
|
|
@@ -21422,11 +21437,13 @@
|
|
|
21422
21437
|
*
|
|
21423
21438
|
* You can use these events to hook into the life-cycle.
|
|
21424
21439
|
*
|
|
21425
|
-
* @
|
|
21440
|
+
* @throws {Error} An error thrown during export.
|
|
21426
21441
|
*
|
|
21427
|
-
*
|
|
21442
|
+
* @fires BaseViewer#SaveSVGDone
|
|
21443
|
+
*
|
|
21444
|
+
* @return {Promise<SaveSVGResult>} A promise resolving with the SVG.
|
|
21428
21445
|
*/
|
|
21429
|
-
BaseViewer.prototype.saveSVG = wrapForCompatibility(async function saveSVG(
|
|
21446
|
+
BaseViewer.prototype.saveSVG = wrapForCompatibility(async function saveSVG() {
|
|
21430
21447
|
this._emit('saveSVG.start');
|
|
21431
21448
|
|
|
21432
21449
|
let svg, err;
|
|
@@ -21455,6 +21472,14 @@
|
|
|
21455
21472
|
err = e;
|
|
21456
21473
|
}
|
|
21457
21474
|
|
|
21475
|
+
/**
|
|
21476
|
+
* A `saveSVG.done` event.
|
|
21477
|
+
*
|
|
21478
|
+
* @event BaseViewer#SaveSVGDone
|
|
21479
|
+
* @type {Object}
|
|
21480
|
+
* @property {Error} [error] An error thrown when saving the SVG.
|
|
21481
|
+
* @property {string} [svg] The saved SVG.
|
|
21482
|
+
*/
|
|
21458
21483
|
this._emit('saveSVG.done', {
|
|
21459
21484
|
error: err,
|
|
21460
21485
|
svg: svg
|
|
@@ -21506,21 +21531,17 @@
|
|
|
21506
21531
|
/**
|
|
21507
21532
|
* Return modules to instantiate with.
|
|
21508
21533
|
*
|
|
21509
|
-
* @
|
|
21510
|
-
*
|
|
21511
|
-
* @return {Module[]}
|
|
21534
|
+
* @return {ModuleDeclaration[]} The modules.
|
|
21512
21535
|
*/
|
|
21513
|
-
BaseViewer.prototype.getModules = function(
|
|
21536
|
+
BaseViewer.prototype.getModules = function() {
|
|
21514
21537
|
return this._modules;
|
|
21515
21538
|
};
|
|
21516
21539
|
|
|
21517
21540
|
/**
|
|
21518
21541
|
* Remove all drawn elements from the viewer.
|
|
21519
21542
|
*
|
|
21520
|
-
* After calling this method the viewer can still
|
|
21521
|
-
*
|
|
21522
|
-
*
|
|
21523
|
-
* @method BaseViewer#clear
|
|
21543
|
+
* After calling this method the viewer can still be reused for opening another
|
|
21544
|
+
* diagram.
|
|
21524
21545
|
*/
|
|
21525
21546
|
BaseViewer.prototype.clear = function() {
|
|
21526
21547
|
if (!this.getDefinitions()) {
|
|
@@ -21534,8 +21555,8 @@
|
|
|
21534
21555
|
};
|
|
21535
21556
|
|
|
21536
21557
|
/**
|
|
21537
|
-
* Destroy the viewer instance and remove all its
|
|
21538
|
-
*
|
|
21558
|
+
* Destroy the viewer instance and remove all its remainders from the document
|
|
21559
|
+
* tree.
|
|
21539
21560
|
*/
|
|
21540
21561
|
BaseViewer.prototype.destroy = function() {
|
|
21541
21562
|
|
|
@@ -21547,29 +21568,34 @@
|
|
|
21547
21568
|
};
|
|
21548
21569
|
|
|
21549
21570
|
/**
|
|
21550
|
-
* Register an event listener
|
|
21571
|
+
* Register an event listener.
|
|
21551
21572
|
*
|
|
21552
|
-
* Remove
|
|
21573
|
+
* Remove an event listener via {@link BaseViewer#off}.
|
|
21553
21574
|
*
|
|
21554
|
-
* @param {string} event
|
|
21555
|
-
* @param {number} [priority]
|
|
21556
|
-
* @param {
|
|
21557
|
-
* @param {
|
|
21575
|
+
* @param {string|string[]} events The event(s) to listen to.
|
|
21576
|
+
* @param {number} [priority] The priority with which to listen.
|
|
21577
|
+
* @param {EventCallback} callback The callback.
|
|
21578
|
+
* @param {*} [that] Value of `this` the callback will be called with.
|
|
21558
21579
|
*/
|
|
21559
|
-
BaseViewer.prototype.on = function(
|
|
21560
|
-
return this.get('eventBus').on(
|
|
21580
|
+
BaseViewer.prototype.on = function(events, priority, callback, that) {
|
|
21581
|
+
return this.get('eventBus').on(events, priority, callback, that);
|
|
21561
21582
|
};
|
|
21562
21583
|
|
|
21563
21584
|
/**
|
|
21564
|
-
*
|
|
21585
|
+
* Remove an event listener.
|
|
21565
21586
|
*
|
|
21566
|
-
* @param {string} event
|
|
21567
|
-
* @param {Function} callback
|
|
21587
|
+
* @param {string|string[]} events The event(s).
|
|
21588
|
+
* @param {Function} [callback] The callback.
|
|
21568
21589
|
*/
|
|
21569
|
-
BaseViewer.prototype.off = function(
|
|
21570
|
-
this.get('eventBus').off(
|
|
21590
|
+
BaseViewer.prototype.off = function(events, callback) {
|
|
21591
|
+
this.get('eventBus').off(events, callback);
|
|
21571
21592
|
};
|
|
21572
21593
|
|
|
21594
|
+
/**
|
|
21595
|
+
* Attach the viewer to an HTML element.
|
|
21596
|
+
*
|
|
21597
|
+
* @param {HTMLElement} parentNode The parent node to attach to.
|
|
21598
|
+
*/
|
|
21573
21599
|
BaseViewer.prototype.attachTo = function(parentNode) {
|
|
21574
21600
|
|
|
21575
21601
|
if (!parentNode) {
|
|
@@ -21596,10 +21622,20 @@
|
|
|
21596
21622
|
this.get('canvas').resized();
|
|
21597
21623
|
};
|
|
21598
21624
|
|
|
21625
|
+
/**
|
|
21626
|
+
* Get the definitions model element.
|
|
21627
|
+
*
|
|
21628
|
+
* @returns {ModdleElement} The definitions model element.
|
|
21629
|
+
*/
|
|
21599
21630
|
BaseViewer.prototype.getDefinitions = function() {
|
|
21600
21631
|
return this._definitions;
|
|
21601
21632
|
};
|
|
21602
21633
|
|
|
21634
|
+
/**
|
|
21635
|
+
* Detach the viewer.
|
|
21636
|
+
*
|
|
21637
|
+
* @fires BaseViewer#DetachEvent
|
|
21638
|
+
*/
|
|
21603
21639
|
BaseViewer.prototype.detach = function() {
|
|
21604
21640
|
|
|
21605
21641
|
const container = this._container,
|
|
@@ -21609,6 +21645,12 @@
|
|
|
21609
21645
|
return;
|
|
21610
21646
|
}
|
|
21611
21647
|
|
|
21648
|
+
/**
|
|
21649
|
+
* A `detach` event.
|
|
21650
|
+
*
|
|
21651
|
+
* @event BaseViewer#DetachEvent
|
|
21652
|
+
* @type {Object}
|
|
21653
|
+
*/
|
|
21612
21654
|
this._emit('detach', {});
|
|
21613
21655
|
|
|
21614
21656
|
parentNode.removeChild(container);
|
|
@@ -21646,7 +21688,7 @@
|
|
|
21646
21688
|
* @param {string} type
|
|
21647
21689
|
* @param {Object} event
|
|
21648
21690
|
*
|
|
21649
|
-
* @return {Object}
|
|
21691
|
+
* @return {Object} The return value after calling all event listeners.
|
|
21650
21692
|
*/
|
|
21651
21693
|
BaseViewer.prototype._emit = function(type, event) {
|
|
21652
21694
|
return this.get('eventBus').fire(type, event);
|
|
@@ -21772,7 +21814,7 @@
|
|
|
21772
21814
|
/* </project-logo> */
|
|
21773
21815
|
|
|
21774
21816
|
/**
|
|
21775
|
-
* @typedef { import('
|
|
21817
|
+
* @typedef { import('./BaseViewer').BaseViewerOptions } BaseViewerOptions
|
|
21776
21818
|
*/
|
|
21777
21819
|
|
|
21778
21820
|
/**
|
|
@@ -21814,13 +21856,7 @@
|
|
|
21814
21856
|
* bpmnViewer.importXML(...);
|
|
21815
21857
|
* ```
|
|
21816
21858
|
*
|
|
21817
|
-
* @param {
|
|
21818
|
-
* @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
|
|
21819
|
-
* @param {string|number} [options.width] the width of the viewer
|
|
21820
|
-
* @param {string|number} [options.height] the height of the viewer
|
|
21821
|
-
* @param {Object} [options.moddleExtensions] extension packages to provide
|
|
21822
|
-
* @param {Module[]} [options.modules] a list of modules to override the default modules
|
|
21823
|
-
* @param {Module[]} [options.additionalModules] a list of modules to use with the default modules
|
|
21859
|
+
* @param {BaseViewerOptions} [options] The options to configure the viewer.
|
|
21824
21860
|
*/
|
|
21825
21861
|
function Viewer$1(options) {
|
|
21826
21862
|
BaseViewer.call(this, options);
|
|
@@ -21840,7 +21876,11 @@
|
|
|
21840
21876
|
// default moddle extensions the viewer is composed of
|
|
21841
21877
|
Viewer$1.prototype._moddleExtensions = {};
|
|
21842
21878
|
|
|
21843
|
-
var
|
|
21879
|
+
var inherits_browserExports = {};
|
|
21880
|
+
var inherits_browser = {
|
|
21881
|
+
get exports(){ return inherits_browserExports; },
|
|
21882
|
+
set exports(v){ inherits_browserExports = v; },
|
|
21883
|
+
};
|
|
21844
21884
|
|
|
21845
21885
|
if (typeof Object.create === 'function') {
|
|
21846
21886
|
// implementation from standard node.js 'util' module
|
|
@@ -21887,7 +21927,7 @@
|
|
|
21887
21927
|
BaseRenderer.call(this, eventBus, HIGH_PRIORITY);
|
|
21888
21928
|
}
|
|
21889
21929
|
|
|
21890
|
-
|
|
21930
|
+
inherits_browserExports(IconsRenderer, BaseRenderer);
|
|
21891
21931
|
|
|
21892
21932
|
IconsRenderer.prototype.canRender = function(element) {
|
|
21893
21933
|
|
|
@@ -22270,6 +22310,29 @@
|
|
|
22270
22310
|
}
|
|
22271
22311
|
]
|
|
22272
22312
|
},
|
|
22313
|
+
{
|
|
22314
|
+
name: "TaskSchedule",
|
|
22315
|
+
superClass: [
|
|
22316
|
+
"Element"
|
|
22317
|
+
],
|
|
22318
|
+
meta: {
|
|
22319
|
+
allowedIn: [
|
|
22320
|
+
"bpmn:UserTask"
|
|
22321
|
+
]
|
|
22322
|
+
},
|
|
22323
|
+
properties: [
|
|
22324
|
+
{
|
|
22325
|
+
name: "dueDate",
|
|
22326
|
+
type: "String",
|
|
22327
|
+
isAttr: true
|
|
22328
|
+
},
|
|
22329
|
+
{
|
|
22330
|
+
name: "followUpDate",
|
|
22331
|
+
type: "String",
|
|
22332
|
+
isAttr: true
|
|
22333
|
+
}
|
|
22334
|
+
]
|
|
22335
|
+
},
|
|
22273
22336
|
{
|
|
22274
22337
|
name: "Properties",
|
|
22275
22338
|
superClass: [
|
|
@@ -22281,12 +22344,7 @@
|
|
|
22281
22344
|
type: "Property",
|
|
22282
22345
|
isMany: true
|
|
22283
22346
|
}
|
|
22284
|
-
]
|
|
22285
|
-
meta: {
|
|
22286
|
-
allowedIn: [
|
|
22287
|
-
"zeebe:PropertiesHolder"
|
|
22288
|
-
]
|
|
22289
|
-
}
|
|
22347
|
+
]
|
|
22290
22348
|
},
|
|
22291
22349
|
{
|
|
22292
22350
|
name: "Property",
|
|
@@ -22301,18 +22359,6 @@
|
|
|
22301
22359
|
type: "String",
|
|
22302
22360
|
isAttr: true
|
|
22303
22361
|
}
|
|
22304
|
-
],
|
|
22305
|
-
meta: {
|
|
22306
|
-
allowedIn: [
|
|
22307
|
-
"zeebe:PropertiesHolder"
|
|
22308
|
-
]
|
|
22309
|
-
}
|
|
22310
|
-
},
|
|
22311
|
-
{
|
|
22312
|
-
name: "PropertiesHolder",
|
|
22313
|
-
isAbstract: true,
|
|
22314
|
-
"extends": [
|
|
22315
|
-
"bpmn:FlowNode"
|
|
22316
22362
|
]
|
|
22317
22363
|
},
|
|
22318
22364
|
{
|