UNPKG

@logo-software/timepicker

Version:

Timepicker helps users select and set a specific time in your timesheet in 24-hour format.

117 lines (116 loc) 3.2 kB
/** * @license * Copyright LOGO YAZILIM SANAYİ VE TİCARET A.Ş. All Rights Reserved. * * Save to the extent permitted by law, you may not use, copy, modify, * distribute or create derivative works of this material or any part * of it without the prior written consent of LOGO YAZILIM SANAYİ VE TİCARET A.Ş. Limited. * Any reproduction of this material must contain this notice. */ import { EventEmitter, OnDestroy } from '@angular/core'; import { PopoverPosition, PopoverService } from '@logo-software/popover'; /** * IconPosition sets the clock icon position on the input. Default is left. */ export declare enum IconPosition { ICON_LEFT = "left", ICON_RIGHT = "right", ICON_DEFAULT = "left" } /** * Set the sizes of the input. Default is medium. */ export declare enum Sizes { LARGE = "large", MEDIUM = "medium", SMALL = "small", DEFAULT = "medium" } /** * The Timepicker is the component of itself. Provides a proxy to Timepicker options as well as custom picker options. * Add the below code to your code stack and give initializer parameters. * * <sub>app.component.html</sub> * * ```html * <logo-timepicker * [id]="'myLogoTimer'" * [(ngModel)]="setTime" * [size]="'medium'" * [iconPosition]="'left'" * [cssClasses]="'my-own-theme-css'" * > * </logo-timepicker> * ``` */ export declare class TimepickerComponent implements OnDestroy { popoverService: PopoverService; /** * The identifier of the picker */ id: string; /** * The size of the timepicker. It accepts Sizes enum. */ size: Sizes; /** * The position of the clock icon. It accepts IconPosition enum. */ iconPosition: IconPosition; /** * Your own css class to design the component */ cssClasses: string; /** * Set disabled status of the element */ isDisabled: boolean; hours: any[]; minutes: any[]; selectedHour: string; selectedMinute: string; time: any; ngModelChange: EventEmitter<boolean>; onChange: EventEmitter<string>; private subscribtion; PopoverPosition: typeof PopoverPosition; constructor(popoverService: PopoverService); private _ngModel; get ngModel(): string; /** * Set model */ set ngModel(value: string); onResize(event: any): void; ngOnDestroy(): void; setInputTime(value: string): void; /** * This function shows the clock selection popover */ showClockSelector(): void; /** * This function closes the clock selection popover */ closeClockSelector(): void; /** * This function sets the hour of the clock */ setHour($event: any): void; /** * This function sets the minutes of the clock */ setMin($event: any): void; /** * This function sets the certain time with setted hours and minutes. */ setTime(): void; /** * This function handles the writing of the input */ handleWriteTime($event: any): void; apply(): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; writeValue(obj: any): void; setDisabledState(isDisabled: boolean): void; }