UNPKG

@microsoft/sp-webpart-base

Version:

SharePoint Framework support for building web parts

35 lines 1.62 kB
import { ServiceScope, SPEvent, type SPEventArgs } from '@microsoft/sp-core-library'; import type { HttpClient, SPHttpClient } from '@microsoft/sp-http'; import type { IClientSideWebPartManifestInstance } from '@microsoft/sp-module-interfaces'; import type { PropertyPaneAction } from '@microsoft/sp-property-pane'; import { type IClientSideWebPartStatusRenderer, type ISDKs, type IPropertyPaneAccessor, type IWebPartHost, WebPartContext, WebPartFormFactor } from '../index'; export declare class MockWebPartContextParameters { domElement: HTMLElement; manifest: IClientSideWebPartManifestInstance<{}>; instanceId: string; webPartTag: string; loggingTag: string; sdks: ISDKs; sdksAsync: Promise<ISDKs>; httpClient: HttpClient; spHttpClient: SPHttpClient; parentServiceScope: ServiceScope; statusRenderer: IClientSideWebPartStatusRenderer; host: IWebPartHost; formFactor: WebPartFormFactor; propertyPane: IPropertyPaneAccessor; _dataUpdatedEvent: SPEvent<SPEventArgs>; isPropertyPaneRenderedByWebPart: () => boolean; isPropertyPaneOpen: () => boolean; isContentPanelOpen: () => boolean; requestPropertyPaneAction: (id: string, propertyPaneAction?: PropertyPaneAction, renderedByWebPart?: boolean) => void; } export default class MockWebPartContext extends WebPartContext { constructor(parameters: MockWebPartContextParameters); /** * Simulates initialization of the web part, equivalent to what the ClientSideWebPartManager * would do. */ initialize<T>(webPart: T): T; } //# sourceMappingURL=MockWebPartContext.d.ts.map