Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp adaptive card extension base.baseadaptivecardextension

John Nguyen edited this page Aug 19, 2021 · 4 revisions

Home > @microsoft/sp-adaptive-card-extension-base > BaseAdaptiveCardExtension

BaseAdaptiveCardExtension class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Base class for Adaptive Card Extensions.

Signature:

export declare class BaseAdaptiveCardExtension<TProperties = {}, TState = Readonly<{}>> extends BaseComponent

Extends: BaseComponent

Remarks

Adaptive Card Extensions must inherit from this class.

Constructors

Constructor Modifiers Description
(constructor)() (BETA) Constructs a new instance of the BaseAdaptiveCardExtension class

Properties

Property Modifiers Type Description
_iconProperty string (BETA)
_title string (BETA)
cardNavigator ViewNavigator<BaseCardView<TProperties, TState>> (BETA) The ViewNavigator for the Card view.
cardSize CardSize (BETA) The current CardSize.
context AdaptiveCardExtensionContext (BETA) See BaseComponent.context.
dataVersion Version (BETA) The value of this property is stored in the serialized data of the Adaptive Card Extension. It can be used to manage versioning of the Adaptive Card Extension.
description string (BETA) The description of the Adaptive Card Extension defined in the manifest.
displayMode DisplayMode (BETA) The current DisplayMode.
iconProperty string (BETA) The icon url used to render an icon on the Card view.
isVisible boolean (BETA) Sets the visibility of the Adaptive Card Extension and re-render
properties TProperties (BETA) The custom, persisted properties of the Adaptive Card Extension.
propertiesMetadata IAdaptiveCardExtensionPropertiesMetadata | undefined (BETA) This property defines metadata for the Adaptive Card Extension property bag. The metadata can help SharePoint understand the content of the properties better and perform relevant services on the data.
quickViewNavigator QuickViewNavigator<BaseAdaptiveCardView<TProperties, TState>> (BETA) QuickViewNavigator is a ViewNavigator for the Quick view.
renderedFromPersistedData boolean (BETA) Indicates whether the Adaptive Card Extension was rendered from persisted data or initialized from a default state.
renderedOnce boolean (BETA) Indicates whether the Adaptive Card Extension has initially rendered.
renderType RenderType (BETA) The current RenderType.
state Readonly<TState> (BETA) Gets the custom state of the Adaptive Card Extension.
title string (BETA) This value is displayed in Card and Quick view unless it is explicitly overridden by the Views. It is also displayed as the Property Pane title.

Methods

Method Modifiers Description
getPropertyPaneConfiguration() (BETA) Get the Property Pane configuration for this Adaptive Card Extension. If an Adaptive Card Extension wants to use the Property Pane, then this method must be overriden.
loadPropertyPaneResources() (BETA) API to enable asynchronous loading of Property Pane related resources of the Adaptive Card Extension.
onAfterDeserialize(deserializedProperties, dataVersion) (BETA) Lifecycle method called before the property bag is populated with the deserialized property object.
onAfterPropertiesUpdatedExternally(prevProperties) (BETA) Lifecycle method called after the Adaptive Card Extension's properties have been updated by a source other than the property pane (except for isolated Adaptive Card Extensions).
onBeforeSerialize() (BETA) Lifecycle method called before serialization.
onDisplayModeChanged(oldDisplayMode) (BETA) Lifecycle method called after the DisplayMode changed.
onDispose() (BETA) Lifecycle method called before disposing the Adaptive Card Extension.
onInit() (BETA) Lifecycle method called during initialization.
onPropertyPaneFieldChanged(propertyPath, oldValue, newValue) (BETA) Lifecycle method called when a Property Pane field is changed.
onRenderTypeChanged(oldRenderType) (BETA) Lifecycle method called when the RenderType changes.
renderCard() (BETA) The id of the initial Card view.
setState(newState) (BETA) Update the state of the Adaptive Card Extension and re-render.
Clone this wiki locally