@dhutaryan/ngx-mat-timepicker 20.0.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/README.md +2 -1
- package/fesm2022/dhutaryan-ngx-mat-timepicker.mjs +207 -220
- package/fesm2022/dhutaryan-ngx-mat-timepicker.mjs.map +1 -1
- package/index.d.ts +30 -29
- package/package.json +4 -4
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,
|
|
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';
|
|
@@ -8,7 +8,6 @@ import * as i3 from '@angular/cdk/a11y';
|
|
|
8
8
|
import { ThemePalette } from '@angular/material/core';
|
|
9
9
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
10
10
|
import { Subject, Observable } from 'rxjs';
|
|
11
|
-
import { AnimationEvent } from '@angular/animations';
|
|
12
11
|
import { ControlValueAccessor, Validator, ValidatorFn, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
13
12
|
import { MatFormField } from '@angular/material/form-field';
|
|
14
13
|
import * as i15 from '@angular/cdk/scrolling';
|
|
@@ -325,11 +324,9 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
|
|
|
325
324
|
availableMinutes: number[];
|
|
326
325
|
availableHours: number[];
|
|
327
326
|
/**
|
|
328
|
-
* Used
|
|
329
|
-
* We need to schedule it, rather than do it immediately, because we have to wait
|
|
330
|
-
* for Angular to re-evaluate the view children.
|
|
327
|
+
* Used to focus the active cell after change detection has run.
|
|
331
328
|
*/
|
|
332
|
-
private
|
|
329
|
+
private _focusActiveCellAfterViewChecked;
|
|
333
330
|
constructor(_timeAdapter: TimeAdapter<T>);
|
|
334
331
|
ngAfterContentInit(): void;
|
|
335
332
|
ngAfterViewChecked(): void;
|
|
@@ -378,6 +375,8 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
|
|
|
378
375
|
private _setMaxMinute;
|
|
379
376
|
/** Sets disabled period. */
|
|
380
377
|
private _setDisabledPeriod;
|
|
378
|
+
/** Schedules focus to be moved to the active cell on the next tick. */
|
|
379
|
+
private _scheduleFocusActiveCellAfterViewChecked;
|
|
381
380
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeFaceBase<any>, [{ optional: true; }]>;
|
|
382
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>;
|
|
383
382
|
}
|
|
@@ -386,22 +385,22 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
|
|
|
386
385
|
type TimepickerOrientation = 'horizontal' | 'vertical';
|
|
387
386
|
|
|
388
387
|
type MatDialView = 'hours' | 'minutes';
|
|
389
|
-
declare class MatClockDials<T> extends MatTimeFaceBase<T>
|
|
388
|
+
declare class MatClockDials<T> extends MatTimeFaceBase<T> {
|
|
390
389
|
_intl: MatTimepickerIntl;
|
|
391
|
-
private _ngZone;
|
|
392
390
|
private _elementRef;
|
|
393
391
|
private _cdr;
|
|
394
392
|
/** Layout orientation. */
|
|
395
|
-
orientation: TimepickerOrientation
|
|
393
|
+
readonly orientation: i0.InputSignal<TimepickerOrientation>;
|
|
396
394
|
/** Whether the timepicker UI is in touch mode. */
|
|
397
|
-
touchUi: boolean
|
|
398
|
-
|
|
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>;
|
|
399
401
|
/** Specifies the view of clock dial. */
|
|
400
402
|
private readonly _view;
|
|
401
|
-
|
|
402
|
-
constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _ngZone: NgZone, _elementRef: ElementRef, _cdr: ChangeDetectorRef);
|
|
403
|
-
ngOnInit(): void;
|
|
404
|
-
ngOnDestroy(): void;
|
|
403
|
+
constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _elementRef: ElementRef, _cdr: ChangeDetectorRef);
|
|
405
404
|
/** Changes clock dial view. */
|
|
406
405
|
onViewChange(event: Event, view: MatDialView): void;
|
|
407
406
|
focusActiveCell(): void;
|
|
@@ -412,8 +411,8 @@ declare class MatClockDials<T> extends MatTimeFaceBase<T> implements OnInit, OnD
|
|
|
412
411
|
hour: number;
|
|
413
412
|
changeView?: boolean;
|
|
414
413
|
}): void;
|
|
415
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatClockDials<any>, [null, { optional: true; }, null, null
|
|
416
|
-
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>;
|
|
417
416
|
}
|
|
418
417
|
|
|
419
418
|
declare const MAT_TIMEPICKER_INPUTS_KEYDOWN_HANDLER: InjectionToken<(event: KeyboardEvent) => void>;
|
|
@@ -471,20 +470,19 @@ declare class MatMinuteInput extends MatTimeInputBase {
|
|
|
471
470
|
}
|
|
472
471
|
declare class MatTimeInputs<T> extends MatTimeFaceBase<T> {
|
|
473
472
|
_intl: MatTimepickerIntl;
|
|
474
|
-
private _ngZone;
|
|
475
473
|
private _elementRef;
|
|
476
|
-
constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>,
|
|
474
|
+
constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _elementRef: ElementRef);
|
|
477
475
|
/**
|
|
478
476
|
* Using for skipping that focus shouldn't be moved to the active cell on the next tick.
|
|
479
477
|
* We need to use it to avoid focusing input for input mode.
|
|
480
478
|
*/
|
|
481
479
|
private _skipNextTickFocus;
|
|
482
480
|
focusActiveCell(): void;
|
|
483
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeInputs<any>, [null, { optional: true; }, null
|
|
481
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeInputs<any>, [null, { optional: true; }, null]>;
|
|
484
482
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatTimeInputs<any>, "mat-time-inputs", never, {}, {}, never, never, true, never>;
|
|
485
483
|
}
|
|
486
484
|
|
|
487
|
-
declare class MatTimepickerContent<S, T = ExtractTimeTypeFromSelection<S>> implements
|
|
485
|
+
declare class MatTimepickerContent<S, T = ExtractTimeTypeFromSelection<S>> implements AfterViewInit {
|
|
488
486
|
private _globalModel;
|
|
489
487
|
private _changeDetectorRef;
|
|
490
488
|
/** Reference to the internal clock dials component. */
|
|
@@ -495,8 +493,8 @@ declare class MatTimepickerContent<S, T = ExtractTimeTypeFromSelection<S>> imple
|
|
|
495
493
|
timepicker: MatTimepickerBase<any, S, T>;
|
|
496
494
|
/** Display mode. */
|
|
497
495
|
mode: TimepickerMode;
|
|
498
|
-
/**
|
|
499
|
-
|
|
496
|
+
/** Whether the animation is disabled. */
|
|
497
|
+
protected _animationsDisabled: boolean | undefined;
|
|
500
498
|
/** Whether the clock uses 12 hour format. */
|
|
501
499
|
isMeridiem: boolean;
|
|
502
500
|
/** Whether should toggle face button be shown. */
|
|
@@ -522,15 +520,18 @@ declare class MatTimepickerContent<S, T = ExtractTimeTypeFromSelection<S>> imple
|
|
|
522
520
|
color: ThemePalette;
|
|
523
521
|
/** Emits when an animation has finished. */
|
|
524
522
|
readonly _animationDone: Subject<void>;
|
|
523
|
+
protected _elementRef: ElementRef<HTMLElement>;
|
|
524
|
+
private _ngZone;
|
|
525
525
|
private _model;
|
|
526
|
-
private
|
|
527
|
-
|
|
528
|
-
|
|
526
|
+
private _stateChanges;
|
|
527
|
+
private _eventCleanups;
|
|
528
|
+
private _animationFallback;
|
|
529
|
+
constructor(_globalModel: MatTimeSelectionModel<S, T>, _changeDetectorRef: ChangeDetectorRef);
|
|
529
530
|
ngAfterViewInit(): void;
|
|
530
531
|
ngOnDestroy(): void;
|
|
531
532
|
/** Changes animation state while closing timepicker content. */
|
|
532
533
|
_startExitAnimation(): void;
|
|
533
|
-
_handleAnimationEvent
|
|
534
|
+
private _handleAnimationEvent;
|
|
534
535
|
onToggleMode(mode: TimepickerMode): void;
|
|
535
536
|
_getSelected(): T | null;
|
|
536
537
|
/** Applies the current pending selection to the global model. */
|
|
@@ -607,7 +608,7 @@ declare const MAT_TIMEPICKER_DEFAULT_OPTIONS: InjectionToken<MatTimepickerDefaul
|
|
|
607
608
|
declare abstract class MatTimepickerBase<C extends MatTimepickerControl<T>, S, T = ExtractTimeTypeFromSelection<S>> implements OnChanges {
|
|
608
609
|
private _viewContainerRef;
|
|
609
610
|
private _overlay;
|
|
610
|
-
private
|
|
611
|
+
private readonly _injector;
|
|
611
612
|
private _defaultActionsComponent;
|
|
612
613
|
private _model;
|
|
613
614
|
private _defaults?;
|
|
@@ -690,7 +691,7 @@ declare abstract class MatTimepickerBase<C extends MatTimepickerControl<T>, S, T
|
|
|
690
691
|
_getMinTime(): T | null;
|
|
691
692
|
/** The maximum selectable time. */
|
|
692
693
|
_getMaxTime(): T | null;
|
|
693
|
-
constructor(_viewContainerRef: ViewContainerRef, _overlay: Overlay,
|
|
694
|
+
constructor(_viewContainerRef: ViewContainerRef, _overlay: Overlay, _injector: Injector, scrollStrategy: any, _defaultActionsComponent: ComponentType<any>, _model: MatTimeSelectionModel<S, T>, _defaults?: MatTimepickerDefaultOptions | undefined);
|
|
694
695
|
ngOnChanges(changes: SimpleChanges): void;
|
|
695
696
|
ngOnDestroy(): void;
|
|
696
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.
|
|
5
|
+
"version": "20.2.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Dzmitry Hutaryan"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"timepicker input"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@angular/common": ">=
|
|
31
|
-
"@angular/core": ">=
|
|
32
|
-
"@angular/material": ">=
|
|
30
|
+
"@angular/common": ">=20.2.0",
|
|
31
|
+
"@angular/core": ">=20.2.0",
|
|
32
|
+
"@angular/material": ">=20.0.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"tslib": ">=2.0.0"
|