cmat 0.0.78 → 0.0.79

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 (201) 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 +12 -12
  8. package/fesm2022/cmat-components-cascade.mjs +14 -20
  9. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  10. package/fesm2022/cmat-components-chip-input.mjs +21 -21
  11. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  12. package/fesm2022/cmat-components-code-editor.mjs +4 -22
  13. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  14. package/fesm2022/cmat-components-custom-formly.mjs +153 -220
  15. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  16. package/fesm2022/cmat-components-date-range.mjs +5 -177
  17. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  18. package/fesm2022/cmat-components-date-time-display.mjs +3 -15
  19. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  20. package/fesm2022/cmat-components-drawer.mjs +6 -96
  21. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  22. package/fesm2022/cmat-components-empty-state.mjs +4 -25
  23. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  24. package/fesm2022/cmat-components-file-preview.mjs +3 -21
  25. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  26. package/fesm2022/cmat-components-filter-toolbar.mjs +7 -50
  27. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  28. package/fesm2022/cmat-components-form-actions.mjs +3 -9
  29. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  30. package/fesm2022/cmat-components-fullscreen.mjs +4 -4
  31. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  32. package/fesm2022/cmat-components-highlight.mjs +6 -31
  33. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  34. package/fesm2022/cmat-components-image-viewer.mjs +3 -12
  35. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  36. package/fesm2022/cmat-components-inline-loading.mjs +3 -12
  37. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  38. package/fesm2022/cmat-components-json-editor.mjs +10 -13
  39. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  40. package/fesm2022/cmat-components-knob-input.mjs +18 -12
  41. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  42. package/fesm2022/cmat-components-masonry.mjs +3 -9
  43. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  44. package/fesm2022/cmat-components-material-color-picker.mjs +3 -23
  45. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  46. package/fesm2022/cmat-components-material-datetimepicker.mjs +49 -397
  47. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  48. package/fesm2022/cmat-components-navigation.mjs +183 -725
  49. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  50. package/fesm2022/cmat-components-opt-input.mjs +7 -10
  51. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  52. package/fesm2022/cmat-components-org-chart.mjs +11 -11
  53. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  54. package/fesm2022/cmat-components-page-header.mjs +8 -19
  55. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  56. package/fesm2022/cmat-components-pagination.mjs +96 -93
  57. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  58. package/fesm2022/cmat-components-password-strength.mjs +10 -11
  59. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  60. package/fesm2022/cmat-components-popover.mjs +15 -149
  61. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  62. package/fesm2022/cmat-components-progress-bar.mjs +9 -16
  63. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  64. package/fesm2022/cmat-components-qrcode.mjs +5 -11
  65. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  66. package/fesm2022/cmat-components-rating.mjs +3 -3
  67. package/fesm2022/cmat-components-rich-text-editor.mjs +4 -25
  68. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  69. package/fesm2022/cmat-components-select-search.mjs +46 -72
  70. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  71. package/fesm2022/cmat-components-select-table.mjs +193 -150
  72. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  73. package/fesm2022/cmat-components-select-tree.mjs +124 -78
  74. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  75. package/fesm2022/cmat-components-skeleton.mjs +4 -22
  76. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  77. package/fesm2022/cmat-components-speed-dial.mjs +9 -11
  78. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  79. package/fesm2022/cmat-components-status-tag.mjs +3 -18
  80. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  81. package/fesm2022/cmat-components-table-toolbar.mjs +3 -15
  82. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  83. package/fesm2022/cmat-components-timeline.mjs +18 -21
  84. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  85. package/fesm2022/cmat-components-toast.mjs +16 -14
  86. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  87. package/fesm2022/cmat-components-transfer-picker.mjs +103 -80
  88. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  89. package/fesm2022/cmat-components-treetable.mjs +6 -6
  90. package/fesm2022/cmat-components-upload.mjs +21 -36
  91. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  92. package/fesm2022/cmat-components-x6-angular-shape.mjs +0 -1
  93. package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
  94. package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -27
  95. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  96. package/fesm2022/cmat-directives-arrow-cursor.mjs +7 -9
  97. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  98. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  99. package/fesm2022/cmat-directives-data-exporter.mjs +24 -33
  100. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  101. package/fesm2022/cmat-directives-debounce.mjs +14 -17
  102. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-digit-only.mjs +6 -23
  104. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  106. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +4 -11
  107. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  108. package/fesm2022/cmat-lib-mock-api.mjs +6 -43
  109. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  110. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  111. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  112. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -5
  113. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  114. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  115. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  116. package/fesm2022/cmat-pipes-secure.mjs +8 -12
  117. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  118. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  119. package/fesm2022/cmat-services-alert.mjs +3 -3
  120. package/fesm2022/cmat-services-config.mjs +50 -26
  121. package/fesm2022/cmat-services-config.mjs.map +1 -1
  122. package/fesm2022/cmat-services-confirmation.mjs +9 -11
  123. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  124. package/fesm2022/cmat-services-data.mjs +56 -101
  125. package/fesm2022/cmat-services-data.mjs.map +1 -1
  126. package/fesm2022/cmat-services-export-as.mjs +4 -32
  127. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  128. package/fesm2022/cmat-services-loading.mjs +49 -40
  129. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  130. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  131. package/fesm2022/cmat-services-media-watcher.mjs +19 -25
  132. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  133. package/fesm2022/cmat-services-platform.mjs +3 -10
  134. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  135. package/fesm2022/cmat-services-splash-screen.mjs +8 -13
  136. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  137. package/fesm2022/cmat-services-title.mjs +8 -12
  138. package/fesm2022/cmat-services-title.mjs.map +1 -1
  139. package/fesm2022/cmat-services-translation.mjs +3 -3
  140. package/fesm2022/cmat-services-utils.mjs +5 -27
  141. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  142. package/fesm2022/cmat-validators.mjs +0 -8
  143. package/fesm2022/cmat-validators.mjs.map +1 -1
  144. package/fesm2022/cmat.mjs +3159 -3441
  145. package/fesm2022/cmat.mjs.map +1 -1
  146. package/package.json +1 -1
  147. package/tailwind/plugins/helpers.js +1 -10
  148. package/tailwind/plugins/scrollbar/index.js +0 -1
  149. package/tailwind/plugins/scrollbar/typedefs.js +1 -7
  150. package/tailwind/plugins/scrollbar/utilities.js +9 -58
  151. package/tailwind/plugins/scrollbar/variants.js +2 -17
  152. package/tailwind/plugins/theming.js +1 -57
  153. package/tailwind/utils/generate-contrasts.js +1 -12
  154. package/tailwind/utils/generate-palette.js +1 -32
  155. package/types/cmat-components-adapter.d.ts +0 -25
  156. package/types/cmat-components-breadcrumb.d.ts +25 -175
  157. package/types/cmat-components-carousel.d.ts +0 -18
  158. package/types/cmat-components-cascade.d.ts +1 -1
  159. package/types/cmat-components-chip-input.d.ts +4 -3
  160. package/types/cmat-components-code-editor.d.ts +0 -18
  161. package/types/cmat-components-custom-formly.d.ts +22 -28
  162. package/types/cmat-components-date-range.d.ts +0 -71
  163. package/types/cmat-components-date-time-display.d.ts +0 -15
  164. package/types/cmat-components-drawer.d.ts +0 -42
  165. package/types/cmat-components-empty-state.d.ts +0 -21
  166. package/types/cmat-components-file-preview.d.ts +0 -18
  167. package/types/cmat-components-filter-toolbar.d.ts +3 -43
  168. package/types/cmat-components-form-actions.d.ts +0 -6
  169. package/types/cmat-components-image-viewer.d.ts +0 -12
  170. package/types/cmat-components-inline-loading.d.ts +0 -9
  171. package/types/cmat-components-knob-input.d.ts +1 -1
  172. package/types/cmat-components-material-datetimepicker.d.ts +0 -263
  173. package/types/cmat-components-navigation.d.ts +24 -164
  174. package/types/cmat-components-opt-input.d.ts +1 -1
  175. package/types/cmat-components-page-header.d.ts +2 -16
  176. package/types/cmat-components-pagination.d.ts +22 -24
  177. package/types/cmat-components-popover.d.ts +1 -109
  178. package/types/cmat-components-progress-bar.d.ts +3 -4
  179. package/types/cmat-components-rich-text-editor.d.ts +0 -21
  180. package/types/cmat-components-select-search.d.ts +3 -19
  181. package/types/cmat-components-select-table.d.ts +17 -4
  182. package/types/cmat-components-select-tree.d.ts +20 -19
  183. package/types/cmat-components-skeleton.d.ts +0 -18
  184. package/types/cmat-components-status-tag.d.ts +0 -15
  185. package/types/cmat-components-table-toolbar.d.ts +0 -12
  186. package/types/cmat-components-timeline.d.ts +3 -4
  187. package/types/cmat-components-toast.d.ts +1 -0
  188. package/types/cmat-components-transfer-picker.d.ts +23 -27
  189. package/types/cmat-components-upload.d.ts +7 -10
  190. package/types/cmat-components-x6-angular-shape.d.ts +0 -1
  191. package/types/cmat-directives-arrow-cursor.d.ts +1 -1
  192. package/types/cmat-directives-debounce.d.ts +3 -4
  193. package/types/cmat-pipes-secure.d.ts +3 -4
  194. package/types/cmat-services-config.d.ts +35 -13
  195. package/types/cmat-services-data.d.ts +13 -12
  196. package/types/cmat-services-export-as.d.ts +0 -22
  197. package/types/cmat-services-loading.d.ts +15 -10
  198. package/types/cmat-services-media-watcher.d.ts +10 -13
  199. package/types/cmat-services-splash-screen.d.ts +2 -4
  200. package/types/cmat-services-title.d.ts +3 -5
  201. package/types/cmat.d.ts +655 -1308
@@ -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.8", ngImport: i0, type: CmatDatetimepickerClockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
254
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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.8", 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.8", ngImport: i0, type: CmatDatetimepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
327
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", 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.8", 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.8", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
368
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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.8", 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,14 +394,10 @@ 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();
462
402
  this.adapter = inject(DatetimeAdapter, { optional: true });
463
403
  this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
@@ -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') {
@@ -527,7 +461,6 @@ class CmatDatetimepickerMonthViewComponent {
527
461
  this._changeDetectorRef.markForCheck();
528
462
  }
529
463
  }
530
- /** Initializes this month view. */
531
464
  _init() {
532
465
  this.selectedDate = this._getDateInCurrentMonth(this.selected);
533
466
  this.todayDate = this._getDateInCurrentMonth(this.adapter.today());
@@ -537,7 +470,6 @@ class CmatDatetimepickerMonthViewComponent {
537
470
  this.adapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;
538
471
  this._createWeekCells();
539
472
  }
540
- /** Creates MdCalendarCells for the dates in this month. */
541
473
  _createWeekCells() {
542
474
  const daysInMonth = this.adapter.getNumDaysInMonth(this.activeDate);
543
475
  const dateNames = this.adapter.getDateNames();
@@ -555,10 +487,6 @@ class CmatDatetimepickerMonthViewComponent {
555
487
  .push(new CmatDatetimepickerCalendarCellComponent(i + 1, dateNames[i], ariaLabel, enabled));
556
488
  }
557
489
  }
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
490
  _getDateInCurrentMonth(date) {
563
491
  return this.adapter.sameMonthAndYear(date, this.activeDate) ?
564
492
  this.adapter.getDate(date) : null;
@@ -566,10 +494,10 @@ class CmatDatetimepickerMonthViewComponent {
566
494
  _changeCalendarState(direction) {
567
495
  this.calendarState = direction;
568
496
  }
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 }); }
497
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
498
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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 }); }
571
499
  }
572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, decorators: [{
500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, decorators: [{
573
501
  type: Component,
574
502
  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"] }]
575
503
  }], ctorParameters: () => [], propDecorators: { type: [{
@@ -588,14 +516,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
588
516
 
589
517
  const yearsPerPage = 24;
590
518
  const yearsPerRow = 4;
591
- /**
592
- * An internal component used to display multiple years in the datepicker.
593
- */
594
519
  class CmatDatetimepickerMultiYearViewComponent {
595
520
  constructor() {
596
521
  this.userSelection = new EventEmitter();
597
522
  this.type = 'date';
598
- /** Emits when a new month is selected. */
599
523
  this.selectedChange = new EventEmitter();
600
524
  this.adapter = inject(DatetimeAdapter, { optional: true });
601
525
  this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
@@ -611,7 +535,6 @@ class CmatDatetimepickerMultiYearViewComponent {
611
535
  this._activeDate = this.adapter.today();
612
536
  this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
613
537
  }
614
- /** The date to display in this multi year view*/
615
538
  get activeDate() {
616
539
  return this._activeDate;
617
540
  }
@@ -629,7 +552,6 @@ class CmatDatetimepickerMultiYearViewComponent {
629
552
  }
630
553
  }
631
554
  }
632
- /** The currently selected date. */
633
555
  // eslint-disable-next-line @typescript-eslint/member-ordering
634
556
  get selected() {
635
557
  return this._selected;
@@ -638,7 +560,6 @@ class CmatDatetimepickerMultiYearViewComponent {
638
560
  this._selected = value;
639
561
  this.selectedYear = this._selected && this.adapter.getYear(this._selected);
640
562
  }
641
- /** The minimum selectable date. */
642
563
  // eslint-disable-next-line @typescript-eslint/member-ordering
643
564
  get minDate() {
644
565
  return this._minDate;
@@ -646,7 +567,6 @@ class CmatDatetimepickerMultiYearViewComponent {
646
567
  set minDate(value) {
647
568
  this._minDate = this._getValidDateOrNull(this.adapter.deserialize(value));
648
569
  }
649
- /** The maximum selectable date. */
650
570
  // eslint-disable-next-line @typescript-eslint/member-ordering
651
571
  get maxDate() {
652
572
  return this._maxDate;
@@ -660,7 +580,6 @@ class CmatDatetimepickerMultiYearViewComponent {
660
580
  ngOnDestroy() {
661
581
  this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
662
582
  }
663
- /** Handles when a new year is selected. */
664
583
  yearSelected(year) {
665
584
  const month = this.adapter.getMonth(this.activeDate);
666
585
  const normalizedDate = this.adapter.createDatetime(year, month, 1, 0, 0);
@@ -678,7 +597,6 @@ class CmatDatetimepickerMultiYearViewComponent {
678
597
  this._changeDetectorRef.markForCheck();
679
598
  }
680
599
  }
681
- /** Initializes this year view. */
682
600
  _init() {
683
601
  this.todayYear = this.adapter.getYear(this.adapter.today());
684
602
  this.yearLabel = this.adapter.getYearName(this.activeDate);
@@ -693,25 +611,20 @@ class CmatDatetimepickerMultiYearViewComponent {
693
611
  }
694
612
  }
695
613
  }
696
- /** Creates an MatDatetimepickerCalendarCell for the given year. */
697
614
  _createCellForYear(year) {
698
615
  const yearName = this.adapter.getYearName(this.adapter.createDate(year, 0, 1));
699
616
  return new CmatDatetimepickerCalendarCellComponent(year, yearName, yearName, this._shouldEnableYear(year));
700
617
  }
701
- /** Whether the given year is enabled. */
702
618
  _shouldEnableYear(year) {
703
- // disable if the year is greater than maxDate lower than minDate
704
619
  if (year === undefined || year === null ||
705
620
  (this.maxDate && year > this.adapter.getYear(this.maxDate)) ||
706
621
  (this.minDate && year < this.adapter.getYear(this.minDate))) {
707
622
  return false;
708
623
  }
709
- // enable if it reaches here and there's no filter defined
710
624
  if (!this.dateFilter) {
711
625
  return true;
712
626
  }
713
627
  const firstOfYear = this.adapter.createDate(year, 0, 1);
714
- // If any date in the year is enabled count the year as enabled.
715
628
  for (let date = firstOfYear; this.adapter.getYear(date) === year; date = this.adapter.addCalendarDays(date, 1)) {
716
629
  if (this.dateFilter(date)) {
717
630
  return true;
@@ -719,20 +632,16 @@ class CmatDatetimepickerMultiYearViewComponent {
719
632
  }
720
633
  return false;
721
634
  }
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
635
  _getValidDateOrNull(obj) {
727
636
  return (this.adapter.isDateInstance(obj) && this.adapter.isValid(obj)) ? obj : null;
728
637
  }
729
638
  _changeCalendarState(direction) {
730
639
  this.calendarState = direction;
731
640
  }
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 }); }
641
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
642
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", 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 }); }
734
643
  }
735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, decorators: [{
644
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, decorators: [{
736
645
  type: Component,
737
646
  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"] }]
738
647
  }], ctorParameters: () => [], propDecorators: { userSelection: [{
@@ -759,19 +668,10 @@ function isSameMultiYearView(dateAdapter, date1, date2, minDate, maxDate) {
759
668
  return Math.floor((year1 - startingYear) / yearsPerPage) ===
760
669
  Math.floor((year2 - startingYear) / yearsPerPage);
761
670
  }
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
671
  function getActiveOffset(dateAdapter, activeDate, minDate, maxDate) {
768
672
  const activeYear = dateAdapter.getYear(activeDate);
769
673
  return euclideanModulo((activeYear - getStartingYear(dateAdapter, minDate, maxDate)), yearsPerPage);
770
674
  }
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
675
  function getStartingYear(dateAdapter, minDate, maxDate) {
776
676
  let startingYear = 0;
777
677
  if (maxDate) {
@@ -783,7 +683,6 @@ function getStartingYear(dateAdapter, minDate, maxDate) {
783
683
  }
784
684
  return startingYear;
785
685
  }
786
- /** Gets remainder that is non-negative, even if first number is negative */
787
686
  function euclideanModulo(a, b) {
788
687
  return (a % b + b) % b;
789
688
  }
@@ -809,7 +708,6 @@ class CmatDatetimepickerTimeInputDirective {
809
708
  this.inputElement.addEventListener('keydown', this._keyDownListener, {
810
709
  passive: true,
811
710
  });
812
- // Do not passive since we want to be able to preventDefault()
813
711
  this.inputElement.addEventListener('keypress', this._keyPressListener);
814
712
  this.inputElement.addEventListener('input', this._inputEventListener, {
815
713
  passive: true,
@@ -821,15 +719,9 @@ class CmatDatetimepickerTimeInputDirective {
821
719
  get inputElement() {
822
720
  return this._element.nativeElement;
823
721
  }
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
722
  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
723
  if (this._value) {
830
724
  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
725
  if (currentValue.length) {
834
726
  return pad(this._value, 2) === this.inputElement.value;
835
727
  }
@@ -857,11 +749,6 @@ class CmatDatetimepickerTimeInputDirective {
857
749
  focus() {
858
750
  this.writeValue('');
859
751
  }
860
- /**
861
- * Write value to inputElement
862
- *
863
- * @param value NumberInput
864
- */
865
752
  writeValue(value) {
866
753
  if (value !== '') {
867
754
  this.inputElement.value = pad(value, 2);
@@ -871,11 +758,6 @@ class CmatDatetimepickerTimeInputDirective {
871
758
  }
872
759
  this._cdr.markForCheck();
873
760
  }
874
- /**
875
- * Writes value to placeholder
876
- *
877
- * @param value NumberInput
878
- */
879
761
  writePlaceholder(value) {
880
762
  this.inputElement.placeholder = pad(value, 2);
881
763
  this._cdr.markForCheck();
@@ -893,7 +775,6 @@ class CmatDatetimepickerTimeInputDirective {
893
775
  value -= this.timeInterval;
894
776
  event.stopPropagation();
895
777
  }
896
- // if value has changed
897
778
  if (typeof value === 'number') {
898
779
  this.writeValue(value);
899
780
  this.writePlaceholder(value);
@@ -902,11 +783,6 @@ class CmatDatetimepickerTimeInputDirective {
902
783
  }
903
784
  }
904
785
  }
905
- /**
906
- * Prevent non number inputs in the inputElement with the exception of Enter/BackSpace
907
- *
908
- * @param event KeyboardEvent
909
- */
910
786
  keyPressHandler(event) {
911
787
  const key = event?.key ?? null;
912
788
  if (isNaN(Number(key)) && key !== 'Enter') {
@@ -931,18 +807,15 @@ class CmatDatetimepickerTimeInputDirective {
931
807
  this._value = clampedValue;
932
808
  }
933
809
  }
934
- /**
935
- * Remove event listeners on destruction
936
- */
937
810
  ngOnDestroy() {
938
811
  this.inputElement.removeEventListener('keydown', this._keyDownListener);
939
812
  this.inputElement.removeEventListener('keypress', this._keyPressListener);
940
813
  this.inputElement.removeEventListener('input', this._inputEventListener);
941
814
  }
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 }); }
815
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
816
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", 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
817
  }
945
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, decorators: [{
818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, decorators: [{
946
819
  type: Directive,
947
820
  args: [{
948
821
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -968,19 +841,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
968
841
  }] } });
969
842
  class CmatDatetimepickerTimeComponent {
970
843
  constructor() {
971
- /** Emits when the currently selected date changes. */
972
844
  this.selectedChange = new EventEmitter();
973
- /** Emits when any date changes. */
974
845
  this.activeDateChange = new EventEmitter();
975
- /** Emits when any date is selected. */
976
846
  this.userSelection = new EventEmitter();
977
- /** Emits when AM/PM button are clicked. */
978
847
  this.ampmChange = new EventEmitter();
979
- /** Emits when AM/PM button are clicked. */
980
848
  this.clockViewChange = new EventEmitter();
981
- /** Step over minutes. */
982
849
  this.interval = 1;
983
- /** Whether the time is now in AM or PM. */
984
850
  // eslint-disable-next-line @typescript-eslint/naming-convention
985
851
  this.AMPM = 'AM';
986
852
  this.class = 'cmat-datetimepicker-time';
@@ -988,7 +854,6 @@ class CmatDatetimepickerTimeComponent {
988
854
  this._adapter = inject(DatetimeAdapter);
989
855
  this._changeDetectorRef = inject(ChangeDetectorRef);
990
856
  this._twelvehour = false;
991
- /** Whether the clock is in hour view. */
992
857
  this._clockView = 'hour';
993
858
  this.datetimepickerIntlChangesSubscription = this.datetimepickerIntl.changes.subscribe(() => {
994
859
  this._changeDetectorRef.detectChanges();
@@ -1026,7 +891,6 @@ class CmatDatetimepickerTimeComponent {
1026
891
  }
1027
892
  return '00';
1028
893
  }
1029
- /** Whether the clock uses 12 hour format. */
1030
894
  // eslint-disable-next-line @typescript-eslint/member-ordering
1031
895
  get twelvehour() {
1032
896
  return this._twelvehour;
@@ -1034,9 +898,6 @@ class CmatDatetimepickerTimeComponent {
1034
898
  set twelvehour(value) {
1035
899
  this._twelvehour = coerceBooleanProperty(value);
1036
900
  }
1037
- /**
1038
- * The date to display in this clock view.
1039
- */
1040
901
  // eslint-disable-next-line @typescript-eslint/member-ordering
1041
902
  get activeDate() {
1042
903
  return this._activeDate;
@@ -1044,7 +905,6 @@ class CmatDatetimepickerTimeComponent {
1044
905
  set activeDate(value) {
1045
906
  this._activeDate = this._adapter.clampDate(value, this.minDate, this.maxDate);
1046
907
  }
1047
- /** The currently selected date. */
1048
908
  // eslint-disable-next-line @typescript-eslint/member-ordering
1049
909
  get selected() {
1050
910
  return this._selected;
@@ -1055,7 +915,6 @@ class CmatDatetimepickerTimeComponent {
1055
915
  this.activeDate = this._selected;
1056
916
  }
1057
917
  }
1058
- /** The minimum selectable date. */
1059
918
  // eslint-disable-next-line @typescript-eslint/member-ordering
1060
919
  get minDate() {
1061
920
  return this._minDate;
@@ -1063,7 +922,6 @@ class CmatDatetimepickerTimeComponent {
1063
922
  set minDate(value) {
1064
923
  this._minDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
1065
924
  }
1066
- /** The maximum selectable date. */
1067
925
  // eslint-disable-next-line @typescript-eslint/member-ordering
1068
926
  get maxDate() {
1069
927
  return this._maxDate;
@@ -1071,7 +929,6 @@ class CmatDatetimepickerTimeComponent {
1071
929
  set maxDate(value) {
1072
930
  this._maxDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
1073
931
  }
1074
- /** Whether the clock should be started in hour or minute view. */
1075
932
  // eslint-disable-next-line @typescript-eslint/member-ordering
1076
933
  get clockView() {
1077
934
  return this._clockView;
@@ -1086,7 +943,6 @@ class CmatDatetimepickerTimeComponent {
1086
943
  return String(value);
1087
944
  }
1088
945
  ngOnChanges(changes) {
1089
- // when clockView changes by input we should focus the correct input
1090
946
  if (changes['clockView']) {
1091
947
  if (changes['clockView'].currentValue !== changes['clockView'].previousValue) {
1092
948
  this.focusInputElement();
@@ -1114,9 +970,6 @@ class CmatDatetimepickerTimeComponent {
1114
970
  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
971
  this._activeDate = this._adapter.clampDate(newValue, this.minDate, this.maxDate);
1116
972
  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
973
  if (this.hourInputDirective) {
1121
974
  this.hourInputDirective.timeValue = this.hour;
1122
975
  }
@@ -1126,19 +979,16 @@ class CmatDatetimepickerTimeComponent {
1126
979
  if (!this.twelvehour) {
1127
980
  return value;
1128
981
  }
1129
- // value should be between 1-12
1130
982
  if (this.AMPM === 'AM') {
1131
983
  if (value === 0 || value === 12) {
1132
984
  return 0;
1133
985
  }
1134
986
  return value;
1135
987
  }
1136
- // PM
1137
988
  else {
1138
989
  if (value === 0 || value === 12) {
1139
990
  return 12;
1140
991
  }
1141
- // other cases, we should add 12 to the value aka 3:00 PM = 3 + 12 = 15:00
1142
992
  return value + 12;
1143
993
  }
1144
994
  }
@@ -1148,9 +998,6 @@ class CmatDatetimepickerTimeComponent {
1148
998
  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
999
  this._activeDate = this._adapter.clampDate(newValue, this.minDate, this.maxDate);
1150
1000
  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
1001
  if (this.minuteInputDirective) {
1155
1002
  this.minuteInputDirective.timeValue = this.minute;
1156
1003
  }
@@ -1184,10 +1031,10 @@ class CmatDatetimepickerTimeComponent {
1184
1031
  this.datetimepickerIntlChangesSubscription.unsubscribe();
1185
1032
  }
1186
1033
  }
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 }); }
1034
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1035
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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 }); }
1189
1036
  }
1190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerTimeComponent, decorators: [{
1037
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerTimeComponent, decorators: [{
1191
1038
  type: Component,
1192
1039
  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"] }]
1193
1040
  }], ctorParameters: () => [], propDecorators: { selectedChange: [{
@@ -1235,14 +1082,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
1235
1082
  type: Input
1236
1083
  }] } });
1237
1084
 
1238
- /**
1239
- * An internal component used to display a single year in the datepicker.
1240
- */
1241
1085
  class CmatDatetimepickerYearViewComponent {
1242
1086
  constructor() {
1243
1087
  this.userSelection = new EventEmitter();
1244
1088
  this.type = 'date';
1245
- /** Emits when a new month is selected. */
1246
1089
  this.selectedChange = new EventEmitter();
1247
1090
  this.adapter = inject(DatetimeAdapter, { optional: true });
1248
1091
  this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
@@ -1258,7 +1101,6 @@ class CmatDatetimepickerYearViewComponent {
1258
1101
  this._activeDate = this.adapter.today();
1259
1102
  this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
1260
1103
  }
1261
- /** The date to display in this year view (everything other than the year is ignored). */
1262
1104
  get activeDate() {
1263
1105
  return this._activeDate;
1264
1106
  }
@@ -1276,7 +1118,6 @@ class CmatDatetimepickerYearViewComponent {
1276
1118
  }
1277
1119
  }
1278
1120
  }
1279
- /** The currently selected date. */
1280
1121
  // eslint-disable-next-line @typescript-eslint/member-ordering
1281
1122
  get selected() {
1282
1123
  return this._selected;
@@ -1291,7 +1132,6 @@ class CmatDatetimepickerYearViewComponent {
1291
1132
  ngOnDestroy() {
1292
1133
  this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
1293
1134
  }
1294
- /** Handles when a new month is selected. */
1295
1135
  monthSelected(month) {
1296
1136
  const normalizedDate = this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1, 0, 0);
1297
1137
  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)));
@@ -1305,35 +1145,26 @@ class CmatDatetimepickerYearViewComponent {
1305
1145
  this._changeDetectorRef.markForCheck();
1306
1146
  }
1307
1147
  }
1308
- /** Initializes this month view. */
1309
1148
  _init() {
1310
1149
  this.selectedMonth = this._getMonthInCurrentYear(this.selected);
1311
1150
  this.todayMonth = this._getMonthInCurrentYear(this.adapter.today());
1312
1151
  this.yearLabel = this.adapter.getYearName(this.activeDate);
1313
1152
  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
1153
  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
1154
  }
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
1155
  _getMonthInCurrentYear(date) {
1322
1156
  return this.adapter.sameYear(date, this.activeDate) ?
1323
1157
  this.adapter.getMonth(date) : null;
1324
1158
  }
1325
- /** Creates an MdCalendarCell for the given month. */
1326
1159
  _createCellForMonth(month, monthName) {
1327
1160
  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
1161
  return new CmatDatetimepickerCalendarCellComponent(month, monthName.toLocaleUpperCase(), ariaLabel, this._isMonthEnabled(month));
1329
1162
  }
1330
- /** Whether the given month is enabled. */
1331
1163
  _isMonthEnabled(month) {
1332
1164
  if (!this.dateFilter) {
1333
1165
  return true;
1334
1166
  }
1335
1167
  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
1168
  for (let date = firstOfMonth; this.adapter.getMonth(date) === month; date = this.adapter.addCalendarDays(date, 1)) {
1338
1169
  if (this.dateFilter(date)) {
1339
1170
  return true;
@@ -1344,10 +1175,10 @@ class CmatDatetimepickerYearViewComponent {
1344
1175
  _changeCalendarState(direction) {
1345
1176
  this.calendarState = direction;
1346
1177
  }
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 }); }
1178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1179
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", 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 }); }
1349
1180
  }
1350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerYearViewComponent, decorators: [{
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerYearViewComponent, decorators: [{
1351
1182
  type: Component,
1352
1183
  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"] }]
1353
1184
  }], ctorParameters: () => [], propDecorators: { userSelection: [{
@@ -1364,30 +1195,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
1364
1195
  type: Input
1365
1196
  }] } });
1366
1197
 
1367
- /**
1368
- * A calendar that is used as part of the datepicker.
1369
- */
1370
1198
  class CmatDatetimepickerCalendarComponent {
1371
1199
  constructor() {
1372
1200
  this.userSelection = new EventEmitter();
1373
- /** Active multi year view when click on year. */
1374
1201
  this.multiYearSelector = false;
1375
- /** Whether the calendar should be started in month or year view. */
1376
1202
  this.startView = 'month';
1377
1203
  this.twelvehour = false;
1378
1204
  this.timeInterval = 1;
1379
- /** Prevent user to select same date time */
1380
1205
  this.preventSameDateTimeSelection = false;
1381
- /** Emits when the currently selected date changes. */
1382
1206
  this.selectedChange = new EventEmitter();
1383
- /** Emits when the view has been changed. **/
1384
1207
  this.viewChanged = new EventEmitter();
1385
1208
  this.class = 'cmat-datetimepicker-calendar';
1386
1209
  this.label = 'ariaLabel';
1387
1210
  this.role = 'dialog';
1388
1211
  this.tabindex = 0;
1389
1212
  this.clockView = 'hour';
1390
- /** Whether the calendar is in month view. */
1391
1213
  this._elementRef = inject(ElementRef);
1392
1214
  this._intl = inject(CmatDatetimepickerIntl);
1393
1215
  this._adapter = inject(DatetimeAdapter, { optional: true });
@@ -1396,7 +1218,6 @@ class CmatDatetimepickerCalendarComponent {
1396
1218
  this._type = 'date';
1397
1219
  this._timeInput = false;
1398
1220
  this._calendarAnimationListener = this.calendarStateDone.bind(this);
1399
- /** Date filter for the month and year views. */
1400
1221
  this.dateFilterForViews = (date) => !!date &&
1401
1222
  (!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.DATE)) &&
1402
1223
  (!this.minDate || this._adapter.compareDate(date, this.minDate) >= 0) &&
@@ -1422,7 +1243,6 @@ class CmatDatetimepickerCalendarComponent {
1422
1243
  this.multiYearSelector = true;
1423
1244
  }
1424
1245
  }
1425
- /** A date representing the period (month or year) to start the calendar in. */
1426
1246
  // eslint-disable-next-line @typescript-eslint/member-ordering
1427
1247
  get startAt() {
1428
1248
  return this._startAt;
@@ -1430,11 +1250,6 @@ class CmatDatetimepickerCalendarComponent {
1430
1250
  set startAt(value) {
1431
1251
  this._startAt = this._adapter.getValidDateOrNull(value);
1432
1252
  }
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
1253
  // eslint-disable-next-line @typescript-eslint/member-ordering
1439
1254
  get timeInput() {
1440
1255
  return this._timeInput;
@@ -1442,7 +1257,6 @@ class CmatDatetimepickerCalendarComponent {
1442
1257
  set timeInput(value) {
1443
1258
  this._timeInput = coerceBooleanProperty(value);
1444
1259
  }
1445
- /** The currently selected date. */
1446
1260
  // eslint-disable-next-line @typescript-eslint/member-ordering
1447
1261
  get selected() {
1448
1262
  return this._selected;
@@ -1450,7 +1264,6 @@ class CmatDatetimepickerCalendarComponent {
1450
1264
  set selected(value) {
1451
1265
  this._selected = this._adapter.getValidDateOrNull(value);
1452
1266
  }
1453
- /** The minimum selectable date. */
1454
1267
  // eslint-disable-next-line @typescript-eslint/member-ordering
1455
1268
  get minDate() {
1456
1269
  return this._minDate;
@@ -1458,7 +1271,6 @@ class CmatDatetimepickerCalendarComponent {
1458
1271
  set minDate(value) {
1459
1272
  this._minDate = this._adapter.getValidDateOrNull(value);
1460
1273
  }
1461
- /** The maximum selectable date. */
1462
1274
  // eslint-disable-next-line @typescript-eslint/member-ordering
1463
1275
  get maxDate() {
1464
1276
  return this._maxDate;
@@ -1466,10 +1278,6 @@ class CmatDatetimepickerCalendarComponent {
1466
1278
  set maxDate(value) {
1467
1279
  this._maxDate = this._adapter.getValidDateOrNull(value);
1468
1280
  }
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
1281
  // eslint-disable-next-line @typescript-eslint/member-ordering
1474
1282
  get activeDate() {
1475
1283
  return this._clampedActiveDate;
@@ -1495,7 +1303,6 @@ class CmatDatetimepickerCalendarComponent {
1495
1303
  this._currentView = view;
1496
1304
  this.viewChanged.emit(view);
1497
1305
  }
1498
- /** The label for the current calendar view. */
1499
1306
  // eslint-disable-next-line @typescript-eslint/member-ordering
1500
1307
  get yearButtonText() {
1501
1308
  return this._adapter.getYearName(this.activeDate);
@@ -1503,9 +1310,6 @@ class CmatDatetimepickerCalendarComponent {
1503
1310
  // eslint-disable-next-line @typescript-eslint/member-ordering
1504
1311
  get yearPeriodText() {
1505
1312
  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
1313
  const activeYear = this._adapter.getYear(this.activeDate);
1510
1314
  const minYearOfPage = activeYear - getActiveOffset(this._adapter, this.activeDate, this.minDate, this.maxDate);
1511
1315
  const maxYearOfPage = minYearOfPage + yearsPerPage - 1;
@@ -1622,7 +1426,6 @@ class CmatDatetimepickerCalendarComponent {
1622
1426
  this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
1623
1427
  this._intlChanges.unsubscribe();
1624
1428
  }
1625
- /** Handles date selection in the month view. */
1626
1429
  dateSelected(date) {
1627
1430
  if (this.type === 'date') {
1628
1431
  if (!this._adapter.sameDate(date, this.selected) || !this.preventSameDateTimeSelection) {
@@ -1634,7 +1437,6 @@ class CmatDatetimepickerCalendarComponent {
1634
1437
  this.currentView = 'clock';
1635
1438
  }
1636
1439
  }
1637
- /** Handles month selection in the year view. */
1638
1440
  monthSelected(month) {
1639
1441
  if (this.type === 'month') {
1640
1442
  if (!this._adapter.sameMonthAndYear(month, this.selected) || !this.preventSameDateTimeSelection) {
@@ -1647,7 +1449,6 @@ class CmatDatetimepickerCalendarComponent {
1647
1449
  this.clockView = 'hour';
1648
1450
  }
1649
1451
  }
1650
- /** Handles year selection in the multi year view. */
1651
1452
  yearSelected(year) {
1652
1453
  if (this.type === 'year') {
1653
1454
  if ((this.selected && !this._adapter.sameYear(year, this.selected)) || !this.preventSameDateTimeSelection) {
@@ -1708,13 +1509,11 @@ class CmatDatetimepickerCalendarComponent {
1708
1509
  return;
1709
1510
  }
1710
1511
  this.AMPM = source;
1711
- // if AMPM changed from PM to AM substract 12 hours
1712
1512
  const currentHour = this._adapter.getHour(this.activeDate);
1713
1513
  let newHourValue;
1714
1514
  if (this.AMPM === 'AM') {
1715
1515
  newHourValue = currentHour >= 12 ? this._adapter.getHour(this.activeDate) - 12 : 12;
1716
1516
  }
1717
- // otherwise add 12 hours
1718
1517
  else {
1719
1518
  newHourValue = (currentHour + 12) % 24;
1720
1519
  }
@@ -1740,26 +1539,22 @@ class CmatDatetimepickerCalendarComponent {
1740
1539
  this.currentView = 'clock';
1741
1540
  this.clockView = 'minute';
1742
1541
  }
1743
- /** Handles user clicks on the previous button. */
1744
1542
  previousClicked() {
1745
1543
  this.activeDate = this.currentView === 'month' ?
1746
1544
  this._adapter.addCalendarMonths(this.activeDate, -1) :
1747
1545
  this._adapter.addCalendarYears(this.activeDate, this.currentView === 'year' ? -1 : -yearsPerPage);
1748
1546
  }
1749
- /** Handles user clicks on the next button. */
1750
1547
  nextClicked() {
1751
1548
  this.activeDate = this.currentView === 'month' ?
1752
1549
  this._adapter.addCalendarMonths(this.activeDate, 1) :
1753
1550
  this._adapter.addCalendarYears(this.activeDate, this.currentView === 'year' ? 1 : yearsPerPage);
1754
1551
  }
1755
- /** Whether the previous period button is enabled. */
1756
1552
  previousEnabled() {
1757
1553
  if (!this.minDate) {
1758
1554
  return true;
1759
1555
  }
1760
1556
  return !this.minDate || !this._isSameView(this.activeDate, this.minDate);
1761
1557
  }
1762
- /** Whether the next period button is enabled. */
1763
1558
  nextEnabled() {
1764
1559
  return !this.maxDate || !this._isSameView(this.activeDate, this.maxDate);
1765
1560
  }
@@ -1772,7 +1567,6 @@ class CmatDatetimepickerCalendarComponent {
1772
1567
  this._changeDetectorRef.markForCheck();
1773
1568
  }
1774
1569
  }
1775
- /** Whether the two dates represent the same view in the current view mode (month or year). */
1776
1570
  _isSameView(date1, date2) {
1777
1571
  if (this.currentView === 'month') {
1778
1572
  return this._adapter.getYear(date1) === this._adapter.getYear(date2) &&
@@ -1781,10 +1575,8 @@ class CmatDatetimepickerCalendarComponent {
1781
1575
  if (this.currentView === 'year') {
1782
1576
  return this._adapter.getYear(date1) === this._adapter.getYear(date2);
1783
1577
  }
1784
- // Otherwise we are in 'multi-year' view.
1785
1578
  return isSameMultiYearView(this._adapter, date1, date2, this.minDate, this.maxDate);
1786
1579
  }
1787
- /** Handles keydown events on the calendar body when calendar is in month view. */
1788
1580
  _handleCalendarBodyKeydownInMonthView(event) {
1789
1581
  switch (event.code) {
1790
1582
  case 'ArrowLeft':
@@ -1819,18 +1611,14 @@ class CmatDatetimepickerCalendarComponent {
1819
1611
  case 'Enter':
1820
1612
  if (this.dateFilterForViews(this.activeDate)) {
1821
1613
  this.dateSelected(this.activeDate);
1822
- // Prevent unexpected default actions such as form submission.
1823
1614
  event.preventDefault();
1824
1615
  }
1825
1616
  return;
1826
1617
  default:
1827
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1828
1618
  return;
1829
1619
  }
1830
- // Prevent unexpected default actions such as form submission.
1831
1620
  event.preventDefault();
1832
1621
  }
1833
- /** Handles keydown events on the calendar body when calendar is in year view. */
1834
1622
  _handleCalendarBodyKeydownInYearView(event) {
1835
1623
  switch (event.code) {
1836
1624
  case 'ArrowLeft':
@@ -1863,13 +1651,10 @@ class CmatDatetimepickerCalendarComponent {
1863
1651
  this.monthSelected(this.activeDate);
1864
1652
  break;
1865
1653
  default:
1866
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1867
1654
  return;
1868
1655
  }
1869
- // Prevent unexpected default actions such as form submission.
1870
1656
  event.preventDefault();
1871
1657
  }
1872
- /** Handles keydown events on the calendar body when calendar is in multi-year view. */
1873
1658
  _handleCalendarBodyKeydownInMultiYearView(event) {
1874
1659
  switch (event.code) {
1875
1660
  case 'ArrowLeft':
@@ -1902,25 +1687,21 @@ class CmatDatetimepickerCalendarComponent {
1902
1687
  this.yearSelected(this.activeDate);
1903
1688
  break;
1904
1689
  default:
1905
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1906
1690
  return;
1907
1691
  }
1908
1692
  }
1909
- /** Handles keydown events on the calendar body when calendar is in month view. */
1910
1693
  _handleCalendarBodyKeydownInClockView(event) {
1911
1694
  switch (event.code) {
1912
1695
  case 'ArrowUp':
1913
1696
  this.activeDate = this.clockView === 'hour' ?
1914
1697
  this._adapter.addCalendarHours(this.activeDate, 1) :
1915
1698
  this._adapter.addCalendarMinutes(this.activeDate, this.timeInterval);
1916
- // if the hours changed the am/pm we should update the AM/PM
1917
1699
  this.selectAMPM(this.activeDate);
1918
1700
  break;
1919
1701
  case 'ArrowDown':
1920
1702
  this.activeDate = this.clockView === 'hour' ?
1921
1703
  this._adapter.addCalendarHours(this.activeDate, -1) :
1922
1704
  this._adapter.addCalendarMinutes(this.activeDate, -this.timeInterval);
1923
- // if the hours changed the am/pm we should update the AM/PM
1924
1705
  this.selectAMPM(this.activeDate);
1925
1706
  break;
1926
1707
  case 'Enter':
@@ -1929,30 +1710,16 @@ class CmatDatetimepickerCalendarComponent {
1929
1710
  }
1930
1711
  return;
1931
1712
  default:
1932
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1933
1713
  return;
1934
1714
  }
1935
- // Prevent unexpected default actions such as form submission.
1936
1715
  event.preventDefault();
1937
1716
  }
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
1717
  _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
1718
  const increment = this._adapter.getMonth(date) <= 4 ? -5 :
1946
1719
  (this._adapter.getMonth(date) >= 7 ? -7 : -12);
1947
1720
  return this._adapter.addCalendarMonths(date, increment);
1948
1721
  }
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
1722
  _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
1723
  const increment = this._adapter.getMonth(date) <= 4 ? 7 :
1957
1724
  (this._adapter.getMonth(date) >= 7 ? 5 : 12);
1958
1725
  return this._adapter.addCalendarMonths(date, increment);
@@ -1963,10 +1730,10 @@ class CmatDatetimepickerCalendarComponent {
1963
1730
  _2digit(n) {
1964
1731
  return ('00' + n).slice(-2);
1965
1732
  }
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 }); }
1733
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1734
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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 }); }
1968
1735
  }
1969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerCalendarComponent, decorators: [{
1736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerCalendarComponent, decorators: [{
1970
1737
  type: Component,
1971
1738
  args: [{ selector: 'cmat-datetimepicker-calendar', host: {
1972
1739
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -2020,9 +1787,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
2020
1787
  args: ['keydown', ['$event']]
2021
1788
  }] } });
2022
1789
 
2023
- /** Used to generate a unique ID for each datepicker instance. */
2024
1790
  let datetimepickerUid = 0;
2025
- /** Injection token that determines the scroll handling while the calendar is open. */
2026
1791
  const CMAT_DATETIMEPICKER_SCROLL_STRATEGY = new InjectionToken('cmat-datetimepicker-scroll-strategy');
2027
1792
  // eslint-disable-next-line @typescript-eslint/naming-convention
2028
1793
  function CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY(overlay) {
@@ -2035,9 +1800,7 @@ const CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
2035
1800
  };
2036
1801
  class CmatDatetimepickerContentComponent {
2037
1802
  constructor() {
2038
- /** Emits when an animation has finished. */
2039
1803
  this.animationDone = new Subject();
2040
- /** Id of the label for the `role="dialog"` element. */
2041
1804
  this.dialogLabelId = null;
2042
1805
  this._elementRef = inject(ElementRef);
2043
1806
  this._changeDetectorRef = inject(ChangeDetectorRef);
@@ -2063,10 +1826,10 @@ class CmatDatetimepickerContentComponent {
2063
1826
  this.animationDone.complete();
2064
1827
  this._elementRef.nativeElement.removeEventListener('animationend', this._animationEndListener);
2065
1828
  }
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 }); }
1829
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1830
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", 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
1831
  }
2069
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerContentComponent, decorators: [{
1832
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerContentComponent, decorators: [{
2070
1833
  type: Component,
2071
1834
  args: [{ selector: 'cmat-datetimepicker-content', host: {
2072
1835
  'class': 'cmat-datetimepicker-content cmat-datetimepicker-transform-panel',
@@ -2091,27 +1854,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
2091
1854
  }] } });
2092
1855
  class CmatDatetimepickerComponent {
2093
1856
  constructor() {
2094
- /** The view that the calendar should start in. */
2095
1857
  this.startView = 'month';
2096
1858
  this.mode = 'auto';
2097
1859
  this.timeInterval = 1;
2098
- /** Prevent user to select same date time */
2099
1860
  this.preventSameDateTimeSelection = false;
2100
- /** Preferred position of the datetimepicker in the X axis. */
2101
1861
  this.xPosition = 'start';
2102
- /** Preferred position of the datetimepicker in the Y axis. */
2103
1862
  this.yPosition = 'below';
2104
1863
  this.selectedChanged = new EventEmitter();
2105
- /** Emits when the datepicker has been opened. */
2106
1864
  this.openedStream = new EventEmitter();
2107
- /** Emits when the datepicker has been closed. */
2108
1865
  this.closedStream = new EventEmitter();
2109
- /** Emits when the view has been changed. **/
2110
1866
  this.viewChanged = new EventEmitter();
2111
- /** Whether the calendar is open. */
2112
- /** The id for the datepicker calendar. */
2113
1867
  this.id = `cmat-datetimepicker-${datetimepickerUid++}`;
2114
- /** Emits when the datepicker is disabled. */
2115
1868
  this.disabledChange = new Subject();
2116
1869
  this._overlay = inject(Overlay);
2117
1870
  this._injector = inject(Injector);
@@ -2121,9 +1874,7 @@ class CmatDatetimepickerComponent {
2121
1874
  this._dir = inject(Directionality, { optional: true });
2122
1875
  this._document = inject(DOCUMENT, { optional: true });
2123
1876
  this._validSelected = null;
2124
- /** The element that was focused before the datetimepicker was opened. */
2125
1877
  this._focusedElementBeforeOpen = null;
2126
- /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
2127
1878
  this._backdropHarnessClass = `${this.id}-backdrop`;
2128
1879
  this._inputStateChanges = Subscription.EMPTY;
2129
1880
  this._multiYearSelector = false;
@@ -2137,14 +1888,12 @@ class CmatDatetimepickerComponent {
2137
1888
  throw createMissingDateImplError('DatetimeAdapter');
2138
1889
  }
2139
1890
  }
2140
- /** Whether to show multi-year view. */
2141
1891
  get multiYearSelector() {
2142
1892
  return this._multiYearSelector;
2143
1893
  }
2144
1894
  set multiYearSelector(value) {
2145
1895
  this._multiYearSelector = coerceBooleanProperty(value);
2146
1896
  }
2147
- /** Whether the clock uses 12 hour format. */
2148
1897
  // eslint-disable-next-line @typescript-eslint/member-ordering
2149
1898
  get twelvehour() {
2150
1899
  return this._twelvehour;
@@ -2152,10 +1901,6 @@ class CmatDatetimepickerComponent {
2152
1901
  set twelvehour(value) {
2153
1902
  this._twelvehour = coerceBooleanProperty(value);
2154
1903
  }
2155
- /**
2156
- * Classes to be passed to the date picker panel.
2157
- * Supports string and string array values, similar to `ngClass`.
2158
- */
2159
1904
  // eslint-disable-next-line @typescript-eslint/member-ordering
2160
1905
  get panelClass() {
2161
1906
  return this._panelClass;
@@ -2163,7 +1908,6 @@ class CmatDatetimepickerComponent {
2163
1908
  set panelClass(value) {
2164
1909
  this._panelClass = coerceStringArray(value);
2165
1910
  }
2166
- /** Whether the calendar is open. */
2167
1911
  // eslint-disable-next-line @typescript-eslint/member-ordering
2168
1912
  get opened() {
2169
1913
  return this._opened;
@@ -2171,7 +1915,6 @@ class CmatDatetimepickerComponent {
2171
1915
  set opened(value) {
2172
1916
  coerceBooleanProperty(value) ? this.open() : this.close();
2173
1917
  }
2174
- /** Color palette to use on the datetimepicker's calendar. */
2175
1918
  // eslint-disable-next-line @typescript-eslint/member-ordering
2176
1919
  get color() {
2177
1920
  return (this._color ??
@@ -2180,11 +1923,8 @@ class CmatDatetimepickerComponent {
2180
1923
  set color(value) {
2181
1924
  this._color = value;
2182
1925
  }
2183
- /** The date to open the calendar to initially. */
2184
1926
  // eslint-disable-next-line @typescript-eslint/member-ordering
2185
1927
  get startAt() {
2186
- // If an explicit startAt is set we start there, otherwise we start at whatever the currently
2187
- // selected value is.
2188
1928
  return this._startAt ?? (this.datetimepickerInput ? this.datetimepickerInput.value : null);
2189
1929
  }
2190
1930
  set startAt(date) {
@@ -2197,10 +1937,6 @@ class CmatDatetimepickerComponent {
2197
1937
  set type(value) {
2198
1938
  this._type = value || 'datetime';
2199
1939
  }
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
1940
  // eslint-disable-next-line @typescript-eslint/member-ordering
2205
1941
  get timeInput() {
2206
1942
  return this._timeInput && !this.touchUi;
@@ -2208,10 +1944,6 @@ class CmatDatetimepickerComponent {
2208
1944
  set timeInput(value) {
2209
1945
  this._timeInput = coerceBooleanProperty(value);
2210
1946
  }
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
1947
  // eslint-disable-next-line @typescript-eslint/member-ordering
2216
1948
  get touchUi() {
2217
1949
  return this._touchUi;
@@ -2219,7 +1951,6 @@ class CmatDatetimepickerComponent {
2219
1951
  set touchUi(value) {
2220
1952
  this._touchUi = coerceBooleanProperty(value);
2221
1953
  }
2222
- /** Whether the datepicker pop-up should be disabled. */
2223
1954
  // eslint-disable-next-line @typescript-eslint/member-ordering
2224
1955
  get disabled() {
2225
1956
  return this._disabled === undefined && this.datetimepickerInput ?
@@ -2232,11 +1963,6 @@ class CmatDatetimepickerComponent {
2232
1963
  this.disabledChange.next(newValue);
2233
1964
  }
2234
1965
  }
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
1966
  // eslint-disable-next-line @typescript-eslint/member-ordering
2241
1967
  get restoreFocus() {
2242
1968
  return this._restoreFocus;
@@ -2244,7 +1970,6 @@ class CmatDatetimepickerComponent {
2244
1970
  set restoreFocus(value) {
2245
1971
  this._restoreFocus = coerceBooleanProperty(value);
2246
1972
  }
2247
- /** The currently selected date. */
2248
1973
  // eslint-disable-next-line @typescript-eslint/member-ordering
2249
1974
  get selected() {
2250
1975
  return this._validSelected;
@@ -2252,12 +1977,10 @@ class CmatDatetimepickerComponent {
2252
1977
  set selected(value) {
2253
1978
  this._validSelected = value;
2254
1979
  }
2255
- /** The minimum selectable date. */
2256
1980
  // eslint-disable-next-line @typescript-eslint/member-ordering
2257
1981
  get minDate() {
2258
1982
  return this.datetimepickerInput?.min;
2259
1983
  }
2260
- /** The maximum selectable date. */
2261
1984
  // eslint-disable-next-line @typescript-eslint/member-ordering
2262
1985
  get maxDate() {
2263
1986
  return this.datetimepickerInput?.max;
@@ -2272,11 +1995,6 @@ class CmatDatetimepickerComponent {
2272
1995
  this._inputStateChanges.unsubscribe();
2273
1996
  this.disabledChange.complete();
2274
1997
  }
2275
- /**
2276
- * Register an input with this datepicker.
2277
- *
2278
- * @param input The datepicker input to register with this datepicker.
2279
- */
2280
1998
  registerInput(input) {
2281
1999
  if (this.datetimepickerInput) {
2282
2000
  throw Error('A MatDatepicker can only be associated with a single input.');
@@ -2285,7 +2003,6 @@ class CmatDatetimepickerComponent {
2285
2003
  this._inputStateChanges =
2286
2004
  this.datetimepickerInput.valueChange.subscribe((value) => this.selected = value);
2287
2005
  }
2288
- /** Open the calendar. */
2289
2006
  open() {
2290
2007
  if (this.opened || this.disabled) {
2291
2008
  return;
@@ -2298,7 +2015,6 @@ class CmatDatetimepickerComponent {
2298
2015
  this._opened = true;
2299
2016
  this.openedStream.emit();
2300
2017
  }
2301
- /** Close the calendar. */
2302
2018
  close() {
2303
2019
  if (!this._opened) {
2304
2020
  return;
@@ -2307,8 +2023,6 @@ class CmatDatetimepickerComponent {
2307
2023
  this._focusedElementBeforeOpen &&
2308
2024
  typeof this._focusedElementBeforeOpen.focus === 'function';
2309
2025
  const completeClose = () => {
2310
- // The `_opened` could've been reset already if
2311
- // we got two events in quick succession.
2312
2026
  if (this._opened) {
2313
2027
  this._opened = false;
2314
2028
  this.closedStream.emit();
@@ -2319,8 +2033,6 @@ class CmatDatetimepickerComponent {
2319
2033
  instance.startExitAnimation();
2320
2034
  instance.animationDone.pipe(take(1)).subscribe(() => {
2321
2035
  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
2036
  if (canRestoreFocus &&
2325
2037
  (!activeElement ||
2326
2038
  activeElement === this._document.activeElement ||
@@ -2332,18 +2044,12 @@ class CmatDatetimepickerComponent {
2332
2044
  });
2333
2045
  }
2334
2046
  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
2047
  setTimeout(completeClose);
2341
2048
  }
2342
2049
  else {
2343
2050
  completeClose();
2344
2051
  }
2345
2052
  }
2346
- /** Selects the given date */
2347
2053
  select(date) {
2348
2054
  const oldValue = this.selected;
2349
2055
  this.selected = date;
@@ -2354,16 +2060,11 @@ class CmatDatetimepickerComponent {
2354
2060
  viewChange(type) {
2355
2061
  this.viewChanged.emit(type);
2356
2062
  }
2357
- /**
2358
- * relevant values from the datetimepicker to the
2359
- * datetimepicker content inside the overlay.
2360
- */
2361
2063
  _forwardContentValues(instance) {
2362
2064
  instance.datetimepicker = this;
2363
2065
  instance.color = this.color;
2364
2066
  instance.dialogLabelId = this.datetimepickerInput.getOverlayLabelId();
2365
2067
  }
2366
- /** Opens the overlay with the calendar. */
2367
2068
  _openOverlay() {
2368
2069
  this._destroyOverlay();
2369
2070
  const isDialog = this.touchUi;
@@ -2396,25 +2097,21 @@ class CmatDatetimepickerComponent {
2396
2097
  });
2397
2098
  this._componentRef = overlayRef.attach(portal);
2398
2099
  this._forwardContentValues(this._componentRef.instance);
2399
- // Update the position once the calendar has rendered. Only relevant in dropdown mode.
2400
2100
  if (!isDialog) {
2401
2101
  afterNextRender(() => {
2402
2102
  overlayRef.updatePosition();
2403
2103
  }, { injector: this._injector });
2404
2104
  }
2405
2105
  }
2406
- /** Destroys the current overlay. */
2407
2106
  _destroyOverlay() {
2408
2107
  if (this._overlayRef) {
2409
2108
  this._overlayRef.dispose();
2410
2109
  this._overlayRef = this._componentRef = null;
2411
2110
  }
2412
2111
  }
2413
- /** Gets a position strategy that will open the calendar as a dropdown. */
2414
2112
  _getDialogStrategy() {
2415
2113
  return this._overlay.position().global().centerHorizontally().centerVertically();
2416
2114
  }
2417
- /** Gets a position strategy that will open the calendar as a dropdown. */
2418
2115
  _getDropdownStrategy() {
2419
2116
  const strategy = this._overlay
2420
2117
  .position()
@@ -2425,9 +2122,6 @@ class CmatDatetimepickerComponent {
2425
2122
  .withLockedPosition();
2426
2123
  return this._setConnectedPositions(strategy);
2427
2124
  }
2428
- /**
2429
- * Sets the positions of the datetimepicker in dropdown mode based on the current configuration.
2430
- */
2431
2125
  _setConnectedPositions(strategy) {
2432
2126
  const primaryX = this.xPosition === 'end' ? 'end' : 'start';
2433
2127
  const secondaryX = primaryX === 'start' ? 'end' : 'start';
@@ -2460,19 +2154,16 @@ class CmatDatetimepickerComponent {
2460
2154
  },
2461
2155
  ]);
2462
2156
  }
2463
- /** Gets an observable that will emit when the overlay is supposed to be closed. */
2464
2157
  _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)) ||
2158
+ return merge(overlayRef.backdropClick(), overlayRef.detachments(), overlayRef.keydownEvents().pipe(filter(event => ((event.code === 'Escape' && !hasModifierKey(event)) ||
2468
2159
  (this.datetimepickerInput &&
2469
2160
  hasModifierKey(event, 'altKey') &&
2470
2161
  event.code === 'ArrowUp')))));
2471
2162
  }
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 }); }
2163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2164
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", 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
2165
  }
2475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerComponent, decorators: [{
2166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerComponent, decorators: [{
2476
2167
  type: Component,
2477
2168
  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
2169
  }], ctorParameters: () => [], propDecorators: { startView: [{
@@ -2530,11 +2221,6 @@ const CMAT_DATETIMEPICKER_VALIDATORS = {
2530
2221
  useExisting: forwardRef(() => CmatDatetimepickerInputDirective),
2531
2222
  multi: true
2532
2223
  };
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
2224
  class CmatDatetimepickerInputEvent {
2539
2225
  constructor(target, targetElement) {
2540
2226
  this.target = target;
@@ -2542,16 +2228,11 @@ class CmatDatetimepickerInputEvent {
2542
2228
  this.value = this.target.value;
2543
2229
  }
2544
2230
  }
2545
- /** Directive used to connect an input to a MatDatepicker. */
2546
2231
  class CmatDatetimepickerInputDirective {
2547
2232
  constructor() {
2548
- /** Emits when a `change` event is fired on this `<input>`. */
2549
2233
  this.dateChange = new EventEmitter();
2550
- /** Emits when an `input` event is fired on this `<input>`. */
2551
2234
  this.dateInput = new EventEmitter();
2552
- /** Emits when the value changes (either due to user input or programmatic change). */
2553
2235
  this.valueChange = new EventEmitter();
2554
- /** Emits when the disabled state has changed */
2555
2236
  this.disabledChange = new EventEmitter();
2556
2237
  this._elementRef = inject(ElementRef);
2557
2238
  this._dateAdapter = inject(DatetimeAdapter, { optional: true });
@@ -2559,7 +2240,6 @@ class CmatDatetimepickerInputDirective {
2559
2240
  this._formField = inject(MatFormField, { optional: true });
2560
2241
  this._datepickerSubscription = Subscription.EMPTY;
2561
2242
  this._localeSubscription = Subscription.EMPTY;
2562
- /** Whether the last value set on the input was valid. */
2563
2243
  this._lastValueValid = false;
2564
2244
  // eslint-disable-next-line @typescript-eslint/no-empty-function
2565
2245
  this._onTouched = () => { };
@@ -2567,30 +2247,25 @@ class CmatDatetimepickerInputDirective {
2567
2247
  this._cvaOnChange = () => { };
2568
2248
  // eslint-disable-next-line @typescript-eslint/no-empty-function
2569
2249
  this._validatorOnChange = () => { };
2570
- /** The form control validator for whether the input parses. */
2571
2250
  this._parseValidator = () => this._lastValueValid ?
2572
2251
  null : { 'matDatepickerParse': { 'text': this._elementRef.nativeElement.value } };
2573
- /** The form control validator for the min date. */
2574
2252
  this._minValidator = (control) => {
2575
2253
  const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
2576
2254
  return (!this.min || !controlValue ||
2577
2255
  this._dateAdapter.compareDatetime(this.min, controlValue) <= 0) ?
2578
2256
  null : { 'matDatepickerMin': { 'min': this.min, 'actual': controlValue } };
2579
2257
  };
2580
- /** The form control validator for the max date. */
2581
2258
  this._maxValidator = (control) => {
2582
2259
  const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
2583
2260
  return (!this.max || !controlValue ||
2584
2261
  this._dateAdapter.compareDatetime(this.max, controlValue) >= 0) ?
2585
2262
  null : { 'matDatepickerMax': { 'max': this.max, 'actual': controlValue } };
2586
2263
  };
2587
- /** The form control validator for the date filter. */
2588
2264
  this._filterValidator = (control) => {
2589
2265
  const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
2590
2266
  return !this.dateFilter || !controlValue || this.dateFilter(controlValue, CmatDatetimepickerFilterType.DATE) ?
2591
2267
  null : { 'matDatepickerFilter': true };
2592
2268
  };
2593
- /** The combined form control validator for this input. */
2594
2269
  // eslint-disable-next-line @typescript-eslint/member-ordering
2595
2270
  this._validator = Validators.compose([this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator]);
2596
2271
  const _dateAdapter = this._dateAdapter;
@@ -2600,10 +2275,8 @@ class CmatDatetimepickerInputDirective {
2600
2275
  if (!this._dateFormats) {
2601
2276
  throw createMissingDateImplError('CMAT_DATETIME_FORMATS');
2602
2277
  }
2603
- // Update the displayed date when the locale changes.
2604
2278
  this._localeSubscription = _dateAdapter.localeChanges.subscribe();
2605
2279
  }
2606
- /** The datepicker that this input is associated with. */
2607
2280
  set cmatDatetimepicker(value) {
2608
2281
  this._registerDatetimepicker(value);
2609
2282
  }
@@ -2611,7 +2284,6 @@ class CmatDatetimepickerInputDirective {
2611
2284
  this.dateFilter = filter;
2612
2285
  this._validatorOnChange();
2613
2286
  }
2614
- /** The value of the input. */
2615
2287
  // eslint-disable-next-line @typescript-eslint/member-ordering
2616
2288
  get value() {
2617
2289
  return this._value;
@@ -2623,14 +2295,12 @@ class CmatDatetimepickerInputDirective {
2623
2295
  const oldDate = this.value;
2624
2296
  this._value = value;
2625
2297
  this._formatValue(value);
2626
- // use timeout to ensure the datetimepicker is instantiated and we get the correct format
2627
2298
  setTimeout(() => {
2628
2299
  if (!this._dateAdapter.sameDatetime(oldDate, value)) {
2629
2300
  this.valueChange.emit(value);
2630
2301
  }
2631
2302
  });
2632
2303
  }
2633
- /** The minimum valid date. */
2634
2304
  // eslint-disable-next-line @typescript-eslint/member-ordering
2635
2305
  get min() {
2636
2306
  return this._min;
@@ -2639,7 +2309,6 @@ class CmatDatetimepickerInputDirective {
2639
2309
  this._min = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2640
2310
  this._validatorOnChange();
2641
2311
  }
2642
- /** The maximum valid date. */
2643
2312
  // eslint-disable-next-line @typescript-eslint/member-ordering
2644
2313
  get max() {
2645
2314
  return this._max;
@@ -2648,7 +2317,6 @@ class CmatDatetimepickerInputDirective {
2648
2317
  this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2649
2318
  this._validatorOnChange();
2650
2319
  }
2651
- /** Whether the datepicker-input is disabled. */
2652
2320
  // eslint-disable-next-line @typescript-eslint/member-ordering
2653
2321
  get disabled() {
2654
2322
  return !!this._disabled;
@@ -2683,34 +2351,24 @@ class CmatDatetimepickerInputDirective {
2683
2351
  validate(c) {
2684
2352
  return this._validator ? this._validator(c) : null;
2685
2353
  }
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
2354
  getConnectedOverlayOrigin() {
2692
2355
  return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;
2693
2356
  }
2694
- /** Gets the ID of an element that should be used a description for the calendar overlay. */
2695
2357
  getOverlayLabelId() {
2696
2358
  if (this._formField) {
2697
2359
  return this._formField.getLabelId();
2698
2360
  }
2699
2361
  return this._elementRef.nativeElement.getAttribute('aria-labelledby');
2700
2362
  }
2701
- // Implemented as part of ControlValueAccessor
2702
2363
  writeValue(value) {
2703
2364
  this.value = value;
2704
2365
  }
2705
- // Implemented as part of ControlValueAccessor
2706
2366
  registerOnChange(fn) {
2707
2367
  this._cvaOnChange = fn;
2708
2368
  }
2709
- // Implemented as part of ControlValueAccessor
2710
2369
  registerOnTouched(fn) {
2711
2370
  this._onTouched = fn;
2712
2371
  }
2713
- // Implemented as part of ControlValueAccessor
2714
2372
  setDisabledState(disabled) {
2715
2373
  this.disabled = disabled;
2716
2374
  }
@@ -2732,15 +2390,12 @@ class CmatDatetimepickerInputDirective {
2732
2390
  onChange() {
2733
2391
  this.dateChange.emit(new CmatDatetimepickerInputEvent(this, this._elementRef.nativeElement));
2734
2392
  }
2735
- /** Handles blur events on the input. */
2736
2393
  onBlur() {
2737
- // Reformat the input only if we have a valid value.
2738
2394
  if (this.value) {
2739
2395
  this._formatValue(this.value);
2740
2396
  }
2741
2397
  this._onTouched();
2742
2398
  }
2743
- /** Returns the palette used by the input's form field, if any. */
2744
2399
  getThemePalette() {
2745
2400
  return this._formField ? this._formField.color : undefined;
2746
2401
  }
@@ -2786,19 +2441,18 @@ class CmatDatetimepickerInputDirective {
2786
2441
  parseFormat ??= this._dateFormats.parse.dateInput;
2787
2442
  return parseFormat;
2788
2443
  }
2789
- /** Formats a value and sets it on the input element. */
2790
2444
  _formatValue(value) {
2791
2445
  this._elementRef.nativeElement.value =
2792
2446
  value ? this._dateAdapter.format(value, this._getDisplayFormat()) : '';
2793
2447
  }
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: [
2448
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2449
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", 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
2450
  CMAT_DATETIMEPICKER_VALUE_ACCESSOR,
2797
2451
  CMAT_DATETIMEPICKER_VALIDATORS,
2798
2452
  { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: CmatDatetimepickerInputDirective },
2799
2453
  ], exportAs: ["cmatDatepickerInput"], ngImport: i0 }); }
2800
2454
  }
2801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerInputDirective, decorators: [{
2455
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerInputDirective, decorators: [{
2802
2456
  type: Directive,
2803
2457
  args: [{
2804
2458
  selector: 'input[cmatDatetimepicker]',
@@ -2838,12 +2492,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
2838
2492
  type: Input
2839
2493
  }] } });
2840
2494
 
2841
- /** Can be used to override the icon of a `cmatDatetimepickerToggle`. */
2842
2495
  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 }); }
2496
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2497
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: CmatDatetimepickerToggleIconDirective, isStandalone: true, selector: "[cmatDatetimepickerToggleIcon]", ngImport: i0 }); }
2845
2498
  }
2846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, decorators: [{
2499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, decorators: [{
2847
2500
  type: Directive,
2848
2501
  args: [{
2849
2502
  selector: '[cmatDatetimepickerToggleIcon]'
@@ -2856,7 +2509,6 @@ class CmatDatetimepickerToggleComponent {
2856
2509
  this._stateChanges = Subscription.EMPTY;
2857
2510
  this._changeDetectorRef = inject(ChangeDetectorRef);
2858
2511
  }
2859
- /** Whether the toggle button is disabled. */
2860
2512
  get disabled() {
2861
2513
  return this._disabled === undefined ? this.datetimepicker.disabled : !!this._disabled;
2862
2514
  }
@@ -2888,10 +2540,10 @@ class CmatDatetimepickerToggleComponent {
2888
2540
  this._stateChanges = merge([this.intl.changes, datepickerDisabled, inputDisabled])
2889
2541
  .subscribe(() => this._changeDetectorRef.markForCheck());
2890
2542
  }
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 }); }
2543
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2544
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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 }); }
2893
2545
  }
2894
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CmatDatetimepickerToggleComponent, decorators: [{
2546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDatetimepickerToggleComponent, decorators: [{
2895
2547
  type: Component,
2896
2548
  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>" }]
2897
2549
  }], propDecorators: { datetimepicker: [{