@angular/platform-browser 7.1.3 → 7.1.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.
- package/animations.d.ts +1 -1
- package/bundles/platform-browser-animations.umd.js +1 -1
- package/bundles/platform-browser-animations.umd.min.js +1 -1
- package/bundles/platform-browser-animations.umd.min.js.map +1 -1
- package/bundles/platform-browser-testing.umd.js +1 -1
- package/bundles/platform-browser-testing.umd.min.js +1 -1
- package/bundles/platform-browser-testing.umd.min.js.map +1 -1
- package/bundles/platform-browser.umd.js +2 -2
- package/bundles/platform-browser.umd.js.map +1 -1
- package/bundles/platform-browser.umd.min.js +2 -2
- package/bundles/platform-browser.umd.min.js.map +1 -1
- package/esm2015/animations/animations.js +0 -1
- package/esm2015/animations/index.js +1 -2
- package/esm2015/animations/public_api.js +1 -2
- package/esm2015/animations/src/animation_builder.js +12 -6
- package/esm2015/animations/src/animation_renderer.js +8 -7
- package/esm2015/animations/src/animations.js +7 -3
- package/esm2015/animations/src/module.js +9 -3
- package/esm2015/animations/src/private_export.js +9 -3
- package/esm2015/animations/src/providers.js +11 -9
- package/esm2015/index.js +1 -2
- package/esm2015/platform-browser.js +0 -1
- package/esm2015/public_api.js +1 -3
- package/esm2015/src/browser/browser_adapter.js +24 -17
- package/esm2015/src/browser/generic_browser_adapter.js +4 -5
- package/esm2015/src/browser/location/browser_platform_location.js +5 -5
- package/esm2015/src/browser/location/history.js +2 -3
- package/esm2015/src/browser/meta.js +7 -11
- package/esm2015/src/browser/server-transition.js +5 -5
- package/esm2015/src/browser/testability.js +2 -3
- package/esm2015/src/browser/title.js +2 -3
- package/esm2015/src/browser/tools/browser.js +3 -4
- package/esm2015/src/browser/tools/common_tools.js +4 -3
- package/esm2015/src/browser/tools/tools.js +2 -3
- package/esm2015/src/browser/transfer_state.js +6 -8
- package/esm2015/src/browser.js +8 -7
- package/esm2015/src/dom/debug/by.js +3 -4
- package/esm2015/src/dom/debug/ng_probe.js +5 -5
- package/esm2015/src/dom/dom_adapter.js +5 -5
- package/esm2015/src/dom/dom_renderer.js +7 -8
- package/esm2015/src/dom/dom_tokens.js +5 -5
- package/esm2015/src/dom/events/dom_events.js +32 -19
- package/esm2015/src/dom/events/event_manager.js +5 -5
- package/esm2015/src/dom/events/hammer_gestures.js +37 -22
- package/esm2015/src/dom/events/key_events.js +10 -9
- package/esm2015/src/dom/shared_styles_host.js +2 -3
- package/esm2015/src/dom/util.js +7 -4
- package/esm2015/src/platform-browser.js +1 -2
- package/esm2015/src/private_export.js +1 -2
- package/esm2015/src/security/dom_sanitization_service.js +5 -6
- package/esm2015/src/version.js +11 -6
- package/esm2015/testing/index.js +1 -2
- package/esm2015/testing/public_api.js +4 -3
- package/esm2015/testing/src/browser.js +12 -5
- package/esm2015/testing/src/browser_util.js +15 -8
- package/esm2015/testing/src/matchers.js +99 -89
- package/esm2015/testing/src/testing.js +1 -2
- package/esm2015/testing/testing.js +0 -1
- package/esm5/animations/animations.js +0 -1
- package/esm5/animations/index.js +0 -1
- package/esm5/animations/public_api.js +0 -1
- package/esm5/animations/src/animation_builder.js +0 -1
- package/esm5/animations/src/animation_renderer.js +0 -1
- package/esm5/animations/src/animations.js +0 -1
- package/esm5/animations/src/module.js +0 -1
- package/esm5/animations/src/private_export.js +0 -1
- package/esm5/animations/src/providers.js +0 -1
- package/esm5/index.js +0 -1
- package/esm5/platform-browser.js +0 -1
- package/esm5/public_api.js +0 -1
- package/esm5/src/browser/browser_adapter.js +0 -1
- package/esm5/src/browser/generic_browser_adapter.js +0 -1
- package/esm5/src/browser/location/browser_platform_location.js +0 -1
- package/esm5/src/browser/location/history.js +0 -1
- package/esm5/src/browser/meta.js +0 -1
- package/esm5/src/browser/server-transition.js +0 -1
- package/esm5/src/browser/testability.js +0 -1
- package/esm5/src/browser/title.js +0 -1
- package/esm5/src/browser/tools/browser.js +0 -1
- package/esm5/src/browser/tools/common_tools.js +0 -1
- package/esm5/src/browser/tools/tools.js +0 -1
- package/esm5/src/browser/transfer_state.js +0 -1
- package/esm5/src/browser.js +0 -1
- package/esm5/src/dom/debug/by.js +0 -1
- package/esm5/src/dom/debug/ng_probe.js +0 -1
- package/esm5/src/dom/dom_adapter.js +0 -1
- package/esm5/src/dom/dom_renderer.js +0 -1
- package/esm5/src/dom/dom_tokens.js +0 -1
- package/esm5/src/dom/events/dom_events.js +0 -1
- package/esm5/src/dom/events/event_manager.js +0 -1
- package/esm5/src/dom/events/hammer_gestures.js +0 -1
- package/esm5/src/dom/events/key_events.js +0 -1
- package/esm5/src/dom/shared_styles_host.js +0 -1
- package/esm5/src/dom/util.js +0 -1
- package/esm5/src/platform-browser.js +0 -1
- package/esm5/src/private_export.js +0 -1
- package/esm5/src/security/dom_sanitization_service.js +0 -1
- package/esm5/src/version.js +1 -2
- package/esm5/testing/index.js +0 -1
- package/esm5/testing/public_api.js +0 -1
- package/esm5/testing/src/browser.js +0 -1
- package/esm5/testing/src/browser_util.js +0 -1
- package/esm5/testing/src/matchers.js +0 -1
- package/esm5/testing/src/testing.js +0 -1
- package/esm5/testing/testing.js +0 -1
- package/fesm2015/animations.js +27 -22
- package/fesm2015/animations.js.map +1 -1
- package/fesm2015/platform-browser.js +155 -111
- package/fesm2015/platform-browser.js.map +1 -1
- package/fesm2015/testing.js +19 -12
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/animations.js +1 -1
- package/fesm5/platform-browser.js +2 -2
- package/fesm5/platform-browser.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/package.json +3 -3
- package/platform-browser.metadata.json +1 -1
- package/testing.d.ts +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v7.1.
|
2
|
+
* @license Angular v7.1.4
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -9,7 +9,7 @@ import { ɵglobal, Inject, Injectable, APP_INITIALIZER, ApplicationInitStatus, I
|
|
9
9
|
|
10
10
|
/**
|
11
11
|
* @fileoverview added by tsickle
|
12
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
12
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
13
13
|
*/
|
14
14
|
/**
|
15
15
|
* @license
|
@@ -19,7 +19,7 @@ import { ɵglobal, Inject, Injectable, APP_INITIALIZER, ApplicationInitStatus, I
|
|
19
19
|
* found in the LICENSE file at https://angular.io/license
|
20
20
|
*/
|
21
21
|
/** @type {?} */
|
22
|
-
let _DOM = /** @type {?} */ (
|
22
|
+
let _DOM = (/** @type {?} */ (null));
|
23
23
|
/**
|
24
24
|
* @return {?}
|
25
25
|
*/
|
@@ -35,6 +35,7 @@ function setRootDomAdapter(adapter) {
|
|
35
35
|
_DOM = adapter;
|
36
36
|
}
|
37
37
|
}
|
38
|
+
/* tslint:disable:requireParameterType */
|
38
39
|
/**
|
39
40
|
* Provides DOM operations in an environment-agnostic way.
|
40
41
|
*
|
@@ -44,7 +45,7 @@ function setRootDomAdapter(adapter) {
|
|
44
45
|
*/
|
45
46
|
class DomAdapter {
|
46
47
|
constructor() {
|
47
|
-
this.resourceLoaderType = /** @type {?} */ (
|
48
|
+
this.resourceLoaderType = (/** @type {?} */ (null));
|
48
49
|
}
|
49
50
|
/**
|
50
51
|
* Maps attribute names to their corresponding property names for cases
|
@@ -61,7 +62,7 @@ class DomAdapter {
|
|
61
62
|
|
62
63
|
/**
|
63
64
|
* @fileoverview added by tsickle
|
64
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
65
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
65
66
|
*/
|
66
67
|
/**
|
67
68
|
* Provides DOM operations in any browser environment.
|
@@ -113,7 +114,7 @@ class GenericBrowserDomAdapter extends DomAdapter {
|
|
113
114
|
* @param {?} el
|
114
115
|
* @return {?}
|
115
116
|
*/
|
116
|
-
getDistributedNodes(el) { return (/** @type {?} */ (el)).getDistributedNodes(); }
|
117
|
+
getDistributedNodes(el) { return ((/** @type {?} */ (el))).getDistributedNodes(); }
|
117
118
|
/**
|
118
119
|
* @param {?} el
|
119
120
|
* @param {?} baseUrl
|
@@ -131,7 +132,7 @@ class GenericBrowserDomAdapter extends DomAdapter {
|
|
131
132
|
* @return {?}
|
132
133
|
*/
|
133
134
|
supportsNativeShadowDOM() {
|
134
|
-
return typeof (/** @type {?} */ (document.body)).createShadowRoot === 'function';
|
135
|
+
return typeof ((/** @type {?} */ (document.body))).createShadowRoot === 'function';
|
135
136
|
}
|
136
137
|
/**
|
137
138
|
* @return {?}
|
@@ -151,7 +152,7 @@ class GenericBrowserDomAdapter extends DomAdapter {
|
|
151
152
|
|
152
153
|
/**
|
153
154
|
* @fileoverview added by tsickle
|
154
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
155
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
155
156
|
*/
|
156
157
|
/** @type {?} */
|
157
158
|
const _attrToPropMap = {
|
@@ -162,6 +163,7 @@ const _attrToPropMap = {
|
|
162
163
|
};
|
163
164
|
/** @type {?} */
|
164
165
|
const DOM_KEY_LOCATION_NUMPAD = 3;
|
166
|
+
// Map to convert some key or keyIdentifier values to what will be returned by getEventKey
|
165
167
|
/** @type {?} */
|
166
168
|
const _keyMap = {
|
167
169
|
// The following values are here for cross-browser compatibility and to match the W3C standard
|
@@ -180,6 +182,9 @@ const _keyMap = {
|
|
180
182
|
'Scroll': 'ScrollLock',
|
181
183
|
'Win': 'OS'
|
182
184
|
};
|
185
|
+
// There is a bug in Chrome for numeric keypad keys:
|
186
|
+
// https://code.google.com/p/chromium/issues/detail?id=155654
|
187
|
+
// 1, 2, 3 ... are reported as A, B, C ...
|
183
188
|
/** @type {?} */
|
184
189
|
const _chromeNumKeyPadMap = {
|
185
190
|
'A': '1',
|
@@ -212,6 +217,7 @@ if (ɵglobal['Node']) {
|
|
212
217
|
* \@security Tread carefully! Interacting with the DOM directly is dangerous and
|
213
218
|
* can introduce XSS risks.
|
214
219
|
*/
|
220
|
+
/* tslint:disable:requireParameterType no-console */
|
215
221
|
class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
216
222
|
/**
|
217
223
|
* @param {?} templateHtml
|
@@ -234,20 +240,21 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
234
240
|
* @param {?} value
|
235
241
|
* @return {?}
|
236
242
|
*/
|
237
|
-
setProperty(el, name, value) { (/** @type {?} */ (el))[name] = value; }
|
243
|
+
setProperty(el, name, value) { ((/** @type {?} */ (el)))[name] = value; }
|
238
244
|
/**
|
239
245
|
* @param {?} el
|
240
246
|
* @param {?} name
|
241
247
|
* @return {?}
|
242
248
|
*/
|
243
|
-
getProperty(el, name) { return (/** @type {?} */ (el))[name]; }
|
249
|
+
getProperty(el, name) { return ((/** @type {?} */ (el)))[name]; }
|
244
250
|
/**
|
245
251
|
* @param {?} el
|
246
252
|
* @param {?} methodName
|
247
253
|
* @param {?} args
|
248
254
|
* @return {?}
|
249
255
|
*/
|
250
|
-
invoke(el, methodName, args) { (/** @type {?} */ (el))[methodName](...args); }
|
256
|
+
invoke(el, methodName, args) { ((/** @type {?} */ (el)))[methodName](...args); }
|
257
|
+
// TODO(tbosch): move this into a separate environment class once we have it
|
251
258
|
/**
|
252
259
|
* @param {?} error
|
253
260
|
* @return {?}
|
@@ -380,7 +387,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
380
387
|
* @return {?}
|
381
388
|
*/
|
382
389
|
getTemplateContent(el) {
|
383
|
-
return 'content' in el && this.isTemplateElement(el) ? (/** @type {?} */ (el)).content : null;
|
390
|
+
return 'content' in el && this.isTemplateElement(el) ? ((/** @type {?} */ (el))).content : null;
|
384
391
|
}
|
385
392
|
/**
|
386
393
|
* @param {?} el
|
@@ -408,7 +415,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
408
415
|
*/
|
409
416
|
content(node) {
|
410
417
|
if (this.hasProperty(node, 'content')) {
|
411
|
-
return (/** @type {?} */ (node)).content;
|
418
|
+
return ((/** @type {?} */ (node))).content;
|
412
419
|
}
|
413
420
|
else {
|
414
421
|
return node;
|
@@ -600,7 +607,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
600
607
|
createScriptTag(attrName, attrValue, doc) {
|
601
608
|
doc = doc || this.getDefaultDocument();
|
602
609
|
/** @type {?} */
|
603
|
-
const el = /** @type {?} */ (doc.createElement('SCRIPT'));
|
610
|
+
const el = (/** @type {?} */ (doc.createElement('SCRIPT')));
|
604
611
|
el.setAttribute(attrName, attrValue);
|
605
612
|
return el;
|
606
613
|
}
|
@@ -612,7 +619,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
612
619
|
createStyleElement(css, doc) {
|
613
620
|
doc = doc || this.getDefaultDocument();
|
614
621
|
/** @type {?} */
|
615
|
-
const style = /** @type {?} */ (doc.createElement('style'));
|
622
|
+
const style = (/** @type {?} */ (doc.createElement('style')));
|
616
623
|
this.appendChild(style, this.createTextNode(css, doc));
|
617
624
|
return style;
|
618
625
|
}
|
@@ -620,17 +627,17 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
620
627
|
* @param {?} el
|
621
628
|
* @return {?}
|
622
629
|
*/
|
623
|
-
createShadowRoot(el) { return (/** @type {?} */ (el)).createShadowRoot(); }
|
630
|
+
createShadowRoot(el) { return ((/** @type {?} */ (el))).createShadowRoot(); }
|
624
631
|
/**
|
625
632
|
* @param {?} el
|
626
633
|
* @return {?}
|
627
634
|
*/
|
628
|
-
getShadowRoot(el) { return (/** @type {?} */ (el)).shadowRoot; }
|
635
|
+
getShadowRoot(el) { return ((/** @type {?} */ (el))).shadowRoot; }
|
629
636
|
/**
|
630
637
|
* @param {?} el
|
631
638
|
* @return {?}
|
632
639
|
*/
|
633
|
-
getHost(el) { return (/** @type {?} */ (el)).host; }
|
640
|
+
getHost(el) { return ((/** @type {?} */ (el))).host; }
|
634
641
|
/**
|
635
642
|
* @param {?} node
|
636
643
|
* @return {?}
|
@@ -899,7 +906,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
899
906
|
* @param {?} el
|
900
907
|
* @return {?}
|
901
908
|
*/
|
902
|
-
getHref(el) { return /** @type {?} */ (
|
909
|
+
getHref(el) { return (/** @type {?} */ (el.getAttribute('href'))); }
|
903
910
|
/**
|
904
911
|
* @param {?} event
|
905
912
|
* @return {?}
|
@@ -921,7 +928,7 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
921
928
|
// There is a bug in Chrome for numeric keypad keys:
|
922
929
|
// https://code.google.com/p/chromium/issues/detail?id=155654
|
923
930
|
// 1, 2, 3 ... are reported as A, B, C ...
|
924
|
-
key = (/** @type {?} */ (_chromeNumKeyPadMap))[key];
|
931
|
+
key = ((/** @type {?} */ (_chromeNumKeyPadMap)))[key];
|
925
932
|
}
|
926
933
|
}
|
927
934
|
}
|
@@ -991,11 +998,12 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
|
991
998
|
* @return {?}
|
992
999
|
*/
|
993
1000
|
getComputedStyle(element) { return getComputedStyle(element); }
|
1001
|
+
// TODO(tbosch): move this into a separate environment class once we have it
|
994
1002
|
/**
|
995
1003
|
* @return {?}
|
996
1004
|
*/
|
997
1005
|
supportsWebAnimation() {
|
998
|
-
return typeof (/** @type {?} */ (Element)).prototype['animate'] === 'function';
|
1006
|
+
return typeof ((/** @type {?} */ (Element))).prototype['animate'] === 'function';
|
999
1007
|
}
|
1000
1008
|
/**
|
1001
1009
|
* @return {?}
|
@@ -1033,13 +1041,14 @@ let baseElement = null;
|
|
1033
1041
|
*/
|
1034
1042
|
function getBaseElementHref() {
|
1035
1043
|
if (!baseElement) {
|
1036
|
-
baseElement = /** @type {?} */ (
|
1044
|
+
baseElement = (/** @type {?} */ (document.querySelector('base')));
|
1037
1045
|
if (!baseElement) {
|
1038
1046
|
return null;
|
1039
1047
|
}
|
1040
1048
|
}
|
1041
1049
|
return baseElement.getAttribute('href');
|
1042
1050
|
}
|
1051
|
+
// based on urlUtils.js in AngularJS 1
|
1043
1052
|
/** @type {?} */
|
1044
1053
|
let urlParsingNode;
|
1045
1054
|
/**
|
@@ -1057,9 +1066,9 @@ function relativePath(url) {
|
|
1057
1066
|
|
1058
1067
|
/**
|
1059
1068
|
* @fileoverview added by tsickle
|
1060
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1069
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1061
1070
|
*/
|
1062
|
-
/**
|
1071
|
+
/**
|
1063
1072
|
* A DI Token representing the main rendering context. In a browser this is the DOM Document.
|
1064
1073
|
*
|
1065
1074
|
* Note: Document might not be available in the Application Context when Application and Rendering
|
@@ -1067,12 +1076,13 @@ function relativePath(url) {
|
|
1067
1076
|
*
|
1068
1077
|
* @deprecated import from `\@angular/common` instead.
|
1069
1078
|
* \@publicApi
|
1070
|
-
|
1079
|
+
* @type {?}
|
1080
|
+
*/
|
1071
1081
|
const DOCUMENT$1 = DOCUMENT;
|
1072
1082
|
|
1073
1083
|
/**
|
1074
1084
|
* @fileoverview added by tsickle
|
1075
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1085
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1076
1086
|
*/
|
1077
1087
|
/**
|
1078
1088
|
* @license
|
@@ -1090,7 +1100,7 @@ function supportsState() {
|
|
1090
1100
|
|
1091
1101
|
/**
|
1092
1102
|
* @fileoverview added by tsickle
|
1093
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1103
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1094
1104
|
*/
|
1095
1105
|
/**
|
1096
1106
|
* `PlatformLocation` encapsulates all of the direct calls to platform APIs.
|
@@ -1106,18 +1116,19 @@ class BrowserPlatformLocation extends PlatformLocation {
|
|
1106
1116
|
this._doc = _doc;
|
1107
1117
|
this._init();
|
1108
1118
|
}
|
1119
|
+
// This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
|
1109
1120
|
/**
|
1110
1121
|
* \@internal
|
1111
1122
|
* @return {?}
|
1112
1123
|
*/
|
1113
1124
|
_init() {
|
1114
|
-
(/** @type {?} */ (this)).location = getDOM().getLocation();
|
1125
|
+
((/** @type {?} */ (this))).location = getDOM().getLocation();
|
1115
1126
|
this._history = getDOM().getHistory();
|
1116
1127
|
}
|
1117
1128
|
/**
|
1118
1129
|
* @return {?}
|
1119
1130
|
*/
|
1120
|
-
getBaseHrefFromDOM() { return /** @type {?} */ (
|
1131
|
+
getBaseHrefFromDOM() { return (/** @type {?} */ (getDOM().getBaseHref(this._doc))); }
|
1121
1132
|
/**
|
1122
1133
|
* @param {?} fn
|
1123
1134
|
* @return {?}
|
@@ -1196,12 +1207,13 @@ BrowserPlatformLocation.ctorParameters = () => [
|
|
1196
1207
|
|
1197
1208
|
/**
|
1198
1209
|
* @fileoverview added by tsickle
|
1199
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1210
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1200
1211
|
*/
|
1201
|
-
/**
|
1212
|
+
/**
|
1202
1213
|
* An id that identifies a particular application being bootstrapped, that should
|
1203
1214
|
* match across the client/server boundary.
|
1204
|
-
|
1215
|
+
* @type {?}
|
1216
|
+
*/
|
1205
1217
|
const TRANSITION_ID = new InjectionToken('TRANSITION_ID');
|
1206
1218
|
/**
|
1207
1219
|
* @param {?} transitionId
|
@@ -1235,7 +1247,7 @@ const SERVER_TRANSITION_PROVIDERS = [
|
|
1235
1247
|
|
1236
1248
|
/**
|
1237
1249
|
* @fileoverview added by tsickle
|
1238
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1250
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1239
1251
|
*/
|
1240
1252
|
class BrowserGetTestability {
|
1241
1253
|
/**
|
@@ -1309,7 +1321,7 @@ class BrowserGetTestability {
|
|
1309
1321
|
|
1310
1322
|
/**
|
1311
1323
|
* @fileoverview added by tsickle
|
1312
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1324
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1313
1325
|
*/
|
1314
1326
|
/**
|
1315
1327
|
* Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if
|
@@ -1321,15 +1333,19 @@ class BrowserGetTestability {
|
|
1321
1333
|
*/
|
1322
1334
|
function exportNgVar(name, value) {
|
1323
1335
|
if (typeof COMPILED === 'undefined' || !COMPILED) {
|
1336
|
+
// Note: we can't export `ng` when using closure enhanced optimization as:
|
1337
|
+
// - closure declares globals itself for minified names, which sometimes clobber our `ng` global
|
1338
|
+
// - we can't declare a closure extern as the namespace `ng` is already used within Google
|
1339
|
+
// for typings for angularJS (via `goog.provide('ng....')`).
|
1324
1340
|
/** @type {?} */
|
1325
|
-
const ng = ɵglobal['ng'] = (/** @type {?} */ (ɵglobal['ng'])) || {};
|
1341
|
+
const ng = ɵglobal['ng'] = ((/** @type {?} */ (ɵglobal['ng']))) || {};
|
1326
1342
|
ng[name] = value;
|
1327
1343
|
}
|
1328
1344
|
}
|
1329
1345
|
|
1330
1346
|
/**
|
1331
1347
|
* @fileoverview added by tsickle
|
1332
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1348
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1333
1349
|
*/
|
1334
1350
|
/** @type {?} */
|
1335
1351
|
const CORE_TOKENS = {
|
@@ -1366,9 +1382,10 @@ function _createNgProbe(coreTokens) {
|
|
1366
1382
|
function _ngProbeTokensToMap(tokens) {
|
1367
1383
|
return tokens.reduce((prev, t) => (prev[t.name] = t.token, prev), {});
|
1368
1384
|
}
|
1369
|
-
/**
|
1385
|
+
/**
|
1370
1386
|
* Providers which support debugging Angular applications (e.g. via `ng.probe`).
|
1371
|
-
|
1387
|
+
* @type {?}
|
1388
|
+
*/
|
1372
1389
|
const ELEMENT_PROBE_PROVIDERS = [
|
1373
1390
|
{
|
1374
1391
|
provide: APP_INITIALIZER,
|
@@ -1382,13 +1399,14 @@ const ELEMENT_PROBE_PROVIDERS = [
|
|
1382
1399
|
|
1383
1400
|
/**
|
1384
1401
|
* @fileoverview added by tsickle
|
1385
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1402
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1386
1403
|
*/
|
1387
|
-
/**
|
1404
|
+
/**
|
1388
1405
|
* The injection token for the event-manager plug-in service.
|
1389
1406
|
*
|
1390
1407
|
* \@publicApi
|
1391
|
-
|
1408
|
+
* @type {?}
|
1409
|
+
*/
|
1392
1410
|
const EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');
|
1393
1411
|
/**
|
1394
1412
|
* An injectable service that provides event management for Angular
|
@@ -1501,7 +1519,7 @@ class EventManagerPlugin {
|
|
1501
1519
|
|
1502
1520
|
/**
|
1503
1521
|
* @fileoverview added by tsickle
|
1504
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1522
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1505
1523
|
*/
|
1506
1524
|
class SharedStylesHost {
|
1507
1525
|
constructor() {
|
@@ -1597,7 +1615,7 @@ DomSharedStylesHost.ctorParameters = () => [
|
|
1597
1615
|
|
1598
1616
|
/**
|
1599
1617
|
* @fileoverview added by tsickle
|
1600
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
1618
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
1601
1619
|
*/
|
1602
1620
|
/** @type {?} */
|
1603
1621
|
const NAMESPACE_URIS = {
|
@@ -1693,7 +1711,7 @@ class DomRendererFactory2 {
|
|
1693
1711
|
new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type);
|
1694
1712
|
this.rendererByCompId.set(type.id, renderer);
|
1695
1713
|
}
|
1696
|
-
(/** @type {?} */ (renderer)).applyToHost(element);
|
1714
|
+
((/** @type {?} */ (renderer))).applyToHost(element);
|
1697
1715
|
return renderer;
|
1698
1716
|
}
|
1699
1717
|
case ViewEncapsulation.Native:
|
@@ -1926,9 +1944,9 @@ class DefaultDomRenderer2 {
|
|
1926
1944
|
listen(target, event, callback) {
|
1927
1945
|
checkNoSyntheticProp(event, 'listener');
|
1928
1946
|
if (typeof target === 'string') {
|
1929
|
-
return /** @type {?} */ (this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback)));
|
1947
|
+
return (/** @type {?} */ (this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback))));
|
1930
1948
|
}
|
1931
|
-
return /** @type {?} */ ((this.eventManager.addEventListener(target, event, decoratePreventDefault(callback))));
|
1949
|
+
return (/** @type {?} */ ((/** @type {?} */ (this.eventManager.addEventListener(target, event, decoratePreventDefault(callback))))));
|
1932
1950
|
}
|
1933
1951
|
}
|
1934
1952
|
/** @type {?} */
|
@@ -1988,10 +2006,10 @@ class ShadowDomRenderer extends DefaultDomRenderer2 {
|
|
1988
2006
|
this.hostEl = hostEl;
|
1989
2007
|
this.component = component;
|
1990
2008
|
if (component.encapsulation === ViewEncapsulation.ShadowDom) {
|
1991
|
-
this.shadowRoot = (/** @type {?} */ (hostEl)).attachShadow({ mode: 'open' });
|
2009
|
+
this.shadowRoot = ((/** @type {?} */ (hostEl))).attachShadow({ mode: 'open' });
|
1992
2010
|
}
|
1993
2011
|
else {
|
1994
|
-
this.shadowRoot = (/** @type {?} */ (hostEl)).createShadowRoot();
|
2012
|
+
this.shadowRoot = ((/** @type {?} */ (hostEl))).createShadowRoot();
|
1995
2013
|
}
|
1996
2014
|
this.sharedStylesHost.addHost(this.shadowRoot);
|
1997
2015
|
/** @type {?} */
|
@@ -2048,18 +2066,19 @@ class ShadowDomRenderer extends DefaultDomRenderer2 {
|
|
2048
2066
|
|
2049
2067
|
/**
|
2050
2068
|
* @fileoverview added by tsickle
|
2051
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
2069
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
2052
2070
|
*/
|
2053
2071
|
const ɵ0 = function (v) {
|
2054
2072
|
return '__zone_symbol__' + v;
|
2055
2073
|
};
|
2056
|
-
/**
|
2074
|
+
/**
|
2057
2075
|
* Detect if Zone is present. If it is then use simple zone aware 'addEventListener'
|
2058
2076
|
* since Angular can do much more
|
2059
2077
|
* efficient bookkeeping than Zone can, because we have additional information. This speeds up
|
2060
2078
|
* addEventListener by 3x.
|
2061
|
-
|
2062
|
-
|
2079
|
+
* @type {?}
|
2080
|
+
*/
|
2081
|
+
const __symbol__ = (typeof Zone !== 'undefined') && ((/** @type {?} */ (Zone)))['__symbol__'] || ɵ0;
|
2063
2082
|
/** @type {?} */
|
2064
2083
|
const ADD_EVENT_LISTENER = __symbol__('addEventListener');
|
2065
2084
|
/** @type {?} */
|
@@ -2074,12 +2093,13 @@ const ANGULAR = 'ANGULAR';
|
|
2074
2093
|
const NATIVE_ADD_LISTENER = 'addEventListener';
|
2075
2094
|
/** @type {?} */
|
2076
2095
|
const NATIVE_REMOVE_LISTENER = 'removeEventListener';
|
2096
|
+
// use the same symbol string which is used in zone.js
|
2077
2097
|
/** @type {?} */
|
2078
2098
|
const stopSymbol = '__zone_symbol__propagationStopped';
|
2079
2099
|
/** @type {?} */
|
2080
2100
|
const stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';
|
2081
2101
|
/** @type {?} */
|
2082
|
-
const blackListedEvents = (typeof Zone !== 'undefined') && (/** @type {?} */ (Zone))[__symbol__('BLACK_LISTED_EVENTS')];
|
2102
|
+
const blackListedEvents = (typeof Zone !== 'undefined') && ((/** @type {?} */ (Zone)))[__symbol__('BLACK_LISTED_EVENTS')];
|
2083
2103
|
/** @type {?} */
|
2084
2104
|
let blackListedMap;
|
2085
2105
|
if (blackListedEvents) {
|
@@ -2093,6 +2113,8 @@ const isBlackListedEvent = function (eventName) {
|
|
2093
2113
|
}
|
2094
2114
|
return blackListedMap.hasOwnProperty(eventName);
|
2095
2115
|
};
|
2116
|
+
// a global listener to handle all dom event,
|
2117
|
+
// so we do not need to create a closure every time
|
2096
2118
|
/** @type {?} */
|
2097
2119
|
const globalListener = function (event) {
|
2098
2120
|
/** @type {?} */
|
@@ -2108,6 +2130,7 @@ const globalListener = function (event) {
|
|
2108
2130
|
/** @type {?} */
|
2109
2131
|
const args = [event];
|
2110
2132
|
if (taskDatas.length === 1) {
|
2133
|
+
// if taskDatas only have one element, just invoke it
|
2111
2134
|
/** @type {?} */
|
2112
2135
|
const taskData = taskDatas[0];
|
2113
2136
|
if (taskData.zone !== Zone.current) {
|
@@ -2119,12 +2142,14 @@ const globalListener = function (event) {
|
|
2119
2142
|
}
|
2120
2143
|
}
|
2121
2144
|
else {
|
2145
|
+
// copy tasks as a snapshot to avoid event handlers remove
|
2146
|
+
// itself or others
|
2122
2147
|
/** @type {?} */
|
2123
2148
|
const copiedTasks = taskDatas.slice();
|
2124
2149
|
for (let i = 0; i < copiedTasks.length; i++) {
|
2125
2150
|
// if other listener call event.stopImmediatePropagation
|
2126
2151
|
// just break
|
2127
|
-
if ((/** @type {?} */ (event))[stopSymbol] === true) {
|
2152
|
+
if (((/** @type {?} */ (event)))[stopSymbol] === true) {
|
2128
2153
|
break;
|
2129
2154
|
}
|
2130
2155
|
/** @type {?} */
|
@@ -2159,12 +2184,12 @@ class DomEventsPlugin extends EventManagerPlugin {
|
|
2159
2184
|
if (typeof Event === 'undefined' || !Event || !Event.prototype) {
|
2160
2185
|
return;
|
2161
2186
|
}
|
2162
|
-
if ((/** @type {?} */ (Event.prototype))[stopMethodSymbol]) {
|
2187
|
+
if (((/** @type {?} */ (Event.prototype)))[stopMethodSymbol]) {
|
2163
2188
|
// already patched by zone.js
|
2164
2189
|
return;
|
2165
2190
|
}
|
2166
2191
|
/** @type {?} */
|
2167
|
-
const delegate = (/** @type {?} */ (Event.prototype))[stopMethodSymbol] =
|
2192
|
+
const delegate = ((/** @type {?} */ (Event.prototype)))[stopMethodSymbol] =
|
2168
2193
|
Event.prototype.stopImmediatePropagation;
|
2169
2194
|
Event.prototype.stopImmediatePropagation = function () {
|
2170
2195
|
if (this) {
|
@@ -2176,6 +2201,8 @@ class DomEventsPlugin extends EventManagerPlugin {
|
|
2176
2201
|
delegate && delegate.apply(this, arguments);
|
2177
2202
|
};
|
2178
2203
|
}
|
2204
|
+
// This plugin should come last in the list of plugins, because it accepts all
|
2205
|
+
// events.
|
2179
2206
|
/**
|
2180
2207
|
* @param {?} eventName
|
2181
2208
|
* @return {?}
|
@@ -2191,7 +2218,7 @@ class DomEventsPlugin extends EventManagerPlugin {
|
|
2191
2218
|
/** @type {?} */
|
2192
2219
|
const zoneJsLoaded = element[ADD_EVENT_LISTENER];
|
2193
2220
|
/** @type {?} */
|
2194
|
-
let callback = /** @type {?} */ (handler);
|
2221
|
+
let callback = (/** @type {?} */ (handler));
|
2195
2222
|
// if zonejs is loaded and current zone is not ngZone
|
2196
2223
|
// we keep Zone.current on target for later restoration.
|
2197
2224
|
if (zoneJsLoaded && (!NgZone.isInAngularZone() || isBlackListedEvent(eventName))) {
|
@@ -2201,11 +2228,11 @@ class DomEventsPlugin extends EventManagerPlugin {
|
|
2201
2228
|
symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);
|
2202
2229
|
}
|
2203
2230
|
/** @type {?} */
|
2204
|
-
let taskDatas = (/** @type {?} */ (element))[symbolName];
|
2231
|
+
let taskDatas = ((/** @type {?} */ (element)))[symbolName];
|
2205
2232
|
/** @type {?} */
|
2206
2233
|
const globalListenerRegistered = taskDatas && taskDatas.length > 0;
|
2207
2234
|
if (!taskDatas) {
|
2208
|
-
taskDatas = (/** @type {?} */ (element))[symbolName] = [];
|
2235
|
+
taskDatas = ((/** @type {?} */ (element)))[symbolName] = [];
|
2209
2236
|
}
|
2210
2237
|
/** @type {?} */
|
2211
2238
|
const zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;
|
@@ -2256,6 +2283,8 @@ class DomEventsPlugin extends EventManagerPlugin {
|
|
2256
2283
|
// just call native removeEventListener
|
2257
2284
|
return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
|
2258
2285
|
}
|
2286
|
+
// fix issue 20532, should be able to remove
|
2287
|
+
// listener which was added inside of ngZone
|
2259
2288
|
/** @type {?} */
|
2260
2289
|
let found = false;
|
2261
2290
|
for (let i = 0; i < taskDatas.length; i++) {
|
@@ -2291,11 +2320,12 @@ DomEventsPlugin.ctorParameters = () => [
|
|
2291
2320
|
|
2292
2321
|
/**
|
2293
2322
|
* @fileoverview added by tsickle
|
2294
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
2323
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
2295
2324
|
*/
|
2296
|
-
/**
|
2325
|
+
/**
|
2297
2326
|
* Supported HammerJS recognizer event names.
|
2298
|
-
|
2327
|
+
* @type {?}
|
2328
|
+
*/
|
2299
2329
|
const EVENT_NAMES = {
|
2300
2330
|
// pan
|
2301
2331
|
'pan': true,
|
@@ -2333,18 +2363,20 @@ const EVENT_NAMES = {
|
|
2333
2363
|
// tap
|
2334
2364
|
'tap': true,
|
2335
2365
|
};
|
2336
|
-
/**
|
2366
|
+
/**
|
2337
2367
|
* DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.
|
2338
2368
|
* @see `HammerGestureConfig`
|
2339
2369
|
*
|
2340
2370
|
* \@publicApi
|
2341
|
-
|
2371
|
+
* @type {?}
|
2372
|
+
*/
|
2342
2373
|
const HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');
|
2343
|
-
/**
|
2374
|
+
/**
|
2344
2375
|
* Injection token used to provide a {\@link HammerLoader} to Angular.
|
2345
2376
|
*
|
2346
2377
|
* \@publicApi
|
2347
|
-
|
2378
|
+
* @type {?}
|
2379
|
+
*/
|
2348
2380
|
const HAMMER_LOADER = new InjectionToken('HammerLoader');
|
2349
2381
|
/**
|
2350
2382
|
* An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
|
@@ -2385,7 +2417,7 @@ class HammerGestureConfig {
|
|
2385
2417
|
*/
|
2386
2418
|
buildHammer(element) {
|
2387
2419
|
/** @type {?} */
|
2388
|
-
const mc = new /** @type {?} */ (
|
2420
|
+
const mc = new (/** @type {?} */ (Hammer))(element, this.options);
|
2389
2421
|
mc.get('pinch').set({ enable: true });
|
2390
2422
|
mc.get('rotate').set({ enable: true });
|
2391
2423
|
for (const eventName in this.overrides) {
|
@@ -2418,7 +2450,7 @@ class HammerGesturesPlugin extends EventManagerPlugin {
|
|
2418
2450
|
if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
|
2419
2451
|
return false;
|
2420
2452
|
}
|
2421
|
-
if (!(/** @type {?} */ (window)).Hammer && !this.loader) {
|
2453
|
+
if (!((/** @type {?} */ (window))).Hammer && !this.loader) {
|
2422
2454
|
this.console.warn(`The "${eventName}" event cannot be bound because Hammer.JS is not ` +
|
2423
2455
|
`loaded and no custom loader has been specified.`);
|
2424
2456
|
return false;
|
@@ -2437,7 +2469,10 @@ class HammerGesturesPlugin extends EventManagerPlugin {
|
|
2437
2469
|
eventName = eventName.toLowerCase();
|
2438
2470
|
// If Hammer is not present but a loader is specified, we defer adding the event listener
|
2439
2471
|
// until Hammer is loaded.
|
2440
|
-
if (!(/** @type {?} */ (window)).Hammer && this.loader) {
|
2472
|
+
if (!((/** @type {?} */ (window))).Hammer && this.loader) {
|
2473
|
+
// This `addEventListener` method returns a function to remove the added listener.
|
2474
|
+
// Until Hammer is loaded, the returned function needs to *cancel* the registration rather
|
2475
|
+
// than remove anything.
|
2441
2476
|
/** @type {?} */
|
2442
2477
|
let cancelRegistration = false;
|
2443
2478
|
/** @type {?} */
|
@@ -2445,7 +2480,7 @@ class HammerGesturesPlugin extends EventManagerPlugin {
|
|
2445
2480
|
this.loader()
|
2446
2481
|
.then(() => {
|
2447
2482
|
// If Hammer isn't actually loaded when the custom loader resolves, give up.
|
2448
|
-
if (!(/** @type {?} */ (window)).Hammer) {
|
2483
|
+
if (!((/** @type {?} */ (window))).Hammer) {
|
2449
2484
|
this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);
|
2450
2485
|
deregister = () => { };
|
2451
2486
|
return;
|
@@ -2467,6 +2502,7 @@ class HammerGesturesPlugin extends EventManagerPlugin {
|
|
2467
2502
|
return () => { deregister(); };
|
2468
2503
|
}
|
2469
2504
|
return zone.runOutsideAngular(() => {
|
2505
|
+
// Creating the manager bind events, must be done outside of angular
|
2470
2506
|
/** @type {?} */
|
2471
2507
|
const mc = this._config.buildHammer(element);
|
2472
2508
|
/** @type {?} */
|
@@ -2502,16 +2538,18 @@ HammerGesturesPlugin.ctorParameters = () => [
|
|
2502
2538
|
|
2503
2539
|
/**
|
2504
2540
|
* @fileoverview added by tsickle
|
2505
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
2541
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
2506
2542
|
*/
|
2507
|
-
/**
|
2543
|
+
/**
|
2508
2544
|
* Defines supported modifiers for key events.
|
2509
|
-
|
2545
|
+
* @type {?}
|
2546
|
+
*/
|
2510
2547
|
const MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];
|
2511
2548
|
const ɵ0$1 = (event) => event.altKey, ɵ1$1 = (event) => event.ctrlKey, ɵ2$1 = (event) => event.metaKey, ɵ3 = (event) => event.shiftKey;
|
2512
|
-
/**
|
2549
|
+
/**
|
2513
2550
|
* Retrieves modifiers from key-event objects.
|
2514
|
-
|
2551
|
+
* @type {?}
|
2552
|
+
*/
|
2515
2553
|
const MODIFIER_KEY_GETTERS = {
|
2516
2554
|
'alt': ɵ0$1,
|
2517
2555
|
'control': ɵ1$1,
|
@@ -2544,7 +2582,7 @@ class KeyEventsPlugin extends EventManagerPlugin {
|
|
2544
2582
|
*/
|
2545
2583
|
addEventListener(element, eventName, handler) {
|
2546
2584
|
/** @type {?} */
|
2547
|
-
const parsedEvent = /** @type {?} */ (
|
2585
|
+
const parsedEvent = (/** @type {?} */ (KeyEventsPlugin.parseEventName(eventName)));
|
2548
2586
|
/** @type {?} */
|
2549
2587
|
const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
|
2550
2588
|
return this.manager.getZone().runOutsideAngular(() => {
|
@@ -2564,7 +2602,7 @@ class KeyEventsPlugin extends EventManagerPlugin {
|
|
2564
2602
|
return null;
|
2565
2603
|
}
|
2566
2604
|
/** @type {?} */
|
2567
|
-
const key = KeyEventsPlugin._normalizeKey(/** @type {?} */ (
|
2605
|
+
const key = KeyEventsPlugin._normalizeKey((/** @type {?} */ (parts.pop())));
|
2568
2606
|
/** @type {?} */
|
2569
2607
|
let fullKey = '';
|
2570
2608
|
MODIFIER_KEYS.forEach(modifierName => {
|
@@ -2653,7 +2691,7 @@ KeyEventsPlugin.ctorParameters = () => [
|
|
2653
2691
|
|
2654
2692
|
/**
|
2655
2693
|
* @fileoverview added by tsickle
|
2656
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
2694
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
2657
2695
|
*/
|
2658
2696
|
/**
|
2659
2697
|
* DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
|
@@ -2707,7 +2745,7 @@ class DomSanitizerImpl extends DomSanitizer {
|
|
2707
2745
|
return null;
|
2708
2746
|
switch (ctx) {
|
2709
2747
|
case SecurityContext.NONE:
|
2710
|
-
return /** @type {?} */ (value);
|
2748
|
+
return (/** @type {?} */ (value));
|
2711
2749
|
case SecurityContext.HTML:
|
2712
2750
|
if (value instanceof SafeHtmlImpl)
|
2713
2751
|
return value.changingThisBreaksApplicationSecurity;
|
@@ -2717,7 +2755,7 @@ class DomSanitizerImpl extends DomSanitizer {
|
|
2717
2755
|
if (value instanceof SafeStyleImpl)
|
2718
2756
|
return value.changingThisBreaksApplicationSecurity;
|
2719
2757
|
this.checkNotSafeValue(value, 'Style');
|
2720
|
-
return ɵ_sanitizeStyle(/** @type {?} */ (value));
|
2758
|
+
return ɵ_sanitizeStyle((/** @type {?} */ (value)));
|
2721
2759
|
case SecurityContext.SCRIPT:
|
2722
2760
|
if (value instanceof SafeScriptImpl)
|
2723
2761
|
return value.changingThisBreaksApplicationSecurity;
|
@@ -2794,8 +2832,8 @@ class SafeValueImpl {
|
|
2794
2832
|
* @param {?} changingThisBreaksApplicationSecurity
|
2795
2833
|
*/
|
2796
2834
|
constructor(changingThisBreaksApplicationSecurity) {
|
2797
|
-
// empty
|
2798
2835
|
this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
|
2836
|
+
// empty
|
2799
2837
|
}
|
2800
2838
|
/**
|
2801
2839
|
* @return {?}
|
@@ -2838,7 +2876,7 @@ class SafeResourceUrlImpl extends SafeValueImpl {
|
|
2838
2876
|
|
2839
2877
|
/**
|
2840
2878
|
* @fileoverview added by tsickle
|
2841
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
2879
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
2842
2880
|
*/
|
2843
2881
|
/** @type {?} */
|
2844
2882
|
const INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
|
@@ -2847,19 +2885,21 @@ const INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
|
|
2847
2885
|
{ provide: PlatformLocation, useClass: BrowserPlatformLocation, deps: [DOCUMENT$1] },
|
2848
2886
|
{ provide: DOCUMENT$1, useFactory: _document, deps: [] },
|
2849
2887
|
];
|
2850
|
-
/**
|
2888
|
+
/**
|
2851
2889
|
* \@security Replacing built-in sanitization providers exposes the application to XSS risks.
|
2852
2890
|
* Attacker-controlled data introduced by an unsanitized provider could expose your
|
2853
2891
|
* application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).
|
2854
2892
|
* \@publicApi
|
2855
|
-
|
2893
|
+
* @type {?}
|
2894
|
+
*/
|
2856
2895
|
const BROWSER_SANITIZATION_PROVIDERS = [
|
2857
2896
|
{ provide: Sanitizer, useExisting: DomSanitizer },
|
2858
2897
|
{ provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT$1] },
|
2859
2898
|
];
|
2860
|
-
/**
|
2899
|
+
/**
|
2861
2900
|
* \@publicApi
|
2862
|
-
|
2901
|
+
* @type {?}
|
2902
|
+
*/
|
2863
2903
|
const platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
|
2864
2904
|
/**
|
2865
2905
|
* @return {?}
|
@@ -2958,7 +2998,7 @@ BrowserModule.ctorParameters = () => [
|
|
2958
2998
|
|
2959
2999
|
/**
|
2960
3000
|
* @fileoverview added by tsickle
|
2961
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3001
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
2962
3002
|
*/
|
2963
3003
|
/**
|
2964
3004
|
* Factory to create Meta service.
|
@@ -3022,7 +3062,7 @@ class Meta {
|
|
3022
3062
|
if (!attrSelector)
|
3023
3063
|
return [];
|
3024
3064
|
/** @type {?} */
|
3025
|
-
const list = this._dom.querySelectorAll(this._doc, `meta[${attrSelector}]`);
|
3065
|
+
const list /*NodeList*/ = this._dom.querySelectorAll(this._doc, `meta[${attrSelector}]`);
|
3026
3066
|
return list ? [].slice.call(list) : [];
|
3027
3067
|
}
|
3028
3068
|
/**
|
@@ -3035,7 +3075,7 @@ class Meta {
|
|
3035
3075
|
return null;
|
3036
3076
|
selector = selector || this._parseSelector(tag);
|
3037
3077
|
/** @type {?} */
|
3038
|
-
const meta = /** @type {?} */ (
|
3078
|
+
const meta = (/** @type {?} */ (this.getTag(selector)));
|
3039
3079
|
if (meta) {
|
3040
3080
|
return this._setMetaElementAttributes(tag, meta);
|
3041
3081
|
}
|
@@ -3045,7 +3085,7 @@ class Meta {
|
|
3045
3085
|
* @param {?} attrSelector
|
3046
3086
|
* @return {?}
|
3047
3087
|
*/
|
3048
|
-
removeTag(attrSelector) { this.removeTagElement(/** @type {?} */ (
|
3088
|
+
removeTag(attrSelector) { this.removeTagElement((/** @type {?} */ (this.getTag(attrSelector)))); }
|
3049
3089
|
/**
|
3050
3090
|
* @param {?} meta
|
3051
3091
|
* @return {?}
|
@@ -3065,7 +3105,7 @@ class Meta {
|
|
3065
3105
|
/** @type {?} */
|
3066
3106
|
const selector = this._parseSelector(meta);
|
3067
3107
|
/** @type {?} */
|
3068
|
-
const elem = /** @type {?} */ (
|
3108
|
+
const elem = (/** @type {?} */ (this.getTag(selector)));
|
3069
3109
|
// It's allowed to have multiple elements with the same name so it's not enough to
|
3070
3110
|
// just check that element with the same name already present on the page. We also need to
|
3071
3111
|
// check if element has tag attributes
|
@@ -3073,7 +3113,7 @@ class Meta {
|
|
3073
3113
|
return elem;
|
3074
3114
|
}
|
3075
3115
|
/** @type {?} */
|
3076
|
-
const element = /** @type {?} */ (this._dom.createElement('meta'));
|
3116
|
+
const element = (/** @type {?} */ (this._dom.createElement('meta')));
|
3077
3117
|
this._setMetaElementAttributes(meta, element);
|
3078
3118
|
/** @type {?} */
|
3079
3119
|
const head = this._dom.getElementsByTagName(this._doc, 'head')[0];
|
@@ -3118,7 +3158,7 @@ Meta.ctorParameters = () => [
|
|
3118
3158
|
|
3119
3159
|
/**
|
3120
3160
|
* @fileoverview added by tsickle
|
3121
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3161
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3122
3162
|
*/
|
3123
3163
|
/**
|
3124
3164
|
* Factory to create Title service.
|
@@ -3167,7 +3207,7 @@ Title.ctorParameters = () => [
|
|
3167
3207
|
|
3168
3208
|
/**
|
3169
3209
|
* @fileoverview added by tsickle
|
3170
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3210
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3171
3211
|
*/
|
3172
3212
|
/**
|
3173
3213
|
* @license
|
@@ -3177,11 +3217,11 @@ Title.ctorParameters = () => [
|
|
3177
3217
|
* found in the LICENSE file at https://angular.io/license
|
3178
3218
|
*/
|
3179
3219
|
/** @type {?} */
|
3180
|
-
const win = typeof window !== 'undefined' && window || /** @type {?} */ ({});
|
3220
|
+
const win = typeof window !== 'undefined' && window || (/** @type {?} */ ({}));
|
3181
3221
|
|
3182
3222
|
/**
|
3183
3223
|
* @fileoverview added by tsickle
|
3184
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3224
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3185
3225
|
*/
|
3186
3226
|
class ChangeDetectionPerfRecord {
|
3187
3227
|
/**
|
@@ -3202,6 +3242,7 @@ class AngularProfiler {
|
|
3202
3242
|
* @param {?} ref
|
3203
3243
|
*/
|
3204
3244
|
constructor(ref) { this.appRef = ref.injector.get(ApplicationRef); }
|
3245
|
+
// tslint:disable:no-console
|
3205
3246
|
/**
|
3206
3247
|
* Exercises change detection in a loop and then prints the average amount of
|
3207
3248
|
* time in milliseconds how long a single round of change detection takes for
|
@@ -3225,6 +3266,7 @@ class AngularProfiler {
|
|
3225
3266
|
const record = config && config['record'];
|
3226
3267
|
/** @type {?} */
|
3227
3268
|
const profileName = 'Change Detection';
|
3269
|
+
// Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
|
3228
3270
|
/** @type {?} */
|
3229
3271
|
const isProfilerAvailable = win.console.profile != null;
|
3230
3272
|
if (record && isProfilerAvailable) {
|
@@ -3253,7 +3295,7 @@ class AngularProfiler {
|
|
3253
3295
|
|
3254
3296
|
/**
|
3255
3297
|
* @fileoverview added by tsickle
|
3256
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3298
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3257
3299
|
*/
|
3258
3300
|
/** @type {?} */
|
3259
3301
|
const PROFILER_GLOBAL_NAME = 'profiler';
|
@@ -3289,7 +3331,7 @@ function disableDebugTools() {
|
|
3289
3331
|
|
3290
3332
|
/**
|
3291
3333
|
* @fileoverview added by tsickle
|
3292
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3334
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3293
3335
|
*/
|
3294
3336
|
/**
|
3295
3337
|
* @param {?} text
|
@@ -3339,7 +3381,7 @@ function unescapeHtml(text) {
|
|
3339
3381
|
* @return {?}
|
3340
3382
|
*/
|
3341
3383
|
function makeStateKey(key) {
|
3342
|
-
return /** @type {?} */ (key);
|
3384
|
+
return (/** @type {?} */ (key));
|
3343
3385
|
}
|
3344
3386
|
/**
|
3345
3387
|
* A key value store that is transferred from the application on the server side to the application
|
@@ -3378,7 +3420,7 @@ class TransferState {
|
|
3378
3420
|
* @return {?}
|
3379
3421
|
*/
|
3380
3422
|
get(key, defaultValue) {
|
3381
|
-
return this.store[key] !== undefined ? /** @type {?} */ (this.store[key]) : defaultValue;
|
3423
|
+
return this.store[key] !== undefined ? (/** @type {?} */ (this.store[key])) : defaultValue;
|
3382
3424
|
}
|
3383
3425
|
/**
|
3384
3426
|
* Set the value corresponding to a key.
|
@@ -3440,6 +3482,8 @@ TransferState.decorators = [
|
|
3440
3482
|
* @return {?}
|
3441
3483
|
*/
|
3442
3484
|
function initTransferState(doc, appId) {
|
3485
|
+
// Locate the script tag with the JSON data transferred from the server.
|
3486
|
+
// The id of the script tag is set to the Angular appId + 'state'.
|
3443
3487
|
/** @type {?} */
|
3444
3488
|
const script = doc.getElementById(appId + '-state');
|
3445
3489
|
/** @type {?} */
|
@@ -3470,7 +3514,7 @@ BrowserTransferStateModule.decorators = [
|
|
3470
3514
|
|
3471
3515
|
/**
|
3472
3516
|
* @fileoverview added by tsickle
|
3473
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3517
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3474
3518
|
*/
|
3475
3519
|
/**
|
3476
3520
|
* Predicates for use with {\@link DebugElement}'s query functions.
|
@@ -3516,38 +3560,38 @@ class By {
|
|
3516
3560
|
* @return {?}
|
3517
3561
|
*/
|
3518
3562
|
static directive(type) {
|
3519
|
-
return (debugElement) => /** @type {?} */ (
|
3563
|
+
return (debugElement) => (/** @type {?} */ (debugElement.providerTokens)).indexOf(type) !== -1;
|
3520
3564
|
}
|
3521
3565
|
}
|
3522
3566
|
|
3523
3567
|
/**
|
3524
3568
|
* @fileoverview added by tsickle
|
3525
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3569
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3526
3570
|
*/
|
3527
3571
|
|
3528
3572
|
/**
|
3529
3573
|
* @fileoverview added by tsickle
|
3530
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3574
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3531
3575
|
*/
|
3532
|
-
/**
|
3576
|
+
/**
|
3533
3577
|
* \@publicApi
|
3534
|
-
|
3535
|
-
|
3578
|
+
* @type {?}
|
3579
|
+
*/
|
3580
|
+
const VERSION = new Version('7.1.4');
|
3536
3581
|
|
3537
3582
|
/**
|
3538
3583
|
* @fileoverview added by tsickle
|
3539
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3584
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3540
3585
|
*/
|
3541
3586
|
|
3542
3587
|
/**
|
3543
3588
|
* @fileoverview added by tsickle
|
3544
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3589
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3545
3590
|
*/
|
3546
|
-
// This file only reexports content of the `src` folder. Keep it that way.
|
3547
3591
|
|
3548
3592
|
/**
|
3549
3593
|
* @fileoverview added by tsickle
|
3550
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
3594
|
+
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
|
3551
3595
|
*/
|
3552
3596
|
|
3553
3597
|
/**
|