@openfin/workspace 6.2.4 → 6.3.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/src/home.d.ts +2 -1
- package/client-api/src/index.d.ts +8 -5
- package/client-api/src/notifications.d.ts +13 -0
- package/client-api/src/shapes/common.d.ts +5 -0
- package/client-api/src/shapes/home.d.ts +415 -0
- package/client-api/src/shapes/index.d.ts +7 -0
- package/client-api/src/shapes/notifications.d.ts +20 -0
- package/client-api/src/shapes/store.d.ts +467 -0
- package/client-api/src/{templates.d.ts → shapes/templates.d.ts} +0 -0
- package/client-api/src/storefront.d.ts +2 -1
- package/client-api-platform/src/api/app-directory.d.ts +7 -0
- package/client-api-platform/src/api/browser/browser-module.d.ts +20 -0
- package/client-api-platform/src/api/browser/index.d.ts +26 -0
- package/client-api-platform/src/api/context-menu/browser-logo-handler.d.ts +3 -0
- package/client-api-platform/src/api/context-menu/browser-pagetab-handler.d.ts +3 -0
- package/client-api-platform/src/api/context-menu/browser-viewtab-handler.d.ts +3 -0
- package/client-api-platform/src/api/context-menu/index.d.ts +13 -0
- package/client-api-platform/src/api/index.d.ts +4 -0
- package/client-api-platform/src/api/pages/helper.d.ts +22 -0
- package/client-api-platform/src/api/pages/index.d.ts +30 -0
- package/client-api-platform/src/api/protocol.d.ts +51 -0
- package/client-api-platform/src/api/storage.d.ts +10 -0
- package/client-api-platform/src/api/theming.d.ts +5 -0
- package/client-api-platform/src/index.d.ts +3 -0
- package/client-api-platform/src/init/browser-window-focus.d.ts +19 -0
- package/client-api-platform/src/init/cleanup.d.ts +1 -0
- package/client-api-platform/src/init/custom-actions.d.ts +3 -0
- package/client-api-platform/src/init/index.d.ts +37 -0
- package/client-api-platform/src/init/override-callback.d.ts +4 -0
- package/client-api-platform/src/init/theming.d.ts +9 -0
- package/client-api-platform/src/init/utils.d.ts +33 -0
- package/client-api-platform/src/shapes.d.ts +1177 -0
- package/common/src/api/browser-protocol.d.ts +23 -0
- package/common/src/api/pages/attached.d.ts +100 -0
- package/common/src/api/pages/idb.d.ts +12 -0
- package/common/src/api/pages/legacy.d.ts +16 -0
- package/common/src/api/theming.d.ts +62 -0
- package/common/src/utils/context-menu.d.ts +12 -0
- package/common/src/utils/debounce.d.ts +16 -0
- package/common/src/utils/defer-show.d.ts +46 -0
- 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/merge-deep.d.ts +6 -0
- package/common/src/utils/page-tab-context-menu.d.ts +2 -0
- package/common/src/utils/route.d.ts +55 -0
- package/common/src/utils/shared-emitter.d.ts +10 -0
- package/common/src/utils/strings.d.ts +3 -0
- package/common/src/utils/theming.d.ts +57 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/client-api/src/logger.d.ts +0 -1
- package/client-api/src/shapes.d.ts +0 -883
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Page } from '../../../common/src/api/pages/shapes';
|
|
2
|
+
import type { CreateSavedPageRequest, UpdateSavedPageRequest } from '../shapes';
|
|
3
|
+
export declare const getStorageApi: (identity: any) => {
|
|
4
|
+
createPage: (req: CreateSavedPageRequest) => Promise<any>;
|
|
5
|
+
deletePage: (id: string) => Promise<any>;
|
|
6
|
+
updatePage: (req: UpdateSavedPageRequest) => Promise<any>;
|
|
7
|
+
getPage: (id: string) => Promise<any>;
|
|
8
|
+
getPages: (query?: string) => Promise<Page[]>;
|
|
9
|
+
savePage: (page: Page) => Promise<any>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="openfin-adapter/fin" />
|
|
2
|
+
/**
|
|
3
|
+
* Get the last focused browser window.
|
|
4
|
+
* @returns the last focused browser window.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getLastFocusedBrowserWindow(): Promise<OpenFin.Identity>;
|
|
7
|
+
/**
|
|
8
|
+
* Set the OpenFin identity of the last focused browser window.
|
|
9
|
+
*/
|
|
10
|
+
export declare function setLastFocusedBrowserWindow(identity?: OpenFin.Identity): void;
|
|
11
|
+
/**
|
|
12
|
+
* Listen for a browser window to be focused.
|
|
13
|
+
* When a browser window is focused, store it in local storage as the last focused browser window.
|
|
14
|
+
*/
|
|
15
|
+
export declare function listenForBrowserWindowFocus(): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Stop listening for a browser window to be focused.
|
|
18
|
+
*/
|
|
19
|
+
export declare function removeBrowserWindowFocusListener(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function registerViewCleanUp(): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { WorkspacePlatformInitConfig } from '../shapes';
|
|
2
|
+
/**
|
|
3
|
+
* Initilaize a Workspace Platform.
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
7
|
+
*
|
|
8
|
+
* const customThemes: WorkspacePlatform.CustomThemes = [{
|
|
9
|
+
* label: "OpenFin's Custom Theme",
|
|
10
|
+
* palette: {
|
|
11
|
+
* // Required color options
|
|
12
|
+
* brandPrimary: '#F51F63',
|
|
13
|
+
* brandSecondary: '#1FF58A',
|
|
14
|
+
* backgroundPrimary: '#F8E71C', // hex, rgb/rgba, hsl/hsla only - no string colors: 'red'
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* const overrideCallback: WorkspacePlatform.BrowserOverrideCallback = async (
|
|
19
|
+
* WorkspacePlatformProvider
|
|
20
|
+
* ) => {
|
|
21
|
+
* class Override extends WorkspacePlatformProvider {
|
|
22
|
+
* async quit(payload, callerIdentity) {
|
|
23
|
+
* return super.quit(payload, callerIdentity);
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* return new Override();
|
|
27
|
+
* };
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
* await WorkspacePlatform.init({
|
|
31
|
+
* browser: { overrideCallback },
|
|
32
|
+
* theme: customThemes
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
* @param options options for configuring the platform.
|
|
36
|
+
*/
|
|
37
|
+
export declare const init: (options: WorkspacePlatformInitConfig) => Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="openfin-adapter/fin" />
|
|
2
|
+
import type { BrowserInitConfig } from '../../../client-api-platform/src/shapes';
|
|
3
|
+
import { WorkspacePlatformProvider } from '..';
|
|
4
|
+
export declare const getOverrideCallback: (initOptions: BrowserInitConfig) => OpenFin.OverrideCallback<WorkspacePlatformProvider>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CustomThemes } from '../shapes';
|
|
2
|
+
export declare const getThemes: () => CustomThemes;
|
|
3
|
+
/**
|
|
4
|
+
* initTheming()
|
|
5
|
+
* Accepts an array of CustomThemes objects and stores it
|
|
6
|
+
* @param customPaletteOptions - optional - array of custom color pallettes
|
|
7
|
+
* @returns array of custom theme objects
|
|
8
|
+
*/
|
|
9
|
+
export default function initTheming(customPalettes: CustomThemes): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="openfin-adapter/fin" />
|
|
2
|
+
import { Identity } from 'openfin-adapter';
|
|
3
|
+
import type { CustomThemeOptions } from '../../../common/src/api/theming';
|
|
4
|
+
import type { BrowserInitConfig } from '..';
|
|
5
|
+
export declare function overrideViewOptions(options: Partial<OpenFin.ViewOptions>, initOptions: OpenFin.ViewOptions): any;
|
|
6
|
+
export declare function preserveInteropIfManifestConflict(opts: Partial<OpenFin.ViewOptions>, fetchManifest: ({ manifestUrl: string }: {
|
|
7
|
+
manifestUrl: any;
|
|
8
|
+
}, callerIdentity: Identity) => any, callerIdentity: Identity): Promise<any>;
|
|
9
|
+
export declare const filterSnapshotWindows: (win: OpenFin.WindowOptions) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* fitToMonitor()
|
|
12
|
+
* Function to determine if window size is too large
|
|
13
|
+
* for available rectangle area.
|
|
14
|
+
*
|
|
15
|
+
* - Checks monitor data for available rectangle coords
|
|
16
|
+
* - Defines max width/height for current monitor
|
|
17
|
+
* - Defines default width/height if property is not set
|
|
18
|
+
* - Updates options object default width/height if they exceed max values
|
|
19
|
+
*
|
|
20
|
+
* Ticket: WRK-1084
|
|
21
|
+
*
|
|
22
|
+
* @param options - Object passed into createWindow -> contains height and width
|
|
23
|
+
* @returns unprocessed or processed options object
|
|
24
|
+
*/
|
|
25
|
+
export declare const fitToMonitor: (options: any) => Promise<any>;
|
|
26
|
+
declare type LegacyWindowOptions = Omit<OpenFin.PlatformWindowCreationOptions, 'workspacePlatform'> & {
|
|
27
|
+
pages?: OpenFin.Page[];
|
|
28
|
+
workstacks?: OpenFin.Page[];
|
|
29
|
+
};
|
|
30
|
+
export declare const initWorkspacePlatformOptions: (options: LegacyWindowOptions | OpenFin.PlatformWindowCreationOptions) => OpenFin.PlatformWindowCreationOptions;
|
|
31
|
+
export declare const applyPageDefaults: (pages: OpenFin.Page[], defaultPageOptions?: BrowserInitConfig['defaultPageOptions']) => OpenFin.Page[];
|
|
32
|
+
export declare const applyBrowserDefaults: (options: OpenFin.PlatformWindowCreationOptions, initOptions: Pick<BrowserInitConfig, 'defaultWindowOptions' | 'defaultPageOptions'>, theme: CustomThemeOptions) => OpenFin.PlatformWindowCreationOptions;
|
|
33
|
+
export {};
|