@openfin/workspace-platform 6.3.4 → 7.0.0
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-platform/src/api/browser/browser-module.d.ts +2 -1
- package/client-api-platform/src/api/browser/index.d.ts +1 -0
- package/client-api-platform/src/api/protocol.d.ts +10 -1
- package/client-api-platform/src/api/storage.d.ts +7 -1
- package/client-api-platform/src/api/utils.d.ts +1 -0
- package/client-api-platform/src/api/workspaces/idb.d.ts +12 -0
- package/client-api-platform/src/api/workspaces/index.d.ts +28 -0
- package/client-api-platform/src/shapes.d.ts +142 -3
- package/common/src/api/browser-protocol.d.ts +6 -1
- package/common/src/components/Indicator/Indicator.constants.d.ts +18 -0
- package/common/src/utils/a11y/search.a11y.d.ts +31 -0
- package/common/src/utils/a11y/speak.d.ts +6 -0
- package/common/src/utils/env.d.ts +1 -0
- package/common/src/utils/global-context-menu.d.ts +12 -0
- package/common/src/utils/indicators/browser.d.ts +16 -0
- package/common/src/utils/indicators/helper.d.ts +2 -0
- package/common/src/utils/local-storage-key.d.ts +1 -1
- package/common/src/utils/route.d.ts +2 -2
- package/common/src/utils/router/base.d.ts +61 -0
- package/common/src/utils/router/index.d.ts +2 -0
- package/common/src/utils/router/next.d.ts +43 -0
- package/common/src/utils/usage-register.d.ts +11 -0
- package/index.js +2 -1
- package/index.js.LICENSE.txt +14 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/client-api-platform/src/api/workspace-module.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="openfin-adapter/fin" />
|
|
2
2
|
import type { AttachedPage, Page, PageWithUpdatableRuntimeAttribs } from '../../../../common/src/api/pages/shapes';
|
|
3
3
|
import { OpenPageTabContextMenuRequest } from '../../../../client-api-platform/src/index';
|
|
4
|
-
import { OpenGlobalContextMenuRequest, OpenViewTabContextMenuRequest, ToolbarOptions, WindowStateButtonOptions } from '../../../../client-api-platform/src/shapes';
|
|
4
|
+
import { OpenGlobalContextMenuRequest, OpenSaveMenuRequest, OpenViewTabContextMenuRequest, ToolbarOptions, WindowStateButtonOptions } from '../../../../client-api-platform/src/shapes';
|
|
5
5
|
export declare const getBrowserModule: (identity: OpenFin.Identity) => {
|
|
6
6
|
identity: OpenFin.Identity;
|
|
7
7
|
openfinWindow: import("openfin-adapter").Window;
|
|
@@ -17,4 +17,5 @@ export declare const getBrowserModule: (identity: OpenFin.Identity) => {
|
|
|
17
17
|
replaceWindowStateButtonOptions: (options: WindowStateButtonOptions) => Promise<void>;
|
|
18
18
|
_openViewTabContextMenu: (req: OpenViewTabContextMenuRequest) => Promise<any>;
|
|
19
19
|
_openPageTabContextMenu: (req: OpenPageTabContextMenuRequest) => Promise<any>;
|
|
20
|
+
_openSaveModal: (req: OpenSaveMenuRequest) => Promise<any>;
|
|
20
21
|
};
|
|
@@ -17,6 +17,7 @@ export declare const getBrowserApi: (identity: OpenFin.ApplicationIdentity) => {
|
|
|
17
17
|
replaceWindowStateButtonOptions: (options: import("../../shapes").WindowStateButtonOptions) => Promise<void>;
|
|
18
18
|
_openViewTabContextMenu: (req: import("../../shapes").OpenViewTabContextMenuRequest) => Promise<any>;
|
|
19
19
|
_openPageTabContextMenu: (req: import("../../shapes").OpenPageTabContextMenuRequest) => Promise<any>;
|
|
20
|
+
_openSaveModal: (req: import("../../shapes").OpenSaveMenuRequest) => Promise<any>;
|
|
20
21
|
};
|
|
21
22
|
createWindow: (options: BrowserCreateWindowRequest) => Promise<BrowserWindowModule>;
|
|
22
23
|
getAllAttachedPages: () => Promise<AttachedPage[]>;
|
|
@@ -36,7 +36,16 @@ export declare enum ChannelAction {
|
|
|
36
36
|
OpenGlobalContextMenuInternal = "openGlobalContextMenuInternal",
|
|
37
37
|
OpenViewTabContextMenuInternal = "openViewTabContextMenuInternal",
|
|
38
38
|
OpenPageTabContextMenuInternal = "openPageTabContextMenuInternal",
|
|
39
|
-
InvokeCustomActionInternal = "invokeCustomActionInternal"
|
|
39
|
+
InvokeCustomActionInternal = "invokeCustomActionInternal",
|
|
40
|
+
GetSavedWorkspace = "getSavedWorkspace",
|
|
41
|
+
CreateSavedWorkspace = "createSavedWorkspace",
|
|
42
|
+
UpdateSavedWorkspace = "updateSavedWorkspace",
|
|
43
|
+
DeleteSavedWorkspace = "deleteSavedWorkspace",
|
|
44
|
+
GetSavedWorkspaces = "getSavedWorkspaces",
|
|
45
|
+
SaveWorkspace = "saveWorkspace",
|
|
46
|
+
GetCurrentWorkspace = "getCurrentWorkspace",
|
|
47
|
+
SetCurrentWorkspace = "setCurrentWorkspace",
|
|
48
|
+
GetActiveWorkspace = "getActiveWorkspace"
|
|
40
49
|
}
|
|
41
50
|
/**
|
|
42
51
|
* Get a channel client for a specific Workspace platform.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Page } from '../../../common/src/api/pages/shapes';
|
|
2
|
-
import type { CreateSavedPageRequest, UpdateSavedPageRequest } from '../shapes';
|
|
2
|
+
import type { CreateSavedPageRequest, CreateSavedWorkspaceRequest, UpdateSavedPageRequest, UpdateSavedWorkspaceRequest, Workspace } from '../shapes';
|
|
3
3
|
export declare const getStorageApi: (identity: any) => {
|
|
4
4
|
createPage: (req: CreateSavedPageRequest) => Promise<any>;
|
|
5
5
|
deletePage: (id: string) => Promise<any>;
|
|
@@ -7,4 +7,10 @@ export declare const getStorageApi: (identity: any) => {
|
|
|
7
7
|
getPage: (id: string) => Promise<any>;
|
|
8
8
|
getPages: (query?: string) => Promise<Page[]>;
|
|
9
9
|
savePage: (page: Page) => Promise<any>;
|
|
10
|
+
createWorkspace: (req: CreateSavedWorkspaceRequest) => Promise<any>;
|
|
11
|
+
deleteWorkspace: (id: string) => Promise<any>;
|
|
12
|
+
updateWorkspace: (req: UpdateSavedWorkspaceRequest) => Promise<any>;
|
|
13
|
+
getWorkspace: (id: string) => Promise<any>;
|
|
14
|
+
getWorkspaces: (query?: string) => Promise<Workspace[]>;
|
|
15
|
+
saveWorkspace: (workspace: Workspace) => Promise<any>;
|
|
10
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleNameCollision: (initialName: string, existingNames: string[]) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Workspace } from '../../../../client-api/src/shapes';
|
|
2
|
+
export declare const store: import("idb-keyval").UseStore;
|
|
3
|
+
export declare function getWorkspace(id: string): Promise<Workspace>;
|
|
4
|
+
export declare function getWorkspaceList(filter?: string): Promise<Workspace[]>;
|
|
5
|
+
export declare function createWorkspace({ workspace }: {
|
|
6
|
+
workspace: any;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
export declare function deleteWorkspace(id: string): Promise<void>;
|
|
9
|
+
export declare function updateWorkspace({ workspaceId, workspace }: {
|
|
10
|
+
workspaceId: any;
|
|
11
|
+
workspace: any;
|
|
12
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CreateSavedWorkspaceRequest, Workspace } from '../../../../client-api-platform/src/shapes';
|
|
2
|
+
/**
|
|
3
|
+
* Set the current active workspace.
|
|
4
|
+
*/
|
|
5
|
+
export declare function setCurrentWorkspace(workspace: Workspace): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Get a workspace data structure that represents the users current desktop.
|
|
8
|
+
* @returns the current active workspace.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCurrentWorkspace(): Promise<any>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the active workspace.
|
|
13
|
+
* @returns the current active workspace.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getActiveWorkspace(): Workspace | undefined;
|
|
16
|
+
export declare const createWorkspaceInStorage: (req: CreateSavedWorkspaceRequest) => Promise<any>;
|
|
17
|
+
export declare const getWorkspacesInStorage: () => Promise<Workspace[]>;
|
|
18
|
+
export declare const getWorkspaceInStorage: (id: string) => Promise<Workspace>;
|
|
19
|
+
export declare const deleteWorkspaceInStorage: (id: string) => Promise<any>;
|
|
20
|
+
export declare const updateWorkspaceInStorage: (req: any) => Promise<any>;
|
|
21
|
+
export declare const saveWorkspace: (workspace: Workspace) => Promise<any>;
|
|
22
|
+
/**
|
|
23
|
+
* Checks if a given workspace name is unique
|
|
24
|
+
* If not, add a progressive number to it
|
|
25
|
+
* @param initialName The initial name to test
|
|
26
|
+
* @returns string: a unique workspace name
|
|
27
|
+
*/
|
|
28
|
+
export declare function getUniqueWorkspaceTitle(initialName?: string): Promise<string>;
|
|
@@ -5,10 +5,10 @@ import { IconProps } from '@openfin/ui-library';
|
|
|
5
5
|
import type { AttachedPage, Page, PageWithUpdatableRuntimeAttribs } from '../../common/src/api/pages/shapes';
|
|
6
6
|
import type { CustomThemes } from '../../common/src/api/theming';
|
|
7
7
|
import type { App } from '../../client-api/src/shapes';
|
|
8
|
-
export type { CustomThemes } from '../../common/src/api/theming';
|
|
9
|
-
export type { App, Image, AppIntent } from '../../client-api/src/shapes';
|
|
10
8
|
export { AppManifestType } from '../../client-api/src/shapes';
|
|
11
|
-
export type {
|
|
9
|
+
export type { App, AppIntent, Image } from '../../client-api/src/shapes';
|
|
10
|
+
export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs } from '../../common/src/api/pages/shapes';
|
|
11
|
+
export type { CustomThemes } from '../../common/src/api/theming';
|
|
12
12
|
/**
|
|
13
13
|
* Request for creating a saved page in persistent storage.
|
|
14
14
|
*/
|
|
@@ -53,7 +53,10 @@ export interface ContextMenuItemData {
|
|
|
53
53
|
export declare enum GlobalContextMenuOptionType {
|
|
54
54
|
NewWindow = "NewWindow",
|
|
55
55
|
NewPage = "NewPage",
|
|
56
|
+
SavePage = "SavePage",
|
|
57
|
+
SavePageAs = "SavePageAs",
|
|
56
58
|
CloseWindow = "CloseWindow",
|
|
59
|
+
DeleteWorkspace = "DeleteWorkspace",
|
|
57
60
|
OpenStorefront = "OpenStorefront",
|
|
58
61
|
Quit = "Quit",
|
|
59
62
|
Custom = "Custom"
|
|
@@ -65,12 +68,16 @@ export declare enum PageTabContextMenuOptionType {
|
|
|
65
68
|
Duplicate = "Duplicate",
|
|
66
69
|
Rename = "Rename",
|
|
67
70
|
Save = "Save",
|
|
71
|
+
SaveAs = "Save As",
|
|
68
72
|
Custom = "Custom"
|
|
69
73
|
}
|
|
70
74
|
/**Shape of the data property of a global context menu template item */
|
|
71
75
|
export interface GlobalContextMenuItemData extends ContextMenuItemData {
|
|
72
76
|
type: GlobalContextMenuOptionType;
|
|
73
77
|
}
|
|
78
|
+
export interface WorkspaceContextMenuItemData extends GlobalContextMenuItemData {
|
|
79
|
+
workspaceId: string;
|
|
80
|
+
}
|
|
74
81
|
/**Configuration of an option in the global context menu */
|
|
75
82
|
export interface GlobalContextMenuItemTemplate extends OpenFin.MenuItemTemplate {
|
|
76
83
|
data: GlobalContextMenuItemData;
|
|
@@ -836,6 +843,62 @@ export interface WorkspacePlatformStorage {
|
|
|
836
843
|
* @param page the page to save.
|
|
837
844
|
*/
|
|
838
845
|
savePage(page: Page): Promise<void>;
|
|
846
|
+
/**
|
|
847
|
+
* Get all workspaces that are saved in persistent storage.
|
|
848
|
+
*
|
|
849
|
+
* ```ts
|
|
850
|
+
* import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
851
|
+
*
|
|
852
|
+
* const workspacePlatform = WorkspacePlatform.getCurrentSync();
|
|
853
|
+
* const workspaces = await workspacePlatform.Storage.getWorkspaces();
|
|
854
|
+
* ```
|
|
855
|
+
*/
|
|
856
|
+
getWorkspaces(): Promise<Workspace[]>;
|
|
857
|
+
/**
|
|
858
|
+
* Get a specific workspace in persistent storage.
|
|
859
|
+
*
|
|
860
|
+
* ```ts
|
|
861
|
+
* import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
862
|
+
*
|
|
863
|
+
* const workspacePlatform = WorkspacePlatform.getCurrentSync();
|
|
864
|
+
* const myWorkspace = await workspacePlatform.Storage.getWorkspace('myWorkspaceId');
|
|
865
|
+
* ```
|
|
866
|
+
* @param id the id of the workspace to get.
|
|
867
|
+
*/
|
|
868
|
+
getWorkspace(id: string): Promise<Workspace>;
|
|
869
|
+
/**
|
|
870
|
+
* Create a workspace in persistent storage.
|
|
871
|
+
*
|
|
872
|
+
* @param workspace the workspace to create in persistent storage.
|
|
873
|
+
*/
|
|
874
|
+
createWorkspace(workspace: CreateSavedWorkspaceRequest): Promise<void>;
|
|
875
|
+
/**
|
|
876
|
+
* Update a workspace in persistent storage.
|
|
877
|
+
* @param req the update saved workspace request.
|
|
878
|
+
*/
|
|
879
|
+
updateWorkspace(req: UpdateSavedWorkspaceRequest): Promise<void>;
|
|
880
|
+
/**
|
|
881
|
+
* Delete a workspace from persistent storage.
|
|
882
|
+
*
|
|
883
|
+
* ```ts
|
|
884
|
+
* import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
885
|
+
*
|
|
886
|
+
* const workspacePlatform = WorkspacePlatform.getCurrentSync();
|
|
887
|
+
* await workspacePlatform.Storage.deleteWorkspace('myWorkspaceId');
|
|
888
|
+
* ```
|
|
889
|
+
* @param id the id of the workspace to delete.
|
|
890
|
+
*/
|
|
891
|
+
deleteWorkspace(id: string): Promise<void>;
|
|
892
|
+
/**
|
|
893
|
+
* Save a workspace in persistent storage.
|
|
894
|
+
*
|
|
895
|
+
* This is a helper function that will call `getWorkspace` to determine if a workspace is already in storage.
|
|
896
|
+
* If the workspace is already in storage, it will call `updateWorkspace`.
|
|
897
|
+
* If it does not exist in storage, the function will call `createWorkspace` instead.
|
|
898
|
+
*
|
|
899
|
+
* @param workspace the workspace to save.
|
|
900
|
+
*/
|
|
901
|
+
saveWorkspace(workspace: Workspace): Promise<void>;
|
|
839
902
|
}
|
|
840
903
|
/**
|
|
841
904
|
* Request for launching an application.
|
|
@@ -891,6 +954,20 @@ export interface WorkspacePlatformModule extends OpenFin.Platform {
|
|
|
891
954
|
* @param req the launch app request.
|
|
892
955
|
*/
|
|
893
956
|
launchApp(req: LaunchAppRequest): Promise<void>;
|
|
957
|
+
/**
|
|
958
|
+
* Gets a workspace data structure that represents the current state of the user's desktop.
|
|
959
|
+
*/
|
|
960
|
+
getCurrentWorkspace(): Promise<Workspace>;
|
|
961
|
+
/**
|
|
962
|
+
* Closes content from the current workspace and applies the given workspace to the user's desktop.
|
|
963
|
+
* The given workspace becomes the active workspace, and the content of the workspace is launched.
|
|
964
|
+
* @param workspace the workspace to set as current active workspace.
|
|
965
|
+
*/
|
|
966
|
+
setCurrentWorkspace(workspace: Workspace): Promise<void>;
|
|
967
|
+
/**
|
|
968
|
+
* Gets a workspace data structure that represents the active state of the user's desktop.
|
|
969
|
+
*/
|
|
970
|
+
getActiveWorkspace(): Promise<Workspace>;
|
|
894
971
|
/**
|
|
895
972
|
* The browser window factory for the Workspace Platform.
|
|
896
973
|
*/
|
|
@@ -930,6 +1007,31 @@ export interface WorkspacePlatformProvider extends OpenFin.PlatformProvider {
|
|
|
930
1007
|
* @param id of the id of the page to delete.
|
|
931
1008
|
*/
|
|
932
1009
|
deleteSavedPage(id: string): Promise<void>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Implementation for getting a list of saved workspaces from persistent storage.
|
|
1012
|
+
* @param query an optional query.
|
|
1013
|
+
*/
|
|
1014
|
+
getSavedWorkspaces(query?: string): Promise<Workspace[]>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Implementation for getting a single workspace in persistent storage.
|
|
1017
|
+
* @param id
|
|
1018
|
+
*/
|
|
1019
|
+
getSavedWorkspace(id: string): Promise<Workspace>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Implementation for creating a saved workspace in persistent storage.
|
|
1022
|
+
* @param req the create saved workspace request.
|
|
1023
|
+
*/
|
|
1024
|
+
createSavedWorkspace(req: CreateSavedWorkspaceRequest): Promise<void>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Implementation for updating a saved workspace in persistent storage.
|
|
1027
|
+
* @param req the update saved workspace request.
|
|
1028
|
+
*/
|
|
1029
|
+
updateSavedWorkspace(req: UpdateSavedWorkspaceRequest): Promise<void>;
|
|
1030
|
+
/**
|
|
1031
|
+
* Implementation for deleting a saved workspace in persistent storage.
|
|
1032
|
+
* @param id of the id of the workspace to delete.
|
|
1033
|
+
*/
|
|
1034
|
+
deleteSavedWorkspace(id: string): Promise<void>;
|
|
933
1035
|
/**
|
|
934
1036
|
* Implementation for showing a global context menu given a menu template,
|
|
935
1037
|
* handler callback, and screen coordinates. For an example of overriding, see {@link BrowserOverrideCallback}.
|
|
@@ -1141,3 +1243,40 @@ export interface BrowserInitConfig {
|
|
|
1141
1243
|
*/
|
|
1142
1244
|
interopOverride?: OpenFin.OverrideCallback<InteropBroker, InteropBroker>;
|
|
1143
1245
|
}
|
|
1246
|
+
interface WorkspaceMetadata {
|
|
1247
|
+
APIVersion: string;
|
|
1248
|
+
timestamp: string;
|
|
1249
|
+
}
|
|
1250
|
+
export interface Workspace {
|
|
1251
|
+
workspaceId: string;
|
|
1252
|
+
title: string;
|
|
1253
|
+
metadata: WorkspaceMetadata;
|
|
1254
|
+
attributes: string[];
|
|
1255
|
+
snapshot: OpenFin.Snapshot;
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Request for creating a saved workspace in persistent storage.
|
|
1259
|
+
*/
|
|
1260
|
+
export interface CreateSavedWorkspaceRequest {
|
|
1261
|
+
/** The workspace to create. */
|
|
1262
|
+
workspace: Workspace;
|
|
1263
|
+
}
|
|
1264
|
+
/**
|
|
1265
|
+
* Request for updating a saved workspace in persistent storage.
|
|
1266
|
+
*/
|
|
1267
|
+
export interface UpdateSavedWorkspaceRequest {
|
|
1268
|
+
/** The ID of the workspace to update. */
|
|
1269
|
+
workspaceId: string;
|
|
1270
|
+
/** The updated workspace. */
|
|
1271
|
+
workspace: Workspace;
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Request to create a save modal.
|
|
1275
|
+
* @private
|
|
1276
|
+
*/
|
|
1277
|
+
export interface OpenSaveMenuRequest {
|
|
1278
|
+
menuType: SaveModalType;
|
|
1279
|
+
id: string;
|
|
1280
|
+
x?: number;
|
|
1281
|
+
y?: number;
|
|
1282
|
+
}
|
|
@@ -12,12 +12,17 @@ export interface AddToChannelRequest {
|
|
|
12
12
|
newChannelId: string;
|
|
13
13
|
selectedViews: OpenFin.Identity[];
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* These actions are used to handle functionality activated by user in the UI (e.g. context menu)
|
|
17
|
+
* and hence show dialogs, indicators etc.
|
|
18
|
+
* Not to be confused with attached pages actions, which are for API use.
|
|
19
|
+
*/
|
|
15
20
|
export declare enum ChannelAction {
|
|
16
21
|
CloseBrowserWindow = "close-browser-window",
|
|
17
22
|
QuitPlatform = "quit-platform",
|
|
18
23
|
ClosePage = "close-page",
|
|
19
24
|
AddToChannel = "add-to-channel",
|
|
20
25
|
RemoveFromChannel = "remove-from-channel",
|
|
21
|
-
|
|
26
|
+
OpenSaveModalInternal = "open-save-modal-internal",
|
|
22
27
|
DuplicatePage = "duplicate-page"
|
|
23
28
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Here we define an Indicator only explicitly by needing an ID for reference over the wire.
|
|
3
|
+
* Type and message are meant to provide actual context and meaning to an indicator, but
|
|
4
|
+
* they are not required in the case of destroying an existing indicator.
|
|
5
|
+
*/
|
|
6
|
+
export interface Indicator {
|
|
7
|
+
id: string;
|
|
8
|
+
type?: IndicatorType;
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Indicator types are meant to provide additional context to the indicator.
|
|
13
|
+
*/
|
|
14
|
+
export declare enum IndicatorType {
|
|
15
|
+
ERROR = "error",
|
|
16
|
+
SUCCESS = "success",
|
|
17
|
+
INFO = "info"
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare type Role = string;
|
|
2
|
+
export declare type AriaOwns = undefined | string;
|
|
3
|
+
export declare type AriaHaspopup = boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
4
|
+
export declare type AriaAutocomplete = 'none' | 'inline' | 'list' | 'both';
|
|
5
|
+
export declare type AriaControls = undefined | string;
|
|
6
|
+
export declare type AriaActivedescendant = undefined | string;
|
|
7
|
+
export declare type AriaExpanded = boolean | 'false' | 'true';
|
|
8
|
+
export declare type AriaLive = 'none' | 'polite' | 'assertive';
|
|
9
|
+
export declare type A11yBox = {
|
|
10
|
+
'role': Role;
|
|
11
|
+
'aria-expanded': AriaExpanded;
|
|
12
|
+
'aria-owns': AriaOwns;
|
|
13
|
+
'aria-haspopup': AriaHaspopup;
|
|
14
|
+
};
|
|
15
|
+
export declare type A11yInput = {
|
|
16
|
+
'aria-controls': AriaControls;
|
|
17
|
+
'aria-autocomplete': AriaAutocomplete;
|
|
18
|
+
'aria-activedescendant': AriaActivedescendant;
|
|
19
|
+
};
|
|
20
|
+
export interface AriaSearchInput {
|
|
21
|
+
role: Role;
|
|
22
|
+
controls: AriaControls;
|
|
23
|
+
autocomplete: AriaAutocomplete;
|
|
24
|
+
owns: AriaOwns;
|
|
25
|
+
haspopup: AriaHaspopup;
|
|
26
|
+
searchLabelID: string;
|
|
27
|
+
searchResultID: string;
|
|
28
|
+
searchInputID: string;
|
|
29
|
+
labelText: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const A11ySearch: AriaSearchInput;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AriaLive } from './search.a11y';
|
|
2
|
+
/**
|
|
3
|
+
* Makes the screen reader speak the provided message.
|
|
4
|
+
* https://a11y-guidelines.orange.com/en/web/components-examples/make-a-screen-reader-talk/
|
|
5
|
+
*/
|
|
6
|
+
export declare const speak: (msg: string, priority?: AriaLive) => void;
|
|
@@ -23,3 +23,4 @@ export declare const workspaceCdnEnvUrl: string;
|
|
|
23
23
|
export declare const workspaceDocsPlatformUrl: string;
|
|
24
24
|
export declare const workspaceDocsClientUrl: string;
|
|
25
25
|
export declare const workspaceRuntimeVersion: string;
|
|
26
|
+
export declare const workspaceBuildVersion: string;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { NamedIdentity } from 'openfin-adapter/src/identity';
|
|
2
|
+
import { MenuItemType } from '../../../common/src/utils/context-menu';
|
|
3
|
+
import * as WP from '../../../client-api-platform/src/index';
|
|
2
4
|
import { GlobalContextMenuItemTemplate } from '../../../client-api-platform/src/shapes';
|
|
5
|
+
export declare const getAllSavedWorkspaces: () => Promise<{
|
|
6
|
+
label: string;
|
|
7
|
+
type: MenuItemType;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
checked: boolean;
|
|
10
|
+
data: {
|
|
11
|
+
type: WP.GlobalContextMenuOptionType;
|
|
12
|
+
workspaceId: string;
|
|
13
|
+
};
|
|
14
|
+
}[]>;
|
|
3
15
|
export declare const getGlobalContextMenuTemplate: (winIdentity: NamedIdentity) => Promise<GlobalContextMenuItemTemplate[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum BrowserIndicatorIcon {
|
|
2
|
+
Locked = "LockClosedIcon",
|
|
3
|
+
Unlocked = "LockOpen1Icon"
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Creates a window containing an error indicator
|
|
7
|
+
*/
|
|
8
|
+
export declare function showBrowserError(message: string, parentBrowserName: string, icon?: BrowserIndicatorIcon): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a window containing a success indicator
|
|
11
|
+
*/
|
|
12
|
+
export declare function showBrowserSuccess(message: string, parentBrowserName: string, icon?: BrowserIndicatorIcon): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a window containing an info indicator
|
|
15
|
+
*/
|
|
16
|
+
export declare function showBrowserInfo(message: string, parentBrowserName: string, icon?: BrowserIndicatorIcon): Promise<void>;
|
|
@@ -14,7 +14,7 @@ export declare enum PageRoute {
|
|
|
14
14
|
BrowserPopupMenu = "/browser/popup-menu/",
|
|
15
15
|
Provider = "/provider/",
|
|
16
16
|
BrowserPopupMenuSharePage = "/browser/popup-menu/share-page/",
|
|
17
|
-
|
|
17
|
+
BrowserPopupMenuSaveModal = "/browser/popup-menu/save-modal/",
|
|
18
18
|
BrowserPopupMenuLayouts = "/browser/popup-menu/layouts/layouts/",
|
|
19
19
|
BrowserPopupMenuColorLinking = "/browser/popup-menu/color-linking/color-linking/",
|
|
20
20
|
BrowserIndicator = "/browser/indicator/",
|
|
@@ -41,7 +41,7 @@ declare const _default: {
|
|
|
41
41
|
BrowserPopupMenu: PageRoute.BrowserPopupMenu;
|
|
42
42
|
Provider: PageRoute.Provider;
|
|
43
43
|
BrowserPopupMenuSharePage: PageRoute.BrowserPopupMenuSharePage;
|
|
44
|
-
|
|
44
|
+
BrowserPopupMenuSaveModal: PageRoute.BrowserPopupMenuSaveModal;
|
|
45
45
|
BrowserPopupMenuLayouts: PageRoute.BrowserPopupMenuLayouts;
|
|
46
46
|
BrowserPopupMenuColorLinking: PageRoute.BrowserPopupMenuColorLinking;
|
|
47
47
|
BrowserIndicator: PageRoute.BrowserIndicator;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { AssetRoute, PageRoute } from '../route';
|
|
2
|
+
/**
|
|
3
|
+
* Multiple different Next projects can be merged together into one using zones.
|
|
4
|
+
* This is the path prefix to a single one of those deployed projects.
|
|
5
|
+
* More information can be found here:
|
|
6
|
+
* https://nextjs.org/docs/advanced-features/multi-zones
|
|
7
|
+
*/
|
|
8
|
+
export declare enum Zone {
|
|
9
|
+
Home = "/home",
|
|
10
|
+
Browser = "/browser",
|
|
11
|
+
Provider = "/provider",
|
|
12
|
+
Storefront = "/storefront"
|
|
13
|
+
}
|
|
14
|
+
export declare function getRouterZone(): "" | Zone;
|
|
15
|
+
/**
|
|
16
|
+
* Gets the router's base path with the zone stripped out.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getBasePathWithoutZone(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Get the router path to assets like images, json, svg, etc.
|
|
21
|
+
* @returns the path to the
|
|
22
|
+
*/
|
|
23
|
+
export declare function getAssetPath(route: AssetRoute | string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the route without the zone prefix.
|
|
26
|
+
* @param route the route to remove the zone prefix from.
|
|
27
|
+
* @returns the route without the zone.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getRouteWithoutZone(route: PageRoute | string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Get the absolute path to the route.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getAbsoluteRoutePath(route: PageRoute | string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Get the base path of the router.
|
|
36
|
+
* The base path of the router contains the router's zone as a postfix.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getBasePath(): string;
|
|
39
|
+
export declare function resolveAbsolutePath(path: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the path to the route with the router's base path.
|
|
42
|
+
* @param route the route.
|
|
43
|
+
* @returns the route with the router's base path.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getRoutePath(route: PageRoute): string;
|
|
46
|
+
/**
|
|
47
|
+
* Concatenates a specified origin URL with a specified path.
|
|
48
|
+
* @returns the origin concatenated with the specified path.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getOriginWithPath(origin: string, path: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Read query parameters of current window location.
|
|
53
|
+
* @returns the query parameters.
|
|
54
|
+
*/
|
|
55
|
+
export declare function getQuery(): URLSearchParams;
|
|
56
|
+
export declare function getPathnameWithBasePath(pathname: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Get the current route.
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
export declare function getCurrentRoute(): PageRoute;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { NextRouter, withRouter as nextWithRouter } from 'next/router';
|
|
2
|
+
import { PageRoute } from '../route';
|
|
3
|
+
/**
|
|
4
|
+
* All router events.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum RouterEvent {
|
|
7
|
+
RouteChangeComplete = "routeChangeComplete"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* React hook for components that want to use router.
|
|
11
|
+
* Underlying component will be rerendered when the routing of the current page changes.
|
|
12
|
+
*/
|
|
13
|
+
export declare const withRouter: typeof nextWithRouter;
|
|
14
|
+
/**
|
|
15
|
+
* The type of router.
|
|
16
|
+
*/
|
|
17
|
+
export declare type Router = NextRouter;
|
|
18
|
+
/**
|
|
19
|
+
* Prefetch a route.
|
|
20
|
+
* @param route the route to prefetch.
|
|
21
|
+
*/
|
|
22
|
+
export declare function prefetch(route: PageRoute): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Navigate to another route.
|
|
25
|
+
* @param route the route to navigate to.
|
|
26
|
+
*/
|
|
27
|
+
export declare function navigate(route: PageRoute | string): Promise<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Listen for a router event.
|
|
30
|
+
* @param event the event to listen for.
|
|
31
|
+
* @param listener the listener to call when the event occurs.
|
|
32
|
+
*/
|
|
33
|
+
export declare function addRouterListener(event: RouterEvent, listener: (...args: any[]) => any): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Stop listening for a router event.
|
|
36
|
+
* @param event the event to stop listening for.
|
|
37
|
+
* @param listener the listener to remove.
|
|
38
|
+
*/
|
|
39
|
+
export declare function removeRouterListener(event: RouterEvent, listener: (...args: any[]) => any): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Navigate the back a route.
|
|
42
|
+
*/
|
|
43
|
+
export declare function navigateBack(): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface RegisterUsageStatus {
|
|
2
|
+
apiVersion?: string;
|
|
3
|
+
allowed: boolean;
|
|
4
|
+
rejectionCode?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const registerBrowserUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
7
|
+
export declare const registerHomeUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
8
|
+
export declare const registerStorefrontUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
9
|
+
export declare const registerNotificationUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
10
|
+
export declare const registerPlatformUsage: (status: RegisterUsageStatus) => Promise<void>;
|
|
11
|
+
export declare const registerThemingUsage: (status: RegisterUsageStatus) => Promise<void>;
|