@openfin/workspace 12.6.6 → 13.0.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/dock.d.ts +13 -7
- package/client-api/src/shapes/dock.d.ts +112 -8
- package/client-api/src/shapes/store.d.ts +6 -100
- package/client-api/src/store.d.ts +66 -10
- package/client-api-platform/src/api/dock/idb.d.ts +4 -0
- package/client-api-platform/src/api/name-collisions.d.ts +14 -0
- package/client-api-platform/src/api/pages/helper.d.ts +0 -13
- package/client-api-platform/src/api/pages/index.d.ts +4 -2
- package/client-api-platform/src/api/storage.d.ts +2 -16
- package/client-api-platform/src/api/utils.d.ts +0 -1
- package/client-api-platform/src/init/browser-defaults.d.ts +7 -0
- package/client-api-platform/src/init/override-callback.d.ts +1 -1
- package/client-api-platform/src/init/page-defaults.d.ts +3 -0
- package/client-api-platform/src/init/utils.d.ts +4 -12
- package/client-api-platform/src/shapes.d.ts +28 -4
- package/common/src/api/pages/legacy.d.ts +1 -1
- package/common/src/api/protocol/workspace-platform.d.ts +3 -1
- package/common/src/api/protocol/workspace.d.ts +2 -0
- package/common/src/api/provider.d.ts +72 -23
- package/common/src/api/search.d.ts +1 -1
- package/common/src/api/storefront.d.ts +8 -25
- package/common/src/utils/create-and-migrate-ibd-store.d.ts +1 -0
- package/common/src/utils/env.d.ts +1 -0
- package/common/src/utils/layout.d.ts +22 -10
- package/common/src/utils/route.d.ts +0 -2
- package/common/src/utils/types.d.ts +22 -0
- package/common/src/utils/unique-toolbar-options.d.ts +1 -1
- package/common/src/utils/window.d.ts +0 -2
- package/home.js +5 -5
- package/home.js.map +1 -1
- package/index.js +5 -5
- package/index.js.map +1 -1
- package/notifications.js +5 -5
- package/notifications.js.map +1 -1
- package/package.json +7 -5
- package/search-api/src/provider/remote/info.d.ts +1 -1
- package/store.js +5 -5
- package/store.js.map +1 -1
- package/search-api/src/logger.d.ts +0 -1
|
@@ -1,41 +1,89 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Dock = "dock"
|
|
6
|
-
}
|
|
7
|
-
export interface ProviderIdentity {
|
|
2
|
+
import { RemoveFunctions } from '../../../common/src/utils/types';
|
|
3
|
+
import { DockProvider, StorefrontProvider, WorkspaceButtonsConfig } from '../../../client-api/src/shapes';
|
|
4
|
+
interface WithIdentity {
|
|
8
5
|
/**
|
|
9
|
-
* The
|
|
6
|
+
* The platform identity that registered the Storefront Provider.
|
|
10
7
|
*/
|
|
11
|
-
|
|
8
|
+
platformIdentity: OpenFin.Identity;
|
|
12
9
|
/**
|
|
13
|
-
*
|
|
10
|
+
* Unique identifier for the provider.
|
|
11
|
+
* Namespaced by platformIdentity to avoid collisions.
|
|
14
12
|
*/
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
export interface ProviderInfoWithIdentity extends ProviderInfo {
|
|
18
|
-
platformIdentity: OpenFin.Identity;
|
|
13
|
+
uniqueId: string;
|
|
19
14
|
}
|
|
15
|
+
export declare type ProviderType = 'storefront' | 'dock';
|
|
16
|
+
/**
|
|
17
|
+
* The internal representation of the dock provider, which includes the identity of the provider
|
|
18
|
+
* All functions on the DockProvider type are removed, as they are handled through OpenFin Channels
|
|
19
|
+
*
|
|
20
|
+
* The `platformIdentity` is added in the register call [here](../../../provider/src/api/provider.ts)
|
|
21
|
+
*/
|
|
22
|
+
export declare type DockProviderInternal =
|
|
23
|
+
/**
|
|
24
|
+
* Remove all functions from the StorefrontProvider type, as they are handled through OpenFin Channels
|
|
25
|
+
*/
|
|
26
|
+
RemoveFunctions<Omit<DockProvider, 'workspaceComponents'>> & {
|
|
27
|
+
workspaceComponents: WorkspaceButtonsConfig;
|
|
28
|
+
} & WithIdentity;
|
|
29
|
+
/**
|
|
30
|
+
* The internal representation of the storefront provider, which includes the identity of the provider
|
|
31
|
+
* All functions on the StorefrontProvider type are removed, as they are handled through OpenFin Channels
|
|
32
|
+
*
|
|
33
|
+
* The `platformIdentity` is added in the register call [here](../../../provider/src/api/provider.ts)
|
|
34
|
+
*/
|
|
35
|
+
export declare type StorefrontProviderInternal =
|
|
36
|
+
/**
|
|
37
|
+
* Remove all functions from the StorefrontProvider type, as they are handled through OpenFin Channels
|
|
38
|
+
*/
|
|
39
|
+
RemoveFunctions<StorefrontProvider> & WithIdentity;
|
|
40
|
+
/**
|
|
41
|
+
* The internal representation of a provider, which includes the identity of the provider
|
|
42
|
+
* This should be used anywhere within 'dock/*' or 'storefront/*' and most places within 'provider/*'
|
|
43
|
+
* to ensure that the identity is included
|
|
44
|
+
*/
|
|
45
|
+
export declare type ProviderInfoInternal<T extends ProviderType = ProviderType> = T extends 'dock' ? DockProviderInternal : StorefrontProviderInternal;
|
|
20
46
|
export interface ProviderChannelPayload {
|
|
21
47
|
providerType: ProviderType;
|
|
22
48
|
}
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
49
|
+
export declare type ProviderRegisterPayload = {
|
|
50
|
+
providerType: 'dock';
|
|
51
|
+
info: RemoveFunctions<DockProvider>;
|
|
52
|
+
} | {
|
|
53
|
+
providerType: 'storefront';
|
|
54
|
+
info: RemoveFunctions<StorefrontProvider>;
|
|
55
|
+
};
|
|
26
56
|
export interface ProviderDeregisterPayload extends ProviderChannelPayload {
|
|
27
|
-
id
|
|
28
|
-
}
|
|
29
|
-
export interface ProviderConnectionPayload extends ProviderChannelPayload {
|
|
30
|
-
provider: ProviderInfoWithIdentity;
|
|
57
|
+
id: string;
|
|
31
58
|
}
|
|
32
|
-
export
|
|
33
|
-
|
|
59
|
+
export declare type ProviderConnectionPayload = {
|
|
60
|
+
providerType: 'dock';
|
|
61
|
+
provider: DockProviderInternal;
|
|
62
|
+
} | {
|
|
63
|
+
providerType: 'storefront';
|
|
64
|
+
provider: StorefrontProviderInternal;
|
|
65
|
+
};
|
|
66
|
+
export declare type ProviderDisconnectionPayload = {
|
|
67
|
+
providerType: 'dock';
|
|
68
|
+
provider: DockProviderInternal;
|
|
69
|
+
} | {
|
|
70
|
+
providerType: 'storefront';
|
|
71
|
+
provider: StorefrontProviderInternal;
|
|
72
|
+
};
|
|
73
|
+
export interface ProviderUpdatePayload {
|
|
74
|
+
providerType: 'dock';
|
|
75
|
+
provider: DockProviderInternal;
|
|
34
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Gets a unique identifier for a provider, based on the provider's identity and the provider's id
|
|
79
|
+
*
|
|
80
|
+
* This allows for different providers to be registered with the same id.
|
|
81
|
+
*/
|
|
82
|
+
export declare const getUniqueProviderIdentifier: ({ platformIdentity, id }: Pick<ProviderInfoInternal, 'platformIdentity' | 'id'>) => string;
|
|
35
83
|
/**
|
|
36
84
|
* Get a list of all providers that have registered with the provider API.
|
|
37
85
|
*/
|
|
38
|
-
export declare const getProviders: (providerType:
|
|
86
|
+
export declare const getProviders: <T extends ProviderType>(providerType: T) => Promise<ProviderInfoInternal<T>[]>;
|
|
39
87
|
/**
|
|
40
88
|
* A function to dispatch showing the component window of current OF identity
|
|
41
89
|
* @returns action to show Component Window
|
|
@@ -46,3 +94,4 @@ export declare const showProviderWindow: (providerType: ProviderType) => Promise
|
|
|
46
94
|
* @returns action to hide Component Window
|
|
47
95
|
*/
|
|
48
96
|
export declare const hideProviderWindow: (providerType: ProviderType) => Promise<void>;
|
|
97
|
+
export {};
|
|
@@ -16,5 +16,5 @@ export interface SearchItem {
|
|
|
16
16
|
requestReload?: () => any;
|
|
17
17
|
}
|
|
18
18
|
export declare type Topic = typeof homeSearchTopic;
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function getHomeSearchTopic(): Promise<SearchTopicClient>;
|
|
20
20
|
export declare function mapSearchResponsesToItems(topic: Topic, responses: SearchProviderResponse[]): SearchItem[];
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export interface StorefrontProviderInfoWithIdentity extends StorefrontProviderInfo {
|
|
4
|
-
platformIdentity: OpenFin.Identity;
|
|
5
|
-
}
|
|
6
|
-
export interface LaunchStorefrontAppRequest {
|
|
7
|
-
app: App;
|
|
8
|
-
platformIdentity?: OpenFin.Identity;
|
|
9
|
-
}
|
|
10
|
-
export interface StorefrontProviderIdentity {
|
|
11
|
-
/**
|
|
12
|
-
* The ID of the Storefront Provider.
|
|
13
|
-
*/
|
|
14
|
-
id: string;
|
|
15
|
-
/**
|
|
16
|
-
* The platform identity that registered the Storefront Provider.
|
|
17
|
-
*/
|
|
18
|
-
platformIdentity: OpenFin.Identity;
|
|
19
|
-
}
|
|
1
|
+
import { App, StorefrontFooter, StorefrontLandingPage, StorefrontNavigationItemAppGrid, StorefrontNavigationSection } from '../../../client-api/src/shapes';
|
|
2
|
+
import { ProviderInfoInternal } from './provider';
|
|
20
3
|
/**
|
|
21
4
|
* Request object to launch an app.
|
|
22
5
|
*/
|
|
23
|
-
export interface LaunchStorefrontProviderAppRequest extends
|
|
6
|
+
export interface LaunchStorefrontProviderAppRequest extends ProviderInfoInternal<'storefront'> {
|
|
24
7
|
/**
|
|
25
8
|
* App to launch.
|
|
26
9
|
*/
|
|
@@ -36,29 +19,29 @@ export declare const launchStorefrontApp: (req: LaunchStorefrontProviderAppReque
|
|
|
36
19
|
* @param identity of the platform to get the apps from.
|
|
37
20
|
* @returns the list of Storefront apps for the platform.
|
|
38
21
|
*/
|
|
39
|
-
export declare const getStorefrontApps: (
|
|
22
|
+
export declare const getStorefrontApps: (provider: ProviderInfoInternal<'storefront'>) => Promise<App[]>;
|
|
40
23
|
/**
|
|
41
24
|
* Get the platform's landing page for Storefront.
|
|
42
25
|
* @param identity of the platform to get the landing page of.
|
|
43
26
|
* @returns the platform's landing page.
|
|
44
27
|
*/
|
|
45
|
-
export declare const getStorefrontLandingPage: (
|
|
28
|
+
export declare const getStorefrontLandingPage: (provider: ProviderInfoInternal<'storefront'>) => Promise<StorefrontLandingPage | undefined>;
|
|
46
29
|
/**
|
|
47
30
|
* Get the platform's footer for Storefront.
|
|
48
31
|
* @param identity of the platform to get the footer of.
|
|
49
32
|
* @returns the platform's footer.
|
|
50
33
|
*/
|
|
51
|
-
export declare const getStorefrontFooter: (
|
|
34
|
+
export declare const getStorefrontFooter: (provider: ProviderInfoInternal<'storefront'>) => Promise<StorefrontFooter>;
|
|
52
35
|
/**
|
|
53
36
|
* Get the platform's navigation for Storefront.
|
|
54
37
|
* @param identity of the platform to get the navigation of.
|
|
55
38
|
* @returns the platform's navigation.
|
|
56
39
|
*/
|
|
57
|
-
export declare const getStorefrontNavigation: (
|
|
40
|
+
export declare const getStorefrontNavigation: (provider: ProviderInfoInternal<'storefront'>) => Promise<[StorefrontNavigationSection?, StorefrontNavigationSection?]>;
|
|
58
41
|
/**
|
|
59
42
|
* A helper method that gets a Storefront navigation item by ID.
|
|
60
43
|
* @param navigationItemId the id of the Storefront navigation item.
|
|
61
44
|
* @param identity of the platform.
|
|
62
45
|
* @returns the navigation item with the ID.
|
|
63
46
|
*/
|
|
64
|
-
export declare const getStorefrontNavigationItemAppGrid: (navigationItemId: string,
|
|
47
|
+
export declare const getStorefrontNavigationItemAppGrid: (navigationItemId: string, provider: ProviderInfoInternal<'storefront'>) => Promise<StorefrontNavigationItemAppGrid | undefined>;
|
|
@@ -24,3 +24,4 @@ export declare const workspaceDocsPlatformUrl: string;
|
|
|
24
24
|
export declare const workspaceDocsClientUrl: string;
|
|
25
25
|
export declare const workspaceRuntimeVersion: string;
|
|
26
26
|
export declare const workspaceBuildVersion: string;
|
|
27
|
+
export declare const workspaceBuildSha: string;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { AttachedPage, PageLayout } from '../../../client-api-platform/src/shapes';
|
|
3
3
|
import { WindowIdentity } from './window';
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
export declare type LayoutDOMEventType =
|
|
5
|
+
/**
|
|
6
|
+
* Fired when a tab is created in a container. (Emmitted by core)
|
|
7
|
+
*/
|
|
8
|
+
'tab-created'
|
|
9
|
+
/**
|
|
10
|
+
* Fired when the layout container is ready to be used. (Emitted by us)
|
|
11
|
+
*/
|
|
12
|
+
| 'container-resized';
|
|
13
|
+
export declare type LayoutDOMEvent = {
|
|
14
|
+
type: Extract<LayoutDOMEventType, 'container-resized'>;
|
|
15
|
+
} | {
|
|
16
|
+
type: Extract<LayoutDOMEventType, 'tab-created'>;
|
|
11
17
|
detail: {
|
|
12
18
|
containerSelector: string;
|
|
13
19
|
tabSelector: string;
|
|
@@ -17,7 +23,7 @@ export interface LayoutDOMEvent {
|
|
|
17
23
|
uuid: string;
|
|
18
24
|
};
|
|
19
25
|
isInitialized: boolean;
|
|
20
|
-
}
|
|
26
|
+
};
|
|
21
27
|
export declare type LayoutDOMEventListener = (ev: LayoutDOMEvent) => void;
|
|
22
28
|
export declare const getFirstViewFromLayout: (identity?: WindowIdentity) => Promise<{
|
|
23
29
|
name: any;
|
|
@@ -30,9 +36,15 @@ export declare const getFirstViewFromLayout: (identity?: WindowIdentity) => Prom
|
|
|
30
36
|
*/
|
|
31
37
|
export declare const generateViewNameIfNotExists: <T extends {
|
|
32
38
|
name?: string;
|
|
33
|
-
}>(componentState: T) => T & {
|
|
39
|
+
}>(componentState: T) => Omit<T, "name"> & {
|
|
34
40
|
name: string;
|
|
35
41
|
};
|
|
42
|
+
export declare const generateViewNameAndIdentifierNameIfNotExists: <T extends {
|
|
43
|
+
name?: string;
|
|
44
|
+
_internalWorkspaceData: any;
|
|
45
|
+
}>(componentState: T) => T & {
|
|
46
|
+
name?: string;
|
|
47
|
+
};
|
|
36
48
|
/**
|
|
37
49
|
* Deep clones a layout and adds view names if they don't exist.
|
|
38
50
|
* @param layout The Layout to be cloned
|
|
@@ -66,7 +78,7 @@ export declare const getLockedPageLayout: (layout: PageLayout) => any;
|
|
|
66
78
|
/**
|
|
67
79
|
* Accepts a locked layout and an unlocked layout as a reference.
|
|
68
80
|
* Takes the layout settings of the reference layout and merges them into the locked layout, thereby unlocking it.
|
|
69
|
-
* @param lockedLayout The Layout to
|
|
81
|
+
* @param lockedLayout The Layout to unlock
|
|
70
82
|
* @param referenceUnlockedLayout The Layout to serve as a reference of an unlocked layout
|
|
71
83
|
* @returns An unlocked version of the target layout
|
|
72
84
|
*/
|
|
@@ -8,7 +8,6 @@ export declare enum PageRoute {
|
|
|
8
8
|
HomeSearch = "/home/?deeplink=search",
|
|
9
9
|
HomePagesRename = "/home/pages/rename/",
|
|
10
10
|
Dock = "/dock/",
|
|
11
|
-
BrowserPagesLanding = "/browser/pages/landing/",
|
|
12
11
|
HomeIndicator = "/home/indicator/",
|
|
13
12
|
Browser = "/browser/",
|
|
14
13
|
BrowserPopupMenu = "/browser/popup-menu/",
|
|
@@ -44,7 +43,6 @@ declare const _default: {
|
|
|
44
43
|
HomeSearch: PageRoute.HomeSearch;
|
|
45
44
|
HomePagesRename: PageRoute.HomePagesRename;
|
|
46
45
|
Dock: PageRoute.Dock;
|
|
47
|
-
BrowserPagesLanding: PageRoute.BrowserPagesLanding;
|
|
48
46
|
HomeIndicator: PageRoute.HomeIndicator;
|
|
49
47
|
Browser: PageRoute.Browser;
|
|
50
48
|
BrowserPopupMenu: PageRoute.BrowserPopupMenu;
|
|
@@ -4,3 +4,25 @@ export declare type StringMap<T> = {
|
|
|
4
4
|
};
|
|
5
5
|
export declare type Await<T> = T extends PromiseLike<infer U> ? U : T;
|
|
6
6
|
export declare type ValueOf<T> = T[keyof T];
|
|
7
|
+
/**
|
|
8
|
+
* This is a helper type that takes a type T and returns a type that is the same as T, but with all
|
|
9
|
+
* properties that are functions removed.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* type Foo = {
|
|
14
|
+
* bar: string;
|
|
15
|
+
* qux: () => void;
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* type FooWithoutFunctions = RemoveFunctions<Foo>;
|
|
19
|
+
*
|
|
20
|
+
* // FooWithoutFunctions is equivalent to:
|
|
21
|
+
* type FooWithoutFunctions = {
|
|
22
|
+
* bar: string;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare type RemoveFunctions<T> = Pick<T, {
|
|
27
|
+
[K in keyof T]: T[K] extends Function ? never : K;
|
|
28
|
+
}[keyof T]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ToolbarButton } from '../../../client-api-platform/src/shapes';
|
|
2
|
-
export declare const checkUniqueToolbarOptions: (toolbarOptions
|
|
2
|
+
export declare const checkUniqueToolbarOptions: (toolbarOptions?: ToolbarButton[]) => void;
|
|
@@ -134,7 +134,6 @@ export declare const isWindowRunning: (identity: WindowIdentity) => Promise<bool
|
|
|
134
134
|
*/
|
|
135
135
|
export declare const isStorefrontWindowRunning: () => Promise<boolean>;
|
|
136
136
|
export declare const isDockWindowRunning: () => Promise<boolean>;
|
|
137
|
-
export declare const isNotificationCenterRunning: () => Promise<boolean>;
|
|
138
137
|
export declare const isHomeWindowRunning: () => Promise<boolean>;
|
|
139
138
|
export declare const showAndFocusStorefront: () => Promise<void>;
|
|
140
139
|
export declare const showAndFocusDock: () => Promise<void>;
|
|
@@ -144,6 +143,5 @@ export declare const getPlatformWindowTitle: (identity: WindowIdentity) => Promi
|
|
|
144
143
|
export declare const getComponentWindowStatus: () => Promise<{
|
|
145
144
|
storefrontRunning: boolean;
|
|
146
145
|
homeRunning: boolean;
|
|
147
|
-
notificationCenterRunning: boolean;
|
|
148
146
|
}>;
|
|
149
147
|
export {};
|