@microsoft/sp-webpart-base
Version:
SharePoint Framework support for building web parts
53 lines • 1.99 kB
TypeScript
/**
* Web part context property pane accessor. Provides some most commonly used utilities
* to access the property pane.
*
* @public
*/
export default class PropertyPaneAccessor {
private _open;
private _close;
private _refresh;
private _openDetails;
private _isRenderedByWebPart;
private _isPropertyPaneOpen;
private _isContentPanelOpen?;
constructor(openProperytPane: () => void, closePropertyPane: () => void, refresh: () => void, openDetails: (context?: any) => void, isRenderedByWebPart: () => boolean, isPropertyPaneOpen: () => boolean, isContentPanelOpen?: () => boolean);
/**
* Api to open the PropertyPane/Content Panel.
*/
open(): void;
/**
* Api to close the PropertyPane/Content Panel.
*/
close(): void;
/**
* Api to refresh the contents of the PropertyPane or Content Panel.
* It's a no operation scenario if a web part is asking to refresh the property pane or content panel
* while some other web part is being configured.
*/
refresh(): void;
/**
* Api to open the Details PropertyPane/Content Panel
*
* @param context - pass additional details as context to send back to the caller
*/
openDetails(context?: any): void;
/**
* Returns true if the current property pane or content panel source is a web part and not the Canvas or any other source.
*/
isRenderedByWebPart(): boolean;
/**
* Returns true if the PropertyPane is open.
* Also true if Property Pane is rendered by Content Panel.
*
* @param instanceId - optional param to check isopen based on the supported consumer (content panel or property pane).
*/
isPropertyPaneOpen(instanceId?: string): boolean;
/**
* Returns true if the Content Panel is open, regardless if the Content Panel is rendering the property pane.
* @beta
*/
isContentPanelOpen(): boolean;
}
//# sourceMappingURL=PropertyPaneAccessor.d.ts.map