@angular/core 7.0.0-rc.1 → 7.0.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 (337) hide show
  1. package/bundles/core-testing.umd.js +36 -33
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +3 -3
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +1856 -1463
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +155 -94
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.d.ts +7 -6
  10. package/core.metadata.json +1 -1
  11. package/esm2015/core.externs.js +0 -3
  12. package/esm2015/core.js +6 -6
  13. package/esm2015/index.js +2 -2
  14. package/esm2015/public_api.js +2 -2
  15. package/esm2015/src/application_init.js +5 -1
  16. package/esm2015/src/application_module.js +2 -2
  17. package/esm2015/src/application_ref.js +11 -9
  18. package/esm2015/src/application_tokens.js +7 -7
  19. package/esm2015/src/change_detection/change_detection_util.js +3 -1
  20. package/esm2015/src/change_detection/change_detector_ref.js +2 -1
  21. package/esm2015/src/change_detection/constants.js +1 -1
  22. package/esm2015/src/change_detection/differs/default_iterable_differ.js +2 -1
  23. package/esm2015/src/change_detection/differs/iterable_differs.js +8 -6
  24. package/esm2015/src/change_detection/differs/keyvalue_differs.js +6 -5
  25. package/esm2015/src/change_detection/pipe_transform.js +2 -2
  26. package/esm2015/src/core.js +2 -2
  27. package/esm2015/src/core_render3_private_export.js +5 -4
  28. package/esm2015/src/debug/debug_node.js +6 -6
  29. package/esm2015/src/di/defs.js +5 -5
  30. package/esm2015/src/di/forward_ref.js +4 -4
  31. package/esm2015/src/di/injectable.js +5 -2
  32. package/esm2015/src/di/injection_token.js +3 -1
  33. package/esm2015/src/di/injector.js +3 -3
  34. package/esm2015/src/di/metadata.js +16 -1
  35. package/esm2015/src/di/provider.js +16 -6
  36. package/esm2015/src/di/r3_injector.js +2 -2
  37. package/esm2015/src/di/reflective_injector.js +2 -2
  38. package/esm2015/src/di/reflective_key.js +3 -1
  39. package/esm2015/src/di/reflective_provider.js +3 -3
  40. package/esm2015/src/error_handler.js +3 -1
  41. package/esm2015/src/event_emitter.js +2 -1
  42. package/esm2015/src/i18n/tokens.js +4 -4
  43. package/esm2015/src/is_dev_mode.js +4 -2
  44. package/esm2015/src/ivy_switch/runtime/index.js +2 -2
  45. package/esm2015/src/ivy_switch/runtime/ivy_switch_on.js +4 -2
  46. package/esm2015/src/ivy_switch/runtime/jit.js +2 -2
  47. package/esm2015/src/ivy_switch/runtime/legacy.js +7 -1
  48. package/esm2015/src/ivy_switch/runtime/local.js +2 -2
  49. package/esm2015/src/linker/compiler.js +5 -4
  50. package/esm2015/src/linker/component_factory.js +4 -2
  51. package/esm2015/src/linker/component_factory_resolver.js +2 -1
  52. package/esm2015/src/linker/element_ref.js +2 -2
  53. package/esm2015/src/linker/ng_module_factory.js +3 -3
  54. package/esm2015/src/linker/ng_module_factory_loader.js +4 -3
  55. package/esm2015/src/linker/query_list.js +3 -1
  56. package/esm2015/src/linker/system_js_ng_module_factory_loader.js +3 -3
  57. package/esm2015/src/linker/template_ref.js +2 -1
  58. package/esm2015/src/linker/view_container_ref.js +2 -1
  59. package/esm2015/src/linker/view_ref.js +4 -2
  60. package/esm2015/src/metadata/di.js +13 -5
  61. package/esm2015/src/metadata/directives.js +20 -7
  62. package/esm2015/src/metadata/lifecycle_hooks.js +10 -5
  63. package/esm2015/src/metadata/ng_module.js +8 -6
  64. package/esm2015/src/metadata/view.js +1 -1
  65. package/esm2015/src/platform_core_providers.js +2 -2
  66. package/esm2015/src/profile/profile.js +5 -5
  67. package/esm2015/src/profile/wtf_impl.js +2 -2
  68. package/esm2015/src/r3_symbols.js +1 -1
  69. package/esm2015/src/reflection/reflection_capabilities.js +3 -3
  70. package/esm2015/src/render/api.js +20 -7
  71. package/esm2015/src/render3/component.js +52 -18
  72. package/esm2015/src/render3/component_ref.js +15 -15
  73. package/esm2015/src/render3/context_discovery.js +35 -126
  74. package/esm2015/src/render3/debug.js +33 -56
  75. package/esm2015/src/render3/definition.js +42 -37
  76. package/esm2015/src/render3/di.js +4 -28
  77. package/esm2015/src/render3/discovery_utils.js +10 -7
  78. package/esm2015/src/render3/i18n.js +60 -34
  79. package/esm2015/src/render3/index.js +3 -3
  80. package/esm2015/src/render3/instructions.js +162 -275
  81. package/esm2015/src/render3/interfaces/container.js +7 -5
  82. package/esm2015/src/render3/interfaces/context.js +60 -0
  83. package/esm2015/src/render3/interfaces/definition.js +7 -1
  84. package/esm2015/src/render3/interfaces/i18n.js +338 -0
  85. package/esm2015/src/render3/interfaces/node.js +12 -126
  86. package/esm2015/src/render3/interfaces/player.js +73 -1
  87. package/esm2015/src/render3/interfaces/styling.js +18 -22
  88. package/esm2015/src/render3/interfaces/view.js +19 -26
  89. package/esm2015/src/render3/jit/compiler_facade.js +22 -0
  90. package/esm2015/src/render3/jit/compiler_facade_interface.js +229 -0
  91. package/esm2015/src/render3/jit/directive.js +57 -93
  92. package/esm2015/src/render3/jit/environment.js +7 -3
  93. package/esm2015/src/render3/jit/injectable.js +21 -46
  94. package/esm2015/src/render3/jit/module.js +16 -43
  95. package/esm2015/src/render3/jit/pipe.js +6 -12
  96. package/esm2015/src/render3/jit/util.js +14 -17
  97. package/esm2015/src/render3/node_assert.js +1 -1
  98. package/esm2015/src/render3/node_manipulation.js +99 -109
  99. package/esm2015/src/render3/players.js +67 -0
  100. package/esm2015/src/render3/styling/class_and_style_bindings.js +347 -88
  101. package/esm2015/src/render3/styling/core_player_handler.js +2 -2
  102. package/esm2015/src/render3/styling/player_factory.js +48 -0
  103. package/esm2015/src/render3/styling/util.js +165 -17
  104. package/esm2015/src/render3/util.js +73 -20
  105. package/esm2015/src/render3/view_engine_compatibility.js +56 -40
  106. package/esm2015/src/sanitization/security.js +2 -2
  107. package/esm2015/src/testability/testability.js +5 -6
  108. package/esm2015/src/type.js +5 -2
  109. package/esm2015/src/util/decorators.js +2 -1
  110. package/esm2015/src/util.js +15 -1
  111. package/esm2015/src/version.js +6 -4
  112. package/esm2015/src/view/refs.js +3 -3
  113. package/esm2015/src/view/services.js +8 -6
  114. package/esm2015/src/zone/ng_zone.js +2 -2
  115. package/esm2015/testing/src/async.js +2 -2
  116. package/esm2015/testing/src/component_fixture.js +2 -2
  117. package/esm2015/testing/src/fake_async.js +7 -7
  118. package/esm2015/testing/src/fake_async_fallback.js +7 -7
  119. package/esm2015/testing/src/metadata_override.js +1 -1
  120. package/esm2015/testing/src/r3_test_bed.js +8 -6
  121. package/esm2015/testing/src/test_bed.js +10 -8
  122. package/esm2015/testing/src/test_bed_common.js +6 -6
  123. package/esm2015/testing/src/test_compiler.js +3 -3
  124. package/esm5/core.js +6 -6
  125. package/esm5/src/application_init.js +5 -1
  126. package/esm5/src/application_module.js +2 -2
  127. package/esm5/src/application_ref.js +11 -9
  128. package/esm5/src/application_tokens.js +7 -7
  129. package/esm5/src/change_detection/change_detection_util.js +3 -1
  130. package/esm5/src/change_detection/change_detector_ref.js +2 -1
  131. package/esm5/src/change_detection/constants.js +2 -1
  132. package/esm5/src/change_detection/differs/default_iterable_differ.js +2 -1
  133. package/esm5/src/change_detection/differs/iterable_differs.js +2 -1
  134. package/esm5/src/change_detection/differs/keyvalue_differs.js +2 -1
  135. package/esm5/src/change_detection/pipe_transform.js +1 -1
  136. package/esm5/src/core_render3_private_export.js +5 -4
  137. package/esm5/src/debug/debug_node.js +5 -5
  138. package/esm5/src/di/defs.js +3 -3
  139. package/esm5/src/di/forward_ref.js +3 -3
  140. package/esm5/src/di/injectable.js +6 -5
  141. package/esm5/src/di/injection_token.js +3 -1
  142. package/esm5/src/di/injector.js +3 -3
  143. package/esm5/src/di/metadata.js +6 -1
  144. package/esm5/src/di/provider.js +1 -1
  145. package/esm5/src/di/r3_injector.js +2 -2
  146. package/esm5/src/di/reflective_injector.js +2 -2
  147. package/esm5/src/di/reflective_key.js +3 -1
  148. package/esm5/src/di/reflective_provider.js +2 -2
  149. package/esm5/src/error_handler.js +3 -1
  150. package/esm5/src/event_emitter.js +2 -1
  151. package/esm5/src/i18n/tokens.js +5 -5
  152. package/esm5/src/is_dev_mode.js +4 -2
  153. package/esm5/src/ivy_switch/runtime/ivy_switch_on.js +3 -2
  154. package/esm5/src/ivy_switch/runtime/legacy.js +4 -1
  155. package/esm5/src/linker/compiler.js +5 -4
  156. package/esm5/src/linker/component_factory.js +5 -1
  157. package/esm5/src/linker/component_factory_resolver.js +4 -1
  158. package/esm5/src/linker/element_ref.js +2 -2
  159. package/esm5/src/linker/ng_module_factory.js +3 -3
  160. package/esm5/src/linker/ng_module_factory_loader.js +4 -3
  161. package/esm5/src/linker/query_list.js +3 -1
  162. package/esm5/src/linker/system_js_ng_module_factory_loader.js +3 -3
  163. package/esm5/src/linker/template_ref.js +2 -1
  164. package/esm5/src/linker/view_container_ref.js +2 -1
  165. package/esm5/src/linker/view_ref.js +4 -2
  166. package/esm5/src/metadata/di.js +10 -3
  167. package/esm5/src/metadata/directives.js +9 -6
  168. package/esm5/src/metadata/lifecycle_hooks.js +1 -1
  169. package/esm5/src/metadata/ng_module.js +4 -3
  170. package/esm5/src/metadata/view.js +4 -1
  171. package/esm5/src/platform_core_providers.js +2 -2
  172. package/esm5/src/profile/profile.js +5 -5
  173. package/esm5/src/profile/wtf_impl.js +1 -1
  174. package/esm5/src/r3_symbols.js +1 -1
  175. package/esm5/src/reflection/reflection_capabilities.js +3 -3
  176. package/esm5/src/render/api.js +11 -5
  177. package/esm5/src/render3/component.js +45 -16
  178. package/esm5/src/render3/component_ref.js +12 -13
  179. package/esm5/src/render3/context_discovery.js +33 -65
  180. package/esm5/src/render3/debug.js +31 -50
  181. package/esm5/src/render3/definition.js +35 -31
  182. package/esm5/src/render3/di.js +4 -20
  183. package/esm5/src/render3/discovery_utils.js +12 -7
  184. package/esm5/src/render3/i18n.js +40 -30
  185. package/esm5/src/render3/index.js +3 -3
  186. package/esm5/src/render3/instructions.js +143 -230
  187. package/esm5/src/render3/interfaces/container.js +6 -5
  188. package/esm5/src/render3/interfaces/context.js +13 -0
  189. package/esm5/src/render3/interfaces/definition.js +1 -1
  190. package/esm5/src/render3/interfaces/i18n.js +25 -0
  191. package/esm5/src/render3/interfaces/node.js +1 -1
  192. package/esm5/src/render3/interfaces/player.js +1 -1
  193. package/esm5/src/render3/interfaces/styling.js +1 -8
  194. package/esm5/src/render3/interfaces/view.js +18 -17
  195. package/esm5/src/render3/jit/compiler_facade.js +21 -0
  196. package/esm5/src/render3/jit/compiler_facade_interface.js +15 -0
  197. package/esm5/src/render3/jit/directive.js +44 -79
  198. package/esm5/src/render3/jit/environment.js +7 -3
  199. package/esm5/src/render3/jit/injectable.js +26 -46
  200. package/esm5/src/render3/jit/module.js +16 -31
  201. package/esm5/src/render3/jit/pipe.js +6 -9
  202. package/esm5/src/render3/jit/util.js +12 -17
  203. package/esm5/src/render3/node_assert.js +1 -1
  204. package/esm5/src/render3/node_manipulation.js +89 -101
  205. package/esm5/src/render3/players.js +59 -0
  206. package/esm5/src/render3/styling/class_and_style_bindings.js +248 -85
  207. package/esm5/src/render3/styling/core_player_handler.js +2 -2
  208. package/esm5/src/render3/styling/player_factory.js +29 -0
  209. package/esm5/src/render3/styling/util.js +132 -14
  210. package/esm5/src/render3/util.js +54 -21
  211. package/esm5/src/render3/view_engine_compatibility.js +46 -32
  212. package/esm5/src/sanitization/security.js +3 -3
  213. package/esm5/src/testability/testability.js +4 -4
  214. package/esm5/src/type.js +2 -2
  215. package/esm5/src/util/decorators.js +1 -1
  216. package/esm5/src/util.js +13 -1
  217. package/esm5/src/version.js +6 -3
  218. package/esm5/src/view/refs.js +1 -1
  219. package/esm5/src/view/services.js +7 -10
  220. package/esm5/src/zone/ng_zone.js +2 -2
  221. package/esm5/testing/src/async.js +2 -2
  222. package/esm5/testing/src/component_fixture.js +2 -2
  223. package/esm5/testing/src/fake_async.js +7 -7
  224. package/esm5/testing/src/fake_async_fallback.js +7 -7
  225. package/esm5/testing/src/metadata_override.js +1 -1
  226. package/esm5/testing/src/r3_test_bed.js +8 -7
  227. package/esm5/testing/src/test_bed.js +10 -8
  228. package/esm5/testing/src/test_bed_common.js +4 -4
  229. package/esm5/testing/src/test_compiler.js +3 -3
  230. package/fesm2015/core.js +2486 -1951
  231. package/fesm2015/core.js.map +1 -1
  232. package/fesm2015/testing.js +36 -32
  233. package/fesm2015/testing.js.map +1 -1
  234. package/fesm5/core.js +1830 -1439
  235. package/fesm5/core.js.map +1 -1
  236. package/fesm5/testing.js +36 -33
  237. package/fesm5/testing.js.map +1 -1
  238. package/package.json +1 -2
  239. package/src/application_init.d.ts +4 -0
  240. package/src/application_module.d.ts +1 -1
  241. package/src/application_ref.d.ts +10 -8
  242. package/src/application_tokens.d.ts +6 -6
  243. package/src/change_detection/change_detection_util.d.ts +2 -0
  244. package/src/change_detection/change_detector_ref.d.ts +1 -0
  245. package/src/change_detection/constants.d.ts +1 -0
  246. package/src/change_detection/differs/default_iterable_differ.d.ts +1 -0
  247. package/src/change_detection/differs/iterable_differs.d.ts +8 -6
  248. package/src/change_detection/differs/keyvalue_differs.d.ts +5 -4
  249. package/src/change_detection/pipe_transform.d.ts +1 -1
  250. package/src/core_render3_private_export.d.ts +7 -5
  251. package/src/debug/debug_node.d.ts +5 -5
  252. package/src/di/defs.d.ts +4 -4
  253. package/src/di/forward_ref.d.ts +3 -3
  254. package/src/di/injectable.d.ts +10 -7
  255. package/src/di/injection_token.d.ts +2 -0
  256. package/src/di/injector.d.ts +5 -3
  257. package/src/di/metadata.d.ts +24 -1
  258. package/src/di/provider.d.ts +19 -5
  259. package/src/di/r3_injector.d.ts +1 -1
  260. package/src/di/reflective_injector.d.ts +1 -1
  261. package/src/di/reflective_key.d.ts +2 -0
  262. package/src/di/reflective_provider.d.ts +2 -2
  263. package/src/error_handler.d.ts +2 -0
  264. package/src/event_emitter.d.ts +1 -0
  265. package/src/i18n/tokens.d.ts +4 -4
  266. package/src/is_dev_mode.d.ts +3 -1
  267. package/src/ivy_switch/runtime/ivy_switch_on.d.ts +2 -1
  268. package/src/ivy_switch/runtime/legacy.d.ts +3 -0
  269. package/src/linker/compiler.d.ts +5 -4
  270. package/src/linker/component_factory.d.ts +5 -1
  271. package/src/linker/component_factory_resolver.d.ts +3 -0
  272. package/src/linker/element_ref.d.ts +1 -1
  273. package/src/linker/ng_module_factory.d.ts +2 -2
  274. package/src/linker/ng_module_factory_loader.d.ts +3 -2
  275. package/src/linker/query_list.d.ts +2 -0
  276. package/src/linker/system_js_ng_module_factory_loader.d.ts +2 -2
  277. package/src/linker/template_ref.d.ts +1 -0
  278. package/src/linker/view_container_ref.d.ts +1 -0
  279. package/src/linker/view_ref.d.ts +3 -1
  280. package/src/metadata/di.d.ts +13 -5
  281. package/src/metadata/directives.d.ts +19 -6
  282. package/src/metadata/lifecycle_hooks.d.ts +9 -4
  283. package/src/metadata/ng_module.d.ts +7 -7
  284. package/src/metadata/view.d.ts +3 -0
  285. package/src/platform_core_providers.d.ts +1 -1
  286. package/src/profile/profile.d.ts +4 -4
  287. package/src/profile/wtf_impl.d.ts +1 -1
  288. package/src/r3_symbols.d.ts +1 -1
  289. package/src/render/api.d.ts +10 -7
  290. package/src/render3/component.d.ts +14 -3
  291. package/src/render3/context_discovery.d.ts +6 -58
  292. package/src/render3/definition.d.ts +0 -4
  293. package/src/render3/di.d.ts +1 -3
  294. package/src/render3/discovery_utils.d.ts +7 -1
  295. package/src/render3/i18n.d.ts +4 -0
  296. package/src/render3/index.d.ts +2 -2
  297. package/src/render3/instructions.d.ts +43 -50
  298. package/src/render3/interfaces/container.d.ts +36 -22
  299. package/src/render3/interfaces/context.d.ts +52 -0
  300. package/src/render3/interfaces/definition.d.ts +8 -3
  301. package/src/render3/interfaces/i18n.d.ts +326 -0
  302. package/src/render3/interfaces/node.d.ts +12 -89
  303. package/src/render3/interfaces/player.d.ts +58 -4
  304. package/src/render3/interfaces/styling.d.ts +17 -15
  305. package/src/render3/interfaces/view.d.ts +28 -28
  306. package/src/render3/jit/compiler_facade.d.ts +3 -0
  307. package/src/render3/jit/compiler_facade_interface.d.ts +131 -0
  308. package/src/render3/jit/directive.d.ts +3 -0
  309. package/src/render3/jit/util.d.ts +3 -3
  310. package/src/render3/node_manipulation.d.ts +21 -22
  311. package/src/render3/players.d.ts +32 -0
  312. package/src/render3/styling/class_and_style_bindings.d.ts +31 -24
  313. package/src/render3/styling/player_factory.d.ts +31 -0
  314. package/src/render3/styling/util.d.ts +31 -9
  315. package/src/render3/util.d.ts +32 -15
  316. package/src/render3/view_engine_compatibility.d.ts +3 -0
  317. package/src/sanitization/security.d.ts +2 -2
  318. package/src/testability/testability.d.ts +5 -6
  319. package/src/type.d.ts +6 -1
  320. package/src/util/decorators.d.ts +1 -0
  321. package/src/util.d.ts +10 -0
  322. package/src/version.d.ts +4 -1
  323. package/src/view/services.d.ts +2 -2
  324. package/src/zone/ng_zone.d.ts +1 -1
  325. package/testing/src/async.d.ts +1 -1
  326. package/testing/src/component_fixture.d.ts +1 -1
  327. package/testing/src/fake_async.d.ts +6 -6
  328. package/testing/src/fake_async_fallback.d.ts +6 -6
  329. package/testing/src/metadata_override.d.ts +1 -1
  330. package/testing/src/r3_test_bed.d.ts +4 -4
  331. package/testing/src/test_bed.d.ts +12 -10
  332. package/testing/src/test_bed_common.d.ts +6 -6
  333. package/testing/src/test_compiler.d.ts +2 -2
  334. package/testing/testing.metadata.json +1 -1
  335. package/esm2015/src/render3/player.js +0 -51
  336. package/esm5/src/render3/player.js +0 -39
  337. package/src/render3/player.d.ts +0 -3
@@ -11,11 +11,12 @@ import { Sanitizer } from '../sanitization/security';
11
11
  import { StyleSanitizeFn } from '../sanitization/style_sanitizer';
12
12
  import { LContainer } from './interfaces/container';
13
13
  import { ComponentDef, ComponentQuery, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, InitialStylingFlags, PipeDefListOrFactory, RenderFlags } from './interfaces/definition';
14
- import { LContainerNode, LElementNode, LNode, LProjectionNode, LTextNode, LViewNode, LocalRefExtractor, TAttributes, TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, TProjectionNode, TViewNode } from './interfaces/node';
14
+ import { LocalRefExtractor, TAttributes, TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, TProjectionNode, TViewNode } from './interfaces/node';
15
+ import { PlayerFactory } from './interfaces/player';
15
16
  import { CssSelectorList } from './interfaces/projection';
16
17
  import { LQueries } from './interfaces/query';
17
- import { RComment, RElement, RText, Renderer3, RendererFactory3 } from './interfaces/renderer';
18
- import { CurrentMatchesList, LViewData, LViewFlags, OpaqueViewState, RootContext, TView } from './interfaces/view';
18
+ import { RComment, RElement, RNode, RText, Renderer3, RendererFactory3 } from './interfaces/renderer';
19
+ import { CurrentMatchesList, LViewData, LViewFlags, OpaqueViewState, RootContext, RootContextFlags, TView } from './interfaces/view';
19
20
  /**
20
21
  * Function used to sanitize the value before writing it into the renderer.
21
22
  */
@@ -48,7 +49,6 @@ export declare function getCurrentView(): OpaqueViewState;
48
49
  * @param viewToRestore The OpaqueViewState instance to restore.
49
50
  */
50
51
  export declare function restoreView(viewToRestore: OpaqueViewState): void;
51
- export declare function getPreviousOrParentNode(): LNode | null;
52
52
  export declare function getPreviousOrParentTNode(): TNode;
53
53
  export declare function setEnvironment(tNode: TNode, view: LViewData): void;
54
54
  /**
@@ -96,30 +96,22 @@ export declare function setHostBindings(): void;
96
96
  export declare function executeInitAndContentHooks(): void;
97
97
  export declare function createLViewData<T>(renderer: Renderer3, tView: TView, context: T | null, flags: LViewFlags, sanitizer?: Sanitizer | null): LViewData;
98
98
  /**
99
- * Creation of LNode object is extracted to a separate function so we always create LNode object
100
- * with the same shape
101
- * (same properties assigned in the same order).
102
- */
103
- export declare function createLNodeObject(type: TNodeType, native: RText | RElement | RComment | null, state: any): LElementNode & LTextNode & LViewNode & LContainerNode & LProjectionNode;
104
- /**
105
- * A common way of creating the LNode to make sure that all of them have same shape to
106
- * keep the execution code monomorphic and fast.
99
+ * Create and stores the TNode, and hooks it up to the tree.
107
100
  *
108
- * @param index The index at which the LNode should be saved (null if view, since they are not
101
+ * @param index The index at which the TNode should be saved (null if view, since they are not
109
102
  * saved).
110
- * @param type The type of LNode to create
111
- * @param native The native element for this LNode, if applicable
103
+ * @param type The type of TNode to create
104
+ * @param native The native element for this node, if applicable
112
105
  * @param name The tag name of the associated native element, if applicable
113
106
  * @param attrs Any attrs for the native element, if applicable
114
- * @param data Any data that should be saved on the LNode
115
107
  */
116
- export declare function createNodeAtIndex(index: number, type: TNodeType.Element, native: RElement | RText | null, name: string | null, attrs: TAttributes | null, lViewData?: LViewData | null): TElementNode;
117
- export declare function createNodeAtIndex(index: number, type: TNodeType.View, native: null, name: null, attrs: null, lViewData: LViewData): TViewNode;
118
- export declare function createNodeAtIndex(index: number, type: TNodeType.Container, native: RComment, name: string | null, attrs: TAttributes | null, lContainer: LContainer): TContainerNode;
119
- export declare function createNodeAtIndex(index: number, type: TNodeType.Projection, native: null, name: null, attrs: TAttributes | null, lProjection: null): TProjectionNode;
120
- export declare function createNodeAtIndex(index: number, type: TNodeType.ElementContainer, native: RComment, name: null, attrs: TAttributes | null, data: null): TElementContainerNode;
108
+ export declare function createNodeAtIndex(index: number, type: TNodeType.Element, native: RElement | RText | null, name: string | null, attrs: TAttributes | null): TElementNode;
109
+ export declare function createNodeAtIndex(index: number, type: TNodeType.Container, native: RComment, name: string | null, attrs: TAttributes | null): TContainerNode;
110
+ export declare function createNodeAtIndex(index: number, type: TNodeType.Projection, native: null, name: null, attrs: TAttributes | null): TProjectionNode;
111
+ export declare function createNodeAtIndex(index: number, type: TNodeType.ElementContainer, native: RComment, name: null, attrs: TAttributes | null): TElementContainerNode;
112
+ export declare function createViewNode(index: number, view: LViewData): TViewNode;
121
113
  /**
122
- * When LNodes are created dynamically after a view blueprint is created (e.g. through
114
+ * When elements are created dynamically after a view blueprint is created (e.g. through
123
115
  * i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future
124
116
  * template passes.
125
117
  */
@@ -139,7 +131,7 @@ export declare function resetComponentState(): void;
139
131
  * @param directives Directive defs that should be used for matching
140
132
  * @param pipes Pipe defs that should be used for matching
141
133
  */
142
- export declare function renderTemplate<T>(hostNode: RElement, templateFn: ComponentTemplate<T>, consts: number, vars: number, context: T, providedRendererFactory: RendererFactory3, host: LElementNode | null, directives?: DirectiveDefListOrFactory | null, pipes?: PipeDefListOrFactory | null, sanitizer?: Sanitizer | null): LElementNode;
134
+ export declare function renderTemplate<T>(hostNode: RElement, templateFn: ComponentTemplate<T>, consts: number, vars: number, context: T, providedRendererFactory: RendererFactory3, hostView: LViewData | null, directives?: DirectiveDefListOrFactory | null, pipes?: PipeDefListOrFactory | null, sanitizer?: Sanitizer | null): LViewData;
143
135
  /**
144
136
  * Used for creating the LViewNode of a dynamic embedded view,
145
137
  * either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().
@@ -226,6 +218,18 @@ export declare function resolveDirective(def: DirectiveDef<any>, valueIndex: num
226
218
  /** Stores index of directive and host element so it will be queued for binding refresh during CD.
227
219
  */
228
220
  export declare function queueHostBindingForCheck(dirIndex: number, def: DirectiveDef<any> | ComponentDef<any>): void;
221
+ /**
222
+ * Gets TView from a template function or creates a new TView
223
+ * if it doesn't already exist.
224
+ *
225
+ * @param templateFn The template from which to get static data
226
+ * @param consts The number of nodes, local refs, and pipes in this view
227
+ * @param vars The number of bindings and pure function bindings in this view
228
+ * @param directives Directive defs that should be saved on TView
229
+ * @param pipes Pipe defs that should be saved on TView
230
+ * @returns TView
231
+ */
232
+ export declare function getOrCreateTView(templateFn: ComponentTemplate<any>, consts: number, vars: number, directives: DirectiveDefListOrFactory | null, pipes: PipeDefListOrFactory | null, viewQuery: ComponentQuery<any> | null): TView;
229
233
  /**
230
234
  * Creates a TView instance
231
235
  *
@@ -243,15 +247,6 @@ export declare function createError(text: string, token: any): Error;
243
247
  * @param elementOrSelector Render element or CSS selector to locate the element.
244
248
  */
245
249
  export declare function locateHostElement(factory: RendererFactory3, elementOrSelector: RElement | string): RElement | null;
246
- /**
247
- * Creates the host LNode.
248
- *
249
- * @param rNode Render host element.
250
- * @param def ComponentDef
251
- *
252
- * @returns LElementNode created
253
- */
254
- export declare function hostElement(tag: string, rNode: RElement | null, def: ComponentDef<any>, sanitizer?: Sanitizer | null): LElementNode;
255
250
  /**
256
251
  * Adds an event listener to the current node.
257
252
  *
@@ -349,11 +344,10 @@ export declare function disableBindings(): void;
349
344
  * @param adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET
350
345
  * @param tagName The tag name of the node
351
346
  * @param attrs The attributes defined on this node
352
- * @param parent The parent of this node
353
347
  * @param tViews Any TViews attached to this node
354
348
  * @returns the TNode object
355
349
  */
356
- export declare function createTNode(type: TNodeType, adjustedIndex: number, tagName: string | null, attrs: TAttributes | null, parent: TElementNode | TContainerNode | null, tViews: TView[] | null): TNode;
350
+ export declare function createTNode(type: TNodeType, adjustedIndex: number, tagName: string | null, attrs: TAttributes | null, tViews: TView[] | null): TNode;
357
351
  /**
358
352
  * Add or remove a class in a `classList` on a DOM element.
359
353
  *
@@ -364,7 +358,7 @@ export declare function createTNode(type: TNodeType, adjustedIndex: number, tagN
364
358
  * renaming as part of minification.
365
359
  * @param value A value indicating if a given class should be added or removed.
366
360
  */
367
- export declare function elementClassProp<T>(index: number, stylingIndex: number, value: T | NO_CHANGE): void;
361
+ export declare function elementClassProp(index: number, stylingIndex: number, value: boolean | PlayerFactory): void;
368
362
  /**
369
363
  * Assign any inline style values to the element during creation mode.
370
364
  *
@@ -393,7 +387,7 @@ export declare function elementClassProp<T>(index: number, stylingIndex: number,
393
387
  * @param styleSanitizer An optional sanitizer function that will be used (if provided)
394
388
  * to sanitize the any CSS property values that are applied to the element (during rendering).
395
389
  */
396
- export declare function elementStyling<T>(classDeclarations?: (string | boolean | InitialStylingFlags)[] | null, styleDeclarations?: (string | boolean | InitialStylingFlags)[] | null, styleSanitizer?: StyleSanitizeFn | null): void;
390
+ export declare function elementStyling(classDeclarations?: (string | boolean | InitialStylingFlags)[] | null, styleDeclarations?: (string | boolean | InitialStylingFlags)[] | null, styleSanitizer?: StyleSanitizeFn | null): void;
397
391
  /**
398
392
  * Apply all styling values to the element which have been queued by any styling instructions.
399
393
  *
@@ -408,7 +402,7 @@ export declare function elementStyling<T>(classDeclarations?: (string | boolean
408
402
  * specifically for element styling--the index must be the next index after the element
409
403
  * index.)
410
404
  */
411
- export declare function elementStylingApply<T>(index: number): void;
405
+ export declare function elementStylingApply(index: number): void;
412
406
  /**
413
407
  * Queue a given style to be rendered on an Element.
414
408
  *
@@ -424,14 +418,12 @@ export declare function elementStylingApply<T>(index: number): void;
424
418
  * specifically for element styling--the index must be the next index after the element
425
419
  * index.)
426
420
  * @param styleIndex Index of the style property on this element. (Monotonically increasing.)
427
- * @param styleName Name of property. Because it is going to DOM this is not subject to
428
- * renaming as part of minification.
429
421
  * @param value New value to write (null to remove).
430
422
  * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
431
423
  * Note that when a suffix is provided then the underlying sanitizer will
432
424
  * be ignored.
433
425
  */
434
- export declare function elementStyleProp<T>(index: number, styleIndex: number, value: T | null, suffix?: string): void;
426
+ export declare function elementStyleProp(index: number, styleIndex: number, value: string | number | String | PlayerFactory | null, suffix?: string): void;
435
427
  /**
436
428
  * Queue a key/value map of styles to be rendered on an Element.
437
429
  *
@@ -489,17 +481,20 @@ export declare function directiveCreate<T>(directiveDefIdx: number, directive: T
489
481
  * This version does not contain features that we don't already support at root in
490
482
  * current Angular. Example: local refs and inputs on root component.
491
483
  */
492
- export declare function baseDirectiveCreate<T>(index: number, directive: T, directiveDef: DirectiveDef<T> | ComponentDef<T>, hostNode: LNode): T;
484
+ export declare function baseDirectiveCreate<T>(index: number, directive: T, directiveDef: DirectiveDef<T> | ComponentDef<T>, native: RNode | null): T;
493
485
  /**
494
486
  * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
495
487
  *
488
+ * @param hostNative The host element for the LContainer
489
+ * @param hostTNode The host TNode for the LContainer
496
490
  * @param currentView The parent view of the LContainer
491
+ * @param native The native comment element
497
492
  * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case
498
493
  * @returns LContainer
499
494
  */
500
- export declare function createLContainer(currentView: LViewData, isForViewContainerRef?: boolean): LContainer;
495
+ export declare function createLContainer(hostNative: RElement | RComment, hostTNode: TElementNode | TContainerNode | TElementContainerNode, currentView: LViewData, native: RComment, isForViewContainerRef?: boolean): LContainer;
501
496
  /**
502
- * Creates an LContainerNode for an ng-template (dynamically-inserted view), e.g.
497
+ * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
503
498
  *
504
499
  * <ng-template #foo>
505
500
  * <div></div>
@@ -517,7 +512,7 @@ export declare function createLContainer(currentView: LViewData, isForViewContai
517
512
  */
518
513
  export declare function template(index: number, templateFn: ComponentTemplate<any> | null, consts: number, vars: number, tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null, localRefExtractor?: LocalRefExtractor): void;
519
514
  /**
520
- * Creates an LContainerNode for inline views, e.g.
515
+ * Creates an LContainer for inline views, e.g.
521
516
  *
522
517
  * % if (showing) {
523
518
  * <div></div>
@@ -533,9 +528,9 @@ export declare function container(index: number): void;
533
528
  */
534
529
  export declare function containerRefreshStart(index: number): void;
535
530
  /**
536
- * Marks the end of the LContainerNode.
531
+ * Marks the end of the LContainer.
537
532
  *
538
- * Marking the end of LContainerNode is the time when to child Views get inserted or removed.
533
+ * Marking the end of LContainer is the time when to child views get inserted or removed.
539
534
  */
540
535
  export declare function containerRefreshEnd(): void;
541
536
  /**
@@ -600,7 +595,7 @@ export declare function projection(nodeIndex: number, selectorIndex?: number, at
600
595
  */
601
596
  export declare function addToViewTree<T extends LViewData | LContainer>(currentView: LViewData, adjustedHostIndex: number, state: T): T;
602
597
  /** If node is an OnPush component, marks its LViewData dirty. */
603
- export declare function markDirtyIfOnPush(node: LElementNode): void;
598
+ export declare function markDirtyIfOnPush(viewIndex: number): void;
604
599
  /** Wraps an event listener with preventDefault behavior. */
605
600
  export declare function wrapListenerWithPreventDefault(listenerFn: (e?: any) => any): EventListener;
606
601
  /** Marks current view and all ancestors dirty */
@@ -616,7 +611,7 @@ export declare function markViewDirty(view: LViewData): void;
616
611
  * `scheduleTick` requests. The scheduling function can be overridden in
617
612
  * `renderComponent`'s `scheduler` option.
618
613
  */
619
- export declare function scheduleTick<T>(rootContext: RootContext): void;
614
+ export declare function scheduleTick<T>(rootContext: RootContext, flags: RootContextFlags): void;
620
615
  /**
621
616
  * Used to perform change detection on the whole application.
622
617
  *
@@ -744,8 +739,6 @@ export declare function reference<T>(index: number): T;
744
739
  export declare function loadQueryList<T>(queryListIdx: number): QueryList<T>;
745
740
  /** Retrieves a value from current `viewData`. */
746
741
  export declare function load<T>(index: number): T;
747
- export declare function loadElement(index: number): LElementNode;
748
- export declare function getTNode(index: number): TNode;
749
742
  /** Gets the current binding value. */
750
743
  export declare function getBinding(bindingIndex: number): any;
751
744
  /** Updates binding if changed, then returns whether it was updated. */
@@ -5,19 +5,21 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { LElementNode } from './node';
9
8
  import { LQueries } from './query';
10
- import { LViewData, NEXT, PARENT, QUERIES } from './view';
9
+ import { RComment, RElement } from './renderer';
10
+ import { StylingContext } from './styling';
11
+ import { HOST, LViewData, NEXT, PARENT, QUERIES } from './view';
11
12
  /**
12
13
  * Below are constants for LContainer indices to help us look up LContainer members
13
14
  * without having to remember the specific indices.
14
15
  * Uglify will inline these when minifying so there shouldn't be a cost.
15
16
  */
16
17
  export declare const ACTIVE_INDEX = 0;
17
- export declare const VIEWS = 4;
18
- export declare const RENDER_PARENT = 5;
18
+ export declare const VIEWS = 1;
19
+ export declare const NATIVE = 6;
20
+ export declare const RENDER_PARENT = 7;
19
21
  /**
20
- * The state associated with an LContainerNode.
22
+ * The state associated with a container.
21
23
  *
22
24
  * This is an array so that its structure is closer to LViewData. This helps
23
25
  * when traversing the view tree (which is a mix of containers and component
@@ -32,7 +34,15 @@ export interface LContainer extends Array<any> {
32
34
  * it is set to null to identify this scenario, as indices are "absolute" in that case,
33
35
  * i.e. provided directly by the user of the ViewContainerRef API.
34
36
  */
35
- [ACTIVE_INDEX]: number | null;
37
+ [ACTIVE_INDEX]: number;
38
+ /**
39
+ * A list of the container's currently active child views. Views will be inserted
40
+ * here as they are added and spliced from here when they are removed. We need
41
+ * to keep a record of current views so we know which views are already in the DOM
42
+ * (and don't need to be re-added) and so we can remove views from the DOM when they
43
+ * are no longer required.
44
+ */
45
+ [VIEWS]: LViewData[];
36
46
  /**
37
47
  * Access to the parent view is necessary so we can propagate back
38
48
  * up from inside a container to parent[NEXT].
@@ -49,33 +59,37 @@ export interface LContainer extends Array<any> {
49
59
  */
50
60
  [QUERIES]: LQueries | null;
51
61
  /**
52
- * A list of the container's currently active child views. Views will be inserted
53
- * here as they are added and spliced from here when they are removed. We need
54
- * to keep a record of current views so we know which views are already in the DOM
55
- * (and don't need to be re-added) and so we can remove views from the DOM when they
56
- * are no longer required.
62
+ * The host element of this LContainer.
63
+ *
64
+ * The host could be an LViewData if this container is on a component node.
65
+ * In that case, the component LViewData is its HOST.
66
+ *
67
+ * It could also be a styling context if this is a node with a style/class
68
+ * binding.
57
69
  */
58
- [VIEWS]: LViewData[];
70
+ [HOST]: RElement | RComment | StylingContext | LViewData;
71
+ /** The comment element that serves as an anchor for this LContainer. */
72
+ [NATIVE]: RComment;
59
73
  /**
60
- * Parent Element which will contain the location where all of the Views will be
74
+ * Parent Element which will contain the location where all of the views will be
61
75
  * inserted into to.
62
76
  *
63
77
  * If `renderParent` is `null` it is headless. This means that it is contained
64
- * in another `LViewNode` which in turn is contained in another `LContainerNode` and
78
+ * in another view which in turn is contained in another container and
65
79
  * therefore it does not yet have its own parent.
66
80
  *
67
81
  * If `renderParent` is not `null` then it may be:
68
- * - same as `LContainerNode.parent` in which case it is just a normal container.
69
- * - different from `LContainerNode.parent` in which case it has been re-projected.
70
- * In other words `LContainerNode.parent` is logical parent where as
71
- * `LContainer.projectedParent` is render parent.
82
+ * - same as `tContainerNode.parent` in which case it is just a normal container.
83
+ * - different from `tContainerNode.parent` in which case it has been re-projected.
84
+ * In other words `tContainerNode.parent` is logical parent where as
85
+ * `tContainerNode.projectedParent` is render parent.
72
86
  *
73
- * When views are inserted into `LContainerNode` then `renderParent` is:
74
- * - `null`, we are in `LViewNode` keep going up a hierarchy until actual
87
+ * When views are inserted into `LContainer` then `renderParent` is:
88
+ * - `null`, we are in a view, keep going up a hierarchy until actual
75
89
  * `renderParent` is found.
76
90
  * - not `null`, then use the `projectedParent.native` as the `RElement` to insert
77
- * `LViewNode`s into.
91
+ * views into.
78
92
  */
79
- [RENDER_PARENT]: LElementNode | null;
93
+ [RENDER_PARENT]: RElement | null;
80
94
  }
81
95
  export declare const unusedValueExportToPlacateAjd = 1;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { RElement } from './renderer';
9
+ import { LViewData } from './view';
10
+ /**
11
+ * This property will be monkey-patched on elements, components and directives
12
+ */
13
+ export declare const MONKEY_PATCH_KEY_NAME = "__ngContext__";
14
+ /**
15
+ * The internal view context which is specific to a given DOM element, directive or
16
+ * component instance. Each value in here (besides the LViewData and element node details)
17
+ * can be present, null or undefined. If undefined then it implies the value has not been
18
+ * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
19
+ *
20
+ * Each value will get filled when the respective value is examined within the getContext
21
+ * function. The component, element and each directive instance will share the same instance
22
+ * of the context.
23
+ */
24
+ export interface LContext {
25
+ /**
26
+ * The component's parent view data.
27
+ */
28
+ lViewData: LViewData;
29
+ /**
30
+ * The index instance of the node.
31
+ */
32
+ nodeIndex: number;
33
+ /**
34
+ * The instance of the DOM node that is attached to the lNode.
35
+ */
36
+ native: RElement;
37
+ /**
38
+ * The instance of the Component node.
39
+ */
40
+ component: {} | null | undefined;
41
+ /**
42
+ * The list of active directives that exist on this element.
43
+ */
44
+ directives: any[] | null | undefined;
45
+ /**
46
+ * The map of local references (local reference name => element or directive instance) that exist
47
+ * on this element.
48
+ */
49
+ localRefs: {
50
+ [key: string]: any;
51
+ } | null | undefined;
52
+ }
@@ -178,7 +178,7 @@ export interface ComponentDef<T> extends DirectiveDef<T> {
178
178
  /**
179
179
  * Runtime unique component ID.
180
180
  */
181
- id: string;
181
+ readonly id: string;
182
182
  /**
183
183
  * The View template of the component.
184
184
  */
@@ -193,14 +193,14 @@ export interface ComponentDef<T> extends DirectiveDef<T> {
193
193
  * Used to calculate the length of the component's LViewData array, so we
194
194
  * can pre-fill the array and set the binding start index.
195
195
  */
196
- consts: number;
196
+ readonly consts: number;
197
197
  /**
198
198
  * The number of bindings in this component template (including pure fn bindings).
199
199
  *
200
200
  * Used to calculate the length of the component's LViewData array, so we
201
201
  * can pre-fill the array and set the host binding start index.
202
202
  */
203
- vars: number;
203
+ readonly vars: number;
204
204
  /**
205
205
  * Query-related instructions for a component.
206
206
  */
@@ -248,6 +248,11 @@ export interface ComponentDef<T> extends DirectiveDef<T> {
248
248
  * `PipeDefs`s. The function is necessary to be able to support forward declarations.
249
249
  */
250
250
  pipeDefs: PipeDefListOrFactory | null;
251
+ /**
252
+ * Used to store the result of `noSideEffects` function so that it is not removed by closure
253
+ * compiler. The property should never be read.
254
+ */
255
+ readonly _?: never;
251
256
  }
252
257
  /**
253
258
  * Runtime link information for Pipes.