@angular/platform-browser 13.0.0-next.0 → 13.0.0-next.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/animations/animations.d.ts +47 -56
  2. package/animations/package.json +5 -5
  3. package/esm2020/animations/animations.mjs +5 -0
  4. package/{esm2015/animations/index.js → esm2020/animations/index.mjs} +0 -0
  5. package/{esm2015/animations/public_api.js → esm2020/animations/public_api.mjs} +0 -0
  6. package/esm2020/animations/src/animation_builder.mjs +106 -0
  7. package/esm2020/animations/src/animation_renderer.mjs +248 -0
  8. package/{esm2015/animations/src/animations.js → esm2020/animations/src/animations.mjs} +0 -0
  9. package/esm2020/animations/src/module.mjs +68 -0
  10. package/{esm2015/animations/src/private_export.js → esm2020/animations/src/private_export.mjs} +0 -0
  11. package/esm2020/animations/src/providers.mjs +71 -0
  12. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  13. package/esm2020/platform-browser.mjs +5 -0
  14. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  15. package/{esm2015/src/browser/browser_adapter.js → esm2020/src/browser/browser_adapter.mjs} +0 -0
  16. package/{esm2015/src/browser/generic_browser_adapter.js → esm2020/src/browser/generic_browser_adapter.mjs} +0 -0
  17. package/esm2020/src/browser/meta.mjs +182 -0
  18. package/esm2020/src/browser/server-transition.mjs +36 -0
  19. package/{esm2015/src/browser/testability.js → esm2020/src/browser/testability.mjs} +0 -0
  20. package/esm2020/src/browser/title.mjs +54 -0
  21. package/{esm2015/src/browser/tools/browser.js → esm2020/src/browser/tools/browser.mjs} +0 -0
  22. package/{esm2015/src/browser/tools/common_tools.js → esm2020/src/browser/tools/common_tools.mjs} +0 -0
  23. package/{esm2015/src/browser/tools/tools.js → esm2020/src/browser/tools/tools.mjs} +0 -0
  24. package/esm2020/src/browser/transfer_state.mjs +158 -0
  25. package/esm2020/src/browser/xhr.mjs +16 -0
  26. package/esm2020/src/browser.mjs +132 -0
  27. package/{esm2015/src/dom/debug/by.js → esm2020/src/dom/debug/by.mjs} +0 -0
  28. package/esm2020/src/dom/debug/ng_probe.mjs +54 -0
  29. package/esm2020/src/dom/dom_renderer.mjs +310 -0
  30. package/esm2020/src/dom/events/dom_events.mjs +37 -0
  31. package/esm2020/src/dom/events/event_manager.mjs +103 -0
  32. package/esm2020/src/dom/events/hammer_gestures.mjs +266 -0
  33. package/esm2020/src/dom/events/key_events.mjs +204 -0
  34. package/esm2020/src/dom/shared_styles_host.mjs +83 -0
  35. package/{esm2015/src/dom/util.js → esm2020/src/dom/util.mjs} +0 -0
  36. package/{esm2015/src/platform-browser.js → esm2020/src/platform-browser.mjs} +0 -0
  37. package/{esm2015/src/private_export.js → esm2020/src/private_export.mjs} +0 -0
  38. package/{esm2015/src/security/dom_sanitization_service.js → esm2020/src/security/dom_sanitization_service.mjs} +16 -12
  39. package/{esm2015/src/version.js → esm2020/src/version.mjs} +1 -1
  40. package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
  41. package/{esm2015/testing/public_api.js → esm2020/testing/public_api.mjs} +0 -0
  42. package/esm2020/testing/src/browser.mjs +48 -0
  43. package/{esm2015/testing/src/browser_util.js → esm2020/testing/src/browser_util.mjs} +0 -0
  44. package/{esm2015/testing/src/matchers.js → esm2020/testing/src/matchers.mjs} +0 -0
  45. package/{esm2015/testing/src/testing.js → esm2020/testing/src/testing.mjs} +0 -0
  46. package/esm2020/testing/testing.mjs +5 -0
  47. package/fesm2015/{animations.js → animations.mjs} +52 -40
  48. package/fesm2015/animations.mjs.map +1 -0
  49. package/fesm2015/platform-browser.mjs +2152 -0
  50. package/fesm2015/platform-browser.mjs.map +1 -0
  51. package/fesm2015/{testing.js → testing.mjs} +23 -15
  52. package/fesm2015/testing.mjs.map +1 -0
  53. package/fesm2020/animations.mjs +524 -0
  54. package/fesm2020/animations.mjs.map +1 -0
  55. package/{fesm2015/platform-browser.js → fesm2020/platform-browser.mjs} +165 -125
  56. package/fesm2020/platform-browser.mjs.map +1 -0
  57. package/fesm2020/testing.mjs +285 -0
  58. package/fesm2020/testing.mjs.map +1 -0
  59. package/package.json +34 -10
  60. package/platform-browser.d.ts +63 -78
  61. package/testing/package.json +5 -5
  62. package/testing/testing.d.ts +6 -4
  63. package/animations/animations.metadata.json +0 -1
  64. package/animations.d.ts +0 -7
  65. package/animations.metadata.json +0 -1
  66. package/bundles/platform-browser-animations.umd.js +0 -873
  67. package/bundles/platform-browser-animations.umd.js.map +0 -1
  68. package/bundles/platform-browser-testing.umd.js +0 -684
  69. package/bundles/platform-browser-testing.umd.js.map +0 -1
  70. package/bundles/platform-browser.umd.js +0 -2504
  71. package/bundles/platform-browser.umd.js.map +0 -1
  72. package/esm2015/animations/animations.externs.js +0 -6
  73. package/esm2015/animations/animations.js +0 -7
  74. package/esm2015/animations/src/animation_builder.js +0 -105
  75. package/esm2015/animations/src/animation_renderer.js +0 -249
  76. package/esm2015/animations/src/module.js +0 -59
  77. package/esm2015/animations/src/providers.js +0 -69
  78. package/esm2015/platform-browser.externs.js +0 -6
  79. package/esm2015/platform-browser.js +0 -16
  80. package/esm2015/src/browser/meta.js +0 -180
  81. package/esm2015/src/browser/server-transition.js +0 -35
  82. package/esm2015/src/browser/title.js +0 -52
  83. package/esm2015/src/browser/transfer_state.js +0 -151
  84. package/esm2015/src/browser/xhr.js +0 -20
  85. package/esm2015/src/browser.js +0 -125
  86. package/esm2015/src/dom/debug/ng_probe.js +0 -56
  87. package/esm2015/src/dom/dom_renderer.js +0 -306
  88. package/esm2015/src/dom/events/dom_events.js +0 -34
  89. package/esm2015/src/dom/events/event_manager.js +0 -101
  90. package/esm2015/src/dom/events/hammer_gestures.js +0 -252
  91. package/esm2015/src/dom/events/key_events.js +0 -203
  92. package/esm2015/src/dom/shared_styles_host.js +0 -78
  93. package/esm2015/testing/src/browser.js +0 -41
  94. package/esm2015/testing/testing.externs.js +0 -6
  95. package/esm2015/testing/testing.js +0 -6
  96. package/fesm2015/animations.js.map +0 -1
  97. package/fesm2015/platform-browser.js.map +0 -1
  98. package/fesm2015/testing.js.map +0 -1
  99. package/platform-browser.metadata.json +0 -1
  100. package/testing/testing.metadata.json +0 -1
  101. package/testing.d.ts +0 -7
  102. package/testing.metadata.json +0 -1
@@ -1,684 +0,0 @@
1
- /**
2
- * @license Angular v13.0.0-next.0
3
- * (c) 2010-2021 Google LLC. https://angular.io/
4
- * License: MIT
5
- */
6
-
7
- (function (global, factory) {
8
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@angular/common')) :
9
- typeof define === 'function' && define.amd ? define('@angular/platform-browser/testing', ['exports', '@angular/core', '@angular/platform-browser', '@angular/common'], factory) :
10
- (global = global || self, factory((global.ng = global.ng || {}, global.ng.platformBrowser = global.ng.platformBrowser || {}, global.ng.platformBrowser.testing = {}), global.ng.core, global.ng.platformBrowser, global.ng.common));
11
- }(this, (function (exports, core, platformBrowser, common) { 'use strict';
12
-
13
- /*! *****************************************************************************
14
- Copyright (c) Microsoft Corporation.
15
-
16
- Permission to use, copy, modify, and/or distribute this software for any
17
- purpose with or without fee is hereby granted.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
20
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
21
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
22
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
23
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25
- PERFORMANCE OF THIS SOFTWARE.
26
- ***************************************************************************** */
27
- /* global Reflect, Promise */
28
- var extendStatics = function (d, b) {
29
- extendStatics = Object.setPrototypeOf ||
30
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31
- function (d, b) { for (var p in b)
32
- if (Object.prototype.hasOwnProperty.call(b, p))
33
- d[p] = b[p]; };
34
- return extendStatics(d, b);
35
- };
36
- function __extends(d, b) {
37
- if (typeof b !== "function" && b !== null)
38
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
39
- extendStatics(d, b);
40
- function __() { this.constructor = d; }
41
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42
- }
43
- var __assign = function () {
44
- __assign = Object.assign || function __assign(t) {
45
- for (var s, i = 1, n = arguments.length; i < n; i++) {
46
- s = arguments[i];
47
- for (var p in s)
48
- if (Object.prototype.hasOwnProperty.call(s, p))
49
- t[p] = s[p];
50
- }
51
- return t;
52
- };
53
- return __assign.apply(this, arguments);
54
- };
55
- function __rest(s, e) {
56
- var t = {};
57
- for (var p in s)
58
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
59
- t[p] = s[p];
60
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
61
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
62
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
63
- t[p[i]] = s[p[i]];
64
- }
65
- return t;
66
- }
67
- function __decorate(decorators, target, key, desc) {
68
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
69
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
70
- r = Reflect.decorate(decorators, target, key, desc);
71
- else
72
- for (var i = decorators.length - 1; i >= 0; i--)
73
- if (d = decorators[i])
74
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
75
- return c > 3 && r && Object.defineProperty(target, key, r), r;
76
- }
77
- function __param(paramIndex, decorator) {
78
- return function (target, key) { decorator(target, key, paramIndex); };
79
- }
80
- function __metadata(metadataKey, metadataValue) {
81
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
82
- return Reflect.metadata(metadataKey, metadataValue);
83
- }
84
- function __awaiter(thisArg, _arguments, P, generator) {
85
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
86
- return new (P || (P = Promise))(function (resolve, reject) {
87
- function fulfilled(value) { try {
88
- step(generator.next(value));
89
- }
90
- catch (e) {
91
- reject(e);
92
- } }
93
- function rejected(value) { try {
94
- step(generator["throw"](value));
95
- }
96
- catch (e) {
97
- reject(e);
98
- } }
99
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
100
- step((generator = generator.apply(thisArg, _arguments || [])).next());
101
- });
102
- }
103
- function __generator(thisArg, body) {
104
- var _ = { label: 0, sent: function () { if (t[0] & 1)
105
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
106
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
107
- function verb(n) { return function (v) { return step([n, v]); }; }
108
- function step(op) {
109
- if (f)
110
- throw new TypeError("Generator is already executing.");
111
- while (_)
112
- try {
113
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
114
- return t;
115
- if (y = 0, t)
116
- op = [op[0] & 2, t.value];
117
- switch (op[0]) {
118
- case 0:
119
- case 1:
120
- t = op;
121
- break;
122
- case 4:
123
- _.label++;
124
- return { value: op[1], done: false };
125
- case 5:
126
- _.label++;
127
- y = op[1];
128
- op = [0];
129
- continue;
130
- case 7:
131
- op = _.ops.pop();
132
- _.trys.pop();
133
- continue;
134
- default:
135
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
136
- _ = 0;
137
- continue;
138
- }
139
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
140
- _.label = op[1];
141
- break;
142
- }
143
- if (op[0] === 6 && _.label < t[1]) {
144
- _.label = t[1];
145
- t = op;
146
- break;
147
- }
148
- if (t && _.label < t[2]) {
149
- _.label = t[2];
150
- _.ops.push(op);
151
- break;
152
- }
153
- if (t[2])
154
- _.ops.pop();
155
- _.trys.pop();
156
- continue;
157
- }
158
- op = body.call(thisArg, _);
159
- }
160
- catch (e) {
161
- op = [6, e];
162
- y = 0;
163
- }
164
- finally {
165
- f = t = 0;
166
- }
167
- if (op[0] & 5)
168
- throw op[1];
169
- return { value: op[0] ? op[1] : void 0, done: true };
170
- }
171
- }
172
- var __createBinding = Object.create ? (function (o, m, k, k2) {
173
- if (k2 === undefined)
174
- k2 = k;
175
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
176
- }) : (function (o, m, k, k2) {
177
- if (k2 === undefined)
178
- k2 = k;
179
- o[k2] = m[k];
180
- });
181
- function __exportStar(m, o) {
182
- for (var p in m)
183
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
184
- __createBinding(o, m, p);
185
- }
186
- function __values(o) {
187
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
188
- if (m)
189
- return m.call(o);
190
- if (o && typeof o.length === "number")
191
- return {
192
- next: function () {
193
- if (o && i >= o.length)
194
- o = void 0;
195
- return { value: o && o[i++], done: !o };
196
- }
197
- };
198
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
199
- }
200
- function __read(o, n) {
201
- var m = typeof Symbol === "function" && o[Symbol.iterator];
202
- if (!m)
203
- return o;
204
- var i = m.call(o), r, ar = [], e;
205
- try {
206
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
207
- ar.push(r.value);
208
- }
209
- catch (error) {
210
- e = { error: error };
211
- }
212
- finally {
213
- try {
214
- if (r && !r.done && (m = i["return"]))
215
- m.call(i);
216
- }
217
- finally {
218
- if (e)
219
- throw e.error;
220
- }
221
- }
222
- return ar;
223
- }
224
- /** @deprecated */
225
- function __spread() {
226
- for (var ar = [], i = 0; i < arguments.length; i++)
227
- ar = ar.concat(__read(arguments[i]));
228
- return ar;
229
- }
230
- /** @deprecated */
231
- function __spreadArrays() {
232
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
233
- s += arguments[i].length;
234
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
235
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
236
- r[k] = a[j];
237
- return r;
238
- }
239
- function __spreadArray(to, from, pack) {
240
- if (pack || arguments.length === 2)
241
- for (var i = 0, l = from.length, ar; i < l; i++) {
242
- if (ar || !(i in from)) {
243
- if (!ar)
244
- ar = Array.prototype.slice.call(from, 0, i);
245
- ar[i] = from[i];
246
- }
247
- }
248
- return to.concat(ar || from);
249
- }
250
- function __await(v) {
251
- return this instanceof __await ? (this.v = v, this) : new __await(v);
252
- }
253
- function __asyncGenerator(thisArg, _arguments, generator) {
254
- if (!Symbol.asyncIterator)
255
- throw new TypeError("Symbol.asyncIterator is not defined.");
256
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
257
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
258
- function verb(n) { if (g[n])
259
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
260
- function resume(n, v) { try {
261
- step(g[n](v));
262
- }
263
- catch (e) {
264
- settle(q[0][3], e);
265
- } }
266
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
267
- function fulfill(value) { resume("next", value); }
268
- function reject(value) { resume("throw", value); }
269
- function settle(f, v) { if (f(v), q.shift(), q.length)
270
- resume(q[0][0], q[0][1]); }
271
- }
272
- function __asyncDelegator(o) {
273
- var i, p;
274
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
275
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
276
- }
277
- function __asyncValues(o) {
278
- if (!Symbol.asyncIterator)
279
- throw new TypeError("Symbol.asyncIterator is not defined.");
280
- var m = o[Symbol.asyncIterator], i;
281
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
282
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
283
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
284
- }
285
- function __makeTemplateObject(cooked, raw) {
286
- if (Object.defineProperty) {
287
- Object.defineProperty(cooked, "raw", { value: raw });
288
- }
289
- else {
290
- cooked.raw = raw;
291
- }
292
- return cooked;
293
- }
294
- ;
295
- var __setModuleDefault = Object.create ? (function (o, v) {
296
- Object.defineProperty(o, "default", { enumerable: true, value: v });
297
- }) : function (o, v) {
298
- o["default"] = v;
299
- };
300
- function __importStar(mod) {
301
- if (mod && mod.__esModule)
302
- return mod;
303
- var result = {};
304
- if (mod != null)
305
- for (var k in mod)
306
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
307
- __createBinding(result, mod, k);
308
- __setModuleDefault(result, mod);
309
- return result;
310
- }
311
- function __importDefault(mod) {
312
- return (mod && mod.__esModule) ? mod : { default: mod };
313
- }
314
- function __classPrivateFieldGet(receiver, state, kind, f) {
315
- if (kind === "a" && !f)
316
- throw new TypeError("Private accessor was defined without a getter");
317
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
318
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
319
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
320
- }
321
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
322
- if (kind === "m")
323
- throw new TypeError("Private method is not writable");
324
- if (kind === "a" && !f)
325
- throw new TypeError("Private accessor was defined without a setter");
326
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
327
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
328
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
329
- }
330
-
331
- var BrowserDetection = /** @class */ (function () {
332
- function BrowserDetection(ua) {
333
- this._overrideUa = ua;
334
- }
335
- Object.defineProperty(BrowserDetection.prototype, "_ua", {
336
- get: function () {
337
- if (typeof this._overrideUa === 'string') {
338
- return this._overrideUa;
339
- }
340
- return common.ɵgetDOM() ? common.ɵgetDOM().getUserAgent() : '';
341
- },
342
- enumerable: false,
343
- configurable: true
344
- });
345
- BrowserDetection.setup = function () {
346
- return new BrowserDetection(null);
347
- };
348
- Object.defineProperty(BrowserDetection.prototype, "isFirefox", {
349
- get: function () {
350
- return this._ua.indexOf('Firefox') > -1;
351
- },
352
- enumerable: false,
353
- configurable: true
354
- });
355
- Object.defineProperty(BrowserDetection.prototype, "isAndroid", {
356
- get: function () {
357
- return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&
358
- this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1 &&
359
- this._ua.indexOf('IEMobile') == -1;
360
- },
361
- enumerable: false,
362
- configurable: true
363
- });
364
- Object.defineProperty(BrowserDetection.prototype, "isEdge", {
365
- get: function () {
366
- return this._ua.indexOf('Edge') > -1;
367
- },
368
- enumerable: false,
369
- configurable: true
370
- });
371
- Object.defineProperty(BrowserDetection.prototype, "isIE", {
372
- get: function () {
373
- return this._ua.indexOf('Trident') > -1;
374
- },
375
- enumerable: false,
376
- configurable: true
377
- });
378
- Object.defineProperty(BrowserDetection.prototype, "isWebkit", {
379
- get: function () {
380
- return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1 &&
381
- this._ua.indexOf('IEMobile') == -1;
382
- },
383
- enumerable: false,
384
- configurable: true
385
- });
386
- Object.defineProperty(BrowserDetection.prototype, "isIOS7", {
387
- get: function () {
388
- return (this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1) &&
389
- this._ua.indexOf('IEMobile') == -1;
390
- },
391
- enumerable: false,
392
- configurable: true
393
- });
394
- Object.defineProperty(BrowserDetection.prototype, "isSlow", {
395
- get: function () {
396
- return this.isAndroid || this.isIE || this.isIOS7;
397
- },
398
- enumerable: false,
399
- configurable: true
400
- });
401
- Object.defineProperty(BrowserDetection.prototype, "isChromeDesktop", {
402
- get: function () {
403
- return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Mobile Safari') == -1 &&
404
- this._ua.indexOf('Edge') == -1;
405
- },
406
- enumerable: false,
407
- configurable: true
408
- });
409
- Object.defineProperty(BrowserDetection.prototype, "isOldChrome", {
410
- // "Old Chrome" means Chrome 3X, where there are some discrepancies in the Intl API.
411
- // Android 4.4 and 5.X have such browsers by default (respectively 30 and 39).
412
- get: function () {
413
- return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Chrome/3') > -1 &&
414
- this._ua.indexOf('Edge') == -1;
415
- },
416
- enumerable: false,
417
- configurable: true
418
- });
419
- Object.defineProperty(BrowserDetection.prototype, "supportsCustomElements", {
420
- get: function () {
421
- return (typeof core.ɵglobal.customElements !== 'undefined');
422
- },
423
- enumerable: false,
424
- configurable: true
425
- });
426
- Object.defineProperty(BrowserDetection.prototype, "supportsDeprecatedCustomCustomElementsV0", {
427
- get: function () {
428
- return (typeof document.registerElement !== 'undefined');
429
- },
430
- enumerable: false,
431
- configurable: true
432
- });
433
- Object.defineProperty(BrowserDetection.prototype, "supportsRegExUnicodeFlag", {
434
- get: function () {
435
- return RegExp.prototype.hasOwnProperty('unicode');
436
- },
437
- enumerable: false,
438
- configurable: true
439
- });
440
- Object.defineProperty(BrowserDetection.prototype, "supportsShadowDom", {
441
- get: function () {
442
- var testEl = document.createElement('div');
443
- return (typeof testEl.attachShadow !== 'undefined');
444
- },
445
- enumerable: false,
446
- configurable: true
447
- });
448
- Object.defineProperty(BrowserDetection.prototype, "supportsDeprecatedShadowDomV0", {
449
- get: function () {
450
- var testEl = document.createElement('div');
451
- return (typeof testEl.createShadowRoot !== 'undefined');
452
- },
453
- enumerable: false,
454
- configurable: true
455
- });
456
- return BrowserDetection;
457
- }());
458
- var browserDetection = BrowserDetection.setup();
459
- function dispatchEvent(element, eventType) {
460
- var evt = common.ɵgetDOM().getDefaultDocument().createEvent('Event');
461
- evt.initEvent(eventType, true, true);
462
- common.ɵgetDOM().dispatchEvent(element, evt);
463
- }
464
- function createMouseEvent(eventType) {
465
- var evt = common.ɵgetDOM().getDefaultDocument().createEvent('MouseEvent');
466
- evt.initEvent(eventType, true, true);
467
- return evt;
468
- }
469
- function el(html) {
470
- return getContent(createTemplate(html)).firstChild;
471
- }
472
- function normalizeCSS(css) {
473
- return css.replace(/\s+/g, ' ')
474
- .replace(/:\s/g, ':')
475
- .replace(/'/g, '"')
476
- .replace(/ }/g, '}')
477
- .replace(/url\((\"|\s)(.+)(\"|\s)\)(\s*)/g, function () {
478
- var match = [];
479
- for (var _i = 0; _i < arguments.length; _i++) {
480
- match[_i] = arguments[_i];
481
- }
482
- return "url(\"" + match[2] + "\")";
483
- })
484
- .replace(/\[(.+)=([^"\]]+)\]/g, function () {
485
- var match = [];
486
- for (var _i = 0; _i < arguments.length; _i++) {
487
- match[_i] = arguments[_i];
488
- }
489
- return "[" + match[1] + "=\"" + match[2] + "\"]";
490
- });
491
- }
492
- function getAttributeMap(element) {
493
- var res = new Map();
494
- var elAttrs = element.attributes;
495
- for (var i = 0; i < elAttrs.length; i++) {
496
- var attrib = elAttrs.item(i);
497
- res.set(attrib.name, attrib.value);
498
- }
499
- return res;
500
- }
501
- var _selfClosingTags = ['br', 'hr', 'input'];
502
- function stringifyElement(el /** TODO #9100 */) {
503
- var e_1, _a;
504
- var result = '';
505
- if (common.ɵgetDOM().isElementNode(el)) {
506
- var tagName = el.tagName.toLowerCase();
507
- // Opening tag
508
- result += "<" + tagName;
509
- // Attributes in an ordered way
510
- var attributeMap = getAttributeMap(el);
511
- var sortedKeys = Array.from(attributeMap.keys()).sort();
512
- try {
513
- for (var sortedKeys_1 = __values(sortedKeys), sortedKeys_1_1 = sortedKeys_1.next(); !sortedKeys_1_1.done; sortedKeys_1_1 = sortedKeys_1.next()) {
514
- var key = sortedKeys_1_1.value;
515
- var lowerCaseKey = key.toLowerCase();
516
- var attValue = attributeMap.get(key);
517
- if (typeof attValue !== 'string') {
518
- result += " " + lowerCaseKey;
519
- }
520
- else {
521
- // Browsers order style rules differently. Order them alphabetically for consistency.
522
- if (lowerCaseKey === 'style') {
523
- attValue = attValue.split(/; ?/).filter(function (s) { return !!s; }).sort().map(function (s) { return s + ";"; }).join(' ');
524
- }
525
- result += " " + lowerCaseKey + "=\"" + attValue + "\"";
526
- }
527
- }
528
- }
529
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
530
- finally {
531
- try {
532
- if (sortedKeys_1_1 && !sortedKeys_1_1.done && (_a = sortedKeys_1.return)) _a.call(sortedKeys_1);
533
- }
534
- finally { if (e_1) throw e_1.error; }
535
- }
536
- result += '>';
537
- // Children
538
- var childrenRoot = templateAwareRoot(el);
539
- var children = childrenRoot ? childrenRoot.childNodes : [];
540
- for (var j = 0; j < children.length; j++) {
541
- result += stringifyElement(children[j]);
542
- }
543
- // Closing tag
544
- if (_selfClosingTags.indexOf(tagName) == -1) {
545
- result += "</" + tagName + ">";
546
- }
547
- }
548
- else if (isCommentNode(el)) {
549
- result += "<!--" + el.nodeValue + "-->";
550
- }
551
- else {
552
- result += el.textContent;
553
- }
554
- return result;
555
- }
556
- function createNgZone() {
557
- return new core.NgZone({ enableLongStackTrace: true, shouldCoalesceEventChangeDetection: false });
558
- }
559
- function isCommentNode(node) {
560
- return node.nodeType === Node.COMMENT_NODE;
561
- }
562
- function isTextNode(node) {
563
- return node.nodeType === Node.TEXT_NODE;
564
- }
565
- function getContent(node) {
566
- if ('content' in node) {
567
- return node.content;
568
- }
569
- else {
570
- return node;
571
- }
572
- }
573
- function templateAwareRoot(el) {
574
- return common.ɵgetDOM().isElementNode(el) && el.nodeName === 'TEMPLATE' ? getContent(el) : el;
575
- }
576
- function setCookie(name, value) {
577
- // document.cookie is magical, assigning into it assigns/overrides one cookie value, but does
578
- // not clear other cookies.
579
- document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);
580
- }
581
- function supportsWebAnimation() {
582
- return typeof Element.prototype['animate'] === 'function';
583
- }
584
- function hasStyle(element, styleName, styleValue) {
585
- var value = element.style[styleName] || '';
586
- return styleValue ? value == styleValue : value.length > 0;
587
- }
588
- function hasClass(element, className) {
589
- return element.classList.contains(className);
590
- }
591
- function sortedClassList(element) {
592
- return Array.prototype.slice.call(element.classList, 0).sort();
593
- }
594
- function createTemplate(html) {
595
- var t = common.ɵgetDOM().getDefaultDocument().createElement('template');
596
- t.innerHTML = html;
597
- return t;
598
- }
599
- function childNodesAsList(el) {
600
- var childNodes = el.childNodes;
601
- var res = [];
602
- for (var i = 0; i < childNodes.length; i++) {
603
- res[i] = childNodes[i];
604
- }
605
- return res;
606
- }
607
-
608
- /**
609
- * @license
610
- * Copyright Google LLC All Rights Reserved.
611
- *
612
- * Use of this source code is governed by an MIT-style license that can be
613
- * found in the LICENSE file at https://angular.io/license
614
- */
615
- function initBrowserTests() {
616
- platformBrowser.ɵBrowserDomAdapter.makeCurrent();
617
- BrowserDetection.setup();
618
- }
619
- var _TEST_BROWSER_PLATFORM_PROVIDERS = [{ provide: core.PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true }];
620
- /**
621
- * Platform for testing
622
- *
623
- * @publicApi
624
- */
625
- var platformBrowserTesting = core.createPlatformFactory(core.platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);
626
- var ɵ0 = createNgZone;
627
- /**
628
- * NgModule for testing.
629
- *
630
- * @publicApi
631
- */
632
- var BrowserTestingModule = /** @class */ (function () {
633
- function BrowserTestingModule() {
634
- }
635
- return BrowserTestingModule;
636
- }());
637
- BrowserTestingModule.decorators = [
638
- { type: core.NgModule, args: [{
639
- exports: [platformBrowser.BrowserModule],
640
- providers: [
641
- { provide: core.APP_ID, useValue: 'a' },
642
- platformBrowser.ɵELEMENT_PROBE_PROVIDERS,
643
- { provide: core.NgZone, useFactory: ɵ0 },
644
- ]
645
- },] }
646
- ];
647
-
648
- /**
649
- * @license
650
- * Copyright Google LLC All Rights Reserved.
651
- *
652
- * Use of this source code is governed by an MIT-style license that can be
653
- * found in the LICENSE file at https://angular.io/license
654
- */
655
-
656
- /**
657
- * @license
658
- * Copyright Google LLC All Rights Reserved.
659
- *
660
- * Use of this source code is governed by an MIT-style license that can be
661
- * found in the LICENSE file at https://angular.io/license
662
- */
663
-
664
- /**
665
- * @license
666
- * Copyright Google LLC All Rights Reserved.
667
- *
668
- * Use of this source code is governed by an MIT-style license that can be
669
- * found in the LICENSE file at https://angular.io/license
670
- */
671
-
672
- /**
673
- * Generated bundle index. Do not edit.
674
- */
675
-
676
- exports.BrowserTestingModule = BrowserTestingModule;
677
- exports.platformBrowserTesting = platformBrowserTesting;
678
- exports.ɵ0 = ɵ0;
679
- exports.ɵangular_packages_platform_browser_testing_testing_a = createNgZone;
680
-
681
- Object.defineProperty(exports, '__esModule', { value: true });
682
-
683
- })));
684
- //# sourceMappingURL=platform-browser-testing.umd.js.map