@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.
Files changed (100) hide show
  1. package/bundles/core-testing.umd.js +44 -11
  2. package/bundles/core.umd.js +560 -513
  3. package/bundles/core.umd.min.js +8 -8
  4. package/package.json +1 -1
  5. package/src/animation/animation_group_player.d.ts +3 -1
  6. package/src/animation/animation_group_player.js +18 -7
  7. package/src/animation/animation_group_player.js.map +1 -1
  8. package/src/animation/animation_player.d.ts +1 -1
  9. package/src/animation/animation_player.js +1 -1
  10. package/src/animation/animation_player.js.map +1 -1
  11. package/src/animation/animation_queue.js +8 -0
  12. package/src/animation/animation_queue.js.map +1 -1
  13. package/src/animation/animation_sequence_player.d.ts +3 -1
  14. package/src/animation/animation_sequence_player.js +20 -8
  15. package/src/animation/animation_sequence_player.js.map +1 -1
  16. package/src/animation/animation_style_util.js +1 -0
  17. package/src/animation/animation_style_util.js.map +1 -1
  18. package/src/animation/animation_style_util.metadata.json +1 -1
  19. package/src/animation/metadata.js.map +1 -1
  20. package/src/animation/view_animation_map.js.map +1 -1
  21. package/src/change_detection/constants.d.ts +1 -1
  22. package/src/change_detection/constants.js +1 -1
  23. package/src/change_detection/constants.js.map +1 -1
  24. package/src/change_detection/differs/default_iterable_differ.js +2 -2
  25. package/src/change_detection/differs/default_iterable_differ.js.map +1 -1
  26. package/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
  27. package/src/change_detection/differs/iterable_differs.js.map +1 -1
  28. package/src/change_detection/differs/keyvalue_differs.js.map +1 -1
  29. package/src/core_private_export.d.ts +8 -3
  30. package/src/core_private_export.js +6 -2
  31. package/src/core_private_export.js.map +1 -1
  32. package/src/core_private_export.metadata.json +1 -1
  33. package/src/debug/debug_node.js +12 -24
  34. package/src/debug/debug_node.js.map +1 -1
  35. package/src/debug/debug_node.metadata.json +1 -1
  36. package/src/debug/debug_renderer.d.ts +2 -2
  37. package/src/debug/debug_renderer.js +7 -5
  38. package/src/debug/debug_renderer.js.map +1 -1
  39. package/src/di/reflective_errors.js.map +1 -1
  40. package/src/di/reflective_injector.js.map +1 -1
  41. package/src/di/reflective_key.js.map +1 -1
  42. package/src/di/reflective_provider.js +13 -14
  43. package/src/di/reflective_provider.js.map +1 -1
  44. package/src/facade/collection.d.ts +2 -10
  45. package/src/facade/collection.js +8 -73
  46. package/src/facade/collection.js.map +1 -1
  47. package/src/facade/lang.d.ts +0 -1
  48. package/src/facade/lang.js +5 -24
  49. package/src/facade/lang.js.map +1 -1
  50. package/src/facade/lang.metadata.json +1 -1
  51. package/src/linker/animation_view_context.d.ts +1 -1
  52. package/src/linker/animation_view_context.js +16 -5
  53. package/src/linker/animation_view_context.js.map +1 -1
  54. package/src/linker/component_factory.d.ts +8 -6
  55. package/src/linker/component_factory.js +17 -23
  56. package/src/linker/component_factory.js.map +1 -1
  57. package/src/linker/component_factory_resolver.js.map +1 -1
  58. package/src/linker/debug_context.js +6 -9
  59. package/src/linker/debug_context.js.map +1 -1
  60. package/src/linker/element_injector.js +1 -8
  61. package/src/linker/element_injector.js.map +1 -1
  62. package/src/linker/ng_module_factory.js.map +1 -1
  63. package/src/linker/ng_module_factory_loader.js.map +1 -1
  64. package/src/linker/system_js_ng_module_factory_loader.js +2 -1
  65. package/src/linker/system_js_ng_module_factory_loader.js.map +1 -1
  66. package/src/linker/template_ref.d.ts +5 -4
  67. package/src/linker/template_ref.js +8 -6
  68. package/src/linker/template_ref.js.map +1 -1
  69. package/src/linker/view.d.ts +29 -17
  70. package/src/linker/view.js +143 -51
  71. package/src/linker/view.js.map +1 -1
  72. package/src/linker/{element.d.ts → view_container.d.ts} +4 -7
  73. package/src/linker/{element.js → view_container.js} +45 -50
  74. package/src/linker/view_container.js.map +1 -0
  75. package/src/linker/view_container_ref.d.ts +2 -2
  76. package/src/linker/view_container_ref.js.map +1 -1
  77. package/src/linker/view_utils.d.ts +6 -10
  78. package/src/linker/view_utils.js +17 -14
  79. package/src/linker/view_utils.js.map +1 -1
  80. package/src/linker/view_utils.metadata.json +1 -1
  81. package/src/profile/wtf_impl.js.map +1 -1
  82. package/src/reflection/reflection_capabilities.js +5 -2
  83. package/src/reflection/reflection_capabilities.js.map +1 -1
  84. package/src/render/api.d.ts +8 -1
  85. package/src/render/api.js.map +1 -1
  86. package/src/testability/testability.js +2 -3
  87. package/src/testability/testability.js.map +1 -1
  88. package/src/util/decorators.js.map +1 -1
  89. package/testing/async.js.map +1 -1
  90. package/testing/facade/lang.d.ts +0 -1
  91. package/testing/facade/lang.js +5 -24
  92. package/testing/facade/lang.js.map +1 -1
  93. package/testing/facade/lang.metadata.json +1 -1
  94. package/testing/fake_async.js.map +1 -1
  95. package/testing/mock_animation_player.d.ts +16 -1
  96. package/testing/mock_animation_player.js +43 -14
  97. package/testing/mock_animation_player.js.map +1 -1
  98. package/testing/test_bed.js.map +1 -1
  99. package/testing/testing.js.map +1 -1
  100. package/src/linker/element.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v0.0.0-PLACEHOLDER
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 === undefined || token === null) {
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 () { this.log.push('reset'); };
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 /** TODO #9100 */) { };
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