quankee-framework-report 1.5.3 → 1.6.2
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
|
+
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
4
5
|
|
|
5
6
|
class ReportModuleService {
|
|
6
7
|
http;
|
|
@@ -47,6 +48,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
47
48
|
}]
|
|
48
49
|
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
49
50
|
|
|
51
|
+
class ReportTemplateService {
|
|
52
|
+
http;
|
|
53
|
+
constructor(http) {
|
|
54
|
+
this.http = http;
|
|
55
|
+
}
|
|
56
|
+
getReportTemplates(baseUrl) {
|
|
57
|
+
return this.http.get(`${baseUrl}/api/report/engine/service/template`);
|
|
58
|
+
}
|
|
59
|
+
importReportTemplate(baseUrl, reportTemplateName, module, reportTemplateFile, request) {
|
|
60
|
+
let formData = new FormData();
|
|
61
|
+
formData.append('file', reportTemplateFile, reportTemplateFile.name);
|
|
62
|
+
let headers = new HttpHeaders();
|
|
63
|
+
headers.append('Content-Type', 'multipart/form-data');
|
|
64
|
+
headers.append('Accept', 'application/vnd.api+json');
|
|
65
|
+
let params = new HttpParams();
|
|
66
|
+
params = params.append('name', reportTemplateName);
|
|
67
|
+
params = params.append('module', module);
|
|
68
|
+
params = params.append('dataSourceId', request.reportDataSource.reportDataSourceId);
|
|
69
|
+
return this.http.post(`${baseUrl}/api/report/engine/service/template/import`, formData, { headers: headers, params: params });
|
|
70
|
+
}
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ReportTemplateService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
72
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ReportTemplateService, providedIn: 'root' });
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ReportTemplateService, decorators: [{
|
|
75
|
+
type: Injectable,
|
|
76
|
+
args: [{
|
|
77
|
+
providedIn: 'root'
|
|
78
|
+
}]
|
|
79
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
80
|
+
|
|
50
81
|
/*
|
|
51
82
|
* Public API Surface of quankee-framework-report
|
|
52
83
|
*/
|
|
@@ -55,5 +86,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
55
86
|
* Generated bundle index. Do not edit.
|
|
56
87
|
*/
|
|
57
88
|
|
|
58
|
-
export { ReportDataSourceService, ReportModuleService };
|
|
89
|
+
export { ReportDataSourceService, ReportModuleService, ReportTemplateService };
|
|
59
90
|
//# sourceMappingURL=quankee-framework-report.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quankee-framework-report.mjs","sources":["../../../projects/quankee-framework-report/src/lib/core/module/report-module.service.ts","../../../projects/quankee-framework-report/src/lib/core/data/source/report-data-source.service.ts","../../../projects/quankee-framework-report/src/public-api.ts","../../../projects/quankee-framework-report/src/quankee-framework-report.ts"],"sourcesContent":["import {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {Response} from 'quankee-framework-response';\nimport {ReportModule} from './report-module';\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportModuleService {\n\n constructor(private readonly http: HttpClient) { }\n\n getReportModules(baseUrl: string): Observable<Response<ReportModule[]>> {\n return this.http.get<Response<ReportModule[]>>(`${baseUrl}/api/report/engine/module`);\n }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {Response} from 'quankee-framework-response';\nimport {ReportDataSource} from './report-data-source';\nimport {ReportDataSourceRequest} from './report-data-source-request';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportDataSourceService {\n\n constructor(private readonly http: HttpClient) {}\n\n getReportDataSources(baseUrl: string): Observable<Response<ReportDataSource[]>> {\n return this.http.get<Response<ReportDataSource[]>>(`${baseUrl}/api/report/engine/data/source`);\n }\n\n registerDataSource(baseUrl: string, request: ReportDataSourceRequest): Observable<Response<string>> {\n return this.http.post<Response<string>>(`${baseUrl}/api/report/engine/data/source`, request);\n }\n\n updateDataSource(baseUrl: string, request: ReportDataSourceRequest): Observable<Response<string>> {\n return this.http.put<Response<string>>(`${baseUrl}/api/report/engine/data/source`, request);\n }\n\n deleteDataSource(baseUrl: string,reportDataSourceId:string): Observable<Response<string>> {\n return this.http.delete<Response<string>>(`${baseUrl}/api/report/engine/data/source/${reportDataSourceId}`);\n }\n\n}\n","/*\n * Public API Surface of quankee-framework-report\n */\n\n\nexport * from './lib/core/module/report-module';\nexport * from './lib/core/data/source/report-data-source';\nexport * from './lib/core/data/source/report-data-source-request';\n\nexport * from './lib/core/module/report-module.service'\nexport * from './lib/core/data/source/report-data-source.service';\n\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quankee-framework-report.mjs","sources":["../../../projects/quankee-framework-report/src/lib/core/module/report-module.service.ts","../../../projects/quankee-framework-report/src/lib/core/data/source/report-data-source.service.ts","../../../projects/quankee-framework-report/src/lib/core/template/report-template.service.ts","../../../projects/quankee-framework-report/src/public-api.ts","../../../projects/quankee-framework-report/src/quankee-framework-report.ts"],"sourcesContent":["import {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {Response} from 'quankee-framework-response';\nimport {ReportModule} from './report-module';\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportModuleService {\n\n constructor(private readonly http: HttpClient) { }\n\n getReportModules(baseUrl: string): Observable<Response<ReportModule[]>> {\n return this.http.get<Response<ReportModule[]>>(`${baseUrl}/api/report/engine/module`);\n }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {Response} from 'quankee-framework-response';\nimport {ReportDataSource} from './report-data-source';\nimport {ReportDataSourceRequest} from './report-data-source-request';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportDataSourceService {\n\n constructor(private readonly http: HttpClient) {}\n\n getReportDataSources(baseUrl: string): Observable<Response<ReportDataSource[]>> {\n return this.http.get<Response<ReportDataSource[]>>(`${baseUrl}/api/report/engine/data/source`);\n }\n\n registerDataSource(baseUrl: string, request: ReportDataSourceRequest): Observable<Response<string>> {\n return this.http.post<Response<string>>(`${baseUrl}/api/report/engine/data/source`, request);\n }\n\n updateDataSource(baseUrl: string, request: ReportDataSourceRequest): Observable<Response<string>> {\n return this.http.put<Response<string>>(`${baseUrl}/api/report/engine/data/source`, request);\n }\n\n deleteDataSource(baseUrl: string,reportDataSourceId:string): Observable<Response<string>> {\n return this.http.delete<Response<string>>(`${baseUrl}/api/report/engine/data/source/${reportDataSourceId}`);\n }\n\n}\n","import {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {ReportTemplate} from './report-template';\nimport {Response} from 'quankee-framework-response';\nimport {ReportDataSourceRequest} from '../data/source/report-data-source-request';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportTemplateService {\n\n constructor(private readonly http: HttpClient) {}\n\n getReportTemplates(baseUrl: string): Observable<Response<ReportTemplate[]>> {\n return this.http.get<Response<ReportTemplate[]>>(`${baseUrl}/api/report/engine/service/template`);\n }\n\n importReportTemplate(baseUrl: string, reportTemplateName: string, module: string, reportTemplateFile: any, request: ReportDataSourceRequest): Observable<Response<string>> {\n let formData: FormData = new FormData();\n formData.append('file', reportTemplateFile, reportTemplateFile.name);\n\n let headers = new HttpHeaders();\n headers.append('Content-Type', 'multipart/form-data' );\n headers.append('Accept','application/vnd.api+json');\n\n let params = new HttpParams();\n params = params.append('name', reportTemplateName);\n params = params.append('module', module);\n params = params.append('dataSourceId', request.reportDataSource.reportDataSourceId)\n\n return this.http.post<Response<string>>(`${baseUrl}/api/report/engine/service/template/import`,formData,{ headers: headers, params: params});\n\n\n\n }\n\n}\n","/*\n * Public API Surface of quankee-framework-report\n */\n\n\nexport * from './lib/core/module/report-module';\nexport * from './lib/core/data/source/report-data-source';\nexport * from './lib/core/data/source/report-data-source-request';\nexport * from './lib/core/template/report-template';\n\nexport * from './lib/core/module/report-module.service'\nexport * from './lib/core/data/source/report-data-source.service';\nexport * from './lib/core/template/report-template.service';\n\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,mBAAmB,CAAA;AAED,IAAA,IAAA;AAA7B,IAAA,WAAA,CAA6B,IAAgB,EAAA;QAAhB,IAAI,CAAA,IAAA,GAAJ,IAAI;;AAEjC,IAAA,gBAAgB,CAAC,OAAe,EAAA;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA2B,CAAG,EAAA,OAAO,CAA2B,yBAAA,CAAA,CAAC;;wGAL5E,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA;;4FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA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AA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAArB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cAFpB,MAAM,EAAA,CAAA;;4FAEP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ReportTemplate } from './report-template';
|
|
4
|
+
import { Response } from 'quankee-framework-response';
|
|
5
|
+
import { ReportDataSourceRequest } from '../data/source/report-data-source-request';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ReportTemplateService {
|
|
8
|
+
private readonly http;
|
|
9
|
+
constructor(http: HttpClient);
|
|
10
|
+
getReportTemplates(baseUrl: string): Observable<Response<ReportTemplate[]>>;
|
|
11
|
+
importReportTemplate(baseUrl: string, reportTemplateName: string, module: string, reportTemplateFile: any, request: ReportDataSourceRequest): Observable<Response<string>>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReportTemplateService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ReportTemplateService>;
|
|
14
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './lib/core/module/report-module';
|
|
2
2
|
export * from './lib/core/data/source/report-data-source';
|
|
3
3
|
export * from './lib/core/data/source/report-data-source-request';
|
|
4
|
+
export * from './lib/core/template/report-template';
|
|
4
5
|
export * from './lib/core/module/report-module.service';
|
|
5
6
|
export * from './lib/core/data/source/report-data-source.service';
|
|
7
|
+
export * from './lib/core/template/report-template.service';
|