@dhutaryan/ngx-mat-timepicker 20.1.0 → 21.0.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/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": "
|
|
5
|
+
"version": "21.0.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": ">=21.0.0",
|
|
31
|
+
"@angular/core": ">=21.0.0",
|
|
32
|
+
"@angular/material": ">=21.0.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"tslib": ">=2.0.0"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"exports": {
|
|
38
38
|
".": {
|
|
39
39
|
"sass": "./_index.scss",
|
|
40
|
-
"types": "./
|
|
40
|
+
"types": "./types/dhutaryan-ngx-mat-timepicker.d.ts",
|
|
41
41
|
"default": "./fesm2022/dhutaryan-ngx-mat-timepicker.mjs"
|
|
42
42
|
},
|
|
43
43
|
"./package.json": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"module": "fesm2022/dhutaryan-ngx-mat-timepicker.mjs",
|
|
49
|
-
"typings": "
|
|
49
|
+
"typings": "types/dhutaryan-ngx-mat-timepicker.d.ts"
|
|
50
50
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { InjectionToken, Provider, OnDestroy, AfterContentInit, AfterViewChecked, EventEmitter, 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';
|
|
@@ -46,22 +46,16 @@ declare class MatTimepickerIntl {
|
|
|
46
46
|
type MatTimePeriodType = 'am' | 'pm';
|
|
47
47
|
declare class MatTimePeriod {
|
|
48
48
|
_intl: MatTimepickerIntl;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
set period(value: MatTimePeriodType);
|
|
55
|
-
private _period;
|
|
56
|
-
get disabledPeriod(): MatTimePeriodType | null;
|
|
57
|
-
set disabledPeriod(value: MatTimePeriodType | null);
|
|
58
|
-
private _disabledPeriod;
|
|
59
|
-
periodChanged: EventEmitter<MatTimePeriodType>;
|
|
49
|
+
readonly vertical: i0.InputSignalWithTransform<boolean, unknown>;
|
|
50
|
+
readonly period: i0.InputSignal<MatTimePeriodType>;
|
|
51
|
+
readonly disabledPeriod: i0.InputSignal<MatTimePeriodType | null>;
|
|
52
|
+
readonly periodChanged: i0.OutputEmitterRef<MatTimePeriodType>;
|
|
53
|
+
readonly _currentPeriod: i0.WritableSignal<MatTimePeriodType>;
|
|
60
54
|
constructor(_intl: MatTimepickerIntl);
|
|
61
55
|
setPeriod(event: Event, period: MatTimePeriodType): void;
|
|
62
56
|
_isPeriodDisabled(period: MatTimePeriodType): boolean;
|
|
63
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimePeriod, never>;
|
|
64
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatTimePeriod, "mat-time-period", never, { "vertical": { "alias": "vertical"; "required": false; }; "period": { "alias": "period"; "required": false; }; "disabledPeriod": { "alias": "disabledPeriod"; "required": false; }; }, { "periodChanged": "periodChanged"; }, never, never, true, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatTimePeriod, "mat-time-period", never, { "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "period": { "alias": "period"; "required": false; "isSignal": true; }; "disabledPeriod": { "alias": "disabledPeriod"; "required": false; "isSignal": true; }; }, { "periodChanged": "periodChanged"; }, never, never, true, never>;
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
/** InjectionToken for timepicker that can be used to override default locale code. */
|
|
@@ -324,11 +318,9 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
|
|
|
324
318
|
availableMinutes: number[];
|
|
325
319
|
availableHours: number[];
|
|
326
320
|
/**
|
|
327
|
-
* Used
|
|
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.
|
|
321
|
+
* Used to focus the active cell after change detection has run.
|
|
330
322
|
*/
|
|
331
|
-
private
|
|
323
|
+
private _focusActiveCellAfterViewChecked;
|
|
332
324
|
constructor(_timeAdapter: TimeAdapter<T>);
|
|
333
325
|
ngAfterContentInit(): void;
|
|
334
326
|
ngAfterViewChecked(): void;
|
|
@@ -377,6 +369,8 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
|
|
|
377
369
|
private _setMaxMinute;
|
|
378
370
|
/** Sets disabled period. */
|
|
379
371
|
private _setDisabledPeriod;
|
|
372
|
+
/** Schedules focus to be moved to the active cell on the next tick. */
|
|
373
|
+
private _scheduleFocusActiveCellAfterViewChecked;
|
|
380
374
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeFaceBase<any>, [{ optional: true; }]>;
|
|
381
375
|
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
376
|
}
|
|
@@ -385,22 +379,22 @@ declare abstract class MatTimeFaceBase<T> implements AfterContentInit, AfterView
|
|
|
385
379
|
type TimepickerOrientation = 'horizontal' | 'vertical';
|
|
386
380
|
|
|
387
381
|
type MatDialView = 'hours' | 'minutes';
|
|
388
|
-
declare class MatClockDials<T> extends MatTimeFaceBase<T>
|
|
382
|
+
declare class MatClockDials<T> extends MatTimeFaceBase<T> {
|
|
389
383
|
_intl: MatTimepickerIntl;
|
|
390
|
-
private _ngZone;
|
|
391
384
|
private _elementRef;
|
|
392
385
|
private _cdr;
|
|
393
386
|
/** Layout orientation. */
|
|
394
|
-
orientation: TimepickerOrientation
|
|
387
|
+
readonly orientation: i0.InputSignal<TimepickerOrientation>;
|
|
395
388
|
/** Whether the timepicker UI is in touch mode. */
|
|
396
|
-
touchUi: boolean
|
|
397
|
-
|
|
389
|
+
readonly touchUi: i0.InputSignal<boolean>;
|
|
390
|
+
/** Whether the current view for the timepicker. */
|
|
391
|
+
readonly currentView: i0.InputSignal<MatDialView>;
|
|
392
|
+
/** Emits when the view is changed. */
|
|
393
|
+
readonly viewChanged: i0.OutputEmitterRef<MatDialView>;
|
|
394
|
+
readonly isHoursView: i0.Signal<boolean>;
|
|
398
395
|
/** Specifies the view of clock dial. */
|
|
399
396
|
private readonly _view;
|
|
400
|
-
|
|
401
|
-
constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _ngZone: NgZone, _elementRef: ElementRef, _cdr: ChangeDetectorRef);
|
|
402
|
-
ngOnInit(): void;
|
|
403
|
-
ngOnDestroy(): void;
|
|
397
|
+
constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _elementRef: ElementRef, _cdr: ChangeDetectorRef);
|
|
404
398
|
/** Changes clock dial view. */
|
|
405
399
|
onViewChange(event: Event, view: MatDialView): void;
|
|
406
400
|
focusActiveCell(): void;
|
|
@@ -411,8 +405,8 @@ declare class MatClockDials<T> extends MatTimeFaceBase<T> implements OnInit, OnD
|
|
|
411
405
|
hour: number;
|
|
412
406
|
changeView?: boolean;
|
|
413
407
|
}): void;
|
|
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; }; "touchUi": { "alias": "touchUi"; "required": false; }; }, {}, never, never, true, never>;
|
|
408
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatClockDials<any>, [null, { optional: true; }, null, null]>;
|
|
409
|
+
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
410
|
}
|
|
417
411
|
|
|
418
412
|
declare const MAT_TIMEPICKER_INPUTS_KEYDOWN_HANDLER: InjectionToken<(event: KeyboardEvent) => void>;
|
|
@@ -470,16 +464,15 @@ declare class MatMinuteInput extends MatTimeInputBase {
|
|
|
470
464
|
}
|
|
471
465
|
declare class MatTimeInputs<T> extends MatTimeFaceBase<T> {
|
|
472
466
|
_intl: MatTimepickerIntl;
|
|
473
|
-
private _ngZone;
|
|
474
467
|
private _elementRef;
|
|
475
|
-
constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>,
|
|
468
|
+
constructor(_intl: MatTimepickerIntl, _timeAdapter: TimeAdapter<T>, _elementRef: ElementRef);
|
|
476
469
|
/**
|
|
477
470
|
* Using for skipping that focus shouldn't be moved to the active cell on the next tick.
|
|
478
471
|
* We need to use it to avoid focusing input for input mode.
|
|
479
472
|
*/
|
|
480
473
|
private _skipNextTickFocus;
|
|
481
474
|
focusActiveCell(): void;
|
|
482
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeInputs<any>, [null, { optional: true; }, null
|
|
475
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimeInputs<any>, [null, { optional: true; }, null]>;
|
|
483
476
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatTimeInputs<any>, "mat-time-inputs", never, {}, {}, never, never, true, never>;
|
|
484
477
|
}
|
|
485
478
|
|
|
@@ -572,6 +565,10 @@ interface MatTimepickerControl<T> {
|
|
|
572
565
|
}
|
|
573
566
|
/** A timepicker that can be attached to a {@link MatTimepickerControl}. */
|
|
574
567
|
interface MatTimepickerPanel<C extends MatTimepickerControl<T>, S, T = ExtractTimeTypeFromSelection<S>> {
|
|
568
|
+
/** The id for the timepicker's. */
|
|
569
|
+
id: string;
|
|
570
|
+
/** Whether the timepicker is open. */
|
|
571
|
+
opened: boolean;
|
|
575
572
|
/** Stream that emits whenever the timepicker is opened. */
|
|
576
573
|
openedStream: EventEmitter<void>;
|
|
577
574
|
/** Stream that emits whenever the timepicker is closed. */
|
|
@@ -609,7 +606,7 @@ declare const MAT_TIMEPICKER_DEFAULT_OPTIONS: InjectionToken<MatTimepickerDefaul
|
|
|
609
606
|
declare abstract class MatTimepickerBase<C extends MatTimepickerControl<T>, S, T = ExtractTimeTypeFromSelection<S>> implements OnChanges {
|
|
610
607
|
private _viewContainerRef;
|
|
611
608
|
private _overlay;
|
|
612
|
-
private
|
|
609
|
+
private readonly _injector;
|
|
613
610
|
private _defaultActionsComponent;
|
|
614
611
|
private _model;
|
|
615
612
|
private _defaults?;
|
|
@@ -692,7 +689,7 @@ declare abstract class MatTimepickerBase<C extends MatTimepickerControl<T>, S, T
|
|
|
692
689
|
_getMinTime(): T | null;
|
|
693
690
|
/** The maximum selectable time. */
|
|
694
691
|
_getMaxTime(): T | null;
|
|
695
|
-
constructor(_viewContainerRef: ViewContainerRef, _overlay: Overlay,
|
|
692
|
+
constructor(_viewContainerRef: ViewContainerRef, _overlay: Overlay, _injector: Injector, scrollStrategy: any, _defaultActionsComponent: ComponentType<any>, _model: MatTimeSelectionModel<S, T>, _defaults?: MatTimepickerDefaultOptions | undefined);
|
|
696
693
|
ngOnChanges(changes: SimpleChanges): void;
|
|
697
694
|
ngOnDestroy(): void;
|
|
698
695
|
/** Opens the timepicker. */
|
|
@@ -841,7 +838,7 @@ declare abstract class MatTimepickerInputBase<S, T = ExtractTimeTypeFromSelectio
|
|
|
841
838
|
ngOnDestroy(): void;
|
|
842
839
|
/** Registers a time selection model with the input. */
|
|
843
840
|
_registerModel(model: MatTimeSelectionModel<S, T>): void;
|
|
844
|
-
_onInput(
|
|
841
|
+
_onInput(event: Event): void;
|
|
845
842
|
/** Handles change event on the input. */
|
|
846
843
|
_onChange(): void;
|
|
847
844
|
/** Handles blur event on the input. */
|