igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
67 lines (66 loc) • 3.27 kB
TypeScript
import type { AbstractConstructor } from '../common/mixins/constructor.js';
import { type DatePartDeltas } from '../date-time-input/date-part.js';
import { IgcDateTimeInputBaseComponent } from '../date-time-input/date-time-input.base.js';
import type { DateRangeValue } from '../types.js';
import { DateRangeMaskParser, type DateRangePart } from './date-range-mask-parser.js';
export interface IgcDateRangeInputComponentEventMap {
igcInput: CustomEvent<string>;
igcChange: CustomEvent<DateRangeValue | null>;
focus: FocusEvent;
blur: FocusEvent;
}
declare const IgcDateRangeInputComponent_base: import("../common/mixins/constructor.js").Constructor<import("../common/mixins/event-emitter.js").EventEmitterInterface<IgcDateRangeInputComponentEventMap>> & AbstractConstructor<IgcDateTimeInputBaseComponent>;
export default class IgcDateRangeInputComponent extends IgcDateRangeInputComponent_base {
static readonly tagName = "igc-date-range-input";
static styles: import("lit").CSSResult[];
static register(): void;
protected readonly _formValue: import("../common/mixins/forms/form-value.js").FormValue<DateRangeValue | null>;
protected readonly _themes: import("../../theming/theming-controller.js").ThemingController;
protected readonly _parser: DateRangeMaskParser;
protected get _datePartDeltas(): DatePartDeltas;
protected _oldValue: DateRangeValue | null;
/**
* The value of the date range input.
* @attr
*/
set value(value: DateRangeValue | null);
get value(): DateRangeValue | null;
connectedCallback(): void;
protected _handleFocus(): Promise<void>;
protected _handleBlur(): void;
protected _setCurrentDateTime(): void;
protected _calculatePartNavigationPosition(inputValue: string, direction: number): number;
protected _updateMaskDisplay(): void;
protected _performStep(datePart: unknown, delta: number | undefined, isDecrement: boolean): void;
protected _commitSpunValue(value: unknown): void;
protected _buildDisplayValue(): string;
protected _calculateSpunValue(datePart: unknown, delta: number | undefined, isDecrement: boolean): DateRangeValue;
/**
* Gets the date range part at the current cursor position.
* If the cursor is at a literal, finds the nearest non-literal part.
* Returns undefined if no valid part is found.
*/
protected _getDatePartAtCursor(): DateRangePart | undefined;
/**
* Gets the default date range part to target when the input is not focused.
* Returns the first date part at the start position.
*/
protected _getDefaultDatePart(): DateRangePart | undefined;
protected _buildMaskedValue(): string;
protected _applyMask(string: string): void;
protected _syncValueFromMask(): void;
/** Increments a date/time portion. */
stepUp(datePart?: DateRangePart, delta?: number): void;
/** Decrements a date/time portion. */
stepDown(datePart?: DateRangePart, delta?: number): void;
/** Clears the input element of user input. */
clear(): void;
hasDateParts(): boolean;
hasTimeParts(): boolean;
}
declare global {
interface HTMLElementTagNameMap {
'igc-date-range-input': IgcDateRangeInputComponent;
}
}
export {};