import * as i5 from '@angular/cdk/portal'; import { ComponentType, Portal, BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, CdkPortal } from '@angular/cdk/portal'; import * as i0 from '@angular/core'; import { OnChanges, EventEmitter, SimpleChanges, AfterContentInit, AfterViewChecked, OnDestroy, ElementRef, InjectionToken, QueryList, AfterViewInit, ChangeDetectorRef, ViewContainerRef, OnInit, ComponentRef, EmbeddedViewRef, TemplateRef, AfterContentChecked, Optional, IterableDiffers, DoCheck, PipeTransform } from '@angular/core'; import { Observable, Subject, Subscription, BehaviorSubject } from 'rxjs'; import * as i4 from '@angular/cdk/overlay'; import { ScrollStrategy, Overlay, OverlayRef, OriginConnectionPosition, OverlayConnectionPosition, ConnectedPosition, CdkConnectedOverlay } from '@angular/cdk/overlay'; import * as i5$1 from '@angular/forms'; import { UntypedFormControl, FormGroupDirective, NgForm, ControlValueAccessor, Validator, AbstractControl, ValidationErrors, NgControl } from '@angular/forms'; import { AnimationTriggerMetadata, AnimationEvent } from '@angular/animations'; import * as i2 from '@angular/common'; import { TitleCasePipe } from '@angular/common'; import { Direction } from '@angular/cdk/bidi'; import * as i3 from '@angular/common/http'; import * as i13 from '@angular/cdk/a11y'; import { ActiveDescendantKeyManager, FocusableOption, FocusOrigin } from '@angular/cdk/a11y'; import * as i1 from '@angular/cdk/platform'; import { Platform } from '@angular/cdk/platform'; import { SafeResourceUrl, SafeHtml } from '@angular/platform-browser'; import * as i3$1 from '@angular/cdk/observers'; import * as i3$2 from '@angular/cdk/text-field'; import { BreakpointState } from '@angular/cdk/layout'; import * as i4$1 from '@angular/cdk/table'; import { CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CdkFooterRow, CdkRow, CdkTable, DataSource } from '@angular/cdk/table'; import { SelectionModel } from '@angular/cdk/collections'; import { BooleanInput, NumberInput } from '@angular/cdk/coercion'; /** * Extra CSS classes that can be associated with a calendar cell. */ type OuiCalendarCellCssClasses = string | string[] | Set | { [key: string]: any; }; /** * An internal class that represents the data corresponding to a single calendar cell. */ declare class OuiCalendarCell { value: number; displayValue: string; ariaLabel: string; enabled: boolean; cssClasses?: OuiCalendarCellCssClasses; constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: OuiCalendarCellCssClasses); } /** * An internal component used to display calendar data in a table. */ declare class OuiCalendarBody implements OnChanges { private _elementRef; private _ngZone; /** The label for the table. (e.g. "Jan 2017"). */ label: string; /** The cells to display in the table. */ rows: OuiCalendarCell[][]; /** The value in the table that corresponds to today. */ todayValue: number; /** The value in the table that is currently selected. */ selectedValue: number; /** The minimum number of free cells needed to fit the label in the first row. */ labelMinRequiredCells: number; /** The number of columns in the table. */ numCols: number; /** The cell number of the active cell in the table. */ activeCell: number; /** * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be * maintained even as the table resizes. */ cellAspectRatio: number; /** Emits when a new value is selected. */ readonly selectedValueChange: EventEmitter; /** The number of blank cells to put at the beginning for the first row. */ _firstRowOffset: number; /** Padding for the individual date cells. */ _cellPadding: string; /** Width of an individual cell. */ _cellWidth: string; constructor(); _cellClicked(cell: OuiCalendarCell): void; ngOnChanges(changes: SimpleChanges): void; _isActiveCell(rowIndex: number, colIndex: number): boolean; /** Focuses the active cell after the microtask queue is empty. */ _focusActiveCell(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */ declare abstract class DateAdapter { /** The locale to use for all dates. */ protected locale: any; /** A stream that emits when the locale changes. */ get localeChanges(): Observable; protected _localeChanges: Subject; /** * Gets the year component of the given date. * * @param date The date to extract the year from. * @returns The year component. */ abstract getYear(date: D): number; /** * Gets the month component of the given date. * * @param date The date to extract the month from. * @returns The month component (0-indexed, 0 = January). */ abstract getMonth(date: D): number; /** * Gets the date of the month component of the given date. * * @param date The date to extract the date of the month from. * @returns The month component (1-indexed, 1 = first of month). */ abstract getDate(date: D): number; /** * Gets the day of the week component of the given date. * * @param date The date to extract the day of the week from. * @returns The month component (0-indexed, 0 = Sunday). */ abstract getDayOfWeek(date: D): number; /** * Gets a list of names for the months. * * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J'). * @returns An ordered list of all month names, starting with January. */ abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[]; /** * Gets a list of names for the dates of the month. * * @returns An ordered list of all date of the month names, starting with '1'. */ abstract getDateNames(): string[]; /** * Gets a list of names for the days of the week. * * @param style The naming style (e.g. long = 'Sunday', short = 'Sun', narrow = 'S'). * @returns An ordered list of all weekday names, starting with Sunday. */ abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[]; /** * Gets the name for the year of the given date. * * @param date The date to get the year name for. * @returns The name of the given year (e.g. '2017'). */ abstract getYearName(date: D): string; /** * Gets the first day of the week. * * @returns The first day of the week (0-indexed, 0 = Sunday). */ abstract getFirstDayOfWeek(): number; /** * Gets the number of days in the month of the given date. * * @param date The date whose month should be checked. * @returns The number of days in the month of the given date. */ abstract getNumDaysInMonth(date: D): number; /** * Clones the given date. * * @param date The date to clone * @returns A new date equal to the given date. */ abstract clone(date: D): D; /** * Creates a date with the given year, month, and date. Does not allow over/under-flow of the * month and date. * * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989). * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11. * @param date The date of month of the date. Must be an integer 1 - length of the given month. * @returns The new date, or null if invalid. */ abstract createDate(year: number, month: number, date: number): D; /** * Gets today's date. * * @returns Today's date. */ abstract today(): D; /** * Parses a date from a user-provided value. * * @param value The value to parse. * @param parseFormat The expected format of the value being parsed * (type is implementation-dependent). * @returns The parsed date. */ abstract parse(value: any, parseFormat: any): D | null; /** * Formats a date as a string according to the given format. * * @param date The value to format. * @param displayFormat The format to use to display the date as a string. * @returns The formatted date string. */ abstract format(date: D, displayFormat: any): string; /** * Adds the given number of years to the date. Years are counted as if flipping 12 pages on the * calendar for each year and then finding the closest date in the new month. For example when * adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017. * * @param date The date to add years to. * @param years The number of years to add (may be negative). * @returns A new date equal to the given one with the specified number of years added. */ abstract addCalendarYears(date: D, years: number): D; /** * Adds the given number of months to the date. Months are counted as if flipping a page on the * calendar for each month and then finding the closest date in the new month. For example when * adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017. * * @param date The date to add months to. * @param months The number of months to add (may be negative). * @returns A new date equal to the given one with the specified number of months added. */ abstract addCalendarMonths(date: D, months: number): D; /** * Adds the given number of days to the date. Days are counted as if moving one cell on the * calendar for each day. * * @param date The date to add days to. * @param days The number of days to add (may be negative). * @returns A new date equal to the given one with the specified number of days added. */ abstract addCalendarDays(date: D, days: number): D; /** * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date. * This method is used to generate date strings that are compatible with native HTML attributes * such as the `min` or `max` attribute of an ``. * * @param date The date to get the ISO date string for. * @returns The ISO date string date string. */ abstract toIso8601(date: D): string; /** * Checks whether the given object is considered a date instance by this DateAdapter. * * @param obj The object to check * @returns Whether the object is a date instance. */ abstract isDateInstance(obj: any): boolean; /** * Checks whether the given date is valid. * * @param date The date to check. * @returns Whether the date is valid. */ abstract isValid(date: D): boolean; /** * Gets date instance that is not valid. * * @returns An invalid date. */ abstract invalid(): D; /** * Attempts to deserialize a value to a valid date object. This is different from parsing in that * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601 * string). The default implementation does not allow any deserialization, it simply checks that * the given value is already a valid date object or null. The `` will call this * method on all of it's `@Input()` properties that accept dates. It is therefore possible to * support passing values from your backend directly to these properties by overriding this method * to also deserialize the format used by your backend. * * @param value The value to be deserialized into a date object. * @returns The deserialized date object, either a valid date, null if the value can be * deserialized into a null date (e.g. the empty string), or an invalid date. */ deserialize(value: any): D | null; /** * Sets the locale used for all dates. * * @param locale The new locale. */ setLocale(locale: any): void; /** * Compares two dates. * * @param first The first date to compare. * @param second The second date to compare. * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier, * a number greater than 0 if the first date is later. */ compareDate(first: D, second: D): number; /** * Checks if two dates are equal. * * @param first The first date to check. * @param second The second date to check. * @returns Whether the two dates are equal. * Null dates are considered equal to other null dates. */ sameDate(first: D | null, second: D | null): boolean; /** * Clamp the given date between min and max dates. * * @param date The date to clamp. * @param min The minimum value to allow. If null or omitted no min is enforced. * @param max The maximum value to allow. If null or omitted no max is enforced. * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`, * otherwise `date`. */ clampDate(date: D, min?: D | null, max?: D | null): D; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } /** * An internal component used to display a single month in the datepicker. */ declare class OuiMonthView implements AfterContentInit { private _changeDetectorRef; private _dateFormats; _dateAdapter: DateAdapter; private _dir; /** * The date to display in this month view (everything other than the month and year is ignored). */ get activeDate(): D; set activeDate(value: D); private _activeDate; /** The currently selected date. */ get selected(): D | null; set selected(value: D | null); private _selected; /** The minimum selectable date. */ get minDate(): D | null; set minDate(value: D | null); private _minDate; /** The maximum selectable date. */ get maxDate(): D | null; set maxDate(value: D | null); private _maxDate; /** Function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Function that can be used to add custom CSS classes to dates. */ dateClass: (date: D) => OuiCalendarCellCssClasses; /** Emits when a new date is selected. */ readonly selectedChange: EventEmitter; /** Emits when any date is selected. */ readonly _userSelection: EventEmitter; /** Emits when any date is activated. */ readonly activeDateChange: EventEmitter; /** The body of calendar table */ _ouiCalendarBody: OuiCalendarBody; /** The label for this month (e.g. "January 2017"). */ _monthLabel: string; /** Grid of calendar cells representing the dates of the month. */ _weeks: OuiCalendarCell[][]; /** The number of blank cells in the first row before the 1st of the month. */ _firstWeekOffset: number; /** * The date of the month that the currently selected Date falls on. * Null if the currently selected Date is in another month. */ _selectedDate: number | null; /** The date of the month that today falls on. Null if today is in another month. */ _todayDate: number | null; /** The names of the weekdays. */ _weekdays: { long: string; narrow: string; }[]; constructor(); ngAfterContentInit(): void; /** Handles when a new date is selected. */ _dateSelected(date: number): void; /** Handles keydown events on the calendar body when calendar is in month view. */ _handleCalendarBodyKeydown(event: KeyboardEvent): void; /** Initializes this month view. */ _init(): void; /** Focuses the active cell after the microtask queue is empty. */ _focusActiveCell(): void; /** Creates OuiCalendarCells for the dates in this month. */ private _createWeekCells; /** Date filter for the month */ private _shouldEnableDate; /** * Gets the date in this month that the given Date falls on. * Returns null if the given Date is in another month. */ private _getDateInCurrentMonth; /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */ private _hasSameMonthAndYear; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; /** Determines whether the user has the RTL layout direction. */ private _isRtl; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "oui-month-view", ["ouiMonthView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, { "selectedChange": "selectedChange"; "_userSelection": "_userSelection"; "activeDateChange": "activeDateChange"; }, never, never, false, never>; } declare const yearsPerPage = 24; declare const yearsPerRow = 4; /** * An internal component used to display a year selector in the datepicker. */ declare class OuiMultiYearView implements AfterContentInit { private _changeDetectorRef; _dateAdapter: DateAdapter; private _dir; /** The date to display in this multi-year view (everything other than the year is ignored). */ get activeDate(): D; set activeDate(value: D); private _activeDate; /** The currently selected date. */ get selected(): D | null; set selected(value: D | null); private _selected; /** The minimum selectable date. */ get minDate(): D | null; set minDate(value: D | null); private _minDate; /** The maximum selectable date. */ get maxDate(): D | null; set maxDate(value: D | null); private _maxDate; /** A function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Emits when a new year is selected. */ readonly selectedChange: EventEmitter; /** Emits the selected year. This doesn't imply a change on the selected date */ readonly yearSelected: EventEmitter; /** Emits when any date is activated. */ readonly activeDateChange: EventEmitter; /** The body of calendar table */ _ouiCalendarBody: OuiCalendarBody; /** Grid of calendar cells representing the currently displayed years. */ _years: OuiCalendarCell[][]; /** The year that today falls on. */ _todayYear: number; /** The year of the selected date. Null if the selected date is null. */ _selectedYear: number | null; constructor(); ngAfterContentInit(): void; /** Initializes this multi-year view. */ _init(): void; /** Handles when a new year is selected. */ _yearSelected(year: number): void; /** Handles keydown events on the calendar body when calendar is in multi-year view. */ _handleCalendarBodyKeydown(event: KeyboardEvent): void; _getActiveCell(): number; /** Focuses the active cell after the microtask queue is empty. */ _focusActiveCell(): void; /** Creates an OuiCalendarCell for the given year. */ private _createCellForYear; /** Whether the given year is enabled. */ private _shouldEnableYear; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; /** Determines whether the user has the RTL layout direction. */ private _isRtl; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "oui-multi-year-view", ["ouiMultiYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "activeDateChange": "activeDateChange"; }, never, never, false, never>; } /** * An internal component used to display a single year in the datepicker. */ declare class OuiYearView implements AfterContentInit { private _changeDetectorRef; private _dateFormats; _dateAdapter: DateAdapter; private _dir; /** The date to display in this year view (everything other than the year is ignored). */ get activeDate(): D; set activeDate(value: D); private _activeDate; /** The currently selected date. */ get selected(): D | null; set selected(value: D | null); private _selected; /** The minimum selectable date. */ get minDate(): D | null; set minDate(value: D | null); private _minDate; /** The maximum selectable date. */ get maxDate(): D | null; set maxDate(value: D | null); private _maxDate; /** A function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Emits when a new month is selected. */ readonly selectedChange: EventEmitter; /** Emits the selected month. This doesn't imply a change on the selected date */ readonly monthSelected: EventEmitter; /** Emits when any date is activated. */ readonly activeDateChange: EventEmitter; /** The body of calendar table */ _ouiCalendarBody: OuiCalendarBody; /** Grid of calendar cells representing the months of the year. */ _months: OuiCalendarCell[][]; /** The label for this year (e.g. "2017"). */ _yearLabel: string; /** The month in this year that today falls on. Null if today is in a different year. */ _todayMonth: number | null; /** * The month in this year that the selected Date falls on. * Null if the selected Date is in a different year. */ _selectedMonth: number | null; constructor(); ngAfterContentInit(): void; /** Handles when a new month is selected. */ _monthSelected(month: number): void; /** Handles keydown events on the calendar body when calendar is in year view. */ _handleCalendarBodyKeydown(event: KeyboardEvent): void; /** Initializes this year view. */ _init(): void; /** Focuses the active cell after the microtask queue is empty. */ _focusActiveCell(): void; /** * Gets the month in this year that the given Date falls on. * Returns null if the given Date is in another year. */ private _getMonthInCurrentYear; /** Creates an OuiCalendarCell for the given month. */ private _createCellForMonth; /** Whether the given month is enabled. */ private _shouldEnableMonth; /** * Tests whether the combination month/year is after this.maxDate, considering * just the month and year of this.maxDate */ private _isYearAndMonthAfterMaxDate; /** * Tests whether the combination month/year is before this.minDate, considering * just the month and year of this.minDate */ private _isYearAndMonthBeforeMinDate; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; /** Determines whether the user has the RTL layout direction. */ private _isRtl; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "oui-year-view", ["ouiYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; }, { "selectedChange": "selectedChange"; "monthSelected": "monthSelected"; "activeDateChange": "activeDateChange"; }, never, never, false, never>; } /** * Possible views for the calendar. */ type OuiCalendarView = 'month' | 'year' | 'multi-year'; /** * A calendar that is used as part of the datepicker. */ declare class OuiCalendar implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges { private _dateAdapter; private _dateFormats; private _changeDetectorRef; /** An input indicating the type of the header component, if set. */ headerComponent: ComponentType; /** A portal containing the header component type for this calendar. */ _calendarHeaderPortal: Portal; private _intlChanges; /** * Used for scheduling that focus should be moved to the active cell on the next tick. * We need to schedule it, rather than do it immediately, because we have to wait * for Angular to re-evaluate the view children. */ private _moveFocusOnNextTick; /** A date representing the period (month or year) to start the calendar in. */ get startAt(): D | null; set startAt(value: D | null); private _startAt; /** Whether the calendar should be started in month or year view. */ startView: OuiCalendarView; /** The currently selected date. */ get selected(): D | null; set selected(value: D | null); private _selected; /** The minimum selectable date. */ get minDate(): D | null; set minDate(value: D | null); private _minDate; /** The maximum selectable date. */ get maxDate(): D | null; set maxDate(value: D | null); private _maxDate; /** Function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Function that can be used to add custom CSS classes to dates. */ dateClass: (date: D) => OuiCalendarCellCssClasses; /** Emits when the currently selected date changes. */ readonly selectedChange: EventEmitter; /** * Emits the year chosen in multiyear view. * This doesn't imply a change on the selected date. */ readonly yearSelected: EventEmitter; /** * Emits the month chosen in year view. * This doesn't imply a change on the selected date. */ readonly monthSelected: EventEmitter; /** Emits when any date is selected. */ readonly _userSelection: EventEmitter; /** Reference to the current month view component. */ monthView: OuiMonthView; /** Reference to the current year view component. */ yearView: OuiYearView; /** Reference to the current multi-year view component. */ multiYearView: OuiMultiYearView; /** * The current active date. This determines which time period is shown and which date is * highlighted when using keyboard navigation. */ get activeDate(): D; set activeDate(value: D); private _clampedActiveDate; /** Whether the calendar is in month view. */ get currentView(): OuiCalendarView; set currentView(value: OuiCalendarView); private _currentView; /** * Emits whenever there is a state change that the header may need to respond to. */ stateChanges: Subject; constructor(); ngAfterContentInit(): void; ngAfterViewChecked(): void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; focusActiveCell(): void; /** Updates today's date after an update of the active date */ updateTodaysDate(): void; /** Handles date selection in the month view. */ _dateSelected(date: D): void; /** Handles year selection in the multiyear view. */ _yearSelectedInMultiYearView(normalizedYear: D): void; /** Handles month selection in the year view. */ _monthSelectedInYearView(normalizedMonth: D): void; _userSelected(): void; /** Handles year/month selection in the multi-year/year views. */ _goToDateInView(date: D, view: 'month' | 'year' | 'multi-year'): void; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; /** Returns the component instance that corresponds to the current calendar view. */ private _getCurrentViewComponent; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "oui-calendar", ["ouiCalendar"], { "headerComponent": { "alias": "headerComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "_userSelection": "_userSelection"; }, never, never, false, never>; } /** Default header for OuiCalendar */ declare class OuiCalendarHeader { private _intl; calendar: OuiCalendar; private _dateAdapter; private ouiIconRegistry; private domSanitizer; constructor(); /** The label for the current calendar view. */ get periodButtonText(): string; get periodButtonLabel(): string; /** The label for the the previous button. */ get prevButtonLabel(): string; /** The label for the the next button. */ get nextButtonLabel(): string; /** Handles user clicks on the period label. */ currentPeriodClicked(): void; /** Handles user clicks on the previous button. */ previousClicked(): void; /** Handles user clicks on the next button. */ nextClicked(): void; /** Whether the previous period button is enabled. */ previousEnabled(): boolean; /** Whether the next period button is enabled. */ nextEnabled(): boolean; /** Whether the two dates represent the same view in the current view mode (month or year). */ private _isSameView; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "oui-calendar-header", ["ouiCalendarHeader"], {}, {}, never, ["*"], false, never>; } type Constructor = new (...args: any[]) => T; type AbstractConstructor = abstract new (...args: any[]) => T; /** @docs-private */ interface CanColor { /** Theme color palette for the component. */ color: ThemePalette; } /** Possible color palette values. */ type ThemePalette = 'primary' | 'accent' | 'warn' | undefined; /** @docs-private */ type CanColorCtor = Constructor; interface CanDisable { /** Whether the component is disabled. */ disabled: boolean; } /** @docs-private */ type CanDisableCtor = Constructor; /** @docs-private */ interface HasTabIndex { /** Tabindex of the component. */ tabIndex: number; } /** @docs-private */ type HasTabIndexCtor = Constructor; /** * Mixin that adds an initialized property to a directive which, when subscribed to, will emit a * value once markInitialized has been called, which should be done during the ngOnInit function. * If the subscription is made after it has already been marked as initialized, then it will trigger * an emit immediately. * * @docs-private */ interface HasInitialized { /** Stream that emits once during the directive/component's ngOnInit. */ initialized: Observable; /** * Sets the state as initialized and must be called during ngOnInit to notify subscribers that * the directive has been initialized. * * @docs-private */ _markInitialized: () => void; } /** @docs-private */ type HasInitializedCtor = Constructor; /** Provider that defines how form controls behave with regards to displaying error messages. */ declare class ErrorStateMatcher$1 { isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** @docs-private */ interface CanUpdateErrorState { readonly stateChanges: Subject; errorState: boolean; errorStateMatcher: ErrorStateMatcher$1; updateErrorState(): void; } /** @docs-private */ type CanUpdateErrorStateCtor = Constructor; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** @docs-private */ interface CanDisableRipple { /** Whether ripples are disabled. */ disableRipple: boolean; } /** @docs-private */ declare class OuiOptgroupBase { } declare const _OuiOptgroupMixinBase: CanDisableCtor & typeof OuiOptgroupBase; /** * Component that is used to group instances of `oui-option`. */ declare class OuiOptgroup extends _OuiOptgroupMixinBase implements CanDisable { /** Label for the option group. */ label: string; /** Unique id for the underlying label. */ _labelId: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Event object emitted by OuiOption when selected or deselected. */ declare class OuiOptionSelectionChange { /** Reference to the option that emitted the event. */ source: OuiOption; /** Whether the change in the option's value was a result of a user action. */ isUserInput: boolean; constructor( /** Reference to the option that emitted the event. */ source: OuiOption, /** Whether the change in the option's value was a result of a user action. */ isUserInput?: boolean); } /** * Describes a parent component that manages a list of options. * Contains properties that the options can inherit. * * @docs-private */ interface OuiOptionParentComponent { multiple?: boolean; } /** * Injection token used to provide the parent component to options. */ declare const OUI_OPTION_PARENT_COMPONENT: InjectionToken; /** * Single option inside of a `` element. */ declare class OuiOption implements AfterViewChecked, OnDestroy { private _element; private _changeDetectorRef; protected elementRef: ElementRef; private _focusMonitor; private _ngZone; private _parent; readonly group: OuiOptgroup; private _selected; private _active; private _disabled; private _mostRecentViewValue; private _monitorSubscription; /** Whether the wrapping component is in multiple selection mode. */ get multiple(): boolean; /** Whether or not the option is currently selected. */ get selected(): boolean; /** The form value of the option. */ value: any; /** The unique ID of the option. */ id: string; /** Whether the option is disabled. */ get disabled(): any; set disabled(value: any); /** Event emitted when the option is selected or deselected. */ readonly onSelectionChange: EventEmitter; /** Emits when the state of the option changes and any parents have to be notified. */ readonly _stateChanges: Subject; constructor(); /** * Whether or not the option is currently active and ready to be selected. * An active option displays styles as if it is focused, but the * focus is actually retained somewhere else. This comes in handy * for components like autocomplete where focus must remain on the input. */ get active(): boolean; /** * The displayed value of the option. It is necessary to show the selected option in the * select's trigger. */ get viewValue(): string; /** * The displayed value of the option. It is necessary to show the selected option in the * select's trigger. */ get viewValueForSelect(): string; /** Selects the option. */ select(): void; /** Deselects the option. */ deselect(): void; /** Sets focus onto this option. */ focus(): void; /** * This method sets display styles on the option to make it appear * active. This is used by the ActiveDescendantKeyManager so key * events will display the proper options as active on arrow key events. */ setActiveStyles(): void; /** * This method removes display styles on the option that made it appear * active. This is used by the ActiveDescendantKeyManager so key * events will display the proper options as active on arrow key events. */ setInactiveStyles(): void; /** Gets the label to be used when determining whether the option should be focused. */ getLabel(): string; /** Ensures the option is selected when activated from the keyboard. */ _handleKeydown(event: KeyboardEvent): void; /** * `Selects the option while indicating the selection came from the user. Used to * determine if the select's view -> model callback should be invoked.` */ _selectViaInteraction(): void; /** Returns the correct tabindex for the option depending on disabled state. */ _getTabIndex(): string; /** Gets the host DOM element. */ _getHostElement(): HTMLElement; ngAfterViewChecked(): void; ngOnDestroy(): void; /** Emits the selection change event. */ private _emitSelectionChangeEvent; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Counts the amount of option group labels that precede the specified option. * * @param optionIndex Index of the option at which to start counting. * @param options Flat list of all of the options. * @param optionGroups Flat list of all of the option groups. * @docs-private */ declare function _countGroupLabelsBeforeOption(optionIndex: number, options: QueryList, optionGroups: QueryList): number; /** * Determines the position to which to scroll a panel in order for an option to be into view. * * @param optionIndex Index of the option to be scrolled into the view. * @param optionHeight Height of the options. * @param currentScrollPosition Current scroll position of the panel. * @param panelHeight Height of the panel. * @docs-private */ declare function _getOptionScrollPosition(optionIndex: number, optionHeight: number, currentScrollPosition: number, panelHeight: number, selectedOptionOffset?: number): number; /** * Possible states for a pseudo checkbox. * * @docs-private */ type OuiPseudoCheckboxState = 'unchecked' | 'checked'; /** * Component that shows a simplified checkbox without including any kind of "real" checkbox. * Meant to be used when the checkbox is purely decorative and a large number of them will be * included, such as for the options in a multi-select. Uses no SVGs or complex animations. * Note that theming is meant to be handled by the parent element, e.g. * `oui-primary .oui-pseudo-checkbox`. * * Note that this component will be completely invisible to screen-reader users. This is *not* * interchangeable with `` and should *not* be used if the user would directly * interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail * of more complex components that appropriately handle selected / checked state. * * @docs-private */ declare class OuiPseudoCheckbox implements OnDestroy { protected elementRef: ElementRef; private _focusMonitor; private _ngZone; _animationMode?: "NoopAnimations" | "BrowserAnimations"; /** Display state of the checkbox. */ state: OuiPseudoCheckboxState; /** Whether the checkbox is disabled. */ disabled: boolean; private _monitorSubscription; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OuiPseudoCheckboxModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class OuiOptionModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** Provider that defines how form controls behave with regards to displaying error messages. */ declare class ErrorStateMatcher { isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare const OUI_DATEPICKER_VALUE_ACCESSOR: any; declare const OUI_DATEPICKER_VALIDATORS: any; /** * An event used for datepicker input and change events. We don't always have access to a native * input or change event because the event may have been triggered by the user clicking on the * calendar popup. For consistency, we always use OuiDatepickerInputEvent instead. */ declare class OuiDatepickerInputEvent { /** Reference to the datepicker input component that emitted the event. */ target: OuiDatepickerInput; /** Reference to the native input element associated with the datepicker input. */ targetElement: HTMLElement; /** The new value for the target datepicker input. */ value: D | null; constructor( /** Reference to the datepicker input component that emitted the event. */ target: OuiDatepickerInput, /** Reference to the native input element associated with the datepicker input. */ targetElement: HTMLElement); } /** Directive used to connect an input to a OuiDatepicker. */ declare class OuiDatepickerInput implements ControlValueAccessor, OnDestroy, AfterViewInit, Validator { private _elementRef; _dateAdapter: DateAdapter; private _dateFormats; private _formField; private _disabled; /** Emits when a `change` event is fired on this ``. */ readonly dateChange: EventEmitter>; /** Emits when an `input` event is fired on this ``. */ readonly dateInput: EventEmitter>; /** Emits when the value changes (either due to user input or programmatic change). */ _valueChange: EventEmitter; /** Emits when the disabled state has changed */ _disabledChange: EventEmitter; private _datepickerSubscription; private _localeSubscription; /** Whether the last value set on the input was valid. */ private _lastValueValid; private _parentNodeClickSubscription; _datepickerDisabled: boolean; /** The datepicker that this input is associated with. */ set ouiDatepicker(value: OuiDatepicker); _datepicker: OuiDatepicker; /** Function that can be used to filter out dates within the datepicker. */ set ouiDatepickerFilter(value: (date: D | null) => boolean); _dateFilter: (date: D | null) => boolean; /** The value of the input. */ get value(): D | null; set value(value: D | null); private _value; /** The minimum valid date. */ get min(): D | null; set min(value: D | null); private _min; /** The maximum valid date. */ get max(): D | null; set max(value: D | null); private _max; focus(): void; blur(): void; /** Whether the datepicker-input is disabled. */ get disabled(): boolean; set disabled(value: boolean); _onTouched: () => void; private _cvaOnChange; private _validatorOnChange; /** The form control validator for whether the input parses. */ private _parseValidator; /** The form control validator for the min date. */ private _minValidator; /** The form control validator for the max date. */ private _maxValidator; /** The form control validator for the date filter. */ private _filterValidator; /** The combined form control validator for this input. */ private _validator; constructor(); ngOnDestroy(): void; ngAfterViewInit(): void; registerOnValidatorChange(fn: () => void): void; validate(c: AbstractControl): ValidationErrors | null; /** * @deprecated * @breaking-change 8.0.0 Use `getConnectedOverlayOrigin` instead */ getPopupConnectionElementRef(): ElementRef; /** * Gets the element that the datepicker popup should be connected to. * * @return The element to connect the popup to. */ getConnectedOverlayOrigin(): ElementRef; writeValue(value: D): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; _onKeydown(event: KeyboardEvent): void; _onInput(value: string): void; _onChange(): void; /** Returns the palette used by the input's form field, if any. */ _getThemePalette(): ThemePalette; /** Handles blur events on the input. */ _onBlur(): void; /** Formats a value and sets it on the input element. */ private _formatValue; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "input[ouiDatepicker]", ["ouiDatepickerInput"], { "ouiDatepicker": { "alias": "ouiDatepicker"; "required": false; }; "ouiDatepickerFilter": { "alias": "ouiDatepickerFilter"; "required": false; }; "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, false, never>; } /** Injection token that determines the scroll handling while the calendar is open. */ declare const OUI_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; declare function OUI_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy; declare const OUI_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: (typeof Overlay)[]; useFactory: typeof OUI_DATEPICKER_SCROLL_STRATEGY_FACTORY; }; declare class OuiDatepickerContentBase { _elementRef: ElementRef; constructor(_elementRef: ElementRef); } declare const _OuiDatepickerContentMixinBase: CanColorCtor & typeof OuiDatepickerContentBase; /** * Component used as the content for the datepicker dialog and popup. We use this instead of using * OuiCalendar directly as the content so we can control the initial focus. This also gives us a * place to put additional features of the popup that are not part of the calendar itself in the * future. (e.g. confirmation buttons). */ declare class OuiDatepickerContent extends _OuiDatepickerContentMixinBase implements AfterViewInit, CanColor { /** Reference to the internal calendar component. */ _calendar: OuiCalendar; /** Reference to the datepicker that created the overlay. */ datepicker: OuiDatepicker; /** Whether the datepicker is above or below the input. */ _isAbove: boolean; constructor(); ngAfterViewInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "oui-datepicker-content", ["ouiDatepickerContent"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, false, never>; } /** Component responsible for managing the datepicker popup/dialog. */ declare class OuiDatepicker implements OnDestroy, CanColor { private _dialog; private _overlay; private _ngZone; protected elementRef: ElementRef; private _focusMonitor; private _viewContainerRef; private _dateAdapter; private _dir; private _document; private _scrollStrategy; /** An input indicating the type of the custom header component for the calendar, if set. */ calendarHeaderComponent: ComponentType; /** The date to open the calendar to initially. */ get startAt(): D | null; set startAt(value: D | null); private _startAt; /** The view that the calendar should start in. */ startView: 'month' | 'year' | 'multi-year'; /** Color palette to use on the datepicker's calendar. */ get color(): ThemePalette; set color(value: ThemePalette); _color: ThemePalette; /** * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather * than a popup and elements have more padding to allow for bigger touch targets. */ get touchUi(): boolean; set touchUi(value: boolean); private _touchUi; /** Whether the datepicker pop-up should be disabled. */ get disabled(): boolean; set disabled(value: boolean); private _disabled; /** * Emits selected year in multiyear view. * This doesn't imply a change on the selected date. */ readonly yearSelected: EventEmitter; /** * Emits selected month in year view. * This doesn't imply a change on the selected date. */ readonly monthSelected: EventEmitter; /** Classes to be passed to the date picker panel. Supports the same syntax as `ngClass`. */ panelClass: string | string[]; /** Function that can be used to add custom CSS classes to dates. */ dateClass: (date: D) => OuiCalendarCellCssClasses; /** Emits when the datepicker has been opened. */ openedStream: EventEmitter; /** Emits when the datepicker has been closed. */ closedStream: EventEmitter; /** Whether the calendar is open. */ get opened(): boolean; set opened(value: boolean); private _opened; /** The id for the datepicker calendar. */ id: string; /** The currently selected date. */ get _selected(): D | null; set _selected(value: D | null); private _validSelected; /** The minimum selectable date. */ get _minDate(): D | null; /** The maximum selectable date. */ get _maxDate(): D | null; get _dateFilter(): (date: D | null) => boolean; /** A reference to the overlay when the calendar is opened as a popup. */ _popupRef: OverlayRef; /** A reference to the dialog when the calendar is opened as a dialog. */ private _dialogRef; /** A portal containing the calendar for this datepicker. */ private _calendarPortal; /** Reference to the component instantiated in popup mode. */ private _popupComponentRef; /** The element that was focused before the datepicker was opened. */ private _focusedElementBeforeOpen; /** Subscription to value changes in the associated input element. */ private _inputSubscription; /** The input element this datepicker is associated with. */ _datepickerInput: OuiDatepickerInput; /** Emits when the datepicker is disabled. */ readonly _disabledChange: Subject; /** Emits new selected date when selected date changes. */ readonly _selectedChanged: Subject; private _monitorSubscription; constructor(); ngOnDestroy(): void; /** Selects the given date */ select(date: D): void; /** Emits the selected year in multiyear view */ _selectYear(normalizedYear: D): void; /** Emits selected month in year view */ _selectMonth(normalizedMonth: D): void; /** * Register an input with this datepicker. * * @param input The datepicker input to register with this datepicker. */ _registerInput(input: OuiDatepickerInput): void; /** Open the calendar. */ open(): void; /** Close the calendar. */ close(): void; /** Open the calendar as a dialog. */ private _openAsDialog; /** Open the calendar as a popup. */ private _openAsPopup; /** Create the popup. */ private _createPopup; /** Create the popup PositionStrategy. */ private _createPopupPositionStrategy; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; /** Passes the current theme color along to the calendar overlay. */ private _setColor; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "oui-datepicker", ["ouiDatepicker"], { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, false, never>; } type OuiDateFormats = { parse: { dateInput: any; }; display: { dateInput: any; monthYearLabel: any; dateA11yLabel: any; monthYearA11yLabel: any; }; }; declare const OUI_DATE_FORMATS: InjectionToken; /** * Animations used by the datepicker. */ declare const ouiDatepickerAnimations: { readonly transformPanel: AnimationTriggerMetadata; readonly fadeInCalendar: AnimationTriggerMetadata; }; /** Datepicker data that requires internationalization. */ declare class OuiDatepickerIntl { /** * Stream that emits whenever the labels here are changed. Use this to notify * components if the labels have changed after initialization. */ readonly changes: Subject; /** A label for the calendar popup (used by screen readers). */ calendarLabel: string; /** A label for the button used to open the calendar popup (used by screen readers). */ openCalendarLabel: string; /** A label for the previous month button (used by screen readers). */ prevMonthLabel: string; /** A label for the next month button (used by screen readers). */ nextMonthLabel: string; /** A label for the previous year button (used by screen readers). */ prevYearLabel: string; /** A label for the next year button (used by screen readers). */ nextYearLabel: string; /** A label for the previous multi-year button (used by screen readers). */ prevMultiYearLabel: string; /** A label for the next multi-year button (used by screen readers). */ nextMultiYearLabel: string; /** A label for the 'switch to month view' button (used by screen readers). */ switchToMonthViewLabel: string; /** A label for the 'switch to year view' button (used by screen readers). */ switchToMultiYearViewLabel: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** @docs-private */ interface CanProgress { /** progress texts */ progress: string[] | string; setToProgress: Function; setToDone: Function; setToDefault: Function; } /** @docs-private */ type CanProgressCtor = Constructor; /** @docs-private */ declare class OuiButtonBase { _elementRef: ElementRef; _cdr: ChangeDetectorRef; } declare const OuiButtonMixinBase: CanDisableCtor & CanColorCtor & CanProgressCtor & typeof OuiButtonBase; /** * Once Ui button. */ declare class OuiButton extends OuiButtonMixinBase implements OnDestroy, CanDisable, CanColor, CanProgress { protected elementRef: ElementRef; private _focusMonitor; private _ngZone; private _monitorSubscription; constructor(); protected addClass(): void; ngOnDestroy(): void; /** Focuses the button. */ focus(): void; getHostElement(): HTMLElement; /** Gets whether the button has one of the given attributes. */ hasHostAttributes(...attributes: string[]): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Once UI anchor. */ declare class OuiAnchor extends OuiButton { /** Tabindex of the button. */ tabIndex: number; constructor(); _haltDisabledEvents(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Can be used to override the icon of a `ouiDatepickerToggle`. */ declare class OuiDatepickerToggleIcon { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class OuiDatepickerToggle implements AfterContentInit, OnChanges, OnDestroy { _intl: OuiDatepickerIntl; private _changeDetectorRef; private _stateChanges; /** Datepicker instance that the button will toggle. */ datepicker: OuiDatepicker; /** Tabindex for the toggle. */ tabIndex: number | null; /** Whether the toggle button is disabled. */ get disabled(): boolean; set disabled(value: boolean); private _disabled; /** Custom icon set by the consumer. */ _customIcon: OuiDatepickerToggleIcon; /** Underlying button element. */ _button: OuiButton; constructor(); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; ngAfterContentInit(): void; _open(event: Event): void; private _watchStateChanges; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "oui-datepicker-toggle", ["ouiDatepickerToggle"], { "datepicker": { "alias": "for"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["_customIcon"], ["[ouiDatepickerToggleIcon]"], false, never>; } declare class OuiButtonModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** Possible overrides for a dialog's position. */ interface DialogPosition { /** Override for the dialog's top position. */ top?: string; /** Override for the dialog's bottom position. */ bottom?: string; /** Override for the dialog's left position. */ left?: string; /** Override for the dialog's right position. */ right?: string; } /** * Configuration for opening a modal dialog with the OuiDialog service. */ declare class OuiDialogConfig { /** * Where the attached component should live in Angular's *logical* component tree. * This affects what is available for injection and the change detection order for the * component instantiated inside of the dialog. This does not affect where the dialog * content will be rendered. */ viewContainerRef?: ViewContainerRef; /** ID for the dialog. If omitted, a unique one will be generated. */ id?: string; /** The ARIA role of the dialog element. */ role?: string; /** Custom class for the overlay pane. */ panelClass?: string | string[]; /** Whether the dialog has a backdrop. */ hasBackdrop?: boolean; /** Custom class for the backdrop, */ backdropClass?: string; /** Whether the user can use escape or clicking on the backdrop to close the modal. */ disableClose?: boolean; /** Width of the dialog. */ width?: string; /** Height of the dialog. */ height?: string; /** Min-width of the dialog. If a number is provided, pixel units are assumed. */ minWidth?: number | string; /** Min-height of the dialog. If a number is provided, pixel units are assumed. */ minHeight?: number | string; /** Max-width of the dialog. If a number is provided, pixel units are assumed. Defaults to 80vw */ maxWidth?: number | string; /** Max-height of the dialog. If a number is provided, pixel units are assumed. */ maxHeight?: number | string; /** Position overrides. */ position?: DialogPosition; /** Data being injected into the child component. */ data?: D | null; /** Layout direction for the dialog's content. */ direction?: Direction; /** ID of the element that describes the dialog. */ ariaDescribedBy?: string | null; /** Aria label to assign to the dialog element */ ariaLabel?: string | null; /** Whether the dialog should focus the first focusable element on open. */ autoFocus?: boolean; /** * Whether the dialog should restore focus to the * previously-focused element, after it's closed. */ restoreFocus?: boolean; /** Scroll strategy to be used for the dialog. */ scrollStrategy?: ScrollStrategy; } /** * Throws an exception for the case when a ComponentPortal is * attached to a DomPortalOutlet without an origin. * * @docs-private */ declare function throwOuiDialogContentAlreadyAttachedError(): void; /** * Internal component that wraps user-provided dialog content. * * @docs-private */ declare class OuiDialogContainer extends BasePortalOutlet implements OnInit { private _focusTrapFactory; _config: OuiDialogConfig; elementRef: ElementRef; private _document; /** The portal outlet inside of this container into which the dialog content will be loaded. */ _portalOutlet: CdkPortalOutlet; /** The class that traps and manages focus within the dialog. */ private _focusTrap; /** Element that was focused before the dialog was opened. Save this to restore upon close. */ private _elementFocusedBeforeDialogWasOpened; /** ID of the element that should be considered as the dialog's label. */ _ariaLabelledBy: string | null; /** ID for the container DOM element. */ _id: string; constructor(); ngOnInit(): void; private _addMarginForDefaultScroll; /** * Attach a ComponentPortal as content to this dialog container. * * @param portal Portal to be attached as the dialog content. */ attachComponentPortal(portal: ComponentPortal): ComponentRef; /** * Attach a TemplatePortal as content to this dialog container. * * @param portal Portal to be attached as the dialog content. */ attachTemplatePortal(portal: TemplatePortal): EmbeddedViewRef; /** Moves the focus inside the focus trap. */ _trapFocus(): void; /** Restores focus to the element that was focused before the dialog opened. */ _restoreFocus(): void; /** * Dynamically adds or removes focus from the dialog container. * * @param addFocus Whether to add focus (true) or remove focus (false). */ _toggleFocus(addFocus: boolean): void; /** * Setting up the focus trap and saves a reference to the element that was focused before the dialog was open. */ private _addFocusTrap; /** Only return when there is focus inside the dialog */ private _containsFocus; /** * Removes the focus trap from the dialog. * This method is called to clean up resources and ensure the dialog no longer traps focus. */ private _removeFocusTrap; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Reference to a dialog opened via the OuiDialog service. */ declare class OuiDialogRef { private _overlayRef; _containerInstance: OuiDialogContainer; readonly id: string; /** The instance of component opened into the dialog. */ componentInstance: T; /** Whether the user is allowed to close the dialog. */ disableClose: boolean | undefined; /** Subject for notifying the user that the dialog has finished opening. */ private readonly _afterOpened; /** Subject for notifying the user that the dialog has finished closing. */ private readonly _afterClosed; /** Subject for notifying the user that the dialog has started closing. */ private readonly _beforeClosed; /** Result to be passed to afterClosed. */ private _result; private _dialogConfig; get dialogConfig(): OuiDialogConfig; set dialogConfig(config: OuiDialogConfig); constructor(_overlayRef: OverlayRef, _containerInstance: OuiDialogContainer, id?: string); /** * Close the dialog. * * @param dialogResult Optional result to return to the dialog opener. */ close(dialogResult?: R): void; /** * Dynamically adds or removes focus from all open dialog containers. * * @param addFocus Whether to add focus (true) or remove focus (false). */ toggleFocus(addFocus: boolean): void; /** * Gets an observable that is notified when the dialog is finished opening. */ afterOpened(): Observable; /** * Gets an observable that is notified when the dialog is finished closing. */ afterClosed(): Observable; /** * Gets an observable that is notified when the dialog has started closing. */ beforeClosed(): Observable; /** * Gets an observable that emits when the overlay's backdrop has been clicked. */ backdropClick(): Observable; /** * Gets an observable that emits when keydown events are targeted on the overlay. */ keydownEvents(): Observable; /** * Updates the dialog's position. * * @param position New dialog position. */ updatePosition(position?: DialogPosition): this; /** * Updates the dialog's width and height. * * @param width New width of the dialog. * @param height New height of the dialog. */ updateSize(width?: string, height?: string): this; /** Fetches the position strategy object from the overlay ref. */ private _getPositionStrategy; } /** * Header section of ui. */ declare class OuiDialogHeader { constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Header Title of ui. */ declare class OuiDialogHeaderTitle { constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Header Image of ui. */ declare class OuiDialogHeaderImage { constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Header action area of dialog. */ declare class OuiDialogHeaderAction { constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * header action article. */ declare class OuiDialogHeaderArticle implements OnDestroy { private ouiIconRegistry; private domSanitizer; protected elementRef: ElementRef; private _focusMonitor; private _ngZone; private _monitorSubscription; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * header action article. */ declare class OuiDialogHeaderVideo implements OnDestroy { private ouiIconRegistry; private domSanitizer; protected elementRef: ElementRef; private _focusMonitor; private _ngZone; private _monitorSubscription; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * header action close */ declare class OuiDialogHeaderClose implements OnDestroy { private ouiIconRegistry; private domSanitizer; protected elementRef: ElementRef; private _focusMonitor; private _ngZone; private _monitorSubscription; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * header action separator close */ declare class OuiDialogHeaderSeparator { constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * directive for close the current dialog. */ declare class OuiDialogClose implements OnInit, OnChanges { dialogRef: OuiDialogRef; private _elementRef; private _dialog; /** Screenreader label for the button. */ ariaLabel: string; /** Dialog close input. */ dialogResult: any; _ouiDialogClose: any; constructor(); /** Ensures the option is selected when activated from the keyboard. */ handleKeydown(event: KeyboardEvent): void; closeDialog(): void; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Content section of dialog. */ declare class OuiDialogContent implements OnInit { dialogRef: OuiDialogRef; private _elementRef; private _dialog; constructor(); ngOnInit(): void; private _setContentHeight; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Content section of dialog. */ declare class OuiDialogFooter { id: string; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * footer action left */ declare class OuiDialogFooterActionLeft { constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * footer action right */ declare class OuiDialogFooterActionRight { constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** @docs-private */ declare class OuiIconBase { _elementRef: ElementRef; constructor(_elementRef: ElementRef); } declare const OuiIconMixinBase: CanColorCtor & typeof OuiIconBase; /** * Injection token used to provide the current location to `OuiIcon`. * Used to handle server-side rendering and to stub out during unit tests. * * @docs-private */ declare const OUI_ICON_LOCATION: InjectionToken; /** * Stubbed out location for `OuiIcon`. * * @docs-private */ interface OuiIconLocation { getPathname: () => string; } /** @docs-private */ declare function OUI_ICON_LOCATION_FACTORY(): OuiIconLocation; /** * oui-icon makes it easier to use vector-based icons in your app. This directive supports only SVG icons. * To associate a name with an icon URL, use the addSvgIcon. The methods of OuiIconRegistry. After registering an icon, it * can be displayed by setting the svgIcon input. For an icon in the default namespace, use the name directly. * Component to display an icon. It can be used in the following ways: * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the addSvgIcon, addSvgIconSet. * Examples: * * - Use a font ligature as an icon by putting the ligature text in the content of the component. * Example: home sun */ declare class Icon extends OuiIconMixinBase implements OnInit, CanColor { private _iconRegistry; _elementRef: ElementRef; titleCasePipe: TitleCasePipe; /** * Whether the icon should be inlined, automatically sizing the icon to match the font size of * the element the icon is contained in. */ get inline(): boolean; set inline(inline: boolean); private _inline; /** * Implemented as part of CanColor. */ color: any; /** Name of the icon in the SVG icon set. */ svgIcon: string; /** User will be able to supply a size property for overriding the size. */ size: number; constructor(); ngOnInit(): void; private _setSvgElement; private _clearSvgElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OuiIconModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class OuiDialogModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class NativeDateModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class OuiNativeDateModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class OuiDatepickerModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** Injection token that can be used to access the data that was passed in to a dialog. */ declare const OUI_DIALOG_DATA: InjectionToken; /** Injection token that can be used to specify default dialog options. */ declare const OUI_DIALOG_DEFAULT_OPTIONS: InjectionToken>; /** Injection token that determines the scroll handling while the dialog is open. */ declare const OUI_DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** @docs-private */ declare function OUI_DIALOG_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy; /** @docs-private */ declare function OUI_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy; /** @docs-private */ declare const OUI_DIALOG_SCROLL_STRATEGY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: (typeof Overlay)[]; useFactory: typeof OUI_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY; }; /** * Service to open Once UI Design modal dialogs. */ declare class OuiDialog implements OnDestroy { private _overlay; private _injector; private _defaultOptions; private _parentDialog; private _overlayContainer; private _openDialogsAtThisLevel; private readonly _afterAllClosedAtThisLevel; private readonly _afterOpenedAtThisLevel; private _ariaHiddenElements; private _dialogCloseSubscription; /** Keeps track of the currently-open dialogs. */ get openDialogs(): OuiDialogRef[]; /** Stream that emits when a dialog has been opened. */ get afterOpened(): Subject>; get _afterAllClosed(): Subject; /** * Stream that emits when all open dialog have finished closing. * Will emit on subscribe if there are no open dialogs to begin with. */ readonly afterAllClosed: Observable; constructor(); /** * Opens a modal dialog containing the given component. * * @param componentOrTemplateRef Type of the component to load into the dialog, * or a TemplateRef to instantiate as the dialog content. * @param config Extra configuration options. * @returns Reference to the newly-opened dialog. */ open(componentOrTemplateRef: ComponentType | TemplateRef, config?: OuiDialogConfig): OuiDialogRef; /** * Closes all of the currently-open dialogs. */ closeAll(): void; /** * Finds an open dialog by its id. * * @param id ID to use when looking up the dialog. */ getDialogById(id: string): OuiDialogRef | undefined; ngOnDestroy(): void; /** * Creates the overlay into which the dialog will be loaded. * * @param config The dialog configuration. * @returns A promise resolving to the OverlayRef for the created overlay. */ private _createOverlay; /** * Creates an overlay config from a dialog config. * * @param dialogConfig The dialog configuration. * @returns The overlay configuration. */ private _getOverlayConfig; /** * Attaches an OuiDialogContainer to a dialog's already-created overlay. * * @param overlay Reference to the dialog's underlying overlay. * @param config The dialog configuration. * @returns A promise resolving to a ComponentRef for the attached container. */ private _attachDialogContainer; /** * Attaches the user-provided component to the already-created OuiDialogContainer. * * @param componentOrTemplateRef The type of component being loaded into the dialog, * or a TemplateRef to instantiate as the content. * @param dialogContainer Reference to the wrapping OuiDialogContainer. * @param overlayRef Reference to the overlay in which the dialog resides. * @param config The dialog configuration. * @returns A promise resolving to the OuiDialogRef that should be returned to the user. */ private _attachDialogContent; /** * Creates a custom injector to be used inside the dialog. This allows a component loaded inside * of a dialog to close itself and, optionally, to return a value. * * @param config Config object that is used to construct the dialog. * @param dialogRef Reference to the dialog. * @param container Dialog container element that wraps all of the contents. * @returns The custom injector that can be used inside the dialog. */ private _createInjector; /** * Removes a dialog from the array of open dialogs. * * @param dialogRef Dialog to be removed. */ private _removeOpenDialog; /** * Hides all of the content that isn't an overlay from assistive technology. */ private _hideNonDialogContentFromAssistiveTechnology; /** Closes all of the dialogs in an array. */ private _closeDialogs; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Returns an exception to be thrown in the case when attempting to * load an icon with a name that cannot be found. * * @docs-private */ declare function getOuiIconNameNotFoundError(iconName: string): Error; /** * Returns an exception to be thrown when the consumer attempts to use * `` without including @angular/http. * * @docs-private */ declare function getOuiIconNoHttpProviderError(): Error; /** * Returns an exception to be thrown when a URL couldn't be sanitized. * * @param url URL that was attempted to be sanitized. * @docs-private */ declare function getOuiIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error; /** * Returns an exception to be thrown when a HTML string couldn't be sanitized. * * @param literal HTML that was attempted to be sanitized. * @docs-private */ declare function getOuiIconFailedToSanitizeLiteralError(literal: SafeHtml): Error; /** * Service to register and display icons used by the `` component. * - Registers icon URLs by namespace and name. * - Registers icon set URLs by namespace. * - Loads icons from URLs and extracts individual icons from icon sets. */ declare class OuiIconRegistry { private _httpClient; private _sanitizer; private _document; /** * URLs and cached SVG elements for individual icons. Keys are of the format */ private _svgIconConfigs; /** * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace. * Multiple icon sets can be registered under the same namespace. */ private _iconSetConfigs; /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */ private _inProgressUrlFetches; constructor(); /** * Registers an icon by URL in the default namespace. * * @param iconName Name under which the icon should be registered. * @param url */ addSvgIcon(iconName: string, url: SafeResourceUrl): this; /** * Registers an icon using an HTML string in the default namespace. * * @param iconName Name under which the icon should be registered. * @param literal SVG source of the icon. */ addSvgIconLiteral(iconName: string, literal: SafeHtml): this; /** * Registers an icon set by URL in the default namespace. * * @param url */ addSvgIconSet(url: SafeResourceUrl): this; /** * Returns an Observable that produces the icon (as an `` DOM element) with the given name * and namespace. The icon must have been previously registered with addIcon or addIconSet; * if not, the Observable will throw an error. * * @param name * @param namespace */ getNamedSvgIcon(name: string, namespace?: string): Observable; /** * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not. */ private _getSvgFromConfig; /** * Attempts to find an icon with the specified name in any of the SVG icon sets. * First searches the available cached icons for a nested element with a matching name, and * if found copies the element to a new `` element. If not found, fetches all icon sets * that have not been cached, and searches again after all fetches are completed. * The returned Observable produces the SVG element if possible, and throws * an error if no icon with the specified name can be found. */ private _getSvgFromIconSetConfigs; /** * Searches the cached SVG elements for the given icon sets for a nested icon element whose "id" * tag matches the specified name. If found, copies the nested element to a new SVG element and * returns it. Returns null if no matching element is found. */ private _extractIconWithNameFromAnySet; /** * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element * from it. */ private _loadSvgIconFromConfig; /** * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element * from it. */ private _loadSvgIconSetFromConfig; /** * Creates a DOM element from the given SVG string, and adds default attributes. */ private _createSvgElementForSingleIcon; /** * Searches the cached element of the given SvgIconConfig for a nested icon element whose "id" * tag matches the specified name. If found, copies the nested element to a new SVG element and * returns it. Returns null if no matching element is found. */ private _extractSvgIconFromSet; /** * Creates a DOM element from the given SVG string. */ private _svgElementFromString; /** * Converts an element into an SVG node by cloning all of its children. */ private _toSvgElement; /** * Sets the default attributes for an SVG element to be used as an icon. */ private _setSvgAttributes; /** * Returns an Observable which produces the string contents of the given URL. Results may be * cached, so future calls with the same URL may not cause another HTTP request. */ private _fetchUrl; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type PublicApi = { [K in keyof T]: T[K] extends (...x: any[]) => T ? (...x: any[]) => PublicApi : T[K]; }; /** * A null icon registry that must be imported to allow disabling of custom icons */ declare class FakeOuiIconRegistry implements PublicApi { addSvgIcon(): this; addSvgIconLiteral(): this; addSvgIconSet(): this; getNamedSvgIcon(): Observable; private _generateEmptySvg; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** Use this module to install the null icon registry. */ declare class OuiIconTestingModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** Event object that is emitted when an autocomplete option is selected. */ declare class OuiAutocompleteSelectedEvent { /** Reference to the autocomplete panel that emitted the event. */ source: OuiAutocomplete; /** Option that was selected. */ option: OuiOption; constructor( /** Reference to the autocomplete panel that emitted the event. */ source: OuiAutocomplete, /** Option that was selected. */ option: OuiOption); } /** Default `oui-autocomplete` options that can be overridden. */ interface OuiAutocompleteDefaultOptions { /** Whether the first option should be highlighted when an autocomplete panel is opened. */ autoActiveFirstOption?: boolean; } /** Injection token to be used to override the default options for `oui-autocomplete`. */ declare const OUI_AUTOCOMPLETE_DEFAULT_OPTIONS: InjectionToken; /** @docs-private */ declare function OUI_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): OuiAutocompleteDefaultOptions; declare class OuiAutocomplete implements AfterContentInit { private _changeDetectorRef; private _elementRef; /** Manages active item in option list based on key events. */ _keyManager: ActiveDescendantKeyManager; /** Whether the autocomplete panel should be visible, depending on option length. */ showPanel: boolean; /** Whether the autocomplete panel is open. */ get isOpen(): boolean; _isOpen: boolean; /** @docs-private */ template: TemplateRef; /** Element for the panel containing the autocomplete options. */ panel: ElementRef; /** @docs-private */ options: QueryList; /** @docs-private */ optionGroups: QueryList; /** Function that maps an option's control value to its display value in the trigger. */ displayWith: ((value: any) => string) | null; /** * Whether the first option should be highlighted when the autocomplete panel is opened. * Can be configured globally through the `OUI_AUTOCOMPLETE_DEFAULT_OPTIONS` token. */ get autoActiveFirstOption(): boolean; set autoActiveFirstOption(value: boolean); private _autoActiveFirstOption; /** * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will * match the width of its host. */ panelWidth: string | number; /** Event that is emitted whenever an option from the list is selected. */ readonly optionSelected: EventEmitter; /** Event that is emitted when the autocomplete panel is opened. */ readonly opened: EventEmitter; /** Event that is emitted when the autocomplete panel is closed. */ readonly closed: EventEmitter; /** * Takes classes set on the host oui-autocomplete element and applies them to the panel * inside the overlay container to allow for easy styling. */ set classList(value: string); _classList: { [key: string]: boolean; }; /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */ id: string; constructor(); ngAfterContentInit(): void; /** * Sets the panel scrollTop. This allows us to manually scroll to display options * above or below the fold, as they are not actually being focused when active. */ _setScrollTop(scrollTop: number): void; /** Returns the panel's scrollTop. */ _getScrollTop(): number; /** Panel should hide itself when the option list is empty. */ _setVisibility(): void; /** Emits the `select` event. */ _emitSelectEvent(option: OuiOption): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Directive applied to an element to make it usable * as a connection point for an autocomplete panel. */ declare class OuiAutocompleteOrigin { elementRef: ElementRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * The following style constants are necessary to save here in order * to properly calculate the scrollTop of the panel. Because we are not * actually focusing the active item, scroll must be handled manually. */ /** The height of each autocomplete option. */ declare const AUTOCOMPLETE_OPTION_HEIGHT = 48; /** The total height of the autocomplete panel. */ declare const AUTOCOMPLETE_PANEL_HEIGHT = 256; /** Injection token that determines the scroll handling while the autocomplete panel is open. */ declare const OUI_AUTOCOMPLETE_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** @docs-private */ declare function OUI_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy; /** @docs-private */ declare const OUI_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: (typeof Overlay)[]; useFactory: typeof OUI_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY; }; /** * Provider that allows the autocomplete to register as a ControlValueAccessor. * * @docs-private */ declare const OUI_AUTOCOMPLETE_VALUE_ACCESSOR: any; /** * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel. * * @docs-private */ declare function getOuiAutocompleteMissingPanelError(): Error; declare class OuiAutocompleteTrigger implements ControlValueAccessor, OnDestroy { private _element; private _overlay; private _viewContainerRef; private _zone; private _changeDetectorRef; private _formField; private _document; private _viewportRuler; private _overlayRef; private _portal; private _componentDestroyed; private _autocompleteDisabled; private _scrollStrategy; /** Old value of the native input. Used to work around issues with the `input` event on IE. */ private _previousValue; /** Strategy that is used to position the panel. */ private _positionStrategy; /** The subscription for closing actions (some are bound to document). */ private _closingActionsSubscription; /** Subscription to viewport size changes. */ private _viewportSubscription; /** * Whether the autocomplete can open the next time it is focused. Used to prevent a focused, * closed autocomplete from being reopened if the user switches to another browser tab and then * comes back. */ private _canOpenOnNextFocus; /** Stream of keyboard events that can close the panel. */ private readonly _closeKeyEventStream; private _overlayAttached; /** Stream of autocomplete option selections. */ readonly optionSelections: Observable; /** The autocomplete panel to be attached to this trigger. */ autocomplete: OuiAutocomplete; /** * Reference relative to which to position the autocomplete panel. * Defaults to the autocomplete trigger element. */ connectedTo: OuiAutocompleteOrigin; /** * `autocomplete` attribute to be set on the input element. * * @docs-private */ autocompleteAttribute: string; /** * Event handler for when the window is blurred. Needs to be an * arrow function in order to preserve the context. */ private _windowBlurHandler; /** `View -> model callback called when value changes` */ _onChange: (value: any) => void; /** `View -> model callback called when autocomplete has been touched` */ _onTouched: () => void; /** * Whether the autocomplete is disabled. When disabled, the element will * act as a regular input and the user won't be able to open the panel. */ get autocompleteDisabled(): boolean; set autocompleteDisabled(value: boolean); constructor(); ngOnDestroy(): void; /** Whether or not the autocomplete panel is open. */ get panelOpen(): boolean; /** Opens the autocomplete suggestion panel. */ openPanel(): void; /** Closes the autocomplete suggestion panel. */ closePanel(): void; /** * Updates the position of the autocomplete suggestion panel to ensure that it fits all options * within the viewport. */ updatePosition(): void; /** * A stream of actions that should close the autocomplete panel, including * when an option is selected, on blur, and when TAB is pressed. */ get panelClosingActions(): Observable; /** The currently active option, coerced to OuiOption type. */ get activeOption(): OuiOption | null; /** Stream of clicks outside of the autocomplete panel. */ private _getOutsideClickStream; writeValue(value: any): void; registerOnChange(fn: (value: any) => {}): void; registerOnTouched(fn: () => {}): void; setDisabledState(isDisabled: boolean): void; _handleKeydown(event: KeyboardEvent): void; _handleInput(event: KeyboardEvent): void; _handleFocus(): void; /** * Given that we are not actually focusing active options, we must manually adjust scroll * to reveal options below the fold. First, we find the offset of the option from the top * of the panel. If that offset is below the fold, the new scrollTop will be the offset - * the panel height + the option height, so the active option will be just visible at the * bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop * will become the offset. If that offset is visible within the panel already, the scrollTop is * not adjusted. */ private _scrollToOption; /** * This method listens to a stream of panel closing actions and resets the * stream every time the option list changes. */ private _subscribeToClosingActions; /** Destroys the autocomplete suggestion panel. */ private _destroyPanel; private _setTriggerValue; /** * This method closes the panel, and if a value is specified, also sets the associated * control to that value. It will also mark the control as dirty if this interaction * stemmed from the user. */ private _setValueAndClose; /** * Clear any previous selected option and emit a selection change event for this option */ private _clearPreviousSelectedOption; private _attachOverlay; private _getOverlayConfig; private _getOverlayPosition; private _getConnectedElement; private _getPanelWidth; /** Returns the width of the input element, so the panel width can match it. */ private _getHostWidth; /** * Resets the active item to -1 so arrow events will activate the * correct options, or to 0 if the consumer opted into it. */ private _resetActiveItem; /** Determines whether the panel can be opened. */ private _canOpen; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class OuiAutocompleteModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** An interface which allows a control to work inside of a `OuiFormField`. */ declare abstract class OuiFormFieldControl { /** The value of the control. */ value: T | null; /** * Stream that emits whenever the state of the control changes such that the parent `OuiFormField` * needs to run change detection. */ readonly stateChanges: Observable; /** The element ID for this control. */ readonly id: string; /** The placeholder for this control. */ readonly placeholder: string; /** Gets the NgControl for this control. */ readonly ngControl: NgControl | null; /** Whether the control is focused. */ readonly focused: boolean; /** Whether the control is empty. */ readonly empty: boolean; /** Whether the `OuiFormField` label should try to float. */ readonly shouldLabelFloat: boolean; /** Whether the control is required. */ readonly required: boolean; /** Whether the control is disabled. */ readonly disabled: boolean; /** Whether the control is in an error state. */ readonly errorState: boolean; /** * An optional name for the control type that can be used to distinguish `oui-form-field` elements * based on their control type. The form field will add a class, * `oui-form-field-type-{{controlType}}` to its root element. */ readonly controlType?: string; /** * Whether the input is currently in an autofilled state. If property is not present on the * control it is assumed to be false. */ readonly autofilled?: boolean; /** Sets the list of element IDs that currently describe this control. */ abstract setDescribedByIds(ids: string[]): void; /** Handles a click on the control's container. */ abstract onContainerClick(event: MouseEvent): void; } /** * Boilerplate for applying mixins to OuiFormField. * * @docs-private */ declare class OuiFormFieldBase { _elementRef: ElementRef; constructor(_elementRef: ElementRef); } /** * Base class to which we're applying the form field mixins. * * @docs-private */ declare const _OuiFormFieldMixinBase: typeof OuiFormFieldBase; /** Possible appearance styles for the form field. */ type OuiFormFieldAppearance = 'standard' | 'underline'; /** * Represents the default options form the form field that can be configured * using the `OUI_FORM_FIELD_DEFAULT_OPTIONS` injection token. */ interface OuiFormFieldDefaultOptions { appearance?: OuiFormFieldAppearance; } /** * Injection token that can be used to configure the * default options for all form field within an app. */ declare const OUI_FORM_FIELD_DEFAULT_OPTIONS: InjectionToken; /** Container for form controls that applies Oncehub Design styling and behavior. */ declare class OuiFormField extends _OuiFormFieldMixinBase implements AfterContentInit, AfterContentChecked, OnDestroy { _elementRef: ElementRef; private _changeDetectorRef; private _defaults; private _destroyed; color: ThemePalette; /** The form-field appearance style. */ get appearance(): OuiFormFieldAppearance; set appearance(value: OuiFormFieldAppearance); _appearance: OuiFormFieldAppearance; _connectionContainerRef: ElementRef; _inputContainerRef: ElementRef; _control: OuiFormFieldControl; constructor(); ngAfterContentInit(): void; getConnectedOverlayOrigin(): ElementRef; ngAfterContentChecked(): void; ngOnDestroy(): void; /** Throws an error if the form field's control is missing. */ protected _validateControlChild(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Single error message to be shown underneath the form field. */ declare class OuiError { id: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class OuiFormFieldModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** @docs-private */ declare class OuiInputErrorBase { _defaultErrorStateMatcher: ErrorStateMatcher$1; _parentForm: NgForm; _parentFormGroup: FormGroupDirective; /** @docs-private */ ngControl: NgControl; constructor(_defaultErrorStateMatcher: ErrorStateMatcher$1, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, /** @docs-private */ ngControl: NgControl); } declare const _OuiInputErrorMixinBase: CanUpdateErrorStateCtor & typeof OuiInputErrorBase; declare class OuiInputBase extends _OuiInputErrorMixinBase { _elementRef: ElementRef; _defaultErrorStateMatcher: ErrorStateMatcher$1; _parentForm: NgForm; _parentFormGroup: FormGroupDirective; /** @docs-private */ ngControl: NgControl; constructor(_elementRef: ElementRef, _defaultErrorStateMatcher: ErrorStateMatcher$1, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, /** @docs-private */ ngControl: NgControl); } declare const _OuiInputMixinBase: typeof OuiInputBase; /** Directive that allows a native input to work inside a `OuiFormField`. */ declare class OuiInput extends _OuiInputMixinBase implements OuiFormFieldControl, OnChanges, OnDestroy, OnInit, CanColor { _elementRef: ElementRef; protected _platform: Platform; ngControl: NgControl; private _autofillMonitor; _parentForm: NgForm; _parentFormGroup: FormGroupDirective /** @docs-private */; protected _uid: string; protected _previousNativeValue: any; private _inputValueAccessor; /** * Implemented as part of CanColor. */ color: any; /** * Implemented as part of CanUpdateErrorState. * * @docs-private */ errorState: boolean; /** The aria-describedby attribute on the input for improved a11y. */ _ariaDescribedby: string; /** Whether the component is being rendered on the server. */ _isServer: boolean; /** Whether the component is a native html select. */ _isNativeSelect: boolean; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ focused: boolean; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ readonly stateChanges: Subject; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ controlType: string; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ autofilled: boolean; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ get disabled(): boolean; set disabled(value: boolean); protected _disabled: boolean; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ get id(): string; set id(value: string); protected _id: string; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ placeholder: string; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ get required(): boolean; set required(value: boolean); protected _required: boolean; /** Input type of the element. */ get type(): string; set type(value: string); protected _type: string; /** An object used to control when error messages are shown. */ errorStateMatcher: ErrorStateMatcher$1; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ get value(): string; set value(value: string); /** Whether the element is readonly. */ get readonly(): boolean; set readonly(value: boolean); private _readonly; /** Whether the browser's spellcheck is enabled for the element. */ get spellcheck(): boolean; set spellcheck(value: boolean); private _spellcheck; protected _neverEmptyInputTypes: string[]; constructor(); ngOnInit(): void; ngOnChanges(): void; ngOnDestroy(): void; /** Focuses the input. */ focus(): void; _onInput(): void; /** Getting native host element */ getHostElement(): HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement; /** Gets whether the button has one of the given attributes. */ hasHostAttributes(...attributes: string[]): boolean; updateErrorState(): void; /** Adding class dynamically based of type */ protected addClass(): void; /** Does some manual dirty checking on the native input `value` property. */ protected _dirtyCheckNativeValue(): void; /** Make sure the input is a supported type. */ protected _validateType(): void; /** Checks whether the input type is one of the types that are never empty. */ protected _isNeverEmpty(): boolean; /** Checks whether the input is invalid based on the native validation. */ protected _isBadInput(): boolean; /** Determines if the component host is a textarea. */ protected _isTextarea(): boolean; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ get empty(): boolean; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ get shouldLabelFloat(): boolean; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ setDescribedByIds(ids: string[]): void; /** * Implemented as part of OuiFormFieldControl. * * @docs-private */ onContainerClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** @docs-private */ declare function getOuiInputUnsupportedTypeError(type: string): Error; declare class OuiInputModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * This token is used to inject the object whose value should be set into `OuiInput`. If none is * provided, the native `HTMLInputElement` is used. */ declare const OUI_INPUT_VALUE_ACCESSOR: InjectionToken<{ value: any; }>; /** * Menu content that will be rendered lazily once the menu is opened. */ declare class OuiMenuContent implements OnDestroy { private _template; private _viewContainerRef; private _viewRef; /** Emits when the menu content has been attached. */ _attached: Subject; constructor(); /** * Attaches the content with a particular context. */ attach(context?: any): void; /** * Detaches the content. */ detach(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class OuiMenuItemBase { } declare const _OuiMenuItemMixinBase: CanDisableCtor & typeof OuiMenuItemBase; /** * This directive is intended to be used inside an oui-menu tag. * It exists mostly to set the role attribute. */ declare class OuiMenuItem extends _OuiMenuItemMixinBase implements FocusableOption, CanDisable, OnDestroy { private _elementRef; private _focusMonitor; private _parentMenu; /** ARIA role for the menu item. */ role: 'menuitem' | 'menuitemradio' | 'menuitemcheckbox'; private _document; /** Stream that emits when the menu item is hovered. */ readonly _hovered: Subject; /** Whether the menu item is highlighted. */ _highlighted: boolean; /** Whether the menu item acts as a trigger for a sub-menu. */ _triggersSubmenu: boolean; constructor(); /** Focuses the menu item. */ focus(origin?: FocusOrigin): void; ngOnDestroy(): void; /** Used to set the `tabindex`. */ _getTabIndex(): string; /** Returns the host DOM element. */ _getHostElement(): HTMLElement; /** Prevents the default element actions if it is disabled. */ _checkDisabled(event: Event): void; /** Emits to the hover stream. */ _handleMouseEnter(): void; /** Gets the label to be used when determining whether the option should be focused. */ getLabel(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type MenuPositionX = 'before' | 'after'; type MenuPositionY = 'above' | 'below'; /** * Interface for a custom menu panel that can be used with `ouiMenuTriggerFor`. * * @docs-private */ interface OuiMenuPanel { xPosition: MenuPositionX; yPosition: MenuPositionY; overlapTrigger: boolean; templateRef: TemplateRef; close: EventEmitter; parentMenu?: OuiMenuPanel | undefined; focusFirstItem: (origin?: FocusOrigin) => void; resetActiveItem: () => void; setPositionClasses?: (x: MenuPositionX, y: MenuPositionY) => void; lazyContent?: OuiMenuContent; addItem?: (item: T) => void; hasBackdrop?: boolean; backdropClass?: string; removeItem?: (item: T) => void; } /** Default `oui-menu` options that can be overridden. */ interface OuiMenuDefaultOptions { /** The x-axis position of the menu. */ xPosition: MenuPositionX; /** The y-axis position of the menu. */ yPosition: MenuPositionY; /** Whether the menu should overlap the menu trigger. */ overlapTrigger: boolean; /** Class to be applied to the menu's backdrop. */ backdropClass: string; /** Whether the menu has a backdrop. */ hasBackdrop?: boolean; } /** Injection token to be used to override the default options for `oui-menu`. */ declare const OUI_MENU_DEFAULT_OPTIONS: InjectionToken; declare class OuiMenu implements AfterContentInit, OuiMenuPanel, OnInit, OnDestroy { private _elementRef; private _ngZone; private _defaultOptions; private _keyManager; private _xPosition; private _yPosition; /** Menu items inside the current menu. */ private _items; /** Emits whenever the amount of menu items changes. */ private _itemChanges; /** Subscription to tab events on the menu panel */ private _tabSubscription; /** Config object to be passed into the menu's ngClass */ _classList: { [key: string]: boolean; }; /** Parent menu of the current menu panel. */ parentMenu: OuiMenuPanel | undefined; /** Class to be added to the backdrop element. */ backdropClass: string; /** Whether the menu has a backdrop. */ get hasBackdrop(): boolean | undefined; set hasBackdrop(value: boolean | undefined); private _hasBackdrop; /** Position of the menu in the X axis. */ get xPosition(): MenuPositionX; set xPosition(value: MenuPositionX); /** Position of the menu in the Y axis. */ get yPosition(): MenuPositionY; set yPosition(value: MenuPositionY); /** @docs-private */ templateRef: TemplateRef; /** * List of the items inside of a menu. * * @deprecated * @breaking-change 8.0.0 */ items: QueryList; /** * Menu content that will be rendered lazily. * * @docs-private */ lazyContent: OuiMenuContent; /** Whether the menu should overlap its trigger. */ get overlapTrigger(): boolean; set overlapTrigger(value: boolean); private _overlapTrigger; /** * This method takes classes set on the host oui-menu element and applies them on the * menu template that displays in the overlay container. Otherwise, it's difficult * to style the containing menu from outside the component. * * @param classes list of class names */ set panelClass(classes: string); /** Event emitted when the menu is closed. */ readonly closed: EventEmitter; /** * Event emitted when the menu is closed. * * @deprecated Switch to `closed` instead * @breaking-change 8.0.0 */ close: EventEmitter; constructor(); ngOnInit(): void; ngAfterContentInit(): void; ngOnDestroy(): void; /** Stream that emits whenever the hovered menu item changes. */ _hovered(): Observable; /** Handle a keyboard event from the menu, delegating to the appropriate action. */ _handleKeydown(event: KeyboardEvent): void; /** * Focus the first item in the menu. * * @param origin Action from which the focus originated. Used to set the correct styling. */ focusFirstItem(origin?: FocusOrigin): void; /** * Resets the active item in the menu. This is used when the menu is opened, allowing * the user to start from the first option when pressing the down arrow. */ resetActiveItem(): void; /** * Registers a menu item with the menu. * * @docs-private */ addItem(item: OuiMenuItem): void; /** * Removes an item from the menu. * * @docs-private */ removeItem(item: OuiMenuItem): void; /** * Adds classes to the menu panel based on its position. Can be used by * consumers to add specific styling based on the position. * * @param posX Position of the menu along the x axis. * @param posY Position of the menu along the y axis. * @docs-private */ setPositionClasses(posX?: MenuPositionX, posY?: MenuPositionY): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Injection token that determines the scroll handling while the menu is open. */ declare const OUI_MENU_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** * This directive is intended to be used in conjunction with an oui-menu tag. It is * responsible for toggling the display of the provided menu instance. */ declare class OuiMenuTrigger implements AfterContentInit, OnDestroy { private _overlay; private _element; private _viewContainerRef; private _parentMenu; private _menuItemInstance; private _focusMonitor; private _portal; private _overlayRef; private _menuOpen; private _closeSubscription; private _hoverSubscription; private _menuCloseSubscription; private _scrollStrategy; private _openViaFocus; _openedBy: 'mouse' | 'touch' | null; /** References the menu instance that the trigger is associated with. */ get menu(): OuiMenuPanel; set menu(menu: OuiMenuPanel); private _menu; /** Data to be passed along to any lazily-rendered content. */ menuData: any; /** Event emitted when the associated menu is opened. */ readonly menuOpened: EventEmitter; /** Event emitted when the associated menu is closed. */ readonly menuClosed: EventEmitter; /** * Handles touch start events on the trigger. * Needs to be an arrow function so we can easily use addEventListener and removeEventListener. */ private _handleTouchStart; constructor(); ngAfterContentInit(): void; ngOnDestroy(): void; /** Whether the menu is open. */ get menuOpen(): boolean; /** Whether the menu triggers a sub-menu or a top-level one. */ triggersSubmenu(): boolean; /** Toggles the menu between the open and closed states. */ toggleMenu(): void; /** Opens the menu. */ openMenu(): void; /** Closes the menu. */ closeMenu(event?: 'click' | 'keydown' | 'tab'): void; /** * Focuses the menu trigger. * * @param origin Source of the menu trigger's focus. */ focus(origin?: FocusOrigin): void; /** Closes the menu and does the necessary cleanup. */ private _destroyMenu; /** * This method sets the menu state to open and focuses the first item if * the menu was opened via the keyboard. */ private _initMenu; /** * This method resets the menu when it's closed, most importantly restoring * focus to the menu trigger if the menu was opened via the keyboard. */ private _resetMenu; private _setIsMenuOpen; /** * This method checks that a valid instance of OuiMenu has been passed into * ouiMenuTriggerFor. If not, an exception is thrown. */ private _checkMenu; /** * This method creates the overlay from the provided menu's template and saves its * OverlayRef so that it can be attached to the DOM when openMenu is called. */ private _createOverlay; /** * This method builds the configuration object needed to create the overlay, the OverlayState. * * @returns OverlayConfig */ private _getOverlayConfig; /** * Listens to changes in the position of the overlay and sets the correct classes * on the menu based on the new position. This ensures the animation origin is always * correct, even if a fallback position is used for the overlay. */ private _subscribeToPositions; /** * Sets the appropriate positions on a position strategy * so the overlay connects with the trigger correctly. * * @param positionStrategy Strategy whose position to update. */ private _setPosition; /** Cleans up the active subscriptions. */ private _cleanUpSubscriptions; /** Returns a stream that emits whenever an action that should close the menu occurs. */ private _menuClosingActions; /** Handles mouse presses on the trigger. */ _handleMousedown(event: MouseEvent): void; /** Handles key presses on the trigger. */ _handleKeydown(event: KeyboardEvent): void; /** Handles click events on the trigger. */ _handleClick(event: MouseEvent): void; _handleFocus(): void; /** Handles the cases where the user hovers over the trigger. */ private _handleHover; /** Gets the portal that should be attached to the overlay. */ private _getPortal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class OuiMenuIcon implements AfterContentInit, OnChanges { private _elementRef; private ouiIconRegistry; private domSanitizer; private _iconDiv; vertical: boolean; constructor(); ngAfterContentInit(): void; ngOnChanges(): void; private _transformIcon; menuOpened(): void; menuClosed(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OuiMenuModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** Change event object emitted by MatCheckbox. */ declare class OuiCheckboxChange { /** The source MatCheckbox of the event. */ source: Checkbox; /** The new `checked` value of the checkbox. */ checked: boolean; } declare class OuiCheckboxBase { _elementRef: ElementRef; constructor(_elementRef: ElementRef); } declare const OuiCheckboxMixinBase: typeof OuiCheckboxBase; /** * Represents the different states that require custom transitions between them. * * @docs-private */ declare enum TransitionCheckState { Init = 0, /** The state representing the component when it's becoming checked. */ Checked = 1, /** The state representing the component when it's becoming unchecked. */ Unchecked = 2 } /** * Supports all of the functionality of an HTML5 checkbox, * and exposes a similar API. A MatCheckbox can be either checked, unchecked, or * disabled. Note that all additional accessibility attributes are taken care of by the component, * so there is no need to provide them yourself. However, if you want to omit a label and still * have the checkbox be accessible, you may supply an [aria-label] input. * See: https://github.com/scheduleonce/once-ui/tree/master/ui/src/components/checkbox/README.md */ declare class Checkbox extends OuiCheckboxMixinBase implements ControlValueAccessor, HasTabIndex, OnDestroy { private _changeDetectorRef; _elementRef: ElementRef; private _ngZone; private _focusMonitor; /** * Attached to the aria-label attribute of the host element. In most cases, arial-labelledby will * take precedence so this may be omitted. */ /** * Implemented as part of CanColor. */ color: string; ariaLabel: any; /** * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element */ ariaLabelledby: any; private _uniqueId; /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */ private _monitorSubscription; id: string; /** Returns the unique id for the visual hidden input. */ get inputId(): string; /** Whether the checkbox is required. */ get required(): boolean; set required(value: boolean); private _required; /** Whether the label should appear after or before the checkbox. Defaults to 'after' */ labelPosition: 'before' | 'after'; /** Name value will be applied to the input element if present */ name: string | null; /** Event emitted when the checkbox's `checked` value changes. */ readonly change: EventEmitter; /** The native `