UNPKG

@microsoft/sp-webpart-base

Version:

SharePoint Framework support for building web parts

61 lines 2.49 kB
/** * Web part context property pane accessor interface. Provides some most commonly used operations * to access the property pane and content panel. * * @public */ export interface IPropertyPaneAccessor { /** * This API should be used to open the PropertyPane or Content Panel to help configure the web part. */ open(): void; /** * This API should be used to close the PropertyPane or Content Panel to help configure the web part. */ close(): void; /** * This API should be used to open the Details PropertyPane/Content Panel to help configure the items in the web part. * @remarks * This API is mainly used for configuring Details, which is different from configuring the web part itself. * * @param context - Add additional context for property pane or content panel */ openDetails(context?: any): void; /** * This API should be used to invoke the PropertyPane or Content Panel to help configure the web part. * * @remarks * This operation only works when the PropertyPane is already open for the currently active web part. * If the PropertyPane is opened for another web part, calling the refresh API will have no impact. */ refresh(): void; /** * Indicates whether the PropertyPane/Content Panel was initially opened by the web part. * @remarks * For example, if the web part calls this.context.propertyPane.open() then the property would be true, * whereas if the configuration was opened by the host, then the value will be false. */ isRenderedByWebPart(): boolean; /** * Returns true if the PropertyPane is open. * @remarks * This is true whenever the Property Pane is open whether it is hosted in the Content Panel * or traditional Property Pane UI. * */ isPropertyPaneOpen(): boolean; /** * Returns true if the Content Panel is open and the specified instanceId is supported in the content panel. OR * Returns true if the Property panel is open and the specified instanceId is supported in the properties pane. * @beta */ isPropertyPaneOpen(instanceId?: string): boolean; /** * Returns true if the ContentPanel is open. * @remarks * Returns true if the Content Panel is open, regardless if the Content Panel is rendering the property pane. * @beta */ isContentPanelOpen(): boolean; } //# sourceMappingURL=IPropertyPaneAccessor.d.ts.map