@angular/core 4.4.0 → 4.4.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v4.4.0
2
+ * @license Angular v4.4.4
3
3
  * (c) 2010-2017 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -36,7 +36,7 @@ function __extends(d, b) {
36
36
  }
37
37
 
38
38
  /**
39
- * @license Angular v4.4.0
39
+ * @license Angular v4.4.4
40
40
  * (c) 2010-2017 Google, Inc. https://angular.io/
41
41
  * License: MIT
42
42
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v4.4.0
2
+ * @license Angular v4.4.4
3
3
  * (c) 2010-2017 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v4.4.0
2
+ * @license Angular v4.4.4
3
3
  * (c) 2010-2017 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -36,7 +36,7 @@ function __extends(d, b) {
36
36
  }
37
37
 
38
38
  /**
39
- * @license Angular v4.4.0
39
+ * @license Angular v4.4.4
40
40
  * (c) 2010-2017 Google, Inc. https://angular.io/
41
41
  * License: MIT
42
42
  */
@@ -828,7 +828,7 @@ var Version = (function () {
828
828
  /**
829
829
  * \@stable
830
830
  */
831
- var VERSION = new Version('4.4.0');
831
+ var VERSION = new Version('4.4.4');
832
832
  /**
833
833
  * @license
834
834
  * Copyright Google Inc. All Rights Reserved.
@@ -11953,33 +11953,19 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
11953
11953
  var /** @type {?} */ viewRootNodeFlags = 0;
11954
11954
  var /** @type {?} */ viewMatchedQueries = 0;
11955
11955
  var /** @type {?} */ currentParent = null;
11956
+ var /** @type {?} */ currentRenderParent = null;
11956
11957
  var /** @type {?} */ currentElementHasPublicProviders = false;
11957
11958
  var /** @type {?} */ currentElementHasPrivateProviders = false;
11958
11959
  var /** @type {?} */ lastRenderRootNode = null;
11959
11960
  for (var /** @type {?} */ i = 0; i < nodes.length; i++) {
11960
- while (currentParent && i > currentParent.index + currentParent.childCount) {
11961
- var /** @type {?} */ newParent = currentParent.parent;
11962
- if (newParent) {
11963
- newParent.childFlags |= ((currentParent.childFlags));
11964
- newParent.childMatchedQueries |= currentParent.childMatchedQueries;
11965
- }
11966
- currentParent = newParent;
11967
- }
11968
11961
  var /** @type {?} */ node = nodes[i];
11969
11962
  node.index = i;
11970
11963
  node.parent = currentParent;
11971
11964
  node.bindingIndex = viewBindingCount;
11972
11965
  node.outputIndex = viewDisposableCount;
11973
- // renderParent needs to account for ng-container!
11974
- var /** @type {?} */ currentRenderParent = void 0;
11975
- if (currentParent && currentParent.flags & 1 /* TypeElement */ &&
11976
- !((currentParent.element)).name) {
11977
- currentRenderParent = currentParent.renderParent;
11978
- }
11979
- else {
11980
- currentRenderParent = currentParent;
11981
- }
11982
11966
  node.renderParent = currentRenderParent;
11967
+ viewNodeFlags |= node.flags;
11968
+ viewMatchedQueries |= node.matchedQueryIds;
11983
11969
  if (node.element) {
11984
11970
  var /** @type {?} */ elDef = node.element;
11985
11971
  elDef.publicProviders =
@@ -11988,24 +11974,11 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
11988
11974
  // Note: We assume that all providers of an element are before any child element!
11989
11975
  currentElementHasPublicProviders = false;
11990
11976
  currentElementHasPrivateProviders = false;
11991
- }
11992
- validateNode(currentParent, node, nodes.length);
11993
- viewNodeFlags |= node.flags;
11994
- viewMatchedQueries |= node.matchedQueryIds;
11995
- if (node.element && node.element.template) {
11996
- viewMatchedQueries |= node.element.template.nodeMatchedQueries;
11997
- }
11998
- if (currentParent) {
11999
- currentParent.childFlags |= node.flags;
12000
- currentParent.directChildFlags |= node.flags;
12001
- currentParent.childMatchedQueries |= node.matchedQueryIds;
12002
- if (node.element && node.element.template) {
12003
- currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;
11977
+ if (node.element.template) {
11978
+ viewMatchedQueries |= node.element.template.nodeMatchedQueries;
12004
11979
  }
12005
11980
  }
12006
- else {
12007
- viewRootNodeFlags |= node.flags;
12008
- }
11981
+ validateNode(currentParent, node, nodes.length);
12009
11982
  viewBindingCount += node.bindings.length;
12010
11983
  viewDisposableCount += node.outputs.length;
12011
11984
  if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {
@@ -12029,7 +12002,7 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
12029
12002
  if (!currentElementHasPrivateProviders) {
12030
12003
  currentElementHasPrivateProviders = true; /** @type {?} */
12031
12004
  ((((
12032
- // Use protoyypical inheritance to not get O(n^2) complexity...
12005
+ // Use prototypical inheritance to not get O(n^2) complexity...
12033
12006
  currentParent)).element)).allProviders =
12034
12007
  Object.create(/** @type {?} */ ((((currentParent)).element)).publicProviders);
12035
12008
  } /** @type {?} */
@@ -12039,17 +12012,45 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
12039
12012
  ((((currentParent)).element)).componentProvider = node;
12040
12013
  }
12041
12014
  }
12042
- if (node.childCount) {
12015
+ if (currentParent) {
12016
+ currentParent.childFlags |= node.flags;
12017
+ currentParent.directChildFlags |= node.flags;
12018
+ currentParent.childMatchedQueries |= node.matchedQueryIds;
12019
+ if (node.element && node.element.template) {
12020
+ currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;
12021
+ }
12022
+ }
12023
+ else {
12024
+ viewRootNodeFlags |= node.flags;
12025
+ }
12026
+ if (node.childCount > 0) {
12043
12027
  currentParent = node;
12028
+ if (!isNgContainer(node)) {
12029
+ currentRenderParent = node;
12030
+ }
12044
12031
  }
12045
- }
12046
- while (currentParent) {
12047
- var /** @type {?} */ newParent = currentParent.parent;
12048
- if (newParent) {
12049
- newParent.childFlags |= currentParent.childFlags;
12050
- newParent.childMatchedQueries |= currentParent.childMatchedQueries;
12032
+ else {
12033
+ // When the current node has no children, check if it is the last children of its parent.
12034
+ // When it is, propagate the flags up.
12035
+ // The loop is required because an element could be the last transitive children of several
12036
+ // elements. We loop to either the root or the highest opened element (= with remaining
12037
+ // children)
12038
+ while (currentParent && i === currentParent.index + currentParent.childCount) {
12039
+ var /** @type {?} */ newParent = currentParent.parent;
12040
+ if (newParent) {
12041
+ newParent.childFlags |= currentParent.childFlags;
12042
+ newParent.childMatchedQueries |= currentParent.childMatchedQueries;
12043
+ }
12044
+ currentParent = newParent;
12045
+ // We also need to update the render parent & account for ng-container
12046
+ if (currentParent && isNgContainer(currentParent)) {
12047
+ currentRenderParent = currentParent.renderParent;
12048
+ }
12049
+ else {
12050
+ currentRenderParent = currentParent;
12051
+ }
12052
+ }
12051
12053
  }
12052
- currentParent = newParent;
12053
12054
  }
12054
12055
  var /** @type {?} */ handleEvent = function (view, nodeIndex, eventName, event) { return ((((nodes[nodeIndex].element)).handleEvent))(view, eventName, event); };
12055
12056
  return {
@@ -12060,12 +12061,18 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
12060
12061
  nodeMatchedQueries: viewMatchedQueries, flags: flags,
12061
12062
  nodes: nodes,
12062
12063
  updateDirectives: updateDirectives || NOOP,
12063
- updateRenderer: updateRenderer || NOOP,
12064
- handleEvent: handleEvent || NOOP,
12064
+ updateRenderer: updateRenderer || NOOP, handleEvent: handleEvent,
12065
12065
  bindingCount: viewBindingCount,
12066
12066
  outputCount: viewDisposableCount, lastRenderRootNode: lastRenderRootNode
12067
12067
  };
12068
12068
  }
12069
+ /**
12070
+ * @param {?} node
12071
+ * @return {?}
12072
+ */
12073
+ function isNgContainer(node) {
12074
+ return (node.flags & 1 /* TypeElement */) !== 0 && ((node.element)).name === null;
12075
+ }
12069
12076
  /**
12070
12077
  * @param {?} parent
12071
12078
  * @param {?} node