@eclipse-glsp/layout-elk 1.1.0-next.afa6928.27 → 1.1.0-next.bc2649d.62
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/lib/di.config.d.ts +3 -2
- package/lib/di.config.d.ts.map +1 -1
- package/lib/di.config.js +12 -14
- package/lib/di.config.js.map +1 -1
- package/lib/element-filter.d.ts +2 -2
- package/lib/element-filter.d.ts.map +1 -1
- package/lib/element-filter.js +11 -12
- package/lib/element-filter.js.map +1 -1
- package/lib/glsp-elk-layout-engine.d.ts +10 -3
- package/lib/glsp-elk-layout-engine.d.ts.map +1 -1
- package/lib/glsp-elk-layout-engine.js +33 -33
- package/lib/glsp-elk-layout-engine.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -17
- package/lib/index.js.map +1 -1
- package/lib/layout-configurator.d.ts +3 -3
- package/lib/layout-configurator.d.ts.map +1 -1
- package/lib/layout-configurator.js +12 -14
- package/lib/layout-configurator.js.map +1 -1
- package/package.json +24 -25
- package/src/di.config.spec.ts +26 -5
- package/src/di.config.ts +5 -7
- package/src/element-filter.ts +2 -2
- package/src/glsp-elk-layout-engine.ts +12 -3
- package/src/index.ts +2 -2
- package/src/layout-configurator.ts +3 -4
- package/lib/di.config.spec.d.ts +0 -2
- package/lib/di.config.spec.d.ts.map +0 -1
- package/lib/di.config.spec.js +0 -97
- package/lib/di.config.spec.js.map +0 -1
- package/lib/sprotty-elk.d.ts +0 -18
- package/lib/sprotty-elk.d.ts.map +0 -1
- package/lib/sprotty-elk.js +0 -6
- package/lib/sprotty-elk.js.map +0 -1
- package/src/sprotty-elk.ts +0 -18
package/lib/di.config.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LayoutOptions } from 'elkjs/lib/elk.bundled';
|
|
2
2
|
import { ContainerModule } from 'inversify';
|
|
3
|
-
import { ElementFilter
|
|
4
|
-
|
|
3
|
+
import { ElementFilter } from './element-filter';
|
|
4
|
+
import { LayoutConfigurator } from './layout-configurator';
|
|
5
|
+
type Constructor<T> = new (...args: any[]) => T;
|
|
5
6
|
/**
|
|
6
7
|
* Configuration options for the {@link configureELKLayoutModule} function.
|
|
7
8
|
*/
|
package/lib/di.config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":"AAgBA,OAAuB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":"AAgBA,OAAuB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAA8B,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEvF,KAAK,WAAW,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,aAAa,CAAC;IACrC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACrD;;;OAGG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAoCnF"}
|
package/lib/di.config.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.configureELKLayoutModule = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
5
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -16,11 +16,9 @@ exports.configureELKLayoutModule = void 0;
|
|
|
16
16
|
*
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
|
-
const
|
|
19
|
+
const server_1 = require("@eclipse-glsp/server");
|
|
20
20
|
const elk_bundled_1 = require("elkjs/lib/elk.bundled");
|
|
21
21
|
const inversify_1 = require("inversify");
|
|
22
|
-
const sprotty_elk_1 = require("sprotty-elk");
|
|
23
|
-
const _1 = require(".");
|
|
24
22
|
const element_filter_1 = require("./element-filter");
|
|
25
23
|
const glsp_elk_layout_engine_1 = require("./glsp-elk-layout-engine");
|
|
26
24
|
const layout_configurator_1 = require("./layout-configurator");
|
|
@@ -43,16 +41,16 @@ const layout_configurator_1 = require("./layout-configurator");
|
|
|
43
41
|
function configureELKLayoutModule(options) {
|
|
44
42
|
return new inversify_1.ContainerModule(bind => {
|
|
45
43
|
if (options.elementFilter) {
|
|
46
|
-
bind(
|
|
44
|
+
bind(element_filter_1.ElementFilter).to(options.elementFilter).inSingletonScope();
|
|
47
45
|
}
|
|
48
46
|
else {
|
|
49
|
-
bind(
|
|
47
|
+
bind(element_filter_1.ElementFilter).to(element_filter_1.DefaultElementFilter).inSingletonScope();
|
|
50
48
|
}
|
|
51
49
|
if (options.layoutConfigurator) {
|
|
52
|
-
bind(
|
|
50
|
+
bind(layout_configurator_1.LayoutConfigurator).to(options.layoutConfigurator);
|
|
53
51
|
}
|
|
54
52
|
else {
|
|
55
|
-
bind(
|
|
53
|
+
bind(layout_configurator_1.LayoutConfigurator)
|
|
56
54
|
.toDynamicValue(context => new layout_configurator_1.FallbackLayoutConfigurator(options.algorithms, options.defaultLayoutOptions))
|
|
57
55
|
.inSingletonScope();
|
|
58
56
|
}
|
|
@@ -60,18 +58,18 @@ function configureELKLayoutModule(options) {
|
|
|
60
58
|
algorithms: options.algorithms,
|
|
61
59
|
defaultLayoutOptions: options.defaultLayoutOptions
|
|
62
60
|
});
|
|
63
|
-
bind(
|
|
61
|
+
bind(glsp_elk_layout_engine_1.ElkFactory).toConstantValue(elkFactory);
|
|
64
62
|
bind(glsp_elk_layout_engine_1.GlspElkLayoutEngine)
|
|
65
63
|
.toDynamicValue(context => {
|
|
66
64
|
const container = context.container;
|
|
67
|
-
const factory = container.get(
|
|
68
|
-
const filter = container.get(
|
|
69
|
-
const configurator = container.get(
|
|
70
|
-
const modelState = container.get(
|
|
65
|
+
const factory = container.get(glsp_elk_layout_engine_1.ElkFactory);
|
|
66
|
+
const filter = container.get(element_filter_1.ElementFilter);
|
|
67
|
+
const configurator = container.get(layout_configurator_1.LayoutConfigurator);
|
|
68
|
+
const modelState = container.get(server_1.ModelState);
|
|
71
69
|
return new glsp_elk_layout_engine_1.GlspElkLayoutEngine(factory, filter, configurator, modelState);
|
|
72
70
|
})
|
|
73
71
|
.inSingletonScope();
|
|
74
|
-
bind(
|
|
72
|
+
bind(server_1.LayoutEngine).toService(glsp_elk_layout_engine_1.GlspElkLayoutEngine);
|
|
75
73
|
});
|
|
76
74
|
}
|
|
77
75
|
exports.configureELKLayoutModule = configureELKLayoutModule;
|
package/lib/di.config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../src/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;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CAAgB,8BAAa,CAAC,CAAC;YAC3D,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAqB,wCAAkB,CAAC,CAAC;YAC3E,MAAM,UAAU,GAAG,SAAS,CAAC,GAAG,CAAa,mBAAU,CAAC,CAAC;YACzD,OAAO,IAAI,4CAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;QAC9E,CAAC,CAAC;aACD,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,qBAAY,CAAC,CAAC,SAAS,CAAC,4CAAmB,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACP,CAAC;AApCD,4DAoCC"}
|
package/lib/element-filter.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2023 TypeFox and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { GEdge, GLabel, GModelElement, GNode, GPort, ModelState } from '@eclipse-glsp/server
|
|
16
|
+
import { GEdge, GLabel, GModelElement, GNode, GPort, ModelState } from '@eclipse-glsp/server';
|
|
17
17
|
export declare const ElementFilter: unique symbol;
|
|
18
18
|
/**
|
|
19
19
|
* Filter used to determine which model elements should be included in the automatic layout.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-filter.d.ts","sourceRoot":"","sources":["../src/element-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"element-filter.d.ts","sourceRoot":"","sources":["../src/element-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG9F,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;OAIG;IACH,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC;CAC1C;AAED;;;;;;;GAOG;AACH,qBACa,oBAAqB,YAAW,aAAa;IAEtD,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAEjC,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO;IAatC,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO;IAI1C,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO;IAe1C,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAI7C,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO;CAG7C"}
|
package/lib/element-filter.js
CHANGED
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DefaultElementFilter = exports.ElementFilter = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2018-
|
|
14
|
+
* Copyright (c) 2018-2023 TypeFox and others.
|
|
15
15
|
*
|
|
16
16
|
* This program and the accompanying materials are made available under the
|
|
17
17
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -25,7 +25,7 @@ exports.DefaultElementFilter = exports.ElementFilter = void 0;
|
|
|
25
25
|
*
|
|
26
26
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
27
|
********************************************************************************/
|
|
28
|
-
const
|
|
28
|
+
const server_1 = require("@eclipse-glsp/server");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
exports.ElementFilter = Symbol('ElementFilter');
|
|
31
31
|
/**
|
|
@@ -36,18 +36,18 @@ exports.ElementFilter = Symbol('ElementFilter');
|
|
|
36
36
|
* as well. The filter behavior for each of the basic types can be customized by overriding the corresponding `filter` method.
|
|
37
37
|
* (e.g. {@link DefaultElementFilter.filterNode})
|
|
38
38
|
*/
|
|
39
|
-
let DefaultElementFilter = class DefaultElementFilter {
|
|
39
|
+
let DefaultElementFilter = exports.DefaultElementFilter = class DefaultElementFilter {
|
|
40
40
|
apply(element) {
|
|
41
|
-
if (element instanceof
|
|
41
|
+
if (element instanceof server_1.GNode) {
|
|
42
42
|
return this.filterNode(element);
|
|
43
43
|
}
|
|
44
|
-
else if (element instanceof
|
|
44
|
+
else if (element instanceof server_1.GEdge) {
|
|
45
45
|
return this.filterEdge(element);
|
|
46
46
|
}
|
|
47
|
-
else if (element instanceof
|
|
47
|
+
else if (element instanceof server_1.GLabel) {
|
|
48
48
|
this.filterLabel(element);
|
|
49
49
|
}
|
|
50
|
-
else if (element instanceof
|
|
50
|
+
else if (element instanceof server_1.GPort) {
|
|
51
51
|
this.filterPort(element);
|
|
52
52
|
}
|
|
53
53
|
return true;
|
|
@@ -57,11 +57,11 @@ let DefaultElementFilter = class DefaultElementFilter {
|
|
|
57
57
|
}
|
|
58
58
|
filterEdge(edge) {
|
|
59
59
|
const source = this.modelState.index.get(edge.sourceId);
|
|
60
|
-
if (!source || (source instanceof
|
|
60
|
+
if (!source || (source instanceof server_1.GNode && !this.filterNode(source)) || (source instanceof server_1.GPort && !this.filterPort(source))) {
|
|
61
61
|
return false;
|
|
62
62
|
}
|
|
63
63
|
const target = this.modelState.index.get(edge.targetId);
|
|
64
|
-
if (!target || (target instanceof
|
|
64
|
+
if (!target || (target instanceof server_1.GNode && !this.filterNode(target)) || (target instanceof server_1.GPort && !this.filterPort(target))) {
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
67
|
return true;
|
|
@@ -74,11 +74,10 @@ let DefaultElementFilter = class DefaultElementFilter {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
__decorate([
|
|
77
|
-
(0, inversify_1.inject)(
|
|
77
|
+
(0, inversify_1.inject)(server_1.ModelState),
|
|
78
78
|
__metadata("design:type", Object)
|
|
79
79
|
], DefaultElementFilter.prototype, "modelState", void 0);
|
|
80
|
-
DefaultElementFilter = __decorate([
|
|
80
|
+
exports.DefaultElementFilter = DefaultElementFilter = __decorate([
|
|
81
81
|
(0, inversify_1.injectable)()
|
|
82
82
|
], DefaultElementFilter);
|
|
83
|
-
exports.DefaultElementFilter = DefaultElementFilter;
|
|
84
83
|
//# sourceMappingURL=element-filter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-filter.js","sourceRoot":"","sources":["../src/element-filter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"element-filter.js","sourceRoot":"","sources":["../src/element-filter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAA8F;AAC9F,yCAA+C;AAElC,QAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAarD;;;;;;;GAOG;AAEI,IAAM,oBAAoB,kCAA1B,MAAM,oBAAoB;IAI7B,KAAK,CAAC,OAAsB;QACxB,IAAI,OAAO,YAAY,cAAK,EAAE;YAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;SACnC;aAAM,IAAI,OAAO,YAAY,cAAK,EAAE;YACjC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;SACnC;aAAM,IAAI,OAAO,YAAY,eAAM,EAAE;YAClC,IAA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
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2023 TypeFox and others.
|
|
3
3
|
* This program and the accompanying materials are made available under the
|
|
4
4
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
5
5
|
* http://www.eclipse.org/legal/epl-2.0.
|
|
@@ -12,11 +12,18 @@
|
|
|
12
12
|
*
|
|
13
13
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
14
14
|
********************************************************************************/
|
|
15
|
-
import { GEdge, GGraph, GLabel, GModelElement, GModelElementConstructor, GModelRoot, GNode, GPort, GShapeElement, LayoutEngine, MaybePromise, ModelState } from '@eclipse-glsp/server
|
|
15
|
+
import { GEdge, GGraph, GLabel, GModelElement, GModelElementConstructor, GModelRoot, GNode, GPort, GShapeElement, LayoutEngine, MaybePromise, ModelState } from '@eclipse-glsp/server';
|
|
16
16
|
import { ELK, ElkEdge, ElkGraphElement, ElkLabel, ElkNode, ElkPort, ElkPrimitiveEdge, ElkShape } from 'elkjs/lib/elk-api';
|
|
17
|
-
import { ElkFactory } from 'sprotty-elk';
|
|
18
17
|
import { ElementFilter } from './element-filter';
|
|
19
18
|
import { LayoutConfigurator } from './layout-configurator';
|
|
19
|
+
/**
|
|
20
|
+
* Factory for ELK instances. Follow the elkjs package documentation on how to configure ELK
|
|
21
|
+
* instances. For example, the bundled version can be used by importing the ELK constructor
|
|
22
|
+
* from `"elkjs/lib/elk.bundled"`. For the webworker version, import the constructor from
|
|
23
|
+
* `"elkjs/lib/elk-api"` and add the option `workerUrl: "elk/elk-worker.min.js"`.
|
|
24
|
+
*/
|
|
25
|
+
export type ElkFactory = () => ELK;
|
|
26
|
+
export declare const ElkFactory: unique symbol;
|
|
20
27
|
/**
|
|
21
28
|
* An implementation of GLSP's {@link LayoutEngine} interface that retrieves the graphical model from the {@link ModelState},
|
|
22
29
|
* transforms this model into an ELK graph and then invokes the underlying ELK instance for layout computation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-elk-layout-engine.d.ts","sourceRoot":"","sources":["../src/glsp-elk-layout-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;kFAakF;AAClF,OAAO,EAIH,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,wBAAwB,EACxB,UAAU,EACV,KAAK,EACL,KAAK,EACL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EAEb,MAAM,
|
|
1
|
+
{"version":3,"file":"glsp-elk-layout-engine.d.ts","sourceRoot":"","sources":["../src/glsp-elk-layout-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;kFAakF;AAClF,OAAO,EAIH,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,wBAAwB,EACxB,UAAU,EACV,KAAK,EACL,KAAK,EACL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EAEb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,OAAO,EAAmB,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE3I,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC;AACnC,eAAO,MAAM,UAAU,eAAuB,CAAC;AAE/C;;;GAGG;AACH,qBACa,mBAAoB,YAAW,YAAY;IAQhD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,aAAa;IACxC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,kBAAkB;IACnD,SAAS,CAAC,UAAU,EAAE,UAAU;IATpC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAE5B,SAAS,CAAC,QAAQ,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|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GlspElkLayoutEngine = void 0;
|
|
12
|
+
exports.GlspElkLayoutEngine = exports.ElkFactory = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2018-
|
|
14
|
+
* Copyright (c) 2018-2023 TypeFox and others.
|
|
15
15
|
* This program and the accompanying materials are made available under the
|
|
16
16
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
17
17
|
* http://www.eclipse.org/legal/epl-2.0.
|
|
@@ -24,16 +24,16 @@ exports.GlspElkLayoutEngine = void 0;
|
|
|
24
24
|
*
|
|
25
25
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
26
26
|
********************************************************************************/
|
|
27
|
-
const
|
|
27
|
+
const server_1 = require("@eclipse-glsp/server");
|
|
28
28
|
const inversify_1 = require("inversify");
|
|
29
|
-
const sprotty_elk_1 = require("sprotty-elk");
|
|
30
29
|
const element_filter_1 = require("./element-filter");
|
|
31
30
|
const layout_configurator_1 = require("./layout-configurator");
|
|
31
|
+
exports.ElkFactory = Symbol('ElkFactory');
|
|
32
32
|
/**
|
|
33
33
|
* An implementation of GLSP's {@link LayoutEngine} interface that retrieves the graphical model from the {@link ModelState},
|
|
34
34
|
* transforms this model into an ELK graph and then invokes the underlying ELK instance for layout computation.
|
|
35
35
|
*/
|
|
36
|
-
let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
36
|
+
let GlspElkLayoutEngine = exports.GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
37
37
|
constructor(elkFactory, filter, configurator, modelState) {
|
|
38
38
|
this.filter = filter;
|
|
39
39
|
this.configurator = configurator;
|
|
@@ -42,7 +42,7 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
42
42
|
}
|
|
43
43
|
layout() {
|
|
44
44
|
const root = this.modelState.root;
|
|
45
|
-
if (!(root instanceof
|
|
45
|
+
if (!(root instanceof server_1.GGraph)) {
|
|
46
46
|
return root;
|
|
47
47
|
}
|
|
48
48
|
this.elkEdges = [];
|
|
@@ -54,7 +54,7 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
transformToElk(model) {
|
|
57
|
-
if (model instanceof
|
|
57
|
+
if (model instanceof server_1.GGraph) {
|
|
58
58
|
const graph = this.transformGraph(model);
|
|
59
59
|
this.elkEdges.forEach(elkEdge => {
|
|
60
60
|
const parent = this.findCommonAncestor(elkEdge);
|
|
@@ -64,16 +64,16 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
64
64
|
});
|
|
65
65
|
return graph;
|
|
66
66
|
}
|
|
67
|
-
else if (model instanceof
|
|
67
|
+
else if (model instanceof server_1.GNode) {
|
|
68
68
|
return this.transformNode(model);
|
|
69
69
|
}
|
|
70
|
-
else if (model instanceof
|
|
70
|
+
else if (model instanceof server_1.GEdge) {
|
|
71
71
|
return this.transformEdge(model);
|
|
72
72
|
}
|
|
73
|
-
else if (model instanceof
|
|
73
|
+
else if (model instanceof server_1.GLabel) {
|
|
74
74
|
return this.transformPort(model);
|
|
75
75
|
}
|
|
76
|
-
else if (model instanceof
|
|
76
|
+
else if (model instanceof server_1.GPort) {
|
|
77
77
|
return this.transformPort(model);
|
|
78
78
|
}
|
|
79
79
|
throw new Error('Type not supported: ' + model.type);
|
|
@@ -91,7 +91,7 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
91
91
|
if (child instanceof constructor && this.filter.apply(element)) {
|
|
92
92
|
result.push(child);
|
|
93
93
|
}
|
|
94
|
-
else if (child instanceof
|
|
94
|
+
else if (child instanceof server_1.GCompartment) {
|
|
95
95
|
result.push(...this.findChildren(child, constructor));
|
|
96
96
|
}
|
|
97
97
|
});
|
|
@@ -103,8 +103,8 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
103
103
|
if (!source || !target) {
|
|
104
104
|
return undefined;
|
|
105
105
|
}
|
|
106
|
-
const sourceParent = (0,
|
|
107
|
-
const targetParent = (0,
|
|
106
|
+
const sourceParent = (0, server_1.findParent)(source.parent, parent => parent instanceof server_1.GNode || parent instanceof server_1.GGraph);
|
|
107
|
+
const targetParent = (0, server_1.findParent)(target.parent, parent => parent instanceof server_1.GNode || parent instanceof server_1.GGraph);
|
|
108
108
|
if (!sourceParent || !targetParent) {
|
|
109
109
|
return undefined;
|
|
110
110
|
}
|
|
@@ -125,9 +125,9 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
125
125
|
layoutOptions: this.configurator.apply(graph)
|
|
126
126
|
};
|
|
127
127
|
if (graph.children) {
|
|
128
|
-
elkGraph.children = this.findChildren(graph,
|
|
128
|
+
elkGraph.children = this.findChildren(graph, server_1.GNode).map(child => this.transformToElk(child));
|
|
129
129
|
elkGraph.edges = [];
|
|
130
|
-
this.elkEdges.push(...this.findChildren(graph,
|
|
130
|
+
this.elkEdges.push(...this.findChildren(graph, server_1.GEdge).map(child => this.transformToElk(child)));
|
|
131
131
|
}
|
|
132
132
|
this.idToElkElement.set(graph.id, elkGraph);
|
|
133
133
|
return elkGraph;
|
|
@@ -138,11 +138,11 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
138
138
|
layoutOptions: this.configurator.apply(node)
|
|
139
139
|
};
|
|
140
140
|
if (node.children) {
|
|
141
|
-
elkNode.children = this.findChildren(node,
|
|
141
|
+
elkNode.children = this.findChildren(node, server_1.GNode).map(child => this.transformToElk(child));
|
|
142
142
|
elkNode.edges = [];
|
|
143
|
-
this.elkEdges.push(...this.findChildren(node,
|
|
144
|
-
elkNode.labels = this.findChildren(node,
|
|
145
|
-
elkNode.ports = this.findChildren(node,
|
|
143
|
+
this.elkEdges.push(...this.findChildren(node, server_1.GEdge).map(child => this.transformToElk(child)));
|
|
144
|
+
elkNode.labels = this.findChildren(node, server_1.GLabel).map(child => this.transformToElk(child));
|
|
145
|
+
elkNode.ports = this.findChildren(node, server_1.GPort).map(child => this.transformToElk(child));
|
|
146
146
|
}
|
|
147
147
|
this.transformShape(elkNode, node);
|
|
148
148
|
this.idToElkElement.set(node.id, elkNode);
|
|
@@ -166,23 +166,23 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
166
166
|
layoutOptions: this.configurator.apply(edge)
|
|
167
167
|
};
|
|
168
168
|
const sourceElement = this.modelState.index.get(edge.sourceId);
|
|
169
|
-
if (sourceElement instanceof
|
|
170
|
-
const parentNode = (0,
|
|
169
|
+
if (sourceElement instanceof server_1.GPort) {
|
|
170
|
+
const parentNode = (0, server_1.findParentByClass)(sourceElement, server_1.GNode);
|
|
171
171
|
if (parentNode) {
|
|
172
172
|
elkEdge.source = parentNode.id;
|
|
173
173
|
elkEdge.sourcePort = sourceElement.id;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
const targetElement = this.modelState.index.get(edge.targetId);
|
|
177
|
-
if (sourceElement instanceof
|
|
178
|
-
const parentNode = (0,
|
|
177
|
+
if (sourceElement instanceof server_1.GPort) {
|
|
178
|
+
const parentNode = (0, server_1.findParentByClass)(targetElement, server_1.GNode);
|
|
179
179
|
if (parentNode) {
|
|
180
180
|
elkEdge.target = parentNode.id;
|
|
181
181
|
elkEdge.targetPort = targetElement.id;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
if (edge.children) {
|
|
185
|
-
elkEdge.labels = this.findChildren(edge,
|
|
185
|
+
elkEdge.labels = this.findChildren(edge, server_1.GLabel).map(child => this.transformToElk(child));
|
|
186
186
|
}
|
|
187
187
|
const points = edge.routingPoints;
|
|
188
188
|
if (points && points.length >= 2) {
|
|
@@ -209,7 +209,8 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
209
209
|
layoutOptions: this.configurator.apply(port)
|
|
210
210
|
};
|
|
211
211
|
if (port.children) {
|
|
212
|
-
elkPort.labels = this.findChildren(port,
|
|
212
|
+
elkPort.labels = this.findChildren(port, server_1.GLabel).map(child => this.transformToElk(child));
|
|
213
|
+
this.elkEdges.push(...this.findChildren(port, server_1.GEdge).map(child => this.transformToElk(child)));
|
|
213
214
|
}
|
|
214
215
|
this.transformShape(elkPort, port);
|
|
215
216
|
this.idToElkElement.set(port.id, elkPort);
|
|
@@ -217,7 +218,7 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
217
218
|
}
|
|
218
219
|
applyLayout(elkNode) {
|
|
219
220
|
const element = this.modelState.index.get(elkNode.id);
|
|
220
|
-
if (element instanceof
|
|
221
|
+
if (element instanceof server_1.GNode) {
|
|
221
222
|
this.applyShape(element, elkNode);
|
|
222
223
|
}
|
|
223
224
|
if (elkNode.children) {
|
|
@@ -228,14 +229,14 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
228
229
|
if (elkNode.edges) {
|
|
229
230
|
for (const elkEdge of elkNode.edges) {
|
|
230
231
|
const edge = this.modelState.index.get(elkEdge.id);
|
|
231
|
-
if (edge instanceof
|
|
232
|
+
if (edge instanceof server_1.GEdge) {
|
|
232
233
|
this.applyEdge(edge, elkEdge);
|
|
233
234
|
}
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
if (elkNode.ports) {
|
|
237
238
|
for (const elkPort of elkNode.ports) {
|
|
238
|
-
const port = this.modelState.index.findByClass(elkPort.id,
|
|
239
|
+
const port = this.modelState.index.findByClass(elkPort.id, server_1.GPort);
|
|
239
240
|
if (port) {
|
|
240
241
|
this.applyShape(port, elkPort);
|
|
241
242
|
}
|
|
@@ -251,7 +252,7 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
251
252
|
}
|
|
252
253
|
if (elkShape.labels) {
|
|
253
254
|
for (const elkLabel of elkShape.labels) {
|
|
254
|
-
const label = this.modelState.index.findByClass(elkLabel.id,
|
|
255
|
+
const label = this.modelState.index.findByClass(elkLabel.id, server_1.GLabel);
|
|
255
256
|
if (label) {
|
|
256
257
|
this.applyShape(label, elkLabel);
|
|
257
258
|
}
|
|
@@ -287,7 +288,7 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
287
288
|
edge.routingPoints = points;
|
|
288
289
|
if (elkEdge.labels) {
|
|
289
290
|
elkEdge.labels.forEach(elkLabel => {
|
|
290
|
-
const label = this.modelState.index.findByClass(elkLabel.id,
|
|
291
|
+
const label = this.modelState.index.findByClass(elkLabel.id, server_1.GLabel);
|
|
291
292
|
if (label) {
|
|
292
293
|
this.applyShape(label, elkLabel);
|
|
293
294
|
}
|
|
@@ -295,9 +296,8 @@ let GlspElkLayoutEngine = class GlspElkLayoutEngine {
|
|
|
295
296
|
}
|
|
296
297
|
}
|
|
297
298
|
};
|
|
298
|
-
GlspElkLayoutEngine = __decorate([
|
|
299
|
+
exports.GlspElkLayoutEngine = GlspElkLayoutEngine = __decorate([
|
|
299
300
|
(0, inversify_1.injectable)(),
|
|
300
301
|
__metadata("design:paramtypes", [Function, Object, Object, Object])
|
|
301
302
|
], GlspElkLayoutEngine);
|
|
302
|
-
exports.GlspElkLayoutEngine = GlspElkLayoutEngine;
|
|
303
303
|
//# sourceMappingURL=glsp-elk-layout-engine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-elk-layout-engine.js","sourceRoot":"","sources":["../src/glsp-elk-layout-engine.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;kFAakF;AAClF,
|
|
1
|
+
{"version":3,"file":"glsp-elk-layout-engine.js","sourceRoot":"","sources":["../src/glsp-elk-layout-engine.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;kFAakF;AAClF,iDAiB8B;AAE9B,yCAAuC;AACvC,qDAAiD;AACjD,+DAA2D;AAS9C,QAAA,UAAU,GAAG,MAAM,CAAC,YAAY,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E5B,IAAI,OAAO,CAAC,MAAM,EAAE;YAChB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,EAAE,eAAM,CAAC,CAAC;gBACrE,IAAI,KAAK,EAAE;oBACP,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;iBACpC;YACL,CAAC,CAAC,CAAC;SACN;IACL,CAAC;CACJ,CAAA;8BAjSY,mBAAmB;IAD/B,IAAA,sBAAU,GAAE;;GACA,mBAAmB,CAiS/B"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
export { LayoutOptions } from 'elkjs';
|
|
16
17
|
export * from './di.config';
|
|
17
18
|
export * from './element-filter';
|
|
18
19
|
export * from './glsp-elk-layout-engine';
|
|
19
20
|
export * from './layout-configurator';
|
|
20
|
-
export * from './sprotty-elk';
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -10,24 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
15
|
-
*
|
|
16
|
-
* This program and the accompanying materials are made available under the
|
|
17
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
18
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
19
|
-
*
|
|
20
|
-
* This Source Code may also be made available under the following Secondary
|
|
21
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
22
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
23
|
-
* with the GNU Classpath Exception which is available at
|
|
24
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
25
|
-
*
|
|
26
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
|
-
********************************************************************************/
|
|
28
17
|
__exportStar(require("./di.config"), exports);
|
|
29
18
|
__exportStar(require("./element-filter"), exports);
|
|
30
19
|
__exportStar(require("./glsp-elk-layout-engine"), exports);
|
|
31
20
|
__exportStar(require("./layout-configurator"), exports);
|
|
32
|
-
__exportStar(require("./sprotty-elk"), exports);
|
|
33
21
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA,8CAA4B;AAC5B,mDAAiC;AACjC,2DAAyC;AACzC,wDAAsC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { GEdge, GGraph, GLabel, GModelElement, GNode, GPort, ModelState } from '@eclipse-glsp/server
|
|
17
|
-
import { LayoutOptions } from '
|
|
16
|
+
import { GEdge, GGraph, GLabel, GModelElement, GNode, GPort, ModelState } from '@eclipse-glsp/server';
|
|
17
|
+
import { LayoutOptions } from 'elkjs';
|
|
18
18
|
export declare const LayoutConfigurator: unique symbol;
|
|
19
19
|
/**
|
|
20
20
|
* Configurator for ELK layout algorithms; provides mappings of layout options for each model element.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-configurator.d.ts","sourceRoot":"","sources":["../src/layout-configurator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"layout-configurator.d.ts","sourceRoot":"","sources":["../src/layout-configurator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,GAAG,SAAS,CAAC;CAC5D;AAED;;;;GAIG;AACH,8BACsB,0BAA2B,YAAW,kBAAkB;IAE1E,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAEjC,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,GAAG,SAAS;IAexD,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIhE,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,aAAa,GAAG,SAAS;IAI7D,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,aAAa,GAAG,SAAS;IAI7D,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIhE,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,GAAG,SAAS;CAGjE;AAED;;;;;GAKG;AACH,qBACa,0BAA2B,SAAQ,0BAA0B;IACtE,SAAS,CAAC,oBAAoB,EAAE,aAAa,CAAC;gBAClC,UAAU,EAAE,MAAM,EAAE,EAAE,oBAAoB,GAAE,aAAkB;cAQvD,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;CAG7E"}
|
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.FallbackLayoutConfigurator = exports.AbstractLayoutConfigurator = exports.LayoutConfigurator = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
14
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
15
15
|
*
|
|
16
16
|
* This program and the accompanying materials are made available under the
|
|
17
17
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -25,7 +25,7 @@ exports.FallbackLayoutConfigurator = exports.AbstractLayoutConfigurator = export
|
|
|
25
25
|
*
|
|
26
26
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
27
|
********************************************************************************/
|
|
28
|
-
const
|
|
28
|
+
const server_1 = require("@eclipse-glsp/server");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
exports.LayoutConfigurator = Symbol('LayoutConfigurator');
|
|
31
31
|
/**
|
|
@@ -33,21 +33,21 @@ exports.LayoutConfigurator = Symbol('LayoutConfigurator');
|
|
|
33
33
|
* A minimal configuration should at least specify the `elk.algorithm` option as
|
|
34
34
|
* return value of {@link DefaultLayoutConfigurator.graphOptions}.
|
|
35
35
|
*/
|
|
36
|
-
let AbstractLayoutConfigurator = class AbstractLayoutConfigurator {
|
|
36
|
+
let AbstractLayoutConfigurator = exports.AbstractLayoutConfigurator = class AbstractLayoutConfigurator {
|
|
37
37
|
apply(element) {
|
|
38
|
-
if (element instanceof
|
|
38
|
+
if (element instanceof server_1.GGraph) {
|
|
39
39
|
return this.graphOptions(element);
|
|
40
40
|
}
|
|
41
|
-
else if (element instanceof
|
|
41
|
+
else if (element instanceof server_1.GNode) {
|
|
42
42
|
return this.nodeOptions(element);
|
|
43
43
|
}
|
|
44
|
-
else if (element instanceof
|
|
44
|
+
else if (element instanceof server_1.GEdge) {
|
|
45
45
|
return this.edgeOptions(element);
|
|
46
46
|
}
|
|
47
|
-
else if (element instanceof
|
|
47
|
+
else if (element instanceof server_1.GLabel) {
|
|
48
48
|
this.labelOptions(element);
|
|
49
49
|
}
|
|
50
|
-
else if (element instanceof
|
|
50
|
+
else if (element instanceof server_1.GPort) {
|
|
51
51
|
this.portOptions(element);
|
|
52
52
|
}
|
|
53
53
|
return undefined;
|
|
@@ -69,20 +69,19 @@ let AbstractLayoutConfigurator = class AbstractLayoutConfigurator {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
__decorate([
|
|
72
|
-
(0, inversify_1.inject)(
|
|
72
|
+
(0, inversify_1.inject)(server_1.ModelState),
|
|
73
73
|
__metadata("design:type", Object)
|
|
74
74
|
], AbstractLayoutConfigurator.prototype, "modelState", void 0);
|
|
75
|
-
AbstractLayoutConfigurator = __decorate([
|
|
75
|
+
exports.AbstractLayoutConfigurator = AbstractLayoutConfigurator = __decorate([
|
|
76
76
|
(0, inversify_1.injectable)()
|
|
77
77
|
], AbstractLayoutConfigurator);
|
|
78
|
-
exports.AbstractLayoutConfigurator = AbstractLayoutConfigurator;
|
|
79
78
|
/**
|
|
80
79
|
* A fallback configurator that is used in the `configureELKLayoutModule` utility method.
|
|
81
80
|
* If no explicit layout configurator binding is provided a new instance of the fallback configurator is
|
|
82
81
|
* bound as replacement. Basic layout options for the root graph element are derived from the
|
|
83
82
|
* configuration parameters that haven been passed to the `configureELKLayoutModule` function.
|
|
84
83
|
*/
|
|
85
|
-
let FallbackLayoutConfigurator = class FallbackLayoutConfigurator extends AbstractLayoutConfigurator {
|
|
84
|
+
let FallbackLayoutConfigurator = exports.FallbackLayoutConfigurator = class FallbackLayoutConfigurator extends AbstractLayoutConfigurator {
|
|
86
85
|
constructor(algorithms, defaultLayoutOptions = {}) {
|
|
87
86
|
super();
|
|
88
87
|
this.fallbackGraphOptions = Object.assign({ 'elk.algorithm': algorithms[0] }, defaultLayoutOptions);
|
|
@@ -91,9 +90,8 @@ let FallbackLayoutConfigurator = class FallbackLayoutConfigurator extends Abstra
|
|
|
91
90
|
return this.fallbackGraphOptions;
|
|
92
91
|
}
|
|
93
92
|
};
|
|
94
|
-
FallbackLayoutConfigurator = __decorate([
|
|
93
|
+
exports.FallbackLayoutConfigurator = FallbackLayoutConfigurator = __decorate([
|
|
95
94
|
(0, inversify_1.injectable)(),
|
|
96
95
|
__metadata("design:paramtypes", [Array, Object])
|
|
97
96
|
], FallbackLayoutConfigurator);
|
|
98
|
-
exports.FallbackLayoutConfigurator = FallbackLayoutConfigurator;
|
|
99
97
|
//# sourceMappingURL=layout-configurator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-configurator.js","sourceRoot":"","sources":["../src/layout-configurator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"layout-configurator.js","sourceRoot":"","sources":["../src/layout-configurator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAsG;AAEtG,yCAA+C;AAClC,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAe/D;;;;GAIG;AAEI,IAAe,0BAA0B,wCAAzC,MAAe,0BAA0B;IAI5C,KAAK,CAAC,OAAsB;QACxB,IAAI,OAAO,YAAY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C;CACJ,CAAA;qCAbY,0BAA0B;IADtC,IAAA,sBAAU,GAAE;;GACA,0BAA0B,CAatC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/layout-elk",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.bc2649d.62+bc2649d",
|
|
4
4
|
"description": "Integration of ELK graph layout algorithms in GLSP Node Server",
|
|
5
|
-
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
|
|
6
5
|
"keywords": [
|
|
7
6
|
"eclipse",
|
|
8
7
|
"graphics",
|
|
@@ -12,15 +11,16 @@
|
|
|
12
11
|
"glsp",
|
|
13
12
|
"diagram editor"
|
|
14
13
|
],
|
|
15
|
-
"author": {
|
|
16
|
-
"name": "Eclipse GLSP"
|
|
17
|
-
},
|
|
18
14
|
"homepage": "https://www.eclipse.org/glsp/",
|
|
15
|
+
"bugs": "https://github.com/eclipse-glsp/glsp/issues",
|
|
19
16
|
"repository": {
|
|
20
17
|
"type": "git",
|
|
21
18
|
"url": "https://github.com/eclipse-glsp/glsp-server-node.git"
|
|
22
19
|
},
|
|
23
|
-
"
|
|
20
|
+
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "Eclipse GLSP"
|
|
23
|
+
},
|
|
24
24
|
"contributors": [
|
|
25
25
|
{
|
|
26
26
|
"name": "STMicroelectronics",
|
|
@@ -32,33 +32,32 @@
|
|
|
32
32
|
"url": "https://projects.eclipse.org/projects/ecd.glsp"
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
|
+
"main": "lib/index",
|
|
36
|
+
"types": "lib/index",
|
|
35
37
|
"files": [
|
|
36
38
|
"lib",
|
|
37
|
-
"src"
|
|
38
|
-
"css"
|
|
39
|
+
"src"
|
|
39
40
|
],
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"@eclipse-glsp/server-node": "1.1.0-next.afa6928.27+afa6928",
|
|
42
|
-
"elkjs": "^0.7.1",
|
|
43
|
-
"sprotty-elk": "0.12.0"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"inversify": "^5.1.1"
|
|
47
|
-
},
|
|
48
41
|
"scripts": {
|
|
49
|
-
"
|
|
50
|
-
"clean": "rimraf tsconfig.tsbuildinfo
|
|
51
|
-
"
|
|
52
|
-
"
|
|
42
|
+
"build": "tsc -b",
|
|
43
|
+
"clean": "rimraf lib tsconfig.tsbuildinfo coverage .nyc_output",
|
|
44
|
+
"lint": "eslint --ext .ts,.tsx ./src",
|
|
45
|
+
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
|
|
46
|
+
"prepare": "yarn clean && yarn build",
|
|
47
|
+
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
|
|
53
48
|
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
|
|
54
|
-
"
|
|
55
|
-
"lint:fix": "eslint --fix -c ../../.eslintrc.js --ext .ts,.tsx ./src",
|
|
49
|
+
"test:coverage": "nyc yarn test",
|
|
56
50
|
"watch": "tsc -w"
|
|
57
51
|
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@eclipse-glsp/server": "1.1.0-next.bc2649d.62+bc2649d",
|
|
54
|
+
"elkjs": "^0.7.1"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"inversify": "^6.0.0"
|
|
58
|
+
},
|
|
58
59
|
"publishConfig": {
|
|
59
60
|
"access": "public"
|
|
60
61
|
},
|
|
61
|
-
"
|
|
62
|
-
"types": "lib/index",
|
|
63
|
-
"gitHead": "afa6928bf96daae2a28e5267a635c25cb393db53"
|
|
62
|
+
"gitHead": "bc2649d86ee5422165a61cd077ba9156bc7b1c05"
|
|
64
63
|
}
|
package/src/di.config.spec.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,15 +13,22 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
DefaultModelState,
|
|
18
|
+
DiagramConfiguration,
|
|
19
|
+
EdgeTypeHint,
|
|
20
|
+
GGraph,
|
|
21
|
+
GModelElementConstructor,
|
|
22
|
+
ModelState,
|
|
23
|
+
ServerLayoutKind,
|
|
24
|
+
ShapeTypeHint
|
|
25
|
+
} from '@eclipse-glsp/server';
|
|
18
26
|
import { expect } from 'chai';
|
|
19
27
|
import { Container, ContainerModule, injectable } from 'inversify';
|
|
20
28
|
import * as sinon from 'sinon';
|
|
21
|
-
import { AbstractLayoutConfigurator } from '.';
|
|
22
29
|
import { configureELKLayoutModule } from './di.config';
|
|
23
30
|
import { DefaultElementFilter, ElementFilter } from './element-filter';
|
|
24
|
-
import { FallbackLayoutConfigurator, LayoutConfigurator } from './layout-configurator';
|
|
31
|
+
import { AbstractLayoutConfigurator, FallbackLayoutConfigurator, LayoutConfigurator } from './layout-configurator';
|
|
25
32
|
|
|
26
33
|
@injectable()
|
|
27
34
|
class CustomLayoutConfigurator extends AbstractLayoutConfigurator {}
|
|
@@ -29,6 +36,20 @@ class CustomLayoutConfigurator extends AbstractLayoutConfigurator {}
|
|
|
29
36
|
@injectable()
|
|
30
37
|
class CustomElementFilter extends DefaultElementFilter {}
|
|
31
38
|
|
|
39
|
+
class StubDiagramConfiguration implements DiagramConfiguration {
|
|
40
|
+
typeMapping = new Map<string, GModelElementConstructor>();
|
|
41
|
+
|
|
42
|
+
shapeTypeHints: ShapeTypeHint[] = [];
|
|
43
|
+
|
|
44
|
+
edgeTypeHints: EdgeTypeHint[] = [];
|
|
45
|
+
|
|
46
|
+
layoutKind = ServerLayoutKind.NONE;
|
|
47
|
+
|
|
48
|
+
needsClientLayout = true;
|
|
49
|
+
|
|
50
|
+
animatedUpdate = true;
|
|
51
|
+
}
|
|
52
|
+
|
|
32
53
|
describe('test configureELKLayoutModule', () => {
|
|
33
54
|
const sandbox = sinon.createSandbox();
|
|
34
55
|
const mockDiagramConfiguration = new StubDiagramConfiguration();
|
package/src/di.config.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,14 +13,12 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { LayoutEngine, ModelState } from '@eclipse-glsp/server
|
|
16
|
+
import { LayoutEngine, ModelState } from '@eclipse-glsp/server';
|
|
17
17
|
import ElkConstructor, { LayoutOptions } from 'elkjs/lib/elk.bundled';
|
|
18
18
|
import { ContainerModule } from 'inversify';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { GlspElkLayoutEngine } from './glsp-elk-layout-engine';
|
|
23
|
-
import { FallbackLayoutConfigurator } from './layout-configurator';
|
|
19
|
+
import { DefaultElementFilter, ElementFilter } from './element-filter';
|
|
20
|
+
import { ElkFactory, GlspElkLayoutEngine } from './glsp-elk-layout-engine';
|
|
21
|
+
import { FallbackLayoutConfigurator, LayoutConfigurator } from './layout-configurator';
|
|
24
22
|
|
|
25
23
|
type Constructor<T> = new (...args: any[]) => T;
|
|
26
24
|
|
package/src/element-filter.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2023 TypeFox and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { GEdge, GLabel, GModelElement, GNode, GPort, ModelState } from '@eclipse-glsp/server
|
|
16
|
+
import { GEdge, GLabel, GModelElement, GNode, GPort, ModelState } from '@eclipse-glsp/server';
|
|
17
17
|
import { inject, injectable } from 'inversify';
|
|
18
18
|
|
|
19
19
|
export const ElementFilter = Symbol('ElementFilter');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2023 TypeFox and others.
|
|
3
3
|
* This program and the accompanying materials are made available under the
|
|
4
4
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
5
5
|
* http://www.eclipse.org/legal/epl-2.0.
|
|
@@ -29,13 +29,21 @@ import {
|
|
|
29
29
|
MaybePromise,
|
|
30
30
|
ModelState,
|
|
31
31
|
Point
|
|
32
|
-
} from '@eclipse-glsp/server
|
|
32
|
+
} from '@eclipse-glsp/server';
|
|
33
33
|
import { ELK, ElkEdge, ElkExtendedEdge, ElkGraphElement, ElkLabel, ElkNode, ElkPort, ElkPrimitiveEdge, ElkShape } from 'elkjs/lib/elk-api';
|
|
34
34
|
import { injectable } from 'inversify';
|
|
35
|
-
import { ElkFactory } from 'sprotty-elk';
|
|
36
35
|
import { ElementFilter } from './element-filter';
|
|
37
36
|
import { LayoutConfigurator } from './layout-configurator';
|
|
38
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Factory for ELK instances. Follow the elkjs package documentation on how to configure ELK
|
|
40
|
+
* instances. For example, the bundled version can be used by importing the ELK constructor
|
|
41
|
+
* from `"elkjs/lib/elk.bundled"`. For the webworker version, import the constructor from
|
|
42
|
+
* `"elkjs/lib/elk-api"` and add the option `workerUrl: "elk/elk-worker.min.js"`.
|
|
43
|
+
*/
|
|
44
|
+
export type ElkFactory = () => ELK;
|
|
45
|
+
export const ElkFactory = Symbol('ElkFactory');
|
|
46
|
+
|
|
39
47
|
/**
|
|
40
48
|
* An implementation of GLSP's {@link LayoutEngine} interface that retrieves the graphical model from the {@link ModelState},
|
|
41
49
|
* transforms this model into an ELK graph and then invokes the underlying ELK instance for layout computation.
|
|
@@ -240,6 +248,7 @@ export class GlspElkLayoutEngine implements LayoutEngine {
|
|
|
240
248
|
};
|
|
241
249
|
if (port.children) {
|
|
242
250
|
elkPort.labels = this.findChildren(port, GLabel).map(child => this.transformToElk(child)) as ElkLabel[];
|
|
251
|
+
this.elkEdges.push(...(this.findChildren(port, GEdge).map(child => this.transformToElk(child)) as ElkEdge[]));
|
|
243
252
|
}
|
|
244
253
|
this.transformShape(elkPort, port);
|
|
245
254
|
this.idToElkElement.set(port.id, elkPort);
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
export { LayoutOptions } from 'elkjs';
|
|
16
17
|
export * from './di.config';
|
|
17
18
|
export * from './element-filter';
|
|
18
19
|
export * from './glsp-elk-layout-engine';
|
|
19
20
|
export * from './layout-configurator';
|
|
20
|
-
export * from './sprotty-elk';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { GEdge, GGraph, GLabel, GModelElement, GNode, GPort, ModelState } from '@eclipse-glsp/server
|
|
16
|
+
import { GEdge, GGraph, GLabel, GModelElement, GNode, GPort, ModelState } from '@eclipse-glsp/server';
|
|
17
|
+
import { LayoutOptions } from 'elkjs';
|
|
17
18
|
import { inject, injectable } from 'inversify';
|
|
18
|
-
import { LayoutOptions } from './sprotty-elk';
|
|
19
|
-
|
|
20
19
|
export const LayoutConfigurator = Symbol('LayoutConfigurator');
|
|
21
20
|
/**
|
|
22
21
|
* Configurator for ELK layout algorithms; provides mappings of layout options for each model element.
|
package/lib/di.config.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.spec.d.ts","sourceRoot":"","sources":["../src/di.config.spec.ts"],"names":[],"mappings":""}
|
package/lib/di.config.spec.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
/********************************************************************************
|
|
10
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
11
|
-
*
|
|
12
|
-
* This program and the accompanying materials are made available under the
|
|
13
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
14
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
15
|
-
*
|
|
16
|
-
* This Source Code may also be made available under the following Secondary
|
|
17
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
18
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
19
|
-
* with the GNU Classpath Exception which is available at
|
|
20
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
21
|
-
*
|
|
22
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
23
|
-
********************************************************************************/
|
|
24
|
-
const server_node_1 = require("@eclipse-glsp/server-node");
|
|
25
|
-
const mock_util_1 = require("@eclipse-glsp/server-node/lib/test/mock-util");
|
|
26
|
-
const chai_1 = require("chai");
|
|
27
|
-
const inversify_1 = require("inversify");
|
|
28
|
-
const sinon = require("sinon");
|
|
29
|
-
const _1 = require(".");
|
|
30
|
-
const di_config_1 = require("./di.config");
|
|
31
|
-
const element_filter_1 = require("./element-filter");
|
|
32
|
-
const layout_configurator_1 = require("./layout-configurator");
|
|
33
|
-
let CustomLayoutConfigurator = class CustomLayoutConfigurator extends _1.AbstractLayoutConfigurator {
|
|
34
|
-
};
|
|
35
|
-
CustomLayoutConfigurator = __decorate([
|
|
36
|
-
(0, inversify_1.injectable)()
|
|
37
|
-
], CustomLayoutConfigurator);
|
|
38
|
-
let CustomElementFilter = class CustomElementFilter extends element_filter_1.DefaultElementFilter {
|
|
39
|
-
};
|
|
40
|
-
CustomElementFilter = __decorate([
|
|
41
|
-
(0, inversify_1.injectable)()
|
|
42
|
-
], CustomElementFilter);
|
|
43
|
-
describe('test configureELKLayoutModule', () => {
|
|
44
|
-
const sandbox = sinon.createSandbox();
|
|
45
|
-
const mockDiagramConfiguration = new mock_util_1.StubDiagramConfiguration();
|
|
46
|
-
const typeMappings = new Map();
|
|
47
|
-
typeMappings.set('graph', server_node_1.GGraph);
|
|
48
|
-
sandbox.stub(mockDiagramConfiguration, 'typeMapping').value(typeMappings);
|
|
49
|
-
const modelState = new server_node_1.DefaultModelState();
|
|
50
|
-
const baseModule = new inversify_1.ContainerModule(bind => {
|
|
51
|
-
bind(server_node_1.ModelState).toConstantValue(modelState);
|
|
52
|
-
});
|
|
53
|
-
it('configure with minimal options', () => {
|
|
54
|
-
const algorithm = 'layered';
|
|
55
|
-
const elkModule = (0, di_config_1.configureELKLayoutModule)({ algorithms: [algorithm] });
|
|
56
|
-
const container = new inversify_1.Container();
|
|
57
|
-
container.load(baseModule, elkModule);
|
|
58
|
-
const filter = container.get(element_filter_1.ElementFilter);
|
|
59
|
-
(0, chai_1.expect)(filter).to.be.an.instanceOf(element_filter_1.DefaultElementFilter);
|
|
60
|
-
const configurator = container.get(layout_configurator_1.LayoutConfigurator);
|
|
61
|
-
(0, chai_1.expect)(configurator).to.be.an.instanceOf(layout_configurator_1.FallbackLayoutConfigurator);
|
|
62
|
-
const graphOptions = configurator.apply(new server_node_1.GGraph());
|
|
63
|
-
(0, chai_1.expect)(graphOptions).not.to.be.undefined;
|
|
64
|
-
(0, chai_1.expect)(graphOptions['elk.algorithm']).to.equal(algorithm);
|
|
65
|
-
});
|
|
66
|
-
it('configure with additional default layout options', () => {
|
|
67
|
-
const algorithm = 'layered';
|
|
68
|
-
const defaultLayoutOptions = {
|
|
69
|
-
'elk.direction': 'LEFT',
|
|
70
|
-
'elk.edgeRouting': 'POLYLINE'
|
|
71
|
-
};
|
|
72
|
-
const elkModule = (0, di_config_1.configureELKLayoutModule)({ algorithms: [algorithm], defaultLayoutOptions });
|
|
73
|
-
const container = new inversify_1.Container();
|
|
74
|
-
container.load(baseModule, elkModule);
|
|
75
|
-
const configurator = container.get(layout_configurator_1.LayoutConfigurator);
|
|
76
|
-
const graphOptions = configurator.apply(new server_node_1.GGraph());
|
|
77
|
-
(0, chai_1.expect)(graphOptions).not.to.be.undefined;
|
|
78
|
-
(0, chai_1.expect)(graphOptions).to.include(defaultLayoutOptions);
|
|
79
|
-
});
|
|
80
|
-
it('configure with custom layout configurator', () => {
|
|
81
|
-
const algorithm = 'layered';
|
|
82
|
-
const elkModule = (0, di_config_1.configureELKLayoutModule)({ algorithms: [algorithm], layoutConfigurator: CustomLayoutConfigurator });
|
|
83
|
-
const container = new inversify_1.Container();
|
|
84
|
-
container.load(baseModule, elkModule);
|
|
85
|
-
const configurator = container.get(layout_configurator_1.LayoutConfigurator);
|
|
86
|
-
(0, chai_1.expect)(configurator).to.be.an.instanceOf(CustomLayoutConfigurator);
|
|
87
|
-
});
|
|
88
|
-
it('configure with custom element filter', () => {
|
|
89
|
-
const algorithm = 'layered';
|
|
90
|
-
const elkModule = (0, di_config_1.configureELKLayoutModule)({ algorithms: [algorithm], elementFilter: CustomElementFilter });
|
|
91
|
-
const container = new inversify_1.Container();
|
|
92
|
-
container.load(baseModule, elkModule);
|
|
93
|
-
const filter = container.get(element_filter_1.ElementFilter);
|
|
94
|
-
(0, chai_1.expect)(filter).to.be.an.instanceOf(CustomElementFilter);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
//# sourceMappingURL=di.config.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.spec.js","sourceRoot":"","sources":["../src/di.config.spec.ts"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,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C,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/lib/sprotty-elk.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
export { LayoutOptions } from 'elkjs';
|
|
17
|
-
export { ElkFactory } from 'sprotty-elk/lib/inversify';
|
|
18
|
-
//# sourceMappingURL=sprotty-elk.d.ts.map
|
package/lib/sprotty-elk.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sprotty-elk.d.ts","sourceRoot":"","sources":["../src/sprotty-elk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}
|
package/lib/sprotty-elk.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ElkFactory = void 0;
|
|
4
|
-
var inversify_1 = require("sprotty-elk/lib/inversify");
|
|
5
|
-
Object.defineProperty(exports, "ElkFactory", { enumerable: true, get: function () { return inversify_1.ElkFactory; } });
|
|
6
|
-
//# sourceMappingURL=sprotty-elk.js.map
|
package/lib/sprotty-elk.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sprotty-elk.js","sourceRoot":"","sources":["../src/sprotty-elk.ts"],"names":[],"mappings":";;;AAiBA,uDAAuD;AAA9C,uGAAA,UAAU,OAAA"}
|
package/src/sprotty-elk.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
// Reexport of the relevant sprotty-elk typings
|
|
17
|
-
export { LayoutOptions } from 'elkjs';
|
|
18
|
-
export { ElkFactory } from 'sprotty-elk/lib/inversify';
|