@hestia-earth/ui-components 0.0.26 → 0.0.29
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/bundles/hestia-earth-ui-components.umd.js +455 -236
- package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
- package/common/blank-node-state/blank-node-state.component.d.ts +1 -10
- package/common/common.module.d.ts +8 -7
- package/common/index.d.ts +1 -0
- package/common/is-array.pipe.d.ts +7 -0
- package/common/node-utils.d.ts +51 -0
- package/common/utils.d.ts +0 -41
- package/cycles/cycles-activity/cycles-activity.component.d.ts +1 -1
- package/cycles/cycles-emissions/cycles-emissions.component.d.ts +1 -1
- package/cycles/cycles-emissions-chart/cycles-emissions-chart.component.d.ts +1 -1
- package/cycles/cycles-practices/cycles-practices.component.d.ts +1 -1
- package/engine/engine-requirements-form/engine-requirements-form.component.d.ts +26 -0
- package/engine/engine.module.d.ts +6 -4
- package/engine/engine.service.d.ts +24 -5
- package/engine/index.d.ts +1 -0
- package/esm2015/common/blank-node-state/blank-node-state.component.js +12 -14
- package/esm2015/common/common.module.js +8 -4
- package/esm2015/common/index.js +2 -1
- package/esm2015/common/is-array.pipe.js +16 -0
- package/esm2015/common/node-utils.js +80 -0
- package/esm2015/common/utils.js +2 -62
- package/esm2015/cycles/cycles-activity/cycles-activity.component.js +4 -3
- package/esm2015/cycles/cycles-activity-logs/cycles-activity-logs.component.js +3 -3
- package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +4 -3
- package/esm2015/cycles/cycles-emissions-chart/cycles-emissions-chart.component.js +3 -2
- package/esm2015/cycles/cycles-practices/cycles-practices.component.js +4 -3
- package/esm2015/cycles/cycles-result/cycles-result.component.js +3 -2
- package/esm2015/engine/engine-requirements-form/engine-requirements-form.component.js +75 -0
- package/esm2015/engine/engine.module.js +11 -6
- package/esm2015/engine/engine.service.js +22 -7
- package/esm2015/engine/index.js +2 -1
- package/esm2015/files/files-form/files-form.component.js +10 -3
- package/esm2015/impact-assessments/impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component.js +15 -8
- package/esm2015/impact-assessments/impact-assessments-indicators-chart/impact-assessments-indicators-chart.component.js +3 -2
- package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +4 -3
- package/esm2015/node/node-logs-models/node-logs-models.component.js +141 -61
- package/esm2015/node/node-value-details/node-value-details.component.js +3 -2
- package/esm2015/node/node.service.js +1 -1
- package/esm2015/sites/sites-measurements/sites-measurements.component.js +4 -3
- package/esm2015/sites/sites.model.js +1 -1
- package/fesm2015/hestia-earth-ui-components.js +371 -166
- package/fesm2015/hestia-earth-ui-components.js.map +1 -1
- package/impact-assessments/impact-assessments-indicators-chart/impact-assessments-indicators-chart.component.d.ts +1 -1
- package/impact-assessments/impact-assessments-products/impact-assessments-products.component.d.ts +1 -1
- package/node/node-logs-models/node-logs-models.component.d.ts +26 -17
- package/node/node-value-details/node-value-details.component.d.ts +1 -1
- package/node/node.service.d.ts +16 -15
- package/package.json +1 -1
- package/sites/sites-measurements/sites-measurements.component.d.ts +2 -2
- package/sites/sites.model.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Indicator, Term, TermTermType } from '@hestia-earth/schema';
|
|
3
|
-
import { IGroupedNodes } from '../../common/utils';
|
|
3
|
+
import { IGroupedNodes } from '../../common/node-utils';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ImpactAssessmentsIndicatorsChartComponent implements AfterViewInit, OnChanges {
|
|
6
6
|
private chartRef?;
|
package/impact-assessments/impact-assessments-products/impact-assessments-products.component.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { OnChanges, SimpleChanges } from '@angular/core';
|
|
|
2
2
|
import { DataState } from '@hestia-earth/api';
|
|
3
3
|
import { IImpactAssessmentJSONLD, Indicator, TermTermType, Term } from '@hestia-earth/schema';
|
|
4
4
|
import { HeNodeService } from '../../node/node.service';
|
|
5
|
-
import { IGroupedKeys } from '../../common/utils';
|
|
5
|
+
import { IGroupedKeys } from '../../common/node-utils';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
declare enum View {
|
|
8
8
|
table = "table",
|
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Emission, ITermJSONLD, Product, Input as HestiaInput } from '@hestia-earth/schema';
|
|
4
|
-
import { INodeTermLogs } from '../node.service';
|
|
3
|
+
import { Emission, ITermJSONLD, Product, Input as HestiaInput, Property } from '@hestia-earth/schema';
|
|
4
|
+
import { INodeTermLogs, INodeTermLog } from '../node.service';
|
|
5
5
|
import { HeEngineService } from '../../engine/engine.service';
|
|
6
6
|
import { HeSearchService } from '../../search/search.service';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
declare type
|
|
8
|
+
declare type blankNode = Emission | Product | HestiaInput | Property;
|
|
9
9
|
interface IBlankNodeLogSubValue {
|
|
10
|
-
key:
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
key: string;
|
|
11
|
+
originalValue: number | string | boolean;
|
|
12
|
+
recalculatedValue: number | string | boolean;
|
|
13
|
+
id?: any;
|
|
14
|
+
configModels?: string[];
|
|
13
15
|
}
|
|
14
16
|
interface IBlankNodeLog {
|
|
15
17
|
isOpen: boolean;
|
|
16
18
|
canOpen: boolean;
|
|
17
19
|
term: ITermJSONLD;
|
|
20
|
+
termId: string;
|
|
18
21
|
type?: string;
|
|
19
22
|
configModels: string[];
|
|
20
|
-
original:
|
|
21
|
-
|
|
23
|
+
original: blankNode[];
|
|
24
|
+
originalValue: number;
|
|
25
|
+
recalculated: blankNode[];
|
|
26
|
+
recalculatedValue: number;
|
|
22
27
|
isOriginal: boolean;
|
|
23
28
|
isRecalculated: boolean;
|
|
24
29
|
hasData: boolean;
|
|
25
30
|
logs?: INodeTermLogs;
|
|
26
|
-
keys:
|
|
31
|
+
keys: IBlankNodeLogSubValue[];
|
|
27
32
|
subValues: IBlankNodeLogSubValue[];
|
|
28
33
|
}
|
|
29
34
|
declare enum LogStatus {
|
|
@@ -46,7 +51,7 @@ export declare class NodeLogsModelsComponent implements OnInit {
|
|
|
46
51
|
*/
|
|
47
52
|
private nodeKey?;
|
|
48
53
|
logsUrl?: string;
|
|
49
|
-
originalValues:
|
|
54
|
+
originalValues: blankNode[];
|
|
50
55
|
private recalculatedValues;
|
|
51
56
|
private terms;
|
|
52
57
|
private logs?;
|
|
@@ -81,21 +86,25 @@ export declare class NodeLogsModelsComponent implements OnInit {
|
|
|
81
86
|
private fetchAllTerms;
|
|
82
87
|
private suggestByTerm;
|
|
83
88
|
trackByBlankNode(_index: number, node: IBlankNodeLog): string;
|
|
89
|
+
keyValue(blankNodes: blankNode[], key: string): any;
|
|
84
90
|
togglePopover(popover: any, context: any): any;
|
|
91
|
+
filterResults(): void;
|
|
92
|
+
/** Logs **/
|
|
93
|
+
private getSubvalueLogs;
|
|
94
|
+
getLogs(node: IBlankNodeLog, methodId: string, subValue?: IBlankNodeLogSubValue): any;
|
|
85
95
|
private isBackground;
|
|
86
96
|
private isRequired;
|
|
87
|
-
private shouldRun;
|
|
88
97
|
private isUserProvided;
|
|
89
98
|
validSubValue(node: IBlankNodeLog, index: number, subValue?: IBlankNodeLogSubValue): boolean;
|
|
90
99
|
getMethodIdAt(node: IBlankNodeLog, index: number, subValue?: IBlankNodeLogSubValue): string;
|
|
91
|
-
methodName(
|
|
92
|
-
hasLog(
|
|
93
|
-
hasLogDetails(node: IBlankNodeLog, methodId: string):
|
|
100
|
+
methodName(node: IBlankNodeLog, methodId: string, subValue?: IBlankNodeLogSubValue): any;
|
|
101
|
+
hasLog(log: INodeTermLog, withOrchestrator?: boolean): boolean;
|
|
102
|
+
hasLogDetails(node: IBlankNodeLog, methodId: string, subValue?: IBlankNodeLogSubValue): any;
|
|
103
|
+
logStatus(node: IBlankNodeLog, methodId: string, subValue?: IBlankNodeLogSubValue): LogStatus;
|
|
104
|
+
requirementKeys(requirements: {
|
|
94
105
|
[key: string]: any;
|
|
95
|
-
};
|
|
96
|
-
logStatus(node: IBlankNodeLog, methodId: string): LogStatus;
|
|
106
|
+
}): string[];
|
|
97
107
|
requirementColor(value: any): "danger" | "white";
|
|
98
|
-
filterResults(): void;
|
|
99
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<NodeLogsModelsComponent, never>;
|
|
100
109
|
static ɵcmp: i0.ɵɵComponentDeclaration<NodeLogsModelsComponent, "he-node-logs-models", never, { "nodeType": "nodeType"; "nodeKey": "nodeKey"; "logsUrl": "logsUrl"; "originalValues": "originalValues"; "recalculatedValues": "recalculatedValues"; "terms": "terms"; "logs": "logs"; "filteredType": "filteredType"; }, {}, never, never>;
|
|
101
110
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { NodeType } from '@hestia-earth/schema';
|
|
3
|
-
import { IGroupedNode } from '../../common/utils';
|
|
3
|
+
import { IGroupedNode } from '../../common/node-utils';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class NodeValueDetailsComponent<T> implements OnInit {
|
|
6
6
|
data?: IGroupedNode<T>;
|
package/node/node.service.d.ts
CHANGED
|
@@ -40,23 +40,24 @@ export interface INodeMissingLookupLog {
|
|
|
40
40
|
term?: string;
|
|
41
41
|
key?: string;
|
|
42
42
|
}
|
|
43
|
-
export interface
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
logs?: {
|
|
54
|
-
[key: string]: any;
|
|
55
|
-
};
|
|
43
|
+
export interface INodeTermLog {
|
|
44
|
+
model: string;
|
|
45
|
+
isKey: boolean;
|
|
46
|
+
shouldRun?: boolean;
|
|
47
|
+
shouldRunOrchestrator?: boolean;
|
|
48
|
+
missingLookups?: INodeMissingLookupLog[];
|
|
49
|
+
requirements?: {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
};
|
|
52
|
+
logs?: {
|
|
56
53
|
[key: string]: any;
|
|
57
|
-
input?: string | string[];
|
|
58
|
-
property?: string | string[];
|
|
59
54
|
};
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
input?: string | string[];
|
|
57
|
+
property?: string | string[];
|
|
58
|
+
}
|
|
59
|
+
export interface INodeTermLogs {
|
|
60
|
+
[modelKey: string]: INodeTermLog;
|
|
60
61
|
}
|
|
61
62
|
export interface INodeLogs {
|
|
62
63
|
[term: string]: INodeTermLogs;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DataState } from '@hestia-earth/api';
|
|
3
3
|
import { ISiteJSONLD, Measurement } from '@hestia-earth/schema';
|
|
4
|
-
import { IGroupedKeys } from '../../common/utils';
|
|
4
|
+
import { IGroupedKeys } from '../../common/node-utils';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
declare enum View {
|
|
7
7
|
table = "table",
|
|
@@ -18,7 +18,7 @@ export declare class SitesMeasurementsComponent implements OnChanges {
|
|
|
18
18
|
maxAreaSize: number;
|
|
19
19
|
siteTooBig: ({ area }: ISiteJSONLD) => boolean;
|
|
20
20
|
defaultLabel: (node?: any) => any;
|
|
21
|
-
measurementValue: ({ value, depthLower, depthUpper }: import("../../common/utils").IGroupedNode<Measurement>, termId: string) => number;
|
|
21
|
+
measurementValue: ({ value, depthLower, depthUpper }: import("../../common/node-utils").IGroupedNode<Measurement>, termId: string) => number;
|
|
22
22
|
measurements: IGroupedKeys<Measurement>[];
|
|
23
23
|
ngOnChanges(changes: SimpleChanges): void;
|
|
24
24
|
trackById(_index: number, item: ISiteJSONLD): string;
|
package/sites/sites.model.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NodeType, ISiteJSONLD, Measurement } from '@hestia-earth/schema';
|
|
2
|
-
import { IGroupedNode } from '../common/utils';
|
|
2
|
+
import { IGroupedNode } from '../common/node-utils';
|
|
3
3
|
export interface ISiteJSONLDExtended extends ISiteJSONLD {
|
|
4
4
|
related: {
|
|
5
5
|
[type in NodeType]?: string[];
|