@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
@@ -4,89 +4,65 @@ import { MatSelectHarness } from './select-testing.mjs';
4
4
  import '@angular/material/core/testing';
5
5
  import '@angular/material/form-field/testing/control';
6
6
 
7
- /** Harness for interacting with a mat-paginator in tests. */
8
7
  class MatPaginatorHarness extends ComponentHarness {
9
- /** Selector used to find paginator instances. */
10
- static hostSelector = '.mat-mdc-paginator';
11
- _nextButton = this.locatorFor('.mat-mdc-paginator-navigation-next');
12
- _previousButton = this.locatorFor('.mat-mdc-paginator-navigation-previous');
13
- _firstPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-first');
14
- _lastPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-last');
15
- _select = this.locatorForOptional(MatSelectHarness.with({
16
- ancestor: '.mat-mdc-paginator-page-size',
17
- }));
18
- _pageSizeFallback = this.locatorFor('.mat-mdc-paginator-page-size-value');
19
- _rangeLabel = this.locatorFor('.mat-mdc-paginator-range-label');
20
- /**
21
- * Gets a `HarnessPredicate` that can be used to search for a paginator with specific attributes.
22
- * @param options Options for filtering which paginator instances are considered a match.
23
- * @return a `HarnessPredicate` configured with the given options.
24
- */
25
- static with(options = {}) {
26
- return new HarnessPredicate(this, options);
8
+ static hostSelector = '.mat-mdc-paginator';
9
+ _nextButton = this.locatorFor('.mat-mdc-paginator-navigation-next');
10
+ _previousButton = this.locatorFor('.mat-mdc-paginator-navigation-previous');
11
+ _firstPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-first');
12
+ _lastPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-last');
13
+ _select = this.locatorForOptional(MatSelectHarness.with({
14
+ ancestor: '.mat-mdc-paginator-page-size'
15
+ }));
16
+ _pageSizeFallback = this.locatorFor('.mat-mdc-paginator-page-size-value');
17
+ _rangeLabel = this.locatorFor('.mat-mdc-paginator-range-label');
18
+ static with(options = {}) {
19
+ return new HarnessPredicate(this, options);
20
+ }
21
+ async goToNextPage() {
22
+ return (await this._nextButton()).click();
23
+ }
24
+ async isNextPageDisabled() {
25
+ const disabledValue = await (await this._nextButton()).getAttribute('aria-disabled');
26
+ return disabledValue == 'true';
27
+ }
28
+ async isPreviousPageDisabled() {
29
+ const disabledValue = await (await this._previousButton()).getAttribute('aria-disabled');
30
+ return disabledValue == 'true';
31
+ }
32
+ async goToPreviousPage() {
33
+ return (await this._previousButton()).click();
34
+ }
35
+ async goToFirstPage() {
36
+ const button = await this._firstPageButton();
37
+ if (!button) {
38
+ throw Error('Could not find first page button inside paginator. ' + 'Make sure that `showFirstLastButtons` is enabled.');
27
39
  }
28
- /** Goes to the next page in the paginator. */
29
- async goToNextPage() {
30
- return (await this._nextButton()).click();
40
+ return button.click();
41
+ }
42
+ async goToLastPage() {
43
+ const button = await this._lastPageButton();
44
+ if (!button) {
45
+ throw Error('Could not find last page button inside paginator. ' + 'Make sure that `showFirstLastButtons` is enabled.');
31
46
  }
32
- /** Returns whether or not the next page button is disabled. */
33
- async isNextPageDisabled() {
34
- const disabledValue = await (await this._nextButton()).getAttribute('aria-disabled');
35
- return disabledValue == 'true';
36
- }
37
- /* Returns whether or not the previous page button is disabled. */
38
- async isPreviousPageDisabled() {
39
- const disabledValue = await (await this._previousButton()).getAttribute('aria-disabled');
40
- return disabledValue == 'true';
41
- }
42
- /** Goes to the previous page in the paginator. */
43
- async goToPreviousPage() {
44
- return (await this._previousButton()).click();
45
- }
46
- /** Goes to the first page in the paginator. */
47
- async goToFirstPage() {
48
- const button = await this._firstPageButton();
49
- // The first page button isn't enabled by default so we need to check for it.
50
- if (!button) {
51
- throw Error('Could not find first page button inside paginator. ' +
52
- 'Make sure that `showFirstLastButtons` is enabled.');
53
- }
54
- return button.click();
55
- }
56
- /** Goes to the last page in the paginator. */
57
- async goToLastPage() {
58
- const button = await this._lastPageButton();
59
- // The last page button isn't enabled by default so we need to check for it.
60
- if (!button) {
61
- throw Error('Could not find last page button inside paginator. ' +
62
- 'Make sure that `showFirstLastButtons` is enabled.');
63
- }
64
- return button.click();
65
- }
66
- /**
67
- * Sets the page size of the paginator.
68
- * @param size Page size that should be select.
69
- */
70
- async setPageSize(size) {
71
- const select = await this._select();
72
- // The select is only available if the `pageSizeOptions` are
73
- // set to an array with more than one item.
74
- if (!select) {
75
- throw Error('Cannot find page size selector in paginator. ' +
76
- 'Make sure that the `pageSizeOptions` have been configured.');
77
- }
78
- return select.clickOptions({ text: `${size}` });
79
- }
80
- /** Gets the page size of the paginator. */
81
- async getPageSize() {
82
- const select = await this._select();
83
- const value = select ? select.getValueText() : (await this._pageSizeFallback()).text();
84
- return coerceNumberProperty(await value);
85
- }
86
- /** Gets the text of the range label of the paginator. */
87
- async getRangeLabel() {
88
- return (await this._rangeLabel()).text();
47
+ return button.click();
48
+ }
49
+ async setPageSize(size) {
50
+ const select = await this._select();
51
+ if (!select) {
52
+ throw Error('Cannot find page size selector in paginator. ' + 'Make sure that the `pageSizeOptions` have been configured.');
89
53
  }
54
+ return select.clickOptions({
55
+ text: `${size}`
56
+ });
57
+ }
58
+ async getPageSize() {
59
+ const select = await this._select();
60
+ const value = select ? select.getValueText() : (await this._pageSizeFallback()).text();
61
+ return coerceNumberProperty(await value);
62
+ }
63
+ async getRangeLabel() {
64
+ return (await this._rangeLabel()).text();
65
+ }
90
66
  }
91
67
 
92
68
  export { MatPaginatorHarness };
@@ -1 +1 @@
1
- {"version":3,"file":"paginator-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/testing/paginator-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 ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {MatSelectHarness} from '../../select/testing';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {PaginatorHarnessFilters} from './paginator-harness-filters';\n\n/** Harness for interacting with a mat-paginator in tests. */\nexport class MatPaginatorHarness extends ComponentHarness {\n /** Selector used to find paginator instances. */\n static hostSelector = '.mat-mdc-paginator';\n private _nextButton = this.locatorFor('.mat-mdc-paginator-navigation-next');\n private _previousButton = this.locatorFor('.mat-mdc-paginator-navigation-previous');\n private _firstPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-first');\n private _lastPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-last');\n _select = this.locatorForOptional(\n MatSelectHarness.with({\n ancestor: '.mat-mdc-paginator-page-size',\n }),\n );\n private _pageSizeFallback = this.locatorFor('.mat-mdc-paginator-page-size-value');\n _rangeLabel = this.locatorFor('.mat-mdc-paginator-range-label');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a paginator with specific attributes.\n * @param options Options for filtering which paginator instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatPaginatorHarness>(\n this: ComponentHarnessConstructor<T>,\n options: PaginatorHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Goes to the next page in the paginator. */\n async goToNextPage(): Promise<void> {\n return (await this._nextButton()).click();\n }\n\n /** Returns whether or not the next page button is disabled. */\n async isNextPageDisabled(): Promise<boolean> {\n const disabledValue = await (await this._nextButton()).getAttribute('aria-disabled');\n return disabledValue == 'true';\n }\n\n /* Returns whether or not the previous page button is disabled. */\n async isPreviousPageDisabled(): Promise<boolean> {\n const disabledValue = await (await this._previousButton()).getAttribute('aria-disabled');\n return disabledValue == 'true';\n }\n\n /** Goes to the previous page in the paginator. */\n async goToPreviousPage(): Promise<void> {\n return (await this._previousButton()).click();\n }\n\n /** Goes to the first page in the paginator. */\n async goToFirstPage(): Promise<void> {\n const button = await this._firstPageButton();\n\n // The first page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error(\n 'Could not find first page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.',\n );\n }\n\n return button.click();\n }\n\n /** Goes to the last page in the paginator. */\n async goToLastPage(): Promise<void> {\n const button = await this._lastPageButton();\n\n // The last page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error(\n 'Could not find last page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.',\n );\n }\n\n return button.click();\n }\n\n /**\n * Sets the page size of the paginator.\n * @param size Page size that should be select.\n */\n async setPageSize(size: number): Promise<void> {\n const select = await this._select();\n\n // The select is only available if the `pageSizeOptions` are\n // set to an array with more than one item.\n if (!select) {\n throw Error(\n 'Cannot find page size selector in paginator. ' +\n 'Make sure that the `pageSizeOptions` have been configured.',\n );\n }\n\n return select.clickOptions({text: `${size}`});\n }\n\n /** Gets the page size of the paginator. */\n async getPageSize(): Promise<number> {\n const select = await this._select();\n const value = select ? select.getValueText() : (await this._pageSizeFallback()).text();\n return coerceNumberProperty(await value);\n }\n\n /** Gets the text of the range label of the paginator. */\n async getRangeLabel(): Promise<string> {\n return (await this._rangeLabel()).text();\n }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ator-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/testing/paginator-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 ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {MatSelectHarness} from '../../select/testing';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {PaginatorHarnessFilters} from './paginator-harness-filters';\n\n/** Harness for interacting with a mat-paginator in tests. */\nexport class MatPaginatorHarness extends ComponentHarness {\n /** Selector used to find paginator instances. */\n static hostSelector = '.mat-mdc-paginator';\n private _nextButton = this.locatorFor('.mat-mdc-paginator-navigation-next');\n private _previousButton = this.locatorFor('.mat-mdc-paginator-navigation-previous');\n private _firstPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-first');\n private _lastPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-last');\n _select = this.locatorForOptional(\n MatSelectHarness.with({\n ancestor: '.mat-mdc-paginator-page-size',\n }),\n );\n private _pageSizeFallback = this.locatorFor('.mat-mdc-paginator-page-size-value');\n _rangeLabel = this.locatorFor('.mat-mdc-paginator-range-label');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a paginator with specific attributes.\n * @param options Options for filtering which paginator instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatPaginatorHarness>(\n this: ComponentHarnessConstructor<T>,\n options: PaginatorHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Goes to the next page in the paginator. */\n async goToNextPage(): Promise<void> {\n return (await this._nextButton()).click();\n }\n\n /** Returns whether or not the next page button is disabled. */\n async isNextPageDisabled(): Promise<boolean> {\n const disabledValue = await (await this._nextButton()).getAttribute('aria-disabled');\n return disabledValue == 'true';\n }\n\n /* Returns whether or not the previous page button is disabled. */\n async isPreviousPageDisabled(): Promise<boolean> {\n const disabledValue = await (await this._previousButton()).getAttribute('aria-disabled');\n return disabledValue == 'true';\n }\n\n /** Goes to the previous page in the paginator. */\n async goToPreviousPage(): Promise<void> {\n return (await this._previousButton()).click();\n }\n\n /** Goes to the first page in the paginator. */\n async goToFirstPage(): Promise<void> {\n const button = await this._firstPageButton();\n\n // The first page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error(\n 'Could not find first page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.',\n );\n }\n\n return button.click();\n }\n\n /** Goes to the last page in the paginator. */\n async goToLastPage(): Promise<void> {\n const button = await this._lastPageButton();\n\n // The last page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error(\n 'Could not find last page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.',\n );\n }\n\n return button.click();\n }\n\n /**\n * Sets the page size of the paginator.\n * @param size Page size that should be select.\n */\n async setPageSize(size: number): Promise<void> {\n const select = await this._select();\n\n // The select is only available if the `pageSizeOptions` are\n // set to an array with more than one item.\n if (!select) {\n throw Error(\n 'Cannot find page size selector in paginator. ' +\n 'Make sure that the `pageSizeOptions` have been configured.',\n );\n }\n\n return select.clickOptions({text: `${size}`});\n }\n\n /** Gets the page size of the paginator. */\n async getPageSize(): Promise<number> {\n const select = await this._select();\n const value = select ? select.getValueText() : (await this._pageSizeFallback()).text();\n return coerceNumberProperty(await value);\n }\n\n /** Gets the text of the range label of the paginator. */\n async getRangeLabel(): Promise<string> {\n return (await this._rangeLabel()).text();\n }\n}\n"],"names":["hostSelector","_nextButton","locatorFor","_previousButton","_firstPageButton","locatorForOptional","_pageSizeFallback","_rangeLabel","with","options","HarnessPredicate","isNextPageDisabled","disabledValue","getAttribute","isPreviousPageDisabled","goToPreviousPage","goToFirstPage","button","click","goToLastPage","_lastPageButton","Error"],"mappings":";;;;;;;AAoBE,EAAA,OAAAA,YAAA,GAAA,oBAAA;EAEQC,WACA,GAAA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