@eclipse-glsp/client 1.1.0-next.383e4e9.264 → 1.1.0-next.3d1b3e6.280
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/decoration.css +0 -7
- package/css/glsp-sprotty.css +7 -0
- package/css/key-shortcut.css +5 -1
- package/{lib/base/source-uri-aware.js → css/navigation.css} +11 -9
- package/css/status-overlay.css +75 -0
- package/css/toast.css +45 -0
- package/lib/base/action-dispatcher.d.ts +8 -2
- package/lib/base/action-dispatcher.d.ts.map +1 -1
- package/lib/base/action-dispatcher.js +15 -7
- package/lib/base/action-dispatcher.js.map +1 -1
- package/lib/base/action-dispatcher.spec.d.ts +2 -0
- package/lib/base/action-dispatcher.spec.d.ts.map +1 -0
- package/lib/base/action-dispatcher.spec.js +78 -0
- package/lib/base/action-dispatcher.spec.js.map +1 -0
- package/lib/base/action-handler-registry.d.ts +25 -0
- package/lib/base/action-handler-registry.d.ts.map +1 -0
- package/lib/{features/tools/base-glsp-creation-tool.js → base/action-handler-registry.js} +20 -25
- package/lib/base/action-handler-registry.js.map +1 -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 +20 -30
- package/lib/base/default.module.js.map +1 -1
- package/lib/base/editor-context-service.d.ts +17 -5
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +41 -14
- package/lib/base/editor-context-service.js.map +1 -1
- package/lib/base/feedback/feedback-action-dispatcher.d.ts.map +1 -1
- package/lib/base/feedback/feedback-action-dispatcher.js +5 -3
- package/lib/base/feedback/feedback-action-dispatcher.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 +116 -0
- package/lib/base/model/diagram-loader.d.ts.map +1 -0
- package/lib/base/model/diagram-loader.js +130 -0
- package/lib/base/model/diagram-loader.js.map +1 -0
- package/lib/base/model/glsp-model-source.d.ts +74 -0
- package/lib/base/model/glsp-model-source.d.ts.map +1 -0
- package/lib/base/model/glsp-model-source.js +178 -0
- package/lib/base/model/glsp-model-source.js.map +1 -0
- package/lib/base/{model-initialization-constraint.d.ts → model/model-initialization-constraint.d.ts} +24 -3
- package/lib/base/model/model-initialization-constraint.d.ts.map +1 -0
- package/lib/base/{model-initialization-constraint.js → model/model-initialization-constraint.js} +20 -10
- package/lib/base/model/model-initialization-constraint.js.map +1 -0
- package/lib/base/model/model-initialization-constraint.spec.d.ts +2 -0
- package/lib/base/model/model-initialization-constraint.spec.d.ts.map +1 -0
- package/lib/base/model/model-initialization-constraint.spec.js +97 -0
- package/lib/base/model/model-initialization-constraint.spec.js.map +1 -0
- package/lib/base/selection-service.spec.js +9 -8
- package/lib/base/selection-service.spec.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 +20 -26
- package/lib/default-modules.d.ts.map +1 -1
- package/lib/default-modules.js +31 -29
- 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 +290 -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/{src/base/source-uri-aware.ts → lib/features/accessibility/element-navigation/element-navigator.js} +4 -9
- 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 +22 -15
- 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 +4 -8
- 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/movement-key-tool.js +4 -8
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js.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/accessibility/view-key-tools/zoom-key-tool.js +9 -13
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.js.map +1 -1
- package/lib/features/bounds/bounds-module.d.ts.map +1 -1
- package/lib/features/bounds/bounds-module.js +2 -1
- package/lib/features/bounds/bounds-module.js.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/command-palette/server-command-palette-provider.d.ts.map +1 -1
- package/lib/features/command-palette/server-command-palette-provider.js +3 -2
- package/lib/features/command-palette/server-command-palette-provider.js.map +1 -1
- package/lib/features/context-menu/context-menu-module.d.ts.map +1 -1
- package/lib/features/context-menu/context-menu-module.js +8 -8
- package/lib/features/context-menu/context-menu-module.js.map +1 -1
- package/lib/features/context-menu/{selection-service-aware-context-menu-mouse-listener.d.ts → glsp-context-menu-mouse-listener.d.ts} +2 -4
- package/lib/features/context-menu/glsp-context-menu-mouse-listener.d.ts.map +1 -0
- package/lib/features/context-menu/{selection-service-aware-context-menu-mouse-listener.js → glsp-context-menu-mouse-listener.js} +7 -12
- package/lib/features/context-menu/glsp-context-menu-mouse-listener.js.map +1 -0
- package/lib/features/context-menu/server-context-menu-provider.d.ts +1 -1
- package/lib/features/context-menu/server-context-menu-provider.d.ts.map +1 -1
- package/lib/features/context-menu/server-context-menu-provider.js +3 -2
- package/lib/features/context-menu/server-context-menu-provider.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-context-menu.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-context-menu.js +1 -4
- package/lib/features/copy-paste/copy-paste-context-menu.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/label-edit/edit-label-validator.d.ts.map +1 -1
- package/lib/features/label-edit/edit-label-validator.js +3 -2
- package/lib/features/label-edit/edit-label-validator.js.map +1 -1
- package/lib/features/navigation/navigation-action-handler.d.ts.map +1 -1
- package/lib/features/navigation/navigation-action-handler.js +1 -4
- package/lib/features/navigation/navigation-action-handler.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/select/select-mouse-listener.d.ts +4 -2
- package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
- package/lib/features/select/select-mouse-listener.js +17 -58
- package/lib/features/select/select-mouse-listener.js.map +1 -1
- package/lib/features/source-model-watcher/source-model-changed-action-handler.d.ts.map +1 -1
- package/lib/features/source-model-watcher/source-model-changed-action-handler.js +1 -4
- package/lib/features/source-model-watcher/source-model-changed-action-handler.js.map +1 -1
- package/lib/features/status/status-module.d.ts +19 -0
- package/lib/features/status/status-module.d.ts.map +1 -0
- package/lib/features/status/status-module.js +28 -0
- package/lib/features/status/status-module.js.map +1 -0
- package/lib/features/status/status-overlay.d.ts +25 -0
- package/lib/features/status/status-overlay.d.ts.map +1 -0
- package/lib/features/status/status-overlay.js +124 -0
- package/lib/features/status/status-overlay.js.map +1 -0
- 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 +3 -6
- package/lib/glsp-sprotty/index.d.ts.map +1 -1
- package/lib/glsp-sprotty/index.js +4 -7
- package/lib/glsp-sprotty/index.js.map +1 -1
- package/lib/glsp-sprotty/types.d.ts +5 -82
- package/lib/glsp-sprotty/types.d.ts.map +1 -1
- package/lib/glsp-sprotty/types.js +2 -8
- package/lib/glsp-sprotty/types.js.map +1 -1
- package/lib/index.d.ts +17 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +17 -7
- package/lib/index.js.map +1 -1
- package/lib/standalone-modules.d.ts +11 -2
- package/lib/standalone-modules.d.ts.map +1 -1
- package/lib/standalone-modules.js +37 -1
- package/lib/standalone-modules.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/action-dispatcher.spec.ts +87 -0
- package/src/base/action-dispatcher.ts +24 -10
- package/src/{features/tools/base-glsp-creation-tool.ts → base/action-handler-registry.ts} +10 -20
- package/src/base/default.module.ts +21 -34
- package/src/base/editor-context-service.ts +49 -16
- package/src/base/feedback/feedback-action-dispatcher.ts +5 -3
- package/src/base/focus/focus-tracker.ts +16 -5
- package/src/base/model/diagram-loader.ts +215 -0
- package/src/base/model/glsp-model-source.ts +199 -0
- package/src/base/model/model-initialization-constraint.spec.ts +95 -0
- package/src/base/{model-initialization-constraint.ts → model/model-initialization-constraint.ts} +43 -10
- package/src/base/selection-service.spec.ts +10 -9
- package/src/base/tool-manager/tool-manager.ts +183 -0
- package/src/base/tool-manager/tool.ts +85 -0
- package/src/default-modules.ts +37 -28
- 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 +307 -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 +30 -16
- package/src/features/accessibility/search/search-palette.ts +4 -2
- package/src/features/accessibility/search/search-tool.ts +8 -9
- 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 +8 -10
- package/src/features/accessibility/view-key-tools/zoom-key-tool.ts +13 -15
- package/src/features/bounds/bounds-module.ts +2 -2
- package/src/features/command-palette/command-palette-tool.ts +2 -1
- package/src/features/command-palette/server-command-palette-provider.ts +3 -2
- package/src/features/context-menu/context-menu-module.ts +11 -12
- package/src/features/context-menu/{selection-service-aware-context-menu-mouse-listener.ts → glsp-context-menu-mouse-listener.ts} +1 -5
- package/src/features/context-menu/server-context-menu-provider.ts +3 -2
- package/src/features/copy-paste/copy-paste-context-menu.ts +3 -6
- 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/label-edit/edit-label-validator.ts +7 -6
- package/src/features/navigation/navigation-action-handler.ts +5 -8
- package/src/features/navigation/navigation-target-resolver.ts +10 -7
- package/src/features/select/select-mouse-listener.ts +27 -79
- package/src/features/source-model-watcher/source-model-changed-action-handler.ts +3 -6
- package/src/features/status/status-module.ts +26 -0
- package/src/features/status/status-overlay.ts +121 -0
- 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 +4 -7
- package/src/glsp-sprotty/types.ts +6 -8
- package/src/index.ts +17 -7
- package/src/standalone-modules.ts +40 -1
- package/src/views/base-view-module.ts +2 -2
- package/src/views/glsp-projection-view.tsx +18 -8
- package/lib/base/model-initialization-constraint.d.ts.map +0 -1
- package/lib/base/model-initialization-constraint.js.map +0 -1
- package/lib/base/source-uri-aware.d.ts +0 -5
- package/lib/base/source-uri-aware.d.ts.map +0 -1
- package/lib/base/source-uri-aware.js.map +0 -1
- 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/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map +0 -1
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.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.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/lib/model-source/glsp-diagram-server.d.ts +0 -21
- package/lib/model-source/glsp-diagram-server.d.ts.map +0 -1
- package/lib/model-source/glsp-diagram-server.js +0 -107
- package/lib/model-source/glsp-diagram-server.js.map +0 -1
- package/src/base/tool-manager/glsp-tool-manager.ts +0 -96
- package/src/model-source/glsp-diagram-server.ts +0 -125
|
@@ -35,7 +35,6 @@ import {
|
|
|
35
35
|
SCompartmentView,
|
|
36
36
|
SEdge,
|
|
37
37
|
SGraphView,
|
|
38
|
-
SIssueMarker,
|
|
39
38
|
SLabel,
|
|
40
39
|
SLabelView,
|
|
41
40
|
SNode,
|
|
@@ -49,6 +48,7 @@ import {
|
|
|
49
48
|
moveFeature,
|
|
50
49
|
selectFeature
|
|
51
50
|
} from '~glsp-sprotty';
|
|
51
|
+
import { GIssueMarker } from '../features/validation/issue-marker';
|
|
52
52
|
import { GLSPGraph } from '../lib/model';
|
|
53
53
|
import { GEdgeView } from './glsp-edge-view';
|
|
54
54
|
import { GIssueMarkerView } from './issue-marker-view';
|
|
@@ -86,7 +86,7 @@ export function configureDefaultModelElements(context: Pick<BindingContext, 'bin
|
|
|
86
86
|
|
|
87
87
|
// UI elements
|
|
88
88
|
configureModelElement(context, DefaultTypes.BUTTON_EXPAND, SButton, ExpandButtonView);
|
|
89
|
-
configureModelElement(context, DefaultTypes.ISSUE_MARKER,
|
|
89
|
+
configureModelElement(context, DefaultTypes.ISSUE_MARKER, GIssueMarker, GIssueMarkerView);
|
|
90
90
|
|
|
91
91
|
// shapes
|
|
92
92
|
configureModelElement(context, DefaultTypes.NODE_CIRCLE, CircularNode, CircularNodeView);
|
|
@@ -14,19 +14,20 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { injectable } from 'inversify';
|
|
18
|
-
import {
|
|
17
|
+
import { inject, injectable } from 'inversify';
|
|
18
|
+
import { VNode, VNodeStyle, h } from 'snabbdom';
|
|
19
19
|
import {
|
|
20
20
|
Bounds,
|
|
21
|
-
|
|
21
|
+
EdgeRouterRegistry,
|
|
22
22
|
IViewArgs,
|
|
23
23
|
ProjectedViewportView,
|
|
24
24
|
ProjectionParams,
|
|
25
25
|
RenderingContext,
|
|
26
|
-
|
|
27
|
-
setClass,
|
|
26
|
+
ViewProjection,
|
|
28
27
|
ViewportRootElement,
|
|
29
|
-
|
|
28
|
+
html,
|
|
29
|
+
setAttr,
|
|
30
|
+
setClass
|
|
30
31
|
} from '~glsp-sprotty';
|
|
31
32
|
|
|
32
33
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -37,6 +38,8 @@ const JSX = { createElement: html };
|
|
|
37
38
|
*/
|
|
38
39
|
@injectable()
|
|
39
40
|
export class GLSPProjectionView extends ProjectedViewportView {
|
|
41
|
+
@inject(EdgeRouterRegistry) edgeRouterRegistry: EdgeRouterRegistry;
|
|
42
|
+
|
|
40
43
|
override render(model: Readonly<ViewportRootElement>, context: RenderingContext, args?: IViewArgs): VNode {
|
|
41
44
|
const svgElem = this.renderSvg(model, context, args);
|
|
42
45
|
if (svgElem.data) {
|
|
@@ -48,14 +51,21 @@ export class GLSPProjectionView extends ProjectedViewportView {
|
|
|
48
51
|
{this.renderProjections(model, context, args)}
|
|
49
52
|
</div>
|
|
50
53
|
);
|
|
51
|
-
setAttr(rootNode, 'tabindex',
|
|
54
|
+
setAttr(rootNode, 'tabindex', 1);
|
|
55
|
+
setAttr(rootNode, 'aria-label', 'Diagram');
|
|
56
|
+
|
|
52
57
|
return rootNode;
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
protected override renderSvg(model: Readonly<ViewportRootElement>, context: RenderingContext, args?: IViewArgs): VNode {
|
|
61
|
+
const edgeRouting = this.edgeRouterRegistry.routeAllChildren(model);
|
|
56
62
|
const transform = `scale(${model.zoom}) translate(${-model.scroll.x},${-model.scroll.y})`;
|
|
57
63
|
const ns = 'http://www.w3.org/2000/svg';
|
|
58
|
-
const svg = h(
|
|
64
|
+
const svg = h(
|
|
65
|
+
'svg',
|
|
66
|
+
{ ns, style: { height: '100%' } },
|
|
67
|
+
h('g', { ns, attrs: { transform } }, context.renderChildren(model, { edgeRouting }))
|
|
68
|
+
);
|
|
59
69
|
return svg;
|
|
60
70
|
}
|
|
61
71
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-initialization-constraint.d.ts","sourceRoot":"","sources":["../../src/base/model-initialization-constraint.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAmE,MAAM,eAAe,CAAC;AAElH;;;;;;;;;;;;;;;;;GAiBG;AACH,8BACsB,6BAA6B;IAC/C,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAkB;IACtD,SAAS,CAAC,SAAS,UAAS;IAE5B,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,SAAS,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI;IAOlD,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAStC,QAAQ,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CACvD;AAED;;;GAGG;AACH,qBACa,oCAAqC,SAAQ,6BAA6B;IACnF,SAAS,CAAC,uBAAuB,UAAS;IAE1C,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAS3C,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAM3D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-initialization-constraint.js","sourceRoot":"","sources":["../../src/base/model-initialization-constraint.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AACvC,iDAAkH;AAElH;;;;;;;;;;;;;;;;;GAiBG;AAEI,IAAe,6BAA6B,2CAA5C,MAAe,6BAA6B;IAA5C;QACO,eAAU,GAAmB,IAAI,wBAAQ,EAAE,CAAC;QAC5C,cAAS,GAAG,KAAK,CAAC;IA2BhC,CAAC;IAzBG,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAES,YAAY,CAAC,WAAoB;QACvC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC;QAC7B,IAAI,WAAW,EAAE;YACb,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;SAC7B;IACL,CAAC;IAED,aAAa;QACT,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;IACnC,CAAC;IAED,gBAAgB,CAAC,MAAc;QAC3B,IAAI,IAAI,CAAC,WAAW,EAAE;YAClB,OAAO;SACV;QACD,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;YACjC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SAC3B;IACL,CAAC;CAGJ,CAAA;wCA7BqB,6BAA6B;IADlD,IAAA,sBAAU,GAAE;GACS,6BAA6B,CA6BlD;AAED;;;GAGG;AAEI,IAAM,oCAAoC,kDAA1C,MAAM,oCAAqC,SAAQ,6BAA6B;IAAhF;;QACO,4BAAuB,GAAG,KAAK,CAAC;IAiB9C,CAAC;IAfG,kBAAkB,CAAC,MAAc;QAC7B,IAAI,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YACpC,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;SACvC;aAAM,IAAI,IAAI,CAAC,uBAAuB,IAAI,MAAM,CAAC,IAAI,KAAK,4CAA4B,CAAC,IAAI,EAAE;YAC1F,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAES,qBAAqB,CAAC,MAAc;QAC1C,IAAI,8BAAc,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,iCAAiB,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YAC3D,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;SACzC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA;+CAlBY,oCAAoC;IADhD,IAAA,sBAAU,GAAE;GACA,oCAAoC,CAkBhD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source-uri-aware.d.ts","sourceRoot":"","sources":["../../src/base/source-uri-aware.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,cAAc,CAEhE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source-uri-aware.js","sourceRoot":"","sources":["../../src/base/source-uri-aware.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAyD;AAKzD,SAAgB,gBAAgB,CAAC,GAAQ;IACrC,OAAO,yBAAS,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAA,6BAAa,EAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AAChE,CAAC;AAFD,4CAEC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Tool, ToolManager } from '../../glsp-sprotty/index';
|
|
2
|
-
import { EditorContextService, EditorContextServiceProvider, IEditModeListener } from '../editor-context-service';
|
|
3
|
-
export declare class GLSPToolManager extends ToolManager implements IEditModeListener {
|
|
4
|
-
protected editorContext?: EditorContextService;
|
|
5
|
-
tools: Tool[];
|
|
6
|
-
defaultTools: Tool[];
|
|
7
|
-
contextServiceProvider: EditorContextServiceProvider;
|
|
8
|
-
protected initialize(): void;
|
|
9
|
-
registerDefaultTools(...tools: Tool[]): void;
|
|
10
|
-
registerTools(...tools: Tool[]): void;
|
|
11
|
-
enable(toolIds: string[]): void;
|
|
12
|
-
disableEditTools(): void;
|
|
13
|
-
editModeChanged(newValue: string, oldValue: string): void;
|
|
14
|
-
}
|
|
15
|
-
export interface GLSPTool extends Tool {
|
|
16
|
-
isEditTool: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare namespace GLSPTool {
|
|
19
|
-
function is(object: unknown): object is GLSPTool;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=glsp-tool-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-tool-manager.d.ts","sourceRoot":"","sources":["../../../src/base/tool-manager/glsp-tool-manager.ts"],"names":[],"mappings":"AAgBA,OAAO,EAA8B,IAAI,EAAE,WAAW,EAA+D,MAAM,eAAe,CAAC;AAC3I,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAElH,qBACa,eAAgB,SAAQ,WAAY,YAAW,iBAAiB;IACzE,SAAS,CAAC,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAEA,KAAK,EAAE,IAAI,EAAE,CAAC;IACP,YAAY,EAAE,IAAI,EAAE,CAAC;IAC9B,sBAAsB,EAAE,4BAA4B,CAAC;IAGlG,SAAS,CAAC,UAAU,IAAI,IAAI;IAUnB,oBAAoB,CAAC,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAM5C,aAAa,CAAC,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAMrC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAcxC,gBAAgB,IAAI,IAAI;IAKxB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAU5D;AAED,MAAM,WAAW,QAAS,SAAQ,IAAI;IAClC,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,yBAAiB,QAAQ,CAAC;IACtB,SAAgB,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,QAAQ,CAQtD;CACJ"}
|
|
@@ -1,113 +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
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GLSPTool = exports.GLSPToolManager = void 0;
|
|
13
|
-
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2020-2023 EclipseSource 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
|
-
const inversify_1 = require("inversify");
|
|
29
|
-
const _glsp_sprotty_1 = require("../../glsp-sprotty/index");
|
|
30
|
-
let GLSPToolManager = exports.GLSPToolManager = class GLSPToolManager extends _glsp_sprotty_1.ToolManager {
|
|
31
|
-
initialize() {
|
|
32
|
-
this.registerTools(...this.tools);
|
|
33
|
-
this.registerDefaultTools(...this.defaultTools);
|
|
34
|
-
this.enableDefaultTools();
|
|
35
|
-
this.contextServiceProvider().then(editorContext => {
|
|
36
|
-
editorContext.onEditModeChanged(change => this.editModeChanged(change.newValue, change.oldValue));
|
|
37
|
-
this.editorContext = editorContext;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
registerDefaultTools(...tools) {
|
|
41
|
-
for (const tool of tools) {
|
|
42
|
-
(0, _glsp_sprotty_1.distinctAdd)(this.defaultTools, tool);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
registerTools(...tools) {
|
|
46
|
-
for (const tool of tools) {
|
|
47
|
-
(0, _glsp_sprotty_1.distinctAdd)(this.tools, tool);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
enable(toolIds) {
|
|
51
|
-
this.disableActiveTools();
|
|
52
|
-
let tools = toolIds.map(id => this.tool(id));
|
|
53
|
-
if (this.editorContext && this.editorContext.isReadonly) {
|
|
54
|
-
tools = tools.filter(tool => tool && (!GLSPTool.is(tool) || tool.isEditTool === false));
|
|
55
|
-
}
|
|
56
|
-
tools.forEach(tool => {
|
|
57
|
-
if (tool !== undefined) {
|
|
58
|
-
tool.enable();
|
|
59
|
-
this.actives.push(tool);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
disableEditTools() {
|
|
64
|
-
this.disableActiveTools();
|
|
65
|
-
this.enable(this.defaultTools.filter(tool => !GLSPTool.is(tool) || tool.isEditTool === false).map(tool => tool.id));
|
|
66
|
-
}
|
|
67
|
-
editModeChanged(newValue, oldValue) {
|
|
68
|
-
if (oldValue === newValue) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (newValue === _glsp_sprotty_1.EditMode.READONLY) {
|
|
72
|
-
this.disableEditTools();
|
|
73
|
-
}
|
|
74
|
-
else if (newValue === _glsp_sprotty_1.EditMode.EDITABLE) {
|
|
75
|
-
this.enableDefaultTools();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, inversify_1.multiInject)(_glsp_sprotty_1.TYPES.ITool),
|
|
81
|
-
(0, inversify_1.optional)(),
|
|
82
|
-
__metadata("design:type", Array)
|
|
83
|
-
], GLSPToolManager.prototype, "tools", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, inversify_1.multiInject)(_glsp_sprotty_1.TYPES.IDefaultTool),
|
|
86
|
-
(0, inversify_1.optional)(),
|
|
87
|
-
__metadata("design:type", Array)
|
|
88
|
-
], GLSPToolManager.prototype, "defaultTools", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, inversify_1.inject)(_glsp_sprotty_1.TYPES.IEditorContextServiceProvider),
|
|
91
|
-
__metadata("design:type", Function)
|
|
92
|
-
], GLSPToolManager.prototype, "contextServiceProvider", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, inversify_1.postConstruct)(),
|
|
95
|
-
__metadata("design:type", Function),
|
|
96
|
-
__metadata("design:paramtypes", []),
|
|
97
|
-
__metadata("design:returntype", void 0)
|
|
98
|
-
], GLSPToolManager.prototype, "initialize", null);
|
|
99
|
-
exports.GLSPToolManager = GLSPToolManager = __decorate([
|
|
100
|
-
(0, inversify_1.injectable)()
|
|
101
|
-
], GLSPToolManager);
|
|
102
|
-
var GLSPTool;
|
|
103
|
-
(function (GLSPTool) {
|
|
104
|
-
function is(object) {
|
|
105
|
-
return (_glsp_sprotty_1.AnyObject.is(object) &&
|
|
106
|
-
(0, _glsp_sprotty_1.hasStringProp)(object, 'id') &&
|
|
107
|
-
(0, _glsp_sprotty_1.hasFunctionProp)(object, 'enable') &&
|
|
108
|
-
(0, _glsp_sprotty_1.hasFunctionProp)(object, 'disable') &&
|
|
109
|
-
(0, _glsp_sprotty_1.hasBooleanProp)(object, 'isEditTool'));
|
|
110
|
-
}
|
|
111
|
-
GLSPTool.is = is;
|
|
112
|
-
})(GLSPTool || (exports.GLSPTool = GLSPTool = {}));
|
|
113
|
-
//# sourceMappingURL=glsp-tool-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-tool-manager.js","sourceRoot":"","sources":["../../../src/base/tool-manager/glsp-tool-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAqF;AACrF,iDAA2I;AAIpI,IAAM,eAAe,6BAArB,MAAM,eAAgB,SAAQ,2BAAW;IAQlC,UAAU;QAChB,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,YAA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pB,IAAA,6BAAa,EAAC,MAAM,EAAE,IAAI,CAAC;YAC3B,IAAA,+BAAe,EAAC,MAAM,EAAE,QAAQ,CAAC;YACjC,IAAA,+BAAe,EAAC,MAAM,EAAE,SAAS,CAAC;YAClC,IAAA,8BAAc,EAAC,MAAM,EAAE,YAAY,CAAC,CACvC,CAAC;IACN,CAAC;IARe,WAAE,KAQjB,CAAA;AACL,CAAC,EAVgB,QAAQ,wBAAR,QAAQ,QAUxB"}
|
package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection-service-aware-context-menu-mouse-listener.d.ts","sourceRoot":"","sources":["../../../src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,aAAa,EAAE,aAAa,EAAS,MAAM,eAAe,CAAC;AAEtI,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,qBACa,6CAA8C,SAAQ,aAAa;IAG5E,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,2BAA2B,CAAC;IAIpE,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAG9D,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE7C;;OAEG;IACM,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE;IAI5F;;;;;;;;OAQG;IACH,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE;IActF,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;CAOtD"}
|
package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection-service-aware-context-menu-mouse-listener.js","sourceRoot":"","sources":["../../../src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAyD;AACzD,iDAAsI;AACtI,0FAAqF;AACrF,oEAAgE;AAGzD,IAAM,6CAA6C,2DAAnD,MAAM,6CAA8C,SAAQ,6BAAa;IAY5E;;OAEG;IACM,WAAW,CAAC,MAAqB,EAAE,KAAiB;QACzD,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;OAQG;IACO,eAAe,CAAC,MAAqB,EAAE,KAAiB;QAC9D,IAAI,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YAChD,OAAO,EAAE,CAAC;SACb;QAED,MAAM,aAAa,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;QAEjD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;aAC1G,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;aAClH,IAAI,CAAC,GAAW,EAAE,CAAC,mDAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/D,OAAO,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAES,gBAAgB,CAAC,KAAiB;QACxC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,YAAY,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QACpF,MAAM,gBAAgB,GAAG,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACvD,IAAI,gBAAgB,EAAE;YAClB,gBAAgB,CAAC,KAAK,EAAE,CAAC;SAC5B;IACL,CAAC;CACJ,CAAA;AA9CsB;IAFlB,IAAA,kBAAM,EAAC,qBAAK,CAAC,2BAA2B,CAAC;IACzC,IAAA,oBAAQ,GAAE;;yFACyD;AAIjD;IAFlB,IAAA,kBAAM,EAAC,qBAAK,CAAC,4BAA4B,CAAC;IAC1C,IAAA,oBAAQ,GAAE;8BACuB,2CAA2B;mFAAC;AAGpD;IADT,IAAA,kBAAM,EAAC,oCAAgB,CAAC;8BACG,oCAAgB;uFAAC;wDAVpC,6CAA6C;IADzD,IAAA,sBAAU,GAAE;GACA,6CAA6C,CAiDzD"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Action, IActionHandler } from '../../glsp-sprotty/index';
|
|
2
|
-
import { BaseGLSPTool } from './base-glsp-tool';
|
|
3
|
-
export declare abstract class BaseGLSPCreationTool<T extends Action> extends BaseGLSPTool implements IActionHandler {
|
|
4
|
-
protected abstract isTriggerAction: (obj: any) => obj is T;
|
|
5
|
-
protected triggerAction: T;
|
|
6
|
-
handle(action: Action): Action | void;
|
|
7
|
-
enable(): void;
|
|
8
|
-
protected abstract doEnable(): void;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=base-glsp-creation-tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-glsp-creation-tool.d.ts","sourceRoot":"","sources":["../../../src/features/tools/base-glsp-creation-tool.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAqB,cAAc,EAA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AAW,CAAC;8BAAoB,sBAAW;6CAAC;AACH;IAAhD,IAAA,kBAAM,EAAC,6CAAoB,CAAC;8BAAmC,6CAAoB;mDAAC;uBALnE,YAAY;IADjC,IAAA,sBAAU,GAAE;GACS,YAAY,CAgDjC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Action, ActionHandlerRegistry, ActionMessage, ComputedBoundsAction, DiagramServerProxy, ExportSvgAction, GLSPClient, ICommand, ServerMessageAction, SetEditModeAction } from '../glsp-sprotty/index';
|
|
2
|
-
import { SourceUriAware } from '../base/source-uri-aware';
|
|
3
|
-
export declare class GLSPDiagramServer extends DiagramServerProxy implements SourceUriAware {
|
|
4
|
-
protected _sourceUri: string;
|
|
5
|
-
protected _glspClient?: GLSPClient;
|
|
6
|
-
protected ready: boolean;
|
|
7
|
-
connect(client: GLSPClient): Promise<GLSPClient>;
|
|
8
|
-
get glspClient(): GLSPClient | undefined;
|
|
9
|
-
protected sendMessage(message: ActionMessage): void;
|
|
10
|
-
initialize(registry: ActionHandlerRegistry): void;
|
|
11
|
-
handle(action: Action): void | ICommand | Action;
|
|
12
|
-
handleLocally(action: Action): boolean;
|
|
13
|
-
protected handleExportSvgAction(action: ExportSvgAction): boolean;
|
|
14
|
-
protected handleServerMessageAction(action: ServerMessageAction): boolean;
|
|
15
|
-
protected handleComputedBounds(_action: ComputedBoundsAction): boolean;
|
|
16
|
-
protected handleSetEditModeAction(action: SetEditModeAction): boolean;
|
|
17
|
-
get sourceURI(): string;
|
|
18
|
-
}
|
|
19
|
-
export declare function isReceivedFromServer(action: Action): boolean;
|
|
20
|
-
export declare function registerDefaultGLSPServerActions(registry: ActionHandlerRegistry, diagramServer: DiagramServerProxy): void;
|
|
21
|
-
//# sourceMappingURL=glsp-diagram-server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-diagram-server.d.ts","sourceRoot":"","sources":["../../src/model-source/glsp-diagram-server.ts"],"names":[],"mappings":"AAg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|
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
|
-
exports.registerDefaultGLSPServerActions = exports.isReceivedFromServer = exports.GLSPDiagramServer = void 0;
|
|
10
|
-
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
12
|
-
*
|
|
13
|
-
* This program and the accompanying materials are made available under the
|
|
14
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
15
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
16
|
-
*
|
|
17
|
-
* This Source Code may also be made available under the following Secondary
|
|
18
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
19
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
20
|
-
* with the GNU Classpath Exception which is available at
|
|
21
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
22
|
-
*
|
|
23
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
24
|
-
********************************************************************************/
|
|
25
|
-
const inversify_1 = require("inversify");
|
|
26
|
-
const _glsp_sprotty_1 = require("../glsp-sprotty/index");
|
|
27
|
-
const receivedFromServerProperty = '__receivedFromServer';
|
|
28
|
-
let GLSPDiagramServer = exports.GLSPDiagramServer = class GLSPDiagramServer extends _glsp_sprotty_1.DiagramServerProxy {
|
|
29
|
-
constructor() {
|
|
30
|
-
super(...arguments);
|
|
31
|
-
this.ready = false;
|
|
32
|
-
}
|
|
33
|
-
async connect(client) {
|
|
34
|
-
await client.start();
|
|
35
|
-
client.onActionMessage(message => this.messageReceived(message));
|
|
36
|
-
this._glspClient = client;
|
|
37
|
-
return this._glspClient;
|
|
38
|
-
}
|
|
39
|
-
get glspClient() {
|
|
40
|
-
return this._glspClient;
|
|
41
|
-
}
|
|
42
|
-
sendMessage(message) {
|
|
43
|
-
if (this.glspClient) {
|
|
44
|
-
this.glspClient.sendActionMessage(message);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
throw new Error('GLSPClient is not connected');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
initialize(registry) {
|
|
51
|
-
registerDefaultGLSPServerActions(registry, this);
|
|
52
|
-
if (!this.clientId) {
|
|
53
|
-
this.clientId = this.viewerOptions.baseDiv;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
handle(action) {
|
|
57
|
-
if (_glsp_sprotty_1.RequestModelAction.is(action) && action.options) {
|
|
58
|
-
this._sourceUri = action.options.sourceUri;
|
|
59
|
-
}
|
|
60
|
-
return super.handle(action);
|
|
61
|
-
}
|
|
62
|
-
handleLocally(action) {
|
|
63
|
-
if (_glsp_sprotty_1.ServerMessageAction.is(action)) {
|
|
64
|
-
return this.handleServerMessageAction(action);
|
|
65
|
-
}
|
|
66
|
-
if (_glsp_sprotty_1.SetEditModeAction.is(action)) {
|
|
67
|
-
return this.handleSetEditModeAction(action);
|
|
68
|
-
}
|
|
69
|
-
return super.handleLocally(action);
|
|
70
|
-
}
|
|
71
|
-
handleExportSvgAction(action) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
handleServerMessageAction(action) {
|
|
75
|
-
this.logger.log('GLSPDiagramServer', `[${action.severity}] -${action.message}`);
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
handleComputedBounds(_action) {
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
handleSetEditModeAction(action) {
|
|
82
|
-
return !isReceivedFromServer(action);
|
|
83
|
-
}
|
|
84
|
-
get sourceURI() {
|
|
85
|
-
return this._sourceUri;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
exports.GLSPDiagramServer = GLSPDiagramServer = __decorate([
|
|
89
|
-
(0, inversify_1.injectable)()
|
|
90
|
-
], GLSPDiagramServer);
|
|
91
|
-
function isReceivedFromServer(action) {
|
|
92
|
-
return action[receivedFromServerProperty] === true;
|
|
93
|
-
}
|
|
94
|
-
exports.isReceivedFromServer = isReceivedFromServer;
|
|
95
|
-
function registerDefaultGLSPServerActions(registry, diagramServer) {
|
|
96
|
-
registry.register(_glsp_sprotty_1.ServerMessageAction.KIND, diagramServer);
|
|
97
|
-
registry.register(_glsp_sprotty_1.ServerStatusAction.KIND, diagramServer);
|
|
98
|
-
registry.register(_glsp_sprotty_1.ExportSvgAction.KIND, diagramServer);
|
|
99
|
-
registry.register(_glsp_sprotty_1.StartProgressAction.KIND, diagramServer);
|
|
100
|
-
registry.register(_glsp_sprotty_1.UpdateProgressAction.KIND, diagramServer);
|
|
101
|
-
registry.register(_glsp_sprotty_1.EndProgressAction.KIND, diagramServer);
|
|
102
|
-
// Register an empty handler for SwitchEditMode, to avoid runtime exceptions.
|
|
103
|
-
// We don't support SwitchEditMode, but Sprotty still sends those actions, so ignore them.
|
|
104
|
-
registry.register(_glsp_sprotty_1.SwitchEditModeCommand.KIND, { handle: action => undefined });
|
|
105
|
-
}
|
|
106
|
-
exports.registerDefaultGLSPServerActions = registerDefaultGLSPServerActions;
|
|
107
|
-
//# sourceMappingURL=glsp-diagram-server.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-diagram-server.js","sourceRoot":"","sources":["../../src/model-source/glsp-diagram-server.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AACvC,iDAiBuB;AAGvB,MAAM,0BAA0B,GAAG,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Aa,CAAC,CAAC;IAC3D,QAAQ,CAAC,QAAQ,CAAC,oCAAoB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAC5D,QAAQ,CAAC,QAAQ,CAAC,iCAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAEzD,6EAA6E;IAC7E,0FAA0F;IAC1F,QAAQ,CAAC,QAAQ,CAAC,qCAAqB,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;AACnF,CAAC;AAXD,4EAWC"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-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 { inject, injectable, multiInject, optional, postConstruct } from 'inversify';
|
|
17
|
-
import { AnyObject, EditMode, TYPES, Tool, ToolManager, distinctAdd, hasBooleanProp, hasFunctionProp, hasStringProp } from '~glsp-sprotty';
|
|
18
|
-
import { EditorContextService, EditorContextServiceProvider, IEditModeListener } from '../editor-context-service';
|
|
19
|
-
|
|
20
|
-
@injectable()
|
|
21
|
-
export class GLSPToolManager extends ToolManager implements IEditModeListener {
|
|
22
|
-
protected editorContext?: EditorContextService;
|
|
23
|
-
|
|
24
|
-
@multiInject(TYPES.ITool) @optional() override tools: Tool[];
|
|
25
|
-
@multiInject(TYPES.IDefaultTool) @optional() override defaultTools: Tool[];
|
|
26
|
-
@inject(TYPES.IEditorContextServiceProvider) contextServiceProvider: EditorContextServiceProvider;
|
|
27
|
-
|
|
28
|
-
@postConstruct()
|
|
29
|
-
protected initialize(): void {
|
|
30
|
-
this.registerTools(...this.tools);
|
|
31
|
-
this.registerDefaultTools(...this.defaultTools);
|
|
32
|
-
this.enableDefaultTools();
|
|
33
|
-
this.contextServiceProvider().then(editorContext => {
|
|
34
|
-
editorContext.onEditModeChanged(change => this.editModeChanged(change.newValue, change.oldValue));
|
|
35
|
-
this.editorContext = editorContext;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
override registerDefaultTools(...tools: Tool[]): void {
|
|
40
|
-
for (const tool of tools) {
|
|
41
|
-
distinctAdd(this.defaultTools, tool);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
override registerTools(...tools: Tool[]): void {
|
|
46
|
-
for (const tool of tools) {
|
|
47
|
-
distinctAdd(this.tools, tool);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
override enable(toolIds: string[]): void {
|
|
52
|
-
this.disableActiveTools();
|
|
53
|
-
let tools = toolIds.map(id => this.tool(id));
|
|
54
|
-
if (this.editorContext && this.editorContext.isReadonly) {
|
|
55
|
-
tools = tools.filter(tool => tool && (!GLSPTool.is(tool) || tool.isEditTool === false));
|
|
56
|
-
}
|
|
57
|
-
tools.forEach(tool => {
|
|
58
|
-
if (tool !== undefined) {
|
|
59
|
-
tool.enable();
|
|
60
|
-
this.actives.push(tool);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
disableEditTools(): void {
|
|
66
|
-
this.disableActiveTools();
|
|
67
|
-
this.enable(this.defaultTools.filter(tool => !GLSPTool.is(tool) || tool.isEditTool === false).map(tool => tool.id));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
editModeChanged(newValue: string, oldValue: string): void {
|
|
71
|
-
if (oldValue === newValue) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (newValue === EditMode.READONLY) {
|
|
75
|
-
this.disableEditTools();
|
|
76
|
-
} else if (newValue === EditMode.EDITABLE) {
|
|
77
|
-
this.enableDefaultTools();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface GLSPTool extends Tool {
|
|
83
|
-
isEditTool: boolean;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export namespace GLSPTool {
|
|
87
|
-
export function is(object: unknown): object is GLSPTool {
|
|
88
|
-
return (
|
|
89
|
-
AnyObject.is(object) &&
|
|
90
|
-
hasStringProp(object, 'id') &&
|
|
91
|
-
hasFunctionProp(object, 'enable') &&
|
|
92
|
-
hasFunctionProp(object, 'disable') &&
|
|
93
|
-
hasBooleanProp(object, 'isEditTool')
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
}
|