UNPKG

@dhutaryan/ngx-mat-timepicker

Version:

Angular timepicker to add time which is based on material design and Angular material.

76 lines (75 loc) 3.71 kB
import { AnimationEvent } from '@angular/animations'; import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal'; import { ChangeDetectorRef, OnInit, AfterViewInit } from '@angular/core'; import { ThemePalette } from '@angular/material/core'; import { Subject } from 'rxjs'; import { ExtractTimeTypeFromSelection, MatTimeSelectionModel } from './time-selection-model'; import { MatTimepickerBase, TimepickerMode } from './timepicker-base'; import { MatTimepickerIntl } from './timepicker-intl'; import { MatClockDials } from './clock-dials'; import { MatTimeInputs } from './time-inputs'; import { TimepickerOrientation } from './orientation'; import * as i0 from "@angular/core"; export declare class MatTimepickerContent<S, T = ExtractTimeTypeFromSelection<S>> implements OnInit, AfterViewInit { private _globalModel; private _changeDetectorRef; /** Reference to the internal clock dials component. */ _dials: MatClockDials<T> | undefined; /** Reference to the internal time inputs component. */ _inputs: MatTimeInputs<T> | undefined; /** Reference to the timepicker that created the overlay. */ timepicker: MatTimepickerBase<any, S, T>; /** Display mode. */ mode: TimepickerMode; /** Current state of the animation. */ _animationState: 'enter-dropdown' | 'enter-dialog' | 'void'; /** Whether the clock uses 12 hour format. */ isMeridiem: boolean; /** Whether should toggle face button be shown. */ showToggleModeButton: boolean; /** Step for minutes. */ minuteInterval: number; /** Orientation for dial mode. */ orientation: TimepickerOrientation; /** Portal with projected action buttons. */ _actionsPortal: TemplatePortal | ComponentPortal<any> | null; /** Id of the label for the `role="dialog"` element. */ _dialogLabelId: string | null; /** Text for the close button. */ _closeButtonText: string; /** Whether the close button currently has focus. */ _closeButtonFocused: boolean; /** Whether there is an in-progress animation. */ _isAnimating: boolean; /** * Theme color of the internal timepicker. This API is supported in M2 themes * only, it has no effect in M3 themes. */ color: ThemePalette; /** Emits when an animation has finished. */ readonly _animationDone: Subject<void>; private _model; private _subscriptions; constructor(intl: MatTimepickerIntl, _globalModel: MatTimeSelectionModel<S, T>, _changeDetectorRef: ChangeDetectorRef); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** Changes animation state while closing timepicker content. */ _startExitAnimation(): void; _handleAnimationEvent(event: AnimationEvent): void; onToggleMode(mode: TimepickerMode): void; _getSelected(): T | null; /** Applies the current pending selection to the global model. */ _applyPendingSelection(): void; /** * Assigns a new portal containing the timepicker actions. * @param portal Portal with the actions to be assigned. * @param forceRerender Whether a re-render of the portal should be triggered. This isn't * necessary if the portal is assigned during initialization, but it may be required if it's * added at a later point. */ _assignActions(portal: TemplatePortal<any> | ComponentPortal<any> | null, forceRerender: boolean): void; _handleUserSelection(event: T): void; static ɵfac: i0.ɵɵFactoryDeclaration<MatTimepickerContent<any, any>, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MatTimepickerContent<any, any>, "mat-timepicker-content", ["matTimepickerContent"], {}, {}, never, never, true, never>; }