@hestia-earth/ui-components 0.28.7 → 0.28.8

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.
@@ -0,0 +1,48 @@
1
+ import 'd3-transition';
2
+ import { ChartNodeType, IChartData, ITermMapping } from './hierarchy-chart.model';
3
+ import * as i0 from "@angular/core";
4
+ export declare class HierarchyChartComponent {
5
+ private readonly ngZone;
6
+ protected readonly faExternalLinkAlt: import("@fortawesome/fontawesome-common-types").IconDefinition;
7
+ private readonly chartRef;
8
+ private readonly tooltipOperator;
9
+ protected readonly data: import("@angular/core").InputSignal<IChartData[]>;
10
+ protected readonly terms: import("@angular/core").InputSignal<ITermMapping>;
11
+ protected readonly chartError: import("@angular/core").OutputEmitterRef<Error>;
12
+ protected readonly nodeColours: {
13
+ endpoint: string;
14
+ midpoint: string;
15
+ emission: string;
16
+ input: string;
17
+ operation: string;
18
+ };
19
+ private readonly includedTypes;
20
+ protected readonly legend: import("@angular/core").Signal<{
21
+ type: ChartNodeType;
22
+ text: string;
23
+ mobileText: string;
24
+ }[]>;
25
+ private readonly totalsPerIndicator;
26
+ private readonly indicators;
27
+ private readonly indicatorArray;
28
+ private readonly linkedIndicators;
29
+ private readonly nonLCAIndicators;
30
+ private otherEndpoint;
31
+ private readonly endpoints;
32
+ private readonly chartChildren;
33
+ private root?;
34
+ private node;
35
+ private link;
36
+ private svg;
37
+ private yMin;
38
+ private yTotal;
39
+ constructor();
40
+ private init;
41
+ protected initChart(): void;
42
+ private renderChart;
43
+ private updateChart;
44
+ private handleGroupButtonClick;
45
+ private handleNodeClick;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<HierarchyChartComponent, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<HierarchyChartComponent, "he-hierarchy-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "terms": { "alias": "terms"; "required": false; "isSignal": true; }; }, { "chartError": "chartError"; }, never, never, true, never>;
48
+ }
@@ -0,0 +1,70 @@
1
+ import { ITermJSONLD, Term } from '@hestia-earth/schema';
2
+ import { ISearchResultExtended } from '../../search';
3
+ export declare enum ChartNodeType {
4
+ midpoint = "midpoint",
5
+ emission = "emission",
6
+ endpoint = "endpoint",
7
+ input = "input",
8
+ operation = "operation",
9
+ root = "root"
10
+ }
11
+ export declare const nodeColours: {
12
+ endpoint: string;
13
+ midpoint: string;
14
+ emission: string;
15
+ input: string;
16
+ operation: string;
17
+ };
18
+ export declare const legend: {
19
+ type: ChartNodeType;
20
+ text: string;
21
+ mobileText: string;
22
+ }[];
23
+ export interface NodeDatum {
24
+ id?: string;
25
+ term?: string;
26
+ modelId?: string;
27
+ modelName?: string;
28
+ modelDocs?: string;
29
+ label: string;
30
+ type: ChartNodeType;
31
+ value: number | null;
32
+ weightedValue?: number | null;
33
+ fraction?: number;
34
+ children?: NodeDatum[];
35
+ group?: boolean;
36
+ showBar?: boolean;
37
+ units: string;
38
+ }
39
+ export interface IChartInputLog {
40
+ label: string;
41
+ units: string;
42
+ weightedValue: number;
43
+ value: number;
44
+ operations: {
45
+ weightedValue: number;
46
+ label: string;
47
+ units: string;
48
+ value: number;
49
+ }[];
50
+ }
51
+ export interface IChartData {
52
+ indicator: string;
53
+ contributor: string;
54
+ coefficient: number;
55
+ value: number;
56
+ weightedValue: number;
57
+ modelId: string;
58
+ inputs?: IChartInputLog[];
59
+ }
60
+ export type term = ITermJSONLD & ISearchResultExtended & {
61
+ docs?: string;
62
+ };
63
+ export interface ITermMapping {
64
+ [id: string]: term;
65
+ }
66
+ export declare const getUnitsAndLabel: (term: Partial<ITermJSONLD | Term>, fallbackLabel?: string) => {
67
+ label: any;
68
+ term: any;
69
+ units: string;
70
+ };
@@ -56,7 +56,8 @@ export declare class DrawerContainerComponent {
56
56
  */
57
57
  protected readonly reduceAnimation: import("@angular/core").Signal<"reduced" | "full">;
58
58
  private readonly _contentContainerPadding$;
59
- private storageKey;
59
+ private readonly storageKey;
60
+ private readonly storedWith;
60
61
  constructor();
61
62
  startResizing(event: MouseEvent): void;
62
63
  stopResizing(): void;
package/common/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './delta-utils';
7
7
  export * from './logs-utils';
8
8
  export * from './maps-utils';
9
9
  export * from './node-utils';
10
+ export * from './local-storage-utils';
10
11
  export * from './pluralize';
11
12
  export * from './rxjs-utils';
12
13
  export * from './thousands';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Signal utility to patch local storage.
3
+ */
4
+ export declare const localStorageSignal: <T>(initialValue: T, localStorageKey: string) => import("@angular/core").WritableSignal<T>;
@@ -13,5 +13,5 @@ export interface ILine {
13
13
  }
14
14
  export declare const parseData: (data: any) => ILine;
15
15
  export declare const parseLines: (text: any) => ILine[];
16
- export declare const parseMessage: (message: string) => {};
16
+ export declare const parseMessage: (message?: string) => {};
17
17
  export declare const logToCsv: (lines: ILine[]) => string;
@@ -102,7 +102,7 @@ export declare class HeEngineService {
102
102
  constructor();
103
103
  private init;
104
104
  private loadModels;
105
- private get models$();
105
+ get models$(): Observable<IModel[]>;
106
106
  allModels$(includeEcoinvent?: boolean): Observable<IModel[]>;
107
107
  model$(model: Partial<IModel>): Observable<IModel>;
108
108
  nodeModel$(node: Partial<blankNodesType>, key?: string): Observable<IModel>;