@eclipse-glsp/client 1.1.0-next.cc57a50.267 → 1.1.0-next.d450dd9.276
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/key-shortcut.css +5 -1
- package/css/navigation.css +26 -0
- package/css/toast.css +45 -0
- package/lib/base/default.module.d.ts +1 -10
- package/lib/base/default.module.d.ts.map +1 -1
- package/lib/base/default.module.js +12 -21
- package/lib/base/default.module.js.map +1 -1
- package/lib/base/editor-context-service.d.ts +10 -4
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +21 -10
- package/lib/base/editor-context-service.js.map +1 -1
- package/lib/base/focus/focus-tracker.d.ts +4 -0
- package/lib/base/focus/focus-tracker.d.ts.map +1 -1
- package/lib/base/focus/focus-tracker.js +12 -5
- package/lib/base/focus/focus-tracker.js.map +1 -1
- package/lib/base/model/diagram-loader.d.ts +112 -0
- package/lib/base/model/diagram-loader.d.ts.map +1 -0
- package/lib/base/model/diagram-loader.js +121 -0
- package/lib/base/model/diagram-loader.js.map +1 -0
- package/lib/base/model/glsp-model-source.d.ts +11 -6
- package/lib/base/model/glsp-model-source.d.ts.map +1 -1
- package/lib/base/model/glsp-model-source.js +50 -15
- package/lib/base/model/glsp-model-source.js.map +1 -1
- package/lib/base/tool-manager/tool-manager.d.ts +82 -0
- package/lib/base/tool-manager/tool-manager.d.ts.map +1 -0
- package/lib/base/tool-manager/tool-manager.js +140 -0
- package/lib/base/tool-manager/tool-manager.js.map +1 -0
- package/lib/base/tool-manager/tool.d.ts +54 -0
- package/lib/base/tool-manager/tool.d.ts.map +1 -0
- package/lib/base/tool-manager/tool.js +60 -0
- package/lib/base/tool-manager/tool.js.map +1 -0
- package/lib/default-modules.d.ts +18 -1
- package/lib/default-modules.d.ts.map +1 -1
- package/lib/default-modules.js +28 -1
- package/lib/default-modules.js.map +1 -1
- package/lib/features/accessibility/accessibility-module.d.ts.map +1 -1
- package/lib/features/accessibility/accessibility-module.js +6 -0
- package/lib/features/accessibility/accessibility-module.js.map +1 -1
- package/lib/features/accessibility/element-navigation/diagram-navigation-tool.d.ts +65 -0
- package/lib/features/accessibility/element-navigation/diagram-navigation-tool.d.ts.map +1 -0
- package/lib/features/accessibility/element-navigation/diagram-navigation-tool.js +294 -0
- package/lib/features/accessibility/element-navigation/diagram-navigation-tool.js.map +1 -0
- package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts +24 -0
- package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts.map +1 -0
- package/lib/features/accessibility/element-navigation/element-navigation-module.js +38 -0
- package/lib/features/accessibility/element-navigation/element-navigation-module.js.map +1 -0
- package/lib/features/accessibility/element-navigation/element-navigator.d.ts +26 -0
- package/lib/features/accessibility/element-navigation/element-navigator.d.ts.map +1 -0
- package/lib/features/accessibility/element-navigation/element-navigator.js +18 -0
- package/lib/features/accessibility/element-navigation/element-navigator.js.map +1 -0
- package/lib/features/accessibility/element-navigation/left-right-top-bottom-navigator.d.ts +28 -0
- package/lib/features/accessibility/element-navigation/left-right-top-bottom-navigator.d.ts.map +1 -0
- package/lib/features/accessibility/element-navigation/left-right-top-bottom-navigator.js +104 -0
- package/lib/features/accessibility/element-navigation/left-right-top-bottom-navigator.js.map +1 -0
- package/lib/features/accessibility/element-navigation/local-element-navigator.d.ts +35 -0
- package/lib/features/accessibility/element-navigation/local-element-navigator.d.ts.map +1 -0
- package/lib/features/accessibility/element-navigation/local-element-navigator.js +117 -0
- package/lib/features/accessibility/element-navigation/local-element-navigator.js.map +1 -0
- package/lib/features/accessibility/element-navigation/position-navigator.d.ts +32 -0
- package/lib/features/accessibility/element-navigation/position-navigator.d.ts.map +1 -0
- package/lib/features/accessibility/element-navigation/position-navigator.js +80 -0
- package/lib/features/accessibility/element-navigation/position-navigator.js.map +1 -0
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts +23 -0
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts.map +1 -0
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.js +33 -0
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.js.map +1 -0
- package/lib/features/accessibility/focus-tracker/focus-tracker-tool.d.ts +37 -0
- package/lib/features/accessibility/focus-tracker/focus-tracker-tool.d.ts.map +1 -0
- package/lib/features/accessibility/focus-tracker/focus-tracker-tool.js +133 -0
- package/lib/features/accessibility/focus-tracker/focus-tracker-tool.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.d.ts +2 -2
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.d.ts.map +1 -1
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.js +2 -2
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.js.map +1 -1
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.d.ts +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.d.ts.map +1 -1
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.js +15 -3
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.js.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts +2 -2
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.js +13 -2
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.js.map +1 -1
- package/lib/features/accessibility/search/search-palette.d.ts.map +1 -1
- package/lib/features/accessibility/search/search-palette.js +3 -1
- package/lib/features/accessibility/search/search-palette.js.map +1 -1
- package/lib/features/accessibility/search/search-tool.d.ts +2 -1
- package/lib/features/accessibility/search/search-tool.d.ts.map +1 -1
- package/lib/features/accessibility/search/search-tool.js.map +1 -1
- package/lib/features/accessibility/toast/messages.json +16 -0
- package/lib/features/accessibility/toast/toast-handler.d.ts +45 -0
- package/lib/features/accessibility/toast/toast-handler.d.ts.map +1 -0
- package/lib/features/accessibility/toast/toast-handler.js +54 -0
- package/lib/features/accessibility/toast/toast-handler.js.map +1 -0
- package/lib/features/accessibility/toast/toast-module.d.ts +24 -0
- package/lib/features/accessibility/toast/toast-module.d.ts.map +1 -0
- package/lib/features/accessibility/toast/toast-module.js +38 -0
- package/lib/features/accessibility/toast/toast-module.js.map +1 -0
- package/lib/features/accessibility/toast/toast-tool.d.ts +43 -0
- package/lib/features/accessibility/toast/toast-tool.d.ts.map +1 -0
- package/lib/features/accessibility/toast/toast-tool.js +115 -0
- package/lib/features/accessibility/toast/toast-tool.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts +2 -2
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +2 -2
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts +2 -2
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette-tool.d.ts +2 -1
- package/lib/features/command-palette/command-palette-tool.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette-tool.js.map +1 -1
- package/lib/features/hints/type-hints-module.d.ts.map +1 -1
- package/lib/features/hints/type-hints-module.js +6 -5
- package/lib/features/hints/type-hints-module.js.map +1 -1
- package/lib/features/hints/type-hints.d.ts +6 -2
- package/lib/features/hints/type-hints.d.ts.map +1 -1
- package/lib/features/hints/type-hints.js +8 -0
- package/lib/features/hints/type-hints.js.map +1 -1
- package/lib/features/hover/hover-module.d.ts.map +1 -1
- package/lib/features/hover/hover-module.js +3 -2
- package/lib/features/hover/hover-module.js.map +1 -1
- package/lib/features/hover/hover.d.ts.map +1 -1
- package/lib/features/hover/hover.js +3 -2
- package/lib/features/hover/hover.js.map +1 -1
- package/lib/features/label-edit/edit-label-tool.d.ts +2 -2
- package/lib/features/label-edit/edit-label-tool.d.ts.map +1 -1
- package/lib/features/label-edit/edit-label-tool.js +2 -2
- package/lib/features/label-edit/edit-label-tool.js.map +1 -1
- package/lib/features/navigation/navigation-target-resolver.d.ts +3 -3
- package/lib/features/navigation/navigation-target-resolver.d.ts.map +1 -1
- package/lib/features/navigation/navigation-target-resolver.js +5 -7
- package/lib/features/navigation/navigation-target-resolver.js.map +1 -1
- package/lib/features/status/status-module.d.ts.map +1 -1
- package/lib/features/status/status-module.js +1 -0
- package/lib/features/status/status-module.js.map +1 -1
- package/lib/features/status/status-overlay.d.ts +7 -1
- package/lib/features/status/status-overlay.d.ts.map +1 -1
- package/lib/features/status/status-overlay.js +16 -0
- package/lib/features/status/status-overlay.js.map +1 -1
- package/lib/features/tool-palette/tool-palette-module.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette-module.js +3 -2
- package/lib/features/tool-palette/tool-palette-module.js.map +1 -1
- package/lib/features/tool-palette/tool-palette.d.ts +10 -8
- package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette.js +36 -29
- package/lib/features/tool-palette/tool-palette.js.map +1 -1
- package/lib/features/tools/{base-glsp-tool.d.ts → base-tools.d.ts} +14 -4
- package/lib/features/tools/base-tools.d.ts.map +1 -0
- package/lib/features/tools/{base-glsp-tool.js → base-tools.js} +31 -10
- package/lib/features/tools/base-tools.js.map +1 -0
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +2 -2
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool.js +2 -2
- package/lib/features/tools/change-bounds/change-bounds-tool.js.map +1 -1
- package/lib/features/tools/deletion/delete-tool.d.ts +4 -4
- package/lib/features/tools/deletion/delete-tool.d.ts.map +1 -1
- package/lib/features/tools/deletion/delete-tool.js +4 -3
- package/lib/features/tools/deletion/delete-tool.js.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool.d.ts +2 -2
- package/lib/features/tools/edge-creation/edge-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool.js +5 -4
- package/lib/features/tools/edge-creation/edge-creation-tool.js.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool.d.ts +2 -2
- package/lib/features/tools/edge-edit/edge-edit-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool.js +2 -2
- package/lib/features/tools/edge-edit/edge-edit-tool.js.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts +2 -2
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.js +5 -4
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.js.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-tool.d.ts +2 -2
- package/lib/features/tools/marquee-selection/marquee-tool.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-tool.js +4 -3
- package/lib/features/tools/marquee-selection/marquee-tool.js.map +1 -1
- package/lib/features/tools/node-creation/node-creation-tool.d.ts +2 -2
- package/lib/features/tools/node-creation/node-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/node-creation/node-creation-tool.js +4 -3
- package/lib/features/tools/node-creation/node-creation-tool.js.map +1 -1
- package/lib/features/tools/tool-focus-loss-module.d.ts.map +1 -1
- package/lib/features/tools/tool-focus-loss-module.js +2 -1
- package/lib/features/tools/tool-focus-loss-module.js.map +1 -1
- package/lib/features/validation/validate.js +1 -1
- package/lib/features/validation/validate.js.map +1 -1
- package/lib/features/viewport/glsp-scroll-mouse-listener.d.ts.map +1 -1
- package/lib/features/viewport/glsp-scroll-mouse-listener.js +3 -2
- package/lib/features/viewport/glsp-scroll-mouse-listener.js.map +1 -1
- package/lib/features/viewport/reposition.d.ts +38 -0
- package/lib/features/viewport/reposition.d.ts.map +1 -0
- package/lib/features/viewport/reposition.js +109 -0
- package/lib/features/viewport/reposition.js.map +1 -0
- package/lib/features/viewport/viewport-modules.d.ts.map +1 -1
- package/lib/features/viewport/viewport-modules.js +5 -2
- package/lib/features/viewport/viewport-modules.js.map +1 -1
- package/lib/glsp-sprotty/augmented-actions.d.ts +2 -10
- package/lib/glsp-sprotty/augmented-actions.d.ts.map +1 -1
- package/lib/glsp-sprotty/augmented-actions.js +2 -6
- package/lib/glsp-sprotty/augmented-actions.js.map +1 -1
- package/lib/glsp-sprotty/index.d.ts +0 -2
- package/lib/glsp-sprotty/index.d.ts.map +1 -1
- package/lib/glsp-sprotty/index.js +0 -2
- package/lib/glsp-sprotty/index.js.map +1 -1
- package/lib/glsp-sprotty/types.d.ts +12 -4
- package/lib/glsp-sprotty/types.d.ts.map +1 -1
- package/lib/glsp-sprotty/types.js +1 -1
- package/lib/glsp-sprotty/types.js.map +1 -1
- package/lib/index.d.ts +10 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -2
- package/lib/index.js.map +1 -1
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +2 -1
- package/lib/views/base-view-module.js.map +1 -1
- package/lib/views/glsp-projection-view.d.ts +2 -1
- package/lib/views/glsp-projection-view.d.ts.map +1 -1
- package/lib/views/glsp-projection-view.js +11 -2
- package/lib/views/glsp-projection-view.js.map +1 -1
- package/package.json +4 -4
- package/src/base/default.module.ts +12 -24
- package/src/base/editor-context-service.ts +24 -11
- package/src/base/focus/focus-tracker.ts +16 -5
- package/src/base/model/diagram-loader.ts +201 -0
- package/src/base/model/glsp-model-source.ts +48 -20
- package/src/base/tool-manager/tool-manager.ts +183 -0
- package/src/base/tool-manager/tool.ts +85 -0
- package/src/default-modules.ts +33 -0
- package/src/features/accessibility/README.md +18 -0
- package/src/features/accessibility/accessibility-module.ts +6 -1
- package/src/features/accessibility/element-navigation/diagram-navigation-tool.ts +309 -0
- package/src/features/accessibility/element-navigation/element-navigation-module.ts +36 -0
- package/src/features/accessibility/element-navigation/element-navigator.ts +57 -0
- package/src/features/accessibility/element-navigation/left-right-top-bottom-navigator.ts +113 -0
- package/src/features/accessibility/element-navigation/local-element-navigator.ts +147 -0
- package/src/features/accessibility/element-navigation/position-navigator.ts +102 -0
- package/src/features/accessibility/focus-tracker/focus-tracker-module.ts +32 -0
- package/src/features/accessibility/focus-tracker/focus-tracker-tool.ts +129 -0
- package/src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts +3 -3
- package/src/features/accessibility/key-shortcut/accessible-key-shortcut.ts +18 -3
- package/src/features/accessibility/resize-key-tool/resize-key-tool.ts +19 -3
- package/src/features/accessibility/search/search-palette.ts +4 -2
- package/src/features/accessibility/search/search-tool.ts +2 -1
- package/src/features/accessibility/toast/messages.json +16 -0
- package/src/features/accessibility/toast/toast-handler.ts +69 -0
- package/src/features/accessibility/toast/toast-module.ts +36 -0
- package/src/features/accessibility/toast/toast-tool.ts +108 -0
- package/src/features/accessibility/view-key-tools/deselect-key-tool.ts +2 -2
- package/src/features/accessibility/view-key-tools/movement-key-tool.ts +2 -2
- package/src/features/accessibility/view-key-tools/zoom-key-tool.ts +2 -2
- package/src/features/command-palette/command-palette-tool.ts +2 -1
- package/src/features/hints/type-hints-module.ts +7 -6
- package/src/features/hints/type-hints.ts +12 -1
- package/src/features/hover/hover-module.ts +1 -2
- package/src/features/hover/hover.ts +2 -3
- package/src/features/label-edit/edit-label-tool.ts +2 -2
- package/src/features/navigation/navigation-target-resolver.ts +10 -7
- package/src/features/status/status-module.ts +1 -0
- package/src/features/status/status-overlay.ts +15 -2
- package/src/features/tool-palette/tool-palette-module.ts +4 -3
- package/src/features/tool-palette/tool-palette.ts +44 -33
- package/src/features/tools/{base-glsp-tool.ts → base-tools.ts} +28 -3
- package/src/features/tools/change-bounds/change-bounds-tool.ts +2 -2
- package/src/features/tools/deletion/delete-tool.ts +4 -5
- package/src/features/tools/edge-creation/edge-creation-tool.ts +3 -3
- package/src/features/tools/edge-edit/edge-edit-tool.ts +2 -2
- package/src/features/tools/marquee-selection/marquee-mouse-tool.ts +3 -3
- package/src/features/tools/marquee-selection/marquee-tool.ts +4 -3
- package/src/features/tools/node-creation/node-creation-tool.ts +3 -3
- package/src/features/tools/tool-focus-loss-module.ts +2 -1
- package/src/features/validation/validate.ts +1 -1
- package/src/features/viewport/glsp-scroll-mouse-listener.ts +2 -9
- package/src/features/viewport/reposition.ts +119 -0
- package/src/features/viewport/viewport-modules.ts +3 -2
- package/src/glsp-sprotty/augmented-actions.ts +1 -16
- package/src/glsp-sprotty/index.ts +0 -2
- package/src/glsp-sprotty/types.ts +6 -1
- package/src/index.ts +10 -2
- package/src/views/base-view-module.ts +2 -2
- package/src/views/glsp-projection-view.tsx +18 -8
- package/lib/base/tool-manager/glsp-tool-manager.d.ts +0 -21
- package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +0 -1
- package/lib/base/tool-manager/glsp-tool-manager.js +0 -113
- package/lib/base/tool-manager/glsp-tool-manager.js.map +0 -1
- package/lib/features/tools/base-glsp-creation-tool.d.ts +0 -10
- package/lib/features/tools/base-glsp-creation-tool.d.ts.map +0 -1
- package/lib/features/tools/base-glsp-creation-tool.js +0 -45
- package/lib/features/tools/base-glsp-creation-tool.js.map +0 -1
- package/lib/features/tools/base-glsp-tool.d.ts.map +0 -1
- package/lib/features/tools/base-glsp-tool.js.map +0 -1
- package/src/base/tool-manager/glsp-tool-manager.ts +0 -96
- package/src/features/tools/base-glsp-creation-tool.ts +0 -40
package/css/key-shortcut.css
CHANGED
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
cursor: pointer;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.
|
|
95
|
+
.column-title {
|
|
96
96
|
text-align: left;
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -105,3 +105,7 @@
|
|
|
105
105
|
justify-content: space-between;
|
|
106
106
|
flex-wrap: wrap;
|
|
107
107
|
}
|
|
108
|
+
|
|
109
|
+
.shortcut-table thead th {
|
|
110
|
+
border-bottom: 2px solid #000;
|
|
111
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) 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
|
+
|
|
17
|
+
:root {
|
|
18
|
+
--glsp-navigation-highlight: rgba(136, 68, 68, 0.2);
|
|
19
|
+
}
|
|
20
|
+
.navigable-element {
|
|
21
|
+
stroke: var(--glsp-navigation-highlight) !important;
|
|
22
|
+
}
|
|
23
|
+
.navigable-element .sprotty-edge.arrow {
|
|
24
|
+
fill: var(--glsp-navigation-highlight) !important;
|
|
25
|
+
stroke: var(--glsp-navigation-highlight) !important;
|
|
26
|
+
}
|
package/css/toast.css
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) 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
|
+
.toast {
|
|
17
|
+
position: absolute;
|
|
18
|
+
bottom: 1rem;
|
|
19
|
+
width: 100%;
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
22
|
+
grid-column-gap: 1rem;
|
|
23
|
+
margin: 0 1rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.toast-column-left {
|
|
27
|
+
grid-column: 1 / span 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.toast-column-center {
|
|
31
|
+
grid-column: 2 / span 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.toast-column-right {
|
|
35
|
+
grid-column: 3 / span 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.toast-container {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
min-width: 256px;
|
|
41
|
+
max-width: 516px;
|
|
42
|
+
background-color: #ccc;
|
|
43
|
+
color: #000;
|
|
44
|
+
padding: 0.5rem;
|
|
45
|
+
}
|
|
@@ -14,20 +14,11 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import '@vscode/codicons/dist/codicon.css';
|
|
17
|
-
import {
|
|
18
|
-
import { FeatureModule, InitializeResult } from '../glsp-sprotty/index';
|
|
17
|
+
import { FeatureModule } from '../glsp-sprotty/index';
|
|
19
18
|
import '../../css/glsp-sprotty.css';
|
|
20
19
|
/**
|
|
21
20
|
* The default module provides all of GLSP's base functionality and services.
|
|
22
21
|
* It builds on top of sprotty's default module {@link `sprottyDefaultModule`}.
|
|
23
22
|
*/
|
|
24
23
|
export declare const defaultModule: FeatureModule;
|
|
25
|
-
/**
|
|
26
|
-
* Utility function to configure the {@link ModelSource}, i.e. the `DiagramServer`, as action handler for all server actions for the given
|
|
27
|
-
* diagramType.
|
|
28
|
-
* @param result A promise that resolves after all server actions have been registered.
|
|
29
|
-
* @param diagramType The diagram type.
|
|
30
|
-
* @param container The di container.
|
|
31
|
-
*/
|
|
32
|
-
export declare function configureServerActions(result: InitializeResult, diagramType: string, container: Container): Promise<void>;
|
|
33
24
|
//# sourceMappingURL=default.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.module.d.ts","sourceRoot":"","sources":["../../src/base/default.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,mCAAmC,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"default.module.d.ts","sourceRoot":"","sources":["../../src/base/default.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EACH,aAAa,EAahB,MAAM,eAAe,CAAC;AACvB,OAAO,4BAA4B,CAAC;AAqBpC;;;GAGG;AACH,eAAO,MAAM,aAAa,eAiExB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.defaultModule = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
5
|
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
6
6
|
*
|
|
@@ -28,11 +28,13 @@ const update_model_command_1 = require("./feedback/update-model-command");
|
|
|
28
28
|
const focus_state_change_action_1 = require("./focus/focus-state-change-action");
|
|
29
29
|
const focus_tracker_1 = require("./focus/focus-tracker");
|
|
30
30
|
const model_initialization_constraint_1 = require("./model-initialization-constraint");
|
|
31
|
+
const diagram_loader_1 = require("./model/diagram-loader");
|
|
31
32
|
const glsp_model_source_1 = require("./model/glsp-model-source");
|
|
32
33
|
const model_registry_1 = require("./model/model-registry");
|
|
33
34
|
const selection_clearing_mouse_listener_1 = require("./selection-clearing-mouse-listener");
|
|
34
35
|
const selection_service_1 = require("./selection-service");
|
|
35
|
-
const
|
|
36
|
+
const tool_1 = require("./tool-manager/tool");
|
|
37
|
+
const tool_manager_1 = require("./tool-manager/tool-manager");
|
|
36
38
|
const key_tool_1 = require("./view/key-tool");
|
|
37
39
|
const mouse_tool_1 = require("./view/mouse-tool");
|
|
38
40
|
const view_registry_1 = require("./view/view-registry");
|
|
@@ -66,11 +68,10 @@ exports.defaultModule = new _glsp_sprotty_1.FeatureModule((bind, unbind, isBound
|
|
|
66
68
|
(0, _glsp_sprotty_1.bindOrRebind)(context, _glsp_sprotty_1.KeyTool).toService(key_tool_1.GLSPKeyTool);
|
|
67
69
|
(0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.MouseListener, selection_clearing_mouse_listener_1.SelectionClearingMouseListener);
|
|
68
70
|
(0, _glsp_sprotty_1.bindOrRebind)(context, _glsp_sprotty_1.TYPES.ICommandStack).to(command_stack_1.GLSPCommandStack).inSingletonScope();
|
|
69
|
-
bind(glsp_tool_manager_1.GLSPToolManager).toSelf().inSingletonScope();
|
|
70
|
-
(0, _glsp_sprotty_1.bindOrRebind)(context, _glsp_sprotty_1.TYPES.IToolManager).toService(glsp_tool_manager_1.GLSPToolManager);
|
|
71
71
|
bind(action_dispatcher_1.GLSPActionDispatcher).toSelf().inSingletonScope();
|
|
72
72
|
(0, _glsp_sprotty_1.bindOrRebind)(context, _glsp_sprotty_1.TYPES.IActionDispatcher).toService(action_dispatcher_1.GLSPActionDispatcher);
|
|
73
73
|
(0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.ModelSource, glsp_model_source_1.GLSPModelSource);
|
|
74
|
+
bind(diagram_loader_1.DiagramLoader).toSelf().inSingletonScope();
|
|
74
75
|
bind(model_initialization_constraint_1.ModelInitializationConstraint).to(model_initialization_constraint_1.DefaultModelInitializationConstraint).inSingletonScope();
|
|
75
76
|
// support re-registration of model elements and views
|
|
76
77
|
(0, _glsp_sprotty_1.bindOrRebind)(context, _glsp_sprotty_1.TYPES.SModelRegistry).to(model_registry_1.GLSPModelRegistry).inSingletonScope();
|
|
@@ -84,22 +85,12 @@ exports.defaultModule = new _glsp_sprotty_1.FeatureModule((bind, unbind, isBound
|
|
|
84
85
|
(0, _glsp_sprotty_1.configureCommand)(context, _glsp_sprotty_1.MoveCommand);
|
|
85
86
|
(0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.IVNodePostprocessor, _glsp_sprotty_1.LocationPostprocessor);
|
|
86
87
|
bind(_glsp_sprotty_1.TYPES.HiddenVNodePostprocessor).toService(_glsp_sprotty_1.LocationPostprocessor);
|
|
88
|
+
// Tool manager initialization ------------------------------------
|
|
89
|
+
bind(_glsp_sprotty_1.TYPES.IToolManager).to(tool_manager_1.ToolManager).inSingletonScope();
|
|
90
|
+
bind(tool_manager_1.DefaultToolsEnablingKeyListener).toSelf().inSingletonScope();
|
|
91
|
+
bind(_glsp_sprotty_1.TYPES.KeyListener).toService(tool_manager_1.DefaultToolsEnablingKeyListener);
|
|
92
|
+
bind(tool_manager_1.ToolManagerActionHandler).toSelf().inSingletonScope();
|
|
93
|
+
(0, _glsp_sprotty_1.configureActionHandler)(context, tool_1.EnableDefaultToolsAction.KIND, tool_manager_1.ToolManagerActionHandler);
|
|
94
|
+
(0, _glsp_sprotty_1.configureActionHandler)(context, tool_1.EnableToolsAction.KIND, tool_manager_1.ToolManagerActionHandler);
|
|
87
95
|
});
|
|
88
|
-
/**
|
|
89
|
-
* Utility function to configure the {@link ModelSource}, i.e. the `DiagramServer`, as action handler for all server actions for the given
|
|
90
|
-
* diagramType.
|
|
91
|
-
* @param result A promise that resolves after all server actions have been registered.
|
|
92
|
-
* @param diagramType The diagram type.
|
|
93
|
-
* @param container The di container.
|
|
94
|
-
*/
|
|
95
|
-
async function configureServerActions(result, diagramType, container) {
|
|
96
|
-
const modelSource = container.get(_glsp_sprotty_1.TYPES.ModelSource);
|
|
97
|
-
const actionHandlerRegistry = container.get(_glsp_sprotty_1.ActionHandlerRegistry);
|
|
98
|
-
const serverActions = result.serverActions[diagramType];
|
|
99
|
-
if (serverActions.length === 0) {
|
|
100
|
-
throw new Error(`No server-handled actions could be derived from the initialize result for diagramType: ${diagramType}!`);
|
|
101
|
-
}
|
|
102
|
-
serverActions.forEach(actionKind => actionHandlerRegistry.register(actionKind, modelSource));
|
|
103
|
-
}
|
|
104
|
-
exports.configureServerActions = configureServerActions;
|
|
105
96
|
//# sourceMappingURL=default.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.module.js","sourceRoot":"","sources":["../../src/base/default.module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,6CAA2C;
|
|
1
|
+
{"version":3,"file":"default.module.js","sourceRoot":"","sources":["../../src/base/default.module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,6CAA2C;AAC3C,iDAcuB;AACvB,sCAAoC;AACpC,2DAA2D;AAC3D,mDAAmD;AACnD,qEAAgE;AAChE,0DAAmE;AACnE,sFAAiF;AACjF,0EAAkF;AAClF,iFAA4E;AAC5E,yDAAqD;AACrD,uFAAwH;AACxH,2DAAuD;AACvD,iEAA4D;AAC5D,2DAA2D;AAC3D,2FAAqF;AACrF,2DAAuD;AACvD,8CAAkF;AAClF,8DAAqH;AACrH,8CAA8C;AAC9C,kDAAkD;AAClD,wDAAwD;AAExD;;;GAGG;AACU,QAAA,aAAa,GAAG,IAAI,6BAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE;IACtF,wEAAwE;IACxE,oCAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,M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,EAAE,uCAAwB,CAAC,CAAC;IACpD,wEAAwE;IACxE,IAAA,gCAAgB,EAAC,OAAO,EAAE,2BAAW,CAAC,CAAC;IAEvC,IAAA,6BAAa,EAAC,OAAO,EAAE,qBAAK,CAAC,mBAAmB,EAAE,qCAAqB,CAAC,CAAC;IACzE,IAAI,CAAC,qBAAK,CAAC,wBAAwB,CAAC,CAAC,SAAS,CAAC,qCAAqB,CAAC,CAAC;IAEtE,mEAAmE;IACnE,IAAI,CAAC,qBAAK,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,0BAAW,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC5D,IAAI,CAAC,8CAA+B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAClE,IAAI,CAAC,qBAAK,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,8CAA+B,CAAC,CAAC;IACnE,IAAI,CAAC,uCAAwB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC3D,IAAA,sCAAsB,EAAC,OAAO,EAAE,+BAAwB,CAAC,IAAI,EAAE,uCAAwB,CAAC,CAAC;IACzF,IAAA,sCAAsB,EAAC,OAAO,EAAE,wBAAiB,CAAC,IAAI,EAAE,uCAAwB,CAAC,CAAC;AACtF,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Action, Args, Disposable, DisposableCollection, EditorContext, Emitter, Event, IActionHandler,
|
|
1
|
+
import { Action, Args, Disposable, DisposableCollection, EditorContext, Emitter, Event, IActionHandler, MaybePromise, MousePositionTracker, SModelElement, SModelRoot, SetDirtyStateAction, SetEditModeAction, ValueChange } from '../glsp-sprotty/index';
|
|
2
|
+
import { GLSPActionDispatcher } from './action-dispatcher';
|
|
3
|
+
import { IDiagramOptions, IDiagramStartup } from './model/diagram-loader';
|
|
2
4
|
import { SelectionService } from './selection-service';
|
|
3
5
|
export interface IEditModeListener {
|
|
4
6
|
editModeChanged(newValue: string, oldValue: string): void;
|
|
@@ -16,11 +18,12 @@ export type DirtyStateChange = Pick<SetDirtyStateAction, 'isDirty' | 'reason'>;
|
|
|
16
18
|
* actions to the server to describe the current state of the editor (selection, last mouse
|
|
17
19
|
* position, etc.).
|
|
18
20
|
*/
|
|
19
|
-
export declare class EditorContextService implements IActionHandler, Disposable {
|
|
21
|
+
export declare class EditorContextService implements IActionHandler, Disposable, IDiagramStartup {
|
|
20
22
|
protected selectionService: SelectionService;
|
|
21
23
|
protected mousePositionTracker: MousePositionTracker;
|
|
24
|
+
protected diagramOptions: IDiagramOptions;
|
|
22
25
|
protected editModeListeners: IEditModeListener[];
|
|
23
|
-
protected
|
|
26
|
+
protected actionDispatcher: GLSPActionDispatcher;
|
|
24
27
|
protected _editMode: string;
|
|
25
28
|
protected onEditModeChangedEmitter: Emitter<ValueChange<string>>;
|
|
26
29
|
get onEditModeChanged(): Event<ValueChange<string>>;
|
|
@@ -35,12 +38,15 @@ export declare class EditorContextService implements IActionHandler, Disposable
|
|
|
35
38
|
handle(action: Action): void;
|
|
36
39
|
protected handleSetEditModeAction(action: SetEditModeAction): void;
|
|
37
40
|
protected handleSetDirtyStateAction(action: SetDirtyStateAction): void;
|
|
38
|
-
|
|
41
|
+
get sourceUri(): string | undefined;
|
|
39
42
|
get editMode(): string;
|
|
43
|
+
get diagramType(): string;
|
|
44
|
+
get clientId(): string;
|
|
40
45
|
get modelRoot(): Readonly<SModelRoot>;
|
|
41
46
|
get selectedElements(): Readonly<SModelElement>[];
|
|
42
47
|
get isReadonly(): boolean;
|
|
43
48
|
get isDirty(): boolean;
|
|
49
|
+
postRequestModel(): MaybePromise<void>;
|
|
44
50
|
}
|
|
45
51
|
export type EditorContextServiceProvider = () => Promise<EditorContextService>;
|
|
46
52
|
//# sourceMappingURL=editor-context-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.d.ts","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,MAAM,EACN,IAAI,EACJ,UAAU,EACV,oBAAoB,EAEpB,aAAa,EACb,OAAO,EACP,KAAK,EACL,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"editor-context-service.d.ts","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,MAAM,EACN,IAAI,EACJ,UAAU,EACV,oBAAoB,EAEpB,aAAa,EACb,OAAO,EACP,KAAK,EACL,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EAEjB,WAAW,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAC9B,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7D;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAC;AAC/E;;;;;;;;;;;GAWG;AACH,qBACa,oBAAqB,YAAW,cAAc,EAAE,UAAU,EAAE,eAAe;IAEpF,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAG7C,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAGrD,SAAS,CAAC,cAAc,EAAE,eAAe,CAAC;IAI1C,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,CAAM;IAGtD,SAAS,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;IAEjD,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,wBAAwB,+BAAsC;IACxE,IAAI,iBAAiB,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAElD;IAED,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,0BAA0B,4BAAmC;IACvE,IAAI,mBAAmB,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAEjD;IAED,SAAS,CAAC,SAAS,uBAA8B;IAGjD,SAAS,CAAC,UAAU,IAAI,IAAI;IAS5B,OAAO,IAAI,IAAI;IAIf,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,aAAa;IAQ/B,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,aAAa;IAQ1E,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ5B,SAAS,CAAC,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAMlE,SAAS,CAAC,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAOtE,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,SAAS,IAAI,QAAQ,CAAC,UAAU,CAAC,CAEpC;IAED,IAAI,gBAAgB,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE,CAEhD;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,gBAAgB,IAAI,YAAY,CAAC,IAAI,CAAC;CAGzC;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -27,7 +27,7 @@ exports.EditorContextService = void 0;
|
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const inversify_1 = require("inversify");
|
|
29
29
|
const _glsp_sprotty_1 = require("../glsp-sprotty/index");
|
|
30
|
-
const
|
|
30
|
+
const action_dispatcher_1 = require("./action-dispatcher");
|
|
31
31
|
const selection_service_1 = require("./selection-service");
|
|
32
32
|
/**
|
|
33
33
|
* The `EditorContextService` is a central injectable component that gives read-only access to
|
|
@@ -55,6 +55,8 @@ let EditorContextService = exports.EditorContextService = class EditorContextSer
|
|
|
55
55
|
return this.onDirtyStateChangedEmitter.event;
|
|
56
56
|
}
|
|
57
57
|
initialize() {
|
|
58
|
+
var _a;
|
|
59
|
+
this._editMode = (_a = this.diagramOptions.editMode) !== null && _a !== void 0 ? _a : _glsp_sprotty_1.EditMode.EDITABLE;
|
|
58
60
|
this.toDispose.push(this.onEditModeChangedEmitter, this.onDirtyStateChangedEmitter);
|
|
59
61
|
this.editModeListeners.forEach(listener => this.onEditModeChanged(change => listener.editModeChanged(change.newValue, change.oldValue)));
|
|
60
62
|
}
|
|
@@ -94,16 +96,18 @@ let EditorContextService = exports.EditorContextService = class EditorContextSer
|
|
|
94
96
|
this.onDirtyStateChangedEmitter.fire(action);
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (modelSource instanceof glsp_model_source_1.GLSPModelSource) {
|
|
100
|
-
return modelSource.sourceUri;
|
|
101
|
-
}
|
|
102
|
-
return undefined;
|
|
99
|
+
get sourceUri() {
|
|
100
|
+
return this.diagramOptions.sourceUri;
|
|
103
101
|
}
|
|
104
102
|
get editMode() {
|
|
105
103
|
return this._editMode;
|
|
106
104
|
}
|
|
105
|
+
get diagramType() {
|
|
106
|
+
return this.diagramOptions.diagramType;
|
|
107
|
+
}
|
|
108
|
+
get clientId() {
|
|
109
|
+
return this.diagramOptions.clientId;
|
|
110
|
+
}
|
|
107
111
|
get modelRoot() {
|
|
108
112
|
return this.selectionService.getModelRoot();
|
|
109
113
|
}
|
|
@@ -116,6 +120,9 @@ let EditorContextService = exports.EditorContextService = class EditorContextSer
|
|
|
116
120
|
get isDirty() {
|
|
117
121
|
return this._isDirty;
|
|
118
122
|
}
|
|
123
|
+
postRequestModel() {
|
|
124
|
+
this.actionDispatcher.dispatch(_glsp_sprotty_1.SetEditModeAction.create(this.editMode));
|
|
125
|
+
}
|
|
119
126
|
};
|
|
120
127
|
__decorate([
|
|
121
128
|
(0, inversify_1.inject)(selection_service_1.SelectionService),
|
|
@@ -125,15 +132,19 @@ __decorate([
|
|
|
125
132
|
(0, inversify_1.inject)(_glsp_sprotty_1.MousePositionTracker),
|
|
126
133
|
__metadata("design:type", _glsp_sprotty_1.MousePositionTracker)
|
|
127
134
|
], EditorContextService.prototype, "mousePositionTracker", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, inversify_1.inject)(_glsp_sprotty_1.TYPES.IDiagramOptions),
|
|
137
|
+
__metadata("design:type", Object)
|
|
138
|
+
], EditorContextService.prototype, "diagramOptions", void 0);
|
|
128
139
|
__decorate([
|
|
129
140
|
(0, inversify_1.multiInject)(_glsp_sprotty_1.TYPES.IEditModeListener),
|
|
130
141
|
(0, inversify_1.optional)(),
|
|
131
142
|
__metadata("design:type", Array)
|
|
132
143
|
], EditorContextService.prototype, "editModeListeners", void 0);
|
|
133
144
|
__decorate([
|
|
134
|
-
(0, inversify_1.inject)(
|
|
135
|
-
__metadata("design:type",
|
|
136
|
-
], EditorContextService.prototype, "
|
|
145
|
+
(0, inversify_1.inject)(action_dispatcher_1.GLSPActionDispatcher),
|
|
146
|
+
__metadata("design:type", action_dispatcher_1.GLSPActionDispatcher)
|
|
147
|
+
], EditorContextService.prototype, "actionDispatcher", void 0);
|
|
137
148
|
__decorate([
|
|
138
149
|
(0, inversify_1.postConstruct)(),
|
|
139
150
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.js","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAiG;AACjG,iDAkBuB;AACvB,
|
|
1
|
+
{"version":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AQ;QACR,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC;IACxC,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;IAChD,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,CAAC;IACvD,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ,KAAK,wBAAQ,CAAC,QAAQ,CAAC;IAC/C,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,gBAAgB;QACZ,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,iCAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5E,CAAC;CACJ,CAAA;AAnHa;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;8BACG,oCAAgB;8DAAC;AAGnC;IADT,IAAA,kBAAM,EAAC,oCAAoB,CAAC;8BACG,oCAAoB;kEAAC;AAG3C;IADT,IAAA,kBAAM,EAAC,qBAAK,CAAC,eAAe,CAAC;;4DACY;AAIhC;IAFT,IAAA,uBAAW,EAAC,qBAAK,CAAC,iBAAiB,CAAC;IACpC,IAAA,oBAAQ,GAAE;;+DAC2C;AAG5C;IADT,IAAA,kBAAM,EAAC,wCAAoB,CAAC;8BACD,wCAAoB;8DAAC;AAiBvC;IADT,IAAA,yBAAa,GAAE;;;;sDAOf;AAGD;IADC,IAAA,sBAAU,GAAE;;;;mDAGZ;+BA3CQ,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAqHhC"}
|
|
@@ -2,8 +2,12 @@ import { Action, IActionHandler, ICommand, ViewerOptions } from '../../glsp-spro
|
|
|
2
2
|
export declare class FocusTracker implements IActionHandler {
|
|
3
3
|
protected inActiveCssClass: string;
|
|
4
4
|
protected _hasFocus: boolean;
|
|
5
|
+
protected _focusElement: HTMLOrSVGElement | null;
|
|
6
|
+
protected _diagramElement: HTMLElement | null;
|
|
5
7
|
protected options: ViewerOptions;
|
|
6
8
|
get hasFocus(): boolean;
|
|
9
|
+
get focusElement(): HTMLOrSVGElement | null;
|
|
10
|
+
get diagramElement(): HTMLElement | null;
|
|
7
11
|
handle(action: Action): void | Action | ICommand;
|
|
8
12
|
}
|
|
9
13
|
//# sourceMappingURL=focus-tracker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus-tracker.d.ts","sourceRoot":"","sources":["../../../src/base/focus/focus-tracker.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAS,aAAa,EAAE,MAAM,eAAe,CAAC;AAGvF,qBACa,YAAa,YAAW,cAAc;IAC/C,SAAS,CAAC,gBAAgB,SAAc;IACxC,SAAS,CAAC,SAAS,UAAQ;
|
|
1
|
+
{"version":3,"file":"focus-tracker.d.ts","sourceRoot":"","sources":["../../../src/base/focus/focus-tracker.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAS,aAAa,EAAE,MAAM,eAAe,CAAC;AAGvF,qBACa,YAAa,YAAW,cAAc;IAC/C,SAAS,CAAC,gBAAgB,SAAc;IACxC,SAAS,CAAC,SAAS,UAAQ;IAC3B,SAAS,CAAC,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjD,SAAS,CAAC,eAAe,EAAE,WAAW,GAAG,IAAI,CAAC;IAEjB,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;IAE9D,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,YAAY,IAAI,gBAAgB,GAAG,IAAI,CAE1C;IAED,IAAI,cAAc,IAAI,WAAW,GAAG,IAAI,CAEvC;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ;CAiBnD"}
|
|
@@ -36,20 +36,27 @@ let FocusTracker = exports.FocusTracker = class FocusTracker {
|
|
|
36
36
|
get hasFocus() {
|
|
37
37
|
return this._hasFocus;
|
|
38
38
|
}
|
|
39
|
+
get focusElement() {
|
|
40
|
+
return this._focusElement;
|
|
41
|
+
}
|
|
42
|
+
get diagramElement() {
|
|
43
|
+
return this._diagramElement;
|
|
44
|
+
}
|
|
39
45
|
handle(action) {
|
|
40
46
|
if (focus_state_change_action_1.FocusStateChangedAction.is(action)) {
|
|
41
47
|
this._hasFocus = action.hasFocus;
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
this._focusElement = document.activeElement;
|
|
49
|
+
this._diagramElement = document.getElementById(this.options.baseDiv);
|
|
50
|
+
if (!this._diagramElement) {
|
|
44
51
|
return;
|
|
45
52
|
}
|
|
46
53
|
if (this.hasFocus) {
|
|
47
|
-
if (
|
|
48
|
-
|
|
54
|
+
if (this._diagramElement.classList.contains(this.inActiveCssClass)) {
|
|
55
|
+
this._diagramElement.classList.remove(this.inActiveCssClass);
|
|
49
56
|
}
|
|
50
57
|
}
|
|
51
58
|
else {
|
|
52
|
-
|
|
59
|
+
this._diagramElement.classList.add(this.inActiveCssClass);
|
|
53
60
|
}
|
|
54
61
|
}
|
|
55
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus-tracker.js","sourceRoot":"","sources":["../../../src/base/focus/focus-tracker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,iDAAuF;AACvF,2EAAsE;AAG/D,IAAM,YAAY,0BAAlB,MAAM,YAAY;IAAlB;QACO,qBAAgB,GAAG,UAAU,CAAC;QAC9B,cAAS,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"focus-tracker.js","sourceRoot":"","sources":["../../../src/base/focus/focus-tracker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AA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
|
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 { Args, GLSPClient, InitializeParameters, MaybePromise } from '../../glsp-sprotty/index';
|
|
17
|
+
import { GLSPActionDispatcher } from '../action-dispatcher';
|
|
18
|
+
import { Ranked } from '../ranked';
|
|
19
|
+
import { GLSPModelSource } from './glsp-model-source';
|
|
20
|
+
/**
|
|
21
|
+
* Configuration options for a specific GLSP diagram instance.
|
|
22
|
+
*/
|
|
23
|
+
export interface IDiagramOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Unique id associated with this diagram. Used on the server side to identify the
|
|
26
|
+
* corresponding client session.
|
|
27
|
+
*/
|
|
28
|
+
clientId: string;
|
|
29
|
+
/**
|
|
30
|
+
* The diagram type i.e. diagram language this diagram is associated with.
|
|
31
|
+
*/
|
|
32
|
+
diagramType: string;
|
|
33
|
+
/**
|
|
34
|
+
* The provider function to retrieve the GLSP client used by this diagram to communicate with the server.
|
|
35
|
+
*/
|
|
36
|
+
glspClientProvider: () => Promise<GLSPClient>;
|
|
37
|
+
/**
|
|
38
|
+
* The file source URI associated with this diagram.
|
|
39
|
+
*/
|
|
40
|
+
sourceUri?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The initial edit mode of diagram. Defaults to `editable`.
|
|
43
|
+
*/
|
|
44
|
+
editMode?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Services that implement startup hooks which are invoked during the {@link DiagramLoader.load} process.
|
|
48
|
+
* Typically used to dispatch additional initial actions and/or activate UI extensions on startup.
|
|
49
|
+
* Execution order is derived by the `rank` property of the service. If not present, the {@link Ranked.DEFAULT_RANK} will be assumed.
|
|
50
|
+
*/
|
|
51
|
+
export interface IDiagramStartup extends Partial<Ranked> {
|
|
52
|
+
/**
|
|
53
|
+
* Hook for services that should be executed before the underlying GLSP client is configured and the server is initialized.
|
|
54
|
+
*/
|
|
55
|
+
preInitialize?(): MaybePromise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Hook for services that should be executed before the initial model loading request (i.e. `RequestModelAction`) but
|
|
58
|
+
* after the underlying GLSP client has been configured and the server is initialized.
|
|
59
|
+
*/
|
|
60
|
+
preRequestModel?(): MaybePromise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Hook for services that should be executed after the initial model loading request (i.e. `RequestModelAction`).
|
|
63
|
+
* Note that this hook is invoked directly after the `RequestModelAction` has been dispatched. It does not necessarily wait
|
|
64
|
+
* until the client-server update roundtrip is completed. If you need to wait until the diagram is fully initialized use the
|
|
65
|
+
* {@link GLSPActionDispatcher.onceModelInitialized} constraint.
|
|
66
|
+
*/
|
|
67
|
+
postRequestModel?(): MaybePromise<void>;
|
|
68
|
+
}
|
|
69
|
+
export declare namespace IDiagramStartup {
|
|
70
|
+
function is(object: unknown): object is IDiagramStartup;
|
|
71
|
+
}
|
|
72
|
+
export interface DiagramLoadingOptions {
|
|
73
|
+
/**
|
|
74
|
+
* Optional custom options that should be used the initial {@link RequestModelAction}.
|
|
75
|
+
* These options will be merged with the default options (`diagramType` and `sourceUri`).
|
|
76
|
+
* Defaults to an empty object if not defined.
|
|
77
|
+
*/
|
|
78
|
+
requestModelOptions?: Args;
|
|
79
|
+
/**
|
|
80
|
+
* Optional partial {@link InitializeParameters} that should be used for `initializeServer` request if the underlying
|
|
81
|
+
* {@link GLSPClient} has not been initialized yet.
|
|
82
|
+
*/
|
|
83
|
+
initializeParameters?: Partial<InitializeParameters>;
|
|
84
|
+
/**
|
|
85
|
+
* Flag to enable/disable client side notifications during the loading process.
|
|
86
|
+
* Defaults to `true` if not defined
|
|
87
|
+
*/
|
|
88
|
+
enableNotifications?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface ResolvedDiagramLoadingOptions {
|
|
91
|
+
requestModelOptions: Args;
|
|
92
|
+
initializeParameters: InitializeParameters;
|
|
93
|
+
enableNotifications: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The central component responsible for initializing the diagram and loading the graphical model
|
|
97
|
+
* from the GLSP server.
|
|
98
|
+
* Invoking the {@link DiagramLoader.load} method is typically the first operation that is executed after
|
|
99
|
+
* a diagram DI container has been created.
|
|
100
|
+
*/
|
|
101
|
+
export declare class DiagramLoader {
|
|
102
|
+
protected options: IDiagramOptions;
|
|
103
|
+
protected actionDispatcher: GLSPActionDispatcher;
|
|
104
|
+
protected diagramStartups: IDiagramStartup[];
|
|
105
|
+
protected modelSource: GLSPModelSource;
|
|
106
|
+
protected postConstruct(): void;
|
|
107
|
+
load(options?: DiagramLoadingOptions): Promise<void>;
|
|
108
|
+
protected invokeStartupHook(hook: keyof Omit<IDiagramStartup, 'rank'>): Promise<void>;
|
|
109
|
+
protected requestModel(options: ResolvedDiagramLoadingOptions): Promise<void>;
|
|
110
|
+
protected initialize(options: ResolvedDiagramLoadingOptions): Promise<void>;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=diagram-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagram-loader.d.ts","sourceRoot":"","sources":["../../../src/base/model/diagram-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAGH,IAAI,EAEJ,UAAU,EACV,oBAAoB,E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