@angular/platform-browser 9.1.0 → 9.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/animations.d.ts +1 -1
- package/animations/animations.metadata.json +1 -1
- package/animations.d.ts +1 -1
- package/bundles/platform-browser-animations.umd.js +88 -32
- package/bundles/platform-browser-animations.umd.js.map +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 +42 -11
- package/bundles/platform-browser-testing.umd.js.map +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 +182 -71
- package/bundles/platform-browser.umd.js.map +1 -1
- package/bundles/platform-browser.umd.min.js +7 -7
- package/bundles/platform-browser.umd.min.js.map +1 -1
- package/esm2015/animations/src/animation_builder.js +38 -19
- package/esm2015/animations/src/animation_renderer.js +31 -11
- package/esm2015/animations/src/providers.js +2 -2
- package/esm2015/index.js +1 -1
- package/esm2015/public_api.js +1 -1
- package/esm2015/src/browser/browser_adapter.js +43 -15
- package/esm2015/src/browser/generic_browser_adapter.js +7 -3
- package/esm2015/src/browser/meta.js +4 -2
- package/esm2015/src/browser/testability.js +4 -2
- package/esm2015/src/browser/title.js +7 -3
- package/esm2015/src/browser/tools/common_tools.js +4 -2
- package/esm2015/src/browser/transfer_state.js +10 -4
- package/esm2015/src/browser.js +2 -2
- package/esm2015/src/dom/debug/by.js +7 -5
- package/esm2015/src/dom/dom_renderer.js +34 -12
- package/esm2015/src/dom/events/dom_events.js +7 -3
- package/esm2015/src/dom/events/event_manager.js +4 -2
- package/esm2015/src/dom/events/hammer_gestures.js +13 -5
- package/esm2015/src/dom/events/key_events.js +7 -3
- package/esm2015/src/dom/shared_styles_host.js +14 -8
- package/esm2015/src/dom/util.js +1 -1
- package/esm2015/src/platform-browser.js +3 -3
- package/esm2015/src/private_export.js +3 -3
- package/esm2015/src/security/dom_sanitization_service.js +11 -5
- package/esm2015/src/version.js +1 -1
- package/esm2015/testing/src/browser.js +2 -2
- package/esm2015/testing/src/browser_util.js +25 -9
- package/esm2015/testing/src/matchers.js +22 -9
- package/esm5/animations/src/animation_builder.js +38 -19
- package/esm5/animations/src/animation_renderer.js +31 -11
- package/esm5/animations/src/providers.js +2 -2
- package/esm5/src/browser/browser_adapter.js +43 -15
- package/esm5/src/browser/generic_browser_adapter.js +4 -2
- package/esm5/src/browser/meta.js +4 -2
- package/esm5/src/browser/testability.js +4 -2
- package/esm5/src/browser/title.js +7 -3
- package/esm5/src/browser/tools/common_tools.js +1 -1
- package/esm5/src/browser/transfer_state.js +10 -4
- package/esm5/src/browser.js +2 -2
- package/esm5/src/dom/debug/by.js +4 -2
- package/esm5/src/dom/dom_renderer.js +34 -12
- package/esm5/src/dom/events/dom_events.js +4 -2
- package/esm5/src/dom/events/event_manager.js +4 -2
- package/esm5/src/dom/events/hammer_gestures.js +28 -20
- package/esm5/src/dom/events/key_events.js +8 -6
- package/esm5/src/dom/shared_styles_host.js +10 -4
- package/esm5/src/dom/util.js +1 -1
- package/esm5/src/platform-browser.js +2 -2
- package/esm5/src/private_export.js +3 -3
- package/esm5/src/security/dom_sanitization_service.js +11 -5
- package/esm5/src/version.js +1 -1
- package/esm5/testing/src/browser.js +2 -2
- package/esm5/testing/src/browser_util.js +22 -8
- package/esm5/testing/src/matchers.js +21 -8
- package/fesm2015/animations.js +68 -29
- package/fesm2015/animations.js.map +1 -1
- package/fesm2015/platform-browser.js +162 -60
- package/fesm2015/platform-browser.js.map +1 -1
- package/fesm2015/testing.js +25 -9
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/animations.js +68 -29
- package/fesm5/animations.js.map +1 -1
- package/fesm5/platform-browser.js +162 -68
- package/fesm5/platform-browser.js.map +1 -1
- package/fesm5/testing.js +22 -8
- package/fesm5/testing.js.map +1 -1
- package/package.json +4 -4
- package/platform-browser.d.ts +20 -20
- package/platform-browser.metadata.json +1 -1
- package/testing/testing.d.ts +1 -1
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v9.1.
|
2
|
+
* @license Angular v9.1.4
|
3
3
|
* (c) 2010-2020 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -78,10 +78,11 @@
|
|
78
78
|
}
|
79
79
|
|
80
80
|
function __awaiter(thisArg, _arguments, P, generator) {
|
81
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
81
82
|
return new (P || (P = Promise))(function (resolve, reject) {
|
82
83
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
83
84
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
84
|
-
function step(result) { result.done ? resolve(result.value) :
|
85
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
85
86
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
86
87
|
});
|
87
88
|
}
|
@@ -119,14 +120,15 @@
|
|
119
120
|
}
|
120
121
|
|
121
122
|
function __values(o) {
|
122
|
-
var
|
123
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
123
124
|
if (m) return m.call(o);
|
124
|
-
return {
|
125
|
+
if (o && typeof o.length === "number") return {
|
125
126
|
next: function () {
|
126
127
|
if (o && i >= o.length) o = void 0;
|
127
128
|
return { value: o && o[i++], done: !o };
|
128
129
|
}
|
129
130
|
};
|
131
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
130
132
|
}
|
131
133
|
|
132
134
|
function __read(o, n) {
|
@@ -205,6 +207,21 @@
|
|
205
207
|
|
206
208
|
function __importDefault(mod) {
|
207
209
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
210
|
+
}
|
211
|
+
|
212
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
213
|
+
if (!privateMap.has(receiver)) {
|
214
|
+
throw new TypeError("attempted to get private field on non-instance");
|
215
|
+
}
|
216
|
+
return privateMap.get(receiver);
|
217
|
+
}
|
218
|
+
|
219
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
220
|
+
if (!privateMap.has(receiver)) {
|
221
|
+
throw new TypeError("attempted to set private field on non-instance");
|
222
|
+
}
|
223
|
+
privateMap.set(receiver, value);
|
224
|
+
return value;
|
208
225
|
}
|
209
226
|
|
210
227
|
/**
|
@@ -225,7 +242,9 @@
|
|
225
242
|
function GenericBrowserDomAdapter() {
|
226
243
|
return _super.call(this) || this;
|
227
244
|
}
|
228
|
-
GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () {
|
245
|
+
GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () {
|
246
|
+
return true;
|
247
|
+
};
|
229
248
|
return GenericBrowserDomAdapter;
|
230
249
|
}(common.ɵDomAdapter));
|
231
250
|
|
@@ -257,8 +276,12 @@
|
|
257
276
|
function BrowserDomAdapter() {
|
258
277
|
return _super !== null && _super.apply(this, arguments) || this;
|
259
278
|
}
|
260
|
-
BrowserDomAdapter.makeCurrent = function () {
|
261
|
-
|
279
|
+
BrowserDomAdapter.makeCurrent = function () {
|
280
|
+
common.ɵsetRootDomAdapter(new BrowserDomAdapter());
|
281
|
+
};
|
282
|
+
BrowserDomAdapter.prototype.getProperty = function (el, name) {
|
283
|
+
return el[name];
|
284
|
+
};
|
262
285
|
BrowserDomAdapter.prototype.log = function (error) {
|
263
286
|
if (window.console) {
|
264
287
|
window.console.log && window.console.log(error);
|
@@ -278,16 +301,22 @@
|
|
278
301
|
el.addEventListener(evt, listener, false);
|
279
302
|
// Needed to follow Dart's subscription semantic, until fix of
|
280
303
|
// https://code.google.com/p/dart/issues/detail?id=17406
|
281
|
-
return function () {
|
304
|
+
return function () {
|
305
|
+
el.removeEventListener(evt, listener, false);
|
306
|
+
};
|
307
|
+
};
|
308
|
+
BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) {
|
309
|
+
el.dispatchEvent(evt);
|
282
310
|
};
|
283
|
-
BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) { el.dispatchEvent(evt); };
|
284
311
|
BrowserDomAdapter.prototype.remove = function (node) {
|
285
312
|
if (node.parentNode) {
|
286
313
|
node.parentNode.removeChild(node);
|
287
314
|
}
|
288
315
|
return node;
|
289
316
|
};
|
290
|
-
BrowserDomAdapter.prototype.getValue = function (el) {
|
317
|
+
BrowserDomAdapter.prototype.getValue = function (el) {
|
318
|
+
return el.value;
|
319
|
+
};
|
291
320
|
BrowserDomAdapter.prototype.createElement = function (tagName, doc) {
|
292
321
|
doc = doc || this.getDefaultDocument();
|
293
322
|
return doc.createElement(tagName);
|
@@ -295,9 +324,15 @@
|
|
295
324
|
BrowserDomAdapter.prototype.createHtmlDocument = function () {
|
296
325
|
return document.implementation.createHTMLDocument('fakeTitle');
|
297
326
|
};
|
298
|
-
BrowserDomAdapter.prototype.getDefaultDocument = function () {
|
299
|
-
|
300
|
-
|
327
|
+
BrowserDomAdapter.prototype.getDefaultDocument = function () {
|
328
|
+
return document;
|
329
|
+
};
|
330
|
+
BrowserDomAdapter.prototype.isElementNode = function (node) {
|
331
|
+
return node.nodeType === Node.ELEMENT_NODE;
|
332
|
+
};
|
333
|
+
BrowserDomAdapter.prototype.isShadowRoot = function (node) {
|
334
|
+
return node instanceof DocumentFragment;
|
335
|
+
};
|
301
336
|
BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {
|
302
337
|
if (target === 'window') {
|
303
338
|
return window;
|
@@ -310,22 +345,34 @@
|
|
310
345
|
}
|
311
346
|
return null;
|
312
347
|
};
|
313
|
-
BrowserDomAdapter.prototype.getHistory = function () {
|
314
|
-
|
348
|
+
BrowserDomAdapter.prototype.getHistory = function () {
|
349
|
+
return window.history;
|
350
|
+
};
|
351
|
+
BrowserDomAdapter.prototype.getLocation = function () {
|
352
|
+
return window.location;
|
353
|
+
};
|
315
354
|
BrowserDomAdapter.prototype.getBaseHref = function (doc) {
|
316
355
|
var href = getBaseElementHref();
|
317
356
|
return href == null ? null : relativePath(href);
|
318
357
|
};
|
319
|
-
BrowserDomAdapter.prototype.resetBaseElement = function () {
|
320
|
-
|
358
|
+
BrowserDomAdapter.prototype.resetBaseElement = function () {
|
359
|
+
baseElement = null;
|
360
|
+
};
|
361
|
+
BrowserDomAdapter.prototype.getUserAgent = function () {
|
362
|
+
return window.navigator.userAgent;
|
363
|
+
};
|
321
364
|
BrowserDomAdapter.prototype.performanceNow = function () {
|
322
365
|
// performance.now() is not available in all browsers, see
|
323
366
|
// http://caniuse.com/#search=performance.now
|
324
367
|
return window.performance && window.performance.now ? window.performance.now() :
|
325
368
|
new Date().getTime();
|
326
369
|
};
|
327
|
-
BrowserDomAdapter.prototype.supportsCookies = function () {
|
328
|
-
|
370
|
+
BrowserDomAdapter.prototype.supportsCookies = function () {
|
371
|
+
return true;
|
372
|
+
};
|
373
|
+
BrowserDomAdapter.prototype.getCookie = function (name) {
|
374
|
+
return common.ɵparseCookieValue(document.cookie, name);
|
375
|
+
};
|
329
376
|
return BrowserDomAdapter;
|
330
377
|
}(GenericBrowserDomAdapter));
|
331
378
|
var baseElement = null;
|
@@ -392,7 +439,9 @@
|
|
392
439
|
var BrowserGetTestability = /** @class */ (function () {
|
393
440
|
function BrowserGetTestability() {
|
394
441
|
}
|
395
|
-
BrowserGetTestability.init = function () {
|
442
|
+
BrowserGetTestability.init = function () {
|
443
|
+
i0.setTestabilityGetter(new BrowserGetTestability());
|
444
|
+
};
|
396
445
|
BrowserGetTestability.prototype.addToWindow = function (registry) {
|
397
446
|
i0.ɵglobal['getAngularTestability'] = function (elem, findInAncestors) {
|
398
447
|
if (findInAncestors === void 0) { findInAncestors = true; }
|
@@ -600,7 +649,9 @@
|
|
600
649
|
/**
|
601
650
|
* Retrieves the compilation zone in which event listeners are registered.
|
602
651
|
*/
|
603
|
-
EventManager.prototype.getZone = function () {
|
652
|
+
EventManager.prototype.getZone = function () {
|
653
|
+
return this._zone;
|
654
|
+
};
|
604
655
|
/** @internal */
|
605
656
|
EventManager.prototype._findPluginFor = function (eventName) {
|
606
657
|
var plugin = this._eventNameToPlugin.get(eventName);
|
@@ -662,7 +713,9 @@
|
|
662
713
|
this.onStylesAdded(additions);
|
663
714
|
};
|
664
715
|
SharedStylesHost.prototype.onStylesAdded = function (additions) { };
|
665
|
-
SharedStylesHost.prototype.getAllStyles = function () {
|
716
|
+
SharedStylesHost.prototype.getAllStyles = function () {
|
717
|
+
return Array.from(this._stylesSet);
|
718
|
+
};
|
666
719
|
SharedStylesHost = __decorate([
|
667
720
|
i0.Injectable()
|
668
721
|
], SharedStylesHost);
|
@@ -690,12 +743,16 @@
|
|
690
743
|
this._addStylesToHost(this._stylesSet, hostNode);
|
691
744
|
this._hostNodes.add(hostNode);
|
692
745
|
};
|
693
|
-
DomSharedStylesHost.prototype.removeHost = function (hostNode) {
|
746
|
+
DomSharedStylesHost.prototype.removeHost = function (hostNode) {
|
747
|
+
this._hostNodes.delete(hostNode);
|
748
|
+
};
|
694
749
|
DomSharedStylesHost.prototype.onStylesAdded = function (additions) {
|
695
750
|
var _this = this;
|
696
751
|
this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });
|
697
752
|
};
|
698
|
-
DomSharedStylesHost.prototype.ngOnDestroy = function () {
|
753
|
+
DomSharedStylesHost.prototype.ngOnDestroy = function () {
|
754
|
+
this._styleNodes.forEach(function (styleNode) { return common.ɵgetDOM().remove(styleNode); });
|
755
|
+
};
|
699
756
|
DomSharedStylesHost = __decorate([
|
700
757
|
i0.Injectable(),
|
701
758
|
__param(0, i0.Inject(common.DOCUMENT)),
|
@@ -822,9 +879,15 @@
|
|
822
879
|
}
|
823
880
|
return document.createElement(name);
|
824
881
|
};
|
825
|
-
DefaultDomRenderer2.prototype.createComment = function (value) {
|
826
|
-
|
827
|
-
|
882
|
+
DefaultDomRenderer2.prototype.createComment = function (value) {
|
883
|
+
return document.createComment(value);
|
884
|
+
};
|
885
|
+
DefaultDomRenderer2.prototype.createText = function (value) {
|
886
|
+
return document.createTextNode(value);
|
887
|
+
};
|
888
|
+
DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) {
|
889
|
+
parent.appendChild(newChild);
|
890
|
+
};
|
828
891
|
DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
|
829
892
|
if (parent) {
|
830
893
|
parent.insertBefore(newChild, refChild);
|
@@ -846,8 +909,12 @@
|
|
846
909
|
}
|
847
910
|
return el;
|
848
911
|
};
|
849
|
-
DefaultDomRenderer2.prototype.parentNode = function (node) {
|
850
|
-
|
912
|
+
DefaultDomRenderer2.prototype.parentNode = function (node) {
|
913
|
+
return node.parentNode;
|
914
|
+
};
|
915
|
+
DefaultDomRenderer2.prototype.nextSibling = function (node) {
|
916
|
+
return node.nextSibling;
|
917
|
+
};
|
851
918
|
DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {
|
852
919
|
if (namespace) {
|
853
920
|
name = namespace + ':' + name;
|
@@ -884,8 +951,12 @@
|
|
884
951
|
el.removeAttribute(name);
|
885
952
|
}
|
886
953
|
};
|
887
|
-
DefaultDomRenderer2.prototype.addClass = function (el, name) {
|
888
|
-
|
954
|
+
DefaultDomRenderer2.prototype.addClass = function (el, name) {
|
955
|
+
el.classList.add(name);
|
956
|
+
};
|
957
|
+
DefaultDomRenderer2.prototype.removeClass = function (el, name) {
|
958
|
+
el.classList.remove(name);
|
959
|
+
};
|
889
960
|
DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {
|
890
961
|
if (flags & i0.RendererStyleFlags2.DashCase) {
|
891
962
|
el.style.setProperty(style, value, !!(flags & i0.RendererStyleFlags2.Important) ? 'important' : '');
|
@@ -908,7 +979,9 @@
|
|
908
979
|
NG_DEV_MODE && checkNoSyntheticProp(name, 'property');
|
909
980
|
el[name] = value;
|
910
981
|
};
|
911
|
-
DefaultDomRenderer2.prototype.setValue = function (node, value) {
|
982
|
+
DefaultDomRenderer2.prototype.setValue = function (node, value) {
|
983
|
+
node.nodeValue = value;
|
984
|
+
};
|
912
985
|
DefaultDomRenderer2.prototype.listen = function (target, event, callback) {
|
913
986
|
NG_DEV_MODE && checkNoSyntheticProp(event, 'listener');
|
914
987
|
if (typeof target === 'string') {
|
@@ -936,7 +1009,9 @@
|
|
936
1009
|
_this.hostAttr = shimHostAttribute(appId + '-' + component.id);
|
937
1010
|
return _this;
|
938
1011
|
}
|
939
|
-
EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) {
|
1012
|
+
EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) {
|
1013
|
+
_super.prototype.setAttribute.call(this, element, this.hostAttr, '');
|
1014
|
+
};
|
940
1015
|
EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {
|
941
1016
|
var el = _super.prototype.createElement.call(this, parent, name);
|
942
1017
|
_super.prototype.setAttribute.call(this, el, this.contentAttr, '');
|
@@ -966,8 +1041,12 @@
|
|
966
1041
|
}
|
967
1042
|
return _this;
|
968
1043
|
}
|
969
|
-
ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) {
|
970
|
-
|
1044
|
+
ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) {
|
1045
|
+
return node === this.hostEl ? this.shadowRoot : node;
|
1046
|
+
};
|
1047
|
+
ShadowDomRenderer.prototype.destroy = function () {
|
1048
|
+
this.sharedStylesHost.removeHost(this.shadowRoot);
|
1049
|
+
};
|
971
1050
|
ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {
|
972
1051
|
return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);
|
973
1052
|
};
|
@@ -997,7 +1076,9 @@
|
|
997
1076
|
}
|
998
1077
|
// This plugin should come last in the list of plugins, because it accepts all
|
999
1078
|
// events.
|
1000
|
-
DomEventsPlugin.prototype.supports = function (eventName) {
|
1079
|
+
DomEventsPlugin.prototype.supports = function (eventName) {
|
1080
|
+
return true;
|
1081
|
+
};
|
1001
1082
|
DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
|
1002
1083
|
var _this = this;
|
1003
1084
|
element.addEventListener(eventName, handler, false);
|
@@ -1089,21 +1170,21 @@
|
|
1089
1170
|
*/
|
1090
1171
|
this.events = [];
|
1091
1172
|
/**
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1173
|
+
* Maps gesture event names to a set of configuration options
|
1174
|
+
* that specify overrides to the default values for specific properties.
|
1175
|
+
*
|
1176
|
+
* The key is a supported event name to be configured,
|
1177
|
+
* and the options object contains a set of properties, with override values
|
1178
|
+
* to be applied to the named recognizer event.
|
1179
|
+
* For example, to disable recognition of the rotate event, specify
|
1180
|
+
* `{"rotate": {"enable": false}}`.
|
1181
|
+
*
|
1182
|
+
* Properties that are not present take the HammerJS default values.
|
1183
|
+
* For information about which properties are supported for which events,
|
1184
|
+
* and their allowed and default values, see
|
1185
|
+
* [HammerJS documentation](http://hammerjs.github.io/).
|
1186
|
+
*
|
1187
|
+
*/
|
1107
1188
|
this.overrides = {};
|
1108
1189
|
}
|
1109
1190
|
/**
|
@@ -1162,7 +1243,9 @@
|
|
1162
1243
|
// Until Hammer is loaded, the returned function needs to *cancel* the registration rather
|
1163
1244
|
// than remove anything.
|
1164
1245
|
var cancelRegistration_1 = false;
|
1165
|
-
var deregister_1 = function () {
|
1246
|
+
var deregister_1 = function () {
|
1247
|
+
cancelRegistration_1 = true;
|
1248
|
+
};
|
1166
1249
|
this.loader()
|
1167
1250
|
.then(function () {
|
1168
1251
|
// If Hammer isn't actually loaded when the custom loader resolves, give up.
|
@@ -1185,13 +1268,17 @@
|
|
1185
1268
|
// Return a function that *executes* `deregister` (and not `deregister` itself) so that we
|
1186
1269
|
// can change the behavior of `deregister` once the listener is added. Using a closure in
|
1187
1270
|
// this way allows us to avoid any additional data structures to track listener removal.
|
1188
|
-
return function () {
|
1271
|
+
return function () {
|
1272
|
+
deregister_1();
|
1273
|
+
};
|
1189
1274
|
}
|
1190
1275
|
return zone.runOutsideAngular(function () {
|
1191
1276
|
// Creating the manager bind events, must be done outside of angular
|
1192
1277
|
var mc = _this._config.buildHammer(element);
|
1193
1278
|
var callback = function (eventObj) {
|
1194
|
-
zone.runGuarded(function () {
|
1279
|
+
zone.runGuarded(function () {
|
1280
|
+
handler(eventObj);
|
1281
|
+
});
|
1195
1282
|
};
|
1196
1283
|
mc.on(eventName, callback);
|
1197
1284
|
return function () {
|
@@ -1203,7 +1290,9 @@
|
|
1203
1290
|
};
|
1204
1291
|
});
|
1205
1292
|
};
|
1206
|
-
HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) {
|
1293
|
+
HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) {
|
1294
|
+
return this._config.events.indexOf(eventName) > -1;
|
1295
|
+
};
|
1207
1296
|
HammerGesturesPlugin = __decorate([
|
1208
1297
|
i0.Injectable(),
|
1209
1298
|
__param(0, i0.Inject(common.DOCUMENT)),
|
@@ -1328,11 +1417,13 @@
|
|
1328
1417
|
}
|
1329
1418
|
KeyEventsPlugin_1 = KeyEventsPlugin;
|
1330
1419
|
/**
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1420
|
+
* Reports whether a named key event is supported.
|
1421
|
+
* @param eventName The event name to query.
|
1422
|
+
* @return True if the named key event is supported.
|
1334
1423
|
*/
|
1335
|
-
KeyEventsPlugin.prototype.supports = function (eventName) {
|
1424
|
+
KeyEventsPlugin.prototype.supports = function (eventName) {
|
1425
|
+
return KeyEventsPlugin_1.parseEventName(eventName) != null;
|
1426
|
+
};
|
1336
1427
|
/**
|
1337
1428
|
* Registers a handler for a specific element and key event.
|
1338
1429
|
* @param element The HTML element to receive event notifications.
|
@@ -1340,7 +1431,7 @@
|
|
1340
1431
|
* @param handler A function to call when the notification occurs. Receives the
|
1341
1432
|
* event object as an argument.
|
1342
1433
|
* @returns The key event that was registered.
|
1343
|
-
|
1434
|
+
*/
|
1344
1435
|
KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
|
1345
1436
|
var parsedEvent = KeyEventsPlugin_1.parseEventName(eventName);
|
1346
1437
|
var outsideHandler = KeyEventsPlugin_1.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
|
@@ -1535,12 +1626,18 @@
|
|
1535
1626
|
throw new Error("Unexpected SecurityContext " + ctx + " (see http://g.co/ng/security#xss)");
|
1536
1627
|
}
|
1537
1628
|
};
|
1538
|
-
DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) {
|
1539
|
-
|
1629
|
+
DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) {
|
1630
|
+
return i0.ɵbypassSanitizationTrustHtml(value);
|
1631
|
+
};
|
1632
|
+
DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) {
|
1633
|
+
return i0.ɵbypassSanitizationTrustStyle(value);
|
1634
|
+
};
|
1540
1635
|
DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) {
|
1541
1636
|
return i0.ɵbypassSanitizationTrustScript(value);
|
1542
1637
|
};
|
1543
|
-
DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) {
|
1638
|
+
DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) {
|
1639
|
+
return i0.ɵbypassSanitizationTrustUrl(value);
|
1640
|
+
};
|
1544
1641
|
DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
|
1545
1642
|
return i0.ɵbypassSanitizationTrustResourceUrl(value);
|
1546
1643
|
};
|
@@ -1716,7 +1813,9 @@
|
|
1716
1813
|
}
|
1717
1814
|
return this._getOrCreateElement(tag, true);
|
1718
1815
|
};
|
1719
|
-
Meta.prototype.removeTag = function (attrSelector) {
|
1816
|
+
Meta.prototype.removeTag = function (attrSelector) {
|
1817
|
+
this.removeTagElement(this.getTag(attrSelector));
|
1818
|
+
};
|
1720
1819
|
Meta.prototype.removeTagElement = function (meta) {
|
1721
1820
|
if (meta) {
|
1722
1821
|
this._dom.remove(meta);
|
@@ -1782,12 +1881,16 @@
|
|
1782
1881
|
/**
|
1783
1882
|
* Get the title of the current HTML document.
|
1784
1883
|
*/
|
1785
|
-
Title.prototype.getTitle = function () {
|
1884
|
+
Title.prototype.getTitle = function () {
|
1885
|
+
return this._doc.title;
|
1886
|
+
};
|
1786
1887
|
/**
|
1787
1888
|
* Set the title of the current HTML document.
|
1788
1889
|
* @param newTitle
|
1789
1890
|
*/
|
1790
|
-
Title.prototype.setTitle = function (newTitle) {
|
1891
|
+
Title.prototype.setTitle = function (newTitle) {
|
1892
|
+
this._doc.title = newTitle || '';
|
1893
|
+
};
|
1791
1894
|
Title.ɵprov = i0.ɵɵdefineInjectable({ factory: createTitle, token: Title, providedIn: "root" });
|
1792
1895
|
Title = __decorate([
|
1793
1896
|
i0.Injectable({ providedIn: 'root', useFactory: createTitle, deps: [] }),
|
@@ -1983,15 +2086,21 @@
|
|
1983
2086
|
/**
|
1984
2087
|
* Set the value corresponding to a key.
|
1985
2088
|
*/
|
1986
|
-
TransferState.prototype.set = function (key, value) {
|
2089
|
+
TransferState.prototype.set = function (key, value) {
|
2090
|
+
this.store[key] = value;
|
2091
|
+
};
|
1987
2092
|
/**
|
1988
2093
|
* Remove a key from the store.
|
1989
2094
|
*/
|
1990
|
-
TransferState.prototype.remove = function (key) {
|
2095
|
+
TransferState.prototype.remove = function (key) {
|
2096
|
+
delete this.store[key];
|
2097
|
+
};
|
1991
2098
|
/**
|
1992
2099
|
* Test whether a key exists in the store.
|
1993
2100
|
*/
|
1994
|
-
TransferState.prototype.hasKey = function (key) {
|
2101
|
+
TransferState.prototype.hasKey = function (key) {
|
2102
|
+
return this.store.hasOwnProperty(key);
|
2103
|
+
};
|
1995
2104
|
/**
|
1996
2105
|
* Register a callback to provide the value for a key when `toJson` is called.
|
1997
2106
|
*/
|
@@ -2076,7 +2185,9 @@
|
|
2076
2185
|
*
|
2077
2186
|
* {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
|
2078
2187
|
*/
|
2079
|
-
By.all = function () {
|
2188
|
+
By.all = function () {
|
2189
|
+
return function () { return true; };
|
2190
|
+
};
|
2080
2191
|
/**
|
2081
2192
|
* Match elements by the given CSS selector.
|
2082
2193
|
*
|
@@ -2132,7 +2243,7 @@
|
|
2132
2243
|
/**
|
2133
2244
|
* @publicApi
|
2134
2245
|
*/
|
2135
|
-
var VERSION = new i0.Version('9.1.
|
2246
|
+
var VERSION = new i0.Version('9.1.4');
|
2136
2247
|
|
2137
2248
|
/**
|
2138
2249
|
* @license
|