@angular/material 19.2.3 → 19.2.4

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 (262) hide show
  1. package/autocomplete/index.d.ts +12 -5
  2. package/autocomplete/testing/index.d.ts +2 -1
  3. package/badge/index.d.ts +7 -98
  4. package/badge/testing/index.d.ts +3 -1
  5. package/badge.d-49a8a74b.d.ts +98 -0
  6. package/bottom-sheet/index.d.ts +2 -2
  7. package/button/index.d.ts +10 -220
  8. package/button-toggle/index.d.ts +10 -257
  9. package/button-toggle/testing/index.d.ts +4 -1
  10. package/button-toggle.d-edc8acff.d.ts +257 -0
  11. package/card/index.d.ts +3 -2
  12. package/checkbox/index.d.ts +4 -3
  13. package/chips/index.d.ts +8 -4
  14. package/common-module.d-0e6515ae.d.ts +43 -0
  15. package/core/index.d.ts +21 -846
  16. package/core/testing/index.d.ts +3 -61
  17. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +3 -1
  18. package/core/tokens/m3/definitions/_md-sys-color.scss +44 -2
  19. package/core/tokens/m3/definitions/_md-sys-typescale.scss +20 -1
  20. package/date-adapter.d-c6835d41.d.ts +267 -0
  21. package/date-range-input-harness.d-549a9f7e.d.ts +278 -0
  22. package/datepicker/index.d.ts +18 -12
  23. package/datepicker/testing/index.d.ts +5 -277
  24. package/dialog/index.d.ts +12 -360
  25. package/dialog/testing/index.d.ts +6 -1
  26. package/dialog.d-7187c941.d.ts +357 -0
  27. package/divider/index.d.ts +3 -2
  28. package/divider/testing/index.d.ts +2 -14
  29. package/divider-harness.d-d34fede4.d.ts +14 -0
  30. package/error-options.d-448d9046.d.ts +17 -0
  31. package/expansion/index.d.ts +3 -2
  32. package/fesm2022/autocomplete/testing.mjs +2 -1
  33. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  34. package/fesm2022/autocomplete.mjs +14 -3
  35. package/fesm2022/autocomplete.mjs.map +1 -1
  36. package/fesm2022/badge/testing.mjs.map +1 -1
  37. package/fesm2022/badge.mjs +2 -1
  38. package/fesm2022/badge.mjs.map +1 -1
  39. package/fesm2022/bottom-sheet.mjs +3 -1
  40. package/fesm2022/bottom-sheet.mjs.map +1 -1
  41. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  42. package/fesm2022/button-toggle.mjs +7 -1
  43. package/fesm2022/button-toggle.mjs.map +1 -1
  44. package/fesm2022/button.mjs +14 -481
  45. package/fesm2022/button.mjs.map +1 -1
  46. package/fesm2022/card.mjs +3 -1
  47. package/fesm2022/card.mjs.map +1 -1
  48. package/fesm2022/checkbox.mjs +7 -1
  49. package/fesm2022/checkbox.mjs.map +1 -1
  50. package/fesm2022/chips.mjs +11 -2
  51. package/fesm2022/chips.mjs.map +1 -1
  52. package/fesm2022/common-module-a39ee957.mjs +42 -0
  53. package/fesm2022/common-module-a39ee957.mjs.map +1 -0
  54. package/fesm2022/core/testing.mjs +3 -76
  55. package/fesm2022/core/testing.mjs.map +1 -1
  56. package/fesm2022/core.mjs +27 -1587
  57. package/fesm2022/core.mjs.map +1 -1
  58. package/fesm2022/date-formats-b618acb8.mjs +190 -0
  59. package/fesm2022/date-formats-b618acb8.mjs.map +1 -0
  60. package/fesm2022/date-range-input-harness-ee47cdb0.mjs +467 -0
  61. package/fesm2022/date-range-input-harness-ee47cdb0.mjs.map +1 -0
  62. package/fesm2022/datepicker/testing.mjs +5 -465
  63. package/fesm2022/datepicker/testing.mjs.map +1 -1
  64. package/fesm2022/datepicker.mjs +23 -13
  65. package/fesm2022/datepicker.mjs.map +1 -1
  66. package/fesm2022/dialog/testing.mjs +12 -1
  67. package/fesm2022/dialog/testing.mjs.map +1 -1
  68. package/fesm2022/dialog.mjs +14 -897
  69. package/fesm2022/dialog.mjs.map +1 -1
  70. package/fesm2022/divider/testing.mjs +2 -17
  71. package/fesm2022/divider/testing.mjs.map +1 -1
  72. package/fesm2022/divider-harness-3394f29a.mjs +18 -0
  73. package/fesm2022/divider-harness-3394f29a.mjs.map +1 -0
  74. package/fesm2022/divider.mjs +3 -1
  75. package/fesm2022/divider.mjs.map +1 -1
  76. package/fesm2022/error-options-aca21924.mjs +29 -0
  77. package/fesm2022/error-options-aca21924.mjs.map +1 -0
  78. package/fesm2022/error-state-8f4ce1af.mjs +37 -0
  79. package/fesm2022/error-state-8f4ce1af.mjs.map +1 -0
  80. package/fesm2022/expansion.mjs +3 -1
  81. package/fesm2022/expansion.mjs.map +1 -1
  82. package/fesm2022/form-field/testing/control.mjs +2 -10
  83. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  84. package/fesm2022/form-field/testing.mjs +7 -4
  85. package/fesm2022/form-field/testing.mjs.map +1 -1
  86. package/fesm2022/form-field-50ec956f.mjs +1076 -0
  87. package/fesm2022/form-field-50ec956f.mjs.map +1 -0
  88. package/fesm2022/form-field-control-harness-af6fd278.mjs +11 -0
  89. package/fesm2022/form-field-control-harness-af6fd278.mjs.map +1 -0
  90. package/fesm2022/form-field.mjs +14 -1106
  91. package/fesm2022/form-field.mjs.map +1 -1
  92. package/fesm2022/grid-list/testing.mjs +1 -1
  93. package/fesm2022/grid-list/testing.mjs.map +1 -1
  94. package/fesm2022/grid-list.mjs +8 -147
  95. package/fesm2022/grid-list.mjs.map +1 -1
  96. package/fesm2022/icon/testing.mjs +5 -1
  97. package/fesm2022/icon/testing.mjs.map +1 -1
  98. package/fesm2022/icon-button-655c4ed3.mjs +275 -0
  99. package/fesm2022/icon-button-655c4ed3.mjs.map +1 -0
  100. package/fesm2022/icon-module-881c6455.mjs +395 -0
  101. package/fesm2022/icon-module-881c6455.mjs.map +1 -0
  102. package/fesm2022/icon-registry-e1064d47.mjs +639 -0
  103. package/fesm2022/icon-registry-e1064d47.mjs.map +1 -0
  104. package/fesm2022/icon.mjs +11 -1024
  105. package/fesm2022/icon.mjs.map +1 -1
  106. package/fesm2022/index-2f2536d6.mjs +22 -0
  107. package/fesm2022/index-2f2536d6.mjs.map +1 -0
  108. package/fesm2022/index-a36e3c7c.mjs +20 -0
  109. package/fesm2022/index-a36e3c7c.mjs.map +1 -0
  110. package/fesm2022/input/testing.mjs +5 -113
  111. package/fesm2022/input/testing.mjs.map +1 -1
  112. package/fesm2022/input-harness-ed59decc.mjs +115 -0
  113. package/fesm2022/input-harness-ed59decc.mjs.map +1 -0
  114. package/fesm2022/input-value-accessor-8a79a24e.mjs +12 -0
  115. package/fesm2022/input-value-accessor-8a79a24e.mjs.map +1 -0
  116. package/fesm2022/input.mjs +14 -12
  117. package/fesm2022/input.mjs.map +1 -1
  118. package/fesm2022/internal-form-field-5960ea2e.mjs +27 -0
  119. package/fesm2022/internal-form-field-5960ea2e.mjs.map +1 -0
  120. package/fesm2022/line-11b0093d.mjs +59 -0
  121. package/fesm2022/line-11b0093d.mjs.map +1 -0
  122. package/fesm2022/list/testing.mjs +1 -1
  123. package/fesm2022/list/testing.mjs.map +1 -1
  124. package/fesm2022/list.mjs +8 -1
  125. package/fesm2022/list.mjs.map +1 -1
  126. package/fesm2022/menu.mjs +5 -1
  127. package/fesm2022/menu.mjs.map +1 -1
  128. package/fesm2022/module-0776ab9b.mjs +38 -0
  129. package/fesm2022/module-0776ab9b.mjs.map +1 -0
  130. package/fesm2022/module-087ecec3.mjs +970 -0
  131. package/fesm2022/module-087ecec3.mjs.map +1 -0
  132. package/fesm2022/module-6b33072b.mjs +218 -0
  133. package/fesm2022/module-6b33072b.mjs.map +1 -0
  134. package/fesm2022/module-b0a3e0af.mjs +1293 -0
  135. package/fesm2022/module-b0a3e0af.mjs.map +1 -0
  136. package/fesm2022/module-b3de5709.mjs +899 -0
  137. package/fesm2022/module-b3de5709.mjs.map +1 -0
  138. package/fesm2022/optgroup-harness-5e66b138.mjs +36 -0
  139. package/fesm2022/optgroup-harness-5e66b138.mjs.map +1 -0
  140. package/fesm2022/option-cb353f7a.mjs +348 -0
  141. package/fesm2022/option-cb353f7a.mjs.map +1 -0
  142. package/fesm2022/option-harness-3b7c1106.mjs +46 -0
  143. package/fesm2022/option-harness-3b7c1106.mjs.map +1 -0
  144. package/fesm2022/paginator/testing.mjs +4 -1
  145. package/fesm2022/paginator/testing.mjs.map +1 -1
  146. package/fesm2022/paginator.mjs +33 -7
  147. package/fesm2022/paginator.mjs.map +1 -1
  148. package/fesm2022/progress-bar.mjs +3 -1
  149. package/fesm2022/progress-bar.mjs.map +1 -1
  150. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  151. package/fesm2022/progress-spinner.mjs +3 -1
  152. package/fesm2022/progress-spinner.mjs.map +1 -1
  153. package/fesm2022/pseudo-checkbox-4a60d45e.mjs +52 -0
  154. package/fesm2022/pseudo-checkbox-4a60d45e.mjs.map +1 -0
  155. package/fesm2022/pseudo-checkbox-module-31a58606.mjs +20 -0
  156. package/fesm2022/pseudo-checkbox-module-31a58606.mjs.map +1 -0
  157. package/fesm2022/public-api-c5ab57f5.mjs +147 -0
  158. package/fesm2022/public-api-c5ab57f5.mjs.map +1 -0
  159. package/fesm2022/radio.mjs +8 -1
  160. package/fesm2022/radio.mjs.map +1 -1
  161. package/fesm2022/ripple-5bdada85.mjs +639 -0
  162. package/fesm2022/ripple-5bdada85.mjs.map +1 -0
  163. package/fesm2022/ripple-loader-dabcd93d.mjs +165 -0
  164. package/fesm2022/ripple-loader-dabcd93d.mjs.map +1 -0
  165. package/fesm2022/select/testing.mjs +5 -121
  166. package/fesm2022/select/testing.mjs.map +1 -1
  167. package/fesm2022/select-harness-8c55824d.mjs +123 -0
  168. package/fesm2022/select-harness-8c55824d.mjs.map +1 -0
  169. package/fesm2022/select.mjs +30 -1288
  170. package/fesm2022/select.mjs.map +1 -1
  171. package/fesm2022/sidenav.mjs +1 -1
  172. package/fesm2022/sidenav.mjs.map +1 -1
  173. package/fesm2022/slide-toggle.mjs +7 -1
  174. package/fesm2022/slide-toggle.mjs.map +1 -1
  175. package/fesm2022/slider.mjs +6 -1
  176. package/fesm2022/slider.mjs.map +1 -1
  177. package/fesm2022/snack-bar.mjs +10 -2
  178. package/fesm2022/snack-bar.mjs.map +1 -1
  179. package/fesm2022/sort/testing.mjs.map +1 -1
  180. package/fesm2022/sort.mjs +3 -1
  181. package/fesm2022/sort.mjs.map +1 -1
  182. package/fesm2022/stepper.mjs +11 -2
  183. package/fesm2022/stepper.mjs.map +1 -1
  184. package/fesm2022/structural-styles-326dcb39.mjs +18 -0
  185. package/fesm2022/structural-styles-326dcb39.mjs.map +1 -0
  186. package/fesm2022/table.mjs +3 -1
  187. package/fesm2022/table.mjs.map +1 -1
  188. package/fesm2022/tabs.mjs +4 -1
  189. package/fesm2022/tabs.mjs.map +1 -1
  190. package/fesm2022/timepicker/testing.mjs +1 -1
  191. package/fesm2022/timepicker/testing.mjs.map +1 -1
  192. package/fesm2022/timepicker.mjs +19 -5
  193. package/fesm2022/timepicker.mjs.map +1 -1
  194. package/fesm2022/toolbar.mjs +3 -1
  195. package/fesm2022/toolbar.mjs.map +1 -1
  196. package/fesm2022/tooltip.mjs +15 -968
  197. package/fesm2022/tooltip.mjs.map +1 -1
  198. package/fesm2022/tree.mjs +3 -1
  199. package/fesm2022/tree.mjs.map +1 -1
  200. package/form-field/index.d.ts +12 -437
  201. package/form-field/testing/control/index.d.ts +2 -10
  202. package/form-field/testing/index.d.ts +7 -5
  203. package/form-field-control-harness.d-2d91f25a.d.ts +10 -0
  204. package/form-field-control.d-eb86711c.d.ts +62 -0
  205. package/form-field.d-2edbc094.d.ts +367 -0
  206. package/grid-list/index.d.ts +5 -3
  207. package/icon/index.d.ts +9 -449
  208. package/icon/testing/index.d.ts +3 -1
  209. package/icon-module.d-aa3bbba0.d.ts +167 -0
  210. package/icon-registry.d-1dffe9de.d.ts +286 -0
  211. package/index.d-0536b706.d.ts +11 -0
  212. package/index.d-37e31cd3.d.ts +13 -0
  213. package/input/index.d.ts +11 -6
  214. package/input/testing/index.d.ts +4 -59
  215. package/input-harness.d-4eecd1d3.d.ts +60 -0
  216. package/line.d-570a2537.d.ts +25 -0
  217. package/list/index.d.ts +13 -19
  218. package/list/testing/index.d.ts +2 -2
  219. package/list-option-types.d-8739f903.d.ts +15 -0
  220. package/menu/index.d.ts +6 -3
  221. package/module.d-74a721b9.d.ts +326 -0
  222. package/module.d-ba05faa6.d.ts +448 -0
  223. package/module.d-c17c834e.d.ts +18 -0
  224. package/module.d-f490a6d4.d.ts +224 -0
  225. package/optgroup-harness.d-7f741f69.d.ts +31 -0
  226. package/option-harness.d-3d33fc9a.d.ts +34 -0
  227. package/option-parent.d-559ad5c5.d.ts +19 -0
  228. package/option.d-6f493d78.d.ts +146 -0
  229. package/package.json +2 -2
  230. package/paginator/index.d.ts +29 -201
  231. package/paginator/testing/index.d.ts +4 -1
  232. package/paginator.d-40b1766e.d.ts +199 -0
  233. package/palette.d-ec4a617c.d.ts +4 -0
  234. package/progress-bar/index.d.ts +4 -3
  235. package/progress-spinner/index.d.ts +7 -96
  236. package/progress-spinner/testing/index.d.ts +3 -1
  237. package/progress-spinner.d-1fc040c5.d.ts +96 -0
  238. package/pseudo-checkbox-module.d-3abc0461.d.ts +44 -0
  239. package/radio/index.d.ts +7 -3
  240. package/ripple-loader.d-8aac2988.d.ts +48 -0
  241. package/ripple.d-2fb57d04.d.ts +255 -0
  242. package/schematics/ng-add/index.js +1 -1
  243. package/schematics/ng-add/index.mjs +1 -1
  244. package/select/index.d.ts +24 -446
  245. package/select/testing/index.d.ts +5 -62
  246. package/select-harness.d-7441a7ac.d.ts +63 -0
  247. package/sidenav/index.d.ts +4 -3
  248. package/slide-toggle/index.d.ts +4 -3
  249. package/slider/index.d.ts +6 -3
  250. package/snack-bar/index.d.ts +8 -3
  251. package/sort/index.d.ts +10 -88
  252. package/sort/testing/index.d.ts +1 -1
  253. package/sort-direction.d-f4ce4649.d.ts +3 -0
  254. package/sort.d-c2b79a45.d.ts +87 -0
  255. package/stepper/index.d.ts +9 -4
  256. package/table/index.d.ts +11 -4
  257. package/tabs/index.d.ts +5 -3
  258. package/timepicker/index.d.ts +6 -3
  259. package/timepicker/testing/index.d.ts +1 -1
  260. package/toolbar/index.d.ts +3 -2
  261. package/tooltip/index.d.ts +10 -325
  262. package/tree/index.d.ts +3 -2
@@ -0,0 +1,42 @@
1
+ import { HighContrastModeDetector } from '@angular/cdk/a11y';
2
+ import { BidiModule } from '@angular/cdk/bidi';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, inject, NgModule } from '@angular/core';
5
+
6
+ /**
7
+ * Injection token that configures whether the Material sanity checks are enabled.
8
+ * @deprecated No longer used and will be removed.
9
+ * @breaking-change 21.0.0
10
+ */
11
+ const MATERIAL_SANITY_CHECKS = new InjectionToken('mat-sanity-checks', {
12
+ providedIn: 'root',
13
+ factory: () => true,
14
+ });
15
+ /**
16
+ * Module that captures anything that should be loaded and/or run for *all* Angular Material
17
+ * components. This includes Bidi, etc.
18
+ *
19
+ * This module should be imported to each top-level component module (e.g., MatTabsModule).
20
+ * @deprecated No longer used and will be removed.
21
+ * @breaking-change 21.0.0
22
+ */
23
+ class MatCommonModule {
24
+ constructor() {
25
+ // While A11yModule also does this, we repeat it here to avoid importing A11yModule
26
+ // in MatCommonModule.
27
+ inject(HighContrastModeDetector)._applyBodyHighContrastModeCssClasses();
28
+ }
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
30
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.0", ngImport: i0, type: MatCommonModule, imports: [BidiModule], exports: [BidiModule] });
31
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatCommonModule, imports: [BidiModule, BidiModule] });
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatCommonModule, decorators: [{
34
+ type: NgModule,
35
+ args: [{
36
+ imports: [BidiModule],
37
+ exports: [BidiModule],
38
+ }]
39
+ }], ctorParameters: () => [] });
40
+
41
+ export { MatCommonModule as M, MATERIAL_SANITY_CHECKS as a };
42
+ //# sourceMappingURL=common-module-a39ee957.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-module-a39ee957.mjs","sources":["../../../../../../src/material/core/common-behaviors/common-module.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 {HighContrastModeDetector} from '@angular/cdk/a11y';\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {inject, InjectionToken, NgModule} from '@angular/core';\nimport {_isTestEnvironment} from '@angular/cdk/platform';\n\n/**\n * Injection token that configures whether the Material sanity checks are enabled.\n * @deprecated No longer used and will be removed.\n * @breaking-change 21.0.0\n */\nexport const MATERIAL_SANITY_CHECKS = new InjectionToken<SanityChecks>('mat-sanity-checks', {\n providedIn: 'root',\n factory: () => true,\n});\n\n/**\n * Possible sanity checks that can be enabled. If set to\n * true/false, all checks will be enabled/disabled.\n * @deprecated No longer used and will be removed.\n * @breaking-change 21.0.0\n */\nexport type SanityChecks = boolean | GranularSanityChecks;\n\n/**\n * Object that can be used to configure the sanity checks granularly.\n * @deprecated No longer used and will be removed.\n * @breaking-change 21.0.0\n */\nexport interface GranularSanityChecks {\n doctype: boolean;\n theme: boolean;\n version: boolean;\n}\n\n/**\n * Module that captures anything that should be loaded and/or run for *all* Angular Material\n * components. This includes Bidi, etc.\n *\n * This module should be imported to each top-level component module (e.g., MatTabsModule).\n * @deprecated No longer used and will be removed.\n * @breaking-change 21.0.0\n */\n@NgModule({\n imports: [BidiModule],\n exports: [BidiModule],\n})\nexport class MatCommonModule {\n constructor(...args: any[]);\n\n constructor() {\n // While A11yModule also does this, we repeat it here to avoid importing A11yModule\n // in MatCommonModule.\n inject(HighContrastModeDetector)._applyBodyHighContrastModeCssClasses();\n }\n}\n"],"names":[],"mappings":";;;;;AAaA;;;;AAIG;MACU,sBAAsB,GAAG,IAAI,cAAc,CAAe,mBAAmB,EAAE;AAC1F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI;AACpB,CAAA,EAAC;AAqBF;;;;;;;AAOG;MAKU,eAAe,CAAA;AAG1B,IAAA,WAAA,GAAA;;;AAGE,QAAA,MAAM,CAAC,wBAAwB,CAAC,CAAC,oCAAoC,EAAE,CAAA;KACzE;uGAPW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAAf,eAAe,EAAA,OAAA,EAAA,CAHhB,UAAU,CAAA,EAAA,OAAA,EAAA,CACV,UAAU,CAAA,EAAA,CAAA,CAAA;wGAET,eAAe,EAAA,OAAA,EAAA,CAHhB,UAAU,EACV,UAAU,CAAA,EAAA,CAAA,CAAA;;2FAET,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,UAAU,CAAC;oBACrB,OAAO,EAAE,CAAC,UAAU,CAAC;AACtB,iBAAA,CAAA;;;;;"}
@@ -1,77 +1,4 @@
1
- import { ContentContainerComponentHarness, HarnessPredicate, ComponentHarness } from '@angular/cdk/testing';
2
-
3
- /** Harness for interacting with a `mat-option` in tests. */
4
- class MatOptionHarness extends ContentContainerComponentHarness {
5
- /** Selector used to locate option instances. */
6
- static hostSelector = '.mat-mdc-option';
7
- /** Element containing the option's text. */
8
- _text = this.locatorFor('.mdc-list-item__primary-text');
9
- /**
10
- * Gets a `HarnessPredicate` that can be used to search for an option with specific attributes.
11
- * @param options Options for filtering which option instances are considered a match.
12
- * @return a `HarnessPredicate` configured with the given options.
13
- */
14
- static with(options = {}) {
15
- return new HarnessPredicate(this, options)
16
- .addOption('text', options.text, async (harness, title) => HarnessPredicate.stringMatches(await harness.getText(), title))
17
- .addOption('isSelected', options.isSelected, async (harness, isSelected) => (await harness.isSelected()) === isSelected);
18
- }
19
- /** Clicks the option. */
20
- async click() {
21
- return (await this.host()).click();
22
- }
23
- /** Gets the option's label text. */
24
- async getText() {
25
- return (await this._text()).text();
26
- }
27
- /** Gets whether the option is disabled. */
28
- async isDisabled() {
29
- return (await this.host()).hasClass('mdc-list-item--disabled');
30
- }
31
- /** Gets whether the option is selected. */
32
- async isSelected() {
33
- return (await this.host()).hasClass('mdc-list-item--selected');
34
- }
35
- /** Gets whether the option is active. */
36
- async isActive() {
37
- return (await this.host()).hasClass('mat-mdc-option-active');
38
- }
39
- /** Gets whether the option is in multiple selection mode. */
40
- async isMultiple() {
41
- return (await this.host()).hasClass('mat-mdc-option-multiple');
42
- }
43
- }
44
-
45
- /** Harness for interacting with a `mat-optgroup` in tests. */
46
- class MatOptgroupHarness extends ComponentHarness {
47
- /** Selector used to locate option group instances. */
48
- static hostSelector = '.mat-mdc-optgroup';
49
- _label = this.locatorFor('.mat-mdc-optgroup-label');
50
- /**
51
- * Gets a `HarnessPredicate` that can be used to search for a option group with specific
52
- * attributes.
53
- * @param options Options for filtering which option instances are considered a match.
54
- * @return a `HarnessPredicate` configured with the given options.
55
- */
56
- static with(options = {}) {
57
- return new HarnessPredicate(this, options).addOption('labelText', options.labelText, async (harness, title) => HarnessPredicate.stringMatches(await harness.getLabelText(), title));
58
- }
59
- /** Gets the option group's label text. */
60
- async getLabelText() {
61
- return (await this._label()).text();
62
- }
63
- /** Gets whether the option group is disabled. */
64
- async isDisabled() {
65
- return (await (await this.host()).getAttribute('aria-disabled')) === 'true';
66
- }
67
- /**
68
- * Gets the options that are inside the group.
69
- * @param filter Optionally filters which options are included.
70
- */
71
- async getOptions(filter = {}) {
72
- return this.locatorForAll(MatOptionHarness.with(filter))();
73
- }
74
- }
75
-
76
- export { MatOptgroupHarness, MatOptionHarness };
1
+ export { M as MatOptionHarness } from '../option-harness-3b7c1106.mjs';
2
+ export { M as MatOptgroupHarness } from '../optgroup-harness-5e66b138.mjs';
3
+ import '@angular/cdk/testing';
77
4
  //# sourceMappingURL=testing.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/core/testing/option-harness.ts","../../../../../../../src/material/core/testing/optgroup-harness.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 {\n ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {OptionHarnessFilters} from './option-harness-filters';\n\n/** Harness for interacting with a `mat-option` in tests. */\nexport class MatOptionHarness extends ContentContainerComponentHarness {\n /** Selector used to locate option instances. */\n static hostSelector = '.mat-mdc-option';\n\n /** Element containing the option's text. */\n private _text = this.locatorFor('.mdc-list-item__primary-text');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an option with specific attributes.\n * @param options Options for filtering which option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatOptionHarness>(\n this: ComponentHarnessConstructor<T>,\n options: OptionHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('text', options.text, async (harness, title) =>\n HarnessPredicate.stringMatches(await harness.getText(), title),\n )\n .addOption(\n 'isSelected',\n options.isSelected,\n async (harness, isSelected) => (await harness.isSelected()) === isSelected,\n );\n }\n\n /** Clicks the option. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Gets the option's label text. */\n async getText(): Promise<string> {\n return (await this._text()).text();\n }\n\n /** Gets whether the option is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mdc-list-item--disabled');\n }\n\n /** Gets whether the option is selected. */\n async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mdc-list-item--selected');\n }\n\n /** Gets whether the option is active. */\n async isActive(): Promise<boolean> {\n return (await this.host()).hasClass('mat-mdc-option-active');\n }\n\n /** Gets whether the option is in multiple selection mode. */\n async isMultiple(): Promise<boolean> {\n return (await this.host()).hasClass('mat-mdc-option-multiple');\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 {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {OptgroupHarnessFilters} from './optgroup-harness-filters';\nimport {MatOptionHarness} from './option-harness';\nimport {OptionHarnessFilters} from './option-harness-filters';\n\n/** Harness for interacting with a `mat-optgroup` in tests. */\nexport class MatOptgroupHarness extends ComponentHarness {\n /** Selector used to locate option group instances. */\n static hostSelector = '.mat-mdc-optgroup';\n private _label = this.locatorFor('.mat-mdc-optgroup-label');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a option group with specific\n * attributes.\n * @param options Options for filtering which option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatOptgroupHarness>(\n this: ComponentHarnessConstructor<T>,\n options: OptgroupHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options).addOption(\n 'labelText',\n options.labelText,\n async (harness, title) => HarnessPredicate.stringMatches(await harness.getLabelText(), title),\n );\n }\n\n /** Gets the option group's label text. */\n async getLabelText(): Promise<string> {\n return (await this._label()).text();\n }\n\n /** Gets whether the option group is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /**\n * Gets the options that are inside the group.\n * @param filter Optionally filters which options are included.\n */\n async getOptions(filter: OptionHarnessFilters = {}): Promise<MatOptionHarness[]> {\n return this.locatorForAll(MatOptionHarness.with(filter))();\n }\n}\n"],"names":[],"mappings":";;AAeA;AACM,MAAO,gBAAiB,SAAQ,gCAAgC,CAAA;;AAEpE,IAAA,OAAO,YAAY,GAAG,iBAAiB,CAAA;;AAG/B,IAAA,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAA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