@ng-matero/extensions 14.5.0 → 14.6.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.
Files changed (35) hide show
  1. package/core/datetime/datetime-adapter.d.ts +1 -1
  2. package/datetimepicker/_datetimepicker-theme.scss +38 -12
  3. package/datetimepicker/calendar.d.ts +28 -17
  4. package/datetimepicker/calendar.scss +68 -92
  5. package/datetimepicker/clock.d.ts +3 -2
  6. package/datetimepicker/clock.scss +1 -1
  7. package/datetimepicker/datetimepicker-content.scss +21 -6
  8. package/datetimepicker/datetimepicker-intl.d.ts +51 -0
  9. package/datetimepicker/datetimepicker-module.d.ts +13 -12
  10. package/datetimepicker/datetimepicker-toggle.d.ts +6 -4
  11. package/datetimepicker/datetimepicker-types.d.ts +4 -0
  12. package/datetimepicker/datetimepicker.d.ts +13 -3
  13. package/datetimepicker/public-api.d.ts +1 -0
  14. package/datetimepicker/time.d.ts +130 -0
  15. package/datetimepicker/time.scss +78 -0
  16. package/esm2020/core/datetime/datetime-adapter.mjs +1 -1
  17. package/esm2020/datetimepicker/calendar-body.mjs +3 -3
  18. package/esm2020/datetimepicker/calendar.mjs +81 -33
  19. package/esm2020/datetimepicker/clock.mjs +14 -8
  20. package/esm2020/datetimepicker/datetimepicker-intl.mjs +63 -0
  21. package/esm2020/datetimepicker/datetimepicker-module.mjs +8 -1
  22. package/esm2020/datetimepicker/datetimepicker-toggle.mjs +9 -6
  23. package/esm2020/datetimepicker/datetimepicker-types.mjs +1 -1
  24. package/esm2020/datetimepicker/datetimepicker.mjs +22 -6
  25. package/esm2020/datetimepicker/public-api.mjs +2 -1
  26. package/esm2020/datetimepicker/time.mjs +453 -0
  27. package/esm2020/grid/grid.interface.mjs +1 -1
  28. package/fesm2015/mtxCore.mjs.map +1 -1
  29. package/fesm2015/mtxDatetimepicker.mjs +636 -52
  30. package/fesm2015/mtxDatetimepicker.mjs.map +1 -1
  31. package/fesm2020/mtxCore.mjs.map +1 -1
  32. package/fesm2020/mtxDatetimepicker.mjs +633 -52
  33. package/fesm2020/mtxDatetimepicker.mjs.map +1 -1
  34. package/grid/grid.interface.d.ts +0 -1
  35. package/package.json +1 -1
@@ -9,7 +9,7 @@ export declare abstract class DatetimeAdapter<D> extends DateAdapter<D> {
9
9
  abstract getHourNames(): string[];
10
10
  abstract getMinuteNames(): string[];
11
11
  abstract addCalendarHours(date: D, months: number): D;
12
- abstract addCalendarMinutes(date: D, months: number): D;
12
+ abstract addCalendarMinutes(date: D, minutes: number): D;
13
13
  abstract createDatetime(year: number, month: number, date: number, hour: number, minute: number): D;
14
14
  getValidDateOrNull(obj: any): D | null;
15
15
  compareDatetime(first: D, second: D, respectMinutePart?: boolean): number | boolean;
@@ -8,13 +8,14 @@
8
8
  $selected-today-box-shadow-width: 1px;
9
9
  $calendar-body-font-size: 13px !default;
10
10
  $calendar-weekday-table-font-size: 11px !default;
11
- $calendar-header-font-size: 28px !default;
12
11
  $clock-font-size: 14px !default;
13
12
 
14
13
  @mixin color($config-or-theme) {
15
14
  $config: theming.get-color-config($config-or-theme);
16
15
  $is-dark-theme: map.get($config, is-dark);
17
16
  $primary: map.get($config, primary);
17
+ $accent: map.get($config, accent);
18
+ $warn: map.get($config, warn);
18
19
  $background: map.get($config, background);
19
20
  $foreground: map.get($config, foreground);
20
21
  $disabled-color: theming.get-color-from-palette($foreground, disabled-text);
@@ -122,14 +123,47 @@ $clock-font-size: 14px !default;
122
123
  }
123
124
 
124
125
  .mtx-datetimepicker-toggle-active {
125
- color: theming.get-color-from-palette(map.get($config, primary), text);
126
+ color: theming.get-color-from-palette($primary);
126
127
 
127
128
  &.mat-accent {
128
- color: theming.get-color-from-palette(map.get($config, accent), text);
129
+ color: theming.get-color-from-palette($accent);
129
130
  }
130
131
 
131
132
  &.mat-warn {
132
- color: theming.get-color-from-palette(map.get($config, warn), text);
133
+ color: theming.get-color-from-palette($warn);
134
+ }
135
+ }
136
+
137
+ .mtx-time-input {
138
+ color: theming.get-color-from-palette($foreground, text);
139
+ background-color: theming.get-color-from-palette($background, disabled-button);
140
+
141
+ &.mtx-time-input-active {
142
+ color: theming.get-color-from-palette($primary);
143
+ background-color: theming.get-color-from-palette($primary, .2);
144
+
145
+ &:focus {
146
+ border-color: theming.get-color-from-palette($primary);
147
+ background-color: theming.get-color-from-palette($background, background);
148
+
149
+ &::placeholder {
150
+ color: theming.get-color-from-palette($primary, .6);
151
+ }
152
+ }
153
+ }
154
+
155
+ &.mtx-time-input-warning {
156
+ border-color: theming.get-color-from-palette($warn);
157
+ }
158
+ }
159
+
160
+ .mtx-time-am.mat-button,
161
+ .mtx-time-pm.mat-button {
162
+ color: theming.get-color-from-palette($foreground, text);
163
+ border-color: theming.get-color-from-palette($foreground, hint-text);
164
+
165
+ &.mtx-time-ampm-active {
166
+ background-color: theming.get-color-from-palette($accent, .2);
133
167
  }
134
168
  }
135
169
  }
@@ -162,14 +196,6 @@ $clock-font-size: 14px !default;
162
196
  }
163
197
  }
164
198
 
165
- .mtx-calendar-header-date-time {
166
- font-size: $calendar-header-font-size;
167
- }
168
-
169
- .mtx-calendar-header-ampm-container {
170
- font-size: .65em;
171
- }
172
-
173
199
  .mtx-clock {
174
200
  font-size: $clock-font-size;
175
201
  }
@@ -1,13 +1,11 @@
1
1
  import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
2
2
  import { BooleanInput } from '@angular/cdk/coercion';
3
- import { MatDatepickerIntl } from '@angular/material/datepicker';
4
3
  import { DatetimeAdapter, MtxDatetimeFormats } from '@ng-matero/extensions/core';
5
4
  import { MtxClockView } from './clock';
6
5
  import { MtxDatetimepickerFilterType } from './datetimepicker-filtertype';
7
- import { MtxDatetimepickerType } from './datetimepicker-types';
6
+ import { MtxAMPM, MtxCalendarView, MtxDatetimepickerType } from './datetimepicker-types';
7
+ import { MtxDatetimepickerIntl } from './datetimepicker-intl';
8
8
  import * as i0 from "@angular/core";
9
- /** Possible views for datetimepicker calendar. */
10
- export declare type MtxCalendarView = 'clock' | 'month' | 'year' | 'multi-year';
11
9
  /**
12
10
  * A calendar that is used as part of the datetimepicker.
13
11
  * @docs-private
@@ -39,12 +37,12 @@ export declare class MtxCalendar<D> implements AfterContentInit, OnDestroy {
39
37
  /** Emits when the view has been changed. */
40
38
  viewChanged: EventEmitter<MtxCalendarView>;
41
39
  _userSelection: EventEmitter<void>;
42
- _AMPM: string;
40
+ _AMPM: MtxAMPM;
43
41
  _clockView: MtxClockView;
44
42
  _calendarState: string;
45
43
  private _intlChanges;
46
44
  private _clampedActiveDate;
47
- constructor(_elementRef: ElementRef, _intl: MatDatepickerIntl, _ngZone: NgZone, _adapter: DatetimeAdapter<D>, _dateFormats: MtxDatetimeFormats, changeDetectorRef: ChangeDetectorRef);
45
+ constructor(_elementRef: ElementRef, _intl: MtxDatetimepickerIntl, _ngZone: NgZone, _adapter: DatetimeAdapter<D>, _dateFormats: MtxDatetimeFormats, _changeDetectorRef: ChangeDetectorRef);
48
46
  /** The display type of datetimepicker. */
49
47
  get type(): MtxDatetimepickerType;
50
48
  set type(value: MtxDatetimepickerType);
@@ -53,6 +51,14 @@ export declare class MtxCalendar<D> implements AfterContentInit, OnDestroy {
53
51
  get startAt(): D | null;
54
52
  set startAt(value: D | null);
55
53
  private _startAt;
54
+ /**
55
+ * Whether the calendar is in time mode. In time mode the calendar clock gets time input elements rather then just clock
56
+ *
57
+ * When touchUi is enabled this will be disabled
58
+ */
59
+ get timeInput(): boolean;
60
+ set timeInput(value: boolean);
61
+ private _timeInput;
56
62
  /** The currently selected date. */
57
63
  get selected(): D | null;
58
64
  set selected(value: D | null);
@@ -74,15 +80,18 @@ export declare class MtxCalendar<D> implements AfterContentInit, OnDestroy {
74
80
  /** Whether the calendar is in month view. */
75
81
  get currentView(): MtxCalendarView;
76
82
  set currentView(view: MtxCalendarView);
77
- _currentView: MtxCalendarView;
78
- /** The label for the current calendar view. */
79
- get _yearLabel(): string;
80
- get _monthYearLabel(): string;
81
- get _dateLabel(): string;
82
- get _hoursLabel(): string;
83
- get _minutesLabel(): string;
84
- get _ariaLabelNext(): string;
85
- get _ariaLabelPrev(): string;
83
+ private _currentView;
84
+ get _yearPeriodText(): string;
85
+ get _yearButtonText(): string;
86
+ get _yearButtonLabel(): string;
87
+ get _dateButtonText(): string;
88
+ get _dateButtonLabel(): string;
89
+ get _hoursButtonText(): string;
90
+ get _hourButtonLabel(): string;
91
+ get _minutesButtonText(): string;
92
+ get _minuteButtonLabel(): string;
93
+ get _prevButtonLabel(): string;
94
+ get _nextButtonLabel(): string;
86
95
  /** Date filter for the month and year views. */
87
96
  _dateFilterForViews: (date: D) => boolean;
88
97
  _userSelected(): void;
@@ -95,10 +104,11 @@ export declare class MtxCalendar<D> implements AfterContentInit, OnDestroy {
95
104
  /** Handles year selection in the multi year view. */
96
105
  _yearSelected(year: D): void;
97
106
  _timeSelected(date: D): void;
107
+ _dialTimeSelected(date: D): void;
98
108
  _onActiveDateChange(date: D): void;
99
109
  _updateDate(date: D): D;
100
110
  _selectAMPM(date: D): void;
101
- _ampmClicked(source: string): void;
111
+ _ampmClicked(source: MtxAMPM): void;
102
112
  _yearClicked(): void;
103
113
  _dateClicked(): void;
104
114
  _hoursClicked(): void;
@@ -139,6 +149,7 @@ export declare class MtxCalendar<D> implements AfterContentInit, OnDestroy {
139
149
  private _2digit;
140
150
  static ngAcceptInputType_multiYearSelector: BooleanInput;
141
151
  static ngAcceptInputType_twelvehour: BooleanInput;
152
+ static ngAcceptInputType_timeInput: BooleanInput;
142
153
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxCalendar<any>, [null, null, null, { optional: true; }, { optional: true; }, null]>;
143
- static ɵcmp: i0.ɵɵComponentDeclaration<MtxCalendar<any>, "mtx-calendar", ["mtxCalendar"], { "multiYearSelector": "multiYearSelector"; "twelvehour": "twelvehour"; "startView": "startView"; "timeInterval": "timeInterval"; "dateFilter": "dateFilter"; "preventSameDateTimeSelection": "preventSameDateTimeSelection"; "type": "type"; "startAt": "startAt"; "selected": "selected"; "minDate": "minDate"; "maxDate": "maxDate"; }, { "selectedChange": "selectedChange"; "viewChanged": "viewChanged"; "_userSelection": "_userSelection"; }, never, never, false>;
154
+ static ɵcmp: i0.ɵɵComponentDeclaration<MtxCalendar<any>, "mtx-calendar", ["mtxCalendar"], { "multiYearSelector": "multiYearSelector"; "twelvehour": "twelvehour"; "startView": "startView"; "timeInterval": "timeInterval"; "dateFilter": "dateFilter"; "preventSameDateTimeSelection": "preventSameDateTimeSelection"; "type": "type"; "startAt": "startAt"; "timeInput": "timeInput"; "selected": "selected"; "minDate": "minDate"; "maxDate": "maxDate"; }, { "selectedChange": "selectedChange"; "viewChanged": "viewChanged"; "_userSelection": "_userSelection"; }, never, never, false>;
144
155
  }
@@ -12,56 +12,84 @@ $calendar-prev-next-icon-margin: 15.5px;
12
12
  $calendar-prev-icon-transform: translateX(2px) rotate(-45deg);
13
13
  $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
14
14
 
15
- .mtx-calendar {
16
- display: block;
17
- outline: none;
18
-
19
- &[mode='landscape'] {
15
+ @mixin landscape-calendar-header {
16
+ .mtx-calendar {
20
17
  display: flex;
21
- }
22
- }
23
18
 
24
- .mtx-calendar-header {
25
- padding: $calendar-padding * 2;
26
- box-sizing: border-box;
27
- border-radius: 4px 4px 0 0;
19
+ .mtx-calendar-header {
20
+ width: 150px;
21
+ min-width: 150px;
22
+ padding: 16px 8px;
23
+ border-radius: 4px 0 0 4px;
28
24
 
29
- [mode='landscape'] & {
30
- width: 150px;
31
- min-width: 150px;
32
- border-radius: 4px 0 0 4px;
25
+ [dir='rtl'] & {
26
+ border-radius: 0 4px 4px 0;
27
+ }
28
+ }
33
29
 
34
- [dir='rtl'] & {
35
- border-radius: 0 4px 4px 0;
30
+ .mtx-calendar-header-year + .mtx-calendar-header-date-time,
31
+ .mtx-calendar-header-date + .mtx-calendar-header-time {
32
+ margin-top: 4px;
33
+ }
34
+
35
+ .mtx-calendar-header-date-time {
36
+ font-size: 28px;
37
+ }
38
+
39
+ .mtx-calendar-header-time {
40
+ display: flex;
41
+ flex-direction: column;
42
+
43
+ .mat-button {
44
+ width: 40px;
45
+ text-align: center;
46
+ }
47
+ }
48
+
49
+ .mtx-calendar-header-ampm-container {
50
+ flex-direction: row;
51
+ font-size: 20px;
52
+ }
53
+
54
+ .mtx-calendar-header-ampm {
55
+ padding: 4px;
56
+
57
+ + .mtx-calendar-header-ampm {
58
+ margin: 0 8px;
59
+ }
36
60
  }
37
61
  }
38
62
  }
39
63
 
40
- .mtx-calendar-header-year,
41
- .mtx-calendar-header-date-time {
42
- width: 100%;
43
- white-space: nowrap;
64
+ .mtx-calendar {
65
+ display: block;
66
+ outline: none;
44
67
  }
45
68
 
46
- .mtx-calendar-header-year {
47
- line-height: 24px;
69
+ .mtx-calendar-header {
70
+ box-sizing: border-box;
71
+ padding: 8px;
72
+ border-radius: 4px 4px 0 0;
48
73
 
49
- > * {
50
- vertical-align: middle;
74
+ .mat-button {
75
+ min-width: auto;
76
+ padding: 0 4px;
77
+ text-align: inherit;
78
+ line-height: inherit;
79
+ font-size: inherit;
80
+ font-weight: inherit;
81
+ white-space: normal;
82
+ word-break: break-word;
51
83
  }
84
+ }
52
85
 
53
- + .mtx-calendar-header-date-time {
54
- margin-top: 4px;
55
- }
86
+ .mtx-calendar-header-year.mat-button {
87
+ line-height: 24px;
56
88
  }
57
89
 
58
90
  .mtx-calendar-header-date-time {
91
+ font-size: 24px;
59
92
  line-height: 36px;
60
-
61
- [mode='landscape'] & {
62
- white-space: normal;
63
- word-wrap: break-word;
64
- }
65
93
  }
66
94
 
67
95
  .mtx-calendar-header-year,
@@ -70,7 +98,6 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
70
98
  .mtx-calendar-header-minutes,
71
99
  .mtx-calendar-header-ampm {
72
100
  &:not(.active) {
73
- cursor: pointer;
74
101
  opacity: .6;
75
102
  }
76
103
 
@@ -88,23 +115,9 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
88
115
  .mtx-calendar-header-hours,
89
116
  .mtx-calendar-header-minutes,
90
117
  .mtx-calendar-header-ampm {
91
- cursor: pointer;
92
118
  opacity: 1;
93
119
  }
94
120
  }
95
-
96
- [mode='landscape'] & {
97
- display: flex;
98
- flex-direction: column;
99
- }
100
- }
101
-
102
- .mtx-calendar-header-hour-minute-container {
103
- padding: 0 8px;
104
-
105
- [mode='landscape'] & {
106
- padding: 0;
107
- }
108
121
  }
109
122
 
110
123
  .mtx-calendar-header-hour-minute-separator {
@@ -117,15 +130,16 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
117
130
  display: inline-flex;
118
131
  flex-direction: column;
119
132
  line-height: 18px;
133
+ font-size: 12px;
134
+ }
120
135
 
121
- [mode='landscape'] & {
122
- flex-direction: row;
123
- }
136
+ [mode='landscape'] {
137
+ @include landscape-calendar-header;
124
138
  }
125
139
 
126
- .mtx-calendar-header-ampm {
127
- [mode='landscape'] & {
128
- padding: 4px;
140
+ @media all and (orientation: landscape) {
141
+ [mode='auto'] {
142
+ @include landscape-calendar-header;
129
143
  }
130
144
  }
131
145
 
@@ -183,41 +197,3 @@ $calendar-next-icon-transform: translateX(-2px) rotate(45deg);
183
197
  text-align: center;
184
198
  padding: $calendar-padding 0;
185
199
  }
186
-
187
- @media all and (orientation: landscape) {
188
- .mtx-calendar[mode='auto'] {
189
- display: flex;
190
-
191
- .mtx-calendar-header {
192
- width: 150px;
193
- min-width: 150px;
194
- border-radius: 4px 0 0 4px;
195
-
196
- [dir='rtl'] & {
197
- border-radius: 0 4px 4px 0;
198
- }
199
- }
200
-
201
- .mtx-calendar-header-date-time {
202
- white-space: normal;
203
- word-wrap: break-word;
204
- }
205
-
206
- .mtx-calendar-header-time {
207
- display: flex;
208
- flex-direction: column;
209
- }
210
-
211
- .mtx-calendar-header-hour-minute-container {
212
- padding: 0;
213
- }
214
-
215
- .mtx-calendar-header-ampm-container {
216
- flex-direction: row;
217
- }
218
-
219
- .mtx-calendar-header-ampm {
220
- padding: 4px;
221
- }
222
- }
223
- }
@@ -1,5 +1,5 @@
1
1
  import { BooleanInput } from '@angular/cdk/coercion';
2
- import { AfterContentInit, ElementRef, EventEmitter } from '@angular/core';
2
+ import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
3
3
  import { DatetimeAdapter } from '@ng-matero/extensions/core';
4
4
  import { MtxDatetimepickerFilterType } from './datetimepicker-filtertype';
5
5
  import * as i0 from "@angular/core";
@@ -16,6 +16,7 @@ export declare type MtxClockView = 'hour' | 'minute';
16
16
  export declare class MtxClock<D> implements AfterContentInit {
17
17
  private _element;
18
18
  private _adapter;
19
+ private _cdr;
19
20
  /** A function used to filter which dates are selectable. */
20
21
  dateFilter: (date: D, type: MtxDatetimepickerFilterType) => boolean;
21
22
  /** Step over minutes. */
@@ -38,7 +39,7 @@ export declare class MtxClock<D> implements AfterContentInit {
38
39
  private _timeChanged;
39
40
  private mouseMoveListener;
40
41
  private mouseUpListener;
41
- constructor(_element: ElementRef, _adapter: DatetimeAdapter<D>);
42
+ constructor(_element: ElementRef, _adapter: DatetimeAdapter<D>, _cdr: ChangeDetectorRef);
42
43
  /**
43
44
  * The date to display in this clock view.
44
45
  */
@@ -1,5 +1,5 @@
1
1
  $clock-min-size: 224px !default;
2
- $clock-margin: 8px !default;
2
+ $clock-margin: 12px !default;
3
3
  $clock-cell-size: 14.1666% !default;
4
4
 
5
5
  .mtx-clock {
@@ -4,6 +4,8 @@ $non-touch-calendar-portrait-width: $non-touch-calendar-cell-size * 7 + $calenda
4
4
  $non-touch-calendar-portrait-height: 424px;
5
5
  $non-touch-calendar-landscape-width: 446px;
6
6
  $non-touch-calendar-landscape-height: 328px;
7
+ $non-touch-calendar-with-time-input-portrait-height: 490px;
8
+ $non-touch-calendar-with-time-input-landscape-height: 412px;
7
9
 
8
10
  // Ideally the calendar would have a constant aspect ratio, no matter its size, and we would base
9
11
  // these measurements off the aspect ratio. Unfortunately, the aspect ratio does change a little as
@@ -24,6 +26,17 @@ $touch-min-height: 300px;
24
26
  $touch-max-width: 750px;
25
27
  $touch-max-height: 850px;
26
28
 
29
+ @mixin landscape-calendar-size {
30
+ .mtx-calendar {
31
+ width: $non-touch-calendar-landscape-width;
32
+ height: $non-touch-calendar-landscape-height;
33
+
34
+ &.mtx-calendar-with-time-input {
35
+ height: $non-touch-calendar-with-time-input-landscape-height;
36
+ }
37
+ }
38
+ }
39
+
27
40
  .mtx-datetimepicker-content {
28
41
  display: block;
29
42
  border-radius: 4px;
@@ -41,16 +54,18 @@ $touch-max-height: 850px;
41
54
  width: $non-touch-calendar-portrait-width;
42
55
  height: $non-touch-calendar-portrait-height;
43
56
 
44
- &[mode='landscape'] {
45
- width: $non-touch-calendar-landscape-width;
46
- height: $non-touch-calendar-landscape-height;
57
+ &.mtx-calendar-with-time-input {
58
+ height: $non-touch-calendar-with-time-input-portrait-height;
47
59
  }
48
60
  }
49
61
 
62
+ .mtx-datetimepicker-content[mode='landscape'] {
63
+ @include landscape-calendar-size;
64
+ }
65
+
50
66
  @media all and (orientation: landscape) {
51
- .mtx-datetimepicker-content .mtx-calendar[mode='auto'] {
52
- width: $non-touch-calendar-landscape-width;
53
- height: $non-touch-calendar-landscape-height;
67
+ .mtx-datetimepicker-content[mode='auto'] {
68
+ @include landscape-calendar-size;
54
69
  }
55
70
  }
56
71
 
@@ -0,0 +1,51 @@
1
+ import { Subject } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class MtxDatetimepickerIntl {
4
+ /**
5
+ * Stream to emit from when labels are changed. Use this to notify components when the labels have
6
+ * changed after initialization.
7
+ */
8
+ readonly changes: Subject<void>;
9
+ /** A label for the calendar popup (used by screen readers). */
10
+ calendarLabel: string;
11
+ /** A label for the button used to open the calendar popup (used by screen readers). */
12
+ openCalendarLabel: string;
13
+ /** Label for the button used to close the calendar popup. */
14
+ closeCalendarLabel: string;
15
+ /** A label for the previous month button (used by screen readers). */
16
+ prevMonthLabel: string;
17
+ /** A label for the next month button (used by screen readers). */
18
+ nextMonthLabel: string;
19
+ /** A label for the previous year button (used by screen readers). */
20
+ prevYearLabel: string;
21
+ /** A label for the next year button (used by screen readers). */
22
+ nextYearLabel: string;
23
+ /** A label for the previous multi-year button (used by screen readers). */
24
+ prevMultiYearLabel: string;
25
+ /** A label for the next multi-year button (used by screen readers). */
26
+ nextMultiYearLabel: string;
27
+ /** A label for the 'switch to month view' button (used by screen readers). */
28
+ switchToMonthViewLabel: string;
29
+ /** A label for the 'switch to year view' button (used by screen readers). */
30
+ switchToYearViewLabel: string;
31
+ /** A label for the 'switch to multi-year view' button (used by screen readers). */
32
+ switchToMultiYearViewLabel: string;
33
+ /** A label for the first date of a range of dates (used by screen readers). */
34
+ startDateLabel: string;
35
+ /** A label for the last date of a range of dates (used by screen readers). */
36
+ endDateLabel: string;
37
+ /** Formats a range of years (used for visuals). */
38
+ formatYearRange(start: string, end: string): string;
39
+ /** Formats a label for a range of years (used by screen readers). */
40
+ formatYearRangeLabel(start: string, end: string): string;
41
+ /** A label for the 'switch to clock hour view' button (used by screen readers). */
42
+ switchToClockHourViewLabel: string;
43
+ /** A label for the 'switch to clock minute view' button (used by screen readers). */
44
+ switchToClockMinuteViewLabel: string;
45
+ /** Label used for ok button within the manual time input. */
46
+ okLabel: string;
47
+ /** Label used for cancel button within the manual time input. */
48
+ cancelLabel: string;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxDatetimepickerIntl, never>;
50
+ static ɵprov: i0.ɵɵInjectableDeclaration<MtxDatetimepickerIntl>;
51
+ }
@@ -2,19 +2,20 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./calendar";
3
3
  import * as i2 from "./calendar-body";
4
4
  import * as i3 from "./clock";
5
- import * as i4 from "./datetimepicker";
6
- import * as i5 from "./datetimepicker-toggle";
7
- import * as i6 from "./datetimepicker-input";
8
- import * as i7 from "./month-view";
9
- import * as i8 from "./year-view";
10
- import * as i9 from "./multi-year-view";
11
- import * as i10 from "@angular/common";
12
- import * as i11 from "@angular/material/button";
13
- import * as i12 from "@angular/cdk/overlay";
14
- import * as i13 from "@angular/cdk/a11y";
15
- import * as i14 from "@angular/cdk/portal";
5
+ import * as i4 from "./time";
6
+ import * as i5 from "./datetimepicker";
7
+ import * as i6 from "./datetimepicker-toggle";
8
+ import * as i7 from "./datetimepicker-input";
9
+ import * as i8 from "./month-view";
10
+ import * as i9 from "./year-view";
11
+ import * as i10 from "./multi-year-view";
12
+ import * as i11 from "@angular/common";
13
+ import * as i12 from "@angular/material/button";
14
+ import * as i13 from "@angular/cdk/overlay";
15
+ import * as i14 from "@angular/cdk/a11y";
16
+ import * as i15 from "@angular/cdk/portal";
16
17
  export declare class MtxDatetimepickerModule {
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxDatetimepickerModule, never>;
18
- static ɵmod: i0.ɵɵNgModuleDeclaration<MtxDatetimepickerModule, [typeof i1.MtxCalendar, typeof i2.MtxCalendarBody, typeof i3.MtxClock, typeof i4.MtxDatetimepicker, typeof i5.MtxDatetimepickerToggle, typeof i5.MtxDatetimepickerToggleIcon, typeof i6.MtxDatetimepickerInput, typeof i4.MtxDatetimepickerContent, typeof i7.MtxMonthView, typeof i8.MtxYearView, typeof i9.MtxMultiYearView], [typeof i10.CommonModule, typeof i11.MatButtonModule, typeof i12.OverlayModule, typeof i13.A11yModule, typeof i14.PortalModule], [typeof i1.MtxCalendar, typeof i2.MtxCalendarBody, typeof i3.MtxClock, typeof i4.MtxDatetimepicker, typeof i5.MtxDatetimepickerToggle, typeof i5.MtxDatetimepickerToggleIcon, typeof i6.MtxDatetimepickerInput, typeof i4.MtxDatetimepickerContent, typeof i7.MtxMonthView, typeof i8.MtxYearView, typeof i9.MtxMultiYearView]>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MtxDatetimepickerModule, [typeof i1.MtxCalendar, typeof i2.MtxCalendarBody, typeof i3.MtxClock, typeof i4.MtxTime, typeof i4.MtxTimeInput, typeof i5.MtxDatetimepicker, typeof i6.MtxDatetimepickerToggle, typeof i6.MtxDatetimepickerToggleIcon, typeof i7.MtxDatetimepickerInput, typeof i5.MtxDatetimepickerContent, typeof i8.MtxMonthView, typeof i9.MtxYearView, typeof i10.MtxMultiYearView], [typeof i11.CommonModule, typeof i12.MatButtonModule, typeof i13.OverlayModule, typeof i14.A11yModule, typeof i15.PortalModule], [typeof i1.MtxCalendar, typeof i2.MtxCalendarBody, typeof i3.MtxClock, typeof i4.MtxTime, typeof i5.MtxDatetimepicker, typeof i6.MtxDatetimepickerToggle, typeof i6.MtxDatetimepickerToggleIcon, typeof i7.MtxDatetimepickerInput, typeof i5.MtxDatetimepickerContent, typeof i8.MtxMonthView, typeof i9.MtxYearView, typeof i10.MtxMultiYearView]>;
19
20
  static ɵinj: i0.ɵɵInjectorDeclaration<MtxDatetimepickerModule>;
20
21
  }
@@ -1,8 +1,8 @@
1
1
  import { AfterContentInit, ChangeDetectorRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
2
  import { BooleanInput } from '@angular/cdk/coercion';
3
3
  import { MatButton } from '@angular/material/button';
4
- import { MatDatepickerIntl } from '@angular/material/datepicker';
5
4
  import { MtxDatetimepicker } from './datetimepicker';
5
+ import { MtxDatetimepickerIntl } from './datetimepicker-intl';
6
6
  import * as i0 from "@angular/core";
7
7
  /** Can be used to override the icon of a `mtxDatetimepickerToggle`. */
8
8
  export declare class MtxDatetimepickerToggleIcon {
@@ -10,13 +10,15 @@ export declare class MtxDatetimepickerToggleIcon {
10
10
  static ɵdir: i0.ɵɵDirectiveDeclaration<MtxDatetimepickerToggleIcon, "[mtxDatetimepickerToggleIcon]", never, {}, {}, never, never, false>;
11
11
  }
12
12
  export declare class MtxDatetimepickerToggle<D> implements AfterContentInit, OnChanges, OnDestroy {
13
- _intl: MatDatepickerIntl;
13
+ _intl: MtxDatetimepickerIntl;
14
14
  private _changeDetectorRef;
15
15
  private _stateChanges;
16
16
  /** Datetimepicker instance that the button will toggle. */
17
17
  datetimepicker: MtxDatetimepicker<D>;
18
18
  /** Tabindex for the toggle. */
19
19
  tabIndex: number;
20
+ /** Screen-reader label for the button. */
21
+ ariaLabel?: string;
20
22
  /** Whether the toggle button is disabled. */
21
23
  get disabled(): boolean;
22
24
  set disabled(value: boolean);
@@ -27,7 +29,7 @@ export declare class MtxDatetimepickerToggle<D> implements AfterContentInit, OnC
27
29
  _customIcon: MtxDatetimepickerToggleIcon;
28
30
  /** Underlying button element. */
29
31
  _button: MatButton;
30
- constructor(_intl: MatDatepickerIntl, _changeDetectorRef: ChangeDetectorRef);
32
+ constructor(_intl: MtxDatetimepickerIntl, _changeDetectorRef: ChangeDetectorRef);
31
33
  ngOnChanges(changes: SimpleChanges): void;
32
34
  ngOnDestroy(): void;
33
35
  ngAfterContentInit(): void;
@@ -36,5 +38,5 @@ export declare class MtxDatetimepickerToggle<D> implements AfterContentInit, OnC
36
38
  static ngAcceptInputType_disabled: BooleanInput;
37
39
  static ngAcceptInputType_disableRipple: BooleanInput;
38
40
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxDatetimepickerToggle<any>, never>;
39
- static ɵcmp: i0.ɵɵComponentDeclaration<MtxDatetimepickerToggle<any>, "mtx-datetimepicker-toggle", ["mtxDatetimepickerToggle"], { "datetimepicker": "for"; "tabIndex": "tabIndex"; "disabled": "disabled"; "disableRipple": "disableRipple"; }, {}, ["_customIcon"], ["[mtxDatetimepickerToggleIcon]"], false>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<MtxDatetimepickerToggle<any>, "mtx-datetimepicker-toggle", ["mtxDatetimepickerToggle"], { "datetimepicker": "for"; "tabIndex": "tabIndex"; "ariaLabel": "aria-label"; "disabled": "disabled"; "disableRipple": "disableRipple"; }, {}, ["_customIcon"], ["[mtxDatetimepickerToggleIcon]"], false>;
40
42
  }
@@ -1,2 +1,6 @@
1
1
  /** Possible types for datetimepicker. */
2
2
  export declare type MtxDatetimepickerType = 'date' | 'time' | 'month' | 'year' | 'datetime';
3
+ /** Possible views for datetimepicker calendar. */
4
+ export declare type MtxCalendarView = 'clock' | 'month' | 'year' | 'multi-year';
5
+ /** Possible types for AM / PM */
6
+ export declare type MtxAMPM = 'AM' | 'PM';