com.phloxui
Version:
PhloxUI Ng2+ Framework
126 lines (125 loc) • 5.11 kB
TypeScript
import { OnInit, ElementRef, EventEmitter } from '@angular/core';
import { AbstractDateTimePicker } from './AbstractDateTimePicker';
import { ValidationResult } from '../../model/ValidationResult';
import { INeedFocus } from '../../../component/INeedFocus';
import { NeedFocusService } from '../../../service/NeedFocusService.service';
import { IFormatter } from '../../../share/formatter/IFormatter';
import { FormatterFactory } from '../../../service/FormatterFactory.service';
import { PhloxAppInfoService } from '../../../service/PhloxAppInfoService.service';
import { IHasData } from '../../IHasData';
export declare class TimePicker extends AbstractDateTimePicker implements OnInit, INeedFocus {
static readonly TYPE_NAME: string;
static readonly DEFAULT_RANGE: number;
readonly HOUR: string;
readonly MIN: string;
readonly SEC: string;
protected dataParent: IHasData;
protected ignoreParentData: boolean;
protected data: any;
protected ignoreParentDisabled: boolean;
protected delegateHistory: boolean;
protected onDisabled: Function;
protected onEnabled: Function;
protected loadingEnabled: boolean;
protected i18nKey: string;
protected bypass: boolean;
protected options: any;
protected disabled: boolean;
protected field: string;
protected name: string;
protected typeOfData: string;
protected readOnly: boolean;
protected help: any;
protected formatter: IFormatter;
protected formatterName: string;
protected formatterOptions: any;
protected formatterUsePropertyValue: boolean;
protected dataPattern: string;
protected range: number;
protected width: string;
protected height: string;
protected hideSecond: boolean;
protected loadEvent: EventEmitter<any>;
protected startValidateEvent: EventEmitter<any>;
protected endValidateEvent: EventEmitter<any>;
protected beforeFocusEvent: EventEmitter<any>;
protected focusEvent: EventEmitter<any>;
protected beforeLostFocusEvent: EventEmitter<any>;
protected lostFocusEvent: EventEmitter<any>;
protected beforeChangeEvent: EventEmitter<any>;
protected changeEvent: EventEmitter<any>;
protected beforeViewShowEvent: EventEmitter<any>;
protected viewShowEvent: EventEmitter<any>;
protected beforeViewHideEvent: EventEmitter<any>;
protected viewHideEvent: EventEmitter<any>;
protected elementFocused: any;
protected needFocusService: NeedFocusService;
protected rangeHour: number[];
protected rangeMin: number[];
protected rangeSec: number[];
protected selectedHour: number;
protected selectedMin: number;
protected selectedSec: number;
protected positionTop: number;
protected positionLeft: any;
protected active: boolean;
private isNotOpenSec;
private _isItemClick;
private _itemLostFocusingTimeout;
constructor(elementRef: ElementRef, needFocusService: NeedFocusService, formatterFactory: FormatterFactory, phloxAppInfoService: PhloxAppInfoService);
ngOnInit(): void;
private updateSelectedDateLocal(localDate);
private updateSelectedTimeLocal(hour, min, sec);
private updateUI();
protected calculatePopupPosition(): void;
private requestFocus();
private calculateTime();
private calHourRange();
private calMinRange();
private calSecRange();
private onUpArrowHour($event);
private onDownArrowHour($event);
private onUpArrowMin($event);
private onDownArrowMin($event);
private onUpArrowSec($event);
private onDownArrowSec($event);
private isMinMaxValidate(date);
private sortDataList(objArray);
private isValidFromValidationResults(results);
private setRange(range);
private getRange();
private setNotOpenSecShow(isNotOpenSec);
protected doHide(): void;
protected doShow(): void;
protected doBlur($event: Event): void;
_isCurrentHourTime(hour: number): boolean;
_isCurrentMinTime(min: number): boolean;
_isCurrentSecTime(sec: number): boolean;
_isNotOpenSecShow(): boolean;
onTimeClicked($event: Event, item: any, type: string): void;
onUpArrow($event: any, type: string): void;
onDownArrow($event: any, type: string): void;
getDataPatternFromSetting(): string;
onTextBoxClicked($event: any): void;
onFocusing($event: any): void;
onLostFocusing($event: Event): void;
getPopupPositionTop(): any;
getPopupPositionLeft(): any;
onValidationEnd(inputValue: any, results: ValidationResult[]): void;
protected onDataChange(data: any, inputVal: any): void;
protected doFocus($event: Event): void;
protected doLostFocus($event: Event): void;
onValueChanged($event: any): void;
getRangeHour(): number[];
getRangeMin(): number[];
getRangeSec(): number[];
isActive(): boolean;
getSelectedDate(): Date;
getWidth(): string;
setWidth(width: string): void;
getHeight(): string;
setHeight(height: string): void;
isHideSecond(): boolean;
setHideSecond(hide: boolean): void;
compareDate(a: Date, b: Date): number;
}