From 0e4806b06c31c4968cd23a16f73bdcee8fe44cde Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Wed, 20 Sep 2017 15:49:06 -0700 Subject: [PATCH] chore: move mat re-exports to package where their metadata lives (#7193) This also required creating a module file for every component because the max re-export can't be in the same file as the module definition or else ngc will *only* export the alias. --- src/lib/autocomplete/autocomplete-module.ts | 25 + src/lib/autocomplete/mat-exports.ts | 27 + src/lib/autocomplete/public_api.ts | 21 +- src/lib/button-toggle/button-toggle-module.ts | 26 + src/lib/button-toggle/mat-exports.ts | 26 + src/lib/button-toggle/public_api.ts | 22 +- src/lib/button/button-module.ts | 51 ++ src/lib/button/mat-exports.ts | 29 + src/lib/button/public_api.ts | 47 +- src/lib/card/card-module.ts | 54 ++ src/lib/card/mat-exports.ts | 42 ++ src/lib/card/public_api.ts | 50 +- src/lib/checkbox/checkbox-module.ts | 22 + src/lib/checkbox/mat-exports.ts | 28 + src/lib/checkbox/public_api.ts | 18 +- src/lib/chips/chips-module.ts | 20 + src/lib/chips/mat-exports.ts | 24 + src/lib/chips/public_api.ts | 14 +- src/lib/core/mat-exports.ts | 49 ++ src/lib/core/public_api.ts | 1 + src/lib/datepicker/datepicker-module.ts | 67 +++ src/lib/datepicker/mat-exports.ts | 48 ++ src/lib/datepicker/public_api.ts | 63 +-- src/lib/dialog/dialog-module.ts | 54 ++ src/lib/dialog/mat-exports.ts | 40 ++ src/lib/dialog/public_api.ts | 49 +- src/lib/expansion/expansion-module.ts | 44 ++ src/lib/expansion/mat-exports.ts | 31 ++ src/lib/expansion/public_api.ts | 39 +- src/lib/form-field/form-field-module.ts | 42 ++ src/lib/form-field/mat-exports.ts | 28 + src/lib/form-field/public_api.ts | 39 +- src/lib/grid-list/grid-list-module.ts | 39 ++ src/lib/grid-list/mat-exports.ts | 16 + src/lib/grid-list/public_api.ts | 35 +- src/lib/icon/icon-module.ts | 21 + src/lib/icon/mat-exports.ts | 17 + src/lib/icon/public_api.ts | 17 +- src/lib/input/input-module.ts | 35 ++ src/lib/input/mat-exports.ts | 16 + src/lib/input/public_api.ts | 30 +- src/lib/list/list-module.ts | 63 +++ src/lib/list/mat-exports.ts | 48 ++ src/lib/list/public_api.ts | 59 +- src/lib/mat-exports.ts | 527 ------------------ src/lib/menu/mat-exports.ts | 26 + src/lib/menu/menu-module.ts | 40 ++ src/lib/menu/public_api.ts | 36 +- src/lib/paginator/mat-exports.ts | 16 + src/lib/paginator/paginator-module.ts | 29 + src/lib/paginator/public_api.ts | 25 +- src/lib/progress-bar/mat-exports.ts | 14 + src/lib/progress-bar/progress-bar-module.ts | 20 + src/lib/progress-bar/public_api.ts | 16 +- src/lib/progress-spinner/mat-exports.ts | 22 + .../progress-spinner-module.ts | 32 ++ src/lib/progress-spinner/public_api.ts | 28 +- src/lib/public_api.ts | 9 - src/lib/radio/mat-exports.ts | 26 + src/lib/radio/public_api.ts | 22 +- src/lib/radio/radio-module.ts | 26 + src/lib/select/mat-exports.ts | 28 + src/lib/select/public_api.ts | 23 +- src/lib/select/select-module.ts | 27 + src/lib/sidenav/mat-exports.ts | 19 + src/lib/sidenav/public_api.ts | 19 +- src/lib/sidenav/sidenav-module.ts | 23 + src/lib/slide-toggle/mat-exports.ts | 22 + src/lib/slide-toggle/public_api.ts | 26 +- src/lib/slide-toggle/slide-toggle-module.ts | 30 + src/lib/slider/mat-exports.ts | 22 + src/lib/slider/public_api.ts | 20 +- src/lib/slider/slider-module.ts | 24 + src/lib/snack-bar/mat-exports.ts | 21 + src/lib/snack-bar/public_api.ts | 28 +- src/lib/snack-bar/snack-bar-module.ts | 32 ++ src/lib/sort/mat-exports.ts | 19 + src/lib/sort/public_api.ts | 16 +- src/lib/sort/sort-module.ts | 22 + src/lib/stepper/mat-exports.ts | 29 + src/lib/stepper/public_api.ts | 40 +- src/lib/stepper/stepper-module.ts | 45 ++ src/lib/table/mat-exports.ts | 23 + src/lib/table/public_api.ts | 23 +- src/lib/table/table-module.ts | 28 + src/lib/tabs/mat-exports.ts | 34 ++ src/lib/tabs/public_api.ts | 52 +- src/lib/tabs/tabs-module.ts | 56 ++ src/lib/toolbar/mat-exports.ts | 16 + src/lib/toolbar/public_api.ts | 15 +- src/lib/toolbar/toolbar-module.ts | 19 + src/lib/tooltip/mat-exports.ts | 23 + src/lib/tooltip/public_api.ts | 27 +- src/lib/tooltip/tooltip-module.ts | 31 ++ tools/package-tools/secondary-entry-points.ts | 2 +- 95 files changed, 1938 insertions(+), 1396 deletions(-) create mode 100644 src/lib/autocomplete/autocomplete-module.ts create mode 100644 src/lib/autocomplete/mat-exports.ts create mode 100644 src/lib/button-toggle/button-toggle-module.ts create mode 100644 src/lib/button-toggle/mat-exports.ts create mode 100644 src/lib/button/button-module.ts create mode 100644 src/lib/button/mat-exports.ts create mode 100644 src/lib/card/card-module.ts create mode 100644 src/lib/card/mat-exports.ts create mode 100644 src/lib/checkbox/checkbox-module.ts create mode 100644 src/lib/checkbox/mat-exports.ts create mode 100644 src/lib/chips/chips-module.ts create mode 100644 src/lib/chips/mat-exports.ts create mode 100644 src/lib/core/mat-exports.ts create mode 100644 src/lib/datepicker/datepicker-module.ts create mode 100644 src/lib/datepicker/mat-exports.ts create mode 100644 src/lib/dialog/dialog-module.ts create mode 100644 src/lib/dialog/mat-exports.ts create mode 100644 src/lib/expansion/expansion-module.ts create mode 100644 src/lib/expansion/mat-exports.ts create mode 100644 src/lib/form-field/form-field-module.ts create mode 100644 src/lib/form-field/mat-exports.ts create mode 100644 src/lib/grid-list/grid-list-module.ts create mode 100644 src/lib/grid-list/mat-exports.ts create mode 100644 src/lib/icon/icon-module.ts create mode 100644 src/lib/icon/mat-exports.ts create mode 100644 src/lib/input/input-module.ts create mode 100644 src/lib/input/mat-exports.ts create mode 100644 src/lib/list/list-module.ts create mode 100644 src/lib/list/mat-exports.ts delete mode 100644 src/lib/mat-exports.ts create mode 100644 src/lib/menu/mat-exports.ts create mode 100644 src/lib/menu/menu-module.ts create mode 100644 src/lib/paginator/mat-exports.ts create mode 100644 src/lib/paginator/paginator-module.ts create mode 100644 src/lib/progress-bar/mat-exports.ts create mode 100644 src/lib/progress-bar/progress-bar-module.ts create mode 100644 src/lib/progress-spinner/mat-exports.ts create mode 100644 src/lib/progress-spinner/progress-spinner-module.ts create mode 100644 src/lib/radio/mat-exports.ts create mode 100644 src/lib/radio/radio-module.ts create mode 100644 src/lib/select/mat-exports.ts create mode 100644 src/lib/select/select-module.ts create mode 100644 src/lib/sidenav/mat-exports.ts create mode 100644 src/lib/sidenav/sidenav-module.ts create mode 100644 src/lib/slide-toggle/mat-exports.ts create mode 100644 src/lib/slide-toggle/slide-toggle-module.ts create mode 100644 src/lib/slider/mat-exports.ts create mode 100644 src/lib/slider/slider-module.ts create mode 100644 src/lib/snack-bar/mat-exports.ts create mode 100644 src/lib/snack-bar/snack-bar-module.ts create mode 100644 src/lib/sort/mat-exports.ts create mode 100644 src/lib/sort/sort-module.ts create mode 100644 src/lib/stepper/mat-exports.ts create mode 100644 src/lib/stepper/stepper-module.ts create mode 100644 src/lib/table/mat-exports.ts create mode 100644 src/lib/table/table-module.ts create mode 100644 src/lib/tabs/mat-exports.ts create mode 100644 src/lib/tabs/tabs-module.ts create mode 100644 src/lib/toolbar/mat-exports.ts create mode 100644 src/lib/toolbar/toolbar-module.ts create mode 100644 src/lib/tooltip/mat-exports.ts create mode 100644 src/lib/tooltip/tooltip-module.ts diff --git a/src/lib/autocomplete/autocomplete-module.ts b/src/lib/autocomplete/autocomplete-module.ts new file mode 100644 index 00000000000..4fbc35f2f31 --- /dev/null +++ b/src/lib/autocomplete/autocomplete-module.ts @@ -0,0 +1,25 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {OverlayModule} from '@angular/cdk/overlay'; +import {MdOptionModule, MdCommonModule} from '@angular/material/core'; +import {MdAutocomplete} from './autocomplete'; +import { + MdAutocompleteTrigger, + MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER, +} from './autocomplete-trigger'; + +@NgModule({ + imports: [MdOptionModule, OverlayModule, MdCommonModule, CommonModule], + exports: [MdAutocomplete, MdOptionModule, MdAutocompleteTrigger, MdCommonModule], + declarations: [MdAutocomplete, MdAutocompleteTrigger], + providers: [MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER], +}) +export class MdAutocompleteModule {} diff --git a/src/lib/autocomplete/mat-exports.ts b/src/lib/autocomplete/mat-exports.ts new file mode 100644 index 00000000000..adf1f587a71 --- /dev/null +++ b/src/lib/autocomplete/mat-exports.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdAutocomplete} from './autocomplete'; +import {MdAutocompleteModule} from './autocomplete-module'; +import { + MD_AUTOCOMPLETE_SCROLL_STRATEGY, + MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER, + MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY, + MD_AUTOCOMPLETE_VALUE_ACCESSOR, + MdAutocompleteTrigger, +} from './autocomplete-trigger'; + + +/* tslint:disable:max-line-length */ +export {MD_AUTOCOMPLETE_SCROLL_STRATEGY as MAT_AUTOCOMPLETE_SCROLL_STRATEGY}; +export {MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER as MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER}; +export {MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY}; +export {MD_AUTOCOMPLETE_VALUE_ACCESSOR as MAT_AUTOCOMPLETE_VALUE_ACCESSOR}; +export {MdAutocomplete as MatAutocomplete}; +export {MdAutocompleteModule as MatAutocompleteModule}; +export {MdAutocompleteTrigger as MatAutocompleteTrigger}; diff --git a/src/lib/autocomplete/public_api.ts b/src/lib/autocomplete/public_api.ts index 0f672a71b64..ce1e1dfacde 100644 --- a/src/lib/autocomplete/public_api.ts +++ b/src/lib/autocomplete/public_api.ts @@ -6,24 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {OverlayModule} from '@angular/cdk/overlay'; -import {MdOptionModule, MdCommonModule} from '@angular/material/core'; -import {MdAutocomplete} from './autocomplete'; -import { - MdAutocompleteTrigger, - MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER, -} from './autocomplete-trigger'; - -@NgModule({ - imports: [MdOptionModule, OverlayModule, MdCommonModule, CommonModule], - exports: [MdAutocomplete, MdOptionModule, MdAutocompleteTrigger, MdCommonModule], - declarations: [MdAutocomplete, MdAutocompleteTrigger], - providers: [MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER], -}) -export class MdAutocompleteModule {} - - export * from './autocomplete'; +export * from './autocomplete-module'; export * from './autocomplete-trigger'; +export * from './mat-exports'; diff --git a/src/lib/button-toggle/button-toggle-module.ts b/src/lib/button-toggle/button-toggle-module.ts new file mode 100644 index 00000000000..e14857e5b6a --- /dev/null +++ b/src/lib/button-toggle/button-toggle-module.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdButtonToggleGroup, MdButtonToggleGroupMultiple, MdButtonToggle} from './button-toggle'; +import {UNIQUE_SELECTION_DISPATCHER_PROVIDER, MdCommonModule} from '@angular/material/core'; +import {A11yModule} from '@angular/cdk/a11y'; + + +@NgModule({ + imports: [MdCommonModule, A11yModule], + exports: [ + MdButtonToggleGroup, + MdButtonToggleGroupMultiple, + MdButtonToggle, + MdCommonModule, + ], + declarations: [MdButtonToggleGroup, MdButtonToggleGroupMultiple, MdButtonToggle], + providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER] +}) +export class MdButtonToggleModule {} diff --git a/src/lib/button-toggle/mat-exports.ts b/src/lib/button-toggle/mat-exports.ts new file mode 100644 index 00000000000..cc90bd8db34 --- /dev/null +++ b/src/lib/button-toggle/mat-exports.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, + MdButtonToggle, + MdButtonToggleChange, + MdButtonToggleGroup, + MdButtonToggleGroupBase, + MdButtonToggleGroupMultiple, +} from './button-toggle'; +import {MdButtonToggleModule} from './button-toggle-module'; + + +export {MD_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR as MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR}; +export {MdButtonToggle as MatButtonToggle}; +export {MdButtonToggleChange as MatButtonToggleChange}; +export {MdButtonToggleGroup as MatButtonToggleGroup}; +export {MdButtonToggleGroupBase as MatButtonToggleGroupBase}; +export {MdButtonToggleGroupMultiple as MatButtonToggleGroupMultiple}; +export {MdButtonToggleModule as MatButtonToggleModule}; diff --git a/src/lib/button-toggle/public_api.ts b/src/lib/button-toggle/public_api.ts index f9660192a22..22b48b8b9e1 100644 --- a/src/lib/button-toggle/public_api.ts +++ b/src/lib/button-toggle/public_api.ts @@ -6,24 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdButtonToggleGroup, MdButtonToggleGroupMultiple, MdButtonToggle} from './button-toggle'; -import {UNIQUE_SELECTION_DISPATCHER_PROVIDER, MdCommonModule} from '@angular/material/core'; -import {A11yModule} from '@angular/cdk/a11y'; - - -@NgModule({ - imports: [MdCommonModule, A11yModule], - exports: [ - MdButtonToggleGroup, - MdButtonToggleGroupMultiple, - MdButtonToggle, - MdCommonModule, - ], - declarations: [MdButtonToggleGroup, MdButtonToggleGroupMultiple, MdButtonToggle], - providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER] -}) -export class MdButtonToggleModule {} - - export * from './button-toggle'; +export * from './button-toggle-module'; +export * from './mat-exports'; diff --git a/src/lib/button/button-module.ts b/src/lib/button/button-module.ts new file mode 100644 index 00000000000..c32e3fa71ac --- /dev/null +++ b/src/lib/button/button-module.ts @@ -0,0 +1,51 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {MdCommonModule, MdRippleModule} from '@angular/material/core'; +import {A11yModule} from '@angular/cdk/a11y'; +import { + MdAnchor, + MdButton, + MdMiniFab, + MdButtonCssMatStyler, + MdFab, + MdIconButtonCssMatStyler, + MdRaisedButtonCssMatStyler +} from './button'; + + +@NgModule({ + imports: [ + CommonModule, + MdRippleModule, + MdCommonModule, + A11yModule, + ], + exports: [ + MdButton, + MdAnchor, + MdMiniFab, + MdFab, + MdCommonModule, + MdButtonCssMatStyler, + MdRaisedButtonCssMatStyler, + MdIconButtonCssMatStyler, + ], + declarations: [ + MdButton, + MdAnchor, + MdMiniFab, + MdFab, + MdButtonCssMatStyler, + MdRaisedButtonCssMatStyler, + MdIconButtonCssMatStyler, + ], +}) +export class MdButtonModule {} diff --git a/src/lib/button/mat-exports.ts b/src/lib/button/mat-exports.ts new file mode 100644 index 00000000000..61e08fd808d --- /dev/null +++ b/src/lib/button/mat-exports.ts @@ -0,0 +1,29 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MdAnchor, + MdButton, + MdButtonBase, + MdButtonCssMatStyler, + MdFab, + MdIconButtonCssMatStyler, + MdMiniFab, + MdRaisedButtonCssMatStyler, +} from './button'; +import {MdButtonModule} from './button-module'; + +export {MdButton as MatButton}; +export {MdButtonBase as MatButtonBase}; +export {MdButtonCssMatStyler as MatButtonCssMatStyler}; +export {MdButtonModule as MatButtonModule}; +export {MdAnchor as MatAnchor}; +export {MdIconButtonCssMatStyler as MatIconButtonCssMatStyler}; +export {MdFab as MatFab}; +export {MdMiniFab as MatMiniFab}; +export {MdRaisedButtonCssMatStyler as MatRaisedButtonCssMatStyler}; diff --git a/src/lib/button/public_api.ts b/src/lib/button/public_api.ts index defe5b13cab..7867a26b0db 100644 --- a/src/lib/button/public_api.ts +++ b/src/lib/button/public_api.ts @@ -6,49 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {MdCommonModule, MdRippleModule} from '@angular/material/core'; -import {A11yModule} from '@angular/cdk/a11y'; -import { - MdAnchor, - MdButton, - MdMiniFab, - MdButtonCssMatStyler, - MdFab, - MdIconButtonCssMatStyler, - MdRaisedButtonCssMatStyler -} from './button'; - - +export * from './button-module'; export * from './button'; - - -@NgModule({ - imports: [ - CommonModule, - MdRippleModule, - MdCommonModule, - A11yModule, - ], - exports: [ - MdButton, - MdAnchor, - MdMiniFab, - MdFab, - MdCommonModule, - MdButtonCssMatStyler, - MdRaisedButtonCssMatStyler, - MdIconButtonCssMatStyler, - ], - declarations: [ - MdButton, - MdAnchor, - MdMiniFab, - MdFab, - MdButtonCssMatStyler, - MdRaisedButtonCssMatStyler, - MdIconButtonCssMatStyler, - ], -}) -export class MdButtonModule {} +export * from './mat-exports'; diff --git a/src/lib/card/card-module.ts b/src/lib/card/card-module.ts new file mode 100644 index 00000000000..3843333c7fd --- /dev/null +++ b/src/lib/card/card-module.ts @@ -0,0 +1,54 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdCommonModule} from '@angular/material/core'; +import { + MdCard, + MdCardHeader, + MdCardTitleGroup, + MdCardContent, + MdCardTitle, + MdCardSubtitle, + MdCardActions, + MdCardFooter, + MdCardSmImage, + MdCardMdImage, + MdCardLgImage, + MdCardImage, + MdCardXlImage, + MdCardAvatar, +} from './card'; + + +@NgModule({ + imports: [MdCommonModule], + exports: [ + MdCard, + MdCardHeader, + MdCardTitleGroup, + MdCardContent, + MdCardTitle, + MdCardSubtitle, + MdCardActions, + MdCardFooter, + MdCardSmImage, + MdCardMdImage, + MdCardLgImage, + MdCardImage, + MdCardXlImage, + MdCardAvatar, + MdCommonModule, + ], + declarations: [ + MdCard, MdCardHeader, MdCardTitleGroup, MdCardContent, MdCardTitle, MdCardSubtitle, + MdCardActions, MdCardFooter, MdCardSmImage, MdCardMdImage, MdCardLgImage, MdCardImage, + MdCardXlImage, MdCardAvatar, + ], +}) +export class MdCardModule {} diff --git a/src/lib/card/mat-exports.ts b/src/lib/card/mat-exports.ts new file mode 100644 index 00000000000..d4b22e577da --- /dev/null +++ b/src/lib/card/mat-exports.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MdCard, + MdCardActions, + MdCardAvatar, + MdCardContent, + MdCardFooter, + MdCardHeader, + MdCardImage, + MdCardLgImage, + MdCardMdImage, + MdCardSmImage, + MdCardSubtitle, + MdCardTitle, + MdCardTitleGroup, + MdCardXlImage, +} from './card'; +import {MdCardModule} from './card-module'; + + +export {MdCard as MatCard}; +export {MdCardActions as MatCardActions}; +export {MdCardAvatar as MatCardAvatar}; +export {MdCardContent as MatCardContent}; +export {MdCardFooter as MatCardFooter}; +export {MdCardHeader as MatCardHeader}; +export {MdCardImage as MatCardImage}; +export {MdCardLgImage as MatCardLgImage}; +export {MdCardMdImage as MatCardMatImage}; +export {MdCardModule as MatCardModule}; +export {MdCardSmImage as MatCardSmImage}; +export {MdCardSubtitle as MatCardSubtitle}; +export {MdCardTitle as MatCardTitle}; +export {MdCardTitleGroup as MatCardTitleGroup}; +export {MdCardXlImage as MatCardXlImage}; diff --git a/src/lib/card/public_api.ts b/src/lib/card/public_api.ts index 986e21c4b3b..863f34d9a5c 100644 --- a/src/lib/card/public_api.ts +++ b/src/lib/card/public_api.ts @@ -6,52 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdCommonModule} from '@angular/material/core'; -import { - MdCard, - MdCardHeader, - MdCardTitleGroup, - MdCardContent, - MdCardTitle, - MdCardSubtitle, - MdCardActions, - MdCardFooter, - MdCardSmImage, - MdCardMdImage, - MdCardLgImage, - MdCardImage, - MdCardXlImage, - MdCardAvatar, -} from './card'; - - -@NgModule({ - imports: [MdCommonModule], - exports: [ - MdCard, - MdCardHeader, - MdCardTitleGroup, - MdCardContent, - MdCardTitle, - MdCardSubtitle, - MdCardActions, - MdCardFooter, - MdCardSmImage, - MdCardMdImage, - MdCardLgImage, - MdCardImage, - MdCardXlImage, - MdCardAvatar, - MdCommonModule, - ], - declarations: [ - MdCard, MdCardHeader, MdCardTitleGroup, MdCardContent, MdCardTitle, MdCardSubtitle, - MdCardActions, MdCardFooter, MdCardSmImage, MdCardMdImage, MdCardLgImage, MdCardImage, - MdCardXlImage, MdCardAvatar, - ], -}) -export class MdCardModule {} - - export * from './card'; +export * from './card-module'; +export * from './mat-exports'; diff --git a/src/lib/checkbox/checkbox-module.ts b/src/lib/checkbox/checkbox-module.ts new file mode 100644 index 00000000000..49ff7562c8e --- /dev/null +++ b/src/lib/checkbox/checkbox-module.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {ObserversModule} from '@angular/cdk/observers'; +import {MdRippleModule, MdCommonModule} from '@angular/material/core'; +import {MdCheckbox} from './checkbox'; +import {MdCheckboxRequiredValidator} from './checkbox-required-validator'; +import {A11yModule} from '@angular/cdk/a11y'; + +@NgModule({ + imports: [CommonModule, MdRippleModule, MdCommonModule, ObserversModule, A11yModule], + exports: [MdCheckbox, MdCheckboxRequiredValidator, MdCommonModule], + declarations: [MdCheckbox, MdCheckboxRequiredValidator], +}) +export class MdCheckboxModule {} diff --git a/src/lib/checkbox/mat-exports.ts b/src/lib/checkbox/mat-exports.ts new file mode 100644 index 00000000000..6b3089901f5 --- /dev/null +++ b/src/lib/checkbox/mat-exports.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_CHECKBOX_CONTROL_VALUE_ACCESSOR, + MdCheckbox, + MdCheckboxBase, + MdCheckboxChange, +} from './checkbox'; +import {MdCheckboxModule} from './checkbox-module'; +import { + MD_CHECKBOX_REQUIRED_VALIDATOR, + MdCheckboxRequiredValidator, +} from './checkbox-required-validator'; + + +export {MD_CHECKBOX_CONTROL_VALUE_ACCESSOR as MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR}; +export {MD_CHECKBOX_REQUIRED_VALIDATOR as MAT_CHECKBOX_REQUIRED_VALIDATOR}; +export {MdCheckbox as MatCheckbox}; +export {MdCheckboxBase as MatCheckboxBase}; +export {MdCheckboxChange as MatCheckboxChange}; +export {MdCheckboxModule as MatCheckboxModule}; +export {MdCheckboxRequiredValidator as MatCheckboxRequiredValidator}; diff --git a/src/lib/checkbox/public_api.ts b/src/lib/checkbox/public_api.ts index b6b37dc6731..7a6132ac2ed 100644 --- a/src/lib/checkbox/public_api.ts +++ b/src/lib/checkbox/public_api.ts @@ -6,21 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {ObserversModule} from '@angular/cdk/observers'; -import {MdRippleModule, MdCommonModule} from '@angular/material/core'; -import {MdCheckbox} from './checkbox'; -import {MdCheckboxRequiredValidator} from './checkbox-required-validator'; -import {A11yModule} from '@angular/cdk/a11y'; - -@NgModule({ - imports: [CommonModule, MdRippleModule, MdCommonModule, ObserversModule, A11yModule], - exports: [MdCheckbox, MdCheckboxRequiredValidator, MdCommonModule], - declarations: [MdCheckbox, MdCheckboxRequiredValidator], -}) -export class MdCheckboxModule {} - - export * from './checkbox'; +export * from './checkbox-module'; export * from './checkbox-required-validator'; +export * from './mat-exports'; diff --git a/src/lib/chips/chips-module.ts b/src/lib/chips/chips-module.ts new file mode 100644 index 00000000000..b87aac229dc --- /dev/null +++ b/src/lib/chips/chips-module.ts @@ -0,0 +1,20 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdChipList} from './chip-list'; +import {MdBasicChip, MdChip, MdChipRemove} from './chip'; +import {MdChipInput} from './chip-input'; + + +@NgModule({ + imports: [], + exports: [MdChipList, MdChip, MdChipInput, MdChipRemove, MdChipRemove, MdBasicChip], + declarations: [MdChipList, MdChip, MdChipInput, MdChipRemove, MdChipRemove, MdBasicChip] +}) +export class MdChipsModule {} diff --git a/src/lib/chips/mat-exports.ts b/src/lib/chips/mat-exports.ts new file mode 100644 index 00000000000..73ccd86cd58 --- /dev/null +++ b/src/lib/chips/mat-exports.ts @@ -0,0 +1,24 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdBasicChip, MdChip, MdChipBase, MdChipEvent, MdChipRemove} from './chip'; +import {MdChipInput, MdChipInputEvent} from './chip-input'; +import {MdChipList, MdChipListChange} from './chip-list'; +import {MdChipsModule} from './chips-module'; + + +export {MdBasicChip as MatBasicChip}; +export {MdChip as MatChip}; +export {MdChipBase as MatChipBase}; +export {MdChipEvent as MatChipEvent}; +export {MdChipInput as MatChipInput}; +export {MdChipInputEvent as MatChipInputEvent}; +export {MdChipListChange as MatChipListChange}; +export {MdChipList as MatChipList}; +export {MdChipRemove as MatChipRemove}; +export {MdChipsModule as MatChipsModule}; diff --git a/src/lib/chips/public_api.ts b/src/lib/chips/public_api.ts index 7a348583508..d7a19a1e524 100644 --- a/src/lib/chips/public_api.ts +++ b/src/lib/chips/public_api.ts @@ -6,18 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdChipList} from './chip-list'; -import {MdBasicChip, MdChip, MdChipRemove} from './chip'; -import {MdChipInput} from './chip-input'; - +export * from './chips-module'; export * from './chip-list'; export * from './chip'; export * from './chip-input'; - -@NgModule({ - imports: [], - exports: [MdChipList, MdChip, MdChipInput, MdChipRemove, MdChipRemove, MdBasicChip], - declarations: [MdChipList, MdChip, MdChipInput, MdChipRemove, MdChipRemove, MdBasicChip] -}) -export class MdChipsModule {} +export * from './mat-exports'; diff --git a/src/lib/core/mat-exports.ts b/src/lib/core/mat-exports.ts new file mode 100644 index 00000000000..b38a9c583c5 --- /dev/null +++ b/src/lib/core/mat-exports.ts @@ -0,0 +1,49 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdCommonModule} from './common-behaviors/common-module'; +import { + MD_DATE_FORMATS, + MD_NATIVE_DATE_FORMATS, + MdDateFormats, + MdNativeDateModule, +} from './datetime/index'; +import {MD_ERROR_GLOBAL_OPTIONS} from './error/error-options'; +import {MdLine, MdLineModule, MdLineSetter} from './line/line'; +import { + MdOptgroup, + MdOptgroupBase, + MdOption, + MdOptionModule, + MdOptionSelectionChange, +} from './option/index'; +import {MD_PLACEHOLDER_GLOBAL_OPTIONS} from './placeholder/placeholder-options'; +import {MD_RIPPLE_GLOBAL_OPTIONS, MdRipple, MdRippleModule} from './ripple/index'; +import {MdPseudoCheckbox, MdPseudoCheckboxModule, MdPseudoCheckboxState} from './selection/index'; + +export {MD_DATE_FORMATS as MAT_DATE_FORMATS}; +export {MD_RIPPLE_GLOBAL_OPTIONS as MAT_RIPPLE_GLOBAL_OPTIONS}; +export {MD_NATIVE_DATE_FORMATS as MAT_NATIVE_DATE_FORMATS}; +export {MD_PLACEHOLDER_GLOBAL_OPTIONS as MAT_PLACEHOLDER_GLOBAL_OPTIONS}; +export {MD_ERROR_GLOBAL_OPTIONS as MAT_ERROR_GLOBAL_OPTIONS}; +export {MdCommonModule as MatCommonModule}; +export {MdDateFormats as MatDateFormats}; +export {MdLine as MatLine}; +export {MdLineModule as MatLineModule}; +export {MdLineSetter as MatLineSetter}; +export {MdOptgroup as MatOptgroup}; +export {MdOptgroupBase as MatOptgroupBase}; +export {MdOption as MatOption}; +export {MdOptionModule as MatOptionModule}; +export {MdOptionSelectionChange as MatOptionSelectionChange}; +export {MdNativeDateModule as MatNativeDateModule}; +export {MdPseudoCheckbox as MatPseudoCheckbox}; +export {MdPseudoCheckboxModule as MatPseudoCheckboxModule}; +export {MdPseudoCheckboxState as MatPseudoCheckboxState}; +export {MdRipple as MatRipple}; +export {MdRippleModule as MatRippleModule}; diff --git a/src/lib/core/public_api.ts b/src/lib/core/public_api.ts index b13cbd5df89..e0d835d549e 100644 --- a/src/lib/core/public_api.ts +++ b/src/lib/core/public_api.ts @@ -31,6 +31,7 @@ export * from './rxjs/index'; export * from './selection/index'; export * from './style/index'; export * from './util/object-extend'; +export * from './mat-exports'; // TODO: don't have this export * from './testing/month-constants'; diff --git a/src/lib/datepicker/datepicker-module.ts b/src/lib/datepicker/datepicker-module.ts new file mode 100644 index 00000000000..36272d381b1 --- /dev/null +++ b/src/lib/datepicker/datepicker-module.ts @@ -0,0 +1,67 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {A11yModule} from '@angular/cdk/a11y'; +import {OverlayModule} from '@angular/cdk/overlay'; +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import {MdButtonModule} from '@angular/material/button'; +import {MdDialogModule} from '@angular/material/dialog'; +import {MdIconModule} from '@angular/material/icon'; +import {MdCalendar} from './calendar'; +import {MdCalendarBody} from './calendar-body'; +import { + MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER, + MdDatepicker, + MdDatepickerContent, +} from './datepicker'; +import {MdDatepickerInput} from './datepicker-input'; +import {MdDatepickerIntl} from './datepicker-intl'; +import {MdDatepickerToggle} from './datepicker-toggle'; +import {MdMonthView} from './month-view'; +import {MdYearView} from './year-view'; + + +@NgModule({ + imports: [ + CommonModule, + MdButtonModule, + MdDialogModule, + MdIconModule, + OverlayModule, + A11yModule, + ], + exports: [ + MdCalendar, + MdCalendarBody, + MdDatepicker, + MdDatepickerContent, + MdDatepickerInput, + MdDatepickerToggle, + MdMonthView, + MdYearView, + ], + declarations: [ + MdCalendar, + MdCalendarBody, + MdDatepicker, + MdDatepickerContent, + MdDatepickerInput, + MdDatepickerToggle, + MdMonthView, + MdYearView, + ], + providers: [ + MdDatepickerIntl, + MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER, + ], + entryComponents: [ + MdDatepickerContent, + ] +}) +export class MdDatepickerModule {} diff --git a/src/lib/datepicker/mat-exports.ts b/src/lib/datepicker/mat-exports.ts new file mode 100644 index 00000000000..71e214bcd1f --- /dev/null +++ b/src/lib/datepicker/mat-exports.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdCalendar} from './calendar'; +import {MdCalendarBody, MdCalendarCell} from './calendar-body'; +import { + MD_DATEPICKER_SCROLL_STRATEGY, + MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER, + MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY, + MdDatepicker, + MdDatepickerContent, +} from './datepicker'; +import { + MD_DATEPICKER_VALIDATORS, + MD_DATEPICKER_VALUE_ACCESSOR, + MdDatepickerInput, + MdDatepickerInputEvent, +} from './datepicker-input'; +import {MdDatepickerIntl} from './datepicker-intl'; +import {MdDatepickerModule} from './datepicker-module'; +import {MdDatepickerToggle} from './datepicker-toggle'; +import {MdMonthView} from './month-view'; +import {MdYearView} from './year-view'; + + +/* tslint:disable:max-line-length */ +export {MD_DATEPICKER_SCROLL_STRATEGY as MAT_DATEPICKER_SCROLL_STRATEGY}; +export {MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER as MAT_DATEPICKER_SCROLL_STRATEGY_PROVIDER}; +export {MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY}; +export {MD_DATEPICKER_VALIDATORS as MAT_DATEPICKER_VALIDATORS}; +export {MD_DATEPICKER_VALUE_ACCESSOR as MAT_DATEPICKER_VALUE_ACCESSOR}; +export {MdCalendar as MatCalendar}; +export {MdCalendarBody as MatCalendarBody}; +export {MdCalendarCell as MatCalendarCell}; +export {MdDatepicker as MatDatepicker}; +export {MdDatepickerContent as MatDatepickerContent}; +export {MdDatepickerInput as MatDatepickerInput}; +export {MdDatepickerInputEvent as MatDatepickerInputEvent}; +export {MdDatepickerIntl as MatDatepickerIntl}; +export {MdDatepickerModule as MatDatepickerModule}; +export {MdDatepickerToggle as MatDatepickerToggle}; +export {MdMonthView as MatMonthView}; +export {MdYearView as MatYearView}; diff --git a/src/lib/datepicker/public_api.ts b/src/lib/datepicker/public_api.ts index 176f930bba8..eb90e45ffc2 100644 --- a/src/lib/datepicker/public_api.ts +++ b/src/lib/datepicker/public_api.ts @@ -6,27 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {A11yModule} from '@angular/cdk/a11y'; -import {OverlayModule} from '@angular/cdk/overlay'; -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {MdButtonModule} from '@angular/material/button'; -import {MdDialogModule} from '@angular/material/dialog'; -import {MdIconModule} from '@angular/material/icon'; -import {MdCalendar} from './calendar'; -import {MdCalendarBody} from './calendar-body'; -import { - MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER, - MdDatepicker, - MdDatepickerContent, -} from './datepicker'; -import {MdDatepickerInput} from './datepicker-input'; -import {MdDatepickerIntl} from './datepicker-intl'; -import {MdDatepickerToggle} from './datepicker-toggle'; -import {MdMonthView} from './month-view'; -import {MdYearView} from './year-view'; - - +export * from './datepicker-module'; export * from './calendar'; export * from './calendar-body'; export * from './datepicker'; @@ -35,43 +15,4 @@ export * from './datepicker-intl'; export * from './datepicker-toggle'; export * from './month-view'; export * from './year-view'; - - -@NgModule({ - imports: [ - CommonModule, - MdButtonModule, - MdDialogModule, - MdIconModule, - OverlayModule, - A11yModule, - ], - exports: [ - MdCalendar, - MdCalendarBody, - MdDatepicker, - MdDatepickerContent, - MdDatepickerInput, - MdDatepickerToggle, - MdMonthView, - MdYearView, - ], - declarations: [ - MdCalendar, - MdCalendarBody, - MdDatepicker, - MdDatepickerContent, - MdDatepickerInput, - MdDatepickerToggle, - MdMonthView, - MdYearView, - ], - providers: [ - MdDatepickerIntl, - MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER, - ], - entryComponents: [ - MdDatepickerContent, - ] -}) -export class MdDatepickerModule {} +export * from './mat-exports'; diff --git a/src/lib/dialog/dialog-module.ts b/src/lib/dialog/dialog-module.ts new file mode 100644 index 00000000000..c587faf42df --- /dev/null +++ b/src/lib/dialog/dialog-module.ts @@ -0,0 +1,54 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {OverlayModule} from '@angular/cdk/overlay'; +import {PortalModule} from '@angular/cdk/portal'; +import {A11yModule} from '@angular/cdk/a11y'; +import {MdCommonModule} from '@angular/material/core'; +import {MdDialog, MD_DIALOG_SCROLL_STRATEGY_PROVIDER} from './dialog'; +import {MdDialogContainer} from './dialog-container'; +import { + MdDialogClose, + MdDialogContent, + MdDialogTitle, + MdDialogActions +} from './dialog-content-directives'; + + +@NgModule({ + imports: [ + CommonModule, + OverlayModule, + PortalModule, + A11yModule, + MdCommonModule, + ], + exports: [ + MdDialogContainer, + MdDialogClose, + MdDialogTitle, + MdDialogContent, + MdDialogActions, + MdCommonModule, + ], + declarations: [ + MdDialogContainer, + MdDialogClose, + MdDialogTitle, + MdDialogActions, + MdDialogContent, + ], + providers: [ + MdDialog, + MD_DIALOG_SCROLL_STRATEGY_PROVIDER, + ], + entryComponents: [MdDialogContainer], +}) +export class MdDialogModule {} diff --git a/src/lib/dialog/mat-exports.ts b/src/lib/dialog/mat-exports.ts new file mode 100644 index 00000000000..ce9f2daf51c --- /dev/null +++ b/src/lib/dialog/mat-exports.ts @@ -0,0 +1,40 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_DIALOG_DATA, + MD_DIALOG_SCROLL_STRATEGY, + MD_DIALOG_SCROLL_STRATEGY_PROVIDER, + MD_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, + MdDialog, +} from './dialog'; +import {MdDialogConfig} from './dialog-config'; +import {MdDialogContainer} from './dialog-container'; +import { + MdDialogActions, + MdDialogClose, + MdDialogContent, + MdDialogTitle, +} from './dialog-content-directives'; +import {MdDialogModule} from './dialog-module'; +import {MdDialogRef} from './dialog-ref'; + + +export {MD_DIALOG_DATA as MAT_DIALOG_DATA}; +export {MD_DIALOG_SCROLL_STRATEGY as MAT_DIALOG_SCROLL_STRATEGY}; +export {MD_DIALOG_SCROLL_STRATEGY_PROVIDER as MAT_DIALOG_SCROLL_STRATEGY_PROVIDER}; +export {MD_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY}; +export {MdDialog as MatDialog}; +export {MdDialogActions as MatDialogActions}; +export {MdDialogClose as MatDialogClose}; +export {MdDialogConfig as MatDialogConfig}; +export {MdDialogContainer as MatDialogContainer}; +export {MdDialogContent as MatDialogContent}; +export {MdDialogModule as MatDialogModule}; +export {MdDialogRef as MatDialogRef}; +export {MdDialogTitle as MatDialogTitle}; diff --git a/src/lib/dialog/public_api.ts b/src/lib/dialog/public_api.ts index 39b5352d1ae..040eb5aff84 100644 --- a/src/lib/dialog/public_api.ts +++ b/src/lib/dialog/public_api.ts @@ -6,55 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {OverlayModule} from '@angular/cdk/overlay'; -import {PortalModule} from '@angular/cdk/portal'; -import {A11yModule} from '@angular/cdk/a11y'; -import {MdCommonModule} from '@angular/material/core'; -import {MdDialog, MD_DIALOG_SCROLL_STRATEGY_PROVIDER} from './dialog'; -import {MdDialogContainer} from './dialog-container'; -import { - MdDialogClose, - MdDialogContent, - MdDialogTitle, - MdDialogActions -} from './dialog-content-directives'; - - -@NgModule({ - imports: [ - CommonModule, - OverlayModule, - PortalModule, - A11yModule, - MdCommonModule, - ], - exports: [ - MdDialogContainer, - MdDialogClose, - MdDialogTitle, - MdDialogContent, - MdDialogActions, - MdCommonModule, - ], - declarations: [ - MdDialogContainer, - MdDialogClose, - MdDialogTitle, - MdDialogActions, - MdDialogContent, - ], - providers: [ - MdDialog, - MD_DIALOG_SCROLL_STRATEGY_PROVIDER, - ], - entryComponents: [MdDialogContainer], -}) -export class MdDialogModule {} - +export * from './dialog-module'; export * from './dialog'; export * from './dialog-container'; export * from './dialog-content-directives'; export * from './dialog-config'; export * from './dialog-ref'; +export * from './mat-exports'; diff --git a/src/lib/expansion/expansion-module.ts b/src/lib/expansion/expansion-module.ts new file mode 100644 index 00000000000..80119c2c93c --- /dev/null +++ b/src/lib/expansion/expansion-module.ts @@ -0,0 +1,44 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import {CompatibilityModule, UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/material/core'; +import {A11yModule} from '@angular/cdk/a11y'; +import {CdkAccordion, MdAccordion} from './accordion'; +import {MdExpansionPanel, MdExpansionPanelActionRow} from './expansion-panel'; +import { + MdExpansionPanelDescription, + MdExpansionPanelHeader, + MdExpansionPanelTitle, +} from './expansion-panel-header'; + + +@NgModule({ + imports: [CompatibilityModule, CommonModule, A11yModule], + exports: [ + CdkAccordion, + MdAccordion, + MdExpansionPanel, + MdExpansionPanelActionRow, + MdExpansionPanelHeader, + MdExpansionPanelTitle, + MdExpansionPanelDescription + ], + declarations: [ + CdkAccordion, + MdAccordion, + MdExpansionPanel, + MdExpansionPanelActionRow, + MdExpansionPanelHeader, + MdExpansionPanelTitle, + MdExpansionPanelDescription + ], + providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER] +}) +export class MdExpansionModule {} diff --git a/src/lib/expansion/mat-exports.ts b/src/lib/expansion/mat-exports.ts new file mode 100644 index 00000000000..be1bed20796 --- /dev/null +++ b/src/lib/expansion/mat-exports.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdAccordion, MdAccordionDisplayMode} from './accordion'; +import {MdExpansionModule} from './expansion-module'; +import { + MdExpansionPanel, + MdExpansionPanelActionRow, + MdExpansionPanelState, +} from './expansion-panel'; +import { + MdExpansionPanelDescription, + MdExpansionPanelHeader, + MdExpansionPanelTitle, +} from './expansion-panel-header'; + + +export {MdAccordion as MatAccordion}; +export {MdAccordionDisplayMode as MatAccordionDisplayMode}; +export {MdExpansionModule as MatExpansionModule}; +export {MdExpansionPanel as MatExpansionPanel}; +export {MdExpansionPanelActionRow as MatExpansionPanelActionRow}; +export {MdExpansionPanelDescription as MatExpansionPanelDescription}; +export {MdExpansionPanelHeader as MatExpansionPanelHeader}; +export {MdExpansionPanelState as MatExpansionPanelState}; +export {MdExpansionPanelTitle as MatExpansionPanelTitle}; diff --git a/src/lib/expansion/public_api.ts b/src/lib/expansion/public_api.ts index 6b8aace89ac..d2e7b122429 100644 --- a/src/lib/expansion/public_api.ts +++ b/src/lib/expansion/public_api.ts @@ -6,43 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {CompatibilityModule, UNIQUE_SELECTION_DISPATCHER_PROVIDER} from '@angular/material/core'; -import {A11yModule} from '@angular/cdk/a11y'; -import {CdkAccordion, MdAccordion} from './accordion'; -import {MdExpansionPanel, MdExpansionPanelActionRow} from './expansion-panel'; -import { - MdExpansionPanelDescription, - MdExpansionPanelHeader, - MdExpansionPanelTitle, -} from './expansion-panel-header'; - - -@NgModule({ - imports: [CompatibilityModule, CommonModule, A11yModule], - exports: [ - CdkAccordion, - MdAccordion, - MdExpansionPanel, - MdExpansionPanelActionRow, - MdExpansionPanelHeader, - MdExpansionPanelTitle, - MdExpansionPanelDescription - ], - declarations: [ - CdkAccordion, - MdAccordion, - MdExpansionPanel, - MdExpansionPanelActionRow, - MdExpansionPanelHeader, - MdExpansionPanelTitle, - MdExpansionPanelDescription - ], - providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER] -}) -export class MdExpansionModule {} - +export * from './expansion-module'; export { CdkAccordion, MdAccordion, @@ -60,3 +24,4 @@ export { MdExpansionPanelTitle } from './expansion-panel-header'; +export * from './mat-exports'; diff --git a/src/lib/form-field/form-field-module.ts b/src/lib/form-field/form-field-module.ts new file mode 100644 index 00000000000..6cb8d7ccdea --- /dev/null +++ b/src/lib/form-field/form-field-module.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdError} from './error'; +import {MdFormField} from './form-field'; +import {MdHint} from './hint'; +import {MdPlaceholder} from './placeholder'; +import {MdPrefix} from './prefix'; +import {MdSuffix} from './suffix'; +import {CommonModule} from '@angular/common'; +import {PlatformModule} from '@angular/material/core'; + + +@NgModule({ + declarations: [ + MdError, + MdHint, + MdFormField, + MdPlaceholder, + MdPrefix, + MdSuffix, + ], + imports: [ + CommonModule, + PlatformModule, + ], + exports: [ + MdError, + MdHint, + MdFormField, + MdPlaceholder, + MdPrefix, + MdSuffix, + ], +}) +export class MdFormFieldModule {} diff --git a/src/lib/form-field/mat-exports.ts b/src/lib/form-field/mat-exports.ts new file mode 100644 index 00000000000..788c9b4452d --- /dev/null +++ b/src/lib/form-field/mat-exports.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MdFormField, +} from './form-field'; +import {MdError} from './error'; +import {MdHint} from './hint'; +import {MdFormFieldModule} from './form-field-module'; +import {MdPrefix} from './prefix'; +import {MdSuffix} from './suffix'; +import {MdPlaceholder} from './placeholder'; +import {MdFormFieldControl} from './form-field-control'; + + +export {MdFormFieldModule as MatFormFieldModule}; +export {MdError as MatError}; +export {MdFormField as MatFormField}; +export {MdFormFieldControl as MatFormFieldControl}; +export {MdHint as MatHint}; +export {MdPlaceholder as MatPlaceholder}; +export {MdPrefix as MatPrefix}; +export {MdSuffix as MatSuffix}; diff --git a/src/lib/form-field/public_api.ts b/src/lib/form-field/public_api.ts index eb3047954a4..4edf1173bbe 100644 --- a/src/lib/form-field/public_api.ts +++ b/src/lib/form-field/public_api.ts @@ -6,42 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdError} from './error'; -import {MdFormField} from './form-field'; -import {MdHint} from './hint'; -import {MdPlaceholder} from './placeholder'; -import {MdPrefix} from './prefix'; -import {MdSuffix} from './suffix'; -import {CommonModule} from '@angular/common'; -import {PlatformModule} from '@angular/material/core'; - - -@NgModule({ - declarations: [ - MdError, - MdHint, - MdFormField, - MdPlaceholder, - MdPrefix, - MdSuffix, - ], - imports: [ - CommonModule, - PlatformModule, - ], - exports: [ - MdError, - MdHint, - MdFormField, - MdPlaceholder, - MdPrefix, - MdSuffix, - ], -}) -export class MdFormFieldModule {} - - +export * from './form-field-module'; export * from './error'; export * from './form-field'; export * from './form-field-control'; @@ -50,4 +15,4 @@ export * from './hint'; export * from './placeholder'; export * from './prefix'; export * from './suffix'; - +export * from './mat-exports'; diff --git a/src/lib/grid-list/grid-list-module.ts b/src/lib/grid-list/grid-list-module.ts new file mode 100644 index 00000000000..d57f8b80b5b --- /dev/null +++ b/src/lib/grid-list/grid-list-module.ts @@ -0,0 +1,39 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdLineModule, MdCommonModule} from '@angular/material/core'; +import { + MdGridTile, MdGridTileText, MdGridTileFooterCssMatStyler, + MdGridTileHeaderCssMatStyler, MdGridAvatarCssMatStyler +} from './grid-tile'; +import {MdGridList} from './grid-list'; + + +@NgModule({ + imports: [MdLineModule, MdCommonModule], + exports: [ + MdGridList, + MdGridTile, + MdGridTileText, + MdLineModule, + MdCommonModule, + MdGridTileHeaderCssMatStyler, + MdGridTileFooterCssMatStyler, + MdGridAvatarCssMatStyler + ], + declarations: [ + MdGridList, + MdGridTile, + MdGridTileText, + MdGridTileHeaderCssMatStyler, + MdGridTileFooterCssMatStyler, + MdGridAvatarCssMatStyler + ], +}) +export class MdGridListModule {} diff --git a/src/lib/grid-list/mat-exports.ts b/src/lib/grid-list/mat-exports.ts new file mode 100644 index 00000000000..0590465d4b7 --- /dev/null +++ b/src/lib/grid-list/mat-exports.ts @@ -0,0 +1,16 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdGridList} from './grid-list'; +import {MdGridListModule} from './grid-list-module'; +import {MdGridTile} from './grid-tile'; + + +export {MdGridList as MatGridList}; +export {MdGridListModule as MatGridListModule}; +export {MdGridTile as MatGridTile}; diff --git a/src/lib/grid-list/public_api.ts b/src/lib/grid-list/public_api.ts index 78917c713df..5329b294b27 100644 --- a/src/lib/grid-list/public_api.ts +++ b/src/lib/grid-list/public_api.ts @@ -6,38 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdLineModule, MdCommonModule} from '@angular/material/core'; -import { - MdGridTile, MdGridTileText, MdGridTileFooterCssMatStyler, - MdGridTileHeaderCssMatStyler, MdGridAvatarCssMatStyler -} from './grid-tile'; -import {MdGridList} from './grid-list'; - - -@NgModule({ - imports: [MdLineModule, MdCommonModule], - exports: [ - MdGridList, - MdGridTile, - MdGridTileText, - MdLineModule, - MdCommonModule, - MdGridTileHeaderCssMatStyler, - MdGridTileFooterCssMatStyler, - MdGridAvatarCssMatStyler - ], - declarations: [ - MdGridList, - MdGridTile, - MdGridTileText, - MdGridTileHeaderCssMatStyler, - MdGridTileFooterCssMatStyler, - MdGridAvatarCssMatStyler - ], -}) -export class MdGridListModule {} - - +export * from './grid-list-module'; export * from './grid-list'; export {MdGridTile} from './grid-tile'; +export * from './mat-exports'; diff --git a/src/lib/icon/icon-module.ts b/src/lib/icon/icon-module.ts new file mode 100644 index 00000000000..1104d7a2942 --- /dev/null +++ b/src/lib/icon/icon-module.ts @@ -0,0 +1,21 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdCommonModule} from '@angular/material/core'; +import {MdIcon} from './icon'; +import {ICON_REGISTRY_PROVIDER} from './icon-registry'; + + +@NgModule({ + imports: [MdCommonModule], + exports: [MdIcon, MdCommonModule], + declarations: [MdIcon], + providers: [ICON_REGISTRY_PROVIDER], +}) +export class MdIconModule {} diff --git a/src/lib/icon/mat-exports.ts b/src/lib/icon/mat-exports.ts new file mode 100644 index 00000000000..73a7dc18e85 --- /dev/null +++ b/src/lib/icon/mat-exports.ts @@ -0,0 +1,17 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdIcon, MdIconBase} from './icon'; +import {MdIconRegistry} from './icon-registry'; +import {MdIconModule} from './icon-module'; + + +export {MdIcon as MatIcon}; +export {MdIconBase as MatIconBase}; +export {MdIconModule as MatIconModule}; +export {MdIconRegistry as MatIconRegistry}; diff --git a/src/lib/icon/public_api.ts b/src/lib/icon/public_api.ts index 94a2329bd91..ac95ddd5615 100644 --- a/src/lib/icon/public_api.ts +++ b/src/lib/icon/public_api.ts @@ -6,20 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdCommonModule} from '@angular/material/core'; -import {MdIcon} from './icon'; -import {ICON_REGISTRY_PROVIDER} from './icon-registry'; - - -@NgModule({ - imports: [MdCommonModule], - exports: [MdIcon, MdCommonModule], - declarations: [MdIcon], - providers: [ICON_REGISTRY_PROVIDER], -}) -export class MdIconModule {} - - +export * from './icon-module'; export * from './icon'; export * from './icon-registry'; +export * from './mat-exports'; diff --git a/src/lib/input/input-module.ts b/src/lib/input/input-module.ts new file mode 100644 index 00000000000..0e6f22491e6 --- /dev/null +++ b/src/lib/input/input-module.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdInput} from './input'; +import {MdTextareaAutosize} from './autosize'; +import {CommonModule} from '@angular/common'; +import {PlatformModule} from '@angular/material/core'; +import {MdFormFieldModule} from '@angular/material/form-field'; + + +@NgModule({ + declarations: [ + MdInput, + MdTextareaAutosize, + ], + imports: [ + CommonModule, + MdFormFieldModule, + PlatformModule, + ], + exports: [ + // We re-export the `MdFormFieldModule` since `MdInput` will almost always be used together with + // `MdFormField`. + MdFormFieldModule, + MdInput, + MdTextareaAutosize, + ], +}) +export class MdInputModule {} diff --git a/src/lib/input/mat-exports.ts b/src/lib/input/mat-exports.ts new file mode 100644 index 00000000000..c3b588d4fd1 --- /dev/null +++ b/src/lib/input/mat-exports.ts @@ -0,0 +1,16 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdInput} from './input'; +import {MdTextareaAutosize} from './autosize'; +import {MdInputModule} from './input-module'; + + +export {MdInput as MatInput}; +export {MdInputModule as MatInputModule}; +export {MdTextareaAutosize as MatTextareaAutosize}; diff --git a/src/lib/input/public_api.ts b/src/lib/input/public_api.ts index eafbd183b27..ce320312d33 100644 --- a/src/lib/input/public_api.ts +++ b/src/lib/input/public_api.ts @@ -6,36 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdInput} from './input'; -import {MdTextareaAutosize} from './autosize'; -import {CommonModule} from '@angular/common'; -import {PlatformModule} from '@angular/material/core'; -import {MdFormFieldModule} from '@angular/material/form-field'; - - -@NgModule({ - declarations: [ - MdInput, - MdTextareaAutosize, - ], - imports: [ - CommonModule, - MdFormFieldModule, - PlatformModule, - ], - exports: [ - // We re-export the `MdFormFieldModule` since `MdInput` will almost always be used together with - // `MdFormField`. - MdFormFieldModule, - MdInput, - MdTextareaAutosize, - ], -}) -export class MdInputModule {} - +export * from './input-module'; export * from './autosize'; export * from './input'; export * from './input-errors'; +export * from './mat-exports'; diff --git a/src/lib/list/list-module.ts b/src/lib/list/list-module.ts new file mode 100644 index 00000000000..177bec5758b --- /dev/null +++ b/src/lib/list/list-module.ts @@ -0,0 +1,63 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import { + MdCommonModule, + MdLineModule, + MdPseudoCheckboxModule, + MdRippleModule, +} from '@angular/material/core'; +import { + MdDividerCssMatStyler, + MdList, + MdListAvatarCssMatStyler, + MdListCssMatStyler, + MdListDivider, + MdListIconCssMatStyler, + MdListItem, + MdListSubheaderCssMatStyler, + MdNavListCssMatStyler, +} from './list'; +import {MdListOption, MdSelectionList} from './selection-list'; + + +@NgModule({ + imports: [MdLineModule, MdRippleModule, MdCommonModule, MdPseudoCheckboxModule, CommonModule], + exports: [ + MdList, + MdListItem, + MdListDivider, + MdListAvatarCssMatStyler, + MdLineModule, + MdCommonModule, + MdListIconCssMatStyler, + MdListCssMatStyler, + MdNavListCssMatStyler, + MdDividerCssMatStyler, + MdListSubheaderCssMatStyler, + MdPseudoCheckboxModule, + MdSelectionList, + MdListOption + ], + declarations: [ + MdList, + MdListItem, + MdListDivider, + MdListAvatarCssMatStyler, + MdListIconCssMatStyler, + MdListCssMatStyler, + MdNavListCssMatStyler, + MdDividerCssMatStyler, + MdListSubheaderCssMatStyler, + MdSelectionList, + MdListOption + ], +}) +export class MdListModule {} diff --git a/src/lib/list/mat-exports.ts b/src/lib/list/mat-exports.ts new file mode 100644 index 00000000000..e8f8a9e89e4 --- /dev/null +++ b/src/lib/list/mat-exports.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MdDividerCssMatStyler, + MdList, + MdListAvatarCssMatStyler, + MdListBase, + MdListCssMatStyler, + MdListDivider, + MdListIconCssMatStyler, + MdListItem, + MdListItemBase, + MdListSubheaderCssMatStyler, + MdNavListCssMatStyler, +} from './list'; +import { + MdListOption, + MdListOptionBase, + MdSelectionList, + MdSelectionListBase, + MdSelectionListOptionEvent, +} from './selection-list'; +import {MdListModule} from './list-module'; + + +export {MdDividerCssMatStyler as MatDividerCssMatStyler}; +export {MdList as MatList}; +export {MdListAvatarCssMatStyler as MatListAvatarCssMatStyler}; +export {MdListBase as MatListBase}; +export {MdListCssMatStyler as MatListCssMatStyler}; +export {MdListDivider as MatListDivider}; +export {MdListIconCssMatStyler as MatListIconCssMatStyler}; +export {MdListItem as MatListItem}; +export {MdListItemBase as MatListItemBase}; +export {MdListModule as MatListModule}; +export {MdListOption as MatListOption}; +export {MdListOptionBase as MatListOptionBase}; +export {MdListSubheaderCssMatStyler as MatListSubheaderCssMatStyler}; +export {MdNavListCssMatStyler as MatNavListCssMatStyler}; +export {MdSelectionList as MatSelectionList}; +export {MdSelectionListBase as MatSelectionListBase}; +export {MdSelectionListOptionEvent as MatSelectionListOptionEvent}; diff --git a/src/lib/list/public_api.ts b/src/lib/list/public_api.ts index 4f88dea8fcc..98b17cb93de 100644 --- a/src/lib/list/public_api.ts +++ b/src/lib/list/public_api.ts @@ -6,62 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import { - MdCommonModule, - MdLineModule, - MdPseudoCheckboxModule, - MdRippleModule, -} from '@angular/material/core'; -import { - MdDividerCssMatStyler, - MdList, - MdListAvatarCssMatStyler, - MdListCssMatStyler, - MdListDivider, - MdListIconCssMatStyler, - MdListItem, - MdListSubheaderCssMatStyler, - MdNavListCssMatStyler, -} from './list'; -import {MdListOption, MdSelectionList} from './selection-list'; - - -@NgModule({ - imports: [MdLineModule, MdRippleModule, MdCommonModule, MdPseudoCheckboxModule, CommonModule], - exports: [ - MdList, - MdListItem, - MdListDivider, - MdListAvatarCssMatStyler, - MdLineModule, - MdCommonModule, - MdListIconCssMatStyler, - MdListCssMatStyler, - MdNavListCssMatStyler, - MdDividerCssMatStyler, - MdListSubheaderCssMatStyler, - MdPseudoCheckboxModule, - MdSelectionList, - MdListOption - ], - declarations: [ - MdList, - MdListItem, - MdListDivider, - MdListAvatarCssMatStyler, - MdListIconCssMatStyler, - MdListCssMatStyler, - MdNavListCssMatStyler, - MdDividerCssMatStyler, - MdListSubheaderCssMatStyler, - MdSelectionList, - MdListOption - ], -}) -export class MdListModule {} - - +export * from './list-module'; export * from './list'; export * from './selection-list'; +export * from './mat-exports'; diff --git a/src/lib/mat-exports.ts b/src/lib/mat-exports.ts deleted file mode 100644 index 9afb2175f3a..00000000000 --- a/src/lib/mat-exports.ts +++ /dev/null @@ -1,527 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { - MD_AUTOCOMPLETE_SCROLL_STRATEGY, - MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER, - MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY, - MD_AUTOCOMPLETE_VALUE_ACCESSOR, - MdAutocomplete, - MdAutocompleteModule, - MdAutocompleteTrigger, -} from '@angular/material/autocomplete'; -import { - MdAnchor, - MdButton, - MdButtonBase, - MdButtonCssMatStyler, - MdButtonModule, - MdFab, - MdIconButtonCssMatStyler, - MdMiniFab, - MdRaisedButtonCssMatStyler, -} from '@angular/material/button'; -import { - MD_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, - MdButtonToggle, - MdButtonToggleChange, - MdButtonToggleGroup, - MdButtonToggleGroupBase, - MdButtonToggleGroupMultiple, - MdButtonToggleModule, -} from '@angular/material/button-toggle'; -import { - MdCard, - MdCardActions, - MdCardAvatar, - MdCardContent, - MdCardFooter, - MdCardHeader, - MdCardImage, - MdCardLgImage, - MdCardMdImage, - MdCardModule, - MdCardSmImage, - MdCardSubtitle, - MdCardTitle, - MdCardTitleGroup, - MdCardXlImage, -} from '@angular/material/card'; -import { - MD_CHECKBOX_CONTROL_VALUE_ACCESSOR, - MD_CHECKBOX_REQUIRED_VALIDATOR, - MdCheckbox, - MdCheckboxBase, - MdCheckboxChange, - MdCheckboxModule, - MdCheckboxRequiredValidator, -} from '@angular/material/checkbox'; -import { - MdBasicChip, - MdChip, - MdChipBase, - MdChipEvent, - MdChipInput, - MdChipInputEvent, - MdChipList, - MdChipRemove, - MdChipsModule, -} from '@angular/material/chips'; -import { - MD_DATE_FORMATS, - MD_ERROR_GLOBAL_OPTIONS, - MD_NATIVE_DATE_FORMATS, - MD_PLACEHOLDER_GLOBAL_OPTIONS, - MD_RIPPLE_GLOBAL_OPTIONS, - MdCommonModule, - MdDateFormats, - MdLine, - MdLineModule, - MdLineSetter, - MdNativeDateModule, - MdOptgroup, - MdOptgroupBase, - MdOption, - MdOptionModule, - MdOptionSelectionChange, - MdPseudoCheckbox, - MdPseudoCheckboxModule, - MdPseudoCheckboxState, - MdRipple, - MdRippleModule, -} from '@angular/material/core'; -import { - MD_DATEPICKER_SCROLL_STRATEGY, - MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER, - MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY, - MD_DATEPICKER_VALIDATORS, - MD_DATEPICKER_VALUE_ACCESSOR, - MdCalendar, - MdCalendarBody, - MdCalendarCell, - MdDatepicker, - MdDatepickerContent, - MdDatepickerInput, - MdDatepickerInputEvent, - MdDatepickerIntl, - MdDatepickerModule, - MdDatepickerToggle, - MdMonthView, - MdYearView, -} from '@angular/material/datepicker'; -import { - MD_DIALOG_DATA, - MD_DIALOG_SCROLL_STRATEGY, - MD_DIALOG_SCROLL_STRATEGY_PROVIDER, - MD_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, - MdDialog, - MdDialogActions, - MdDialogClose, - MdDialogConfig, - MdDialogContainer, - MdDialogContent, - MdDialogModule, - MdDialogRef, - MdDialogTitle, -} from '@angular/material/dialog'; -import { - MdAccordion, - MdAccordionDisplayMode, - MdExpansionModule, - MdExpansionPanel, - MdExpansionPanelActionRow, - MdExpansionPanelDescription, - MdExpansionPanelHeader, - MdExpansionPanelState, - MdExpansionPanelTitle, -} from '@angular/material/expansion'; -import { - MdError, - MdFormField, - MdFormFieldControl, - MdFormFieldModule, - MdHint, - MdPlaceholder, - MdPrefix, - MdSuffix, -} from '@angular/material/form-field'; -import {MdGridList, MdGridListModule, MdGridTile} from '@angular/material/grid-list'; -import {MdIcon, MdIconBase, MdIconModule, MdIconRegistry} from '@angular/material/icon'; -import {MdInput, MdInputModule, MdTextareaAutosize} from '@angular/material/input'; -import { - MdDividerCssMatStyler, - MdList, - MdListAvatarCssMatStyler, - MdListBase, - MdListCssMatStyler, - MdListDivider, - MdListIconCssMatStyler, - MdListItem, - MdListItemBase, - MdListModule, - MdListOption, - MdListOptionBase, - MdListSubheaderCssMatStyler, - MdNavListCssMatStyler, - MdSelectionList, - MdSelectionListBase, - MdSelectionListOptionEvent, -} from '@angular/material/list'; -import { - MD_MENU_DEFAULT_OPTIONS, - MdMenu, - MdMenuDefaultOptions, - MdMenuItem, - MdMenuModule, - MdMenuPanel, - MdMenuTrigger, -} from '@angular/material/menu'; -import {MdPaginator, MdPaginatorIntl, MdPaginatorModule} from '@angular/material/paginator'; -import {MdProgressBar, MdProgressBarModule} from '@angular/material/progress-bar'; -import { - MdProgressSpinner, - MdProgressSpinnerBase, - MdProgressSpinnerCssMatStyler, - MdProgressSpinnerModule, - MdSpinner, -} from '@angular/material/progress-spinner'; -import { - MD_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, - MdRadioButton, - MdRadioButtonBase, - MdRadioChange, - MdRadioGroup, - MdRadioGroupBase, - MdRadioModule, -} from '@angular/material/radio'; -import { - MD_SELECT_SCROLL_STRATEGY, - MD_SELECT_SCROLL_STRATEGY_PROVIDER, - MD_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, - MdSelect, - MdSelectBase, - MdSelectChange, - MdSelectModule, - MdSelectTrigger, -} from '@angular/material/select'; -import { - MdDrawer, - MdDrawerContainer, - MdDrawerToggleResult, - MdSidenav, - MdSidenavContainer, - MdSidenavModule, -} from '@angular/material/sidenav'; -import { - MD_SLIDE_TOGGLE_VALUE_ACCESSOR, - MdSlideToggle, - MdSlideToggleBase, - MdSlideToggleChange, - MdSlideToggleModule, -} from '@angular/material/slide-toggle'; -import { - MD_SLIDER_VALUE_ACCESSOR, - MdSlider, - MdSliderBase, - MdSliderChange, - MdSliderModule, -} from '@angular/material/slider'; -import { - MD_SNACK_BAR_DATA, - MdSnackBar, - MdSnackBarConfig, - MdSnackBarContainer, - MdSnackBarModule, - MdSnackBarRef, -} from '@angular/material/snack-bar'; -import { - MdSort, - MdSortable, - MdSortHeader, - MdSortHeaderIntl, - MdSortModule, -} from '@angular/material/sort'; -import { - MdCell, - MdCellDef, - MdColumnDef, - MdHeaderCell, - MdHeaderCellDef, - MdHeaderRow, - MdRow, - MdTable, - MdTableModule, -} from '@angular/material/table'; -import { - MdInkBar, - MdTab, - MdTabBody, - MdTabBodyOriginState, - MdTabBodyPositionState, - MdTabChangeEvent, - MdTabGroup, - MdTabGroupBase, - MdTabHeader, - MdTabHeaderPosition, - MdTabLabel, - MdTabLabelWrapper, - MdTabLink, - MdTabNav, - MdTabsModule, -} from '@angular/material/tabs'; -import {MdToolbar, MdToolbarBase, MdToolbarModule, MdToolbarRow} from '@angular/material/toolbar'; -import { - MD_TOOLTIP_SCROLL_STRATEGY, - MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER, - MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY, - MdTooltip, - MdTooltipModule, -} from '@angular/material/tooltip'; - -/* tslint:disable:max-line-length */ -export {MD_AUTOCOMPLETE_SCROLL_STRATEGY as MAT_AUTOCOMPLETE_SCROLL_STRATEGY}; -export {MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER as MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER}; -export {MD_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY}; -export {MD_AUTOCOMPLETE_VALUE_ACCESSOR as MAT_AUTOCOMPLETE_VALUE_ACCESSOR}; -export {MD_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR as MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR}; -export {MD_CHECKBOX_CONTROL_VALUE_ACCESSOR as MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR}; -export {MD_CHECKBOX_REQUIRED_VALIDATOR as MAT_CHECKBOX_REQUIRED_VALIDATOR}; -export {MD_DATE_FORMATS as MAT_DATE_FORMATS}; -export {MD_DATEPICKER_SCROLL_STRATEGY as MAT_DATEPICKER_SCROLL_STRATEGY}; -export {MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER as MAT_DATEPICKER_SCROLL_STRATEGY_PROVIDER}; -export {MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY}; -export {MD_DATEPICKER_VALIDATORS as MAT_DATEPICKER_VALIDATORS}; -export {MD_DATEPICKER_VALUE_ACCESSOR as MAT_DATEPICKER_VALUE_ACCESSOR}; -export {MD_DIALOG_DATA as MAT_DIALOG_DATA}; -export {MD_DIALOG_SCROLL_STRATEGY as MAT_DIALOG_SCROLL_STRATEGY}; -export {MD_DIALOG_SCROLL_STRATEGY_PROVIDER as MAT_DIALOG_SCROLL_STRATEGY_PROVIDER}; -export {MD_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY}; -export {MD_ERROR_GLOBAL_OPTIONS as MAT_ERROR_GLOBAL_OPTIONS}; -export {MD_MENU_DEFAULT_OPTIONS as MAT_MENU_DEFAULT_OPTIONS}; -export {MD_NATIVE_DATE_FORMATS as MAT_NATIVE_DATE_FORMATS}; -export {MD_PLACEHOLDER_GLOBAL_OPTIONS as MAT_PLACEHOLDER_GLOBAL_OPTIONS}; -export {MD_RADIO_GROUP_CONTROL_VALUE_ACCESSOR as MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR}; -export {MD_RIPPLE_GLOBAL_OPTIONS as MAT_RIPPLE_GLOBAL_OPTIONS}; -export {MD_SELECT_SCROLL_STRATEGY as MAT_SELECT_SCROLL_STRATEGY}; -export {MD_SELECT_SCROLL_STRATEGY_PROVIDER as MAT_SELECT_SCROLL_STRATEGY_PROVIDER}; -export {MD_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY}; -export {MD_SLIDE_TOGGLE_VALUE_ACCESSOR as MAT_SLIDE_TOGGLE_VALUE_ACCESSOR}; -export {MD_SLIDER_VALUE_ACCESSOR as MAT_SLIDER_VALUE_ACCESSOR}; -export {MD_SNACK_BAR_DATA as MAT_SNACK_BAR_DATA}; -export {MD_TOOLTIP_SCROLL_STRATEGY as MAT_TOOLTIP_SCROLL_STRATEGY}; -export {MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER as MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER}; -export {MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY}; -export {MdAccordion as MatAccordion}; -export {MdAccordionDisplayMode as MatAccordionDisplayMode}; -export {MdAnchor as MatAnchor}; -export {MdAutocomplete as MatAutocomplete}; -export {MdAutocompleteModule as MatAutocompleteModule}; -export {MdAutocompleteTrigger as MatAutocompleteTrigger}; -export {MdBasicChip as MatBasicChip}; -export {MdButton as MatButton}; -export {MdButtonBase as MatButtonBase}; -export {MdButtonCssMatStyler as MatButtonCssMatStyler}; -export {MdButtonModule as MatButtonModule}; -export {MdButtonToggle as MatButtonToggle}; -export {MdButtonToggleChange as MatButtonToggleChange}; -export {MdButtonToggleGroup as MatButtonToggleGroup}; -export {MdButtonToggleGroupBase as MatButtonToggleGroupBase}; -export {MdButtonToggleGroupMultiple as MatButtonToggleGroupMultiple}; -export {MdButtonToggleModule as MatButtonToggleModule}; -export {MdCalendar as MatCalendar}; -export {MdCalendarBody as MatCalendarBody}; -export {MdCalendarCell as MatCalendarCell}; -export {MdCard as MatCard}; -export {MdCardActions as MatCardActions}; -export {MdCardAvatar as MatCardAvatar}; -export {MdCardContent as MatCardContent}; -export {MdCardFooter as MatCardFooter}; -export {MdCardHeader as MatCardHeader}; -export {MdCardImage as MatCardImage}; -export {MdCardLgImage as MatCardLgImage}; -export {MdCardMdImage as MatCardMatImage}; -export {MdCardModule as MatCardModule}; -export {MdCardSmImage as MatCardSmImage}; -export {MdCardSubtitle as MatCardSubtitle}; -export {MdCardTitle as MatCardTitle}; -export {MdCardTitleGroup as MatCardTitleGroup}; -export {MdCardXlImage as MatCardXlImage}; -export {MdCell as MatCell}; -export {MdCellDef as MatCellDef}; -export {MdCheckbox as MatCheckbox}; -export {MdCheckboxBase as MatCheckboxBase}; -export {MdCheckboxChange as MatCheckboxChange}; -export {MdCheckboxModule as MatCheckboxModule}; -export {MdCheckboxRequiredValidator as MatCheckboxRequiredValidator}; -export {MdChip as MatChip}; -export {MdChipBase as MatChipBase}; -export {MdChipEvent as MatChipEvent}; -export {MdChipInput as MatChipInput}; -export {MdChipInputEvent as MatChipInputEvent}; -export {MdChipList as MatChipList}; -export {MdChipRemove as MatChipRemove}; -export {MdChipsModule as MatChipsModule}; -export {MdColumnDef as MatColumnDef}; -export {MdCommonModule as MatCommonModule}; -export {MdDateFormats as MatDateFormats}; -export {MdDatepicker as MatDatepicker}; -export {MdDatepickerContent as MatDatepickerContent}; -export {MdDatepickerInput as MatDatepickerInput}; -export {MdDatepickerInputEvent as MatDatepickerInputEvent}; -export {MdDatepickerIntl as MatDatepickerIntl}; -export {MdDatepickerModule as MatDatepickerModule}; -export {MdDatepickerToggle as MatDatepickerToggle}; -export {MdDialog as MatDialog}; -export {MdDialogActions as MatDialogActions}; -export {MdDialogClose as MatDialogClose}; -export {MdDialogConfig as MatDialogConfig}; -export {MdDialogContainer as MatDialogContainer}; -export {MdDialogContent as MatDialogContent}; -export {MdDialogModule as MatDialogModule}; -export {MdDialogRef as MatDialogRef}; -export {MdDialogTitle as MatDialogTitle}; -export {MdDividerCssMatStyler as MatDividerCssMatStyler}; -export {MdDrawerToggleResult as MatDrawerToggleResult}; -export {MdDrawer as MatDrawer}; -export {MdDrawerContainer as MatDrawerContainer}; -export {MdExpansionModule as MatExpansionModule}; -export {MdExpansionPanel as MatExpansionPanel}; -export {MdExpansionPanelActionRow as MatExpansionPanelActionRow}; -export {MdExpansionPanelDescription as MatExpansionPanelDescription}; -export {MdExpansionPanelHeader as MatExpansionPanelHeader}; -export {MdExpansionPanelState as MatExpansionPanelState}; -export {MdExpansionPanelTitle as MatExpansionPanelTitle}; -export {MdFab as MatFab}; -export {MdGridList as MatGridList}; -export {MdGridListModule as MatGridListModule}; -export {MdGridTile as MatGridTile}; -export {MdHeaderCell as MatHeaderCell}; -export {MdHeaderCellDef as MatHeaderCellDef}; -export {MdHeaderRow as MatHeaderRow}; -export {MdIcon as MatIcon}; -export {MdIconBase as MatIconBase}; -export {MdIconButtonCssMatStyler as MatIconButtonCssMatStyler}; -export {MdIconModule as MatIconModule}; -export {MdIconRegistry as MatIconRegistry}; -export {MdInkBar as MatInkBar}; -export {MdInput as MatInput}; -export {MdInputModule as MatInputModule}; -export {MdLine as MatLine}; -export {MdLineModule as MatLineModule}; -export {MdLineSetter as MatLineSetter}; -export {MdList as MatList}; -export {MdListAvatarCssMatStyler as MatListAvatarCssMatStyler}; -export {MdListBase as MatListBase}; -export {MdListCssMatStyler as MatListCssMatStyler}; -export {MdListDivider as MatListDivider}; -export {MdListIconCssMatStyler as MatListIconCssMatStyler}; -export {MdListItem as MatListItem}; -export {MdListItemBase as MatListItemBase}; -export {MdListModule as MatListModule}; -export {MdListOption as MatListOption}; -export {MdListOptionBase as MatListOptionBase}; -export {MdListSubheaderCssMatStyler as MatListSubheaderCssMatStyler}; -export {MdMenu as MatMenu}; -export {MdMenuDefaultOptions as MatMenuDefaultOptions}; -export {MdMenuItem as MatMenuItem}; -export {MdMenuModule as MatMenuModule}; -export {MdMenuPanel as MatMenuPanel}; -export {MdMenuTrigger as MatMenuTrigger}; -export {MdMiniFab as MatMiniFab}; -export {MdMonthView as MatMonthView}; -export {MdNativeDateModule as MatNativeDateModule}; -export {MdNavListCssMatStyler as MatNavListCssMatStyler}; -export {MdOptgroup as MatOptgroup}; -export {MdOptgroupBase as MatOptgroupBase}; -export {MdOption as MatOption}; -export {MdOptionModule as MatOptionModule}; -export {MdOptionSelectionChange as MatOptionSelectionChange}; -export {MdPaginator as MatPaginator}; -export {MdPaginatorIntl as MatPaginatorIntl}; -export {MdPaginatorModule as MatPaginatorModule}; -export {MdProgressBar as MatProgressBar}; -export {MdProgressBarModule as MatProgressBarModule}; -export {MdProgressSpinner as MatProgressSpinner}; -export {MdProgressSpinnerBase as MatProgressSpinnerBase}; -export {MdProgressSpinnerCssMatStyler as MatProgressSpinnerCssMatStyler}; -export {MdProgressSpinnerModule as MatProgressSpinnerModule}; -export {MdPseudoCheckbox as MatPseudoCheckbox}; -export {MdPseudoCheckboxModule as MatPseudoCheckboxModule}; -export {MdPseudoCheckboxState as MatPseudoCheckboxState}; -export {MdRadioButton as MatRadioButton}; -export {MdRadioButtonBase as MatRadioButtonBase}; -export {MdRadioChange as MatRadioChange}; -export {MdRadioGroup as MatRadioGroup}; -export {MdRadioGroupBase as MatRadioGroupBase}; -export {MdRadioModule as MatRadioModule}; -export {MdRaisedButtonCssMatStyler as MatRaisedButtonCssMatStyler}; -export {MdRipple as MatRipple}; -export {MdRippleModule as MatRippleModule}; -export {MdRow as MatRow}; -export {MdSelect as MatSelect}; -export {MdSelectBase as MatSelectBase}; -export {MdSelectChange as MatSelectChange}; -export {MdSelectionList as MatSelectionList}; -export {MdSelectionListBase as MatSelectionListBase}; -export {MdSelectionListOptionEvent as MatSelectionListOptionEvent}; -export {MdSelectModule as MatSelectModule}; -export {MdSelectTrigger as MatSelectTrigger}; -export {MdSidenav as MatSidenav}; -export {MdSidenavContainer as MatSidenavContainer}; -export {MdSidenavModule as MatSidenavModule}; -export {MdSlider as MatSlider}; -export {MdSliderBase as MatSliderBase}; -export {MdSliderChange as MatSliderChange}; -export {MdSliderModule as MatSliderModule}; -export {MdSlideToggle as MatSlideToggle}; -export {MdSlideToggleBase as MatSlideToggleBase}; -export {MdSlideToggleChange as MatSlideToggleChange}; -export {MdSlideToggleModule as MatSlideToggleModule}; -export {MdSnackBar as MatSnackBar}; -export {MdSnackBarConfig as MatSnackBarConfig}; -export {MdSnackBarContainer as MatSnackBarContainer}; -export {MdSnackBarModule as MatSnackBarModule}; -export {MdSnackBarRef as MatSnackBarRef}; -export {MdSort as MatSort}; -export {MdSortable as MatSortable}; -export {MdSortHeader as MatSortHeader}; -export {MdSortHeaderIntl as MatSortHeaderIntl}; -export {MdSortModule as MatSortModule}; -export {MdSpinner as MatSpinner}; -export {MdTab as MatTab}; -export {MdTabBody as MatTabBody}; -export {MdTabBodyOriginState as MatTabBodyOriginState}; -export {MdTabBodyPositionState as MatTabBodyPositionState}; -export {MdTabChangeEvent as MatTabChangeEvent}; -export {MdTabGroup as MatTabGroup}; -export {MdTabGroupBase as MatTabGroupBase}; -export {MdTabHeader as MatTabHeader}; -export {MdTabHeaderPosition as MatTabHeaderPosition}; -export {MdTabLabel as MatTabLabel}; -export {MdTabLabelWrapper as MatTabLabelWrapper}; -export {MdTable as MatTable}; -export {MdTableModule as MatTableModule}; -export {MdTabLink as MatTabLink}; -export {MdTabNav as MatTabNav}; -export {MdTabsModule as MatTabsModule}; -export {MdTextareaAutosize as MatTextareaAutosize}; -export {MdToolbar as MatToolbar}; -export {MdToolbarBase as MatToolbarBase}; -export {MdToolbarModule as MatToolbarModule}; -export {MdToolbarRow as MatToolbarRow}; -export {MdTooltip as MatTooltip}; -export {MdTooltipModule as MatTooltipModule}; -export {MdYearView as MatYearView}; -export {MdFormFieldModule as MatFormFieldModule}; -export {MdError as MatError}; -export {MdFormField as MatFormField}; -export {MdFormFieldControl as MatFormFieldControl}; -export {MdHint as MatHint}; -export {MdPlaceholder as MatPlaceholder}; -export {MdPrefix as MatPrefix}; -export {MdSuffix as MatSuffix}; diff --git a/src/lib/menu/mat-exports.ts b/src/lib/menu/mat-exports.ts new file mode 100644 index 00000000000..1c123fbebf0 --- /dev/null +++ b/src/lib/menu/mat-exports.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_MENU_DEFAULT_OPTIONS, + MdMenu, + MdMenuDefaultOptions, + MdMenuItem, + MdMenuPanel, + MdMenuTrigger, +} from './menu'; +import {MdMenuModule} from './menu-module'; + + +export {MD_MENU_DEFAULT_OPTIONS as MAT_MENU_DEFAULT_OPTIONS}; +export {MdMenu as MatMenu}; +export {MdMenuDefaultOptions as MatMenuDefaultOptions}; +export {MdMenuItem as MatMenuItem}; +export {MdMenuModule as MatMenuModule}; +export {MdMenuPanel as MatMenuPanel}; +export {MdMenuTrigger as MatMenuTrigger}; diff --git a/src/lib/menu/menu-module.ts b/src/lib/menu/menu-module.ts new file mode 100644 index 00000000000..2ebfabe5a91 --- /dev/null +++ b/src/lib/menu/menu-module.ts @@ -0,0 +1,40 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {MdCommonModule} from '@angular/material/core'; +import {OverlayModule} from '@angular/cdk/overlay'; +import {MdMenu, MD_MENU_DEFAULT_OPTIONS} from './menu-directive'; +import {MdMenuItem} from './menu-item'; +import {MdMenuTrigger, MD_MENU_SCROLL_STRATEGY_PROVIDER} from './menu-trigger'; +import {MdRippleModule} from '@angular/material/core'; + + +@NgModule({ + imports: [ + OverlayModule, + CommonModule, + MdRippleModule, + MdCommonModule, + ], + exports: [MdMenu, MdMenuItem, MdMenuTrigger, MdCommonModule], + declarations: [MdMenu, MdMenuItem, MdMenuTrigger], + providers: [ + MD_MENU_SCROLL_STRATEGY_PROVIDER, + { + provide: MD_MENU_DEFAULT_OPTIONS, + useValue: { + overlapTrigger: true, + xPosition: 'after', + yPosition: 'below', + }, + } + ], +}) +export class MdMenuModule {} diff --git a/src/lib/menu/public_api.ts b/src/lib/menu/public_api.ts index e058148b93e..21d9f21df15 100644 --- a/src/lib/menu/public_api.ts +++ b/src/lib/menu/public_api.ts @@ -6,40 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {MdCommonModule} from '@angular/material/core'; -import {OverlayModule} from '@angular/cdk/overlay'; -import {MdMenu, MD_MENU_DEFAULT_OPTIONS} from './menu-directive'; -import {MdMenuItem} from './menu-item'; -import {MdMenuTrigger, MD_MENU_SCROLL_STRATEGY_PROVIDER} from './menu-trigger'; -import {MdRippleModule} from '@angular/material/core'; - - -@NgModule({ - imports: [ - OverlayModule, - CommonModule, - MdRippleModule, - MdCommonModule, - ], - exports: [MdMenu, MdMenuItem, MdMenuTrigger, MdCommonModule], - declarations: [MdMenu, MdMenuItem, MdMenuTrigger], - providers: [ - MD_MENU_SCROLL_STRATEGY_PROVIDER, - { - provide: MD_MENU_DEFAULT_OPTIONS, - useValue: { - overlapTrigger: true, - xPosition: 'after', - yPosition: 'below', - }, - } - ], -}) -export class MdMenuModule {} - - +export * from './menu-module'; export * from './menu'; export {MD_MENU_SCROLL_STRATEGY} from './menu-trigger'; export {fadeInItems, transformMenu} from './menu-animations'; +export * from './mat-exports'; diff --git a/src/lib/paginator/mat-exports.ts b/src/lib/paginator/mat-exports.ts new file mode 100644 index 00000000000..26c46461f0b --- /dev/null +++ b/src/lib/paginator/mat-exports.ts @@ -0,0 +1,16 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdPaginator} from './paginator'; +import {MdPaginatorIntl} from './paginator-intl'; +import {MdPaginatorModule} from './paginator-module'; + + +export {MdPaginator as MatPaginator}; +export {MdPaginatorIntl as MatPaginatorIntl}; +export {MdPaginatorModule as MatPaginatorModule}; diff --git a/src/lib/paginator/paginator-module.ts b/src/lib/paginator/paginator-module.ts new file mode 100644 index 00000000000..a9873e73e2d --- /dev/null +++ b/src/lib/paginator/paginator-module.ts @@ -0,0 +1,29 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import {MdButtonModule} from '@angular/material/button'; +import {MdSelectModule} from '@angular/material/select'; +import {MdTooltipModule} from '@angular/material/tooltip'; +import {MdPaginator} from './paginator'; +import {MdPaginatorIntl} from './paginator-intl'; + + +@NgModule({ + imports: [ + CommonModule, + MdButtonModule, + MdSelectModule, + MdTooltipModule, + ], + exports: [MdPaginator], + declarations: [MdPaginator], + providers: [MdPaginatorIntl], +}) +export class MdPaginatorModule {} diff --git a/src/lib/paginator/public_api.ts b/src/lib/paginator/public_api.ts index a3d7cd62f64..f8689f8d228 100644 --- a/src/lib/paginator/public_api.ts +++ b/src/lib/paginator/public_api.ts @@ -6,28 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {MdButtonModule} from '@angular/material/button'; -import {MdSelectModule} from '@angular/material/select'; -import {MdTooltipModule} from '@angular/material/tooltip'; -import {MdPaginator} from './paginator'; -import {MdPaginatorIntl} from './paginator-intl'; - - -@NgModule({ - imports: [ - CommonModule, - MdButtonModule, - MdSelectModule, - MdTooltipModule, - ], - exports: [MdPaginator], - declarations: [MdPaginator], - providers: [MdPaginatorIntl], -}) -export class MdPaginatorModule {} - - +export * from './paginator-module'; export * from './paginator'; export * from './paginator-intl'; +export * from './mat-exports'; diff --git a/src/lib/progress-bar/mat-exports.ts b/src/lib/progress-bar/mat-exports.ts new file mode 100644 index 00000000000..7550fc80e7d --- /dev/null +++ b/src/lib/progress-bar/mat-exports.ts @@ -0,0 +1,14 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdProgressBar} from './progress-bar'; +import {MdProgressBarModule} from './progress-bar-module'; + + +export {MdProgressBar as MatProgressBar}; +export {MdProgressBarModule as MatProgressBarModule}; diff --git a/src/lib/progress-bar/progress-bar-module.ts b/src/lib/progress-bar/progress-bar-module.ts new file mode 100644 index 00000000000..c67dbcd654b --- /dev/null +++ b/src/lib/progress-bar/progress-bar-module.ts @@ -0,0 +1,20 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {MdCommonModule} from '@angular/material/core'; +import {MdProgressBar} from './progress-bar'; + + +@NgModule({ + imports: [CommonModule, MdCommonModule], + exports: [MdProgressBar, MdCommonModule], + declarations: [MdProgressBar], +}) +export class MdProgressBarModule {} diff --git a/src/lib/progress-bar/public_api.ts b/src/lib/progress-bar/public_api.ts index 40218edb443..e4284632b89 100644 --- a/src/lib/progress-bar/public_api.ts +++ b/src/lib/progress-bar/public_api.ts @@ -6,18 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {MdCommonModule} from '@angular/material/core'; -import {MdProgressBar} from './progress-bar'; - - -@NgModule({ - imports: [CommonModule, MdCommonModule], - exports: [MdProgressBar, MdCommonModule], - declarations: [MdProgressBar], -}) -export class MdProgressBarModule {} - - +export * from './progress-bar-module'; export * from './progress-bar'; +export * from './mat-exports'; diff --git a/src/lib/progress-spinner/mat-exports.ts b/src/lib/progress-spinner/mat-exports.ts new file mode 100644 index 00000000000..6b1c3708aa8 --- /dev/null +++ b/src/lib/progress-spinner/mat-exports.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MdProgressSpinner, + MdProgressSpinnerBase, + MdProgressSpinnerCssMatStyler, + MdSpinner, +} from './progress-spinner'; +import {MdProgressSpinnerModule} from './progress-spinner-module'; + + +export {MdProgressSpinner as MatProgressSpinner}; +export {MdProgressSpinnerBase as MatProgressSpinnerBase}; +export {MdProgressSpinnerCssMatStyler as MatProgressSpinnerCssMatStyler}; +export {MdProgressSpinnerModule as MatProgressSpinnerModule}; +export {MdSpinner as MatSpinner}; diff --git a/src/lib/progress-spinner/progress-spinner-module.ts b/src/lib/progress-spinner/progress-spinner-module.ts new file mode 100644 index 00000000000..cb106eaee75 --- /dev/null +++ b/src/lib/progress-spinner/progress-spinner-module.ts @@ -0,0 +1,32 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdCommonModule} from '@angular/material/core'; +import { + MdProgressSpinner, + MdSpinner, + MdProgressSpinnerCssMatStyler, +} from './progress-spinner'; + + +@NgModule({ + imports: [MdCommonModule], + exports: [ + MdProgressSpinner, + MdSpinner, + MdCommonModule, + MdProgressSpinnerCssMatStyler + ], + declarations: [ + MdProgressSpinner, + MdSpinner, + MdProgressSpinnerCssMatStyler + ], +}) +export class MdProgressSpinnerModule {} diff --git a/src/lib/progress-spinner/public_api.ts b/src/lib/progress-spinner/public_api.ts index 94453fd891e..563453f03d9 100644 --- a/src/lib/progress-spinner/public_api.ts +++ b/src/lib/progress-spinner/public_api.ts @@ -6,30 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdCommonModule} from '@angular/material/core'; -import { - MdProgressSpinner, - MdSpinner, - MdProgressSpinnerCssMatStyler, -} from './progress-spinner'; - - -@NgModule({ - imports: [MdCommonModule], - exports: [ - MdProgressSpinner, - MdSpinner, - MdCommonModule, - MdProgressSpinnerCssMatStyler - ], - declarations: [ - MdProgressSpinner, - MdSpinner, - MdProgressSpinnerCssMatStyler - ], -}) -class MdProgressSpinnerModule {} - -export {MdProgressSpinnerModule}; +export * from './progress-spinner-module'; export * from './progress-spinner'; +export * from './mat-exports'; diff --git a/src/lib/public_api.ts b/src/lib/public_api.ts index b38675d877b..526918c24de 100644 --- a/src/lib/public_api.ts +++ b/src/lib/public_api.ts @@ -6,15 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -/** - * @module - * @description - * Entry point for all public APIs of Angular Material. - */ - export * from './version'; - - export * from '@angular/material/autocomplete'; export * from '@angular/material/button'; export * from '@angular/material/button-toggle'; @@ -46,4 +38,3 @@ export * from '@angular/material/table'; export * from '@angular/material/tabs'; export * from '@angular/material/toolbar'; export * from '@angular/material/tooltip'; -export * from './mat-exports'; diff --git a/src/lib/radio/mat-exports.ts b/src/lib/radio/mat-exports.ts new file mode 100644 index 00000000000..75ef35bdb6f --- /dev/null +++ b/src/lib/radio/mat-exports.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, + MdRadioButton, + MdRadioButtonBase, + MdRadioChange, + MdRadioGroup, + MdRadioGroupBase, +} from './radio'; +import {MdRadioModule} from './radio-module'; + + +export {MD_RADIO_GROUP_CONTROL_VALUE_ACCESSOR as MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR}; +export {MdRadioButton as MatRadioButton}; +export {MdRadioButtonBase as MatRadioButtonBase}; +export {MdRadioChange as MatRadioChange}; +export {MdRadioGroup as MatRadioGroup}; +export {MdRadioGroupBase as MatRadioGroupBase}; +export {MdRadioModule as MatRadioModule}; diff --git a/src/lib/radio/public_api.ts b/src/lib/radio/public_api.ts index d434c542fcb..0d89666ce7d 100644 --- a/src/lib/radio/public_api.ts +++ b/src/lib/radio/public_api.ts @@ -6,24 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {VIEWPORT_RULER_PROVIDER} from '@angular/cdk/overlay'; -import { - MdRippleModule, - MdCommonModule, - UNIQUE_SELECTION_DISPATCHER_PROVIDER, -} from '@angular/material/core'; -import {MdRadioGroup, MdRadioButton} from './radio'; -import {A11yModule} from '@angular/cdk/a11y'; - -@NgModule({ - imports: [CommonModule, MdRippleModule, MdCommonModule, A11yModule], - exports: [MdRadioGroup, MdRadioButton, MdCommonModule], - providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER, VIEWPORT_RULER_PROVIDER], - declarations: [MdRadioGroup, MdRadioButton], -}) -export class MdRadioModule {} - - +export * from './radio-module'; export * from './radio'; +export * from './mat-exports'; diff --git a/src/lib/radio/radio-module.ts b/src/lib/radio/radio-module.ts new file mode 100644 index 00000000000..114970a7ff1 --- /dev/null +++ b/src/lib/radio/radio-module.ts @@ -0,0 +1,26 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {VIEWPORT_RULER_PROVIDER} from '@angular/cdk/overlay'; +import { + MdRippleModule, + MdCommonModule, + UNIQUE_SELECTION_DISPATCHER_PROVIDER, +} from '@angular/material/core'; +import {MdRadioGroup, MdRadioButton} from './radio'; +import {A11yModule} from '@angular/cdk/a11y'; + +@NgModule({ + imports: [CommonModule, MdRippleModule, MdCommonModule, A11yModule], + exports: [MdRadioGroup, MdRadioButton, MdCommonModule], + providers: [UNIQUE_SELECTION_DISPATCHER_PROVIDER, VIEWPORT_RULER_PROVIDER], + declarations: [MdRadioGroup, MdRadioButton], +}) +export class MdRadioModule {} diff --git a/src/lib/select/mat-exports.ts b/src/lib/select/mat-exports.ts new file mode 100644 index 00000000000..4028df76cc0 --- /dev/null +++ b/src/lib/select/mat-exports.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_SELECT_SCROLL_STRATEGY, + MD_SELECT_SCROLL_STRATEGY_PROVIDER, + MD_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, + MdSelect, + MdSelectBase, + MdSelectChange, + MdSelectTrigger, +} from './select'; +import {MdSelectModule} from './select-module'; + + +export {MD_SELECT_SCROLL_STRATEGY as MAT_SELECT_SCROLL_STRATEGY}; +export {MD_SELECT_SCROLL_STRATEGY_PROVIDER as MAT_SELECT_SCROLL_STRATEGY_PROVIDER}; +export {MD_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY}; +export {MdSelect as MatSelect}; +export {MdSelectBase as MatSelectBase}; +export {MdSelectChange as MatSelectChange}; +export {MdSelectModule as MatSelectModule}; +export {MdSelectTrigger as MatSelectTrigger}; diff --git a/src/lib/select/public_api.ts b/src/lib/select/public_api.ts index 71d19e27802..ff3282c457e 100644 --- a/src/lib/select/public_api.ts +++ b/src/lib/select/public_api.ts @@ -6,26 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {MdSelect, MdSelectTrigger, MD_SELECT_SCROLL_STRATEGY_PROVIDER} from './select'; -import {MdCommonModule, MdOptionModule} from '@angular/material/core'; -import {OverlayModule} from '@angular/cdk/overlay'; - - -@NgModule({ - imports: [ - CommonModule, - OverlayModule, - MdOptionModule, - MdCommonModule, - ], - exports: [MdSelect, MdSelectTrigger, MdOptionModule, MdCommonModule], - declarations: [MdSelect, MdSelectTrigger], - providers: [MD_SELECT_SCROLL_STRATEGY_PROVIDER] -}) -export class MdSelectModule {} - - +export * from './select-module'; export * from './select'; export {fadeInContent, transformPanel, transformPlaceholder} from './select-animations'; +export * from './mat-exports'; diff --git a/src/lib/select/select-module.ts b/src/lib/select/select-module.ts new file mode 100644 index 00000000000..0b0c397b368 --- /dev/null +++ b/src/lib/select/select-module.ts @@ -0,0 +1,27 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {MdSelect, MdSelectTrigger, MD_SELECT_SCROLL_STRATEGY_PROVIDER} from './select'; +import {MdCommonModule, MdOptionModule} from '@angular/material/core'; +import {OverlayModule} from '@angular/cdk/overlay'; + + +@NgModule({ + imports: [ + CommonModule, + OverlayModule, + MdOptionModule, + MdCommonModule, + ], + exports: [MdSelect, MdSelectTrigger, MdOptionModule, MdCommonModule], + declarations: [MdSelect, MdSelectTrigger], + providers: [MD_SELECT_SCROLL_STRATEGY_PROVIDER] +}) +export class MdSelectModule {} diff --git a/src/lib/sidenav/mat-exports.ts b/src/lib/sidenav/mat-exports.ts new file mode 100644 index 00000000000..6257189d29b --- /dev/null +++ b/src/lib/sidenav/mat-exports.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdDrawer, MdDrawerContainer, MdDrawerToggleResult} from './drawer'; +import {MdSidenav, MdSidenavContainer} from './sidenav'; +import {MdSidenavModule} from './sidenav-module'; + + +export {MdDrawerToggleResult as MatDrawerToggleResult}; +export {MdDrawer as MatDrawer}; +export {MdDrawerContainer as MatDrawerContainer}; +export {MdSidenav as MatSidenav}; +export {MdSidenavContainer as MatSidenavContainer}; +export {MdSidenavModule as MatSidenavModule}; diff --git a/src/lib/sidenav/public_api.ts b/src/lib/sidenav/public_api.ts index 948fed606da..7b5e4bfa1b2 100644 --- a/src/lib/sidenav/public_api.ts +++ b/src/lib/sidenav/public_api.ts @@ -6,22 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {A11yModule} from '@angular/cdk/a11y'; -import {OverlayModule} from '@angular/cdk/overlay'; -import {MdCommonModule} from '@angular/material/core'; -import {MdDrawer, MdDrawerContainer} from './drawer'; -import {MdSidenav, MdSidenavContainer} from './sidenav'; - - -@NgModule({ - imports: [CommonModule, MdCommonModule, A11yModule, OverlayModule], - exports: [MdDrawerContainer, MdDrawer, MdSidenavContainer, MdSidenav, MdCommonModule], - declarations: [MdDrawerContainer, MdDrawer, MdSidenavContainer, MdSidenav], -}) -export class MdSidenavModule {} - - +export * from './sidenav-module'; export * from './drawer'; export * from './sidenav'; +export * from './mat-exports'; diff --git a/src/lib/sidenav/sidenav-module.ts b/src/lib/sidenav/sidenav-module.ts new file mode 100644 index 00000000000..16f14d9d98f --- /dev/null +++ b/src/lib/sidenav/sidenav-module.ts @@ -0,0 +1,23 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {A11yModule} from '@angular/cdk/a11y'; +import {OverlayModule} from '@angular/cdk/overlay'; +import {MdCommonModule} from '@angular/material/core'; +import {MdDrawer, MdDrawerContainer} from './drawer'; +import {MdSidenav, MdSidenavContainer} from './sidenav'; + + +@NgModule({ + imports: [CommonModule, MdCommonModule, A11yModule, OverlayModule], + exports: [MdDrawerContainer, MdDrawer, MdSidenavContainer, MdSidenav, MdCommonModule], + declarations: [MdDrawerContainer, MdDrawer, MdSidenavContainer, MdSidenav], +}) +export class MdSidenavModule {} diff --git a/src/lib/slide-toggle/mat-exports.ts b/src/lib/slide-toggle/mat-exports.ts new file mode 100644 index 00000000000..3772ee2c686 --- /dev/null +++ b/src/lib/slide-toggle/mat-exports.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_SLIDE_TOGGLE_VALUE_ACCESSOR, + MdSlideToggle, + MdSlideToggleBase, + MdSlideToggleChange, +} from './slide-toggle'; +import {MdSlideToggleModule} from './slide-toggle-module'; + + +export {MD_SLIDE_TOGGLE_VALUE_ACCESSOR as MAT_SLIDE_TOGGLE_VALUE_ACCESSOR}; +export {MdSlideToggle as MatSlideToggle}; +export {MdSlideToggleBase as MatSlideToggleBase}; +export {MdSlideToggleChange as MatSlideToggleChange}; +export {MdSlideToggleModule as MatSlideToggleModule}; diff --git a/src/lib/slide-toggle/public_api.ts b/src/lib/slide-toggle/public_api.ts index 9ad294e0f0d..31a80969631 100644 --- a/src/lib/slide-toggle/public_api.ts +++ b/src/lib/slide-toggle/public_api.ts @@ -6,28 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {ObserversModule} from '@angular/cdk/observers'; -import {PlatformModule} from '@angular/cdk/platform'; -import {NgModule} from '@angular/core'; -import { - GestureConfig, - MdCommonModule, - MdRippleModule, -} from '@angular/material/core'; -import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser'; -import {A11yModule} from '@angular/cdk/a11y'; -import {MdSlideToggle} from './slide-toggle'; - - -@NgModule({ - imports: [MdRippleModule, MdCommonModule, PlatformModule, ObserversModule, A11yModule], - exports: [MdSlideToggle, MdCommonModule], - declarations: [MdSlideToggle], - providers: [ - {provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig} - ], -}) -export class MdSlideToggleModule {} - - +export * from './slide-toggle-module'; export * from './slide-toggle'; +export * from './mat-exports'; diff --git a/src/lib/slide-toggle/slide-toggle-module.ts b/src/lib/slide-toggle/slide-toggle-module.ts new file mode 100644 index 00000000000..218e6c36b12 --- /dev/null +++ b/src/lib/slide-toggle/slide-toggle-module.ts @@ -0,0 +1,30 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {ObserversModule} from '@angular/cdk/observers'; +import {PlatformModule} from '@angular/cdk/platform'; +import {NgModule} from '@angular/core'; +import { + GestureConfig, + MdCommonModule, + MdRippleModule, +} from '@angular/material/core'; +import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser'; +import {A11yModule} from '@angular/cdk/a11y'; +import {MdSlideToggle} from './slide-toggle'; + + +@NgModule({ + imports: [MdRippleModule, MdCommonModule, PlatformModule, ObserversModule, A11yModule], + exports: [MdSlideToggle, MdCommonModule], + declarations: [MdSlideToggle], + providers: [ + {provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig} + ], +}) +export class MdSlideToggleModule {} diff --git a/src/lib/slider/mat-exports.ts b/src/lib/slider/mat-exports.ts new file mode 100644 index 00000000000..99bad0cf926 --- /dev/null +++ b/src/lib/slider/mat-exports.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_SLIDER_VALUE_ACCESSOR, + MdSlider, + MdSliderBase, + MdSliderChange, +} from './slider'; +import {MdSliderModule} from './slider-module'; + + +export {MD_SLIDER_VALUE_ACCESSOR as MAT_SLIDER_VALUE_ACCESSOR}; +export {MdSlider as MatSlider}; +export {MdSliderBase as MatSliderBase}; +export {MdSliderChange as MatSliderChange}; +export {MdSliderModule as MatSliderModule}; diff --git a/src/lib/slider/public_api.ts b/src/lib/slider/public_api.ts index 4af4cafbdd6..96bbf656a58 100644 --- a/src/lib/slider/public_api.ts +++ b/src/lib/slider/public_api.ts @@ -6,22 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser'; -import {CommonModule} from '@angular/common'; -import {MdCommonModule, GestureConfig} from '@angular/material/core'; -import {MdSlider} from './slider'; -import {BidiModule} from '@angular/material/core'; -import {A11yModule} from '@angular/cdk/a11y'; - - -@NgModule({ - imports: [CommonModule, MdCommonModule, BidiModule, A11yModule], - exports: [MdSlider, MdCommonModule], - declarations: [MdSlider], - providers: [{provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig}] -}) -export class MdSliderModule {} - - +export * from './slider-module'; export * from './slider'; +export * from './mat-exports'; diff --git a/src/lib/slider/slider-module.ts b/src/lib/slider/slider-module.ts new file mode 100644 index 00000000000..2d669c54d4a --- /dev/null +++ b/src/lib/slider/slider-module.ts @@ -0,0 +1,24 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser'; +import {CommonModule} from '@angular/common'; +import {MdCommonModule, GestureConfig} from '@angular/material/core'; +import {MdSlider} from './slider'; +import {BidiModule} from '@angular/material/core'; +import {A11yModule} from '@angular/cdk/a11y'; + + +@NgModule({ + imports: [CommonModule, MdCommonModule, BidiModule, A11yModule], + exports: [MdSlider, MdCommonModule], + declarations: [MdSlider], + providers: [{provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig}] +}) +export class MdSliderModule {} diff --git a/src/lib/snack-bar/mat-exports.ts b/src/lib/snack-bar/mat-exports.ts new file mode 100644 index 00000000000..04dd5838aed --- /dev/null +++ b/src/lib/snack-bar/mat-exports.ts @@ -0,0 +1,21 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdSnackBar} from './snack-bar'; +import {MD_SNACK_BAR_DATA, MdSnackBarConfig} from './snack-bar-config'; +import {MdSnackBarContainer} from './snack-bar-container'; +import {MdSnackBarModule} from './snack-bar-module'; +import {MdSnackBarRef} from './snack-bar-ref'; + + +export {MD_SNACK_BAR_DATA as MAT_SNACK_BAR_DATA}; +export {MdSnackBar as MatSnackBar}; +export {MdSnackBarConfig as MatSnackBarConfig}; +export {MdSnackBarContainer as MatSnackBarContainer}; +export {MdSnackBarModule as MatSnackBarModule}; +export {MdSnackBarRef as MatSnackBarRef}; diff --git a/src/lib/snack-bar/public_api.ts b/src/lib/snack-bar/public_api.ts index db641fd145a..6799827122d 100644 --- a/src/lib/snack-bar/public_api.ts +++ b/src/lib/snack-bar/public_api.ts @@ -6,34 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {OverlayModule} from '@angular/cdk/overlay'; -import {PortalModule} from '@angular/cdk/portal'; -import {LIVE_ANNOUNCER_PROVIDER} from '@angular/cdk/a11y'; -import {MdCommonModule} from '@angular/material/core'; -import {MdSnackBar} from './snack-bar'; -import {MdSnackBarContainer} from './snack-bar-container'; -import {SimpleSnackBar} from './simple-snack-bar'; - - -@NgModule({ - imports: [ - OverlayModule, - PortalModule, - CommonModule, - MdCommonModule, - ], - exports: [MdSnackBarContainer, MdCommonModule], - declarations: [MdSnackBarContainer, SimpleSnackBar], - entryComponents: [MdSnackBarContainer, SimpleSnackBar], - providers: [MdSnackBar, LIVE_ANNOUNCER_PROVIDER] -}) -export class MdSnackBarModule {} - - +export * from './snack-bar-module'; export * from './snack-bar'; export * from './snack-bar-container'; export * from './snack-bar-config'; export * from './snack-bar-ref'; export * from './simple-snack-bar'; +export * from './mat-exports'; diff --git a/src/lib/snack-bar/snack-bar-module.ts b/src/lib/snack-bar/snack-bar-module.ts new file mode 100644 index 00000000000..d436a4da504 --- /dev/null +++ b/src/lib/snack-bar/snack-bar-module.ts @@ -0,0 +1,32 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {OverlayModule} from '@angular/cdk/overlay'; +import {PortalModule} from '@angular/cdk/portal'; +import {LIVE_ANNOUNCER_PROVIDER} from '@angular/cdk/a11y'; +import {MdCommonModule} from '@angular/material/core'; +import {MdSnackBar} from './snack-bar'; +import {MdSnackBarContainer} from './snack-bar-container'; +import {SimpleSnackBar} from './simple-snack-bar'; + + +@NgModule({ + imports: [ + OverlayModule, + PortalModule, + CommonModule, + MdCommonModule, + ], + exports: [MdSnackBarContainer, MdCommonModule], + declarations: [MdSnackBarContainer, SimpleSnackBar], + entryComponents: [MdSnackBarContainer, SimpleSnackBar], + providers: [MdSnackBar, LIVE_ANNOUNCER_PROVIDER] +}) +export class MdSnackBarModule {} diff --git a/src/lib/sort/mat-exports.ts b/src/lib/sort/mat-exports.ts new file mode 100644 index 00000000000..44a7b1ccb49 --- /dev/null +++ b/src/lib/sort/mat-exports.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdSort, MdSortable} from './sort'; +import {MdSortHeader} from './sort-header'; +import {MdSortHeaderIntl} from './sort-header-intl'; +import {MdSortModule} from './sort-module'; + + +export {MdSort as MatSort}; +export {MdSortable as MatSortable}; +export {MdSortHeader as MatSortHeader}; +export {MdSortHeaderIntl as MatSortHeaderIntl}; +export {MdSortModule as MatSortModule}; diff --git a/src/lib/sort/public_api.ts b/src/lib/sort/public_api.ts index 7d1ed5454b6..a9cb88a5c03 100644 --- a/src/lib/sort/public_api.ts +++ b/src/lib/sort/public_api.ts @@ -6,21 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdSortHeader} from './sort-header'; -import {MdSort} from './sort'; -import {MdSortHeaderIntl} from './sort-header-intl'; -import {CommonModule} from '@angular/common'; - +export * from './sort-module'; export * from './sort-direction'; export * from './sort-header'; export * from './sort-header-intl'; export * from './sort'; - -@NgModule({ - imports: [CommonModule], - exports: [MdSort, MdSortHeader], - declarations: [MdSort, MdSortHeader], - providers: [MdSortHeaderIntl] -}) -export class MdSortModule {} +export * from './mat-exports'; diff --git a/src/lib/sort/sort-module.ts b/src/lib/sort/sort-module.ts new file mode 100644 index 00000000000..3f8cb960f55 --- /dev/null +++ b/src/lib/sort/sort-module.ts @@ -0,0 +1,22 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdSortHeader} from './sort-header'; +import {MdSort} from './sort'; +import {MdSortHeaderIntl} from './sort-header-intl'; +import {CommonModule} from '@angular/common'; + + +@NgModule({ + imports: [CommonModule], + exports: [MdSort, MdSortHeader], + declarations: [MdSort, MdSortHeader], + providers: [MdSortHeaderIntl] +}) +export class MdSortModule {} diff --git a/src/lib/stepper/mat-exports.ts b/src/lib/stepper/mat-exports.ts new file mode 100644 index 00000000000..f561023416b --- /dev/null +++ b/src/lib/stepper/mat-exports.ts @@ -0,0 +1,29 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MdHorizontalStepper, + MdStep, + MdStepper, + MdVerticalStepper, +} from './stepper'; +import {MdStepHeader} from './step-header'; +import {MdStepLabel} from './step-label'; +import {MdStepperNext, MdStepperPrevious} from './stepper-button'; +import {MdStepperModule} from './stepper-module'; + + +export {MdStep as MatStep}; +export {MdStepHeader as MatStepHeader}; +export {MdStepLabel as MatStepLabel}; +export {MdStepper as MatStepper}; +export {MdHorizontalStepper as MatHorizontalStepper}; +export {MdStepperModule as MatStepperModule}; +export {MdVerticalStepper as MatVerticalStepper}; +export {MdStepperPrevious as MatStepperPrevious}; +export {MdStepperNext as MatStepperNext}; diff --git a/src/lib/stepper/public_api.ts b/src/lib/stepper/public_api.ts index 298427d9eb6..f55f0ffc768 100644 --- a/src/lib/stepper/public_api.ts +++ b/src/lib/stepper/public_api.ts @@ -6,45 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import {PortalModule} from '@angular/cdk/portal'; -import {CdkStepperModule} from '@angular/cdk/stepper'; -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {MdButtonModule} from '@angular/material/button'; -import {MdCommonModule} from '@angular/material/core'; -import {MdIconModule} from '@angular/material/icon'; -import {MdStepHeader} from './step-header'; -import {MdStepLabel} from './step-label'; -import {MdHorizontalStepper, MdStep, MdStepper, MdVerticalStepper} from './stepper'; -import {MdStepperNext, MdStepperPrevious} from './stepper-button'; - - -@NgModule({ - imports: [ - MdCommonModule, - CommonModule, - PortalModule, - MdButtonModule, - CdkStepperModule, - MdIconModule - ], - exports: [ - MdCommonModule, - MdHorizontalStepper, - MdVerticalStepper, - MdStep, - MdStepLabel, - MdStepper, - MdStepperNext, - MdStepperPrevious, - MdStepHeader - ], - declarations: [MdHorizontalStepper, MdVerticalStepper, MdStep, MdStepLabel, MdStepper, - MdStepperNext, MdStepperPrevious, MdStepHeader], -}) -export class MdStepperModule {} - +export * from './stepper-module'; export * from './step-label'; export * from './stepper'; export * from './stepper-button'; export * from './step-header'; +export * from './mat-exports'; diff --git a/src/lib/stepper/stepper-module.ts b/src/lib/stepper/stepper-module.ts new file mode 100644 index 00000000000..5737a20e61e --- /dev/null +++ b/src/lib/stepper/stepper-module.ts @@ -0,0 +1,45 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {PortalModule} from '@angular/cdk/portal'; +import {CdkStepperModule} from '@angular/cdk/stepper'; +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import {MdButtonModule} from '@angular/material/button'; +import {MdCommonModule} from '@angular/material/core'; +import {MdIconModule} from '@angular/material/icon'; +import {MdStepHeader} from './step-header'; +import {MdStepLabel} from './step-label'; +import {MdHorizontalStepper, MdStep, MdStepper, MdVerticalStepper} from './stepper'; +import {MdStepperNext, MdStepperPrevious} from './stepper-button'; + + +@NgModule({ + imports: [ + MdCommonModule, + CommonModule, + PortalModule, + MdButtonModule, + CdkStepperModule, + MdIconModule + ], + exports: [ + MdCommonModule, + MdHorizontalStepper, + MdVerticalStepper, + MdStep, + MdStepLabel, + MdStepper, + MdStepperNext, + MdStepperPrevious, + MdStepHeader + ], + declarations: [MdHorizontalStepper, MdVerticalStepper, MdStep, MdStepLabel, MdStepper, + MdStepperNext, MdStepperPrevious, MdStepHeader], +}) +export class MdStepperModule {} diff --git a/src/lib/table/mat-exports.ts b/src/lib/table/mat-exports.ts new file mode 100644 index 00000000000..9554e669583 --- /dev/null +++ b/src/lib/table/mat-exports.ts @@ -0,0 +1,23 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdCell, MdCellDef, MdColumnDef, MdHeaderCell, MdHeaderCellDef} from './cell'; +import {MdHeaderRow, MdRow} from './row'; +import {MdTable} from './table'; +import {MdTableModule} from './table-module'; + + +export {MdCell as MatCell}; +export {MdCellDef as MatCellDef}; +export {MdColumnDef as MatColumnDef}; +export {MdHeaderCell as MatHeaderCell}; +export {MdHeaderCellDef as MatHeaderCellDef}; +export {MdHeaderRow as MatHeaderRow}; +export {MdRow as MatRow}; +export {MdTable as MatTable}; +export {MdTableModule as MatTableModule}; diff --git a/src/lib/table/public_api.ts b/src/lib/table/public_api.ts index 80517d4dde9..8626940dc2e 100644 --- a/src/lib/table/public_api.ts +++ b/src/lib/table/public_api.ts @@ -6,27 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdTable} from './table'; -import {CdkTableModule} from '@angular/cdk/table'; -import {MdCell, MdHeaderCell, MdCellDef, MdHeaderCellDef, MdColumnDef} from './cell'; -import {MdHeaderRow, MdRow, MdHeaderRowDef, MdRowDef, MatHeaderRowDef, MatRowDef} from './row'; -import {CommonModule} from '@angular/common'; -import {MdCommonModule} from '@angular/material/core'; - +export * from './table-module'; export * from './cell'; export * from './table'; export * from './row'; - -@NgModule({ - imports: [CdkTableModule, CommonModule, MdCommonModule], - exports: [MdTable, MdCellDef, MdHeaderCellDef, MdColumnDef, - MdHeaderRowDef, MdRowDef, - MdHeaderCell, MdCell, MdHeaderRow, MdRow, - MatHeaderRowDef, MatRowDef], - declarations: [MdTable, MdCellDef, MdHeaderCellDef, MdColumnDef, - MdHeaderRowDef, MdRowDef, - MdHeaderCell, MdCell, MdHeaderRow, MdRow, - MatHeaderRowDef, MatRowDef], -}) -export class MdTableModule {} +export * from './mat-exports'; diff --git a/src/lib/table/table-module.ts b/src/lib/table/table-module.ts new file mode 100644 index 00000000000..791d0317b60 --- /dev/null +++ b/src/lib/table/table-module.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdTable} from './table'; +import {CdkTableModule} from '@angular/cdk/table'; +import {MdCell, MdHeaderCell, MdCellDef, MdHeaderCellDef, MdColumnDef} from './cell'; +import {MdHeaderRow, MdRow, MdHeaderRowDef, MdRowDef, MatHeaderRowDef, MatRowDef} from './row'; +import {CommonModule} from '@angular/common'; +import {MdCommonModule} from '@angular/material/core'; + +@NgModule({ + imports: [CdkTableModule, CommonModule, MdCommonModule], + exports: [MdTable, MdCellDef, MdHeaderCellDef, MdColumnDef, + MdHeaderRowDef, MdRowDef, + MdHeaderCell, MdCell, MdHeaderRow, MdRow, + MatHeaderRowDef, MatRowDef], + declarations: [MdTable, MdCellDef, MdHeaderCellDef, MdColumnDef, + MdHeaderRowDef, MdRowDef, + MdHeaderCell, MdCell, MdHeaderRow, MdRow, + MatHeaderRowDef, MatRowDef], +}) +export class MdTableModule {} diff --git a/src/lib/tabs/mat-exports.ts b/src/lib/tabs/mat-exports.ts new file mode 100644 index 00000000000..b859f73cff3 --- /dev/null +++ b/src/lib/tabs/mat-exports.ts @@ -0,0 +1,34 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdInkBar} from './ink-bar'; +import {MdTab} from './tab'; +import {MdTabBody, MdTabBodyOriginState, MdTabBodyPositionState} from './tab-body'; +import {MdTabChangeEvent, MdTabGroup, MdTabGroupBase, MdTabHeaderPosition} from './tab-group'; +import {MdTabHeader} from './tab-header'; +import {MdTabLabel} from './tab-label'; +import {MdTabLabelWrapper} from './tab-label-wrapper'; +import {MdTabLink, MdTabNav} from './tab-nav-bar/index'; +import {MdTabsModule} from './tabs-module'; + + +export {MdInkBar as MatInkBar}; +export {MdTab as MatTab}; +export {MdTabBody as MatTabBody}; +export {MdTabBodyOriginState as MatTabBodyOriginState}; +export {MdTabBodyPositionState as MatTabBodyPositionState}; +export {MdTabChangeEvent as MatTabChangeEvent}; +export {MdTabGroup as MatTabGroup}; +export {MdTabGroupBase as MatTabGroupBase}; +export {MdTabHeader as MatTabHeader}; +export {MdTabHeaderPosition as MatTabHeaderPosition}; +export {MdTabLabel as MatTabLabel}; +export {MdTabLabelWrapper as MatTabLabelWrapper}; +export {MdTabLink as MatTabLink}; +export {MdTabNav as MatTabNav}; +export {MdTabsModule as MatTabsModule}; diff --git a/src/lib/tabs/public_api.ts b/src/lib/tabs/public_api.ts index 1821ae41243..75d1ff5c1ac 100644 --- a/src/lib/tabs/public_api.ts +++ b/src/lib/tabs/public_api.ts @@ -6,56 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ObserversModule} from '@angular/cdk/observers'; -import {PortalModule} from '@angular/cdk/portal'; -import {ScrollDispatchModule, VIEWPORT_RULER_PROVIDER} from '@angular/cdk/scrolling'; -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {MdCommonModule, MdRippleModule} from '@angular/material/core'; -import {MdInkBar} from './ink-bar'; -import {MdTab} from './tab'; -import {MdTabBody} from './tab-body'; -import {MdTabGroup} from './tab-group'; -import {MdTabHeader} from './tab-header'; -import {MdTabLabel} from './tab-label'; -import {MdTabLabelWrapper} from './tab-label-wrapper'; -import {MdTabLink, MdTabNav} from './tab-nav-bar/tab-nav-bar'; - - -@NgModule({ - imports: [ - CommonModule, - MdCommonModule, - PortalModule, - MdRippleModule, - ObserversModule, - ScrollDispatchModule, - ], - // Don't export all components because some are only to be used internally. - exports: [ - MdCommonModule, - MdTabGroup, - MdTabLabel, - MdTab, - MdTabNav, - MdTabLink, - ], - declarations: [ - MdTabGroup, - MdTabLabel, - MdTab, - MdInkBar, - MdTabLabelWrapper, - MdTabNav, - MdTabLink, - MdTabBody, - MdTabHeader - ], - providers: [VIEWPORT_RULER_PROVIDER], -}) -export class MdTabsModule {} - - +export * from './tabs-module'; export * from './tab-group'; export {MdInkBar} from './ink-bar'; export {MdTabBody, MdTabBodyOriginState, MdTabBodyPositionState} from './tab-body'; @@ -65,3 +16,4 @@ export {MdTab} from './tab'; export {MdTabLabel} from './tab-label'; export {MdTabNav, MdTabLink} from './tab-nav-bar/index'; +export * from './mat-exports'; diff --git a/src/lib/tabs/tabs-module.ts b/src/lib/tabs/tabs-module.ts new file mode 100644 index 00000000000..ee93f03ec4f --- /dev/null +++ b/src/lib/tabs/tabs-module.ts @@ -0,0 +1,56 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {ObserversModule} from '@angular/cdk/observers'; +import {PortalModule} from '@angular/cdk/portal'; +import {ScrollDispatchModule, VIEWPORT_RULER_PROVIDER} from '@angular/cdk/scrolling'; +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import {MdCommonModule, MdRippleModule} from '@angular/material/core'; +import {MdInkBar} from './ink-bar'; +import {MdTab} from './tab'; +import {MdTabBody} from './tab-body'; +import {MdTabGroup} from './tab-group'; +import {MdTabHeader} from './tab-header'; +import {MdTabLabel} from './tab-label'; +import {MdTabLabelWrapper} from './tab-label-wrapper'; +import {MdTabLink, MdTabNav} from './tab-nav-bar/tab-nav-bar'; + + +@NgModule({ + imports: [ + CommonModule, + MdCommonModule, + PortalModule, + MdRippleModule, + ObserversModule, + ScrollDispatchModule, + ], + // Don't export all components because some are only to be used internally. + exports: [ + MdCommonModule, + MdTabGroup, + MdTabLabel, + MdTab, + MdTabNav, + MdTabLink, + ], + declarations: [ + MdTabGroup, + MdTabLabel, + MdTab, + MdInkBar, + MdTabLabelWrapper, + MdTabNav, + MdTabLink, + MdTabBody, + MdTabHeader + ], + providers: [VIEWPORT_RULER_PROVIDER], +}) +export class MdTabsModule {} diff --git a/src/lib/toolbar/mat-exports.ts b/src/lib/toolbar/mat-exports.ts new file mode 100644 index 00000000000..3e69041d0eb --- /dev/null +++ b/src/lib/toolbar/mat-exports.ts @@ -0,0 +1,16 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {MdToolbar, MdToolbarBase, MdToolbarRow} from './toolbar'; +import {MdToolbarModule} from './toolbar-module'; + + +export {MdToolbar as MatToolbar}; +export {MdToolbarBase as MatToolbarBase}; +export {MdToolbarModule as MatToolbarModule}; +export {MdToolbarRow as MatToolbarRow}; diff --git a/src/lib/toolbar/public_api.ts b/src/lib/toolbar/public_api.ts index 011492c6388..24b5e4c6246 100644 --- a/src/lib/toolbar/public_api.ts +++ b/src/lib/toolbar/public_api.ts @@ -6,17 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {NgModule} from '@angular/core'; -import {MdCommonModule} from '@angular/material/core'; -import {MdToolbar, MdToolbarRow} from './toolbar'; - - -@NgModule({ - imports: [MdCommonModule], - exports: [MdToolbar, MdToolbarRow, MdCommonModule], - declarations: [MdToolbar, MdToolbarRow], -}) -export class MdToolbarModule {} - - +export * from './toolbar-module'; export * from './toolbar'; +export * from './mat-exports'; diff --git a/src/lib/toolbar/toolbar-module.ts b/src/lib/toolbar/toolbar-module.ts new file mode 100644 index 00000000000..b4eee3b54a5 --- /dev/null +++ b/src/lib/toolbar/toolbar-module.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {NgModule} from '@angular/core'; +import {MdCommonModule} from '@angular/material/core'; +import {MdToolbar, MdToolbarRow} from './toolbar'; + + +@NgModule({ + imports: [MdCommonModule], + exports: [MdToolbar, MdToolbarRow, MdCommonModule], + declarations: [MdToolbar, MdToolbarRow], +}) +export class MdToolbarModule {} diff --git a/src/lib/tooltip/mat-exports.ts b/src/lib/tooltip/mat-exports.ts new file mode 100644 index 00000000000..080519017a0 --- /dev/null +++ b/src/lib/tooltip/mat-exports.ts @@ -0,0 +1,23 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { + MD_TOOLTIP_SCROLL_STRATEGY, + MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER, + MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY, + MdTooltip, +} from './tooltip'; +import {MdTooltipModule} from './tooltip-module'; + + +/* tslint:disable:max-line-length */ +export {MdTooltip as MatTooltip}; +export {MdTooltipModule as MatTooltipModule}; +export {MD_TOOLTIP_SCROLL_STRATEGY as MAT_TOOLTIP_SCROLL_STRATEGY}; +export {MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER as MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER}; +export {MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY as MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY}; diff --git a/src/lib/tooltip/public_api.ts b/src/lib/tooltip/public_api.ts index db8e168c070..2de9d7df0b3 100644 --- a/src/lib/tooltip/public_api.ts +++ b/src/lib/tooltip/public_api.ts @@ -6,29 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {A11yModule, ARIA_DESCRIBER_PROVIDER} from '@angular/cdk/a11y'; -import {OverlayModule} from '@angular/cdk/overlay'; -import {PlatformModule} from '@angular/cdk/platform'; -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {MdCommonModule} from '@angular/material/core'; -import {MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER, MdTooltip, TooltipComponent} from './tooltip'; - - -@NgModule({ - imports: [ - CommonModule, - OverlayModule, - MdCommonModule, - PlatformModule, - A11yModule, - ], - exports: [MdTooltip, TooltipComponent, MdCommonModule], - declarations: [MdTooltip, TooltipComponent], - entryComponents: [TooltipComponent], - providers: [MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER, ARIA_DESCRIBER_PROVIDER], -}) -export class MdTooltipModule {} - - +export * from './tooltip-module'; export * from './tooltip'; +export * from './mat-exports'; diff --git a/src/lib/tooltip/tooltip-module.ts b/src/lib/tooltip/tooltip-module.ts new file mode 100644 index 00000000000..3ea824d9d0f --- /dev/null +++ b/src/lib/tooltip/tooltip-module.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import {A11yModule, ARIA_DESCRIBER_PROVIDER} from '@angular/cdk/a11y'; +import {OverlayModule} from '@angular/cdk/overlay'; +import {PlatformModule} from '@angular/cdk/platform'; +import {CommonModule} from '@angular/common'; +import {NgModule} from '@angular/core'; +import {MdCommonModule} from '@angular/material/core'; +import {MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER, MdTooltip, TooltipComponent} from './tooltip'; + + +@NgModule({ + imports: [ + CommonModule, + OverlayModule, + MdCommonModule, + PlatformModule, + A11yModule, + ], + exports: [MdTooltip, TooltipComponent, MdCommonModule], + declarations: [MdTooltip, TooltipComponent], + entryComponents: [TooltipComponent], + providers: [MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER, ARIA_DESCRIBER_PROVIDER], +}) +export class MdTooltipModule {} diff --git a/tools/package-tools/secondary-entry-points.ts b/tools/package-tools/secondary-entry-points.ts index d94d1e251de..6b002f6269f 100644 --- a/tools/package-tools/secondary-entry-points.ts +++ b/tools/package-tools/secondary-entry-points.ts @@ -48,7 +48,7 @@ export function getSecondaryEntryPointsForPackage(pkg: BuildPackage) { .split('\n') .filter(n => n) .map(importStatement => importStatement.match(importRegex)![1]) - .filter(n => nodeLookup.has(n)) + .filter(n => nodeLookup.has(n) && n !== node.name) .map(depName => nodeLookup.get(depName)!) || []; });