@angular/core 2.2.0-rc.0 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/core-testing.umd.js +44 -11
- package/bundles/core.umd.js +560 -513
- package/bundles/core.umd.min.js +8 -8
- package/package.json +1 -1
- package/src/animation/animation_group_player.d.ts +3 -1
- package/src/animation/animation_group_player.js +18 -7
- package/src/animation/animation_group_player.js.map +1 -1
- package/src/animation/animation_player.d.ts +1 -1
- package/src/animation/animation_player.js +1 -1
- package/src/animation/animation_player.js.map +1 -1
- package/src/animation/animation_queue.js +8 -0
- package/src/animation/animation_queue.js.map +1 -1
- package/src/animation/animation_sequence_player.d.ts +3 -1
- package/src/animation/animation_sequence_player.js +20 -8
- package/src/animation/animation_sequence_player.js.map +1 -1
- package/src/animation/animation_style_util.js +1 -0
- package/src/animation/animation_style_util.js.map +1 -1
- package/src/animation/animation_style_util.metadata.json +1 -1
- package/src/animation/metadata.js.map +1 -1
- package/src/animation/view_animation_map.js.map +1 -1
- package/src/change_detection/constants.d.ts +1 -1
- package/src/change_detection/constants.js +1 -1
- package/src/change_detection/constants.js.map +1 -1
- package/src/change_detection/differs/default_iterable_differ.js +2 -2
- package/src/change_detection/differs/default_iterable_differ.js.map +1 -1
- package/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
- package/src/change_detection/differs/iterable_differs.js.map +1 -1
- package/src/change_detection/differs/keyvalue_differs.js.map +1 -1
- package/src/core_private_export.d.ts +8 -3
- package/src/core_private_export.js +6 -2
- package/src/core_private_export.js.map +1 -1
- package/src/core_private_export.metadata.json +1 -1
- package/src/debug/debug_node.js +12 -24
- package/src/debug/debug_node.js.map +1 -1
- package/src/debug/debug_node.metadata.json +1 -1
- package/src/debug/debug_renderer.d.ts +2 -2
- package/src/debug/debug_renderer.js +7 -5
- package/src/debug/debug_renderer.js.map +1 -1
- package/src/di/reflective_errors.js.map +1 -1
- package/src/di/reflective_injector.js.map +1 -1
- package/src/di/reflective_key.js.map +1 -1
- package/src/di/reflective_provider.js +13 -14
- package/src/di/reflective_provider.js.map +1 -1
- package/src/facade/collection.d.ts +2 -10
- package/src/facade/collection.js +8 -73
- package/src/facade/collection.js.map +1 -1
- package/src/facade/lang.d.ts +0 -1
- package/src/facade/lang.js +5 -24
- package/src/facade/lang.js.map +1 -1
- package/src/facade/lang.metadata.json +1 -1
- package/src/linker/animation_view_context.d.ts +1 -1
- package/src/linker/animation_view_context.js +16 -5
- package/src/linker/animation_view_context.js.map +1 -1
- package/src/linker/component_factory.d.ts +8 -6
- package/src/linker/component_factory.js +17 -23
- package/src/linker/component_factory.js.map +1 -1
- package/src/linker/component_factory_resolver.js.map +1 -1
- package/src/linker/debug_context.js +6 -9
- package/src/linker/debug_context.js.map +1 -1
- package/src/linker/element_injector.js +1 -8
- package/src/linker/element_injector.js.map +1 -1
- package/src/linker/ng_module_factory.js.map +1 -1
- package/src/linker/ng_module_factory_loader.js.map +1 -1
- package/src/linker/system_js_ng_module_factory_loader.js +2 -1
- package/src/linker/system_js_ng_module_factory_loader.js.map +1 -1
- package/src/linker/template_ref.d.ts +5 -4
- package/src/linker/template_ref.js +8 -6
- package/src/linker/template_ref.js.map +1 -1
- package/src/linker/view.d.ts +29 -17
- package/src/linker/view.js +143 -51
- package/src/linker/view.js.map +1 -1
- package/src/linker/{element.d.ts → view_container.d.ts} +4 -7
- package/src/linker/{element.js → view_container.js} +45 -50
- package/src/linker/view_container.js.map +1 -0
- package/src/linker/view_container_ref.d.ts +2 -2
- package/src/linker/view_container_ref.js.map +1 -1
- package/src/linker/view_utils.d.ts +6 -10
- package/src/linker/view_utils.js +17 -14
- package/src/linker/view_utils.js.map +1 -1
- package/src/linker/view_utils.metadata.json +1 -1
- package/src/profile/wtf_impl.js.map +1 -1
- package/src/reflection/reflection_capabilities.js +5 -2
- package/src/reflection/reflection_capabilities.js.map +1 -1
- package/src/render/api.d.ts +8 -1
- package/src/render/api.js.map +1 -1
- package/src/testability/testability.js +2 -3
- package/src/testability/testability.js.map +1 -1
- package/src/util/decorators.js.map +1 -1
- package/testing/async.js.map +1 -1
- package/testing/facade/lang.d.ts +0 -1
- package/testing/facade/lang.js +5 -24
- package/testing/facade/lang.js.map +1 -1
- package/testing/facade/lang.metadata.json +1 -1
- package/testing/fake_async.js.map +1 -1
- package/testing/mock_animation_player.d.ts +16 -1
- package/testing/mock_animation_player.js +43 -14
- package/testing/mock_animation_player.js.map +1 -1
- package/testing/test_bed.js.map +1 -1
- package/testing/testing.js.map +1 -1
- package/src/linker/element.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular
|
|
2
|
+
* @license Angular v2.2.3
|
|
3
3
|
* (c) 2010-2016 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -108,14 +108,11 @@
|
|
|
108
108
|
function scheduleMicroTask(fn) {
|
|
109
109
|
Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
|
|
110
110
|
}
|
|
111
|
-
function isPresent(obj) {
|
|
112
|
-
return obj != null;
|
|
113
|
-
}
|
|
114
111
|
function stringify(token) {
|
|
115
112
|
if (typeof token === 'string') {
|
|
116
113
|
return token;
|
|
117
114
|
}
|
|
118
|
-
if (token
|
|
115
|
+
if (token == null) {
|
|
119
116
|
return '' + token;
|
|
120
117
|
}
|
|
121
118
|
if (token.overriddenName) {
|
|
@@ -967,14 +964,27 @@
|
|
|
967
964
|
*/
|
|
968
965
|
|
|
969
966
|
var MockAnimationPlayer = (function () {
|
|
970
|
-
function MockAnimationPlayer() {
|
|
967
|
+
function MockAnimationPlayer(startingStyles, keyframes, previousPlayers) {
|
|
968
|
+
var _this = this;
|
|
969
|
+
if (startingStyles === void 0) { startingStyles = {}; }
|
|
970
|
+
if (keyframes === void 0) { keyframes = []; }
|
|
971
|
+
if (previousPlayers === void 0) { previousPlayers = []; }
|
|
972
|
+
this.startingStyles = startingStyles;
|
|
973
|
+
this.keyframes = keyframes;
|
|
971
974
|
this._onDoneFns = [];
|
|
972
975
|
this._onStartFns = [];
|
|
973
976
|
this._finished = false;
|
|
974
977
|
this._destroyed = false;
|
|
975
978
|
this._started = false;
|
|
976
979
|
this.parentPlayer = null;
|
|
980
|
+
this.previousStyles = {};
|
|
977
981
|
this.log = [];
|
|
982
|
+
previousPlayers.forEach(function (player) {
|
|
983
|
+
if (player instanceof MockAnimationPlayer) {
|
|
984
|
+
var styles_1 = player._captureStyles();
|
|
985
|
+
Object.keys(styles_1).forEach(function (prop) { return _this.previousStyles[prop] = styles_1[prop]; });
|
|
986
|
+
}
|
|
987
|
+
});
|
|
978
988
|
}
|
|
979
989
|
MockAnimationPlayer.prototype._onFinish = function () {
|
|
980
990
|
if (!this._finished) {
|
|
@@ -982,9 +992,6 @@
|
|
|
982
992
|
this.log.push('finish');
|
|
983
993
|
this._onDoneFns.forEach(function (fn) { return fn(); });
|
|
984
994
|
this._onDoneFns = [];
|
|
985
|
-
if (!isPresent(this.parentPlayer)) {
|
|
986
|
-
this.destroy();
|
|
987
|
-
}
|
|
988
995
|
}
|
|
989
996
|
};
|
|
990
997
|
MockAnimationPlayer.prototype.init = function () { this.log.push('init'); };
|
|
@@ -1002,7 +1009,12 @@
|
|
|
1002
1009
|
MockAnimationPlayer.prototype.pause = function () { this.log.push('pause'); };
|
|
1003
1010
|
MockAnimationPlayer.prototype.restart = function () { this.log.push('restart'); };
|
|
1004
1011
|
MockAnimationPlayer.prototype.finish = function () { this._onFinish(); };
|
|
1005
|
-
MockAnimationPlayer.prototype.reset = function () {
|
|
1012
|
+
MockAnimationPlayer.prototype.reset = function () {
|
|
1013
|
+
this.log.push('reset');
|
|
1014
|
+
this._destroyed = false;
|
|
1015
|
+
this._finished = false;
|
|
1016
|
+
this._started = false;
|
|
1017
|
+
};
|
|
1006
1018
|
MockAnimationPlayer.prototype.destroy = function () {
|
|
1007
1019
|
if (!this._destroyed) {
|
|
1008
1020
|
this._destroyed = true;
|
|
@@ -1010,8 +1022,29 @@
|
|
|
1010
1022
|
this.log.push('destroy');
|
|
1011
1023
|
}
|
|
1012
1024
|
};
|
|
1013
|
-
MockAnimationPlayer.prototype.setPosition = function (p
|
|
1025
|
+
MockAnimationPlayer.prototype.setPosition = function (p) { };
|
|
1014
1026
|
MockAnimationPlayer.prototype.getPosition = function () { return 0; };
|
|
1027
|
+
MockAnimationPlayer.prototype._captureStyles = function () {
|
|
1028
|
+
var _this = this;
|
|
1029
|
+
var captures = {};
|
|
1030
|
+
if (this.hasStarted()) {
|
|
1031
|
+
// when assembling the captured styles, it's important that
|
|
1032
|
+
// we build the keyframe styles in the following order:
|
|
1033
|
+
// {startingStyles, ... other styles within keyframes, ... previousStyles }
|
|
1034
|
+
Object.keys(this.startingStyles).forEach(function (prop) {
|
|
1035
|
+
captures[prop] = _this.startingStyles[prop];
|
|
1036
|
+
});
|
|
1037
|
+
this.keyframes.forEach(function (kf) {
|
|
1038
|
+
var offset = kf[0], styles = kf[1];
|
|
1039
|
+
var newStyles = {};
|
|
1040
|
+
Object.keys(styles).forEach(function (prop) { captures[prop] = _this._finished ? styles[prop] : _angular_core.AUTO_STYLE; });
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
Object.keys(this.previousStyles).forEach(function (prop) {
|
|
1044
|
+
captures[prop] = _this.previousStyles[prop];
|
|
1045
|
+
});
|
|
1046
|
+
return captures;
|
|
1047
|
+
};
|
|
1015
1048
|
return MockAnimationPlayer;
|
|
1016
1049
|
}());
|
|
1017
1050
|
|