Skip to content

Commit 07fecac

Browse files
crisbetojelbourn
authored andcommitted
refactor: consistently re-export common module (#19095)
All of our Material modules import the `MatCommonModule`, but there were a handful of them that didn't export it. These changes bring the remaining modules in line. (cherry picked from commit b5d43ed)
1 parent d564f6e commit 07fecac

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

src/material-experimental/mdc-chips/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const CHIP_DECLARATIONS = [
3737

3838
@NgModule({
3939
imports: [MatCommonModule, CommonModule, MatRippleModule],
40-
exports: CHIP_DECLARATIONS,
40+
exports: [MatCommonModule, CHIP_DECLARATIONS],
4141
declarations: CHIP_DECLARATIONS,
4242
providers: [
4343
ErrorStateMatcher,

src/material-experimental/mdc-menu/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {MatMenuItem} from './menu-item';
2222
OverlayModule,
2323
_MatMenuDirectivesModule
2424
],
25-
exports: [MatMenu, MatMenuItem, _MatMenuDirectivesModule],
25+
exports: [MatMenu, MatCommonModule, MatMenuItem, _MatMenuDirectivesModule],
2626
declarations: [MatMenu, MatMenuItem],
2727
providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
2828
})

src/material-experimental/mdc-radio/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {MatRadioButton, MatRadioGroup} from './radio';
1313

1414
@NgModule({
1515
imports: [MatCommonModule, CommonModule, MatRippleModule],
16-
exports: [MatRadioGroup, MatRadioButton],
16+
exports: [MatCommonModule, MatRadioGroup, MatRadioButton],
1717
declarations: [MatRadioGroup, MatRadioButton],
1818
})
1919
export class MatRadioModule {

src/material-experimental/mdc-table/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const EXPORTED_DECLARATIONS = [
5454

5555
@NgModule({
5656
imports: [MatCommonModule, CdkTableModule],
57-
exports: EXPORTED_DECLARATIONS,
57+
exports: [MatCommonModule, EXPORTED_DECLARATIONS],
5858
declarations: EXPORTED_DECLARATIONS,
5959
})
6060
export class MatTableModule {

src/material/badge/badge-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {MatBadge} from './badge';
1717
A11yModule,
1818
MatCommonModule
1919
],
20-
exports: [MatBadge],
20+
exports: [MatBadge, MatCommonModule],
2121
declarations: [MatBadge],
2222
})
2323
export class MatBadgeModule {}

src/material/menu/menu-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class _MatMenuDirectivesModule {}
3838
OverlayModule,
3939
_MatMenuDirectivesModule,
4040
],
41-
exports: [_MatMenu, MatMenuItem, _MatMenuDirectivesModule],
41+
exports: [MatCommonModule, _MatMenu, MatMenuItem, _MatMenuDirectivesModule],
4242
declarations: [_MatMenu, MatMenuItem],
4343
providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
4444
})

src/material/table/table-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const EXPORTED_DECLARATIONS = [
6060
CdkTableModule,
6161
MatCommonModule,
6262
],
63-
exports: EXPORTED_DECLARATIONS,
63+
exports: [MatCommonModule, EXPORTED_DECLARATIONS],
6464
declarations: EXPORTED_DECLARATIONS,
6565
})
6666
export class MatTableModule {}

src/material/tree/tree-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const MAT_TREE_DIRECTIVES = [
2828

2929
@NgModule({
3030
imports: [CdkTreeModule, MatCommonModule],
31-
exports: MAT_TREE_DIRECTIVES,
31+
exports: [MatCommonModule, MAT_TREE_DIRECTIVES],
3232
declarations: MAT_TREE_DIRECTIVES,
3333
})
3434
export class MatTreeModule {}

tools/public_api_guard/material/badge.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export declare class MatBadge extends _MatBadgeMixinBase implements OnDestroy, O
2727

2828
export declare class MatBadgeModule {
2929
static ɵinj: i0.ɵɵInjectorDef<MatBadgeModule>;
30-
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatBadgeModule, [typeof i1.MatBadge], [typeof i2.A11yModule, typeof i3.MatCommonModule], [typeof i1.MatBadge]>;
30+
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatBadgeModule, [typeof i1.MatBadge], [typeof i2.A11yModule, typeof i3.MatCommonModule], [typeof i1.MatBadge, typeof i3.MatCommonModule]>;
3131
}
3232

3333
export declare type MatBadgePosition = 'above after' | 'above before' | 'below before' | 'below after' | 'before' | 'after' | 'above' | 'below';

tools/public_api_guard/material/menu.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export declare class MatMenuItem extends _MatMenuItemMixinBase implements Focusa
121121

122122
export declare class MatMenuModule {
123123
static ɵinj: i0.ɵɵInjectorDef<MatMenuModule>;
124-
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatMenuModule, [typeof i4._MatMenu, typeof i5.MatMenuItem], [typeof i6.CommonModule, typeof i3.MatCommonModule, typeof i3.MatRippleModule, typeof i7.OverlayModule, typeof _MatMenuDirectivesModule], [typeof i4._MatMenu, typeof i5.MatMenuItem, typeof _MatMenuDirectivesModule]>;
124+
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatMenuModule, [typeof i4._MatMenu, typeof i5.MatMenuItem], [typeof i6.CommonModule, typeof i3.MatCommonModule, typeof i3.MatRippleModule, typeof i7.OverlayModule, typeof _MatMenuDirectivesModule], [typeof i3.MatCommonModule, typeof i4._MatMenu, typeof i5.MatMenuItem, typeof _MatMenuDirectivesModule]>;
125125
}
126126

127127
export interface MatMenuPanel<T = any> {

tools/public_api_guard/material/table.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export declare class MatTableDataSource<T> extends DataSource<T> {
102102

103103
export declare class MatTableModule {
104104
static ɵinj: i0.ɵɵInjectorDef<MatTableModule>;
105-
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatTableModule, [typeof i1.MatTable, typeof i2.MatHeaderCellDef, typeof i3.MatHeaderRowDef, typeof i2.MatColumnDef, typeof i2.MatCellDef, typeof i3.MatRowDef, typeof i2.MatFooterCellDef, typeof i3.MatFooterRowDef, typeof i2.MatHeaderCell, typeof i2.MatCell, typeof i2.MatFooterCell, typeof i3.MatHeaderRow, typeof i3.MatRow, typeof i3.MatFooterRow, typeof i4.MatTextColumn], [typeof i5.CdkTableModule, typeof i6.MatCommonModule], [typeof i1.MatTable, typeof i2.MatHeaderCellDef, typeof i3.MatHeaderRowDef, typeof i2.MatColumnDef, typeof i2.MatCellDef, typeof i3.MatRowDef, typeof i2.MatFooterCellDef, typeof i3.MatFooterRowDef, typeof i2.MatHeaderCell, typeof i2.MatCell, typeof i2.MatFooterCell, typeof i3.MatHeaderRow, typeof i3.MatRow, typeof i3.MatFooterRow, typeof i4.MatTextColumn]>;
105+
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatTableModule, [typeof i1.MatTable, typeof i2.MatHeaderCellDef, typeof i3.MatHeaderRowDef, typeof i2.MatColumnDef, typeof i2.MatCellDef, typeof i3.MatRowDef, typeof i2.MatFooterCellDef, typeof i3.MatFooterRowDef, typeof i2.MatHeaderCell, typeof i2.MatCell, typeof i2.MatFooterCell, typeof i3.MatHeaderRow, typeof i3.MatRow, typeof i3.MatFooterRow, typeof i4.MatTextColumn], [typeof i5.CdkTableModule, typeof i6.MatCommonModule], [typeof i6.MatCommonModule, typeof i1.MatTable, typeof i2.MatHeaderCellDef, typeof i3.MatHeaderRowDef, typeof i2.MatColumnDef, typeof i2.MatCellDef, typeof i3.MatRowDef, typeof i2.MatFooterCellDef, typeof i3.MatFooterRowDef, typeof i2.MatHeaderCell, typeof i2.MatCell, typeof i2.MatFooterCell, typeof i3.MatHeaderRow, typeof i3.MatRow, typeof i3.MatFooterRow, typeof i4.MatTextColumn]>;
106106
}
107107

108108
export declare class MatTextColumn<T> extends CdkTextColumn<T> {

tools/public_api_guard/material/tree.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export declare class MatTreeFlattener<T, F> {
4646

4747
export declare class MatTreeModule {
4848
static ɵinj: i0.ɵɵInjectorDef<MatTreeModule>;
49-
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatTreeModule, [typeof i1.MatNestedTreeNode, typeof i1.MatTreeNodeDef, typeof i2.MatTreeNodePadding, typeof i3.MatTreeNodeToggle, typeof i4.MatTree, typeof i1.MatTreeNode, typeof i5.MatTreeNodeOutlet], [typeof i6.CdkTreeModule, typeof i7.MatCommonModule], [typeof i1.MatNestedTreeNode, typeof i1.MatTreeNodeDef, typeof i2.MatTreeNodePadding, typeof i3.MatTreeNodeToggle, typeof i4.MatTree, typeof i1.MatTreeNode, typeof i5.MatTreeNodeOutlet]>;
49+
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatTreeModule, [typeof i1.MatNestedTreeNode, typeof i1.MatTreeNodeDef, typeof i2.MatTreeNodePadding, typeof i3.MatTreeNodeToggle, typeof i4.MatTree, typeof i1.MatTreeNode, typeof i5.MatTreeNodeOutlet], [typeof i6.CdkTreeModule, typeof i7.MatCommonModule], [typeof i7.MatCommonModule, typeof i1.MatNestedTreeNode, typeof i1.MatTreeNodeDef, typeof i2.MatTreeNodePadding, typeof i3.MatTreeNodeToggle, typeof i4.MatTree, typeof i1.MatTreeNode, typeof i5.MatTreeNodeOutlet]>;
5050
}
5151

5252
export declare class MatTreeNestedDataSource<T> extends DataSource<T> {

0 commit comments

Comments
 (0)