@angular/core 4.4.3 → 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,6 +1,6 @@
1
1
  import * as tslib_1 from "tslib";
2
2
  /**
3
- * @license Angular v4.4.3
3
+ * @license Angular v4.4.4
4
4
  * (c) 2010-2017 Google, Inc. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v4.4.3
2
+ * @license Angular v4.4.4
3
3
  * (c) 2010-2017 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import * as tslib_1 from "tslib";
2
2
  /**
3
- * @license Angular v4.4.3
3
+ * @license Angular v4.4.4
4
4
  * (c) 2010-2017 Google, Inc. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -796,7 +796,7 @@ var Version = (function () {
796
796
  /**
797
797
  * \@stable
798
798
  */
799
- var VERSION = new Version('4.4.3');
799
+ var VERSION = new Version('4.4.4');
800
800
  /**
801
801
  * @license
802
802
  * Copyright Google Inc. All Rights Reserved.
@@ -11921,33 +11921,19 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
11921
11921
  var /** @type {?} */ viewRootNodeFlags = 0;
11922
11922
  var /** @type {?} */ viewMatchedQueries = 0;
11923
11923
  var /** @type {?} */ currentParent = null;
11924
+ var /** @type {?} */ currentRenderParent = null;
11924
11925
  var /** @type {?} */ currentElementHasPublicProviders = false;
11925
11926
  var /** @type {?} */ currentElementHasPrivateProviders = false;
11926
11927
  var /** @type {?} */ lastRenderRootNode = null;
11927
11928
  for (var /** @type {?} */ i = 0; i < nodes.length; i++) {
11928
- while (currentParent && i > currentParent.index + currentParent.childCount) {
11929
- var /** @type {?} */ newParent = currentParent.parent;
11930
- if (newParent) {
11931
- newParent.childFlags |= ((currentParent.childFlags));
11932
- newParent.childMatchedQueries |= currentParent.childMatchedQueries;
11933
- }
11934
- currentParent = newParent;
11935
- }
11936
11929
  var /** @type {?} */ node = nodes[i];
11937
11930
  node.index = i;
11938
11931
  node.parent = currentParent;
11939
11932
  node.bindingIndex = viewBindingCount;
11940
11933
  node.outputIndex = viewDisposableCount;
11941
- // renderParent needs to account for ng-container!
11942
- var /** @type {?} */ currentRenderParent = void 0;
11943
- if (currentParent && currentParent.flags & 1 /* TypeElement */ &&
11944
- !((currentParent.element)).name) {
11945
- currentRenderParent = currentParent.renderParent;
11946
- }
11947
- else {
11948
- currentRenderParent = currentParent;
11949
- }
11950
11934
  node.renderParent = currentRenderParent;
11935
+ viewNodeFlags |= node.flags;
11936
+ viewMatchedQueries |= node.matchedQueryIds;
11951
11937
  if (node.element) {
11952
11938
  var /** @type {?} */ elDef = node.element;
11953
11939
  elDef.publicProviders =
@@ -11956,24 +11942,11 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
11956
11942
  // Note: We assume that all providers of an element are before any child element!
11957
11943
  currentElementHasPublicProviders = false;
11958
11944
  currentElementHasPrivateProviders = false;
11959
- }
11960
- validateNode(currentParent, node, nodes.length);
11961
- viewNodeFlags |= node.flags;
11962
- viewMatchedQueries |= node.matchedQueryIds;
11963
- if (node.element && node.element.template) {
11964
- viewMatchedQueries |= node.element.template.nodeMatchedQueries;
11965
- }
11966
- if (currentParent) {
11967
- currentParent.childFlags |= node.flags;
11968
- currentParent.directChildFlags |= node.flags;
11969
- currentParent.childMatchedQueries |= node.matchedQueryIds;
11970
- if (node.element && node.element.template) {
11971
- currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;
11945
+ if (node.element.template) {
11946
+ viewMatchedQueries |= node.element.template.nodeMatchedQueries;
11972
11947
  }
11973
11948
  }
11974
- else {
11975
- viewRootNodeFlags |= node.flags;
11976
- }
11949
+ validateNode(currentParent, node, nodes.length);
11977
11950
  viewBindingCount += node.bindings.length;
11978
11951
  viewDisposableCount += node.outputs.length;
11979
11952
  if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {
@@ -11997,7 +11970,7 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
11997
11970
  if (!currentElementHasPrivateProviders) {
11998
11971
  currentElementHasPrivateProviders = true; /** @type {?} */
11999
11972
  ((((
12000
- // Use protoyypical inheritance to not get O(n^2) complexity...
11973
+ // Use prototypical inheritance to not get O(n^2) complexity...
12001
11974
  currentParent)).element)).allProviders =
12002
11975
  Object.create(/** @type {?} */ ((((currentParent)).element)).publicProviders);
12003
11976
  } /** @type {?} */
@@ -12007,17 +11980,45 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
12007
11980
  ((((currentParent)).element)).componentProvider = node;
12008
11981
  }
12009
11982
  }
12010
- if (node.childCount) {
11983
+ if (currentParent) {
11984
+ currentParent.childFlags |= node.flags;
11985
+ currentParent.directChildFlags |= node.flags;
11986
+ currentParent.childMatchedQueries |= node.matchedQueryIds;
11987
+ if (node.element && node.element.template) {
11988
+ currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;
11989
+ }
11990
+ }
11991
+ else {
11992
+ viewRootNodeFlags |= node.flags;
11993
+ }
11994
+ if (node.childCount > 0) {
12011
11995
  currentParent = node;
11996
+ if (!isNgContainer(node)) {
11997
+ currentRenderParent = node;
11998
+ }
12012
11999
  }
12013
- }
12014
- while (currentParent) {
12015
- var /** @type {?} */ newParent = currentParent.parent;
12016
- if (newParent) {
12017
- newParent.childFlags |= currentParent.childFlags;
12018
- newParent.childMatchedQueries |= currentParent.childMatchedQueries;
12000
+ else {
12001
+ // When the current node has no children, check if it is the last children of its parent.
12002
+ // When it is, propagate the flags up.
12003
+ // The loop is required because an element could be the last transitive children of several
12004
+ // elements. We loop to either the root or the highest opened element (= with remaining
12005
+ // children)
12006
+ while (currentParent && i === currentParent.index + currentParent.childCount) {
12007
+ var /** @type {?} */ newParent = currentParent.parent;
12008
+ if (newParent) {
12009
+ newParent.childFlags |= currentParent.childFlags;
12010
+ newParent.childMatchedQueries |= currentParent.childMatchedQueries;
12011
+ }
12012
+ currentParent = newParent;
12013
+ // We also need to update the render parent & account for ng-container
12014
+ if (currentParent && isNgContainer(currentParent)) {
12015
+ currentRenderParent = currentParent.renderParent;
12016
+ }
12017
+ else {
12018
+ currentRenderParent = currentParent;
12019
+ }
12020
+ }
12019
12021
  }
12020
- currentParent = newParent;
12021
12022
  }
12022
12023
  var /** @type {?} */ handleEvent = function (view, nodeIndex, eventName, event) { return ((((nodes[nodeIndex].element)).handleEvent))(view, eventName, event); };
12023
12024
  return {
@@ -12028,12 +12029,18 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
12028
12029
  nodeMatchedQueries: viewMatchedQueries, flags: flags,
12029
12030
  nodes: nodes,
12030
12031
  updateDirectives: updateDirectives || NOOP,
12031
- updateRenderer: updateRenderer || NOOP,
12032
- handleEvent: handleEvent || NOOP,
12032
+ updateRenderer: updateRenderer || NOOP, handleEvent: handleEvent,
12033
12033
  bindingCount: viewBindingCount,
12034
12034
  outputCount: viewDisposableCount, lastRenderRootNode: lastRenderRootNode
12035
12035
  };
12036
12036
  }
12037
+ /**
12038
+ * @param {?} node
12039
+ * @return {?}
12040
+ */
12041
+ function isNgContainer(node) {
12042
+ return (node.flags & 1 /* TypeElement */) !== 0 && ((node.element)).name === null;
12043
+ }
12037
12044
  /**
12038
12045
  * @param {?} parent
12039
12046
  * @param {?} node