@memberjunction/ng-explorer-core 0.9.79 → 0.9.116
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/dist/lib/ask-skip/ask-skip.component.d.ts +87 -86
- package/dist/lib/ask-skip/ask-skip.component.js +615 -580
- package/dist/lib/ask-skip/skip-dynamic-report-wrapper.d.ts +12 -12
- package/dist/lib/ask-skip/skip-dynamic-report-wrapper.js +40 -39
- package/dist/lib/auth-button/auth-button.component.d.ts +12 -12
- package/dist/lib/auth-button/auth-button.component.js +44 -43
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts +18 -18
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +118 -117
- package/dist/lib/data-browser-component/data-browser.component.d.ts +16 -14
- package/dist/lib/data-browser-component/data-browser.component.js +96 -91
- package/dist/lib/favorites/favorites.component.d.ts +14 -14
- package/dist/lib/favorites/favorites.component.js +114 -114
- package/dist/lib/generic/base-form-component.d.ts +76 -76
- package/dist/lib/generic/base-form-component.js +436 -436
- package/dist/lib/generic/base-form-section-component.d.ts +6 -6
- package/dist/lib/generic/base-form-section-component.js +9 -9
- package/dist/lib/generic/base-record-component.d.ts +6 -6
- package/dist/lib/generic/base-record-component.js +15 -15
- package/dist/lib/generic/base-resource-component.d.ts +34 -34
- package/dist/lib/generic/base-resource-component.js +75 -75
- package/dist/lib/generic/dynamic-chart.d.ts +33 -33
- package/dist/lib/generic/dynamic-chart.js +236 -235
- package/dist/lib/generic/dynamic-grid.d.ts +25 -25
- package/dist/lib/generic/dynamic-grid.js +120 -119
- package/dist/lib/generic/dynamic-report.d.ts +38 -38
- package/dist/lib/generic/dynamic-report.js +353 -347
- package/dist/lib/generic/form-toolbar.d.ts +7 -7
- package/dist/lib/generic/form-toolbar.js +85 -89
- package/dist/lib/generic/resource-container-component.d.ts +25 -25
- package/dist/lib/generic/resource-container-component.js +104 -103
- package/dist/lib/generic/section-loader-component.d.ts +17 -17
- package/dist/lib/generic/section-loader-component.js +66 -65
- package/dist/lib/generic-browse-list/generic-browse-list.component.d.ts +26 -24
- package/dist/lib/generic-browse-list/generic-browse-list.component.js +145 -143
- package/dist/lib/guards/auth-guard.service.d.ts +11 -11
- package/dist/lib/guards/auth-guard.service.js +24 -24
- package/dist/lib/guards/entities.guard.d.ts +3 -3
- package/dist/lib/guards/entities.guard.js +38 -38
- package/dist/lib/header/MSFT_UserImageService.d.ts +11 -11
- package/dist/lib/header/MSFT_UserImageService.js +23 -23
- package/dist/lib/header/header.component.d.ts +51 -51
- package/dist/lib/header/header.component.js +220 -208
- package/dist/lib/home-component/home.component.d.ts +11 -9
- package/dist/lib/home-component/home.component.js +77 -54
- package/dist/lib/join-grid/join-grid.component.d.ts +30 -30
- package/dist/lib/join-grid/join-grid.component.js +222 -225
- package/dist/lib/navigation/navigation.component.d.ts +104 -103
- package/dist/lib/navigation/navigation.component.js +1026 -1004
- package/dist/lib/query-browser-component/query-browser.component.d.ts +14 -0
- package/dist/lib/query-browser-component/query-browser.component.js +56 -0
- package/dist/lib/report-browser-component/report-browser.component.d.ts +14 -14
- package/dist/lib/report-browser-component/report-browser.component.js +56 -55
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +8 -8
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +51 -50
- package/dist/lib/resource-wrappers/query-resource.component.d.ts +10 -0
- package/dist/lib/resource-wrappers/query-resource.component.js +55 -0
- package/dist/lib/resource-wrappers/record-resource.component.d.ts +10 -10
- package/dist/lib/resource-wrappers/record-resource.component.js +71 -70
- package/dist/lib/resource-wrappers/report-resource.component.d.ts +10 -10
- package/dist/lib/resource-wrappers/report-resource.component.js +55 -54
- package/dist/lib/resource-wrappers/resource-wrappers-loader.d.ts +1 -1
- package/dist/lib/resource-wrappers/resource-wrappers-loader.js +14 -12
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts +10 -10
- package/dist/lib/resource-wrappers/search-results-resource.component.js +52 -51
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +8 -8
- package/dist/lib/resource-wrappers/view-resource.component.js +61 -60
- package/dist/lib/settings/settings.component.d.ts +5 -5
- package/dist/lib/settings/settings.component.js +15 -14
- package/dist/lib/single-application/single-application.component.d.ts +20 -20
- package/dist/lib/single-application/single-application.component.js +113 -113
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts +28 -28
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +210 -212
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts +13 -13
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +60 -59
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +26 -26
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +170 -169
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts +75 -75
- package/dist/lib/single-dashboard/single-dashboard.component.js +464 -456
- package/dist/lib/single-entity/single-entity.component.d.ts +33 -33
- package/dist/lib/single-entity/single-entity.component.js +258 -252
- package/dist/lib/single-query/single-query.component.d.ts +16 -0
- package/dist/lib/single-query/single-query.component.js +70 -0
- package/dist/lib/single-record/single-record.component.d.ts +21 -21
- package/dist/lib/single-record/single-record.component.js +95 -95
- package/dist/lib/single-report/single-report.component.d.ts +21 -22
- package/dist/lib/single-report/single-report.component.js +89 -87
- package/dist/lib/single-search-result/single-search-result.component.d.ts +15 -15
- package/dist/lib/single-search-result/single-search-result.component.js +61 -60
- package/dist/lib/single-view/single-view.component.d.ts +38 -38
- package/dist/lib/single-view/single-view.component.js +201 -201
- package/dist/lib/user-notifications/user-notifications.component.d.ts +32 -32
- package/dist/lib/user-notifications/user-notifications.component.js +282 -282
- package/dist/lib/user-profile/user-profile.component.d.ts +10 -10
- package/dist/lib/user-profile/user-profile.component.js +42 -41
- package/dist/lib/user-view-properties/view-properties-dialog.component.d.ts +71 -71
- package/dist/lib/user-view-properties/view-properties-dialog.component.js +594 -581
- package/dist/module.d.ts +65 -65
- package/dist/module.js +328 -338
- package/dist/public-api.d.ts +42 -47
- package/dist/public-api.js +45 -50
- package/dist/shared/shared.service.d.ts +94 -92
- package/dist/shared/shared.service.js +324 -318
- package/dist/shared/urlPipe.d.ts +7 -7
- package/dist/shared/urlPipe.js +16 -16
- package/package.json +24 -15
|
@@ -1,1004 +1,1026 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Component, ElementRef, ViewChild, HostListener, HostBinding, Input } from '@angular/core';
|
|
11
|
-
import { NavigationEnd, NavigationSkipped } from '@angular/router';
|
|
12
|
-
import { DrawerComponent } from "@progress/kendo-angular-layout";
|
|
13
|
-
import { Metadata, RunView, LogError } from '@memberjunction/core';
|
|
14
|
-
import { MJEventType, MJGlobal } from '@memberjunction/global';
|
|
15
|
-
import { EventCodes } from '
|
|
16
|
-
import { BaseResourceComponent, ResourceData } from '
|
|
17
|
-
import * as i0 from "@angular/core";
|
|
18
|
-
import * as i1 from "@angular/router";
|
|
19
|
-
import * as i2 from "
|
|
20
|
-
import * as i3 from "@angular/common";
|
|
21
|
-
import * as i4 from "@angular/platform-browser";
|
|
22
|
-
import * as i5 from "@progress/kendo-angular-indicators";
|
|
23
|
-
import * as i6 from "@progress/kendo-angular-layout";
|
|
24
|
-
import * as i7 from "@progress/kendo-angular-icons";
|
|
25
|
-
import * as i8 from "@memberjunction/ng-container-directives";
|
|
26
|
-
import * as i9 from "../generic/resource-container-component";
|
|
27
|
-
const _c0 = ["drawerWrapper"];
|
|
28
|
-
const _c1 = ["tabstrip"];
|
|
29
|
-
const _c2 = ["container"];
|
|
30
|
-
function NavigationComponent_kendo_loader_2_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
-
i0.ɵɵelement(0, "kendo-loader", 5);
|
|
32
|
-
} }
|
|
33
|
-
function NavigationComponent_kendo_drawer_container_3_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
-
const _r10 = i0.ɵɵgetCurrentView();
|
|
35
|
-
i0.ɵɵelementStart(0, "kendo-
|
|
36
|
-
i0.ɵɵlistener("contextmenu", function
|
|
37
|
-
i0.ɵɵelementEnd();
|
|
38
|
-
i0.ɵɵelementStart(1, "span", 16);
|
|
39
|
-
i0.ɵɵlistener("contextmenu", function NavigationComponent_kendo_drawer_container_3_ng_template_7_Template_span_contextmenu_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r11 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r11.onTabContextMenu($event, 0)); });
|
|
40
|
-
i0.ɵɵtext(2, "Home");
|
|
41
|
-
i0.ɵɵelementEnd();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
i0.ɵɵ
|
|
45
|
-
} }
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
i0.ɵɵ
|
|
51
|
-
i0.ɵɵelementStart(
|
|
52
|
-
i0.ɵɵlistener("contextmenu", function
|
|
53
|
-
i0.ɵɵelementEnd();
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
i0.ɵɵ
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
i0.ɵɵ
|
|
61
|
-
i0.ɵɵ
|
|
62
|
-
i0.ɵɵ
|
|
63
|
-
|
|
64
|
-
i0.ɵɵ
|
|
65
|
-
i0.ɵɵ
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
i0.ɵɵ
|
|
70
|
-
i0.ɵɵ
|
|
71
|
-
i0.ɵɵ
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
i0.ɵɵ
|
|
79
|
-
i0.ɵɵ
|
|
80
|
-
i0.ɵɵ
|
|
81
|
-
i0.ɵɵ
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
i0.ɵɵ
|
|
86
|
-
} }
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
i0.ɵɵ
|
|
90
|
-
|
|
91
|
-
i0.ɵɵ
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
i0.ɵɵelementStart(
|
|
95
|
-
i0.ɵɵtemplate(
|
|
96
|
-
i0.ɵɵ
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
i0.ɵɵ
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
i0.ɵɵ
|
|
105
|
-
i0.ɵɵ
|
|
106
|
-
i0.ɵɵ
|
|
107
|
-
i0.ɵɵ
|
|
108
|
-
i0.ɵɵ
|
|
109
|
-
i0.ɵɵ
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
i0.ɵɵ
|
|
114
|
-
|
|
115
|
-
i0.ɵɵ
|
|
116
|
-
i0.ɵɵ
|
|
117
|
-
i0.ɵɵ
|
|
118
|
-
i0.ɵɵ
|
|
119
|
-
i0.ɵɵ
|
|
120
|
-
i0.ɵɵ
|
|
121
|
-
i0.ɵɵ
|
|
122
|
-
i0.ɵɵ
|
|
123
|
-
i0.ɵɵ
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
i0.ɵɵ
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this.
|
|
147
|
-
this.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this.
|
|
157
|
-
this.
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
163
|
-
this.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this.
|
|
168
|
-
this.
|
|
169
|
-
this.
|
|
170
|
-
this.
|
|
171
|
-
this.
|
|
172
|
-
this.
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
this.tabs = [];
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
this.selectedTabIndex =
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
this.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
this.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
this.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
this.
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
if (
|
|
347
|
-
|
|
348
|
-
//
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
this.
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
const
|
|
424
|
-
if (
|
|
425
|
-
|
|
426
|
-
yield
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
})
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
this.
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
case '
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
//
|
|
611
|
-
|
|
612
|
-
//
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
//
|
|
616
|
-
this.
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
tab.
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
this.
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
//
|
|
726
|
-
this.
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
//
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
this.
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
i0.ɵɵ
|
|
972
|
-
i0.ɵɵ
|
|
973
|
-
i0.ɵɵ
|
|
974
|
-
i0.ɵɵ
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
(
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
}],
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
}]
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Component, ElementRef, ViewChild, HostListener, HostBinding, Input } from '@angular/core';
|
|
11
|
+
import { NavigationEnd, NavigationSkipped } from '@angular/router';
|
|
12
|
+
import { DrawerComponent } from "@progress/kendo-angular-layout";
|
|
13
|
+
import { Metadata, RunView, LogError } from '@memberjunction/core';
|
|
14
|
+
import { MJEventType, MJGlobal } from '@memberjunction/global';
|
|
15
|
+
import { EventCodes } from '@memberjunction/ng-shared';
|
|
16
|
+
import { BaseResourceComponent, ResourceData } from '@memberjunction/ng-shared';
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
18
|
+
import * as i1 from "@angular/router";
|
|
19
|
+
import * as i2 from "@memberjunction/ng-shared";
|
|
20
|
+
import * as i3 from "@angular/common";
|
|
21
|
+
import * as i4 from "@angular/platform-browser";
|
|
22
|
+
import * as i5 from "@progress/kendo-angular-indicators";
|
|
23
|
+
import * as i6 from "@progress/kendo-angular-layout";
|
|
24
|
+
import * as i7 from "@progress/kendo-angular-icons";
|
|
25
|
+
import * as i8 from "@memberjunction/ng-container-directives";
|
|
26
|
+
import * as i9 from "../generic/resource-container-component";
|
|
27
|
+
const _c0 = ["drawerWrapper"];
|
|
28
|
+
const _c1 = ["tabstrip"];
|
|
29
|
+
const _c2 = ["container"];
|
|
30
|
+
function NavigationComponent_kendo_loader_2_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
i0.ɵɵelement(0, "kendo-loader", 5);
|
|
32
|
+
} }
|
|
33
|
+
function NavigationComponent_kendo_drawer_container_3_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
35
|
+
i0.ɵɵelementStart(0, "kendo-svgicon", 15);
|
|
36
|
+
i0.ɵɵlistener("contextmenu", function NavigationComponent_kendo_drawer_container_3_ng_template_7_Template_kendo_svgicon_contextmenu_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r9.onTabContextMenu($event, 0)); });
|
|
37
|
+
i0.ɵɵelementEnd();
|
|
38
|
+
i0.ɵɵelementStart(1, "span", 16);
|
|
39
|
+
i0.ɵɵlistener("contextmenu", function NavigationComponent_kendo_drawer_container_3_ng_template_7_Template_span_contextmenu_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r11 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r11.onTabContextMenu($event, 0)); });
|
|
40
|
+
i0.ɵɵtext(2, "Home");
|
|
41
|
+
i0.ɵɵelementEnd();
|
|
42
|
+
} if (rf & 2) {
|
|
43
|
+
const ctx_r6 = i0.ɵɵnextContext(2);
|
|
44
|
+
i0.ɵɵproperty("icon", ctx_r6.sharedService.kendoSVGIcon("home"));
|
|
45
|
+
} }
|
|
46
|
+
function NavigationComponent_kendo_drawer_container_3_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
i0.ɵɵelement(0, "router-outlet");
|
|
48
|
+
} }
|
|
49
|
+
function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_kendo_svgicon_0_Template(rf, ctx) { if (rf & 1) {
|
|
50
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
51
|
+
i0.ɵɵelementStart(0, "kendo-svgicon", 18);
|
|
52
|
+
i0.ɵɵlistener("contextmenu", function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_kendo_svgicon_0_Template_kendo_svgicon_contextmenu_0_listener($event) { i0.ɵɵrestoreView(_r20); const i_r13 = i0.ɵɵnextContext(2).index; const ctx_r18 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r18.onTabContextMenu($event, i_r13)); });
|
|
53
|
+
i0.ɵɵelementEnd();
|
|
54
|
+
} if (rf & 2) {
|
|
55
|
+
const ctx_r16 = i0.ɵɵnextContext(4);
|
|
56
|
+
i0.ɵɵproperty("icon", ctx_r16.sharedService.kendoSVGIcon("clock"));
|
|
57
|
+
} }
|
|
58
|
+
function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_kendo_svgicon_1_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
const _r23 = i0.ɵɵgetCurrentView();
|
|
60
|
+
i0.ɵɵelementStart(0, "kendo-svgicon", 18);
|
|
61
|
+
i0.ɵɵlistener("contextmenu", function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_kendo_svgicon_1_Template_kendo_svgicon_contextmenu_0_listener($event) { i0.ɵɵrestoreView(_r23); const i_r13 = i0.ɵɵnextContext(2).index; const ctx_r21 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r21.onTabContextMenu($event, i_r13)); });
|
|
62
|
+
i0.ɵɵelementEnd();
|
|
63
|
+
} if (rf & 2) {
|
|
64
|
+
const tab_r12 = i0.ɵɵnextContext(2).$implicit;
|
|
65
|
+
const ctx_r17 = i0.ɵɵnextContext(2);
|
|
66
|
+
i0.ɵɵproperty("icon", ctx_r17.sharedService.kendoSVGIcon(tab_r12.icon));
|
|
67
|
+
} }
|
|
68
|
+
function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
69
|
+
const _r27 = i0.ɵɵgetCurrentView();
|
|
70
|
+
i0.ɵɵtemplate(0, NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_kendo_svgicon_0_Template, 1, 1, "kendo-svgicon", 17)(1, NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_kendo_svgicon_1_Template, 1, 1, "kendo-svgicon", 17);
|
|
71
|
+
i0.ɵɵelementStart(2, "span", 16);
|
|
72
|
+
i0.ɵɵlistener("contextmenu", function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_Template_span_contextmenu_2_listener($event) { i0.ɵɵrestoreView(_r27); const i_r13 = i0.ɵɵnextContext().index; const ctx_r25 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r25.onTabContextMenu($event, i_r13)); });
|
|
73
|
+
i0.ɵɵtext(3);
|
|
74
|
+
i0.ɵɵelementEnd();
|
|
75
|
+
} if (rf & 2) {
|
|
76
|
+
const tab_r12 = i0.ɵɵnextContext().$implicit;
|
|
77
|
+
i0.ɵɵproperty("ngIf", tab_r12 == null ? null : tab_r12.contentLoading);
|
|
78
|
+
i0.ɵɵadvance();
|
|
79
|
+
i0.ɵɵproperty("ngIf", !(tab_r12 == null ? null : tab_r12.contentLoading) && (tab_r12 == null ? null : tab_r12.icon));
|
|
80
|
+
i0.ɵɵadvance(2);
|
|
81
|
+
i0.ɵɵtextInterpolate(tab_r12.labelLoading ? "Loading..." : tab_r12.label);
|
|
82
|
+
} }
|
|
83
|
+
function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
84
|
+
const _r31 = i0.ɵɵgetCurrentView();
|
|
85
|
+
i0.ɵɵelementStart(0, "app-resource", 19);
|
|
86
|
+
i0.ɵɵlistener("ResourceRecordSaved", function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_2_Template_app_resource_ResourceRecordSaved_0_listener() { i0.ɵɵrestoreView(_r31); const tab_r12 = i0.ɵɵnextContext().$implicit; const ctx_r29 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r29.SaveSingleWorkspaceItem(tab_r12)); })("ContentLoadingStarted", function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_2_Template_app_resource_ContentLoadingStarted_0_listener() { i0.ɵɵrestoreView(_r31); const tab_r12 = i0.ɵɵnextContext().$implicit; const ctx_r32 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r32.setTabContentLoadingStatus(tab_r12, true)); })("ContentLoadingComplete", function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_2_Template_app_resource_ContentLoadingComplete_0_listener() { i0.ɵɵrestoreView(_r31); const tab_r12 = i0.ɵɵnextContext().$implicit; const ctx_r34 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r34.setTabContentLoadingStatus(tab_r12, false)); });
|
|
87
|
+
i0.ɵɵelementEnd();
|
|
88
|
+
} if (rf & 2) {
|
|
89
|
+
const tab_r12 = i0.ɵɵnextContext().$implicit;
|
|
90
|
+
const ctx_r15 = i0.ɵɵnextContext(2);
|
|
91
|
+
i0.ɵɵproperty("Data", tab_r12.data)("isVisible", (tab_r12 == null ? null : tab_r12.id) === ctx_r15.getActiveTabId());
|
|
92
|
+
} }
|
|
93
|
+
function NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_Template(rf, ctx) { if (rf & 1) {
|
|
94
|
+
i0.ɵɵelementStart(0, "kendo-tabstrip-tab", 11);
|
|
95
|
+
i0.ɵɵtemplate(1, NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_1_Template, 4, 3, "ng-template", 12)(2, NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_ng_template_2_Template, 1, 2, "ng-template", 13);
|
|
96
|
+
i0.ɵɵelementEnd();
|
|
97
|
+
} if (rf & 2) {
|
|
98
|
+
const tab_r12 = ctx.$implicit;
|
|
99
|
+
const ctx_r8 = i0.ɵɵnextContext(2);
|
|
100
|
+
i0.ɵɵproperty("selected", ctx_r8.isTabActive(tab_r12.id))("closable", true);
|
|
101
|
+
} }
|
|
102
|
+
function NavigationComponent_kendo_drawer_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
103
|
+
const _r38 = i0.ɵɵgetCurrentView();
|
|
104
|
+
i0.ɵɵelementStart(0, "kendo-drawer-container")(1, "kendo-drawer", 6, 7);
|
|
105
|
+
i0.ɵɵlistener("select", function NavigationComponent_kendo_drawer_container_3_Template_kendo_drawer_select_1_listener($event) { i0.ɵɵrestoreView(_r38); const ctx_r37 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r37.onDrawerSelect($event)); });
|
|
106
|
+
i0.ɵɵelementEnd();
|
|
107
|
+
i0.ɵɵelementStart(3, "kendo-drawer-content", 8)(4, "kendo-tabstrip", 9, 10);
|
|
108
|
+
i0.ɵɵlistener("tabClose", function NavigationComponent_kendo_drawer_container_3_Template_kendo_tabstrip_tabClose_4_listener($event) { i0.ɵɵrestoreView(_r38); const ctx_r39 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r39.onClose($event)); })("tabSelect", function NavigationComponent_kendo_drawer_container_3_Template_kendo_tabstrip_tabSelect_4_listener($event) { i0.ɵɵrestoreView(_r38); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.onTabSelect($event)); });
|
|
109
|
+
i0.ɵɵelementStart(6, "kendo-tabstrip-tab", 11);
|
|
110
|
+
i0.ɵɵtemplate(7, NavigationComponent_kendo_drawer_container_3_ng_template_7_Template, 3, 1, "ng-template", 12)(8, NavigationComponent_kendo_drawer_container_3_ng_template_8_Template, 1, 0, "ng-template", 13);
|
|
111
|
+
i0.ɵɵelementEnd();
|
|
112
|
+
i0.ɵɵtemplate(9, NavigationComponent_kendo_drawer_container_3_kendo_tabstrip_tab_9_Template, 3, 2, "kendo-tabstrip-tab", 14);
|
|
113
|
+
i0.ɵɵelementEnd()()();
|
|
114
|
+
} if (rf & 2) {
|
|
115
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
116
|
+
i0.ɵɵadvance();
|
|
117
|
+
i0.ɵɵproperty("items", ctx_r2.drawerItems)("mode", ctx_r2.mode)("mini", ctx_r2.mini)("animation", false)("autoCollapse", false);
|
|
118
|
+
i0.ɵɵadvance(3);
|
|
119
|
+
i0.ɵɵproperty("scrollable", true)("keepTabContent", true)("animate", false);
|
|
120
|
+
i0.ɵɵadvance(2);
|
|
121
|
+
i0.ɵɵproperty("selected", ctx_r2.activeTabIndex === 0)("closable", false);
|
|
122
|
+
i0.ɵɵadvance(3);
|
|
123
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.tabs);
|
|
124
|
+
} }
|
|
125
|
+
function NavigationComponent_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
126
|
+
const _r42 = i0.ɵɵgetCurrentView();
|
|
127
|
+
i0.ɵɵelementStart(0, "div", 20)(1, "div", 21);
|
|
128
|
+
i0.ɵɵlistener("click", function NavigationComponent_div_4_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r42); const ctx_r41 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r41.handleContextMenuOption(1)); });
|
|
129
|
+
i0.ɵɵtext(2, "Close All");
|
|
130
|
+
i0.ɵɵelementEnd();
|
|
131
|
+
i0.ɵɵelementStart(3, "div", 21);
|
|
132
|
+
i0.ɵɵlistener("click", function NavigationComponent_div_4_Template_div_click_3_listener() { i0.ɵɵrestoreView(_r42); const ctx_r43 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r43.handleContextMenuOption(2)); });
|
|
133
|
+
i0.ɵɵtext(4, "Close Others");
|
|
134
|
+
i0.ɵɵelementEnd();
|
|
135
|
+
i0.ɵɵelementStart(5, "div", 21);
|
|
136
|
+
i0.ɵɵlistener("click", function NavigationComponent_div_4_Template_div_click_5_listener() { i0.ɵɵrestoreView(_r42); const ctx_r44 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r44.handleContextMenuOption(3)); });
|
|
137
|
+
i0.ɵɵtext(6, "Close Tabs to the Right");
|
|
138
|
+
i0.ɵɵelementEnd()();
|
|
139
|
+
} if (rf & 2) {
|
|
140
|
+
const ctx_r3 = i0.ɵɵnextContext();
|
|
141
|
+
i0.ɵɵproperty("ngStyle", ctx_r3.contextMenuStyle);
|
|
142
|
+
} }
|
|
143
|
+
const _c3 = a0 => ({ "waiting": a0 });
|
|
144
|
+
export class NavigationComponent {
|
|
145
|
+
onWindowResize() {
|
|
146
|
+
clearTimeout(this.resizeTimeout);
|
|
147
|
+
this.resizeTimeout = setTimeout(() => {
|
|
148
|
+
this.checkViewportSize();
|
|
149
|
+
}, 200); // Adjust the debounce time as needed
|
|
150
|
+
}
|
|
151
|
+
onClick() {
|
|
152
|
+
this.contextMenuVisible = false;
|
|
153
|
+
}
|
|
154
|
+
// Inject the authentication service into your component through the constructor
|
|
155
|
+
constructor(router, route, sharedService, location, renderer, titleService, cdr) {
|
|
156
|
+
this.router = router;
|
|
157
|
+
this.route = route;
|
|
158
|
+
this.sharedService = sharedService;
|
|
159
|
+
this.location = location;
|
|
160
|
+
this.renderer = renderer;
|
|
161
|
+
this.titleService = titleService;
|
|
162
|
+
this.cdr = cdr;
|
|
163
|
+
this.drawerItems = [{
|
|
164
|
+
text: 'Loading...',
|
|
165
|
+
icon: 'k-i-apps',
|
|
166
|
+
}];
|
|
167
|
+
this.mode = 'push';
|
|
168
|
+
this.mini = true;
|
|
169
|
+
this.viewsList = [];
|
|
170
|
+
this.selectedDrawerItem = null;
|
|
171
|
+
this.selectedApp = null;
|
|
172
|
+
this.selectedEntity = null;
|
|
173
|
+
this.selectedView = null;
|
|
174
|
+
this.loading = true;
|
|
175
|
+
this.loader = false;
|
|
176
|
+
this.tabs = [];
|
|
177
|
+
this.closedTabs = []; // should always be empty after using it
|
|
178
|
+
this.tabQueryParams = {};
|
|
179
|
+
this.activeTabIndex = 0;
|
|
180
|
+
this.selectedTabIndex = 0;
|
|
181
|
+
this.workSpace = {};
|
|
182
|
+
this.workSpaceItems = [];
|
|
183
|
+
this.routeSub = null;
|
|
184
|
+
this.isMobileScreen = false;
|
|
185
|
+
this.contextMenuStyle = {};
|
|
186
|
+
this.contextMenuVisible = false;
|
|
187
|
+
this._loggedIn = false;
|
|
188
|
+
this._earlyEvents = [];
|
|
189
|
+
this.gotFirstNav = false;
|
|
190
|
+
this._mostRecentURL = '';
|
|
191
|
+
this.tabs = [];
|
|
192
|
+
}
|
|
193
|
+
onTabContextMenu(event, tab) {
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
this.selectedTabIndex = tab;
|
|
196
|
+
const mouseEvent = event;
|
|
197
|
+
const mouseX = mouseEvent.clientX;
|
|
198
|
+
const mouseY = mouseEvent.clientY;
|
|
199
|
+
this.contextMenuStyle = {
|
|
200
|
+
top: mouseY + 'px',
|
|
201
|
+
left: mouseX + 'px'
|
|
202
|
+
};
|
|
203
|
+
this.contextMenuVisible = true;
|
|
204
|
+
}
|
|
205
|
+
handleContextMenuOption(option) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
+
this.closedTabs = [];
|
|
208
|
+
switch (option) {
|
|
209
|
+
case 1:
|
|
210
|
+
// Close All
|
|
211
|
+
this.closedTabs = this.closedTabs.concat(this.tabs);
|
|
212
|
+
this.tabs = [];
|
|
213
|
+
break;
|
|
214
|
+
case 2:
|
|
215
|
+
// Close Others
|
|
216
|
+
this.closedTabs = this.tabs.filter((tab, id) => id !== this.selectedTabIndex);
|
|
217
|
+
this.tabs = [this.tabs[this.selectedTabIndex]];
|
|
218
|
+
if (this.activeTabIndex > 1)
|
|
219
|
+
this.activeTabIndex = 1;
|
|
220
|
+
break;
|
|
221
|
+
case 3:
|
|
222
|
+
// Close Tabs to the Right
|
|
223
|
+
this.activeTabIndex = this.selectedTabIndex + 1;
|
|
224
|
+
this.closedTabs = this.closedTabs.concat(this.tabs.slice(this.activeTabIndex));
|
|
225
|
+
this.tabs = this.tabs.slice(0, this.selectedTabIndex + 1);
|
|
226
|
+
break;
|
|
227
|
+
default:
|
|
228
|
+
// Handle other options if needed
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
this.contextMenuVisible = false;
|
|
232
|
+
for (let i = 0; i < this.closedTabs.length; ++i) {
|
|
233
|
+
const tab = this.closedTabs[i];
|
|
234
|
+
yield this.removeWorkspaceItem(tab);
|
|
235
|
+
}
|
|
236
|
+
this.activeTabIndex = 0;
|
|
237
|
+
this.tabstrip.selectTab(this.activeTabIndex);
|
|
238
|
+
// in this situation we have the home tab showing, so we need to update the URL path based on what's selected in the drawer
|
|
239
|
+
let url = this.selectedDrawerItem ? this.selectedDrawerItem.path : '/home';
|
|
240
|
+
this.router.navigate([url]);
|
|
241
|
+
//this.location.go(url); // update the browser URL if needed
|
|
242
|
+
this._mostRecentURL = url;
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
checkViewportSize() {
|
|
246
|
+
this.isMobileScreen = window.innerWidth <= 840;
|
|
247
|
+
}
|
|
248
|
+
ngAfterViewInit() {
|
|
249
|
+
MJGlobal.Instance.GetEventListener(true) // true gets us replay of past events so we can "catch up" as needed
|
|
250
|
+
.subscribe(event => {
|
|
251
|
+
this.handleEvent(event, event.args);
|
|
252
|
+
});
|
|
253
|
+
this.route.queryParams.subscribe(params => {
|
|
254
|
+
// what we want to do here is CACHE the params for the CURRENT tab so we have them
|
|
255
|
+
// to throw back in the URL whenever the tab gets clicked on again in the future
|
|
256
|
+
this.tabQueryParams['tab_' + this.activeTabIndex] = params;
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
handleEvent(event, args) {
|
|
260
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
// event handler
|
|
262
|
+
switch (event.event) {
|
|
263
|
+
case MJEventType.LoggedIn:
|
|
264
|
+
yield this.loadApp();
|
|
265
|
+
yield this.getWorkspace();
|
|
266
|
+
this._loggedIn = true;
|
|
267
|
+
// check for early events and replay them now that we're logged in
|
|
268
|
+
for (let i = 0; i < this._earlyEvents.length; ++i) {
|
|
269
|
+
const e = this._earlyEvents[i];
|
|
270
|
+
this.handleEvent(e.event, e.args); // recursve call to handle the event
|
|
271
|
+
}
|
|
272
|
+
this._earlyEvents.length = 0; // clear the array
|
|
273
|
+
// resize everything after a short delay
|
|
274
|
+
setTimeout(() => {
|
|
275
|
+
this.sharedService.InvokeManualResize();
|
|
276
|
+
}, 100);
|
|
277
|
+
this.checkForBaseURL();
|
|
278
|
+
break;
|
|
279
|
+
case MJEventType.ComponentEvent:
|
|
280
|
+
if (!this._loggedIn) {
|
|
281
|
+
// we're not logged in yet, so queue up the event to be handled later
|
|
282
|
+
this._earlyEvents.push({ event, args });
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
// we're logged in so go ahead and handle normally
|
|
286
|
+
switch (event.eventCode) {
|
|
287
|
+
case EventCodes.ViewNotifications:
|
|
288
|
+
this.setActiveTabToHome();
|
|
289
|
+
break;
|
|
290
|
+
case EventCodes.ViewCreated:
|
|
291
|
+
case EventCodes.AddDashboard:
|
|
292
|
+
case EventCodes.AddReport:
|
|
293
|
+
case EventCodes.AddQuery:
|
|
294
|
+
case EventCodes.EntityRecordClicked:
|
|
295
|
+
case EventCodes.ViewClicked:
|
|
296
|
+
case EventCodes.ViewClicked:
|
|
297
|
+
case EventCodes.RunSearch:
|
|
298
|
+
// another component requested that we add something to our tab structure
|
|
299
|
+
this.AddOrSelectTab(event.args);
|
|
300
|
+
break;
|
|
301
|
+
default:
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
break;
|
|
306
|
+
default:
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
ngOnInit() {
|
|
312
|
+
this.checkViewportSize();
|
|
313
|
+
// Subscribe to route changes
|
|
314
|
+
this.routeSub = this.router.events.pipe().subscribe((args) => {
|
|
315
|
+
if (args instanceof NavigationEnd || args instanceof PopStateEvent) {
|
|
316
|
+
const trigger = args.navigationTrigger;
|
|
317
|
+
switch (trigger) {
|
|
318
|
+
case 'imperative':
|
|
319
|
+
// this is a programmatic navigation, so we don't want to do anything here
|
|
320
|
+
break;
|
|
321
|
+
case 'popstate':
|
|
322
|
+
// this is a browser back/forward navigation, so we want to do something here
|
|
323
|
+
// when the route changes and it maps to one of our drawer items, select it
|
|
324
|
+
this.NavigateFromUrl();
|
|
325
|
+
break;
|
|
326
|
+
default:
|
|
327
|
+
// this is a click on a link, so we want to do something here
|
|
328
|
+
// when the route changes and it maps to one of our drawer items, select it
|
|
329
|
+
this.NavigateFromUrl();
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
else if (args instanceof NavigationSkipped) {
|
|
334
|
+
// check to see if the route in args is truly the same as the this.route
|
|
335
|
+
// if so, then we're navigating to the same route and we don't want to do anything
|
|
336
|
+
// if not, then we're navigating to a different route and we want to do something
|
|
337
|
+
if (this._mostRecentURL.trim().toLowerCase() != args.url.trim().toLowerCase()) {
|
|
338
|
+
this.NavigateFromUrl();
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
NavigateFromUrl() {
|
|
344
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
345
|
+
let url = this.router.url.trim().toLowerCase();
|
|
346
|
+
if (url === '/') {
|
|
347
|
+
this._mostRecentURL = '/home';
|
|
348
|
+
this.router.navigate(['/home']); // redirect to /home
|
|
349
|
+
this.gotFirstNav = true;
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
this._mostRecentURL = this.router.url;
|
|
353
|
+
// see if this matches a drawer item or not
|
|
354
|
+
const di = this.drawerItems;
|
|
355
|
+
//const item = di.find(i => (<any>i).path.toLowerCase().trim() === url.toLowerCase().trim());
|
|
356
|
+
const item = di.find(i => url.toLowerCase().trim().startsWith(i.path.toLowerCase().trim()));
|
|
357
|
+
if (item) {
|
|
358
|
+
this.selectDrawerItem(this.drawerItems.indexOf(item));
|
|
359
|
+
this.gotFirstNav = true;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if (this.activeTabIndex > 0) {
|
|
363
|
+
// check to see if there are query params on the url and if so, stash em in the tabQueryParams array so we can restore the full set of query params later if we
|
|
364
|
+
// come back to this tab
|
|
365
|
+
const urlParts = this.router.url.split('?');
|
|
366
|
+
if (urlParts.length > 1) {
|
|
367
|
+
// we have query params, so stash em
|
|
368
|
+
const params = new URLSearchParams(urlParts[1]);
|
|
369
|
+
const keys = params.keys();
|
|
370
|
+
const queryParams = {};
|
|
371
|
+
for (const key of keys) {
|
|
372
|
+
queryParams[key] = params.get(key);
|
|
373
|
+
}
|
|
374
|
+
this.tabQueryParams['tab_' + this.activeTabIndex] = queryParams;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
selectDrawerItem(index) {
|
|
380
|
+
this.selectedDrawerItem = this.drawerItems[index];
|
|
381
|
+
// Get the <ul> element that contains the <li> elements
|
|
382
|
+
const ulElement = this.drawerWrapper.nativeElement.querySelector('ul');
|
|
383
|
+
if (ulElement) {
|
|
384
|
+
// Get the <li> element at the specified index
|
|
385
|
+
const liElement = ulElement.children[index];
|
|
386
|
+
// add the k-selected class to the <li> element
|
|
387
|
+
this.renderer.addClass(liElement, 'k-selected');
|
|
388
|
+
// and remove k-selected from all other <li> within the <ul>
|
|
389
|
+
for (let i = 0; i < ulElement.children.length; ++i) {
|
|
390
|
+
if (i !== index)
|
|
391
|
+
this.renderer.removeClass(ulElement.children[i], 'k-selected');
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
// make sure that the first tab is selected since this is showing stuff in the Home/Nav tab
|
|
395
|
+
this.setActiveTabToHome();
|
|
396
|
+
}
|
|
397
|
+
setActiveTabToHome() {
|
|
398
|
+
if (this.activeTabIndex !== 0) {
|
|
399
|
+
this.activeTabIndex = 0;
|
|
400
|
+
this.tabstrip.selectTab(0);
|
|
401
|
+
//this.renderer.selectRootElement(this.tabstrip.wrapper.nativeElement).focus()
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
checkForBaseURL() {
|
|
405
|
+
setTimeout(() => {
|
|
406
|
+
// this is a hack to get the first navigation to work correctly when the route is to the / base URL that doesn't seem to trigger the rest of our code like all other routes
|
|
407
|
+
if (!this.gotFirstNav) {
|
|
408
|
+
this.gotFirstNav = true;
|
|
409
|
+
this.NavigateFromUrl();
|
|
410
|
+
}
|
|
411
|
+
}, 10);
|
|
412
|
+
}
|
|
413
|
+
getWorkspace() {
|
|
414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
415
|
+
const md = new Metadata();
|
|
416
|
+
const rv = new RunView();
|
|
417
|
+
const workspaceParams = {
|
|
418
|
+
EntityName: "Workspaces",
|
|
419
|
+
ExtraFilter: `UserID=${md.CurrentUser.ID}`
|
|
420
|
+
};
|
|
421
|
+
const workspaces = yield rv.RunView(workspaceParams);
|
|
422
|
+
if (workspaces.Success) {
|
|
423
|
+
const workspaceRecord = yield md.GetEntityObject("Workspaces");
|
|
424
|
+
if (workspaces.Results.length) {
|
|
425
|
+
const workspace = workspaces.Results.find((workspace) => workspace.UserID === md.CurrentUser.ID);
|
|
426
|
+
yield workspaceRecord.Load(workspace.ID);
|
|
427
|
+
}
|
|
428
|
+
else {
|
|
429
|
+
workspaceRecord.NewRecord();
|
|
430
|
+
workspaceRecord.Name = `${md.CurrentUser.Name || md.CurrentUser.ID}'s Workspace`;
|
|
431
|
+
workspaceRecord.UserID = md.CurrentUser.ID;
|
|
432
|
+
yield workspaceRecord.Save();
|
|
433
|
+
}
|
|
434
|
+
this.workSpace = workspaceRecord;
|
|
435
|
+
const workspaceItemParams = {
|
|
436
|
+
EntityName: "Workspace Items",
|
|
437
|
+
ExtraFilter: `WorkspaceID='${this.workSpace.ID}'`
|
|
438
|
+
};
|
|
439
|
+
const workspaceItems = yield rv.RunView(workspaceItemParams);
|
|
440
|
+
if (workspaceItems.Success) {
|
|
441
|
+
this.workSpaceItems = workspaceItems.Results;
|
|
442
|
+
yield this.LoadWorkSpace();
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
LoadWorkSpace() {
|
|
448
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
449
|
+
const md = new Metadata();
|
|
450
|
+
this.tabs = []; // first clear out the tabs - this is often already the state but in case this is a full refresh, make sure we do this.
|
|
451
|
+
this.workSpaceItems.forEach((item, index) => __awaiter(this, void 0, void 0, function* () {
|
|
452
|
+
const itemData = item.Configuration ? JSON.parse(item.Configuration) : {};
|
|
453
|
+
const resourceData = new ResourceData({
|
|
454
|
+
ID: item.ID,
|
|
455
|
+
Name: item.Name,
|
|
456
|
+
ResourceTypeID: item.ResourceTypeID,
|
|
457
|
+
ResourceRecordID: item.ResourceRecordID,
|
|
458
|
+
Configuration: itemData,
|
|
459
|
+
});
|
|
460
|
+
const newTab = {
|
|
461
|
+
id: item.ID,
|
|
462
|
+
labelLoading: true,
|
|
463
|
+
contentLoading: false,
|
|
464
|
+
data: resourceData,
|
|
465
|
+
workspaceItem: null, // let this get populated later from the ID if we need to modify it
|
|
466
|
+
icon: resourceData.ResourceIcon
|
|
467
|
+
};
|
|
468
|
+
this.tabs.push(newTab);
|
|
469
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
470
|
+
// non-blocking, load dynamically
|
|
471
|
+
newTab.label = yield this.GetWorkspaceItemDisplayName(resourceData);
|
|
472
|
+
newTab.labelLoading = false;
|
|
473
|
+
if (newTab === this.tabs[this.activeTabIndex - 1]) // subtract one since the activeTabIndex is relative to the full set of tabs and the this.tabs array doesn't include the HOME tab
|
|
474
|
+
this.setAppTitle(newTab.label);
|
|
475
|
+
}), 10);
|
|
476
|
+
}));
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
setAppTitle(title = '') {
|
|
480
|
+
if (title === '')
|
|
481
|
+
this.titleService.setTitle(this.applicationName);
|
|
482
|
+
else
|
|
483
|
+
this.titleService.setTitle(title + ' (' + this.applicationName + ')');
|
|
484
|
+
}
|
|
485
|
+
checkForExistingTab(data) {
|
|
486
|
+
let existingTab;
|
|
487
|
+
if (data.ResourceType.trim().toLowerCase() === 'search results') {
|
|
488
|
+
// we have a different matching logic for search results because we want to match on the search input as well as the entity
|
|
489
|
+
existingTab = this.tabs.find(t => t.data.ResourceTypeID === data.ResourceTypeID &&
|
|
490
|
+
t.data.Configuration.Entity === data.Configuration.Entity &&
|
|
491
|
+
t.data.Configuration.SearchInput === data.Configuration.SearchInput);
|
|
492
|
+
}
|
|
493
|
+
else if (data.ResourceType.trim().toLowerCase() === 'user views') {
|
|
494
|
+
// a viwe can be either saved (where we have a view id) or dyanmic (where we have an entity name, and optionally, an extra filter)
|
|
495
|
+
if (data.ResourceRecordID) {
|
|
496
|
+
// saved view
|
|
497
|
+
existingTab = this.tabs.find(t => t.data.ResourceTypeID === data.ResourceTypeID &&
|
|
498
|
+
t.data.ResourceRecordID === data.ResourceRecordID &&
|
|
499
|
+
data.ResourceRecordID !== null &&
|
|
500
|
+
data.ResourceRecordID !== undefined // make sure that we don't match on null/undefined ResourceRecordID's - these should always be NEW tabs
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
else {
|
|
504
|
+
// dynamic view, compare entity name and if we have extra filter use that for comparison too
|
|
505
|
+
existingTab = this.tabs.find(t => t.data.ResourceTypeID === data.ResourceTypeID &&
|
|
506
|
+
t.data.Configuration.Entity === data.Configuration.Entity &&
|
|
507
|
+
t.data.Configuration.ExtraFilter === data.Configuration.ExtraFilter);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
existingTab = this.tabs.find(t => t.data.ResourceTypeID === data.ResourceTypeID &&
|
|
512
|
+
t.data.ResourceRecordID === data.ResourceRecordID &&
|
|
513
|
+
data.ResourceRecordID // make sure that we don't match on null/undefined ResourceRecordID's - these should always be NEW tabs
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
return existingTab;
|
|
517
|
+
}
|
|
518
|
+
AddOrSelectTab(data) {
|
|
519
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
520
|
+
const t = this.tabs;
|
|
521
|
+
this.loader = true;
|
|
522
|
+
const existingTab = this.checkForExistingTab(data);
|
|
523
|
+
if (existingTab) {
|
|
524
|
+
const index = this.tabs.indexOf(existingTab);
|
|
525
|
+
this.activeTabIndex = index + 1; // add one because the HOME tab is not in the tabs array but it IS part of our tab structure
|
|
526
|
+
this.tabstrip.selectTab(this.activeTabIndex);
|
|
527
|
+
this.scrollIntoView();
|
|
528
|
+
if (existingTab.label)
|
|
529
|
+
this.setAppTitle(existingTab.label);
|
|
530
|
+
else
|
|
531
|
+
this.setAppTitle();
|
|
532
|
+
this.loader = false;
|
|
533
|
+
}
|
|
534
|
+
else {
|
|
535
|
+
const newTab = {
|
|
536
|
+
id: -1, // initially -1 but will be changed to the WorkspaceItem ID once we save it
|
|
537
|
+
data: data,
|
|
538
|
+
labelLoading: true,
|
|
539
|
+
contentLoading: false,
|
|
540
|
+
workspaceItem: null,
|
|
541
|
+
icon: data.ResourceIcon,
|
|
542
|
+
};
|
|
543
|
+
// save it before we push to the tabs colleciton because we want the WorkspaceItem ID to be populated in the tab.id before we initialize the new tab by adding it to the this.tabs array
|
|
544
|
+
yield this.SaveSingleWorkspaceItem(newTab);
|
|
545
|
+
// now add to data structure
|
|
546
|
+
this.tabs.push(newTab);
|
|
547
|
+
// select the new tab
|
|
548
|
+
this.activeTabIndex = this.tabs.length; // this is intentionally past array boundary because ActiveTabIndex includes the Home tab that is not part of the tabs array
|
|
549
|
+
this.tabstrip.selectTab(this.activeTabIndex);
|
|
550
|
+
//this.renderer.selectRootElement(this.tabstrip.wrapper.nativeElement).focus()
|
|
551
|
+
this.sharedService.InvokeManualResize();
|
|
552
|
+
this.scrollIntoView();
|
|
553
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
554
|
+
// non-blocking this way
|
|
555
|
+
newTab.label = yield this.GetWorkspaceItemDisplayName(data); // do this after we fire up the loading so that we don't block anything
|
|
556
|
+
this.setAppTitle(newTab.label);
|
|
557
|
+
newTab.labelLoading = false;
|
|
558
|
+
this.loader = false;
|
|
559
|
+
}), 10);
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
updateBrowserURL(tab, data) {
|
|
564
|
+
// update the URL to reflect the current tab
|
|
565
|
+
var _a;
|
|
566
|
+
// FIRST, construct the base URL based on the resource type
|
|
567
|
+
const rt = this.sharedService.ResourceTypeByID(data.ResourceTypeID);
|
|
568
|
+
let url = '/resource';
|
|
569
|
+
switch (rt === null || rt === void 0 ? void 0 : rt.Name.toLowerCase().trim()) {
|
|
570
|
+
case 'user views':
|
|
571
|
+
if (data.ResourceRecordID && !isNaN(data.ResourceRecordID) && data.ResourceRecordID > 0) {
|
|
572
|
+
url += `/view/${data.ResourceRecordID}`;
|
|
573
|
+
}
|
|
574
|
+
else if ((_a = data.Configuration) === null || _a === void 0 ? void 0 : _a.Entity) {
|
|
575
|
+
// we don't have a view id. This can occur when we're referring to a dyanmic view where our data.Configuration.Entity is set and data.Configuration.ExtraFilter is set
|
|
576
|
+
// so we need to construct a URL that will load up the dynamic view
|
|
577
|
+
url += `/view/0?Entity=${data.Configuration.Entity}&ExtraFilter=${data.Configuration.ExtraFilter}`;
|
|
578
|
+
}
|
|
579
|
+
else {
|
|
580
|
+
// we don't have a view ID and we also don't have an entity name, so this is an error condition
|
|
581
|
+
LogError(`Invalid view configuration. No view ID or entity name specified.`);
|
|
582
|
+
this.sharedService.CreateSimpleNotification(`Invalid view configuration. No view ID or entity name specified.`, "error", 5000);
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
break;
|
|
586
|
+
case 'dashboards':
|
|
587
|
+
url += `/dashboard/${data.ResourceRecordID}`;
|
|
588
|
+
break;
|
|
589
|
+
case 'reports':
|
|
590
|
+
url += `/report/${data.ResourceRecordID}`;
|
|
591
|
+
break;
|
|
592
|
+
case 'queries':
|
|
593
|
+
url += `/query/${data.ResourceRecordID}`;
|
|
594
|
+
break;
|
|
595
|
+
case 'records':
|
|
596
|
+
url += `/record/${data.ResourceRecordID}?Entity=${data.Configuration.Entity}`;
|
|
597
|
+
break;
|
|
598
|
+
case 'search results':
|
|
599
|
+
url += `/search/${data.Configuration.SearchInput}?Entity=${data.Configuration.Entity}`;
|
|
600
|
+
break;
|
|
601
|
+
case 'settings':
|
|
602
|
+
url += `/settings`;
|
|
603
|
+
break;
|
|
604
|
+
case 'notifications':
|
|
605
|
+
url += `/notifications`;
|
|
606
|
+
break;
|
|
607
|
+
}
|
|
608
|
+
// SECOND, we need to, in some cases, append query params that the TAB had created, we don't know what those are, they could be anything. In the AfterViewInit() code above we cache
|
|
609
|
+
// these whenever they change for each tab.
|
|
610
|
+
// Split the URL into the path and existing query params
|
|
611
|
+
const [path, existingQuery] = url.split('?');
|
|
612
|
+
// Create a URLSearchParams object from the existing query params
|
|
613
|
+
const queryParams = new URLSearchParams(existingQuery);
|
|
614
|
+
// Your cached query params, assuming it's an object like { key1: 'value1', key2: 'value2' }
|
|
615
|
+
const tabIndex = this.tabs.indexOf(tab) + 1; // we add 1 Because the HOME tab is not in the array so we have to offset by 1 here for our data structure
|
|
616
|
+
const cachedQueryParams = this.tabQueryParams['tab_' + tabIndex]; // Replace with your actual method to get cached params
|
|
617
|
+
if (cachedQueryParams) {
|
|
618
|
+
// Merge cached query params if they don't already exist in the URL
|
|
619
|
+
const keys = Object.keys(cachedQueryParams);
|
|
620
|
+
for (const key of keys) {
|
|
621
|
+
if (!queryParams.has(key)) {
|
|
622
|
+
queryParams.append(key, cachedQueryParams[key]);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
// Construct the new URL with merged query params
|
|
627
|
+
const params = queryParams.toString();
|
|
628
|
+
const newUrl = `${path}${params && params.length > 0 ? '?' + queryParams.toString() : ''}`;
|
|
629
|
+
// Update the most recent URL
|
|
630
|
+
this._mostRecentURL = newUrl;
|
|
631
|
+
// Update the browser URL without triggering Angular navigation
|
|
632
|
+
// this.location.go(newUrl);
|
|
633
|
+
this.router.navigateByUrl(newUrl); //, { skipLocationChange: true });
|
|
634
|
+
// Update the app title
|
|
635
|
+
this.setAppTitle(tab.label);
|
|
636
|
+
}
|
|
637
|
+
scrollIntoView() {
|
|
638
|
+
const containerElement = this.tabstrip.wrapper.nativeElement;
|
|
639
|
+
setTimeout(() => {
|
|
640
|
+
const newTabElement = containerElement.querySelector(`li:nth-child(${this.activeTabIndex + 1})`);
|
|
641
|
+
newTabElement.scrollIntoView({ inline: 'nearest' });
|
|
642
|
+
}, 200);
|
|
643
|
+
}
|
|
644
|
+
GetWorkspaceItemDisplayName(data) {
|
|
645
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
646
|
+
const resourceReg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseResourceComponent, data.ResourceType);
|
|
647
|
+
if (resourceReg) {
|
|
648
|
+
const resource = new resourceReg.SubClass();
|
|
649
|
+
return yield resource.GetResourceDisplayName(data);
|
|
650
|
+
}
|
|
651
|
+
else
|
|
652
|
+
return `Workspace Item ${data.ID}`;
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
SaveWorkspace() {
|
|
656
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
657
|
+
let bSuccess = true;
|
|
658
|
+
for (let i = 0; i < this.tabs.length; ++i) {
|
|
659
|
+
const tab = this.tabs[i];
|
|
660
|
+
bSuccess = (yield this.SaveSingleWorkspaceItem(tab)) && bSuccess;
|
|
661
|
+
}
|
|
662
|
+
return bSuccess;
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
SaveSingleWorkspaceItem(tab) {
|
|
666
|
+
var _a;
|
|
667
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
668
|
+
try {
|
|
669
|
+
let index = this.tabs.indexOf(tab);
|
|
670
|
+
if (index < 0)
|
|
671
|
+
index = this.tabs.length; // this situation occurs when the tab hasn't yet been added to the tabs collection so the index will be = the length of the tabs collection
|
|
672
|
+
const md = new Metadata();
|
|
673
|
+
let wsItem;
|
|
674
|
+
if (!tab.workspaceItem) {
|
|
675
|
+
wsItem = (yield md.GetEntityObject('Workspace Items'));
|
|
676
|
+
if (tab.data.ID && !isNaN(tab.data.ID) && tab.data.ID > 0)
|
|
677
|
+
yield wsItem.Load(tab.data.ID);
|
|
678
|
+
else {
|
|
679
|
+
wsItem.NewRecord();
|
|
680
|
+
wsItem.Name = tab.data.Name ? tab.data.Name : tab.data.ResourceType + ' Record:' + tab.data.ResourceRecordID;
|
|
681
|
+
wsItem.WorkSpaceID = this.workSpace.ID;
|
|
682
|
+
wsItem.ResourceTypeID = (_a = tab.data) === null || _a === void 0 ? void 0 : _a.ResourceTypeID;
|
|
683
|
+
}
|
|
684
|
+
tab.workspaceItem = wsItem;
|
|
685
|
+
}
|
|
686
|
+
else {
|
|
687
|
+
wsItem = tab.workspaceItem;
|
|
688
|
+
}
|
|
689
|
+
wsItem.ResourceRecordID = tab.data.ResourceRecordID.toString();
|
|
690
|
+
wsItem.Sequence = index;
|
|
691
|
+
wsItem.Configuration = JSON.stringify(tab.data.Configuration); // JSON.stringify({ Entity: tab.data.Entity });
|
|
692
|
+
const result = yield wsItem.Save();
|
|
693
|
+
tab.id = wsItem.ID;
|
|
694
|
+
return result;
|
|
695
|
+
}
|
|
696
|
+
catch (err) {
|
|
697
|
+
LogError(err);
|
|
698
|
+
return false;
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
setTabContentLoadingStatus(tab, bLoading) {
|
|
703
|
+
tab.contentLoading = bLoading;
|
|
704
|
+
this.cdr.detectChanges(); // Manually trigger change detection
|
|
705
|
+
}
|
|
706
|
+
onClose(ev) {
|
|
707
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
708
|
+
if (ev.tab.selected) {
|
|
709
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
710
|
+
// find the closest tab to the one we just closed
|
|
711
|
+
yield this.removeWorkspaceItem(this.tabs[ev.index - 1]);
|
|
712
|
+
if (ev.index < this.tabs.length + 1) {
|
|
713
|
+
// NOT the last tab, kendo by defulat will show the next tab, so let that be, but we need to update our routing info
|
|
714
|
+
// dont need to update active tab index or call selectTab() here because kendo does this and activetab index stays the same since we're closing the tab
|
|
715
|
+
const i = this.activeTabIndex > 0 ? this.activeTabIndex - 1 : 0;
|
|
716
|
+
const tabs = this.tabs;
|
|
717
|
+
const tab = tabs[i];
|
|
718
|
+
if (tab) {
|
|
719
|
+
const data = tab.data;
|
|
720
|
+
this.updateBrowserURL(tab, data);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
else {
|
|
724
|
+
if (ev.index > 1) {
|
|
725
|
+
// the to-be-selected tab is a RESOURCE so do what's appropraite there
|
|
726
|
+
this.activeTabIndex = ev.index - 1;
|
|
727
|
+
this.tabstrip.selectTab(ev.index - 1);
|
|
728
|
+
//this.renderer.selectRootElement(this.tabstrip.wrapper.nativeElement).focus()
|
|
729
|
+
const i = this.activeTabIndex > 0 ? this.activeTabIndex - 1 : 0;
|
|
730
|
+
const tabs = this.tabs;
|
|
731
|
+
const tab = tabs[i];
|
|
732
|
+
if (tab) {
|
|
733
|
+
const data = tab.data;
|
|
734
|
+
this.updateBrowserURL(tab, data);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
else {
|
|
738
|
+
// the tab that will be selected is the HOME tab o we need to update
|
|
739
|
+
this.activeTabIndex = 0;
|
|
740
|
+
this.tabstrip.selectTab(0);
|
|
741
|
+
//this.renderer.selectRootElement(this.tabstrip.wrapper.nativeElement).focus()
|
|
742
|
+
// in this situation we have the home tab showing, so we need to update the URL path based on what's selected in the drawer
|
|
743
|
+
let url = this.selectedDrawerItem ? this.selectedDrawerItem.path : '/home';
|
|
744
|
+
this.router.navigate([url]);
|
|
745
|
+
//this.location.go(url); // update the browser URL if needed
|
|
746
|
+
this._mostRecentURL = url;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}), 100);
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
removeWorkspaceItem(tab) {
|
|
754
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
755
|
+
// remove the tab from the tabs collection
|
|
756
|
+
const index = this.tabs.indexOf(tab);
|
|
757
|
+
if (index >= 0)
|
|
758
|
+
this.tabs.splice(index, 1);
|
|
759
|
+
if (!tab.workspaceItem && tab.id && tab.id > 0) {
|
|
760
|
+
// we lazy load the workspaceItem entity objects, so we load it here so we can delete it below, but only when it wasn't already loaded
|
|
761
|
+
const md = new Metadata();
|
|
762
|
+
tab.workspaceItem = (yield md.GetEntityObject('Workspace Items'));
|
|
763
|
+
yield tab.workspaceItem.Load(tab.id);
|
|
764
|
+
}
|
|
765
|
+
if (tab.workspaceItem) {
|
|
766
|
+
if (!(yield tab.workspaceItem.Delete())) {
|
|
767
|
+
// error deleting the workspace item, alert the user
|
|
768
|
+
this.sharedService.CreateSimpleNotification('Error deleting workspace item ' + tab.workspaceItem.Name + ' from the database. Please contact your system administrator.', 'error', 5000);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
onTabSelect(e) {
|
|
774
|
+
e.preventDefault();
|
|
775
|
+
if (this.activeTabIndex !== e.index) {
|
|
776
|
+
this.activeTabIndex = e.index;
|
|
777
|
+
this.sharedService.InvokeManualResize();
|
|
778
|
+
if (e.index === 0) {
|
|
779
|
+
let url = this.selectedDrawerItem ? this.selectedDrawerItem.path : '/home';
|
|
780
|
+
if (this.selectedDrawerItem !== null && this.selectedDrawerItem !== undefined)
|
|
781
|
+
url = this.selectedDrawerItem.path;
|
|
782
|
+
this.router.navigate([url]);
|
|
783
|
+
//this.location.go(url); // update the browser URL if needed
|
|
784
|
+
this.setAppTitle();
|
|
785
|
+
this._mostRecentURL = url;
|
|
786
|
+
}
|
|
787
|
+
else {
|
|
788
|
+
const tab = this.tabs[e.index - 1];
|
|
789
|
+
if (tab) {
|
|
790
|
+
this.setAppTitle(tab.label);
|
|
791
|
+
const data = tab.data;
|
|
792
|
+
this.updateBrowserURL(tab, data);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
getActiveTabId() {
|
|
798
|
+
var _a;
|
|
799
|
+
if (this.activeTabIndex === 0) {
|
|
800
|
+
return null;
|
|
801
|
+
}
|
|
802
|
+
else // subtract 1 from the activeTabIndex if it is not the first tab since our data structure is for tabs 1 to n
|
|
803
|
+
return (_a = this.tabs[this.activeTabIndex - 1]) === null || _a === void 0 ? void 0 : _a.id;
|
|
804
|
+
}
|
|
805
|
+
isTabActive(tabId) {
|
|
806
|
+
return this.getActiveTabId() === tabId;
|
|
807
|
+
}
|
|
808
|
+
ngOnDestroy() {
|
|
809
|
+
// Clean up the subscription when the component is destroyed
|
|
810
|
+
clearTimeout(this.resizeTimeout);
|
|
811
|
+
if (this.routeSub)
|
|
812
|
+
this.routeSub.unsubscribe();
|
|
813
|
+
window.removeEventListener('resize', () => { });
|
|
814
|
+
}
|
|
815
|
+
onDrawerSelect(ev) {
|
|
816
|
+
this.selectedDrawerItem = ev.item;
|
|
817
|
+
this.router.navigate([ev.item.path]);
|
|
818
|
+
this._mostRecentURL = ev.item.path;
|
|
819
|
+
// make sure that the first tab is selected since this is showing stuff in the Home/Nav tab
|
|
820
|
+
if (this.activeTabIndex !== 0) {
|
|
821
|
+
this.activeTabIndex = 0;
|
|
822
|
+
this.tabstrip.selectTab(0);
|
|
823
|
+
//this.renderer.selectRootElement(this.tabstrip.wrapper.nativeElement).focus()
|
|
824
|
+
}
|
|
825
|
+
this.setAppTitle(ev.item.text);
|
|
826
|
+
}
|
|
827
|
+
getEntityItemFromViewItem(viewItem) {
|
|
828
|
+
let entityItem = null;
|
|
829
|
+
for (let item of this.drawerItems) {
|
|
830
|
+
if (item.id == viewItem.parentId) {
|
|
831
|
+
// got the parent, this is the entity
|
|
832
|
+
return item;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
return null;
|
|
836
|
+
}
|
|
837
|
+
getAppItemFromViewItem(viewItem) {
|
|
838
|
+
let entityItem = this.getEntityItemFromViewItem(viewItem), appItem = null;
|
|
839
|
+
if (entityItem)
|
|
840
|
+
for (let item of this.drawerItems) {
|
|
841
|
+
if (item.id == entityItem.parentId) {
|
|
842
|
+
// got the parent, this is the app
|
|
843
|
+
appItem = item;
|
|
844
|
+
break;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return appItem;
|
|
848
|
+
}
|
|
849
|
+
loadApp() {
|
|
850
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
851
|
+
const md = new Metadata();
|
|
852
|
+
yield this.LoadDrawer();
|
|
853
|
+
this.setDrawerConfig();
|
|
854
|
+
window.addEventListener('resize', () => {
|
|
855
|
+
this.setDrawerConfig();
|
|
856
|
+
});
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
LoadDrawer() {
|
|
860
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
861
|
+
const md = new Metadata();
|
|
862
|
+
this.drawerItems.length = 0; // clear the array
|
|
863
|
+
// the Drawer configuraion has the following sections:
|
|
864
|
+
/*
|
|
865
|
+
* Home - a simple view that shows all the other options - dashboards, reports, data, etc, and ALSO shows Favorites and Most Recently Used Records
|
|
866
|
+
* Ask Skip - interaction with Skip AI
|
|
867
|
+
* Data
|
|
868
|
+
* Dashboards
|
|
869
|
+
* Reports
|
|
870
|
+
* Settings
|
|
871
|
+
*/
|
|
872
|
+
// Home
|
|
873
|
+
yield this.loadHome(md);
|
|
874
|
+
// Skip
|
|
875
|
+
yield this.loadSkip(md);
|
|
876
|
+
// Data
|
|
877
|
+
yield this.loadApplications(md);
|
|
878
|
+
// Dashboards
|
|
879
|
+
yield this.loadResourceType('Dashboards', 'Dashboards', '/dashboards', md.CurrentUser.ID);
|
|
880
|
+
// Reports
|
|
881
|
+
yield this.loadResourceType('Reports', 'Reports', '/reports', md.CurrentUser.ID);
|
|
882
|
+
// Queries
|
|
883
|
+
yield this.loadResourceType('Queries', 'Queries', '/queries', md.CurrentUser.ID);
|
|
884
|
+
// Settings
|
|
885
|
+
yield this.loadSettings(md);
|
|
886
|
+
this.loading = false;
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
loadSkip(md) {
|
|
890
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
891
|
+
const drawerItem = {
|
|
892
|
+
id: 'AskSkip',
|
|
893
|
+
selected: false,
|
|
894
|
+
text: 'Ask Skip',
|
|
895
|
+
path: '/askskip',
|
|
896
|
+
svgIcon: this.sharedService.kendoSVGIcon('user')
|
|
897
|
+
};
|
|
898
|
+
this.drawerItems.push(drawerItem);
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
loadHome(md) {
|
|
902
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
903
|
+
const drawerItem = {
|
|
904
|
+
id: 'Home',
|
|
905
|
+
selected: true,
|
|
906
|
+
text: 'Home',
|
|
907
|
+
path: '/home',
|
|
908
|
+
svgIcon: this.sharedService.kendoSVGIcon('home')
|
|
909
|
+
};
|
|
910
|
+
this.drawerItems.push(drawerItem);
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
loadSettings(md) {
|
|
914
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
915
|
+
const drawerItem = {
|
|
916
|
+
id: 'Settings',
|
|
917
|
+
selected: false,
|
|
918
|
+
text: 'Settings',
|
|
919
|
+
path: '/settings',
|
|
920
|
+
svgIcon: this.sharedService.kendoSVGIcon('gear')
|
|
921
|
+
};
|
|
922
|
+
this.drawerItems.push(drawerItem);
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
loadApplications(md) {
|
|
926
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
927
|
+
const drawerItem = {
|
|
928
|
+
id: 'Data',
|
|
929
|
+
selected: false,
|
|
930
|
+
text: 'Data',
|
|
931
|
+
path: '/data',
|
|
932
|
+
svgIcon: this.sharedService.kendoSVGIcon('data')
|
|
933
|
+
};
|
|
934
|
+
this.drawerItems.push(drawerItem);
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
loadResourceType(key, resourceType, path, currentUserID) {
|
|
938
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
939
|
+
const rt = this.sharedService.ResourceTypeByName(resourceType);
|
|
940
|
+
if (rt) {
|
|
941
|
+
const icon = rt.Icon;
|
|
942
|
+
const drawerItem = {
|
|
943
|
+
id: key,
|
|
944
|
+
selected: false,
|
|
945
|
+
text: resourceType,
|
|
946
|
+
path: path,
|
|
947
|
+
svgIcon: this.sharedService.kendoSVGIcon(icon)
|
|
948
|
+
};
|
|
949
|
+
this.drawerItems.push(drawerItem);
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
setDrawerConfig() {
|
|
954
|
+
const pageWidth = window.innerWidth;
|
|
955
|
+
if (pageWidth <= 840) {
|
|
956
|
+
this.mode = 'overlay';
|
|
957
|
+
this.mini = false;
|
|
958
|
+
}
|
|
959
|
+
else {
|
|
960
|
+
this.mode = 'push';
|
|
961
|
+
this.mini = true;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
toggle() {
|
|
965
|
+
this.drawer.toggle();
|
|
966
|
+
this.sharedService.InvokeManualResize();
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.SharedService), i0.ɵɵdirectiveInject(i3.Location), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i4.Title), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
970
|
+
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["app-navigation"]], viewQuery: function NavigationComponent_Query(rf, ctx) { if (rf & 1) {
|
|
971
|
+
i0.ɵɵviewQuery(DrawerComponent, 5);
|
|
972
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
973
|
+
i0.ɵɵviewQuery(_c1, 5);
|
|
974
|
+
i0.ɵɵviewQuery(_c2, 7, ElementRef);
|
|
975
|
+
} if (rf & 2) {
|
|
976
|
+
let _t;
|
|
977
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.drawer = _t.first);
|
|
978
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.drawerWrapper = _t.first);
|
|
979
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabstrip = _t.first);
|
|
980
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.container = _t.first);
|
|
981
|
+
} }, hostVars: 2, hostBindings: function NavigationComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
982
|
+
i0.ɵɵlistener("resize", function NavigationComponent_resize_HostBindingHandler() { return ctx.onWindowResize(); }, false, i0.ɵɵresolveWindow)("click", function NavigationComponent_click_HostBindingHandler() { return ctx.onClick(); }, false, i0.ɵɵresolveDocument);
|
|
983
|
+
} if (rf & 2) {
|
|
984
|
+
i0.ɵɵclassProp("mobile-screen", ctx.isMobileScreen);
|
|
985
|
+
} }, inputs: { applicationName: "applicationName" }, decls: 5, vars: 6, consts: [[1, "navigation-wrap", 3, "ngClass"], ["drawerWrapper", ""], ["type", "converging-spinner", 4, "ngIf"], [4, "ngIf"], ["class", "context-menu", 3, "ngStyle", 4, "ngIf"], ["type", "converging-spinner"], [3, "items", "mode", "mini", "animation", "autoCollapse", "select"], ["drawer", ""], ["mjFillContainer", ""], ["mjFillContainer", "", 1, "drawer-container", 3, "scrollable", "keepTabContent", "animate", "tabClose", "tabSelect"], ["tabstrip", ""], [3, "selected", "closable"], ["kendoTabTitle", ""], ["kendoTabContent", "", "class", "navigation-tab-contents"], [3, "selected", "closable", 4, "ngFor", "ngForOf"], ["name", "home", 3, "icon", "contextmenu"], [1, "nav-tab-title", 3, "contextmenu"], [3, "icon", "contextmenu", 4, "ngIf"], [3, "icon", "contextmenu"], [3, "Data", "isVisible", "ResourceRecordSaved", "ContentLoadingStarted", "ContentLoadingComplete"], [1, "context-menu", 3, "ngStyle"], [1, "context-menu-item", 3, "click"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
986
|
+
i0.ɵɵelementStart(0, "div", 0, 1);
|
|
987
|
+
i0.ɵɵtemplate(2, NavigationComponent_kendo_loader_2_Template, 1, 0, "kendo-loader", 2)(3, NavigationComponent_kendo_drawer_container_3_Template, 10, 11, "kendo-drawer-container", 3);
|
|
988
|
+
i0.ɵɵelementEnd();
|
|
989
|
+
i0.ɵɵtemplate(4, NavigationComponent_div_4_Template, 7, 1, "div", 4);
|
|
990
|
+
} if (rf & 2) {
|
|
991
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c3, ctx.loader));
|
|
992
|
+
i0.ɵɵadvance(2);
|
|
993
|
+
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
994
|
+
i0.ɵɵadvance();
|
|
995
|
+
i0.ɵɵproperty("ngIf", !ctx.loading);
|
|
996
|
+
i0.ɵɵadvance();
|
|
997
|
+
i0.ɵɵproperty("ngIf", ctx.contextMenuVisible);
|
|
998
|
+
} }, dependencies: [i3.NgClass, i3.NgForOf, i3.NgIf, i3.NgStyle, i1.RouterOutlet, i5.LoaderComponent, i6.TabStripComponent, i6.TabStripTabComponent, i6.TabContentDirective, i6.TabTitleDirective, i7.SVGIconComponent, i8.FillContainer, i6.DrawerComponent, i6.DrawerContainerComponent, i6.DrawerContentComponent, i9.ResourceContainerComponent], styles: [".navigation-wrap[_ngcontent-%COMP%] {\r\n height: calc(100vh - 80px);\r\n width: 100%;\r\n overflow:hidden\r\n}\r\n\r\n.nav-tab-title[_ngcontent-%COMP%] {\r\n margin-left: 10px;\r\n}\r\n\r\n.context-menu[_ngcontent-%COMP%] {\r\n position: fixed;\r\n z-index: 9999;\r\n background-color: #ffffff;\r\n border: 1px solid #ccc;\r\n padding: 3px 3px;\r\n box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n.context-menu-item[_ngcontent-%COMP%] {\r\n padding: 8px 16px;\r\n cursor: pointer;\r\n}\r\n\r\n.context-menu-item[_ngcontent-%COMP%]:hover {\r\n background-color: #f1f1f1;\r\n}\r\n .navigation-wrap .drawer-container {\r\n padding: 20px;\r\n background: #FAFAFA;\r\n}\r\n .navigation-wrap .drawer-container .k-content {\r\n padding: 25px;\r\n}\r\n .navigation-wrap .drawer-container .k-tabstrip-items-wrapper {\r\n background: #fafafa;\r\n}\r\n .navigation-wrap .drawer-container .k-tabstrip-items-wrapper .k-item.k-active {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n .navigation-wrap .drawer-container .k-tabstrip-items-wrapper .k-item {\r\n background: #fafafa;\r\n border-radius: 0;\r\n}"] });
|
|
999
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationComponent, [{
|
|
1000
|
+
type: Component,
|
|
1001
|
+
args: [{ selector: 'app-navigation', template: "<div class=\"navigation-wrap\" [ngClass]=\"{'waiting': loader}\" #drawerWrapper>\r\n <kendo-loader *ngIf=\"loading\" type=\"converging-spinner\" ></kendo-loader>\r\n <kendo-drawer-container *ngIf=\"!loading\" >\r\n <kendo-drawer\r\n #drawer\r\n [items]=\"drawerItems\"\r\n [mode]=\"mode\"\r\n [mini]=\"mini\"\r\n [animation]=\"false\"\r\n (select)=\"onDrawerSelect($event)\"\r\n [autoCollapse]=\"false\"\r\n >\r\n </kendo-drawer>\r\n <kendo-drawer-content mjFillContainer>\r\n <kendo-tabstrip mjFillContainer class=\"drawer-container\" [scrollable]=\"true\" [keepTabContent]=\"true\" (tabClose)=\"onClose($event)\" (tabSelect)=\"onTabSelect($event)\" [animate]=\"false\" #tabstrip>\r\n <kendo-tabstrip-tab [selected]=\"activeTabIndex === 0\" [closable]=\"false\">\r\n <ng-template kendoTabTitle>\r\n <kendo-svgicon name=\"home\" [icon]=\"sharedService.kendoSVGIcon('home')\" (contextmenu)=\"onTabContextMenu($event, 0)\"></kendo-svgicon>\r\n <span class=\"nav-tab-title\" (contextmenu)=\"onTabContextMenu($event, 0)\">Home</span>\r\n </ng-template>\r\n <ng-template kendoTabContent class=\"navigation-tab-contents\">\r\n <router-outlet></router-outlet>\r\n </ng-template>\r\n </kendo-tabstrip-tab>\r\n <kendo-tabstrip-tab *ngFor=\"let tab of tabs;let i = index\" [selected]=\"isTabActive(tab.id)\" [closable]=\"true\">\r\n <ng-template kendoTabTitle>\r\n <kendo-svgicon *ngIf=\"tab?.contentLoading\" [icon]=\"sharedService.kendoSVGIcon('clock')\" (contextmenu)=\"onTabContextMenu($event, i)\"></kendo-svgicon>\r\n <kendo-svgicon *ngIf=\"!tab?.contentLoading && tab?.icon\" [icon]=\"sharedService.kendoSVGIcon(tab.icon)\" (contextmenu)=\"onTabContextMenu($event, i)\"></kendo-svgicon>\r\n <span class=\"nav-tab-title\" (contextmenu)=\"onTabContextMenu($event, i)\">{{ tab.labelLoading ? 'Loading...' : tab.label }}</span>\r\n </ng-template>\r\n <ng-template kendoTabContent class=\"navigation-tab-contents\">\r\n <app-resource [Data]=\"tab.data\" [isVisible]=\"tab?.id === getActiveTabId()\"\r\n (ResourceRecordSaved)=\"SaveSingleWorkspaceItem(tab)\"\r\n (ContentLoadingStarted)=\"setTabContentLoadingStatus(tab, true)\"\r\n (ContentLoadingComplete)=\"setTabContentLoadingStatus(tab, false)\"\r\n ></app-resource>\r\n </ng-template>\r\n </kendo-tabstrip-tab>\r\n </kendo-tabstrip>\r\n </kendo-drawer-content>\r\n </kendo-drawer-container>\r\n</div>\r\n\r\n<div class=\"context-menu\" [ngStyle]=\"contextMenuStyle\" *ngIf=\"contextMenuVisible\">\r\n <div class=\"context-menu-item\" (click)=\"handleContextMenuOption(1)\">Close All</div>\r\n <div class=\"context-menu-item\" (click)=\"handleContextMenuOption(2)\">Close Others</div>\r\n <div class=\"context-menu-item\" (click)=\"handleContextMenuOption(3)\">Close Tabs to the Right</div>\r\n </div>\r\n", styles: [".navigation-wrap {\r\n height: calc(100vh - 80px);\r\n width: 100%;\r\n overflow:hidden\r\n}\r\n\r\n.nav-tab-title {\r\n margin-left: 10px;\r\n}\r\n\r\n.context-menu {\r\n position: fixed;\r\n z-index: 9999;\r\n background-color: #ffffff;\r\n border: 1px solid #ccc;\r\n padding: 3px 3px;\r\n box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n.context-menu-item {\r\n padding: 8px 16px;\r\n cursor: pointer;\r\n}\r\n\r\n.context-menu-item:hover {\r\n background-color: #f1f1f1;\r\n}\r\n::ng-deep .navigation-wrap .drawer-container {\r\n padding: 20px;\r\n background: #FAFAFA;\r\n}\r\n::ng-deep .navigation-wrap .drawer-container .k-content {\r\n padding: 25px;\r\n}\r\n::ng-deep .navigation-wrap .drawer-container .k-tabstrip-items-wrapper {\r\n background: #fafafa;\r\n}\r\n::ng-deep .navigation-wrap .drawer-container .k-tabstrip-items-wrapper .k-item.k-active {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n::ng-deep .navigation-wrap .drawer-container .k-tabstrip-items-wrapper .k-item {\r\n background: #fafafa;\r\n border-radius: 0;\r\n}\r\n"] }]
|
|
1002
|
+
}], () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.SharedService }, { type: i3.Location }, { type: i0.Renderer2 }, { type: i4.Title }, { type: i0.ChangeDetectorRef }], { applicationName: [{
|
|
1003
|
+
type: Input
|
|
1004
|
+
}], isMobileScreen: [{
|
|
1005
|
+
type: HostBinding,
|
|
1006
|
+
args: ['class.mobile-screen']
|
|
1007
|
+
}], drawer: [{
|
|
1008
|
+
type: ViewChild,
|
|
1009
|
+
args: [DrawerComponent, { static: false }]
|
|
1010
|
+
}], drawerWrapper: [{
|
|
1011
|
+
type: ViewChild,
|
|
1012
|
+
args: ['drawerWrapper', { static: false }]
|
|
1013
|
+
}], tabstrip: [{
|
|
1014
|
+
type: ViewChild,
|
|
1015
|
+
args: ["tabstrip", { static: false }]
|
|
1016
|
+
}], container: [{
|
|
1017
|
+
type: ViewChild,
|
|
1018
|
+
args: ['container', { static: true, read: ElementRef }]
|
|
1019
|
+
}], onWindowResize: [{
|
|
1020
|
+
type: HostListener,
|
|
1021
|
+
args: ['window:resize']
|
|
1022
|
+
}], onClick: [{
|
|
1023
|
+
type: HostListener,
|
|
1024
|
+
args: ['document:click']
|
|
1025
|
+
}] }); })();
|
|
1026
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NavigationComponent, { className: "NavigationComponent", filePath: "src\\lib\\navigation\\navigation.component.ts", lineNumber: 28 }); })();
|