diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 35aea4555d52..40eee3c0e762 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -49,7 +49,7 @@ lib/core/datetime/** @mmalerba # CDK cdk/coercion/** @jelbourn cdk/rxjs/** @jelbourn -cdk/observe-content/** @crisbeto @jelbourn +cdk/observers/** @crisbeto @jelbourn cdk/a11y/** @jelbourn @devversion cdk/platform/** @jelbourn @devversion cdk/bidi/** @jelbourn diff --git a/scripts/closure-compiler/build-devapp-bundle.sh b/scripts/closure-compiler/build-devapp-bundle.sh index bc85d749298d..a46ba7dc649f 100755 --- a/scripts/closure-compiler/build-devapp-bundle.sh +++ b/scripts/closure-compiler/build-devapp-bundle.sh @@ -46,8 +46,8 @@ OPTS=( "--js_module_root=dist/releases/cdk/a11y" "--js_module_root=dist/releases/cdk/bidi" "--js_module_root=dist/releases/cdk/coercion" - "--js_module_root=dist/releases/cdk/keyboard" - "--js_module_root=dist/releases/cdk/observe-content" + "--js_module_root=dist/releases/cdk/keycodes" + "--js_module_root=dist/releases/cdk/observers" "--js_module_root=dist/releases/cdk/platform" "--js_module_root=dist/releases/cdk/portal" "--js_module_root=dist/releases/cdk/rxjs" @@ -74,7 +74,7 @@ OPTS=( dist/releases/cdk/@angular/cdk/a11y.js dist/releases/cdk/@angular/cdk/bidi.js dist/releases/cdk/@angular/cdk/coercion.js - dist/releases/cdk/@angular/cdk/keyboard.js + dist/releases/cdk/@angular/cdk/keycodes.js dist/releases/cdk/@angular/cdk/observe-content.js dist/releases/cdk/@angular/cdk/platform.js dist/releases/cdk/@angular/cdk/portal.js diff --git a/src/cdk/a11y/list-key-manager.spec.ts b/src/cdk/a11y/list-key-manager.spec.ts index 29e887a02b21..01bd607587e1 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 0a57b6484034..aef7b4dd1310 100644 --- a/src/cdk/a11y/list-key-manager.ts +++ b/src/cdk/a11y/list-key-manager.ts @@ -9,7 +9,8 @@ import {QueryList} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {Subject} from 'rxjs/Subject'; -import {UP_ARROW, DOWN_ARROW, TAB} from '@angular/cdk/keyboard'; +import {UP_ARROW, DOWN_ARROW, TAB} from '@angular/cdk/keycodes'; + /** * This interface is for items that can be disabled. The type passed into diff --git a/src/cdk/a11y/tsconfig-build.json b/src/cdk/a11y/tsconfig-build.json index e86343ebd466..efb29d3fe543 100644 --- a/src/cdk/a11y/tsconfig-build.json +++ b/src/cdk/a11y/tsconfig-build.json @@ -5,7 +5,7 @@ "baseUrl": ".", "paths": { "@angular/cdk/coercion": ["../../../dist/packages/cdk/coercion/public_api"], - "@angular/cdk/keyboard": ["../../../dist/packages/cdk/keyboard/public_api"], + "@angular/cdk/keycodes": ["../../../dist/packages/cdk/keycodes/public_api"], "@angular/cdk/platform": ["../../../dist/packages/cdk/platform/public_api"], "@angular/cdk/rxjs": ["../../../dist/packages/cdk/rxjs/public_api"] } 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 88% rename from src/cdk/keyboard/tsconfig-build.json rename to src/cdk/keycodes/tsconfig-build.json index 462a113c07c7..f811c39a3c31 100644 --- a/src/cdk/keyboard/tsconfig-build.json +++ b/src/cdk/keycodes/tsconfig-build.json @@ -11,7 +11,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 89% rename from src/cdk/observe-content/tsconfig-build.json rename to src/cdk/observers/tsconfig-build.json index 24b52a6225b6..1f326008ee6b 100644 --- a/src/cdk/observe-content/tsconfig-build.json +++ b/src/cdk/observers/tsconfig-build.json @@ -14,7 +14,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 1bb92517f830..524e66fce11d 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'; @NgModule({ - imports: [CommonModule, MdRippleModule, MdCommonModule, ObserveContentModule], + imports: [CommonModule, MdRippleModule, MdCommonModule, ObserversModule], exports: [MdCheckbox, MdCommonModule], declarations: [MdCheckbox], 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 97deda36b866..e6913609ded8 100644 --- a/src/lib/core/keyboard/keycodes.ts +++ b/src/lib/core/keyboard/keycodes.ts @@ -22,4 +22,4 @@ export { ESCAPE, BACKSPACE, DELETE -} 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/table/cell.ts b/src/lib/table/cell.ts index 2ae636c97d50..f2103edb1021 100644 --- a/src/lib/table/cell.ts +++ b/src/lib/table/cell.ts @@ -7,7 +7,13 @@ */ import {Directive, ElementRef, Input, Renderer2} from '@angular/core'; -import {CdkCell, CdkCellDef, CdkColumnDef, CdkHeaderCell, CdkHeaderCellDef} from '@angular/cdk/table'; +import { + CdkCell, + CdkCellDef, + CdkColumnDef, + CdkHeaderCell, + CdkHeaderCellDef, +} from '@angular/cdk/table'; /** Workaround for https://github.com/angular/angular/issues/17849 */ export const _MdCellDef = CdkCellDef; diff --git a/src/lib/table/row.ts b/src/lib/table/row.ts index 9d9beff84fea..f7d3be1b3457 100644 --- a/src/lib/table/row.ts +++ b/src/lib/table/row.ts @@ -7,7 +7,13 @@ */ import {ChangeDetectionStrategy, Component, Directive} from '@angular/core'; -import {CdkHeaderRow, CdkRow, CDK_ROW_TEMPLATE, CdkRowDef, CdkHeaderRowDef} from '@angular/cdk/table'; +import { + CDK_ROW_TEMPLATE, + CdkHeaderRow, + CdkHeaderRowDef, + CdkRow, + CdkRowDef, +} from '@angular/cdk/table'; /** Workaround for https://github.com/angular/angular/issues/17849 */ export const _MdHeaderRowDef = CdkHeaderRowDef; 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/src/lib/tsconfig-build.json b/src/lib/tsconfig-build.json index a956c3f49f42..047dc1709449 100644 --- a/src/lib/tsconfig-build.json +++ b/src/lib/tsconfig-build.json @@ -24,8 +24,8 @@ "@angular/cdk/a11y": ["../../dist/packages/cdk/a11y/public_api"], "@angular/cdk/bidi": ["../../dist/packages/cdk/bidi/public_api"], "@angular/cdk/coercion": ["../../dist/packages/cdk/coercion/public_api"], - "@angular/cdk/keyboard": ["../../dist/packages/cdk/keyboard/public_api"], - "@angular/cdk/observe-content": ["../../dist/packages/cdk/observe-content/public_api"], + "@angular/cdk/keycodes": ["../../dist/packages/cdk/keycodes/public_api"], + "@angular/cdk/observers": ["../../dist/packages/cdk/observers/public_api"], "@angular/cdk/platform": ["../../dist/packages/cdk/platform/public_api"], "@angular/cdk/portal": ["../../dist/packages/cdk/portal/public_api"], "@angular/cdk/rxjs": ["../../dist/packages/cdk/rxjs/public_api"], diff --git a/src/material-examples/tsconfig-build.json b/src/material-examples/tsconfig-build.json index 49736c2fb12a..5b1ac2b71d48 100644 --- a/src/material-examples/tsconfig-build.json +++ b/src/material-examples/tsconfig-build.json @@ -26,11 +26,11 @@ "@angular/cdk/coercion": ["../../dist/packages/cdk/coercion/public_api"], "@angular/cdk/platform": ["../../dist/packages/cdk/platform/public_api"], "@angular/cdk/portal": ["../../dist/packages/cdk/portal/public_api"], - "@angular/cdk/keyboard": ["../../dist/packages/cdk/keyboard/public_api"], + "@angular/cdk/keycodes": ["../../dist/packages/cdk/keycodes/public_api"], "@angular/cdk/rxjs": ["../../dist/packages/cdk/rxjs/public_api"], "@angular/cdk/table": ["../../dist/packages/cdk/table/public_api"], "@angular/cdk/testing": ["../../dist/packages/cdk/testing/public_api"], - "@angular/cdk/observe-content": ["../../dist/packages/cdk/observe-content/public_api"] + "@angular/cdk/observers": ["../../dist/packages/cdk/observers/public_api"] } }, "files": [ 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', diff --git a/tools/package-tools/rollup-helpers.ts b/tools/package-tools/rollup-helpers.ts index 5db30a14ff02..b446f9dd1622 100644 --- a/tools/package-tools/rollup-helpers.ts +++ b/tools/package-tools/rollup-helpers.ts @@ -27,8 +27,8 @@ const ROLLUP_GLOBALS = { '@angular/cdk/a11y': 'ng.cdk.a11y', '@angular/cdk/bidi': 'ng.cdk.bidi', '@angular/cdk/coercion': 'ng.cdk.coercion', - '@angular/cdk/keyboard': 'ng.cdk.keyboard', - '@angular/cdk/observe-content': 'ng.cdk.observeContent', + '@angular/cdk/keycodes': 'ng.cdk.keycodes', + '@angular/cdk/observers': 'ng.cdk.observers', '@angular/cdk/platform': 'ng.cdk.platform', '@angular/cdk/portal': 'ng.cdk.portal', '@angular/cdk/rxjs': 'ng.cdk.rxjs', diff --git a/tools/package-tools/secondary-entry-points.ts b/tools/package-tools/secondary-entry-points.ts index e81dc4f30135..748f06cf0d50 100644 --- a/tools/package-tools/secondary-entry-points.ts +++ b/tools/package-tools/secondary-entry-points.ts @@ -1,6 +1,5 @@ import {join} from 'path'; -import {readdirSync, lstatSync} from 'fs'; -import {buildConfig} from './build-config'; +import {lstatSync, readdirSync} from 'fs'; /** @@ -10,12 +9,12 @@ import {buildConfig} from './build-config'; const CDK_ENTRY_POINTS = [ 'coercion', 'rxjs', - 'keyboard', + 'keycodes', 'platform', 'bidi', 'table', 'portal', - 'observe-content', + 'observers', 'a11y', ];