Skip to content

Commit 4ff24a8

Browse files
committed
Move UniqueSelectionDispatcher to CDK.
BREAKING CHANGE: UniqueSelectionDispatcher, UniqueSelectionDispatcherListener and UNIQUE_SELECTION_DISPATCHER_PROVIDER are no longer available from @angular/material and instead must be imported from @angular/cdk/collections
1 parent 4383f51 commit 4ff24a8

File tree

4 files changed

+95
-2
lines changed

4 files changed

+95
-2
lines changed

src/lib/button-toggle/public_api.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
import {MdButtonToggleGroup, MdButtonToggleGroupMultiple, MdButtonToggle} from './button-toggle';
11+
import {A11yModule} from '@angular/cdk/a11y';
12+
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/cdk/collections';
13+
import {MdCommonModule} from '@angular/material/core';
14+
15+
16+
@NgModule({
17+
imports: [MdCommonModule, A11yModule],
18+
exports: [
19+
MdButtonToggleGroup,
20+
MdButtonToggleGroupMultiple,
21+
MdButtonToggle,
22+
MdCommonModule,
23+
],
24+
declarations: [MdButtonToggleGroup, MdButtonToggleGroupMultiple, MdButtonToggle],
25+
providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER]
26+
})
27+
export class MdButtonToggleModule {}
28+
29+
30+
export * from './button-toggle';

src/lib/expansion/public_api.ts

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {CommonModule} from '@angular/common';
10+
import {NgModule} from '@angular/core';
11+
import {A11yModule} from '@angular/cdk/a11y';
12+
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/cdk/collections';
13+
import {CompatibilityModule} from '@angular/material/core';
14+
import {CdkAccordion, MdAccordion} from './accordion';
15+
import {MdExpansionPanel, MdExpansionPanelActionRow} from './expansion-panel';
16+
import {
17+
MdExpansionPanelDescription,
18+
MdExpansionPanelHeader,
19+
MdExpansionPanelTitle,
20+
} from './expansion-panel-header';
21+
22+
23+
@NgModule({
24+
imports: [CompatibilityModule, CommonModule, A11yModule],
25+
exports: [
26+
CdkAccordion,
27+
MdAccordion,
28+
MdExpansionPanel,
29+
MdExpansionPanelActionRow,
30+
MdExpansionPanelHeader,
31+
MdExpansionPanelTitle,
32+
MdExpansionPanelDescription
33+
],
34+
declarations: [
35+
CdkAccordion,
36+
MdAccordion,
37+
MdExpansionPanel,
38+
MdExpansionPanelActionRow,
39+
MdExpansionPanelHeader,
40+
MdExpansionPanelTitle,
41+
MdExpansionPanelDescription
42+
],
43+
providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER]
44+
})
45+
export class MdExpansionModule {}
46+
47+
export {
48+
CdkAccordion,
49+
MdAccordion,
50+
MdAccordionDisplayMode
51+
} from './accordion';
52+
export {AccordionItem} from './accordion-item';
53+
export {
54+
MdExpansionPanel,
55+
MdExpansionPanelState,
56+
MdExpansionPanelActionRow
57+
} from './expansion-panel';
58+
export {
59+
MdExpansionPanelHeader,
60+
MdExpansionPanelDescription,
61+
MdExpansionPanelTitle
62+
} from './expansion-panel-header';
63+

src/lib/radio/radio-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
import {NgModule} from '@angular/core';
1010
import {CommonModule} from '@angular/common';
11+
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/cdk/collections';
1112
import {VIEWPORT_RULER_PROVIDER} from '@angular/cdk/overlay';
1213
import {
1314
MatRippleModule,
1415
MatCommonModule,
1516
} from '@angular/material/core';
1617
import {MatRadioGroup, MatRadioButton} from './radio';
17-
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/cdk/collections';
1818
import {A11yModule} from '@angular/cdk/a11y';
1919

2020
@NgModule({

src/lib/radio/radio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
218218
* This allows us to propagate relevant attributes to associated buttons.
219219
*/
220220
ngAfterContentInit() {
221-
// Mark this component as initialized in AfterContentInit because the initial value can
221+
// Mark this component as initializeimport {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/cdk/collections';d in AfterContentInit because the initial value can
222222
// possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the
223223
// NgModel occurs *after* the OnInit of the MatRadioGroup.
224224
this._isInitialized = true;

0 commit comments

Comments
 (0)