/**@jsxImportSource react */ import { DateTimeCulture } from "intl-io"; import { DropdownConfig } from "../overlay/Dropdown"; import { Field, FieldInstance, FieldConfig } from "./Field"; import type { RenderingContext } from "../../ui/RenderingContext"; import type { Instance, DropdownWidgetProps } from "../../ui/Instance"; import type { Config, Prop, BooleanProp, StringProp } from "../../ui/Prop"; export declare class MonthFieldInstance extends FieldInstance implements DropdownWidgetProps { lastDropdown?: Instance; dropdownOpen?: boolean; selectedIndex?: number; component?: any; } export interface MonthFieldConfig extends FieldConfig { /** Selected month. This should be a Date object or a valid date string consumable by Date.parse function. */ value?: Prop; /** Set to `true` to allow range select. */ range?: BooleanProp; /** Start of the selected month range. Used only if `range` is set to `true`. */ from?: Prop; /** End of the selected month range. Used only if `range` is set to `true`. */ to?: Prop; /** Defaults to `false`. Used to make the field read-only. */ readOnly?: BooleanProp; /** The opposite of `disabled`. */ enabled?: BooleanProp; /** Default text displayed when the field is empty. */ placeholder?: StringProp; /** Minimum date value. */ minValue?: Prop; /** Set to `true` to disallow the `minValue`. Default value is `false`. */ minExclusive?: BooleanProp; /** Maximum date value. */ maxValue?: Prop; /** Set to `true` to disallow the `maxValue`. Default value is `false`. */ maxExclusive?: BooleanProp; /** String representing culture. Default is `en`. */ culture?: string; /** Set to `true` to hide the clear button. Default value is `false`. */ hideClear?: boolean; /** Base CSS class to be applied on the field. Defaults to `monthfield`. */ baseClass?: string; /** Maximum value error text. */ maxValueErrorText?: string; /** Maximum exclusive value error text. */ maxExclusiveErrorText?: string; /** Minimum value error text. */ minValueErrorText?: string; /** Minimum exclusive value error text. */ minExclusiveErrorText?: string; /** Invalid input error text. */ inputErrorText?: string; /** Name or configuration of the icon to be put on the left side of the input. */ icon?: StringProp | Config; /** Set to `false` to hide the clear button. Default value is `true`. */ showClear?: boolean; /** Set to `true` to display the clear button even if `required` is set. Default is `false`. */ alwaysShowClear?: boolean; /** The function that will be used to convert Date objects before writing data to the store. */ encoding?: (date: Date) => any; /** Additional configuration to be passed to the dropdown. */ dropdownOptions?: Partial; /** A boolean flag that determines whether the `to` date is included in the range. */ inclusiveTo?: boolean; /** Optional configuration options for the MonthPicker component rendered within the dropdown. */ monthPickerOptions?: Config; /** Custom validation function. */ onValidate?: string | ((value: string | Date, instance: Instance, validationParams: Record) => unknown); } export declare class MonthField extends Field { baseClass: string; mode?: string; range?: BooleanProp; from?: Prop; to?: Prop; value?: Prop; culture: DateTimeCulture; hideClear?: boolean; showClear?: boolean; alwaysShowClear?: boolean; encoding?: (date: Date) => string; dropdownOptions?: Partial; inclusiveTo?: boolean; monthPickerOptions?: Record; maxValueErrorText: string; maxExclusiveErrorText: string; minValueErrorText: string; minExclusiveErrorText: string; inputErrorText?: string; minExclusive?: BooleanProp; maxExclusive?: BooleanProp; minValue?: Prop; maxValue?: Prop; placeholder?: StringProp; reactOn: string; declareData(...args: Record[]): void; isEmpty(data: Record): boolean; init(): void; prepareData(context: RenderingContext, instance: MonthFieldInstance): void; validateRequired(context: RenderingContext, instance: MonthFieldInstance): string | undefined; validate(context: RenderingContext, instance: MonthFieldInstance): void; renderInput(context: RenderingContext, instance: MonthFieldInstance, key: string): React.ReactNode; formatValue(context: RenderingContext, instance: Instance): string; parseDate(date: string | Date | null): Date | null; handleSelect(instance: MonthFieldInstance, date1: Date | null, date2: Date | null): void; } //# sourceMappingURL=MonthField.d.ts.map