@angular/material 12.0.0-rc.0 → 12.0.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 (110) hide show
  1. package/bundles/material-chips.umd.js.map +1 -1
  2. package/bundles/material-core.umd.js +27 -30
  3. package/bundles/material-core.umd.js.map +1 -1
  4. package/bundles/material-datepicker-testing.umd.js +5 -5
  5. package/bundles/material-datepicker-testing.umd.js.map +1 -1
  6. package/bundles/material-datepicker.umd.js +57 -7
  7. package/bundles/material-datepicker.umd.js.map +1 -1
  8. package/bundles/material-form-field-testing.umd.js +16 -8
  9. package/bundles/material-form-field-testing.umd.js.map +1 -1
  10. package/bundles/material-menu.umd.js.map +1 -1
  11. package/bundles/material-paginator.umd.js +1 -0
  12. package/bundles/material-paginator.umd.js.map +1 -1
  13. package/bundles/material-table-testing.umd.js +103 -143
  14. package/bundles/material-table-testing.umd.js.map +1 -1
  15. package/bundles/material-tabs.umd.js +8 -1
  16. package/bundles/material-tabs.umd.js.map +1 -1
  17. package/bundles/material-tree.umd.js +1 -3
  18. package/bundles/material-tree.umd.js.map +1 -1
  19. package/chips/chip.d.ts +2 -1
  20. package/chips/index.metadata.json +1 -1
  21. package/core/common-behaviors/color.d.ts +3 -3
  22. package/core/common-behaviors/constructor.d.ts +1 -3
  23. package/core/common-behaviors/disable-ripple.d.ts +2 -2
  24. package/core/common-behaviors/disabled.d.ts +3 -3
  25. package/core/common-behaviors/error-state.d.ts +3 -3
  26. package/core/common-behaviors/tabindex.d.ts +1 -1
  27. package/core/index.metadata.json +1 -1
  28. package/core/ripple/ripple-renderer.d.ts +2 -0
  29. package/core/ripple/ripple.d.ts +2 -0
  30. package/datepicker/date-range-input-parts.d.ts +2 -0
  31. package/datepicker/date-range-input.d.ts +6 -1
  32. package/datepicker/date-selection-model.d.ts +2 -0
  33. package/datepicker/datepicker-base.d.ts +1 -0
  34. package/datepicker/datepicker-input.d.ts +4 -2
  35. package/datepicker/index.metadata.json +1 -1
  36. package/datepicker/testing/datepicker-input-harness-base.d.ts +3 -2
  37. package/esm2015/chips/chip.js +1 -1
  38. package/esm2015/core/common-behaviors/color.js +1 -2
  39. package/esm2015/core/common-behaviors/common-module.js +1 -1
  40. package/esm2015/core/common-behaviors/constructor.js +1 -1
  41. package/esm2015/core/common-behaviors/disable-ripple.js +3 -8
  42. package/esm2015/core/common-behaviors/disabled.js +1 -2
  43. package/esm2015/core/common-behaviors/error-state.js +1 -5
  44. package/esm2015/core/common-behaviors/tabindex.js +3 -10
  45. package/esm2015/core/ripple/ripple-renderer.js +9 -1
  46. package/esm2015/core/ripple/ripple.js +8 -1
  47. package/esm2015/core/version.js +1 -1
  48. package/esm2015/datepicker/date-range-input-parts.js +23 -1
  49. package/esm2015/datepicker/date-range-input.js +18 -3
  50. package/esm2015/datepicker/date-selection-model.js +3 -2
  51. package/esm2015/datepicker/datepicker-base.js +8 -3
  52. package/esm2015/datepicker/datepicker-input.js +8 -1
  53. package/esm2015/datepicker/datepicker-toggle.js +1 -1
  54. package/esm2015/datepicker/testing/datepicker-input-harness-base.js +4 -3
  55. package/esm2015/form-field/testing/form-field-harness.js +12 -3
  56. package/esm2015/menu/menu-trigger.js +1 -1
  57. package/esm2015/menu/menu.js +1 -1
  58. package/esm2015/paginator/paginator.js +2 -1
  59. package/esm2015/table/testing/cell-harness.js +9 -9
  60. package/esm2015/table/testing/row-harness.js +38 -70
  61. package/esm2015/table/testing/table-harness.js +23 -15
  62. package/esm2015/tabs/paginated-tab-header.js +2 -2
  63. package/esm2015/tabs/tab-group.js +8 -1
  64. package/esm2015/tree/data-source/nested-data-source.js +2 -4
  65. package/fesm2015/chips.js.map +1 -1
  66. package/fesm2015/core.js +21 -24
  67. package/fesm2015/core.js.map +1 -1
  68. package/fesm2015/datepicker/testing.js +2 -1
  69. package/fesm2015/datepicker/testing.js.map +1 -1
  70. package/fesm2015/datepicker.js +55 -5
  71. package/fesm2015/datepicker.js.map +1 -1
  72. package/fesm2015/form-field/testing.js +11 -2
  73. package/fesm2015/form-field/testing.js.map +1 -1
  74. package/fesm2015/menu.js.map +1 -1
  75. package/fesm2015/paginator.js +1 -0
  76. package/fesm2015/paginator.js.map +1 -1
  77. package/fesm2015/table/testing.js +66 -90
  78. package/fesm2015/table/testing.js.map +1 -1
  79. package/fesm2015/tabs.js +8 -1
  80. package/fesm2015/tabs.js.map +1 -1
  81. package/fesm2015/tree.js +1 -3
  82. package/fesm2015/tree.js.map +1 -1
  83. package/form-field/testing/form-field-harness.d.ts +6 -1
  84. package/package.json +6 -6
  85. package/paginator/index.metadata.json +1 -1
  86. package/prebuilt-themes/deeppurple-amber.css +1 -1
  87. package/prebuilt-themes/indigo-pink.css +1 -1
  88. package/prebuilt-themes/pink-bluegrey.css +1 -1
  89. package/prebuilt-themes/purple-green.css +1 -1
  90. package/schematics/collection.json +0 -6
  91. package/schematics/ng-add/index.js +2 -2
  92. package/schematics/ng-update/index.js +3 -1
  93. package/schematics/{ng-generate/theming-api → ng-update/migrations/theming-api-v12}/config.d.ts +6 -0
  94. package/schematics/ng-update/migrations/theming-api-v12/config.js +206 -0
  95. package/schematics/{ng-generate/theming-api → ng-update/migrations/theming-api-v12}/migration.d.ts +0 -0
  96. package/schematics/ng-update/migrations/theming-api-v12/migration.js +234 -0
  97. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.d.ts +18 -0
  98. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.js +45 -0
  99. package/table/testing/cell-harness.d.ts +2 -1
  100. package/table/testing/row-harness.d.ts +21 -22
  101. package/table/testing/table-harness.d.ts +32 -13
  102. package/tabs/_tabs-theme.scss +5 -2
  103. package/tabs/index.metadata.json +1 -1
  104. package/schematics/ng-generate/theming-api/config.js +0 -183
  105. package/schematics/ng-generate/theming-api/index.d.ts +0 -10
  106. package/schematics/ng-generate/theming-api/index.js +0 -26
  107. package/schematics/ng-generate/theming-api/migration.js +0 -223
  108. package/schematics/ng-generate/theming-api/schema.d.ts +0 -9
  109. package/schematics/ng-generate/theming-api/schema.js +0 -10
  110. package/schematics/ng-generate/theming-api/schema.json +0 -7
@@ -5,34 +5,44 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
8
+ import { ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
9
9
  import { RowHarnessFilters, CellHarnessFilters } from './table-harness-filters';
10
10
  import { MatCellHarness, MatHeaderCellHarness, MatFooterCellHarness } from './cell-harness';
11
11
  /** Text extracted from a table row organized by columns. */
12
12
  export interface MatRowHarnessColumnsText {
13
13
  [columnName: string]: string;
14
14
  }
15
+ export declare abstract class _MatRowHarnessBase<CellType extends (ComponentHarnessConstructor<Cell> & {
16
+ with: (options?: CellHarnessFilters) => HarnessPredicate<Cell>;
17
+ }), Cell extends ComponentHarness & {
18
+ getText(): Promise<string>;
19
+ getColumnName(): Promise<string>;
20
+ }> extends ComponentHarness {
21
+ protected abstract _cellHarness: CellType;
22
+ /** Gets a list of `MatCellHarness` for all cells in the row. */
23
+ getCells(filter?: CellHarnessFilters): Promise<Cell[]>;
24
+ /** Gets the text of the cells in the row. */
25
+ getCellTextByIndex(filter?: CellHarnessFilters): Promise<string[]>;
26
+ /** Gets the text inside the row organized by columns. */
27
+ getCellTextByColumnName(): Promise<MatRowHarnessColumnsText>;
28
+ }
15
29
  /** Harness for interacting with a standard Angular Material table row. */
16
- export declare class MatRowHarness extends ComponentHarness {
30
+ export declare class MatRowHarness extends _MatRowHarnessBase<typeof MatCellHarness, MatCellHarness> {
17
31
  /** The selector for the host element of a `MatRowHarness` instance. */
18
32
  static hostSelector: string;
33
+ protected _cellHarness: typeof MatCellHarness;
19
34
  /**
20
35
  * Gets a `HarnessPredicate` that can be used to search for a table row with specific attributes.
21
36
  * @param options Options for narrowing the search
22
37
  * @return a `HarnessPredicate` configured with the given options.
23
38
  */
24
39
  static with(options?: RowHarnessFilters): HarnessPredicate<MatRowHarness>;
25
- /** Gets a list of `MatCellHarness` for all cells in the row. */
26
- getCells(filter?: CellHarnessFilters): Promise<MatCellHarness[]>;
27
- /** Gets the text of the cells in the row. */
28
- getCellTextByIndex(filter?: CellHarnessFilters): Promise<string[]>;
29
- /** Gets the text inside the row organized by columns. */
30
- getCellTextByColumnName(): Promise<MatRowHarnessColumnsText>;
31
40
  }
32
41
  /** Harness for interacting with a standard Angular Material table header row. */
33
- export declare class MatHeaderRowHarness extends ComponentHarness {
42
+ export declare class MatHeaderRowHarness extends _MatRowHarnessBase<typeof MatHeaderCellHarness, MatHeaderCellHarness> {
34
43
  /** The selector for the host element of a `MatHeaderRowHarness` instance. */
35
44
  static hostSelector: string;
45
+ protected _cellHarness: typeof MatHeaderCellHarness;
36
46
  /**
37
47
  * Gets a `HarnessPredicate` that can be used to search for
38
48
  * a table header row with specific attributes.
@@ -40,17 +50,12 @@ export declare class MatHeaderRowHarness extends ComponentHarness {
40
50
  * @return a `HarnessPredicate` configured with the given options.
41
51
  */
42
52
  static with(options?: RowHarnessFilters): HarnessPredicate<MatHeaderRowHarness>;
43
- /** Gets a list of `MatHeaderCellHarness` for all cells in the row. */
44
- getCells(filter?: CellHarnessFilters): Promise<MatHeaderCellHarness[]>;
45
- /** Gets the text of the cells in the header row. */
46
- getCellTextByIndex(filter?: CellHarnessFilters): Promise<string[]>;
47
- /** Gets the text inside the header row organized by columns. */
48
- getCellTextByColumnName(): Promise<MatRowHarnessColumnsText>;
49
53
  }
50
54
  /** Harness for interacting with a standard Angular Material table footer row. */
51
- export declare class MatFooterRowHarness extends ComponentHarness {
55
+ export declare class MatFooterRowHarness extends _MatRowHarnessBase<typeof MatFooterCellHarness, MatFooterCellHarness> {
52
56
  /** The selector for the host element of a `MatFooterRowHarness` instance. */
53
57
  static hostSelector: string;
58
+ protected _cellHarness: typeof MatFooterCellHarness;
54
59
  /**
55
60
  * Gets a `HarnessPredicate` that can be used to search for
56
61
  * a table footer row cell with specific attributes.
@@ -58,10 +63,4 @@ export declare class MatFooterRowHarness extends ComponentHarness {
58
63
  * @return a `HarnessPredicate` configured with the given options.
59
64
  */
60
65
  static with(options?: RowHarnessFilters): HarnessPredicate<MatFooterRowHarness>;
61
- /** Gets a list of `MatFooterCellHarness` for all cells in the row. */
62
- getCells(filter?: CellHarnessFilters): Promise<MatFooterCellHarness[]>;
63
- /** Gets the text of the cells in the footer row. */
64
- getCellTextByIndex(filter?: CellHarnessFilters): Promise<string[]>;
65
- /** Gets the text inside the footer row organized by columns. */
66
- getCellTextByColumnName(): Promise<MatRowHarnessColumnsText>;
67
66
  }
@@ -5,9 +5,9 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
8
+ import { ComponentHarness, ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
9
9
  import { TableHarnessFilters, RowHarnessFilters } from './table-harness-filters';
10
- import { MatRowHarness, MatHeaderRowHarness, MatFooterRowHarness } from './row-harness';
10
+ import { MatRowHarness, MatHeaderRowHarness, MatFooterRowHarness, MatRowHarnessColumnsText } from './row-harness';
11
11
  /** Text extracted from a table organized by columns. */
12
12
  export interface MatTableHarnessColumnsText {
13
13
  [columnName: string]: {
@@ -16,24 +16,43 @@ export interface MatTableHarnessColumnsText {
16
16
  footerText: string[];
17
17
  };
18
18
  }
19
+ interface RowBase extends ComponentHarness {
20
+ getCellTextByColumnName(): Promise<MatRowHarnessColumnsText>;
21
+ getCellTextByIndex(): Promise<string[]>;
22
+ }
23
+ export declare abstract class _MatTableHarnessBase<HeaderRowType extends (ComponentHarnessConstructor<HeaderRow> & {
24
+ with: (options?: RowHarnessFilters) => HarnessPredicate<HeaderRow>;
25
+ }), HeaderRow extends RowBase, RowType extends (ComponentHarnessConstructor<Row> & {
26
+ with: (options?: RowHarnessFilters) => HarnessPredicate<Row>;
27
+ }), Row extends RowBase, FooterRowType extends (ComponentHarnessConstructor<FooterRow> & {
28
+ with: (options?: RowHarnessFilters) => HarnessPredicate<FooterRow>;
29
+ }), FooterRow extends RowBase> extends ContentContainerComponentHarness<string> {
30
+ protected abstract _headerRowHarness: HeaderRowType;
31
+ protected abstract _rowHarness: RowType;
32
+ protected abstract _footerRowHarness: FooterRowType;
33
+ /** Gets all of the header rows in a table. */
34
+ getHeaderRows(filter?: RowHarnessFilters): Promise<HeaderRow[]>;
35
+ /** Gets all of the regular data rows in a table. */
36
+ getRows(filter?: RowHarnessFilters): Promise<Row[]>;
37
+ /** Gets all of the footer rows in a table. */
38
+ getFooterRows(filter?: RowHarnessFilters): Promise<FooterRow[]>;
39
+ /** Gets the text inside the entire table organized by rows. */
40
+ getCellTextByIndex(): Promise<string[][]>;
41
+ /** Gets the text inside the entire table organized by columns. */
42
+ getCellTextByColumnName(): Promise<MatTableHarnessColumnsText>;
43
+ }
19
44
  /** Harness for interacting with a standard mat-table in tests. */
20
- export declare class MatTableHarness extends ContentContainerComponentHarness<string> {
45
+ export declare class MatTableHarness extends _MatTableHarnessBase<typeof MatHeaderRowHarness, MatHeaderRowHarness, typeof MatRowHarness, MatRowHarness, typeof MatFooterRowHarness, MatFooterRowHarness> {
21
46
  /** The selector for the host element of a `MatTableHarness` instance. */
22
47
  static hostSelector: string;
48
+ protected _headerRowHarness: typeof MatHeaderRowHarness;
49
+ protected _rowHarness: typeof MatRowHarness;
50
+ protected _footerRowHarness: typeof MatFooterRowHarness;
23
51
  /**
24
52
  * Gets a `HarnessPredicate` that can be used to search for a table with specific attributes.
25
53
  * @param options Options for narrowing the search
26
54
  * @return a `HarnessPredicate` configured with the given options.
27
55
  */
28
56
  static with(options?: TableHarnessFilters): HarnessPredicate<MatTableHarness>;
29
- /** Gets all of the header rows in a table. */
30
- getHeaderRows(filter?: RowHarnessFilters): Promise<MatHeaderRowHarness[]>;
31
- /** Gets all of the regular data rows in a table. */
32
- getRows(filter?: RowHarnessFilters): Promise<MatRowHarness[]>;
33
- /** Gets all of the footer rows in a table. */
34
- getFooterRows(filter?: RowHarnessFilters): Promise<MatFooterRowHarness[]>;
35
- /** Gets the text inside the entire table organized by rows. */
36
- getCellTextByIndex(): Promise<string[][]>;
37
- /** Gets the text inside the entire table organized by columns. */
38
- getCellTextByColumnName(): Promise<MatTableHarnessColumnsText>;
39
57
  }
58
+ export {};
@@ -117,12 +117,14 @@
117
117
  }
118
118
 
119
119
  // Set pagination chevrons to contrast background
120
+ > .mat-tab-header .mat-tab-header-pagination-chevron,
120
121
  > .mat-tab-header-pagination .mat-tab-header-pagination-chevron,
121
- > .mat-tab-links .mat-focus-indicator::before,
122
+ > .mat-tab-link-container .mat-focus-indicator::before,
122
123
  > .mat-tab-header .mat-focus-indicator::before {
123
124
  border-color: theming.get-color-from-palette($background-color, default-contrast);
124
125
  }
125
126
 
127
+ > .mat-tab-header .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron,
126
128
  > .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron {
127
129
  border-color: theming.get-color-from-palette($background-color, default-contrast, 0.4);
128
130
  }
@@ -130,7 +132,8 @@
130
132
  // Set ripples color to be the contrast color of the new background. Otherwise the ripple
131
133
  // color will be based on the app background color.
132
134
  > .mat-tab-header .mat-ripple-element,
133
- > .mat-tab-link-container .mat-ripple-element {
135
+ > .mat-tab-link-container .mat-ripple-element,
136
+ > .mat-tab-header-pagination .mat-ripple-element {
134
137
  background-color: theming.get-color-from-palette($background-color, default-contrast, 0.12);
135
138
  }
136
139
  }