camunda-bpmn-js 4.3.2 → 4.4.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/README.md +5 -0
- package/dist/assets/diagram-js.css +15 -19
- package/dist/base-modeler.development.js +336 -175
- package/dist/base-modeler.production.min.js +34 -36
- package/dist/base-navigated-viewer.development.js +177 -60
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +160 -52
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +366 -202
- package/dist/camunda-cloud-modeler.production.min.js +34 -36
- package/dist/camunda-cloud-navigated-viewer.development.js +177 -60
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +160 -52
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +349 -188
- package/dist/camunda-platform-modeler.production.min.js +34 -36
- package/dist/camunda-platform-navigated-viewer.development.js +177 -60
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +160 -52
- 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 +84 -84
- package/lib/camunda-cloud/NavigatedViewer.d.ts +3 -3
- package/lib/camunda-cloud/Viewer.d.ts +3 -3
- package/lib/camunda-cloud/util/commonModules.d.ts +9 -9
- package/lib/camunda-platform/Modeler.d.ts +3 -3
- package/lib/camunda-platform/Modeler.js +68 -68
- 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 +140 -140
|
@@ -2305,16 +2305,19 @@
|
|
|
2305
2305
|
* @typedef { import('./index.js').ModuleDeclaration } ModuleDeclaration
|
|
2306
2306
|
* @typedef { import('./index.js').ModuleDefinition } ModuleDefinition
|
|
2307
2307
|
* @typedef { import('./index.js').InjectorContext } InjectorContext
|
|
2308
|
+
*
|
|
2309
|
+
* @typedef { import('./index.js').TypedDeclaration<any, any> } TypedDeclaration
|
|
2308
2310
|
*/
|
|
2309
2311
|
|
|
2310
2312
|
/**
|
|
2311
2313
|
* Create a new injector with the given modules.
|
|
2312
2314
|
*
|
|
2313
2315
|
* @param {ModuleDefinition[]} modules
|
|
2314
|
-
* @param {InjectorContext} [
|
|
2316
|
+
* @param {InjectorContext} [_parent]
|
|
2315
2317
|
*/
|
|
2316
|
-
function Injector(modules,
|
|
2317
|
-
|
|
2318
|
+
function Injector(modules, _parent) {
|
|
2319
|
+
|
|
2320
|
+
const parent = _parent || /** @type InjectorContext */ ({
|
|
2318
2321
|
get: function(name, strict) {
|
|
2319
2322
|
currentlyResolving.push(name);
|
|
2320
2323
|
|
|
@@ -2324,7 +2327,7 @@
|
|
|
2324
2327
|
throw error(`No provider for "${ name }"!`);
|
|
2325
2328
|
}
|
|
2326
2329
|
}
|
|
2327
|
-
};
|
|
2330
|
+
});
|
|
2328
2331
|
|
|
2329
2332
|
const currentlyResolving = [];
|
|
2330
2333
|
const providers = this._providers = Object.create(parent._providers || null);
|
|
@@ -2347,12 +2350,13 @@
|
|
|
2347
2350
|
* @return {any}
|
|
2348
2351
|
*/
|
|
2349
2352
|
function get(name, strict) {
|
|
2350
|
-
if (!providers[name] && name.
|
|
2353
|
+
if (!providers[name] && name.includes('.')) {
|
|
2354
|
+
|
|
2351
2355
|
const parts = name.split('.');
|
|
2352
|
-
let pivot = get(parts.shift());
|
|
2356
|
+
let pivot = get(/** @type { string } */ (parts.shift()));
|
|
2353
2357
|
|
|
2354
2358
|
while (parts.length) {
|
|
2355
|
-
pivot = pivot[parts.shift()];
|
|
2359
|
+
pivot = pivot[/** @type { string } */ (parts.shift())];
|
|
2356
2360
|
}
|
|
2357
2361
|
|
|
2358
2362
|
return pivot;
|
|
@@ -2392,6 +2396,9 @@
|
|
|
2392
2396
|
}
|
|
2393
2397
|
}
|
|
2394
2398
|
|
|
2399
|
+
/**
|
|
2400
|
+
* @type {string[]}
|
|
2401
|
+
*/
|
|
2395
2402
|
const inject = fn.$inject || parseAnnotations(fn);
|
|
2396
2403
|
const dependencies = inject.map(dep => {
|
|
2397
2404
|
if (hasOwnProp(locals, dep)) {
|
|
@@ -2403,7 +2410,7 @@
|
|
|
2403
2410
|
|
|
2404
2411
|
return {
|
|
2405
2412
|
fn: fn,
|
|
2406
|
-
dependencies
|
|
2413
|
+
dependencies
|
|
2407
2414
|
};
|
|
2408
2415
|
}
|
|
2409
2416
|
|
|
@@ -2423,7 +2430,7 @@
|
|
|
2423
2430
|
} = fnDef(type);
|
|
2424
2431
|
|
|
2425
2432
|
// instantiate var args constructor
|
|
2426
|
-
const Constructor = Function.prototype.bind.
|
|
2433
|
+
const Constructor = Function.prototype.bind.call(fn, null, ...dependencies);
|
|
2427
2434
|
|
|
2428
2435
|
return new Constructor();
|
|
2429
2436
|
}
|
|
@@ -2603,13 +2610,17 @@
|
|
|
2603
2610
|
return;
|
|
2604
2611
|
}
|
|
2605
2612
|
|
|
2606
|
-
|
|
2607
|
-
|
|
2613
|
+
const typeDeclaration = /** @type { TypedDeclaration } */ (
|
|
2614
|
+
moduleDefinition[key]
|
|
2615
|
+
);
|
|
2616
|
+
|
|
2617
|
+
if (typeDeclaration[2] === 'private') {
|
|
2618
|
+
providers[key] = typeDeclaration;
|
|
2608
2619
|
return;
|
|
2609
2620
|
}
|
|
2610
2621
|
|
|
2611
|
-
const type =
|
|
2612
|
-
const value =
|
|
2622
|
+
const type = typeDeclaration[0];
|
|
2623
|
+
const value = typeDeclaration[1];
|
|
2613
2624
|
|
|
2614
2625
|
providers[key] = [ factoryMap[type], arrayUnwrap(type, value), type ];
|
|
2615
2626
|
});
|
|
@@ -4670,7 +4681,7 @@
|
|
|
4670
4681
|
* @typedef {import('../core/Types').ConnectionLike} Connection
|
|
4671
4682
|
*
|
|
4672
4683
|
* @typedef {import('../util/Types').DirectionTRBL} DirectionTRBL
|
|
4673
|
-
* @typedef {import('../util/Types').
|
|
4684
|
+
* @typedef {import('../util/Types').Intersection} Intersection
|
|
4674
4685
|
* @typedef {import('../util/Types').Point} Point
|
|
4675
4686
|
* @typedef {import('../util/Types').Rect} Rect
|
|
4676
4687
|
* @typedef {import('../util/Types').RectTRBL} RectTRBL
|
|
@@ -4840,7 +4851,7 @@
|
|
|
4840
4851
|
* @param {Rect} reference
|
|
4841
4852
|
* @param {Point|number} padding
|
|
4842
4853
|
*
|
|
4843
|
-
* @return {DirectionTRBL|
|
|
4854
|
+
* @return {DirectionTRBL|Intersection} the orientation; one of top, top-left, left, ..., bottom, right or intersect.
|
|
4844
4855
|
*/
|
|
4845
4856
|
function getOrientation(rect, reference, padding) {
|
|
4846
4857
|
|
|
@@ -4998,6 +5009,7 @@
|
|
|
4998
5009
|
* @typedef {import('../util/Types').Point} Point
|
|
4999
5010
|
* @typedef {import('../util/Types').Rect} Rect
|
|
5000
5011
|
* @typedef {import('../util/Types').RectTRBL} RectTRBL
|
|
5012
|
+
* @typedef {import('../util/Types').ScrollDelta} ScrollDelta
|
|
5001
5013
|
*/
|
|
5002
5014
|
|
|
5003
5015
|
function round$c(number, resolution) {
|
|
@@ -5698,7 +5710,7 @@
|
|
|
5698
5710
|
Canvas.prototype.setRootElement = function(rootElement) {
|
|
5699
5711
|
|
|
5700
5712
|
if (rootElement === this._rootElement) {
|
|
5701
|
-
return;
|
|
5713
|
+
return rootElement;
|
|
5702
5714
|
}
|
|
5703
5715
|
|
|
5704
5716
|
let plane;
|
|
@@ -6133,7 +6145,7 @@
|
|
|
6133
6145
|
/**
|
|
6134
6146
|
* Gets or sets the scroll of the canvas.
|
|
6135
6147
|
*
|
|
6136
|
-
* @param {
|
|
6148
|
+
* @param {ScrollDelta} [delta] The scroll to be set.
|
|
6137
6149
|
*
|
|
6138
6150
|
* @return {Point}
|
|
6139
6151
|
*/
|
|
@@ -7515,6 +7527,8 @@
|
|
|
7515
7527
|
* var sum = eventBus.fire('sum', 1, 2);
|
|
7516
7528
|
* console.log(sum); // 3
|
|
7517
7529
|
* ```
|
|
7530
|
+
*
|
|
7531
|
+
* @template [EventMap=null]
|
|
7518
7532
|
*/
|
|
7519
7533
|
function EventBus() {
|
|
7520
7534
|
|
|
@@ -7528,8 +7542,9 @@
|
|
|
7528
7542
|
this.on('diagram.destroy', 1, this._destroy, this);
|
|
7529
7543
|
}
|
|
7530
7544
|
|
|
7531
|
-
|
|
7532
7545
|
/**
|
|
7546
|
+
* @overlord
|
|
7547
|
+
*
|
|
7533
7548
|
* Register an event listener for events with the given name.
|
|
7534
7549
|
*
|
|
7535
7550
|
* The callback will be invoked with `event, ...additionalArguments`
|
|
@@ -7548,6 +7563,25 @@
|
|
|
7548
7563
|
* @param {EventBusEventCallback<T>} callback
|
|
7549
7564
|
* @param {any} [that] callback context
|
|
7550
7565
|
*/
|
|
7566
|
+
/**
|
|
7567
|
+
* Register an event listener for events with the given name.
|
|
7568
|
+
*
|
|
7569
|
+
* The callback will be invoked with `event, ...additionalArguments`
|
|
7570
|
+
* that have been passed to {@link EventBus#fire}.
|
|
7571
|
+
*
|
|
7572
|
+
* Returning false from a listener will prevent the events default action
|
|
7573
|
+
* (if any is specified). To stop an event from being processed further in
|
|
7574
|
+
* other listeners execute {@link Event#stopPropagation}.
|
|
7575
|
+
*
|
|
7576
|
+
* Returning anything but `undefined` from a listener will stop the listener propagation.
|
|
7577
|
+
*
|
|
7578
|
+
* @template {keyof EventMap} EventName
|
|
7579
|
+
*
|
|
7580
|
+
* @param {EventName} events to subscribe to
|
|
7581
|
+
* @param {number} [priority=1000] listen priority
|
|
7582
|
+
* @param {EventBusEventCallback<EventMap[EventName]>} callback
|
|
7583
|
+
* @param {any} [that] callback context
|
|
7584
|
+
*/
|
|
7551
7585
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
7552
7586
|
|
|
7553
7587
|
events = isArray$4(events) ? events : [ events ];
|
|
@@ -7585,6 +7619,8 @@
|
|
|
7585
7619
|
};
|
|
7586
7620
|
|
|
7587
7621
|
/**
|
|
7622
|
+
* @overlord
|
|
7623
|
+
*
|
|
7588
7624
|
* Register an event listener that is called only once.
|
|
7589
7625
|
*
|
|
7590
7626
|
* @template T
|
|
@@ -7594,6 +7630,16 @@
|
|
|
7594
7630
|
* @param {EventBusEventCallback<T>} callback
|
|
7595
7631
|
* @param {any} [that] callback context
|
|
7596
7632
|
*/
|
|
7633
|
+
/**
|
|
7634
|
+
* Register an event listener that is called only once.
|
|
7635
|
+
*
|
|
7636
|
+
* @template {keyof EventMap} EventName
|
|
7637
|
+
*
|
|
7638
|
+
* @param {EventName} events to subscribe to
|
|
7639
|
+
* @param {number} [priority=1000] listen priority
|
|
7640
|
+
* @param {EventBusEventCallback<EventMap[EventName]>} callback
|
|
7641
|
+
* @param {any} [that] callback context
|
|
7642
|
+
*/
|
|
7597
7643
|
EventBus.prototype.once = function(events, priority, callback, that) {
|
|
7598
7644
|
var self = this;
|
|
7599
7645
|
|
|
@@ -8031,7 +8077,7 @@
|
|
|
8031
8077
|
* @param {number} x
|
|
8032
8078
|
* @param {number} y
|
|
8033
8079
|
*/
|
|
8034
|
-
function translate$
|
|
8080
|
+
function translate$1(gfx, x, y) {
|
|
8035
8081
|
var translate = createTransform();
|
|
8036
8082
|
translate.setTranslate(x, y);
|
|
8037
8083
|
|
|
@@ -8300,7 +8346,7 @@
|
|
|
8300
8346
|
this.drawShape(visual, element);
|
|
8301
8347
|
|
|
8302
8348
|
// update positioning
|
|
8303
|
-
translate$
|
|
8349
|
+
translate$1(gfx, element.x, element.y);
|
|
8304
8350
|
} else if (type === 'connection') {
|
|
8305
8351
|
this.drawConnection(visual, element);
|
|
8306
8352
|
} else {
|
|
@@ -8364,6 +8410,16 @@
|
|
|
8364
8410
|
* } & Record<string, any> } DiagramOptions
|
|
8365
8411
|
*/
|
|
8366
8412
|
|
|
8413
|
+
/**
|
|
8414
|
+
* @template T
|
|
8415
|
+
* @typedef {import('didi').FactoryFunction<T>} FactoryFunction
|
|
8416
|
+
*/
|
|
8417
|
+
|
|
8418
|
+
/**
|
|
8419
|
+
* @template T
|
|
8420
|
+
* @typedef {import('didi').ArrayFunc<T>} ArrayFunc
|
|
8421
|
+
*/
|
|
8422
|
+
|
|
8367
8423
|
/**
|
|
8368
8424
|
* Bootstrap an injector from a list of modules, instantiating a number of default components
|
|
8369
8425
|
*
|
|
@@ -8382,9 +8438,10 @@
|
|
|
8382
8438
|
/**
|
|
8383
8439
|
* Creates an injector from passed options.
|
|
8384
8440
|
*
|
|
8441
|
+
* @template ServiceMap
|
|
8385
8442
|
* @param {DiagramOptions} [options]
|
|
8386
8443
|
*
|
|
8387
|
-
* @return {Injector}
|
|
8444
|
+
* @return {Injector<ServiceMap>}
|
|
8388
8445
|
*/
|
|
8389
8446
|
function createInjector(options) {
|
|
8390
8447
|
|
|
@@ -8411,6 +8468,7 @@
|
|
|
8411
8468
|
*
|
|
8412
8469
|
* @class
|
|
8413
8470
|
* @constructor
|
|
8471
|
+
* @template [ServiceMap=null]
|
|
8414
8472
|
*
|
|
8415
8473
|
* @example Creating a plug-in that logs whenever a shape is added to the canvas.
|
|
8416
8474
|
*
|
|
@@ -8449,44 +8507,17 @@
|
|
|
8449
8507
|
* ```
|
|
8450
8508
|
*
|
|
8451
8509
|
* @param {DiagramOptions} [options]
|
|
8452
|
-
* @param {Injector} [injector] An (optional) injector to bootstrap the diagram with.
|
|
8510
|
+
* @param {Injector<ServiceMap>} [injector] An (optional) injector to bootstrap the diagram with.
|
|
8453
8511
|
*/
|
|
8454
8512
|
function Diagram(options, injector) {
|
|
8455
8513
|
|
|
8456
|
-
this._injector = injector = injector || createInjector(options);
|
|
8457
|
-
|
|
8458
|
-
// API
|
|
8459
|
-
|
|
8460
8514
|
/**
|
|
8461
|
-
*
|
|
8462
|
-
*
|
|
8463
|
-
* @template T
|
|
8464
|
-
*
|
|
8465
|
-
* @param {string} name The name of the service to get.
|
|
8466
|
-
* @param {boolean} [strict=true] If false, resolve missing services to null.
|
|
8467
|
-
*
|
|
8468
|
-
* @return {T|null}
|
|
8469
|
-
*/
|
|
8470
|
-
this.get = injector.get;
|
|
8471
|
-
|
|
8472
|
-
/**
|
|
8473
|
-
* Executes a function with its dependencies injected.
|
|
8474
|
-
*
|
|
8475
|
-
* @template T
|
|
8476
|
-
*
|
|
8477
|
-
* @param {Function} func function to be invoked
|
|
8478
|
-
* @param {InjectionContext} [context] context of the invocation
|
|
8479
|
-
* @param {LocalsMap} [locals] locals provided
|
|
8480
|
-
*
|
|
8481
|
-
* @return {T|null}
|
|
8515
|
+
* @type {Injector<ServiceMap>}
|
|
8482
8516
|
*/
|
|
8483
|
-
this.
|
|
8517
|
+
this._injector = injector || createInjector(options);
|
|
8484
8518
|
|
|
8485
8519
|
// init
|
|
8486
8520
|
|
|
8487
|
-
// indicate via event
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
8521
|
/**
|
|
8491
8522
|
* An event indicating that all plug-ins are loaded.
|
|
8492
8523
|
*
|
|
@@ -8509,6 +8540,82 @@
|
|
|
8509
8540
|
this.get('eventBus').fire('diagram.init');
|
|
8510
8541
|
}
|
|
8511
8542
|
|
|
8543
|
+
/**
|
|
8544
|
+
* @overlord
|
|
8545
|
+
*
|
|
8546
|
+
* Resolves a diagram service.
|
|
8547
|
+
*
|
|
8548
|
+
* @template T
|
|
8549
|
+
*
|
|
8550
|
+
* @param {string} name The name of the service to get.
|
|
8551
|
+
*
|
|
8552
|
+
* @return {T}
|
|
8553
|
+
*/
|
|
8554
|
+
/**
|
|
8555
|
+
* @overlord
|
|
8556
|
+
*
|
|
8557
|
+
* Resolves a diagram service.
|
|
8558
|
+
*
|
|
8559
|
+
* @template T
|
|
8560
|
+
*
|
|
8561
|
+
* @param {string} name The name of the service to get.
|
|
8562
|
+
* @param {true} strict If false, resolve missing services to null.
|
|
8563
|
+
*
|
|
8564
|
+
* @return {T}
|
|
8565
|
+
*/
|
|
8566
|
+
/**
|
|
8567
|
+
* @overlord
|
|
8568
|
+
*
|
|
8569
|
+
* Resolves a diagram service.
|
|
8570
|
+
*
|
|
8571
|
+
* @template T
|
|
8572
|
+
*
|
|
8573
|
+
* @param {string} name The name of the service to get.
|
|
8574
|
+
* @param {boolean} strict If false, resolve missing services to null.
|
|
8575
|
+
*
|
|
8576
|
+
* @return {T|null}
|
|
8577
|
+
*/
|
|
8578
|
+
/**
|
|
8579
|
+
* Resolves a diagram service.
|
|
8580
|
+
*
|
|
8581
|
+
* @template {keyof ServiceMap} Name
|
|
8582
|
+
*
|
|
8583
|
+
* @param {Name} name The name of the service to get.
|
|
8584
|
+
*
|
|
8585
|
+
* @return {ServiceMap[Name]}
|
|
8586
|
+
*/
|
|
8587
|
+
Diagram.prototype.get = function(name, strict) {
|
|
8588
|
+
return this._injector.get(name, strict);
|
|
8589
|
+
};
|
|
8590
|
+
|
|
8591
|
+
/**
|
|
8592
|
+
* @overlord
|
|
8593
|
+
*
|
|
8594
|
+
* Invoke the given function, injecting dependencies. Return the result.
|
|
8595
|
+
*
|
|
8596
|
+
* @template T
|
|
8597
|
+
*
|
|
8598
|
+
* @param {FactoryFunction<T>} func
|
|
8599
|
+
* @param {InjectionContext} [context]
|
|
8600
|
+
* @param {LocalsMap} [locals]
|
|
8601
|
+
*
|
|
8602
|
+
* @return {T}
|
|
8603
|
+
*/
|
|
8604
|
+
/**
|
|
8605
|
+
* Invoke the given function, injecting dependencies provided in
|
|
8606
|
+
* array notation. Return the result.
|
|
8607
|
+
*
|
|
8608
|
+
* @template T
|
|
8609
|
+
*
|
|
8610
|
+
* @param {ArrayFunc<T>} func function to be invoked
|
|
8611
|
+
* @param {InjectionContext} [context] context of the invocation
|
|
8612
|
+
* @param {LocalsMap} [locals] locals provided
|
|
8613
|
+
*
|
|
8614
|
+
* @return {T}
|
|
8615
|
+
*/
|
|
8616
|
+
Diagram.prototype.invoke = function(func, context, locals) {
|
|
8617
|
+
return this._injector.invoke(func, context, locals);
|
|
8618
|
+
};
|
|
8512
8619
|
|
|
8513
8620
|
/**
|
|
8514
8621
|
* Destroys the diagram
|
|
@@ -19167,7 +19274,7 @@
|
|
|
19167
19274
|
stroke: getStrokeColor$1(element, defaultStrokeColor, attrs.stroke)
|
|
19168
19275
|
});
|
|
19169
19276
|
|
|
19170
|
-
translate$
|
|
19277
|
+
translate$1(markerRect, element.width / 2 - 7.5, element.height - 20);
|
|
19171
19278
|
|
|
19172
19279
|
var markerPath = pathMap.getScaledPath('MARKER_SUB_PROCESS', {
|
|
19173
19280
|
xScaleFactor: 1.5,
|
|
@@ -20699,8 +20806,8 @@
|
|
|
20699
20806
|
* @typedef { number | Partial<Padding> } PaddingConfig
|
|
20700
20807
|
*
|
|
20701
20808
|
* @typedef { {
|
|
20702
|
-
* horizontal: 'center' | 'left';
|
|
20703
|
-
* vertical: 'top' | '
|
|
20809
|
+
* horizontal: 'center' | 'left' | 'right';
|
|
20810
|
+
* vertical: 'top' | 'middle';
|
|
20704
20811
|
* } } Alignment
|
|
20705
20812
|
*
|
|
20706
20813
|
* @typedef { 'center-middle' | 'center-top' } AlignmentConfig
|
|
@@ -20964,7 +21071,7 @@
|
|
|
20964
21071
|
/**
|
|
20965
21072
|
* Creates a new label utility
|
|
20966
21073
|
*
|
|
20967
|
-
* @param {TextConfig} config
|
|
21074
|
+
* @param {TextConfig} [config]
|
|
20968
21075
|
*/
|
|
20969
21076
|
function Text$1(config) {
|
|
20970
21077
|
|
|
@@ -21766,7 +21873,7 @@
|
|
|
21766
21873
|
*
|
|
21767
21874
|
* @return {string} the translated string
|
|
21768
21875
|
*/
|
|
21769
|
-
function translate
|
|
21876
|
+
function translate(template, replacements) {
|
|
21770
21877
|
|
|
21771
21878
|
replacements = replacements || {};
|
|
21772
21879
|
|
|
@@ -21778,8 +21885,8 @@
|
|
|
21778
21885
|
/**
|
|
21779
21886
|
* @type { import('didi').ModuleDeclaration }
|
|
21780
21887
|
*/
|
|
21781
|
-
var
|
|
21782
|
-
translate: [ 'value', translate
|
|
21888
|
+
var TranslateModule = {
|
|
21889
|
+
translate: [ 'value', translate ]
|
|
21783
21890
|
};
|
|
21784
21891
|
|
|
21785
21892
|
/**
|
|
@@ -22136,7 +22243,7 @@
|
|
|
22136
22243
|
|
|
22137
22244
|
var ImportModule = {
|
|
22138
22245
|
__depends__: [
|
|
22139
|
-
|
|
22246
|
+
TranslateModule
|
|
22140
22247
|
],
|
|
22141
22248
|
bpmnImporter: [ 'type', BpmnImporter ]
|
|
22142
22249
|
};
|
|
@@ -22208,7 +22315,7 @@
|
|
|
22208
22315
|
*
|
|
22209
22316
|
* @return {boolean}
|
|
22210
22317
|
*/
|
|
22211
|
-
function isButton(event, button) {
|
|
22318
|
+
function isButton$1(event, button) {
|
|
22212
22319
|
return (getOriginal$1(event) || event).button === button;
|
|
22213
22320
|
}
|
|
22214
22321
|
|
|
@@ -22220,7 +22327,7 @@
|
|
|
22220
22327
|
function isPrimaryButton(event) {
|
|
22221
22328
|
|
|
22222
22329
|
// button === 0 -> left áka primary mouse button
|
|
22223
|
-
return isButton(event, 0);
|
|
22330
|
+
return isButton$1(event, 0);
|
|
22224
22331
|
}
|
|
22225
22332
|
|
|
22226
22333
|
/**
|
|
@@ -22231,7 +22338,7 @@
|
|
|
22231
22338
|
function isAuxiliaryButton(event) {
|
|
22232
22339
|
|
|
22233
22340
|
// button === 1 -> auxiliary áka wheel button
|
|
22234
|
-
return isButton(event, 1);
|
|
22341
|
+
return isButton$1(event, 1);
|
|
22235
22342
|
}
|
|
22236
22343
|
|
|
22237
22344
|
/**
|
|
@@ -22773,6 +22880,7 @@
|
|
|
22773
22880
|
/**
|
|
22774
22881
|
* @typedef {import('../../model/Types').Element} Element
|
|
22775
22882
|
*
|
|
22883
|
+
* @typedef {import('./OutlineProvider').default} OutlineProvider
|
|
22776
22884
|
* @typedef {import('../../core/EventBus').default} EventBus
|
|
22777
22885
|
* @typedef {import('../../draw/Styles').default} Styles
|
|
22778
22886
|
*/
|
|
@@ -22931,7 +23039,7 @@
|
|
|
22931
23039
|
* Returns the outline for an element.
|
|
22932
23040
|
*
|
|
22933
23041
|
* @param {Element} element
|
|
22934
|
-
|
|
23042
|
+
*/
|
|
22935
23043
|
Outline.prototype.getOutline = function(element) {
|
|
22936
23044
|
var outline;
|
|
22937
23045
|
var providers = this._getProviders();
|
|
@@ -23512,7 +23620,7 @@
|
|
|
23512
23620
|
}, config && config.defaults);
|
|
23513
23621
|
|
|
23514
23622
|
/**
|
|
23515
|
-
* @type {
|
|
23623
|
+
* @type {Record<string, Overlay>}
|
|
23516
23624
|
*/
|
|
23517
23625
|
this._overlays = {};
|
|
23518
23626
|
|
|
@@ -25330,7 +25438,7 @@
|
|
|
25330
25438
|
// modules the viewer is composed of
|
|
25331
25439
|
Viewer.prototype._modules = [
|
|
25332
25440
|
CoreModule,
|
|
25333
|
-
|
|
25441
|
+
TranslateModule,
|
|
25334
25442
|
SelectionModule,
|
|
25335
25443
|
OverlaysModule,
|
|
25336
25444
|
DrilldownModdule
|
|
@@ -25524,7 +25632,11 @@
|
|
|
25524
25632
|
return true;
|
|
25525
25633
|
}
|
|
25526
25634
|
|
|
25527
|
-
return
|
|
25635
|
+
return (
|
|
25636
|
+
isInput$1(event.target) || (
|
|
25637
|
+
isButton(event.target) && isKey([ ' ', 'Enter' ], event)
|
|
25638
|
+
)
|
|
25639
|
+
) && this._isModifiedKeyIgnored(event);
|
|
25528
25640
|
};
|
|
25529
25641
|
|
|
25530
25642
|
Keyboard.prototype._isModifiedKeyIgnored = function(event) {
|
|
@@ -25635,6 +25747,10 @@
|
|
|
25635
25747
|
return target && (matches$1(target, 'input, textarea') || target.contentEditable === 'true');
|
|
25636
25748
|
}
|
|
25637
25749
|
|
|
25750
|
+
function isButton(target) {
|
|
25751
|
+
return target && matches$1(target, 'button, input[type=submit], input[type=button], a[href], [aria-role=button]');
|
|
25752
|
+
}
|
|
25753
|
+
|
|
25638
25754
|
var LOW_PRIORITY$n = 500;
|
|
25639
25755
|
|
|
25640
25756
|
|
|
@@ -25965,7 +26081,7 @@
|
|
|
25965
26081
|
}
|
|
25966
26082
|
|
|
25967
26083
|
/**
|
|
25968
|
-
* @typedef {import('../core/EventBus').
|
|
26084
|
+
* @typedef {import('../core/EventBus').default} EventBus
|
|
25969
26085
|
*/
|
|
25970
26086
|
|
|
25971
26087
|
var TRAP_PRIORITY = 5000;
|
|
@@ -26190,6 +26306,7 @@
|
|
|
26190
26306
|
* @typedef {import('../../core/EventBus').default} EventBus
|
|
26191
26307
|
*
|
|
26192
26308
|
* @typedef {import('../../util/Types').Point} Point
|
|
26309
|
+
* @typedef {import('../../util/Types').ScrollDelta} ScrollDelta
|
|
26193
26310
|
*/
|
|
26194
26311
|
|
|
26195
26312
|
var sign$1 = Math.sign || function(n) {
|
|
@@ -26244,7 +26361,7 @@
|
|
|
26244
26361
|
];
|
|
26245
26362
|
|
|
26246
26363
|
/**
|
|
26247
|
-
* @param {
|
|
26364
|
+
* @param {ScrollDelta} delta
|
|
26248
26365
|
*/
|
|
26249
26366
|
ZoomScroll.prototype.scroll = function scroll(delta) {
|
|
26250
26367
|
this._canvas.scroll(delta);
|
|
@@ -26344,7 +26461,7 @@
|
|
|
26344
26461
|
* Zoom with fixed step size.
|
|
26345
26462
|
*
|
|
26346
26463
|
* @param {number} delta Zoom delta (1 for zooming in, -1 for zooming out).
|
|
26347
|
-
* @param {Point} position
|
|
26464
|
+
* @param {Point} [position]
|
|
26348
26465
|
*/
|
|
26349
26466
|
ZoomScroll.prototype.stepZoom = function stepZoom(delta, position) {
|
|
26350
26467
|
|
|
@@ -26358,7 +26475,7 @@
|
|
|
26358
26475
|
* Zoom in/out given a step size.
|
|
26359
26476
|
*
|
|
26360
26477
|
* @param {number} delta
|
|
26361
|
-
* @param {Point} position
|
|
26478
|
+
* @param {Point} [position]
|
|
26362
26479
|
* @param {number} stepSize
|
|
26363
26480
|
*/
|
|
26364
26481
|
ZoomScroll.prototype._zoom = function(delta, position, stepSize) {
|
|
@@ -27145,7 +27262,7 @@
|
|
|
27145
27262
|
*
|
|
27146
27263
|
* @param {ContextPadTarget} target
|
|
27147
27264
|
*
|
|
27148
|
-
* @return {
|
|
27265
|
+
* @return {{ position: { left: number; top: number; }}}
|
|
27149
27266
|
*/
|
|
27150
27267
|
ContextPad.prototype._getPosition = function(target) {
|
|
27151
27268
|
|
|
@@ -27239,10 +27356,14 @@
|
|
|
27239
27356
|
class=${ clsx('entry', { selected }) }
|
|
27240
27357
|
data-id=${ entry.id }
|
|
27241
27358
|
title=${ entry.title || entry.label }
|
|
27359
|
+
tabIndex="0"
|
|
27242
27360
|
onClick=${ onAction }
|
|
27361
|
+
onFocus=${ onMouseEnter }
|
|
27362
|
+
onBlur=${ onMouseLeave }
|
|
27243
27363
|
onMouseEnter=${ onMouseEnter }
|
|
27244
27364
|
onMouseLeave=${ onMouseLeave }
|
|
27245
27365
|
onDragStart=${ (event) => onAction(event, entry, 'dragstart') }
|
|
27366
|
+
aria-role="button"
|
|
27246
27367
|
draggable=${ true }
|
|
27247
27368
|
>
|
|
27248
27369
|
<div class="djs-popup-entry-content">
|
|
@@ -27438,8 +27559,6 @@
|
|
|
27438
27559
|
return originalEntries.length > 5;
|
|
27439
27560
|
}, [ search, originalEntries ]);
|
|
27440
27561
|
|
|
27441
|
-
const inputRef = _$2();
|
|
27442
|
-
|
|
27443
27562
|
const [ value, setValue ] = p$2('');
|
|
27444
27563
|
|
|
27445
27564
|
const filterEntries = T$3((originalEntries, value) => {
|
|
@@ -27491,28 +27610,6 @@
|
|
|
27491
27610
|
updateEntries(filterEntries(originalEntries, value));
|
|
27492
27611
|
}, [ value, originalEntries ]);
|
|
27493
27612
|
|
|
27494
|
-
// register global <Escape> handler
|
|
27495
|
-
h$2(() => {
|
|
27496
|
-
const handleKeyDown = event => {
|
|
27497
|
-
if (event.key === 'Escape') {
|
|
27498
|
-
event.preventDefault();
|
|
27499
|
-
|
|
27500
|
-
return onClose();
|
|
27501
|
-
}
|
|
27502
|
-
};
|
|
27503
|
-
|
|
27504
|
-
document.documentElement.addEventListener('keydown', handleKeyDown);
|
|
27505
|
-
|
|
27506
|
-
return () => {
|
|
27507
|
-
document.documentElement.removeEventListener('keydown', handleKeyDown);
|
|
27508
|
-
};
|
|
27509
|
-
}, []);
|
|
27510
|
-
|
|
27511
|
-
// focus input on initial mount
|
|
27512
|
-
s$2(() => {
|
|
27513
|
-
inputRef.current && inputRef.current.focus();
|
|
27514
|
-
}, []);
|
|
27515
|
-
|
|
27516
27613
|
// handle keyboard seleciton
|
|
27517
27614
|
const keyboardSelect = T$3(direction => {
|
|
27518
27615
|
const idx = entries.indexOf(selectedEntry);
|
|
@@ -27535,20 +27632,20 @@
|
|
|
27535
27632
|
return onSelect(event, selectedEntry);
|
|
27536
27633
|
}
|
|
27537
27634
|
|
|
27538
|
-
// ARROW_UP
|
|
27539
|
-
if (event.key === 'ArrowUp'
|
|
27635
|
+
// ARROW_UP
|
|
27636
|
+
if (event.key === 'ArrowUp') {
|
|
27540
27637
|
keyboardSelect(-1);
|
|
27541
27638
|
|
|
27542
27639
|
return event.preventDefault();
|
|
27543
27640
|
}
|
|
27544
27641
|
|
|
27545
|
-
// ARROW_DOWN
|
|
27546
|
-
if (event.key === 'ArrowDown'
|
|
27642
|
+
// ARROW_DOWN
|
|
27643
|
+
if (event.key === 'ArrowDown') {
|
|
27547
27644
|
keyboardSelect(1);
|
|
27548
27645
|
|
|
27549
27646
|
return event.preventDefault();
|
|
27550
27647
|
}
|
|
27551
|
-
}, [ onSelect,
|
|
27648
|
+
}, [ onSelect, selectedEntry, keyboardSelect ]);
|
|
27552
27649
|
|
|
27553
27650
|
const handleKey = T$3(event => {
|
|
27554
27651
|
if (matches$1(event.target, 'input')) {
|
|
@@ -27580,13 +27677,15 @@
|
|
|
27580
27677
|
<div class="djs-popup-header">
|
|
27581
27678
|
<h3 class="djs-popup-title" title=${ title }>${ title }</h3>
|
|
27582
27679
|
${ headerEntries.map(entry => m$3`
|
|
27583
|
-
|
|
27680
|
+
<${ entry.action ? 'button' : 'span' }
|
|
27584
27681
|
class=${ getHeaderClasses(entry, entry === selectedEntry) }
|
|
27585
27682
|
onClick=${ event => onSelect(event, entry) }
|
|
27586
27683
|
title=${ entry.title || entry.label }
|
|
27587
27684
|
data-id=${ entry.id }
|
|
27588
27685
|
onMouseEnter=${ () => setSelectedEntry(entry) }
|
|
27589
27686
|
onMouseLeave=${ () => setSelectedEntry(null) }
|
|
27687
|
+
onFocus=${ () => setSelectedEntry(entry) }
|
|
27688
|
+
onBlur=${ () => setSelectedEntry(null) }
|
|
27590
27689
|
>
|
|
27591
27690
|
${(entry.imageUrl && m$3`<img class="djs-popup-entry-icon" src=${ entry.imageUrl } alt="" />`) ||
|
|
27592
27691
|
(entry.imageHtml && m$3`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${ { __html: entry.imageHtml } } />`)}
|
|
@@ -27594,7 +27693,7 @@
|
|
|
27594
27693
|
${ entry.label ? m$3`
|
|
27595
27694
|
<span class="djs-popup-label">${ entry.label }</span>
|
|
27596
27695
|
` : null }
|
|
27597
|
-
|
|
27696
|
+
</${ entry.action ? 'button' : 'span' }>
|
|
27598
27697
|
`) }
|
|
27599
27698
|
</div>
|
|
27600
27699
|
` }
|
|
@@ -27606,10 +27705,7 @@
|
|
|
27606
27705
|
<svg class="djs-popup-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
27607
27706
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>
|
|
27608
27707
|
</svg>
|
|
27609
|
-
<input
|
|
27610
|
-
ref=${ inputRef }
|
|
27611
|
-
type="text"
|
|
27612
|
-
/>
|
|
27708
|
+
<input type="text" aria-label="${ title }" />
|
|
27613
27709
|
</div>
|
|
27614
27710
|
` }
|
|
27615
27711
|
|
|
@@ -27620,10 +27716,10 @@
|
|
|
27620
27716
|
onAction=${ onSelect }
|
|
27621
27717
|
/>
|
|
27622
27718
|
</div>
|
|
27623
|
-
${ emptyPlaceholder && entries.length === 0 && m$3`
|
|
27624
|
-
<div class="djs-popup-no-results">${ isFunction$1(emptyPlaceholder) ? emptyPlaceholder(value) : emptyPlaceholder }</div>
|
|
27625
|
-
` }
|
|
27626
27719
|
` }
|
|
27720
|
+
${ emptyPlaceholder && entries.length === 0 && m$3`
|
|
27721
|
+
<div class="djs-popup-no-results">${ isFunction$1(emptyPlaceholder) ? emptyPlaceholder(value) : emptyPlaceholder }</div>
|
|
27722
|
+
` }
|
|
27627
27723
|
</${PopupMenuWrapper}>
|
|
27628
27724
|
`;
|
|
27629
27725
|
}
|
|
@@ -27645,17 +27741,7 @@
|
|
|
27645
27741
|
|
|
27646
27742
|
const popupRef = _$2();
|
|
27647
27743
|
|
|
27648
|
-
|
|
27649
|
-
|
|
27650
|
-
const popup = closest(event.target, '.djs-popup', true);
|
|
27651
|
-
|
|
27652
|
-
if (popup) {
|
|
27653
|
-
return;
|
|
27654
|
-
}
|
|
27655
|
-
|
|
27656
|
-
onClose();
|
|
27657
|
-
}, [ onClose ]);
|
|
27658
|
-
|
|
27744
|
+
// initial position
|
|
27659
27745
|
s$2(() => {
|
|
27660
27746
|
if (typeof positionGetter !== 'function') {
|
|
27661
27747
|
return;
|
|
@@ -27668,26 +27754,58 @@
|
|
|
27668
27754
|
popupEl.style.top = `${position.y}px`;
|
|
27669
27755
|
}, [ popupRef.current, positionGetter ]);
|
|
27670
27756
|
|
|
27671
|
-
// focus
|
|
27757
|
+
// initial focus
|
|
27672
27758
|
s$2(() => {
|
|
27673
|
-
|
|
27759
|
+
const popupEl = popupRef.current;
|
|
27760
|
+
|
|
27761
|
+
if (!popupEl) {
|
|
27762
|
+
return;
|
|
27763
|
+
}
|
|
27764
|
+
|
|
27765
|
+
const inputEl = popupEl.querySelector('input');
|
|
27766
|
+
|
|
27767
|
+
(inputEl || popupEl).focus();
|
|
27768
|
+
}, []);
|
|
27769
|
+
|
|
27770
|
+
// global <Escape> / blur handlers
|
|
27771
|
+
h$2(() => {
|
|
27772
|
+
const handleKeyDown = event => {
|
|
27773
|
+
if (event.key === 'Escape') {
|
|
27774
|
+
event.preventDefault();
|
|
27775
|
+
|
|
27776
|
+
return onClose();
|
|
27777
|
+
}
|
|
27778
|
+
};
|
|
27779
|
+
|
|
27780
|
+
const handleClick = event => {
|
|
27781
|
+
const popup = closest(event.target, '.djs-popup', true);
|
|
27782
|
+
|
|
27783
|
+
if (popup) {
|
|
27784
|
+
return;
|
|
27785
|
+
}
|
|
27786
|
+
|
|
27787
|
+
return onClose();
|
|
27788
|
+
};
|
|
27789
|
+
|
|
27790
|
+
document.documentElement.addEventListener('keydown', handleKeyDown);
|
|
27791
|
+
document.body.addEventListener('click', handleClick);
|
|
27792
|
+
|
|
27793
|
+
return () => {
|
|
27794
|
+
document.documentElement.removeEventListener('keydown', handleKeyDown);
|
|
27795
|
+
document.body.removeEventListener('click', handleClick);
|
|
27796
|
+
};
|
|
27674
27797
|
}, []);
|
|
27675
27798
|
|
|
27676
27799
|
return m$3`
|
|
27677
27800
|
<div
|
|
27678
|
-
class
|
|
27679
|
-
|
|
27801
|
+
class=${ clsx('djs-popup', className) }
|
|
27802
|
+
style=${ getPopupStyle(props) }
|
|
27803
|
+
onKeydown=${ onKeydown }
|
|
27804
|
+
onKeyup=${ onKeyup }
|
|
27805
|
+
ref=${ popupRef }
|
|
27806
|
+
tabIndex="-1"
|
|
27680
27807
|
>
|
|
27681
|
-
|
|
27682
|
-
class=${ clsx('djs-popup', className) }
|
|
27683
|
-
style=${ getPopupStyle(props) }
|
|
27684
|
-
onKeydown=${ onKeydown }
|
|
27685
|
-
onKeyup=${ onKeyup }
|
|
27686
|
-
ref=${ popupRef }
|
|
27687
|
-
tabIndex="-1"
|
|
27688
|
-
>
|
|
27689
|
-
${ children }
|
|
27690
|
-
</div>
|
|
27808
|
+
${ children }
|
|
27691
27809
|
</div>
|
|
27692
27810
|
`;
|
|
27693
27811
|
}
|
|
@@ -29052,6 +29170,7 @@
|
|
|
29052
29170
|
*
|
|
29053
29171
|
* @param {Shape} source
|
|
29054
29172
|
* @param {Shape} shape
|
|
29173
|
+
* @param {any} [hints={}]
|
|
29055
29174
|
*
|
|
29056
29175
|
* @return {Shape} appended shape
|
|
29057
29176
|
*/
|
|
@@ -31128,7 +31247,7 @@
|
|
|
31128
31247
|
classes(groupGfx).add(SEGMENT_DRAGGER_CLS);
|
|
31129
31248
|
classes(groupGfx).add(alignment === 'h' ? 'horizontal' : 'vertical');
|
|
31130
31249
|
|
|
31131
|
-
translate$
|
|
31250
|
+
translate$1(groupGfx, mid.x, mid.y);
|
|
31132
31251
|
|
|
31133
31252
|
return groupGfx;
|
|
31134
31253
|
}
|
|
@@ -31329,7 +31448,7 @@
|
|
|
31329
31448
|
|
|
31330
31449
|
append(gfx, bendpoint);
|
|
31331
31450
|
|
|
31332
|
-
translate$
|
|
31451
|
+
translate$1(bendpoint, p.x, p.y);
|
|
31333
31452
|
});
|
|
31334
31453
|
|
|
31335
31454
|
// add floating bendpoint
|
|
@@ -31405,7 +31524,7 @@
|
|
|
31405
31524
|
return;
|
|
31406
31525
|
}
|
|
31407
31526
|
|
|
31408
|
-
translate$
|
|
31527
|
+
translate$1(floating, point.x, point.y);
|
|
31409
31528
|
|
|
31410
31529
|
}
|
|
31411
31530
|
|
|
@@ -31439,7 +31558,7 @@
|
|
|
31439
31558
|
};
|
|
31440
31559
|
}
|
|
31441
31560
|
|
|
31442
|
-
translate$
|
|
31561
|
+
translate$1(draggerVisual, relativePosition.x, relativePosition.y);
|
|
31443
31562
|
}
|
|
31444
31563
|
|
|
31445
31564
|
eventBus.on('connection.changed', function(event) {
|
|
@@ -31994,7 +32113,7 @@
|
|
|
31994
32113
|
connectionPreview.drawPreview(context, allowed, drawPreviewHints);
|
|
31995
32114
|
}
|
|
31996
32115
|
|
|
31997
|
-
translate$
|
|
32116
|
+
translate$1(draggerGfx, event.x, event.y);
|
|
31998
32117
|
}, this);
|
|
31999
32118
|
|
|
32000
32119
|
eventBus.on([
|
|
@@ -32235,7 +32354,7 @@
|
|
|
32235
32354
|
var draggerPosition = axisFenced(event, segmentStart, segmentEnd, axis);
|
|
32236
32355
|
|
|
32237
32356
|
// update dragger
|
|
32238
|
-
translate$
|
|
32357
|
+
translate$1(context.draggerGfx, draggerPosition.x, draggerPosition.y);
|
|
32239
32358
|
}
|
|
32240
32359
|
|
|
32241
32360
|
/**
|
|
@@ -33735,7 +33854,7 @@
|
|
|
33735
33854
|
|
|
33736
33855
|
this._graphicsFactory.drawShape(getVisual(gfx), element);
|
|
33737
33856
|
|
|
33738
|
-
translate$
|
|
33857
|
+
translate$1(gfx, element.x, element.y);
|
|
33739
33858
|
}
|
|
33740
33859
|
|
|
33741
33860
|
this._previewSupport.addDragger(element, layer, gfx);
|
|
@@ -33752,9 +33871,9 @@
|
|
|
33752
33871
|
const dragger = this._previewSupport.addDragger(element, layer);
|
|
33753
33872
|
|
|
33754
33873
|
if (isConnection$1(element)) {
|
|
33755
|
-
translate$
|
|
33874
|
+
translate$1(dragger, delta.x, delta.y);
|
|
33756
33875
|
} else {
|
|
33757
|
-
translate$
|
|
33876
|
+
translate$1(dragger, element.x + delta.x, element.y + delta.y);
|
|
33758
33877
|
}
|
|
33759
33878
|
});
|
|
33760
33879
|
|
|
@@ -33782,7 +33901,7 @@
|
|
|
33782
33901
|
height: bounds.height
|
|
33783
33902
|
});
|
|
33784
33903
|
|
|
33785
|
-
translate$
|
|
33904
|
+
translate$1(gfx, bounds.x, bounds.y);
|
|
33786
33905
|
|
|
33787
33906
|
this._previewSupport.addDragger(shape, layer, gfx);
|
|
33788
33907
|
});
|
|
@@ -42141,7 +42260,7 @@
|
|
|
42141
42260
|
|
|
42142
42261
|
var OrderingModule = {
|
|
42143
42262
|
__depends__: [
|
|
42144
|
-
|
|
42263
|
+
TranslateModule
|
|
42145
42264
|
],
|
|
42146
42265
|
__init__: [ 'bpmnOrderingProvider' ],
|
|
42147
42266
|
bpmnOrderingProvider: [ 'type', BpmnOrderingProvider ]
|
|
@@ -42435,6 +42554,11 @@
|
|
|
42435
42554
|
|
|
42436
42555
|
// API //////////
|
|
42437
42556
|
|
|
42557
|
+
/**
|
|
42558
|
+
* @param event
|
|
42559
|
+
* @param elements
|
|
42560
|
+
* @param {any} [context={}]
|
|
42561
|
+
*/
|
|
42438
42562
|
this.start = function(event, elements, context) {
|
|
42439
42563
|
if (!isArray$4(elements)) {
|
|
42440
42564
|
elements = [ elements ];
|
|
@@ -42590,7 +42714,7 @@
|
|
|
42590
42714
|
|
|
42591
42715
|
graphicsFactory.drawShape(getVisual(gfx), element);
|
|
42592
42716
|
|
|
42593
|
-
translate$
|
|
42717
|
+
translate$1(gfx, element.x, element.y);
|
|
42594
42718
|
}
|
|
42595
42719
|
|
|
42596
42720
|
// add preview
|
|
@@ -42621,7 +42745,7 @@
|
|
|
42621
42745
|
append(activeLayer, dragGroup);
|
|
42622
42746
|
}
|
|
42623
42747
|
|
|
42624
|
-
translate$
|
|
42748
|
+
translate$1(dragGroup, event.x, event.y);
|
|
42625
42749
|
} else {
|
|
42626
42750
|
remove$2(dragGroup);
|
|
42627
42751
|
}
|
|
@@ -45222,7 +45346,7 @@
|
|
|
45222
45346
|
eventBus.on('spaceTool.selection.move', function(event) {
|
|
45223
45347
|
var crosshairGroup = event.context.crosshairGroup;
|
|
45224
45348
|
|
|
45225
|
-
translate$
|
|
45349
|
+
translate$1(crosshairGroup, event.x, event.y);
|
|
45226
45350
|
});
|
|
45227
45351
|
|
|
45228
45352
|
// remove crosshair
|
|
@@ -45357,7 +45481,7 @@
|
|
|
45357
45481
|
delta[ opposite[ context.axis ] ] = 0;
|
|
45358
45482
|
|
|
45359
45483
|
// update move previews
|
|
45360
|
-
translate$
|
|
45484
|
+
translate$1(context.dragGroup, delta.x, delta.y);
|
|
45361
45485
|
|
|
45362
45486
|
// update resize previews
|
|
45363
45487
|
forEach$2(context.frames, function(frame) {
|
|
@@ -51402,36 +51526,41 @@
|
|
|
51402
51526
|
throw new Error(translate('more than {count} child lanes', { count: newLanesCount }));
|
|
51403
51527
|
}
|
|
51404
51528
|
|
|
51405
|
-
var
|
|
51529
|
+
var isHorizontalLane = isHorizontal$3(shape);
|
|
51530
|
+
|
|
51531
|
+
var laneBaseSize = isHorizontalLane ? shape.height : shape.width;
|
|
51532
|
+
var newLanesSize = Math.round(laneBaseSize / newLanesCount);
|
|
51406
51533
|
|
|
51407
|
-
// Iterate from
|
|
51534
|
+
// Iterate from first to last in child lane order,
|
|
51408
51535
|
// resizing existing lanes and creating new ones
|
|
51409
51536
|
// so that they split the parent proportionally.
|
|
51410
51537
|
//
|
|
51411
|
-
// Due to rounding related errors, the
|
|
51538
|
+
// Due to rounding related errors, the last lane
|
|
51412
51539
|
// needs to take up all the remaining space.
|
|
51413
|
-
var
|
|
51414
|
-
laneHeight,
|
|
51540
|
+
var laneSize,
|
|
51415
51541
|
laneBounds,
|
|
51416
51542
|
newLaneAttrs,
|
|
51417
51543
|
idx;
|
|
51418
51544
|
|
|
51419
51545
|
for (idx = 0; idx < newLanesCount; idx++) {
|
|
51420
51546
|
|
|
51421
|
-
|
|
51422
|
-
|
|
51423
|
-
// if bottom lane
|
|
51547
|
+
// if last lane
|
|
51424
51548
|
if (idx === newLanesCount - 1) {
|
|
51425
|
-
|
|
51549
|
+
laneSize = laneBaseSize - (newLanesSize * idx);
|
|
51426
51550
|
} else {
|
|
51427
|
-
|
|
51551
|
+
laneSize = newLanesSize;
|
|
51428
51552
|
}
|
|
51429
51553
|
|
|
51430
|
-
laneBounds = {
|
|
51554
|
+
laneBounds = isHorizontalLane ? {
|
|
51431
51555
|
x: shape.x + LANE_INDENTATION,
|
|
51432
|
-
y:
|
|
51556
|
+
y: shape.y + idx * newLanesSize,
|
|
51433
51557
|
width: shape.width - LANE_INDENTATION,
|
|
51434
|
-
height:
|
|
51558
|
+
height: laneSize
|
|
51559
|
+
} : {
|
|
51560
|
+
x: shape.x + idx * newLanesSize,
|
|
51561
|
+
y: shape.y + LANE_INDENTATION,
|
|
51562
|
+
width: laneSize,
|
|
51563
|
+
height: shape.height - LANE_INDENTATION
|
|
51435
51564
|
};
|
|
51436
51565
|
|
|
51437
51566
|
if (idx < existingLanesCount) {
|
|
@@ -51442,7 +51571,8 @@
|
|
|
51442
51571
|
|
|
51443
51572
|
// create a new lane at position
|
|
51444
51573
|
newLaneAttrs = {
|
|
51445
|
-
type: 'bpmn:Lane'
|
|
51574
|
+
type: 'bpmn:Lane',
|
|
51575
|
+
isHorizontal: isHorizontalLane
|
|
51446
51576
|
};
|
|
51447
51577
|
|
|
51448
51578
|
modeling.createShape(newLaneAttrs, laneBounds, shape);
|
|
@@ -56394,7 +56524,7 @@
|
|
|
56394
56524
|
|
|
56395
56525
|
if (childLanes.length < 2) {
|
|
56396
56526
|
|
|
56397
|
-
if (element.height >= 120) {
|
|
56527
|
+
if (isHorizontal$3(element) ? element.height >= 120 : element.width >= 120) {
|
|
56398
56528
|
assign$2(actions, {
|
|
56399
56529
|
'lane-divide-two': {
|
|
56400
56530
|
group: 'lane-divide',
|
|
@@ -56407,7 +56537,7 @@
|
|
|
56407
56537
|
});
|
|
56408
56538
|
}
|
|
56409
56539
|
|
|
56410
|
-
if (element.height >= 180) {
|
|
56540
|
+
if (isHorizontal$3(element) ? element.height >= 180 : element.width >= 180) {
|
|
56411
56541
|
assign$2(actions, {
|
|
56412
56542
|
'lane-divide-three': {
|
|
56413
56543
|
group: 'lane-divide',
|
|
@@ -57323,9 +57453,9 @@
|
|
|
57323
57453
|
};
|
|
57324
57454
|
|
|
57325
57455
|
/**
|
|
57326
|
-
* Returns the
|
|
57456
|
+
* Returns the identifiers of all currently registered editor actions
|
|
57327
57457
|
*
|
|
57328
|
-
* @return {
|
|
57458
|
+
* @return {string[]}
|
|
57329
57459
|
*/
|
|
57330
57460
|
EditorActions.prototype.getActions = function() {
|
|
57331
57461
|
return Object.keys(this._actions);
|
|
@@ -60053,7 +60183,7 @@
|
|
|
60053
60183
|
|
|
60054
60184
|
append(defaultLayer, gfx);
|
|
60055
60185
|
|
|
60056
|
-
translate$
|
|
60186
|
+
translate$1(gfx, element.x, element.y);
|
|
60057
60187
|
}
|
|
60058
60188
|
|
|
60059
60189
|
if (is$5(element, 'bpmn:TextAnnotation') ||
|
|
@@ -60996,7 +61126,7 @@
|
|
|
60996
61126
|
}
|
|
60997
61127
|
}
|
|
60998
61128
|
|
|
60999
|
-
translate$
|
|
61129
|
+
translate$1(dragGroup, event.dx, event.dy);
|
|
61000
61130
|
});
|
|
61001
61131
|
|
|
61002
61132
|
eventBus.on([ 'shape.move.out', 'shape.move.cleanup' ], function(event) {
|
|
@@ -62218,7 +62348,12 @@
|
|
|
62218
62348
|
'mouse'
|
|
62219
62349
|
];
|
|
62220
62350
|
|
|
62221
|
-
|
|
62351
|
+
/**
|
|
62352
|
+
*
|
|
62353
|
+
* @param event
|
|
62354
|
+
* @param {boolean} [autoActivate]
|
|
62355
|
+
* @param {object} [context]
|
|
62356
|
+
*/
|
|
62222
62357
|
HandTool.prototype.activateMove = function(event, autoActivate, context) {
|
|
62223
62358
|
if (typeof autoActivate === 'object') {
|
|
62224
62359
|
context = autoActivate;
|
|
@@ -62234,6 +62369,12 @@
|
|
|
62234
62369
|
});
|
|
62235
62370
|
};
|
|
62236
62371
|
|
|
62372
|
+
/**
|
|
62373
|
+
*
|
|
62374
|
+
* @param event
|
|
62375
|
+
* @param {boolean} [autoActivate]
|
|
62376
|
+
* @param {boolean} [reactivate]
|
|
62377
|
+
*/
|
|
62237
62378
|
HandTool.prototype.activateHand = function(event, autoActivate, reactivate) {
|
|
62238
62379
|
this._dragging.init(event, 'hand', {
|
|
62239
62380
|
trapClick: false,
|
|
@@ -62664,7 +62805,7 @@
|
|
|
62664
62805
|
LassoToolModule,
|
|
62665
62806
|
HandToolModule,
|
|
62666
62807
|
GlobalConnectModule,
|
|
62667
|
-
|
|
62808
|
+
TranslateModule
|
|
62668
62809
|
],
|
|
62669
62810
|
__init__: [ 'paletteProvider' ],
|
|
62670
62811
|
paletteProvider: [ 'type', PaletteProvider ]
|
|
@@ -64033,6 +64174,7 @@
|
|
|
64033
64174
|
* @typedef {import('../../core/EventBus').default} EventBus
|
|
64034
64175
|
* @typedef {import('../overlays/Overlays').default} Overlays
|
|
64035
64176
|
* @typedef {import('../selection/Selection').default} Selection
|
|
64177
|
+
* @typedef {import('../../i18n/translate/translate.js').default} Translate
|
|
64036
64178
|
*
|
|
64037
64179
|
* @typedef {import('../overlays/Overlays').OverlayAttrs} OverlayAttrs
|
|
64038
64180
|
*
|
|
@@ -64050,8 +64192,9 @@
|
|
|
64050
64192
|
* @param {EventBus} eventBus
|
|
64051
64193
|
* @param {Overlays} overlays
|
|
64052
64194
|
* @param {Selection} selection
|
|
64195
|
+
* @param {Translate} translate
|
|
64053
64196
|
*/
|
|
64054
|
-
function SearchPad(canvas, eventBus, overlays, selection) {
|
|
64197
|
+
function SearchPad(canvas, eventBus, overlays, selection, translate) {
|
|
64055
64198
|
this._open = false;
|
|
64056
64199
|
this._results = [];
|
|
64057
64200
|
this._eventMaps = [];
|
|
@@ -64060,9 +64203,10 @@
|
|
|
64060
64203
|
this._eventBus = eventBus;
|
|
64061
64204
|
this._overlays = overlays;
|
|
64062
64205
|
this._selection = selection;
|
|
64206
|
+
this._translate = translate;
|
|
64063
64207
|
|
|
64064
64208
|
// setup elements
|
|
64065
|
-
this._container =
|
|
64209
|
+
this._container = this._getBoxHtml();
|
|
64066
64210
|
this._searchInput = query(SearchPad.INPUT_SELECTOR, this._container);
|
|
64067
64211
|
this._resultsContainer = query(SearchPad.RESULTS_CONTAINER_SELECTOR, this._container);
|
|
64068
64212
|
|
|
@@ -64078,7 +64222,8 @@
|
|
|
64078
64222
|
'canvas',
|
|
64079
64223
|
'eventBus',
|
|
64080
64224
|
'overlays',
|
|
64081
|
-
'selection'
|
|
64225
|
+
'selection',
|
|
64226
|
+
'translate'
|
|
64082
64227
|
];
|
|
64083
64228
|
|
|
64084
64229
|
|
|
@@ -64459,6 +64604,17 @@
|
|
|
64459
64604
|
}
|
|
64460
64605
|
};
|
|
64461
64606
|
|
|
64607
|
+
SearchPad.prototype._getBoxHtml = function() {
|
|
64608
|
+
const box = domify$1(SearchPad.BOX_HTML);
|
|
64609
|
+
const input = query(SearchPad.INPUT_SELECTOR, box);
|
|
64610
|
+
|
|
64611
|
+
if (input) {
|
|
64612
|
+
input.setAttribute('aria-label', this._translate('Search in diagram'));
|
|
64613
|
+
}
|
|
64614
|
+
|
|
64615
|
+
return box;
|
|
64616
|
+
};
|
|
64617
|
+
|
|
64462
64618
|
|
|
64463
64619
|
/**
|
|
64464
64620
|
* Construct overlay object for the given bounding box.
|
|
@@ -64565,6 +64721,7 @@
|
|
|
64565
64721
|
*/
|
|
64566
64722
|
var SearchPadModule = {
|
|
64567
64723
|
__depends__: [
|
|
64724
|
+
TranslateModule,
|
|
64568
64725
|
OverlaysModule,
|
|
64569
64726
|
SelectionModule
|
|
64570
64727
|
],
|
|
@@ -97451,6 +97608,7 @@
|
|
|
97451
97608
|
function FeelEditor({
|
|
97452
97609
|
extensions: editorExtensions = [],
|
|
97453
97610
|
container,
|
|
97611
|
+
contentAttributes = {},
|
|
97454
97612
|
tooltipContainer,
|
|
97455
97613
|
onChange = () => {},
|
|
97456
97614
|
onKeyDown = () => {},
|
|
@@ -97502,6 +97660,7 @@
|
|
|
97502
97660
|
bracketMatching(),
|
|
97503
97661
|
changeHandler,
|
|
97504
97662
|
closeBrackets(),
|
|
97663
|
+
EditorView.contentAttributes.of(contentAttributes),
|
|
97505
97664
|
indentOnInput(),
|
|
97506
97665
|
keyHandler,
|
|
97507
97666
|
keymap.of([
|
|
@@ -99949,6 +100108,7 @@
|
|
|
99949
100108
|
};
|
|
99950
100109
|
const CodeEditor = N((props, ref) => {
|
|
99951
100110
|
const {
|
|
100111
|
+
contentAttributes,
|
|
99952
100112
|
enableGutters,
|
|
99953
100113
|
value,
|
|
99954
100114
|
onInput,
|
|
@@ -99994,7 +100154,8 @@
|
|
|
99994
100154
|
tooltipContainer: tooltipContainer,
|
|
99995
100155
|
value: localValue,
|
|
99996
100156
|
variables: variables,
|
|
99997
|
-
extensions: [...(enableGutters ? [lineNumbers()] : []), EditorView.lineWrapping]
|
|
100157
|
+
extensions: [...(enableGutters ? [lineNumbers()] : []), EditorView.lineWrapping],
|
|
100158
|
+
contentAttributes
|
|
99998
100159
|
});
|
|
99999
100160
|
setEditor(editor);
|
|
100000
100161
|
return () => {
|