/**
* SharePoint Framework property pane.
*
* @remarks
* Helps create the property pane for the SharePoint components such as web parts, canvas etc.,
*
* @packagedocumentation
*/
///
import type { DynamicDataProvider } from '@microsoft/sp-component-base';
import type { Guid } from '@microsoft/sp-core-library';
import type { IFilePickerData } from '@msinternal/sp-filepicker-interfaces';
import type { IRenderFunction } from '@fluentui/react';
import type { ISelectableOption } from '@fluentui/react';
import type { ISPPagesContentPanelCommand } from '@msinternal/sp-pages-content-panel-context';
import type { IStockReportingData } from '@msinternal/sp-component-utilities';
import * as React_2 from 'react';
import type { ReactElement } from 'react';
import type { ServiceScope } from '@microsoft/sp-core-library';
import type { SPPagesContentPanelCommandId } from '@msinternal/sp-pages-content-panel-context';
/* Excluded from this release type: _ConfigurableOptionsController */
/* Excluded from this release type: _DeferredPropertyPane */
/**
* Enum for the possible values of shared depth of the dynamic data reference.
*
* @public
*/
export declare enum DynamicDataSharedDepth {
/**
* Indicates that nothing is shared.
*/
None = 0,
/**
* Indicates that the dynamic data source is shared.
*/
Source = 1,
/**
* Indicates that both the dynamic data source and the property are shared.
*/
Property = 2
}
/* Excluded from this release type: _getPropertyPaneHeadingLevelDropdownProperties */
/* Excluded from this release type: _IAudiencePickerPosition */
/* Excluded from this release type: _IConfigurableOptionsController */
/* Excluded from this release type: _IConfigurationToolsLoaderData */
/* Excluded from this release type: _IConfiguredDynamicTextFieldProps */
/* Excluded from this release type: _IDynamicConfiguration */
/**
* Configuration related to a shared property.
*
* @public
*/
export declare interface IDynamicDataSharedPropertyConfiguration {
/**
* Filters for the shared property.
*/
filters?: IDynamicDataSharedPropertyFilters;
}
/**
* Property pane dynamic data property filters.
*
* @public
*/
export declare interface IDynamicDataSharedPropertyFilters {
/**
* Property Id
*
* Usage: Use this filter when the author can only to connect to a specific
* property from the selected source.
*
* @remarks
* This is to filter which specific property is to be pre-selected in the
* properties dropdown(second level) on the dynamic data widget.
*
* When provided, the dynamic data properties dropdown is pre-selected to show
* the specific property, if avaialble. Otherwise the dropdown will fall back
* to show all the exposed properties from the source. If a property is
* pre-selected, the control will be disabled to ensure that authors can not
* change it.
*/
propertyId?: string;
}
/**
* Configuration related to a shared source.
*
* @public
*/
export declare interface IDynamicDataSharedSourceConfiguration {
/**
* User-friendly, localized label for the sources dropdown.
*
* default value - 'Connect to source'
*/
sourcesLabel?: string;
/**
* Filters for the shared source.
*/
filters?: IDynamicDataSharedSourceFilters;
}
/**
* Property pane dynamic data source filters.
*
* @public
*/
export declare interface IDynamicDataSharedSourceFilters {
/**
* Component Id.
*
* Usage: Use this filter when the author should only be able to connect to a
* specific type of source.
*
* @remarks
* This is to filter what type of source needs to be shown in the data sources
* dropdown (first level) on the dynamic data widget.
*
* When provided, the dynamic data sources dropdown in the dynamic data widget
* is filtered to only show the sources matching the given component id.
*
* Example - If the document library web part component id is supplied, then
* the dynamic data sources dropdown only shows document library web parts on
* the page which are registered dynamic sources.
*/
componentId?: Guid;
/**
* Source Id
*
* Usage: Use this filter, when the author can only to connect to a specific
* data source.
*
* @remarks
* This is to filter which specific source is to be pre-selected in the data
* sources dropdown (first level) on the dynamic data widget.
*
* When provided, the dynamic data sources dropdown is pre-selected to show the
* source with the provided id, if available. Otherwise the dropdown will
* fall back to show all the existing data sources on the page. If a source
* is pre-selected, the control will be disabled to ensure that authors can not
* change it.
*
* The source id for a web part will be of the form
* WebPart..
*/
sourceId?: string;
}
/* Excluded from this release type: IFilePickerData */
/* Excluded from this release type: IGuidSet */
/* Excluded from this release type: _ILanguageOption */
/* Excluded from this release type: _ILifeCycleEventCallback */
/* Excluded from this release type: ImageFit */
/* Excluded from this release type: _IMenuItemProps */
/**
* Popup window props.
*
* @public
*/
export declare interface IPopupWindowProps {
/**
* Title of pop up window.
*/
title: string;
/**
* Width of pop up window.
*/
width: number;
/**
* Height of pop up window.
*/
height: number;
/**
* The position of pop up window.
*/
positionWindowPosition: PopupWindowPosition;
}
/* Excluded from this release type: _IPropertyPaneAlternativeTextProps */
/**
* PropertyPane button props.
*
* @public
*/
export declare interface IPropertyPaneButtonProps {
/**
* Display text of the element.
*/
text: string;
/**
* The type of button to render.
* Default value is ButtonType.normal.
*/
buttonType?: PropertyPaneButtonType;
/**
* The button icon shown in command or hero type.
*/
icon?: string;
/**
* Description of the action this button takes.
* Only used for compound buttons.
*/
description?: string;
/**
* Whether the button is disabled.
*/
disabled?: boolean;
/**
* The aria label of the button for the benefit of screen readers.
*/
ariaLabel?: string;
/**
* Detailed description of the button for the benefit of screen readers.
*
* Besides the compound button, other button types will need more information provided to screen reader.
*/
ariaDescription?: string;
/**
* A callback which is invoked on the button click, which takes in the existing value for the bound property
* and returns the new value and which is then used to update the properties bag. This update will result in
* the re-render of the PropertyPane with the new props.
*
* @param value - Value associated with element's target property in the properties bag.
* @returns - New value for the target property, which will eventually be updated in the properties bag.
*
* @privateRemarks
*
* This is the only place where the web part developer's is allowed to pass in the callback
* for an individual element. This is because, button click does not result in any property change, and hence
* cannot fire the 'onChange'' event for a property, and ends up becoming a no-op. To avoid this, giving the
* control back to the web part, so that web part can make act accordingly.
*
* todo: VSO# 233578:PropertyPane Button OnClick event api.
*/
onClick: (value: any) => any;
}
/**
* PropertyPane CheckBox component props.
*
* @public
*/
export declare interface IPropertyPaneCheckboxProps {
/**
* Label to display next to the checkbox.
*/
text?: string;
/**
* Adds an aria-label to the checkbox for accessibility.
*/
ariaLabel?: string;
/**
* Whether the property pane checkbox is checked or not.
*
* @remarks
* The default value is false.
*/
checked?: boolean;
/**
* Whether the property pane checkbox is disabled or not.
*/
disabled?: boolean;
}
/**
* PropertyPane ChoiceGroup option props.
*
* @public
*/
export declare interface IPropertyPaneChoiceGroupOption {
/**
* A required key to uniquely identify the option.
*/
key: string | number;
/**
* The text string for the option.
*/
text: string;
/**
* The Icon component props for choice field.
*/
iconProps?: IPropertyPaneChoiceGroupOptionIconProps;
/**
* The src of image for choice field.
*/
imageSrc?: string;
/**
* The alt text of an image for the choice field.
*/
imageAlt?: string;
/**
* The src of image for choice field which is selected.
*/
selectedImageSrc?: string;
/**
* The width and height of the image in px for choice field.
*/
imageSize?: {
width: number;
height: number;
};
/**
* Whether the property pane choice group option is disabled or not.
*/
disabled?: boolean;
/**
* Whether the property pane choice group option is checked or not.
*
* Default value is false.
*/
checked?: boolean;
/**
* The aria label of the property pane choice group option for the benefit of screen readers.
*/
ariaLabel?: string;
}
/**
* PropertyPane ChoiceGroup icon props.
*
* @public
*/
export declare interface IPropertyPaneChoiceGroupOptionIconProps {
/**
* The name of the icon to use from the Office Fabric icon set.
*/
officeFabricIconFontName?: string | null;
}
/* Excluded from this release type: _IPropertyPaneChoiceGroupOptionInternal */
/**
* PropertyPane ChoiceGroup props.
*
* @public
*/
export declare interface IPropertyPaneChoiceGroupProps {
/**
* The options for the choice group.
*/
options: IPropertyPaneChoiceGroupOption[];
/**
* Descriptive label for the choice group.
*/
label?: string;
}
/* Excluded from this release type: _IPropertyPaneColumns */
/* Excluded from this release type: _IPropertyPaneCommandData */
/**
* Property pane conditional group.
*
* @public
*/
export declare interface IPropertyPaneConditionalGroup {
/**
* Primary group to show
*/
primaryGroup: IPropertyPaneGroup;
/**
* Secondary group to show
*/
secondaryGroup: IPropertyPaneGroup;
/**
* Indicating whether the property pane should show primary group or
* the secondary group.
*/
showSecondaryGroup: boolean;
/**
* Callback when user clicks to show primary group.
*/
onShowPrimaryGroup?: () => void;
/**
* Callback when user clicks to show secondary group.
*/
onShowSecondaryGroup?: () => void;
}
/**
* Web part configuration settings
*
* @public
*/
export declare interface IPropertyPaneConfiguration {
/**
* Page to be displayed on the PropertyPane.
*/
currentPage?: number;
/**
* Indicates whether the loading indicator should be displayed on top of the property pane or not.
*
* @remarks
* This feature is intended to be used when the user is waiting on a promise to resolve.
* If set to true, overlay loading indicator appears after 500ms (web part author can override this behavior by
* using overlayLoadingIndicator property).
*
* The reason why we are not showing it immediately is that our intent is to never show the loading
* indicator. But in real life async requests could take long and it becomes necessary to display a
* loading indicator to the end user.
*/
showLoadingIndicator?: boolean;
/**
* Number of milliseconds to be delayed before the loading indicator is shown on the property pane.
* @remarks
* The default value is 500.
*/
loadingIndicatorDelayTime?: number;
/**
* Total number of pages on the PropertyPane.
*/
pages: IPropertyPanePage[];
/* Excluded from this release type: pagesType */
/* Excluded from this release type: debounceProperties */
/* Excluded from this release type: disableFocusTrap */
/* Excluded from this release type: disableAudiencePicker */
/* Excluded from this release type: audiencePickerPosition */
/* Excluded from this release type: hideTitleBar */
/* Excluded from this release type: customFooter */
/* Excluded from this release type: customHeader */
/* Excluded from this release type: showBackButton */
/* Excluded from this release type: disableVisibilityGroup */
}
/* Excluded from this release type: _IPropertyPaneConfigurationEventCommand */
/* Excluded from this release type: _IPropertyPaneConsumer */
/* Excluded from this release type: _IPropertyPaneControlVisibility */
/* Excluded from this release type: _IPropertyPaneCustomFieldInternalProps */
/**
* PropertyPane CustomPropertyField props.
*
* @public
*/
export declare interface IPropertyPaneCustomFieldProps {
/**
* This API will be called once the custom field is mounted on the host element.
*
* @param domElement - DOM element on which the custom control needs to be mounted.
* @param context - Instance specific context. This context was passed in the constructor.
* @param changeCallback - Callback called when a field changes within the custom field.
* This will allow the property pane to be aware of the change and act accordingly.
* @param targetProperty - associated target property from the properties bag.
* if not provided then a custom value which is unique at the custom field level is assigned,
* which will be in the form of `__CustomField_`.
* @param newValue - new value of the property.
* newValue is ignored if targetProperty is not specified.
* @param isValidEntry - Indicates if the new value is valid or not.
*/
onRender: (domElement: HTMLElement, context?: any, changeCallback?: (targetProperty?: string, newValue?: any, isValidEntry?: boolean) => void) => void;
/**
* An UNIQUE key indicates the identity of this control.
*
* The PropertyPane uses ReactJS to render its components. ReactJS uses keys to identify a component and if it should
* be re-rendered or not. This is a performance feature in ReactJS. Please read the following link to understand how
* to pick the value of the key.
*
* For more information, see the {@link https://facebook.github.io/react/docs/lists-and-keys.html#keys
* | React documentation}.
*/
key: string;
/**
* This API is called when the component is unmounted from the host element.
*
* @param domElement - DOM element on which the custom control is mounted.
* @param context - Instance specific context. This context was passed in the constructor.
*/
onDispose?: (domElement: HTMLElement, context?: any) => void;
/**
* Instance specific context. This context is passed back to the web part in the
* onRender and onDispose APIs. The web part can use this context to manage state
* information.
*/
context?: any;
/* Excluded from this release type: isInternal */
}
/* Excluded from this release type: _IPropertyPaneData */
/* Excluded from this release type: IPropertyPaneDebounceProperty */
/**
* PropertyPane dropdown callout properties.
*
* @public
*/
export declare interface IPropertyPaneDropdownCalloutProps {
/**
* Set max height of callout
* When not set the callout will expand with contents up to the bottom of the screen
*/
calloutMaxHeight?: number;
}
/**
* PropertyPane drop down options.
*
* @public
*/
export declare interface IPropertyPaneDropdownOption {
/**
* A key to uniquely identify this option.
*/
key: string | number;
/**
* Text to render for this option.
*/
text: string;
/**
* Index for this option.
*/
index?: number;
/**
* The type of option. If omitted, the default is PropertyPaneDropdownMenuItemType.Normal
*/
type?: PropertyPaneDropdownOptionType;
}
/**
* PropertyPane drop down component props.
*
* @public
*/
export declare interface IPropertyPaneDropdownProps {
/**
* Descriptive label for the Dropdown.
*/
label: string;
/**
* The key of the initially selected option.
*/
selectedKey?: string | number;
/**
* Collection of options for this Dropdown.
*/
options?: IPropertyPaneDropdownOption[];
/**
* Whether the property pane dropdown option is disabled or not.
*/
disabled?: boolean;
/**
* A description for the dropdown that includes instructions for the benefit of screen reader users.
*/
ariaDescription?: string;
/**
* A label for the dropdown for the benefit of screen reader users.
*/
ariaLabel?: string;
/**
* Defines an element's number or position in the current set of controls.
* Maps to native aria-posinset attribute. It starts from 1.
*/
ariaPositionInSet?: number;
/**
* Defines the number of items in the current set of controls. Maps to native aria-setsize attribute.
*/
ariaSetSize?: number;
/**
* Custom properties for Dropdown's Callout used to render options.
*/
calloutProps?: IPropertyPaneDropdownCalloutProps;
/* Excluded from this release type: errorMessage */
/* Excluded from this release type: dataAutomationId */
/* Excluded from this release type: tooltipProps */
/* Excluded from this release type: onRenderOption */
}
/* Excluded from this release type: _IPropertyPaneDropdownTooltipProps */
/**
* Property pane dynamic field filters which is an intersection of both
* source and property filters.
*
* @public
*/
export declare type IPropertyPaneDynamicFieldFilters = IDynamicDataSharedSourceFilters & IDynamicDataSharedPropertyFilters;
/**
* PropertyPaneDynamicField props.
* @public
*/
export declare interface IPropertyPaneDynamicFieldProps {
/**
* User-friendly, localized label to identify the field.
*/
label: string;
/**
* User-friendly, localized label for the sources dropdown.
*
* default value - 'Connect to source'
*/
sourcesLabel?: string;
/**
* Filters for the property pane dynamic field.
*/
filters?: IPropertyPaneDynamicFieldFilters;
/**
* Indicates to what depth of property values are shown on the
* property pane dynamic data widget.
*
* If not specified, then max of 2 levels of property value will be shown.
*
* @remarks
* It takes following values -
* - 0: Indicates that no property value will be shown i.e., the widget
* will display only source and property for this field.
* - 1: Indicates that a depth of one level of property value will be shown i.e.,
* the widget will display one level after the source and property for this field.
* - 2: Indicates that a depth of two levels of property value will be shown i.e.,
* the widget will display two levels after the source and property for this field.
*/
propertyValueDepth?: number;
}
/**
* PropertyPane DynamicFieldSet props.
*
* @public
*/
export declare interface IPropertyPaneDynamicFieldSetProps {
/**
* User-friendly, localized label to identify the property.
*/
label: string;
/**
* List of property pane dynamic fields to be configured on the Dynamic Data Widget.
*/
fields: IPropertyPaneField[];
/**
* Configuration shared between all the entries of the set.
*/
sharedConfiguration?: {
/**
* Indicates to what depth the dynamic reference is shared between the set of fields
* of the dynamic field set.
*/
depth: DynamicDataSharedDepth;
/**
* Shared source configuration
*/
source?: IDynamicDataSharedSourceConfiguration;
/**
* Shared property configuration
*/
property?: IDynamicDataSharedPropertyConfiguration;
};
}
/* Excluded from this release type: IPropertyPaneDynamicTextFieldProps */
/* Excluded from this release type: _IPropertyPaneEventArgs */
/**
* PropertyPane field.
*
* @public
*/
export declare interface IPropertyPaneField {
/**
* Type of the PropertyPane field.
*/
type: PropertyPaneFieldType;
/**
* Target property from the web part's property bag.
*/
targetProperty: string;
/**
* Whether this control should be focused.
*
* @remarks
* The default value is false.
*/
shouldFocus?: boolean;
/**
* Strongly typed properties object. Specific to each field type.
*
* @remarks
* Example: Checkbox has ICheckboxProps, TextField has ITextField props.
*
* @privateRemarks
* - These props are from the office-ui-fabric-react.
* These props may not be extensive as the fabric-react ones. This is intentional.
* - We are not including any callbacks as part of the props, as this might end up breaking
* the internal flow and cause unwanted problems.
* - Currently discussions are going on whether to include styling elements or not. Based on
* the output of the discussions, changes to the styling related props will take place.
*
* We are including only those which are supported by the web part framework.
*/
properties: TProperties;
}
/* Excluded from this release type: _IPropertyPaneFieldChangeCommand */
/* Excluded from this release type: _IPropertyPaneFieldTooltipProps */
/**
* PropertyPane group. Group is part of the PropertyPanePage.
*
* @public
*/
export declare interface IPropertyPaneGroup {
/**
* Display name for the group.
*
* @remarks
* For performance reasons, it's highly recommended to keep this name unique within the property pane page.
* If left empty, the group header will not render (not recommended for accordions).
*/
groupName?: string;
/**
* Indicates whether group name should be hidden.
*
* @remarks
* The default value is false.
* Use this option to skip the rendering of group name to avoid empty group header being displayed.
* @public
*/
isGroupNameHidden?: boolean;
/**
* Indicates whether the PropertyPane group is collapsed or not.
*
* @remarks
* The default value is false.
*/
isCollapsed?: boolean;
/**
* List of PropertyPane fields.
*/
groupFields: IPropertyPaneField[];
}
/* Excluded from this release type: IPropertyPaneHeadingProps */
/* Excluded from this release type: IPropertyPaneIconPickerProps */
/**
* PropertyPaneLabel component props.
*
* @public
*/
export declare interface IPropertyPaneLabelProps {
/**
* Display text for the label.
*/
text: string;
/**
* Whether the associated form field is required or not.
*
* @remarks
* If true, a red asterisk is displayed to the right of the label.
* Default value is false.
*/
required?: boolean;
}
/* Excluded from this release type: _IPropertyPaneLanguageDropdownInternalProps */
/* Excluded from this release type: _IPropertyPaneLanguageDropdownProps */
/**
* PropertyPaneLink component props.
*
* @public
*/
export declare interface IPropertyPaneLinkProps {
/**
* Display text for the link.
*/
text: string;
/**
* Location to which the link is targeted to.
*/
href: string;
/**
* Adds an aria label to the link for accessibility.
*/
ariaLabel?: string;
/**
* This attribute specifies where to display the linked resource.
*
* @remarks
* Following values can be used:
*
* _self - (default) Load the response in the current page.
*
* _blank - Load the response into a new unnamed tab.
*
* _parent - Load the response in the parent of the current page.
* If no parent exists, then this option behaves same as "_self"
*
* _top - Load the response into the original window.
*/
target?: string;
/**
* The props of pop up window.
*/
popupWindowProps?: IPopupWindowProps;
/**
* Whether the property pane link is disabled or not.
*/
disabled?: boolean;
}
/* Excluded from this release type: _IPropertyPaneMotionToggleProps */
/**
* PropertyPanePage interface.
*
* @public
*/
export declare interface IPropertyPanePage {
/**
* Indicates whether the groups on the PropertyPanePage are displayed as accordion or not.
*/
displayGroupsAsAccordion?: boolean;
/* Excluded from this release type: title */
/**
* PropertyPane page header.
*/
header?: IPropertyPanePageHeader;
/**
* List of groups to be displayed on the PropertyPane page.
*/
groups: (IPropertyPaneGroup | IPropertyPaneConditionalGroup)[];
/* Excluded from this release type: columns */
/* Excluded from this release type: independentColumnScrolling */
}
/**
* PropertyPane header.
* This header remains same for all the pages.
*
* @public
*/
export declare interface IPropertyPanePageHeader {
/**
* Header to display.
*/
description: string;
/**
* Image url for the background image.
*
* @deprecated This property is not used.
*/
image?: string;
}
/* Excluded from this release type: _IPropertyPaneProps */
/**
* PropertyPaneSliderProps component props.
*
* @public
*/
export declare interface IPropertyPaneSliderProps {
/**
* Description label of the Slider.
*/
label?: string;
/**
* The initial value of the Slider. Use this if you intend to pass in a new value as a result of onChange events.
*
* Defaults to min.
*/
value?: number;
/**
* The min value of the Slider.
*/
min: number;
/**
* The max value of the Slider.
*/
max: number;
/**
* The difference between the two adjacent values of the Slider.
* Defaults to 1.
*/
step?: number;
/**
* Whether to show the value on the right of the Slider.
*
* @remarks
* If you want to show the value by yourself, you may want to set this value to false.
*/
showValue?: boolean;
/**
* A description of the Slider for the benefit of screen readers.
*/
ariaLabel?: string;
/**
* Whether or not the Slider is disabled.
*/
disabled?: boolean;
/* Excluded from this release type: valueFormat */
}
/* Excluded from this release type: _IPropertyPaneSortableAccordionActiveItem */
/* Excluded from this release type: _IPropertyPaneSortableAccordionItem */
/* Excluded from this release type: _IPropertyPaneSortableAccordionProps */
/* Excluded from this release type: IPropertyPaneSpinButtonProps */
/**
* PropertyPaneTextField component props.
*
* @public
*/
export declare interface IPropertyPaneTextFieldProps {
/**
* Whether or not the text field is a multiline text field.
*
* @remarks
* The default value is false.
*/
multiline?: boolean;
/**
* Whether or not the text field is read only.
* @remarks
* The default value is false.
*/
readOnly?: boolean;
/**
* Whether or not the multiline text field is resizable.
*
* @remarks
* The default value is true.
*/
resizable?: boolean;
/**
* Whether or not the text field is underlined.
*
* @remarks
* The default value is false.
*/
underlined?: boolean;
/**
* Label for the text field.
*/
label?: string;
/**
* The text field input description.
*/
description?: string;
/**
* Value to be displayed in the text field when the value of the targetProperty
* in the manifest's property bag is empty or contains null value.
*/
value?: string;
/**
* If set, this will be displayed as an error message.
*
* @remarks
* When onGetErrorMessage returns empty string, if this property has a value set then this will
* be displayed as the error message.
*
* So, make sure to set this only if you want to see an error message displayed for the text field.
*/
errorMessage?: string;
/**
* The method is used to get the validation error message and determine whether the input value is valid or not.
*
* @remarks
* When it returns string:
*
* - If valid, it returns empty string.
*
* - If invalid, it returns the error message string and an error message is displayed below the text field.
*
* When it returns `Promise`:
*
* - The resolved value is display as error message.
*
* - The rejected, the value is thrown away.
*
*/
onGetErrorMessage?: (value: string) => string | Promise;
/**
* Text field will start to validate after users stop typing for `deferredValidationTime` milliseconds.
*
* @remarks
* The default value is 200.
*/
deferredValidationTime?: number;
/**
* Aria Label for text field, if any.
*/
ariaLabel?: string;
/**
* placeholder text to be displayed in the text field.
*/
placeholder?: string;
/**
* Whether the property pane text field is enabled or not.
*/
disabled?: boolean;
/**
* Specifies the visible height of a text area(multiline text TextField), in lines.
*
* @remarks
* This prop is used only when the multiline prop is set to true.
*/
rows?: number;
/**
* Maximum number of characters that the PropertyPaneTextField can have.
*
* @remarks
* If the value is set to a negative number, an exception will be thrown.
*/
maxLength?: number;
/**
* Run validation when the PropertyPaneTextField is focused.
*
* @remarks
* The default value is false.
*/
validateOnFocusIn?: boolean;
/**
* Run validation when the PropertyPaneTextField is out of focus or on blur.
*
* @remarks
* The default value is false.
*/
validateOnFocusOut?: boolean;
/**
* Name used to log `PropertyPaneTextField` value changes for engagement tracking.
*
* @remarks
* The messages will be logged with a format such as `.`.
*
* For example, if `{moduleName: 'ImageWebPart', controlName: 'OverlayText'}` is specified,
* the engagement log might contain:
*
* 1. The action type:
*
* `Add`: change from initial/unset state to customized content. (first edit)
*
* `Clear`: reset the content of caption element to initial/unset state.
*
* `Edit`: any edition that changes the content apart from add and clear
*
* 2. The text length after each edit
*
*/
logName?: {
moduleName: string;
controlName: string;
};
/* Excluded from this release type: _tooltipProps */
}
/* Excluded from this release type: IPropertyPaneThumbnailPickerProps */
/**
* PropertyPaneToggle component props.
*
* @public
*/
export declare interface IPropertyPaneToggleProps {
/**
* A key to uniquely identify the field.
*/
key?: string | number;
/**
* A label for the toggle.
*/
label?: string;
/* Excluded from this release type: _label */
/**
* Text to display when toggle is ON.
*/
onText?: string;
/**
* Test display when toggle is OFF.
*/
offText?: string;
/**
* Checked state of the toggle.
* If you are maintaining state yourself, set this property accordingly.
*/
checked?: boolean;
/**
* Disabled state of the toggle.
*/
disabled?: boolean;
/**
* Optional onAriaLabel flag. Text for screen-reader to announce when toggle is ON.
*/
onAriaLabel?: string;
/**
* Optional offAriaLabel flag. Text for screen-reader to announce when toggle is OFF.
*/
offAriaLabel?: string;
/**
* Optional ariaLabel flag. Text for screen-reader to announce regardless of toggle state.
*/
ariaLabel?: string;
/* Excluded from this release type: dataAutomationId */
/**
* Whether the label (not the onText/offText) should be positioned inline with the toggle control.
* Left (right in RTL) side when on/off text provided VS right (left in RTL) side when no on/off text.
* Caution: when not providing on/off text user may get confused in differentiating the on/off states of the toggle.
*/
inlineLabel?: boolean;
/* Excluded from this release type: postOnChangeCallback */
/* Excluded from this release type: tooltipProps */
/* Excluded from this release type: disabledToggleControlTooltipProps */
}
/* Excluded from this release type: _IPropertyPaneToggleTooltipProps */
/* Excluded from this release type: _IPropertyPaneWebPartTitle */
/* Excluded from this release type: _IRefreshPropertyPaneCommand */
/* Excluded from this release type: IThumbnail */
/* Excluded from this release type: IThumbnailFabricReactIcon */
/* Excluded from this release type: IThumbnailIconSizeImage */
/* Excluded from this release type: IThumbnailImage */
/* Excluded from this release type: PagesType */
/**
* The position of pop up window.
*
* @public
*/
export declare enum PopupWindowPosition {
/**
* PopupWindowPosition would be located in center of screen.
*/
center = 0,
/**
* PopupWindowPosition would be located in right top of screen.
*/
rightTop = 1,
/**
* PopupWindowPosition would be located in left top of screen.
*/
leftTop = 2,
/**
* PopupWindowPosition would be located in right bottom of screen.
*/
rightBottom = 3,
/**
* PopupWindowPosition would be located in left bottom of screen.
*/
leftBottom = 4
}
/* Excluded from this release type: _PropertyPaneAction */
/* Excluded from this release type: _PropertyPaneAlternativeText */
/**
* Helper method to create a Button on the PropertyPane.
* @param targetProperty - Target property the Button is associated to.
* @param properties - Strongly typed Button properties.
*
* @public
*/
export declare function PropertyPaneButton(targetProperty: string, properties: IPropertyPaneButtonProps): IPropertyPaneField;
/**
* Enum for all the supported button types.
*
* @public
*/
export declare enum PropertyPaneButtonType {
/**
* Optional completion action.
*
* @remarks
* Typically used at the end of a form or task when paired with the Primary button OR
* as a standalone button to undo an action.
* Examples: "Done" button which closes a container but doesn't make a server call or
* an "Undo" button when a user is uploading a file in OneDrive.
*/
Normal = 0,
/**
* Preferred completion action when paired with a Standard button.
*
* @remarks
* Typically used at the end of a task or form.
* Examples: "Create", "Save", "Send" which makes a server call.
*/
Primary = 1,
/**
* Hero button.
*/
Hero = 2,
/**
* Always used as a set with both Standard and Primary compound buttons.
*
* @remarks
* Typically used in a confirmation dialog.
* Examples: A confirmation dialog when a user discards a form or task with a possible
* significant time investment such as an email or a complex form
*/
Compound = 3,
/**
* Optional actions.
*
* @remarks
* Typically used in a command bar at the top of a view, panel and inside an inline command bar.
* Examples: Command bar at the top of OneDrive, Outlook, SharePoint. Inline command bar on the
* top of SharePoint web parts.
*/
Command = 4,
/**
* Same usage as Command button, when real estate does not allow for icons + labels or as secondary
* actions within the command bar.
*
* @remarks
* Typically used in Command bar in small and medium responsive web breakpoints. Also used on objects.
* Examples: OneDrive small and medium responsive web breakpoint Command Bars and view icons within the
* Command Bar. In SharePoint and OneDrive, Cards with social actions and images which allow users to
* access the image picker. In SharePoint, formatting experiences such as formatting a story within the
* Authoring experience. In Calendar, in the bottom of an event creation Callout when clicking inside
* an empty time range.
*/
Icon = 5
}
/**
* Helper method to create a Checkbox on the PropertyPane.
* @param targetProperty - Target property the checkbox is associated to.
* @param properties - Strongly typed Checkbox properties.
*
* @public
*/
export declare function PropertyPaneCheckbox(targetProperty: string, properties: IPropertyPaneCheckboxProps): IPropertyPaneField;
/**
* Helper method to create a Choice Group on the PropertyPane.
* @param targetProperty - Target property the choice group is associated to.
* @param properties - Strongly typed Choice Group properties.
*
* @public
*/
export declare function PropertyPaneChoiceGroup(targetProperty: string, properties: IPropertyPaneChoiceGroupProps): IPropertyPaneField;
/* Excluded from this release type: _PropertyPaneControlVisibility */
/* Excluded from this release type: _PropertyPaneControlVisibilityGroup */
/* Excluded from this release type: PropertyPaneCustomField */
/**
* Helper method to create a Dropdown on the PropertyPane.
* @param targetProperty - Target property the dropdown is associated to.
* @param properties - Strongly typed Dropdown properties.
*
* @public
*/
export declare function PropertyPaneDropdown(targetProperty: string, properties: IPropertyPaneDropdownProps): IPropertyPaneField;
/**
* Specifies the type of option in a dropdown menu rendered by {@link PropertyPaneDropdown}.
*
* @public
*/
export declare enum PropertyPaneDropdownOptionType {
/**
* Render normal menu item.
*/
Normal = 0,
/**
* Render a divider.
*/
Divider = 1,
/**
* Render menu item as a header.
*/
Header = 2
}
/**
* Helper method to create a Dynamic Data widget on the PropertyPane for a dynamic field.
*
* @param targetProperty - Target property the Dynamic Data widget is associated to.
* @public
*/
export declare function PropertyPaneDynamicField(targetProperty: string, properties: IPropertyPaneDynamicFieldProps): IPropertyPaneField;
/**
* 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.
* @param properties - Contains entries and options, described as below:
* entries - A set of entries to be configured by the widget. Each entry includes the target
* property and, optionally, the label to show.
* options - Options enabling customized values for callback, filters etc.,
* for the given set of dynamic fields.
* @public
*/
export declare function PropertyPaneDynamicFieldSet(properties: IPropertyPaneDynamicFieldSetProps): IPropertyPaneField;
/* Excluded from this release type: PropertyPaneDynamicTextField */
/**
* 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.
*
* @public
*/
export declare enum PropertyPaneFieldType {
/**
* Custom field.
*/
Custom = 1,
/**
* Checkbox field.
*/
CheckBox = 2,
/**
* TextField field.
*/
TextField = 3,
/**
* Toggle field.
*/
Toggle = 5,
/**
* Dropdown field.
*/
Dropdown = 6,
/**
* Label field.
*/
Label = 7,
/**
* Slider field.
*/
Slider = 8,
/**
* Heading field.
*/
Heading = 9,
/**
* Choice Group field.
*/
ChoiceGroup = 10,
/**
* Button field.
*/
Button = 11,
/**
* Horizontal Rule field.
*/
HorizontalRule = 12,
/**
* Link field.
*/
Link = 13,
/**
* Dynamic data field.
* @public
*/
DynamicField = 14,
/* Excluded from this release type: DynamicTextField */
/**
* A set of dynamic fields.
* @public
*/
DynamicFieldSet = 16,
/* Excluded from this release type: SpinButton */
/* Excluded from this release type: ThumbnailPicker */
/* Excluded from this release type: IconPicker */
/* Excluded from this release type: AlternativeText */
/* Excluded from this release type: WebPartTitleHeading */
/* Excluded from this release type: SortableAccordion */
}
/* Excluded from this release type: PropertyPaneHeading */
/* Excluded from this release type: PropertyPaneHeadingLevel */
/**
* Helper method to create a Horizontal Rule on the PropertyPane.
*
* @public
*/
export declare function PropertyPaneHorizontalRule(): IPropertyPaneField;
/* Excluded from this release type: PropertyPaneIconPicker */
/**
* Helper method to create a Label on the PropertyPane.
* @param targetProperty - Target property the label is associated to.
* @param properties - Strongly typed Label properties.
*
* @public
*/
export declare function PropertyPaneLabel(targetProperty: string, properties: IPropertyPaneLabelProps): IPropertyPaneField;
/* Excluded from this release type: _PropertyPaneLanguageDropdown */
/* Excluded from this release type: _PropertyPaneLifeCycleEvent */
/**
* Helper method to create a Link on the PropertyPane.
* @param targetProperty - Target property the Link is associated to.
* @param properties - Strongly typed Link properties.
*
* @public
*/
export declare function PropertyPaneLink(targetProperty: string, properties: IPropertyPaneLinkProps): IPropertyPaneField;
/* Excluded from this release type: _PropertyPaneMotionToggle */
/**
* Helper method to create a Slider on the PropertyPane.
* @param targetProperty - Target property the slider is associated to.
* @param properties - Strongly typed Slider properties.
*
* @public
*/
export declare function PropertyPaneSlider(targetProperty: string, properties: IPropertyPaneSliderProps): IPropertyPaneField;
/* Excluded from this release type: _PropertyPaneSortableAccordion */
/* Excluded from this release type: PropertyPaneSpinButton */
/**
* Helper method to create a TextField on the PropertyPane.
* @param targetProperty - Target property the textfield is associated to.
* @param properties - Strongly typed TextField properties.
*
* @public
*/
export declare function PropertyPaneTextField(targetProperty: string, properties: IPropertyPaneTextFieldProps): IPropertyPaneField;
/* Excluded from this release type: PropertyPaneThumbnailPicker */
/**
* Helper method to create a Toggle on the PropertyPane.
* @param targetProperty - Target property the toggle is associated to.
* @param properties - Strongly typed Toggle properties.
*
* @public
*/
export declare function PropertyPaneToggle(targetProperty: string, properties: IPropertyPaneToggleProps): IPropertyPaneField;
/* Excluded from this release type: _PropertyPaneWebPartTitle */
/* Excluded from this release type: _PropertyPaneWidthMode */
/* Excluded from this release type: ThumbnailType */
/* Excluded from this release type: _UpdateGroupData */
/* Excluded from this release type: _UpdateItemData */
export { }