@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.
@@ -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
  */
package/fesm2020/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
  */
@@ -14506,6 +14506,7 @@ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsInd
14506
14506
  * @param name Name of the DOM Node
14507
14507
  * @param attrsIndex Index of the element's attributes in the `consts` array.
14508
14508
  * @param localRefsIndex Index of the element's local references in the `consts` array.
14509
+ * @returns This function returns itself so that it may be chained.
14509
14510
  *
14510
14511
  * Attributes and localRefs are passed as an array of strings where elements with an even index
14511
14512
  * hold an attribute name and elements with an odd index hold an attribute value, ex.:
@@ -14557,9 +14558,11 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
14557
14558
  if (localRefsIndex !== null) {
14558
14559
  saveResolvedLocalsInData(lView, tNode);
14559
14560
  }
14561
+ return ɵɵelementStart;
14560
14562
  }
14561
14563
  /**
14562
14564
  * Mark the end of the element.
14565
+ * @returns This function returns itself so that it may be chained.
14563
14566
  *
14564
14567
  * @codeGenApi
14565
14568
  */
@@ -14590,6 +14593,7 @@ function ɵɵelementEnd() {
14590
14593
  if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {
14591
14594
  setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);
14592
14595
  }
14596
+ return ɵɵelementEnd;
14593
14597
  }
14594
14598
  /**
14595
14599
  * Creates an empty element using {@link elementStart} and {@link elementEnd}
@@ -14598,12 +14602,14 @@ function ɵɵelementEnd() {
14598
14602
  * @param name Name of the DOM Node
14599
14603
  * @param attrsIndex Index of the element's attributes in the `consts` array.
14600
14604
  * @param localRefsIndex Index of the element's local references in the `consts` array.
14605
+ * @returns This function returns itself so that it may be chained.
14601
14606
  *
14602
14607
  * @codeGenApi
14603
14608
  */
14604
14609
  function ɵɵelement(index, name, attrsIndex, localRefsIndex) {
14605
14610
  ɵɵelementStart(index, name, attrsIndex, localRefsIndex);
14606
14611
  ɵɵelementEnd();
14612
+ return ɵɵelement;
14607
14613
  }
14608
14614
  function logUnknownElementError(tView, element, tNode, hasDirectives) {
14609
14615
  const schemas = tView.schemas;
@@ -14672,6 +14678,7 @@ function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, l
14672
14678
  * @param index Index of the element in the LView array
14673
14679
  * @param attrsIndex Index of the container attributes in the `consts` array.
14674
14680
  * @param localRefsIndex Index of the container's local references in the `consts` array.
14681
+ * @returns This function returns itself so that it may be chained.
14675
14682
  *
14676
14683
  * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
14677
14684
  * the DOM (as a comment node can't have attributes). Attributes are here only for directive
@@ -14702,9 +14709,11 @@ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {
14702
14709
  if (localRefsIndex != null) {
14703
14710
  saveResolvedLocalsInData(lView, tNode);
14704
14711
  }
14712
+ return ɵɵelementContainerStart;
14705
14713
  }
14706
14714
  /**
14707
14715
  * Mark the end of the <ng-container>.
14716
+ * @returns This function returns itself so that it may be chained.
14708
14717
  *
14709
14718
  * @codeGenApi
14710
14719
  */
@@ -14726,6 +14735,7 @@ function ɵɵelementContainerEnd() {
14726
14735
  tView.queries.elementEnd(currentTNode);
14727
14736
  }
14728
14737
  }
14738
+ return ɵɵelementContainerEnd;
14729
14739
  }
14730
14740
  /**
14731
14741
  * Creates an empty logical container using {@link elementContainerStart}
@@ -14734,12 +14744,14 @@ function ɵɵelementContainerEnd() {
14734
14744
  * @param index Index of the element in the LView array
14735
14745
  * @param attrsIndex Index of the container attributes in the `consts` array.
14736
14746
  * @param localRefsIndex Index of the container's local references in the `consts` array.
14747
+ * @returns This function returns itself so that it may be chained.
14737
14748
  *
14738
14749
  * @codeGenApi
14739
14750
  */
14740
14751
  function ɵɵelementContainer(index, attrsIndex, localRefsIndex) {
14741
14752
  ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);
14742
14753
  ɵɵelementContainerEnd();
14754
+ return ɵɵelementContainer;
14743
14755
  }
14744
14756
 
14745
14757
  /**
@@ -21090,7 +21102,7 @@ class Version {
21090
21102
  /**
21091
21103
  * @publicApi
21092
21104
  */
21093
- const VERSION = new Version('13.2.2');
21105
+ const VERSION = new Version('13.2.3');
21094
21106
 
21095
21107
  /**
21096
21108
  * @license
@@ -22841,11 +22853,29 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22841
22853
  componentFactoryOrType :
22842
22854
  new ComponentFactory(getComponentDef(componentFactoryOrType));
22843
22855
  const contextInjector = injector || this.parentInjector;
22844
- if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {
22845
- // DO NOT REFACTOR. The code here used to have a `value || undefined` expression
22846
- // which seems to cause internal google apps to fail. This is documented in the
22847
- // following internal bug issue: go/b/142967802
22848
- const result = contextInjector.get(NgModuleRef$1, null);
22856
+ // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.
22857
+ if (!ngModuleRef && componentFactory.ngModule == null) {
22858
+ // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that
22859
+ // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an
22860
+ // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based
22861
+ // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try
22862
+ // using a provided injector first, then fall back to the parent injector of this
22863
+ // `ViewContainerRef` instance.
22864
+ //
22865
+ // For the factory-less case, it's critical to establish a connection with the module
22866
+ // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),
22867
+ // so that a component can use DI tokens provided in MgModules. For this reason, we can not
22868
+ // rely on the provided injector, since it might be detached from the DI tree (for example, if
22869
+ // it was created via `Injector.create` without specifying a parent injector, or if an
22870
+ // injector is retrieved from an `NgModuleRef` created via `createNgModuleRef` using an
22871
+ // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent
22872
+ // injector, which is normally connected to the DI tree, which includes module injector
22873
+ // subtree.
22874
+ const _injector = isComponentFactory ? contextInjector : this.parentInjector;
22875
+ // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||
22876
+ // undefined` expression which seems to cause internal google apps to fail. This is documented
22877
+ // in the following internal bug issue: go/b/142967802
22878
+ const result = _injector.get(NgModuleRef$1, null);
22849
22879
  if (result) {
22850
22880
  ngModuleRef = result;
22851
22881
  }