@angular/core 13.2.1 → 13.2.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.
package/fesm2015/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v13.2.1
2
+ * @license Angular v13.2.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -14492,6 +14492,7 @@ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsInd
14492
14492
  * @param name Name of the DOM Node
14493
14493
  * @param attrsIndex Index of the element's attributes in the `consts` array.
14494
14494
  * @param localRefsIndex Index of the element's local references in the `consts` array.
14495
+ * @returns This function returns itself so that it may be chained.
14495
14496
  *
14496
14497
  * Attributes and localRefs are passed as an array of strings where elements with an even index
14497
14498
  * hold an attribute name and elements with an odd index hold an attribute value, ex.:
@@ -14543,9 +14544,11 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
14543
14544
  if (localRefsIndex !== null) {
14544
14545
  saveResolvedLocalsInData(lView, tNode);
14545
14546
  }
14547
+ return ɵɵelementStart;
14546
14548
  }
14547
14549
  /**
14548
14550
  * Mark the end of the element.
14551
+ * @returns This function returns itself so that it may be chained.
14549
14552
  *
14550
14553
  * @codeGenApi
14551
14554
  */
@@ -14576,6 +14579,7 @@ function ɵɵelementEnd() {
14576
14579
  if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {
14577
14580
  setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);
14578
14581
  }
14582
+ return ɵɵelementEnd;
14579
14583
  }
14580
14584
  /**
14581
14585
  * Creates an empty element using {@link elementStart} and {@link elementEnd}
@@ -14584,12 +14588,14 @@ function ɵɵelementEnd() {
14584
14588
  * @param name Name of the DOM Node
14585
14589
  * @param attrsIndex Index of the element's attributes in the `consts` array.
14586
14590
  * @param localRefsIndex Index of the element's local references in the `consts` array.
14591
+ * @returns This function returns itself so that it may be chained.
14587
14592
  *
14588
14593
  * @codeGenApi
14589
14594
  */
14590
14595
  function ɵɵelement(index, name, attrsIndex, localRefsIndex) {
14591
14596
  ɵɵelementStart(index, name, attrsIndex, localRefsIndex);
14592
14597
  ɵɵelementEnd();
14598
+ return ɵɵelement;
14593
14599
  }
14594
14600
  function logUnknownElementError(tView, element, tNode, hasDirectives) {
14595
14601
  const schemas = tView.schemas;
@@ -14658,6 +14664,7 @@ function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, l
14658
14664
  * @param index Index of the element in the LView array
14659
14665
  * @param attrsIndex Index of the container attributes in the `consts` array.
14660
14666
  * @param localRefsIndex Index of the container's local references in the `consts` array.
14667
+ * @returns This function returns itself so that it may be chained.
14661
14668
  *
14662
14669
  * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
14663
14670
  * the DOM (as a comment node can't have attributes). Attributes are here only for directive
@@ -14688,9 +14695,11 @@ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {
14688
14695
  if (localRefsIndex != null) {
14689
14696
  saveResolvedLocalsInData(lView, tNode);
14690
14697
  }
14698
+ return ɵɵelementContainerStart;
14691
14699
  }
14692
14700
  /**
14693
14701
  * Mark the end of the <ng-container>.
14702
+ * @returns This function returns itself so that it may be chained.
14694
14703
  *
14695
14704
  * @codeGenApi
14696
14705
  */
@@ -14712,6 +14721,7 @@ function ɵɵelementContainerEnd() {
14712
14721
  tView.queries.elementEnd(currentTNode);
14713
14722
  }
14714
14723
  }
14724
+ return ɵɵelementContainerEnd;
14715
14725
  }
14716
14726
  /**
14717
14727
  * Creates an empty logical container using {@link elementContainerStart}
@@ -14720,12 +14730,14 @@ function ɵɵelementContainerEnd() {
14720
14730
  * @param index Index of the element in the LView array
14721
14731
  * @param attrsIndex Index of the container attributes in the `consts` array.
14722
14732
  * @param localRefsIndex Index of the container's local references in the `consts` array.
14733
+ * @returns This function returns itself so that it may be chained.
14723
14734
  *
14724
14735
  * @codeGenApi
14725
14736
  */
14726
14737
  function ɵɵelementContainer(index, attrsIndex, localRefsIndex) {
14727
14738
  ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);
14728
14739
  ɵɵelementContainerEnd();
14740
+ return ɵɵelementContainer;
14729
14741
  }
14730
14742
 
14731
14743
  /**
@@ -21076,7 +21088,7 @@ class Version {
21076
21088
  /**
21077
21089
  * @publicApi
21078
21090
  */
21079
- const VERSION = new Version('13.2.1');
21091
+ const VERSION = new Version('13.2.4');
21080
21092
 
21081
21093
  /**
21082
21094
  * @license
@@ -22828,11 +22840,29 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22828
22840
  componentFactoryOrType :
22829
22841
  new ComponentFactory(getComponentDef(componentFactoryOrType));
22830
22842
  const contextInjector = injector || this.parentInjector;
22831
- if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {
22832
- // DO NOT REFACTOR. The code here used to have a `value || undefined` expression
22833
- // which seems to cause internal google apps to fail. This is documented in the
22834
- // following internal bug issue: go/b/142967802
22835
- const result = contextInjector.get(NgModuleRef$1, null);
22843
+ // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.
22844
+ if (!ngModuleRef && componentFactory.ngModule == null) {
22845
+ // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that
22846
+ // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an
22847
+ // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based
22848
+ // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try
22849
+ // using a provided injector first, then fall back to the parent injector of this
22850
+ // `ViewContainerRef` instance.
22851
+ //
22852
+ // For the factory-less case, it's critical to establish a connection with the module
22853
+ // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),
22854
+ // so that a component can use DI tokens provided in MgModules. For this reason, we can not
22855
+ // rely on the provided injector, since it might be detached from the DI tree (for example, if
22856
+ // it was created via `Injector.create` without specifying a parent injector, or if an
22857
+ // injector is retrieved from an `NgModuleRef` created via `createNgModuleRef` using an
22858
+ // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent
22859
+ // injector, which is normally connected to the DI tree, which includes module injector
22860
+ // subtree.
22861
+ const _injector = isComponentFactory ? contextInjector : this.parentInjector;
22862
+ // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||
22863
+ // undefined` expression which seems to cause internal google apps to fail. This is documented
22864
+ // in the following internal bug issue: go/b/142967802
22865
+ const result = _injector.get(NgModuleRef$1, null);
22836
22866
  if (result) {
22837
22867
  ngModuleRef = result;
22838
22868
  }
@@ -25992,26 +26022,7 @@ class PlatformRef {
25992
26022
  this._destroyed = false;
25993
26023
  }
25994
26024
  /**
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
- * ```
26025
+ * Creates an instance of an `@NgModule` for the given platform.
26015
26026
  *
26016
26027
  * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
26017
26028
  * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
@@ -26065,7 +26076,7 @@ class PlatformRef {
26065
26076
  });
26066
26077
  }
26067
26078
  /**
26068
- * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
26079
+ * Creates an instance of an `@NgModule` for a given platform.
26069
26080
  *
26070
26081
  * @usageNotes
26071
26082
  * ### Simple Example
@@ -26812,8 +26823,6 @@ var ng_module_factory_loader_impl = {};
26812
26823
  * Use of this source code is governed by an MIT-style license that can be
26813
26824
  * found in the LICENSE file at https://angular.io/license
26814
26825
  */
26815
- // TODO(alxhub): recombine the interfaces and implementations here and move the docs back onto the
26816
- // original classes.
26817
26826
  /**
26818
26827
  * @publicApi
26819
26828
  */
@@ -26829,43 +26838,88 @@ class DebugEventListener {
26829
26838
  function asNativeElements(debugEls) {
26830
26839
  return debugEls.map((el) => el.nativeElement);
26831
26840
  }
26832
- class DebugNode__POST_R3__ {
26841
+ /**
26842
+ * @publicApi
26843
+ */
26844
+ class DebugNode {
26833
26845
  constructor(nativeNode) {
26834
26846
  this.nativeNode = nativeNode;
26835
26847
  }
26848
+ /**
26849
+ * The `DebugElement` parent. Will be `null` if this is the root element.
26850
+ */
26836
26851
  get parent() {
26837
26852
  const parent = this.nativeNode.parentNode;
26838
- return parent ? new DebugElement__POST_R3__(parent) : null;
26853
+ return parent ? new DebugElement(parent) : null;
26839
26854
  }
26855
+ /**
26856
+ * The host dependency injector. For example, the root element's component instance injector.
26857
+ */
26840
26858
  get injector() {
26841
26859
  return getInjector(this.nativeNode);
26842
26860
  }
26861
+ /**
26862
+ * The element's own component instance, if it has one.
26863
+ */
26843
26864
  get componentInstance() {
26844
26865
  const nativeElement = this.nativeNode;
26845
26866
  return nativeElement &&
26846
26867
  (getComponent$1(nativeElement) || getOwningComponent(nativeElement));
26847
26868
  }
26869
+ /**
26870
+ * An object that provides parent context for this element. Often an ancestor component instance
26871
+ * that governs this element.
26872
+ *
26873
+ * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
26874
+ * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
26875
+ * of heroes"`.
26876
+ */
26848
26877
  get context() {
26849
26878
  return getComponent$1(this.nativeNode) || getContext(this.nativeNode);
26850
26879
  }
26880
+ /**
26881
+ * The callbacks attached to the component's @Output properties and/or the element's event
26882
+ * properties.
26883
+ */
26851
26884
  get listeners() {
26852
26885
  return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');
26853
26886
  }
26887
+ /**
26888
+ * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
26889
+ * variable name.
26890
+ */
26854
26891
  get references() {
26855
26892
  return getLocalRefs(this.nativeNode);
26856
26893
  }
26894
+ /**
26895
+ * This component's injector lookup tokens. Includes the component itself plus the tokens that the
26896
+ * component lists in its providers metadata.
26897
+ */
26857
26898
  get providerTokens() {
26858
26899
  return getInjectionTokens(this.nativeNode);
26859
26900
  }
26860
26901
  }
26861
- class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26902
+ /**
26903
+ * @publicApi
26904
+ *
26905
+ * @see [Component testing scenarios](guide/testing-components-scenarios)
26906
+ * @see [Basics of testing components](guide/testing-components-basics)
26907
+ * @see [Testing utility APIs](guide/testing-utility-apis)
26908
+ */
26909
+ class DebugElement extends DebugNode {
26862
26910
  constructor(nativeNode) {
26863
26911
  ngDevMode && assertDomNode(nativeNode);
26864
26912
  super(nativeNode);
26865
26913
  }
26914
+ /**
26915
+ * The underlying DOM element at the root of the component.
26916
+ */
26866
26917
  get nativeElement() {
26867
26918
  return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;
26868
26919
  }
26920
+ /**
26921
+ * The element tag name, if it is an element.
26922
+ */
26869
26923
  get name() {
26870
26924
  const context = getLContext(this.nativeNode);
26871
26925
  if (context !== null) {
@@ -26906,6 +26960,9 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26906
26960
  collectPropertyBindings(properties, tNode, lView, tData);
26907
26961
  return properties;
26908
26962
  }
26963
+ /**
26964
+ * A map of attribute names to attribute values for an element.
26965
+ */
26909
26966
  get attributes() {
26910
26967
  const attributes = {};
26911
26968
  const element = this.nativeElement;
@@ -26954,12 +27011,29 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26954
27011
  }
26955
27012
  return attributes;
26956
27013
  }
27014
+ /**
27015
+ * The inline styles of the DOM element.
27016
+ *
27017
+ * Will be `null` if there is no `style` property on the underlying DOM element.
27018
+ *
27019
+ * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
27020
+ */
26957
27021
  get styles() {
26958
27022
  if (this.nativeElement && this.nativeElement.style) {
26959
27023
  return this.nativeElement.style;
26960
27024
  }
26961
27025
  return {};
26962
27026
  }
27027
+ /**
27028
+ * A map containing the class names on the element as keys.
27029
+ *
27030
+ * This map is derived from the `className` property of the DOM element.
27031
+ *
27032
+ * Note: The values of this object will always be `true`. The class key will not appear in the KV
27033
+ * object if it does not exist on the element.
27034
+ *
27035
+ * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
27036
+ */
26963
27037
  get classes() {
26964
27038
  const result = {};
26965
27039
  const element = this.nativeElement;
@@ -26969,15 +27043,23 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26969
27043
  classes.forEach((value) => result[value] = true);
26970
27044
  return result;
26971
27045
  }
27046
+ /**
27047
+ * The `childNodes` of the DOM element as a `DebugNode` array.
27048
+ *
27049
+ * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
27050
+ */
26972
27051
  get childNodes() {
26973
27052
  const childNodes = this.nativeNode.childNodes;
26974
27053
  const children = [];
26975
27054
  for (let i = 0; i < childNodes.length; i++) {
26976
27055
  const element = childNodes[i];
26977
- children.push(getDebugNode__POST_R3__(element));
27056
+ children.push(getDebugNode(element));
26978
27057
  }
26979
27058
  return children;
26980
27059
  }
27060
+ /**
27061
+ * The immediate `DebugElement` children. Walk the tree by descending through `children`.
27062
+ */
26981
27063
  get children() {
26982
27064
  const nativeElement = this.nativeElement;
26983
27065
  if (!nativeElement)
@@ -26986,24 +27068,45 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26986
27068
  const children = [];
26987
27069
  for (let i = 0; i < childNodes.length; i++) {
26988
27070
  const element = childNodes[i];
26989
- children.push(getDebugNode__POST_R3__(element));
27071
+ children.push(getDebugNode(element));
26990
27072
  }
26991
27073
  return children;
26992
27074
  }
27075
+ /**
27076
+ * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
27077
+ */
26993
27078
  query(predicate) {
26994
27079
  const results = this.queryAll(predicate);
26995
27080
  return results[0] || null;
26996
27081
  }
27082
+ /**
27083
+ * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
27084
+ */
26997
27085
  queryAll(predicate) {
26998
27086
  const matches = [];
26999
- _queryAllR3(this, predicate, matches, true);
27087
+ _queryAll(this, predicate, matches, true);
27000
27088
  return matches;
27001
27089
  }
27090
+ /**
27091
+ * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
27092
+ */
27002
27093
  queryAllNodes(predicate) {
27003
27094
  const matches = [];
27004
- _queryAllR3(this, predicate, matches, false);
27095
+ _queryAll(this, predicate, matches, false);
27005
27096
  return matches;
27006
27097
  }
27098
+ /**
27099
+ * Triggers the event by its name if there is a corresponding listener in the element's
27100
+ * `listeners` collection.
27101
+ *
27102
+ * If the event lacks a listener or there's some other problem, consider
27103
+ * calling `nativeElement.dispatchEvent(eventObject)`.
27104
+ *
27105
+ * @param eventName The name of the event to trigger
27106
+ * @param eventObj The _event object_ expected by the handler
27107
+ *
27108
+ * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
27109
+ */
27007
27110
  triggerEventHandler(eventName, eventObj) {
27008
27111
  const node = this.nativeNode;
27009
27112
  const invokedListeners = [];
@@ -27062,11 +27165,11 @@ function isPrimitiveValue(value) {
27062
27165
  return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||
27063
27166
  value === null;
27064
27167
  }
27065
- function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
27168
+ function _queryAll(parentElement, predicate, matches, elementsOnly) {
27066
27169
  const context = getLContext(parentElement.nativeNode);
27067
27170
  if (context !== null) {
27068
27171
  const parentTNode = context.lView[TVIEW].data[context.nodeIndex];
27069
- _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27172
+ _queryNodeChildren(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27070
27173
  }
27071
27174
  else {
27072
27175
  // If the context is null, then `parentElement` was either created with Renderer2 or native DOM
@@ -27084,26 +27187,26 @@ function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
27084
27187
  * @param elementsOnly whether only elements should be searched
27085
27188
  * @param rootNativeNode the root native node on which predicate should not be matched
27086
27189
  */
27087
- function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
27190
+ function _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
27088
27191
  ngDevMode && assertTNodeForLView(tNode, lView);
27089
27192
  const nativeNode = getNativeByTNodeOrNull(tNode, lView);
27090
27193
  // For each type of TNode, specific logic is executed.
27091
27194
  if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {
27092
27195
  // Case 1: the TNode is an element
27093
27196
  // The native node has to be checked.
27094
- _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27197
+ _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27095
27198
  if (isComponentHost(tNode)) {
27096
27199
  // If the element is the host of a component, then all nodes in its view have to be processed.
27097
27200
  // Note: the component's content (tNode.child) will be processed from the insertion points.
27098
27201
  const componentView = getComponentLViewByIndex(tNode.index, lView);
27099
27202
  if (componentView && componentView[TVIEW].firstChild) {
27100
- _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
27203
+ _queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
27101
27204
  }
27102
27205
  }
27103
27206
  else {
27104
27207
  if (tNode.child) {
27105
27208
  // Otherwise, its children have to be processed.
27106
- _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27209
+ _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27107
27210
  }
27108
27211
  // We also have to query the DOM directly in order to catch elements inserted through
27109
27212
  // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple
@@ -27119,16 +27222,16 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27119
27222
  // processed.
27120
27223
  const nodeOrContainer = lView[tNode.index];
27121
27224
  if (isLContainer(nodeOrContainer)) {
27122
- _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
27225
+ _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
27123
27226
  }
27124
27227
  }
27125
27228
  else if (tNode.type & 4 /* Container */) {
27126
27229
  // Case 2: the TNode is a container
27127
27230
  // The native node has to be checked.
27128
27231
  const lContainer = lView[tNode.index];
27129
- _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
27232
+ _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
27130
27233
  // Each view inside the container has to be processed.
27131
- _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);
27234
+ _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);
27132
27235
  }
27133
27236
  else if (tNode.type & 16 /* Projection */) {
27134
27237
  // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).
@@ -27138,18 +27241,18 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27138
27241
  const head = componentHost.projection[tNode.projection];
27139
27242
  if (Array.isArray(head)) {
27140
27243
  for (let nativeNode of head) {
27141
- _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27244
+ _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27142
27245
  }
27143
27246
  }
27144
27247
  else if (head) {
27145
27248
  const nextLView = componentView[PARENT];
27146
27249
  const nextTNode = nextLView[TVIEW].data[head.index];
27147
- _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
27250
+ _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
27148
27251
  }
27149
27252
  }
27150
27253
  else if (tNode.child) {
27151
27254
  // Case 4: the TNode is a view.
27152
- _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27255
+ _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27153
27256
  }
27154
27257
  // We don't want to go to the next sibling of the root node.
27155
27258
  if (rootNativeNode !== nativeNode) {
@@ -27157,7 +27260,7 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27157
27260
  // link, depending on whether the current node has been projected.
27158
27261
  const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;
27159
27262
  if (nextTNode) {
27160
- _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
27263
+ _queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
27161
27264
  }
27162
27265
  }
27163
27266
  }
@@ -27170,12 +27273,12 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27170
27273
  * @param elementsOnly whether only elements should be searched
27171
27274
  * @param rootNativeNode the root native node on which predicate should not be matched
27172
27275
  */
27173
- function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
27276
+ function _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
27174
27277
  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
27175
27278
  const childView = lContainer[i];
27176
27279
  const firstChild = childView[TVIEW].firstChild;
27177
27280
  if (firstChild) {
27178
- _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
27281
+ _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
27179
27282
  }
27180
27283
  }
27181
27284
  }
@@ -27188,7 +27291,7 @@ function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, element
27188
27291
  * @param elementsOnly whether only elements should be searched
27189
27292
  * @param rootNativeNode the root native node on which predicate should not be matched
27190
27293
  */
27191
- function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
27294
+ function _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
27192
27295
  if (rootNativeNode !== nativeNode) {
27193
27296
  const debugNode = getDebugNode(nativeNode);
27194
27297
  if (!debugNode) {
@@ -27197,7 +27300,7 @@ function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNati
27197
27300
  // Type of the "predicate and "matches" array are set based on the value of
27198
27301
  // the "elementsOnly" parameter. TypeScript is not able to properly infer these
27199
27302
  // types with generics, so we manually cast the parameters accordingly.
27200
- if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&
27303
+ if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
27201
27304
  matches.indexOf(debugNode) === -1) {
27202
27305
  matches.push(debugNode);
27203
27306
  }
@@ -27222,7 +27325,7 @@ function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnl
27222
27325
  const node = nodes[i];
27223
27326
  const debugNode = getDebugNode(node);
27224
27327
  if (debugNode) {
27225
- if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&
27328
+ if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
27226
27329
  matches.indexOf(debugNode) === -1) {
27227
27330
  matches.push(debugNode);
27228
27331
  }
@@ -27263,25 +27366,24 @@ function collectPropertyBindings(properties, tNode, lView, tData) {
27263
27366
  // Need to keep the nodes in a global Map so that multiple angular apps are supported.
27264
27367
  const _nativeNodeToDebugNode = new Map();
27265
27368
  const NG_DEBUG_PROPERTY = '__ng_debug__';
27266
- function getDebugNode__POST_R3__(nativeNode) {
27369
+ /**
27370
+ * @publicApi
27371
+ */
27372
+ function getDebugNode(nativeNode) {
27267
27373
  if (nativeNode instanceof Node) {
27268
27374
  if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {
27269
27375
  nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?
27270
- new DebugElement__POST_R3__(nativeNode) :
27271
- new DebugNode__POST_R3__(nativeNode);
27376
+ new DebugElement(nativeNode) :
27377
+ new DebugNode(nativeNode);
27272
27378
  }
27273
27379
  return nativeNode[NG_DEBUG_PROPERTY];
27274
27380
  }
27275
27381
  return null;
27276
27382
  }
27277
- /**
27278
- * @publicApi
27279
- */
27280
- const getDebugNode = getDebugNode__POST_R3__;
27281
- function getDebugNodeR2__POST_R3__(_nativeNode) {
27383
+ // TODO: cleanup all references to this function and remove it.
27384
+ function getDebugNodeR2(_nativeNode) {
27282
27385
  return null;
27283
27386
  }
27284
- const getDebugNodeR2 = getDebugNodeR2__POST_R3__;
27285
27387
  function getAllDebugNodes() {
27286
27388
  return Array.from(_nativeNodeToDebugNode.values());
27287
27389
  }
@@ -27291,14 +27393,6 @@ function indexDebugNode(node) {
27291
27393
  function removeDebugNodeFromIndex(node) {
27292
27394
  _nativeNodeToDebugNode.delete(node.nativeNode);
27293
27395
  }
27294
- /**
27295
- * @publicApi
27296
- */
27297
- const DebugNode = DebugNode__POST_R3__;
27298
- /**
27299
- * @publicApi
27300
- */
27301
- const DebugElement = DebugElement__POST_R3__;
27302
27396
 
27303
27397
  /**
27304
27398
  * @license
@@ -28426,12 +28520,6 @@ const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDER
28426
28520
  * Use of this source code is governed by an MIT-style license that can be
28427
28521
  * found in the LICENSE file at https://angular.io/license
28428
28522
  */
28429
- function _iterableDiffersFactory() {
28430
- return defaultIterableDiffers;
28431
- }
28432
- function _keyValueDiffersFactory() {
28433
- return defaultKeyValueDiffers;
28434
- }
28435
28523
  function _localeFactory(locale) {
28436
28524
  return locale || getGlobalLocale();
28437
28525
  }
@@ -28480,8 +28568,6 @@ const APPLICATION_MODULE_PROVIDERS = [
28480
28568
  },
28481
28569
  { provide: Compiler, useClass: Compiler, deps: [] },
28482
28570
  APP_ID_RANDOM_PROVIDER,
28483
- { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },
28484
- { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },
28485
28571
  {
28486
28572
  provide: LOCALE_ID,
28487
28573
  useFactory: _localeFactory,