Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@angular/core

Package Overview
Dependencies
3
Maintainers
1
Versions
810
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-rc.5 to 2.0.0-rc.6

bundles/core-testing.umd.js

26

index.d.ts

@@ -11,26 +11,4 @@ /**

* @description
* Entry point from which you should import all public core APIs.
* Entry point for all public APIs of the core package.
*/
export * from './src/metadata';
export * from './src/util';
export * from './src/di';
export { createPlatform, assertPlatform, disposePlatform, getPlatform, coreBootstrap, coreLoadAndBootstrap, PlatformRef, ApplicationRef, enableProdMode, lockRunMode, isDevMode, createPlatformFactory } from './src/application_ref';
export { APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, APP_BOOTSTRAP_LISTENER } from './src/application_tokens';
export { APP_INITIALIZER, ApplicationInitStatus } from './src/application_init';
export * from './src/zone';
export * from './src/render';
export * from './src/linker';
export { DebugElement, DebugNode, asNativeElements, getDebugNode } from './src/debug/debug_node';
export * from './src/testability/testability';
export * from './src/change_detection';
export * from './src/platform_directives_and_pipes';
export * from './src/platform_core_providers';
export { APPLICATION_COMMON_PROVIDERS, ApplicationModule } from './src/application_module';
export { wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn } from './src/profile/profile';
export { Type } from './src/facade/lang';
export { EventEmitter } from './src/facade/async';
export { ExceptionHandler, WrappedException, BaseException } from './src/facade/exceptions';
export * from './private_export';
export * from './src/animation/metadata';
export { AnimationPlayer } from './src/animation/animation_player';
export { SanitizationService, SecurityContext } from './src/security';
export * from './src/core';

@@ -8,70 +8,8 @@ /**

*/
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
/**
* @module
* @description
* Entry point from which you should import all public core APIs.
* Entry point for all public APIs of the core package.
*/
__export(require('./src/metadata'));
__export(require('./src/util'));
__export(require('./src/di'));
var application_ref_1 = require('./src/application_ref');
exports.createPlatform = application_ref_1.createPlatform;
exports.assertPlatform = application_ref_1.assertPlatform;
exports.disposePlatform = application_ref_1.disposePlatform;
exports.getPlatform = application_ref_1.getPlatform;
exports.coreBootstrap = application_ref_1.coreBootstrap;
exports.coreLoadAndBootstrap = application_ref_1.coreLoadAndBootstrap;
exports.PlatformRef = application_ref_1.PlatformRef;
exports.ApplicationRef = application_ref_1.ApplicationRef;
exports.enableProdMode = application_ref_1.enableProdMode;
exports.lockRunMode = application_ref_1.lockRunMode;
exports.isDevMode = application_ref_1.isDevMode;
exports.createPlatformFactory = application_ref_1.createPlatformFactory;
var application_tokens_1 = require('./src/application_tokens');
exports.APP_ID = application_tokens_1.APP_ID;
exports.PACKAGE_ROOT_URL = application_tokens_1.PACKAGE_ROOT_URL;
exports.PLATFORM_INITIALIZER = application_tokens_1.PLATFORM_INITIALIZER;
exports.APP_BOOTSTRAP_LISTENER = application_tokens_1.APP_BOOTSTRAP_LISTENER;
var application_init_1 = require('./src/application_init');
exports.APP_INITIALIZER = application_init_1.APP_INITIALIZER;
exports.ApplicationInitStatus = application_init_1.ApplicationInitStatus;
__export(require('./src/zone'));
__export(require('./src/render'));
__export(require('./src/linker'));
var debug_node_1 = require('./src/debug/debug_node');
exports.DebugElement = debug_node_1.DebugElement;
exports.DebugNode = debug_node_1.DebugNode;
exports.asNativeElements = debug_node_1.asNativeElements;
exports.getDebugNode = debug_node_1.getDebugNode;
__export(require('./src/testability/testability'));
__export(require('./src/change_detection'));
__export(require('./src/platform_directives_and_pipes'));
__export(require('./src/platform_core_providers'));
var application_module_1 = require('./src/application_module');
exports.APPLICATION_COMMON_PROVIDERS = application_module_1.APPLICATION_COMMON_PROVIDERS;
exports.ApplicationModule = application_module_1.ApplicationModule;
var profile_1 = require('./src/profile/profile');
exports.wtfCreateScope = profile_1.wtfCreateScope;
exports.wtfLeave = profile_1.wtfLeave;
exports.wtfStartTimeRange = profile_1.wtfStartTimeRange;
exports.wtfEndTimeRange = profile_1.wtfEndTimeRange;
var lang_1 = require('./src/facade/lang');
exports.Type = lang_1.Type;
var async_1 = require('./src/facade/async');
exports.EventEmitter = async_1.EventEmitter;
var exceptions_1 = require('./src/facade/exceptions');
exports.ExceptionHandler = exceptions_1.ExceptionHandler;
exports.WrappedException = exceptions_1.WrappedException;
exports.BaseException = exceptions_1.BaseException;
__export(require('./private_export'));
__export(require('./src/animation/metadata'));
var animation_player_1 = require('./src/animation/animation_player');
exports.AnimationPlayer = animation_player_1.AnimationPlayer;
var security_1 = require('./src/security');
exports.SanitizationService = security_1.SanitizationService;
exports.SecurityContext = security_1.SecurityContext;
export * from './src/core';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/metadata"},{"from":"./src/util"},{"from":"./src/di"},{"from":"./src/application_ref","export":["createPlatform","assertPlatform","disposePlatform","getPlatform","coreBootstrap","coreLoadAndBootstrap","PlatformRef","ApplicationRef","enableProdMode","lockRunMode","isDevMode","createPlatformFactory"]},{"from":"./src/application_tokens","export":["APP_ID","PACKAGE_ROOT_URL","PLATFORM_INITIALIZER","APP_BOOTSTRAP_LISTENER"]},{"from":"./src/application_init","export":["APP_INITIALIZER","ApplicationInitStatus"]},{"from":"./src/zone"},{"from":"./src/render"},{"from":"./src/linker"},{"from":"./src/debug/debug_node","export":["DebugElement","DebugNode","asNativeElements","getDebugNode"]},{"from":"./src/testability/testability"},{"from":"./src/change_detection"},{"from":"./src/platform_directives_and_pipes"},{"from":"./src/platform_core_providers"},{"from":"./src/application_module","export":["APPLICATION_COMMON_PROVIDERS","ApplicationModule"]},{"from":"./src/profile/profile","export":["wtfCreateScope","wtfLeave","wtfStartTimeRange","wtfEndTimeRange","WtfScopeFn"]},{"from":"./src/facade/lang","export":["Type"]},{"from":"./src/facade/async","export":["EventEmitter"]},{"from":"./src/facade/exceptions","export":["ExceptionHandler","WrappedException","BaseException"]},{"from":"./private_export"},{"from":"./src/animation/metadata"},{"from":"./src/animation/animation_player","export":["AnimationPlayer"]},{"from":"./src/security","export":["SanitizationService","SecurityContext"]}]}
{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/core"}]}
{
"name": "@angular/core",
"version": "2.0.0-rc.5",
"description": "",
"main": "index.js",
"jsnext:main": "esm/index.js",
"version": "2.0.0-rc.6",
"description": "Angular 2 core",
"main": "bundles/core.umd.js",
"module": "index.js",
"typings": "index.d.ts",

@@ -11,4 +11,4 @@ "author": "angular",

"peerDependencies": {
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.6"
"rxjs": "5.0.0-beta.11",
"zone.js": "^0.6.17"
},

@@ -15,0 +15,0 @@ "repository": {

@@ -8,7 +8,6 @@ /**

*/
"use strict";
exports.FILL_STYLE_FLAG = 'true'; // TODO (matsko): change to boolean
exports.ANY_STATE = '*';
exports.DEFAULT_STATE = '*';
exports.EMPTY_STATE = 'void';
export var FILL_STYLE_FLAG = 'true'; // TODO (matsko): change to boolean
export var ANY_STATE = '*';
export var DEFAULT_STATE = '*';
export var EMPTY_STATE = 'void';
//# sourceMappingURL=animation_constants.js.map
import { AnimationPlayer } from './animation_player';
export declare class AnimationGroupPlayer implements AnimationPlayer {
private _players;
private _subscriptions;
private _onDoneFns;
private _onStartFns;
private _finished;

@@ -11,3 +12,4 @@ private _started;

init(): void;
onDone(fn: Function): void;
onStart(fn: () => void): void;
onDone(fn: () => void): void;
hasStarted(): boolean;

@@ -14,0 +16,0 @@ play(): void;

@@ -8,10 +8,10 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
var math_1 = require('../facade/math');
var AnimationGroupPlayer = (function () {
import { isPresent, scheduleMicroTask } from '../facade/lang';
import { Math } from '../facade/math';
export var AnimationGroupPlayer = (function () {
function AnimationGroupPlayer(_players) {
var _this = this;
this._players = _players;
this._subscriptions = [];
this._onDoneFns = [];
this._onStartFns = [];
this._finished = false;

@@ -23,3 +23,3 @@ this._started = false;

if (total == 0) {
lang_1.scheduleMicroTask(function () { return _this._onFinish(); });
scheduleMicroTask(function () { return _this._onFinish(); });
}

@@ -40,17 +40,22 @@ else {

this._finished = true;
if (!lang_1.isPresent(this.parentPlayer)) {
if (!isPresent(this.parentPlayer)) {
this.destroy();
}
this._subscriptions.forEach(function (subscription) { return subscription(); });
this._subscriptions = [];
this._onDoneFns.forEach(function (fn) { return fn(); });
this._onDoneFns = [];
}
};
AnimationGroupPlayer.prototype.init = function () { this._players.forEach(function (player) { return player.init(); }); };
AnimationGroupPlayer.prototype.onDone = function (fn) { this._subscriptions.push(fn); };
AnimationGroupPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
AnimationGroupPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
AnimationGroupPlayer.prototype.hasStarted = function () { return this._started; };
AnimationGroupPlayer.prototype.play = function () {
if (!lang_1.isPresent(this.parentPlayer)) {
if (!isPresent(this.parentPlayer)) {
this.init();
}
this._started = true;
if (!this.hasStarted()) {
this._onStartFns.forEach(function (fn) { return fn(); });
this._onStartFns = [];
this._started = true;
}
this._players.forEach(function (player) { return player.play(); });

@@ -76,3 +81,3 @@ };

var p = player.getPosition();
min = math_1.Math.min(p, min);
min = Math.min(p, min);
});

@@ -83,3 +88,2 @@ return min;

}());
exports.AnimationGroupPlayer = AnimationGroupPlayer;
//# sourceMappingURL=animation_group_player.js.map

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var AnimationKeyframe = (function () {
export var AnimationKeyframe = (function () {
function AnimationKeyframe(offset, styles) {

@@ -17,3 +16,2 @@ this.offset = offset;

}());
exports.AnimationKeyframe = AnimationKeyframe;
//# sourceMappingURL=animation_keyframe.js.map

@@ -5,3 +5,4 @@ /**

export declare abstract class AnimationPlayer {
abstract onDone(fn: Function): void;
abstract onDone(fn: () => void): void;
abstract onStart(fn: () => void): void;
abstract init(): void;

@@ -20,7 +21,9 @@ abstract hasStarted(): boolean;

export declare class NoOpAnimationPlayer implements AnimationPlayer {
private _subscriptions;
private _onDoneFns;
private _onStartFns;
private _started;
parentPlayer: AnimationPlayer;
constructor();
onDone(fn: Function): void;
onStart(fn: () => void): void;
onDone(fn: () => void): void;
hasStarted(): boolean;

@@ -27,0 +30,0 @@ init(): void;

@@ -8,16 +8,12 @@ /**

*/
"use strict";
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
import { scheduleMicroTask } from '../facade/lang';
/**
* @experimental Animation support is experimental.
*/
var AnimationPlayer = (function () {
export var AnimationPlayer = (function () {
function AnimationPlayer() {
}
Object.defineProperty(AnimationPlayer.prototype, "parentPlayer", {
get: function () { throw new exceptions_1.BaseException('NOT IMPLEMENTED: Base Class'); },
set: function (player) {
throw new exceptions_1.BaseException('NOT IMPLEMENTED: Base Class');
},
get: function () { throw new Error('NOT IMPLEMENTED: Base Class'); },
set: function (player) { throw new Error('NOT IMPLEMENTED: Base Class'); },
enumerable: true,

@@ -28,20 +24,27 @@ configurable: true

}());
exports.AnimationPlayer = AnimationPlayer;
var NoOpAnimationPlayer = (function () {
export var NoOpAnimationPlayer = (function () {
function NoOpAnimationPlayer() {
var _this = this;
this._subscriptions = [];
this._onDoneFns = [];
this._onStartFns = [];
this._started = false;
this.parentPlayer = null;
lang_1.scheduleMicroTask(function () { return _this._onFinish(); });
scheduleMicroTask(function () { return _this._onFinish(); });
}
/** @internal */
NoOpAnimationPlayer.prototype._onFinish = function () {
this._subscriptions.forEach(function (entry) { entry(); });
this._subscriptions = [];
this._onDoneFns.forEach(function (fn) { return fn(); });
this._onDoneFns = [];
};
NoOpAnimationPlayer.prototype.onDone = function (fn) { this._subscriptions.push(fn); };
NoOpAnimationPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
NoOpAnimationPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
NoOpAnimationPlayer.prototype.hasStarted = function () { return this._started; };
NoOpAnimationPlayer.prototype.init = function () { };
NoOpAnimationPlayer.prototype.play = function () { this._started = true; };
NoOpAnimationPlayer.prototype.play = function () {
if (!this.hasStarted()) {
this._onStartFns.forEach(function (fn) { return fn(); });
this._onStartFns = [];
}
this._started = true;
};
NoOpAnimationPlayer.prototype.pause = function () { };

@@ -56,3 +59,2 @@ NoOpAnimationPlayer.prototype.restart = function () { };

}());
exports.NoOpAnimationPlayer = NoOpAnimationPlayer;
//# sourceMappingURL=animation_player.js.map

@@ -6,3 +6,4 @@ import { AnimationPlayer } from './animation_player';

private _activePlayer;
private _subscriptions;
private _onDoneFns;
private _onStartFns;
private _finished;

@@ -15,3 +16,4 @@ private _started;

init(): void;
onDone(fn: Function): void;
onStart(fn: () => void): void;
onDone(fn: () => void): void;
hasStarted(): boolean;

@@ -18,0 +20,0 @@ play(): void;

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
var animation_player_1 = require('./animation_player');
var AnimationSequencePlayer = (function () {
import { isPresent, scheduleMicroTask } from '../facade/lang';
import { NoOpAnimationPlayer } from './animation_player';
export var AnimationSequencePlayer = (function () {
function AnimationSequencePlayer(_players) {

@@ -17,3 +16,4 @@ var _this = this;

this._currentIndex = 0;
this._subscriptions = [];
this._onDoneFns = [];
this._onStartFns = [];
this._finished = false;

@@ -30,7 +30,7 @@ this._started = false;

if (this._players.length == 0) {
this._activePlayer = new animation_player_1.NoOpAnimationPlayer();
lang_1.scheduleMicroTask(function () { return _this._onFinish(); });
this._activePlayer = new NoOpAnimationPlayer();
scheduleMicroTask(function () { return _this._onFinish(); });
}
else if (this._currentIndex >= this._players.length) {
this._activePlayer = new animation_player_1.NoOpAnimationPlayer();
this._activePlayer = new NoOpAnimationPlayer();
this._onFinish();

@@ -50,17 +50,22 @@ }

this._finished = true;
if (!lang_1.isPresent(this.parentPlayer)) {
if (!isPresent(this.parentPlayer)) {
this.destroy();
}
this._subscriptions.forEach(function (subscription) { return subscription(); });
this._subscriptions = [];
this._onDoneFns.forEach(function (fn) { return fn(); });
this._onDoneFns = [];
}
};
AnimationSequencePlayer.prototype.init = function () { this._players.forEach(function (player) { return player.init(); }); };
AnimationSequencePlayer.prototype.onDone = function (fn) { this._subscriptions.push(fn); };
AnimationSequencePlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
AnimationSequencePlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
AnimationSequencePlayer.prototype.hasStarted = function () { return this._started; };
AnimationSequencePlayer.prototype.play = function () {
if (!lang_1.isPresent(this.parentPlayer)) {
if (!isPresent(this.parentPlayer)) {
this.init();
}
this._started = true;
if (!this.hasStarted()) {
this._onStartFns.forEach(function (fn) { return fn(); });
this._onStartFns = [];
this._started = true;
}
this._activePlayer.play();

@@ -88,3 +93,2 @@ };

}());
exports.AnimationSequencePlayer = AnimationSequencePlayer;
//# sourceMappingURL=animation_sequence_player.js.map

@@ -8,15 +8,14 @@ /**

*/
"use strict";
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var animation_constants_1 = require('./animation_constants');
var metadata_1 = require('./metadata');
function prepareFinalAnimationStyles(previousStyles, newStyles, nullValue) {
import { ListWrapper, StringMapWrapper } from '../facade/collection';
import { isPresent } from '../facade/lang';
import { FILL_STYLE_FLAG } from './animation_constants';
import { AUTO_STYLE } from './metadata';
export function prepareFinalAnimationStyles(previousStyles, newStyles, nullValue) {
if (nullValue === void 0) { nullValue = null; }
var finalStyles = {};
collection_1.StringMapWrapper.forEach(newStyles, function (value, prop) {
finalStyles[prop] = value == metadata_1.AUTO_STYLE ? nullValue : value.toString();
StringMapWrapper.forEach(newStyles, function (value, prop) {
finalStyles[prop] = value == AUTO_STYLE ? nullValue : value.toString();
});
collection_1.StringMapWrapper.forEach(previousStyles, function (value, prop) {
if (!lang_1.isPresent(finalStyles[prop])) {
StringMapWrapper.forEach(previousStyles, function (value, prop) {
if (!isPresent(finalStyles[prop])) {
finalStyles[prop] = nullValue;

@@ -27,4 +26,3 @@ }

}
exports.prepareFinalAnimationStyles = prepareFinalAnimationStyles;
function balanceAnimationKeyframes(collectedStyles, finalStateStyles, keyframes) {
export function balanceAnimationKeyframes(collectedStyles, finalStateStyles, keyframes) {
var limit = keyframes.length - 1;

@@ -36,3 +34,3 @@ var firstKeyframe = keyframes[0];

var hasExtraFirstStyles = false;
collection_1.StringMapWrapper.forEach(collectedStyles, function (value, prop) {
StringMapWrapper.forEach(collectedStyles, function (value, prop) {
// if the style is already defined in the first keyframe then

@@ -46,12 +44,12 @@ // we do not replace it.

});
var keyframeCollectedStyles = collection_1.StringMapWrapper.merge({}, flatenedFirstKeyframeStyles);
var keyframeCollectedStyles = StringMapWrapper.merge({}, flatenedFirstKeyframeStyles);
// phase 2: normalize the final keyframe
var finalKeyframe = keyframes[limit];
collection_1.ListWrapper.insert(finalKeyframe.styles.styles, 0, finalStateStyles);
ListWrapper.insert(finalKeyframe.styles.styles, 0, finalStateStyles);
var flatenedFinalKeyframeStyles = flattenStyles(finalKeyframe.styles.styles);
var extraFinalKeyframeStyles = {};
var hasExtraFinalStyles = false;
collection_1.StringMapWrapper.forEach(keyframeCollectedStyles, function (value, prop) {
if (!lang_1.isPresent(flatenedFinalKeyframeStyles[prop])) {
extraFinalKeyframeStyles[prop] = metadata_1.AUTO_STYLE;
StringMapWrapper.forEach(keyframeCollectedStyles, function (value, prop) {
if (!isPresent(flatenedFinalKeyframeStyles[prop])) {
extraFinalKeyframeStyles[prop] = AUTO_STYLE;
hasExtraFinalStyles = true;

@@ -63,5 +61,5 @@ }

}
collection_1.StringMapWrapper.forEach(flatenedFinalKeyframeStyles, function (value, prop) {
if (!lang_1.isPresent(flatenedFirstKeyframeStyles[prop])) {
extraFirstKeyframeStyles[prop] = metadata_1.AUTO_STYLE;
StringMapWrapper.forEach(flatenedFinalKeyframeStyles, function (value, prop) {
if (!isPresent(flatenedFirstKeyframeStyles[prop])) {
extraFirstKeyframeStyles[prop] = AUTO_STYLE;
hasExtraFirstStyles = true;

@@ -75,17 +73,15 @@ }

}
exports.balanceAnimationKeyframes = balanceAnimationKeyframes;
function clearStyles(styles) {
export function clearStyles(styles) {
var finalStyles = {};
collection_1.StringMapWrapper.keys(styles).forEach(function (key) { finalStyles[key] = null; });
StringMapWrapper.keys(styles).forEach(function (key) { finalStyles[key] = null; });
return finalStyles;
}
exports.clearStyles = clearStyles;
function collectAndResolveStyles(collection, styles) {
export function collectAndResolveStyles(collection, styles) {
return styles.map(function (entry) {
var stylesObj = {};
collection_1.StringMapWrapper.forEach(entry, function (value, prop) {
if (value == animation_constants_1.FILL_STYLE_FLAG) {
StringMapWrapper.forEach(entry, function (value, prop) {
if (value == FILL_STYLE_FLAG) {
value = collection[prop];
if (!lang_1.isPresent(value)) {
value = metadata_1.AUTO_STYLE;
if (!isPresent(value)) {
value = AUTO_STYLE;
}

@@ -99,15 +95,12 @@ }

}
exports.collectAndResolveStyles = collectAndResolveStyles;
function renderStyles(element, renderer, styles) {
collection_1.StringMapWrapper.forEach(styles, function (value, prop) { renderer.setElementStyle(element, prop, value); });
export function renderStyles(element, renderer, styles) {
StringMapWrapper.forEach(styles, function (value, prop) { renderer.setElementStyle(element, prop, value); });
}
exports.renderStyles = renderStyles;
function flattenStyles(styles) {
export function flattenStyles(styles) {
var finalStyles = {};
styles.forEach(function (entry) {
collection_1.StringMapWrapper.forEach(entry, function (value, prop) { finalStyles[prop] = value; });
StringMapWrapper.forEach(entry, function (value, prop) { finalStyles[prop] = value; });
});
return finalStyles;
}
exports.flattenStyles = flattenStyles;
//# sourceMappingURL=animation_style_util.js.map

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var AnimationStyles = (function () {
export var AnimationStyles = (function () {
function AnimationStyles(styles) {

@@ -16,3 +15,2 @@ this.styles = styles;

}());
exports.AnimationStyles = AnimationStyles;
//# sourceMappingURL=animation_styles.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,8 +14,7 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
import { NumberWrapper, isArray, isPresent, isString } from '../facade/lang';
/**
* @experimental Animation support is experimental.
*/
exports.AUTO_STYLE = '*';
export var AUTO_STYLE = '*';
/**

@@ -29,3 +27,3 @@ * Metadata representing the entry of animations.

*/
var AnimationEntryMetadata = (function () {
export var AnimationEntryMetadata = (function () {
function AnimationEntryMetadata(name, definitions) {

@@ -37,7 +35,6 @@ this.name = name;

}());
exports.AnimationEntryMetadata = AnimationEntryMetadata;
/**
* @experimental Animation support is experimental.
*/
var AnimationStateMetadata = (function () {
export var AnimationStateMetadata = (function () {
function AnimationStateMetadata() {

@@ -47,3 +44,2 @@ }

}());
exports.AnimationStateMetadata = AnimationStateMetadata;
/**

@@ -56,3 +52,3 @@ * Metadata representing the entry of animations.

*/
var AnimationStateDeclarationMetadata = (function (_super) {
export var AnimationStateDeclarationMetadata = (function (_super) {
__extends(AnimationStateDeclarationMetadata, _super);

@@ -66,3 +62,2 @@ function AnimationStateDeclarationMetadata(stateNameExpr, styles) {

}(AnimationStateMetadata));
exports.AnimationStateDeclarationMetadata = AnimationStateDeclarationMetadata;
/**

@@ -75,3 +70,3 @@ * Metadata representing the entry of animations.

*/
var AnimationStateTransitionMetadata = (function (_super) {
export var AnimationStateTransitionMetadata = (function (_super) {
__extends(AnimationStateTransitionMetadata, _super);

@@ -85,7 +80,6 @@ function AnimationStateTransitionMetadata(stateChangeExpr, steps) {

}(AnimationStateMetadata));
exports.AnimationStateTransitionMetadata = AnimationStateTransitionMetadata;
/**
* @experimental Animation support is experimental.
*/
var AnimationMetadata = (function () {
export var AnimationMetadata = (function () {
function AnimationMetadata() {

@@ -95,3 +89,2 @@ }

}());
exports.AnimationMetadata = AnimationMetadata;
/**

@@ -104,3 +97,3 @@ * Metadata representing the entry of animations.

*/
var AnimationKeyframesSequenceMetadata = (function (_super) {
export var AnimationKeyframesSequenceMetadata = (function (_super) {
__extends(AnimationKeyframesSequenceMetadata, _super);

@@ -113,3 +106,2 @@ function AnimationKeyframesSequenceMetadata(steps) {

}(AnimationMetadata));
exports.AnimationKeyframesSequenceMetadata = AnimationKeyframesSequenceMetadata;
/**

@@ -122,3 +114,3 @@ * Metadata representing the entry of animations.

*/
var AnimationStyleMetadata = (function (_super) {
export var AnimationStyleMetadata = (function (_super) {
__extends(AnimationStyleMetadata, _super);

@@ -133,3 +125,2 @@ function AnimationStyleMetadata(styles, offset) {

}(AnimationMetadata));
exports.AnimationStyleMetadata = AnimationStyleMetadata;
/**

@@ -142,3 +133,3 @@ * Metadata representing the entry of animations.

*/
var AnimationAnimateMetadata = (function (_super) {
export var AnimationAnimateMetadata = (function (_super) {
__extends(AnimationAnimateMetadata, _super);

@@ -152,7 +143,6 @@ function AnimationAnimateMetadata(timings, styles) {

}(AnimationMetadata));
exports.AnimationAnimateMetadata = AnimationAnimateMetadata;
/**
* @experimental Animation support is experimental.
*/
var AnimationWithStepsMetadata = (function (_super) {
export var AnimationWithStepsMetadata = (function (_super) {
__extends(AnimationWithStepsMetadata, _super);

@@ -163,3 +153,3 @@ function AnimationWithStepsMetadata() {

Object.defineProperty(AnimationWithStepsMetadata.prototype, "steps", {
get: function () { throw new exceptions_1.BaseException('NOT IMPLEMENTED: Base Class'); },
get: function () { throw new Error('NOT IMPLEMENTED: Base Class'); },
enumerable: true,

@@ -170,3 +160,2 @@ configurable: true

}(AnimationMetadata));
exports.AnimationWithStepsMetadata = AnimationWithStepsMetadata;
/**

@@ -179,3 +168,3 @@ * Metadata representing the entry of animations.

*/
var AnimationSequenceMetadata = (function (_super) {
export var AnimationSequenceMetadata = (function (_super) {
__extends(AnimationSequenceMetadata, _super);

@@ -193,3 +182,2 @@ function AnimationSequenceMetadata(_steps) {

}(AnimationWithStepsMetadata));
exports.AnimationSequenceMetadata = AnimationSequenceMetadata;
/**

@@ -202,3 +190,3 @@ * Metadata representing the entry of animations.

*/
var AnimationGroupMetadata = (function (_super) {
export var AnimationGroupMetadata = (function (_super) {
__extends(AnimationGroupMetadata, _super);

@@ -216,3 +204,2 @@ function AnimationGroupMetadata(_steps) {

}(AnimationWithStepsMetadata));
exports.AnimationGroupMetadata = AnimationGroupMetadata;
/**

@@ -270,6 +257,6 @@ * `animate` is an animation-specific function that is designed to be used inside of Angular2's

*/
function animate(timing, styles) {
export function animate(timing, styles) {
if (styles === void 0) { styles = null; }
var stylesEntry = styles;
if (!lang_1.isPresent(stylesEntry)) {
if (!isPresent(stylesEntry)) {
var EMPTY_STYLE = {};

@@ -280,3 +267,2 @@ stylesEntry = new AnimationStyleMetadata([EMPTY_STYLE], 1);

}
exports.animate = animate;
/**

@@ -320,6 +306,5 @@ * `group` is an animation-specific function that is designed to be used inside of Angular2's

*/
function group(steps) {
export function group(steps) {
return new AnimationGroupMetadata(steps);
}
exports.group = group;
/**

@@ -364,6 +349,5 @@ * `sequence` is an animation-specific function that is designed to be used inside of Angular2's

*/
function sequence(steps) {
export function sequence(steps) {
return new AnimationSequenceMetadata(steps);
}
exports.sequence = sequence;
/**

@@ -416,10 +400,10 @@ * `style` is an animation-specific function that is designed to be used inside of Angular2's

*/
function style(tokens) {
export function style(tokens) {
var input;
var offset = null;
if (lang_1.isString(tokens)) {
if (isString(tokens)) {
input = [tokens];
}
else {
if (lang_1.isArray(tokens)) {
if (isArray(tokens)) {
input = tokens;

@@ -432,4 +416,4 @@ }

var entryOffset = entry['offset'];
if (lang_1.isPresent(entryOffset)) {
offset = offset == null ? lang_1.NumberWrapper.parseFloat(entryOffset) : offset;
if (isPresent(entryOffset)) {
offset = offset == null ? NumberWrapper.parseFloat(entryOffset) : offset;
}

@@ -440,3 +424,2 @@ });

}
exports.style = style;
/**

@@ -496,6 +479,5 @@ * `state` is an animation-specific function that is designed to be used inside of Angular2's

*/
function state(stateNameExpr, styles) {
export function state(stateNameExpr, styles) {
return new AnimationStateDeclarationMetadata(stateNameExpr, styles);
}
exports.state = state;
/**

@@ -550,6 +532,5 @@ * `keyframes` is an animation-specific function that is designed to be used inside of Angular2's

*/
function keyframes(steps) {
export function keyframes(steps) {
return new AnimationKeyframesSequenceMetadata(steps);
}
exports.keyframes = keyframes;
/**

@@ -643,8 +624,7 @@ * `transition` is an animation-specific function that is designed to be used inside of Angular2's

*/
function transition(stateChangeExpr, steps) {
var animationData = lang_1.isArray(steps) ? new AnimationSequenceMetadata(steps) :
export function transition(stateChangeExpr, steps) {
var animationData = isArray(steps) ? new AnimationSequenceMetadata(steps) :
steps;
return new AnimationStateTransitionMetadata(stateChangeExpr, animationData);
}
exports.transition = transition;
/**

@@ -706,6 +686,5 @@ * `trigger` is an animation-specific function that is designed to be used inside of Angular2's

*/
function trigger(name, animation) {
export function trigger(name, animation) {
return new AnimationEntryMetadata(name, animation);
}
exports.trigger = trigger;
//# sourceMappingURL=metadata.js.map

@@ -8,8 +8,7 @@ /**

*/
"use strict";
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var ViewAnimationMap = (function () {
import { ListWrapper, Map, StringMapWrapper } from '../facade/collection';
import { isPresent } from '../facade/lang';
export var ViewAnimationMap = (function () {
function ViewAnimationMap() {
this._map = new collection_1.Map();
this._map = new Map();
this._allPlayers = [];

@@ -24,3 +23,3 @@ }

var playersByAnimation = this._map.get(element);
if (lang_1.isPresent(playersByAnimation)) {
if (isPresent(playersByAnimation)) {
return playersByAnimation[animationName];

@@ -31,11 +30,11 @@ }

var el = this._map.get(element);
return el ? collection_1.StringMapWrapper.values(el) : [];
return el ? StringMapWrapper.values(el) : [];
};
ViewAnimationMap.prototype.set = function (element, animationName, player) {
var playersByAnimation = this._map.get(element);
if (!lang_1.isPresent(playersByAnimation)) {
if (!isPresent(playersByAnimation)) {
playersByAnimation = {};
}
var existingEntry = playersByAnimation[animationName];
if (lang_1.isPresent(existingEntry)) {
if (isPresent(existingEntry)) {
this.remove(element, animationName);

@@ -50,8 +49,8 @@ }

var playersByAnimation = this._map.get(element);
if (lang_1.isPresent(playersByAnimation)) {
if (isPresent(playersByAnimation)) {
var player = playersByAnimation[animationName];
delete playersByAnimation[animationName];
var index = this._allPlayers.indexOf(player);
collection_1.ListWrapper.removeAt(this._allPlayers, index);
if (collection_1.StringMapWrapper.isEmpty(playersByAnimation)) {
ListWrapper.removeAt(this._allPlayers, index);
if (StringMapWrapper.isEmpty(playersByAnimation)) {
this._map.delete(element);

@@ -63,3 +62,2 @@ }

}());
exports.ViewAnimationMap = ViewAnimationMap;
//# sourceMappingURL=view_animation_map.js.map

@@ -8,5 +8,4 @@ /**

*/
"use strict";
var lang_1 = require('../src/facade/lang');
var di_1 = require('./di');
import { isPromise } from '../src/facade/lang';
import { Inject, Injectable, OpaqueToken, Optional } from './di';
/**

@@ -16,4 +15,9 @@ * A function that will be executed when an application is initialized.

*/
exports.APP_INITIALIZER = new di_1.OpaqueToken('Application Initializer');
var ApplicationInitStatus = (function () {
export var APP_INITIALIZER = new OpaqueToken('Application Initializer');
/**
* A class that reflects the state of running {@link APP_INITIALIZER}s.
*
* @experimental
*/
export var ApplicationInitStatus = (function () {
function ApplicationInitStatus(appInits) {

@@ -26,3 +30,3 @@ var _this = this;

var initResult = appInits[i]();
if (lang_1.isPromise(initResult)) {
if (isPromise(initResult)) {
asyncInitPromises.push(initResult);

@@ -47,13 +51,11 @@ }

});
/** @nocollapse */
ApplicationInitStatus.decorators = [
{ type: di_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
ApplicationInitStatus.ctorParameters = [
{ type: Array, decorators: [{ type: di_1.Inject, args: [exports.APP_INITIALIZER,] }, { type: di_1.Optional },] },
{ type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional },] },
];
return ApplicationInitStatus;
}());
exports.ApplicationInitStatus = ApplicationInitStatus;
//# sourceMappingURL=application_init.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"APP_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Application Initializer"]},"ApplicationInitStatus":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"APP_INITIALIZER"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":29,"character":60}]}]}]}}}}
{"__symbolic":"module","version":1,"metadata":{"APP_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Application Initializer"]},"ApplicationInitStatus":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"APP_INITIALIZER"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":29,"character":61}]}]}]}}}}

@@ -1,9 +0,1 @@

/**
* @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 { Type } from '../src/facade/lang';
import { IterableDiffers, KeyValueDiffers } from './change_detection/change_detection';

@@ -13,11 +5,2 @@ export declare function _iterableDiffersFactory(): IterableDiffers;

/**
* A default set of providers which should be included in any Angular
* application, regardless of the platform it runs onto.
*
* @deprecated Include `ApplicationModule` instead.
*/
export declare const APPLICATION_COMMON_PROVIDERS: Array<Type | {
[k: string]: any;
} | any[]>;
/**
* This module includes the providers of @angular/core that are needed

@@ -24,0 +7,0 @@ * to bootstrap components via `ApplicationRef`.

@@ -8,50 +8,44 @@ /**

*/
"use strict";
var application_init_1 = require('./application_init');
var application_ref_1 = require('./application_ref');
var application_tokens_1 = require('./application_tokens');
var change_detection_1 = require('./change_detection/change_detection');
var compiler_1 = require('./linker/compiler');
var component_resolver_1 = require('./linker/component_resolver');
var dynamic_component_loader_1 = require('./linker/dynamic_component_loader');
var view_utils_1 = require('./linker/view_utils');
var metadata_1 = require('./metadata');
function _iterableDiffersFactory() {
return change_detection_1.defaultIterableDiffers;
import { ApplicationInitStatus } from './application_init';
import { ApplicationRef, ApplicationRef_ } from './application_ref';
import { APP_ID_RANDOM_PROVIDER } from './application_tokens';
import { IterableDiffers, KeyValueDiffers, defaultIterableDiffers, defaultKeyValueDiffers } from './change_detection/change_detection';
import { LOCALE_ID } from './i18n/tokens';
import { Compiler } from './linker/compiler';
import { ViewUtils } from './linker/view_utils';
import { NgModule } from './metadata';
export function _iterableDiffersFactory() {
return defaultIterableDiffers;
}
exports._iterableDiffersFactory = _iterableDiffersFactory;
function _keyValueDiffersFactory() {
return change_detection_1.defaultKeyValueDiffers;
export function _keyValueDiffersFactory() {
return defaultKeyValueDiffers;
}
exports._keyValueDiffersFactory = _keyValueDiffersFactory;
/**
* A default set of providers which should be included in any Angular
* application, regardless of the platform it runs onto.
* This module includes the providers of @angular/core that are needed
* to bootstrap components via `ApplicationRef`.
*
* @deprecated Include `ApplicationModule` instead.
* @experimental
*/
exports.APPLICATION_COMMON_PROVIDERS = [];
var ApplicationModule = (function () {
export var ApplicationModule = (function () {
function ApplicationModule() {
}
/** @nocollapse */
ApplicationModule.decorators = [
{ type: metadata_1.NgModule, args: [{
{ type: NgModule, args: [{
providers: [
application_ref_1.ApplicationRef_,
{ provide: application_ref_1.ApplicationRef, useExisting: application_ref_1.ApplicationRef_ },
application_init_1.ApplicationInitStatus,
compiler_1.Compiler,
{ provide: component_resolver_1.ComponentResolver, useExisting: compiler_1.Compiler },
application_tokens_1.APP_ID_RANDOM_PROVIDER,
view_utils_1.ViewUtils,
{ provide: change_detection_1.IterableDiffers, useFactory: _iterableDiffersFactory },
{ provide: change_detection_1.KeyValueDiffers, useFactory: _keyValueDiffersFactory },
{ provide: dynamic_component_loader_1.DynamicComponentLoader, useClass: dynamic_component_loader_1.DynamicComponentLoader_ },
ApplicationRef_,
{ provide: ApplicationRef, useExisting: ApplicationRef_ },
ApplicationInitStatus,
Compiler,
APP_ID_RANDOM_PROVIDER,
ViewUtils,
{ provide: IterableDiffers, useFactory: _iterableDiffersFactory },
{ provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory },
{ provide: LOCALE_ID, useValue: 'en-US' },
]
},] },
];
/** @nocollapse */
ApplicationModule.ctorParameters = [];
return ApplicationModule;
}());
exports.ApplicationModule = ApplicationModule;
//# sourceMappingURL=application_module.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"_iterableDiffersFactory":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"reference","module":"./change_detection/change_detection","name":"defaultIterableDiffers"}},"_keyValueDiffersFactory":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"reference","module":"./change_detection/change_detection","name":"defaultKeyValueDiffers"}},"APPLICATION_COMMON_PROVIDERS":[],"ApplicationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./metadata","name":"NgModule"},"arguments":[{"providers":[{"__symbolic":"reference","module":"./application_ref","name":"ApplicationRef_"},{"provide":{"__symbolic":"reference","module":"./application_ref","name":"ApplicationRef"},"useExisting":{"__symbolic":"reference","module":"./application_ref","name":"ApplicationRef_"}},{"__symbolic":"reference","module":"./application_init","name":"ApplicationInitStatus"},{"__symbolic":"reference","module":"./linker/compiler","name":"Compiler"},{"provide":{"__symbolic":"reference","module":"./linker/component_resolver","name":"ComponentResolver"},"useExisting":{"__symbolic":"reference","module":"./linker/compiler","name":"Compiler"}},{"__symbolic":"reference","module":"./application_tokens","name":"APP_ID_RANDOM_PROVIDER"},{"__symbolic":"reference","module":"./linker/view_utils","name":"ViewUtils"},{"provide":{"__symbolic":"reference","module":"./change_detection/change_detection","name":"IterableDiffers"},"useFactory":{"__symbolic":"reference","name":"_iterableDiffersFactory"}},{"provide":{"__symbolic":"reference","module":"./change_detection/change_detection","name":"KeyValueDiffers"},"useFactory":{"__symbolic":"reference","name":"_keyValueDiffersFactory"}},{"provide":{"__symbolic":"reference","module":"./linker/dynamic_component_loader","name":"DynamicComponentLoader"},"useClass":{"__symbolic":"reference","module":"./linker/dynamic_component_loader","name":"DynamicComponentLoader_"}}]}]}]}}}
{"__symbolic":"module","version":1,"metadata":{"_iterableDiffersFactory":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"reference","module":"./change_detection/change_detection","name":"defaultIterableDiffers"}},"_keyValueDiffersFactory":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"reference","module":"./change_detection/change_detection","name":"defaultKeyValueDiffers"}},"ApplicationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./metadata","name":"NgModule"},"arguments":[{"providers":[{"__symbolic":"reference","module":"./application_ref","name":"ApplicationRef_"},{"provide":{"__symbolic":"reference","module":"./application_ref","name":"ApplicationRef"},"useExisting":{"__symbolic":"reference","module":"./application_ref","name":"ApplicationRef_"}},{"__symbolic":"reference","module":"./application_init","name":"ApplicationInitStatus"},{"__symbolic":"reference","module":"./linker/compiler","name":"Compiler"},{"__symbolic":"reference","module":"./application_tokens","name":"APP_ID_RANDOM_PROVIDER"},{"__symbolic":"reference","module":"./linker/view_utils","name":"ViewUtils"},{"provide":{"__symbolic":"reference","module":"./change_detection/change_detection","name":"IterableDiffers"},"useFactory":{"__symbolic":"reference","name":"_iterableDiffersFactory"}},{"provide":{"__symbolic":"reference","module":"./change_detection/change_detection","name":"KeyValueDiffers"},"useFactory":{"__symbolic":"reference","name":"_keyValueDiffersFactory"}},{"provide":{"__symbolic":"reference","module":"./i18n/tokens","name":"LOCALE_ID"},"useValue":"en-US"}]}]}]}}}

@@ -1,7 +0,13 @@

import { ExceptionHandler } from '../src/facade/exceptions';
import { ConcreteType, Type } from '../src/facade/lang';
/**
* @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 { ErrorHandler } from '../src/error_handler';
import { ApplicationInitStatus } from './application_init';
import { ChangeDetectorRef } from './change_detection/change_detector_ref';
import { Console } from './console';
import { Injector } from './di';
import { Injector, Provider } from './di';
import { CompilerOptions } from './linker/compiler';

@@ -12,2 +18,3 @@ import { ComponentFactory, ComponentRef } from './linker/component_factory';

import { Testability, TestabilityRegistry } from './testability/testability';
import { Type } from './type';
import { NgZone } from './zone/ng_zone';

@@ -22,14 +29,6 @@ /**

*
* @experimental APIs related to application bootstrap are currently under review.
* @stable
*/
export declare function enableProdMode(): void;
/**
* Locks the run mode of Angular. After this has been called,
* it can't be changed any more. I.e. `isDevMode()` will always
* return the same value.
*
* @deprecated This is a noop now. {@link isDevMode} automatically locks the run mode on first call.
*/
export declare function lockRunMode(): void;
/**
* Returns whether Angular is in development mode. After called once,

@@ -51,8 +50,2 @@ * the value is locked and won't change any more.

/**
* Factory for a platform.
*
* @experimental
*/
export declare type PlatformFactory = (extraProviders?: any[]) => PlatformRef;
/**
* Creates a factory for a platform

@@ -62,3 +55,3 @@ *

*/
export declare function createPlatformFactory(parentPlaformFactory: PlatformFactory, name: string, providers?: any[]): PlatformFactory;
export declare function createPlatformFactory(parentPlaformFactory: (extraProviders?: Provider[]) => PlatformRef, name: string, providers?: Provider[]): (extraProviders?: Provider[]) => PlatformRef;
/**

@@ -72,8 +65,2 @@ * Checks that there currently is a platform

/**
* Dispose the existing platform.
*
* @deprecated Use `destroyPlatform` instead
*/
export declare function disposePlatform(): void;
/**
* Destroy the existing platform.

@@ -91,17 +78,2 @@ *

/**
* Shortcut for ApplicationRef.bootstrap.
* Requires a platform to be created first.
*
* @deprecated Use {@link bootstrapModuleFactory} instead.
*/
export declare function coreBootstrap<C>(componentFactory: ComponentFactory<C>, injector: Injector): ComponentRef<C>;
/**
* Resolves the componentFactory for the given component,
* waits for asynchronous initializers and bootstraps the component.
* Requires a platform to be created first.
*
* @deprecated Use {@link bootstrapModule} instead.
*/
export declare function coreLoadAndBootstrap(componentType: Type, injector: Injector): Promise<ComponentRef<any>>;
/**
* The Angular platform is the entry point for Angular on a web page. Each page

@@ -114,3 +86,3 @@ * has exactly one platform, and services (such as reflection) which are common

*
* @experimental APIs related to application bootstrap are currently under review.
* @stable
*/

@@ -134,5 +106,5 @@ export declare abstract class PlatformRef {

* import {MyModuleNgFactory} from './my_module.ngfactory';
* import {browserPlatform} from '@angular/platform-browser';
* import {platformBrowser} from '@angular/platform-browser';
*
* let moduleRef = browserPlatform().bootstrapModuleFactory(MyModuleNgFactory);
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
* ```

@@ -154,15 +126,10 @@ *

*
* let moduleRef = browserPlatform().bootstrapModule(MyModule);
* let moduleRef = platformBrowser().bootstrapModule(MyModule);
* ```
* @stable
*/
bootstrapModule<M>(moduleType: ConcreteType<M>, compilerOptions?: CompilerOptions | CompilerOptions[]): Promise<NgModuleRef<M>>;
bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: CompilerOptions | CompilerOptions[]): Promise<NgModuleRef<M>>;
/**
* Register a listener to be called when the platform is disposed.
* @deprecated Use `OnDestroy` instead
*/
abstract registerDisposeListener(dispose: () => void): void;
/**
* Register a listener to be called when the platform is disposed.
*/
abstract onDestroy(callback: () => void): void;

@@ -176,13 +143,4 @@ /**

* Destroy the Angular platform and all Angular applications on the page.
* @deprecated Use `destroy` instead
*/
abstract dispose(): void;
/**
* Destroy the Angular platform and all Angular applications on the page.
*/
abstract destroy(): void;
/**
* @deprecated Use `destroyed` instead
*/
disposed: boolean;
destroyed: boolean;

@@ -196,22 +154,10 @@ }

constructor(_injector: Injector);
/**
* @deprecated
*/
registerDisposeListener(dispose: () => void): void;
onDestroy(callback: () => void): void;
injector: Injector;
/**
* @deprecated
*/
disposed: boolean;
destroyed: boolean;
destroy(): void;
/**
* @deprecated
*/
dispose(): void;
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>): Promise<NgModuleRef<M>>;
private _bootstrapModuleFactoryWithZone<M>(moduleFactory, ngZone);
bootstrapModule<M>(moduleType: ConcreteType<M>, compilerOptions?: CompilerOptions | CompilerOptions[]): Promise<NgModuleRef<M>>;
private _bootstrapModuleWithZone<M>(moduleType, compilerOptions, ngZone);
bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: CompilerOptions | CompilerOptions[]): Promise<NgModuleRef<M>>;
private _bootstrapModuleWithZone<M>(moduleType, compilerOptions, ngZone, componentFactoryCallback?);
private _moduleDoBootstrap(moduleRef);

@@ -224,34 +170,6 @@ }

*
* @experimental APIs related to application bootstrap are currently under review.
* @stable
*/
export declare abstract class ApplicationRef {
/**
* Register a listener to be called each time `bootstrap()` is called to bootstrap
* a new root component.
*
* @deprecated Provide a callback via a multi provider for {@link APP_BOOTSTRAP_LISTENER}
* instead.
*/
abstract registerBootstrapListener(listener: (ref: ComponentRef<any>) => void): void;
/**
* Register a listener to be called when the application is disposed.
*
* @deprecated Use `ngOnDestroy` lifecycle hook or {@link NgModuleRef}.onDestroy.
*/
abstract registerDisposeListener(dispose: () => void): void;
/**
* Returns a promise that resolves when all asynchronous application initializers
* are done.
*
* @deprecated Use the {@link ApplicationInitStatus} class instead.
*/
abstract waitForAsyncInitializers(): Promise<any>;
/**
* Runs the given callback in the zone and returns the result of the callback.
* Exceptions will be forwarded to the ExceptionHandler and rethrown.
*
* @deprecated Use {@link NgZone}.run instead.
*/
abstract run(callback: Function): any;
/**
* Bootstrap a new component at the root level of the application.

@@ -268,24 +186,4 @@ *

*/
abstract bootstrap<C>(componentFactory: ComponentFactory<C> | ConcreteType<C>): ComponentRef<C>;
abstract bootstrap<C>(componentFactory: ComponentFactory<C> | Type<C>): ComponentRef<C>;
/**
* Retrieve the application {@link Injector}.
*
* @deprecated inject an {@link Injector} directly where needed or use {@link
* NgModuleRef}.injector.
*/
injector: Injector;
/**
* Retrieve the application {@link NgZone}.
*
* @deprecated inject {@link NgZone} instead of calling this getter.
*/
zone: NgZone;
/**
* Dispose of this application and all of its components.
*
* @deprecated Destroy the module that was created during bootstrap instead by calling
* {@link NgModuleRef}.destroy.
*/
abstract dispose(): void;
/**
* Invoke this method to explicitly process change detection and its side-effects.

@@ -305,3 +203,3 @@ *

*/
componentTypes: Type[];
componentTypes: Type<any>[];
/**

@@ -322,6 +220,2 @@ * Get a list of components registered to this application.

private _bootstrapListeners;
/**
* @deprecated
*/
private _disposeListeners;
private _rootComponents;

@@ -332,38 +226,10 @@ private _rootComponentTypes;

private _enforceNoNewChanges;
constructor(_zone: NgZone, _console: Console, _injector: Injector, _exceptionHandler: ExceptionHandler, _componentFactoryResolver: ComponentFactoryResolver, _initStatus: ApplicationInitStatus, _testabilityRegistry: TestabilityRegistry, _testability: Testability);
/**
* @deprecated
*/
registerBootstrapListener(listener: (ref: ComponentRef<any>) => void): void;
/**
* @deprecated
*/
registerDisposeListener(dispose: () => void): void;
constructor(_zone: NgZone, _console: Console, _injector: Injector, _exceptionHandler: ErrorHandler, _componentFactoryResolver: ComponentFactoryResolver, _initStatus: ApplicationInitStatus, _testabilityRegistry: TestabilityRegistry, _testability: Testability);
registerChangeDetector(changeDetector: ChangeDetectorRef): void;
unregisterChangeDetector(changeDetector: ChangeDetectorRef): void;
/**
* @deprecated
*/
waitForAsyncInitializers(): Promise<any>;
/**
* @deprecated
*/
run(callback: Function): any;
bootstrap<C>(componentOrFactory: ComponentFactory<C> | ConcreteType<C>): ComponentRef<C>;
/**
* @deprecated
*/
injector: Injector;
/**
* @deprecated
*/
zone: NgZone;
bootstrap<C>(componentOrFactory: ComponentFactory<C> | Type<C>): ComponentRef<C>;
tick(): void;
ngOnDestroy(): void;
/**
* @deprecated
*/
dispose(): void;
componentTypes: Type[];
componentTypes: Type<any>[];
components: ComponentRef<any>[];
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,15 +14,16 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var collection_1 = require('../src/facade/collection');
var exceptions_1 = require('../src/facade/exceptions');
var lang_1 = require('../src/facade/lang');
var application_init_1 = require('./application_init');
var application_tokens_1 = require('./application_tokens');
var console_1 = require('./console');
var di_1 = require('./di');
var compiler_1 = require('./linker/compiler');
var component_factory_1 = require('./linker/component_factory');
var component_factory_resolver_1 = require('./linker/component_factory_resolver');
var profile_1 = require('./profile/profile');
var testability_1 = require('./testability/testability');
var ng_zone_1 = require('./zone/ng_zone');
import { ErrorHandler } from '../src/error_handler';
import { ListWrapper } from '../src/facade/collection';
import { unimplemented } from '../src/facade/errors';
import { isBlank, isPresent, isPromise, stringify } from '../src/facade/lang';
import { ApplicationInitStatus } from './application_init';
import { APP_BOOTSTRAP_LISTENER, PLATFORM_INITIALIZER } from './application_tokens';
import { Console } from './console';
import { Injectable, Injector, OpaqueToken, Optional, ReflectiveInjector } from './di';
import { CompilerFactory } from './linker/compiler';
import { ComponentFactory } from './linker/component_factory';
import { ComponentFactoryResolver } from './linker/component_factory_resolver';
import { wtfCreateScope, wtfLeave } from './profile/profile';
import { Testability, TestabilityRegistry } from './testability/testability';
import { NgZone } from './zone/ng_zone';
var _devMode = true;

@@ -40,24 +40,11 @@ var _runModeLocked = false;

*
* @experimental APIs related to application bootstrap are currently under review.
* @stable
*/
function enableProdMode() {
export function enableProdMode() {
if (_runModeLocked) {
// Cannot use BaseException as that ends up importing from facade/lang.
throw new exceptions_1.BaseException('Cannot enable prod mode after platform setup.');
throw new Error('Cannot enable prod mode after platform setup.');
}
_devMode = false;
}
exports.enableProdMode = enableProdMode;
/**
* Locks the run mode of Angular. After this has been called,
* it can't be changed any more. I.e. `isDevMode()` will always
* return the same value.
*
* @deprecated This is a noop now. {@link isDevMode} automatically locks the run mode on first call.
*/
function lockRunMode() {
console.warn('lockRunMode() is deprecated and not needed any more.');
}
exports.lockRunMode = lockRunMode;
/**
* Returns whether Angular is in development mode. After called once,

@@ -70,7 +57,6 @@ * the value is locked and won't change any more.

*/
function isDevMode() {
export function isDevMode() {
_runModeLocked = true;
return _devMode;
}
exports.isDevMode = isDevMode;
/**

@@ -82,13 +68,12 @@ * Creates a platform.

*/
function createPlatform(injector) {
if (lang_1.isPresent(_platform) && !_platform.disposed) {
throw new exceptions_1.BaseException('There can be only one platform. Destroy the previous one to create a new one.');
export function createPlatform(injector) {
if (isPresent(_platform) && !_platform.destroyed) {
throw new Error('There can be only one platform. Destroy the previous one to create a new one.');
}
_platform = injector.get(PlatformRef);
var inits = injector.get(application_tokens_1.PLATFORM_INITIALIZER, null);
if (lang_1.isPresent(inits))
var inits = injector.get(PLATFORM_INITIALIZER, null);
if (isPresent(inits))
inits.forEach(function (init) { return init(); });
return _platform;
}
exports.createPlatform = createPlatform;
/**

@@ -99,5 +84,5 @@ * Creates a factory for a platform

*/
function createPlatformFactory(parentPlaformFactory, name, providers) {
export function createPlatformFactory(parentPlaformFactory, name, providers) {
if (providers === void 0) { providers = []; }
var marker = new di_1.OpaqueToken("Platform: " + name);
var marker = new OpaqueToken("Platform: " + name);
return function (extraProviders) {

@@ -110,3 +95,3 @@ if (extraProviders === void 0) { extraProviders = []; }

else {
createPlatform(di_1.ReflectiveInjector.resolveAndCreate(providers.concat(extraProviders).concat({ provide: marker, useValue: true })));
createPlatform(ReflectiveInjector.resolveAndCreate(providers.concat(extraProviders).concat({ provide: marker, useValue: true })));
}

@@ -117,3 +102,2 @@ }

}
exports.createPlatformFactory = createPlatformFactory;
/**

@@ -125,23 +109,13 @@ * Checks that there currently is a platform

*/
function assertPlatform(requiredToken) {
export function assertPlatform(requiredToken) {
var platform = getPlatform();
if (lang_1.isBlank(platform)) {
throw new exceptions_1.BaseException('No platform exists!');
if (isBlank(platform)) {
throw new Error('No platform exists!');
}
if (lang_1.isPresent(platform) && lang_1.isBlank(platform.injector.get(requiredToken, null))) {
throw new exceptions_1.BaseException('A platform with a different configuration has been created. Please destroy it first.');
if (isPresent(platform) && isBlank(platform.injector.get(requiredToken, null))) {
throw new Error('A platform with a different configuration has been created. Please destroy it first.');
}
return platform;
}
exports.assertPlatform = assertPlatform;
/**
* Dispose the existing platform.
*
* @deprecated Use `destroyPlatform` instead
*/
function disposePlatform() {
destroyPlatform();
}
exports.disposePlatform = disposePlatform;
/**
* Destroy the existing platform.

@@ -151,8 +125,7 @@ *

*/
function destroyPlatform() {
if (lang_1.isPresent(_platform) && !_platform.destroyed) {
export function destroyPlatform() {
if (isPresent(_platform) && !_platform.destroyed) {
_platform.destroy();
}
}
exports.destroyPlatform = destroyPlatform;
/**

@@ -163,28 +136,6 @@ * Returns the current platform.

*/
function getPlatform() {
return lang_1.isPresent(_platform) && !_platform.disposed ? _platform : null;
export function getPlatform() {
return isPresent(_platform) && !_platform.destroyed ? _platform : null;
}
exports.getPlatform = getPlatform;
/**
* Shortcut for ApplicationRef.bootstrap.
* Requires a platform to be created first.
*
* @deprecated Use {@link bootstrapModuleFactory} instead.
*/
function coreBootstrap(componentFactory, injector) {
throw new exceptions_1.BaseException('coreBootstrap is deprecated. Use bootstrapModuleFactory instead.');
}
exports.coreBootstrap = coreBootstrap;
/**
* Resolves the componentFactory for the given component,
* waits for asynchronous initializers and bootstraps the component.
* Requires a platform to be created first.
*
* @deprecated Use {@link bootstrapModule} instead.
*/
function coreLoadAndBootstrap(componentType, injector) {
throw new exceptions_1.BaseException('coreLoadAndBootstrap is deprecated. Use bootstrapModule instead.');
}
exports.coreLoadAndBootstrap = coreLoadAndBootstrap;
/**
* The Angular platform is the entry point for Angular on a web page. Each page

@@ -197,5 +148,5 @@ * has exactly one platform, and services (such as reflection) which are common

*
* @experimental APIs related to application bootstrap are currently under review.
* @stable
*/
var PlatformRef = (function () {
export var PlatformRef = (function () {
function PlatformRef() {

@@ -219,5 +170,5 @@ }

* import {MyModuleNgFactory} from './my_module.ngfactory';
* import {browserPlatform} from '@angular/platform-browser';
* import {platformBrowser} from '@angular/platform-browser';
*
* let moduleRef = browserPlatform().bootstrapModuleFactory(MyModuleNgFactory);
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
* ```

@@ -228,3 +179,3 @@ *

PlatformRef.prototype.bootstrapModuleFactory = function (moduleFactory) {
throw exceptions_1.unimplemented();
throw unimplemented();
};

@@ -242,3 +193,3 @@ /**

*
* let moduleRef = browserPlatform().bootstrapModule(MyModule);
* let moduleRef = platformBrowser().bootstrapModule(MyModule);
* ```

@@ -249,3 +200,3 @@ * @stable

if (compilerOptions === void 0) { compilerOptions = []; }
throw exceptions_1.unimplemented();
throw unimplemented();
};

@@ -257,3 +208,3 @@ Object.defineProperty(PlatformRef.prototype, "injector", {

*/
get: function () { throw exceptions_1.unimplemented(); },
get: function () { throw unimplemented(); },
enumerable: true,

@@ -263,12 +214,4 @@ configurable: true

;
Object.defineProperty(PlatformRef.prototype, "disposed", {
/**
* @deprecated Use `destroyed` instead
*/
get: function () { throw exceptions_1.unimplemented(); },
enumerable: true,
configurable: true
});
Object.defineProperty(PlatformRef.prototype, "destroyed", {
get: function () { throw exceptions_1.unimplemented(); },
get: function () { throw unimplemented(); },
enumerable: true,

@@ -279,9 +222,8 @@ configurable: true

}());
exports.PlatformRef = PlatformRef;
function _callAndReportToExceptionHandler(exceptionHandler, callback) {
function _callAndReportToErrorHandler(errorHandler, callback) {
try {
var result = callback();
if (lang_1.isPromise(result)) {
if (isPromise(result)) {
return result.catch(function (e) {
exceptionHandler.call(e);
errorHandler.handleError(e);
// rethrow as the exception handler might not do it

@@ -296,3 +238,3 @@ throw e;

catch (e) {
exceptionHandler.call(e);
errorHandler.handleError(e);
// rethrow as the exception handler might not do it

@@ -302,3 +244,3 @@ throw e;

}
var PlatformRef_ = (function (_super) {
export var PlatformRef_ = (function (_super) {
__extends(PlatformRef_, _super);

@@ -312,6 +254,2 @@ function PlatformRef_(_injector) {

}
/**
* @deprecated
*/
PlatformRef_.prototype.registerDisposeListener = function (dispose) { this.onDestroy(dispose); };
PlatformRef_.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };

@@ -323,10 +261,2 @@ Object.defineProperty(PlatformRef_.prototype, "injector", {

});
Object.defineProperty(PlatformRef_.prototype, "disposed", {
/**
* @deprecated
*/
get: function () { return this.destroyed; },
enumerable: true,
configurable: true
});
Object.defineProperty(PlatformRef_.prototype, "destroyed", {

@@ -339,12 +269,8 @@ get: function () { return this._destroyed; },

if (this._destroyed) {
throw new exceptions_1.BaseException('The platform has already been destroyed!');
throw new Error('The platform has already been destroyed!');
}
collection_1.ListWrapper.clone(this._modules).forEach(function (app) { return app.destroy(); });
ListWrapper.clone(this._modules).forEach(function (app) { return app.destroy(); });
this._destroyListeners.forEach(function (dispose) { return dispose(); });
this._destroyed = true;
};
/**
* @deprecated
*/
PlatformRef_.prototype.dispose = function () { this.destroy(); };
PlatformRef_.prototype.bootstrapModuleFactory = function (moduleFactory) {

@@ -360,18 +286,16 @@ return this._bootstrapModuleFactoryWithZone(moduleFactory, null);

if (!ngZone)
ngZone = new ng_zone_1.NgZone({ enableLongStackTrace: isDevMode() });
ngZone = new NgZone({ enableLongStackTrace: isDevMode() });
// Attention: Don't use ApplicationRef.run here,
// as we want to be sure that all possible constructor calls are inside `ngZone.run`!
return ngZone.run(function () {
var ngZoneInjector = di_1.ReflectiveInjector.resolveAndCreate([{ provide: ng_zone_1.NgZone, useValue: ngZone }], _this.injector);
var ngZoneInjector = ReflectiveInjector.resolveAndCreate([{ provide: NgZone, useValue: ngZone }], _this.injector);
var moduleRef = moduleFactory.create(ngZoneInjector);
var exceptionHandler = moduleRef.injector.get(exceptions_1.ExceptionHandler, null);
var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);
if (!exceptionHandler) {
throw new Error('No ExceptionHandler. Is platform module (BrowserModule) included?');
throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');
}
moduleRef.onDestroy(function () { return collection_1.ListWrapper.remove(_this._modules, moduleRef); });
ngZone.onError.subscribe({
next: function (error) { exceptionHandler.call(error.error, error.stackTrace); }
});
return _callAndReportToExceptionHandler(exceptionHandler, function () {
var initStatus = moduleRef.injector.get(application_init_1.ApplicationInitStatus);
moduleRef.onDestroy(function () { return ListWrapper.remove(_this._modules, moduleRef); });
ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } });
return _callAndReportToErrorHandler(exceptionHandler, function () {
var initStatus = moduleRef.injector.get(ApplicationInitStatus);
return initStatus.donePromise.then(function () {

@@ -388,7 +312,18 @@ _this._moduleDoBootstrap(moduleRef);

};
PlatformRef_.prototype._bootstrapModuleWithZone = function (moduleType, compilerOptions, ngZone) {
PlatformRef_.prototype._bootstrapModuleWithZone = function (moduleType, compilerOptions, ngZone, componentFactoryCallback) {
var _this = this;
if (compilerOptions === void 0) { compilerOptions = []; }
var compilerFactory = this.injector.get(compiler_1.CompilerFactory);
var compilerFactory = this.injector.get(CompilerFactory);
var compiler = compilerFactory.createCompiler(compilerOptions instanceof Array ? compilerOptions : [compilerOptions]);
// ugly internal api hack: generate host component factories for all declared components and
// pass the factories into the callback - this is used by UpdateAdapter to get hold of all
// factories.
if (componentFactoryCallback) {
return compiler.compileModuleAndAllComponentsAsync(moduleType)
.then(function (_a) {
var ngModuleFactory = _a.ngModuleFactory, componentFactories = _a.componentFactories;
componentFactoryCallback(componentFactories);
return _this._bootstrapModuleFactoryWithZone(ngModuleFactory, ngZone);
});
}
return compiler.compileModuleAsync(moduleType)

@@ -406,17 +341,15 @@ .then(function (moduleFactory) { return _this._bootstrapModuleFactoryWithZone(moduleFactory, ngZone); });

else {
throw new exceptions_1.BaseException(("The module " + lang_1.stringify(moduleRef.instance.constructor) + " was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ") +
throw new Error(("The module " + stringify(moduleRef.instance.constructor) + " was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ") +
"Please define one of these.");
}
};
/** @nocollapse */
PlatformRef_.decorators = [
{ type: di_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
PlatformRef_.ctorParameters = [
{ type: di_1.Injector, },
{ type: Injector, },
];
return PlatformRef_;
}(PlatformRef));
exports.PlatformRef_ = PlatformRef_;
/**

@@ -427,30 +360,7 @@ * A reference to an Angular application running on a page.

*
* @experimental APIs related to application bootstrap are currently under review.
* @stable
*/
var ApplicationRef = (function () {
export var ApplicationRef = (function () {
function ApplicationRef() {
}
Object.defineProperty(ApplicationRef.prototype, "injector", {
/**
* Retrieve the application {@link Injector}.
*
* @deprecated inject an {@link Injector} directly where needed or use {@link
* NgModuleRef}.injector.
*/
get: function () { return exceptions_1.unimplemented(); },
enumerable: true,
configurable: true
});
;
Object.defineProperty(ApplicationRef.prototype, "zone", {
/**
* Retrieve the application {@link NgZone}.
*
* @deprecated inject {@link NgZone} instead of calling this getter.
*/
get: function () { return exceptions_1.unimplemented(); },
enumerable: true,
configurable: true
});
;
Object.defineProperty(ApplicationRef.prototype, "componentTypes", {

@@ -461,3 +371,3 @@ /**

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -471,3 +381,3 @@ configurable: true

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -479,4 +389,3 @@ configurable: true

}());
exports.ApplicationRef = ApplicationRef;
var ApplicationRef_ = (function (_super) {
export var ApplicationRef_ = (function (_super) {
__extends(ApplicationRef_, _super);

@@ -495,6 +404,2 @@ function ApplicationRef_(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus, _testabilityRegistry, _testability) {

this._bootstrapListeners = [];
/**
* @deprecated
*/
this._disposeListeners = [];
this._rootComponents = [];

@@ -508,12 +413,2 @@ this._rootComponentTypes = [];

}
/**
* @deprecated
*/
ApplicationRef_.prototype.registerBootstrapListener = function (listener) {
this._bootstrapListeners.push(listener);
};
/**
* @deprecated
*/
ApplicationRef_.prototype.registerDisposeListener = function (dispose) { this._disposeListeners.push(dispose); };
ApplicationRef_.prototype.registerChangeDetector = function (changeDetector) {

@@ -523,22 +418,11 @@ this._changeDetectorRefs.push(changeDetector);

ApplicationRef_.prototype.unregisterChangeDetector = function (changeDetector) {
collection_1.ListWrapper.remove(this._changeDetectorRefs, changeDetector);
ListWrapper.remove(this._changeDetectorRefs, changeDetector);
};
/**
* @deprecated
*/
ApplicationRef_.prototype.waitForAsyncInitializers = function () { return this._initStatus.donePromise; };
/**
* @deprecated
*/
ApplicationRef_.prototype.run = function (callback) {
var _this = this;
return this._zone.run(function () { return _callAndReportToExceptionHandler(_this._exceptionHandler, callback); });
};
ApplicationRef_.prototype.bootstrap = function (componentOrFactory) {
var _this = this;
if (!this._initStatus.done) {
throw new exceptions_1.BaseException('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');
throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');
}
var componentFactory;
if (componentOrFactory instanceof component_factory_1.ComponentFactory) {
if (componentOrFactory instanceof ComponentFactory) {
componentFactory = componentOrFactory;

@@ -552,5 +436,5 @@ }

compRef.onDestroy(function () { _this._unloadComponent(compRef); });
var testability = compRef.injector.get(testability_1.Testability, null);
if (lang_1.isPresent(testability)) {
compRef.injector.get(testability_1.TestabilityRegistry)
var testability = compRef.injector.get(Testability, null);
if (isPresent(testability)) {
compRef.injector.get(TestabilityRegistry)
.registerApplication(compRef.location.nativeElement, testability);

@@ -570,3 +454,3 @@ }

// Get the listeners lazily to prevent DI cycles.
var listeners = this._injector.get(application_tokens_1.APP_BOOTSTRAP_LISTENER, [])
var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, [])
.concat(this._bootstrapListeners);

@@ -577,27 +461,11 @@ listeners.forEach(function (listener) { return listener(componentRef); });

ApplicationRef_.prototype._unloadComponent = function (componentRef) {
if (!collection_1.ListWrapper.contains(this._rootComponents, componentRef)) {
if (!ListWrapper.contains(this._rootComponents, componentRef)) {
return;
}
this.unregisterChangeDetector(componentRef.changeDetectorRef);
collection_1.ListWrapper.remove(this._rootComponents, componentRef);
ListWrapper.remove(this._rootComponents, componentRef);
};
Object.defineProperty(ApplicationRef_.prototype, "injector", {
/**
* @deprecated
*/
get: function () { return this._injector; },
enumerable: true,
configurable: true
});
Object.defineProperty(ApplicationRef_.prototype, "zone", {
/**
* @deprecated
*/
get: function () { return this._zone; },
enumerable: true,
configurable: true
});
ApplicationRef_.prototype.tick = function () {
if (this._runningTick) {
throw new exceptions_1.BaseException('ApplicationRef.tick is called recursively');
throw new Error('ApplicationRef.tick is called recursively');
}

@@ -614,3 +482,3 @@ var s = ApplicationRef_._tickScope();

this._runningTick = false;
profile_1.wtfLeave(s);
wtfLeave(s);
}

@@ -620,9 +488,4 @@ };

// TODO(alxhub): Dispose of the NgZone.
collection_1.ListWrapper.clone(this._rootComponents).forEach(function (ref) { return ref.destroy(); });
this._disposeListeners.forEach(function (dispose) { return dispose(); });
ListWrapper.clone(this._rootComponents).forEach(function (ref) { return ref.destroy(); });
};
/**
* @deprecated
*/
ApplicationRef_.prototype.dispose = function () { this.ngOnDestroy(); };
Object.defineProperty(ApplicationRef_.prototype, "componentTypes", {

@@ -639,21 +502,19 @@ get: function () { return this._rootComponentTypes; },

/** @internal */
ApplicationRef_._tickScope = profile_1.wtfCreateScope('ApplicationRef#tick()');
/** @nocollapse */
ApplicationRef_._tickScope = wtfCreateScope('ApplicationRef#tick()');
ApplicationRef_.decorators = [
{ type: di_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
ApplicationRef_.ctorParameters = [
{ type: ng_zone_1.NgZone, },
{ type: console_1.Console, },
{ type: di_1.Injector, },
{ type: exceptions_1.ExceptionHandler, },
{ type: component_factory_resolver_1.ComponentFactoryResolver, },
{ type: application_init_1.ApplicationInitStatus, },
{ type: testability_1.TestabilityRegistry, decorators: [{ type: di_1.Optional },] },
{ type: testability_1.Testability, decorators: [{ type: di_1.Optional },] },
{ type: NgZone, },
{ type: Console, },
{ type: Injector, },
{ type: ErrorHandler, },
{ type: ComponentFactoryResolver, },
{ type: ApplicationInitStatus, },
{ type: TestabilityRegistry, decorators: [{ type: Optional },] },
{ type: Testability, decorators: [{ type: Optional },] },
];
return ApplicationRef_;
}(ApplicationRef));
exports.ApplicationRef_ = ApplicationRef_;
//# sourceMappingURL=application_ref.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"getPlatform":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"error","message":"Reference to a local symbol","line":28,"character":3,"context":{"name":"_platform"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"error","message":"Reference to a local symbol","line":28,"character":3,"context":{"name":"_platform"}}}},"thenExpression":{"__symbolic":"error","message":"Reference to a local symbol","line":28,"character":3,"context":{"name":"_platform"}},"elseExpression":null}},"PlatformRef_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./di","name":"Injector"}]}],"registerDisposeListener":[{"__symbolic":"method"}],"onDestroy":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"bootstrapModuleFactory":[{"__symbolic":"method"}],"_bootstrapModuleFactoryWithZone":[{"__symbolic":"method"}],"bootstrapModule":[{"__symbolic":"method"}],"_bootstrapModuleWithZone":[{"__symbolic":"method"}],"_moduleDoBootstrap":[{"__symbolic":"method"}]}},"ApplicationRef_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"./zone/ng_zone","name":"NgZone"},{"__symbolic":"reference","module":"./console","name":"Console"},{"__symbolic":"reference","module":"./di","name":"Injector"},{"__symbolic":"reference","module":"../src/facade/exceptions","name":"ExceptionHandler"},{"__symbolic":"reference","module":"./linker/component_factory_resolver","name":"ComponentFactoryResolver"},{"__symbolic":"reference","module":"./application_init","name":"ApplicationInitStatus"},{"__symbolic":"reference","module":"./testability/testability","name":"TestabilityRegistry"},{"__symbolic":"reference","module":"./testability/testability","name":"Testability"}]}],"registerBootstrapListener":[{"__symbolic":"method"}],"registerDisposeListener":[{"__symbolic":"method"}],"registerChangeDetector":[{"__symbolic":"method"}],"unregisterChangeDetector":[{"__symbolic":"method"}],"waitForAsyncInitializers":[{"__symbolic":"method"}],"run":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"_loadComponent":[{"__symbolic":"method"}],"_unloadComponent":[{"__symbolic":"method"}],"tick":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]},"statics":{"_tickScope":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./profile/profile","name":"wtfCreateScope"},"arguments":["ApplicationRef#tick()"]}}}}}
{"__symbolic":"module","version":1,"metadata":{"getPlatform":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"error","message":"Reference to a local symbol","line":29,"character":4,"context":{"name":"_platform"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"error","message":"Reference to a local symbol","line":29,"character":4,"context":{"name":"_platform"}}}},"thenExpression":{"__symbolic":"error","message":"Reference to a local symbol","line":29,"character":4,"context":{"name":"_platform"}},"elseExpression":null}},"PlatformRef_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./di","name":"Injector"}]}],"onDestroy":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"bootstrapModuleFactory":[{"__symbolic":"method"}],"_bootstrapModuleFactoryWithZone":[{"__symbolic":"method"}],"bootstrapModule":[{"__symbolic":"method"}],"_bootstrapModuleWithZone":[{"__symbolic":"method"}],"_moduleDoBootstrap":[{"__symbolic":"method"}]}},"ApplicationRef_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"./zone/ng_zone","name":"NgZone"},{"__symbolic":"reference","module":"./console","name":"Console"},{"__symbolic":"reference","module":"./di","name":"Injector"},{"__symbolic":"reference","module":"../src/error_handler","name":"ErrorHandler"},{"__symbolic":"reference","module":"./linker/component_factory_resolver","name":"ComponentFactoryResolver"},{"__symbolic":"reference","module":"./application_init","name":"ApplicationInitStatus"},{"__symbolic":"reference","module":"./testability/testability","name":"TestabilityRegistry"},{"__symbolic":"reference","module":"./testability/testability","name":"Testability"}]}],"registerChangeDetector":[{"__symbolic":"method"}],"unregisterChangeDetector":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"_loadComponent":[{"__symbolic":"method"}],"_unloadComponent":[{"__symbolic":"method"}],"tick":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"_tickScope":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./profile/profile","name":"wtfCreateScope"},"arguments":["ApplicationRef#tick()"]}}}}}

@@ -8,5 +8,4 @@ /**

*/
"use strict";
var lang_1 = require('../src/facade/lang');
var di_1 = require('./di');
import { Math, StringWrapper } from '../src/facade/lang';
import { OpaqueToken } from './di';
/**

@@ -22,7 +21,6 @@ * A DI Token representing a unique string id assigned to the application by Angular and used

*/
exports.APP_ID = new di_1.OpaqueToken('AppId');
function _appIdRandomProviderFactory() {
export var APP_ID = new OpaqueToken('AppId');
export function _appIdRandomProviderFactory() {
return "" + _randomChar() + _randomChar() + _randomChar();
}
exports._appIdRandomProviderFactory = _appIdRandomProviderFactory;
/**

@@ -32,4 +30,4 @@ * Providers that will generate a random APP_ID_TOKEN.

*/
exports.APP_ID_RANDOM_PROVIDER = {
provide: exports.APP_ID,
export var APP_ID_RANDOM_PROVIDER = {
provide: APP_ID,
useFactory: _appIdRandomProviderFactory,

@@ -39,3 +37,3 @@ deps: []

function _randomChar() {
return lang_1.StringWrapper.fromCharCode(97 + lang_1.Math.floor(lang_1.Math.random() * 25));
return StringWrapper.fromCharCode(97 + Math.floor(Math.random() * 25));
}

@@ -46,3 +44,3 @@ /**

*/
exports.PLATFORM_INITIALIZER = new di_1.OpaqueToken('Platform Initializer');
export var PLATFORM_INITIALIZER = new OpaqueToken('Platform Initializer');
/**

@@ -56,3 +54,3 @@ * All callbacks provided via this token will be called for every component that is bootstrapped.

*/
exports.APP_BOOTSTRAP_LISTENER = new di_1.OpaqueToken('appBootstrapListener');
export var APP_BOOTSTRAP_LISTENER = new OpaqueToken('appBootstrapListener');
/**

@@ -62,3 +60,3 @@ * A token which indicates the root directory of the application

*/
exports.PACKAGE_ROOT_URL = new di_1.OpaqueToken('Application Packages Root URL');
export var PACKAGE_ROOT_URL = new OpaqueToken('Application Packages Root URL');
//# sourceMappingURL=application_tokens.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"APP_ID":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["AppId"]},"_appIdRandomProviderFactory":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":26,"character":8}},"APP_ID_RANDOM_PROVIDER":{"provide":{"__symbolic":"reference","name":"APP_ID"},"useFactory":{"__symbolic":"reference","name":"_appIdRandomProviderFactory"},"deps":[]},"PLATFORM_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Platform Initializer"]},"APP_BOOTSTRAP_LISTENER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["appBootstrapListener"]},"PACKAGE_ROOT_URL":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Application Packages Root URL"]}}}
{"__symbolic":"module","version":1,"metadata":{"APP_ID":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["AppId"]},"_appIdRandomProviderFactory":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":26,"character":9}},"APP_ID_RANDOM_PROVIDER":{"provide":{"__symbolic":"reference","name":"APP_ID"},"useFactory":{"__symbolic":"reference","name":"_appIdRandomProviderFactory"},"deps":[]},"PLATFORM_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Platform Initializer"]},"APP_BOOTSTRAP_LISTENER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["appBootstrapListener"]},"PACKAGE_ROOT_URL":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"./di","name":"OpaqueToken"},"arguments":["Application Packages Root URL"]}}}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
/**

@@ -15,12 +14,3 @@ * @module

*/
var change_detection_1 = require('./change_detection/change_detection');
exports.ChangeDetectionStrategy = change_detection_1.ChangeDetectionStrategy;
exports.ChangeDetectorRef = change_detection_1.ChangeDetectorRef;
exports.CollectionChangeRecord = change_detection_1.CollectionChangeRecord;
exports.DefaultIterableDiffer = change_detection_1.DefaultIterableDiffer;
exports.IterableDiffers = change_detection_1.IterableDiffers;
exports.KeyValueChangeRecord = change_detection_1.KeyValueChangeRecord;
exports.KeyValueDiffers = change_detection_1.KeyValueDiffers;
exports.SimpleChange = change_detection_1.SimpleChange;
exports.WrappedValue = change_detection_1.WrappedValue;
export { ChangeDetectionStrategy, ChangeDetectorRef, CollectionChangeRecord, DefaultIterableDiffer, IterableDiffers, KeyValueChangeRecord, KeyValueDiffers, SimpleChange, WrappedValue } from './change_detection/change_detection';
//# sourceMappingURL=change_detection.js.map

@@ -8,22 +8,19 @@ /**

*/
"use strict";
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var lang_2 = require('../facade/lang');
exports.looseIdentical = lang_2.looseIdentical;
exports.UNINITIALIZED = {
import { areIterablesEqual, isListLikeIterable } from '../facade/collection';
import { isPrimitive, looseIdentical } from '../facade/lang';
export { looseIdentical } from '../facade/lang';
export var UNINITIALIZED = {
toString: function () { return 'CD_INIT_VALUE'; }
};
function devModeEqual(a, b) {
if (collection_1.isListLikeIterable(a) && collection_1.isListLikeIterable(b)) {
return collection_1.areIterablesEqual(a, b, devModeEqual);
export function devModeEqual(a, b) {
if (isListLikeIterable(a) && isListLikeIterable(b)) {
return areIterablesEqual(a, b, devModeEqual);
}
else if (!collection_1.isListLikeIterable(a) && !lang_1.isPrimitive(a) && !collection_1.isListLikeIterable(b) && !lang_1.isPrimitive(b)) {
else if (!isListLikeIterable(a) && !isPrimitive(a) && !isListLikeIterable(b) && !isPrimitive(b)) {
return true;
}
else {
return lang_1.looseIdentical(a, b);
return looseIdentical(a, b);
}
}
exports.devModeEqual = devModeEqual;
/**

@@ -48,3 +45,3 @@ * Indicates that the result of a {@link PipeMetadata} transformation has changed even though the

*/
var WrappedValue = (function () {
export var WrappedValue = (function () {
function WrappedValue(wrapped) {

@@ -56,7 +53,6 @@ this.wrapped = wrapped;

}());
exports.WrappedValue = WrappedValue;
/**
* Helper class for unwrapping WrappedValue s
*/
var ValueUnwrapper = (function () {
export var ValueUnwrapper = (function () {
function ValueUnwrapper() {

@@ -75,3 +71,2 @@ this.hasWrappedValue = false;

}());
exports.ValueUnwrapper = ValueUnwrapper;
/**

@@ -81,3 +76,3 @@ * Represents a basic change from a previous to a new value.

*/
var SimpleChange = (function () {
export var SimpleChange = (function () {
function SimpleChange(previousValue, currentValue) {

@@ -90,6 +85,5 @@ this.previousValue = previousValue;

*/
SimpleChange.prototype.isFirstChange = function () { return this.previousValue === exports.UNINITIALIZED; };
SimpleChange.prototype.isFirstChange = function () { return this.previousValue === UNINITIALIZED; };
return SimpleChange;
}());
exports.SimpleChange = SimpleChange;
//# sourceMappingURL=change_detection_util.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"UNINITIALIZED":{"__symbolic":"error","message":"Function call not supported","line":14,"character":11}},"exports":[{"from":"../facade/lang","export":["looseIdentical"]}]}
{"__symbolic":"module","version":1,"metadata":{"UNINITIALIZED":{"__symbolic":"error","message":"Function call not supported","line":14,"character":12}},"exports":[{"from":"../facade/lang","export":["looseIdentical"]}]}

@@ -8,43 +8,24 @@ /**

*/
"use strict";
var default_iterable_differ_1 = require('./differs/default_iterable_differ');
var default_keyvalue_differ_1 = require('./differs/default_keyvalue_differ');
var iterable_differs_1 = require('./differs/iterable_differs');
var keyvalue_differs_1 = require('./differs/keyvalue_differs');
var change_detection_util_1 = require('./change_detection_util');
exports.SimpleChange = change_detection_util_1.SimpleChange;
exports.UNINITIALIZED = change_detection_util_1.UNINITIALIZED;
exports.ValueUnwrapper = change_detection_util_1.ValueUnwrapper;
exports.WrappedValue = change_detection_util_1.WrappedValue;
exports.devModeEqual = change_detection_util_1.devModeEqual;
exports.looseIdentical = change_detection_util_1.looseIdentical;
var change_detector_ref_1 = require('./change_detector_ref');
exports.ChangeDetectorRef = change_detector_ref_1.ChangeDetectorRef;
var constants_1 = require('./constants');
exports.CHANGE_DETECTION_STRATEGY_VALUES = constants_1.CHANGE_DETECTION_STRATEGY_VALUES;
exports.ChangeDetectionStrategy = constants_1.ChangeDetectionStrategy;
exports.ChangeDetectorStatus = constants_1.ChangeDetectorStatus;
exports.isDefaultChangeDetectionStrategy = constants_1.isDefaultChangeDetectionStrategy;
var default_iterable_differ_2 = require('./differs/default_iterable_differ');
exports.CollectionChangeRecord = default_iterable_differ_2.CollectionChangeRecord;
exports.DefaultIterableDifferFactory = default_iterable_differ_2.DefaultIterableDifferFactory;
var default_iterable_differ_3 = require('./differs/default_iterable_differ');
exports.DefaultIterableDiffer = default_iterable_differ_3.DefaultIterableDiffer;
var default_keyvalue_differ_2 = require('./differs/default_keyvalue_differ');
exports.DefaultKeyValueDifferFactory = default_keyvalue_differ_2.DefaultKeyValueDifferFactory;
exports.KeyValueChangeRecord = default_keyvalue_differ_2.KeyValueChangeRecord;
var iterable_differs_2 = require('./differs/iterable_differs');
exports.IterableDiffers = iterable_differs_2.IterableDiffers;
var keyvalue_differs_2 = require('./differs/keyvalue_differs');
exports.KeyValueDiffers = keyvalue_differs_2.KeyValueDiffers;
import { DefaultIterableDifferFactory } from './differs/default_iterable_differ';
import { DefaultKeyValueDifferFactory } from './differs/default_keyvalue_differ';
import { IterableDiffers } from './differs/iterable_differs';
import { KeyValueDiffers } from './differs/keyvalue_differs';
export { SimpleChange, UNINITIALIZED, ValueUnwrapper, WrappedValue, devModeEqual, looseIdentical } from './change_detection_util';
export { ChangeDetectorRef } from './change_detector_ref';
export { CHANGE_DETECTION_STRATEGY_VALUES, ChangeDetectionStrategy, ChangeDetectorStatus, isDefaultChangeDetectionStrategy } from './constants';
export { CollectionChangeRecord, DefaultIterableDifferFactory } from './differs/default_iterable_differ';
export { DefaultIterableDiffer } from './differs/default_iterable_differ';
export { DefaultKeyValueDifferFactory, KeyValueChangeRecord } from './differs/default_keyvalue_differ';
export { IterableDiffers } from './differs/iterable_differs';
export { KeyValueDiffers } from './differs/keyvalue_differs';
/**
* Structural diffing for `Object`s and `Map`s.
*/
exports.keyValDiff = [new default_keyvalue_differ_1.DefaultKeyValueDifferFactory()];
export var keyValDiff = [new DefaultKeyValueDifferFactory()];
/**
* Structural diffing for `Iterable` types such as `Array`s.
*/
exports.iterableDiff = [new default_iterable_differ_1.DefaultIterableDifferFactory()];
exports.defaultIterableDiffers = new iterable_differs_1.IterableDiffers(exports.iterableDiff);
exports.defaultKeyValueDiffers = new keyvalue_differs_1.KeyValueDiffers(exports.keyValDiff);
export var iterableDiff = [new DefaultIterableDifferFactory()];
export var defaultIterableDiffers = new IterableDiffers(iterableDiff);
export var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
//# sourceMappingURL=change_detection.js.map

@@ -47,4 +47,2 @@ /**

* }
*
* bootstrap(App);
* ```

@@ -106,4 +104,2 @@ */

* }
*
* bootstrap(App);
* ```

@@ -195,4 +191,2 @@ */

* }
*
* bootstrap(App);
* ```

@@ -199,0 +193,0 @@ */

@@ -8,7 +8,6 @@ /**

*/
"use strict";
/**
* @stable
*/
var ChangeDetectorRef = (function () {
export var ChangeDetectorRef = (function () {
function ChangeDetectorRef() {

@@ -18,3 +17,2 @@ }

}());
exports.ChangeDetectorRef = ChangeDetectorRef;
//# sourceMappingURL=change_detector_ref.js.map

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
import { isBlank } from '../facade/lang';
/**

@@ -16,2 +15,3 @@ * Describes within the change detector which strategy will be used the next time change

*/
export var ChangeDetectionStrategy;
(function (ChangeDetectionStrategy) {

@@ -26,7 +26,7 @@ /**

ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
})(exports.ChangeDetectionStrategy || (exports.ChangeDetectionStrategy = {}));
var ChangeDetectionStrategy = exports.ChangeDetectionStrategy;
})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
/**
* Describes the status of the detector.
*/
export var ChangeDetectorStatus;
(function (ChangeDetectorStatus) {

@@ -63,8 +63,7 @@ /**

ChangeDetectorStatus[ChangeDetectorStatus["Destroyed"] = 5] = "Destroyed";
})(exports.ChangeDetectorStatus || (exports.ChangeDetectorStatus = {}));
var ChangeDetectorStatus = exports.ChangeDetectorStatus;
})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));
/**
* List of possible {@link ChangeDetectionStrategy} values.
*/
exports.CHANGE_DETECTION_STRATEGY_VALUES = [
export var CHANGE_DETECTION_STRATEGY_VALUES = [
ChangeDetectionStrategy.OnPush,

@@ -76,3 +75,3 @@ ChangeDetectionStrategy.Default,

*/
exports.CHANGE_DETECTOR_STATUS_VALUES = [
export var CHANGE_DETECTOR_STATUS_VALUES = [
ChangeDetectorStatus.CheckOnce,

@@ -85,7 +84,6 @@ ChangeDetectorStatus.Checked,

];
function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
return lang_1.isBlank(changeDetectionStrategy) ||
export function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
return isBlank(changeDetectionStrategy) ||
changeDetectionStrategy === ChangeDetectionStrategy.Default;
}
exports.isDefaultChangeDetectionStrategy = isDefaultChangeDetectionStrategy;
//# sourceMappingURL=constants.js.map

@@ -8,10 +8,8 @@ /**

*/
"use strict";
var collection_1 = require('../../facade/collection');
var exceptions_1 = require('../../facade/exceptions');
var lang_1 = require('../../facade/lang');
var DefaultIterableDifferFactory = (function () {
import { isListLikeIterable, iterateListLike } from '../../facade/collection';
import { getMapKey, isArray, isBlank, isPresent, looseIdentical, stringify } from '../../facade/lang';
export var DefaultIterableDifferFactory = (function () {
function DefaultIterableDifferFactory() {
}
DefaultIterableDifferFactory.prototype.supports = function (obj) { return collection_1.isListLikeIterable(obj); };
DefaultIterableDifferFactory.prototype.supports = function (obj) { return isListLikeIterable(obj); };
DefaultIterableDifferFactory.prototype.create = function (cdRef, trackByFn) {

@@ -22,3 +20,2 @@ return new DefaultIterableDiffer(trackByFn);

}());
exports.DefaultIterableDifferFactory = DefaultIterableDifferFactory;
var trackByIdentity = function (index, item) { return item; };

@@ -28,3 +25,3 @@ /**

*/
var DefaultIterableDiffer = (function () {
export var DefaultIterableDiffer = (function () {
function DefaultIterableDiffer(_trackByFn) {

@@ -50,3 +47,3 @@ this._trackByFn = _trackByFn;

this._identityChangesTail = null;
this._trackByFn = lang_1.isPresent(this._trackByFn) ? this._trackByFn : trackByIdentity;
this._trackByFn = isPresent(this._trackByFn) ? this._trackByFn : trackByIdentity;
}

@@ -149,6 +146,6 @@ Object.defineProperty(DefaultIterableDiffer.prototype, "collection", {

DefaultIterableDiffer.prototype.diff = function (collection) {
if (lang_1.isBlank(collection))
if (isBlank(collection))
collection = [];
if (!collection_1.isListLikeIterable(collection)) {
throw new exceptions_1.BaseException("Error trying to diff '" + collection + "'");
if (!isListLikeIterable(collection)) {
throw new Error("Error trying to diff '" + collection + "'");
}

@@ -172,3 +169,3 @@ if (this.check(collection)) {

var itemTrackBy;
if (lang_1.isArray(collection)) {
if (isArray(collection)) {
var list = collection;

@@ -179,3 +176,3 @@ this._length = collection.length;

itemTrackBy = this._trackByFn(index, item);
if (record === null || !lang_1.looseIdentical(record.trackById, itemTrackBy)) {
if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {
record = this._mismatch(record, item, itemTrackBy, index);

@@ -189,3 +186,3 @@ mayBeDirty = true;

}
if (!lang_1.looseIdentical(record.item, item))
if (!looseIdentical(record.item, item))
this._addIdentityChange(record, item);

@@ -198,5 +195,5 @@ }

index = 0;
collection_1.iterateListLike(collection, function (item /** TODO #9100 */) {
iterateListLike(collection, function (item /** TODO #9100 */) {
itemTrackBy = _this._trackByFn(index, item);
if (record === null || !lang_1.looseIdentical(record.trackById, itemTrackBy)) {
if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {
record = _this._mismatch(record, item, itemTrackBy, index);

@@ -210,3 +207,3 @@ mayBeDirty = true;

}
if (!lang_1.looseIdentical(record.item, item))
if (!looseIdentical(record.item, item))
_this._addIdentityChange(record, item);

@@ -288,3 +285,3 @@ }

// But first we need to check if identity changed, so we can update in view if necessary
if (!lang_1.looseIdentical(record.item, item))
if (!looseIdentical(record.item, item))
this._addIdentityChange(record, item);

@@ -299,3 +296,3 @@ this._moveAfter(record, previousRecord, index);

// But first we need to check if identity changed, so we can update in view if necessary
if (!lang_1.looseIdentical(record.item, item))
if (!looseIdentical(record.item, item))
this._addIdentityChange(record, item);

@@ -563,7 +560,6 @@ this._reinsertAfter(record, previousRecord, index);

}());
exports.DefaultIterableDiffer = DefaultIterableDiffer;
/**
* @stable
*/
var CollectionChangeRecord = (function () {
export var CollectionChangeRecord = (function () {
function CollectionChangeRecord(item, trackById) {

@@ -596,9 +592,8 @@ this.item = item;

CollectionChangeRecord.prototype.toString = function () {
return this.previousIndex === this.currentIndex ? lang_1.stringify(this.item) :
lang_1.stringify(this.item) + '[' +
lang_1.stringify(this.previousIndex) + '->' + lang_1.stringify(this.currentIndex) + ']';
return this.previousIndex === this.currentIndex ? stringify(this.item) :
stringify(this.item) + '[' +
stringify(this.previousIndex) + '->' + stringify(this.currentIndex) + ']';
};
return CollectionChangeRecord;
}());
exports.CollectionChangeRecord = CollectionChangeRecord;
// A linked list of CollectionChangeRecords with the same CollectionChangeRecord.item

@@ -639,3 +634,3 @@ var _DuplicateItemRecordList = (function () {

if ((afterIndex === null || afterIndex < record.currentIndex) &&
lang_1.looseIdentical(record.trackById, trackById)) {
looseIdentical(record.trackById, trackById)) {
return record;

@@ -684,5 +679,5 @@ }

// todo(vicb) handle corner cases
var key = lang_1.getMapKey(record.trackById);
var key = getMapKey(record.trackById);
var duplicates = this.map.get(key);
if (!lang_1.isPresent(duplicates)) {
if (!isPresent(duplicates)) {
duplicates = new _DuplicateItemRecordList();

@@ -702,5 +697,5 @@ this.map.set(key, duplicates);

if (afterIndex === void 0) { afterIndex = null; }
var key = lang_1.getMapKey(trackById);
var key = getMapKey(trackById);
var recordList = this.map.get(key);
return lang_1.isBlank(recordList) ? null : recordList.get(trackById, afterIndex);
return isBlank(recordList) ? null : recordList.get(trackById, afterIndex);
};

@@ -713,3 +708,3 @@ /**

_DuplicateMap.prototype.remove = function (record) {
var key = lang_1.getMapKey(record.trackById);
var key = getMapKey(record.trackById);
// todo(vicb)

@@ -730,3 +725,3 @@ // assert(this.map.containsKey(key));

_DuplicateMap.prototype.clear = function () { this.map.clear(); };
_DuplicateMap.prototype.toString = function () { return '_DuplicateMap(' + lang_1.stringify(this.map) + ')'; };
_DuplicateMap.prototype.toString = function () { return '_DuplicateMap(' + stringify(this.map) + ')'; };
return _DuplicateMap;

@@ -733,0 +728,0 @@ }());

@@ -8,15 +8,12 @@ /**

*/
"use strict";
var collection_1 = require('../../facade/collection');
var exceptions_1 = require('../../facade/exceptions');
var lang_1 = require('../../facade/lang');
var DefaultKeyValueDifferFactory = (function () {
import { StringMapWrapper } from '../../facade/collection';
import { isJsObject, looseIdentical, stringify } from '../../facade/lang';
export var DefaultKeyValueDifferFactory = (function () {
function DefaultKeyValueDifferFactory() {
}
DefaultKeyValueDifferFactory.prototype.supports = function (obj) { return obj instanceof Map || lang_1.isJsObject(obj); };
DefaultKeyValueDifferFactory.prototype.supports = function (obj) { return obj instanceof Map || isJsObject(obj); };
DefaultKeyValueDifferFactory.prototype.create = function (cdRef) { return new DefaultKeyValueDiffer(); };
return DefaultKeyValueDifferFactory;
}());
exports.DefaultKeyValueDifferFactory = DefaultKeyValueDifferFactory;
var DefaultKeyValueDiffer = (function () {
export var DefaultKeyValueDiffer = (function () {
function DefaultKeyValueDiffer() {

@@ -75,4 +72,4 @@ this._records = new Map();

}
else if (!(map instanceof Map || lang_1.isJsObject(map))) {
throw new exceptions_1.BaseException("Error trying to diff '" + map + "'");
else if (!(map instanceof Map || isJsObject(map))) {
throw new Error("Error trying to diff '" + map + "'");
}

@@ -171,3 +168,3 @@ return this.check(map) ? this : null;

DefaultKeyValueDiffer.prototype._maybeAddToChanges = function (record, newValue) {
if (!lang_1.looseIdentical(newValue, record.currentValue)) {
if (!looseIdentical(newValue, record.currentValue)) {
record.previousValue = record.currentValue;

@@ -251,15 +248,15 @@ record.currentValue = newValue;

for (record = this._mapHead; record !== null; record = record._next) {
items.push(lang_1.stringify(record));
items.push(stringify(record));
}
for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
previous.push(lang_1.stringify(record));
previous.push(stringify(record));
}
for (record = this._changesHead; record !== null; record = record._nextChanged) {
changes.push(lang_1.stringify(record));
changes.push(stringify(record));
}
for (record = this._additionsHead; record !== null; record = record._nextAdded) {
additions.push(lang_1.stringify(record));
additions.push(stringify(record));
}
for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
removals.push(lang_1.stringify(record));
removals.push(stringify(record));
}

@@ -278,3 +275,3 @@ return 'map: ' + items.join(', ') + '\n' +

else {
collection_1.StringMapWrapper.forEach(obj, fn);
StringMapWrapper.forEach(obj, fn);
}

@@ -284,7 +281,6 @@ };

}());
exports.DefaultKeyValueDiffer = DefaultKeyValueDiffer;
/**
* @stable
*/
var KeyValueChangeRecord = (function () {
export var KeyValueChangeRecord = (function () {
function KeyValueChangeRecord(key) {

@@ -308,10 +304,9 @@ this.key = key;

KeyValueChangeRecord.prototype.toString = function () {
return lang_1.looseIdentical(this.previousValue, this.currentValue) ?
lang_1.stringify(this.key) :
(lang_1.stringify(this.key) + '[' + lang_1.stringify(this.previousValue) + '->' +
lang_1.stringify(this.currentValue) + ']');
return looseIdentical(this.previousValue, this.currentValue) ?
stringify(this.key) :
(stringify(this.key) + '[' + stringify(this.previousValue) + '->' +
stringify(this.currentValue) + ']');
};
return KeyValueChangeRecord;
}());
exports.KeyValueChangeRecord = KeyValueChangeRecord;
//# sourceMappingURL=default_keyvalue_differ.js.map

@@ -8,7 +8,5 @@ /**

*/
"use strict";
var di_1 = require('../../di');
var collection_1 = require('../../facade/collection');
var exceptions_1 = require('../../facade/exceptions');
var lang_1 = require('../../facade/lang');
import { OptionalMetadata, SkipSelfMetadata } from '../../di';
import { ListWrapper } from '../../facade/collection';
import { getTypeNameForDebugging, isBlank, isPresent } from '../../facade/lang';
/**

@@ -18,3 +16,3 @@ * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.

*/
var IterableDiffers = (function () {
export var IterableDiffers = (function () {
function IterableDiffers(factories) {

@@ -24,4 +22,4 @@ this.factories = factories;

IterableDiffers.create = function (factories, parent) {
if (lang_1.isPresent(parent)) {
var copied = collection_1.ListWrapper.clone(parent.factories);
if (isPresent(parent)) {
var copied = ListWrapper.clone(parent.factories);
factories = factories.concat(copied);

@@ -54,9 +52,10 @@ return new IterableDiffers(factories);

IterableDiffers.extend = function (factories) {
return new di_1.Provider(IterableDiffers, {
return {
provide: IterableDiffers,
useFactory: function (parent) {
if (lang_1.isBlank(parent)) {
if (isBlank(parent)) {
// Typically would occur when calling IterableDiffers.extend inside of dependencies passed
// to
// bootstrap(), which would override default pipes instead of extending them.
throw new exceptions_1.BaseException('Cannot extend IterableDiffers without a parent injector');
throw new Error('Cannot extend IterableDiffers without a parent injector');
}

@@ -66,12 +65,12 @@ return IterableDiffers.create(factories, parent);

// Dependency technically isn't optional, but we can provide a better error message this way.
deps: [[IterableDiffers, new di_1.SkipSelfMetadata(), new di_1.OptionalMetadata()]]
});
deps: [[IterableDiffers, new SkipSelfMetadata(), new OptionalMetadata()]]
};
};
IterableDiffers.prototype.find = function (iterable) {
var factory = this.factories.find(function (f) { return f.supports(iterable); });
if (lang_1.isPresent(factory)) {
if (isPresent(factory)) {
return factory;
}
else {
throw new exceptions_1.BaseException("Cannot find a differ supporting object '" + iterable + "' of type '" + lang_1.getTypeNameForDebugging(iterable) + "'");
throw new Error("Cannot find a differ supporting object '" + iterable + "' of type '" + getTypeNameForDebugging(iterable) + "'");
}

@@ -81,3 +80,2 @@ };

}());
exports.IterableDiffers = IterableDiffers;
//# sourceMappingURL=iterable_differs.js.map

@@ -8,7 +8,5 @@ /**

*/
"use strict";
var di_1 = require('../../di');
var collection_1 = require('../../facade/collection');
var exceptions_1 = require('../../facade/exceptions');
var lang_1 = require('../../facade/lang');
import { OptionalMetadata, SkipSelfMetadata } from '../../di';
import { ListWrapper } from '../../facade/collection';
import { isBlank, isPresent } from '../../facade/lang';
/**

@@ -18,3 +16,3 @@ * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.

*/
var KeyValueDiffers = (function () {
export var KeyValueDiffers = (function () {
function KeyValueDiffers(factories) {

@@ -24,4 +22,4 @@ this.factories = factories;

KeyValueDiffers.create = function (factories, parent) {
if (lang_1.isPresent(parent)) {
var copied = collection_1.ListWrapper.clone(parent.factories);
if (isPresent(parent)) {
var copied = ListWrapper.clone(parent.factories);
factories = factories.concat(copied);

@@ -54,9 +52,10 @@ return new KeyValueDiffers(factories);

KeyValueDiffers.extend = function (factories) {
return new di_1.Provider(KeyValueDiffers, {
return {
provide: KeyValueDiffers,
useFactory: function (parent) {
if (lang_1.isBlank(parent)) {
if (isBlank(parent)) {
// Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed
// to
// bootstrap(), which would override default pipes instead of extending them.
throw new exceptions_1.BaseException('Cannot extend KeyValueDiffers without a parent injector');
throw new Error('Cannot extend KeyValueDiffers without a parent injector');
}

@@ -66,12 +65,12 @@ return KeyValueDiffers.create(factories, parent);

// Dependency technically isn't optional, but we can provide a better error message this way.
deps: [[KeyValueDiffers, new di_1.SkipSelfMetadata(), new di_1.OptionalMetadata()]]
});
deps: [[KeyValueDiffers, new SkipSelfMetadata(), new OptionalMetadata()]]
};
};
KeyValueDiffers.prototype.find = function (kv) {
var factory = this.factories.find(function (f) { return f.supports(kv); });
if (lang_1.isPresent(factory)) {
if (isPresent(factory)) {
return factory;
}
else {
throw new exceptions_1.BaseException("Cannot find a differ supporting object '" + kv + "'");
throw new Error("Cannot find a differ supporting object '" + kv + "'");
}

@@ -81,3 +80,2 @@ };

}());
exports.KeyValueDiffers = KeyValueDiffers;
//# sourceMappingURL=keyvalue_differs.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
//# sourceMappingURL=pipe_transform.js.map

@@ -8,18 +8,17 @@ /**

*/
"use strict";
var decorators_1 = require('./di/decorators');
var lang_1 = require('./facade/lang');
var Console = (function () {
import { Injectable } from './di/decorators';
import { print, warn } from './facade/lang';
export var Console = (function () {
function Console() {
}
Console.prototype.log = function (message) { lang_1.print(message); };
Console.prototype.log = function (message) { print(message); };
// Note: for reporting errors use `DOM.logError()` as it is platform specific
Console.prototype.warn = function (message) { lang_1.warn(message); };
/** @nocollapse */
Console.prototype.warn = function (message) { warn(message); };
Console.decorators = [
{ type: decorators_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
Console.ctorParameters = [];
return Console;
}());
exports.Console = Console;
//# sourceMappingURL=console.js.map

@@ -33,8 +33,2 @@ /**

source: string;
/**
* Use injector.get(token) instead.
*
* @deprecated
*/
inject(token: any): any;
}

@@ -41,0 +35,0 @@ /**

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,5 +14,5 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var EventListener = (function () {
import { ListWrapper, MapWrapper } from '../facade/collection';
import { isPresent } from '../facade/lang';
export var EventListener = (function () {
function EventListener(name, callback) {

@@ -26,11 +25,10 @@ this.name = name;

}());
exports.EventListener = EventListener;
/**
* @experimental All debugging apis are currently experimental.
*/
var DebugNode = (function () {
export var DebugNode = (function () {
function DebugNode(nativeNode, parent, _debugInfo) {
this._debugInfo = _debugInfo;
this.nativeNode = nativeNode;
if (lang_1.isPresent(parent) && parent instanceof DebugElement) {
if (isPresent(parent) && parent instanceof DebugElement) {
parent.addChild(this);

@@ -44,3 +42,3 @@ }

Object.defineProperty(DebugNode.prototype, "injector", {
get: function () { return lang_1.isPresent(this._debugInfo) ? this._debugInfo.injector : null; },
get: function () { return isPresent(this._debugInfo) ? this._debugInfo.injector : null; },
enumerable: true,

@@ -51,3 +49,3 @@ configurable: true

get: function () {
return lang_1.isPresent(this._debugInfo) ? this._debugInfo.component : null;
return isPresent(this._debugInfo) ? this._debugInfo.component : null;
},

@@ -58,3 +56,3 @@ enumerable: true,

Object.defineProperty(DebugNode.prototype, "context", {
get: function () { return lang_1.isPresent(this._debugInfo) ? this._debugInfo.context : null; },
get: function () { return isPresent(this._debugInfo) ? this._debugInfo.context : null; },
enumerable: true,

@@ -65,3 +63,3 @@ configurable: true

get: function () {
return lang_1.isPresent(this._debugInfo) ? this._debugInfo.references : null;
return isPresent(this._debugInfo) ? this._debugInfo.references : null;
},

@@ -73,3 +71,3 @@ enumerable: true,

get: function () {
return lang_1.isPresent(this._debugInfo) ? this._debugInfo.providerTokens : null;
return isPresent(this._debugInfo) ? this._debugInfo.providerTokens : null;
},

@@ -80,19 +78,12 @@ enumerable: true,

Object.defineProperty(DebugNode.prototype, "source", {
get: function () { return lang_1.isPresent(this._debugInfo) ? this._debugInfo.source : null; },
get: function () { return isPresent(this._debugInfo) ? this._debugInfo.source : null; },
enumerable: true,
configurable: true
});
/**
* Use injector.get(token) instead.
*
* @deprecated
*/
DebugNode.prototype.inject = function (token) { return this.injector.get(token); };
return DebugNode;
}());
exports.DebugNode = DebugNode;
/**
* @experimental All debugging apis are currently experimental.
*/
var DebugElement = (function (_super) {
export var DebugElement = (function (_super) {
__extends(DebugElement, _super);

@@ -109,3 +100,3 @@ function DebugElement(nativeNode, parent, _debugInfo) {

DebugElement.prototype.addChild = function (child) {
if (lang_1.isPresent(child)) {
if (isPresent(child)) {
this.childNodes.push(child);

@@ -128,6 +119,6 @@ child.parent = this;

this.childNodes =
collection_1.ListWrapper.concat(collection_1.ListWrapper.concat(previousChildren, newChildren), nextChildren);
ListWrapper.concat(ListWrapper.concat(previousChildren, newChildren), nextChildren);
for (var i = 0; i < newChildren.length; ++i) {
var newChild = newChildren[i];
if (lang_1.isPresent(newChild.parent)) {
if (isPresent(newChild.parent)) {
newChild.parent.removeChild(newChild);

@@ -175,10 +166,8 @@ }

}(DebugNode));
exports.DebugElement = DebugElement;
/**
* @experimental
*/
function asNativeElements(debugEls) {
export function asNativeElements(debugEls) {
return debugEls.map(function (el) { return el.nativeElement; });
}
exports.asNativeElements = asNativeElements;
function _queryElementChildren(element, predicate, matches) {

@@ -211,18 +200,14 @@ element.childNodes.forEach(function (node) {

*/
function getDebugNode(nativeNode) {
export function getDebugNode(nativeNode) {
return _nativeNodeToDebugNode.get(nativeNode);
}
exports.getDebugNode = getDebugNode;
function getAllDebugNodes() {
return collection_1.MapWrapper.values(_nativeNodeToDebugNode);
export function getAllDebugNodes() {
return MapWrapper.values(_nativeNodeToDebugNode);
}
exports.getAllDebugNodes = getAllDebugNodes;
function indexDebugNode(node) {
export function indexDebugNode(node) {
_nativeNodeToDebugNode.set(node.nativeNode, node);
}
exports.indexDebugNode = indexDebugNode;
function removeDebugNodeFromIndex(node) {
export function removeDebugNodeFromIndex(node) {
_nativeNodeToDebugNode.delete(node.nativeNode);
}
exports.removeDebugNodeFromIndex = removeDebugNodeFromIndex;
//# sourceMappingURL=debug_node.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"asNativeElements":{"__symbolic":"function","parameters":["debugEls"],"value":{"__symbolic":"error","message":"Function call not supported","line":153,"character":22}},"getDebugNode":{"__symbolic":"function","parameters":["nativeNode"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":183,"character":3,"context":{"name":"_nativeNodeToDebugNode"}}},"getAllDebugNodes":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":183,"character":3,"context":{"name":"_nativeNodeToDebugNode"}}}}}
{"__symbolic":"module","version":1,"metadata":{"asNativeElements":{"__symbolic":"function","parameters":["debugEls"],"value":{"__symbolic":"error","message":"Function call not supported","line":146,"character":22}},"getDebugNode":{"__symbolic":"function","parameters":["nativeNode"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"Map"}},"member":"get"},"arguments":[{"__symbolic":"reference","name":"nativeNode"}]}},"getAllDebugNodes":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../facade/collection","name":"MapWrapper"},"member":"values"},"arguments":[{"__symbolic":"new","expression":{"__symbolic":"reference","name":"Map"}}]}}}}

@@ -0,1 +1,8 @@

/**
* @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 { AnimationKeyframe } from '../animation/animation_keyframe';

@@ -2,0 +9,0 @@ import { AnimationPlayer } from '../animation/animation_player';

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
var debug_node_1 = require('./debug_node');
var DebugDomRootRenderer = (function () {
import { isPresent } from '../facade/lang';
import { DebugElement, DebugNode, EventListener, getDebugNode, indexDebugNode, removeDebugNodeFromIndex } from './debug_node';
export var DebugDomRootRenderer = (function () {
function DebugDomRootRenderer(_delegate) {

@@ -21,4 +20,3 @@ this._delegate = _delegate;

}());
exports.DebugDomRootRenderer = DebugDomRootRenderer;
var DebugDomRenderer = (function () {
export var DebugDomRenderer = (function () {
function DebugDomRenderer(_delegate) {

@@ -29,4 +27,4 @@ this._delegate = _delegate;

var nativeEl = this._delegate.selectRootElement(selectorOrNode, debugInfo);
var debugEl = new debug_node_1.DebugElement(nativeEl, null, debugInfo);
debug_node_1.indexDebugNode(debugEl);
var debugEl = new DebugElement(nativeEl, null, debugInfo);
indexDebugNode(debugEl);
return nativeEl;

@@ -36,5 +34,5 @@ };

var nativeEl = this._delegate.createElement(parentElement, name, debugInfo);
var debugEl = new debug_node_1.DebugElement(nativeEl, debug_node_1.getDebugNode(parentElement), debugInfo);
var debugEl = new DebugElement(nativeEl, getDebugNode(parentElement), debugInfo);
debugEl.name = name;
debug_node_1.indexDebugNode(debugEl);
indexDebugNode(debugEl);
return nativeEl;

@@ -45,4 +43,4 @@ };

var comment = this._delegate.createTemplateAnchor(parentElement, debugInfo);
var debugEl = new debug_node_1.DebugNode(comment, debug_node_1.getDebugNode(parentElement), debugInfo);
debug_node_1.indexDebugNode(debugEl);
var debugEl = new DebugNode(comment, getDebugNode(parentElement), debugInfo);
indexDebugNode(debugEl);
return comment;

@@ -52,11 +50,11 @@ };

var text = this._delegate.createText(parentElement, value, debugInfo);
var debugEl = new debug_node_1.DebugNode(text, debug_node_1.getDebugNode(parentElement), debugInfo);
debug_node_1.indexDebugNode(debugEl);
var debugEl = new DebugNode(text, getDebugNode(parentElement), debugInfo);
indexDebugNode(debugEl);
return text;
};
DebugDomRenderer.prototype.projectNodes = function (parentElement, nodes) {
var debugParent = debug_node_1.getDebugNode(parentElement);
if (lang_1.isPresent(debugParent) && debugParent instanceof debug_node_1.DebugElement) {
var debugParent = getDebugNode(parentElement);
if (isPresent(debugParent) && debugParent instanceof DebugElement) {
var debugElement_1 = debugParent;
nodes.forEach(function (node) { debugElement_1.addChild(debug_node_1.getDebugNode(node)); });
nodes.forEach(function (node) { debugElement_1.addChild(getDebugNode(node)); });
}

@@ -66,8 +64,8 @@ this._delegate.projectNodes(parentElement, nodes);

DebugDomRenderer.prototype.attachViewAfter = function (node, viewRootNodes) {
var debugNode = debug_node_1.getDebugNode(node);
if (lang_1.isPresent(debugNode)) {
var debugNode = getDebugNode(node);
if (isPresent(debugNode)) {
var debugParent = debugNode.parent;
if (viewRootNodes.length > 0 && lang_1.isPresent(debugParent)) {
if (viewRootNodes.length > 0 && isPresent(debugParent)) {
var debugViewRootNodes = [];
viewRootNodes.forEach(function (rootNode) { return debugViewRootNodes.push(debug_node_1.getDebugNode(rootNode)); });
viewRootNodes.forEach(function (rootNode) { return debugViewRootNodes.push(getDebugNode(rootNode)); });
debugParent.insertChildrenAfter(debugNode, debugViewRootNodes);

@@ -80,4 +78,4 @@ }

viewRootNodes.forEach(function (node) {
var debugNode = debug_node_1.getDebugNode(node);
if (lang_1.isPresent(debugNode) && lang_1.isPresent(debugNode.parent)) {
var debugNode = getDebugNode(node);
if (isPresent(debugNode) && isPresent(debugNode.parent)) {
debugNode.parent.removeChild(debugNode);

@@ -89,9 +87,9 @@ }

DebugDomRenderer.prototype.destroyView = function (hostElement, viewAllNodes) {
viewAllNodes.forEach(function (node) { debug_node_1.removeDebugNodeFromIndex(debug_node_1.getDebugNode(node)); });
viewAllNodes.forEach(function (node) { removeDebugNodeFromIndex(getDebugNode(node)); });
this._delegate.destroyView(hostElement, viewAllNodes);
};
DebugDomRenderer.prototype.listen = function (renderElement, name, callback) {
var debugEl = debug_node_1.getDebugNode(renderElement);
if (lang_1.isPresent(debugEl)) {
debugEl.listeners.push(new debug_node_1.EventListener(name, callback));
var debugEl = getDebugNode(renderElement);
if (isPresent(debugEl)) {
debugEl.listeners.push(new EventListener(name, callback));
}

@@ -104,4 +102,4 @@ return this._delegate.listen(renderElement, name, callback);

DebugDomRenderer.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) {
var debugEl = debug_node_1.getDebugNode(renderElement);
if (lang_1.isPresent(debugEl) && debugEl instanceof debug_node_1.DebugElement) {
var debugEl = getDebugNode(renderElement);
if (isPresent(debugEl) && debugEl instanceof DebugElement) {
debugEl.properties[propertyName] = propertyValue;

@@ -112,4 +110,4 @@ }

DebugDomRenderer.prototype.setElementAttribute = function (renderElement, attributeName, attributeValue) {
var debugEl = debug_node_1.getDebugNode(renderElement);
if (lang_1.isPresent(debugEl) && debugEl instanceof debug_node_1.DebugElement) {
var debugEl = getDebugNode(renderElement);
if (isPresent(debugEl) && debugEl instanceof DebugElement) {
debugEl.attributes[attributeName] = attributeValue;

@@ -123,4 +121,4 @@ }

DebugDomRenderer.prototype.setElementClass = function (renderElement, className, isAdd) {
var debugEl = debug_node_1.getDebugNode(renderElement);
if (lang_1.isPresent(debugEl) && debugEl instanceof debug_node_1.DebugElement) {
var debugEl = getDebugNode(renderElement);
if (isPresent(debugEl) && debugEl instanceof DebugElement) {
debugEl.classes[className] = isAdd;

@@ -131,4 +129,4 @@ }

DebugDomRenderer.prototype.setElementStyle = function (renderElement, styleName, styleValue) {
var debugEl = debug_node_1.getDebugNode(renderElement);
if (lang_1.isPresent(debugEl) && debugEl instanceof debug_node_1.DebugElement) {
var debugEl = getDebugNode(renderElement);
if (isPresent(debugEl) && debugEl instanceof DebugElement) {
debugEl.styles[styleName] = styleValue;

@@ -147,3 +145,2 @@ }

}());
exports.DebugDomRenderer = DebugDomRenderer;
//# sourceMappingURL=debug_renderer.js.map

@@ -18,6 +18,5 @@ /**

export { ReflectiveInjector } from './di/reflective_injector';
export { Binding, ProviderBuilder, bind, Provider, provide } from './di/provider';
export { ResolvedReflectiveBinding, ResolvedReflectiveFactory, ResolvedReflectiveProvider } from './di/reflective_provider';
export { Provider, TypeProvider, ValueProvider, ClassProvider, ExistingProvider, FactoryProvider } from './di/provider';
export { ResolvedReflectiveFactory, ResolvedReflectiveProvider } from './di/reflective_provider';
export { ReflectiveKey } from './di/reflective_key';
export { NoProviderError, AbstractProviderError, CyclicDependencyError, InstantiationError, InvalidProviderError, NoAnnotationError, OutOfBoundsError } from './di/reflective_exceptions';
export { OpaqueToken } from './di/opaque_token';

@@ -8,6 +8,2 @@ /**

*/
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
/**

@@ -18,38 +14,11 @@ * @module

*/
var metadata_1 = require('./di/metadata');
exports.HostMetadata = metadata_1.HostMetadata;
exports.InjectMetadata = metadata_1.InjectMetadata;
exports.InjectableMetadata = metadata_1.InjectableMetadata;
exports.OptionalMetadata = metadata_1.OptionalMetadata;
exports.SelfMetadata = metadata_1.SelfMetadata;
exports.SkipSelfMetadata = metadata_1.SkipSelfMetadata;
export { HostMetadata, InjectMetadata, InjectableMetadata, OptionalMetadata, SelfMetadata, SkipSelfMetadata } from './di/metadata';
// we have to reexport * because Dart and TS export two different sets of types
__export(require('./di/decorators'));
var forward_ref_1 = require('./di/forward_ref');
exports.forwardRef = forward_ref_1.forwardRef;
exports.resolveForwardRef = forward_ref_1.resolveForwardRef;
var injector_1 = require('./di/injector');
exports.Injector = injector_1.Injector;
var reflective_injector_1 = require('./di/reflective_injector');
exports.ReflectiveInjector = reflective_injector_1.ReflectiveInjector;
var provider_1 = require('./di/provider');
exports.Binding = provider_1.Binding;
exports.ProviderBuilder = provider_1.ProviderBuilder;
exports.bind = provider_1.bind;
exports.Provider = provider_1.Provider;
exports.provide = provider_1.provide;
var reflective_provider_1 = require('./di/reflective_provider');
exports.ResolvedReflectiveFactory = reflective_provider_1.ResolvedReflectiveFactory;
var reflective_key_1 = require('./di/reflective_key');
exports.ReflectiveKey = reflective_key_1.ReflectiveKey;
var reflective_exceptions_1 = require('./di/reflective_exceptions');
exports.NoProviderError = reflective_exceptions_1.NoProviderError;
exports.AbstractProviderError = reflective_exceptions_1.AbstractProviderError;
exports.CyclicDependencyError = reflective_exceptions_1.CyclicDependencyError;
exports.InstantiationError = reflective_exceptions_1.InstantiationError;
exports.InvalidProviderError = reflective_exceptions_1.InvalidProviderError;
exports.NoAnnotationError = reflective_exceptions_1.NoAnnotationError;
exports.OutOfBoundsError = reflective_exceptions_1.OutOfBoundsError;
var opaque_token_1 = require('./di/opaque_token');
exports.OpaqueToken = opaque_token_1.OpaqueToken;
export * from './di/decorators';
export { forwardRef, resolveForwardRef } from './di/forward_ref';
export { Injector } from './di/injector';
export { ReflectiveInjector } from './di/reflective_injector';
export { ResolvedReflectiveFactory } from './di/reflective_provider';
export { ReflectiveKey } from './di/reflective_key';
export { OpaqueToken } from './di/opaque_token';
//# sourceMappingURL=di.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./di/metadata","export":["HostMetadata","InjectMetadata","InjectableMetadata","OptionalMetadata","SelfMetadata","SkipSelfMetadata"]},{"from":"./di/decorators"},{"from":"./di/forward_ref","export":["forwardRef","resolveForwardRef","ForwardRefFn"]},{"from":"./di/injector","export":["Injector"]},{"from":"./di/reflective_injector","export":["ReflectiveInjector"]},{"from":"./di/provider","export":["Binding","ProviderBuilder","bind","Provider","provide"]},{"from":"./di/reflective_provider","export":["ResolvedReflectiveBinding","ResolvedReflectiveFactory","ResolvedReflectiveProvider"]},{"from":"./di/reflective_key","export":["ReflectiveKey"]},{"from":"./di/reflective_exceptions","export":["NoProviderError","AbstractProviderError","CyclicDependencyError","InstantiationError","InvalidProviderError","NoAnnotationError","OutOfBoundsError"]},{"from":"./di/opaque_token","export":["OpaqueToken"]}]}
{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./di/metadata","export":["HostMetadata","InjectMetadata","InjectableMetadata","OptionalMetadata","SelfMetadata","SkipSelfMetadata"]},{"from":"./di/decorators"},{"from":"./di/forward_ref","export":["forwardRef","resolveForwardRef","ForwardRefFn"]},{"from":"./di/injector","export":["Injector"]},{"from":"./di/reflective_injector","export":["ReflectiveInjector"]},{"from":"./di/provider","export":["Provider","TypeProvider","ValueProvider","ClassProvider","ExistingProvider","FactoryProvider"]},{"from":"./di/reflective_provider","export":["ResolvedReflectiveFactory","ResolvedReflectiveProvider"]},{"from":"./di/reflective_key","export":["ReflectiveKey"]},{"from":"./di/opaque_token","export":["OpaqueToken"]}]}

@@ -8,5 +8,4 @@ /**

*/
"use strict";
var decorators_1 = require('../util/decorators');
var metadata_1 = require('./metadata');
import { makeDecorator, makeParamDecorator } from '../util/decorators';
import { HostMetadata, InjectMetadata, InjectableMetadata, OptionalMetadata, SelfMetadata, SkipSelfMetadata } from './metadata';
/**

@@ -17,3 +16,3 @@ * Factory for creating {@link InjectMetadata}.

*/
exports.Inject = decorators_1.makeParamDecorator(metadata_1.InjectMetadata);
export var Inject = makeParamDecorator(InjectMetadata);
/**

@@ -24,3 +23,3 @@ * Factory for creating {@link OptionalMetadata}.

*/
exports.Optional = decorators_1.makeParamDecorator(metadata_1.OptionalMetadata);
export var Optional = makeParamDecorator(OptionalMetadata);
/**

@@ -31,3 +30,3 @@ * Factory for creating {@link InjectableMetadata}.

*/
exports.Injectable = decorators_1.makeDecorator(metadata_1.InjectableMetadata);
export var Injectable = makeDecorator(InjectableMetadata);
/**

@@ -38,3 +37,3 @@ * Factory for creating {@link SelfMetadata}.

*/
exports.Self = decorators_1.makeParamDecorator(metadata_1.SelfMetadata);
export var Self = makeParamDecorator(SelfMetadata);
/**

@@ -45,3 +44,3 @@ * Factory for creating {@link HostMetadata}.

*/
exports.Host = decorators_1.makeParamDecorator(metadata_1.HostMetadata);
export var Host = makeParamDecorator(HostMetadata);
/**

@@ -52,3 +51,3 @@ * Factory for creating {@link SkipSelfMetadata}.

*/
exports.SkipSelf = decorators_1.makeParamDecorator(metadata_1.SkipSelfMetadata);
export var SkipSelf = makeParamDecorator(SkipSelfMetadata);
//# sourceMappingURL=decorators.js.map

@@ -0,10 +1,3 @@

import { Type } from '../type';
/**
* @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 { Type } from '../facade/lang';
/**
* An interface that a function passed into {@link forwardRef} has to implement.

@@ -14,3 +7,3 @@ *

*
* {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref_fn'}
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
* @experimental

@@ -30,6 +23,6 @@ */

* ### Example
* {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref'}
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
* @experimental
*/
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type;
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
/**

@@ -42,7 +35,3 @@ * Lazily retrieves the reference value from a forwardRef.

*
* ```typescript
* var ref = forwardRef(() => "refValue");
* expect(resolveForwardRef(ref)).toEqual("refValue");
* expect(resolveForwardRef("regularValue")).toEqual("regularValue");
* ```
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
*

@@ -49,0 +38,0 @@ * See: {@link forwardRef}

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
import { isFunction, stringify } from '../facade/lang';
/**

@@ -20,11 +19,10 @@ * Allows to refer to references which are not yet defined.

* ### Example
* {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref'}
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
* @experimental
*/
function forwardRef(forwardRefFn) {
export function forwardRef(forwardRefFn) {
forwardRefFn.__forward_ref__ = forwardRef;
forwardRefFn.toString = function () { return lang_1.stringify(this()); };
forwardRefFn.toString = function () { return stringify(this()); };
return forwardRefFn;
}
exports.forwardRef = forwardRef;
/**

@@ -37,7 +35,3 @@ * Lazily retrieves the reference value from a forwardRef.

*
* ```typescript
* var ref = forwardRef(() => "refValue");
* expect(resolveForwardRef(ref)).toEqual("refValue");
* expect(resolveForwardRef("regularValue")).toEqual("regularValue");
* ```
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
*

@@ -47,4 +41,4 @@ * See: {@link forwardRef}

*/
function resolveForwardRef(type) {
if (lang_1.isFunction(type) && type.hasOwnProperty('__forward_ref__') &&
export function resolveForwardRef(type) {
if (isFunction(type) && type.hasOwnProperty('__forward_ref__') &&
type.__forward_ref__ === forwardRef) {

@@ -57,3 +51,2 @@ return type();

}
exports.resolveForwardRef = resolveForwardRef;
//# sourceMappingURL=forward_ref.js.map

@@ -8,7 +8,6 @@ /**

*/
"use strict";
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
import { unimplemented } from '../facade/errors';
import { stringify } from '../facade/lang';
var _THROW_IF_NOT_FOUND = new Object();
exports.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
export var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
var _NullInjector = (function () {

@@ -20,3 +19,3 @@ function _NullInjector() {

if (notFoundValue === _THROW_IF_NOT_FOUND) {
throw new exceptions_1.BaseException("No provider for " + lang_1.stringify(token) + "!");
throw new Error("No provider for " + stringify(token) + "!");
}

@@ -30,3 +29,3 @@ return notFoundValue;

*/
var Injector = (function () {
export var Injector = (function () {
function Injector() {

@@ -58,3 +57,3 @@ }

*/
Injector.prototype.get = function (token, notFoundValue) { return exceptions_1.unimplemented(); };
Injector.prototype.get = function (token, notFoundValue) { return unimplemented(); };
Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;

@@ -64,3 +63,2 @@ Injector.NULL = new _NullInjector();

}());
exports.Injector = Injector;
//# sourceMappingURL=injector.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"THROW_IF_NOT_FOUND":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":5,"context":{"name":"_THROW_IF_NOT_FOUND"}}}}
{"__symbolic":"module","version":1,"metadata":{"THROW_IF_NOT_FOUND":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"Object"}}}}

@@ -225,4 +225,2 @@ /**

* }
*
* bootstrap(App);
*```

@@ -229,0 +227,0 @@ * @stable

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
import { stringify } from '../facade/lang';
/**

@@ -52,10 +51,9 @@ * A parameter metadata that specifies a dependency.

*/
var InjectMetadata = (function () {
export var InjectMetadata = (function () {
function InjectMetadata(token) {
this.token = token;
}
InjectMetadata.prototype.toString = function () { return "@Inject(" + lang_1.stringify(this.token) + ")"; };
InjectMetadata.prototype.toString = function () { return "@Inject(" + stringify(this.token) + ")"; };
return InjectMetadata;
}());
exports.InjectMetadata = InjectMetadata;
/**

@@ -83,3 +81,3 @@ * A parameter metadata that marks a dependency as optional. {@link Injector} provides `null` if

*/
var OptionalMetadata = (function () {
export var OptionalMetadata = (function () {
function OptionalMetadata() {

@@ -90,3 +88,2 @@ }

}());
exports.OptionalMetadata = OptionalMetadata;
/**

@@ -97,3 +94,3 @@ * `DependencyMetadata` is used by the framework to extend DI.

*/
var DependencyMetadata = (function () {
export var DependencyMetadata = (function () {
function DependencyMetadata() {

@@ -108,3 +105,2 @@ }

}());
exports.DependencyMetadata = DependencyMetadata;
/**

@@ -142,3 +138,3 @@ * A marker metadata that marks a class as available to {@link Injector} for creation.

*/
var InjectableMetadata = (function () {
export var InjectableMetadata = (function () {
function InjectableMetadata() {

@@ -148,3 +144,2 @@ }

}());
exports.InjectableMetadata = InjectableMetadata;
/**

@@ -178,3 +173,3 @@ * Specifies that an {@link Injector} should retrieve a dependency only from itself.

*/
var SelfMetadata = (function () {
export var SelfMetadata = (function () {
function SelfMetadata() {

@@ -185,3 +180,2 @@ }

}());
exports.SelfMetadata = SelfMetadata;
/**

@@ -213,3 +207,3 @@ * Specifies that the dependency resolution should start from the parent injector.

*/
var SkipSelfMetadata = (function () {
export var SkipSelfMetadata = (function () {
function SkipSelfMetadata() {

@@ -220,3 +214,2 @@ }

}());
exports.SkipSelfMetadata = SkipSelfMetadata;
/**

@@ -272,8 +265,6 @@ * Specifies that an injector should retrieve a dependency from any injector until reaching the

* }
*
* bootstrap(App);
*```
* @stable
*/
var HostMetadata = (function () {
export var HostMetadata = (function () {
function HostMetadata() {

@@ -284,3 +275,2 @@ }

}());
exports.HostMetadata = HostMetadata;
//# sourceMappingURL=metadata.js.map

@@ -8,5 +8,27 @@ /**

*/
"use strict";
var decorators_1 = require('./decorators'); // so that metadata is gathered for this class
var OpaqueToken = (function () {
import { Injectable } from './decorators';
/**
* Creates a token that can be used in a DI Provider.
*
* ### Example ([live demo](http://plnkr.co/edit/Ys9ezXpj2Mnoy3Uc8KBp?p=preview))
*
* ```typescript
* var t = new OpaqueToken("value");
*
* var injector = Injector.resolveAndCreate([
* {provide: t, useValue: "bindingValue"}
* ]);
*
* expect(injector.get(t)).toEqual("bindingValue");
* ```
*
* Using an `OpaqueToken` is preferable to using strings as tokens because of possible collisions
* caused by multiple providers using the same string as two different tokens.
*
* Using an `OpaqueToken` is preferable to using an `Object` as tokens because it provides better
* error messages.
* @stable
*/
// so that metadata is gathered for this class
export var OpaqueToken = (function () {
function OpaqueToken(_desc) {

@@ -16,5 +38,4 @@ this._desc = _desc;

OpaqueToken.prototype.toString = function () { return "Token " + this._desc; };
/** @nocollapse */
OpaqueToken.decorators = [
{ type: decorators_1.Injectable },
{ type: Injectable },
];

@@ -27,3 +48,2 @@ /** @nocollapse */

}());
exports.OpaqueToken = OpaqueToken;
//# sourceMappingURL=opaque_token.js.map

@@ -1,338 +0,333 @@

import { Type } from '../facade/lang';
/**
* Describes how the {@link Injector} should instantiate a given token.
* @license
* Copyright Google Inc. All Rights Reserved.
*
* See {@link provide}.
* 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 { Type } from '../type';
/**
* Configures the {@link Injector} to return an instance of `Type` when `Type' is used as token.
*
* ### Example ([live demo](http://plnkr.co/edit/GNAyj6K6PfYg2NBzgwZ5?p%3Dpreview&p=preview))
* Create an instance by invoking the `new` operator and supplying additional arguments.
* This form is a short form of `TypeProvider`;
*
* ### Example
* ```javascript
* var injector = Injector.resolveAndCreate([
* new Provider("message", { useValue: 'Hello' })
* @Injectable()
* class Greeting {
* text: 'Hello';
* }
*
* @Injectable()
* class MyClass {
* greeting:string;
* constructor(greeting: Greeting) {
* this.greeting = greeting.text;
* }
* }
*
* const injector = Injector.resolveAndCreate([
* Greeting, // Shorthand for { provide: Greeting, useClass: Greeting }
* MyClass // Shorthand for { provide: MyClass, useClass: MyClass }
* ]);
*
* expect(injector.get("message")).toEqual('Hello');
* const myClass: MyClass = injector.get(MyClass);
* expect(myClass.greeting).toEqual('Hello');
* ```
* @deprecated
*
* @stable
*/
export declare class Provider {
export interface TypeProvider extends Type<any> {
}
/**
* Configures the {@link Injector} to return a value for a token.
*
* ### Example
* const injector = Injector.resolveAndCreate([
* {provide: String, useValue: 'Hello'}
* ]);
*
* expect(injector.get(String)).toEqual('Hello');
* ```
* @stable
*/
export interface ValueProvider {
/**
* Token used when retrieving this provider. Usually, it is a type {@link Type}.
* An injection token. (Typically an instance of `Type` or `OpaqueToken`, but can be `any`).
*/
token: any;
provide: any;
/**
* Binds a DI token to an implementation class.
*
* ### Example ([live demo](http://plnkr.co/edit/RSTG86qgmoxCyj9SWPwY?p=preview))
*
* Because `useExisting` and `useClass` are often confused, the example contains
* both use cases for easy comparison.
*
* ```typescript
* class Vehicle {}
*
* class Car extends Vehicle {}
*
* var injectorClass = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useClass: Car }
* ]);
* var injectorAlias = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useExisting: Car }
* ]);
*
* expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
* expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
*
* expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
* expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
* ```
* The value to inject.
*/
useClass: Type;
useValue: any;
/**
* Binds a DI token to a value.
* If true, than injector returns an array of instances. This is useful to allow multiple
* providers spread across many files to provide configuration information to a common token.
*
* ### Example ([live demo](http://plnkr.co/edit/UFVsMVQIDe7l4waWziES?p=preview))
*
* ### Example
* ```javascript
* var injector = Injector.resolveAndCreate([
* new Provider("message", { useValue: 'Hello' })
* ]);
* var locale = new OpaqueToken('local');
*
* expect(injector.get("message")).toEqual('Hello');
* ```
*/
useValue: any;
/**
* Binds a DI token to an existing token.
*
* {@link Injector} returns the same instance as if the provided token was used.
* This is in contrast to `useClass` where a separate instance of `useClass` is returned.
*
* ### Example ([live demo](http://plnkr.co/edit/QsatsOJJ6P8T2fMe9gr8?p=preview))
*
* Because `useExisting` and `useClass` are often confused the example contains
* both use cases for easy comparison.
*
* ```typescript
* class Vehicle {}
*
* class Car extends Vehicle {}
*
* var injectorAlias = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useExisting: Car }
* const injector = Injector.resolveAndCreate([
* { provide: locale, useValue: 'en' },
* { provide: locale, useValue: 'sk' },
* ]);
* var injectorClass = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useClass: Car }
* ]);
*
* expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
* expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
*
* expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
* expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
* const locales: string[] = injector.get(locale);
* expect(locales).toEqual(['en', 'sk']);
* ```
*/
useExisting: any;
multi?: boolean;
}
/**
* Configures the {@link Injector} to return an instance of `useClass` for a token.
*
* ### Example
* ```javascript
* abstract class Shape {
* name: string;
* }
*
* class Square extends Shape {
* name = 'square';
* }
*
* const injector = Injector.resolveAndCreate([
* {provide: Shape, useClass: Square}
* ]);
*
* const shape: Shape = injector.get(Shape);
* expect(shape.name).toEqual('square');
* expect(shape instanceof Square).toBe(true);
* ```
*
* Note that following is not equal:
* ```javascript
* class Greeting {
* salutation = 'Hello';
* }
*
* class FormalGreeting extends Greeting {
* salutation = 'Greetings';
* }
*
* const injector = Injector.resolveAndCreate([
* FormalGreeting,
* {provide: Greeting, useClass: FormalGreeting}
* ]);
*
* // The injector returns different instances.
* // See: {provide: ?, useExisting: ?} if you want the same instance.
* expect(injector.get(FormalGreeting)).not.toBe(injector.get(Greeting));
* ```
*
* @stable
*/
export interface ClassProvider {
/**
* Binds a DI token to a function which computes the value.
*
* ### Example ([live demo](http://plnkr.co/edit/Scoxy0pJNqKGAPZY1VVC?p=preview))
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* {provide: Number, useFactory: () => { return 1+2; }},
* new Provider(String, { useFactory: (value) => { return "Value: " + value; },
* deps: [Number] })
* ]);
*
* expect(injector.get(Number)).toEqual(3);
* expect(injector.get(String)).toEqual('Value: 3');
* ```
*
* Used in conjunction with dependencies.
* An injection token. (Typically an instance of `Type` or `OpaqueToken`, but can be `any`).
*/
useFactory: Function;
provide: any;
/**
* Specifies a set of dependencies
* (as `token`s) which should be injected into the factory function.
*
* ### Example ([live demo](http://plnkr.co/edit/Scoxy0pJNqKGAPZY1VVC?p=preview))
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* {provide: Number, useFactory: () => { return 1+2; }},
* new Provider(String, { useFactory: (value) => { return "Value: " + value; },
* deps: [Number] })
* ]);
*
* expect(injector.get(Number)).toEqual(3);
* expect(injector.get(String)).toEqual('Value: 3');
* ```
*
* Used in conjunction with `useFactory`.
* Class to instantiate for the `token`.
*/
dependencies: Object[];
constructor(token: any, {useClass, useValue, useExisting, useFactory, deps, multi}: {
useClass?: Type;
useValue?: any;
useExisting?: any;
useFactory?: Function;
deps?: Object[];
multi?: boolean;
});
useClass: Type<any>;
/**
* Creates multiple providers matching the same token (a multi-provider).
* If true, than injector returns an array of instances. This is useful to allow multiple
* providers spread across many files to provide configuration information to a common token.
*
* Multi-providers are used for creating pluggable service, where the system comes
* with some default providers, and the user can register additional providers.
* The combination of the default providers and the additional providers will be
* used to drive the behavior of the system.
*
* ### Example
* ```javascript
* abstract class Locale {
* name: string;
* };
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* new Provider("Strings", { useValue: "String1", multi: true}),
* new Provider("Strings", { useValue: "String2", multi: true})
* ]);
* @Injectable()
* class EnLocale extends Locale {
* name: 'en';
* };
*
* expect(injector.get("Strings")).toEqual(["String1", "String2"]);
* ```
* @Injectable()
* class SkLocale extends Locale {
* name: 'sk';
* };
*
* Multi-providers and regular providers cannot be mixed. The following
* will throw an exception:
* const injector = Injector.resolveAndCreate([
* { provide: Locale, useValue: EnLocale, multi: true },
* { provide: Locale, useValue: SkLocale, multi: true },
* ]);
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* new Provider("Strings", { useValue: "String1", multi: true }),
* new Provider("Strings", { useValue: "String2"})
* ]);
* const locales: Locale[] = injector.get(Locale);
* const localeNames: string[] = locals.map((l) => l.name);
* expect(localeNames).toEqual(['en', 'sk']);
* ```
*/
multi: boolean;
multi?: boolean;
}
/**
* See {@link Provider} instead.
* Configures the {@link Injector} to return a value of another `useExisting` token.
*
* @deprecated
* ### Example
* ```javascript
* class Greeting {
* salutation = 'Hello';
* }
*
* class FormalGreeting extends Greeting {
* salutation = 'Greetings';
* }
*
* const injector = Injector.resolveAndCreate([
* FormalGreeting,
* {provide: Greeting, useExisting: FormalGreeting}
* ]);
*
* expect(injector.get(Greeting).name).toEqual('Hello');
* expect(injector.get(FormalGreeting).name).toEqual('Hello');
* expect(injector.get(Salutation).name).toBe(injector.get(Greeting));
* ```
* @stable
*/
export declare class Binding extends Provider {
constructor(token: any, {toClass, toValue, toAlias, toFactory, deps, multi}: {
toClass?: Type;
toValue?: any;
toAlias?: any;
toFactory: Function;
deps?: Object[];
multi?: boolean;
});
export interface ExistingProvider {
/**
* @deprecated
* An injection token. (Typically an instance of `Type` or `OpaqueToken`, but can be `any`).
*/
toClass: Type;
provide: any;
/**
* @deprecated
* Existing `token` to return. (equivalent to `injector.get(useExisting)`)
*/
toAlias: any;
useExisting: any;
/**
* @deprecated
* If true, than injector returns an array of instances. This is useful to allow multiple
* providers spread across many files to provide configuration information to a common token.
*
* ### Example
* ```javascript
* abstract class Locale {
* name: string;
* };
*
* @Injectable()
* class EnLocale extends Locale {
* name: 'en';
* };
*
* @Injectable()
* class SkLocale extends Locale {
* name: 'sk';
* };
*
* const injector = Injector.resolveAndCreate([
* EnLocale,
* SkLocale
* { provide: Locale, useExisting: EnLocale, multi: true },
* { provide: Locale, useExisting: SkLocale, multi: true },
* ]);
*
* const locales: Locale[] = injector.get(Locale);
* const localeNames: string[] = locals.map((l) => l.name);
* expect(localeNames).toEqual(['en', 'sk']);
* ```
*/
toFactory: Function;
/**
* @deprecated
*/
toValue: any;
multi?: boolean;
}
/**
* Creates a {@link Provider}.
* Configures the {@link Injector} to return a value by invoking a `useFactory` function.
*
* To construct a {@link Provider}, bind a `token` to either a class, a value, a factory function,
* or
* to an existing `token`.
* See {@link ProviderBuilder} for more details.
* ### Example
* ```javascript
* const HASH = new OpaqueToken('hash');
*
* The `token` is most commonly a class or {@link OpaqueToken}.
* const injector = Injector.resolveAndCreate([
* {provide: Location, useValue: window.location},
* {provide: HASH, useFactory: (location: Location) => location.hash, deps: [Location]}
* ]);
*
* @deprecated
*
* // Assume location is: http://angular.io/#someLocation
* expect(injector.get(HASH)).toEqual('someLocation');
* ``
* @stable
*/
export declare function bind(token: any): ProviderBuilder;
/**
* Helper class for the {@link bind} function.
* @deprecated
*/
export declare class ProviderBuilder {
token: any;
constructor(token: any);
export interface FactoryProvider {
/**
* Binds a DI token to a class.
*
* ### Example ([live demo](http://plnkr.co/edit/ZpBCSYqv6e2ud5KXLdxQ?p=preview))
*
* Because `toAlias` and `toClass` are often confused, the example contains
* both use cases for easy comparison.
*
* ```typescript
* class Vehicle {}
*
* class Car extends Vehicle {}
*
* var injectorClass = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useClass: Car}
* ]);
* var injectorAlias = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useExisting: Car}
* ]);
*
* expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
* expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
*
* expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
* expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
* ```
* An injection token. (Typically an instance of `Type` or `OpaqueToken`, but can be `any`).
*/
toClass(type: Type): Provider;
provide: any;
/**
* Binds a DI token to a value.
*
* ### Example ([live demo](http://plnkr.co/edit/G024PFHmDL0cJFgfZK8O?p=preview))
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* {provide: 'message', useValue: 'Hello'}
* ]);
*
* expect(injector.get('message')).toEqual('Hello');
* ```
* A function to invoke to create a value for this `token`. The function is invoked with
* resolved values of `token`s in the `deps` field.
*/
toValue(value: any): Provider;
useFactory: Function;
/**
* Binds a DI token to an existing token.
*
* Angular will return the same instance as if the provided token was used. (This is
* in contrast to `useClass` where a separate instance of `useClass` will be returned.)
*
* ### Example ([live demo](http://plnkr.co/edit/uBaoF2pN5cfc5AfZapNw?p=preview))
*
* Because `toAlias` and `toClass` are often confused, the example contains
* both use cases for easy comparison.
*
* ```typescript
* class Vehicle {}
*
* class Car extends Vehicle {}
*
* var injectorAlias = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useExisting: Car}
* ]);
* var injectorClass = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useClass: Car})
* ]);
*
* expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
* expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
*
* expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
* expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
* ```
* A list of `token`s which need to be resolved by the injector. The list of values is than
* used as arguments to the `useFactory` function.
*/
toAlias(aliasToken: any): Provider;
deps?: any[];
/**
* Binds a DI token to a function which computes the value.
* If true, than injector returns an array of instances. This is useful to allow multiple
* providers spread across many files to provide configuration information to a common token.
*
* ### Example ([live demo](http://plnkr.co/edit/OejNIfTT3zb1iBxaIYOb?p=preview))
* ### Example
* ```javascript
* class Locale {
* constructor(public name: string) {}
* };
* const PRIMARY = new OpequeToken('primary');
* const SECONDARY = new OpequeToken('secondary');
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* {provide: Number, useFactory: () => { return 1+2; }},
* {provide: String, useFactory: (v) => { return "Value: " + v; }, deps: [Number]}
* const injector = Injector.resolveAndCreate([
* { provide: PRIMARY: useValue: 'en'},
* { provide: SECONDARY: useValue: 'sk'},
* { provide: Locale, useFactory: (n) => new Locale(n), deps: [PRIMARY], multi: true},
* { provide: Locale, useFactory: (n) => new Locale(n), deps: [SECONDARY], multi: true},
* ]);
*
* expect(injector.get(Number)).toEqual(3);
* expect(injector.get(String)).toEqual('Value: 3');
* const locales: Locale[] = injector.get(Locale);
* const localeNames: string[] = locals.map((l) => l.name);
* expect(localeNames).toEqual(['en', 'sk']);
* ```
*/
toFactory(factory: Function, dependencies?: any[]): Provider;
multi?: boolean;
}
/**
* Creates a {@link Provider}.
* Describes how the {@link Injector} should be configured.
*
* See {@link Provider} for more details.
* See {@link TypeProvider}, {@link ValueProvider}, {@link ClassProvider}, {@link ExistingProvider},
* {@link FactoryProvider}.
*
* <!-- TODO: improve the docs -->
* @deprecated
* ```javascript
* class Greeting {
* salutation = 'Hello';
* }
*
* class FormalGreeting extends Greeting {
* salutation = 'Greetings';
* }
*
* abstract class Operation {
* apply(a,b): any;
* }
*
* class AddOperation extends Operation {
* apply(a,b) { return a+b; }
* }
*
*
* const injector = Injector.resolveAndCreate([
* FormalGreeting,
* {provide: String, useValue: 'Hello World!'},
* {provide: Greeting, useExisting: FormalGreeting},
* {provide: Operation, useClass: AddOperation},
* {provide: Number, useFactory: (op) =>op.apply(1,2), deps: [Operation] }
* ]);
*
* expect(injector.get(FormalGreeting).name).toEqual('Greetings');
* expect(injector.get(String).name).toEqual('Hello World!');
* expect(injector.get(Greeting).name).toBe(injector.get(FormalGreeting));
* expect(injector.get(Number).toEqual(3);
* ```
* @stable
*/
export declare function provide(token: any, {useClass, useValue, useExisting, useFactory, deps, multi}: {
useClass?: Type;
useValue?: any;
useExisting?: any;
useFactory?: Function;
deps?: Object[];
multi?: boolean;
}): Provider;
export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[];

@@ -8,283 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
/**
* Describes how the {@link Injector} should instantiate a given token.
*
* See {@link provide}.
*
* ### Example ([live demo](http://plnkr.co/edit/GNAyj6K6PfYg2NBzgwZ5?p%3Dpreview&p=preview))
*
* ```javascript
* var injector = Injector.resolveAndCreate([
* new Provider("message", { useValue: 'Hello' })
* ]);
*
* expect(injector.get("message")).toEqual('Hello');
* ```
* @deprecated
*/
var Provider = (function () {
function Provider(token, _a) {
var useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi;
this.token = token;
this.useClass = useClass;
this.useValue = useValue;
this.useExisting = useExisting;
this.useFactory = useFactory;
this.dependencies = deps;
this._multi = multi;
}
Object.defineProperty(Provider.prototype, "multi", {
// TODO: Provide a full working example after alpha38 is released.
/**
* Creates multiple providers matching the same token (a multi-provider).
*
* Multi-providers are used for creating pluggable service, where the system comes
* with some default providers, and the user can register additional providers.
* The combination of the default providers and the additional providers will be
* used to drive the behavior of the system.
*
* ### Example
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* new Provider("Strings", { useValue: "String1", multi: true}),
* new Provider("Strings", { useValue: "String2", multi: true})
* ]);
*
* expect(injector.get("Strings")).toEqual(["String1", "String2"]);
* ```
*
* Multi-providers and regular providers cannot be mixed. The following
* will throw an exception:
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* new Provider("Strings", { useValue: "String1", multi: true }),
* new Provider("Strings", { useValue: "String2"})
* ]);
* ```
*/
get: function () { return lang_1.normalizeBool(this._multi); },
enumerable: true,
configurable: true
});
return Provider;
}());
exports.Provider = Provider;
/**
* See {@link Provider} instead.
*
* @deprecated
*/
var Binding = (function (_super) {
__extends(Binding, _super);
function Binding(token, _a) {
var toClass = _a.toClass, toValue = _a.toValue, toAlias = _a.toAlias, toFactory = _a.toFactory, deps = _a.deps, multi = _a.multi;
_super.call(this, token, {
useClass: toClass,
useValue: toValue,
useExisting: toAlias,
useFactory: toFactory,
deps: deps,
multi: multi
});
}
Object.defineProperty(Binding.prototype, "toClass", {
/**
* @deprecated
*/
get: function () { return this.useClass; },
enumerable: true,
configurable: true
});
Object.defineProperty(Binding.prototype, "toAlias", {
/**
* @deprecated
*/
get: function () { return this.useExisting; },
enumerable: true,
configurable: true
});
Object.defineProperty(Binding.prototype, "toFactory", {
/**
* @deprecated
*/
get: function () { return this.useFactory; },
enumerable: true,
configurable: true
});
Object.defineProperty(Binding.prototype, "toValue", {
/**
* @deprecated
*/
get: function () { return this.useValue; },
enumerable: true,
configurable: true
});
return Binding;
}(Provider));
exports.Binding = Binding;
/**
* Creates a {@link Provider}.
*
* To construct a {@link Provider}, bind a `token` to either a class, a value, a factory function,
* or
* to an existing `token`.
* See {@link ProviderBuilder} for more details.
*
* The `token` is most commonly a class or {@link OpaqueToken}.
*
* @deprecated
*/
function bind(token) {
return new ProviderBuilder(token);
}
exports.bind = bind;
/**
* Helper class for the {@link bind} function.
* @deprecated
*/
var ProviderBuilder = (function () {
function ProviderBuilder(token) {
this.token = token;
}
/**
* Binds a DI token to a class.
*
* ### Example ([live demo](http://plnkr.co/edit/ZpBCSYqv6e2ud5KXLdxQ?p=preview))
*
* Because `toAlias` and `toClass` are often confused, the example contains
* both use cases for easy comparison.
*
* ```typescript
* class Vehicle {}
*
* class Car extends Vehicle {}
*
* var injectorClass = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useClass: Car}
* ]);
* var injectorAlias = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useExisting: Car}
* ]);
*
* expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
* expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
*
* expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
* expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
* ```
*/
ProviderBuilder.prototype.toClass = function (type) {
if (!lang_1.isType(type)) {
throw new exceptions_1.BaseException("Trying to create a class provider but \"" + lang_1.stringify(type) + "\" is not a class!");
}
return new Provider(this.token, { useClass: type });
};
/**
* Binds a DI token to a value.
*
* ### Example ([live demo](http://plnkr.co/edit/G024PFHmDL0cJFgfZK8O?p=preview))
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* {provide: 'message', useValue: 'Hello'}
* ]);
*
* expect(injector.get('message')).toEqual('Hello');
* ```
*/
ProviderBuilder.prototype.toValue = function (value) { return new Provider(this.token, { useValue: value }); };
/**
* Binds a DI token to an existing token.
*
* Angular will return the same instance as if the provided token was used. (This is
* in contrast to `useClass` where a separate instance of `useClass` will be returned.)
*
* ### Example ([live demo](http://plnkr.co/edit/uBaoF2pN5cfc5AfZapNw?p=preview))
*
* Because `toAlias` and `toClass` are often confused, the example contains
* both use cases for easy comparison.
*
* ```typescript
* class Vehicle {}
*
* class Car extends Vehicle {}
*
* var injectorAlias = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useExisting: Car}
* ]);
* var injectorClass = Injector.resolveAndCreate([
* Car,
* {provide: Vehicle, useClass: Car})
* ]);
*
* expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
* expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
*
* expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
* expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
* ```
*/
ProviderBuilder.prototype.toAlias = function (aliasToken) {
if (lang_1.isBlank(aliasToken)) {
throw new exceptions_1.BaseException("Can not alias " + lang_1.stringify(this.token) + " to a blank value!");
}
return new Provider(this.token, { useExisting: aliasToken });
};
/**
* Binds a DI token to a function which computes the value.
*
* ### Example ([live demo](http://plnkr.co/edit/OejNIfTT3zb1iBxaIYOb?p=preview))
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* {provide: Number, useFactory: () => { return 1+2; }},
* {provide: String, useFactory: (v) => { return "Value: " + v; }, deps: [Number]}
* ]);
*
* expect(injector.get(Number)).toEqual(3);
* expect(injector.get(String)).toEqual('Value: 3');
* ```
*/
ProviderBuilder.prototype.toFactory = function (factory, dependencies) {
if (!lang_1.isFunction(factory)) {
throw new exceptions_1.BaseException("Trying to create a factory provider but \"" + lang_1.stringify(factory) + "\" is not a function!");
}
return new Provider(this.token, { useFactory: factory, deps: dependencies });
};
return ProviderBuilder;
}());
exports.ProviderBuilder = ProviderBuilder;
/**
* Creates a {@link Provider}.
*
* See {@link Provider} for more details.
*
* <!-- TODO: improve the docs -->
* @deprecated
*/
function provide(token, _a) {
var useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi;
return new Provider(token, {
useClass: useClass,
useValue: useValue,
useExisting: useExisting,
useFactory: useFactory,
deps: deps,
multi: multi
});
}
exports.provide = provide;
//# sourceMappingURL=provider.js.map

@@ -1,2 +0,1 @@

import { Type } from '../facade/lang';
import { Injector } from './injector';

@@ -154,5 +153,3 @@ import { Provider } from './provider';

*/
static resolve(providers: Array<Type | Provider | {
[k: string]: any;
} | any[]>): ResolvedReflectiveProvider[];
static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
/**

@@ -184,5 +181,3 @@ * Resolves an array of providers and creates an injector from those providers.

*/
static resolveAndCreate(providers: Array<Type | Provider | {
[k: string]: any;
} | any[]>, parent?: Injector): ReflectiveInjector;
static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
/**

@@ -213,6 +208,2 @@ * Creates an injector from previously resolved providers.

/**
* @deprecated
*/
static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
/**
* Parent of this injector.

@@ -259,5 +250,3 @@ *

*/
resolveAndCreateChild(providers: Array<Type | Provider | {
[k: string]: any;
} | any[]>): ReflectiveInjector;
resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
/**

@@ -313,3 +302,3 @@ * Creates a child injector from previously resolved providers.

*/
resolveAndInstantiate(provider: Type | Provider): any;
resolveAndInstantiate(provider: Provider): any;
/**

@@ -343,3 +332,2 @@ * Instantiates an object using a resolved provider in the context of the injector.

export declare class ReflectiveInjector_ implements ReflectiveInjector {
private _debugContext;
private _strategy;

@@ -349,9 +337,9 @@ /**

*/
constructor(_proto: any, _parent?: Injector, _debugContext?: Function);
constructor(_proto: any, _parent?: Injector);
get(token: any, notFoundValue?: any): any;
getAt(index: number): any;
parent: Injector;
resolveAndCreateChild(providers: Array<Type | Provider | any[]>): ReflectiveInjector;
resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
resolveAndInstantiate(provider: Type | Provider): any;
resolveAndInstantiate(provider: Provider): any;
instantiateResolved(provider: ResolvedReflectiveProvider): any;

@@ -358,0 +346,0 @@ private _instantiateProvider(provider);

@@ -8,10 +8,9 @@ /**

*/
"use strict";
var collection_1 = require('../facade/collection');
var exceptions_1 = require('../facade/exceptions');
var injector_1 = require('./injector');
var metadata_1 = require('./metadata');
var reflective_exceptions_1 = require('./reflective_exceptions');
var reflective_key_1 = require('./reflective_key');
var reflective_provider_1 = require('./reflective_provider');
import { ListWrapper } from '../facade/collection';
import { unimplemented } from '../facade/errors';
import { Injector, THROW_IF_NOT_FOUND } from './injector';
import { SelfMetadata, SkipSelfMetadata } from './metadata';
import { AbstractProviderError, CyclicDependencyError, InstantiationError, NoProviderError, OutOfBoundsError } from './reflective_errors';
import { ReflectiveKey } from './reflective_key';
import { resolveReflectiveProviders } from './reflective_provider';
var __unused; // avoid unused import when Type union types are erased

@@ -21,3 +20,3 @@ // Threshold for the dynamic version

var UNDEFINED = new Object();
var ReflectiveProtoInjectorInlineStrategy = (function () {
export var ReflectiveProtoInjectorInlineStrategy = (function () {
function ReflectiveProtoInjectorInlineStrategy(protoEI, providers) {

@@ -107,3 +106,3 @@ this.provider0 = null;

return this.provider9;
throw new reflective_exceptions_1.OutOfBoundsError(index);
throw new OutOfBoundsError(index);
};

@@ -115,8 +114,7 @@ ReflectiveProtoInjectorInlineStrategy.prototype.createInjectorStrategy = function (injector) {

}());
exports.ReflectiveProtoInjectorInlineStrategy = ReflectiveProtoInjectorInlineStrategy;
var ReflectiveProtoInjectorDynamicStrategy = (function () {
export var ReflectiveProtoInjectorDynamicStrategy = (function () {
function ReflectiveProtoInjectorDynamicStrategy(protoInj, providers) {
this.providers = providers;
var len = providers.length;
this.keyIds = collection_1.ListWrapper.createFixedSize(len);
this.keyIds = ListWrapper.createFixedSize(len);
for (var i = 0; i < len; i++) {

@@ -128,3 +126,3 @@ this.keyIds[i] = providers[i].key.id;

if (index < 0 || index >= this.providers.length) {
throw new reflective_exceptions_1.OutOfBoundsError(index);
throw new OutOfBoundsError(index);
}

@@ -138,4 +136,3 @@ return this.providers[index];

}());
exports.ReflectiveProtoInjectorDynamicStrategy = ReflectiveProtoInjectorDynamicStrategy;
var ReflectiveProtoInjector = (function () {
export var ReflectiveProtoInjector = (function () {
function ReflectiveProtoInjector(providers) {

@@ -155,4 +152,3 @@ this.numberOfProviders = providers.length;

}());
exports.ReflectiveProtoInjector = ReflectiveProtoInjector;
var ReflectiveInjectorInlineStrategy = (function () {
export var ReflectiveInjectorInlineStrategy = (function () {
function ReflectiveInjectorInlineStrategy(injector, protoStrategy) {

@@ -262,3 +258,3 @@ this.injector = injector;

return this.obj9;
throw new reflective_exceptions_1.OutOfBoundsError(index);
throw new OutOfBoundsError(index);
};

@@ -268,9 +264,8 @@ ReflectiveInjectorInlineStrategy.prototype.getMaxNumberOfObjects = function () { return _MAX_CONSTRUCTION_COUNTER; };

}());
exports.ReflectiveInjectorInlineStrategy = ReflectiveInjectorInlineStrategy;
var ReflectiveInjectorDynamicStrategy = (function () {
export var ReflectiveInjectorDynamicStrategy = (function () {
function ReflectiveInjectorDynamicStrategy(protoStrategy, injector) {
this.protoStrategy = protoStrategy;
this.injector = injector;
this.objs = collection_1.ListWrapper.createFixedSize(protoStrategy.providers.length);
collection_1.ListWrapper.fill(this.objs, UNDEFINED);
this.objs = ListWrapper.createFixedSize(protoStrategy.providers.length);
ListWrapper.fill(this.objs, UNDEFINED);
}

@@ -295,3 +290,3 @@ ReflectiveInjectorDynamicStrategy.prototype.resetConstructionCounter = function () { this.injector._constructionCounter = 0; };

if (index < 0 || index >= this.objs.length) {
throw new reflective_exceptions_1.OutOfBoundsError(index);
throw new OutOfBoundsError(index);
}

@@ -303,3 +298,2 @@ return this.objs[index];

}());
exports.ReflectiveInjectorDynamicStrategy = ReflectiveInjectorDynamicStrategy;
/**

@@ -340,3 +334,3 @@ * A ReflectiveDependency injection container used for instantiating objects and resolving

*/
var ReflectiveInjector = (function () {
export var ReflectiveInjector = (function () {
function ReflectiveInjector() {

@@ -378,3 +372,3 @@ }

ReflectiveInjector.resolve = function (providers) {
return reflective_provider_1.resolveReflectiveProviders(providers);
return resolveReflectiveProviders(providers);
};

@@ -439,8 +433,2 @@ /**

};
/**
* @deprecated
*/
ReflectiveInjector.fromResolvedBindings = function (providers) {
return ReflectiveInjector.fromResolvedProviders(providers);
};
Object.defineProperty(ReflectiveInjector.prototype, "parent", {

@@ -461,3 +449,3 @@ /**

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -467,6 +455,2 @@ configurable: true

/**
* @internal
*/
ReflectiveInjector.prototype.debugContext = function () { return null; };
/**
* Resolves an array of providers and creates a child injector from those providers.

@@ -498,5 +482,3 @@ *

*/
ReflectiveInjector.prototype.resolveAndCreateChild = function (providers) {
return exceptions_1.unimplemented();
};
ReflectiveInjector.prototype.resolveAndCreateChild = function (providers) { return unimplemented(); };
/**

@@ -528,3 +510,3 @@ * Creates a child injector from previously resolved providers.

ReflectiveInjector.prototype.createChildFromResolved = function (providers) {
return exceptions_1.unimplemented();
return unimplemented();
};

@@ -555,3 +537,3 @@ /**

*/
ReflectiveInjector.prototype.resolveAndInstantiate = function (provider) { return exceptions_1.unimplemented(); };
ReflectiveInjector.prototype.resolveAndInstantiate = function (provider) { return unimplemented(); };
/**

@@ -581,14 +563,11 @@ * Instantiates an object using a resolved provider in the context of the injector.

*/
ReflectiveInjector.prototype.instantiateResolved = function (provider) { return exceptions_1.unimplemented(); };
ReflectiveInjector.prototype.instantiateResolved = function (provider) { return unimplemented(); };
return ReflectiveInjector;
}());
exports.ReflectiveInjector = ReflectiveInjector;
var ReflectiveInjector_ = (function () {
export var ReflectiveInjector_ = (function () {
/**
* Private
*/
function ReflectiveInjector_(_proto /* ProtoInjector */, _parent, _debugContext) {
function ReflectiveInjector_(_proto /* ProtoInjector */, _parent) {
if (_parent === void 0) { _parent = null; }
if (_debugContext === void 0) { _debugContext = null; }
this._debugContext = _debugContext;
/** @internal */

@@ -600,9 +579,5 @@ this._constructionCounter = 0;

}
/**
* @internal
*/
ReflectiveInjector_.prototype.debugContext = function () { return this._debugContext(); };
ReflectiveInjector_.prototype.get = function (token, notFoundValue) {
if (notFoundValue === void 0) { notFoundValue = injector_1.THROW_IF_NOT_FOUND; }
return this._getByKey(reflective_key_1.ReflectiveKey.get(token), null, null, notFoundValue);
if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
return this._getByKey(ReflectiveKey.get(token), null, null, notFoundValue);
};

@@ -644,3 +619,3 @@ ReflectiveInjector_.prototype.getAt = function (index) { return this._strategy.getObjAtIndex(index); };

if (this._constructionCounter++ > this._strategy.getMaxNumberOfObjects()) {
throw new reflective_exceptions_1.CyclicDependencyError(this, provider.key);
throw new CyclicDependencyError(this, provider.key);
}

@@ -651,3 +626,3 @@ return this._instantiateProvider(provider);

if (provider.multiProvider) {
var res = collection_1.ListWrapper.createFixedSize(provider.resolvedFactories.length);
var res = ListWrapper.createFixedSize(provider.resolvedFactories.length);
for (var i = 0; i < provider.resolvedFactories.length; ++i) {

@@ -709,3 +684,3 @@ res[i] = this._instantiate(provider, provider.resolvedFactories[i]);

catch (e) {
if (e instanceof reflective_exceptions_1.AbstractProviderError || e instanceof reflective_exceptions_1.InstantiationError) {
if (e instanceof AbstractProviderError || e instanceof InstantiationError) {
e.addKey(this, provider.key);

@@ -782,7 +757,7 @@ }

default:
throw new exceptions_1.BaseException("Cannot instantiate '" + provider.key.displayName + "' because it has more than 20 dependencies");
throw new Error("Cannot instantiate '" + provider.key.displayName + "' because it has more than 20 dependencies");
}
}
catch (e) {
throw new reflective_exceptions_1.InstantiationError(this, e, e.stack, provider.key);
throw new InstantiationError(this, e, e.stack, provider.key);
}

@@ -792,3 +767,3 @@ return obj;

ReflectiveInjector_.prototype._getByReflectiveDependency = function (provider, dep) {
return this._getByKey(dep.key, dep.lowerBoundVisibility, dep.upperBoundVisibility, dep.optional ? null : injector_1.THROW_IF_NOT_FOUND);
return this._getByKey(dep.key, dep.lowerBoundVisibility, dep.upperBoundVisibility, dep.optional ? null : THROW_IF_NOT_FOUND);
};

@@ -799,3 +774,3 @@ ReflectiveInjector_.prototype._getByKey = function (key, lowerBoundVisibility, upperBoundVisibility, notFoundValue) {

}
if (upperBoundVisibility instanceof metadata_1.SelfMetadata) {
if (upperBoundVisibility instanceof SelfMetadata) {
return this._getByKeySelf(key, notFoundValue);

@@ -809,7 +784,7 @@ }

ReflectiveInjector_.prototype._throwOrNull = function (key, notFoundValue) {
if (notFoundValue !== injector_1.THROW_IF_NOT_FOUND) {
if (notFoundValue !== THROW_IF_NOT_FOUND) {
return notFoundValue;
}
else {
throw new reflective_exceptions_1.NoProviderError(this, key);
throw new NoProviderError(this, key);
}

@@ -825,3 +800,3 @@ };

var inj;
if (lowerBoundVisibility instanceof metadata_1.SkipSelfMetadata) {
if (lowerBoundVisibility instanceof SkipSelfMetadata) {
inj = this._parent;

@@ -858,4 +833,3 @@ }

}());
exports.ReflectiveInjector_ = ReflectiveInjector_;
var INJECTOR_KEY = reflective_key_1.ReflectiveKey.get(injector_1.Injector);
var INJECTOR_KEY = ReflectiveKey.get(Injector);
function _mapProviders(injector, fn) {

@@ -862,0 +836,0 @@ var res = new Array(injector._proto.numberOfProviders);

@@ -8,6 +8,4 @@ /**

*/
"use strict";
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var forward_ref_1 = require('./forward_ref');
import { isBlank, stringify } from '../facade/lang';
import { resolveForwardRef } from './forward_ref';
/**

@@ -29,3 +27,3 @@ * A unique object used for retrieving items from the {@link ReflectiveInjector}.

*/
var ReflectiveKey = (function () {
export var ReflectiveKey = (function () {
/**

@@ -37,4 +35,4 @@ * Private

this.id = id;
if (lang_1.isBlank(token)) {
throw new exceptions_1.BaseException('Token must be defined!');
if (isBlank(token)) {
throw new Error('Token must be defined!');
}

@@ -46,3 +44,3 @@ }

*/
get: function () { return lang_1.stringify(this.token); },
get: function () { return stringify(this.token); },
enumerable: true,

@@ -55,3 +53,3 @@ configurable: true

ReflectiveKey.get = function (token) {
return _globalKeyRegistry.get(forward_ref_1.resolveForwardRef(token));
return _globalKeyRegistry.get(resolveForwardRef(token));
};

@@ -68,7 +66,6 @@ Object.defineProperty(ReflectiveKey, "numberOfKeys", {

}());
exports.ReflectiveKey = ReflectiveKey;
/**
* @internal
*/
var KeyRegistry = (function () {
export var KeyRegistry = (function () {
function KeyRegistry() {

@@ -94,4 +91,3 @@ this._allKeys = new Map();

}());
exports.KeyRegistry = KeyRegistry;
var _globalKeyRegistry = new KeyRegistry();
//# sourceMappingURL=reflective_key.js.map

@@ -1,2 +0,1 @@

import { Type } from '../facade/lang';
import { Provider } from './provider';

@@ -27,3 +26,3 @@ import { ReflectiveKey } from './reflective_key';

* ```typescript
* var resolvedProviders = Injector.resolve([new Provider('message', {useValue: 'Hello'})]);
* var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
* var injector = Injector.fromResolvedProviders(resolvedProviders);

@@ -38,3 +37,3 @@ *

/**
* A key, usually a `Type`.
* A key, usually a `Type<any>`.
*/

@@ -51,10 +50,3 @@ key: ReflectiveKey;

}
/**
* See {@link ResolvedReflectiveProvider} instead.
*
* @deprecated
*/
export interface ResolvedReflectiveBinding extends ResolvedReflectiveProvider {
}
export declare class ResolvedReflectiveProvider_ implements ResolvedReflectiveBinding {
export declare class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider {
key: ReflectiveKey;

@@ -67,3 +59,4 @@ resolvedFactories: ResolvedReflectiveFactory[];

/**
* An internal resolved representation of a factory function created by resolving {@link Provider}.
* An internal resolved representation of a factory function created by resolving {@link
* Provider}.
* @experimental

@@ -91,18 +84,5 @@ */

/**
* Resolve a single provider.
*/
export declare function resolveReflectiveFactory(provider: Provider): ResolvedReflectiveFactory;
/**
* Converts the {@link Provider} into {@link ResolvedProvider}.
*
* {@link Injector} internally only uses {@link ResolvedProvider}, {@link Provider} contains
* convenience provider syntax.
*/
export declare function resolveReflectiveProvider(provider: Provider): ResolvedReflectiveProvider;
/**
* Resolve a list of Providers.
*/
export declare function resolveReflectiveProviders(providers: Array<Type | Provider | {
[k: string]: any;
} | any[]>): ResolvedReflectiveProvider[];
export declare function resolveReflectiveProviders(providers: Provider[]): ResolvedReflectiveProvider[];
/**

@@ -109,0 +89,0 @@ * Merges a list of ResolvedProviders into a list where

@@ -8,12 +8,10 @@ /**

*/
"use strict";
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var reflection_1 = require('../reflection/reflection');
var forward_ref_1 = require('./forward_ref');
var metadata_1 = require('./metadata');
var provider_1 = require('./provider');
var provider_util_1 = require('./provider_util');
var reflective_exceptions_1 = require('./reflective_exceptions');
var reflective_key_1 = require('./reflective_key');
import { ListWrapper, MapWrapper } from '../facade/collection';
import { isArray, isBlank, isPresent } from '../facade/lang';
import { reflector } from '../reflection/reflection';
import { Type } from '../type';
import { resolveForwardRef } from './forward_ref';
import { DependencyMetadata, HostMetadata, InjectMetadata, OptionalMetadata, SelfMetadata, SkipSelfMetadata } from './metadata';
import { InvalidProviderError, MixingMultiProvidersWithRegularProvidersError, NoAnnotationError } from './reflective_errors';
import { ReflectiveKey } from './reflective_key';
/**

@@ -23,3 +21,3 @@ * `Dependency` is used by the framework to extend DI.

*/
var ReflectiveDependency = (function () {
export var ReflectiveDependency = (function () {
function ReflectiveDependency(key, optional, lowerBoundVisibility, upperBoundVisibility, properties) {

@@ -37,5 +35,4 @@ this.key = key;

}());
exports.ReflectiveDependency = ReflectiveDependency;
var _EMPTY_LIST = [];
var ResolvedReflectiveProvider_ = (function () {
export var ResolvedReflectiveProvider_ = (function () {
function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {

@@ -53,8 +50,8 @@ this.key = key;

}());
exports.ResolvedReflectiveProvider_ = ResolvedReflectiveProvider_;
/**
* An internal resolved representation of a factory function created by resolving {@link Provider}.
* An internal resolved representation of a factory function created by resolving {@link
* Provider}.
* @experimental
*/
var ResolvedReflectiveFactory = (function () {
export var ResolvedReflectiveFactory = (function () {
function ResolvedReflectiveFactory(

@@ -74,3 +71,2 @@ /**

}());
exports.ResolvedReflectiveFactory = ResolvedReflectiveFactory;
/**

@@ -82,14 +78,14 @@ * Resolve a single provider.

var resolvedDeps;
if (lang_1.isPresent(provider.useClass)) {
var useClass = forward_ref_1.resolveForwardRef(provider.useClass);
factoryFn = reflection_1.reflector.factory(useClass);
if (isPresent(provider.useClass)) {
var useClass = resolveForwardRef(provider.useClass);
factoryFn = reflector.factory(useClass);
resolvedDeps = _dependenciesFor(useClass);
}
else if (lang_1.isPresent(provider.useExisting)) {
else if (isPresent(provider.useExisting)) {
factoryFn = function (aliasInstance) { return aliasInstance; };
resolvedDeps = [ReflectiveDependency.fromKey(reflective_key_1.ReflectiveKey.get(provider.useExisting))];
resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];
}
else if (lang_1.isPresent(provider.useFactory)) {
else if (isPresent(provider.useFactory)) {
factoryFn = provider.useFactory;
resolvedDeps = constructDependencies(provider.useFactory, provider.dependencies);
resolvedDeps = constructDependencies(provider.useFactory, provider.deps);
}

@@ -102,3 +98,2 @@ else {

}
exports.resolveReflectiveFactory = resolveReflectiveFactory;
/**

@@ -111,14 +106,12 @@ * Converts the {@link Provider} into {@link ResolvedProvider}.

function resolveReflectiveProvider(provider) {
return new ResolvedReflectiveProvider_(reflective_key_1.ReflectiveKey.get(provider.token), [resolveReflectiveFactory(provider)], provider.multi);
return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi);
}
exports.resolveReflectiveProvider = resolveReflectiveProvider;
/**
* Resolve a list of Providers.
*/
function resolveReflectiveProviders(providers) {
export function resolveReflectiveProviders(providers) {
var normalized = _normalizeProviders(providers, []);
var resolved = normalized.map(resolveReflectiveProvider);
return collection_1.MapWrapper.values(mergeResolvedReflectiveProviders(resolved, new Map()));
return MapWrapper.values(mergeResolvedReflectiveProviders(resolved, new Map()));
}
exports.resolveReflectiveProviders = resolveReflectiveProviders;
/**

@@ -129,9 +122,9 @@ * Merges a list of ResolvedProviders into a list where

*/
function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {
export function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {
for (var i = 0; i < providers.length; i++) {
var provider = providers[i];
var existing = normalizedProvidersMap.get(provider.key.id);
if (lang_1.isPresent(existing)) {
if (isPresent(existing)) {
if (provider.multiProvider !== existing.multiProvider) {
throw new reflective_exceptions_1.MixingMultiProvidersWithRegularProvidersError(existing, provider);
throw new MixingMultiProvidersWithRegularProvidersError(existing, provider);
}

@@ -150,3 +143,3 @@ if (provider.multiProvider) {

if (provider.multiProvider) {
resolvedProvider = new ResolvedReflectiveProvider_(provider.key, collection_1.ListWrapper.clone(provider.resolvedFactories), provider.multiProvider);
resolvedProvider = new ResolvedReflectiveProvider_(provider.key, ListWrapper.clone(provider.resolvedFactories), provider.multiProvider);
}

@@ -161,22 +154,15 @@ else {

}
exports.mergeResolvedReflectiveProviders = mergeResolvedReflectiveProviders;
function _normalizeProviders(providers, res) {
providers.forEach(function (b) {
if (b instanceof lang_1.Type) {
res.push(provider_1.provide(b, { useClass: b }));
if (b instanceof Type) {
res.push({ provide: b, useClass: b });
}
else if (b instanceof provider_1.Provider) {
else if (b && typeof b == 'object' && b.provide !== undefined) {
res.push(b);
}
else if (provider_util_1.isProviderLiteral(b)) {
res.push(provider_util_1.createProvider(b));
}
else if (b instanceof Array) {
_normalizeProviders(b, res);
}
else if (b instanceof provider_1.ProviderBuilder) {
throw new reflective_exceptions_1.InvalidProviderError(b.token);
}
else {
throw new reflective_exceptions_1.InvalidProviderError(b);
throw new InvalidProviderError(b);
}

@@ -186,4 +172,4 @@ });

}
function constructDependencies(typeOrFunc, dependencies) {
if (lang_1.isBlank(dependencies)) {
export function constructDependencies(typeOrFunc, dependencies) {
if (isBlank(dependencies)) {
return _dependenciesFor(typeOrFunc);

@@ -196,9 +182,8 @@ }

}
exports.constructDependencies = constructDependencies;
function _dependenciesFor(typeOrFunc) {
var params = reflection_1.reflector.parameters(typeOrFunc);
if (lang_1.isBlank(params))
var params = reflector.parameters(typeOrFunc);
if (isBlank(params))
return [];
if (params.some(lang_1.isBlank)) {
throw new reflective_exceptions_1.NoAnnotationError(typeOrFunc, params);
if (params.some(isBlank)) {
throw new NoAnnotationError(typeOrFunc, params);
}

@@ -211,4 +196,4 @@ return params.map(function (p) { return _extractToken(typeOrFunc, p, params); });

var optional = false;
if (!lang_1.isArray(metadata)) {
if (metadata instanceof metadata_1.InjectMetadata) {
if (!isArray(metadata)) {
if (metadata instanceof InjectMetadata) {
return _createDependency(metadata.token, optional, null, null, depProps);

@@ -224,22 +209,22 @@ }

var paramMetadata = metadata[i];
if (paramMetadata instanceof lang_1.Type) {
if (paramMetadata instanceof Type) {
token = paramMetadata;
}
else if (paramMetadata instanceof metadata_1.InjectMetadata) {
else if (paramMetadata instanceof InjectMetadata) {
token = paramMetadata.token;
}
else if (paramMetadata instanceof metadata_1.OptionalMetadata) {
else if (paramMetadata instanceof OptionalMetadata) {
optional = true;
}
else if (paramMetadata instanceof metadata_1.SelfMetadata) {
else if (paramMetadata instanceof SelfMetadata) {
upperBoundVisibility = paramMetadata;
}
else if (paramMetadata instanceof metadata_1.HostMetadata) {
else if (paramMetadata instanceof HostMetadata) {
upperBoundVisibility = paramMetadata;
}
else if (paramMetadata instanceof metadata_1.SkipSelfMetadata) {
else if (paramMetadata instanceof SkipSelfMetadata) {
lowerBoundVisibility = paramMetadata;
}
else if (paramMetadata instanceof metadata_1.DependencyMetadata) {
if (lang_1.isPresent(paramMetadata.token)) {
else if (paramMetadata instanceof DependencyMetadata) {
if (isPresent(paramMetadata.token)) {
token = paramMetadata.token;

@@ -250,13 +235,13 @@ }

}
token = forward_ref_1.resolveForwardRef(token);
if (lang_1.isPresent(token)) {
token = resolveForwardRef(token);
if (isPresent(token)) {
return _createDependency(token, optional, lowerBoundVisibility, upperBoundVisibility, depProps);
}
else {
throw new reflective_exceptions_1.NoAnnotationError(typeOrFunc, params);
throw new NoAnnotationError(typeOrFunc, params);
}
}
function _createDependency(token /** TODO #9100 */, optional /** TODO #9100 */, lowerBoundVisibility /** TODO #9100 */, upperBoundVisibility /** TODO #9100 */, depProps /** TODO #9100 */) {
return new ReflectiveDependency(reflective_key_1.ReflectiveKey.get(token), optional, lowerBoundVisibility, upperBoundVisibility, depProps);
return new ReflectiveDependency(ReflectiveKey.get(token), optional, lowerBoundVisibility, upperBoundVisibility, depProps);
}
//# sourceMappingURL=reflective_provider.js.map

@@ -66,7 +66,3 @@ /**

emit(value?: T): void;
/**
* @deprecated - use .emit(value) instead
*/
next(value: any): void;
subscribe(generatorOrNext?: any, error?: any, complete?: any): any;
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,7 +14,5 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var Subject_1 = require('rxjs/Subject');
var Observable_1 = require('rxjs/Observable');
exports.Observable = Observable_1.Observable;
var Subject_2 = require('rxjs/Subject');
exports.Subject = Subject_2.Subject;
import { Subject } from 'rxjs/Subject';
export { Observable } from 'rxjs/Observable';
export { Subject } from 'rxjs/Subject';
/**

@@ -68,3 +65,3 @@ * Use by directives and components to emit custom Events.

*/
var EventEmitter = (function (_super) {
export var EventEmitter = (function (_super) {
__extends(EventEmitter, _super);

@@ -81,6 +78,2 @@ /**

EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };
/**
* @deprecated - use .emit(value) instead
*/
EventEmitter.prototype.next = function (value) { _super.prototype.next.call(this, value); };
EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {

@@ -119,4 +112,3 @@ var schedulerFn;

return EventEmitter;
}(Subject_1.Subject));
exports.EventEmitter = EventEmitter;
}(Subject));
//# sourceMappingURL=async.js.map

@@ -0,1 +1,2 @@

export declare var Map: MapConstructor;

@@ -2,0 +3,0 @@ export declare var Set: SetConstructor;

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var lang_1 = require('./lang');
exports.Map = lang_1.global.Map;
exports.Set = lang_1.global.Set;
import { getSymbolIterator, global, isArray, isBlank, isJsObject, isPresent } from './lang';
export var Map = global.Map;
export var Set = global.Set;
// Safari and Internet Explorer do not support the iterable parameter to the

@@ -17,4 +16,4 @@ // Map constructor. We work around that by manually adding the items.

try {
if (new exports.Map([[1, 2]]).size === 1) {
return function createMapFromPairs(pairs) { return new exports.Map(pairs); };
if (new Map([[1, 2]]).size === 1) {
return function createMapFromPairs(pairs) { return new Map(pairs); };
}

@@ -25,3 +24,3 @@ }

return function createMapAndPopulateFromPairs(pairs) {
var map = new exports.Map();
var map = new Map();
for (var i = 0; i < pairs.length; i++) {

@@ -36,4 +35,4 @@ var pair = pairs[i];

try {
if (new exports.Map(new exports.Map())) {
return function createMapFromMap(m) { return new exports.Map(m); };
if (new Map(new Map())) {
return function createMapFromMap(m) { return new Map(m); };
}

@@ -44,3 +43,3 @@ }

return function createMapAndPopulateFromMap(m) {
var map = new exports.Map();
var map = new Map();
m.forEach(function (v, k) { map.set(k, v); });

@@ -51,3 +50,3 @@ return map;

var _clearValues = (function () {
if ((new exports.Map()).keys().next) {
if ((new Map()).keys().next) {
return function _clearValues(m) {

@@ -71,3 +70,3 @@ var keyIterator = m.keys();

try {
if ((new exports.Map()).values().next) {
if ((new Map()).values().next) {
return function createArrayFromMap(m, getValues) {

@@ -89,3 +88,3 @@ return getValues ? Array.from(m.values()) : Array.from(m.keys());

})();
var MapWrapper = (function () {
export var MapWrapper = (function () {
function MapWrapper() {

@@ -95,3 +94,3 @@ }

MapWrapper.createFromStringMap = function (stringMap) {
var result = new exports.Map();
var result = new Map();
for (var prop in stringMap) {

@@ -114,7 +113,6 @@ result.set(prop, stringMap[prop]);

}());
exports.MapWrapper = MapWrapper;
/**
* Wraps Javascript Objects
*/
var StringMapWrapper = (function () {
export var StringMapWrapper = (function () {
function StringMapWrapper() {

@@ -181,4 +179,3 @@ }

}());
exports.StringMapWrapper = StringMapWrapper;
var ListWrapper = (function () {
export var ListWrapper = (function () {
function ListWrapper() {

@@ -259,3 +256,3 @@ }

ListWrapper.sort = function (l, compareFn) {
if (lang_1.isPresent(compareFn)) {
if (isPresent(compareFn)) {
l.sort(compareFn);

@@ -277,3 +274,3 @@ }

var candidate = list[index];
if (lang_1.isBlank(candidate)) {
if (isBlank(candidate)) {
continue;

@@ -301,8 +298,7 @@ }

}());
exports.ListWrapper = ListWrapper;
function _flattenArray(source, target) {
if (lang_1.isPresent(source)) {
if (isPresent(source)) {
for (var i = 0; i < source.length; i++) {
var item = source[i];
if (lang_1.isArray(item)) {
if (isArray(item)) {
_flattenArray(item, target);

@@ -317,13 +313,12 @@ }

}
function isListLikeIterable(obj) {
if (!lang_1.isJsObject(obj))
export function isListLikeIterable(obj) {
if (!isJsObject(obj))
return false;
return lang_1.isArray(obj) ||
(!(obj instanceof exports.Map) &&
lang_1.getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop
return isArray(obj) ||
(!(obj instanceof Map) &&
getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop
}
exports.isListLikeIterable = isListLikeIterable;
function areIterablesEqual(a, b, comparator) {
var iterator1 = a[lang_1.getSymbolIterator()]();
var iterator2 = b[lang_1.getSymbolIterator()]();
export function areIterablesEqual(a, b, comparator) {
var iterator1 = a[getSymbolIterator()]();
var iterator2 = b[getSymbolIterator()]();
while (true) {

@@ -340,5 +335,4 @@ var item1 = iterator1.next();

}
exports.areIterablesEqual = areIterablesEqual;
function iterateListLike(obj, fn) {
if (lang_1.isArray(obj)) {
export function iterateListLike(obj, fn) {
if (isArray(obj)) {
for (var i = 0; i < obj.length; i++) {

@@ -349,3 +343,3 @@ fn(obj[i]);

else {
var iterator = obj[lang_1.getSymbolIterator()]();
var iterator = obj[getSymbolIterator()]();
var item;

@@ -357,13 +351,12 @@ while (!((item = iterator.next()).done)) {

}
exports.iterateListLike = iterateListLike;
// Safari and Internet Explorer do not support the iterable parameter to the
// Set constructor. We work around that by manually adding the items.
var createSetFromList = (function () {
var test = new exports.Set([1, 2, 3]);
var test = new Set([1, 2, 3]);
if (test.size === 3) {
return function createSetFromList(lst) { return new exports.Set(lst); };
return function createSetFromList(lst) { return new Set(lst); };
}
else {
return function createSetAndPopulateFromList(lst) {
var res = new exports.Set(lst);
var res = new Set(lst);
if (res.size !== lst.length) {

@@ -378,3 +371,3 @@ for (var i = 0; i < lst.length; i++) {

})();
var SetWrapper = (function () {
export var SetWrapper = (function () {
function SetWrapper() {

@@ -387,3 +380,2 @@ }

}());
exports.SetWrapper = SetWrapper;
//# sourceMappingURL=collection.js.map

@@ -0,1 +1,2 @@

/**

@@ -32,20 +33,3 @@ * @license

export { _global as global };
/**
* Runtime representation a type that a Component or other object is instances of.
*
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
* the `MyCustomComponent` constructor function.
*
* @stable
*/
export declare var Type: FunctionConstructor;
export interface Type extends Function {
}
/**
* Runtime representation of a type that is constructable (non-abstract).
*/
export interface ConcreteType<T> extends Type {
new (...args: any[]): T;
}
export declare function getTypeNameForDebugging(type: Type): string;
export declare function getTypeNameForDebugging(type: any): string;
export declare var Math: any;

@@ -57,3 +41,3 @@ export declare var Date: DateConstructor;

export declare function isNumber(obj: any): boolean;
export declare function isString(obj: any): obj is String;
export declare function isString(obj: any): obj is string;
export declare function isFunction(obj: any): boolean;

@@ -91,8 +75,2 @@ export declare function isType(obj: any): boolean;

}
export declare class NumberParseError extends Error {
message: string;
name: string;
constructor(message: string);
toString(): string;
}
export declare class NumberWrapper {

@@ -139,4 +117,4 @@ static toFixed(n: number, fractionDigits: number): string;

export declare function isPrimitive(obj: any): boolean;
export declare function hasConstructor(value: Object, type: Type): boolean;
export declare function hasConstructor(value: Object, type: any): boolean;
export declare function escape(s: string): string;
export declare function escapeRegExp(s: string): string;

@@ -8,8 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var globalScope;

@@ -28,20 +22,10 @@ if (typeof window === 'undefined') {

}
function scheduleMicroTask(fn) {
export function scheduleMicroTask(fn) {
Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
}
exports.scheduleMicroTask = scheduleMicroTask;
// Need to declare a new variable for global here since TypeScript
// exports the original value of the symbol.
var _global = globalScope;
exports.global = _global;
/**
* Runtime representation a type that a Component or other object is instances of.
*
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
* the `MyCustomComponent` constructor function.
*
* @stable
*/
exports.Type = Function;
function getTypeNameForDebugging(type) {
export { _global as global };
export function getTypeNameForDebugging(type) {
if (type['name']) {

@@ -52,5 +36,4 @@ return type['name'];

}
exports.getTypeNameForDebugging = getTypeNameForDebugging;
exports.Math = _global.Math;
exports.Date = _global.Date;
export var Math = _global.Math;
export var Date = _global.Date;
// TODO: remove calls to assert in production environment

@@ -62,40 +45,31 @@ // Note: Can't just export this and import in in other files

};
function isPresent(obj) {
export function isPresent(obj) {
return obj !== undefined && obj !== null;
}
exports.isPresent = isPresent;
function isBlank(obj) {
export function isBlank(obj) {
return obj === undefined || obj === null;
}
exports.isBlank = isBlank;
function isBoolean(obj) {
export function isBoolean(obj) {
return typeof obj === 'boolean';
}
exports.isBoolean = isBoolean;
function isNumber(obj) {
export function isNumber(obj) {
return typeof obj === 'number';
}
exports.isNumber = isNumber;
function isString(obj) {
export function isString(obj) {
return typeof obj === 'string';
}
exports.isString = isString;
function isFunction(obj) {
export function isFunction(obj) {
return typeof obj === 'function';
}
exports.isFunction = isFunction;
function isType(obj) {
export function isType(obj) {
return isFunction(obj);
}
exports.isType = isType;
function isStringMap(obj) {
export function isStringMap(obj) {
return typeof obj === 'object' && obj !== null;
}
exports.isStringMap = isStringMap;
var STRING_MAP_PROTO = Object.getPrototypeOf({});
function isStrictStringMap(obj) {
export function isStrictStringMap(obj) {
return isStringMap(obj) && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
}
exports.isStrictStringMap = isStrictStringMap;
function isPromise(obj) {
export function isPromise(obj) {
// allow any Promise/A+ compliant thenable.

@@ -105,14 +79,10 @@ // It's up to the caller to ensure that obj.then conforms to the spec

}
exports.isPromise = isPromise;
function isArray(obj) {
export function isArray(obj) {
return Array.isArray(obj);
}
exports.isArray = isArray;
function isDate(obj) {
return obj instanceof exports.Date && !isNaN(obj.valueOf());
export function isDate(obj) {
return obj instanceof Date && !isNaN(obj.valueOf());
}
exports.isDate = isDate;
function noop() { }
exports.noop = noop;
function stringify(token) {
export function noop() { }
export function stringify(token) {
if (typeof token === 'string') {

@@ -134,18 +104,14 @@ return token;

}
exports.stringify = stringify;
// serialize / deserialize enum exist only for consistency with dart API
// enums in typescript don't need to be serialized
function serializeEnum(val) {
export function serializeEnum(val) {
return val;
}
exports.serializeEnum = serializeEnum;
function deserializeEnum(val, values) {
export function deserializeEnum(val, values) {
return val;
}
exports.deserializeEnum = deserializeEnum;
function resolveEnumToken(enumValue, val) {
export function resolveEnumToken(enumValue, val) {
return enumValue[val];
}
exports.resolveEnumToken = resolveEnumToken;
var StringWrapper = (function () {
export var StringWrapper = (function () {
function StringWrapper() {

@@ -218,4 +184,3 @@ }

}());
exports.StringWrapper = StringWrapper;
var StringJoiner = (function () {
export var StringJoiner = (function () {
function StringJoiner(parts) {

@@ -229,14 +194,3 @@ if (parts === void 0) { parts = []; }

}());
exports.StringJoiner = StringJoiner;
var NumberParseError = (function (_super) {
__extends(NumberParseError, _super);
function NumberParseError(message) {
_super.call(this);
this.message = message;
}
NumberParseError.prototype.toString = function () { return this.message; };
return NumberParseError;
}(Error));
exports.NumberParseError = NumberParseError;
var NumberWrapper = (function () {
export var NumberWrapper = (function () {
function NumberWrapper() {

@@ -249,3 +203,3 @@ }

if (isNaN(result)) {
throw new NumberParseError('Invalid integer literal when parsing ' + text);
throw new Error('Invalid integer literal when parsing ' + text);
}

@@ -271,3 +225,3 @@ return result;

}
throw new NumberParseError('Invalid integer literal when parsing ' + text + ' in base ' + radix);
throw new Error('Invalid integer literal when parsing ' + text + ' in base ' + radix);
};

@@ -286,5 +240,4 @@ // TODO: NaN is a valid literal but is returned by parseFloat to indicate an error.

}());
exports.NumberWrapper = NumberWrapper;
exports.RegExp = _global.RegExp;
var FunctionWrapper = (function () {
export var RegExp = _global.RegExp;
export var FunctionWrapper = (function () {
function FunctionWrapper() {

@@ -296,36 +249,28 @@ }

}());
exports.FunctionWrapper = FunctionWrapper;
// JS has NaN !== NaN
function looseIdentical(a, b) {
export function looseIdentical(a, b) {
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
}
exports.looseIdentical = looseIdentical;
// JS considers NaN is the same as NaN for map Key (while NaN !== NaN otherwise)
// see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
function getMapKey(value) {
export function getMapKey(value) {
return value;
}
exports.getMapKey = getMapKey;
function normalizeBlank(obj) {
export function normalizeBlank(obj) {
return isBlank(obj) ? null : obj;
}
exports.normalizeBlank = normalizeBlank;
function normalizeBool(obj) {
export function normalizeBool(obj) {
return isBlank(obj) ? false : obj;
}
exports.normalizeBool = normalizeBool;
function isJsObject(o) {
export function isJsObject(o) {
return o !== null && (typeof o === 'function' || typeof o === 'object');
}
exports.isJsObject = isJsObject;
function print(obj) {
export function print(obj) {
console.log(obj);
}
exports.print = print;
function warn(obj) {
export function warn(obj) {
console.warn(obj);
}
exports.warn = warn;
// Can't be all uppercase as our transpiler would think it is a special directive...
var Json = (function () {
export var Json = (function () {
function Json() {

@@ -340,4 +285,3 @@ }

}());
exports.Json = Json;
var DateWrapper = (function () {
export var DateWrapper = (function () {
function DateWrapper() {

@@ -352,13 +296,12 @@ }

if (milliseconds === void 0) { milliseconds = 0; }
return new exports.Date(year, month - 1, day, hour, minutes, seconds, milliseconds);
return new Date(year, month - 1, day, hour, minutes, seconds, milliseconds);
};
DateWrapper.fromISOString = function (str) { return new exports.Date(str); };
DateWrapper.fromMillis = function (ms) { return new exports.Date(ms); };
DateWrapper.fromISOString = function (str) { return new Date(str); };
DateWrapper.fromMillis = function (ms) { return new Date(ms); };
DateWrapper.toMillis = function (date) { return date.getTime(); };
DateWrapper.now = function () { return new exports.Date(); };
DateWrapper.now = function () { return new Date(); };
DateWrapper.toJson = function (date) { return date.toJSON(); };
return DateWrapper;
}());
exports.DateWrapper = DateWrapper;
function setValueOnPath(global, path, value) {
export function setValueOnPath(global, path, value) {
var parts = path.split('.');

@@ -380,5 +323,4 @@ var obj = global;

}
exports.setValueOnPath = setValueOnPath;
var _symbolIterator = null;
function getSymbolIterator() {
export function getSymbolIterator() {
if (isBlank(_symbolIterator)) {

@@ -402,4 +344,3 @@ if (isPresent(globalScope.Symbol) && isPresent(Symbol.iterator)) {

}
exports.getSymbolIterator = getSymbolIterator;
function evalExpression(sourceUrl, expr, declarations, vars) {
export function evalExpression(sourceUrl, expr, declarations, vars) {
var fnBody = declarations + "\nreturn " + expr + "\n//# sourceURL=" + sourceUrl;

@@ -414,19 +355,14 @@ var fnArgNames = [];

}
exports.evalExpression = evalExpression;
function isPrimitive(obj) {
export function isPrimitive(obj) {
return !isJsObject(obj);
}
exports.isPrimitive = isPrimitive;
function hasConstructor(value, type) {
export function hasConstructor(value, type) {
return value.constructor === type;
}
exports.hasConstructor = hasConstructor;
function escape(s) {
export function escape(s) {
return _global.encodeURI(s);
}
exports.escape = escape;
function escapeRegExp(s) {
export function escapeRegExp(s) {
return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
}
exports.escapeRegExp = escapeRegExp;
//# sourceMappingURL=lang.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":104,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":108,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":112,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":116,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":124,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"error","message":"Reference to a local symbol","line":127,"character":5,"context":{"name":"STRING_MAP_PROTO"}}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"then"}]}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":322,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":322,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":340,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":340,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":437,"character":19}}}}
{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":87,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":91,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":9},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":107,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"then"}]}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":296,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":296,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":314,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":314,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":411,"character":19}}}}

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var lang_1 = require('./lang');
exports.Math = lang_1.global.Math;
exports.NaN = typeof exports.NaN;
import { global } from './lang';
export var Math = global.Math;
export var NaN = typeof NaN;
//# sourceMappingURL=math.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"./lang","name":"global"},"member":"Math"},"NaN":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":39}}}
{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"./lang","name":"global"},"member":"Math"},"NaN":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":40}}}

@@ -8,16 +8,12 @@ /**

*/
export { COMPILER_OPTIONS, Compiler, CompilerFactory, CompilerOptions, ComponentStillLoadingError, ModuleWithComponentFactories } from './linker/compiler';
export { COMPILER_OPTIONS, Compiler, CompilerFactory, CompilerOptions, ModuleWithComponentFactories } from './linker/compiler';
export { ComponentFactory, ComponentRef } from './linker/component_factory';
export { ComponentFactoryResolver, NoComponentFactoryError } from './linker/component_factory_resolver';
export { ComponentResolver } from './linker/component_resolver';
export { DynamicComponentLoader } from './linker/dynamic_component_loader';
export { ComponentFactoryResolver } from './linker/component_factory_resolver';
export { ElementRef } from './linker/element_ref';
export { ExpressionChangedAfterItHasBeenCheckedException } from './linker/exceptions';
export { NgModuleFactory, NgModuleRef } from './linker/ng_module_factory';
export { NgModuleFactoryLoader } from './linker/ng_module_factory_loader';
export { QueryList } from './linker/query_list';
export { SystemJsNgModuleLoader } from './linker/system_js_ng_module_factory_loader';
export { SystemJsCmpFactoryResolver, SystemJsComponentResolver } from './linker/systemjs_component_resolver';
export { SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig } from './linker/system_js_ng_module_factory_loader';
export { TemplateRef } from './linker/template_ref';
export { ViewContainerRef } from './linker/view_container_ref';
export { EmbeddedViewRef, ViewRef } from './linker/view_ref';

@@ -8,43 +8,14 @@ /**

*/
"use strict";
// Public API for compiler
var compiler_1 = require('./linker/compiler');
exports.COMPILER_OPTIONS = compiler_1.COMPILER_OPTIONS;
exports.Compiler = compiler_1.Compiler;
exports.CompilerFactory = compiler_1.CompilerFactory;
exports.ComponentStillLoadingError = compiler_1.ComponentStillLoadingError;
exports.ModuleWithComponentFactories = compiler_1.ModuleWithComponentFactories;
var component_factory_1 = require('./linker/component_factory');
exports.ComponentFactory = component_factory_1.ComponentFactory;
exports.ComponentRef = component_factory_1.ComponentRef;
var component_factory_resolver_1 = require('./linker/component_factory_resolver');
exports.ComponentFactoryResolver = component_factory_resolver_1.ComponentFactoryResolver;
exports.NoComponentFactoryError = component_factory_resolver_1.NoComponentFactoryError;
var component_resolver_1 = require('./linker/component_resolver');
exports.ComponentResolver = component_resolver_1.ComponentResolver;
var dynamic_component_loader_1 = require('./linker/dynamic_component_loader');
exports.DynamicComponentLoader = dynamic_component_loader_1.DynamicComponentLoader;
var element_ref_1 = require('./linker/element_ref');
exports.ElementRef = element_ref_1.ElementRef;
var exceptions_1 = require('./linker/exceptions');
exports.ExpressionChangedAfterItHasBeenCheckedException = exceptions_1.ExpressionChangedAfterItHasBeenCheckedException;
var ng_module_factory_1 = require('./linker/ng_module_factory');
exports.NgModuleFactory = ng_module_factory_1.NgModuleFactory;
exports.NgModuleRef = ng_module_factory_1.NgModuleRef;
var ng_module_factory_loader_1 = require('./linker/ng_module_factory_loader');
exports.NgModuleFactoryLoader = ng_module_factory_loader_1.NgModuleFactoryLoader;
var query_list_1 = require('./linker/query_list');
exports.QueryList = query_list_1.QueryList;
var system_js_ng_module_factory_loader_1 = require('./linker/system_js_ng_module_factory_loader');
exports.SystemJsNgModuleLoader = system_js_ng_module_factory_loader_1.SystemJsNgModuleLoader;
var systemjs_component_resolver_1 = require('./linker/systemjs_component_resolver');
exports.SystemJsCmpFactoryResolver = systemjs_component_resolver_1.SystemJsCmpFactoryResolver;
exports.SystemJsComponentResolver = systemjs_component_resolver_1.SystemJsComponentResolver;
var template_ref_1 = require('./linker/template_ref');
exports.TemplateRef = template_ref_1.TemplateRef;
var view_container_ref_1 = require('./linker/view_container_ref');
exports.ViewContainerRef = view_container_ref_1.ViewContainerRef;
var view_ref_1 = require('./linker/view_ref');
exports.EmbeddedViewRef = view_ref_1.EmbeddedViewRef;
exports.ViewRef = view_ref_1.ViewRef;
export { COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories } from './linker/compiler';
export { ComponentFactory, ComponentRef } from './linker/component_factory';
export { ComponentFactoryResolver } from './linker/component_factory_resolver';
export { ElementRef } from './linker/element_ref';
export { NgModuleFactory, NgModuleRef } from './linker/ng_module_factory';
export { NgModuleFactoryLoader } from './linker/ng_module_factory_loader';
export { QueryList } from './linker/query_list';
export { SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig } from './linker/system_js_ng_module_factory_loader';
export { TemplateRef } from './linker/template_ref';
export { ViewContainerRef } from './linker/view_container_ref';
export { EmbeddedViewRef, ViewRef } from './linker/view_ref';
//# sourceMappingURL=linker.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./linker/compiler","export":["COMPILER_OPTIONS","Compiler","CompilerFactory","CompilerOptions","ComponentStillLoadingError","ModuleWithComponentFactories"]},{"from":"./linker/component_factory","export":["ComponentFactory","ComponentRef"]},{"from":"./linker/component_factory_resolver","export":["ComponentFactoryResolver","NoComponentFactoryError"]},{"from":"./linker/component_resolver","export":["ComponentResolver"]},{"from":"./linker/dynamic_component_loader","export":["DynamicComponentLoader"]},{"from":"./linker/element_ref","export":["ElementRef"]},{"from":"./linker/exceptions","export":["ExpressionChangedAfterItHasBeenCheckedException"]},{"from":"./linker/ng_module_factory","export":["NgModuleFactory","NgModuleRef"]},{"from":"./linker/ng_module_factory_loader","export":["NgModuleFactoryLoader"]},{"from":"./linker/query_list","export":["QueryList"]},{"from":"./linker/system_js_ng_module_factory_loader","export":["SystemJsNgModuleLoader"]},{"from":"./linker/systemjs_component_resolver","export":["SystemJsCmpFactoryResolver","SystemJsComponentResolver"]},{"from":"./linker/template_ref","export":["TemplateRef"]},{"from":"./linker/view_container_ref","export":["ViewContainerRef"]},{"from":"./linker/view_ref","export":["EmbeddedViewRef","ViewRef"]}]}
{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./linker/compiler","export":["COMPILER_OPTIONS","Compiler","CompilerFactory","CompilerOptions","ModuleWithComponentFactories"]},{"from":"./linker/component_factory","export":["ComponentFactory","ComponentRef"]},{"from":"./linker/component_factory_resolver","export":["ComponentFactoryResolver"]},{"from":"./linker/element_ref","export":["ElementRef"]},{"from":"./linker/ng_module_factory","export":["NgModuleFactory","NgModuleRef"]},{"from":"./linker/ng_module_factory_loader","export":["NgModuleFactoryLoader"]},{"from":"./linker/query_list","export":["QueryList"]},{"from":"./linker/system_js_ng_module_factory_loader","export":["SystemJsNgModuleLoader","SystemJsNgModuleLoaderConfig"]},{"from":"./linker/template_ref","export":["TemplateRef"]},{"from":"./linker/view_container_ref","export":["ViewContainerRef"]},{"from":"./linker/view_ref","export":["EmbeddedViewRef","ViewRef"]}]}

@@ -9,5 +9,5 @@ /**

import { OpaqueToken } from '../di';
import { BaseException } from '../facade/exceptions';
import { ConcreteType, Type } from '../facade/lang';
import { BaseError } from '../facade/errors';
import { ViewEncapsulation } from '../metadata';
import { Type } from '../type';
import { ComponentFactory } from './component_factory';

@@ -20,5 +20,5 @@ import { NgModuleFactory } from './ng_module_factory';

*/
export declare class ComponentStillLoadingError extends BaseException {
compType: Type;
constructor(compType: Type);
export declare class ComponentStillLoadingError extends BaseError {
compType: Type<any>;
constructor(compType: Type<any>);
}

@@ -36,3 +36,3 @@ /**

/**
* Low-level service for running the angular compiler duirng runtime
* Low-level service for running the angular compiler during runtime
* to create {@link ComponentFactory}s, which

@@ -48,11 +48,2 @@ * can later be used to create and render a Component instance.

/**
* Loads the template and styles of a component and returns the associated `ComponentFactory`.
*/
compileComponentAsync<T>(component: ConcreteType<T>, ngModule?: Type): Promise<ComponentFactory<T>>;
/**
* Compiles the given component. All templates have to be either inline or compiled via
* `compileComponentAsync` before. Otherwise throws a {@link ComponentStillLoadingError}.
*/
compileComponentSync<T>(component: ConcreteType<T>, ngModule?: Type): ComponentFactory<T>;
/**
* Compiles the given NgModule and all of its components. All templates of the components listed

@@ -62,15 +53,15 @@ * in `entryComponents`

*/
compileModuleSync<T>(moduleType: ConcreteType<T>): NgModuleFactory<T>;
compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>;
/**
* Compiles the given NgModule and all of its components
*/
compileModuleAsync<T>(moduleType: ConcreteType<T>): Promise<NgModuleFactory<T>>;
compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>;
/**
* Same as {@link compileModuleSync} put also creates ComponentFactories for all components.
*/
compileModuleAndAllComponentsSync<T>(moduleType: ConcreteType<T>): ModuleWithComponentFactories<T>;
compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>;
/**
* Same as {@link compileModuleAsync} put also creates ComponentFactories for all components.
*/
compileModuleAndAllComponentsAsync<T>(moduleType: ConcreteType<T>): Promise<ModuleWithComponentFactories<T>>;
compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>;
/**

@@ -83,3 +74,3 @@ * Clears all caches

*/
clearCacheFor(type: Type): void;
clearCacheFor(type: Type<any>): void;
}

@@ -86,0 +77,0 @@ /**

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,5 +14,5 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var di_1 = require('../di');
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
import { OpaqueToken } from '../di';
import { BaseError } from '../facade/errors';
import { stringify } from '../facade/lang';
/**

@@ -24,11 +23,10 @@ * Indicates that a component is still being loaded in a synchronous compile.

*/
var ComponentStillLoadingError = (function (_super) {
export var ComponentStillLoadingError = (function (_super) {
__extends(ComponentStillLoadingError, _super);
function ComponentStillLoadingError(compType) {
_super.call(this, "Can't compile synchronously as " + lang_1.stringify(compType) + " is still being loaded!");
_super.call(this, "Can't compile synchronously as " + stringify(compType) + " is still being loaded!");
this.compType = compType;
}
return ComponentStillLoadingError;
}(exceptions_1.BaseException));
exports.ComponentStillLoadingError = ComponentStillLoadingError;
}(BaseError));
/**

@@ -39,3 +37,3 @@ * Combination of NgModuleFactory and ComponentFactorys.

*/
var ModuleWithComponentFactories = (function () {
export var ModuleWithComponentFactories = (function () {
function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {

@@ -47,8 +45,7 @@ this.ngModuleFactory = ngModuleFactory;

}());
exports.ModuleWithComponentFactories = ModuleWithComponentFactories;
function _throwError() {
throw new exceptions_1.BaseException("Runtime compiler is not loaded");
throw new Error("Runtime compiler is not loaded");
}
/**
* Low-level service for running the angular compiler duirng runtime
* Low-level service for running the angular compiler during runtime
* to create {@link ComponentFactory}s, which

@@ -62,21 +59,6 @@ * can later be used to create and render a Component instance.

*/
var Compiler = (function () {
export var Compiler = (function () {
function Compiler() {
}
/**
* Loads the template and styles of a component and returns the associated `ComponentFactory`.
*/
Compiler.prototype.compileComponentAsync = function (component, ngModule) {
if (ngModule === void 0) { ngModule = null; }
throw _throwError();
};
/**
* Compiles the given component. All templates have to be either inline or compiled via
* `compileComponentAsync` before. Otherwise throws a {@link ComponentStillLoadingError}.
*/
Compiler.prototype.compileComponentSync = function (component, ngModule) {
if (ngModule === void 0) { ngModule = null; }
throw _throwError();
};
/**
* Compiles the given NgModule and all of its components. All templates of the components listed

@@ -90,5 +72,3 @@ * in `entryComponents`

*/
Compiler.prototype.compileModuleAsync = function (moduleType) {
throw _throwError();
};
Compiler.prototype.compileModuleAsync = function (moduleType) { throw _throwError(); };
/**

@@ -116,3 +96,2 @@ * Same as {@link compileModuleSync} put also creates ComponentFactories for all components.

}());
exports.Compiler = Compiler;
/**

@@ -123,3 +102,3 @@ * Token to provide CompilerOptions in the platform injector.

*/
exports.COMPILER_OPTIONS = new di_1.OpaqueToken('compilerOptions');
export var COMPILER_OPTIONS = new OpaqueToken('compilerOptions');
/**

@@ -130,3 +109,3 @@ * A factory for creating a Compiler

*/
var CompilerFactory = (function () {
export var CompilerFactory = (function () {
function CompilerFactory() {

@@ -136,3 +115,2 @@ }

}());
exports.CompilerFactory = CompilerFactory;
//# sourceMappingURL=compiler.js.map

@@ -8,4 +8,4 @@ /**

*/
import { BaseException } from '../facade/exceptions';
import { ConcreteType } from '../facade/lang';
import { BaseError } from '../facade/errors';
import { Type } from '../type';
import { ComponentFactory } from './component_factory';

@@ -15,3 +15,3 @@ /**

*/
export declare class NoComponentFactoryError extends BaseException {
export declare class NoComponentFactoryError extends BaseError {
component: Function;

@@ -25,3 +25,3 @@ constructor(component: Function);

static NULL: ComponentFactoryResolver;
abstract resolveComponentFactory<T>(component: ConcreteType<T>): ComponentFactory<T>;
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
}

@@ -28,0 +28,0 @@ export declare class CodegenComponentFactoryResolver implements ComponentFactoryResolver {

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,16 +14,15 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
import { BaseError } from '../facade/errors';
import { stringify } from '../facade/lang';
/**
* @stable
*/
var NoComponentFactoryError = (function (_super) {
export var NoComponentFactoryError = (function (_super) {
__extends(NoComponentFactoryError, _super);
function NoComponentFactoryError(component) {
_super.call(this, "No component factory found for " + lang_1.stringify(component));
_super.call(this, "No component factory found for " + stringify(component));
this.component = component;
}
return NoComponentFactoryError;
}(exceptions_1.BaseException));
exports.NoComponentFactoryError = NoComponentFactoryError;
}(BaseError));
var _NullComponentFactoryResolver = (function () {

@@ -41,3 +39,3 @@ function _NullComponentFactoryResolver() {

*/
var ComponentFactoryResolver = (function () {
export var ComponentFactoryResolver = (function () {
function ComponentFactoryResolver() {

@@ -48,4 +46,3 @@ }

}());
exports.ComponentFactoryResolver = ComponentFactoryResolver;
var CodegenComponentFactoryResolver = (function () {
export var CodegenComponentFactoryResolver = (function () {
function CodegenComponentFactoryResolver(factories, _parent) {

@@ -68,3 +65,2 @@ this._parent = _parent;

}());
exports.CodegenComponentFactoryResolver = CodegenComponentFactoryResolver;
//# sourceMappingURL=component_factory_resolver.js.map

@@ -10,3 +10,3 @@ /**

import { Injector } from '../di/injector';
import { Type } from '../facade/lang';
import { Type } from '../type';
import { AppElement } from './element';

@@ -47,3 +47,3 @@ import { ElementRef } from './element_ref';

*/
componentType: Type;
componentType: Type<any>;
/**

@@ -61,3 +61,3 @@ * Destroys the component instance and all of the data structures associated with it.

private _componentType;
constructor(_hostElement: AppElement, _componentType: Type);
constructor(_hostElement: AppElement, _componentType: Type<any>);
location: ElementRef;

@@ -68,3 +68,3 @@ injector: Injector;

changeDetectorRef: ChangeDetectorRef;
componentType: Type;
componentType: Type<any>;
destroy(): void;

@@ -80,4 +80,4 @@ onDestroy(callback: Function): void;

private _componentType;
constructor(selector: string, _viewFactory: Function, _componentType: Type);
componentType: Type;
constructor(selector: string, _viewFactory: Function, _componentType: Type<any>);
componentType: Type<any>;
/**

@@ -84,0 +84,0 @@ * Creates a new component.

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,5 +14,5 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var view_utils_1 = require('./view_utils');
import { unimplemented } from '../facade/errors';
import { isBlank } from '../facade/lang';
import { ViewUtils } from './view_utils';
/**

@@ -27,3 +26,3 @@ * Represents an instance of a Component created via a {@link ComponentFactory}.

*/
var ComponentRef = (function () {
export var ComponentRef = (function () {
function ComponentRef() {

@@ -35,3 +34,3 @@ }

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -44,3 +43,3 @@ configurable: true

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -53,3 +52,3 @@ configurable: true

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -63,3 +62,3 @@ configurable: true

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -73,3 +72,3 @@ configurable: true

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -82,3 +81,3 @@ configurable: true

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -89,4 +88,3 @@ configurable: true

}());
exports.ComponentRef = ComponentRef;
var ComponentRef_ = (function (_super) {
export var ComponentRef_ = (function (_super) {
__extends(ComponentRef_, _super);

@@ -135,3 +133,2 @@ function ComponentRef_(_hostElement, _componentType) {

}(ComponentRef));
exports.ComponentRef_ = ComponentRef_;
/**

@@ -144,3 +141,3 @@ * @experimental

*/
var ComponentFactory = (function () {
export var ComponentFactory = (function () {
function ComponentFactory(selector, _viewFactory, _componentType) {

@@ -162,4 +159,4 @@ this.selector = selector;

if (rootSelectorOrNode === void 0) { rootSelectorOrNode = null; }
var vu = injector.get(view_utils_1.ViewUtils);
if (lang_1.isBlank(projectableNodes)) {
var vu = injector.get(ViewUtils);
if (isBlank(projectableNodes)) {
projectableNodes = [];

@@ -174,3 +171,2 @@ }

}());
exports.ComponentFactory = ComponentFactory;
//# sourceMappingURL=component_factory.js.map

@@ -8,7 +8,6 @@ /**

*/
"use strict";
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var view_type_1 = require('./view_type');
var StaticNodeDebugInfo = (function () {
import { StringMapWrapper } from '../facade/collection';
import { isBlank, isPresent } from '../facade/lang';
import { ViewType } from './view_type';
export var StaticNodeDebugInfo = (function () {
function StaticNodeDebugInfo(providerTokens, componentToken, refTokens) {

@@ -21,4 +20,3 @@ this.providerTokens = providerTokens;

}());
exports.StaticNodeDebugInfo = StaticNodeDebugInfo;
var DebugContext = (function () {
export var DebugContext = (function () {
function DebugContext(_view, _nodeIndex, _tplRow, _tplCol) {

@@ -32,3 +30,3 @@ this._view = _view;

get: function () {
return lang_1.isPresent(this._nodeIndex) ? this._view.staticNodeDebugInfos[this._nodeIndex] : null;
return isPresent(this._nodeIndex) ? this._view.staticNodeDebugInfos[this._nodeIndex] : null;
},

@@ -46,3 +44,3 @@ enumerable: true,

var staticNodeInfo = this._staticNodeInfo;
if (lang_1.isPresent(staticNodeInfo) && lang_1.isPresent(staticNodeInfo.componentToken)) {
if (isPresent(staticNodeInfo) && isPresent(staticNodeInfo.componentToken)) {
return this.injector.get(staticNodeInfo.componentToken);

@@ -58,7 +56,7 @@ }

var componentView = this._view;
while (lang_1.isPresent(componentView.declarationAppElement) &&
componentView.type !== view_type_1.ViewType.COMPONENT) {
while (isPresent(componentView.declarationAppElement) &&
componentView.type !== ViewType.COMPONENT) {
componentView = componentView.declarationAppElement.parentView;
}
return lang_1.isPresent(componentView.declarationAppElement) ?
return isPresent(componentView.declarationAppElement) ?
componentView.declarationAppElement.nativeElement :

@@ -77,3 +75,3 @@ null;

get: function () {
if (lang_1.isPresent(this._nodeIndex) && this._view.allNodes) {
if (isPresent(this._nodeIndex) && this._view.allNodes) {
return this._view.allNodes[this._nodeIndex];

@@ -91,3 +89,3 @@ }

var staticNodeInfo = this._staticNodeInfo;
return lang_1.isPresent(staticNodeInfo) ? staticNodeInfo.providerTokens : null;
return isPresent(staticNodeInfo) ? staticNodeInfo.providerTokens : null;
},

@@ -109,7 +107,7 @@ enumerable: true,

var staticNodeInfo = this._staticNodeInfo;
if (lang_1.isPresent(staticNodeInfo)) {
if (isPresent(staticNodeInfo)) {
var refs = staticNodeInfo.refTokens;
collection_1.StringMapWrapper.forEach(refs, function (refToken, refName) {
StringMapWrapper.forEach(refs, function (refToken, refName) {
var varValue;
if (lang_1.isBlank(refToken)) {
if (isBlank(refToken)) {
varValue = _this._view.allNodes ? _this._view.allNodes[_this._nodeIndex] : null;

@@ -130,3 +128,2 @@ }

}());
exports.DebugContext = DebugContext;
//# sourceMappingURL=debug_context.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,5 +14,5 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var injector_1 = require('../di/injector');
import { Injector, THROW_IF_NOT_FOUND } from '../di/injector';
var _UNDEFINED = new Object();
var ElementInjector = (function (_super) {
export var ElementInjector = (function (_super) {
__extends(ElementInjector, _super);

@@ -26,3 +25,3 @@ function ElementInjector(_view, _nodeIndex) {

ElementInjector.prototype.get = function (token, notFoundValue) {
if (notFoundValue === void 0) { notFoundValue = injector_1.THROW_IF_NOT_FOUND; }
if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
var result = _UNDEFINED;

@@ -38,4 +37,3 @@ if (result === _UNDEFINED) {

return ElementInjector;
}(injector_1.Injector));
exports.ElementInjector = ElementInjector;
}(Injector));
//# sourceMappingURL=element_injector.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
/**

@@ -25,3 +24,3 @@ * A wrapper around a native element inside of a View.

// and could do better codegen in the future.
var ElementRef = (function () {
export var ElementRef = (function () {
function ElementRef(nativeElement) {

@@ -32,3 +31,2 @@ this.nativeElement = nativeElement;

}());
exports.ElementRef = ElementRef;
//# sourceMappingURL=element_ref.js.map

@@ -8,9 +8,7 @@ /**

*/
"use strict";
var collection_1 = require('../facade/collection');
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var element_ref_1 = require('./element_ref');
var view_container_ref_1 = require('./view_container_ref');
var view_type_1 = require('./view_type');
import { ListWrapper } from '../facade/collection';
import { isPresent } from '../facade/lang';
import { ElementRef } from './element_ref';
import { ViewContainerRef_ } from './view_container_ref';
import { ViewType } from './view_type';
/**

@@ -21,3 +19,3 @@ * An AppElement is created for elements that have a ViewContainerRef,

*/
var AppElement = (function () {
export var AppElement = (function () {
function AppElement(index, parentIndex, parentView, nativeElement) {

@@ -32,3 +30,3 @@ this.index = index;

Object.defineProperty(AppElement.prototype, "elementRef", {
get: function () { return new element_ref_1.ElementRef(this.nativeElement); },
get: function () { return new ElementRef(this.nativeElement); },
enumerable: true,

@@ -38,3 +36,3 @@ configurable: true

Object.defineProperty(AppElement.prototype, "vcRef", {
get: function () { return new view_container_ref_1.ViewContainerRef_(this); },
get: function () { return new ViewContainerRef_(this); },
enumerable: true,

@@ -60,3 +58,3 @@ configurable: true

var result = [];
if (lang_1.isPresent(this.nestedViews)) {
if (isPresent(this.nestedViews)) {
this.nestedViews.forEach(function (nestedView) {

@@ -72,4 +70,4 @@ if (nestedView.clazz === nestedViewClass) {

var previousIndex = this.nestedViews.indexOf(view);
if (view.type === view_type_1.ViewType.COMPONENT) {
throw new exceptions_1.BaseException("Component views can't be moved!");
if (view.type === ViewType.COMPONENT) {
throw new Error("Component views can't be moved!");
}

@@ -81,4 +79,4 @@ var nestedViews = this.nestedViews;

}
collection_1.ListWrapper.removeAt(nestedViews, previousIndex);
collection_1.ListWrapper.insert(nestedViews, currentIndex, view);
ListWrapper.removeAt(nestedViews, previousIndex);
ListWrapper.insert(nestedViews, currentIndex, view);
var refRenderNode;

@@ -92,3 +90,3 @@ if (currentIndex > 0) {

}
if (lang_1.isPresent(refRenderNode)) {
if (isPresent(refRenderNode)) {
view.renderer.attachViewAfter(refRenderNode, view.flatRootNodes);

@@ -99,4 +97,4 @@ }

AppElement.prototype.attachView = function (view, viewIndex) {
if (view.type === view_type_1.ViewType.COMPONENT) {
throw new exceptions_1.BaseException("Component views can't be moved!");
if (view.type === ViewType.COMPONENT) {
throw new Error("Component views can't be moved!");
}

@@ -108,3 +106,3 @@ var nestedViews = this.nestedViews;

}
collection_1.ListWrapper.insert(nestedViews, viewIndex, view);
ListWrapper.insert(nestedViews, viewIndex, view);
var refRenderNode;

@@ -118,3 +116,3 @@ if (viewIndex > 0) {

}
if (lang_1.isPresent(refRenderNode)) {
if (isPresent(refRenderNode)) {
view.renderer.attachViewAfter(refRenderNode, view.flatRootNodes);

@@ -125,5 +123,5 @@ }

AppElement.prototype.detachView = function (viewIndex) {
var view = collection_1.ListWrapper.removeAt(this.nestedViews, viewIndex);
if (view.type === view_type_1.ViewType.COMPONENT) {
throw new exceptions_1.BaseException("Component views can't be moved!");
var view = ListWrapper.removeAt(this.nestedViews, viewIndex);
if (view.type === ViewType.COMPONENT) {
throw new Error("Component views can't be moved!");
}

@@ -136,3 +134,2 @@ view.detach();

}());
exports.AppElement = AppElement;
//# sourceMappingURL=element.js.map

@@ -10,4 +10,4 @@ /**

/**
* Used to load ng moduled factories.
* @experimental
* Used to load ng module factories.
* @stable
*/

@@ -14,0 +14,0 @@ export declare abstract class NgModuleFactoryLoader {

@@ -8,8 +8,7 @@ /**

*/
"use strict";
/**
* Used to load ng moduled factories.
* @experimental
* Used to load ng module factories.
* @stable
*/
var NgModuleFactoryLoader = (function () {
export var NgModuleFactoryLoader = (function () {
function NgModuleFactoryLoader() {

@@ -19,3 +18,2 @@ }

}());
exports.NgModuleFactoryLoader = NgModuleFactoryLoader;
//# sourceMappingURL=ng_module_factory_loader.js.map

@@ -9,3 +9,3 @@ /**

import { Injector } from '../di/injector';
import { ConcreteType } from '../facade/lang';
import { Type } from '../type';
import { ComponentFactory } from './component_factory';

@@ -19,3 +19,3 @@ import { CodegenComponentFactoryResolver, ComponentFactoryResolver } from './component_factory_resolver';

*
* @experimental
* @stable
*/

@@ -29,3 +29,3 @@ export declare abstract class NgModuleRef<T> {

* The ComponentFactoryResolver to get hold of the ComponentFactories
* delcared in the `entryComponents` property of the module.
* declared in the `entryComponents` property of the module.
*/

@@ -51,7 +51,7 @@ componentFactoryResolver: ComponentFactoryResolver;

private _injectorClass;
private _moduleype;
private _moduleType;
constructor(_injectorClass: {
new (parentInjector: Injector): NgModuleInjector<T>;
}, _moduleype: ConcreteType<T>);
moduleType: ConcreteType<T>;
}, _moduleType: Type<T>);
moduleType: Type<T>;
create(parentInjector: Injector): NgModuleRef<T>;

@@ -58,0 +58,0 @@ }

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,6 +14,6 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var injector_1 = require('../di/injector');
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var component_factory_resolver_1 = require('./component_factory_resolver');
import { Injector, THROW_IF_NOT_FOUND } from '../di/injector';
import { unimplemented } from '../facade/errors';
import { stringify } from '../facade/lang';
import { CodegenComponentFactoryResolver, ComponentFactoryResolver } from './component_factory_resolver';
/**

@@ -26,5 +25,5 @@ * Represents an instance of an NgModule created via a {@link NgModuleFactory}.

*
* @experimental
* @stable
*/
var NgModuleRef = (function () {
export var NgModuleRef = (function () {
function NgModuleRef() {

@@ -36,3 +35,3 @@ }

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -44,5 +43,5 @@ configurable: true

* The ComponentFactoryResolver to get hold of the ComponentFactories
* delcared in the `entryComponents` property of the module.
* declared in the `entryComponents` property of the module.
*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -55,3 +54,3 @@ configurable: true

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -62,13 +61,12 @@ configurable: true

}());
exports.NgModuleRef = NgModuleRef;
/**
* @experimental
*/
var NgModuleFactory = (function () {
function NgModuleFactory(_injectorClass, _moduleype) {
export var NgModuleFactory = (function () {
function NgModuleFactory(_injectorClass, _moduleType) {
this._injectorClass = _injectorClass;
this._moduleype = _moduleype;
this._moduleType = _moduleType;
}
Object.defineProperty(NgModuleFactory.prototype, "moduleType", {
get: function () { return this._moduleype; },
get: function () { return this._moduleType; },
enumerable: true,

@@ -79,3 +77,3 @@ configurable: true

if (!parentInjector) {
parentInjector = injector_1.Injector.NULL;
parentInjector = Injector.NULL;
}

@@ -88,8 +86,7 @@ var instance = new this._injectorClass(parentInjector);

}());
exports.NgModuleFactory = NgModuleFactory;
var _UNDEFINED = new Object();
var NgModuleInjector = (function (_super) {
export var NgModuleInjector = (function (_super) {
__extends(NgModuleInjector, _super);
function NgModuleInjector(parent, factories, bootstrapFactories) {
_super.call(this, factories, parent.get(component_factory_resolver_1.ComponentFactoryResolver, component_factory_resolver_1.ComponentFactoryResolver.NULL));
_super.call(this, factories, parent.get(ComponentFactoryResolver, ComponentFactoryResolver.NULL));
this.parent = parent;

@@ -102,4 +99,4 @@ this.bootstrapFactories = bootstrapFactories;

NgModuleInjector.prototype.get = function (token, notFoundValue) {
if (notFoundValue === void 0) { notFoundValue = injector_1.THROW_IF_NOT_FOUND; }
if (token === injector_1.Injector || token === component_factory_resolver_1.ComponentFactoryResolver) {
if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
if (token === Injector || token === ComponentFactoryResolver) {
return this;

@@ -122,3 +119,3 @@ }

if (this._destroyed) {
throw new exceptions_1.BaseException("The ng module " + lang_1.stringify(this.instance.constructor) + " has already been destroyed.");
throw new Error("The ng module " + stringify(this.instance.constructor) + " has already been destroyed.");
}

@@ -131,4 +128,3 @@ this._destroyed = true;

return NgModuleInjector;
}(component_factory_resolver_1.CodegenComponentFactoryResolver));
exports.NgModuleInjector = NgModuleInjector;
}(CodegenComponentFactoryResolver));
//# sourceMappingURL=ng_module_factory.js.map

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var async_1 = require('../facade/async');
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
import { EventEmitter } from '../facade/async';
import { ListWrapper } from '../facade/collection';
import { getSymbolIterator } from '../facade/lang';
/**

@@ -36,7 +35,7 @@ * An unmodifiable list of items that Angular keeps up to date when the state

*/
var QueryList = (function () {
export var QueryList = (function () {
function QueryList() {
this._dirty = true;
this._results = [];
this._emitter = new async_1.EventEmitter();
this._emitter = new EventEmitter();
}

@@ -95,6 +94,6 @@ Object.defineProperty(QueryList.prototype, "changes", {

QueryList.prototype.toArray = function () { return this._results.slice(); };
QueryList.prototype[lang_1.getSymbolIterator()] = function () { return this._results[lang_1.getSymbolIterator()](); };
QueryList.prototype[getSymbolIterator()] = function () { return this._results[getSymbolIterator()](); };
QueryList.prototype.toString = function () { return this._results.toString(); };
QueryList.prototype.reset = function (res) {
this._results = collection_1.ListWrapper.flatten(res);
this._results = ListWrapper.flatten(res);
this._dirty = false;

@@ -113,3 +112,2 @@ };

}());
exports.QueryList = QueryList;
//# sourceMappingURL=query_list.js.map

@@ -5,2 +5,18 @@ import { Compiler } from './compiler';

/**
* Configuration for SystemJsNgModuleLoader.
* token.
*
* @experimental
*/
export declare abstract class SystemJsNgModuleLoaderConfig {
/**
* Prefix to add when computing the name of the factory module for a given module name.
*/
factoryPathPrefix: string;
/**
* Suffix to add when computing the name of the factory module for a given module name.
*/
factoryPathSuffix: string;
}
/**
* NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory

@@ -11,3 +27,4 @@ * @experimental

private _compiler;
constructor(_compiler: Compiler);
private _config;
constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig);
load(path: string): Promise<NgModuleFactory<any>>;

@@ -14,0 +31,0 @@ private loadAndCompile(path);

@@ -8,15 +8,33 @@ /**

*/
"use strict";
var di_1 = require('../di');
var lang_1 = require('../facade/lang');
var compiler_1 = require('./compiler');
import { Injectable, Optional } from '../di';
import { Compiler } from './compiler';
var _SEPARATOR = '#';
var FACTORY_MODULE_SUFFIX = '.ngfactory';
var FACTORY_CLASS_SUFFIX = 'NgFactory';
var SystemJsNgModuleLoader = (function () {
function SystemJsNgModuleLoader(_compiler) {
/**
* Configuration for SystemJsNgModuleLoader.
* token.
*
* @experimental
*/
export var SystemJsNgModuleLoaderConfig = (function () {
function SystemJsNgModuleLoaderConfig() {
}
return SystemJsNgModuleLoaderConfig;
}());
var DEFAULT_CONFIG = {
factoryPathPrefix: '',
factoryPathSuffix: '.ngfactory',
};
/**
* NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory
* @experimental
*/
export var SystemJsNgModuleLoader = (function () {
function SystemJsNgModuleLoader(_compiler, config) {
this._compiler = _compiler;
this._system = function () { return System; };
this._config = config || DEFAULT_CONFIG;
}
SystemJsNgModuleLoader.prototype.load = function (path) {
var offlineMode = this._compiler instanceof compiler_1.Compiler;
var offlineMode = this._compiler instanceof Compiler;
return offlineMode ? this.loadFactory(path) : this.loadAndCompile(path);

@@ -29,4 +47,4 @@ };

exportName = 'default';
return lang_1.global
.System.import(module)
return this._system()
.import(module)
.then(function (module) { return module[exportName]; })

@@ -38,20 +56,22 @@ .then(function (type) { return checkNotEmpty(type, module, exportName); })

var _a = path.split(_SEPARATOR), module = _a[0], exportName = _a[1];
if (exportName === undefined)
var factoryClassSuffix = FACTORY_CLASS_SUFFIX;
if (exportName === undefined) {
exportName = 'default';
return lang_1.global
.System.import(module + FACTORY_MODULE_SUFFIX)
.then(function (module) { return module[exportName + FACTORY_CLASS_SUFFIX]; })
factoryClassSuffix = '';
}
return this._system()
.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)
.then(function (module) { return module[exportName + factoryClassSuffix]; })
.then(function (factory) { return checkNotEmpty(factory, module, exportName); });
};
/** @nocollapse */
SystemJsNgModuleLoader.decorators = [
{ type: di_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
SystemJsNgModuleLoader.ctorParameters = [
{ type: compiler_1.Compiler, },
{ type: Compiler, },
{ type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional },] },
];
return SystemJsNgModuleLoader;
}());
exports.SystemJsNgModuleLoader = SystemJsNgModuleLoader;
function checkNotEmpty(value, modulePath, exportName) {

@@ -58,0 +78,0 @@ if (!value) {

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"SystemJsNgModuleLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./compiler","name":"Compiler"}]}],"load":[{"__symbolic":"method"}],"loadAndCompile":[{"__symbolic":"method"}],"loadFactory":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":1,"metadata":{"SystemJsNgModuleLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"./compiler","name":"Compiler"},{"__symbolic":"reference","name":"SystemJsNgModuleLoaderConfig"}]}],"load":[{"__symbolic":"method"}],"loadAndCompile":[{"__symbolic":"method"}],"loadFactory":[{"__symbolic":"method"}]}}}}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -28,3 +27,3 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

*/
var TemplateRef = (function () {
export var TemplateRef = (function () {
function TemplateRef() {

@@ -51,4 +50,3 @@ }

}());
exports.TemplateRef = TemplateRef;
var TemplateRef_ = (function (_super) {
export var TemplateRef_ = (function (_super) {
__extends(TemplateRef_, _super);

@@ -72,3 +70,2 @@ function TemplateRef_(_appElement, _viewFactory) {

}(TemplateRef));
exports.TemplateRef_ = TemplateRef_;
//# sourceMappingURL=template_ref.js.map

@@ -66,3 +66,3 @@ /**

* The component is instantiated using its {@link ComponentFactory} which can be
* obtained via {@link ComponentResolver#resolveComponent}.
* obtained via {@link ComponentFactoryResolver#resolveComponentFactory}.
*

@@ -69,0 +69,0 @@ * If `index` is not specified, the new View will be inserted as the last View in the container.

@@ -8,7 +8,6 @@ /**

*/
"use strict";
var collection_1 = require('../facade/collection');
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var profile_1 = require('../profile/profile');
import { ListWrapper } from '../facade/collection';
import { unimplemented } from '../facade/errors';
import { isPresent } from '../facade/lang';
import { wtfCreateScope, wtfLeave } from '../profile/profile';
/**

@@ -32,3 +31,3 @@ * Represents a container where one or more Views can be attached.

*/
var ViewContainerRef = (function () {
export var ViewContainerRef = (function () {
function ViewContainerRef() {

@@ -41,3 +40,3 @@ }

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -47,3 +46,3 @@ configurable: true

Object.defineProperty(ViewContainerRef.prototype, "injector", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -53,3 +52,3 @@ configurable: true

Object.defineProperty(ViewContainerRef.prototype, "parentInjector", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -62,3 +61,3 @@ configurable: true

*/
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -70,14 +69,13 @@ configurable: true

}());
exports.ViewContainerRef = ViewContainerRef;
var ViewContainerRef_ = (function () {
export var ViewContainerRef_ = (function () {
function ViewContainerRef_(_element) {
this._element = _element;
/** @internal */
this._createComponentInContainerScope = profile_1.wtfCreateScope('ViewContainerRef#createComponent()');
this._createComponentInContainerScope = wtfCreateScope('ViewContainerRef#createComponent()');
/** @internal */
this._insertScope = profile_1.wtfCreateScope('ViewContainerRef#insert()');
this._insertScope = wtfCreateScope('ViewContainerRef#insert()');
/** @internal */
this._removeScope = profile_1.wtfCreateScope('ViewContainerRef#remove()');
this._removeScope = wtfCreateScope('ViewContainerRef#remove()');
/** @internal */
this._detachScope = profile_1.wtfCreateScope('ViewContainerRef#detach()');
this._detachScope = wtfCreateScope('ViewContainerRef#detach()');
}

@@ -88,3 +86,3 @@ ViewContainerRef_.prototype.get = function (index) { return this._element.nestedViews[index].ref; };

var views = this._element.nestedViews;
return lang_1.isPresent(views) ? views.length : 0;
return isPresent(views) ? views.length : 0;
},

@@ -123,6 +121,6 @@ enumerable: true,

var s = this._createComponentInContainerScope();
var contextInjector = lang_1.isPresent(injector) ? injector : this._element.parentInjector;
var contextInjector = isPresent(injector) ? injector : this._element.parentInjector;
var componentRef = componentFactory.create(contextInjector, projectableNodes);
this.insert(componentRef.hostView, index);
return profile_1.wtfLeave(s, componentRef);
return wtfLeave(s, componentRef);
};

@@ -137,3 +135,3 @@ // TODO(i): refactor insert+remove into move

this._element.attachView(viewRef_.internalView, index);
return profile_1.wtfLeave(s, viewRef_);
return wtfLeave(s, viewRef_);
};

@@ -146,6 +144,6 @@ ViewContainerRef_.prototype.move = function (viewRef, currentIndex) {

this._element.moveView(viewRef_.internalView, currentIndex);
return profile_1.wtfLeave(s, viewRef_);
return wtfLeave(s, viewRef_);
};
ViewContainerRef_.prototype.indexOf = function (viewRef) {
return collection_1.ListWrapper.indexOf(this._element.nestedViews, viewRef.internalView);
return ListWrapper.indexOf(this._element.nestedViews, viewRef.internalView);
};

@@ -161,3 +159,3 @@ // TODO(i): rename to destroy

// view is intentionally not returned to the client.
profile_1.wtfLeave(s);
wtfLeave(s);
};

@@ -171,3 +169,3 @@ // TODO(i): refactor insert+remove into move

var view = this._element.detachView(index);
return profile_1.wtfLeave(s, view.ref);
return wtfLeave(s, view.ref);
};

@@ -181,3 +179,2 @@ ViewContainerRef_.prototype.clear = function () {

}());
exports.ViewContainerRef_ = ViewContainerRef_;
//# sourceMappingURL=view_container_ref.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,12 +14,12 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var constants_1 = require('../change_detection/constants');
var exceptions_1 = require('../facade/exceptions');
import { ChangeDetectorStatus } from '../change_detection/constants';
import { unimplemented } from '../facade/errors';
/**
* @stable
*/
var ViewRef = (function () {
export var ViewRef = (function () {
function ViewRef() {
}
Object.defineProperty(ViewRef.prototype, "destroyed", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -31,3 +30,2 @@ configurable: true

}());
exports.ViewRef = ViewRef;
/**

@@ -87,3 +85,3 @@ * Represents an Angular View.

*/
var EmbeddedViewRef = (function (_super) {
export var EmbeddedViewRef = (function (_super) {
__extends(EmbeddedViewRef, _super);

@@ -94,3 +92,3 @@ function EmbeddedViewRef() {

Object.defineProperty(EmbeddedViewRef.prototype, "context", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -100,3 +98,3 @@ configurable: true

Object.defineProperty(EmbeddedViewRef.prototype, "rootNodes", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -108,4 +106,3 @@ configurable: true

}(ViewRef));
exports.EmbeddedViewRef = EmbeddedViewRef;
var ViewRef_ = (function () {
export var ViewRef_ = (function () {
function ViewRef_(_view) {

@@ -137,3 +134,3 @@ this._view = _view;

ViewRef_.prototype.markForCheck = function () { this._view.markPathToRootAsCheckOnce(); };
ViewRef_.prototype.detach = function () { this._view.cdMode = constants_1.ChangeDetectorStatus.Detached; };
ViewRef_.prototype.detach = function () { this._view.cdMode = ChangeDetectorStatus.Detached; };
ViewRef_.prototype.detectChanges = function () { this._view.detectChanges(false); };

@@ -149,3 +146,2 @@ ViewRef_.prototype.checkNoChanges = function () { this._view.detectChanges(true); };

}());
exports.ViewRef_ = ViewRef_;
//# sourceMappingURL=view_ref.js.map

@@ -8,3 +8,3 @@ /**

*/
"use strict";
export var ViewType;
(function (ViewType) {

@@ -20,4 +20,3 @@ // A view that contains the host element with bound component directive.

ViewType[ViewType["EMBEDDED"] = 2] = "EMBEDDED";
})(exports.ViewType || (exports.ViewType = {}));
var ViewType = exports.ViewType;
})(ViewType || (ViewType = {}));
//# sourceMappingURL=view_type.js.map
import { ViewEncapsulation } from '../metadata/view';
import { RenderComponentType, RootRenderer } from '../render/api';
import { SanitizationService } from '../security';
import { Sanitizer } from '../security';
export declare class ViewUtils {
private _renderer;
private _appId;
sanitizer: SanitizationService;
sanitizer: Sanitizer;
private _nextCompTypeId;
constructor(_renderer: RootRenderer, _appId: string, sanitizer: SanitizationService);
constructor(_renderer: RootRenderer, _appId: string, sanitizer: Sanitizer);
/**

@@ -11,0 +11,0 @@ * Used by the generated code

@@ -8,15 +8,13 @@ /**

*/
"use strict";
var application_tokens_1 = require('../application_tokens');
var change_detection_1 = require('../change_detection/change_detection');
var change_detection_util_1 = require('../change_detection/change_detection_util');
var decorators_1 = require('../di/decorators');
var collection_1 = require('../facade/collection');
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var api_1 = require('../render/api');
var security_1 = require('../security');
var element_1 = require('./element');
var exceptions_2 = require('./exceptions');
var ViewUtils = (function () {
import { APP_ID } from '../application_tokens';
import { devModeEqual } from '../change_detection/change_detection';
import { UNINITIALIZED } from '../change_detection/change_detection_util';
import { Inject, Injectable } from '../di/decorators';
import { ListWrapper } from '../facade/collection';
import { isBlank, isPresent, looseIdentical } from '../facade/lang';
import { RenderComponentType, RootRenderer } from '../render/api';
import { Sanitizer } from '../security';
import { AppElement } from './element';
import { ExpressionChangedAfterItHasBeenCheckedError } from './errors';
export var ViewUtils = (function () {
function ViewUtils(_renderer, _appId, sanitizer) {

@@ -33,3 +31,3 @@ this._renderer = _renderer;

ViewUtils.prototype.createRenderComponentType = function (templateUrl, slotCount, encapsulation, styles, animations) {
return new api_1.RenderComponentType(this._appId + "-" + this._nextCompTypeId++, templateUrl, slotCount, encapsulation, styles, animations);
return new RenderComponentType(this._appId + "-" + this._nextCompTypeId++, templateUrl, slotCount, encapsulation, styles, animations);
};

@@ -40,26 +38,23 @@ /** @internal */

};
/** @nocollapse */
ViewUtils.decorators = [
{ type: decorators_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
ViewUtils.ctorParameters = [
{ type: api_1.RootRenderer, },
{ type: undefined, decorators: [{ type: decorators_1.Inject, args: [application_tokens_1.APP_ID,] },] },
{ type: security_1.SanitizationService, },
{ type: RootRenderer, },
{ type: undefined, decorators: [{ type: Inject, args: [APP_ID,] },] },
{ type: Sanitizer, },
];
return ViewUtils;
}());
exports.ViewUtils = ViewUtils;
function flattenNestedViewRenderNodes(nodes) {
export function flattenNestedViewRenderNodes(nodes) {
return _flattenNestedViewRenderNodes(nodes, []);
}
exports.flattenNestedViewRenderNodes = flattenNestedViewRenderNodes;
function _flattenNestedViewRenderNodes(nodes, renderNodes) {
for (var i = 0; i < nodes.length; i++) {
var node = nodes[i];
if (node instanceof element_1.AppElement) {
if (node instanceof AppElement) {
var appEl = node;
renderNodes.push(appEl.nativeElement);
if (lang_1.isPresent(appEl.nestedViews)) {
if (isPresent(appEl.nestedViews)) {
for (var k = 0; k < appEl.nestedViews.length; k++) {

@@ -77,5 +72,5 @@ _flattenNestedViewRenderNodes(appEl.nestedViews[k].rootNodesOrAppElements, renderNodes);

var EMPTY_ARR = [];
function ensureSlotCount(projectableNodes, expectedSlotCount) {
export function ensureSlotCount(projectableNodes, expectedSlotCount) {
var res;
if (lang_1.isBlank(projectableNodes)) {
if (isBlank(projectableNodes)) {
res = EMPTY_ARR;

@@ -85,3 +80,3 @@ }

var givenSlotCount = projectableNodes.length;
res = collection_1.ListWrapper.createFixedSize(expectedSlotCount);
res = ListWrapper.createFixedSize(expectedSlotCount);
for (var i = 0; i < expectedSlotCount; i++) {

@@ -96,5 +91,4 @@ res[i] = (i < givenSlotCount) ? projectableNodes[i] : EMPTY_ARR;

}
exports.ensureSlotCount = ensureSlotCount;
exports.MAX_INTERPOLATION_VALUES = 9;
function interpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {
export var MAX_INTERPOLATION_VALUES = 9;
export function interpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {
switch (valueCount) {

@@ -130,13 +124,12 @@ case 1:

default:
throw new exceptions_1.BaseException("Does not support more than 9 expressions");
throw new Error("Does not support more than 9 expressions");
}
}
exports.interpolate = interpolate;
function _toStringWithNull(v) {
return v != null ? v.toString() : '';
}
function checkBinding(throwOnChange, oldValue, newValue) {
export function checkBinding(throwOnChange, oldValue, newValue) {
if (throwOnChange) {
if (!change_detection_1.devModeEqual(oldValue, newValue)) {
throw new exceptions_2.ExpressionChangedAfterItHasBeenCheckedException(oldValue, newValue, null);
if (!devModeEqual(oldValue, newValue)) {
throw new ExpressionChangedAfterItHasBeenCheckedError(oldValue, newValue);
}

@@ -146,17 +139,15 @@ return false;

else {
return !lang_1.looseIdentical(oldValue, newValue);
return !looseIdentical(oldValue, newValue);
}
}
exports.checkBinding = checkBinding;
function castByValue(input, value) {
export function castByValue(input, value) {
return input;
}
exports.castByValue = castByValue;
exports.EMPTY_ARRAY = [];
exports.EMPTY_MAP = {};
function pureProxy1(fn) {
export var EMPTY_ARRAY = [];
export var EMPTY_MAP = {};
export function pureProxy1(fn) {
var result;
var v0 = change_detection_util_1.UNINITIALIZED;
var v0 = UNINITIALIZED;
return function (p0) {
if (!lang_1.looseIdentical(v0, p0)) {
if (!looseIdentical(v0, p0)) {
v0 = p0;

@@ -168,9 +159,8 @@ result = fn(p0);

}
exports.pureProxy1 = pureProxy1;
function pureProxy2(fn) {
export function pureProxy2(fn) {
var result;
var v0 = change_detection_util_1.UNINITIALIZED;
var v1 = change_detection_util_1.UNINITIALIZED;
var v0 = UNINITIALIZED;
var v1 = UNINITIALIZED;
return function (p0, p1) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1)) {
v0 = p0;

@@ -183,10 +173,9 @@ v1 = p1;

}
exports.pureProxy2 = pureProxy2;
function pureProxy3(fn) {
export function pureProxy3(fn) {
var result;
var v0 = change_detection_util_1.UNINITIALIZED;
var v1 = change_detection_util_1.UNINITIALIZED;
var v2 = change_detection_util_1.UNINITIALIZED;
var v0 = UNINITIALIZED;
var v1 = UNINITIALIZED;
var v2 = UNINITIALIZED;
return function (p0, p1, p2) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1) || !lang_1.looseIdentical(v2, p2)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1) || !looseIdentical(v2, p2)) {
v0 = p0;

@@ -200,10 +189,9 @@ v1 = p1;

}
exports.pureProxy3 = pureProxy3;
function pureProxy4(fn) {
export function pureProxy4(fn) {
var result;
var v0, v1, v2, v3;
v0 = v1 = v2 = v3 = change_detection_util_1.UNINITIALIZED;
v0 = v1 = v2 = v3 = UNINITIALIZED;
return function (p0, p1, p2, p3) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1) || !lang_1.looseIdentical(v2, p2) ||
!lang_1.looseIdentical(v3, p3)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1) || !looseIdentical(v2, p2) ||
!looseIdentical(v3, p3)) {
v0 = p0;

@@ -218,10 +206,9 @@ v1 = p1;

}
exports.pureProxy4 = pureProxy4;
function pureProxy5(fn) {
export function pureProxy5(fn) {
var result;
var v0, v1, v2, v3, v4;
v0 = v1 = v2 = v3 = v4 = change_detection_util_1.UNINITIALIZED;
v0 = v1 = v2 = v3 = v4 = UNINITIALIZED;
return function (p0, p1, p2, p3, p4) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1) || !lang_1.looseIdentical(v2, p2) ||
!lang_1.looseIdentical(v3, p3) || !lang_1.looseIdentical(v4, p4)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1) || !looseIdentical(v2, p2) ||
!looseIdentical(v3, p3) || !looseIdentical(v4, p4)) {
v0 = p0;

@@ -237,10 +224,9 @@ v1 = p1;

}
exports.pureProxy5 = pureProxy5;
function pureProxy6(fn) {
export function pureProxy6(fn) {
var result;
var v0, v1, v2, v3, v4, v5;
v0 = v1 = v2 = v3 = v4 = v5 = change_detection_util_1.UNINITIALIZED;
v0 = v1 = v2 = v3 = v4 = v5 = UNINITIALIZED;
return function (p0, p1, p2, p3, p4, p5) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1) || !lang_1.looseIdentical(v2, p2) ||
!lang_1.looseIdentical(v3, p3) || !lang_1.looseIdentical(v4, p4) || !lang_1.looseIdentical(v5, p5)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1) || !looseIdentical(v2, p2) ||
!looseIdentical(v3, p3) || !looseIdentical(v4, p4) || !looseIdentical(v5, p5)) {
v0 = p0;

@@ -257,11 +243,10 @@ v1 = p1;

}
exports.pureProxy6 = pureProxy6;
function pureProxy7(fn) {
export function pureProxy7(fn) {
var result;
var v0, v1, v2, v3, v4, v5, v6;
v0 = v1 = v2 = v3 = v4 = v5 = v6 = change_detection_util_1.UNINITIALIZED;
v0 = v1 = v2 = v3 = v4 = v5 = v6 = UNINITIALIZED;
return function (p0, p1, p2, p3, p4, p5, p6) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1) || !lang_1.looseIdentical(v2, p2) ||
!lang_1.looseIdentical(v3, p3) || !lang_1.looseIdentical(v4, p4) || !lang_1.looseIdentical(v5, p5) ||
!lang_1.looseIdentical(v6, p6)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1) || !looseIdentical(v2, p2) ||
!looseIdentical(v3, p3) || !looseIdentical(v4, p4) || !looseIdentical(v5, p5) ||
!looseIdentical(v6, p6)) {
v0 = p0;

@@ -279,11 +264,10 @@ v1 = p1;

}
exports.pureProxy7 = pureProxy7;
function pureProxy8(fn) {
export function pureProxy8(fn) {
var result;
var v0, v1, v2, v3, v4, v5, v6, v7;
v0 = v1 = v2 = v3 = v4 = v5 = v6 = v7 = change_detection_util_1.UNINITIALIZED;
v0 = v1 = v2 = v3 = v4 = v5 = v6 = v7 = UNINITIALIZED;
return function (p0, p1, p2, p3, p4, p5, p6, p7) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1) || !lang_1.looseIdentical(v2, p2) ||
!lang_1.looseIdentical(v3, p3) || !lang_1.looseIdentical(v4, p4) || !lang_1.looseIdentical(v5, p5) ||
!lang_1.looseIdentical(v6, p6) || !lang_1.looseIdentical(v7, p7)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1) || !looseIdentical(v2, p2) ||
!looseIdentical(v3, p3) || !looseIdentical(v4, p4) || !looseIdentical(v5, p5) ||
!looseIdentical(v6, p6) || !looseIdentical(v7, p7)) {
v0 = p0;

@@ -302,11 +286,10 @@ v1 = p1;

}
exports.pureProxy8 = pureProxy8;
function pureProxy9(fn) {
export function pureProxy9(fn) {
var result;
var v0, v1, v2, v3, v4, v5, v6, v7, v8;
v0 = v1 = v2 = v3 = v4 = v5 = v6 = v7 = v8 = change_detection_util_1.UNINITIALIZED;
v0 = v1 = v2 = v3 = v4 = v5 = v6 = v7 = v8 = UNINITIALIZED;
return function (p0, p1, p2, p3, p4, p5, p6, p7, p8) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1) || !lang_1.looseIdentical(v2, p2) ||
!lang_1.looseIdentical(v3, p3) || !lang_1.looseIdentical(v4, p4) || !lang_1.looseIdentical(v5, p5) ||
!lang_1.looseIdentical(v6, p6) || !lang_1.looseIdentical(v7, p7) || !lang_1.looseIdentical(v8, p8)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1) || !looseIdentical(v2, p2) ||
!looseIdentical(v3, p3) || !looseIdentical(v4, p4) || !looseIdentical(v5, p5) ||
!looseIdentical(v6, p6) || !looseIdentical(v7, p7) || !looseIdentical(v8, p8)) {
v0 = p0;

@@ -326,12 +309,11 @@ v1 = p1;

}
exports.pureProxy9 = pureProxy9;
function pureProxy10(fn) {
export function pureProxy10(fn) {
var result;
var v0, v1, v2, v3, v4, v5, v6, v7, v8, v9;
v0 = v1 = v2 = v3 = v4 = v5 = v6 = v7 = v8 = v9 = change_detection_util_1.UNINITIALIZED;
v0 = v1 = v2 = v3 = v4 = v5 = v6 = v7 = v8 = v9 = UNINITIALIZED;
return function (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9) {
if (!lang_1.looseIdentical(v0, p0) || !lang_1.looseIdentical(v1, p1) || !lang_1.looseIdentical(v2, p2) ||
!lang_1.looseIdentical(v3, p3) || !lang_1.looseIdentical(v4, p4) || !lang_1.looseIdentical(v5, p5) ||
!lang_1.looseIdentical(v6, p6) || !lang_1.looseIdentical(v7, p7) || !lang_1.looseIdentical(v8, p8) ||
!lang_1.looseIdentical(v9, p9)) {
if (!looseIdentical(v0, p0) || !looseIdentical(v1, p1) || !looseIdentical(v2, p2) ||
!looseIdentical(v3, p3) || !looseIdentical(v4, p4) || !looseIdentical(v5, p5) ||
!looseIdentical(v6, p6) || !looseIdentical(v7, p7) || !looseIdentical(v8, p8) ||
!looseIdentical(v9, p9)) {
v0 = p0;

@@ -352,3 +334,2 @@ v1 = p1;

}
exports.pureProxy10 = pureProxy10;
//# sourceMappingURL=view_utils.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"ViewUtils":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di/decorators","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di/decorators","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../application_tokens","name":"APP_ID"}]}],null],"parameters":[{"__symbolic":"reference","module":"../render/api","name":"RootRenderer"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../security","name":"SanitizationService"}]}],"createRenderComponentType":[{"__symbolic":"method"}],"renderComponent":[{"__symbolic":"method"}]}},"flattenNestedViewRenderNodes":{"__symbolic":"function","parameters":["nodes"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"_flattenNestedViewRenderNodes"},"arguments":[{"__symbolic":"reference","name":"nodes"},[]]}},"MAX_INTERPOLATION_VALUES":9,"castByValue":{"__symbolic":"function","parameters":["input","value"],"value":{"__symbolic":"reference","name":"input"}},"EMPTY_ARRAY":[],"EMPTY_MAP":{}}}
{"__symbolic":"module","version":1,"metadata":{"ViewUtils":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di/decorators","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di/decorators","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../application_tokens","name":"APP_ID"}]}],null],"parameters":[{"__symbolic":"reference","module":"../render/api","name":"RootRenderer"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../security","name":"Sanitizer"}]}],"createRenderComponentType":[{"__symbolic":"method"}],"renderComponent":[{"__symbolic":"method"}]}},"flattenNestedViewRenderNodes":{"__symbolic":"function","parameters":["nodes"],"value":{"__symbolic":"error","message":"Reference to a non-exported function","line":53,"character":9,"context":{"name":"_flattenNestedViewRenderNodes"}}},"MAX_INTERPOLATION_VALUES":9,"castByValue":{"__symbolic":"function","parameters":["input","value"],"value":{"__symbolic":"reference","name":"input"}},"EMPTY_ARRAY":[],"EMPTY_MAP":{}}}

@@ -0,2 +1,4 @@

import { AnimationOutput } from '../animation/animation_output';
import { AnimationPlayer } from '../animation/animation_player';
import { AnimationTransitionEvent } from '../animation/animation_transition_event';
import { ViewAnimationMap } from '../animation/view_animation_map';

@@ -36,2 +38,3 @@ import { ChangeDetectorRef, ChangeDetectorStatus } from '../change_detection/change_detection';

animationPlayers: ViewAnimationMap;
private _animationListeners;
context: T;

@@ -41,4 +44,6 @@ constructor(clazz: any, componentType: RenderComponentType, type: ViewType, viewUtils: ViewUtils, parentInjector: Injector, declarationAppElement: AppElement, cdMode: ChangeDetectorStatus);

cancelActiveAnimation(element: any, animationName: string, removeAllAnimations?: boolean): void;
queueAnimation(element: any, animationName: string, player: AnimationPlayer): void;
queueAnimation(element: any, animationName: string, player: AnimationPlayer, totalTime: number, fromState: string, toState: string): void;
triggerQueuedAnimations(): void;
triggerAnimationOutput(element: any, animationName: string, phase: string, event: AnimationTransitionEvent): void;
registerAnimationOutput(element: any, outputEvent: AnimationOutput, eventHandler: Function): void;
create(context: T, givenProjectableNodes: Array<any | any[]>, rootSelectorOrNode: string | any): AppElement;

@@ -104,4 +109,4 @@ /**

debug(nodeIndex: number, rowNum: number, colNum: number): DebugContext;
private _rethrowWithContext(e, stack);
private _rethrowWithContext(e);
eventHandler(cb: Function): Function;
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,16 +14,17 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var animation_group_player_1 = require('../animation/animation_group_player');
var view_animation_map_1 = require('../animation/view_animation_map');
var change_detection_1 = require('../change_detection/change_detection');
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var profile_1 = require('../profile/profile');
var debug_context_1 = require('./debug_context');
var element_1 = require('./element');
var element_injector_1 = require('./element_injector');
var exceptions_1 = require('./exceptions');
var view_ref_1 = require('./view_ref');
var view_type_1 = require('./view_type');
var view_utils_1 = require('./view_utils');
var _scope_check = profile_1.wtfCreateScope("AppView#check(ascii id)");
import { AnimationGroupPlayer } from '../animation/animation_group_player';
import { AnimationTransitionEvent } from '../animation/animation_transition_event';
import { ViewAnimationMap } from '../animation/view_animation_map';
import { ChangeDetectorStatus } from '../change_detection/change_detection';
import { ListWrapper } from '../facade/collection';
import { isPresent } from '../facade/lang';
import { wtfCreateScope, wtfLeave } from '../profile/profile';
import { DebugContext } from './debug_context';
import { AppElement } from './element';
import { ElementInjector } from './element_injector';
import { ExpressionChangedAfterItHasBeenCheckedError, ViewDestroyedError, ViewWrappedError } from './errors';
import { ViewRef_ } from './view_ref';
import { ViewType } from './view_type';
import { ensureSlotCount, flattenNestedViewRenderNodes } from './view_utils';
var _scope_check = wtfCreateScope("AppView#check(ascii id)");
/**

@@ -34,3 +34,3 @@ * Cost of making objects: http://jsperf.com/instantiate-size-of-object

*/
var AppView = (function () {
export var AppView = (function () {
function AppView(clazz, componentType, type, viewUtils, parentInjector, declarationAppElement, cdMode) {

@@ -48,5 +48,6 @@ this.clazz = clazz;

this.numberOfChecks = 0;
this.animationPlayers = new view_animation_map_1.ViewAnimationMap();
this.ref = new view_ref_1.ViewRef_(this);
if (type === view_type_1.ViewType.COMPONENT || type === view_type_1.ViewType.HOST) {
this.animationPlayers = new ViewAnimationMap();
this._animationListeners = new Map();
this.ref = new ViewRef_(this);
if (type === ViewType.COMPONENT || type === ViewType.HOST) {
this.renderer = viewUtils.renderComponent(componentType);

@@ -59,3 +60,3 @@ }

Object.defineProperty(AppView.prototype, "destroyed", {
get: function () { return this.cdMode === change_detection_1.ChangeDetectorStatus.Destroyed; },
get: function () { return this.cdMode === ChangeDetectorStatus.Destroyed; },
enumerable: true,

@@ -71,3 +72,3 @@ configurable: true

var player = this.animationPlayers.find(element, animationName);
if (lang_1.isPresent(player)) {
if (isPresent(player)) {
player.destroy();

@@ -77,6 +78,12 @@ }

};
AppView.prototype.queueAnimation = function (element, animationName, player) {
AppView.prototype.queueAnimation = function (element, animationName, player, totalTime, fromState, toState) {
var _this = this;
var event = new AnimationTransitionEvent({ 'fromState': fromState, 'toState': toState, 'totalTime': totalTime });
this.animationPlayers.set(element, animationName, player);
player.onDone(function () { _this.animationPlayers.remove(element, animationName); });
player.onDone(function () {
// TODO: make this into a datastructure for done|start
_this.triggerAnimationOutput(element, animationName, 'done', event);
_this.animationPlayers.remove(element, animationName);
});
player.onStart(function () { _this.triggerAnimationOutput(element, animationName, 'start', event); });
};

@@ -90,2 +97,24 @@ AppView.prototype.triggerQueuedAnimations = function () {

};
AppView.prototype.triggerAnimationOutput = function (element, animationName, phase, event) {
var listeners = this._animationListeners.get(element);
if (isPresent(listeners) && listeners.length) {
for (var i = 0; i < listeners.length; i++) {
var listener = listeners[i];
// we check for both the name in addition to the phase in the event
// that there may be more than one @trigger on the same element
if (listener.output.name == animationName && listener.output.phase == phase) {
listener.handler(event);
break;
}
}
}
};
AppView.prototype.registerAnimationOutput = function (element, outputEvent, eventHandler) {
var entry = new _AnimationOutputWithHandler(outputEvent, eventHandler);
var animations = this._animationListeners.get(element);
if (!isPresent(animations)) {
this._animationListeners.set(element, animations = []);
}
animations.push(entry);
};
AppView.prototype.create = function (context, givenProjectableNodes, rootSelectorOrNode) {

@@ -95,9 +124,9 @@ this.context = context;

switch (this.type) {
case view_type_1.ViewType.COMPONENT:
projectableNodes = view_utils_1.ensureSlotCount(givenProjectableNodes, this.componentType.slotCount);
case ViewType.COMPONENT:
projectableNodes = ensureSlotCount(givenProjectableNodes, this.componentType.slotCount);
break;
case view_type_1.ViewType.EMBEDDED:
case ViewType.EMBEDDED:
projectableNodes = this.declarationAppElement.parentView.projectableNodes;
break;
case view_type_1.ViewType.HOST:
case ViewType.HOST:
// Note: Don't ensure the slot count for the projectableNodes as we store

@@ -108,3 +137,3 @@ // them only for the contained component view (which will later check the slot count...)

}
this._hasExternalHostElement = lang_1.isPresent(rootSelectorOrNode);
this._hasExternalHostElement = isPresent(rootSelectorOrNode);
this.projectableNodes = projectableNodes;

@@ -123,3 +152,3 @@ return this.createInternal(rootSelectorOrNode);

this.subscriptions = subscriptions;
if (this.type === view_type_1.ViewType.COMPONENT) {
if (this.type === ViewType.COMPONENT) {
// Note: the render nodes have been attached to their host element

@@ -133,3 +162,3 @@ // in the ViewFactory already.

var hostElement;
if (lang_1.isPresent(rootSelectorOrNode)) {
if (isPresent(rootSelectorOrNode)) {
hostElement = this.renderer.selectRootElement(rootSelectorOrNode, debugInfo);

@@ -152,4 +181,4 @@ }

AppView.prototype.injector = function (nodeIndex) {
if (lang_1.isPresent(nodeIndex)) {
return new element_injector_1.ElementInjector(this, nodeIndex);
if (isPresent(nodeIndex)) {
return new ElementInjector(this, nodeIndex);
}

@@ -164,3 +193,3 @@ else {

}
else if (lang_1.isPresent(this.viewContainerElement)) {
else if (isPresent(this.viewContainerElement)) {
this.viewContainerElement.detachView(this.viewContainerElement.nestedViews.indexOf(this));

@@ -171,3 +200,3 @@ }

AppView.prototype._destroyRecurse = function () {
if (this.cdMode === change_detection_1.ChangeDetectorStatus.Destroyed) {
if (this.cdMode === ChangeDetectorStatus.Destroyed) {
return;

@@ -184,7 +213,7 @@ }

this.destroyLocal();
this.cdMode = change_detection_1.ChangeDetectorStatus.Destroyed;
this.cdMode = ChangeDetectorStatus.Destroyed;
};
AppView.prototype.destroyLocal = function () {
var _this = this;
var hostElement = this.type === view_type_1.ViewType.COMPONENT ? this.declarationAppElement.nativeElement : null;
var hostElement = this.type === ViewType.COMPONENT ? this.declarationAppElement.nativeElement : null;
for (var i = 0; i < this.disposables.length; i++) {

@@ -202,3 +231,3 @@ this.disposables[i]();

else {
var player = new animation_group_player_1.AnimationGroupPlayer(this.animationPlayers.getAllPlayers());
var player = new AnimationGroupPlayer(this.animationPlayers.getAllPlayers());
player.onDone(function () { _this.renderer.destroyView(hostElement, _this.allNodes); });

@@ -222,3 +251,3 @@ }

else {
var player = new animation_group_player_1.AnimationGroupPlayer(this.animationPlayers.getAllPlayers());
var player = new AnimationGroupPlayer(this.animationPlayers.getAllPlayers());
player.onDone(function () { _this.renderer.detachView(_this.flatRootNodes); });

@@ -234,3 +263,3 @@ }

get: function () {
return lang_1.isPresent(this.declarationAppElement) ? this.declarationAppElement.parentView : null;
return isPresent(this.declarationAppElement) ? this.declarationAppElement.parentView : null;
},

@@ -241,3 +270,3 @@ enumerable: true,

Object.defineProperty(AppView.prototype, "flatRootNodes", {
get: function () { return view_utils_1.flattenNestedViewRenderNodes(this.rootNodesOrAppElements); },
get: function () { return flattenNestedViewRenderNodes(this.rootNodesOrAppElements); },
enumerable: true,

@@ -262,13 +291,13 @@ configurable: true

var s = _scope_check(this.clazz);
if (this.cdMode === change_detection_1.ChangeDetectorStatus.Checked ||
this.cdMode === change_detection_1.ChangeDetectorStatus.Errored)
if (this.cdMode === ChangeDetectorStatus.Checked ||
this.cdMode === ChangeDetectorStatus.Errored)
return;
if (this.cdMode === change_detection_1.ChangeDetectorStatus.Destroyed) {
if (this.cdMode === ChangeDetectorStatus.Destroyed) {
this.throwDestroyedError('detectChanges');
}
this.detectChangesInternal(throwOnChange);
if (this.cdMode === change_detection_1.ChangeDetectorStatus.CheckOnce)
this.cdMode = change_detection_1.ChangeDetectorStatus.Checked;
if (this.cdMode === ChangeDetectorStatus.CheckOnce)
this.cdMode = ChangeDetectorStatus.Checked;
this.numberOfChecks++;
profile_1.wtfLeave(s);
wtfLeave(s);
};

@@ -285,3 +314,3 @@ /**

var child = this.contentChildren[i];
if (child.cdMode === change_detection_1.ChangeDetectorStatus.Detached)
if (child.cdMode === ChangeDetectorStatus.Detached)
continue;

@@ -294,3 +323,3 @@ child.detectChanges(throwOnChange);

var child = this.viewChildren[i];
if (child.cdMode === change_detection_1.ChangeDetectorStatus.Detached)
if (child.cdMode === ChangeDetectorStatus.Detached)
continue;

@@ -307,23 +336,22 @@ child.detectChanges(throwOnChange);

AppView.prototype.removeFromContentChildren = function (renderAppElement) {
collection_1.ListWrapper.remove(renderAppElement.parentView.contentChildren, this);
ListWrapper.remove(renderAppElement.parentView.contentChildren, this);
this.dirtyParentQueriesInternal();
this.viewContainerElement = null;
};
AppView.prototype.markAsCheckOnce = function () { this.cdMode = change_detection_1.ChangeDetectorStatus.CheckOnce; };
AppView.prototype.markAsCheckOnce = function () { this.cdMode = ChangeDetectorStatus.CheckOnce; };
AppView.prototype.markPathToRootAsCheckOnce = function () {
var c = this;
while (lang_1.isPresent(c) && c.cdMode !== change_detection_1.ChangeDetectorStatus.Detached) {
if (c.cdMode === change_detection_1.ChangeDetectorStatus.Checked) {
c.cdMode = change_detection_1.ChangeDetectorStatus.CheckOnce;
while (isPresent(c) && c.cdMode !== ChangeDetectorStatus.Detached) {
if (c.cdMode === ChangeDetectorStatus.Checked) {
c.cdMode = ChangeDetectorStatus.CheckOnce;
}
var parentEl = c.type === view_type_1.ViewType.COMPONENT ? c.declarationAppElement : c.viewContainerElement;
c = lang_1.isPresent(parentEl) ? parentEl.parentView : null;
var parentEl = c.type === ViewType.COMPONENT ? c.declarationAppElement : c.viewContainerElement;
c = isPresent(parentEl) ? parentEl.parentView : null;
}
};
AppView.prototype.eventHandler = function (cb) { return cb; };
AppView.prototype.throwDestroyedError = function (details) { throw new exceptions_1.ViewDestroyedException(details); };
AppView.prototype.throwDestroyedError = function (details) { throw new ViewDestroyedError(details); };
return AppView;
}());
exports.AppView = AppView;
var DebugAppView = (function (_super) {
export var DebugAppView = (function (_super) {
__extends(DebugAppView, _super);

@@ -341,3 +369,3 @@ function DebugAppView(clazz, componentType, type, viewUtils, parentInjector, declarationAppElement, cdMode, staticNodeDebugInfos) {

catch (e) {
this._rethrowWithContext(e, e.stack);
this._rethrowWithContext(e);
throw e;

@@ -352,3 +380,3 @@ }

catch (e) {
this._rethrowWithContext(e, e.stack);
this._rethrowWithContext(e);
throw e;

@@ -363,3 +391,3 @@ }

catch (e) {
this._rethrowWithContext(e, e.stack);
this._rethrowWithContext(e);
throw e;

@@ -374,3 +402,3 @@ }

catch (e) {
this._rethrowWithContext(e, e.stack);
this._rethrowWithContext(e);
throw e;

@@ -385,3 +413,3 @@ }

catch (e) {
this._rethrowWithContext(e, e.stack);
this._rethrowWithContext(e);
throw e;

@@ -392,11 +420,11 @@ }

DebugAppView.prototype.debug = function (nodeIndex, rowNum, colNum) {
return this._currentDebugContext = new debug_context_1.DebugContext(this, nodeIndex, rowNum, colNum);
return this._currentDebugContext = new DebugContext(this, nodeIndex, rowNum, colNum);
};
DebugAppView.prototype._rethrowWithContext = function (e, stack) {
if (!(e instanceof exceptions_1.ViewWrappedException)) {
if (!(e instanceof exceptions_1.ExpressionChangedAfterItHasBeenCheckedException)) {
this.cdMode = change_detection_1.ChangeDetectorStatus.Errored;
DebugAppView.prototype._rethrowWithContext = function (e) {
if (!(e instanceof ViewWrappedError)) {
if (!(e instanceof ExpressionChangedAfterItHasBeenCheckedError)) {
this.cdMode = ChangeDetectorStatus.Errored;
}
if (lang_1.isPresent(this._currentDebugContext)) {
throw new exceptions_1.ViewWrappedException(e, stack, this._currentDebugContext);
if (isPresent(this._currentDebugContext)) {
throw new ViewWrappedError(e, this._currentDebugContext);
}

@@ -414,3 +442,3 @@ }

catch (e) {
_this._rethrowWithContext(e, e.stack);
_this._rethrowWithContext(e);
throw e;

@@ -422,9 +450,8 @@ }

}(AppView));
exports.DebugAppView = DebugAppView;
function _findLastRenderNode(node) {
var lastNode;
if (node instanceof element_1.AppElement) {
if (node instanceof AppElement) {
var appEl = node;
lastNode = appEl.nativeElement;
if (lang_1.isPresent(appEl.nestedViews)) {
if (isPresent(appEl.nestedViews)) {
// Note: Views might have no root nodes at all!

@@ -444,2 +471,9 @@ for (var i = appEl.nestedViews.length - 1; i >= 0; i--) {

}
var _AnimationOutputWithHandler = (function () {
function _AnimationOutputWithHandler(output, handler) {
this.output = output;
this.handler = handler;
}
return _AnimationOutputWithHandler;
}());
//# sourceMappingURL=view.js.map

@@ -1,5 +0,16 @@

import { Type } from '../src/facade/lang';
import { AttributeMetadata, ContentChildrenMetadata, QueryMetadata, ViewChildrenMetadata } from './metadata/di';
/**
* @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
*/
/**
* This indirection is needed to free up Component, etc symbols in the public API
* to be used by the decorator versions of these annotations.
*/
import { AttributeMetadata, ContentChildrenMetadata, ViewChildrenMetadata } from './metadata/di';
import { ComponentMetadata, ComponentMetadataType, DirectiveMetadata, DirectiveMetadataType, PipeMetadataType } from './metadata/directives';
import { NgModuleMetadata, NgModuleMetadataType } from './metadata/ng_module';
import { Type } from './type';
import { TypeDecorator } from './util/decorators';

@@ -9,4 +20,4 @@ export { ANALYZE_FOR_ENTRY_COMPONENTS, AttributeMetadata, ContentChildMetadata, ContentChildrenMetadata, QueryMetadata, ViewChildMetadata, ViewChildrenMetadata, ViewQueryMetadata } from './metadata/di';

export { AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit } from './metadata/lifecycle_hooks';
export { CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NgModuleMetadata, NgModuleMetadataType, SchemaMetadata } from './metadata/ng_module';
export { ViewEncapsulation, ViewMetadata } from './metadata/view';
export { CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NO_ERRORS_SCHEMA, NgModuleMetadata, NgModuleMetadataType, SchemaMetadata } from './metadata/ng_module';
export { ViewEncapsulation } from './metadata/view';
/**

@@ -154,56 +165,2 @@ * Interface for the {@link DirectiveMetadata} decorator function.

/**
* {@link QueryMetadata} factory for creating annotations, decorators or DSL.
*
* ### Example as TypeScript Decorator
*
* ```
* import {Query, QueryList, Component} from '@angular/core';
*
* @Component({...})
* class MyComponent {
* constructor(@Query(SomeType) queryList: QueryList<SomeType>) {
* ...
* }
* }
* ```
*
* ### Example as ES5 DSL
*
* ```
* var MyComponent = ng
* .Component({...})
* .Class({
* constructor: [new ng.Query(SomeType), function(queryList) {
* ...
* }]
* })
* ```
*
* ### Example as ES5 annotation
*
* ```
* var MyComponent = function(queryList) {
* ...
* };
*
* MyComponent.annotations = [
* new ng.Component({...})
* ]
* MyComponent.parameters = [
* [new ng.Query(SomeType)]
* ]
* ```
* @deprecated
*/
export interface QueryMetadataFactory {
(selector: Type | string, {descendants, read}?: {
descendants?: boolean;
read?: any;
}): ParameterDecorator;
new (selector: Type | string, {descendants, read}?: {
descendants?: boolean;
read?: any;
}): QueryMetadata;
}
/**
* Factory for {@link ContentChildren}.

@@ -213,7 +170,7 @@ * @stable

export interface ContentChildrenMetadataFactory {
(selector: Type | string, {descendants, read}?: {
(selector: Type<any> | Function | string, {descendants, read}?: {
descendants?: boolean;
read?: any;
}): any;
new (selector: Type | string, {descendants, read}?: {
new (selector: Type<any> | Function | string, {descendants, read}?: {
descendants?: boolean;

@@ -228,6 +185,6 @@ read?: any;

export interface ContentChildMetadataFactory {
(selector: Type | string, {read}?: {
(selector: Type<any> | Function | string, {read}?: {
read?: any;
}): any;
new (selector: Type | string, {read}?: {
new (selector: Type<any> | Function | string, {read}?: {
read?: any;

@@ -241,6 +198,6 @@ }): ContentChildMetadataFactory;

export interface ViewChildrenMetadataFactory {
(selector: Type | string, {read}?: {
(selector: Type<any> | Function | string, {read}?: {
read?: any;
}): any;
new (selector: Type | string, {read}?: {
new (selector: Type<any> | Function | string, {read}?: {
read?: any;

@@ -254,6 +211,6 @@ }): ViewChildrenMetadata;

export interface ViewChildMetadataFactory {
(selector: Type | string, {read}?: {
(selector: Type<any> | Function | string, {read}?: {
read?: any;
}): any;
new (selector: Type | string, {read}?: {
new (selector: Type<any> | Function | string, {read}?: {
read?: any;

@@ -313,3 +270,3 @@ }): ViewChildMetadataFactory;

*
* @experimental
* @stable
*/

@@ -751,112 +708,2 @@ export interface NgModuleMetadataFactory {

/**
* Declares an injectable parameter to be a live list of directives or variable
* bindings from the content children of a directive.
*
* ### Example ([live demo](http://plnkr.co/edit/lY9m8HLy7z06vDoUaSN2?p=preview))
*
* Assume that `<tabs>` component would like to get a list its children `<pane>`
* components as shown in this example:
*
* ```html
* <tabs>
* <pane title="Overview">...</pane>
* <pane *ngFor="let o of objects" [title]="o.title">{{o.text}}</pane>
* </tabs>
* ```
*
* The preferred solution is to query for `Pane` directives using this decorator.
*
* ```javascript
* @Component({
* selector: 'pane',
* inputs: ['title']
* })
* class Pane {
* title:string;
* }
*
* @Component({
* selector: 'tabs',
* template: `
* <ul>
* <li *ngFor="let pane of panes">{{pane.title}}</li>
* </ul>
* <ng-content></ng-content>
* `
* })
* class Tabs {
* panes: QueryList<Pane>;
* constructor(@Query(Pane) panes:QueryList<Pane>) {
* this.panes = panes;
* }
* }
* ```
*
* A query can look for variable bindings by passing in a string with desired binding symbol.
*
* ### Example ([live demo](http://plnkr.co/edit/sT2j25cH1dURAyBRCKx1?p=preview))
* ```html
* <seeker>
* <div #findme>...</div>
* </seeker>
*
* @Component({ selector: 'seeker' })
* class seeker {
* constructor(@Query('findme') elList: QueryList<ElementRef>) {...}
* }
* ```
*
* In this case the object that is injected depend on the type of the variable
* binding. It can be an ElementRef, a directive or a component.
*
* Passing in a comma separated list of variable bindings will query for all of them.
*
* ```html
* <seeker>
* <div #findMe>...</div>
* <div #findMeToo>...</div>
* </seeker>
*
* @Component({
* selector: 'seeker'
* })
* class Seeker {
* constructor(@Query('findMe, findMeToo') elList: QueryList<ElementRef>) {...}
* }
* ```
*
* Configure whether query looks for direct children or all descendants
* of the querying element, by using the `descendants` parameter.
* It is set to `false` by default.
*
* ### Example ([live demo](http://plnkr.co/edit/wtGeB977bv7qvA5FTYl9?p=preview))
* ```html
* <container #first>
* <item>a</item>
* <item>b</item>
* <container #second>
* <item>c</item>
* </container>
* </container>
* ```
*
* When querying for items, the first container will see only `a` and `b` by default,
* but with `Query(TextDirective, {descendants: true})` it will see `c` too.
*
* The queried directives are kept in a depth-first pre-order with respect to their
* positions in the DOM.
*
* Query does not look deep into any subcomponent views.
*
* Query is updated as part of the change-detection cycle. Since change detection
* happens after construction of a directive, QueryList will always be empty when observed in the
* constructor.
*
* The injected object is an unmodifiable live list.
* See {@link QueryList} for more details.
* @deprecated
* @Annotation
*/
export declare var Query: QueryMetadataFactory;
/**
* Configures a content query.

@@ -1072,40 +919,2 @@ *

/**
* Similar to {@link QueryMetadata}, but querying the component view, instead of
* the content children.
*
* ### Example ([live demo](http://plnkr.co/edit/eNsFHDf7YjyM6IzKxM1j?p=preview))
*
* ```javascript
* @Component({
* ...,
* template: `
* <item> a </item>
* <item> b </item>
* <item> c </item>
* `
* })
* class MyComponent {
* shown: boolean;
*
* constructor(private @Query(Item) items:QueryList<Item>) {
* items.changes.subscribe(() => console.log(items.length));
* }
* }
* ```
*
* Supports the same querying parameters as {@link QueryMetadata}, except
* `descendants`. This always queries the whole view.
*
* As `shown` is flipped between true and false, items will contain zero of one
* items.
*
* Specifies that a {@link QueryList} should be injected.
*
* The injected object is an iterable and observable live list.
* See {@link QueryList} for more details.
* @deprecated
* @Annotation
*/
export declare var ViewQuery: QueryMetadataFactory;
/**
* Declare reusable pipe function.

@@ -1157,4 +966,2 @@ *

* class App {}
*
* bootstrap(App);
* ```

@@ -1203,3 +1010,2 @@ * @stable

* }
* bootstrap(App);
* ```

@@ -1241,4 +1047,2 @@ * @stable

* }
*
* bootstrap(App);
* ```

@@ -1279,4 +1083,2 @@ * @stable

* class App {}
*
* bootstrap(App);
* ```

@@ -1289,5 +1091,5 @@ * @stable

* Declares an ng module.
* @experimental
* @stable
* @Annotation
*/
export declare var NgModule: NgModuleMetadataFactory;

@@ -8,39 +8,11 @@ /**

*/
"use strict";
var di_1 = require('./metadata/di');
var directives_1 = require('./metadata/directives');
var ng_module_1 = require('./metadata/ng_module');
var decorators_1 = require('./util/decorators');
var di_2 = require('./metadata/di');
exports.ANALYZE_FOR_ENTRY_COMPONENTS = di_2.ANALYZE_FOR_ENTRY_COMPONENTS;
exports.AttributeMetadata = di_2.AttributeMetadata;
exports.ContentChildMetadata = di_2.ContentChildMetadata;
exports.ContentChildrenMetadata = di_2.ContentChildrenMetadata;
exports.QueryMetadata = di_2.QueryMetadata;
exports.ViewChildMetadata = di_2.ViewChildMetadata;
exports.ViewChildrenMetadata = di_2.ViewChildrenMetadata;
exports.ViewQueryMetadata = di_2.ViewQueryMetadata;
var directives_2 = require('./metadata/directives');
exports.ComponentMetadata = directives_2.ComponentMetadata;
exports.DirectiveMetadata = directives_2.DirectiveMetadata;
exports.HostBindingMetadata = directives_2.HostBindingMetadata;
exports.HostListenerMetadata = directives_2.HostListenerMetadata;
exports.InputMetadata = directives_2.InputMetadata;
exports.OutputMetadata = directives_2.OutputMetadata;
exports.PipeMetadata = directives_2.PipeMetadata;
var lifecycle_hooks_1 = require('./metadata/lifecycle_hooks');
exports.AfterContentChecked = lifecycle_hooks_1.AfterContentChecked;
exports.AfterContentInit = lifecycle_hooks_1.AfterContentInit;
exports.AfterViewChecked = lifecycle_hooks_1.AfterViewChecked;
exports.AfterViewInit = lifecycle_hooks_1.AfterViewInit;
exports.DoCheck = lifecycle_hooks_1.DoCheck;
exports.OnChanges = lifecycle_hooks_1.OnChanges;
exports.OnDestroy = lifecycle_hooks_1.OnDestroy;
exports.OnInit = lifecycle_hooks_1.OnInit;
var ng_module_2 = require('./metadata/ng_module');
exports.CUSTOM_ELEMENTS_SCHEMA = ng_module_2.CUSTOM_ELEMENTS_SCHEMA;
exports.NgModuleMetadata = ng_module_2.NgModuleMetadata;
var view_1 = require('./metadata/view');
exports.ViewEncapsulation = view_1.ViewEncapsulation;
exports.ViewMetadata = view_1.ViewMetadata;
import { AttributeMetadata, ContentChildMetadata, ContentChildrenMetadata, ViewChildMetadata, ViewChildrenMetadata } from './metadata/di';
import { ComponentMetadata, DirectiveMetadata, HostBindingMetadata, HostListenerMetadata, InputMetadata, OutputMetadata, PipeMetadata } from './metadata/directives';
import { NgModuleMetadata } from './metadata/ng_module';
import { makeDecorator, makeParamDecorator, makePropDecorator } from './util/decorators';
export { ANALYZE_FOR_ENTRY_COMPONENTS, AttributeMetadata, ContentChildMetadata, ContentChildrenMetadata, QueryMetadata, ViewChildMetadata, ViewChildrenMetadata, ViewQueryMetadata } from './metadata/di';
export { ComponentMetadata, DirectiveMetadata, HostBindingMetadata, HostListenerMetadata, InputMetadata, OutputMetadata, PipeMetadata } from './metadata/directives';
export { AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit } from './metadata/lifecycle_hooks';
export { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, NgModuleMetadata } from './metadata/ng_module';
export { ViewEncapsulation } from './metadata/view';
// TODO(alexeagle): remove the duplication of this doc. It is copied from ComponentMetadata.

@@ -73,3 +45,3 @@ /**

*/
exports.Component = decorators_1.makeDecorator(directives_1.ComponentMetadata);
export var Component = makeDecorator(ComponentMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from DirectiveMetadata.

@@ -458,3 +430,3 @@ /**

*/
exports.Directive = decorators_1.makeDecorator(directives_1.DirectiveMetadata);
export var Directive = makeDecorator(DirectiveMetadata);
/**

@@ -479,114 +451,3 @@ * Specifies that a constant attribute value should be injected.

*/
exports.Attribute = decorators_1.makeParamDecorator(di_1.AttributeMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from QueryMetadata.
/**
* Declares an injectable parameter to be a live list of directives or variable
* bindings from the content children of a directive.
*
* ### Example ([live demo](http://plnkr.co/edit/lY9m8HLy7z06vDoUaSN2?p=preview))
*
* Assume that `<tabs>` component would like to get a list its children `<pane>`
* components as shown in this example:
*
* ```html
* <tabs>
* <pane title="Overview">...</pane>
* <pane *ngFor="let o of objects" [title]="o.title">{{o.text}}</pane>
* </tabs>
* ```
*
* The preferred solution is to query for `Pane` directives using this decorator.
*
* ```javascript
* @Component({
* selector: 'pane',
* inputs: ['title']
* })
* class Pane {
* title:string;
* }
*
* @Component({
* selector: 'tabs',
* template: `
* <ul>
* <li *ngFor="let pane of panes">{{pane.title}}</li>
* </ul>
* <ng-content></ng-content>
* `
* })
* class Tabs {
* panes: QueryList<Pane>;
* constructor(@Query(Pane) panes:QueryList<Pane>) {
* this.panes = panes;
* }
* }
* ```
*
* A query can look for variable bindings by passing in a string with desired binding symbol.
*
* ### Example ([live demo](http://plnkr.co/edit/sT2j25cH1dURAyBRCKx1?p=preview))
* ```html
* <seeker>
* <div #findme>...</div>
* </seeker>
*
* @Component({ selector: 'seeker' })
* class seeker {
* constructor(@Query('findme') elList: QueryList<ElementRef>) {...}
* }
* ```
*
* In this case the object that is injected depend on the type of the variable
* binding. It can be an ElementRef, a directive or a component.
*
* Passing in a comma separated list of variable bindings will query for all of them.
*
* ```html
* <seeker>
* <div #findMe>...</div>
* <div #findMeToo>...</div>
* </seeker>
*
* @Component({
* selector: 'seeker'
* })
* class Seeker {
* constructor(@Query('findMe, findMeToo') elList: QueryList<ElementRef>) {...}
* }
* ```
*
* Configure whether query looks for direct children or all descendants
* of the querying element, by using the `descendants` parameter.
* It is set to `false` by default.
*
* ### Example ([live demo](http://plnkr.co/edit/wtGeB977bv7qvA5FTYl9?p=preview))
* ```html
* <container #first>
* <item>a</item>
* <item>b</item>
* <container #second>
* <item>c</item>
* </container>
* </container>
* ```
*
* When querying for items, the first container will see only `a` and `b` by default,
* but with `Query(TextDirective, {descendants: true})` it will see `c` too.
*
* The queried directives are kept in a depth-first pre-order with respect to their
* positions in the DOM.
*
* Query does not look deep into any subcomponent views.
*
* Query is updated as part of the change-detection cycle. Since change detection
* happens after construction of a directive, QueryList will always be empty when observed in the
* constructor.
*
* The injected object is an unmodifiable live list.
* See {@link QueryList} for more details.
* @deprecated
* @Annotation
*/
exports.Query = decorators_1.makeParamDecorator(di_1.QueryMetadata);
export var Attribute = makeParamDecorator(AttributeMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from ContentChildrenMetadata.

@@ -615,3 +476,3 @@ /**

*/
exports.ContentChildren = decorators_1.makePropDecorator(di_1.ContentChildrenMetadata);
export var ContentChildren = makePropDecorator(ContentChildrenMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from ContentChildMetadata.

@@ -649,3 +510,3 @@ /**

*/
exports.ContentChild = decorators_1.makePropDecorator(di_1.ContentChildMetadata);
export var ContentChild = makePropDecorator(ContentChildMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from ViewChildrenMetadata.

@@ -733,3 +594,3 @@ /**

*/
exports.ViewChildren = decorators_1.makePropDecorator(di_1.ViewChildrenMetadata);
export var ViewChildren = makePropDecorator(ViewChildrenMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from ViewChildMetadata.

@@ -808,42 +669,3 @@ /**

*/
exports.ViewChild = decorators_1.makePropDecorator(di_1.ViewChildMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from ViewQueryMetadata.
/**
* Similar to {@link QueryMetadata}, but querying the component view, instead of
* the content children.
*
* ### Example ([live demo](http://plnkr.co/edit/eNsFHDf7YjyM6IzKxM1j?p=preview))
*
* ```javascript
* @Component({
* ...,
* template: `
* <item> a </item>
* <item> b </item>
* <item> c </item>
* `
* })
* class MyComponent {
* shown: boolean;
*
* constructor(private @Query(Item) items:QueryList<Item>) {
* items.changes.subscribe(() => console.log(items.length));
* }
* }
* ```
*
* Supports the same querying parameters as {@link QueryMetadata}, except
* `descendants`. This always queries the whole view.
*
* As `shown` is flipped between true and false, items will contain zero of one
* items.
*
* Specifies that a {@link QueryList} should be injected.
*
* The injected object is an iterable and observable live list.
* See {@link QueryList} for more details.
* @deprecated
* @Annotation
*/
exports.ViewQuery = decorators_1.makeParamDecorator(di_1.ViewQueryMetadata);
export var ViewChild = makePropDecorator(ViewChildMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from PipeMetadata.

@@ -859,3 +681,3 @@ /**

*/
exports.Pipe = decorators_1.makeDecorator(directives_1.PipeMetadata);
export var Pipe = makeDecorator(PipeMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from InputMetadata.

@@ -899,4 +721,2 @@ /**

* class App {}
*
* bootstrap(App);
* ```

@@ -906,3 +726,3 @@ * @stable

*/
exports.Input = decorators_1.makePropDecorator(directives_1.InputMetadata);
export var Input = makePropDecorator(InputMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from OutputMetadata.

@@ -947,3 +767,2 @@ /**

* }
* bootstrap(App);
* ```

@@ -953,3 +772,3 @@ * @stable

*/
exports.Output = decorators_1.makePropDecorator(directives_1.OutputMetadata);
export var Output = makePropDecorator(OutputMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from HostBindingMetadata.

@@ -987,4 +806,2 @@ /**

* }
*
* bootstrap(App);
* ```

@@ -994,3 +811,3 @@ * @stable

*/
exports.HostBinding = decorators_1.makePropDecorator(directives_1.HostBindingMetadata);
export var HostBinding = makePropDecorator(HostBindingMetadata);
// TODO(alexeagle): remove the duplication of this doc. It is copied from HostListenerMetadata.

@@ -1027,4 +844,2 @@ /**

* class App {}
*
* bootstrap(App);
* ```

@@ -1034,9 +849,9 @@ * @stable

*/
exports.HostListener = decorators_1.makePropDecorator(directives_1.HostListenerMetadata);
export var HostListener = makePropDecorator(HostListenerMetadata);
/**
* Declares an ng module.
* @experimental
* @stable
* @Annotation
*/
exports.NgModule = decorators_1.makeDecorator(ng_module_1.NgModuleMetadata);
export var NgModule = makeDecorator(NgModuleMetadata);
//# sourceMappingURL=metadata.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"Component":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"ComponentMetadata"}]},"Directive":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"DirectiveMetadata"}]},"Attribute":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeParamDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"AttributeMetadata"}]},"Query":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeParamDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"QueryMetadata"}]},"ContentChildren":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ContentChildrenMetadata"}]},"ContentChild":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ContentChildMetadata"}]},"ViewChildren":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ViewChildrenMetadata"}]},"ViewChild":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ViewChildMetadata"}]},"ViewQuery":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeParamDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ViewQueryMetadata"}]},"Pipe":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"PipeMetadata"}]},"Input":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"InputMetadata"}]},"Output":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"OutputMetadata"}]},"HostBinding":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"HostBindingMetadata"}]},"HostListener":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"HostListenerMetadata"}]},"NgModule":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/ng_module","name":"NgModuleMetadata"}]}},"exports":[{"from":"./metadata/di","export":["ANALYZE_FOR_ENTRY_COMPONENTS","AttributeMetadata","ContentChildMetadata","ContentChildrenMetadata","QueryMetadata","ViewChildMetadata","ViewChildrenMetadata","ViewQueryMetadata"]},{"from":"./metadata/directives","export":["ComponentMetadata","ComponentMetadataType","DirectiveMetadata","DirectiveMetadataType","HostBindingMetadata","HostListenerMetadata","InputMetadata","OutputMetadata","PipeMetadata","PipeMetadataType"]},{"from":"./metadata/lifecycle_hooks","export":["AfterContentChecked","AfterContentInit","AfterViewChecked","AfterViewInit","DoCheck","OnChanges","OnDestroy","OnInit"]},{"from":"./metadata/ng_module","export":["CUSTOM_ELEMENTS_SCHEMA","ModuleWithProviders","NgModuleMetadata","NgModuleMetadataType","SchemaMetadata"]},{"from":"./metadata/view","export":["ViewEncapsulation","ViewMetadata"]}]}
{"__symbolic":"module","version":1,"metadata":{"Component":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"ComponentMetadata"}]},"Directive":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"DirectiveMetadata"}]},"Attribute":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeParamDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"AttributeMetadata"}]},"ContentChildren":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ContentChildrenMetadata"}]},"ContentChild":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ContentChildMetadata"}]},"ViewChildren":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ViewChildrenMetadata"}]},"ViewChild":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/di","name":"ViewChildMetadata"}]},"Pipe":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"PipeMetadata"}]},"Input":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"InputMetadata"}]},"Output":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"OutputMetadata"}]},"HostBinding":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"HostBindingMetadata"}]},"HostListener":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makePropDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/directives","name":"HostListenerMetadata"}]},"NgModule":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"arguments":[{"__symbolic":"reference","module":"./metadata/ng_module","name":"NgModuleMetadata"}]}},"exports":[{"from":"./metadata/di","export":["ANALYZE_FOR_ENTRY_COMPONENTS","AttributeMetadata","ContentChildMetadata","ContentChildrenMetadata","QueryMetadata","ViewChildMetadata","ViewChildrenMetadata","ViewQueryMetadata"]},{"from":"./metadata/directives","export":["ComponentMetadata","ComponentMetadataType","DirectiveMetadata","DirectiveMetadataType","HostBindingMetadata","HostListenerMetadata","InputMetadata","OutputMetadata","PipeMetadata","PipeMetadataType"]},{"from":"./metadata/lifecycle_hooks","export":["AfterContentChecked","AfterContentInit","AfterViewChecked","AfterViewInit","DoCheck","OnChanges","OnDestroy","OnInit"]},{"from":"./metadata/ng_module","export":["CUSTOM_ELEMENTS_SCHEMA","ModuleWithProviders","NO_ERRORS_SCHEMA","NgModuleMetadata","NgModuleMetadataType","SchemaMetadata"]},{"from":"./metadata/view","export":["ViewEncapsulation"]}]}
import { DependencyMetadata } from '../di/metadata';
import { OpaqueToken } from '../di/opaque_token';
import { Type } from '../facade/lang';
import { Type } from '../type';
/**

@@ -100,6 +100,3 @@ * This token can be used to create a virtual provider that will populate the

* class Tabs {
* panes: QueryList<Pane>;
* constructor(@Query(Pane) panes:QueryList<Pane>) {
* this.panes = panes;
* }
* @ContentChildren(Pane) panes: QueryList<Pane>;
* }

@@ -118,3 +115,3 @@ * ```

* class Seeker {
* constructor(@Query('findme') elList: QueryList<ElementRef>) {...}
* @ContentChildren('findme') elList;
* }

@@ -138,3 +135,3 @@ * ```

* class Seeker {
* constructor(@Query('findMe, findMeToo') elList: QueryList<ElementRef>) {...}
* @ContentChildren('findMe, findMeToo') elList: QueryList<ElementRef>;
* }

@@ -159,3 +156,3 @@ * ```

* When querying for items, the first container will see only `a` and `b` by default,
* but with `Query(TextDirective, {descendants: true})` it will see `c` too.
* but with `ContentChildren(TextDirective, {descendants: true})` it will see `c` too.
*

@@ -165,5 +162,5 @@ * The queried directives are kept in a depth-first pre-order with respect to their

*
* Query does not look deep into any subcomponent views.
* ContentChildren does not look deep into any subcomponent views.
*
* Query is updated as part of the change-detection cycle. Since change detection
* ContentChildren is updated as part of the change-detection cycle. Since change detection
* happens after construction of a directive, QueryList will always be empty when observed in the

@@ -174,3 +171,3 @@ * constructor.

* See {@link QueryList} for more details.
* @deprecated
* @stable
*/

@@ -189,3 +186,3 @@ export declare class QueryMetadata extends DependencyMetadata {

read: any;
constructor(_selector: Type | string, {descendants, first, read}?: {
constructor(_selector: Type<any> | string, {descendants, first, read}?: {
descendants?: boolean;

@@ -236,3 +233,3 @@ first?: boolean;

export declare class ContentChildrenMetadata extends QueryMetadata {
constructor(_selector: Type | string, {descendants, read}?: {
constructor(_selector: Type<any> | string, {descendants, read}?: {
descendants?: boolean;

@@ -264,3 +261,3 @@ read?: any;

export declare class ContentChildMetadata extends QueryMetadata {
constructor(_selector: Type | string, {read}?: {
constructor(_selector: Type<any> | string, {read}?: {
read?: any;

@@ -270,4 +267,4 @@ });

/**
* Similar to {@link QueryMetadata}, but querying the component view, instead of
* the content children.
* Similar to {@link ContentChildMetadata}, but querying the component view, instead
* of the content children.
*

@@ -288,3 +285,3 @@ * ### Example ([live demo](http://plnkr.co/edit/eNsFHDf7YjyM6IzKxM1j?p=preview))

*
* constructor(private @ViewQuery(Item) items:QueryList<Item>) {
* constructor(private @ViewChildren(Item) items:QueryList<Item>) {
* items.changes.subscribe(() => console.log(items.length));

@@ -295,5 +292,2 @@ * }

*
* Supports the same querying parameters as {@link QueryMetadata}, except
* `descendants`. This always queries the whole view.
*
* As `shown` is flipped between true and false, items will contain zero of one

@@ -306,6 +300,6 @@ * items.

* See {@link QueryList} for more details.
* @deprecated
* @stable
*/
export declare class ViewQueryMetadata extends QueryMetadata {
constructor(_selector: Type | string, {descendants, first, read}?: {
constructor(_selector: Type<any> | string, {descendants, first, read}?: {
descendants?: boolean;

@@ -319,3 +313,2 @@ first?: boolean;

isViewQuery: boolean;
toString(): string;
}

@@ -401,5 +394,6 @@ /**

export declare class ViewChildrenMetadata extends ViewQueryMetadata {
constructor(_selector: Type | string, {read}?: {
constructor(_selector: Type<any> | string, {read}?: {
read?: any;
});
toString(): string;
}

@@ -478,5 +472,5 @@ /**

export declare class ViewChildMetadata extends ViewQueryMetadata {
constructor(_selector: Type | string, {read}?: {
constructor(_selector: Type<any> | string, {read}?: {
read?: any;
});
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,6 +14,6 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var forward_ref_1 = require('../di/forward_ref');
var metadata_1 = require('../di/metadata');
var opaque_token_1 = require('../di/opaque_token');
var lang_1 = require('../facade/lang');
import { resolveForwardRef } from '../di/forward_ref';
import { DependencyMetadata } from '../di/metadata';
import { OpaqueToken } from '../di/opaque_token';
import { StringWrapper, isString, stringify } from '../facade/lang';
/**

@@ -54,3 +53,3 @@ * This token can be used to create a virtual provider that will populate the

*/
exports.ANALYZE_FOR_ENTRY_COMPONENTS = new opaque_token_1.OpaqueToken('AnalyzeForEntryComponents');
export var ANALYZE_FOR_ENTRY_COMPONENTS = new OpaqueToken('AnalyzeForEntryComponents');
/**

@@ -74,3 +73,3 @@ * Specifies that a constant attribute value should be injected.

*/
var AttributeMetadata = (function (_super) {
export var AttributeMetadata = (function (_super) {
__extends(AttributeMetadata, _super);

@@ -93,6 +92,5 @@ function AttributeMetadata(attributeName) {

});
AttributeMetadata.prototype.toString = function () { return "@Attribute(" + lang_1.stringify(this.attributeName) + ")"; };
AttributeMetadata.prototype.toString = function () { return "@Attribute(" + stringify(this.attributeName) + ")"; };
return AttributeMetadata;
}(metadata_1.DependencyMetadata));
exports.AttributeMetadata = AttributeMetadata;
}(DependencyMetadata));
/**

@@ -135,6 +133,3 @@ * Declares an injectable parameter to be a live list of directives or variable

* class Tabs {
* panes: QueryList<Pane>;
* constructor(@Query(Pane) panes:QueryList<Pane>) {
* this.panes = panes;
* }
* @ContentChildren(Pane) panes: QueryList<Pane>;
* }

@@ -153,3 +148,3 @@ * ```

* class Seeker {
* constructor(@Query('findme') elList: QueryList<ElementRef>) {...}
* @ContentChildren('findme') elList;
* }

@@ -173,3 +168,3 @@ * ```

* class Seeker {
* constructor(@Query('findMe, findMeToo') elList: QueryList<ElementRef>) {...}
* @ContentChildren('findMe, findMeToo') elList: QueryList<ElementRef>;
* }

@@ -194,3 +189,3 @@ * ```

* When querying for items, the first container will see only `a` and `b` by default,
* but with `Query(TextDirective, {descendants: true})` it will see `c` too.
* but with `ContentChildren(TextDirective, {descendants: true})` it will see `c` too.
*

@@ -200,5 +195,5 @@ * The queried directives are kept in a depth-first pre-order with respect to their

*
* Query does not look deep into any subcomponent views.
* ContentChildren does not look deep into any subcomponent views.
*
* Query is updated as part of the change-detection cycle. Since change detection
* ContentChildren is updated as part of the change-detection cycle. Since change detection
* happens after construction of a directive, QueryList will always be empty when observed in the

@@ -209,5 +204,5 @@ * constructor.

* See {@link QueryList} for more details.
* @deprecated
* @stable
*/
var QueryMetadata = (function (_super) {
export var QueryMetadata = (function (_super) {
__extends(QueryMetadata, _super);

@@ -234,3 +229,3 @@ function QueryMetadata(_selector, _a) {

*/
get: function () { return forward_ref_1.resolveForwardRef(this._selector); },
get: function () { return resolveForwardRef(this._selector); },
enumerable: true,

@@ -243,3 +238,3 @@ configurable: true

*/
get: function () { return lang_1.isString(this.selector); },
get: function () { return isString(this.selector); },
enumerable: true,

@@ -253,10 +248,9 @@ configurable: true

*/
get: function () { return lang_1.StringWrapper.split(this.selector, /\s*,\s*/g); },
get: function () { return StringWrapper.split(this.selector, /\s*,\s*/g); },
enumerable: true,
configurable: true
});
QueryMetadata.prototype.toString = function () { return "@Query(" + lang_1.stringify(this.selector) + ")"; };
QueryMetadata.prototype.toString = function () { return "@Query(" + stringify(this.selector) + ")"; };
return QueryMetadata;
}(metadata_1.DependencyMetadata));
exports.QueryMetadata = QueryMetadata;
}(DependencyMetadata));
// TODO: add an example after ContentChildren and ViewChildren are in master

@@ -284,3 +278,3 @@ /**

*/
var ContentChildrenMetadata = (function (_super) {
export var ContentChildrenMetadata = (function (_super) {
__extends(ContentChildrenMetadata, _super);

@@ -293,3 +287,2 @@ function ContentChildrenMetadata(_selector, _a) {

}(QueryMetadata));
exports.ContentChildrenMetadata = ContentChildrenMetadata;
// TODO: add an example after ContentChild and ViewChild are in master

@@ -317,3 +310,3 @@ /**

*/
var ContentChildMetadata = (function (_super) {
export var ContentChildMetadata = (function (_super) {
__extends(ContentChildMetadata, _super);

@@ -326,6 +319,5 @@ function ContentChildMetadata(_selector, _a) {

}(QueryMetadata));
exports.ContentChildMetadata = ContentChildMetadata;
/**
* Similar to {@link QueryMetadata}, but querying the component view, instead of
* the content children.
* Similar to {@link ContentChildMetadata}, but querying the component view, instead
* of the content children.
*

@@ -346,3 +338,3 @@ * ### Example ([live demo](http://plnkr.co/edit/eNsFHDf7YjyM6IzKxM1j?p=preview))

*
* constructor(private @ViewQuery(Item) items:QueryList<Item>) {
* constructor(private @ViewChildren(Item) items:QueryList<Item>) {
* items.changes.subscribe(() => console.log(items.length));

@@ -353,5 +345,2 @@ * }

*
* Supports the same querying parameters as {@link QueryMetadata}, except
* `descendants`. This always queries the whole view.
*
* As `shown` is flipped between true and false, items will contain zero of one

@@ -364,5 +353,5 @@ * items.

* See {@link QueryList} for more details.
* @deprecated
* @stable
*/
var ViewQueryMetadata = (function (_super) {
export var ViewQueryMetadata = (function (_super) {
__extends(ViewQueryMetadata, _super);

@@ -381,6 +370,4 @@ function ViewQueryMetadata(_selector, _a) {

});
ViewQueryMetadata.prototype.toString = function () { return "@ViewQuery(" + lang_1.stringify(this.selector) + ")"; };
return ViewQueryMetadata;
}(QueryMetadata));
exports.ViewQueryMetadata = ViewQueryMetadata;
/**

@@ -464,3 +451,3 @@ * Declares a list of child element references.

*/
var ViewChildrenMetadata = (function (_super) {
export var ViewChildrenMetadata = (function (_super) {
__extends(ViewChildrenMetadata, _super);

@@ -471,5 +458,5 @@ function ViewChildrenMetadata(_selector, _a) {

}
ViewChildrenMetadata.prototype.toString = function () { return "@ViewChildren(" + stringify(this.selector) + ")"; };
return ViewChildrenMetadata;
}(ViewQueryMetadata));
exports.ViewChildrenMetadata = ViewChildrenMetadata;
/**

@@ -546,3 +533,3 @@ *

*/
var ViewChildMetadata = (function (_super) {
export var ViewChildMetadata = (function (_super) {
__extends(ViewChildMetadata, _super);

@@ -555,3 +542,2 @@ function ViewChildMetadata(_selector, _a) {

}(ViewQueryMetadata));
exports.ViewChildMetadata = ViewChildMetadata;
//# sourceMappingURL=di.js.map

@@ -10,14 +10,12 @@ /**

import { ChangeDetectionStrategy } from '../change_detection/constants';
import { InjectableMetadata } from '../di/metadata';
import { Type } from '../facade/lang';
import { InjectableMetadata, Provider } from '../di';
import { Type } from '../type';
import { ViewEncapsulation } from './view';
/**
* Interface for creating {@link DirectiveMetadata}
* @experimental
* @stable
*/
export interface DirectiveMetadataType {
selector?: string;
properties?: string[];
inputs?: string[];
events?: string[];
outputs?: string[];

@@ -486,8 +484,5 @@ host?: {

* <bank-account bank-name="RBC" account-id="4747"></bank-account>
* `,
* directives: [BankAccount]
* `
* })
* class App {}
*
* bootstrap(App);
* ```

@@ -497,10 +492,3 @@ *

inputs: string[];
/**
* Use `inputs` instead
*
* @deprecated
*/
properties: string[];
private _inputs;
private _properties;
/**

@@ -540,4 +528,3 @@ * Enumerates the set of event-bound output properties.

* </interval-dir>
* `,
* directives: [IntervalDir]
* `
* })

@@ -548,3 +535,2 @@ * class App {

* }
* bootstrap(App);
* ```

@@ -554,10 +540,3 @@ *

outputs: string[];
/**
* Use `outputs` instead
*
* @deprecated
*/
events: string[];
private _outputs;
private _events;
/**

@@ -603,8 +582,5 @@ * Specify the events, actions, properties and attributes related to the host element.

* selector: 'app',
* template: `<button counting>Increment</button>`,
* directives: [CountClicks]
* template: `<button counting>Increment</button>`
* })
* class App {}
*
* bootstrap(App);
* ```

@@ -640,4 +616,3 @@ *

* selector: 'app',
* template: `<input [(ngModel)]="prop">`,
* directives: [FORM_DIRECTIVES, NgModelStatus]
* template: `<input [(ngModel)]="prop">`
* })

@@ -647,4 +622,2 @@ * class App {

* }
*
* bootstrap(App);
* ```

@@ -705,3 +678,3 @@ *

*/
providers: any[];
providers: Provider[];
private _providers;

@@ -723,4 +696,3 @@ /**

* selector: 'main',
* template: `<child-dir #c="child"></child-dir>`,
* directives: [ChildDir]
* template: `<child-dir #c="child"></child-dir>`
* })

@@ -748,4 +720,3 @@ * class MainComponent {

* },
* template: '<child-directive></child-directive>',
* directives: [ChildDirective]
* template: '<child-directive></child-directive>'
* })

@@ -769,7 +740,7 @@ * class SomeDir {

};
constructor({selector, inputs, outputs, properties, events, host, providers, exportAs, queries}?: DirectiveMetadataType);
constructor({selector, inputs, outputs, host, providers, exportAs, queries}?: DirectiveMetadataType);
}
/**
* Interface for creating {@link ComponentMetadataType}
* @experimental
* @stable
*/

@@ -785,7 +756,5 @@ export interface ComponentMetadataType extends DirectiveMetadataType {

animations?: AnimationEntryMetadata[];
directives?: Array<Type | any[]>;
pipes?: Array<Type | any[]>;
encapsulation?: ViewEncapsulation;
interpolation?: [string, string];
entryComponents?: Array<Type | any[]>;
entryComponents?: Array<Type<any> | any[]>;
}

@@ -859,4 +828,3 @@ /**

* ],
* template: `<needs-greeter></needs-greeter>`,
* directives: [NeedsGreeter]
* template: `<needs-greeter></needs-greeter>`
* })

@@ -868,3 +836,3 @@ * class HelloWorld {

*/
viewProviders: any[];
viewProviders: Provider[];
private _viewProviders;

@@ -987,4 +955,2 @@ /**

animations: AnimationEntryMetadata[];
directives: Array<Type | any[]>;
pipes: Array<Type | any[]>;
/**

@@ -1004,8 +970,8 @@ * Specify how the template and the styles should be encapsulated.

*/
entryComponents: Array<Type | any[]>;
constructor({selector, inputs, outputs, properties, events, host, exportAs, moduleId, providers, viewProviders, changeDetection, queries, templateUrl, template, styleUrls, styles, animations, directives, pipes, encapsulation, interpolation, entryComponents}?: ComponentMetadataType);
entryComponents: Array<Type<any> | any[]>;
constructor({selector, inputs, outputs, host, exportAs, moduleId, providers, viewProviders, changeDetection, queries, templateUrl, template, styleUrls, styles, animations, encapsulation, interpolation, entryComponents}?: ComponentMetadataType);
}
/**
* Interface for creating {@link PipeMetadata}
* @experimental
* @stable
*/

@@ -1066,8 +1032,6 @@ export interface PipeMetadataType {

* <bank-account bank-name="RBC" account-id="4747"></bank-account>
* `,
* directives: [BankAccount]
* `
* })
*
* class App {}
*
* bootstrap(App);
* ```

@@ -1118,4 +1082,3 @@ * @stable

* </interval-dir>
* `,
* directives: [IntervalDir]
* `
* })

@@ -1126,3 +1089,2 @@ * class App {

* }
* bootstrap(App);
* ```

@@ -1160,4 +1122,3 @@ * @stable

* selector: 'app',
* template: `<input [(ngModel)]="prop">`,
* directives: [FORM_DIRECTIVES, NgModelStatus]
* template: `<input [(ngModel)]="prop">`
* })

@@ -1167,4 +1128,2 @@ * class App {

* }
*
* bootstrap(App);
* ```

@@ -1203,8 +1162,5 @@ * @stable

* selector: 'app',
* template: `<button counting>Increment</button>`,
* directives: [CountClicks]
* template: `<button counting>Increment</button>`
* })
* class App {}
*
* bootstrap(App);
* ```

@@ -1211,0 +1167,0 @@ * @stable

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,5 +14,5 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var constants_1 = require('../change_detection/constants');
var metadata_1 = require('../di/metadata');
var lang_1 = require('../facade/lang');
import { ChangeDetectionStrategy } from '../change_detection/constants';
import { InjectableMetadata } from '../di';
import { isPresent } from '../facade/lang';
/**

@@ -400,12 +399,10 @@ * Directives allow you to attach behavior to elements in the DOM.

*/
var DirectiveMetadata = (function (_super) {
export var DirectiveMetadata = (function (_super) {
__extends(DirectiveMetadata, _super);
function DirectiveMetadata(_a) {
var _b = _a === void 0 ? {} : _a, selector = _b.selector, inputs = _b.inputs, outputs = _b.outputs, properties = _b.properties, events = _b.events, host = _b.host, providers = _b.providers, exportAs = _b.exportAs, queries = _b.queries;
var _b = _a === void 0 ? {} : _a, selector = _b.selector, inputs = _b.inputs, outputs = _b.outputs, host = _b.host, providers = _b.providers, exportAs = _b.exportAs, queries = _b.queries;
_super.call(this);
this.selector = selector;
this._inputs = inputs;
this._properties = properties;
this._outputs = outputs;
this._events = events;
this.host = host;

@@ -455,28 +452,12 @@ this.exportAs = exportAs;

* <bank-account bank-name="RBC" account-id="4747"></bank-account>
* `,
* directives: [BankAccount]
* `
* })
* class App {}
*
* bootstrap(App);
* ```
*
*/
get: function () {
return lang_1.isPresent(this._properties) && this._properties.length > 0 ? this._properties :
this._inputs;
},
get: function () { return this._inputs; },
enumerable: true,
configurable: true
});
Object.defineProperty(DirectiveMetadata.prototype, "properties", {
/**
* Use `inputs` instead
*
* @deprecated
*/
get: function () { return this.inputs; },
enumerable: true,
configurable: true
});
Object.defineProperty(DirectiveMetadata.prototype, "outputs", {

@@ -517,4 +498,3 @@ /**

* </interval-dir>
* `,
* directives: [IntervalDir]
* `
* })

@@ -525,22 +505,9 @@ * class App {

* }
* bootstrap(App);
* ```
*
*/
get: function () {
return lang_1.isPresent(this._events) && this._events.length > 0 ? this._events : this._outputs;
},
get: function () { return this._outputs; },
enumerable: true,
configurable: true
});
Object.defineProperty(DirectiveMetadata.prototype, "events", {
/**
* Use `outputs` instead
*
* @deprecated
*/
get: function () { return this.outputs; },
enumerable: true,
configurable: true
});
Object.defineProperty(DirectiveMetadata.prototype, "providers", {

@@ -582,4 +549,3 @@ /**

return DirectiveMetadata;
}(metadata_1.InjectableMetadata));
exports.DirectiveMetadata = DirectiveMetadata;
}(InjectableMetadata));
/**

@@ -611,6 +577,6 @@ * Declare reusable UI building blocks for an application.

*/
var ComponentMetadata = (function (_super) {
export var ComponentMetadata = (function (_super) {
__extends(ComponentMetadata, _super);
function ComponentMetadata(_a) {
var _b = _a === void 0 ? {} : _a, selector = _b.selector, inputs = _b.inputs, outputs = _b.outputs, properties = _b.properties, events = _b.events, host = _b.host, exportAs = _b.exportAs, moduleId = _b.moduleId, providers = _b.providers, viewProviders = _b.viewProviders, _c = _b.changeDetection, changeDetection = _c === void 0 ? constants_1.ChangeDetectionStrategy.Default : _c, queries = _b.queries, templateUrl = _b.templateUrl, template = _b.template, styleUrls = _b.styleUrls, styles = _b.styles, animations = _b.animations, directives = _b.directives, pipes = _b.pipes, encapsulation = _b.encapsulation, interpolation = _b.interpolation, entryComponents = _b.entryComponents;
var _b = _a === void 0 ? {} : _a, selector = _b.selector, inputs = _b.inputs, outputs = _b.outputs, host = _b.host, exportAs = _b.exportAs, moduleId = _b.moduleId, providers = _b.providers, viewProviders = _b.viewProviders, _c = _b.changeDetection, changeDetection = _c === void 0 ? ChangeDetectionStrategy.Default : _c, queries = _b.queries, templateUrl = _b.templateUrl, template = _b.template, styleUrls = _b.styleUrls, styles = _b.styles, animations = _b.animations, encapsulation = _b.encapsulation, interpolation = _b.interpolation, entryComponents = _b.entryComponents;
_super.call(this, {

@@ -620,4 +586,2 @@ selector: selector,

outputs: outputs,
properties: properties,
events: events,
host: host,

@@ -634,4 +598,2 @@ exportAs: exportAs,

this.styles = styles;
this.directives = directives;
this.pipes = pipes;
this.encapsulation = encapsulation;

@@ -674,4 +636,3 @@ this.moduleId = moduleId;

* ],
* template: `<needs-greeter></needs-greeter>`,
* directives: [NeedsGreeter]
* template: `<needs-greeter></needs-greeter>`
* })

@@ -689,3 +650,2 @@ * class HelloWorld {

}(DirectiveMetadata));
exports.ComponentMetadata = ComponentMetadata;
/**

@@ -703,3 +663,3 @@ * Declare reusable pipe function.

*/
var PipeMetadata = (function (_super) {
export var PipeMetadata = (function (_super) {
__extends(PipeMetadata, _super);

@@ -713,3 +673,3 @@ function PipeMetadata(_a) {

Object.defineProperty(PipeMetadata.prototype, "pure", {
get: function () { return lang_1.isPresent(this._pure) ? this._pure : true; },
get: function () { return isPresent(this._pure) ? this._pure : true; },
enumerable: true,

@@ -719,4 +679,3 @@ configurable: true

return PipeMetadata;
}(metadata_1.InjectableMetadata));
exports.PipeMetadata = PipeMetadata;
}(InjectableMetadata));
/**

@@ -755,12 +714,10 @@ * Declares a data-bound input property.

* <bank-account bank-name="RBC" account-id="4747"></bank-account>
* `,
* directives: [BankAccount]
* `
* })
*
* class App {}
*
* bootstrap(App);
* ```
* @stable
*/
var InputMetadata = (function () {
export var InputMetadata = (function () {
function InputMetadata(

@@ -775,3 +732,2 @@ /**

}());
exports.InputMetadata = InputMetadata;
/**

@@ -808,4 +764,3 @@ * Declares an event-bound output property.

* </interval-dir>
* `,
* directives: [IntervalDir]
* `
* })

@@ -816,7 +771,6 @@ * class App {

* }
* bootstrap(App);
* ```
* @stable
*/
var OutputMetadata = (function () {
export var OutputMetadata = (function () {
function OutputMetadata(bindingPropertyName) {

@@ -827,3 +781,2 @@ this.bindingPropertyName = bindingPropertyName;

}());
exports.OutputMetadata = OutputMetadata;
/**

@@ -854,4 +807,3 @@ * Declares a host property binding.

* selector: 'app',
* template: `<input [(ngModel)]="prop">`,
* directives: [FORM_DIRECTIVES, NgModelStatus]
* template: `<input [(ngModel)]="prop">`
* })

@@ -861,8 +813,6 @@ * class App {

* }
*
* bootstrap(App);
* ```
* @stable
*/
var HostBindingMetadata = (function () {
export var HostBindingMetadata = (function () {
function HostBindingMetadata(hostPropertyName) {

@@ -873,3 +823,2 @@ this.hostPropertyName = hostPropertyName;

}());
exports.HostBindingMetadata = HostBindingMetadata;
/**

@@ -901,12 +850,9 @@ * Declares a host listener.

* selector: 'app',
* template: `<button counting>Increment</button>`,
* directives: [CountClicks]
* template: `<button counting>Increment</button>`
* })
* class App {}
*
* bootstrap(App);
* ```
* @stable
*/
var HostListenerMetadata = (function () {
export var HostListenerMetadata = (function () {
function HostListenerMetadata(eventName, args) {

@@ -918,3 +864,2 @@ this.eventName = eventName;

}());
exports.HostListenerMetadata = HostListenerMetadata;
//# sourceMappingURL=directives.js.map

@@ -76,4 +76,2 @@ /**

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```

@@ -122,5 +120,3 @@ * @stable

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```
* ```
* @stable

@@ -236,4 +232,2 @@ */

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```

@@ -342,4 +336,2 @@ *

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```

@@ -393,4 +385,2 @@ * @stable

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```

@@ -443,4 +433,2 @@ * @stable

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```

@@ -496,4 +484,2 @@ * @stable

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```

@@ -500,0 +486,0 @@ * @stable

@@ -8,6 +8,6 @@ /**

*/
"use strict";
/**
* @stable
*/
export var LifecycleHooks;
(function (LifecycleHooks) {

@@ -22,5 +22,4 @@ LifecycleHooks[LifecycleHooks["OnInit"] = 0] = "OnInit";

LifecycleHooks[LifecycleHooks["AfterViewChecked"] = 7] = "AfterViewChecked";
})(exports.LifecycleHooks || (exports.LifecycleHooks = {}));
var LifecycleHooks = exports.LifecycleHooks;
exports.LIFECYCLE_HOOKS_VALUES = [
})(LifecycleHooks || (LifecycleHooks = {}));
export var LIFECYCLE_HOOKS_VALUES = [
LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges,

@@ -75,8 +74,6 @@ LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit,

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```
* @stable
*/
var OnChanges = (function () {
export var OnChanges = (function () {
function OnChanges() {

@@ -86,3 +83,2 @@ }

}());
exports.OnChanges = OnChanges;
/**

@@ -125,8 +121,6 @@ * Implement this interface to execute custom initialization logic after your directive's

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```
* ```
* @stable
*/
var OnInit = (function () {
export var OnInit = (function () {
function OnInit() {

@@ -136,3 +130,2 @@ }

}());
exports.OnInit = OnInit;
/**

@@ -205,3 +198,3 @@ * Implement this interface to supplement the default change detection algorithm in your directive.

*/
var DoCheck = (function () {
export var DoCheck = (function () {
function DoCheck() {

@@ -211,3 +204,2 @@ }

}());
exports.DoCheck = DoCheck;
/**

@@ -248,4 +240,2 @@ * Implement this interface to get notified when your directive is destroyed.

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```

@@ -304,3 +294,3 @@ *

*/
var OnDestroy = (function () {
export var OnDestroy = (function () {
function OnDestroy() {

@@ -310,3 +300,2 @@ }

}());
exports.OnDestroy = OnDestroy;
/**

@@ -359,8 +348,6 @@ * Implement this interface to get notified when your directive's content has been fully

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```
* @stable
*/
var AfterContentInit = (function () {
export var AfterContentInit = (function () {
function AfterContentInit() {

@@ -370,3 +357,2 @@ }

}());
exports.AfterContentInit = AfterContentInit;
/**

@@ -414,8 +400,6 @@ * Implement this interface to get notified after every check of your directive's content.

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```
* @stable
*/
var AfterContentChecked = (function () {
export var AfterContentChecked = (function () {
function AfterContentChecked() {

@@ -425,3 +409,2 @@ }

}());
exports.AfterContentChecked = AfterContentChecked;
/**

@@ -468,8 +451,6 @@ * Implement this interface to get notified when your component's view has been fully initialized.

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```
* @stable
*/
var AfterViewInit = (function () {
export var AfterViewInit = (function () {
function AfterViewInit() {

@@ -479,3 +460,2 @@ }

}());
exports.AfterViewInit = AfterViewInit;
/**

@@ -525,8 +505,6 @@ * Implement this interface to get notified after every check of your component's view.

* }
*
* bootstrap(App).catch(err => console.error(err));
* ```
* @stable
*/
var AfterViewChecked = (function () {
export var AfterViewChecked = (function () {
function AfterViewChecked() {

@@ -536,3 +514,2 @@ }

}());
exports.AfterViewChecked = AfterViewChecked;
//# sourceMappingURL=lifecycle_hooks.js.map

@@ -8,12 +8,12 @@ /**

*/
import { InjectableMetadata } from '../di/metadata';
import { Type } from '../facade/lang';
import { InjectableMetadata, Provider } from '../di';
import { Type } from '../type';
/**
* A wrapper around a module that also includes the providers.
*
* @experimental
* @stable
*/
export interface ModuleWithProviders {
ngModule: Type;
providers?: any[];
ngModule: Type<any>;
providers?: Provider[];
}

@@ -29,19 +29,27 @@ /**

/**
* Defines a schema that will allow any property on elements with a `-` in their name,
* which is the common rule for custom elements.
* Defines a schema that will allow:
* - any non-angular elements with a `-` in their name,
* - any properties on elements with a `-` in their name which is the common rule for custom
* elements.
*
* @experimental
* @stable
*/
export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
/**
* Interface for creating {@link NgModuleMetadata}
* Defines a schema that will allow any property on any element.
*
* @experimental
*/
export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
/**
* Interface for creating {@link NgModuleMetadata}
* @stable
*/
export interface NgModuleMetadataType {
providers?: any[];
declarations?: Array<Type | any[]>;
imports?: Array<Type | ModuleWithProviders | any[]>;
exports?: Array<Type | any[]>;
entryComponents?: Array<Type | any[]>;
bootstrap?: Array<Type | any[]>;
providers?: Provider[];
declarations?: Array<Type<any> | any[]>;
imports?: Array<Type<any> | ModuleWithProviders | any[]>;
exports?: Array<Type<any> | any[]>;
entryComponents?: Array<Type<any> | any[]>;
bootstrap?: Array<Type<any> | any[]>;
schemas?: Array<SchemaMetadata | any[]>;

@@ -51,3 +59,3 @@ }

* Declares an Angular Module.
* @experimental
* @stable
*/

@@ -84,3 +92,3 @@ export declare class NgModuleMetadata extends InjectableMetadata implements NgModuleMetadataType {

*/
providers: any[];
providers: Provider[];
private _providers;

@@ -100,3 +108,3 @@ /**

*/
declarations: Array<Type | any[]>;
declarations: Array<Type<any> | any[]>;
/**

@@ -117,3 +125,3 @@ * Specifies a list of modules whose exported directives/pipes

*/
imports: Array<Type | ModuleWithProviders | any[]>;
imports: Array<Type<any> | ModuleWithProviders | any[]>;
/**

@@ -134,3 +142,3 @@ * Specifies a list of directives/pipes/module that can be used within the template

*/
exports: Array<Type | any[]>;
exports: Array<Type<any> | any[]>;
/**

@@ -142,3 +150,3 @@ * Defines the components that should be compiled as well when

*/
entryComponents: Array<Type | any[]>;
entryComponents: Array<Type<any> | any[]>;
/**

@@ -149,5 +157,17 @@ * Defines the components that should be bootstrapped when

*/
bootstrap: Array<Type | any[]>;
bootstrap: Array<Type<any> | any[]>;
/**
* Elements and properties that are not angular Components nor Directives have to be declared in
* the schema.
*
* Available schemas:
* - `NO_ERRORS_SCHEMA`: any elements and properties are allowed,
* - `CUSTOM_ELEMENTS_SCHEMA`: any custom elements (tag name has "-") with any properties are
* allowed.
*
* @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA` we're trusting that
* allowed elements (and its properties) securely escape inputs.
*/
schemas: Array<SchemaMetadata | any[]>;
constructor(options?: NgModuleMetadataType);
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,17 +14,27 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var metadata_1 = require('../di/metadata');
import { InjectableMetadata } from '../di';
/**
* Defines a schema that will allow any property on elements with a `-` in their name,
* which is the common rule for custom elements.
* Defines a schema that will allow:
* - any non-angular elements with a `-` in their name,
* - any properties on elements with a `-` in their name which is the common rule for custom
* elements.
*
* @experimental
* @stable
*/
exports.CUSTOM_ELEMENTS_SCHEMA = {
export var CUSTOM_ELEMENTS_SCHEMA = {
name: 'custom-elements'
};
/**
* Declares an Angular Module.
* Defines a schema that will allow any property on any element.
*
* @experimental
*/
var NgModuleMetadata = (function (_super) {
export var NO_ERRORS_SCHEMA = {
name: 'no-errors-schema'
};
/**
* Declares an Angular Module.
* @stable
*/
export var NgModuleMetadata = (function (_super) {
__extends(NgModuleMetadata, _super);

@@ -80,4 +89,3 @@ function NgModuleMetadata(options) {

return NgModuleMetadata;
}(metadata_1.InjectableMetadata));
exports.NgModuleMetadata = NgModuleMetadata;
}(InjectableMetadata));
//# sourceMappingURL=ng_module.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"CUSTOM_ELEMENTS_SCHEMA":{"name":"custom-elements"}}}
{"__symbolic":"module","version":1,"metadata":{"CUSTOM_ELEMENTS_SCHEMA":{"name":"custom-elements"},"NO_ERRORS_SCHEMA":{"name":"no-errors-schema"}}}

@@ -9,3 +9,2 @@ /**

import { AnimationEntryMetadata } from '../animation/metadata';
import { Type } from '../facade/lang';
/**

@@ -97,24 +96,2 @@ * Defines template and style encapsulation options available for Component's {@link Component}.

/**
* Specifies a list of directives that can be used within a template.
*
* Directives must be listed explicitly to provide proper component encapsulation.
*
* ### Example
*
* ```javascript
* @Component({
* selector: 'my-component',
* directives: [NgFor]
* template: '
* <ul>
* <li *ngFor="let item of items">{{item}}</li>
* </ul>'
* })
* class MyComponent {
* }
* ```
*/
directives: Array<Type | any[]>;
pipes: Array<Type | any[]>;
/**
* Specify how the template and the styles should be encapsulated.

@@ -128,7 +105,5 @@ * The default is {@link ViewEncapsulation#Emulated `ViewEncapsulation.Emulated`} if the view

interpolation: [string, string];
constructor({templateUrl, template, directives, pipes, encapsulation, styles, styleUrls, animations, interpolation}?: {
constructor({templateUrl, template, encapsulation, styles, styleUrls, animations, interpolation}?: {
templateUrl?: string;
template?: string;
directives?: Array<Type | any[]>;
pipes?: Array<Type | any[]>;
encapsulation?: ViewEncapsulation;

@@ -135,0 +110,0 @@ styles?: string[];

@@ -8,3 +8,2 @@ /**

*/
"use strict";
/**

@@ -16,2 +15,3 @@ * Defines template and style encapsulation options available for Component's {@link Component}.

*/
export var ViewEncapsulation;
(function (ViewEncapsulation) {

@@ -38,5 +38,4 @@ /**

ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
})(exports.ViewEncapsulation || (exports.ViewEncapsulation = {}));
var ViewEncapsulation = exports.ViewEncapsulation;
exports.VIEW_ENCAPSULATION_VALUES = [ViewEncapsulation.Emulated, ViewEncapsulation.Native, ViewEncapsulation.None];
})(ViewEncapsulation || (ViewEncapsulation = {}));
export var VIEW_ENCAPSULATION_VALUES = [ViewEncapsulation.Emulated, ViewEncapsulation.Native, ViewEncapsulation.None];
/**

@@ -73,5 +72,5 @@ * Metadata properties available for configuring Views.

*/
var ViewMetadata = (function () {
export var ViewMetadata = (function () {
function ViewMetadata(_a) {
var _b = _a === void 0 ? {} : _a, templateUrl = _b.templateUrl, template = _b.template, directives = _b.directives, pipes = _b.pipes, encapsulation = _b.encapsulation, styles = _b.styles, styleUrls = _b.styleUrls, animations = _b.animations, interpolation = _b.interpolation;
var _b = _a === void 0 ? {} : _a, templateUrl = _b.templateUrl, template = _b.template, encapsulation = _b.encapsulation, styles = _b.styles, styleUrls = _b.styleUrls, animations = _b.animations, interpolation = _b.interpolation;
this.templateUrl = templateUrl;

@@ -81,4 +80,2 @@ this.template = template;

this.styles = styles;
this.directives = directives;
this.pipes = pipes;
this.encapsulation = encapsulation;

@@ -90,3 +87,2 @@ this.animations = animations;

}());
exports.ViewMetadata = ViewMetadata;
//# sourceMappingURL=view.js.map

@@ -0,2 +1,10 @@

/**
* @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 { PlatformRef } from './application_ref';
import { Provider } from './di';
/**

@@ -7,8 +15,2 @@ * This platform has to be included in any other platform

*/
export declare const platformCore: (extraProviders?: any[]) => PlatformRef;
/**
* A default set of providers which should be included in any Angular platform.
*
* @deprecated Create platforms via `createPlatformFactory(corePlatform, ...) instead!
*/
export declare const PLATFORM_COMMON_PROVIDERS: any[];
export declare const platformCore: (extraProviders?: Provider[]) => PlatformRef;

@@ -8,15 +8,14 @@ /**

*/
"use strict";
var application_ref_1 = require('./application_ref');
var console_1 = require('./console');
var reflection_1 = require('./reflection/reflection');
var reflector_reader_1 = require('./reflection/reflector_reader');
var testability_1 = require('./testability/testability');
import { PlatformRef, PlatformRef_, createPlatformFactory } from './application_ref';
import { Console } from './console';
import { Reflector, reflector } from './reflection/reflection';
import { ReflectorReader } from './reflection/reflector_reader';
import { TestabilityRegistry } from './testability/testability';
function _reflector() {
return reflection_1.reflector;
return reflector;
}
var _CORE_PLATFORM_PROVIDERS = [
application_ref_1.PlatformRef_, { provide: application_ref_1.PlatformRef, useExisting: application_ref_1.PlatformRef_ },
{ provide: reflection_1.Reflector, useFactory: _reflector, deps: [] },
{ provide: reflector_reader_1.ReflectorReader, useExisting: reflection_1.Reflector }, testability_1.TestabilityRegistry, console_1.Console
PlatformRef_, { provide: PlatformRef, useExisting: PlatformRef_ },
{ provide: Reflector, useFactory: _reflector, deps: [] },
{ provide: ReflectorReader, useExisting: Reflector }, TestabilityRegistry, Console
];

@@ -28,9 +27,3 @@ /**

*/
exports.platformCore = application_ref_1.createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
/**
* A default set of providers which should be included in any Angular platform.
*
* @deprecated Create platforms via `createPlatformFactory(corePlatform, ...) instead!
*/
exports.PLATFORM_COMMON_PROVIDERS = _CORE_PLATFORM_PROVIDERS;
export var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
//# sourceMappingURL=platform_core_providers.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"platformCore":{"__symbolic":"error","message":"Reference to a local symbol","line":21,"character":5,"context":{"name":"_CORE_PLATFORM_PROVIDERS"}},"PLATFORM_COMMON_PROVIDERS":{"__symbolic":"error","message":"Reference to a local symbol","line":21,"character":5,"context":{"name":"_CORE_PLATFORM_PROVIDERS"}}}}
{"__symbolic":"module","version":1,"metadata":{"platformCore":{"__symbolic":"error","message":"Reference to a local symbol","line":19,"character":6,"context":{"name":"_CORE_PLATFORM_PROVIDERS"}}}}

@@ -8,8 +8,7 @@ /**

*/
"use strict";
var wtf_impl_1 = require('./wtf_impl');
import { createScope, detectWTF, endTimeRange, leave, startTimeRange } from './wtf_impl';
/**
* True if WTF is enabled.
*/
exports.wtfEnabled = wtf_impl_1.detectWTF();
export var wtfEnabled = detectWTF();
function noopScope(arg0, arg1) {

@@ -48,3 +47,3 @@ return null;

*/
exports.wtfCreateScope = exports.wtfEnabled ? wtf_impl_1.createScope : function (signature, flags) { return noopScope; };
export var wtfCreateScope = wtfEnabled ? createScope : function (signature, flags) { return noopScope; };
/**

@@ -59,3 +58,3 @@ * Used to mark end of Scope.

*/
exports.wtfLeave = exports.wtfEnabled ? wtf_impl_1.leave : function (s, r) { return r; };
export var wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };
/**

@@ -74,3 +73,3 @@ * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.

*/
exports.wtfStartTimeRange = exports.wtfEnabled ? wtf_impl_1.startTimeRange : function (rangeType, action) { return null; };
export var wtfStartTimeRange = wtfEnabled ? startTimeRange : function (rangeType, action) { return null; };
/**

@@ -82,3 +81,3 @@ * Ends a async time range operation.

*/
exports.wtfEndTimeRange = exports.wtfEnabled ? wtf_impl_1.endTimeRange : function (r) { return null; };
export var wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };
//# sourceMappingURL=profile.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"wtfEnabled":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./wtf_impl","name":"detectWTF"}},"wtfCreateScope":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"wtfEnabled"},"thenExpression":{"__symbolic":"reference","module":"./wtf_impl","name":"createScope"},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":53,"character":30}},"wtfLeave":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"wtfEnabled"},"thenExpression":{"__symbolic":"reference","module":"./wtf_impl","name":"leave"},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":65,"character":24}},"wtfStartTimeRange":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"wtfEnabled"},"thenExpression":{"__symbolic":"reference","module":"./wtf_impl","name":"startTimeRange"},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":81,"character":33}},"wtfEndTimeRange":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"wtfEnabled"},"thenExpression":{"__symbolic":"reference","module":"./wtf_impl","name":"endTimeRange"},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":89,"character":78}}},"exports":[{"from":"./wtf_impl","export":["WtfScopeFn"]}]}
{"__symbolic":"module","version":1,"metadata":{"wtfEnabled":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./wtf_impl","name":"detectWTF"}},"wtfCreateScope":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"wtfEnabled"},"thenExpression":{"__symbolic":"reference","module":"./wtf_impl","name":"createScope"},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":53,"character":31}},"wtfLeave":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"wtfEnabled"},"thenExpression":{"__symbolic":"reference","module":"./wtf_impl","name":"leave"},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":65,"character":25}},"wtfStartTimeRange":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"wtfEnabled"},"thenExpression":{"__symbolic":"reference","module":"./wtf_impl","name":"startTimeRange"},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":81,"character":34}},"wtfEndTimeRange":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"wtfEnabled"},"thenExpression":{"__symbolic":"reference","module":"./wtf_impl","name":"endTimeRange"},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":89,"character":79}}},"exports":[{"from":"./wtf_impl","export":["WtfScopeFn"]}]}

@@ -8,8 +8,7 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
import { global } from '../facade/lang';
var trace;
var events;
function detectWTF() {
var wtf = lang_1.global['wtf'];
export function detectWTF() {
var wtf = global['wtf'];
if (wtf) {

@@ -24,21 +23,16 @@ trace = wtf['trace'];

}
exports.detectWTF = detectWTF;
function createScope(signature, flags) {
export function createScope(signature, flags) {
if (flags === void 0) { flags = null; }
return events.createScope(signature, flags);
}
exports.createScope = createScope;
function leave(scope, returnValue) {
export function leave(scope, returnValue) {
trace.leaveScope(scope, returnValue);
return returnValue;
}
exports.leave = leave;
function startTimeRange(rangeType, action) {
export function startTimeRange(rangeType, action) {
return trace.beginTimeRange(rangeType, action);
}
exports.startTimeRange = startTimeRange;
function endTimeRange(range) {
export function endTimeRange(range) {
trace.endTimeRange(range);
}
exports.endTimeRange = endTimeRange;
//# sourceMappingURL=wtf_impl.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"createScope":{"__symbolic":"function","parameters":["signature","flags"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":37,"character":3,"context":{"name":"events"}},"defaults":[null,null]},"startTimeRange":{"__symbolic":"function","parameters":["rangeType","action"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":36,"character":3,"context":{"name":"trace"}}}}}
{"__symbolic":"module","version":1,"metadata":{"createScope":{"__symbolic":"function","parameters":["signature","flags"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":37,"character":4,"context":{"name":"events"}},"defaults":[null,null]},"startTimeRange":{"__symbolic":"function","parameters":["rangeType","action"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":36,"character":4,"context":{"name":"trace"}}}}}

@@ -8,12 +8,12 @@ /**

*/
import { Type } from '../facade/lang';
import { Type } from '../type';
import { GetterFn, MethodFn, SetterFn } from './types';
export interface PlatformReflectionCapabilities {
isReflectionEnabled(): boolean;
factory(type: Type): Function;
interfaces(type: Type): any[];
hasLifecycleHook(type: any, lcInterface: any, lcProperty: string): boolean;
parameters(type: any): any[][];
annotations(type: any): any[];
propMetadata(typeOrFunc: any): {
factory(type: Type<any>): Function;
interfaces(type: Type<any>): any[];
hasLifecycleHook(type: any, lcInterface: Type<any>, lcProperty: string): boolean;
parameters(type: Type<any>): any[][];
annotations(type: Type<any>): any[];
propMetadata(typeOrFunc: Type<any>): {
[key: string]: any[];

@@ -24,3 +24,5 @@ };

method(name: string): MethodFn;
importUri(type: any): string;
importUri(type: Type<any>): string;
resolveIdentifier(name: string, moduleUrl: string, runtime: any): any;
resolveEnum(enumIdentifier: any, name: string): any;
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
//# sourceMappingURL=platform_reflection_capabilities.js.map

@@ -1,2 +0,2 @@

import { ConcreteType, Type } from '../facade/lang';
import { Type } from '../type';
import { PlatformReflectionCapabilities } from './platform_reflection_capabilities';

@@ -8,10 +8,10 @@ import { GetterFn, MethodFn, SetterFn } from './types';

isReflectionEnabled(): boolean;
factory(t: ConcreteType<any>): Function;
parameters(typeOrFunc: Type): any[][];
annotations(typeOrFunc: Type): any[];
factory(t: Type<any>): Function;
parameters(typeOrFunc: Type<any>): any[][];
annotations(typeOrFunc: Type<any>): any[];
propMetadata(typeOrFunc: any): {
[key: string]: any[];
};
interfaces(type: Type): any[];
hasLifecycleHook(type: any, lcInterface: Type, lcProperty: string): boolean;
interfaces(type: Type<any>): any[];
hasLifecycleHook(type: any, lcInterface: Type<any>, lcProperty: string): boolean;
getter(name: string): GetterFn;

@@ -21,2 +21,4 @@ setter(name: string): SetterFn;

importUri(type: any): string;
resolveIdentifier(name: string, moduleUrl: string, runtime: any): any;
resolveEnum(enumIdentifier: any, name: string): any;
}

@@ -8,86 +8,20 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
var ReflectionCapabilities = (function () {
import { global, isFunction, isPresent, stringify } from '../facade/lang';
import { Type } from '../type';
export var ReflectionCapabilities = (function () {
function ReflectionCapabilities(reflect) {
this._reflect = lang_1.isPresent(reflect) ? reflect : lang_1.global.Reflect;
this._reflect = reflect || global.Reflect;
}
ReflectionCapabilities.prototype.isReflectionEnabled = function () { return true; };
ReflectionCapabilities.prototype.factory = function (t) {
switch (t.length) {
case 0:
return function () { return new t(); };
case 1:
return function (a1) { return new t(a1); };
case 2:
return function (a1, a2) { return new t(a1, a2); };
case 3:
return function (a1, a2, a3) { return new t(a1, a2, a3); };
case 4:
return function (a1, a2, a3, a4) { return new t(a1, a2, a3, a4); };
case 5:
return function (a1, a2, a3, a4, a5) { return new t(a1, a2, a3, a4, a5); };
case 6:
return function (a1, a2, a3, a4, a5, a6) {
return new t(a1, a2, a3, a4, a5, a6);
};
case 7:
return function (a1, a2, a3, a4, a5, a6, a7) {
return new t(a1, a2, a3, a4, a5, a6, a7);
};
case 8:
return function (a1, a2, a3, a4, a5, a6, a7, a8) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8);
};
case 9:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9);
};
case 10:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
};
case 11:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
};
case 12:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
};
case 13:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13);
};
case 14:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
};
case 15:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15);
};
case 16:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16);
};
case 17:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17);
};
case 18:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18);
};
case 19:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19);
};
case 20:
return function (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) {
return new t(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
};
}
;
throw new Error("Cannot create a factory for '" + lang_1.stringify(t) + "' because its constructor has more than 20 arguments");
var prototype = t.prototype;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
}
var instance = Object.create(prototype);
t.apply(instance, args);
return instance;
};
};

@@ -116,3 +50,3 @@ /** @internal */

}
if (lang_1.isPresent(paramAnnotations) && lang_1.isPresent(paramAnnotations[i])) {
if (isPresent(paramAnnotations) && isPresent(paramAnnotations[i])) {
result[i] = result[i].concat(paramAnnotations[i]);

@@ -125,7 +59,7 @@ }

// Prefer the direct API.
if (lang_1.isPresent(typeOrFunc.parameters)) {
if (isPresent(typeOrFunc.parameters)) {
return typeOrFunc.parameters;
}
// API of tsickle for lowering decorators to properties on the class.
if (lang_1.isPresent(typeOrFunc.ctorParameters)) {
if (isPresent(typeOrFunc.ctorParameters)) {
var ctorParameters = typeOrFunc.ctorParameters;

@@ -139,6 +73,6 @@ var paramTypes_1 = ctorParameters.map(function (ctorParam /** TODO #9100 */) { return ctorParam && ctorParam.type; });

// API for metadata created by invoking the decorators.
if (lang_1.isPresent(this._reflect) && lang_1.isPresent(this._reflect.getMetadata)) {
if (isPresent(this._reflect) && isPresent(this._reflect.getMetadata)) {
var paramAnnotations = this._reflect.getMetadata('parameters', typeOrFunc);
var paramTypes = this._reflect.getMetadata('design:paramtypes', typeOrFunc);
if (lang_1.isPresent(paramTypes) || lang_1.isPresent(paramAnnotations)) {
if (isPresent(paramTypes) || isPresent(paramAnnotations)) {
return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);

@@ -154,5 +88,5 @@ }

// Prefer the direct API.
if (lang_1.isPresent(typeOrFunc.annotations)) {
if (isPresent(typeOrFunc.annotations)) {
var annotations = typeOrFunc.annotations;
if (lang_1.isFunction(annotations) && annotations.annotations) {
if (isFunction(annotations) && annotations.annotations) {
annotations = annotations.annotations;

@@ -163,9 +97,9 @@ }

// API of tsickle for lowering decorators to properties on the class.
if (lang_1.isPresent(typeOrFunc.decorators)) {
if (isPresent(typeOrFunc.decorators)) {
return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);
}
// API for metadata created by invoking the decorators.
if (lang_1.isPresent(this._reflect) && lang_1.isPresent(this._reflect.getMetadata)) {
if (isPresent(this._reflect) && isPresent(this._reflect.getMetadata)) {
var annotations = this._reflect.getMetadata('annotations', typeOrFunc);
if (lang_1.isPresent(annotations))
if (isPresent(annotations))
return annotations;

@@ -177,5 +111,5 @@ }

// Prefer the direct API.
if (lang_1.isPresent(typeOrFunc.propMetadata)) {
if (isPresent(typeOrFunc.propMetadata)) {
var propMetadata = typeOrFunc.propMetadata;
if (lang_1.isFunction(propMetadata) && propMetadata.propMetadata) {
if (isFunction(propMetadata) && propMetadata.propMetadata) {
propMetadata = propMetadata.propMetadata;

@@ -186,3 +120,3 @@ }

// API of tsickle for lowering decorators to properties on the class.
if (lang_1.isPresent(typeOrFunc.propDecorators)) {
if (isPresent(typeOrFunc.propDecorators)) {
var propDecorators_1 = typeOrFunc.propDecorators;

@@ -196,5 +130,5 @@ var propMetadata_1 = {};

// API for metadata created by invoking the decorators.
if (lang_1.isPresent(this._reflect) && lang_1.isPresent(this._reflect.getMetadata)) {
if (isPresent(this._reflect) && isPresent(this._reflect.getMetadata)) {
var propMetadata = this._reflect.getMetadata('propMetadata', typeOrFunc);
if (lang_1.isPresent(propMetadata))
if (isPresent(propMetadata))
return propMetadata;

@@ -209,3 +143,3 @@ }

ReflectionCapabilities.prototype.hasLifecycleHook = function (type, lcInterface, lcProperty) {
if (!(type instanceof lang_1.Type))
if (!(type instanceof Type))
return false;

@@ -230,7 +164,8 @@ var proto = type.prototype;

// Runtime type
return "./" + lang_1.stringify(type);
return "./" + stringify(type);
};
ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, runtime) { return runtime; };
ReflectionCapabilities.prototype.resolveEnum = function (enumIdentifier, name) { return enumIdentifier[name]; };
return ReflectionCapabilities;
}());
exports.ReflectionCapabilities = ReflectionCapabilities;
function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {

@@ -237,0 +172,0 @@ if (!decoratorInvocations) {

@@ -8,8 +8,5 @@ /**

*/
"use strict";
var reflection_capabilities_1 = require('./reflection_capabilities');
var reflector_1 = require('./reflector');
var reflector_2 = require('./reflector');
exports.ReflectionInfo = reflector_2.ReflectionInfo;
exports.Reflector = reflector_2.Reflector;
import { ReflectionCapabilities } from './reflection_capabilities';
import { Reflector } from './reflector';
export { ReflectionInfo, Reflector } from './reflector';
/**

@@ -19,3 +16,3 @@ * The {@link Reflector} used internally in Angular to access metadata

*/
exports.reflector = new reflector_1.Reflector(new reflection_capabilities_1.ReflectionCapabilities());
export var reflector = new Reflector(new ReflectionCapabilities());
//# sourceMappingURL=reflection.js.map

@@ -19,2 +19,4 @@ /**

abstract importUri(typeOrFunc: any): string;
abstract resolveIdentifier(name: string, moduleUrl: string, runtime: any): any;
abstract resolveEnum(identifier: any, name: string): any;
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
/**

@@ -14,3 +13,3 @@ * Provides read-only access to reflection data about symbols. Used internally by Angular

*/
var ReflectorReader = (function () {
export var ReflectorReader = (function () {
function ReflectorReader() {

@@ -20,3 +19,2 @@ }

}());
exports.ReflectorReader = ReflectorReader;
//# sourceMappingURL=reflector_reader.js.map

@@ -1,2 +0,2 @@

import { Type } from '../facade/lang';
import { Type } from '../type';
import { PlatformReflectionCapabilities } from './platform_reflection_capabilities';

@@ -43,3 +43,3 @@ import { ReflectorReader } from './reflector_reader';

registerFunction(func: Function, funcInfo: ReflectionInfo): void;
registerType(type: Type, typeInfo: ReflectionInfo): void;
registerType(type: Type<any>, typeInfo: ReflectionInfo): void;
registerGetters(getters: {

@@ -54,10 +54,10 @@ [key: string]: GetterFn;

}): void;
factory(type: Type): Function;
parameters(typeOrFunc: any): any[][];
annotations(typeOrFunc: any): any[];
propMetadata(typeOrFunc: any): {
factory(type: Type<any>): Function;
parameters(typeOrFunc: Type<any>): any[][];
annotations(typeOrFunc: Type<any>): any[];
propMetadata(typeOrFunc: Type<any>): {
[key: string]: any[];
};
interfaces(type: any): any[];
hasLifecycleHook(type: any, lcInterface: Type, lcProperty: string): boolean;
interfaces(type: Type<any>): any[];
hasLifecycleHook(type: any, lcInterface: Type<any>, lcProperty: string): boolean;
getter(name: string): GetterFn;

@@ -67,2 +67,4 @@ setter(name: string): SetterFn;

importUri(type: any): string;
resolveIdentifier(name: string, moduleUrl: string, runtime: any): any;
resolveEnum(identifier: any, name: string): any;
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,10 +14,9 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var collection_1 = require('../facade/collection');
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var reflector_reader_1 = require('./reflector_reader');
import { Map, MapWrapper, Set, SetWrapper, StringMapWrapper } from '../facade/collection';
import { isPresent } from '../facade/lang';
import { ReflectorReader } from './reflector_reader';
/**
* Reflective information about a symbol, including annotations, interfaces, and other metadata.
*/
var ReflectionInfo = (function () {
export var ReflectionInfo = (function () {
function ReflectionInfo(annotations, parameters, factory, interfaces, propMetadata) {

@@ -33,3 +31,2 @@ this.annotations = annotations;

}());
exports.ReflectionInfo = ReflectionInfo;
/**

@@ -39,3 +36,3 @@ * Provides access to reflection data about symbols. Used internally by Angular

*/
var Reflector = (function (_super) {
export var Reflector = (function (_super) {
__extends(Reflector, _super);

@@ -45,9 +42,9 @@ function Reflector(reflectionCapabilities) {

/** @internal */
this._injectableInfo = new collection_1.Map();
this._injectableInfo = new Map();
/** @internal */
this._getters = new collection_1.Map();
this._getters = new Map();
/** @internal */
this._setters = new collection_1.Map();
this._setters = new Map();
/** @internal */
this._methods = new collection_1.Map();
this._methods = new Map();
this._usedKeys = null;

@@ -62,3 +59,3 @@ this.reflectionCapabilities = reflectionCapabilities;

*/
Reflector.prototype.trackUsage = function () { this._usedKeys = new collection_1.Set(); };
Reflector.prototype.trackUsage = function () { this._usedKeys = new Set(); };
/**

@@ -72,6 +69,6 @@ * Lists types for which reflection information was not requested since

if (this._usedKeys == null) {
throw new exceptions_1.BaseException('Usage tracking is disabled');
throw new Error('Usage tracking is disabled');
}
var allTypes = collection_1.MapWrapper.keys(this._injectableInfo);
return allTypes.filter(function (key) { return !collection_1.SetWrapper.has(_this._usedKeys, key); });
var allTypes = MapWrapper.keys(this._injectableInfo);
return allTypes.filter(function (key) { return !SetWrapper.has(_this._usedKeys, key); });
};

@@ -90,3 +87,3 @@ Reflector.prototype.registerFunction = function (func, funcInfo) {

var res = this._getReflectionInfo(type).factory;
return lang_1.isPresent(res) ? res : null;
return isPresent(res) ? res : null;
}

@@ -100,3 +97,3 @@ else {

var res = this._getReflectionInfo(typeOrFunc).parameters;
return lang_1.isPresent(res) ? res : [];
return isPresent(res) ? res : [];
}

@@ -110,3 +107,3 @@ else {

var res = this._getReflectionInfo(typeOrFunc).annotations;
return lang_1.isPresent(res) ? res : [];
return isPresent(res) ? res : [];
}

@@ -120,3 +117,3 @@ else {

var res = this._getReflectionInfo(typeOrFunc).propMetadata;
return lang_1.isPresent(res) ? res : {};
return isPresent(res) ? res : {};
}

@@ -130,3 +127,3 @@ else {

var res = this._getReflectionInfo(type).interfaces;
return lang_1.isPresent(res) ? res : [];
return isPresent(res) ? res : [];
}

@@ -172,3 +169,3 @@ else {

Reflector.prototype._getReflectionInfo = function (typeOrFunc) {
if (lang_1.isPresent(this._usedKeys)) {
if (isPresent(this._usedKeys)) {
this._usedKeys.add(typeOrFunc);

@@ -181,8 +178,13 @@ }

Reflector.prototype.importUri = function (type) { return this.reflectionCapabilities.importUri(type); };
Reflector.prototype.resolveIdentifier = function (name, moduleUrl, runtime) {
return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, runtime);
};
Reflector.prototype.resolveEnum = function (identifier, name) {
return this.reflectionCapabilities.resolveEnum(identifier, name);
};
return Reflector;
}(reflector_reader_1.ReflectorReader));
exports.Reflector = Reflector;
}(ReflectorReader));
function _mergeMaps(target, config) {
collection_1.StringMapWrapper.forEach(config, function (v, k) { return target.set(k, v); });
StringMapWrapper.forEach(config, function (v, k) { return target.set(k, v); });
}
//# sourceMappingURL=reflector.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
//# sourceMappingURL=types.js.map

@@ -8,8 +8,4 @@ /**

*/
"use strict";
// Public API for render
var api_1 = require('./render/api');
exports.RenderComponentType = api_1.RenderComponentType;
exports.Renderer = api_1.Renderer;
exports.RootRenderer = api_1.RootRenderer;
export { RenderComponentType, Renderer, RootRenderer } from './render/api';
//# sourceMappingURL=render.js.map

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var exceptions_1 = require('../facade/exceptions');
import { unimplemented } from '../facade/errors';
/**

@@ -15,3 +14,3 @@ * @experimental

// TODO (matsko): add typing for the animation function
var RenderComponentType = (function () {
export var RenderComponentType = (function () {
function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {

@@ -27,8 +26,7 @@ this.id = id;

}());
exports.RenderComponentType = RenderComponentType;
var RenderDebugInfo = (function () {
export var RenderDebugInfo = (function () {
function RenderDebugInfo() {
}
Object.defineProperty(RenderDebugInfo.prototype, "injector", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -38,3 +36,3 @@ configurable: true

Object.defineProperty(RenderDebugInfo.prototype, "component", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -44,3 +42,3 @@ configurable: true

Object.defineProperty(RenderDebugInfo.prototype, "providerTokens", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -50,3 +48,3 @@ configurable: true

Object.defineProperty(RenderDebugInfo.prototype, "references", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -56,3 +54,3 @@ configurable: true

Object.defineProperty(RenderDebugInfo.prototype, "context", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -62,3 +60,3 @@ configurable: true

Object.defineProperty(RenderDebugInfo.prototype, "source", {
get: function () { return exceptions_1.unimplemented(); },
get: function () { return unimplemented(); },
enumerable: true,

@@ -69,7 +67,6 @@ configurable: true

}());
exports.RenderDebugInfo = RenderDebugInfo;
/**
* @experimental
*/
var Renderer = (function () {
export var Renderer = (function () {
function Renderer() {

@@ -79,3 +76,2 @@ }

}());
exports.Renderer = Renderer;
/**

@@ -94,3 +90,3 @@ * Injectable service that provides a low-level interface for modifying the UI.

*/
var RootRenderer = (function () {
export var RootRenderer = (function () {
function RootRenderer() {

@@ -100,3 +96,2 @@ }

}());
exports.RootRenderer = RootRenderer;
//# sourceMappingURL=api.js.map

@@ -13,3 +13,3 @@ /**

*
* See DomSanitizationService for more details on security in Angular applications.
* See DomSanitizer for more details on security in Angular applications.
*

@@ -27,8 +27,8 @@ * @stable

/**
* SanitizationService is used by the views to sanitize potentially dangerous values.
* Sanitizer is used by the views to sanitize potentially dangerous values.
*
* @stable
*/
export declare abstract class SanitizationService {
export declare abstract class Sanitizer {
abstract sanitize(context: SecurityContext, value: string): string;
}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
/**

@@ -15,6 +14,7 @@ * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property

*
* See DomSanitizationService for more details on security in Angular applications.
* See DomSanitizer for more details on security in Angular applications.
*
* @stable
*/
export var SecurityContext;
(function (SecurityContext) {

@@ -27,15 +27,13 @@ SecurityContext[SecurityContext["NONE"] = 0] = "NONE";

SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL";
})(exports.SecurityContext || (exports.SecurityContext = {}));
var SecurityContext = exports.SecurityContext;
})(SecurityContext || (SecurityContext = {}));
/**
* SanitizationService is used by the views to sanitize potentially dangerous values.
* Sanitizer is used by the views to sanitize potentially dangerous values.
*
* @stable
*/
var SanitizationService = (function () {
function SanitizationService() {
export var Sanitizer = (function () {
function Sanitizer() {
}
return SanitizationService;
return Sanitizer;
}());
exports.SanitizationService = SanitizationService;
//# sourceMappingURL=security.js.map
import { NgZone } from '../zone/ng_zone';
/**
* Testability API.
* `declare` keyword causes tsickle to generate externs, so these methods are
* not renamed by Closure Compiler.
* @experimental
*/
export interface PublicTestability {
isStable(): boolean;
whenStable(callback: Function): void;
findProviders(using: any, provider: string, exactMatch: boolean): any[];
}
/**
* The Testability service provides testing hooks that can be accessed from

@@ -8,3 +19,3 @@ * the browser and by services such as Protractor. Each bootstrapped Angular

*/
export declare class Testability {
export declare class Testability implements PublicTestability {
private _ngZone;

@@ -11,0 +22,0 @@ constructor(_ngZone: NgZone);

@@ -8,9 +8,13 @@ /**

*/
"use strict";
var decorators_1 = require('../di/decorators');
var collection_1 = require('../facade/collection');
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var ng_zone_1 = require('../zone/ng_zone');
var Testability = (function () {
import { Injectable } from '../di/decorators';
import { Map, MapWrapper } from '../facade/collection';
import { scheduleMicroTask } from '../facade/lang';
import { NgZone } from '../zone/ng_zone';
/**
* The Testability service provides testing hooks that can be accessed from
* the browser and by services such as Protractor. Each bootstrapped Angular
* application on the page will have an instance of Testability.
* @experimental
*/
export var Testability = (function () {
function Testability(_ngZone) {

@@ -45,4 +49,4 @@ this._ngZone = _ngZone;

next: function () {
ng_zone_1.NgZone.assertNotInAngularZone();
lang_1.scheduleMicroTask(function () {
NgZone.assertNotInAngularZone();
scheduleMicroTask(function () {
_this._isZoneStable = true;

@@ -63,3 +67,3 @@ _this._runCallbacksIfReady();

if (this._pendingCount < 0) {
throw new exceptions_1.BaseException('pending async requests below zero');
throw new Error('pending async requests below zero');
}

@@ -77,3 +81,3 @@ this._runCallbacksIfReady();

// Schedules the call backs in a new frame so that it is always async.
lang_1.scheduleMicroTask(function () {
scheduleMicroTask(function () {
while (_this._callbacks.length !== 0) {

@@ -103,17 +107,19 @@ (_this._callbacks.pop())(_this._didWork);

};
/** @nocollapse */
Testability.decorators = [
{ type: decorators_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
Testability.ctorParameters = [
{ type: ng_zone_1.NgZone, },
{ type: NgZone, },
];
return Testability;
}());
exports.Testability = Testability;
var TestabilityRegistry = (function () {
/**
* A global registry of {@link Testability} instances for specific elements.
* @experimental
*/
export var TestabilityRegistry = (function () {
function TestabilityRegistry() {
/** @internal */
this._applications = new collection_1.Map();
this._applications = new Map();
_testabilityGetter.addToWindow(this);

@@ -125,4 +131,4 @@ }

TestabilityRegistry.prototype.getTestability = function (elem) { return this._applications.get(elem); };
TestabilityRegistry.prototype.getAllTestabilities = function () { return collection_1.MapWrapper.values(this._applications); };
TestabilityRegistry.prototype.getAllRootElements = function () { return collection_1.MapWrapper.keys(this._applications); };
TestabilityRegistry.prototype.getAllTestabilities = function () { return MapWrapper.values(this._applications); };
TestabilityRegistry.prototype.getAllRootElements = function () { return MapWrapper.keys(this._applications); };
TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {

@@ -132,5 +138,4 @@ if (findInAncestors === void 0) { findInAncestors = true; }

};
/** @nocollapse */
TestabilityRegistry.decorators = [
{ type: decorators_1.Injectable },
{ type: Injectable },
];

@@ -141,3 +146,2 @@ /** @nocollapse */

}());
exports.TestabilityRegistry = TestabilityRegistry;
var _NoopGetTestability = (function () {

@@ -156,7 +160,6 @@ function _NoopGetTestability() {

*/
function setTestabilityGetter(getter) {
export function setTestabilityGetter(getter) {
_testabilityGetter = getter;
}
exports.setTestabilityGetter = setTestabilityGetter;
var _testabilityGetter = new _NoopGetTestability();
//# sourceMappingURL=testability.js.map

@@ -8,6 +8,4 @@ /**

*/
"use strict";
// Public API for util
var decorators_1 = require('./util/decorators');
exports.Class = decorators_1.Class;
export { Class } from './util/decorators';
//# sourceMappingURL=util.js.map

@@ -0,10 +1,3 @@

import { Type } from '../type';
/**
* @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 { ConcreteType, Type } from '../facade/lang';
/**
* Declares the interface to be used with {@link Class}.

@@ -18,3 +11,3 @@ *

*/
extends?: Type;
extends?: Type<any>;
/**

@@ -34,3 +27,3 @@ * Required constructor function for a class.

*/
[x: string]: Type | Function | any[];
[x: string]: Type<any> | Function | any[];
}

@@ -64,3 +57,3 @@ /**

*/
<T extends Type>(type: T): T;
<T extends Type<any>>(type: T): T;
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;

@@ -76,3 +69,3 @@ /**

*/
Class(obj: ClassDefinition): ConcreteType<any>;
Class(obj: ClassDefinition): Type<any>;
}

@@ -161,5 +154,5 @@ /**

*/
export declare function Class(clsDef: ClassDefinition): ConcreteType<any>;
export declare function Class(clsDef: ClassDefinition): Type<any>;
export declare function makeDecorator(annotationCls: any, chainFn?: (fn: Function) => void): (...args: any[]) => (cls: any) => any;
export declare function makeParamDecorator(annotationCls: any): any;
export declare function makePropDecorator(annotationCls: any): any;

@@ -8,7 +8,6 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
import { global, isFunction, stringify } from '../facade/lang';
var _nextClassId = 0;
function extractAnnotation(annotation) {
if (lang_1.isFunction(annotation) && annotation.hasOwnProperty('annotation')) {
if (isFunction(annotation) && annotation.hasOwnProperty('annotation')) {
// it is a decorator, extract annotation

@@ -22,5 +21,5 @@ annotation = annotation.annotation;

fnOrArray === Number || fnOrArray === Array) {
throw new Error("Can not use native " + lang_1.stringify(fnOrArray) + " as constructor");
throw new Error("Can not use native " + stringify(fnOrArray) + " as constructor");
}
if (lang_1.isFunction(fnOrArray)) {
if (isFunction(fnOrArray)) {
return fnOrArray;

@@ -32,7 +31,7 @@ }

var fn = fnOrArray[annoLength];
if (!lang_1.isFunction(fn)) {
throw new Error("Last position of Class method array must be Function in key " + key + " was '" + lang_1.stringify(fn) + "'");
if (!isFunction(fn)) {
throw new Error("Last position of Class method array must be Function in key " + key + " was '" + stringify(fn) + "'");
}
if (annoLength != fn.length) {
throw new Error("Number of annotations (" + annoLength + ") does not match number of arguments (" + fn.length + ") in the function: " + lang_1.stringify(fn));
throw new Error("Number of annotations (" + annoLength + ") does not match number of arguments (" + fn.length + ") in the function: " + stringify(fn));
}

@@ -49,3 +48,3 @@ var paramsAnnotations = [];

}
else if (lang_1.isFunction(annotation)) {
else if (isFunction(annotation)) {
paramAnnotations.push(extractAnnotation(annotation));

@@ -61,3 +60,3 @@ }

else {
throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + lang_1.stringify(fnOrArray) + "'");
throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + stringify(fnOrArray) + "'");
}

@@ -147,7 +146,7 @@ }

*/
function Class(clsDef) {
export function Class(clsDef) {
var constructor = applyParams(clsDef.hasOwnProperty('constructor') ? clsDef.constructor : undefined, 'constructor');
var proto = constructor.prototype;
if (clsDef.hasOwnProperty('extends')) {
if (lang_1.isFunction(clsDef.extends)) {
if (isFunction(clsDef.extends)) {
constructor.prototype = proto =

@@ -157,3 +156,3 @@ Object.create(clsDef.extends.prototype);

else {
throw new Error("Class definition 'extends' property must be a constructor function was: " + lang_1.stringify(clsDef.extends));
throw new Error("Class definition 'extends' property must be a constructor function was: " + stringify(clsDef.extends));
}

@@ -169,3 +168,4 @@ }

}
if (!constructor['name']) {
var constructorName = constructor['name'];
if (!constructorName || constructorName === 'constructor') {
constructor['overriddenName'] = "class" + _nextClassId++;

@@ -175,14 +175,9 @@ }

}
exports.Class = Class;
var Reflect = lang_1.global.Reflect;
// Throw statement at top-level is disallowed by closure compiler in ES6 input.
// Wrap in an IIFE as a work-around.
(function checkReflect() {
if (!(Reflect && Reflect.getMetadata)) {
throw 'reflect-metadata shim is required when using class decorators';
}
})();
function makeDecorator(annotationCls, chainFn) {
var Reflect = global.Reflect;
export function makeDecorator(annotationCls, chainFn) {
if (chainFn === void 0) { chainFn = null; }
function DecoratorFactory(objOrType) {
if (!(Reflect && Reflect.getMetadata)) {
throw 'reflect-metadata shim is required when using class decorators';
}
var annotationInstance = new annotationCls(objOrType);

@@ -193,3 +188,3 @@ if (this instanceof annotationCls) {

else {
var chainAnnotation = lang_1.isFunction(this) && this.annotations instanceof Array ? this.annotations : [];
var chainAnnotation = isFunction(this) && this.annotations instanceof Array ? this.annotations : [];
chainAnnotation.push(annotationInstance);

@@ -213,4 +208,3 @@ var TypeDecorator = function TypeDecorator(cls) {

}
exports.makeDecorator = makeDecorator;
function makeParamDecorator(annotationCls) {
export function makeParamDecorator(annotationCls) {
function ParamDecoratorFactory() {

@@ -248,4 +242,3 @@ var args = [];

}
exports.makeParamDecorator = makeParamDecorator;
function makePropDecorator(annotationCls) {
export function makePropDecorator(annotationCls) {
function PropDecoratorFactory() {

@@ -274,3 +267,2 @@ var args = [];

}
exports.makePropDecorator = makePropDecorator;
//# sourceMappingURL=decorators.js.map

@@ -8,2 +8,2 @@ /**

*/
export { NgZone, NgZoneError } from './zone/ng_zone';
export { NgZone } from './zone/ng_zone';

@@ -8,7 +8,4 @@ /**

*/
"use strict";
// Public API for Zone
var ng_zone_1 = require('./zone/ng_zone');
exports.NgZone = ng_zone_1.NgZone;
exports.NgZoneError = ng_zone_1.NgZoneError;
export { NgZone } from './zone/ng_zone';
//# sourceMappingURL=zone.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./zone/ng_zone","export":["NgZone","NgZoneError"]}]}
{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./zone/ng_zone","export":["NgZone"]}]}

@@ -8,11 +8,2 @@ /**

*/
/**
* Stores error information; delivered via [NgZone.onError] stream.
* @deprecated
*/
export declare class NgZoneError {
error: any;
stackTrace: any;
constructor(error: any, stackTrace: any);
}
export declare class NgZoneImpl {

@@ -31,3 +22,3 @@ static isInAngularZone(): boolean;

setMacrotask: (hasMacrotasks: boolean) => void;
onError: (error: NgZoneError) => void;
onError: (error: any) => void;
});

@@ -34,0 +25,0 @@ runInner(fn: () => any): any;

@@ -8,16 +8,3 @@ /**

*/
"use strict";
/**
* Stores error information; delivered via [NgZone.onError] stream.
* @deprecated
*/
var NgZoneError = (function () {
function NgZoneError(error, stackTrace) {
this.error = error;
this.stackTrace = stackTrace;
}
return NgZoneError;
}());
exports.NgZoneError = NgZoneError;
var NgZoneImpl = (function () {
export var NgZoneImpl = (function () {
function NgZoneImpl(_a) {

@@ -75,3 +62,3 @@ var _this = this;

delegate.handleError(target, error);
_this.onError(new NgZoneError(error, error.stack));
_this.onError(error);
return false;

@@ -94,3 +81,2 @@ }

}());
exports.NgZoneImpl = NgZoneImpl;
//# sourceMappingURL=ng_zone_impl.js.map

@@ -9,3 +9,2 @@ /**

import { EventEmitter } from '../facade/async';
export { NgZoneError } from './ng_zone_impl';
/**

@@ -12,0 +11,0 @@ * An injectable service for executing work inside or outside of the Angular zone.

@@ -8,8 +8,4 @@ /**

*/
"use strict";
var async_1 = require('../facade/async');
var exceptions_1 = require('../facade/exceptions');
var ng_zone_impl_1 = require('./ng_zone_impl');
var ng_zone_impl_2 = require('./ng_zone_impl');
exports.NgZoneError = ng_zone_impl_2.NgZoneError;
import { EventEmitter } from '../facade/async';
import { NgZoneImpl } from './ng_zone_impl';
/**

@@ -87,3 +83,3 @@ * An injectable service for executing work inside or outside of the Angular zone.

*/
var NgZone = (function () {
export var NgZone = (function () {
function NgZone(_a) {

@@ -99,10 +95,10 @@ var _this = this;

/** @internal */
this._onUnstable = new async_1.EventEmitter(false);
this._onUnstable = new EventEmitter(false);
/** @internal */
this._onMicrotaskEmpty = new async_1.EventEmitter(false);
this._onMicrotaskEmpty = new EventEmitter(false);
/** @internal */
this._onStable = new async_1.EventEmitter(false);
this._onStable = new EventEmitter(false);
/** @internal */
this._onErrorEvents = new async_1.EventEmitter(false);
this._zoneImpl = new ng_zone_impl_1.NgZoneImpl({
this._onErrorEvents = new EventEmitter(false);
this._zoneImpl = new NgZoneImpl({
trace: enableLongStackTrace,

@@ -130,11 +126,11 @@ onEnter: function () {

}
NgZone.isInAngularZone = function () { return ng_zone_impl_1.NgZoneImpl.isInAngularZone(); };
NgZone.isInAngularZone = function () { return NgZoneImpl.isInAngularZone(); };
NgZone.assertInAngularZone = function () {
if (!ng_zone_impl_1.NgZoneImpl.isInAngularZone()) {
throw new exceptions_1.BaseException('Expected to be in Angular Zone, but it is not!');
if (!NgZoneImpl.isInAngularZone()) {
throw new Error('Expected to be in Angular Zone, but it is not!');
}
};
NgZone.assertNotInAngularZone = function () {
if (ng_zone_impl_1.NgZoneImpl.isInAngularZone()) {
throw new exceptions_1.BaseException('Expected to not be in Angular Zone, but it is!');
if (NgZoneImpl.isInAngularZone()) {
throw new Error('Expected to not be in Angular Zone, but it is!');
}

@@ -260,3 +256,2 @@ };

}());
exports.NgZone = NgZone;
//# sourceMappingURL=ng_zone.js.map

@@ -8,7 +8,6 @@ /**

*/
"use strict";
/**
* Injectable completer that allows signaling completion of an asynchronous test. Used internally.
*/
var AsyncTestCompleter = (function () {
export var AsyncTestCompleter = (function () {
function AsyncTestCompleter() {

@@ -30,3 +29,2 @@ var _this = this;

}());
exports.AsyncTestCompleter = AsyncTestCompleter;
//# sourceMappingURL=async_test_completer.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var _global = (typeof window === 'undefined' ? global : window);

@@ -28,3 +27,3 @@ /**

*/
function async(fn) {
export function async(fn) {
// If we're running using the Jasmine test framework, adapt to call the 'done'

@@ -34,2 +33,8 @@ // function when asynchronous activity is finished.

return function (done) {
if (!done) {
// if we run beforeEach in @angular/core/testing/testing_internal then we get no done
// fake it here and assume sync.
done = function () { };
done.fail = function (e) { throw e; };
}
runInTestZone(fn, done, function (err) {

@@ -52,4 +57,4 @@ if (typeof err === 'string') {

}
exports.async = async;
function runInTestZone(fn, finishCallback, failCallback) {
var currentZone = Zone.current;
var AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];

@@ -60,6 +65,37 @@ if (AsyncTestZoneSpec === undefined) {

}
var testZoneSpec = new AsyncTestZoneSpec(finishCallback, failCallback, 'test');
var testZone = Zone.current.fork(testZoneSpec);
return testZone.run(fn);
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (ProxyZoneSpec === undefined) {
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
'Please make sure that your environment includes zone.js/dist/proxy.js');
}
var proxyZoneSpec = ProxyZoneSpec.get();
ProxyZoneSpec.assertPresent();
// We need to create the AsyncTestZoneSpec outside the ProxyZone.
// If we do it in ProxyZone then we will get to infinite recursion.
var proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
var previousDelegate = proxyZoneSpec.getDelegate();
proxyZone.parent.run(function () {
var testZoneSpec = new AsyncTestZoneSpec(function () {
// Need to restore the original zone.
currentZone.run(function () {
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
finishCallback();
});
}, function (error) {
// Need to restore the original zone.
currentZone.run(function () {
if (proxyZoneSpec.getDelegate() == testZoneSpec) {
// Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.
proxyZoneSpec.setDelegate(previousDelegate);
}
failCallback(error);
});
}, 'test');
proxyZoneSpec.setDelegate(testZoneSpec);
});
return Zone.current.runGuarded(fn);
}
//# sourceMappingURL=async.js.map

@@ -8,3 +8,3 @@ /**

*/
import { ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, NgZone } from '../index';
import { ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, NgZone } from '@angular/core';
/**

@@ -46,2 +46,3 @@ * Fixture for debugging and testing a component.

private _isStable;
private _isDestroyed;
private _resolve;

@@ -48,0 +49,0 @@ private _promise;

@@ -8,6 +8,4 @@ /**

*/
"use strict";
var index_1 = require('../index');
var exceptions_1 = require('../src/facade/exceptions');
var lang_1 = require('../src/facade/lang');
import { getDebugNode } from '@angular/core';
import { scheduleMicroTask } from './facade/lang';
/**

@@ -18,6 +16,7 @@ * Fixture for debugging and testing a component.

*/
var ComponentFixture = (function () {
export var ComponentFixture = (function () {
function ComponentFixture(componentRef, ngZone, autoDetect) {
var _this = this;
this._isStable = true;
this._isDestroyed = false;
this._promise = null;

@@ -30,3 +29,3 @@ this._onUnstableSubscription = null;

this.elementRef = componentRef.location;
this.debugElement = index_1.getDebugNode(this.elementRef.nativeElement);
this.debugElement = getDebugNode(this.elementRef.nativeElement);
this.componentInstance = componentRef.instance;

@@ -57,3 +56,3 @@ this.nativeElement = this.elementRef.nativeElement;

// pending macrotasks.
lang_1.scheduleMicroTask(function () {
scheduleMicroTask(function () {
if (!_this.ngZone.hasPendingMacrotasks) {

@@ -71,3 +70,3 @@ if (_this._promise !== null) {

this._onErrorSubscription =
ngZone.onError.subscribe({ next: function (error) { throw error.error; } });
ngZone.onError.subscribe({ next: function (error) { throw error; } });
}

@@ -109,3 +108,3 @@ }

if (this.ngZone == null) {
throw new exceptions_1.BaseException('Cannot call autoDetectChanges when ComponentFixtureNoNgZone is set');
throw new Error('Cannot call autoDetectChanges when ComponentFixtureNoNgZone is set');
}

@@ -143,23 +142,25 @@ this._autoDetect = autoDetect;

ComponentFixture.prototype.destroy = function () {
this.componentRef.destroy();
if (this._onUnstableSubscription != null) {
this._onUnstableSubscription.unsubscribe();
this._onUnstableSubscription = null;
if (!this._isDestroyed) {
this.componentRef.destroy();
if (this._onUnstableSubscription != null) {
this._onUnstableSubscription.unsubscribe();
this._onUnstableSubscription = null;
}
if (this._onStableSubscription != null) {
this._onStableSubscription.unsubscribe();
this._onStableSubscription = null;
}
if (this._onMicrotaskEmptySubscription != null) {
this._onMicrotaskEmptySubscription.unsubscribe();
this._onMicrotaskEmptySubscription = null;
}
if (this._onErrorSubscription != null) {
this._onErrorSubscription.unsubscribe();
this._onErrorSubscription = null;
}
this._isDestroyed = true;
}
if (this._onStableSubscription != null) {
this._onStableSubscription.unsubscribe();
this._onStableSubscription = null;
}
if (this._onMicrotaskEmptySubscription != null) {
this._onMicrotaskEmptySubscription.unsubscribe();
this._onMicrotaskEmptySubscription = null;
}
if (this._onErrorSubscription != null) {
this._onErrorSubscription.unsubscribe();
this._onErrorSubscription = null;
}
};
return ComponentFixture;
}());
exports.ComponentFixture = ComponentFixture;
//# sourceMappingURL=component_fixture.js.map

@@ -8,6 +8,4 @@ /**

*/
"use strict";
var index_1 = require('../index');
var _FakeAsyncTestZoneSpecType = Zone['FakeAsyncTestZoneSpec'];
var _fakeAsyncZone = null;
var FakeAsyncTestZoneSpec = Zone['FakeAsyncTestZoneSpec'];
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
var _fakeAsyncTestZoneSpec = null;

@@ -20,7 +18,6 @@ /**

*/
function resetFakeAsyncZone() {
_fakeAsyncZone = null;
export function resetFakeAsyncZone() {
_fakeAsyncTestZoneSpec = null;
ProxyZoneSpec.assertPresent().resetDelegate();
}
exports.resetFakeAsyncZone = resetFakeAsyncZone;
var _inFakeAsyncCall = false;

@@ -45,31 +42,36 @@ /**

*/
function fakeAsync(fn) {
export function fakeAsync(fn) {
return function () {
var args = []; /** TODO #9100 */
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
}
var proxyZoneSpec = ProxyZoneSpec.assertPresent();
if (_inFakeAsyncCall) {
throw new index_1.BaseException('fakeAsync() calls can not be nested');
throw new Error('fakeAsync() calls can not be nested');
}
_inFakeAsyncCall = true;
try {
if (!_fakeAsyncZone) {
if (Zone.current.get('FakeAsyncTestZoneSpec') != null) {
throw new index_1.BaseException('fakeAsync() calls can not be nested');
if (!_fakeAsyncTestZoneSpec) {
if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {
throw new Error('fakeAsync() calls can not be nested');
}
_fakeAsyncTestZoneSpec = new _FakeAsyncTestZoneSpecType();
_fakeAsyncZone = Zone.current.fork(_fakeAsyncTestZoneSpec);
_fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();
}
var res = _fakeAsyncZone.run(function () {
var res = fn.apply(void 0, args);
var res = void 0;
var lastProxyZoneSpec = proxyZoneSpec.getDelegate();
proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);
try {
res = fn.apply(void 0, args);
flushMicrotasks();
return res;
});
}
finally {
proxyZoneSpec.setDelegate(lastProxyZoneSpec);
}
if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {
throw new index_1.BaseException((_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length + " ") +
throw new Error((_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length + " ") +
"periodic timer(s) still in the queue.");
}
if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {
throw new index_1.BaseException(_fakeAsyncTestZoneSpec.pendingTimers.length + " timer(s) still in the queue.");
throw new Error(_fakeAsyncTestZoneSpec.pendingTimers.length + " timer(s) still in the queue.");
}

@@ -80,6 +82,6 @@ return res;

_inFakeAsyncCall = false;
resetFakeAsyncZone();
}
};
}
exports.fakeAsync = fakeAsync;
function _getFakeAsyncZoneSpec() {

@@ -103,7 +105,6 @@ if (_fakeAsyncTestZoneSpec == null) {

*/
function tick(millis) {
export function tick(millis) {
if (millis === void 0) { millis = 0; }
_getFakeAsyncZoneSpec().tick(millis);
}
exports.tick = tick;
/**

@@ -114,3 +115,3 @@ * Discard all remaining periodic tasks.

*/
function discardPeriodicTasks() {
export function discardPeriodicTasks() {
var zoneSpec = _getFakeAsyncZoneSpec();

@@ -120,3 +121,2 @@ var pendingTimers = zoneSpec.pendingPeriodicTimers;

}
exports.discardPeriodicTasks = discardPeriodicTasks;
/**

@@ -127,6 +127,5 @@ * Flush any pending microtasks.

*/
function flushMicrotasks() {
export function flushMicrotasks() {
_getFakeAsyncZoneSpec().flushMicrotasks();
}
exports.flushMicrotasks = flushMicrotasks;
//# sourceMappingURL=fake_async.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"fakeAsync":{"__symbolic":"function","parameters":["fn"],"value":{"__symbolic":"error","message":"Function call not supported","line":47,"character":8}}}}
{"__symbolic":"module","version":1,"metadata":{"fakeAsync":{"__symbolic":"function","parameters":["fn"],"value":{"__symbolic":"error","message":"Function call not supported","line":50,"character":9}}}}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
//# sourceMappingURL=metadata_override.js.map

@@ -8,4 +8,3 @@ /**

*/
import { ComponentMetadataType, DirectiveMetadataType, Injector, NgModuleMetadataType, OpaqueToken, PipeMetadataType, PlatformRef, Provider, SchemaMetadata, Type } from '../index';
import { ConcreteType } from '../src/facade/lang';
import { ComponentMetadataType, DirectiveMetadataType, Injector, NgModuleMetadataType, OpaqueToken, PipeMetadataType, PlatformRef, SchemaMetadata, Type } from '@angular/core';
import { ComponentFixture } from './component_fixture';

@@ -55,3 +54,3 @@ import { MetadataOverride } from './metadata_override';

*/
static initTestEnvironment(ngModule: Type, platform: PlatformRef): TestBed;
static initTestEnvironment(ngModule: Type<any>, platform: PlatformRef): TestBed;
/**

@@ -83,7 +82,8 @@ * Reset the providers for the test injector.

static compileComponents(): Promise<any>;
static overrideModule(ngModule: ConcreteType<any>, override: MetadataOverride<NgModuleMetadataType>): typeof TestBed;
static overrideComponent(component: ConcreteType<any>, override: MetadataOverride<ComponentMetadataType>): typeof TestBed;
static overrideDirective(directive: ConcreteType<any>, override: MetadataOverride<DirectiveMetadataType>): typeof TestBed;
static overridePipe(pipe: ConcreteType<any>, override: MetadataOverride<PipeMetadataType>): typeof TestBed;
static createComponent<T>(component: ConcreteType<T>): ComponentFixture<T>;
static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModuleMetadataType>): typeof TestBed;
static overrideComponent(component: Type<any>, override: MetadataOverride<ComponentMetadataType>): typeof TestBed;
static overrideDirective(directive: Type<any>, override: MetadataOverride<DirectiveMetadataType>): typeof TestBed;
static overridePipe(pipe: Type<any>, override: MetadataOverride<PipeMetadataType>): typeof TestBed;
static get(token: any, notFoundValue?: any): any;
static createComponent<T>(component: Type<T>): ComponentFixture<T>;
private _instantiated;

@@ -102,2 +102,3 @@ private _compiler;

private _schemas;
private _activeFixtures;
/**

@@ -116,3 +117,3 @@ * Initialize the environment for testing with a compiler factory, a PlatformRef, and an

*/
initTestEnvironment(ngModule: Type, platform: PlatformRef): void;
initTestEnvironment(ngModule: Type<any>, platform: PlatformRef): void;
/**

@@ -124,9 +125,5 @@ * Reset the providers for the test injector.

resetTestEnvironment(): void;
/**
* @deprecated use `resetTestingModule` instead
*/
reset(): void;
resetTestingModule(): void;
platform: PlatformRef;
ngModule: Type;
ngModule: Type<any>;
configureCompiler(config: {

@@ -143,7 +140,7 @@ providers?: any[];

execute(tokens: any[], fn: Function): any;
overrideModule(ngModule: ConcreteType<any>, override: MetadataOverride<NgModuleMetadataType>): void;
overrideComponent(component: ConcreteType<any>, override: MetadataOverride<ComponentMetadataType>): void;
overrideDirective(directive: ConcreteType<any>, override: MetadataOverride<DirectiveMetadataType>): void;
overridePipe(pipe: ConcreteType<any>, override: MetadataOverride<PipeMetadataType>): void;
createComponent<T>(component: ConcreteType<T>): ComponentFixture<T>;
overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModuleMetadataType>): void;
overrideComponent(component: Type<any>, override: MetadataOverride<ComponentMetadataType>): void;
overrideDirective(directive: Type<any>, override: MetadataOverride<DirectiveMetadataType>): void;
overridePipe(pipe: Type<any>, override: MetadataOverride<PipeMetadataType>): void;
createComponent<T>(component: Type<T>): ComponentFixture<T>;
}

@@ -155,26 +152,2 @@ /**

/**
* @deprecated use getTestBed instead.
*/
export declare function getTestInjector(): TestBed;
/**
* Set the providers that the test injector should use. These should be providers
* common to every test in the suite.
*
* This may only be called once, to set up the common providers for the current test
* suite on the current platform. If you absolutely need to change the providers,
* first use `resetBaseTestProviders`.
*
* Test modules and platforms for individual platforms are available from
* 'angular2/platform/testing/<platform_name>'.
*
* @deprecated Use TestBed.initTestEnvironment instead
*/
export declare function setBaseTestProviders(platformProviders: Array<Type | Provider | any[]>, applicationProviders: Array<Type | Provider | any[]>): void;
/**
* Reset the providers for the test injector.
*
* @deprecated Use TestBed.resetTestEnvironment instead.
*/
export declare function resetBaseTestProviders(): void;
/**
* Allows injecting dependencies in `beforeEach()` and `it()`.

@@ -214,6 +187,2 @@ *

/**
* @deprecated Use `TestBed.configureTestingModule instead.
*/
export declare function withProviders(providers: () => any): InjectSetupWrapper;
/**
* @experimental

@@ -220,0 +189,0 @@ */

@@ -8,10 +8,8 @@ /**

*/
"use strict";
var index_1 = require('../index');
var collection_1 = require('../src/facade/collection');
var exceptions_1 = require('../src/facade/exceptions');
var lang_1 = require('../src/facade/lang');
var async_test_completer_1 = require('./async_test_completer');
var component_fixture_1 = require('./component_fixture');
var test_compiler_1 = require('./test_compiler');
import { Injector, NgModule, NgZone, OpaqueToken } from '@angular/core';
import { AsyncTestCompleter } from './async_test_completer';
import { ComponentFixture } from './component_fixture';
import { ListWrapper } from './facade/collection';
import { FunctionWrapper, stringify } from './facade/lang';
import { TestingCompilerFactory } from './test_compiler';
var UNDEFINED = new Object();

@@ -23,3 +21,3 @@ /**

*/
var TestComponentRenderer = (function () {
export var TestComponentRenderer = (function () {
function TestComponentRenderer() {

@@ -30,3 +28,2 @@ }

}());
exports.TestComponentRenderer = TestComponentRenderer;
var _nextRootElementId = 0;

@@ -36,11 +33,11 @@ /**

*/
exports.ComponentFixtureAutoDetect = new index_1.OpaqueToken('ComponentFixtureAutoDetect');
export var ComponentFixtureAutoDetect = new OpaqueToken('ComponentFixtureAutoDetect');
/**
* @experimental
*/
exports.ComponentFixtureNoNgZone = new index_1.OpaqueToken('ComponentFixtureNoNgZone');
export var ComponentFixtureNoNgZone = new OpaqueToken('ComponentFixtureNoNgZone');
/**
* @experimental
*/
var TestBed = (function () {
export var TestBed = (function () {
function TestBed() {

@@ -60,2 +57,3 @@ this._instantiated = false;

this._schemas = [];
this._activeFixtures = [];
this.platform = null;

@@ -130,2 +128,6 @@ this.ngModule = null;

};
TestBed.get = function (token, notFoundValue) {
if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
return getTestBed().get(token, notFoundValue);
};
TestBed.createComponent = function (component) {

@@ -149,3 +151,3 @@ return getTestBed().createComponent(component);

if (this.platform || this.ngModule) {
throw new exceptions_1.BaseException('Cannot set base providers because it has already been called');
throw new Error('Cannot set base providers because it has already been called');
}

@@ -165,6 +167,2 @@ this.platform = platform;

};
/**
* @deprecated use `resetTestingModule` instead
*/
TestBed.prototype.reset = function () { this.resetTestingModule(); };
TestBed.prototype.resetTestingModule = function () {

@@ -184,2 +182,4 @@ this._compiler = null;

this._instantiated = false;
this._activeFixtures.forEach(function (fixture) { return fixture.destroy(); });
this._activeFixtures = [];
};

@@ -193,12 +193,12 @@ TestBed.prototype.configureCompiler = function (config) {

if (moduleDef.providers) {
this._providers = collection_1.ListWrapper.concat(this._providers, moduleDef.providers);
this._providers = ListWrapper.concat(this._providers, moduleDef.providers);
}
if (moduleDef.declarations) {
this._declarations = collection_1.ListWrapper.concat(this._declarations, moduleDef.declarations);
this._declarations = ListWrapper.concat(this._declarations, moduleDef.declarations);
}
if (moduleDef.imports) {
this._imports = collection_1.ListWrapper.concat(this._imports, moduleDef.imports);
this._imports = ListWrapper.concat(this._imports, moduleDef.imports);
}
if (moduleDef.schemas) {
this._schemas = collection_1.ListWrapper.concat(this._schemas, moduleDef.schemas);
this._schemas = ListWrapper.concat(this._schemas, moduleDef.schemas);
}

@@ -228,4 +228,4 @@ };

catch (e) {
if (e instanceof index_1.ComponentStillLoadingError) {
throw new Error(("This test module uses the component " + lang_1.stringify(e.compType) + " which is using a \"templateUrl\", but they were never compiled. ") +
if (e.compType) {
throw new Error(("This test module uses the component " + stringify(e.compType) + " which is using a \"templateUrl\", but they were never compiled. ") +
"Please call \"TestBed.compileComponents\" before your test.");

@@ -251,9 +251,10 @@ }

}
/** @nocollapse */
DynamicTestModule.decorators = [
{ type: index_1.NgModule, args: [{ providers: providers, declarations: declarations, imports: imports, schemas: schemas },] },
{ type: NgModule, args: [{ providers: providers, declarations: declarations, imports: imports, schemas: schemas },] },
];
/** @nocollapse */
DynamicTestModule.ctorParameters = [];
return DynamicTestModule;
}());
var compilerFactory = this.platform.injector.get(test_compiler_1.TestingCompilerFactory);
var compilerFactory = this.platform.injector.get(TestingCompilerFactory);
this._compiler =

@@ -269,3 +270,3 @@ compilerFactory.createTestingCompiler(this._compilerOptions.concat([{ useDebug: true }]));

if (this._instantiated) {
throw new exceptions_1.BaseException(("Cannot " + methodDescription + " when the test module has already been instantiated. ") +
throw new Error(("Cannot " + methodDescription + " when the test module has already been instantiated. ") +
("Make sure you are not using `inject` before `" + methodName + "`."));

@@ -275,3 +276,3 @@ }

TestBed.prototype.get = function (token, notFoundValue) {
if (notFoundValue === void 0) { notFoundValue = index_1.Injector.THROW_IF_NOT_FOUND; }
if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
this._initIfNeeded();

@@ -290,3 +291,3 @@ if (token === TestBed) {

var params = tokens.map(function (t) { return _this.get(t); });
return lang_1.FunctionWrapper.apply(fn, params);
return FunctionWrapper.apply(fn, params);
};

@@ -314,7 +315,7 @@ TestBed.prototype.overrideModule = function (ngModule, override) {

if (!componentFactory) {
throw new exceptions_1.BaseException("Cannot create the component " + lang_1.stringify(component) + " as it was not imported into the testing module!");
throw new Error("Cannot create the component " + stringify(component) + " as it was not imported into the testing module!");
}
var noNgZone = this.get(exports.ComponentFixtureNoNgZone, false);
var autoDetect = this.get(exports.ComponentFixtureAutoDetect, false);
var ngZone = noNgZone ? null : this.get(index_1.NgZone, null);
var noNgZone = this.get(ComponentFixtureNoNgZone, false);
var autoDetect = this.get(ComponentFixtureAutoDetect, false);
var ngZone = noNgZone ? null : this.get(NgZone, null);
var testComponentRenderer = this.get(TestComponentRenderer);

@@ -325,9 +326,10 @@ var rootElId = "root" + _nextRootElementId++;

var componentRef = componentFactory.create(_this, [], "#" + rootElId);
return new component_fixture_1.ComponentFixture(componentRef, ngZone, autoDetect);
return new ComponentFixture(componentRef, ngZone, autoDetect);
};
return ngZone == null ? initComponent() : ngZone.run(initComponent);
var fixture = ngZone == null ? initComponent() : ngZone.run(initComponent);
this._activeFixtures.push(fixture);
return fixture;
};
return TestBed;
}());
exports.TestBed = TestBed;
var _testBed = null;

@@ -337,3 +339,3 @@ /**

*/
function getTestBed() {
export function getTestBed() {
if (_testBed == null) {

@@ -344,42 +346,3 @@ _testBed = new TestBed();

}
exports.getTestBed = getTestBed;
/**
* @deprecated use getTestBed instead.
*/
function getTestInjector() {
return getTestBed();
}
exports.getTestInjector = getTestInjector;
/**
* Set the providers that the test injector should use. These should be providers
* common to every test in the suite.
*
* This may only be called once, to set up the common providers for the current test
* suite on the current platform. If you absolutely need to change the providers,
* first use `resetBaseTestProviders`.
*
* Test modules and platforms for individual platforms are available from
* 'angular2/platform/testing/<platform_name>'.
*
* @deprecated Use TestBed.initTestEnvironment instead
*/
function setBaseTestProviders(platformProviders, applicationProviders) {
if (platformProviders.length === 1 && typeof platformProviders[0] === 'function') {
platformProviders[0](applicationProviders);
}
else {
throw new Error("setBaseTestProviders is deprecated and only supports platformProviders that are predefined by Angular. Use 'TestBed.initTestEnvironment' instead.");
}
}
exports.setBaseTestProviders = setBaseTestProviders;
/**
* Reset the providers for the test injector.
*
* @deprecated Use TestBed.resetTestEnvironment instead.
*/
function resetBaseTestProviders() {
TestBed.resetTestEnvironment();
}
exports.resetBaseTestProviders = resetBaseTestProviders;
/**
* Allows injecting dependencies in `beforeEach()` and `it()`.

@@ -408,5 +371,5 @@ *

*/
function inject(tokens, fn) {
export function inject(tokens, fn) {
var testBed = getTestBed();
if (tokens.indexOf(async_test_completer_1.AsyncTestCompleter) >= 0) {
if (tokens.indexOf(AsyncTestCompleter) >= 0) {
return function () {

@@ -417,3 +380,3 @@ // Return an async test method that returns a Promise if AsyncTestCompleter is one of

return testBed.compileComponents().then(function () {
var completer = testBed.get(async_test_completer_1.AsyncTestCompleter);
var completer = testBed.get(AsyncTestCompleter);
testBed.execute(tokens, fn);

@@ -428,7 +391,6 @@ return completer.promise;

}
exports.inject = inject;
/**
* @experimental
*/
var InjectSetupWrapper = (function () {
export var InjectSetupWrapper = (function () {
function InjectSetupWrapper(_moduleDef) {

@@ -452,11 +414,3 @@ this._moduleDef = _moduleDef;

}());
exports.InjectSetupWrapper = InjectSetupWrapper;
/**
* @deprecated Use `TestBed.configureTestingModule instead.
*/
function withProviders(providers) {
return new InjectSetupWrapper(function () { return { providers: providers() }; });
}
exports.withProviders = withProviders;
function withModule(moduleDef, fn) {
export function withModule(moduleDef, fn) {
if (fn === void 0) { fn = null; }

@@ -474,3 +428,2 @@ if (fn) {

}
exports.withModule = withModule;
//# sourceMappingURL=test_bed.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"ComponentFixtureAutoDetect":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"../index","name":"OpaqueToken"},"arguments":["ComponentFixtureAutoDetect"]},"ComponentFixtureNoNgZone":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"../index","name":"OpaqueToken"},"arguments":["ComponentFixtureNoNgZone"]},"getTestInjector":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"getTestBed"}}},"withProviders":{"__symbolic":"function","parameters":["providers"],"value":{"__symbolic":"error","message":"Function call not supported","line":486,"character":32}}}}
{"__symbolic":"module","version":1,"metadata":{"ComponentFixtureAutoDetect":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ComponentFixtureAutoDetect"]},"ComponentFixtureNoNgZone":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ComponentFixtureNoNgZone"]}}}

@@ -8,4 +8,3 @@ /**

*/
import { Compiler, CompilerOptions, ComponentMetadataType, DirectiveMetadataType, Injector, NgModuleMetadataType, PipeMetadataType } from '../index';
import { ConcreteType } from '../src/facade/lang';
import { Compiler, CompilerOptions, ComponentMetadataType, DirectiveMetadataType, Injector, NgModuleMetadataType, PipeMetadataType, Type } from '@angular/core';
import { MetadataOverride } from './metadata_override';

@@ -19,6 +18,6 @@ /**

injector: Injector;
overrideModule(module: ConcreteType<any>, overrides: MetadataOverride<NgModuleMetadataType>): void;
overrideDirective(directive: ConcreteType<any>, overrides: MetadataOverride<DirectiveMetadataType>): void;
overrideComponent(component: ConcreteType<any>, overrides: MetadataOverride<ComponentMetadataType>): void;
overridePipe(directive: ConcreteType<any>, overrides: MetadataOverride<PipeMetadataType>): void;
overrideModule(module: Type<any>, overrides: MetadataOverride<NgModuleMetadataType>): void;
overrideDirective(directive: Type<any>, overrides: MetadataOverride<DirectiveMetadataType>): void;
overrideComponent(component: Type<any>, overrides: MetadataOverride<ComponentMetadataType>): void;
overridePipe(directive: Type<any>, overrides: MetadataOverride<PipeMetadataType>): void;
}

@@ -25,0 +24,0 @@ /**

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,4 +14,4 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var index_1 = require('../index');
var exceptions_1 = require('../src/facade/exceptions');
import { Compiler } from '@angular/core';
import { unimplemented } from './facade/errors';
/**

@@ -23,3 +22,3 @@ * Special interface to the compiler only used by testing

*/
var TestingCompiler = (function (_super) {
export var TestingCompiler = (function (_super) {
__extends(TestingCompiler, _super);

@@ -30,3 +29,3 @@ function TestingCompiler() {

Object.defineProperty(TestingCompiler.prototype, "injector", {
get: function () { throw exceptions_1.unimplemented(); },
get: function () { throw unimplemented(); },
enumerable: true,

@@ -36,16 +35,15 @@ configurable: true

TestingCompiler.prototype.overrideModule = function (module, overrides) {
throw exceptions_1.unimplemented();
throw unimplemented();
};
TestingCompiler.prototype.overrideDirective = function (directive, overrides) {
throw exceptions_1.unimplemented();
throw unimplemented();
};
TestingCompiler.prototype.overrideComponent = function (component, overrides) {
throw exceptions_1.unimplemented();
throw unimplemented();
};
TestingCompiler.prototype.overridePipe = function (directive, overrides) {
throw exceptions_1.unimplemented();
throw unimplemented();
};
return TestingCompiler;
}(index_1.Compiler));
exports.TestingCompiler = TestingCompiler;
}(Compiler));
/**

@@ -56,3 +54,3 @@ * A factory for creating a Compiler

*/
var TestingCompilerFactory = (function () {
export var TestingCompilerFactory = (function () {
function TestingCompilerFactory() {

@@ -62,3 +60,2 @@ }

}());
exports.TestingCompilerFactory = TestingCompilerFactory;
//# sourceMappingURL=test_compiler.js.map

@@ -1,7 +0,1 @@

/**
* Allows overriding default providers of the test injector,
* which are defined in test_injector.js
*
* @deprecated Use `TestBed.configureTestingModule instead.
*/
export declare function addProviders(providers: Array<any>): void;
export declare var __core_private_testing_placeholder__: string;

@@ -8,5 +8,4 @@ /**

*/
"use strict";
var fake_async_1 = require('./fake_async');
var test_bed_1 = require('./test_bed');
import { resetFakeAsyncZone } from './fake_async';
import { TestBed } from './test_bed';
var _global = (typeof window === 'undefined' ? global : window);

@@ -16,18 +15,9 @@ // Reset the test providers and the fake async zone before each test.

_global.beforeEach(function () {
test_bed_1.TestBed.resetTestingModule();
fake_async_1.resetFakeAsyncZone();
TestBed.resetTestingModule();
resetFakeAsyncZone();
});
}
/**
* Allows overriding default providers of the test injector,
* which are defined in test_injector.js
*
* @deprecated Use `TestBed.configureTestingModule instead.
*/
function addProviders(providers) {
if (!providers)
return;
test_bed_1.TestBed.configureTestingModule({ providers: providers });
}
exports.addProviders = addProviders;
// TODO(juliemr): remove this, only used because we need to export something to have compilation
// work.
export var __core_private_testing_placeholder__ = '';
//# sourceMappingURL=testing.js.map

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc