@shikshalokam/sl-reports-library
Version:
Library to integrate questionnaire in SL Projects
447 lines • 57 kB
JavaScript
import * as i0 from '@angular/core';
import { Injectable, Component, Input, ViewChild, EventEmitter, Output, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import * as i1 from 'ng2-charts';
import { NgChartsModule } from 'ng2-charts';
import * as i1$1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as stackedBar from 'chartjs-plugin-stacked100';
import * as pluginDataLabels from 'chartjs-plugin-datalabels';
import * as i2 from '@project-sunbird/ng2-semantic-ui';
import { SuiModule, SuiAccordionModule } from '@project-sunbird/ng2-semantic-ui';
class SlReportsLibraryService {
constructor() { }
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return []; } });
class SlReportsLibraryComponent {
constructor() { }
ngOnInit() {
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SlReportsLibraryComponent, selector: "sl-reports-library", ngImport: i0, template: `
<p>
sl-reports-library works!
</p>
`, isInline: true }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-reports-library', template: `
<p>
sl-reports-library works!
</p>
` }]
}], ctorParameters: function () { return []; } });
class ReportHeaderComponent {
constructor() { }
ngOnInit() {
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ReportHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ReportHeaderComponent, selector: "sl-report-header", inputs: { title: "title", lastdate: "lastdate" }, ngImport: i0, template: "<div class=\"report-title\"> {{title}}</div>\n<span class=\"ml-auto sb-last-update-status fnormal sb-color-gray-400 px-10 last-update\">\n <span>Last Updated on : </span> \n {{lastdate}}\n</span>", styles: [".report-title{font-size:22px;color:var(--sb-text);font-family:Noto Sans;line-height:24px;font-weight:500}.report-subtitle{font-size:19px;color:var(--sb-search-input-text);font-family:Noto Sans;line-height:24px;font-weight:600}\n"] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ReportHeaderComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-report-header', template: "<div class=\"report-title\"> {{title}}</div>\n<span class=\"ml-auto sb-last-update-status fnormal sb-color-gray-400 px-10 last-update\">\n <span>Last Updated on : </span> \n {{lastdate}}\n</span>", styles: [".report-title{font-size:22px;color:var(--sb-text);font-family:Noto Sans;line-height:24px;font-weight:500}.report-subtitle{font-size:19px;color:var(--sb-search-input-text);font-family:Noto Sans;line-height:24px;font-weight:600}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
type: Input
}], lastdate: [{
type: Input
}] } });
class PieChartComponent {
constructor() { }
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PieChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PieChartComponent, selector: "sl-pie-chart", inputs: { data: "data", questionNumber: "questionNumber" }, ngImport: i0, template: "<div>\n <strong>{{ questionNumber }}) {{ data?.question }}</strong>\n <div class=\"chart-container\">\n <canvas \n baseChart\n [data]=\"data?.chart.data\"\n [type]=\"'pie'\"\n >\n </canvas>\n</div>\n\n <div class=\"errorMsg\" *ngIf=\"!data?.chart?.data\">No data found</div>\n</div>", styles: [".heading{text-align:center;padding:15px 10px}.errorMsg{color:gray;text-align:center;padding:20px 0}.chart-container{display:flex;justify-content:center;height:350px}\n"], dependencies: [{ kind: "directive", type: i1.BaseChartDirective, selector: "canvas[baseChart]", inputs: ["type", "legend", "data", "options", "plugins", "labels", "datasets"], outputs: ["chartClick", "chartHover"], exportAs: ["base-chart"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PieChartComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-pie-chart', template: "<div>\n <strong>{{ questionNumber }}) {{ data?.question }}</strong>\n <div class=\"chart-container\">\n <canvas \n baseChart\n [data]=\"data?.chart.data\"\n [type]=\"'pie'\"\n >\n </canvas>\n</div>\n\n <div class=\"errorMsg\" *ngIf=\"!data?.chart?.data\">No data found</div>\n</div>", styles: [".heading{text-align:center;padding:15px 10px}.errorMsg{color:gray;text-align:center;padding:20px 0}.chart-container{display:flex;justify-content:center;height:350px}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
type: Input
}], questionNumber: [{
type: Input
}] } });
class BarChartComponent {
constructor() {
this.barChartLabels = [];
this.barChartType = "bar";
this.barChartLegend = true;
}
ngOnInit() {
this.barData = this.data?.chart?.data;
const options = {
...(this.data.chart.type == "horizontalBar" && {
indexAxis: "y",
}),
plugins: {
...((this.data.chart.options.legend && {
legend: this.data.chart.options.legend,
}) || {
legend: {
display: false,
},
}),
},
scales: {
x: {
...(this.data.chart.options.scales.xAxes[0].scaleLabel && {
title: {
display: this.data.chart.options.scales.xAxes[0].scaleLabel.display,
text: this.data.chart.options.scales.xAxes[0].scaleLabel
.labelString,
},
...this.data.chart.options.scales.xAxes[0],
}),
},
y: {
...(this.data.chart.options.scales.yAxes[0].scaleLabel && {
title: {
display: this.data.chart.options.scales.yAxes[0].scaleLabel.display,
text: this.data.chart.options.scales.yAxes[0].scaleLabel
.labelString,
},
...this.data.chart.options.scales.yAxes[0],
}),
},
},
};
this.barChartOptions = options;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BarChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BarChartComponent, selector: "sl-bar-chart", inputs: { data: "data", questionNumber: "questionNumber" }, viewQueries: [{ propertyName: "chartRootElement", first: true, predicate: ["chartRootElement"], descendants: true }, { propertyName: "chartCanvas", first: true, predicate: ["chartCanvas"], descendants: true }], ngImport: i0, template: "<div class=\"graph-filters\" #chartRootElement>\n <div class=\"bar-chart-wrapper\">\n <canvas\n #chartCanvas \n baseChart \n [data]=\"barData\"\n [type]=\"'bar'\"\n [options]=\"barChartOptions\"\n ></canvas>\n </div>\n\n <div *ngIf=\"!data?.chart?.data\" class=\"errorMsg\">No data found</div>\n</div>\n", styles: [".heading{padding:15px 10px;text-align:center}.errorMsg{color:gray;text-align:center;padding:20px 0}.bar-chart-wrapper{display:block;max-width:900px;max-height:450px;margin:0 auto}\n"], dependencies: [{ kind: "directive", type: i1.BaseChartDirective, selector: "canvas[baseChart]", inputs: ["type", "legend", "data", "options", "plugins", "labels", "datasets"], outputs: ["chartClick", "chartHover"], exportAs: ["base-chart"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BarChartComponent, decorators: [{
type: Component,
args: [{ selector: "sl-bar-chart", template: "<div class=\"graph-filters\" #chartRootElement>\n <div class=\"bar-chart-wrapper\">\n <canvas\n #chartCanvas \n baseChart \n [data]=\"barData\"\n [type]=\"'bar'\"\n [options]=\"barChartOptions\"\n ></canvas>\n </div>\n\n <div *ngIf=\"!data?.chart?.data\" class=\"errorMsg\">No data found</div>\n</div>\n", styles: [".heading{padding:15px 10px;text-align:center}.errorMsg{color:gray;text-align:center;padding:20px 0}.bar-chart-wrapper{display:block;max-width:900px;max-height:450px;margin:0 auto}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
type: Input
}], questionNumber: [{
type: Input
}], chartRootElement: [{
type: ViewChild,
args: ["chartRootElement"]
}], chartCanvas: [{
type: ViewChild,
args: ["chartCanvas"]
}] } });
class PercentageColumnChartsComponent {
constructor() {
this.barChartLabels = [];
this.barChartType = "bar";
this.barChartLegend = true;
this.barChartPlugins = [pluginDataLabels, stackedBar];
}
ngOnInit() {
this.submiisionDateArray = this.chartData.chart.submissionDateArray;
const options = {
...(this.chartData.chart.type == "horizontalBar" && {
indexAxis: "y",
}),
scales: {
x: {
...(this.chartData.chart.options.scales.xAxes[0].scaleLabel && {
title: {
display: this.chartData.chart.options.scales.xAxes[0].scaleLabel.display,
text: this.chartData.chart.options.scales.xAxes[0].scaleLabel
.labelString,
},
...this.chartData.chart.options.scales.xAxes[0],
}),
},
y: {
...(this.chartData.chart.options.scales.yAxes[0].scaleLabel && {
title: {
display: this.chartData.chart.options.scales.yAxes[0].scaleLabel.display,
text: this.chartData.chart.options.scales.yAxes[0].scaleLabel
.labelString,
},
...this.chartData.chart.options.scales.yAxes[0],
}),
},
},
};
this.barChartOptions = options;
this.barChartOptions["plugins"] = {
...((this.chartData.chart.options.legend && {
legend: this.chartData.chart.options.legend,
}) || {
legend: {
display: false,
},
}),
stacked100: { enable: true, replaceTooltipLabel: true },
datalabels: {
offset: 0,
anchor: "end",
align: "left",
font: {
size: 12,
},
formatter: (value, data) => {
const d = data.chart.data;
const { datasetIndex, dataIndex } = data;
// to remove 0 data in report
if (d.originalData[datasetIndex][dataIndex] == 0) {
if ((data.datasetIndex + 1) % this.barChartData.length == 0 &&
this.submiisionDateArray.length) {
return ["", "", this.submiisionDateArray[data.dataIndex]];
}
return "";
}
// to remove date in instance report
if (this.submiisionDateArray && !this.submiisionDateArray.length) {
return `${d.originalData[datasetIndex][dataIndex]}`;
}
// for last value
if ((data.datasetIndex + 1) % this.barChartData.length == 0) {
// console.log(data.datasetIndex)
if (d.originalData[datasetIndex][dataIndex] == 1) {
return ["", "", this.submiisionDateArray[data.dataIndex]];
}
return [
` ${d.originalData[datasetIndex][dataIndex]}`,
"",
` ${this.submiisionDateArray[data.dataIndex]}`,
];
}
else {
return `${d.originalData[datasetIndex][dataIndex]}`;
}
},
},
};
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PercentageColumnChartsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PercentageColumnChartsComponent, selector: "sl-percentage-column-charts", inputs: { chartData: "chartData" }, viewQueries: [{ propertyName: "chartCanvas", first: true, predicate: ["chartCanvas"], descendants: true }], ngImport: i0, template: "<div class=\"graph-filters\" #chartRootElement>\n <ng-container *ngIf=\"chartData?.chart?.data\" class=\"bar-chart-wrapper\">\n <canvas\n #chartCanvas\n baseChart\n [data]=\"chartData.chart.data\"\n [type]=\"barChartType\"\n [options]=\"barChartOptions\"\n ></canvas>\n </ng-container>\n</div>\n", styles: [".bar-chart-wrapper{display:block;max-width:900px;max-height:450px;margin:0 auto}\n"], dependencies: [{ kind: "directive", type: i1.BaseChartDirective, selector: "canvas[baseChart]", inputs: ["type", "legend", "data", "options", "plugins", "labels", "datasets"], outputs: ["chartClick", "chartHover"], exportAs: ["base-chart"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PercentageColumnChartsComponent, decorators: [{
type: Component,
args: [{ selector: "sl-percentage-column-charts", template: "<div class=\"graph-filters\" #chartRootElement>\n <ng-container *ngIf=\"chartData?.chart?.data\" class=\"bar-chart-wrapper\">\n <canvas\n #chartCanvas\n baseChart\n [data]=\"chartData.chart.data\"\n [type]=\"barChartType\"\n [options]=\"barChartOptions\"\n ></canvas>\n </ng-container>\n</div>\n", styles: [".bar-chart-wrapper{display:block;max-width:900px;max-height:450px;margin:0 auto}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { chartCanvas: [{
type: ViewChild,
args: ["chartCanvas"]
}], chartData: [{
type: Input
}] } });
class ReportsTextComponent {
constructor() { }
ngOnInit() {
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ReportsTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ReportsTextComponent, selector: "sl-reports-text", inputs: { data: "data", questionNumber: "questionNumber" }, ngImport: i0, template: "<strong>{{ questionNumber }}) {{ data?.question }}</strong>\n<div class=\"answer-list\">\n <div *ngFor=\"let answer of data?.answers\">\n {{\n data?.resposeType === \"date\" && answer\n ? (answer | date: \"medium\":\"IST\")\n : answer\n }}\n </div>\n</div>\n", styles: [".heading{text-align:center;padding:15px 10px}.answer-list{margin-top:3px;border-top:1px solid #ccc!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ReportsTextComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-reports-text', template: "<strong>{{ questionNumber }}) {{ data?.question }}</strong>\n<div class=\"answer-list\">\n <div *ngFor=\"let answer of data?.answers\">\n {{\n data?.resposeType === \"date\" && answer\n ? (answer | date: \"medium\":\"IST\")\n : answer\n }}\n </div>\n</div>\n", styles: [".heading{text-align:center;padding:15px 10px}.answer-list{margin-top:3px;border-top:1px solid #ccc!important}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
type: Input
}], questionNumber: [{
type: Input
}] } });
class MatrixChartComponent {
constructor() {
this.allEvidence = new EventEmitter();
}
ngOnInit() { }
extension(name) {
return name.split(".").pop();
}
openFile(file) {
window.open(file.url, "_blank");
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MatrixChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MatrixChartComponent, selector: "sl-matrix-chart", inputs: { data: "data", questionNumber: "questionNumber" }, outputs: { allEvidence: "allEvidence" }, ngImport: i0, template: "<div>\n <div class=\"heading\">\n <h4>{{ questionNumber }}) {{ data?.question }}</h4>\n </div>\n <div class=\"ui bottom p-0 b-0 no-bg my-24 graph-content-section\">\n <div *ngFor=\"let element of data?.instanceQuestions; let i = index\">\n <div\n class=\"ui segment chart-conent-section\"\n [ngSwitch]=\"element?.responseType\"\n >\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'text'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'number'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'date'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchDefault\n ></sl-reports-text>\n <sl-pie-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'radio'\"\n ></sl-pie-chart>\n <sl-pie-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'pie'\"\n ></sl-pie-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'bar'\"\n ></sl-bar-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'multiselect'\"\n ></sl-bar-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'column'\"\n ></sl-bar-chart>\n </div>\n <div\n *ngFor=\"let e of element.evidences\"\n (click)=\"openFile(e)\"\n class=\"area\"\n >\n <div *ngIf=\"e.extension == 'png'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'jpg'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'jpeg'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'pdf'\" class=\"mx-10\">\n <i class=\"file pdf outline icon\"></i>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".area{position:relative}i{font-size:40px}.heading{padding:15px 10px;text-align:center}.graph-content-section{padding-bottom:15px!important;background-color:#c4c3c1!important;border-radius:0 0 24px 24px!important;margin-top:0!important;padding-top:5px!important}.chart-conent-section{position:relative;z-index:3;margin:15px!important;border:.0625rem solid var(--rc-dddddd);padding:1.5rem;background:#fff;box-shadow:0 .125rem .4375rem rgba(var(--rc-rgba-black),.16);border-radius:24px!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: PieChartComponent, selector: "sl-pie-chart", inputs: ["data", "questionNumber"] }, { kind: "component", type: BarChartComponent, selector: "sl-bar-chart", inputs: ["data", "questionNumber"] }, { kind: "component", type: ReportsTextComponent, selector: "sl-reports-text", inputs: ["data", "questionNumber"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MatrixChartComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-matrix-chart', template: "<div>\n <div class=\"heading\">\n <h4>{{ questionNumber }}) {{ data?.question }}</h4>\n </div>\n <div class=\"ui bottom p-0 b-0 no-bg my-24 graph-content-section\">\n <div *ngFor=\"let element of data?.instanceQuestions; let i = index\">\n <div\n class=\"ui segment chart-conent-section\"\n [ngSwitch]=\"element?.responseType\"\n >\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'text'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'number'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'date'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchDefault\n ></sl-reports-text>\n <sl-pie-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'radio'\"\n ></sl-pie-chart>\n <sl-pie-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'pie'\"\n ></sl-pie-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'bar'\"\n ></sl-bar-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'multiselect'\"\n ></sl-bar-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'column'\"\n ></sl-bar-chart>\n </div>\n <div\n *ngFor=\"let e of element.evidences\"\n (click)=\"openFile(e)\"\n class=\"area\"\n >\n <div *ngIf=\"e.extension == 'png'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'jpg'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'jpeg'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'pdf'\" class=\"mx-10\">\n <i class=\"file pdf outline icon\"></i>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".area{position:relative}i{font-size:40px}.heading{padding:15px 10px;text-align:center}.graph-content-section{padding-bottom:15px!important;background-color:#c4c3c1!important;border-radius:0 0 24px 24px!important;margin-top:0!important;padding-top:5px!important}.chart-conent-section{position:relative;z-index:3;margin:15px!important;border:.0625rem solid var(--rc-dddddd);padding:1.5rem;background:#fff;box-shadow:0 .125rem .4375rem rgba(var(--rc-rgba-black),.16);border-radius:24px!important}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
type: Input
}], questionNumber: [{
type: Input
}], allEvidence: [{
type: Output
}] } });
class ExpansionTableComponent {
constructor() { }
ngOnInit() {
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpansionTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ExpansionTableComponent, selector: "sl-expansion-table", inputs: { datas: "datas" }, ngImport: i0, template: "<div *ngIf=\"datas?.chart\">\n <strong>{{ datas?.chart?.title }}</strong> \n \n <sui-accordion class=\"styled fluid sb-accordion sb-new-theme-accordion drop-accordian\" *ngFor=\"let item of datas?.chart?.domains; let i = index\">\n <sui-accordion-panel [isOpen]=\"false\">\n <div title class=\"sb-accordion-title fsmall d-flex flex-ai-center flex-jc-space-between\">\n <span>{{ item?.domainName }}</span>\n <i class=\"chevron down icon\" role=\"img\" title=\"expand\"></i>\n </div>\n <div content class=\"sb-accordion-content sb-bg-color-white pt-0 pb-8\">\n <table>\n <tr class=\"_flex-box\">\n <td text-wrap style=\"flex: 1\"></td>\n <td class=\"_flex-box\" class=\"assess\" *ngFor=\"let head of datas?.chart?.heading\">\n {{ head }}\n </td>\n </tr>\n <tr *ngFor=\"let criteria of item.criterias\" class=\"_flex-box _justify-content-space-between _noWrap\">\n <td class=\"ion-text-wrap\" style=\"flex: 1\">{{ criteria?.name }}</td>\n <td class=\"_flex-box\" *ngFor=\"let level of criteria?.levelsWithScores\">\n <h5>{{level?.level}}</h5>\n <p>{{level?.score}}</p>\n </td>\n </tr>\n </table>\n </div>\n </sui-accordion-panel>\n </sui-accordion>\n </div>\n ", styles: ["table{border-collapse:collapse;border-spacing:0;width:100%;border:1px solid #ddd;background:#fff;color:var(--sb-text)}th,td{text-align:center;max-width:0;padding:12px 4px;color:#000}tr:nth-child(2n){background-color:#f2f2f2}.expansionPanel{border-radius:10px;width:100%;margin:16px 0!important;padding:0!important}.assess{flex:0;text-align:-webkit-center}.heading{padding:15px 10px;text-align:center}.domain{display:flex;justify-content:space-between;margin-bottom:3px;border:1px solig grey;color:var(--sb-text)}.drop-accordian{margin-bottom:4px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.SuiAccordion, selector: "sui-accordion", inputs: ["closeOthers", "transition", "transitionDuration"] }, { kind: "component", type: i2.SuiAccordionPanel, selector: "sui-accordion-panel", inputs: ["isDisabled", "isOpen"], outputs: ["isOpenChange"], exportAs: ["suiAccordionPanel"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpansionTableComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-expansion-table', template: "<div *ngIf=\"datas?.chart\">\n <strong>{{ datas?.chart?.title }}</strong> \n \n <sui-accordion class=\"styled fluid sb-accordion sb-new-theme-accordion drop-accordian\" *ngFor=\"let item of datas?.chart?.domains; let i = index\">\n <sui-accordion-panel [isOpen]=\"false\">\n <div title class=\"sb-accordion-title fsmall d-flex flex-ai-center flex-jc-space-between\">\n <span>{{ item?.domainName }}</span>\n <i class=\"chevron down icon\" role=\"img\" title=\"expand\"></i>\n </div>\n <div content class=\"sb-accordion-content sb-bg-color-white pt-0 pb-8\">\n <table>\n <tr class=\"_flex-box\">\n <td text-wrap style=\"flex: 1\"></td>\n <td class=\"_flex-box\" class=\"assess\" *ngFor=\"let head of datas?.chart?.heading\">\n {{ head }}\n </td>\n </tr>\n <tr *ngFor=\"let criteria of item.criterias\" class=\"_flex-box _justify-content-space-between _noWrap\">\n <td class=\"ion-text-wrap\" style=\"flex: 1\">{{ criteria?.name }}</td>\n <td class=\"_flex-box\" *ngFor=\"let level of criteria?.levelsWithScores\">\n <h5>{{level?.level}}</h5>\n <p>{{level?.score}}</p>\n </td>\n </tr>\n </table>\n </div>\n </sui-accordion-panel>\n </sui-accordion>\n </div>\n ", styles: ["table{border-collapse:collapse;border-spacing:0;width:100%;border:1px solid #ddd;background:#fff;color:var(--sb-text)}th,td{text-align:center;max-width:0;padding:12px 4px;color:#000}tr:nth-child(2n){background-color:#f2f2f2}.expansionPanel{border-radius:10px;width:100%;margin:16px 0!important;padding:0!important}.assess{flex:0;text-align:-webkit-center}.heading{padding:15px 10px;text-align:center}.domain{display:flex;justify-content:space-between;margin-bottom:3px;border:1px solig grey;color:var(--sb-text)}.drop-accordian{margin-bottom:4px}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { datas: [{
type: Input
}] } });
class GenericChartComponent {
constructor() { }
ngOnInit() {
}
extension(name) {
return name.split(".").pop();
}
openFile(file) {
window.open(file.url, "_blank");
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GenericChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GenericChartComponent, selector: "sl-generic-chart", inputs: { reportSections: "reportSections" }, ngImport: i0, template: "<div *ngFor=\"let section of reportSections\">\n <div class=\"ui bottom p-0 b-0 no-bg my-24 graph-content-section\">\n <div *ngFor=\"let element of section?.questionArray; let i = index\">\n <div\n class=\"ui segment chart-conent-section\"\n [ngSwitch]=\"element?.responseType\"\n >\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'text'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'number'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'date'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchDefault\n ></sl-reports-text>\n <sl-pie-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'radio'\"\n ></sl-pie-chart>\n <sl-pie-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'pie'\"\n ></sl-pie-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'bar'\"\n ></sl-bar-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'multiselect'\"\n ></sl-bar-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'column'\"\n ></sl-bar-chart>\n <sl-percentage-column-charts\n [chartData]=\"element\"\n *ngSwitchCase=\"'horizontalBar'\"\n >\n </sl-percentage-column-charts>\n <sl-matrix-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'matrix'\"\n ></sl-matrix-chart>\n <sl-expansion-table\n [datas]=\"element\"\n *ngSwitchCase=\"'expansion-table'\"\n ></sl-expansion-table>\n </div>\n <div\n *ngFor=\"let e of element.evidences\"\n (click)=\"openFile(e)\"\n class=\"area\"\n >\n <div *ngIf=\"e.extension == 'png'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'jpg'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'jpeg'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'pdf'\" class=\"mx-10\">\n <i class=\"file pdf outline icon\"></i>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".graph-content-section{padding-bottom:15px!important;background-color:#e9e8d9!important;border-radius:0 0 24px 24px!important;margin-top:0!important;padding-top:5px!important}.chart-conent-section{position:relative;z-index:3;margin:15px!important;border:.0625rem solid var(--rc-dddddd);padding:1.5rem;background:#fff;box-shadow:0 .125rem .4375rem rgba(var(--rc-rgba-black),.16);border-radius:24px!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: PieChartComponent, selector: "sl-pie-chart", inputs: ["data", "questionNumber"] }, { kind: "component", type: BarChartComponent, selector: "sl-bar-chart", inputs: ["data", "questionNumber"] }, { kind: "component", type: PercentageColumnChartsComponent, selector: "sl-percentage-column-charts", inputs: ["chartData"] }, { kind: "component", type: MatrixChartComponent, selector: "sl-matrix-chart", inputs: ["data", "questionNumber"], outputs: ["allEvidence"] }, { kind: "component", type: ReportsTextComponent, selector: "sl-reports-text", inputs: ["data", "questionNumber"] }, { kind: "component", type: ExpansionTableComponent, selector: "sl-expansion-table", inputs: ["datas"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GenericChartComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-generic-chart', template: "<div *ngFor=\"let section of reportSections\">\n <div class=\"ui bottom p-0 b-0 no-bg my-24 graph-content-section\">\n <div *ngFor=\"let element of section?.questionArray; let i = index\">\n <div\n class=\"ui segment chart-conent-section\"\n [ngSwitch]=\"element?.responseType\"\n >\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'text'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'number'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'date'\"\n ></sl-reports-text>\n <sl-reports-text\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchDefault\n ></sl-reports-text>\n <sl-pie-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'radio'\"\n ></sl-pie-chart>\n <sl-pie-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'pie'\"\n ></sl-pie-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'bar'\"\n ></sl-bar-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'multiselect'\"\n ></sl-bar-chart>\n <sl-bar-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'column'\"\n ></sl-bar-chart>\n <sl-percentage-column-charts\n [chartData]=\"element\"\n *ngSwitchCase=\"'horizontalBar'\"\n >\n </sl-percentage-column-charts>\n <sl-matrix-chart\n [data]=\"element\"\n [questionNumber]=\"i + 1\"\n *ngSwitchCase=\"'matrix'\"\n ></sl-matrix-chart>\n <sl-expansion-table\n [datas]=\"element\"\n *ngSwitchCase=\"'expansion-table'\"\n ></sl-expansion-table>\n </div>\n <div\n *ngFor=\"let e of element.evidences\"\n (click)=\"openFile(e)\"\n class=\"area\"\n >\n <div *ngIf=\"e.extension == 'png'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'jpg'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'jpeg'\" class=\"mx-10\">\n <i class=\"file image outline icon\"></i>\n </div>\n <div *ngIf=\"e.extension == 'pdf'\" class=\"mx-10\">\n <i class=\"file pdf outline icon\"></i>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".graph-content-section{padding-bottom:15px!important;background-color:#e9e8d9!important;border-radius:0 0 24px 24px!important;margin-top:0!important;padding-top:5px!important}.chart-conent-section{position:relative;z-index:3;margin:15px!important;border:.0625rem solid var(--rc-dddddd);padding:1.5rem;background:#fff;box-shadow:0 .125rem .4375rem rgba(var(--rc-rgba-black),.16);border-radius:24px!important}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { reportSections: [{
type: Input
}] } });
class ScatterChartsComponent {
constructor() { }
ngOnInit() {
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScatterChartsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ScatterChartsComponent, selector: "sl-scatter-charts", ngImport: i0, template: "<p>scatter-charts works!</p>\n", styles: [""] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScatterChartsComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-scatter-charts', template: "<p>scatter-charts works!</p>\n" }]
}], ctorParameters: function () { return []; } });
class ExpansionPanelComponent {
constructor() { }
ngOnInit() {
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpansionPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ExpansionPanelComponent, selector: "sl-expansion-panel", inputs: { datas: "datas" }, ngImport: i0, template: "<!-- <h2 *ngIf=\"datas?.chart\" class=\"heading\">{{ datas?.chart?.title }}</h2>\n<div *ngIf=\"datas?.chart\" >\n <div *ngFor=\"let entity of datas?.chart?.entities\">\n <h4 class=\"heading\">{{ entity.entityName }}</h4>\n\n <div\n (click)=\"isOpenIndex = isOpenIndex == i ? -1 : i\"\n class=\"expansionPanel\"\n margin\n *ngFor=\"let item of entity?.domains; let i = index\"\n >\n <div class=\"domain\" >\n <h4 style=\"flex: 1\" >{{ item?.domainName }}</h4>\n <i *ngIf=\"!(isOpenIndex == i)\" class=\"arrow down icon medium\" ></i>\n <i *ngIf=\"isOpenIndex == i\" class=\"arrow up icon medium\" ></i>\n </div>\n <div *ngIf=\"isOpenIndex == i\" class=\"ion-padding\">\n <table>\n <tr *ngFor=\"let criteria of item.criterias\" class=\"domain _noWrap\">\n <td style=\"flex: 1\">{{ criteria?.name }}</td>\n <td class=\"_flex-box\">: {{ criteria?.level }}</td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n</div> -->\n\n\n<div *ngIf=\"datas?.chart\">\n <strong>{{ datas?.chart?.title }}</strong>\n <div *ngFor=\"let entity of datas?.chart?.entities\">\n <strong>{{ entity.entityName }}</strong>\n\n <sui-accordion class=\"styled fluid sb-accordion sb-new-theme-accordion drop-accordian\"\n *ngFor=\"let item of entity?.domains; let i = index\">\n <sui-accordion-panel [isOpen]=\"false\">\n <div title class=\"sb-accordion-title fsmall d-flex flex-ai-center flex-jc-space-between\">\n <span>{{ item?.domainName }}</span>\n <i class=\"chevron down icon\" role=\"img\" title=\"expand\"></i>\n </div>\n <div content class=\"sb-accordion-content sb-bg-color-white pt-0 pb-8\">\n <table>\n <tr *ngFor=\"let criteria of item.criterias\" class=\"domain _noWrap\">\n <td style=\"flex: 1\">{{ criteria?.name }}</td>\n <td class=\"_flex-box\">: {{ criteria?.level }}</td>\n </tr>\n </table>\n </div>\n </sui-accordion-panel>\n </sui-accordion>\n </div>\n</div>", styles: ["table{border-collapse:collapse;border-spacing:0;width:100%;border:1px solid #ddd;background:#fff;color:var(--sb-text)}th,td{text-align:center;padding:12px 4px;color:#000}tr:nth-child(2n){background-color:#f2f2f2}.expansionPanel{border-radius:10px;width:100%;margin:16px 0!important;padding:0!important}.assess{flex:0;text-align:-webkit-center}.heading{padding:15px 10px;text-align:center}.domain{display:flex;justify-content:space-between;margin-bottom:3px;border:1px solig grey;color:var(--sb-text)}.drop-accordian{margin-bottom:4px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.SuiAccordion, selector: "sui-accordion", inputs: ["closeOthers", "transition", "transitionDuration"] }, { kind: "component", type: i2.SuiAccordionPanel, selector: "sui-accordion-panel", inputs: ["isDisabled", "isOpen"], outputs: ["isOpenChange"], exportAs: ["suiAccordionPanel"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpansionPanelComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-expansion-panel', template: "<!-- <h2 *ngIf=\"datas?.chart\" class=\"heading\">{{ datas?.chart?.title }}</h2>\n<div *ngIf=\"datas?.chart\" >\n <div *ngFor=\"let entity of datas?.chart?.entities\">\n <h4 class=\"heading\">{{ entity.entityName }}</h4>\n\n <div\n (click)=\"isOpenIndex = isOpenIndex == i ? -1 : i\"\n class=\"expansionPanel\"\n margin\n *ngFor=\"let item of entity?.domains; let i = index\"\n >\n <div class=\"domain\" >\n <h4 style=\"flex: 1\" >{{ item?.domainName }}</h4>\n <i *ngIf=\"!(isOpenIndex == i)\" class=\"arrow down icon medium\" ></i>\n <i *ngIf=\"isOpenIndex == i\" class=\"arrow up icon medium\" ></i>\n </div>\n <div *ngIf=\"isOpenIndex == i\" class=\"ion-padding\">\n <table>\n <tr *ngFor=\"let criteria of item.criterias\" class=\"domain _noWrap\">\n <td style=\"flex: 1\">{{ criteria?.name }}</td>\n <td class=\"_flex-box\">: {{ criteria?.level }}</td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n</div> -->\n\n\n<div *ngIf=\"datas?.chart\">\n <strong>{{ datas?.chart?.title }}</strong>\n <div *ngFor=\"let entity of datas?.chart?.entities\">\n <strong>{{ entity.entityName }}</strong>\n\n <sui-accordion class=\"styled fluid sb-accordion sb-new-theme-accordion drop-accordian\"\n *ngFor=\"let item of entity?.domains; let i = index\">\n <sui-accordion-panel [isOpen]=\"false\">\n <div title class=\"sb-accordion-title fsmall d-flex flex-ai-center flex-jc-space-between\">\n <span>{{ item?.domainName }}</span>\n <i class=\"chevron down icon\" role=\"img\" title=\"expand\"></i>\n </div>\n <div content class=\"sb-accordion-content sb-bg-color-white pt-0 pb-8\">\n <table>\n <tr *ngFor=\"let criteria of item.criterias\" class=\"domain _noWrap\">\n <td style=\"flex: 1\">{{ criteria?.name }}</td>\n <td class=\"_flex-box\">: {{ criteria?.level }}</td>\n </tr>\n </table>\n </div>\n </sui-accordion-panel>\n </sui-accordion>\n </div>\n</div>", styles: ["table{border-collapse:collapse;border-spacing:0;width:100%;border:1px solid #ddd;background:#fff;color:var(--sb-text)}th,td{text-align:center;padding:12px 4px;color:#000}tr:nth-child(2n){background-color:#f2f2f2}.expansionPanel{border-radius:10px;width:100%;margin:16px 0!important;padding:0!important}.assess{flex:0;text-align:-webkit-center}.heading{padding:15px 10px;text-align:center}.domain{display:flex;justify-content:space-between;margin-bottom:3px;border:1px solig grey;color:var(--sb-text)}.drop-accordian{margin-bottom:4px}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { datas: [{
type: Input
}] } });
const FileExtension = {
videoFormats: ["mp4", "WMV", "WEBM", "flv", "avi", "3GP", "OGG", "m4v"],
audioFormats: ["AIF", "cda", "mpa", "ogg", "wav", "wma", "mp3"],
pptFormats: ["ppt", "pptx", "pps", "ppsx"],
wordFormats: ["docx", "doc", "docm", "dotx"],
imageFormats: ["jpg", "png", "jpeg"],
pdfFormats: ["pdf"],
spreadSheetFormats: ["xls", "xlsx"],
};
class AttachmentsComponent {
constructor() {
this.imageFormats = FileExtension.imageFormats;
this.videoFormats = FileExtension.videoFormats;
this.audioFormats = FileExtension.audioFormats;
this.pdfFormats = FileExtension.pdfFormats;
this.wordFormats = FileExtension.wordFormats;
this.spreadSheetFormats = FileExtension.spreadSheetFormats;
}
ngOnInit() { }
openImage(url) {
window.open(url, "_blank");
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AttachmentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AttachmentsComponent, selector: "sl-attachments", inputs: { url: "url", extension: "extension" }, ngImport: i0, template: "<div class=\"thumbnail-card\">\n <img [src]=\"url\" *ngIf=\"imageFormats.includes(extension)\" (click)=\"openImage(url)\" class=\"card-images\" />\n <!-- <fa name=\"file-video-o\" class=\"attachmentIcon\" *ngIf=\"videoFormats.includes(extension)\" (click)=\"playVideo(url)\"></fa> -->\n <i\n class=\"video icon attachmentIcon\"\n *ngIf=\"videoFormats.includes(extension)\"\n (click)=\"openImage(url)\"\n ></i>\n \n <!-- <fa *ngIf=\"audioFormats.includes(extension)\" name=\"file-audio-o\" class=\"attachmentIcon\" (click)=\"playAudio(url)\"></fa> -->\n <i\n *ngIf=\"audioFormats.includes(extension)\"\n class=\"file audio icon attachmentIcon\"\n (click)=\"openImage(url)\"\n ></i>\n <!-- <fa class=\"attachmentIcon\" name=\"file-pdf-o\" *ngIf=\"pdfFormats.includes(extension)\" (click)=\"openDocument(url)\"></fa> -->\n <i\n class=\"file alternate icon attachmentIcon\"\n *ngIf=\"pdfFormats.includes(extension)\"\n (click)=\"openImage(url)\"\n ></i>\n \n <i\n class=\"file alternate icon attachmentIcon\"\n *ngIf=\"spreadSheetFormats.includes(extension) || wordFormats.includes(extension) \"\n (click)=\"openImage(url)\"\n ></i>\n </div>\n ", styles: [".attachmentIcon{margin-top:10px;font-size:70px}.thumbnail-card{height:98px;display:inline;justify-content:space-around;align-items:center}.card-images{width:90px;height:90px;margin-right:2px;margin-bottom:2px;border-radius:10px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AttachmentsComponent, decorators: [{
type: Component,
args: [{ selector: 'sl-attachments', template: "<div class=\"thumbnail-card\">\n <img [src]=\"url\" *ngIf=\"imageFormats.includes(extension)\" (click)=\"openImage(url)\" class=\"card-images\" />\n <!-- <fa name=\"file-video-o\" class=\"attachmentIcon\" *ngIf=\"videoFormats.includes(extension)\" (click)=\"playVideo(url)\"></fa> -->\n <i\n class=\"video icon attachmentIcon\"\n *ngIf=\"videoFormats.includes(extension)\"\n (click)=\"openImage(url)\"\n ></i>\n \n <!-- <fa *ngIf=\"audioFormats.includes(extension)\" name=\"file-audio-o\" class=\"attachmentIcon\" (click)=\"playAudio(url)\"></fa> -->\n <i\n *ngIf=\"audioFormats.includes(extension)\"\n class=\"file audio icon attachmentIcon\"\n (click)=\"openImage(url)\"\n ></i>\n <!-- <fa class=\"attachmentIcon\" name=\"file-pdf-o\" *ngIf=\"pdfFormats.includes(extension)\" (click)=\"openDocument(url)\"></fa> -->\n <i\n class=\"file alternate icon attachmentIcon\"\n *ngIf=\"pdfFormats.includes(extension)\"\n (click)=\"openImage(url)\"\n ></i>\n \n <i\n class=\"file alternate icon attachmentIcon\"\n *ngIf=\"spreadSheetFormats.includes(extension) || wordFormats.includes(extension) \"\n (click)=\"openImage(url)\"\n ></i>\n </div>\n ", styles: [".attachmentIcon{margin-top:10px;font-size:70px}.thumbnail-card{height:98px;display:inline;justify-content:space-around;align-items:center}.card-images{width:90px;height:90px;margin-right:2px;margin-bottom:2px;border-radius:10px}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { url: [{
type: Input
}], extension: [{
type: Input
}] } });
class SlReportsLibraryModule {
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryModule, declarations: [SlReportsLibraryComponent,
ReportHeaderComponent,
PieChartComponent,
BarChartComponent,
GenericChartComponent,
PercentageColumnChartsComponent,
ScatterChartsComponent,
MatrixChartComponent,
ReportsTextComponent,
ExpansionTableComponent,
ExpansionPanelComponent,
AttachmentsComponent], imports: [NgChartsModule, CommonModule, SuiModule, SuiAccordionModule], exports: [SlReportsLibraryComponent,
ReportHeaderComponent,
PieChartComponent,
BarChartComponent,
GenericChartComponent,
PercentageColumnChartsComponent,
ScatterChartsComponent,
MatrixChartComponent,
ReportsTextComponent,
ExpansionTableComponent,
ExpansionPanelComponent,
AttachmentsComponent] }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryModule, imports: [NgChartsModule, CommonModule, SuiModule, SuiAccordionModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SlReportsLibraryModule, decorators: [{
type: NgModule,
args: [{
declarations: [
SlReportsLibraryComponent,
ReportHeaderComponent,
PieChartComponent,
BarChartComponent,
GenericChartComponent,
PercentageColumnChartsComponent,
ScatterChartsComponent,
MatrixChartComponent,
ReportsTextComponent,
ExpansionTableComponent,
ExpansionPanelComponent,
AttachmentsComponent,
],
imports: [NgChartsModule, CommonModule, SuiModule, SuiAccordionModule],
exports: [
SlReportsLibraryComponent,
ReportHeaderComponent,
PieChartComponent,
BarChartComponent,
GenericChartComponent,
PercentageColumnChartsComponent,
ScatterChartsComponent,
MatrixChartComponent,
ReportsTextComponent,
ExpansionTableComponent,
ExpansionPanelComponent,
AttachmentsComponent
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}]
}] });
/*
* Public API Surface of sl-reports-library
*/
/**
* Generated bundle index. Do not edit.
*/
export { AttachmentsComponent, BarChartComponent, ExpansionPanelComponent, ExpansionTableComponent, GenericChartComponent, MatrixChartComponent, PercentageColumnChartsComponent, PieChartComponent, ReportHeaderComponent, ReportsTextComponent, ScatterChartsComponent, SlReportsLibraryComponent, SlReportsLibraryModule, SlReportsLibraryService };
//# sourceMappingURL=shikshalokam-sl-reports-library.mjs.map