import type { DynamicDataProvider } from '@microsoft/sp-component-base'; /** * `PropertyPaneDynamicData` component props. * * @beta * @deprecated - This has been replaced by IPropertyPaneDynamicFieldProps */ export interface IPropertyPaneDynamicTextFieldProps { /** * 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. * * Make sure to set this only if you want to see an error message displayed for the text field. */ errorMessage?: string; /** * This 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; /** * 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; /** * 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; } /** * Internal extension of the PropertyPaneDynamicTextField component props. * This is configured using real data from the web part to configure * proper usage of dynamic data. * * @internal */ export interface IConfiguredDynamicTextFieldProps extends IPropertyPaneDynamicTextFieldProps { /** * The Dynamic Data provider for the web part. */ dynamicDataProvider: DynamicDataProvider; /** * Callback to be called when their is a change in the associated dynamic data. * It defaults to the render method of the web part. * * This maps with the behavior from the deserialization of DD objects. */ changeCallback: () => void; } //# sourceMappingURL=IPropertyPaneDynamicTextField.d.ts.map