diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 53e4208343a3..6f88a48cba13 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -49,7 +49,7 @@ src/lib/core/datetime/** @mmalerba # CDK src/cdk/coercion/** @jelbourn src/cdk/rxjs/** @jelbourn -src/cdk/observe-content/** @crisbeto @jelbourn +src/cdk/observers/** @crisbeto @jelbourn src/cdk/a11y/** @jelbourn @devversion src/cdk/platform/** @jelbourn @devversion src/cdk/bidi/** @jelbourn diff --git a/src/cdk/a11y/list-key-manager.spec.ts b/src/cdk/a11y/list-key-manager.spec.ts index b6d444f7156b..c03f0f1a60b9 100644 --- a/src/cdk/a11y/list-key-manager.spec.ts +++ b/src/cdk/a11y/list-key-manager.spec.ts @@ -1,7 +1,7 @@ import {QueryList} from '@angular/core'; import {fakeAsync, tick} from '@angular/core/testing'; import {FocusKeyManager} from './focus-key-manager'; -import {DOWN_ARROW, UP_ARROW, TAB} from '../keyboard/keycodes'; +import {DOWN_ARROW, UP_ARROW, TAB} from '../keycodes/keycodes'; import {ListKeyManager} from './list-key-manager'; import {ActiveDescendantKeyManager} from './activedescendant-key-manager'; import {createKeyboardEvent} from '../testing/event-objects'; diff --git a/src/cdk/a11y/list-key-manager.ts b/src/cdk/a11y/list-key-manager.ts index ef01a084f571..b347585b6699 100644 --- a/src/cdk/a11y/list-key-manager.ts +++ b/src/cdk/a11y/list-key-manager.ts @@ -10,7 +10,7 @@ import {QueryList} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {Subject} from 'rxjs/Subject'; import {Subscription} from 'rxjs/Subscription'; -import {UP_ARROW, DOWN_ARROW, TAB, A, Z} from '@angular/cdk/keyboard'; +import {UP_ARROW, DOWN_ARROW, TAB, A, Z} from '@angular/cdk/keycodes'; import {RxChain, debounceTime, filter, map, doOperator} from '@angular/cdk/rxjs'; /** diff --git a/src/cdk/keyboard/index.ts b/src/cdk/keycodes/index.ts similarity index 100% rename from src/cdk/keyboard/index.ts rename to src/cdk/keycodes/index.ts diff --git a/src/cdk/keyboard/keycodes.ts b/src/cdk/keycodes/keycodes.ts similarity index 100% rename from src/cdk/keyboard/keycodes.ts rename to src/cdk/keycodes/keycodes.ts diff --git a/src/cdk/keyboard/public_api.ts b/src/cdk/keycodes/public_api.ts similarity index 100% rename from src/cdk/keyboard/public_api.ts rename to src/cdk/keycodes/public_api.ts diff --git a/src/cdk/keyboard/tsconfig-build.json b/src/cdk/keycodes/tsconfig-build.json similarity index 84% rename from src/cdk/keyboard/tsconfig-build.json rename to src/cdk/keycodes/tsconfig-build.json index 4ee7d3dd56c5..14ba0c50bf55 100644 --- a/src/cdk/keyboard/tsconfig-build.json +++ b/src/cdk/keycodes/tsconfig-build.json @@ -7,7 +7,7 @@ "annotateForClosureCompiler": true, "strictMetadataEmit": true, "flatModuleOutFile": "index.js", - "flatModuleId": "@angular/cdk/keyboard", + "flatModuleId": "@angular/cdk/keycodes", "skipTemplateCodegen": true } } diff --git a/src/cdk/observe-content/index.ts b/src/cdk/observers/index.ts similarity index 100% rename from src/cdk/observe-content/index.ts rename to src/cdk/observers/index.ts diff --git a/src/cdk/observe-content/observe-content.spec.ts b/src/cdk/observers/observe-content.spec.ts similarity index 95% rename from src/cdk/observe-content/observe-content.spec.ts rename to src/cdk/observers/observe-content.spec.ts index 798987e7f164..4f05369ea9c3 100644 --- a/src/cdk/observe-content/observe-content.spec.ts +++ b/src/cdk/observers/observe-content.spec.ts @@ -1,6 +1,6 @@ import {Component} from '@angular/core'; import {async, TestBed, ComponentFixture, fakeAsync, tick} from '@angular/core/testing'; -import {ObserveContentModule, MdMutationObserverFactory} from './observe-content'; +import {ObserversModule, MdMutationObserverFactory} from './observe-content'; // TODO(elad): `ProxyZone` doesn't seem to capture the events raised by // `MutationObserver` and needs to be investigated @@ -9,7 +9,7 @@ describe('Observe content', () => { describe('basic usage', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [ObserveContentModule], + imports: [ObserversModule], declarations: [ComponentWithTextContent, ComponentWithChildTextContent] }); @@ -58,7 +58,7 @@ describe('Observe content', () => { callbacks = []; TestBed.configureTestingModule({ - imports: [ObserveContentModule], + imports: [ObserversModule], declarations: [ComponentWithDebouncedListener], providers: [{ provide: MdMutationObserverFactory, diff --git a/src/cdk/observe-content/observe-content.ts b/src/cdk/observers/observe-content.ts similarity index 98% rename from src/cdk/observe-content/observe-content.ts rename to src/cdk/observers/observe-content.ts index f97293417441..b698fb4757c5 100644 --- a/src/cdk/observe-content/observe-content.ts +++ b/src/cdk/observers/observe-content.ts @@ -90,4 +90,4 @@ export class ObserveContent implements AfterContentInit, OnDestroy { declarations: [ObserveContent], providers: [MdMutationObserverFactory] }) -export class ObserveContentModule {} +export class ObserversModule {} diff --git a/src/cdk/observe-content/public_api.ts b/src/cdk/observers/public_api.ts similarity index 100% rename from src/cdk/observe-content/public_api.ts rename to src/cdk/observers/public_api.ts diff --git a/src/cdk/observe-content/tsconfig-build.json b/src/cdk/observers/tsconfig-build.json similarity index 82% rename from src/cdk/observe-content/tsconfig-build.json rename to src/cdk/observers/tsconfig-build.json index f0de8927e342..ba4de8f00ad6 100644 --- a/src/cdk/observe-content/tsconfig-build.json +++ b/src/cdk/observers/tsconfig-build.json @@ -7,7 +7,7 @@ "annotateForClosureCompiler": true, "strictMetadataEmit": true, "flatModuleOutFile": "index.js", - "flatModuleId": "@angular/cdk/observe-content", + "flatModuleId": "@angular/cdk/observers", "skipTemplateCodegen": true } } diff --git a/src/demo-app/system-config.ts b/src/demo-app/system-config.ts index 058051c41368..7b2a5bdacbdd 100644 --- a/src/demo-app/system-config.ts +++ b/src/demo-app/system-config.ts @@ -30,8 +30,8 @@ System.config({ '@angular/cdk/a11y': 'dist/bundles/cdk-a11y.umd.js', '@angular/cdk/bidi': 'dist/bundles/cdk-bidi.umd.js', '@angular/cdk/coercion': 'dist/bundles/cdk-coercion.umd.js', - '@angular/cdk/keyboard': 'dist/bundles/cdk-keyboard.umd.js', - '@angular/cdk/observe-content': 'dist/bundles/cdk-observe-content.umd.js', + '@angular/cdk/keycodes': 'dist/bundles/cdk-keycodes.umd.js', + '@angular/cdk/observers': 'dist/bundles/cdk-observers.umd.js', '@angular/cdk/platform': 'dist/bundles/cdk-platform.umd.js', '@angular/cdk/portal': 'dist/bundles/cdk-portal.umd.js', '@angular/cdk/rxjs': 'dist/bundles/cdk-rxjs.umd.js', diff --git a/src/e2e-app/system-config.ts b/src/e2e-app/system-config.ts index bd06bea92646..eb615b349ea0 100644 --- a/src/e2e-app/system-config.ts +++ b/src/e2e-app/system-config.ts @@ -30,8 +30,8 @@ System.config({ '@angular/cdk/a11y': 'dist/bundles/cdk-a11y.umd.js', '@angular/cdk/bidi': 'dist/bundles/cdk-bidi.umd.js', '@angular/cdk/coercion': 'dist/bundles/cdk-coercion.umd.js', - '@angular/cdk/keyboard': 'dist/bundles/cdk-keyboard.umd.js', - '@angular/cdk/observe-content': 'dist/bundles/cdk-observe-content.umd.js', + '@angular/cdk/keycodes': 'dist/bundles/cdk-keycodes.umd.js', + '@angular/cdk/observers': 'dist/bundles/cdk-observers.umd.js', '@angular/cdk/platform': 'dist/bundles/cdk-platform.umd.js', '@angular/cdk/portal': 'dist/bundles/cdk-portal.umd.js', '@angular/cdk/rxjs': 'dist/bundles/cdk-rxjs.umd.js', diff --git a/src/lib/checkbox/index.ts b/src/lib/checkbox/index.ts index fe991e6c2b1e..103b58e112df 100644 --- a/src/lib/checkbox/index.ts +++ b/src/lib/checkbox/index.ts @@ -8,13 +8,13 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; -import {ObserveContentModule} from '@angular/cdk/observe-content'; +import {ObserversModule} from '@angular/cdk/observers'; import {MdRippleModule, MdCommonModule, FocusOriginMonitor} from '../core'; import {MdCheckbox} from './checkbox'; import {MdCheckboxRequiredValidator} from './checkbox-required-validator'; @NgModule({ - imports: [CommonModule, MdRippleModule, MdCommonModule, ObserveContentModule], + imports: [CommonModule, MdRippleModule, MdCommonModule, ObserversModule], exports: [MdCheckbox, MdCheckboxRequiredValidator, MdCommonModule], declarations: [MdCheckbox, MdCheckboxRequiredValidator], providers: [FocusOriginMonitor] diff --git a/src/lib/core/common-behaviors/common-module.ts b/src/lib/core/common-behaviors/common-module.ts index 619ab45d6785..dcc15f4b33c6 100644 --- a/src/lib/core/common-behaviors/common-module.ts +++ b/src/lib/core/common-behaviors/common-module.ts @@ -8,8 +8,8 @@ import {NgModule, InjectionToken, Optional, Inject, isDevMode} from '@angular/core'; import {DOCUMENT} from '@angular/platform-browser'; +import {BidiModule} from '@angular/cdk/bidi'; import {CompatibilityModule} from '../compatibility/compatibility'; -import {BidiModule} from '../bidi/index'; /** Injection token that configures whether the Material sanity checks are enabled. */ diff --git a/src/lib/core/core.ts b/src/lib/core/core.ts index fdf65913c617..48f600a031b1 100644 --- a/src/lib/core/core.ts +++ b/src/lib/core/core.ts @@ -7,7 +7,7 @@ */ import {NgModule} from '@angular/core'; -import {ObserveContentModule} from '@angular/cdk/observe-content'; +import {ObserversModule} from '@angular/cdk/observers'; import {MdLineModule} from './line/line'; import {BidiModule} from './bidi/index'; import {MdOptionModule} from './option/index'; @@ -24,9 +24,9 @@ export { } from '@angular/cdk/coercion'; export { - ObserveContentModule, + ObserversModule, ObserveContent, -} from '@angular/cdk/observe-content'; +} from '@angular/cdk/observers'; // RTL export {Dir, Direction, Directionality, BidiModule} from './bidi/index'; @@ -135,7 +135,7 @@ export { MdLineModule, BidiModule, MdRippleModule, - ObserveContentModule, + ObserversModule, PortalModule, OverlayModule, A11yModule, @@ -146,7 +146,7 @@ export { MdLineModule, BidiModule, MdRippleModule, - ObserveContentModule, + ObserversModule, PortalModule, OverlayModule, A11yModule, diff --git a/src/lib/core/keyboard/keycodes.ts b/src/lib/core/keyboard/keycodes.ts index ae272e4d6f19..3aef9a4baa83 100644 --- a/src/lib/core/keyboard/keycodes.ts +++ b/src/lib/core/keyboard/keycodes.ts @@ -24,4 +24,4 @@ export { DELETE, A, Z, -} from '@angular/cdk/keyboard'; +} from '@angular/cdk/keycodes'; diff --git a/src/lib/module.ts b/src/lib/module.ts index e5fa0671e79b..13a38285692d 100644 --- a/src/lib/module.ts +++ b/src/lib/module.ts @@ -13,7 +13,7 @@ import { BidiModule, MdCommonModule, MdRippleModule, - ObserveContentModule, + ObserversModule, OverlayModule, PortalModule } from './core/index'; @@ -86,7 +86,7 @@ const MATERIAL_MODULES = [ A11yModule, PlatformModule, MdCommonModule, - ObserveContentModule + ObserversModule ]; /** @deprecated */ diff --git a/src/lib/sidenav/sidenav.spec.ts b/src/lib/sidenav/sidenav.spec.ts index 7c9d10e6fb97..3a27dc4feba0 100644 --- a/src/lib/sidenav/sidenav.spec.ts +++ b/src/lib/sidenav/sidenav.spec.ts @@ -2,11 +2,11 @@ import {fakeAsync, async, tick, ComponentFixture, TestBed} from '@angular/core/t import {Component, ElementRef, ViewChild} from '@angular/core'; import {By} from '@angular/platform-browser'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; -import {MdSidenav, MdSidenavModule, MdSidenavContainer} from './index'; -import {A11yModule} from '../core/a11y/index'; -import {PlatformModule} from '../core/platform/index'; -import {ESCAPE} from '../core/keyboard/keycodes'; +import {A11yModule} from '@angular/cdk/a11y'; +import {PlatformModule} from '@angular/cdk/platform'; +import {ESCAPE} from '@angular/cdk/keycodes'; import {dispatchKeyboardEvent} from '@angular/cdk/testing'; +import {MdSidenav, MdSidenavModule, MdSidenavContainer} from './index'; describe('MdSidenav', () => { diff --git a/src/lib/tabs/index.ts b/src/lib/tabs/index.ts index 95dedfaa8744..aa4849d9a1da 100644 --- a/src/lib/tabs/index.ts +++ b/src/lib/tabs/index.ts @@ -9,7 +9,7 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {MdCommonModule} from '../core'; -import {ObserveContentModule} from '@angular/cdk/observe-content'; +import {ObserversModule} from '@angular/cdk/observers'; import {PortalModule} from '../core'; import {MdRippleModule} from '../core/ripple/index'; import {MdTab} from './tab'; @@ -30,7 +30,7 @@ import {ScrollDispatchModule} from '../core/overlay/scroll/index'; MdCommonModule, PortalModule, MdRippleModule, - ObserveContentModule, + ObserversModule, ScrollDispatchModule, ], // Don't export all components because some are only to be used internally. diff --git a/test/karma-test-shim.js b/test/karma-test-shim.js index 0762d3028718..5ef9cdc4ac91 100644 --- a/test/karma-test-shim.js +++ b/test/karma-test-shim.js @@ -52,8 +52,8 @@ System.config({ '@angular/cdk/a11y': 'dist/packages/cdk/a11y/index.js', '@angular/cdk/bidi': 'dist/packages/cdk/bidi/index.js', '@angular/cdk/coercion': 'dist/packages/cdk/coercion/index.js', - '@angular/cdk/keyboard': 'dist/packages/cdk/keyboard/index.js', - '@angular/cdk/observe-content': 'dist/packages/cdk/observe-content/index.js', + '@angular/cdk/keycodes': 'dist/packages/cdk/keycodes/index.js', + '@angular/cdk/observers': 'dist/packages/cdk/observers/index.js', '@angular/cdk/platform': 'dist/packages/cdk/platform/index.js', '@angular/cdk/portal': 'dist/packages/cdk/portal/index.js', '@angular/cdk/rxjs': 'dist/packages/cdk/rxjs/index.js',