reports-hyper74
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
415 lines (405 loc) • 53.7 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('xlsx'), require('@angular/material/tabs'), require('@angular/material/grid-list'), require('@angular/material/card'), require('@angular/material/button'), require('@angular/common'), require('@angular/material/input'), require('@angular/material/form-field'), require('@angular/router'), require('@angular/material/icon'), require('@angular/material/datepicker'), require('@angular/material/select'), require('@angular/material/core'), require('@angular/forms'), require('@angular/material/table'), require('jspdf'), require('jspdf-autotable'), require('@angular/material/paginator')) :
typeof define === 'function' && define.amd ? define('reports-hyper74', ['exports', '@angular/core', '@angular/common/http', 'xlsx', '@angular/material/tabs', '@angular/material/grid-list', '@angular/material/card', '@angular/material/button', '@angular/common', '@angular/material/input', '@angular/material/form-field', '@angular/router', '@angular/material/icon', '@angular/material/datepicker', '@angular/material/select', '@angular/material/core', '@angular/forms', '@angular/material/table', 'jspdf', 'jspdf-autotable', '@angular/material/paginator'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["reports-hyper74"] = {}, global.ng.core, global.ng.common.http, global.XLSX, global.ng.material.tabs, global.ng.material.gridList, global.ng.material.card, global.ng.material.button, global.ng.common, global.ng.material.input, global.ng.material.formField, global.ng.router, global.ng.material.icon, global.ng.material.datepicker, global.ng.material.select, global.ng.material.core, global.ng.forms, global.ng.material.table, global.jspdf, null, global.ng.material.paginator));
})(this, (function (exports, i0, i1, XLSX, i2, i3, i4, i5, i2$1, i12, i6, i1$1, i4$1, i7, i8, i9, i11, i6$1, jspdf, jspdfAutotable, i7$1) { 'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
var XLSX__namespace = /*#__PURE__*/_interopNamespace(XLSX);
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
var i7__namespace$1 = /*#__PURE__*/_interopNamespace(i7$1);
var ReportsService = /** @class */ (function () {
function ReportsService(httpClient) {
this.httpClient = httpClient;
}
ReportsService.prototype.loadGroups = function (url) {
return this.httpClient.get(url);
};
ReportsService.prototype.listReportsByGroupId = function (url, groupId) {
return this.httpClient.get(url + "/" + groupId);
};
ReportsService.prototype.getReportWithFilters = function (url, reportId) {
return this.httpClient.get(url + "/" + reportId);
};
ReportsService.prototype.executeReport = function (url, query) {
// console.log('query', query);
var params = new i1.HttpParams()
.set('pageNum', "" + query.pageNum)
.set('pageSize', "" + query.pageSize);
return this.httpClient.post(url + "/" + query.reportId, query.data, { params: params });
};
ReportsService.prototype.exportAsExcelFile = function (json, excelFileName) {
var header = json; // columns name
var wscols = [];
for (var i = 0; i < header.length; i++) { // columns length added
wscols.push({ wch: header[i].length + 5 });
}
// const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);
var table_elt = document.getElementById("excelDataTable");
console.log('tabke_elt', table_elt);
var workbook = XLSX__namespace.utils.table_to_book(table_elt);
console.log('workBook', workbook);
var ws = workbook.Sheets["Sheet1"];
XLSX__namespace.utils.sheet_add_aoa(ws, [["Created " + new Date().toISOString()]], { origin: -1 });
ws["!cols"] = wscols;
XLSX__namespace.writeFile(workbook, excelFileName + ".xlsx");
};
return ReportsService;
}());
ReportsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportsService, deps: [{ token: i1__namespace.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
ReportsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportsService, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportsService, decorators: [{
type: i0.Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return [{ type: i1__namespace.HttpClient }]; } });
var breakpoint;
function sharedGridLayout(resize, event) {
var size;
if (resize) {
size = event.target.innerWidth;
//console.log('event',size)
}
else {
size = window.innerWidth;
}
switchMethod(size);
return breakpoint;
}
function switchMethod(size) {
switch (true) {
case (size <= 768):
breakpoint = 1;
break;
case (size >= 768 && size <= 992):
breakpoint = 2;
break;
case (size >= 992):
breakpoint = 3;
break;
}
}
var ReportsComponent = /** @class */ (function () {
function ReportsComponent(reportService) {
this.reportService = reportService;
this.reportsGroups = [];
this.reportsByGroupId = [];
this.$subs = [];
this.onViewClicked = new i0.EventEmitter();
this.breakpoint = 3;
}
ReportsComponent.prototype.ngOnInit = function () {
this.loadGroups();
};
ReportsComponent.prototype.loadGroups = function () {
var _this = this;
var sub1 = this.reportService
.loadGroups(this.urlReportGroups)
.subscribe(function (res) {
_this.reportsGroups = res;
_this.$subs.push(sub1);
});
};
ReportsComponent.prototype.listReportsByGroupId = function (groupId) {
var _this = this;
var sub2 = this.reportService
.listReportsByGroupId(this.reportGroupByIdUrl, groupId)
.subscribe(function (res2) {
_this.reportsByGroupId = res2;
});
this.$subs.push(sub2);
};
ReportsComponent.prototype.onTabChanged = function (event) {
this.listReportsByGroupId(this.reportsGroups[event].id);
};
ReportsComponent.prototype.viewReportFilterDetails = function (report) {
this.onViewClicked.emit(report);
};
ReportsComponent.prototype.onResize = function (event) {
this.breakpoint = sharedGridLayout(true, event);
// console.log('breakPoint', this.breakpoint);
};
ReportsComponent.prototype.ngOnDestroy = function () {
this.$subs.forEach(function (item) { return item.unsubscribe(); });
};
return ReportsComponent;
}());
ReportsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportsComponent, deps: [{ token: ReportsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
ReportsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ReportsComponent, selector: "lib-reports-groups", inputs: { urlReportGroups: "urlReportGroups", reportGroupByIdUrl: "reportGroupByIdUrl" }, outputs: { onViewClicked: "onViewClicked" }, ngImport: i0__namespace, template: "\n <div class=\"reportsContainer\">\n <div class=\"title\">\n Marketing Reports\n </div>\n <mat-tab-group *ngIf=\"reportsGroups\" (selectedIndexChange)=\"onTabChanged($event)\">\n <mat-tab [id]=\"group.id\" *ngFor=\"let group of reportsGroups;let i=index\"\n label=\"{{group.name}}\" >\n <mat-grid-list class=\"space\" [cols]=\"breakpoint\" (window:resize)=\"onResize($event)\" rowHeight=\"200px\">\n <mat-grid-tile *ngFor=\"let report of reportsByGroupId\">\n <mat-card class=\"example-card\">\n <mat-card-title class=\"title\">{{ report.name }}</mat-card-title>\n <mat-card-content>\n <p>{{ report.descreption }}</p>\n </mat-card-content>\n <mat-card-actions>\n <button\n mat-button\n class=\"viewButton\"\n (click)=\"viewReportFilterDetails(report)\"\n >\n View\n </button>\n </mat-card-actions>\n </mat-card>\n </mat-grid-tile>\n </mat-grid-list>\n </mat-tab>\n </mat-tab-group>\n </div>\n ", isInline: true, styles: ["\n .example-card {\n max-width: 350px;\n border-radius: 8px;\n height: 160px;\n overflow: auto;\n width: 93%\n }\n\n .viewButton {\n background: #FF6600;\n color: #ffffff;\n float: right;\n }\n .title{\n font-size: 18px;\n font-weight: 600;\n letter-spacing: 0.34px;\n color: #1B1B1B;\n opacity: 1;\n margin-bottom: 15px;\n }\n .reportsContainer{\n margin: 30px;\n }\n .tabs{\n margin: 45px;\n }\n .space{\n margin-top: 20px;\n }\n "], components: [{ type: i2__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i2__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i3__namespace.MatGridList, selector: "mat-grid-list", inputs: ["cols", "gutterSize", "rowHeight"], exportAs: ["matGridList"] }, { type: i3__namespace.MatGridTile, selector: "mat-grid-tile", inputs: ["rowspan", "colspan"], exportAs: ["matGridTile"] }, { type: i4__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i5__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i4__namespace.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i4__namespace.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportsComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lib-reports-groups',
template: "\n <div class=\"reportsContainer\">\n <div class=\"title\">\n Marketing Reports\n </div>\n <mat-tab-group *ngIf=\"reportsGroups\" (selectedIndexChange)=\"onTabChanged($event)\">\n <mat-tab [id]=\"group.id\" *ngFor=\"let group of reportsGroups;let i=index\"\n label=\"{{group.name}}\" >\n <mat-grid-list class=\"space\" [cols]=\"breakpoint\" (window:resize)=\"onResize($event)\" rowHeight=\"200px\">\n <mat-grid-tile *ngFor=\"let report of reportsByGroupId\">\n <mat-card class=\"example-card\">\n <mat-card-title class=\"title\">{{ report.name }}</mat-card-title>\n <mat-card-content>\n <p>{{ report.descreption }}</p>\n </mat-card-content>\n <mat-card-actions>\n <button\n mat-button\n class=\"viewButton\"\n (click)=\"viewReportFilterDetails(report)\"\n >\n View\n </button>\n </mat-card-actions>\n </mat-card>\n </mat-grid-tile>\n </mat-grid-list>\n </mat-tab>\n </mat-tab-group>\n </div>\n ",
styles: [
"\n .example-card {\n max-width: 350px;\n border-radius: 8px;\n height: 160px;\n overflow: auto;\n width: 93%\n }\n\n .viewButton {\n background: #FF6600;\n color: #ffffff;\n float: right;\n }\n .title{\n font-size: 18px;\n font-weight: 600;\n letter-spacing: 0.34px;\n color: #1B1B1B;\n opacity: 1;\n margin-bottom: 15px;\n }\n .reportsContainer{\n margin: 30px;\n }\n .tabs{\n margin: 45px;\n }\n .space{\n margin-top: 20px;\n }\n ",
],
}]
}], ctorParameters: function () { return [{ type: ReportsService }]; }, propDecorators: { urlReportGroups: [{
type: i0.Input
}], reportGroupByIdUrl: [{
type: i0.Input
}], onViewClicked: [{
type: i0.Output
}] } });
var ReportDetailsComponent = /** @class */ (function () {
function ReportDetailsComponent(reportService, datepipe) {
this.reportService = reportService;
this.datepipe = datepipe;
this.$subs = [];
this.breakpoint = 3;
this.onExecuteFired = new i0.EventEmitter();
this.backClicked = new i0.EventEmitter();
}
ReportDetailsComponent.prototype.ngOnInit = function () {
this.breakpoint = sharedGridLayout();
this.loadReportFilters();
};
ReportDetailsComponent.prototype.onResize = function (event) {
this.breakpoint = sharedGridLayout(true, event);
};
ReportDetailsComponent.prototype.loadReportFilters = function () {
var _this = this;
var sub1 = this.reportService
.getReportWithFilters(this.loadReportDetailFilters, this.reportId)
.subscribe(function (res) {
_this.reportDetails = res;
});
this.$subs.push(sub1);
};
ReportDetailsComponent.prototype.ngOnDestroy = function () {
this.$subs.forEach(function (item) { return item.unsubscribe(); });
};
ReportDetailsComponent.prototype.validateAndConvertData = function () {
var _a, _b;
if (this.reportDetails && this.reportDetails.reportFilters) {
for (var i = 0; i < ((_b = (_a = this.reportDetails) === null || _a === void 0 ? void 0 : _a.reportFilters) === null || _b === void 0 ? void 0 : _b.length); i++) {
this.reportDetails.reportFilters[i].value =
this.reportDetails.reportFilters[i].dataType.toLocaleLowerCase() ===
'date'
? this.datepipe.transform(this.reportDetails.reportFilters[i].value, 'yyyy-MM-dd')
: this.reportDetails.reportFilters[i].value;
}
}
return true;
};
ReportDetailsComponent.prototype.execute = function () {
var _a;
if ((_a = this.executeForm) === null || _a === void 0 ? void 0 : _a.invalid) {
this.executeForm.form.markAllAsTouched();
return;
}
this.validateAndConvertData();
sessionStorage.setItem('executeForm', JSON.stringify(this.reportDetails.reportFilters));
sessionStorage.setItem('reportName', this.reportDetails.name);
this.onExecuteFired.emit({ fired: true });
};
ReportDetailsComponent.prototype.onBackClicked = function () {
this.backClicked.emit({ back: true });
};
return ReportDetailsComponent;
}());
ReportDetailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportDetailsComponent, deps: [{ token: ReportsService }, { token: i2__namespace$1.DatePipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
ReportDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ReportDetailsComponent, selector: "lib-report-details", inputs: { reportId: "reportId", loadReportDetailFilters: "loadReportDetailFilters" }, outputs: { onExecuteFired: "onExecuteFired", backClicked: "backClicked" }, viewQueries: [{ propertyName: "executeForm", first: true, predicate: ["f"], descendants: true }], ngImport: i0__namespace, template: "<mat-card class=\"example-card\">\n <mat-card-title><mat-icon (click)=\"onBackClicked()\" class=\"back-btn\">arrow_back</mat-icon> {{reportDetails?.name}}</mat-card-title>\n <mat-card-subtitle>{{reportDetails?.descreption}}</mat-card-subtitle>\n <mat-card-content *ngIf=\"reportDetails\">\n <form name=\"form\" #f=\"ngForm\" novalidate >\n <mat-grid-list class=\"mt-2\" [cols]=\"breakpoint\" (window:resize)=\"onResize($event)\" rowHeight=\"100px\">\n <mat-grid-tile *ngFor=\"let filter of reportDetails.reportFilters\">\n <mat-form-field class=\"form-field\" appearance=\"outline\" *ngIf=\"filter.dataType.toLowerCase() == 'date' \">\n <mat-label class=\"form-label\">{{filter.name}} </mat-label>\n <input matInput [matDatepicker]=\"picker\" #date=\"ngModel\"\n [name]=\"filter.name\" [(ngModel)]=\"filter.value\" [required]=\"filter.required\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n\n </mat-form-field>\n\n <mat-form-field class=\"form-field\" appearance=\"outline\" *ngIf=\"filter.dataType.toLowerCase() == 'text' \">\n <mat-label class=\"form-label\">{{filter.name}} </mat-label>\n <input matInput *ngIf=\"filter.dataType.toLowerCase() == 'text' \" [name]=\"filter.name\"\n [(ngModel)]=\"filter.value\" [required]=\"filter.required\">\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" *ngIf=\"filter.dataType.toLowerCase() == 'number' \">\n <mat-label class=\"form-label\">{{filter.name}} </mat-label>\n <input matInput type=\"number\" [name]=\"filter.name\"\n [(ngModel)]=\"filter.value\" [required]=\"filter.required\" >\n </mat-form-field>\n\n <mat-form-field class=\"form-field\" appearance=\"outline\"\n *ngIf=\"filter.dataType.toLowerCase() == 'query' || filter.dataType.toLowerCase() ==='lookup'\">\n <mat-label class=\"form-label\">{{filter.name}} </mat-label>\n <mat-select *ngIf=\"filter.dataType.toLowerCase() == 'query' || filter.dataType.toLowerCase() ==='lookup'\"\n [name]=\"filter.name\" [(ngModel)]=\"filter.value\" [required]=\"filter.required\">\n <mat-option *ngFor=\"let option of filter.lookUps\" [value]=\"option.id\">{{option.name}}</mat-option>\n </mat-select>\n </mat-form-field>\n </mat-grid-tile>\n </mat-grid-list>\n </form>\n <button type=\"submit\" mat-button class=\"viewButton\" (click)=\"execute()\">Execute</button>\n\n </mat-card-content>\n</mat-card>\n", styles: [".example-card{height:100%;width:100%;border-radius:8px}.back-btn{vertical-align:sub;color:#f60;cursor:pointer}.mat-form-field{width:93%}.viewButton{background:#FF6600;color:#fff}\n"], components: [{ type: i4__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i4__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace.MatGridList, selector: "mat-grid-list", inputs: ["cols", "gutterSize", "rowHeight"], exportAs: ["matGridList"] }, { type: i3__namespace.MatGridTile, selector: "mat-grid-tile", inputs: ["rowspan", "colspan"], exportAs: ["matGridTile"] }, { type: i6__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7__namespace.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["tabIndex", "disabled", "for", "aria-label", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i7__namespace.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { type: i8__namespace.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i9__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4__namespace.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i4__namespace.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i11__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i11__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i11__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.MatLabel, selector: "mat-label" }, { type: i12__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i7__namespace.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i11__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i11__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i11__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i11__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i6__namespace.MatSuffix, selector: "[matSuffix]" }, { type: i11__namespace.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportDetailsComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lib-report-details',
templateUrl: './report-details.component.html',
styleUrls: ['./report-details.component.css'],
// encapsulation: ViewEncapsulation.None,
}]
}], ctorParameters: function () { return [{ type: ReportsService }, { type: i2__namespace$1.DatePipe }]; }, propDecorators: { reportId: [{
type: i0.Input
}], executeForm: [{
type: i0.ViewChild,
args: ['f']
}], loadReportDetailFilters: [{
type: i0.Input
}], onExecuteFired: [{
type: i0.Output
}], backClicked: [{
type: i0.Output
}] } });
var NoDataComponent = /** @class */ (function () {
function NoDataComponent() {
}
NoDataComponent.prototype.ngOnInit = function () {
};
return NoDataComponent;
}());
NoDataComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NoDataComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
NoDataComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NoDataComponent, selector: "lib-no-data", ngImport: i0__namespace, template: "<div class=\"empty-state\">\n <div class=\"empty-state__content\">\n <div class=\"empty-state__icon\">\n <img\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN0AAACuCAMAAACFrPhHAAAC9FBMVEUAAADn6do3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APAqZIPHMxWZsbizVFFC0IxO4TOD2U4d0dscdmd5KxMPzoy5fGstLWh3hzE060h0wosvS6ZoIt/STLl+Yzg+x3VFz9M1hprp7UqyZSZKPDeXF626i4O04KcCu2VJMgaqTuEzgTOmePH7oUKHtUEo5f8gRb1VpKUh7ZHcff3DsSIbZZD55/Px5W8X51HIof6NB111dmmFS995bWC2NjcoDmohVJT/l6EfmeME+5BvSvYvvcMhGA3v4xZUP351vICgvRtf89j7kh9V3Pzp2LCfb8MPmR2Pzwt2G0hWju2cf8tKC/+WXXz98112HE+X++EvkvUW6ZMWkWN2jY7UWW+m0odF5H8+/22gOJU8WYrXLX6qjyzMp6fTUpPk5SldzEb8jzBo/JanErkkhh3AN0Yzp4LtrrzkcrXvlrn8mGJn7lFek7sWMf1kO7Dn3Pt7Yh9e4SPfIgX8qGfsTzN1XGxuP7uz89unFF/9dv0U6PbzMx3cmkc2j92bcecH/2eWb9PkmJ+mZjjsvmRk51N2xO9FGuuzJyTu1uv91/+H8r/sv5z7SZd+husyMIz5fzp1p4+3dl/HvyV/H06x7VvcVEwAAAABJRU5ErkJggg==\"\n alt=\"\">\n </div>\n <div class=\"empty-state__message\">No Data has been added yet.</div>\n </div>\n</div>\n", styles: ["body{background:#ebedf2;font-family:\"Poppins\",sans-serif}.empty-state__message{color:#38a169;font-size:1.5rem;font-weight:500;margin-top:.85rem;text-align:center!important;align-items:center!important}.credit{color:#a2a5b9;font-size:.75rem;text-align:center}a{color:#444}.empty-state__icon{text-align:center}\n"] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NoDataComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lib-no-data',
templateUrl: './no-data.component.html',
styleUrls: ['./no-data.component.css']
}]
}], ctorParameters: function () { return []; } });
var ExecuteReportComponent = /** @class */ (function () {
function ExecuteReportComponent(route, cd, reportService, datePipe) {
this.route = route;
this.cd = cd;
this.reportService = reportService;
this.datePipe = datePipe;
this.backClicked = new i0.EventEmitter();
this.$subs = [];
this.query = { total: 0, pageNum: 0, pageSize: 10, data: null, reportId: null };
this.excel = [];
this.reportId = +this.route.snapshot.params['id'];
this.query.reportId = this.reportId;
var formExecuted = sessionStorage.getItem('executeForm');
this.executeForm = JSON.parse(formExecuted);
this.reportName = sessionStorage.getItem('reportName');
this.query.data = this.executeForm;
}
ExecuteReportComponent.prototype.ngOnInit = function () {
this.query.pageNum = 1;
this.loadDataExecuted();
};
ExecuteReportComponent.prototype.loadDataExecuted = function (fileType) {
var _this = this;
var sub1 = this.reportService
.executeReport(this.urlRpt, this.query)
.subscribe(function (res) {
switch (fileType) {
case 'excel':
// console.log('res.detailsExcel', res.details);
_this.hiddenListData = new i6$1.MatTableDataSource(res.details);
_this.hiddenData = res;
_this.hiddenDisplayedColumns = res.headers.map(function (el) { return el.property; });
_this.cd.detectChanges();
_this.reportService.exportAsExcelFile(_this.excel, _this.reportName);
break;
case 'pdf':
_this.hiddenListData = new i6$1.MatTableDataSource(res.details);
_this.hiddenData = res;
_this.hiddenDisplayedColumns = res.headers.map(function (el) { return el.property; });
_this.cd.detectChanges();
_this.pdfPreparing();
break;
default:
_this.data = res;
_this.list = new i6$1.MatTableDataSource(res.details);
_this.query.total = res.totalCount;
_this.displayedColumns = res.headers.map(function (el) { return el.property; });
break;
}
});
this.$subs.push(sub1);
};
ExecuteReportComponent.prototype.ngOnDestroy = function () {
this.query = {
total: 0,
pageNum: 0,
pageSize: 10,
data: null,
reportId: null,
};
// console.log('query', this.query);
this.$subs.forEach(function (item) { return item.unsubscribe(); });
};
ExecuteReportComponent.prototype.getNextPage = function (e) {
this.query.pageNum = e.pageIndex + 1;
this.query.pageSize = e.pageSize;
this.loadDataExecuted();
};
ExecuteReportComponent.prototype.SavePDF = function () {
this.query.pageSize = -1;
this.query.pageNum = -1;
this.loadDataExecuted('pdf');
};
ExecuteReportComponent.prototype.SaveEXCEL = function () {
this.query.pageSize = -1;
this.query.pageNum = -1;
this.loadDataExecuted('excel');
};
ExecuteReportComponent.prototype.pdfPreparing = function () {
var pdfsize = 'a0';
var doc = new jspdf.jsPDF('l', 'pt', pdfsize);
// @ts-ignore
doc.autoTable({
html: '#excelDataTable',
startY: 60,
margin: { horizontal: 7 },
styles: {
fontSize: 50,
cellWidth: 'wrap',
},
columnStyles: {
1: { cellWidth: 'auto' },
},
});
doc.save(this.reportName + '.pdf');
};
ExecuteReportComponent.prototype.onBackClicked = function () {
this.backClicked.emit({ back: true });
};
ExecuteReportComponent.prototype.check = function (el, type) {
if (type === 'Timestamp') {
el = this.datePipe.transform(el, 'yyyy-MM-dd h:mm a');
//yyyy-MM-dd h:mm a
}
return el;
};
return ExecuteReportComponent;
}());
ExecuteReportComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ExecuteReportComponent, deps: [{ token: i1__namespace$1.ActivatedRoute }, { token: i0__namespace.ChangeDetectorRef }, { token: ReportsService }, { token: i2__namespace$1.DatePipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
ExecuteReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ExecuteReportComponent, selector: "lib-execute-report", inputs: { urlRpt: "urlRpt" }, outputs: { backClicked: "backClicked" }, ngImport: i0__namespace, template: "<div class=\"mat-elevation-z8\">\n <div class=\"backBtn\">\n <h3><mat-icon (click)=\"onBackClicked()\" class=\"back-btn\">arrow_back</mat-icon> Report Results</h3>\n </div>\n <div class=\"btns\">\n <button *ngIf=\"data?.details.length>0\" type=\"button\" mat-button value=\"PDF\" class=\"btn savePdf\" (click)=\"SavePDF()\">PDF</button>\n \n <button *ngIf=\"data?.details.length>0\" type=\"button\" mat-button value=\"XLS\" class=\"btn savePdf\" (click)=\"SaveEXCEL()\">Excel</button>\n </div>\n\n <table *ngIf=\"data?.details.length>0\" mat-table [dataSource]=\"list\">\n <ng-container *ngFor=\"let el of data.headers\" matColumnDef=\"{{el.property}}\">\n <th mat-header-cell *matHeaderCellDef> {{el.property}} </th>\n <td mat-cell *matCellDef=\"let row\">\n <span>{{row[el.property] ? check(row[el.property],el.type) : \"N/A\"}}</span>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell\" colspan=\"4\">No data matching</td>\n </tr>\n </table>\n <mat-paginator *ngIf=\"data?.totalCount>0\" [length]=\"query.total\"\n (page)=\"getNextPage($event)\"\n [pageSizeOptions]=\"[10, 25, 100]\">\n </mat-paginator>\n\n\n <table style=\"display: none;width: 100%\" mat-table [dataSource]=\"hiddenListData\" id=\"excelDataTable\">\n <ng-container *ngFor=\"let el of hiddenData?.headers\" matColumnDef=\"{{el.property}}\">\n <th mat-header-cell *matHeaderCellDef> {{el.property}} </th>\n <td mat-cell *matCellDef=\"let row\">\n <span>{{row[el.property] !== undefined ? check(row[el.property],el.type) : \"N/A\"}}</span>\n<!-- <span *ngIf=\"row[el.type]==='Timestamp'\">{{row[el.property] ? (row[el.property]|date:'short') : 'N/A'}}</span>;-->\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"hiddenDisplayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: hiddenDisplayedColumns;\"></tr>\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell\" colspan=\"4\">No data matching</td>\n </tr>\n </table>\n</div>\n\n\n<lib-no-data *ngIf=\"data?.details?.length===0\"></lib-no-data>\n", styles: ["table{width:100%}.savePdf{color:#fff;background-color:#f60;border-color:#f60}.mat-elevation-z8{box-shadow:none;background:#ffffff}.btns{text-align:right;margin-bottom:25px;margin-right:5px}.back-btn{vertical-align:sub;color:#f60;cursor:pointer}h3{font-size:18px;font-weight:600;color:#000}\n"], components: [{ type: i4__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6__namespace$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i6__namespace$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i6__namespace$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i7__namespace$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { type: NoDataComponent, selector: "lib-no-data" }], directives: [{ type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i6__namespace$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i6__namespace$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i6__namespace$1.MatCellDef, selector: "[matCellDef]" }, { type: i6__namespace$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i6__namespace$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i6__namespace$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i6__namespace$1.MatNoDataRow, selector: "ng-template[matNoDataRow]" }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ExecuteReportComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'lib-execute-report',
templateUrl: './execute-report.component.html',
styleUrls: ['./execute-report.component.css'],
}]
}], ctorParameters: function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i0__namespace.ChangeDetectorRef }, { type: ReportsService }, { type: i2__namespace$1.DatePipe }]; }, propDecorators: { urlRpt: [{
type: i0.Input
}], backClicked: [{
type: i0.Output
}] } });
var ReportsModule = /** @class */ (function () {
function ReportsModule() {
}
return ReportsModule;
}());
ReportsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
ReportsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReportsModule, declarations: [ReportsComponent,
ReportDetailsComponent,
ExecuteReportComponent,
NoDataComponent], imports: [i2$1.CommonModule,
i12.MatInputModule,
i6.MatFormFieldModule,