@angular/material 21.0.0-next.9 → 21.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/core/tokens/_classes.scss +1 -1
  2. package/core/tokens/m2/_md-sys-color.scss +17 -17
  3. package/fesm2022/_animation-chunk.mjs +10 -16
  4. package/fesm2022/_animation-chunk.mjs.map +1 -1
  5. package/fesm2022/_date-formats-chunk.mjs +68 -164
  6. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  7. package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
  8. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  9. package/fesm2022/_error-options-chunk.mjs +56 -19
  10. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  11. package/fesm2022/_error-state-chunk.mjs +24 -31
  12. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  13. package/fesm2022/_form-field-chunk.mjs +1224 -1017
  14. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  15. package/fesm2022/_icon-button-chunk.mjs +243 -187
  16. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  17. package/fesm2022/_icon-registry-chunk.mjs +350 -575
  18. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  19. package/fesm2022/_input-harness-chunk.mjs +56 -107
  20. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  21. package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
  22. package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
  23. package/fesm2022/_internal-form-field-chunk.mjs +59 -19
  24. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  25. package/fesm2022/_line-chunk.mjs +83 -43
  26. package/fesm2022/_line-chunk.mjs.map +1 -1
  27. package/fesm2022/_option-chunk.mjs +348 -311
  28. package/fesm2022/_option-chunk.mjs.map +1 -1
  29. package/fesm2022/_option-harness-chunk.mjs +23 -39
  30. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  31. package/fesm2022/_option-module-chunk.mjs +36 -10
  32. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  33. package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
  34. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  35. package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
  36. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  37. package/fesm2022/_public-api-chunk.mjs +71 -134
  38. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  39. package/fesm2022/_ripple-chunk.mjs +504 -600
  40. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  41. package/fesm2022/_ripple-loader-chunk.mjs +120 -138
  42. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  43. package/fesm2022/_ripple-module-chunk.mjs +36 -10
  44. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  45. package/fesm2022/_structural-styles-chunk.mjs +37 -10
  46. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  47. package/fesm2022/_tooltip-chunk.mjs +810 -888
  48. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  49. package/fesm2022/autocomplete-testing.mjs +62 -86
  50. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  51. package/fesm2022/autocomplete.mjs +965 -1126
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge-testing.mjs +38 -54
  54. package/fesm2022/badge-testing.mjs.map +1 -1
  55. package/fesm2022/badge.mjs +321 -272
  56. package/fesm2022/badge.mjs.map +1 -1
  57. package/fesm2022/bottom-sheet-testing.mjs +10 -24
  58. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  59. package/fesm2022/bottom-sheet.mjs +349 -344
  60. package/fesm2022/bottom-sheet.mjs.map +1 -1
  61. package/fesm2022/button-testing.mjs +60 -94
  62. package/fesm2022/button-testing.mjs.map +1 -1
  63. package/fesm2022/button-toggle-testing.mjs +76 -125
  64. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  65. package/fesm2022/button-toggle.mjs +752 -662
  66. package/fesm2022/button-toggle.mjs.map +1 -1
  67. package/fesm2022/button.mjs +263 -158
  68. package/fesm2022/button.mjs.map +1 -1
  69. package/fesm2022/card-testing.mjs +19 -33
  70. package/fesm2022/card-testing.mjs.map +1 -1
  71. package/fesm2022/card.mjs +576 -272
  72. package/fesm2022/card.mjs.map +1 -1
  73. package/fesm2022/checkbox-testing.mjs +71 -123
  74. package/fesm2022/checkbox-testing.mjs.map +1 -1
  75. package/fesm2022/checkbox.mjs +515 -477
  76. package/fesm2022/checkbox.mjs.map +1 -1
  77. package/fesm2022/chips-testing.mjs +201 -344
  78. package/fesm2022/chips-testing.mjs.map +1 -1
  79. package/fesm2022/chips.mjs +2552 -2289
  80. package/fesm2022/chips.mjs.map +1 -1
  81. package/fesm2022/core-testing.mjs +14 -28
  82. package/fesm2022/core-testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +357 -328
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/datepicker-testing.mjs +15 -25
  86. package/fesm2022/datepicker-testing.mjs.map +1 -1
  87. package/fesm2022/datepicker.mjs +4826 -4563
  88. package/fesm2022/datepicker.mjs.map +1 -1
  89. package/fesm2022/dialog-testing.mjs +93 -129
  90. package/fesm2022/dialog-testing.mjs.map +1 -1
  91. package/fesm2022/dialog.mjs +810 -829
  92. package/fesm2022/dialog.mjs.map +1 -1
  93. package/fesm2022/divider-testing.mjs +10 -11
  94. package/fesm2022/divider-testing.mjs.map +1 -1
  95. package/fesm2022/divider.mjs +119 -43
  96. package/fesm2022/divider.mjs.map +1 -1
  97. package/fesm2022/expansion-testing.mjs +74 -130
  98. package/fesm2022/expansion-testing.mjs.map +1 -1
  99. package/fesm2022/expansion.mjs +703 -515
  100. package/fesm2022/expansion.mjs.map +1 -1
  101. package/fesm2022/form-field-testing-control.mjs +16 -33
  102. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  103. package/fesm2022/form-field-testing.mjs +118 -179
  104. package/fesm2022/form-field-testing.mjs.map +1 -1
  105. package/fesm2022/form-field.mjs +36 -10
  106. package/fesm2022/form-field.mjs.map +1 -1
  107. package/fesm2022/grid-list-testing.mjs +65 -113
  108. package/fesm2022/grid-list-testing.mjs.map +1 -1
  109. package/fesm2022/grid-list.mjs +559 -494
  110. package/fesm2022/grid-list.mjs.map +1 -1
  111. package/fesm2022/icon-testing.mjs +148 -127
  112. package/fesm2022/icon-testing.mjs.map +1 -1
  113. package/fesm2022/icon.mjs +325 -351
  114. package/fesm2022/icon.mjs.map +1 -1
  115. package/fesm2022/input-testing.mjs +59 -99
  116. package/fesm2022/input-testing.mjs.map +1 -1
  117. package/fesm2022/input.mjs +457 -520
  118. package/fesm2022/input.mjs.map +1 -1
  119. package/fesm2022/list-testing.mjs +251 -434
  120. package/fesm2022/list-testing.mjs.map +1 -1
  121. package/fesm2022/list.mjs +1522 -1204
  122. package/fesm2022/list.mjs.map +1 -1
  123. package/fesm2022/material.mjs +0 -5
  124. package/fesm2022/material.mjs.map +1 -1
  125. package/fesm2022/menu-testing.mjs +159 -228
  126. package/fesm2022/menu-testing.mjs.map +1 -1
  127. package/fesm2022/menu.mjs +1338 -1343
  128. package/fesm2022/menu.mjs.map +1 -1
  129. package/fesm2022/paginator-testing.mjs +55 -79
  130. package/fesm2022/paginator-testing.mjs.map +1 -1
  131. package/fesm2022/paginator.mjs +381 -309
  132. package/fesm2022/paginator.mjs.map +1 -1
  133. package/fesm2022/progress-bar-testing.mjs +12 -21
  134. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  135. package/fesm2022/progress-bar.mjs +224 -169
  136. package/fesm2022/progress-bar.mjs.map +1 -1
  137. package/fesm2022/progress-spinner-testing.mjs +13 -23
  138. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  139. package/fesm2022/progress-spinner.mjs +235 -160
  140. package/fesm2022/progress-spinner.mjs.map +1 -1
  141. package/fesm2022/radio-testing.mjs +133 -208
  142. package/fesm2022/radio-testing.mjs.map +1 -1
  143. package/fesm2022/radio.mjs +712 -679
  144. package/fesm2022/radio.mjs.map +1 -1
  145. package/fesm2022/select-testing.mjs +83 -117
  146. package/fesm2022/select-testing.mjs.map +1 -1
  147. package/fesm2022/select.mjs +1116 -1246
  148. package/fesm2022/select.mjs.map +1 -1
  149. package/fesm2022/sidenav-testing.mjs +54 -120
  150. package/fesm2022/sidenav-testing.mjs.map +1 -1
  151. package/fesm2022/sidenav.mjs +1078 -995
  152. package/fesm2022/sidenav.mjs.map +1 -1
  153. package/fesm2022/slide-toggle-testing.mjs +57 -92
  154. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  155. package/fesm2022/slide-toggle.mjs +369 -279
  156. package/fesm2022/slide-toggle.mjs.map +1 -1
  157. package/fesm2022/slider-testing.mjs +90 -138
  158. package/fesm2022/slider-testing.mjs.map +1 -1
  159. package/fesm2022/slider.mjs +1651 -1716
  160. package/fesm2022/slider.mjs.map +1 -1
  161. package/fesm2022/snack-bar-testing.mjs +40 -87
  162. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  163. package/fesm2022/snack-bar.mjs +763 -714
  164. package/fesm2022/snack-bar.mjs.map +1 -1
  165. package/fesm2022/sort-testing.mjs +45 -66
  166. package/fesm2022/sort-testing.mjs.map +1 -1
  167. package/fesm2022/sort.mjs +419 -344
  168. package/fesm2022/sort.mjs.map +1 -1
  169. package/fesm2022/stepper-testing.mjs +78 -154
  170. package/fesm2022/stepper-testing.mjs.map +1 -1
  171. package/fesm2022/stepper.mjs +790 -498
  172. package/fesm2022/stepper.mjs.map +1 -1
  173. package/fesm2022/table-testing.mjs +120 -213
  174. package/fesm2022/table-testing.mjs.map +1 -1
  175. package/fesm2022/table.mjs +1026 -684
  176. package/fesm2022/table.mjs.map +1 -1
  177. package/fesm2022/tabs-testing.mjs +125 -197
  178. package/fesm2022/tabs-testing.mjs.map +1 -1
  179. package/fesm2022/tabs.mjs +2351 -2028
  180. package/fesm2022/tabs.mjs.map +1 -1
  181. package/fesm2022/timepicker-testing.mjs +113 -172
  182. package/fesm2022/timepicker-testing.mjs.map +1 -1
  183. package/fesm2022/timepicker.mjs +1019 -826
  184. package/fesm2022/timepicker.mjs.map +1 -1
  185. package/fesm2022/toolbar-testing.mjs +16 -27
  186. package/fesm2022/toolbar-testing.mjs.map +1 -1
  187. package/fesm2022/toolbar.mjs +163 -78
  188. package/fesm2022/toolbar.mjs.map +1 -1
  189. package/fesm2022/tooltip-testing.mjs +41 -52
  190. package/fesm2022/tooltip-testing.mjs.map +1 -1
  191. package/fesm2022/tooltip.mjs +36 -10
  192. package/fesm2022/tooltip.mjs.map +1 -1
  193. package/fesm2022/tree-testing.mjs +86 -162
  194. package/fesm2022/tree-testing.mjs.map +1 -1
  195. package/fesm2022/tree.mjs +638 -466
  196. package/fesm2022/tree.mjs.map +1 -1
  197. package/package.json +2 -2
  198. package/schematics/ng-add/index.js +1 -1
  199. package/types/expansion.d.ts +4 -2
  200. package/types/menu-testing.d.ts +2 -0
  201. package/types/select.d.ts +1 -1
  202. package/types/timepicker.d.ts +1 -0
@@ -306,7 +306,7 @@
306
306
 
307
307
  // Sets the border radius to extra small. Use for components that need a small amount of rounding,
308
308
  // such as a chip. In Angular Material, this is used for the shape of a snackbar and a tooltip.
309
- .mat-corner-extra-sm {
309
+ .mat-corner-xs {
310
310
  border-radius: var(--mat-sys-corner-extra-small);
311
311
  }
312
312
 
@@ -1,6 +1,6 @@
1
- @use 'sass:map';
2
1
  @use '../../m2/palette';
3
2
  @use './md-sys-color-internal';
3
+ @use 'sass:map';
4
4
 
5
5
  @function md-sys-color-values-dark($palettes) {
6
6
  $values: (
@@ -23,24 +23,24 @@
23
23
  inverse-on-surface: rgba(black, 0.87),
24
24
  outline: rgba(white, 0.12),
25
25
  outline-variant: rgba(white, 0.38),
26
- error-container: map.get($palettes, warn, default),
26
+ error-container: map.get($palettes, warn, 900),
27
27
  on-background: white,
28
- on-error-container: map.get($palettes, warn, default-contrast),
29
- on-primary-container: map.get($palettes, primary, default-contrast),
28
+ on-error-container: map.get($palettes, warn, 50),
29
+ on-primary-container: map.get($palettes, primary, 50),
30
30
  on-primary-fixed: map.get($palettes, primary, default-contrast),
31
31
  on-primary-fixed-variant: map.get($palettes, primary, default-contrast),
32
- on-secondary-container: map.get($palettes, accent, default-contrast),
32
+ on-secondary-container: map.get($palettes, accent, 50),
33
33
  on-secondary-fixed: map.get($palettes, accent, default-contrast),
34
34
  on-secondary-fixed-variant: map.get($palettes, accent, default-contrast),
35
35
  on-tertiary: map.get($palettes, accent, default-contrast),
36
- on-tertiary-container: map.get($palettes, accent, default-contrast),
36
+ on-tertiary-container: map.get($palettes, accent, 50),
37
37
  on-tertiary-fixed: map.get($palettes, accent, default-contrast),
38
38
  on-tertiary-fixed-variant: map.get($palettes, accent, default-contrast),
39
- primary-container: map.get($palettes, primary, default),
39
+ primary-container: map.get($palettes, primary, 900),
40
40
  primary-fixed: map.get($palettes, primary, default),
41
41
  primary-fixed-dim: map.get($palettes, primary, default),
42
42
  scrim: black,
43
- secondary-container: map.get($palettes, accent, default),
43
+ secondary-container: map.get($palettes, accent, 900),
44
44
  secondary-fixed: map.get($palettes, accent, default),
45
45
  secondary-fixed-dim: map.get($palettes, accent, default),
46
46
  surface-bright: map.get(palette.$grey-palette, 800),
@@ -52,7 +52,7 @@
52
52
  surface-dim: map.get(palette.$grey-palette, 800),
53
53
  surface-tint: map.get(palette.$grey-palette, 800),
54
54
  tertiary: map.get($palettes, accent, default),
55
- tertiary-container: map.get($palettes, accent, default),
55
+ tertiary-container: map.get($palettes, accent, 900),
56
56
  tertiary-fixed: map.get($palettes, accent, default),
57
57
  tertiary-fixed-dim: map.get($palettes, accent, default),
58
58
  );
@@ -83,24 +83,24 @@
83
83
  inverse-on-surface: white,
84
84
  outline: rgba(black, 0.12),
85
85
  outline-variant: rgba(black, 0.38),
86
- error-container: map.get($palettes, warn, default),
86
+ error-container: map.get($palettes, warn, 50),
87
87
  on-background: rgba(black, 0.87),
88
- on-error-container: map.get($palettes, warn, default-contrast),
89
- on-primary-container: map.get($palettes, primary, default-contrast),
88
+ on-error-container: map.get($palettes, warn, 700),
89
+ on-primary-container: map.get($palettes, primary, 700),
90
90
  on-primary-fixed: map.get($palettes, primary, default-contrast),
91
91
  on-primary-fixed-variant: map.get($palettes, primary, default-contrast),
92
- on-secondary-container: map.get($palettes, accent, default-contrast),
92
+ on-secondary-container: map.get($palettes, accent, 700),
93
93
  on-secondary-fixed: map.get($palettes, accent, default-contrast),
94
94
  on-secondary-fixed-variant: map.get($palettes, accent, default-contrast),
95
95
  on-tertiary: map.get($palettes, accent, default-contrast),
96
- on-tertiary-container: map.get($palettes, accent, default-contrast),
96
+ on-tertiary-container: map.get($palettes, accent, 700),
97
97
  on-tertiary-fixed: map.get($palettes, accent, default-contrast),
98
98
  on-tertiary-fixed-variant: map.get($palettes, accent, default-contrast),
99
- primary-container: map.get($palettes, primary, default),
99
+ primary-container: map.get($palettes, primary, 50),
100
100
  primary-fixed: map.get($palettes, primary, default),
101
101
  primary-fixed-dim: map.get($palettes, primary, default),
102
102
  scrim: black,
103
- secondary-container: map.get($palettes, accent, default),
103
+ secondary-container: map.get($palettes, accent, 50),
104
104
  secondary-fixed: map.get($palettes, accent, default),
105
105
  secondary-fixed-dim: map.get($palettes, accent, default),
106
106
  surface-bright: white,
@@ -112,7 +112,7 @@
112
112
  surface-dim: white,
113
113
  surface-tint: white,
114
114
  tertiary: map.get($palettes, accent, default),
115
- tertiary-container: map.get($palettes, accent, default),
115
+ tertiary-container: map.get($palettes, accent, 50),
116
116
  tertiary-fixed: map.get($palettes, accent, default),
117
117
  tertiary-fixed-dim: map.get($palettes, accent, default),
118
118
  );
@@ -1,27 +1,21 @@
1
1
  import { MediaMatcher } from '@angular/cdk/layout';
2
2
  import { InjectionToken, inject, ANIMATION_MODULE_TYPE } from '@angular/core';
3
3
 
4
- /** Injection token used to configure the animations in Angular Material. */
5
4
  const MATERIAL_ANIMATIONS = new InjectionToken('MATERIAL_ANIMATIONS');
6
5
  let reducedMotion = null;
7
- /**
8
- * Gets the the configured animations state.
9
- * @docs-private
10
- */
11
6
  function _getAnimationsState() {
12
- if (inject(MATERIAL_ANIMATIONS, { optional: true })?.animationsDisabled ||
13
- inject(ANIMATION_MODULE_TYPE, { optional: true }) === 'NoopAnimations') {
14
- return 'di-disabled';
15
- }
16
- reducedMotion ??= inject(MediaMatcher).matchMedia('(prefers-reduced-motion)').matches;
17
- return reducedMotion ? 'reduced-motion' : 'enabled';
7
+ if (inject(MATERIAL_ANIMATIONS, {
8
+ optional: true
9
+ })?.animationsDisabled || inject(ANIMATION_MODULE_TYPE, {
10
+ optional: true
11
+ }) === 'NoopAnimations') {
12
+ return 'di-disabled';
13
+ }
14
+ reducedMotion ??= inject(MediaMatcher).matchMedia('(prefers-reduced-motion)').matches;
15
+ return reducedMotion ? 'reduced-motion' : 'enabled';
18
16
  }
19
- /**
20
- * Returns whether animations have been disabled by DI. Must be called in a DI context.
21
- * @docs-private
22
- */
23
17
  function _animationsDisabled() {
24
- return _getAnimationsState() !== 'enabled';
18
+ return _getAnimationsState() !== 'enabled';
25
19
  }
26
20
 
27
21
  export { MATERIAL_ANIMATIONS, _animationsDisabled, _getAnimationsState };
@@ -1 +1 @@
1
- {"version":3,"file":"_animation-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/core/animation/animation.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {MediaMatcher} from '@angular/cdk/layout';\nimport {ANIMATION_MODULE_TYPE, inject, InjectionToken} from '@angular/core';\n\n/** Object used to configure the animation in Angular Material. */\nexport interface AnimationsConfig {\n /** Whether all animations should be disabled. */\n animationsDisabled?: boolean;\n}\n\n/** Injection token used to configure the animations in Angular Material. */\nexport const MATERIAL_ANIMATIONS = new InjectionToken<AnimationsConfig>('MATERIAL_ANIMATIONS');\n\nlet reducedMotion: boolean | null = null;\n\n/**\n * Gets the the configured animations state.\n * @docs-private\n */\nexport function _getAnimationsState(): 'enabled' | 'di-disabled' | 'reduced-motion' {\n if (\n inject(MATERIAL_ANIMATIONS, {optional: true})?.animationsDisabled ||\n inject(ANIMATION_MODULE_TYPE, {optional: true}) === 'NoopAnimations'\n ) {\n return 'di-disabled';\n }\n\n reducedMotion ??= inject(MediaMatcher).matchMedia('(prefers-reduced-motion)').matches;\n return reducedMotion ? 'reduced-motion' : 'enabled';\n}\n\n/**\n * Returns whether animations have been disabled by DI. Must be called in a DI context.\n * @docs-private\n */\nexport function _animationsDisabled(): boolean {\n return _getAnimationsState() !== 'enabled';\n}\n"],"names":[],"mappings":";;;AAiBA;MACa,mBAAmB,GAAG,IAAI,cAAc,CAAmB,qBAAqB;AAE7F,IAAI,aAAa,GAAmB,IAAI;AAExC;;;AAGG;SACa,mBAAmB,GAAA;IACjC,IACE,MAAM,CAAC,mBAAmB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,EAAE,kBAAkB;AACjE,QAAA,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,KAAK,gBAAgB,EACpE;AACA,QAAA,OAAO,aAAa;;AAGtB,IAAA,aAAa,KAAK,MAAM,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,OAAO;IACrF,OAAO,aAAa,GAAG,gBAAgB,GAAG,SAAS;AACrD;AAEA;;;AAGG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,mBAAmB,EAAE,KAAK,SAAS;AAC5C;;;;"}
1
+ {"version":3,"file":"_animation-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/core/animation/animation.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {MediaMatcher} from '@angular/cdk/layout';\nimport {ANIMATION_MODULE_TYPE, inject, InjectionToken} from '@angular/core';\n\n/** Object used to configure the animation in Angular Material. */\nexport interface AnimationsConfig {\n /** Whether all animations should be disabled. */\n animationsDisabled?: boolean;\n}\n\n/** Injection token used to configure the animations in Angular Material. */\nexport const MATERIAL_ANIMATIONS = new InjectionToken<AnimationsConfig>('MATERIAL_ANIMATIONS');\n\nlet reducedMotion: boolean | null = null;\n\n/**\n * Gets the the configured animations state.\n * @docs-private\n */\nexport function _getAnimationsState(): 'enabled' | 'di-disabled' | 'reduced-motion' {\n if (\n inject(MATERIAL_ANIMATIONS, {optional: true})?.animationsDisabled ||\n inject(ANIMATION_MODULE_TYPE, {optional: true}) === 'NoopAnimations'\n ) {\n return 'di-disabled';\n }\n\n reducedMotion ??= inject(MediaMatcher).matchMedia('(prefers-reduced-motion)').matches;\n return reducedMotion ? 'reduced-motion' : 'enabled';\n}\n\n/**\n * Returns whether animations have been disabled by DI. Must be called in a DI context.\n * @docs-private\n */\nexport function _animationsDisabled(): boolean {\n return _getAnimationsState() !== 'enabled';\n}\n"],"names":["_getAnimationsState","inject","ANIMATION_MODULE_TYPE","optional"],"mappings":";;;;;AAsCA,SAAAA,mBAAA,GAAA;;;4BAGGC,MAAA,CAAAC,qBAAA,EAAA;IAAAC,QAAA,EAAA;AAAA,GAAA,CAAA,KAAA,gBAAA,EAAA;AAED,IAAA,OAAA,aAAA;;;;;;;;;;;"}
@@ -1,179 +1,83 @@
1
1
  import { InjectionToken, inject, LOCALE_ID } from '@angular/core';
2
2
  import { Subject } from 'rxjs';
3
3
 
4
- /** InjectionToken for datepicker that can be used to override default locale code. */
5
4
  const MAT_DATE_LOCALE = new InjectionToken('MAT_DATE_LOCALE', {
6
- providedIn: 'root',
7
- factory: () => inject(LOCALE_ID),
5
+ providedIn: 'root',
6
+ factory: () => inject(LOCALE_ID)
8
7
  });
9
8
  const NOT_IMPLEMENTED = 'Method not implemented';
10
- /** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */
11
9
  class DateAdapter {
12
- /** The locale to use for all dates. */
13
- locale;
14
- _localeChanges = new Subject();
15
- /** A stream that emits when the locale changes. */
16
- localeChanges = this._localeChanges;
17
- /**
18
- * Sets the time of one date to the time of another.
19
- * @param target Date whose time will be set.
20
- * @param hours New hours to set on the date object.
21
- * @param minutes New minutes to set on the date object.
22
- * @param seconds New seconds to set on the date object.
23
- */
24
- setTime(target, hours, minutes, seconds) {
25
- throw new Error(NOT_IMPLEMENTED);
10
+ locale;
11
+ _localeChanges = new Subject();
12
+ localeChanges = this._localeChanges;
13
+ setTime(target, hours, minutes, seconds) {
14
+ throw new Error(NOT_IMPLEMENTED);
15
+ }
16
+ getHours(date) {
17
+ throw new Error(NOT_IMPLEMENTED);
18
+ }
19
+ getMinutes(date) {
20
+ throw new Error(NOT_IMPLEMENTED);
21
+ }
22
+ getSeconds(date) {
23
+ throw new Error(NOT_IMPLEMENTED);
24
+ }
25
+ parseTime(value, parseFormat) {
26
+ throw new Error(NOT_IMPLEMENTED);
27
+ }
28
+ addSeconds(date, amount) {
29
+ throw new Error(NOT_IMPLEMENTED);
30
+ }
31
+ getValidDateOrNull(obj) {
32
+ return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;
33
+ }
34
+ deserialize(value) {
35
+ if (value == null || this.isDateInstance(value) && this.isValid(value)) {
36
+ return value;
26
37
  }
27
- /**
28
- * Gets the hours component of the given date.
29
- * @param date The date to extract the hours from.
30
- */
31
- getHours(date) {
32
- throw new Error(NOT_IMPLEMENTED);
38
+ return this.invalid();
39
+ }
40
+ setLocale(locale) {
41
+ this.locale = locale;
42
+ this._localeChanges.next();
43
+ }
44
+ compareDate(first, second) {
45
+ return this.getYear(first) - this.getYear(second) || this.getMonth(first) - this.getMonth(second) || this.getDate(first) - this.getDate(second);
46
+ }
47
+ compareTime(first, second) {
48
+ return this.getHours(first) - this.getHours(second) || this.getMinutes(first) - this.getMinutes(second) || this.getSeconds(first) - this.getSeconds(second);
49
+ }
50
+ sameDate(first, second) {
51
+ if (first && second) {
52
+ let firstValid = this.isValid(first);
53
+ let secondValid = this.isValid(second);
54
+ if (firstValid && secondValid) {
55
+ return !this.compareDate(first, second);
56
+ }
57
+ return firstValid == secondValid;
33
58
  }
34
- /**
35
- * Gets the minutes component of the given date.
36
- * @param date The date to extract the minutes from.
37
- */
38
- getMinutes(date) {
39
- throw new Error(NOT_IMPLEMENTED);
59
+ return first == second;
60
+ }
61
+ sameTime(first, second) {
62
+ if (first && second) {
63
+ const firstValid = this.isValid(first);
64
+ const secondValid = this.isValid(second);
65
+ if (firstValid && secondValid) {
66
+ return !this.compareTime(first, second);
67
+ }
68
+ return firstValid == secondValid;
40
69
  }
41
- /**
42
- * Gets the seconds component of the given date.
43
- * @param date The date to extract the seconds from.
44
- */
45
- getSeconds(date) {
46
- throw new Error(NOT_IMPLEMENTED);
70
+ return first == second;
71
+ }
72
+ clampDate(date, min, max) {
73
+ if (min && this.compareDate(date, min) < 0) {
74
+ return min;
47
75
  }
48
- /**
49
- * Parses a date with a specific time from a user-provided value.
50
- * @param value The value to parse.
51
- * @param parseFormat The expected format of the value being parsed
52
- * (type is implementation-dependent).
53
- */
54
- parseTime(value, parseFormat) {
55
- throw new Error(NOT_IMPLEMENTED);
56
- }
57
- /**
58
- * Adds an amount of seconds to the specified date.
59
- * @param date Date to which to add the seconds.
60
- * @param amount Amount of seconds to add to the date.
61
- */
62
- addSeconds(date, amount) {
63
- throw new Error(NOT_IMPLEMENTED);
64
- }
65
- /**
66
- * Given a potential date object, returns that same date object if it is
67
- * a valid date, or `null` if it's not a valid date.
68
- * @param obj The object to check.
69
- * @returns A date or `null`.
70
- */
71
- getValidDateOrNull(obj) {
72
- return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;
73
- }
74
- /**
75
- * Attempts to deserialize a value to a valid date object. This is different from parsing in that
76
- * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
77
- * string). The default implementation does not allow any deserialization, it simply checks that
78
- * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
79
- * method on all of its `@Input()` properties that accept dates. It is therefore possible to
80
- * support passing values from your backend directly to these properties by overriding this method
81
- * to also deserialize the format used by your backend.
82
- * @param value The value to be deserialized into a date object.
83
- * @returns The deserialized date object, either a valid date, null if the value can be
84
- * deserialized into a null date (e.g. the empty string), or an invalid date.
85
- */
86
- deserialize(value) {
87
- if (value == null || (this.isDateInstance(value) && this.isValid(value))) {
88
- return value;
89
- }
90
- return this.invalid();
91
- }
92
- /**
93
- * Sets the locale used for all dates.
94
- * @param locale The new locale.
95
- */
96
- setLocale(locale) {
97
- this.locale = locale;
98
- this._localeChanges.next();
99
- }
100
- /**
101
- * Compares two dates.
102
- * @param first The first date to compare.
103
- * @param second The second date to compare.
104
- * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,
105
- * a number greater than 0 if the first date is later.
106
- */
107
- compareDate(first, second) {
108
- return (this.getYear(first) - this.getYear(second) ||
109
- this.getMonth(first) - this.getMonth(second) ||
110
- this.getDate(first) - this.getDate(second));
111
- }
112
- /**
113
- * Compares the time values of two dates.
114
- * @param first First date to compare.
115
- * @param second Second date to compare.
116
- * @returns 0 if the times are equal, a number less than 0 if the first time is earlier,
117
- * a number greater than 0 if the first time is later.
118
- */
119
- compareTime(first, second) {
120
- return (this.getHours(first) - this.getHours(second) ||
121
- this.getMinutes(first) - this.getMinutes(second) ||
122
- this.getSeconds(first) - this.getSeconds(second));
123
- }
124
- /**
125
- * Checks if two dates are equal.
126
- * @param first The first date to check.
127
- * @param second The second date to check.
128
- * @returns Whether the two dates are equal.
129
- * Null dates are considered equal to other null dates.
130
- */
131
- sameDate(first, second) {
132
- if (first && second) {
133
- let firstValid = this.isValid(first);
134
- let secondValid = this.isValid(second);
135
- if (firstValid && secondValid) {
136
- return !this.compareDate(first, second);
137
- }
138
- return firstValid == secondValid;
139
- }
140
- return first == second;
141
- }
142
- /**
143
- * Checks if the times of two dates are equal.
144
- * @param first The first date to check.
145
- * @param second The second date to check.
146
- * @returns Whether the times of the two dates are equal.
147
- * Null dates are considered equal to other null dates.
148
- */
149
- sameTime(first, second) {
150
- if (first && second) {
151
- const firstValid = this.isValid(first);
152
- const secondValid = this.isValid(second);
153
- if (firstValid && secondValid) {
154
- return !this.compareTime(first, second);
155
- }
156
- return firstValid == secondValid;
157
- }
158
- return first == second;
159
- }
160
- /**
161
- * Clamp the given date between min and max dates.
162
- * @param date The date to clamp.
163
- * @param min The minimum value to allow. If null or omitted no min is enforced.
164
- * @param max The maximum value to allow. If null or omitted no max is enforced.
165
- * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,
166
- * otherwise `date`.
167
- */
168
- clampDate(date, min, max) {
169
- if (min && this.compareDate(date, min) < 0) {
170
- return min;
171
- }
172
- if (max && this.compareDate(date, max) > 0) {
173
- return max;
174
- }
175
- return date;
76
+ if (max && this.compareDate(date, max) > 0) {
77
+ return max;
176
78
  }
79
+ return date;
80
+ }
177
81
  }
178
82
 
179
83
  const MAT_DATE_FORMATS = new InjectionToken('mat-date-formats');
@@ -1 +1 @@
1
- {"version":3,"file":"_date-formats-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/core/datetime/date-adapter.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/core/datetime/date-formats.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, InjectionToken, LOCALE_ID} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\n/** InjectionToken for datepicker that can be used to override default locale code. */\nexport const MAT_DATE_LOCALE = new InjectionToken<{}>('MAT_DATE_LOCALE', {\n providedIn: 'root',\n factory: () => inject(LOCALE_ID),\n});\n\nconst NOT_IMPLEMENTED = 'Method not implemented';\n\n/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */\nexport abstract class DateAdapter<D, L = any> {\n /** The locale to use for all dates. */\n protected locale: L;\n protected readonly _localeChanges = new Subject<void>();\n\n /** A stream that emits when the locale changes. */\n readonly localeChanges: Observable<void> = this._localeChanges;\n\n /**\n * Gets the year component of the given date.\n * @param date The date to extract the year from.\n * @returns The year component.\n */\n abstract getYear(date: D): number;\n\n /**\n * Gets the month component of the given date.\n * @param date The date to extract the month from.\n * @returns The month component (0-indexed, 0 = January).\n */\n abstract getMonth(date: D): number;\n\n /**\n * Gets the date of the month component of the given date.\n * @param date The date to extract the date of the month from.\n * @returns The month component (1-indexed, 1 = first of month).\n */\n abstract getDate(date: D): number;\n\n /**\n * Gets the day of the week component of the given date.\n * @param date The date to extract the day of the week from.\n * @returns The month component (0-indexed, 0 = Sunday).\n */\n abstract getDayOfWeek(date: D): number;\n\n /**\n * Gets a list of names for the months.\n * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').\n * @returns An ordered list of all month names, starting with January.\n */\n abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];\n\n /**\n * Gets a list of names for the dates of the month.\n * @returns An ordered list of all date of the month names, starting with '1'.\n */\n abstract getDateNames(): string[];\n\n /**\n * Gets a list of names for the days of the week.\n * @param style The naming style (e.g. long = 'Sunday', short = 'Sun', narrow = 'S').\n * @returns An ordered list of all weekday names, starting with Sunday.\n */\n abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];\n\n /**\n * Gets the name for the year of the given date.\n * @param date The date to get the year name for.\n * @returns The name of the given year (e.g. '2017').\n */\n abstract getYearName(date: D): string;\n\n /**\n * Gets the first day of the week.\n * @returns The first day of the week (0-indexed, 0 = Sunday).\n */\n abstract getFirstDayOfWeek(): number;\n\n /**\n * Gets the number of days in the month of the given date.\n * @param date The date whose month should be checked.\n * @returns The number of days in the month of the given date.\n */\n abstract getNumDaysInMonth(date: D): number;\n\n /**\n * Clones the given date.\n * @param date The date to clone\n * @returns A new date equal to the given date.\n */\n abstract clone(date: D): D;\n\n /**\n * Creates a date with the given year, month, and date. Does not allow over/under-flow of the\n * month and date.\n * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989).\n * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.\n * @param date The date of month of the date. Must be an integer 1 - length of the given month.\n * @returns The new date, or null if invalid.\n */\n abstract createDate(year: number, month: number, date: number): D;\n\n /**\n * Gets today's date.\n * @returns Today's date.\n */\n abstract today(): D;\n\n /**\n * Parses a date from a user-provided value.\n * @param value The value to parse.\n * @param parseFormat The expected format of the value being parsed\n * (type is implementation-dependent).\n * @returns The parsed date.\n */\n abstract parse(value: any, parseFormat: any): D | null;\n\n /**\n * Formats a date as a string according to the given format.\n * @param date The value to format.\n * @param displayFormat The format to use to display the date as a string.\n * @returns The formatted date string.\n */\n abstract format(date: D, displayFormat: any): string;\n\n /**\n * Adds the given number of years to the date. Years are counted as if flipping 12 pages on the\n * calendar for each year and then finding the closest date in the new month. For example when\n * adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.\n * @param date The date to add years to.\n * @param years The number of years to add (may be negative).\n * @returns A new date equal to the given one with the specified number of years added.\n */\n abstract addCalendarYears(date: D, years: number): D;\n\n /**\n * Adds the given number of months to the date. Months are counted as if flipping a page on the\n * calendar for each month and then finding the closest date in the new month. For example when\n * adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.\n * @param date The date to add months to.\n * @param months The number of months to add (may be negative).\n * @returns A new date equal to the given one with the specified number of months added.\n */\n abstract addCalendarMonths(date: D, months: number): D;\n\n /**\n * Adds the given number of days to the date. Days are counted as if moving one cell on the\n * calendar for each day.\n * @param date The date to add days to.\n * @param days The number of days to add (may be negative).\n * @returns A new date equal to the given one with the specified number of days added.\n */\n abstract addCalendarDays(date: D, days: number): D;\n\n /**\n * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.\n * This method is used to generate date strings that are compatible with native HTML attributes\n * such as the `min` or `max` attribute of an `<input>`.\n * @param date The date to get the ISO date string for.\n * @returns The ISO date string date string.\n */\n abstract toIso8601(date: D): string;\n\n /**\n * Checks whether the given object is considered a date instance by this DateAdapter.\n * @param obj The object to check\n * @returns Whether the object is a date instance.\n */\n abstract isDateInstance(obj: any): boolean;\n\n /**\n * Checks whether the given date is valid.\n * @param date The date to check.\n * @returns Whether the date is valid.\n */\n abstract isValid(date: D): boolean;\n\n /**\n * Gets date instance that is not valid.\n * @returns An invalid date.\n */\n abstract invalid(): D;\n\n /**\n * Sets the time of one date to the time of another.\n * @param target Date whose time will be set.\n * @param hours New hours to set on the date object.\n * @param minutes New minutes to set on the date object.\n * @param seconds New seconds to set on the date object.\n */\n setTime(target: D, hours: number, minutes: number, seconds: number): D {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Gets the hours component of the given date.\n * @param date The date to extract the hours from.\n */\n getHours(date: D): number {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Gets the minutes component of the given date.\n * @param date The date to extract the minutes from.\n */\n getMinutes(date: D): number {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Gets the seconds component of the given date.\n * @param date The date to extract the seconds from.\n */\n getSeconds(date: D): number {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Parses a date with a specific time from a user-provided value.\n * @param value The value to parse.\n * @param parseFormat The expected format of the value being parsed\n * (type is implementation-dependent).\n */\n parseTime(value: any, parseFormat: any): D | null {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Adds an amount of seconds to the specified date.\n * @param date Date to which to add the seconds.\n * @param amount Amount of seconds to add to the date.\n */\n addSeconds(date: D, amount: number): D {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Given a potential date object, returns that same date object if it is\n * a valid date, or `null` if it's not a valid date.\n * @param obj The object to check.\n * @returns A date or `null`.\n */\n getValidDateOrNull(obj: unknown): D | null {\n return this.isDateInstance(obj) && this.isValid(obj as D) ? (obj as D) : null;\n }\n\n /**\n * Attempts to deserialize a value to a valid date object. This is different from parsing in that\n * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\n * string). The default implementation does not allow any deserialization, it simply checks that\n * the given value is already a valid date object or null. The `<mat-datepicker>` will call this\n * method on all of its `@Input()` properties that accept dates. It is therefore possible to\n * support passing values from your backend directly to these properties by overriding this method\n * to also deserialize the format used by your backend.\n * @param value The value to be deserialized into a date object.\n * @returns The deserialized date object, either a valid date, null if the value can be\n * deserialized into a null date (e.g. the empty string), or an invalid date.\n */\n deserialize(value: any): D | null {\n if (value == null || (this.isDateInstance(value) && this.isValid(value))) {\n return value;\n }\n return this.invalid();\n }\n\n /**\n * Sets the locale used for all dates.\n * @param locale The new locale.\n */\n setLocale(locale: L) {\n this.locale = locale;\n this._localeChanges.next();\n }\n\n /**\n * Compares two dates.\n * @param first The first date to compare.\n * @param second The second date to compare.\n * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,\n * a number greater than 0 if the first date is later.\n */\n compareDate(first: D, second: D): number {\n return (\n this.getYear(first) - this.getYear(second) ||\n this.getMonth(first) - this.getMonth(second) ||\n this.getDate(first) - this.getDate(second)\n );\n }\n\n /**\n * Compares the time values of two dates.\n * @param first First date to compare.\n * @param second Second date to compare.\n * @returns 0 if the times are equal, a number less than 0 if the first time is earlier,\n * a number greater than 0 if the first time is later.\n */\n compareTime(first: D, second: D): number {\n return (\n this.getHours(first) - this.getHours(second) ||\n this.getMinutes(first) - this.getMinutes(second) ||\n this.getSeconds(first) - this.getSeconds(second)\n );\n }\n\n /**\n * Checks if two dates are equal.\n * @param first The first date to check.\n * @param second The second date to check.\n * @returns Whether the two dates are equal.\n * Null dates are considered equal to other null dates.\n */\n sameDate(first: D | null, second: D | null): boolean {\n if (first && second) {\n let firstValid = this.isValid(first);\n let secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDate(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }\n\n /**\n * Checks if the times of two dates are equal.\n * @param first The first date to check.\n * @param second The second date to check.\n * @returns Whether the times of the two dates are equal.\n * Null dates are considered equal to other null dates.\n */\n sameTime(first: D | null, second: D | null): boolean {\n if (first && second) {\n const firstValid = this.isValid(first);\n const secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareTime(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }\n\n /**\n * Clamp the given date between min and max dates.\n * @param date The date to clamp.\n * @param min The minimum value to allow. If null or omitted no min is enforced.\n * @param max The maximum value to allow. If null or omitted no max is enforced.\n * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,\n * otherwise `date`.\n */\n clampDate(date: D, min?: D | null, max?: D | null): D {\n if (min && this.compareDate(date, min) < 0) {\n return min;\n }\n if (max && this.compareDate(date, max) > 0) {\n return max;\n }\n return date;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\nexport type MatDateFormats = {\n parse: {\n dateInput: any;\n timeInput?: any;\n };\n display: {\n dateInput: any;\n monthLabel?: any;\n monthYearLabel: any;\n dateA11yLabel: any;\n monthYearA11yLabel: any;\n timeInput?: any;\n timeOptionLabel?: any;\n };\n};\n\nexport const MAT_DATE_FORMATS = new InjectionToken<MatDateFormats>('mat-date-formats');\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"_date-formats-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/core/datetime/date-adapter.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, InjectionToken, LOCALE_ID} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\n/** InjectionToken for datepicker that can be used to override default locale code. */\nexport const MAT_DATE_LOCALE = new InjectionToken<{}>('MAT_DATE_LOCALE', {\n providedIn: 'root',\n factory: () => inject(LOCALE_ID),\n});\n\nconst NOT_IMPLEMENTED = 'Method not implemented';\n\n/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */\nexport abstract class DateAdapter<D, L = any> {\n /** The locale to use for all dates. */\n protected locale: L;\n protected readonly _localeChanges = new Subject<void>();\n\n /** A stream that emits when the locale changes. */\n readonly localeChanges: Observable<void> = this._localeChanges;\n\n /**\n * Gets the year component of the given date.\n * @param date The date to extract the year from.\n * @returns The year component.\n */\n abstract getYear(date: D): number;\n\n /**\n * Gets the month component of the given date.\n * @param date The date to extract the month from.\n * @returns The month component (0-indexed, 0 = January).\n */\n abstract getMonth(date: D): number;\n\n /**\n * Gets the date of the month component of the given date.\n * @param date The date to extract the date of the month from.\n * @returns The month component (1-indexed, 1 = first of month).\n */\n abstract getDate(date: D): number;\n\n /**\n * Gets the day of the week component of the given date.\n * @param date The date to extract the day of the week from.\n * @returns The month component (0-indexed, 0 = Sunday).\n */\n abstract getDayOfWeek(date: D): number;\n\n /**\n * Gets a list of names for the months.\n * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').\n * @returns An ordered list of all month names, starting with January.\n */\n abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];\n\n /**\n * Gets a list of names for the dates of the month.\n * @returns An ordered list of all date of the month names, starting with '1'.\n */\n abstract getDateNames(): string[];\n\n /**\n * Gets a list of names for the days of the week.\n * @param style The naming style (e.g. long = 'Sunday', short = 'Sun', narrow = 'S').\n * @returns An ordered list of all weekday names, starting with Sunday.\n */\n abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];\n\n /**\n * Gets the name for the year of the given date.\n * @param date The date to get the year name for.\n * @returns The name of the given year (e.g. '2017').\n */\n abstract getYearName(date: D): string;\n\n /**\n * Gets the first day of the week.\n * @returns The first day of the week (0-indexed, 0 = Sunday).\n */\n abstract getFirstDayOfWeek(): number;\n\n /**\n * Gets the number of days in the month of the given date.\n * @param date The date whose month should be checked.\n * @returns The number of days in the month of the given date.\n */\n abstract getNumDaysInMonth(date: D): number;\n\n /**\n * Clones the given date.\n * @param date The date to clone\n * @returns A new date equal to the given date.\n */\n abstract clone(date: D): D;\n\n /**\n * Creates a date with the given year, month, and date. Does not allow over/under-flow of the\n * month and date.\n * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989).\n * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.\n * @param date The date of month of the date. Must be an integer 1 - length of the given month.\n * @returns The new date, or null if invalid.\n */\n abstract createDate(year: number, month: number, date: number): D;\n\n /**\n * Gets today's date.\n * @returns Today's date.\n */\n abstract today(): D;\n\n /**\n * Parses a date from a user-provided value.\n * @param value The value to parse.\n * @param parseFormat The expected format of the value being parsed\n * (type is implementation-dependent).\n * @returns The parsed date.\n */\n abstract parse(value: any, parseFormat: any): D | null;\n\n /**\n * Formats a date as a string according to the given format.\n * @param date The value to format.\n * @param displayFormat The format to use to display the date as a string.\n * @returns The formatted date string.\n */\n abstract format(date: D, displayFormat: any): string;\n\n /**\n * Adds the given number of years to the date. Years are counted as if flipping 12 pages on the\n * calendar for each year and then finding the closest date in the new month. For example when\n * adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.\n * @param date The date to add years to.\n * @param years The number of years to add (may be negative).\n * @returns A new date equal to the given one with the specified number of years added.\n */\n abstract addCalendarYears(date: D, years: number): D;\n\n /**\n * Adds the given number of months to the date. Months are counted as if flipping a page on the\n * calendar for each month and then finding the closest date in the new month. For example when\n * adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.\n * @param date The date to add months to.\n * @param months The number of months to add (may be negative).\n * @returns A new date equal to the given one with the specified number of months added.\n */\n abstract addCalendarMonths(date: D, months: number): D;\n\n /**\n * Adds the given number of days to the date. Days are counted as if moving one cell on the\n * calendar for each day.\n * @param date The date to add days to.\n * @param days The number of days to add (may be negative).\n * @returns A new date equal to the given one with the specified number of days added.\n */\n abstract addCalendarDays(date: D, days: number): D;\n\n /**\n * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.\n * This method is used to generate date strings that are compatible with native HTML attributes\n * such as the `min` or `max` attribute of an `<input>`.\n * @param date The date to get the ISO date string for.\n * @returns The ISO date string date string.\n */\n abstract toIso8601(date: D): string;\n\n /**\n * Checks whether the given object is considered a date instance by this DateAdapter.\n * @param obj The object to check\n * @returns Whether the object is a date instance.\n */\n abstract isDateInstance(obj: any): boolean;\n\n /**\n * Checks whether the given date is valid.\n * @param date The date to check.\n * @returns Whether the date is valid.\n */\n abstract isValid(date: D): boolean;\n\n /**\n * Gets date instance that is not valid.\n * @returns An invalid date.\n */\n abstract invalid(): D;\n\n /**\n * Sets the time of one date to the time of another.\n * @param target Date whose time will be set.\n * @param hours New hours to set on the date object.\n * @param minutes New minutes to set on the date object.\n * @param seconds New seconds to set on the date object.\n */\n setTime(target: D, hours: number, minutes: number, seconds: number): D {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Gets the hours component of the given date.\n * @param date The date to extract the hours from.\n */\n getHours(date: D): number {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Gets the minutes component of the given date.\n * @param date The date to extract the minutes from.\n */\n getMinutes(date: D): number {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Gets the seconds component of the given date.\n * @param date The date to extract the seconds from.\n */\n getSeconds(date: D): number {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Parses a date with a specific time from a user-provided value.\n * @param value The value to parse.\n * @param parseFormat The expected format of the value being parsed\n * (type is implementation-dependent).\n */\n parseTime(value: any, parseFormat: any): D | null {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Adds an amount of seconds to the specified date.\n * @param date Date to which to add the seconds.\n * @param amount Amount of seconds to add to the date.\n */\n addSeconds(date: D, amount: number): D {\n throw new Error(NOT_IMPLEMENTED);\n }\n\n /**\n * Given a potential date object, returns that same date object if it is\n * a valid date, or `null` if it's not a valid date.\n * @param obj The object to check.\n * @returns A date or `null`.\n */\n getValidDateOrNull(obj: unknown): D | null {\n return this.isDateInstance(obj) && this.isValid(obj as D) ? (obj as D) : null;\n }\n\n /**\n * Attempts to deserialize a value to a valid date object. This is different from parsing in that\n * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\n * string). The default implementation does not allow any deserialization, it simply checks that\n * the given value is already a valid date object or null. The `<mat-datepicker>` will call this\n * method on all of its `@Input()` properties that accept dates. It is therefore possible to\n * support passing values from your backend directly to these properties by overriding this method\n * to also deserialize the format used by your backend.\n * @param value The value to be deserialized into a date object.\n * @returns The deserialized date object, either a valid date, null if the value can be\n * deserialized into a null date (e.g. the empty string), or an invalid date.\n */\n deserialize(value: any): D | null {\n if (value == null || (this.isDateInstance(value) && this.isValid(value))) {\n return value;\n }\n return this.invalid();\n }\n\n /**\n * Sets the locale used for all dates.\n * @param locale The new locale.\n */\n setLocale(locale: L) {\n this.locale = locale;\n this._localeChanges.next();\n }\n\n /**\n * Compares two dates.\n * @param first The first date to compare.\n * @param second The second date to compare.\n * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,\n * a number greater than 0 if the first date is later.\n */\n compareDate(first: D, second: D): number {\n return (\n this.getYear(first) - this.getYear(second) ||\n this.getMonth(first) - this.getMonth(second) ||\n this.getDate(first) - this.getDate(second)\n );\n }\n\n /**\n * Compares the time values of two dates.\n * @param first First date to compare.\n * @param second Second date to compare.\n * @returns 0 if the times are equal, a number less than 0 if the first time is earlier,\n * a number greater than 0 if the first time is later.\n */\n compareTime(first: D, second: D): number {\n return (\n this.getHours(first) - this.getHours(second) ||\n this.getMinutes(first) - this.getMinutes(second) ||\n this.getSeconds(first) - this.getSeconds(second)\n );\n }\n\n /**\n * Checks if two dates are equal.\n * @param first The first date to check.\n * @param second The second date to check.\n * @returns Whether the two dates are equal.\n * Null dates are considered equal to other null dates.\n */\n sameDate(first: D | null, second: D | null): boolean {\n if (first && second) {\n let firstValid = this.isValid(first);\n let secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDate(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }\n\n /**\n * Checks if the times of two dates are equal.\n * @param first The first date to check.\n * @param second The second date to check.\n * @returns Whether the times of the two dates are equal.\n * Null dates are considered equal to other null dates.\n */\n sameTime(first: D | null, second: D | null): boolean {\n if (first && second) {\n const firstValid = this.isValid(first);\n const secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareTime(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }\n\n /**\n * Clamp the given date between min and max dates.\n * @param date The date to clamp.\n * @param min The minimum value to allow. If null or omitted no min is enforced.\n * @param max The maximum value to allow. If null or omitted no max is enforced.\n * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,\n * otherwise `date`.\n */\n clampDate(date: D, min?: D | null, max?: D | null): D {\n if (min && this.compareDate(date, min) < 0) {\n return min;\n }\n if (max && this.compareDate(date, max) > 0) {\n return max;\n }\n return date;\n }\n}\n"],"names":["NOT_IMPLEMENTED","DateAdapter","_localeChanges","Subject"],"mappings":";;;;;;;AAmBA,MAAAA,eAA2F,GAAA,wBAAA;AAG/E,MAAAC,WAAA,CAAA;;EAIDC,cAAA,GAAa,IAAqBC,OAAI,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}