@hestia-earth/ui-components 0.32.13 → 0.32.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/blank-node-value-delta/blank-node-value-delta.component.d.ts +2 -1
- package/fesm2022/hestia-earth-ui-components.mjs +54 -28
- package/fesm2022/hestia-earth-ui-components.mjs.map +1 -1
- package/node/node-aggregated-quality-score/node-aggregated-quality-score.component.d.ts +3 -0
- package/package.json +1 -1
- package/svg-icons/icons/refresh-20px.svg +6 -8
- package/svg-icons/icons/refresh-24px.svg +6 -8
- package/svg-icons/icons/refresh-40px.svg +5 -4
- package/svg-icons/icons/refresh-48px.svg +5 -4
|
@@ -4,10 +4,11 @@ export declare class BlankNodeValueDeltaComponent {
|
|
|
4
4
|
protected readonly value: import("@angular/core").InputSignal<any>;
|
|
5
5
|
protected readonly originalValue: import("@angular/core").InputSignal<any>;
|
|
6
6
|
protected readonly displayType: import("@angular/core").InputSignal<DeltaDisplayType>;
|
|
7
|
+
protected readonly useCustomFunctions: import("@angular/core").InputSignal<boolean>;
|
|
7
8
|
protected readonly DeltaDisplayType: typeof DeltaDisplayType;
|
|
8
9
|
protected readonly hide: import("@angular/core").Signal<boolean>;
|
|
9
10
|
protected readonly delta: import("@angular/core").Signal<number>;
|
|
10
11
|
protected readonly color: import("@angular/core").Signal<"" | import("../delta-utils").DeltaColour>;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<BlankNodeValueDeltaComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BlankNodeValueDeltaComponent, "he-blank-node-value-delta", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "originalValue": { "alias": "originalValue"; "required": false; "isSignal": true; }; "displayType": { "alias": "displayType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BlankNodeValueDeltaComponent, "he-blank-node-value-delta", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "originalValue": { "alias": "originalValue"; "required": false; "isSignal": true; }; "displayType": { "alias": "displayType"; "required": false; "isSignal": true; }; "useCustomFunctions": { "alias": "useCustomFunctions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
13
14
|
}
|
|
@@ -2098,13 +2098,14 @@ class BlankNodeValueDeltaComponent {
|
|
|
2098
2098
|
this.value = input();
|
|
2099
2099
|
this.originalValue = input();
|
|
2100
2100
|
this.displayType = input(DeltaDisplayType.percent);
|
|
2101
|
+
this.useCustomFunctions = input(true);
|
|
2101
2102
|
this.DeltaDisplayType = DeltaDisplayType;
|
|
2102
2103
|
this.hide = computed(() => emptyValue(this.value()) || emptyValue(this.originalValue()));
|
|
2103
|
-
this.delta = computed(() => delta(this.value(), this.originalValue(), this.displayType(), customDeltaFuncs));
|
|
2104
|
+
this.delta = computed(() => delta(this.value(), this.originalValue(), this.displayType(), this.useCustomFunctions() ? customDeltaFuncs : undefined));
|
|
2104
2105
|
this.color = computed(() => this.displayType() === DeltaDisplayType.percent ? evaluateSuccess(this.delta()) : '');
|
|
2105
2106
|
}
|
|
2106
2107
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: BlankNodeValueDeltaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2107
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: BlankNodeValueDeltaComponent, isStandalone: true, selector: "he-blank-node-value-delta", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, originalValue: { classPropertyName: "originalValue", publicName: "originalValue", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (!hide()) {\n <small class=\"has-text-{{ color() }}\">\n @if (delta() > 0) {\n <span>+</span>\n }\n @switch (displayType()) {\n @case (DeltaDisplayType.absolute) {\n <span>{{ delta() | precision: 3 }}</span>\n }\n @case (DeltaDisplayType.percent) {\n <span>{{ delta() | number: '1.0-2' }}</span>\n <span>%</span>\n }\n }\n </small>\n}\n", styles: [""], dependencies: [{ kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: BlankNodeValueDeltaComponent, isStandalone: true, selector: "he-blank-node-value-delta", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, originalValue: { classPropertyName: "originalValue", publicName: "originalValue", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, useCustomFunctions: { classPropertyName: "useCustomFunctions", publicName: "useCustomFunctions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (!hide()) {\n <small class=\"has-text-{{ color() }}\">\n @if (delta() > 0) {\n <span>+</span>\n }\n @switch (displayType()) {\n @case (DeltaDisplayType.absolute) {\n <span>{{ delta() | precision: 3 }}</span>\n }\n @case (DeltaDisplayType.percent) {\n <span>{{ delta() | number: '1.0-2' }}</span>\n <span>%</span>\n }\n }\n </small>\n}\n", styles: [""], dependencies: [{ kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2108
2109
|
}
|
|
2109
2110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: BlankNodeValueDeltaComponent, decorators: [{
|
|
2110
2111
|
type: Component$1,
|
|
@@ -5812,7 +5813,10 @@ const nodeDataState = (node) =>
|
|
|
5812
5813
|
node.aggregated && node?.['@type'] === NodeType.ImpactAssessment
|
|
5813
5814
|
? DataState.recalculated
|
|
5814
5815
|
: DataState.original;
|
|
5815
|
-
const urlParams = (dataState, dataVersion) => [
|
|
5816
|
+
const urlParams = (dataState, dataVersion) => [
|
|
5817
|
+
!!dataState && dataState !== DataState.original ? `dataState=${dataState}` : '',
|
|
5818
|
+
dataVersion ? `dataVersion=${dataVersion}` : ''
|
|
5819
|
+
]
|
|
5816
5820
|
.filter(Boolean)
|
|
5817
5821
|
.join('&');
|
|
5818
5822
|
const nodeLink = (node, dataState, dataVersion) => [[node?.['@type']?.toLowerCase(), node?.['@id']].filter(Boolean).join('/'), urlParams(dataState, dataVersion)]
|
|
@@ -6056,7 +6060,7 @@ const groupLogsByModel = (data = '') => data
|
|
|
6056
6060
|
.map(parseMessage)
|
|
6057
6061
|
.filter(v => [hasValue(v?.model), hasValue(v?.term) || hasValue(v?.key)].every(Boolean))
|
|
6058
6062
|
.reduce((group, log) => {
|
|
6059
|
-
const subValue = subValueKeys.find(v => !!log[v]);
|
|
6063
|
+
const subValue = subValueKeys.find(v => !!log[v] && log[v] != 'None');
|
|
6060
6064
|
return subValue && !log.cycle ? groupLogSubValue(group, log, subValue) : groupLog(group, log);
|
|
6061
6065
|
}, {});
|
|
6062
6066
|
const asArray = (values) => (Array.isArray(values) ? values : []);
|
|
@@ -6141,7 +6145,7 @@ const hasRecalculatedValue = (values, key = 'value') => values.some(isRecalculat
|
|
|
6141
6145
|
const filterDeleted = (blankNodes) => (blankNodes || []).filter(value => !value.deleted);
|
|
6142
6146
|
const blankNodeValueByKey = {
|
|
6143
6147
|
property: (values, _k, id) => !!id && values?.length ? (values[0].properties || []).find(p => p.term['@id'] === id)?.value || '' : '',
|
|
6144
|
-
input: (values, _k, id) => !!id && (values || []).filter(v => v['@type'] === SchemaType.Emission).length
|
|
6148
|
+
input: (values, _k, id) => !!id && (values || []).filter(v => v['@type'] === SchemaType.Emission || v['@type'] === SchemaType.Indicator).length
|
|
6145
6149
|
? reduceValues(values.filter(({ inputs }) => (inputs || []).some(input => input['@id'] === id)), id)
|
|
6146
6150
|
: '',
|
|
6147
6151
|
transformation: (values, _k, id) => values.length
|
|
@@ -6287,7 +6291,7 @@ mergeSubValues([
|
|
|
6287
6291
|
};
|
|
6288
6292
|
})
|
|
6289
6293
|
.filter(({ originalValue, recalculatedValue, configModels }) => [originalValue !== '', recalculatedValue !== '', !!configModels?.length].some(Boolean))
|
|
6290
|
-
.map(v =>
|
|
6294
|
+
.map(v => ['input'].includes(v.key) ? dataWithConfigModelLogs(allLogs, termId)(v) : dataWithConfigModelLogs(logs, termId)(v));
|
|
6291
6295
|
const logKeys = (logs, original, recalculated, { nodeType, type, termId }) => Object.keys(logs)
|
|
6292
6296
|
.filter(key => logs[key].isKey && !subValueKeys.includes(key))
|
|
6293
6297
|
.map(key => ({
|
|
@@ -6390,9 +6394,16 @@ const configModelWithLogs = (data, logs, previousModelSuccess = false) => (model
|
|
|
6390
6394
|
*/
|
|
6391
6395
|
const hasPreviousModelSuccess = (models, index = 0) => filterConfigModels(models[index], keepConfigModelByStatus(LogStatus.success)).length > 0 ||
|
|
6392
6396
|
(index <= models.length && hasPreviousModelSuccess(models, index + 1));
|
|
6393
|
-
const dataWithConfigModelLogs = (logs) => (data) => {
|
|
6397
|
+
const dataWithConfigModelLogs = (logs, termId) => (data) => {
|
|
6394
6398
|
const subLogKey = data.blankNode ? subValueLogKey(data) : null;
|
|
6395
|
-
const log = subLogKey ? logs[subLogKey] : logs;
|
|
6399
|
+
const log = (subLogKey ? logs[subLogKey] : null) || logs;
|
|
6400
|
+
const termsLog = termId in log && data.key === 'input'
|
|
6401
|
+
? log[termId].models.reduce((p, c) => {
|
|
6402
|
+
// extend requirements
|
|
6403
|
+
p[c].requirements = log[c].requirements;
|
|
6404
|
+
return p;
|
|
6405
|
+
}, log[termId])
|
|
6406
|
+
: log;
|
|
6396
6407
|
const configModels = [];
|
|
6397
6408
|
// go through models one by one to handle cases where next models in hierarchy have failed
|
|
6398
6409
|
for (const index in data.configModels) {
|
|
@@ -6400,8 +6411,8 @@ const dataWithConfigModelLogs = (logs) => (data) => {
|
|
|
6400
6411
|
const model = data.configModels[index];
|
|
6401
6412
|
const previousModelSuccess = +index > 0 && hasPreviousModelSuccess(configModels);
|
|
6402
6413
|
const newModel = Array.isArray(model)
|
|
6403
|
-
? model.map(configModelWithLogs(data,
|
|
6404
|
-
: configModelWithLogs(data,
|
|
6414
|
+
? model.map(configModelWithLogs(data, termsLog, previousModelSuccess))
|
|
6415
|
+
: configModelWithLogs(data, termsLog, previousModelSuccess)(model);
|
|
6405
6416
|
configModels.push(newModel);
|
|
6406
6417
|
}
|
|
6407
6418
|
}
|
|
@@ -6462,11 +6473,9 @@ const groupLogsByTerm = (node, logs, config, allOriginalValues, allRecalculatedV
|
|
|
6462
6473
|
const configModels = groupParallelModels(config, termId, nodeKey, unique([
|
|
6463
6474
|
// remove completeness as should be using `groupdLogsByKey`
|
|
6464
6475
|
...(termLogs.models || []).filter(isModelLog(termLogs, type)).filter(v => !isNonNodeModelKey(v))
|
|
6465
|
-
// ...findConfigModels(config, termId, nodeKey!, models).map(({ model }) => model as string)
|
|
6466
6476
|
]).map(configModelWithDocs(configModelsData)));
|
|
6467
6477
|
const keys = logKeys(termLogs, original, recalculated, configModelsData);
|
|
6468
|
-
|
|
6469
|
-
const subValues = [NodeType.ImpactAssessment].includes(nodeType$1)
|
|
6478
|
+
const subValues = [[NodeType.ImpactAssessment].includes(nodeType$1), termType !== TermTermType.resourceUse].every(Boolean)
|
|
6470
6479
|
? []
|
|
6471
6480
|
: logSubValues(node, logs, termLogs, original, recalculated, configModelsData);
|
|
6472
6481
|
const isRequired = !Object.values(termLogs)
|
|
@@ -6897,7 +6906,7 @@ class NodeLogsModelsComponent {
|
|
|
6897
6906
|
});
|
|
6898
6907
|
}
|
|
6899
6908
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NodeLogsModelsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6900
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: NodeLogsModelsComponent, isStandalone: true, selector: "he-node-logs-models", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, nodeKey: { classPropertyName: "nodeKey", publicName: "nodeKey", isSignal: true, isRequired: true, transformFunction: null }, originalValues: { classPropertyName: "originalValues", publicName: "originalValues", isSignal: true, isRequired: false, transformFunction: null }, recalculatedValues: { classPropertyName: "recalculatedValues", publicName: "recalculatedValues", isSignal: true, isRequired: false, transformFunction: null }, terms: { classPropertyName: "terms", publicName: "terms", isSignal: true, isRequired: false, transformFunction: null }, filterTermTypes: { classPropertyName: "filterTermTypes", publicName: "filterTermTypes", isSignal: true, isRequired: false, transformFunction: null }, filterTermTypesLabel: { classPropertyName: "filterTermTypesLabel", publicName: "filterTermTypesLabel", isSignal: true, isRequired: false, transformFunction: null }, logsKey: { classPropertyName: "logsKey", publicName: "logsKey", isSignal: true, isRequired: false, transformFunction: null }, noDataMessage: { classPropertyName: "noDataMessage", publicName: "noDataMessage", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"is-px-3 is-pb-3\">\n @if (!isExternal && logsUrl()) {\n <div class=\"has-text-right is-mb-2\">\n <a class=\"is-size-7\" [href]=\"logsUrl()\" target=\"_blank\">\n <span>Open Full Logs</span>\n <he-svg-icon name=\"external-link\" class=\"ml-2\" />\n </a>\n </div>\n }\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" maxHeight=\"320\">\n <table class=\"table is-fullwidth is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto has-border-right\">\n @if (enableFilterByTerm()) {\n <div class=\"field\">\n <div class=\"control is-expanded has-icons-right\">\n <input\n class=\"input search-input is-small\"\n [ngModel]=\"term()\"\n name=\"term\"\n placeholder=\"Select entry by name\"\n [ngbTypeahead]=\"suggestTerm\"\n [focusFirst]=\"true\"\n (focus)=\"typeaheadFocus($event)\"\n (selectItem)=\"term.set($event.item)\"\n container=\"body\"\n popupClass=\"is-small\" />\n <a class=\"icon is-small is-right\" [class.is-hidden]=\"!term()\" (click)=\"term.set('')\">\n <he-svg-icon name=\"xmark\" />\n </a>\n </div>\n </div>\n }\n </th>\n @if (isBlankNodes()) {\n <th>\n <span class=\"is-pr-1\">Units</span>\n @if (functionalUnit()) {\n <span>(per </span>\n <span>{{ functionalUnit() }}</span>\n <span>)</span>\n }\n </th>\n }\n <th>Original</th>\n <th>Recalculated</th>\n @if (isBlankNodes()) {\n <th>Difference</th>\n }\n @for (c of methodModelsCount() | times; track i; let i = $index) {\n <th>({{ i + 1 }})</th>\n }\n </tr>\n </thead>\n <tbody>\n @if (loading()) {\n <tr>\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <he-svg-icon name=\"loading\" animation=\"spin\" size=\"40\" />\n </div>\n </td>\n </tr>\n } @else if (blankNodes().length === 0) {\n <tr>\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>{{ noDataMessage() || 'No original data was provided and no gap filling occurred.' }}</span>\n </td>\n </tr>\n }\n @for (blankNode of blankNodes(); track trackByBlankNode($index, blankNode)) {\n <tr [class.has-sub-rows]=\"blankNode.canOpen\" [class.is-open]=\"blankNode.isOpen\">\n <td\n class=\"width-auto has-border-right is-nowrap\"\n [attr.title]=\"$any(blankNode).term?.name || $any(blankNode).key\">\n @if (blankNode.canOpen) {\n <a class=\"is-inline-block is-align-top pr-2 open-node\" (click)=\"blankNode.isOpen = !blankNode.isOpen\">\n <he-svg-icon [name]=\"blankNode.isOpen ? 'chevron-down' : 'chevron-right'\" />\n </a>\n }\n @if ($any(blankNode).term) {\n <he-node-link class=\"is-inline-block is-pre-wrap\" [node]=\"$any(blankNode).term\">\n <span [innerHtml]=\"$any(blankNode).term.name | compound: $any(blankNode).term.termType\"></span>\n </he-node-link>\n }\n @if ($any(blankNode).key) {\n @if (nodeKey() === 'completeness') {\n <a [href]=\"schemaBaseUrl + '/Completeness#' + $any(blankNode).key\" target=\"_blank\">\n <span>{{ $any(blankNode).key | keyToLabel }}</span>\n </a>\n }\n } @else {\n <span>{{ $any(blankNode).key }}</span>\n }\n </td>\n @if (isBlankNodes()) {\n <td>\n @if ($any(blankNode).term) {\n <span\n class=\"is-nowrap\"\n [innerHtml]=\"$any(blankNode).term.units | compound: $any(blankNode).term.termType\"></span>\n }\n </td>\n }\n <td>\n <ng-template #originalValueContent>\n <span>{{ $any(blankNode).originalValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n {{ $any(blankNode).originalValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n }\n } @else {\n <span\n [class.trigger-popover]=\"!!$any(blankNode).original?.[0]?.methodModel\"\n [ngbPopover]=\"blankNodeOriginalValueDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n placement=\"bottom left right auto\"\n container=\"body\"\n [disablePopover]=\"!$any(blankNode).original?.[0]?.methodModel\"\n [popoverContext]=\"{ blankNode }\">\n <span pointer>\n {{ $any(blankNode).originalValue | precision: 3 | default: '-' }}\n </span>\n </span>\n }\n </td>\n <td>\n @if (!blankNode.isOriginal || blankNode.isRecalculated) {\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n {{ $any(blankNode).recalculatedValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n }\n } @else {\n <span>{{ blankNode.recalculatedValue | precision: 3 | default: '-' }}</span>\n }\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td class=\"is-nowrap\">\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n @if (\n $any(blankNode).originalValueByMethodId[model.methodId] !== null &&\n $any(blankNode).recalculatedValueByMethodId[model.methodId] !== null\n ) {\n <he-blank-node-value-delta\n [value]=\"$any(blankNode).recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"$any(blankNode).originalValueByMethodId[model.methodId]\" />\n } @else {\n -\n }\n </div>\n }\n } @else {\n @if ($any(blankNode).original.length && blankNode.isRecalculated) {\n <he-blank-node-value-delta\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"$any(blankNode).originalValue\" />\n } @else {\n -\n }\n }\n </td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: blankNode }\" />\n </tr>\n @for (subValue of $any(blankNode).keys; track trackBySubValue(subValue)) {\n <tr\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"$any(blankNode).subValues?.length\"\n [class.is-sub-row]=\"blankNode.canOpen\">\n <td class=\"width-auto has-border-right is-nowrap\">\n <span class=\"is-inline-block is-align-top pl-3 pr-1 field-node\">Field:</span>\n @if (blankNode.type) {\n <a\n class=\"is-inline-block is-pre-wrap\"\n [href]=\"schemaBaseUrl + '/' + blankNode.type + '#' + subValue.key\"\n target=\"_blank\"\n [title]=\"subValue.key\">\n <span>{{ subValue.key }}</span>\n </a>\n }\n @if (!blankNode.type) {\n <span class=\"is-inline-block is-align-top\">{{ subValue.key }}</span>\n }\n </td>\n @if (isBlankNodes()) {\n <td></td>\n }\n <td>\n @if (subValue.originalValue !== null) {\n <span>\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n -\n }\n </td>\n <td>\n @if (subValue.isRecalculated || subValue.key === 'impactAssessment') {\n <span>\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td>-</td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\" />\n </tr>\n }\n @for (subValue of $any(blankNode).subValues; track trackBySubValue(subValue)) {\n @let term = subValue.term || termById(subValue.id);\n <tr [class.is-hidden]=\"!blankNode.isOpen\" [class.is-sub-row]=\"blankNode.canOpen\">\n <td class=\"width-auto has-border-right\">\n <span class=\"is-inline-block is-align-top pl-3\">{{ subValue.key | keyToLabel }}</span>\n @if (subValue.id) {\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n @switch (subValue.key) {\n @case ('backgroundData') {\n <span class=\"is-inline-block\">{{ term?.name }}</span>\n }\n @default {\n <he-node-link class=\"is-block pl-4\" [node]=\"term\" [attr.title]=\"term?.name\">\n <span [innerHtml]=\"term?.name | compound\"></span>\n </he-node-link>\n }\n }\n }\n </td>\n @if (isBlankNodes()) {\n <td>\n @if (subValue.showUnits && $any(blankNode).term) {\n <span\n class=\"is-nowrap\"\n [innerHtml]=\"$any(blankNode).term.units | compound: $any(blankNode).term.termType\"></span>\n }\n </td>\n }\n <td>\n @if (subValue.originalValue !== null) {\n <span>\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n -\n }\n </td>\n <td>\n @if (subValue.isRecalculated) {\n <span>\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td>-</td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\" />\n </tr>\n }\n }\n </tbody>\n </table>\n </he-data-table>\n <div class=\"is-size-7 is-italic\">\n <div class=\"columns is-variable is-1 my-0\">\n <div class=\"column is-narrow\">\n <p>\n <a class=\"is-inline-block pr-2\" (click)=\"showLegend.set(!showLegend())\">\n <he-svg-icon [name]=\"showLegend() ? 'chevron-down' : 'chevron-right'\" />\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n @if (showLegend()) {\n <ul class=\"content pl-2\">\n @for (status of LogStatus | keyvalue; track status.value) {\n @if (logIcon[status.value]) {\n <li class=\"has-text-{{ logColor[status.value] }}\">\n <he-svg-icon [name]=\"logIcon[status.value]\" />\n <span class=\"pl-1\">{{ status.value }}</span>\n </li>\n }\n }\n </ul>\n }\n </div>\n @if (filteredType()) {\n <div class=\"column has-text-right\">\n <label class=\"is-inline-block checkbox\">\n <input\n type=\"checkbox\"\n class=\"selector\"\n [ngModel]=\"onlyRequired\"\n (change)=\"onlyRequired.set($event.target.checked)\"\n [disabled]=\"!!term()\" />\n <span class=\"ml-2\">\n Show only {{ filteredType() }} terms included in the default HESTIA system boundary\n </span>\n </label>\n </div>\n }\n </div>\n </div>\n</div>\n\n<ng-template #blankNodeOriginalValueDetails let-blankNode=\"blankNode\">\n <span class=\"is-pr-1\">The original value was reported using:</span>\n <he-node-link\n class=\"is-inline-block\"\n linkClass=\"is-dark\"\n [node]=\"$any(blankNode).original[0].methodModel\"\n [showExternalLink]=\"true\">\n <span>{{ $any(blankNode).original[0].methodModel.name }}</span>\n </he-node-link>\n</ng-template>\n\n<ng-template #blankNodeModels let-data=\"data\">\n <ng-template #notInSystemBoundary>\n <td [attr.colspan]=\"methodModelsCount()\">\n <span>Not in HESTIA system boundary</span>\n </td>\n </ng-template>\n\n @if (isSystemBoundary(data)) {\n @for (configModel of methodModelsCount() | times; track configModelIndex; let configModelIndex = $index) {\n <td class=\"blank-node-index-{{ configModelIndex }}\">\n @if (getModelsAt(data, configModelIndex); as models) {\n @if ($any(models) | isArray) {\n <div>\n @for (model of $any(models); track model.methodId) {\n <p>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model, data }\" />\n </p>\n }\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model: models, data }\" />\n }\n } @else {\n -\n }\n </td>\n }\n } @else {\n -\n }\n</ng-template>\n\n<ng-template #blankNodeModel let-model=\"model\" let-data=\"data\">\n <span\n class=\"is-nowrap\"\n [class.trigger-popover]=\"model.showLogs\"\n [ngbPopover]=\"logDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"bottom left right auto\"\n container=\"body\"\n (click)=\"p.isOpen() ? p.close() : model.showLogs ? p.open({ logs: model.logs }) : null\">\n <span>\n <span class=\"is-capitalized\">{{ methodName(model) }}</span>\n @if (model.logs?.methodTier || model.model?.methodTier) {\n <span> [{{ model.logs?.methodTier || model.model?.methodTier }}]</span>\n }\n </span>\n\n <span\n class=\"pl-1 has-text-{{ logColor[model.status] }} trigger-popover\"\n [ngbPopover]=\"logStatusDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p1=\"ngbPopover\"\n placement=\"bottom left right auto\"\n container=\"body\"\n (click)=\"$event.stopPropagation(); p1.isOpen() ? p1.close() : p1.open({ model, data })\">\n <he-svg-icon [name]=\"logIcon[model.status]\" />\n </span>\n\n @if (model.model) {\n <span class=\"pl-1\">\n (\n <ng-container *ngTemplateOutlet=\"docsLink; context: { $implicit: model.model }\" />\n )\n </span>\n }\n </span>\n</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <he-node-logs-models-logs [logs]=\"logs\" />\n</ng-template>\n\n<ng-template #logStatusDetails let-model=\"model\" let-data=\"data\">\n <he-node-logs-models-logs-status [nodeType]=\"nodeType()\" [model]=\"model\" [data]=\"\" />\n</ng-template>\n\n<ng-template #docsLink let-model>\n <a [href]=\"model.apiDocsPath || model.docPath || model.path\" target=\"_blank\" (click)=\"$event.stopPropagation()\">\n <span>Docs</span>\n <he-svg-icon name=\"external-link\" class=\"ml-2\" />\n </a>\n</ng-template>\n", styles: [":host{display:block}::ng-deep .table{background-color:transparent}::ng-deep .table td he-node-link{width:190px}@media screen and (max-width: 767px){::ng-deep .table td he-node-link{width:150px}}::ng-deep .table td .open-node+he-node-link{width:170px}@media screen and (max-width: 767px){::ng-deep .table td .open-node+he-node-link{width:130px}}::ng-deep .table td.has-border-right{box-shadow:1px 0 #6c8093}::ng-deep .table .has-sub-rows.is-open>td:first-child:before,::ng-deep .table .is-sub-row>td:first-child:before{display:block;position:absolute;content:\" \";background-color:#6c809333;height:100%;width:1px;top:0;left:12px}::ng-deep .table .has-sub-rows.is-open>td:first-child:before{top:25px}::ng-deep .table .popover-body .table-container{max-height:260px;overflow-y:auto}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "selectOnExact", "showHint", "placement", "popperOptions", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "dataState", "showExternalLink", "linkClass"] }, { kind: "component", type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: KeyToLabelPipe, name: "keyToLabel" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }, { kind: "pipe", type: TimesPipe, name: "times" }, { kind: "pipe", type: IsArrayPipe, name: "isArray" }, { kind: "component", type: NodeLogsModelsLogsComponent, selector: "he-node-logs-models-logs", inputs: ["logs"] }, { kind: "component", type: NodeLogsModelsLogsStatusComponent, selector: "he-node-logs-models-logs-status", inputs: ["nodeType", "model", "data"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6909
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: NodeLogsModelsComponent, isStandalone: true, selector: "he-node-logs-models", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, nodeKey: { classPropertyName: "nodeKey", publicName: "nodeKey", isSignal: true, isRequired: true, transformFunction: null }, originalValues: { classPropertyName: "originalValues", publicName: "originalValues", isSignal: true, isRequired: false, transformFunction: null }, recalculatedValues: { classPropertyName: "recalculatedValues", publicName: "recalculatedValues", isSignal: true, isRequired: false, transformFunction: null }, terms: { classPropertyName: "terms", publicName: "terms", isSignal: true, isRequired: false, transformFunction: null }, filterTermTypes: { classPropertyName: "filterTermTypes", publicName: "filterTermTypes", isSignal: true, isRequired: false, transformFunction: null }, filterTermTypesLabel: { classPropertyName: "filterTermTypesLabel", publicName: "filterTermTypesLabel", isSignal: true, isRequired: false, transformFunction: null }, logsKey: { classPropertyName: "logsKey", publicName: "logsKey", isSignal: true, isRequired: false, transformFunction: null }, noDataMessage: { classPropertyName: "noDataMessage", publicName: "noDataMessage", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"is-px-3 is-pb-3\">\n @if (!isExternal && logsUrl()) {\n <div class=\"has-text-right is-mb-2\">\n <a class=\"is-size-7\" [href]=\"logsUrl()\" target=\"_blank\">\n <span>Open Full Logs</span>\n <he-svg-icon name=\"external-link\" class=\"ml-2\" />\n </a>\n </div>\n }\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" maxHeight=\"320\">\n <table class=\"table is-fullwidth is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto has-border-right\">\n @if (enableFilterByTerm()) {\n <div class=\"field\">\n <div class=\"control is-expanded has-icons-right\">\n <input\n class=\"input search-input is-small\"\n [ngModel]=\"term()\"\n name=\"term\"\n placeholder=\"Select entry by name\"\n [ngbTypeahead]=\"suggestTerm\"\n [focusFirst]=\"true\"\n (focus)=\"typeaheadFocus($event)\"\n (selectItem)=\"term.set($event.item)\"\n container=\"body\"\n popupClass=\"is-small\" />\n <a class=\"icon is-small is-right\" [class.is-hidden]=\"!term()\" (click)=\"term.set('')\">\n <he-svg-icon name=\"xmark\" />\n </a>\n </div>\n </div>\n }\n </th>\n @if (isBlankNodes()) {\n <th>\n <span class=\"is-pr-1\">Units</span>\n @if (functionalUnit()) {\n <span>(per </span>\n <span>{{ functionalUnit() }}</span>\n <span>)</span>\n }\n </th>\n }\n <th>Original</th>\n <th>Recalculated</th>\n @if (isBlankNodes()) {\n <th>Difference</th>\n }\n @for (c of methodModelsCount() | times; track i; let i = $index) {\n <th>({{ i + 1 }})</th>\n }\n </tr>\n </thead>\n <tbody>\n @if (loading()) {\n <tr>\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <he-svg-icon name=\"loading\" animation=\"spin\" size=\"40\" />\n </div>\n </td>\n </tr>\n } @else if (blankNodes().length === 0) {\n <tr>\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>{{ noDataMessage() || 'No original data was provided and no gap filling occurred.' }}</span>\n </td>\n </tr>\n }\n @for (blankNode of blankNodes(); track trackByBlankNode($index, blankNode)) {\n <tr [class.has-sub-rows]=\"blankNode.canOpen\" [class.is-open]=\"blankNode.isOpen\">\n <td\n class=\"width-auto has-border-right is-nowrap\"\n [attr.title]=\"$any(blankNode).term?.name || $any(blankNode).key\">\n @if (blankNode.canOpen) {\n <a class=\"is-inline-block is-align-top pr-2 open-node\" (click)=\"blankNode.isOpen = !blankNode.isOpen\">\n <he-svg-icon [name]=\"blankNode.isOpen ? 'chevron-down' : 'chevron-right'\" />\n </a>\n }\n @if ($any(blankNode).term) {\n <he-node-link class=\"is-inline-block is-pre-wrap\" [node]=\"$any(blankNode).term\">\n <span [innerHtml]=\"$any(blankNode).term.name | compound: $any(blankNode).term.termType\"></span>\n </he-node-link>\n }\n @if ($any(blankNode).key) {\n @if (nodeKey() === 'completeness') {\n <a [href]=\"schemaBaseUrl + '/Completeness#' + $any(blankNode).key\" target=\"_blank\">\n <span>{{ $any(blankNode).key | keyToLabel }}</span>\n </a>\n }\n } @else {\n <span>{{ $any(blankNode).key }}</span>\n }\n </td>\n @if (isBlankNodes()) {\n <td>\n @if ($any(blankNode).term) {\n <span\n class=\"is-nowrap\"\n [innerHtml]=\"$any(blankNode).term.units | compound: $any(blankNode).term.termType\"></span>\n }\n </td>\n }\n <td>\n <ng-template #originalValueContent>\n <span>{{ $any(blankNode).originalValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n {{ $any(blankNode).originalValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n }\n } @else {\n <span\n [class.trigger-popover]=\"!!$any(blankNode).original?.[0]?.methodModel\"\n [ngbPopover]=\"blankNodeOriginalValueDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n placement=\"bottom left right auto\"\n container=\"body\"\n [disablePopover]=\"!$any(blankNode).original?.[0]?.methodModel\"\n [popoverContext]=\"{ blankNode }\">\n <span pointer>\n {{ $any(blankNode).originalValue | precision: 3 | default: '-' }}\n </span>\n </span>\n }\n </td>\n <td>\n @if (!blankNode.isOriginal || blankNode.isRecalculated) {\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n {{ $any(blankNode).recalculatedValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n }\n } @else {\n <span>{{ blankNode.recalculatedValue | precision: 3 | default: '-' }}</span>\n }\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td class=\"is-nowrap\">\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n @if (\n $any(blankNode).originalValueByMethodId[model.methodId] !== null &&\n $any(blankNode).recalculatedValueByMethodId[model.methodId] !== null\n ) {\n <he-blank-node-value-delta\n [value]=\"$any(blankNode).recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"$any(blankNode).originalValueByMethodId[model.methodId]\"\n [useCustomFunctions]=\"false\" />\n } @else {\n -\n }\n </div>\n }\n } @else {\n @if ($any(blankNode).original.length && blankNode.isRecalculated) {\n <he-blank-node-value-delta\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"$any(blankNode).originalValue\"\n [useCustomFunctions]=\"false\" />\n } @else {\n -\n }\n }\n </td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: blankNode }\" />\n </tr>\n @for (subValue of $any(blankNode).keys; track trackBySubValue(subValue)) {\n <tr\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"$any(blankNode).subValues?.length\"\n [class.is-sub-row]=\"blankNode.canOpen\">\n <td class=\"width-auto has-border-right is-nowrap\">\n <span class=\"is-inline-block is-align-top pl-3 pr-1 field-node\">Field:</span>\n @if (blankNode.type) {\n <a\n class=\"is-inline-block is-pre-wrap\"\n [href]=\"schemaBaseUrl + '/' + blankNode.type + '#' + subValue.key\"\n target=\"_blank\"\n [title]=\"subValue.key\">\n <span>{{ subValue.key }}</span>\n </a>\n }\n @if (!blankNode.type) {\n <span class=\"is-inline-block is-align-top\">{{ subValue.key }}</span>\n }\n </td>\n @if (isBlankNodes()) {\n <td></td>\n }\n <td>\n @if (subValue.originalValue !== null) {\n <span>\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n -\n }\n </td>\n <td>\n @if (subValue.isRecalculated || subValue.key === 'impactAssessment') {\n <span>\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td>-</td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\" />\n </tr>\n }\n @for (subValue of $any(blankNode).subValues; track trackBySubValue(subValue)) {\n @let term = subValue.term || termById(subValue.id);\n <tr [class.is-hidden]=\"!blankNode.isOpen\" [class.is-sub-row]=\"blankNode.canOpen\">\n <td class=\"width-auto has-border-right\">\n <span class=\"is-inline-block is-align-top pl-3\">{{ subValue.key | keyToLabel }}</span>\n @if (subValue.id) {\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n @switch (subValue.key) {\n @case ('backgroundData') {\n <span class=\"is-inline-block\">{{ term?.name }}</span>\n }\n @default {\n <he-node-link class=\"is-block pl-4\" [node]=\"term\" [attr.title]=\"term?.name\">\n <span [innerHtml]=\"term?.name | compound\"></span>\n </he-node-link>\n }\n }\n }\n </td>\n @if (isBlankNodes()) {\n <td>\n @if (subValue.showUnits && $any(blankNode).term) {\n <span\n class=\"is-nowrap\"\n [innerHtml]=\"$any(blankNode).term.units | compound: $any(blankNode).term.termType\"></span>\n }\n </td>\n }\n <td>\n @if (subValue.originalValue !== null) {\n <span>\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n -\n }\n </td>\n <td>\n @if (subValue.isRecalculated) {\n <span>\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td>-</td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\" />\n </tr>\n }\n }\n </tbody>\n </table>\n </he-data-table>\n <div class=\"is-size-7 is-italic\">\n <div class=\"columns is-variable is-1 my-0\">\n <div class=\"column is-narrow\">\n <p>\n <a class=\"is-inline-block pr-2\" (click)=\"showLegend.set(!showLegend())\">\n <he-svg-icon [name]=\"showLegend() ? 'chevron-down' : 'chevron-right'\" />\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n @if (showLegend()) {\n <ul class=\"content pl-2\">\n @for (status of LogStatus | keyvalue; track status.value) {\n @if (logIcon[status.value]) {\n <li class=\"has-text-{{ logColor[status.value] }}\">\n <he-svg-icon [name]=\"logIcon[status.value]\" />\n <span class=\"pl-1\">{{ status.value }}</span>\n </li>\n }\n }\n </ul>\n }\n </div>\n @if (filteredType()) {\n <div class=\"column has-text-right\">\n <label class=\"is-inline-block checkbox\">\n <input\n type=\"checkbox\"\n class=\"selector\"\n [ngModel]=\"onlyRequired\"\n (change)=\"onlyRequired.set($event.target.checked)\"\n [disabled]=\"!!term()\" />\n <span class=\"ml-2\">\n Show only {{ filteredType() }} terms included in the default HESTIA system boundary\n </span>\n </label>\n </div>\n }\n </div>\n </div>\n</div>\n\n<ng-template #blankNodeOriginalValueDetails let-blankNode=\"blankNode\">\n <span class=\"is-pr-1\">The original value was reported using:</span>\n <he-node-link\n class=\"is-inline-block\"\n linkClass=\"is-dark\"\n [node]=\"$any(blankNode).original[0].methodModel\"\n [showExternalLink]=\"true\">\n <span>{{ $any(blankNode).original[0].methodModel.name }}</span>\n </he-node-link>\n</ng-template>\n\n<ng-template #blankNodeModels let-data=\"data\">\n <ng-template #notInSystemBoundary>\n <td [attr.colspan]=\"methodModelsCount()\">\n <span>Not in HESTIA system boundary</span>\n </td>\n </ng-template>\n\n @if (isSystemBoundary(data)) {\n @for (configModel of methodModelsCount() | times; track configModelIndex; let configModelIndex = $index) {\n <td class=\"blank-node-index-{{ configModelIndex }}\">\n @if (getModelsAt(data, configModelIndex); as models) {\n @if ($any(models) | isArray) {\n <div>\n @for (model of $any(models); track model.methodId) {\n <p>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model, data }\" />\n </p>\n }\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model: models, data }\" />\n }\n } @else {\n -\n }\n </td>\n }\n } @else {\n -\n }\n</ng-template>\n\n<ng-template #blankNodeModel let-model=\"model\" let-data=\"data\">\n <span\n class=\"is-nowrap\"\n [class.trigger-popover]=\"model.showLogs\"\n [ngbPopover]=\"logDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"bottom left right auto\"\n container=\"body\"\n (click)=\"p.isOpen() ? p.close() : model.showLogs ? p.open({ logs: model.logs }) : null\">\n <span>\n <span class=\"is-capitalized\">{{ methodName(model) }}</span>\n @if (model.logs?.methodTier || model.model?.methodTier) {\n <span> [{{ model.logs?.methodTier || model.model?.methodTier }}]</span>\n }\n </span>\n\n <span\n class=\"pl-1 has-text-{{ logColor[model.status] }} trigger-popover\"\n [ngbPopover]=\"logStatusDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p1=\"ngbPopover\"\n placement=\"bottom left right auto\"\n container=\"body\"\n (click)=\"$event.stopPropagation(); p1.isOpen() ? p1.close() : p1.open({ model, data })\">\n <he-svg-icon [name]=\"logIcon[model.status]\" />\n </span>\n\n @if (model.model) {\n <span class=\"pl-1\">\n (\n <ng-container *ngTemplateOutlet=\"docsLink; context: { $implicit: model.model }\" />\n )\n </span>\n }\n </span>\n</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <he-node-logs-models-logs [logs]=\"logs\" />\n</ng-template>\n\n<ng-template #logStatusDetails let-model=\"model\" let-data=\"data\">\n <he-node-logs-models-logs-status [nodeType]=\"nodeType()\" [model]=\"model\" [data]=\"\" />\n</ng-template>\n\n<ng-template #docsLink let-model>\n <a [href]=\"model.apiDocsPath || model.docPath || model.path\" target=\"_blank\" (click)=\"$event.stopPropagation()\">\n <span>Docs</span>\n <he-svg-icon name=\"external-link\" class=\"ml-2\" />\n </a>\n</ng-template>\n", styles: [":host{display:block}::ng-deep .table{background-color:transparent}::ng-deep .table td he-node-link{width:190px}@media screen and (max-width: 767px){::ng-deep .table td he-node-link{width:150px}}::ng-deep .table td .open-node+he-node-link{width:170px}@media screen and (max-width: 767px){::ng-deep .table td .open-node+he-node-link{width:130px}}::ng-deep .table td.has-border-right{box-shadow:1px 0 #6c8093}::ng-deep .table .has-sub-rows.is-open>td:first-child:before,::ng-deep .table .is-sub-row>td:first-child:before{display:block;position:absolute;content:\" \";background-color:#6c809333;height:100%;width:1px;top:0;left:12px}::ng-deep .table .has-sub-rows.is-open>td:first-child:before{top:25px}::ng-deep .table .popover-body .table-container{max-height:260px;overflow-y:auto}\n"], dependencies: [{ kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "selectOnExact", "showHint", "placement", "popperOptions", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "dataState", "showExternalLink", "linkClass"] }, { kind: "component", type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType", "useCustomFunctions"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: KeyToLabelPipe, name: "keyToLabel" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }, { kind: "pipe", type: TimesPipe, name: "times" }, { kind: "pipe", type: IsArrayPipe, name: "isArray" }, { kind: "component", type: NodeLogsModelsLogsComponent, selector: "he-node-logs-models-logs", inputs: ["logs"] }, { kind: "component", type: NodeLogsModelsLogsStatusComponent, selector: "he-node-logs-models-logs-status", inputs: ["nodeType", "model", "data"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6901
6910
|
}
|
|
6902
6911
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NodeLogsModelsComponent, decorators: [{
|
|
6903
6912
|
type: Component$1,
|
|
@@ -6920,7 +6929,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
6920
6929
|
NodeLogsModelsLogsComponent,
|
|
6921
6930
|
NodeLogsModelsLogsStatusComponent,
|
|
6922
6931
|
HESvgIconComponent
|
|
6923
|
-
], template: "<div class=\"is-px-3 is-pb-3\">\n @if (!isExternal && logsUrl()) {\n <div class=\"has-text-right is-mb-2\">\n <a class=\"is-size-7\" [href]=\"logsUrl()\" target=\"_blank\">\n <span>Open Full Logs</span>\n <he-svg-icon name=\"external-link\" class=\"ml-2\" />\n </a>\n </div>\n }\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" maxHeight=\"320\">\n <table class=\"table is-fullwidth is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto has-border-right\">\n @if (enableFilterByTerm()) {\n <div class=\"field\">\n <div class=\"control is-expanded has-icons-right\">\n <input\n class=\"input search-input is-small\"\n [ngModel]=\"term()\"\n name=\"term\"\n placeholder=\"Select entry by name\"\n [ngbTypeahead]=\"suggestTerm\"\n [focusFirst]=\"true\"\n (focus)=\"typeaheadFocus($event)\"\n (selectItem)=\"term.set($event.item)\"\n container=\"body\"\n popupClass=\"is-small\" />\n <a class=\"icon is-small is-right\" [class.is-hidden]=\"!term()\" (click)=\"term.set('')\">\n <he-svg-icon name=\"xmark\" />\n </a>\n </div>\n </div>\n }\n </th>\n @if (isBlankNodes()) {\n <th>\n <span class=\"is-pr-1\">Units</span>\n @if (functionalUnit()) {\n <span>(per </span>\n <span>{{ functionalUnit() }}</span>\n <span>)</span>\n }\n </th>\n }\n <th>Original</th>\n <th>Recalculated</th>\n @if (isBlankNodes()) {\n <th>Difference</th>\n }\n @for (c of methodModelsCount() | times; track i; let i = $index) {\n <th>({{ i + 1 }})</th>\n }\n </tr>\n </thead>\n <tbody>\n @if (loading()) {\n <tr>\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <he-svg-icon name=\"loading\" animation=\"spin\" size=\"40\" />\n </div>\n </td>\n </tr>\n } @else if (blankNodes().length === 0) {\n <tr>\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>{{ noDataMessage() || 'No original data was provided and no gap filling occurred.' }}</span>\n </td>\n </tr>\n }\n @for (blankNode of blankNodes(); track trackByBlankNode($index, blankNode)) {\n <tr [class.has-sub-rows]=\"blankNode.canOpen\" [class.is-open]=\"blankNode.isOpen\">\n <td\n class=\"width-auto has-border-right is-nowrap\"\n [attr.title]=\"$any(blankNode).term?.name || $any(blankNode).key\">\n @if (blankNode.canOpen) {\n <a class=\"is-inline-block is-align-top pr-2 open-node\" (click)=\"blankNode.isOpen = !blankNode.isOpen\">\n <he-svg-icon [name]=\"blankNode.isOpen ? 'chevron-down' : 'chevron-right'\" />\n </a>\n }\n @if ($any(blankNode).term) {\n <he-node-link class=\"is-inline-block is-pre-wrap\" [node]=\"$any(blankNode).term\">\n <span [innerHtml]=\"$any(blankNode).term.name | compound: $any(blankNode).term.termType\"></span>\n </he-node-link>\n }\n @if ($any(blankNode).key) {\n @if (nodeKey() === 'completeness') {\n <a [href]=\"schemaBaseUrl + '/Completeness#' + $any(blankNode).key\" target=\"_blank\">\n <span>{{ $any(blankNode).key | keyToLabel }}</span>\n </a>\n }\n } @else {\n <span>{{ $any(blankNode).key }}</span>\n }\n </td>\n @if (isBlankNodes()) {\n <td>\n @if ($any(blankNode).term) {\n <span\n class=\"is-nowrap\"\n [innerHtml]=\"$any(blankNode).term.units | compound: $any(blankNode).term.termType\"></span>\n }\n </td>\n }\n <td>\n <ng-template #originalValueContent>\n <span>{{ $any(blankNode).originalValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n {{ $any(blankNode).originalValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n }\n } @else {\n <span\n [class.trigger-popover]=\"!!$any(blankNode).original?.[0]?.methodModel\"\n [ngbPopover]=\"blankNodeOriginalValueDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n placement=\"bottom left right auto\"\n container=\"body\"\n [disablePopover]=\"!$any(blankNode).original?.[0]?.methodModel\"\n [popoverContext]=\"{ blankNode }\">\n <span pointer>\n {{ $any(blankNode).originalValue | precision: 3 | default: '-' }}\n </span>\n </span>\n }\n </td>\n <td>\n @if (!blankNode.isOriginal || blankNode.isRecalculated) {\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n {{ $any(blankNode).recalculatedValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n }\n } @else {\n <span>{{ blankNode.recalculatedValue | precision: 3 | default: '-' }}</span>\n }\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td class=\"is-nowrap\">\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n @if (\n $any(blankNode).originalValueByMethodId[model.methodId] !== null &&\n $any(blankNode).recalculatedValueByMethodId[model.methodId] !== null\n ) {\n <he-blank-node-value-delta\n [value]=\"$any(blankNode).recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"$any(blankNode).originalValueByMethodId[model.methodId]\" />\n } @else {\n -\n }\n </div>\n }\n } @else {\n @if ($any(blankNode).original.length && blankNode.isRecalculated) {\n <he-blank-node-value-delta\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"$any(blankNode).originalValue\" />\n } @else {\n -\n }\n }\n </td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: blankNode }\" />\n </tr>\n @for (subValue of $any(blankNode).keys; track trackBySubValue(subValue)) {\n <tr\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"$any(blankNode).subValues?.length\"\n [class.is-sub-row]=\"blankNode.canOpen\">\n <td class=\"width-auto has-border-right is-nowrap\">\n <span class=\"is-inline-block is-align-top pl-3 pr-1 field-node\">Field:</span>\n @if (blankNode.type) {\n <a\n class=\"is-inline-block is-pre-wrap\"\n [href]=\"schemaBaseUrl + '/' + blankNode.type + '#' + subValue.key\"\n target=\"_blank\"\n [title]=\"subValue.key\">\n <span>{{ subValue.key }}</span>\n </a>\n }\n @if (!blankNode.type) {\n <span class=\"is-inline-block is-align-top\">{{ subValue.key }}</span>\n }\n </td>\n @if (isBlankNodes()) {\n <td></td>\n }\n <td>\n @if (subValue.originalValue !== null) {\n <span>\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n -\n }\n </td>\n <td>\n @if (subValue.isRecalculated || subValue.key === 'impactAssessment') {\n <span>\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td>-</td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\" />\n </tr>\n }\n @for (subValue of $any(blankNode).subValues; track trackBySubValue(subValue)) {\n @let term = subValue.term || termById(subValue.id);\n <tr [class.is-hidden]=\"!blankNode.isOpen\" [class.is-sub-row]=\"blankNode.canOpen\">\n <td class=\"width-auto has-border-right\">\n <span class=\"is-inline-block is-align-top pl-3\">{{ subValue.key | keyToLabel }}</span>\n @if (subValue.id) {\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n @switch (subValue.key) {\n @case ('backgroundData') {\n <span class=\"is-inline-block\">{{ term?.name }}</span>\n }\n @default {\n <he-node-link class=\"is-block pl-4\" [node]=\"term\" [attr.title]=\"term?.name\">\n <span [innerHtml]=\"term?.name | compound\"></span>\n </he-node-link>\n }\n }\n }\n </td>\n @if (isBlankNodes()) {\n <td>\n @if (subValue.showUnits && $any(blankNode).term) {\n <span\n class=\"is-nowrap\"\n [innerHtml]=\"$any(blankNode).term.units | compound: $any(blankNode).term.termType\"></span>\n }\n </td>\n }\n <td>\n @if (subValue.originalValue !== null) {\n <span>\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n -\n }\n </td>\n <td>\n @if (subValue.isRecalculated) {\n <span>\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td>-</td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\" />\n </tr>\n }\n }\n </tbody>\n </table>\n </he-data-table>\n <div class=\"is-size-7 is-italic\">\n <div class=\"columns is-variable is-1 my-0\">\n <div class=\"column is-narrow\">\n <p>\n <a class=\"is-inline-block pr-2\" (click)=\"showLegend.set(!showLegend())\">\n <he-svg-icon [name]=\"showLegend() ? 'chevron-down' : 'chevron-right'\" />\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n @if (showLegend()) {\n <ul class=\"content pl-2\">\n @for (status of LogStatus | keyvalue; track status.value) {\n @if (logIcon[status.value]) {\n <li class=\"has-text-{{ logColor[status.value] }}\">\n <he-svg-icon [name]=\"logIcon[status.value]\" />\n <span class=\"pl-1\">{{ status.value }}</span>\n </li>\n }\n }\n </ul>\n }\n </div>\n @if (filteredType()) {\n <div class=\"column has-text-right\">\n <label class=\"is-inline-block checkbox\">\n <input\n type=\"checkbox\"\n class=\"selector\"\n [ngModel]=\"onlyRequired\"\n (change)=\"onlyRequired.set($event.target.checked)\"\n [disabled]=\"!!term()\" />\n <span class=\"ml-2\">\n Show only {{ filteredType() }} terms included in the default HESTIA system boundary\n </span>\n </label>\n </div>\n }\n </div>\n </div>\n</div>\n\n<ng-template #blankNodeOriginalValueDetails let-blankNode=\"blankNode\">\n <span class=\"is-pr-1\">The original value was reported using:</span>\n <he-node-link\n class=\"is-inline-block\"\n linkClass=\"is-dark\"\n [node]=\"$any(blankNode).original[0].methodModel\"\n [showExternalLink]=\"true\">\n <span>{{ $any(blankNode).original[0].methodModel.name }}</span>\n </he-node-link>\n</ng-template>\n\n<ng-template #blankNodeModels let-data=\"data\">\n <ng-template #notInSystemBoundary>\n <td [attr.colspan]=\"methodModelsCount()\">\n <span>Not in HESTIA system boundary</span>\n </td>\n </ng-template>\n\n @if (isSystemBoundary(data)) {\n @for (configModel of methodModelsCount() | times; track configModelIndex; let configModelIndex = $index) {\n <td class=\"blank-node-index-{{ configModelIndex }}\">\n @if (getModelsAt(data, configModelIndex); as models) {\n @if ($any(models) | isArray) {\n <div>\n @for (model of $any(models); track model.methodId) {\n <p>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model, data }\" />\n </p>\n }\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model: models, data }\" />\n }\n } @else {\n -\n }\n </td>\n }\n } @else {\n -\n }\n</ng-template>\n\n<ng-template #blankNodeModel let-model=\"model\" let-data=\"data\">\n <span\n class=\"is-nowrap\"\n [class.trigger-popover]=\"model.showLogs\"\n [ngbPopover]=\"logDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"bottom left right auto\"\n container=\"body\"\n (click)=\"p.isOpen() ? p.close() : model.showLogs ? p.open({ logs: model.logs }) : null\">\n <span>\n <span class=\"is-capitalized\">{{ methodName(model) }}</span>\n @if (model.logs?.methodTier || model.model?.methodTier) {\n <span> [{{ model.logs?.methodTier || model.model?.methodTier }}]</span>\n }\n </span>\n\n <span\n class=\"pl-1 has-text-{{ logColor[model.status] }} trigger-popover\"\n [ngbPopover]=\"logStatusDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p1=\"ngbPopover\"\n placement=\"bottom left right auto\"\n container=\"body\"\n (click)=\"$event.stopPropagation(); p1.isOpen() ? p1.close() : p1.open({ model, data })\">\n <he-svg-icon [name]=\"logIcon[model.status]\" />\n </span>\n\n @if (model.model) {\n <span class=\"pl-1\">\n (\n <ng-container *ngTemplateOutlet=\"docsLink; context: { $implicit: model.model }\" />\n )\n </span>\n }\n </span>\n</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <he-node-logs-models-logs [logs]=\"logs\" />\n</ng-template>\n\n<ng-template #logStatusDetails let-model=\"model\" let-data=\"data\">\n <he-node-logs-models-logs-status [nodeType]=\"nodeType()\" [model]=\"model\" [data]=\"\" />\n</ng-template>\n\n<ng-template #docsLink let-model>\n <a [href]=\"model.apiDocsPath || model.docPath || model.path\" target=\"_blank\" (click)=\"$event.stopPropagation()\">\n <span>Docs</span>\n <he-svg-icon name=\"external-link\" class=\"ml-2\" />\n </a>\n</ng-template>\n", styles: [":host{display:block}::ng-deep .table{background-color:transparent}::ng-deep .table td he-node-link{width:190px}@media screen and (max-width: 767px){::ng-deep .table td he-node-link{width:150px}}::ng-deep .table td .open-node+he-node-link{width:170px}@media screen and (max-width: 767px){::ng-deep .table td .open-node+he-node-link{width:130px}}::ng-deep .table td.has-border-right{box-shadow:1px 0 #6c8093}::ng-deep .table .has-sub-rows.is-open>td:first-child:before,::ng-deep .table .is-sub-row>td:first-child:before{display:block;position:absolute;content:\" \";background-color:#6c809333;height:100%;width:1px;top:0;left:12px}::ng-deep .table .has-sub-rows.is-open>td:first-child:before{top:25px}::ng-deep .table .popover-body .table-container{max-height:260px;overflow-y:auto}\n"] }]
|
|
6932
|
+
], template: "<div class=\"is-px-3 is-pb-3\">\n @if (!isExternal && logsUrl()) {\n <div class=\"has-text-right is-mb-2\">\n <a class=\"is-size-7\" [href]=\"logsUrl()\" target=\"_blank\">\n <span>Open Full Logs</span>\n <he-svg-icon name=\"external-link\" class=\"ml-2\" />\n </a>\n </div>\n }\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" maxHeight=\"320\">\n <table class=\"table is-fullwidth is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto has-border-right\">\n @if (enableFilterByTerm()) {\n <div class=\"field\">\n <div class=\"control is-expanded has-icons-right\">\n <input\n class=\"input search-input is-small\"\n [ngModel]=\"term()\"\n name=\"term\"\n placeholder=\"Select entry by name\"\n [ngbTypeahead]=\"suggestTerm\"\n [focusFirst]=\"true\"\n (focus)=\"typeaheadFocus($event)\"\n (selectItem)=\"term.set($event.item)\"\n container=\"body\"\n popupClass=\"is-small\" />\n <a class=\"icon is-small is-right\" [class.is-hidden]=\"!term()\" (click)=\"term.set('')\">\n <he-svg-icon name=\"xmark\" />\n </a>\n </div>\n </div>\n }\n </th>\n @if (isBlankNodes()) {\n <th>\n <span class=\"is-pr-1\">Units</span>\n @if (functionalUnit()) {\n <span>(per </span>\n <span>{{ functionalUnit() }}</span>\n <span>)</span>\n }\n </th>\n }\n <th>Original</th>\n <th>Recalculated</th>\n @if (isBlankNodes()) {\n <th>Difference</th>\n }\n @for (c of methodModelsCount() | times; track i; let i = $index) {\n <th>({{ i + 1 }})</th>\n }\n </tr>\n </thead>\n <tbody>\n @if (loading()) {\n <tr>\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <he-svg-icon name=\"loading\" animation=\"spin\" size=\"40\" />\n </div>\n </td>\n </tr>\n } @else if (blankNodes().length === 0) {\n <tr>\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>{{ noDataMessage() || 'No original data was provided and no gap filling occurred.' }}</span>\n </td>\n </tr>\n }\n @for (blankNode of blankNodes(); track trackByBlankNode($index, blankNode)) {\n <tr [class.has-sub-rows]=\"blankNode.canOpen\" [class.is-open]=\"blankNode.isOpen\">\n <td\n class=\"width-auto has-border-right is-nowrap\"\n [attr.title]=\"$any(blankNode).term?.name || $any(blankNode).key\">\n @if (blankNode.canOpen) {\n <a class=\"is-inline-block is-align-top pr-2 open-node\" (click)=\"blankNode.isOpen = !blankNode.isOpen\">\n <he-svg-icon [name]=\"blankNode.isOpen ? 'chevron-down' : 'chevron-right'\" />\n </a>\n }\n @if ($any(blankNode).term) {\n <he-node-link class=\"is-inline-block is-pre-wrap\" [node]=\"$any(blankNode).term\">\n <span [innerHtml]=\"$any(blankNode).term.name | compound: $any(blankNode).term.termType\"></span>\n </he-node-link>\n }\n @if ($any(blankNode).key) {\n @if (nodeKey() === 'completeness') {\n <a [href]=\"schemaBaseUrl + '/Completeness#' + $any(blankNode).key\" target=\"_blank\">\n <span>{{ $any(blankNode).key | keyToLabel }}</span>\n </a>\n }\n } @else {\n <span>{{ $any(blankNode).key }}</span>\n }\n </td>\n @if (isBlankNodes()) {\n <td>\n @if ($any(blankNode).term) {\n <span\n class=\"is-nowrap\"\n [innerHtml]=\"$any(blankNode).term.units | compound: $any(blankNode).term.termType\"></span>\n }\n </td>\n }\n <td>\n <ng-template #originalValueContent>\n <span>{{ $any(blankNode).originalValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n {{ $any(blankNode).originalValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n }\n } @else {\n <span\n [class.trigger-popover]=\"!!$any(blankNode).original?.[0]?.methodModel\"\n [ngbPopover]=\"blankNodeOriginalValueDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n placement=\"bottom left right auto\"\n container=\"body\"\n [disablePopover]=\"!$any(blankNode).original?.[0]?.methodModel\"\n [popoverContext]=\"{ blankNode }\">\n <span pointer>\n {{ $any(blankNode).originalValue | precision: 3 | default: '-' }}\n </span>\n </span>\n }\n </td>\n <td>\n @if (!blankNode.isOriginal || blankNode.isRecalculated) {\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n {{ $any(blankNode).recalculatedValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n }\n } @else {\n <span>{{ blankNode.recalculatedValue | precision: 3 | default: '-' }}</span>\n }\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td class=\"is-nowrap\">\n @if (blankNode.allParallel) {\n @for (model of $any(blankNode).configModels[0]; track model.methodId) {\n <div>\n @if (\n $any(blankNode).originalValueByMethodId[model.methodId] !== null &&\n $any(blankNode).recalculatedValueByMethodId[model.methodId] !== null\n ) {\n <he-blank-node-value-delta\n [value]=\"$any(blankNode).recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"$any(blankNode).originalValueByMethodId[model.methodId]\"\n [useCustomFunctions]=\"false\" />\n } @else {\n -\n }\n </div>\n }\n } @else {\n @if ($any(blankNode).original.length && blankNode.isRecalculated) {\n <he-blank-node-value-delta\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"$any(blankNode).originalValue\"\n [useCustomFunctions]=\"false\" />\n } @else {\n -\n }\n }\n </td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: blankNode }\" />\n </tr>\n @for (subValue of $any(blankNode).keys; track trackBySubValue(subValue)) {\n <tr\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"$any(blankNode).subValues?.length\"\n [class.is-sub-row]=\"blankNode.canOpen\">\n <td class=\"width-auto has-border-right is-nowrap\">\n <span class=\"is-inline-block is-align-top pl-3 pr-1 field-node\">Field:</span>\n @if (blankNode.type) {\n <a\n class=\"is-inline-block is-pre-wrap\"\n [href]=\"schemaBaseUrl + '/' + blankNode.type + '#' + subValue.key\"\n target=\"_blank\"\n [title]=\"subValue.key\">\n <span>{{ subValue.key }}</span>\n </a>\n }\n @if (!blankNode.type) {\n <span class=\"is-inline-block is-align-top\">{{ subValue.key }}</span>\n }\n </td>\n @if (isBlankNodes()) {\n <td></td>\n }\n <td>\n @if (subValue.originalValue !== null) {\n <span>\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n -\n }\n </td>\n <td>\n @if (subValue.isRecalculated || subValue.key === 'impactAssessment') {\n <span>\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td>-</td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\" />\n </tr>\n }\n @for (subValue of $any(blankNode).subValues; track trackBySubValue(subValue)) {\n @let term = subValue.term || termById(subValue.id);\n <tr [class.is-hidden]=\"!blankNode.isOpen\" [class.is-sub-row]=\"blankNode.canOpen\">\n <td class=\"width-auto has-border-right\">\n <span class=\"is-inline-block is-align-top pl-3\">{{ subValue.key | keyToLabel }}</span>\n @if (subValue.id) {\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n @switch (subValue.key) {\n @case ('backgroundData') {\n <span class=\"is-inline-block\">{{ term?.name }}</span>\n }\n @default {\n <he-node-link class=\"is-block pl-4\" [node]=\"term\" [attr.title]=\"term?.name\">\n <span [innerHtml]=\"term?.name | compound\"></span>\n </he-node-link>\n }\n }\n }\n </td>\n @if (isBlankNodes()) {\n <td>\n @if (subValue.showUnits && $any(blankNode).term) {\n <span\n class=\"is-nowrap\"\n [innerHtml]=\"$any(blankNode).term.units | compound: $any(blankNode).term.termType\"></span>\n }\n </td>\n }\n <td>\n @if (subValue.originalValue !== null) {\n <span>\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n -\n }\n </td>\n <td>\n @if (subValue.isRecalculated) {\n <span>\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n } @else {\n not recalculated\n }\n </td>\n @if (isBlankNodes()) {\n <td>-</td>\n }\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\" />\n </tr>\n }\n }\n </tbody>\n </table>\n </he-data-table>\n <div class=\"is-size-7 is-italic\">\n <div class=\"columns is-variable is-1 my-0\">\n <div class=\"column is-narrow\">\n <p>\n <a class=\"is-inline-block pr-2\" (click)=\"showLegend.set(!showLegend())\">\n <he-svg-icon [name]=\"showLegend() ? 'chevron-down' : 'chevron-right'\" />\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n @if (showLegend()) {\n <ul class=\"content pl-2\">\n @for (status of LogStatus | keyvalue; track status.value) {\n @if (logIcon[status.value]) {\n <li class=\"has-text-{{ logColor[status.value] }}\">\n <he-svg-icon [name]=\"logIcon[status.value]\" />\n <span class=\"pl-1\">{{ status.value }}</span>\n </li>\n }\n }\n </ul>\n }\n </div>\n @if (filteredType()) {\n <div class=\"column has-text-right\">\n <label class=\"is-inline-block checkbox\">\n <input\n type=\"checkbox\"\n class=\"selector\"\n [ngModel]=\"onlyRequired\"\n (change)=\"onlyRequired.set($event.target.checked)\"\n [disabled]=\"!!term()\" />\n <span class=\"ml-2\">\n Show only {{ filteredType() }} terms included in the default HESTIA system boundary\n </span>\n </label>\n </div>\n }\n </div>\n </div>\n</div>\n\n<ng-template #blankNodeOriginalValueDetails let-blankNode=\"blankNode\">\n <span class=\"is-pr-1\">The original value was reported using:</span>\n <he-node-link\n class=\"is-inline-block\"\n linkClass=\"is-dark\"\n [node]=\"$any(blankNode).original[0].methodModel\"\n [showExternalLink]=\"true\">\n <span>{{ $any(blankNode).original[0].methodModel.name }}</span>\n </he-node-link>\n</ng-template>\n\n<ng-template #blankNodeModels let-data=\"data\">\n <ng-template #notInSystemBoundary>\n <td [attr.colspan]=\"methodModelsCount()\">\n <span>Not in HESTIA system boundary</span>\n </td>\n </ng-template>\n\n @if (isSystemBoundary(data)) {\n @for (configModel of methodModelsCount() | times; track configModelIndex; let configModelIndex = $index) {\n <td class=\"blank-node-index-{{ configModelIndex }}\">\n @if (getModelsAt(data, configModelIndex); as models) {\n @if ($any(models) | isArray) {\n <div>\n @for (model of $any(models); track model.methodId) {\n <p>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model, data }\" />\n </p>\n }\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model: models, data }\" />\n }\n } @else {\n -\n }\n </td>\n }\n } @else {\n -\n }\n</ng-template>\n\n<ng-template #blankNodeModel let-model=\"model\" let-data=\"data\">\n <span\n class=\"is-nowrap\"\n [class.trigger-popover]=\"model.showLogs\"\n [ngbPopover]=\"logDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"bottom left right auto\"\n container=\"body\"\n (click)=\"p.isOpen() ? p.close() : model.showLogs ? p.open({ logs: model.logs }) : null\">\n <span>\n <span class=\"is-capitalized\">{{ methodName(model) }}</span>\n @if (model.logs?.methodTier || model.model?.methodTier) {\n <span> [{{ model.logs?.methodTier || model.model?.methodTier }}]</span>\n }\n </span>\n\n <span\n class=\"pl-1 has-text-{{ logColor[model.status] }} trigger-popover\"\n [ngbPopover]=\"logStatusDetails\"\n autoClose=\"outside\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p1=\"ngbPopover\"\n placement=\"bottom left right auto\"\n container=\"body\"\n (click)=\"$event.stopPropagation(); p1.isOpen() ? p1.close() : p1.open({ model, data })\">\n <he-svg-icon [name]=\"logIcon[model.status]\" />\n </span>\n\n @if (model.model) {\n <span class=\"pl-1\">\n (\n <ng-container *ngTemplateOutlet=\"docsLink; context: { $implicit: model.model }\" />\n )\n </span>\n }\n </span>\n</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <he-node-logs-models-logs [logs]=\"logs\" />\n</ng-template>\n\n<ng-template #logStatusDetails let-model=\"model\" let-data=\"data\">\n <he-node-logs-models-logs-status [nodeType]=\"nodeType()\" [model]=\"model\" [data]=\"\" />\n</ng-template>\n\n<ng-template #docsLink let-model>\n <a [href]=\"model.apiDocsPath || model.docPath || model.path\" target=\"_blank\" (click)=\"$event.stopPropagation()\">\n <span>Docs</span>\n <he-svg-icon name=\"external-link\" class=\"ml-2\" />\n </a>\n</ng-template>\n", styles: [":host{display:block}::ng-deep .table{background-color:transparent}::ng-deep .table td he-node-link{width:190px}@media screen and (max-width: 767px){::ng-deep .table td he-node-link{width:150px}}::ng-deep .table td .open-node+he-node-link{width:170px}@media screen and (max-width: 767px){::ng-deep .table td .open-node+he-node-link{width:130px}}::ng-deep .table td.has-border-right{box-shadow:1px 0 #6c8093}::ng-deep .table .has-sub-rows.is-open>td:first-child:before,::ng-deep .table .is-sub-row>td:first-child:before{display:block;position:absolute;content:\" \";background-color:#6c809333;height:100%;width:1px;top:0;left:12px}::ng-deep .table .has-sub-rows.is-open>td:first-child:before{top:25px}::ng-deep .table .popover-body .table-container{max-height:260px;overflow-y:auto}\n"] }]
|
|
6924
6933
|
}] });
|
|
6925
6934
|
|
|
6926
6935
|
var View$3;
|
|
@@ -7700,6 +7709,9 @@ class NodeAggregatedQualityScoreComponent {
|
|
|
7700
7709
|
this.searchService = inject(HeSearchService);
|
|
7701
7710
|
this.nodeService = inject(HeNodeService);
|
|
7702
7711
|
this.node = input.required();
|
|
7712
|
+
/**
|
|
7713
|
+
* Load and show info tooltip.
|
|
7714
|
+
*/
|
|
7703
7715
|
this.showInfo = input(false);
|
|
7704
7716
|
this.mode = input('tag');
|
|
7705
7717
|
this.placement = input('bottom');
|
|
@@ -7707,13 +7719,14 @@ class NodeAggregatedQualityScoreComponent {
|
|
|
7707
7719
|
this.countryName = computed(() => getCountryName(this.node()));
|
|
7708
7720
|
this.countryResource = rxResource({
|
|
7709
7721
|
request: () => ({
|
|
7722
|
+
showInfo: this.showInfo(),
|
|
7710
7723
|
nodeCountry: this.nodeCountry(),
|
|
7711
7724
|
countryName: this.countryName(),
|
|
7712
7725
|
node: this.node()
|
|
7713
7726
|
}),
|
|
7714
|
-
loader: ({ request: { nodeCountry, countryName, node } }) => nodeCountry
|
|
7727
|
+
loader: ({ request: { showInfo, nodeCountry, countryName, node } }) => nodeCountry
|
|
7715
7728
|
? of(nodeCountry)
|
|
7716
|
-
: countryName
|
|
7729
|
+
: showInfo && countryName
|
|
7717
7730
|
? this.searchService
|
|
7718
7731
|
.search$({
|
|
7719
7732
|
limit: 1,
|
|
@@ -7734,20 +7747,28 @@ class NodeAggregatedQualityScoreComponent {
|
|
|
7734
7747
|
this.countryId = computed(() => this.countryResource.value()?.['@id']);
|
|
7735
7748
|
this.aggregationId = computed(() => [!!this.node(), !!this.countryId()].every(Boolean) ? nodeToAggregationFilename(this.node(), this.countryId()) : null);
|
|
7736
7749
|
this.logsResource = rxResource({
|
|
7737
|
-
request: () => ({
|
|
7738
|
-
|
|
7739
|
-
.
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7750
|
+
request: () => ({
|
|
7751
|
+
showInfo: this.showInfo(),
|
|
7752
|
+
node: this.node(),
|
|
7753
|
+
aggregationId: this.aggregationId()
|
|
7754
|
+
}),
|
|
7755
|
+
loader: ({ request: { showInfo, node, aggregationId } }) => showInfo && aggregationId
|
|
7756
|
+
? this.nodeService
|
|
7757
|
+
.getLog$({
|
|
7758
|
+
'@type': node['@type'],
|
|
7759
|
+
'@id': aggregationId,
|
|
7760
|
+
aggregated: true
|
|
7761
|
+
})
|
|
7762
|
+
.pipe(map(value => (value ? parseLines(value) : [])), mergeAll(), filter(({ data: { message } }) => !!message), map(({ data: { message } }) => parseMessage$1(message)), filter(({ id }) => id === this.node()['@id']), reduce((a, b) => ({ ...a, ...b }), {}))
|
|
7763
|
+
: of({})
|
|
7745
7764
|
});
|
|
7746
7765
|
this.logs = computed(() => this.logsResource.value() ?? {});
|
|
7747
7766
|
this.validScores = computed(() => Object.fromEntries(Object.entries(isScoreValid).map(([key, value]) => [key, value(this.logs())])));
|
|
7748
7767
|
this.missingEmissionIds = computed(() => this.logs().missing_emissions?.split(';') ?? []);
|
|
7749
7768
|
this.missingEmissionsResource = rxResource({
|
|
7750
|
-
request: () => ({
|
|
7769
|
+
request: () => ({
|
|
7770
|
+
missingEmissionIds: this.missingEmissionIds()
|
|
7771
|
+
}),
|
|
7751
7772
|
loader: ({ request: { missingEmissionIds } }) => missingEmissionIds?.length
|
|
7752
7773
|
? this.searchService
|
|
7753
7774
|
.search$({
|
|
@@ -9229,10 +9250,15 @@ const propertyId = () => v4();
|
|
|
9229
9250
|
const isGeojson = (schema) => schema.geojson;
|
|
9230
9251
|
const propertyUrl = (node, key) => ['@id', 'id', 'name'].includes(key) && nodeLinkTypeEnabled(node['@type'] || node.type)
|
|
9231
9252
|
? node['@id'] ||
|
|
9232
|
-
// handle links on Community Edition
|
|
9253
|
+
// handle old links on Community Edition
|
|
9233
9254
|
(isExternal() && node.id)
|
|
9234
9255
|
? {
|
|
9235
|
-
url:
|
|
9256
|
+
url: [
|
|
9257
|
+
node['@type'] === SchemaType.Term ? baseUrl(false) : null,
|
|
9258
|
+
nodeLink({ '@type': node['@type'] || node.type, '@id': node['@id'] || node.id })
|
|
9259
|
+
]
|
|
9260
|
+
.filter(Boolean)
|
|
9261
|
+
.join('/'),
|
|
9236
9262
|
title: 'Open'
|
|
9237
9263
|
}
|
|
9238
9264
|
: node['@type'] === SchemaType.Term
|