/// /** * PropertyPane interfaces for the developers wanting to configure the web parts. */ import type { IPropertyPanePage } from '../propertyPanePage/IPropertyPanePage'; import type { PropertyPaneLifeCycleEvent } from '../propertyPaneDefinitions/PropertyPaneLifeCycleEvent'; import type { IDynamicConfiguration } from '../propertyPaneDynamicData/IDynamicConfiguration'; import type { PropertyPaneFieldType } from '../propertyPaneFields/propertyPaneField/IPropertyPaneField'; /** * Web part - PropertyPane data contract. * * @internal */ export interface IPropertyPaneData { /** * Web part instance id. */ webPartId: string; /** * Title of the web part. */ title: string; /** * Indicates whether the web part's configuration is reactive or not. */ isReactive?: boolean; /** * Indicates whether the PropertyPane state should reset or not. * * 'shouldResetState' will be true in the following cases: * 1. When the PropertyPane becomes visible from hidden state. * 2. Switching between the web parts while the PropertyPane is open. */ shouldResetState?: boolean; /** * Notification event fired when the property pane field is changed and * has already been validated and modified. */ onPropertyPaneFieldChanged: (propertyName: string, newValue: unknown, fieldType?: PropertyPaneFieldType) => void; /** * Single callback for all the possible configuration events of the PropertyPane. */ onConfigurationEvent: (eventType: PropertyPaneLifeCycleEvent) => void; /** * Event callback fired after the PropertyPane is rendered. */ onRendered: () => void; /** * Callback to re-render the PropertyPane. */ render?: () => void; /** * Property bag from the web part. */ properties: any; /** * Property pane configuration. */ configuration: IPropertyPaneConfiguration; /** * Dynamic data configuration. * * @remarks * This contract represents all the required dynamic data related configuration * for the component. This data is essential in creating the dynamic properties. * This is filled by the framework. For example in BaseWebPart class for web parts. */ dynamicConfiguration: IDynamicConfiguration; } /** * Page display type for multi pages property pane. * * @beta */ export declare enum PagesType { /** * Show property panes in tab style. */ Tabs = 0, /** * Show property panes in pagination style. */ Pages = 1 } /** * Web part configuration settings * * @public */ export 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[]; /** * Type of pages to be displayed on the PropertyPane. * By default, it works as 'Pages' for multi pages property pane. * * @beta */ pagesType?: PagesType; /** * List of properties to debounce the `onPropertyPaneFieldChanged` event. * * @remarks * If your property pane is reactive, the `onPropertyPaneFieldChanged` event will fire with * any change to the web part properties. This may lead to jank for some property pane controls * or web parts. You can use this configuration property to debounce the `onPropertyPaneFieldChanged` * event for the properties listed; other properties will be unaffected. * * @beta */ debounceProperties?: IPropertyPaneDebounceProperty[]; /** * Whether to disable trapping focus inside property pane. * @beta */ disableFocusTrap?: boolean; /** * Whether to avoid showing the audience picker that allows configuration of which audiences * can see this web part. * @alpha */ disableAudiencePicker?: boolean; /** * Configuration to specify where the audience picker should be rendered in a multi column property pane * @internal */ audiencePickerPosition?: IAudiencePickerPosition; /** * Whether to hide the title bar of the property pane when rendering a custom title bar. * @internal */ hideTitleBar?: boolean; /** * Whether or not a customer footer is provided. * @internal */ customFooter?: boolean; /** * Custom header. * @internal */ customHeader?: JSX.Element; /** * Whether to show back button in header. * @internal */ showBackButton?: boolean; /** * Whether or not to show the "Visibility" group in the property pane. * * @remarks * This property was created since this group should only be available for overall web part configuration, * not individual items within web parts (e.g., links in quick links). Note: This group is available to * 1p/3p web parts, so we may consider releasing this api for more 3p control. * * @alpha */ disableVisibilityGroup?: boolean; } /** * Definition of a Property Pane property, which should have the `onPropertyPaneFieldChanged` event * be debounced. * * @beta */ export interface IPropertyPaneDebounceProperty { /** * Property to debounce. */ propertyName: string; /** * Number of milliseconds to delay the next `onPropertyPaneFieldChanged` event since the last * time the event fired for this property. * * @remarks * The default value is 500. * * @beta */ debouncePeriod?: number; } /** * Audience picker position settings * * @internal */ export interface IAudiencePickerPosition { /** * In the future, a pageIndex property can be defined here to specify which page the audience picker will be added to */ /** * Index of the column the audience picker will be added to in case of multi-column property pane * @remarks * The default value is 1. */ columnIndex?: 0 | 1; } /** * PropertyPane width mode. * @internal */ export declare enum PropertyPaneWidthMode { /** * Default width mode. Defaults to 340px. * @remarks * This is the default width mode for the property pane. It is used when no other width mode is specified. * The default width of the property pane is 340px. * @internal */ Default = 0, /** * Narrow width mode. Defaults to 320px. * @remarks * This is the narrow width mode for the property pane. It is used when the property pane is in a narrow * column layout. The default width of the property pane is 320px. * @internal */ Narrow = 1, /** * Wide width mode. Defaults to 534px. * @remarks * This is the wide width mode for the property pane. It is used when the property pane is in a wide column * layout. The default width of the property pane is 534px. * @internal */ Wide = 2 } //# sourceMappingURL=IPropertyPane.d.ts.map