@microsoft/sp-webpart-base
Version:
SharePoint Framework support for building web parts
52 lines • 1.72 kB
TypeScript
import { type ServiceScope } from '@microsoft/sp-core-library';
import type { IWebPartLoadContext } from '../../core/IWebPartManagerContext';
import type IWebPartHost from './IWebPartHost';
/**
* BaseWebPartHost implements the IWebPartHost lifecycle methods as virtual no-op methods.
*
* @internal
*/
export declare abstract class BaseWebPartHost implements IWebPartHost {
readonly serviceScope: ServiceScope;
constructor(serviceScope: ServiceScope);
/**
* @virtual
*/
onBeforeWebPartLoad(options: Readonly<IWebPartLoadContext>): void;
/**
* @virtual
*/
onAfterWebPartLoad(options: Readonly<IWebPartLoadContext>): void;
/**
* @virtual
*/
onAfterWebPartLoadFailed(options: Readonly<IWebPartLoadContext>, error: Error): void;
/**
* @virtual
*/
onBeforeWebPartInitializeOld(options: Readonly<IWebPartLoadContext>): void;
/**
* @virtual
*/
onBeforeWebPartInitialize(options: Readonly<IWebPartLoadContext>): Promise<void>;
/**
* @virtual
*/
onAfterWebPartInitialize(options: Readonly<IWebPartLoadContext>): void;
onAfterWebPartInitializeFailed(options: Readonly<IWebPartLoadContext>, error: Error): void;
/**
* @virtual
*/
onBeforeWebPartRender(options: Readonly<IWebPartLoadContext>): void;
/**
* @virtual
*/
onAfterWebPartRender(options: Readonly<IWebPartLoadContext>): void;
onAfterWebPartRenderFailed(options: Readonly<IWebPartLoadContext>, error: Error): void;
/**
* @virtual
*/
onAudiencesChanged(instanceId: string, audiences: string[]): void;
private _logFailuresForEditCustomerPromise;
}
//# sourceMappingURL=BaseWebPartHost.d.ts.map