import type { IClientSideComponentManifest, ILocalizedString } from './IClientSideComponentManifest'; /** * The client-side SharePoint framework identifies a Web Part by its manifest. All Web Parts are expected to have a * manifest. * * @remarks * * The manifest is a schematized JSON blob that is used in multiple parts of the SharePoint infrastructure * to identify, load and process a Web Part. The schema for this manifest is completely owned and versioned by * Microsoft. There are some required properties in the manifest and some optional properties. Optional properties * need to be provided only if the Web Part needs the specific functionality. An invalid manifest could lead to issues * with Web Part loading and functionality problems. * * @public */ export interface IClientSideWebPartManifest extends IClientSideComponentManifest { /** * Indicates whether the web part uses the property pane to update the configuration * of the web part. * * @remarks * Default value is `true` if the property is not explicitly defined. */ canUpdateConfiguration?: boolean; /** * If true, this web part is disabled on SharePoint classic pages * * @remarks * * Certain web parts may not be required on or apply to SharePoint classic pages. This flag helps control * that. If this flag is true, the web part will not appear in the classic page web part gallery. */ disabledOnClassicSharepoint?: boolean; /** * An untyped property bag for experimental flags not ready for production. * * @alpha */ experimentalData?: { [key: string]: any; }; /** * If true, this web part should not be displayed in the modern SharePoint toolbox. * * @remarks * Usage: Use this flag if it is not appropriate to display a web part in the modern toolbox. This property * is not used in Classic SharePoint. By default, all web parts are enabled to be displayed in the toolbox. * Such web parts can be provisioned on pages though API or be added to the page in a pre configured way. */ hiddenFromToolbox?: boolean; /** * Definition: If true, this web part supports and has been tested for full bleed experience. * * @remarks * Usage: Use this flag if a web part supports full bleed experience and has been tested as such. In this context, * full bleed is a term used to denote that the web part takes the whole width of the containing page. Full bleed * experiences require special treatment and testing. By default no web parts support full bleed experiences. */ supportsFullBleed?: boolean; /** * The set of capabilities this web part requires from the host page in order to be usable. * If the host does not support one of the required capabilities, the web part will not be visible in the toolbox. * * @remarks * Example `{ "BingMapKey": true, "AuthModel": ["OpenIDConnect"] }` * * @privateRemarks * * This API is currently not available to third parties. This feature is still in experimental stages. * Only when the final design is ready, will we consider opening it to third parties. * * @alpha */ requiredCapabilities?: ICapabilityCollection; /** * Describes the level of isolation needed for the web part. * * @remarks * - Defaults to `'None'`, meaning no isolation needed. * - `'DOMIsolation'` will render the web part in a self contained environment, isolated from the main page's * DOM but in the same domain as the main page. * - `'DomainIsolation'` will render the web part in a special app domain separate from the main page. * * @internal */ isolationLevel?: 'None' | 'DOMIsolation' | 'DomainIsolation'; /** * Definition: If true, this web part supports and has been tested for theme variants experience. * * @remarks * Usage: Use this flag if a web part supports theme variants and has been tested as such. * In order to support theme variants, web parts must have the capability to render correctly in the context * of a theme variant. A web part may or may not need to be updated to support theme variants, but should * always be tested before enabling this flag. By default no web parts support theme variants. * */ supportsThemeVariants?: boolean; /** * Definition: * - If true, the web part will be disposed and reloaded when the web part data is updated by an external source. * - If false, the web part data will be deserialized and the properties of the web part will be updated, * onAfterPropertiesUpdatedExternally will be executed. * - If undefined, web parts developed with SPFx version below 1.9 will default to true and web parts developed with * a SPFx version 1.9 or greater will default to false. * * @alpha * @remarks * By default, onAfterPropertiesUpdatedExternally will re-render the web part. If your web part requires specialized * logic, then it is recommended to override onAfterPropertiesUpdatedExternally. */ useFallbackWhenPropertiesUpdatedExternally?: boolean; /** * A list of components that can be loaded on idle for performance optimization. These components generally used to support * rendering the web part. * * @internal * * @privateRemarks * Note: All top level JavaScript logic for the loaded component will be run upon loading the component. * If the component exports a default function, it will be called. * * example: * ``` * idleLoadComponents: [{ * displayMode: 'edit' | 'read' | 'all', * priority: 'high' | 'low', * componentId: 'abc5-...', * }]; * ``` */ idleLoadComponents?: _IIdleLoadComponent[]; /** * A Web Part can have pre-configured properties like the title, description, toolbox group name and Web * Part specific custom properties. And there can be multiple instances of these pre-configured properties. * * @remarks * This helps support scenarios where an organization may want to present multiple pre-configured entries * for a Web Part in the Toolbox. Each entry is expected to configure the Web Part with a different set * of pre-configured properties. A developer may decide to seed some initial values for these properties * but an organization admin can go ahead and customize these properties per the needs of his/her organization. * The properties can also be modified by the author of the page. * * Usage: help display a Web Part in the Toolbox, PropertyPane and the initial rendering of the Web Part. * * Type: JSON object * * Supported values: Array of `IClientSideWebPartManifestEntry` objects. * * Example: * ``` * [{ * title:"Image Web Part", * description: "This Web Part displays an image", * group: "Media", * iconFontName: "image", * properties: { * imageSource: "https://contoso.akamaihd.net/files/mountRainier.jpg", * captionText: "Mount Rainier" * } * }] * ``` */ preconfiguredEntries: IClientSideWebPartManifestEntry[]; /** * Definition: An array defining what host types are supported * * @remarks * Usage: Use this array to define all hosts that are supported. The default * value is SharePointWebPart if nothing is provided. If SharePointFullPage is * added the solution will be available when adding full page apps. If * SharePointWebPart is added the solution will be available when adding webparts * to a page. If TeamsTab, TeamsPersonalApp, or TeamsMeetingApp is added the solution will be * available when using teams. TeamsMeetingApp cannot be used with TeamsTab or TeamsPersonalTab. * */ supportedHosts?: Array<'SharePointFullPage' | 'SharePointWebPart' | 'TeamsTab' | 'TeamsPersonalApp' | 'TeamsMeetingApp'>; /** * Definition: Url of the image image used for preview * * @remarks * Usage: Use this string to specify that a preview image should be used instead * of a preview rendering of the web part. This can either be a absolute url * or a relative URL which will be resolved based on the internal base module * url */ imagePreviewUrl?: string; /** * @internal */ propertiesMetadata?: { current: any; }; /** * Optional JSON schema definition of the web part's properties. * If provided, the schema will be provide additional validation for the type safety of the web part's persisted format. * * @remarks Current support JSON Schema draft v4+ schemas * * @public */ jsonSchema?: { [key: string]: unknown; }; /** * Definition: If true, notifies that the web part will render an iframe with a page from the same SharePoint tenant (domain). * Example: display a SharePoint Page in an iframe. * * @remarks * Usage: Use this flag if a web part will render an iframe with a page from the same SharePoint tenant (domain) * and will be hosted as a Teams application (supportedHosts contains any of Teams hosts). */ supportsSelfFramingInTeams?: boolean; /** * Definition: Defines the default sizing of webpart in flexible sections, as well as if it supports dynamic resizing. * Example: * ``` * flexibleLayoutSizing: { * supportsDynamicResizing: false, * defaultColumnWidth: 22, * defaultRowHeight: 21 * } * ``` * @remarks * Ensure this remains up to date with IFlexibleControlSizingData in FlexibleControl.types.ts */ flexibleLayoutSizing?: IFlexibleLayoutSizing; /** * @alpha * Optional AI properties for the web part including the structure of AI properties and the mapping between * AI properties and the web part property bag. * If provided, AI scenarios like LLM agent in SharePoint Pages will be able to interact with the web part. For example, * Creating a web part, modifying existing web part, better understanding of the web part's data structure, etc. */ aiProperties?: IAIProperties; } /** * @internal * Definition: A component that can be loaded in the background to improve performance. */ export interface _IIdleLoadComponent { /** * The display mode in which the component should be loaded. * If not specified, the component will be loaded in all display modes. */ displayMode?: 'edit' | 'read'; /** * The priority of the component to be loaded. * High priority components will be loaded before low priority components. */ priority: 'high' | 'low'; /** * Manifest ID of the component to be loaded. */ componentId: string; } /** * Flexible layout sizing data * @public */ export interface IFlexibleLayoutSizing { /** * If true webpart can resize to any width between minimum and 70 columns * Otherwise webpart is slot resized to 22, 34, 48, or 70 columns */ supportsDynamicResizing?: boolean; /** * Default column width for the webpart, used by drop hint */ defaultColumnWidth?: number; /** * Default row height for the webpart, used by drop hint */ defaultRowHeight?: number; } /** * Manifest that is relevant to a Web Part instance. * * @public */ export interface IClientSideWebPartManifestInstance extends IClientSideComponentManifest { } /** * This interface specifies the set of properties that can be pre-configured by a Web Part developer. Each * pre-configured instance of the Web Part will need a copy of these properties. Organization admins and * content authors can modify these properties on a need basis. * * @public */ export interface IClientSideWebPartManifestEntry { /** * Title of the web part represented as a single a dictionary of locale keys to title values. This * value will be displayed to the user in the toolbox. * * @remarks * This title should be used in the Toolbox and other display areas. The Web Part developer may give * an initial title to the web part. The organization admin and page author will have the ability to * change this title as per need. * * Usage: display the name of the web part in the toolbox, web part gallery and the page. * * Supported values: a dictionary of locale keys to strings. Should always have a `'default'` key. * * Example: `"My Webpart"` * ``` * { * "default": "My WebPart" * "en-us": "My WebPart", * "fr-fr": "Ma WebPart", * "zh": "我的 web 部件" * } * ``` */ title: ILocalizedString; /** * Description of the web part represented as a dictionary of locale keys to description values. This * value will be displayed to the user in the toolbox. This description should be used in the Toolbox tooltip and * other display areas. * * @remarks * The Web Part developer may give an initial description to the web part. The organization * admin and page author will have the ability to change this description as per need. * * Usage: display the description of the web part in the toolbox tooltip, web part gallery and the page. * * Supported values: a dictionary of locale keys to strings. Should always have a `'default'` key. * * Example: `"A tool for displaying neat information."` * * ``` * { * "default": "A tool for displaying neat information.", * "en-us": "A tool for displaying neat information.", * "fr-fr": "Un outil d'affichage des informations soignées.", * "zh": "用於顯示整潔資訊的工具。" * } * ``` */ description: ILocalizedString; /** * The icon for the Web Part, to be displayed in the toolbox, represented as a character name in the * Office 365 icon font file. * * @remarks * The icon font is specified here: {@link https://aka.ms/uifabric-icons} If this field has * a value, the {@link IClientSideWebPartManifestEntry.iconImageUrl} field will be ignored. * * Supported values: Any character name in the Office 365 Icon Font. * * Example: "graph" */ officeFabricIconFontName?: string; /** * The icon for the web part, to be displayed in the toolbox, represented an image URL. The image at the * URL must be exactly 40x28 px (SPPPLAT VSO#218660 to fix the size of the icon image). * * @remarks * If the {@link IClientSideWebPartManifestEntry.officeFabricIconFontName} field does not have a value, * this field must have a value. This value can be an absolute URL (e.g. `"http://example.com/icons/my-icon.png"`) or * a relative file path (e.g. `"./icons/my-icon.png"`). In the latter case, the path will be resolved relative to * the folder containing the input manifest. The icon file will be copied to the deployment folder like an asset, * and the output manifest's iconImageUrl will be replaced with a URL relative to the URL used to load all other * assets (the loaderConfig.internalModuleBaseUrls property). * * Supported values: Any absolute URL. * * Example: `"https://contoso.akamaihd.net/files/myWebpartIcon.png"` */ iconImageUrl?: string; /** * The group id to determine which modern group contains the web part in modern site page. The SharePoint * Framework reserves group ids for predefined groups. The developer can pick one from those groups. If the developer * fills an id not in the predefined groups, it falls back to Other group. * * @remarks * * Supported values: the GUID from PredefinedGroup list * * Example: `"cf066440-0614-43d6-98ae-0b31cf14c7c3"` * * @beta */ groupId: PredefinedGroup | string; /** * The group name in web part picker to contain the web part in the classic page. If no value is provided, * then the web part will be displayed in the Miscellaneous group. * * @remarks * * Example: `{ "default": "Media and Content" }` * * @beta */ group?: ILocalizedString; /** * This field is used to tag a web part with keywords that are different from the web part group name. * Tags can be used for categorization and searching of web parts. For example, in the web part toolbox. * * @remarks * * Example `[{ "default": "image" }, { "default": "media" }, { "default": "picture" }, ...]` * * @beta */ tags?: ILocalizedString[]; /** * Definition: Use this field to specify the data version of the pre-configured data provided to the web part. * Note that data version is different from the version field in the manifest. * * @remarks * The manifest version is used to control the versioning of the web part code, while data version is used * to control the versioning of the serialized data of the web part. Refer to dataVersion field of your * web part for more information. * * Usage: versioning and evolving the serialized data of the web part * * Type: string representing a {@link http://semver.org | semantic version} with only two parts * * Supported values: MAJOR.MINOR * * Example: `"1.0"` */ dataVersion?: string; /** * Every web part is expected to have some custom properties. For example, an image web part might define * properties for the image URL and caption text. A list web part may have the list ID and list title as its * properties, and so on. * * @remarks * * The SharePoint Framework passes these properties to the web parts when they are loaded. The web part developer * fully controls the schema for these properties. The web part developer should follow versioning rules when * updating the properties. * * Usage: rendering of the web part * * Example: `{"imageSource": "https://contoso.akamaihd.net/files/contosoLogo.jpg", "captionText": "Contoso logo"}"` */ properties: TProperties; /** * The icon for the Application pages. * * @remarks * If this field is not defined, then the iconimageurl is used instead as the icon for Full Page apps. * This value can be an absolute URL (e.g. `"http://example.com/icons/my-icon.png"`) or a relative file path * (e.g. `"./icons/my-icon.png"`). In the latter case, the path will be resolved relative to the folder containing * the input manifest. * * Supported values: Any absolute URL. * * Example: `"https://contoso.akamaihd.net/files/myWebpartIcon.png"` */ fullPageAppIconImageUrl?: string; } /** * Predefined web part group. * * @beta */ export declare const enum PredefinedGroup { /** * Text, media and content. * * This group includes web parts that display text, multi-media, documents, information from the web, and other * rich content. * * @beta */ TextMediaAndContent = "cf066440-0614-43d6-98ae-0b31cf14c7c3", /** * Discovery. * * This group includes web parts that organize, group, and filter content to help users discover information. * * @beta */ DocumentsListsAndLibraries = "1edbd9a8-0bfb-4aa2-9afd-14b8c45dd489", /** * Communication and collaboration. * * This group includes web parts that facilitate information sharing, team work, and social interactions. * * @beta */ Feeds = "75e22ed5-fa14-4829-850a-c890608aca2d", /** * Planning and process. * * This group includes web parts that empower team productivity with the use of planning and process tools. * * @beta */ NewsPeopleAndEvents = "1bc7927e-4a5e-4520-b540-71305c79c20a", /** * Business and intelligence. * * This group includes web parts for tracking and analyzing data, and for integrating business flow with pages. * * @beta */ DataAnalysis = "4aca9e90-eff5-4fa1-bac7-728f5f157b66", /** * Regional information * * This group includes web parts that display information based on current region and geographical location * * @beta */ RegionalInformation = "cfc8bda5-cb9b-49e3-8526-2ee6e52b256a", /** * Other. * * This group includes web parts not in other groups. * * @beta */ Advanced = "5c03119e-3074-46fd-976b-c60198311f70", /** * Other. * * This group includes local web parts. * * @beta */ Local = "8b7bf6f1-a56a-4aa3-8657-7eb6e7e6af61" } /** * The capability collection for the web part. It defines which capabilities are required for the web part. * If the host does not support one of the required capabilities, the web part will not be visible in the toolbox. * * @privateRemarks * This API is currently not available to third parties. This feature is still in experimental stages. * Only when the final design is ready, will we consider opening it to third parties. * * @alpha */ export interface ICapabilityCollection { /** * A boolean flag indicates if the web part requires the Bing maps key to be available in the site. * The Bing maps credential key can be used to show the Bing maps control according to a provided coordinate. * * @alpha */ BingMapsKey?: boolean; /** * An array indicates the web part requires any of following authentication models to be available in the site. * The authentication model can be used to connect to Microsoft Graph, O365 connecter, etc. * * @alpha */ AuthenticationModel?: Array<'OpenIDConnect' | 'Federated'>; } /** * @alpha * Defines the AI properties for the web part, including their structure and the mapping to the web part's property bag. * When provided, AI scenarios such as an LLM agent in SharePoint Pages can interact with the web part, * e.g., creating it, modifying it, or understanding its data structure. */ export interface IAIProperties { /** * The structure of AI properties for the web part. */ structure: { /** * A free-form nested object not intended for direct use by web part developers. * It is interpreted internally by the system based on the conversion logic * between web part AI properties and JSON. * The contract for this structure is internal and not exposed to developers. */ [key: string]: unknown; }; /** * The mapping of AI properties to existing property bag. */ mapping: { /** * A free-form nested object not intended for direct use by web part developers. * It is interpreted internally by the system based on the conversion logic * between web part AI properties and JSON. * The contract for this structure is internal and not exposed to developers. */ [key: string]: unknown; }; } //# sourceMappingURL=IClientSideWebPartManifest.d.ts.map