alimetry-report 0.0.1 → 1.1.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.
- package/README.md +8 -3
- package/esm2020/lib/report.component.mjs +4 -4
- package/fesm2015/alimetry-report.mjs +4 -4
- package/fesm2015/alimetry-report.mjs.map +1 -1
- package/fesm2020/alimetry-report.mjs +3 -3
- package/fesm2020/alimetry-report.mjs.map +1 -1
- package/lib/report.component.d.ts +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -6,9 +6,14 @@ Selector: `lib-report`
|
|
|
6
6
|
|
|
7
7
|
### Config Object
|
|
8
8
|
|
|
9
|
+
```js
|
|
9
10
|
{
|
|
10
|
-
owners:
|
|
11
|
-
deviceDataModelId
|
|
11
|
+
owners: string[], // user ids
|
|
12
|
+
deviceDataModelId: string
|
|
12
13
|
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
`alimetry-shared` library as a peer dependency
|
|
13
19
|
|
|
14
|
-
[NOTE:] the widget relies on the user object containing the `userId` field.
|
|
@@ -3,7 +3,7 @@ import { map, of } from 'rxjs';
|
|
|
3
3
|
import { switchMap } from 'rxjs';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "@angular/common/http";
|
|
6
|
-
import * as i2 from "shared";
|
|
6
|
+
import * as i2 from "alimetry-shared";
|
|
7
7
|
import * as i3 from "@angular/common";
|
|
8
8
|
export class ReportComponent {
|
|
9
9
|
constructor(http, shared) {
|
|
@@ -12,7 +12,7 @@ export class ReportComponent {
|
|
|
12
12
|
this.status = 'loading';
|
|
13
13
|
}
|
|
14
14
|
getReportUrl() {
|
|
15
|
-
return this.shared.getDeviceData(this.config.deviceDataModelId, this.config.owners[0]
|
|
15
|
+
return this.shared.getDeviceData(this.config.deviceDataModelId, this.config.owners[0], ['PdfReport']).pipe(map(res => res?.data?.['PdfReport']?.link || null));
|
|
16
16
|
}
|
|
17
17
|
getReportDataUrl(link) {
|
|
18
18
|
return this.http.get(link, { responseType: 'blob' }).pipe(map(res => {
|
|
@@ -41,7 +41,7 @@ export class ReportComponent {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
ngOnInit() {
|
|
44
|
-
if (!this.config?.owners?.[0]
|
|
44
|
+
if (!this.config?.owners?.[0]) {
|
|
45
45
|
this.status = 'nouser';
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -105,4 +105,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
105
105
|
type: ViewChild,
|
|
106
106
|
args: ['renderFrame', { static: false }]
|
|
107
107
|
}] } });
|
|
108
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
108
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwb3J0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3JlcG9ydC9zcmMvbGliL3JlcG9ydC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBYyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXhFLE9BQU8sRUFBRSxHQUFHLEVBQUUsRUFBRSxFQUFnQixNQUFNLE1BQU0sQ0FBQztBQUU3QyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sTUFBTSxDQUFDOzs7OztBQStCakMsTUFBTSxPQUFPLGVBQWU7SUFVMUIsWUFBb0IsSUFBZ0IsRUFBVSxNQUFxQjtRQUEvQyxTQUFJLEdBQUosSUFBSSxDQUFZO1FBQVUsV0FBTSxHQUFOLE1BQU0sQ0FBZTtRQUZuRSxXQUFNLEdBQXlELFNBQVMsQ0FBQztJQUVGLENBQUM7SUFFaEU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2JqZWN0VVJMKHRoaXMucmVwb3J0RGF0YVVybCk7XG4gICAgaWYgKHRoaXMuc3Vic2NyaXB0aW9uKSB0aGlzLnN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpO1xuICB9XG59XG4iXX0=
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, Component, Input, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { map, switchMap, of } from 'rxjs';
|
|
4
4
|
import * as i1 from '@angular/common/http';
|
|
5
|
-
import * as i2 from 'shared';
|
|
5
|
+
import * as i2 from 'alimetry-shared';
|
|
6
6
|
import * as i3 from '@angular/common';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ class ReportComponent {
|
|
|
25
25
|
this.status = 'loading';
|
|
26
26
|
}
|
|
27
27
|
getReportUrl() {
|
|
28
|
-
return this.shared.getDeviceData(this.config.deviceDataModelId, this.config.owners[0]
|
|
28
|
+
return this.shared.getDeviceData(this.config.deviceDataModelId, this.config.owners[0], ['PdfReport']).pipe(map(res => { var _a, _b; return ((_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a['PdfReport']) === null || _b === void 0 ? void 0 : _b.link) || null; }));
|
|
29
29
|
}
|
|
30
30
|
getReportDataUrl(link) {
|
|
31
31
|
return this.http.get(link, { responseType: 'blob' }).pipe(map(res => {
|
|
@@ -54,8 +54,8 @@ class ReportComponent {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
ngOnInit() {
|
|
57
|
-
var _a, _b
|
|
58
|
-
if (!((
|
|
57
|
+
var _a, _b;
|
|
58
|
+
if (!((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.owners) === null || _b === void 0 ? void 0 : _b[0])) {
|
|
59
59
|
this.status = 'nouser';
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alimetry-report.mjs","sources":["../../../projects/report/src/lib/report.service.ts","../../../projects/report/src/lib/report.component.ts","../../../projects/report/src/lib/report.module.ts","../../../projects/report/src/public-api.ts","../../../projects/report/src/alimetry-report.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportService {\n\n constructor() { }\n}\n","import { Component, ElementRef, Input, ViewChild } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { map, of, Subscription } from 'rxjs';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs';\nimport { OnDestroy } from '@angular/core';\nimport { Config, SharedService } from 'shared';\n\n@Component({\n selector: 'lib-report', template: `\n <div class=\"wrapper\">\n <div class=\"status\" *ngIf=\"status === 'empty'\">\n This user doesn't have a report.\n </div>\n <div class=\"status\" *ngIf=\"status === 'nouser'\">\n There is no user specified as the data owner.\n </div>\n <div class=\"status\" *ngIf=\"status === 'loading'\">\n Loading report for user...\n </div>\n <div class=\"status\" *ngIf=\"status === 'error'\">\n An error occured while trying to get the report.\n </div>\n <div\n class=\"aspect-ratio-container\"\n [ngStyle]=\"{ 'display': status === 'success' ? 'block' : 'none' }\"\n >\n <iframe #renderFrame title=\"PDF Report\"></iframe>\n </div>\n </div>\n `,\n styleUrls: [\n \"./report.component.css\"\n ]\n})\nexport class ReportComponent implements OnDestroy {\n @Input() config!: Config;\n\n @ViewChild('renderFrame', { static: false })\n renderFrame: ElementRef<HTMLIFrameElement> | undefined;\n\n reportDataUrl: string | undefined;\n subscription: Subscription;\n status: 'error' | 'loading' | 'success' | 'empty' | 'nouser' = 'loading';\n\n constructor(private http: HttpClient, private shared: SharedService) { }\n\n private getReportUrl(): Observable<string | null> {\n return this.shared.getDeviceData(\n this.config.deviceDataModelId,\n this.config.owners[0]
|
|
1
|
+
{"version":3,"file":"alimetry-report.mjs","sources":["../../../projects/report/src/lib/report.service.ts","../../../projects/report/src/lib/report.component.ts","../../../projects/report/src/lib/report.module.ts","../../../projects/report/src/public-api.ts","../../../projects/report/src/alimetry-report.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportService {\n\n constructor() { }\n}\n","import { Component, ElementRef, Input, ViewChild } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { map, of, Subscription } from 'rxjs';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs';\nimport { OnDestroy } from '@angular/core';\nimport { Config, SharedService } from 'alimetry-shared';\n\n@Component({\n selector: 'lib-report', template: `\n <div class=\"wrapper\">\n <div class=\"status\" *ngIf=\"status === 'empty'\">\n This user doesn't have a report.\n </div>\n <div class=\"status\" *ngIf=\"status === 'nouser'\">\n There is no user specified as the data owner.\n </div>\n <div class=\"status\" *ngIf=\"status === 'loading'\">\n Loading report for user...\n </div>\n <div class=\"status\" *ngIf=\"status === 'error'\">\n An error occured while trying to get the report.\n </div>\n <div\n class=\"aspect-ratio-container\"\n [ngStyle]=\"{ 'display': status === 'success' ? 'block' : 'none' }\"\n >\n <iframe #renderFrame title=\"PDF Report\"></iframe>\n </div>\n </div>\n `,\n styleUrls: [\n \"./report.component.css\"\n ]\n})\nexport class ReportComponent implements OnDestroy {\n @Input() config!: Config;\n\n @ViewChild('renderFrame', { static: false })\n renderFrame: ElementRef<HTMLIFrameElement> | undefined;\n\n reportDataUrl: string | undefined;\n subscription: Subscription;\n status: 'error' | 'loading' | 'success' | 'empty' | 'nouser' = 'loading';\n\n constructor(private http: HttpClient, private shared: SharedService) { }\n\n private getReportUrl(): Observable<string | null> {\n return this.shared.getDeviceData(\n this.config.deviceDataModelId,\n this.config.owners[0],\n ['PdfReport']\n ).pipe(\n map(res => res?.data?.['PdfReport']?.link || null)\n );\n }\n\n private getReportDataUrl(link: string): Observable<string> {\n return this.http.get(link, { responseType: 'blob' }).pipe(\n map(res => {\n const pdfBlob = new Blob([res], { type: 'application/pdf' });\n return URL.createObjectURL(pdfBlob);\n })\n );\n }\n\n ngAfterViewInit() {\n if (this.status === 'nouser') return;\n\n this.subscription = this.getReportUrl().pipe(\n switchMap(link => link ? this.getReportDataUrl(link) : of(null)),\n ).subscribe({\n next: (url) => {\n this.status = url ? \"success\" : \"empty\";\n this.renderFrame!.nativeElement.src = url;\n this.reportDataUrl = url\n },\n error: (err) => {\n if (err.error == \"ItemNotFoundException: none-found\") {\n this.status = \"empty\";\n } else {\n console.error(err);\n this.status = \"error\";\n }\n },\n });\n }\n\n ngOnInit() {\n if (!this.config?.owners?.[0]) {\n this.status = 'nouser';\n }\n }\n\n ngOnDestroy() {\n if (this.reportDataUrl) URL.revokeObjectURL(this.reportDataUrl);\n if (this.subscription) this.subscription.unsubscribe();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReportComponent } from './report.component';\n\n\n\n@NgModule({\n declarations: [\n ReportComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n ReportComponent\n ]\n})\nexport class ReportModule { }\n","/*\n * Public API Surface of report\n */\n\nexport * from './lib/report.service';\nexport * from './lib/report.component';\nexport * from './lib/report.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAKa,aAAa,CAAA;AAExB,IAAA,WAAA,GAAA,GAAiB;;2GAFN,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA;4FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;MC+BY,eAAe,CAA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|
import { Injectable, Component, Input, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { map, switchMap, of } from 'rxjs';
|
|
4
4
|
import * as i1 from '@angular/common/http';
|
|
5
|
-
import * as i2 from 'shared';
|
|
5
|
+
import * as i2 from 'alimetry-shared';
|
|
6
6
|
import * as i3 from '@angular/common';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ class ReportComponent {
|
|
|
25
25
|
this.status = 'loading';
|
|
26
26
|
}
|
|
27
27
|
getReportUrl() {
|
|
28
|
-
return this.shared.getDeviceData(this.config.deviceDataModelId, this.config.owners[0]
|
|
28
|
+
return this.shared.getDeviceData(this.config.deviceDataModelId, this.config.owners[0], ['PdfReport']).pipe(map(res => res?.data?.['PdfReport']?.link || null));
|
|
29
29
|
}
|
|
30
30
|
getReportDataUrl(link) {
|
|
31
31
|
return this.http.get(link, { responseType: 'blob' }).pipe(map(res => {
|
|
@@ -54,7 +54,7 @@ class ReportComponent {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
ngOnInit() {
|
|
57
|
-
if (!this.config?.owners?.[0]
|
|
57
|
+
if (!this.config?.owners?.[0]) {
|
|
58
58
|
this.status = 'nouser';
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alimetry-report.mjs","sources":["../../../projects/report/src/lib/report.service.ts","../../../projects/report/src/lib/report.component.ts","../../../projects/report/src/lib/report.module.ts","../../../projects/report/src/public-api.ts","../../../projects/report/src/alimetry-report.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportService {\n\n constructor() { }\n}\n","import { Component, ElementRef, Input, ViewChild } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { map, of, Subscription } from 'rxjs';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs';\nimport { OnDestroy } from '@angular/core';\nimport { Config, SharedService } from 'shared';\n\n@Component({\n selector: 'lib-report', template: `\n <div class=\"wrapper\">\n <div class=\"status\" *ngIf=\"status === 'empty'\">\n This user doesn't have a report.\n </div>\n <div class=\"status\" *ngIf=\"status === 'nouser'\">\n There is no user specified as the data owner.\n </div>\n <div class=\"status\" *ngIf=\"status === 'loading'\">\n Loading report for user...\n </div>\n <div class=\"status\" *ngIf=\"status === 'error'\">\n An error occured while trying to get the report.\n </div>\n <div\n class=\"aspect-ratio-container\"\n [ngStyle]=\"{ 'display': status === 'success' ? 'block' : 'none' }\"\n >\n <iframe #renderFrame title=\"PDF Report\"></iframe>\n </div>\n </div>\n `,\n styleUrls: [\n \"./report.component.css\"\n ]\n})\nexport class ReportComponent implements OnDestroy {\n @Input() config!: Config;\n\n @ViewChild('renderFrame', { static: false })\n renderFrame: ElementRef<HTMLIFrameElement> | undefined;\n\n reportDataUrl: string | undefined;\n subscription: Subscription;\n status: 'error' | 'loading' | 'success' | 'empty' | 'nouser' = 'loading';\n\n constructor(private http: HttpClient, private shared: SharedService) { }\n\n private getReportUrl(): Observable<string | null> {\n return this.shared.getDeviceData(\n this.config.deviceDataModelId,\n this.config.owners[0]
|
|
1
|
+
{"version":3,"file":"alimetry-report.mjs","sources":["../../../projects/report/src/lib/report.service.ts","../../../projects/report/src/lib/report.component.ts","../../../projects/report/src/lib/report.module.ts","../../../projects/report/src/public-api.ts","../../../projects/report/src/alimetry-report.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ReportService {\n\n constructor() { }\n}\n","import { Component, ElementRef, Input, ViewChild } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { map, of, Subscription } from 'rxjs';\nimport { Observable } from 'rxjs';\nimport { switchMap } from 'rxjs';\nimport { OnDestroy } from '@angular/core';\nimport { Config, SharedService } from 'alimetry-shared';\n\n@Component({\n selector: 'lib-report', template: `\n <div class=\"wrapper\">\n <div class=\"status\" *ngIf=\"status === 'empty'\">\n This user doesn't have a report.\n </div>\n <div class=\"status\" *ngIf=\"status === 'nouser'\">\n There is no user specified as the data owner.\n </div>\n <div class=\"status\" *ngIf=\"status === 'loading'\">\n Loading report for user...\n </div>\n <div class=\"status\" *ngIf=\"status === 'error'\">\n An error occured while trying to get the report.\n </div>\n <div\n class=\"aspect-ratio-container\"\n [ngStyle]=\"{ 'display': status === 'success' ? 'block' : 'none' }\"\n >\n <iframe #renderFrame title=\"PDF Report\"></iframe>\n </div>\n </div>\n `,\n styleUrls: [\n \"./report.component.css\"\n ]\n})\nexport class ReportComponent implements OnDestroy {\n @Input() config!: Config;\n\n @ViewChild('renderFrame', { static: false })\n renderFrame: ElementRef<HTMLIFrameElement> | undefined;\n\n reportDataUrl: string | undefined;\n subscription: Subscription;\n status: 'error' | 'loading' | 'success' | 'empty' | 'nouser' = 'loading';\n\n constructor(private http: HttpClient, private shared: SharedService) { }\n\n private getReportUrl(): Observable<string | null> {\n return this.shared.getDeviceData(\n this.config.deviceDataModelId,\n this.config.owners[0],\n ['PdfReport']\n ).pipe(\n map(res => res?.data?.['PdfReport']?.link || null)\n );\n }\n\n private getReportDataUrl(link: string): Observable<string> {\n return this.http.get(link, { responseType: 'blob' }).pipe(\n map(res => {\n const pdfBlob = new Blob([res], { type: 'application/pdf' });\n return URL.createObjectURL(pdfBlob);\n })\n );\n }\n\n ngAfterViewInit() {\n if (this.status === 'nouser') return;\n\n this.subscription = this.getReportUrl().pipe(\n switchMap(link => link ? this.getReportDataUrl(link) : of(null)),\n ).subscribe({\n next: (url) => {\n this.status = url ? \"success\" : \"empty\";\n this.renderFrame!.nativeElement.src = url;\n this.reportDataUrl = url\n },\n error: (err) => {\n if (err.error == \"ItemNotFoundException: none-found\") {\n this.status = \"empty\";\n } else {\n console.error(err);\n this.status = \"error\";\n }\n },\n });\n }\n\n ngOnInit() {\n if (!this.config?.owners?.[0]) {\n this.status = 'nouser';\n }\n }\n\n ngOnDestroy() {\n if (this.reportDataUrl) URL.revokeObjectURL(this.reportDataUrl);\n if (this.subscription) this.subscription.unsubscribe();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReportComponent } from './report.component';\n\n\n\n@NgModule({\n declarations: [\n ReportComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n ReportComponent\n ]\n})\nexport class ReportModule { }\n","/*\n * Public API Surface of report\n */\n\nexport * from './lib/report.service';\nexport * from './lib/report.component';\nexport * from './lib/report.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAKa,aAAa,CAAA;AAExB,IAAA,WAAA,GAAA,GAAiB;;2GAFN,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA;4FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MC+BY,eAAe,CAAA;IAU1B,WAAoB,CAAA,IAAgB,EAAU,MAAqB,EAAA;QAA/C,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAAU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAe;QAFnE,IAAM,CAAA,MAAA,GAAyD,SAAS,CAAC;KAED;IAEhE,YAAY,GAAA;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAC9B,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAC7B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EACrB,CAAC,WAAW,CAAC,CACd,CAAC,IAA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FAMH,YAAY,EAAA,UAAA,EAAA,CAAA;kBAXxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,eAAe;AAChB,qBAAA;AACF,iBAAA,CAAA;;;AChBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -2,7 +2,7 @@ import { ElementRef } from '@angular/core';
|
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
4
|
import { OnDestroy } from '@angular/core';
|
|
5
|
-
import { Config, SharedService } from 'shared';
|
|
5
|
+
import { Config, SharedService } from 'alimetry-shared';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class ReportComponent implements OnDestroy {
|
|
8
8
|
private http;
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alimetry-report",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^15.2.0",
|
|
6
|
-
"@angular/core": "^15.2.0"
|
|
6
|
+
"@angular/core": "^15.2.0",
|
|
7
|
+
"alimetry-shared": "^1.0.0"
|
|
7
8
|
},
|
|
8
9
|
"dependencies": {
|
|
9
10
|
"tslib": "^2.3.0"
|