@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.
- package/README.md +24 -0
- package/auth/auth.service.d.ts +10 -0
- package/auth/public-api.d.ts +1 -0
- package/bibliographies/bibliographies-search-confirm/bibliographies-search-confirm.component.d.ts +40 -0
- package/bibliographies/bibliographies.module.d.ts +10 -0
- package/bibliographies/public-api.d.ts +2 -0
- package/bundles/hestia-earth-ui-components.umd.js +7570 -0
- package/bundles/hestia-earth-ui-components.umd.js.map +1 -0
- package/common/bind-once.directive.d.ts +10 -0
- package/common/blank-node-diffs/blank-node-diffs.component.d.ts +18 -0
- package/common/blank-node-state/blank-node-state.component.d.ts +36 -0
- package/common/blank-node-state-notice/blank-node-state-notice.component.d.ts +9 -0
- package/common/blank-node-value-delta/blank-node-value-delta.component.d.ts +13 -0
- package/common/click-outside.directive.d.ts +10 -0
- package/common/clipboard/clipboard.component.d.ts +16 -0
- package/common/common.module.d.ts +37 -0
- package/common/common.service.d.ts +11 -0
- package/common/default.pipe.d.ts +7 -0
- package/common/ellipsis.pipe.d.ts +7 -0
- package/common/get.pipe.d.ts +7 -0
- package/common/key-to-label.pipe.d.ts +7 -0
- package/common/keys.pipe.d.ts +7 -0
- package/common/link-key-value/link-key-value.component.d.ts +16 -0
- package/common/logs-utils.d.ts +17 -0
- package/common/maps-drawing-confirm/maps-drawing-confirm.component.d.ts +28 -0
- package/common/maps-utils.d.ts +70 -0
- package/common/pluralize.pipe.d.ts +7 -0
- package/common/popover/popover.component.d.ts +16 -0
- package/common/popover-confirm/popover-confirm.component.d.ts +15 -0
- package/common/precision.pipe.d.ts +7 -0
- package/common/public-api.d.ts +30 -0
- package/common/schema-version-link/schema-version-link.component.d.ts +10 -0
- package/common/skeleton-text/skeleton-text.component.d.ts +11 -0
- package/common/social-tags/social-tags.component.d.ts +12 -0
- package/common/tags-input.directive.d.ts +20 -0
- package/common/times.pipe.d.ts +7 -0
- package/common/toast/toast.component.d.ts +19 -0
- package/common/toast.service.d.ts +16 -0
- package/common/unit-converter/unit-converter.component.d.ts +25 -0
- package/common/utils.d.ts +88 -0
- package/cycles/cycles-activity/cycles-activity.component.d.ts +31 -0
- package/cycles/cycles-activity-logs/cycles-activity-logs.component.d.ts +25 -0
- package/cycles/cycles-completeness/cycles-completeness.component.d.ts +14 -0
- package/cycles/cycles-emissions/cycles-emissions.component.d.ts +40 -0
- package/cycles/cycles-emissions-chart/cycles-emissions-chart.component.d.ts +18 -0
- package/cycles/cycles-emissions-logs/cycles-emissions-logs.component.d.ts +23 -0
- package/cycles/cycles-functional-unit-measure/cycles-functional-unit-measure.component.d.ts +8 -0
- package/cycles/cycles-result/cycles-result.component.d.ts +13 -0
- package/cycles/cycles-suggest-form/cycles-suggest-form.component.d.ts +24 -0
- package/cycles/cycles.model.d.ts +7 -0
- package/cycles/cycles.module.d.ts +19 -0
- package/cycles/public-api.d.ts +10 -0
- package/engine/aggregation-engine.service.d.ts +71 -0
- package/engine/engine.service.d.ts +61 -0
- package/engine/public-api.d.ts +2 -0
- package/esm2015/auth/auth.service.js +19 -0
- package/esm2015/auth/public-api.js +2 -0
- package/esm2015/bibliographies/bibliographies-search-confirm/bibliographies-search-confirm.component.js +100 -0
- package/esm2015/bibliographies/bibliographies.module.js +30 -0
- package/esm2015/bibliographies/public-api.js +3 -0
- package/esm2015/common/bind-once.directive.js +23 -0
- package/esm2015/common/blank-node-diffs/blank-node-diffs.component.js +47 -0
- package/esm2015/common/blank-node-state/blank-node-state.component.js +90 -0
- package/esm2015/common/blank-node-state-notice/blank-node-state-notice.component.js +27 -0
- package/esm2015/common/blank-node-value-delta/blank-node-value-delta.component.js +41 -0
- package/esm2015/common/click-outside.directive.js +28 -0
- package/esm2015/common/clipboard/clipboard.component.js +69 -0
- package/esm2015/common/common.module.js +144 -0
- package/esm2015/common/common.service.js +29 -0
- package/esm2015/common/default.pipe.js +23 -0
- package/esm2015/common/ellipsis.pipe.js +17 -0
- package/esm2015/common/get.pipe.js +17 -0
- package/esm2015/common/key-to-label.pipe.js +18 -0
- package/esm2015/common/keys.pipe.js +20 -0
- package/esm2015/common/link-key-value/link-key-value.component.js +55 -0
- package/esm2015/common/logs-utils.js +49 -0
- package/esm2015/common/maps-drawing-confirm/maps-drawing-confirm.component.js +89 -0
- package/esm2015/common/maps-utils.js +101 -0
- package/esm2015/common/pluralize.pipe.js +17 -0
- package/esm2015/common/popover/popover.component.js +37 -0
- package/esm2015/common/popover-confirm/popover-confirm.component.js +38 -0
- package/esm2015/common/precision.pipe.js +20 -0
- package/esm2015/common/public-api.js +31 -0
- package/esm2015/common/schema-version-link/schema-version-link.component.js +39 -0
- package/esm2015/common/skeleton-text/skeleton-text.component.js +44 -0
- package/esm2015/common/social-tags/social-tags.component.js +37 -0
- package/esm2015/common/tags-input.directive.js +74 -0
- package/esm2015/common/times.pipe.js +16 -0
- package/esm2015/common/toast/toast.component.js +37 -0
- package/esm2015/common/toast.service.js +36 -0
- package/esm2015/common/unit-converter/unit-converter.component.js +73 -0
- package/esm2015/common/utils.js +245 -0
- package/esm2015/cycles/cycles-activity/cycles-activity.component.js +92 -0
- package/esm2015/cycles/cycles-activity-logs/cycles-activity-logs.component.js +48 -0
- package/esm2015/cycles/cycles-completeness/cycles-completeness.component.js +41 -0
- package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +121 -0
- package/esm2015/cycles/cycles-emissions-chart/cycles-emissions-chart.component.js +93 -0
- package/esm2015/cycles/cycles-emissions-logs/cycles-emissions-logs.component.js +63 -0
- package/esm2015/cycles/cycles-functional-unit-measure/cycles-functional-unit-measure.component.js +22 -0
- package/esm2015/cycles/cycles-result/cycles-result.component.js +92 -0
- package/esm2015/cycles/cycles-suggest-form/cycles-suggest-form.component.js +83 -0
- package/esm2015/cycles/cycles.model.js +2 -0
- package/esm2015/cycles/cycles.module.js +66 -0
- package/esm2015/cycles/public-api.js +11 -0
- package/esm2015/engine/aggregation-engine.service.js +126 -0
- package/esm2015/engine/engine.service.js +78 -0
- package/esm2015/engine/public-api.js +3 -0
- package/esm2015/files/files-error.model.js +180 -0
- package/esm2015/files/files-form/files-form.component.js +439 -0
- package/esm2015/files/files-form.model.js +548 -0
- package/esm2015/files/files.module.js +42 -0
- package/esm2015/files/public-api.js +3 -0
- package/esm2015/fontawesome/fontawesome.module.js +36 -0
- package/esm2015/fontawesome/public-api.js +2 -0
- package/esm2015/hestia-earth-ui-components.js +5 -0
- package/esm2015/impact-assessments/impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component.js +161 -0
- package/esm2015/impact-assessments/impact-assessments-indicators-chart/impact-assessments-indicators-chart.component.js +142 -0
- package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +252 -0
- package/esm2015/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.js +68 -0
- package/esm2015/impact-assessments/impact-assessments.model.js +2 -0
- package/esm2015/impact-assessments/impact-assessments.module.js +47 -0
- package/esm2015/impact-assessments/public-api.js +7 -0
- package/esm2015/mendeley/mendeley.service.js +35 -0
- package/esm2015/mendeley/public-api.js +2 -0
- package/esm2015/node/node-csv-export-confirm/node-csv-export-confirm.component.js +65 -0
- package/esm2015/node/node-csv-select-headers/node-csv-select-headers.component.js +119 -0
- package/esm2015/node/node-csv.service.js +24 -0
- package/esm2015/node/node-diffs/node-diffs.component.js +67 -0
- package/esm2015/node/node-diffs/node-diffs.model.js +6 -0
- package/esm2015/node/node-icon/node-icon.component.js +37 -0
- package/esm2015/node/node-link/node-link.component.js +33 -0
- package/esm2015/node/node-logs-file/node-logs-file.component.js +63 -0
- package/esm2015/node/node-logs-models/node-logs-models.component.js +188 -0
- package/esm2015/node/node-missing-lookup-factors/node-missing-lookup-factors.component.js +34 -0
- package/esm2015/node/node-value-details/node-value-details.component.js +46 -0
- package/esm2015/node/node.module.js +67 -0
- package/esm2015/node/node.service.js +113 -0
- package/esm2015/node/public-api.js +13 -0
- package/esm2015/public-api.js +16 -0
- package/esm2015/schema/public-api.js +2 -0
- package/esm2015/schema/schema.service.js +167 -0
- package/esm2015/search/public-api.js +4 -0
- package/esm2015/search/search.model.js +204 -0
- package/esm2015/search/search.module.js +13 -0
- package/esm2015/search/search.service.js +99 -0
- package/esm2015/sites/public-api.js +6 -0
- package/esm2015/sites/sites-maps/sites-maps.component.js +162 -0
- package/esm2015/sites/sites-measurements/sites-measurements.component.js +78 -0
- package/esm2015/sites/sites-measurements-logs/sites-measurements-logs.component.js +63 -0
- package/esm2015/sites/sites.model.js +10 -0
- package/esm2015/sites/sites.module.js +42 -0
- package/esm2015/terms/public-api.js +2 -0
- package/esm2015/terms/terms.model.js +184 -0
- package/esm2015/users/public-api.js +2 -0
- package/esm2015/users/users.service.js +17 -0
- package/fesm2015/hestia-earth-ui-components.js +5920 -0
- package/fesm2015/hestia-earth-ui-components.js.map +1 -0
- package/files/files-error.model.d.ts +40 -0
- package/files/files-form/files-form.component.d.ts +94 -0
- package/files/files-form.model.d.ts +113 -0
- package/files/files.module.d.ts +13 -0
- package/files/public-api.d.ts +2 -0
- package/fontawesome/fontawesome.module.d.ts +10 -0
- package/fontawesome/public-api.d.ts +1 -0
- package/hestia-earth-ui-components.d.ts +5 -0
- package/impact-assessments/impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component.d.ts +28 -0
- package/impact-assessments/impact-assessments-indicators-chart/impact-assessments-indicators-chart.component.d.ts +25 -0
- package/impact-assessments/impact-assessments-products/impact-assessments-products.component.d.ts +77 -0
- package/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.d.ts +25 -0
- package/impact-assessments/impact-assessments.model.d.ts +6 -0
- package/impact-assessments/impact-assessments.module.d.ts +15 -0
- package/impact-assessments/public-api.d.ts +6 -0
- package/mendeley/mendeley.service.d.ts +25 -0
- package/mendeley/public-api.d.ts +1 -0
- package/node/node-csv-export-confirm/node-csv-export-confirm.component.d.ts +32 -0
- package/node/node-csv-select-headers/node-csv-select-headers.component.d.ts +42 -0
- package/node/node-csv.service.d.ts +9 -0
- package/node/node-diffs/node-diffs.component.d.ts +23 -0
- package/node/node-diffs/node-diffs.model.d.ts +4 -0
- package/node/node-icon/node-icon.component.d.ts +8 -0
- package/node/node-link/node-link.component.d.ts +11 -0
- package/node/node-logs-file/node-logs-file.component.d.ts +31 -0
- package/node/node-logs-models/node-logs-models.component.d.ts +72 -0
- package/node/node-missing-lookup-factors/node-missing-lookup-factors.component.d.ts +14 -0
- package/node/node-value-details/node-value-details.component.d.ts +17 -0
- package/node/node.module.d.ts +20 -0
- package/node/node.service.d.ts +70 -0
- package/node/public-api.d.ts +12 -0
- package/package.json +53 -0
- package/public-api.d.ts +15 -0
- package/schema/public-api.d.ts +1 -0
- package/schema/schema.service.d.ts +51 -0
- package/search/public-api.d.ts +3 -0
- package/search/search.model.d.ts +243 -0
- package/search/search.module.d.ts +7 -0
- package/search/search.service.d.ts +129 -0
- package/sites/public-api.d.ts +5 -0
- package/sites/sites-maps/sites-maps.component.d.ts +35 -0
- package/sites/sites-measurements/sites-measurements.component.d.ts +31 -0
- package/sites/sites-measurements-logs/sites-measurements-logs.component.d.ts +23 -0
- package/sites/sites.model.d.ts +10 -0
- package/sites/sites.module.d.ts +13 -0
- package/styles.scss +197 -0
- package/terms/public-api.d.ts +1 -0
- package/terms/terms.model.d.ts +21 -0
- package/users/public-api.d.ts +1 -0
- package/users/users.service.d.ts +7 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare type validationErrorLevel = 'error' | 'warning';
|
|
2
|
+
export declare type validationErrorParam = 'missingProperty' | 'type' | 'term' | 'model' | 'product' | 'range' | 'allowedValues' | 'additionalProperty' | 'expected' | 'default' | 'current' | 'percentage' | 'keys' | 'threshold';
|
|
3
|
+
export declare type validationErrorKeyword = 'required' | 'type' | 'if' | 'then';
|
|
4
|
+
export interface IValidationError {
|
|
5
|
+
index?: number;
|
|
6
|
+
nodeIndex?: number;
|
|
7
|
+
level?: validationErrorLevel;
|
|
8
|
+
dataPath?: string;
|
|
9
|
+
schemaPath?: string;
|
|
10
|
+
keyword?: validationErrorKeyword;
|
|
11
|
+
message: string;
|
|
12
|
+
params?: {
|
|
13
|
+
[key in validationErrorParam]?: any;
|
|
14
|
+
};
|
|
15
|
+
mapError?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface IValidationErrorWithIndex {
|
|
18
|
+
error: IValidationError[];
|
|
19
|
+
index: number;
|
|
20
|
+
changed?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const parseDataPath: (dataPath: string) => {
|
|
23
|
+
path: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}[];
|
|
26
|
+
export declare const nodeLink: ({ "@type": type, "@id": id, name }: {
|
|
27
|
+
"@type": any;
|
|
28
|
+
"@id": any;
|
|
29
|
+
name: any;
|
|
30
|
+
}) => string | null;
|
|
31
|
+
export declare const code: (text: string | number | boolean) => string;
|
|
32
|
+
export declare const missingNodeErrorMessage: ({ "@type": _t, type, name }: any) => string;
|
|
33
|
+
export declare const formatCustomErrorMessage: (message?: string | undefined, error?: IValidationError | undefined, errorCount?: number) => string;
|
|
34
|
+
export declare const formatError: (error?: IValidationError | undefined, errorCount?: number) => IValidationError | undefined;
|
|
35
|
+
export declare const errorHasError: (error?: IValidationError | undefined) => boolean | undefined;
|
|
36
|
+
export declare const errorHasWarning: (error?: IValidationError | undefined) => boolean | undefined;
|
|
37
|
+
export declare const isMissingPropertyError: ({ params }: IValidationError) => boolean;
|
|
38
|
+
export declare const isMissingOneOfError: ({ keyword, schemaPath }: IValidationError) => boolean;
|
|
39
|
+
export declare const filterError: (error: IValidationError) => boolean;
|
|
40
|
+
export declare const missingNodeErrors: (errors: IValidationError[]) => IValidationError[];
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/// <reference types="googlemaps" />
|
|
2
|
+
import { OnInit, ElementRef } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { JSON as HestiaJson, SchemaType, NodeType, Bibliography, Source } from '@hestia-earth/schema';
|
|
5
|
+
import { IErrorProperty, INodeProperty, suggestionType } from '../files-form.model';
|
|
6
|
+
import { HeUsersService } from '../../users/users.service';
|
|
7
|
+
import { HeSearchService } from '../../search/search.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class FilesFormComponent implements OnInit {
|
|
10
|
+
ref: ElementRef;
|
|
11
|
+
private searchService;
|
|
12
|
+
private usersService;
|
|
13
|
+
private schemas?;
|
|
14
|
+
private errors;
|
|
15
|
+
node?: HestiaJson<SchemaType>;
|
|
16
|
+
nodeMap: {
|
|
17
|
+
[type in NodeType]?: string[];
|
|
18
|
+
};
|
|
19
|
+
editable: boolean;
|
|
20
|
+
errorMode: boolean;
|
|
21
|
+
deepEditable: boolean;
|
|
22
|
+
errorsEditable: boolean;
|
|
23
|
+
private nodeChange;
|
|
24
|
+
private nodeErorrResolved;
|
|
25
|
+
private nodeErrorAdded;
|
|
26
|
+
NodeType: typeof NodeType;
|
|
27
|
+
SchemaType: typeof SchemaType;
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
mapVisible: boolean;
|
|
30
|
+
pluralize: any;
|
|
31
|
+
formatPropertyError: (errors: any, property: INodeProperty) => string;
|
|
32
|
+
mapDrawingProperty?: INodeProperty;
|
|
33
|
+
bibliographiesSearchProperty?: INodeProperty;
|
|
34
|
+
nodeProperty?: INodeProperty;
|
|
35
|
+
properties: INodeProperty[];
|
|
36
|
+
formatter: (value: any) => any;
|
|
37
|
+
suggestNewProperty: (fullKey: string) => (text$: Observable<string>) => Observable<{
|
|
38
|
+
name: string;
|
|
39
|
+
prop: any;
|
|
40
|
+
}[]>;
|
|
41
|
+
private suggestExistingNode;
|
|
42
|
+
private suggestNode;
|
|
43
|
+
private suggester;
|
|
44
|
+
propertySuggest: (fullKey: string, suggestType: suggestionType) => (text$: Observable<string>) => Observable<any[]>;
|
|
45
|
+
constructor(ref: ElementRef, searchService: HeSearchService, usersService: HeUsersService);
|
|
46
|
+
ngOnInit(): void;
|
|
47
|
+
trackByIndex(index: number, _value: any): number;
|
|
48
|
+
trackByProperty(_index: number, { id, fullKey }: INodeProperty): string;
|
|
49
|
+
hasAddons(property: INodeProperty): string | number | boolean | undefined;
|
|
50
|
+
isRequired({ value, isRequired }: INodeProperty): boolean | undefined;
|
|
51
|
+
enableAddError(property: INodeProperty): boolean;
|
|
52
|
+
addError(property: INodeProperty, { message, level }: IErrorProperty): void;
|
|
53
|
+
editError(property: INodeProperty): void;
|
|
54
|
+
resolveError(property: INodeProperty): void;
|
|
55
|
+
typeaheadFocus(e: Event): void;
|
|
56
|
+
addPropertyEnabled(property: INodeProperty): boolean;
|
|
57
|
+
private newProperties;
|
|
58
|
+
private replacePropertyData;
|
|
59
|
+
suggestionSelected({ '@id': _id, name, type, id, ...data }: {
|
|
60
|
+
[x: string]: any;
|
|
61
|
+
"@id": any;
|
|
62
|
+
name: any;
|
|
63
|
+
type: any;
|
|
64
|
+
id: any;
|
|
65
|
+
}, property: INodeProperty): void;
|
|
66
|
+
addArrayGroup(array: INodeProperty): void;
|
|
67
|
+
duplicateArrayGroup(array: INodeProperty, property: INodeProperty): void;
|
|
68
|
+
removeArrayGroup(array: INodeProperty, { key }: INodeProperty): void | null;
|
|
69
|
+
private moveArrayGroupToPosition;
|
|
70
|
+
moveArrayGroupUp(array: INodeProperty, { key }: INodeProperty): void;
|
|
71
|
+
moveArrayGroupDown(array: INodeProperty, { key }: INodeProperty): void;
|
|
72
|
+
propertyChanged(value: any, property: INodeProperty): void;
|
|
73
|
+
private addDefaultProperty;
|
|
74
|
+
addMissingProperty(property: INodeProperty): void | null;
|
|
75
|
+
addProperty(property: INodeProperty): void;
|
|
76
|
+
private updatePropertyCoordinates;
|
|
77
|
+
get showMap(): boolean;
|
|
78
|
+
mapDrawingModes({ key }: INodeProperty): google.maps.drawing.OverlayType[];
|
|
79
|
+
onMapDrawingClosed(newValue: any): void | (void | null)[];
|
|
80
|
+
bibliographiesSearchKey({ key, schemaType }: INodeProperty): string | null;
|
|
81
|
+
private updateBibliography;
|
|
82
|
+
private updateSource;
|
|
83
|
+
get bibliographiesSearchSources(): boolean;
|
|
84
|
+
onBibliographiesSearchClosed(value?: Partial<Source> | Partial<Bibliography>): void;
|
|
85
|
+
setUserActorId(property: INodeProperty): Promise<void>;
|
|
86
|
+
calculateCycleDurationEnabled(property: INodeProperty): boolean;
|
|
87
|
+
calculateCycleDuration(property: INodeProperty): void;
|
|
88
|
+
calculateCycleStartDateEnabled(property: INodeProperty): boolean;
|
|
89
|
+
calculateCycleStartDate(property: INodeProperty): void;
|
|
90
|
+
unitConverterEnabled(property: INodeProperty): boolean | undefined;
|
|
91
|
+
openUnitConverter(popover: any, property: INodeProperty): any;
|
|
92
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilesFormComponent, never>;
|
|
93
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilesFormComponent, "he-files-form", never, { "schemas": "schemas"; "errors": "errors"; "node": "node"; "nodeMap": "nodeMap"; "editable": "editable"; "errorMode": "errorMode"; "deepEditable": "deepEditable"; "errorsEditable": "errorsEditable"; }, { "nodeChange": "nodeChange"; "nodeErorrResolved": "nodeErorrResolved"; "nodeErrorAdded": "nodeErrorAdded"; }, never, never>;
|
|
94
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import 'moment/locale/en-gb';
|
|
2
|
+
import { JSON as HestiaJson, SchemaType, NodeType } from '@hestia-earth/schema';
|
|
3
|
+
import { definitions, definition } from '@hestia-earth/json-schema';
|
|
4
|
+
import { IValidationError, validationErrorLevel } from './files-error.model';
|
|
5
|
+
export declare const ARRAY_DELIMITER = ";";
|
|
6
|
+
export declare type suggestionType = NodeType | 'select' | 'default';
|
|
7
|
+
export declare const defaultSuggestionType: suggestionType;
|
|
8
|
+
interface INodePropertySuggestion {
|
|
9
|
+
type?: suggestionType;
|
|
10
|
+
queries?: any[];
|
|
11
|
+
values?: string[];
|
|
12
|
+
parentLevel?: number;
|
|
13
|
+
isLinkNode?: boolean;
|
|
14
|
+
isUniqueKey?: string;
|
|
15
|
+
}
|
|
16
|
+
interface INewProperty {
|
|
17
|
+
name?: string;
|
|
18
|
+
prop?: definition;
|
|
19
|
+
}
|
|
20
|
+
export interface IErrorProperty {
|
|
21
|
+
level?: validationErrorLevel;
|
|
22
|
+
message?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface INodeProperty {
|
|
25
|
+
/**
|
|
26
|
+
* Whether or not this property was added by the user
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
isAdded?: boolean;
|
|
30
|
+
schemaType: SchemaType;
|
|
31
|
+
key: string;
|
|
32
|
+
fullKey: string;
|
|
33
|
+
value: any;
|
|
34
|
+
addPropertyEnabled: boolean;
|
|
35
|
+
suggestions?: INodePropertySuggestion;
|
|
36
|
+
schema?: definition;
|
|
37
|
+
error?: IValidationError;
|
|
38
|
+
hasError?: boolean;
|
|
39
|
+
hasWarning?: boolean;
|
|
40
|
+
editable?: boolean;
|
|
41
|
+
closedVisible?: boolean;
|
|
42
|
+
newProperty?: INewProperty;
|
|
43
|
+
newError?: IErrorProperty;
|
|
44
|
+
isRequired?: boolean;
|
|
45
|
+
isHidden?: boolean;
|
|
46
|
+
isArray?: boolean;
|
|
47
|
+
isExpandable?: boolean;
|
|
48
|
+
isOpen?: boolean;
|
|
49
|
+
properties: INodeProperty[];
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
externalUrl?: {
|
|
52
|
+
url?: string;
|
|
53
|
+
title: string;
|
|
54
|
+
icon?: string;
|
|
55
|
+
urlParamValue?: boolean;
|
|
56
|
+
};
|
|
57
|
+
loading?: boolean;
|
|
58
|
+
changed?: boolean;
|
|
59
|
+
}
|
|
60
|
+
export declare const keyToDataPath: (key: string) => string;
|
|
61
|
+
export declare const dataPathToKey: (dataPath: string, trimArray?: boolean) => string;
|
|
62
|
+
export declare const parentKey: (key: string) => string;
|
|
63
|
+
/**
|
|
64
|
+
* Sort properties having errors, type, id, ...properties (simple), and finally the groups
|
|
65
|
+
*
|
|
66
|
+
* @param a {INodeProperty}
|
|
67
|
+
* @param b {INodeProperty}
|
|
68
|
+
*/
|
|
69
|
+
export declare const sortProperties: (a: INodeProperty, b: INodeProperty) => number;
|
|
70
|
+
export declare const formatPropertyError: (errors: any, property: INodeProperty) => string;
|
|
71
|
+
export declare const hasError: (value: any) => any;
|
|
72
|
+
export declare const hasWarning: (value: any) => any;
|
|
73
|
+
export declare const formatLinkNodesSuggestions: (nodeMap: {
|
|
74
|
+
Actor?: string[] | undefined;
|
|
75
|
+
Cycle?: string[] | undefined;
|
|
76
|
+
ImpactAssessment?: string[] | undefined;
|
|
77
|
+
Organisation?: string[] | undefined;
|
|
78
|
+
Site?: string[] | undefined;
|
|
79
|
+
Source?: string[] | undefined;
|
|
80
|
+
Term?: string[] | undefined;
|
|
81
|
+
}, type: NodeType) => {
|
|
82
|
+
type: NodeType;
|
|
83
|
+
id: string;
|
|
84
|
+
name: string;
|
|
85
|
+
}[];
|
|
86
|
+
export declare const formatSuggestion: ({ defaultProperties, ...node }: any) => any;
|
|
87
|
+
export declare const nodeAvailableProperties: (node: HestiaJson<SchemaType>, { fullKey, schema, schemaType }: Partial<INodeProperty>) => any;
|
|
88
|
+
export declare const isAddPropertyEnabled: (node: HestiaJson<SchemaType>, schemaType: SchemaType, schema: definition, fullKey?: string) => boolean;
|
|
89
|
+
export declare const propertyId: () => any;
|
|
90
|
+
/**
|
|
91
|
+
* Convert value to the final type in the schema.
|
|
92
|
+
*
|
|
93
|
+
* @param schema Definition of the value.
|
|
94
|
+
* @param value
|
|
95
|
+
* @returns Value in the correct format.
|
|
96
|
+
*/
|
|
97
|
+
export declare const parseNewValue: (schema: definition, value: any) => any;
|
|
98
|
+
export declare const propertyError: (errors: IValidationError[]) => (dataPath: string, nonExpandableArray?: boolean) => IValidationError | undefined;
|
|
99
|
+
export declare const singleProperty: (schemas: definitions, errors: IValidationError[], node: any, fullKey: string) => INodeProperty;
|
|
100
|
+
export declare const recursiveProperties: (schemas: definitions, errors: IValidationError[], nodeSchema: definition, deepEditable: boolean, parent?: string) => (node: any) => INodeProperty[];
|
|
101
|
+
export declare const updateProperties: ({ properties }: Partial<INodeProperty>, updater: (prop: INodeProperty) => INodeProperty) => any;
|
|
102
|
+
export declare const typeToNewProperty: (schemas: definitions, schema: definition, nodeSchema: definition, node: any, fullKey: string) => INodeProperty;
|
|
103
|
+
export declare const findProperty: (properties: INodeProperty[], fullKey: string) => any;
|
|
104
|
+
export declare const parentProperty: (properties: INodeProperty[], property: INodeProperty) => INodeProperty;
|
|
105
|
+
export declare const nestedProperty: ({ properties }: INodeProperty, nestedKey: string) => INodeProperty | undefined;
|
|
106
|
+
export declare const siblingProperty: (properties: INodeProperty[], property: INodeProperty, siblingKey: string) => INodeProperty | undefined;
|
|
107
|
+
export declare const groupChanged: (properties: INodeProperty[], key: string, value?: any) => void;
|
|
108
|
+
export declare const refreshPropertyKeys: (property: INodeProperty) => any;
|
|
109
|
+
export declare const calculateCycleDurationEnabled: (properties: INodeProperty[], property: INodeProperty) => boolean;
|
|
110
|
+
export declare const calculateCycleDuration: (properties: INodeProperty[], property: INodeProperty) => number;
|
|
111
|
+
export declare const calculateCycleStartDateEnabled: (properties: INodeProperty[], property: INodeProperty) => boolean;
|
|
112
|
+
export declare const calculateCycleStartDate: (properties: INodeProperty[], property: INodeProperty) => string;
|
|
113
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./files-form/files-form.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "../common/common.module";
|
|
6
|
+
import * as i5 from "../node/node.module";
|
|
7
|
+
import * as i6 from "../bibliographies/bibliographies.module";
|
|
8
|
+
import * as i7 from "../sites/sites.module";
|
|
9
|
+
export declare class HeFilesModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeFilesModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HeFilesModule, [typeof i1.FilesFormComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.HeCommonModule, typeof i5.HeNodeModule, typeof i6.HeBibliographiesModule, typeof i7.HeSitesModule], [typeof i1.FilesFormComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HeFilesModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FaIconLibrary } from '@fortawesome/angular-fontawesome';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
import * as i2 from "@fortawesome/angular-fontawesome";
|
|
5
|
+
export declare class HeFontawesomeModule {
|
|
6
|
+
constructor(library: FaIconLibrary);
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeFontawesomeModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HeFontawesomeModule, never, [typeof i1.CommonModule, typeof i2.FontAwesomeModule], [typeof i2.FontAwesomeModule]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HeFontawesomeModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fontawesome.module';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
|
+
import { IImpactAssessmentJSONLD, Indicator, Term } from '@hestia-earth/schema';
|
|
4
|
+
import { HeSearchService } from '../../search/search.service';
|
|
5
|
+
import { HeNodeService } from '../../node/node.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ImpactAssessmentsIndicatorBreakdownChartComponent implements OnInit {
|
|
8
|
+
private domSanitizer;
|
|
9
|
+
private searchService;
|
|
10
|
+
private nodeService;
|
|
11
|
+
private logs;
|
|
12
|
+
private emissions;
|
|
13
|
+
private chartRef?;
|
|
14
|
+
private chart;
|
|
15
|
+
impactAssessment?: IImpactAssessmentJSONLD;
|
|
16
|
+
indicators: Indicator[];
|
|
17
|
+
loading: boolean;
|
|
18
|
+
terms: Term[];
|
|
19
|
+
selectedTerm?: Term;
|
|
20
|
+
noData: boolean;
|
|
21
|
+
csvContent?: SafeResourceUrl;
|
|
22
|
+
constructor(domSanitizer: DomSanitizer, searchService: HeSearchService, nodeService: HeNodeService);
|
|
23
|
+
ngOnInit(): Promise<void>;
|
|
24
|
+
get id(): any;
|
|
25
|
+
updateChart(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImpactAssessmentsIndicatorBreakdownChartComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImpactAssessmentsIndicatorBreakdownChartComponent, "he-impact-assessments-indicator-breakdown-chart", never, { "impactAssessment": "impactAssessment"; "indicators": "indicators"; }, {}, never, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Indicator, Term, TermTermType } from '@hestia-earth/schema';
|
|
3
|
+
import { IGroupedNodes } from '../../common/utils';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ImpactAssessmentsIndicatorsChartComponent implements AfterViewInit, OnChanges {
|
|
6
|
+
private barChartRef?;
|
|
7
|
+
private barChart;
|
|
8
|
+
private pieChartRef?;
|
|
9
|
+
private pieChart;
|
|
10
|
+
private impactAssessments;
|
|
11
|
+
private key;
|
|
12
|
+
filterTermTypes?: TermTermType[];
|
|
13
|
+
indicatorPerImpactAssessment: IGroupedNodes<Indicator>;
|
|
14
|
+
terms: Term[];
|
|
15
|
+
selectedTerm?: Term;
|
|
16
|
+
ngAfterViewInit(): void | null;
|
|
17
|
+
ngOnChanges(changes: SimpleChanges): void | null;
|
|
18
|
+
private termAllowed;
|
|
19
|
+
private init;
|
|
20
|
+
private updateBarChart;
|
|
21
|
+
private updatePieChart;
|
|
22
|
+
updateCharts(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImpactAssessmentsIndicatorsChartComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImpactAssessmentsIndicatorsChartComponent, "he-impact-assessments-indicators-chart", never, { "impactAssessments": "impactAssessments"; "key": "key"; "filterTermTypes": "filterTermTypes"; }, {}, never, never>;
|
|
25
|
+
}
|
package/impact-assessments/impact-assessments-products/impact-assessments-products.component.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { FormBuilder } from '@angular/forms';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { DataState } from '@hestia-earth/api';
|
|
5
|
+
import { NodeType, IImpactAssessmentJSONLD, Indicator, TermTermType, Term } from '@hestia-earth/schema';
|
|
6
|
+
import { HeNodeService } from '../../node/node.service';
|
|
7
|
+
import { HeSearchService } from '../../search/search.service';
|
|
8
|
+
import { ToastService } from '../../common/toast.service';
|
|
9
|
+
import { IGroupedKeys } from '../../common/utils';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
declare enum View {
|
|
12
|
+
table = "table",
|
|
13
|
+
chart = "chart",
|
|
14
|
+
breakdown = "breakdown",
|
|
15
|
+
logs = "logs"
|
|
16
|
+
}
|
|
17
|
+
export declare class ImpactAssessmentsProductsComponent implements OnChanges {
|
|
18
|
+
private formBuilder;
|
|
19
|
+
private nodeService;
|
|
20
|
+
private searchService;
|
|
21
|
+
private toastService;
|
|
22
|
+
private dataStateValues;
|
|
23
|
+
private cycles?;
|
|
24
|
+
impactAssessments: IImpactAssessmentJSONLD[];
|
|
25
|
+
key: 'impacts' | 'emissionsResourceUse';
|
|
26
|
+
dataState?: DataState;
|
|
27
|
+
enableCompare: boolean;
|
|
28
|
+
filterTermTypes?: TermTermType[];
|
|
29
|
+
enableFilterMethodModel: boolean;
|
|
30
|
+
propertyValue: (value: string | number | (string | number)[], isAverage?: boolean) => number;
|
|
31
|
+
itemColor: (index: number) => any;
|
|
32
|
+
baseUrl: string;
|
|
33
|
+
showDownload: boolean;
|
|
34
|
+
View: typeof View;
|
|
35
|
+
selectedView: View;
|
|
36
|
+
methodModels: Term[];
|
|
37
|
+
selectedMethodModel?: Term;
|
|
38
|
+
indicators: IGroupedKeys<Indicator>[];
|
|
39
|
+
form: import("@angular/forms").FormGroup;
|
|
40
|
+
selectedImpactAssessments: IImpactAssessmentJSONLD[];
|
|
41
|
+
loading: boolean;
|
|
42
|
+
suggesting: boolean;
|
|
43
|
+
formatter: ({ "@id": id }: {
|
|
44
|
+
"@id": any;
|
|
45
|
+
}) => any;
|
|
46
|
+
suggestImpactAssessment: (text$: Observable<string>) => Observable<Omit<import("@hestia-earth/schema").JSONLD<NodeType.ImpactAssessment> & import("../../search/search.service").ISearchResultExtended, "_score">[]>;
|
|
47
|
+
constructor(formBuilder: FormBuilder, nodeService: HeNodeService, searchService: HeSearchService, toastService: ToastService);
|
|
48
|
+
ngOnChanges(changes: SimpleChanges): void | Promise<void>;
|
|
49
|
+
trackById(_index: number, item: IImpactAssessmentJSONLD): string;
|
|
50
|
+
get isOriginal(): boolean;
|
|
51
|
+
get originalValues(): IImpactAssessmentJSONLD[];
|
|
52
|
+
private termAllowed;
|
|
53
|
+
private update;
|
|
54
|
+
private updateMethodModels;
|
|
55
|
+
updateImpacts(): void;
|
|
56
|
+
private loadDataState;
|
|
57
|
+
private updateDataState;
|
|
58
|
+
togglePopover(popover: any, context: any): any;
|
|
59
|
+
impactName(impact: IImpactAssessmentJSONLD): any;
|
|
60
|
+
cycleLabel({ '@id': id, name }: any): any;
|
|
61
|
+
get enableBreakdown(): boolean;
|
|
62
|
+
showRecalculationLogs(): Promise<void>;
|
|
63
|
+
private selectAllImpacts;
|
|
64
|
+
private unselectAllImpacts;
|
|
65
|
+
toggleAllImpacts(): void;
|
|
66
|
+
private selectImpact;
|
|
67
|
+
private unselectImpact;
|
|
68
|
+
toggleImpact(impact: IImpactAssessmentJSONLD): void;
|
|
69
|
+
isSelected(impact: IImpactAssessmentJSONLD): boolean;
|
|
70
|
+
private suggest;
|
|
71
|
+
private loadImpact;
|
|
72
|
+
private fetchCycle;
|
|
73
|
+
addImpact(): Promise<void>;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImpactAssessmentsProductsComponent, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImpactAssessmentsProductsComponent, "he-impact-assessments-products", never, { "cycles": "cycles"; "impactAssessments": "impactAssessments"; "key": "key"; "dataState": "dataState"; "enableCompare": "enableCompare"; "filterTermTypes": "filterTermTypes"; "enableFilterMethodModel": "enableFilterMethodModel"; }, {}, never, never>;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { Emission, ITermJSONLD, NodeType, TermTermType } 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 ImpactAssessmentsProductsLogsComponent implements OnInit {
|
|
7
|
+
private searchService;
|
|
8
|
+
private nodeService;
|
|
9
|
+
private impactAssessment?;
|
|
10
|
+
key?: string;
|
|
11
|
+
filterTermTypes?: TermTermType[];
|
|
12
|
+
originalValues: Emission[];
|
|
13
|
+
recalculatedValues: Emission[];
|
|
14
|
+
loading: boolean;
|
|
15
|
+
logsUrl?: string;
|
|
16
|
+
NodeType: typeof NodeType;
|
|
17
|
+
logs: any;
|
|
18
|
+
models: ITermJSONLD[];
|
|
19
|
+
emissions: ITermJSONLD[];
|
|
20
|
+
constructor(searchService: HeSearchService, nodeService: HeNodeService);
|
|
21
|
+
ngOnInit(): Promise<void>;
|
|
22
|
+
private get node();
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImpactAssessmentsProductsLogsComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImpactAssessmentsProductsLogsComponent, "he-impact-assessments-products-logs", never, { "impactAssessment": "impactAssessment"; "key": "key"; "filterTermTypes": "filterTermTypes"; "originalValues": "originalValues"; "recalculatedValues": "recalculatedValues"; }, {}, never, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./impact-assessments-products/impact-assessments-products.component";
|
|
3
|
+
import * as i2 from "./impact-assessments-indicators-chart/impact-assessments-indicators-chart.component";
|
|
4
|
+
import * as i3 from "./impact-assessments-products-logs/impact-assessments-products-logs.component";
|
|
5
|
+
import * as i4 from "./impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component";
|
|
6
|
+
import * as i5 from "@angular/common";
|
|
7
|
+
import * as i6 from "@angular/router";
|
|
8
|
+
import * as i7 from "@angular/forms";
|
|
9
|
+
import * as i8 from "../common/common.module";
|
|
10
|
+
import * as i9 from "../node/node.module";
|
|
11
|
+
export declare class HeImpactAssessmentsModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeImpactAssessmentsModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HeImpactAssessmentsModule, [typeof i1.ImpactAssessmentsProductsComponent, typeof i2.ImpactAssessmentsIndicatorsChartComponent, typeof i3.ImpactAssessmentsProductsLogsComponent, typeof i4.ImpactAssessmentsIndicatorBreakdownChartComponent], [typeof i5.CommonModule, typeof i6.RouterModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.HeCommonModule, typeof i9.HeNodeModule], [typeof i1.ImpactAssessmentsProductsComponent, typeof i2.ImpactAssessmentsIndicatorsChartComponent, typeof i3.ImpactAssessmentsProductsLogsComponent, typeof i4.ImpactAssessmentsIndicatorBreakdownChartComponent]>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HeImpactAssessmentsModule>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './impact-assessments.model';
|
|
2
|
+
export * from './impact-assessments.module';
|
|
3
|
+
export { ImpactAssessmentsProductsComponent } from './impact-assessments-products/impact-assessments-products.component';
|
|
4
|
+
export { ImpactAssessmentsIndicatorBreakdownChartComponent } from './impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component';
|
|
5
|
+
export { ImpactAssessmentsIndicatorsChartComponent } from './impact-assessments-indicators-chart/impact-assessments-indicators-chart.component';
|
|
6
|
+
export { ImpactAssessmentsProductsLogsComponent } from './impact-assessments-products-logs/impact-assessments-products-logs.component';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Bibliography } from '@hestia-earth/schema';
|
|
3
|
+
import { HeCommonService } from '../common/common.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
interface IMendeleySearchParams {
|
|
6
|
+
title?: string;
|
|
7
|
+
limit?: number;
|
|
8
|
+
doi?: string;
|
|
9
|
+
scopus?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class MendeleySearchResult {
|
|
12
|
+
count: number;
|
|
13
|
+
results: Partial<Bibliography>[];
|
|
14
|
+
}
|
|
15
|
+
export declare class HeMendeleyService {
|
|
16
|
+
private http;
|
|
17
|
+
private commonService;
|
|
18
|
+
constructor(http: HttpClient, commonService: HeCommonService);
|
|
19
|
+
private get path();
|
|
20
|
+
find(params: IMendeleySearchParams): import("rxjs").Observable<MendeleySearchResult>;
|
|
21
|
+
get(id: string): Promise<Bibliography>;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeMendeleyService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HeMendeleyService>;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './mendeley.service';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
|
+
import { SupportedExtensions } from '@hestia-earth/api';
|
|
4
|
+
import { JSON as HestiaJson } from '@hestia-earth/schema';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
interface INodeIncluded {
|
|
7
|
+
node: HestiaJson<any>;
|
|
8
|
+
included: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class NodeCsvExportConfirmComponent implements OnInit {
|
|
11
|
+
private domSanitizer;
|
|
12
|
+
private headers;
|
|
13
|
+
private nodes;
|
|
14
|
+
private filename;
|
|
15
|
+
headerKeys?: string[];
|
|
16
|
+
extension: SupportedExtensions;
|
|
17
|
+
isUpload: boolean;
|
|
18
|
+
closed: EventEmitter<boolean>;
|
|
19
|
+
csvData?: string;
|
|
20
|
+
csvContent?: SafeResourceUrl;
|
|
21
|
+
showIncludeNodes: boolean;
|
|
22
|
+
includedNodes: INodeIncluded[];
|
|
23
|
+
constructor(domSanitizer: DomSanitizer);
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
get included(): INodeIncluded[];
|
|
26
|
+
headersUpdated(headers: string[]): void;
|
|
27
|
+
updateCsvContent(): void;
|
|
28
|
+
get downloadFilename(): string;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeCsvExportConfirmComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NodeCsvExportConfirmComponent, "he-node-csv-export-confirm", never, { "nodes": "nodes"; "filename": "filename"; "headerKeys": "headerKeys"; "extension": "extension"; "isUpload": "isUpload"; }, { "closed": "closed"; }, never, never>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
3
|
+
import { HeSchemaService } from '../../schema/schema.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
interface IHeader {
|
|
6
|
+
header: string;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface IGroupedHeaders {
|
|
10
|
+
[group: string]: {
|
|
11
|
+
selected: boolean;
|
|
12
|
+
partialSelected: boolean;
|
|
13
|
+
open: boolean;
|
|
14
|
+
headers: IHeader[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare class NodeCsvSelectHeadersComponent implements OnInit {
|
|
18
|
+
private schemaService;
|
|
19
|
+
private csv;
|
|
20
|
+
private keys?;
|
|
21
|
+
private includeDefaultCSV;
|
|
22
|
+
headersChanged: EventEmitter<string[]>;
|
|
23
|
+
headers: IGroupedHeaders;
|
|
24
|
+
allSelected: boolean;
|
|
25
|
+
showSelectTermFields: boolean;
|
|
26
|
+
termFields: string[];
|
|
27
|
+
termFieldSelected: any;
|
|
28
|
+
constructor(schemaService: HeSchemaService);
|
|
29
|
+
ngOnInit(): Promise<void>;
|
|
30
|
+
private isSelected;
|
|
31
|
+
dropHeader(event: CdkDragDrop<IHeader[]>, groupKey: string): void;
|
|
32
|
+
private updateAllSelected;
|
|
33
|
+
toggleAll(): void[];
|
|
34
|
+
updateGroup(groupKey: string): void;
|
|
35
|
+
updateGroupHeader(groupKey: string): void;
|
|
36
|
+
get selectedHeaders(): string[];
|
|
37
|
+
reresh(): void;
|
|
38
|
+
toggleTermField(field: string): void[];
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeCsvSelectHeadersComponent, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NodeCsvSelectHeadersComponent, "he-node-csv-select-headers", never, { "csv": "csv"; "keys": "keys"; "includeDefaultCSV": "includeDefaultCSV"; }, { "headersChanged": "headersChanged"; }, never, never>;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HeSchemaService } from '../schema/schema.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class HeNodeCsvService {
|
|
4
|
+
private schemaService;
|
|
5
|
+
constructor(schemaService: HeSchemaService);
|
|
6
|
+
csvToJson(content: string): Promise<any[]>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeNodeCsvService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HeNodeCsvService>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NodeType, JSONLD } from '@hestia-earth/schema';
|
|
3
|
+
import { DisplayType } from './node-diffs.model';
|
|
4
|
+
import { HeNodeService } from '../node.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NodeDiffsComponent implements OnInit {
|
|
7
|
+
private nodeService;
|
|
8
|
+
private data;
|
|
9
|
+
private id?;
|
|
10
|
+
private type?;
|
|
11
|
+
displayType: DisplayType;
|
|
12
|
+
private diffsLoaded;
|
|
13
|
+
DisplayType: typeof DisplayType;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
left?: JSONLD<NodeType>;
|
|
16
|
+
right: any;
|
|
17
|
+
diffHtml?: string;
|
|
18
|
+
constructor(nodeService: HeNodeService);
|
|
19
|
+
ngOnInit(): Promise<void>;
|
|
20
|
+
private loadDiffs;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeDiffsComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NodeDiffsComponent, "he-node-diffs", never, { "data": "data"; "id": "id"; "type": "type"; "displayType": "displayType"; }, { "diffsLoaded": "diffsLoaded"; }, never, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class NodeIconComponent {
|
|
3
|
+
private type?;
|
|
4
|
+
size: string;
|
|
5
|
+
get icon(): string | null;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeIconComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NodeIconComponent, "he-node-icon", never, { "type": "type"; "size": "size"; }, {}, never, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSONLD, NodeType } from '@hestia-earth/schema';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NodeLinkComponent {
|
|
4
|
+
node?: JSONLD<NodeType>;
|
|
5
|
+
showExternalLink: boolean;
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
get showLink(): boolean | undefined;
|
|
8
|
+
get target(): "_blank" | "_self";
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeLinkComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NodeLinkComponent, "he-node-link", never, { "node": "node"; "showExternalLink": "showExternalLink"; }, {}, never, ["*"]>;
|
|
11
|
+
}
|