@scion/workbench 19.0.0-beta.3 → 20.0.0-beta.2
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 +2 -2
- package/fesm2022/scion-workbench.mjs +1411 -1330
- package/fesm2022/scion-workbench.mjs.map +1 -1
- package/index.d.ts +5519 -3
- package/package.json +22 -18
- package/lib/activation-instant.provider.d.ts +0 -12
- package/lib/activity/activity-bar/activity-bar.component.d.ts +0 -10
- package/lib/activity/activity-bar/activity-item/activity-item.component.d.ts +0 -16
- package/lib/activity/activity-bar/activity-stack/activity-stack.component.d.ts +0 -10
- package/lib/activity/activity-panel/activity-panel.component.d.ts +0 -41
- package/lib/activity/public_api.d.ts +0 -1
- package/lib/activity/workbench-activity.model.d.ts +0 -110
- package/lib/common/asserts.util.d.ts +0 -13
- package/lib/common/class-list.d.ts +0 -64
- package/lib/common/coerce-observable.pipe.d.ts +0 -12
- package/lib/common/css-class.util.d.ts +0 -5
- package/lib/common/dasherize.util.d.ts +0 -4
- package/lib/common/disposable.d.ts +0 -13
- package/lib/common/dom.util.d.ts +0 -84
- package/lib/common/grid-if-visible.pipe.d.ts +0 -13
- package/lib/common/instanceof.pipe.d.ts +0 -10
- package/lib/common/math.util.d.ts +0 -7
- package/lib/common/null-if-empty.pipe.d.ts +0 -10
- package/lib/common/objects.util.d.ts +0 -29
- package/lib/common/observables.d.ts +0 -26
- package/lib/common/operators.d.ts +0 -13
- package/lib/common/public_api.d.ts +0 -1
- package/lib/common/resolve-when.util.d.ts +0 -9
- package/lib/common/stringify-error.util.d.ts +0 -4
- package/lib/common/throw-error.util.d.ts +0 -4
- package/lib/common/typeof.pipe.d.ts +0 -10
- package/lib/common/uid.util.d.ts +0 -9
- package/lib/common/utility-types.d.ts +0 -6
- package/lib/common//311/265destroy-ref.d.ts +0 -11
- package/lib/communication/workbench-broadcast-channel.d.ts +0 -26
- package/lib/content-projection/content-as-overlay.component.d.ts +0 -60
- package/lib/desktop/desktop.directive.d.ts +0 -37
- package/lib/desktop/public_api.d.ts +0 -1
- package/lib/dialog/dialog-footer/dialog-action-filter.pipe.d.ts +0 -11
- package/lib/dialog/dialog-footer/dialog-footer.component.d.ts +0 -10
- package/lib/dialog/dialog-footer/workbench-dialog-action.directive.d.ts +0 -27
- package/lib/dialog/dialog-footer/workbench-dialog-footer.directive.d.ts +0 -26
- package/lib/dialog/dialog-header/dialog-header.component.d.ts +0 -12
- package/lib/dialog/dialog-header/workbench-dialog-header.directive.d.ts +0 -26
- package/lib/dialog/movable.directive.d.ts +0 -49
- package/lib/dialog/public_api.d.ts +0 -6
- package/lib/dialog/resizable.directive.d.ts +0 -75
- package/lib/dialog/workbench-dialog.component.d.ts +0 -55
- package/lib/dialog/workbench-dialog.d.ts +0 -118
- package/lib/dialog/workbench-dialog.options.d.ts +0 -64
- package/lib/dialog/workbench-dialog.registry.d.ts +0 -43
- package/lib/dialog/workbench-dialog.service.d.ts +0 -96
- package/lib/dialog//311/265workbench-dialog.d.ts +0 -128
- package/lib/dialog//311/265workbench-dialog.service.d.ts +0 -29
- package/lib/executor/latest-task-executor.d.ts +0 -26
- package/lib/executor/single-task-executor.d.ts +0 -23
- package/lib/filter-field/filter-field.component.d.ts +0 -57
- package/lib/glass-pane/blockable.d.ts +0 -11
- package/lib/glass-pane/blocking.d.ts +0 -17
- package/lib/glass-pane/glass-pane.directive.d.ts +0 -51
- package/lib/icon/icon-providers.d.ts +0 -6
- package/lib/icon/icon.component.d.ts +0 -33
- package/lib/icon/material-icon-provider.d.ts +0 -25
- package/lib/icon/public_api.d.ts +0 -1
- package/lib/icon/workbench-icon-provider.d.ts +0 -30
- package/lib/icon/workbench-icon-provider.model.d.ts +0 -64
- package/lib/layout/grid/grid.component.d.ts +0 -65
- package/lib/layout/grid-element/grid-element.component.d.ts +0 -37
- package/lib/layout/layout.component.d.ts +0 -60
- package/lib/layout/migration/model/workbench-grid-migration-v2.model.d.ts +0 -22
- package/lib/layout/migration/model/workbench-grid-migration-v3.model.d.ts +0 -30
- package/lib/layout/migration/model/workbench-grid-migration-v4.model.d.ts +0 -31
- package/lib/layout/migration/model/workbench-grid-migration-v5.model.d.ts +0 -36
- package/lib/layout/migration/model/workbench-grid-migration-v6.model.d.ts +0 -35
- package/lib/layout/migration/model/workbench-grid-migration-v7.model.d.ts +0 -37
- package/lib/layout/migration/model/workbench-layout-migration-v1.model.d.ts +0 -8
- package/lib/layout/migration/model/workbench-layout-migration-v2.model.d.ts +0 -10
- package/lib/layout/migration/model/workbench-layout-migration-v3.model.d.ts +0 -10
- package/lib/layout/migration/model/workbench-layout-migration-v4.model.d.ts +0 -20
- package/lib/layout/migration/workbench-grid-migration-v3.service.d.ts +0 -14
- package/lib/layout/migration/workbench-grid-migration-v4.service.d.ts +0 -12
- package/lib/layout/migration/workbench-grid-migration-v5.service.d.ts +0 -12
- package/lib/layout/migration/workbench-grid-migration-v6.service.d.ts +0 -12
- package/lib/layout/migration/workbench-grid-migration-v7.service.d.ts +0 -10
- package/lib/layout/migration/workbench-layout-migration-v2.service.d.ts +0 -13
- package/lib/layout/migration/workbench-layout-migration-v3.service.d.ts +0 -12
- package/lib/layout/migration/workbench-layout-migration-v4.service.d.ts +0 -12
- package/lib/layout/public_api.d.ts +0 -3
- package/lib/layout/rendering-flag.d.ts +0 -7
- package/lib/layout/stringifier.d.ts +0 -33
- package/lib/layout/workbench-grid.model.d.ts +0 -116
- package/lib/layout/workbench-layout-merger.service.d.ts +0 -19
- package/lib/layout/workbench-layout-storage.service.d.ts +0 -28
- package/lib/layout/workbench-layout.d.ts +0 -518
- package/lib/layout/workbench-layout.factory.d.ts +0 -18
- package/lib/layout/workbench-layout.service.d.ts +0 -57
- package/lib/layout/workbench-layouts.util.d.ts +0 -51
- package/lib/layout/workench-layout-serializer.service.d.ts +0 -110
- package/lib/layout//311/265workbench-layout.d.ts +0 -745
- package/lib/layout//311/265workbench-layout.factory.d.ts +0 -22
- package/lib/logging/console-appender.service.d.ts +0 -10
- package/lib/logging/index.d.ts +0 -5
- package/lib/logging/logger-names.d.ts +0 -22
- package/lib/logging/logger.d.ts +0 -69
- package/lib/logging/logging-support.d.ts +0 -6
- package/lib/logging/logging.model.d.ts +0 -52
- package/lib/logging/public_api.d.ts +0 -2
- package/lib/logging//311/265logger.d.ts +0 -21
- package/lib/message-box/message-box-footer/message-box-footer.component.d.ts +0 -17
- package/lib/message-box/message-box-header/message-box-header.component.d.ts +0 -7
- package/lib/message-box/public_api.d.ts +0 -2
- package/lib/message-box/workbench-message-box.component.d.ts +0 -25
- package/lib/message-box/workbench-message-box.options.d.ts +0 -96
- package/lib/message-box/workbench-message-box.service.d.ts +0 -100
- package/lib/message-box//311/265workbench-message-box.service.d.ts +0 -16
- package/lib/microfrontend-platform/common/microfrontend.util.d.ts +0 -39
- package/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.d.ts +0 -31
- package/lib/microfrontend-platform/initialization/ng-zone-observable-decorator.d.ts +0 -12
- package/lib/microfrontend-platform/initialization/workbench-host-manifest-interceptor.service.d.ts +0 -1
- package/lib/microfrontend-platform/manifest-object-cache.service.d.ts +0 -32
- package/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-capability-validator.interceptor.d.ts +0 -11
- package/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog-intent-handler.interceptor.d.ts +0 -25
- package/lib/microfrontend-platform/microfrontend-dialog/microfrontend-dialog.component.d.ts +0 -32
- package/lib/microfrontend-platform/microfrontend-host-dialog/microfrontend-host-dialog.component.d.ts +0 -32
- package/lib/microfrontend-platform/microfrontend-host-message-box/microfrontend-host-message-box.component.d.ts +0 -37
- package/lib/microfrontend-platform/microfrontend-host-message-box/text-message/text-message.component.d.ts +0 -23
- package/lib/microfrontend-platform/microfrontend-host-popup/microfrontend-host-popup.component.d.ts +0 -23
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-capability-validator.interceptor.d.ts +0 -10
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-intent-handler.interceptor.d.ts +0 -25
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box-legacy-intent-translator.interceptor.d.ts +0 -11
- package/lib/microfrontend-platform/microfrontend-message-box/microfrontend-message-box.component.d.ts +0 -29
- package/lib/microfrontend-platform/microfrontend-notification/microfrontend-notification-intent-handler.d.ts +0 -7
- package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-capability-validator.interceptor.d.ts +0 -10
- package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-installer.service.d.ts +0 -5
- package/lib/microfrontend-platform/microfrontend-perspective/microfrontend-perspective-intent-handler.interceptor.d.ts +0 -17
- package/lib/microfrontend-platform/microfrontend-perspective/workbench-perspective-data.d.ts +0 -9
- package/lib/microfrontend-platform/microfrontend-platform-config-loader.d.ts +0 -13
- package/lib/microfrontend-platform/microfrontend-platform-initializer.provider.d.ts +0 -85
- package/lib/microfrontend-platform/microfrontend-platform.config.d.ts +0 -20
- package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-capability-validator.interceptor.d.ts +0 -10
- package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup-intent-handler.interceptor.d.ts +0 -35
- package/lib/microfrontend-platform/microfrontend-popup/microfrontend-popup.component.d.ts +0 -33
- package/lib/microfrontend-platform/microfrontend-splash/microfrontend-splash.component.d.ts +0 -5
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-view-capability-validator.interceptor.d.ts +0 -10
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-view-command-handler.service.d.ts +0 -5
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-view-intent-handler.interceptor.d.ts +0 -33
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-view-routes.d.ts +0 -56
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-view.component.d.ts +0 -67
- package/lib/microfrontend-platform/microfrontend-view/microfrontend-workbench-view.model.d.ts +0 -14
- package/lib/microfrontend-platform/public_api.d.ts +0 -5
- package/lib/microfrontend-platform/stable-capability-id-assigner.interceptor.d.ts +0 -11
- package/lib/microfrontend-platform/workbench-microfrontend-support.d.ts +0 -7
- package/lib/migration/workbench-migration.d.ts +0 -9
- package/lib/migration/workbench-migrator.d.ts +0 -18
- package/lib/notification/notification-css-classes.pipe.d.ts +0 -13
- package/lib/notification/notification-list.component.d.ts +0 -16
- package/lib/notification/notification.component.d.ts +0 -27
- package/lib/notification/notification.config.d.ts +0 -86
- package/lib/notification/notification.d.ts +0 -32
- package/lib/notification/notification.service.d.ts +0 -49
- package/lib/notification/public_api.d.ts +0 -3
- package/lib/notification/text-notification.component.d.ts +0 -10
- package/lib/notification//311/265notification.d.ts +0 -19
- package/lib/null-content/null-content.component.d.ts +0 -11
- package/lib/page-not-found/page-not-found.component.d.ts +0 -11
- package/lib/part/main-area-part/main-area-part.component.d.ts +0 -41
- package/lib/part/part-action/part-action.component.d.ts +0 -39
- package/lib/part/part-action-bar/part-action.directive.d.ts +0 -62
- package/lib/part/part-bar/part-bar.component.d.ts +0 -29
- package/lib/part/part-portal.pipe.d.ts +0 -17
- package/lib/part/part.component.d.ts +0 -37
- package/lib/part/public_api.d.ts +0 -3
- package/lib/part/view-context-menu/accelerator-format.pipe.d.ts +0 -10
- package/lib/part/view-context-menu/menu-item/menu-item.component.d.ts +0 -39
- package/lib/part/view-context-menu/text/text.component.d.ts +0 -6
- package/lib/part/view-context-menu/view-menu-item.directive.d.ts +0 -75
- package/lib/part/view-context-menu/view-menu.component.d.ts +0 -22
- package/lib/part/view-context-menu/view-menu.service.d.ts +0 -53
- package/lib/part/view-list/view-list.component.d.ts +0 -22
- package/lib/part/view-list-button/view-list-button.component.d.ts +0 -18
- package/lib/part/view-list-item/view-list-item.component.d.ts +0 -13
- package/lib/part/view-tab/view-tab.component.d.ts +0 -35
- package/lib/part/view-tab-bar/view-tab-bar.component.d.ts +0 -164
- package/lib/part/view-tab-content/view-tab-content.component.d.ts +0 -7
- package/lib/part/view-tab-drag-image/view-tab-drag-image.component.d.ts +0 -38
- package/lib/part/workbench-part-action.registry.d.ts +0 -7
- package/lib/part/workbench-part.model.d.ts +0 -111
- package/lib/part/workbench-part.registry.d.ts +0 -7
- package/lib/part//311/265workbench-part.model.d.ts +0 -104
- package/lib/perspective/public_api.d.ts +0 -1
- package/lib/perspective/workbench-perspective-view-conflict-resolver.service.d.ts +0 -18
- package/lib/perspective/workbench-perspective.model.d.ts +0 -91
- package/lib/perspective/workbench-perspective.registry.d.ts +0 -7
- package/lib/perspective/workbench-perspective.service.d.ts +0 -73
- package/lib/perspective//311/265workbench-perspective.model.d.ts +0 -72
- package/lib/popup/popup.component.d.ts +0 -26
- package/lib/popup/popup.config.d.ts +0 -188
- package/lib/popup/popup.origin.d.ts +0 -44
- package/lib/popup/popup.service.d.ts +0 -58
- package/lib/popup/public_api.d.ts +0 -3
- package/lib/portal/wb-component-portal.d.ts +0 -81
- package/lib/portal/workbench-portal-outlet.directive.d.ts +0 -32
- package/lib/public_api.d.ts +0 -25
- package/lib/registry/workbench-object-registry.d.ts +0 -51
- package/lib/routing/empty-outlet/empty-outlet.component.d.ts +0 -15
- package/lib/routing/public_api.d.ts +0 -5
- package/lib/routing/router-outlet-root-context.directive.d.ts +0 -10
- package/lib/routing/routing.model.d.ts +0 -156
- package/lib/routing/routing.util.d.ts +0 -116
- package/lib/routing/url-segment-matcher.d.ts +0 -20
- package/lib/routing/workbench-auxiliary-route-installer.service.d.ts +0 -44
- package/lib/routing/workbench-layout-differ.d.ts +0 -33
- package/lib/routing/workbench-navigational-states.d.ts +0 -48
- package/lib/routing/workbench-outlet-differ.d.ts +0 -48
- package/lib/routing/workbench-route-data.d.ts +0 -33
- package/lib/routing/workbench-route-guards.d.ts +0 -62
- package/lib/routing/workbench-router-link.directive.d.ts +0 -46
- package/lib/routing/workbench-router.service.d.ts +0 -66
- package/lib/routing/workbench-url-observer.service.d.ts +0 -73
- package/lib/routing//311/265location.d.ts +0 -8
- package/lib/routing//311/265workbench-router.service.d.ts +0 -78
- package/lib/startup/public_api.d.ts +0 -4
- package/lib/startup/splash/splash.component.d.ts +0 -8
- package/lib/startup/workbench-initializer.d.ts +0 -168
- package/lib/startup/workbench-launcher.service.d.ts +0 -63
- package/lib/startup/workbench-startup.service.d.ts +0 -37
- package/lib/startup//311/265workbench-launcher.service.d.ts +0 -19
- package/lib/startup//311/265workbench-startup.service.d.ts +0 -16
- package/lib/storage/public_api.d.ts +0 -1
- package/lib/storage/workbench-storage.d.ts +0 -16
- package/lib/text/public_api.d.ts +0 -1
- package/lib/text/text-providers.d.ts +0 -6
- package/lib/text/text.d.ts +0 -30
- package/lib/text/text.pipe.d.ts +0 -24
- package/lib/text/workbench-text-provider.d.ts +0 -7
- package/lib/text/workbench-text-provider.model.d.ts +0 -40
- package/lib/text/workbench-view-menu-config-text-provider.d.ts +0 -8
- package/lib/theme/workbench-theme-switcher.service.d.ts +0 -27
- package/lib/view/public_api.d.ts +0 -1
- package/lib/view/view-context-provider.d.ts +0 -6
- package/lib/view/view-move-handler.service.d.ts +0 -27
- package/lib/view/view-portal.pipe.d.ts +0 -14
- package/lib/view/view.component.d.ts +0 -32
- package/lib/view/workbench-view-menu-item.registry.d.ts +0 -7
- package/lib/view/workbench-view.model.d.ts +0 -226
- package/lib/view/workbench-view.registry.d.ts +0 -7
- package/lib/view//311/265workbench-view.model.d.ts +0 -156
- package/lib/view-dnd/grid-drop-targets.util.d.ts +0 -22
- package/lib/view-dnd/requires-drop-zone.pipe.d.ts +0 -13
- package/lib/view-dnd/view-drag.service.d.ts +0 -254
- package/lib/view-dnd/view-drop-placeholder-renderer.service.d.ts +0 -27
- package/lib/view-dnd/view-drop-zone.directive.d.ts +0 -112
- package/lib/view-dnd/view-tab-drag-image-renderer.service.d.ts +0 -57
- package/lib/workbench-config.d.ts +0 -339
- package/lib/workbench-element-references.d.ts +0 -17
- package/lib/workbench-id.d.ts +0 -7
- package/lib/workbench.component.d.ts +0 -41
- package/lib/workbench.constants.d.ts +0 -73
- package/lib/workbench.model.d.ts +0 -220
- package/lib/workbench.provider.d.ts +0 -89
- package/lib/workbench.service.d.ts +0 -193
- package/lib//311/265workbench.service.d.ts +0 -54
- package/public-api.d.ts +0 -4
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { ViewId } from '../view/workbench-view.model';
|
|
2
|
-
import { NavigationData } from '../routing/routing.model';
|
|
3
|
-
import { PartId } from '../part/workbench-part.model';
|
|
4
|
-
import { ActivityId } from '../activity/workbench-activity.model';
|
|
5
|
-
/**
|
|
6
|
-
* Represents the arrangement of parts as grid.
|
|
7
|
-
*
|
|
8
|
-
* The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.
|
|
9
|
-
*/
|
|
10
|
-
export interface MPartGrid {
|
|
11
|
-
root: MTreeNode | MPart;
|
|
12
|
-
activePartId: PartId;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* {@link MPartGrid} with additional fields not serialized into the URL.
|
|
16
|
-
*/
|
|
17
|
-
export interface ɵMPartGrid extends MPartGrid {
|
|
18
|
-
/**
|
|
19
|
-
* Indicates if this grid was migrated from an older version.
|
|
20
|
-
*/
|
|
21
|
-
migrated?: true;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Represents a node in the grid.
|
|
25
|
-
*
|
|
26
|
-
* A node contains two children, which are either a {@link MPart} or a {@link MTreeNode}, respectively.
|
|
27
|
-
* The ratio together with the direction describes how to arrange the two children.
|
|
28
|
-
*
|
|
29
|
-
* The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.
|
|
30
|
-
*/
|
|
31
|
-
export declare class MTreeNode {
|
|
32
|
-
/**
|
|
33
|
-
* Discriminator to unmarshall {@link MTreeNode} to its class type.
|
|
34
|
-
*/
|
|
35
|
-
readonly type = "MTreeNode";
|
|
36
|
-
id: string;
|
|
37
|
-
child1: MTreeNode | MPart;
|
|
38
|
-
child2: MTreeNode | MPart;
|
|
39
|
-
ratio: number;
|
|
40
|
-
direction: 'column' | 'row';
|
|
41
|
-
parent?: MTreeNode;
|
|
42
|
-
constructor(treeNode: Omit<MTreeNode, 'type'>);
|
|
43
|
-
/**
|
|
44
|
-
* Tests if the given object is a {@link MTreeNode}.
|
|
45
|
-
*/
|
|
46
|
-
static isMTreeNode(object: unknown): object is MTreeNode;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Represents a part in the grid.
|
|
50
|
-
*
|
|
51
|
-
* A part can be a stack of views or display content.
|
|
52
|
-
*
|
|
53
|
-
* The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.
|
|
54
|
-
*/
|
|
55
|
-
export declare class MPart {
|
|
56
|
-
/**
|
|
57
|
-
* Discriminator to unmarshall {@link MPart} to its class type.
|
|
58
|
-
*/
|
|
59
|
-
readonly type = "MPart";
|
|
60
|
-
id: PartId;
|
|
61
|
-
alternativeId?: string;
|
|
62
|
-
title?: string;
|
|
63
|
-
parent?: MTreeNode;
|
|
64
|
-
views: MView[];
|
|
65
|
-
activeViewId?: ViewId;
|
|
66
|
-
structural: boolean;
|
|
67
|
-
cssClass?: string[];
|
|
68
|
-
navigation?: {
|
|
69
|
-
id: string;
|
|
70
|
-
hint?: string;
|
|
71
|
-
data?: NavigationData;
|
|
72
|
-
cssClass?: string[];
|
|
73
|
-
};
|
|
74
|
-
constructor(part: Omit<MPart, 'type'>);
|
|
75
|
-
/**
|
|
76
|
-
* Tests if the given object is a {@link MPart}.
|
|
77
|
-
*/
|
|
78
|
-
static isMPart(object: unknown): object is MPart;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Represents a view contained in a {@link MPart}.
|
|
82
|
-
*
|
|
83
|
-
* The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.
|
|
84
|
-
*/
|
|
85
|
-
export interface MView {
|
|
86
|
-
id: ViewId;
|
|
87
|
-
alternativeId?: string;
|
|
88
|
-
cssClass?: string[];
|
|
89
|
-
markedForRemoval?: true;
|
|
90
|
-
navigation?: {
|
|
91
|
-
id: string;
|
|
92
|
-
hint?: string;
|
|
93
|
-
data?: NavigationData;
|
|
94
|
-
cssClass?: string[];
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Grids referenced in the workbench layout.
|
|
99
|
-
*/
|
|
100
|
-
export interface WorkbenchGrids<T = ɵMPartGrid> {
|
|
101
|
-
/**
|
|
102
|
-
* Reference to the "root" grid of the workbench layout.
|
|
103
|
-
*/
|
|
104
|
-
main: T;
|
|
105
|
-
/**
|
|
106
|
-
* Reference to the main area grid, a sub-grid embedded by the main area part contained in the main grid.
|
|
107
|
-
*/
|
|
108
|
-
mainArea?: T;
|
|
109
|
-
/**
|
|
110
|
-
* Grids associated with activities.
|
|
111
|
-
*
|
|
112
|
-
* An activity has at least one part, the reference part, specified when creating the activity (docked part).
|
|
113
|
-
* Removing the reference part removes the activity. Most activities have a grid with only the reference part.
|
|
114
|
-
*/
|
|
115
|
-
[activityId: ActivityId]: T;
|
|
116
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ɵWorkbenchLayout } from './ɵworkbench-layout';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Performs a three-way merge of the local and remote layouts, using the base layout (common ancestor) as the base of the merge operation.
|
|
5
|
-
*
|
|
6
|
-
* TODO [#452] This implementation discards local changes when a new layout is available.
|
|
7
|
-
*/
|
|
8
|
-
export declare class WorkbenchLayoutMerger {
|
|
9
|
-
/**
|
|
10
|
-
* Performs a merge of given local and remote layouts, using the base layout as the common ancestor.
|
|
11
|
-
*/
|
|
12
|
-
merge(layouts: {
|
|
13
|
-
local: ɵWorkbenchLayout;
|
|
14
|
-
remote: ɵWorkbenchLayout;
|
|
15
|
-
base: ɵWorkbenchLayout;
|
|
16
|
-
}): ɵWorkbenchLayout;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchLayoutMerger, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchLayoutMerger>;
|
|
19
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { MWorkbenchLayout } from './workbench-layout';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Provides API for reading and writing the workbench layout to storage.
|
|
5
|
-
*/
|
|
6
|
-
export declare class WorkbenchLayoutStorageService {
|
|
7
|
-
private readonly _storage;
|
|
8
|
-
private readonly _workbenchLayoutSerializer;
|
|
9
|
-
private readonly _logger;
|
|
10
|
-
/**
|
|
11
|
-
* Loads specified layout from storage, applying necessary migrations if the serialized layout is outdated.
|
|
12
|
-
*/
|
|
13
|
-
load(perspectiveId: string): Promise<MWorkbenchLayout | null>;
|
|
14
|
-
/**
|
|
15
|
-
* Stores specified layout to storage.
|
|
16
|
-
*/
|
|
17
|
-
store(perspectiveId: string, layout: MWorkbenchLayout): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Reads the id of the active perspective from storage.
|
|
20
|
-
*/
|
|
21
|
-
loadActivePerspectiveId(): Promise<string | null>;
|
|
22
|
-
/**
|
|
23
|
-
* Writes the id of the active perspective to storage.
|
|
24
|
-
*/
|
|
25
|
-
storeActivePerspectiveId(perspectiveId: string): Promise<void>;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WorkbenchLayoutStorageService, never>;
|
|
27
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WorkbenchLayoutStorageService>;
|
|
28
|
-
}
|
|
@@ -1,518 +0,0 @@
|
|
|
1
|
-
import { Commands, NavigationData, NavigationState } from '../routing/routing.model';
|
|
2
|
-
import { ActivatedRoute } from '@angular/router';
|
|
3
|
-
import { ActivityId } from '../activity/workbench-activity.model';
|
|
4
|
-
import { Translatable } from '../text/workbench-text-provider.model';
|
|
5
|
-
import { WorkbenchLayoutFactory } from './workbench-layout.factory';
|
|
6
|
-
/**
|
|
7
|
-
* The workbench layout is an arrangement of parts and views. Parts can be docked to the side or positioned relative to each other.
|
|
8
|
-
* Views are stacked in parts and can be dragged to other parts. Content can be displayed in both parts and views.
|
|
9
|
-
*
|
|
10
|
-
* A typical workbench application has a main area part and other parts docked to the side, providing navigation and context-sensitive assistance to
|
|
11
|
-
* support the user's workflow.
|
|
12
|
-
*
|
|
13
|
-
* Multiple layouts, called perspectives, can be created. Users can switch between perspectives. Perspectives share the same main area, if any.
|
|
14
|
-
*
|
|
15
|
-
* The layout has methods for modifying it. The layout is immutable; each modification creates a new instance.
|
|
16
|
-
*/
|
|
17
|
-
export interface WorkbenchLayout {
|
|
18
|
-
/**
|
|
19
|
-
* Adds a part with the given id to this layout. Position and size are expressed relative to a reference part.
|
|
20
|
-
*
|
|
21
|
-
* A part can also be aligned relative to a docked part, enabling inline layouts within docked parts, such as splitting the docked parts into multiple sections.
|
|
22
|
-
*
|
|
23
|
-
* @param id - The id of the part to add. Use {@link MAIN_AREA} to add the main area.
|
|
24
|
-
* @param relativeTo - Specifies the reference part to lay out the part.
|
|
25
|
-
* @param extras - Controls how to add the part to the layout.
|
|
26
|
-
* @return a copy of this layout with the part added.
|
|
27
|
-
*/
|
|
28
|
-
addPart(id: string | MAIN_AREA, relativeTo: ReferencePart, extras?: PartExtras): WorkbenchLayout;
|
|
29
|
-
/**
|
|
30
|
-
* Adds a part with the given id to this layout, docking it to the specified docking area.
|
|
31
|
-
*
|
|
32
|
-
* Docked parts can be minimized to create more space for the main content. Users cannot drag views into or out of docked parts.
|
|
33
|
-
*
|
|
34
|
-
* A part can be docked to the left, right, or bottom side of the workbench.
|
|
35
|
-
* Each side has two docking areas: `left-top` and `left-bottom`, `right-top` and `right-bottom`, and `bottom-left` and `bottom-right`.
|
|
36
|
-
* Parts added to the same area are stacked, with only one part active per stack. If there is an active part in both stacks of a side,
|
|
37
|
-
* the two parts are split vertically or horizontally, depending on the side.
|
|
38
|
-
*
|
|
39
|
-
* A docked part may be navigated to display content, have views, or define a layout with multiple parts aligned relative to each other.
|
|
40
|
-
*
|
|
41
|
-
* @param id - The id of the part to add.
|
|
42
|
-
* @param dockTo - Controls to which area to dock the part.
|
|
43
|
-
* @param extras - Controls how to add the part to the layout.
|
|
44
|
-
* @return a copy of this layout with the part added.
|
|
45
|
-
*/
|
|
46
|
-
addPart(id: string, dockTo: DockingArea, extras: DockedPartExtras): WorkbenchLayout;
|
|
47
|
-
/**
|
|
48
|
-
* Navigates the specified part based on the provided array of commands and extras.
|
|
49
|
-
*
|
|
50
|
-
* Navigating a part displays content when its view stack is empty. A navigated part can still have views but won't display
|
|
51
|
-
* navigated content unless its view stack is empty. Views cannot be dragged into parts displaying navigated content, except
|
|
52
|
-
* for the main area part.
|
|
53
|
-
*
|
|
54
|
-
* 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.
|
|
55
|
-
* Multiple segments can be combined into a single command, separated by a forward slash.
|
|
56
|
-
*
|
|
57
|
-
* By default, navigation is absolute. Set `relativeTo` in extras for relative navigation.
|
|
58
|
-
*
|
|
59
|
-
* Usage:
|
|
60
|
-
* ```
|
|
61
|
-
* layout.navigatePart(partId, ['path', 'to', 'part', {param 'value'}]);
|
|
62
|
-
* layout.navigatePart(partId, ['path/to/part', {param: 'value'}]);
|
|
63
|
-
* ```
|
|
64
|
-
*
|
|
65
|
-
* @param id - Identifies the part for navigation.
|
|
66
|
-
* @param commands - Instructs the router which route to navigate to.
|
|
67
|
-
* @param extras - Controls navigation:
|
|
68
|
-
* @param extras.hint - Allows differentiation between routes with identical paths.
|
|
69
|
-
* Multiple parts can navigate to the same path but still resolve to different routes, e.g., the empty path route to maintain a clean URL.
|
|
70
|
-
*
|
|
71
|
-
* Example:
|
|
72
|
-
* ```ts
|
|
73
|
-
* import {canMatchWorkbenchPart} from '@scion/workbench';
|
|
74
|
-
*
|
|
75
|
-
* const routes = [
|
|
76
|
-
* {
|
|
77
|
-
* path: '',
|
|
78
|
-
* component: Part1Component,
|
|
79
|
-
* canMatch: [canMatchWorkbenchPart('hint-1')], // matches navigations with hint 'hint-1'
|
|
80
|
-
* },
|
|
81
|
-
* {
|
|
82
|
-
* path: '',
|
|
83
|
-
* component: Part2Component,
|
|
84
|
-
* canMatch: [canMatchWorkbenchPart('hint-2')], // matches navigations with hint 'hint-1'
|
|
85
|
-
* },
|
|
86
|
-
* ];
|
|
87
|
-
* ```
|
|
88
|
-
* @param extras.relativeTo - Specifies the route for relative navigation, supporting navigational symbols such as '/', './', or '../' in the commands.
|
|
89
|
-
* @param extras.data - Associates data with the navigation.
|
|
90
|
-
* Unlike matrix parameters, navigation data is stored in the layout and not added to the URL, allowing data to be passed to empty path navigations.
|
|
91
|
-
* Data must be JSON serializable. Data can be read from {@link WorkbenchPart.navigation.data}.
|
|
92
|
-
* @param extras.state - Passes state to the navigation.
|
|
93
|
-
* State is not persistent, unlike {@link data}; however, state is added to the browser's session history to support back/forward browser navigation.
|
|
94
|
-
* State can be read from {@link WorkbenchPart.navigation.state} or from the browser's session history via `history.state`.
|
|
95
|
-
* @param extras.cssClass - Specifies CSS class(es) to add to the part, e.g., to locate the part in tests.
|
|
96
|
-
* @return a copy of this layout with the part navigated.
|
|
97
|
-
*/
|
|
98
|
-
navigatePart(id: string, commands: Commands, extras?: {
|
|
99
|
-
hint?: string;
|
|
100
|
-
relativeTo?: ActivatedRoute;
|
|
101
|
-
data?: NavigationData;
|
|
102
|
-
state?: NavigationState;
|
|
103
|
-
cssClass?: string | string[];
|
|
104
|
-
}): WorkbenchLayout;
|
|
105
|
-
/**
|
|
106
|
-
* Adds a view to the specified part.
|
|
107
|
-
*
|
|
108
|
-
* @param id - The id of the view to add.
|
|
109
|
-
* @param extras - Controls how to add the view to the layout.
|
|
110
|
-
* @param extras.partId - References the part to which to add the view.
|
|
111
|
-
* @param extras.position - Specifies the position where to insert the view. The position is zero-based. Defaults to `end`.
|
|
112
|
-
* @param extras.activateView - Controls whether to activate the view. Defaults to `false`.
|
|
113
|
-
* @param extras.activatePart - Controls whether to activate the part that contains the view. Defaults to `false`.
|
|
114
|
-
* @param extras.cssClass - Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.
|
|
115
|
-
* @return a copy of this layout with the view added.
|
|
116
|
-
*/
|
|
117
|
-
addView(id: string, extras: {
|
|
118
|
-
partId: string;
|
|
119
|
-
position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view';
|
|
120
|
-
activateView?: boolean;
|
|
121
|
-
activatePart?: boolean;
|
|
122
|
-
cssClass?: string | string[];
|
|
123
|
-
}): WorkbenchLayout;
|
|
124
|
-
/**
|
|
125
|
-
* Navigates the specified view based on the provided array of commands and extras.
|
|
126
|
-
*
|
|
127
|
-
* 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.
|
|
128
|
-
* Multiple segments can be combined into a single command, separated by a forward slash.
|
|
129
|
-
*
|
|
130
|
-
* By default, navigation is absolute. Set `relativeTo` in extras for relative navigation.
|
|
131
|
-
*
|
|
132
|
-
* Usage:
|
|
133
|
-
* ```
|
|
134
|
-
* layout.navigateView(viewId, ['path', 'to', 'view', {param 'value'}]);
|
|
135
|
-
* layout.navigateView(viewId, ['path/to/view', {param: 'value'}]);
|
|
136
|
-
* ```
|
|
137
|
-
*
|
|
138
|
-
* @param id - Identifies the view for navigation.
|
|
139
|
-
* @param commands - Instructs the router which route to navigate to.
|
|
140
|
-
* @param extras - Controls navigation:
|
|
141
|
-
* @param extras.hint - Allows differentiation between routes with identical paths.
|
|
142
|
-
* Multiple views can navigate to the same path but still resolve to different routes, e.g., the empty path route to maintain a clean URL.
|
|
143
|
-
* 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.
|
|
144
|
-
*
|
|
145
|
-
* Example route config matching routes based on the hint passed to the navigation:
|
|
146
|
-
* ```ts
|
|
147
|
-
* import {canMatchWorkbenchView} from '@scion/workbench';
|
|
148
|
-
*
|
|
149
|
-
* const routes = [
|
|
150
|
-
* {
|
|
151
|
-
* path: '',
|
|
152
|
-
* component: View1Component,
|
|
153
|
-
* canMatch: [canMatchWorkbenchView('hint-1')], // matches navigations with hint 'hint-1'
|
|
154
|
-
* },
|
|
155
|
-
* {
|
|
156
|
-
* path: '',
|
|
157
|
-
* component: View2Component,
|
|
158
|
-
* canMatch: [canMatchWorkbenchView('hint-2')], // matches navigations with hint 'hint-2'
|
|
159
|
-
* },
|
|
160
|
-
* ];
|
|
161
|
-
* ```
|
|
162
|
-
* @param extras.relativeTo - Specifies the route for relative navigation, supporting navigational symbols such as '/', './', or '../' in the commands.
|
|
163
|
-
* @param extras.data - Associates data with the navigation.
|
|
164
|
-
* Unlike matrix parameters, navigation data is stored in the layout and not added to the URL, allowing data to be passed to empty path navigations.
|
|
165
|
-
* Data must be JSON serializable. Data can be read from {@link WorkbenchView.navigation.data}.
|
|
166
|
-
* @param extras.state - Passes state to the navigation.
|
|
167
|
-
* State is not persistent, unlike {@link data}; however, state is added to the browser's session history to support back/forward browser navigation.
|
|
168
|
-
* State can be read from {@link WorkbenchView.navigation.state} or from the browser's session history via `history.state`.
|
|
169
|
-
* @param extras.cssClass - Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.
|
|
170
|
-
* @return a copy of this layout with the view navigated.
|
|
171
|
-
*/
|
|
172
|
-
navigateView(id: string, commands: Commands, extras?: {
|
|
173
|
-
hint?: string;
|
|
174
|
-
relativeTo?: ActivatedRoute;
|
|
175
|
-
data?: NavigationData;
|
|
176
|
-
state?: NavigationState;
|
|
177
|
-
cssClass?: string | string[];
|
|
178
|
-
}): WorkbenchLayout;
|
|
179
|
-
/**
|
|
180
|
-
* Removes given view from the layout.
|
|
181
|
-
*
|
|
182
|
-
* - If the view is active, the last used view is activated.
|
|
183
|
-
* - If the view is the last view in the part, the part is removed unless it is the last part in its grid or a structural part.
|
|
184
|
-
*
|
|
185
|
-
* @param id - Specifies the id of the view to remove.
|
|
186
|
-
* @return a copy of this layout with the view removed.
|
|
187
|
-
*/
|
|
188
|
-
removeView(id: string): WorkbenchLayout;
|
|
189
|
-
/**
|
|
190
|
-
* Removes given part from the layout.
|
|
191
|
-
*
|
|
192
|
-
* If the part is active, the last used part is activated.
|
|
193
|
-
*
|
|
194
|
-
* @param id - The id of the part to remove.
|
|
195
|
-
* @return a copy of this layout with the part removed.
|
|
196
|
-
*/
|
|
197
|
-
removePart(id: string): WorkbenchLayout;
|
|
198
|
-
/**
|
|
199
|
-
* Moves a view to a different part or moves it within a part.
|
|
200
|
-
*
|
|
201
|
-
* @param id - The id of the view to be moved.
|
|
202
|
-
* @param targetPartId - The id of the part to which to move the view.
|
|
203
|
-
* @param options - Controls moving of the view.
|
|
204
|
-
* @param options.position - Specifies the position where to move the view in the target part. The position is zero-based. Defaults to `end` when moving the view to a different part.
|
|
205
|
-
* @param options.activateView - Controls if to activate the view. Defaults to `false`.
|
|
206
|
-
* @param options.activatePart - Controls if to activate the target part. Defaults to `false`.
|
|
207
|
-
* @return a copy of this layout with the view moved.
|
|
208
|
-
*/
|
|
209
|
-
moveView(id: string, targetPartId: string, options?: {
|
|
210
|
-
position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view';
|
|
211
|
-
activateView?: boolean;
|
|
212
|
-
activatePart?: boolean;
|
|
213
|
-
}): WorkbenchLayout;
|
|
214
|
-
/**
|
|
215
|
-
* Activates the given view.
|
|
216
|
-
*
|
|
217
|
-
* @param id - The id of the view which to activate.
|
|
218
|
-
* @param options - Controls view activation.
|
|
219
|
-
* @param options.activatePart - Controls whether to activate the part that contains the view. Defaults to `false`.
|
|
220
|
-
* @return a copy of this layout with the view activated.
|
|
221
|
-
*/
|
|
222
|
-
activateView(id: string, options?: {
|
|
223
|
-
activatePart?: boolean;
|
|
224
|
-
}): WorkbenchLayout;
|
|
225
|
-
/**
|
|
226
|
-
* Activates the given part.
|
|
227
|
-
*
|
|
228
|
-
* @param id - The id of the part which to activate.
|
|
229
|
-
* @return a copy of this layout with the part activated.
|
|
230
|
-
*/
|
|
231
|
-
activatePart(id: string): WorkbenchLayout;
|
|
232
|
-
/**
|
|
233
|
-
* Applies a modification function to this layout, enabling conditional changes while maintaining method chaining.
|
|
234
|
-
*
|
|
235
|
-
* @param modifyFn - A function that takes the current layout and returns a modified layout.
|
|
236
|
-
* @return The modified layout returned by the modify function.
|
|
237
|
-
*/
|
|
238
|
-
modify(modifyFn: (layout: WorkbenchLayout) => WorkbenchLayout): WorkbenchLayout;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Describes how to lay out a part relative to another part.
|
|
242
|
-
*/
|
|
243
|
-
export interface ReferencePart {
|
|
244
|
-
/**
|
|
245
|
-
* Specifies the part which to use as the reference part to lay out the part.
|
|
246
|
-
* If not set, the part will be aligned relative to the root of the workbench layout.
|
|
247
|
-
*/
|
|
248
|
-
relativeTo?: string;
|
|
249
|
-
/**
|
|
250
|
-
* Specifies the side of the reference part where to add the part.
|
|
251
|
-
*/
|
|
252
|
-
align: 'left' | 'right' | 'top' | 'bottom';
|
|
253
|
-
/**
|
|
254
|
-
* Specifies the proportional size of the part relative to the reference part.
|
|
255
|
-
* The ratio is the closed interval [0,1]. If not set, defaults to `0.5`.
|
|
256
|
-
*/
|
|
257
|
-
ratio?: number;
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Controls the appearance and behavior of a part.
|
|
261
|
-
*/
|
|
262
|
-
export interface PartExtras {
|
|
263
|
-
/**
|
|
264
|
-
* Title displayed in the part bar.
|
|
265
|
-
*/
|
|
266
|
-
title?: Translatable;
|
|
267
|
-
/**
|
|
268
|
-
* Specifies CSS class(es) to add to the part, e.g., to locate the part in tests.
|
|
269
|
-
*/
|
|
270
|
-
cssClass?: string | string[];
|
|
271
|
-
/**
|
|
272
|
-
* Controls whether to activate the part. Defaults to `false`.
|
|
273
|
-
*/
|
|
274
|
-
activate?: boolean;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Controls the appearance and behavior of a docked part.
|
|
278
|
-
*
|
|
279
|
-
* A docked part is a part that is docked to the left, right, or bottom side of the workbench.
|
|
280
|
-
* Docked parts can be minimized to create more space for the main content. Users cannot drag
|
|
281
|
-
* views into or out of docked parts.
|
|
282
|
-
*/
|
|
283
|
-
export interface DockedPartExtras {
|
|
284
|
-
/**
|
|
285
|
-
* Icon (key) of the toggle button in the sidebar, used to open or close the docked part.
|
|
286
|
-
*
|
|
287
|
-
* The actual icon is resolved through an {@link WorkbenchIconProviderFn} registered in {@link WorkbenchConfig.iconProvider}.
|
|
288
|
-
*
|
|
289
|
-
* If no icon provider is configured, the icon defaults to a Material Icon font ligature. The default icon provider requires
|
|
290
|
-
* the application to include the Material icon font, for example in `styles.scss`, as follows:
|
|
291
|
-
*
|
|
292
|
-
* ```scss
|
|
293
|
-
* @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded');
|
|
294
|
-
* ```
|
|
295
|
-
*
|
|
296
|
-
* The application can then reference icons from the Material Icons Font: https://fonts.google.com/icons
|
|
297
|
-
*/
|
|
298
|
-
icon: string;
|
|
299
|
-
/**
|
|
300
|
-
* Label of the toggle button in the sidebar.
|
|
301
|
-
*/
|
|
302
|
-
label: Translatable;
|
|
303
|
-
/**
|
|
304
|
-
* Tooltip displayed when hovering over the toggle button in the sidebar.
|
|
305
|
-
*/
|
|
306
|
-
tooltip?: Translatable;
|
|
307
|
-
/**
|
|
308
|
-
* Title displayed in the part bar.
|
|
309
|
-
*
|
|
310
|
-
* If not provided, defaults to {@link DockedPartExtras.label}. Set to `false` to not display a title.
|
|
311
|
-
*/
|
|
312
|
-
title?: Translatable | false;
|
|
313
|
-
/**
|
|
314
|
-
* CSS class(es) to add to the docked part and its toggle button, e.g., to locate the part in tests.
|
|
315
|
-
*/
|
|
316
|
-
cssClass?: string | string[];
|
|
317
|
-
/**
|
|
318
|
-
* Internal identifier for the docked part.
|
|
319
|
-
*
|
|
320
|
-
* @docs-private Not public API, intended for internal use only.
|
|
321
|
-
*/
|
|
322
|
-
ɵactivityId?: ActivityId;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* A part can be docked to the left, right, or bottom side of the workbench.
|
|
326
|
-
*
|
|
327
|
-
* Each side has two docking areas: `left-top` and `left-bottom`, `right-top` and `right-bottom`, and `bottom-left` and `bottom-right`.
|
|
328
|
-
* Parts added to the same area are stacked, with only one part active per stack. If there is an active part in both stacks of a side,
|
|
329
|
-
* the two parts are split vertically or horizontally, depending on the side.
|
|
330
|
-
*/
|
|
331
|
-
export interface DockingArea {
|
|
332
|
-
/**
|
|
333
|
-
* Controls where to dock a part.
|
|
334
|
-
* - `left-top`: Dock to the top on the left side.
|
|
335
|
-
* - `left-bottom`: Dock to the bottom on the left side.
|
|
336
|
-
* - `right-top`: Dock to the top on the right side.
|
|
337
|
-
* - `right-bottom`: Dock to the bottom on the right side.
|
|
338
|
-
* - `bottom-left`: Dock to the left on the bottom side.
|
|
339
|
-
* - `bottom-right`: Dock to the right on the bottom side.
|
|
340
|
-
*/
|
|
341
|
-
dockTo: 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom' | 'bottom-left' | 'bottom-right';
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Identifies the main area part in the workbench layout.
|
|
345
|
-
*
|
|
346
|
-
* Refer to this part to align parts relative to the main area.
|
|
347
|
-
*
|
|
348
|
-
* The main area is a special part that can be added to the layout. The main area is where the workbench opens new views by default.
|
|
349
|
-
* It is shared between perspectives and its layout is not reset when resetting perspectives.
|
|
350
|
-
*/
|
|
351
|
-
export declare const MAIN_AREA: MAIN_AREA;
|
|
352
|
-
/**
|
|
353
|
-
* Represents the type of the {@link MAIN_AREA} constant.
|
|
354
|
-
*/
|
|
355
|
-
export type MAIN_AREA = 'part.main-area';
|
|
356
|
-
/**
|
|
357
|
-
* Represents the alternative id of the main area part.
|
|
358
|
-
*
|
|
359
|
-
* @see MAIN_AREA
|
|
360
|
-
*/
|
|
361
|
-
export declare const MAIN_AREA_ALTERNATIVE_ID = "main-area";
|
|
362
|
-
/**
|
|
363
|
-
* Contains different versions of a workbench layout.
|
|
364
|
-
*
|
|
365
|
-
* The M-prefix indicates this object is a model object that is serialized and stored, requiring migration on breaking change.
|
|
366
|
-
*/
|
|
367
|
-
export interface MWorkbenchLayout {
|
|
368
|
-
/**
|
|
369
|
-
* Layout before any user personalization (initial layout).
|
|
370
|
-
*/
|
|
371
|
-
referenceLayout: {
|
|
372
|
-
/**
|
|
373
|
-
* @see WorkbenchLayoutSerializer.serializeGrids
|
|
374
|
-
* @see WorkbenchLayoutSerializer.deserializeGrid
|
|
375
|
-
*/
|
|
376
|
-
grids: {
|
|
377
|
-
main: string;
|
|
378
|
-
[activityId: ActivityId]: string;
|
|
379
|
-
};
|
|
380
|
-
/**
|
|
381
|
-
* @see WorkbenchLayoutSerializer.serializeActivityLayout
|
|
382
|
-
*/
|
|
383
|
-
activityLayout: string;
|
|
384
|
-
/**
|
|
385
|
-
* @see WorkbenchLayoutSerializer.serializeOutlets
|
|
386
|
-
* @see WorkbenchLayoutSerializer.deserializeOutlets
|
|
387
|
-
*/
|
|
388
|
-
outlets: string;
|
|
389
|
-
};
|
|
390
|
-
/**
|
|
391
|
-
* Layout personalized by the user.
|
|
392
|
-
*/
|
|
393
|
-
userLayout: {
|
|
394
|
-
/**
|
|
395
|
-
* @see WorkbenchLayoutSerializer.serializeGrids
|
|
396
|
-
* @see WorkbenchLayoutSerializer.deserializeGrid
|
|
397
|
-
*/
|
|
398
|
-
grids: {
|
|
399
|
-
main: string;
|
|
400
|
-
[activityId: ActivityId]: string;
|
|
401
|
-
};
|
|
402
|
-
/**
|
|
403
|
-
* @see WorkbenchLayoutSerializer.serializeActivityLayout
|
|
404
|
-
*/
|
|
405
|
-
activityLayout: string;
|
|
406
|
-
/**
|
|
407
|
-
* @see WorkbenchLayoutSerializer.serializeOutlets
|
|
408
|
-
* @see WorkbenchLayoutSerializer.deserializeOutlets
|
|
409
|
-
*/
|
|
410
|
-
outlets: string;
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* Signature of a function to provide a workbench layout.
|
|
415
|
-
*
|
|
416
|
-
* The workbench will invoke this function with a factory object to create the layout. The layout is immutable; each modification creates a new instance.
|
|
417
|
-
*
|
|
418
|
-
* The function can call `inject` to get any required dependencies.
|
|
419
|
-
*
|
|
420
|
-
* ## Workbench Layout
|
|
421
|
-
* The workbench layout is an arrangement of parts and views. Parts can be docked to the side or positioned relative to each other.
|
|
422
|
-
* Views are stacked in parts and can be dragged to other parts. Content can be displayed in both parts and views.
|
|
423
|
-
*
|
|
424
|
-
* The layout typically has a main area part and other parts docked to the side, providing navigation and context-sensitive assistance to support
|
|
425
|
-
* the user's workflow. Initially empty or displaying a welcome page, the main area is where the workbench opens new views by default.
|
|
426
|
-
* Unlike any other part, the main area is shared between perspectives, and its layout is not reset when resetting perspectives.
|
|
427
|
-
|
|
428
|
-
* ## Steps to create the layout
|
|
429
|
-
* Start by adding parts to the layout. Parts can be docked to a specific area (`left-top`, `left-bottom`, `right-top`, `right-bottom`, `bottom-left`, `bottom-right`)
|
|
430
|
-
* or aligned relative to each other. Views can be added to any part except the main area part. To display content, navigate parts and views to registered routes.
|
|
431
|
-
*
|
|
432
|
-
* To maintain a clean URL, we recommend navigating the parts and views to empty path routes and using a navigation hint for differentiation.
|
|
433
|
-
* - Use the `canMatchWorkbenchPart` guard to match a route for a part navigated with a particular hint.
|
|
434
|
-
* - Use the `canMatchWorkbenchView` guard to match a route for a view navigated with a particular hint.
|
|
435
|
-
*
|
|
436
|
-
* ## Example
|
|
437
|
-
* The following example defines a layout with a main area and four parts docked to the side:
|
|
438
|
-
*
|
|
439
|
-
* ```plain
|
|
440
|
-
* +------+-----------+------+
|
|
441
|
-
* | | | |
|
|
442
|
-
* | | | |
|
|
443
|
-
* | left | main area | right|
|
|
444
|
-
* | | | |
|
|
445
|
-
* | | | |
|
|
446
|
-
* +------+-----------+------+
|
|
447
|
-
* | bottom |
|
|
448
|
-
* +-------------------------+
|
|
449
|
-
* ```
|
|
450
|
-
*
|
|
451
|
-
* ```ts
|
|
452
|
-
* import {bootstrapApplication} from '@angular/platform-browser';
|
|
453
|
-
* import {MAIN_AREA, provideWorkbench, WorkbenchLayoutFactory} from '@scion/workbench';
|
|
454
|
-
*
|
|
455
|
-
* bootstrapApplication(AppComponent, {
|
|
456
|
-
* providers: [
|
|
457
|
-
* provideWorkbench({
|
|
458
|
-
* layout: (factory: WorkbenchLayoutFactory) => factory
|
|
459
|
-
* // Add parts to dock areas on the side.
|
|
460
|
-
* .addPart(MAIN_AREA)
|
|
461
|
-
* .addPart('navigator', {dockTo: 'left-top'}, {label: 'Navigator', icon: 'folder'})
|
|
462
|
-
* .addPart('find', {dockTo: 'bottom-left'}, {label: 'Find', icon: 'search'})
|
|
463
|
-
* .addPart('inventory', {dockTo: 'right-top'}, {label: 'Inventory', icon: 'inventory'})
|
|
464
|
-
* .addPart('notifications', {dockTo: 'right-bottom'}, {label: 'Notifications', icon: 'notifications'})
|
|
465
|
-
*
|
|
466
|
-
* // Add views to parts.
|
|
467
|
-
* .addView('find1', {partId: 'find'})
|
|
468
|
-
* .addView('find2', {partId: 'find'})
|
|
469
|
-
* .addView('find3', {partId: 'find'})
|
|
470
|
-
*
|
|
471
|
-
* // Navigate the main area to display a welcome page.
|
|
472
|
-
* .navigatePart(MAIN_AREA, [], {hint: 'welcome'})
|
|
473
|
-
*
|
|
474
|
-
* // Navigate parts to display content.
|
|
475
|
-
* .navigatePart('navigator', [], {hint: 'navigator'})
|
|
476
|
-
* .navigatePart('inventory', ['path/to/inventory'])
|
|
477
|
-
* .navigatePart('notifications', [], {hint: 'notifications'})
|
|
478
|
-
*
|
|
479
|
-
* // Navigate views to display content.
|
|
480
|
-
* .navigateView('find1', ['path/to/find'])
|
|
481
|
-
* .navigateView('find2', ['path/to/find'])
|
|
482
|
-
* .navigateView('find3', ['path/to/find'])
|
|
483
|
-
*
|
|
484
|
-
* // Activate parts to open docked parts.
|
|
485
|
-
* .activatePart('navigator')
|
|
486
|
-
* .activatePart('find')
|
|
487
|
-
* .activatePart('inventory'),
|
|
488
|
-
* }),
|
|
489
|
-
* ],
|
|
490
|
-
* });
|
|
491
|
-
* ```
|
|
492
|
-
*
|
|
493
|
-
* The layout requires the following routes.
|
|
494
|
-
*
|
|
495
|
-
* ```ts
|
|
496
|
-
* import {bootstrapApplication} from '@angular/platform-browser';
|
|
497
|
-
* import {provideRouter} from '@angular/router';
|
|
498
|
-
* import {canMatchWorkbenchView, canMatchWorkbenchPart} from '@scion/workbench';
|
|
499
|
-
*
|
|
500
|
-
* bootstrapApplication(AppComponent, {
|
|
501
|
-
* providers: [
|
|
502
|
-
* provideRouter([
|
|
503
|
-
* // Route for the "MAIN_AREA Part"
|
|
504
|
-
* {path: '', canMatch: [canMatchWorkbenchPart('welcome')], loadComponent: () => import('./welcome/welcome.component')},
|
|
505
|
-
* // Route for the "Navigator Part"
|
|
506
|
-
* {path: '', canMatch: [canMatchWorkbenchPart('navigator')], loadComponent: () => import('./navigator/navigator.component')},
|
|
507
|
-
* // Route for the "Find View"
|
|
508
|
-
* {path: 'path/to/find', loadComponent: () => import('./find/find.component')},
|
|
509
|
-
* // Route for the "Inventory Part"
|
|
510
|
-
* {path: 'path/to/inventory', loadComponent: () => import('./inventory/inventory.component')},
|
|
511
|
-
* // Route for the "Notifications Part"
|
|
512
|
-
* {path: '', canMatch: [canMatchWorkbenchPart('notifications')], loadComponent: () => import('./notifications/notifications.component')},
|
|
513
|
-
* ]),
|
|
514
|
-
* ],
|
|
515
|
-
* });
|
|
516
|
-
* ```
|
|
517
|
-
*/
|
|
518
|
-
export type WorkbenchLayoutFn = (factory: WorkbenchLayoutFactory) => Promise<WorkbenchLayout> | WorkbenchLayout;
|