import type { IPropertyPaneFieldTooltipProps } from '../propertyPaneField/IPropertyPaneField'; /** * PropertyPaneTextField component props. * * @public */ export 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; }; /** * Props for text field's tooltip button, which appears next to the label. * * @internal */ _tooltipProps?: IPropertyPaneFieldTooltipProps; } //# sourceMappingURL=IPropertyPaneTextField.d.ts.map