quankee-framework-report 1.5.2 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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;
@@ -20,6 +21,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
20
21
  }]
21
22
  }], ctorParameters: () => [{ type: i1.HttpClient }] });
22
23
 
24
+ class ReportDataSourceService {
25
+ http;
26
+ constructor(http) {
27
+ this.http = http;
28
+ }
29
+ getReportDataSources(baseUrl) {
30
+ return this.http.get(`${baseUrl}/api/report/engine/data/source`);
31
+ }
32
+ registerDataSource(baseUrl, request) {
33
+ return this.http.post(`${baseUrl}/api/report/engine/data/source`, request);
34
+ }
35
+ updateDataSource(baseUrl, request) {
36
+ return this.http.put(`${baseUrl}/api/report/engine/data/source`, request);
37
+ }
38
+ deleteDataSource(baseUrl, reportDataSourceId) {
39
+ return this.http.delete(`${baseUrl}/api/report/engine/data/source/${reportDataSourceId}`);
40
+ }
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ReportDataSourceService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
42
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ReportDataSourceService, providedIn: 'root' });
43
+ }
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ReportDataSourceService, decorators: [{
45
+ type: Injectable,
46
+ args: [{
47
+ providedIn: 'root'
48
+ }]
49
+ }], ctorParameters: () => [{ type: i1.HttpClient }] });
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
+
23
81
  /*
24
82
  * Public API Surface of quankee-framework-report
25
83
  */
@@ -28,5 +86,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
28
86
  * Generated bundle index. Do not edit.
29
87
  */
30
88
 
31
- export { ReportModuleService };
89
+ export { ReportDataSourceService, ReportModuleService, ReportTemplateService };
32
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/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","/*\n * Public API Surface of quankee-framework-report\n */\n\n\nexport * from './lib/core/module/report-module';\n\nexport * from './lib/core/module/report-module.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;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACRD;;AAEG;;ACFH;;AAEG;;;;"}
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,CAA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AC,QAAQ,EAAE,MAAM,CAAC;AACxC,QAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;QAEnF,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAmB,CAAA,EAAG,OAAO,CAAA,0CAAA,CAA4C,EAAC,QAAQ,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC;;wGArBnI,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,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,6 @@
1
+ import { ReportDataSource } from './report-data-source';
2
+ import { Language } from 'quankee-framework-language';
3
+ export interface ReportDataSourceRequest {
4
+ reportDataSource: ReportDataSource;
5
+ language: Language;
6
+ }
@@ -0,0 +1,8 @@
1
+ export interface ReportDataSource {
2
+ reportDataSourceId: string;
3
+ name: string;
4
+ url: string;
5
+ driverClassName: string;
6
+ username: string;
7
+ password: string;
8
+ }
@@ -0,0 +1,16 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { Response } from 'quankee-framework-response';
4
+ import { ReportDataSource } from './report-data-source';
5
+ import { ReportDataSourceRequest } from './report-data-source-request';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ReportDataSourceService {
8
+ private readonly http;
9
+ constructor(http: HttpClient);
10
+ getReportDataSources(baseUrl: string): Observable<Response<ReportDataSource[]>>;
11
+ registerDataSource(baseUrl: string, request: ReportDataSourceRequest): Observable<Response<string>>;
12
+ updateDataSource(baseUrl: string, request: ReportDataSourceRequest): Observable<Response<string>>;
13
+ deleteDataSource(baseUrl: string, reportDataSourceId: string): Observable<Response<string>>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReportDataSourceService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<ReportDataSourceService>;
16
+ }
@@ -0,0 +1,8 @@
1
+ import { ReportDataSource } from '../data/source/report-data-source';
2
+ export interface ReportTemplate {
3
+ reportTemplateId: string;
4
+ reportDataSource: ReportDataSource;
5
+ name: string;
6
+ module: string;
7
+ fileContent: string;
8
+ }
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quankee-framework-report",
3
3
  "description": "Quankee Framework Report Lib",
4
- "version": "1.5.2",
4
+ "version": "1.6.0",
5
5
  "author": {
6
6
  "email": "info@quankee.co.mz",
7
7
  "name": "Quankee Software, Lda",
package/public-api.d.ts CHANGED
@@ -1,2 +1,7 @@
1
1
  export * from './lib/core/module/report-module';
2
+ export * from './lib/core/data/source/report-data-source';
3
+ export * from './lib/core/data/source/report-data-source-request';
4
+ export * from './lib/core/template/report-template';
2
5
  export * from './lib/core/module/report-module.service';
6
+ export * from './lib/core/data/source/report-data-source.service';
7
+ export * from './lib/core/template/report-template.service';