@dhutaryan/ngx-mat-timepicker 20.1.0 → 20.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, InjectionToken, Provider, OnDestroy, AfterContentInit, AfterViewChecked, OnInit, NgZone, ElementRef, ChangeDetectorRef, AfterViewInit, OnChanges, ViewContainerRef, SimpleChanges, TemplateRef } from '@angular/core';
2
+ import { EventEmitter, InjectionToken, Provider, OnDestroy, AfterContentInit, AfterViewChecked, ElementRef, ChangeDetectorRef, AfterViewInit, OnChanges, ViewContainerRef, Injector, SimpleChanges, OnInit, TemplateRef } from '@angular/core';
3
3
  import * as i1$1 from '@angular/cdk/overlay';
4
4
  import { Overlay, ScrollStrategy } from '@angular/cdk/overlay';
5
5
  import * as i2 from '@angular/cdk/portal';
@@ -324,11 +324,9 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
324
324
  availableMinutes: number[];
325
325
  availableHours: number[];
326
326
  /**
327
- * Used for scheduling that focus should be moved to the active cell on the next tick.
328
- * We need to schedule it, rather than do it immediately, because we have to wait
329
- * for Angular to re-evaluate the view children.
327
+ * Used to focus the active cell after change detection has run.
330
328
  */
331
- private _moveFocusOnNextTick;
329
+ private _focusActiveCellAfterViewChecked;
332
330
  constructor(_timeAdapter: TimeAdapter<T>);
333
331
  ngAfterContentInit(): void;
334
332
  ngAfterViewChecked(): void;
@@ -377,6 +375,8 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
377
375
  private _setMaxMinute;
378
376
  /** Sets disabled period. */
379
377
  private _setDisabledPeriod;
378
+ /** Schedules focus to be moved to the active cell on the next tick. */
379
+ private _scheduleFocusActiveCellAfterViewChecked;
380
380
  static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeFaceBase<any>, [{ optional: true; }]>;
381
381
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatTimeFaceBase<any>, never, never, { "selected": { "alias": "selected"; "required": false; }; "minTime": { "alias": "minTime"; "required": false; }; "maxTime": { "alias": "maxTime"; "required": false; }; "minuteInterval": { "alias": "minuteInterval"; "required": false; }; "isMeridiem": { "alias": "isMeridiem"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "_userSelection": "_userSelection"; "selectedChange": "selectedChange"; }, never, never, true, never>;
382
382
  }
@@ -385,22 +385,22 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
385
385
  type TimepickerOrientation = 'horizontal' | 'vertical';
386
386
 
387
387
  type MatDialView = 'hours' | 'minutes';
388
- declare class MatClockDials<T> extends MatTimeFaceBase<T> implements OnInit, OnDestroy {
388
+ declare class MatClockDials<T> extends MatTimeFaceBase<T> {
389
389
  _intl: MatTimepickerIntl;
390
- private _ngZone;
391
390
  private _elementRef;
392
391
  private _cdr;
393
392
  /** Layout orientation. */
394
- orientation: TimepickerOrientation;
393
+ readonly orientation: i0.InputSignal<TimepickerOrientation>;
395
394
  /** Whether the timepicker UI is in touch mode. */
396
- touchUi: boolean;
397
- isHoursView: i0.WritableSignal<boolean>;
395
+ readonly touchUi: i0.InputSignal<boolean>;
396
+ /** Whether the current view for the timepicker. */
397
+ readonly currentView: i0.InputSignal<MatDialView>;
398
+ /** Emits when the view is changed. */
399
+ readonly viewChanged: i0.OutputEmitterRef<MatDialView>;
400
+ readonly isHoursView: i0.Signal<boolean>;
398
401
  /** Specifies the view of clock dial. */
399
402
  private readonly _view;
400
- private _viewSubscription;
401
- constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _ngZone: NgZone, _elementRef: ElementRef, _cdr: ChangeDetectorRef);
402
- ngOnInit(): void;
403
- ngOnDestroy(): void;
403
+ constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _elementRef: ElementRef, _cdr: ChangeDetectorRef);
404
404
  /** Changes clock dial view. */
405
405
  onViewChange(event: Event, view: MatDialView): void;
406
406
  focusActiveCell(): void;
@@ -411,8 +411,8 @@ declare class MatClockDials<T> extends MatTimeFaceBase<T> implements OnInit, OnD
411
411
  hour: number;
412
412
  changeView?: boolean;
413
413
  }): void;
414
- static ɵfac: i0.ɵɵFactoryDeclaration<MatClockDials<any>, [null, { optional: true; }, null, null, null]>;
415
- static ɵcmp: i0.ɵɵComponentDeclaration<MatClockDials<any>, "mat-clock-dials", ["matClockDials"], { "orientation": { "alias": "orientation"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; }, {}, never, never, true, never>;
414
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatClockDials<any>, [null, { optional: true; }, null, null]>;
415
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatClockDials<any>, "mat-clock-dials", ["matClockDials"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "touchUi": { "alias": "touchUi"; "required": false; "isSignal": true; }; "currentView": { "alias": "currentView"; "required": false; "isSignal": true; }; }, { "viewChanged": "viewChanged"; }, never, never, true, never>;
416
416
  }
417
417
 
418
418
  declare const MAT_TIMEPICKER_INPUTS_KEYDOWN_HANDLER: InjectionToken<(event: KeyboardEvent) => void>;
@@ -470,16 +470,15 @@ declare class MatMinuteInput extends MatTimeInputBase {
470
470
  }
471
471
  declare class MatTimeInputs<T> extends MatTimeFaceBase<T> {
472
472
  _intl: MatTimepickerIntl;
473
- private _ngZone;
474
473
  private _elementRef;
475
- constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _ngZone: NgZone, _elementRef: ElementRef);
474
+ constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _elementRef: ElementRef);
476
475
  /**
477
476
  * Using for skipping that focus shouldn't be moved to the active cell on the next tick.
478
477
  * We need to use it to avoid focusing input for input mode.
479
478
  */
480
479
  private _skipNextTickFocus;
481
480
  focusActiveCell(): void;
482
- static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeInputs<any>, [null, { optional: true; }, null, null]>;
481
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeInputs<any>, [null, { optional: true; }, null]>;
483
482
  static ɵcmp: i0.ɵɵComponentDeclaration<MatTimeInputs<any>, "mat-time-inputs", never, {}, {}, never, never, true, never>;
484
483
  }
485
484
 
@@ -609,7 +608,7 @@ declare const MAT_TIMEPICKER_DEFAULT_OPTIONS: InjectionToken<MatTimepickerDefaul
609
608
  declare abstract class MatTimepickerBase<C extends MatTimepickerControl<T>, S, T = ExtractTimeTypeFromSelection<S>> implements OnChanges {
610
609
  private _viewContainerRef;
611
610
  private _overlay;
612
- private _ngZone;
611
+ private readonly _injector;
613
612
  private _defaultActionsComponent;
614
613
  private _model;
615
614
  private _defaults?;
@@ -692,7 +691,7 @@ declare abstract class MatTimepickerBase<C extends MatTimepickerControl<T>, S, T
692
691
  _getMinTime(): T | null;
693
692
  /** The maximum selectable time. */
694
693
  _getMaxTime(): T | null;
695
- constructor(_viewContainerRef: ViewContainerRef, _overlay: Overlay, _ngZone: NgZone, scrollStrategy: any, _defaultActionsComponent: ComponentType<any>, _model: MatTimeSelectionModel<S, T>, _defaults?: MatTimepickerDefaultOptions | undefined);
694
+ constructor(_viewContainerRef: ViewContainerRef, _overlay: Overlay, _injector: Injector, scrollStrategy: any, _defaultActionsComponent: ComponentType<any>, _model: MatTimeSelectionModel<S, T>, _defaults?: MatTimepickerDefaultOptions | undefined);
696
695
  ngOnChanges(changes: SimpleChanges): void;
697
696
  ngOnDestroy(): void;
698
697
  /** Opens the timepicker. */
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dhutaryan/ngx-mat-timepicker",
3
3
  "description": "Angular timepicker to add time which is based on material design and Angular material.",
4
4
  "homepage": "https://dhutaryan.github.io/ngx-mat-timepicker/",
5
- "version": "20.1.0",
5
+ "version": "20.2.0",
6
6
  "license": "MIT",
7
7
  "author": {
8
8
  "name": "Dzmitry Hutaryan"