@huntsman-cancer-institute/reporting-framework 15.0.2 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/datepicker/report-datepicker.component.d.ts +1 -1
  2. package/{esm2020 → esm2022}/datepicker/report-datepicker.component.mjs +8 -8
  3. package/{esm2020 → esm2022}/format/format.component.mjs +6 -6
  4. package/{esm2020 → esm2022}/parameter/parameter.component.mjs +6 -6
  5. package/{esm2020 → esm2022}/report.module.mjs +29 -29
  6. package/{esm2020 → esm2022}/reporting-framework.component.mjs +6 -6
  7. package/{esm2020 → esm2022}/resizable-divider/resizable-section-divider.component.mjs +6 -6
  8. package/{esm2020 → esm2022}/spinner/dialogs.service.mjs +4 -4
  9. package/{esm2020 → esm2022}/spinner/spinner-dialog.component.mjs +6 -6
  10. package/{fesm2020 → fesm2022}/huntsman-cancer-institute-reporting-framework.mjs +63 -63
  11. package/{fesm2020 → fesm2022}/huntsman-cancer-institute-reporting-framework.mjs.map +1 -1
  12. package/format/format.component.d.ts +1 -1
  13. package/package.json +14 -18
  14. package/reporting-framework.component.d.ts +1 -1
  15. package/resizable-divider/resizable-section-divider.component.d.ts +1 -1
  16. package/spinner/spinner-dialog.component.d.ts +1 -1
  17. package/fesm2015/huntsman-cancer-institute-reporting-framework.mjs +0 -1430
  18. package/fesm2015/huntsman-cancer-institute-reporting-framework.mjs.map +0 -1
  19. /package/{esm2020 → esm2022}/huntsman-cancer-institute-reporting-framework.mjs +0 -0
  20. /package/{esm2020 → esm2022}/index.mjs +0 -0
  21. /package/{esm2020 → esm2022}/model/format.model.mjs +0 -0
  22. /package/{esm2020 → esm2022}/model/option.model.mjs +0 -0
  23. /package/{esm2020 → esm2022}/model/param.model.mjs +0 -0
  24. /package/{esm2020 → esm2022}/model/report-tab.model.mjs +0 -0
  25. /package/{esm2020 → esm2022}/model/report.model.mjs +0 -0
@@ -1,1430 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, Inject, Injectable, ViewChild, HostListener, ViewContainerRef, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule, DatePipe } from '@angular/common';
5
- import * as i1$2 from '@angular/common/http';
6
- import { HttpParams } from '@angular/common/http';
7
- import * as i2 from '@angular/forms';
8
- import { FormsModule } from '@angular/forms';
9
- import * as i3$1 from '@huntsman-cancer-institute/input';
10
- import { SelectModule } from '@huntsman-cancer-institute/input';
11
- import { MAT_DATE_LOCALE } from '@angular/material/core';
12
- import * as i3 from '@angular/material/datepicker';
13
- import { MatDatepickerModule } from '@angular/material/datepicker';
14
- import * as moment from 'moment';
15
- import * as i4 from '@ng-bootstrap/ng-bootstrap';
16
- import { ModalDismissReasons, NgbModule } from '@ng-bootstrap/ng-bootstrap';
17
- import * as i1$1 from '@angular/material/legacy-dialog';
18
- import { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogConfig, MatLegacyDialogModule } from '@angular/material/legacy-dialog';
19
- import * as i2$1 from '@angular/material/legacy-progress-spinner';
20
- import { MatLegacyProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
21
- import * as i5 from '@angular/material/legacy-tabs';
22
- import { MatLegacyTabsModule } from '@angular/material/legacy-tabs';
23
- import * as i6 from 'ag-grid-angular';
24
- import { AgGridModule } from 'ag-grid-angular';
25
-
26
- class Report {
27
- constructor() {
28
- this.params = [];
29
- this.formats = [];
30
- }
31
- }
32
-
33
- class Param {
34
- constructor() {
35
- this.activeOnly = true;
36
- this.options = [];
37
- this.selectedValueList = []; //for multi-select
38
- }
39
- calculateDictionaryURL() {
40
- var out = "";
41
- if (this.activeOnly) {
42
- out = this.dictAPILeadIn + "/" + this.className + "/active-entries";
43
- }
44
- else {
45
- out = this.dictAPILeadIn + "/" + this.className + "/entries";
46
- }
47
- return out;
48
- }
49
- }
50
-
51
- class ReportDatepickerComponent {
52
- constructor() {
53
- this.invalid = false;
54
- this.valueChange = new EventEmitter();
55
- }
56
- ngOnInit() {
57
- let today = new Date();
58
- // set the minDate to 20 years in the past by default
59
- if (!this.minDate) {
60
- this.minDate = new Date(today.getFullYear() - 20, today.getMonth(), today.getDate());
61
- }
62
- // set max date to 20 years in future by default
63
- if (!this.maxDate) {
64
- this.maxDate = new Date(today.getFullYear() + 20, today.getMonth(), today.getDate());
65
- }
66
- }
67
- onChange(newValue) {
68
- this.value = newValue;
69
- this.valueChange.emit(newValue);
70
- }
71
- clear() {
72
- this.value = undefined;
73
- this.valueChange.emit();
74
- }
75
- // Clear input field if entered data is invalid (Mat library sets value to null if invalid but doesn't clear input)
76
- onBlur() {
77
- if (!this.value) {
78
- this.value = undefined;
79
- this.valueChange.emit();
80
- }
81
- }
82
- }
83
- ReportDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ReportDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
84
- ReportDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ReportDatepickerComponent, selector: "report-datepicker", inputs: { value: "value", placeholder: "placeholder", minDate: "minDate", maxDate: "maxDate", invalid: "invalid" }, outputs: { valueChange: "valueChange" }, providers: [
85
- { provide: MAT_DATE_LOCALE, useValue: "en-GB" }
86
- ], ngImport: i0, template: `
87
- <div class="d-flex" style="width: 100%;">
88
- <input matInput [matDatepicker]="picker" class="form-control" style="cursor: pointer;" [placeholder]="placeholder" [ngModel]="value" (ngModelChange)="onChange($event)"
89
- (click)="picker.open()" (blur)="onBlur()" [min]="minDate" [max]="maxDate"
90
- [ngStyle]="{'background-color':invalid ? 'red' : '#fff'}" >
91
- <span class="input-group-text" id="clearIcon" (click)="clear()"><i class="fas fa-times"></i></span>
92
- <button class="btn btn-outline-secondary" type="button" (click)="picker.open()" style="height:32px; width:32px;"><i class="fas fa-calendar-alt"></i></button>
93
- <mat-datepicker #picker ></mat-datepicker>
94
- </div>
95
- `, isInline: true, styles: ["#clearIcon{cursor:pointer}#clearIcon:Hover{background-color:#495057;color:#e9ecef}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }] });
96
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ReportDatepickerComponent, decorators: [{
97
- type: Component,
98
- args: [{ selector: "report-datepicker", template: `
99
- <div class="d-flex" style="width: 100%;">
100
- <input matInput [matDatepicker]="picker" class="form-control" style="cursor: pointer;" [placeholder]="placeholder" [ngModel]="value" (ngModelChange)="onChange($event)"
101
- (click)="picker.open()" (blur)="onBlur()" [min]="minDate" [max]="maxDate"
102
- [ngStyle]="{'background-color':invalid ? 'red' : '#fff'}" >
103
- <span class="input-group-text" id="clearIcon" (click)="clear()"><i class="fas fa-times"></i></span>
104
- <button class="btn btn-outline-secondary" type="button" (click)="picker.open()" style="height:32px; width:32px;"><i class="fas fa-calendar-alt"></i></button>
105
- <mat-datepicker #picker ></mat-datepicker>
106
- </div>
107
- `, providers: [
108
- { provide: MAT_DATE_LOCALE, useValue: "en-GB" }
109
- ], styles: ["#clearIcon{cursor:pointer}#clearIcon:Hover{background-color:#495057;color:#e9ecef}\n"] }]
110
- }], propDecorators: { value: [{
111
- type: Input
112
- }], placeholder: [{
113
- type: Input
114
- }], minDate: [{
115
- type: Input
116
- }], maxDate: [{
117
- type: Input
118
- }], invalid: [{
119
- type: Input
120
- }], valueChange: [{
121
- type: Output
122
- }] } });
123
-
124
- class ParameterComponent {
125
- setParam(p) {
126
- this.param = p;
127
- if (this.param.type === "radio") { //if radio, auto select first option
128
- let o = this.param.options[0];
129
- this.param.selectedValue = o.value;
130
- }
131
- }
132
- }
133
- ParameterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ParameterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
- ParameterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ParameterComponent, selector: "hci-parameter", ngImport: i0, template: `
135
-
136
- <!--Text Input-->
137
- <ng-container *ngIf="param.type === 'input'">
138
- <div style="display: block;">
139
- <div class="row">
140
- <label class="data-label">{{param.caption}}:</label>
141
- <input type="text" class="form-control input-field"
142
- [id]="param.name"
143
- [name]="param.name"
144
- [(ngModel)]="param.selectedValue"
145
- >
146
- </div>
147
- </div>
148
- </ng-container>
149
-
150
- <!--Date-->
151
- <ng-container *ngIf="param.type === 'date'">
152
- <div style="display: block;">
153
- <div class="row">
154
- <label class="data-label">{{param.caption}}:</label>
155
- <report-datepicker class="date-input"
156
- placeholder=""
157
- id="{{param.name}}"
158
- [(value)]="param.selectedValue"
159
- >
160
- </report-datepicker>
161
- </div>
162
- </div>
163
- </ng-container>
164
-
165
- <!--Select with dictionary-->
166
- <ng-container *ngIf="param.type === 'select' && param.className && param.className != ''">
167
- <div style="display: block;">
168
- <div class="row">
169
- <label class="data-label">{{param.caption}}:</label>
170
- <hci-native-select class="report-select"
171
- [id]="param.name"
172
- [name]="param.name"
173
- [idKey]="param.valueXPath"
174
- [displayKey]="param.displayXPath"
175
- [(ngModel)]="param.selectedValue"
176
- [url]="param.calculateDictionaryURL()"
177
- ></hci-native-select>
178
- </div>
179
- </div>
180
- </ng-container>
181
-
182
- <!--Select with manual options-->
183
- <ng-container *ngIf="param.type === 'select' && (!param.className || param.className === '')">
184
- <div style="display: block;">
185
- <div class="row">
186
- <label class="data-label">{{param.caption}}:</label>
187
- <hci-native-select class="report-select"
188
- [id]="param.name"
189
- [name]="param.name"
190
- [(ngModel)]="param.selectedValue"
191
- [entries] = "entries"
192
- ></hci-native-select>
193
- </div>
194
- </div>
195
- </ng-container>
196
-
197
- <!--Multi-select with dictionary-->
198
- <ng-container *ngIf="param.type === 'multiselect' && param.className && param.className != ''">
199
- <div style="display: block;">
200
- <div class="row">
201
- <label class="data-label">{{param.caption}}:</label>
202
- <hci-md-multi-select class="multi-report-select"
203
- [id]="param.name"
204
- [name]="param.name"
205
- [idKey]="param.valueXPath"
206
- [displayKey]="param.displayXPath"
207
- [(ngModel)]="param.selectedValueList"
208
- [url]="param.calculateDictionaryURL()"
209
- >
210
- </hci-md-multi-select>
211
- </div>
212
- </div>
213
- </ng-container>
214
-
215
- <!--Multi-select with manual options-->
216
- <ng-container *ngIf="param.type === 'multiselect' && (!param.className || param.className === '')">
217
- <div style="display: block;">
218
- <div class="row">
219
- <label class="data-label">{{param.caption}}:</label>
220
- <hci-md-multi-select class="multi-report-select"
221
- [id]="param.name"
222
- [name]="param.name"
223
- [entries] = "entries"
224
- [(ngModel)]="param.selectedValueList"
225
- >
226
- </hci-md-multi-select>
227
- </div>
228
- </div>
229
- </ng-container>
230
-
231
- <!--Radio buttons-->
232
- <ng-container *ngIf="param.type === 'radio'">
233
- <div style="display: block;">
234
- <div class="row">
235
- <label class="data-label">{{param.caption}}:</label>
236
- <div class="radio-pair" *ngFor="let o of param.options">
237
- <input type="radio"
238
- style="margin-right: 3px;"
239
- [value]="o.value"
240
- [id]="param.name + '-' + o.value"
241
- [(ngModel)]="param.selectedValue"
242
- [name]="param.name">
243
- <label for="{{param.name + '-' + o.value}}">{{o.display}}</label>
244
- </div>
245
- </div>
246
- </div>
247
- </ng-container>
248
-
249
- `, isInline: true, styles: [".data-label{width:270px;margin-right:30px;display:flex;align-items:center;justify-content:flex-end}.date-input{width:45%}.report-select,.multi-report-select{flex-grow:unset!important;width:45%}.radio-pair{display:flex;align-items:center;padding-right:5px;margin-right:15px}.input-field{width:45%}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MdMultiSelectComponent, selector: "hci-md-multi-select", inputs: ["class", "name", "label", "url", "entries", "required", "idKey", "displayKey"] }, { kind: "component", type: i3$1.NativeSelectComponent, selector: "hci-native-select", inputs: ["class", "name", "label", "url", "entries", "required", "idKey", "displayKey", "disabled", "sortKey", "sortNumeric", "filterKey", "filter"] }, { kind: "component", type: ReportDatepickerComponent, selector: "report-datepicker", inputs: ["value", "placeholder", "minDate", "maxDate", "invalid"], outputs: ["valueChange"] }] });
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ParameterComponent, decorators: [{
251
- type: Component,
252
- args: [{ selector: "hci-parameter", template: `
253
-
254
- <!--Text Input-->
255
- <ng-container *ngIf="param.type === 'input'">
256
- <div style="display: block;">
257
- <div class="row">
258
- <label class="data-label">{{param.caption}}:</label>
259
- <input type="text" class="form-control input-field"
260
- [id]="param.name"
261
- [name]="param.name"
262
- [(ngModel)]="param.selectedValue"
263
- >
264
- </div>
265
- </div>
266
- </ng-container>
267
-
268
- <!--Date-->
269
- <ng-container *ngIf="param.type === 'date'">
270
- <div style="display: block;">
271
- <div class="row">
272
- <label class="data-label">{{param.caption}}:</label>
273
- <report-datepicker class="date-input"
274
- placeholder=""
275
- id="{{param.name}}"
276
- [(value)]="param.selectedValue"
277
- >
278
- </report-datepicker>
279
- </div>
280
- </div>
281
- </ng-container>
282
-
283
- <!--Select with dictionary-->
284
- <ng-container *ngIf="param.type === 'select' && param.className && param.className != ''">
285
- <div style="display: block;">
286
- <div class="row">
287
- <label class="data-label">{{param.caption}}:</label>
288
- <hci-native-select class="report-select"
289
- [id]="param.name"
290
- [name]="param.name"
291
- [idKey]="param.valueXPath"
292
- [displayKey]="param.displayXPath"
293
- [(ngModel)]="param.selectedValue"
294
- [url]="param.calculateDictionaryURL()"
295
- ></hci-native-select>
296
- </div>
297
- </div>
298
- </ng-container>
299
-
300
- <!--Select with manual options-->
301
- <ng-container *ngIf="param.type === 'select' && (!param.className || param.className === '')">
302
- <div style="display: block;">
303
- <div class="row">
304
- <label class="data-label">{{param.caption}}:</label>
305
- <hci-native-select class="report-select"
306
- [id]="param.name"
307
- [name]="param.name"
308
- [(ngModel)]="param.selectedValue"
309
- [entries] = "entries"
310
- ></hci-native-select>
311
- </div>
312
- </div>
313
- </ng-container>
314
-
315
- <!--Multi-select with dictionary-->
316
- <ng-container *ngIf="param.type === 'multiselect' && param.className && param.className != ''">
317
- <div style="display: block;">
318
- <div class="row">
319
- <label class="data-label">{{param.caption}}:</label>
320
- <hci-md-multi-select class="multi-report-select"
321
- [id]="param.name"
322
- [name]="param.name"
323
- [idKey]="param.valueXPath"
324
- [displayKey]="param.displayXPath"
325
- [(ngModel)]="param.selectedValueList"
326
- [url]="param.calculateDictionaryURL()"
327
- >
328
- </hci-md-multi-select>
329
- </div>
330
- </div>
331
- </ng-container>
332
-
333
- <!--Multi-select with manual options-->
334
- <ng-container *ngIf="param.type === 'multiselect' && (!param.className || param.className === '')">
335
- <div style="display: block;">
336
- <div class="row">
337
- <label class="data-label">{{param.caption}}:</label>
338
- <hci-md-multi-select class="multi-report-select"
339
- [id]="param.name"
340
- [name]="param.name"
341
- [entries] = "entries"
342
- [(ngModel)]="param.selectedValueList"
343
- >
344
- </hci-md-multi-select>
345
- </div>
346
- </div>
347
- </ng-container>
348
-
349
- <!--Radio buttons-->
350
- <ng-container *ngIf="param.type === 'radio'">
351
- <div style="display: block;">
352
- <div class="row">
353
- <label class="data-label">{{param.caption}}:</label>
354
- <div class="radio-pair" *ngFor="let o of param.options">
355
- <input type="radio"
356
- style="margin-right: 3px;"
357
- [value]="o.value"
358
- [id]="param.name + '-' + o.value"
359
- [(ngModel)]="param.selectedValue"
360
- [name]="param.name">
361
- <label for="{{param.name + '-' + o.value}}">{{o.display}}</label>
362
- </div>
363
- </div>
364
- </div>
365
- </ng-container>
366
-
367
- `, styles: [".data-label{width:270px;margin-right:30px;display:flex;align-items:center;justify-content:flex-end}.date-input{width:45%}.report-select,.multi-report-select{flex-grow:unset!important;width:45%}.radio-pair{display:flex;align-items:center;padding-right:5px;margin-right:15px}.input-field{width:45%}\n"] }]
368
- }] });
369
-
370
- class Option {
371
- }
372
-
373
- class ReportTab {
374
- }
375
-
376
- class Format {
377
- }
378
-
379
- class FormatComponent {
380
- constructor() {
381
- this.selectedValueChange = new EventEmitter();
382
- }
383
- selectFormat(s) {
384
- this.selectedValue = s;
385
- this.selectedValueChange.emit(s);
386
- }
387
- }
388
- FormatComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
389
- FormatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FormatComponent, selector: "hci-format", inputs: { selectedValue: "selectedValue" }, outputs: { selectedValueChange: "selectedValueChange" }, ngImport: i0, template: `
390
- <div class="radio-pair">
391
- <input type="radio" #radio
392
- [value]="format.name"
393
- [id]="format.name"
394
- [checked]="selectedValue === format.name ? true : false"
395
- (click)="selectFormat(radio.value)"
396
- name="format">
397
- <label>{{format.caption}}</label>
398
- </div>
399
- `, isInline: true, styles: [".radio-pair{display:flex;align-items:center;padding-right:5px}\n"] });
400
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormatComponent, decorators: [{
401
- type: Component,
402
- args: [{ selector: "hci-format", template: `
403
- <div class="radio-pair">
404
- <input type="radio" #radio
405
- [value]="format.name"
406
- [id]="format.name"
407
- [checked]="selectedValue === format.name ? true : false"
408
- (click)="selectFormat(radio.value)"
409
- name="format">
410
- <label>{{format.caption}}</label>
411
- </div>
412
- `, styles: [".radio-pair{display:flex;align-items:center;padding-right:5px}\n"] }]
413
- }], propDecorators: { selectedValue: [{
414
- type: Input
415
- }], selectedValueChange: [{
416
- type: Output
417
- }] } });
418
-
419
- class SpinnerDialogComponent {
420
- constructor(dialogRef, data) {
421
- this.dialogRef = dialogRef;
422
- this.data = data;
423
- this.strokeWidth = 3;
424
- this.diameter = 30;
425
- this.message = "Loading...";
426
- if (this.data) {
427
- if (!!this.data.message) {
428
- this.message = this.data.message;
429
- }
430
- if (!!this.data.diameter) {
431
- this.diameter = this.data.diameter;
432
- }
433
- if (!!this.data.strokeWidth) {
434
- this.strokeWidth = this.data.strokeWidth;
435
- }
436
- }
437
- }
438
- }
439
- SpinnerDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpinnerDialogComponent, deps: [{ token: i1$1.MatLegacyDialogRef }, { token: MAT_LEGACY_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
440
- SpinnerDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SpinnerDialogComponent, selector: "spinner-dialog", inputs: { strokeWidth: "strokeWidth", diameter: "diameter", message: "message" }, ngImport: i0, template: `
441
- <div mat-dialog-content class="full-height padded">
442
- <div class="full-width full-height t">
443
- <div class="tr">
444
- <div class="td vertical-center">
445
- <mat-spinner [hidden]="false" strokeWidth="{{strokeWidth}}" [diameter]="diameter"></mat-spinner>
446
- </div>
447
- <div class="td vertical-center">
448
- {{message}}
449
- </div>
450
- </div>
451
- </div>
452
- </div>
453
- <div mat-dialog-actions class="not-rendered">
454
- </div>
455
- `, isInline: true, styles: [".t{display:table}.tr{display:table-row}.td{display:table-cell}.full-height{height:100%}.full-width{width:100%}.vertical-center{vertical-align:middle}.padded{padding-top:.4em;padding-bottom:.4em}.not-rendered{padding:0;margin:0;min-height:0;max-height:0;height:0}\n"], dependencies: [{ kind: "directive", type: i1$1.MatLegacyDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$1.MatLegacyDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i2$1.MatLegacyProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }] });
456
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpinnerDialogComponent, decorators: [{
457
- type: Component,
458
- args: [{ selector: "spinner-dialog", template: `
459
- <div mat-dialog-content class="full-height padded">
460
- <div class="full-width full-height t">
461
- <div class="tr">
462
- <div class="td vertical-center">
463
- <mat-spinner [hidden]="false" strokeWidth="{{strokeWidth}}" [diameter]="diameter"></mat-spinner>
464
- </div>
465
- <div class="td vertical-center">
466
- {{message}}
467
- </div>
468
- </div>
469
- </div>
470
- </div>
471
- <div mat-dialog-actions class="not-rendered">
472
- </div>
473
- `, styles: [".t{display:table}.tr{display:table-row}.td{display:table-cell}.full-height{height:100%}.full-width{width:100%}.vertical-center{vertical-align:middle}.padded{padding-top:.4em;padding-bottom:.4em}.not-rendered{padding:0;margin:0;min-height:0;max-height:0;height:0}\n"] }]
474
- }], ctorParameters: function () {
475
- return [{ type: i1$1.MatLegacyDialogRef }, { type: undefined, decorators: [{
476
- type: Inject,
477
- args: [MAT_LEGACY_DIALOG_DATA]
478
- }] }];
479
- }, propDecorators: { strokeWidth: [{
480
- type: Input,
481
- args: ["strokeWidth"]
482
- }], diameter: [{
483
- type: Input,
484
- args: ["diameter"]
485
- }], message: [{
486
- type: Input,
487
- args: ["message"]
488
- }] } });
489
-
490
- var DialogType;
491
- (function (DialogType) {
492
- DialogType["ERROR"] = "Error";
493
- DialogType["WARNING"] = "Warning";
494
- DialogType["ALERT"] = "Alert";
495
- DialogType["SUCCESS"] = "Succeed";
496
- DialogType["FAILED"] = "Failed";
497
- DialogType["CONFIRM"] = "Confirm";
498
- DialogType["INFO"] = "Info";
499
- DialogType["VALIDATION"] = "Validation Error";
500
- })(DialogType || (DialogType = {}));
501
- class DialogsService {
502
- get spinnerDialogIsOpen() {
503
- return this._spinnerDialogIsOpen;
504
- }
505
- constructor(dialog) {
506
- this.dialog = dialog;
507
- this._spinnerDialogIsOpen = false;
508
- this.spinnerWorkItemCount = 0;
509
- this.checkingSpinnerWorkItems = false;
510
- this.spinnerDialogRefs = [];
511
- }
512
- startDefaultSpinnerDialog() {
513
- return this.startSpinnerDialog("Please wait...", 3, 30);
514
- }
515
- startSpinnerDialog(message, strokeWidth, diameter) {
516
- if (this._spinnerDialogIsOpen) {
517
- return null;
518
- }
519
- this._spinnerDialogIsOpen = true;
520
- let configuration = new MatLegacyDialogConfig();
521
- configuration.data = {
522
- message: message,
523
- strokeWidth: strokeWidth,
524
- diameter: diameter
525
- };
526
- configuration.width = "13em";
527
- configuration.disableClose = true;
528
- let dialogRef = this.dialog.open(SpinnerDialogComponent, configuration);
529
- dialogRef.afterClosed().subscribe(() => {
530
- this._spinnerDialogIsOpen = false;
531
- });
532
- this.spinnerDialogRefs.push(dialogRef);
533
- return dialogRef;
534
- }
535
- // Let there be an alternative, global way to stop all active spinner dialogs.
536
- stopAllSpinnerDialogs() {
537
- this.spinnerWorkItemCount = 0;
538
- for (let dialogRef of this.spinnerDialogRefs) {
539
- setTimeout(() => {
540
- dialogRef.close();
541
- });
542
- }
543
- this.spinnerDialogRefs = [];
544
- }
545
- addSpinnerWorkItem() {
546
- this.spinnerWorkItemCount++;
547
- if (!this.checkingSpinnerWorkItems) {
548
- this.checkingSpinnerWorkItems = true;
549
- setTimeout(() => {
550
- this.checkSpinnerWorkItems();
551
- });
552
- }
553
- }
554
- removeSpinnerWorkItem() {
555
- this.spinnerWorkItemCount--;
556
- if (this.spinnerWorkItemCount < 0) {
557
- this.spinnerWorkItemCount = 0;
558
- }
559
- if (!this.checkingSpinnerWorkItems) {
560
- this.checkingSpinnerWorkItems = true;
561
- setTimeout(() => {
562
- this.checkSpinnerWorkItems();
563
- });
564
- }
565
- }
566
- checkSpinnerWorkItems() {
567
- this.checkingSpinnerWorkItems = false;
568
- if (this.spinnerWorkItemCount) {
569
- if (!this._spinnerDialogIsOpen) {
570
- this.startDefaultSpinnerDialog();
571
- }
572
- }
573
- else if (this._spinnerDialogIsOpen) {
574
- this.stopAllSpinnerDialogs();
575
- }
576
- }
577
- }
578
- DialogsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogsService, deps: [{ token: i1$1.MatLegacyDialog }], target: i0.ɵɵFactoryTarget.Injectable });
579
- DialogsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogsService });
580
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogsService, decorators: [{
581
- type: Injectable
582
- }], ctorParameters: function () { return [{ type: i1$1.MatLegacyDialog }]; } });
583
-
584
- class ResizableSectionDividerComponent {
585
- constructor() {
586
- // Starting width or height % for the right / bottom containers respectively
587
- this.initialPercentage = 50;
588
- this.isVerticalLayout = false;
589
- this.maxPercentage = 90;
590
- this.minPercentage = 10;
591
- this.dragging = false;
592
- this.grabberOffset = 0;
593
- }
594
- ngOnInit() {
595
- this.sectionSize = this.initialPercentage;
596
- this.verticalTouchFunction = (event) => {
597
- if (this.dragging) {
598
- this.grabberOffset = (((20 / this.verticalContainer.nativeElement.offsetHeight) * 100) / 2);
599
- this.sectionSize = ((this.verticalContainer.nativeElement.offsetHeight - (event.touches[0].pageY - this.verticalContainer.nativeElement.getBoundingClientRect().top))
600
- / (this.verticalContainer.nativeElement.offsetHeightt) * 100);
601
- event.stopPropagation();
602
- event.preventDefault();
603
- }
604
- };
605
- this.horizontalTouchFunction = (event) => {
606
- if (this.dragging) {
607
- this.grabberOffset = (((10 / this.horizontalContainer.nativeElement.offsetWidth) * 100) / 2);
608
- this.sectionSize = ((this.horizontalContainer.nativeElement.offsetWidth - event.touches[0].pageX - this.horizontalContainer.nativeElement.getBoundingClientRect().left)
609
- / (this.horizontalContainer.nativeElement.offsetWidth) * 100);
610
- event.stopPropagation();
611
- event.preventDefault();
612
- }
613
- };
614
- }
615
- ngAfterViewInit() {
616
- // Handle initializing grabber size for when elements are initialized as hidden
617
- this.elementObserver = new IntersectionObserver((entries, observable) => {
618
- entries.forEach(entry => {
619
- if (entry.isIntersecting) {
620
- // subtract half the grabber height/width % from each section
621
- if (this.isVerticalLayout) {
622
- this.grabberOffset = (((20 / this.verticalContainer.nativeElement.offsetHeight) * 100) / 2);
623
- }
624
- else {
625
- this.grabberOffset = (((10 / this.horizontalContainer.nativeElement.offsetWidth) * 100) / 2);
626
- }
627
- observable.disconnect();
628
- }
629
- });
630
- });
631
- if (this.isVerticalLayout) {
632
- this.elementObserver.observe(this.verticalContainer.nativeElement);
633
- window.addEventListener("touchmove", this.verticalTouchFunction, { passive: false });
634
- }
635
- else {
636
- this.elementObserver.observe(this.horizontalContainer.nativeElement);
637
- window.addEventListener("touchmove", this.horizontalTouchFunction, { passive: false });
638
- }
639
- }
640
- mouseMove(event) {
641
- if (this.dragging) {
642
- if (this.isVerticalLayout) {
643
- this.grabberOffset = (((20 / this.verticalContainer.nativeElement.offsetHeight) * 100) / 2);
644
- this.sectionSize = ((this.verticalContainer.nativeElement.offsetHeight - (event.pageY - this.verticalContainer.nativeElement.getBoundingClientRect().top))
645
- / (this.verticalContainer.nativeElement.offsetHeight) * 100);
646
- event.stopPropagation();
647
- event.preventDefault();
648
- }
649
- else {
650
- this.grabberOffset = (((10 / this.horizontalContainer.nativeElement.offsetWidth) * 100) / 2);
651
- this.sectionSize = ((this.horizontalContainer.nativeElement.offsetWidth - event.pageX - this.horizontalContainer.nativeElement.getBoundingClientRect().left)
652
- / (this.horizontalContainer.nativeElement.offsetWidth) * 100);
653
- event.stopPropagation();
654
- event.preventDefault();
655
- }
656
- }
657
- }
658
- mouseUp(event) {
659
- if (this.dragging) {
660
- this.dragging = false;
661
- }
662
- }
663
- ngOnDestroy() {
664
- if (this.isVerticalLayout) {
665
- window.removeEventListener("touchmove", this.verticalTouchFunction);
666
- }
667
- else {
668
- window.removeEventListener("touchmove", this.horizontalTouchFunction);
669
- }
670
- }
671
- }
672
- ResizableSectionDividerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResizableSectionDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
673
- ResizableSectionDividerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ResizableSectionDividerComponent, selector: "resizable-section-divider", inputs: { initialPercentage: "initialPercentage", isVerticalLayout: "isVerticalLayout", maxPercentage: "maxPercentage", minPercentage: "minPercentage" }, host: { listeners: { "document:mousemove": "mouseMove($event)", "document:mouseup": "mouseUp($event)", "document:touchend": "mouseUp($event)" } }, viewQueries: [{ propertyName: "verticalContainer", first: true, predicate: ["verticalContainer"], descendants: true }, { propertyName: "horizontalContainer", first: true, predicate: ["horizontalContainer"], descendants: true }], ngImport: i0, template: `
674
- <div *ngIf="isVerticalLayout" style="height: 100%; width: 100%;" #verticalContainer>
675
- <div class="p-1" style="width: 100%;" [style.min-height.%]="minPercentage" [style.max-height.%]="maxPercentage" [style.height.%]="(100 - sectionSize - grabberOffset)">
676
- <ng-content select="[topSection]"></ng-content>
677
- </div>
678
- <div class="d-flex align-items-center justify-content-center" style="height: 20px; width: 100%;">
679
- <div class="rad-grabber-vertical" (mousedown)="dragging = true;" (touchstart)="dragging = true;">
680
- <i class="fa fa-grip-lines"></i>
681
- </div>
682
- </div>
683
- <div class="p-1" style="width: 100%;" [style.min-height.%]="minPercentage" [style.max-height.%]="maxPercentage" [style.height.%]="(sectionSize - grabberOffset)">
684
- <ng-content select="[bottomSection]"></ng-content>
685
- </div>
686
- </div>
687
-
688
- <div *ngIf="!isVerticalLayout" class="d-flex" style="height: 100%; width: 100%;" #horizontalContainer>
689
- <div class="p-1" style="height: 100%;" [style.min-width.%]="minPercentage" [style.max-width.%]="maxPercentage" [style.width.%]="(100 - sectionSize - grabberOffset)">
690
- <ng-content select="[leftSection]"></ng-content>
691
- </div>
692
- <div class="d-flex align-items-center justify-content-center" style="width: 10px; height: 100%;">
693
- <div class="rad-grabber" (mousedown)="dragging = true;" (touchstart)="dragging = true;">
694
- <i class="fa fa-grip-lines-vertical"></i>
695
- </div>
696
- </div>
697
- <div class="p-1" style="height: 100%;" [style.min-width.%]="minPercentage" [style.max-width.%]="maxPercentage" [style.width.%]="sectionSize - grabberOffset">
698
- <ng-content select="[rightSection]"></ng-content>
699
- </div>
700
- </div>
701
- `, isInline: true, styles: [".rad-grabber{cursor:ew-resize}.rad-grabber-vertical{cursor:ns-resize}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ResizableSectionDividerComponent, decorators: [{
703
- type: Component,
704
- args: [{ selector: "resizable-section-divider", template: `
705
- <div *ngIf="isVerticalLayout" style="height: 100%; width: 100%;" #verticalContainer>
706
- <div class="p-1" style="width: 100%;" [style.min-height.%]="minPercentage" [style.max-height.%]="maxPercentage" [style.height.%]="(100 - sectionSize - grabberOffset)">
707
- <ng-content select="[topSection]"></ng-content>
708
- </div>
709
- <div class="d-flex align-items-center justify-content-center" style="height: 20px; width: 100%;">
710
- <div class="rad-grabber-vertical" (mousedown)="dragging = true;" (touchstart)="dragging = true;">
711
- <i class="fa fa-grip-lines"></i>
712
- </div>
713
- </div>
714
- <div class="p-1" style="width: 100%;" [style.min-height.%]="minPercentage" [style.max-height.%]="maxPercentage" [style.height.%]="(sectionSize - grabberOffset)">
715
- <ng-content select="[bottomSection]"></ng-content>
716
- </div>
717
- </div>
718
-
719
- <div *ngIf="!isVerticalLayout" class="d-flex" style="height: 100%; width: 100%;" #horizontalContainer>
720
- <div class="p-1" style="height: 100%;" [style.min-width.%]="minPercentage" [style.max-width.%]="maxPercentage" [style.width.%]="(100 - sectionSize - grabberOffset)">
721
- <ng-content select="[leftSection]"></ng-content>
722
- </div>
723
- <div class="d-flex align-items-center justify-content-center" style="width: 10px; height: 100%;">
724
- <div class="rad-grabber" (mousedown)="dragging = true;" (touchstart)="dragging = true;">
725
- <i class="fa fa-grip-lines-vertical"></i>
726
- </div>
727
- </div>
728
- <div class="p-1" style="height: 100%;" [style.min-width.%]="minPercentage" [style.max-width.%]="maxPercentage" [style.width.%]="sectionSize - grabberOffset">
729
- <ng-content select="[rightSection]"></ng-content>
730
- </div>
731
- </div>
732
- `, styles: [".rad-grabber{cursor:ew-resize}.rad-grabber-vertical{cursor:ns-resize}\n"] }]
733
- }], propDecorators: { initialPercentage: [{
734
- type: Input
735
- }], isVerticalLayout: [{
736
- type: Input
737
- }], maxPercentage: [{
738
- type: Input
739
- }], minPercentage: [{
740
- type: Input
741
- }], verticalContainer: [{
742
- type: ViewChild,
743
- args: ["verticalContainer", { static: false }]
744
- }], horizontalContainer: [{
745
- type: ViewChild,
746
- args: ["horizontalContainer", { static: false }]
747
- }], mouseMove: [{
748
- type: HostListener,
749
- args: ["document:mousemove", ["$event"]]
750
- }], mouseUp: [{
751
- type: HostListener,
752
- args: ["document:mouseup", ["$event"]]
753
- }, {
754
- type: HostListener,
755
- args: ["document:touchend", ["$event"]]
756
- }] } });
757
-
758
- class ReportingFrameworkComponent {
759
- constructor(http, resolver, datePipe, dialogsService, modalService) {
760
- this.http = http;
761
- this.resolver = resolver;
762
- this.datePipe = datePipe;
763
- this.dialogsService = dialogsService;
764
- this.modalService = modalService;
765
- this.fullGridList = [];
766
- this.tabbedGridList = {};
767
- this.gridOptions = {
768
- rowStyle: {
769
- "font-family": "Prompt, sans-serif"
770
- },
771
- rowHeight: 20,
772
- enableCellTextSelection: true,
773
- ensureDomOrder: true
774
- }; //enableCellTextSelection should be combined with ensureDomOrder
775
- this.tabbedGridApiList = {}; //a map of GridAPIs to tab names
776
- this.reportList = [];
777
- this.tabList = [];
778
- this.tabTypeNameLookup = {}; //a kind of dict that maps the tab or type to the tab-name
779
- this.selectedReport = new Report();
780
- this.displayedParamComponentRefs = [];
781
- this.displayedFormatComponentRefs = [];
782
- }
783
- ngOnInit() {
784
- if (this.manageReportUrl != null) {
785
- this.http.get(this.manageReportUrl, {
786
- params: new HttpParams().set("action", "loadWithParams")
787
- }).subscribe((resp) => {
788
- console.log(resp);
789
- var templist = [];
790
- var tempTabbedGridList = {};
791
- var tablist = resp["reportTabs"];
792
- for (let row of tablist) {
793
- var tab = new ReportTab();
794
- tab.name = row.name;
795
- tab.title = row.title;
796
- tab.type = row.type;
797
- tab.tab = row.tab;
798
- tab.datakey = row.datakey;
799
- if (!this.reportsByType) {
800
- this.tabList.push(tab);
801
- if (tab.tab) {
802
- this.tabTypeNameLookup[tab.tab] = tab.name;
803
- }
804
- if (tab.type) {
805
- this.tabTypeNameLookup[tab.type] = tab.name;
806
- }
807
- }
808
- else {
809
- if (this.reportsByType == tab.type) {
810
- this.tabList.push(tab);
811
- this.tabTypeNameLookup[tab.tab] = tab.name;
812
- }
813
- }
814
- var tabGridList = [];
815
- this.tabbedGridList[tab.name] = tabGridList;
816
- tempTabbedGridList[tab.name] = [];
817
- }
818
- var list = resp["reportList"];
819
- // console.log(list);
820
- for (let row of list) {
821
- var report = new Report();
822
- report.name = row.name;
823
- report.title = row.title;
824
- report.description = row.description;
825
- report.className = row.className;
826
- report.fileName = row.fileName;
827
- report.type = row.type;
828
- report.tab = row.tab;
829
- report.datakey = row.datakey;
830
- report.help = row.help;
831
- const object = {
832
- name: report.name,
833
- title: report.title,
834
- description: report.description
835
- };
836
- var tabname;
837
- if (report.tab) {
838
- tabname = this.tabTypeNameLookup[report.tab];
839
- }
840
- else if (!this.reportsByType && report.type) {
841
- tabname = this.tabTypeNameLookup[report.type];
842
- }
843
- if (tabname) {
844
- var gridlist = tempTabbedGridList[tabname];
845
- if (this.reportsByType) {
846
- if (report.type === this.reportsByType) {
847
- gridlist.push(object);
848
- }
849
- }
850
- else {
851
- gridlist.push(object);
852
- }
853
- }
854
- let params = row.params;
855
- if (params) {
856
- for (let p of params) {
857
- // console.log(p);
858
- var newParam = new Param();
859
- newParam.dictAPILeadIn = this.dictAPILeadIn;
860
- newParam.caption = p.caption;
861
- newParam.name = p.name;
862
- newParam.type = p.type;
863
- newParam.className = p.className;
864
- newParam.valueXPath = p.valueXPath;
865
- newParam.displayXPath = p.displayXPath;
866
- newParam.displayOrder = p.displayOrder;
867
- newParam.activeOnly = p.activeOnly;
868
- if (newParam.valueXPath) {
869
- newParam.valueXPath = newParam.valueXPath.replace("@", "");
870
- }
871
- if (newParam.displayXPath) {
872
- newParam.displayXPath = newParam.displayXPath.replace("@", "");
873
- }
874
- let options = p.options;
875
- if (options) {
876
- for (let o of options) {
877
- var newOption = new Option();
878
- newOption.value = o.value;
879
- newOption.display = o.display;
880
- newOption.displayOrder = o.displayOrder;
881
- newParam.options.push(newOption);
882
- }
883
- }
884
- report.params.push(newParam);
885
- }
886
- }
887
- let formats = row.formats;
888
- if (formats) {
889
- for (let f of formats) {
890
- var newFormat = new Format();
891
- newFormat.name = f.name;
892
- newFormat.caption = f.caption;
893
- newFormat.displayOrder = f.displayOrder;
894
- report.formats.push(newFormat);
895
- }
896
- }
897
- this.reportList.push(report);
898
- if (this.reportsByType) {
899
- if (report.type === this.reportsByType) {
900
- templist.push(object);
901
- }
902
- }
903
- else {
904
- templist.push(object);
905
- }
906
- }
907
- this.fullGridList = templist.slice();
908
- console.log("gridlist: ");
909
- console.log(this.fullGridList);
910
- for (let tab of this.tabList) {
911
- this.tabbedGridList[tab.name] = tempTabbedGridList[tab.name].slice();
912
- }
913
- });
914
- }
915
- }
916
- columnDef() {
917
- return [
918
- {
919
- field: "title",
920
- headerName: "Title",
921
- width: 300,
922
- sortable: true,
923
- resizable: true,
924
- editable: false
925
- },
926
- {
927
- field: "description",
928
- headerName: "Description",
929
- sortable: true,
930
- resizable: true,
931
- editable: false
932
- }
933
- ];
934
- }
935
- onMainGridReady(params) {
936
- this.mainGridApi = params.api;
937
- this.mainGridApi.setColumnDefs(this.columnDef());
938
- this.mainGridApi.setRowData(this.fullGridList);
939
- this.mainGridApi.sizeColumnsToFit();
940
- }
941
- onTabbedGridReady(params, tabname) {
942
- this.tabbedGridApiList[tabname] = params.api;
943
- this.tabbedGridApiList[tabname].setColumnDefs(this.columnDef());
944
- this.tabbedGridApiList[tabname].setRowData(this.tabbedGridList[tabname]);
945
- this.tabbedGridApiList[tabname].sizeColumnsToFit();
946
- }
947
- setSelectedRow(event) {
948
- //console.log(event);
949
- if (event.node.selected) {
950
- let reportName = event.node.data.name;
951
- console.log(event.node.data.name);
952
- var matchedReport;
953
- for (let r of this.reportList) {
954
- if (r.name == reportName) {
955
- matchedReport = r;
956
- }
957
- }
958
- if (matchedReport != null) {
959
- this.selectedReport = matchedReport;
960
- }
961
- else {
962
- this.selectedReport = new Report();
963
- }
964
- this.createParamComponents();
965
- }
966
- }
967
- createParamComponents() {
968
- if (this.paramContainer) {
969
- this.paramContainer.clear();
970
- }
971
- if (this.formatContainer) {
972
- this.formatContainer.clear();
973
- }
974
- //destroy previous components and clear the displayedRef lists..?
975
- this.destroyComponentRefs();
976
- this.displayedParamComponentRefs = [];
977
- this.displayedFormatComponentRefs = [];
978
- for (let p of this.selectedReport.params) {
979
- const factory = this.resolver.resolveComponentFactory(ParameterComponent);
980
- var componentRef = this.paramContainer.createComponent(factory);
981
- this.displayedParamComponentRefs.push(componentRef);
982
- componentRef.instance.setParam(p);
983
- if (p.options.length > 0) {
984
- var entries = [];
985
- for (let o of p.options) {
986
- var e = { id: o.value, display: o.display };
987
- entries.push(e);
988
- }
989
- componentRef.instance.entries = entries;
990
- }
991
- }
992
- var first = true;
993
- for (let f of this.selectedReport.formats) {
994
- const factory2 = this.resolver.resolveComponentFactory(FormatComponent);
995
- var componentRef2 = this.formatContainer.createComponent(factory2);
996
- this.displayedFormatComponentRefs.push(componentRef2);
997
- componentRef2.instance.format = f;
998
- componentRef2.instance.selectedValueChange.subscribe((s) => {
999
- this.selectedFormat = s;
1000
- });
1001
- if (first) { //select the first format in the grouping
1002
- componentRef2.instance.selectedValue = f.name;
1003
- this.selectedFormat = f.name;
1004
- first = false;
1005
- }
1006
- }
1007
- }
1008
- openHelp(content) {
1009
- this.modalService.open(content, { ariaLabelledBy: "help-modal-title" })
1010
- .result.then((result) => {
1011
- // this.closeResult = `Closed with: ${result}`;
1012
- console.log(result);
1013
- }, (reason) => {
1014
- var closeResult = `Dismissed ${this.getDismissReason(reason)}`;
1015
- console.log(closeResult);
1016
- });
1017
- }
1018
- getDismissReason(reason) {
1019
- if (reason === ModalDismissReasons.ESC) {
1020
- return "by pressing ESC";
1021
- }
1022
- else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
1023
- return "by clicking on a backdrop";
1024
- }
1025
- else {
1026
- return `with: ${reason}`;
1027
- }
1028
- }
1029
- onRunReport() {
1030
- if (this.selectedReport) {
1031
- this.dialogsService.startDefaultSpinnerDialog();
1032
- console.log("format:" + this.selectedFormat);
1033
- if (!this.selectedFormat) {
1034
- this.selectedFormat = "html";
1035
- }
1036
- let runParams = new HttpParams();
1037
- runParams = runParams.append("format", this.selectedFormat);
1038
- runParams = runParams.append("action", "show");
1039
- runParams = runParams.append("reportName", this.selectedReport.name);
1040
- runParams = this.getRunParameters(runParams);
1041
- console.log(runParams);
1042
- this.http.get(this.commandPrefix + this.selectedReport.className, {
1043
- params: runParams,
1044
- observe: "response",
1045
- responseType: "blob"
1046
- }).subscribe((res) => {
1047
- console.log(res);
1048
- var filename;
1049
- if (this.selectedFormat != "html") {
1050
- filename = res.headers.get("content-disposition").split(";")[1].split("=")[1].replace(/\"/g, "");
1051
- }
1052
- var blob = new Blob([res.body], { type: res.body.type }); //, {type: "application/vnd.ms-excel"}
1053
- var fileURL = window.URL.createObjectURL(blob);
1054
- console.log(fileURL);
1055
- const a = document.createElement("a");
1056
- a.href = fileURL;
1057
- if (this.selectedFormat == "html") {
1058
- a.target = "_blank";
1059
- }
1060
- else {
1061
- a.download = filename;
1062
- }
1063
- window.document.body.appendChild(a);
1064
- a.click();
1065
- window.document.body.removeChild(a);
1066
- URL.revokeObjectURL(fileURL);
1067
- this.dialogsService.stopAllSpinnerDialogs();
1068
- });
1069
- }
1070
- }
1071
- getRunParameters(runParams) {
1072
- var newParams = runParams;
1073
- for (let o of this.displayedParamComponentRefs) {
1074
- var param = o.instance.param;
1075
- if (param.type == "multiselect") {
1076
- var resList = "";
1077
- for (let v of param.selectedValueList) {
1078
- if (resList != "") {
1079
- resList += ",";
1080
- }
1081
- resList += v;
1082
- }
1083
- newParams = newParams.append(param.name, resList);
1084
- }
1085
- else {
1086
- var value;
1087
- if (param.selectedValue) { //so we don't get "undefined" sent back
1088
- if (param.type == "date") {
1089
- value = this.getDateString(param.selectedValue);
1090
- }
1091
- else {
1092
- value = param.selectedValue;
1093
- }
1094
- }
1095
- else {
1096
- value = "";
1097
- }
1098
- newParams = newParams.append(param.name, value);
1099
- }
1100
- }
1101
- return newParams;
1102
- }
1103
- getDateString(date) {
1104
- if (date instanceof Date) {
1105
- if (!isNaN(date.getTime())) {
1106
- return this.datePipe.transform(date, "MM/dd/yyyy");
1107
- }
1108
- else {
1109
- return "";
1110
- }
1111
- }
1112
- else if (moment.isMoment(date)) {
1113
- if (date != null) {
1114
- return date.format("M/D/YYYY");
1115
- }
1116
- else {
1117
- return "";
1118
- }
1119
- }
1120
- else if (typeof date == "string") {
1121
- return date;
1122
- }
1123
- else {
1124
- return "";
1125
- }
1126
- }
1127
- destroyComponentRefs() {
1128
- for (let o of this.displayedParamComponentRefs) {
1129
- o.destroy();
1130
- }
1131
- for (let o of this.displayedFormatComponentRefs) {
1132
- o.destroy();
1133
- }
1134
- }
1135
- ngOnDestroy() {
1136
- this.destroyComponentRefs();
1137
- }
1138
- }
1139
- ReportingFrameworkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ReportingFrameworkComponent, deps: [{ token: i1$2.HttpClient }, { token: i0.ComponentFactoryResolver }, { token: i1.DatePipe }, { token: DialogsService }, { token: i4.NgbModal }], target: i0.ɵɵFactoryTarget.Component });
1140
- ReportingFrameworkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ReportingFrameworkComponent, selector: "hci-reporting-framework", inputs: { manageReportUrl: "manageReportUrl", commandPrefix: "commandPrefix", dictAPILeadIn: "dictAPILeadIn", reportsByType: "reportsByType" }, viewQueries: [{ propertyName: "paramContainer", first: true, predicate: ["paramContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "formatContainer", first: true, predicate: ["formatContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: `
1141
- <div style="height: 100vh">
1142
- <resizable-section-divider class="flex-grow-1" [isVerticalLayout]="true">
1143
- <div topSection class="d-flex flex-column" style="height: 100%; width: 100%; overflow: auto;">
1144
- <!--can wrap just the grid with the tabs-->
1145
- <mat-tab-group *ngIf="tabList.length > 0"
1146
- class="flex-grow-1">
1147
- <mat-tab *ngFor="let tab of tabList"
1148
- label="{{tab.title}}"
1149
- class="flex-grow-1">
1150
- <ng-template matTabContent>
1151
- <ag-grid-angular
1152
- class="ag-theme-balham full-width flex-grow-1"
1153
- style="min-height: 200px; height: 100%;"
1154
- (gridReady)="this.onTabbedGridReady($event, tab.name)"
1155
- [gridOptions]="this.gridOptions"
1156
- [rowSelection]="'single'"
1157
- (rowSelected)="setSelectedRow($event)"
1158
- [frameworkComponents]="frameworkComponents"
1159
- [rowData]="tabbedGridList[tab.name]">
1160
- </ag-grid-angular>
1161
- </ng-template>
1162
- </mat-tab>
1163
- </mat-tab-group>
1164
-
1165
- <!--ngb-tabset *ngIf="tabList.length > 0"
1166
- destroyOnHide="false"
1167
- type="tabs"
1168
- class="flex-grow-1"
1169
- #reportTabSet="ngbTabset"
1170
- >
1171
- <ngb-tab *ngFor="let tab of tabList"
1172
- id="{{tab.name}}" title="{{tab.title}}"
1173
- style="border: 5px solid;" >
1174
- <ng-template ngbTabContent >
1175
-
1176
- <ag-grid-angular
1177
- class="ag-theme-balham full-width flex-grow-1"
1178
- style="min-height: 200px; height: 100%;"
1179
- (gridReady)="this.onTabbedGridReady($event, tab.name)"
1180
- [gridOptions]="this.gridOptions"
1181
- [rowSelection]="'single'"
1182
- (rowSelected)="setSelectedRow($event)"
1183
- [frameworkComponents]="frameworkComponents"
1184
- [rowData]="tabbedGridList[tab.name]">
1185
- </ag-grid-angular>
1186
- </ng-template>
1187
- </ngb-tab>
1188
-
1189
- </ngb-tabset-->
1190
-
1191
- <ag-grid-angular *ngIf="tabList.length <= 0"
1192
- class="ag-theme-balham full-width flex-grow-1"
1193
- style="min-height: 200px; height: 100%;"
1194
- (gridReady)="this.onMainGridReady($event)"
1195
- [gridOptions]="this.gridOptions"
1196
- [rowSelection]="'single'"
1197
- (rowSelected)="setSelectedRow($event)"
1198
- [frameworkComponents]="frameworkComponents"
1199
- [rowData]="fullGridList">
1200
- </ag-grid-angular>
1201
- </div>
1202
- <div bottomSection class="d-flex flex-column" style="height: 80%; width: 100%; overflow: auto;">
1203
- <div style="display: block;">
1204
- <div class="row">
1205
- <label style="margin-left: 25px; font-weight: bold">{{selectedReport.title}}</label>
1206
- <button class="btn" *ngIf="selectedReport.help && selectedReport.help != ''"
1207
- (click)="openHelp(content)">
1208
- <i class="far fa-question-circle"></i>
1209
- </button>
1210
- </div>
1211
- </div>
1212
- <template #paramContainer></template>
1213
- <div style="display: block;">
1214
- <div class="row center-row">
1215
- <template #formatContainer></template>
1216
- <button *ngIf="selectedReport.name"
1217
- class="btn btn-success"
1218
- type="button"
1219
- (click)="onRunReport()"
1220
- >Run Report</button>
1221
- </div>
1222
- </div>
1223
- </div>
1224
- </resizable-section-divider>
1225
- </div>
1226
- <ng-template #content let-modal>
1227
- <div class="modal-header">
1228
- <h4 class="modal-title" id="help-model-title">Report Help</h4>
1229
- <button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
1230
- <span aria-hidden="true">&times;</span>
1231
- </button>
1232
- </div>
1233
- <div class="modal-body" >
1234
- <div class="container" [innerHTML]="selectedReport.help">
1235
- </div>
1236
- </div>
1237
- <div class="modal-footer">
1238
- <button class="btn btn-primary" type="button" (click)="modal.dismiss('Ok click')">OK</button>
1239
- </div>
1240
- </ng-template>
1241
-
1242
- `, isInline: true, styles: [":host ::ng-deep .mat-tab-body-wrapper{flex-grow:1}:host ::ng-deep .mat-tab-label{background-color:#98c7e0}:host ::ng-deep .mat-tab-label-active{background-color:#def4ff}.report-details{height:100%;width:100%;position:absolute}.center-row{margin-top:10px;margin-left:60vw}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatLegacyTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i5.MatLegacyTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "directive", type: i5.MatLegacyTabContent, selector: "[matTabContent]" }, { kind: "component", type: i6.AgGridAngular, selector: "ag-grid-angular", inputs: ["statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "suppressMenuHide", "enableBrowserTooltips", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "maintainColumnOrder", "suppressFieldDotNotation", "deltaColumnMode", "applyColumnDefOrder", "immutableColumns", "suppressSetColumnStateEvents", "suppressColumnStateEvents", "colWidth", "minColWidth", "maxColWidth", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "components", "frameworkComponents", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "undoRedoCellEditing", "undoRedoCellEditingLimit", "stopEditingWhenGridLosesFocus", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "defaultExportParams", "quickFilterText", "cacheQuickFilter", "excludeChildrenWhenTreeDataFiltering", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "loadingCellRenderer", "loadingCellRendererFramework", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererFramework", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentFramework", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentFramework", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "suppressAggAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDelay", "cellFadeDelay", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "fullWidthCellRenderer", "fullWidthCellRendererFramework", "fullWidthCellRendererParams", "embedFullWidthRows", "deprecatedEmbedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererFramework", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "groupRowInnerRenderer", "groupRowInnerRendererFramework", "groupMultiAutoColumn", "groupUseEntireRow", "groupSuppressAutoColumn", "rememberGroupStateWhenNewData", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "immutableData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "deltaRowDataMode", "batchUpdateWaitMillis", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideStoreType", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortingAlwaysResets", "serverSideFilteringAlwaysResets", "suppressEnterpriseResetOnNewColumns", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellSelection", "suppressCellFocus", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "deltaSort", "treeDataDisplayType", "angularCompileRows", "angularCompileFilters", "functionsPassive", "enableGroupEdit", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "suppressKeyboardEvent", "localeTextFunc", "getLocaleText", "getDocument", "paginationNumberFormatter", "groupRowAggNodes", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "defaultGroupOrderComparator", "processSecondaryColDef", "processSecondaryColGroupDef", "getDataPath", "defaultGroupSortComparator", "getChildCount", "getServerSideStoreParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowNodeId", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSort", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthCell", "isFullWidthRow", "gridOptions", "modules"], outputs: ["toolPanelVisibleChanged", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "filterOpened", "filterChanged", "filterModified", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "cellKeyPress", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }, { kind: "component", type: ResizableSectionDividerComponent, selector: "resizable-section-divider", inputs: ["initialPercentage", "isVerticalLayout", "maxPercentage", "minPercentage"] }] });
1243
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ReportingFrameworkComponent, decorators: [{
1244
- type: Component,
1245
- args: [{ selector: "hci-reporting-framework", template: `
1246
- <div style="height: 100vh">
1247
- <resizable-section-divider class="flex-grow-1" [isVerticalLayout]="true">
1248
- <div topSection class="d-flex flex-column" style="height: 100%; width: 100%; overflow: auto;">
1249
- <!--can wrap just the grid with the tabs-->
1250
- <mat-tab-group *ngIf="tabList.length > 0"
1251
- class="flex-grow-1">
1252
- <mat-tab *ngFor="let tab of tabList"
1253
- label="{{tab.title}}"
1254
- class="flex-grow-1">
1255
- <ng-template matTabContent>
1256
- <ag-grid-angular
1257
- class="ag-theme-balham full-width flex-grow-1"
1258
- style="min-height: 200px; height: 100%;"
1259
- (gridReady)="this.onTabbedGridReady($event, tab.name)"
1260
- [gridOptions]="this.gridOptions"
1261
- [rowSelection]="'single'"
1262
- (rowSelected)="setSelectedRow($event)"
1263
- [frameworkComponents]="frameworkComponents"
1264
- [rowData]="tabbedGridList[tab.name]">
1265
- </ag-grid-angular>
1266
- </ng-template>
1267
- </mat-tab>
1268
- </mat-tab-group>
1269
-
1270
- <!--ngb-tabset *ngIf="tabList.length > 0"
1271
- destroyOnHide="false"
1272
- type="tabs"
1273
- class="flex-grow-1"
1274
- #reportTabSet="ngbTabset"
1275
- >
1276
- <ngb-tab *ngFor="let tab of tabList"
1277
- id="{{tab.name}}" title="{{tab.title}}"
1278
- style="border: 5px solid;" >
1279
- <ng-template ngbTabContent >
1280
-
1281
- <ag-grid-angular
1282
- class="ag-theme-balham full-width flex-grow-1"
1283
- style="min-height: 200px; height: 100%;"
1284
- (gridReady)="this.onTabbedGridReady($event, tab.name)"
1285
- [gridOptions]="this.gridOptions"
1286
- [rowSelection]="'single'"
1287
- (rowSelected)="setSelectedRow($event)"
1288
- [frameworkComponents]="frameworkComponents"
1289
- [rowData]="tabbedGridList[tab.name]">
1290
- </ag-grid-angular>
1291
- </ng-template>
1292
- </ngb-tab>
1293
-
1294
- </ngb-tabset-->
1295
-
1296
- <ag-grid-angular *ngIf="tabList.length <= 0"
1297
- class="ag-theme-balham full-width flex-grow-1"
1298
- style="min-height: 200px; height: 100%;"
1299
- (gridReady)="this.onMainGridReady($event)"
1300
- [gridOptions]="this.gridOptions"
1301
- [rowSelection]="'single'"
1302
- (rowSelected)="setSelectedRow($event)"
1303
- [frameworkComponents]="frameworkComponents"
1304
- [rowData]="fullGridList">
1305
- </ag-grid-angular>
1306
- </div>
1307
- <div bottomSection class="d-flex flex-column" style="height: 80%; width: 100%; overflow: auto;">
1308
- <div style="display: block;">
1309
- <div class="row">
1310
- <label style="margin-left: 25px; font-weight: bold">{{selectedReport.title}}</label>
1311
- <button class="btn" *ngIf="selectedReport.help && selectedReport.help != ''"
1312
- (click)="openHelp(content)">
1313
- <i class="far fa-question-circle"></i>
1314
- </button>
1315
- </div>
1316
- </div>
1317
- <template #paramContainer></template>
1318
- <div style="display: block;">
1319
- <div class="row center-row">
1320
- <template #formatContainer></template>
1321
- <button *ngIf="selectedReport.name"
1322
- class="btn btn-success"
1323
- type="button"
1324
- (click)="onRunReport()"
1325
- >Run Report</button>
1326
- </div>
1327
- </div>
1328
- </div>
1329
- </resizable-section-divider>
1330
- </div>
1331
- <ng-template #content let-modal>
1332
- <div class="modal-header">
1333
- <h4 class="modal-title" id="help-model-title">Report Help</h4>
1334
- <button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
1335
- <span aria-hidden="true">&times;</span>
1336
- </button>
1337
- </div>
1338
- <div class="modal-body" >
1339
- <div class="container" [innerHTML]="selectedReport.help">
1340
- </div>
1341
- </div>
1342
- <div class="modal-footer">
1343
- <button class="btn btn-primary" type="button" (click)="modal.dismiss('Ok click')">OK</button>
1344
- </div>
1345
- </ng-template>
1346
-
1347
- `, styles: [":host ::ng-deep .mat-tab-body-wrapper{flex-grow:1}:host ::ng-deep .mat-tab-label{background-color:#98c7e0}:host ::ng-deep .mat-tab-label-active{background-color:#def4ff}.report-details{height:100%;width:100%;position:absolute}.center-row{margin-top:10px;margin-left:60vw}\n"] }]
1348
- }], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: i0.ComponentFactoryResolver }, { type: i1.DatePipe }, { type: DialogsService }, { type: i4.NgbModal }]; }, propDecorators: { manageReportUrl: [{
1349
- type: Input
1350
- }], commandPrefix: [{
1351
- type: Input
1352
- }], dictAPILeadIn: [{
1353
- type: Input
1354
- }], reportsByType: [{
1355
- type: Input
1356
- }], paramContainer: [{
1357
- type: ViewChild,
1358
- args: ["paramContainer", { read: ViewContainerRef, static: false }]
1359
- }], formatContainer: [{
1360
- type: ViewChild,
1361
- args: ["formatContainer", { read: ViewContainerRef, static: false }]
1362
- }] } });
1363
-
1364
- class ReportModule {
1365
- }
1366
- ReportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ReportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1367
- ReportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ReportModule, declarations: [ReportingFrameworkComponent,
1368
- ReportDatepickerComponent,
1369
- ParameterComponent,
1370
- FormatComponent,
1371
- SpinnerDialogComponent,
1372
- ResizableSectionDividerComponent], imports: [CommonModule,
1373
- FormsModule,
1374
- NgbModule,
1375
- MatDatepickerModule,
1376
- MatLegacyDialogModule,
1377
- MatLegacyProgressSpinnerModule,
1378
- MatLegacyTabsModule,
1379
- SelectModule,
1380
- AgGridModule], exports: [ReportingFrameworkComponent] });
1381
- ReportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ReportModule, providers: [
1382
- DatePipe,
1383
- DialogsService
1384
- ], imports: [CommonModule,
1385
- FormsModule,
1386
- NgbModule,
1387
- MatDatepickerModule,
1388
- MatLegacyDialogModule,
1389
- MatLegacyProgressSpinnerModule,
1390
- MatLegacyTabsModule,
1391
- SelectModule,
1392
- AgGridModule] });
1393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ReportModule, decorators: [{
1394
- type: NgModule,
1395
- args: [{
1396
- imports: [
1397
- CommonModule,
1398
- FormsModule,
1399
- NgbModule,
1400
- MatDatepickerModule,
1401
- MatLegacyDialogModule,
1402
- MatLegacyProgressSpinnerModule,
1403
- MatLegacyTabsModule,
1404
- SelectModule,
1405
- AgGridModule,
1406
- ],
1407
- providers: [
1408
- DatePipe,
1409
- DialogsService
1410
- ],
1411
- declarations: [
1412
- ReportingFrameworkComponent,
1413
- ReportDatepickerComponent,
1414
- ParameterComponent,
1415
- FormatComponent,
1416
- SpinnerDialogComponent,
1417
- ResizableSectionDividerComponent
1418
- ],
1419
- exports: [
1420
- ReportingFrameworkComponent
1421
- ]
1422
- }]
1423
- }] });
1424
-
1425
- /**
1426
- * Generated bundle index. Do not edit.
1427
- */
1428
-
1429
- export { ReportModule, ReportingFrameworkComponent };
1430
- //# sourceMappingURL=huntsman-cancer-institute-reporting-framework.mjs.map