@angular/platform-browser 6.0.3 → 6.0.7

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.
Files changed (95) hide show
  1. package/animations/animations.metadata.json +1 -1
  2. package/animations/src/providers.d.ts +1 -1
  3. package/animations.d.ts +0 -5
  4. package/animations.metadata.json +1 -1
  5. package/bundles/platform-browser-animations.umd.js +53 -24
  6. package/bundles/platform-browser-animations.umd.js.map +1 -1
  7. package/bundles/platform-browser-animations.umd.min.js +18 -4
  8. package/bundles/platform-browser-animations.umd.min.js.map +1 -1
  9. package/bundles/platform-browser-testing.umd.js +24 -13
  10. package/bundles/platform-browser-testing.umd.js.map +1 -1
  11. package/bundles/platform-browser-testing.umd.min.js +9 -2
  12. package/bundles/platform-browser-testing.umd.min.js.map +1 -1
  13. package/bundles/platform-browser.umd.js +106 -362
  14. package/bundles/platform-browser.umd.js.map +1 -1
  15. package/bundles/platform-browser.umd.min.js +9 -9
  16. package/bundles/platform-browser.umd.min.js.map +1 -1
  17. package/esm2015/animations/src/animation_builder.js +3 -10
  18. package/esm2015/animations/src/animation_renderer.js +4 -11
  19. package/esm2015/animations/src/module.js +1 -23
  20. package/esm2015/animations/src/providers.js +9 -15
  21. package/esm2015/src/browser/location/browser_platform_location.js +2 -9
  22. package/esm2015/src/browser/meta.js +2 -9
  23. package/esm2015/src/browser/title.js +2 -9
  24. package/esm2015/src/browser/transfer_state.js +1 -21
  25. package/esm2015/src/browser.js +2 -11
  26. package/esm2015/src/dom/dom_renderer.js +3 -10
  27. package/esm2015/src/dom/events/dom_events.js +12 -14
  28. package/esm2015/src/dom/events/event_manager.js +3 -10
  29. package/esm2015/src/dom/events/hammer_gestures.js +4 -20
  30. package/esm2015/src/dom/events/key_events.js +2 -11
  31. package/esm2015/src/dom/shared_styles_host.js +2 -18
  32. package/esm2015/src/security/dom_sanitization_service.js +2 -9
  33. package/esm2015/src/version.js +1 -1
  34. package/esm2015/testing/src/browser.js +0 -11
  35. package/esm5/animations/index.js +5 -1
  36. package/esm5/animations/public_api.js +6 -1
  37. package/esm5/animations/src/animation_builder.js +10 -3
  38. package/esm5/animations/src/animation_renderer.js +6 -10
  39. package/esm5/animations/src/animations.js +6 -1
  40. package/esm5/animations/src/module.js +8 -5
  41. package/esm5/animations/src/private_export.js +8 -1
  42. package/esm5/animations/src/providers.js +8 -6
  43. package/esm5/index.js +5 -1
  44. package/esm5/public_api.js +6 -1
  45. package/esm5/src/browser/browser_adapter.js +5 -25
  46. package/esm5/src/browser/generic_browser_adapter.js +2 -14
  47. package/esm5/src/browser/location/browser_platform_location.js +3 -8
  48. package/esm5/src/browser/location/history.js +1 -1
  49. package/esm5/src/browser/meta.js +6 -6
  50. package/esm5/src/browser/server-transition.js +1 -1
  51. package/esm5/src/browser/testability.js +1 -1
  52. package/esm5/src/browser/title.js +4 -18
  53. package/esm5/src/browser/tools/browser.js +1 -1
  54. package/esm5/src/browser/tools/common_tools.js +3 -50
  55. package/esm5/src/browser/tools/tools.js +1 -1
  56. package/esm5/src/browser/transfer_state.js +8 -50
  57. package/esm5/src/browser.js +3 -17
  58. package/esm5/src/dom/debug/by.js +5 -57
  59. package/esm5/src/dom/debug/ng_probe.js +1 -1
  60. package/esm5/src/dom/dom_adapter.js +4 -22
  61. package/esm5/src/dom/dom_renderer.js +3 -3
  62. package/esm5/src/dom/dom_tokens.js +1 -1
  63. package/esm5/src/dom/events/dom_events.js +24 -25
  64. package/esm5/src/dom/events/event_manager.js +7 -51
  65. package/esm5/src/dom/events/hammer_gestures.js +24 -38
  66. package/esm5/src/dom/events/key_events.js +8 -50
  67. package/esm5/src/dom/shared_styles_host.js +2 -4
  68. package/esm5/src/dom/util.js +1 -1
  69. package/esm5/src/platform-browser.js +1 -1
  70. package/esm5/src/private_export.js +1 -1
  71. package/esm5/src/security/dom_sanitization_service.js +4 -66
  72. package/esm5/src/version.js +7 -2
  73. package/esm5/testing/index.js +5 -1
  74. package/esm5/testing/public_api.js +6 -1
  75. package/esm5/testing/src/browser.js +8 -3
  76. package/esm5/testing/src/browser_util.js +3 -11
  77. package/esm5/testing/src/matchers.js +1 -5
  78. package/esm5/testing/src/testing.js +6 -1
  79. package/fesm2015/animations.js +13 -14
  80. package/fesm2015/animations.js.map +1 -1
  81. package/fesm2015/platform-browser.js +26 -30
  82. package/fesm2015/platform-browser.js.map +1 -1
  83. package/fesm2015/testing.js +1 -3
  84. package/fesm2015/testing.js.map +1 -1
  85. package/fesm5/animations.js +50 -20
  86. package/fesm5/animations.js.map +1 -1
  87. package/fesm5/platform-browser.js +107 -363
  88. package/fesm5/platform-browser.js.map +1 -1
  89. package/fesm5/testing.js +24 -13
  90. package/fesm5/testing.js.map +1 -1
  91. package/package.json +3 -3
  92. package/platform-browser.metadata.json +1 -1
  93. package/src/dom/events/dom_events.d.ts +1 -8
  94. package/testing.d.ts +0 -5
  95. package/testing.metadata.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v6.0.3
2
+ * @license Angular v6.0.7
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -90,7 +90,7 @@ function __spread() {
90
90
  * Use of this source code is governed by an MIT-style license that can be
91
91
  * found in the LICENSE file at https://angular.io/license
92
92
  */
93
- var _DOM = (null);
93
+ var _DOM = null;
94
94
  function getDOM() {
95
95
  return _DOM;
96
96
  }
@@ -116,11 +116,7 @@ var DomAdapter = /** @class */ (function () {
116
116
  * Maps attribute names to their corresponding property names for cases
117
117
  * where attribute name doesn't match property name.
118
118
  */
119
- get: /**
120
- * Maps attribute names to their corresponding property names for cases
121
- * where attribute name doesn't match property name.
122
- */
123
- function () { return this._attrToPropMap; },
119
+ get: function () { return this._attrToPropMap; },
124
120
  set: function (value) { this._attrToPropMap = value; },
125
121
  enumerable: true,
126
122
  configurable: true
@@ -276,10 +272,7 @@ var BrowserDomAdapter = /** @class */ (function (_super) {
276
272
  var _a;
277
273
  };
278
274
  // TODO(tbosch): move this into a separate environment class once we have it
279
- // TODO(tbosch): move this into a separate environment class once we have it
280
- BrowserDomAdapter.prototype.logError =
281
- // TODO(tbosch): move this into a separate environment class once we have it
282
- function (error) {
275
+ BrowserDomAdapter.prototype.logError = function (error) {
283
276
  if (window.console) {
284
277
  if (console.error) {
285
278
  console.error(error);
@@ -566,10 +559,7 @@ var BrowserDomAdapter = /** @class */ (function (_super) {
566
559
  };
567
560
  BrowserDomAdapter.prototype.getComputedStyle = function (element) { return getComputedStyle(element); };
568
561
  // TODO(tbosch): move this into a separate environment class once we have it
569
- // TODO(tbosch): move this into a separate environment class once we have it
570
- BrowserDomAdapter.prototype.supportsWebAnimation =
571
- // TODO(tbosch): move this into a separate environment class once we have it
572
- function () {
562
+ BrowserDomAdapter.prototype.supportsWebAnimation = function () {
573
563
  return typeof Element.prototype['animate'] === 'function';
574
564
  };
575
565
  BrowserDomAdapter.prototype.performanceNow = function () {
@@ -590,7 +580,7 @@ var BrowserDomAdapter = /** @class */ (function (_super) {
590
580
  var baseElement = null;
591
581
  function getBaseElementHref() {
592
582
  if (!baseElement) {
593
- baseElement = (document.querySelector('base'));
583
+ baseElement = document.querySelector('base');
594
584
  if (!baseElement) {
595
585
  return null;
596
586
  }
@@ -658,12 +648,7 @@ var BrowserPlatformLocation = /** @class */ (function (_super) {
658
648
  }
659
649
  // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
660
650
  /** @internal */
661
- // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
662
- /** @internal */
663
- BrowserPlatformLocation.prototype._init =
664
- // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
665
- /** @internal */
666
- function () {
651
+ BrowserPlatformLocation.prototype._init = function () {
667
652
  this.location = getDOM().getLocation();
668
653
  this._history = getDOM().getHistory();
669
654
  };
@@ -713,7 +698,7 @@ var BrowserPlatformLocation = /** @class */ (function (_super) {
713
698
  ];
714
699
  /** @nocollapse */
715
700
  BrowserPlatformLocation.ctorParameters = function () { return [
716
- { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] },] },
701
+ { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] }] }
717
702
  ]; };
718
703
  return BrowserPlatformLocation;
719
704
  }(common.PlatformLocation));
@@ -761,20 +746,20 @@ var Meta = /** @class */ (function () {
761
746
  Meta.prototype.getTags = function (attrSelector) {
762
747
  if (!attrSelector)
763
748
  return [];
764
- var list = this._dom.querySelectorAll(this._doc, "meta[" + attrSelector + "]");
749
+ var list /*NodeList*/ = this._dom.querySelectorAll(this._doc, "meta[" + attrSelector + "]");
765
750
  return list ? [].slice.call(list) : [];
766
751
  };
767
752
  Meta.prototype.updateTag = function (tag, selector) {
768
753
  if (!tag)
769
754
  return null;
770
755
  selector = selector || this._parseSelector(tag);
771
- var meta = (this.getTag(selector));
756
+ var meta = this.getTag(selector);
772
757
  if (meta) {
773
758
  return this._setMetaElementAttributes(tag, meta);
774
759
  }
775
760
  return this._getOrCreateElement(tag, true);
776
761
  };
777
- Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement((this.getTag(attrSelector))); };
762
+ Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement(this.getTag(attrSelector)); };
778
763
  Meta.prototype.removeTagElement = function (meta) {
779
764
  if (meta) {
780
765
  this._dom.remove(meta);
@@ -784,7 +769,7 @@ var Meta = /** @class */ (function () {
784
769
  if (forceCreation === void 0) { forceCreation = false; }
785
770
  if (!forceCreation) {
786
771
  var selector = this._parseSelector(meta);
787
- var elem = (this.getTag(selector));
772
+ var elem = this.getTag(selector);
788
773
  // It's allowed to have multiple elements with the same name so it's not enough to
789
774
  // just check that element with the same name already present on the page. We also need to
790
775
  // check if element has tag attributes
@@ -815,7 +800,7 @@ var Meta = /** @class */ (function () {
815
800
  ];
816
801
  /** @nocollapse */
817
802
  Meta.ctorParameters = function () { return [
818
- { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] },] },
803
+ { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] }] }
819
804
  ]; };
820
805
  return Meta;
821
806
  }());
@@ -938,32 +923,18 @@ var Title = /** @class */ (function () {
938
923
  /**
939
924
  * Get the title of the current HTML document.
940
925
  */
941
- /**
942
- * Get the title of the current HTML document.
943
- */
944
- Title.prototype.getTitle = /**
945
- * Get the title of the current HTML document.
946
- */
947
- function () { return getDOM().getTitle(this._doc); };
926
+ Title.prototype.getTitle = function () { return getDOM().getTitle(this._doc); };
948
927
  /**
949
928
  * Set the title of the current HTML document.
950
929
  * @param newTitle
951
930
  */
952
- /**
953
- * Set the title of the current HTML document.
954
- * @param newTitle
955
- */
956
- Title.prototype.setTitle = /**
957
- * Set the title of the current HTML document.
958
- * @param newTitle
959
- */
960
- function (newTitle) { getDOM().setTitle(this._doc, newTitle); };
931
+ Title.prototype.setTitle = function (newTitle) { getDOM().setTitle(this._doc, newTitle); };
961
932
  Title.decorators = [
962
933
  { type: core.Injectable }
963
934
  ];
964
935
  /** @nocollapse */
965
936
  Title.ctorParameters = function () { return [
966
- { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] },] },
937
+ { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] }] }
967
938
  ]; };
968
939
  return Title;
969
940
  }());
@@ -1073,25 +1044,7 @@ var EventManager = /** @class */ (function () {
1073
1044
  * event object as an argument.
1074
1045
  * @returns A callback function that can be used to remove the handler.
1075
1046
  */
1076
- /**
1077
- * Registers a handler for a specific element and event.
1078
- *
1079
- * @param element The HTML element to receive event notifications.
1080
- * @param eventName The name of the event to listen for.
1081
- * @param handler A function to call when the notification occurs. Receives the
1082
- * event object as an argument.
1083
- * @returns A callback function that can be used to remove the handler.
1084
- */
1085
- EventManager.prototype.addEventListener = /**
1086
- * Registers a handler for a specific element and event.
1087
- *
1088
- * @param element The HTML element to receive event notifications.
1089
- * @param eventName The name of the event to listen for.
1090
- * @param handler A function to call when the notification occurs. Receives the
1091
- * event object as an argument.
1092
- * @returns A callback function that can be used to remove the handler.
1093
- */
1094
- function (element, eventName, handler) {
1047
+ EventManager.prototype.addEventListener = function (element, eventName, handler) {
1095
1048
  var plugin = this._findPluginFor(eventName);
1096
1049
  return plugin.addEventListener(element, eventName, handler);
1097
1050
  };
@@ -1104,42 +1057,16 @@ var EventManager = /** @class */ (function () {
1104
1057
  * event object as an argument.
1105
1058
  * @returns A callback function that can be used to remove the handler.
1106
1059
  */
1107
- /**
1108
- * Registers a global handler for an event in a target view.
1109
- *
1110
- * @param target A target for global event notifications. One of "window", "document", or "body".
1111
- * @param eventName The name of the event to listen for.
1112
- * @param handler A function to call when the notification occurs. Receives the
1113
- * event object as an argument.
1114
- * @returns A callback function that can be used to remove the handler.
1115
- */
1116
- EventManager.prototype.addGlobalEventListener = /**
1117
- * Registers a global handler for an event in a target view.
1118
- *
1119
- * @param target A target for global event notifications. One of "window", "document", or "body".
1120
- * @param eventName The name of the event to listen for.
1121
- * @param handler A function to call when the notification occurs. Receives the
1122
- * event object as an argument.
1123
- * @returns A callback function that can be used to remove the handler.
1124
- */
1125
- function (target, eventName, handler) {
1060
+ EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {
1126
1061
  var plugin = this._findPluginFor(eventName);
1127
1062
  return plugin.addGlobalEventListener(target, eventName, handler);
1128
1063
  };
1129
1064
  /**
1130
1065
  * Retrieves the compilation zone in which event listeners are registered.
1131
1066
  */
1132
- /**
1133
- * Retrieves the compilation zone in which event listeners are registered.
1134
- */
1135
- EventManager.prototype.getZone = /**
1136
- * Retrieves the compilation zone in which event listeners are registered.
1137
- */
1138
- function () { return this._zone; };
1139
- /** @internal */
1067
+ EventManager.prototype.getZone = function () { return this._zone; };
1140
1068
  /** @internal */
1141
- EventManager.prototype._findPluginFor = /** @internal */
1142
- function (eventName) {
1069
+ EventManager.prototype._findPluginFor = function (eventName) {
1143
1070
  var plugin = this._eventNameToPlugin.get(eventName);
1144
1071
  if (plugin) {
1145
1072
  return plugin;
@@ -1159,8 +1086,8 @@ var EventManager = /** @class */ (function () {
1159
1086
  ];
1160
1087
  /** @nocollapse */
1161
1088
  EventManager.ctorParameters = function () { return [
1162
- { type: Array, decorators: [{ type: core.Inject, args: [EVENT_MANAGER_PLUGINS,] },] },
1163
- { type: core.NgZone, },
1089
+ { type: Array, decorators: [{ type: core.Inject, args: [EVENT_MANAGER_PLUGINS,] }] },
1090
+ { type: core.NgZone }
1164
1091
  ]; };
1165
1092
  return EventManager;
1166
1093
  }());
@@ -1206,8 +1133,6 @@ var SharedStylesHost = /** @class */ (function () {
1206
1133
  SharedStylesHost.decorators = [
1207
1134
  { type: core.Injectable }
1208
1135
  ];
1209
- /** @nocollapse */
1210
- SharedStylesHost.ctorParameters = function () { return []; };
1211
1136
  return SharedStylesHost;
1212
1137
  }());
1213
1138
  var DomSharedStylesHost = /** @class */ (function (_super) {
@@ -1243,7 +1168,7 @@ var DomSharedStylesHost = /** @class */ (function (_super) {
1243
1168
  ];
1244
1169
  /** @nocollapse */
1245
1170
  DomSharedStylesHost.ctorParameters = function () { return [
1246
- { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] },] },
1171
+ { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] }] }
1247
1172
  ]; };
1248
1173
  return DomSharedStylesHost;
1249
1174
  }(SharedStylesHost));
@@ -1336,8 +1261,8 @@ var DomRendererFactory2 = /** @class */ (function () {
1336
1261
  ];
1337
1262
  /** @nocollapse */
1338
1263
  DomRendererFactory2.ctorParameters = function () { return [
1339
- { type: EventManager, },
1340
- { type: DomSharedStylesHost, },
1264
+ { type: EventManager },
1265
+ { type: DomSharedStylesHost }
1341
1266
  ]; };
1342
1267
  return DomRendererFactory2;
1343
1268
  }());
@@ -1584,14 +1509,16 @@ var globalListener = function (event) {
1584
1509
  };
1585
1510
  var DomEventsPlugin = /** @class */ (function (_super) {
1586
1511
  __extends(DomEventsPlugin, _super);
1587
- function DomEventsPlugin(doc, ngZone) {
1512
+ function DomEventsPlugin(doc, ngZone, platformId) {
1588
1513
  var _this = _super.call(this, doc) || this;
1589
1514
  _this.ngZone = ngZone;
1590
- _this.patchEvent();
1515
+ if (!platformId || !common.isPlatformServer(platformId)) {
1516
+ _this.patchEvent();
1517
+ }
1591
1518
  return _this;
1592
1519
  }
1593
1520
  DomEventsPlugin.prototype.patchEvent = function () {
1594
- if (!Event || !Event.prototype) {
1521
+ if (typeof Event === 'undefined' || !Event || !Event.prototype) {
1595
1522
  return;
1596
1523
  }
1597
1524
  if (Event.prototype[stopMethodSymbol]) {
@@ -1612,27 +1539,22 @@ var DomEventsPlugin = /** @class */ (function (_super) {
1612
1539
  };
1613
1540
  // This plugin should come last in the list of plugins, because it accepts all
1614
1541
  // events.
1615
- // This plugin should come last in the list of plugins, because it accepts all
1616
- // events.
1617
- DomEventsPlugin.prototype.supports =
1618
- // This plugin should come last in the list of plugins, because it accepts all
1619
- // events.
1620
- function (eventName) { return true; };
1542
+ DomEventsPlugin.prototype.supports = function (eventName) { return true; };
1621
1543
  DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
1622
1544
  var _this = this;
1623
1545
  /**
1624
- * This code is about to add a listener to the DOM. If Zone.js is present, than
1625
- * `addEventListener` has been patched. The patched code adds overhead in both
1626
- * memory and speed (3x slower) than native. For this reason if we detect that
1627
- * Zone.js is present we use a simple version of zone aware addEventListener instead.
1628
- * The result is faster registration and the zone will be restored.
1629
- * But ZoneSpec.onScheduleTask, ZoneSpec.onInvokeTask, ZoneSpec.onCancelTask
1630
- * will not be invoked
1631
- * We also do manual zone restoration in element.ts renderEventHandlerClosure method.
1632
- *
1633
- * NOTE: it is possible that the element is from different iframe, and so we
1634
- * have to check before we execute the method.
1635
- */
1546
+ * This code is about to add a listener to the DOM. If Zone.js is present, than
1547
+ * `addEventListener` has been patched. The patched code adds overhead in both
1548
+ * memory and speed (3x slower) than native. For this reason if we detect that
1549
+ * Zone.js is present we use a simple version of zone aware addEventListener instead.
1550
+ * The result is faster registration and the zone will be restored.
1551
+ * But ZoneSpec.onScheduleTask, ZoneSpec.onInvokeTask, ZoneSpec.onCancelTask
1552
+ * will not be invoked
1553
+ * We also do manual zone restoration in element.ts renderEventHandlerClosure method.
1554
+ *
1555
+ * NOTE: it is possible that the element is from different iframe, and so we
1556
+ * have to check before we execute the method.
1557
+ */
1636
1558
  var zoneJsLoaded = element[ADD_EVENT_LISTENER];
1637
1559
  var callback = handler;
1638
1560
  // if zonejs is loaded and current zone is not ngZone
@@ -1713,8 +1635,9 @@ var DomEventsPlugin = /** @class */ (function (_super) {
1713
1635
  ];
1714
1636
  /** @nocollapse */
1715
1637
  DomEventsPlugin.ctorParameters = function () { return [
1716
- { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] },] },
1717
- { type: core.NgZone, },
1638
+ { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] }] },
1639
+ { type: core.NgZone },
1640
+ { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [core.PLATFORM_ID,] }] }
1718
1641
  ]; };
1719
1642
  return DomEventsPlugin;
1720
1643
  }(EventManagerPlugin));
@@ -1781,27 +1704,27 @@ var HAMMER_GESTURE_CONFIG = new core.InjectionToken('HammerGestureConfig');
1781
1704
  var HammerGestureConfig = /** @class */ (function () {
1782
1705
  function HammerGestureConfig() {
1783
1706
  /**
1784
- * A set of supported event names for gestures to be used in Angular.
1785
- * Angular supports all built-in recognizers, as listed in
1786
- * [HammerJS documentation](http://hammerjs.github.io/).
1787
- */
1707
+ * A set of supported event names for gestures to be used in Angular.
1708
+ * Angular supports all built-in recognizers, as listed in
1709
+ * [HammerJS documentation](http://hammerjs.github.io/).
1710
+ */
1788
1711
  this.events = [];
1789
1712
  /**
1790
- * Maps gesture event names to a set of configuration options
1791
- * that specify overrides to the default values for specific properties.
1792
- *
1793
- * The key is a supported event name to be configured,
1794
- * and the options object contains a set of properties, with override values
1795
- * to be applied to the named recognizer event.
1796
- * For example, to disable recognition of the rotate event, specify
1797
- * `{"rotate": {"enable": false}}`.
1798
- *
1799
- * Properties that are not present take the HammerJS default values.
1800
- * For information about which properties are supported for which events,
1801
- * and their allowed and default values, see
1802
- * [HammerJS documentation](http://hammerjs.github.io/).
1803
- *
1804
- */
1713
+ * Maps gesture event names to a set of configuration options
1714
+ * that specify overrides to the default values for specific properties.
1715
+ *
1716
+ * The key is a supported event name to be configured,
1717
+ * and the options object contains a set of properties, with override values
1718
+ * to be applied to the named recognizer event.
1719
+ * For example, to disable recognition of the rotate event, specify
1720
+ * `{"rotate": {"enable": false}}`.
1721
+ *
1722
+ * Properties that are not present take the HammerJS default values.
1723
+ * For information about which properties are supported for which events,
1724
+ * and their allowed and default values, see
1725
+ * [HammerJS documentation](http://hammerjs.github.io/).
1726
+ *
1727
+ */
1805
1728
  this.overrides = {};
1806
1729
  }
1807
1730
  /**
@@ -1810,19 +1733,7 @@ var HammerGestureConfig = /** @class */ (function () {
1810
1733
  * @param element The element that will recognize gestures.
1811
1734
  * @returns A HammerJS event-manager object.
1812
1735
  */
1813
- /**
1814
- * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
1815
- * and attaches it to a given HTML element.
1816
- * @param element The element that will recognize gestures.
1817
- * @returns A HammerJS event-manager object.
1818
- */
1819
- HammerGestureConfig.prototype.buildHammer = /**
1820
- * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
1821
- * and attaches it to a given HTML element.
1822
- * @param element The element that will recognize gestures.
1823
- * @returns A HammerJS event-manager object.
1824
- */
1825
- function (element) {
1736
+ HammerGestureConfig.prototype.buildHammer = function (element) {
1826
1737
  var mc = new Hammer(element, this.options);
1827
1738
  mc.get('pinch').set({ enable: true });
1828
1739
  mc.get('rotate').set({ enable: true });
@@ -1834,8 +1745,6 @@ var HammerGestureConfig = /** @class */ (function () {
1834
1745
  HammerGestureConfig.decorators = [
1835
1746
  { type: core.Injectable }
1836
1747
  ];
1837
- /** @nocollapse */
1838
- HammerGestureConfig.ctorParameters = function () { return []; };
1839
1748
  return HammerGestureConfig;
1840
1749
  }());
1841
1750
  var HammerGesturesPlugin = /** @class */ (function (_super) {
@@ -1876,9 +1785,9 @@ var HammerGesturesPlugin = /** @class */ (function (_super) {
1876
1785
  ];
1877
1786
  /** @nocollapse */
1878
1787
  HammerGesturesPlugin.ctorParameters = function () { return [
1879
- { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] },] },
1880
- { type: HammerGestureConfig, decorators: [{ type: core.Inject, args: [HAMMER_GESTURE_CONFIG,] },] },
1881
- { type: core.ɵConsole, },
1788
+ { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] }] },
1789
+ { type: HammerGestureConfig, decorators: [{ type: core.Inject, args: [HAMMER_GESTURE_CONFIG,] }] },
1790
+ { type: core.ɵConsole }
1882
1791
  ]; };
1883
1792
  return HammerGesturesPlugin;
1884
1793
  }(EventManagerPlugin));
@@ -1925,17 +1834,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
1925
1834
  * @param eventName The event name to query.
1926
1835
  * @return True if the named key event is supported.
1927
1836
  */
1928
- /**
1929
- * Reports whether a named key event is supported.
1930
- * @param eventName The event name to query.
1931
- * @return True if the named key event is supported.
1932
- */
1933
- KeyEventsPlugin.prototype.supports = /**
1934
- * Reports whether a named key event is supported.
1935
- * @param eventName The event name to query.
1936
- * @return True if the named key event is supported.
1937
- */
1938
- function (eventName) { return KeyEventsPlugin.parseEventName(eventName) != null; };
1837
+ KeyEventsPlugin.prototype.supports = function (eventName) { return KeyEventsPlugin.parseEventName(eventName) != null; };
1939
1838
  /**
1940
1839
  * Registers a handler for a specific element and key event.
1941
1840
  * @param element The HTML element to receive event notifications.
@@ -1944,24 +1843,8 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
1944
1843
  * event object as an argument.
1945
1844
  * @returns The key event that was registered.
1946
1845
  */
1947
- /**
1948
- * Registers a handler for a specific element and key event.
1949
- * @param element The HTML element to receive event notifications.
1950
- * @param eventName The name of the key event to listen for.
1951
- * @param handler A function to call when the notification occurs. Receives the
1952
- * event object as an argument.
1953
- * @returns The key event that was registered.
1954
- */
1955
- KeyEventsPlugin.prototype.addEventListener = /**
1956
- * Registers a handler for a specific element and key event.
1957
- * @param element The HTML element to receive event notifications.
1958
- * @param eventName The name of the key event to listen for.
1959
- * @param handler A function to call when the notification occurs. Receives the
1960
- * event object as an argument.
1961
- * @returns The key event that was registered.
1962
- */
1963
- function (element, eventName, handler) {
1964
- var parsedEvent = (KeyEventsPlugin.parseEventName(eventName));
1846
+ KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
1847
+ var parsedEvent = KeyEventsPlugin.parseEventName(eventName);
1965
1848
  var outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
1966
1849
  return this.manager.getZone().runOutsideAngular(function () {
1967
1850
  return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
@@ -1973,7 +1856,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
1973
1856
  if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {
1974
1857
  return null;
1975
1858
  }
1976
- var key = KeyEventsPlugin._normalizeKey((parts.pop()));
1859
+ var key = KeyEventsPlugin._normalizeKey(parts.pop());
1977
1860
  var fullKey = '';
1978
1861
  MODIFIER_KEYS.forEach(function (modifierName) {
1979
1862
  var index = parts.indexOf(modifierName);
@@ -2020,21 +1903,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
2020
1903
  * @param zone The zone in which the event occurred.
2021
1904
  * @returns A callback function.
2022
1905
  */
2023
- /**
2024
- * Configures a handler callback for a key event.
2025
- * @param fullKey The event name that combines all simultaneous keystrokes.
2026
- * @param handler The function that responds to the key event.
2027
- * @param zone The zone in which the event occurred.
2028
- * @returns A callback function.
2029
- */
2030
- KeyEventsPlugin.eventCallback = /**
2031
- * Configures a handler callback for a key event.
2032
- * @param fullKey The event name that combines all simultaneous keystrokes.
2033
- * @param handler The function that responds to the key event.
2034
- * @param zone The zone in which the event occurred.
2035
- * @returns A callback function.
2036
- */
2037
- function (fullKey, handler, zone) {
1906
+ KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {
2038
1907
  return function (event /** TODO #9100 */) {
2039
1908
  if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {
2040
1909
  zone.runGuarded(function () { return handler(event); });
@@ -2042,9 +1911,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
2042
1911
  };
2043
1912
  };
2044
1913
  /** @internal */
2045
- /** @internal */
2046
- KeyEventsPlugin._normalizeKey = /** @internal */
2047
- function (keyName) {
1914
+ KeyEventsPlugin._normalizeKey = function (keyName) {
2048
1915
  // TODO: switch to a Map if the mapping grows too much
2049
1916
  switch (keyName) {
2050
1917
  case 'esc':
@@ -2058,7 +1925,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
2058
1925
  ];
2059
1926
  /** @nocollapse */
2060
1927
  KeyEventsPlugin.ctorParameters = function () { return [
2061
- { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] },] },
1928
+ { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] }] }
2062
1929
  ]; };
2063
1930
  return KeyEventsPlugin;
2064
1931
  }(EventManagerPlugin));
@@ -2169,14 +2036,14 @@ var DomSanitizerImpl = /** @class */ (function (_super) {
2169
2036
  ];
2170
2037
  /** @nocollapse */
2171
2038
  DomSanitizerImpl.ctorParameters = function () { return [
2172
- { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] },] },
2039
+ { type: undefined, decorators: [{ type: core.Inject, args: [DOCUMENT$1,] }] }
2173
2040
  ]; };
2174
2041
  return DomSanitizerImpl;
2175
2042
  }(DomSanitizer));
2176
2043
  var SafeValueImpl = /** @class */ (function () {
2177
2044
  function SafeValueImpl(changingThisBreaksApplicationSecurity) {
2178
- // empty
2179
2045
  this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
2046
+ // empty
2180
2047
  }
2181
2048
  SafeValueImpl.prototype.toString = function () {
2182
2049
  return "SafeValue must use [property]=binding: " + this.changingThisBreaksApplicationSecurity +
@@ -2277,21 +2144,7 @@ var BrowserModule = /** @class */ (function () {
2277
2144
  *
2278
2145
  * @experimental
2279
2146
  */
2280
- /**
2281
- * Configures a browser-based application to transition from a server-rendered app, if
2282
- * one is present on the page. The specified parameters must include an application id,
2283
- * which must match between the client and server applications.
2284
- *
2285
- * @experimental
2286
- */
2287
- BrowserModule.withServerTransition = /**
2288
- * Configures a browser-based application to transition from a server-rendered app, if
2289
- * one is present on the page. The specified parameters must include an application id,
2290
- * which must match between the client and server applications.
2291
- *
2292
- * @experimental
2293
- */
2294
- function (params) {
2147
+ BrowserModule.withServerTransition = function (params) {
2295
2148
  return {
2296
2149
  ngModule: BrowserModule,
2297
2150
  providers: [
@@ -2326,7 +2179,7 @@ var BrowserModule = /** @class */ (function () {
2326
2179
  ];
2327
2180
  /** @nocollapse */
2328
2181
  BrowserModule.ctorParameters = function () { return [
2329
- { type: BrowserModule, decorators: [{ type: core.Optional }, { type: core.SkipSelf },] },
2182
+ { type: BrowserModule, decorators: [{ type: core.Optional }, { type: core.SkipSelf }] }
2330
2183
  ]; };
2331
2184
  return BrowserModule;
2332
2185
  }());
@@ -2379,42 +2232,7 @@ var AngularProfiler = /** @class */ (function () {
2379
2232
  * ng.profiler.timeChangeDetection({record: true})
2380
2233
  * ```
2381
2234
  */
2382
- // tslint:disable:no-console
2383
- /**
2384
- * Exercises change detection in a loop and then prints the average amount of
2385
- * time in milliseconds how long a single round of change detection takes for
2386
- * the current state of the UI. It runs a minimum of 5 rounds for a minimum
2387
- * of 500 milliseconds.
2388
- *
2389
- * Optionally, a user may pass a `config` parameter containing a map of
2390
- * options. Supported options are:
2391
- *
2392
- * `record` (boolean) - causes the profiler to record a CPU profile while
2393
- * it exercises the change detector. Example:
2394
- *
2395
- * ```
2396
- * ng.profiler.timeChangeDetection({record: true})
2397
- * ```
2398
- */
2399
- AngularProfiler.prototype.timeChangeDetection =
2400
- // tslint:disable:no-console
2401
- /**
2402
- * Exercises change detection in a loop and then prints the average amount of
2403
- * time in milliseconds how long a single round of change detection takes for
2404
- * the current state of the UI. It runs a minimum of 5 rounds for a minimum
2405
- * of 500 milliseconds.
2406
- *
2407
- * Optionally, a user may pass a `config` parameter containing a map of
2408
- * options. Supported options are:
2409
- *
2410
- * `record` (boolean) - causes the profiler to record a CPU profile while
2411
- * it exercises the change detector. Example:
2412
- *
2413
- * ```
2414
- * ng.profiler.timeChangeDetection({record: true})
2415
- * ```
2416
- */
2417
- function (config) {
2235
+ AngularProfiler.prototype.timeChangeDetection = function (config) {
2418
2236
  var record = config && config['record'];
2419
2237
  var profileName = 'Change Detection';
2420
2238
  // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
@@ -2430,10 +2248,6 @@ var AngularProfiler = /** @class */ (function () {
2430
2248
  }
2431
2249
  var end = getDOM().performanceNow();
2432
2250
  if (record && isProfilerAvailable) {
2433
- // need to cast to <any> because type checker thinks there's no argument
2434
- // while in fact there is:
2435
- //
2436
- // https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd
2437
2251
  // need to cast to <any> because type checker thinks there's no argument
2438
2252
  // while in fact there is:
2439
2253
  //
@@ -2545,9 +2359,7 @@ var TransferState = /** @class */ (function () {
2545
2359
  this.onSerializeCallbacks = {};
2546
2360
  }
2547
2361
  /** @internal */
2548
- /** @internal */
2549
- TransferState.init = /** @internal */
2550
- function (initState) {
2362
+ TransferState.init = function (initState) {
2551
2363
  var transferState = new TransferState();
2552
2364
  transferState.store = initState;
2553
2365
  return transferState;
@@ -2555,67 +2367,31 @@ var TransferState = /** @class */ (function () {
2555
2367
  /**
2556
2368
  * Get the value corresponding to a key. Return `defaultValue` if key is not found.
2557
2369
  */
2558
- /**
2559
- * Get the value corresponding to a key. Return `defaultValue` if key is not found.
2560
- */
2561
- TransferState.prototype.get = /**
2562
- * Get the value corresponding to a key. Return `defaultValue` if key is not found.
2563
- */
2564
- function (key, defaultValue) {
2370
+ TransferState.prototype.get = function (key, defaultValue) {
2565
2371
  return this.store[key] !== undefined ? this.store[key] : defaultValue;
2566
2372
  };
2567
2373
  /**
2568
2374
  * Set the value corresponding to a key.
2569
2375
  */
2570
- /**
2571
- * Set the value corresponding to a key.
2572
- */
2573
- TransferState.prototype.set = /**
2574
- * Set the value corresponding to a key.
2575
- */
2576
- function (key, value) { this.store[key] = value; };
2376
+ TransferState.prototype.set = function (key, value) { this.store[key] = value; };
2577
2377
  /**
2578
2378
  * Remove a key from the store.
2579
2379
  */
2580
- /**
2581
- * Remove a key from the store.
2582
- */
2583
- TransferState.prototype.remove = /**
2584
- * Remove a key from the store.
2585
- */
2586
- function (key) { delete this.store[key]; };
2380
+ TransferState.prototype.remove = function (key) { delete this.store[key]; };
2587
2381
  /**
2588
2382
  * Test whether a key exists in the store.
2589
2383
  */
2590
- /**
2591
- * Test whether a key exists in the store.
2592
- */
2593
- TransferState.prototype.hasKey = /**
2594
- * Test whether a key exists in the store.
2595
- */
2596
- function (key) { return this.store.hasOwnProperty(key); };
2384
+ TransferState.prototype.hasKey = function (key) { return this.store.hasOwnProperty(key); };
2597
2385
  /**
2598
2386
  * Register a callback to provide the value for a key when `toJson` is called.
2599
2387
  */
2600
- /**
2601
- * Register a callback to provide the value for a key when `toJson` is called.
2602
- */
2603
- TransferState.prototype.onSerialize = /**
2604
- * Register a callback to provide the value for a key when `toJson` is called.
2605
- */
2606
- function (key, callback) {
2388
+ TransferState.prototype.onSerialize = function (key, callback) {
2607
2389
  this.onSerializeCallbacks[key] = callback;
2608
2390
  };
2609
2391
  /**
2610
2392
  * Serialize the current state of the store to JSON.
2611
2393
  */
2612
- /**
2613
- * Serialize the current state of the store to JSON.
2614
- */
2615
- TransferState.prototype.toJson = /**
2616
- * Serialize the current state of the store to JSON.
2617
- */
2618
- function () {
2394
+ TransferState.prototype.toJson = function () {
2619
2395
  // Call the onSerialize callbacks and put those values into the store.
2620
2396
  for (var key in this.onSerializeCallbacks) {
2621
2397
  if (this.onSerializeCallbacks.hasOwnProperty(key)) {
@@ -2632,8 +2408,6 @@ var TransferState = /** @class */ (function () {
2632
2408
  TransferState.decorators = [
2633
2409
  { type: core.Injectable }
2634
2410
  ];
2635
- /** @nocollapse */
2636
- TransferState.ctorParameters = function () { return []; };
2637
2411
  return TransferState;
2638
2412
  }());
2639
2413
  function initTransferState(doc, appId) {
@@ -2665,8 +2439,6 @@ var BrowserTransferStateModule = /** @class */ (function () {
2665
2439
  providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT$1, core.APP_ID] }],
2666
2440
  },] }
2667
2441
  ];
2668
- /** @nocollapse */
2669
- BrowserTransferStateModule.ctorParameters = function () { return []; };
2670
2442
  return BrowserTransferStateModule;
2671
2443
  }());
2672
2444
 
@@ -2692,21 +2464,7 @@ var By = /** @class */ (function () {
2692
2464
  *
2693
2465
  * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
2694
2466
  */
2695
- /**
2696
- * Match all elements.
2697
- *
2698
- * ## Example
2699
- *
2700
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
2701
- */
2702
- By.all = /**
2703
- * Match all elements.
2704
- *
2705
- * ## Example
2706
- *
2707
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
2708
- */
2709
- function () { return function (debugElement) { return true; }; };
2467
+ By.all = function () { return function (debugElement) { return true; }; };
2710
2468
  /**
2711
2469
  * Match elements by the given CSS selector.
2712
2470
  *
@@ -2714,21 +2472,7 @@ var By = /** @class */ (function () {
2714
2472
  *
2715
2473
  * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
2716
2474
  */
2717
- /**
2718
- * Match elements by the given CSS selector.
2719
- *
2720
- * ## Example
2721
- *
2722
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
2723
- */
2724
- By.css = /**
2725
- * Match elements by the given CSS selector.
2726
- *
2727
- * ## Example
2728
- *
2729
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
2730
- */
2731
- function (selector) {
2475
+ By.css = function (selector) {
2732
2476
  return function (debugElement) {
2733
2477
  return debugElement.nativeElement != null ?
2734
2478
  getDOM().elementMatches(debugElement.nativeElement, selector) :
@@ -2742,21 +2486,7 @@ var By = /** @class */ (function () {
2742
2486
  *
2743
2487
  * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
2744
2488
  */
2745
- /**
2746
- * Match elements that have the given directive present.
2747
- *
2748
- * ## Example
2749
- *
2750
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
2751
- */
2752
- By.directive = /**
2753
- * Match elements that have the given directive present.
2754
- *
2755
- * ## Example
2756
- *
2757
- * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
2758
- */
2759
- function (type) {
2489
+ By.directive = function (type) {
2760
2490
  return function (debugElement) { return debugElement.providerTokens.indexOf(type) !== -1; };
2761
2491
  };
2762
2492
  return By;
@@ -2777,7 +2507,12 @@ var By = /** @class */ (function () {
2777
2507
  * Use of this source code is governed by an MIT-style license that can be
2778
2508
  * found in the LICENSE file at https://angular.io/license
2779
2509
  */
2780
- var VERSION = new core.Version('6.0.3');
2510
+ /**
2511
+ * @module
2512
+ * @description
2513
+ * Entry point for all public APIs of the common package.
2514
+ */
2515
+ var VERSION = new core.Version('6.0.7');
2781
2516
 
2782
2517
  /**
2783
2518
  * @license
@@ -2794,6 +2529,11 @@ var VERSION = new core.Version('6.0.3');
2794
2529
  * Use of this source code is governed by an MIT-style license that can be
2795
2530
  * found in the LICENSE file at https://angular.io/license
2796
2531
  */
2532
+ /**
2533
+ * @module
2534
+ * @description
2535
+ * Entry point for all public APIs of this package.
2536
+ */
2797
2537
 
2798
2538
  // This file only reexports content of the `src` folder. Keep it that way.
2799
2539
 
@@ -2804,6 +2544,10 @@ var VERSION = new core.Version('6.0.3');
2804
2544
  * Use of this source code is governed by an MIT-style license that can be
2805
2545
  * found in the LICENSE file at https://angular.io/license
2806
2546
  */
2547
+ // This file is not used to build this module. It is only used during editing
2548
+ // by the TypeScript language service and during build for verification. `ngc`
2549
+ // replaces this file with production index.ts when it rewrites private symbol
2550
+ // names.
2807
2551
 
2808
2552
  /**
2809
2553
  * Generated bundle index. Do not edit.