@angular/core 12.0.0 → 12.0.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 (34) hide show
  1. package/bundles/core-testing.umd.js +46 -83
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core.umd.js +33 -17
  4. package/bundles/core.umd.js.map +1 -1
  5. package/core.d.ts +245 -17
  6. package/core.metadata.json +1 -1
  7. package/esm2015/src/change_detection/differs/iterable_differs.js +1 -1
  8. package/esm2015/src/debug/debug_node.js +1 -1
  9. package/esm2015/src/di/injectable.js +1 -1
  10. package/esm2015/src/linker/component_factory_resolver.js +4 -1
  11. package/esm2015/src/metadata/di.js +1 -1
  12. package/esm2015/src/metadata/do_boostrap.js +1 -1
  13. package/esm2015/src/metadata/ng_module.js +1 -1
  14. package/esm2015/src/metadata/schema.js +5 -1
  15. package/esm2015/src/render3/instructions/listener.js +6 -3
  16. package/esm2015/src/render3/util/discovery_utils.js +18 -12
  17. package/esm2015/src/render3/view_ref.js +3 -3
  18. package/esm2015/src/version.js +1 -1
  19. package/esm2015/testing/src/fake_async.js +42 -25
  20. package/esm2015/testing/src/test_bed.js +5 -25
  21. package/esm2015/testing/src/testing_internal.js +1 -182
  22. package/fesm2015/core.js +33 -17
  23. package/fesm2015/core.js.map +1 -1
  24. package/fesm2015/testing.js +46 -76
  25. package/fesm2015/testing.js.map +1 -1
  26. package/package.json +2 -5
  27. package/schematics/migrations/deep-shadow-piercing-selector/index.d.ts +10 -0
  28. package/schematics/migrations/deep-shadow-piercing-selector/index.js +49 -0
  29. package/schematics/migrations.json +5 -0
  30. package/src/r3_symbols.d.ts +4 -1
  31. package/testing/testing.d.ts +42 -30
  32. package/testing/testing.metadata.json +1 -1
  33. package/testing.d.ts +1 -1
  34. package/esm2015/testing/src/async_test_completer.js +0 -28
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v12.0.0
2
+ * @license Angular v12.0.4
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -6888,6 +6888,10 @@
6888
6888
  /**
6889
6889
  * Defines a schema that allows any property on any element.
6890
6890
  *
6891
+ * This schema allows you to ignore the errors related to any unknown elements or properties in a
6892
+ * template. The usage of this schema is generally discouraged because it prevents useful validation
6893
+ * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
6894
+ *
6891
6895
  * @publicApi
6892
6896
  */
6893
6897
  var NO_ERRORS_SCHEMA = {
@@ -12386,17 +12390,19 @@
12386
12390
  *
12387
12391
  * @usageNotes
12388
12392
  * Given the following DOM structure:
12393
+ *
12389
12394
  * ```html
12390
- * <my-app>
12395
+ * <app-root>
12391
12396
  * <div>
12392
12397
  * <child-comp></child-comp>
12393
12398
  * </div>
12394
- * </my-app>
12399
+ * </app-root>
12395
12400
  * ```
12401
+ *
12396
12402
  * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`
12397
12403
  * associated with this DOM element.
12398
12404
  *
12399
- * Calling the function on `<my-app>` will return the `MyApp` instance.
12405
+ * Calling the function on `<app-root>` will return the `MyApp` instance.
12400
12406
  *
12401
12407
  *
12402
12408
  * @param element DOM element from which the component should be retrieved.
@@ -12525,12 +12531,14 @@
12525
12531
  *
12526
12532
  * @usageNotes
12527
12533
  * Given the following DOM structure:
12528
- * ```
12529
- * <my-app>
12534
+ *
12535
+ * ```html
12536
+ * <app-root>
12530
12537
  * <button my-button></button>
12531
12538
  * <my-comp></my-comp>
12532
- * </my-app>
12539
+ * </app-root>
12533
12540
  * ```
12541
+ *
12534
12542
  * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
12535
12543
  * directive that is associated with the DOM node.
12536
12544
  *
@@ -12650,14 +12658,16 @@
12650
12658
  *
12651
12659
  * @usageNotes
12652
12660
  * Given the following DOM structure:
12653
- * ```
12654
- * <my-app>
12655
- * <div (click)="doSomething()"></div>
12656
- * </my-app>
12657
12661
  *
12662
+ * ```html
12663
+ * <app-root>
12664
+ * <div (click)="doSomething()"></div>
12665
+ * </app-root>
12658
12666
  * ```
12667
+ *
12659
12668
  * Calling `getListeners` on `<div>` will return an object that looks as follows:
12660
- * ```
12669
+ *
12670
+ * ```ts
12661
12671
  * {
12662
12672
  * name: 'click',
12663
12673
  * element: <div>,
@@ -15721,8 +15731,11 @@
15721
15731
  var lCleanup = getOrCreateLViewCleanup(lView);
15722
15732
  ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */);
15723
15733
  var processOutputs = true;
15724
- // add native event listener - applicable to elements only
15725
- if (tNode.type & 3 /* AnyRNode */) {
15734
+ // Adding a native event listener is applicable when:
15735
+ // - The corresponding TNode represents a DOM element.
15736
+ // - The event target has a resolver (usually resulting in a global object,
15737
+ // such as `window` or `document`).
15738
+ if ((tNode.type & 3 /* AnyRNode */) || eventTargetResolver) {
15726
15739
  var native = getNativeByTNode(tNode, lView);
15727
15740
  var target = eventTargetResolver ? eventTargetResolver(native) : native;
15728
15741
  var lCleanupIndex = lCleanup.length;
@@ -21782,6 +21795,9 @@
21782
21795
  * then use the factory's `create()` method to create a component of that type.
21783
21796
  *
21784
21797
  * @see [Dynamic Components](guide/dynamic-component-loader)
21798
+ * @see [Usage Example](guide/dynamic-component-loader#resolving-components)
21799
+ * @see <live-example name="dynamic-component-loader" noDownload></live-example>
21800
+ of the code in this cookbook
21785
21801
  * @publicApi
21786
21802
  */
21787
21803
  var ComponentFactoryResolver = /** @class */ (function () {
@@ -22022,7 +22038,7 @@
22022
22038
  /**
22023
22039
  * @publicApi
22024
22040
  */
22025
- var VERSION = new Version('12.0.0');
22041
+ var VERSION = new Version('12.0.4');
22026
22042
 
22027
22043
  /**
22028
22044
  * @license
@@ -23248,7 +23264,7 @@
23248
23264
  *
23249
23265
  * ```typescript
23250
23266
  * @Component({
23251
- * selector: 'my-app',
23267
+ * selector: 'app-root',
23252
23268
  * template: `Number of ticks: {{numberOfTicks}}`
23253
23269
  * changeDetection: ChangeDetectionStrategy.OnPush,
23254
23270
  * })
@@ -23368,7 +23384,7 @@
23368
23384
  * }
23369
23385
  *
23370
23386
  * @Component({
23371
- * selector: 'my-app',
23387
+ * selector: 'app-root',
23372
23388
  * providers: [DataProvider],
23373
23389
  * template: `
23374
23390
  * Live Update: <input type="checkbox" [(ngModel)]="live">