@angular/core 7.2.0-beta.0 → 7.2.0

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 (454) hide show
  1. package/bundles/core-testing.umd.js +194 -128
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +10 -10
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +5582 -4512
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +122 -129
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.d.ts +12 -12
  10. package/core.metadata.json +1 -1
  11. package/esm2015/core.externs.js +45 -35
  12. package/esm2015/core.js +12 -13
  13. package/esm2015/index.js +3 -4
  14. package/esm2015/public_api.js +3 -5
  15. package/esm2015/src/application_init.js +22 -10
  16. package/esm2015/src/application_module.js +6 -5
  17. package/esm2015/src/application_ref.js +94 -37
  18. package/esm2015/src/application_tokens.js +21 -16
  19. package/esm2015/src/change_detection/change_detection.js +8 -7
  20. package/esm2015/src/change_detection/change_detection_util.js +2 -4
  21. package/esm2015/src/change_detection/change_detector_ref.js +2 -3
  22. package/esm2015/src/change_detection/constants.js +30 -32
  23. package/esm2015/src/change_detection/differs/default_iterable_differ.js +108 -29
  24. package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +53 -16
  25. package/esm2015/src/change_detection/differs/iterable_differs.js +100 -90
  26. package/esm2015/src/change_detection/differs/keyvalue_differs.js +85 -73
  27. package/esm2015/src/change_detection/pipe_transform.js +10 -5
  28. package/esm2015/src/change_detection.js +7 -3
  29. package/esm2015/src/codegen_private_exports.js +2 -3
  30. package/esm2015/src/console.js +3 -3
  31. package/esm2015/src/core.js +3 -4
  32. package/esm2015/src/core_private_export.js +2 -3
  33. package/esm2015/src/core_render3_private_export.js +13 -7
  34. package/esm2015/src/debug/debug_node.js +132 -90
  35. package/esm2015/src/di/defs.js +59 -50
  36. package/esm2015/src/di/forward_ref.js +5 -6
  37. package/esm2015/src/di/injectable.js +11 -11
  38. package/esm2015/src/di/injection_token.js +10 -6
  39. package/esm2015/src/di/injector.js +53 -43
  40. package/esm2015/src/di/injector_compatibility.js +13 -12
  41. package/esm2015/src/di/metadata.js +22 -13
  42. package/esm2015/src/di/provider.js +137 -120
  43. package/esm2015/src/di/r3_injector.js +127 -57
  44. package/esm2015/src/di/reflective_errors.js +19 -13
  45. package/esm2015/src/di/reflective_injector.js +20 -16
  46. package/esm2015/src/di/reflective_key.js +7 -5
  47. package/esm2015/src/di/reflective_provider.js +21 -20
  48. package/esm2015/src/di/scope.js +5 -5
  49. package/esm2015/src/di/util.js +13 -14
  50. package/esm2015/src/di.js +2 -3
  51. package/esm2015/src/error_handler.js +5 -4
  52. package/esm2015/src/errors.js +7 -8
  53. package/esm2015/src/event_emitter.js +3 -3
  54. package/esm2015/src/i18n/tokens.js +12 -10
  55. package/esm2015/src/is_dev_mode.js +2 -3
  56. package/esm2015/src/ivy_switch.js +2 -3
  57. package/esm2015/src/linker/compiler.js +9 -12
  58. package/esm2015/src/linker/component_factory.js +2 -3
  59. package/esm2015/src/linker/component_factory_resolver.js +24 -10
  60. package/esm2015/src/linker/element_ref.js +5 -3
  61. package/esm2015/src/linker/ng_module_factory.js +6 -5
  62. package/esm2015/src/linker/ng_module_factory_loader.js +63 -16
  63. package/esm2015/src/linker/query_list.js +16 -14
  64. package/esm2015/src/linker/system_js_ng_module_factory_loader.js +12 -5
  65. package/esm2015/src/linker/template_ref.js +2 -3
  66. package/esm2015/src/linker/view_container_ref.js +2 -3
  67. package/esm2015/src/linker/view_ref.js +13 -7
  68. package/esm2015/src/linker.js +3 -3
  69. package/esm2015/src/metadata/di.js +22 -15
  70. package/esm2015/src/metadata/directives.js +33 -19
  71. package/esm2015/src/metadata/lifecycle_hooks.js +81 -66
  72. package/esm2015/src/metadata/ng_module.js +82 -68
  73. package/esm2015/src/metadata/resource_loading.js +4 -3
  74. package/esm2015/src/metadata/view.js +25 -26
  75. package/esm2015/src/metadata.js +6 -3
  76. package/esm2015/src/platform_core_providers.js +5 -5
  77. package/esm2015/src/profile/profile.js +17 -13
  78. package/esm2015/src/profile/wtf_impl.js +36 -16
  79. package/esm2015/src/r3_symbols.js +18 -5
  80. package/esm2015/src/reflection/platform_reflection_capabilities.js +81 -40
  81. package/esm2015/src/reflection/reflection.js +5 -5
  82. package/esm2015/src/reflection/reflection_capabilities.js +38 -27
  83. package/esm2015/src/reflection/reflector.js +2 -3
  84. package/esm2015/src/reflection/types.js +2 -12
  85. package/esm2015/src/render/api.js +67 -47
  86. package/esm2015/src/render.js +3 -3
  87. package/esm2015/src/render3/assert.js +38 -3
  88. package/esm2015/src/render3/bindings.js +111 -0
  89. package/esm2015/src/render3/component.js +88 -77
  90. package/esm2015/src/render3/component_ref.js +86 -56
  91. package/esm2015/src/render3/context_discovery.js +94 -92
  92. package/esm2015/src/render3/definition.js +58 -51
  93. package/esm2015/src/render3/di.js +206 -166
  94. package/esm2015/src/render3/di_setup.js +51 -31
  95. package/esm2015/src/render3/discovery_utils.js +225 -39
  96. package/esm2015/src/render3/empty.js +28 -0
  97. package/esm2015/src/render3/errors.js +11 -15
  98. package/esm2015/src/render3/features/inherit_definition_feature.js +13 -10
  99. package/esm2015/src/render3/features/ng_onchanges_feature.js +15 -12
  100. package/esm2015/src/render3/features/providers_feature.js +2 -3
  101. package/esm2015/src/render3/fields.js +5 -5
  102. package/esm2015/src/render3/global_utils.js +22 -7
  103. package/esm2015/src/render3/global_utils_api.js +13 -7
  104. package/esm2015/src/render3/hooks.js +21 -26
  105. package/esm2015/src/render3/i18n.js +134 -115
  106. package/esm2015/src/render3/index.js +15 -7
  107. package/esm2015/src/render3/instructions.js +938 -813
  108. package/esm2015/src/render3/interfaces/container.js +37 -6
  109. package/esm2015/src/render3/interfaces/context.js +39 -37
  110. package/esm2015/src/render3/interfaces/definition.js +225 -265
  111. package/esm2015/src/render3/interfaces/i18n.js +179 -151
  112. package/esm2015/src/render3/interfaces/injector.js +95 -13
  113. package/esm2015/src/render3/interfaces/node.js +413 -382
  114. package/esm2015/src/render3/interfaces/player.js +78 -37
  115. package/esm2015/src/render3/interfaces/projection.js +5 -10
  116. package/esm2015/src/render3/interfaces/query.js +66 -60
  117. package/esm2015/src/render3/interfaces/renderer.js +292 -117
  118. package/esm2015/src/render3/interfaces/sanitization.js +2 -6
  119. package/esm2015/src/render3/interfaces/styling.js +322 -111
  120. package/esm2015/src/render3/interfaces/view.js +356 -298
  121. package/esm2015/src/render3/jit/compiler_facade.js +10 -4
  122. package/esm2015/src/render3/jit/compiler_facade_interface.js +195 -152
  123. package/esm2015/src/render3/jit/directive.js +26 -16
  124. package/esm2015/src/render3/jit/environment.js +8 -5
  125. package/esm2015/src/render3/jit/injectable.js +7 -10
  126. package/esm2015/src/render3/jit/module.js +309 -25
  127. package/esm2015/src/render3/jit/pipe.js +2 -3
  128. package/esm2015/src/render3/jit/util.js +2 -3
  129. package/esm2015/src/render3/metadata.js +11 -10
  130. package/esm2015/src/render3/ng_dev_mode.js +5 -6
  131. package/esm2015/src/render3/ng_module_ref.js +48 -22
  132. package/esm2015/src/render3/node_assert.js +2 -3
  133. package/esm2015/src/render3/node_manipulation.js +137 -117
  134. package/esm2015/src/render3/node_selector_matcher.js +46 -19
  135. package/esm2015/src/render3/pipe.js +36 -21
  136. package/esm2015/src/render3/players.js +17 -12
  137. package/esm2015/src/render3/pure_function.js +86 -39
  138. package/esm2015/src/render3/query.js +93 -80
  139. package/esm2015/src/render3/state.js +88 -203
  140. package/esm2015/src/render3/styling/class_and_style_bindings.js +963 -249
  141. package/esm2015/src/render3/styling/core_player_handler.js +6 -4
  142. package/esm2015/src/render3/styling/player_factory.js +3 -4
  143. package/esm2015/src/render3/styling/util.js +69 -31
  144. package/esm2015/src/render3/tokens.js +7 -6
  145. package/esm2015/src/render3/util.js +65 -55
  146. package/esm2015/src/render3/view_engine_compatibility.js +36 -59
  147. package/esm2015/src/render3/view_engine_compatibility_prebound.js +2 -3
  148. package/esm2015/src/render3/view_ref.js +58 -44
  149. package/esm2015/src/sanitization/bypass.js +29 -6
  150. package/esm2015/src/sanitization/html_sanitizer.js +48 -16
  151. package/esm2015/src/sanitization/inert_body.js +33 -18
  152. package/esm2015/src/sanitization/sanitization.js +35 -25
  153. package/esm2015/src/sanitization/security.js +3 -4
  154. package/esm2015/src/sanitization/style_sanitizer.js +10 -7
  155. package/esm2015/src/sanitization/url_sanitizer.js +9 -7
  156. package/esm2015/src/testability/testability.js +72 -42
  157. package/esm2015/src/type.js +6 -8
  158. package/esm2015/src/util/decorators.js +19 -14
  159. package/esm2015/src/util/lang.js +2 -3
  160. package/esm2015/src/util/ng_reflect.js +2 -3
  161. package/esm2015/src/util/noop.js +2 -3
  162. package/esm2015/src/util/property.js +3 -4
  163. package/esm2015/src/util.js +12 -4
  164. package/esm2015/src/version.js +6 -6
  165. package/esm2015/src/view/element.js +17 -17
  166. package/esm2015/src/view/entrypoint.js +15 -5
  167. package/esm2015/src/view/errors.js +4 -5
  168. package/esm2015/src/view/index.js +2 -3
  169. package/esm2015/src/view/ng_content.js +3 -4
  170. package/esm2015/src/view/ng_module.js +2 -3
  171. package/esm2015/src/view/provider.js +89 -24
  172. package/esm2015/src/view/pure_expression.js +14 -15
  173. package/esm2015/src/view/query.js +14 -14
  174. package/esm2015/src/view/refs.js +96 -38
  175. package/esm2015/src/view/services.js +64 -37
  176. package/esm2015/src/view/text.js +5 -6
  177. package/esm2015/src/view/types.js +390 -325
  178. package/esm2015/src/view/util.js +29 -24
  179. package/esm2015/src/view/view.js +43 -36
  180. package/esm2015/src/view/view_attach.js +9 -10
  181. package/esm2015/src/zone/ng_zone.js +29 -28
  182. package/esm2015/src/zone.js +3 -3
  183. package/esm2015/testing/index.js +2 -3
  184. package/esm2015/testing/public_api.js +4 -4
  185. package/esm2015/testing/src/async.js +2 -3
  186. package/esm2015/testing/src/async_fallback.js +8 -7
  187. package/esm2015/testing/src/async_test_completer.js +14 -6
  188. package/esm2015/testing/src/before_each.js +10 -4
  189. package/esm2015/testing/src/component_fixture.js +48 -17
  190. package/esm2015/testing/src/fake_async.js +9 -3
  191. package/esm2015/testing/src/fake_async_fallback.js +5 -5
  192. package/esm2015/testing/src/lang_utils.js +3 -4
  193. package/esm2015/testing/src/logger.js +2 -3
  194. package/esm2015/testing/src/metadata_override.js +2 -6
  195. package/esm2015/testing/src/metadata_overrider.js +9 -8
  196. package/esm2015/testing/src/ng_zone_mock.js +2 -3
  197. package/esm2015/testing/src/private_export_testing.js +2 -3
  198. package/esm2015/testing/src/r3_test_bed.js +324 -174
  199. package/esm2015/testing/src/resolvers.js +28 -11
  200. package/esm2015/testing/src/test_bed.js +123 -54
  201. package/esm2015/testing/src/test_bed_common.js +142 -85
  202. package/esm2015/testing/src/test_compiler.js +2 -3
  203. package/esm2015/testing/src/testing.js +3 -3
  204. package/esm2015/testing/src/testing_internal.js +17 -12
  205. package/esm2015/testing/testing.js +1 -2
  206. package/esm5/core.js +12 -13
  207. package/esm5/index.js +1 -2
  208. package/esm5/public_api.js +1 -2
  209. package/esm5/src/application_init.js +1 -2
  210. package/esm5/src/application_module.js +1 -2
  211. package/esm5/src/application_ref.js +1 -2
  212. package/esm5/src/application_tokens.js +1 -2
  213. package/esm5/src/change_detection/change_detection.js +1 -2
  214. package/esm5/src/change_detection/change_detection_util.js +1 -2
  215. package/esm5/src/change_detection/change_detector_ref.js +1 -2
  216. package/esm5/src/change_detection/constants.js +3 -4
  217. package/esm5/src/change_detection/differs/default_iterable_differ.js +1 -2
  218. package/esm5/src/change_detection/differs/default_keyvalue_differ.js +1 -2
  219. package/esm5/src/change_detection/differs/iterable_differs.js +1 -2
  220. package/esm5/src/change_detection/differs/keyvalue_differs.js +1 -2
  221. package/esm5/src/change_detection/pipe_transform.js +1 -2
  222. package/esm5/src/change_detection.js +1 -2
  223. package/esm5/src/codegen_private_exports.js +1 -2
  224. package/esm5/src/console.js +1 -2
  225. package/esm5/src/core.js +1 -2
  226. package/esm5/src/core_private_export.js +1 -2
  227. package/esm5/src/core_render3_private_export.js +7 -5
  228. package/esm5/src/debug/debug_node.js +79 -58
  229. package/esm5/src/di/defs.js +3 -4
  230. package/esm5/src/di/forward_ref.js +1 -2
  231. package/esm5/src/di/injectable.js +1 -2
  232. package/esm5/src/di/injection_token.js +1 -2
  233. package/esm5/src/di/injector.js +1 -2
  234. package/esm5/src/di/injector_compatibility.js +1 -2
  235. package/esm5/src/di/metadata.js +1 -2
  236. package/esm5/src/di/provider.js +1 -2
  237. package/esm5/src/di/r3_injector.js +48 -28
  238. package/esm5/src/di/reflective_errors.js +1 -2
  239. package/esm5/src/di/reflective_injector.js +1 -2
  240. package/esm5/src/di/reflective_key.js +1 -2
  241. package/esm5/src/di/reflective_provider.js +1 -2
  242. package/esm5/src/di/scope.js +1 -2
  243. package/esm5/src/di/util.js +1 -2
  244. package/esm5/src/di.js +1 -2
  245. package/esm5/src/error_handler.js +1 -2
  246. package/esm5/src/errors.js +1 -2
  247. package/esm5/src/event_emitter.js +1 -2
  248. package/esm5/src/i18n/tokens.js +1 -2
  249. package/esm5/src/is_dev_mode.js +1 -2
  250. package/esm5/src/ivy_switch.js +1 -2
  251. package/esm5/src/linker/compiler.js +1 -2
  252. package/esm5/src/linker/component_factory.js +1 -2
  253. package/esm5/src/linker/component_factory_resolver.js +1 -2
  254. package/esm5/src/linker/element_ref.js +1 -2
  255. package/esm5/src/linker/ng_module_factory.js +1 -2
  256. package/esm5/src/linker/ng_module_factory_loader.js +37 -13
  257. package/esm5/src/linker/query_list.js +1 -2
  258. package/esm5/src/linker/system_js_ng_module_factory_loader.js +1 -2
  259. package/esm5/src/linker/template_ref.js +1 -2
  260. package/esm5/src/linker/view_container_ref.js +1 -2
  261. package/esm5/src/linker/view_ref.js +1 -2
  262. package/esm5/src/linker.js +1 -2
  263. package/esm5/src/metadata/di.js +1 -2
  264. package/esm5/src/metadata/directives.js +1 -2
  265. package/esm5/src/metadata/lifecycle_hooks.js +1 -2
  266. package/esm5/src/metadata/ng_module.js +1 -2
  267. package/esm5/src/metadata/resource_loading.js +1 -2
  268. package/esm5/src/metadata/view.js +1 -2
  269. package/esm5/src/metadata.js +1 -2
  270. package/esm5/src/platform_core_providers.js +1 -2
  271. package/esm5/src/profile/profile.js +1 -2
  272. package/esm5/src/profile/wtf_impl.js +1 -2
  273. package/esm5/src/r3_symbols.js +1 -2
  274. package/esm5/src/reflection/platform_reflection_capabilities.js +1 -2
  275. package/esm5/src/reflection/reflection.js +1 -2
  276. package/esm5/src/reflection/reflection_capabilities.js +1 -2
  277. package/esm5/src/reflection/reflector.js +1 -2
  278. package/esm5/src/reflection/types.js +1 -2
  279. package/esm5/src/render/api.js +1 -2
  280. package/esm5/src/render.js +1 -2
  281. package/esm5/src/render3/assert.js +15 -2
  282. package/esm5/src/render3/bindings.js +63 -0
  283. package/esm5/src/render3/component.js +23 -16
  284. package/esm5/src/render3/component_ref.js +43 -36
  285. package/esm5/src/render3/context_discovery.js +68 -77
  286. package/esm5/src/render3/definition.js +30 -24
  287. package/esm5/src/render3/di.js +142 -135
  288. package/esm5/src/render3/di_setup.js +20 -21
  289. package/esm5/src/render3/discovery_utils.js +167 -36
  290. package/esm5/src/render3/empty.js +22 -0
  291. package/esm5/src/render3/errors.js +9 -12
  292. package/esm5/src/render3/features/inherit_definition_feature.js +3 -5
  293. package/esm5/src/render3/features/ng_onchanges_feature.js +11 -10
  294. package/esm5/src/render3/features/providers_feature.js +1 -2
  295. package/esm5/src/render3/fields.js +1 -2
  296. package/esm5/src/render3/global_utils.js +4 -3
  297. package/esm5/src/render3/global_utils_api.js +2 -3
  298. package/esm5/src/render3/hooks.js +14 -16
  299. package/esm5/src/render3/i18n.js +22 -27
  300. package/esm5/src/render3/index.js +5 -6
  301. package/esm5/src/render3/instructions.js +698 -593
  302. package/esm5/src/render3/interfaces/container.js +10 -3
  303. package/esm5/src/render3/interfaces/context.js +1 -2
  304. package/esm5/src/render3/interfaces/definition.js +1 -2
  305. package/esm5/src/render3/interfaces/i18n.js +1 -2
  306. package/esm5/src/render3/interfaces/injector.js +5 -6
  307. package/esm5/src/render3/interfaces/node.js +1 -2
  308. package/esm5/src/render3/interfaces/player.js +1 -2
  309. package/esm5/src/render3/interfaces/projection.js +1 -2
  310. package/esm5/src/render3/interfaces/query.js +1 -2
  311. package/esm5/src/render3/interfaces/renderer.js +1 -2
  312. package/esm5/src/render3/interfaces/sanitization.js +1 -2
  313. package/esm5/src/render3/interfaces/styling.js +1 -2
  314. package/esm5/src/render3/interfaces/view.js +3 -4
  315. package/esm5/src/render3/jit/compiler_facade.js +1 -2
  316. package/esm5/src/render3/jit/compiler_facade_interface.js +1 -2
  317. package/esm5/src/render3/jit/directive.js +19 -10
  318. package/esm5/src/render3/jit/environment.js +4 -2
  319. package/esm5/src/render3/jit/injectable.js +17 -18
  320. package/esm5/src/render3/jit/module.js +207 -13
  321. package/esm5/src/render3/jit/pipe.js +1 -2
  322. package/esm5/src/render3/jit/util.js +1 -2
  323. package/esm5/src/render3/metadata.js +1 -2
  324. package/esm5/src/render3/ng_dev_mode.js +1 -2
  325. package/esm5/src/render3/ng_module_ref.js +29 -11
  326. package/esm5/src/render3/node_assert.js +1 -2
  327. package/esm5/src/render3/node_manipulation.js +54 -50
  328. package/esm5/src/render3/node_selector_matcher.js +28 -9
  329. package/esm5/src/render3/pipe.js +33 -19
  330. package/esm5/src/render3/players.js +7 -9
  331. package/esm5/src/render3/pure_function.js +48 -38
  332. package/esm5/src/render3/query.js +8 -9
  333. package/esm5/src/render3/state.js +50 -135
  334. package/esm5/src/render3/styling/class_and_style_bindings.js +684 -214
  335. package/esm5/src/render3/styling/core_player_handler.js +1 -2
  336. package/esm5/src/render3/styling/player_factory.js +1 -2
  337. package/esm5/src/render3/styling/util.js +39 -22
  338. package/esm5/src/render3/tokens.js +1 -2
  339. package/esm5/src/render3/util.js +49 -37
  340. package/esm5/src/render3/view_engine_compatibility.js +20 -33
  341. package/esm5/src/render3/view_engine_compatibility_prebound.js +1 -2
  342. package/esm5/src/render3/view_ref.js +33 -30
  343. package/esm5/src/sanitization/bypass.js +1 -2
  344. package/esm5/src/sanitization/html_sanitizer.js +1 -2
  345. package/esm5/src/sanitization/inert_body.js +4 -5
  346. package/esm5/src/sanitization/sanitization.js +25 -20
  347. package/esm5/src/sanitization/security.js +1 -2
  348. package/esm5/src/sanitization/style_sanitizer.js +1 -2
  349. package/esm5/src/sanitization/url_sanitizer.js +1 -2
  350. package/esm5/src/testability/testability.js +1 -2
  351. package/esm5/src/type.js +1 -2
  352. package/esm5/src/util/decorators.js +1 -2
  353. package/esm5/src/util/lang.js +1 -2
  354. package/esm5/src/util/ng_reflect.js +1 -2
  355. package/esm5/src/util/noop.js +1 -2
  356. package/esm5/src/util/property.js +1 -2
  357. package/esm5/src/util.js +1 -2
  358. package/esm5/src/version.js +2 -3
  359. package/esm5/src/view/element.js +1 -2
  360. package/esm5/src/view/entrypoint.js +1 -2
  361. package/esm5/src/view/errors.js +1 -2
  362. package/esm5/src/view/index.js +1 -2
  363. package/esm5/src/view/ng_content.js +1 -2
  364. package/esm5/src/view/ng_module.js +1 -2
  365. package/esm5/src/view/provider.js +1 -2
  366. package/esm5/src/view/pure_expression.js +1 -2
  367. package/esm5/src/view/query.js +1 -2
  368. package/esm5/src/view/refs.js +1 -2
  369. package/esm5/src/view/services.js +1 -2
  370. package/esm5/src/view/text.js +1 -2
  371. package/esm5/src/view/types.js +1 -2
  372. package/esm5/src/view/util.js +1 -2
  373. package/esm5/src/view/view.js +1 -2
  374. package/esm5/src/view/view_attach.js +1 -2
  375. package/esm5/src/zone/ng_zone.js +1 -2
  376. package/esm5/src/zone.js +1 -2
  377. package/esm5/testing/index.js +1 -2
  378. package/esm5/testing/public_api.js +1 -2
  379. package/esm5/testing/src/async.js +1 -2
  380. package/esm5/testing/src/async_fallback.js +1 -2
  381. package/esm5/testing/src/async_test_completer.js +1 -2
  382. package/esm5/testing/src/before_each.js +1 -2
  383. package/esm5/testing/src/component_fixture.js +1 -2
  384. package/esm5/testing/src/fake_async.js +1 -2
  385. package/esm5/testing/src/fake_async_fallback.js +1 -2
  386. package/esm5/testing/src/lang_utils.js +1 -2
  387. package/esm5/testing/src/logger.js +1 -2
  388. package/esm5/testing/src/metadata_override.js +1 -2
  389. package/esm5/testing/src/metadata_overrider.js +1 -2
  390. package/esm5/testing/src/ng_zone_mock.js +1 -2
  391. package/esm5/testing/src/private_export_testing.js +1 -2
  392. package/esm5/testing/src/r3_test_bed.js +182 -121
  393. package/esm5/testing/src/resolvers.js +11 -7
  394. package/esm5/testing/src/test_bed.js +1 -2
  395. package/esm5/testing/src/test_bed_common.js +1 -2
  396. package/esm5/testing/src/test_compiler.js +1 -2
  397. package/esm5/testing/src/testing.js +1 -2
  398. package/esm5/testing/src/testing_internal.js +2 -3
  399. package/esm5/testing/testing.js +1 -2
  400. package/fesm2015/core.js +8560 -6153
  401. package/fesm2015/core.js.map +1 -1
  402. package/fesm2015/testing.js +351 -229
  403. package/fesm2015/testing.js.map +1 -1
  404. package/fesm5/core.js +5541 -4482
  405. package/fesm5/core.js.map +1 -1
  406. package/fesm5/testing.js +185 -130
  407. package/fesm5/testing.js.map +1 -1
  408. package/package.json +1 -1
  409. package/src/change_detection/constants.d.ts +2 -2
  410. package/src/core_render3_private_export.d.ts +6 -3
  411. package/src/di/injectable.d.ts +3 -2
  412. package/src/di/r3_injector.d.ts +1 -1
  413. package/src/linker/ng_module_factory_loader.d.ts +5 -1
  414. package/src/render3/assert.d.ts +6 -0
  415. package/src/render3/bindings.d.ts +20 -0
  416. package/src/render3/component.d.ts +3 -3
  417. package/src/render3/component_ref.d.ts +14 -4
  418. package/src/render3/context_discovery.d.ts +9 -9
  419. package/src/render3/definition.d.ts +8 -23
  420. package/src/render3/di.d.ts +19 -17
  421. package/src/render3/discovery_utils.d.ts +66 -8
  422. package/src/render3/empty.d.ts +16 -0
  423. package/src/render3/errors.d.ts +1 -1
  424. package/src/render3/global_utils_api.d.ts +1 -1
  425. package/src/render3/hooks.d.ts +7 -6
  426. package/src/render3/index.d.ts +4 -4
  427. package/src/render3/instructions.d.ts +163 -118
  428. package/src/render3/interfaces/container.d.ts +9 -8
  429. package/src/render3/interfaces/context.d.ts +3 -3
  430. package/src/render3/interfaces/definition.d.ts +2 -12
  431. package/src/render3/interfaces/i18n.d.ts +25 -25
  432. package/src/render3/interfaces/injector.d.ts +8 -9
  433. package/src/render3/interfaces/node.d.ts +56 -23
  434. package/src/render3/interfaces/renderer.d.ts +2 -1
  435. package/src/render3/interfaces/styling.d.ts +392 -117
  436. package/src/render3/interfaces/view.d.ts +49 -35
  437. package/src/render3/jit/compiler_facade_interface.d.ts +10 -3
  438. package/src/render3/jit/module.d.ts +9 -1
  439. package/src/render3/metadata.d.ts +1 -1
  440. package/src/render3/ng_module_ref.d.ts +8 -6
  441. package/src/render3/node_manipulation.d.ts +21 -27
  442. package/src/render3/node_selector_matcher.d.ts +2 -2
  443. package/src/render3/state.d.ts +11 -38
  444. package/src/render3/styling/class_and_style_bindings.d.ts +130 -43
  445. package/src/render3/styling/util.d.ts +9 -4
  446. package/src/render3/util.d.ts +31 -25
  447. package/src/render3/view_engine_compatibility.d.ts +5 -12
  448. package/src/render3/view_engine_compatibility_prebound.d.ts +2 -2
  449. package/src/render3/view_ref.d.ts +2 -2
  450. package/src/sanitization/sanitization.d.ts +3 -2
  451. package/testing/src/r3_test_bed.d.ts +15 -0
  452. package/testing/src/resolvers.d.ts +2 -2
  453. package/testing/testing.metadata.json +1 -1
  454. package/testing.d.ts +5 -0
@@ -36,22 +36,22 @@ export declare const TAIL = 14;
36
36
  export declare const CONTAINER_INDEX = 15;
37
37
  export declare const CONTENT_QUERIES = 16;
38
38
  export declare const DECLARATION_VIEW = 17;
39
- /** Size of LViewData's header. Necessary to adjust for it when setting slots. */
39
+ /** Size of LView's header. Necessary to adjust for it when setting slots. */
40
40
  export declare const HEADER_OFFSET = 18;
41
41
  export interface OpaqueViewState {
42
42
  '__brand__': 'Brand for OpaqueViewState that nothing will match';
43
43
  }
44
44
  /**
45
- * `LViewData` stores all of the information needed to process the instructions as
45
+ * `LView` stores all of the information needed to process the instructions as
46
46
  * they are invoked from the template. Each embedded view and component view has its
47
- * own `LViewData`. When processing a particular view, we set the `viewData` to that
48
- * `LViewData`. When that view is done processing, the `viewData` is set back to
49
- * whatever the original `viewData` was before (the parent `LViewData`).
47
+ * own `LView`. When processing a particular view, we set the `viewData` to that
48
+ * `LView`. When that view is done processing, the `viewData` is set back to
49
+ * whatever the original `viewData` was before (the parent `LView`).
50
50
  *
51
51
  * Keeping separate state for each view facilities view insertion / deletion, so we
52
52
  * don't have to edit the data array based on which views are present.
53
53
  */
54
- export interface LViewData extends Array<any> {
54
+ export interface LView extends Array<any> {
55
55
  /**
56
56
  * The static data for this view. We need a reference to this so we can easily walk up the
57
57
  * node tree in DI and get the TView.data array associated with a node (where the
@@ -62,27 +62,27 @@ export interface LViewData extends Array<any> {
62
62
  [FLAGS]: LViewFlags;
63
63
  /**
64
64
  * The parent view is needed when we exit the view and must restore the previous
65
- * `LViewData`. Without this, the render method would have to keep a stack of
65
+ * `LView`. Without this, the render method would have to keep a stack of
66
66
  * views as it is recursively rendering templates.
67
67
  *
68
68
  * This is the "insertion" view for embedded views. This allows us to properly
69
69
  * destroy embedded views.
70
70
  */
71
- [PARENT]: LViewData | null;
71
+ [PARENT]: LView | null;
72
72
  /**
73
73
  *
74
- * The next sibling LViewData or LContainer.
74
+ * The next sibling LView or LContainer.
75
75
  *
76
76
  * Allows us to propagate between sibling view states that aren't in the same
77
77
  * container. Embedded views already have a node.next, but it is only set for
78
78
  * views in the same container. We need a way to link component views and views
79
79
  * across containers as well.
80
80
  */
81
- [NEXT]: LViewData | LContainer | null;
81
+ [NEXT]: LView | LContainer | null;
82
82
  /** Queries active for this view - nodes from a view are reported to those queries. */
83
83
  [QUERIES]: LQueries | null;
84
84
  /**
85
- * The host node for this LViewData instance, if this is a component view.
85
+ * The host node for this LView instance, if this is a component view.
86
86
  *
87
87
  * If this is an embedded view, HOST will be null.
88
88
  */
@@ -132,12 +132,12 @@ export interface LViewData extends Array<any> {
132
132
  /** An optional custom sanitizer. */
133
133
  [SANITIZER]: Sanitizer | null;
134
134
  /**
135
- * The last LViewData or LContainer beneath this LViewData in the hierarchy.
135
+ * The last LView or LContainer beneath this LView in the hierarchy.
136
136
  *
137
137
  * The tail allows us to quickly add a new state to the end of the view list
138
138
  * without having to propagate starting from the first child.
139
139
  */
140
- [TAIL]: LViewData | LContainer | null;
140
+ [TAIL]: LView | LContainer | null;
141
141
  /**
142
142
  * The index of the parent container's host node. Applicable only to embedded views that
143
143
  * have been inserted dynamically. Will be -1 for component views and inline views.
@@ -160,7 +160,7 @@ export interface LViewData extends Array<any> {
160
160
  *
161
161
  * The template for a dynamically created view may be declared in a different view than
162
162
  * it is inserted. We already track the "insertion view" (view where the template was
163
- * inserted) in LViewData[PARENT], but we also need access to the "declaration view"
163
+ * inserted) in LView[PARENT], but we also need access to the "declaration view"
164
164
  * (view where the template was declared). Otherwise, we wouldn't be able to call the
165
165
  * view's template function with the proper contexts. Context should be inherited from
166
166
  * the declaration view tree, not the insertion view tree.
@@ -177,9 +177,9 @@ export interface LViewData extends Array<any> {
177
177
  * template function during change detection, we need the declaration view to get inherited
178
178
  * context.
179
179
  */
180
- [DECLARATION_VIEW]: LViewData | null;
180
+ [DECLARATION_VIEW]: LView | null;
181
181
  }
182
- /** Flags associated with an LView (saved in LViewData[FLAGS]) */
182
+ /** Flags associated with an LView (saved in LView[FLAGS]) */
183
183
  export declare const enum LViewFlags {
184
184
  /**
185
185
  * Whether or not the view is in creationMode.
@@ -190,12 +190,20 @@ export declare const enum LViewFlags {
190
190
  * improperly reported as false.
191
191
  */
192
192
  CreationMode = 1,
193
+ /**
194
+ * Whether or not this LView instance is on its first processing pass.
195
+ *
196
+ * An LView instance is considered to be on its "first pass" until it
197
+ * has completed one creation mode run and one update mode run. At this
198
+ * time, the flag is turned off.
199
+ */
200
+ FirstLViewPass = 2,
193
201
  /** Whether this view has default change detection strategy (checks always) or onPush */
194
- CheckAlways = 2,
202
+ CheckAlways = 4,
195
203
  /** Whether or not this view is currently dirty (needing check) */
196
- Dirty = 4,
204
+ Dirty = 8,
197
205
  /** Whether or not this view is currently attached to change detection tree. */
198
- Attached = 8,
206
+ Attached = 16,
199
207
  /**
200
208
  * Whether or not the init hooks have run.
201
209
  *
@@ -203,11 +211,11 @@ export declare const enum LViewFlags {
203
211
  * runs OR the first cR() instruction that runs (so inits are run for the top level view before
204
212
  * any embedded views).
205
213
  */
206
- RunInit = 16,
214
+ RunInit = 32,
207
215
  /** Whether or not this view is destroyed. */
208
- Destroyed = 32,
216
+ Destroyed = 64,
209
217
  /** Whether or not this view is the root view */
210
- IsRoot = 64
218
+ IsRoot = 128
211
219
  }
212
220
  /**
213
221
  * The static data for an LView (shared between all templates of a
@@ -225,10 +233,10 @@ export interface TView {
225
233
  */
226
234
  readonly id: number;
227
235
  /**
228
- * This is a blueprint used to generate LViewData instances for this TView. Copying this
229
- * blueprint is faster than creating a new LViewData from scratch.
236
+ * This is a blueprint used to generate LView instances for this TView. Copying this
237
+ * blueprint is faster than creating a new LView from scratch.
230
238
  */
231
- blueprint: LViewData;
239
+ blueprint: LView;
232
240
  /**
233
241
  * The template function used to refresh the view of dynamically created views
234
242
  * and components. Will be null for inline views.
@@ -241,7 +249,7 @@ export interface TView {
241
249
  /**
242
250
  * Pointer to the `TNode` that represents the root of the view.
243
251
  *
244
- * If this is a `TNode` for an `LViewNode`, this is an embedded view of a container.
252
+ * If this is a `TViewNode` for an `LViewNode`, this is an embedded view of a container.
245
253
  * We need this pointer to be able to efficiently find this node when inserting the view
246
254
  * into an anchor.
247
255
  *
@@ -266,9 +274,9 @@ export interface TView {
266
274
  */
267
275
  bindingStartIndex: number;
268
276
  /**
269
- * The index where the "expando" section of `LViewData` begins. The expando
277
+ * The index where the "expando" section of `LView` begins. The expando
270
278
  * section contains injectors, directive instances, and host binding values.
271
- * Unlike the "consts" and "vars" sections of `LViewData`, the length of this
279
+ * Unlike the "consts" and "vars" sections of `LView`, the length of this
272
280
  * section cannot be calculated at compile-time because directives are matched
273
281
  * at runtime to preserve locality.
274
282
  *
@@ -296,7 +304,7 @@ export interface TView {
296
304
  *
297
305
  * See VIEW_DATA.md for more information.
298
306
  */
299
- expandoInstructions: (number | HostBindingsFunction<any>)[] | null;
307
+ expandoInstructions: (number | HostBindingsFunction<any> | null)[] | null;
300
308
  /**
301
309
  * Full registry of directives and components that may be found in this view.
302
310
  *
@@ -385,19 +393,25 @@ export interface TView {
385
393
  * saves on memory (70 bytes per array) and on a few bytes of code size (for two
386
394
  * separate for loops).
387
395
  *
388
- * If it's a native DOM listener being stored:
389
- * 1st index is: event name to remove
390
- * 2nd index is: index of native element in LView.data[]
391
- * 3rd index is: index of wrapped listener function in LView.cleanupInstances[]
392
- * 4th index is: useCapture boolean
396
+ * If it's a native DOM listener or output subscription being stored:
397
+ * 1st index is: event name `name = tView.cleanup[i+0]`
398
+ * 2nd index is: index of native element `element = lView[tView.cleanup[i+1]]`
399
+ * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
400
+ * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
401
+ * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
402
+ * `typeof useCaptureOrIndx == 'number':
403
+ * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
404
+ * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
393
405
  *
394
406
  * If it's a renderer2 style listener or ViewRef destroy hook being stored:
395
407
  * 1st index is: index of the cleanup function in LView.cleanupInstances[]
396
- * 2nd index is: null
408
+ * 2nd index is: `null`
409
+ * `lView[CLEANUP][tView.cleanup[i+0]]()`
397
410
  *
398
411
  * If it's an output subscription or query list destroy hook:
399
412
  * 1st index is: output unsubscribe function / query list destroy function
400
413
  * 2nd index is: index of function context in LView.cleanupInstances[]
414
+ * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
401
415
  */
402
416
  cleanup: any[] | null;
403
417
  /**
@@ -63,6 +63,7 @@ export interface R3PipeMetadataFacade {
63
63
  export interface R3InjectableMetadataFacade {
64
64
  name: string;
65
65
  type: any;
66
+ typeArgumentCount: number;
66
67
  ctorDeps: R3DependencyMetadataFacade[] | null;
67
68
  providedIn: any;
68
69
  useClass?: any;
@@ -83,8 +84,8 @@ export interface R3InjectorMetadataFacade {
83
84
  name: string;
84
85
  type: any;
85
86
  deps: R3DependencyMetadataFacade[] | null;
86
- providers: any;
87
- imports: any;
87
+ providers: any[];
88
+ imports: any[];
88
89
  }
89
90
  export interface R3DirectiveMetadataFacade {
90
91
  name: string;
@@ -115,12 +116,18 @@ export interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {
115
116
  animations: any[] | undefined;
116
117
  viewQueries: R3QueryMetadataFacade[];
117
118
  pipes: Map<string, any>;
118
- directives: Map<string, any>;
119
+ directives: {
120
+ selector: string;
121
+ expression: any;
122
+ }[];
119
123
  styles: string[];
120
124
  encapsulation: ViewEncapsulation;
121
125
  viewProviders: Provider[] | null;
126
+ interpolation?: [string, string];
127
+ changeDetection?: ChangeDetectionStrategy;
122
128
  }
123
129
  export declare type ViewEncapsulation = number;
130
+ export declare type ChangeDetectionStrategy = number;
124
131
  export interface R3QueryMetadataFacade {
125
132
  propertyName: string;
126
133
  first: boolean;
@@ -8,6 +8,13 @@
8
8
  import { NgModule, NgModuleTransitiveScopes } from '../../metadata/ng_module';
9
9
  import { Type } from '../../type';
10
10
  import { ComponentDef } from '../interfaces/definition';
11
+ import { NgModuleType } from '../ng_module_ref';
12
+ /**
13
+ * Loops over queued module definitions, if a given module definition has all of its
14
+ * declarations resolved, it dequeues that module definition and sets the scope on
15
+ * its declarations.
16
+ */
17
+ export declare function flushModuleScopingQueueAsMuchAsPossible(): void;
11
18
  /**
12
19
  * Compiles a module in JIT mode.
13
20
  *
@@ -17,7 +24,8 @@ export declare function compileNgModule(moduleType: Type<any>, ngModule?: NgModu
17
24
  /**
18
25
  * Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.
19
26
  */
20
- export declare function compileNgModuleDefs(moduleType: Type<any>, ngModule: NgModule): void;
27
+ export declare function compileNgModuleDefs(moduleType: NgModuleType, ngModule: NgModule): void;
28
+ export declare function resetCompiledComponents(): void;
21
29
  /**
22
30
  * Patch the definition of a component with directives and pipes from the compilation scope of
23
31
  * a given module.
@@ -15,6 +15,6 @@ import { Type } from '../type';
15
15
  * Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being
16
16
  * tree-shaken away during production builds.
17
17
  */
18
- export declare function setClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: any[] | null, propDecorators: {
18
+ export declare function setClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
19
19
  [field: string]: any;
20
20
  } | null): void;
@@ -6,22 +6,24 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import { Injector } from '../di/injector';
9
- import { StaticProvider } from '../di/provider';
9
+ import { InjectFlags } from '../di/injector_compatibility';
10
10
  import { ComponentFactoryResolver as viewEngine_ComponentFactoryResolver } from '../linker/component_factory_resolver';
11
11
  import { InternalNgModuleRef, NgModuleFactory as viewEngine_NgModuleFactory, NgModuleRef as viewEngine_NgModuleRef } from '../linker/ng_module_factory';
12
12
  import { NgModuleDef } from '../metadata/ng_module';
13
13
  import { Type } from '../type';
14
- export interface NgModuleType {
15
- ngModuleDef: NgModuleDef<any>;
14
+ export interface NgModuleType<T = any> extends Type<T> {
15
+ ngModuleDef: NgModuleDef<T>;
16
16
  }
17
- export declare const COMPONENT_FACTORY_RESOLVER: StaticProvider;
18
17
  export declare class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {
18
+ _parent: Injector | null;
19
19
  _bootstrapComponents: Type<any>[];
20
+ _r3Injector: Injector;
20
21
  injector: Injector;
21
- componentFactoryResolver: viewEngine_ComponentFactoryResolver;
22
22
  instance: T;
23
23
  destroyCbs: (() => void)[] | null;
24
- constructor(ngModuleType: Type<T>, parentInjector: Injector | null);
24
+ constructor(ngModuleType: Type<T>, _parent: Injector | null);
25
+ get(token: any, notFoundValue?: any, injectFlags?: InjectFlags): any;
26
+ readonly componentFactoryResolver: viewEngine_ComponentFactoryResolver;
25
27
  destroy(): void;
26
28
  onDestroy(callback: () => void): void;
27
29
  }
@@ -8,27 +8,20 @@
8
8
  import { LContainer } from './interfaces/container';
9
9
  import { TContainerNode, TElementContainerNode, TElementNode, TNode, TViewNode } from './interfaces/node';
10
10
  import { RComment, RElement, RNode, RText, Renderer3 } from './interfaces/renderer';
11
- import { LViewData } from './interfaces/view';
11
+ import { LView } from './interfaces/view';
12
12
  /** Retrieves the parent element of a given node. */
13
- export declare function getParentNative(tNode: TNode, currentView: LViewData): RElement | RComment | null;
13
+ export declare function getParentNative(tNode: TNode, currentView: LView): RElement | RComment | null;
14
14
  /**
15
15
  * Gets the host element given a view. Will return null if the current view is an embedded view,
16
16
  * which does not have a host element.
17
17
  */
18
- export declare function getHostNative(currentView: LViewData): RElement | null;
19
- export declare function getLContainer(tNode: TViewNode, embeddedView: LViewData): LContainer | null;
18
+ export declare function getHostNative(currentView: LView): RElement | null;
19
+ export declare function getLContainer(tNode: TViewNode, embeddedView: LView): LContainer | null;
20
20
  /**
21
21
  * Retrieves render parent for a given view.
22
22
  * Might be null if a view is not yet attached to any container.
23
23
  */
24
- export declare function getContainerRenderParent(tViewNode: TViewNode, view: LViewData): RElement | null;
25
- /**
26
- * Given a current view, finds the nearest component's host (LElement).
27
- *
28
- * @param lViewData LViewData for which we want a host element node
29
- * @returns The host node
30
- */
31
- export declare function findComponentView(lViewData: LViewData): LViewData;
24
+ export declare function getContainerRenderParent(tViewNode: TViewNode, view: LView): RElement | null;
32
25
  export declare function createTextNode(value: any, renderer: Renderer3): RText;
33
26
  /**
34
27
  * Adds or removes all DOM elements associated with a view.
@@ -41,8 +34,8 @@ export declare function createTextNode(value: any, renderer: Renderer3): RText;
41
34
  * @param insertMode Whether or not elements should be added (if false, removing)
42
35
  * @param beforeNode The node before which elements should be added, if insert mode
43
36
  */
44
- export declare function addRemoveViewFromContainer(viewToWalk: LViewData, insertMode: true, beforeNode: RNode | null): void;
45
- export declare function addRemoveViewFromContainer(viewToWalk: LViewData, insertMode: false): void;
37
+ export declare function addRemoveViewFromContainer(viewToWalk: LView, insertMode: true, beforeNode: RNode | null): void;
38
+ export declare function addRemoveViewFromContainer(viewToWalk: LView, insertMode: false): void;
46
39
  /**
47
40
  * Traverses down and up the tree of views and containers to remove listeners and
48
41
  * call onDestroy callbacks.
@@ -56,7 +49,7 @@ export declare function addRemoveViewFromContainer(viewToWalk: LViewData, insert
56
49
  *
57
50
  * @param rootView The view to destroy
58
51
  */
59
- export declare function destroyViewTree(rootView: LViewData): void;
52
+ export declare function destroyViewTree(rootView: LView): void;
60
53
  /**
61
54
  * Inserts a view into a container.
62
55
  *
@@ -71,7 +64,7 @@ export declare function destroyViewTree(rootView: LViewData): void;
71
64
  * @param index The index at which to insert the view
72
65
  * @param containerIndex The index of the container node, if dynamic
73
66
  */
74
- export declare function insertView(lView: LViewData, lContainer: LContainer, parentView: LViewData, index: number, containerIndex: number): void;
67
+ export declare function insertView(lView: LView, lContainer: LContainer, parentView: LView, index: number, containerIndex: number): void;
75
68
  /**
76
69
  * Detaches a view from a container.
77
70
  *
@@ -81,8 +74,9 @@ export declare function insertView(lView: LViewData, lContainer: LContainer, par
81
74
  * @param lContainer The container from which to detach a view
82
75
  * @param removeIndex The index of the view to detach
83
76
  * @param detached Whether or not this view is already detached.
77
+ * @returns Detached LView instance.
84
78
  */
85
- export declare function detachView(lContainer: LContainer, removeIndex: number, detached: boolean): void;
79
+ export declare function detachView(lContainer: LContainer, removeIndex: number, detached: boolean): LView;
86
80
  /**
87
81
  * Removes a view from a container, i.e. detaches it and then destroys the underlying LView.
88
82
  *
@@ -91,15 +85,15 @@ export declare function detachView(lContainer: LContainer, removeIndex: number,
91
85
  * @param removeIndex The index of the view to remove
92
86
  */
93
87
  export declare function removeView(lContainer: LContainer, containerHost: TElementNode | TContainerNode | TElementContainerNode, removeIndex: number): void;
94
- /** Gets the child of the given LViewData */
95
- export declare function getLViewChild(viewData: LViewData): LViewData | LContainer | null;
88
+ /** Gets the child of the given LView */
89
+ export declare function getLViewChild(lView: LView): LView | LContainer | null;
96
90
  /**
97
91
  * A standalone function which destroys an LView,
98
92
  * conducting cleanup (e.g. removing listeners, calling onDestroys).
99
93
  *
100
94
  * @param view The view to be destroyed.
101
95
  */
102
- export declare function destroyLView(view: LViewData): void;
96
+ export declare function destroyLView(view: LView): void;
103
97
  /**
104
98
  * Determines which LViewOrLContainer to jump to when traversing back up the
105
99
  * tree in destroyViewTree.
@@ -112,8 +106,8 @@ export declare function destroyLView(view: LViewData): void;
112
106
  * @param rootView The rootView, so we don't propagate too far up the view tree
113
107
  * @returns The correct parent LViewOrLContainer
114
108
  */
115
- export declare function getParentState(state: LViewData | LContainer, rootView: LViewData): LViewData | LContainer | null;
116
- export declare function getRenderParent(tNode: TNode, currentView: LViewData): RElement | null;
109
+ export declare function getParentState(state: LView | LContainer, rootView: LView): LView | LContainer | null;
110
+ export declare function getRenderParent(tNode: TNode, currentView: LView): RElement | null;
117
111
  /**
118
112
  * Returns whether a native element can be inserted into the given parent.
119
113
  *
@@ -132,7 +126,7 @@ export declare function getRenderParent(tNode: TNode, currentView: LViewData): R
132
126
  * @param currentView Current LView being processed.
133
127
  * @return boolean Whether the node should be inserted now (or delayed until later).
134
128
  */
135
- export declare function canInsertNativeNode(tNode: TNode, currentView: LViewData): boolean;
129
+ export declare function canInsertNativeNode(tNode: TNode, currentView: LView): boolean;
136
130
  /**
137
131
  * Inserts a native node before another native node for a given parent using {@link Renderer3}.
138
132
  * This is a utility function that can be used when native nodes were determined - it abstracts an
@@ -157,8 +151,8 @@ export declare function nativeNextSibling(renderer: Renderer3, node: RNode): RNo
157
151
  * @param currentView The current LView
158
152
  * @returns Whether or not the child was appended
159
153
  */
160
- export declare function appendChild(childEl: RNode | null | undefined, childTNode: TNode, currentView: LViewData): boolean;
161
- export declare function getBeforeNodeForView(index: number, views: LViewData[], containerNative: RComment): RComment;
154
+ export declare function appendChild(childEl: RNode | null | undefined, childTNode: TNode, currentView: LView): boolean;
155
+ export declare function getBeforeNodeForView(index: number, views: LView[], containerNative: RComment): RComment | RElement;
162
156
  /**
163
157
  * Removes the `child` element from the DOM if not in view and not projected.
164
158
  *
@@ -167,7 +161,7 @@ export declare function getBeforeNodeForView(index: number, views: LViewData[],
167
161
  * @param currentView The current LView
168
162
  * @returns Whether or not the child was removed
169
163
  */
170
- export declare function removeChild(childTNode: TNode, childEl: RNode | null, currentView: LViewData): boolean;
164
+ export declare function removeChild(childTNode: TNode, childEl: RNode | null, currentView: LView): boolean;
171
165
  /**
172
166
  * Appends a projected node to the DOM, or in the case of a projected container,
173
167
  * appends the nodes from all of the container's active views to the DOM.
@@ -177,4 +171,4 @@ export declare function removeChild(childTNode: TNode, childEl: RNode | null, cu
177
171
  * @param currentView Current LView
178
172
  * @param projectionView Projection view (view above current)
179
173
  */
180
- export declare function appendProjectedNode(projectedTNode: TNode, tProjectionNode: TNode, currentView: LViewData, projectionView: LViewData): void;
174
+ export declare function appendProjectedNode(projectedTNode: TNode, tProjectionNode: TNode, currentView: LView, projectionView: LView): void;
@@ -15,8 +15,8 @@ import { CssSelector, CssSelectorList } from './interfaces/projection';
15
15
  * @param selector
16
16
  * @returns true if node matches the selector.
17
17
  */
18
- export declare function isNodeMatchingSelector(tNode: TNode, selector: CssSelector): boolean;
19
- export declare function isNodeMatchingSelectorList(tNode: TNode, selector: CssSelectorList): boolean;
18
+ export declare function isNodeMatchingSelector(tNode: TNode, selector: CssSelector, isProjectionMode: boolean): boolean;
19
+ export declare function isNodeMatchingSelectorList(tNode: TNode, selector: CssSelectorList, isProjectionMode?: boolean): boolean;
20
20
  export declare function getProjectAsAttrValue(tNode: TNode): string | null;
21
21
  /**
22
22
  * Checks a given node against matching selectors and returns
@@ -5,18 +5,15 @@
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 { Sanitizer } from '../sanitization/security';
8
+ import { ComponentDef, DirectiveDef } from './interfaces/definition';
9
9
  import { TElementNode, TNode, TViewNode } from './interfaces/node';
10
10
  import { LQueries } from './interfaces/query';
11
- import { Renderer3, RendererFactory3 } from './interfaces/renderer';
12
- import { LViewData, OpaqueViewState, TView } from './interfaces/view';
13
- export declare function getRenderer(): Renderer3;
14
- export declare function setRenderer(r: Renderer3): void;
15
- export declare function getRendererFactory(): RendererFactory3;
16
- export declare function getCurrentSanitizer(): Sanitizer | null;
11
+ import { LView, OpaqueViewState } from './interfaces/view';
17
12
  export declare function getElementDepthCount(): number;
18
13
  export declare function increaseElementDepthCount(): void;
19
14
  export declare function decreaseElementDepthCount(): void;
15
+ export declare function getCurrentDirectiveDef(): DirectiveDef<any> | ComponentDef<any> | null;
16
+ export declare function setCurrentDirectiveDef(def: DirectiveDef<any> | ComponentDef<any> | null): void;
20
17
  export declare function getBindingsEnabled(): boolean;
21
18
  /**
22
19
  * Enables directive matching on elements.
@@ -54,15 +51,7 @@ export declare function enableBindings(): void;
54
51
  * ```
55
52
  */
56
53
  export declare function disableBindings(): void;
57
- /**
58
- * Returns the current OpaqueViewState instance.
59
- *
60
- * Used in conjunction with the restoreView() instruction to save a snapshot
61
- * of the current view and restore it when listeners are invoked. This allows
62
- * walking the declaration view tree in listeners to get vars from parent views.
63
- */
64
- export declare function getCurrentView(): OpaqueViewState;
65
- export declare function _getViewData(): LViewData;
54
+ export declare function getLView(): LView;
66
55
  /**
67
56
  * Restores `contextViewData` to the given OpaqueViewState instance.
68
57
  *
@@ -75,12 +64,9 @@ export declare function _getViewData(): LViewData;
75
64
  export declare function restoreView(viewToRestore: OpaqueViewState): void;
76
65
  export declare function getPreviousOrParentTNode(): TNode;
77
66
  export declare function setPreviousOrParentTNode(tNode: TNode): void;
78
- export declare function setTNodeAndViewData(tNode: TNode, view: LViewData): void;
67
+ export declare function setTNodeAndViewData(tNode: TNode, view: LView): void;
79
68
  export declare function getIsParent(): boolean;
80
69
  export declare function setIsParent(value: boolean): void;
81
- export declare function getTView(): TView;
82
- export declare function getCurrentQueries(): LQueries | null;
83
- export declare function setCurrentQueries(queries: LQueries | null): void;
84
70
  /**
85
71
  * Query instructions can ask for "current queries" in 2 different cases:
86
72
  * - when creating view queries (at the root of a component view, before any node is created - in
@@ -91,16 +77,9 @@ export declare function setCurrentQueries(queries: LQueries | null): void;
91
77
  export declare function getOrCreateCurrentQueries(QueryType: {
92
78
  new (parent: null, shallow: null, deep: null): LQueries;
93
79
  }): LQueries;
94
- export declare function getCreationMode(): boolean;
95
- /**
96
- * Internal function that returns the current LViewData instance.
97
- *
98
- * The getCurrentView() instruction should be used for anything public.
99
- */
100
- export declare function getViewData(): LViewData;
101
- export declare function getContextViewData(): LViewData;
102
- export declare function getCleanup(view: LViewData): any[];
103
- export declare function getTViewCleanup(view: LViewData): any[];
80
+ /** Checks whether a given view is in creation mode */
81
+ export declare function isCreationMode(view?: LView): boolean;
82
+ export declare function getContextLView(): LView;
104
83
  export declare function getCheckNoChangesMode(): boolean;
105
84
  export declare function setCheckNoChangesMode(mode: boolean): void;
106
85
  export declare function getFirstTemplatePass(): boolean;
@@ -119,7 +98,7 @@ export declare function setBindingRoot(value: number): void;
119
98
  * @param host Element to which the View is a child of
120
99
  * @returns the previous state;
121
100
  */
122
- export declare function enterView(newView: LViewData, hostTNode: TElementNode | TViewNode | null): LViewData;
101
+ export declare function enterView(newView: LView, hostTNode: TElementNode | TViewNode | null): LView;
123
102
  export declare function nextContextImpl<T = any>(level?: number): T;
124
103
  /**
125
104
  * Resets the application state.
@@ -130,11 +109,5 @@ export declare function resetComponentState(): void;
130
109
  * the direction of traversal (up or down the view tree) a bit clearer.
131
110
  *
132
111
  * @param newView New state to become active
133
- * @param creationOnly An optional boolean to indicate that the view was processed in creation mode
134
- * only, i.e. the first update will be done later. Only possible for dynamically created views.
135
112
  */
136
- export declare function leaveView(newView: LViewData, creationOnly?: boolean): void;
137
- export declare function assertPreviousIsParent(): void;
138
- export declare function assertHasParent(): void;
139
- export declare function assertDataInRange(index: number, arr?: any[]): void;
140
- export declare function assertDataNext(index: number, arr?: any[]): void;
113
+ export declare function leaveView(newView: LView): void;