camunda-bpmn-js 3.1.2 → 3.3.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/bpmn-font/css/bpmn.css +1 -0
- package/dist/assets/bpmn-js.css +1 -0
- package/dist/assets/element-templates.css +18 -1
- package/dist/base-modeler.development.js +484 -588
- package/dist/base-modeler.production.min.js +31 -31
- package/dist/base-navigated-viewer.development.js +20 -142
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +20 -142
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +66038 -46951
- package/dist/camunda-cloud-modeler.production.min.js +40 -40
- package/dist/camunda-cloud-navigated-viewer.development.js +31 -142
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +31 -142
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +574 -600
- package/dist/camunda-platform-modeler.production.min.js +31 -31
- package/dist/camunda-platform-navigated-viewer.development.js +20 -142
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +20 -142
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/base/Modeler.d.ts +15 -15
- package/lib/base/NavigatedViewer.d.ts +2 -2
- package/lib/base/Viewer.d.ts +2 -2
- package/lib/camunda-cloud/ElementTemplatesValidator.d.ts +1 -1
- package/lib/camunda-cloud/Modeler.d.ts +3 -3
- package/lib/camunda-cloud/Modeler.js +3 -1
- package/lib/camunda-cloud/NavigatedViewer.d.ts +3 -3
- package/lib/camunda-cloud/Viewer.d.ts +3 -3
- package/lib/camunda-cloud/features/rules/BpmnRules.d.ts +32 -32
- package/lib/camunda-cloud/features/rules/index.d.ts +6 -6
- package/lib/camunda-cloud/util/commonModules.d.ts +9 -9
- package/lib/camunda-platform/Modeler.d.ts +3 -3
- package/lib/camunda-platform/NavigatedViewer.d.ts +5 -5
- package/lib/camunda-platform/Viewer.d.ts +5 -5
- package/lib/camunda-platform/util/commonModules.d.ts +9 -9
- package/lib/util/ExtensionElementsUtil.d.ts +24 -24
- package/package.json +9 -7
|
@@ -2662,15 +2662,14 @@
|
|
|
2662
2662
|
*
|
|
2663
2663
|
* @param {Seed} seed
|
|
2664
2664
|
*/
|
|
2665
|
-
|
|
2666
2665
|
function Ids(seed) {
|
|
2667
2666
|
if (!(this instanceof Ids)) {
|
|
2668
2667
|
return new Ids(seed);
|
|
2669
2668
|
}
|
|
2670
|
-
|
|
2671
2669
|
seed = seed || [128, 36, 1];
|
|
2672
2670
|
this._seed = seed.length ? hat_1.rack(seed[0], seed[1], seed[2]) : seed;
|
|
2673
2671
|
}
|
|
2672
|
+
|
|
2674
2673
|
/**
|
|
2675
2674
|
* Generate a next id.
|
|
2676
2675
|
*
|
|
@@ -2678,10 +2677,10 @@
|
|
|
2678
2677
|
*
|
|
2679
2678
|
* @return {String} id
|
|
2680
2679
|
*/
|
|
2681
|
-
|
|
2682
2680
|
Ids.prototype.next = function (element) {
|
|
2683
2681
|
return this._seed(element || true);
|
|
2684
2682
|
};
|
|
2683
|
+
|
|
2685
2684
|
/**
|
|
2686
2685
|
* Generate a next id with a given prefix.
|
|
2687
2686
|
*
|
|
@@ -2689,61 +2688,54 @@
|
|
|
2689
2688
|
*
|
|
2690
2689
|
* @return {String} id
|
|
2691
2690
|
*/
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
2691
|
Ids.prototype.nextPrefixed = function (prefix, element) {
|
|
2695
2692
|
var id;
|
|
2696
|
-
|
|
2697
2693
|
do {
|
|
2698
2694
|
id = prefix + this.next(true);
|
|
2699
|
-
} while (this.assigned(id));
|
|
2700
|
-
|
|
2695
|
+
} while (this.assigned(id));
|
|
2701
2696
|
|
|
2702
|
-
|
|
2697
|
+
// claim {prefix}{random}
|
|
2698
|
+
this.claim(id, element);
|
|
2703
2699
|
|
|
2700
|
+
// return
|
|
2704
2701
|
return id;
|
|
2705
2702
|
};
|
|
2703
|
+
|
|
2706
2704
|
/**
|
|
2707
2705
|
* Manually claim an existing id.
|
|
2708
2706
|
*
|
|
2709
2707
|
* @param {String} id
|
|
2710
2708
|
* @param {String} [element] element the id is claimed by
|
|
2711
2709
|
*/
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
2710
|
Ids.prototype.claim = function (id, element) {
|
|
2715
2711
|
this._seed.set(id, element || true);
|
|
2716
2712
|
};
|
|
2713
|
+
|
|
2717
2714
|
/**
|
|
2718
2715
|
* Returns true if the given id has already been assigned.
|
|
2719
2716
|
*
|
|
2720
2717
|
* @param {String} id
|
|
2721
2718
|
* @return {Boolean}
|
|
2722
2719
|
*/
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
2720
|
Ids.prototype.assigned = function (id) {
|
|
2726
2721
|
return this._seed.get(id) || false;
|
|
2727
2722
|
};
|
|
2723
|
+
|
|
2728
2724
|
/**
|
|
2729
2725
|
* Unclaim an id.
|
|
2730
2726
|
*
|
|
2731
2727
|
* @param {String} id the id to unclaim
|
|
2732
2728
|
*/
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
2729
|
Ids.prototype.unclaim = function (id) {
|
|
2736
2730
|
delete this._seed.hats[id];
|
|
2737
2731
|
};
|
|
2732
|
+
|
|
2738
2733
|
/**
|
|
2739
2734
|
* Clear all claimed ids.
|
|
2740
2735
|
*/
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
2736
|
Ids.prototype.clear = function () {
|
|
2744
2737
|
var hats = this._seed.hats,
|
|
2745
|
-
|
|
2746
|
-
|
|
2738
|
+
id;
|
|
2747
2739
|
for (id in hats) {
|
|
2748
2740
|
this.unclaim(id);
|
|
2749
2741
|
}
|
|
@@ -10291,9 +10283,9 @@
|
|
|
10291
10283
|
|
|
10292
10284
|
const viewport = this._viewport = createGroup(svg, 'viewport');
|
|
10293
10285
|
|
|
10294
|
-
// debounce canvas.viewbox.changed events
|
|
10295
|
-
//
|
|
10296
|
-
if (config.deferUpdate
|
|
10286
|
+
// debounce canvas.viewbox.changed events when deferUpdate is set
|
|
10287
|
+
// to help with potential performance issues
|
|
10288
|
+
if (config.deferUpdate) {
|
|
10297
10289
|
this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
|
|
10298
10290
|
}
|
|
10299
10291
|
|
|
@@ -11317,6 +11309,11 @@
|
|
|
11317
11309
|
this.setRootElement(rootElement);
|
|
11318
11310
|
}
|
|
11319
11311
|
|
|
11312
|
+
// element is rootElement, do not change viewport
|
|
11313
|
+
if (rootElement === element) {
|
|
11314
|
+
return;
|
|
11315
|
+
}
|
|
11316
|
+
|
|
11320
11317
|
if (!padding) {
|
|
11321
11318
|
padding = {};
|
|
11322
11319
|
}
|
|
@@ -21192,62 +21189,6 @@
|
|
|
21192
21189
|
* @typedef {import('../model/Types').ModdleElement} ModdleElement
|
|
21193
21190
|
*/
|
|
21194
21191
|
|
|
21195
|
-
// TODO(nikku): remove with future bpmn-js version
|
|
21196
|
-
|
|
21197
|
-
/**
|
|
21198
|
-
* Wraps APIs to check:
|
|
21199
|
-
*
|
|
21200
|
-
* 1) If a callback is passed -> Warn users about callback deprecation.
|
|
21201
|
-
* 2) If Promise class is implemented in current environment.
|
|
21202
|
-
*
|
|
21203
|
-
* @private
|
|
21204
|
-
*
|
|
21205
|
-
* @param {Function} api
|
|
21206
|
-
*
|
|
21207
|
-
* @return {Function}
|
|
21208
|
-
*/
|
|
21209
|
-
function wrapForCompatibility(api) {
|
|
21210
|
-
|
|
21211
|
-
return function() {
|
|
21212
|
-
|
|
21213
|
-
if (!window.Promise) {
|
|
21214
|
-
throw new Error('Promises is not supported in this environment. Please polyfill Promise.');
|
|
21215
|
-
}
|
|
21216
|
-
|
|
21217
|
-
var argLen = arguments.length;
|
|
21218
|
-
if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
|
|
21219
|
-
|
|
21220
|
-
var callback = arguments[argLen - 1];
|
|
21221
|
-
|
|
21222
|
-
console.warn(new Error(
|
|
21223
|
-
'Passing callbacks to ' + api.name + ' is deprecated and will be removed in a future major release. ' +
|
|
21224
|
-
'Please switch to promises: https://bpmn.io/l/moving-to-promises.html'
|
|
21225
|
-
));
|
|
21226
|
-
|
|
21227
|
-
var argsWithoutCallback = Array.prototype.slice.call(arguments, 0, -1);
|
|
21228
|
-
|
|
21229
|
-
api.apply(this, argsWithoutCallback).then(function(result) {
|
|
21230
|
-
|
|
21231
|
-
var firstKey = Object.keys(result)[0];
|
|
21232
|
-
|
|
21233
|
-
// The APIs we are wrapping all resolve a single item depending on the API.
|
|
21234
|
-
// For instance, importXML resolves { warnings } and saveXML returns { xml }.
|
|
21235
|
-
// That's why we can call the callback with the first item of result.
|
|
21236
|
-
return callback(null, result[firstKey]);
|
|
21237
|
-
|
|
21238
|
-
// Passing a second paramter instead of catch because we don't want to
|
|
21239
|
-
// catch errors thrown by callback().
|
|
21240
|
-
}, function(err) {
|
|
21241
|
-
|
|
21242
|
-
return callback(err, err.warnings);
|
|
21243
|
-
});
|
|
21244
|
-
} else {
|
|
21245
|
-
|
|
21246
|
-
return api.apply(this, arguments);
|
|
21247
|
-
}
|
|
21248
|
-
};
|
|
21249
|
-
}
|
|
21250
|
-
|
|
21251
21192
|
|
|
21252
21193
|
// TODO(nikku): remove with future bpmn-js version
|
|
21253
21194
|
|
|
@@ -22189,28 +22130,7 @@
|
|
|
22189
22130
|
const self = this;
|
|
22190
22131
|
|
|
22191
22132
|
function ParseCompleteEvent(data) {
|
|
22192
|
-
|
|
22193
|
-
const event = self.get('eventBus').createEvent(data);
|
|
22194
|
-
|
|
22195
|
-
// TODO(nikku): remove with future bpmn-js version
|
|
22196
|
-
Object.defineProperty(event, 'context', {
|
|
22197
|
-
enumerable: true,
|
|
22198
|
-
get: function() {
|
|
22199
|
-
|
|
22200
|
-
console.warn(new Error(
|
|
22201
|
-
'import.parse.complete <context> is deprecated ' +
|
|
22202
|
-
'and will be removed in future library versions'
|
|
22203
|
-
));
|
|
22204
|
-
|
|
22205
|
-
return {
|
|
22206
|
-
warnings: data.warnings,
|
|
22207
|
-
references: data.references,
|
|
22208
|
-
elementsById: data.elementsById
|
|
22209
|
-
};
|
|
22210
|
-
}
|
|
22211
|
-
});
|
|
22212
|
-
|
|
22213
|
-
return event;
|
|
22133
|
+
return self.get('eventBus').createEvent(data);
|
|
22214
22134
|
}
|
|
22215
22135
|
|
|
22216
22136
|
let aggregatedWarnings = [];
|
|
@@ -22288,8 +22208,6 @@
|
|
|
22288
22208
|
}
|
|
22289
22209
|
};
|
|
22290
22210
|
|
|
22291
|
-
BaseViewer.prototype.importXML = wrapForCompatibility(BaseViewer.prototype.importXML);
|
|
22292
|
-
|
|
22293
22211
|
|
|
22294
22212
|
/**
|
|
22295
22213
|
* Import parsed definitions and render a BPMN 2.0 diagram.
|
|
@@ -22320,8 +22238,6 @@
|
|
|
22320
22238
|
return { warnings: result.warnings };
|
|
22321
22239
|
};
|
|
22322
22240
|
|
|
22323
|
-
BaseViewer.prototype.importDefinitions = wrapForCompatibility(BaseViewer.prototype.importDefinitions);
|
|
22324
|
-
|
|
22325
22241
|
|
|
22326
22242
|
/**
|
|
22327
22243
|
* Open diagram of previously imported XML.
|
|
@@ -22383,8 +22299,6 @@
|
|
|
22383
22299
|
return { warnings };
|
|
22384
22300
|
};
|
|
22385
22301
|
|
|
22386
|
-
BaseViewer.prototype.open = wrapForCompatibility(BaseViewer.prototype.open);
|
|
22387
|
-
|
|
22388
22302
|
/**
|
|
22389
22303
|
* Export the currently displayed BPMN 2.0 diagram as
|
|
22390
22304
|
* a BPMN 2.0 XML document.
|
|
@@ -22459,8 +22373,6 @@
|
|
|
22459
22373
|
return result;
|
|
22460
22374
|
};
|
|
22461
22375
|
|
|
22462
|
-
BaseViewer.prototype.saveXML = wrapForCompatibility(BaseViewer.prototype.saveXML);
|
|
22463
|
-
|
|
22464
22376
|
|
|
22465
22377
|
/**
|
|
22466
22378
|
* Export the currently displayed BPMN 2.0 diagram as
|
|
@@ -22528,40 +22440,6 @@
|
|
|
22528
22440
|
return { svg };
|
|
22529
22441
|
};
|
|
22530
22442
|
|
|
22531
|
-
BaseViewer.prototype.saveSVG = wrapForCompatibility(BaseViewer.prototype.saveSVG);
|
|
22532
|
-
|
|
22533
|
-
/**
|
|
22534
|
-
* Get a named diagram service.
|
|
22535
|
-
*
|
|
22536
|
-
* @example
|
|
22537
|
-
*
|
|
22538
|
-
* const elementRegistry = viewer.get('elementRegistry');
|
|
22539
|
-
* const startEventShape = elementRegistry.get('StartEvent_1');
|
|
22540
|
-
*
|
|
22541
|
-
* @param {string} name
|
|
22542
|
-
*
|
|
22543
|
-
* @return {Object} diagram service instance
|
|
22544
|
-
*
|
|
22545
|
-
* @method BaseViewer#get
|
|
22546
|
-
*/
|
|
22547
|
-
|
|
22548
|
-
/**
|
|
22549
|
-
* Invoke a function in the context of this viewer.
|
|
22550
|
-
*
|
|
22551
|
-
* @example
|
|
22552
|
-
*
|
|
22553
|
-
* viewer.invoke(function(elementRegistry) {
|
|
22554
|
-
* const startEventShape = elementRegistry.get('StartEvent_1');
|
|
22555
|
-
* });
|
|
22556
|
-
*
|
|
22557
|
-
* @param {Function} fn to be invoked
|
|
22558
|
-
*
|
|
22559
|
-
* @return {Object} the functions return value
|
|
22560
|
-
*
|
|
22561
|
-
* @method BaseViewer#invoke
|
|
22562
|
-
*/
|
|
22563
|
-
|
|
22564
|
-
|
|
22565
22443
|
BaseViewer.prototype._setDefinitions = function(definitions) {
|
|
22566
22444
|
this._definitions = definitions;
|
|
22567
22445
|
};
|
|
@@ -23265,6 +23143,12 @@
|
|
|
23265
23143
|
name: "propagateAllChildVariables",
|
|
23266
23144
|
isAttr: true,
|
|
23267
23145
|
type: "Boolean"
|
|
23146
|
+
},
|
|
23147
|
+
{
|
|
23148
|
+
name: "propagateAllParentVariables",
|
|
23149
|
+
isAttr: true,
|
|
23150
|
+
type: "Boolean",
|
|
23151
|
+
"default": true
|
|
23268
23152
|
}
|
|
23269
23153
|
]
|
|
23270
23154
|
},
|
|
@@ -23306,6 +23190,11 @@
|
|
|
23306
23190
|
name: "formKey",
|
|
23307
23191
|
type: "String",
|
|
23308
23192
|
isAttr: true
|
|
23193
|
+
},
|
|
23194
|
+
{
|
|
23195
|
+
name: "formId",
|
|
23196
|
+
type: "String",
|
|
23197
|
+
isAttr: true
|
|
23309
23198
|
}
|
|
23310
23199
|
]
|
|
23311
23200
|
},
|