@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.
- package/animations/animations.metadata.json +1 -1
- package/animations/src/providers.d.ts +1 -1
- package/animations.d.ts +0 -5
- package/animations.metadata.json +1 -1
- package/bundles/platform-browser-animations.umd.js +53 -24
- package/bundles/platform-browser-animations.umd.js.map +1 -1
- package/bundles/platform-browser-animations.umd.min.js +18 -4
- package/bundles/platform-browser-animations.umd.min.js.map +1 -1
- package/bundles/platform-browser-testing.umd.js +24 -13
- package/bundles/platform-browser-testing.umd.js.map +1 -1
- package/bundles/platform-browser-testing.umd.min.js +9 -2
- package/bundles/platform-browser-testing.umd.min.js.map +1 -1
- package/bundles/platform-browser.umd.js +106 -362
- package/bundles/platform-browser.umd.js.map +1 -1
- package/bundles/platform-browser.umd.min.js +9 -9
- package/bundles/platform-browser.umd.min.js.map +1 -1
- package/esm2015/animations/src/animation_builder.js +3 -10
- package/esm2015/animations/src/animation_renderer.js +4 -11
- package/esm2015/animations/src/module.js +1 -23
- package/esm2015/animations/src/providers.js +9 -15
- package/esm2015/src/browser/location/browser_platform_location.js +2 -9
- package/esm2015/src/browser/meta.js +2 -9
- package/esm2015/src/browser/title.js +2 -9
- package/esm2015/src/browser/transfer_state.js +1 -21
- package/esm2015/src/browser.js +2 -11
- package/esm2015/src/dom/dom_renderer.js +3 -10
- package/esm2015/src/dom/events/dom_events.js +12 -14
- package/esm2015/src/dom/events/event_manager.js +3 -10
- package/esm2015/src/dom/events/hammer_gestures.js +4 -20
- package/esm2015/src/dom/events/key_events.js +2 -11
- package/esm2015/src/dom/shared_styles_host.js +2 -18
- package/esm2015/src/security/dom_sanitization_service.js +2 -9
- package/esm2015/src/version.js +1 -1
- package/esm2015/testing/src/browser.js +0 -11
- package/esm5/animations/index.js +5 -1
- package/esm5/animations/public_api.js +6 -1
- package/esm5/animations/src/animation_builder.js +10 -3
- package/esm5/animations/src/animation_renderer.js +6 -10
- package/esm5/animations/src/animations.js +6 -1
- package/esm5/animations/src/module.js +8 -5
- package/esm5/animations/src/private_export.js +8 -1
- package/esm5/animations/src/providers.js +8 -6
- package/esm5/index.js +5 -1
- package/esm5/public_api.js +6 -1
- package/esm5/src/browser/browser_adapter.js +5 -25
- package/esm5/src/browser/generic_browser_adapter.js +2 -14
- package/esm5/src/browser/location/browser_platform_location.js +3 -8
- package/esm5/src/browser/location/history.js +1 -1
- package/esm5/src/browser/meta.js +6 -6
- package/esm5/src/browser/server-transition.js +1 -1
- package/esm5/src/browser/testability.js +1 -1
- package/esm5/src/browser/title.js +4 -18
- package/esm5/src/browser/tools/browser.js +1 -1
- package/esm5/src/browser/tools/common_tools.js +3 -50
- package/esm5/src/browser/tools/tools.js +1 -1
- package/esm5/src/browser/transfer_state.js +8 -50
- package/esm5/src/browser.js +3 -17
- package/esm5/src/dom/debug/by.js +5 -57
- package/esm5/src/dom/debug/ng_probe.js +1 -1
- package/esm5/src/dom/dom_adapter.js +4 -22
- package/esm5/src/dom/dom_renderer.js +3 -3
- package/esm5/src/dom/dom_tokens.js +1 -1
- package/esm5/src/dom/events/dom_events.js +24 -25
- package/esm5/src/dom/events/event_manager.js +7 -51
- package/esm5/src/dom/events/hammer_gestures.js +24 -38
- package/esm5/src/dom/events/key_events.js +8 -50
- package/esm5/src/dom/shared_styles_host.js +2 -4
- package/esm5/src/dom/util.js +1 -1
- package/esm5/src/platform-browser.js +1 -1
- package/esm5/src/private_export.js +1 -1
- package/esm5/src/security/dom_sanitization_service.js +4 -66
- package/esm5/src/version.js +7 -2
- package/esm5/testing/index.js +5 -1
- package/esm5/testing/public_api.js +6 -1
- package/esm5/testing/src/browser.js +8 -3
- package/esm5/testing/src/browser_util.js +3 -11
- package/esm5/testing/src/matchers.js +1 -5
- package/esm5/testing/src/testing.js +6 -1
- package/fesm2015/animations.js +13 -14
- package/fesm2015/animations.js.map +1 -1
- package/fesm2015/platform-browser.js +26 -30
- package/fesm2015/platform-browser.js.map +1 -1
- package/fesm2015/testing.js +1 -3
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/animations.js +50 -20
- package/fesm5/animations.js.map +1 -1
- package/fesm5/platform-browser.js +107 -363
- package/fesm5/platform-browser.js.map +1 -1
- package/fesm5/testing.js +24 -13
- package/fesm5/testing.js.map +1 -1
- package/package.json +3 -3
- package/platform-browser.metadata.json +1 -1
- package/src/dom/events/dom_events.d.ts +1 -8
- package/testing.d.ts +0 -5
- package/testing.metadata.json +1 -1
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v6.0.
|
2
|
+
* @license Angular v6.0.7
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
|
7
|
-
import { CommonModule, DOCUMENT, PlatformLocation, ɵPLATFORM_BROWSER_ID, ɵparseCookieValue } from '@angular/common';
|
7
|
+
import { CommonModule, DOCUMENT, PlatformLocation, isPlatformServer, ɵPLATFORM_BROWSER_ID, ɵparseCookieValue } from '@angular/common';
|
8
8
|
import { APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, ErrorHandler, Inject, Injectable, InjectionToken, Injector, NgModule, NgProbeToken, NgZone, Optional, PLATFORM_ID, PLATFORM_INITIALIZER, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, SkipSelf, Testability, Version, ViewEncapsulation, createPlatformFactory, getDebugNode, platformCore, setTestabilityGetter, ɵAPP_ROOT, ɵConsole, ɵ_sanitizeHtml, ɵ_sanitizeStyle, ɵ_sanitizeUrl, ɵglobal } from '@angular/core';
|
9
9
|
import { __assign, __extends, __spread } from 'tslib';
|
10
10
|
|
@@ -15,7 +15,7 @@ import { __assign, __extends, __spread } from 'tslib';
|
|
15
15
|
* Use of this source code is governed by an MIT-style license that can be
|
16
16
|
* found in the LICENSE file at https://angular.io/license
|
17
17
|
*/
|
18
|
-
var _DOM =
|
18
|
+
var _DOM = null;
|
19
19
|
function getDOM() {
|
20
20
|
return _DOM;
|
21
21
|
}
|
@@ -41,11 +41,7 @@ var DomAdapter = /** @class */ (function () {
|
|
41
41
|
* Maps attribute names to their corresponding property names for cases
|
42
42
|
* where attribute name doesn't match property name.
|
43
43
|
*/
|
44
|
-
get:
|
45
|
-
* Maps attribute names to their corresponding property names for cases
|
46
|
-
* where attribute name doesn't match property name.
|
47
|
-
*/
|
48
|
-
function () { return this._attrToPropMap; },
|
44
|
+
get: function () { return this._attrToPropMap; },
|
49
45
|
set: function (value) { this._attrToPropMap = value; },
|
50
46
|
enumerable: true,
|
51
47
|
configurable: true
|
@@ -201,10 +197,7 @@ var BrowserDomAdapter = /** @class */ (function (_super) {
|
|
201
197
|
var _a;
|
202
198
|
};
|
203
199
|
// TODO(tbosch): move this into a separate environment class once we have it
|
204
|
-
|
205
|
-
BrowserDomAdapter.prototype.logError =
|
206
|
-
// TODO(tbosch): move this into a separate environment class once we have it
|
207
|
-
function (error) {
|
200
|
+
BrowserDomAdapter.prototype.logError = function (error) {
|
208
201
|
if (window.console) {
|
209
202
|
if (console.error) {
|
210
203
|
console.error(error);
|
@@ -491,10 +484,7 @@ var BrowserDomAdapter = /** @class */ (function (_super) {
|
|
491
484
|
};
|
492
485
|
BrowserDomAdapter.prototype.getComputedStyle = function (element) { return getComputedStyle(element); };
|
493
486
|
// TODO(tbosch): move this into a separate environment class once we have it
|
494
|
-
|
495
|
-
BrowserDomAdapter.prototype.supportsWebAnimation =
|
496
|
-
// TODO(tbosch): move this into a separate environment class once we have it
|
497
|
-
function () {
|
487
|
+
BrowserDomAdapter.prototype.supportsWebAnimation = function () {
|
498
488
|
return typeof Element.prototype['animate'] === 'function';
|
499
489
|
};
|
500
490
|
BrowserDomAdapter.prototype.performanceNow = function () {
|
@@ -515,7 +505,7 @@ var BrowserDomAdapter = /** @class */ (function (_super) {
|
|
515
505
|
var baseElement = null;
|
516
506
|
function getBaseElementHref() {
|
517
507
|
if (!baseElement) {
|
518
|
-
baseElement =
|
508
|
+
baseElement = document.querySelector('base');
|
519
509
|
if (!baseElement) {
|
520
510
|
return null;
|
521
511
|
}
|
@@ -583,12 +573,7 @@ var BrowserPlatformLocation = /** @class */ (function (_super) {
|
|
583
573
|
}
|
584
574
|
// This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
|
585
575
|
/** @internal */
|
586
|
-
|
587
|
-
/** @internal */
|
588
|
-
BrowserPlatformLocation.prototype._init =
|
589
|
-
// This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
|
590
|
-
/** @internal */
|
591
|
-
function () {
|
576
|
+
BrowserPlatformLocation.prototype._init = function () {
|
592
577
|
this.location = getDOM().getLocation();
|
593
578
|
this._history = getDOM().getHistory();
|
594
579
|
};
|
@@ -638,7 +623,7 @@ var BrowserPlatformLocation = /** @class */ (function (_super) {
|
|
638
623
|
];
|
639
624
|
/** @nocollapse */
|
640
625
|
BrowserPlatformLocation.ctorParameters = function () { return [
|
641
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }
|
626
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }] }
|
642
627
|
]; };
|
643
628
|
return BrowserPlatformLocation;
|
644
629
|
}(PlatformLocation));
|
@@ -686,20 +671,20 @@ var Meta = /** @class */ (function () {
|
|
686
671
|
Meta.prototype.getTags = function (attrSelector) {
|
687
672
|
if (!attrSelector)
|
688
673
|
return [];
|
689
|
-
var list = this._dom.querySelectorAll(this._doc, "meta[" + attrSelector + "]");
|
674
|
+
var list /*NodeList*/ = this._dom.querySelectorAll(this._doc, "meta[" + attrSelector + "]");
|
690
675
|
return list ? [].slice.call(list) : [];
|
691
676
|
};
|
692
677
|
Meta.prototype.updateTag = function (tag, selector) {
|
693
678
|
if (!tag)
|
694
679
|
return null;
|
695
680
|
selector = selector || this._parseSelector(tag);
|
696
|
-
var meta =
|
681
|
+
var meta = this.getTag(selector);
|
697
682
|
if (meta) {
|
698
683
|
return this._setMetaElementAttributes(tag, meta);
|
699
684
|
}
|
700
685
|
return this._getOrCreateElement(tag, true);
|
701
686
|
};
|
702
|
-
Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement(
|
687
|
+
Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement(this.getTag(attrSelector)); };
|
703
688
|
Meta.prototype.removeTagElement = function (meta) {
|
704
689
|
if (meta) {
|
705
690
|
this._dom.remove(meta);
|
@@ -709,7 +694,7 @@ var Meta = /** @class */ (function () {
|
|
709
694
|
if (forceCreation === void 0) { forceCreation = false; }
|
710
695
|
if (!forceCreation) {
|
711
696
|
var selector = this._parseSelector(meta);
|
712
|
-
var elem =
|
697
|
+
var elem = this.getTag(selector);
|
713
698
|
// It's allowed to have multiple elements with the same name so it's not enough to
|
714
699
|
// just check that element with the same name already present on the page. We also need to
|
715
700
|
// check if element has tag attributes
|
@@ -740,7 +725,7 @@ var Meta = /** @class */ (function () {
|
|
740
725
|
];
|
741
726
|
/** @nocollapse */
|
742
727
|
Meta.ctorParameters = function () { return [
|
743
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }
|
728
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }] }
|
744
729
|
]; };
|
745
730
|
return Meta;
|
746
731
|
}());
|
@@ -863,32 +848,18 @@ var Title = /** @class */ (function () {
|
|
863
848
|
/**
|
864
849
|
* Get the title of the current HTML document.
|
865
850
|
*/
|
866
|
-
|
867
|
-
* Get the title of the current HTML document.
|
868
|
-
*/
|
869
|
-
Title.prototype.getTitle = /**
|
870
|
-
* Get the title of the current HTML document.
|
871
|
-
*/
|
872
|
-
function () { return getDOM().getTitle(this._doc); };
|
851
|
+
Title.prototype.getTitle = function () { return getDOM().getTitle(this._doc); };
|
873
852
|
/**
|
874
853
|
* Set the title of the current HTML document.
|
875
854
|
* @param newTitle
|
876
855
|
*/
|
877
|
-
|
878
|
-
* Set the title of the current HTML document.
|
879
|
-
* @param newTitle
|
880
|
-
*/
|
881
|
-
Title.prototype.setTitle = /**
|
882
|
-
* Set the title of the current HTML document.
|
883
|
-
* @param newTitle
|
884
|
-
*/
|
885
|
-
function (newTitle) { getDOM().setTitle(this._doc, newTitle); };
|
856
|
+
Title.prototype.setTitle = function (newTitle) { getDOM().setTitle(this._doc, newTitle); };
|
886
857
|
Title.decorators = [
|
887
858
|
{ type: Injectable }
|
888
859
|
];
|
889
860
|
/** @nocollapse */
|
890
861
|
Title.ctorParameters = function () { return [
|
891
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }
|
862
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }] }
|
892
863
|
]; };
|
893
864
|
return Title;
|
894
865
|
}());
|
@@ -998,25 +969,7 @@ var EventManager = /** @class */ (function () {
|
|
998
969
|
* event object as an argument.
|
999
970
|
* @returns A callback function that can be used to remove the handler.
|
1000
971
|
*/
|
1001
|
-
|
1002
|
-
* Registers a handler for a specific element and event.
|
1003
|
-
*
|
1004
|
-
* @param element The HTML element to receive event notifications.
|
1005
|
-
* @param eventName The name of the event to listen for.
|
1006
|
-
* @param handler A function to call when the notification occurs. Receives the
|
1007
|
-
* event object as an argument.
|
1008
|
-
* @returns A callback function that can be used to remove the handler.
|
1009
|
-
*/
|
1010
|
-
EventManager.prototype.addEventListener = /**
|
1011
|
-
* Registers a handler for a specific element and event.
|
1012
|
-
*
|
1013
|
-
* @param element The HTML element to receive event notifications.
|
1014
|
-
* @param eventName The name of the event to listen for.
|
1015
|
-
* @param handler A function to call when the notification occurs. Receives the
|
1016
|
-
* event object as an argument.
|
1017
|
-
* @returns A callback function that can be used to remove the handler.
|
1018
|
-
*/
|
1019
|
-
function (element, eventName, handler) {
|
972
|
+
EventManager.prototype.addEventListener = function (element, eventName, handler) {
|
1020
973
|
var plugin = this._findPluginFor(eventName);
|
1021
974
|
return plugin.addEventListener(element, eventName, handler);
|
1022
975
|
};
|
@@ -1029,42 +982,16 @@ var EventManager = /** @class */ (function () {
|
|
1029
982
|
* event object as an argument.
|
1030
983
|
* @returns A callback function that can be used to remove the handler.
|
1031
984
|
*/
|
1032
|
-
|
1033
|
-
* Registers a global handler for an event in a target view.
|
1034
|
-
*
|
1035
|
-
* @param target A target for global event notifications. One of "window", "document", or "body".
|
1036
|
-
* @param eventName The name of the event to listen for.
|
1037
|
-
* @param handler A function to call when the notification occurs. Receives the
|
1038
|
-
* event object as an argument.
|
1039
|
-
* @returns A callback function that can be used to remove the handler.
|
1040
|
-
*/
|
1041
|
-
EventManager.prototype.addGlobalEventListener = /**
|
1042
|
-
* Registers a global handler for an event in a target view.
|
1043
|
-
*
|
1044
|
-
* @param target A target for global event notifications. One of "window", "document", or "body".
|
1045
|
-
* @param eventName The name of the event to listen for.
|
1046
|
-
* @param handler A function to call when the notification occurs. Receives the
|
1047
|
-
* event object as an argument.
|
1048
|
-
* @returns A callback function that can be used to remove the handler.
|
1049
|
-
*/
|
1050
|
-
function (target, eventName, handler) {
|
985
|
+
EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {
|
1051
986
|
var plugin = this._findPluginFor(eventName);
|
1052
987
|
return plugin.addGlobalEventListener(target, eventName, handler);
|
1053
988
|
};
|
1054
989
|
/**
|
1055
990
|
* Retrieves the compilation zone in which event listeners are registered.
|
1056
991
|
*/
|
1057
|
-
|
1058
|
-
* Retrieves the compilation zone in which event listeners are registered.
|
1059
|
-
*/
|
1060
|
-
EventManager.prototype.getZone = /**
|
1061
|
-
* Retrieves the compilation zone in which event listeners are registered.
|
1062
|
-
*/
|
1063
|
-
function () { return this._zone; };
|
1064
|
-
/** @internal */
|
992
|
+
EventManager.prototype.getZone = function () { return this._zone; };
|
1065
993
|
/** @internal */
|
1066
|
-
EventManager.prototype._findPluginFor =
|
1067
|
-
function (eventName) {
|
994
|
+
EventManager.prototype._findPluginFor = function (eventName) {
|
1068
995
|
var plugin = this._eventNameToPlugin.get(eventName);
|
1069
996
|
if (plugin) {
|
1070
997
|
return plugin;
|
@@ -1084,8 +1011,8 @@ var EventManager = /** @class */ (function () {
|
|
1084
1011
|
];
|
1085
1012
|
/** @nocollapse */
|
1086
1013
|
EventManager.ctorParameters = function () { return [
|
1087
|
-
{ type: Array, decorators: [{ type: Inject, args: [EVENT_MANAGER_PLUGINS,] }
|
1088
|
-
{ type: NgZone
|
1014
|
+
{ type: Array, decorators: [{ type: Inject, args: [EVENT_MANAGER_PLUGINS,] }] },
|
1015
|
+
{ type: NgZone }
|
1089
1016
|
]; };
|
1090
1017
|
return EventManager;
|
1091
1018
|
}());
|
@@ -1131,8 +1058,6 @@ var SharedStylesHost = /** @class */ (function () {
|
|
1131
1058
|
SharedStylesHost.decorators = [
|
1132
1059
|
{ type: Injectable }
|
1133
1060
|
];
|
1134
|
-
/** @nocollapse */
|
1135
|
-
SharedStylesHost.ctorParameters = function () { return []; };
|
1136
1061
|
return SharedStylesHost;
|
1137
1062
|
}());
|
1138
1063
|
var DomSharedStylesHost = /** @class */ (function (_super) {
|
@@ -1168,7 +1093,7 @@ var DomSharedStylesHost = /** @class */ (function (_super) {
|
|
1168
1093
|
];
|
1169
1094
|
/** @nocollapse */
|
1170
1095
|
DomSharedStylesHost.ctorParameters = function () { return [
|
1171
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }
|
1096
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }] }
|
1172
1097
|
]; };
|
1173
1098
|
return DomSharedStylesHost;
|
1174
1099
|
}(SharedStylesHost));
|
@@ -1261,8 +1186,8 @@ var DomRendererFactory2 = /** @class */ (function () {
|
|
1261
1186
|
];
|
1262
1187
|
/** @nocollapse */
|
1263
1188
|
DomRendererFactory2.ctorParameters = function () { return [
|
1264
|
-
{ type: EventManager
|
1265
|
-
{ type: DomSharedStylesHost
|
1189
|
+
{ type: EventManager },
|
1190
|
+
{ type: DomSharedStylesHost }
|
1266
1191
|
]; };
|
1267
1192
|
return DomRendererFactory2;
|
1268
1193
|
}());
|
@@ -1509,14 +1434,16 @@ var globalListener = function (event) {
|
|
1509
1434
|
};
|
1510
1435
|
var DomEventsPlugin = /** @class */ (function (_super) {
|
1511
1436
|
__extends(DomEventsPlugin, _super);
|
1512
|
-
function DomEventsPlugin(doc, ngZone) {
|
1437
|
+
function DomEventsPlugin(doc, ngZone, platformId) {
|
1513
1438
|
var _this = _super.call(this, doc) || this;
|
1514
1439
|
_this.ngZone = ngZone;
|
1515
|
-
|
1440
|
+
if (!platformId || !isPlatformServer(platformId)) {
|
1441
|
+
_this.patchEvent();
|
1442
|
+
}
|
1516
1443
|
return _this;
|
1517
1444
|
}
|
1518
1445
|
DomEventsPlugin.prototype.patchEvent = function () {
|
1519
|
-
if (!Event || !Event.prototype) {
|
1446
|
+
if (typeof Event === 'undefined' || !Event || !Event.prototype) {
|
1520
1447
|
return;
|
1521
1448
|
}
|
1522
1449
|
if (Event.prototype[stopMethodSymbol]) {
|
@@ -1537,27 +1464,22 @@ var DomEventsPlugin = /** @class */ (function (_super) {
|
|
1537
1464
|
};
|
1538
1465
|
// This plugin should come last in the list of plugins, because it accepts all
|
1539
1466
|
// events.
|
1540
|
-
|
1541
|
-
// events.
|
1542
|
-
DomEventsPlugin.prototype.supports =
|
1543
|
-
// This plugin should come last in the list of plugins, because it accepts all
|
1544
|
-
// events.
|
1545
|
-
function (eventName) { return true; };
|
1467
|
+
DomEventsPlugin.prototype.supports = function (eventName) { return true; };
|
1546
1468
|
DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
|
1547
1469
|
var _this = this;
|
1548
1470
|
/**
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1471
|
+
* This code is about to add a listener to the DOM. If Zone.js is present, than
|
1472
|
+
* `addEventListener` has been patched. The patched code adds overhead in both
|
1473
|
+
* memory and speed (3x slower) than native. For this reason if we detect that
|
1474
|
+
* Zone.js is present we use a simple version of zone aware addEventListener instead.
|
1475
|
+
* The result is faster registration and the zone will be restored.
|
1476
|
+
* But ZoneSpec.onScheduleTask, ZoneSpec.onInvokeTask, ZoneSpec.onCancelTask
|
1477
|
+
* will not be invoked
|
1478
|
+
* We also do manual zone restoration in element.ts renderEventHandlerClosure method.
|
1479
|
+
*
|
1480
|
+
* NOTE: it is possible that the element is from different iframe, and so we
|
1481
|
+
* have to check before we execute the method.
|
1482
|
+
*/
|
1561
1483
|
var zoneJsLoaded = element[ADD_EVENT_LISTENER];
|
1562
1484
|
var callback = handler;
|
1563
1485
|
// if zonejs is loaded and current zone is not ngZone
|
@@ -1638,8 +1560,9 @@ var DomEventsPlugin = /** @class */ (function (_super) {
|
|
1638
1560
|
];
|
1639
1561
|
/** @nocollapse */
|
1640
1562
|
DomEventsPlugin.ctorParameters = function () { return [
|
1641
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }
|
1642
|
-
{ type: NgZone
|
1563
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }] },
|
1564
|
+
{ type: NgZone },
|
1565
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [PLATFORM_ID,] }] }
|
1643
1566
|
]; };
|
1644
1567
|
return DomEventsPlugin;
|
1645
1568
|
}(EventManagerPlugin));
|
@@ -1706,27 +1629,27 @@ var HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');
|
|
1706
1629
|
var HammerGestureConfig = /** @class */ (function () {
|
1707
1630
|
function HammerGestureConfig() {
|
1708
1631
|
/**
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1632
|
+
* A set of supported event names for gestures to be used in Angular.
|
1633
|
+
* Angular supports all built-in recognizers, as listed in
|
1634
|
+
* [HammerJS documentation](http://hammerjs.github.io/).
|
1635
|
+
*/
|
1713
1636
|
this.events = [];
|
1714
1637
|
/**
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1638
|
+
* Maps gesture event names to a set of configuration options
|
1639
|
+
* that specify overrides to the default values for specific properties.
|
1640
|
+
*
|
1641
|
+
* The key is a supported event name to be configured,
|
1642
|
+
* and the options object contains a set of properties, with override values
|
1643
|
+
* to be applied to the named recognizer event.
|
1644
|
+
* For example, to disable recognition of the rotate event, specify
|
1645
|
+
* `{"rotate": {"enable": false}}`.
|
1646
|
+
*
|
1647
|
+
* Properties that are not present take the HammerJS default values.
|
1648
|
+
* For information about which properties are supported for which events,
|
1649
|
+
* and their allowed and default values, see
|
1650
|
+
* [HammerJS documentation](http://hammerjs.github.io/).
|
1651
|
+
*
|
1652
|
+
*/
|
1730
1653
|
this.overrides = {};
|
1731
1654
|
}
|
1732
1655
|
/**
|
@@ -1735,19 +1658,7 @@ var HammerGestureConfig = /** @class */ (function () {
|
|
1735
1658
|
* @param element The element that will recognize gestures.
|
1736
1659
|
* @returns A HammerJS event-manager object.
|
1737
1660
|
*/
|
1738
|
-
|
1739
|
-
* Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
|
1740
|
-
* and attaches it to a given HTML element.
|
1741
|
-
* @param element The element that will recognize gestures.
|
1742
|
-
* @returns A HammerJS event-manager object.
|
1743
|
-
*/
|
1744
|
-
HammerGestureConfig.prototype.buildHammer = /**
|
1745
|
-
* Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
|
1746
|
-
* and attaches it to a given HTML element.
|
1747
|
-
* @param element The element that will recognize gestures.
|
1748
|
-
* @returns A HammerJS event-manager object.
|
1749
|
-
*/
|
1750
|
-
function (element) {
|
1661
|
+
HammerGestureConfig.prototype.buildHammer = function (element) {
|
1751
1662
|
var mc = new Hammer(element, this.options);
|
1752
1663
|
mc.get('pinch').set({ enable: true });
|
1753
1664
|
mc.get('rotate').set({ enable: true });
|
@@ -1759,8 +1670,6 @@ var HammerGestureConfig = /** @class */ (function () {
|
|
1759
1670
|
HammerGestureConfig.decorators = [
|
1760
1671
|
{ type: Injectable }
|
1761
1672
|
];
|
1762
|
-
/** @nocollapse */
|
1763
|
-
HammerGestureConfig.ctorParameters = function () { return []; };
|
1764
1673
|
return HammerGestureConfig;
|
1765
1674
|
}());
|
1766
1675
|
var HammerGesturesPlugin = /** @class */ (function (_super) {
|
@@ -1801,9 +1710,9 @@ var HammerGesturesPlugin = /** @class */ (function (_super) {
|
|
1801
1710
|
];
|
1802
1711
|
/** @nocollapse */
|
1803
1712
|
HammerGesturesPlugin.ctorParameters = function () { return [
|
1804
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }
|
1805
|
-
{ type: HammerGestureConfig, decorators: [{ type: Inject, args: [HAMMER_GESTURE_CONFIG,] }
|
1806
|
-
{ type: ɵConsole
|
1713
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }] },
|
1714
|
+
{ type: HammerGestureConfig, decorators: [{ type: Inject, args: [HAMMER_GESTURE_CONFIG,] }] },
|
1715
|
+
{ type: ɵConsole }
|
1807
1716
|
]; };
|
1808
1717
|
return HammerGesturesPlugin;
|
1809
1718
|
}(EventManagerPlugin));
|
@@ -1850,17 +1759,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
|
|
1850
1759
|
* @param eventName The event name to query.
|
1851
1760
|
* @return True if the named key event is supported.
|
1852
1761
|
*/
|
1853
|
-
|
1854
|
-
* Reports whether a named key event is supported.
|
1855
|
-
* @param eventName The event name to query.
|
1856
|
-
* @return True if the named key event is supported.
|
1857
|
-
*/
|
1858
|
-
KeyEventsPlugin.prototype.supports = /**
|
1859
|
-
* Reports whether a named key event is supported.
|
1860
|
-
* @param eventName The event name to query.
|
1861
|
-
* @return True if the named key event is supported.
|
1862
|
-
*/
|
1863
|
-
function (eventName) { return KeyEventsPlugin.parseEventName(eventName) != null; };
|
1762
|
+
KeyEventsPlugin.prototype.supports = function (eventName) { return KeyEventsPlugin.parseEventName(eventName) != null; };
|
1864
1763
|
/**
|
1865
1764
|
* Registers a handler for a specific element and key event.
|
1866
1765
|
* @param element The HTML element to receive event notifications.
|
@@ -1869,24 +1768,8 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
|
|
1869
1768
|
* event object as an argument.
|
1870
1769
|
* @returns The key event that was registered.
|
1871
1770
|
*/
|
1872
|
-
|
1873
|
-
|
1874
|
-
* @param element The HTML element to receive event notifications.
|
1875
|
-
* @param eventName The name of the key event to listen for.
|
1876
|
-
* @param handler A function to call when the notification occurs. Receives the
|
1877
|
-
* event object as an argument.
|
1878
|
-
* @returns The key event that was registered.
|
1879
|
-
*/
|
1880
|
-
KeyEventsPlugin.prototype.addEventListener = /**
|
1881
|
-
* Registers a handler for a specific element and key event.
|
1882
|
-
* @param element The HTML element to receive event notifications.
|
1883
|
-
* @param eventName The name of the key event to listen for.
|
1884
|
-
* @param handler A function to call when the notification occurs. Receives the
|
1885
|
-
* event object as an argument.
|
1886
|
-
* @returns The key event that was registered.
|
1887
|
-
*/
|
1888
|
-
function (element, eventName, handler) {
|
1889
|
-
var parsedEvent = (KeyEventsPlugin.parseEventName(eventName));
|
1771
|
+
KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
|
1772
|
+
var parsedEvent = KeyEventsPlugin.parseEventName(eventName);
|
1890
1773
|
var outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
|
1891
1774
|
return this.manager.getZone().runOutsideAngular(function () {
|
1892
1775
|
return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
|
@@ -1898,7 +1781,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
|
|
1898
1781
|
if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {
|
1899
1782
|
return null;
|
1900
1783
|
}
|
1901
|
-
var key = KeyEventsPlugin._normalizeKey(
|
1784
|
+
var key = KeyEventsPlugin._normalizeKey(parts.pop());
|
1902
1785
|
var fullKey = '';
|
1903
1786
|
MODIFIER_KEYS.forEach(function (modifierName) {
|
1904
1787
|
var index = parts.indexOf(modifierName);
|
@@ -1945,21 +1828,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
|
|
1945
1828
|
* @param zone The zone in which the event occurred.
|
1946
1829
|
* @returns A callback function.
|
1947
1830
|
*/
|
1948
|
-
|
1949
|
-
* Configures a handler callback for a key event.
|
1950
|
-
* @param fullKey The event name that combines all simultaneous keystrokes.
|
1951
|
-
* @param handler The function that responds to the key event.
|
1952
|
-
* @param zone The zone in which the event occurred.
|
1953
|
-
* @returns A callback function.
|
1954
|
-
*/
|
1955
|
-
KeyEventsPlugin.eventCallback = /**
|
1956
|
-
* Configures a handler callback for a key event.
|
1957
|
-
* @param fullKey The event name that combines all simultaneous keystrokes.
|
1958
|
-
* @param handler The function that responds to the key event.
|
1959
|
-
* @param zone The zone in which the event occurred.
|
1960
|
-
* @returns A callback function.
|
1961
|
-
*/
|
1962
|
-
function (fullKey, handler, zone) {
|
1831
|
+
KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {
|
1963
1832
|
return function (event /** TODO #9100 */) {
|
1964
1833
|
if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {
|
1965
1834
|
zone.runGuarded(function () { return handler(event); });
|
@@ -1967,9 +1836,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
|
|
1967
1836
|
};
|
1968
1837
|
};
|
1969
1838
|
/** @internal */
|
1970
|
-
|
1971
|
-
KeyEventsPlugin._normalizeKey = /** @internal */
|
1972
|
-
function (keyName) {
|
1839
|
+
KeyEventsPlugin._normalizeKey = function (keyName) {
|
1973
1840
|
// TODO: switch to a Map if the mapping grows too much
|
1974
1841
|
switch (keyName) {
|
1975
1842
|
case 'esc':
|
@@ -1983,7 +1850,7 @@ var KeyEventsPlugin = /** @class */ (function (_super) {
|
|
1983
1850
|
];
|
1984
1851
|
/** @nocollapse */
|
1985
1852
|
KeyEventsPlugin.ctorParameters = function () { return [
|
1986
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }
|
1853
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }] }
|
1987
1854
|
]; };
|
1988
1855
|
return KeyEventsPlugin;
|
1989
1856
|
}(EventManagerPlugin));
|
@@ -2094,14 +1961,14 @@ var DomSanitizerImpl = /** @class */ (function (_super) {
|
|
2094
1961
|
];
|
2095
1962
|
/** @nocollapse */
|
2096
1963
|
DomSanitizerImpl.ctorParameters = function () { return [
|
2097
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }
|
1964
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] }] }
|
2098
1965
|
]; };
|
2099
1966
|
return DomSanitizerImpl;
|
2100
1967
|
}(DomSanitizer));
|
2101
1968
|
var SafeValueImpl = /** @class */ (function () {
|
2102
1969
|
function SafeValueImpl(changingThisBreaksApplicationSecurity) {
|
2103
|
-
// empty
|
2104
1970
|
this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
|
1971
|
+
// empty
|
2105
1972
|
}
|
2106
1973
|
SafeValueImpl.prototype.toString = function () {
|
2107
1974
|
return "SafeValue must use [property]=binding: " + this.changingThisBreaksApplicationSecurity +
|
@@ -2202,21 +2069,7 @@ var BrowserModule = /** @class */ (function () {
|
|
2202
2069
|
*
|
2203
2070
|
* @experimental
|
2204
2071
|
*/
|
2205
|
-
|
2206
|
-
* Configures a browser-based application to transition from a server-rendered app, if
|
2207
|
-
* one is present on the page. The specified parameters must include an application id,
|
2208
|
-
* which must match between the client and server applications.
|
2209
|
-
*
|
2210
|
-
* @experimental
|
2211
|
-
*/
|
2212
|
-
BrowserModule.withServerTransition = /**
|
2213
|
-
* Configures a browser-based application to transition from a server-rendered app, if
|
2214
|
-
* one is present on the page. The specified parameters must include an application id,
|
2215
|
-
* which must match between the client and server applications.
|
2216
|
-
*
|
2217
|
-
* @experimental
|
2218
|
-
*/
|
2219
|
-
function (params) {
|
2072
|
+
BrowserModule.withServerTransition = function (params) {
|
2220
2073
|
return {
|
2221
2074
|
ngModule: BrowserModule,
|
2222
2075
|
providers: [
|
@@ -2251,7 +2104,7 @@ var BrowserModule = /** @class */ (function () {
|
|
2251
2104
|
];
|
2252
2105
|
/** @nocollapse */
|
2253
2106
|
BrowserModule.ctorParameters = function () { return [
|
2254
|
-
{ type: BrowserModule, decorators: [{ type: Optional }, { type: SkipSelf }
|
2107
|
+
{ type: BrowserModule, decorators: [{ type: Optional }, { type: SkipSelf }] }
|
2255
2108
|
]; };
|
2256
2109
|
return BrowserModule;
|
2257
2110
|
}());
|
@@ -2304,42 +2157,7 @@ var AngularProfiler = /** @class */ (function () {
|
|
2304
2157
|
* ng.profiler.timeChangeDetection({record: true})
|
2305
2158
|
* ```
|
2306
2159
|
*/
|
2307
|
-
|
2308
|
-
/**
|
2309
|
-
* Exercises change detection in a loop and then prints the average amount of
|
2310
|
-
* time in milliseconds how long a single round of change detection takes for
|
2311
|
-
* the current state of the UI. It runs a minimum of 5 rounds for a minimum
|
2312
|
-
* of 500 milliseconds.
|
2313
|
-
*
|
2314
|
-
* Optionally, a user may pass a `config` parameter containing a map of
|
2315
|
-
* options. Supported options are:
|
2316
|
-
*
|
2317
|
-
* `record` (boolean) - causes the profiler to record a CPU profile while
|
2318
|
-
* it exercises the change detector. Example:
|
2319
|
-
*
|
2320
|
-
* ```
|
2321
|
-
* ng.profiler.timeChangeDetection({record: true})
|
2322
|
-
* ```
|
2323
|
-
*/
|
2324
|
-
AngularProfiler.prototype.timeChangeDetection =
|
2325
|
-
// tslint:disable:no-console
|
2326
|
-
/**
|
2327
|
-
* Exercises change detection in a loop and then prints the average amount of
|
2328
|
-
* time in milliseconds how long a single round of change detection takes for
|
2329
|
-
* the current state of the UI. It runs a minimum of 5 rounds for a minimum
|
2330
|
-
* of 500 milliseconds.
|
2331
|
-
*
|
2332
|
-
* Optionally, a user may pass a `config` parameter containing a map of
|
2333
|
-
* options. Supported options are:
|
2334
|
-
*
|
2335
|
-
* `record` (boolean) - causes the profiler to record a CPU profile while
|
2336
|
-
* it exercises the change detector. Example:
|
2337
|
-
*
|
2338
|
-
* ```
|
2339
|
-
* ng.profiler.timeChangeDetection({record: true})
|
2340
|
-
* ```
|
2341
|
-
*/
|
2342
|
-
function (config) {
|
2160
|
+
AngularProfiler.prototype.timeChangeDetection = function (config) {
|
2343
2161
|
var record = config && config['record'];
|
2344
2162
|
var profileName = 'Change Detection';
|
2345
2163
|
// Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
|
@@ -2355,10 +2173,6 @@ var AngularProfiler = /** @class */ (function () {
|
|
2355
2173
|
}
|
2356
2174
|
var end = getDOM().performanceNow();
|
2357
2175
|
if (record && isProfilerAvailable) {
|
2358
|
-
// need to cast to <any> because type checker thinks there's no argument
|
2359
|
-
// while in fact there is:
|
2360
|
-
//
|
2361
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd
|
2362
2176
|
// need to cast to <any> because type checker thinks there's no argument
|
2363
2177
|
// while in fact there is:
|
2364
2178
|
//
|
@@ -2470,9 +2284,7 @@ var TransferState = /** @class */ (function () {
|
|
2470
2284
|
this.onSerializeCallbacks = {};
|
2471
2285
|
}
|
2472
2286
|
/** @internal */
|
2473
|
-
|
2474
|
-
TransferState.init = /** @internal */
|
2475
|
-
function (initState) {
|
2287
|
+
TransferState.init = function (initState) {
|
2476
2288
|
var transferState = new TransferState();
|
2477
2289
|
transferState.store = initState;
|
2478
2290
|
return transferState;
|
@@ -2480,67 +2292,31 @@ var TransferState = /** @class */ (function () {
|
|
2480
2292
|
/**
|
2481
2293
|
* Get the value corresponding to a key. Return `defaultValue` if key is not found.
|
2482
2294
|
*/
|
2483
|
-
|
2484
|
-
* Get the value corresponding to a key. Return `defaultValue` if key is not found.
|
2485
|
-
*/
|
2486
|
-
TransferState.prototype.get = /**
|
2487
|
-
* Get the value corresponding to a key. Return `defaultValue` if key is not found.
|
2488
|
-
*/
|
2489
|
-
function (key, defaultValue) {
|
2295
|
+
TransferState.prototype.get = function (key, defaultValue) {
|
2490
2296
|
return this.store[key] !== undefined ? this.store[key] : defaultValue;
|
2491
2297
|
};
|
2492
2298
|
/**
|
2493
2299
|
* Set the value corresponding to a key.
|
2494
2300
|
*/
|
2495
|
-
|
2496
|
-
* Set the value corresponding to a key.
|
2497
|
-
*/
|
2498
|
-
TransferState.prototype.set = /**
|
2499
|
-
* Set the value corresponding to a key.
|
2500
|
-
*/
|
2501
|
-
function (key, value) { this.store[key] = value; };
|
2301
|
+
TransferState.prototype.set = function (key, value) { this.store[key] = value; };
|
2502
2302
|
/**
|
2503
2303
|
* Remove a key from the store.
|
2504
2304
|
*/
|
2505
|
-
|
2506
|
-
* Remove a key from the store.
|
2507
|
-
*/
|
2508
|
-
TransferState.prototype.remove = /**
|
2509
|
-
* Remove a key from the store.
|
2510
|
-
*/
|
2511
|
-
function (key) { delete this.store[key]; };
|
2305
|
+
TransferState.prototype.remove = function (key) { delete this.store[key]; };
|
2512
2306
|
/**
|
2513
2307
|
* Test whether a key exists in the store.
|
2514
2308
|
*/
|
2515
|
-
|
2516
|
-
* Test whether a key exists in the store.
|
2517
|
-
*/
|
2518
|
-
TransferState.prototype.hasKey = /**
|
2519
|
-
* Test whether a key exists in the store.
|
2520
|
-
*/
|
2521
|
-
function (key) { return this.store.hasOwnProperty(key); };
|
2309
|
+
TransferState.prototype.hasKey = function (key) { return this.store.hasOwnProperty(key); };
|
2522
2310
|
/**
|
2523
2311
|
* Register a callback to provide the value for a key when `toJson` is called.
|
2524
2312
|
*/
|
2525
|
-
|
2526
|
-
* Register a callback to provide the value for a key when `toJson` is called.
|
2527
|
-
*/
|
2528
|
-
TransferState.prototype.onSerialize = /**
|
2529
|
-
* Register a callback to provide the value for a key when `toJson` is called.
|
2530
|
-
*/
|
2531
|
-
function (key, callback) {
|
2313
|
+
TransferState.prototype.onSerialize = function (key, callback) {
|
2532
2314
|
this.onSerializeCallbacks[key] = callback;
|
2533
2315
|
};
|
2534
2316
|
/**
|
2535
2317
|
* Serialize the current state of the store to JSON.
|
2536
2318
|
*/
|
2537
|
-
|
2538
|
-
* Serialize the current state of the store to JSON.
|
2539
|
-
*/
|
2540
|
-
TransferState.prototype.toJson = /**
|
2541
|
-
* Serialize the current state of the store to JSON.
|
2542
|
-
*/
|
2543
|
-
function () {
|
2319
|
+
TransferState.prototype.toJson = function () {
|
2544
2320
|
// Call the onSerialize callbacks and put those values into the store.
|
2545
2321
|
for (var key in this.onSerializeCallbacks) {
|
2546
2322
|
if (this.onSerializeCallbacks.hasOwnProperty(key)) {
|
@@ -2557,8 +2333,6 @@ var TransferState = /** @class */ (function () {
|
|
2557
2333
|
TransferState.decorators = [
|
2558
2334
|
{ type: Injectable }
|
2559
2335
|
];
|
2560
|
-
/** @nocollapse */
|
2561
|
-
TransferState.ctorParameters = function () { return []; };
|
2562
2336
|
return TransferState;
|
2563
2337
|
}());
|
2564
2338
|
function initTransferState(doc, appId) {
|
@@ -2590,8 +2364,6 @@ var BrowserTransferStateModule = /** @class */ (function () {
|
|
2590
2364
|
providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT$1, APP_ID] }],
|
2591
2365
|
},] }
|
2592
2366
|
];
|
2593
|
-
/** @nocollapse */
|
2594
|
-
BrowserTransferStateModule.ctorParameters = function () { return []; };
|
2595
2367
|
return BrowserTransferStateModule;
|
2596
2368
|
}());
|
2597
2369
|
|
@@ -2617,21 +2389,7 @@ var By = /** @class */ (function () {
|
|
2617
2389
|
*
|
2618
2390
|
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
|
2619
2391
|
*/
|
2620
|
-
|
2621
|
-
* Match all elements.
|
2622
|
-
*
|
2623
|
-
* ## Example
|
2624
|
-
*
|
2625
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
|
2626
|
-
*/
|
2627
|
-
By.all = /**
|
2628
|
-
* Match all elements.
|
2629
|
-
*
|
2630
|
-
* ## Example
|
2631
|
-
*
|
2632
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
|
2633
|
-
*/
|
2634
|
-
function () { return function (debugElement) { return true; }; };
|
2392
|
+
By.all = function () { return function (debugElement) { return true; }; };
|
2635
2393
|
/**
|
2636
2394
|
* Match elements by the given CSS selector.
|
2637
2395
|
*
|
@@ -2639,21 +2397,7 @@ var By = /** @class */ (function () {
|
|
2639
2397
|
*
|
2640
2398
|
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
|
2641
2399
|
*/
|
2642
|
-
|
2643
|
-
* Match elements by the given CSS selector.
|
2644
|
-
*
|
2645
|
-
* ## Example
|
2646
|
-
*
|
2647
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
|
2648
|
-
*/
|
2649
|
-
By.css = /**
|
2650
|
-
* Match elements by the given CSS selector.
|
2651
|
-
*
|
2652
|
-
* ## Example
|
2653
|
-
*
|
2654
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
|
2655
|
-
*/
|
2656
|
-
function (selector) {
|
2400
|
+
By.css = function (selector) {
|
2657
2401
|
return function (debugElement) {
|
2658
2402
|
return debugElement.nativeElement != null ?
|
2659
2403
|
getDOM().elementMatches(debugElement.nativeElement, selector) :
|
@@ -2667,21 +2411,7 @@ var By = /** @class */ (function () {
|
|
2667
2411
|
*
|
2668
2412
|
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
|
2669
2413
|
*/
|
2670
|
-
|
2671
|
-
* Match elements that have the given directive present.
|
2672
|
-
*
|
2673
|
-
* ## Example
|
2674
|
-
*
|
2675
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
|
2676
|
-
*/
|
2677
|
-
By.directive = /**
|
2678
|
-
* Match elements that have the given directive present.
|
2679
|
-
*
|
2680
|
-
* ## Example
|
2681
|
-
*
|
2682
|
-
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
|
2683
|
-
*/
|
2684
|
-
function (type) {
|
2414
|
+
By.directive = function (type) {
|
2685
2415
|
return function (debugElement) { return debugElement.providerTokens.indexOf(type) !== -1; };
|
2686
2416
|
};
|
2687
2417
|
return By;
|
@@ -2702,7 +2432,12 @@ var By = /** @class */ (function () {
|
|
2702
2432
|
* Use of this source code is governed by an MIT-style license that can be
|
2703
2433
|
* found in the LICENSE file at https://angular.io/license
|
2704
2434
|
*/
|
2705
|
-
|
2435
|
+
/**
|
2436
|
+
* @module
|
2437
|
+
* @description
|
2438
|
+
* Entry point for all public APIs of the common package.
|
2439
|
+
*/
|
2440
|
+
var VERSION = new Version('6.0.7');
|
2706
2441
|
|
2707
2442
|
/**
|
2708
2443
|
* @license
|
@@ -2719,6 +2454,11 @@ var VERSION = new Version('6.0.3');
|
|
2719
2454
|
* Use of this source code is governed by an MIT-style license that can be
|
2720
2455
|
* found in the LICENSE file at https://angular.io/license
|
2721
2456
|
*/
|
2457
|
+
/**
|
2458
|
+
* @module
|
2459
|
+
* @description
|
2460
|
+
* Entry point for all public APIs of this package.
|
2461
|
+
*/
|
2722
2462
|
|
2723
2463
|
// This file only reexports content of the `src` folder. Keep it that way.
|
2724
2464
|
|
@@ -2729,6 +2469,10 @@ var VERSION = new Version('6.0.3');
|
|
2729
2469
|
* Use of this source code is governed by an MIT-style license that can be
|
2730
2470
|
* found in the LICENSE file at https://angular.io/license
|
2731
2471
|
*/
|
2472
|
+
// This file is not used to build this module. It is only used during editing
|
2473
|
+
// by the TypeScript language service and during build for verification. `ngc`
|
2474
|
+
// replaces this file with production index.ts when it rewrites private symbol
|
2475
|
+
// names.
|
2732
2476
|
|
2733
2477
|
/**
|
2734
2478
|
* Generated bundle index. Do not edit.
|