cmat 0.0.78 → 0.0.80

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 (211) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +9 -46
  2. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  3. package/fesm2022/cmat-components-breadcrumb.mjs +104 -205
  4. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  5. package/fesm2022/cmat-components-card.mjs +4 -8
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +21 -21
  8. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  9. package/fesm2022/cmat-components-cascade.mjs +18 -24
  10. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  11. package/fesm2022/cmat-components-chip-input.mjs +21 -21
  12. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  13. package/fesm2022/cmat-components-code-editor.mjs +4 -22
  14. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  15. package/fesm2022/cmat-components-custom-formly.mjs +181 -245
  16. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  17. package/fesm2022/cmat-components-date-range.mjs +12 -184
  18. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  19. package/fesm2022/cmat-components-date-time-display.mjs +3 -15
  20. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  21. package/fesm2022/cmat-components-drawer.mjs +10 -100
  22. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  23. package/fesm2022/cmat-components-empty-state.mjs +4 -25
  24. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  25. package/fesm2022/cmat-components-file-preview.mjs +3 -21
  26. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  27. package/fesm2022/cmat-components-filter-toolbar.mjs +7 -50
  28. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  29. package/fesm2022/cmat-components-form-actions.mjs +3 -9
  30. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  31. package/fesm2022/cmat-components-fullscreen.mjs +4 -4
  32. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  33. package/fesm2022/cmat-components-highlight.mjs +6 -32
  34. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  35. package/fesm2022/cmat-components-image-viewer.mjs +12 -24
  36. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  37. package/fesm2022/cmat-components-inline-loading.mjs +3 -12
  38. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  39. package/fesm2022/cmat-components-json-editor.mjs +11 -16
  40. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  41. package/fesm2022/cmat-components-knob-input.mjs +24 -18
  42. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  43. package/fesm2022/cmat-components-masonry.mjs +8 -17
  44. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  45. package/fesm2022/cmat-components-material-color-picker.mjs +13 -34
  46. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  47. package/fesm2022/cmat-components-material-datetimepicker.mjs +80 -436
  48. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  49. package/fesm2022/cmat-components-navigation.mjs +266 -816
  50. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  51. package/fesm2022/cmat-components-opt-input.mjs +7 -10
  52. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  53. package/fesm2022/cmat-components-org-chart.mjs +11 -11
  54. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  55. package/fesm2022/cmat-components-page-header.mjs +8 -19
  56. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  57. package/fesm2022/cmat-components-pagination.mjs +113 -108
  58. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  59. package/fesm2022/cmat-components-password-strength.mjs +13 -16
  60. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  61. package/fesm2022/cmat-components-popover.mjs +15 -151
  62. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  63. package/fesm2022/cmat-components-progress-bar.mjs +16 -26
  64. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  65. package/fesm2022/cmat-components-qrcode.mjs +5 -11
  66. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  67. package/fesm2022/cmat-components-rating.mjs +14 -14
  68. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  69. package/fesm2022/cmat-components-rich-text-editor.mjs +4 -25
  70. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  71. package/fesm2022/cmat-components-select-search.mjs +51 -79
  72. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  73. package/fesm2022/cmat-components-select-table.mjs +204 -162
  74. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  75. package/fesm2022/cmat-components-select-tree.mjs +142 -97
  76. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  77. package/fesm2022/cmat-components-skeleton.mjs +4 -22
  78. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  79. package/fesm2022/cmat-components-speed-dial.mjs +14 -19
  80. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  81. package/fesm2022/cmat-components-status-tag.mjs +3 -18
  82. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  83. package/fesm2022/cmat-components-table-toolbar.mjs +3 -15
  84. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  85. package/fesm2022/cmat-components-timeline.mjs +18 -21
  86. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  87. package/fesm2022/cmat-components-toast.mjs +20 -20
  88. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  89. package/fesm2022/cmat-components-transfer-picker.mjs +159 -123
  90. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  91. package/fesm2022/cmat-components-treetable.mjs +17 -19
  92. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  93. package/fesm2022/cmat-components-upload.mjs +35 -57
  94. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  95. package/fesm2022/cmat-components-x6-angular-shape.mjs +0 -4
  96. package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
  97. package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -27
  98. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  99. package/fesm2022/cmat-directives-arrow-cursor.mjs +7 -9
  100. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  101. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  102. package/fesm2022/cmat-directives-data-exporter.mjs +24 -33
  103. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  104. package/fesm2022/cmat-directives-debounce.mjs +14 -17
  105. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  106. package/fesm2022/cmat-directives-digit-only.mjs +6 -23
  107. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  108. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  109. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +4 -11
  110. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  111. package/fesm2022/cmat-lib-mock-api.mjs +6 -43
  112. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  113. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  114. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  115. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -5
  116. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  117. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  118. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  119. package/fesm2022/cmat-pipes-secure.mjs +8 -12
  120. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  122. package/fesm2022/cmat-services-alert.mjs +3 -3
  123. package/fesm2022/cmat-services-config.mjs +50 -26
  124. package/fesm2022/cmat-services-config.mjs.map +1 -1
  125. package/fesm2022/cmat-services-confirmation.mjs +9 -11
  126. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  127. package/fesm2022/cmat-services-data.mjs +56 -101
  128. package/fesm2022/cmat-services-data.mjs.map +1 -1
  129. package/fesm2022/cmat-services-export-as.mjs +4 -32
  130. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  131. package/fesm2022/cmat-services-loading.mjs +49 -40
  132. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  133. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  134. package/fesm2022/cmat-services-media-watcher.mjs +19 -25
  135. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  136. package/fesm2022/cmat-services-platform.mjs +3 -10
  137. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  138. package/fesm2022/cmat-services-splash-screen.mjs +8 -13
  139. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  140. package/fesm2022/cmat-services-title.mjs +8 -12
  141. package/fesm2022/cmat-services-title.mjs.map +1 -1
  142. package/fesm2022/cmat-services-translation.mjs +3 -3
  143. package/fesm2022/cmat-services-utils.mjs +5 -27
  144. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  145. package/fesm2022/cmat-validators.mjs +0 -8
  146. package/fesm2022/cmat-validators.mjs.map +1 -1
  147. package/fesm2022/cmat.mjs +3477 -3795
  148. package/fesm2022/cmat.mjs.map +1 -1
  149. package/package.json +1 -1
  150. package/tailwind/plugins/helpers.js +1 -10
  151. package/tailwind/plugins/scrollbar/index.js +0 -1
  152. package/tailwind/plugins/scrollbar/typedefs.js +1 -7
  153. package/tailwind/plugins/scrollbar/utilities.js +9 -58
  154. package/tailwind/plugins/scrollbar/variants.js +2 -17
  155. package/tailwind/plugins/theming.js +1 -57
  156. package/tailwind/utils/generate-contrasts.js +1 -12
  157. package/tailwind/utils/generate-palette.js +1 -32
  158. package/types/cmat-components-adapter.d.ts +0 -25
  159. package/types/cmat-components-breadcrumb.d.ts +25 -175
  160. package/types/cmat-components-carousel.d.ts +2 -20
  161. package/types/cmat-components-cascade.d.ts +4 -4
  162. package/types/cmat-components-chip-input.d.ts +4 -3
  163. package/types/cmat-components-code-editor.d.ts +0 -18
  164. package/types/cmat-components-custom-formly.d.ts +30 -37
  165. package/types/cmat-components-date-range.d.ts +1 -72
  166. package/types/cmat-components-date-time-display.d.ts +0 -15
  167. package/types/cmat-components-drawer.d.ts +2 -44
  168. package/types/cmat-components-empty-state.d.ts +0 -21
  169. package/types/cmat-components-file-preview.d.ts +0 -18
  170. package/types/cmat-components-filter-toolbar.d.ts +3 -43
  171. package/types/cmat-components-form-actions.d.ts +0 -6
  172. package/types/cmat-components-image-viewer.d.ts +5 -18
  173. package/types/cmat-components-inline-loading.d.ts +0 -9
  174. package/types/cmat-components-json-editor.d.ts +0 -1
  175. package/types/cmat-components-knob-input.d.ts +3 -3
  176. package/types/cmat-components-masonry.d.ts +1 -2
  177. package/types/cmat-components-material-color-picker.d.ts +1 -2
  178. package/types/cmat-components-material-datetimepicker.d.ts +6 -272
  179. package/types/cmat-components-navigation.d.ts +34 -171
  180. package/types/cmat-components-opt-input.d.ts +1 -1
  181. package/types/cmat-components-page-header.d.ts +2 -16
  182. package/types/cmat-components-pagination.d.ts +26 -27
  183. package/types/cmat-components-password-strength.d.ts +1 -2
  184. package/types/cmat-components-popover.d.ts +1 -110
  185. package/types/cmat-components-progress-bar.d.ts +9 -11
  186. package/types/cmat-components-rating.d.ts +6 -7
  187. package/types/cmat-components-rich-text-editor.d.ts +0 -21
  188. package/types/cmat-components-select-search.d.ts +4 -20
  189. package/types/cmat-components-select-table.d.ts +24 -12
  190. package/types/cmat-components-select-tree.d.ts +29 -29
  191. package/types/cmat-components-skeleton.d.ts +0 -18
  192. package/types/cmat-components-speed-dial.d.ts +1 -2
  193. package/types/cmat-components-status-tag.d.ts +0 -15
  194. package/types/cmat-components-table-toolbar.d.ts +0 -12
  195. package/types/cmat-components-timeline.d.ts +3 -4
  196. package/types/cmat-components-toast.d.ts +2 -2
  197. package/types/cmat-components-transfer-picker.d.ts +42 -36
  198. package/types/cmat-components-treetable.d.ts +3 -4
  199. package/types/cmat-components-upload.d.ts +12 -17
  200. package/types/cmat-components-x6-angular-shape.d.ts +0 -1
  201. package/types/cmat-directives-arrow-cursor.d.ts +1 -1
  202. package/types/cmat-directives-debounce.d.ts +3 -4
  203. package/types/cmat-pipes-secure.d.ts +3 -4
  204. package/types/cmat-services-config.d.ts +35 -13
  205. package/types/cmat-services-data.d.ts +13 -12
  206. package/types/cmat-services-export-as.d.ts +0 -22
  207. package/types/cmat-services-loading.d.ts +15 -10
  208. package/types/cmat-services-media-watcher.d.ts +10 -13
  209. package/types/cmat-services-splash-screen.d.ts +2 -4
  210. package/types/cmat-services-title.d.ts +3 -5
  211. package/types/cmat.d.ts +733 -1391
@@ -1,6 +1,6 @@
1
1
  import { NgStyle, NgClass } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, inject, ElementRef, HostListener, Input, HostBinding, Output, ChangeDetectionStrategy, ViewEncapsulation, Component, Injectable, ChangeDetectorRef, Directive, ViewChild, InjectionToken, Injector, ViewContainerRef, DOCUMENT, afterNextRender, forwardRef, ContentChild } from '@angular/core';
3
+ import { EventEmitter, inject, ElementRef, HostListener, Input, HostBinding, Output, ChangeDetectionStrategy, ViewEncapsulation, Component, Injectable, signal, Directive, ViewChild, InjectionToken, Injector, ViewContainerRef, DOCUMENT, afterNextRender, forwardRef, ContentChild } from '@angular/core';
4
4
  import { DatetimeAdapter, CMAT_DATETIME_FORMATS } from 'cmat/components/adapter';
5
5
  import { coerceNumberProperty, coerceBooleanProperty, coerceStringArray } from '@angular/cdk/coercion';
6
6
  import * as i1 from '@angular/material/button';
@@ -30,23 +30,17 @@ const CLOCK_RADIUS = 50;
30
30
  const CLOCK_INNER_RADIUS = 27.5;
31
31
  const CLOCK_OUTER_RADIUS = 41.25;
32
32
  const CLOCK_TICK_RADIUS = 7.0833;
33
- /**
34
- * A clock that is used as part of the datepicker.
35
- */
36
33
  class CmatDatetimepickerClockComponent {
37
34
  constructor() {
38
35
  this.userSelection = new EventEmitter();
39
36
  this.interval = 1;
40
37
  this.twelvehour = false;
41
- /** Emits when the currently selected date changes. */
42
38
  this.selectedChange = new EventEmitter();
43
39
  this.activeDateChange = new EventEmitter();
44
40
  this.role = 'clock';
45
41
  this.class = 'cmat-datetimepicker-clock';
46
- /** Hours and Minutes representing the clock view. */
47
42
  this.hours = [];
48
43
  this.minutes = [];
49
- /** Whether the clock is in hour view. */
50
44
  this.hourView = true;
51
45
  this._element = inject(ElementRef);
52
46
  this._adapter = inject(DatetimeAdapter);
@@ -58,9 +52,6 @@ class CmatDatetimepickerClockComponent {
58
52
  this.handleMouseup();
59
53
  };
60
54
  }
61
- /**
62
- * The date to display in this clock view.
63
- */
64
55
  get activeDate() {
65
56
  return this._activeDate;
66
57
  }
@@ -71,7 +62,6 @@ class CmatDatetimepickerClockComponent {
71
62
  this._init();
72
63
  }
73
64
  }
74
- /** The currently selected date. */
75
65
  // eslint-disable-next-line @typescript-eslint/member-ordering
76
66
  get selected() {
77
67
  return this._selected;
@@ -82,7 +72,6 @@ class CmatDatetimepickerClockComponent {
82
72
  this.activeDate = this._selected;
83
73
  }
84
74
  }
85
- /** The minimum selectable date. */
86
75
  // eslint-disable-next-line @typescript-eslint/member-ordering
87
76
  get minDate() {
88
77
  return this._minDate;
@@ -90,7 +79,6 @@ class CmatDatetimepickerClockComponent {
90
79
  set minDate(value) {
91
80
  this._minDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
92
81
  }
93
- /** The maximum selectable date. */
94
82
  // eslint-disable-next-line @typescript-eslint/member-ordering
95
83
  get maxDate() {
96
84
  return this._maxDate;
@@ -98,7 +86,6 @@ class CmatDatetimepickerClockComponent {
98
86
  set maxDate(value) {
99
87
  this._maxDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
100
88
  }
101
- /** Whether the clock should be started in hour or minute view. */
102
89
  // eslint-disable-next-line @typescript-eslint/member-ordering
103
90
  set startView(value) {
104
91
  this.hourView = value !== 'minute';
@@ -136,7 +123,6 @@ class CmatDatetimepickerClockComponent {
136
123
  'margin-top': `${50 - radius}%`
137
124
  };
138
125
  }
139
- /** Handles mousedown events on the clock body. */
140
126
  handleMousedown(event) {
141
127
  this._timeChanged = false;
142
128
  this._setTime(event);
@@ -165,7 +151,6 @@ class CmatDatetimepickerClockComponent {
165
151
  }
166
152
  }
167
153
  }
168
- /** Initializes this clock view. */
169
154
  _init() {
170
155
  this.hours.length = 0;
171
156
  this.minutes.length = 0;
@@ -221,11 +206,6 @@ class CmatDatetimepickerClockComponent {
221
206
  });
222
207
  }
223
208
  }
224
- /**
225
- * Set Time
226
- *
227
- * @param event
228
- */
229
209
  _setTime(event) {
230
210
  const trigger = this._element.nativeElement;
231
211
  const triggerRect = trigger.getBoundingClientRect();
@@ -270,10 +250,10 @@ class CmatDatetimepickerClockComponent {
270
250
  this.activeDate = date;
271
251
  this.activeDateChange.emit(this.activeDate);
272
252
  }
273
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerClockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
274
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CmatDatetimepickerClockComponent, isStandalone: true, selector: "cmat-datetimepicker-clock", inputs: { dateFilter: "dateFilter", interval: "interval", twelvehour: "twelvehour", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", startView: "startView" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange", activeDateChange: "activeDateChange" }, host: { listeners: { "mousedown": "handleMousedown($event)" }, properties: { "role": "this.role", "class": "this.class" } }, exportAs: ["cmatDatetimepickerClock"], ngImport: i0, template: "<div class=\"cmat-datetimepicker-clock-wrapper\">\r\n <div class=\"cmat-datetimepicker-clock-center\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hand\" [ngStyle]=\"hand\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hours\" [class.active]=\"hourView\">\r\n @for (item of hours; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedHour === item.value\"\r\n [ngStyle]=\"{'fontSize':item.fontSize,'left':item.left+'%',top:item.top+'%'}\">\r\n {{ item.displayValue }}</div>\r\n }\r\n </div>\r\n <div class=\"cmat-datetimepicker-clock-minutes\" [class.active]=\"!hourView\">\r\n @for (item of minutes; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedMinute === item.value\" [ngStyle]=\"{'left':item.left+'%','top':item.top+'%'}\">{{ item.displayValue\r\n }}</div>\r\n }\r\n </div>\r\n</div>", styles: [".cmat-datetimepicker-clock{position:relative;display:block;min-width:224px;margin:12px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-clock-wrapper{position:relative;width:100%;height:0;padding-top:100%;border-radius:50%}.cmat-datetimepicker-clock-center{position:absolute;top:50%;left:50%;width:2%;height:2%;margin:-1%;border-radius:50%}.cmat-datetimepicker-clock-hand{position:absolute;inset:0;width:1px;margin:0 auto;transform-origin:bottom}.cmat-datetimepicker-clock-hand:before{content:\"\";position:absolute;top:-4px;left:-4px;width:8px;height:8px;border-radius:50%}.cmat-datetimepicker-clock-hours,.cmat-datetimepicker-clock-minutes{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:.35s;transform:scale(1.2)}.cmat-datetimepicker-clock-hours.active,.cmat-datetimepicker-clock-minutes.active{opacity:1;visibility:visible;transform:scale(1)}.cmat-datetimepicker-clock-minutes{transform:scale(.8)}.cmat-datetimepicker-clock-cell{position:absolute;display:flex;width:14.1666%;height:14.1666%;justify-content:center;box-sizing:border-box;border-radius:50%;align-items:center;cursor:pointer}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
253
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerClockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
254
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatDatetimepickerClockComponent, isStandalone: true, selector: "cmat-datetimepicker-clock", inputs: { dateFilter: "dateFilter", interval: "interval", twelvehour: "twelvehour", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", startView: "startView" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange", activeDateChange: "activeDateChange" }, host: { listeners: { "mousedown": "handleMousedown($event)" }, properties: { "role": "this.role", "class": "this.class" } }, exportAs: ["cmatDatetimepickerClock"], ngImport: i0, template: "<div class=\"cmat-datetimepicker-clock-wrapper\">\r\n <div class=\"cmat-datetimepicker-clock-center\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hand\" [ngStyle]=\"hand\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hours\" [class.active]=\"hourView\">\r\n @for (item of hours; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedHour === item.value\"\r\n [ngStyle]=\"{'fontSize':item.fontSize,'left':item.left+'%',top:item.top+'%'}\">\r\n {{ item.displayValue }}</div>\r\n }\r\n </div>\r\n <div class=\"cmat-datetimepicker-clock-minutes\" [class.active]=\"!hourView\">\r\n @for (item of minutes; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedMinute === item.value\" [ngStyle]=\"{'left':item.left+'%','top':item.top+'%'}\">{{ item.displayValue\r\n }}</div>\r\n }\r\n </div>\r\n</div>", styles: [".cmat-datetimepicker-clock{position:relative;display:block;min-width:224px;margin:12px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-clock-wrapper{position:relative;width:100%;height:0;padding-top:100%;border-radius:50%}.cmat-datetimepicker-clock-center{position:absolute;top:50%;left:50%;width:2%;height:2%;margin:-1%;border-radius:50%}.cmat-datetimepicker-clock-hand{position:absolute;inset:0;width:1px;margin:0 auto;transform-origin:bottom}.cmat-datetimepicker-clock-hand:before{content:\"\";position:absolute;top:-4px;left:-4px;width:8px;height:8px;border-radius:50%}.cmat-datetimepicker-clock-hours,.cmat-datetimepicker-clock-minutes{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:.35s;transform:scale(1.2)}.cmat-datetimepicker-clock-hours.active,.cmat-datetimepicker-clock-minutes.active{opacity:1;visibility:visible;transform:scale(1)}.cmat-datetimepicker-clock-minutes{transform:scale(.8)}.cmat-datetimepicker-clock-cell{position:absolute;display:flex;width:14.1666%;height:14.1666%;justify-content:center;box-sizing:border-box;border-radius:50%;align-items:center;cursor:pointer}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
275
255
  }
276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerClockComponent, decorators: [{
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerClockComponent, decorators: [{
277
257
  type: Component,
278
258
  args: [{ selector: 'cmat-datetimepicker-clock', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerClock', imports: [NgStyle], template: "<div class=\"cmat-datetimepicker-clock-wrapper\">\r\n <div class=\"cmat-datetimepicker-clock-center\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hand\" [ngStyle]=\"hand\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hours\" [class.active]=\"hourView\">\r\n @for (item of hours; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedHour === item.value\"\r\n [ngStyle]=\"{'fontSize':item.fontSize,'left':item.left+'%',top:item.top+'%'}\">\r\n {{ item.displayValue }}</div>\r\n }\r\n </div>\r\n <div class=\"cmat-datetimepicker-clock-minutes\" [class.active]=\"!hourView\">\r\n @for (item of minutes; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedMinute === item.value\" [ngStyle]=\"{'left':item.left+'%','top':item.top+'%'}\">{{ item.displayValue\r\n }}</div>\r\n }\r\n </div>\r\n</div>", styles: [".cmat-datetimepicker-clock{position:relative;display:block;min-width:224px;margin:12px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-clock-wrapper{position:relative;width:100%;height:0;padding-top:100%;border-radius:50%}.cmat-datetimepicker-clock-center{position:absolute;top:50%;left:50%;width:2%;height:2%;margin:-1%;border-radius:50%}.cmat-datetimepicker-clock-hand{position:absolute;inset:0;width:1px;margin:0 auto;transform-origin:bottom}.cmat-datetimepicker-clock-hand:before{content:\"\";position:absolute;top:-4px;left:-4px;width:8px;height:8px;border-radius:50%}.cmat-datetimepicker-clock-hours,.cmat-datetimepicker-clock-minutes{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:.35s;transform:scale(1.2)}.cmat-datetimepicker-clock-hours.active,.cmat-datetimepicker-clock-minutes.active{opacity:1;visibility:visible;transform:scale(1)}.cmat-datetimepicker-clock-minutes{transform:scale(.8)}.cmat-datetimepicker-clock-cell{position:absolute;display:flex;width:14.1666%;height:14.1666%;justify-content:center;box-sizing:border-box;border-radius:50%;align-items:center;cursor:pointer}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{pointer-events:none}\n"] }]
279
259
  }], ctorParameters: () => [], propDecorators: { userSelection: [{
@@ -317,67 +297,40 @@ function createMissingDateImplError(provider) {
317
297
 
318
298
  class CmatDatetimepickerIntl {
319
299
  constructor() {
320
- /**
321
- * Stream to emit from when labels are changed. Use this to notify components when the labels have
322
- * changed after initialization.
323
- */
324
300
  this.changes = new Subject();
325
- /** A label for the calendar popup (used by screen readers). */
326
301
  this.calendarLabel = '日历';
327
- /** A label for the button used to open the calendar popup (used by screen readers). */
328
302
  this.openCalendarLabel = '打开日历';
329
- /** Label for the button used to close the calendar popup. */
330
303
  this.closeCalendarLabel = '关闭日历';
331
- /** A label for the previous month button (used by screen readers). */
332
304
  this.prevMonthLabel = '上个月';
333
- /** A label for the next month button (used by screen readers). */
334
305
  this.nextMonthLabel = '下个月';
335
- /** A label for the previous year button (used by screen readers). */
336
- this.prevYearLabel = '去年';
337
- /** A label for the next year button (used by screen readers). */
338
- this.nextYearLabel = '明年';
339
- /** A label for the previous multi-year button (used by screen readers). */
306
+ this.prevYearLabel = '上一年';
307
+ this.nextYearLabel = '下一年';
340
308
  this.prevMultiYearLabel = '过去24年';
341
- /** A label for the next multi-year button (used by screen readers). */
342
309
  this.nextMultiYearLabel = '未来24年';
343
- /** A label for the 'switch to month view' button (used by screen readers). */
344
- this.switchToMonthViewLabel = '选择日期';
345
- /** A label for the 'switch to year view' button (used by screen readers). */
346
- this.switchToYearViewLabel = '选择月份';
347
- /** A label for the 'switch to multi-year view' button (used by screen readers). */
348
- this.switchToMultiYearViewLabel = '选择年月';
349
- /** A label for the first date of a range of dates (used by screen readers). */
310
+ this.switchToMonthViewLabel = '选择月份';
311
+ this.switchToYearViewLabel = '选择年份';
312
+ this.switchToMultiYearViewLabel = '选择年份范围';
350
313
  this.startDateLabel = '开始日期';
351
- /** A label for the last date of a range of dates (used by screen readers). */
352
314
  this.endDateLabel = '结束日期';
353
- /** A label for the 'switch to clock hour view' button (used by screen readers). */
354
315
  this.switchToClockHourViewLabel = '选择小时';
355
- /** A label for the 'switch to clock minute view' button (used by screen readers). */
356
316
  this.switchToClockMinuteViewLabel = '选择分钟';
357
- /** Label used for ok button within the manual time input. */
358
317
  this.okLabel = '确认';
359
- /** Label used for cancel button within the manual time input. */
360
318
  this.cancelLabel = '取消';
361
319
  }
362
- /** Formats a range of years (used for visuals). */
363
320
  formatYearRange(start, end) {
364
321
  return `${start} \u2013 ${end}`;
365
322
  }
366
- /** Formats a label for a range of years (used by screen readers). */
367
323
  formatYearRangeLabel(start, end) {
368
324
  return `${start} to ${end}`;
369
325
  }
370
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
371
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerIntl, providedIn: 'root' }); }
326
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
327
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerIntl, providedIn: 'root' }); }
372
328
  }
373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerIntl, decorators: [{
329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerIntl, decorators: [{
374
330
  type: Injectable,
375
331
  args: [{ providedIn: 'root' }]
376
332
  }] });
377
333
 
378
- /**
379
- * An internal class that represents the data corresponding to a single calendar cell.
380
- */
381
334
  class CmatDatetimepickerCalendarCellComponent {
382
335
  constructor(value, displayValue, ariaLabel, enabled) {
383
336
  this.value = value;
@@ -386,22 +339,14 @@ class CmatDatetimepickerCalendarCellComponent {
386
339
  this.enabled = enabled;
387
340
  }
388
341
  }
389
- /**
390
- * An internal component used to display calendar data in a table.
391
- */
392
342
  class CmatDatetimepickerCalendarBodyComponent {
393
343
  constructor() {
394
- /** The number of columns in the table. */
395
344
  this.numCols = 7;
396
- /** Whether to allow selection of disabled cells. */
397
345
  this.allowDisabledSelection = false;
398
- /** The cell number of the active cell in the table. */
399
346
  this.activeCell = 0;
400
- /** Emits when a new value is selected. */
401
347
  this.selectedValueChange = new EventEmitter();
402
348
  this.class = 'cmat-datetimepicker-calendar-body';
403
349
  }
404
- /** The number of blank cells to put at the beginning for the first row. */
405
350
  get _firstRowOffset() {
406
351
  return this.rows?.length && this.rows[0].length ?
407
352
  this.numCols - this.rows[0].length : 0;
@@ -414,18 +359,17 @@ class CmatDatetimepickerCalendarBodyComponent {
414
359
  }
415
360
  isActiveCell(rowIndex, colIndex) {
416
361
  let cellNumber = rowIndex * this.numCols + colIndex;
417
- // Account for the fact that the first row may not have as many cells.
418
362
  if (rowIndex) {
419
363
  cellNumber -= this._firstRowOffset;
420
364
  }
421
365
  return cellNumber === this.activeCell;
422
366
  }
423
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
424
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CmatDatetimepickerCalendarBodyComponent, isStandalone: true, selector: "[cmat-datetimepicker-calendar-body]", inputs: { label: "label", rows: "rows", todayValue: "todayValue", selectedValue: "selectedValue", labelMinRequiredCells: "labelMinRequiredCells", numCols: "numCols", allowDisabledSelection: "allowDisabledSelection", activeCell: "activeCell" }, outputs: { selectedValueChange: "selectedValueChange" }, host: { properties: { "class": "this.class" } }, exportAs: ["cmatDatetimepickerCalendarBody"], ngImport: i0, template: "<!--\r\nIf rst row, create a separate label row. We mark this row as\r\naria-hidden because we don't want it to be read out as one of the weeks in the month.\r\n-->\r\n@if (_firstRowOffset < labelMinRequiredCells) {\r\n <tr aria-hidden=\"true\">\r\n <td class=\"cmat-datetimepicker-calendar-body-label\" [attr.colspan]=\"numCols\">{{ label }}</td>\r\n </tr>\r\n}\r\n\r\n<!-- Create the first row separately so we can include a special spacer cell. -->\r\n@for (row of rows; track $index; let rowIndex = $index) {\r\n <tr role=\"row\">\r\n <!--\r\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\r\n -->\r\n @if (rowIndex === 0 && _firstRowOffset) {\r\n <td aria-hidden=\"true\" class=\"cmat-datetimepicker-calendar-body-label\"\r\n [attr.colspan]=\"_firstRowOffset\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n }\r\n @for (item of row; track $index; let colIndex = $index) {\r\n <td role=\"presentation\" class=\"cmat-datetimepicker-calendar-body-cell\"\r\n [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\" (click)=\"cellClicked(item)\">\r\n <div class=\"cmat-datetimepicker-calendar-body-cell-content\"\r\n [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n}", styles: [".cmat-datetimepicker-calendar-body{min-width:224px}.cmat-datetimepicker-calendar-body-label{height:0;line-height:0;text-align:left;padding:calc(14.2857142857% / 2) 4.7142857143%}[dir=rtl] .cmat-datetimepicker-calendar-body-label{text-align:right}.cmat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:calc(14.2857142857% / 2) 0;text-align:center;outline:none;cursor:pointer}.cmat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.cmat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
367
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
368
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatDatetimepickerCalendarBodyComponent, isStandalone: true, selector: "[cmat-datetimepicker-calendar-body]", inputs: { label: "label", rows: "rows", todayValue: "todayValue", selectedValue: "selectedValue", labelMinRequiredCells: "labelMinRequiredCells", numCols: "numCols", allowDisabledSelection: "allowDisabledSelection", activeCell: "activeCell" }, outputs: { selectedValueChange: "selectedValueChange" }, host: { properties: { "class": "this.class" } }, exportAs: ["cmatDatetimepickerCalendarBody"], ngImport: i0, template: "\r\n@if (_firstRowOffset < labelMinRequiredCells) {\r\n <tr aria-hidden=\"true\">\r\n <td class=\"cmat-datetimepicker-calendar-body-label\" [attr.colspan]=\"numCols\">{{ label }}</td>\r\n </tr>\r\n}\r\n\r\n\r\n@for (row of rows; track $index; let rowIndex = $index) {\r\n <tr role=\"row\">\r\n \r\n @if (rowIndex === 0 && _firstRowOffset) {\r\n <td aria-hidden=\"true\" class=\"cmat-datetimepicker-calendar-body-label\"\r\n [attr.colspan]=\"_firstRowOffset\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n }\r\n @for (item of row; track $index; let colIndex = $index) {\r\n <td role=\"presentation\" class=\"cmat-datetimepicker-calendar-body-cell\"\r\n [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\" (click)=\"cellClicked(item)\">\r\n <div class=\"cmat-datetimepicker-calendar-body-cell-content\"\r\n [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n}", styles: [".cmat-datetimepicker-calendar-body{min-width:224px}.cmat-datetimepicker-calendar-body-label{height:0;line-height:0;text-align:left;padding:calc(14.2857142857% / 2) 4.7142857143%}[dir=rtl] .cmat-datetimepicker-calendar-body-label{text-align:right}.cmat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:calc(14.2857142857% / 2) 0;text-align:center;outline:none;cursor:pointer}.cmat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.cmat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
425
369
  }
426
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, decorators: [{
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, decorators: [{
427
371
  type: Component,
428
- args: [{ selector: '[cmat-datetimepicker-calendar-body]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerCalendarBody', imports: [], template: "<!--\r\nIf rst row, create a separate label row. We mark this row as\r\naria-hidden because we don't want it to be read out as one of the weeks in the month.\r\n-->\r\n@if (_firstRowOffset < labelMinRequiredCells) {\r\n <tr aria-hidden=\"true\">\r\n <td class=\"cmat-datetimepicker-calendar-body-label\" [attr.colspan]=\"numCols\">{{ label }}</td>\r\n </tr>\r\n}\r\n\r\n<!-- Create the first row separately so we can include a special spacer cell. -->\r\n@for (row of rows; track $index; let rowIndex = $index) {\r\n <tr role=\"row\">\r\n <!--\r\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\r\n -->\r\n @if (rowIndex === 0 && _firstRowOffset) {\r\n <td aria-hidden=\"true\" class=\"cmat-datetimepicker-calendar-body-label\"\r\n [attr.colspan]=\"_firstRowOffset\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n }\r\n @for (item of row; track $index; let colIndex = $index) {\r\n <td role=\"presentation\" class=\"cmat-datetimepicker-calendar-body-cell\"\r\n [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\" (click)=\"cellClicked(item)\">\r\n <div class=\"cmat-datetimepicker-calendar-body-cell-content\"\r\n [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n}", styles: [".cmat-datetimepicker-calendar-body{min-width:224px}.cmat-datetimepicker-calendar-body-label{height:0;line-height:0;text-align:left;padding:calc(14.2857142857% / 2) 4.7142857143%}[dir=rtl] .cmat-datetimepicker-calendar-body-label{text-align:right}.cmat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:calc(14.2857142857% / 2) 0;text-align:center;outline:none;cursor:pointer}.cmat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.cmat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"] }]
372
+ args: [{ selector: '[cmat-datetimepicker-calendar-body]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerCalendarBody', imports: [], template: "\r\n@if (_firstRowOffset < labelMinRequiredCells) {\r\n <tr aria-hidden=\"true\">\r\n <td class=\"cmat-datetimepicker-calendar-body-label\" [attr.colspan]=\"numCols\">{{ label }}</td>\r\n </tr>\r\n}\r\n\r\n\r\n@for (row of rows; track $index; let rowIndex = $index) {\r\n <tr role=\"row\">\r\n \r\n @if (rowIndex === 0 && _firstRowOffset) {\r\n <td aria-hidden=\"true\" class=\"cmat-datetimepicker-calendar-body-label\"\r\n [attr.colspan]=\"_firstRowOffset\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n }\r\n @for (item of row; track $index; let colIndex = $index) {\r\n <td role=\"presentation\" class=\"cmat-datetimepicker-calendar-body-cell\"\r\n [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\" (click)=\"cellClicked(item)\">\r\n <div class=\"cmat-datetimepicker-calendar-body-cell-content\"\r\n [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n}", styles: [".cmat-datetimepicker-calendar-body{min-width:224px}.cmat-datetimepicker-calendar-body-label{height:0;line-height:0;text-align:left;padding:calc(14.2857142857% / 2) 4.7142857143%}[dir=rtl] .cmat-datetimepicker-calendar-body-label{text-align:right}.cmat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:calc(14.2857142857% / 2) 0;text-align:center;outline:none;cursor:pointer}.cmat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.cmat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"] }]
429
373
  }], propDecorators: { label: [{
430
374
  type: Input
431
375
  }], rows: [{
@@ -450,19 +394,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
450
394
  }] } });
451
395
 
452
396
  const DAYS_PER_WEEK = 7;
453
- /**
454
- * An internal component used to display a single month in the datepicker.
455
- */
456
397
  class CmatDatetimepickerMonthViewComponent {
457
398
  constructor() {
458
399
  this.type = 'date';
459
400
  this.userSelection = new EventEmitter();
460
- /** Emits when a new date is selected. */
461
401
  this.selectedChange = new EventEmitter();
402
+ this.calendarState = signal('', ...(ngDevMode ? [{ debugName: "calendarState" }] : /* istanbul ignore next */ []));
462
403
  this.adapter = inject(DatetimeAdapter, { optional: true });
463
404
  this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
464
405
  this._elementRef = inject(ElementRef);
465
- this._changeDetectorRef = inject(ChangeDetectorRef);
466
406
  this._calendarAnimationListener = this.calendarStateDone.bind(this);
467
407
  if (!this.adapter) {
468
408
  throw createMissingDateImplError('CDatetimeAdapter');
@@ -473,15 +413,11 @@ class CmatDatetimepickerMonthViewComponent {
473
413
  const firstDayOfWeek = this.adapter.getFirstDayOfWeek();
474
414
  const narrowWeekdays = this.adapter.getDayOfWeekNames('narrow');
475
415
  const longWeekdays = this.adapter.getDayOfWeekNames('long');
476
- // Rotate the labels for days of the week based on the configured first day of the week.
477
416
  const weekdays = longWeekdays.map((long, i) => ({ long, narrow: narrowWeekdays[i] }));
478
417
  this.weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));
479
418
  this._activeDate = this.adapter.today();
480
419
  this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
481
420
  }
482
- /**
483
- * The date to display in this month view (everything other than the month and year is ignored).
484
- */
485
421
  get activeDate() {
486
422
  return this._activeDate;
487
423
  }
@@ -499,7 +435,6 @@ class CmatDatetimepickerMonthViewComponent {
499
435
  }
500
436
  }
501
437
  }
502
- /** The currently selected date. */
503
438
  // eslint-disable-next-line @typescript-eslint/member-ordering
504
439
  get selected() {
505
440
  return this._selected;
@@ -514,7 +449,6 @@ class CmatDatetimepickerMonthViewComponent {
514
449
  ngOnDestroy() {
515
450
  this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
516
451
  }
517
- /** Handles when a new date is selected. */
518
452
  dateSelected(date) {
519
453
  this.selectedChange.emit(this.adapter.createDatetime(this.adapter.getYear(this.activeDate), this.adapter.getMonth(this.activeDate), date, this.adapter.getHour(this.activeDate), this.adapter.getMinute(this.activeDate)));
520
454
  if (this.type === 'date') {
@@ -523,11 +457,9 @@ class CmatDatetimepickerMonthViewComponent {
523
457
  }
524
458
  calendarStateDone(event) {
525
459
  if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {
526
- this.calendarState = '';
527
- this._changeDetectorRef.markForCheck();
460
+ this.calendarState.set('');
528
461
  }
529
462
  }
530
- /** Initializes this month view. */
531
463
  _init() {
532
464
  this.selectedDate = this._getDateInCurrentMonth(this.selected);
533
465
  this.todayDate = this._getDateInCurrentMonth(this.adapter.today());
@@ -537,7 +469,6 @@ class CmatDatetimepickerMonthViewComponent {
537
469
  this.adapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;
538
470
  this._createWeekCells();
539
471
  }
540
- /** Creates MdCalendarCells for the dates in this month. */
541
472
  _createWeekCells() {
542
473
  const daysInMonth = this.adapter.getNumDaysInMonth(this.activeDate);
543
474
  const dateNames = this.adapter.getDateNames();
@@ -555,23 +486,19 @@ class CmatDatetimepickerMonthViewComponent {
555
486
  .push(new CmatDatetimepickerCalendarCellComponent(i + 1, dateNames[i], ariaLabel, enabled));
556
487
  }
557
488
  }
558
- /**
559
- * Gets the date in this month that the given Date falls on.
560
- * Returns null if the given Date is in another month.
561
- */
562
489
  _getDateInCurrentMonth(date) {
563
490
  return this.adapter.sameMonthAndYear(date, this.activeDate) ?
564
491
  this.adapter.getDate(date) : null;
565
492
  }
566
493
  _changeCalendarState(direction) {
567
- this.calendarState = direction;
494
+ this.calendarState.set(direction);
568
495
  }
569
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
570
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CmatDatetimepickerMonthViewComponent, isStandalone: true, selector: "cmat-datetimepicker-month-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerMonthView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\">\r\n <tr>\r\n @for (day of weekdays; track $index) {\r\n <th [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\r\n }\r\n </tr>\r\n <tr>\r\n <th colspan=\"7\" class=\"cmat-calendar-table-header-divider\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getDate(activeDate) - 1\" [rows]=\"weeks\"\r\n [selectedValue]=\"selectedDate\" [todayValue]=\"todayDate\" (selectedValueChange)=\"dateSelected($event)\">\r\n </tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
496
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
497
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatDatetimepickerMonthViewComponent, isStandalone: true, selector: "cmat-datetimepicker-month-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerMonthView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\">\r\n <tr>\r\n @for (day of weekdays; track $index) {\r\n <th [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\r\n }\r\n </tr>\r\n <tr>\r\n <th colspan=\"7\" class=\"cmat-calendar-table-header-divider\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState()==='left',\r\n 'right': calendarState()==='right'\r\n }\" [activeCell]=\"adapter.getDate(activeDate) - 1\" [rows]=\"weeks\"\r\n [selectedValue]=\"selectedDate\" [todayValue]=\"todayDate\" (selectedValueChange)=\"dateSelected($event)\">\r\n </tbody>\r\n</table>\r\n", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
571
498
  }
572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, decorators: [{
499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, decorators: [{
573
500
  type: Component,
574
- args: [{ selector: 'cmat-datetimepicker-month-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerMonthView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\">\r\n <tr>\r\n @for (day of weekdays; track $index) {\r\n <th [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\r\n }\r\n </tr>\r\n <tr>\r\n <th colspan=\"7\" class=\"cmat-calendar-table-header-divider\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getDate(activeDate) - 1\" [rows]=\"weeks\"\r\n [selectedValue]=\"selectedDate\" [todayValue]=\"todayDate\" (selectedValueChange)=\"dateSelected($event)\">\r\n </tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
501
+ args: [{ selector: 'cmat-datetimepicker-month-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerMonthView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\">\r\n <tr>\r\n @for (day of weekdays; track $index) {\r\n <th [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\r\n }\r\n </tr>\r\n <tr>\r\n <th colspan=\"7\" class=\"cmat-calendar-table-header-divider\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState()==='left',\r\n 'right': calendarState()==='right'\r\n }\" [activeCell]=\"adapter.getDate(activeDate) - 1\" [rows]=\"weeks\"\r\n [selectedValue]=\"selectedDate\" [todayValue]=\"todayDate\" (selectedValueChange)=\"dateSelected($event)\">\r\n </tbody>\r\n</table>\r\n", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
575
502
  }], ctorParameters: () => [], propDecorators: { type: [{
576
503
  type: Input
577
504
  }], userSelection: [{
@@ -588,18 +515,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
588
515
 
589
516
  const yearsPerPage = 24;
590
517
  const yearsPerRow = 4;
591
- /**
592
- * An internal component used to display multiple years in the datepicker.
593
- */
594
518
  class CmatDatetimepickerMultiYearViewComponent {
595
519
  constructor() {
596
520
  this.userSelection = new EventEmitter();
597
521
  this.type = 'date';
598
- /** Emits when a new month is selected. */
599
522
  this.selectedChange = new EventEmitter();
523
+ this.calendarState = signal('', ...(ngDevMode ? [{ debugName: "calendarState" }] : /* istanbul ignore next */ []));
600
524
  this.adapter = inject(DatetimeAdapter, { optional: true });
601
525
  this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
602
- this._changeDetectorRef = inject(ChangeDetectorRef);
603
526
  this._elementRef = inject(ElementRef);
604
527
  this._calendarAnimationListener = this.calendarStateDone.bind(this);
605
528
  if (!this.adapter) {
@@ -611,7 +534,6 @@ class CmatDatetimepickerMultiYearViewComponent {
611
534
  this._activeDate = this.adapter.today();
612
535
  this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
613
536
  }
614
- /** The date to display in this multi year view*/
615
537
  get activeDate() {
616
538
  return this._activeDate;
617
539
  }
@@ -629,7 +551,6 @@ class CmatDatetimepickerMultiYearViewComponent {
629
551
  }
630
552
  }
631
553
  }
632
- /** The currently selected date. */
633
554
  // eslint-disable-next-line @typescript-eslint/member-ordering
634
555
  get selected() {
635
556
  return this._selected;
@@ -638,7 +559,6 @@ class CmatDatetimepickerMultiYearViewComponent {
638
559
  this._selected = value;
639
560
  this.selectedYear = this._selected && this.adapter.getYear(this._selected);
640
561
  }
641
- /** The minimum selectable date. */
642
562
  // eslint-disable-next-line @typescript-eslint/member-ordering
643
563
  get minDate() {
644
564
  return this._minDate;
@@ -646,7 +566,6 @@ class CmatDatetimepickerMultiYearViewComponent {
646
566
  set minDate(value) {
647
567
  this._minDate = this._getValidDateOrNull(this.adapter.deserialize(value));
648
568
  }
649
- /** The maximum selectable date. */
650
569
  // eslint-disable-next-line @typescript-eslint/member-ordering
651
570
  get maxDate() {
652
571
  return this._maxDate;
@@ -660,7 +579,6 @@ class CmatDatetimepickerMultiYearViewComponent {
660
579
  ngOnDestroy() {
661
580
  this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
662
581
  }
663
- /** Handles when a new year is selected. */
664
582
  yearSelected(year) {
665
583
  const month = this.adapter.getMonth(this.activeDate);
666
584
  const normalizedDate = this.adapter.createDatetime(year, month, 1, 0, 0);
@@ -674,11 +592,9 @@ class CmatDatetimepickerMultiYearViewComponent {
674
592
  }
675
593
  calendarStateDone(event) {
676
594
  if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {
677
- this.calendarState = '';
678
- this._changeDetectorRef.markForCheck();
595
+ this.calendarState.set('');
679
596
  }
680
597
  }
681
- /** Initializes this year view. */
682
598
  _init() {
683
599
  this.todayYear = this.adapter.getYear(this.adapter.today());
684
600
  this.yearLabel = this.adapter.getYearName(this.activeDate);
@@ -693,25 +609,20 @@ class CmatDatetimepickerMultiYearViewComponent {
693
609
  }
694
610
  }
695
611
  }
696
- /** Creates an MatDatetimepickerCalendarCell for the given year. */
697
612
  _createCellForYear(year) {
698
613
  const yearName = this.adapter.getYearName(this.adapter.createDate(year, 0, 1));
699
614
  return new CmatDatetimepickerCalendarCellComponent(year, yearName, yearName, this._shouldEnableYear(year));
700
615
  }
701
- /** Whether the given year is enabled. */
702
616
  _shouldEnableYear(year) {
703
- // disable if the year is greater than maxDate lower than minDate
704
617
  if (year === undefined || year === null ||
705
618
  (this.maxDate && year > this.adapter.getYear(this.maxDate)) ||
706
619
  (this.minDate && year < this.adapter.getYear(this.minDate))) {
707
620
  return false;
708
621
  }
709
- // enable if it reaches here and there's no filter defined
710
622
  if (!this.dateFilter) {
711
623
  return true;
712
624
  }
713
625
  const firstOfYear = this.adapter.createDate(year, 0, 1);
714
- // If any date in the year is enabled count the year as enabled.
715
626
  for (let date = firstOfYear; this.adapter.getYear(date) === year; date = this.adapter.addCalendarDays(date, 1)) {
716
627
  if (this.dateFilter(date)) {
717
628
  return true;
@@ -719,22 +630,18 @@ class CmatDatetimepickerMultiYearViewComponent {
719
630
  }
720
631
  return false;
721
632
  }
722
- /**
723
- * @param obj The object to check.
724
- * @returns The given object if it is both a date instance and valid, otherwise null.
725
- */
726
633
  _getValidDateOrNull(obj) {
727
634
  return (this.adapter.isDateInstance(obj) && this.adapter.isValid(obj)) ? obj : null;
728
635
  }
729
636
  _changeCalendarState(direction) {
730
- this.calendarState = direction;
637
+ this.calendarState.set(direction);
731
638
  }
732
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
733
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CmatDatetimepickerMultiYearViewComponent, isStandalone: true, selector: "cmat-datetimepicker-multi-year-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerMultiYearView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"getActiveCell()\" [numCols]=\"4\" [rows]=\"years\"\r\n [selectedValue]=\"selectedYear\" [todayValue]=\"todayYear\" [allowDisabledSelection]=\"true\"\r\n (selectedValueChange)=\"yearSelected($event)\"></tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
639
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
640
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatDatetimepickerMultiYearViewComponent, isStandalone: true, selector: "cmat-datetimepicker-multi-year-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerMultiYearView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState()==='left',\r\n 'right': calendarState()==='right'\r\n }\" [activeCell]=\"getActiveCell()\" [numCols]=\"4\" [rows]=\"years\"\r\n [selectedValue]=\"selectedYear\" [todayValue]=\"todayYear\" [allowDisabledSelection]=\"true\"\r\n (selectedValueChange)=\"yearSelected($event)\"></tbody>\r\n</table>\r\n", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
734
641
  }
735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, decorators: [{
642
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, decorators: [{
736
643
  type: Component,
737
- args: [{ selector: 'cmat-datetimepicker-multi-year-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerMultiYearView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"getActiveCell()\" [numCols]=\"4\" [rows]=\"years\"\r\n [selectedValue]=\"selectedYear\" [todayValue]=\"todayYear\" [allowDisabledSelection]=\"true\"\r\n (selectedValueChange)=\"yearSelected($event)\"></tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
644
+ args: [{ selector: 'cmat-datetimepicker-multi-year-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerMultiYearView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState()==='left',\r\n 'right': calendarState()==='right'\r\n }\" [activeCell]=\"getActiveCell()\" [numCols]=\"4\" [rows]=\"years\"\r\n [selectedValue]=\"selectedYear\" [todayValue]=\"todayYear\" [allowDisabledSelection]=\"true\"\r\n (selectedValueChange)=\"yearSelected($event)\"></tbody>\r\n</table>\r\n", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
738
645
  }], ctorParameters: () => [], propDecorators: { userSelection: [{
739
646
  type: Output
740
647
  }], type: [{
@@ -759,19 +666,10 @@ function isSameMultiYearView(dateAdapter, date1, date2, minDate, maxDate) {
759
666
  return Math.floor((year1 - startingYear) / yearsPerPage) ===
760
667
  Math.floor((year2 - startingYear) / yearsPerPage);
761
668
  }
762
- /**
763
- * When the multi-year view is first opened, the active year will be in view.
764
- * So we compute how many years are between the active year and the *slot* where our
765
- * "startingYear" will render when paged into view.
766
- */
767
669
  function getActiveOffset(dateAdapter, activeDate, minDate, maxDate) {
768
670
  const activeYear = dateAdapter.getYear(activeDate);
769
671
  return euclideanModulo((activeYear - getStartingYear(dateAdapter, minDate, maxDate)), yearsPerPage);
770
672
  }
771
- /**
772
- * We pick a "starting" year such that either the maximum year would be at the end
773
- * or the minimum year would be at the beginning of a page.
774
- */
775
673
  function getStartingYear(dateAdapter, minDate, maxDate) {
776
674
  let startingYear = 0;
777
675
  if (maxDate) {
@@ -783,7 +681,6 @@ function getStartingYear(dateAdapter, minDate, maxDate) {
783
681
  }
784
682
  return startingYear;
785
683
  }
786
- /** Gets remainder that is non-negative, even if first number is negative */
787
684
  function euclideanModulo(a, b) {
788
685
  return (a % b + b) % b;
789
686
  }
@@ -802,14 +699,12 @@ class CmatDatetimepickerTimeInputDirective {
802
699
  this.timeMax = Infinity;
803
700
  this.timeValueChanged = new EventEmitter();
804
701
  this._element = inject(ElementRef);
805
- this._cdr = inject(ChangeDetectorRef);
806
702
  this._keyDownListener = this.keyDownHandler.bind(this);
807
703
  this._keyPressListener = this.keyPressHandler.bind(this);
808
704
  this._inputEventListener = this.inputChangedHandler.bind(this);
809
705
  this.inputElement.addEventListener('keydown', this._keyDownListener, {
810
706
  passive: true,
811
707
  });
812
- // Do not passive since we want to be able to preventDefault()
813
708
  this.inputElement.addEventListener('keypress', this._keyPressListener);
814
709
  this.inputElement.addEventListener('input', this._inputEventListener, {
815
710
  passive: true,
@@ -821,15 +716,9 @@ class CmatDatetimepickerTimeInputDirective {
821
716
  get inputElement() {
822
717
  return this._element.nativeElement;
823
718
  }
824
- // We look here at the placeholder value, because we write '' into the value on focus
825
- // placeholder should always be up to date with "currentValue"
826
719
  get valid() {
827
- // At the start _value is undefined therefore this would result in not valid and
828
- // make a ugly warning border afterwards we can safely check
829
720
  if (this._value) {
830
721
  const currentValue = String(this.inputElement.value);
831
- // It can be that currentValue is empty due to we removing the value on focus,
832
- // if that is the case we should check previous value which should be in the placeholder
833
722
  if (currentValue.length) {
834
723
  return pad(this._value, 2) === this.inputElement.value;
835
724
  }
@@ -857,11 +746,6 @@ class CmatDatetimepickerTimeInputDirective {
857
746
  focus() {
858
747
  this.writeValue('');
859
748
  }
860
- /**
861
- * Write value to inputElement
862
- *
863
- * @param value NumberInput
864
- */
865
749
  writeValue(value) {
866
750
  if (value !== '') {
867
751
  this.inputElement.value = pad(value, 2);
@@ -869,16 +753,9 @@ class CmatDatetimepickerTimeInputDirective {
869
753
  else {
870
754
  this.inputElement.value = '';
871
755
  }
872
- this._cdr.markForCheck();
873
756
  }
874
- /**
875
- * Writes value to placeholder
876
- *
877
- * @param value NumberInput
878
- */
879
757
  writePlaceholder(value) {
880
758
  this.inputElement.placeholder = pad(value, 2);
881
- this._cdr.markForCheck();
882
759
  }
883
760
  keyDownHandler(event) {
884
761
  if (String(this.inputElement.value).length > 0) {
@@ -893,7 +770,6 @@ class CmatDatetimepickerTimeInputDirective {
893
770
  value -= this.timeInterval;
894
771
  event.stopPropagation();
895
772
  }
896
- // if value has changed
897
773
  if (typeof value === 'number') {
898
774
  this.writeValue(value);
899
775
  this.writePlaceholder(value);
@@ -902,11 +778,6 @@ class CmatDatetimepickerTimeInputDirective {
902
778
  }
903
779
  }
904
780
  }
905
- /**
906
- * Prevent non number inputs in the inputElement with the exception of Enter/BackSpace
907
- *
908
- * @param event KeyboardEvent
909
- */
910
781
  keyPressHandler(event) {
911
782
  const key = event?.key ?? null;
912
783
  if (isNaN(Number(key)) && key !== 'Enter') {
@@ -931,18 +802,15 @@ class CmatDatetimepickerTimeInputDirective {
931
802
  this._value = clampedValue;
932
803
  }
933
804
  }
934
- /**
935
- * Remove event listeners on destruction
936
- */
937
805
  ngOnDestroy() {
938
806
  this.inputElement.removeEventListener('keydown', this._keyDownListener);
939
807
  this.inputElement.removeEventListener('keypress', this._keyPressListener);
940
808
  this.inputElement.removeEventListener('input', this._inputEventListener);
941
809
  }
942
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
943
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: CmatDatetimepickerTimeInputDirective, isStandalone: true, selector: "input.cmat-datetimepicker-time-input", inputs: { timeInterval: "timeInterval", timeMin: "timeMin", timeMax: "timeMax", timeValue: "timeValue" }, outputs: { timeValueChanged: "timeValueChanged" }, host: { listeners: { "blur": "blur($event)", "focus": "focus($event)" } }, exportAs: ["cmatDatetimepickerTimeInput"], ngImport: i0 }); }
810
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
811
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: CmatDatetimepickerTimeInputDirective, isStandalone: true, selector: "input.cmat-datetimepicker-time-input", inputs: { timeInterval: "timeInterval", timeMin: "timeMin", timeMax: "timeMax", timeValue: "timeValue" }, outputs: { timeValueChanged: "timeValueChanged" }, host: { listeners: { "blur": "blur($event)", "focus": "focus($event)" } }, exportAs: ["cmatDatetimepickerTimeInput"], ngImport: i0 }); }
944
812
  }
945
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, decorators: [{
813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, decorators: [{
946
814
  type: Directive,
947
815
  args: [{
948
816
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -968,30 +836,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
968
836
  }] } });
969
837
  class CmatDatetimepickerTimeComponent {
970
838
  constructor() {
971
- /** Emits when the currently selected date changes. */
972
839
  this.selectedChange = new EventEmitter();
973
- /** Emits when any date changes. */
974
840
  this.activeDateChange = new EventEmitter();
975
- /** Emits when any date is selected. */
976
841
  this.userSelection = new EventEmitter();
977
- /** Emits when AM/PM button are clicked. */
978
842
  this.ampmChange = new EventEmitter();
979
- /** Emits when AM/PM button are clicked. */
980
843
  this.clockViewChange = new EventEmitter();
981
- /** Step over minutes. */
982
844
  this.interval = 1;
983
- /** Whether the time is now in AM or PM. */
984
845
  // eslint-disable-next-line @typescript-eslint/naming-convention
985
846
  this.AMPM = 'AM';
986
847
  this.class = 'cmat-datetimepicker-time';
848
+ this.intlVersion = signal(0, ...(ngDevMode ? [{ debugName: "intlVersion" }] : /* istanbul ignore next */ []));
987
849
  this.datetimepickerIntl = inject(CmatDatetimepickerIntl);
988
850
  this._adapter = inject(DatetimeAdapter);
989
- this._changeDetectorRef = inject(ChangeDetectorRef);
990
851
  this._twelvehour = false;
991
- /** Whether the clock is in hour view. */
992
852
  this._clockView = 'hour';
993
853
  this.datetimepickerIntlChangesSubscription = this.datetimepickerIntl.changes.subscribe(() => {
994
- this._changeDetectorRef.detectChanges();
854
+ this.intlVersion.update(value => value + 1);
995
855
  });
996
856
  }
997
857
  get isHourView() {
@@ -1026,7 +886,6 @@ class CmatDatetimepickerTimeComponent {
1026
886
  }
1027
887
  return '00';
1028
888
  }
1029
- /** Whether the clock uses 12 hour format. */
1030
889
  // eslint-disable-next-line @typescript-eslint/member-ordering
1031
890
  get twelvehour() {
1032
891
  return this._twelvehour;
@@ -1034,9 +893,6 @@ class CmatDatetimepickerTimeComponent {
1034
893
  set twelvehour(value) {
1035
894
  this._twelvehour = coerceBooleanProperty(value);
1036
895
  }
1037
- /**
1038
- * The date to display in this clock view.
1039
- */
1040
896
  // eslint-disable-next-line @typescript-eslint/member-ordering
1041
897
  get activeDate() {
1042
898
  return this._activeDate;
@@ -1044,7 +900,6 @@ class CmatDatetimepickerTimeComponent {
1044
900
  set activeDate(value) {
1045
901
  this._activeDate = this._adapter.clampDate(value, this.minDate, this.maxDate);
1046
902
  }
1047
- /** The currently selected date. */
1048
903
  // eslint-disable-next-line @typescript-eslint/member-ordering
1049
904
  get selected() {
1050
905
  return this._selected;
@@ -1055,7 +910,6 @@ class CmatDatetimepickerTimeComponent {
1055
910
  this.activeDate = this._selected;
1056
911
  }
1057
912
  }
1058
- /** The minimum selectable date. */
1059
913
  // eslint-disable-next-line @typescript-eslint/member-ordering
1060
914
  get minDate() {
1061
915
  return this._minDate;
@@ -1063,7 +917,6 @@ class CmatDatetimepickerTimeComponent {
1063
917
  set minDate(value) {
1064
918
  this._minDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
1065
919
  }
1066
- /** The maximum selectable date. */
1067
920
  // eslint-disable-next-line @typescript-eslint/member-ordering
1068
921
  get maxDate() {
1069
922
  return this._maxDate;
@@ -1071,7 +924,6 @@ class CmatDatetimepickerTimeComponent {
1071
924
  set maxDate(value) {
1072
925
  this._maxDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
1073
926
  }
1074
- /** Whether the clock should be started in hour or minute view. */
1075
927
  // eslint-disable-next-line @typescript-eslint/member-ordering
1076
928
  get clockView() {
1077
929
  return this._clockView;
@@ -1086,7 +938,6 @@ class CmatDatetimepickerTimeComponent {
1086
938
  return String(value);
1087
939
  }
1088
940
  ngOnChanges(changes) {
1089
- // when clockView changes by input we should focus the correct input
1090
941
  if (changes['clockView']) {
1091
942
  if (changes['clockView'].currentValue !== changes['clockView'].previousValue) {
1092
943
  this.focusInputElement();
@@ -1114,9 +965,6 @@ class CmatDatetimepickerTimeComponent {
1114
965
  const newValue = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), this.updateHourForAmPm(hour), this._adapter.getMinute(this.activeDate));
1115
966
  this._activeDate = this._adapter.clampDate(newValue, this.minDate, this.maxDate);
1116
967
  this.activeDateChange.emit(this.activeDate);
1117
- // If previously we did set [cmatValue]="13" and the input changed to 6, and the clamping will make it "13" again
1118
- // then the hourInputDirective will not have been updated since "13" === "13" same reference so no change detected
1119
- // by directly setting it within this handler, we handle this usecase
1120
968
  if (this.hourInputDirective) {
1121
969
  this.hourInputDirective.timeValue = this.hour;
1122
970
  }
@@ -1126,19 +974,16 @@ class CmatDatetimepickerTimeComponent {
1126
974
  if (!this.twelvehour) {
1127
975
  return value;
1128
976
  }
1129
- // value should be between 1-12
1130
977
  if (this.AMPM === 'AM') {
1131
978
  if (value === 0 || value === 12) {
1132
979
  return 0;
1133
980
  }
1134
981
  return value;
1135
982
  }
1136
- // PM
1137
983
  else {
1138
984
  if (value === 0 || value === 12) {
1139
985
  return 12;
1140
986
  }
1141
- // other cases, we should add 12 to the value aka 3:00 PM = 3 + 12 = 15:00
1142
987
  return value + 12;
1143
988
  }
1144
989
  }
@@ -1148,9 +993,6 @@ class CmatDatetimepickerTimeComponent {
1148
993
  const newValue = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), this._adapter.getHour(this._activeDate), minute);
1149
994
  this._activeDate = this._adapter.clampDate(newValue, this.minDate, this.maxDate);
1150
995
  this.activeDateChange.emit(this.activeDate);
1151
- // If previously we did set [cmatValue]="40" and the input changed to 30, and the clamping will make it "40" again
1152
- // then the minuteInputDirective will not have been updated since "40" === "40" same reference so no change detected
1153
- // by directly setting it within this handler, we handle this usecase
1154
996
  if (this.minuteInputDirective) {
1155
997
  this.minuteInputDirective.timeValue = this.minute;
1156
998
  }
@@ -1184,12 +1026,12 @@ class CmatDatetimepickerTimeComponent {
1184
1026
  this.datetimepickerIntlChangesSubscription.unsubscribe();
1185
1027
  }
1186
1028
  }
1187
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1188
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CmatDatetimepickerTimeComponent, isStandalone: true, selector: "cmat-datetimepicker-time", inputs: { dateFilter: "dateFilter", interval: "interval", AMPM: "AMPM", twelvehour: "twelvehour", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", clockView: "clockView" }, outputs: { selectedChange: "selectedChange", activeDateChange: "activeDateChange", userSelection: "userSelection", ampmChange: "ampmChange", clockViewChange: "clockViewChange" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "hourInputElement", first: true, predicate: ["hourInput"], descendants: true, read: (ElementRef) }, { propertyName: "hourInputDirective", first: true, predicate: ["hourInput"], descendants: true, read: CmatDatetimepickerTimeInputDirective }, { propertyName: "minuteInputElement", first: true, predicate: ["minuteInput"], descendants: true, read: (ElementRef) }, { propertyName: "minuteInputDirective", first: true, predicate: ["minuteInput"], descendants: true, read: CmatDatetimepickerTimeInputDirective }], exportAs: ["cmatDatetimepickerTime"], usesOnChanges: true, ngImport: i0, template: "<div class=\"cmat-datetimepicker-time-input-wrapper\">\r\n <div class=\"cmat-datetimepicker-time-input-inner\">\r\n <input #hourInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'hour'\" [class.cmat-datetimepicker-time-input-warning]=\"!hourInput.valid\" [timeMin]=\"twelvehour ? 1 : 0\" [timeMax]=\"twelvehour ? 12 : 23\"\r\n [timeValue]=\"hour\" (timeValueChanged)=\"handleHourInputChange($event)\" (focus)=\"handleFocus('hour')\" />\r\n\r\n <div class=\"cmat-datetimepicker-time-seperator\">:</div>\r\n\r\n <input #minuteInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'minute'\" [class.cmat-datetimepicker-time-input-warning]=\"!minuteInput.valid\" [timeMin]=\"0\" [timeMax]=\"59\" [timeValue]=\"minute\"\r\n [timeInterval]=\"interval\" (timeValueChanged)=\"handleMinuteInputChange($event)\" (focus)=\"handleFocus('minute')\" />\r\n\r\n @if (twelvehour) {\r\n <div class=\"cmat-datetimepicker-time-ampm\">\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-am\"\r\n aria-label=\"AM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'AM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('AM')\">AM</button>\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-pm\"\r\n aria-label=\"PM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'PM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('PM')\">PM</button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"interval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\"\r\n (selectedChange)=\"timeSelected($event)\" (activeDateChange)=\"onActiveDateChange($event)\">\r\n </cmat-datetimepicker-clock>\r\n\r\n <div class=\"cmat-datetimepicker-time-button-wrapper flex flex-row gap-4\">\r\n <button class=\"cmat=datetimepicker-time-cancel-button\" matButton=\"outlined\" type=\"button\" (click)=\"handleCancel()\">\r\n {{ datetimepickerIntl.cancelLabel }}\r\n </button>\r\n <button class=\"cmat-datetimepicker-time-ok-button\" matButton=\"filled\" type=\"button\" color=\"primary\" [disabled]=\"minuteInputDirective?.invalid || hourInputDirective?.invalid\"\r\n (click)=\"handleOk()\">\r\n {{ datetimepickerIntl.okLabel }}\r\n </button>\r\n </div>", styles: [".cmat-datetimepicker-time{display:block;outline:none;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-time-input-wrapper{padding:8px 0;text-align:center}.cmat-datetimepicker-time-input-inner{display:inline-flex;height:56px;align-items:center}.cmat-datetimepicker-time-input{width:72px;font-size:36px;text-align:center;border-radius:8px;border:2px solid transparent;appearance:none;outline:none;height:100%}.cmat-datetimepicker-time-seperator{display:inline-flex;justify-content:center;width:24px;font-size:36px;height:100%}.cmat-datetimepicker-time-ampm{display:inline-flex;flex-direction:column;margin-left:12px;height:100%}[dir=rtl] .cmat-datetimepicker-time-ampm{margin-left:auto;margin-right:12px}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{flex:1;width:40px;min-width:auto;padding:0;line-height:normal;border-width:1px;border-style:solid;min-height:0}.cmat-datetimepicker-time-am.mat-mdc-button{border-radius:8px 8px 0 0!important}.cmat-datetimepicker-time-pm.mat-mdc-button{border-radius:0 0 8px 8px!important;border-top:none}.cmat-datetimepicker-time-button-wrapper{display:flex;justify-content:flex-end;padding-top:8px}\n"], dependencies: [{ kind: "directive", type: CmatDatetimepickerTimeInputDirective, selector: "input.cmat-datetimepicker-time-input", inputs: ["timeInterval", "timeMin", "timeMax", "timeValue"], outputs: ["timeValueChanged"], exportAs: ["cmatDatetimepickerTimeInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: CmatDatetimepickerClockComponent, selector: "cmat-datetimepicker-clock", inputs: ["dateFilter", "interval", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "startView"], outputs: ["userSelection", "selectedChange", "activeDateChange"], exportAs: ["cmatDatetimepickerClock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1029
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1030
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatDatetimepickerTimeComponent, isStandalone: true, selector: "cmat-datetimepicker-time", inputs: { dateFilter: "dateFilter", interval: "interval", AMPM: "AMPM", twelvehour: "twelvehour", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", clockView: "clockView" }, outputs: { selectedChange: "selectedChange", activeDateChange: "activeDateChange", userSelection: "userSelection", ampmChange: "ampmChange", clockViewChange: "clockViewChange" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "hourInputElement", first: true, predicate: ["hourInput"], descendants: true, read: (ElementRef) }, { propertyName: "hourInputDirective", first: true, predicate: ["hourInput"], descendants: true, read: CmatDatetimepickerTimeInputDirective }, { propertyName: "minuteInputElement", first: true, predicate: ["minuteInput"], descendants: true, read: (ElementRef) }, { propertyName: "minuteInputDirective", first: true, predicate: ["minuteInput"], descendants: true, read: CmatDatetimepickerTimeInputDirective }], exportAs: ["cmatDatetimepickerTime"], usesOnChanges: true, ngImport: i0, template: "<div class=\"cmat-datetimepicker-time-input-wrapper\" [attr.data-refresh]=\"intlVersion()\">\r\n <div class=\"cmat-datetimepicker-time-input-inner\">\r\n <input #hourInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'hour'\" [class.cmat-datetimepicker-time-input-warning]=\"!hourInput.valid\" [timeMin]=\"twelvehour ? 1 : 0\" [timeMax]=\"twelvehour ? 12 : 23\"\r\n [timeValue]=\"hour\" (timeValueChanged)=\"handleHourInputChange($event)\" (focus)=\"handleFocus('hour')\" />\r\n\r\n <div class=\"cmat-datetimepicker-time-seperator\">:</div>\r\n\r\n <input #minuteInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'minute'\" [class.cmat-datetimepicker-time-input-warning]=\"!minuteInput.valid\" [timeMin]=\"0\" [timeMax]=\"59\" [timeValue]=\"minute\"\r\n [timeInterval]=\"interval\" (timeValueChanged)=\"handleMinuteInputChange($event)\" (focus)=\"handleFocus('minute')\" />\r\n\r\n @if (twelvehour) {\r\n <div class=\"cmat-datetimepicker-time-ampm\">\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-am\"\r\n aria-label=\"AM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'AM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('AM')\">AM</button>\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-pm\"\r\n aria-label=\"PM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'PM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('PM')\">PM</button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"interval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\"\r\n (selectedChange)=\"timeSelected($event)\" (activeDateChange)=\"onActiveDateChange($event)\">\r\n </cmat-datetimepicker-clock>\r\n\r\n <div class=\"cmat-datetimepicker-time-button-wrapper flex flex-row gap-4\">\r\n <button class=\"cmat=datetimepicker-time-cancel-button\" matButton=\"outlined\" type=\"button\" (click)=\"handleCancel()\">\r\n {{ datetimepickerIntl.cancelLabel }}\r\n </button>\r\n <button class=\"cmat-datetimepicker-time-ok-button\" matButton=\"filled\" type=\"button\" color=\"primary\" [disabled]=\"minuteInputDirective?.invalid || hourInputDirective?.invalid\"\r\n (click)=\"handleOk()\">\r\n {{ datetimepickerIntl.okLabel }}\r\n </button>\r\n </div>\r\n", styles: [".cmat-datetimepicker-time{display:block;outline:none;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-time-input-wrapper{padding:8px 0;text-align:center}.cmat-datetimepicker-time-input-inner{display:inline-flex;height:56px;align-items:center}.cmat-datetimepicker-time-input{width:72px;font-size:36px;text-align:center;border-radius:8px;border:2px solid transparent;appearance:none;outline:none;height:100%}.cmat-datetimepicker-time-seperator{display:inline-flex;justify-content:center;width:24px;font-size:36px;height:100%}.cmat-datetimepicker-time-ampm{display:inline-flex;flex-direction:column;margin-left:12px;height:100%}[dir=rtl] .cmat-datetimepicker-time-ampm{margin-left:auto;margin-right:12px}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{flex:1;width:40px;min-width:auto;padding:0;line-height:normal;border-width:1px;border-style:solid;min-height:0}.cmat-datetimepicker-time-am.mat-mdc-button{border-radius:8px 8px 0 0!important}.cmat-datetimepicker-time-pm.mat-mdc-button{border-radius:0 0 8px 8px!important;border-top:none}.cmat-datetimepicker-time-button-wrapper{display:flex;justify-content:flex-end;padding-top:8px}\n"], dependencies: [{ kind: "directive", type: CmatDatetimepickerTimeInputDirective, selector: "input.cmat-datetimepicker-time-input", inputs: ["timeInterval", "timeMin", "timeMax", "timeValue"], outputs: ["timeValueChanged"], exportAs: ["cmatDatetimepickerTimeInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: CmatDatetimepickerClockComponent, selector: "cmat-datetimepicker-clock", inputs: ["dateFilter", "interval", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "startView"], outputs: ["userSelection", "selectedChange", "activeDateChange"], exportAs: ["cmatDatetimepickerClock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1189
1031
  }
1190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerTimeComponent, decorators: [{
1032
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerTimeComponent, decorators: [{
1191
1033
  type: Component,
1192
- args: [{ selector: 'cmat-datetimepicker-time', exportAs: 'cmatDatetimepickerTime', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatDatetimepickerTimeInputDirective, MatButtonModule, CmatDatetimepickerClockComponent], template: "<div class=\"cmat-datetimepicker-time-input-wrapper\">\r\n <div class=\"cmat-datetimepicker-time-input-inner\">\r\n <input #hourInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'hour'\" [class.cmat-datetimepicker-time-input-warning]=\"!hourInput.valid\" [timeMin]=\"twelvehour ? 1 : 0\" [timeMax]=\"twelvehour ? 12 : 23\"\r\n [timeValue]=\"hour\" (timeValueChanged)=\"handleHourInputChange($event)\" (focus)=\"handleFocus('hour')\" />\r\n\r\n <div class=\"cmat-datetimepicker-time-seperator\">:</div>\r\n\r\n <input #minuteInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'minute'\" [class.cmat-datetimepicker-time-input-warning]=\"!minuteInput.valid\" [timeMin]=\"0\" [timeMax]=\"59\" [timeValue]=\"minute\"\r\n [timeInterval]=\"interval\" (timeValueChanged)=\"handleMinuteInputChange($event)\" (focus)=\"handleFocus('minute')\" />\r\n\r\n @if (twelvehour) {\r\n <div class=\"cmat-datetimepicker-time-ampm\">\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-am\"\r\n aria-label=\"AM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'AM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('AM')\">AM</button>\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-pm\"\r\n aria-label=\"PM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'PM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('PM')\">PM</button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"interval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\"\r\n (selectedChange)=\"timeSelected($event)\" (activeDateChange)=\"onActiveDateChange($event)\">\r\n </cmat-datetimepicker-clock>\r\n\r\n <div class=\"cmat-datetimepicker-time-button-wrapper flex flex-row gap-4\">\r\n <button class=\"cmat=datetimepicker-time-cancel-button\" matButton=\"outlined\" type=\"button\" (click)=\"handleCancel()\">\r\n {{ datetimepickerIntl.cancelLabel }}\r\n </button>\r\n <button class=\"cmat-datetimepicker-time-ok-button\" matButton=\"filled\" type=\"button\" color=\"primary\" [disabled]=\"minuteInputDirective?.invalid || hourInputDirective?.invalid\"\r\n (click)=\"handleOk()\">\r\n {{ datetimepickerIntl.okLabel }}\r\n </button>\r\n </div>", styles: [".cmat-datetimepicker-time{display:block;outline:none;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-time-input-wrapper{padding:8px 0;text-align:center}.cmat-datetimepicker-time-input-inner{display:inline-flex;height:56px;align-items:center}.cmat-datetimepicker-time-input{width:72px;font-size:36px;text-align:center;border-radius:8px;border:2px solid transparent;appearance:none;outline:none;height:100%}.cmat-datetimepicker-time-seperator{display:inline-flex;justify-content:center;width:24px;font-size:36px;height:100%}.cmat-datetimepicker-time-ampm{display:inline-flex;flex-direction:column;margin-left:12px;height:100%}[dir=rtl] .cmat-datetimepicker-time-ampm{margin-left:auto;margin-right:12px}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{flex:1;width:40px;min-width:auto;padding:0;line-height:normal;border-width:1px;border-style:solid;min-height:0}.cmat-datetimepicker-time-am.mat-mdc-button{border-radius:8px 8px 0 0!important}.cmat-datetimepicker-time-pm.mat-mdc-button{border-radius:0 0 8px 8px!important;border-top:none}.cmat-datetimepicker-time-button-wrapper{display:flex;justify-content:flex-end;padding-top:8px}\n"] }]
1034
+ args: [{ selector: 'cmat-datetimepicker-time', exportAs: 'cmatDatetimepickerTime', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatDatetimepickerTimeInputDirective, MatButtonModule, CmatDatetimepickerClockComponent], template: "<div class=\"cmat-datetimepicker-time-input-wrapper\" [attr.data-refresh]=\"intlVersion()\">\r\n <div class=\"cmat-datetimepicker-time-input-inner\">\r\n <input #hourInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'hour'\" [class.cmat-datetimepicker-time-input-warning]=\"!hourInput.valid\" [timeMin]=\"twelvehour ? 1 : 0\" [timeMax]=\"twelvehour ? 12 : 23\"\r\n [timeValue]=\"hour\" (timeValueChanged)=\"handleHourInputChange($event)\" (focus)=\"handleFocus('hour')\" />\r\n\r\n <div class=\"cmat-datetimepicker-time-seperator\">:</div>\r\n\r\n <input #minuteInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'minute'\" [class.cmat-datetimepicker-time-input-warning]=\"!minuteInput.valid\" [timeMin]=\"0\" [timeMax]=\"59\" [timeValue]=\"minute\"\r\n [timeInterval]=\"interval\" (timeValueChanged)=\"handleMinuteInputChange($event)\" (focus)=\"handleFocus('minute')\" />\r\n\r\n @if (twelvehour) {\r\n <div class=\"cmat-datetimepicker-time-ampm\">\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-am\"\r\n aria-label=\"AM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'AM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('AM')\">AM</button>\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-pm\"\r\n aria-label=\"PM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'PM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('PM')\">PM</button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"interval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\"\r\n (selectedChange)=\"timeSelected($event)\" (activeDateChange)=\"onActiveDateChange($event)\">\r\n </cmat-datetimepicker-clock>\r\n\r\n <div class=\"cmat-datetimepicker-time-button-wrapper flex flex-row gap-4\">\r\n <button class=\"cmat=datetimepicker-time-cancel-button\" matButton=\"outlined\" type=\"button\" (click)=\"handleCancel()\">\r\n {{ datetimepickerIntl.cancelLabel }}\r\n </button>\r\n <button class=\"cmat-datetimepicker-time-ok-button\" matButton=\"filled\" type=\"button\" color=\"primary\" [disabled]=\"minuteInputDirective?.invalid || hourInputDirective?.invalid\"\r\n (click)=\"handleOk()\">\r\n {{ datetimepickerIntl.okLabel }}\r\n </button>\r\n </div>\r\n", styles: [".cmat-datetimepicker-time{display:block;outline:none;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-time-input-wrapper{padding:8px 0;text-align:center}.cmat-datetimepicker-time-input-inner{display:inline-flex;height:56px;align-items:center}.cmat-datetimepicker-time-input{width:72px;font-size:36px;text-align:center;border-radius:8px;border:2px solid transparent;appearance:none;outline:none;height:100%}.cmat-datetimepicker-time-seperator{display:inline-flex;justify-content:center;width:24px;font-size:36px;height:100%}.cmat-datetimepicker-time-ampm{display:inline-flex;flex-direction:column;margin-left:12px;height:100%}[dir=rtl] .cmat-datetimepicker-time-ampm{margin-left:auto;margin-right:12px}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{flex:1;width:40px;min-width:auto;padding:0;line-height:normal;border-width:1px;border-style:solid;min-height:0}.cmat-datetimepicker-time-am.mat-mdc-button{border-radius:8px 8px 0 0!important}.cmat-datetimepicker-time-pm.mat-mdc-button{border-radius:0 0 8px 8px!important;border-top:none}.cmat-datetimepicker-time-button-wrapper{display:flex;justify-content:flex-end;padding-top:8px}\n"] }]
1193
1035
  }], ctorParameters: () => [], propDecorators: { selectedChange: [{
1194
1036
  type: Output
1195
1037
  }], activeDateChange: [{
@@ -1235,18 +1077,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
1235
1077
  type: Input
1236
1078
  }] } });
1237
1079
 
1238
- /**
1239
- * An internal component used to display a single year in the datepicker.
1240
- */
1241
1080
  class CmatDatetimepickerYearViewComponent {
1242
1081
  constructor() {
1243
1082
  this.userSelection = new EventEmitter();
1244
1083
  this.type = 'date';
1245
- /** Emits when a new month is selected. */
1246
1084
  this.selectedChange = new EventEmitter();
1085
+ this.calendarState = signal('', ...(ngDevMode ? [{ debugName: "calendarState" }] : /* istanbul ignore next */ []));
1247
1086
  this.adapter = inject(DatetimeAdapter, { optional: true });
1248
1087
  this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
1249
- this._changeDetectorRef = inject(ChangeDetectorRef);
1250
1088
  this._elementRef = inject(ElementRef);
1251
1089
  this._calendarAnimationListener = this.calendarStateDone.bind(this);
1252
1090
  if (!this.adapter) {
@@ -1258,7 +1096,6 @@ class CmatDatetimepickerYearViewComponent {
1258
1096
  this._activeDate = this.adapter.today();
1259
1097
  this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
1260
1098
  }
1261
- /** The date to display in this year view (everything other than the year is ignored). */
1262
1099
  get activeDate() {
1263
1100
  return this._activeDate;
1264
1101
  }
@@ -1276,7 +1113,6 @@ class CmatDatetimepickerYearViewComponent {
1276
1113
  }
1277
1114
  }
1278
1115
  }
1279
- /** The currently selected date. */
1280
1116
  // eslint-disable-next-line @typescript-eslint/member-ordering
1281
1117
  get selected() {
1282
1118
  return this._selected;
@@ -1291,7 +1127,6 @@ class CmatDatetimepickerYearViewComponent {
1291
1127
  ngOnDestroy() {
1292
1128
  this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
1293
1129
  }
1294
- /** Handles when a new month is selected. */
1295
1130
  monthSelected(month) {
1296
1131
  const normalizedDate = this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1, 0, 0);
1297
1132
  this.selectedChange.emit(this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, Math.min(this.adapter.getDate(this.activeDate), this.adapter.getNumDaysInMonth(normalizedDate)), this.adapter.getHour(this.activeDate), this.adapter.getMinute(this.activeDate)));
@@ -1301,39 +1136,29 @@ class CmatDatetimepickerYearViewComponent {
1301
1136
  }
1302
1137
  calendarStateDone(event) {
1303
1138
  if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {
1304
- this.calendarState = '';
1305
- this._changeDetectorRef.markForCheck();
1139
+ this.calendarState.set('');
1306
1140
  }
1307
1141
  }
1308
- /** Initializes this month view. */
1309
1142
  _init() {
1310
1143
  this.selectedMonth = this._getMonthInCurrentYear(this.selected);
1311
1144
  this.todayMonth = this._getMonthInCurrentYear(this.adapter.today());
1312
1145
  this.yearLabel = this.adapter.getYearName(this.activeDate);
1313
1146
  const monthNames = this.adapter.getMonthNames('short');
1314
- // First row of months only contains 5 elements so we can fit the year label on the same row.
1315
1147
  this.months = [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9, 10, 11]].map(row => row.map(month => this._createCellForMonth(month, monthNames[month])));
1316
1148
  }
1317
- /**
1318
- * Gets the month in this year that the given Date falls on.
1319
- * Returns null if the given Date is in another year.
1320
- */
1321
1149
  _getMonthInCurrentYear(date) {
1322
1150
  return this.adapter.sameYear(date, this.activeDate) ?
1323
1151
  this.adapter.getMonth(date) : null;
1324
1152
  }
1325
- /** Creates an MdCalendarCell for the given month. */
1326
1153
  _createCellForMonth(month, monthName) {
1327
1154
  const ariaLabel = this.adapter.format(this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1, this.adapter.getHour(this.activeDate), this.adapter.getMinute(this.activeDate)), this._dateFormats.display.monthYearA11yLabel);
1328
1155
  return new CmatDatetimepickerCalendarCellComponent(month, monthName.toLocaleUpperCase(), ariaLabel, this._isMonthEnabled(month));
1329
1156
  }
1330
- /** Whether the given month is enabled. */
1331
1157
  _isMonthEnabled(month) {
1332
1158
  if (!this.dateFilter) {
1333
1159
  return true;
1334
1160
  }
1335
1161
  const firstOfMonth = this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1, this.adapter.getHour(this.activeDate), this.adapter.getMinute(this.activeDate));
1336
- // If any date in the month is enabled count the month as enabled.
1337
1162
  for (let date = firstOfMonth; this.adapter.getMonth(date) === month; date = this.adapter.addCalendarDays(date, 1)) {
1338
1163
  if (this.dateFilter(date)) {
1339
1164
  return true;
@@ -1342,14 +1167,14 @@ class CmatDatetimepickerYearViewComponent {
1342
1167
  return false;
1343
1168
  }
1344
1169
  _changeCalendarState(direction) {
1345
- this.calendarState = direction;
1170
+ this.calendarState.set(direction);
1346
1171
  }
1347
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1348
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CmatDatetimepickerYearViewComponent, isStandalone: true, selector: "cmat-datetimepicker-year-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerYearView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getMonth(activeDate)\" [labelMinRequiredCells]=\"2\"\r\n [label]=\"yearLabel\" [rows]=\"months\" [selectedValue]=\"selectedMonth\" [todayValue]=\"todayMonth\"\r\n [allowDisabledSelection]=\"true\" (selectedValueChange)=\"monthSelected($event)\"></tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1173
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatDatetimepickerYearViewComponent, isStandalone: true, selector: "cmat-datetimepicker-year-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerYearView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState()==='left',\r\n 'right': calendarState()==='right'\r\n }\" [activeCell]=\"adapter.getMonth(activeDate)\" [labelMinRequiredCells]=\"2\"\r\n [label]=\"yearLabel\" [rows]=\"months\" [selectedValue]=\"selectedMonth\" [todayValue]=\"todayMonth\"\r\n [allowDisabledSelection]=\"true\" (selectedValueChange)=\"monthSelected($event)\"></tbody>\r\n</table>\r\n", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1349
1174
  }
1350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerYearViewComponent, decorators: [{
1175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerYearViewComponent, decorators: [{
1351
1176
  type: Component,
1352
- args: [{ selector: 'cmat-datetimepicker-year-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerYearView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getMonth(activeDate)\" [labelMinRequiredCells]=\"2\"\r\n [label]=\"yearLabel\" [rows]=\"months\" [selectedValue]=\"selectedMonth\" [todayValue]=\"todayMonth\"\r\n [allowDisabledSelection]=\"true\" (selectedValueChange)=\"monthSelected($event)\"></tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
1177
+ args: [{ selector: 'cmat-datetimepicker-year-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerYearView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState()==='left',\r\n 'right': calendarState()==='right'\r\n }\" [activeCell]=\"adapter.getMonth(activeDate)\" [labelMinRequiredCells]=\"2\"\r\n [label]=\"yearLabel\" [rows]=\"months\" [selectedValue]=\"selectedMonth\" [todayValue]=\"todayMonth\"\r\n [allowDisabledSelection]=\"true\" (selectedValueChange)=\"monthSelected($event)\"></tbody>\r\n</table>\r\n", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
1353
1178
  }], ctorParameters: () => [], propDecorators: { userSelection: [{
1354
1179
  type: Output
1355
1180
  }], type: [{
@@ -1364,45 +1189,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
1364
1189
  type: Input
1365
1190
  }] } });
1366
1191
 
1367
- /**
1368
- * A calendar that is used as part of the datepicker.
1369
- */
1370
1192
  class CmatDatetimepickerCalendarComponent {
1371
1193
  constructor() {
1372
1194
  this.userSelection = new EventEmitter();
1373
- /** Active multi year view when click on year. */
1374
1195
  this.multiYearSelector = false;
1375
- /** Whether the calendar should be started in month or year view. */
1376
1196
  this.startView = 'month';
1377
1197
  this.twelvehour = false;
1378
1198
  this.timeInterval = 1;
1379
- /** Prevent user to select same date time */
1380
1199
  this.preventSameDateTimeSelection = false;
1381
- /** Emits when the currently selected date changes. */
1382
1200
  this.selectedChange = new EventEmitter();
1383
- /** Emits when the view has been changed. **/
1384
1201
  this.viewChanged = new EventEmitter();
1385
1202
  this.class = 'cmat-datetimepicker-calendar';
1386
1203
  this.label = 'ariaLabel';
1387
1204
  this.role = 'dialog';
1388
1205
  this.tabindex = 0;
1389
1206
  this.clockView = 'hour';
1390
- /** Whether the calendar is in month view. */
1207
+ this.calendarState = signal('', ...(ngDevMode ? [{ debugName: "calendarState" }] : /* istanbul ignore next */ []));
1208
+ this.intlVersion = signal(0, ...(ngDevMode ? [{ debugName: "intlVersion" }] : /* istanbul ignore next */ []));
1391
1209
  this._elementRef = inject(ElementRef);
1392
1210
  this._intl = inject(CmatDatetimepickerIntl);
1393
1211
  this._adapter = inject(DatetimeAdapter, { optional: true });
1394
1212
  this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
1395
- this._changeDetectorRef = inject(ChangeDetectorRef);
1396
1213
  this._type = 'date';
1397
1214
  this._timeInput = false;
1398
1215
  this._calendarAnimationListener = this.calendarStateDone.bind(this);
1399
- /** Date filter for the month and year views. */
1400
1216
  this.dateFilterForViews = (date) => !!date &&
1401
1217
  (!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.DATE)) &&
1402
1218
  (!this.minDate || this._adapter.compareDate(date, this.minDate) >= 0) &&
1403
1219
  (!this.maxDate || this._adapter.compareDate(date, this.maxDate) <= 0);
1404
1220
  const _intl = this._intl;
1405
- const changeDetectorRef = inject(ChangeDetectorRef);
1406
1221
  if (!this._adapter) {
1407
1222
  throw createMissingDateImplError('CDatetimeAdapter');
1408
1223
  }
@@ -1410,7 +1225,7 @@ class CmatDatetimepickerCalendarComponent {
1410
1225
  throw createMissingDateImplError('CMAT_DATETIME_FORMATS');
1411
1226
  }
1412
1227
  this._intlChanges = _intl.changes
1413
- .subscribe(() => changeDetectorRef.markForCheck());
1228
+ .subscribe(() => this.intlVersion.update(value => value + 1));
1414
1229
  this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
1415
1230
  }
1416
1231
  get type() {
@@ -1422,7 +1237,6 @@ class CmatDatetimepickerCalendarComponent {
1422
1237
  this.multiYearSelector = true;
1423
1238
  }
1424
1239
  }
1425
- /** A date representing the period (month or year) to start the calendar in. */
1426
1240
  // eslint-disable-next-line @typescript-eslint/member-ordering
1427
1241
  get startAt() {
1428
1242
  return this._startAt;
@@ -1430,11 +1244,6 @@ class CmatDatetimepickerCalendarComponent {
1430
1244
  set startAt(value) {
1431
1245
  this._startAt = this._adapter.getValidDateOrNull(value);
1432
1246
  }
1433
- /**
1434
- * Whether the calendar is in time mode. In time mode the calendar clock gets time input elements rather then just clock
1435
- *
1436
- * When touchUi is enabled this will be disabled
1437
- */
1438
1247
  // eslint-disable-next-line @typescript-eslint/member-ordering
1439
1248
  get timeInput() {
1440
1249
  return this._timeInput;
@@ -1442,7 +1251,6 @@ class CmatDatetimepickerCalendarComponent {
1442
1251
  set timeInput(value) {
1443
1252
  this._timeInput = coerceBooleanProperty(value);
1444
1253
  }
1445
- /** The currently selected date. */
1446
1254
  // eslint-disable-next-line @typescript-eslint/member-ordering
1447
1255
  get selected() {
1448
1256
  return this._selected;
@@ -1450,7 +1258,6 @@ class CmatDatetimepickerCalendarComponent {
1450
1258
  set selected(value) {
1451
1259
  this._selected = this._adapter.getValidDateOrNull(value);
1452
1260
  }
1453
- /** The minimum selectable date. */
1454
1261
  // eslint-disable-next-line @typescript-eslint/member-ordering
1455
1262
  get minDate() {
1456
1263
  return this._minDate;
@@ -1458,7 +1265,6 @@ class CmatDatetimepickerCalendarComponent {
1458
1265
  set minDate(value) {
1459
1266
  this._minDate = this._adapter.getValidDateOrNull(value);
1460
1267
  }
1461
- /** The maximum selectable date. */
1462
1268
  // eslint-disable-next-line @typescript-eslint/member-ordering
1463
1269
  get maxDate() {
1464
1270
  return this._maxDate;
@@ -1466,10 +1272,6 @@ class CmatDatetimepickerCalendarComponent {
1466
1272
  set maxDate(value) {
1467
1273
  this._maxDate = this._adapter.getValidDateOrNull(value);
1468
1274
  }
1469
- /**
1470
- * The current active date. This determines which time period is shown and which date is
1471
- * highlighted when using keyboard navigation.
1472
- */
1473
1275
  // eslint-disable-next-line @typescript-eslint/member-ordering
1474
1276
  get activeDate() {
1475
1277
  return this._clampedActiveDate;
@@ -1495,7 +1297,6 @@ class CmatDatetimepickerCalendarComponent {
1495
1297
  this._currentView = view;
1496
1298
  this.viewChanged.emit(view);
1497
1299
  }
1498
- /** The label for the current calendar view. */
1499
1300
  // eslint-disable-next-line @typescript-eslint/member-ordering
1500
1301
  get yearButtonText() {
1501
1302
  return this._adapter.getYearName(this.activeDate);
@@ -1503,9 +1304,6 @@ class CmatDatetimepickerCalendarComponent {
1503
1304
  // eslint-disable-next-line @typescript-eslint/member-ordering
1504
1305
  get yearPeriodText() {
1505
1306
  if (this.currentView === 'multi-year') {
1506
- // The offset from the active year to the "slot" for the starting year is the
1507
- // *actual* first rendered year in the multi-year view, and the last year is
1508
- // just yearsPerPage - 1 away.
1509
1307
  const activeYear = this._adapter.getYear(this.activeDate);
1510
1308
  const minYearOfPage = activeYear - getActiveOffset(this._adapter, this.activeDate, this.minDate, this.maxDate);
1511
1309
  const maxYearOfPage = minYearOfPage + yearsPerPage - 1;
@@ -1622,7 +1420,6 @@ class CmatDatetimepickerCalendarComponent {
1622
1420
  this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
1623
1421
  this._intlChanges.unsubscribe();
1624
1422
  }
1625
- /** Handles date selection in the month view. */
1626
1423
  dateSelected(date) {
1627
1424
  if (this.type === 'date') {
1628
1425
  if (!this._adapter.sameDate(date, this.selected) || !this.preventSameDateTimeSelection) {
@@ -1634,7 +1431,6 @@ class CmatDatetimepickerCalendarComponent {
1634
1431
  this.currentView = 'clock';
1635
1432
  }
1636
1433
  }
1637
- /** Handles month selection in the year view. */
1638
1434
  monthSelected(month) {
1639
1435
  if (this.type === 'month') {
1640
1436
  if (!this._adapter.sameMonthAndYear(month, this.selected) || !this.preventSameDateTimeSelection) {
@@ -1647,7 +1443,6 @@ class CmatDatetimepickerCalendarComponent {
1647
1443
  this.clockView = 'hour';
1648
1444
  }
1649
1445
  }
1650
- /** Handles year selection in the multi year view. */
1651
1446
  yearSelected(year) {
1652
1447
  if (this.type === 'year') {
1653
1448
  if ((this.selected && !this._adapter.sameYear(year, this.selected)) || !this.preventSameDateTimeSelection) {
@@ -1708,13 +1503,11 @@ class CmatDatetimepickerCalendarComponent {
1708
1503
  return;
1709
1504
  }
1710
1505
  this.AMPM = source;
1711
- // if AMPM changed from PM to AM substract 12 hours
1712
1506
  const currentHour = this._adapter.getHour(this.activeDate);
1713
1507
  let newHourValue;
1714
1508
  if (this.AMPM === 'AM') {
1715
1509
  newHourValue = currentHour >= 12 ? this._adapter.getHour(this.activeDate) - 12 : 12;
1716
1510
  }
1717
- // otherwise add 12 hours
1718
1511
  else {
1719
1512
  newHourValue = (currentHour + 12) % 24;
1720
1513
  }
@@ -1740,26 +1533,22 @@ class CmatDatetimepickerCalendarComponent {
1740
1533
  this.currentView = 'clock';
1741
1534
  this.clockView = 'minute';
1742
1535
  }
1743
- /** Handles user clicks on the previous button. */
1744
1536
  previousClicked() {
1745
1537
  this.activeDate = this.currentView === 'month' ?
1746
1538
  this._adapter.addCalendarMonths(this.activeDate, -1) :
1747
1539
  this._adapter.addCalendarYears(this.activeDate, this.currentView === 'year' ? -1 : -yearsPerPage);
1748
1540
  }
1749
- /** Handles user clicks on the next button. */
1750
1541
  nextClicked() {
1751
1542
  this.activeDate = this.currentView === 'month' ?
1752
1543
  this._adapter.addCalendarMonths(this.activeDate, 1) :
1753
1544
  this._adapter.addCalendarYears(this.activeDate, this.currentView === 'year' ? 1 : yearsPerPage);
1754
1545
  }
1755
- /** Whether the previous period button is enabled. */
1756
1546
  previousEnabled() {
1757
1547
  if (!this.minDate) {
1758
1548
  return true;
1759
1549
  }
1760
1550
  return !this.minDate || !this._isSameView(this.activeDate, this.minDate);
1761
1551
  }
1762
- /** Whether the next period button is enabled. */
1763
1552
  nextEnabled() {
1764
1553
  return !this.maxDate || !this._isSameView(this.activeDate, this.maxDate);
1765
1554
  }
@@ -1768,11 +1557,9 @@ class CmatDatetimepickerCalendarComponent {
1768
1557
  }
1769
1558
  calendarStateDone(event) {
1770
1559
  if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {
1771
- this.calendarState = '';
1772
- this._changeDetectorRef.markForCheck();
1560
+ this.calendarState.set('');
1773
1561
  }
1774
1562
  }
1775
- /** Whether the two dates represent the same view in the current view mode (month or year). */
1776
1563
  _isSameView(date1, date2) {
1777
1564
  if (this.currentView === 'month') {
1778
1565
  return this._adapter.getYear(date1) === this._adapter.getYear(date2) &&
@@ -1781,10 +1568,8 @@ class CmatDatetimepickerCalendarComponent {
1781
1568
  if (this.currentView === 'year') {
1782
1569
  return this._adapter.getYear(date1) === this._adapter.getYear(date2);
1783
1570
  }
1784
- // Otherwise we are in 'multi-year' view.
1785
1571
  return isSameMultiYearView(this._adapter, date1, date2, this.minDate, this.maxDate);
1786
1572
  }
1787
- /** Handles keydown events on the calendar body when calendar is in month view. */
1788
1573
  _handleCalendarBodyKeydownInMonthView(event) {
1789
1574
  switch (event.code) {
1790
1575
  case 'ArrowLeft':
@@ -1819,18 +1604,14 @@ class CmatDatetimepickerCalendarComponent {
1819
1604
  case 'Enter':
1820
1605
  if (this.dateFilterForViews(this.activeDate)) {
1821
1606
  this.dateSelected(this.activeDate);
1822
- // Prevent unexpected default actions such as form submission.
1823
1607
  event.preventDefault();
1824
1608
  }
1825
1609
  return;
1826
1610
  default:
1827
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1828
1611
  return;
1829
1612
  }
1830
- // Prevent unexpected default actions such as form submission.
1831
1613
  event.preventDefault();
1832
1614
  }
1833
- /** Handles keydown events on the calendar body when calendar is in year view. */
1834
1615
  _handleCalendarBodyKeydownInYearView(event) {
1835
1616
  switch (event.code) {
1836
1617
  case 'ArrowLeft':
@@ -1863,13 +1644,10 @@ class CmatDatetimepickerCalendarComponent {
1863
1644
  this.monthSelected(this.activeDate);
1864
1645
  break;
1865
1646
  default:
1866
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1867
1647
  return;
1868
1648
  }
1869
- // Prevent unexpected default actions such as form submission.
1870
1649
  event.preventDefault();
1871
1650
  }
1872
- /** Handles keydown events on the calendar body when calendar is in multi-year view. */
1873
1651
  _handleCalendarBodyKeydownInMultiYearView(event) {
1874
1652
  switch (event.code) {
1875
1653
  case 'ArrowLeft':
@@ -1902,25 +1680,21 @@ class CmatDatetimepickerCalendarComponent {
1902
1680
  this.yearSelected(this.activeDate);
1903
1681
  break;
1904
1682
  default:
1905
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1906
1683
  return;
1907
1684
  }
1908
1685
  }
1909
- /** Handles keydown events on the calendar body when calendar is in month view. */
1910
1686
  _handleCalendarBodyKeydownInClockView(event) {
1911
1687
  switch (event.code) {
1912
1688
  case 'ArrowUp':
1913
1689
  this.activeDate = this.clockView === 'hour' ?
1914
1690
  this._adapter.addCalendarHours(this.activeDate, 1) :
1915
1691
  this._adapter.addCalendarMinutes(this.activeDate, this.timeInterval);
1916
- // if the hours changed the am/pm we should update the AM/PM
1917
1692
  this.selectAMPM(this.activeDate);
1918
1693
  break;
1919
1694
  case 'ArrowDown':
1920
1695
  this.activeDate = this.clockView === 'hour' ?
1921
1696
  this._adapter.addCalendarHours(this.activeDate, -1) :
1922
1697
  this._adapter.addCalendarMinutes(this.activeDate, -this.timeInterval);
1923
- // if the hours changed the am/pm we should update the AM/PM
1924
1698
  this.selectAMPM(this.activeDate);
1925
1699
  break;
1926
1700
  case 'Enter':
@@ -1929,50 +1703,36 @@ class CmatDatetimepickerCalendarComponent {
1929
1703
  }
1930
1704
  return;
1931
1705
  default:
1932
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1933
1706
  return;
1934
1707
  }
1935
- // Prevent unexpected default actions such as form submission.
1936
1708
  event.preventDefault();
1937
1709
  }
1938
- /**
1939
- * Determine the date for the month that comes before the given month in the same column in the
1940
- * calendar table.
1941
- */
1942
1710
  _prevMonthInSameCol(date) {
1943
- // Determine how many months to jump forward given that there are 2 empty slots at the beginning
1944
- // of each year.
1945
1711
  const increment = this._adapter.getMonth(date) <= 4 ? -5 :
1946
1712
  (this._adapter.getMonth(date) >= 7 ? -7 : -12);
1947
1713
  return this._adapter.addCalendarMonths(date, increment);
1948
1714
  }
1949
- /**
1950
- * Determine the date for the month that comes after the given month in the same column in the
1951
- * calendar table.
1952
- */
1953
1715
  _nextMonthInSameCol(date) {
1954
- // Determine how many months to jump forward given that there are 2 empty slots at the beginning
1955
- // of each year.
1956
1716
  const increment = this._adapter.getMonth(date) <= 4 ? 7 :
1957
1717
  (this._adapter.getMonth(date) >= 7 ? 5 : 12);
1958
1718
  return this._adapter.addCalendarMonths(date, increment);
1959
1719
  }
1960
1720
  _changeCalendarState(direction) {
1961
- this.calendarState = direction;
1721
+ this.calendarState.set(direction);
1962
1722
  }
1963
1723
  _2digit(n) {
1964
1724
  return ('00' + n).slice(-2);
1965
1725
  }
1966
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1967
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CmatDatetimepickerCalendarComponent, isStandalone: true, selector: "cmat-datetimepicker-calendar", inputs: { multiYearSelector: "multiYearSelector", startView: "startView", twelvehour: "twelvehour", timeInterval: "timeInterval", dateFilter: "dateFilter", preventSameDateTimeSelection: "preventSameDateTimeSelection", type: "type", startAt: "startAt", timeInput: "timeInput", selected: "selected", minDate: "minDate", maxDate: "maxDate" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange", viewChanged: "viewChanged" }, host: { listeners: { "keydown": "handleCalendarBodyKeydown($event)" }, properties: { "class.cmat-datetimepicker-calendar-with-time-input": "timeInput", "class": "this.class", "attr.aria-label": "this.label", "role": "this.role", "tabindex": "this.tabindex" } }, exportAs: ["cmatDatetimepickerCalendar"], ngImport: i0, template: "<div class=\"cmat-datetimepicker-calendar-header\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">&#58;</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"AM\"\r\n [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"PM\"\r\n [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium cmat-calendar-slide-animation\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\"\r\n (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\" [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\"\r\n [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\"\r\n (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\"\r\n [selected]=\"activeDate\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\"\r\n (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>", styles: [".cmat-datetimepicker-calendar{display:block;outline:none}.cmat-datetimepicker-calendar-header{box-sizing:border-box;padding:8px;border-radius:4px 4px 0 0;min-width:264px}.cmat-datetimepicker-calendar-header .header-button{color:#fff!important;padding:0 4px;font-size:inherit;white-space:normal;word-break:break-word;font-weight:500;cursor:pointer}.cmat-datetimepicker-calendar-header-year.header-button{font-size:26px;line-height:24px;display:flex}.cmat-datetimepicker-calendar-header-date-time{font-size:24px;line-height:36px;display:flex;flex-direction:row}.cmat-datetimepicker-calendar-header-year:not(.active),.cmat-datetimepicker-calendar-header-date:not(.active),.cmat-datetimepicker-calendar-header-hours:not(.active),.cmat-datetimepicker-calendar-header-minutes:not(.active),.cmat-datetimepicker-calendar-header-ampm:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-year.not-clickable,.cmat-datetimepicker-calendar-header-date.not-clickable,.cmat-datetimepicker-calendar-header-hours.not-clickable,.cmat-datetimepicker-calendar-header-minutes.not-clickable,.cmat-datetimepicker-calendar-header-ampm.not-clickable{cursor:initial}.cmat-datetimepicker-calendar-header-time{display:inline-flex}.cmat-datetimepicker-calendar-header-time:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-hours,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-minutes,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-ampm{opacity:1}.cmat-datetimepicker-calendar-header-hour-minute-separator{display:inline-block;width:8px;text-align:center}.cmat-datetimepicker-calendar-header-ampm-container{display:inline-flex;flex-direction:column;line-height:18px;font-size:12px}.cmat-datetimepicker-calendar-content{width:100%;padding:8px;outline:none;box-sizing:border-box;overflow:hidden}.cmat-datetimepicker-calendar-controls{display:flex;justify-content:space-between;margin:0 calc(4.7142857143% - 16px)}.cmat-datetimepicker-calendar-period-button{display:inline-block;height:40px;line-height:40px;outline:none;border:0;background:transparent;box-sizing:border-box}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{pointer-events:none}.cmat-datetimepicker-calendar-previous-button svg,.cmat-datetimepicker-calendar-next-button svg{fill:currentColor;vertical-align:top}[dir=rtl] .cmat-datetimepicker-calendar-previous-button svg,[dir=rtl] .cmat-datetimepicker-calendar-next-button svg{transform:rotate(180deg)}.cmat-datetimepicker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.cmat-datetimepicker-calendar-table-header th{text-align:center;padding:8px 0}\n", ".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: CmatDatetimepickerMonthViewComponent, selector: "cmat-datetimepicker-month-view", inputs: ["type", "dateFilter", "activeDate", "selected"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerMonthView"] }, { kind: "component", type: CmatDatetimepickerYearViewComponent, selector: "cmat-datetimepicker-year-view", inputs: ["type", "dateFilter", "activeDate", "selected"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerYearView"] }, { kind: "component", type: CmatDatetimepickerMultiYearViewComponent, selector: "cmat-datetimepicker-multi-year-view", inputs: ["type", "dateFilter", "activeDate", "selected", "minDate", "maxDate"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerMultiYearView"] }, { kind: "component", type: CmatDatetimepickerTimeComponent, selector: "cmat-datetimepicker-time", inputs: ["dateFilter", "interval", "AMPM", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "clockView"], outputs: ["selectedChange", "activeDateChange", "userSelection", "ampmChange", "clockViewChange"], exportAs: ["cmatDatetimepickerTime"] }, { kind: "component", type: CmatDatetimepickerClockComponent, selector: "cmat-datetimepicker-clock", inputs: ["dateFilter", "interval", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "startView"], outputs: ["userSelection", "selectedChange", "activeDateChange"], exportAs: ["cmatDatetimepickerClock"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1726
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1727
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatDatetimepickerCalendarComponent, isStandalone: true, selector: "cmat-datetimepicker-calendar", inputs: { multiYearSelector: "multiYearSelector", startView: "startView", twelvehour: "twelvehour", timeInterval: "timeInterval", dateFilter: "dateFilter", preventSameDateTimeSelection: "preventSameDateTimeSelection", type: "type", startAt: "startAt", timeInput: "timeInput", selected: "selected", minDate: "minDate", maxDate: "maxDate" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange", viewChanged: "viewChanged" }, host: { listeners: { "keydown": "handleCalendarBodyKeydown($event)" }, properties: { "class.cmat-datetimepicker-calendar-with-time-input": "timeInput", "class": "this.class", "attr.aria-label": "this.label", "role": "this.role", "tabindex": "this.tabindex" } }, exportAs: ["cmatDatetimepickerCalendar"], ngImport: i0, template: "<div class=\"cmat-datetimepicker-calendar-header\" [attr.data-refresh]=\"intlVersion()\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">&#58;</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"AM\"\r\n [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"PM\"\r\n [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium cmat-calendar-slide-animation\"\r\n [ngClass]=\"{\r\n 'left': calendarState()==='left',\r\n 'right': calendarState()==='right'\r\n }\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\"\r\n (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\" [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\"\r\n [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\"\r\n (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\"\r\n [selected]=\"activeDate\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\"\r\n (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>\r\n", styles: [".cmat-datetimepicker-calendar{display:block;outline:none}.cmat-datetimepicker-calendar-header{box-sizing:border-box;padding:8px;border-radius:4px 4px 0 0;min-width:264px}.cmat-datetimepicker-calendar-header .header-button{color:#fff!important;padding:0 4px;font-size:inherit;white-space:normal;word-break:break-word;font-weight:500;cursor:pointer}.cmat-datetimepicker-calendar-header-year.header-button{font-size:26px;line-height:24px;display:flex}.cmat-datetimepicker-calendar-header-date-time{font-size:24px;line-height:36px;display:flex;flex-direction:row}.cmat-datetimepicker-calendar-header-year:not(.active),.cmat-datetimepicker-calendar-header-date:not(.active),.cmat-datetimepicker-calendar-header-hours:not(.active),.cmat-datetimepicker-calendar-header-minutes:not(.active),.cmat-datetimepicker-calendar-header-ampm:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-year.not-clickable,.cmat-datetimepicker-calendar-header-date.not-clickable,.cmat-datetimepicker-calendar-header-hours.not-clickable,.cmat-datetimepicker-calendar-header-minutes.not-clickable,.cmat-datetimepicker-calendar-header-ampm.not-clickable{cursor:initial}.cmat-datetimepicker-calendar-header-time{display:inline-flex}.cmat-datetimepicker-calendar-header-time:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-hours,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-minutes,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-ampm{opacity:1}.cmat-datetimepicker-calendar-header-hour-minute-separator{display:inline-block;width:8px;text-align:center}.cmat-datetimepicker-calendar-header-ampm-container{display:inline-flex;flex-direction:column;line-height:18px;font-size:12px}.cmat-datetimepicker-calendar-content{width:100%;padding:8px;outline:none;box-sizing:border-box;overflow:hidden}.cmat-datetimepicker-calendar-controls{display:flex;justify-content:space-between;margin:0 calc(4.7142857143% - 16px)}.cmat-datetimepicker-calendar-period-button{display:inline-block;height:40px;line-height:40px;outline:none;border:0;background:transparent;box-sizing:border-box}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{pointer-events:none}.cmat-datetimepicker-calendar-previous-button svg,.cmat-datetimepicker-calendar-next-button svg{fill:currentColor;vertical-align:top}[dir=rtl] .cmat-datetimepicker-calendar-previous-button svg,[dir=rtl] .cmat-datetimepicker-calendar-next-button svg{transform:rotate(180deg)}.cmat-datetimepicker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.cmat-datetimepicker-calendar-table-header th{text-align:center;padding:8px 0}\n", ".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: CmatDatetimepickerMonthViewComponent, selector: "cmat-datetimepicker-month-view", inputs: ["type", "dateFilter", "activeDate", "selected"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerMonthView"] }, { kind: "component", type: CmatDatetimepickerYearViewComponent, selector: "cmat-datetimepicker-year-view", inputs: ["type", "dateFilter", "activeDate", "selected"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerYearView"] }, { kind: "component", type: CmatDatetimepickerMultiYearViewComponent, selector: "cmat-datetimepicker-multi-year-view", inputs: ["type", "dateFilter", "activeDate", "selected", "minDate", "maxDate"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerMultiYearView"] }, { kind: "component", type: CmatDatetimepickerTimeComponent, selector: "cmat-datetimepicker-time", inputs: ["dateFilter", "interval", "AMPM", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "clockView"], outputs: ["selectedChange", "activeDateChange", "userSelection", "ampmChange", "clockViewChange"], exportAs: ["cmatDatetimepickerTime"] }, { kind: "component", type: CmatDatetimepickerClockComponent, selector: "cmat-datetimepicker-clock", inputs: ["dateFilter", "interval", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "startView"], outputs: ["userSelection", "selectedChange", "activeDateChange"], exportAs: ["cmatDatetimepickerClock"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1968
1728
  }
1969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerCalendarComponent, decorators: [{
1729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerCalendarComponent, decorators: [{
1970
1730
  type: Component,
1971
1731
  args: [{ selector: 'cmat-datetimepicker-calendar', host: {
1972
1732
  // eslint-disable-next-line @typescript-eslint/naming-convention
1973
1733
  '[class.cmat-datetimepicker-calendar-with-time-input]': 'timeInput',
1974
1734
  }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerCalendar', imports: [MatButtonModule, CmatDatetimepickerMonthViewComponent, CmatDatetimepickerYearViewComponent,
1975
- CmatDatetimepickerMultiYearViewComponent, CmatDatetimepickerTimeComponent, CmatDatetimepickerClockComponent, NgClass], template: "<div class=\"cmat-datetimepicker-calendar-header\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">&#58;</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"AM\"\r\n [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"PM\"\r\n [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium cmat-calendar-slide-animation\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\"\r\n (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\" [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\"\r\n [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\"\r\n (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\"\r\n [selected]=\"activeDate\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\"\r\n (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>", styles: [".cmat-datetimepicker-calendar{display:block;outline:none}.cmat-datetimepicker-calendar-header{box-sizing:border-box;padding:8px;border-radius:4px 4px 0 0;min-width:264px}.cmat-datetimepicker-calendar-header .header-button{color:#fff!important;padding:0 4px;font-size:inherit;white-space:normal;word-break:break-word;font-weight:500;cursor:pointer}.cmat-datetimepicker-calendar-header-year.header-button{font-size:26px;line-height:24px;display:flex}.cmat-datetimepicker-calendar-header-date-time{font-size:24px;line-height:36px;display:flex;flex-direction:row}.cmat-datetimepicker-calendar-header-year:not(.active),.cmat-datetimepicker-calendar-header-date:not(.active),.cmat-datetimepicker-calendar-header-hours:not(.active),.cmat-datetimepicker-calendar-header-minutes:not(.active),.cmat-datetimepicker-calendar-header-ampm:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-year.not-clickable,.cmat-datetimepicker-calendar-header-date.not-clickable,.cmat-datetimepicker-calendar-header-hours.not-clickable,.cmat-datetimepicker-calendar-header-minutes.not-clickable,.cmat-datetimepicker-calendar-header-ampm.not-clickable{cursor:initial}.cmat-datetimepicker-calendar-header-time{display:inline-flex}.cmat-datetimepicker-calendar-header-time:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-hours,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-minutes,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-ampm{opacity:1}.cmat-datetimepicker-calendar-header-hour-minute-separator{display:inline-block;width:8px;text-align:center}.cmat-datetimepicker-calendar-header-ampm-container{display:inline-flex;flex-direction:column;line-height:18px;font-size:12px}.cmat-datetimepicker-calendar-content{width:100%;padding:8px;outline:none;box-sizing:border-box;overflow:hidden}.cmat-datetimepicker-calendar-controls{display:flex;justify-content:space-between;margin:0 calc(4.7142857143% - 16px)}.cmat-datetimepicker-calendar-period-button{display:inline-block;height:40px;line-height:40px;outline:none;border:0;background:transparent;box-sizing:border-box}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{pointer-events:none}.cmat-datetimepicker-calendar-previous-button svg,.cmat-datetimepicker-calendar-next-button svg{fill:currentColor;vertical-align:top}[dir=rtl] .cmat-datetimepicker-calendar-previous-button svg,[dir=rtl] .cmat-datetimepicker-calendar-next-button svg{transform:rotate(180deg)}.cmat-datetimepicker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.cmat-datetimepicker-calendar-table-header th{text-align:center;padding:8px 0}\n", ".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
1735
+ CmatDatetimepickerMultiYearViewComponent, CmatDatetimepickerTimeComponent, CmatDatetimepickerClockComponent, NgClass], template: "<div class=\"cmat-datetimepicker-calendar-header\" [attr.data-refresh]=\"intlVersion()\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">&#58;</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"AM\"\r\n [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"PM\"\r\n [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium cmat-calendar-slide-animation\"\r\n [ngClass]=\"{\r\n 'left': calendarState()==='left',\r\n 'right': calendarState()==='right'\r\n }\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\"\r\n (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\" [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\"\r\n [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\"\r\n (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\"\r\n [selected]=\"activeDate\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\"\r\n (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>\r\n", styles: [".cmat-datetimepicker-calendar{display:block;outline:none}.cmat-datetimepicker-calendar-header{box-sizing:border-box;padding:8px;border-radius:4px 4px 0 0;min-width:264px}.cmat-datetimepicker-calendar-header .header-button{color:#fff!important;padding:0 4px;font-size:inherit;white-space:normal;word-break:break-word;font-weight:500;cursor:pointer}.cmat-datetimepicker-calendar-header-year.header-button{font-size:26px;line-height:24px;display:flex}.cmat-datetimepicker-calendar-header-date-time{font-size:24px;line-height:36px;display:flex;flex-direction:row}.cmat-datetimepicker-calendar-header-year:not(.active),.cmat-datetimepicker-calendar-header-date:not(.active),.cmat-datetimepicker-calendar-header-hours:not(.active),.cmat-datetimepicker-calendar-header-minutes:not(.active),.cmat-datetimepicker-calendar-header-ampm:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-year.not-clickable,.cmat-datetimepicker-calendar-header-date.not-clickable,.cmat-datetimepicker-calendar-header-hours.not-clickable,.cmat-datetimepicker-calendar-header-minutes.not-clickable,.cmat-datetimepicker-calendar-header-ampm.not-clickable{cursor:initial}.cmat-datetimepicker-calendar-header-time{display:inline-flex}.cmat-datetimepicker-calendar-header-time:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-hours,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-minutes,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-ampm{opacity:1}.cmat-datetimepicker-calendar-header-hour-minute-separator{display:inline-block;width:8px;text-align:center}.cmat-datetimepicker-calendar-header-ampm-container{display:inline-flex;flex-direction:column;line-height:18px;font-size:12px}.cmat-datetimepicker-calendar-content{width:100%;padding:8px;outline:none;box-sizing:border-box;overflow:hidden}.cmat-datetimepicker-calendar-controls{display:flex;justify-content:space-between;margin:0 calc(4.7142857143% - 16px)}.cmat-datetimepicker-calendar-period-button{display:inline-block;height:40px;line-height:40px;outline:none;border:0;background:transparent;box-sizing:border-box}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{pointer-events:none}.cmat-datetimepicker-calendar-previous-button svg,.cmat-datetimepicker-calendar-next-button svg{fill:currentColor;vertical-align:top}[dir=rtl] .cmat-datetimepicker-calendar-previous-button svg,[dir=rtl] .cmat-datetimepicker-calendar-next-button svg{transform:rotate(180deg)}.cmat-datetimepicker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.cmat-datetimepicker-calendar-table-header th{text-align:center;padding:8px 0}\n", ".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
1976
1736
  }], ctorParameters: () => [], propDecorators: { userSelection: [{
1977
1737
  type: Output
1978
1738
  }], multiYearSelector: [{
@@ -2020,9 +1780,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
2020
1780
  args: ['keydown', ['$event']]
2021
1781
  }] } });
2022
1782
 
2023
- /** Used to generate a unique ID for each datepicker instance. */
2024
1783
  let datetimepickerUid = 0;
2025
- /** Injection token that determines the scroll handling while the calendar is open. */
2026
1784
  const CMAT_DATETIMEPICKER_SCROLL_STRATEGY = new InjectionToken('cmat-datetimepicker-scroll-strategy');
2027
1785
  // eslint-disable-next-line @typescript-eslint/naming-convention
2028
1786
  function CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY(overlay) {
@@ -2035,16 +1793,14 @@ const CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
2035
1793
  };
2036
1794
  class CmatDatetimepickerContentComponent {
2037
1795
  constructor() {
2038
- /** Emits when an animation has finished. */
1796
+ this.animationState = signal('enter-dropdown', ...(ngDevMode ? [{ debugName: "animationState" }] : /* istanbul ignore next */ []));
2039
1797
  this.animationDone = new Subject();
2040
- /** Id of the label for the `role="dialog"` element. */
2041
1798
  this.dialogLabelId = null;
2042
1799
  this._elementRef = inject(ElementRef);
2043
- this._changeDetectorRef = inject(ChangeDetectorRef);
2044
1800
  this._animationEndListener = null;
2045
1801
  }
2046
1802
  ngOnInit() {
2047
- this.animationState = this.datetimepicker.touchUi ? 'enter-dialog' : 'enter-dropdown';
1803
+ this.animationState.set(this.datetimepicker.touchUi ? 'enter-dialog' : 'enter-dropdown');
2048
1804
  this._animationEndListener = (event) => {
2049
1805
  if (event.animationName === 'panel-dropdown-enter' || event.animationName === 'panel-dialog-enter' || event.animationName === 'panel-leave') {
2050
1806
  this.animationDone.next();
@@ -2056,28 +1812,27 @@ class CmatDatetimepickerContentComponent {
2056
1812
  this._calendar.focusActiveCell();
2057
1813
  }
2058
1814
  startExitAnimation() {
2059
- this.animationState = 'leave';
2060
- this._changeDetectorRef.markForCheck();
1815
+ this.animationState.set('leave');
2061
1816
  }
2062
1817
  ngOnDestroy() {
2063
1818
  this.animationDone.complete();
2064
1819
  this._elementRef.nativeElement.removeEventListener('animationend', this._animationEndListener);
2065
1820
  }
2066
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2067
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CmatDatetimepickerContentComponent, isStandalone: true, selector: "cmat-datetimepicker-content", inputs: { color: "color" }, host: { properties: { "class": "color ? \"mat-\" + color : \"\"", "class.enter-dropdown": "animationState === \"enter-dropdown\"", "class.enter-dialog": "animationState === \"enter-dialog\"", "class.leave": "animationState === \"leave\"", "class.cmat-datetimepicker-content-touch": "datetimepicker?.touchUi", "attr.mode": "datetimepicker.mode" }, classAttribute: "cmat-datetimepicker-content cmat-datetimepicker-transform-panel" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: CmatDatetimepickerCalendarComponent, descendants: true, static: true }], exportAs: ["cmatDatetimepickerContent"], ngImport: i0, template: "<div cdkTrapFocus role=\"dialog\" class=\"cmat-datetimepicker-content-container\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"dialogLabelId ?? undefined\" [attr.mode]=\"datetimepicker.mode\">\r\n <cmat-datetimepicker-calendar [id]=\"datetimepicker.id\"\r\n [ngClass]=\"datetimepicker.panelClass\" [attr.mode]=\"datetimepicker.mode\" [type]=\"datetimepicker.type\"\r\n [startAt]=\"datetimepicker.startAt\" [startView]=\"datetimepicker.startView\" [maxDate]=\"datetimepicker.maxDate\"\r\n [minDate]=\"datetimepicker.minDate\" [dateFilter]=\"datetimepicker.dateFilter\"\r\n [multiYearSelector]=\"datetimepicker.multiYearSelector\"\r\n [preventSameDateTimeSelection]=\"datetimepicker.preventSameDateTimeSelection\"\r\n [timeInterval]=\"datetimepicker.timeInterval\" [twelvehour]=\"datetimepicker.twelvehour\"\r\n [selected]=\"datetimepicker.selected\" [timeInput]=\"datetimepicker.timeInput\"\r\n (selectedChange)=\"datetimepicker.select($event)\" (viewChanged)=\"datetimepicker.viewChange($event)\"\r\n (userSelection)=\"datetimepicker.close()\">\r\n </cmat-datetimepicker-calendar>\r\n</div>", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: CmatDatetimepickerCalendarComponent, selector: "cmat-datetimepicker-calendar", inputs: ["multiYearSelector", "startView", "twelvehour", "timeInterval", "dateFilter", "preventSameDateTimeSelection", "type", "startAt", "timeInput", "selected", "minDate", "maxDate"], outputs: ["userSelection", "selectedChange", "viewChanged"], exportAs: ["cmatDatetimepickerCalendar"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1821
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1822
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatDatetimepickerContentComponent, isStandalone: true, selector: "cmat-datetimepicker-content", inputs: { color: "color" }, host: { properties: { "class": "color ? \"mat-\" + color : \"\"", "class.enter-dropdown": "animationState() === \"enter-dropdown\"", "class.enter-dialog": "animationState() === \"enter-dialog\"", "class.leave": "animationState() === \"leave\"", "class.cmat-datetimepicker-content-touch": "datetimepicker?.touchUi", "attr.mode": "datetimepicker.mode" }, classAttribute: "cmat-datetimepicker-content cmat-datetimepicker-transform-panel" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: CmatDatetimepickerCalendarComponent, descendants: true, static: true }], exportAs: ["cmatDatetimepickerContent"], ngImport: i0, template: "<div cdkTrapFocus role=\"dialog\" class=\"cmat-datetimepicker-content-container\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"dialogLabelId ?? undefined\" [attr.mode]=\"datetimepicker.mode\">\r\n <cmat-datetimepicker-calendar [id]=\"datetimepicker.id\"\r\n [ngClass]=\"datetimepicker.panelClass\" [attr.mode]=\"datetimepicker.mode\" [type]=\"datetimepicker.type\"\r\n [startAt]=\"datetimepicker.startAt\" [startView]=\"datetimepicker.startView\" [maxDate]=\"datetimepicker.maxDate\"\r\n [minDate]=\"datetimepicker.minDate\" [dateFilter]=\"datetimepicker.dateFilter\"\r\n [multiYearSelector]=\"datetimepicker.multiYearSelector\"\r\n [preventSameDateTimeSelection]=\"datetimepicker.preventSameDateTimeSelection\"\r\n [timeInterval]=\"datetimepicker.timeInterval\" [twelvehour]=\"datetimepicker.twelvehour\"\r\n [selected]=\"datetimepicker.selected\" [timeInput]=\"datetimepicker.timeInput\"\r\n (selectedChange)=\"datetimepicker.select($event)\" (viewChanged)=\"datetimepicker.viewChange($event)\"\r\n (userSelection)=\"datetimepicker.close()\">\r\n </cmat-datetimepicker-calendar>\r\n</div>", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: CmatDatetimepickerCalendarComponent, selector: "cmat-datetimepicker-calendar", inputs: ["multiYearSelector", "startView", "twelvehour", "timeInterval", "dateFilter", "preventSameDateTimeSelection", "type", "startAt", "timeInput", "selected", "minDate", "maxDate"], outputs: ["userSelection", "selectedChange", "viewChanged"], exportAs: ["cmatDatetimepickerCalendar"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2068
1823
  }
2069
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerContentComponent, decorators: [{
1824
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerContentComponent, decorators: [{
2070
1825
  type: Component,
2071
1826
  args: [{ selector: 'cmat-datetimepicker-content', host: {
2072
1827
  'class': 'cmat-datetimepicker-content cmat-datetimepicker-transform-panel',
2073
1828
  // eslint-disable-next-line @typescript-eslint/naming-convention
2074
1829
  '[class]': 'color ? "mat-" + color : ""',
2075
1830
  // eslint-disable-next-line @typescript-eslint/naming-convention
2076
- '[class.enter-dropdown]': 'animationState === "enter-dropdown"',
1831
+ '[class.enter-dropdown]': 'animationState() === "enter-dropdown"',
2077
1832
  // eslint-disable-next-line @typescript-eslint/naming-convention
2078
- '[class.enter-dialog]': 'animationState === "enter-dialog"',
1833
+ '[class.enter-dialog]': 'animationState() === "enter-dialog"',
2079
1834
  // eslint-disable-next-line @typescript-eslint/naming-convention
2080
- '[class.leave]': 'animationState === "leave"',
1835
+ '[class.leave]': 'animationState() === "leave"',
2081
1836
  // eslint-disable-next-line @typescript-eslint/naming-convention
2082
1837
  '[class.cmat-datetimepicker-content-touch]': 'datetimepicker?.touchUi',
2083
1838
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -2091,27 +1846,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
2091
1846
  }] } });
2092
1847
  class CmatDatetimepickerComponent {
2093
1848
  constructor() {
2094
- /** The view that the calendar should start in. */
2095
1849
  this.startView = 'month';
2096
1850
  this.mode = 'auto';
2097
1851
  this.timeInterval = 1;
2098
- /** Prevent user to select same date time */
2099
1852
  this.preventSameDateTimeSelection = false;
2100
- /** Preferred position of the datetimepicker in the X axis. */
2101
1853
  this.xPosition = 'start';
2102
- /** Preferred position of the datetimepicker in the Y axis. */
2103
1854
  this.yPosition = 'below';
2104
1855
  this.selectedChanged = new EventEmitter();
2105
- /** Emits when the datepicker has been opened. */
2106
1856
  this.openedStream = new EventEmitter();
2107
- /** Emits when the datepicker has been closed. */
2108
1857
  this.closedStream = new EventEmitter();
2109
- /** Emits when the view has been changed. **/
2110
1858
  this.viewChanged = new EventEmitter();
2111
- /** Whether the calendar is open. */
2112
- /** The id for the datepicker calendar. */
2113
1859
  this.id = `cmat-datetimepicker-${datetimepickerUid++}`;
2114
- /** Emits when the datepicker is disabled. */
2115
1860
  this.disabledChange = new Subject();
2116
1861
  this._overlay = inject(Overlay);
2117
1862
  this._injector = inject(Injector);
@@ -2121,9 +1866,7 @@ class CmatDatetimepickerComponent {
2121
1866
  this._dir = inject(Directionality, { optional: true });
2122
1867
  this._document = inject(DOCUMENT, { optional: true });
2123
1868
  this._validSelected = null;
2124
- /** The element that was focused before the datetimepicker was opened. */
2125
1869
  this._focusedElementBeforeOpen = null;
2126
- /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
2127
1870
  this._backdropHarnessClass = `${this.id}-backdrop`;
2128
1871
  this._inputStateChanges = Subscription.EMPTY;
2129
1872
  this._multiYearSelector = false;
@@ -2137,14 +1880,12 @@ class CmatDatetimepickerComponent {
2137
1880
  throw createMissingDateImplError('DatetimeAdapter');
2138
1881
  }
2139
1882
  }
2140
- /** Whether to show multi-year view. */
2141
1883
  get multiYearSelector() {
2142
1884
  return this._multiYearSelector;
2143
1885
  }
2144
1886
  set multiYearSelector(value) {
2145
1887
  this._multiYearSelector = coerceBooleanProperty(value);
2146
1888
  }
2147
- /** Whether the clock uses 12 hour format. */
2148
1889
  // eslint-disable-next-line @typescript-eslint/member-ordering
2149
1890
  get twelvehour() {
2150
1891
  return this._twelvehour;
@@ -2152,10 +1893,6 @@ class CmatDatetimepickerComponent {
2152
1893
  set twelvehour(value) {
2153
1894
  this._twelvehour = coerceBooleanProperty(value);
2154
1895
  }
2155
- /**
2156
- * Classes to be passed to the date picker panel.
2157
- * Supports string and string array values, similar to `ngClass`.
2158
- */
2159
1896
  // eslint-disable-next-line @typescript-eslint/member-ordering
2160
1897
  get panelClass() {
2161
1898
  return this._panelClass;
@@ -2163,7 +1900,6 @@ class CmatDatetimepickerComponent {
2163
1900
  set panelClass(value) {
2164
1901
  this._panelClass = coerceStringArray(value);
2165
1902
  }
2166
- /** Whether the calendar is open. */
2167
1903
  // eslint-disable-next-line @typescript-eslint/member-ordering
2168
1904
  get opened() {
2169
1905
  return this._opened;
@@ -2171,7 +1907,6 @@ class CmatDatetimepickerComponent {
2171
1907
  set opened(value) {
2172
1908
  coerceBooleanProperty(value) ? this.open() : this.close();
2173
1909
  }
2174
- /** Color palette to use on the datetimepicker's calendar. */
2175
1910
  // eslint-disable-next-line @typescript-eslint/member-ordering
2176
1911
  get color() {
2177
1912
  return (this._color ??
@@ -2180,11 +1915,8 @@ class CmatDatetimepickerComponent {
2180
1915
  set color(value) {
2181
1916
  this._color = value;
2182
1917
  }
2183
- /** The date to open the calendar to initially. */
2184
1918
  // eslint-disable-next-line @typescript-eslint/member-ordering
2185
1919
  get startAt() {
2186
- // If an explicit startAt is set we start there, otherwise we start at whatever the currently
2187
- // selected value is.
2188
1920
  return this._startAt ?? (this.datetimepickerInput ? this.datetimepickerInput.value : null);
2189
1921
  }
2190
1922
  set startAt(date) {
@@ -2197,10 +1929,6 @@ class CmatDatetimepickerComponent {
2197
1929
  set type(value) {
2198
1930
  this._type = value || 'datetime';
2199
1931
  }
2200
- /**
2201
- * Whether the calendar is in time mode. In time mode the calendar clock gets time input
2202
- * elements rather then just clock. When `touchUi` is enabled this will be disabled.
2203
- */
2204
1932
  // eslint-disable-next-line @typescript-eslint/member-ordering
2205
1933
  get timeInput() {
2206
1934
  return this._timeInput && !this.touchUi;
@@ -2208,10 +1936,6 @@ class CmatDatetimepickerComponent {
2208
1936
  set timeInput(value) {
2209
1937
  this._timeInput = coerceBooleanProperty(value);
2210
1938
  }
2211
- /**
2212
- * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather
2213
- * than a popup and elements have more padding to allow for bigger touch targets.
2214
- */
2215
1939
  // eslint-disable-next-line @typescript-eslint/member-ordering
2216
1940
  get touchUi() {
2217
1941
  return this._touchUi;
@@ -2219,7 +1943,6 @@ class CmatDatetimepickerComponent {
2219
1943
  set touchUi(value) {
2220
1944
  this._touchUi = coerceBooleanProperty(value);
2221
1945
  }
2222
- /** Whether the datepicker pop-up should be disabled. */
2223
1946
  // eslint-disable-next-line @typescript-eslint/member-ordering
2224
1947
  get disabled() {
2225
1948
  return this._disabled === undefined && this.datetimepickerInput ?
@@ -2232,11 +1955,6 @@ class CmatDatetimepickerComponent {
2232
1955
  this.disabledChange.next(newValue);
2233
1956
  }
2234
1957
  }
2235
- /**
2236
- * Whether to restore focus to the previously-focused element when the panel is closed.
2237
- * Note that automatic focus restoration is an accessibility feature and it is recommended that
2238
- * you provide your own equivalent, if you decide to turn it off.
2239
- */
2240
1958
  // eslint-disable-next-line @typescript-eslint/member-ordering
2241
1959
  get restoreFocus() {
2242
1960
  return this._restoreFocus;
@@ -2244,7 +1962,6 @@ class CmatDatetimepickerComponent {
2244
1962
  set restoreFocus(value) {
2245
1963
  this._restoreFocus = coerceBooleanProperty(value);
2246
1964
  }
2247
- /** The currently selected date. */
2248
1965
  // eslint-disable-next-line @typescript-eslint/member-ordering
2249
1966
  get selected() {
2250
1967
  return this._validSelected;
@@ -2252,12 +1969,10 @@ class CmatDatetimepickerComponent {
2252
1969
  set selected(value) {
2253
1970
  this._validSelected = value;
2254
1971
  }
2255
- /** The minimum selectable date. */
2256
1972
  // eslint-disable-next-line @typescript-eslint/member-ordering
2257
1973
  get minDate() {
2258
1974
  return this.datetimepickerInput?.min;
2259
1975
  }
2260
- /** The maximum selectable date. */
2261
1976
  // eslint-disable-next-line @typescript-eslint/member-ordering
2262
1977
  get maxDate() {
2263
1978
  return this.datetimepickerInput?.max;
@@ -2272,11 +1987,6 @@ class CmatDatetimepickerComponent {
2272
1987
  this._inputStateChanges.unsubscribe();
2273
1988
  this.disabledChange.complete();
2274
1989
  }
2275
- /**
2276
- * Register an input with this datepicker.
2277
- *
2278
- * @param input The datepicker input to register with this datepicker.
2279
- */
2280
1990
  registerInput(input) {
2281
1991
  if (this.datetimepickerInput) {
2282
1992
  throw Error('A MatDatepicker can only be associated with a single input.');
@@ -2285,7 +1995,6 @@ class CmatDatetimepickerComponent {
2285
1995
  this._inputStateChanges =
2286
1996
  this.datetimepickerInput.valueChange.subscribe((value) => this.selected = value);
2287
1997
  }
2288
- /** Open the calendar. */
2289
1998
  open() {
2290
1999
  if (this.opened || this.disabled) {
2291
2000
  return;
@@ -2298,7 +2007,6 @@ class CmatDatetimepickerComponent {
2298
2007
  this._opened = true;
2299
2008
  this.openedStream.emit();
2300
2009
  }
2301
- /** Close the calendar. */
2302
2010
  close() {
2303
2011
  if (!this._opened) {
2304
2012
  return;
@@ -2307,8 +2015,6 @@ class CmatDatetimepickerComponent {
2307
2015
  this._focusedElementBeforeOpen &&
2308
2016
  typeof this._focusedElementBeforeOpen.focus === 'function';
2309
2017
  const completeClose = () => {
2310
- // The `_opened` could've been reset already if
2311
- // we got two events in quick succession.
2312
2018
  if (this._opened) {
2313
2019
  this._opened = false;
2314
2020
  this.closedStream.emit();
@@ -2319,8 +2025,6 @@ class CmatDatetimepickerComponent {
2319
2025
  instance.startExitAnimation();
2320
2026
  instance.animationDone.pipe(take(1)).subscribe(() => {
2321
2027
  const activeElement = this._document.activeElement;
2322
- // Since we restore focus after the exit animation, we have to check that
2323
- // the user didn't move focus themselves inside the `close` handler.
2324
2028
  if (canRestoreFocus &&
2325
2029
  (!activeElement ||
2326
2030
  activeElement === this._document.activeElement ||
@@ -2332,18 +2036,12 @@ class CmatDatetimepickerComponent {
2332
2036
  });
2333
2037
  }
2334
2038
  if (canRestoreFocus) {
2335
- // Because IE moves focus asynchronously, we can't count on it being restored before we've
2336
- // marked the datepicker as closed. If the event fires out of sequence and the element that
2337
- // we're refocusing opens the datepicker on focus, the user could be stuck with not being
2338
- // able to close the calendar at all. We work around it by making the logic, that marks
2339
- // the datepicker as closed, async as well.
2340
2039
  setTimeout(completeClose);
2341
2040
  }
2342
2041
  else {
2343
2042
  completeClose();
2344
2043
  }
2345
2044
  }
2346
- /** Selects the given date */
2347
2045
  select(date) {
2348
2046
  const oldValue = this.selected;
2349
2047
  this.selected = date;
@@ -2354,16 +2052,11 @@ class CmatDatetimepickerComponent {
2354
2052
  viewChange(type) {
2355
2053
  this.viewChanged.emit(type);
2356
2054
  }
2357
- /**
2358
- * relevant values from the datetimepicker to the
2359
- * datetimepicker content inside the overlay.
2360
- */
2361
2055
  _forwardContentValues(instance) {
2362
2056
  instance.datetimepicker = this;
2363
2057
  instance.color = this.color;
2364
2058
  instance.dialogLabelId = this.datetimepickerInput.getOverlayLabelId();
2365
2059
  }
2366
- /** Opens the overlay with the calendar. */
2367
2060
  _openOverlay() {
2368
2061
  this._destroyOverlay();
2369
2062
  const isDialog = this.touchUi;
@@ -2396,25 +2089,21 @@ class CmatDatetimepickerComponent {
2396
2089
  });
2397
2090
  this._componentRef = overlayRef.attach(portal);
2398
2091
  this._forwardContentValues(this._componentRef.instance);
2399
- // Update the position once the calendar has rendered. Only relevant in dropdown mode.
2400
2092
  if (!isDialog) {
2401
2093
  afterNextRender(() => {
2402
2094
  overlayRef.updatePosition();
2403
2095
  }, { injector: this._injector });
2404
2096
  }
2405
2097
  }
2406
- /** Destroys the current overlay. */
2407
2098
  _destroyOverlay() {
2408
2099
  if (this._overlayRef) {
2409
2100
  this._overlayRef.dispose();
2410
2101
  this._overlayRef = this._componentRef = null;
2411
2102
  }
2412
2103
  }
2413
- /** Gets a position strategy that will open the calendar as a dropdown. */
2414
2104
  _getDialogStrategy() {
2415
2105
  return this._overlay.position().global().centerHorizontally().centerVertically();
2416
2106
  }
2417
- /** Gets a position strategy that will open the calendar as a dropdown. */
2418
2107
  _getDropdownStrategy() {
2419
2108
  const strategy = this._overlay
2420
2109
  .position()
@@ -2425,9 +2114,6 @@ class CmatDatetimepickerComponent {
2425
2114
  .withLockedPosition();
2426
2115
  return this._setConnectedPositions(strategy);
2427
2116
  }
2428
- /**
2429
- * Sets the positions of the datetimepicker in dropdown mode based on the current configuration.
2430
- */
2431
2117
  _setConnectedPositions(strategy) {
2432
2118
  const primaryX = this.xPosition === 'end' ? 'end' : 'start';
2433
2119
  const secondaryX = primaryX === 'start' ? 'end' : 'start';
@@ -2460,19 +2146,16 @@ class CmatDatetimepickerComponent {
2460
2146
  },
2461
2147
  ]);
2462
2148
  }
2463
- /** Gets an observable that will emit when the overlay is supposed to be closed. */
2464
2149
  _getCloseStream(overlayRef) {
2465
- return merge(overlayRef.backdropClick(), overlayRef.detachments(), overlayRef.keydownEvents().pipe(filter(event =>
2466
- // Closing on alt + up is only valid when there's an input associated with the datetimepicker.
2467
- ((event.code === 'Escape' && !hasModifierKey(event)) ||
2150
+ return merge(overlayRef.backdropClick(), overlayRef.detachments(), overlayRef.keydownEvents().pipe(filter(event => ((event.code === 'Escape' && !hasModifierKey(event)) ||
2468
2151
  (this.datetimepickerInput &&
2469
2152
  hasModifierKey(event, 'altKey') &&
2470
2153
  event.code === 'ArrowUp')))));
2471
2154
  }
2472
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2473
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CmatDatetimepickerComponent, isStandalone: true, selector: "cmat-datetimepicker", inputs: { startView: "startView", mode: "mode", timeInterval: "timeInterval", preventSameDateTimeSelection: "preventSameDateTimeSelection", xPosition: "xPosition", yPosition: "yPosition", multiYearSelector: "multiYearSelector", twelvehour: "twelvehour", panelClass: "panelClass", opened: "opened", color: "color", startAt: "startAt", type: "type", timeInput: "timeInput", touchUi: "touchUi", disabled: "disabled", restoreFocus: "restoreFocus" }, outputs: { selectedChanged: "selectedChanged", openedStream: "openedStream", closedStream: "closedStream", viewChanged: "viewChanged" }, exportAs: ["cmatDatetimepicker"], ngImport: i0, template: '', isInline: true, styles: [".cmat-datetimepicker-calendar-header,.cmat-datetimepicker-calendar-body-cell-content.cmat-datetimepicker-calendar-body-selected{color:#fff!important}.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected).cmat-datetimepicker-calendar-body-today{border-color:var(--cmat-text-hint)}.cmat-datetimepicker-calendar-body-cell:not(.cmat-datetimepicker-calendar-body-disabled):hover>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected),.cmat-datetimepicker-calendar-body-active>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){background-color:rgba(var(--cmat-primary-rgb),.3)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){color:var(--cmat-text-disabled)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-today:not(.cmat-datetimepicker-calendar-body-selected){border-color:rgba(var(--cmat-text-disabled),.8)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-selected{background-color:rgba(var(--cmat-primary-rgb),.4)}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-clock-wrapper{background-color:var(--cmat-divider)}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-selected{color:#fff!important}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input{background-color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active{background-color:rgba(var(--cmat-primary-rgb),.2)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus{border-color:var(--cmat-primary);background-color:var(--cmat-divider)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus::placeholder{color:rgba(var(--cmat-primary-rgb),.6)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-warning{border-color:var(--cmat-warn)}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{color:var(--cmat-text-hint);border-color:var(--cmat-text-hint)}.cmat-datetimepicker-time-am.mat-mdc-button.cmat-datetimepicker-time-ampm-active,.cmat-datetimepicker-time-pm.mat-mdc-button.cmat-datetimepicker-time-ampm-active{background-color:rgba(var(--cmat-accent-rgb),.2)}.cmat-datetimepicker-content{display:block;border-radius:4px;overflow:hidden}.cmat-datetimepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.cmat-datetimepicker-content .cmat-calendar{width:296px;height:424px}.cmat-datetimepicker-content .cmat-calendar.cmat-datetimepicker-calendar-with-time-input{height:490px}.cmat-datetimepicker-content-touch{display:block;position:relative;overflow:visible}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container{min-height:300px;max-height:850px;min-width:250px;max-width:750px}.cmat-datetimepicker-content-touch .cmat-datetimepicker-calendar{width:100%;height:auto}@media all and (orientation:landscape){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:120vh;height:100%;min-height:80vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:64vh;height:90vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}}@media all and (orientation:portrait){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:80vw;height:120vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:90vw;height:64vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container-with-actions{height:135vw}}.cmat-datetimepicker-transform-panel.enter-dropdown{animation:panel-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.enter-dialog{animation:panel-dialog-enter .15s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.leave{animation:panel-leave .1s linear}@keyframes panel-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scale(1)}}@keyframes panel-dialog-enter{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}@keyframes panel-leave{0%{opacity:1}to{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2155
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2156
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatDatetimepickerComponent, isStandalone: true, selector: "cmat-datetimepicker", inputs: { startView: "startView", mode: "mode", timeInterval: "timeInterval", preventSameDateTimeSelection: "preventSameDateTimeSelection", xPosition: "xPosition", yPosition: "yPosition", multiYearSelector: "multiYearSelector", twelvehour: "twelvehour", panelClass: "panelClass", opened: "opened", color: "color", startAt: "startAt", type: "type", timeInput: "timeInput", touchUi: "touchUi", disabled: "disabled", restoreFocus: "restoreFocus" }, outputs: { selectedChanged: "selectedChanged", openedStream: "openedStream", closedStream: "closedStream", viewChanged: "viewChanged" }, exportAs: ["cmatDatetimepicker"], ngImport: i0, template: '', isInline: true, styles: [".cmat-datetimepicker-calendar-header,.cmat-datetimepicker-calendar-body-cell-content.cmat-datetimepicker-calendar-body-selected{color:#fff!important}.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected).cmat-datetimepicker-calendar-body-today{border-color:var(--cmat-text-hint)}.cmat-datetimepicker-calendar-body-cell:not(.cmat-datetimepicker-calendar-body-disabled):hover>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected),.cmat-datetimepicker-calendar-body-active>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){background-color:rgba(var(--cmat-primary-rgb),.3)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){color:var(--cmat-text-disabled)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-today:not(.cmat-datetimepicker-calendar-body-selected){border-color:rgba(var(--cmat-text-disabled),.8)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-selected{background-color:rgba(var(--cmat-primary-rgb),.4)}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-clock-wrapper{background-color:var(--cmat-divider)}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-selected{color:#fff!important}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input{background-color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active{background-color:rgba(var(--cmat-primary-rgb),.2)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus{border-color:var(--cmat-primary);background-color:var(--cmat-divider)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus::placeholder{color:rgba(var(--cmat-primary-rgb),.6)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-warning{border-color:var(--cmat-warn)}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{color:var(--cmat-text-hint);border-color:var(--cmat-text-hint)}.cmat-datetimepicker-time-am.mat-mdc-button.cmat-datetimepicker-time-ampm-active,.cmat-datetimepicker-time-pm.mat-mdc-button.cmat-datetimepicker-time-ampm-active{background-color:rgba(var(--cmat-accent-rgb),.2)}.cmat-datetimepicker-content{display:block;border-radius:4px;overflow:hidden}.cmat-datetimepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.cmat-datetimepicker-content .cmat-calendar{width:296px;height:424px}.cmat-datetimepicker-content .cmat-calendar.cmat-datetimepicker-calendar-with-time-input{height:490px}.cmat-datetimepicker-content-touch{display:block;position:relative;overflow:visible}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container{min-height:300px;max-height:850px;min-width:250px;max-width:750px}.cmat-datetimepicker-content-touch .cmat-datetimepicker-calendar{width:100%;height:auto}@media all and (orientation:landscape){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:120vh;height:100%;min-height:80vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:64vh;height:90vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}}@media all and (orientation:portrait){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:80vw;height:120vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:90vw;height:64vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container-with-actions{height:135vw}}.cmat-datetimepicker-transform-panel.enter-dropdown{animation:panel-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.enter-dialog{animation:panel-dialog-enter .15s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.leave{animation:panel-leave .1s linear}@keyframes panel-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scale(1)}}@keyframes panel-dialog-enter{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}@keyframes panel-leave{0%{opacity:1}to{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2474
2157
  }
2475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerComponent, decorators: [{
2158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerComponent, decorators: [{
2476
2159
  type: Component,
2477
2160
  args: [{ selector: 'cmat-datetimepicker', exportAs: 'cmatDatetimepicker', template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, styles: [".cmat-datetimepicker-calendar-header,.cmat-datetimepicker-calendar-body-cell-content.cmat-datetimepicker-calendar-body-selected{color:#fff!important}.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected).cmat-datetimepicker-calendar-body-today{border-color:var(--cmat-text-hint)}.cmat-datetimepicker-calendar-body-cell:not(.cmat-datetimepicker-calendar-body-disabled):hover>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected),.cmat-datetimepicker-calendar-body-active>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){background-color:rgba(var(--cmat-primary-rgb),.3)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){color:var(--cmat-text-disabled)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-today:not(.cmat-datetimepicker-calendar-body-selected){border-color:rgba(var(--cmat-text-disabled),.8)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-selected{background-color:rgba(var(--cmat-primary-rgb),.4)}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-clock-wrapper{background-color:var(--cmat-divider)}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-selected{color:#fff!important}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input{background-color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active{background-color:rgba(var(--cmat-primary-rgb),.2)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus{border-color:var(--cmat-primary);background-color:var(--cmat-divider)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus::placeholder{color:rgba(var(--cmat-primary-rgb),.6)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-warning{border-color:var(--cmat-warn)}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{color:var(--cmat-text-hint);border-color:var(--cmat-text-hint)}.cmat-datetimepicker-time-am.mat-mdc-button.cmat-datetimepicker-time-ampm-active,.cmat-datetimepicker-time-pm.mat-mdc-button.cmat-datetimepicker-time-ampm-active{background-color:rgba(var(--cmat-accent-rgb),.2)}.cmat-datetimepicker-content{display:block;border-radius:4px;overflow:hidden}.cmat-datetimepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.cmat-datetimepicker-content .cmat-calendar{width:296px;height:424px}.cmat-datetimepicker-content .cmat-calendar.cmat-datetimepicker-calendar-with-time-input{height:490px}.cmat-datetimepicker-content-touch{display:block;position:relative;overflow:visible}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container{min-height:300px;max-height:850px;min-width:250px;max-width:750px}.cmat-datetimepicker-content-touch .cmat-datetimepicker-calendar{width:100%;height:auto}@media all and (orientation:landscape){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:120vh;height:100%;min-height:80vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:64vh;height:90vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}}@media all and (orientation:portrait){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:80vw;height:120vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:90vw;height:64vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container-with-actions{height:135vw}}.cmat-datetimepicker-transform-panel.enter-dropdown{animation:panel-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.enter-dialog{animation:panel-dialog-enter .15s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.leave{animation:panel-leave .1s linear}@keyframes panel-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scale(1)}}@keyframes panel-dialog-enter{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}@keyframes panel-leave{0%{opacity:1}to{opacity:0}}\n"] }]
2478
2161
  }], ctorParameters: () => [], propDecorators: { startView: [{
@@ -2530,11 +2213,6 @@ const CMAT_DATETIMEPICKER_VALIDATORS = {
2530
2213
  useExisting: forwardRef(() => CmatDatetimepickerInputDirective),
2531
2214
  multi: true
2532
2215
  };
2533
- /**
2534
- * An event used for datepicker input and change events. We don't always have access to a native
2535
- * input or change event because the event may have been triggered by the user clicking on the
2536
- * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
2537
- */
2538
2216
  class CmatDatetimepickerInputEvent {
2539
2217
  constructor(target, targetElement) {
2540
2218
  this.target = target;
@@ -2542,16 +2220,11 @@ class CmatDatetimepickerInputEvent {
2542
2220
  this.value = this.target.value;
2543
2221
  }
2544
2222
  }
2545
- /** Directive used to connect an input to a MatDatepicker. */
2546
2223
  class CmatDatetimepickerInputDirective {
2547
2224
  constructor() {
2548
- /** Emits when a `change` event is fired on this `<input>`. */
2549
2225
  this.dateChange = new EventEmitter();
2550
- /** Emits when an `input` event is fired on this `<input>`. */
2551
2226
  this.dateInput = new EventEmitter();
2552
- /** Emits when the value changes (either due to user input or programmatic change). */
2553
2227
  this.valueChange = new EventEmitter();
2554
- /** Emits when the disabled state has changed */
2555
2228
  this.disabledChange = new EventEmitter();
2556
2229
  this._elementRef = inject(ElementRef);
2557
2230
  this._dateAdapter = inject(DatetimeAdapter, { optional: true });
@@ -2559,7 +2232,6 @@ class CmatDatetimepickerInputDirective {
2559
2232
  this._formField = inject(MatFormField, { optional: true });
2560
2233
  this._datepickerSubscription = Subscription.EMPTY;
2561
2234
  this._localeSubscription = Subscription.EMPTY;
2562
- /** Whether the last value set on the input was valid. */
2563
2235
  this._lastValueValid = false;
2564
2236
  // eslint-disable-next-line @typescript-eslint/no-empty-function
2565
2237
  this._onTouched = () => { };
@@ -2567,30 +2239,25 @@ class CmatDatetimepickerInputDirective {
2567
2239
  this._cvaOnChange = () => { };
2568
2240
  // eslint-disable-next-line @typescript-eslint/no-empty-function
2569
2241
  this._validatorOnChange = () => { };
2570
- /** The form control validator for whether the input parses. */
2571
2242
  this._parseValidator = () => this._lastValueValid ?
2572
2243
  null : { 'matDatepickerParse': { 'text': this._elementRef.nativeElement.value } };
2573
- /** The form control validator for the min date. */
2574
2244
  this._minValidator = (control) => {
2575
2245
  const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
2576
2246
  return (!this.min || !controlValue ||
2577
2247
  this._dateAdapter.compareDatetime(this.min, controlValue) <= 0) ?
2578
2248
  null : { 'matDatepickerMin': { 'min': this.min, 'actual': controlValue } };
2579
2249
  };
2580
- /** The form control validator for the max date. */
2581
2250
  this._maxValidator = (control) => {
2582
2251
  const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
2583
2252
  return (!this.max || !controlValue ||
2584
2253
  this._dateAdapter.compareDatetime(this.max, controlValue) >= 0) ?
2585
2254
  null : { 'matDatepickerMax': { 'max': this.max, 'actual': controlValue } };
2586
2255
  };
2587
- /** The form control validator for the date filter. */
2588
2256
  this._filterValidator = (control) => {
2589
2257
  const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
2590
2258
  return !this.dateFilter || !controlValue || this.dateFilter(controlValue, CmatDatetimepickerFilterType.DATE) ?
2591
2259
  null : { 'matDatepickerFilter': true };
2592
2260
  };
2593
- /** The combined form control validator for this input. */
2594
2261
  // eslint-disable-next-line @typescript-eslint/member-ordering
2595
2262
  this._validator = Validators.compose([this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator]);
2596
2263
  const _dateAdapter = this._dateAdapter;
@@ -2600,10 +2267,8 @@ class CmatDatetimepickerInputDirective {
2600
2267
  if (!this._dateFormats) {
2601
2268
  throw createMissingDateImplError('CMAT_DATETIME_FORMATS');
2602
2269
  }
2603
- // Update the displayed date when the locale changes.
2604
2270
  this._localeSubscription = _dateAdapter.localeChanges.subscribe();
2605
2271
  }
2606
- /** The datepicker that this input is associated with. */
2607
2272
  set cmatDatetimepicker(value) {
2608
2273
  this._registerDatetimepicker(value);
2609
2274
  }
@@ -2611,7 +2276,6 @@ class CmatDatetimepickerInputDirective {
2611
2276
  this.dateFilter = filter;
2612
2277
  this._validatorOnChange();
2613
2278
  }
2614
- /** The value of the input. */
2615
2279
  // eslint-disable-next-line @typescript-eslint/member-ordering
2616
2280
  get value() {
2617
2281
  return this._value;
@@ -2623,14 +2287,12 @@ class CmatDatetimepickerInputDirective {
2623
2287
  const oldDate = this.value;
2624
2288
  this._value = value;
2625
2289
  this._formatValue(value);
2626
- // use timeout to ensure the datetimepicker is instantiated and we get the correct format
2627
2290
  setTimeout(() => {
2628
2291
  if (!this._dateAdapter.sameDatetime(oldDate, value)) {
2629
2292
  this.valueChange.emit(value);
2630
2293
  }
2631
2294
  });
2632
2295
  }
2633
- /** The minimum valid date. */
2634
2296
  // eslint-disable-next-line @typescript-eslint/member-ordering
2635
2297
  get min() {
2636
2298
  return this._min;
@@ -2639,7 +2301,6 @@ class CmatDatetimepickerInputDirective {
2639
2301
  this._min = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2640
2302
  this._validatorOnChange();
2641
2303
  }
2642
- /** The maximum valid date. */
2643
2304
  // eslint-disable-next-line @typescript-eslint/member-ordering
2644
2305
  get max() {
2645
2306
  return this._max;
@@ -2648,7 +2309,6 @@ class CmatDatetimepickerInputDirective {
2648
2309
  this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2649
2310
  this._validatorOnChange();
2650
2311
  }
2651
- /** Whether the datepicker-input is disabled. */
2652
2312
  // eslint-disable-next-line @typescript-eslint/member-ordering
2653
2313
  get disabled() {
2654
2314
  return !!this._disabled;
@@ -2683,34 +2343,24 @@ class CmatDatetimepickerInputDirective {
2683
2343
  validate(c) {
2684
2344
  return this._validator ? this._validator(c) : null;
2685
2345
  }
2686
- /**
2687
- * Gets the element that the datepicker popup should be connected to.
2688
- *
2689
- * @return The element to connect the popup to.
2690
- */
2691
2346
  getConnectedOverlayOrigin() {
2692
2347
  return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;
2693
2348
  }
2694
- /** Gets the ID of an element that should be used a description for the calendar overlay. */
2695
2349
  getOverlayLabelId() {
2696
2350
  if (this._formField) {
2697
2351
  return this._formField.getLabelId();
2698
2352
  }
2699
2353
  return this._elementRef.nativeElement.getAttribute('aria-labelledby');
2700
2354
  }
2701
- // Implemented as part of ControlValueAccessor
2702
2355
  writeValue(value) {
2703
2356
  this.value = value;
2704
2357
  }
2705
- // Implemented as part of ControlValueAccessor
2706
2358
  registerOnChange(fn) {
2707
2359
  this._cvaOnChange = fn;
2708
2360
  }
2709
- // Implemented as part of ControlValueAccessor
2710
2361
  registerOnTouched(fn) {
2711
2362
  this._onTouched = fn;
2712
2363
  }
2713
- // Implemented as part of ControlValueAccessor
2714
2364
  setDisabledState(disabled) {
2715
2365
  this.disabled = disabled;
2716
2366
  }
@@ -2732,15 +2382,12 @@ class CmatDatetimepickerInputDirective {
2732
2382
  onChange() {
2733
2383
  this.dateChange.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));
2734
2384
  }
2735
- /** Handles blur events on the input. */
2736
2385
  onBlur() {
2737
- // Reformat the input only if we have a valid value.
2738
2386
  if (this.value) {
2739
2387
  this._formatValue(this.value);
2740
2388
  }
2741
2389
  this._onTouched();
2742
2390
  }
2743
- /** Returns the palette used by the input's form field, if any. */
2744
2391
  getThemePalette() {
2745
2392
  return this._formField ? this._formField.color : undefined;
2746
2393
  }
@@ -2786,19 +2433,18 @@ class CmatDatetimepickerInputDirective {
2786
2433
  parseFormat ??= this._dateFormats.parse.dateInput;
2787
2434
  return parseFormat;
2788
2435
  }
2789
- /** Formats a value and sets it on the input element. */
2790
2436
  _formatValue(value) {
2791
2437
  this._elementRef.nativeElement.value =
2792
2438
  value ? this._dateAdapter.format(value, this._getDisplayFormat()) : '';
2793
2439
  }
2794
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2795
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: CmatDatetimepickerInputDirective, isStandalone: true, selector: "input[cmatDatetimepicker]", inputs: { cmatDatetimepicker: "cmatDatetimepicker", cmatDatepickerFilter: "cmatDatepickerFilter", value: "value", min: "min", max: "max", disabled: "disabled" }, outputs: { dateChange: "dateChange", dateInput: "dateInput" }, host: { listeners: { "input": "onInput($event.target.value)", "change": "onChange()", "blur": "onBlur()", "keydown": "onKeydown($event)" }, properties: { "attr.aria-haspopup": "true", "attr.aria-owns": "(datetimepicker?.opened && datetimepicker.id) || null", "attr.min": "min ? datetimepicker.toIso8601(min) : null", "attr.max": "max ? datetimepicker.toIso8601(max) : null", "disabled": "disabled" } }, providers: [
2440
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2441
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: CmatDatetimepickerInputDirective, isStandalone: true, selector: "input[cmatDatetimepicker]", inputs: { cmatDatetimepicker: "cmatDatetimepicker", cmatDatepickerFilter: "cmatDatepickerFilter", value: "value", min: "min", max: "max", disabled: "disabled" }, outputs: { dateChange: "dateChange", dateInput: "dateInput" }, host: { listeners: { "input": "onInput($event.target.value)", "change": "onChange()", "blur": "onBlur()", "keydown": "onKeydown($event)" }, properties: { "attr.aria-haspopup": "true", "attr.aria-owns": "(datetimepicker?.opened && datetimepicker.id) || null", "attr.min": "min ? datetimepicker.toIso8601(min) : null", "attr.max": "max ? datetimepicker.toIso8601(max) : null", "disabled": "disabled" } }, providers: [
2796
2442
  CMAT_DATETIMEPICKER_VALUE_ACCESSOR,
2797
2443
  CMAT_DATETIMEPICKER_VALIDATORS,
2798
2444
  { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: CmatDatetimepickerInputDirective },
2799
2445
  ], exportAs: ["cmatDatepickerInput"], ngImport: i0 }); }
2800
2446
  }
2801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerInputDirective, decorators: [{
2447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerInputDirective, decorators: [{
2802
2448
  type: Directive,
2803
2449
  args: [{
2804
2450
  selector: 'input[cmatDatetimepicker]',
@@ -2838,12 +2484,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
2838
2484
  type: Input
2839
2485
  }] } });
2840
2486
 
2841
- /** Can be used to override the icon of a `cmatDatetimepickerToggle`. */
2842
2487
  class CmatDatetimepickerToggleIconDirective {
2843
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2844
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: CmatDatetimepickerToggleIconDirective, isStandalone: true, selector: "[cmatDatetimepickerToggleIcon]", ngImport: i0 }); }
2488
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2489
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: CmatDatetimepickerToggleIconDirective, isStandalone: true, selector: "[cmatDatetimepickerToggleIcon]", ngImport: i0 }); }
2845
2490
  }
2846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, decorators: [{
2491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, decorators: [{
2847
2492
  type: Directive,
2848
2493
  args: [{
2849
2494
  selector: '[cmatDatetimepickerToggleIcon]'
@@ -2852,11 +2497,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
2852
2497
  class CmatDatetimepickerToggleComponent {
2853
2498
  constructor() {
2854
2499
  this.class = 'cmat-datetimepicker-toggle';
2500
+ this.refreshVersion = signal(0, ...(ngDevMode ? [{ debugName: "refreshVersion" }] : /* istanbul ignore next */ []));
2855
2501
  this.intl = inject(CmatDatetimepickerIntl);
2856
2502
  this._stateChanges = Subscription.EMPTY;
2857
- this._changeDetectorRef = inject(ChangeDetectorRef);
2858
2503
  }
2859
- /** Whether the toggle button is disabled. */
2860
2504
  get disabled() {
2861
2505
  return this._disabled === undefined ? this.datetimepicker.disabled : !!this._disabled;
2862
2506
  }
@@ -2886,14 +2530,14 @@ class CmatDatetimepickerToggleComponent {
2886
2530
  this.datetimepicker.datetimepickerInput.disabledChange : of();
2887
2531
  this._stateChanges.unsubscribe();
2888
2532
  this._stateChanges = merge([this.intl.changes, datepickerDisabled, inputDisabled])
2889
- .subscribe(() => this._changeDetectorRef.markForCheck());
2533
+ .subscribe(() => this.refreshVersion.update(value => value + 1));
2890
2534
  }
2891
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2892
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CmatDatetimepickerToggleComponent, isStandalone: true, selector: "cmat-datetimepicker-toggle", inputs: { datetimepicker: ["for", "datetimepicker"], tabIndex: "tabIndex", ariaLabel: ["aria-label", "ariaLabel"], disableRipple: "disableRipple", disabled: "disabled" }, host: { properties: { "class": "this.class" } }, queries: [{ propertyName: "customIcon", first: true, predicate: CmatDatetimepickerToggleIconDirective, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }], exportAs: ["cmatDatetimepickerToggle"], usesOnChanges: true, ngImport: i0, template: "<button type=\"button\" matIconButton \r\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\" [attr.aria-label]=\"ariaLabel || intl.openCalendarLabel\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\" [disabled]=\"disabled\" [disableRipple]=\"disableRipple\" (click)=\"open($event)\">\r\n @if (!customIcon) {\r\n @switch (datetimepicker.type) {\r\n @case ('time') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\r\n </path>\r\n </svg>\r\n }\r\n @case ('datetime') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\r\n </path>\r\n </svg>\r\n }\r\n @default {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\r\n </svg>\r\n }\r\n }\r\n }\r\n\r\n <ng-content select=\"[cmatDatetimepickerToggleIcon]\"></ng-content>\r\n </button>", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2535
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2536
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatDatetimepickerToggleComponent, isStandalone: true, selector: "cmat-datetimepicker-toggle", inputs: { datetimepicker: ["for", "datetimepicker"], tabIndex: "tabIndex", ariaLabel: ["aria-label", "ariaLabel"], disableRipple: "disableRipple", disabled: "disabled" }, host: { properties: { "class": "this.class" } }, queries: [{ propertyName: "customIcon", first: true, predicate: CmatDatetimepickerToggleIconDirective, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }], exportAs: ["cmatDatetimepickerToggle"], usesOnChanges: true, ngImport: i0, template: "<button type=\"button\" matIconButton [attr.data-refresh]=\"refreshVersion()\" \r\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\" [attr.aria-label]=\"ariaLabel || intl.openCalendarLabel\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\" [disabled]=\"disabled\" [disableRipple]=\"disableRipple\" (click)=\"open($event)\">\r\n @if (!customIcon) {\r\n @switch (datetimepicker.type) {\r\n @case ('time') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\r\n </path>\r\n </svg>\r\n }\r\n @case ('datetime') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\r\n </path>\r\n </svg>\r\n }\r\n @default {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\r\n </svg>\r\n }\r\n }\r\n }\r\n\r\n <ng-content select=\"[cmatDatetimepickerToggleIcon]\"></ng-content>\r\n </button>\r\n", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2893
2537
  }
2894
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerToggleComponent, decorators: [{
2538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerToggleComponent, decorators: [{
2895
2539
  type: Component,
2896
- args: [{ selector: 'cmat-datetimepicker-toggle', exportAs: 'cmatDatetimepickerToggle', encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule], template: "<button type=\"button\" matIconButton \r\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\" [attr.aria-label]=\"ariaLabel || intl.openCalendarLabel\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\" [disabled]=\"disabled\" [disableRipple]=\"disableRipple\" (click)=\"open($event)\">\r\n @if (!customIcon) {\r\n @switch (datetimepicker.type) {\r\n @case ('time') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\r\n </path>\r\n </svg>\r\n }\r\n @case ('datetime') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\r\n </path>\r\n </svg>\r\n }\r\n @default {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\r\n </svg>\r\n }\r\n }\r\n }\r\n\r\n <ng-content select=\"[cmatDatetimepickerToggleIcon]\"></ng-content>\r\n </button>" }]
2540
+ args: [{ selector: 'cmat-datetimepicker-toggle', exportAs: 'cmatDatetimepickerToggle', encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule], template: "<button type=\"button\" matIconButton [attr.data-refresh]=\"refreshVersion()\" \r\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\" [attr.aria-label]=\"ariaLabel || intl.openCalendarLabel\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\" [disabled]=\"disabled\" [disableRipple]=\"disableRipple\" (click)=\"open($event)\">\r\n @if (!customIcon) {\r\n @switch (datetimepicker.type) {\r\n @case ('time') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\r\n </path>\r\n </svg>\r\n }\r\n @case ('datetime') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\r\n </path>\r\n </svg>\r\n }\r\n @default {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\r\n </svg>\r\n }\r\n }\r\n }\r\n\r\n <ng-content select=\"[cmatDatetimepickerToggleIcon]\"></ng-content>\r\n </button>\r\n" }]
2897
2541
  }], propDecorators: { datetimepicker: [{
2898
2542
  type: Input,
2899
2543
  args: ['for']