import type { IClientSideComponentManifest, ILocalizedString } from './IClientSideComponentManifest'; import type { PredefinedGroup } from './IClientSideWebPartManifest'; /** * @beta */ export interface IAdaptiveCardExtensionManifest extends IClientSideComponentManifest { /** * Id of the Teams application containing the ACE * * @internal */ connectedTeamsAppId?: string; /** * Specifies if the ACE manifest is pending sync with the Teams application * * @internal */ isPendingTeamsAppSync?: boolean; /** * Id of the SPFx application that the ACE will redirect to when a “full page” experience is required * * @internal */ connectedSPFXAppId?: string; /** * Definition: An array defining what host types are supported * * * @remarks * Usage: Use this array to define all hosts that are supported. * */ supportedHosts?: ReadonlyArray<'Dashboard'>; /** * Definition: If true, this ACE supports and has been tested for theme variants experience. * * @remarks * Usage: Use this flag if a ACE supports theme variants and has been tested as such. * In order to support theme variants, ACEs must have the capability to render correctly in the context * of a theme variant. An ACE may or may not need to be updated to support theme variants, but should * always be tested before enabling this flag. By default no ACEs support theme variants. * */ supportsThemeVariants?: boolean; /** * An untyped property bag for experimental flags not ready for production. * */ experimentalData?: { [key: string]: any; }; /** * If true, this AdaptiveCardExtension should not be displayed in the modern SharePoint toolbox. * * @remarks * Usage: Use this flag if it is not appropriate to display a AdaptiveCardExtension in the modern toolbox. By default, * all AdaptiveCardExtensions are enabled to be displayed in the toolbox if supportedHosts contains 'SharePointWebPart' * Such AdaptiveCardExtensions can be provisioned on pages though API or be added to the page in a pre configured way. */ hiddenFromToolbox?: boolean; /** * Describes the level of isolation needed for the AdaptiveCardExtension. * * @remarks * - Defaults to `'None'`, meaning no isolation needed. * - `'DOMIsolation'` will render the AdaptiveCardExtension 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 AdaptiveCardExtension in a special app domain separate from the main page. * * @internal */ isolationLevel?: 'None' | 'DOMIsolation' | 'DomainIsolation'; /** * The scope of the personalization on how an AdaptiveCardExtension can be personalized by an end user. * * @beta */ personalization?: 'Disallow' | 'Allow'; /** * Definition: * - If true, the AdaptiveCardExtension will be disposed and reloaded when the AdaptiveCardExtension data is updated by an external source. * - If false, the AdaptiveCardExtension data will be deserialized and the properties of the AdaptiveCardExtension will be updated, * onAfterPropertiesUpdatedExternally will be executed. * - If undefined, AdaptiveCardExtensions developed with SPFx version below 1.9 will default to true and AdaptiveCardExtensions developed with * a SPFx version 1.9 or greater will default to false. * * @remarks * By default, onAfterPropertiesUpdatedExternally will re-render the AdaptiveCardExtension. If your AdaptiveCardExtension requires specialized * logic, then it is recommended to override onAfterPropertiesUpdatedExternally. */ useFallbackWhenPropertiesUpdatedExternally?: boolean; /** * A AdaptiveCardExtension can have pre-configured properties like the title, description, iconImageUrl, officeFabricIconFontName, toolbox group name * and AdaptiveCardExtension 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 AdaptiveCardExtension in the Toolbox. Each entry is expected to configure the AdaptiveCardExtension 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 AdaptiveCardExtension in the Toolbox, PropertyPane and the initial rendering of the AdaptiveCardExtension. * * Type: JSON object * * Supported values: Array of `IClientSideWebPartManifestEntry` objects. * * Example: * ``` * [{ * "groupId": "5c03119e-3074-46fd-976b-c60198311f70", * "group": { "default": "Advanced" }, * "title": { "id": "$./ManifestStrings.resx:PrimaryTextL1Template;" }, * "description": { "id": "$./ManifestStrings.resx:PrimaryTextL1TemplateDescription;" }, * "officeFabricIconFontName": "Balloons", * "properties": { * "templateType": "primaryText", * "title": "Primary Text", * "primaryText": "Basic card", * "description": "This is an example.", * "cardSize": "Medium" * } * }] * ``` */ preconfiguredEntries: IAdaptiveCardExtensionManifestEntry[]; } /** * This interface specifies the set of properties that can be pre-configured by a AdaptiveCardExtension developer. Each * pre-configured instance of the AdaptiveCardExtension will need a copy of these properties. Organization admins and * content authors can modify these properties on a need basis. * * @beta */ export interface IAdaptiveCardExtensionManifestEntry { /** * Size of the AdaptiveCardExtension when it is rendered. This is value must be one of the supported CardSizes * ["Medium", "Large"] defined in the sp-adaptive-card-base project. */ cardSize: string; /** * Title of the AdaptiveCardExtension 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 AdaptiveCardExtension developer may give * an initial title to the AdaptiveCardExtension. The organization admin and page author will have the ability to * change this title as per need. * * Usage: display the name of the AdaptiveCardExtension 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 AdaptiveCardExtension 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 AdaptiveCardExtension developer may give an initial description to the AdaptiveCardExtension. The organization * admin and page author will have the ability to change this description as per need. * * Usage: display the description of the AdaptiveCardExtension 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 AdaptiveCardExtension, 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 AdaptiveCardExtension, 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 AdaptiveCardExtension 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; /** * This field is used to tag a AdaptiveCardExtension with keywords that are different from the AdaptiveCardExtension group name. * Tags can be used for categorization and searching of AdaptiveCardExtensions. For example, in the 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 AdaptiveCardExtension. * 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 AdaptiveCardExtension code, while data version is used * to control the versioning of the serialized data of the AdaptiveCardExtension. Refer to dataVersion field of your * AdaptiveCardExtension for more information. * * Usage: versioning and evolving the serialized data of the AdaptiveCardExtension * * Type: string representing a {@link http://semver.org | semantic version} with only two parts * * Supported values: MAJOR.MINOR * * Example: `"1.0"` */ dataVersion?: string; /** * Every AdaptiveCardExtension is expected to have some custom properties. For example, a page AdaptiveCardExtension might define * properties for the page URL and caption text. A list AdaptiveCardExtension may have the list ID and list title as its * properties, and so on. * * @remarks * * The SharePoint Framework passes these properties to the AdaptiveCardExtensions when they are loaded. The AdaptiveCardExtension developer * fully controls the schema for these properties. The AdaptiveCardExtension developer should follow versioning rules when * updating the properties. * * Usage: rendering of the AdaptiveCardExtension * * Example: `{"imageSource": "https://contoso.akamaihd.net/files/contosoLogo.jpg", "captionText": "Contoso logo"}"` */ properties: TProperties; } //# sourceMappingURL=IAdaptiveCardExtensionManifest.d.ts.map