import { EventEmitter } from '../../stencil-public-runtime'; import { ErrorMap } from '../cat-form-hint/cat-form-hint'; import { CatDatepickerMode } from './cat-datepicker.mode'; import { Placement } from '@floating-ui/dom'; import { BaseOptions } from 'flatpickr/dist/types/options'; export declare class CatDatepickerFlat { private pickr?; private _input?; private _calendarWrapper?; private get input(); hostElement: HTMLElement; hasSlottedLabel: boolean; hasSlottedHint: boolean; /** * Whether the label need a marker to shown if the input is required or optional. */ requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'; /** * Whether the label is on top or left. */ horizontal?: boolean; /** * If the horizontal value is not provided, this fallback value is used. Can be set by form-group. * @internal */ fallbackHorizontal?: boolean; /** * Hint for form autofill feature. */ autoComplete: string; /** * Whether the input should show a clear button. */ clearable: boolean; /** * Whether the input is disabled. */ disabled: boolean; /** * Optional hint text(s) to be displayed with the input. */ hint?: string | string[]; /** * The name of an icon to be displayed in the input. */ icon?: string; /** * Display the icon on the right. */ iconRight: boolean; /** * A unique identifier for the input. */ identifier?: string; /** * The label for the input. */ label: string; /** * Visually hide the label, but still show it to assistive technologies like screen readers. */ labelHidden: boolean; /** * A maximum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z. */ max?: string; /** * A minimum value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z. */ min?: string; /** * The mode of the datepicker, to select a date, time, both, a date range or a week number. */ mode: CatDatepickerMode; /** * The name of the form control. Submitted with the form as part of a name/value pair. */ name?: string; /** * The placeholder text to display within the input. */ placeholder?: string; /** * A textual prefix to be displayed in the input. */ textPrefix?: string; /** * A textual suffix to be displayed in the input. */ textSuffix?: string; /** * The value is not editable. */ readonly: boolean; /** * A value is required or must be check for the form to be submittable. */ required: boolean; /** * The step size to use when changing the time. */ step: number; /** * Instead of body, appends the calendar to the cat-datepicker element instead */ attachToElement: boolean; /** * Where the calendar is rendered relative to the input vertically and horizontally. * In the format of "[vertical] [horizontal]". Vertical can be auto, above or below (required). * Horizontal can be left, center or right. * If @attachToElement is passed the value should be in Placement format */ position?: BaseOptions['position'] | Placement; /** * The value as ISO Date string, e.g. 2017-03-04T01:23:43.000Z or as a week number string. */ value?: string; /** * The validation errors for this input. Will render a hint under the input * with the translated error message(s) `error.${key}`. If an object is * passed, the keys will be used as error keys and the values translation * parameters. * If the value is `true`, the input will be marked as invalid without any * hints under the input. */ errors?: boolean | string[] | ErrorMap; /** * Fine-grained control over when the errors are shown. Can be `false` to * never show errors, `true` to show errors on blur, or a number to show * errors change with the given delay in milliseconds or immediately on blur. */ errorUpdate: boolean | number; /** * Attributes that will be added to the native HTML input element. */ nativeAttributes?: { [key: string]: string; }; /** * Attributes that will be added to the rendered HTML datepicker element. */ nativePickerAttributes?: { [key: string]: string; }; /** * Emitted when the value is changed. */ catChange: EventEmitter; /** * Emitted when the input received focus. */ catFocus: EventEmitter; /** * Emitted when the input loses focus. */ catBlur: EventEmitter; onValueChanged(value: string): void; onDisabledChanged(): void; componentDidLoad(): void; componentWillRender(): void; onMinChanged(): void; /** * Programmatically move focus to the datepicker. Use this method instead of * `input.focus()`. * * @param options An optional object providing options to control aspects of * the focusing process. */ doFocus(options?: FocusOptions): Promise; /** * Programmatically remove focus from the datepicker. Use this method instead of * `input.blur()`. */ doBlur(): Promise; render(): any[]; private initDatepicker; private updatePosition; }