@angular/cdk 9.1.1 → 9.2.0
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/a11y/focus-monitor/focus-monitor.d.ts +36 -2
- package/a11y/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +241 -19
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +25 -10
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-clipboard.umd.js +1 -1
- package/bundles/cdk-clipboard.umd.js.map +1 -1
- package/bundles/cdk-clipboard.umd.min.js +1 -1
- package/bundles/cdk-clipboard.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +0 -1
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +203 -6
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +17 -10
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +217 -23
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +25 -10
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +210 -12
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +27 -12
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +11 -0
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +6 -6
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +211 -14
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +19 -4
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +242 -14
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +14 -6
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +278 -50
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +29 -7
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +254 -49
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js +16 -9
- package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +257 -54
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +23 -8
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk-testing.umd.js +243 -46
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.min.js +20 -5
- package/bundles/cdk-testing.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +21 -6
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +3 -3
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +212 -15
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +17 -3
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/coercion/array.d.ts +1 -0
- package/esm2015/a11y/focus-monitor/focus-monitor.js +93 -12
- package/esm2015/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
- package/esm2015/a11y/focus-trap/focus-trap.js +1 -1
- package/esm2015/a11y/live-announcer/live-announcer.js +1 -1
- package/esm2015/a11y/public-api.js +2 -2
- package/esm2015/bidi/directionality.js +1 -1
- package/esm2015/clipboard/pending-copy.js +3 -3
- package/esm2015/coercion/array.js +1 -2
- package/esm2015/drag-drop/drag-drop.js +1 -1
- package/esm2015/drag-drop/drag-ref.js +7 -5
- package/esm2015/drag-drop/drop-list-ref.js +11 -19
- package/esm2015/layout/breakpoints-observer.js +1 -1
- package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -2
- package/esm2015/overlay/position/overlay-position-builder.js +1 -1
- package/esm2015/platform/features/shadow-dom.js +16 -1
- package/esm2015/platform/public-api.js +2 -2
- package/esm2015/scrolling/scroll-dispatcher.js +38 -5
- package/esm2015/scrolling/viewport-ruler.js +44 -5
- package/esm2015/table/cell.js +18 -8
- package/esm2015/table/public-api.js +3 -2
- package/esm2015/table/row.js +24 -8
- package/esm2015/table/table.js +26 -12
- package/esm2015/table/text-column.js +3 -26
- package/esm2015/table/tokens.js +44 -0
- package/esm2015/testing/protractor/protractor-element.js +4 -2
- package/esm2015/testing/protractor/protractor-harness-environment.js +13 -8
- package/esm2015/testing/testbed/testbed-harness-environment.js +16 -10
- package/esm2015/text-field/autosize.js +38 -4
- package/esm2015/version.js +1 -1
- package/esm5/a11y/focus-monitor/focus-monitor.js +39 -13
- package/esm5/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
- package/esm5/a11y/focus-trap/focus-trap.js +1 -1
- package/esm5/a11y/live-announcer/live-announcer.js +1 -1
- package/esm5/bidi/directionality.js +1 -1
- package/esm5/clipboard/pending-copy.js +2 -2
- package/esm5/coercion/array.js +1 -2
- package/esm5/drag-drop/drag-drop.js +1 -1
- package/esm5/drag-drop/drag-ref.js +7 -5
- package/esm5/drag-drop/drop-list-ref.js +9 -14
- package/esm5/layout/breakpoints-observer.js +1 -1
- package/esm5/overlay/position/flexible-connected-position-strategy.js +3 -2
- package/esm5/overlay/position/overlay-position-builder.js +1 -1
- package/esm5/platform/features/shadow-dom.js +11 -1
- package/esm5/scrolling/scroll-dispatcher.js +21 -5
- package/esm5/scrolling/viewport-ruler.js +24 -5
- package/esm5/table/cell.js +13 -8
- package/esm5/table/public-api.js +2 -1
- package/esm5/table/row.js +21 -11
- package/esm5/table/table.js +16 -11
- package/esm5/table/text-column.js +3 -4
- package/esm5/table/tokens.js +16 -0
- package/esm5/testing/protractor/protractor-element.js +4 -2
- package/esm5/testing/protractor/protractor-harness-environment.js +17 -11
- package/esm5/testing/testbed/testbed-harness-environment.js +17 -11
- package/esm5/text-field/autosize.js +20 -4
- package/esm5/version.js +1 -1
- package/fesm2015/a11y.js +89 -11
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/clipboard.js +2 -2
- package/fesm2015/clipboard.js.map +1 -1
- package/fesm2015/coercion.js +0 -1
- package/fesm2015/coercion.js.map +1 -1
- package/fesm2015/drag-drop.js +16 -22
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/overlay.js +2 -1
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/platform.js +16 -1
- package/fesm2015/platform.js.map +1 -1
- package/fesm2015/scrolling.js +76 -7
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/table.js +98 -49
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/testing/protractor.js +16 -9
- package/fesm2015/testing/protractor.js.map +1 -1
- package/fesm2015/testing/testbed.js +15 -9
- package/fesm2015/testing/testbed.js.map +1 -1
- package/fesm2015/text-field.js +37 -3
- package/fesm2015/text-field.js.map +1 -1
- package/fesm5/a11y.js +36 -12
- package/fesm5/a11y.js.map +1 -1
- package/fesm5/cdk.js +1 -1
- package/fesm5/cdk.js.map +1 -1
- package/fesm5/clipboard.js +1 -1
- package/fesm5/clipboard.js.map +1 -1
- package/fesm5/coercion.js +0 -1
- package/fesm5/coercion.js.map +1 -1
- package/fesm5/drag-drop.js +14 -17
- package/fesm5/drag-drop.js.map +1 -1
- package/fesm5/overlay.js +2 -1
- package/fesm5/overlay.js.map +1 -1
- package/fesm5/platform.js +11 -1
- package/fesm5/platform.js.map +1 -1
- package/fesm5/scrolling.js +39 -7
- package/fesm5/scrolling.js.map +1 -1
- package/fesm5/table.js +59 -29
- package/fesm5/table.js.map +1 -1
- package/fesm5/testing/protractor.js +20 -12
- package/fesm5/testing/protractor.js.map +1 -1
- package/fesm5/testing/testbed.js +16 -10
- package/fesm5/testing/testbed.js.map +1 -1
- package/fesm5/text-field.js +19 -3
- package/fesm5/text-field.js.map +1 -1
- package/package.json +1 -1
- package/platform/features/shadow-dom.d.ts +2 -0
- package/platform/index.metadata.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/upgrade-rules/class-names-rule.js +3 -1
- package/schematics/utils/ast/ng-module-imports.js +3 -2
- package/scrolling/index.metadata.json +1 -1
- package/scrolling/scroll-dispatcher.d.ts +9 -1
- package/scrolling/viewport-ruler.d.ts +9 -1
- package/table/cell.d.ts +2 -0
- package/table/index.metadata.json +1 -1
- package/table/public-api.d.ts +1 -0
- package/table/row.d.ts +6 -3
- package/table/table.d.ts +2 -0
- package/table/text-column.d.ts +2 -13
- package/table/tokens.d.ts +25 -0
- package/testing/protractor/protractor-harness-environment.d.ts +10 -3
- package/testing/testbed/testbed-harness-environment.d.ts +12 -4
- package/text-field/autosize.d.ts +9 -1
- package/text-field/index.metadata.json +1 -1
|
@@ -1,8 +1,205 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@angular/cdk/testing', ['exports'
|
|
4
|
-
(global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.testing = {})
|
|
5
|
-
}(this, (function (exports
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@angular/cdk/testing', ['exports'], factory) :
|
|
4
|
+
(global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.testing = {})));
|
|
5
|
+
}(this, (function (exports) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/*! *****************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
10
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
11
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
15
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
16
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
17
|
+
|
|
18
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
19
|
+
and limitations under the License.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
/* global Reflect, Promise */
|
|
22
|
+
|
|
23
|
+
var extendStatics = function(d, b) {
|
|
24
|
+
extendStatics = Object.setPrototypeOf ||
|
|
25
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
27
|
+
return extendStatics(d, b);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function __extends(d, b) {
|
|
31
|
+
extendStatics(d, b);
|
|
32
|
+
function __() { this.constructor = d; }
|
|
33
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var __assign = function() {
|
|
37
|
+
__assign = Object.assign || function __assign(t) {
|
|
38
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39
|
+
s = arguments[i];
|
|
40
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
44
|
+
return __assign.apply(this, arguments);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
function __rest(s, e) {
|
|
48
|
+
var t = {};
|
|
49
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
+
t[p] = s[p];
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
+
t[p[i]] = s[p[i]];
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function __decorate(decorators, target, key, desc) {
|
|
60
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
61
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
62
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
63
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function __param(paramIndex, decorator) {
|
|
67
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function __metadata(metadataKey, metadataValue) {
|
|
71
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
75
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
76
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
77
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
78
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
79
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function __generator(thisArg, body) {
|
|
84
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
85
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
86
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
87
|
+
function step(op) {
|
|
88
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
89
|
+
while (_) try {
|
|
90
|
+
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) return t;
|
|
91
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
92
|
+
switch (op[0]) {
|
|
93
|
+
case 0: case 1: t = op; break;
|
|
94
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
95
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
96
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
97
|
+
default:
|
|
98
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
99
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
100
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
101
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
102
|
+
if (t[2]) _.ops.pop();
|
|
103
|
+
_.trys.pop(); continue;
|
|
104
|
+
}
|
|
105
|
+
op = body.call(thisArg, _);
|
|
106
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
107
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function __exportStar(m, exports) {
|
|
112
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function __values(o) {
|
|
116
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
117
|
+
if (m) return m.call(o);
|
|
118
|
+
return {
|
|
119
|
+
next: function () {
|
|
120
|
+
if (o && i >= o.length) o = void 0;
|
|
121
|
+
return { value: o && o[i++], done: !o };
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function __read(o, n) {
|
|
127
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
128
|
+
if (!m) return o;
|
|
129
|
+
var i = m.call(o), r, ar = [], e;
|
|
130
|
+
try {
|
|
131
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
132
|
+
}
|
|
133
|
+
catch (error) { e = { error: error }; }
|
|
134
|
+
finally {
|
|
135
|
+
try {
|
|
136
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
137
|
+
}
|
|
138
|
+
finally { if (e) throw e.error; }
|
|
139
|
+
}
|
|
140
|
+
return ar;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function __spread() {
|
|
144
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
145
|
+
ar = ar.concat(__read(arguments[i]));
|
|
146
|
+
return ar;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function __spreadArrays() {
|
|
150
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
151
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
152
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
153
|
+
r[k] = a[j];
|
|
154
|
+
return r;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
function __await(v) {
|
|
158
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
162
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
163
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
164
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
165
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
166
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
167
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
168
|
+
function fulfill(value) { resume("next", value); }
|
|
169
|
+
function reject(value) { resume("throw", value); }
|
|
170
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function __asyncDelegator(o) {
|
|
174
|
+
var i, p;
|
|
175
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
176
|
+
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; }
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function __asyncValues(o) {
|
|
180
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
181
|
+
var m = o[Symbol.asyncIterator], i;
|
|
182
|
+
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);
|
|
183
|
+
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); }); }; }
|
|
184
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function __makeTemplateObject(cooked, raw) {
|
|
188
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
189
|
+
return cooked;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
function __importStar(mod) {
|
|
193
|
+
if (mod && mod.__esModule) return mod;
|
|
194
|
+
var result = {};
|
|
195
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
196
|
+
result.default = mod;
|
|
197
|
+
return result;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function __importDefault(mod) {
|
|
201
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
202
|
+
}
|
|
6
203
|
|
|
7
204
|
/**
|
|
8
205
|
* @license
|
|
@@ -22,8 +219,8 @@
|
|
|
22
219
|
}
|
|
23
220
|
/** Gets a `Promise` for the `TestElement` representing the host element of the component. */
|
|
24
221
|
ComponentHarness.prototype.host = function () {
|
|
25
|
-
return
|
|
26
|
-
return
|
|
222
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
223
|
+
return __generator(this, function (_a) {
|
|
27
224
|
return [2 /*return*/, this.locatorFactory.rootElement];
|
|
28
225
|
});
|
|
29
226
|
});
|
|
@@ -63,7 +260,7 @@
|
|
|
63
260
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
64
261
|
queries[_i] = arguments[_i];
|
|
65
262
|
}
|
|
66
|
-
return (_a = this.locatorFactory).locatorFor.apply(_a,
|
|
263
|
+
return (_a = this.locatorFactory).locatorFor.apply(_a, __spread(queries));
|
|
67
264
|
};
|
|
68
265
|
/**
|
|
69
266
|
* Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance
|
|
@@ -92,7 +289,7 @@
|
|
|
92
289
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
93
290
|
queries[_i] = arguments[_i];
|
|
94
291
|
}
|
|
95
|
-
return (_a = this.locatorFactory).locatorForOptional.apply(_a,
|
|
292
|
+
return (_a = this.locatorFactory).locatorForOptional.apply(_a, __spread(queries));
|
|
96
293
|
};
|
|
97
294
|
/**
|
|
98
295
|
* Creates an asynchronous locator function that can be used to find `ComponentHarness` instances
|
|
@@ -136,7 +333,7 @@
|
|
|
136
333
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
137
334
|
queries[_i] = arguments[_i];
|
|
138
335
|
}
|
|
139
|
-
return (_a = this.locatorFactory).locatorForAll.apply(_a,
|
|
336
|
+
return (_a = this.locatorFactory).locatorForAll.apply(_a, __spread(queries));
|
|
140
337
|
};
|
|
141
338
|
/**
|
|
142
339
|
* Flushes change detection and async tasks in the Angular zone.
|
|
@@ -144,8 +341,8 @@
|
|
|
144
341
|
* cases where it is needed to fully flush animation events.
|
|
145
342
|
*/
|
|
146
343
|
ComponentHarness.prototype.forceStabilize = function () {
|
|
147
|
-
return
|
|
148
|
-
return
|
|
344
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
345
|
+
return __generator(this, function (_a) {
|
|
149
346
|
return [2 /*return*/, this.locatorFactory.forceStabilize()];
|
|
150
347
|
});
|
|
151
348
|
});
|
|
@@ -155,8 +352,8 @@
|
|
|
155
352
|
* authors to wait for async tasks outside of the Angular zone.
|
|
156
353
|
*/
|
|
157
354
|
ComponentHarness.prototype.waitForTasksOutsideAngular = function () {
|
|
158
|
-
return
|
|
159
|
-
return
|
|
355
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
356
|
+
return __generator(this, function (_a) {
|
|
160
357
|
return [2 /*return*/, this.locatorFactory.waitForTasksOutsideAngular()];
|
|
161
358
|
});
|
|
162
359
|
});
|
|
@@ -184,8 +381,8 @@
|
|
|
184
381
|
* @return Whether the value matches the pattern.
|
|
185
382
|
*/
|
|
186
383
|
HarnessPredicate.stringMatches = function (value, pattern) {
|
|
187
|
-
return
|
|
188
|
-
return
|
|
384
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
385
|
+
return __generator(this, function (_a) {
|
|
189
386
|
switch (_a.label) {
|
|
190
387
|
case 0: return [4 /*yield*/, value];
|
|
191
388
|
case 1:
|
|
@@ -232,10 +429,10 @@
|
|
|
232
429
|
* @return A list of harnesses that satisfy this predicate.
|
|
233
430
|
*/
|
|
234
431
|
HarnessPredicate.prototype.filter = function (harnesses) {
|
|
235
|
-
return
|
|
432
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
236
433
|
var results;
|
|
237
434
|
var _this = this;
|
|
238
|
-
return
|
|
435
|
+
return __generator(this, function (_a) {
|
|
239
436
|
switch (_a.label) {
|
|
240
437
|
case 0: return [4 /*yield*/, Promise.all(harnesses.map(function (h) { return _this.evaluate(h); }))];
|
|
241
438
|
case 1:
|
|
@@ -252,9 +449,9 @@
|
|
|
252
449
|
* and resolves to false otherwise.
|
|
253
450
|
*/
|
|
254
451
|
HarnessPredicate.prototype.evaluate = function (harness) {
|
|
255
|
-
return
|
|
452
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
256
453
|
var results;
|
|
257
|
-
return
|
|
454
|
+
return __generator(this, function (_a) {
|
|
258
455
|
switch (_a.label) {
|
|
259
456
|
case 0: return [4 /*yield*/, Promise.all(this._predicates.map(function (p) { return p(harness); }))];
|
|
260
457
|
case 1:
|
|
@@ -284,8 +481,8 @@
|
|
|
284
481
|
}
|
|
285
482
|
var selector = options.selector;
|
|
286
483
|
if (selector !== undefined) {
|
|
287
|
-
this.add("host matches selector \"" + selector + "\"", function (item) { return
|
|
288
|
-
return
|
|
484
|
+
this.add("host matches selector \"" + selector + "\"", function (item) { return __awaiter(_this, void 0, void 0, function () {
|
|
485
|
+
return __generator(this, function (_a) {
|
|
289
486
|
switch (_a.label) {
|
|
290
487
|
case 0: return [4 /*yield*/, item.host()];
|
|
291
488
|
case 1: return [2 /*return*/, (_a.sent()).matchesSelector(selector)];
|
|
@@ -355,7 +552,7 @@
|
|
|
355
552
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
356
553
|
queries[_i] = arguments[_i];
|
|
357
554
|
}
|
|
358
|
-
return function () { return
|
|
555
|
+
return function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
359
556
|
switch (_a.label) {
|
|
360
557
|
case 0: return [4 /*yield*/, this._getAllHarnessesAndTestElements(queries)];
|
|
361
558
|
case 1: return [2 /*return*/, (_a.sent())[0] || null];
|
|
@@ -373,9 +570,9 @@
|
|
|
373
570
|
};
|
|
374
571
|
// Implemented as part of the `LocatorFactory` interface.
|
|
375
572
|
HarnessEnvironment.prototype.harnessLoaderFor = function (selector) {
|
|
376
|
-
return
|
|
573
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
377
574
|
var _a;
|
|
378
|
-
return
|
|
575
|
+
return __generator(this, function (_b) {
|
|
379
576
|
switch (_b.label) {
|
|
380
577
|
case 0:
|
|
381
578
|
_a = this.createEnvironment;
|
|
@@ -387,9 +584,9 @@
|
|
|
387
584
|
};
|
|
388
585
|
// Implemented as part of the `LocatorFactory` interface.
|
|
389
586
|
HarnessEnvironment.prototype.harnessLoaderForOptional = function (selector) {
|
|
390
|
-
return
|
|
587
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
391
588
|
var elements;
|
|
392
|
-
return
|
|
589
|
+
return __generator(this, function (_a) {
|
|
393
590
|
switch (_a.label) {
|
|
394
591
|
case 0: return [4 /*yield*/, this.getAllRawElements(selector)];
|
|
395
592
|
case 1:
|
|
@@ -401,10 +598,10 @@
|
|
|
401
598
|
};
|
|
402
599
|
// Implemented as part of the `LocatorFactory` interface.
|
|
403
600
|
HarnessEnvironment.prototype.harnessLoaderForAll = function (selector) {
|
|
404
|
-
return
|
|
601
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
405
602
|
var elements;
|
|
406
603
|
var _this = this;
|
|
407
|
-
return
|
|
604
|
+
return __generator(this, function (_a) {
|
|
408
605
|
switch (_a.label) {
|
|
409
606
|
case 0: return [4 /*yield*/, this.getAllRawElements(selector)];
|
|
410
607
|
case 1:
|
|
@@ -424,9 +621,9 @@
|
|
|
424
621
|
};
|
|
425
622
|
// Implemented as part of the `HarnessLoader` interface.
|
|
426
623
|
HarnessEnvironment.prototype.getChildLoader = function (selector) {
|
|
427
|
-
return
|
|
624
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
428
625
|
var _a;
|
|
429
|
-
return
|
|
626
|
+
return __generator(this, function (_b) {
|
|
430
627
|
switch (_b.label) {
|
|
431
628
|
case 0:
|
|
432
629
|
_a = this.createEnvironment;
|
|
@@ -438,9 +635,9 @@
|
|
|
438
635
|
};
|
|
439
636
|
// Implemented as part of the `HarnessLoader` interface.
|
|
440
637
|
HarnessEnvironment.prototype.getAllChildLoaders = function (selector) {
|
|
441
|
-
return
|
|
638
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
442
639
|
var _this = this;
|
|
443
|
-
return
|
|
640
|
+
return __generator(this, function (_a) {
|
|
444
641
|
switch (_a.label) {
|
|
445
642
|
case 0: return [4 /*yield*/, this.getAllRawElements(selector)];
|
|
446
643
|
case 1: return [2 /*return*/, (_a.sent()).map(function (e) { return _this.createEnvironment(e); })];
|
|
@@ -457,23 +654,23 @@
|
|
|
457
654
|
* list of matched harnesses and test elements.
|
|
458
655
|
*/
|
|
459
656
|
HarnessEnvironment.prototype._getAllHarnessesAndTestElements = function (queries) {
|
|
460
|
-
return
|
|
657
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
461
658
|
var _a, allQueries, harnessQueries, elementQueries, harnessTypes, rawElements, skipSelectorCheck, perElementMatches;
|
|
462
659
|
var _b;
|
|
463
660
|
var _this = this;
|
|
464
|
-
return
|
|
661
|
+
return __generator(this, function (_c) {
|
|
465
662
|
switch (_c.label) {
|
|
466
663
|
case 0:
|
|
467
664
|
_a = _parseQueries(queries), allQueries = _a.allQueries, harnessQueries = _a.harnessQueries, elementQueries = _a.elementQueries, harnessTypes = _a.harnessTypes;
|
|
468
|
-
return [4 /*yield*/, this.getAllRawElements(
|
|
665
|
+
return [4 /*yield*/, this.getAllRawElements(__spread(elementQueries, harnessQueries.map(function (predicate) { return predicate.getSelector(); })).join(','))];
|
|
469
666
|
case 1:
|
|
470
667
|
rawElements = _c.sent();
|
|
471
668
|
skipSelectorCheck = (elementQueries.length === 0 && harnessTypes.size === 1) ||
|
|
472
669
|
harnessQueries.length === 0;
|
|
473
|
-
return [4 /*yield*/, Promise.all(rawElements.map(function (rawElement) { return
|
|
670
|
+
return [4 /*yield*/, Promise.all(rawElements.map(function (rawElement) { return __awaiter(_this, void 0, void 0, function () {
|
|
474
671
|
var testElement, allResultsForElement;
|
|
475
672
|
var _this = this;
|
|
476
|
-
return
|
|
673
|
+
return __generator(this, function (_a) {
|
|
477
674
|
switch (_a.label) {
|
|
478
675
|
case 0:
|
|
479
676
|
testElement = this.createTestElement(rawElement);
|
|
@@ -493,7 +690,7 @@
|
|
|
493
690
|
}); }))];
|
|
494
691
|
case 2:
|
|
495
692
|
perElementMatches = _c.sent();
|
|
496
|
-
return [2 /*return*/, (_b = []).concat.apply(_b,
|
|
693
|
+
return [2 /*return*/, (_b = []).concat.apply(_b, __spread(perElementMatches))];
|
|
497
694
|
}
|
|
498
695
|
});
|
|
499
696
|
});
|
|
@@ -506,9 +703,9 @@
|
|
|
506
703
|
*/
|
|
507
704
|
HarnessEnvironment.prototype._getQueryResultForElement = function (query, rawElement, testElement, skipSelectorCheck) {
|
|
508
705
|
if (skipSelectorCheck === void 0) { skipSelectorCheck = false; }
|
|
509
|
-
return
|
|
706
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
510
707
|
var _a, _b, harness;
|
|
511
|
-
return
|
|
708
|
+
return __generator(this, function (_c) {
|
|
512
709
|
switch (_c.label) {
|
|
513
710
|
case 0:
|
|
514
711
|
if (!(typeof query === 'string')) return [3 /*break*/, 3];
|
|
@@ -549,7 +746,7 @@
|
|
|
549
746
|
var elementQueries = [];
|
|
550
747
|
var harnessTypes = new Set();
|
|
551
748
|
try {
|
|
552
|
-
for (var queries_1 =
|
|
749
|
+
for (var queries_1 = __values(queries), queries_1_1 = queries_1.next(); !queries_1_1.done; queries_1_1 = queries_1.next()) {
|
|
553
750
|
var query = queries_1_1.value;
|
|
554
751
|
if (typeof query === 'string') {
|
|
555
752
|
allQueries.push(query);
|
|
@@ -577,15 +774,15 @@
|
|
|
577
774
|
* instances or multiple instances of the same `ComponentHarness` class.
|
|
578
775
|
*/
|
|
579
776
|
function _removeDuplicateQueryResults(results) {
|
|
580
|
-
return
|
|
777
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
581
778
|
var testElementMatched, matchedHarnessTypes, dedupedMatches, results_1, results_1_1, result;
|
|
582
779
|
var e_2, _a;
|
|
583
|
-
return
|
|
780
|
+
return __generator(this, function (_b) {
|
|
584
781
|
testElementMatched = false;
|
|
585
782
|
matchedHarnessTypes = new Set();
|
|
586
783
|
dedupedMatches = [];
|
|
587
784
|
try {
|
|
588
|
-
for (results_1 =
|
|
785
|
+
for (results_1 = __values(results), results_1_1 = results_1.next(); !results_1_1.done; results_1_1 = results_1.next()) {
|
|
589
786
|
result = results_1_1.value;
|
|
590
787
|
if (!result) {
|
|
591
788
|
continue;
|
|
@@ -615,9 +812,9 @@
|
|
|
615
812
|
}
|
|
616
813
|
/** Verifies that there is at least one result in an array. */
|
|
617
814
|
function _assertResultFound(results, queryDescriptions) {
|
|
618
|
-
return
|
|
815
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
619
816
|
var result;
|
|
620
|
-
return
|
|
817
|
+
return __generator(this, function (_a) {
|
|
621
818
|
switch (_a.label) {
|
|
622
819
|
case 0: return [4 /*yield*/, results];
|
|
623
820
|
case 1:
|