@omnia/fx-models
Version:
Provide Omnia Fx Models Stuffs.
23 lines (22 loc) • 838 B
TypeScript
import { ApiPath } from "../Extends";
import { SidePanelPosition } from "..";
export interface ISidePanelContext {
readonly leftPositionDisabled: boolean;
readonly rightPositionDisabled: boolean;
}
export interface ISidePanelElementRegistration {
withContext: (context: ISidePanelContext) => IScopedContextSidePanelElementRegistration;
}
export interface IScopedContextSidePanelElementRegistration {
openPanel: (element: HTMLElement, position?: SidePanelPosition) => number;
closePanel: (instanceId: number) => void;
togglePanel: (instanceId: number, element: HTMLElement, position?: SidePanelPosition) => number;
}
declare module "./UxApi" {
interface IOmniaUxApi {
sidePanel: Promise<ISidePanelElementRegistration>;
}
interface IOmniaUxExtendApiManifest {
sidePanel: ApiPath;
}
}