@hestia-earth/ui-components 0.9.4 → 0.9.6
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/common/d3-utils.d.ts +11 -0
- package/common/index.d.ts +1 -0
- package/engine/aggregation-engine.service.d.ts +1 -23
- package/esm2020/common/compound.mjs +15 -6
- package/esm2020/common/d3-utils.mjs +46 -0
- package/esm2020/common/index.mjs +2 -1
- package/esm2020/engine/aggregation-engine.service.mjs +2 -28
- package/esm2020/files/files-form.model.mjs +2 -2
- package/esm2020/impact-assessments/impact-assessments-graph/impact-assessments-graph.component.mjs +845 -0
- package/esm2020/impact-assessments/impact-assessments.module.mjs +7 -3
- package/esm2020/impact-assessments/index.mjs +2 -1
- package/fesm2015/hestia-earth-ui-components.mjs +859 -37
- package/fesm2015/hestia-earth-ui-components.mjs.map +1 -1
- package/fesm2020/hestia-earth-ui-components.mjs +893 -35
- package/fesm2020/hestia-earth-ui-components.mjs.map +1 -1
- package/impact-assessments/impact-assessments-graph/impact-assessments-graph.component.d.ts +73 -0
- package/impact-assessments/impact-assessments.module.d.ts +11 -10
- package/impact-assessments/index.d.ts +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { NgZone, OnInit, AfterViewInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { IImpactAssessmentJSONLD, ITermJSONLD } from '@hestia-earth/schema';
|
|
3
|
+
import { HeEngineService } from '../../engine/engine.service';
|
|
4
|
+
import { HeNodeService } from '../../node/node.service';
|
|
5
|
+
import { HeSearchService } from '../../search/search.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
declare enum ChartNodeType {
|
|
8
|
+
midpoint = "midpoint",
|
|
9
|
+
emission = "emission",
|
|
10
|
+
endpoint = "endpoint",
|
|
11
|
+
input = "input",
|
|
12
|
+
operation = "operation",
|
|
13
|
+
root = "root"
|
|
14
|
+
}
|
|
15
|
+
export declare class ImpactAssessmentsGraphComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
16
|
+
private ngZone;
|
|
17
|
+
private searchService;
|
|
18
|
+
private nodeService;
|
|
19
|
+
private engineService;
|
|
20
|
+
private subscription;
|
|
21
|
+
private initialTerms;
|
|
22
|
+
private allTerms;
|
|
23
|
+
private root?;
|
|
24
|
+
private node;
|
|
25
|
+
private link;
|
|
26
|
+
private tooltip;
|
|
27
|
+
private svg;
|
|
28
|
+
private yMin;
|
|
29
|
+
private yTotal;
|
|
30
|
+
private logsAllModels;
|
|
31
|
+
private chartRef?;
|
|
32
|
+
private impactAssessments;
|
|
33
|
+
private dataState;
|
|
34
|
+
loading: boolean;
|
|
35
|
+
nodeColours: {
|
|
36
|
+
endpoint: string;
|
|
37
|
+
midpoint: string;
|
|
38
|
+
emission: string;
|
|
39
|
+
input: string;
|
|
40
|
+
operation: string;
|
|
41
|
+
};
|
|
42
|
+
noData: boolean;
|
|
43
|
+
error?: any;
|
|
44
|
+
warnings: string[];
|
|
45
|
+
showWarnings: boolean;
|
|
46
|
+
selectedImpactAssessmentId: string;
|
|
47
|
+
filteredImpactAssessments: IImpactAssessmentJSONLD[];
|
|
48
|
+
selectedModelId: string;
|
|
49
|
+
models: Partial<ITermJSONLD>[];
|
|
50
|
+
legend: {
|
|
51
|
+
type: ChartNodeType;
|
|
52
|
+
mobileText: string;
|
|
53
|
+
text: string;
|
|
54
|
+
}[];
|
|
55
|
+
constructor(ngZone: NgZone, searchService: HeSearchService, nodeService: HeNodeService, engineService: HeEngineService);
|
|
56
|
+
ngOnInit(): void;
|
|
57
|
+
ngOnDestroy(): void;
|
|
58
|
+
ngAfterViewInit(): void;
|
|
59
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
60
|
+
private initImpactAssessments;
|
|
61
|
+
private loadInitialTerms;
|
|
62
|
+
private loadLogTerms;
|
|
63
|
+
get isRecalculated(): boolean;
|
|
64
|
+
reloadChart(): void;
|
|
65
|
+
initChart(): void;
|
|
66
|
+
private renderChart;
|
|
67
|
+
private updateChart;
|
|
68
|
+
private handleGroupButtonClick;
|
|
69
|
+
private handleNodeClick;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImpactAssessmentsGraphComponent, never>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImpactAssessmentsGraphComponent, "he-impact-assessments-graph", never, { "impactAssessments": "impactAssessments"; "dataState": "dataState"; }, {}, never, never, false>;
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./impact-assessments-
|
|
3
|
-
import * as i2 from "./impact-assessments-
|
|
4
|
-
import * as i3 from "./impact-assessments-
|
|
5
|
-
import * as i4 from "./impact-assessments-
|
|
6
|
-
import * as i5 from "
|
|
7
|
-
import * as i6 from "@angular/
|
|
8
|
-
import * as i7 from "@angular/
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "../
|
|
2
|
+
import * as i1 from "./impact-assessments-graph/impact-assessments-graph.component";
|
|
3
|
+
import * as i2 from "./impact-assessments-products/impact-assessments-products.component";
|
|
4
|
+
import * as i3 from "./impact-assessments-indicators-chart/impact-assessments-indicators-chart.component";
|
|
5
|
+
import * as i4 from "./impact-assessments-products-logs/impact-assessments-products-logs.component";
|
|
6
|
+
import * as i5 from "./impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component";
|
|
7
|
+
import * as i6 from "@angular/common";
|
|
8
|
+
import * as i7 from "@angular/router";
|
|
9
|
+
import * as i8 from "@angular/forms";
|
|
10
|
+
import * as i9 from "../common/common.module";
|
|
11
|
+
import * as i10 from "../node/node.module";
|
|
11
12
|
export declare class HeImpactAssessmentsModule {
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<HeImpactAssessmentsModule, never>;
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<HeImpactAssessmentsModule, [typeof i1.
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HeImpactAssessmentsModule, [typeof i1.ImpactAssessmentsGraphComponent, typeof i2.ImpactAssessmentsProductsComponent, typeof i3.ImpactAssessmentsIndicatorsChartComponent, typeof i4.ImpactAssessmentsProductsLogsComponent, typeof i5.ImpactAssessmentsIndicatorBreakdownChartComponent], [typeof i6.CommonModule, typeof i7.RouterModule, typeof i8.FormsModule, typeof i8.ReactiveFormsModule, typeof i9.HeCommonModule, typeof i10.HeNodeModule], [typeof i1.ImpactAssessmentsGraphComponent, typeof i2.ImpactAssessmentsProductsComponent, typeof i3.ImpactAssessmentsIndicatorsChartComponent, typeof i4.ImpactAssessmentsProductsLogsComponent, typeof i5.ImpactAssessmentsIndicatorBreakdownChartComponent]>;
|
|
14
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<HeImpactAssessmentsModule>;
|
|
15
16
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './impact-assessments.model';
|
|
2
2
|
export * from './impact-assessments.module';
|
|
3
|
+
export { ImpactAssessmentsGraphComponent } from './impact-assessments-graph/impact-assessments-graph.component';
|
|
3
4
|
export { ImpactAssessmentsProductsComponent } from './impact-assessments-products/impact-assessments-products.component';
|
|
4
5
|
export { ImpactAssessmentsIndicatorBreakdownChartComponent } from './impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component';
|
|
5
6
|
export { ImpactAssessmentsIndicatorsChartComponent } from './impact-assessments-indicators-chart/impact-assessments-indicators-chart.component';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/ui-components",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "Hestia reusable components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"lodash.orderby": "^4.6.0",
|
|
39
39
|
"lodash.set": "^4.3.2",
|
|
40
40
|
"lodash.uniqby": "^4.7.0",
|
|
41
|
+
"moment": "^2.29.4",
|
|
41
42
|
"random-material-color": "^1.0.5",
|
|
42
43
|
"semver": "^7.3.8",
|
|
43
44
|
"ts-clipboard": "^1.0.17"
|