mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore: move UniqueSelectionDispatcher to cdk (#6928)
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
This commit is contained in:
@@ -9,3 +9,8 @@
|
||||
export * from './collection-viewer';
|
||||
export * from './data-source';
|
||||
export * from './selection';
|
||||
export {
|
||||
UniqueSelectionDispatcher,
|
||||
UniqueSelectionDispatcherListener,
|
||||
UNIQUE_SELECTION_DISPATCHER_PROVIDER,
|
||||
} from './unique-selection-dispatcher';
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ export class UniqueSelectionDispatcher {
|
||||
/**
|
||||
* Listen for future changes to item selection.
|
||||
* @return Function used to deregister listener
|
||||
**/
|
||||
*/
|
||||
listen(listener: UniqueSelectionDispatcherListener): () => void {
|
||||
this._listeners.push(listener);
|
||||
return () => {
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatButtonToggleGroup, MatButtonToggleGroupMultiple, MatButtonToggle} from './button-toggle';
|
||||
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER, MatCommonModule} from '@angular/material/core';
|
||||
import {MatCommonModule} from '@angular/material/core';
|
||||
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/cdk/collections';
|
||||
import {A11yModule} from '@angular/cdk/a11y';
|
||||
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ import {
|
||||
} from '@angular/core';
|
||||
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';
|
||||
import {coerceBooleanProperty} from '@angular/cdk/coercion';
|
||||
import {UniqueSelectionDispatcher} from '@angular/material/core';
|
||||
import {CanDisable, mixinDisabled} from '@angular/material/core';
|
||||
import {FocusMonitor} from '@angular/cdk/a11y';
|
||||
import {UniqueSelectionDispatcher} from '@angular/cdk/collections';
|
||||
|
||||
/** Acceptable types for a button toggle. */
|
||||
export type ToggleType = 'checkbox' | 'radio';
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
export * from './animation/animation';
|
||||
export * from './common-behaviors/index';
|
||||
export * from './compatibility/compatibility';
|
||||
export * from './coordination/unique-selection-dispatcher';
|
||||
export * from './datetime/index';
|
||||
export * from './error/error-options';
|
||||
export * from './gestures/gesture-annotations';
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
Optional,
|
||||
ChangeDetectorRef,
|
||||
} from '@angular/core';
|
||||
import {UniqueSelectionDispatcher} from '@angular/material/core';
|
||||
import {UniqueSelectionDispatcher} from '@angular/cdk/collections';
|
||||
import {CdkAccordion} from './accordion';
|
||||
|
||||
/** Used to generate unique ID for each expansion panel. */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/material/core';
|
||||
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/cdk/collections';
|
||||
import {A11yModule} from '@angular/cdk/a11y';
|
||||
import {CdkAccordion, MatAccordion} from './accordion';
|
||||
import {MatExpansionPanel, MatExpansionPanelActionRow} from './expansion-panel';
|
||||
|
||||
@@ -21,7 +21,8 @@ import {
|
||||
SimpleChanges,
|
||||
ViewEncapsulation,
|
||||
} from '@angular/core';
|
||||
import {CanDisable, mixinDisabled, UniqueSelectionDispatcher} from '@angular/material/core';
|
||||
import {UniqueSelectionDispatcher} from '@angular/cdk/collections';
|
||||
import {CanDisable, mixinDisabled} from '@angular/material/core';
|
||||
import {Subject} from 'rxjs/Subject';
|
||||
import {MatAccordion} from './accordion';
|
||||
import {AccordionItem} from './accordion-item';
|
||||
|
||||
@@ -12,9 +12,9 @@ import {VIEWPORT_RULER_PROVIDER} from '@angular/cdk/overlay';
|
||||
import {
|
||||
MatRippleModule,
|
||||
MatCommonModule,
|
||||
UNIQUE_SELECTION_DISPATCHER_PROVIDER,
|
||||
} from '@angular/material/core';
|
||||
import {MatRadioGroup, MatRadioButton} from './radio';
|
||||
import {UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/cdk/collections';
|
||||
import {A11yModule} from '@angular/cdk/a11y';
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -37,9 +37,9 @@ import {
|
||||
mixinDisabled,
|
||||
mixinDisableRipple,
|
||||
RippleRef,
|
||||
UniqueSelectionDispatcher,
|
||||
} from '@angular/material/core';
|
||||
import {coerceBooleanProperty} from '@angular/cdk/coercion';
|
||||
import {UniqueSelectionDispatcher} from '@angular/cdk/collections';
|
||||
import {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';
|
||||
|
||||
// Increasing integer for generating unique ids for radio components.
|
||||
|
||||
Reference in New Issue
Block a user