@openfin/workspace-platform 22.2.18 → 22.3.1
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/client-api/src/integrations/microsoft.utils.d.ts +6 -6
- package/client-api-platform/src/api/app-directory.d.ts +1 -1
- package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +2 -2
- package/client-api-platform/src/api/pages/open-pages.d.ts +2 -2
- package/client-api-platform/src/api/performance.d.ts +7 -0
- package/client-api-platform/src/api/workspaces/index.d.ts +2 -2
- package/client-api-platform/src/index.d.ts +2 -1
- package/client-api-platform/src/init/index.d.ts +1 -2
- package/client-api-platform/src/init/override-callback/page-defaults.d.ts +1 -1
- package/client-api-platform/src/init/override-callback/view-options.d.ts +1 -1
- package/client-api-platform/src/init/utils.d.ts +1 -0
- package/client-api-platform/src/shapes.d.ts +57 -12
- package/common/src/api/pages/idb.d.ts +4 -2
- package/common/src/api/protocol/browser.d.ts +4 -4
- package/common/src/api/protocol/workspace-platform.d.ts +24 -23
- package/common/src/api/provider.d.ts +1 -1
- package/common/src/api/storefront.d.ts +5 -5
- package/common/src/api/theming.d.ts +1 -1
- package/common/src/utils/defer-show.d.ts +1 -1
- package/common/src/utils/global-context-menu.d.ts +1 -1
- package/common/src/utils/indicators/browser.d.ts +1 -1
- package/common/src/utils/layout.d.ts +2 -1
- package/common/src/utils/menu-window-provider.d.ts +6 -6
- package/common/src/utils/modal-bounds.d.ts +1 -1
- package/common/src/utils/namespaced-local-storage.d.ts +2 -2
- package/common/src/utils/page-tab-context-menu.d.ts +1 -1
- package/common/src/utils/pick.d.ts +7 -0
- package/common/src/utils/promise-with-resolvers.d.ts +9 -0
- package/common/src/utils/shared-emitter.d.ts +4 -4
- package/common/src/utils/types.d.ts +23 -0
- package/common/src/utils/workspace-modals.d.ts +1 -1
- package/{common/src/utils/enterprise-dock.d.ts → dock3/src/api/constants.d.ts} +2 -0
- package/dock3/src/api/idb.d.ts +3 -0
- package/dock3/src/api/index.d.ts +14 -0
- package/dock3/src/api/launch.d.ts +3 -0
- package/dock3/src/api/protocol.d.ts +1 -0
- package/dock3/src/api/provider.d.ts +89 -0
- package/dock3/src/shapes/enterprise.d.ts +1 -0
- package/dock3/src/shapes/index.d.ts +2 -0
- package/dock3/src/shapes/shapes.d.ts +63 -0
- package/dock3/src/utils.d.ts +2 -0
- package/externals.report.json +6 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/search-api/src/provider/remote/info.d.ts +1 -1
- package/workspace_platform.zip +0 -0
- package/client-api-platform/src/api/perfomance.d.ts +0 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Dock3Config, DockAllowedWindowOptions } from '../../../dock3/src/shapes';
|
|
2
|
+
import { Dock3ConstructorOverride, Dock3Provider } from './provider';
|
|
3
|
+
export type DockInitOptions = {
|
|
4
|
+
config: Dock3Config;
|
|
5
|
+
override: Dock3ConstructorOverride;
|
|
6
|
+
windowOptions?: DockAllowedWindowOptions;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param config Dock3 configuration object
|
|
11
|
+
* @param override Constructor override to customize the Dock3Provider
|
|
12
|
+
* @returns instance of Dock3Provider
|
|
13
|
+
*/
|
|
14
|
+
export declare function init(options: DockInitOptions): Promise<Dock3Provider>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CompanionDockConfig } from '../shapes/enterprise';
|
|
2
|
+
import type { Dock3Config, DockAllowedWindowOptions } from '../shapes/shapes';
|
|
3
|
+
export declare function launchDock(dockName: string, baseUrl: string, config: CompanionDockConfig | Dock3Config, additionalOptions?: DockAllowedWindowOptions): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { OpenFin } from '@openfin/core';
|
|
2
|
+
import { BookmarkDockEntryPayload, LaunchDockEntryPayload } from '../../../client-api-platform/src/index';
|
|
3
|
+
import { Dock3Config } from '../../../dock3/src/shapes';
|
|
4
|
+
import { Async, CamelCase } from '../../../dock3/src/utils';
|
|
5
|
+
import { Dock3ChannelProvider, Dock3ChannelProviderChannelActions } from './protocol';
|
|
6
|
+
type InternalDock3ChannelActions = 'ready';
|
|
7
|
+
type Dock3ProviderAPI = {
|
|
8
|
+
[K in keyof Omit<Dock3ChannelProviderChannelActions, InternalDock3ChannelActions> as CamelCase<K>]: Async<Dock3ChannelProviderChannelActions[K]>;
|
|
9
|
+
};
|
|
10
|
+
type ExtendsProtocolProvider<T extends Dock3ProviderAPI> = T extends Dock3ProviderAPI ? T : never;
|
|
11
|
+
export type EnsureProviderMatchesProtocol = ExtendsProtocolProvider<Dock3Provider>;
|
|
12
|
+
export declare class Dock3Provider {
|
|
13
|
+
#private;
|
|
14
|
+
static getOverrideConstructor(...args: ConstructorParameters<typeof Dock3Provider>): new () => Dock3Provider;
|
|
15
|
+
static instance: Dock3Provider | null;
|
|
16
|
+
constructor(config: Dock3Config, channel: Dock3ChannelProvider);
|
|
17
|
+
launchEntry(payload: LaunchDockEntryPayload): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Returns a promise that resolves when the Dock3Provider is ready.
|
|
20
|
+
* This is useful to ensure that the dock is fully initialized before performing any operations.
|
|
21
|
+
* The promise will resolve when the dock sends the 'ready' action.
|
|
22
|
+
*/
|
|
23
|
+
get ready(): Promise<void>;
|
|
24
|
+
bookmarkContentMenuEntry(payload: BookmarkDockEntryPayload): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Read-only access to the current configuration of the Dock3Provider.
|
|
27
|
+
*/
|
|
28
|
+
get config(): Dock3Config;
|
|
29
|
+
/**
|
|
30
|
+
* Protected setter for the configuration of the Dock3Provider.
|
|
31
|
+
* This does not save the configuration in storage nor notify the dock about the change.
|
|
32
|
+
* Use `updateConfig` method to update the configuration and save it.
|
|
33
|
+
* This should only be used internally in a `saveConfig` override if `super.saveConfig` is not called.
|
|
34
|
+
*/
|
|
35
|
+
protected set config(newConfig: Dock3Config);
|
|
36
|
+
/**
|
|
37
|
+
* Updates the configuration of the Dock3Provider.
|
|
38
|
+
* This method updates the configuration, notifies the dock about the change and saves the new configuration to storage (via `saveConfig`).
|
|
39
|
+
* @param newConfig The new configuration to be applied.
|
|
40
|
+
*/
|
|
41
|
+
updateConfig(config: Dock3Config): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Shuts down the Dock3Provider and closes the dock window.
|
|
44
|
+
* This method sends a shutdown message to the dock and then closes the window.
|
|
45
|
+
*/
|
|
46
|
+
shutdown(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Called whenever the configuration is updated, this method saves the configuration to the storage.
|
|
49
|
+
* This should not be called directly, if you need to update the configuration, use `updateConfig` method instead.
|
|
50
|
+
*/
|
|
51
|
+
saveConfig({ config }: {
|
|
52
|
+
config: Dock3Config;
|
|
53
|
+
}): Promise<void>;
|
|
54
|
+
private handleConfigChange;
|
|
55
|
+
/**
|
|
56
|
+
* Called on startup to load the current configuration of the Dock3Provider.
|
|
57
|
+
* If you've overridden the `saveConfig` method, this should load the configuration from your storage.
|
|
58
|
+
* By default it will load the configuration from local storage. This can be overriden to prevent loading from local storage.
|
|
59
|
+
* @example Prevent loading from local storage:
|
|
60
|
+
* ```typescript
|
|
61
|
+
* class MyDock3Provider extends Dock3Provider {
|
|
62
|
+
* async loadConfig(): Promise<Dock3Config> {
|
|
63
|
+
* // Do not load from local storage, return the default config
|
|
64
|
+
* return this.config;
|
|
65
|
+
* }
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
* @example Load from a custom storage:
|
|
69
|
+
* ```typescript
|
|
70
|
+
* class MyDock3Provider extends Dock3Provider {
|
|
71
|
+
* async loadConfig(): Promise<Dock3Config> {
|
|
72
|
+
* // Load from a custom storage
|
|
73
|
+
* const configFromStorage = await myCustomStorage.getDockConfig();
|
|
74
|
+
* // Update local config to ensure it is used.
|
|
75
|
+
* if (configFromStorage) {
|
|
76
|
+
* this.config = configFromStorage;
|
|
77
|
+
* }
|
|
78
|
+
* return this.config;
|
|
79
|
+
* }
|
|
80
|
+
* }
|
|
81
|
+
* ```
|
|
82
|
+
* @returns The current configuration of the Dock3Provider.
|
|
83
|
+
*/
|
|
84
|
+
loadConfig(): Promise<Dock3Config>;
|
|
85
|
+
getWindowSync(): OpenFin.Window;
|
|
86
|
+
private registerChannelActions;
|
|
87
|
+
}
|
|
88
|
+
export type Dock3ConstructorOverride = (Base: new () => Dock3Provider) => new () => Dock3Provider;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { EnterpriseDockChannelClient, EnterpriseDockChannelProvider } from '../api/protocol';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { OpenFin } from '@openfin/core';
|
|
2
|
+
import { WorkspaceButton } from '../../../client-api/src/dock';
|
|
3
|
+
import { ContentMenuEntry, DockEntry, TaskbarIcon } from '../../../client-api-platform/src/shapes';
|
|
4
|
+
export type { Dock3Provider, Dock3ConstructorOverride } from '../api/provider';
|
|
5
|
+
export type Dock3Button = WorkspaceButton | 'contentMenu';
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for the Dock 3.0 provider.
|
|
8
|
+
*/
|
|
9
|
+
export interface Dock3Config {
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* icon URL for the dock provider.
|
|
13
|
+
*/
|
|
14
|
+
icon?: string | TaskbarIcon;
|
|
15
|
+
/**
|
|
16
|
+
* Favorites to be displayed in the dock
|
|
17
|
+
*/
|
|
18
|
+
favorites?: DockEntry[];
|
|
19
|
+
/**
|
|
20
|
+
* Content menu entries to be displayed in the dock
|
|
21
|
+
*/
|
|
22
|
+
contentMenu?: ContentMenuEntry[];
|
|
23
|
+
/**
|
|
24
|
+
* The config for the default dock buttons
|
|
25
|
+
*/
|
|
26
|
+
defaultDockButtons?: Dock3Button[];
|
|
27
|
+
/**
|
|
28
|
+
* The id of the target element for the content menu.
|
|
29
|
+
*/
|
|
30
|
+
contentMenuTargetId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The config for the companion dock ui
|
|
33
|
+
*/
|
|
34
|
+
uiConfig?: {
|
|
35
|
+
contentMenu?: {
|
|
36
|
+
enableBookmarking?: boolean;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* By default drag handle is visible. Set this to true to hide the drag handle
|
|
40
|
+
*/
|
|
41
|
+
hideDragHandle?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* By default provider icon is just a drag region. Set this to true to convert it to content menu dropdown button.
|
|
44
|
+
*/
|
|
45
|
+
providerIconContentMenu?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Configuration for the dock more menu component.
|
|
48
|
+
*/
|
|
49
|
+
moreMenu?: {
|
|
50
|
+
quitPlatform?: {
|
|
51
|
+
/**
|
|
52
|
+
* By default the quit button will contain platform title in its label. Set this to true to hide the platform title.
|
|
53
|
+
*/
|
|
54
|
+
hidePlatformTitle?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* By default the quit button will show a quit confirmation dialog. Set this to true to skip the quit confirmation dialog.
|
|
57
|
+
*/
|
|
58
|
+
skipDialog?: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export type DockAllowedWindowOptions = Partial<Pick<OpenFin.PlatformWindowOptions, 'defaultCentered' | 'saveWindowState' | 'taskbarIconGroup' | 'defaultTop' | 'defaultLeft'>>;
|
package/externals.report.json
CHANGED