@openfin/workspace 13.1.4 → 14.0.11
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 +14 -14
- package/client-api/src/home.test.d.ts +1 -1
- package/client-api/src/integrations/microsoft.shapes.d.ts +9 -9
- package/client-api/src/internal/home/handlers/data.d.ts +3 -0
- package/client-api/src/internal/home/handlers/data.test.d.ts +1 -0
- package/client-api/src/internal/home/handlers/disconnect.d.ts +1 -0
- package/client-api/src/internal/home/handlers/disconnect.test.d.ts +1 -0
- package/client-api/src/internal/home/handlers/index.d.ts +6 -0
- package/client-api/src/internal/home/handlers/index.test.d.ts +1 -0
- package/client-api/src/internal/home/handlers/result-dispatch.d.ts +3 -0
- package/client-api/src/internal/home/handlers/result-dispatch.test.d.ts +1 -0
- package/client-api/src/internal/home/handlers/search-close.d.ts +5 -0
- package/client-api/src/internal/home/handlers/search-close.test.d.ts +1 -0
- package/client-api/src/internal/home/index.d.ts +4 -0
- package/client-api/src/internal/home/requests.d.ts +5 -0
- package/client-api/src/internal/providers.d.ts +63 -0
- package/client-api/src/internal/providers.test.d.ts +1 -0
- package/client-api/src/internal/storefront/handlers.d.ts +9 -0
- package/client-api/src/internal/storefront/index.d.ts +4 -0
- package/client-api/src/{internal.d.ts → internal/try-dispatch.d.ts} +1 -1
- package/client-api/src/shapes/common.d.ts +1 -1
- package/client-api/src/shapes/dock.d.ts +3 -3
- package/client-api/src/shapes/home.d.ts +18 -18
- package/client-api/src/shapes/notifications.d.ts +2 -2
- package/client-api/src/shapes/store.d.ts +6 -6
- package/client-api/src/shapes/templates.d.ts +11 -11
- package/client-api-platform/src/init/utils.d.ts +2 -2
- package/client-api-platform/src/shapes.d.ts +15 -15
- package/common/src/api/action.d.ts +1 -1
- package/common/src/api/home.d.ts +25 -0
- package/common/src/api/pages/shapes.d.ts +6 -6
- package/common/src/api/protocol/browser.d.ts +1 -1
- package/common/src/api/protocol/shapes/search.d.ts +96 -0
- package/common/src/api/protocol/shapes/workspace.d.ts +13 -13
- package/common/src/api/protocol/workspace-platform.d.ts +1 -1
- package/common/src/api/protocol/workspace.d.ts +2 -0
- package/common/src/api/provider.d.ts +24 -9
- package/common/src/api/search/aggregate-search-results.d.ts +10 -0
- package/common/src/api/search/common.d.ts +13 -0
- package/common/src/api/shapes/home.d.ts +186 -0
- package/common/src/api/theming.d.ts +2 -2
- package/common/src/utils/a11y/search.a11y.d.ts +10 -10
- package/common/src/utils/application.d.ts +2 -2
- package/common/src/utils/context-menu.d.ts +1 -1
- package/common/src/utils/layout.d.ts +3 -3
- package/common/src/utils/menu-window-provider.d.ts +2 -2
- package/common/src/utils/route.d.ts +0 -1
- package/common/src/utils/snapshot.d.ts +3 -3
- package/common/src/utils/types.d.ts +7 -7
- package/common/src/utils/usage-register.d.ts +2 -2
- package/home.js +128 -23
- package/home.js.map +1 -1
- package/index.js +127 -22
- package/index.js.map +1 -1
- package/notifications.js +124 -19
- package/notifications.js.map +1 -1
- package/package.json +3 -3
- package/search-api/src/fin/shapes.d.ts +2 -2
- package/search-api/src/provider/remote/deregistration.d.ts +2 -1
- package/search-api/src/provider/remote/info.d.ts +1 -1
- package/search-api/src/provider/remote/registration.d.ts +1 -1
- package/search-api/src/shapes.d.ts +11 -21
- package/store.js +130 -25
- package/store.js.map +1 -1
- package/common/src/api/search.d.ts +0 -18
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { DispatchedSearchResult, HomeSearchListenerRequest, HomeSearchResult } from '../../../../client-api/src/shapes';
|
|
2
|
+
import { HomeProviderInternal } from '../../../../common/src/api/provider';
|
|
3
|
+
/**
|
|
4
|
+
* The ids of home providers that are built into Home.
|
|
5
|
+
*/
|
|
6
|
+
export declare const HomeBuiltInProviderID: {
|
|
7
|
+
/**
|
|
8
|
+
* Built in Home provider that provides commands.
|
|
9
|
+
*/
|
|
10
|
+
readonly commands: "home-commands";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The ids of home providers that are built into Home.
|
|
14
|
+
*/
|
|
15
|
+
export declare const HomeBuiltInProviderUniqueID: {
|
|
16
|
+
/**
|
|
17
|
+
* Built in Home provider that provides commands.
|
|
18
|
+
*/
|
|
19
|
+
readonly commands: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const HOME_SEARCH_CHANNEL_NAME: "__search-openfin-browser-home-topic__";
|
|
22
|
+
export type HomeClientApiDispatchRequest = {
|
|
23
|
+
providerId: string;
|
|
24
|
+
result: DispatchedSearchResult;
|
|
25
|
+
};
|
|
26
|
+
export type HomeClientApiSearchCloseRequest = {
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
export type HomeClientApiDataRequest = {
|
|
30
|
+
id: string;
|
|
31
|
+
query: string;
|
|
32
|
+
context: any;
|
|
33
|
+
providerId: string;
|
|
34
|
+
targets: string[];
|
|
35
|
+
};
|
|
36
|
+
export interface HomeInternalDataResponse extends SearchResponse {
|
|
37
|
+
id: string;
|
|
38
|
+
providerId: string;
|
|
39
|
+
revoked?: string[];
|
|
40
|
+
status?: InternalSearchListenerResponseStatus;
|
|
41
|
+
}
|
|
42
|
+
export interface HomeInternalErrorResponse {
|
|
43
|
+
error: string;
|
|
44
|
+
}
|
|
45
|
+
interface SearchResponse {
|
|
46
|
+
results: HomeSearchResult[];
|
|
47
|
+
context?: any;
|
|
48
|
+
}
|
|
49
|
+
export interface InternalDataResponse extends SearchResponse {
|
|
50
|
+
id: string;
|
|
51
|
+
providerId: string;
|
|
52
|
+
revoked?: string[];
|
|
53
|
+
status?: InternalSearchListenerResponseStatus;
|
|
54
|
+
}
|
|
55
|
+
export interface InternalSearchListenerRequest {
|
|
56
|
+
close(): void;
|
|
57
|
+
req: HomeSearchListenerRequest;
|
|
58
|
+
}
|
|
59
|
+
export interface SearchRequest {
|
|
60
|
+
/** The search query. */
|
|
61
|
+
query: string;
|
|
62
|
+
/** Additional custom context that can be used for searching. */
|
|
63
|
+
context?: Partial<HomeSearchListenerRequest['context']>;
|
|
64
|
+
/** A list of search provider names to execute the search request against. */
|
|
65
|
+
targets?: string[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Message for dispatching a search request.
|
|
69
|
+
* This interface is used when sending a dispatch request from a remote OpenFin identity
|
|
70
|
+
* to the search topic creator.
|
|
71
|
+
*/
|
|
72
|
+
export interface InternalSearchRequest extends SearchRequest {
|
|
73
|
+
/**
|
|
74
|
+
* The id of the search request.
|
|
75
|
+
* On initial search request from remote provider, this ID is generated.
|
|
76
|
+
* The remote OpenFin identity is required to pass this id on all subsequent requests.
|
|
77
|
+
*/
|
|
78
|
+
id?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface InternalSearchResponse {
|
|
81
|
+
/**
|
|
82
|
+
* The ID of the search request the response pertains to.
|
|
83
|
+
*/
|
|
84
|
+
id: string;
|
|
85
|
+
/**
|
|
86
|
+
* True if the all search providers have responded to the search request.
|
|
87
|
+
*/
|
|
88
|
+
done?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The state of the search response generator.
|
|
91
|
+
*/
|
|
92
|
+
state: SearchProviderResponseGeneratorState;
|
|
93
|
+
/**
|
|
94
|
+
* The current list of responses.
|
|
95
|
+
*/
|
|
96
|
+
value: SearchProviderResponse[];
|
|
97
|
+
}
|
|
98
|
+
export type SearchProviderResponseGenerator = AsyncGenerator<SearchProviderResponse[], SearchProviderResponse[], SearchProviderResponse[]>;
|
|
99
|
+
export interface SearchProviderResponse {
|
|
100
|
+
/**
|
|
101
|
+
* The search provider that responded with the search results.
|
|
102
|
+
*/
|
|
103
|
+
provider: HomeProviderInternal;
|
|
104
|
+
/**
|
|
105
|
+
* If the search result succeeds for this provider, results of the search will be set.
|
|
106
|
+
*/
|
|
107
|
+
results?: HomeSearchResult[];
|
|
108
|
+
/**
|
|
109
|
+
* A context with custom data to pass through search
|
|
110
|
+
*/
|
|
111
|
+
context?: any;
|
|
112
|
+
/**
|
|
113
|
+
* If the search failed for this provider, error will be set.
|
|
114
|
+
*/
|
|
115
|
+
error?: Error;
|
|
116
|
+
}
|
|
117
|
+
export declare enum SearchProviderResponseGeneratorState {
|
|
118
|
+
/**
|
|
119
|
+
* The generator is in the process of fetching the initial set of results from search providers.
|
|
120
|
+
*/
|
|
121
|
+
Fetching = "fetching",
|
|
122
|
+
/**
|
|
123
|
+
* The generator has fetched all initial results, and is now waiting for search providers with
|
|
124
|
+
* open {@link SearchListenerResponse} streams to push new or updated search results.
|
|
125
|
+
*/
|
|
126
|
+
Fetched = "fetched",
|
|
127
|
+
/**
|
|
128
|
+
* All open {@link SearchListenerResponse} streams have closed, completing the request.
|
|
129
|
+
* In this state, the set of responses returned by `generator.next()` are final.
|
|
130
|
+
*/
|
|
131
|
+
Complete = "complete"
|
|
132
|
+
}
|
|
133
|
+
export type InternalSearchResponseGeneratorHooks = {
|
|
134
|
+
setState(state: SearchProviderResponseGeneratorState): void;
|
|
135
|
+
};
|
|
136
|
+
export interface InternalErrorResponse {
|
|
137
|
+
/**
|
|
138
|
+
* An error message, denoting that something went wrong.
|
|
139
|
+
*/
|
|
140
|
+
error: string;
|
|
141
|
+
}
|
|
142
|
+
export interface SearchProviderResponseGeneratorExtended extends SearchProviderResponseGenerator {
|
|
143
|
+
/**
|
|
144
|
+
* The id of the search request.
|
|
145
|
+
*/
|
|
146
|
+
id: string;
|
|
147
|
+
/**
|
|
148
|
+
* The state of the search provider response generator.
|
|
149
|
+
*/
|
|
150
|
+
state: SearchProviderResponseGeneratorState;
|
|
151
|
+
/**
|
|
152
|
+
* Notifies all search providers related to this search request
|
|
153
|
+
* that the search requester is no longer listening for new or updated search results.
|
|
154
|
+
* @experimental
|
|
155
|
+
*/
|
|
156
|
+
close: () => void;
|
|
157
|
+
}
|
|
158
|
+
export interface InternalDispatchRequest {
|
|
159
|
+
result: DispatchedSearchResult;
|
|
160
|
+
providerId: string;
|
|
161
|
+
uniqueId: string;
|
|
162
|
+
}
|
|
163
|
+
export declare enum InternalSearchListenerResponseStatus {
|
|
164
|
+
/**
|
|
165
|
+
* The initial status of a new search listener response object.
|
|
166
|
+
*
|
|
167
|
+
* Denotes that the search provider listener has not taken use of the search listener response object,
|
|
168
|
+
* as in `response.open()` nor `response.close()` has not been called yet.
|
|
169
|
+
*/
|
|
170
|
+
Initial = 0,
|
|
171
|
+
/**
|
|
172
|
+
* Denotes that the search provider is done sending new or updated search results
|
|
173
|
+
* for the corresponding request.
|
|
174
|
+
*/
|
|
175
|
+
Open = 1,
|
|
176
|
+
/**
|
|
177
|
+
* Denotes that the search provider is done sending new or updated search results
|
|
178
|
+
* for the corresponding request.
|
|
179
|
+
*/
|
|
180
|
+
Close = 2
|
|
181
|
+
}
|
|
182
|
+
export type SearchQueryWithProviderID = {
|
|
183
|
+
query: string;
|
|
184
|
+
providerID: string;
|
|
185
|
+
};
|
|
186
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import type { ThemePaletteSet } from '@openfin/ui-library';
|
|
3
3
|
import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
|
|
4
|
-
export
|
|
4
|
+
export type WorkspaceComponentSetSelectedSchemePayload = {
|
|
5
5
|
newScheme: ColorSchemeOptionType;
|
|
6
6
|
identity: OpenFin.Identity;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type BrowserSetSelectedSchemePayload = string;
|
|
9
9
|
export interface ComputedThemes extends Array<ComputedTheme> {
|
|
10
10
|
}
|
|
11
11
|
export interface ComputedTheme {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
1
|
+
export type Role = string;
|
|
2
|
+
export type AriaOwns = undefined | string;
|
|
3
|
+
export type AriaHaspopup = boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
4
|
+
export type AriaAutocomplete = 'none' | 'inline' | 'list' | 'both';
|
|
5
|
+
export type AriaControls = undefined | string;
|
|
6
|
+
export type AriaActivedescendant = undefined | string;
|
|
7
|
+
export type AriaExpanded = boolean | 'false' | 'true';
|
|
8
|
+
export type AriaLive = 'none' | 'polite' | 'assertive';
|
|
9
|
+
export type A11yBox = {
|
|
10
10
|
'role': Role;
|
|
11
11
|
'aria-expanded': AriaExpanded;
|
|
12
12
|
'aria-owns': AriaOwns;
|
|
13
13
|
'aria-haspopup': AriaHaspopup;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type A11yInput = {
|
|
16
16
|
'aria-controls': AriaControls;
|
|
17
17
|
'aria-autocomplete': AriaAutocomplete;
|
|
18
18
|
'aria-activedescendant': AriaActivedescendant;
|
|
@@ -12,11 +12,11 @@ export interface ApplicationEvent {
|
|
|
12
12
|
name?: string;
|
|
13
13
|
uuid?: string;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type ApplicationListener = (ev: ApplicationEvent) => void;
|
|
16
16
|
export declare enum LaunchModeType {
|
|
17
17
|
FinProtocol = "fin-protocol"
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type ApplicationInfoExtended = OpenFin.ApplicationInfo & {
|
|
20
20
|
initialOptions: OpenFin.ApplicationInfo['initialOptions'] & {
|
|
21
21
|
userAppConfigArgs: any;
|
|
22
22
|
};
|
|
@@ -5,7 +5,7 @@ export declare enum MenuItemType {
|
|
|
5
5
|
Submenu = "submenu",
|
|
6
6
|
Checkbox = "checkbox"
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type ShowContextMenuResponse = OpenFin.MenuResult & {
|
|
9
9
|
data: string;
|
|
10
10
|
};
|
|
11
11
|
export default function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window): Promise<ShowContextMenuResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
4
|
+
export type LayoutDOMEventType =
|
|
5
5
|
/**
|
|
6
6
|
* Fired when a tab is created in a container. (Emmitted by core)
|
|
7
7
|
*/
|
|
@@ -10,7 +10,7 @@ export declare type LayoutDOMEventType =
|
|
|
10
10
|
* Fired when the layout container is ready to be used. (Emitted by us)
|
|
11
11
|
*/
|
|
12
12
|
| 'container-resized';
|
|
13
|
-
export
|
|
13
|
+
export type LayoutDOMEvent = {
|
|
14
14
|
type: Extract<LayoutDOMEventType, 'container-resized'>;
|
|
15
15
|
} | {
|
|
16
16
|
type: Extract<LayoutDOMEventType, 'tab-created'>;
|
|
@@ -24,7 +24,7 @@ export declare type LayoutDOMEvent = {
|
|
|
24
24
|
};
|
|
25
25
|
isInitialized: boolean;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type LayoutDOMEventListener = (ev: LayoutDOMEvent) => void;
|
|
28
28
|
export declare const getFirstViewFromLayout: (identity?: WindowIdentity) => Promise<{
|
|
29
29
|
name: any;
|
|
30
30
|
uuid: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
2
|
import { ModalResponseContent } from '../../../common/src/utils/menu-config';
|
|
3
3
|
import type { OptionalExceptFor } from '../../../common/src/utils/types';
|
|
4
|
-
|
|
4
|
+
type MenuEventTypes = {
|
|
5
5
|
response: [ModalResponseEvent];
|
|
6
6
|
ready: [OpenFin.Identity];
|
|
7
7
|
update: [string, Partial<OpenFin.Bounds>, string];
|
|
@@ -17,7 +17,7 @@ export declare const menuEvents: {
|
|
|
17
17
|
once: <EventKey_3 extends keyof MenuEventTypes>(event: EventKey_3, listener: (...payload: MenuEventTypes[EventKey_3]) => void) => void;
|
|
18
18
|
};
|
|
19
19
|
export declare const emitMenuResponse: (data: ModalResponseEvent['data']) => Promise<void>;
|
|
20
|
-
|
|
20
|
+
type WindowOptionsWithBounds = OptionalExceptFor<OpenFin.WindowOptions, 'name' | 'url'> & {
|
|
21
21
|
top: number;
|
|
22
22
|
left: number;
|
|
23
23
|
};
|
|
@@ -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
|
-
HomeIndicator = "/home/indicator/",
|
|
12
11
|
Browser = "/browser/",
|
|
13
12
|
BrowserPopupMenu = "/browser/popup-menu/",
|
|
14
13
|
Provider = "/provider/",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
export
|
|
2
|
+
export type SnapshotDetailsExtended = OpenFin.Snapshot['snapshotDetails'] & {
|
|
3
3
|
machineId: string;
|
|
4
4
|
machineName?: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type SnapshotExtended = {
|
|
7
7
|
snapshotDetails: SnapshotDetailsExtended;
|
|
8
8
|
windows: OpenFin.WindowOptions[];
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ApplySnapshotOptionsExtended = OpenFin.ApplySnapshotOptions & {
|
|
11
11
|
attachToExistingWindow: boolean;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type OptionalExceptFor<T, TRequired extends keyof T = keyof T> = Partial<Pick<T, Exclude<keyof T, TRequired>>> & Required<Pick<T, TRequired>>;
|
|
2
|
+
export type StringMap<T> = {
|
|
3
3
|
[key in keyof T]: string;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export type Await<T> = T extends PromiseLike<infer U> ? U : T;
|
|
6
|
+
export type ValueOf<T> = T[keyof T];
|
|
7
|
+
export type DeepPartial<T> = T extends object ? {
|
|
8
8
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
9
9
|
} : T;
|
|
10
10
|
/**
|
|
11
11
|
A union type that represents a value that can be directly awaited or a promise that will eventually resolve to a value of type T.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type Awaitable<T> = Awaited<T> | Promise<Awaited<T>>;
|
|
14
14
|
/**
|
|
15
15
|
* This is a helper type that takes a type T and returns a type that is the same as T, but with all
|
|
16
16
|
* properties that are functions removed.
|
|
@@ -30,6 +30,6 @@ export declare type Awaitable<T> = Awaited<T> | Promise<Awaited<T>>;
|
|
|
30
30
|
* }
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export type RemoveFunctions<T> = Pick<T, {
|
|
34
34
|
[K in keyof T]: T[K] extends Function ? never : K;
|
|
35
35
|
}[keyof T]>;
|
|
@@ -37,7 +37,7 @@ export declare enum AnalyticsSource {
|
|
|
37
37
|
/**
|
|
38
38
|
* Event for analytics
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export type AnalyticsEvent = {
|
|
41
41
|
source: AnalyticsSource;
|
|
42
42
|
type: string;
|
|
43
43
|
action: string;
|
|
@@ -52,7 +52,7 @@ export interface AnalyticsEventInternal extends AnalyticsEvent {
|
|
|
52
52
|
*/
|
|
53
53
|
skipValueHashing?: boolean;
|
|
54
54
|
}
|
|
55
|
-
export
|
|
55
|
+
export type AnalyticsEventRaise = Omit<AnalyticsEventInternal, 'source'>;
|
|
56
56
|
export declare const raiseBrowserAnalytics: (payload: AnalyticsEventRaise) => Promise<void>;
|
|
57
57
|
export declare const raiseBrowserPageAnalytics: (pages: AttachedPage[], action: string) => Promise<void>;
|
|
58
58
|
export declare const raiseHomeAnalytics: (platformIdentity: OpenFin.Identity, payload: AnalyticsEventRaise) => Promise<void>;
|