@angular/core 13.1.0-next.0 → 13.1.0-next.1

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.1.0-next.0
2
+ * @license Angular v13.1.0-next.1
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1928,9 +1928,9 @@ class TestingCompiler extends Compiler {
1928
1928
  throw unimplemented();
1929
1929
  }
1930
1930
  }
1931
- TestingCompiler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0-next.0", ngImport: i0, type: TestingCompiler, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1932
- TestingCompiler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0-next.0", ngImport: i0, type: TestingCompiler });
1933
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0-next.0", ngImport: i0, type: TestingCompiler, decorators: [{
1931
+ TestingCompiler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0-next.1", ngImport: i0, type: TestingCompiler, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1932
+ TestingCompiler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0-next.1", ngImport: i0, type: TestingCompiler });
1933
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0-next.1", ngImport: i0, type: TestingCompiler, decorators: [{
1934
1934
  type: Injectable
1935
1935
  }] });
1936
1936
  /**
package/fesm2020/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v13.1.0-next.0
2
+ * @license Angular v13.1.0-next.1
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -683,6 +683,8 @@ function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
683
683
  */
684
684
  var ViewEncapsulation$1;
685
685
  (function (ViewEncapsulation) {
686
+ // TODO: consider making `ViewEncapsulation` a `const enum` instead. See
687
+ // https://github.com/angular/angular/issues/44119 for additional information.
686
688
  /**
687
689
  * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
688
690
  * Element and pre-processing the style rules provided via {@link Component#styles styles} or
@@ -898,8 +900,6 @@ function ɵɵdefineComponent(componentDefinition) {
898
900
  viewQuery: componentDefinition.viewQuery || null,
899
901
  features: componentDefinition.features || null,
900
902
  data: componentDefinition.data || {},
901
- // TODO(misko): convert ViewEncapsulation into const enum so that it can be used
902
- // directly in the next line. Also `None` should be 0 not 2.
903
903
  encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,
904
904
  id: 'c',
905
905
  styles: componentDefinition.styles || EMPTY_ARRAY,
@@ -6642,44 +6642,6 @@ function escapeCommentText(value) {
6642
6642
  return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));
6643
6643
  }
6644
6644
 
6645
- /**
6646
- * @license
6647
- * Copyright Google LLC All Rights Reserved.
6648
- *
6649
- * Use of this source code is governed by an MIT-style license that can be
6650
- * found in the LICENSE file at https://angular.io/license
6651
- */
6652
- /**
6653
- * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
6654
- */
6655
- /**
6656
- * Creates an `Array` construction with a given name. This is useful when
6657
- * looking for memory consumption to see what time of array it is.
6658
- *
6659
- *
6660
- * @param name Name to give to the constructor
6661
- * @returns A subclass of `Array` if possible. This can only be done in
6662
- * environments which support `class` construct.
6663
- */
6664
- function createNamedArrayType(name) {
6665
- // This should never be called in prod mode, so let's verify that is the case.
6666
- if (ngDevMode) {
6667
- try {
6668
- // If this function were compromised the following could lead to arbitrary
6669
- // script execution. We bless it with Trusted Types anyway since this
6670
- // function is stripped out of production binaries.
6671
- return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
6672
- }
6673
- catch (e) {
6674
- // If it does not work just give up and fall back to regular Array.
6675
- return Array;
6676
- }
6677
- }
6678
- else {
6679
- throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
6680
- }
6681
- }
6682
-
6683
6645
  /**
6684
6646
  * @license
6685
6647
  * Copyright Google LLC All Rights Reserved.
@@ -8470,6 +8432,44 @@ function selectIndexInternal(tView, lView, index, checkNoChangesMode) {
8470
8432
  setSelectedIndex(index);
8471
8433
  }
8472
8434
 
8435
+ /**
8436
+ * @license
8437
+ * Copyright Google LLC All Rights Reserved.
8438
+ *
8439
+ * Use of this source code is governed by an MIT-style license that can be
8440
+ * found in the LICENSE file at https://angular.io/license
8441
+ */
8442
+ /**
8443
+ * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
8444
+ */
8445
+ /**
8446
+ * Creates an `Array` construction with a given name. This is useful when
8447
+ * looking for memory consumption to see what time of array it is.
8448
+ *
8449
+ *
8450
+ * @param name Name to give to the constructor
8451
+ * @returns A subclass of `Array` if possible. This can only be done in
8452
+ * environments which support `class` construct.
8453
+ */
8454
+ function createNamedArrayType(name) {
8455
+ // This should never be called in prod mode, so let's verify that is the case.
8456
+ if (ngDevMode) {
8457
+ try {
8458
+ // If this function were compromised the following could lead to arbitrary
8459
+ // script execution. We bless it with Trusted Types anyway since this
8460
+ // function is stripped out of production binaries.
8461
+ return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
8462
+ }
8463
+ catch (e) {
8464
+ // If it does not work just give up and fall back to regular Array.
8465
+ return Array;
8466
+ }
8467
+ }
8468
+ else {
8469
+ throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
8470
+ }
8471
+ }
8472
+
8473
8473
  /**
8474
8474
  * @license
8475
8475
  * Copyright Google LLC All Rights Reserved.
@@ -8573,7 +8573,6 @@ function attachDebugGetter(obj, debugGetter) {
8573
8573
  * Use of this source code is governed by an MIT-style license that can be
8574
8574
  * found in the LICENSE file at https://angular.io/license
8575
8575
  */
8576
- const NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode());
8577
8576
  /*
8578
8577
  * This file contains conditionally attached classes which provide human readable (debug) level
8579
8578
  * information for `LView`, `LContainer` and other internal data structures. These data structures
@@ -8605,6 +8604,8 @@ const NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNg
8605
8604
  let LVIEW_COMPONENT_CACHE;
8606
8605
  let LVIEW_EMBEDDED_CACHE;
8607
8606
  let LVIEW_ROOT;
8607
+ let LVIEW_COMPONENT;
8608
+ let LVIEW_EMBEDDED;
8608
8609
  /**
8609
8610
  * This function clones a blueprint and creates LView.
8610
8611
  *
@@ -8615,13 +8616,24 @@ function cloneToLViewFromTViewBlueprint(tView) {
8615
8616
  const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
8616
8617
  return lView.concat(tView.blueprint);
8617
8618
  }
8619
+ class LRootView extends Array {
8620
+ }
8621
+ class LComponentView extends Array {
8622
+ }
8623
+ class LEmbeddedView extends Array {
8624
+ }
8618
8625
  function getLViewToClone(type, name) {
8619
8626
  switch (type) {
8620
8627
  case 0 /* Root */:
8621
8628
  if (LVIEW_ROOT === undefined)
8622
- LVIEW_ROOT = new (createNamedArrayType('LRootView'))();
8629
+ LVIEW_ROOT = new LRootView();
8623
8630
  return LVIEW_ROOT;
8624
8631
  case 1 /* Component */:
8632
+ if (!ngDevMode || !ngDevMode.namedConstructors) {
8633
+ if (LVIEW_COMPONENT === undefined)
8634
+ LVIEW_COMPONENT = new LComponentView();
8635
+ return LVIEW_COMPONENT;
8636
+ }
8625
8637
  if (LVIEW_COMPONENT_CACHE === undefined)
8626
8638
  LVIEW_COMPONENT_CACHE = new Map();
8627
8639
  let componentArray = LVIEW_COMPONENT_CACHE.get(name);
@@ -8631,6 +8643,11 @@ function getLViewToClone(type, name) {
8631
8643
  }
8632
8644
  return componentArray;
8633
8645
  case 2 /* Embedded */:
8646
+ if (!ngDevMode || !ngDevMode.namedConstructors) {
8647
+ if (LVIEW_EMBEDDED === undefined)
8648
+ LVIEW_EMBEDDED = new LEmbeddedView();
8649
+ return LVIEW_EMBEDDED;
8650
+ }
8634
8651
  if (LVIEW_EMBEDDED_CACHE === undefined)
8635
8652
  LVIEW_EMBEDDED_CACHE = new Map();
8636
8653
  let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
@@ -8901,7 +8918,8 @@ function processTNodeChildren(tNode, buf) {
8901
8918
  tNode = tNode.next;
8902
8919
  }
8903
8920
  }
8904
- const TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null;
8921
+ class TViewData extends Array {
8922
+ }
8905
8923
  let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
8906
8924
  // `LView` constructor could have side-effects.
8907
8925
  /**
@@ -8914,14 +8932,20 @@ function cloneToTViewData(list) {
8914
8932
  TVIEWDATA_EMPTY = new TViewData();
8915
8933
  return TVIEWDATA_EMPTY.concat(list);
8916
8934
  }
8917
- const LViewBlueprint = NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null;
8918
- const MatchesArray = NG_DEV_MODE && createNamedArrayType('MatchesArray') || null;
8919
- const TViewComponents = NG_DEV_MODE && createNamedArrayType('TViewComponents') || null;
8920
- const TNodeLocalNames = NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null;
8921
- const TNodeInitialInputs = NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null;
8922
- const TNodeInitialData = NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null;
8923
- const LCleanup = NG_DEV_MODE && createNamedArrayType('LCleanup') || null;
8924
- const TCleanup = NG_DEV_MODE && createNamedArrayType('TCleanup') || null;
8935
+ class LViewBlueprint extends Array {
8936
+ }
8937
+ class MatchesArray extends Array {
8938
+ }
8939
+ class TViewComponents extends Array {
8940
+ }
8941
+ class TNodeLocalNames extends Array {
8942
+ }
8943
+ class TNodeInitialInputs extends Array {
8944
+ }
8945
+ class LCleanup extends Array {
8946
+ }
8947
+ class TCleanup extends Array {
8948
+ }
8925
8949
  function attachLViewDebug(lView) {
8926
8950
  attachDebugObject(lView, new LViewDebug(lView));
8927
8951
  }
@@ -10559,8 +10583,8 @@ function generateInitialInputs(inputs, attrs) {
10559
10583
  //// ViewContainer & View
10560
10584
  //////////////////////////
10561
10585
  // Not sure why I need to do `any` here but TS complains later.
10562
- const LContainerArray = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) &&
10563
- createNamedArrayType('LContainer');
10586
+ const LContainerArray = class LContainer extends Array {
10587
+ };
10564
10588
  /**
10565
10589
  * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
10566
10590
  *
@@ -21411,7 +21435,7 @@ class Version {
21411
21435
  /**
21412
21436
  * @publicApi
21413
21437
  */
21414
- const VERSION = new Version('13.1.0-next.0');
21438
+ const VERSION = new Version('13.1.0-next.1');
21415
21439
 
21416
21440
  /**
21417
21441
  * @license
@@ -27435,8 +27459,7 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
27435
27459
  const element = this.nativeElement;
27436
27460
  // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.
27437
27461
  const className = element.className;
27438
- const classes = className && typeof className !== 'string' ? className.baseVal.split(' ') :
27439
- className.split(' ');
27462
+ const classes = typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');
27440
27463
  classes.forEach((value) => result[value] = true);
27441
27464
  return result;
27442
27465
  }