@angular/core 12.1.0 → 12.1.4

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 (159) hide show
  1. package/bundles/core-testing.umd.js +15 -4
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core.umd.js +91 -41
  4. package/bundles/core.umd.js.map +1 -1
  5. package/core.d.ts +14 -12
  6. package/core.metadata.json +1 -1
  7. package/esm2015/src/application_init.js +5 -5
  8. package/esm2015/src/application_ref.js +6 -2
  9. package/esm2015/src/change_detection/differs/iterable_differs.js +1 -1
  10. package/esm2015/src/compiler/compiler_facade.js +31 -8
  11. package/esm2015/src/compiler/compiler_facade_interface.js +1 -1
  12. package/esm2015/src/di/jit/injectable.js +4 -3
  13. package/esm2015/src/di/r3_injector.js +5 -2
  14. package/esm2015/src/error_handler.js +4 -8
  15. package/esm2015/src/errors.js +2 -2
  16. package/esm2015/src/event_emitter.js +1 -1
  17. package/esm2015/src/linker/component_factory_resolver.js +1 -1
  18. package/esm2015/src/linker/template_ref.js +1 -1
  19. package/esm2015/src/linker/view_container_ref.js +1 -1
  20. package/esm2015/src/metadata/di.js +1 -1
  21. package/esm2015/src/render3/component_ref.js +1 -1
  22. package/esm2015/src/render3/jit/directive.js +6 -5
  23. package/esm2015/src/render3/jit/module.js +7 -4
  24. package/esm2015/src/render3/jit/partial.js +27 -9
  25. package/esm2015/src/render3/jit/pipe.js +5 -3
  26. package/esm2015/src/render3/ng_module_ref.js +1 -1
  27. package/esm2015/src/render3/view_ref.js +1 -1
  28. package/esm2015/src/sanitization/bypass.js +1 -1
  29. package/esm2015/src/version.js +1 -1
  30. package/esm2015/src/view/entrypoint.js +1 -1
  31. package/esm2015/src/view/refs.js +1 -1
  32. package/esm2015/testing/src/ng_zone_mock.js +1 -1
  33. package/esm2015/testing/src/r3_test_bed_compiler.js +4 -1
  34. package/esm2015/testing/src/resolvers.js +1 -1
  35. package/esm2015/testing/src/test_bed.js +12 -4
  36. package/fesm2015/core.js +91 -41
  37. package/fesm2015/core.js.map +1 -1
  38. package/fesm2015/testing.js +15 -4
  39. package/fesm2015/testing.js.map +1 -1
  40. package/package.json +1 -1
  41. package/schematics/migrations/missing-injectable/providers_evaluator.js +1 -1
  42. package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.js +1 -1
  43. package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.js +1 -1
  44. package/schematics/migrations.json +1 -1
  45. package/src/r3_symbols.d.ts +2 -3
  46. package/testing/testing.d.ts +2 -1
  47. package/testing/testing.metadata.json +1 -1
  48. package/testing.d.ts +1 -1
  49. package/schematics/migrations/abstract-control-parent/abstract-control-parent.externs.js +0 -0
  50. package/schematics/migrations/abstract-control-parent/index.mjs +0 -47
  51. package/schematics/migrations/abstract-control-parent/util.mjs +0 -50
  52. package/schematics/migrations/activated-route-snapshot-fragment/activated-route-snapshot-fragment.externs.js +0 -0
  53. package/schematics/migrations/activated-route-snapshot-fragment/index.mjs +0 -48
  54. package/schematics/migrations/activated-route-snapshot-fragment/util.mjs +0 -33
  55. package/schematics/migrations/can-activate-with-redirect-to/can-activate-with-redirect-to.externs.js +0 -0
  56. package/schematics/migrations/can-activate-with-redirect-to/index.mjs +0 -44
  57. package/schematics/migrations/can-activate-with-redirect-to/util.mjs +0 -55
  58. package/schematics/migrations/deep-shadow-piercing-selector/deep-shadow-piercing-selector.externs.js +0 -0
  59. package/schematics/migrations/deep-shadow-piercing-selector/index.mjs +0 -36
  60. package/schematics/migrations/dynamic-queries/dynamic-queries.externs.js +0 -0
  61. package/schematics/migrations/dynamic-queries/index.mjs +0 -51
  62. package/schematics/migrations/dynamic-queries/util.mjs +0 -65
  63. package/schematics/migrations/initial-navigation/collector.mjs +0 -105
  64. package/schematics/migrations/initial-navigation/index.mjs +0 -61
  65. package/schematics/migrations/initial-navigation/initial-navigation.externs.js +0 -0
  66. package/schematics/migrations/initial-navigation/transform.mjs +0 -54
  67. package/schematics/migrations/initial-navigation/update_recorder.mjs +0 -9
  68. package/schematics/migrations/initial-navigation/util.mjs +0 -28
  69. package/schematics/migrations/missing-injectable/definition_collector.mjs +0 -75
  70. package/schematics/migrations/missing-injectable/index.mjs +0 -100
  71. package/schematics/migrations/missing-injectable/missing-injectable.externs.js +0 -0
  72. package/schematics/migrations/missing-injectable/providers_evaluator.mjs +0 -50
  73. package/schematics/migrations/missing-injectable/transform.mjs +0 -187
  74. package/schematics/migrations/missing-injectable/update_recorder.mjs +0 -9
  75. package/schematics/migrations/module-with-providers/collector.mjs +0 -59
  76. package/schematics/migrations/module-with-providers/index.mjs +0 -71
  77. package/schematics/migrations/module-with-providers/module-with-providers.externs.js +0 -0
  78. package/schematics/migrations/module-with-providers/transform.mjs +0 -134
  79. package/schematics/migrations/module-with-providers/util.mjs +0 -25
  80. package/schematics/migrations/move-document/document_import_visitor.mjs +0 -60
  81. package/schematics/migrations/move-document/index.mjs +0 -71
  82. package/schematics/migrations/move-document/move-document.externs.js +0 -0
  83. package/schematics/migrations/move-document/move-import.mjs +0 -45
  84. package/schematics/migrations/native-view-encapsulation/index.mjs +0 -41
  85. package/schematics/migrations/native-view-encapsulation/native-view-encapsulation.externs.js +0 -0
  86. package/schematics/migrations/native-view-encapsulation/util.mjs +0 -34
  87. package/schematics/migrations/navigation-extras-omissions/index.mjs +0 -47
  88. package/schematics/migrations/navigation-extras-omissions/navigation-extras-omissions.externs.js +0 -0
  89. package/schematics/migrations/navigation-extras-omissions/util.mjs +0 -111
  90. package/schematics/migrations/relative-link-resolution/collector.mjs +0 -81
  91. package/schematics/migrations/relative-link-resolution/index.mjs +0 -62
  92. package/schematics/migrations/relative-link-resolution/relative-link-resolution.externs.js +0 -0
  93. package/schematics/migrations/relative-link-resolution/transform.mjs +0 -51
  94. package/schematics/migrations/relative-link-resolution/update_recorder.mjs +0 -9
  95. package/schematics/migrations/relative-link-resolution/util.mjs +0 -28
  96. package/schematics/migrations/renderer-to-renderer2/helpers.mjs +0 -224
  97. package/schematics/migrations/renderer-to-renderer2/index.mjs +0 -113
  98. package/schematics/migrations/renderer-to-renderer2/migration.mjs +0 -211
  99. package/schematics/migrations/renderer-to-renderer2/renderer-to-renderer2.externs.js +0 -0
  100. package/schematics/migrations/renderer-to-renderer2/util.mjs +0 -69
  101. package/schematics/migrations/router-preserve-query-params/index.mjs +0 -50
  102. package/schematics/migrations/router-preserve-query-params/router-preserve-query-params.externs.js +0 -0
  103. package/schematics/migrations/router-preserve-query-params/util.mjs +0 -88
  104. package/schematics/migrations/static-queries/angular/directive_inputs.mjs +0 -70
  105. package/schematics/migrations/static-queries/angular/ng_query_visitor.mjs +0 -113
  106. package/schematics/migrations/static-queries/angular/query-definition.mjs +0 -20
  107. package/schematics/migrations/static-queries/angular/super_class.mjs +0 -21
  108. package/schematics/migrations/static-queries/index.mjs +0 -206
  109. package/schematics/migrations/static-queries/static-queries.externs.js +0 -0
  110. package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.mjs +0 -200
  111. package/schematics/migrations/static-queries/strategies/test_strategy/test_strategy.mjs +0 -24
  112. package/schematics/migrations/static-queries/strategies/timing-strategy.mjs +0 -9
  113. package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.mjs +0 -355
  114. package/schematics/migrations/static-queries/strategies/usage_strategy/super_class_context.mjs +0 -38
  115. package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.mjs +0 -80
  116. package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.mjs +0 -154
  117. package/schematics/migrations/static-queries/transform.mjs +0 -88
  118. package/schematics/migrations/template-var-assignment/analyze_template.mjs +0 -25
  119. package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.mjs +0 -65
  120. package/schematics/migrations/template-var-assignment/index.mjs +0 -68
  121. package/schematics/migrations/template-var-assignment/template-var-assignment.externs.js +0 -0
  122. package/schematics/migrations/undecorated-classes-with-decorated-fields/index.mjs +0 -92
  123. package/schematics/migrations/undecorated-classes-with-decorated-fields/transform.mjs +0 -286
  124. package/schematics/migrations/undecorated-classes-with-decorated-fields/undecorated-classes-with-decorated-fields.externs.js +0 -0
  125. package/schematics/migrations/undecorated-classes-with-decorated-fields/update_recorder.mjs +0 -9
  126. package/schematics/migrations/undecorated-classes-with-di/create_ngc_program.mjs +0 -43
  127. package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/convert_directive_metadata.mjs +0 -82
  128. package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/decorator_rewriter.mjs +0 -102
  129. package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/import_rewrite_visitor.mjs +0 -111
  130. package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/path_format.mjs +0 -17
  131. package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/source_file_exports.mjs +0 -51
  132. package/schematics/migrations/undecorated-classes-with-di/index.mjs +0 -162
  133. package/schematics/migrations/undecorated-classes-with-di/ng_declaration_collector.mjs +0 -124
  134. package/schematics/migrations/undecorated-classes-with-di/transform.mjs +0 -356
  135. package/schematics/migrations/undecorated-classes-with-di/undecorated-classes-with-di.externs.js +0 -0
  136. package/schematics/migrations/undecorated-classes-with-di/update_recorder.mjs +0 -9
  137. package/schematics/migrations/wait-for-async/index.mjs +0 -76
  138. package/schematics/migrations/wait-for-async/util.mjs +0 -23
  139. package/schematics/migrations/wait-for-async/wait-for-async.externs.js +0 -0
  140. package/schematics/migrations/xhr-factory/index.mjs +0 -91
  141. package/schematics/migrations/xhr-factory/xhr-factory.externs.js +0 -0
  142. package/schematics/utils/import_manager.mjs +0 -197
  143. package/schematics/utils/line_mappings.mjs +0 -60
  144. package/schematics/utils/ng_component_template.mjs +0 -96
  145. package/schematics/utils/ng_decorators.mjs +0 -23
  146. package/schematics/utils/parse_html.mjs +0 -24
  147. package/schematics/utils/project_tsconfig_paths.mjs +0 -74
  148. package/schematics/utils/schematics_prompt.mjs +0 -30
  149. package/schematics/utils/typescript/class_declaration.mjs +0 -33
  150. package/schematics/utils/typescript/compiler_host.mjs +0 -66
  151. package/schematics/utils/typescript/decorators.mjs +0 -20
  152. package/schematics/utils/typescript/find_base_classes.mjs +0 -30
  153. package/schematics/utils/typescript/functions.mjs +0 -28
  154. package/schematics/utils/typescript/imports.mjs +0 -91
  155. package/schematics/utils/typescript/nodes.mjs +0 -57
  156. package/schematics/utils/typescript/parse_tsconfig.mjs +0 -26
  157. package/schematics/utils/typescript/property_name.mjs +0 -23
  158. package/schematics/utils/typescript/symbol.mjs +0 -72
  159. package/schematics/utils/utils.externs.js +0 -0
package/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v12.1.0
2
+ * @license Angular v12.1.4
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -238,11 +238,11 @@ export declare const APP_ID: InjectionToken<string>;
238
238
  * through DI.
239
239
  *
240
240
  * ```
241
- * function initializeApp(httpClient: HttpClient): Observable<any> {
242
- * return httpClient.get("https://someUrl.com/api/user")
241
+ * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {
242
+ * return () => httpClient.get("https://someUrl.com/api/user")
243
243
  * .pipe(
244
244
  * tap(user => { ... })
245
- * )
245
+ * );
246
246
  * }
247
247
  *
248
248
  * @NgModule({
@@ -251,7 +251,7 @@ export declare const APP_ID: InjectionToken<string>;
251
251
  * bootstrap: [AppComponent],
252
252
  * providers: [{
253
253
  * provide: APP_INITIALIZER,
254
- * useFactory: initializeApp,
254
+ * useFactory: initializeAppFactory,
255
255
  * deps: [HttpClient],
256
256
  * multi: true
257
257
  * }]
@@ -1176,7 +1176,7 @@ export { ComponentFactory as ɵComponentFactory }
1176
1176
  * @see [Dynamic Components](guide/dynamic-component-loader)
1177
1177
  * @see [Usage Example](guide/dynamic-component-loader#resolving-components)
1178
1178
  * @see <live-example name="dynamic-component-loader" noDownload></live-example>
1179
- of the code in this cookbook
1179
+ of the code in this cookbook
1180
1180
  * @publicApi
1181
1181
  */
1182
1182
  export declare abstract class ComponentFactoryResolver {
@@ -5547,8 +5547,8 @@ declare const PREORDER_HOOK_FLAGS = 18;
5547
5547
  /** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
5548
5548
  declare const enum PreOrderHookFlags {
5549
5549
  /**
5550
- The index of the next pre-order hook to be called in the hooks array, on the first 16
5551
- bits
5550
+ The index of the next pre-order hook to be called in the hooks array, on the first 16
5551
+ bits
5552
5552
  */
5553
5553
  IndexOfTheNextPreOrderHookMaskMask = 65535,
5554
5554
  /**
@@ -8067,7 +8067,7 @@ export declare interface TrackByFunction<T> {
8067
8067
  * @param index The index of the item within the iterable.
8068
8068
  * @param item The item in the iterable.
8069
8069
  */
8070
- <U extends T>(index: number, item: U): any;
8070
+ <U extends T>(index: number, item: T & U): any;
8071
8071
  }
8072
8072
 
8073
8073
  /**
@@ -8784,9 +8784,9 @@ export declare interface ViewChildrenDecorator {
8784
8784
  * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
8785
8785
  * with `@ViewChildren('cmp')`)
8786
8786
  * * Any provider defined in the child component tree of the current component (e.g.
8787
- * `@ViewChildren(SomeService) someService: SomeService`)
8788
- * * Any provider defined through a string token (e.g. `@ViewChildren('someToken') someTokenVal:
8789
- * any`)
8787
+ * `@ViewChildren(SomeService) someService!: SomeService`)
8788
+ * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')
8789
+ * someTokenVal!: any`)
8790
8790
  * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)
8791
8791
  * template;`)
8792
8792
  *
@@ -8875,6 +8875,8 @@ export declare abstract class ViewContainerRef {
8875
8875
  * Instantiates an embedded view and inserts it
8876
8876
  * into this container.
8877
8877
  * @param templateRef The HTML template that defines the view.
8878
+ * @param context The data-binding context of the embedded view, as declared
8879
+ * in the `<ng-template>` usage.
8878
8880
  * @param index The 0-based index at which to insert the new view into this container.
8879
8881
  * If not specified, appends the new view as the last entry.
8880
8882
  *