@angular/core 2.0.0-rc.1 → 2.0.0-rc.2

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 (624) hide show
  1. package/{core.umd.js → bundles/core.umd.js} +6402 -4606
  2. package/bundles/core.umd.min.js +6 -0
  3. package/esm/index.d.ts +5 -4
  4. package/esm/index.js +9 -8
  5. package/esm/index.js.map +1 -1
  6. package/esm/private_export.d.ts +96 -11
  7. package/esm/private_export.js +39 -10
  8. package/esm/private_export.js.map +1 -1
  9. package/esm/private_export.metadata.json +1 -1
  10. package/esm/src/animation/active_animation_players_map.d.ts +11 -0
  11. package/esm/src/animation/active_animation_players_map.js +47 -0
  12. package/esm/src/animation/active_animation_players_map.js.map +1 -0
  13. package/esm/src/animation/animation_constants.d.ts +4 -0
  14. package/esm/src/animation/animation_constants.js +5 -0
  15. package/esm/src/animation/animation_constants.js.map +1 -0
  16. package/esm/src/animation/animation_constants.metadata.json +1 -0
  17. package/esm/src/animation/animation_driver.d.ts +9 -0
  18. package/esm/src/animation/animation_driver.js +9 -0
  19. package/esm/src/animation/animation_driver.js.map +1 -0
  20. package/esm/src/animation/animation_group_player.d.ts +18 -0
  21. package/esm/src/animation/animation_group_player.js +60 -0
  22. package/esm/src/animation/animation_group_player.js.map +1 -0
  23. package/esm/src/animation/animation_keyframe.d.ts +6 -0
  24. package/esm/src/animation/animation_keyframe.js +7 -0
  25. package/esm/src/animation/animation_keyframe.js.map +1 -0
  26. package/esm/src/animation/animation_player.d.ts +26 -0
  27. package/esm/src/animation/animation_player.js +30 -0
  28. package/esm/src/animation/animation_player.js.map +1 -0
  29. package/esm/src/animation/animation_sequence_player.d.ts +21 -0
  30. package/esm/src/animation/animation_sequence_player.js +64 -0
  31. package/esm/src/animation/animation_sequence_player.js.map +1 -0
  32. package/esm/src/animation/animation_style_util.d.ts +32 -0
  33. package/esm/src/animation/animation_style_util.js +91 -0
  34. package/esm/src/animation/animation_style_util.js.map +1 -0
  35. package/esm/src/animation/animation_style_util.metadata.json +1 -0
  36. package/esm/src/animation/animation_styles.d.ts +8 -0
  37. package/esm/src/animation/animation_styles.js +6 -0
  38. package/esm/src/animation/animation_styles.js.map +1 -0
  39. package/esm/src/animation/metadata.d.ts +511 -0
  40. package/esm/src/animation/metadata.js +565 -0
  41. package/esm/src/animation/metadata.js.map +1 -0
  42. package/esm/src/animation/metadata.metadata.json +1 -0
  43. package/esm/src/application_common_providers.d.ts +1 -0
  44. package/esm/src/application_common_providers.js +5 -4
  45. package/esm/src/application_common_providers.js.map +1 -1
  46. package/esm/src/application_common_providers.metadata.json +1 -1
  47. package/esm/src/application_ref.d.ts +17 -41
  48. package/esm/src/application_ref.js +32 -23
  49. package/esm/src/application_ref.js.map +1 -1
  50. package/esm/src/application_ref.metadata.json +1 -1
  51. package/esm/src/application_tokens.d.ts +6 -1
  52. package/esm/src/application_tokens.js +9 -4
  53. package/esm/src/application_tokens.js.map +1 -1
  54. package/esm/src/application_tokens.metadata.json +1 -1
  55. package/esm/src/change_detection/change_detection.d.ts +9 -8
  56. package/esm/src/change_detection/change_detection.js +7 -7
  57. package/esm/src/change_detection/change_detection.js.map +1 -1
  58. package/esm/src/change_detection/change_detection.metadata.json +1 -1
  59. package/esm/src/change_detection/change_detection_util.d.ts +3 -1
  60. package/esm/src/change_detection/change_detection_util.js +6 -5
  61. package/esm/src/change_detection/change_detection_util.js.map +1 -1
  62. package/esm/src/change_detection/change_detection_util.metadata.json +1 -1
  63. package/esm/src/change_detection/change_detector_ref.d.ts +3 -0
  64. package/esm/src/change_detection/change_detector_ref.js +3 -0
  65. package/esm/src/change_detection/change_detector_ref.js.map +1 -1
  66. package/esm/src/change_detection/constants.d.ts +1 -0
  67. package/esm/src/change_detection/constants.js +4 -3
  68. package/esm/src/change_detection/constants.js.map +1 -1
  69. package/esm/src/change_detection/constants.metadata.json +1 -1
  70. package/esm/src/change_detection/differs/default_iterable_differ.d.ts +6 -94
  71. package/esm/src/change_detection/differs/default_iterable_differ.js +25 -18
  72. package/esm/src/change_detection/differs/default_iterable_differ.js.map +1 -1
  73. package/esm/src/change_detection/differs/default_keyvalue_differ.d.ts +3 -30
  74. package/esm/src/change_detection/differs/default_keyvalue_differ.js +13 -8
  75. package/esm/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
  76. package/esm/src/change_detection/differs/iterable_differs.d.ts +4 -1
  77. package/esm/src/change_detection/differs/iterable_differs.js +5 -4
  78. package/esm/src/change_detection/differs/iterable_differs.js.map +1 -1
  79. package/esm/src/change_detection/differs/keyvalue_differs.d.ts +2 -1
  80. package/esm/src/change_detection/differs/keyvalue_differs.js +5 -4
  81. package/esm/src/change_detection/differs/keyvalue_differs.js.map +1 -1
  82. package/esm/src/change_detection/pipe_transform.js.map +1 -1
  83. package/esm/src/change_detection.d.ts +1 -1
  84. package/esm/src/change_detection.js +5 -5
  85. package/esm/src/change_detection.js.map +1 -1
  86. package/esm/src/console.js +2 -1
  87. package/esm/src/console.js.map +1 -1
  88. package/esm/src/console.metadata.json +1 -1
  89. package/esm/src/debug/debug_node.d.ts +20 -2
  90. package/esm/src/debug/debug_node.js +16 -2
  91. package/esm/src/debug/debug_node.js.map +1 -1
  92. package/esm/src/debug/debug_node.metadata.json +1 -0
  93. package/esm/src/debug/debug_renderer.d.ts +10 -6
  94. package/esm/src/debug/debug_renderer.js +13 -2
  95. package/esm/src/debug/debug_renderer.js.map +1 -1
  96. package/esm/src/di/decorators.d.ts +13 -1
  97. package/esm/src/di/decorators.js +7 -1
  98. package/esm/src/di/decorators.js.map +1 -1
  99. package/esm/src/di/decorators.metadata.json +1 -1
  100. package/esm/src/di/forward_ref.d.ts +3 -1
  101. package/esm/src/di/forward_ref.js +3 -1
  102. package/esm/src/di/forward_ref.js.map +1 -1
  103. package/esm/src/di/injector.d.ts +4 -1
  104. package/esm/src/di/injector.js +5 -2
  105. package/esm/src/di/injector.js.map +1 -1
  106. package/esm/src/di/injector.metadata.json +1 -1
  107. package/esm/src/di/metadata.d.ts +8 -1
  108. package/esm/src/di/metadata.js +10 -3
  109. package/esm/src/di/metadata.js.map +1 -1
  110. package/esm/src/di/opaque_token.d.ts +2 -1
  111. package/esm/src/di/opaque_token.js +22 -21
  112. package/esm/src/di/opaque_token.js.map +1 -1
  113. package/esm/src/di/provider.d.ts +11 -10
  114. package/esm/src/di/provider.js +17 -14
  115. package/esm/src/di/provider.js.map +1 -1
  116. package/esm/src/di/provider.metadata.json +1 -0
  117. package/esm/src/di/provider_util.js.map +1 -1
  118. package/esm/src/di/provider_util.metadata.json +1 -0
  119. package/esm/src/di/reflective_exceptions.d.ts +11 -16
  120. package/esm/src/di/reflective_exceptions.js +28 -22
  121. package/esm/src/di/reflective_exceptions.js.map +1 -1
  122. package/esm/src/di/reflective_injector.d.ts +3 -33
  123. package/esm/src/di/reflective_injector.js +10 -7
  124. package/esm/src/di/reflective_injector.js.map +1 -1
  125. package/esm/src/di/reflective_key.d.ts +1 -8
  126. package/esm/src/di/reflective_key.js +3 -2
  127. package/esm/src/di/reflective_key.js.map +1 -1
  128. package/esm/src/di/reflective_provider.d.ts +2 -1
  129. package/esm/src/di/reflective_provider.js +6 -5
  130. package/esm/src/di/reflective_provider.js.map +1 -1
  131. package/esm/src/di/reflective_provider.metadata.json +1 -0
  132. package/esm/src/di.d.ts +2 -2
  133. package/esm/src/di.js +6 -6
  134. package/esm/src/di.js.map +1 -1
  135. package/esm/src/facade/async.d.ts +11 -4
  136. package/esm/src/facade/async.js +25 -15
  137. package/esm/src/facade/async.js.map +1 -1
  138. package/esm/src/facade/base_wrapped_exception.js +4 -4
  139. package/esm/src/facade/base_wrapped_exception.js.map +1 -1
  140. package/esm/src/facade/collection.js +1 -1
  141. package/esm/src/facade/collection.js.map +1 -1
  142. package/esm/src/facade/collection.metadata.json +1 -1
  143. package/esm/src/facade/exception_handler.d.ts +2 -11
  144. package/esm/src/facade/exception_handler.js +8 -7
  145. package/esm/src/facade/exception_handler.js.map +1 -1
  146. package/esm/src/facade/exceptions.d.ts +4 -0
  147. package/esm/src/facade/exceptions.js +6 -2
  148. package/esm/src/facade/exceptions.js.map +1 -1
  149. package/esm/src/facade/exceptions.metadata.json +1 -0
  150. package/esm/src/facade/lang.d.ts +6 -4
  151. package/esm/src/facade/lang.js +12 -11
  152. package/esm/src/facade/lang.js.map +1 -1
  153. package/esm/src/facade/lang.metadata.json +1 -1
  154. package/esm/src/facade/math.d.ts +2 -0
  155. package/esm/src/facade/math.js +4 -0
  156. package/esm/src/facade/math.js.map +1 -0
  157. package/esm/src/facade/math.metadata.json +1 -0
  158. package/esm/src/facade/promise.js.map +1 -1
  159. package/esm/src/linker/component_factory.d.ts +5 -4
  160. package/esm/src/linker/component_factory.js +7 -3
  161. package/esm/src/linker/component_factory.js.map +1 -1
  162. package/esm/src/linker/component_resolver.d.ts +5 -4
  163. package/esm/src/linker/component_resolver.js +12 -7
  164. package/esm/src/linker/component_resolver.js.map +1 -1
  165. package/esm/src/linker/component_resolver.metadata.json +1 -1
  166. package/esm/src/linker/debug_context.js +5 -4
  167. package/esm/src/linker/debug_context.js.map +1 -1
  168. package/esm/src/linker/dynamic_component_loader.d.ts +5 -6
  169. package/esm/src/linker/dynamic_component_loader.js +5 -3
  170. package/esm/src/linker/dynamic_component_loader.js.map +1 -1
  171. package/esm/src/linker/dynamic_component_loader.metadata.json +1 -1
  172. package/esm/src/linker/element.d.ts +3 -3
  173. package/esm/src/linker/element.js +5 -5
  174. package/esm/src/linker/element.js.map +1 -1
  175. package/esm/src/linker/element_injector.js.map +1 -1
  176. package/esm/src/linker/element_ref.d.ts +1 -0
  177. package/esm/src/linker/element_ref.js +5 -5
  178. package/esm/src/linker/element_ref.js.map +1 -1
  179. package/esm/src/linker/exceptions.d.ts +4 -1
  180. package/esm/src/linker/exceptions.js +4 -1
  181. package/esm/src/linker/exceptions.js.map +1 -1
  182. package/esm/src/linker/query_list.d.ts +3 -10
  183. package/esm/src/linker/query_list.js +8 -7
  184. package/esm/src/linker/query_list.js.map +1 -1
  185. package/esm/src/linker/systemjs_component_resolver.d.ts +21 -0
  186. package/esm/src/linker/systemjs_component_resolver.js +44 -0
  187. package/esm/src/linker/systemjs_component_resolver.js.map +1 -0
  188. package/esm/src/linker/template_ref.d.ts +2 -1
  189. package/esm/src/linker/template_ref.js +1 -0
  190. package/esm/src/linker/template_ref.js.map +1 -1
  191. package/esm/src/linker/view.d.ts +12 -1
  192. package/esm/src/linker/view.js +62 -16
  193. package/esm/src/linker/view.js.map +1 -1
  194. package/esm/src/linker/view_container_ref.d.ts +2 -10
  195. package/esm/src/linker/view_container_ref.js +4 -3
  196. package/esm/src/linker/view_container_ref.js.map +1 -1
  197. package/esm/src/linker/view_ref.d.ts +5 -1
  198. package/esm/src/linker/view_ref.js +6 -2
  199. package/esm/src/linker/view_ref.js.map +1 -1
  200. package/esm/src/linker/view_type.js.map +1 -1
  201. package/esm/src/linker/view_utils.d.ts +2 -4
  202. package/esm/src/linker/view_utils.js +21 -21
  203. package/esm/src/linker/view_utils.js.map +1 -1
  204. package/esm/src/linker/view_utils.metadata.json +1 -1
  205. package/esm/src/linker.d.ts +5 -4
  206. package/esm/src/linker.js +5 -4
  207. package/esm/src/linker.js.map +1 -1
  208. package/esm/src/metadata/di.d.ts +8 -1
  209. package/esm/src/metadata/di.js +10 -3
  210. package/esm/src/metadata/di.js.map +1 -1
  211. package/esm/src/metadata/directives.d.ts +104 -20
  212. package/esm/src/metadata/directives.js +25 -19
  213. package/esm/src/metadata/directives.js.map +1 -1
  214. package/esm/src/metadata/lifecycle_hooks.d.ts +46 -31
  215. package/esm/src/metadata/lifecycle_hooks.js +464 -10
  216. package/esm/src/metadata/lifecycle_hooks.js.map +1 -1
  217. package/esm/src/metadata/lifecycle_hooks.metadata.json +1 -1
  218. package/esm/src/metadata/view.d.ts +6 -2
  219. package/esm/src/metadata/view.js +3 -1
  220. package/esm/src/metadata/view.js.map +1 -1
  221. package/esm/src/metadata/view.metadata.json +1 -1
  222. package/esm/src/metadata.d.ts +49 -15
  223. package/esm/src/metadata.js +35 -10
  224. package/esm/src/metadata.js.map +1 -1
  225. package/esm/src/metadata.metadata.json +1 -1
  226. package/esm/src/platform_common_providers.d.ts +1 -0
  227. package/esm/src/platform_common_providers.js +3 -3
  228. package/esm/src/platform_common_providers.js.map +1 -1
  229. package/esm/src/platform_common_providers.metadata.json +1 -1
  230. package/esm/src/platform_directives_and_pipes.d.ts +48 -45
  231. package/esm/src/platform_directives_and_pipes.js +50 -47
  232. package/esm/src/platform_directives_and_pipes.js.map +1 -1
  233. package/esm/src/platform_directives_and_pipes.metadata.json +1 -1
  234. package/esm/src/profile/profile.d.ts +5 -1
  235. package/esm/src/profile/profile.js +4 -0
  236. package/esm/src/profile/profile.js.map +1 -1
  237. package/esm/src/profile/profile.metadata.json +1 -1
  238. package/esm/src/profile/wtf_impl.js +1 -1
  239. package/esm/src/profile/wtf_impl.js.map +1 -1
  240. package/esm/src/profile/wtf_impl.metadata.json +1 -0
  241. package/esm/src/profile/wtf_init.js +2 -2
  242. package/esm/src/profile/wtf_init.js.map +1 -1
  243. package/esm/src/reflection/platform_reflection_capabilities.d.ts +4 -3
  244. package/esm/src/reflection/platform_reflection_capabilities.js.map +1 -1
  245. package/esm/src/reflection/reflection.d.ts +1 -1
  246. package/esm/src/reflection/reflection.js +2 -2
  247. package/esm/src/reflection/reflection.js.map +1 -1
  248. package/esm/src/reflection/reflection.metadata.json +1 -1
  249. package/esm/src/reflection/reflection_capabilities.d.ts +4 -5
  250. package/esm/src/reflection/reflection_capabilities.js +22 -10
  251. package/esm/src/reflection/reflection_capabilities.js.map +1 -1
  252. package/esm/src/reflection/reflector.d.ts +8 -20
  253. package/esm/src/reflection/reflector.js +13 -3
  254. package/esm/src/reflection/reflector.js.map +1 -1
  255. package/esm/src/reflection/reflector_reader.js +3 -3
  256. package/esm/src/reflection/reflector_reader.js.map +1 -1
  257. package/esm/src/reflection/types.js.map +1 -1
  258. package/esm/src/render/api.d.ts +17 -6
  259. package/esm/src/render/api.js +8 -1
  260. package/esm/src/render/api.js.map +1 -1
  261. package/esm/src/render.d.ts +1 -1
  262. package/esm/src/render.js +1 -1
  263. package/esm/src/render.js.map +1 -1
  264. package/esm/src/security.js +6 -6
  265. package/esm/src/security.js.map +1 -1
  266. package/esm/src/testability/testability.d.ts +3 -19
  267. package/esm/src/testability/testability.js +10 -5
  268. package/esm/src/testability/testability.js.map +1 -1
  269. package/esm/src/testability/testability.metadata.json +1 -1
  270. package/esm/src/util/decorators.d.ts +2 -1
  271. package/esm/src/util/decorators.js +10 -9
  272. package/esm/src/util/decorators.js.map +1 -1
  273. package/esm/src/util.js.map +1 -1
  274. package/esm/src/zone/ng_zone.d.ts +6 -17
  275. package/esm/src/zone/ng_zone.js +7 -6
  276. package/esm/src/zone/ng_zone.js.map +1 -1
  277. package/esm/src/zone/ng_zone_impl.d.ts +1 -4
  278. package/esm/src/zone/ng_zone_impl.js +3 -2
  279. package/esm/src/zone/ng_zone_impl.js.map +1 -1
  280. package/esm/src/zone.js.map +1 -1
  281. package/esm/testing/async.js +20 -22
  282. package/esm/testing/async.js.map +1 -1
  283. package/esm/testing/async.metadata.json +1 -0
  284. package/esm/testing/async_test_completer.js.map +1 -1
  285. package/esm/testing/fake_async.d.ts +4 -1
  286. package/esm/testing/fake_async.js +9 -2
  287. package/esm/testing/fake_async.js.map +1 -1
  288. package/esm/testing/lang_utils.js +1 -1
  289. package/esm/testing/lang_utils.js.map +1 -1
  290. package/esm/testing/lang_utils.metadata.json +1 -0
  291. package/esm/testing/logger.js +5 -3
  292. package/esm/testing/logger.js.map +1 -1
  293. package/esm/testing/logger.metadata.json +1 -1
  294. package/esm/testing/mock_application_ref.d.ts +1 -1
  295. package/esm/testing/mock_application_ref.js +1 -0
  296. package/esm/testing/mock_application_ref.js.map +1 -1
  297. package/esm/testing/mock_application_ref.metadata.json +1 -1
  298. package/esm/testing/ng_zone_mock.d.ts +0 -1
  299. package/esm/testing/ng_zone_mock.js +2 -1
  300. package/esm/testing/ng_zone_mock.js.map +1 -1
  301. package/esm/testing/ng_zone_mock.metadata.json +1 -1
  302. package/esm/testing/regexp.js +1 -1
  303. package/esm/testing/regexp.js.map +1 -1
  304. package/esm/testing/regexp.metadata.json +1 -0
  305. package/esm/testing/test_injector.d.ts +6 -12
  306. package/esm/testing/test_injector.js +4 -10
  307. package/esm/testing/test_injector.js.map +1 -1
  308. package/esm/testing/test_injector.metadata.json +1 -0
  309. package/esm/testing/testing.d.ts +2 -2
  310. package/esm/testing/testing.js +2 -2
  311. package/esm/testing/testing.js.map +1 -1
  312. package/esm/testing/testing.metadata.json +1 -1
  313. package/esm/testing.js.map +1 -1
  314. package/index.d.ts +5 -4
  315. package/index.js +10 -8
  316. package/index.js.map +1 -1
  317. package/package.json +5 -1
  318. package/private_export.d.ts +96 -11
  319. package/private_export.js +39 -10
  320. package/private_export.js.map +1 -1
  321. package/private_export.metadata.json +1 -1
  322. package/src/animation/active_animation_players_map.d.ts +11 -0
  323. package/src/animation/active_animation_players_map.js +54 -0
  324. package/src/animation/active_animation_players_map.js.map +1 -0
  325. package/src/animation/animation_constants.d.ts +4 -0
  326. package/src/animation/animation_constants.js +6 -0
  327. package/src/animation/animation_constants.js.map +1 -0
  328. package/src/animation/animation_constants.metadata.json +1 -0
  329. package/src/animation/animation_driver.d.ts +9 -0
  330. package/src/animation/animation_driver.js +25 -0
  331. package/src/animation/animation_driver.js.map +1 -0
  332. package/src/animation/animation_group_player.d.ts +18 -0
  333. package/src/animation/animation_group_player.js +64 -0
  334. package/src/animation/animation_group_player.js.map +1 -0
  335. package/src/animation/animation_keyframe.d.ts +6 -0
  336. package/src/animation/animation_keyframe.js +10 -0
  337. package/src/animation/animation_keyframe.js.map +1 -0
  338. package/src/animation/animation_player.d.ts +26 -0
  339. package/src/animation/animation_player.js +42 -0
  340. package/src/animation/animation_player.js.map +1 -0
  341. package/src/animation/animation_sequence_player.d.ts +21 -0
  342. package/src/animation/animation_sequence_player.js +69 -0
  343. package/src/animation/animation_sequence_player.js.map +1 -0
  344. package/src/animation/animation_style_util.d.ts +32 -0
  345. package/src/animation/animation_style_util.js +99 -0
  346. package/src/animation/animation_style_util.js.map +1 -0
  347. package/src/animation/animation_style_util.metadata.json +1 -0
  348. package/src/animation/animation_styles.d.ts +8 -0
  349. package/src/animation/animation_styles.js +9 -0
  350. package/src/animation/animation_styles.js.map +1 -0
  351. package/src/animation/metadata.d.ts +511 -0
  352. package/src/animation/metadata.js +627 -0
  353. package/src/animation/metadata.js.map +1 -0
  354. package/src/animation/metadata.metadata.json +1 -0
  355. package/src/application_common_providers.d.ts +1 -0
  356. package/src/application_common_providers.js +4 -3
  357. package/src/application_common_providers.js.map +1 -1
  358. package/src/application_common_providers.metadata.json +1 -1
  359. package/src/application_ref.d.ts +17 -41
  360. package/src/application_ref.js +30 -21
  361. package/src/application_ref.js.map +1 -1
  362. package/src/application_ref.metadata.json +1 -1
  363. package/src/application_tokens.d.ts +6 -1
  364. package/src/application_tokens.js +9 -4
  365. package/src/application_tokens.js.map +1 -1
  366. package/src/application_tokens.metadata.json +1 -1
  367. package/src/change_detection/change_detection.d.ts +9 -8
  368. package/src/change_detection/change_detection.js +21 -21
  369. package/src/change_detection/change_detection.js.map +1 -1
  370. package/src/change_detection/change_detection.metadata.json +1 -1
  371. package/src/change_detection/change_detection_util.d.ts +3 -1
  372. package/src/change_detection/change_detection_util.js +6 -5
  373. package/src/change_detection/change_detection_util.js.map +1 -1
  374. package/src/change_detection/change_detection_util.metadata.json +1 -1
  375. package/src/change_detection/change_detector_ref.d.ts +3 -0
  376. package/src/change_detection/change_detector_ref.js +3 -0
  377. package/src/change_detection/change_detector_ref.js.map +1 -1
  378. package/src/change_detection/constants.d.ts +1 -0
  379. package/src/change_detection/constants.js +4 -3
  380. package/src/change_detection/constants.js.map +1 -1
  381. package/src/change_detection/constants.metadata.json +1 -1
  382. package/src/change_detection/differs/default_iterable_differ.d.ts +6 -94
  383. package/src/change_detection/differs/default_iterable_differ.js +25 -18
  384. package/src/change_detection/differs/default_iterable_differ.js.map +1 -1
  385. package/src/change_detection/differs/default_keyvalue_differ.d.ts +3 -30
  386. package/src/change_detection/differs/default_keyvalue_differ.js +13 -8
  387. package/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
  388. package/src/change_detection/differs/iterable_differs.d.ts +4 -1
  389. package/src/change_detection/differs/iterable_differs.js +4 -3
  390. package/src/change_detection/differs/iterable_differs.js.map +1 -1
  391. package/src/change_detection/differs/keyvalue_differs.d.ts +2 -1
  392. package/src/change_detection/differs/keyvalue_differs.js +4 -3
  393. package/src/change_detection/differs/keyvalue_differs.js.map +1 -1
  394. package/src/change_detection/pipe_transform.js.map +1 -1
  395. package/src/change_detection.d.ts +1 -1
  396. package/src/change_detection.js +9 -9
  397. package/src/change_detection.js.map +1 -1
  398. package/src/console.js +2 -1
  399. package/src/console.js.map +1 -1
  400. package/src/console.metadata.json +1 -1
  401. package/src/debug/debug_node.d.ts +20 -2
  402. package/src/debug/debug_node.js +16 -2
  403. package/src/debug/debug_node.js.map +1 -1
  404. package/src/debug/debug_node.metadata.json +1 -0
  405. package/src/debug/debug_renderer.d.ts +10 -6
  406. package/src/debug/debug_renderer.js +12 -1
  407. package/src/debug/debug_renderer.js.map +1 -1
  408. package/src/di/decorators.d.ts +13 -1
  409. package/src/di/decorators.js +7 -1
  410. package/src/di/decorators.js.map +1 -1
  411. package/src/di/decorators.metadata.json +1 -1
  412. package/src/di/forward_ref.d.ts +3 -1
  413. package/src/di/forward_ref.js +3 -1
  414. package/src/di/forward_ref.js.map +1 -1
  415. package/src/di/injector.d.ts +4 -1
  416. package/src/di/injector.js +5 -2
  417. package/src/di/injector.js.map +1 -1
  418. package/src/di/injector.metadata.json +1 -1
  419. package/src/di/metadata.d.ts +8 -1
  420. package/src/di/metadata.js +10 -3
  421. package/src/di/metadata.js.map +1 -1
  422. package/src/di/opaque_token.d.ts +2 -1
  423. package/src/di/opaque_token.js +22 -21
  424. package/src/di/opaque_token.js.map +1 -1
  425. package/src/di/provider.d.ts +11 -10
  426. package/src/di/provider.js +17 -14
  427. package/src/di/provider.js.map +1 -1
  428. package/src/di/provider.metadata.json +1 -0
  429. package/src/di/provider_util.js.map +1 -1
  430. package/src/di/provider_util.metadata.json +1 -0
  431. package/src/di/reflective_exceptions.d.ts +11 -16
  432. package/src/di/reflective_exceptions.js +28 -22
  433. package/src/di/reflective_exceptions.js.map +1 -1
  434. package/src/di/reflective_injector.d.ts +3 -33
  435. package/src/di/reflective_injector.js +9 -6
  436. package/src/di/reflective_injector.js.map +1 -1
  437. package/src/di/reflective_key.d.ts +1 -8
  438. package/src/di/reflective_key.js +3 -2
  439. package/src/di/reflective_key.js.map +1 -1
  440. package/src/di/reflective_provider.d.ts +2 -1
  441. package/src/di/reflective_provider.js +6 -5
  442. package/src/di/reflective_provider.js.map +1 -1
  443. package/src/di/reflective_provider.metadata.json +1 -0
  444. package/src/di.d.ts +2 -2
  445. package/src/di.js +7 -9
  446. package/src/di.js.map +1 -1
  447. package/src/facade/async.d.ts +11 -4
  448. package/src/facade/async.js +27 -17
  449. package/src/facade/async.js.map +1 -1
  450. package/src/facade/base_wrapped_exception.js +4 -4
  451. package/src/facade/base_wrapped_exception.js.map +1 -1
  452. package/src/facade/collection.js.map +1 -1
  453. package/src/facade/collection.metadata.json +1 -1
  454. package/src/facade/exception_handler.d.ts +2 -11
  455. package/src/facade/exception_handler.js +8 -7
  456. package/src/facade/exception_handler.js.map +1 -1
  457. package/src/facade/exceptions.d.ts +4 -0
  458. package/src/facade/exceptions.js +6 -2
  459. package/src/facade/exceptions.js.map +1 -1
  460. package/src/facade/exceptions.metadata.json +1 -0
  461. package/src/facade/lang.d.ts +6 -4
  462. package/src/facade/lang.js +12 -11
  463. package/src/facade/lang.js.map +1 -1
  464. package/src/facade/lang.metadata.json +1 -1
  465. package/src/facade/math.d.ts +2 -0
  466. package/src/facade/math.js +5 -0
  467. package/src/facade/math.js.map +1 -0
  468. package/src/facade/math.metadata.json +1 -0
  469. package/src/facade/promise.js.map +1 -1
  470. package/src/linker/component_factory.d.ts +5 -4
  471. package/src/linker/component_factory.js +7 -3
  472. package/src/linker/component_factory.js.map +1 -1
  473. package/src/linker/component_resolver.d.ts +5 -4
  474. package/src/linker/component_resolver.js +12 -7
  475. package/src/linker/component_resolver.js.map +1 -1
  476. package/src/linker/component_resolver.metadata.json +1 -1
  477. package/src/linker/debug_context.js +5 -4
  478. package/src/linker/debug_context.js.map +1 -1
  479. package/src/linker/dynamic_component_loader.d.ts +5 -6
  480. package/src/linker/dynamic_component_loader.js +5 -3
  481. package/src/linker/dynamic_component_loader.js.map +1 -1
  482. package/src/linker/dynamic_component_loader.metadata.json +1 -1
  483. package/src/linker/element.d.ts +3 -3
  484. package/src/linker/element.js +5 -5
  485. package/src/linker/element.js.map +1 -1
  486. package/src/linker/element_injector.js.map +1 -1
  487. package/src/linker/element_ref.d.ts +1 -0
  488. package/src/linker/element_ref.js +5 -5
  489. package/src/linker/element_ref.js.map +1 -1
  490. package/src/linker/exceptions.d.ts +4 -1
  491. package/src/linker/exceptions.js +4 -1
  492. package/src/linker/exceptions.js.map +1 -1
  493. package/src/linker/query_list.d.ts +3 -10
  494. package/src/linker/query_list.js +8 -7
  495. package/src/linker/query_list.js.map +1 -1
  496. package/src/linker/systemjs_component_resolver.d.ts +21 -0
  497. package/src/linker/systemjs_component_resolver.js +52 -0
  498. package/src/linker/systemjs_component_resolver.js.map +1 -0
  499. package/src/linker/template_ref.d.ts +2 -1
  500. package/src/linker/template_ref.js +1 -0
  501. package/src/linker/template_ref.js.map +1 -1
  502. package/src/linker/view.d.ts +12 -1
  503. package/src/linker/view.js +65 -15
  504. package/src/linker/view.js.map +1 -1
  505. package/src/linker/view_container_ref.d.ts +2 -10
  506. package/src/linker/view_container_ref.js +4 -3
  507. package/src/linker/view_container_ref.js.map +1 -1
  508. package/src/linker/view_ref.d.ts +5 -1
  509. package/src/linker/view_ref.js +6 -2
  510. package/src/linker/view_ref.js.map +1 -1
  511. package/src/linker/view_type.js.map +1 -1
  512. package/src/linker/view_utils.d.ts +2 -4
  513. package/src/linker/view_utils.js +21 -21
  514. package/src/linker/view_utils.js.map +1 -1
  515. package/src/linker/view_utils.metadata.json +1 -1
  516. package/src/linker.d.ts +5 -4
  517. package/src/linker.js +12 -9
  518. package/src/linker.js.map +1 -1
  519. package/src/metadata/di.d.ts +8 -1
  520. package/src/metadata/di.js +10 -3
  521. package/src/metadata/di.js.map +1 -1
  522. package/src/metadata/directives.d.ts +104 -20
  523. package/src/metadata/directives.js +25 -27
  524. package/src/metadata/directives.js.map +1 -1
  525. package/src/metadata/lifecycle_hooks.d.ts +46 -31
  526. package/src/metadata/lifecycle_hooks.js +496 -10
  527. package/src/metadata/lifecycle_hooks.js.map +1 -1
  528. package/src/metadata/lifecycle_hooks.metadata.json +1 -1
  529. package/src/metadata/view.d.ts +6 -2
  530. package/src/metadata/view.js +3 -1
  531. package/src/metadata/view.js.map +1 -1
  532. package/src/metadata/view.metadata.json +1 -1
  533. package/src/metadata.d.ts +49 -15
  534. package/src/metadata.js +70 -37
  535. package/src/metadata.js.map +1 -1
  536. package/src/metadata.metadata.json +1 -1
  537. package/src/platform_common_providers.d.ts +1 -0
  538. package/src/platform_common_providers.js +3 -3
  539. package/src/platform_common_providers.js.map +1 -1
  540. package/src/platform_common_providers.metadata.json +1 -1
  541. package/src/platform_directives_and_pipes.d.ts +48 -45
  542. package/src/platform_directives_and_pipes.js +50 -47
  543. package/src/platform_directives_and_pipes.js.map +1 -1
  544. package/src/platform_directives_and_pipes.metadata.json +1 -1
  545. package/src/profile/profile.d.ts +5 -1
  546. package/src/profile/profile.js +5 -3
  547. package/src/profile/profile.js.map +1 -1
  548. package/src/profile/profile.metadata.json +1 -1
  549. package/src/profile/wtf_impl.js +1 -1
  550. package/src/profile/wtf_impl.js.map +1 -1
  551. package/src/profile/wtf_impl.metadata.json +1 -0
  552. package/src/profile/wtf_init.js +2 -2
  553. package/src/profile/wtf_init.js.map +1 -1
  554. package/src/reflection/platform_reflection_capabilities.d.ts +4 -3
  555. package/src/reflection/platform_reflection_capabilities.js.map +1 -1
  556. package/src/reflection/reflection.d.ts +1 -1
  557. package/src/reflection/reflection.js +2 -2
  558. package/src/reflection/reflection.js.map +1 -1
  559. package/src/reflection/reflection.metadata.json +1 -1
  560. package/src/reflection/reflection_capabilities.d.ts +4 -5
  561. package/src/reflection/reflection_capabilities.js +24 -10
  562. package/src/reflection/reflection_capabilities.js.map +1 -1
  563. package/src/reflection/reflector.d.ts +8 -20
  564. package/src/reflection/reflector.js +13 -3
  565. package/src/reflection/reflector.js.map +1 -1
  566. package/src/reflection/reflector_reader.js +3 -3
  567. package/src/reflection/reflector_reader.js.map +1 -1
  568. package/src/reflection/types.js.map +1 -1
  569. package/src/render/api.d.ts +17 -6
  570. package/src/render/api.js +8 -1
  571. package/src/render/api.js.map +1 -1
  572. package/src/render.d.ts +1 -1
  573. package/src/render.js +2 -2
  574. package/src/render.js.map +1 -1
  575. package/src/security.js +6 -6
  576. package/src/security.js.map +1 -1
  577. package/src/testability/testability.d.ts +3 -19
  578. package/src/testability/testability.js +10 -5
  579. package/src/testability/testability.js.map +1 -1
  580. package/src/testability/testability.metadata.json +1 -1
  581. package/src/util/decorators.d.ts +2 -1
  582. package/src/util/decorators.js +10 -9
  583. package/src/util/decorators.js.map +1 -1
  584. package/src/util.js.map +1 -1
  585. package/src/zone/ng_zone.d.ts +6 -17
  586. package/src/zone/ng_zone.js +11 -6
  587. package/src/zone/ng_zone.js.map +1 -1
  588. package/src/zone/ng_zone_impl.d.ts +1 -4
  589. package/src/zone/ng_zone_impl.js +3 -2
  590. package/src/zone/ng_zone_impl.js.map +1 -1
  591. package/src/zone.js.map +1 -1
  592. package/testing/async.js +20 -22
  593. package/testing/async.js.map +1 -1
  594. package/testing/async.metadata.json +1 -0
  595. package/testing/async_test_completer.js.map +1 -1
  596. package/testing/fake_async.d.ts +4 -1
  597. package/testing/fake_async.js +10 -2
  598. package/testing/fake_async.js.map +1 -1
  599. package/testing/lang_utils.js +1 -1
  600. package/testing/lang_utils.js.map +1 -1
  601. package/testing/lang_utils.metadata.json +1 -0
  602. package/testing/logger.js +5 -3
  603. package/testing/logger.js.map +1 -1
  604. package/testing/logger.metadata.json +1 -1
  605. package/testing/mock_application_ref.d.ts +1 -1
  606. package/testing/mock_application_ref.js +1 -0
  607. package/testing/mock_application_ref.js.map +1 -1
  608. package/testing/mock_application_ref.metadata.json +1 -1
  609. package/testing/ng_zone_mock.d.ts +0 -1
  610. package/testing/ng_zone_mock.js +2 -1
  611. package/testing/ng_zone_mock.js.map +1 -1
  612. package/testing/ng_zone_mock.metadata.json +1 -1
  613. package/testing/regexp.js +1 -1
  614. package/testing/regexp.js.map +1 -1
  615. package/testing/regexp.metadata.json +1 -0
  616. package/testing/test_injector.d.ts +6 -12
  617. package/testing/test_injector.js +3 -9
  618. package/testing/test_injector.js.map +1 -1
  619. package/testing/test_injector.metadata.json +1 -0
  620. package/testing/testing.d.ts +2 -2
  621. package/testing/testing.js +5 -5
  622. package/testing/testing.js.map +1 -1
  623. package/testing/testing.metadata.json +1 -1
  624. package/testing.js.map +1 -1
@@ -0,0 +1,565 @@
1
+ import { BaseException } from '../facade/exceptions';
2
+ import { NumberWrapper, isArray, isPresent, isString } from '../facade/lang';
3
+ export const AUTO_STYLE = '*';
4
+ /**
5
+ * Metadata representing the entry of animations.
6
+ * Instances of this class are provided via the animation DSL when the {@link trigger trigger
7
+ * animation function} is called.
8
+ */
9
+ export class AnimationEntryMetadata {
10
+ constructor(name, definitions) {
11
+ this.name = name;
12
+ this.definitions = definitions;
13
+ }
14
+ }
15
+ export class AnimationStateMetadata {
16
+ }
17
+ /**
18
+ * Metadata representing the entry of animations.
19
+ * Instances of this class are provided via the animation DSL when the {@link state state animation
20
+ * function} is called.
21
+ */
22
+ export class AnimationStateDeclarationMetadata extends AnimationStateMetadata {
23
+ constructor(stateNameExpr, styles) {
24
+ super();
25
+ this.stateNameExpr = stateNameExpr;
26
+ this.styles = styles;
27
+ }
28
+ }
29
+ /**
30
+ * Metadata representing the entry of animations.
31
+ * Instances of this class are provided via the animation DSL when the
32
+ * {@link transition transition animation function} is called.
33
+ */
34
+ export class AnimationStateTransitionMetadata extends AnimationStateMetadata {
35
+ constructor(stateChangeExpr, steps) {
36
+ super();
37
+ this.stateChangeExpr = stateChangeExpr;
38
+ this.steps = steps;
39
+ }
40
+ }
41
+ export class AnimationMetadata {
42
+ }
43
+ /**
44
+ * Metadata representing the entry of animations.
45
+ * Instances of this class are provided via the animation DSL when the {@link keyframes keyframes
46
+ * animation function} is called.
47
+ */
48
+ export class AnimationKeyframesSequenceMetadata extends AnimationMetadata {
49
+ constructor(steps) {
50
+ super();
51
+ this.steps = steps;
52
+ }
53
+ }
54
+ /**
55
+ * Metadata representing the entry of animations.
56
+ * Instances of this class are provided via the animation DSL when the {@link style style animation
57
+ * function} is called.
58
+ */
59
+ export class AnimationStyleMetadata extends AnimationMetadata {
60
+ constructor(styles, offset = null) {
61
+ super();
62
+ this.styles = styles;
63
+ this.offset = offset;
64
+ }
65
+ }
66
+ /**
67
+ * Metadata representing the entry of animations.
68
+ * Instances of this class are provided via the animation DSL when the {@link animate animate
69
+ * animation function} is called.
70
+ */
71
+ export class AnimationAnimateMetadata extends AnimationMetadata {
72
+ constructor(timings, styles) {
73
+ super();
74
+ this.timings = timings;
75
+ this.styles = styles;
76
+ }
77
+ }
78
+ export class AnimationWithStepsMetadata extends AnimationMetadata {
79
+ constructor() {
80
+ super();
81
+ }
82
+ get steps() { throw new BaseException('NOT IMPLEMENTED: Base Class'); }
83
+ }
84
+ /**
85
+ * Metadata representing the entry of animations.
86
+ * Instances of this class are provided via the animation DSL when the {@link sequence sequence
87
+ * animation function} is called.
88
+ */
89
+ export class AnimationSequenceMetadata extends AnimationWithStepsMetadata {
90
+ constructor(_steps) {
91
+ super();
92
+ this._steps = _steps;
93
+ }
94
+ get steps() { return this._steps; }
95
+ }
96
+ /**
97
+ * Metadata representing the entry of animations.
98
+ * Instances of this class are provided via the animation DSL when the {@link group group animation
99
+ * function} is called.
100
+ */
101
+ export class AnimationGroupMetadata extends AnimationWithStepsMetadata {
102
+ constructor(_steps) {
103
+ super();
104
+ this._steps = _steps;
105
+ }
106
+ get steps() { return this._steps; }
107
+ }
108
+ /**
109
+ * `animate` is an animation-specific function that is designed to be used inside of Angular2's
110
+ * animation
111
+ * DSL language. If this information is new, please navigate to the
112
+ * {@link ComponentMetadata#animations-anchor component animations metadata
113
+ * page} to gain a better understanding of how animations in Angular2 are used.
114
+ *
115
+ * `animate` specifies an animation step that will apply the provided `styles` data for a given
116
+ * amount of
117
+ * time based on the provided `timing` expression value. Calls to `animate` are expected to be
118
+ * used within {@link sequence an animation sequence}, {@link group group}, or {@link transition
119
+ * transition}.
120
+ *
121
+ * ### Usage
122
+ *
123
+ * The `animate` function accepts two input parameters: `timing` and `styles`:
124
+ *
125
+ * - `timing` is a string based value that can be a combination of a duration with optional
126
+ * delay and easing values. The format for the expression breaks down to `duration delay easing`
127
+ * (therefore a value such as `1s 100ms ease-out` will be parse itself into `duration=1000,
128
+ * delay=100, easing=ease-out`.
129
+ * If a numeric value is provided then that will be used as the `duration` value in millisecond
130
+ * form.
131
+ * - `styles` is the style input data which can either be a call to {@link style style} or {@link
132
+ * keyframes keyframes}.
133
+ * If left empty then the styles from the destination state will be collected and used (this is
134
+ * useful when
135
+ * describing an animation step that will complete an animation by {@link
136
+ * transition#the-final-animate-call animating to the final state}).
137
+ *
138
+ * ```typescript
139
+ * // various functions for specifying timing data
140
+ * animate(500, style(...))
141
+ * animate("1s", style(...))
142
+ * animate("100ms 0.5s", style(...))
143
+ * animate("5s ease", style(...))
144
+ * animate("5s 10ms cubic-bezier(.17,.67,.88,.1)", style(...))
145
+ *
146
+ * // either style() of keyframes() can be used
147
+ * animate(500, style({ background: "red" }))
148
+ * animate(500, keyframes([
149
+ * style({ background: "blue" })),
150
+ * style({ background: "red" }))
151
+ * ])
152
+ * ```
153
+ *
154
+ * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))
155
+ *
156
+ * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
157
+ */
158
+ export function animate(timing, styles = null) {
159
+ var stylesEntry = styles;
160
+ if (!isPresent(stylesEntry)) {
161
+ var EMPTY_STYLE = {};
162
+ stylesEntry = new AnimationStyleMetadata([EMPTY_STYLE], 1);
163
+ }
164
+ return new AnimationAnimateMetadata(timing, stylesEntry);
165
+ }
166
+ /**
167
+ * `group` is an animation-specific function that is designed to be used inside of Angular2's
168
+ * animation
169
+ * DSL language. If this information is new, please navigate to the
170
+ * {@link ComponentMetadata#animations-anchor component animations metadata
171
+ * page} to gain a better understanding of how animations in Angular2 are used.
172
+ *
173
+ * `group` specifies a list of animation steps that are all run in parallel. Grouped animations
174
+ * are useful when a series of styles must be animated/closed off
175
+ * at different statrting/ending times.
176
+ *
177
+ * The `group` function can either be used within a {@link sequence sequence} or a {@link transition
178
+ * transition}
179
+ * and it will only continue to the next instruction once all of the inner animation steps
180
+ * have completed.
181
+ *
182
+ * ### Usage
183
+ *
184
+ * The `steps` data that is passed into the `group` animation function can either consist
185
+ * of {@link style style} or {@link animate animate} function calls. Each call to `style()` or
186
+ * `animate()`
187
+ * within a group will be executed instantly (use {@link keyframes keyframes} or a
188
+ * {@link animate#usage animate() with a delay value} to offset styles to be applied at a later
189
+ * time).
190
+ *
191
+ * ```typescript
192
+ * group([
193
+ * animate("1s", { background: "black" }))
194
+ * animate("2s", { color: "white" }))
195
+ * ])
196
+ * ```
197
+ *
198
+ * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))
199
+ *
200
+ * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
201
+ */
202
+ export function group(steps) {
203
+ return new AnimationGroupMetadata(steps);
204
+ }
205
+ /**
206
+ * `sequence` is an animation-specific function that is designed to be used inside of Angular2's
207
+ * animation
208
+ * DSL language. If this information is new, please navigate to the
209
+ * {@link ComponentMetadata#animations-anchor component animations metadata
210
+ * page} to gain a better understanding of how animations in Angular2 are used.
211
+ *
212
+ * `sequence` Specifies a list of animation steps that are run one by one. (`sequence` is used
213
+ * by default when an array is passed as animation data into {@link transition transition}.)
214
+ *
215
+ * The `sequence` function can either be used within a {@link group group} or a {@link transition
216
+ * transition}
217
+ * and it will only continue to the next instruction once each of the inner animation steps
218
+ * have completed.
219
+ *
220
+ * To perform animation styling in parallel with other animation steps then
221
+ * have a look at the {@link group group} animation function.
222
+ *
223
+ * ### Usage
224
+ *
225
+ * The `steps` data that is passed into the `sequence` animation function can either consist
226
+ * of {@link style style} or {@link animate animate} function calls. A call to `style()` will apply
227
+ * the
228
+ * provided styling data immediately while a call to `animate()` will apply its styling
229
+ * data over a given time depending on its timing data.
230
+ *
231
+ * ```typescript
232
+ * sequence([
233
+ * style({ opacity: 0 })),
234
+ * animate("1s", { opacity: 1 }))
235
+ * ])
236
+ * ```
237
+ *
238
+ * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))
239
+ *
240
+ * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
241
+ */
242
+ export function sequence(steps) {
243
+ return new AnimationSequenceMetadata(steps);
244
+ }
245
+ /**
246
+ * `style` is an animation-specific function that is designed to be used inside of Angular2's
247
+ * animation
248
+ * DSL language. If this information is new, please navigate to the
249
+ * {@link ComponentMetadata#animations-anchor component animations metadata
250
+ * page} to gain a better understanding of how animations in Angular2 are used.
251
+ *
252
+ * `style` declares a key/value object containing CSS properties/styles that can then
253
+ * be used for {@link state animation states}, within an {@link sequence animation sequence}, or as
254
+ * styling data for both {@link animate animate} and {@link keyframes keyframes}.
255
+ *
256
+ * ### Usage
257
+ *
258
+ * `style` takes in a key/value string map as data and expects one or more CSS property/value
259
+ * pairs to be defined.
260
+ *
261
+ * ```typescript
262
+ * // string values are used for css properties
263
+ * style({ background: "red", color: "blue" })
264
+ *
265
+ * // numerical (pixel) values are also supported
266
+ * style({ width: 100, height: 0 })
267
+ * ```
268
+ *
269
+ * #### Auto-styles (using `*`)
270
+ *
271
+ * When an asterix (`*`) character is used as a value then it will be detected from the element
272
+ * being animated
273
+ * and applied as animation data when the animation starts.
274
+ *
275
+ * This feature proves useful for a state depending on layout and/or environment factors; in such
276
+ * cases
277
+ * the styles are calculated just before the animation starts.
278
+ *
279
+ * ```typescript
280
+ * // the steps below will animate from 0 to the
281
+ * // actual height of the element
282
+ * style({ height: 0 }),
283
+ * animate("1s", style({ height: "*" }))
284
+ * ```
285
+ *
286
+ * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))
287
+ *
288
+ * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
289
+ */
290
+ export function style(tokens) {
291
+ var input;
292
+ var offset = null;
293
+ if (isString(tokens)) {
294
+ input = [tokens];
295
+ }
296
+ else {
297
+ if (isArray(tokens)) {
298
+ input = tokens;
299
+ }
300
+ else {
301
+ input = [tokens];
302
+ }
303
+ input.forEach(entry => {
304
+ var entryOffset = entry['offset'];
305
+ if (isPresent(entryOffset)) {
306
+ offset = offset == null ? NumberWrapper.parseFloat(entryOffset) : offset;
307
+ }
308
+ });
309
+ }
310
+ return new AnimationStyleMetadata(input, offset);
311
+ }
312
+ /**
313
+ * `state` is an animation-specific function that is designed to be used inside of Angular2's
314
+ * animation
315
+ * DSL language. If this information is new, please navigate to the
316
+ * {@link ComponentMetadata#animations-anchor component animations metadata
317
+ * page} to gain a better understanding of how animations in Angular2 are used.
318
+ *
319
+ * `state` declares an animation state within the given trigger. When a state is
320
+ * active within a component then its associated styles will persist on
321
+ * the element that the trigger is attached to (even when the animation ends).
322
+ *
323
+ * To animate between states, have a look at the animation {@link transition transition}
324
+ * DSL function. To register states to an animation trigger please have a look
325
+ * at the {@link trigger trigger} function.
326
+ *
327
+ * #### The `void` state
328
+ *
329
+ * The `void` state value is a reserved word that angular uses to determine when the element is not
330
+ * apart
331
+ * of the application anymore (e.g. when an `ngIf` evaluates to false then the state of the
332
+ * associated element
333
+ * is void).
334
+ *
335
+ * #### The `*` (default) state
336
+ *
337
+ * The `*` state (when styled) is a fallback state that will be used if
338
+ * the state that is being animated is not declared within the trigger.
339
+ *
340
+ * ### Usage
341
+ *
342
+ * `state` will declare an animation state with its associated styles
343
+ * within the given trigger.
344
+ *
345
+ * - `stateNameExpr` can be one or more state names separated by commas.
346
+ * - `styles` refers to the {@link style styling data} that will be persisted on the element once
347
+ * the state
348
+ * has been reached.
349
+ *
350
+ * ```typescript
351
+ * // "void" is a reserved name for a state and is used to represent
352
+ * // the state in which an element is detached from from the application.
353
+ * state("void", style({ height: 0 }))
354
+ *
355
+ * // user-defined states
356
+ * state("closed", style({ height: 0 }))
357
+ * state("open, visible", style({ height: "*" }))
358
+ * ```
359
+ *
360
+ * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))
361
+ *
362
+ * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
363
+ */
364
+ export function state(stateNameExpr, styles) {
365
+ return new AnimationStateDeclarationMetadata(stateNameExpr, styles);
366
+ }
367
+ /**
368
+ * `keyframes` is an animation-specific function that is designed to be used inside of Angular2's
369
+ * animation
370
+ * DSL language. If this information is new, please navigate to the
371
+ * {@link ComponentMetadata#animations-anchor component animations metadata
372
+ * page} to gain a better understanding of how animations in Angular2 are used.
373
+ *
374
+ * `keyframes` specifies a collection of {@link style style} entries each optionally characterized
375
+ * by an `offset` value.
376
+ *
377
+ * ### Usage
378
+ *
379
+ * The `keyframes` animation function is designed to be used alongside the {@link animate animate}
380
+ * animation function. Instead of applying animations from where they are
381
+ * currently to their destination, keyframes can describe how each style entry is applied
382
+ * and at what point within the animation arc (much like CSS Keyframe Animations do).
383
+ *
384
+ * For each `style()` entry an `offset` value can be set. Doing so allows to specifiy at
385
+ * what percentage of the animate time the styles will be applied.
386
+ *
387
+ * ```typescript
388
+ * // the provided offset values describe when each backgroundColor value is applied.
389
+ * animate("5s", keyframes([
390
+ * style({ backgroundColor: "red", offset: 0 }),
391
+ * style({ backgroundColor: "blue", offset: 0.2 }),
392
+ * style({ backgroundColor: "orange", offset: 0.3 }),
393
+ * style({ backgroundColor: "black", offset: 1 })
394
+ * ]))
395
+ * ```
396
+ *
397
+ * Alternatively, if there are no `offset` values used within the style entries then the offsets
398
+ * will
399
+ * be calculated automatically.
400
+ *
401
+ * ```typescript
402
+ * animate("5s", keyframes([
403
+ * style({ backgroundColor: "red" }) // offset = 0
404
+ * style({ backgroundColor: "blue" }) // offset = 0.33
405
+ * style({ backgroundColor: "orange" }) // offset = 0.66
406
+ * style({ backgroundColor: "black" }) // offset = 1
407
+ * ]))
408
+ * ```
409
+ *
410
+ * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))
411
+ *
412
+ * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
413
+ */
414
+ export function keyframes(steps) {
415
+ return new AnimationKeyframesSequenceMetadata(steps);
416
+ }
417
+ /**
418
+ * `transition` is an animation-specific function that is designed to be used inside of Angular2's
419
+ * animation
420
+ * DSL language. If this information is new, please navigate to the
421
+ * {@link ComponentMetadata#animations-anchor component animations metadata
422
+ * page} to gain a better understanding of how animations in Angular2 are used.
423
+ *
424
+ * `transition` declares the {@link sequence sequence of animation steps} that will be run when the
425
+ * provided
426
+ * `stateChangeExpr` value is satisfied. The `stateChangeExpr` consists of a `state1 => state2`
427
+ * which consists
428
+ * of two known states (use an asterix (`*`) to refer to a dynamic starting and/or ending state).
429
+ *
430
+ * Animation transitions are placed within an {@link trigger animation trigger}. For an transition
431
+ * to animate to
432
+ * a state value and persist its styles then one or more {@link state animation states} is expected
433
+ * to be defined.
434
+ *
435
+ * ### Usage
436
+ *
437
+ * An animation transition is kicked off the `stateChangeExpr` predicate evaluates to true based on
438
+ * what the
439
+ * previous state is and what the current state has become. In other words, if a transition is
440
+ * defined that
441
+ * matches the old/current state criteria then the associated animation will be triggered.
442
+ *
443
+ * ```typescript
444
+ * // all transition/state changes are defined within an animation trigger
445
+ * trigger("myAnimationTrigger", [
446
+ * // if a state is defined then its styles will be persisted when the
447
+ * // animation has fully completed itself
448
+ * state("on", style({ background: "green" })),
449
+ * state("off", style({ background: "grey" })),
450
+ *
451
+ * // a transition animation that will be kicked off when the state value
452
+ * // bound to "myAnimationTrigger" changes from "on" to "off"
453
+ * transition("on => off", animate(500)),
454
+ *
455
+ * // it is also possible to do run the same animation for both directions
456
+ * transition("on <=> off", animate(500)),
457
+ *
458
+ * // or to define multiple states pairs separated by commas
459
+ * transition("on => off, off => void", animate(500)),
460
+ *
461
+ * // this is a catch-all state change for when an element is inserted into
462
+ * // the page and the destination state is unknown
463
+ * transition("void => *", [
464
+ * style({ opacity: 0 }),
465
+ * animate(500)
466
+ * ]),
467
+ *
468
+ * // this will capture a state change between any states
469
+ * transition("* => *", animate("1s 0s")),
470
+ * ])
471
+ * ```
472
+ *
473
+ * The template associated with this component will make use of the `myAnimationTrigger`
474
+ * animation trigger by binding to an element within its template code.
475
+ *
476
+ * ```html
477
+ * <!-- somewhere inside of my-component-tpl.html -->
478
+ * <div @myAnimationTrigger="myStatusExp">...</div>
479
+ * ```
480
+ *
481
+ * #### The final `animate` call
482
+ *
483
+ * If the final step within the transition steps is a call to `animate()` that **only**
484
+ * uses a timing value with **no style data** then it will be automatically used as the final
485
+ * animation
486
+ * arc for the element to animate itself to the final state. This involves an automatic mix of
487
+ * adding/removing CSS styles so that the element will be in the exact state it should be for the
488
+ * applied state to be presented correctly.
489
+ *
490
+ * ```
491
+ * // start off by hiding the element, but make sure that it animates properly to whatever state
492
+ * // is currently active for "myAnimationTrigger"
493
+ * transition("void => *", [
494
+ * style({ opacity: 0 }),
495
+ * animate(500)
496
+ * ])
497
+ * ```
498
+ *
499
+ * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))
500
+ *
501
+ * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
502
+ */
503
+ export function transition(stateChangeExpr, steps) {
504
+ var animationData = isArray(steps) ? new AnimationSequenceMetadata(steps) :
505
+ steps;
506
+ return new AnimationStateTransitionMetadata(stateChangeExpr, animationData);
507
+ }
508
+ /**
509
+ * `trigger` is an animation-specific function that is designed to be used inside of Angular2's
510
+ * animation
511
+ * DSL language. If this information is new, please navigate to the
512
+ * {@link ComponentMetadata#animations-anchor component animations metadata
513
+ * page} to gain a better understanding of how animations in Angular2 are used.
514
+ *
515
+ * `trigger` Creates an animation trigger which will a list of {@link state state} and {@link
516
+ * transition transition}
517
+ * entries that will be evaluated when the expression bound to the trigger changes.
518
+ *
519
+ * Triggers are registered within the component annotation data under the
520
+ * {@link ComponentMetadata#animations-anchor animations section}. An animation trigger can
521
+ * be placed on an element within a template by referencing the name of the
522
+ * trigger followed by the expression value that the trigger is bound to
523
+ * (in the form of `@triggerName="expression"`.
524
+ *
525
+ * ### Usage
526
+ *
527
+ * `trigger` will create an animation trigger reference based on the provided `name` value.
528
+ * The provided `animation` value is expected to be an array consisting of {@link state state} and
529
+ * {@link transition transition}
530
+ * declarations.
531
+ *
532
+ * ```typescript
533
+ * @Component({
534
+ * selector: 'my-component',
535
+ * templateUrl: 'my-component-tpl.html',
536
+ * animations: [
537
+ * trigger("myAnimationTrigger", [
538
+ * state(...),
539
+ * state(...),
540
+ * transition(...),
541
+ * transition(...)
542
+ * ])
543
+ * ]
544
+ * })
545
+ * class MyComponent {
546
+ * myStatusExp = "something";
547
+ * }
548
+ * ```
549
+ *
550
+ * The template associated with this component will make use of the `myAnimationTrigger`
551
+ * animation trigger by binding to an element within its template code.
552
+ *
553
+ * ```html
554
+ * <!-- somewhere inside of my-component-tpl.html -->
555
+ * <div @myAnimationTrigger="myStatusExp">...</div>
556
+ * ```
557
+ *
558
+ * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))
559
+ *
560
+ * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
561
+ */
562
+ export function trigger(name, animation) {
563
+ return new AnimationEntryMetadata(name, animation);
564
+ }
565
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/animation/metadata.ts"],"names":[],"mappings":"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","sourcesContent":["import {BaseException} from '../facade/exceptions';\nimport {NumberWrapper, isArray, isPresent, isString, isStringMap} from '../facade/lang';\n\nexport const AUTO_STYLE = '*';\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link trigger trigger\n * animation function} is called.\n */\nexport class AnimationEntryMetadata {\n constructor(public name: string, public definitions: AnimationStateMetadata[]) {}\n}\n\nexport abstract class AnimationStateMetadata {}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link state state animation\n * function} is called.\n */\nexport class AnimationStateDeclarationMetadata extends AnimationStateMetadata {\n constructor(public stateNameExpr: string, public styles: AnimationStyleMetadata) { super(); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the\n * {@link transition transition animation function} is called.\n */\nexport class AnimationStateTransitionMetadata extends AnimationStateMetadata {\n constructor(public stateChangeExpr: string, public steps: AnimationMetadata) { super(); }\n}\n\nexport abstract class AnimationMetadata {}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link keyframes keyframes\n * animation function} is called.\n */\nexport class AnimationKeyframesSequenceMetadata extends AnimationMetadata {\n constructor(public steps: AnimationStyleMetadata[]) { super(); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link style style animation\n * function} is called.\n */\nexport class AnimationStyleMetadata extends AnimationMetadata {\n constructor(\n public styles: Array<string|{[key: string]: string | number}>, public offset: number = null) {\n super();\n }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link animate animate\n * animation function} is called.\n */\nexport class AnimationAnimateMetadata extends AnimationMetadata {\n constructor(\n public timings: string|number,\n public styles: AnimationStyleMetadata|AnimationKeyframesSequenceMetadata) {\n super();\n }\n}\n\nexport abstract class AnimationWithStepsMetadata extends AnimationMetadata {\n constructor() { super(); }\n get steps(): AnimationMetadata[] { throw new BaseException('NOT IMPLEMENTED: Base Class'); }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link sequence sequence\n * animation function} is called.\n */\nexport class AnimationSequenceMetadata extends AnimationWithStepsMetadata {\n constructor(private _steps: AnimationMetadata[]) { super(); }\n get steps(): AnimationMetadata[] { return this._steps; }\n}\n\n/**\n * Metadata representing the entry of animations.\n * Instances of this class are provided via the animation DSL when the {@link group group animation\n * function} is called.\n */\nexport class AnimationGroupMetadata extends AnimationWithStepsMetadata {\n constructor(private _steps: AnimationMetadata[]) { super(); }\n get steps(): AnimationMetadata[] { return this._steps; }\n}\n\n/**\n * `animate` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link ComponentMetadata#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `animate` specifies an animation step that will apply the provided `styles` data for a given\n * amount of\n * time based on the provided `timing` expression value. Calls to `animate` are expected to be\n * used within {@link sequence an animation sequence}, {@link group group}, or {@link transition\n * transition}.\n *\n * ### Usage\n *\n * The `animate` function accepts two input parameters: `timing` and `styles`:\n *\n * - `timing` is a string based value that can be a combination of a duration with optional\n * delay and easing values. The format for the expression breaks down to `duration delay easing`\n * (therefore a value such as `1s 100ms ease-out` will be parse itself into `duration=1000,\n * delay=100, easing=ease-out`.\n * If a numeric value is provided then that will be used as the `duration` value in millisecond\n * form.\n * - `styles` is the style input data which can either be a call to {@link style style} or {@link\n * keyframes keyframes}.\n * If left empty then the styles from the destination state will be collected and used (this is\n * useful when\n * describing an animation step that will complete an animation by {@link\n * transition#the-final-animate-call animating to the final state}).\n *\n * ```typescript\n * // various functions for specifying timing data\n * animate(500, style(...))\n * animate(\"1s\", style(...))\n * animate(\"100ms 0.5s\", style(...))\n * animate(\"5s ease\", style(...))\n * animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\", style(...))\n *\n * // either style() of keyframes() can be used\n * animate(500, style({ background: \"red\" }))\n * animate(500, keyframes([\n * style({ background: \"blue\" })),\n * style({ background: \"red\" }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n */\nexport function animate(\n timing: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata =\n null): AnimationAnimateMetadata {\n var stylesEntry = styles;\n if (!isPresent(stylesEntry)) {\n var EMPTY_STYLE: {[key: string]: string | number} = {};\n stylesEntry = new AnimationStyleMetadata([EMPTY_STYLE], 1);\n }\n return new AnimationAnimateMetadata(timing, stylesEntry);\n}\n\n/**\n * `group` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link ComponentMetadata#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `group` specifies a list of animation steps that are all run in parallel. Grouped animations\n * are useful when a series of styles must be animated/closed off\n * at different statrting/ending times.\n *\n * The `group` function can either be used within a {@link sequence sequence} or a {@link transition\n * transition}\n * and it will only continue to the next instruction once all of the inner animation steps\n * have completed.\n *\n * ### Usage\n *\n * The `steps` data that is passed into the `group` animation function can either consist\n * of {@link style style} or {@link animate animate} function calls. Each call to `style()` or\n * `animate()`\n * within a group will be executed instantly (use {@link keyframes keyframes} or a\n * {@link animate#usage animate() with a delay value} to offset styles to be applied at a later\n * time).\n *\n * ```typescript\n * group([\n * animate(\"1s\", { background: \"black\" }))\n * animate(\"2s\", { color: \"white\" }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n */\nexport function group(steps: AnimationMetadata[]): AnimationGroupMetadata {\n return new AnimationGroupMetadata(steps);\n}\n\n/**\n * `sequence` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link ComponentMetadata#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `sequence` Specifies a list of animation steps that are run one by one. (`sequence` is used\n * by default when an array is passed as animation data into {@link transition transition}.)\n *\n * The `sequence` function can either be used within a {@link group group} or a {@link transition\n * transition}\n * and it will only continue to the next instruction once each of the inner animation steps\n * have completed.\n *\n * To perform animation styling in parallel with other animation steps then\n * have a look at the {@link group group} animation function.\n *\n * ### Usage\n *\n * The `steps` data that is passed into the `sequence` animation function can either consist\n * of {@link style style} or {@link animate animate} function calls. A call to `style()` will apply\n * the\n * provided styling data immediately while a call to `animate()` will apply its styling\n * data over a given time depending on its timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 })),\n * animate(\"1s\", { opacity: 1 }))\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n */\nexport function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata {\n return new AnimationSequenceMetadata(steps);\n}\n\n/**\n * `style` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link ComponentMetadata#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `style` declares a key/value object containing CSS properties/styles that can then\n * be used for {@link state animation states}, within an {@link sequence animation sequence}, or as\n * styling data for both {@link animate animate} and {@link keyframes keyframes}.\n *\n * ### Usage\n *\n * `style` takes in a key/value string map as data and expects one or more CSS property/value\n * pairs to be defined.\n *\n * ```typescript\n * // string values are used for css properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical (pixel) values are also supported\n * style({ width: 100, height: 0 })\n * ```\n *\n * #### Auto-styles (using `*`)\n *\n * When an asterix (`*`) character is used as a value then it will be detected from the element\n * being animated\n * and applied as animation data when the animation starts.\n *\n * This feature proves useful for a state depending on layout and/or environment factors; in such\n * cases\n * the styles are calculated just before the animation starts.\n *\n * ```typescript\n * // the steps below will animate from 0 to the\n * // actual height of the element\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n */\nexport function style(\n tokens: string | {[key: string]: string | number} |\n Array<string|{[key: string]: string | number}>): AnimationStyleMetadata {\n var input: Array<{[key: string]: string | number}|string>;\n var offset: number = null;\n if (isString(tokens)) {\n input = [<string>tokens];\n } else {\n if (isArray(tokens)) {\n input = <Array<{[key: string]: string | number}>>tokens;\n } else {\n input = [<{[key: string]: string | number}>tokens];\n }\n input.forEach(entry => {\n var entryOffset = (entry as any /** TODO #9100 */)['offset'];\n if (isPresent(entryOffset)) {\n offset = offset == null ? NumberWrapper.parseFloat(entryOffset) : offset;\n }\n });\n }\n return new AnimationStyleMetadata(input, offset);\n}\n\n/**\n * `state` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link ComponentMetadata#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `state` declares an animation state within the given trigger. When a state is\n * active within a component then its associated styles will persist on\n * the element that the trigger is attached to (even when the animation ends).\n *\n * To animate between states, have a look at the animation {@link transition transition}\n * DSL function. To register states to an animation trigger please have a look\n * at the {@link trigger trigger} function.\n *\n * #### The `void` state\n *\n * The `void` state value is a reserved word that angular uses to determine when the element is not\n * apart\n * of the application anymore (e.g. when an `ngIf` evaluates to false then the state of the\n * associated element\n * is void).\n *\n * #### The `*` (default) state\n *\n * The `*` state (when styled) is a fallback state that will be used if\n * the state that is being animated is not declared within the trigger.\n *\n * ### Usage\n *\n * `state` will declare an animation state with its associated styles\n * within the given trigger.\n *\n * - `stateNameExpr` can be one or more state names separated by commas.\n * - `styles` refers to the {@link style styling data} that will be persisted on the element once\n * the state\n * has been reached.\n *\n * ```typescript\n * // \"void\" is a reserved name for a state and is used to represent\n * // the state in which an element is detached from from the application.\n * state(\"void\", style({ height: 0 }))\n *\n * // user-defined states\n * state(\"closed\", style({ height: 0 }))\n * state(\"open, visible\", style({ height: \"*\" }))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n */\nexport function state(\n stateNameExpr: string, styles: AnimationStyleMetadata): AnimationStateDeclarationMetadata {\n return new AnimationStateDeclarationMetadata(stateNameExpr, styles);\n}\n\n/**\n * `keyframes` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link ComponentMetadata#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `keyframes` specifies a collection of {@link style style} entries each optionally characterized\n * by an `offset` value.\n *\n * ### Usage\n *\n * The `keyframes` animation function is designed to be used alongside the {@link animate animate}\n * animation function. Instead of applying animations from where they are\n * currently to their destination, keyframes can describe how each style entry is applied\n * and at what point within the animation arc (much like CSS Keyframe Animations do).\n *\n * For each `style()` entry an `offset` value can be set. Doing so allows to specifiy at\n * what percentage of the animate time the styles will be applied.\n *\n * ```typescript\n * // the provided offset values describe when each backgroundColor value is applied.\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * Alternatively, if there are no `offset` values used within the style entries then the offsets\n * will\n * be calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n */\nexport function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata {\n return new AnimationKeyframesSequenceMetadata(steps);\n}\n\n/**\n * `transition` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link ComponentMetadata#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `transition` declares the {@link sequence sequence of animation steps} that will be run when the\n * provided\n * `stateChangeExpr` value is satisfied. The `stateChangeExpr` consists of a `state1 => state2`\n * which consists\n * of two known states (use an asterix (`*`) to refer to a dynamic starting and/or ending state).\n *\n * Animation transitions are placed within an {@link trigger animation trigger}. For an transition\n * to animate to\n * a state value and persist its styles then one or more {@link state animation states} is expected\n * to be defined.\n *\n * ### Usage\n *\n * An animation transition is kicked off the `stateChangeExpr` predicate evaluates to true based on\n * what the\n * previous state is and what the current state has become. In other words, if a transition is\n * defined that\n * matches the old/current state criteria then the associated animation will be triggered.\n *\n * ```typescript\n * // all transition/state changes are defined within an animation trigger\n * trigger(\"myAnimationTrigger\", [\n * // if a state is defined then its styles will be persisted when the\n * // animation has fully completed itself\n * state(\"on\", style({ background: \"green\" })),\n * state(\"off\", style({ background: \"grey\" })),\n *\n * // a transition animation that will be kicked off when the state value\n * // bound to \"myAnimationTrigger\" changes from \"on\" to \"off\"\n * transition(\"on => off\", animate(500)),\n *\n * // it is also possible to do run the same animation for both directions\n * transition(\"on <=> off\", animate(500)),\n *\n * // or to define multiple states pairs separated by commas\n * transition(\"on => off, off => void\", animate(500)),\n *\n * // this is a catch-all state change for when an element is inserted into\n * // the page and the destination state is unknown\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ]),\n *\n * // this will capture a state change between any states\n * transition(\"* => *\", animate(\"1s 0s\")),\n * ])\n * ```\n *\n * The template associated with this component will make use of the `myAnimationTrigger`\n * animation trigger by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div @myAnimationTrigger=\"myStatusExp\">...</div>\n * ```\n *\n * #### The final `animate` call\n *\n * If the final step within the transition steps is a call to `animate()` that **only**\n * uses a timing value with **no style data** then it will be automatically used as the final\n * animation\n * arc for the element to animate itself to the final state. This involves an automatic mix of\n * adding/removing CSS styles so that the element will be in the exact state it should be for the\n * applied state to be presented correctly.\n *\n * ```\n * // start off by hiding the element, but make sure that it animates properly to whatever state\n * // is currently active for \"myAnimationTrigger\"\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ])\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n */\nexport function transition(stateChangeExpr: string, steps: AnimationMetadata | AnimationMetadata[]):\n AnimationStateTransitionMetadata {\n var animationData = isArray(steps) ? new AnimationSequenceMetadata(<AnimationMetadata[]>steps) :\n <AnimationMetadata>steps;\n return new AnimationStateTransitionMetadata(stateChangeExpr, animationData);\n}\n\n/**\n * `trigger` is an animation-specific function that is designed to be used inside of Angular2's\n * animation\n * DSL language. If this information is new, please navigate to the\n * {@link ComponentMetadata#animations-anchor component animations metadata\n * page} to gain a better understanding of how animations in Angular2 are used.\n *\n * `trigger` Creates an animation trigger which will a list of {@link state state} and {@link\n * transition transition}\n * entries that will be evaluated when the expression bound to the trigger changes.\n *\n * Triggers are registered within the component annotation data under the\n * {@link ComponentMetadata#animations-anchor animations section}. An animation trigger can\n * be placed on an element within a template by referencing the name of the\n * trigger followed by the expression value that the trigger is bound to\n * (in the form of `@triggerName=\"expression\"`.\n *\n * ### Usage\n *\n * `trigger` will create an animation trigger reference based on the provided `name` value.\n * The provided `animation` value is expected to be an array consisting of {@link state state} and\n * {@link transition transition}\n * declarations.\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component will make use of the `myAnimationTrigger`\n * animation trigger by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div @myAnimationTrigger=\"myStatusExp\">...</div>\n * ```\n *\n * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview))\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n */\nexport function trigger(name: string, animation: AnimationMetadata[]): AnimationEntryMetadata {\n return new AnimationEntryMetadata(name, animation);\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":1,"metadata":{"AUTO_STYLE":"*","group":{"__symbolic":"function","parameters":["steps"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"AnimationGroupMetadata"},"arguments":[{"__symbolic":"reference","name":"steps"}]}},"sequence":{"__symbolic":"function","parameters":["steps"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"AnimationSequenceMetadata"},"arguments":[{"__symbolic":"reference","name":"steps"}]}},"state":{"__symbolic":"function","parameters":["stateNameExpr","styles"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"AnimationStateDeclarationMetadata"},"arguments":[{"__symbolic":"reference","name":"stateNameExpr"},{"__symbolic":"reference","name":"styles"}]}},"keyframes":{"__symbolic":"function","parameters":["steps"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"AnimationKeyframesSequenceMetadata"},"arguments":[{"__symbolic":"reference","name":"steps"}]}},"trigger":{"__symbolic":"function","parameters":["name","animation"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"AnimationEntryMetadata"},"arguments":[{"__symbolic":"reference","name":"name"},{"__symbolic":"reference","name":"animation"}]}}}}
@@ -2,6 +2,7 @@ import { Type } from '../src/facade/lang';
2
2
  /**
3
3
  * A default set of providers which should be included in any Angular
4
4
  * application, regardless of the platform it runs onto.
5
+ * @stable
5
6
  */
6
7
  export declare const APPLICATION_COMMON_PROVIDERS: Array<Type | {
7
8
  [k: string]: any;
@@ -1,13 +1,14 @@
1
- import { APP_ID_RANDOM_PROVIDER } from './application_tokens';
2
1
  import { APPLICATION_CORE_PROVIDERS } from './application_ref';
3
- import { IterableDiffers, defaultIterableDiffers, KeyValueDiffers, defaultKeyValueDiffers } from './change_detection/change_detection';
4
- import { ViewUtils } from './linker/view_utils';
2
+ import { APP_ID_RANDOM_PROVIDER } from './application_tokens';
3
+ import { IterableDiffers, KeyValueDiffers, defaultIterableDiffers, defaultKeyValueDiffers } from './change_detection/change_detection';
5
4
  import { ComponentResolver, ReflectorComponentResolver } from './linker/component_resolver';
6
5
  import { DynamicComponentLoader, DynamicComponentLoader_ } from './linker/dynamic_component_loader';
6
+ import { ViewUtils } from './linker/view_utils';
7
7
  let __unused; // avoid unused import when Type union types are erased
8
8
  /**
9
9
  * A default set of providers which should be included in any Angular
10
10
  * application, regardless of the platform it runs onto.
11
+ * @stable
11
12
  */
12
13
  export const APPLICATION_COMMON_PROVIDERS =
13
14
  /*@ts2dart_const*/ [
@@ -17,6 +18,6 @@ export const APPLICATION_COMMON_PROVIDERS =
17
18
  ViewUtils,
18
19
  /* @ts2dart_Provider */ { provide: IterableDiffers, useValue: defaultIterableDiffers },
19
20
  /* @ts2dart_Provider */ { provide: KeyValueDiffers, useValue: defaultKeyValueDiffers },
20
- /* @ts2dart_Provider */ { provide: DynamicComponentLoader, useClass: DynamicComponentLoader_ }
21
+ /* @ts2dart_Provider */ { provide: DynamicComponentLoader, useClass: DynamicComponentLoader_ },
21
22
  ];
22
23
  //# sourceMappingURL=application_common_providers.js.map