@hestia-earth/ui-components 0.0.1

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.
Files changed (207) hide show
  1. package/README.md +24 -0
  2. package/auth/auth.service.d.ts +10 -0
  3. package/auth/public-api.d.ts +1 -0
  4. package/bibliographies/bibliographies-search-confirm/bibliographies-search-confirm.component.d.ts +40 -0
  5. package/bibliographies/bibliographies.module.d.ts +10 -0
  6. package/bibliographies/public-api.d.ts +2 -0
  7. package/bundles/hestia-earth-ui-components.umd.js +7570 -0
  8. package/bundles/hestia-earth-ui-components.umd.js.map +1 -0
  9. package/common/bind-once.directive.d.ts +10 -0
  10. package/common/blank-node-diffs/blank-node-diffs.component.d.ts +18 -0
  11. package/common/blank-node-state/blank-node-state.component.d.ts +36 -0
  12. package/common/blank-node-state-notice/blank-node-state-notice.component.d.ts +9 -0
  13. package/common/blank-node-value-delta/blank-node-value-delta.component.d.ts +13 -0
  14. package/common/click-outside.directive.d.ts +10 -0
  15. package/common/clipboard/clipboard.component.d.ts +16 -0
  16. package/common/common.module.d.ts +37 -0
  17. package/common/common.service.d.ts +11 -0
  18. package/common/default.pipe.d.ts +7 -0
  19. package/common/ellipsis.pipe.d.ts +7 -0
  20. package/common/get.pipe.d.ts +7 -0
  21. package/common/key-to-label.pipe.d.ts +7 -0
  22. package/common/keys.pipe.d.ts +7 -0
  23. package/common/link-key-value/link-key-value.component.d.ts +16 -0
  24. package/common/logs-utils.d.ts +17 -0
  25. package/common/maps-drawing-confirm/maps-drawing-confirm.component.d.ts +28 -0
  26. package/common/maps-utils.d.ts +70 -0
  27. package/common/pluralize.pipe.d.ts +7 -0
  28. package/common/popover/popover.component.d.ts +16 -0
  29. package/common/popover-confirm/popover-confirm.component.d.ts +15 -0
  30. package/common/precision.pipe.d.ts +7 -0
  31. package/common/public-api.d.ts +30 -0
  32. package/common/schema-version-link/schema-version-link.component.d.ts +10 -0
  33. package/common/skeleton-text/skeleton-text.component.d.ts +11 -0
  34. package/common/social-tags/social-tags.component.d.ts +12 -0
  35. package/common/tags-input.directive.d.ts +20 -0
  36. package/common/times.pipe.d.ts +7 -0
  37. package/common/toast/toast.component.d.ts +19 -0
  38. package/common/toast.service.d.ts +16 -0
  39. package/common/unit-converter/unit-converter.component.d.ts +25 -0
  40. package/common/utils.d.ts +88 -0
  41. package/cycles/cycles-activity/cycles-activity.component.d.ts +31 -0
  42. package/cycles/cycles-activity-logs/cycles-activity-logs.component.d.ts +25 -0
  43. package/cycles/cycles-completeness/cycles-completeness.component.d.ts +14 -0
  44. package/cycles/cycles-emissions/cycles-emissions.component.d.ts +40 -0
  45. package/cycles/cycles-emissions-chart/cycles-emissions-chart.component.d.ts +18 -0
  46. package/cycles/cycles-emissions-logs/cycles-emissions-logs.component.d.ts +23 -0
  47. package/cycles/cycles-functional-unit-measure/cycles-functional-unit-measure.component.d.ts +8 -0
  48. package/cycles/cycles-result/cycles-result.component.d.ts +13 -0
  49. package/cycles/cycles-suggest-form/cycles-suggest-form.component.d.ts +24 -0
  50. package/cycles/cycles.model.d.ts +7 -0
  51. package/cycles/cycles.module.d.ts +19 -0
  52. package/cycles/public-api.d.ts +10 -0
  53. package/engine/aggregation-engine.service.d.ts +71 -0
  54. package/engine/engine.service.d.ts +61 -0
  55. package/engine/public-api.d.ts +2 -0
  56. package/esm2015/auth/auth.service.js +19 -0
  57. package/esm2015/auth/public-api.js +2 -0
  58. package/esm2015/bibliographies/bibliographies-search-confirm/bibliographies-search-confirm.component.js +100 -0
  59. package/esm2015/bibliographies/bibliographies.module.js +30 -0
  60. package/esm2015/bibliographies/public-api.js +3 -0
  61. package/esm2015/common/bind-once.directive.js +23 -0
  62. package/esm2015/common/blank-node-diffs/blank-node-diffs.component.js +47 -0
  63. package/esm2015/common/blank-node-state/blank-node-state.component.js +90 -0
  64. package/esm2015/common/blank-node-state-notice/blank-node-state-notice.component.js +27 -0
  65. package/esm2015/common/blank-node-value-delta/blank-node-value-delta.component.js +41 -0
  66. package/esm2015/common/click-outside.directive.js +28 -0
  67. package/esm2015/common/clipboard/clipboard.component.js +69 -0
  68. package/esm2015/common/common.module.js +144 -0
  69. package/esm2015/common/common.service.js +29 -0
  70. package/esm2015/common/default.pipe.js +23 -0
  71. package/esm2015/common/ellipsis.pipe.js +17 -0
  72. package/esm2015/common/get.pipe.js +17 -0
  73. package/esm2015/common/key-to-label.pipe.js +18 -0
  74. package/esm2015/common/keys.pipe.js +20 -0
  75. package/esm2015/common/link-key-value/link-key-value.component.js +55 -0
  76. package/esm2015/common/logs-utils.js +49 -0
  77. package/esm2015/common/maps-drawing-confirm/maps-drawing-confirm.component.js +89 -0
  78. package/esm2015/common/maps-utils.js +101 -0
  79. package/esm2015/common/pluralize.pipe.js +17 -0
  80. package/esm2015/common/popover/popover.component.js +37 -0
  81. package/esm2015/common/popover-confirm/popover-confirm.component.js +38 -0
  82. package/esm2015/common/precision.pipe.js +20 -0
  83. package/esm2015/common/public-api.js +31 -0
  84. package/esm2015/common/schema-version-link/schema-version-link.component.js +39 -0
  85. package/esm2015/common/skeleton-text/skeleton-text.component.js +44 -0
  86. package/esm2015/common/social-tags/social-tags.component.js +37 -0
  87. package/esm2015/common/tags-input.directive.js +74 -0
  88. package/esm2015/common/times.pipe.js +16 -0
  89. package/esm2015/common/toast/toast.component.js +37 -0
  90. package/esm2015/common/toast.service.js +36 -0
  91. package/esm2015/common/unit-converter/unit-converter.component.js +73 -0
  92. package/esm2015/common/utils.js +245 -0
  93. package/esm2015/cycles/cycles-activity/cycles-activity.component.js +92 -0
  94. package/esm2015/cycles/cycles-activity-logs/cycles-activity-logs.component.js +48 -0
  95. package/esm2015/cycles/cycles-completeness/cycles-completeness.component.js +41 -0
  96. package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +121 -0
  97. package/esm2015/cycles/cycles-emissions-chart/cycles-emissions-chart.component.js +93 -0
  98. package/esm2015/cycles/cycles-emissions-logs/cycles-emissions-logs.component.js +63 -0
  99. package/esm2015/cycles/cycles-functional-unit-measure/cycles-functional-unit-measure.component.js +22 -0
  100. package/esm2015/cycles/cycles-result/cycles-result.component.js +92 -0
  101. package/esm2015/cycles/cycles-suggest-form/cycles-suggest-form.component.js +83 -0
  102. package/esm2015/cycles/cycles.model.js +2 -0
  103. package/esm2015/cycles/cycles.module.js +66 -0
  104. package/esm2015/cycles/public-api.js +11 -0
  105. package/esm2015/engine/aggregation-engine.service.js +126 -0
  106. package/esm2015/engine/engine.service.js +78 -0
  107. package/esm2015/engine/public-api.js +3 -0
  108. package/esm2015/files/files-error.model.js +180 -0
  109. package/esm2015/files/files-form/files-form.component.js +439 -0
  110. package/esm2015/files/files-form.model.js +548 -0
  111. package/esm2015/files/files.module.js +42 -0
  112. package/esm2015/files/public-api.js +3 -0
  113. package/esm2015/fontawesome/fontawesome.module.js +36 -0
  114. package/esm2015/fontawesome/public-api.js +2 -0
  115. package/esm2015/hestia-earth-ui-components.js +5 -0
  116. package/esm2015/impact-assessments/impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component.js +161 -0
  117. package/esm2015/impact-assessments/impact-assessments-indicators-chart/impact-assessments-indicators-chart.component.js +142 -0
  118. package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +252 -0
  119. package/esm2015/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.js +68 -0
  120. package/esm2015/impact-assessments/impact-assessments.model.js +2 -0
  121. package/esm2015/impact-assessments/impact-assessments.module.js +47 -0
  122. package/esm2015/impact-assessments/public-api.js +7 -0
  123. package/esm2015/mendeley/mendeley.service.js +35 -0
  124. package/esm2015/mendeley/public-api.js +2 -0
  125. package/esm2015/node/node-csv-export-confirm/node-csv-export-confirm.component.js +65 -0
  126. package/esm2015/node/node-csv-select-headers/node-csv-select-headers.component.js +119 -0
  127. package/esm2015/node/node-csv.service.js +24 -0
  128. package/esm2015/node/node-diffs/node-diffs.component.js +67 -0
  129. package/esm2015/node/node-diffs/node-diffs.model.js +6 -0
  130. package/esm2015/node/node-icon/node-icon.component.js +37 -0
  131. package/esm2015/node/node-link/node-link.component.js +33 -0
  132. package/esm2015/node/node-logs-file/node-logs-file.component.js +63 -0
  133. package/esm2015/node/node-logs-models/node-logs-models.component.js +188 -0
  134. package/esm2015/node/node-missing-lookup-factors/node-missing-lookup-factors.component.js +34 -0
  135. package/esm2015/node/node-value-details/node-value-details.component.js +46 -0
  136. package/esm2015/node/node.module.js +67 -0
  137. package/esm2015/node/node.service.js +113 -0
  138. package/esm2015/node/public-api.js +13 -0
  139. package/esm2015/public-api.js +16 -0
  140. package/esm2015/schema/public-api.js +2 -0
  141. package/esm2015/schema/schema.service.js +167 -0
  142. package/esm2015/search/public-api.js +4 -0
  143. package/esm2015/search/search.model.js +204 -0
  144. package/esm2015/search/search.module.js +13 -0
  145. package/esm2015/search/search.service.js +99 -0
  146. package/esm2015/sites/public-api.js +6 -0
  147. package/esm2015/sites/sites-maps/sites-maps.component.js +162 -0
  148. package/esm2015/sites/sites-measurements/sites-measurements.component.js +78 -0
  149. package/esm2015/sites/sites-measurements-logs/sites-measurements-logs.component.js +63 -0
  150. package/esm2015/sites/sites.model.js +10 -0
  151. package/esm2015/sites/sites.module.js +42 -0
  152. package/esm2015/terms/public-api.js +2 -0
  153. package/esm2015/terms/terms.model.js +184 -0
  154. package/esm2015/users/public-api.js +2 -0
  155. package/esm2015/users/users.service.js +17 -0
  156. package/fesm2015/hestia-earth-ui-components.js +5920 -0
  157. package/fesm2015/hestia-earth-ui-components.js.map +1 -0
  158. package/files/files-error.model.d.ts +40 -0
  159. package/files/files-form/files-form.component.d.ts +94 -0
  160. package/files/files-form.model.d.ts +113 -0
  161. package/files/files.module.d.ts +13 -0
  162. package/files/public-api.d.ts +2 -0
  163. package/fontawesome/fontawesome.module.d.ts +10 -0
  164. package/fontawesome/public-api.d.ts +1 -0
  165. package/hestia-earth-ui-components.d.ts +5 -0
  166. package/impact-assessments/impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component.d.ts +28 -0
  167. package/impact-assessments/impact-assessments-indicators-chart/impact-assessments-indicators-chart.component.d.ts +25 -0
  168. package/impact-assessments/impact-assessments-products/impact-assessments-products.component.d.ts +77 -0
  169. package/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.d.ts +25 -0
  170. package/impact-assessments/impact-assessments.model.d.ts +6 -0
  171. package/impact-assessments/impact-assessments.module.d.ts +15 -0
  172. package/impact-assessments/public-api.d.ts +6 -0
  173. package/mendeley/mendeley.service.d.ts +25 -0
  174. package/mendeley/public-api.d.ts +1 -0
  175. package/node/node-csv-export-confirm/node-csv-export-confirm.component.d.ts +32 -0
  176. package/node/node-csv-select-headers/node-csv-select-headers.component.d.ts +42 -0
  177. package/node/node-csv.service.d.ts +9 -0
  178. package/node/node-diffs/node-diffs.component.d.ts +23 -0
  179. package/node/node-diffs/node-diffs.model.d.ts +4 -0
  180. package/node/node-icon/node-icon.component.d.ts +8 -0
  181. package/node/node-link/node-link.component.d.ts +11 -0
  182. package/node/node-logs-file/node-logs-file.component.d.ts +31 -0
  183. package/node/node-logs-models/node-logs-models.component.d.ts +72 -0
  184. package/node/node-missing-lookup-factors/node-missing-lookup-factors.component.d.ts +14 -0
  185. package/node/node-value-details/node-value-details.component.d.ts +17 -0
  186. package/node/node.module.d.ts +20 -0
  187. package/node/node.service.d.ts +70 -0
  188. package/node/public-api.d.ts +12 -0
  189. package/package.json +53 -0
  190. package/public-api.d.ts +15 -0
  191. package/schema/public-api.d.ts +1 -0
  192. package/schema/schema.service.d.ts +51 -0
  193. package/search/public-api.d.ts +3 -0
  194. package/search/search.model.d.ts +243 -0
  195. package/search/search.module.d.ts +7 -0
  196. package/search/search.service.d.ts +129 -0
  197. package/sites/public-api.d.ts +5 -0
  198. package/sites/sites-maps/sites-maps.component.d.ts +35 -0
  199. package/sites/sites-measurements/sites-measurements.component.d.ts +31 -0
  200. package/sites/sites-measurements-logs/sites-measurements-logs.component.d.ts +23 -0
  201. package/sites/sites.model.d.ts +10 -0
  202. package/sites/sites.module.d.ts +13 -0
  203. package/styles.scss +197 -0
  204. package/terms/public-api.d.ts +1 -0
  205. package/terms/terms.model.d.ts +21 -0
  206. package/users/public-api.d.ts +1 -0
  207. package/users/users.service.d.ts +7 -0
@@ -0,0 +1,88 @@
1
+ import { NodeType, Term, ICycleJSONLD, ISiteJSONLD, IImpactAssessmentJSONLD } from '@hestia-earth/schema';
2
+ export declare const gitHome = "https://gitlab.com/hestia-earth";
3
+ export declare const gitRawBaseUrl = "https://glcdn.githack.com/hestia-earth";
4
+ export declare const isChrome: () => boolean;
5
+ export declare const baseUrl: () => string;
6
+ export declare const isExternal: () => boolean;
7
+ export declare const loadScript: (src?: string | undefined) => Promise<any>;
8
+ export declare const handleAPIError: (error: any) => never;
9
+ export declare const errorText: (error: any) => string;
10
+ export declare const toFormData: (data: any, formData?: FormData) => FormData;
11
+ export declare const filterParams: (obj: any) => {
12
+ [x: string]: string;
13
+ };
14
+ export declare const toSearchParams: (params?: any) => URLSearchParams;
15
+ export declare const waitFor: (variable: string, callback: () => void) => void;
16
+ export declare const bottom: (element: HTMLElement) => number;
17
+ export declare const isScrolledBelow: (element: HTMLElement) => boolean;
18
+ export declare const scrollToEl: (id: string, retries?: number) => void;
19
+ export declare const scrollTop: () => void;
20
+ export declare const animateCounter: (total: number, callback: (count: number) => void) => void;
21
+ export declare const safeJSONParse: <T>(value: string, defaultValue?: any) => any;
22
+ export declare const safeJSONStringify: (value: string) => string;
23
+ export declare const arrayValue: (values: any[], isAverage: boolean) => number;
24
+ export declare const propertyValue: (value: string | number | ((string | number)[]), isAverage?: boolean) => number;
25
+ export declare const dataValue: (data: any, index: number, property: string) => number | null;
26
+ export interface IGroupedNode<T> {
27
+ nodes: T[];
28
+ index: number;
29
+ value: number[];
30
+ dates?: any[];
31
+ sd?: number[];
32
+ min?: number[];
33
+ max?: number[];
34
+ inputs?: any[];
35
+ depthUpper?: number[];
36
+ depthLower?: number[];
37
+ startDate?: string[];
38
+ endDate?: string[];
39
+ }
40
+ export interface IGroupedNodesValues<T> {
41
+ [nodeId: string]: IGroupedNode<T>;
42
+ }
43
+ export interface IGroupedNodesValue<T> {
44
+ term: Term;
45
+ /**
46
+ * Enable ordering ny methodTier
47
+ */
48
+ methodTierOrder: number;
49
+ values: IGroupedNodesValues<T>;
50
+ originalValues: {
51
+ [nodeId: string]: {
52
+ value: number;
53
+ };
54
+ };
55
+ }
56
+ export interface IGroupedNodes<T> {
57
+ [termId: string]: IGroupedNodesValue<T>;
58
+ }
59
+ export interface IGroupedKeys<T> {
60
+ key: string;
61
+ value: IGroupedNodesValue<T>;
62
+ }
63
+ export declare const grouppedKeys: <T>(value: IGroupedNodes<T>) => IGroupedKeys<T>[];
64
+ export declare const grouppedValueKeys: string[];
65
+ export declare const groupNodesByTerm: <T extends IImpactAssessmentJSONLD | ISiteJSONLD | ICycleJSONLD, R>(nodes: T[] | undefined, key: 'impacts' | 'emissionsResourceUse' | 'inputs' | 'products' | 'emissions' | 'measurements', originalValues?: T[], filterMethod?: Term | undefined) => IGroupedNodes<R>;
66
+ export declare const sortByFn: (key: string, asc: boolean) => <T>(a: T, b: T) => number;
67
+ export declare const ellipsis: (text?: string, maxlength?: number) => string;
68
+ export declare const mapsUrl: (location?: {
69
+ lat?: number | undefined;
70
+ lng?: number | undefined;
71
+ name?: string | undefined;
72
+ } | undefined) => string | undefined;
73
+ export declare const keyToLabel: (key: string) => string;
74
+ export declare const toDashCase: (value?: string | undefined) => string | null;
75
+ export declare const nodeTypeToString: (type: NodeType) => string;
76
+ export declare const parseNodeType: (type: string) => NodeType | undefined;
77
+ export declare const defaultLabel: (node?: any) => any;
78
+ export declare const itemColor: (index: number) => any;
79
+ export declare const listColor: <T>(_v: T, index: number) => string;
80
+ export declare const minutesBefore: (date: Date, minutes?: number) => Date;
81
+ export declare const hoursBefore: (date: Date, hours?: number) => Date;
82
+ export declare const repeat: (times?: number) => number[];
83
+ export declare enum DeltaDisplayType {
84
+ absolute = "absolute",
85
+ percent = "percent"
86
+ }
87
+ export declare const delta: (value: any, originalValue: any, displayType?: DeltaDisplayType) => number;
88
+ export declare const filenameWithoutExt: (filename?: string) => string;
@@ -0,0 +1,31 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import { DataState } from '@hestia-earth/api';
3
+ import { ICycleJSONLD, Input as HestiaInput, Product } from '@hestia-earth/schema';
4
+ import { IGroupedKeys } from '../../common/utils';
5
+ import * as i0 from "@angular/core";
6
+ declare enum View {
7
+ table = "table",
8
+ logs = "logs"
9
+ }
10
+ export declare class CyclesActivityComponent implements OnChanges {
11
+ originalValues: ICycleJSONLD[];
12
+ cycles: ICycleJSONLD[];
13
+ dataState?: DataState;
14
+ enableCompare: boolean;
15
+ baseUrl: string;
16
+ propertyValue: (value: string | number | (string | number)[], isAverage?: boolean) => number;
17
+ showDownload: boolean;
18
+ View: typeof View;
19
+ selectedView: View;
20
+ inputs: IGroupedKeys<HestiaInput>[];
21
+ products: IGroupedKeys<Product>[];
22
+ ngOnChanges(changes: SimpleChanges): void;
23
+ trackById(_index: number, item: ICycleJSONLD): string;
24
+ get isOriginal(): boolean;
25
+ private update;
26
+ togglePopover(popover: any, context: any): any;
27
+ addCycle(cycle: ICycleJSONLD): Promise<void>;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesActivityComponent, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesActivityComponent, "he-cycles-activity", never, { "originalValues": "originalValues"; "cycles": "cycles"; "dataState": "dataState"; "enableCompare": "enableCompare"; }, {}, never, never>;
30
+ }
31
+ export {};
@@ -0,0 +1,25 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ICycleJSONLD, NodeType } from '@hestia-earth/schema';
3
+ import { HeNodeService } from '../../node/node.service';
4
+ import * as i0 from "@angular/core";
5
+ declare enum Tab {
6
+ inputs = "Inputs",
7
+ products = "Products"
8
+ }
9
+ export declare class CyclesActivityLogsComponent implements OnInit {
10
+ private nodeService;
11
+ original?: ICycleJSONLD;
12
+ recalculated?: ICycleJSONLD;
13
+ loading: boolean;
14
+ NodeType: typeof NodeType;
15
+ logsUrl?: string;
16
+ logs: any;
17
+ Tab: typeof Tab;
18
+ selectedTab: Tab;
19
+ constructor(nodeService: HeNodeService);
20
+ ngOnInit(): Promise<void>;
21
+ private get node();
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesActivityLogsComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesActivityLogsComponent, "he-cycles-activity-logs", never, { "original": "original"; "recalculated": "recalculated"; }, {}, never, never>;
24
+ }
25
+ export {};
@@ -0,0 +1,14 @@
1
+ import { DataState } from '@hestia-earth/api';
2
+ import { ICycleJSONLD } from '@hestia-earth/schema';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CyclesCompletenessComponent {
5
+ cycles: ICycleJSONLD[];
6
+ dataState?: DataState;
7
+ baseUrl: string;
8
+ defaultLabel: (node?: any) => any;
9
+ keyToLabel: (key: string) => string;
10
+ trackById(_index: number, item: ICycleJSONLD): string;
11
+ get completenessKeys(): string[];
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesCompletenessComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesCompletenessComponent, "he-cycles-completeness", never, { "cycles": "cycles"; "dataState": "dataState"; }, {}, never, never>;
14
+ }
@@ -0,0 +1,40 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import { DataState } from '@hestia-earth/api';
3
+ import { ICycleJSONLD, Emission } from '@hestia-earth/schema';
4
+ import { IGroupedKeys } from '../../common/utils';
5
+ import * as i0 from "@angular/core";
6
+ declare enum View {
7
+ table = "table",
8
+ chart = "chart",
9
+ logs = "logs"
10
+ }
11
+ export declare class CyclesEmissionsComponent implements OnChanges {
12
+ originalValues: ICycleJSONLD[];
13
+ cycles: ICycleJSONLD[];
14
+ dataState?: DataState;
15
+ enableCompare: boolean;
16
+ baseUrl: string;
17
+ propertyValue: (value: string | number | (string | number)[], isAverage?: boolean) => number;
18
+ itemColor: (index: number) => any;
19
+ showDownload: boolean;
20
+ View: typeof View;
21
+ selectedView: View;
22
+ selectedCycles: ICycleJSONLD[];
23
+ emissions: IGroupedKeys<Emission>[];
24
+ ngOnChanges(changes: SimpleChanges): void;
25
+ trackById(_index: number, item: ICycleJSONLD): string;
26
+ get isOriginal(): boolean;
27
+ private update;
28
+ togglePopover(popover: any, context: any): any;
29
+ addCycle(cycle: ICycleJSONLD): Promise<void>;
30
+ private selectAllCycles;
31
+ private unselectAllCycles;
32
+ toggleAllCycles(): void;
33
+ private selectCycle;
34
+ private unselectCycle;
35
+ toggleCycle(cycle: ICycleJSONLD): void;
36
+ isSelected(cycle: ICycleJSONLD): boolean;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesEmissionsComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesEmissionsComponent, "he-cycles-emissions", never, { "originalValues": "originalValues"; "cycles": "cycles"; "dataState": "dataState"; "enableCompare": "enableCompare"; }, {}, never, never>;
39
+ }
40
+ export {};
@@ -0,0 +1,18 @@
1
+ import { OnChanges, SimpleChanges, AfterViewInit } from '@angular/core';
2
+ import { Emission, Term } from '@hestia-earth/schema';
3
+ import { IGroupedNodes } from '../../common/utils';
4
+ import * as i0 from "@angular/core";
5
+ export declare class CyclesEmissionsChartComponent implements AfterViewInit, OnChanges {
6
+ private chartRef?;
7
+ private chart;
8
+ private cycles;
9
+ emissionPerCycle: IGroupedNodes<Emission>;
10
+ terms: Term[];
11
+ selectedTerm?: Term;
12
+ ngAfterViewInit(): void | null;
13
+ ngOnChanges(changes: SimpleChanges): void | null;
14
+ private init;
15
+ updateChart(): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesEmissionsChartComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesEmissionsChartComponent, "he-cycles-emissions-chart", never, { "cycles": "cycles"; }, {}, never, never>;
18
+ }
@@ -0,0 +1,23 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Emission, ITermJSONLD, NodeType } from '@hestia-earth/schema';
3
+ import { HeSearchService } from '../../search/search.service';
4
+ import { HeNodeService } from '../../node/node.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CyclesEmissionsLogsComponent implements OnInit {
7
+ private searchService;
8
+ private nodeService;
9
+ private cycle?;
10
+ originalValues: Emission[];
11
+ recalculatedValues: Emission[];
12
+ loading: boolean;
13
+ logsUrl?: string;
14
+ NodeType: typeof NodeType;
15
+ logs: any;
16
+ models: ITermJSONLD[];
17
+ emissions: ITermJSONLD[];
18
+ constructor(searchService: HeSearchService, nodeService: HeNodeService);
19
+ ngOnInit(): Promise<void>;
20
+ private get node();
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesEmissionsLogsComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesEmissionsLogsComponent, "he-cycles-emissions-logs", never, { "cycle": "cycle"; "originalValues": "originalValues"; "recalculatedValues": "recalculatedValues"; }, {}, never, never>;
23
+ }
@@ -0,0 +1,8 @@
1
+ import { ICycleJSONLD, CycleFunctionalUnit } from '@hestia-earth/schema';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CyclesFunctionalUnitMeasureComponent {
4
+ cycle?: ICycleJSONLD;
5
+ CycleFunctionalUnit: typeof CycleFunctionalUnit;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesFunctionalUnitMeasureComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesFunctionalUnitMeasureComponent, "he-cycles-functional-unit-measure", never, { "cycle": "cycle"; }, {}, never, never>;
8
+ }
@@ -0,0 +1,13 @@
1
+ import { AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CyclesResultComponent implements AfterViewInit, OnChanges {
4
+ private chartRef?;
5
+ private chart;
6
+ private cycles;
7
+ ngAfterViewInit(): void;
8
+ ngOnChanges(changes: SimpleChanges): void;
9
+ private init;
10
+ private updateChart;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesResultComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesResultComponent, "he-cycles-result", never, { "cycles": "cycles"; }, {}, never, never>;
13
+ }
@@ -0,0 +1,24 @@
1
+ import { FormBuilder } from '@angular/forms';
2
+ import { NodeType } from '@hestia-earth/schema';
3
+ import { Observable } from 'rxjs';
4
+ import { HeNodeService } from '../../node/node.service';
5
+ import { HeSearchService } from '../../search/search.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class CyclesSuggestFormComponent {
8
+ private formBuilder;
9
+ private nodeService;
10
+ private searchService;
11
+ private cycles;
12
+ private cycleAdded;
13
+ form: import("@angular/forms").FormGroup;
14
+ loading: boolean;
15
+ suggesting: boolean;
16
+ formatter: ({ "@id": id }: any) => any;
17
+ suggestCycle: (text$: Observable<string>) => Observable<Omit<import("@hestia-earth/schema").JSONLD<NodeType.Cycle> & import("../../search/search.service").ISearchResultExtended, "_score">[]>;
18
+ constructor(formBuilder: FormBuilder, nodeService: HeNodeService, searchService: HeSearchService);
19
+ private suggest;
20
+ private loadCycle;
21
+ submit(): Promise<void>;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<CyclesSuggestFormComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<CyclesSuggestFormComponent, "he-cycles-suggest-form", never, { "cycles": "cycles"; }, { "cycleAdded": "cycleAdded"; }, never, never>;
24
+ }
@@ -0,0 +1,7 @@
1
+ import { NodeType, ICycleJSONLD } from '@hestia-earth/schema';
2
+ export interface ICycleJSONLDExtended extends ICycleJSONLD {
3
+ related: {
4
+ [type in NodeType]?: string[];
5
+ };
6
+ }
7
+ export declare const primaryProduct: ({ products }: Partial<ICycleJSONLD>) => import("@hestia-earth/schema").Product | undefined;
@@ -0,0 +1,19 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./cycles-activity/cycles-activity.component";
3
+ import * as i2 from "./cycles-activity-logs/cycles-activity-logs.component";
4
+ import * as i3 from "./cycles-completeness/cycles-completeness.component";
5
+ import * as i4 from "./cycles-emissions/cycles-emissions.component";
6
+ import * as i5 from "./cycles-emissions-chart/cycles-emissions-chart.component";
7
+ import * as i6 from "./cycles-emissions-logs/cycles-emissions-logs.component";
8
+ import * as i7 from "./cycles-functional-unit-measure/cycles-functional-unit-measure.component";
9
+ import * as i8 from "./cycles-result/cycles-result.component";
10
+ import * as i9 from "./cycles-suggest-form/cycles-suggest-form.component";
11
+ import * as i10 from "@angular/common";
12
+ import * as i11 from "@angular/forms";
13
+ import * as i12 from "../common/common.module";
14
+ import * as i13 from "../node/node.module";
15
+ export declare class HeCyclesModule {
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeCyclesModule, never>;
17
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HeCyclesModule, [typeof i1.CyclesActivityComponent, typeof i2.CyclesActivityLogsComponent, typeof i3.CyclesCompletenessComponent, typeof i4.CyclesEmissionsComponent, typeof i5.CyclesEmissionsChartComponent, typeof i6.CyclesEmissionsLogsComponent, typeof i7.CyclesFunctionalUnitMeasureComponent, typeof i8.CyclesResultComponent, typeof i9.CyclesSuggestFormComponent], [typeof i10.CommonModule, typeof i11.FormsModule, typeof i11.ReactiveFormsModule, typeof i12.HeCommonModule, typeof i13.HeNodeModule], [typeof i1.CyclesActivityComponent, typeof i2.CyclesActivityLogsComponent, typeof i3.CyclesCompletenessComponent, typeof i4.CyclesEmissionsComponent, typeof i5.CyclesEmissionsChartComponent, typeof i6.CyclesEmissionsLogsComponent, typeof i7.CyclesFunctionalUnitMeasureComponent, typeof i8.CyclesResultComponent, typeof i9.CyclesSuggestFormComponent]>;
18
+ static ɵinj: i0.ɵɵInjectorDeclaration<HeCyclesModule>;
19
+ }
@@ -0,0 +1,10 @@
1
+ export * from './cycles.module';
2
+ export { CyclesActivityComponent } from './cycles-activity/cycles-activity.component';
3
+ export { CyclesActivityLogsComponent } from './cycles-activity-logs/cycles-activity-logs.component';
4
+ export { CyclesCompletenessComponent } from './cycles-completeness/cycles-completeness.component';
5
+ export { CyclesEmissionsChartComponent } from './cycles-emissions-chart/cycles-emissions-chart.component';
6
+ export { CyclesEmissionsLogsComponent } from './cycles-emissions-logs/cycles-emissions-logs.component';
7
+ export { CyclesEmissionsComponent } from './cycles-emissions/cycles-emissions.component';
8
+ export { CyclesFunctionalUnitMeasureComponent } from './cycles-functional-unit-measure/cycles-functional-unit-measure.component';
9
+ export { CyclesResultComponent } from './cycles-result/cycles-result.component';
10
+ export { CyclesSuggestFormComponent } from './cycles-suggest-form/cycles-suggest-form.component';
@@ -0,0 +1,71 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ICycleJSONLD, NodeType, Product, Term } from '@hestia-earth/schema';
3
+ import { HeNodeService } from '../node/node.service';
4
+ import { HeCommonService } from '../common/common.service';
5
+ import * as i0 from "@angular/core";
6
+ export interface IModel {
7
+ type: NodeType;
8
+ /**
9
+ * Path to the implementation (code) of the model.
10
+ */
11
+ path: string;
12
+ /**
13
+ * Path to the documentation of the model.
14
+ */
15
+ docPath: string;
16
+ dataPath: string;
17
+ '@id'?: string;
18
+ }
19
+ export interface ILookups {
20
+ crop: any[];
21
+ cropYield: any[];
22
+ }
23
+ export interface ICycle {
24
+ cycle: ICycleJSONLD;
25
+ name?: string;
26
+ startDate?: string;
27
+ endDate?: string;
28
+ country: string;
29
+ observations?: number;
30
+ yield?: number;
31
+ faoYield?: number;
32
+ diff?: number;
33
+ }
34
+ export declare const extendCycle: ({ crop, cropYield }: ILookups) => (cycle: ICycleJSONLD) => ICycle;
35
+ export interface ITriggerCountryParams {
36
+ country: Term;
37
+ product: Product;
38
+ '@type'?: NodeType;
39
+ }
40
+ export declare class HeAggregationEngineService {
41
+ private http;
42
+ private commonService;
43
+ private nodeService;
44
+ private modelsLoading;
45
+ private modelsLoaded;
46
+ private _models;
47
+ private lookupsLoading;
48
+ private lookupsLoaded;
49
+ private _lookups;
50
+ constructor(http: HttpClient, commonService: HeCommonService, nodeService: HeNodeService);
51
+ private init;
52
+ private get gitUrl();
53
+ private get rawUrl();
54
+ private loadModels;
55
+ get models$(): import("rxjs").Observable<IModel[]>;
56
+ models(): Promise<IModel[]>;
57
+ model$(model: Partial<IModel>): import("rxjs").Observable<IModel | undefined>;
58
+ model(model: Partial<IModel>): Promise<IModel | undefined>;
59
+ private loadLookup;
60
+ private loadLookups;
61
+ get lookups$(): import("rxjs").Observable<{
62
+ cropYield: any[];
63
+ crop: any[];
64
+ }>;
65
+ lookups(): Promise<{
66
+ cropYield: any[];
67
+ crop: any[];
68
+ }>;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeAggregationEngineService, never>;
70
+ static ɵprov: i0.ɵɵInjectableDeclaration<HeAggregationEngineService>;
71
+ }
@@ -0,0 +1,61 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { NodeType } from '@hestia-earth/schema';
4
+ import { HeCommonService } from '../common/common.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare const HE_ORCHESTRATOR_BASE_URL: InjectionToken<string>;
7
+ export declare const findConfigModels: ({ models }: IOrchestratorConfig, modelId: string, modelKey: string) => IOrchestratorModelConfig[];
8
+ export declare const pathToApiDocsPath: (model: string, term?: string | undefined) => string;
9
+ export interface IModel {
10
+ /**
11
+ * Path to the implementation (code) of the model.
12
+ */
13
+ path: string;
14
+ /**
15
+ * Path to the documentation of the model.
16
+ */
17
+ docPath: string;
18
+ /**
19
+ * Path to the API Documentation.
20
+ */
21
+ apiDocsPath?: string;
22
+ /**
23
+ * The name of the model used as `methodModel`.
24
+ */
25
+ model: string;
26
+ /**
27
+ * The term the model is associated with.
28
+ */
29
+ term?: string;
30
+ /**
31
+ * A key in the model if term does not exist.
32
+ */
33
+ modelKey?: string;
34
+ }
35
+ export interface IOrchestratorModelConfig {
36
+ key: string;
37
+ model: string;
38
+ value: string;
39
+ }
40
+ export interface IOrchestratorConfig {
41
+ models: IOrchestratorModelConfig[];
42
+ }
43
+ export declare class HeEngineService {
44
+ private http;
45
+ private commonService;
46
+ private modelsLoading;
47
+ private modelsLoaded;
48
+ private _models;
49
+ constructor(http: HttpClient, commonService: HeCommonService);
50
+ private init;
51
+ private get gitUrl();
52
+ private get rawUrl();
53
+ private loadModels;
54
+ get models$(): import("rxjs").Observable<IModel[]>;
55
+ models(): Promise<IModel[]>;
56
+ model$(model: Partial<IModel>): import("rxjs").Observable<IModel | undefined>;
57
+ model(model: Partial<IModel>): Promise<IModel | undefined>;
58
+ ochestratorConfig(type: NodeType): Promise<IOrchestratorConfig>;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeEngineService, never>;
60
+ static ɵprov: i0.ɵɵInjectableDeclaration<HeEngineService>;
61
+ }
@@ -0,0 +1,2 @@
1
+ export { HeAggregationEngineService } from './aggregation-engine.service';
2
+ export { HeEngineService, HE_ORCHESTRATOR_BASE_URL } from './engine.service';
@@ -0,0 +1,19 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class HeAuthService {
4
+ set token(token) {
5
+ this._token = token;
6
+ }
7
+ get headers() {
8
+ return this._token ? { 'X-ACCESS-TOKEN': this._token } : {};
9
+ }
10
+ }
11
+ HeAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
12
+ HeAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeAuthService, providedIn: 'root' });
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeAuthService, decorators: [{
14
+ type: Injectable,
15
+ args: [{
16
+ providedIn: 'root'
17
+ }]
18
+ }] });
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2F1dGgvYXV0aC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBSzNDLE1BQU0sT0FBTyxhQUFhO0lBR3hCLElBQVcsS0FBSyxDQUFDLEtBQWE7UUFDNUIsSUFBSSxDQUFDLE1BQU0sR0FBRyxLQUFLLENBQUM7SUFDdEIsQ0FBQztJQUVELElBQVcsT0FBTztRQUNoQixPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEVBQUUsZ0JBQWdCLEVBQUUsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUM7SUFDOUQsQ0FBQzs7MkdBVFUsYUFBYTsrR0FBYixhQUFhLGNBRlosTUFBTTs0RkFFUCxhQUFhO2tCQUh6QixVQUFVO21CQUFDO29CQUNWLFVBQVUsRUFBRSxNQUFNO2lCQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgSGVBdXRoU2VydmljZSB7XG4gIHByaXZhdGUgX3Rva2VuPzogc3RyaW5nO1xuXG4gIHB1YmxpYyBzZXQgdG9rZW4odG9rZW46IHN0cmluZykge1xuICAgIHRoaXMuX3Rva2VuID0gdG9rZW47XG4gIH1cblxuICBwdWJsaWMgZ2V0IGhlYWRlcnMoKToge1toZWFkZXI6IHN0cmluZ106IHN0cmluZ30ge1xuICAgIHJldHVybiB0aGlzLl90b2tlbiA/IHsgJ1gtQUNDRVNTLVRPS0VOJzogdGhpcy5fdG9rZW4gfSA6IHt9O1xuICB9XG59XG4iXX0=
@@ -0,0 +1,2 @@
1
+ export * from './auth.service';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hdXRoL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQkFBZ0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vYXV0aC5zZXJ2aWNlJztcbiJdfQ==