This repository was archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
sp webpart base
John Nguyen edited this page Aug 19, 2021
·
3 revisions
Home > @microsoft/sp-webpart-base
SharePoint Framework support for building web parts.
This package defines the APIs used by developers to create a custom web part. A web part is a reusable visual object that a page author can add to their content, and customize using a property pane. Examples of web parts include an embedded video player, a map, a group calendar, a chart, etc.
| Class | Description |
|---|---|
| BaseClientSideWebPart | This abstract class implements the the base functionality for a client-side web part. Every client-side web part needs to inherit from this class. |
| BaseWebPart | This abstract class implements the UI-agnostic base functionality for a client-side web part. The purpose is to allow a common core between 2D and MR WebParts. |
| BaseWebPartContext | Web part context object. This object contains the contextual services available to a web part. e.g. a contextual instance to the http client.This base is to be extended by UI-specific WebPart's base. |
| WebPartContext | Web part context object. This object contains the contextual services available to a web part. e.g. a contextual instance to the http client. |
| Enumeration | Description |
|---|---|
| DynamicDataSharedDepth | Enum for the possible values of shared depth of the dynamic data reference. |
| PropertyPaneButtonType | Enum for all the supported button types. |
| PropertyPaneDropdownOptionType | Specifies the type of option in a dropdown menu rendered by PropertyPaneDropdown(). |
| PropertyPaneFieldType | Enum for all the supported PropertyPane field types.Names should be consistent with those in office-ui-fabric-react, be careful to get letter casing correct. |
| Function | Description |
|---|---|
| PropertyPaneButton(targetProperty, properties) | Helper method to create a Button on the PropertyPane. |
| PropertyPaneCheckbox(targetProperty, properties) | Helper method to create a Checkbox on the PropertyPane. |
| PropertyPaneChoiceGroup(targetProperty, properties) | Helper method to create a Choice Group on the PropertyPane. |
| PropertyPaneCustomField(properties) | (BETA) Helper method to create a custom field on the PropertyPane. |
| PropertyPaneDropdown(targetProperty, properties) | Helper method to create a Dropdown on the PropertyPane. |
| PropertyPaneDynamicField(targetProperty, properties) | Helper method to create a Dynamic Data widget on the PropertyPane for a dynamic field. |
| PropertyPaneDynamicFieldSet(properties) | Helper method to create a Dynamic Data widget on the Property Pane for a set of dynamic fields with a common data source.These fields can possibly share the same property based on the associated filters. |
| PropertyPaneDynamicTextField(targetProperty, properties) | (BETA) Helper method to create a Dynamic TextField on the PropertyPane. |
| PropertyPaneHorizontalRule() | Helper method to create a Horizontal Rule on the PropertyPane. |
| PropertyPaneLabel(targetProperty, properties) | Helper method to create a Label on the PropertyPane. |
| PropertyPaneLink(targetProperty, properties) | Helper method to create a Link on the PropertyPane. |
| PropertyPaneSlider(targetProperty, properties) | Helper method to create a Slider on the PropertyPane. |
| PropertyPaneTextField(targetProperty, properties) | Helper method to create a TextField on the PropertyPane. |
| PropertyPaneToggle(targetProperty, properties) | Helper method to create a Toggle on the PropertyPane. |
| Interface | Description |
|---|---|
| IClientSideWebPartStatusRenderer | Interface to be implemented by a component that should display the loading indicator and error messages for a web part. |
| IDynamicDataSharedPropertyConfiguration | Configuration related to a shared property. |
| IDynamicDataSharedPropertyFilters | Property pane dynamic data property filters. |
| IDynamicDataSharedSourceConfiguration | Configuration related to a shared source. |
| IDynamicDataSharedSourceFilters | Property pane dynamic data source filters. |
| IMicrosoftTeams | Provides access to the Teams SDK and Teams context. Only provided when the web part is loaded in Teams. |
| IOffice | (BETA) Provides access to the Office context. Only provided when the web part is loaded in Office. |
| IPropertyPaneAccessor | Web part context property pane accessor interface. Provides some most commonly used operations to access the property pane. |
| IPropertyPaneButtonProps | PropertyPane button props. |
| IPropertyPaneCheckboxProps | PropertyPane CheckBox component props. |
| IPropertyPaneChoiceGroupOption | PropertyPane ChoiceGroup option props. |
| IPropertyPaneChoiceGroupOptionIconProps | PropertyPane ChoiceGroup icon props. |
| IPropertyPaneChoiceGroupProps | PropertyPane ChoiceGroup props. |
| IPropertyPaneConditionalGroup | Property pane conditional group. |
| IPropertyPaneConfiguration | Web part configuration settings |
| IPropertyPaneCustomFieldProps | PropertyPane CustomPropertyField props. |
| IPropertyPaneDropdownCalloutProps | PropertyPane dropdown callout properties. |
| IPropertyPaneDropdownOption | PropertyPane drop down options. |
| IPropertyPaneDropdownProps | PropertyPane drop down component props. |
| IPropertyPaneDynamicFieldFilters | Property pane dynamic field filters which is an intersection of both source and property filters. |
| IPropertyPaneDynamicFieldProps | PropertyPaneDynamicField props. |
| IPropertyPaneDynamicFieldSetProps | PropertyPane DynamicFieldSet props. |
| IPropertyPaneDynamicTextFieldProps |
(BETA) PropertyPaneDynamicData component props. |
| IPropertyPaneField | PropertyPane field. |
| IPropertyPaneGroup | PropertyPane group. Group is part of the PropertyPanePage. |
| IPropertyPaneLabelProps | PropertyPaneLabel component props. |
| IPropertyPaneLinkProps | PropertyPaneLink component props. |
| IPropertyPanePage | PropertyPanePage interface. |
| IPropertyPanePageHeader | PropertyPane header. This header remains same for all the pages. |
| IPropertyPaneSliderProps | PropertyPaneSliderProps component props. |
| IPropertyPaneTextFieldProps | PropertyPaneTextField component props. |
| IPropertyPaneToggleProps | PropertyPaneToggle component props. |
| ISDKs | Conditional set of SDKs provided by SPFx dependent on the environment. |
| ISerializedWebPartData | This structure represents the part of the serialized state of a web part which is controlled by the web part. It is extended by IWebPartData which contains additional data added by the framework to the serialized data. |
| IWebPartContext | The base context interface for client-side web parts. |
| IWebPartData | This structure represents the serialized state of a web part. |
| IWebPartPropertiesMetadata | This structure is used to define metadata for web part properties as a map of string to IWebPartPropertyMetadata
|
| IWebPartPropertyMetadata | This is the structure used for map values in IWebPartPropertiesMetadata
|
| Variable | Description |
|---|---|
| WebPartFormFactor | (BETA) Form factor of the web part. |
| Type Alias | Description |
|---|---|
| WebPartFormFactor | (BETA) The type members represent the form factors of the web part. |