@scion/workbench 17.0.0-beta.7 → 17.0.0-beta.9
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/README.md +1 -1
- package/esm2022/lib/activation-instant.provider.mjs +3 -3
- package/esm2022/lib/common/asserts.util.mjs +2 -2
- package/esm2022/lib/common/coerce-observable.pipe.mjs +3 -3
- package/esm2022/lib/common/filter-by-predicate.pipe.mjs +3 -3
- package/esm2022/lib/common/filter-by-text.pipe.mjs +3 -3
- package/esm2022/lib/common/grid-element-if-visible.pipe.mjs +6 -6
- package/esm2022/lib/common/instanceof.pipe.mjs +3 -3
- package/esm2022/lib/common/map-coerce.pipe.mjs +3 -3
- package/esm2022/lib/common/null-if-empty.pipe.mjs +3 -3
- package/esm2022/lib/common/objects.util.mjs +34 -0
- package/esm2022/lib/common/typeof.pipe.mjs +3 -3
- package/esm2022/lib/common/uuid.util.mjs +17 -0
- package/esm2022/lib/content-projection/content-as-overlay.component.mjs +3 -3
- package/esm2022/lib/content-projection/content-projection.directive.mjs +3 -3
- package/esm2022/lib/dialog/dialog-footer/dialog-action-filter.pipe.mjs +3 -3
- package/esm2022/lib/dialog/dialog-footer/dialog-footer.component.mjs +3 -3
- package/esm2022/lib/dialog/dialog-footer/workbench-dialog-action.directive.mjs +9 -6
- package/esm2022/lib/dialog/dialog-footer/workbench-dialog-footer.directive.mjs +9 -6
- package/esm2022/lib/dialog/dialog-header/dialog-header.component.mjs +3 -3
- package/esm2022/lib/dialog/dialog-header/workbench-dialog-header.directive.mjs +9 -6
- 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 +53 -24
- package/esm2022/lib/dialog/workbench-dialog.mjs +1 -1
- package/esm2022/lib/dialog/workbench-dialog.options.mjs +1 -1
- package/esm2022/lib/dialog/workbench-dialog.registry.mjs +4 -4
- package/esm2022/lib/dialog/workbench-dialog.service.mjs +5 -5
- package/esm2022/lib/dialog//311/265workbench-dialog.mjs +7 -7
- package/esm2022/lib/dialog//311/265workbench-dialog.service.mjs +3 -3
- package/esm2022/lib/executor/single-task-executor.mjs +26 -7
- package/esm2022/lib/filter-field/filter-field.component.mjs +6 -6
- package/esm2022/lib/glass-pane/glass-pane.directive.mjs +15 -7
- package/esm2022/lib/layout/grid-element/grid-element.component.mjs +10 -10
- package/esm2022/lib/layout/main-area-layout/main-area-layout.component.mjs +6 -4
- package/esm2022/lib/layout/migration/model/workbench-layout-migration-v1.model.mjs +11 -0
- package/esm2022/lib/layout/migration/model/workbench-layout-migration-v2.model.mjs +11 -0
- package/esm2022/lib/layout/migration/model/workbench-layout-migration-v3.model.mjs +11 -0
- package/esm2022/lib/layout/migration/model/workbench-layout-migration-v4.model.mjs +11 -0
- package/esm2022/lib/layout/migration/workbench-layout-migration-v2.service.mjs +59 -0
- package/esm2022/lib/layout/migration/workbench-layout-migration-v3.service.mjs +117 -0
- package/esm2022/lib/layout/migration/workbench-layout-migration-v4.service.mjs +57 -0
- package/esm2022/lib/layout/workbench-layout.component.mjs +6 -4
- package/esm2022/lib/layout/workbench-layout.factory.mjs +4 -4
- package/esm2022/lib/layout/workbench-layout.mjs +1 -1
- package/esm2022/lib/layout/workbench-layout.model.mjs +5 -6
- package/esm2022/lib/layout/workbench-layout.service.mjs +3 -3
- package/esm2022/lib/layout/workbench-layouts.util.mjs +37 -1
- package/esm2022/lib/layout/workench-layout-serializer.service.mjs +53 -21
- package/esm2022/lib/layout//311/265workbench-layout.factory.mjs +8 -5
- package/esm2022/lib/layout//311/265workbench-layout.mjs +382 -195
- package/esm2022/lib/logging/console-appender.service.mjs +3 -3
- package/esm2022/lib/logging/logger.mjs +3 -3
- package/esm2022/lib/logging/logging-support.mjs +4 -4
- package/esm2022/lib/logging/logging.model.mjs +3 -3
- package/esm2022/lib/logging//311/265logger.mjs +3 -3
- package/esm2022/lib/message-box/message-box-footer/message-box-footer.component.mjs +18 -20
- 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 +15 -6
- package/esm2022/lib/message-box/workbench-message-box.options.mjs +1 -1
- package/esm2022/lib/message-box/workbench-message-box.service.mjs +5 -5
- package/esm2022/lib/message-box//311/265workbench-message-box.service.mjs +5 -5
- package/esm2022/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.mjs +26 -13
- 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 +25 -13
- package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-intent-handler.interceptor.mjs +11 -11
- package/esm2022/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.mjs +5 -5
- package/esm2022/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.mjs +11 -9
- package/esm2022/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.mjs +112 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.mjs +43 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.mjs +16 -13
- package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor.mjs +34 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.interceptor.mjs +88 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-legacy-intent-translator.interceptor.mjs +32 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.mjs +121 -0
- package/esm2022/lib/microfrontend-platform/microfrontend-notification/microfrontend-notification-intent-handler.service.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/microfrontend-platform-config-loader.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-capability-validator.interceptor.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.mjs +9 -6
- package/esm2022/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.mjs +9 -15
- 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 +4 -4
- package/esm2022/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.mjs +37 -32
- package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-id-assigner.interceptor.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-capability-validator.interceptor.mjs +3 -3
- package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-intent-handler.interceptor.mjs +13 -11
- package/esm2022/lib/microfrontend-platform/routing/microfrontend-view-routes.mjs +14 -9
- package/esm2022/lib/microfrontend-platform/workbench-microfrontend-support.mjs +54 -23
- package/esm2022/lib/migration/workbench-migration.mjs +11 -0
- package/esm2022/lib/migration/workbench-migrator.mjs +38 -0
- package/esm2022/lib/notification/notification-css-classes.pipe.mjs +3 -3
- package/esm2022/lib/notification/notification-list.component.mjs +3 -3
- package/esm2022/lib/notification/notification.component.mjs +3 -3
- package/esm2022/lib/notification/notification.config.mjs +1 -1
- package/esm2022/lib/notification/notification.mjs +1 -1
- package/esm2022/lib/notification/notification.service.mjs +9 -9
- package/esm2022/lib/notification/text-notification.component.mjs +3 -3
- package/esm2022/lib/page-not-found/format-url.pipe.mjs +26 -0
- package/esm2022/lib/page-not-found/page-not-found.component.mjs +28 -0
- package/esm2022/lib/part/part-action-bar/part-action-bar.component.mjs +3 -3
- package/esm2022/lib/part/part-action-bar/part-action-filter.pipe.mjs +3 -3
- package/esm2022/lib/part/part-action-bar/part-action.directive.mjs +4 -4
- package/esm2022/lib/part/part-bar/part-bar.component.mjs +10 -8
- package/esm2022/lib/part/part-portal.pipe.mjs +3 -3
- package/esm2022/lib/part/part.component.mjs +6 -4
- package/esm2022/lib/part/view-context-menu/accelerator-format.pipe.mjs +3 -3
- package/esm2022/lib/part/view-context-menu/text.component.mjs +3 -3
- package/esm2022/lib/part/view-context-menu/view-menu.component.mjs +3 -3
- package/esm2022/lib/part/view-context-menu/view-menu.directive.mjs +4 -4
- package/esm2022/lib/part/view-context-menu/view-menu.service.mjs +18 -18
- package/esm2022/lib/part/view-list/view-list.component.mjs +3 -3
- package/esm2022/lib/part/view-list-button/view-list-button.component.mjs +3 -3
- package/esm2022/lib/part/view-list-item/view-list-item.component.mjs +9 -9
- package/esm2022/lib/part/view-tab/view-tab.component.mjs +13 -11
- package/esm2022/lib/part/view-tab-content/view-tab-content.component.mjs +5 -5
- package/esm2022/lib/part/view-tab-drag-image/view-tab-drag-image.component.mjs +9 -9
- package/esm2022/lib/part/workbench-part-action.registry.mjs +3 -3
- package/esm2022/lib/part/workbench-part.model.mjs +1 -1
- package/esm2022/lib/part/workbench-part.registry.mjs +3 -3
- package/esm2022/lib/part//311/265workbench-part.model.mjs +3 -3
- package/esm2022/lib/perspective/migration/model/workbench-perspective-migration-v1.model.mjs +11 -0
- package/esm2022/lib/perspective/migration/model/workbench-perspective-migration-v2.model.mjs +11 -0
- package/esm2022/lib/perspective/migration/workbench-perspective-migration-v2.service.mjs +57 -0
- package/esm2022/lib/perspective/workbench-grid-merger.service.mjs +19 -51
- package/esm2022/lib/perspective/workbench-perspective-storage.service.mjs +23 -18
- package/esm2022/lib/perspective/workbench-perspective-view-conflict-resolver.service.mjs +27 -42
- package/esm2022/lib/perspective/workbench-perspective.model.mjs +1 -1
- package/esm2022/lib/perspective/workbench-perspective.registry.mjs +3 -3
- package/esm2022/lib/perspective/workbench-perspective.service.mjs +15 -10
- package/esm2022/lib/perspective/workench-perspective-serializer.service.mjs +62 -0
- package/esm2022/lib/perspective//311/265workbench-perspective.model.mjs +98 -78
- package/esm2022/lib/popup/popup.component.mjs +22 -10
- package/esm2022/lib/popup/popup.config.mjs +3 -1
- package/esm2022/lib/popup/popup.service.mjs +4 -4
- package/esm2022/lib/portal/workbench-portal-outlet.directive.mjs +6 -6
- package/esm2022/lib/public_api.mjs +3 -2
- package/esm2022/lib/registry/workbench-object-registry.mjs +3 -3
- package/esm2022/lib/routing/empty-outlet/empty-outlet.component.mjs +31 -0
- package/esm2022/lib/routing/public_api.mjs +1 -1
- package/esm2022/lib/routing/router.util.mjs +89 -35
- package/esm2022/lib/routing/routing.model.mjs +1 -1
- package/esm2022/lib/routing/url-segment-matcher.mjs +46 -0
- package/esm2022/lib/routing/workbench-auxiliary-routes-registrator.service.mjs +58 -49
- package/esm2022/lib/routing/workbench-dialog-differ.mjs +6 -6
- package/esm2022/lib/routing/workbench-layout-differ.mjs +14 -17
- package/esm2022/lib/routing/workbench-message-box-differ.mjs +51 -0
- package/esm2022/lib/routing/workbench-navigational-states.mjs +4 -28
- package/esm2022/lib/routing/workbench-popup-differ.mjs +6 -6
- package/esm2022/lib/routing/workbench-route-data.mjs +14 -4
- package/esm2022/lib/routing/workbench-router-link.directive.mjs +24 -32
- package/esm2022/lib/routing/workbench-router.service.mjs +13 -378
- package/esm2022/lib/routing/workbench-url-observer.service.mjs +69 -82
- package/esm2022/lib/routing//311/265location.mjs +3 -3
- package/esm2022/lib/routing//311/265workbench-router.service.mjs +314 -0
- package/esm2022/lib/startup/splash/splash.component.mjs +3 -3
- package/esm2022/lib/startup/workbench-launcher.service.mjs +11 -11
- package/esm2022/lib/storage/workbench-storage.mjs +3 -3
- package/esm2022/lib/testing/public_api.mjs +2 -1
- package/esm2022/lib/testing/workbench-testing.module.mjs +13 -39
- package/esm2022/lib/testing/workbench.provider.mjs +60 -0
- package/esm2022/lib/theme/workbench-theme-switcher.service.mjs +3 -3
- package/esm2022/lib/view/public_api.mjs +2 -1
- package/esm2022/lib/view/view-move-handler.service.mjs +42 -62
- package/esm2022/lib/view/view-portal.pipe.mjs +4 -4
- package/esm2022/lib/view/view.component.mjs +20 -40
- package/esm2022/lib/view/workbench-view-route-guards.mjs +47 -0
- package/esm2022/lib/view/workbench-view.model.mjs +6 -4
- package/esm2022/lib/view/workbench-view.registry.mjs +4 -4
- package/esm2022/lib/view//311/265workbench-view.model.mjs +106 -27
- package/esm2022/lib/view-dnd/requires-drop-zone.pipe.mjs +7 -7
- package/esm2022/lib/view-dnd/view-drag.service.mjs +6 -6
- package/esm2022/lib/view-dnd/view-drop-placeholder-renderer.service.mjs +3 -3
- package/esm2022/lib/view-dnd/view-drop-zone.directive.mjs +4 -4
- package/esm2022/lib/view-dnd/view-tab-drag-image-renderer.service.mjs +6 -4
- package/esm2022/lib/workbench-config.mjs +15 -0
- package/esm2022/lib/workbench-id.mjs +3 -3
- package/esm2022/lib/workbench.component.mjs +20 -12
- package/esm2022/lib/workbench.constants.mjs +7 -9
- package/esm2022/lib/workbench.model.mjs +1 -1
- package/esm2022/lib/workbench.module.mjs +15 -86
- package/esm2022/lib/workbench.provider.mjs +117 -0
- package/esm2022/lib/workbench.service.mjs +5 -5
- package/esm2022/lib//311/265workbench.service.mjs +15 -21
- package/fesm2022/scion-workbench.mjs +5490 -4166
- package/fesm2022/scion-workbench.mjs.map +1 -1
- package/lib/common/objects.util.d.ts +17 -0
- package/lib/common/uuid.util.d.ts +8 -0
- package/lib/dialog/workbench-dialog.component.d.ts +16 -7
- package/lib/dialog/workbench-dialog.d.ts +1 -1
- package/lib/dialog/workbench-dialog.options.d.ts +4 -3
- package/lib/dialog/workbench-dialog.registry.d.ts +4 -3
- package/lib/dialog/workbench-dialog.service.d.ts +1 -1
- package/lib/dialog//311/265workbench-dialog.d.ts +2 -2
- package/lib/executor/single-task-executor.d.ts +6 -1
- package/lib/filter-field/filter-field.component.d.ts +1 -1
- package/lib/glass-pane/glass-pane.directive.d.ts +21 -0
- package/lib/layout/grid-element/grid-element.component.d.ts +2 -2
- package/lib/layout/migration/model/workbench-layout-migration-v1.model.d.ts +16 -0
- package/lib/layout/migration/model/workbench-layout-migration-v2.model.d.ts +22 -0
- package/lib/layout/migration/model/workbench-layout-migration-v3.model.d.ts +30 -0
- package/lib/layout/migration/model/workbench-layout-migration-v4.model.d.ts +31 -0
- package/lib/layout/migration/workbench-layout-migration-v2.service.d.ts +13 -0
- package/lib/layout/migration/workbench-layout-migration-v3.service.d.ts +16 -0
- package/lib/layout/migration/workbench-layout-migration-v4.service.d.ts +12 -0
- package/lib/layout/workbench-layout.d.ts +61 -7
- package/lib/layout/workbench-layout.factory.d.ts +1 -1
- package/lib/layout/workbench-layout.model.d.ts +19 -9
- package/lib/layout/workbench-layouts.util.d.ts +18 -0
- package/lib/layout/workench-layout-serializer.service.d.ts +28 -7
- package/lib/layout//311/265workbench-layout.d.ts +172 -98
- package/lib/layout//311/265workbench-layout.factory.d.ts +4 -0
- package/lib/logging/logging-support.d.ts +2 -2
- package/lib/message-box/workbench-message-box.component.d.ts +3 -0
- package/lib/message-box/workbench-message-box.options.d.ts +4 -3
- package/lib/message-box/workbench-message-box.service.d.ts +1 -1
- package/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.d.ts +7 -1
- package/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.d.ts +1 -0
- package/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.d.ts +39 -0
- package/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.d.ts +25 -0
- package/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.d.ts +4 -2
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor.d.ts +10 -0
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.interceptor.d.ts +28 -0
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-legacy-intent-translator.interceptor.d.ts +11 -0
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.d.ts +48 -0
- package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.d.ts +3 -7
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.d.ts +4 -9
- package/lib/microfrontend-platform/workbench-microfrontend-support.d.ts +3 -3
- package/lib/migration/workbench-migration.d.ts +9 -0
- package/lib/migration/workbench-migrator.d.ts +18 -0
- package/lib/notification/notification.config.d.ts +1 -1
- package/lib/notification/notification.d.ts +1 -3
- package/lib/page-not-found/format-url.pipe.d.ts +11 -0
- package/lib/page-not-found/page-not-found.component.d.ts +8 -0
- package/lib/part/part-action-bar/part-action.directive.d.ts +1 -1
- package/lib/part/part-bar/part-bar.component.d.ts +4 -3
- package/lib/part/view-context-menu/view-menu.directive.d.ts +1 -1
- package/lib/part/view-context-menu/view-menu.service.d.ts +5 -4
- package/lib/part/view-list-item/view-list-item.component.d.ts +5 -4
- package/lib/part/view-tab/view-tab.component.d.ts +6 -5
- package/lib/part/view-tab-drag-image/view-tab-drag-image.component.d.ts +3 -3
- package/lib/part/workbench-part.model.d.ts +5 -4
- package/lib/part//311/265workbench-part.model.d.ts +5 -4
- package/lib/perspective/migration/model/workbench-perspective-migration-v1.model.d.ts +8 -0
- package/lib/perspective/migration/model/workbench-perspective-migration-v2.model.d.ts +10 -0
- package/lib/perspective/migration/workbench-perspective-migration-v2.service.d.ts +13 -0
- package/lib/perspective/workbench-grid-merger.service.d.ts +9 -16
- package/lib/perspective/workbench-perspective-storage.service.d.ts +10 -28
- package/lib/perspective/workbench-perspective-view-conflict-resolver.service.d.ts +8 -25
- package/lib/perspective/workbench-perspective.model.d.ts +123 -14
- package/lib/perspective/workbench-perspective.service.d.ts +10 -3
- package/lib/perspective/workench-perspective-serializer.service.d.ts +26 -0
- package/lib/perspective//311/265workbench-perspective.model.d.ts +16 -14
- package/lib/popup/popup.component.d.ts +1 -0
- package/lib/popup/popup.config.d.ts +4 -3
- package/lib/portal/workbench-portal-outlet.directive.d.ts +2 -2
- package/lib/public_api.d.ts +4 -3
- package/lib/registry/workbench-object-registry.d.ts +2 -2
- package/lib/routing/empty-outlet/empty-outlet.component.d.ts +15 -0
- package/lib/routing/public_api.d.ts +2 -2
- package/lib/routing/router.util.d.ts +45 -19
- package/lib/routing/routing.model.d.ts +107 -8
- package/lib/routing/url-segment-matcher.d.ts +20 -0
- package/lib/routing/workbench-auxiliary-routes-registrator.service.d.ts +25 -15
- package/lib/routing/workbench-layout-differ.d.ts +4 -7
- package/lib/routing/workbench-message-box-differ.d.ts +25 -0
- package/lib/routing/workbench-navigational-states.d.ts +6 -19
- package/lib/routing/workbench-route-data.d.ts +13 -3
- package/lib/routing/workbench-router-link.directive.d.ts +22 -7
- package/lib/routing/workbench-router.service.d.ts +42 -142
- package/lib/routing/workbench-url-observer.service.d.ts +10 -28
- package/lib/routing//311/265workbench-router.service.d.ts +74 -0
- package/lib/startup/workbench-launcher.service.d.ts +4 -4
- package/lib/testing/public_api.d.ts +1 -0
- package/lib/testing/workbench-testing.module.d.ts +7 -6
- package/lib/testing/workbench.provider.d.ts +29 -0
- package/lib/view/public_api.d.ts +2 -1
- package/lib/view/view-move-handler.service.d.ts +2 -4
- package/lib/view/view-portal.pipe.d.ts +2 -1
- package/lib/view/view.component.d.ts +1 -11
- package/lib/view/workbench-view-route-guards.d.ts +36 -0
- package/lib/view/workbench-view.model.d.ts +37 -5
- package/lib/view/workbench-view.registry.d.ts +4 -3
- package/lib/view//311/265workbench-view.model.d.ts +61 -15
- package/lib/view-dnd/view-drag.service.d.ts +9 -4
- package/lib/view-dnd/view-drop-zone.directive.d.ts +1 -1
- package/lib/{workbench-module-config.d.ts → workbench-config.d.ts} +29 -71
- package/lib/workbench.component.d.ts +2 -2
- package/lib/workbench.constants.d.ts +6 -8
- package/lib/workbench.model.d.ts +20 -8
- package/lib/workbench.module.d.ts +12 -7
- package/lib/workbench.provider.d.ts +38 -0
- package/lib/workbench.service.d.ts +32 -8
- package/lib//311/265workbench.service.d.ts +9 -3
- package/package.json +8 -8
- package/esm2022/lib/layout/migration/workbench-layout-migrator.service.mjs +0 -38
- package/esm2022/lib/layout/migration/workbench-layout-v1-migrator.service.mjs +0 -59
- package/esm2022/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.service.mjs +0 -46
- package/esm2022/lib/view/workbench-view-pre-destroy.guard.mjs +0 -36
- package/esm2022/lib/workbench-module-config.mjs +0 -15
- package/lib/layout/migration/workbench-layout-migrator.service.d.ts +0 -15
- package/lib/layout/migration/workbench-layout-v1-migrator.service.d.ts +0 -12
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.service.d.ts +0 -17
- package/lib/view/workbench-view-pre-destroy.guard.d.ts +0 -5
|
@@ -1,30 +1,129 @@
|
|
|
1
|
+
import { NavigationExtras, UrlSegment } from '@angular/router';
|
|
2
|
+
import { ViewId } from '../view/workbench-view.model';
|
|
3
|
+
import { WorkbenchLayout } from '../layout/workbench-layout';
|
|
4
|
+
/**
|
|
5
|
+
* Options to control the navigation.
|
|
6
|
+
*/
|
|
7
|
+
export interface WorkbenchNavigationExtras extends NavigationExtras {
|
|
8
|
+
/**
|
|
9
|
+
* Controls where to open the view. Default is `auto`.
|
|
10
|
+
*
|
|
11
|
+
* One of:
|
|
12
|
+
* - 'auto': Navigates existing views that match the path, or opens a new view otherwise. Matrix params do not affect view resolution.
|
|
13
|
+
* - 'blank': Navigates in a new view.
|
|
14
|
+
* - <viewId>: Navigates the specified view. If already opened, replaces it, or opens a new view otherwise.
|
|
15
|
+
*/
|
|
16
|
+
target?: ViewId | string | 'blank' | 'auto';
|
|
17
|
+
/**
|
|
18
|
+
* Controls which part to navigate views in.
|
|
19
|
+
*
|
|
20
|
+
* If target is `blank`, opens the view in the specified part.
|
|
21
|
+
* If target is `auto`, navigates matching views in the specified part, or opens a new view in that part otherwise.
|
|
22
|
+
*
|
|
23
|
+
* If the specified part is not in the layout, opens the view in the active part, with the active part of the main area taking precedence.
|
|
24
|
+
*/
|
|
25
|
+
partId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Sets a hint to control navigation, e.g., for use in a `CanMatch` guard to differentiate between routes with an identical path.
|
|
28
|
+
*
|
|
29
|
+
* For example, views of the initial layout or a perspective are usually navigated to the empty path route to avoid cluttering the URL,
|
|
30
|
+
* requiring a navigation hint to differentiate between the routes. See {@link canMatchWorkbenchView} for an example.
|
|
31
|
+
*
|
|
32
|
+
* Like the path, a hint affects view resolution. If set, the router will only navigate views with an equivalent hint, or if not set, views without a hint.
|
|
33
|
+
*
|
|
34
|
+
* @see canMatchWorkbenchView
|
|
35
|
+
*/
|
|
36
|
+
hint?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Instructs the router to activate the view. Default is `true`.
|
|
39
|
+
*/
|
|
40
|
+
activate?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Specifies where to insert the view into the tab bar. Has no effect if navigating an existing view. Default is after the active view.
|
|
43
|
+
*/
|
|
44
|
+
position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view';
|
|
45
|
+
/**
|
|
46
|
+
* Associates arbitrary state with a view navigation.
|
|
47
|
+
*
|
|
48
|
+
* Navigational state is stored in the browser's session history, supporting back/forward navigation, but is lost on page reload.
|
|
49
|
+
* Therefore, a view must be able to restore its state without relying on navigational state.
|
|
50
|
+
*
|
|
51
|
+
* Navigational state can be read from {@link WorkbenchView.state} or the browser's session history via `history.state`.
|
|
52
|
+
*/
|
|
53
|
+
state?: ViewState;
|
|
54
|
+
/**
|
|
55
|
+
* Closes views that match the specified path and navigation hint. Matrix parameters do not affect view resolution.
|
|
56
|
+
* The path supports the asterisk wildcard segment (`*`) to match views with any value in a segment.
|
|
57
|
+
* To close a specific view, set a view target instead of a path.
|
|
58
|
+
*/
|
|
59
|
+
close?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.
|
|
62
|
+
*/
|
|
63
|
+
cssClass?: string | string[];
|
|
64
|
+
}
|
|
1
65
|
/**
|
|
2
66
|
* Represents an ordered list of path segments instructing the router which route to navigate to.
|
|
3
67
|
*
|
|
4
|
-
* A command can be
|
|
5
|
-
*
|
|
6
|
-
* path segment supports the usage of navigational symbols such as `/`, `./`, or `../`.
|
|
68
|
+
* A command can be a string or an object literal. A string represents a path segment, an object literal associates matrix parameters with the preceding segment.
|
|
69
|
+
* Multiple segments can be combined into a single command, separated by a forward slash.
|
|
7
70
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
71
|
+
* The first path segment supports the usage of navigational symbols such as `/`, `./`, or `../`.
|
|
72
|
+
*
|
|
73
|
+
* Examples:
|
|
74
|
+
* - Navigates to the path 'path/to/view', passing two parameters:
|
|
10
75
|
* ['path', 'to', 'view', {param1: 'value1', param2: 'value2'}]
|
|
11
76
|
* - Alternative syntax using a combined segment:
|
|
12
77
|
* ['path/to/view', {param1: 'value1', param2: 'value2'}]
|
|
13
78
|
*/
|
|
14
79
|
export type Commands = any[];
|
|
80
|
+
/**
|
|
81
|
+
* URL segments of views contained in the workbench layout.
|
|
82
|
+
*/
|
|
83
|
+
export type ViewOutlets = {
|
|
84
|
+
[viewId: ViewId]: UrlSegment[];
|
|
85
|
+
};
|
|
15
86
|
/**
|
|
16
87
|
* Navigational view states associated with a workbench navigation.
|
|
17
88
|
*/
|
|
18
89
|
export type ViewStates = {
|
|
19
|
-
[viewId:
|
|
90
|
+
[viewId: ViewId]: ViewState;
|
|
20
91
|
};
|
|
21
92
|
/**
|
|
22
93
|
* State associated with a view navigation.
|
|
23
94
|
*
|
|
24
|
-
*
|
|
95
|
+
* Navigational state is stored in the browser's session history, supporting back/forward navigation, but is lost on page reload.
|
|
96
|
+
* Therefore, a view must be able to restore its state without relying on navigational state.
|
|
25
97
|
*
|
|
26
|
-
*
|
|
98
|
+
* Navigational state can be read from {@link WorkbenchView.state} or the browser's session history via `history.state`.
|
|
27
99
|
*/
|
|
28
100
|
export type ViewState = {
|
|
29
101
|
[key: string]: unknown;
|
|
30
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* Signature of a function to modify the workbench layout.
|
|
105
|
+
*
|
|
106
|
+
* The router will invoke this function with the current workbench layout. The layout has methods for modifying it.
|
|
107
|
+
* The layout is immutable, so each modification creates a new instance. Use the instance for further modifications and finally return it.
|
|
108
|
+
*
|
|
109
|
+
* The function can call `inject` to get any required dependencies.
|
|
110
|
+
*
|
|
111
|
+
* ## Workbench Layout
|
|
112
|
+
* The workbench layout is a grid of parts. Parts are aligned relative to each other. A part is a stack of views. Content is displayed in views.
|
|
113
|
+
*
|
|
114
|
+
* ## Example
|
|
115
|
+
* The following example adds a part to the left of the main area, inserts a view and navigates it.
|
|
116
|
+
*
|
|
117
|
+
* ```ts
|
|
118
|
+
* inject(WorkbenchRouter).navigate(layout => layout
|
|
119
|
+
* .addPart('left', {relativeTo: MAIN_AREA, align: 'left'})
|
|
120
|
+
* .addView('navigator', {partId: 'left'})
|
|
121
|
+
* .navigateView('navigator', ['path/to/view'])
|
|
122
|
+
* .activateView('navigator')
|
|
123
|
+
* );
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* @param layout - Reference to the current workbench layout for modification.
|
|
127
|
+
* @return Modified layout, or `null` to cancel navigation.
|
|
128
|
+
*/
|
|
129
|
+
export type NavigateFn = (layout: WorkbenchLayout) => Promise<WorkbenchLayout | null> | WorkbenchLayout | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UrlSegment } from '@angular/router';
|
|
2
|
+
/**
|
|
3
|
+
* Matches an array of URL segments against another array of URL segments.
|
|
4
|
+
*
|
|
5
|
+
* Flags:
|
|
6
|
+
* - matchWildcardPath: Indicates if wildcard path matching is enabled. If enabled, the asterisk `*` path matches any path of a segment.
|
|
7
|
+
* - matchMatrixParams: Controls whether to match matrix parameters.
|
|
8
|
+
*/
|
|
9
|
+
export declare class UrlSegmentMatcher {
|
|
10
|
+
private _pattern;
|
|
11
|
+
private _flags;
|
|
12
|
+
constructor(_pattern: UrlSegment[], _flags: {
|
|
13
|
+
matchWildcardPath: boolean;
|
|
14
|
+
matchMatrixParams: boolean;
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* Matches given array of URL segments.
|
|
18
|
+
*/
|
|
19
|
+
matches(segments: UrlSegment[]): boolean;
|
|
20
|
+
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { CanMatchFn, Router, Routes } from '@angular/router';
|
|
3
|
+
import { WorkbenchConfig } from '../workbench-config';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
/**
|
|
4
|
-
*
|
|
6
|
+
* Facilitates the registration of auxiliary routes of top-level routes.
|
|
5
7
|
*/
|
|
6
8
|
export declare class WorkbenchAuxiliaryRoutesRegistrator {
|
|
9
|
+
private _workbenchConfig;
|
|
7
10
|
private _router;
|
|
8
|
-
constructor(_router: Router);
|
|
11
|
+
constructor(_workbenchConfig: WorkbenchConfig, _router: Router);
|
|
9
12
|
/**
|
|
10
|
-
* Registers an auxiliary route for
|
|
11
|
-
* primary routes to be used in named router outlets.
|
|
13
|
+
* Registers an auxiliary route for each top-level route, enabling navigation in the specified router outlet(s).
|
|
12
14
|
*
|
|
13
|
-
* @param
|
|
14
|
-
* @param config of the auxiliary
|
|
15
|
+
* @param outlets - Specifies outlets for which to create auxiliary routes.
|
|
16
|
+
* @param config - Specifies the config of the auxiliary routes.
|
|
15
17
|
*/
|
|
16
|
-
|
|
18
|
+
registerAuxiliaryRoutes(outlets: string[], config?: AuxiliaryRouteConfig): Routes;
|
|
17
19
|
/**
|
|
18
|
-
* Unregisters
|
|
20
|
+
* Unregisters auxiliary routes for the given outlet.
|
|
19
21
|
*/
|
|
20
|
-
|
|
22
|
+
unregisterAuxiliaryRoutes(outlets: string[]): void;
|
|
21
23
|
/**
|
|
22
24
|
* Replaces the router configuration to install or uninstall auxiliary routes.
|
|
23
25
|
*/
|
|
@@ -26,10 +28,18 @@ export declare class WorkbenchAuxiliaryRoutesRegistrator {
|
|
|
26
28
|
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchAuxiliaryRoutesRegistrator>;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
31
|
+
* Configures auxiliary routes.
|
|
30
32
|
*/
|
|
31
|
-
export interface
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
export interface AuxiliaryRouteConfig {
|
|
34
|
+
/**
|
|
35
|
+
* Specifies "CanMatch" guard(s) to install on the wildcard route (`**`),
|
|
36
|
+
* selected by the router if no route matches the requested URL.
|
|
37
|
+
*/
|
|
38
|
+
canMatchNotFoundPage?: Array<CanMatchFn>;
|
|
35
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* DI token to inject the outlet name of a workbench auxiliary route.
|
|
42
|
+
*
|
|
43
|
+
* Can be injected in a `CanMatch` guard to obtain a reference to the workbench element.
|
|
44
|
+
*/
|
|
45
|
+
export declare const WORKBENCH_AUXILIARY_ROUTE_OUTLET: InjectionToken<string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IterableChanges, IterableDiffers } from '@angular/core';
|
|
2
2
|
import { ɵWorkbenchLayout } from '../layout/ɵworkbench-layout';
|
|
3
3
|
import { UrlTree } from '@angular/router';
|
|
4
|
+
import { ViewId } from '../view/workbench-view.model';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* Stateful differ for finding added/removed workbench layout elements.
|
|
@@ -8,7 +9,6 @@ import * as i0 from "@angular/core";
|
|
|
8
9
|
export declare class WorkbenchLayoutDiffer {
|
|
9
10
|
private _partsDiffer;
|
|
10
11
|
private _viewsDiffer;
|
|
11
|
-
private _viewOutletsDiffer;
|
|
12
12
|
constructor(differs: IterableDiffers);
|
|
13
13
|
/**
|
|
14
14
|
* Computes differences in the layout since last time {@link WorkbenchLayoutDiffer#diff} was invoked.
|
|
@@ -23,14 +23,11 @@ export declare class WorkbenchLayoutDiffer {
|
|
|
23
23
|
export declare class WorkbenchLayoutDiff {
|
|
24
24
|
readonly addedParts: string[];
|
|
25
25
|
readonly removedParts: string[];
|
|
26
|
-
readonly addedViews:
|
|
27
|
-
readonly removedViews:
|
|
28
|
-
readonly addedViewOutlets: string[];
|
|
29
|
-
readonly removedViewOutlets: string[];
|
|
26
|
+
readonly addedViews: `view.${number}`[];
|
|
27
|
+
readonly removedViews: `view.${number}`[];
|
|
30
28
|
constructor(changes: {
|
|
31
29
|
parts: IterableChanges<string> | null;
|
|
32
|
-
views: IterableChanges<
|
|
33
|
-
viewOutlets: IterableChanges<string> | null;
|
|
30
|
+
views: IterableChanges<ViewId> | null;
|
|
34
31
|
});
|
|
35
32
|
toString(): string;
|
|
36
33
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IterableChanges, IterableDiffers } from '@angular/core';
|
|
2
|
+
import { UrlTree } from '@angular/router';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Stateful differ for finding added/removed message boxes.
|
|
6
|
+
*/
|
|
7
|
+
export declare class WorkbenchMessageBoxDiffer {
|
|
8
|
+
private _messageBoxDiffer;
|
|
9
|
+
constructor(differs: IterableDiffers);
|
|
10
|
+
/**
|
|
11
|
+
* Computes differences in the URL since last time {@link WorkbenchMessageBoxDiffer#diff} was invoked.
|
|
12
|
+
*/
|
|
13
|
+
diff(urlTree: UrlTree): WorkbenchMessageBoxDiff;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchMessageBoxDiffer, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchMessageBoxDiffer>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Lists the message boxes added/removed in the current navigation.
|
|
19
|
+
*/
|
|
20
|
+
export declare class WorkbenchMessageBoxDiff {
|
|
21
|
+
readonly addedMessageBoxOutlets: string[];
|
|
22
|
+
readonly removedMessageBoxOutlets: string[];
|
|
23
|
+
constructor(changes: IterableChanges<string> | null);
|
|
24
|
+
toString(): string;
|
|
25
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Navigation
|
|
2
|
-
import {
|
|
1
|
+
import { Navigation } from '@angular/router';
|
|
2
|
+
import { ViewStates } from './routing.model';
|
|
3
3
|
/**
|
|
4
4
|
* Provides methods to associate {@link WorkbenchNavigationalState} with a navigation.
|
|
5
5
|
*/
|
|
@@ -9,15 +9,11 @@ export declare const WorkbenchNavigationalStates: {
|
|
|
9
9
|
*/
|
|
10
10
|
readonly fromNavigation: (navigation: Navigation) => WorkbenchNavigationalState | null;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* TODO [WB-LAYOUT] Remove when migrated to the new Router API as state is retained in layout.
|
|
15
|
-
*/
|
|
16
|
-
readonly resolveViewState: (viewId: string) => ViewState | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Associates workbench-specific state with given navigation extras.
|
|
12
|
+
* Creates a state object with workbench-specific data that can be passed to a workbench navigation.
|
|
19
13
|
*/
|
|
20
|
-
readonly
|
|
14
|
+
readonly create: (state: WorkbenchNavigationalState) => {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
};
|
|
21
17
|
};
|
|
22
18
|
/**
|
|
23
19
|
* Represents workbench-specific state associated with a navigation.
|
|
@@ -38,12 +34,3 @@ export interface WorkbenchNavigationalState {
|
|
|
38
34
|
*/
|
|
39
35
|
viewStates: ViewStates;
|
|
40
36
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Keys for associating state with a view navigation.
|
|
43
|
-
*/
|
|
44
|
-
export declare const WorkbenchNavigationalViewStates: {
|
|
45
|
-
/**
|
|
46
|
-
* Key for associating CSS class(es) with a view state.
|
|
47
|
-
*/
|
|
48
|
-
readonly cssClass: "ɵcssClass";
|
|
49
|
-
};
|
|
@@ -5,15 +5,25 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const WorkbenchRouteData: {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Property to set the title of a view in {@link Route.data}.
|
|
9
9
|
*/
|
|
10
10
|
readonly title: "ɵworkbenchViewTitle";
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Property to set the heading of a view in {@link Route.data}.
|
|
13
13
|
*/
|
|
14
14
|
readonly heading: "ɵworkbenchViewHeading";
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Property to associate CSS class(es) with a view in {@link Route.data}, e.g., to locate the view in tests.
|
|
17
17
|
*/
|
|
18
18
|
readonly cssClass: "ɵworkbenchViewCssClass";
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*
|
|
22
|
+
* Property to obtain the outlet name of the route. This property is only set on the top-level route.
|
|
23
|
+
*
|
|
24
|
+
* Use if the route's injection context is not available, e.g., in a {@link UrlMatcher}.
|
|
25
|
+
* Otherwise, the outlet can be injected using the {@link WORKBENCH_AUXILIARY_ROUTE_OUTLET} DI token,
|
|
26
|
+
* even in child routes, e.g., in guards.
|
|
27
|
+
*/
|
|
28
|
+
readonly ɵoutlet: "ɵworkbenchOutlet";
|
|
19
29
|
};
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { WorkbenchRouter } from './workbench-router.service';
|
|
3
3
|
import { LocationStrategy } from '@angular/common';
|
|
4
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
5
|
import { WorkbenchView } from '../view/workbench-view.model';
|
|
6
|
+
import { Commands, WorkbenchNavigationExtras } from './routing.model';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
|
-
* Like 'RouterLink' but with functionality to
|
|
9
|
+
* Like the Angular 'RouterLink' directive but with functionality to navigate a view.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* Use this directive to navigate the current view. If the user presses the CTRL key (Mac: ⌘, Windows: ⊞), this directive will open a new view.
|
|
12
|
+
*
|
|
13
|
+
* ```html
|
|
14
|
+
* <a [wbRouterLink]="['../path/to/view']">Link</a>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* You can override the default behavior by setting an explicit navigation target in navigation extras.
|
|
18
|
+
*
|
|
19
|
+
* ```html
|
|
20
|
+
* <a [wbRouterLink]="['../path/to/view']" [wbRouterLinkExtras]="{target: 'blank'}">Link</a>
|
|
21
|
+
* ```
|
|
12
22
|
*
|
|
13
23
|
* By default, navigation is relative to the currently activated route, if any.
|
|
24
|
+
*
|
|
14
25
|
* Prepend the path with a forward slash '/' to navigate absolutely, or set `relativeTo` property in navigational extras to `null`.
|
|
26
|
+
*
|
|
27
|
+
* ```html
|
|
28
|
+
* <a [wbRouterLink]="['/path/to/view']">Link</a>
|
|
29
|
+
* ```
|
|
15
30
|
*/
|
|
16
31
|
export declare class WorkbenchRouterLinkDirective implements OnChanges, OnDestroy {
|
|
17
32
|
private _workbenchRouter;
|
|
@@ -25,14 +40,14 @@ export declare class WorkbenchRouterLinkDirective implements OnChanges, OnDestro
|
|
|
25
40
|
private _ngOnChange$;
|
|
26
41
|
private _ngOnDestroy$;
|
|
27
42
|
href: string | null;
|
|
28
|
-
set wbRouterLink(commands:
|
|
29
|
-
set extras(extras: WorkbenchNavigationExtras | undefined);
|
|
43
|
+
set wbRouterLink(commands: Commands | string | undefined | null);
|
|
44
|
+
set extras(extras: Omit<WorkbenchNavigationExtras, 'close'> | undefined);
|
|
30
45
|
constructor(_workbenchRouter: WorkbenchRouter, _router: Router, _route: ActivatedRoute, _locationStrategy: LocationStrategy, _cd: ChangeDetectorRef, host: ElementRef, _view: WorkbenchView | null);
|
|
31
46
|
onClick(button: number, ctrlKey: boolean, metaKey: boolean): boolean;
|
|
32
47
|
/**
|
|
33
48
|
* Computes navigation extras based on the given extras and this directive's injection context.
|
|
34
49
|
*/
|
|
35
|
-
protected computeNavigationExtras(ctrlKey?: boolean, metaKey?: boolean): WorkbenchNavigationExtras
|
|
50
|
+
protected computeNavigationExtras(ctrlKey?: boolean, metaKey?: boolean): Omit<WorkbenchNavigationExtras, 'close'>;
|
|
36
51
|
/**
|
|
37
52
|
* Updates the link's href based on given array of commands and navigation extras.
|
|
38
53
|
*/
|
|
@@ -1,165 +1,65 @@
|
|
|
1
|
-
import { NavigationExtras
|
|
2
|
-
import {
|
|
3
|
-
import { WorkbenchLayoutService } from '../layout/workbench-layout.service';
|
|
4
|
-
import { WorkbenchViewRegistry } from '../view/workbench-view.registry';
|
|
5
|
-
import { ɵWorkbenchLayout } from '../layout/ɵworkbench-layout';
|
|
6
|
-
import { Commands, ViewState, ViewStates } from './routing.model';
|
|
1
|
+
import { NavigationExtras } from '@angular/router';
|
|
2
|
+
import { Commands, NavigateFn, WorkbenchNavigationExtras } from './routing.model';
|
|
7
3
|
import * as i0 from "@angular/core";
|
|
8
4
|
/**
|
|
9
|
-
*
|
|
5
|
+
* Enables navigation of workbench views and modification of the workbench layout.
|
|
6
|
+
*
|
|
7
|
+
* A view is a visual workbench element for displaying content side-by-side or stacked. A view can be navigated to any route.
|
|
8
|
+
*
|
|
9
|
+
* A view can inject `ActivatedRoute` to obtain parameters passed to the navigation and/or read data associated with the route.
|
|
10
10
|
*/
|
|
11
|
-
export declare class WorkbenchRouter
|
|
12
|
-
private _router;
|
|
13
|
-
private _viewRegistry;
|
|
14
|
-
private _workbenchLayoutService;
|
|
15
|
-
private _zone;
|
|
16
|
-
private _singleTaskExecutor;
|
|
11
|
+
export declare abstract class WorkbenchRouter {
|
|
17
12
|
/**
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
private _currentNavigationContext;
|
|
21
|
-
constructor(_router: Router, _viewRegistry: WorkbenchViewRegistry, _workbenchLayoutService: WorkbenchLayoutService, _zone: NgZone);
|
|
22
|
-
/**
|
|
23
|
-
* Navigates based on the provided array of commands, and is like 'Router.navigate(...)' but with a workbench view as the router outlet target.
|
|
24
|
-
* Navigation is absolute unless providing a `relativeTo` route in navigational extras.
|
|
13
|
+
* Navigates based on the provided array of commands and extras. This method is similar to Angular's `Router.navigate(...)`, but with a view as the navigation target.
|
|
25
14
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* instead of opening the view in a new view tab, e.g., to update matrix parameters.
|
|
15
|
+
* A command can be a string or an object literal. A string represents a path segment, an object literal associates matrix parameters with the preceding segment.
|
|
16
|
+
* Multiple segments can be combined into a single command, separated by a forward slash.
|
|
29
17
|
*
|
|
30
|
-
*
|
|
18
|
+
* By default, navigates existing views that match the path, or opens a new view otherwise. Matrix params do not affect view resolution.
|
|
19
|
+
* This behavior can be changed by setting an explicit navigation target in navigation extras.
|
|
31
20
|
*
|
|
32
|
-
*
|
|
33
|
-
* - Multiple static segments can be merged into one, e.g. `['/team/11/user', userName, {details: true}]`
|
|
34
|
-
* - The first segment name can be prepended with `/`, `./`, or `../`
|
|
35
|
-
* - Matrix parameters can be used to associate optional data with the URL, e.g. `['user', userName, {details: true}]`
|
|
36
|
-
* Matrix parameters are like regular URL parameters, but do not affect route and view resolution. Unlike query parameters, matrix parameters
|
|
37
|
-
* are not global but part of the routing path, which makes them suitable for auxiliary routes.
|
|
21
|
+
* By default, navigation is absolute. Set `relativeTo` in extras for relative navigation.
|
|
38
22
|
*
|
|
39
|
-
*
|
|
23
|
+
* The router supports for closing views matching the routing commands by setting `close` in navigation extras.
|
|
40
24
|
*
|
|
25
|
+
* ### Usage
|
|
41
26
|
* ```
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
27
|
+
* inject(WorkbenchRouter).navigate(['team', 33, 'user', 11]);
|
|
28
|
+
* inject(WorkbenchRouter).navigate(['team/11/user', userName, {details: true}]); // multiple static segments can be merged into one
|
|
29
|
+
* inject(WorkbenchRouter).navigate(['teams', {selection: 33'}]); // matrix parameter `selection` with the value `33`.
|
|
45
30
|
* ```
|
|
46
31
|
*
|
|
47
32
|
* @see WorkbenchRouterLinkDirective
|
|
48
33
|
*/
|
|
49
|
-
navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;
|
|
34
|
+
abstract navigate(commands: Commands, extras?: WorkbenchNavigationExtras): Promise<boolean>;
|
|
50
35
|
/**
|
|
51
|
-
*
|
|
36
|
+
* Performs changes to the current workbench layout.
|
|
52
37
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* @param extras - Controls how to perform the navigation.
|
|
56
|
-
*/
|
|
57
|
-
ɵnavigate(onNavigate: (layout: ɵWorkbenchLayout) => Promise<ɵWorkbenchLayout | WorkbenchNavigation | null> | ɵWorkbenchLayout | WorkbenchNavigation | null, extras?: NavigationExtras): Promise<boolean>;
|
|
58
|
-
/**
|
|
59
|
-
* This method name begins with underscores to indicate that it must only be invoked from within {@link SingleTaskExecutor}.
|
|
60
|
-
*/
|
|
61
|
-
private __createUrlTree;
|
|
62
|
-
/**
|
|
63
|
-
* @see normalizeCommands
|
|
64
|
-
*/
|
|
65
|
-
private normalizeOutletCommands;
|
|
66
|
-
/**
|
|
67
|
-
* Normalizes commands to their absolute form.
|
|
38
|
+
* The router will invoke the passed function with the current workbench layout. The layout has methods for modifying it.
|
|
39
|
+
* The layout is immutable, so each modification creates a new instance. Use the instance for further modifications and finally return it.
|
|
68
40
|
*
|
|
69
|
-
*
|
|
70
|
-
* As of Angular 6.x, commands which target a named outlet (auxiliary route) are not normalized, meaning that
|
|
71
|
-
* relative navigational symbols like `/`, `./`, or `../` are not resolved (see `create_url_tree.ts` method: `computeNavigation`).
|
|
41
|
+
* The function can call `inject` to get any required dependencies.
|
|
72
42
|
*
|
|
73
|
-
*
|
|
43
|
+
* ## Workbench Layout
|
|
44
|
+
* The workbench layout is a grid of parts. Parts are aligned relative to each other. A part is a stack of views. Content is displayed in views.
|
|
74
45
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* The resulting commands are in their absolute form and may be used for the effective navigation to target a named router outlet.
|
|
78
|
-
*/
|
|
79
|
-
private normalizeCommands;
|
|
80
|
-
/**
|
|
81
|
-
* Blocks until the initial layout is available, i.e. after completion of Angular's initial navigation.
|
|
82
|
-
*/
|
|
83
|
-
private waitForInitialLayout;
|
|
84
|
-
/**
|
|
85
|
-
* Serializes given commands into valid URL segments.
|
|
86
|
-
*/
|
|
87
|
-
private serializeCommands;
|
|
88
|
-
ngOnDestroy(): void;
|
|
89
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchRouter, never>;
|
|
90
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchRouter>;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Represents the extra options used during navigation.
|
|
94
|
-
*/
|
|
95
|
-
export interface WorkbenchNavigationExtras extends NavigationExtras {
|
|
96
|
-
/**
|
|
97
|
-
* Instructs the router to activate the view. Defaults to `true` if not specified.
|
|
98
|
-
*/
|
|
99
|
-
activate?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Closes the view(s) that match the specified path. Matrix parameters do not affect view resolution.
|
|
102
|
-
* The path supports the asterisk wildcard segment (`*`) to match view(s) with any value in that segment.
|
|
103
|
-
* To close a specific view, set a view target instead of a path.
|
|
104
|
-
*/
|
|
105
|
-
close?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Controls where to open the view.
|
|
108
|
-
*
|
|
109
|
-
* One of:
|
|
110
|
-
* - 'auto': Opens the view in a new view tab if no view is found that matches the specified path. Matrix parameters do not affect
|
|
111
|
-
* view resolution. If one (or more) view(s) match the specified path, they are navigated instead of opening the view
|
|
112
|
-
* in a new view tab, e.g., to update matrix parameters. This is the default behavior if not set.
|
|
113
|
-
* - 'blank': Opens the view in a new view tab.
|
|
114
|
-
* - <view.id>: Navigates the specified view. If already opened, replaces it, or opens the view in a new view tab otherwise.
|
|
115
|
-
* Note that the passed view identifier must start with `view.`, e.g., `view.5`.
|
|
116
|
-
*
|
|
117
|
-
* If not specified, defaults to `auto`.
|
|
118
|
-
*/
|
|
119
|
-
target?: string | 'blank' | 'auto';
|
|
120
|
-
/**
|
|
121
|
-
* Specifies in which part to open the view. By default, if not specified, opens the view in the active part of the main area,
|
|
122
|
-
* if the layout has one, otherwise in the active part of the layout.
|
|
123
|
-
*/
|
|
124
|
-
blankPartId?: string;
|
|
125
|
-
/**
|
|
126
|
-
* Specifies the position where to insert the view into the tab bar when using 'blank' view target strategy.
|
|
127
|
-
* If not specified, the view is inserted after the active view. Set the index to 'start' or 'end' for inserting
|
|
128
|
-
* the view at the beginning or at the end.
|
|
129
|
-
*/
|
|
130
|
-
blankInsertionIndex?: number | 'start' | 'end';
|
|
131
|
-
/**
|
|
132
|
-
* Associates state with a view navigation.
|
|
46
|
+
* ## Example
|
|
47
|
+
* The following example adds a part to the left of the main area, inserts a view and navigates it.
|
|
133
48
|
*
|
|
134
|
-
*
|
|
49
|
+
* ```ts
|
|
50
|
+
* inject(WorkbenchRouter).navigate(layout => layout
|
|
51
|
+
* .addPart('left', {relativeTo: MAIN_AREA, align: 'left'})
|
|
52
|
+
* .addView('navigator', {partId: 'left'})
|
|
53
|
+
* .navigateView('navigator', ['path/to/view'])
|
|
54
|
+
* .activateView('navigator')
|
|
55
|
+
* );
|
|
56
|
+
* ```
|
|
135
57
|
*
|
|
136
|
-
*
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Specifies CSS class(es) to be added to the view, useful in end-to-end tests for locating view and view tab.
|
|
141
|
-
* CSS class(es) will not be added to the browser URL, consequently will not survive a page reload.
|
|
142
|
-
*/
|
|
143
|
-
cssClass?: string | string[];
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Information about a workbench navigation operation.
|
|
147
|
-
*/
|
|
148
|
-
export interface WorkbenchNavigation {
|
|
149
|
-
/**
|
|
150
|
-
* The target layout to apply.
|
|
151
|
-
*/
|
|
152
|
-
layout: ɵWorkbenchLayout;
|
|
153
|
-
/**
|
|
154
|
-
* View outlet delta to apply to the current URL. For each outlet to add, remove, or change,
|
|
155
|
-
* add a property to this dictionary and set the commands to construct the outlet URL.
|
|
156
|
-
* To remove an outlet from the URL, set its commands to `null`.
|
|
157
|
-
*/
|
|
158
|
-
viewOutlets?: {
|
|
159
|
-
[outlet: string]: Commands | null;
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* View states to be associated with the navigation.
|
|
58
|
+
* @param onNavigate - Specifies the callback to modify the layout.
|
|
59
|
+
* @param extras - Controls how to perform the navigation.
|
|
60
|
+
* @see NavigateFn
|
|
163
61
|
*/
|
|
164
|
-
|
|
62
|
+
abstract navigate(onNavigate: NavigateFn, extras?: Omit<NavigationExtras, 'relativeTo' | 'state'>): Promise<boolean>;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchRouter, never>;
|
|
64
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchRouter>;
|
|
165
65
|
}
|