Skip to content

store/workspaceLayout#

buildWorkspaceLayout()#

function buildWorkspaceLayout(startPage): IJsonModel;

Build a workspace layout with the given start page as the initial tab.

Parameters#

Parameter Type
startPage string

Returns#

IJsonModel


clearPersistedWorkspaceLayout()#

function clearPersistedWorkspaceLayout(): void;

Drop the persisted layout so the next restore falls back to the default.

Returns#

void


defaultWorkspaceLayout()#

function defaultWorkspaceLayout(): IJsonModel;

The default layout for this user, honouring their configured start page.

Returns#

IJsonModel


getPageDisplayName()#

function getPageDisplayName(label): string;

Get display name for a page label

Parameters#

Parameter Type
label string

Returns#

string


isSingletonPage()#

function isSingletonPage(pageLabel): boolean;

Check if a page type is singleton (only one tab allowed)

Parameters#

Parameter Type
pageLabel string

Returns#

boolean


isValidLayoutModel()#

function isValidLayoutModel(model): model is IJsonModel;

Structural sanity check on a restored layout.

Returns false for a layout that cannot be shown, such as one with no tabset or tab, or with an invalid weight.

Parameters#

Parameter Type
model unknown

Returns#

model is IJsonModel


parseStoredWorkspaceLayout()#

function parseStoredWorkspaceLayout(raw): any;

Read the persisted layout, or null when there is nothing usable to restore.

Rejections are logged.

Parameters#

Parameter Type
raw string | null | undefined

Returns#

any


serializeWorkspaceLayout()#

function serializeWorkspaceLayout(model): string;

Serialize a model for settings.workspaceLayout, stamped with the current schema version.

Parameters#

Parameter Type
model IJsonModel

Returns#

string


withoutRetiredPanelTabs()#

function withoutRetiredPanelTabs(model): IJsonModel;

Drops dock tabs of plot actions that no longer have a panel, keeping each tabset's selection valid.

Parameters#

Parameter Type
model IJsonModel

Returns#

IJsonModel


DEFAULT_WORKSPACE_LAYOUT#

const DEFAULT_WORKSPACE_LAYOUT: IJsonModel;

Default workspace layout — single tabset with Home tab


PAGE_DISPLAY_NAMES#

const PAGE_DISPLAY_NAMES: Record<string, string>;

Page labels to human-readable names (used as tab titles before i18n)


resetWorkspaceLayout#

const resetWorkspaceLayout: any;

selectWorkspaceLayout#

const selectWorkspaceLayout: (state) => IJsonModel;

Selector to get the workspace layout model

Parameters#

Parameter Type
state { workspaceLayout: WorkspaceLayoutState; }
state.workspaceLayout WorkspaceLayoutState

Returns#

IJsonModel


setWorkspaceLayout#

const setWorkspaceLayout: any;

SINGLETON_PAGES#

const SINGLETON_PAGES: Set<string>;

Pages that can only exist once in the workspace. Multi-instance pages (not in this set) can be opened in multiple tabs.


WORKSPACE_LAYOUT_VERSION#

const WORKSPACE_LAYOUT_VERSION: 1 = 1;

workspaceLayout#

const workspaceLayout: any;

WorkspaceLayoutState#

Properties#

model#

model: IJsonModel;

Serialized FlexLayout JSON model