@openfin/workspace-platform 5.4.0 → 5.7.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/README.md +1 -1
- package/client-api/src/shapes.d.ts +279 -3
- package/client-api-platform/src/api/app-directory.d.ts +1 -1
- package/client-api-platform/src/api/browser/browser-module.d.ts +3 -0
- package/client-api-platform/src/api/browser/index.d.ts +3 -2
- package/client-api-platform/src/api/context-menu/browser-logo-handler.d.ts +4 -0
- package/client-api-platform/src/api/context-menu/browser-viewtab-handler.d.ts +4 -0
- package/client-api-platform/src/api/context-menu/index.d.ts +10 -0
- package/client-api-platform/src/api/index.d.ts +4 -0
- package/client-api-platform/src/api/protocol.d.ts +5 -3
- package/client-api-platform/src/api/workspace-module.d.ts +1 -1
- package/client-api-platform/src/index.d.ts +2 -40
- package/client-api-platform/src/init/custom-actions.d.ts +3 -0
- package/client-api-platform/src/init/index.d.ts +35 -3
- package/client-api-platform/src/init/override-callback.d.ts +2 -1
- package/client-api-platform/src/init/utils.d.ts +5 -3
- package/client-api-platform/src/shapes.d.ts +233 -3
- package/common/src/api/browser-protocol.d.ts +21 -0
- package/common/src/api/pages/attached.d.ts +0 -1
- package/common/src/api/pages/legacy.d.ts +1 -1
- package/common/src/api/pages/shapes.d.ts +9 -0
- package/common/src/utils/context-menu.d.ts +12 -0
- package/common/src/utils/env.d.ts +6 -7
- package/common/src/utils/global-context-menu.d.ts +3 -0
- package/common/src/utils/landing-page.d.ts +11 -0
- package/common/src/utils/layout.d.ts +2 -1
- package/common/src/utils/merge-deep.d.ts +6 -0
- package/common/src/utils/strings.d.ts +0 -2
- package/common/src/utils/window.d.ts +1 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/search-api/src/shapes.d.ts +42 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="openfin-adapter/fin" />
|
|
2
2
|
import type { InteropBroker } from 'openfin-adapter/src/api/interop';
|
|
3
|
+
import { NamedIdentity } from 'openfin-adapter/src/identity';
|
|
4
|
+
import { IconProps } from '@openfin/ui-library';
|
|
3
5
|
import type { AttachedPage, Page, PageWithUpdatableRuntimeAttribs } from '../../common/src/api/pages/shapes';
|
|
4
6
|
import type { CustomThemes } from '../../common/src/api/theming';
|
|
5
7
|
import type { App } from '../../client-api/src/shapes';
|
|
@@ -30,6 +32,106 @@ export interface ReorderPagesRequest {
|
|
|
30
32
|
/** An array of page ids that specify the order of the pages attached to the window. */
|
|
31
33
|
pageIds: string[];
|
|
32
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Request for opening a logo context menu in Browser.
|
|
37
|
+
*/
|
|
38
|
+
export interface OpenGlobalContextMenuRequest {
|
|
39
|
+
/** Screen x-coordinate where context menu should be shown. */
|
|
40
|
+
x: number;
|
|
41
|
+
/** Screen y-coordinate where context menu should be shown. */
|
|
42
|
+
y: number;
|
|
43
|
+
/** Miscellaneous options necessary for implementing custom logic in the provider override. */
|
|
44
|
+
customData?: any;
|
|
45
|
+
}
|
|
46
|
+
/**Shape of the data property of a context menu template item */
|
|
47
|
+
export interface ContextMenuItemData {
|
|
48
|
+
type: string;
|
|
49
|
+
action?: CustomActionSpecifier;
|
|
50
|
+
}
|
|
51
|
+
/**Types of global context menu options, including pre-defined ones.
|
|
52
|
+
* User-defined context menu items should use the value `Custom` */
|
|
53
|
+
export declare enum GlobalContextMenuOptionType {
|
|
54
|
+
NewWindow = "NewWindow",
|
|
55
|
+
NewPage = "NewPage",
|
|
56
|
+
CloseWindow = "CloseWindow",
|
|
57
|
+
OpenStorefront = "OpenStorefront",
|
|
58
|
+
Quit = "Quit",
|
|
59
|
+
Custom = "Custom"
|
|
60
|
+
}
|
|
61
|
+
/**Shape of the data property of a global context menu template item */
|
|
62
|
+
export interface GlobalContextMenuItemData extends ContextMenuItemData {
|
|
63
|
+
type: GlobalContextMenuOptionType;
|
|
64
|
+
}
|
|
65
|
+
/**Configuration of an option in the global context menu */
|
|
66
|
+
export interface GlobalContextMenuItemTemplate extends OpenFin.MenuItemTemplate {
|
|
67
|
+
data: GlobalContextMenuItemData;
|
|
68
|
+
}
|
|
69
|
+
/**Payload received by a Custom Action that is invoked by a custom context menu option */
|
|
70
|
+
export interface GlobalContextMenuOptionActionPayload {
|
|
71
|
+
callerType: CustomActionCallerType.GlobalContextMenu;
|
|
72
|
+
windowIdentity: OpenFin.Identity;
|
|
73
|
+
customData: any | undefined;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Payload received by the openGlobalContextMenu provider override.
|
|
77
|
+
*/
|
|
78
|
+
export declare type OpenGlobalContextMenuPayload = OpenGlobalContextMenuRequest & {
|
|
79
|
+
/** Template defining the options to show in the context menu. */
|
|
80
|
+
template: GlobalContextMenuItemTemplate[];
|
|
81
|
+
/** Identity of the Browser window where context menu should be shown. */
|
|
82
|
+
identity: NamedIdentity;
|
|
83
|
+
/** Default function that handles stock context menu options. */
|
|
84
|
+
callback: (data: GlobalContextMenuItemData) => any;
|
|
85
|
+
};
|
|
86
|
+
export interface ViewTabContextMenuTemplate extends OpenFin.MenuItemTemplate {
|
|
87
|
+
data: ViewTabMenuData;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Request for opening a view tab context menu in Browser.
|
|
91
|
+
*/
|
|
92
|
+
export interface OpenViewTabContextMenuRequest {
|
|
93
|
+
/** Screen x-coordinate where context menu should be shown. */
|
|
94
|
+
x: number;
|
|
95
|
+
/** Screen y-coordinate where context menu should be shown. */
|
|
96
|
+
y: number;
|
|
97
|
+
/** Miscellaneous options necessary for implementing custom logic in the provider override. */
|
|
98
|
+
customData?: any;
|
|
99
|
+
/** Template defining the options to show in the context menu. */
|
|
100
|
+
template: ViewTabContextMenuTemplate[];
|
|
101
|
+
selectedViews: OpenFin.Identity[];
|
|
102
|
+
}
|
|
103
|
+
export declare enum ViewTabMenuOptionType {
|
|
104
|
+
NewView = "NewView",
|
|
105
|
+
DuplicateViews = "DuplicateView",
|
|
106
|
+
OpenWithDefaultBrowser = "OpenWithDefaultBrowser",
|
|
107
|
+
ReloadViews = "ReloadTab",
|
|
108
|
+
CloseViews = "CloseTab",
|
|
109
|
+
AddToChannel = "AddToChannel",
|
|
110
|
+
RemoveFromChannel = "RemoveFromChannel",
|
|
111
|
+
Custom = "Custom"
|
|
112
|
+
}
|
|
113
|
+
export interface ViewTabMenuData {
|
|
114
|
+
type: ViewTabMenuOptionType;
|
|
115
|
+
action?: CustomActionSpecifier;
|
|
116
|
+
option?: string;
|
|
117
|
+
}
|
|
118
|
+
export interface ViewTabCustomActionPayload {
|
|
119
|
+
callerType: CustomActionCallerType.ViewTabContextMenu;
|
|
120
|
+
/** Any data necessary for the functioning of specified custom action*/
|
|
121
|
+
customData: any;
|
|
122
|
+
/** Identity of the Browser window where context menu should be shown. */
|
|
123
|
+
windowIdentity: NamedIdentity;
|
|
124
|
+
selectedViews: OpenFin.Identity[];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Payload received by the openViewTabContextMenu provider override.
|
|
128
|
+
*/
|
|
129
|
+
export declare type OpenViewTabContextMenuPayload = OpenViewTabContextMenuRequest & {
|
|
130
|
+
/** Identity of the Browser window where context menu should be shown. */
|
|
131
|
+
identity: NamedIdentity;
|
|
132
|
+
/** Default function that handles stock context menu options. */
|
|
133
|
+
callback: (data: ViewTabMenuData, req: OpenViewTabContextMenuRequest) => any;
|
|
134
|
+
};
|
|
33
135
|
/**
|
|
34
136
|
* Request to update the attributes of a page in which is attached to a running browser window.
|
|
35
137
|
*/
|
|
@@ -39,6 +141,78 @@ export interface UpdateAttachedPageRequest {
|
|
|
39
141
|
/** The updated page. */
|
|
40
142
|
page: Partial<PageWithUpdatableRuntimeAttribs>;
|
|
41
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Types of buttons on browser windows
|
|
146
|
+
*/
|
|
147
|
+
export declare enum BrowserButtonType {
|
|
148
|
+
ShowHideTabs = "ShowHideTabs",
|
|
149
|
+
ColorLinking = "ColorLinking",
|
|
150
|
+
PresetLayouts = "PresetLayouts",
|
|
151
|
+
SavePage = "SavePage",
|
|
152
|
+
Minimise = "Minimise",
|
|
153
|
+
Maximise = "Maximise",
|
|
154
|
+
Close = "Close",
|
|
155
|
+
Custom = "Custom"
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The shape of the payload sent by a custom button click to a custom action handler
|
|
159
|
+
*/
|
|
160
|
+
export interface CustomButtonActionPayload {
|
|
161
|
+
/** Calling the CustomButton type */
|
|
162
|
+
callerType: CustomActionCallerType.CustomButton;
|
|
163
|
+
/** Identity for the current window. */
|
|
164
|
+
windowIdentity: OpenFin.Identity;
|
|
165
|
+
/** Any data necessary for the functioning of specified custom action*/
|
|
166
|
+
customData: any;
|
|
167
|
+
/** Screen x-coordinate where custom button should be shown. */
|
|
168
|
+
x: number;
|
|
169
|
+
/** Screen y-coordinate where custom button should be shown. */
|
|
170
|
+
y: number;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Custom browser buttons
|
|
174
|
+
*/
|
|
175
|
+
export interface CustomBrowserButtonConfig {
|
|
176
|
+
/** Type of cutom browser button */
|
|
177
|
+
type: BrowserButtonType.Custom;
|
|
178
|
+
/** Button name text when hovered over */
|
|
179
|
+
tooltip: string;
|
|
180
|
+
/** Disable custom button true or false */
|
|
181
|
+
disabled?: boolean;
|
|
182
|
+
/** icon URL for icon image */
|
|
183
|
+
iconUrl: string;
|
|
184
|
+
/** Custom action once the button is clicked */
|
|
185
|
+
action: CustomActionSpecifier;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Default Browser Button types
|
|
189
|
+
*/
|
|
190
|
+
export interface PreDefinedButtonConfig {
|
|
191
|
+
/** Type of default browser button */
|
|
192
|
+
type: BrowserButtonType;
|
|
193
|
+
/** Button name text when hovered over */
|
|
194
|
+
tooltip?: string;
|
|
195
|
+
/** icon URL for icon image */
|
|
196
|
+
iconUrl?: string;
|
|
197
|
+
iconProps?: IconProps;
|
|
198
|
+
}
|
|
199
|
+
declare type ShowHideTabsConfig = {
|
|
200
|
+
type: BrowserButtonType.ShowHideTabs;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Buttons on the left of WindowStateButtonOptions
|
|
204
|
+
*/
|
|
205
|
+
export declare type IconTrayButton = ShowHideTabsConfig | CustomBrowserButtonConfig | PreDefinedButtonConfig;
|
|
206
|
+
export interface IconTrayOptions {
|
|
207
|
+
buttons: IconTrayButton[];
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Buttons to the top far right of Browser
|
|
211
|
+
*/
|
|
212
|
+
export declare type WindowStateButton = CustomBrowserButtonConfig | PreDefinedButtonConfig;
|
|
213
|
+
export interface WindowStateButtonOptions {
|
|
214
|
+
buttons: WindowStateButton[];
|
|
215
|
+
}
|
|
42
216
|
/**
|
|
43
217
|
* Request for creating a browser window.
|
|
44
218
|
*/
|
|
@@ -61,6 +235,14 @@ export interface BrowserCreateWindowRequest extends Omit<OpenFin.PlatformWindowC
|
|
|
61
235
|
* If you do not provide a newPageUrl, then the new Page plus button will not be shown and you cannot create a new empty Page or Window.
|
|
62
236
|
*/
|
|
63
237
|
newPageUrl?: string;
|
|
238
|
+
iconTrayOptions?: IconTrayOptions;
|
|
239
|
+
windowStateButtonOptions?: WindowStateButtonOptions;
|
|
240
|
+
/**
|
|
241
|
+
* Remove the Page UI and only allow a single page in the browser window.
|
|
242
|
+
* Must be set to true for this behavior. If this is not set to false,
|
|
243
|
+
* then an empty `pages` option will be populated with a single page.
|
|
244
|
+
*/
|
|
245
|
+
disableMultiplePages?: boolean;
|
|
64
246
|
};
|
|
65
247
|
}
|
|
66
248
|
/**
|
|
@@ -110,7 +292,7 @@ export interface BrowserWindowModule {
|
|
|
110
292
|
*/
|
|
111
293
|
getPages(): Promise<AttachedPage[]>;
|
|
112
294
|
/**
|
|
113
|
-
* Set the active page for the browser window.
|
|
295
|
+
* Set the active page for the browser window. If `multiplePagesDisabled` is `true` an error will be thrown.
|
|
114
296
|
*
|
|
115
297
|
* ```ts
|
|
116
298
|
* import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
@@ -125,7 +307,7 @@ export interface BrowserWindowModule {
|
|
|
125
307
|
setActivePage(id: string): Promise<void>;
|
|
126
308
|
/**
|
|
127
309
|
* Attach a page to a browser window.
|
|
128
|
-
* If a page with same id or title is attached to an existing browser window, an error will be thrown.
|
|
310
|
+
* If `multiplePagesDisabled` is `true` or a page with same id or title is attached to an existing browser window, an error will be thrown.
|
|
129
311
|
*
|
|
130
312
|
* ```ts
|
|
131
313
|
* import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
@@ -219,7 +401,7 @@ export interface BrowserWindowModule {
|
|
|
219
401
|
*/
|
|
220
402
|
updatePage(req: UpdateAttachedPageRequest): Promise<void>;
|
|
221
403
|
/**
|
|
222
|
-
* Reorder pages attached to the browser window.
|
|
404
|
+
* Reorder pages attached to the browser window. If `multiplePagesDisabled` is `true` an error will be thrown.
|
|
223
405
|
*
|
|
224
406
|
* ```ts
|
|
225
407
|
* import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
@@ -232,6 +414,7 @@ export interface BrowserWindowModule {
|
|
|
232
414
|
* @param req the reorder pages request.
|
|
233
415
|
*/
|
|
234
416
|
reorderPages(req: ReorderPagesRequest): Promise<void>;
|
|
417
|
+
_openViewTabContextMenu(req: OpenViewTabContextMenuRequest): Promise<void>;
|
|
235
418
|
}
|
|
236
419
|
/**
|
|
237
420
|
* Factory for wrapping browser windows and global operations.
|
|
@@ -574,11 +757,56 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
|
|
|
574
757
|
* @param id of the id of the page to delete.
|
|
575
758
|
*/
|
|
576
759
|
deleteSavedPage(id: string): Promise<void>;
|
|
760
|
+
/**
|
|
761
|
+
* Implementation for showing a global context menu given a menu template,
|
|
762
|
+
* handler callback, and screen coordinates
|
|
763
|
+
* @param req the payload received by the provider call
|
|
764
|
+
* @param callerIdentity OF identity of the entity from which the request originated
|
|
765
|
+
*/
|
|
766
|
+
openGlobalContextMenu(req: OpenGlobalContextMenuPayload, callerIdentity: any): any;
|
|
767
|
+
/**
|
|
768
|
+
* Implementation for showing a view tab context menu given a menu template,
|
|
769
|
+
* handler callback, and screen coordinates
|
|
770
|
+
* @param req the payload received by the provider call
|
|
771
|
+
* @param callerIdentity OF identity of the entity from which the request originated
|
|
772
|
+
*/
|
|
773
|
+
openViewTabContextMenu(req: OpenViewTabContextMenuPayload, callerIdentity: any): any;
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* The origins from which a custom action can be invoked
|
|
777
|
+
*/
|
|
778
|
+
export declare enum CustomActionCallerType {
|
|
779
|
+
CustomButton = "CustomButton",
|
|
780
|
+
GlobalContextMenu = "GlobalContextMenu",
|
|
781
|
+
ViewTabContextMenu = "ViewTabContextMenu",
|
|
782
|
+
API = "API"
|
|
783
|
+
}
|
|
784
|
+
/**The payload received by a Custom Action.
|
|
785
|
+
* The `callerType` property can be used to determine what data is available in the payload and cast accordingly.
|
|
786
|
+
* When `callerType == CustomActionCallerType.API`, the payload is defined by the code directly invoking the action.*/
|
|
787
|
+
export declare type CustomActionPayload = {
|
|
788
|
+
callerType: CustomActionCallerType.API;
|
|
789
|
+
} | CustomButtonActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload;
|
|
790
|
+
/**
|
|
791
|
+
* Configures a custom action when the control is invoked
|
|
792
|
+
*/
|
|
793
|
+
export interface CustomActionSpecifier {
|
|
794
|
+
/** Identifier of a custom action defined at platform initialization*/
|
|
795
|
+
id: string;
|
|
796
|
+
/** Any data necessary for the functioning of specified custom action*/
|
|
797
|
+
customData?: any;
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Defines custom action map where the key is the custom action ID and value is the action handler
|
|
801
|
+
*/
|
|
802
|
+
export interface CustomActionsMap {
|
|
803
|
+
[actionId: string]: (payload: CustomActionPayload) => any;
|
|
577
804
|
}
|
|
578
805
|
/**
|
|
579
806
|
* Configuration for initializing a Workspace platform.
|
|
580
807
|
*/
|
|
581
808
|
export interface WorkspacePlatformInitConfig {
|
|
809
|
+
customActions?: CustomActionsMap;
|
|
582
810
|
/** Config for overriding browser options and behavior. */
|
|
583
811
|
browser?: BrowserInitConfig;
|
|
584
812
|
/** Custom Themes object
|
|
@@ -657,6 +885,8 @@ export interface BrowserInitConfig {
|
|
|
657
885
|
* Default options for creating a new browser window. Any option not included in WorkspacePlatform.getCurrentSync().Browser.createWindow(options) call will default to the value provided in this field.
|
|
658
886
|
*/
|
|
659
887
|
defaultWindowOptions?: BrowserCreateWindowRequest;
|
|
888
|
+
/** Default options when creating a new page. If `iconUrl`, `unsavedIconUrl` or `closeButton` are not defined when creating a page, setting will default to `defaultPageOptions`. */
|
|
889
|
+
defaultPageOptions?: Pick<Page, 'iconUrl' | 'unsavedIconUrl' | 'closeButton'>;
|
|
660
890
|
/**
|
|
661
891
|
* The default options when creating a new browser window. Any option not included in WorkspacePlatform.getCurrentSync().Browser.createView(options) call will default to the value provided in this field.
|
|
662
892
|
*/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="openfin-adapter/fin" />
|
|
2
|
+
export declare const getWindowChannelId: (identity: OpenFin.Identity) => string;
|
|
3
|
+
export declare const getChannelClient: (identity: OpenFin.Identity) => Promise<import("openfin-adapter").ChannelClient>;
|
|
4
|
+
/**
|
|
5
|
+
* If the browser window is reloaded too quickly, runtime will
|
|
6
|
+
* respond that the channel provider has already been created.
|
|
7
|
+
* Hence, we retry a couple of times to make sure this does not occur.
|
|
8
|
+
* (Should only happen in local development)
|
|
9
|
+
*/
|
|
10
|
+
export declare const createChannel: () => Promise<import("openfin-adapter").ChannelProvider>;
|
|
11
|
+
export interface AddToChannelRequest {
|
|
12
|
+
newChannelId: string;
|
|
13
|
+
selectedViews: OpenFin.Identity[];
|
|
14
|
+
}
|
|
15
|
+
export declare enum ChannelAction {
|
|
16
|
+
CloseBrowserWindow = "close-browser-window",
|
|
17
|
+
QuitPlatform = "quit-platform",
|
|
18
|
+
CloseActivePage = "close-active-page",
|
|
19
|
+
AddToChannel = "add-to-channel",
|
|
20
|
+
RemoveFromChannel = "remove-from-channel"
|
|
21
|
+
}
|
|
@@ -21,7 +21,6 @@ export declare enum EventType {
|
|
|
21
21
|
AttachedPagesToWindow = "attached-pages-to-window",
|
|
22
22
|
DetachedPagesFromWindow = "detached-pages-from-window"
|
|
23
23
|
}
|
|
24
|
-
export declare const getWindowChannelId: (identity: OpenFin.Identity) => string;
|
|
25
24
|
export declare const getEventEmitter: (identity: OpenFin.Identity) => {
|
|
26
25
|
emit: (event: string | number, ...payload: any[]) => Promise<void>;
|
|
27
26
|
addListener: (event: string | number, listener: import("@common/utils/shared-emitter").Listener) => void;
|
|
@@ -6,7 +6,7 @@ interface Workstack {
|
|
|
6
6
|
layout: PageLayout;
|
|
7
7
|
isActive: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare function convertWorkstackToAttachedPage(
|
|
9
|
+
export declare function convertWorkstackToAttachedPage({ id, name, ...rest }: Workstack & AttachedPage): AttachedPage;
|
|
10
10
|
/**
|
|
11
11
|
* Attempts to fix any misconfigurations in a list of attached pages.
|
|
12
12
|
* @param pages the pages to fix.
|
|
@@ -20,8 +20,17 @@ export interface Page {
|
|
|
20
20
|
tooltip?: string;
|
|
21
21
|
/** True if the page is read only. In this state, the page is locked and cannot be unlocked. */
|
|
22
22
|
isReadOnly?: boolean;
|
|
23
|
+
/** Icon that appears on a page tab if there are unsaved changes (dirty state). If 'undefined', default icon will appear. */
|
|
24
|
+
unsavedIconUrl?: string;
|
|
25
|
+
/** Icon that appears on a page tab if there are no unsaved changes. If 'undefined', default icon will appear. */
|
|
26
|
+
iconUrl?: string;
|
|
23
27
|
/** The layout of the page. */
|
|
24
28
|
layout: PageLayout;
|
|
29
|
+
/** Used to manipulate behaviour of a close button on a page tab. If `undefined`, then close button is visible and actionable. */
|
|
30
|
+
closeButton?: {
|
|
31
|
+
hidden?: boolean;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
};
|
|
25
34
|
}
|
|
26
35
|
declare type AttachedPageMetadata = {
|
|
27
36
|
/** The window the page is currently attached to. */
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="openfin-adapter/fin" />
|
|
2
|
+
import { _Window } from 'openfin-adapter/src/api/window';
|
|
3
|
+
export declare enum MenuItemType {
|
|
4
|
+
Label = "normal",
|
|
5
|
+
Separator = "separator",
|
|
6
|
+
Submenu = "submenu",
|
|
7
|
+
Checkbox = "checkbox"
|
|
8
|
+
}
|
|
9
|
+
export declare type ShowContextMenuResponse = OpenFin.MenuResult & {
|
|
10
|
+
data: string;
|
|
11
|
+
};
|
|
12
|
+
export default function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: _Window): Promise<ShowContextMenuResponse>;
|
|
@@ -12,19 +12,18 @@ export declare const isWindowDefinedWithIndexDB: boolean;
|
|
|
12
12
|
export declare const finUUID: string;
|
|
13
13
|
export declare const finName: string;
|
|
14
14
|
export declare const finEntityType: "" | import("openfin-adapter/src/shapes/EntityType").EntityType;
|
|
15
|
-
export declare const env: Env;
|
|
16
15
|
export declare const isEnvLocal: boolean;
|
|
17
16
|
export declare const isEnvDev: boolean;
|
|
18
17
|
export declare const isEnvStaging: boolean;
|
|
19
18
|
export declare const isEnvProd: boolean;
|
|
20
|
-
export declare const isLibrary: boolean;
|
|
21
19
|
export declare const workspaceProviderFinsLink: string;
|
|
22
20
|
export declare const workspaceProviderFallbackUrl: string;
|
|
23
|
-
export declare const workspaceAppsUrl: string;
|
|
24
|
-
export declare const workspaceStorefrontFooterUrl: string;
|
|
25
|
-
export declare const workspaceStorefrontLandingPageUrl: string;
|
|
26
|
-
export declare const workspaceStorefrontNavigationUrl: string;
|
|
27
|
-
export declare const workspaceShareUrl: string;
|
|
28
21
|
export declare const workspaceCdnUrl: string;
|
|
29
22
|
export declare const workspaceCdnEnvUrl: string;
|
|
30
23
|
export declare const workspaceRuntimeVersion: string;
|
|
24
|
+
/**
|
|
25
|
+
* A promise that resolves when:
|
|
26
|
+
* - The window 'load' event is fired.
|
|
27
|
+
* - The window first paint occurs.
|
|
28
|
+
*/
|
|
29
|
+
export declare const firstPaint: Promise<void>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { NamedIdentity } from 'openfin-adapter/src/identity';
|
|
2
|
+
import { GlobalContextMenuItemTemplate } from '../../../client-api-platform/src/shapes';
|
|
3
|
+
export declare const getGlobalContextMenuTemplate: (winIdentity: NamedIdentity) => Promise<GlobalContextMenuItemTemplate[]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="openfin-adapter/fin" />
|
|
2
|
+
import { NamedIdentity } from 'openfin-adapter/src/identity';
|
|
3
|
+
interface LandingPageUrls {
|
|
4
|
+
newPageUrl: string | false;
|
|
5
|
+
newTabUrl: string | false;
|
|
6
|
+
}
|
|
7
|
+
export declare const getLandingPageUrls: (winIdentity?: NamedIdentity) => Promise<LandingPageUrls>;
|
|
8
|
+
export declare const checkHasNewTabUrl: () => Promise<boolean>;
|
|
9
|
+
export declare const getNewLandingTabViewOptions: (target: OpenFin.Identity) => Promise<OpenFin.PlatformViewCreationOptions>;
|
|
10
|
+
export declare const makeNewLandingPage: (winIdentity?: NamedIdentity) => Promise<import("client-api-platform").PageWithUpdatableRuntimeAttribs>;
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="openfin-adapter/fin" />
|
|
2
|
+
import { NamedIdentity } from 'openfin-adapter/src/identity';
|
|
2
3
|
export declare type LayoutComponentStateExtended = OpenFin.LayoutComponent['componentState'] & {
|
|
3
4
|
name: string;
|
|
4
5
|
uuid: string;
|
|
@@ -40,7 +41,7 @@ export declare type LayoutDOMEventListener = (ev: LayoutDOMEvent) => void;
|
|
|
40
41
|
*/
|
|
41
42
|
export declare const cloneLayoutAndRemoveNames: (layout: any) => any;
|
|
42
43
|
export declare const mapContentComponentState: (content: OpenFin.LayoutContent | LayoutContentExtended) => LayoutComponentStateExtended[];
|
|
43
|
-
export declare const getLayoutWithSingleView: (title: string, url: string) => Promise<any>;
|
|
44
|
+
export declare const getLayoutWithSingleView: (title: string, url: string, winIdentity?: NamedIdentity) => Promise<any>;
|
|
44
45
|
export declare const isLayoutTabActive: (tabSelector: string) => boolean;
|
|
45
46
|
export declare const containerId = "layout_container";
|
|
46
47
|
export declare const getViewComponents: () => LayoutContentExtended;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep merge a set of source objects into a single target object.
|
|
3
|
+
* @param target the target object to merge sources into.
|
|
4
|
+
* @param sources the source objects to merge into the target. (FIFO)
|
|
5
|
+
*/
|
|
6
|
+
export declare function mergeDeep(target: any, ...sources: any[]): any;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export declare const capitalize: (s: string) => string;
|
|
2
|
-
export declare const titleize: (s: string) => string;
|
|
3
2
|
export declare const pascalize: (s: string) => string;
|
|
4
|
-
export declare const slugify: (s: string) => string;
|
|
5
3
|
export declare const isStringMatchesQuery: (title: string, query?: string) => boolean;
|
|
@@ -147,4 +147,5 @@ export declare const isStorefrontWindowRunning: () => Promise<boolean>;
|
|
|
147
147
|
export declare const isHomeWindowRunning: () => Promise<boolean>;
|
|
148
148
|
export declare const showAndFocusStorefront: () => Promise<void>;
|
|
149
149
|
export declare const centerWindowIfOffScreen: (windowIdentity?: WindowIdentity) => Promise<void>;
|
|
150
|
+
export declare const getDisableMultiplePagesOption: (identity: WindowIdentity) => Promise<any>;
|
|
150
151
|
export {};
|