import { EventEmitter } from "../../stencil-public-runtime"; import { IcAriaLive, IcInformationStatusOrEmpty, IcSizes, IcDateFormat, IcDateValueFormat, IcWeekDays, IcThemeMode } from "../../utils/types"; import "../../../../web-components/src/components/ic-input-container/ic-input-container"; import "../../../../web-components/src/components/ic-input-component-container/ic-input-component-container"; import "../../../../web-components/src/components/ic-input-label/ic-input-label"; import "../../../../web-components/src/components/ic-input-validation/ic-input-validation"; import "../../../../web-components/src/components/ic-button/ic-button"; import "../../../../web-components/src/components/ic-typography/ic-typography"; import "../../../../web-components/src/components/ic-link/ic-link"; /** * @slot helper-text - Content is set as the helper text for the date input. */ export declare class DateInput { private DEFAULT_DATE_FORMAT; private ARIA_INVALID; private ARIA_LABEL; private ARIA_LABELLED_BY; private assistiveHintId; private calendarButtonEl; private dayInputEl?; private defaultHelperText; private EVENT_OBJECT_STRING; private FIT_TO_VALUE; private initialValue; private inputCompContainerEl; private INPUT_EVENT_OBJECT_STRING; private inputsInOrder; private isAfterMax; private isBeforeMin; private preventInputsUpdating; private isDisabledDate; private isPasteValidationDisplayed; private isValidDay; private isValidMonth; private isValidDate; private isZuluTime; private KEYBOARD_EVENT_OBJECT_STRING; private MAX_DAY; private MAX_MONTH; private monthInputEl?; private preventAutoFormatting; private preventDayInput; private preventMonthInput; private preventYearInput; private previousInvalidDateTest; private previousSelectedDate; private selectedDate; private selectedDateInfoEl?; private screenReaderInfoId; private selectedDateInfoId; private yearInputEl?; private externalSetDate; private clearInput; private calendarIsOpen; el: HTMLIcDateInputElement; invalidDateText: string; maxDate: Date; minDate: Date; calendarFocused: boolean; clearButtonFocused: boolean; removeLabelledBy: boolean; day: string; month: string; year: string; watchInputHandler(): void; /** * The format in which the date will be displayed. */ dateFormat: IcDateFormat; /** * If `true`, every individual input field completed will emit an icChange event. */ emitDatePartChange?: boolean; /** * If `true`, the disabled state will be set. */ disabled: boolean; watchDisabledHandler(): void; /** * The days of the week to disable. */ disableDays: IcWeekDays[]; /** * The text to display as the validation message when `disableDays` is set and a disabled date is entered. */ disableDaysMessage: string; /** * If `true`, dates in the future are not allowed. A validation message will appear if a date in the future is entered. */ disableFuture?: boolean; watchDisableFutureHandler(): void; /** * The text to display as the validation message when `disableFuture` is true and a date in the future is entered. */ disableFutureMessage: string; /** * If `true`, dates in the past are not allowed. A validation message will appear if a date in the past is entered. */ disablePast?: boolean; watchDisablePastHandler(): void; /** * The text to display as the validation message when `disablePast` is true and a date in the past is entered. */ disablePastMessage: string; /** * The helper text that will be displayed for additional field guidance. This will default to the text "Use format" along with the `dateFormat` value. */ helperText: string | null; /** * If `true`, the helper text will be visually hidden, but still read out by screenreaders. */ hideHelperText: boolean; /** * If `true`, the label will be visually hidden, but will still be read out by screen readers. */ hideLabel?: boolean; /** * The ID for the input. */ inputId: string; /** * The text to display as the validation message when an invalid date is entered. */ invalidDateMessage: string; /** * The label for the date input. */ label: string; /** * The latest date that will be allowed. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object. * The value of this prop is ignored if `disableFuture` is set to `true`. */ max: string | Date; watchMaxHandler(): void; /** * The earliest date that will be allowed. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object. * The value of this prop is ignored if `disablePast` is set to `true`. */ min: string | Date; watchMinHandler(): void; /** * The name of the control, which is submitted with the form data. */ name: string; /** * If `true`, the input will require a value. */ required: boolean; watchRequiredHandler(): void; /** * @internal If `true`, a button which displays the calendar view when clicked will be displayed. */ showCalendarButton?: boolean; /** * If `true`, a button which clears the date input when clicked will be displayed. */ showClearButton?: boolean; /** * The size of the date input to be displayed. */ size: IcSizes; /** * Sets the date picker to the dark or light theme colors. "inherit" will set the color based on the system settings or ic-theme component. */ theme?: IcThemeMode; /** * The value of the date input. The value can be in any format supported as `dateFormat`, in ISO 8601 date string format (`yyyy-mm-dd`) or as a JavaScript `Date` object. */ value?: IcDateValueFormat; /** * The value of the `aria-live` attribute on the validation message. */ validationAriaLive: IcAriaLive; /** * The validation status - e.g. 'error' | 'warning' | 'success'. This will override the built-in date validation. */ validationStatus: IcInformationStatusOrEmpty; /** * The text to display as the validation message. This will override the built-in date validation. */ validationText?: string; /** * @internal Emitted when the calendar is opened. */ calendarButtonClicked: EventEmitter<{ value: Date | null; }>; /** * Emitted when the input loses focus. */ icBlur: EventEmitter<{ value: Date | null; }>; /** * Emitted when the value has changed. */ icChange: EventEmitter<{ value: Date | null; dateObject: { day: string | null; month: string | null; year: string | null; }; utcValue: Date | null; }>; /** * Emitted when the input gains focus. */ icFocus: EventEmitter<{ value: Date | null; }>; disconnectedCallback(): void; componentWillLoad(): void; componentDidLoad(): void; componentWillUpdate(): void; componentDidRender(): void; /** * Returns the value as a Date object * @returns Date */ getDate(): Promise; /** * @internal Sets focus on the calendar button. */ setCalendarFocus(): Promise; /** * @internal Used to pass disabledDays from parent component. */ setDisableDays(days: IcWeekDays[]): Promise; /** * @internal Used to enable other components to invoke an IcChange event from the input. */ triggerIcChange(d: Date | null): Promise; private setInputPasteValue; private checkSingleCopiedValueIsValid; /** * Using Object.prototype.string to determine type if event from user * @param event - event object used to differentiate keyboard, generic or input event * @returns boolean */ private isKeyboardOrEvent; private setDateValidity; private handleInput; private handleKeyDown; private handleFocus; private handleBlur; private handleLeftRightArrowKeyPress; private notifyScreenReaderSelectedDate; private handleUpDownArrowKeyPress; private handleDateChange; private slicePastedDate; private isPastedStringDateValid; private handlePaste; private setDate; private formatMinMax; private updateInputValues; private setInputValue; private setValidationMessage; private setInputsInOrder; private setAriaLabelledBy; private setPreventInput; private getInputFromDatePart; private getInputsInOrder; private getDescOfInputsOrder; private getScreenReaderInfo; private preventInput; /** * Get whether date has been disabled using disableFuture or disablePast prop, but always allow current day * Consider using dateClamp and inDateRange * @returns `boolean` */ private isSelectedDateDisabled; private moveToNextInput; private moveToPreviousInput; private autocompleteInput; private convertToDate; private handleHostBlur; private handleHostFocus; private handleFormReset; private getAriaLabel; private notifyScreenReaderArrowKeys; private removeAriaLabelledBy; private setPastedValueAndValidation; private pasteZuluDateTime; private displayPastedValidation; private setPasteInvalidText; private notifyScreenReader; private notifyScreenReaderInput; private setFitToValueStyling; private setAriaInvalid; private handleClear; private handleCalendarOpen; private setValueAndEmitChange; private handleCalendarFocus; private handleCalendarBlur; private handleClearFocus; private handleClearBlur; private emitIcChange; render(): any; }