import { OnChanges, OnDestroy, OnInit } from "@angular/core"; import { Subscription } from "rxjs"; import { UsaComboBoxComponent } from "../combo-box/combo-box.component"; import * as i0 from "@angular/core"; export declare class UsaTimePicker implements OnInit, OnChanges, OnDestroy { private hostComboBox; readonly MAX_TIME: number; readonly MIN_TIME = 0; readonly LABEL_FIELD = "label"; readonly VALUE_FIELD = "value"; /** * Defines minimum selectable time within a 24 hour window. * This can be a date object or a string in hh:mm in 24-hour format. * The default min time is 00:00 */ minTime: Date | string; /** * Defines the maximum selectable time within a 24 hour window. * This can be a date object or a string in hh:mm in 24-hour format. * The default max time is 23:59 */ maxTime: Date | string; /** * The number of minutes between options. The minimum value is 1. * The default value is 30 */ timeStep: number; /** * Filter function for when user types in input. This function * takes two parameters, current user input, and list of time * to parse input over. It should return a number which represents * the index within the values to select based on user input. * Index of -1 indicates no selection. A default filter function * is provided by the component, but a custom one can be passed in * if desired. */ filterBy: (input: string, values: string[]) => number; _inputChangeSubscription: Subscription; constructor(hostComboBox: UsaComboBoxComponent); ngOnChanges(): void; ngOnInit(): void; ngOnDestroy(): void; /** * Initializes dropdown values for timepixker as well as filter function * to use */ private initializeDropdownItems; /** * Generates list of times to display to the user. * This list is created based on user's min/max inputs * as well as time step * @returns - list of {label, value} pair of time to display in dropdown */ private genetateItems; /** * Adds additional zeros if needed * @param value * @param length * @returns */ private padZeros; /** * Given minuutes, parses number of hours and minutes to represent that time. * IE - 0 minutes would be 0:00 AM, 60 minutes would be 1:00 AM, etc * @param minutes */ private getTimeContext; /** * Parse a string of hh:mm into minutes * * @param {string} timeStr the time string to parse * @returns {number} the number of minutes */ private parseTimeString; /** * Default filter search if one is not provided. Used to find * time within dropdown values that best matches user input * @param input - user input * @param values - list of values to search * @returns - index in values list if match is found, -1 otherwise */ defaultFilter(input: string, values: string[]): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }