UNPKG

@microsoft/sp-webpart-base

Version:

SharePoint Framework support for building web parts

50 lines 1.76 kB
import type * as teamsJs from '@microsoft/teams-js-v2'; import type IBaseWebPartContextParameters from './IBaseWebPartContextParameters'; import type IClientSideWebPartStatusRenderer from './IClientSideWebPartStatusRenderer'; import type { _IComponentPosition } from '@microsoft/sp-component-base'; import type { ISDKs } from './ISDKs'; import type { PageHostLayoutType } from './IWebPartManagerContext'; /** * Constructor parameters for WebPartContext * * @internal */ interface IWebPartContextParameters extends IBaseWebPartContextParameters { /** * Reference to the DOM element that hosts this client-side component. */ readonly domElement: HTMLElement; /** * Web part status renderer. */ readonly statusRenderer: IClientSideWebPartStatusRenderer; /** * Microsoft Teams SDK. Only provided when the web part is loaded in Teams. * * @deprecated - This property has been deprecated. */ readonly microsoftTeams?: typeof teamsJs; /** * {@inheritdoc ISDKs} */ readonly sdks: ISDKs; /** * SDKs exposed by a webpart host * This moves the sdk consumption to on-demand and makes the app more performant */ readonly sdksAsync: Promise<ISDKs>; /** * Delegate function that returns cache key of webpart */ readonly widthCacheKey?: string | undefined; /** * Type of layout on which the web part is being rendered. */ readonly pageLayoutType?: PageHostLayoutType | string; /** * Gets the position information of the web part on the page. */ readonly getPositionOnPage?: () => _IComponentPosition | undefined; } export default IWebPartContextParameters; //# sourceMappingURL=IWebPartContextParameters.d.ts.map