@dbg-riskit/angular-testing 12.3.0 → 9999.9999.9999-rc.12148
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/dbg-riskit-angular-testing.d.ts +1 -0
- package/docs/README.md +1 -11
- package/{esm2015/dbg-riskit-angular-testing.js → esm2020/dbg-riskit-angular-testing.mjs} +0 -0
- package/{esm2015/lib/by.util.js → esm2020/lib/by.util.mjs} +0 -0
- package/esm2020/lib/cached.resource.provider.mjs +17 -0
- package/esm2020/lib/definitions/data.table.definition.mjs +556 -0
- package/esm2020/lib/definitions/download.menu.page.mjs +90 -0
- package/esm2020/lib/definitions/highlighter.directive.page.mjs +36 -0
- package/esm2020/lib/definitions/layout.component.page.mjs +93 -0
- package/{esm2015/lib/definitions/link.definition.js → esm2020/lib/definitions/link.definition.mjs} +0 -0
- package/{esm2015/lib/definitions/link.only.page.js → esm2020/lib/definitions/link.only.page.mjs} +0 -0
- package/{esm2015/lib/definitions/login.menu.page.js → esm2020/lib/definitions/login.menu.page.mjs} +0 -0
- package/{esm2015/lib/definitions/login.page.js → esm2020/lib/definitions/login.page.mjs} +4 -4
- package/{esm2015/lib/definitions/message.def.js → esm2020/lib/definitions/message.def.mjs} +0 -0
- package/esm2020/lib/definitions/message.page.mjs +68 -0
- package/esm2020/lib/definitions/page.base.mjs +64 -0
- package/esm2020/lib/environment.mjs +23 -0
- package/esm2020/lib/events.mjs +60 -0
- package/esm2020/lib/stubs/auth/auth.routing.flow.service.stub.mjs +37 -0
- package/esm2020/lib/stubs/auth/auth.service.stub.mjs +40 -0
- package/esm2020/lib/stubs/auth/well.known.service.stub.mjs +22 -0
- package/esm2020/lib/stubs/http.service.stub.mjs +54 -0
- package/esm2020/lib/stubs/login.menu.stub.component.mjs +19 -0
- package/esm2020/lib/stubs/router/activated.route.stub.mjs +29 -0
- package/esm2020/lib/stubs/router/router.link.stub.mjs +46 -0
- package/{esm2015/lib/stubs/router/router.module.stub.js → esm2020/lib/stubs/router/router.module.stub.mjs} +4 -4
- package/esm2020/lib/stubs/router/router.outlet.stub.component.mjs +16 -0
- package/esm2020/lib/stubs/router/router.stub.mjs +79 -0
- package/esm2020/lib/testing.module.mjs +52 -0
- package/esm2020/lib/utils.mjs +48 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +4 -4
- package/fesm2015/{dbg-riskit-angular-testing.js → dbg-riskit-angular-testing.mjs} +263 -128
- package/fesm2015/dbg-riskit-angular-testing.mjs.map +1 -0
- package/fesm2020/dbg-riskit-angular-testing.mjs +1570 -0
- package/fesm2020/dbg-riskit-angular-testing.mjs.map +1 -0
- package/lib/definitions/data.table.definition.d.ts +3 -0
- package/lib/definitions/download.menu.page.d.ts +3 -0
- package/lib/definitions/highlighter.directive.page.d.ts +3 -0
- package/lib/definitions/layout.component.page.d.ts +5 -2
- package/lib/definitions/message.page.d.ts +3 -0
- package/lib/stubs/auth/auth.routing.flow.service.stub.d.ts +3 -0
- package/lib/stubs/auth/auth.service.stub.d.ts +3 -0
- package/lib/stubs/auth/well.known.service.stub.d.ts +3 -0
- package/lib/stubs/http.service.stub.d.ts +5 -0
- package/lib/stubs/login.menu.stub.component.d.ts +6 -0
- package/lib/stubs/router/activated.route.stub.d.ts +3 -0
- package/lib/stubs/router/router.link.stub.d.ts +5 -2
- package/lib/stubs/router/router.outlet.stub.component.d.ts +5 -0
- package/lib/stubs/router/router.stub.d.ts +3 -0
- package/lib/testing.module.d.ts +15 -0
- package/package.json +32 -20
- package/public_api.d.ts +3 -3
- package/bundles/dbg-riskit-angular-testing.umd.js +0 -2253
- package/bundles/dbg-riskit-angular-testing.umd.js.map +0 -1
- package/dbg-riskit-angular-testing.metadata.json +0 -1
- package/esm2015/lib/cached.resource.provider.js +0 -16
- package/esm2015/lib/definitions/data.table.definition.js +0 -508
- package/esm2015/lib/definitions/download.menu.page.js +0 -81
- package/esm2015/lib/definitions/highlighter.directive.page.js +0 -30
- package/esm2015/lib/definitions/layout.component.page.js +0 -73
- package/esm2015/lib/definitions/message.page.js +0 -54
- package/esm2015/lib/definitions/page.base.js +0 -64
- package/esm2015/lib/environment.js +0 -19
- package/esm2015/lib/events.js +0 -60
- package/esm2015/lib/stubs/auth/auth.routing.flow.service.stub.js +0 -31
- package/esm2015/lib/stubs/auth/auth.service.stub.js +0 -38
- package/esm2015/lib/stubs/auth/well.known.service.stub.js +0 -19
- package/esm2015/lib/stubs/http.service.stub.js +0 -49
- package/esm2015/lib/stubs/login.menu.component.stub.js +0 -16
- package/esm2015/lib/stubs/router/activated.route.stub.js +0 -26
- package/esm2015/lib/stubs/router/router.link.stub.js +0 -45
- package/esm2015/lib/stubs/router/router.outlet.stub.js +0 -12
- package/esm2015/lib/stubs/router/router.stub.js +0 -72
- package/esm2015/lib/testing.module.js +0 -34
- package/esm2015/lib/utils.js +0 -48
- package/fesm2015/dbg-riskit-angular-testing.js.map +0 -1
- package/lib/stubs/login.menu.component.stub.d.ts +0 -3
- package/lib/stubs/router/router.outlet.stub.d.ts +0 -2
|
@@ -1,2253 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@dbg-riskit/angular-polyfill'), require('zone.js/testing'), require('@angular/core/testing'), require('@angular/platform-browser-dynamic/testing'), require('@angular/core'), require('@angular/material/menu'), require('@angular/platform-browser'), require('@dbg-riskit/angular-file'), require('file-saver'), require('@dbg-riskit/angular-view'), require('rxjs'), require('rxjs/operators'), require('@angular/material/card'), require('@angular/material/button'), require('@angular/material/button-toggle'), require('@angular/material/icon'), require('@angular/material/tooltip'), require('@dbg-riskit/common'), require('@dbg-riskit/angular-datatable'), require('@angular/material/sidenav'), require('@angular/material/toolbar'), require('@angular/router'), require('@dbg-riskit/angular-auth'), require('@dbg-riskit/angular-common'), require('@angular/compiler'), require('@angular/platform-browser-dynamic')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@dbg-riskit/angular-testing', ['exports', '@dbg-riskit/angular-polyfill', 'zone.js/testing', '@angular/core/testing', '@angular/platform-browser-dynamic/testing', '@angular/core', '@angular/material/menu', '@angular/platform-browser', '@dbg-riskit/angular-file', 'file-saver', '@dbg-riskit/angular-view', 'rxjs', 'rxjs/operators', '@angular/material/card', '@angular/material/button', '@angular/material/button-toggle', '@angular/material/icon', '@angular/material/tooltip', '@dbg-riskit/common', '@dbg-riskit/angular-datatable', '@angular/material/sidenav', '@angular/material/toolbar', '@angular/router', '@dbg-riskit/angular-auth', '@dbg-riskit/angular-common', '@angular/compiler', '@angular/platform-browser-dynamic'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["dbg-riskit"] = global["dbg-riskit"] || {}, global["dbg-riskit"]["angular-testing"] = {}), null, null, global.ng.core.testing, global.ng.platformBrowserDynamic.testing, global.ng.core, global.ng.material.menu, global.ng.platformBrowser, global["dbg-riskit"]["angular-file"], global.saveAs, global["dbg-riskit"]["angular-view"], global.rxjs, global.rxjs.operators, global.ng.material.card, global.ng.material.button, global.ng.material.buttonToggle, global.ng.material.icon, global.ng.material.tooltip, global["dbg-riskit"].common, global["dbg-riskit"]["angular-datatable"], global.ng.material.sidenav, global.ng.material.toolbar, global.ng.router, global["dbg-riskit"]["angular-auth"], global["dbg-riskit"]["angular-common"], global.ng.compiler, global.ng.platformBrowserDynamic));
|
|
5
|
-
})(this, (function (exports, angularPolyfill, testing$2, testing, testing$1, core, menu, platformBrowser, angularFile, fileSaver, angularView, rxjs, operators, card, button, buttonToggle, icon, tooltip, common, angularDatatable, sidenav, toolbar, router, angularAuth, angularCommon, compiler, platformBrowserDynamic) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var fileSaver__namespace = /*#__PURE__*/_interopNamespace(fileSaver);
|
|
26
|
-
|
|
27
|
-
// Has to be first in this order
|
|
28
|
-
var COMPILE_TIMEOUT_INTERVAL = Math.pow(2, 31) - 1;
|
|
29
|
-
function initTestEnvironment() {
|
|
30
|
-
Error.stackTraceLimit = 10;
|
|
31
|
-
jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
|
|
32
|
-
// TODO: Quick fix for memory leaks
|
|
33
|
-
window.addEventListener = function () {
|
|
34
|
-
};
|
|
35
|
-
window.document.addEventListener = function () {
|
|
36
|
-
};
|
|
37
|
-
// First, initialize the Angular testing environment.
|
|
38
|
-
testing.getTestBed().initTestEnvironment(testing$1.BrowserDynamicTestingModule, testing$1.platformBrowserDynamicTesting());
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/*! *****************************************************************************
|
|
42
|
-
Copyright (c) Microsoft Corporation.
|
|
43
|
-
|
|
44
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
45
|
-
purpose with or without fee is hereby granted.
|
|
46
|
-
|
|
47
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
48
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
49
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
50
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
51
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
52
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
53
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
54
|
-
***************************************************************************** */
|
|
55
|
-
/* global Reflect, Promise */
|
|
56
|
-
var extendStatics = function (d, b) {
|
|
57
|
-
extendStatics = Object.setPrototypeOf ||
|
|
58
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
59
|
-
function (d, b) { for (var p in b)
|
|
60
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
61
|
-
d[p] = b[p]; };
|
|
62
|
-
return extendStatics(d, b);
|
|
63
|
-
};
|
|
64
|
-
function __extends(d, b) {
|
|
65
|
-
if (typeof b !== "function" && b !== null)
|
|
66
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
67
|
-
extendStatics(d, b);
|
|
68
|
-
function __() { this.constructor = d; }
|
|
69
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
70
|
-
}
|
|
71
|
-
var __assign = function () {
|
|
72
|
-
__assign = Object.assign || function __assign(t) {
|
|
73
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
74
|
-
s = arguments[i];
|
|
75
|
-
for (var p in s)
|
|
76
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
77
|
-
t[p] = s[p];
|
|
78
|
-
}
|
|
79
|
-
return t;
|
|
80
|
-
};
|
|
81
|
-
return __assign.apply(this, arguments);
|
|
82
|
-
};
|
|
83
|
-
function __rest(s, e) {
|
|
84
|
-
var t = {};
|
|
85
|
-
for (var p in s)
|
|
86
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
87
|
-
t[p] = s[p];
|
|
88
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
89
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
90
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
91
|
-
t[p[i]] = s[p[i]];
|
|
92
|
-
}
|
|
93
|
-
return t;
|
|
94
|
-
}
|
|
95
|
-
function __decorate(decorators, target, key, desc) {
|
|
96
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
97
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
98
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
99
|
-
else
|
|
100
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
101
|
-
if (d = decorators[i])
|
|
102
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
103
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
104
|
-
}
|
|
105
|
-
function __param(paramIndex, decorator) {
|
|
106
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
107
|
-
}
|
|
108
|
-
function __metadata(metadataKey, metadataValue) {
|
|
109
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
110
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
111
|
-
}
|
|
112
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
113
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
114
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
115
|
-
function fulfilled(value) { try {
|
|
116
|
-
step(generator.next(value));
|
|
117
|
-
}
|
|
118
|
-
catch (e) {
|
|
119
|
-
reject(e);
|
|
120
|
-
} }
|
|
121
|
-
function rejected(value) { try {
|
|
122
|
-
step(generator["throw"](value));
|
|
123
|
-
}
|
|
124
|
-
catch (e) {
|
|
125
|
-
reject(e);
|
|
126
|
-
} }
|
|
127
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
128
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function __generator(thisArg, body) {
|
|
132
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
133
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
134
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
135
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
136
|
-
function step(op) {
|
|
137
|
-
if (f)
|
|
138
|
-
throw new TypeError("Generator is already executing.");
|
|
139
|
-
while (_)
|
|
140
|
-
try {
|
|
141
|
-
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)
|
|
142
|
-
return t;
|
|
143
|
-
if (y = 0, t)
|
|
144
|
-
op = [op[0] & 2, t.value];
|
|
145
|
-
switch (op[0]) {
|
|
146
|
-
case 0:
|
|
147
|
-
case 1:
|
|
148
|
-
t = op;
|
|
149
|
-
break;
|
|
150
|
-
case 4:
|
|
151
|
-
_.label++;
|
|
152
|
-
return { value: op[1], done: false };
|
|
153
|
-
case 5:
|
|
154
|
-
_.label++;
|
|
155
|
-
y = op[1];
|
|
156
|
-
op = [0];
|
|
157
|
-
continue;
|
|
158
|
-
case 7:
|
|
159
|
-
op = _.ops.pop();
|
|
160
|
-
_.trys.pop();
|
|
161
|
-
continue;
|
|
162
|
-
default:
|
|
163
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
164
|
-
_ = 0;
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
168
|
-
_.label = op[1];
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
172
|
-
_.label = t[1];
|
|
173
|
-
t = op;
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
if (t && _.label < t[2]) {
|
|
177
|
-
_.label = t[2];
|
|
178
|
-
_.ops.push(op);
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
if (t[2])
|
|
182
|
-
_.ops.pop();
|
|
183
|
-
_.trys.pop();
|
|
184
|
-
continue;
|
|
185
|
-
}
|
|
186
|
-
op = body.call(thisArg, _);
|
|
187
|
-
}
|
|
188
|
-
catch (e) {
|
|
189
|
-
op = [6, e];
|
|
190
|
-
y = 0;
|
|
191
|
-
}
|
|
192
|
-
finally {
|
|
193
|
-
f = t = 0;
|
|
194
|
-
}
|
|
195
|
-
if (op[0] & 5)
|
|
196
|
-
throw op[1];
|
|
197
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
201
|
-
if (k2 === undefined)
|
|
202
|
-
k2 = k;
|
|
203
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
204
|
-
}) : (function (o, m, k, k2) {
|
|
205
|
-
if (k2 === undefined)
|
|
206
|
-
k2 = k;
|
|
207
|
-
o[k2] = m[k];
|
|
208
|
-
});
|
|
209
|
-
function __exportStar(m, o) {
|
|
210
|
-
for (var p in m)
|
|
211
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
212
|
-
__createBinding(o, m, p);
|
|
213
|
-
}
|
|
214
|
-
function __values(o) {
|
|
215
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
216
|
-
if (m)
|
|
217
|
-
return m.call(o);
|
|
218
|
-
if (o && typeof o.length === "number")
|
|
219
|
-
return {
|
|
220
|
-
next: function () {
|
|
221
|
-
if (o && i >= o.length)
|
|
222
|
-
o = void 0;
|
|
223
|
-
return { value: o && o[i++], done: !o };
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
227
|
-
}
|
|
228
|
-
function __read(o, n) {
|
|
229
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
230
|
-
if (!m)
|
|
231
|
-
return o;
|
|
232
|
-
var i = m.call(o), r, ar = [], e;
|
|
233
|
-
try {
|
|
234
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
235
|
-
ar.push(r.value);
|
|
236
|
-
}
|
|
237
|
-
catch (error) {
|
|
238
|
-
e = { error: error };
|
|
239
|
-
}
|
|
240
|
-
finally {
|
|
241
|
-
try {
|
|
242
|
-
if (r && !r.done && (m = i["return"]))
|
|
243
|
-
m.call(i);
|
|
244
|
-
}
|
|
245
|
-
finally {
|
|
246
|
-
if (e)
|
|
247
|
-
throw e.error;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return ar;
|
|
251
|
-
}
|
|
252
|
-
/** @deprecated */
|
|
253
|
-
function __spread() {
|
|
254
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
255
|
-
ar = ar.concat(__read(arguments[i]));
|
|
256
|
-
return ar;
|
|
257
|
-
}
|
|
258
|
-
/** @deprecated */
|
|
259
|
-
function __spreadArrays() {
|
|
260
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
261
|
-
s += arguments[i].length;
|
|
262
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
263
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
264
|
-
r[k] = a[j];
|
|
265
|
-
return r;
|
|
266
|
-
}
|
|
267
|
-
function __spreadArray(to, from, pack) {
|
|
268
|
-
if (pack || arguments.length === 2)
|
|
269
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
270
|
-
if (ar || !(i in from)) {
|
|
271
|
-
if (!ar)
|
|
272
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
273
|
-
ar[i] = from[i];
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
277
|
-
}
|
|
278
|
-
function __await(v) {
|
|
279
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
280
|
-
}
|
|
281
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
282
|
-
if (!Symbol.asyncIterator)
|
|
283
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
284
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
285
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
286
|
-
function verb(n) { if (g[n])
|
|
287
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
288
|
-
function resume(n, v) { try {
|
|
289
|
-
step(g[n](v));
|
|
290
|
-
}
|
|
291
|
-
catch (e) {
|
|
292
|
-
settle(q[0][3], e);
|
|
293
|
-
} }
|
|
294
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
295
|
-
function fulfill(value) { resume("next", value); }
|
|
296
|
-
function reject(value) { resume("throw", value); }
|
|
297
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
298
|
-
resume(q[0][0], q[0][1]); }
|
|
299
|
-
}
|
|
300
|
-
function __asyncDelegator(o) {
|
|
301
|
-
var i, p;
|
|
302
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
303
|
-
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; }
|
|
304
|
-
}
|
|
305
|
-
function __asyncValues(o) {
|
|
306
|
-
if (!Symbol.asyncIterator)
|
|
307
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
308
|
-
var m = o[Symbol.asyncIterator], i;
|
|
309
|
-
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);
|
|
310
|
-
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); }); }; }
|
|
311
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
312
|
-
}
|
|
313
|
-
function __makeTemplateObject(cooked, raw) {
|
|
314
|
-
if (Object.defineProperty) {
|
|
315
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
cooked.raw = raw;
|
|
319
|
-
}
|
|
320
|
-
return cooked;
|
|
321
|
-
}
|
|
322
|
-
;
|
|
323
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
324
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
325
|
-
}) : function (o, v) {
|
|
326
|
-
o["default"] = v;
|
|
327
|
-
};
|
|
328
|
-
function __importStar(mod) {
|
|
329
|
-
if (mod && mod.__esModule)
|
|
330
|
-
return mod;
|
|
331
|
-
var result = {};
|
|
332
|
-
if (mod != null)
|
|
333
|
-
for (var k in mod)
|
|
334
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
335
|
-
__createBinding(result, mod, k);
|
|
336
|
-
__setModuleDefault(result, mod);
|
|
337
|
-
return result;
|
|
338
|
-
}
|
|
339
|
-
function __importDefault(mod) {
|
|
340
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
341
|
-
}
|
|
342
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
343
|
-
if (kind === "a" && !f)
|
|
344
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
345
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
346
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
347
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
348
|
-
}
|
|
349
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
350
|
-
if (kind === "m")
|
|
351
|
-
throw new TypeError("Private method is not writable");
|
|
352
|
-
if (kind === "a" && !f)
|
|
353
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
354
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
355
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
356
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/** Button events to pass to `DebugElement.triggerEventHandler` for RouterLink event handler */
|
|
360
|
-
var BUTTON_CLICK_EVENTS = {
|
|
361
|
-
left: { button: 0 },
|
|
362
|
-
right: { button: 2 }
|
|
363
|
-
};
|
|
364
|
-
/** Simulate element click. Defaults to mouse left-button click event. */
|
|
365
|
-
function click(el, eventObj) {
|
|
366
|
-
if (eventObj === void 0) { eventObj = BUTTON_CLICK_EVENTS.left; }
|
|
367
|
-
if (el instanceof HTMLElement) {
|
|
368
|
-
el.click();
|
|
369
|
-
}
|
|
370
|
-
else {
|
|
371
|
-
el.triggerEventHandler('click', eventObj);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
function setNgModelValue(element, value, realAsync) {
|
|
375
|
-
if (realAsync === void 0) { realAsync = false; }
|
|
376
|
-
if (!(element.nativeElement instanceof HTMLInputElement)) {
|
|
377
|
-
throw new Error('Not an instance of HTMLInputElement');
|
|
378
|
-
}
|
|
379
|
-
var input = element.nativeElement;
|
|
380
|
-
input.value = value;
|
|
381
|
-
dispatchEvent(input, 'input'); // tell Angular
|
|
382
|
-
if (!realAsync) {
|
|
383
|
-
testing.tick();
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
function setNgModelSelectValue(element, selectedIndex, realAsync) {
|
|
387
|
-
if (realAsync === void 0) { realAsync = false; }
|
|
388
|
-
if (!(element.nativeElement instanceof HTMLSelectElement)) {
|
|
389
|
-
throw new Error('Not an instance of HTMLInputElement');
|
|
390
|
-
}
|
|
391
|
-
var input = element.nativeElement;
|
|
392
|
-
input.selectedIndex = selectedIndex;
|
|
393
|
-
dispatchEvent(input, 'change'); // tell Angular
|
|
394
|
-
if (!realAsync) {
|
|
395
|
-
testing.tick();
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
function dispatchEvent(element, eventName) {
|
|
399
|
-
if (element instanceof HTMLElement) {
|
|
400
|
-
element.dispatchEvent(newEvent(eventName));
|
|
401
|
-
}
|
|
402
|
-
else if (element instanceof Window) {
|
|
403
|
-
element.dispatchEvent(newEvent(eventName));
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
element.nativeElement.dispatchEvent(newEvent(eventName));
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Create custom DOM event the old fashioned way
|
|
411
|
-
*
|
|
412
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent
|
|
413
|
-
* Although officially deprecated, some browsers (phantom) don't accept the preferred "new Event(eventName)"
|
|
414
|
-
*/
|
|
415
|
-
function newEvent(eventName, bubbles, cancelable) {
|
|
416
|
-
if (bubbles === void 0) { bubbles = false; }
|
|
417
|
-
if (cancelable === void 0) { cancelable = false; }
|
|
418
|
-
var evt = document.createEvent('CustomEvent'); // MUST be 'CustomEvent'
|
|
419
|
-
evt.initCustomEvent(eventName, bubbles, cancelable, null);
|
|
420
|
-
return evt;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
var FAKE_HTTP_ASYNC_TIMEOUT = 1000;
|
|
424
|
-
var HttpServiceStub = /** @class */ (function () {
|
|
425
|
-
function HttpServiceStub() {
|
|
426
|
-
this.value = [];
|
|
427
|
-
this.error = [];
|
|
428
|
-
this.unauthorized = new core.EventEmitter();
|
|
429
|
-
}
|
|
430
|
-
HttpServiceStub.prototype.returnValue = function (value) {
|
|
431
|
-
this.value.push(value);
|
|
432
|
-
};
|
|
433
|
-
HttpServiceStub.prototype.popReturnValue = function () {
|
|
434
|
-
return this.value.pop();
|
|
435
|
-
};
|
|
436
|
-
HttpServiceStub.prototype.shiftReturnValue = function () {
|
|
437
|
-
return this.value.shift();
|
|
438
|
-
};
|
|
439
|
-
HttpServiceStub.prototype.throwError = function (value) {
|
|
440
|
-
this.error.push(value);
|
|
441
|
-
};
|
|
442
|
-
HttpServiceStub.prototype.get = function (request) {
|
|
443
|
-
if (this.error.length) {
|
|
444
|
-
var error = this.error.shift();
|
|
445
|
-
return rxjs.throwError(error);
|
|
446
|
-
}
|
|
447
|
-
var value = this.value.shift();
|
|
448
|
-
return rxjs.of(value);
|
|
449
|
-
};
|
|
450
|
-
HttpServiceStub.prototype.post = function (request) {
|
|
451
|
-
return this.get(request);
|
|
452
|
-
};
|
|
453
|
-
return HttpServiceStub;
|
|
454
|
-
}());
|
|
455
|
-
HttpServiceStub.decorators = [
|
|
456
|
-
{ type: core.Injectable }
|
|
457
|
-
];
|
|
458
|
-
var HttpAsyncServiceStub = /** @class */ (function (_super) {
|
|
459
|
-
__extends(HttpAsyncServiceStub, _super);
|
|
460
|
-
function HttpAsyncServiceStub() {
|
|
461
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
462
|
-
}
|
|
463
|
-
HttpAsyncServiceStub.prototype.get = function (request, auth) {
|
|
464
|
-
var _this = this;
|
|
465
|
-
if (auth === void 0) { auth = true; }
|
|
466
|
-
return rxjs.timer(FAKE_HTTP_ASYNC_TIMEOUT).pipe(operators.switchMap(function () { return _super.prototype.get.call(_this, request); }));
|
|
467
|
-
};
|
|
468
|
-
HttpAsyncServiceStub.prototype.post = function (request) {
|
|
469
|
-
return this.get(request);
|
|
470
|
-
};
|
|
471
|
-
return HttpAsyncServiceStub;
|
|
472
|
-
}(HttpServiceStub));
|
|
473
|
-
HttpAsyncServiceStub.decorators = [
|
|
474
|
-
{ type: core.Injectable }
|
|
475
|
-
];
|
|
476
|
-
|
|
477
|
-
var MessageComponentDef = /** @class */ (function () {
|
|
478
|
-
function MessageComponentDef(debugElement) {
|
|
479
|
-
this.debugElement = debugElement;
|
|
480
|
-
if (debugElement == null) {
|
|
481
|
-
throw new Error('Debug element not found!');
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
Object.defineProperty(MessageComponentDef.prototype, "text", {
|
|
485
|
-
get: function () {
|
|
486
|
-
return this.debugElement.query(platformBrowser.By.directive(card.MatCard)).nativeElement.textContent.replace(/\n\s*/g, ' ')
|
|
487
|
-
.replace(/\r\s*/g, ' ').trim();
|
|
488
|
-
},
|
|
489
|
-
enumerable: false,
|
|
490
|
-
configurable: true
|
|
491
|
-
});
|
|
492
|
-
return MessageComponentDef;
|
|
493
|
-
}());
|
|
494
|
-
|
|
495
|
-
var Page = /** @class */ (function () {
|
|
496
|
-
function Page(fixture) {
|
|
497
|
-
this.fixture = fixture;
|
|
498
|
-
this._timeOffset = 0;
|
|
499
|
-
this.debugElement = fixture.debugElement;
|
|
500
|
-
this.component = this.debugElement.componentInstance;
|
|
501
|
-
}
|
|
502
|
-
Page.prototype.detectChanges = function (millis) {
|
|
503
|
-
if (millis === void 0) { millis = 0; }
|
|
504
|
-
this.fixture.detectChanges();
|
|
505
|
-
testing.tick(millis);
|
|
506
|
-
this._timeOffset += millis;
|
|
507
|
-
};
|
|
508
|
-
Page.prototype.advanceAndDetectChanges = function (millis) {
|
|
509
|
-
if (millis === void 0) { millis = 0; }
|
|
510
|
-
testing.tick(millis);
|
|
511
|
-
this._timeOffset += millis;
|
|
512
|
-
this.detectChanges();
|
|
513
|
-
};
|
|
514
|
-
Page.prototype.advanceHTTP = function () {
|
|
515
|
-
this.advanceAndDetectChanges(FAKE_HTTP_ASYNC_TIMEOUT);
|
|
516
|
-
};
|
|
517
|
-
Page.prototype.advanceAndDetectChangesUsingOffset = function (millis) {
|
|
518
|
-
this.advanceAndDetectChanges(millis - this._timeOffset);
|
|
519
|
-
this.resetTimeOffset();
|
|
520
|
-
};
|
|
521
|
-
Page.prototype.resetTimeOffset = function () {
|
|
522
|
-
this._timeOffset = 0;
|
|
523
|
-
};
|
|
524
|
-
Page.prototype.destroy = function () {
|
|
525
|
-
this.fixture.destroy();
|
|
526
|
-
try {
|
|
527
|
-
// Move a lot into fututre ;)
|
|
528
|
-
testing.tick(60 * 60 * 1000);
|
|
529
|
-
testing.discardPeriodicTasks();
|
|
530
|
-
}
|
|
531
|
-
catch (ignore) {
|
|
532
|
-
// Nothing to do...
|
|
533
|
-
}
|
|
534
|
-
};
|
|
535
|
-
return Page;
|
|
536
|
-
}());
|
|
537
|
-
var PageWithLoading = /** @class */ (function (_super) {
|
|
538
|
-
__extends(PageWithLoading, _super);
|
|
539
|
-
function PageWithLoading(fixture) {
|
|
540
|
-
return _super.call(this, fixture) || this;
|
|
541
|
-
}
|
|
542
|
-
Object.defineProperty(PageWithLoading.prototype, "initialLoadComponent", {
|
|
543
|
-
get: function () {
|
|
544
|
-
var element = this.debugElement.query(platformBrowser.By.css(angularView.RISK_INITIAL_LOAD_SELECTOR));
|
|
545
|
-
if (element) {
|
|
546
|
-
return new MessageComponentDef(element);
|
|
547
|
-
}
|
|
548
|
-
return null;
|
|
549
|
-
},
|
|
550
|
-
enumerable: false,
|
|
551
|
-
configurable: true
|
|
552
|
-
});
|
|
553
|
-
Object.defineProperty(PageWithLoading.prototype, "noDataComponent", {
|
|
554
|
-
get: function () {
|
|
555
|
-
var element = this.debugElement.query(platformBrowser.By.css(angularView.RISK_NO_DATA_SELECTOR));
|
|
556
|
-
if (element) {
|
|
557
|
-
return new MessageComponentDef(element);
|
|
558
|
-
}
|
|
559
|
-
return null;
|
|
560
|
-
},
|
|
561
|
-
enumerable: false,
|
|
562
|
-
configurable: true
|
|
563
|
-
});
|
|
564
|
-
return PageWithLoading;
|
|
565
|
-
}(Page));
|
|
566
|
-
|
|
567
|
-
var CSVDownloadMenuPage = /** @class */ (function (_super) {
|
|
568
|
-
__extends(CSVDownloadMenuPage, _super);
|
|
569
|
-
function CSVDownloadMenuPage(fixture) {
|
|
570
|
-
return _super.call(this, fixture) || this;
|
|
571
|
-
}
|
|
572
|
-
Object.defineProperty(CSVDownloadMenuPage.prototype, "downloadWindowsLink", {
|
|
573
|
-
get: function () {
|
|
574
|
-
// Open the menu first
|
|
575
|
-
click(this.debugElement.query(platformBrowser.By.directive(menu.MatMenuTrigger)));
|
|
576
|
-
this.detectChanges(500);
|
|
577
|
-
return new DownloadLink(this.debugElement.queryAll(platformBrowser.By.directive(menu.MatMenuItem))[0], this);
|
|
578
|
-
},
|
|
579
|
-
enumerable: false,
|
|
580
|
-
configurable: true
|
|
581
|
-
});
|
|
582
|
-
Object.defineProperty(CSVDownloadMenuPage.prototype, "downloadUnixLink", {
|
|
583
|
-
get: function () {
|
|
584
|
-
// Open the menu first
|
|
585
|
-
click(this.debugElement.query(platformBrowser.By.directive(menu.MatMenuTrigger)));
|
|
586
|
-
this.detectChanges(500);
|
|
587
|
-
return new DownloadLink(this.debugElement.queryAll(platformBrowser.By.directive(menu.MatMenuItem))[1], this);
|
|
588
|
-
},
|
|
589
|
-
enumerable: false,
|
|
590
|
-
configurable: true
|
|
591
|
-
});
|
|
592
|
-
return CSVDownloadMenuPage;
|
|
593
|
-
}(Page));
|
|
594
|
-
var DownloadLink = /** @class */ (function () {
|
|
595
|
-
function DownloadLink(element, page) {
|
|
596
|
-
this.element = element;
|
|
597
|
-
this.page = page;
|
|
598
|
-
}
|
|
599
|
-
DownloadLink.prototype.click = function () {
|
|
600
|
-
this.setupBlobConstructorSpy();
|
|
601
|
-
this.setupSaveBlobSpy();
|
|
602
|
-
click(this.element);
|
|
603
|
-
this.page.detectChanges();
|
|
604
|
-
};
|
|
605
|
-
Object.defineProperty(DownloadLink.prototype, "blobSpy", {
|
|
606
|
-
get: function () {
|
|
607
|
-
this.setupBlobConstructorSpy();
|
|
608
|
-
return this._blobSpy;
|
|
609
|
-
},
|
|
610
|
-
enumerable: false,
|
|
611
|
-
configurable: true
|
|
612
|
-
});
|
|
613
|
-
DownloadLink.prototype.setupBlobConstructorSpy = function () {
|
|
614
|
-
if (!this._blobSpy) {
|
|
615
|
-
var downloadDirective = void 0;
|
|
616
|
-
try {
|
|
617
|
-
downloadDirective = this.element.injector.get(angularFile.CSVFileDownloadDirective);
|
|
618
|
-
}
|
|
619
|
-
catch (_) {
|
|
620
|
-
downloadDirective = this.element.injector.get(angularFile.FileDownloadDirective);
|
|
621
|
-
}
|
|
622
|
-
this._blobSpy = spyOn(downloadDirective, 'createBlob').and.callThrough();
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
|
-
Object.defineProperty(DownloadLink.prototype, "saveSpy", {
|
|
626
|
-
get: function () {
|
|
627
|
-
this.setupSaveBlobSpy();
|
|
628
|
-
return this._saveBlobSpy;
|
|
629
|
-
},
|
|
630
|
-
enumerable: false,
|
|
631
|
-
configurable: true
|
|
632
|
-
});
|
|
633
|
-
DownloadLink.prototype.setupSaveBlobSpy = function () {
|
|
634
|
-
if (!this._saveBlobSpy) {
|
|
635
|
-
this._saveBlobSpy = spyOn(fileSaver__namespace, 'saveAs');
|
|
636
|
-
}
|
|
637
|
-
};
|
|
638
|
-
return DownloadLink;
|
|
639
|
-
}());
|
|
640
|
-
var DownloadTestComponent = /** @class */ (function () {
|
|
641
|
-
function DownloadTestComponent() {
|
|
642
|
-
}
|
|
643
|
-
return DownloadTestComponent;
|
|
644
|
-
}());
|
|
645
|
-
DownloadTestComponent.decorators = [
|
|
646
|
-
{ type: core.Component, args: [{
|
|
647
|
-
template: "\n <a [risk-download]=\"data\"\n [risk-download-content-type]=\"contentType\"\n [risk-download-filename]=\"filename\">Download</a>\n "
|
|
648
|
-
},] }
|
|
649
|
-
];
|
|
650
|
-
var DownloadTestComponentPage = /** @class */ (function (_super) {
|
|
651
|
-
__extends(DownloadTestComponentPage, _super);
|
|
652
|
-
function DownloadTestComponentPage(fixture) {
|
|
653
|
-
return _super.call(this, fixture) || this;
|
|
654
|
-
}
|
|
655
|
-
Object.defineProperty(DownloadTestComponentPage.prototype, "downloadLink", {
|
|
656
|
-
get: function () {
|
|
657
|
-
return new DownloadLink(this.debugElement.query(platformBrowser.By.directive(angularFile.FileDownloadDirective)), this);
|
|
658
|
-
},
|
|
659
|
-
enumerable: false,
|
|
660
|
-
configurable: true
|
|
661
|
-
});
|
|
662
|
-
return DownloadTestComponentPage;
|
|
663
|
-
}(Page));
|
|
664
|
-
|
|
665
|
-
var DataTableDefinition = /** @class */ (function () {
|
|
666
|
-
function DataTableDefinition(debugElement, page) {
|
|
667
|
-
this.debugElement = debugElement;
|
|
668
|
-
this.page = page;
|
|
669
|
-
}
|
|
670
|
-
Object.defineProperty(DataTableDefinition.prototype, "component", {
|
|
671
|
-
get: function () {
|
|
672
|
-
return this.debugElement.componentInstance;
|
|
673
|
-
},
|
|
674
|
-
enumerable: false,
|
|
675
|
-
configurable: true
|
|
676
|
-
});
|
|
677
|
-
Object.defineProperty(DataTableDefinition.prototype, "data", {
|
|
678
|
-
get: function () {
|
|
679
|
-
return this.component.plainData;
|
|
680
|
-
},
|
|
681
|
-
enumerable: false,
|
|
682
|
-
configurable: true
|
|
683
|
-
});
|
|
684
|
-
Object.defineProperty(DataTableDefinition.prototype, "element", {
|
|
685
|
-
get: function () {
|
|
686
|
-
return this.debugElement.query(platformBrowser.By.css('.risk-data-table-wrapper > table'));
|
|
687
|
-
},
|
|
688
|
-
enumerable: false,
|
|
689
|
-
configurable: true
|
|
690
|
-
});
|
|
691
|
-
Object.defineProperty(DataTableDefinition.prototype, "header", {
|
|
692
|
-
get: function () {
|
|
693
|
-
return new TableHeader(this.debugElement.query(function (de) { return de.references.mainHeader; }), this.page);
|
|
694
|
-
},
|
|
695
|
-
enumerable: false,
|
|
696
|
-
configurable: true
|
|
697
|
-
});
|
|
698
|
-
Object.defineProperty(DataTableDefinition.prototype, "sorting", {
|
|
699
|
-
get: function () {
|
|
700
|
-
return new TableSorting(this, this.page);
|
|
701
|
-
},
|
|
702
|
-
enumerable: false,
|
|
703
|
-
configurable: true
|
|
704
|
-
});
|
|
705
|
-
Object.defineProperty(DataTableDefinition.prototype, "body", {
|
|
706
|
-
get: function () {
|
|
707
|
-
return new TableBody(this.debugElement.query(function (de) { return de.references.mainBody; }), this.page);
|
|
708
|
-
},
|
|
709
|
-
enumerable: false,
|
|
710
|
-
configurable: true
|
|
711
|
-
});
|
|
712
|
-
Object.defineProperty(DataTableDefinition.prototype, "footer", {
|
|
713
|
-
get: function () {
|
|
714
|
-
return new TableFooter(this.debugElement.query(function (de) { return de.references.mainFooter; }));
|
|
715
|
-
},
|
|
716
|
-
enumerable: false,
|
|
717
|
-
configurable: true
|
|
718
|
-
});
|
|
719
|
-
Object.defineProperty(DataTableDefinition.prototype, "recordsCount", {
|
|
720
|
-
get: function () {
|
|
721
|
-
return new RecordsCount(this.debugElement.query(platformBrowser.By.css('.risk-data-table-page-count')));
|
|
722
|
-
},
|
|
723
|
-
enumerable: false,
|
|
724
|
-
configurable: true
|
|
725
|
-
});
|
|
726
|
-
Object.defineProperty(DataTableDefinition.prototype, "pager", {
|
|
727
|
-
get: function () {
|
|
728
|
-
return new Pager(this.debugElement.query(platformBrowser.By.directive(angularDatatable.PagingComponent)), this.page);
|
|
729
|
-
},
|
|
730
|
-
enumerable: false,
|
|
731
|
-
configurable: true
|
|
732
|
-
});
|
|
733
|
-
return DataTableDefinition;
|
|
734
|
-
}());
|
|
735
|
-
// <editor-fold defaultstate="collapsed" desc="Table header">
|
|
736
|
-
var TableHeader = /** @class */ (function () {
|
|
737
|
-
function TableHeader(element, page) {
|
|
738
|
-
this.element = element;
|
|
739
|
-
this.page = page;
|
|
740
|
-
}
|
|
741
|
-
Object.defineProperty(TableHeader.prototype, "rows", {
|
|
742
|
-
get: function () {
|
|
743
|
-
var _this = this;
|
|
744
|
-
return this.element.queryAll(platformBrowser.By.css('tr')).map(function (element) {
|
|
745
|
-
return new TableHeaderRow(element, _this.page);
|
|
746
|
-
});
|
|
747
|
-
},
|
|
748
|
-
enumerable: false,
|
|
749
|
-
configurable: true
|
|
750
|
-
});
|
|
751
|
-
Object.defineProperty(TableHeader.prototype, "cells", {
|
|
752
|
-
get: function () {
|
|
753
|
-
var _this = this;
|
|
754
|
-
return this.element.queryAll(platformBrowser.By.css('th')).map(function (element) {
|
|
755
|
-
return new TableHeaderCell(element, _this.page);
|
|
756
|
-
});
|
|
757
|
-
},
|
|
758
|
-
enumerable: false,
|
|
759
|
-
configurable: true
|
|
760
|
-
});
|
|
761
|
-
return TableHeader;
|
|
762
|
-
}());
|
|
763
|
-
var TableHeaderRow = /** @class */ (function () {
|
|
764
|
-
function TableHeaderRow(element, page) {
|
|
765
|
-
this.element = element;
|
|
766
|
-
this.page = page;
|
|
767
|
-
}
|
|
768
|
-
Object.defineProperty(TableHeaderRow.prototype, "cells", {
|
|
769
|
-
get: function () {
|
|
770
|
-
var _this = this;
|
|
771
|
-
return this.element.queryAll(platformBrowser.By.css('th')).map(function (element) {
|
|
772
|
-
return new TableHeaderCell(element, _this.page);
|
|
773
|
-
});
|
|
774
|
-
},
|
|
775
|
-
enumerable: false,
|
|
776
|
-
configurable: true
|
|
777
|
-
});
|
|
778
|
-
return TableHeaderRow;
|
|
779
|
-
}());
|
|
780
|
-
var TableHeaderCell = /** @class */ (function () {
|
|
781
|
-
function TableHeaderCell(element, page) {
|
|
782
|
-
this.element = element;
|
|
783
|
-
this.page = page;
|
|
784
|
-
}
|
|
785
|
-
Object.defineProperty(TableHeaderCell.prototype, "sortingHandle", {
|
|
786
|
-
get: function () {
|
|
787
|
-
var handle = this.element.query(platformBrowser.By.directive(button.MatButton));
|
|
788
|
-
if (handle) {
|
|
789
|
-
return new SortingHandle(this.page, handle);
|
|
790
|
-
}
|
|
791
|
-
return null;
|
|
792
|
-
},
|
|
793
|
-
enumerable: false,
|
|
794
|
-
configurable: true
|
|
795
|
-
});
|
|
796
|
-
Object.defineProperty(TableHeaderCell.prototype, "tooltip", {
|
|
797
|
-
get: function () {
|
|
798
|
-
var handle = this.element.query(platformBrowser.By.directive(tooltip.MatTooltip));
|
|
799
|
-
if (handle) {
|
|
800
|
-
return handle.injector.get(tooltip.MatTooltip).message;
|
|
801
|
-
}
|
|
802
|
-
return null;
|
|
803
|
-
},
|
|
804
|
-
enumerable: false,
|
|
805
|
-
configurable: true
|
|
806
|
-
});
|
|
807
|
-
Object.defineProperty(TableHeaderCell.prototype, "title", {
|
|
808
|
-
get: function () {
|
|
809
|
-
var textNode = this.element.childNodes.find(function (node) { return node.nativeNode.nodeType === Node.TEXT_NODE; });
|
|
810
|
-
if (textNode != null) {
|
|
811
|
-
return textNode
|
|
812
|
-
.nativeNode.textContent.trim();
|
|
813
|
-
}
|
|
814
|
-
return '';
|
|
815
|
-
},
|
|
816
|
-
enumerable: false,
|
|
817
|
-
configurable: true
|
|
818
|
-
});
|
|
819
|
-
Object.defineProperty(TableHeaderCell.prototype, "colspan", {
|
|
820
|
-
get: function () {
|
|
821
|
-
return this.element.nativeElement.colspan;
|
|
822
|
-
},
|
|
823
|
-
enumerable: false,
|
|
824
|
-
configurable: true
|
|
825
|
-
});
|
|
826
|
-
Object.defineProperty(TableHeaderCell.prototype, "rowspan", {
|
|
827
|
-
get: function () {
|
|
828
|
-
return this.element.nativeElement.rowspan;
|
|
829
|
-
},
|
|
830
|
-
enumerable: false,
|
|
831
|
-
configurable: true
|
|
832
|
-
});
|
|
833
|
-
return TableHeaderCell;
|
|
834
|
-
}());
|
|
835
|
-
// <editor-fold defaultstate="collapsed" desc="Sorting">
|
|
836
|
-
var TableSorting = /** @class */ (function () {
|
|
837
|
-
function TableSorting(table, page) {
|
|
838
|
-
this.table = table;
|
|
839
|
-
this.page = page;
|
|
840
|
-
}
|
|
841
|
-
Object.defineProperty(TableSorting.prototype, "handles", {
|
|
842
|
-
get: function () {
|
|
843
|
-
var _this = this;
|
|
844
|
-
var handles = this.table.debugElement.query(function (de) { return de.references.mainHeader; })
|
|
845
|
-
.queryAll(platformBrowser.By.directive(button.MatButton));
|
|
846
|
-
if (!handles) {
|
|
847
|
-
return [];
|
|
848
|
-
}
|
|
849
|
-
return handles.map(function (handle) {
|
|
850
|
-
return new SortingHandle(_this.page, handle);
|
|
851
|
-
});
|
|
852
|
-
},
|
|
853
|
-
enumerable: false,
|
|
854
|
-
configurable: true
|
|
855
|
-
});
|
|
856
|
-
Object.defineProperty(TableSorting.prototype, "detailRowHandles", {
|
|
857
|
-
get: function () {
|
|
858
|
-
var _this = this;
|
|
859
|
-
var handles = this.table.debugElement.query(platformBrowser.By.css('.risk-data-table-detail')).query(platformBrowser.By.css('thead'))
|
|
860
|
-
.queryAll(platformBrowser.By.directive(button.MatButton));
|
|
861
|
-
if (!handles) {
|
|
862
|
-
return null;
|
|
863
|
-
}
|
|
864
|
-
return handles.map(function (handle) {
|
|
865
|
-
return new SortingHandle(_this.page, handle);
|
|
866
|
-
});
|
|
867
|
-
},
|
|
868
|
-
enumerable: false,
|
|
869
|
-
configurable: true
|
|
870
|
-
});
|
|
871
|
-
Object.defineProperty(TableSorting.prototype, "currentOrdering", {
|
|
872
|
-
get: function () {
|
|
873
|
-
return this.table.component.ordering;
|
|
874
|
-
},
|
|
875
|
-
enumerable: false,
|
|
876
|
-
configurable: true
|
|
877
|
-
});
|
|
878
|
-
TableSorting.prototype.checkSorting = function (firstNRows, criterium) {
|
|
879
|
-
if (firstNRows === void 0) { firstNRows = this.table.component.rows.length; }
|
|
880
|
-
// WARN: call data once as it calls .map on all table rows
|
|
881
|
-
var data = this.table.data;
|
|
882
|
-
var ordering;
|
|
883
|
-
if (criterium) {
|
|
884
|
-
ordering = [criterium].concat(this.table.component._defaultOrdering);
|
|
885
|
-
}
|
|
886
|
-
else {
|
|
887
|
-
ordering = this.currentOrdering;
|
|
888
|
-
}
|
|
889
|
-
var _loop_1 = function (i) {
|
|
890
|
-
ordering.some(function (criteria) {
|
|
891
|
-
//noinspection EqualityComparisonWithCoercionJS
|
|
892
|
-
var valueA = criteria.get(data[i - 1]);
|
|
893
|
-
var valueB = criteria.get(data[i]);
|
|
894
|
-
if (valueA == null && valueB == null) {
|
|
895
|
-
return false;
|
|
896
|
-
}
|
|
897
|
-
expect(valueA).not.toBeNull();
|
|
898
|
-
expect(valueA).not.toBeUndefined();
|
|
899
|
-
if (valueB != null) {
|
|
900
|
-
if (criteria.descending) {
|
|
901
|
-
expect(valueA >= valueB)
|
|
902
|
-
.toBeTruthy('Expect: ' + valueA + ' >= '
|
|
903
|
-
+ valueB);
|
|
904
|
-
}
|
|
905
|
-
else {
|
|
906
|
-
expect(valueA <= valueB)
|
|
907
|
-
.toBeTruthy('Expect: ' + valueA + ' <= '
|
|
908
|
-
+ valueB);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
return valueA !== valueB;
|
|
912
|
-
});
|
|
913
|
-
};
|
|
914
|
-
for (var i = 1; i < Math.min(data.length, firstNRows); i++) {
|
|
915
|
-
_loop_1(i);
|
|
916
|
-
}
|
|
917
|
-
};
|
|
918
|
-
return TableSorting;
|
|
919
|
-
}());
|
|
920
|
-
var SortingHandle = /** @class */ (function () {
|
|
921
|
-
function SortingHandle(page, handle) {
|
|
922
|
-
this.page = page;
|
|
923
|
-
this.handle = handle;
|
|
924
|
-
}
|
|
925
|
-
SortingHandle.prototype.click = function () {
|
|
926
|
-
click(this.handle);
|
|
927
|
-
this.page.detectChanges();
|
|
928
|
-
};
|
|
929
|
-
return SortingHandle;
|
|
930
|
-
}());
|
|
931
|
-
// </editor-fold>
|
|
932
|
-
// </editor-fold>
|
|
933
|
-
// <editor-fold defaultstate="collapsed" desc="Table body">
|
|
934
|
-
var TableBody = /** @class */ (function () {
|
|
935
|
-
function TableBody(element, page) {
|
|
936
|
-
this.element = element;
|
|
937
|
-
this.page = page;
|
|
938
|
-
}
|
|
939
|
-
Object.defineProperty(TableBody.prototype, "rows", {
|
|
940
|
-
get: function () {
|
|
941
|
-
var _this = this;
|
|
942
|
-
return this.element.queryAll(function (de) { return de.references.masterRow; }).map(function (element) {
|
|
943
|
-
return new TableBodyRow(element, _this.page);
|
|
944
|
-
});
|
|
945
|
-
},
|
|
946
|
-
enumerable: false,
|
|
947
|
-
configurable: true
|
|
948
|
-
});
|
|
949
|
-
Object.defineProperty(TableBody.prototype, "cells", {
|
|
950
|
-
get: function () {
|
|
951
|
-
var cells = [];
|
|
952
|
-
this.element.queryAll(function (de) { return de.references.masterRow; }).forEach(function (row) {
|
|
953
|
-
cells = cells.concat(row.queryAll(platformBrowser.By.css('td')).map(function (cell) {
|
|
954
|
-
return new TableBodyCell(cell);
|
|
955
|
-
}));
|
|
956
|
-
});
|
|
957
|
-
return cells;
|
|
958
|
-
},
|
|
959
|
-
enumerable: false,
|
|
960
|
-
configurable: true
|
|
961
|
-
});
|
|
962
|
-
return TableBody;
|
|
963
|
-
}());
|
|
964
|
-
var TableBodyRow = /** @class */ (function () {
|
|
965
|
-
function TableBodyRow(element, page) {
|
|
966
|
-
this.element = element;
|
|
967
|
-
this.page = page;
|
|
968
|
-
}
|
|
969
|
-
TableBodyRow.prototype.expandRow = function () {
|
|
970
|
-
click(this.element);
|
|
971
|
-
this.page.detectChanges();
|
|
972
|
-
};
|
|
973
|
-
Object.defineProperty(TableBodyRow.prototype, "expander", {
|
|
974
|
-
get: function () {
|
|
975
|
-
return new RowExpander(this.element.query(platformBrowser.By.directive(angularDatatable.DataTableRowDetailExpander)).query(platformBrowser.By.directive(button.MatAnchor)));
|
|
976
|
-
},
|
|
977
|
-
enumerable: false,
|
|
978
|
-
configurable: true
|
|
979
|
-
});
|
|
980
|
-
Object.defineProperty(TableBodyRow.prototype, "cells", {
|
|
981
|
-
get: function () {
|
|
982
|
-
return this.element.queryAll(platformBrowser.By.css('td')).map(function (element) {
|
|
983
|
-
return new TableBodyCell(element);
|
|
984
|
-
});
|
|
985
|
-
},
|
|
986
|
-
enumerable: false,
|
|
987
|
-
configurable: true
|
|
988
|
-
});
|
|
989
|
-
Object.defineProperty(TableBodyRow.prototype, "rowDetail", {
|
|
990
|
-
get: function () {
|
|
991
|
-
var parent = this.element.parent;
|
|
992
|
-
if (parent != null) {
|
|
993
|
-
var next = parent.children[parent.children.indexOf(this.element) + 1];
|
|
994
|
-
if (next && !next.references.masterRow) {
|
|
995
|
-
return new TableBodyDetail(next, this.page);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
return null;
|
|
999
|
-
},
|
|
1000
|
-
enumerable: false,
|
|
1001
|
-
configurable: true
|
|
1002
|
-
});
|
|
1003
|
-
Object.defineProperty(TableBodyRow.prototype, "highlighted", {
|
|
1004
|
-
get: function () {
|
|
1005
|
-
return this.element.nativeElement.classList.contains(angularDatatable.HIGHLIGHTER_CLASS);
|
|
1006
|
-
},
|
|
1007
|
-
enumerable: false,
|
|
1008
|
-
configurable: true
|
|
1009
|
-
});
|
|
1010
|
-
return TableBodyRow;
|
|
1011
|
-
}());
|
|
1012
|
-
var RowExpander = /** @class */ (function () {
|
|
1013
|
-
function RowExpander(element) {
|
|
1014
|
-
this.element = element;
|
|
1015
|
-
}
|
|
1016
|
-
Object.defineProperty(RowExpander.prototype, "icon", {
|
|
1017
|
-
get: function () {
|
|
1018
|
-
return this.element.query(platformBrowser.By.directive(icon.MatIcon)).nativeElement.textContent.trim();
|
|
1019
|
-
},
|
|
1020
|
-
enumerable: false,
|
|
1021
|
-
configurable: true
|
|
1022
|
-
});
|
|
1023
|
-
Object.defineProperty(RowExpander.prototype, "opened", {
|
|
1024
|
-
get: function () {
|
|
1025
|
-
return this.icon === 'expand_less';
|
|
1026
|
-
},
|
|
1027
|
-
enumerable: false,
|
|
1028
|
-
configurable: true
|
|
1029
|
-
});
|
|
1030
|
-
Object.defineProperty(RowExpander.prototype, "closed", {
|
|
1031
|
-
get: function () {
|
|
1032
|
-
return this.icon === 'expand_more';
|
|
1033
|
-
},
|
|
1034
|
-
enumerable: false,
|
|
1035
|
-
configurable: true
|
|
1036
|
-
});
|
|
1037
|
-
return RowExpander;
|
|
1038
|
-
}());
|
|
1039
|
-
var TableBodyCell = /** @class */ (function () {
|
|
1040
|
-
function TableBodyCell(element) {
|
|
1041
|
-
this.element = element;
|
|
1042
|
-
}
|
|
1043
|
-
Object.defineProperty(TableBodyCell.prototype, "colspan", {
|
|
1044
|
-
get: function () {
|
|
1045
|
-
return this.element.nativeElement.colspan;
|
|
1046
|
-
},
|
|
1047
|
-
enumerable: false,
|
|
1048
|
-
configurable: true
|
|
1049
|
-
});
|
|
1050
|
-
Object.defineProperty(TableBodyCell.prototype, "rowspan", {
|
|
1051
|
-
get: function () {
|
|
1052
|
-
return this.element.nativeElement.rowspan;
|
|
1053
|
-
},
|
|
1054
|
-
enumerable: false,
|
|
1055
|
-
configurable: true
|
|
1056
|
-
});
|
|
1057
|
-
return TableBodyCell;
|
|
1058
|
-
}());
|
|
1059
|
-
// <editor-fold defaultstate="collapsed" desc="Row detail">
|
|
1060
|
-
var TableBodyDetail = /** @class */ (function () {
|
|
1061
|
-
function TableBodyDetail(element, page) {
|
|
1062
|
-
this.element = element;
|
|
1063
|
-
this.page = page;
|
|
1064
|
-
}
|
|
1065
|
-
TableBodyDetail.prototype.header = function () {
|
|
1066
|
-
return new TableHeader(this.element.query(platformBrowser.By.css('thead')), this.page);
|
|
1067
|
-
};
|
|
1068
|
-
Object.defineProperty(TableBodyDetail.prototype, "body", {
|
|
1069
|
-
get: function () {
|
|
1070
|
-
return new TableBodyDetailBody(this.element.query(platformBrowser.By.css('tbody')));
|
|
1071
|
-
},
|
|
1072
|
-
enumerable: false,
|
|
1073
|
-
configurable: true
|
|
1074
|
-
});
|
|
1075
|
-
Object.defineProperty(TableBodyDetail.prototype, "highlighted", {
|
|
1076
|
-
get: function () {
|
|
1077
|
-
return this.element.nativeElement.classList.contains(angularDatatable.HIGHLIGHTER_CLASS);
|
|
1078
|
-
},
|
|
1079
|
-
enumerable: false,
|
|
1080
|
-
configurable: true
|
|
1081
|
-
});
|
|
1082
|
-
Object.defineProperty(TableBodyDetail.prototype, "colspan", {
|
|
1083
|
-
get: function () {
|
|
1084
|
-
return this.element.children[0].nativeElement.colspan;
|
|
1085
|
-
},
|
|
1086
|
-
enumerable: false,
|
|
1087
|
-
configurable: true
|
|
1088
|
-
});
|
|
1089
|
-
return TableBodyDetail;
|
|
1090
|
-
}());
|
|
1091
|
-
var TableBodyDetailBody = /** @class */ (function () {
|
|
1092
|
-
function TableBodyDetailBody(element) {
|
|
1093
|
-
this.element = element;
|
|
1094
|
-
}
|
|
1095
|
-
Object.defineProperty(TableBodyDetailBody.prototype, "rows", {
|
|
1096
|
-
get: function () {
|
|
1097
|
-
return this.element.queryAll(platformBrowser.By.css('tr')).map(function (element) {
|
|
1098
|
-
return new TableBodyDetailRow(element);
|
|
1099
|
-
});
|
|
1100
|
-
},
|
|
1101
|
-
enumerable: false,
|
|
1102
|
-
configurable: true
|
|
1103
|
-
});
|
|
1104
|
-
Object.defineProperty(TableBodyDetailBody.prototype, "cells", {
|
|
1105
|
-
get: function () {
|
|
1106
|
-
var cells = [];
|
|
1107
|
-
this.element.queryAll(platformBrowser.By.css('tr')).forEach(function (row) {
|
|
1108
|
-
cells = cells.concat(row.queryAll(platformBrowser.By.css('td')).map(function (cell) {
|
|
1109
|
-
return new TableBodyCell(cell);
|
|
1110
|
-
}));
|
|
1111
|
-
});
|
|
1112
|
-
return cells;
|
|
1113
|
-
},
|
|
1114
|
-
enumerable: false,
|
|
1115
|
-
configurable: true
|
|
1116
|
-
});
|
|
1117
|
-
return TableBodyDetailBody;
|
|
1118
|
-
}());
|
|
1119
|
-
var TableBodyDetailRow = /** @class */ (function () {
|
|
1120
|
-
function TableBodyDetailRow(element) {
|
|
1121
|
-
this.element = element;
|
|
1122
|
-
}
|
|
1123
|
-
Object.defineProperty(TableBodyDetailRow.prototype, "cells", {
|
|
1124
|
-
get: function () {
|
|
1125
|
-
return this.element.queryAll(platformBrowser.By.css('td')).map(function (element) {
|
|
1126
|
-
return new TableBodyCell(element);
|
|
1127
|
-
});
|
|
1128
|
-
},
|
|
1129
|
-
enumerable: false,
|
|
1130
|
-
configurable: true
|
|
1131
|
-
});
|
|
1132
|
-
return TableBodyDetailRow;
|
|
1133
|
-
}());
|
|
1134
|
-
// </editor-fold>
|
|
1135
|
-
// </editor-fold>
|
|
1136
|
-
// <editor-fold defaultstate="collapsed" desc="Table footer">
|
|
1137
|
-
var TableFooter = /** @class */ (function () {
|
|
1138
|
-
function TableFooter(element) {
|
|
1139
|
-
this.element = element;
|
|
1140
|
-
}
|
|
1141
|
-
Object.defineProperty(TableFooter.prototype, "rows", {
|
|
1142
|
-
get: function () {
|
|
1143
|
-
return this.element.queryAll(platformBrowser.By.css('tr')).map(function (element) {
|
|
1144
|
-
return new TableFooterRow(element);
|
|
1145
|
-
});
|
|
1146
|
-
},
|
|
1147
|
-
enumerable: false,
|
|
1148
|
-
configurable: true
|
|
1149
|
-
});
|
|
1150
|
-
Object.defineProperty(TableFooter.prototype, "cells", {
|
|
1151
|
-
get: function () {
|
|
1152
|
-
var cells = [];
|
|
1153
|
-
this.element.queryAll(platformBrowser.By.css('tr')).forEach(function (row) {
|
|
1154
|
-
cells = cells.concat(row.queryAll(platformBrowser.By.css('th')).map(function (cell) {
|
|
1155
|
-
return new TableBodyCell(cell);
|
|
1156
|
-
}));
|
|
1157
|
-
});
|
|
1158
|
-
return cells;
|
|
1159
|
-
},
|
|
1160
|
-
enumerable: false,
|
|
1161
|
-
configurable: true
|
|
1162
|
-
});
|
|
1163
|
-
return TableFooter;
|
|
1164
|
-
}());
|
|
1165
|
-
var TableFooterRow = /** @class */ (function () {
|
|
1166
|
-
function TableFooterRow(element) {
|
|
1167
|
-
this.element = element;
|
|
1168
|
-
}
|
|
1169
|
-
Object.defineProperty(TableFooterRow.prototype, "cells", {
|
|
1170
|
-
get: function () {
|
|
1171
|
-
return this.element.queryAll(platformBrowser.By.css('th')).map(function (element) {
|
|
1172
|
-
return new TableBodyCell(element);
|
|
1173
|
-
});
|
|
1174
|
-
},
|
|
1175
|
-
enumerable: false,
|
|
1176
|
-
configurable: true
|
|
1177
|
-
});
|
|
1178
|
-
return TableFooterRow;
|
|
1179
|
-
}());
|
|
1180
|
-
// </editor-fold>
|
|
1181
|
-
var RecordsCount = /** @class */ (function () {
|
|
1182
|
-
function RecordsCount(element) {
|
|
1183
|
-
this.element = element;
|
|
1184
|
-
}
|
|
1185
|
-
Object.defineProperty(RecordsCount.prototype, "message", {
|
|
1186
|
-
get: function () {
|
|
1187
|
-
return this.element.nativeElement.textContent;
|
|
1188
|
-
},
|
|
1189
|
-
enumerable: false,
|
|
1190
|
-
configurable: true
|
|
1191
|
-
});
|
|
1192
|
-
return RecordsCount;
|
|
1193
|
-
}());
|
|
1194
|
-
var Pager = /** @class */ (function () {
|
|
1195
|
-
function Pager(element, page) {
|
|
1196
|
-
this.element = element;
|
|
1197
|
-
this.page = page;
|
|
1198
|
-
}
|
|
1199
|
-
Object.defineProperty(Pager.prototype, "pageButtons", {
|
|
1200
|
-
get: function () {
|
|
1201
|
-
return this.element.queryAll(platformBrowser.By.directive(buttonToggle.MatButtonToggle));
|
|
1202
|
-
},
|
|
1203
|
-
enumerable: false,
|
|
1204
|
-
configurable: true
|
|
1205
|
-
});
|
|
1206
|
-
Pager.prototype.expectLeadingButtonsDisabled = function () {
|
|
1207
|
-
for (var i = 0; i < 2; i++) {
|
|
1208
|
-
expect(this.pageButtons[i].classes['mat-button-toggle-disabled'])
|
|
1209
|
-
.toBe(true, 'First two are disabled.');
|
|
1210
|
-
}
|
|
1211
|
-
};
|
|
1212
|
-
Pager.prototype.expectLeadingButtonsNotDisabled = function () {
|
|
1213
|
-
for (var i = 0; i < 2; i++) {
|
|
1214
|
-
expect(this.pageButtons[i].classes['mat-button-toggle-disabled'])
|
|
1215
|
-
.not.toBe(true, 'First two are not disabled.');
|
|
1216
|
-
}
|
|
1217
|
-
};
|
|
1218
|
-
Pager.prototype.expectTrailingButtonsDisabled = function () {
|
|
1219
|
-
for (var i = this.pageButtons.length - 1; i > this.pageButtons.length - 3; i--) {
|
|
1220
|
-
expect(this.pageButtons[i].classes['mat-button-toggle-disabled'])
|
|
1221
|
-
.toBe(true, 'Last two are disabled.');
|
|
1222
|
-
}
|
|
1223
|
-
};
|
|
1224
|
-
Pager.prototype.expectTrailingButtonsNotDisabled = function () {
|
|
1225
|
-
for (var i = this.pageButtons.length - 1; i > this.pageButtons.length - 3; i--) {
|
|
1226
|
-
expect(this.pageButtons[i].classes['mat-button-toggle-disabled'])
|
|
1227
|
-
.not.toBe(true, 'Last two are not disabled.');
|
|
1228
|
-
}
|
|
1229
|
-
};
|
|
1230
|
-
Pager.prototype.expectButtonNumbers = function (numbers) {
|
|
1231
|
-
for (var i = 0; i < numbers.length; i++) {
|
|
1232
|
-
expect(this.pageButtons[i + 2].query(platformBrowser.By.css('.mat-button-toggle-label-content'))
|
|
1233
|
-
.nativeElement.textContent.trim())
|
|
1234
|
-
.toEqual(numbers[i] + '', 'Button numbers are correct');
|
|
1235
|
-
}
|
|
1236
|
-
};
|
|
1237
|
-
Pager.prototype.expectButtonActive = function (index) {
|
|
1238
|
-
expect(this.pageButtons[index].classes['mat-button-toggle-checked'])
|
|
1239
|
-
.toBe(true, 'Button is active.');
|
|
1240
|
-
};
|
|
1241
|
-
Pager.prototype.click = function (index) {
|
|
1242
|
-
click(this.pageButtons[index].query(platformBrowser.By.css('.mat-button-toggle-label-content')).nativeElement);
|
|
1243
|
-
this.page.detectChanges();
|
|
1244
|
-
this.page.advanceAndDetectChanges();
|
|
1245
|
-
};
|
|
1246
|
-
return Pager;
|
|
1247
|
-
}());
|
|
1248
|
-
function chceckSorting(page, criteria) {
|
|
1249
|
-
page.dataTable.sorting.checkSorting(150);
|
|
1250
|
-
page.dataTable.sorting.handles.forEach(function (handle, index) {
|
|
1251
|
-
// Tigger sort based on a handle
|
|
1252
|
-
handle.click();
|
|
1253
|
-
page.detectChanges();
|
|
1254
|
-
// Check the sorting
|
|
1255
|
-
page.dataTable.sorting.checkSorting(150, {
|
|
1256
|
-
get: criteria[index]
|
|
1257
|
-
});
|
|
1258
|
-
// Tigger sort based on a handle
|
|
1259
|
-
handle.click();
|
|
1260
|
-
page.detectChanges();
|
|
1261
|
-
// Check the sorting
|
|
1262
|
-
page.dataTable.sorting.checkSorting(150, {
|
|
1263
|
-
get: criteria[index],
|
|
1264
|
-
descending: true
|
|
1265
|
-
});
|
|
1266
|
-
});
|
|
1267
|
-
}
|
|
1268
|
-
var DataTableDefinitionHosted = /** @class */ (function (_super) {
|
|
1269
|
-
__extends(DataTableDefinitionHosted, _super);
|
|
1270
|
-
function DataTableDefinitionHosted(fixture) {
|
|
1271
|
-
return _super.call(this, fixture) || this;
|
|
1272
|
-
}
|
|
1273
|
-
Object.defineProperty(DataTableDefinitionHosted.prototype, "dataTable", {
|
|
1274
|
-
get: function () {
|
|
1275
|
-
return new DataTableDefinition(this.debugElement.query(platformBrowser.By.directive(angularDatatable.DataTableComponent)), this);
|
|
1276
|
-
},
|
|
1277
|
-
enumerable: false,
|
|
1278
|
-
configurable: true
|
|
1279
|
-
});
|
|
1280
|
-
return DataTableDefinitionHosted;
|
|
1281
|
-
}(Page));
|
|
1282
|
-
var TestDataTableHostComponent = /** @class */ (function () {
|
|
1283
|
-
function TestDataTableHostComponent() {
|
|
1284
|
-
this.data = [];
|
|
1285
|
-
for (var i = 0; i < 500; i++) {
|
|
1286
|
-
this.data.push({
|
|
1287
|
-
value1: Math.floor(common.secureRandom() * 20) + ' - value 1',
|
|
1288
|
-
value2: Math.floor(common.secureRandom() * 20) + ' - value 2',
|
|
1289
|
-
value3: Math.floor(common.secureRandom() * 20) + ' - value 3'
|
|
1290
|
-
});
|
|
1291
|
-
}
|
|
1292
|
-
this.footer = this.data[0];
|
|
1293
|
-
}
|
|
1294
|
-
Object.defineProperty(TestDataTableHostComponent.prototype, "defaultOrdering", {
|
|
1295
|
-
get: function () {
|
|
1296
|
-
return [
|
|
1297
|
-
{
|
|
1298
|
-
get: function (record) {
|
|
1299
|
-
return record.value3;
|
|
1300
|
-
},
|
|
1301
|
-
descending: true
|
|
1302
|
-
},
|
|
1303
|
-
function (record) {
|
|
1304
|
-
return record.value2;
|
|
1305
|
-
}
|
|
1306
|
-
];
|
|
1307
|
-
},
|
|
1308
|
-
enumerable: false,
|
|
1309
|
-
configurable: true
|
|
1310
|
-
});
|
|
1311
|
-
Object.defineProperty(TestDataTableHostComponent.prototype, "valueGetter", {
|
|
1312
|
-
get: function () {
|
|
1313
|
-
return function (record) {
|
|
1314
|
-
return record.value1;
|
|
1315
|
-
};
|
|
1316
|
-
},
|
|
1317
|
-
enumerable: false,
|
|
1318
|
-
configurable: true
|
|
1319
|
-
});
|
|
1320
|
-
return TestDataTableHostComponent;
|
|
1321
|
-
}());
|
|
1322
|
-
TestDataTableHostComponent.decorators = [
|
|
1323
|
-
{ type: core.Component, args: [{
|
|
1324
|
-
template: "\n <risk-data-table [data]=\"data\"\n [footer]=\"footer\"\n [pageSize]=\"20\"\n [defaultOrdering]=\"defaultOrdering\"\n [striped]=\"true\">\n <risk-data-table-column title=\"Test Column 1\"\n [sortingKey]=\"valueGetter\">\n <ng-template let-record=\"row\" risk-data-table-cell>\n {{record.value1}}\n </ng-template>\n </risk-data-table-column>\n <risk-data-table-column>\n <ng-template risk-data-table-cell let-record=\"row\" let-expanded=\"expanded\">\n <risk-data-table-detail-expander [expanded]=\"expanded\"></risk-data-table-detail-expander>\n </ng-template>\n <ng-template risk-data-table-footer-cell let-footer=\"footer\">\n {{footer.value1}}\n </ng-template>\n </risk-data-table-column>\n <!-- Sub detail -->\n <risk-data-table-detail-row>\n <risk-data-table-column-group>\n <risk-data-table-column title=\"Test Detail Column 1\"\n [sortingKey]=\"valueGetter\">\n <ng-template risk-data-table-cell let-record=\"row\">\n {{record.value1}}\n </ng-template>\n </risk-data-table-column>\n </risk-data-table-column-group>\n <risk-data-table-column-group>\n <risk-data-table-column title=\"Test Detail Column 2\">\n <ng-template risk-data-table-cell let-record=\"row\">\n {{record.value2}}\n </ng-template>\n </risk-data-table-column>\n <risk-data-table-column title=\"Test Detail Column 3\">\n <ng-template risk-data-table-cell let-record=\"row\">\n {{record.value3}}\n </ng-template>\n </risk-data-table-column>\n </risk-data-table-column-group>\n <risk-data-table-column-group></risk-data-table-column-group>\n </risk-data-table-detail-row>\n </risk-data-table>"
|
|
1325
|
-
},] }
|
|
1326
|
-
];
|
|
1327
|
-
TestDataTableHostComponent.ctorParameters = function () { return []; };
|
|
1328
|
-
|
|
1329
|
-
var HighLighterDirectiveTestComponent = /** @class */ (function () {
|
|
1330
|
-
function HighLighterDirectiveTestComponent() {
|
|
1331
|
-
}
|
|
1332
|
-
HighLighterDirectiveTestComponent.prototype.trackBy = function (index, row) {
|
|
1333
|
-
return row.rowData;
|
|
1334
|
-
};
|
|
1335
|
-
return HighLighterDirectiveTestComponent;
|
|
1336
|
-
}());
|
|
1337
|
-
HighLighterDirectiveTestComponent.decorators = [
|
|
1338
|
-
{ type: core.Component, args: [{
|
|
1339
|
-
template: "\n <div [risk-data-table-highlighter]=\"trackBy\" [risk-data-table-highlighter-context]=\"context\"></div>"
|
|
1340
|
-
},] }
|
|
1341
|
-
];
|
|
1342
|
-
var HighLighterDirectivePage = /** @class */ (function (_super) {
|
|
1343
|
-
__extends(HighLighterDirectivePage, _super);
|
|
1344
|
-
function HighLighterDirectivePage(fixture) {
|
|
1345
|
-
return _super.call(this, fixture) || this;
|
|
1346
|
-
}
|
|
1347
|
-
Object.defineProperty(HighLighterDirectivePage.prototype, "highlightedElement", {
|
|
1348
|
-
get: function () {
|
|
1349
|
-
return this.debugElement.query(platformBrowser.By.directive(angularDatatable.HighlighterDirective));
|
|
1350
|
-
},
|
|
1351
|
-
enumerable: false,
|
|
1352
|
-
configurable: true
|
|
1353
|
-
});
|
|
1354
|
-
Object.defineProperty(HighLighterDirectivePage.prototype, "classList", {
|
|
1355
|
-
get: function () {
|
|
1356
|
-
return this.highlightedElement.nativeElement.classList;
|
|
1357
|
-
},
|
|
1358
|
-
enumerable: false,
|
|
1359
|
-
configurable: true
|
|
1360
|
-
});
|
|
1361
|
-
Object.defineProperty(HighLighterDirectivePage.prototype, "highlighter", {
|
|
1362
|
-
get: function () {
|
|
1363
|
-
return this.highlightedElement.injector.get(angularDatatable.HighlighterDirective);
|
|
1364
|
-
},
|
|
1365
|
-
enumerable: false,
|
|
1366
|
-
configurable: true
|
|
1367
|
-
});
|
|
1368
|
-
return HighLighterDirectivePage;
|
|
1369
|
-
}(Page));
|
|
1370
|
-
|
|
1371
|
-
// @dynamic
|
|
1372
|
-
var ByUtil = /** @class */ (function () {
|
|
1373
|
-
function ByUtil() {
|
|
1374
|
-
}
|
|
1375
|
-
ByUtil.and = function () {
|
|
1376
|
-
var predicates = [];
|
|
1377
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1378
|
-
predicates[_i] = arguments[_i];
|
|
1379
|
-
}
|
|
1380
|
-
return function (val) {
|
|
1381
|
-
return predicates.every(function (predicate) { return predicate(val); });
|
|
1382
|
-
};
|
|
1383
|
-
};
|
|
1384
|
-
ByUtil.or = function () {
|
|
1385
|
-
var predicates = [];
|
|
1386
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1387
|
-
predicates[_i] = arguments[_i];
|
|
1388
|
-
}
|
|
1389
|
-
return function (val) {
|
|
1390
|
-
return predicates.some(function (predicate) { return predicate(val); });
|
|
1391
|
-
};
|
|
1392
|
-
};
|
|
1393
|
-
ByUtil.not = function (predicate) {
|
|
1394
|
-
return function (val) {
|
|
1395
|
-
return !predicate(val);
|
|
1396
|
-
};
|
|
1397
|
-
};
|
|
1398
|
-
return ByUtil;
|
|
1399
|
-
}());
|
|
1400
|
-
|
|
1401
|
-
var LayoutComponentDefinition = /** @class */ (function () {
|
|
1402
|
-
function LayoutComponentDefinition(debugElement, page) {
|
|
1403
|
-
this.debugElement = debugElement;
|
|
1404
|
-
this.page = page;
|
|
1405
|
-
}
|
|
1406
|
-
Object.defineProperty(LayoutComponentDefinition.prototype, "component", {
|
|
1407
|
-
get: function () {
|
|
1408
|
-
return this.debugElement.componentInstance;
|
|
1409
|
-
},
|
|
1410
|
-
enumerable: false,
|
|
1411
|
-
configurable: true
|
|
1412
|
-
});
|
|
1413
|
-
Object.defineProperty(LayoutComponentDefinition.prototype, "headToolbar", {
|
|
1414
|
-
get: function () {
|
|
1415
|
-
return this.debugElement.query(ByUtil.and(platformBrowser.By.directive(toolbar.MatToolbar), platformBrowser.By.css('.mat-elevation-z2')));
|
|
1416
|
-
},
|
|
1417
|
-
enumerable: false,
|
|
1418
|
-
configurable: true
|
|
1419
|
-
});
|
|
1420
|
-
Object.defineProperty(LayoutComponentDefinition.prototype, "logo", {
|
|
1421
|
-
get: function () {
|
|
1422
|
-
return this.headToolbar.query(platformBrowser.By.css('.risk-layout-logo'));
|
|
1423
|
-
},
|
|
1424
|
-
enumerable: false,
|
|
1425
|
-
configurable: true
|
|
1426
|
-
});
|
|
1427
|
-
Object.defineProperty(LayoutComponentDefinition.prototype, "menu", {
|
|
1428
|
-
get: function () {
|
|
1429
|
-
return this.headToolbar.queryAll(ByUtil.or(platformBrowser.By.css('[menu-horizontal]'), platformBrowser.By.css('risk-layout-horizontal')));
|
|
1430
|
-
},
|
|
1431
|
-
enumerable: false,
|
|
1432
|
-
configurable: true
|
|
1433
|
-
});
|
|
1434
|
-
Object.defineProperty(LayoutComponentDefinition.prototype, "sideNavContainer", {
|
|
1435
|
-
get: function () {
|
|
1436
|
-
return this.debugElement.query(platformBrowser.By.directive(sidenav.MatSidenavContainer));
|
|
1437
|
-
},
|
|
1438
|
-
enumerable: false,
|
|
1439
|
-
configurable: true
|
|
1440
|
-
});
|
|
1441
|
-
Object.defineProperty(LayoutComponentDefinition.prototype, "sideNav", {
|
|
1442
|
-
get: function () {
|
|
1443
|
-
return this.sideNavContainer.query(platformBrowser.By.directive(sidenav.MatSidenav));
|
|
1444
|
-
},
|
|
1445
|
-
enumerable: false,
|
|
1446
|
-
configurable: true
|
|
1447
|
-
});
|
|
1448
|
-
LayoutComponentDefinition.prototype.openSideNav = function () {
|
|
1449
|
-
this.sideNav.componentInstance.open();
|
|
1450
|
-
this.page.advanceAndDetectChanges();
|
|
1451
|
-
};
|
|
1452
|
-
LayoutComponentDefinition.prototype.closeSideNav = function () {
|
|
1453
|
-
this.sideNav.componentInstance.close();
|
|
1454
|
-
this.page.advanceAndDetectChanges(1);
|
|
1455
|
-
};
|
|
1456
|
-
Object.defineProperty(LayoutComponentDefinition.prototype, "sideNavMenu", {
|
|
1457
|
-
get: function () {
|
|
1458
|
-
return this.sideNav.queryAll(ByUtil.or(platformBrowser.By.css('[menu-vertical]'), platformBrowser.By.css('risk-layout-vertical')));
|
|
1459
|
-
},
|
|
1460
|
-
enumerable: false,
|
|
1461
|
-
configurable: true
|
|
1462
|
-
});
|
|
1463
|
-
Object.defineProperty(LayoutComponentDefinition.prototype, "content", {
|
|
1464
|
-
get: function () {
|
|
1465
|
-
return this.sideNavContainer.query(platformBrowser.By.css('.risk-layout-content'));
|
|
1466
|
-
},
|
|
1467
|
-
enumerable: false,
|
|
1468
|
-
configurable: true
|
|
1469
|
-
});
|
|
1470
|
-
return LayoutComponentDefinition;
|
|
1471
|
-
}());
|
|
1472
|
-
var TestLayoutComponentHostPage = /** @class */ (function (_super) {
|
|
1473
|
-
__extends(TestLayoutComponentHostPage, _super);
|
|
1474
|
-
function TestLayoutComponentHostPage() {
|
|
1475
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1476
|
-
}
|
|
1477
|
-
Object.defineProperty(TestLayoutComponentHostPage.prototype, "layoutComponent", {
|
|
1478
|
-
get: function () {
|
|
1479
|
-
return new LayoutComponentDefinition(this.debugElement.query(platformBrowser.By.directive(angularView.LayoutComponent)), this);
|
|
1480
|
-
},
|
|
1481
|
-
enumerable: false,
|
|
1482
|
-
configurable: true
|
|
1483
|
-
});
|
|
1484
|
-
return TestLayoutComponentHostPage;
|
|
1485
|
-
}(Page));
|
|
1486
|
-
var TestLayoutComponentHost = /** @class */ (function () {
|
|
1487
|
-
function TestLayoutComponentHost() {
|
|
1488
|
-
}
|
|
1489
|
-
return TestLayoutComponentHost;
|
|
1490
|
-
}());
|
|
1491
|
-
TestLayoutComponentHost.decorators = [
|
|
1492
|
-
{ type: core.Component, args: [{
|
|
1493
|
-
template: "\n <risk-layout>\n <!-- menu-horizontal -->\n <risk-layout-horizontal>\n HorizontalMenu\n </risk-layout-horizontal>\n <!-- menu-horizontal -->\n\n <!-- menu-vertical -->\n <risk-layout-vertical>\n Vertical menu\n </risk-layout-vertical>\n\n <span>Content</span>\n </risk-layout>\n "
|
|
1494
|
-
},] }
|
|
1495
|
-
];
|
|
1496
|
-
|
|
1497
|
-
var RouterLinkStubDirective = /** @class */ (function () {
|
|
1498
|
-
function RouterLinkStubDirective(injector) {
|
|
1499
|
-
this.navigatedTo = null;
|
|
1500
|
-
this._urlTree = null;
|
|
1501
|
-
this.routerStub = injector.get(router.Router, null);
|
|
1502
|
-
}
|
|
1503
|
-
RouterLinkStubDirective.prototype.ngOnChanges = function (changes) {
|
|
1504
|
-
if (this.linkParams && this.routerStub) {
|
|
1505
|
-
this._urlTree = this.routerStub.getURLTree(this.linkParams);
|
|
1506
|
-
}
|
|
1507
|
-
};
|
|
1508
|
-
RouterLinkStubDirective.prototype.onClick = function () {
|
|
1509
|
-
this.navigatedTo = this.linkParams;
|
|
1510
|
-
if (this.routerStub) {
|
|
1511
|
-
if (Array.isArray(this.navigatedTo)) {
|
|
1512
|
-
this.routerStub.navigate(this.navigatedTo);
|
|
1513
|
-
}
|
|
1514
|
-
else {
|
|
1515
|
-
this.routerStub.navigateByUrl(this.navigatedTo);
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
};
|
|
1519
|
-
Object.defineProperty(RouterLinkStubDirective.prototype, "urlTree", {
|
|
1520
|
-
get: function () {
|
|
1521
|
-
return this._urlTree;
|
|
1522
|
-
},
|
|
1523
|
-
enumerable: false,
|
|
1524
|
-
configurable: true
|
|
1525
|
-
});
|
|
1526
|
-
return RouterLinkStubDirective;
|
|
1527
|
-
}());
|
|
1528
|
-
RouterLinkStubDirective.decorators = [
|
|
1529
|
-
{ type: core.Directive, args: [{
|
|
1530
|
-
// tslint:disable:directive-selector
|
|
1531
|
-
selector: '[routerLink]',
|
|
1532
|
-
// tslint:enable
|
|
1533
|
-
host: {
|
|
1534
|
-
'(click)': 'onClick()'
|
|
1535
|
-
}
|
|
1536
|
-
},] }
|
|
1537
|
-
];
|
|
1538
|
-
RouterLinkStubDirective.ctorParameters = function () { return [
|
|
1539
|
-
{ type: core.Injector }
|
|
1540
|
-
]; };
|
|
1541
|
-
RouterLinkStubDirective.propDecorators = {
|
|
1542
|
-
linkParams: [{ type: core.Input, args: ['routerLink',] }]
|
|
1543
|
-
};
|
|
1544
|
-
|
|
1545
|
-
var LinkDefinition = /** @class */ (function () {
|
|
1546
|
-
function LinkDefinition(page, link) {
|
|
1547
|
-
this.page = page;
|
|
1548
|
-
this.link = link;
|
|
1549
|
-
}
|
|
1550
|
-
Object.defineProperty(LinkDefinition.prototype, "stub", {
|
|
1551
|
-
get: function () {
|
|
1552
|
-
return this.link.injector.get(RouterLinkStubDirective);
|
|
1553
|
-
},
|
|
1554
|
-
enumerable: false,
|
|
1555
|
-
configurable: true
|
|
1556
|
-
});
|
|
1557
|
-
Object.defineProperty(LinkDefinition.prototype, "text", {
|
|
1558
|
-
get: function () {
|
|
1559
|
-
return this.link.nativeElement.textContent.trim();
|
|
1560
|
-
},
|
|
1561
|
-
enumerable: false,
|
|
1562
|
-
configurable: true
|
|
1563
|
-
});
|
|
1564
|
-
LinkDefinition.prototype.click = function () {
|
|
1565
|
-
click(this.link.nativeElement);
|
|
1566
|
-
this.page.advanceAndDetectChanges();
|
|
1567
|
-
};
|
|
1568
|
-
return LinkDefinition;
|
|
1569
|
-
}());
|
|
1570
|
-
|
|
1571
|
-
var LinkOnlyPage = /** @class */ (function (_super) {
|
|
1572
|
-
__extends(LinkOnlyPage, _super);
|
|
1573
|
-
function LinkOnlyPage(fixture) {
|
|
1574
|
-
return _super.call(this, fixture) || this;
|
|
1575
|
-
}
|
|
1576
|
-
Object.defineProperty(LinkOnlyPage.prototype, "link", {
|
|
1577
|
-
get: function () {
|
|
1578
|
-
return new LinkDefinition(this, this.debugElement.query(platformBrowser.By.directive(RouterLinkStubDirective)));
|
|
1579
|
-
},
|
|
1580
|
-
enumerable: false,
|
|
1581
|
-
configurable: true
|
|
1582
|
-
});
|
|
1583
|
-
return LinkOnlyPage;
|
|
1584
|
-
}(Page));
|
|
1585
|
-
|
|
1586
|
-
var LoginMenuPage = /** @class */ (function (_super) {
|
|
1587
|
-
__extends(LoginMenuPage, _super);
|
|
1588
|
-
function LoginMenuPage() {
|
|
1589
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1590
|
-
}
|
|
1591
|
-
Object.defineProperty(LoginMenuPage.prototype, "menuTrigger", {
|
|
1592
|
-
get: function () {
|
|
1593
|
-
return this.debugElement.query(platformBrowser.By.directive(menu.MatMenuTrigger));
|
|
1594
|
-
},
|
|
1595
|
-
enumerable: false,
|
|
1596
|
-
configurable: true
|
|
1597
|
-
});
|
|
1598
|
-
LoginMenuPage.prototype.clickMenuTrigger = function () {
|
|
1599
|
-
click(this.menuTrigger);
|
|
1600
|
-
this.waitForMenu();
|
|
1601
|
-
};
|
|
1602
|
-
LoginMenuPage.prototype.waitForMenu = function () {
|
|
1603
|
-
this.detectChanges(500);
|
|
1604
|
-
};
|
|
1605
|
-
Object.defineProperty(LoginMenuPage.prototype, "loginLink", {
|
|
1606
|
-
get: function () {
|
|
1607
|
-
return new LinkDefinition(this, this.debugElement.query(ByUtil.and(platformBrowser.By.directive(menu.MatMenuItem), function (value) { return value.nativeElement.textContent.trim().endsWith('Login'); })));
|
|
1608
|
-
},
|
|
1609
|
-
enumerable: false,
|
|
1610
|
-
configurable: true
|
|
1611
|
-
});
|
|
1612
|
-
Object.defineProperty(LoginMenuPage.prototype, "logoutLink", {
|
|
1613
|
-
get: function () {
|
|
1614
|
-
return new LinkDefinition(this, this.debugElement.query(ByUtil.and(platformBrowser.By.directive(menu.MatMenuItem), function (value) { return value.nativeElement.textContent.trim().endsWith('Logout'); })));
|
|
1615
|
-
},
|
|
1616
|
-
enumerable: false,
|
|
1617
|
-
configurable: true
|
|
1618
|
-
});
|
|
1619
|
-
return LoginMenuPage;
|
|
1620
|
-
}(Page));
|
|
1621
|
-
|
|
1622
|
-
var LoginPage = /** @class */ (function (_super) {
|
|
1623
|
-
__extends(LoginPage, _super);
|
|
1624
|
-
function LoginPage(fixture) {
|
|
1625
|
-
return _super.call(this, fixture) || this;
|
|
1626
|
-
}
|
|
1627
|
-
Object.defineProperty(LoginPage.prototype, "formElement", {
|
|
1628
|
-
get: function () {
|
|
1629
|
-
return this.debugElement.query(platformBrowser.By.css('form'));
|
|
1630
|
-
},
|
|
1631
|
-
enumerable: false,
|
|
1632
|
-
configurable: true
|
|
1633
|
-
});
|
|
1634
|
-
Object.defineProperty(LoginPage.prototype, "usernameElement", {
|
|
1635
|
-
get: function () {
|
|
1636
|
-
return this.formElement.query(platformBrowser.By.css('input[name=username]'));
|
|
1637
|
-
},
|
|
1638
|
-
enumerable: false,
|
|
1639
|
-
configurable: true
|
|
1640
|
-
});
|
|
1641
|
-
Object.defineProperty(LoginPage.prototype, "username", {
|
|
1642
|
-
set: function (username) {
|
|
1643
|
-
setNgModelValue(this.usernameElement, username);
|
|
1644
|
-
},
|
|
1645
|
-
enumerable: false,
|
|
1646
|
-
configurable: true
|
|
1647
|
-
});
|
|
1648
|
-
Object.defineProperty(LoginPage.prototype, "passwordElement", {
|
|
1649
|
-
get: function () {
|
|
1650
|
-
return this.formElement.query(platformBrowser.By.css('input[name=password]'));
|
|
1651
|
-
},
|
|
1652
|
-
enumerable: false,
|
|
1653
|
-
configurable: true
|
|
1654
|
-
});
|
|
1655
|
-
Object.defineProperty(LoginPage.prototype, "password", {
|
|
1656
|
-
set: function (password) {
|
|
1657
|
-
setNgModelValue(this.passwordElement, password);
|
|
1658
|
-
},
|
|
1659
|
-
enumerable: false,
|
|
1660
|
-
configurable: true
|
|
1661
|
-
});
|
|
1662
|
-
Object.defineProperty(LoginPage.prototype, "loginButtonElement", {
|
|
1663
|
-
get: function () {
|
|
1664
|
-
return this.formElement.query(platformBrowser.By.directive(button.MatButton));
|
|
1665
|
-
},
|
|
1666
|
-
enumerable: false,
|
|
1667
|
-
configurable: true
|
|
1668
|
-
});
|
|
1669
|
-
Object.defineProperty(LoginPage.prototype, "successMessage", {
|
|
1670
|
-
get: function () {
|
|
1671
|
-
var debugElement = this.debugElement.query(ByUtil.and(platformBrowser.By.directive(angularView.MessageComponentNoopAnimation), platformBrowser.By.css(angularView.RISK_GOOD_SELECTOR)));
|
|
1672
|
-
if (!debugElement) {
|
|
1673
|
-
return null;
|
|
1674
|
-
}
|
|
1675
|
-
return new MessageComponentDef(debugElement);
|
|
1676
|
-
},
|
|
1677
|
-
enumerable: false,
|
|
1678
|
-
configurable: true
|
|
1679
|
-
});
|
|
1680
|
-
Object.defineProperty(LoginPage.prototype, "errorMessage", {
|
|
1681
|
-
get: function () {
|
|
1682
|
-
var debugElement = this.debugElement.query(ByUtil.or(ByUtil.and(platformBrowser.By.directive(angularView.MessageComponentNoopAnimation), platformBrowser.By.css(angularView.RISK_ERROR_SELECTOR)), platformBrowser.By.css('h3')));
|
|
1683
|
-
if (!debugElement) {
|
|
1684
|
-
return null;
|
|
1685
|
-
}
|
|
1686
|
-
return new MessageComponentDef(debugElement);
|
|
1687
|
-
},
|
|
1688
|
-
enumerable: false,
|
|
1689
|
-
configurable: true
|
|
1690
|
-
});
|
|
1691
|
-
LoginPage.prototype.clickLogin = function () {
|
|
1692
|
-
click(this.loginButtonElement.nativeElement);
|
|
1693
|
-
testing.tick();
|
|
1694
|
-
this.detectChanges();
|
|
1695
|
-
};
|
|
1696
|
-
return LoginPage;
|
|
1697
|
-
}(Page));
|
|
1698
|
-
|
|
1699
|
-
var TestMessageHostComponent = /** @class */ (function () {
|
|
1700
|
-
function TestMessageHostComponent() {
|
|
1701
|
-
this.message = 'custom message';
|
|
1702
|
-
}
|
|
1703
|
-
return TestMessageHostComponent;
|
|
1704
|
-
}());
|
|
1705
|
-
TestMessageHostComponent.decorators = [
|
|
1706
|
-
{ type: core.Component, args: [{
|
|
1707
|
-
template: "\n <risk-error [message]=\"message\"></risk-error>\n <risk-good [message]=\"message\"></risk-good>\n <risk-info [message]=\"message\"></risk-info>\n <risk-message [message]=\"message\"></risk-message>\n <risk-warn [message]=\"message\"></risk-warn>\n <risk-initial-load [message]=\"message\"></risk-initial-load>\n <risk-update-failed [message]=\"message\"></risk-update-failed>\n <risk-no-data [message]=\"message\"></risk-no-data>\n "
|
|
1708
|
-
},] }
|
|
1709
|
-
];
|
|
1710
|
-
var MessageHostedPage = /** @class */ (function (_super) {
|
|
1711
|
-
__extends(MessageHostedPage, _super);
|
|
1712
|
-
function MessageHostedPage(fixture) {
|
|
1713
|
-
return _super.call(this, fixture) || this;
|
|
1714
|
-
}
|
|
1715
|
-
Object.defineProperty(MessageHostedPage.prototype, "error", {
|
|
1716
|
-
get: function () {
|
|
1717
|
-
return new MessageComponentDef(this.debugElement.query(platformBrowser.By.css(angularView.RISK_ERROR_SELECTOR)));
|
|
1718
|
-
},
|
|
1719
|
-
enumerable: false,
|
|
1720
|
-
configurable: true
|
|
1721
|
-
});
|
|
1722
|
-
Object.defineProperty(MessageHostedPage.prototype, "good", {
|
|
1723
|
-
get: function () {
|
|
1724
|
-
return new MessageComponentDef(this.debugElement.query(platformBrowser.By.css(angularView.RISK_GOOD_SELECTOR)));
|
|
1725
|
-
},
|
|
1726
|
-
enumerable: false,
|
|
1727
|
-
configurable: true
|
|
1728
|
-
});
|
|
1729
|
-
Object.defineProperty(MessageHostedPage.prototype, "info", {
|
|
1730
|
-
get: function () {
|
|
1731
|
-
return new MessageComponentDef(this.debugElement.query(platformBrowser.By.css(angularView.RISK_INFO_SELECTOR)));
|
|
1732
|
-
},
|
|
1733
|
-
enumerable: false,
|
|
1734
|
-
configurable: true
|
|
1735
|
-
});
|
|
1736
|
-
Object.defineProperty(MessageHostedPage.prototype, "message", {
|
|
1737
|
-
get: function () {
|
|
1738
|
-
return new MessageComponentDef(this.debugElement.query(platformBrowser.By.css(angularView.RISK_MESSAGE_SELECTOR)));
|
|
1739
|
-
},
|
|
1740
|
-
enumerable: false,
|
|
1741
|
-
configurable: true
|
|
1742
|
-
});
|
|
1743
|
-
Object.defineProperty(MessageHostedPage.prototype, "warn", {
|
|
1744
|
-
get: function () {
|
|
1745
|
-
return new MessageComponentDef(this.debugElement.query(platformBrowser.By.css(angularView.RISK_WARN_SELECTOR)));
|
|
1746
|
-
},
|
|
1747
|
-
enumerable: false,
|
|
1748
|
-
configurable: true
|
|
1749
|
-
});
|
|
1750
|
-
Object.defineProperty(MessageHostedPage.prototype, "initialLoad", {
|
|
1751
|
-
get: function () {
|
|
1752
|
-
return new MessageComponentDef(this.debugElement.query(platformBrowser.By.css(angularView.RISK_INITIAL_LOAD_SELECTOR)));
|
|
1753
|
-
},
|
|
1754
|
-
enumerable: false,
|
|
1755
|
-
configurable: true
|
|
1756
|
-
});
|
|
1757
|
-
Object.defineProperty(MessageHostedPage.prototype, "noData", {
|
|
1758
|
-
get: function () {
|
|
1759
|
-
return new MessageComponentDef(this.debugElement.query(platformBrowser.By.css(angularView.RISK_NO_DATA_SELECTOR)));
|
|
1760
|
-
},
|
|
1761
|
-
enumerable: false,
|
|
1762
|
-
configurable: true
|
|
1763
|
-
});
|
|
1764
|
-
Object.defineProperty(MessageHostedPage.prototype, "updateFailed", {
|
|
1765
|
-
get: function () {
|
|
1766
|
-
return new MessageComponentDef(this.debugElement.query(platformBrowser.By.css(angularView.RISK_UPDATE_FAILED_SELECTOR)));
|
|
1767
|
-
},
|
|
1768
|
-
enumerable: false,
|
|
1769
|
-
configurable: true
|
|
1770
|
-
});
|
|
1771
|
-
return MessageHostedPage;
|
|
1772
|
-
}(Page));
|
|
1773
|
-
|
|
1774
|
-
var storage = { authRequestedPath: null };
|
|
1775
|
-
var AuthRoutingFlowServiceStub = /** @class */ (function (_super) {
|
|
1776
|
-
__extends(AuthRoutingFlowServiceStub, _super);
|
|
1777
|
-
function AuthRoutingFlowServiceStub(authServiceStub, authConfig) {
|
|
1778
|
-
var _this = _super.call(this, null, null, { loggedIn: rxjs.of(null) }, storage, authConfig, null) || this;
|
|
1779
|
-
_this.authServiceStub = authServiceStub;
|
|
1780
|
-
// cleanup
|
|
1781
|
-
storage.authRequestedPath = null;
|
|
1782
|
-
return _this;
|
|
1783
|
-
}
|
|
1784
|
-
AuthRoutingFlowServiceStub.prototype.logout = function (state) {
|
|
1785
|
-
return this.authServiceStub.logout().pipe(operators.defaultIfEmpty(), operators.map(function () { return true; }));
|
|
1786
|
-
};
|
|
1787
|
-
AuthRoutingFlowServiceStub.prototype.login = function (username, password) {
|
|
1788
|
-
return this.authServiceStub.directLogin(username, password);
|
|
1789
|
-
};
|
|
1790
|
-
AuthRoutingFlowServiceStub.prototype.loginViaService = function () {
|
|
1791
|
-
return this.authServiceStub.loginViaAuthService();
|
|
1792
|
-
};
|
|
1793
|
-
return AuthRoutingFlowServiceStub;
|
|
1794
|
-
}(angularAuth.AuthRoutingFlowService));
|
|
1795
|
-
AuthRoutingFlowServiceStub.decorators = [
|
|
1796
|
-
{ type: core.Injectable }
|
|
1797
|
-
];
|
|
1798
|
-
AuthRoutingFlowServiceStub.ctorParameters = function () { return [
|
|
1799
|
-
{ type: angularAuth.AuthService, decorators: [{ type: core.Inject, args: [angularCommon.AUTH_PROVIDER,] }] },
|
|
1800
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [angularAuth.AUTH_CONFIG,] }] }
|
|
1801
|
-
]; };
|
|
1802
|
-
|
|
1803
|
-
var WELL_KNOWN = {
|
|
1804
|
-
endpoints: {
|
|
1805
|
-
auth: '/auth',
|
|
1806
|
-
token: '/token',
|
|
1807
|
-
logout: '/logout'
|
|
1808
|
-
},
|
|
1809
|
-
issuer: 'risk-auth'
|
|
1810
|
-
};
|
|
1811
|
-
var WellKnownServiceStub = /** @class */ (function () {
|
|
1812
|
-
function WellKnownServiceStub() {
|
|
1813
|
-
}
|
|
1814
|
-
Object.defineProperty(WellKnownServiceStub.prototype, "wellKnown", {
|
|
1815
|
-
get: function () {
|
|
1816
|
-
return rxjs.of(WELL_KNOWN);
|
|
1817
|
-
},
|
|
1818
|
-
enumerable: false,
|
|
1819
|
-
configurable: true
|
|
1820
|
-
});
|
|
1821
|
-
return WellKnownServiceStub;
|
|
1822
|
-
}());
|
|
1823
|
-
WellKnownServiceStub.decorators = [
|
|
1824
|
-
{ type: core.Injectable }
|
|
1825
|
-
];
|
|
1826
|
-
|
|
1827
|
-
var AuthServiceStub = /** @class */ (function (_super) {
|
|
1828
|
-
__extends(AuthServiceStub, _super);
|
|
1829
|
-
function AuthServiceStub() {
|
|
1830
|
-
return _super.call(this, {}, new WellKnownServiceStub(), null, null, null) || this;
|
|
1831
|
-
}
|
|
1832
|
-
Object.defineProperty(AuthServiceStub.prototype, "loggedIn", {
|
|
1833
|
-
get: function () {
|
|
1834
|
-
return rxjs.of(!!this.user);
|
|
1835
|
-
},
|
|
1836
|
-
enumerable: false,
|
|
1837
|
-
configurable: true
|
|
1838
|
-
});
|
|
1839
|
-
Object.defineProperty(AuthServiceStub.prototype, "userProfile", {
|
|
1840
|
-
get: function () {
|
|
1841
|
-
return rxjs.of({
|
|
1842
|
-
name: this.user
|
|
1843
|
-
});
|
|
1844
|
-
},
|
|
1845
|
-
enumerable: false,
|
|
1846
|
-
configurable: true
|
|
1847
|
-
});
|
|
1848
|
-
AuthServiceStub.prototype.loginViaAuthService = function () {
|
|
1849
|
-
return rxjs.of(true);
|
|
1850
|
-
};
|
|
1851
|
-
AuthServiceStub.prototype.checkLocationForLoginData = function () {
|
|
1852
|
-
return rxjs.of(true);
|
|
1853
|
-
};
|
|
1854
|
-
AuthServiceStub.prototype.directLogin = function (username, password) {
|
|
1855
|
-
this.user = username;
|
|
1856
|
-
this.emitLoginStatusChange(true);
|
|
1857
|
-
return rxjs.of(true);
|
|
1858
|
-
};
|
|
1859
|
-
AuthServiceStub.prototype.logout = function () {
|
|
1860
|
-
this.emitLoginStatusChange(false);
|
|
1861
|
-
delete this.user;
|
|
1862
|
-
return rxjs.EMPTY;
|
|
1863
|
-
};
|
|
1864
|
-
return AuthServiceStub;
|
|
1865
|
-
}(angularAuth.AuthService));
|
|
1866
|
-
AuthServiceStub.decorators = [
|
|
1867
|
-
{ type: core.Injectable }
|
|
1868
|
-
];
|
|
1869
|
-
AuthServiceStub.ctorParameters = function () { return []; };
|
|
1870
|
-
|
|
1871
|
-
var LoginMenuComponentStub = /** @class */ (function () {
|
|
1872
|
-
function LoginMenuComponentStub() {
|
|
1873
|
-
this.orientation = 'row';
|
|
1874
|
-
}
|
|
1875
|
-
return LoginMenuComponentStub;
|
|
1876
|
-
}());
|
|
1877
|
-
LoginMenuComponentStub.decorators = [
|
|
1878
|
-
{ type: core.Component, args: [{
|
|
1879
|
-
selector: 'login-menu, risk-login-menu',
|
|
1880
|
-
template: ''
|
|
1881
|
-
},] }
|
|
1882
|
-
];
|
|
1883
|
-
LoginMenuComponentStub.propDecorators = {
|
|
1884
|
-
orientation: [{ type: core.Input }]
|
|
1885
|
-
};
|
|
1886
|
-
|
|
1887
|
-
var ActivatedRouteStub = /** @class */ (function () {
|
|
1888
|
-
function ActivatedRouteStub() {
|
|
1889
|
-
// Test parameters
|
|
1890
|
-
this._testParams = {};
|
|
1891
|
-
// ActivatedRoute.params is Observable
|
|
1892
|
-
this.subject = new rxjs.BehaviorSubject(this.testParams);
|
|
1893
|
-
this.params = this.subject.asObservable();
|
|
1894
|
-
}
|
|
1895
|
-
Object.defineProperty(ActivatedRouteStub.prototype, "testParams", {
|
|
1896
|
-
get: function () {
|
|
1897
|
-
return this._testParams;
|
|
1898
|
-
},
|
|
1899
|
-
set: function (params) {
|
|
1900
|
-
this._testParams = params;
|
|
1901
|
-
this.subject.next(params);
|
|
1902
|
-
},
|
|
1903
|
-
enumerable: false,
|
|
1904
|
-
configurable: true
|
|
1905
|
-
});
|
|
1906
|
-
Object.defineProperty(ActivatedRouteStub.prototype, "snapshot", {
|
|
1907
|
-
// ActivatedRoute.snapshot.params
|
|
1908
|
-
get: function () {
|
|
1909
|
-
return { params: this.testParams };
|
|
1910
|
-
},
|
|
1911
|
-
enumerable: false,
|
|
1912
|
-
configurable: true
|
|
1913
|
-
});
|
|
1914
|
-
return ActivatedRouteStub;
|
|
1915
|
-
}());
|
|
1916
|
-
ActivatedRouteStub.decorators = [
|
|
1917
|
-
{ type: core.Injectable }
|
|
1918
|
-
];
|
|
1919
|
-
|
|
1920
|
-
var RouterOutletStub = /** @class */ (function () {
|
|
1921
|
-
function RouterOutletStub() {
|
|
1922
|
-
}
|
|
1923
|
-
return RouterOutletStub;
|
|
1924
|
-
}());
|
|
1925
|
-
RouterOutletStub.decorators = [
|
|
1926
|
-
{ type: core.Component, args: [{
|
|
1927
|
-
// tslint:disable:component-selector
|
|
1928
|
-
selector: 'router-outlet',
|
|
1929
|
-
// tslint:enable
|
|
1930
|
-
template: ''
|
|
1931
|
-
},] }
|
|
1932
|
-
];
|
|
1933
|
-
|
|
1934
|
-
var Snapshot = /** @class */ (function () {
|
|
1935
|
-
function Snapshot(stub) {
|
|
1936
|
-
this.stub = stub;
|
|
1937
|
-
}
|
|
1938
|
-
Object.defineProperty(Snapshot.prototype, "url", {
|
|
1939
|
-
get: function () {
|
|
1940
|
-
return this.stub.getCurrentURL();
|
|
1941
|
-
},
|
|
1942
|
-
enumerable: false,
|
|
1943
|
-
configurable: true
|
|
1944
|
-
});
|
|
1945
|
-
return Snapshot;
|
|
1946
|
-
}());
|
|
1947
|
-
// @dynamic
|
|
1948
|
-
var RouterStub = /** @class */ (function () {
|
|
1949
|
-
function RouterStub() {
|
|
1950
|
-
this.id = 0;
|
|
1951
|
-
this.navigated = true;
|
|
1952
|
-
this.currentUrlTree = this.createUrlTree(['/dashboard']);
|
|
1953
|
-
this.routerState = {
|
|
1954
|
-
snapshot: new Snapshot(this)
|
|
1955
|
-
};
|
|
1956
|
-
this.events = new core.EventEmitter();
|
|
1957
|
-
}
|
|
1958
|
-
RouterStub.prototype.getURLTree = function (url) {
|
|
1959
|
-
if (Array.isArray(url)) {
|
|
1960
|
-
return this.createUrlTree(url);
|
|
1961
|
-
}
|
|
1962
|
-
if (url instanceof Object) {
|
|
1963
|
-
return url;
|
|
1964
|
-
}
|
|
1965
|
-
return this.createUrlTree(url.split('/'));
|
|
1966
|
-
};
|
|
1967
|
-
RouterStub.prototype.navigateByUrl = function (url) {
|
|
1968
|
-
this.currentUrlTree = this.getURLTree(url);
|
|
1969
|
-
this.emitNavigate();
|
|
1970
|
-
return url;
|
|
1971
|
-
};
|
|
1972
|
-
RouterStub.prototype.navigate = function (commands, extras) {
|
|
1973
|
-
this.currentUrlTree = this.getURLTree(commands);
|
|
1974
|
-
this.emitNavigate();
|
|
1975
|
-
return [commands, extras];
|
|
1976
|
-
};
|
|
1977
|
-
RouterStub.prototype.emitNavigate = function () {
|
|
1978
|
-
this.id++;
|
|
1979
|
-
var urlString = this.getCurrentURL();
|
|
1980
|
-
this.events.emit(new router.NavigationEnd(this.id, urlString, urlString));
|
|
1981
|
-
};
|
|
1982
|
-
RouterStub.prototype.isActive = function (url) {
|
|
1983
|
-
return this.getCurrentURL().indexOf(RouterStub.serializeUrl(url)) !== -1;
|
|
1984
|
-
};
|
|
1985
|
-
RouterStub.prototype.getCurrentURL = function () {
|
|
1986
|
-
return RouterStub.serializeUrl(this.currentUrlTree);
|
|
1987
|
-
};
|
|
1988
|
-
RouterStub.prototype.createUrlTree = function (commands, extras) {
|
|
1989
|
-
var _b = extras || {};
|
|
1990
|
-
var queryParams = _b.queryParams || {};
|
|
1991
|
-
var fragment = _b.fragment || '';
|
|
1992
|
-
return {
|
|
1993
|
-
root: new router.UrlSegmentGroup(commands.map(function (command) {
|
|
1994
|
-
return new router.UrlSegment(command, {});
|
|
1995
|
-
}), {}),
|
|
1996
|
-
queryParams: queryParams,
|
|
1997
|
-
fragment: fragment,
|
|
1998
|
-
queryParamMap: Object.assign(Object.assign({}, new Map()), { getAll: function () { return []; }, keys: [] })
|
|
1999
|
-
};
|
|
2000
|
-
};
|
|
2001
|
-
RouterStub.serializeUrl = function (url) {
|
|
2002
|
-
return url.root.segments.map(function (segment) { return segment.path; }).join('/');
|
|
2003
|
-
};
|
|
2004
|
-
return RouterStub;
|
|
2005
|
-
}());
|
|
2006
|
-
RouterStub.decorators = [
|
|
2007
|
-
{ type: core.Injectable }
|
|
2008
|
-
];
|
|
2009
|
-
|
|
2010
|
-
function stubRouter(customOverrides) {
|
|
2011
|
-
var override = {
|
|
2012
|
-
set: {
|
|
2013
|
-
imports: [],
|
|
2014
|
-
declarations: [
|
|
2015
|
-
RouterLinkStubDirective,
|
|
2016
|
-
RouterOutletStub
|
|
2017
|
-
],
|
|
2018
|
-
providers: [
|
|
2019
|
-
{
|
|
2020
|
-
provide: router.Router,
|
|
2021
|
-
useClass: RouterStub
|
|
2022
|
-
},
|
|
2023
|
-
{
|
|
2024
|
-
provide: router.ActivatedRoute,
|
|
2025
|
-
useClass: ActivatedRouteStub
|
|
2026
|
-
}
|
|
2027
|
-
],
|
|
2028
|
-
exports: [
|
|
2029
|
-
RouterLinkStubDirective,
|
|
2030
|
-
RouterOutletStub
|
|
2031
|
-
],
|
|
2032
|
-
entryComponents: []
|
|
2033
|
-
}
|
|
2034
|
-
};
|
|
2035
|
-
if (customOverrides) {
|
|
2036
|
-
if (customOverrides.add) {
|
|
2037
|
-
override.add = customOverrides.add;
|
|
2038
|
-
}
|
|
2039
|
-
if (customOverrides.set) {
|
|
2040
|
-
Object.assign(override.set, customOverrides.set);
|
|
2041
|
-
}
|
|
2042
|
-
if (customOverrides.remove) {
|
|
2043
|
-
override.remove = customOverrides.remove;
|
|
2044
|
-
}
|
|
2045
|
-
}
|
|
2046
|
-
return testing.TestBed.overrideModule(router.RouterModule, override);
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
function disableMaterialAnimations(ngModule) {
|
|
2050
|
-
testing.TestBed.overrideModule(ngModule, {
|
|
2051
|
-
remove: {
|
|
2052
|
-
imports: [angularView.CommonViewModule]
|
|
2053
|
-
},
|
|
2054
|
-
add: {
|
|
2055
|
-
imports: [angularView.NoopAnimationsCommonViewModule]
|
|
2056
|
-
}
|
|
2057
|
-
});
|
|
2058
|
-
}
|
|
2059
|
-
function compileTestBed(compileFunction, destroyFunction, stubMatchMedia) {
|
|
2060
|
-
if (stubMatchMedia === void 0) { stubMatchMedia = true; }
|
|
2061
|
-
var matchMedia;
|
|
2062
|
-
beforeEach(function (done) {
|
|
2063
|
-
if (stubMatchMedia) {
|
|
2064
|
-
matchMedia = window.matchMedia;
|
|
2065
|
-
window.matchMedia = fakeMatchMedia();
|
|
2066
|
-
}
|
|
2067
|
-
compileFunction()
|
|
2068
|
-
.then(done)
|
|
2069
|
-
.catch(function (err) {
|
|
2070
|
-
done.fail(err);
|
|
2071
|
-
});
|
|
2072
|
-
}, COMPILE_TIMEOUT_INTERVAL);
|
|
2073
|
-
afterEach(function () {
|
|
2074
|
-
if (destroyFunction) {
|
|
2075
|
-
destroyFunction();
|
|
2076
|
-
}
|
|
2077
|
-
if (stubMatchMedia) {
|
|
2078
|
-
window.matchMedia = matchMedia;
|
|
2079
|
-
}
|
|
2080
|
-
}, COMPILE_TIMEOUT_INTERVAL);
|
|
2081
|
-
}
|
|
2082
|
-
function fakeMatchMedia(matches) {
|
|
2083
|
-
if (matches === void 0) { matches = false; }
|
|
2084
|
-
return function (mediaQuery) { return ({
|
|
2085
|
-
matches: matches,
|
|
2086
|
-
media: mediaQuery,
|
|
2087
|
-
onchange: function () { return null; },
|
|
2088
|
-
addListener: function () { return null; },
|
|
2089
|
-
addEventListener: function () { return null; },
|
|
2090
|
-
removeListener: function () { return null; },
|
|
2091
|
-
removeEventListener: function () { return null; },
|
|
2092
|
-
dispatchEvent: function (event) { return true; }
|
|
2093
|
-
}); };
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
var TestingModule = /** @class */ (function () {
|
|
2097
|
-
function TestingModule() {
|
|
2098
|
-
}
|
|
2099
|
-
return TestingModule;
|
|
2100
|
-
}());
|
|
2101
|
-
TestingModule.decorators = [
|
|
2102
|
-
{ type: core.NgModule, args: [{
|
|
2103
|
-
imports: [
|
|
2104
|
-
angularView.CommonViewModule,
|
|
2105
|
-
angularFile.FileModule,
|
|
2106
|
-
angularDatatable.DataTableModule
|
|
2107
|
-
],
|
|
2108
|
-
declarations: [
|
|
2109
|
-
DownloadTestComponent,
|
|
2110
|
-
TestDataTableHostComponent,
|
|
2111
|
-
HighLighterDirectiveTestComponent,
|
|
2112
|
-
TestLayoutComponentHost,
|
|
2113
|
-
RouterLinkStubDirective,
|
|
2114
|
-
TestMessageHostComponent,
|
|
2115
|
-
LoginMenuComponentStub,
|
|
2116
|
-
RouterOutletStub
|
|
2117
|
-
]
|
|
2118
|
-
},] }
|
|
2119
|
-
];
|
|
2120
|
-
|
|
2121
|
-
var CachedResourceProviderImpl = /** @class */ (function (_super) {
|
|
2122
|
-
__extends(CachedResourceProviderImpl, _super);
|
|
2123
|
-
function CachedResourceProviderImpl() {
|
|
2124
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2125
|
-
}
|
|
2126
|
-
CachedResourceProviderImpl.prototype.get = function (url) {
|
|
2127
|
-
if (CachedResourceProviderImpl.cache[url]) {
|
|
2128
|
-
return CachedResourceProviderImpl.cache[url];
|
|
2129
|
-
}
|
|
2130
|
-
return rxjs.from(_super.prototype.get.call(this, url)).pipe(operators.map(function (content) {
|
|
2131
|
-
CachedResourceProviderImpl.cache[url] = Promise.resolve(content);
|
|
2132
|
-
return content;
|
|
2133
|
-
})).toPromise();
|
|
2134
|
-
};
|
|
2135
|
-
return CachedResourceProviderImpl;
|
|
2136
|
-
}(platformBrowserDynamic["ɵResourceLoaderImpl"]));
|
|
2137
|
-
CachedResourceProviderImpl.cache = {};
|
|
2138
|
-
|
|
2139
|
-
// WARNING: Do not change order in this file!!! Environment has to be first as it includes polyfills
|
|
2140
|
-
// Add CachedResourceProviderImpl to compiler configuration
|
|
2141
|
-
if ('beforeEach' in common.globalScope && common.globalScope.beforeEach) {
|
|
2142
|
-
common.globalScope.beforeEach(function () {
|
|
2143
|
-
testing.TestBed.configureCompiler({
|
|
2144
|
-
providers: [
|
|
2145
|
-
{
|
|
2146
|
-
deps: [],
|
|
2147
|
-
provide: compiler.ResourceLoader,
|
|
2148
|
-
useClass: CachedResourceProviderImpl
|
|
2149
|
-
}
|
|
2150
|
-
]
|
|
2151
|
-
});
|
|
2152
|
-
// Disable logging in Safari as the Selenium WebDriver is not working there correctly....
|
|
2153
|
-
if ('navigator' in common.globalScope) {
|
|
2154
|
-
var ua = common.globalScope.navigator.userAgent.toLowerCase();
|
|
2155
|
-
if ('spyOn' in common.globalScope && common.globalScope.spyOn
|
|
2156
|
-
&& ua.indexOf('safari') > -1
|
|
2157
|
-
&& ua.indexOf('chrome') === -1) {
|
|
2158
|
-
common.globalScope.spyOn(console, 'log').and.stub();
|
|
2159
|
-
common.globalScope.spyOn(console, 'info').and.stub();
|
|
2160
|
-
common.globalScope.spyOn(console, 'warn').and.stub();
|
|
2161
|
-
common.globalScope.spyOn(console, 'debug').and.stub();
|
|
2162
|
-
common.globalScope.spyOn(console, 'error').and.stub();
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
});
|
|
2166
|
-
}
|
|
2167
|
-
|
|
2168
|
-
/**
|
|
2169
|
-
* Generated bundle index. Do not edit.
|
|
2170
|
-
*/
|
|
2171
|
-
|
|
2172
|
-
Object.defineProperty(exports, 'LayoutComponent', {
|
|
2173
|
-
enumerable: true,
|
|
2174
|
-
get: function () { return angularView.LayoutComponent; }
|
|
2175
|
-
});
|
|
2176
|
-
Object.defineProperty(exports, 'MessageComponentNoopAnimation', {
|
|
2177
|
-
enumerable: true,
|
|
2178
|
-
get: function () { return angularView.MessageComponentNoopAnimation; }
|
|
2179
|
-
});
|
|
2180
|
-
Object.defineProperty(exports, 'NoopAnimationsCommonViewModule', {
|
|
2181
|
-
enumerable: true,
|
|
2182
|
-
get: function () { return angularView.NoopAnimationsCommonViewModule; }
|
|
2183
|
-
});
|
|
2184
|
-
exports.ActivatedRouteStub = ActivatedRouteStub;
|
|
2185
|
-
exports.AuthRoutingFlowServiceStub = AuthRoutingFlowServiceStub;
|
|
2186
|
-
exports.AuthServiceStub = AuthServiceStub;
|
|
2187
|
-
exports.BUTTON_CLICK_EVENTS = BUTTON_CLICK_EVENTS;
|
|
2188
|
-
exports.ByUtil = ByUtil;
|
|
2189
|
-
exports.COMPILE_TIMEOUT_INTERVAL = COMPILE_TIMEOUT_INTERVAL;
|
|
2190
|
-
exports.CSVDownloadMenuPage = CSVDownloadMenuPage;
|
|
2191
|
-
exports.DataTableDefinition = DataTableDefinition;
|
|
2192
|
-
exports.DataTableDefinitionHosted = DataTableDefinitionHosted;
|
|
2193
|
-
exports.DownloadLink = DownloadLink;
|
|
2194
|
-
exports.DownloadTestComponent = DownloadTestComponent;
|
|
2195
|
-
exports.DownloadTestComponentPage = DownloadTestComponentPage;
|
|
2196
|
-
exports.FAKE_HTTP_ASYNC_TIMEOUT = FAKE_HTTP_ASYNC_TIMEOUT;
|
|
2197
|
-
exports.HighLighterDirectivePage = HighLighterDirectivePage;
|
|
2198
|
-
exports.HighLighterDirectiveTestComponent = HighLighterDirectiveTestComponent;
|
|
2199
|
-
exports.HttpAsyncServiceStub = HttpAsyncServiceStub;
|
|
2200
|
-
exports.HttpServiceStub = HttpServiceStub;
|
|
2201
|
-
exports.LayoutComponentDefinition = LayoutComponentDefinition;
|
|
2202
|
-
exports.LinkDefinition = LinkDefinition;
|
|
2203
|
-
exports.LinkOnlyPage = LinkOnlyPage;
|
|
2204
|
-
exports.LoginMenuComponentStub = LoginMenuComponentStub;
|
|
2205
|
-
exports.LoginMenuPage = LoginMenuPage;
|
|
2206
|
-
exports.LoginPage = LoginPage;
|
|
2207
|
-
exports.MessageComponentDef = MessageComponentDef;
|
|
2208
|
-
exports.MessageHostedPage = MessageHostedPage;
|
|
2209
|
-
exports.Page = Page;
|
|
2210
|
-
exports.PageWithLoading = PageWithLoading;
|
|
2211
|
-
exports.Pager = Pager;
|
|
2212
|
-
exports.RecordsCount = RecordsCount;
|
|
2213
|
-
exports.RouterLinkStubDirective = RouterLinkStubDirective;
|
|
2214
|
-
exports.RouterOutletStub = RouterOutletStub;
|
|
2215
|
-
exports.RouterStub = RouterStub;
|
|
2216
|
-
exports.RowExpander = RowExpander;
|
|
2217
|
-
exports.Snapshot = Snapshot;
|
|
2218
|
-
exports.SortingHandle = SortingHandle;
|
|
2219
|
-
exports.TableBody = TableBody;
|
|
2220
|
-
exports.TableBodyCell = TableBodyCell;
|
|
2221
|
-
exports.TableBodyDetail = TableBodyDetail;
|
|
2222
|
-
exports.TableBodyDetailBody = TableBodyDetailBody;
|
|
2223
|
-
exports.TableBodyDetailRow = TableBodyDetailRow;
|
|
2224
|
-
exports.TableBodyRow = TableBodyRow;
|
|
2225
|
-
exports.TableFooter = TableFooter;
|
|
2226
|
-
exports.TableFooterRow = TableFooterRow;
|
|
2227
|
-
exports.TableHeader = TableHeader;
|
|
2228
|
-
exports.TableHeaderCell = TableHeaderCell;
|
|
2229
|
-
exports.TableHeaderRow = TableHeaderRow;
|
|
2230
|
-
exports.TableSorting = TableSorting;
|
|
2231
|
-
exports.TestDataTableHostComponent = TestDataTableHostComponent;
|
|
2232
|
-
exports.TestLayoutComponentHost = TestLayoutComponentHost;
|
|
2233
|
-
exports.TestLayoutComponentHostPage = TestLayoutComponentHostPage;
|
|
2234
|
-
exports.TestMessageHostComponent = TestMessageHostComponent;
|
|
2235
|
-
exports.TestingModule = TestingModule;
|
|
2236
|
-
exports.WELL_KNOWN = WELL_KNOWN;
|
|
2237
|
-
exports.WellKnownServiceStub = WellKnownServiceStub;
|
|
2238
|
-
exports.chceckSorting = chceckSorting;
|
|
2239
|
-
exports.click = click;
|
|
2240
|
-
exports.compileTestBed = compileTestBed;
|
|
2241
|
-
exports.disableMaterialAnimations = disableMaterialAnimations;
|
|
2242
|
-
exports.dispatchEvent = dispatchEvent;
|
|
2243
|
-
exports.initTestEnvironment = initTestEnvironment;
|
|
2244
|
-
exports.newEvent = newEvent;
|
|
2245
|
-
exports.setNgModelSelectValue = setNgModelSelectValue;
|
|
2246
|
-
exports.setNgModelValue = setNgModelValue;
|
|
2247
|
-
exports.storage = storage;
|
|
2248
|
-
exports.stubRouter = stubRouter;
|
|
2249
|
-
|
|
2250
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2251
|
-
|
|
2252
|
-
}));
|
|
2253
|
-
//# sourceMappingURL=dbg-riskit-angular-testing.umd.js.map
|