@angular/core 13.2.2 → 13.2.3

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.2
2
+ * @license Angular v13.2.3
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.2');
21091
+ const VERSION = new Version('13.2.3');
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
  }