Options
All
  • Public
  • Public/Protected
  • All
Menu

@openfin/workspace-platform-5.0

Index

Type aliases

AttachedPage

AttachedPage: Page & AttachedPageMetadata

BrowserOverrideCallback

BrowserOverrideCallback: OpenFin.OverrideCallback<WorkspacePlatformProvider>

Extend or replace default functionality in order to customize behavior of a Workspace Platform Provider.

To implement your own handlers for Workspace Platform behavior, extend the provided class and override any methods you'd like to alter.

import * as WorkspacePlatform from '@openfin/workspace-platform-5.0';
import { UpdateSavedPageRequest } from '@client-platform/shapes';

const overrideCallback: WorkspacePlatform.BrowserOverrideCallback = async (
WorkspacePlatformProvider
) => {
class Override extends WorkspacePlatformProvider {
updateSavedPage = async (req: UpdateSavedPageRequest): Promise<void> => {
console.log(`saving page ${req.page.pageId}`);
// calling custom function to the save page here
};
}
return new Override();
};

await WorkspacePlatform.init({
browser: { overrideCallback },
});

BrowserSnapshotWindow

BrowserSnapshotWindow: OpenFin.WindowCreationOptions & BrowserCreateWindowRequest

A window that is part of a browser snapshot.

PageLayout

PageLayout: LayoutExtended & { layoutDetails?: PageLayoutDetails }

PageWithUpdatableRuntimeAttribs

PageWithUpdatableRuntimeAttribs: Page & Pick<AttachedPage, "hasUnsavedChanges">

Functions

Const getCurrentSync

Const init

  • Initilaize a Workspace Platform.

    import * as WorkspacePlatform from '@openfin/workspace-platform-5.0';

    const customThemes: WorkspacePlatform.CustomThemes = [{
    label: "OpenFin's Custom Theme",
    palette: {
    brandPrimary: '#F51F63, // required
    brandSecondary: '#1FF58A', // required
    backgroundPrimary: '#F8E71C', // required - hex, rgb/rgba, hsl/hsla only - no string colors: 'red'
    background2: '#7D808A' // any of the optional colors
    }
    }

    const overrideCallback: WorkspacePlatform.BrowserOverrideCallback = async (
    WorkspacePlatformProvider
    ) => {
    class Override extends WorkspacePlatformProvider {
    async quit(payload, callerIdentity) {
    return super.quit(payload, callerIdentity);
    }
    }
    return new Override();
    };


    await WorkspacePlatform.init({
    browser: { overrideCallback },
    theme: customThemes
    });

    Parameters

    Returns Promise<void>

Const wrapSync

Generated using TypeDoc