@scion/workbench 18.0.0-beta.1 → 18.0.0-beta.10
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/_index.scss +7 -5
- package/design/_workbench-global-styles.scss +18 -0
- package/design/_workbench-icon-font.scss +1 -1
- package/design/_workbench-popup-global-styles.scss +1 -1
- package/design/{_workbench-view-drag-image-global-styles.scss → _workbench-view-global-styles.scss} +1 -2
- package/esm2022/lib/common/class-list.mjs +67 -29
- package/esm2022/lib/common/math.util.mjs +16 -0
- package/esm2022/lib/common/objects.util.mjs +7 -1
- package/esm2022/lib/common/operators.mjs +1 -12
- package/esm2022/lib/common/uid.util.mjs +22 -0
- package/esm2022/lib/content-projection/content-as-overlay.component.mjs +85 -28
- package/esm2022/lib/content-projection/workbench-element-references.mjs +32 -0
- package/esm2022/lib/dialog/dialog-header/dialog-header.component.mjs +3 -8
- package/esm2022/lib/dialog/movable.directive.mjs +3 -3
- package/esm2022/lib/dialog/resizable.directive.mjs +3 -3
- package/esm2022/lib/dialog/workbench-dialog.component.mjs +25 -23
- package/esm2022/lib/dialog/workbench-dialog.mjs +61 -1
- package/esm2022/lib/dialog//311/265workbench-dialog.mjs +98 -60
- package/esm2022/lib/dialog//311/265workbench-dialog.service.mjs +26 -23
- package/esm2022/lib/executor/latest-task-executor.mjs +55 -0
- package/esm2022/lib/executor/single-task-executor.mjs +9 -19
- package/esm2022/lib/filter-field/filter-field.component.mjs +5 -5
- package/esm2022/lib/layout/grid-element/grid-element.component.mjs +8 -18
- package/esm2022/lib/layout/main-area-layout/main-area-layout.component.mjs +18 -21
- package/esm2022/lib/layout/migration/model/workbench-layout-migration-v5.model.mjs +11 -0
- package/esm2022/lib/layout/migration/model/workbench-layout-migration-v6.model.mjs +11 -0
- package/esm2022/lib/layout/migration/workbench-layout-migration-v3.service.mjs +4 -4
- package/esm2022/lib/layout/migration/workbench-layout-migration-v5.service.mjs +67 -0
- package/esm2022/lib/layout/migration/workbench-layout-migration-v6.service.mjs +59 -0
- package/esm2022/lib/layout/stringifier.mjs +70 -0
- package/esm2022/lib/layout/workbench-layout.component.mjs +18 -22
- package/esm2022/lib/layout/workbench-layout.mjs +1 -1
- package/esm2022/lib/layout/workbench-layout.model.mjs +1 -1
- package/esm2022/lib/layout/workbench-layout.service.mjs +26 -24
- package/esm2022/lib/layout/workbench-layouts.util.mjs +1 -9
- package/esm2022/lib/layout/workench-layout-serializer.service.mjs +19 -27
- package/esm2022/lib/layout//311/265workbench-layout.factory.mjs +3 -2
- package/esm2022/lib/layout//311/265workbench-layout.mjs +73 -62
- package/esm2022/lib/logging/logging-support.mjs +7 -13
- package/esm2022/lib/logging//311/265logger.mjs +10 -10
- package/esm2022/lib/message-box/message-box-footer/message-box-footer.component.mjs +7 -6
- package/esm2022/lib/message-box/message-box-header/message-box-header.component.mjs +3 -3
- package/esm2022/lib/message-box/workbench-message-box.component.mjs +2 -2
- package/esm2022/lib/message-box//311/265workbench-message-box.service.mjs +3 -2
- package/esm2022/lib/microfrontend-platform/common/microfrontend.util.mjs +22 -6
- package/esm2022/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.mjs +28 -21
- package/esm2022/lib/microfrontend-platform/initialization/ng-zone-observable-decorator.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/initialization/workbench-host-manifest-interceptor.service.mjs +11 -1
- package/esm2022/lib/microfrontend-platform/manifest-object-cache.service.mjs +63 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor.mjs +5 -4
- package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.mjs +6 -10
- package/esm2022/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.mjs +18 -9
- package/esm2022/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.mjs +7 -6
- package/esm2022/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.mjs +15 -13
- package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor.mjs +3 -2
- package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.mjs +6 -11
- package/esm2022/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-capability-validator.interceptor.mjs +39 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-installer.service.mjs +120 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-intent-handler.interceptor.mjs +55 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-perspective/workbench-perspective-data.mjs +19 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-capability-validator.interceptor.mjs +4 -3
- package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.mjs +11 -12
- package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.mjs +12 -28
- package/esm2022/lib/microfrontend-platform/microfrontend-splash/microfrontend-splash.component.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.mjs +11 -27
- package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.mjs +91 -71
- package/esm2022/lib/microfrontend-platform/public_api.mjs +2 -1
- package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-validator.interceptor.mjs +5 -4
- package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-intent-handler.interceptor.mjs +18 -16
- package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-routes.mjs +30 -8
- package/esm2022/lib/microfrontend-platform/stable-capability-id-assigner.interceptor.mjs +32 -0
- package/esm2022/lib/microfrontend-platform/workbench-microfrontend-support.mjs +26 -8
- package/esm2022/lib/notification/notification-list.component.mjs +4 -8
- package/esm2022/lib/notification/notification.component.mjs +4 -5
- package/esm2022/lib/notification/notification.service.mjs +5 -4
- package/esm2022/lib/page-not-found/page-not-found.component.mjs +5 -7
- package/esm2022/lib/part/part-action-bar/part-action-bar.component.mjs +11 -19
- package/esm2022/lib/part/part-action-bar/part-action.directive.mjs +4 -4
- package/esm2022/lib/part/part-bar/part-bar.component.mjs +333 -264
- package/esm2022/lib/part/part-portal.pipe.mjs +8 -8
- package/esm2022/lib/part/part.component.mjs +33 -42
- package/esm2022/lib/part/view-context-menu/text.component.mjs +16 -12
- package/esm2022/lib/part/view-context-menu/view-menu.component.mjs +4 -6
- package/esm2022/lib/part/view-context-menu/view-menu.directive.mjs +2 -2
- package/esm2022/lib/part/view-context-menu/view-menu.service.mjs +48 -49
- package/esm2022/lib/part/view-list/view-list.component.mjs +41 -48
- package/esm2022/lib/part/view-list-button/view-list-button.component.mjs +22 -26
- package/esm2022/lib/part/view-list-item/view-list-item.component.mjs +15 -17
- package/esm2022/lib/part/view-tab/view-tab.component.mjs +99 -110
- package/esm2022/lib/part/view-tab-content/view-tab-content.component.mjs +3 -4
- package/esm2022/lib/part/view-tab-drag-image/view-tab-drag-image.component.mjs +16 -17
- package/esm2022/lib/part/workbench-part-action.registry.mjs +18 -42
- package/esm2022/lib/part/workbench-part.model.mjs +10 -1
- package/esm2022/lib/part/workbench-part.registry.mjs +11 -45
- package/esm2022/lib/part//311/265workbench-part.model.mjs +71 -55
- package/esm2022/lib/perspective/workbench-grid-merger.service.mjs +3 -3
- package/esm2022/lib/perspective/workbench-perspective.model.mjs +1 -1
- package/esm2022/lib/perspective/workbench-perspective.registry.mjs +11 -43
- package/esm2022/lib/perspective/workbench-perspective.service.mjs +71 -62
- package/esm2022/lib/perspective/workench-perspective-serializer.service.mjs +2 -2
- package/esm2022/lib/perspective//311/265workbench-perspective.model.mjs +62 -47
- package/esm2022/lib/popup/popup.component.mjs +3 -3
- package/esm2022/lib/popup/popup.config.mjs +27 -25
- package/esm2022/lib/popup/popup.service.mjs +169 -174
- package/esm2022/lib/portal/wb-component-portal.mjs +18 -17
- package/esm2022/lib/public_api.mjs +1 -1
- package/esm2022/lib/registry/workbench-object-registry.mjs +38 -17
- package/esm2022/lib/routing/public_api.mjs +2 -2
- package/esm2022/lib/routing/routing.model.mjs +1 -1
- package/esm2022/lib/routing/routing.util.mjs +215 -0
- package/esm2022/lib/routing/workbench-auxiliary-route-installer.service.mjs +110 -0
- package/esm2022/lib/routing/workbench-dialog-differ.mjs +3 -3
- package/esm2022/lib/routing/workbench-layout-differ.mjs +3 -10
- package/esm2022/lib/routing/workbench-message-box-differ.mjs +3 -3
- package/esm2022/lib/routing/workbench-navigational-states.mjs +2 -2
- package/esm2022/lib/routing/workbench-popup-differ.mjs +3 -3
- package/esm2022/lib/routing/workbench-route-guards.mjs +57 -0
- package/esm2022/lib/routing/workbench-url-observer.service.mjs +140 -148
- package/esm2022/lib/routing/workbench-view-outlet-differ.mjs +58 -0
- package/esm2022/lib/routing//311/265workbench-router.service.mjs +119 -74
- package/esm2022/lib/startup/splash/splash.component.mjs +3 -3
- package/esm2022/lib/startup/workbench-launcher.service.mjs +22 -10
- package/esm2022/lib/testing/workbench.provider.mjs +2 -2
- package/esm2022/lib/theme/workbench-theme-switcher.service.mjs +15 -19
- package/esm2022/lib/view/public_api.mjs +1 -2
- package/esm2022/lib/view/view-move-handler.service.mjs +71 -56
- package/esm2022/lib/view/view-portal.pipe.mjs +7 -7
- package/esm2022/lib/view/view.component.mjs +54 -42
- package/esm2022/lib/view/workbench-view.model.mjs +1 -1
- package/esm2022/lib/view/workbench-view.registry.mjs +11 -45
- package/esm2022/lib/view//311/265workbench-view.model.mjs +183 -153
- package/esm2022/lib/view-dnd/grid-drop-targets.util.mjs +2 -2
- package/esm2022/lib/view-dnd/view-drag.service.mjs +87 -71
- package/esm2022/lib/view-dnd/view-drop-placeholder-renderer.service.mjs +6 -6
- package/esm2022/lib/view-dnd/view-drop-zone.directive.mjs +6 -6
- package/esm2022/lib/view-dnd/view-tab-drag-image-renderer.service.mjs +43 -56
- package/esm2022/lib/workbench-config.mjs +2 -2
- package/esm2022/lib/workbench-id.mjs +3 -3
- package/esm2022/lib/workbench.component.mjs +66 -54
- package/esm2022/lib/workbench.constants.mjs +1 -5
- package/esm2022/lib/workbench.model.mjs +1 -1
- package/esm2022/lib/workbench.provider.mjs +3 -9
- package/esm2022/lib/workbench.service.mjs +1 -1
- package/esm2022/lib//311/265workbench.service.mjs +38 -42
- package/fesm2022/scion-workbench.mjs +4054 -3276
- package/fesm2022/scion-workbench.mjs.map +1 -1
- package/lib/common/class-list.d.ts +35 -22
- package/lib/common/math.util.d.ts +7 -0
- package/lib/common/objects.util.d.ts +4 -0
- package/lib/common/operators.d.ts +1 -6
- package/lib/common/uid.util.d.ts +9 -0
- package/lib/content-projection/content-as-overlay.component.d.ts +39 -22
- package/lib/content-projection/workbench-element-references.d.ts +13 -0
- package/lib/dialog/workbench-dialog.component.d.ts +3 -2
- package/lib/dialog/workbench-dialog.d.ts +57 -13
- package/lib/dialog//311/265workbench-dialog.d.ts +38 -24
- package/lib/dialog//311/265workbench-dialog.service.d.ts +10 -11
- package/lib/executor/latest-task-executor.d.ts +26 -0
- package/lib/executor/single-task-executor.d.ts +5 -8
- package/lib/filter-field/filter-field.component.d.ts +1 -1
- package/lib/layout/grid-element/grid-element.component.d.ts +1 -8
- package/lib/layout/main-area-layout/main-area-layout.component.d.ts +0 -4
- package/lib/layout/migration/model/workbench-layout-migration-v5.model.d.ts +36 -0
- package/lib/layout/migration/model/workbench-layout-migration-v6.model.d.ts +35 -0
- package/lib/layout/migration/workbench-layout-migration-v5.service.d.ts +12 -0
- package/lib/layout/migration/workbench-layout-migration-v6.service.d.ts +12 -0
- package/lib/layout/stringifier.d.ts +26 -0
- package/lib/layout/workbench-layout.component.d.ts +4 -5
- package/lib/layout/workbench-layout.d.ts +9 -6
- package/lib/layout/workbench-layout.model.d.ts +4 -3
- package/lib/layout/workbench-layout.service.d.ts +14 -16
- package/lib/layout/workbench-layouts.util.d.ts +0 -6
- package/lib/layout/workench-layout-serializer.service.d.ts +13 -16
- package/lib/layout//311/265workbench-layout.d.ts +18 -19
- package/lib/layout//311/265workbench-layout.factory.d.ts +3 -2
- package/lib/logging//311/265logger.d.ts +2 -3
- package/lib/microfrontend-platform/common/microfrontend.util.d.ts +5 -1
- package/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.d.ts +7 -3
- package/lib/microfrontend-platform/manifest-object-cache.service.d.ts +33 -0
- package/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.d.ts +3 -6
- package/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.d.ts +2 -1
- package/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.d.ts +1 -1
- package/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.d.ts +2 -1
- package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-capability-validator.interceptor.d.ts +10 -0
- package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-installer.service.d.ts +24 -0
- package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-intent-handler.interceptor.d.ts +20 -0
- package/lib/microfrontend-platform/microfrontend-perspective/workbench-perspective-data.d.ts +9 -0
- package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.d.ts +4 -8
- package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.d.ts +0 -4
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.d.ts +5 -12
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.d.ts +23 -33
- package/lib/microfrontend-platform/public_api.d.ts +1 -0
- package/lib/microfrontend-platform/routing/microfrontend-view-capability-validator.interceptor.d.ts +1 -1
- package/lib/microfrontend-platform/routing/microfrontend-view-intent-handler.interceptor.d.ts +3 -7
- package/lib/microfrontend-platform/routing/microfrontend-view-routes.d.ts +9 -2
- package/lib/microfrontend-platform/stable-capability-id-assigner.interceptor.d.ts +11 -0
- package/lib/notification/notification-list.component.d.ts +0 -2
- package/lib/page-not-found/page-not-found.component.d.ts +1 -0
- package/lib/part/part-action-bar/part-action-bar.component.d.ts +3 -4
- package/lib/part/part-action-bar/part-action.directive.d.ts +2 -2
- package/lib/part/part-bar/part-bar.component.d.ts +73 -63
- package/lib/part/part-portal.pipe.d.ts +3 -5
- package/lib/part/part.component.d.ts +9 -12
- package/lib/part/view-context-menu/text.component.d.ts +3 -4
- package/lib/part/view-context-menu/view-menu.directive.d.ts +1 -1
- package/lib/part/view-context-menu/view-menu.service.d.ts +13 -17
- package/lib/part/view-list/view-list.component.d.ts +8 -21
- package/lib/part/view-list-button/view-list-button.component.d.ts +8 -11
- package/lib/part/view-list-item/view-list-item.component.d.ts +3 -7
- package/lib/part/view-tab/view-tab.component.d.ts +19 -29
- package/lib/part/view-tab-drag-image/view-tab-drag-image.component.d.ts +4 -4
- package/lib/part/workbench-part-action.registry.d.ts +3 -23
- package/lib/part/workbench-part.model.d.ts +8 -27
- package/lib/part/workbench-part.registry.d.ts +3 -26
- package/lib/part//311/265workbench-part.model.d.ts +23 -17
- package/lib/perspective/workbench-perspective.model.d.ts +18 -25
- package/lib/perspective/workbench-perspective.registry.d.ts +3 -26
- package/lib/perspective/workbench-perspective.service.d.ts +16 -14
- package/lib/perspective/workench-perspective-serializer.service.d.ts +1 -1
- package/lib/perspective//311/265workbench-perspective.model.d.ts +30 -21
- package/lib/popup/popup.config.d.ts +11 -10
- package/lib/popup/popup.service.d.ts +15 -28
- package/lib/portal/wb-component-portal.d.ts +21 -5
- package/lib/public_api.d.ts +1 -1
- package/lib/registry/workbench-object-registry.d.ts +10 -6
- package/lib/routing/public_api.d.ts +2 -2
- package/lib/routing/routing.model.d.ts +25 -13
- package/lib/routing/{router.util.d.ts → routing.util.d.ts} +28 -1
- package/lib/routing/{workbench-auxiliary-routes-registrator.service.d.ts → workbench-auxiliary-route-installer.service.d.ts} +10 -3
- package/lib/routing/workbench-layout-differ.d.ts +1 -2
- package/lib/routing/workbench-navigational-states.d.ts +8 -4
- package/lib/{view/workbench-view-route-guards.d.ts → routing/workbench-route-guards.d.ts} +8 -2
- package/lib/routing/workbench-url-observer.service.d.ts +31 -55
- package/lib/routing/workbench-view-outlet-differ.d.ts +32 -0
- package/lib/routing//311/265workbench-router.service.d.ts +22 -18
- package/lib/startup/workbench-launcher.service.d.ts +4 -5
- package/lib/testing/workbench.provider.d.ts +3 -1
- package/lib/theme/workbench-theme-switcher.service.d.ts +4 -6
- package/lib/view/public_api.d.ts +0 -1
- package/lib/view/view-move-handler.service.d.ts +16 -14
- package/lib/view/view-portal.pipe.d.ts +1 -3
- package/lib/view/view.component.d.ts +21 -12
- package/lib/view/workbench-view.model.d.ts +88 -36
- package/lib/view/workbench-view.registry.d.ts +3 -27
- package/lib/view//311/265workbench-view.model.d.ts +62 -71
- package/lib/view-dnd/view-drag.service.d.ts +79 -49
- package/lib/view-dnd/view-drop-placeholder-renderer.service.d.ts +1 -1
- package/lib/view-dnd/view-tab-drag-image-renderer.service.d.ts +12 -36
- package/lib/workbench-config.d.ts +19 -7
- package/lib/workbench.component.d.ts +16 -30
- package/lib/workbench.constants.d.ts +0 -5
- package/lib/workbench.model.d.ts +31 -3
- package/lib/workbench.service.d.ts +58 -56
- package/lib//311/265workbench.service.d.ts +18 -31
- package/package.json +5 -5
- package/esm2022/lib/common/filter-by-predicate.pipe.mjs +0 -27
- package/esm2022/lib/common/filter-by-text.pipe.mjs +0 -39
- package/esm2022/lib/common/uuid.util.mjs +0 -17
- package/esm2022/lib/content-projection/content-projection.directive.mjs +0 -101
- package/esm2022/lib/content-projection/view-container.reference.mjs +0 -68
- package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-id-assigner.interceptor.mjs +0 -41
- package/esm2022/lib/page-not-found/format-url.pipe.mjs +0 -26
- package/esm2022/lib/part/part-action-bar/part-action-filter.pipe.mjs +0 -26
- package/esm2022/lib/routing/router.util.mjs +0 -126
- package/esm2022/lib/routing/workbench-auxiliary-routes-registrator.service.mjs +0 -94
- package/esm2022/lib/view/workbench-view-route-guards.mjs +0 -47
- package/lib/common/filter-by-predicate.pipe.d.ts +0 -10
- package/lib/common/filter-by-text.pipe.d.ts +0 -12
- package/lib/common/uuid.util.d.ts +0 -8
- package/lib/content-projection/content-projection.directive.d.ts +0 -30
- package/lib/content-projection/view-container.reference.d.ts +0 -42
- package/lib/microfrontend-platform/routing/microfrontend-view-capability-id-assigner.interceptor.d.ts +0 -10
- package/lib/page-not-found/format-url.pipe.d.ts +0 -11
- package/lib/part/part-action-bar/part-action-filter.pipe.d.ts +0 -11
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { EnvironmentInjector } from '@angular/core';
|
|
3
|
-
import { WorkbenchAuxiliaryRoutesRegistrator } from './workbench-auxiliary-routes-registrator.service';
|
|
4
|
-
import { WorkbenchViewRegistry } from '../view/workbench-view.registry';
|
|
5
|
-
import { WorkbenchPartRegistry } from '../part/workbench-part.registry';
|
|
6
|
-
import { WorkbenchLayoutService } from '../layout/workbench-layout.service';
|
|
7
|
-
import { WorkbenchLayoutDiffer } from './workbench-layout-differ';
|
|
8
|
-
import { WorkbenchPopupDiffer } from './workbench-popup-differ';
|
|
9
|
-
import { Logger } from '../logging';
|
|
10
|
-
import { ɵWorkbenchLayoutFactory } from '../layout/ɵworkbench-layout.factory';
|
|
11
|
-
import { WorkbenchDialogDiffer } from './workbench-dialog-differ';
|
|
12
|
-
import { ɵWorkbenchRouter } from './ɵworkbench-router.service';
|
|
13
|
-
import { WorkbenchMessageBoxDiffer } from './workbench-message-box-differ';
|
|
14
1
|
import * as i0 from "@angular/core";
|
|
15
2
|
/**
|
|
16
3
|
* Tracks the browser URL for workbench layout changes.
|
|
@@ -22,20 +9,21 @@ import * as i0 from "@angular/core";
|
|
|
22
9
|
* - Parses the serialized layout and injects it into {@link WorkbenchLayoutService}.
|
|
23
10
|
*/
|
|
24
11
|
export declare class WorkbenchUrlObserver {
|
|
25
|
-
private _router;
|
|
26
|
-
private
|
|
27
|
-
private _viewRegistry;
|
|
28
|
-
private _partRegistry;
|
|
29
|
-
private _workbenchLayoutService;
|
|
30
|
-
private _environmentInjector;
|
|
31
|
-
private _workbenchRouter;
|
|
32
|
-
private _workbenchLayoutFactory;
|
|
33
|
-
private _workbenchLayoutDiffer;
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
private
|
|
38
|
-
|
|
12
|
+
private readonly _router;
|
|
13
|
+
private readonly _auxiliaryRouteInstaller;
|
|
14
|
+
private readonly _viewRegistry;
|
|
15
|
+
private readonly _partRegistry;
|
|
16
|
+
private readonly _workbenchLayoutService;
|
|
17
|
+
private readonly _environmentInjector;
|
|
18
|
+
private readonly _workbenchRouter;
|
|
19
|
+
private readonly _workbenchLayoutFactory;
|
|
20
|
+
private readonly _workbenchLayoutDiffer;
|
|
21
|
+
private readonly _workbenchViewOutletDiffer;
|
|
22
|
+
private readonly _workbenchPopupDiffer;
|
|
23
|
+
private readonly _workbenchDialogDiffer;
|
|
24
|
+
private readonly _workbenchMessageBoxDiffer;
|
|
25
|
+
private readonly _logger;
|
|
26
|
+
constructor();
|
|
39
27
|
/** Invoked at the beginning of each navigation */
|
|
40
28
|
private onNavigationStart;
|
|
41
29
|
/** Invoked upon successful navigation */
|
|
@@ -44,8 +32,6 @@ export declare class WorkbenchUrlObserver {
|
|
|
44
32
|
private onNavigationCancel;
|
|
45
33
|
/** Invoked when the navigation failed */
|
|
46
34
|
private onNavigationError;
|
|
47
|
-
/** Invoked after checked guards for activation */
|
|
48
|
-
private onGuardsCheckEnd;
|
|
49
35
|
/**
|
|
50
36
|
* Creates the context of the current navigation. The context provides access to the new layout and how it differs from the current layout.
|
|
51
37
|
*/
|
|
@@ -55,45 +41,35 @@ export declare class WorkbenchUrlObserver {
|
|
|
55
41
|
*/
|
|
56
42
|
private registerAddedOutletAuxiliaryRoutes;
|
|
57
43
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* Invoke this method after navigation failure or cancellation. The navigation is cancelled when guards perform a redirect or reject navigation.
|
|
44
|
+
* Unregisters auxiliary routes of removed workbench outlets.
|
|
61
45
|
*/
|
|
62
|
-
private
|
|
46
|
+
private unregisterRemovedOutletAuxiliaryRoutes;
|
|
63
47
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* Invoke this method after navigation failure or cancellation. The navigation is cancelled when guards perform a redirect or reject navigation.
|
|
48
|
+
* For each added part, constructs a {@link WorkbenchPart} and registers it in {@link WORKBENCH_PART_REGISTRY}.
|
|
67
49
|
*/
|
|
68
|
-
private
|
|
50
|
+
private registerAddedWorkbenchParts;
|
|
69
51
|
/**
|
|
70
|
-
*
|
|
52
|
+
* For each removed part, destroys the {@link WorkbenchPart} and unregisters it in {@link WORKBENCH_PART_REGISTRY}.
|
|
71
53
|
*/
|
|
72
|
-
private
|
|
54
|
+
private unregisterRemovedWorkbenchParts;
|
|
73
55
|
/**
|
|
74
|
-
*
|
|
56
|
+
* For each added view, constructs a {@link WorkbenchView} and registers it in {@link WORKBENCH_VIEW_REGISTRY}.
|
|
75
57
|
*/
|
|
76
|
-
private
|
|
58
|
+
private registerAddedWorkbenchViews;
|
|
77
59
|
/**
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
|
-
private migrateURL;
|
|
81
|
-
/**
|
|
82
|
-
* Unregisters auxiliary routes of removed workbench outlets.
|
|
60
|
+
* For each removed view, destroys the {@link WorkbenchView} and unregisters it from {@link WORKBENCH_VIEW_REGISTRY}.
|
|
83
61
|
*/
|
|
84
|
-
private
|
|
62
|
+
private unregisterRemovedWorkbenchViews;
|
|
63
|
+
private createWorkbenchPart;
|
|
64
|
+
private createWorkbenchView;
|
|
85
65
|
/**
|
|
86
|
-
*
|
|
87
|
-
* - For each removed view, destroys the {@link WorkbenchView} and unregisters it in {@link WorkbenchViewRegistry}
|
|
66
|
+
* Applies the current layout to the workbench.
|
|
88
67
|
*/
|
|
89
|
-
private
|
|
68
|
+
private applyWorkbenchLayout;
|
|
90
69
|
/**
|
|
91
|
-
*
|
|
92
|
-
* - For each removed part, destroys the {@link WorkbenchPart} and unregisters it in {@link WorkbenchPartRegistry}
|
|
70
|
+
* Updates the URL if the layout has been migrated from an outdated version.
|
|
93
71
|
*/
|
|
94
|
-
private
|
|
95
|
-
private createWorkbenchPart;
|
|
96
|
-
private createWorkbenchView;
|
|
72
|
+
private migrateURL;
|
|
97
73
|
private installRouterEventListeners;
|
|
98
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchUrlObserver, never>;
|
|
99
75
|
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchUrlObserver>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IterableChanges, IterableDiffers } from '@angular/core';
|
|
2
|
+
import { ɵWorkbenchLayout } from '../layout/ɵworkbench-layout';
|
|
3
|
+
import { UrlTree } from '@angular/router';
|
|
4
|
+
import { ViewId } from '../view/workbench-view.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Stateful differ to compute view outlets.
|
|
8
|
+
*
|
|
9
|
+
* Use this differ to register/unregister view auxiliary routes.
|
|
10
|
+
*
|
|
11
|
+
* Because the layout is not available during initial navigation and empty-path views do not have
|
|
12
|
+
* an outlet in the URL, this differ uses both, outlets in the URL and views in the layout.
|
|
13
|
+
*/
|
|
14
|
+
export declare class WorkbenchViewOutletDiffer {
|
|
15
|
+
private _differ;
|
|
16
|
+
constructor(differs: IterableDiffers);
|
|
17
|
+
/**
|
|
18
|
+
* Computes differences since last time {@link WorkbenchViewOutletDiffer#diff} was invoked.
|
|
19
|
+
*/
|
|
20
|
+
diff(workbenchLayout: ɵWorkbenchLayout | null, urlTree: UrlTree): WorkbenchViewOutletDiff;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchViewOutletDiffer, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchViewOutletDiffer>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Lists the view outlets added/removed in the current navigation.
|
|
26
|
+
*/
|
|
27
|
+
export declare class WorkbenchViewOutletDiff {
|
|
28
|
+
readonly addedViewOutlets: `view.${number}`[];
|
|
29
|
+
readonly removedViewOutlets: `view.${number}`[];
|
|
30
|
+
constructor(changes: IterableChanges<ViewId> | null);
|
|
31
|
+
toString(): string;
|
|
32
|
+
}
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
import { NavigationExtras,
|
|
1
|
+
import { NavigationExtras, UrlTree } from '@angular/router';
|
|
2
2
|
import { WorkbenchRouter } from './workbench-router.service';
|
|
3
|
-
import { Injector, NgZone } from '@angular/core';
|
|
4
|
-
import { WorkbenchLayoutService } from '../layout/workbench-layout.service';
|
|
5
3
|
import { ɵWorkbenchLayout } from '../layout/ɵworkbench-layout';
|
|
6
4
|
import { Commands, WorkbenchNavigationContext, WorkbenchNavigationExtras } from './routing.model';
|
|
7
|
-
import { WorkbenchViewRegistry } from '../view/workbench-view.registry';
|
|
8
|
-
import { Logger } from '../logging';
|
|
9
5
|
import * as i0 from "@angular/core";
|
|
10
6
|
/** @inheritDoc */
|
|
11
7
|
export declare class ɵWorkbenchRouter implements WorkbenchRouter {
|
|
12
|
-
private _router;
|
|
13
|
-
private _workbenchLayoutService;
|
|
14
|
-
private _workbenchViewRegistry;
|
|
15
|
-
private _injector;
|
|
16
|
-
private
|
|
17
|
-
|
|
18
|
-
private
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
private readonly _router;
|
|
9
|
+
private readonly _workbenchLayoutService;
|
|
10
|
+
private readonly _workbenchViewRegistry;
|
|
11
|
+
private readonly _injector;
|
|
12
|
+
private readonly _zone;
|
|
13
|
+
/** Mutex to serialize Workbench Router navigation requests, preventing race conditions when modifying the active workbench layout to operate on the most-recent layout. */
|
|
14
|
+
private readonly _workbenchRouterMutex;
|
|
15
|
+
/** Mutex to serialize Angular Router navigation requests, preventing the cancellation of previously initiated asynchronous navigations. */
|
|
16
|
+
private readonly _angularRouterMutex;
|
|
17
|
+
/** Holds the current navigational context during a workbench navigation, or `null` if no navigation is in progress. */
|
|
22
18
|
private _currentNavigationContext;
|
|
23
|
-
constructor(
|
|
19
|
+
constructor();
|
|
24
20
|
/** @inheritDoc */
|
|
25
21
|
navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;
|
|
26
22
|
navigate(navigateFn: ɵNavigateFn, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean>;
|
|
@@ -49,9 +45,17 @@ export declare class ɵWorkbenchRouter implements WorkbenchRouter {
|
|
|
49
45
|
*/
|
|
50
46
|
createUrlTree(onNavigate: (layout: ɵWorkbenchLayout) => Promise<ɵWorkbenchLayout | null> | ɵWorkbenchLayout | null, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<UrlTree | null>;
|
|
51
47
|
/**
|
|
52
|
-
*
|
|
48
|
+
* Remove views marked for removal that have no `CanClose` guard.
|
|
49
|
+
*/
|
|
50
|
+
private removeViewsWithoutGuard;
|
|
51
|
+
/**
|
|
52
|
+
* Removes views marked for removal, confirming closing by calling each view's `CanClose` guard.
|
|
53
|
+
*
|
|
54
|
+
* Guards are executed in parallel, and views are removed in separate navigations.
|
|
55
|
+
*
|
|
56
|
+
* @return a Promise that resolves to `true` when all marked views were successfully closed or declined closing.
|
|
53
57
|
*/
|
|
54
|
-
private
|
|
58
|
+
private scheduleViewRemoval;
|
|
55
59
|
/**
|
|
56
60
|
* Returns the context of the current workbench navigation, when being invoked during navigation, or throws an error otherwise.
|
|
57
61
|
*/
|
|
@@ -82,15 +82,14 @@ export declare class WorkbenchLauncher {
|
|
|
82
82
|
* Allows waiting for the workbench startup to complete.
|
|
83
83
|
*/
|
|
84
84
|
export declare class WorkbenchStartup {
|
|
85
|
-
private _started;
|
|
86
85
|
/**
|
|
87
|
-
*
|
|
86
|
+
* Signals when the workbench completed startup.
|
|
88
87
|
*/
|
|
89
|
-
readonly
|
|
88
|
+
readonly isStarted: import("@angular/core").WritableSignal<boolean>;
|
|
90
89
|
/**
|
|
91
|
-
*
|
|
90
|
+
* Promise that resolves when the workbench has completed the startup.
|
|
92
91
|
*/
|
|
93
|
-
|
|
92
|
+
readonly whenStarted: Promise<true>;
|
|
94
93
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchStartup, never>;
|
|
95
94
|
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchStartup>;
|
|
96
95
|
}
|
|
@@ -26,4 +26,6 @@ import { EnvironmentProviders } from '@angular/core';
|
|
|
26
26
|
* });
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare function provideWorkbenchForTest(config?: WorkbenchConfig
|
|
29
|
+
export declare function provideWorkbenchForTest(config?: WorkbenchConfig & {
|
|
30
|
+
mainAreaInitialPartId?: string;
|
|
31
|
+
}): EnvironmentProviders;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
2
|
import { WorkbenchStorage } from '../storage/workbench-storage';
|
|
3
3
|
import { WorkbenchTheme } from '../workbench.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -9,11 +9,9 @@ export declare class WorkbenchThemeSwitcher {
|
|
|
9
9
|
private _workbenchStorage;
|
|
10
10
|
private readonly _documentRoot;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Upon subscription, emits the current theme, and then continuously emits when switching the theme. It never completes.
|
|
12
|
+
* Provides the current workbench theme.
|
|
15
13
|
*/
|
|
16
|
-
readonly theme
|
|
14
|
+
readonly theme: Signal<WorkbenchTheme | null>;
|
|
17
15
|
constructor(_workbenchStorage: WorkbenchStorage);
|
|
18
16
|
/**
|
|
19
17
|
* Switches the theme of the workbench.
|
|
@@ -24,7 +22,7 @@ export declare class WorkbenchThemeSwitcher {
|
|
|
24
22
|
/**
|
|
25
23
|
* Detects the current workbench theme from the HTML root element.
|
|
26
24
|
*/
|
|
27
|
-
private detectTheme
|
|
25
|
+
private detectTheme;
|
|
28
26
|
/**
|
|
29
27
|
* Activates the theme from storage, if any.
|
|
30
28
|
*/
|
package/lib/view/public_api.d.ts
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { ViewDragService } from '../view-dnd/view-drag.service';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import { LocationStrategy } from '@angular/common';
|
|
4
|
-
import { ɵWorkbenchRouter } from '../routing/ɵworkbench-router.service';
|
|
5
|
-
import { ɵWorkbenchLayoutFactory } from '../layout/ɵworkbench-layout.factory';
|
|
6
1
|
import * as i0 from "@angular/core";
|
|
7
2
|
/**
|
|
8
|
-
* Updates the workbench layout when
|
|
3
|
+
* Updates the workbench layout when receiving a {@link ViewMoveEvent} event relevant for this application.
|
|
9
4
|
*/
|
|
10
5
|
export declare class ViewMoveHandler {
|
|
11
|
-
private _workbenchId;
|
|
12
|
-
private _workbenchRouter;
|
|
13
|
-
private _workbenchLayoutFactory;
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
private readonly _workbenchId;
|
|
7
|
+
private readonly _workbenchRouter;
|
|
8
|
+
private readonly _workbenchLayoutFactory;
|
|
9
|
+
private readonly _router;
|
|
10
|
+
private readonly _locationStrategy;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Updates the workbench layout when receiving a {@link ViewMoveEvent} event relevant for this application.
|
|
14
|
+
*/
|
|
15
|
+
private onViewMove;
|
|
19
16
|
private addView;
|
|
20
17
|
private moveViewToNewWindow;
|
|
21
18
|
private removeView;
|
|
22
19
|
private moveView;
|
|
20
|
+
/**
|
|
21
|
+
* Subscribes to {@link ViewMoveEvent} events relevant for this app instance,
|
|
22
|
+
* invoking {@link onViewMove} for each event and signaling completion once the view has been moved.
|
|
23
|
+
*/
|
|
24
|
+
private installViewMoveHandler;
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<ViewMoveHandler, never>;
|
|
24
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<ViewMoveHandler>;
|
|
25
27
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { WorkbenchViewRegistry } from './workbench-view.registry';
|
|
3
2
|
import { WbComponentPortal } from '../portal/wb-component-portal';
|
|
4
3
|
import type { ViewComponent } from '../view/view.component';
|
|
5
4
|
import { ViewId } from './workbench-view.model';
|
|
@@ -8,8 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
8
7
|
* Resolves the portal for the given view, or throws an error if the view is not registered.
|
|
9
8
|
*/
|
|
10
9
|
export declare class ViewPortalPipe implements PipeTransform {
|
|
11
|
-
private _viewRegistry;
|
|
12
|
-
constructor(_viewRegistry: WorkbenchViewRegistry);
|
|
10
|
+
private readonly _viewRegistry;
|
|
13
11
|
transform(viewId: ViewId | null): WbComponentPortal<ViewComponent> | null;
|
|
14
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<ViewPortalPipe, never>;
|
|
15
13
|
static ɵpipe: i0.ɵɵPipeDeclaration<ViewPortalPipe, "wbViewPortal", true>;
|
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SciViewportComponent } from '@scion/components/viewport';
|
|
3
|
-
import { ViewMenuService } from '../part/view-context-menu/view-menu.service';
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
4
2
|
import { ɵWorkbenchView } from './ɵworkbench-view.model';
|
|
5
3
|
import { Logger } from '../logging';
|
|
6
4
|
import { ViewDragService } from '../view-dnd/view-drag.service';
|
|
5
|
+
import { OnAttach, OnDetach } from '../portal/wb-component-portal';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
import * as i1 from "../glass-pane/glass-pane.directive";
|
|
8
|
+
import * as i2 from "@angular/common";
|
|
9
9
|
/**
|
|
10
10
|
* Renders the workbench view, using a router-outlet to display view content.
|
|
11
11
|
*/
|
|
12
|
-
export declare class ViewComponent implements OnDestroy {
|
|
12
|
+
export declare class ViewComponent implements OnDestroy, OnAttach, OnDetach {
|
|
13
13
|
private _view;
|
|
14
|
-
private _logger;
|
|
15
|
-
private _host;
|
|
16
14
|
private _viewDragService;
|
|
17
|
-
private
|
|
18
|
-
|
|
15
|
+
private _logger;
|
|
16
|
+
private _viewport;
|
|
17
|
+
private _scrollTop;
|
|
18
|
+
private _scrollLeft;
|
|
19
19
|
get viewId(): string;
|
|
20
|
-
get cssClasses(): string;
|
|
21
20
|
get isViewDragActive(): boolean;
|
|
22
|
-
constructor(_view: ɵWorkbenchView,
|
|
21
|
+
constructor(_view: ɵWorkbenchView, _viewDragService: ViewDragService, _logger: Logger);
|
|
22
|
+
/**
|
|
23
|
+
* Method invoked after attached this component to the DOM.
|
|
24
|
+
*/
|
|
25
|
+
onAttach(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Method invoked before detaching this component from the DOM.
|
|
28
|
+
*/
|
|
29
|
+
onDetach(): void;
|
|
23
30
|
private onActivateView;
|
|
24
|
-
private
|
|
31
|
+
private installMenuItemAccelerators;
|
|
32
|
+
private installOnActivateView;
|
|
33
|
+
private addHostCssClasses;
|
|
25
34
|
ngOnDestroy(): void;
|
|
26
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<ViewComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ViewComponent, "wb-view", never, {}, {}, never, never, true, [{ directive: typeof i1.GlassPaneDirective; inputs: {}; outputs: {}; }]>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ViewComponent, "wb-view", never, {}, {}, never, never, true, [{ directive: typeof i1.GlassPaneDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.NgClass; inputs: {}; outputs: {}; }]>;
|
|
28
37
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
1
|
import { UrlSegment } from '@angular/router';
|
|
3
2
|
import { Disposable } from '../common/disposable';
|
|
4
|
-
import { WorkbenchMenuItem } from '../workbench.model';
|
|
3
|
+
import { CanCloseFn, CanCloseRef, WorkbenchMenuItem } from '../workbench.model';
|
|
5
4
|
import { WorkbenchPart } from '../part/workbench-part.model';
|
|
6
|
-
import {
|
|
5
|
+
import { NavigationData, NavigationState } from '../routing/routing.model';
|
|
6
|
+
import { Signal } from '@angular/core';
|
|
7
7
|
/**
|
|
8
8
|
* Handle to interact with a view opened via {@link WorkbenchRouter}.
|
|
9
9
|
*
|
|
@@ -39,60 +39,67 @@ export declare abstract class WorkbenchView {
|
|
|
39
39
|
* For example, the views of the initial layout or a perspective are usually navigated to the empty path route to avoid cluttering the URL,
|
|
40
40
|
* requiring a navigation hint to differentiate between the routes.
|
|
41
41
|
*/
|
|
42
|
-
abstract readonly navigationHint: string | undefined
|
|
42
|
+
abstract readonly navigationHint: Signal<string | undefined>;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Data passed to the navigation.
|
|
45
|
+
*/
|
|
46
|
+
abstract readonly navigationData: Signal<NavigationData>;
|
|
47
|
+
/**
|
|
48
|
+
* State passed to the navigation.
|
|
49
|
+
*/
|
|
50
|
+
abstract readonly navigationState: Signal<NavigationState>;
|
|
51
|
+
/**
|
|
52
|
+
* Part which contains this view.
|
|
45
53
|
*
|
|
46
|
-
* Note: the part of a view can change, e.g
|
|
54
|
+
* Note: the part of a view can change, e.g., when the view is moved to another part.
|
|
47
55
|
*/
|
|
48
|
-
abstract readonly part: WorkbenchPart
|
|
56
|
+
abstract readonly part: Signal<WorkbenchPart>;
|
|
49
57
|
/**
|
|
50
|
-
*
|
|
58
|
+
* Title to be displayed in the view tab.
|
|
51
59
|
*/
|
|
52
|
-
abstract title: string | null
|
|
60
|
+
abstract get title(): Signal<string | null>;
|
|
61
|
+
abstract set title(title: string | null);
|
|
53
62
|
/**
|
|
54
63
|
* Specifies the subtitle to be displayed in the view tab.
|
|
55
64
|
*/
|
|
56
|
-
abstract heading: string | null
|
|
65
|
+
abstract get heading(): Signal<string | null>;
|
|
66
|
+
abstract set heading(heading: string | null);
|
|
57
67
|
/**
|
|
58
68
|
* Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.
|
|
59
69
|
*/
|
|
60
|
-
abstract cssClass: string
|
|
70
|
+
abstract get cssClass(): Signal<string[]>;
|
|
71
|
+
abstract set cssClass(cssClass: string | string[]);
|
|
61
72
|
/**
|
|
62
|
-
*
|
|
63
|
-
* If dirty, a
|
|
73
|
+
* Indicates whether the view has unsaved changes.
|
|
74
|
+
* If marked as dirty, a visual indicator is displayed in the view tab.
|
|
64
75
|
*/
|
|
65
|
-
abstract dirty: boolean
|
|
76
|
+
abstract get dirty(): Signal<boolean>;
|
|
77
|
+
abstract set dirty(dirty: boolean);
|
|
66
78
|
/**
|
|
67
|
-
*
|
|
79
|
+
* Controls whether the view can be closed. Default is `true`.
|
|
68
80
|
*/
|
|
69
|
-
abstract closable: boolean
|
|
81
|
+
abstract get closable(): Signal<boolean>;
|
|
82
|
+
abstract set closable(closable: boolean);
|
|
70
83
|
/**
|
|
71
84
|
* Indicates whether this view is active or inactive.
|
|
72
85
|
*/
|
|
73
|
-
abstract readonly active: boolean
|
|
74
|
-
/**
|
|
75
|
-
* Notifies when this view becomes active or inactive.
|
|
76
|
-
*
|
|
77
|
-
* Upon subscription, emits the current state, and then each time the state changes. The observable never completes.
|
|
78
|
-
*/
|
|
79
|
-
abstract readonly active$: Observable<boolean>;
|
|
86
|
+
abstract readonly active: Signal<boolean>;
|
|
80
87
|
/**
|
|
81
88
|
* The position of this view in the tabbar.
|
|
82
89
|
*/
|
|
83
|
-
abstract readonly position: number
|
|
90
|
+
abstract readonly position: Signal<number>;
|
|
84
91
|
/**
|
|
85
92
|
* `True` when this view is the first view in the tabbar.
|
|
86
93
|
*/
|
|
87
|
-
abstract readonly first: boolean
|
|
94
|
+
abstract readonly first: Signal<boolean>;
|
|
88
95
|
/**
|
|
89
96
|
* `True` when this view is the last view in the tabbar.
|
|
90
97
|
*/
|
|
91
|
-
abstract readonly last: boolean
|
|
98
|
+
abstract readonly last: Signal<boolean>;
|
|
92
99
|
/**
|
|
93
|
-
*
|
|
100
|
+
* Indicates whether the tab of this view is scrolled into the tabbar.
|
|
94
101
|
*/
|
|
95
|
-
abstract readonly scrolledIntoView: boolean
|
|
102
|
+
abstract readonly scrolledIntoView: Signal<boolean>;
|
|
96
103
|
/**
|
|
97
104
|
* Indicates whether this view is destroyed.
|
|
98
105
|
*/
|
|
@@ -100,13 +107,7 @@ export declare abstract class WorkbenchView {
|
|
|
100
107
|
/**
|
|
101
108
|
* URL associated with this view.
|
|
102
109
|
*/
|
|
103
|
-
abstract readonly urlSegments: UrlSegment[]
|
|
104
|
-
/**
|
|
105
|
-
* State associated with this view.
|
|
106
|
-
*
|
|
107
|
-
* Note that state is volatile, meaning it is not encoded in the URL but read from the browser session history; thus, it will be lost when the page is reloaded.
|
|
108
|
-
*/
|
|
109
|
-
abstract readonly state: ViewState;
|
|
110
|
+
abstract readonly urlSegments: Signal<UrlSegment[]>;
|
|
110
111
|
/**
|
|
111
112
|
* Activates this view.
|
|
112
113
|
*
|
|
@@ -144,7 +145,58 @@ export declare abstract class WorkbenchView {
|
|
|
144
145
|
workbenchId?: string;
|
|
145
146
|
}): void;
|
|
146
147
|
/**
|
|
147
|
-
* Registers a
|
|
148
|
+
* Registers a guard to confirm closing the view, replacing any previous guard.
|
|
149
|
+
*
|
|
150
|
+
* The callback can call `inject` to get dependencies.
|
|
151
|
+
*
|
|
152
|
+
* Example:
|
|
153
|
+
* ```ts
|
|
154
|
+
* import {inject} from '@angular/core';
|
|
155
|
+
* import {WorkbenchMessageBoxService, WorkbenchView} from '@scion/workbench';
|
|
156
|
+
*
|
|
157
|
+
* inject(WorkbenchView).canClose(async () => {
|
|
158
|
+
* if (!inject(WorkbenchView).dirty()) {
|
|
159
|
+
* return true;
|
|
160
|
+
* }
|
|
161
|
+
* const action = await inject(WorkbenchMessageBoxService).open('Do you want to save changes?', {
|
|
162
|
+
* actions: {
|
|
163
|
+
* yes: 'Yes',
|
|
164
|
+
* no: 'No',
|
|
165
|
+
* cancel: 'Cancel'
|
|
166
|
+
* }
|
|
167
|
+
* });
|
|
168
|
+
*
|
|
169
|
+
* switch (action) {
|
|
170
|
+
* case 'yes':
|
|
171
|
+
* // Store changes ...
|
|
172
|
+
* return true;
|
|
173
|
+
* case 'no':
|
|
174
|
+
* return true;
|
|
175
|
+
* default:
|
|
176
|
+
* return false;
|
|
177
|
+
* }
|
|
178
|
+
* });
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* @param canClose - Callback to confirm closing the view.
|
|
182
|
+
* @returns Reference to the `CanClose` guard, which can be used to unregister the guard.
|
|
183
|
+
*/
|
|
184
|
+
abstract canClose(canClose: CanCloseFn): CanCloseRef;
|
|
185
|
+
/**
|
|
186
|
+
* Contributes a menu item to this view's context menu.
|
|
187
|
+
*
|
|
188
|
+
* ---
|
|
189
|
+
* As an alternative to programmatic registration, menu items can be contributed declaratively from an HTML template.
|
|
190
|
+
* Declaring a menu item in the HTML template of a workbench view adds it to that view only. To add it to every view,
|
|
191
|
+
* declare it outside a view context, such as in `app.component.html`, or register it programmatically.
|
|
192
|
+
* Refer to {@link WorkbenchViewMenuItemDirective} for more information.
|
|
193
|
+
*
|
|
194
|
+
* Example:
|
|
195
|
+
* ```html
|
|
196
|
+
* <ng-template wbViewMenuItem [accelerator]="['ctrl', 'b']" (action)="..." let-view>
|
|
197
|
+
* ...
|
|
198
|
+
* </ng-template>
|
|
199
|
+
* ```
|
|
148
200
|
*
|
|
149
201
|
* @return handle to unregister the menu item.
|
|
150
202
|
*/
|
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
3
2
|
import { ɵWorkbenchView } from './ɵworkbench-view.model';
|
|
4
|
-
import {
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
3
|
+
import { WorkbenchObjectRegistry } from '../registry/workbench-object-registry';
|
|
6
4
|
/**
|
|
7
5
|
* Registry for {@link WorkbenchView} model objects.
|
|
8
6
|
*/
|
|
9
|
-
export declare
|
|
10
|
-
private _registry;
|
|
11
|
-
views$: Observable<readonly ɵWorkbenchView[]>;
|
|
12
|
-
/**
|
|
13
|
-
* Registers given view.
|
|
14
|
-
*/
|
|
15
|
-
register(view: ɵWorkbenchView): void;
|
|
16
|
-
/**
|
|
17
|
-
* Unregisters specified view and destroys it.
|
|
18
|
-
*/
|
|
19
|
-
unregister(viewId: ViewId): void;
|
|
20
|
-
/**
|
|
21
|
-
* Returns the {@link WorkbenchView} of the given identity. If not found, by default, throws an error unless setting the `orElseNull` option.
|
|
22
|
-
*/
|
|
23
|
-
get(viewId: ViewId): ɵWorkbenchView;
|
|
24
|
-
get(viewId: ViewId, options: {
|
|
25
|
-
orElse: null;
|
|
26
|
-
}): ɵWorkbenchView | null;
|
|
27
|
-
get views(): readonly ɵWorkbenchView[];
|
|
28
|
-
ngOnDestroy(): void;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchViewRegistry, never>;
|
|
30
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchViewRegistry>;
|
|
31
|
-
}
|
|
7
|
+
export declare const WORKBENCH_VIEW_REGISTRY: InjectionToken<WorkbenchObjectRegistry<string, ɵWorkbenchView>>;
|