import { AfterViewInit, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { PoButtonComponent } from '../../po-button/po-button.component';
import { PoTimerComponent } from '../../po-timer/po-timer.component';
import { PoTimepickerBaseComponent } from './po-timepicker-base.component';
import { PoHelperComponent } from '../../po-helper';
type PoTimepickerSegment = 'hour' | 'minute' | 'second';
/**
* @docsExtends PoTimepickerBaseComponent
*
* @example
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
export declare class PoTimepickerComponent extends PoTimepickerBaseComponent implements AfterViewInit, OnDestroy, OnChanges {
private readonly controlPosition;
private readonly renderer;
dialogPicker: ElementRef;
iconTimepicker: PoButtonComponent;
inputEl: ElementRef;
minuteInputEl: ElementRef;
secondInputEl: ElementRef;
timepickerFieldEl: ElementRef;
iconClean: ElementRef;
helperEl?: PoHelperComponent;
timerComponent?: PoTimerComponent;
periodInputEl: ElementRef;
/** Rótulo do campo. */
label?: string;
/** Texto de apoio do campo. */
help?: string;
displayAdditionalHelp: boolean;
el: ElementRef;
id: string;
visible: boolean;
literals: any;
hourDisplay: string;
minuteDisplay: string;
secondDisplay: string;
periodDisplay: string;
isSegmentFocused: boolean;
ariaLiveMessage: string;
eventListenerFunction: () => void;
eventResizeListener: () => void;
get cleanElementRef(): {
nativeElement: {
value: string;
};
};
private clickListener;
private timeoutChange;
private valueBeforeChange;
constructor();
get hourPlaceholder(): string;
get minutePlaceholder(): string;
get secondPlaceholder(): string;
private get customPlaceholderSegments();
private getCustomPlaceholderSegment;
onHostFocusOut(event: FocusEvent): void;
onKeydown($event?: any): void;
ngAfterViewInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
protected onLocaleChange(): void;
emitAdditionalHelp(): void;
/**
* Função que atribui foco ao componente.
*
* Para utilizá-la é necessário ter a instância do componente no DOM, podendo ser utilizado o ViewChild da seguinte forma:
*
* ```
* import { PoTimepickerComponent } from '@po-ui/ng-components';
*
* ...
*
* @ViewChild(PoTimepickerComponent, { static: true }) timepicker: PoTimepickerComponent;
*
* focusTimepicker() {
* this.timepicker.focus();
* }
* ```
*/
focus(): void;
getAdditionalHelpTooltip(): any;
togglePicker(focusInput?: boolean): void;
closeTimer(focusInput?: boolean, skipRefocus?: boolean): void;
timerSelected(time: string): void;
wasClickedOnPicker(event: any): void;
hasInvalidClass(): boolean;
hasValue(): boolean;
getErrorPattern(): string;
clear(): void;
clearAndFocus(): void;
eventOnBlur($event: any): void;
eventOnClick($event: any): void;
onKeyDown(event: KeyboardEvent): void;
onKeyPress(event: any): void;
onSegmentInput(event: Event, segment: PoTimepickerSegment): void;
onSegmentKeydown(event: KeyboardEvent, segment: PoTimepickerSegment): void;
private handleSegmentNavigation;
private handleSegmentArrowKeys;
private handleSegmentNonNumericBlock;
onSegmentBlur(event: FocusEvent): void;
onFieldClick(event: MouseEvent): void;
onSegmentFocus(): void;
onPeriodSegmentKeydown(event: KeyboardEvent): void;
onPeriodSegmentClick(event: MouseEvent): void;
refreshValue(value: string): void;
/**
* Método que exibe `p-helper` ou executa a ação definida em `p-helper{eventOnClick}` ou em `p-additionalHelp`.
*/
showAdditionalHelp(): boolean;
writeValue(value: any): void;
verifyMobile(): RegExpMatchArray;
handleCleanKeyboardTab(event: KeyboardEvent): void;
onTimerKeyDown(event: KeyboardEvent): void;
onTimerBoundaryTab(payload: {
direction: 'forward' | 'backward';
event: KeyboardEvent;
}): void;
onTimerFocusOut(event: FocusEvent): void;
setHelper(label?: string): {
hideAdditionalHelp: boolean;
helperSettings?: any;
};
/**
* Atualiza os valores exibidos nos inputs de segmento, convertendo para formato 12h com AM/PM quando necessário.
* O timeValue interno sempre armazena em formato 24h (ISO), mas a exibição pode ser 12h.
*/
private updateInputDisplay;
/** Atualiza a mensagem aria-live com o valor do horario para anuncio por leitores de tela. */
private updateAriaLiveMessage;
/** Constroi a string de horario no formato de exibicao atual (12h ou 24h). */
private buildDisplayTime;
/** Normaliza valores `HH:mm` para `HH:mm:00` quando segundos estão habilitados. */
private normalizeTimeValueForDisplay;
/** Limpa todos os valores de exibicao dos segmentos e seus respectivos elementos input. */
private clearSegmentDisplays;
private getDefaultPeriodDisplay;
/** Sincroniza os valores dos elementos input nativos com as propriedades de exibicao. */
private syncSegmentInputElements;
/** Avanca o foco para o proximo input de segmento. */
private advanceToNextSegment;
/** Avanca o foco para o input de segmento anterior. */
private advanceToPreviousSegment;
/** Foca o ultimo input de segmento visivel. */
private focusLastSegment;
/** Verifica se o segmento informado e o ultimo visivel. */
private isLastSegment;
/** Alterna entre AM e PM no display de periodo e atualiza o modelo. */
private togglePeriod;
/** Incrementa ou decrementa o valor de um segmento na direcao indicada (+1 ou -1), respeitando limites e intervalos. */
private incrementSegment;
private incrementHourSegment;
private incrementIntervalSegment;
private normalizeSingleDigitSegment;
private shouldCommitForInternalFocusTarget;
/** Combina os valores dos segmentos em uma string de horario e atualiza o modelo. */
private updateCombinedValue;
/** Monta a string parcial combinando os segmentos preenchidos e vazios. */
private buildPartialCombined;
private areSegmentsComplete;
private buildDisplayCombined;
private convertDisplayTo24h;
/** Completa valores de segmento incompletos e atualiza o modelo no blur. */
private validateAndUpdateModel;
private updateTimeFromInput;
private applyInputValidationError;
private controlChangeEmitter;
/**
* Completa automaticamente os segundos com `:00` ao fechar o timer
* quando `showSeconds=true` e o usuario preencheu apenas hora e minuto (HH:mm).
*
* Esse comportamento emite `callOnChange` e `controlChangeEmitter`, o que
* significa que formularios reativos observando `valueChanges` receberao
* uma emissao adicional no momento do fechamento do timer.
*/
private completeSecondsOnClose;
private initializeListeners;
private isAdditionalHelpEventTriggered;
private readonly onScroll;
private removeListeners;
private setDialogPickerStyleDisplay;
private setTimerPosition;
protected adjustTimerPosition(): void;
private shouldHandleTab;
private focusTimer;
}
export {};