@angular/core 10.0.9 → 10.0.10

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 v10.0.9
2
+ * @license Angular v10.0.10
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -9425,16 +9425,6 @@
9425
9425
  }
9426
9426
  return viewToDetach;
9427
9427
  }
9428
- /**
9429
- * Removes a view from a container, i.e. detaches it and then destroys the underlying LView.
9430
- *
9431
- * @param lContainer The container from which to remove a view
9432
- * @param removeIndex The index of the view to remove
9433
- */
9434
- function removeView(lContainer, removeIndex) {
9435
- var detachedView = detachView(lContainer, removeIndex);
9436
- detachedView && destroyLView(detachedView[TVIEW], detachedView);
9437
- }
9438
9428
  /**
9439
9429
  * A standalone function which destroys an LView,
9440
9430
  * conducting clean up (e.g. removing listeners, calling onDestroys).
@@ -10690,8 +10680,17 @@
10690
10680
  ViewContainerRef.prototype.remove = function (index) {
10691
10681
  this.allocateContainerIfNeeded();
10692
10682
  var adjustedIdx = this._adjustIndex(index, -1);
10693
- removeView(this._lContainer, adjustedIdx);
10694
- removeFromArray(this._lContainer[VIEW_REFS], adjustedIdx);
10683
+ var detachedView = detachView(this._lContainer, adjustedIdx);
10684
+ if (detachedView) {
10685
+ // Before destroying the view, remove it from the container's array of `ViewRef`s.
10686
+ // This ensures the view container length is updated before calling
10687
+ // `destroyLView`, which could recursively call view container methods that
10688
+ // rely on an accurate container length.
10689
+ // (e.g. a method on this view container being called by a child directive's OnDestroy
10690
+ // lifecycle hook)
10691
+ removeFromArray(this._lContainer[VIEW_REFS], adjustedIdx);
10692
+ destroyLView(detachedView[TVIEW], detachedView);
10693
+ }
10695
10694
  };
10696
10695
  ViewContainerRef.prototype.detach = function (index) {
10697
10696
  this.allocateContainerIfNeeded();
@@ -10907,13 +10906,42 @@
10907
10906
  return typeof v === 'function';
10908
10907
  }
10909
10908
 
10909
+ /*
10910
+ * #########################
10911
+ * Attention: These Regular expressions have to hold even if the code is minified!
10912
+ * ##########################
10913
+ */
10914
+ /**
10915
+ * Regular expression that detects pass-through constructors for ES5 output. This Regex
10916
+ * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also
10917
+ * it intends to capture the pattern where existing constructors have been downleveled from
10918
+ * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.
10919
+ *
10920
+ * ```
10921
+ * function MyClass() {
10922
+ * var _this = _super.apply(this, arguments) || this;
10923
+ * ```
10924
+ *
10925
+ * ```
10926
+ * function MyClass() {
10927
+ * var _this = _super.apply(this, __spread(arguments)) || this;
10928
+ * ```
10929
+ *
10930
+ * More details can be found in: https://github.com/angular/angular/issues/38453.
10931
+ */
10932
+ var ES5_DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|[^()]+\(arguments\))\)/;
10933
+ /** Regular expression that detects ES2015 classes which extend from other classes. */
10934
+ var ES2015_INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/;
10935
+ /**
10936
+ * Regular expression that detects ES2015 classes which extend from other classes and
10937
+ * have an explicit constructor defined.
10938
+ */
10939
+ var ES2015_INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/;
10910
10940
  /**
10911
- * Attention: These regex has to hold even if the code is minified!
10941
+ * Regular expression that detects ES2015 classes which extend from other classes
10942
+ * and inherit a constructor.
10912
10943
  */
10913
- var DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/;
10914
- var INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/;
10915
- var INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/;
10916
- var INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/;
10944
+ var ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/;
10917
10945
  /**
10918
10946
  * Determine whether a stringified type is a class which delegates its constructor
10919
10947
  * to its parent.
@@ -10923,8 +10951,9 @@
10923
10951
  * an initialized instance property.
10924
10952
  */
10925
10953
  function isDelegateCtor(typeStr) {
10926
- return DELEGATE_CTOR.test(typeStr) || INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||
10927
- (INHERITED_CLASS.test(typeStr) && !INHERITED_CLASS_WITH_CTOR.test(typeStr));
10954
+ return ES5_DELEGATE_CTOR.test(typeStr) ||
10955
+ ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||
10956
+ (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr));
10928
10957
  }
10929
10958
  var ReflectionCapabilities = /** @class */ (function () {
10930
10959
  function ReflectionCapabilities(reflect) {
@@ -16124,7 +16153,8 @@
16124
16153
  var ch;
16125
16154
  while (startIndex < endIndex &&
16126
16155
  ((ch = text.charCodeAt(startIndex)) === 45 /* DASH */ || ch === 95 /* UNDERSCORE */ ||
16127
- ((ch & -33 /* UPPER_CASE */) >= 65 /* A */ && (ch & -33 /* UPPER_CASE */) <= 90 /* Z */))) {
16156
+ ((ch & -33 /* UPPER_CASE */) >= 65 /* A */ && (ch & -33 /* UPPER_CASE */) <= 90 /* Z */) ||
16157
+ (ch >= 48 /* ZERO */ && ch <= 57 /* NINE */))) {
16128
16158
  startIndex++;
16129
16159
  }
16130
16160
  return startIndex;
@@ -19787,7 +19817,7 @@
19787
19817
  /**
19788
19818
  * @publicApi
19789
19819
  */
19790
- var VERSION = new Version('10.0.9');
19820
+ var VERSION = new Version('10.0.10');
19791
19821
 
19792
19822
  /**
19793
19823
  * @license