@angular/core 13.2.1 → 13.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,5 +21,5 @@ export class Version {
21
21
  /**
22
22
  * @publicApi
23
23
  */
24
- export const VERSION = new Version('13.2.1');
24
+ export const VERSION = new Version('13.2.2');
25
25
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc3JjL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7R0FJRztBQUNILE1BQU0sT0FBTyxPQUFPO0lBS2xCLFlBQW1CLElBQVk7UUFBWixTQUFJLEdBQUosSUFBSSxDQUFRO1FBQzdCLElBQUksQ0FBQyxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUNoQyxJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDaEMsSUFBSSxDQUFDLEtBQUssR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDbEQsQ0FBQztDQUNGO0FBRUQ7O0dBRUc7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsSUFBSSxPQUFPLENBQUMsbUJBQW1CLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuXG4vKipcbiAqIEBkZXNjcmlwdGlvbiBSZXByZXNlbnRzIHRoZSB2ZXJzaW9uIG9mIEFuZ3VsYXJcbiAqXG4gKiBAcHVibGljQXBpXG4gKi9cbmV4cG9ydCBjbGFzcyBWZXJzaW9uIHtcbiAgcHVibGljIHJlYWRvbmx5IG1ham9yOiBzdHJpbmc7XG4gIHB1YmxpYyByZWFkb25seSBtaW5vcjogc3RyaW5nO1xuICBwdWJsaWMgcmVhZG9ubHkgcGF0Y2g6IHN0cmluZztcblxuICBjb25zdHJ1Y3RvcihwdWJsaWMgZnVsbDogc3RyaW5nKSB7XG4gICAgdGhpcy5tYWpvciA9IGZ1bGwuc3BsaXQoJy4nKVswXTtcbiAgICB0aGlzLm1pbm9yID0gZnVsbC5zcGxpdCgnLicpWzFdO1xuICAgIHRoaXMucGF0Y2ggPSBmdWxsLnNwbGl0KCcuJykuc2xpY2UoMikuam9pbignLicpO1xuICB9XG59XG5cbi8qKlxuICogQHB1YmxpY0FwaVxuICovXG5leHBvcnQgY29uc3QgVkVSU0lPTiA9IG5ldyBWZXJzaW9uKCcwLjAuMC1QTEFDRUhPTERFUicpO1xuIl19
@@ -26,9 +26,9 @@ export class Log {
26
26
  return this.logItems.join('; ');
27
27
  }
28
28
  }
29
- Log.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Log, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
30
- Log.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Log });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Log, decorators: [{
29
+ Log.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: Log, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
30
+ Log.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: Log });
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: Log, decorators: [{
32
32
  type: Injectable
33
33
  }], ctorParameters: function () { return []; } });
34
34
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29yZS90ZXN0aW5nL3NyYy9sb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQzs7QUFHekMsTUFBTSxPQUFPLEdBQUc7SUFHZDtRQUNFLElBQUksQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0lBQ3JCLENBQUM7SUFFRCxHQUFHLENBQUMsS0FBVSxDQUFDLGlCQUFpQjtRQUM5QixJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUM1QixDQUFDO0lBRUQsRUFBRSxDQUFDLEtBQVUsQ0FBQyxpQkFBaUI7UUFDN0IsT0FBTyxDQUFDLEtBQVUsSUFBSSxFQUFFLEtBQVUsSUFBSSxFQUFFLEtBQVUsSUFBSSxFQUFFLEtBQVUsSUFBSSxFQUFFLEtBQVUsSUFBSSxFQUFFLEVBQUU7WUFDeEYsSUFBSSxDQUF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LCBhNDogYW55ID0gbnVsbCwgYTU6IGFueSA9IG51bGwpID0+IHtcbiAgICAgIHRoaXMubG9nSXRlbXMucHVzaCh2YWx1ZSk7XG4gICAgfTtcbiAgfVxuXG4gIGNsZWFyKCk6IHZvaWQge1xuICAgIHRoaXMubG9nSXRlbXMgPSBbXTtcbiAgfVxuXG4gIHJlc3VsdCgpOiBzdHJpbmcge1xuICAgIHJldHVybiB0aGlzLmxvZ0l0ZW1zLmpvaW4oJzsgJyk7XG4gIH1cbn1cbiJdfQ==
@@ -25,9 +25,9 @@ export class MockNgZone extends NgZone {
25
25
  this.onStable.emit(null);
26
26
  }
27
27
  }
28
- MockNgZone.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: MockNgZone, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
- MockNgZone.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: MockNgZone });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: MockNgZone, decorators: [{
28
+ MockNgZone.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MockNgZone, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ MockNgZone.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MockNgZone });
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MockNgZone, decorators: [{
31
31
  type: Injectable
32
32
  }], ctorParameters: function () { return []; } });
33
33
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmdfem9uZV9tb2NrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29yZS90ZXN0aW5nL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W5qZWN0YWJsZSwgTmdab25lfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuXG4vKipcbiAqIEEgbW9jayBpbXBsZW1lbnRhdGlvbiBvZiB7QGxpbmsgTmdab25lfS5cbiAqL1xuQEluamVjdGFibGUoKVxuZXhwb3J0IGNsYXNzIE1vY2tOZ1pvbmUgZXh0ZW5kcyBOZ1pvbmUge1xuICBvdmVycmlkZSBvblN0YWJsZTogRXZlbnRFbWl0dGVyPGFueT4gPSBuZXcgRXZlbnRFbWl0dGVyKGZhbHNlKTtcblxuICBjb25zdHJ1Y3RvcigpIHtcbiAgICBzdXBlcih7ZW5hYmxlTG9uZ1N0YWNrVHJhY2U6IGZhbHNlLCBzaG91bGRDb2FsZXNjZUV2ZW50Q2hhbmdlRGV0ZWN0aW9uOiBmYWxzZX0pO1xuICB9XG5cbiAgb3ZlcnJpZGUgcnVuKGZuOiBGdW5jdGlvbik6IGFueSB7XG4gICAgcmV0dXJuIGZuKCk7XG4gIH1cblxuICBvdmVycmlkZSBydW5PdXRzaWRlQW5ndWxhcihmbjogRnVuY3Rpb24pOiBhbnkge1xuICAgIHJldHVybiBmbigpO1xuICB9XG5cbiAgc2ltdWxhdGVab25lRXhpdCgpOiB2b2lkIHtcbiAgICB0aGlzLm9uU3RhYmxlLmVtaXQobnVsbCk7XG4gIH1cbn1cbiJdfQ==
package/fesm2015/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v13.2.1
2
+ * @license Angular v13.2.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -21076,7 +21076,7 @@ class Version {
21076
21076
  /**
21077
21077
  * @publicApi
21078
21078
  */
21079
- const VERSION = new Version('13.2.1');
21079
+ const VERSION = new Version('13.2.2');
21080
21080
 
21081
21081
  /**
21082
21082
  * @license
@@ -25992,26 +25992,7 @@ class PlatformRef {
25992
25992
  this._destroyed = false;
25993
25993
  }
25994
25994
  /**
25995
- * Creates an instance of an `@NgModule` for the given platform for offline compilation.
25996
- *
25997
- * @usageNotes
25998
- *
25999
- * The following example creates the NgModule for a browser platform.
26000
- *
26001
- * ```typescript
26002
- * my_module.ts:
26003
- *
26004
- * @NgModule({
26005
- * imports: [BrowserModule]
26006
- * })
26007
- * class MyModule {}
26008
- *
26009
- * main.ts:
26010
- * import {MyModuleNgFactory} from './my_module.ngfactory';
26011
- * import {platformBrowser} from '@angular/platform-browser';
26012
- *
26013
- * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
26014
- * ```
25995
+ * Creates an instance of an `@NgModule` for the given platform.
26015
25996
  *
26016
25997
  * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
26017
25998
  * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
@@ -26065,7 +26046,7 @@ class PlatformRef {
26065
26046
  });
26066
26047
  }
26067
26048
  /**
26068
- * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
26049
+ * Creates an instance of an `@NgModule` for a given platform.
26069
26050
  *
26070
26051
  * @usageNotes
26071
26052
  * ### Simple Example
@@ -26812,8 +26793,6 @@ var ng_module_factory_loader_impl = {};
26812
26793
  * Use of this source code is governed by an MIT-style license that can be
26813
26794
  * found in the LICENSE file at https://angular.io/license
26814
26795
  */
26815
- // TODO(alxhub): recombine the interfaces and implementations here and move the docs back onto the
26816
- // original classes.
26817
26796
  /**
26818
26797
  * @publicApi
26819
26798
  */
@@ -26829,43 +26808,88 @@ class DebugEventListener {
26829
26808
  function asNativeElements(debugEls) {
26830
26809
  return debugEls.map((el) => el.nativeElement);
26831
26810
  }
26832
- class DebugNode__POST_R3__ {
26811
+ /**
26812
+ * @publicApi
26813
+ */
26814
+ class DebugNode {
26833
26815
  constructor(nativeNode) {
26834
26816
  this.nativeNode = nativeNode;
26835
26817
  }
26818
+ /**
26819
+ * The `DebugElement` parent. Will be `null` if this is the root element.
26820
+ */
26836
26821
  get parent() {
26837
26822
  const parent = this.nativeNode.parentNode;
26838
- return parent ? new DebugElement__POST_R3__(parent) : null;
26823
+ return parent ? new DebugElement(parent) : null;
26839
26824
  }
26825
+ /**
26826
+ * The host dependency injector. For example, the root element's component instance injector.
26827
+ */
26840
26828
  get injector() {
26841
26829
  return getInjector(this.nativeNode);
26842
26830
  }
26831
+ /**
26832
+ * The element's own component instance, if it has one.
26833
+ */
26843
26834
  get componentInstance() {
26844
26835
  const nativeElement = this.nativeNode;
26845
26836
  return nativeElement &&
26846
26837
  (getComponent$1(nativeElement) || getOwningComponent(nativeElement));
26847
26838
  }
26839
+ /**
26840
+ * An object that provides parent context for this element. Often an ancestor component instance
26841
+ * that governs this element.
26842
+ *
26843
+ * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
26844
+ * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
26845
+ * of heroes"`.
26846
+ */
26848
26847
  get context() {
26849
26848
  return getComponent$1(this.nativeNode) || getContext(this.nativeNode);
26850
26849
  }
26850
+ /**
26851
+ * The callbacks attached to the component's @Output properties and/or the element's event
26852
+ * properties.
26853
+ */
26851
26854
  get listeners() {
26852
26855
  return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');
26853
26856
  }
26857
+ /**
26858
+ * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
26859
+ * variable name.
26860
+ */
26854
26861
  get references() {
26855
26862
  return getLocalRefs(this.nativeNode);
26856
26863
  }
26864
+ /**
26865
+ * This component's injector lookup tokens. Includes the component itself plus the tokens that the
26866
+ * component lists in its providers metadata.
26867
+ */
26857
26868
  get providerTokens() {
26858
26869
  return getInjectionTokens(this.nativeNode);
26859
26870
  }
26860
26871
  }
26861
- class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26872
+ /**
26873
+ * @publicApi
26874
+ *
26875
+ * @see [Component testing scenarios](guide/testing-components-scenarios)
26876
+ * @see [Basics of testing components](guide/testing-components-basics)
26877
+ * @see [Testing utility APIs](guide/testing-utility-apis)
26878
+ */
26879
+ class DebugElement extends DebugNode {
26862
26880
  constructor(nativeNode) {
26863
26881
  ngDevMode && assertDomNode(nativeNode);
26864
26882
  super(nativeNode);
26865
26883
  }
26884
+ /**
26885
+ * The underlying DOM element at the root of the component.
26886
+ */
26866
26887
  get nativeElement() {
26867
26888
  return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;
26868
26889
  }
26890
+ /**
26891
+ * The element tag name, if it is an element.
26892
+ */
26869
26893
  get name() {
26870
26894
  const context = getLContext(this.nativeNode);
26871
26895
  if (context !== null) {
@@ -26906,6 +26930,9 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26906
26930
  collectPropertyBindings(properties, tNode, lView, tData);
26907
26931
  return properties;
26908
26932
  }
26933
+ /**
26934
+ * A map of attribute names to attribute values for an element.
26935
+ */
26909
26936
  get attributes() {
26910
26937
  const attributes = {};
26911
26938
  const element = this.nativeElement;
@@ -26954,12 +26981,29 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26954
26981
  }
26955
26982
  return attributes;
26956
26983
  }
26984
+ /**
26985
+ * The inline styles of the DOM element.
26986
+ *
26987
+ * Will be `null` if there is no `style` property on the underlying DOM element.
26988
+ *
26989
+ * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
26990
+ */
26957
26991
  get styles() {
26958
26992
  if (this.nativeElement && this.nativeElement.style) {
26959
26993
  return this.nativeElement.style;
26960
26994
  }
26961
26995
  return {};
26962
26996
  }
26997
+ /**
26998
+ * A map containing the class names on the element as keys.
26999
+ *
27000
+ * This map is derived from the `className` property of the DOM element.
27001
+ *
27002
+ * Note: The values of this object will always be `true`. The class key will not appear in the KV
27003
+ * object if it does not exist on the element.
27004
+ *
27005
+ * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
27006
+ */
26963
27007
  get classes() {
26964
27008
  const result = {};
26965
27009
  const element = this.nativeElement;
@@ -26969,15 +27013,23 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26969
27013
  classes.forEach((value) => result[value] = true);
26970
27014
  return result;
26971
27015
  }
27016
+ /**
27017
+ * The `childNodes` of the DOM element as a `DebugNode` array.
27018
+ *
27019
+ * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
27020
+ */
26972
27021
  get childNodes() {
26973
27022
  const childNodes = this.nativeNode.childNodes;
26974
27023
  const children = [];
26975
27024
  for (let i = 0; i < childNodes.length; i++) {
26976
27025
  const element = childNodes[i];
26977
- children.push(getDebugNode__POST_R3__(element));
27026
+ children.push(getDebugNode(element));
26978
27027
  }
26979
27028
  return children;
26980
27029
  }
27030
+ /**
27031
+ * The immediate `DebugElement` children. Walk the tree by descending through `children`.
27032
+ */
26981
27033
  get children() {
26982
27034
  const nativeElement = this.nativeElement;
26983
27035
  if (!nativeElement)
@@ -26986,24 +27038,45 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26986
27038
  const children = [];
26987
27039
  for (let i = 0; i < childNodes.length; i++) {
26988
27040
  const element = childNodes[i];
26989
- children.push(getDebugNode__POST_R3__(element));
27041
+ children.push(getDebugNode(element));
26990
27042
  }
26991
27043
  return children;
26992
27044
  }
27045
+ /**
27046
+ * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
27047
+ */
26993
27048
  query(predicate) {
26994
27049
  const results = this.queryAll(predicate);
26995
27050
  return results[0] || null;
26996
27051
  }
27052
+ /**
27053
+ * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
27054
+ */
26997
27055
  queryAll(predicate) {
26998
27056
  const matches = [];
26999
- _queryAllR3(this, predicate, matches, true);
27057
+ _queryAll(this, predicate, matches, true);
27000
27058
  return matches;
27001
27059
  }
27060
+ /**
27061
+ * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
27062
+ */
27002
27063
  queryAllNodes(predicate) {
27003
27064
  const matches = [];
27004
- _queryAllR3(this, predicate, matches, false);
27065
+ _queryAll(this, predicate, matches, false);
27005
27066
  return matches;
27006
27067
  }
27068
+ /**
27069
+ * Triggers the event by its name if there is a corresponding listener in the element's
27070
+ * `listeners` collection.
27071
+ *
27072
+ * If the event lacks a listener or there's some other problem, consider
27073
+ * calling `nativeElement.dispatchEvent(eventObject)`.
27074
+ *
27075
+ * @param eventName The name of the event to trigger
27076
+ * @param eventObj The _event object_ expected by the handler
27077
+ *
27078
+ * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
27079
+ */
27007
27080
  triggerEventHandler(eventName, eventObj) {
27008
27081
  const node = this.nativeNode;
27009
27082
  const invokedListeners = [];
@@ -27062,11 +27135,11 @@ function isPrimitiveValue(value) {
27062
27135
  return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||
27063
27136
  value === null;
27064
27137
  }
27065
- function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
27138
+ function _queryAll(parentElement, predicate, matches, elementsOnly) {
27066
27139
  const context = getLContext(parentElement.nativeNode);
27067
27140
  if (context !== null) {
27068
27141
  const parentTNode = context.lView[TVIEW].data[context.nodeIndex];
27069
- _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27142
+ _queryNodeChildren(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27070
27143
  }
27071
27144
  else {
27072
27145
  // If the context is null, then `parentElement` was either created with Renderer2 or native DOM
@@ -27084,26 +27157,26 @@ function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
27084
27157
  * @param elementsOnly whether only elements should be searched
27085
27158
  * @param rootNativeNode the root native node on which predicate should not be matched
27086
27159
  */
27087
- function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
27160
+ function _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
27088
27161
  ngDevMode && assertTNodeForLView(tNode, lView);
27089
27162
  const nativeNode = getNativeByTNodeOrNull(tNode, lView);
27090
27163
  // For each type of TNode, specific logic is executed.
27091
27164
  if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {
27092
27165
  // Case 1: the TNode is an element
27093
27166
  // The native node has to be checked.
27094
- _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27167
+ _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27095
27168
  if (isComponentHost(tNode)) {
27096
27169
  // If the element is the host of a component, then all nodes in its view have to be processed.
27097
27170
  // Note: the component's content (tNode.child) will be processed from the insertion points.
27098
27171
  const componentView = getComponentLViewByIndex(tNode.index, lView);
27099
27172
  if (componentView && componentView[TVIEW].firstChild) {
27100
- _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
27173
+ _queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
27101
27174
  }
27102
27175
  }
27103
27176
  else {
27104
27177
  if (tNode.child) {
27105
27178
  // Otherwise, its children have to be processed.
27106
- _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27179
+ _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27107
27180
  }
27108
27181
  // We also have to query the DOM directly in order to catch elements inserted through
27109
27182
  // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple
@@ -27119,16 +27192,16 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27119
27192
  // processed.
27120
27193
  const nodeOrContainer = lView[tNode.index];
27121
27194
  if (isLContainer(nodeOrContainer)) {
27122
- _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
27195
+ _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
27123
27196
  }
27124
27197
  }
27125
27198
  else if (tNode.type & 4 /* Container */) {
27126
27199
  // Case 2: the TNode is a container
27127
27200
  // The native node has to be checked.
27128
27201
  const lContainer = lView[tNode.index];
27129
- _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
27202
+ _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
27130
27203
  // Each view inside the container has to be processed.
27131
- _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);
27204
+ _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);
27132
27205
  }
27133
27206
  else if (tNode.type & 16 /* Projection */) {
27134
27207
  // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).
@@ -27138,18 +27211,18 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27138
27211
  const head = componentHost.projection[tNode.projection];
27139
27212
  if (Array.isArray(head)) {
27140
27213
  for (let nativeNode of head) {
27141
- _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27214
+ _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27142
27215
  }
27143
27216
  }
27144
27217
  else if (head) {
27145
27218
  const nextLView = componentView[PARENT];
27146
27219
  const nextTNode = nextLView[TVIEW].data[head.index];
27147
- _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
27220
+ _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
27148
27221
  }
27149
27222
  }
27150
27223
  else if (tNode.child) {
27151
27224
  // Case 4: the TNode is a view.
27152
- _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27225
+ _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27153
27226
  }
27154
27227
  // We don't want to go to the next sibling of the root node.
27155
27228
  if (rootNativeNode !== nativeNode) {
@@ -27157,7 +27230,7 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27157
27230
  // link, depending on whether the current node has been projected.
27158
27231
  const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;
27159
27232
  if (nextTNode) {
27160
- _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
27233
+ _queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
27161
27234
  }
27162
27235
  }
27163
27236
  }
@@ -27170,12 +27243,12 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27170
27243
  * @param elementsOnly whether only elements should be searched
27171
27244
  * @param rootNativeNode the root native node on which predicate should not be matched
27172
27245
  */
27173
- function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
27246
+ function _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
27174
27247
  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
27175
27248
  const childView = lContainer[i];
27176
27249
  const firstChild = childView[TVIEW].firstChild;
27177
27250
  if (firstChild) {
27178
- _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
27251
+ _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
27179
27252
  }
27180
27253
  }
27181
27254
  }
@@ -27188,7 +27261,7 @@ function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, element
27188
27261
  * @param elementsOnly whether only elements should be searched
27189
27262
  * @param rootNativeNode the root native node on which predicate should not be matched
27190
27263
  */
27191
- function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
27264
+ function _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
27192
27265
  if (rootNativeNode !== nativeNode) {
27193
27266
  const debugNode = getDebugNode(nativeNode);
27194
27267
  if (!debugNode) {
@@ -27197,7 +27270,7 @@ function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNati
27197
27270
  // Type of the "predicate and "matches" array are set based on the value of
27198
27271
  // the "elementsOnly" parameter. TypeScript is not able to properly infer these
27199
27272
  // types with generics, so we manually cast the parameters accordingly.
27200
- if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&
27273
+ if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
27201
27274
  matches.indexOf(debugNode) === -1) {
27202
27275
  matches.push(debugNode);
27203
27276
  }
@@ -27222,7 +27295,7 @@ function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnl
27222
27295
  const node = nodes[i];
27223
27296
  const debugNode = getDebugNode(node);
27224
27297
  if (debugNode) {
27225
- if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&
27298
+ if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
27226
27299
  matches.indexOf(debugNode) === -1) {
27227
27300
  matches.push(debugNode);
27228
27301
  }
@@ -27263,25 +27336,24 @@ function collectPropertyBindings(properties, tNode, lView, tData) {
27263
27336
  // Need to keep the nodes in a global Map so that multiple angular apps are supported.
27264
27337
  const _nativeNodeToDebugNode = new Map();
27265
27338
  const NG_DEBUG_PROPERTY = '__ng_debug__';
27266
- function getDebugNode__POST_R3__(nativeNode) {
27339
+ /**
27340
+ * @publicApi
27341
+ */
27342
+ function getDebugNode(nativeNode) {
27267
27343
  if (nativeNode instanceof Node) {
27268
27344
  if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {
27269
27345
  nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?
27270
- new DebugElement__POST_R3__(nativeNode) :
27271
- new DebugNode__POST_R3__(nativeNode);
27346
+ new DebugElement(nativeNode) :
27347
+ new DebugNode(nativeNode);
27272
27348
  }
27273
27349
  return nativeNode[NG_DEBUG_PROPERTY];
27274
27350
  }
27275
27351
  return null;
27276
27352
  }
27277
- /**
27278
- * @publicApi
27279
- */
27280
- const getDebugNode = getDebugNode__POST_R3__;
27281
- function getDebugNodeR2__POST_R3__(_nativeNode) {
27353
+ // TODO: cleanup all references to this function and remove it.
27354
+ function getDebugNodeR2(_nativeNode) {
27282
27355
  return null;
27283
27356
  }
27284
- const getDebugNodeR2 = getDebugNodeR2__POST_R3__;
27285
27357
  function getAllDebugNodes() {
27286
27358
  return Array.from(_nativeNodeToDebugNode.values());
27287
27359
  }
@@ -27291,14 +27363,6 @@ function indexDebugNode(node) {
27291
27363
  function removeDebugNodeFromIndex(node) {
27292
27364
  _nativeNodeToDebugNode.delete(node.nativeNode);
27293
27365
  }
27294
- /**
27295
- * @publicApi
27296
- */
27297
- const DebugNode = DebugNode__POST_R3__;
27298
- /**
27299
- * @publicApi
27300
- */
27301
- const DebugElement = DebugElement__POST_R3__;
27302
27366
 
27303
27367
  /**
27304
27368
  * @license