diff --git a/src/demo-app/tsconfig.json b/src/demo-app/tsconfig.json index fd28b81478f9..3a220f91e278 100644 --- a/src/demo-app/tsconfig.json +++ b/src/demo-app/tsconfig.json @@ -12,7 +12,7 @@ "outDir": "../../dist/", "sourceMap": true, "target": "es5", - "stripInternal": true, + "stripInternal": false, "baseUrl": "", "typeRoots": [ "../../node_modules/@types" diff --git a/src/e2e-app/tsconfig.json b/src/e2e-app/tsconfig.json index e6c34fe73258..678e1786cccc 100644 --- a/src/e2e-app/tsconfig.json +++ b/src/e2e-app/tsconfig.json @@ -12,7 +12,7 @@ "outDir": "../../dist/", "sourceMap": true, "target": "es5", - "stripInternal": true, + "stripInternal": false, "baseUrl": "", "typeRoots": [ "../../node_modules/@types", diff --git a/src/lib/button-toggle/button-toggle.ts b/src/lib/button-toggle/button-toggle.ts index 73168904fb3f..a88b510f2e44 100644 --- a/src/lib/button-toggle/button-toggle.ts +++ b/src/lib/button-toggle/button-toggle.ts @@ -97,7 +97,6 @@ export class MdButtonToggleGroup implements AfterViewInit, ControlValueAccessor @ContentChildren(forwardRef(() => MdButtonToggle)) _buttonToggles: QueryList = null; - /** TODO: internal */ ngAfterViewInit() { this._isInitialized = true; } @@ -199,26 +198,17 @@ export class MdButtonToggleGroup implements AfterViewInit, ControlValueAccessor this._change.emit(event); } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ writeValue(value: any) { this.value = value; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnChange(fn: (value: any) => void) { this._controlValueAccessorChangeFn = fn; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnTouched(fn: any) { this.onTouched = fn; } @@ -423,9 +413,7 @@ export class MdButtonToggle implements OnInit { this._emitChangeEvent(); } - /** TODO: internal */ _onInputClick(event: Event) { - // We have to stop propagation for click events on the visual hidden input element. // By default, when a user clicks on a label element, a generated click event will be // dispatched on the associated input element. Since we are using a label element as our diff --git a/src/lib/checkbox/checkbox.ts b/src/lib/checkbox/checkbox.ts index 406e61d8c1af..4d440785709f 100644 --- a/src/lib/checkbox/checkbox.ts +++ b/src/lib/checkbox/checkbox.ts @@ -231,33 +231,22 @@ export class MdCheckbox implements ControlValueAccessor { return this.disableRipple || this.disabled; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ writeValue(value: any) { this.checked = !!value; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnChange(fn: (value: any) => void) { this._controlValueAccessorChangeFn = fn; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnTouched(fn: any) { this.onTouched = fn; } - /** - * Implemented as a part of ControlValueAccessor. - */ + /** Implemented as a part of ControlValueAccessor. */ setDisabledState(isDisabled: boolean) { this.disabled = isDisabled; } diff --git a/src/lib/core/animation/animation.ts b/src/lib/core/animation/animation.ts index f54cf037638c..5f98f2692a4b 100644 --- a/src/lib/core/animation/animation.ts +++ b/src/lib/core/animation/animation.ts @@ -1,13 +1,15 @@ +/** @docs-private */ export class AnimationCurves { static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)'; static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)'; static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)'; static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)'; -}; +} +/** @docs-private */ export class AnimationDurations { - static COMPLEX = '375ms'; - static ENTERING = '225ms'; - static EXITING = '195ms'; - }; + static COMPLEX = '375ms'; + static ENTERING = '225ms'; + static EXITING = '195ms'; +} diff --git a/src/lib/core/async/promise-completer.ts b/src/lib/core/async/promise-completer.ts index c205601e8433..093d8cfd0b49 100644 --- a/src/lib/core/async/promise-completer.ts +++ b/src/lib/core/async/promise-completer.ts @@ -1,4 +1,4 @@ - +/** @docs-private */ export class PromiseCompleter { promise: Promise; resolve: (value?: R | PromiseLike) => void; diff --git a/src/lib/core/errors/error.ts b/src/lib/core/errors/error.ts index 148a4745d38c..3d05518b8b95 100644 --- a/src/lib/core/errors/error.ts +++ b/src/lib/core/errors/error.ts @@ -2,6 +2,7 @@ /** * Wrapper around Error that sets the error message. + * @docs-private */ export class MdError extends Error { constructor(value: string) { diff --git a/src/lib/core/line/line.ts b/src/lib/core/line/line.ts index 234a0cbda217..3ac6e7fbcbd9 100644 --- a/src/lib/core/line/line.ts +++ b/src/lib/core/line/line.ts @@ -16,7 +16,10 @@ import {DefaultStyleCompatibilityModeModule} from '../compatibility/default-mode @Directive({ selector: '[md-line], [mat-line]' }) export class MdLine {} -/* Helper that takes a query list of lines and sets the correct class on the host */ +/** + * Helper that takes a query list of lines and sets the correct class on the host. + * @docs-private + */ export class MdLineSetter { constructor(private _lines: QueryList, private _renderer: Renderer, private _element: ElementRef) { diff --git a/src/lib/core/overlay/overlay-directives.ts b/src/lib/core/overlay/overlay-directives.ts index 10e18d06652c..10611389e3a6 100644 --- a/src/lib/core/overlay/overlay-directives.ts +++ b/src/lib/core/overlay/overlay-directives.ts @@ -160,7 +160,6 @@ export class ConnectedOverlayDirective implements OnDestroy { return this._dir ? this._dir.value : 'ltr'; } - /** TODO: internal */ ngOnDestroy() { this._destroyOverlay(); } diff --git a/src/lib/core/overlay/position/connected-position-strategy.ts b/src/lib/core/overlay/position/connected-position-strategy.ts index b88098021d17..4f8ff5715870 100644 --- a/src/lib/core/overlay/position/connected-position-strategy.ts +++ b/src/lib/core/overlay/position/connected-position-strategy.ts @@ -66,7 +66,7 @@ export class ConnectedPositionStrategy implements PositionStrategy { /** * Updates the position of the overlay element, using whichever preferred position relative * to the origin fits on-screen. - * TODO: internal + * @docs-private */ apply(element: HTMLElement): Promise { // We need the bounding rects for the origin and the overlay to determine how to position diff --git a/src/lib/core/overlay/position/global-position-strategy.ts b/src/lib/core/overlay/position/global-position-strategy.ts index 461b56941c20..23a9ec40a48a 100644 --- a/src/lib/core/overlay/position/global-position-strategy.ts +++ b/src/lib/core/overlay/position/global-position-strategy.ts @@ -101,7 +101,7 @@ export class GlobalPositionStrategy implements PositionStrategy { /** * Apply the position to the element. - * TODO: internal + * @docs-private */ apply(element: HTMLElement): Promise { if (!this._wrapper) { diff --git a/src/lib/core/overlay/position/viewport-ruler.ts b/src/lib/core/overlay/position/viewport-ruler.ts index c0c83fd3cd72..b4f3c82a5310 100644 --- a/src/lib/core/overlay/position/viewport-ruler.ts +++ b/src/lib/core/overlay/position/viewport-ruler.ts @@ -4,7 +4,7 @@ import {Injectable} from '@angular/core'; /** * Simple utility for getting the bounds of the browser viewport. - * TODO: internal + * @docs-private */ @Injectable() export class ViewportRuler { diff --git a/src/lib/core/platform/platform.ts b/src/lib/core/platform/platform.ts index 3b2e655c7d13..ade29058e1de 100644 --- a/src/lib/core/platform/platform.ts +++ b/src/lib/core/platform/platform.ts @@ -9,6 +9,7 @@ const hasV8BreakIterator = (window.Intl && (window.Intl as any).v8BreakIterator) /** * Service to detect the current platform by comparing the userAgent strings and * checking browser-specific global properties. + * @docs-private */ @Injectable() export class MdPlatform { diff --git a/src/lib/core/portal/portal-errors.ts b/src/lib/core/portal/portal-errors.ts index e5617fc4fc4e..f3f2e17aef6f 100644 --- a/src/lib/core/portal/portal-errors.ts +++ b/src/lib/core/portal/portal-errors.ts @@ -1,27 +1,39 @@ import {MdError} from '../errors/error'; -/** Exception thrown when attempting to attach a null portal to a host. */ +/** + * Exception thrown when attempting to attach a null portal to a host. + * @docs-private + */ export class MdNullPortalError extends MdError { constructor() { super('Must provide a portal to attach'); } } -/** Exception thrown when attempting to attach a portal to a host that is already attached. */ +/** + * Exception thrown when attempting to attach a portal to a host that is already attached. + * @docs-private + */ export class MdPortalAlreadyAttachedError extends MdError { constructor() { super('Host already has a portal attached'); } } -/** Exception thrown when attempting to attach a portal to an already-disposed host. */ +/** + * Exception thrown when attempting to attach a portal to an already-disposed host. + * @docs-private + */ export class MdPortalHostAlreadyDisposedError extends MdError { constructor() { super('This PortalHost has already been disposed'); } } -/** Exception thrown when attempting to attach an unknown portal type. */ +/** + * Exception thrown when attempting to attach an unknown portal type. + * @docs-private + */ export class MdUnknownPortalTypeError extends MdError { constructor() { super( @@ -30,14 +42,20 @@ export class MdUnknownPortalTypeError extends MdError { } } -/** Exception thrown when attempting to attach a portal to a null host. */ +/** + * Exception thrown when attempting to attach a portal to a null host. + * @docs-private + */ export class MdNullPortalHostError extends MdError { constructor() { super('Attempting to attach a portal to a null PortalHost'); } } -/** Exception thrown when attempting to detach a portal that is not attached. */ +/** + * Exception thrown when attempting to detach a portal that is not attached. + * @docs-private + */ export class MdNoPortalAttachedError extends MdError { constructor() { super('Attempting to detach a portal that is not attached to a host'); diff --git a/src/lib/core/projection/projection.ts b/src/lib/core/projection/projection.ts index e6616d88be6c..4d05b22d6836 100644 --- a/src/lib/core/projection/projection.ts +++ b/src/lib/core/projection/projection.ts @@ -7,7 +7,7 @@ function _replaceWith(toReplaceEl: HTMLElement, otherEl: HTMLElement) { toReplaceEl.parentElement.replaceChild(otherEl, toReplaceEl); } - +/** @docs-private */ @Directive({ selector: 'dom-projection-host' }) @@ -16,6 +16,7 @@ export class DomProjectionHost { } +/** @docs-private */ @Injectable() export class DomProjection { /** @@ -73,6 +74,7 @@ export class DomProjection { } +/** @docs-private */ @NgModule({ exports: [DomProjectionHost], declarations: [DomProjectionHost], diff --git a/src/lib/core/ripple/ripple-renderer.ts b/src/lib/core/ripple/ripple-renderer.ts index 9ebd7f582907..f74a89a3868d 100644 --- a/src/lib/core/ripple/ripple-renderer.ts +++ b/src/lib/core/ripple/ripple-renderer.ts @@ -3,7 +3,7 @@ import { NgZone, } from '@angular/core'; -/** TODO: internal */ +/** @docs-private */ export enum ForegroundRippleState { NEW, EXPANDING, @@ -12,7 +12,7 @@ export enum ForegroundRippleState { /** * Wrapper for a foreground ripple DOM element and its animation state. - * TODO: internal + * @docs-private */ export class ForegroundRipple { state = ForegroundRippleState.NEW; @@ -37,7 +37,7 @@ const distanceToFurthestCorner = (x: number, y: number, rect: ClientRect) => { * The constructor takes a reference to the ripple directive's host element and a map of DOM * event handlers to be installed on the element that triggers ripple animations. * This will eventually become a custom renderer once Angular support exists. - * TODO: internal + * @docs-private */ export class RippleRenderer { private _backgroundDiv: HTMLElement; diff --git a/src/lib/core/ripple/ripple.ts b/src/lib/core/ripple/ripple.ts index 0e340c029028..d542f3522c85 100644 --- a/src/lib/core/ripple/ripple.ts +++ b/src/lib/core/ripple/ripple.ts @@ -75,7 +75,6 @@ export class MdRipple implements OnInit, OnDestroy, OnChanges { this._ruler = _ruler; } - /** TODO: internal */ ngOnInit() { // If no trigger element was explicity set, use the host element if (!this.trigger) { @@ -86,13 +85,11 @@ export class MdRipple implements OnInit, OnDestroy, OnChanges { } } - /** TODO: internal */ ngOnDestroy() { // Remove event listeners on the trigger element. this._rippleRenderer.clearTriggerElement(); } - /** TODO: internal */ ngOnChanges(changes: { [propertyName: string]: SimpleChange }) { // If the trigger element changed (or is being initially set), add event listeners to it. const changedInputs = Object.keys(changes); diff --git a/src/lib/dialog/dialog-container.ts b/src/lib/dialog/dialog-container.ts index aaaffb98436f..39a2db89cc50 100644 --- a/src/lib/dialog/dialog-container.ts +++ b/src/lib/dialog/dialog-container.ts @@ -16,6 +16,7 @@ import 'rxjs/add/operator/first'; /** * Internal component that wraps user-provided dialog content. + * @docs-private */ @Component({ moduleId: module.id, diff --git a/src/lib/grid-list/grid-list-errors.ts b/src/lib/grid-list/grid-list-errors.ts index 5a48520c5479..9f8b955da30b 100644 --- a/src/lib/grid-list/grid-list-errors.ts +++ b/src/lib/grid-list/grid-list-errors.ts @@ -2,6 +2,7 @@ import {MdError} from '../core'; /** * Exception thrown when cols property is missing from grid-list + * @docs-private */ export class MdGridListColsError extends MdError { constructor() { @@ -11,6 +12,7 @@ export class MdGridListColsError extends MdError { /** * Exception thrown when a tile's colspan is longer than the number of cols in list + * @docs-private */ export class MdGridTileTooWideError extends MdError { constructor(cols: number, listLength: number) { @@ -20,6 +22,7 @@ export class MdGridTileTooWideError extends MdError { /** * Exception thrown when an invalid ratio is passed in as a rowHeight + * @docs-private */ export class MdGridListBadRatioError extends MdError { constructor(value: string) { diff --git a/src/lib/grid-list/grid-list-measure.ts b/src/lib/grid-list/grid-list-measure.ts index 4244cc8c4556..e6662469ed98 100644 --- a/src/lib/grid-list/grid-list-measure.ts +++ b/src/lib/grid-list/grid-list-measure.ts @@ -1,7 +1,7 @@ /** * Converts values into strings. Falsy values become empty strings. - * TODO: internal + * @docs-private */ export function coerceToString(value: string | number): string { return `${value || ''}`; @@ -9,7 +9,7 @@ export function coerceToString(value: string | number): string { /** * Converts a value that might be a string into a number. - * TODO: internal + * @docs-private */ export function coerceToNumber(value: string | number): number { return typeof value === 'string' ? parseInt(value, 10) : value; diff --git a/src/lib/grid-list/grid-list.ts b/src/lib/grid-list/grid-list.ts index 94d3ae9ce365..33b8ee49de21 100644 --- a/src/lib/grid-list/grid-list.ts +++ b/src/lib/grid-list/grid-list.ts @@ -87,7 +87,6 @@ export class MdGridList implements OnInit, AfterContentChecked { this._setTileStyler(); } - /** TODO: internal */ ngOnInit() { this._checkCols(); this._checkRowHeight(); @@ -96,7 +95,6 @@ export class MdGridList implements OnInit, AfterContentChecked { /** * The layout calculation is fairly cheap if nothing changes, so there's little cost * to run it frequently. - * TODO: internal */ ngAfterContentChecked() { this._layoutTiles(); diff --git a/src/lib/grid-list/tile-coordinator.ts b/src/lib/grid-list/tile-coordinator.ts index d872995b26dc..9e3850c6dc05 100644 --- a/src/lib/grid-list/tile-coordinator.ts +++ b/src/lib/grid-list/tile-coordinator.ts @@ -15,6 +15,8 @@ import {MdGridTileTooWideError} from './grid-list-errors'; * column are already occupied; zero indicates an empty cell. Moving "down" to the next row * decrements each value in the tracking array (indicating that the column is one cell closer to * being free). + * + * @docs-private */ export class TileCoordinator { /** Tracking array (see class description). */ @@ -134,7 +136,10 @@ export class TileCoordinator { } } -/** Simple data structure for tile position (row, col). */ +/** + * Simple data structure for tile position (row, col). + * @docs-private + */ export class TilePosition { constructor(public row: number, public col: number) {} } diff --git a/src/lib/grid-list/tile-styler.ts b/src/lib/grid-list/tile-styler.ts index fea5c1494dd8..57f59a9f3358 100644 --- a/src/lib/grid-list/tile-styler.ts +++ b/src/lib/grid-list/tile-styler.ts @@ -5,7 +5,7 @@ import {MdGridListBadRatioError} from './grid-list-errors'; /** * Sets the style properties for an individual tile, given the position calculated by the * Tile Coordinator. - * TODO: internal + * @docs-private */ export class TileStyler { _gutterSize: string; @@ -120,7 +120,7 @@ export class TileStyler { /** * This type of styler is instantiated when the user passes in a fixed row height. * Example - * TODO: internal + * @docs-private */ export class FixedTileStyler extends TileStyler { @@ -148,7 +148,7 @@ export class FixedTileStyler extends TileStyler { /** * This type of styler is instantiated when the user passes in a width:height ratio * for the row height. Example - * TODO: internal + * @docs-private */ export class RatioTileStyler extends TileStyler { @@ -190,9 +190,13 @@ export class RatioTileStyler extends TileStyler { } } -/* This type of styler is instantiated when the user selects a "fit" row height mode. - * In other words, the row height will reflect the total height of the container divided - * by the number of rows. Example */ +/** + * This type of styler is instantiated when the user selects a "fit" row height mode. + * In other words, the row height will reflect the total height of the container divided + * by the number of rows. Example + * + * @docs-private + */ export class FitTileStyler extends TileStyler { setRowStyles(tile: MdGridTile, rowIndex: number, percentWidth: number, diff --git a/src/lib/icon/icon-registry.ts b/src/lib/icon/icon-registry.ts index 44e03c31cb2b..dcabdabcd3d7 100644 --- a/src/lib/icon/icon-registry.ts +++ b/src/lib/icon/icon-registry.ts @@ -12,7 +12,10 @@ import 'rxjs/add/operator/finally'; import 'rxjs/add/operator/catch'; -/** Exception thrown when attempting to load an icon with a name that cannot be found. */ +/** + * Exception thrown when attempting to load an icon with a name that cannot be found. + * @docs-private + */ export class MdIconNameNotFoundError extends MdError { constructor(iconName: string) { super(`Unable to find icon with the name "${iconName}"`); @@ -22,6 +25,7 @@ export class MdIconNameNotFoundError extends MdError { /** * Exception thrown when attempting to load SVG content that does not contain the expected * tag. + * @docs-private */ export class MdIconSvgTagNotFoundError extends MdError { constructor() { @@ -29,7 +33,10 @@ export class MdIconSvgTagNotFoundError extends MdError { } } -/** Configuration for an icon, including the URL and possibly the cached SVG element. */ +/** + * Configuration for an icon, including the URL and possibly the cached SVG element. + * @docs-private + */ class SvgIconConfig { svgElement: SVGElement = null; constructor(public url: string) { } diff --git a/src/lib/icon/icon.ts b/src/lib/icon/icon.ts index 25a486e8bbe8..7a933a1c8284 100644 --- a/src/lib/icon/icon.ts +++ b/src/lib/icon/icon.ts @@ -137,7 +137,6 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked { } } - /** TODO: internal */ ngOnChanges(changes: { [propertyName: string]: SimpleChange }) { const changedInputs = Object.keys(changes); // Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations. @@ -159,7 +158,6 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked { this._updateAriaLabel(); } - /** TODO: internal */ ngOnInit() { // Update font classes because ngOnChanges won't be called if none of the inputs are present, // e.g. arrow. In this case we need to add a CSS class for the default font. @@ -168,7 +166,6 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked { } } - /** TODO: internal */ ngAfterViewChecked() { // Update aria label here because it may depend on the projected text content. // (e.g. home should use 'home'). diff --git a/src/lib/input/input.ts b/src/lib/input/input.ts index c6c5735d499a..c62efae0393b 100644 --- a/src/lib/input/input.ts +++ b/src/lib/input/input.ts @@ -247,38 +247,26 @@ export class MdInput implements ControlValueAccessor, AfterContentInit, OnChange return !!this.placeholder || this._placeholderChild != null; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ writeValue(value: any) { this._value = value; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnChange(fn: any) { this._onChangeCallback = fn; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnTouched(fn: any) { this._onTouchedCallback = fn; } - /** - * Implemented as a part of ControlValueAccessor. - */ + /** Implemented as a part of ControlValueAccessor. */ setDisabledState(isDisabled: boolean) { this.disabled = isDisabled; } - /** TODO: internal */ ngAfterContentInit() { this._validateConstraints(); @@ -288,7 +276,6 @@ export class MdInput implements ControlValueAccessor, AfterContentInit, OnChange }); } - /** TODO: internal */ ngOnChanges(changes: {[key: string]: SimpleChange}) { this._validateConstraints(); } diff --git a/src/lib/list/list.ts b/src/lib/list/list.ts index 997f3e531b94..38abb30f6ec1 100644 --- a/src/lib/list/list.ts +++ b/src/lib/list/list.ts @@ -57,7 +57,6 @@ export class MdListItem implements AfterContentInit { constructor(private _renderer: Renderer, private _element: ElementRef) {} - /** TODO: internal */ ngAfterContentInit() { this._lineSetter = new MdLineSetter(this._lines, this._renderer, this._element); } diff --git a/src/lib/menu/menu-directive.ts b/src/lib/menu/menu-directive.ts index a1c82da373c4..7e32307557a4 100644 --- a/src/lib/menu/menu-directive.ts +++ b/src/lib/menu/menu-directive.ts @@ -57,7 +57,6 @@ export class MdMenu implements AfterContentInit, MdMenuPanel, OnDestroy { this.setPositionClasses(this.positionX, this.positionY); } - // TODO: internal ngAfterContentInit() { this._keyManager = new ListKeyManager(this.items).withFocusWrap(); this._tabSubscription = this._keyManager.tabOut.subscribe(() => { @@ -65,7 +64,6 @@ export class MdMenu implements AfterContentInit, MdMenuPanel, OnDestroy { }); } - // TODO: internal ngOnDestroy() { this._tabSubscription.unsubscribe(); } @@ -91,7 +89,6 @@ export class MdMenu implements AfterContentInit, MdMenuPanel, OnDestroy { /** * Focus the first item in the menu. This method is used by the menu trigger * to focus the first item when the menu is opened by the ENTER key. - * TODO: internal */ focusFirstItem() { this._keyManager.focusFirstItem(); diff --git a/src/lib/menu/menu-errors.ts b/src/lib/menu/menu-errors.ts index 5d3bb1d56c0b..ae634699a661 100644 --- a/src/lib/menu/menu-errors.ts +++ b/src/lib/menu/menu-errors.ts @@ -2,6 +2,7 @@ import {MdError} from '../core'; /** * Exception thrown when menu trigger doesn't have a valid md-menu instance + * @docs-private */ export class MdMenuMissingError extends MdError { constructor() { @@ -17,6 +18,7 @@ export class MdMenuMissingError extends MdError { /** * Exception thrown when menu's x-position value isn't valid. * In other words, it doesn't match 'before' or 'after'. + * @docs-private */ export class MdMenuInvalidPositionX extends MdError { constructor() { @@ -29,6 +31,7 @@ export class MdMenuInvalidPositionX extends MdError { /** * Exception thrown when menu's y-position value isn't valid. * In other words, it doesn't match 'above' or 'below'. + * @docs-private */ export class MdMenuInvalidPositionY extends MdError { constructor() { diff --git a/src/lib/progress-circle/progress-circle.ts b/src/lib/progress-circle/progress-circle.ts index 2152cc23e371..2f63d35586b3 100644 --- a/src/lib/progress-circle/progress-circle.ts +++ b/src/lib/progress-circle/progress-circle.ts @@ -72,11 +72,11 @@ export class MdProgressCircle implements OnDestroy { return this.mode == 'determinate' ? 100 : null; } - /** TODO: internal */ + /** @docs-private */ get interdeterminateInterval() { return this._interdeterminateInterval; } - /** TODO: internal */ + /** @docs-private */ set interdeterminateInterval(interval: number) { clearInterval(this._interdeterminateInterval); this._interdeterminateInterval = interval; diff --git a/src/lib/radio/radio.ts b/src/lib/radio/radio.ts index 0b3d901dca5f..5b16ec5cf987 100644 --- a/src/lib/radio/radio.ts +++ b/src/lib/radio/radio.ts @@ -155,7 +155,6 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor { /** * Initialize properties once content children are available. * This allows us to propagate relevant attributes to associated buttons. - * TODO: internal */ ngAfterContentInit() { // Mark this component as initialized in AfterContentInit because the initial value can @@ -208,33 +207,22 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor { } } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ writeValue(value: any) { this.value = value; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnChange(fn: (value: any) => void) { this._controlValueAccessorChangeFn = fn; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnTouched(fn: any) { this.onTouched = fn; } - /** - * Implemented as a part of ControlValueAccessor. - */ + /** Implemented as a part of ControlValueAccessor. */ setDisabledState(isDisabled: boolean) { this.disabled = isDisabled; } @@ -383,7 +371,6 @@ export class MdRadioButton implements OnInit { this._disabled = (value != null && value !== false) ? true : null; } - /** TODO: internal */ ngOnInit() { if (this.radioGroup) { // If the radio is inside a radio group, determine if it should be checked @@ -419,7 +406,6 @@ export class MdRadioButton implements OnInit { this._onInputFocus(); } - /** TODO: internal */ _onInputBlur() { this._isFocused = false; @@ -428,7 +414,6 @@ export class MdRadioButton implements OnInit { } } - /** TODO: internal */ _onInputClick(event: Event) { // We have to stop propagation for click events on the visual hidden input element. // By default, when a user clicks on a label element, a generated click event will be @@ -443,7 +428,6 @@ export class MdRadioButton implements OnInit { /** * Triggered when the radio button received a click or the input recognized any change. * Clicking on a label element, will trigger a change event on the associated input. - * TODO: internal */ _onInputChange(event: Event) { // We always have to stop propagation on the change event. diff --git a/src/lib/slide-toggle/slide-toggle.ts b/src/lib/slide-toggle/slide-toggle.ts index b827e2bd9c82..268330adc730 100644 --- a/src/lib/slide-toggle/slide-toggle.ts +++ b/src/lib/slide-toggle/slide-toggle.ts @@ -96,7 +96,6 @@ export class MdSlideToggle implements AfterContentInit, ControlValueAccessor { constructor(private _elementRef: ElementRef, private _renderer: Renderer) {} - /** TODO: internal */ ngAfterContentInit() { this._slideRenderer = new SlideToggleRenderer(this._elementRef); } @@ -158,33 +157,22 @@ export class MdSlideToggle implements AfterContentInit, ControlValueAccessor { this.onTouched(); } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ writeValue(value: any): void { this.checked = value; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnChange(fn: any): void { this.onChange = fn; } - /** - * Implemented as part of ControlValueAccessor. - * TODO: internal - */ + /** Implemented as part of ControlValueAccessor. */ registerOnTouched(fn: any): void { this.onTouched = fn; } - /** - * Implemented as a part of ControlValueAccessor. - */ + /** Implemented as a part of ControlValueAccessor. */ setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; } @@ -240,21 +228,18 @@ export class MdSlideToggle implements AfterContentInit, ControlValueAccessor { } - /** TODO: internal */ _onDragStart() { if (!this.disabled) { this._slideRenderer.startThumbDrag(this.checked); } } - /** TODO: internal */ _onDrag(event: HammerInput) { if (this._slideRenderer.isDragging()) { this._slideRenderer.updateThumbPosition(event.deltaX); } } - /** TODO: internal */ _onDragEnd() { if (!this._slideRenderer.isDragging()) { return; diff --git a/src/lib/slider/slider.ts b/src/lib/slider/slider.ts index ef72dbd47c82..5be17ccd817a 100644 --- a/src/lib/slider/slider.ts +++ b/src/lib/slider/slider.ts @@ -399,9 +399,7 @@ export class MdSlider implements ControlValueAccessor { this.value = this._clamp(this.value + this.step * numSteps, this.min, this.max); } - /** - * Calculate the new value from the new physical location. The value will always be snapped. - */ + /** Calculate the new value from the new physical location. The value will always be snapped. */ private _updateValueFromPosition(pos: {x: number, y: number}) { if (!this._sliderDimensions) { return; @@ -437,9 +435,7 @@ export class MdSlider implements ControlValueAccessor { } } - /** - * Updates the amount of space between ticks as a percentage of the width of the slider. - */ + /** Updates the amount of space between ticks as a percentage of the width of the slider. */ private _updateTickIntervalPercent() { if (!this.tickInterval) { return; @@ -456,51 +452,37 @@ export class MdSlider implements ControlValueAccessor { } } - /** - * Calculates the percentage of the slider that a value is. - */ + /** Calculates the percentage of the slider that a value is. */ private _calculatePercentage(value: number) { return (value - this.min) / (this.max - this.min); } - /** - * Calculates the value a percentage of the slider corresponds to. - */ + /** Calculates the value a percentage of the slider corresponds to. */ private _calculateValue(percentage: number) { return this.min + percentage * (this.max - this.min); } - /** - * Return a number between two numbers. - */ + /** Return a number between two numbers. */ private _clamp(value: number, min = 0, max = 1) { return Math.max(min, Math.min(value, max)); } - /** - * Implemented as part of ControlValueAccessor. - */ + /** Implemented as part of ControlValueAccessor. */ writeValue(value: any) { this.value = value; } - /** - * Implemented as part of ControlValueAccessor. - */ + /** Implemented as part of ControlValueAccessor. */ registerOnChange(fn: (value: any) => void) { this._controlValueAccessorChangeFn = fn; } - /** - * Implemented as part of ControlValueAccessor. - */ + /** Implemented as part of ControlValueAccessor. */ registerOnTouched(fn: any) { this.onTouched = fn; } - /** - * Implemented as part of ControlValueAccessor. - */ + /** Implemented as part of ControlValueAccessor. */ setDisabledState(isDisabled: boolean) { this.disabled = isDisabled; } @@ -508,6 +490,7 @@ export class MdSlider implements ControlValueAccessor { /** * Renderer class in order to keep all dom manipulation in one place and outside of the main class. + * @docs-private */ export class SliderRenderer { private _sliderElement: HTMLElement; diff --git a/src/lib/tabs/tab-group.ts b/src/lib/tabs/tab-group.ts index 9bcb12f78a2d..0f46849eeb90 100644 --- a/src/lib/tabs/tab-group.ts +++ b/src/lib/tabs/tab-group.ts @@ -134,7 +134,6 @@ export class MdTabGroup { /** * Waits one frame for the view to update, then updates the ink bar * Note: This must be run outside of the zone or it will create an infinite change detection loop - * TODO: internal */ ngAfterViewChecked(): void { this._isInitialized = true; diff --git a/src/lib/tsconfig-srcs.json b/src/lib/tsconfig-srcs.json index 126d417299d2..948f8c15377e 100644 --- a/src/lib/tsconfig-srcs.json +++ b/src/lib/tsconfig-srcs.json @@ -14,7 +14,7 @@ "sourceMap": true, "target": "es5", "inlineSources": true, - "stripInternal": true, + "stripInternal": false, "typeRoots": [ "../../node_modules/@types" ], diff --git a/src/lib/tsconfig.json b/src/lib/tsconfig.json index 0d25173aaf70..11887156a4cc 100644 --- a/src/lib/tsconfig.json +++ b/src/lib/tsconfig.json @@ -14,7 +14,7 @@ "sourceMap": true, "target": "es5", "inlineSources": true, - "stripInternal": true, + "stripInternal": false, "baseUrl": "", "paths": { }, diff --git a/tools/gulp/tsconfig.json b/tools/gulp/tsconfig.json index da9bae7df2c4..5a09195713a2 100644 --- a/tools/gulp/tsconfig.json +++ b/tools/gulp/tsconfig.json @@ -13,7 +13,7 @@ "sourceMap": true, "target": "es5", "inlineSources": true, - "stripInternal": true, + "stripInternal": false, "baseUrl": "", "typeRoots": [ "../../node_modules/@types"