@eclipse-glsp/client 1.1.0-next.903b293.202 → 1.1.0-next.9fabd84.216
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/css/glsp-sprotty.css +18 -18
- package/lib/base/command-stack.js +2 -2
- package/lib/base/command-stack.js.map +1 -1
- package/lib/base/container-modules.d.ts +32 -2
- package/lib/base/container-modules.d.ts.map +1 -1
- package/lib/base/container-modules.js +72 -34
- package/lib/base/container-modules.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.d.ts +2 -2
- package/lib/features/copy-paste/copy-paste-handler.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.js +2 -3
- package/lib/features/copy-paste/copy-paste-handler.js.map +1 -1
- package/lib/features/export/di.config.d.ts +19 -0
- package/lib/features/export/di.config.d.ts.map +1 -0
- package/lib/features/export/di.config.js +29 -0
- package/lib/features/export/di.config.js.map +1 -0
- package/lib/features/hover/hover.d.ts.map +1 -1
- package/lib/features/hover/hover.js +2 -1
- package/lib/features/hover/hover.js.map +1 -1
- package/lib/features/layout/layout-elements-action.d.ts.map +1 -1
- package/lib/features/layout/layout-elements-action.js +2 -2
- package/lib/features/layout/layout-elements-action.js.map +1 -1
- package/lib/features/layout/tests/layouter-test-util.d.ts +1 -1
- package/lib/features/layout/tests/layouter-test-util.js +2 -2
- package/lib/features/layout/tests/layouter-test-util.js.map +1 -1
- package/lib/features/select/select-mouse-listener.d.ts +1 -1
- package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
- package/lib/features/select/select-mouse-listener.js +2 -1
- package/lib/features/select/select-mouse-listener.js.map +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts +2 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js +2 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.js +3 -2
- package/lib/features/tool-feedback/creation-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js +4 -3
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +1 -1
- package/lib/features/tools/di.config.d.ts.map +1 -1
- package/lib/features/tools/di.config.js +1 -4
- package/lib/features/tools/di.config.js.map +1 -1
- package/lib/lib/model.d.ts +6 -2
- package/lib/lib/model.d.ts.map +1 -1
- package/lib/lib/model.js +48 -1
- package/lib/lib/model.js.map +1 -1
- package/lib/sprotty-reexport.d.ts +5 -5
- package/lib/sprotty-reexport.d.ts.map +1 -1
- package/lib/sprotty-reexport.js +16 -7
- package/lib/sprotty-reexport.js.map +1 -1
- package/package.json +7 -6
- package/src/base/command-stack.ts +3 -3
- package/src/base/container-modules.ts +51 -7
- package/src/features/copy-paste/copy-paste-handler.ts +4 -8
- package/src/features/export/di.config.ts +28 -0
- package/src/features/hover/hover.ts +2 -1
- package/src/features/layout/layout-elements-action.ts +2 -1
- package/src/features/layout/tests/layouter-test-util.ts +3 -3
- package/src/features/select/select-mouse-listener.ts +2 -2
- package/src/features/tool-feedback/change-bounds-tool-feedback.ts +1 -1
- package/src/features/tool-feedback/creation-tool-feedback.ts +1 -1
- package/src/features/tool-feedback/edge-edit-tool-feedback.ts +1 -1
- package/src/features/tools/di.config.ts +1 -5
- package/src/lib/model.ts +34 -2
- package/src/sprotty-reexport.ts +11 -5
package/lib/sprotty-reexport.js
CHANGED
|
@@ -35,14 +35,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
35
35
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.modelSourceModule = exports.zorderModule = exports.viewportModule = exports.updateModule = exports.undoRedoModule = exports.selectModule = void 0;
|
|
38
|
+
exports.LocationPostprocessor = exports.SetPopupModelCommand = exports.PopupHoverMouseListener = exports.HoverMouseListener = exports.HoverKeyListener = exports.HoverFeedbackCommand = exports.ClosePopupActionHandler = exports.AbstractHoverMouseListener = exports.SvgExporter = exports.RequestExportSvgAction = exports.ExportSvgPostprocessor = exports.ExportSvgKeyListener = exports.ExportSvgCommand = exports.configureButtonHandler = exports.ButtonHandlerRegistry = exports.SShapeElement = exports.layoutContainerFeature = exports.layoutableChildFeature = exports.isSizeable = exports.isLayoutContainer = exports.isLayoutableChild = exports.isBoundsAware = exports.isAlignable = exports.getAbsoluteClientBounds = exports.getAbsoluteBounds = exports.findChildrenAtPosition = exports.boundsFeature = exports.alignFeature = exports.SetBoundsCommand = exports.RequestBoundsCommand = exports.translatePoint = exports.translateBounds = exports.registerModelElement = exports.findParentByFeature = exports.findParent = exports.containsSome = exports.SParentElement = exports.SModelRoot = exports.SModelElement = exports.SChildElement = exports.ModelIndexImpl = exports.isParent = exports.createRandomId = exports.SetModelCommand = exports.SetBoundsAction = exports.MoveAction = exports.HoverFeedbackAction = exports.CollapseExpandAllAction = exports.CollapseExpandAction = exports.BringToFrontAction = void 0;
|
|
39
|
+
exports.decorationModule = exports.contextMenuModule = exports.commandPaletteModule = exports.buttonModule = exports.boundsModule = exports.graphModule = exports.defaultModule = exports.PointToPointLine = exports.intersection = exports.Diamond = exports.DiagramServerProxy = exports.ShapedPreRenderedElement = exports.RectangularPort = exports.RectangularNode = exports.PreRenderedElement = exports.HtmlRoot = exports.ForeignObjectElement = exports.DiamondNode = exports.CircularPort = exports.CircularNode = exports.SPort = exports.SNode = exports.SLabel = exports.SGraphIndex = exports.SGraph = exports.SEdge = exports.SCompartment = exports.BringToFrontCommand = exports.ViewportResult = exports.ViewportAnimation = exports.SetViewportCommand = exports.GetViewportCommand = exports.GetViewportAction = exports.FitToScreenCommand = exports.CenterKeyboardListener = exports.CenterCommand = exports.BoundsAwareViewportCommand = exports.UpdateModelCommand = exports.UndoRedoKeyListener = exports.SelectMouseListener = exports.SelectKeyboardListener = exports.SelectionResult = exports.SelectCommand = exports.SelectAllCommand = exports.GetSelectionCommand = exports.GetSelectionAction = exports.MoveMouseListener = exports.MoveCommand = exports.MoveAnimation = exports.MorphEdgesAnimation = void 0;
|
|
40
|
+
exports.modelSourceModule = exports.zorderModule = exports.viewportModule = exports.updateModule = exports.undoRedoModule = exports.selectModule = exports.routingModule = exports.openModule = exports.moveModule = exports.hoverModule = exports.fadeModule = exports.exportModule = exports.expandModule = exports.edgeLayoutModule = exports.edgeIntersectionModule = void 0;
|
|
41
41
|
__exportStar(require("@eclipse-glsp/protocol"), exports);
|
|
42
42
|
// sprotty-protocol
|
|
43
43
|
var actions_1 = require("sprotty-protocol/lib/actions");
|
|
44
|
+
Object.defineProperty(exports, "BringToFrontAction", { enumerable: true, get: function () { return actions_1.BringToFrontAction; } });
|
|
44
45
|
Object.defineProperty(exports, "CollapseExpandAction", { enumerable: true, get: function () { return actions_1.CollapseExpandAction; } });
|
|
45
46
|
Object.defineProperty(exports, "CollapseExpandAllAction", { enumerable: true, get: function () { return actions_1.CollapseExpandAllAction; } });
|
|
47
|
+
Object.defineProperty(exports, "HoverFeedbackAction", { enumerable: true, get: function () { return actions_1.HoverFeedbackAction; } });
|
|
48
|
+
Object.defineProperty(exports, "MoveAction", { enumerable: true, get: function () { return actions_1.MoveAction; } });
|
|
46
49
|
Object.defineProperty(exports, "SetBoundsAction", { enumerable: true, get: function () { return actions_1.SetBoundsAction; } });
|
|
47
50
|
// ------------------ Base ------------------
|
|
48
51
|
__exportStar(require("sprotty/lib/base/actions/action-dispatcher"), exports);
|
|
@@ -153,7 +156,6 @@ __exportStar(require("sprotty/lib/features/fade/model"), exports);
|
|
|
153
156
|
var hover_1 = require("sprotty/lib/features/hover/hover");
|
|
154
157
|
Object.defineProperty(exports, "AbstractHoverMouseListener", { enumerable: true, get: function () { return hover_1.AbstractHoverMouseListener; } });
|
|
155
158
|
Object.defineProperty(exports, "ClosePopupActionHandler", { enumerable: true, get: function () { return hover_1.ClosePopupActionHandler; } });
|
|
156
|
-
Object.defineProperty(exports, "HoverFeedbackAction", { enumerable: true, get: function () { return hover_1.HoverFeedbackAction; } });
|
|
157
159
|
Object.defineProperty(exports, "HoverFeedbackCommand", { enumerable: true, get: function () { return hover_1.HoverFeedbackCommand; } });
|
|
158
160
|
Object.defineProperty(exports, "HoverKeyListener", { enumerable: true, get: function () { return hover_1.HoverKeyListener; } });
|
|
159
161
|
Object.defineProperty(exports, "HoverMouseListener", { enumerable: true, get: function () { return hover_1.HoverMouseListener; } });
|
|
@@ -161,7 +163,12 @@ Object.defineProperty(exports, "PopupHoverMouseListener", { enumerable: true, ge
|
|
|
161
163
|
Object.defineProperty(exports, "SetPopupModelCommand", { enumerable: true, get: function () { return hover_1.SetPopupModelCommand; } });
|
|
162
164
|
__exportStar(require("sprotty/lib/features/hover/model"), exports);
|
|
163
165
|
__exportStar(require("sprotty/lib/features/move/model"), exports);
|
|
164
|
-
|
|
166
|
+
var move_1 = require("sprotty/lib/features/move/move");
|
|
167
|
+
Object.defineProperty(exports, "LocationPostprocessor", { enumerable: true, get: function () { return move_1.LocationPostprocessor; } });
|
|
168
|
+
Object.defineProperty(exports, "MorphEdgesAnimation", { enumerable: true, get: function () { return move_1.MorphEdgesAnimation; } });
|
|
169
|
+
Object.defineProperty(exports, "MoveAnimation", { enumerable: true, get: function () { return move_1.MoveAnimation; } });
|
|
170
|
+
Object.defineProperty(exports, "MoveCommand", { enumerable: true, get: function () { return move_1.MoveCommand; } });
|
|
171
|
+
Object.defineProperty(exports, "MoveMouseListener", { enumerable: true, get: function () { return move_1.MoveMouseListener; } });
|
|
165
172
|
__exportStar(require("sprotty/lib/features/move/snap"), exports);
|
|
166
173
|
__exportStar(require("sprotty/lib/features/nameable/model"), exports);
|
|
167
174
|
__exportStar(require("sprotty/lib/features/open/model"), exports);
|
|
@@ -188,7 +195,8 @@ Object.defineProperty(exports, "SelectCommand", { enumerable: true, get: functio
|
|
|
188
195
|
Object.defineProperty(exports, "SelectionResult", { enumerable: true, get: function () { return select_1.SelectionResult; } });
|
|
189
196
|
Object.defineProperty(exports, "SelectKeyboardListener", { enumerable: true, get: function () { return select_1.SelectKeyboardListener; } });
|
|
190
197
|
Object.defineProperty(exports, "SelectMouseListener", { enumerable: true, get: function () { return select_1.SelectMouseListener; } });
|
|
191
|
-
|
|
198
|
+
var undo_redo_1 = require("sprotty/lib/features/undo-redo/undo-redo");
|
|
199
|
+
Object.defineProperty(exports, "UndoRedoKeyListener", { enumerable: true, get: function () { return undo_redo_1.UndoRedoKeyListener; } });
|
|
192
200
|
__exportStar(require("sprotty/lib/features/update/model-matching"), exports);
|
|
193
201
|
var update_model_1 = require("sprotty/lib/features/update/update-model");
|
|
194
202
|
Object.defineProperty(exports, "UpdateModelCommand", { enumerable: true, get: function () { return update_model_1.UpdateModelCommand; } });
|
|
@@ -207,7 +215,8 @@ Object.defineProperty(exports, "ViewportAnimation", { enumerable: true, get: fun
|
|
|
207
215
|
Object.defineProperty(exports, "ViewportResult", { enumerable: true, get: function () { return viewport_1.ViewportResult; } });
|
|
208
216
|
__exportStar(require("sprotty/lib/features/viewport/viewport-root"), exports);
|
|
209
217
|
__exportStar(require("sprotty/lib/features/viewport/zoom"), exports);
|
|
210
|
-
|
|
218
|
+
var zorder_1 = require("sprotty/lib/features/zorder/zorder");
|
|
219
|
+
Object.defineProperty(exports, "BringToFrontCommand", { enumerable: true, get: function () { return zorder_1.BringToFrontCommand; } });
|
|
211
220
|
var sgraph_1 = require("sprotty/lib/graph/sgraph");
|
|
212
221
|
Object.defineProperty(exports, "SCompartment", { enumerable: true, get: function () { return sgraph_1.SCompartment; } });
|
|
213
222
|
Object.defineProperty(exports, "SEdge", { enumerable: true, get: function () { return sgraph_1.SEdge; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprotty-reexport.js","sourceRoot":"","sources":["../src/sprotty-reexport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;AAClF;;;;;GAKG;;;;;;;;;;;;;;;;;;;AAEH,yDAAuC;AACvC,mBAAmB;AACnB,
|
|
1
|
+
{"version":3,"file":"sprotty-reexport.js","sourceRoot":"","sources":["../src/sprotty-reexport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;AAClF;;;;;GAKG;;;;;;;;;;;;;;;;;;;AAEH,yDAAuC;AACvC,mBAAmB;AACnB,wDAGsC;AAFlC,6GAAA,kBAAkB,OAAA;AAAE,+GAAA,oBAAoB,OAAA;AAAE,kHAAA,uBAAuB,OAAA;AAC5C,8GAAA,mBAAmB,OAAA;AAAE,qGAAA,UAAU,OAAA;AAAE,0GAAA,eAAe,OAAA;AAGzE,6CAA6C;AAC7C,6EAA2D;AAC3D,0EAAwD;AACxD,0EAAwD;AACxD,wEAAsD;AACtD,qFAAmE;AACnE,qEAAmD;AACnD,oEAAkD;AAClD,iFAA+D;AAC/D,0EAAwD;AACxD,kFAAgE;AAChE,8EAA4D;AAC5D,iEAAsE;AAA7D,4GAAA,eAAe,OAAA;AACxB,wDAUuC;AATnC,wGAAA,cAAc,OAAA;AAGd,kGAAA,QAAQ,OAAA;AACR,wGAAA,cAAc,OAAA;AACd,uGAAA,aAAa,OAAA;AACb,uGAAA,aAAa,OAAA;AACb,oGAAA,UAAU,OAAA;AACV,wGAAA,cAAc,OAAA;AAElB,0EAAwD;AACxD,wEAAsD;AACtD,oEAO6C;AANzC,4GAAA,YAAY,OAAA;AACZ,0GAAA,UAAU,OAAA;AACV,mHAAA,mBAAmB,OAAA;AACnB,oHAAA,oBAAoB,OAAA;AACpB,+GAAA,eAAe,OAAA;AACf,8GAAA,cAAc,OAAA;AAElB,qEAAmD;AACnD,6EAA2D;AAC3D,8EAA4D;AAC5D,uFAAqE;AACrE,kEAAgD;AAChD,o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AwBhB,8EAAkF;AAvB9E,+BAuBG,mBAAoB,CAvBH;AAwBxB,2EAA4E;AAvBxE,4BAuBG,mBAAiB,CAvBH;AAwBrB,yEAAyE;AAvBrE,2BAuBG,mBAAgB,CAvBH;AAwBpB,gFAAsF;AAvBlF,iCAuBG,mBAAsB,CAvBH;AAwB1B,0EAA0E;AAvBtE,2BAuBG,mBAAgB,CAvBH;AAwBpB,qEAAiE;AAvB7D,uBAuBG,mBAAY,CAvBH;AAwBhB,sEAAiE;AAvB7D,uBAuBG,oBAAY,CAvBH;AAwBhB,oEAA6D;AAvBzD,qBAuBG,oBAAU,CAvBH;AAwBd,qEAA+D;AAvB3D,sBAuBG,oBAAW,CAvBH;AAwBf,oEAA6D;AAvBzD,qBAuBG,oBAAU,CAvBH;AAwBd,oEAA6D;AAvBzD,qBAuBG,oBAAU,CAvBH;AAwBd,uEAAmE;AAvB/D,wBAuBG,oBAAa,CAvBH;AAwBjB,sEAAiE;AAvB7D,uBAuBG,oBAAY,CAvBH;AAwBhB,yEAAsE;AAvBlE,yBAuBG,oBAAc,CAvBH;AAwBlB,sEAAiE;AAvB7D,uBAuBG,oBAAY,CAvBH;AAwBhB,wEAAqE;AAvBjE,yBAuBG,oBAAc,CAvBH;AAwBlB,sEAAiE;AAvB7D,uBAuBG,oBAAY,CAvBH;AAwBhB,4DAAsD;AA3ClD,sBA2CG,oBAAW,CA3CH;AA4Cf,mEAAmE;AAvB1D,4BAuBF,oBAAiB,CAvBE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/client",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.9fabd84.216+9fabd84",
|
|
4
4
|
"description": "A sprotty-based client for GLSP",
|
|
5
5
|
"license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
|
|
6
6
|
"keywords": [
|
|
@@ -34,21 +34,22 @@
|
|
|
34
34
|
"css"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eclipse-glsp/protocol": "1.1.0-next.
|
|
37
|
+
"@eclipse-glsp/protocol": "1.1.0-next.9fabd84.216+9fabd84",
|
|
38
38
|
"autocompleter": "5.1.0",
|
|
39
|
-
"sprotty": "0.13.0-next.
|
|
39
|
+
"sprotty": "0.13.0-next.f4445dd.342"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@vscode/codicons": "^0.0.25"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc -b",
|
|
46
|
-
"clean": "rimraf lib tsconfig.tsbuildinfo ",
|
|
46
|
+
"clean": "rimraf lib tsconfig.tsbuildinfo coverage .nyc_output",
|
|
47
47
|
"lint": "eslint --ext .ts,.tsx ./src",
|
|
48
48
|
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
|
|
49
49
|
"prepare": "yarn clean && yarn build",
|
|
50
|
-
"test": "mocha --config ../../.mocharc
|
|
50
|
+
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
|
|
51
51
|
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
|
|
52
|
+
"test:coverage": "nyc yarn test",
|
|
52
53
|
"watch": "tsc -w"
|
|
53
54
|
},
|
|
54
55
|
"publishConfig": {
|
|
@@ -56,5 +57,5 @@
|
|
|
56
57
|
},
|
|
57
58
|
"main": "lib/index",
|
|
58
59
|
"types": "lib/index",
|
|
59
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9fabd84b7aebde13500b126aa08102201383b607"
|
|
60
61
|
}
|
|
@@ -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 {
|
|
16
|
+
import { RedoAction, UndoAction } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { inject, injectable } from 'inversify';
|
|
18
18
|
import { CommandStack, IActionDispatcher, SModelRoot } from 'sprotty';
|
|
19
19
|
import { TYPES } from './types';
|
|
@@ -23,12 +23,12 @@ export class GLSPCommandStack extends CommandStack {
|
|
|
23
23
|
@inject(TYPES.IActionDispatcherProvider) protected actionDispatcher: () => Promise<IActionDispatcher>;
|
|
24
24
|
|
|
25
25
|
override undo(): Promise<SModelRoot> {
|
|
26
|
-
this.actionDispatcher().then(dispatcher => dispatcher.dispatch(
|
|
26
|
+
this.actionDispatcher().then(dispatcher => dispatcher.dispatch(UndoAction.create()));
|
|
27
27
|
return this.thenUpdate();
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
override redo(): Promise<SModelRoot> {
|
|
31
|
-
this.actionDispatcher().then(dispatcher => dispatcher.dispatch(
|
|
31
|
+
this.actionDispatcher().then(dispatcher => dispatcher.dispatch(RedoAction.create()));
|
|
32
32
|
return this.thenUpdate();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2021-2023 EclipseSource 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
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
+
import { remove } from '@eclipse-glsp/protocol';
|
|
17
18
|
import { Container, ContainerModule } from 'inversify';
|
|
18
19
|
import {
|
|
19
20
|
buttonModule,
|
|
@@ -21,7 +22,6 @@ import {
|
|
|
21
22
|
edgeIntersectionModule,
|
|
22
23
|
edgeLayoutModule,
|
|
23
24
|
expandModule,
|
|
24
|
-
exportModule,
|
|
25
25
|
fadeModule,
|
|
26
26
|
labelEditUiModule,
|
|
27
27
|
modelSourceModule,
|
|
@@ -35,6 +35,7 @@ import glspContextMenuModule from '../features/context-menu/di.config';
|
|
|
35
35
|
import { glspServerCopyPasteModule } from '../features/copy-paste/di.config';
|
|
36
36
|
import glspDecorationModule from '../features/decoration/di.config';
|
|
37
37
|
import glspEditLabelModule from '../features/edit-label/di.config';
|
|
38
|
+
import glspExportModule from '../features/export/di.config';
|
|
38
39
|
import modelHintsModule from '../features/hints/di.config';
|
|
39
40
|
import glspHoverModule from '../features/hover/di.config';
|
|
40
41
|
import layoutModule from '../features/layout/di.config';
|
|
@@ -56,7 +57,7 @@ export const DEFAULT_MODULES = [
|
|
|
56
57
|
edgeIntersectionModule,
|
|
57
58
|
edgeLayoutModule,
|
|
58
59
|
expandModule,
|
|
59
|
-
|
|
60
|
+
glspExportModule,
|
|
60
61
|
fadeModule,
|
|
61
62
|
glspBoundsModule,
|
|
62
63
|
glspCommandPaletteModule,
|
|
@@ -83,7 +84,51 @@ export const DEFAULT_MODULES = [
|
|
|
83
84
|
enableDefaultToolsOnFocusLossModule,
|
|
84
85
|
validationModule,
|
|
85
86
|
zorderModule
|
|
86
|
-
];
|
|
87
|
+
] as const;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Creates a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
91
|
+
* Default modules can be excluded using {@link ExcludeDescription}s.
|
|
92
|
+
*
|
|
93
|
+
* This means, you can still customize the default modules in two ways.
|
|
94
|
+
*
|
|
95
|
+
* First, you can exclude default modules and add a module with your custom code.
|
|
96
|
+
*
|
|
97
|
+
* ```typescript
|
|
98
|
+
* const container = createDiagramContainer(myModule1, {exclude: modelSourceWatcherModule},myModelSourceWatcherModule );
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* Second, you can unbind or rebind implementations that are originally bound in one of the default modules.
|
|
102
|
+
*
|
|
103
|
+
* ```typescript
|
|
104
|
+
* rebind(NavigationTargetResolver).to(MyNavigationTargetResolver);
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* @param customModules Custom modules to be loaded in addition to the default modules and/or default modules that should be excluded.
|
|
108
|
+
* @param options Options to customize the module loading
|
|
109
|
+
* @returns The created container.
|
|
110
|
+
*/
|
|
111
|
+
export function createDiagramContainer(...customModules: Array<ContainerModule | ExcludeDescription>): Container {
|
|
112
|
+
const container = new Container();
|
|
113
|
+
|
|
114
|
+
const modules = [...DEFAULT_MODULES];
|
|
115
|
+
customModules.forEach(customModule => {
|
|
116
|
+
if (customModule instanceof ContainerModule) {
|
|
117
|
+
modules.push(customModule);
|
|
118
|
+
} else {
|
|
119
|
+
remove(modules, customModule.exclude);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
container.load(...modules);
|
|
123
|
+
return container;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Can be passed to the {@link createDiagramContainer} utility function to exclude (i.e. not load) a specific default module.
|
|
128
|
+
*/
|
|
129
|
+
export interface ExcludeDescription {
|
|
130
|
+
exclude: ContainerModule;
|
|
131
|
+
}
|
|
87
132
|
|
|
88
133
|
/**
|
|
89
134
|
* Creates a GLSP Client container with the GLSP default modules and the specified custom `modules`.
|
|
@@ -105,9 +150,8 @@ export const DEFAULT_MODULES = [
|
|
|
105
150
|
* ```
|
|
106
151
|
* @param modules Custom modules to be loaded in addition to the default modules.
|
|
107
152
|
* @returns The created container.
|
|
153
|
+
* @deprecated Please use `createDiagramContainer` from `@eclipse-glsp/client` instead
|
|
108
154
|
*/
|
|
109
155
|
export function createClientContainer(...modules: ContainerModule[]): Container {
|
|
110
|
-
|
|
111
|
-
container.load(...DEFAULT_MODULES, ...modules);
|
|
112
|
-
return container;
|
|
156
|
+
return createDiagramContainer(...modules);
|
|
113
157
|
}
|
|
@@ -134,19 +134,15 @@ export class ServerCopyPasteHandler implements ICopyPasteHandler {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
protected shouldCopy(_event: ClipboardEvent): boolean
|
|
137
|
+
protected shouldCopy(_event: ClipboardEvent): boolean {
|
|
138
138
|
return this.editorContext.get().selectedElementIds.length > 0 && this.isDiagramActive();
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
protected shouldPaste(_event: ClipboardEvent): boolean
|
|
141
|
+
protected shouldPaste(_event: ClipboardEvent): boolean {
|
|
142
142
|
return this.isDiagramActive();
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
private isDiagramActive(): boolean
|
|
146
|
-
return
|
|
147
|
-
document.activeElement instanceof SVGElement &&
|
|
148
|
-
document.activeElement.parentElement &&
|
|
149
|
-
document.activeElement.parentElement.id === this.viewerOptions.baseDiv
|
|
150
|
-
);
|
|
145
|
+
private isDiagramActive(): boolean {
|
|
146
|
+
return document.activeElement?.parentElement?.id === this.viewerOptions.baseDiv;
|
|
151
147
|
}
|
|
152
148
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource 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
|
+
import { ContainerModule } from 'inversify';
|
|
17
|
+
import { configureCommand, ExportSvgCommand, ExportSvgKeyListener, ExportSvgPostprocessor, TYPES } from 'sprotty';
|
|
18
|
+
import { GLSPSvgExporter } from './glsp-svg-exporter';
|
|
19
|
+
|
|
20
|
+
const glspExportSvgModule = new ContainerModule((bind, _unbind, isBound) => {
|
|
21
|
+
bind(ExportSvgKeyListener).toSelf().inSingletonScope();
|
|
22
|
+
bind(TYPES.KeyListener).toService(ExportSvgKeyListener);
|
|
23
|
+
bind(TYPES.HiddenVNodePostprocessor).to(ExportSvgPostprocessor).inSingletonScope();
|
|
24
|
+
configureCommand({ bind, isBound }, ExportSvgCommand);
|
|
25
|
+
bind(TYPES.SvgExporter).to(GLSPSvgExporter).inSingletonScope();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export default glspExportSvgModule;
|
|
@@ -23,7 +23,8 @@ import {
|
|
|
23
23
|
SModelRootSchema
|
|
24
24
|
} from '@eclipse-glsp/protocol';
|
|
25
25
|
import { injectable } from 'inversify';
|
|
26
|
-
import { EMPTY_ROOT,
|
|
26
|
+
import { EMPTY_ROOT, HoverMouseListener, IActionHandler, ICommand, SModelElement } from 'sprotty';
|
|
27
|
+
import { HoverFeedbackAction } from 'sprotty-protocol/lib/actions';
|
|
27
28
|
import { FocusStateChangedAction } from '../../base/actions/focus-change-action';
|
|
28
29
|
import { EnableDefaultToolsAction, EnableToolsAction } from '../../base/tool-manager/tool-actions';
|
|
29
30
|
import { EdgeCreationTool } from '../tools/edge-creation-tool';
|
|
@@ -24,7 +24,8 @@ import {
|
|
|
24
24
|
Writable
|
|
25
25
|
} from '@eclipse-glsp/protocol';
|
|
26
26
|
import { inject, injectable, optional } from 'inversify';
|
|
27
|
-
import { ElementMove, IActionDispatcher, IActionHandler, ICommand,
|
|
27
|
+
import { ElementMove, IActionDispatcher, IActionHandler, ICommand, SModelElement } from 'sprotty';
|
|
28
|
+
import { MoveAction } from 'sprotty-protocol/lib/actions';
|
|
28
29
|
import { TYPES } from '../../base/types';
|
|
29
30
|
import { toValidElementAndBounds, toValidElementMove } from '../../utils/layout-utils';
|
|
30
31
|
import { BoundsAwareModelElement, getElements } from '../../utils/smodel-util';
|
|
@@ -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
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
SParentElement,
|
|
31
31
|
TYPES
|
|
32
32
|
} from 'sprotty';
|
|
33
|
-
import {
|
|
33
|
+
import { createDiagramContainer } from '../../../base/container-modules';
|
|
34
34
|
import { GLSPGraph } from '../../../lib/model';
|
|
35
35
|
import { StatefulLayouterExt } from '../layouter';
|
|
36
36
|
|
|
@@ -117,6 +117,6 @@ export function layout(
|
|
|
117
117
|
export function setupLayoutRegistry(): LayoutRegistry {
|
|
118
118
|
// Generic Test setup
|
|
119
119
|
// create client container that registers all default modules including the layoutModule
|
|
120
|
-
const layoutContainer =
|
|
120
|
+
const layoutContainer = createDiagramContainer();
|
|
121
121
|
return layoutContainer.get<LayoutRegistry>(TYPES.LayoutRegistry);
|
|
122
122
|
}
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Action, SelectAction } from '@eclipse-glsp/protocol';
|
|
17
17
|
import {
|
|
18
|
-
BringToFrontAction,
|
|
19
18
|
findParentByFeature,
|
|
20
19
|
isCtrlOrCmd,
|
|
21
20
|
isSelectable,
|
|
@@ -27,6 +26,7 @@ import {
|
|
|
27
26
|
SRoutingHandle,
|
|
28
27
|
SwitchEditModeAction
|
|
29
28
|
} from 'sprotty';
|
|
29
|
+
import { BringToFrontAction } from 'sprotty-protocol/lib/actions';
|
|
30
30
|
import { toArray } from 'sprotty/lib/utils/iterable';
|
|
31
31
|
import { DEFAULT_RANK, Ranked } from '../rank/model';
|
|
32
32
|
|
|
@@ -37,7 +37,7 @@ import { DEFAULT_RANK, Ranked } from '../rank/model';
|
|
|
37
37
|
export class RankedSelectMouseListener extends SelectMouseListener implements Ranked {
|
|
38
38
|
rank: number = DEFAULT_RANK - 1; /* we want to be executed before all default mouse listeners */
|
|
39
39
|
|
|
40
|
-
override mouseDown(target: SModelElement, event: MouseEvent): Action[] {
|
|
40
|
+
override mouseDown(target: SModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
|
|
41
41
|
const result: Action[] = [];
|
|
42
42
|
if (this.buttonHandlerRegistry !== undefined && target instanceof SButton && target.enabled) {
|
|
43
43
|
const buttonHandler = this.buttonHandlerRegistry.get(target.type);
|
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
isSelectable,
|
|
26
26
|
isViewport,
|
|
27
27
|
MouseListener,
|
|
28
|
-
MoveAction,
|
|
29
28
|
SChildElement,
|
|
30
29
|
SModelElement,
|
|
31
30
|
SModelRoot,
|
|
32
31
|
TYPES
|
|
33
32
|
} from 'sprotty';
|
|
33
|
+
import { MoveAction } from 'sprotty-protocol/lib/actions';
|
|
34
34
|
import { forEachElement } from '../../utils/smodel-util';
|
|
35
35
|
import { addResizeHandles, isResizable, removeResizeHandles, SResizeHandle } from '../change-bounds/model';
|
|
36
36
|
import { createMovementRestrictionFeedback, removeMovementRestrictionFeedback } from '../change-bounds/movement-restrictor';
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
isBoundsAware,
|
|
25
25
|
isConnectable,
|
|
26
26
|
MouseListener,
|
|
27
|
-
MoveAction,
|
|
28
27
|
PolylineEdgeRouter,
|
|
29
28
|
SChildElement,
|
|
30
29
|
SConnectableElement,
|
|
@@ -35,6 +34,7 @@ import {
|
|
|
35
34
|
SRoutableElement,
|
|
36
35
|
TYPES
|
|
37
36
|
} from 'sprotty';
|
|
37
|
+
import { MoveAction } from 'sprotty-protocol/lib/actions';
|
|
38
38
|
import { BoundsAwareModelElement, isRoutable } from '../../utils/smodel-util';
|
|
39
39
|
import { getAbsolutePosition, toAbsoluteBounds, toAbsolutePosition } from '../../utils/viewpoint-util';
|
|
40
40
|
import { FeedbackCommand } from './model';
|
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
ISnapper,
|
|
30
30
|
isSelected,
|
|
31
31
|
MouseListener,
|
|
32
|
-
MoveAction,
|
|
33
32
|
PolylineEdgeRouter,
|
|
34
33
|
SConnectableElement,
|
|
35
34
|
SModelElement,
|
|
@@ -39,6 +38,7 @@ import {
|
|
|
39
38
|
SwitchEditModeCommand,
|
|
40
39
|
TYPES
|
|
41
40
|
} from 'sprotty';
|
|
41
|
+
import { MoveAction } from 'sprotty-protocol/lib/actions';
|
|
42
42
|
import { forEachElement, isRoutable, isRoutingHandle } from '../../utils/smodel-util';
|
|
43
43
|
import { getAbsolutePosition, toAbsoluteBounds } from '../../utils/viewpoint-util';
|
|
44
44
|
import { PointPositionUpdater } from '../change-bounds/snap';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 EclipseSource 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
|
|
@@ -18,7 +18,6 @@ import { ContainerModule, interfaces } from 'inversify';
|
|
|
18
18
|
import { configureActionHandler, configureModelElement, ManhattanEdgeRouter } from 'sprotty';
|
|
19
19
|
import { FocusStateChangedAction } from '../../base/actions/focus-change-action';
|
|
20
20
|
import { TYPES } from '../../base/types';
|
|
21
|
-
import { GLSPSvgExporter } from '../export/glsp-svg-exporter';
|
|
22
21
|
import { MARQUEE } from '../tool-feedback/marquee-tool-feedback';
|
|
23
22
|
import { ChangeBoundsTool } from './change-bounds-tool';
|
|
24
23
|
import { DelKeyDeleteTool, MouseDeleteTool } from './delete-tool';
|
|
@@ -53,9 +52,6 @@ export const toolsModule = new ContainerModule((bind, _unbind, isBound, rebind)
|
|
|
53
52
|
configureActionHandler({ bind, isBound }, TriggerNodeCreationAction.KIND, NodeCreationTool);
|
|
54
53
|
configureActionHandler({ bind, isBound }, TriggerEdgeCreationAction.KIND, EdgeCreationTool);
|
|
55
54
|
|
|
56
|
-
bind(GLSPSvgExporter).toSelf().inSingletonScope();
|
|
57
|
-
rebind(TYPES.SvgExporter).toService(GLSPSvgExporter);
|
|
58
|
-
|
|
59
55
|
bind(GSLPManhattanEdgeRouter).toSelf().inSingletonScope();
|
|
60
56
|
rebind(ManhattanEdgeRouter).toService(GSLPManhattanEdgeRouter);
|
|
61
57
|
});
|
package/src/lib/model.ts
CHANGED
|
@@ -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 { SModelElementSchema } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { exportFeature, SGraph, SModelElement, viewportFeature } from 'sprotty';
|
|
16
|
+
import { Bounds, isBounds, Point, SModelElementSchema } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { exportFeature, getRouteBounds, SEdge, SGraph, SModelElement, viewportFeature } from 'sprotty';
|
|
18
18
|
import { Containable, containerFeature } from '../features/hints/model';
|
|
19
19
|
import { Saveable, saveFeature } from '../features/save/model';
|
|
20
20
|
|
|
@@ -25,3 +25,35 @@ export class GLSPGraph extends SGraph implements Saveable, Containable {
|
|
|
25
25
|
return true;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
export class GEdge extends SEdge {
|
|
30
|
+
override localToParent(point: Point | Bounds): Bounds {
|
|
31
|
+
const bounds = getRouteBounds(this.routingPoints);
|
|
32
|
+
const result = {
|
|
33
|
+
x: point.x + bounds.x,
|
|
34
|
+
y: point.y + bounds.y,
|
|
35
|
+
width: -1,
|
|
36
|
+
height: -1
|
|
37
|
+
};
|
|
38
|
+
if (isBounds(point)) {
|
|
39
|
+
result.width = point.width;
|
|
40
|
+
result.height = point.height;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
override parentToLocal(point: Point | Bounds): Bounds {
|
|
46
|
+
const bounds = getRouteBounds(this.routingPoints);
|
|
47
|
+
const result = {
|
|
48
|
+
x: point.x - bounds.x,
|
|
49
|
+
y: point.y - bounds.y,
|
|
50
|
+
width: -1,
|
|
51
|
+
height: -1
|
|
52
|
+
};
|
|
53
|
+
if (isBounds(point)) {
|
|
54
|
+
result.width = point.width;
|
|
55
|
+
result.height = point.height;
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/src/sprotty-reexport.ts
CHANGED
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
export * from '@eclipse-glsp/protocol';
|
|
24
24
|
// sprotty-protocol
|
|
25
|
-
export {
|
|
25
|
+
export {
|
|
26
|
+
BringToFrontAction, CollapseExpandAction, CollapseExpandAllAction,
|
|
27
|
+
ElementAndAlignment, HoverFeedbackAction, MoveAction, SetBoundsAction
|
|
28
|
+
} from 'sprotty-protocol/lib/actions';
|
|
26
29
|
export { Viewport } from 'sprotty-protocol/lib/model';
|
|
27
30
|
// ------------------ Base ------------------
|
|
28
31
|
export * from 'sprotty/lib/base/actions/action-dispatcher';
|
|
@@ -144,7 +147,6 @@ export * from 'sprotty/lib/features/fade/model';
|
|
|
144
147
|
export {
|
|
145
148
|
AbstractHoverMouseListener,
|
|
146
149
|
ClosePopupActionHandler,
|
|
147
|
-
HoverFeedbackAction,
|
|
148
150
|
HoverFeedbackCommand,
|
|
149
151
|
HoverKeyListener,
|
|
150
152
|
HoverMouseListener,
|
|
@@ -154,7 +156,10 @@ export {
|
|
|
154
156
|
} from 'sprotty/lib/features/hover/hover';
|
|
155
157
|
export * from 'sprotty/lib/features/hover/model';
|
|
156
158
|
export * from 'sprotty/lib/features/move/model';
|
|
157
|
-
export
|
|
159
|
+
export {
|
|
160
|
+
ElementMove, LocationPostprocessor, MorphEdgesAnimation, MoveAnimation,
|
|
161
|
+
MoveCommand, MoveMouseListener, ResolvedElementMove, ResolvedHandleMove
|
|
162
|
+
} from 'sprotty/lib/features/move/move';
|
|
158
163
|
export * from 'sprotty/lib/features/move/snap';
|
|
159
164
|
export * from 'sprotty/lib/features/nameable/model';
|
|
160
165
|
export * from 'sprotty/lib/features/open/model';
|
|
@@ -182,7 +187,7 @@ export {
|
|
|
182
187
|
SelectKeyboardListener,
|
|
183
188
|
SelectMouseListener
|
|
184
189
|
} from 'sprotty/lib/features/select/select';
|
|
185
|
-
export
|
|
190
|
+
export { UndoRedoKeyListener } from 'sprotty/lib/features/undo-redo/undo-redo';
|
|
186
191
|
export * from 'sprotty/lib/features/update/model-matching';
|
|
187
192
|
export { UpdateAnimationData, UpdateModelCommand } from 'sprotty/lib/features/update/update-model';
|
|
188
193
|
export {
|
|
@@ -202,7 +207,7 @@ export {
|
|
|
202
207
|
} from 'sprotty/lib/features/viewport/viewport';
|
|
203
208
|
export * from 'sprotty/lib/features/viewport/viewport-root';
|
|
204
209
|
export * from 'sprotty/lib/features/viewport/zoom';
|
|
205
|
-
export
|
|
210
|
+
export { BringToFrontCommand, ZOrderElement } from 'sprotty/lib/features/zorder/zorder';
|
|
206
211
|
export { SCompartment, SEdge, SGraph, SGraphIndex, SLabel, SNode, SPort } from 'sprotty/lib/graph/sgraph';
|
|
207
212
|
// ------------------ Graph ------------------
|
|
208
213
|
export * from 'sprotty/lib/graph/sgraph-factory';
|
|
@@ -286,3 +291,4 @@ import viewportModule from 'sprotty/lib/features/viewport/di.config';
|
|
|
286
291
|
import zorderModule from 'sprotty/lib/features/zorder/di.config';
|
|
287
292
|
import graphModule from 'sprotty/lib/graph/di.config';
|
|
288
293
|
import modelSourceModule from 'sprotty/lib/model-source/di.config';
|
|
294
|
+
|