@hestia-earth/ui-components 0.23.2 → 0.23.4
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/link-key-value/link-key-value.component.d.ts +3 -2
- package/cycles/cycles-activity/cycles-activity.component.d.ts +1 -0
- package/cycles/cycles-animals/cycles-animals.component.d.ts +1 -0
- package/cycles/cycles-emissions/cycles-emissions.component.d.ts +1 -0
- package/cycles/cycles-practices/cycles-practices.component.d.ts +1 -0
- package/esm2022/common/link-key-value/link-key-value.component.mjs +11 -9
- package/esm2022/cycles/cycles-activity/cycles-activity.component.mjs +6 -3
- package/esm2022/cycles/cycles-animals/cycles-animals.component.mjs +7 -3
- package/esm2022/cycles/cycles-emissions/cycles-emissions.component.mjs +6 -3
- package/esm2022/cycles/cycles-practices/cycles-practices.component.mjs +6 -3
- package/esm2022/files/files-error.model.mjs +12 -8
- package/esm2022/node/node-logs-models/node-logs-models.component.mjs +26 -4
- package/esm2022/node/node-value-details/node-value-details.component.mjs +7 -2
- package/esm2022/sites/sites-measurements/sites-measurements.component.mjs +6 -3
- package/fesm2022/hestia-earth-ui-components.mjs +78 -29
- package/fesm2022/hestia-earth-ui-components.mjs.map +1 -1
- package/files/files-error.model.d.ts +3 -2
- package/node/node-logs-models/node-logs-models.component.d.ts +4 -0
- package/package.json +1 -1
- package/sites/sites-measurements/sites-measurements.component.d.ts +1 -0
|
@@ -1949,12 +1949,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImpor
|
|
|
1949
1949
|
const valueLink = (value) => isExpandable(value) && value['@id'] ? [baseUrl(), value['@type'].toLowerCase(), value['@id']].join('/') : null;
|
|
1950
1950
|
const valueLinkRef = (value, href) => href ? `<a class="is-dark" href="${href}">${value.name || value['@id']}</a>` : null;
|
|
1951
1951
|
const valueValue = (value) => (Array.isArray(value) ? value.map(valueValue).join(', ') : toPrecision(value));
|
|
1952
|
+
const minMaxValue = (min, max) => [isUndefined(min) ? '' : `Min: ${valueValue(min)}`, isUndefined(max) ? '' : `Max: ${valueValue(max)}`].join('; ');
|
|
1953
|
+
const blankNodeValue$1 = ({ term, value, min, max }) => [
|
|
1954
|
+
[valueLinkRef(term, valueLink(term)), isUndefined(value) ? '' : valueValue(value)].join(': '),
|
|
1955
|
+
[isUndefined(min) ? '' : `Min: ${valueValue(min)}`, isUndefined(max) ? '' : `Max: ${valueValue(max)}`].join('; ')
|
|
1956
|
+
].join(' - ');
|
|
1952
1957
|
const stringMapper = {
|
|
1953
1958
|
number: (value) => `${toPrecision(value, 3)}`,
|
|
1954
1959
|
undefined: () => '',
|
|
1955
|
-
blankNode: value => 'term' in value
|
|
1956
|
-
? `${valueLinkRef(value.term, valueLink(value.term))}${'value' in value ? `: ${valueValue(value.value)}` : ''}`
|
|
1957
|
-
: valueLinkRef(value, valueLink(value)) || value.name || value['@id'],
|
|
1960
|
+
blankNode: value => 'term' in value ? blankNodeValue$1(value) : valueLinkRef(value, valueLink(value)) || value.name || value['@id'],
|
|
1958
1961
|
object: value => Array.isArray(value)
|
|
1959
1962
|
? value.map(toString).join(', ')
|
|
1960
1963
|
: value instanceof Date
|
|
@@ -1969,6 +1972,8 @@ class LinkKeyValueComponent {
|
|
|
1969
1972
|
this.defaultValue = '';
|
|
1970
1973
|
this.isExpandable = isExpandable;
|
|
1971
1974
|
this.valueLink = valueLink;
|
|
1975
|
+
this.isUndefined = isUndefined;
|
|
1976
|
+
this.minMaxValue = minMaxValue;
|
|
1972
1977
|
this.baseUrl = baseUrl();
|
|
1973
1978
|
this.toString = toString;
|
|
1974
1979
|
}
|
|
@@ -1984,18 +1989,15 @@ class LinkKeyValueComponent {
|
|
|
1984
1989
|
get isArray() {
|
|
1985
1990
|
return Array.isArray(this.value) && [this.value.length > 1, isExpandable(this.value[0])].some(Boolean);
|
|
1986
1991
|
}
|
|
1987
|
-
get isUndefined() {
|
|
1988
|
-
return isUndefined(this.value);
|
|
1989
|
-
}
|
|
1990
1992
|
isBlankNode(value) {
|
|
1991
1993
|
return isExpandable(value) && 'term' in value;
|
|
1992
1994
|
}
|
|
1993
1995
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: LinkKeyValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1994
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: { node: "node", nodeType: "nodeType", dataKey: "dataKey", key: "key", defaultValue: "defaultValue", dataState: "dataState" }, host: { properties: { "class.is-inline-block": "this.isInlineBlock" } }, ngImport: i0, template: "<ng-container *ngIf=\"!isUndefined; else showDefault\">\n <ng-container *bindOnce=\"node\">\n <a class=\"is-dark\" [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\">\n <b>{{ key }}</b>\n </a>\n <span class=\"pr-2\">:</span>\n\n <ng-container *ngIf=\"isArray; else singleValue\">\n <div class=\"array-container is-pl-2\">\n <ng-container *ngFor=\"let v of value\">\n <ng-template #nonBlankNodeValue>\n <p>\n <ng-container *ngTemplateOutlet=\"valueContent; context: { value: v }\"></ng-container>\n </p>\n </ng-template>\n\n <ng-container *ngIf=\"isBlankNode(v); else nonBlankNodeValue\">\n <div>\n <a class=\"is-dark\" [href]=\"valueLink(v.term)\">{{ v.term.name || v.term['@id'] }}</a>\n <span class=\"
|
|
1996
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: { node: "node", nodeType: "nodeType", dataKey: "dataKey", key: "key", defaultValue: "defaultValue", dataState: "dataState" }, host: { properties: { "class.is-inline-block": "this.isInlineBlock" } }, ngImport: i0, template: "<ng-container *ngIf=\"!isUndefined(value); else showDefault\">\n <ng-container *bindOnce=\"node\">\n <a class=\"is-dark\" [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\">\n <b>{{ key }}</b>\n </a>\n <span class=\"pr-2\">:</span>\n\n <ng-container *ngIf=\"isArray; else singleValue\">\n <div class=\"array-container is-pl-2\">\n <ng-container *ngFor=\"let v of value\">\n <ng-template #nonBlankNodeValue>\n <p>\n <ng-container *ngTemplateOutlet=\"valueContent; context: { value: v }\"></ng-container>\n </p>\n </ng-template>\n\n <ng-container *ngIf=\"isBlankNode(v); else nonBlankNodeValue\">\n <div>\n <a class=\"is-dark\" [href]=\"valueLink(v.term)\">{{ v.term.name || v.term['@id'] }}</a>\n <span>:</span>\n <span class=\"is-pl-2\" *ngIf=\"!isUndefined(v.value)\">\n <ng-container *ngTemplateOutlet=\"valueContent; context: { value: v.value }\"></ng-container>\n </span>\n\n <ng-container *ngIf=\"!isUndefined(v.min) || !isUndefined(v.max)\">\n <small class=\"is-pl-1\">({{ minMaxValue(v.min, v.max) }})</small>\n </ng-container>\n\n <he-blank-node-state\n class=\"pl-1\"\n [node]=\"v\"\n [nodeType]=\"nodeType\"\n [dataState]=\"dataState\"\n [dataKey]=\"dataKey\"\n key=\"value\"\n linkClass=\"is-dark\"></he-blank-node-state>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #valueContent let-v=\"value\">\n <span class=\"is-inline-block is-nowrap\" [innerHtml]=\"toString(v)\"></span>\n</ng-template>\n\n<ng-template #singleValue>\n <ng-container *ngTemplateOutlet=\"valueContent; context: { value }\"></ng-container>\n\n <he-blank-node-state\n class=\"pl-1\"\n [node]=\"node\"\n [nodeType]=\"nodeType\"\n [dataState]=\"dataState\"\n [dataKey]=\"dataKey\"\n [key]=\"key\"\n linkClass=\"is-dark\"></he-blank-node-state>\n</ng-template>\n\n<ng-template #showDefault>\n <span *ngIf=\"!!defaultValue\">{{ defaultValue }}</span>\n</ng-template>\n", styles: [":host{display:block}:host a.has-text-white:hover,:host a.has-text-white.is-hovered{text-decoration:underline}.array-container{max-height:100px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1995
1997
|
}
|
|
1996
1998
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: LinkKeyValueComponent, decorators: [{
|
|
1997
1999
|
type: Component$1,
|
|
1998
|
-
args: [{ selector: 'he-link-key-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!isUndefined; else showDefault\">\n <ng-container *bindOnce=\"node\">\n <a class=\"is-dark\" [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\">\n <b>{{ key }}</b>\n </a>\n <span class=\"pr-2\">:</span>\n\n <ng-container *ngIf=\"isArray; else singleValue\">\n <div class=\"array-container is-pl-2\">\n <ng-container *ngFor=\"let v of value\">\n <ng-template #nonBlankNodeValue>\n <p>\n <ng-container *ngTemplateOutlet=\"valueContent; context: { value: v }\"></ng-container>\n </p>\n </ng-template>\n\n <ng-container *ngIf=\"isBlankNode(v); else nonBlankNodeValue\">\n <div>\n <a class=\"is-dark\" [href]=\"valueLink(v.term)\">{{ v.term.name || v.term['@id'] }}</a>\n <span class=\"
|
|
2000
|
+
args: [{ selector: 'he-link-key-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!isUndefined(value); else showDefault\">\n <ng-container *bindOnce=\"node\">\n <a class=\"is-dark\" [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\">\n <b>{{ key }}</b>\n </a>\n <span class=\"pr-2\">:</span>\n\n <ng-container *ngIf=\"isArray; else singleValue\">\n <div class=\"array-container is-pl-2\">\n <ng-container *ngFor=\"let v of value\">\n <ng-template #nonBlankNodeValue>\n <p>\n <ng-container *ngTemplateOutlet=\"valueContent; context: { value: v }\"></ng-container>\n </p>\n </ng-template>\n\n <ng-container *ngIf=\"isBlankNode(v); else nonBlankNodeValue\">\n <div>\n <a class=\"is-dark\" [href]=\"valueLink(v.term)\">{{ v.term.name || v.term['@id'] }}</a>\n <span>:</span>\n <span class=\"is-pl-2\" *ngIf=\"!isUndefined(v.value)\">\n <ng-container *ngTemplateOutlet=\"valueContent; context: { value: v.value }\"></ng-container>\n </span>\n\n <ng-container *ngIf=\"!isUndefined(v.min) || !isUndefined(v.max)\">\n <small class=\"is-pl-1\">({{ minMaxValue(v.min, v.max) }})</small>\n </ng-container>\n\n <he-blank-node-state\n class=\"pl-1\"\n [node]=\"v\"\n [nodeType]=\"nodeType\"\n [dataState]=\"dataState\"\n [dataKey]=\"dataKey\"\n key=\"value\"\n linkClass=\"is-dark\"></he-blank-node-state>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #valueContent let-v=\"value\">\n <span class=\"is-inline-block is-nowrap\" [innerHtml]=\"toString(v)\"></span>\n</ng-template>\n\n<ng-template #singleValue>\n <ng-container *ngTemplateOutlet=\"valueContent; context: { value }\"></ng-container>\n\n <he-blank-node-state\n class=\"pl-1\"\n [node]=\"node\"\n [nodeType]=\"nodeType\"\n [dataState]=\"dataState\"\n [dataKey]=\"dataKey\"\n [key]=\"key\"\n linkClass=\"is-dark\"></he-blank-node-state>\n</ng-template>\n\n<ng-template #showDefault>\n <span *ngIf=\"!!defaultValue\">{{ defaultValue }}</span>\n</ng-template>\n", styles: [":host{display:block}:host a.has-text-white:hover,:host a.has-text-white.is-hovered{text-decoration:underline}.array-container{max-height:100px;overflow-y:auto}\n"] }]
|
|
1999
2001
|
}], propDecorators: { node: [{
|
|
2000
2002
|
type: Input
|
|
2001
2003
|
}], nodeType: [{
|
|
@@ -6110,6 +6112,13 @@ const logColor = {
|
|
|
6110
6112
|
[LogStatus.dataProvided]: 'dark',
|
|
6111
6113
|
[LogStatus.notRequired]: 'grey'
|
|
6112
6114
|
};
|
|
6115
|
+
const shouldShowBlankNode = (blankNodeLog) => [
|
|
6116
|
+
blankNodeLog?.configModels?.length,
|
|
6117
|
+
blankNodeLog?.keys?.length,
|
|
6118
|
+
blankNodeLog?.subValues?.length,
|
|
6119
|
+
blankNodeLog?.original?.length,
|
|
6120
|
+
blankNodeLog?.recalculated?.length
|
|
6121
|
+
].some(Boolean);
|
|
6113
6122
|
const methodIdLabel = (methodId, _model) => (methodId
|
|
6114
6123
|
? {
|
|
6115
6124
|
'cycle/transformation': 'Data From Transformation',
|
|
@@ -6150,6 +6159,20 @@ const matchTermTypeFromKey = {
|
|
|
6150
6159
|
endpoints: indicatorTermTermType.term
|
|
6151
6160
|
};
|
|
6152
6161
|
const termSearch = (term = '') => term.replace(/[,\s]/g, '').toLowerCase();
|
|
6162
|
+
const completenessCompleteSuffix = '_complete';
|
|
6163
|
+
const completenessIncompleteSuffix = '_incomplete';
|
|
6164
|
+
const parseLogCompleteness = (key) => [
|
|
6165
|
+
key.startsWith('term_type_'),
|
|
6166
|
+
key.endsWith(completenessCompleteSuffix) || key.endsWith(completenessIncompleteSuffix)
|
|
6167
|
+
].every(Boolean)
|
|
6168
|
+
? {
|
|
6169
|
+
key: key
|
|
6170
|
+
.replace('term_type_', '')
|
|
6171
|
+
.replace(completenessCompleteSuffix, '')
|
|
6172
|
+
.replace(completenessIncompleteSuffix, ''),
|
|
6173
|
+
value: key.endsWith(completenessCompleteSuffix)
|
|
6174
|
+
}
|
|
6175
|
+
: null;
|
|
6153
6176
|
class NodeLogsModelsComponent {
|
|
6154
6177
|
constructor(nodeService, searchService, engineService) {
|
|
6155
6178
|
this.nodeService = nodeService;
|
|
@@ -6174,6 +6197,7 @@ class NodeLogsModelsComponent {
|
|
|
6174
6197
|
this.logValueArray = logValueArray;
|
|
6175
6198
|
this.requirementLinkedNode = requirementLinkedNode;
|
|
6176
6199
|
this.isSystemBoundary = isSystemBoundary;
|
|
6200
|
+
this.parseLogCompleteness = parseLogCompleteness;
|
|
6177
6201
|
this.loading = true;
|
|
6178
6202
|
this.blankNodes = [];
|
|
6179
6203
|
this.methodModelsCount = 0;
|
|
@@ -6243,7 +6267,7 @@ class NodeLogsModelsComponent {
|
|
|
6243
6267
|
});
|
|
6244
6268
|
this.allTerms = await computeTerms(this.originalValues, this.recalculatedValues, this.terms, this.filterTermTypes, extraTerms);
|
|
6245
6269
|
const mapFunc = groupLogsByTerm(this.nodeType, logs, engineModels, config, this.originalValues, this.recalculatedValues, this.nodeKey);
|
|
6246
|
-
const allBlankNodes = this.allTerms.flatMap(mapFunc);
|
|
6270
|
+
const allBlankNodes = this.allTerms.flatMap(mapFunc).filter(shouldShowBlankNode);
|
|
6247
6271
|
this.methodModelsCount = modelCount(allBlankNodes);
|
|
6248
6272
|
this.termsById = await of(allBlankNodes)
|
|
6249
6273
|
.pipe(mergeMap(v => v.flatMap(vv => vv.subValues)), map(v => v.id), distinct(), filter(v => !!v), toArray(), mergeMap(ids => from(this.searchTerms({
|
|
@@ -6303,11 +6327,11 @@ class NodeLogsModelsComponent {
|
|
|
6303
6327
|
return this.node?.functionalUnit;
|
|
6304
6328
|
}
|
|
6305
6329
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: NodeLogsModelsComponent, deps: [{ token: HeNodeService }, { token: HeSearchService }, { token: HeEngineService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6306
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: { node: "node", nodeKey: "nodeKey", originalValues: "originalValues", recalculatedValues: "recalculatedValues", terms: "terms", filterTermTypes: "filterTermTypes", filterTermTypesLabel: "filterTermTypesLabel", logsKey: "logsKey" }, ngImport: i0, template: "<div class=\"px-3 pb-3\">\n <div class=\"has-text-right mb-2\" *ngIf=\"!isExternal\">\n <a class=\"is-size-7\" *ngIf=\"logsUrl\" [href]=\"logsUrl\" target=\"_blank\">\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n <span class=\"pl-2\">Open Full Logs</span>\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 <div class=\"field\" *ngIf=\"allTerms?.length\">\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)=\"filterResults()\" />\n <a class=\"icon is-small is-right\" [class.is-hidden]=\"!term\" (click)=\"term = ''; filterResults()\">\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </th>\n <th *ngIf=\"isBlankNodes\">\n <span class=\"is-pr-1\">Units</span>\n <span>(per </span>\n <span [ngSwitch]=\"functionalUnit\">\n <ng-container *ngSwitchCase=\"CycleFunctionalUnit['1 ha']\">hectare</ng-container>\n <ng-container *ngSwitchDefault>kg product</ng-container>\n </span>\n <span>)</span>\n </th>\n <th>Original</th>\n <th>Recalculated</th>\n <th *ngIf=\"isBlankNodes\">Difference</th>\n <th *ngFor=\"let c of methodModelsCount | times; let i = index\">({{ i + 1 }})</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngIf=\"loading\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"!loading && blankNodes.length === 0\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>No data</span>\n </td>\n </tr>\n <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\" [class.is-open]=\"blankNode.isOpen\">\n <td class=\"width-auto has-border-right is-nowrap\" [attr.title]=\"blankNode.term?.name || blankNode.key\">\n <a\n class=\"is-inline-block is-align-top pr-2 open-node\"\n (click)=\"blankNode.isOpen = !blankNode.isOpen\"\n *ngIf=\"blankNode.canOpen\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!blankNode.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"blankNode.isOpen\"></fa-icon>\n </a>\n <he-node-link class=\"is-inline-block is-pre-wrap\" *ngIf=\"blankNode.term\" [node]=\"blankNode.term\">\n <span [innerHtml]=\"blankNode.term.name | compound\"></span>\n </he-node-link>\n <span *ngIf=\"blankNode.key\">{{ blankNode.key }}</span>\n </td>\n <td *ngIf=\"isBlankNodes\">\n <span class=\"is-nowrap\" [innerHtml]=\"blankNode.term?.units | compound\"></span>\n </td>\n <td>\n <ng-template #defaultOriginalValue>\n <span>{{ blankNode.originalValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultOriginalValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n {{ blankNode.originalValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notRecalculated\">\n <ng-template #defaultRecalculatedValue>\n <span>{{ blankNode.recalculatedValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultRecalculatedValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n {{ blankNode.recalculatedValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"isBlankNodes\" class=\"is-nowrap\">\n <ng-template #defaultDeltaValue>\n <he-blank-node-value-delta\n *ngIf=\"blankNode.original.length && blankNode.isRecalculated; else noValue\"\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"blankNode.originalValue\"></he-blank-node-value-delta>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultDeltaValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n <he-blank-node-value-delta\n *ngIf=\"\n blankNode.originalValueByMethodId[model.methodId] !== null &&\n blankNode.recalculatedValueByMethodId[model.methodId] !== null;\n else noValue\n \"\n [value]=\"blankNode.recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"blankNode.originalValueByMethodId[model.methodId]\"></he-blank-node-value-delta>\n </div>\n </ng-container>\n </td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: blankNode }\"></ng-container>\n </tr>\n\n <tr\n *ngFor=\"let subValue of blankNode.keys\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"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\n <a\n class=\"is-inline-block is-pre-wrap\"\n *ngIf=\"blankNode.type\"\n [href]=\"baseUrl + '/schema/' + blankNode.type + '#' + subValue.key\"\n target=\"_blank\"\n [title]=\"subValue.key\">\n <span>{{ subValue.key }}</span>\n </a>\n <span class=\"is-inline-block is-align-top\" *ngIf=\"!blankNode.type\">{{ subValue.key }}</span>\n </td>\n <td *ngIf=\"isBlankNodes\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated || subValue.key === 'impactAssessment'; else notRecalculated\">\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td *ngIf=\"isBlankNodes\">-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\"></ng-container>\n </tr>\n\n <tr\n *ngFor=\"let subValue of blankNode.subValues\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [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\n <ng-container *ngIf=\"subValue.id\">\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n\n <ng-container [ngSwitch]=\"subValue.key\">\n <span class=\"is-inline-block\" *ngSwitchCase=\"'backgroundData'\">{{ subValue.id | keyToLabel }}</span>\n <he-node-link\n *ngSwitchDefault\n class=\"is-block pl-4\"\n [node]=\"termById(subValue.id)\"\n [attr.title]=\"termById(subValue.id).name\">\n <span [innerHtml]=\"termById(subValue.id).name | compound\"></span>\n </he-node-link>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"isBlankNodes\">\n <span class=\"is-nowrap\" *ngIf=\"subValue.showUnits\" [innerHtml]=\"blankNode.term?.units | compound\"></span>\n </td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td *ngIf=\"isBlankNodes\">-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\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 = !showLegend\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!showLegend\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"showLegend\"></fa-icon>\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n <ul class=\"content pl-2\" [class.is-hidden]=\"!showLegend\">\n <ng-container *ngFor=\"let status of LogStatus | keys\">\n <li *ngIf=\"logIcon[status.value]\" class=\"has-text-{{ logColor[status.value] }}\">\n <fa-icon [icon]=\"logIcon[status.value]\"></fa-icon>\n <span class=\"pl-1\">{{ status.value }}</span>\n </li>\n </ng-container>\n </ul>\n </div>\n <div class=\"column has-text-right\" *ngIf=\"filteredType\">\n <label class=\"is-inline-block checkbox\">\n <input\n type=\"checkbox\"\n class=\"selector\"\n [(ngModel)]=\"onlyRequired\"\n (change)=\"filterResults()\"\n [disabled]=\"!!term\" />\n <span class=\"ml-2\">\n Show only {{ filteredType | pluralize }} included in the default Hestia system boundary\n </span>\n </label>\n </div>\n </div>\n </div>\n</div>\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 <ng-container *ngIf=\"isSystemBoundary(data); else noValue\">\n <td class=\"blank-node-index-{{ i }}\" *ngFor=\"let c of methodModelsCount | times; let i = index\">\n <ng-container *ngIf=\"getModelsAt(data, i); let models; else: noValue\">\n <ng-template #modelSerie>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model: models, data }\"></ng-container>\n </ng-template>\n <div *ngIf=\"models | isArray; else modelSerie\">\n <p *ngFor=\"let model of models\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model, data }\"></ng-container>\n </p>\n </div>\n </ng-container>\n </td>\n </ng-container>\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=\"left\"\n container=\"body\"\n (click)=\"p.isOpen() ? p.close() : model.showLogs ? p.open({ logs: model.logs }) : null\">\n <span class=\"is-capitalized\">{{ methodName(model) }}</span>\n <span class=\"pl-1\" *ngIf=\"model.logs?.methodTier || model.model?.methodTier\">\n [{{ model.logs?.methodTier || model.model?.methodTier }}]\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=\"left\"\n container=\"body\"\n (click)=\"$event.stopPropagation(); p1.isOpen() ? p1.close() : p1.open({ model, data })\">\n <fa-icon [icon]=\"logIcon[model.status]\"></fa-icon>\n </span>\n\n <span class=\"pl-1\" *ngIf=\"model.model\">\n (\n <ng-container *ngTemplateOutlet=\"docsLink; context: { $implicit: model.model }\"></ng-container>\n )\n </span>\n </span>\n</ng-template>\n\n<ng-template #noValue>-</ng-template>\n\n<ng-template #notRecalculated>not recalculated</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <div class=\"table-container\" *bindOnce=\"logs\">\n <table class=\"table is-dark is-fullwidth\">\n <tbody>\n <ng-container *ngIf=\"logs?.requirements\">\n <ng-container *ngFor=\"let key of requirementKeys(logs.requirements)\">\n <ng-container *ngTemplateOutlet=\"logLine; context: { key, value: logs.requirements[key] }\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"logs?.logs\">\n <ng-container *ngFor=\"let key of logs.logs | keys\">\n <ng-container *ngTemplateOutlet=\"logLine; context: key\"></ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <ng-container *bindOnce=\"logs\">\n <div class=\"it-mt-2\" *ngIf=\"logs?.missingLookups?.length\">\n <p>Optional data missing:</p>\n\n <div class=\"table-container data-table-container\">\n <table class=\"table is-dark is-fullwidth is-striped\">\n <thead>\n <tr>\n <th class=\"has-text-white\">\n <span>Filename</span>\n </th>\n <th class=\"has-text-white\">\n <span>Column Title</span>\n </th>\n <th class=\"has-text-white\">\n <span>Row (term.id)</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"has-text-white\">\n <tr *ngFor=\"let data of logs.missingLookups\">\n <td>{{ data.filename }}</td>\n <td>{{ data.column }}</td>\n <td>{{ data.termId }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #logLineValue let-key=\"key\" let-value=\"value\">\n <ng-template #defaultValue>\n <span class=\"is-inline-block is-align-middle\">{{ value }}</span>\n </ng-template>\n <ng-container *ngIf=\"requirementLinkedNode(key, value); let linkedNode; else: defaultValue\">\n <he-node-link\n class=\"is-inline-block is-align-middle\"\n linkClass=\"is-dark\"\n [node]=\"linkedNode\"\n [showExternalLink]=\"true\"></he-node-link>\n </ng-container>\n</ng-template>\n\n<ng-template #logLine let-key=\"key\" let-value=\"value\">\n <tr>\n <td class=\"has-border-right copy-log\">\n <span class=\"is-inline-block is-align-middle\" [ngSwitch]=\"key\">\n <ng-container *ngSwitchDefault>{{ key | keyToLabel }}</ng-container>\n\n <ng-container *ngSwitchCase=\"'node_type_allowed'\">\n Is the current\n <code>Node</code>\n allowed to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'siteType_allowed'\">\n Is the current\n <code>siteType</code>\n allowed to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'primary_product_id_allowed'\">\n Is the current primary product\n <code>@id</code>\n allowed to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'primary_product_termType_allowed'\">\n Is the current primary product\n <code>termType</code>\n allowed to run this model\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'geospatial_data'\">Has geospatial data necessary to run this model</ng-container>\n <ng-container *ngSwitchCase=\"'contains_geospatial_data'\">\n Has geospatial data necessary to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'current_size'\">Current polygon area</ng-container>\n <ng-container *ngSwitchCase=\"'max_area_size'\">Maximum polygon area to run this model</ng-container>\n <ng-container *ngSwitchCase=\"'below_max_area_size'\">Polygon below the maximum area</ng-container>\n <ng-container *ngSwitchCase=\"'region_factor'\">Factor from region lookup</ng-container>\n\n <ng-container *ngSwitchCase=\"'pesticides_complete'\">\n Pesticide data are\n <code>complete</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'has_pesticides_inputs'\">\n Cycle contains\n <code>pesticideAI</code>\n Inputs\n </ng-container>\n <ng-container *ngSwitchCase=\"'all_pesticideAI_have_lookup_value'\">\n All\n <code>pesticideAI</code>\n Inputs have a lookup value\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'has_crop_residue_burnt'\">\n <code>aboveGroundCropResidueBurnt</code>\n is present as Product\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'liquid_slurry_sludge_P'\">Liquid, Slurry, and Sludge P</ng-container>\n\n <ng-container *ngSwitchCase=\"'term_type_cropResidue_complete'\">\n Data completeness for \"cropResidue\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_excreta_complete'\">\n Data completeness for \"excreta\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_fertiliser_complete'\">\n Data completeness for \"fertiliser\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_material_complete'\">\n Data completeness for \"material\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_other_complete'\">\n Data completeness for \"other\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_pesticidesAntibiotics_complete'\">\n Data completeness for \"pesticidesAntibiotics\" must be\n <code>true</code>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'term_type_cropResidue_incomplete'\">\n Data completeness for \"cropResidue\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_excreta_incomplete'\">\n Data completeness for \"excreta\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_fertiliser_incomplete'\">\n Data completeness for \"fertiliser\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_material_incomplete'\">\n Data completeness for \"material\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_other_incomplete'\">\n Data completeness for \"other\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_pesticidesAntibiotics_incomplete'\">\n Data completeness for \"pesticidesAntibiotics\" must be\n <code>false</code>\n </ng-container>\n </span>\n <he-clipboard\n class=\"is-inline-block is-align-middle\"\n clipboardClass=\"is-size-7 is-p-1\"\n [icon]=\"['far', 'clone']\"\n [value]=\"key\"\n [hideText]=\"true\"></he-clipboard>\n </td>\n <td>\n <ng-template #singleValue>\n <ng-container *ngTemplateOutlet=\"logLineValue; context: { key, value }\"></ng-container>\n </ng-template>\n <div *ngIf=\"logValueArray(value); let valueArray; else: singleValue\">\n <table class=\"table is-dark is-bordered is-striped\">\n <thead *ngIf=\"valueArray[0] | isObject\">\n <tr>\n <th class=\"has-text-white\" *ngFor=\"let v of valueArray[0] | keys\">{{ v.key }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let v of valueArray\">\n <ng-template #singleArrayValue>\n <td>{{ v }}</td>\n </ng-template>\n <ng-container *ngIf=\"v | isObject; else singleArrayValue\">\n <td *ngFor=\"let vv of v | keys\">{{ vv.value }}</td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n</ng-template>\n\n<ng-template #logStatusDetails let-model=\"model\" let-data=\"data\">\n <ng-container *bindOnce=\"model\">\n <div class=\"is-mb-2\">\n <span>Status:</span>\n <span class=\"is-pl-1\">{{ model.status }}</span>\n </div>\n\n <ng-container *ngIf=\"model.status === LogStatus.notRequired && model.logs?.is_not_relevant === 'True'\">\n <ul class=\"is-pl-3 is-list-style-disc\">\n <li *ngIf=\"model.logs.logs?.siteType_allowed === 'False'\">\n The\n <code>siteType</code>\n is not relevant.\n </li>\n <li *ngIf=\"model.logs.logs?.product_id_allowed === 'False'\">\n The primary product\n <code>@id</code>\n is not relevant.\n </li>\n <li *ngIf=\"model.logs.logs?.product_termType_allowed === 'False'\">\n The primary product\n <code>termType</code>\n is not relevant.\n </li>\n </ul>\n </ng-container>\n\n <ng-container\n *ngIf=\"model.logs && model.status !== LogStatus.notRequired && model.status !== LogStatus.skipHierarchy\">\n <ul class=\"is-pl-3 is-list-style-disc\">\n <ng-template #showRunOrchestrator>\n <li class=\"is-run-orchestrator\">\n <p *ngIf=\"model.logs?.shouldRun\">All the requirements were met to run the model.</p>\n <ng-container *ngIf=\"!model.logs?.shouldRun\">\n <p>Some of the requirements were not met to run the model.</p>\n <p>You can click on the model name on the left to view the debugging logs.</p>\n </ng-container>\n <ng-container *ngIf=\"model.logs?.logs?.error\">\n <p>The model failed to run for the following reason:</p>\n <p>\n <code>{{ model.logs.logs.error }}</code>\n </p>\n </ng-container>\n </li>\n </ng-template>\n\n <li\n class=\"is-no-run-orchestrator\"\n *ngIf=\"model.logs?.shouldRunOrchestrator === false; else showRunOrchestrator\">\n <ng-container *ngIf=\"!model.logs.runRequired\">\n <span class=\"is-run-node-type-not-allowed\" *ngIf=\"model.logs.logs?.node_type_allowed === 'False'\">\n This model should not run for {{ nodeType | pluralize: 0 }}\n </span>\n </ng-container>\n\n <ng-template #runNoConfig>\n <span class=\"is-run-not-empty\" *ngIf=\"model.logs.logs?.is_empty === 'False'\">\n The {{ data.type || 'blank node' }} with Term\n <code>{{ data.termId }}</code>\n is already present or already added by another model.\n </span>\n </ng-template>\n\n <ng-container *ngIf=\"model.config; else runNoConfig\">\n <p class=\"is-run-strategy-{{ model.config.runStrategy }}\" [ngSwitch]=\"model.config.runStrategy\">\n <span *ngSwitchCase=\"'always'\"></span>\n <span *ngSwitchCase=\"'add_key_if_missing'\">We only gap-fill this key if not present</span>\n <span *ngSwitchCase=\"'add_blank_node_if_missing'\">We only gap-fill this Blank Node if not present.</span>\n </p>\n\n <p class=\"is-mt-1\">\n <span\n class=\"is-run-with-measured\"\n *ngIf=\"\n model.config.runArgs?.runNonMeasured && hasMethodTier(data.original, EmissionMethodTier.measured)\n \">\n The\n <code>{{ model.config.value }}</code>\n was reported as measured.\n </span>\n </p>\n </ng-container>\n </li>\n\n <li *ngIf=\"model.logs?.replaceLowerTier !== undefined\">\n <span>\n The recalculated\n <b>methodTier</b>\n was\n </span>\n <span class=\"is-pl-1 is-underlined\" *ngIf=\"!model.logs.replaceLowerTier\">lower than</span>\n <span class=\"is-pl-1 is-underlined\" *ngIf=\"model.logs.replaceLowerTier\">higher than or equal to</span>\n <span class=\"is-pl-1\">\n the original\n <b>methodTier</b>\n .\n </span>\n </li>\n\n <li class=\"is-merge-replaceLowerTier\" *ngIf=\"model.logs.replaceLowerTier\">\n <span>The recalculated</span>\n <b class=\"is-pl-1\">{{ model.config?.mergeArgs?.replaceThreshold?.[0] || 'value' }}</b>\n <span class=\"is-pl-1\">was</span>\n <span class=\"is-pl-1\">\n <ng-container *ngIf=\"model.config?.mergeArgs\">\n <span class=\"is-underlined\" *ngIf=\"!model.logs.replaceThreshold\">less than</span>\n <span class=\"is-underlined\" *ngIf=\"model.logs.replaceThreshold\">more than or equal to</span>\n <b class=\"is-pl-1\">{{ model.config.mergeArgs.replaceThreshold[1] * 100 }}%</b>\n </ng-container>\n <ng-container *ngIf=\"!model.config?.mergeArgs\">\n <span class=\"is-underlined\" *ngIf=\"!model.logs.replaceThreshold\">not sufficiently</span>\n <span class=\"is-underlined\" *ngIf=\"model.logs.replaceThreshold\">sufficiently</span>\n </ng-container>\n </span>\n <span class=\"is-pl-1\">different from the original</span>\n <b class=\"is-pl-1\">{{ model.config?.mergeArgs?.replaceThreshold?.[0] || 'value' }}.</b>\n </li>\n </ul>\n </ng-container>\n </ng-container>\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 <fa-icon class=\"ml-1\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\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: 768px){::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: 768px){::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}::ng-deep .copy-log he-clipboard{visibility:hidden}::ng-deep .copy-log:hover he-clipboard{visibility:visible}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.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: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "selectOnExact", "showHint", "placement", "popperOptions", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { kind: "component", type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }, { kind: "component", type: ClipboardComponent, selector: "he-clipboard", inputs: ["value", "disabled", "hideText", "icon", "size", "rotate", "clipboardClass"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: KeysPipe, name: "keys" }, { kind: "pipe", type: PluralizePipe, name: "pluralize" }, { 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: "pipe", type: IsObjectPipe, name: "isObject" }] }); }
|
|
6330
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: { node: "node", nodeKey: "nodeKey", originalValues: "originalValues", recalculatedValues: "recalculatedValues", terms: "terms", filterTermTypes: "filterTermTypes", filterTermTypesLabel: "filterTermTypesLabel", logsKey: "logsKey" }, ngImport: i0, template: "<div class=\"px-3 pb-3\">\n <div class=\"has-text-right mb-2\" *ngIf=\"!isExternal\">\n <a class=\"is-size-7\" *ngIf=\"logsUrl\" [href]=\"logsUrl\" target=\"_blank\">\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n <span class=\"pl-2\">Open Full Logs</span>\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 <div class=\"field\" *ngIf=\"allTerms?.length\">\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)=\"filterResults()\" />\n <a class=\"icon is-small is-right\" [class.is-hidden]=\"!term\" (click)=\"term = ''; filterResults()\">\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </th>\n <th *ngIf=\"isBlankNodes\">\n <span class=\"is-pr-1\">Units</span>\n <span>(per </span>\n <span [ngSwitch]=\"functionalUnit\">\n <ng-container *ngSwitchCase=\"CycleFunctionalUnit['1 ha']\">hectare</ng-container>\n <ng-container *ngSwitchDefault>kg product</ng-container>\n </span>\n <span>)</span>\n </th>\n <th>Original</th>\n <th>Recalculated</th>\n <th *ngIf=\"isBlankNodes\">Difference</th>\n <th *ngFor=\"let c of methodModelsCount | times; let i = index\">({{ i + 1 }})</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngIf=\"loading\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"!loading && blankNodes.length === 0\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>No data</span>\n </td>\n </tr>\n <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\" [class.is-open]=\"blankNode.isOpen\">\n <td class=\"width-auto has-border-right is-nowrap\" [attr.title]=\"blankNode.term?.name || blankNode.key\">\n <a\n class=\"is-inline-block is-align-top pr-2 open-node\"\n (click)=\"blankNode.isOpen = !blankNode.isOpen\"\n *ngIf=\"blankNode.canOpen\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!blankNode.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"blankNode.isOpen\"></fa-icon>\n </a>\n <he-node-link class=\"is-inline-block is-pre-wrap\" *ngIf=\"blankNode.term\" [node]=\"blankNode.term\">\n <span [innerHtml]=\"blankNode.term.name | compound\"></span>\n </he-node-link>\n <span *ngIf=\"blankNode.key\">{{ blankNode.key }}</span>\n </td>\n <td *ngIf=\"isBlankNodes\">\n <span class=\"is-nowrap\" [innerHtml]=\"blankNode.term?.units | compound\"></span>\n </td>\n <td>\n <ng-template #defaultOriginalValue>\n <span>{{ blankNode.originalValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultOriginalValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n {{ blankNode.originalValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notRecalculated\">\n <ng-template #defaultRecalculatedValue>\n <span>{{ blankNode.recalculatedValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultRecalculatedValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n {{ blankNode.recalculatedValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"isBlankNodes\" class=\"is-nowrap\">\n <ng-template #defaultDeltaValue>\n <he-blank-node-value-delta\n *ngIf=\"blankNode.original.length && blankNode.isRecalculated; else noValue\"\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"blankNode.originalValue\"></he-blank-node-value-delta>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultDeltaValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n <he-blank-node-value-delta\n *ngIf=\"\n blankNode.originalValueByMethodId[model.methodId] !== null &&\n blankNode.recalculatedValueByMethodId[model.methodId] !== null;\n else noValue\n \"\n [value]=\"blankNode.recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"blankNode.originalValueByMethodId[model.methodId]\"></he-blank-node-value-delta>\n </div>\n </ng-container>\n </td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: blankNode }\"></ng-container>\n </tr>\n\n <tr\n *ngFor=\"let subValue of blankNode.keys\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"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\n <a\n class=\"is-inline-block is-pre-wrap\"\n *ngIf=\"blankNode.type\"\n [href]=\"baseUrl + '/schema/' + blankNode.type + '#' + subValue.key\"\n target=\"_blank\"\n [title]=\"subValue.key\">\n <span>{{ subValue.key }}</span>\n </a>\n <span class=\"is-inline-block is-align-top\" *ngIf=\"!blankNode.type\">{{ subValue.key }}</span>\n </td>\n <td *ngIf=\"isBlankNodes\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated || subValue.key === 'impactAssessment'; else notRecalculated\">\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td *ngIf=\"isBlankNodes\">-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\"></ng-container>\n </tr>\n\n <tr\n *ngFor=\"let subValue of blankNode.subValues\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [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\n <ng-container *ngIf=\"subValue.id\">\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n\n <ng-container [ngSwitch]=\"subValue.key\">\n <span class=\"is-inline-block\" *ngSwitchCase=\"'backgroundData'\">{{ subValue.id | keyToLabel }}</span>\n <he-node-link\n *ngSwitchDefault\n class=\"is-block pl-4\"\n [node]=\"termById(subValue.id)\"\n [attr.title]=\"termById(subValue.id).name\">\n <span [innerHtml]=\"termById(subValue.id).name | compound\"></span>\n </he-node-link>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"isBlankNodes\">\n <span class=\"is-nowrap\" *ngIf=\"subValue.showUnits\" [innerHtml]=\"blankNode.term?.units | compound\"></span>\n </td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td *ngIf=\"isBlankNodes\">-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\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 = !showLegend\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!showLegend\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"showLegend\"></fa-icon>\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n <ul class=\"content pl-2\" [class.is-hidden]=\"!showLegend\">\n <ng-container *ngFor=\"let status of LogStatus | keys\">\n <li *ngIf=\"logIcon[status.value]\" class=\"has-text-{{ logColor[status.value] }}\">\n <fa-icon [icon]=\"logIcon[status.value]\"></fa-icon>\n <span class=\"pl-1\">{{ status.value }}</span>\n </li>\n </ng-container>\n </ul>\n </div>\n <div class=\"column has-text-right\" *ngIf=\"filteredType\">\n <label class=\"is-inline-block checkbox\">\n <input\n type=\"checkbox\"\n class=\"selector\"\n [(ngModel)]=\"onlyRequired\"\n (change)=\"filterResults()\"\n [disabled]=\"!!term\" />\n <span class=\"ml-2\">\n Show only {{ filteredType | pluralize }} included in the default Hestia system boundary\n </span>\n </label>\n </div>\n </div>\n </div>\n</div>\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 <ng-container *ngIf=\"isSystemBoundary(data); else noValue\">\n <td class=\"blank-node-index-{{ i }}\" *ngFor=\"let c of methodModelsCount | times; let i = index\">\n <ng-container *ngIf=\"getModelsAt(data, i); let models; else: noValue\">\n <ng-template #modelSerie>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model: models, data }\"></ng-container>\n </ng-template>\n <div *ngIf=\"models | isArray; else modelSerie\">\n <p *ngFor=\"let model of models\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model, data }\"></ng-container>\n </p>\n </div>\n </ng-container>\n </td>\n </ng-container>\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=\"left\"\n container=\"body\"\n (click)=\"p.isOpen() ? p.close() : model.showLogs ? p.open({ logs: model.logs }) : null\">\n <span class=\"is-capitalized\">{{ methodName(model) }}</span>\n <span class=\"pl-1\" *ngIf=\"model.logs?.methodTier || model.model?.methodTier\">\n [{{ model.logs?.methodTier || model.model?.methodTier }}]\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=\"left\"\n container=\"body\"\n (click)=\"$event.stopPropagation(); p1.isOpen() ? p1.close() : p1.open({ model, data })\">\n <fa-icon [icon]=\"logIcon[model.status]\"></fa-icon>\n </span>\n\n <span class=\"pl-1\" *ngIf=\"model.model\">\n (\n <ng-container *ngTemplateOutlet=\"docsLink; context: { $implicit: model.model }\"></ng-container>\n )\n </span>\n </span>\n</ng-template>\n\n<ng-template #noValue>-</ng-template>\n\n<ng-template #notRecalculated>not recalculated</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <div class=\"table-container\" *bindOnce=\"logs\">\n <table class=\"table is-dark is-fullwidth\">\n <tbody>\n <ng-container *ngIf=\"logs?.requirements\">\n <ng-container *ngFor=\"let key of requirementKeys(logs.requirements)\">\n <ng-container *ngTemplateOutlet=\"logLine; context: { key, value: logs.requirements[key] }\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"logs?.logs\">\n <ng-container *ngFor=\"let key of logs.logs | keys\">\n <ng-container *ngTemplateOutlet=\"logLine; context: key\"></ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <ng-container *bindOnce=\"logs\">\n <div class=\"it-mt-2\" *ngIf=\"logs?.missingLookups?.length\">\n <p>Optional data missing:</p>\n\n <div class=\"table-container data-table-container\">\n <table class=\"table is-dark is-fullwidth is-striped\">\n <thead>\n <tr>\n <th class=\"has-text-white\">\n <span>Filename</span>\n </th>\n <th class=\"has-text-white\">\n <span>Column Title</span>\n </th>\n <th class=\"has-text-white\">\n <span>Row (term.id)</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"has-text-white\">\n <tr *ngFor=\"let data of logs.missingLookups\">\n <td>{{ data.filename }}</td>\n <td>{{ data.column }}</td>\n <td>{{ data.termId }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #logLineValue let-key=\"key\" let-value=\"value\">\n <ng-template #defaultValue>\n <span class=\"is-inline-block is-align-middle\">{{ value }}</span>\n </ng-template>\n <ng-container *ngIf=\"requirementLinkedNode(key, value); let linkedNode; else: defaultValue\">\n <he-node-link\n class=\"is-inline-block is-align-middle\"\n linkClass=\"is-dark\"\n [node]=\"linkedNode\"\n [showExternalLink]=\"true\"></he-node-link>\n </ng-container>\n</ng-template>\n\n<ng-template #logLine let-key=\"key\" let-value=\"value\">\n <tr>\n <td class=\"has-border-right copy-log\">\n <span class=\"is-inline-block is-align-middle\" [ngSwitch]=\"key\">\n <ng-container *ngSwitchDefault>{{ key | keyToLabel }}</ng-container>\n\n <ng-container *ngIf=\"parseLogCompleteness(key); let completeness\">\n <span>Data completeness for \"{{ completeness.key }}\" must be</span>\n <code class=\"is-pl-1\">{{ completeness.value }}</code>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'node_type_allowed'\">\n <span>Is the current</span>\n <code class=\"is-px-1\">Node</code>\n <span>allowed to run this model</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'siteType_allowed'\">\n <span>Is the current</span>\n <code class=\"is-px-1\">siteType</code>\n <span>allowed to run this model</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'primary_product_id_allowed'\">\n <span>Is the current primary product</span>\n <code class=\"is-px-1\">@id</code>\n <span>allowed to run this model</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'primary_product_termType_allowed'\">\n <span>Is the current primary product</span>\n <code class=\"is-px-1\">termType</code>\n <span>allowed to run this model</span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'geospatial_data'\">Has geospatial data necessary to run this model</ng-container>\n <ng-container *ngSwitchCase=\"'contains_geospatial_data'\">\n Has geospatial data necessary to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'current_size'\">Current polygon area</ng-container>\n <ng-container *ngSwitchCase=\"'max_area_size'\">Maximum polygon area to run this model</ng-container>\n <ng-container *ngSwitchCase=\"'below_max_area_size'\">Polygon below the maximum area</ng-container>\n <ng-container *ngSwitchCase=\"'region_factor'\">Factor from region lookup</ng-container>\n\n <ng-container *ngSwitchCase=\"'has_pesticides_inputs'\">\n <span>Cycle contains</span>\n <code class=\"is-px-1\">pesticideAI</code>\n <span>Inputs</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'all_pesticideAI_have_lookup_value'\">\n <span>All</span>\n <code class=\"is-px-1\">pesticideAI</code>\n <span>Inputs have a lookup value</span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'has_crop_residue_burnt'\">\n <code class=\"is-pr-1\">aboveGroundCropResidueBurnt</code>\n <span>is present as Product</span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'liquid_slurry_sludge_P'\">Liquid, Slurry, and Sludge P</ng-container>\n </span>\n <he-clipboard\n class=\"is-inline-block is-align-middle\"\n clipboardClass=\"is-size-7 is-p-1\"\n [icon]=\"['far', 'clone']\"\n [value]=\"key\"\n [hideText]=\"true\"></he-clipboard>\n </td>\n <td>\n <ng-template #singleValue>\n <ng-container *ngTemplateOutlet=\"logLineValue; context: { key, value }\"></ng-container>\n </ng-template>\n <div *ngIf=\"logValueArray(value); let valueArray; else: singleValue\">\n <table class=\"table is-dark is-bordered is-striped\">\n <thead *ngIf=\"valueArray[0] | isObject\">\n <tr>\n <th class=\"has-text-white\" *ngFor=\"let v of valueArray[0] | keys\">{{ v.key }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let v of valueArray\">\n <ng-template #singleArrayValue>\n <td>{{ v }}</td>\n </ng-template>\n <ng-container *ngIf=\"v | isObject; else singleArrayValue\">\n <td *ngFor=\"let vv of v | keys\">{{ vv.value }}</td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n</ng-template>\n\n<ng-template #logStatusDetails let-model=\"model\" let-data=\"data\">\n <ng-container *bindOnce=\"model\">\n <div class=\"is-mb-2\">\n <span>Status:</span>\n <span class=\"is-pl-1\">{{ model.status }}</span>\n </div>\n\n <ng-container *ngIf=\"model.status === LogStatus.notRequired && model.logs?.is_not_relevant === 'True'\">\n <ul class=\"is-pl-3 is-list-style-disc\">\n <li *ngIf=\"model.logs.logs?.siteType_allowed === 'False'\">\n The\n <code>siteType</code>\n is not relevant.\n </li>\n <li *ngIf=\"model.logs.logs?.product_id_allowed === 'False'\">\n The primary product\n <code>@id</code>\n is not relevant.\n </li>\n <li *ngIf=\"model.logs.logs?.product_termType_allowed === 'False'\">\n The primary product\n <code>termType</code>\n is not relevant.\n </li>\n </ul>\n </ng-container>\n\n <ng-container\n *ngIf=\"model.logs && model.status !== LogStatus.notRequired && model.status !== LogStatus.skipHierarchy\">\n <ul class=\"is-pl-3 is-list-style-disc\">\n <ng-template #showRunOrchestrator>\n <li class=\"is-run-orchestrator\">\n <p *ngIf=\"model.logs?.shouldRun\">All the requirements were met to run the model.</p>\n <ng-container *ngIf=\"!model.logs?.shouldRun\">\n <p>Some of the requirements were not met to run the model.</p>\n <p>You can click on the model name on the left to view the debugging logs.</p>\n </ng-container>\n <ng-container *ngIf=\"model.logs?.logs?.error\">\n <p>The model failed to run for the following reason:</p>\n <p>\n <code>{{ model.logs.logs.error }}</code>\n </p>\n </ng-container>\n </li>\n </ng-template>\n\n <li\n class=\"is-no-run-orchestrator\"\n *ngIf=\"model.logs?.shouldRunOrchestrator === false; else showRunOrchestrator\">\n <ng-container *ngIf=\"!model.logs.runRequired\">\n <span class=\"is-run-node-type-not-allowed\" *ngIf=\"model.logs.logs?.node_type_allowed === 'False'\">\n This model should not run for {{ nodeType | pluralize: 0 }}\n </span>\n </ng-container>\n\n <ng-template #runNoConfig>\n <span class=\"is-run-not-empty\" *ngIf=\"model.logs.logs?.is_empty === 'False'\">\n The {{ data.type || 'blank node' }} with Term\n <code>{{ data.termId }}</code>\n is already present or already added by another model.\n </span>\n </ng-template>\n\n <ng-container *ngIf=\"model.config; else runNoConfig\">\n <p class=\"is-run-strategy-{{ model.config.runStrategy }}\" [ngSwitch]=\"model.config.runStrategy\">\n <span *ngSwitchCase=\"'always'\"></span>\n <span *ngSwitchCase=\"'add_key_if_missing'\">We only gap-fill this key if not present</span>\n <span *ngSwitchCase=\"'add_blank_node_if_missing'\">We only gap-fill this Blank Node if not present.</span>\n </p>\n\n <p class=\"is-mt-1\">\n <span\n class=\"is-run-with-measured\"\n *ngIf=\"\n model.config.runArgs?.runNonMeasured && hasMethodTier(data.original, EmissionMethodTier.measured)\n \">\n The\n <code>{{ model.config.value }}</code>\n was reported as measured.\n </span>\n </p>\n </ng-container>\n </li>\n\n <li *ngIf=\"model.logs?.replaceLowerTier !== undefined\">\n <span>\n The recalculated\n <b>methodTier</b>\n was\n </span>\n <span class=\"is-pl-1 is-underlined\" *ngIf=\"!model.logs.replaceLowerTier\">lower than</span>\n <span class=\"is-pl-1 is-underlined\" *ngIf=\"model.logs.replaceLowerTier\">higher than or equal to</span>\n <span class=\"is-pl-1\">\n the original\n <b>methodTier</b>\n .\n </span>\n </li>\n\n <li class=\"is-merge-replaceLowerTier\" *ngIf=\"model.logs.replaceLowerTier\">\n <span>The recalculated</span>\n <b class=\"is-pl-1\">{{ model.config?.mergeArgs?.replaceThreshold?.[0] || 'value' }}</b>\n <span class=\"is-pl-1\">was</span>\n <span class=\"is-pl-1\">\n <ng-container *ngIf=\"model.config?.mergeArgs\">\n <span class=\"is-underlined\" *ngIf=\"!model.logs.replaceThreshold\">less than</span>\n <span class=\"is-underlined\" *ngIf=\"model.logs.replaceThreshold\">more than or equal to</span>\n <b class=\"is-pl-1\">{{ model.config.mergeArgs.replaceThreshold[1] * 100 }}%</b>\n </ng-container>\n <ng-container *ngIf=\"!model.config?.mergeArgs\">\n <span class=\"is-underlined\" *ngIf=\"!model.logs.replaceThreshold\">not sufficiently</span>\n <span class=\"is-underlined\" *ngIf=\"model.logs.replaceThreshold\">sufficiently</span>\n </ng-container>\n </span>\n <span class=\"is-pl-1\">different from the original</span>\n <b class=\"is-pl-1\">{{ model.config?.mergeArgs?.replaceThreshold?.[0] || 'value' }}.</b>\n </li>\n </ul>\n </ng-container>\n </ng-container>\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 <fa-icon class=\"ml-1\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\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: 768px){::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: 768px){::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}::ng-deep .copy-log he-clipboard{visibility:hidden}::ng-deep .copy-log:hover he-clipboard{visibility:visible}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.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: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "container", "editable", "focusFirst", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate", "selectOnExact", "showHint", "placement", "popperOptions", "popupClass"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { kind: "component", type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }, { kind: "component", type: ClipboardComponent, selector: "he-clipboard", inputs: ["value", "disabled", "hideText", "icon", "size", "rotate", "clipboardClass"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: KeysPipe, name: "keys" }, { kind: "pipe", type: PluralizePipe, name: "pluralize" }, { 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: "pipe", type: IsObjectPipe, name: "isObject" }] }); }
|
|
6307
6331
|
}
|
|
6308
6332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: NodeLogsModelsComponent, decorators: [{
|
|
6309
6333
|
type: Component$1,
|
|
6310
|
-
args: [{ selector: 'he-node-logs-models', template: "<div class=\"px-3 pb-3\">\n <div class=\"has-text-right mb-2\" *ngIf=\"!isExternal\">\n <a class=\"is-size-7\" *ngIf=\"logsUrl\" [href]=\"logsUrl\" target=\"_blank\">\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n <span class=\"pl-2\">Open Full Logs</span>\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 <div class=\"field\" *ngIf=\"allTerms?.length\">\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)=\"filterResults()\" />\n <a class=\"icon is-small is-right\" [class.is-hidden]=\"!term\" (click)=\"term = ''; filterResults()\">\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </th>\n <th *ngIf=\"isBlankNodes\">\n <span class=\"is-pr-1\">Units</span>\n <span>(per </span>\n <span [ngSwitch]=\"functionalUnit\">\n <ng-container *ngSwitchCase=\"CycleFunctionalUnit['1 ha']\">hectare</ng-container>\n <ng-container *ngSwitchDefault>kg product</ng-container>\n </span>\n <span>)</span>\n </th>\n <th>Original</th>\n <th>Recalculated</th>\n <th *ngIf=\"isBlankNodes\">Difference</th>\n <th *ngFor=\"let c of methodModelsCount | times; let i = index\">({{ i + 1 }})</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngIf=\"loading\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"!loading && blankNodes.length === 0\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>No data</span>\n </td>\n </tr>\n <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\" [class.is-open]=\"blankNode.isOpen\">\n <td class=\"width-auto has-border-right is-nowrap\" [attr.title]=\"blankNode.term?.name || blankNode.key\">\n <a\n class=\"is-inline-block is-align-top pr-2 open-node\"\n (click)=\"blankNode.isOpen = !blankNode.isOpen\"\n *ngIf=\"blankNode.canOpen\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!blankNode.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"blankNode.isOpen\"></fa-icon>\n </a>\n <he-node-link class=\"is-inline-block is-pre-wrap\" *ngIf=\"blankNode.term\" [node]=\"blankNode.term\">\n <span [innerHtml]=\"blankNode.term.name | compound\"></span>\n </he-node-link>\n <span *ngIf=\"blankNode.key\">{{ blankNode.key }}</span>\n </td>\n <td *ngIf=\"isBlankNodes\">\n <span class=\"is-nowrap\" [innerHtml]=\"blankNode.term?.units | compound\"></span>\n </td>\n <td>\n <ng-template #defaultOriginalValue>\n <span>{{ blankNode.originalValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultOriginalValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n {{ blankNode.originalValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notRecalculated\">\n <ng-template #defaultRecalculatedValue>\n <span>{{ blankNode.recalculatedValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultRecalculatedValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n {{ blankNode.recalculatedValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"isBlankNodes\" class=\"is-nowrap\">\n <ng-template #defaultDeltaValue>\n <he-blank-node-value-delta\n *ngIf=\"blankNode.original.length && blankNode.isRecalculated; else noValue\"\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"blankNode.originalValue\"></he-blank-node-value-delta>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultDeltaValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n <he-blank-node-value-delta\n *ngIf=\"\n blankNode.originalValueByMethodId[model.methodId] !== null &&\n blankNode.recalculatedValueByMethodId[model.methodId] !== null;\n else noValue\n \"\n [value]=\"blankNode.recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"blankNode.originalValueByMethodId[model.methodId]\"></he-blank-node-value-delta>\n </div>\n </ng-container>\n </td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: blankNode }\"></ng-container>\n </tr>\n\n <tr\n *ngFor=\"let subValue of blankNode.keys\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"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\n <a\n class=\"is-inline-block is-pre-wrap\"\n *ngIf=\"blankNode.type\"\n [href]=\"baseUrl + '/schema/' + blankNode.type + '#' + subValue.key\"\n target=\"_blank\"\n [title]=\"subValue.key\">\n <span>{{ subValue.key }}</span>\n </a>\n <span class=\"is-inline-block is-align-top\" *ngIf=\"!blankNode.type\">{{ subValue.key }}</span>\n </td>\n <td *ngIf=\"isBlankNodes\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated || subValue.key === 'impactAssessment'; else notRecalculated\">\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td *ngIf=\"isBlankNodes\">-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\"></ng-container>\n </tr>\n\n <tr\n *ngFor=\"let subValue of blankNode.subValues\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [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\n <ng-container *ngIf=\"subValue.id\">\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n\n <ng-container [ngSwitch]=\"subValue.key\">\n <span class=\"is-inline-block\" *ngSwitchCase=\"'backgroundData'\">{{ subValue.id | keyToLabel }}</span>\n <he-node-link\n *ngSwitchDefault\n class=\"is-block pl-4\"\n [node]=\"termById(subValue.id)\"\n [attr.title]=\"termById(subValue.id).name\">\n <span [innerHtml]=\"termById(subValue.id).name | compound\"></span>\n </he-node-link>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"isBlankNodes\">\n <span class=\"is-nowrap\" *ngIf=\"subValue.showUnits\" [innerHtml]=\"blankNode.term?.units | compound\"></span>\n </td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td *ngIf=\"isBlankNodes\">-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\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 = !showLegend\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!showLegend\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"showLegend\"></fa-icon>\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n <ul class=\"content pl-2\" [class.is-hidden]=\"!showLegend\">\n <ng-container *ngFor=\"let status of LogStatus | keys\">\n <li *ngIf=\"logIcon[status.value]\" class=\"has-text-{{ logColor[status.value] }}\">\n <fa-icon [icon]=\"logIcon[status.value]\"></fa-icon>\n <span class=\"pl-1\">{{ status.value }}</span>\n </li>\n </ng-container>\n </ul>\n </div>\n <div class=\"column has-text-right\" *ngIf=\"filteredType\">\n <label class=\"is-inline-block checkbox\">\n <input\n type=\"checkbox\"\n class=\"selector\"\n [(ngModel)]=\"onlyRequired\"\n (change)=\"filterResults()\"\n [disabled]=\"!!term\" />\n <span class=\"ml-2\">\n Show only {{ filteredType | pluralize }} included in the default Hestia system boundary\n </span>\n </label>\n </div>\n </div>\n </div>\n</div>\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 <ng-container *ngIf=\"isSystemBoundary(data); else noValue\">\n <td class=\"blank-node-index-{{ i }}\" *ngFor=\"let c of methodModelsCount | times; let i = index\">\n <ng-container *ngIf=\"getModelsAt(data, i); let models; else: noValue\">\n <ng-template #modelSerie>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model: models, data }\"></ng-container>\n </ng-template>\n <div *ngIf=\"models | isArray; else modelSerie\">\n <p *ngFor=\"let model of models\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model, data }\"></ng-container>\n </p>\n </div>\n </ng-container>\n </td>\n </ng-container>\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=\"left\"\n container=\"body\"\n (click)=\"p.isOpen() ? p.close() : model.showLogs ? p.open({ logs: model.logs }) : null\">\n <span class=\"is-capitalized\">{{ methodName(model) }}</span>\n <span class=\"pl-1\" *ngIf=\"model.logs?.methodTier || model.model?.methodTier\">\n [{{ model.logs?.methodTier || model.model?.methodTier }}]\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=\"left\"\n container=\"body\"\n (click)=\"$event.stopPropagation(); p1.isOpen() ? p1.close() : p1.open({ model, data })\">\n <fa-icon [icon]=\"logIcon[model.status]\"></fa-icon>\n </span>\n\n <span class=\"pl-1\" *ngIf=\"model.model\">\n (\n <ng-container *ngTemplateOutlet=\"docsLink; context: { $implicit: model.model }\"></ng-container>\n )\n </span>\n </span>\n</ng-template>\n\n<ng-template #noValue>-</ng-template>\n\n<ng-template #notRecalculated>not recalculated</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <div class=\"table-container\" *bindOnce=\"logs\">\n <table class=\"table is-dark is-fullwidth\">\n <tbody>\n <ng-container *ngIf=\"logs?.requirements\">\n <ng-container *ngFor=\"let key of requirementKeys(logs.requirements)\">\n <ng-container *ngTemplateOutlet=\"logLine; context: { key, value: logs.requirements[key] }\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"logs?.logs\">\n <ng-container *ngFor=\"let key of logs.logs | keys\">\n <ng-container *ngTemplateOutlet=\"logLine; context: key\"></ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <ng-container *bindOnce=\"logs\">\n <div class=\"it-mt-2\" *ngIf=\"logs?.missingLookups?.length\">\n <p>Optional data missing:</p>\n\n <div class=\"table-container data-table-container\">\n <table class=\"table is-dark is-fullwidth is-striped\">\n <thead>\n <tr>\n <th class=\"has-text-white\">\n <span>Filename</span>\n </th>\n <th class=\"has-text-white\">\n <span>Column Title</span>\n </th>\n <th class=\"has-text-white\">\n <span>Row (term.id)</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"has-text-white\">\n <tr *ngFor=\"let data of logs.missingLookups\">\n <td>{{ data.filename }}</td>\n <td>{{ data.column }}</td>\n <td>{{ data.termId }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #logLineValue let-key=\"key\" let-value=\"value\">\n <ng-template #defaultValue>\n <span class=\"is-inline-block is-align-middle\">{{ value }}</span>\n </ng-template>\n <ng-container *ngIf=\"requirementLinkedNode(key, value); let linkedNode; else: defaultValue\">\n <he-node-link\n class=\"is-inline-block is-align-middle\"\n linkClass=\"is-dark\"\n [node]=\"linkedNode\"\n [showExternalLink]=\"true\"></he-node-link>\n </ng-container>\n</ng-template>\n\n<ng-template #logLine let-key=\"key\" let-value=\"value\">\n <tr>\n <td class=\"has-border-right copy-log\">\n <span class=\"is-inline-block is-align-middle\" [ngSwitch]=\"key\">\n <ng-container *ngSwitchDefault>{{ key | keyToLabel }}</ng-container>\n\n <ng-container *ngSwitchCase=\"'node_type_allowed'\">\n Is the current\n <code>Node</code>\n allowed to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'siteType_allowed'\">\n Is the current\n <code>siteType</code>\n allowed to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'primary_product_id_allowed'\">\n Is the current primary product\n <code>@id</code>\n allowed to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'primary_product_termType_allowed'\">\n Is the current primary product\n <code>termType</code>\n allowed to run this model\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'geospatial_data'\">Has geospatial data necessary to run this model</ng-container>\n <ng-container *ngSwitchCase=\"'contains_geospatial_data'\">\n Has geospatial data necessary to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'current_size'\">Current polygon area</ng-container>\n <ng-container *ngSwitchCase=\"'max_area_size'\">Maximum polygon area to run this model</ng-container>\n <ng-container *ngSwitchCase=\"'below_max_area_size'\">Polygon below the maximum area</ng-container>\n <ng-container *ngSwitchCase=\"'region_factor'\">Factor from region lookup</ng-container>\n\n <ng-container *ngSwitchCase=\"'pesticides_complete'\">\n Pesticide data are\n <code>complete</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'has_pesticides_inputs'\">\n Cycle contains\n <code>pesticideAI</code>\n Inputs\n </ng-container>\n <ng-container *ngSwitchCase=\"'all_pesticideAI_have_lookup_value'\">\n All\n <code>pesticideAI</code>\n Inputs have a lookup value\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'has_crop_residue_burnt'\">\n <code>aboveGroundCropResidueBurnt</code>\n is present as Product\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'liquid_slurry_sludge_P'\">Liquid, Slurry, and Sludge P</ng-container>\n\n <ng-container *ngSwitchCase=\"'term_type_cropResidue_complete'\">\n Data completeness for \"cropResidue\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_excreta_complete'\">\n Data completeness for \"excreta\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_fertiliser_complete'\">\n Data completeness for \"fertiliser\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_material_complete'\">\n Data completeness for \"material\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_other_complete'\">\n Data completeness for \"other\" must be\n <code>true</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_pesticidesAntibiotics_complete'\">\n Data completeness for \"pesticidesAntibiotics\" must be\n <code>true</code>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'term_type_cropResidue_incomplete'\">\n Data completeness for \"cropResidue\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_excreta_incomplete'\">\n Data completeness for \"excreta\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_fertiliser_incomplete'\">\n Data completeness for \"fertiliser\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_material_incomplete'\">\n Data completeness for \"material\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_other_incomplete'\">\n Data completeness for \"other\" must be\n <code>false</code>\n </ng-container>\n <ng-container *ngSwitchCase=\"'term_type_pesticidesAntibiotics_incomplete'\">\n Data completeness for \"pesticidesAntibiotics\" must be\n <code>false</code>\n </ng-container>\n </span>\n <he-clipboard\n class=\"is-inline-block is-align-middle\"\n clipboardClass=\"is-size-7 is-p-1\"\n [icon]=\"['far', 'clone']\"\n [value]=\"key\"\n [hideText]=\"true\"></he-clipboard>\n </td>\n <td>\n <ng-template #singleValue>\n <ng-container *ngTemplateOutlet=\"logLineValue; context: { key, value }\"></ng-container>\n </ng-template>\n <div *ngIf=\"logValueArray(value); let valueArray; else: singleValue\">\n <table class=\"table is-dark is-bordered is-striped\">\n <thead *ngIf=\"valueArray[0] | isObject\">\n <tr>\n <th class=\"has-text-white\" *ngFor=\"let v of valueArray[0] | keys\">{{ v.key }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let v of valueArray\">\n <ng-template #singleArrayValue>\n <td>{{ v }}</td>\n </ng-template>\n <ng-container *ngIf=\"v | isObject; else singleArrayValue\">\n <td *ngFor=\"let vv of v | keys\">{{ vv.value }}</td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n</ng-template>\n\n<ng-template #logStatusDetails let-model=\"model\" let-data=\"data\">\n <ng-container *bindOnce=\"model\">\n <div class=\"is-mb-2\">\n <span>Status:</span>\n <span class=\"is-pl-1\">{{ model.status }}</span>\n </div>\n\n <ng-container *ngIf=\"model.status === LogStatus.notRequired && model.logs?.is_not_relevant === 'True'\">\n <ul class=\"is-pl-3 is-list-style-disc\">\n <li *ngIf=\"model.logs.logs?.siteType_allowed === 'False'\">\n The\n <code>siteType</code>\n is not relevant.\n </li>\n <li *ngIf=\"model.logs.logs?.product_id_allowed === 'False'\">\n The primary product\n <code>@id</code>\n is not relevant.\n </li>\n <li *ngIf=\"model.logs.logs?.product_termType_allowed === 'False'\">\n The primary product\n <code>termType</code>\n is not relevant.\n </li>\n </ul>\n </ng-container>\n\n <ng-container\n *ngIf=\"model.logs && model.status !== LogStatus.notRequired && model.status !== LogStatus.skipHierarchy\">\n <ul class=\"is-pl-3 is-list-style-disc\">\n <ng-template #showRunOrchestrator>\n <li class=\"is-run-orchestrator\">\n <p *ngIf=\"model.logs?.shouldRun\">All the requirements were met to run the model.</p>\n <ng-container *ngIf=\"!model.logs?.shouldRun\">\n <p>Some of the requirements were not met to run the model.</p>\n <p>You can click on the model name on the left to view the debugging logs.</p>\n </ng-container>\n <ng-container *ngIf=\"model.logs?.logs?.error\">\n <p>The model failed to run for the following reason:</p>\n <p>\n <code>{{ model.logs.logs.error }}</code>\n </p>\n </ng-container>\n </li>\n </ng-template>\n\n <li\n class=\"is-no-run-orchestrator\"\n *ngIf=\"model.logs?.shouldRunOrchestrator === false; else showRunOrchestrator\">\n <ng-container *ngIf=\"!model.logs.runRequired\">\n <span class=\"is-run-node-type-not-allowed\" *ngIf=\"model.logs.logs?.node_type_allowed === 'False'\">\n This model should not run for {{ nodeType | pluralize: 0 }}\n </span>\n </ng-container>\n\n <ng-template #runNoConfig>\n <span class=\"is-run-not-empty\" *ngIf=\"model.logs.logs?.is_empty === 'False'\">\n The {{ data.type || 'blank node' }} with Term\n <code>{{ data.termId }}</code>\n is already present or already added by another model.\n </span>\n </ng-template>\n\n <ng-container *ngIf=\"model.config; else runNoConfig\">\n <p class=\"is-run-strategy-{{ model.config.runStrategy }}\" [ngSwitch]=\"model.config.runStrategy\">\n <span *ngSwitchCase=\"'always'\"></span>\n <span *ngSwitchCase=\"'add_key_if_missing'\">We only gap-fill this key if not present</span>\n <span *ngSwitchCase=\"'add_blank_node_if_missing'\">We only gap-fill this Blank Node if not present.</span>\n </p>\n\n <p class=\"is-mt-1\">\n <span\n class=\"is-run-with-measured\"\n *ngIf=\"\n model.config.runArgs?.runNonMeasured && hasMethodTier(data.original, EmissionMethodTier.measured)\n \">\n The\n <code>{{ model.config.value }}</code>\n was reported as measured.\n </span>\n </p>\n </ng-container>\n </li>\n\n <li *ngIf=\"model.logs?.replaceLowerTier !== undefined\">\n <span>\n The recalculated\n <b>methodTier</b>\n was\n </span>\n <span class=\"is-pl-1 is-underlined\" *ngIf=\"!model.logs.replaceLowerTier\">lower than</span>\n <span class=\"is-pl-1 is-underlined\" *ngIf=\"model.logs.replaceLowerTier\">higher than or equal to</span>\n <span class=\"is-pl-1\">\n the original\n <b>methodTier</b>\n .\n </span>\n </li>\n\n <li class=\"is-merge-replaceLowerTier\" *ngIf=\"model.logs.replaceLowerTier\">\n <span>The recalculated</span>\n <b class=\"is-pl-1\">{{ model.config?.mergeArgs?.replaceThreshold?.[0] || 'value' }}</b>\n <span class=\"is-pl-1\">was</span>\n <span class=\"is-pl-1\">\n <ng-container *ngIf=\"model.config?.mergeArgs\">\n <span class=\"is-underlined\" *ngIf=\"!model.logs.replaceThreshold\">less than</span>\n <span class=\"is-underlined\" *ngIf=\"model.logs.replaceThreshold\">more than or equal to</span>\n <b class=\"is-pl-1\">{{ model.config.mergeArgs.replaceThreshold[1] * 100 }}%</b>\n </ng-container>\n <ng-container *ngIf=\"!model.config?.mergeArgs\">\n <span class=\"is-underlined\" *ngIf=\"!model.logs.replaceThreshold\">not sufficiently</span>\n <span class=\"is-underlined\" *ngIf=\"model.logs.replaceThreshold\">sufficiently</span>\n </ng-container>\n </span>\n <span class=\"is-pl-1\">different from the original</span>\n <b class=\"is-pl-1\">{{ model.config?.mergeArgs?.replaceThreshold?.[0] || 'value' }}.</b>\n </li>\n </ul>\n </ng-container>\n </ng-container>\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 <fa-icon class=\"ml-1\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\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: 768px){::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: 768px){::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}::ng-deep .copy-log he-clipboard{visibility:hidden}::ng-deep .copy-log:hover he-clipboard{visibility:visible}\n"] }]
|
|
6334
|
+
args: [{ selector: 'he-node-logs-models', template: "<div class=\"px-3 pb-3\">\n <div class=\"has-text-right mb-2\" *ngIf=\"!isExternal\">\n <a class=\"is-size-7\" *ngIf=\"logsUrl\" [href]=\"logsUrl\" target=\"_blank\">\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n <span class=\"pl-2\">Open Full Logs</span>\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 <div class=\"field\" *ngIf=\"allTerms?.length\">\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)=\"filterResults()\" />\n <a class=\"icon is-small is-right\" [class.is-hidden]=\"!term\" (click)=\"term = ''; filterResults()\">\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </th>\n <th *ngIf=\"isBlankNodes\">\n <span class=\"is-pr-1\">Units</span>\n <span>(per </span>\n <span [ngSwitch]=\"functionalUnit\">\n <ng-container *ngSwitchCase=\"CycleFunctionalUnit['1 ha']\">hectare</ng-container>\n <ng-container *ngSwitchDefault>kg product</ng-container>\n </span>\n <span>)</span>\n </th>\n <th>Original</th>\n <th>Recalculated</th>\n <th *ngIf=\"isBlankNodes\">Difference</th>\n <th *ngFor=\"let c of methodModelsCount | times; let i = index\">({{ i + 1 }})</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngIf=\"loading\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"!loading && blankNodes.length === 0\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>No data</span>\n </td>\n </tr>\n <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\" [class.is-open]=\"blankNode.isOpen\">\n <td class=\"width-auto has-border-right is-nowrap\" [attr.title]=\"blankNode.term?.name || blankNode.key\">\n <a\n class=\"is-inline-block is-align-top pr-2 open-node\"\n (click)=\"blankNode.isOpen = !blankNode.isOpen\"\n *ngIf=\"blankNode.canOpen\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!blankNode.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"blankNode.isOpen\"></fa-icon>\n </a>\n <he-node-link class=\"is-inline-block is-pre-wrap\" *ngIf=\"blankNode.term\" [node]=\"blankNode.term\">\n <span [innerHtml]=\"blankNode.term.name | compound\"></span>\n </he-node-link>\n <span *ngIf=\"blankNode.key\">{{ blankNode.key }}</span>\n </td>\n <td *ngIf=\"isBlankNodes\">\n <span class=\"is-nowrap\" [innerHtml]=\"blankNode.term?.units | compound\"></span>\n </td>\n <td>\n <ng-template #defaultOriginalValue>\n <span>{{ blankNode.originalValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultOriginalValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n {{ blankNode.originalValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notRecalculated\">\n <ng-template #defaultRecalculatedValue>\n <span>{{ blankNode.recalculatedValue | precision: 3 | default: '-' }}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultRecalculatedValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n {{ blankNode.recalculatedValueByMethodId[model.methodId] | precision: 3 | default: '-' }}\n </div>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"isBlankNodes\" class=\"is-nowrap\">\n <ng-template #defaultDeltaValue>\n <he-blank-node-value-delta\n *ngIf=\"blankNode.original.length && blankNode.isRecalculated; else noValue\"\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"blankNode.originalValue\"></he-blank-node-value-delta>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultDeltaValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n <he-blank-node-value-delta\n *ngIf=\"\n blankNode.originalValueByMethodId[model.methodId] !== null &&\n blankNode.recalculatedValueByMethodId[model.methodId] !== null;\n else noValue\n \"\n [value]=\"blankNode.recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"blankNode.originalValueByMethodId[model.methodId]\"></he-blank-node-value-delta>\n </div>\n </ng-container>\n </td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: blankNode }\"></ng-container>\n </tr>\n\n <tr\n *ngFor=\"let subValue of blankNode.keys\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"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\n <a\n class=\"is-inline-block is-pre-wrap\"\n *ngIf=\"blankNode.type\"\n [href]=\"baseUrl + '/schema/' + blankNode.type + '#' + subValue.key\"\n target=\"_blank\"\n [title]=\"subValue.key\">\n <span>{{ subValue.key }}</span>\n </a>\n <span class=\"is-inline-block is-align-top\" *ngIf=\"!blankNode.type\">{{ subValue.key }}</span>\n </td>\n <td *ngIf=\"isBlankNodes\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated || subValue.key === 'impactAssessment'; else notRecalculated\">\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td *ngIf=\"isBlankNodes\">-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\"></ng-container>\n </tr>\n\n <tr\n *ngFor=\"let subValue of blankNode.subValues\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [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\n <ng-container *ngIf=\"subValue.id\">\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n\n <ng-container [ngSwitch]=\"subValue.key\">\n <span class=\"is-inline-block\" *ngSwitchCase=\"'backgroundData'\">{{ subValue.id | keyToLabel }}</span>\n <he-node-link\n *ngSwitchDefault\n class=\"is-block pl-4\"\n [node]=\"termById(subValue.id)\"\n [attr.title]=\"termById(subValue.id).name\">\n <span [innerHtml]=\"termById(subValue.id).name | compound\"></span>\n </he-node-link>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"isBlankNodes\">\n <span class=\"is-nowrap\" *ngIf=\"subValue.showUnits\" [innerHtml]=\"blankNode.term?.units | compound\"></span>\n </td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">\n {{ subValue.originalValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\n {{ subValue.recalculatedValue | precision: 3 | default: '-' }}\n </span>\n </td>\n <td *ngIf=\"isBlankNodes\">-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: { data: subValue }\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\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 = !showLegend\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!showLegend\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"showLegend\"></fa-icon>\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n <ul class=\"content pl-2\" [class.is-hidden]=\"!showLegend\">\n <ng-container *ngFor=\"let status of LogStatus | keys\">\n <li *ngIf=\"logIcon[status.value]\" class=\"has-text-{{ logColor[status.value] }}\">\n <fa-icon [icon]=\"logIcon[status.value]\"></fa-icon>\n <span class=\"pl-1\">{{ status.value }}</span>\n </li>\n </ng-container>\n </ul>\n </div>\n <div class=\"column has-text-right\" *ngIf=\"filteredType\">\n <label class=\"is-inline-block checkbox\">\n <input\n type=\"checkbox\"\n class=\"selector\"\n [(ngModel)]=\"onlyRequired\"\n (change)=\"filterResults()\"\n [disabled]=\"!!term\" />\n <span class=\"ml-2\">\n Show only {{ filteredType | pluralize }} included in the default Hestia system boundary\n </span>\n </label>\n </div>\n </div>\n </div>\n</div>\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 <ng-container *ngIf=\"isSystemBoundary(data); else noValue\">\n <td class=\"blank-node-index-{{ i }}\" *ngFor=\"let c of methodModelsCount | times; let i = index\">\n <ng-container *ngIf=\"getModelsAt(data, i); let models; else: noValue\">\n <ng-template #modelSerie>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model: models, data }\"></ng-container>\n </ng-template>\n <div *ngIf=\"models | isArray; else modelSerie\">\n <p *ngFor=\"let model of models\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: { model, data }\"></ng-container>\n </p>\n </div>\n </ng-container>\n </td>\n </ng-container>\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=\"left\"\n container=\"body\"\n (click)=\"p.isOpen() ? p.close() : model.showLogs ? p.open({ logs: model.logs }) : null\">\n <span class=\"is-capitalized\">{{ methodName(model) }}</span>\n <span class=\"pl-1\" *ngIf=\"model.logs?.methodTier || model.model?.methodTier\">\n [{{ model.logs?.methodTier || model.model?.methodTier }}]\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=\"left\"\n container=\"body\"\n (click)=\"$event.stopPropagation(); p1.isOpen() ? p1.close() : p1.open({ model, data })\">\n <fa-icon [icon]=\"logIcon[model.status]\"></fa-icon>\n </span>\n\n <span class=\"pl-1\" *ngIf=\"model.model\">\n (\n <ng-container *ngTemplateOutlet=\"docsLink; context: { $implicit: model.model }\"></ng-container>\n )\n </span>\n </span>\n</ng-template>\n\n<ng-template #noValue>-</ng-template>\n\n<ng-template #notRecalculated>not recalculated</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <div class=\"table-container\" *bindOnce=\"logs\">\n <table class=\"table is-dark is-fullwidth\">\n <tbody>\n <ng-container *ngIf=\"logs?.requirements\">\n <ng-container *ngFor=\"let key of requirementKeys(logs.requirements)\">\n <ng-container *ngTemplateOutlet=\"logLine; context: { key, value: logs.requirements[key] }\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"logs?.logs\">\n <ng-container *ngFor=\"let key of logs.logs | keys\">\n <ng-container *ngTemplateOutlet=\"logLine; context: key\"></ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <ng-container *bindOnce=\"logs\">\n <div class=\"it-mt-2\" *ngIf=\"logs?.missingLookups?.length\">\n <p>Optional data missing:</p>\n\n <div class=\"table-container data-table-container\">\n <table class=\"table is-dark is-fullwidth is-striped\">\n <thead>\n <tr>\n <th class=\"has-text-white\">\n <span>Filename</span>\n </th>\n <th class=\"has-text-white\">\n <span>Column Title</span>\n </th>\n <th class=\"has-text-white\">\n <span>Row (term.id)</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"has-text-white\">\n <tr *ngFor=\"let data of logs.missingLookups\">\n <td>{{ data.filename }}</td>\n <td>{{ data.column }}</td>\n <td>{{ data.termId }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #logLineValue let-key=\"key\" let-value=\"value\">\n <ng-template #defaultValue>\n <span class=\"is-inline-block is-align-middle\">{{ value }}</span>\n </ng-template>\n <ng-container *ngIf=\"requirementLinkedNode(key, value); let linkedNode; else: defaultValue\">\n <he-node-link\n class=\"is-inline-block is-align-middle\"\n linkClass=\"is-dark\"\n [node]=\"linkedNode\"\n [showExternalLink]=\"true\"></he-node-link>\n </ng-container>\n</ng-template>\n\n<ng-template #logLine let-key=\"key\" let-value=\"value\">\n <tr>\n <td class=\"has-border-right copy-log\">\n <span class=\"is-inline-block is-align-middle\" [ngSwitch]=\"key\">\n <ng-container *ngSwitchDefault>{{ key | keyToLabel }}</ng-container>\n\n <ng-container *ngIf=\"parseLogCompleteness(key); let completeness\">\n <span>Data completeness for \"{{ completeness.key }}\" must be</span>\n <code class=\"is-pl-1\">{{ completeness.value }}</code>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'node_type_allowed'\">\n <span>Is the current</span>\n <code class=\"is-px-1\">Node</code>\n <span>allowed to run this model</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'siteType_allowed'\">\n <span>Is the current</span>\n <code class=\"is-px-1\">siteType</code>\n <span>allowed to run this model</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'primary_product_id_allowed'\">\n <span>Is the current primary product</span>\n <code class=\"is-px-1\">@id</code>\n <span>allowed to run this model</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'primary_product_termType_allowed'\">\n <span>Is the current primary product</span>\n <code class=\"is-px-1\">termType</code>\n <span>allowed to run this model</span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'geospatial_data'\">Has geospatial data necessary to run this model</ng-container>\n <ng-container *ngSwitchCase=\"'contains_geospatial_data'\">\n Has geospatial data necessary to run this model\n </ng-container>\n <ng-container *ngSwitchCase=\"'current_size'\">Current polygon area</ng-container>\n <ng-container *ngSwitchCase=\"'max_area_size'\">Maximum polygon area to run this model</ng-container>\n <ng-container *ngSwitchCase=\"'below_max_area_size'\">Polygon below the maximum area</ng-container>\n <ng-container *ngSwitchCase=\"'region_factor'\">Factor from region lookup</ng-container>\n\n <ng-container *ngSwitchCase=\"'has_pesticides_inputs'\">\n <span>Cycle contains</span>\n <code class=\"is-px-1\">pesticideAI</code>\n <span>Inputs</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'all_pesticideAI_have_lookup_value'\">\n <span>All</span>\n <code class=\"is-px-1\">pesticideAI</code>\n <span>Inputs have a lookup value</span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'has_crop_residue_burnt'\">\n <code class=\"is-pr-1\">aboveGroundCropResidueBurnt</code>\n <span>is present as Product</span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'liquid_slurry_sludge_P'\">Liquid, Slurry, and Sludge P</ng-container>\n </span>\n <he-clipboard\n class=\"is-inline-block is-align-middle\"\n clipboardClass=\"is-size-7 is-p-1\"\n [icon]=\"['far', 'clone']\"\n [value]=\"key\"\n [hideText]=\"true\"></he-clipboard>\n </td>\n <td>\n <ng-template #singleValue>\n <ng-container *ngTemplateOutlet=\"logLineValue; context: { key, value }\"></ng-container>\n </ng-template>\n <div *ngIf=\"logValueArray(value); let valueArray; else: singleValue\">\n <table class=\"table is-dark is-bordered is-striped\">\n <thead *ngIf=\"valueArray[0] | isObject\">\n <tr>\n <th class=\"has-text-white\" *ngFor=\"let v of valueArray[0] | keys\">{{ v.key }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let v of valueArray\">\n <ng-template #singleArrayValue>\n <td>{{ v }}</td>\n </ng-template>\n <ng-container *ngIf=\"v | isObject; else singleArrayValue\">\n <td *ngFor=\"let vv of v | keys\">{{ vv.value }}</td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n</ng-template>\n\n<ng-template #logStatusDetails let-model=\"model\" let-data=\"data\">\n <ng-container *bindOnce=\"model\">\n <div class=\"is-mb-2\">\n <span>Status:</span>\n <span class=\"is-pl-1\">{{ model.status }}</span>\n </div>\n\n <ng-container *ngIf=\"model.status === LogStatus.notRequired && model.logs?.is_not_relevant === 'True'\">\n <ul class=\"is-pl-3 is-list-style-disc\">\n <li *ngIf=\"model.logs.logs?.siteType_allowed === 'False'\">\n The\n <code>siteType</code>\n is not relevant.\n </li>\n <li *ngIf=\"model.logs.logs?.product_id_allowed === 'False'\">\n The primary product\n <code>@id</code>\n is not relevant.\n </li>\n <li *ngIf=\"model.logs.logs?.product_termType_allowed === 'False'\">\n The primary product\n <code>termType</code>\n is not relevant.\n </li>\n </ul>\n </ng-container>\n\n <ng-container\n *ngIf=\"model.logs && model.status !== LogStatus.notRequired && model.status !== LogStatus.skipHierarchy\">\n <ul class=\"is-pl-3 is-list-style-disc\">\n <ng-template #showRunOrchestrator>\n <li class=\"is-run-orchestrator\">\n <p *ngIf=\"model.logs?.shouldRun\">All the requirements were met to run the model.</p>\n <ng-container *ngIf=\"!model.logs?.shouldRun\">\n <p>Some of the requirements were not met to run the model.</p>\n <p>You can click on the model name on the left to view the debugging logs.</p>\n </ng-container>\n <ng-container *ngIf=\"model.logs?.logs?.error\">\n <p>The model failed to run for the following reason:</p>\n <p>\n <code>{{ model.logs.logs.error }}</code>\n </p>\n </ng-container>\n </li>\n </ng-template>\n\n <li\n class=\"is-no-run-orchestrator\"\n *ngIf=\"model.logs?.shouldRunOrchestrator === false; else showRunOrchestrator\">\n <ng-container *ngIf=\"!model.logs.runRequired\">\n <span class=\"is-run-node-type-not-allowed\" *ngIf=\"model.logs.logs?.node_type_allowed === 'False'\">\n This model should not run for {{ nodeType | pluralize: 0 }}\n </span>\n </ng-container>\n\n <ng-template #runNoConfig>\n <span class=\"is-run-not-empty\" *ngIf=\"model.logs.logs?.is_empty === 'False'\">\n The {{ data.type || 'blank node' }} with Term\n <code>{{ data.termId }}</code>\n is already present or already added by another model.\n </span>\n </ng-template>\n\n <ng-container *ngIf=\"model.config; else runNoConfig\">\n <p class=\"is-run-strategy-{{ model.config.runStrategy }}\" [ngSwitch]=\"model.config.runStrategy\">\n <span *ngSwitchCase=\"'always'\"></span>\n <span *ngSwitchCase=\"'add_key_if_missing'\">We only gap-fill this key if not present</span>\n <span *ngSwitchCase=\"'add_blank_node_if_missing'\">We only gap-fill this Blank Node if not present.</span>\n </p>\n\n <p class=\"is-mt-1\">\n <span\n class=\"is-run-with-measured\"\n *ngIf=\"\n model.config.runArgs?.runNonMeasured && hasMethodTier(data.original, EmissionMethodTier.measured)\n \">\n The\n <code>{{ model.config.value }}</code>\n was reported as measured.\n </span>\n </p>\n </ng-container>\n </li>\n\n <li *ngIf=\"model.logs?.replaceLowerTier !== undefined\">\n <span>\n The recalculated\n <b>methodTier</b>\n was\n </span>\n <span class=\"is-pl-1 is-underlined\" *ngIf=\"!model.logs.replaceLowerTier\">lower than</span>\n <span class=\"is-pl-1 is-underlined\" *ngIf=\"model.logs.replaceLowerTier\">higher than or equal to</span>\n <span class=\"is-pl-1\">\n the original\n <b>methodTier</b>\n .\n </span>\n </li>\n\n <li class=\"is-merge-replaceLowerTier\" *ngIf=\"model.logs.replaceLowerTier\">\n <span>The recalculated</span>\n <b class=\"is-pl-1\">{{ model.config?.mergeArgs?.replaceThreshold?.[0] || 'value' }}</b>\n <span class=\"is-pl-1\">was</span>\n <span class=\"is-pl-1\">\n <ng-container *ngIf=\"model.config?.mergeArgs\">\n <span class=\"is-underlined\" *ngIf=\"!model.logs.replaceThreshold\">less than</span>\n <span class=\"is-underlined\" *ngIf=\"model.logs.replaceThreshold\">more than or equal to</span>\n <b class=\"is-pl-1\">{{ model.config.mergeArgs.replaceThreshold[1] * 100 }}%</b>\n </ng-container>\n <ng-container *ngIf=\"!model.config?.mergeArgs\">\n <span class=\"is-underlined\" *ngIf=\"!model.logs.replaceThreshold\">not sufficiently</span>\n <span class=\"is-underlined\" *ngIf=\"model.logs.replaceThreshold\">sufficiently</span>\n </ng-container>\n </span>\n <span class=\"is-pl-1\">different from the original</span>\n <b class=\"is-pl-1\">{{ model.config?.mergeArgs?.replaceThreshold?.[0] || 'value' }}.</b>\n </li>\n </ul>\n </ng-container>\n </ng-container>\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 <fa-icon class=\"ml-1\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\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: 768px){::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: 768px){::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}::ng-deep .copy-log he-clipboard{visibility:hidden}::ng-deep .copy-log:hover he-clipboard{visibility:visible}\n"] }]
|
|
6311
6335
|
}], ctorParameters: function () { return [{ type: HeNodeService }, { type: HeSearchService }, { type: HeEngineService }]; }, propDecorators: { node: [{
|
|
6312
6336
|
type: Input
|
|
6313
6337
|
}], nodeKey: [{
|
|
@@ -6352,7 +6376,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImpor
|
|
|
6352
6376
|
type: Input
|
|
6353
6377
|
}] } });
|
|
6354
6378
|
|
|
6379
|
+
// TODO: compute from the list of unique properties
|
|
6355
6380
|
const additionalKeys = [
|
|
6381
|
+
'key',
|
|
6356
6382
|
'methodModelDescription',
|
|
6357
6383
|
'description',
|
|
6358
6384
|
'primary',
|
|
@@ -6370,12 +6396,15 @@ const additionalKeys = [
|
|
|
6370
6396
|
'economicValueShare',
|
|
6371
6397
|
'operation',
|
|
6372
6398
|
'impactAssessment',
|
|
6373
|
-
'properties'
|
|
6399
|
+
'properties',
|
|
6400
|
+
'isAnimalFeed',
|
|
6401
|
+
'fate'
|
|
6374
6402
|
];
|
|
6375
6403
|
const tableKeys = [
|
|
6376
6404
|
'inputs',
|
|
6377
6405
|
'transformation',
|
|
6378
6406
|
'operation',
|
|
6407
|
+
'impactAssessment',
|
|
6379
6408
|
'value',
|
|
6380
6409
|
'term.units',
|
|
6381
6410
|
'dates',
|
|
@@ -6866,6 +6895,9 @@ class CyclesActivityComponent {
|
|
|
6866
6895
|
return this.update();
|
|
6867
6896
|
}
|
|
6868
6897
|
// Recalculation logs
|
|
6898
|
+
showSwitchToRecalculated() {
|
|
6899
|
+
return this.isOriginal && this.cycles.some(cycle => !cycle.aggregated);
|
|
6900
|
+
}
|
|
6869
6901
|
updateSelectedIndex(index) {
|
|
6870
6902
|
this.selectedIndex = -1;
|
|
6871
6903
|
// force a refresh of the logs
|
|
@@ -6875,11 +6907,11 @@ class CyclesActivityComponent {
|
|
|
6875
6907
|
return this.updateSelectedIndex(+value);
|
|
6876
6908
|
}
|
|
6877
6909
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CyclesActivityComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6878
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: CyclesActivityComponent, selector: "he-cycles-activity", inputs: { originalValues: "originalValues", cycles: "cycles", dataState: "dataState", enableCompare: "enableCompare" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && (inputs.length || products.length)\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter inputs & products by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.chart\"\n (click)=\"selectedView = View.chart\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"inputs.length || products.length; else emptyTable\">\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 class=\"has-text-weight-bold\">\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngIf=\"inputs.length\" [attr.colspan]=\"inputs.length\" [class.has-border-right]=\"products.length\">\n Inputs\n </th>\n <th *ngIf=\"products.length\" [attr.colspan]=\"products.length\">Products</th>\n </tr>\n <tr class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th\n *ngFor=\"let input of inputs; let pl = last\"\n [attr.title]=\"input.value.term.name\"\n [class.has-border-right]=\"products.length && pl\">\n <he-node-link [node]=\"input.value.term\">\n <span [innerHtml]=\"input.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n <th *ngFor=\"let product of products; let pl = last\" [attr.title]=\"product.value.term.name\">\n <he-node-link [node]=\"product.value.term\">\n <span [innerHtml]=\"product.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th\n *ngFor=\"let input of inputs; let pl = last\"\n [attr.title]=\"input.value.term.units\"\n [class.has-border-right]=\"products.length && pl\">\n <span [innerHtml]=\"input.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"input.value.term\"></he-terms-units-description>\n </th>\n <th *ngFor=\"let product of products; let pl = last\" [attr.title]=\"product.value.term.units\">\n <span [innerHtml]=\"product.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"product.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycle\"></he-cycles-functional-unit-measure>\n </td>\n <td\n class=\"is-nowrap\"\n *ngFor=\"let input of inputs; let pl = last\"\n [class.has-border-right]=\"products.length && pl\">\n <span\n *ngIf=\"input.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"togglePopover(p, { data: input.value.values[cycle['@id']], cycle: cycle, key: 'inputs' })\">\n <span pointer>\n {{\n propertyValue(input.value.values[cycle['@id']].value, input.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"input.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let product of products; let pl = last\">\n <span\n *ngIf=\"product.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: product.value.values[cycle['@id']], cycle: cycle, key: 'products' })\n \">\n <span pointer>\n {{\n propertyValue(product.value.values[cycle['@id']].value, product.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"product.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-result *ngIf=\"selectedView === View.chart\" [cycles]=\"cycles\"></he-cycles-result>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-activity-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [original]=\"originalValues[selectedIndex]\"\n [recalculated]=\"cycles[selectedIndex]\"></he-cycles-activity-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"inputs-products.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span [class.is-hidden]=\"!isOriginal\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: CyclesActivityLogsComponent, selector: "he-cycles-activity-logs", inputs: ["cycle", "original", "recalculated"] }, { kind: "component", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { kind: "component", type: CyclesResultComponent, selector: "he-cycles-result", inputs: ["cycles"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
6910
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: CyclesActivityComponent, selector: "he-cycles-activity", inputs: { originalValues: "originalValues", cycles: "cycles", dataState: "dataState", enableCompare: "enableCompare" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && (inputs.length || products.length)\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter inputs & products by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.chart\"\n (click)=\"selectedView = View.chart\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"inputs.length || products.length; else emptyTable\">\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 class=\"has-text-weight-bold\">\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngIf=\"inputs.length\" [attr.colspan]=\"inputs.length\" [class.has-border-right]=\"products.length\">\n Inputs\n </th>\n <th *ngIf=\"products.length\" [attr.colspan]=\"products.length\">Products</th>\n </tr>\n <tr class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th\n *ngFor=\"let input of inputs; let pl = last\"\n [attr.title]=\"input.value.term.name\"\n [class.has-border-right]=\"products.length && pl\">\n <he-node-link [node]=\"input.value.term\">\n <span [innerHtml]=\"input.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n <th *ngFor=\"let product of products; let pl = last\" [attr.title]=\"product.value.term.name\">\n <he-node-link [node]=\"product.value.term\">\n <span [innerHtml]=\"product.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th\n *ngFor=\"let input of inputs; let pl = last\"\n [attr.title]=\"input.value.term.units\"\n [class.has-border-right]=\"products.length && pl\">\n <span [innerHtml]=\"input.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"input.value.term\"></he-terms-units-description>\n </th>\n <th *ngFor=\"let product of products; let pl = last\" [attr.title]=\"product.value.term.units\">\n <span [innerHtml]=\"product.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"product.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycle\"></he-cycles-functional-unit-measure>\n </td>\n <td\n class=\"is-nowrap\"\n *ngFor=\"let input of inputs; let pl = last\"\n [class.has-border-right]=\"products.length && pl\">\n <span\n *ngIf=\"input.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"togglePopover(p, { data: input.value.values[cycle['@id']], cycle: cycle, key: 'inputs' })\">\n <span pointer>\n {{\n propertyValue(input.value.values[cycle['@id']].value, input.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"input.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let product of products; let pl = last\">\n <span\n *ngIf=\"product.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: product.value.values[cycle['@id']], cycle: cycle, key: 'products' })\n \">\n <span pointer>\n {{\n propertyValue(product.value.values[cycle['@id']].value, product.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"product.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-result *ngIf=\"selectedView === View.chart\" [cycles]=\"cycles\"></he-cycles-result>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-activity-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [original]=\"originalValues[selectedIndex]\"\n [recalculated]=\"cycles[selectedIndex]\"></he-cycles-activity-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"inputs-products.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: CyclesActivityLogsComponent, selector: "he-cycles-activity-logs", inputs: ["cycle", "original", "recalculated"] }, { kind: "component", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { kind: "component", type: CyclesResultComponent, selector: "he-cycles-result", inputs: ["cycles"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
6879
6911
|
}
|
|
6880
6912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CyclesActivityComponent, decorators: [{
|
|
6881
6913
|
type: Component$1,
|
|
6882
|
-
args: [{ selector: 'he-cycles-activity', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && (inputs.length || products.length)\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter inputs & products by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.chart\"\n (click)=\"selectedView = View.chart\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"inputs.length || products.length; else emptyTable\">\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 class=\"has-text-weight-bold\">\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngIf=\"inputs.length\" [attr.colspan]=\"inputs.length\" [class.has-border-right]=\"products.length\">\n Inputs\n </th>\n <th *ngIf=\"products.length\" [attr.colspan]=\"products.length\">Products</th>\n </tr>\n <tr class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th\n *ngFor=\"let input of inputs; let pl = last\"\n [attr.title]=\"input.value.term.name\"\n [class.has-border-right]=\"products.length && pl\">\n <he-node-link [node]=\"input.value.term\">\n <span [innerHtml]=\"input.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n <th *ngFor=\"let product of products; let pl = last\" [attr.title]=\"product.value.term.name\">\n <he-node-link [node]=\"product.value.term\">\n <span [innerHtml]=\"product.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th\n *ngFor=\"let input of inputs; let pl = last\"\n [attr.title]=\"input.value.term.units\"\n [class.has-border-right]=\"products.length && pl\">\n <span [innerHtml]=\"input.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"input.value.term\"></he-terms-units-description>\n </th>\n <th *ngFor=\"let product of products; let pl = last\" [attr.title]=\"product.value.term.units\">\n <span [innerHtml]=\"product.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"product.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycle\"></he-cycles-functional-unit-measure>\n </td>\n <td\n class=\"is-nowrap\"\n *ngFor=\"let input of inputs; let pl = last\"\n [class.has-border-right]=\"products.length && pl\">\n <span\n *ngIf=\"input.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"togglePopover(p, { data: input.value.values[cycle['@id']], cycle: cycle, key: 'inputs' })\">\n <span pointer>\n {{\n propertyValue(input.value.values[cycle['@id']].value, input.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"input.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let product of products; let pl = last\">\n <span\n *ngIf=\"product.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: product.value.values[cycle['@id']], cycle: cycle, key: 'products' })\n \">\n <span pointer>\n {{\n propertyValue(product.value.values[cycle['@id']].value, product.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"product.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-result *ngIf=\"selectedView === View.chart\" [cycles]=\"cycles\"></he-cycles-result>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-activity-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [original]=\"originalValues[selectedIndex]\"\n [recalculated]=\"cycles[selectedIndex]\"></he-cycles-activity-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"inputs-products.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span [class.is-hidden]=\"!isOriginal\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"] }]
|
|
6914
|
+
args: [{ selector: 'he-cycles-activity', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && (inputs.length || products.length)\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter inputs & products by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.chart\"\n (click)=\"selectedView = View.chart\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"inputs.length || products.length; else emptyTable\">\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 class=\"has-text-weight-bold\">\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngIf=\"inputs.length\" [attr.colspan]=\"inputs.length\" [class.has-border-right]=\"products.length\">\n Inputs\n </th>\n <th *ngIf=\"products.length\" [attr.colspan]=\"products.length\">Products</th>\n </tr>\n <tr class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th\n *ngFor=\"let input of inputs; let pl = last\"\n [attr.title]=\"input.value.term.name\"\n [class.has-border-right]=\"products.length && pl\">\n <he-node-link [node]=\"input.value.term\">\n <span [innerHtml]=\"input.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n <th *ngFor=\"let product of products; let pl = last\" [attr.title]=\"product.value.term.name\">\n <he-node-link [node]=\"product.value.term\">\n <span [innerHtml]=\"product.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th\n *ngFor=\"let input of inputs; let pl = last\"\n [attr.title]=\"input.value.term.units\"\n [class.has-border-right]=\"products.length && pl\">\n <span [innerHtml]=\"input.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"input.value.term\"></he-terms-units-description>\n </th>\n <th *ngFor=\"let product of products; let pl = last\" [attr.title]=\"product.value.term.units\">\n <span [innerHtml]=\"product.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"product.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycle\"></he-cycles-functional-unit-measure>\n </td>\n <td\n class=\"is-nowrap\"\n *ngFor=\"let input of inputs; let pl = last\"\n [class.has-border-right]=\"products.length && pl\">\n <span\n *ngIf=\"input.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"togglePopover(p, { data: input.value.values[cycle['@id']], cycle: cycle, key: 'inputs' })\">\n <span pointer>\n {{\n propertyValue(input.value.values[cycle['@id']].value, input.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"input.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let product of products; let pl = last\">\n <span\n *ngIf=\"product.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: product.value.values[cycle['@id']], cycle: cycle, key: 'products' })\n \">\n <span pointer>\n {{\n propertyValue(product.value.values[cycle['@id']].value, product.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"product.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-result *ngIf=\"selectedView === View.chart\" [cycles]=\"cycles\"></he-cycles-result>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-activity-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [original]=\"originalValues[selectedIndex]\"\n [recalculated]=\"cycles[selectedIndex]\"></he-cycles-activity-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"inputs-products.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"] }]
|
|
6883
6915
|
}], propDecorators: { originalValues: [{
|
|
6884
6916
|
type: Input
|
|
6885
6917
|
}], cycles: [{
|
|
@@ -6928,12 +6960,16 @@ class CyclesAnimalsComponent {
|
|
|
6928
6960
|
this.filterTerm = term;
|
|
6929
6961
|
return this.update();
|
|
6930
6962
|
}
|
|
6963
|
+
// Recalculation logs
|
|
6964
|
+
showSwitchToRecalculated() {
|
|
6965
|
+
return this.isOriginal && this.cycles.some(cycle => !cycle.aggregated);
|
|
6966
|
+
}
|
|
6931
6967
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CyclesAnimalsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6932
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: CyclesAnimalsComponent, selector: "he-cycles-animals", inputs: { originalValues: "originalValues", cycles: "cycles", dataState: "dataState" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"animals.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter animals by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\">\n <ng-container *ngIf=\"animals.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let animal of animals\" [attr.title]=\"animal.value.term.name\">\n <he-node-link [node]=\"animal.value.term\">\n <span [innerHtml]=\"animal.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let animal of animals\" [attr.title]=\"animal.value.term.units\">\n <span [innerHtml]=\"animal.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"animal.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let animal of animals\">\n <span\n *ngIf=\"animal.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"togglePopover(p, { data: animal.value.values[cycle['@id']], cycle: cycle, key: 'animals' })\">\n <span pointer>\n {{\n propertyValue(animal.value.values[cycle['@id']].value, animal.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"animal.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"animals.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span
|
|
6968
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: CyclesAnimalsComponent, selector: "he-cycles-animals", inputs: { originalValues: "originalValues", cycles: "cycles", dataState: "dataState" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"animals.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter animals by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\">\n <ng-container *ngIf=\"animals.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let animal of animals\" [attr.title]=\"animal.value.term.name\">\n <he-node-link [node]=\"animal.value.term\">\n <span [innerHtml]=\"animal.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let animal of animals\" [attr.title]=\"animal.value.term.units\">\n <span [innerHtml]=\"animal.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"animal.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let animal of animals\">\n <span\n *ngIf=\"animal.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"togglePopover(p, { data: animal.value.values[cycle['@id']], cycle: cycle, key: 'animals' })\">\n <span pointer>\n {{\n propertyValue(animal.value.values[cycle['@id']].value, animal.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"animal.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"animals.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
6933
6969
|
}
|
|
6934
6970
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CyclesAnimalsComponent, decorators: [{
|
|
6935
6971
|
type: Component$1,
|
|
6936
|
-
args: [{ selector: 'he-cycles-animals', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"animals.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter animals by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\">\n <ng-container *ngIf=\"animals.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let animal of animals\" [attr.title]=\"animal.value.term.name\">\n <he-node-link [node]=\"animal.value.term\">\n <span [innerHtml]=\"animal.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let animal of animals\" [attr.title]=\"animal.value.term.units\">\n <span [innerHtml]=\"animal.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"animal.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let animal of animals\">\n <span\n *ngIf=\"animal.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"togglePopover(p, { data: animal.value.values[cycle['@id']], cycle: cycle, key: 'animals' })\">\n <span pointer>\n {{\n propertyValue(animal.value.values[cycle['@id']].value, animal.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"animal.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"animals.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span
|
|
6972
|
+
args: [{ selector: 'he-cycles-animals', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"animals.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter animals by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\">\n <ng-container *ngIf=\"animals.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let animal of animals\" [attr.title]=\"animal.value.term.name\">\n <he-node-link [node]=\"animal.value.term\">\n <span [innerHtml]=\"animal.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let animal of animals\" [attr.title]=\"animal.value.term.units\">\n <span [innerHtml]=\"animal.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"animal.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let animal of animals\">\n <span\n *ngIf=\"animal.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"togglePopover(p, { data: animal.value.values[cycle['@id']], cycle: cycle, key: 'animals' })\">\n <span pointer>\n {{\n propertyValue(animal.value.values[cycle['@id']].value, animal.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"animal.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"animals.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"] }]
|
|
6937
6973
|
}], propDecorators: { originalValues: [{
|
|
6938
6974
|
type: Input
|
|
6939
6975
|
}], cycles: [{
|
|
@@ -7255,6 +7291,9 @@ class CyclesEmissionsComponent {
|
|
|
7255
7291
|
return this.update();
|
|
7256
7292
|
}
|
|
7257
7293
|
// Recalculation logs
|
|
7294
|
+
showSwitchToRecalculated() {
|
|
7295
|
+
return this.isOriginal && this.cycles.some(cycle => !cycle.aggregated);
|
|
7296
|
+
}
|
|
7258
7297
|
updateSelectedIndex(index) {
|
|
7259
7298
|
this.selectedIndex = -1;
|
|
7260
7299
|
// force a refresh of the logs
|
|
@@ -7264,11 +7303,11 @@ class CyclesEmissionsComponent {
|
|
|
7264
7303
|
return this.updateSelectedIndex(+value);
|
|
7265
7304
|
}
|
|
7266
7305
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CyclesEmissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7267
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: CyclesEmissionsComponent, selector: "he-cycles-emissions", inputs: { originalValues: "originalValues", cycles: "cycles", dataState: "dataState" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && hasEmissions\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter emissions by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"cycles.length > 1 || !isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"cycles.length > 1\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.chart\"\n (click)=\"selectedView = View.chart\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"hasEmissions; else emptyTable\">\n <he-data-table class=\"mb-1\" [small]=\"true\" maxHeight=\"320\">\n <table class=\"table is-fullwidth is-narrow is-striped\">\n <thead>\n <tr class=\"has-text-weight-bold\">\n <th class=\"width-auto\"></th>\n <th [class.is-hidden]=\"isTransformation\"></th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th [class.has-border-right]=\"!lastGroup\" [attr.colspan]=\"item.value.emissions.length\">\n {{ item.key | keyToLabel }}\n </th>\n </ng-container>\n </tr>\n <tr class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\"></th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\"\n [attr.title]=\"emission.value.term.name\">\n <he-node-link [node]=\"emission.value.term\">\n <span [innerHtml]=\"emission.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </ng-container>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\"\n [attr.title]=\"emission.value.term.units\">\n <span [innerHtml]=\"emission.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"emission.value.term\"></he-terms-units-description>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <td\n class=\"is-nowrap\"\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\">\n <span\n *ngIf=\"emission.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: emission.value.values[cycle['@id']], cycle: cycle, key: 'emissions' })\n \">\n <span pointer>\n {{\n propertyValue(emission.value.values[cycle['@id']].value, emission.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"emission.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-emissions-chart\n *ngIf=\"selectedView === View.chart && cycles.length > 1\"\n [cycles]=\"cycles\"></he-cycles-emissions-chart>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-emissions-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.emissions\"\n [recalculatedValues]=\"cycles[selectedIndex]?.emissions\"></he-cycles-emissions-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"emissions.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span [class.is-hidden]=\"!isOriginal\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: CyclesEmissionsChartComponent, selector: "he-cycles-emissions-chart", inputs: ["cycles"] }, { kind: "component", type: CyclesEmissionsLogsComponent, selector: "he-cycles-emissions-logs", inputs: ["cycle", "originalValues", "recalculatedValues"] }, { kind: "component", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: KeyToLabelPipe, name: "keyToLabel" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
7306
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: CyclesEmissionsComponent, selector: "he-cycles-emissions", inputs: { originalValues: "originalValues", cycles: "cycles", dataState: "dataState" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && hasEmissions\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter emissions by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"cycles.length > 1 || !isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"cycles.length > 1\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.chart\"\n (click)=\"selectedView = View.chart\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"hasEmissions; else emptyTable\">\n <he-data-table class=\"mb-1\" [small]=\"true\" maxHeight=\"320\">\n <table class=\"table is-fullwidth is-narrow is-striped\">\n <thead>\n <tr class=\"has-text-weight-bold\">\n <th class=\"width-auto\"></th>\n <th [class.is-hidden]=\"isTransformation\"></th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th [class.has-border-right]=\"!lastGroup\" [attr.colspan]=\"item.value.emissions.length\">\n {{ item.key | keyToLabel }}\n </th>\n </ng-container>\n </tr>\n <tr class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\"></th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\"\n [attr.title]=\"emission.value.term.name\">\n <he-node-link [node]=\"emission.value.term\">\n <span [innerHtml]=\"emission.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </ng-container>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\"\n [attr.title]=\"emission.value.term.units\">\n <span [innerHtml]=\"emission.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"emission.value.term\"></he-terms-units-description>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <td\n class=\"is-nowrap\"\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\">\n <span\n *ngIf=\"emission.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: emission.value.values[cycle['@id']], cycle: cycle, key: 'emissions' })\n \">\n <span pointer>\n {{\n propertyValue(emission.value.values[cycle['@id']].value, emission.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"emission.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-emissions-chart\n *ngIf=\"selectedView === View.chart && cycles.length > 1\"\n [cycles]=\"cycles\"></he-cycles-emissions-chart>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-emissions-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.emissions\"\n [recalculatedValues]=\"cycles[selectedIndex]?.emissions\"></he-cycles-emissions-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"emissions.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: CyclesEmissionsChartComponent, selector: "he-cycles-emissions-chart", inputs: ["cycles"] }, { kind: "component", type: CyclesEmissionsLogsComponent, selector: "he-cycles-emissions-logs", inputs: ["cycle", "originalValues", "recalculatedValues"] }, { kind: "component", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: KeyToLabelPipe, name: "keyToLabel" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
7268
7307
|
}
|
|
7269
7308
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CyclesEmissionsComponent, decorators: [{
|
|
7270
7309
|
type: Component$1,
|
|
7271
|
-
args: [{ selector: 'he-cycles-emissions', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && hasEmissions\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter emissions by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"cycles.length > 1 || !isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"cycles.length > 1\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.chart\"\n (click)=\"selectedView = View.chart\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"hasEmissions; else emptyTable\">\n <he-data-table class=\"mb-1\" [small]=\"true\" maxHeight=\"320\">\n <table class=\"table is-fullwidth is-narrow is-striped\">\n <thead>\n <tr class=\"has-text-weight-bold\">\n <th class=\"width-auto\"></th>\n <th [class.is-hidden]=\"isTransformation\"></th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th [class.has-border-right]=\"!lastGroup\" [attr.colspan]=\"item.value.emissions.length\">\n {{ item.key | keyToLabel }}\n </th>\n </ng-container>\n </tr>\n <tr class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\"></th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\"\n [attr.title]=\"emission.value.term.name\">\n <he-node-link [node]=\"emission.value.term\">\n <span [innerHtml]=\"emission.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </ng-container>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\"\n [attr.title]=\"emission.value.term.units\">\n <span [innerHtml]=\"emission.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"emission.value.term\"></he-terms-units-description>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <td\n class=\"is-nowrap\"\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\">\n <span\n *ngIf=\"emission.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: emission.value.values[cycle['@id']], cycle: cycle, key: 'emissions' })\n \">\n <span pointer>\n {{\n propertyValue(emission.value.values[cycle['@id']].value, emission.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"emission.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-emissions-chart\n *ngIf=\"selectedView === View.chart && cycles.length > 1\"\n [cycles]=\"cycles\"></he-cycles-emissions-chart>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-emissions-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.emissions\"\n [recalculatedValues]=\"cycles[selectedIndex]?.emissions\"></he-cycles-emissions-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"emissions.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span
|
|
7310
|
+
args: [{ selector: 'he-cycles-emissions', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && hasEmissions\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter emissions by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"cycles.length > 1 || !isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"cycles.length > 1\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.chart\"\n (click)=\"selectedView = View.chart\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"hasEmissions; else emptyTable\">\n <he-data-table class=\"mb-1\" [small]=\"true\" maxHeight=\"320\">\n <table class=\"table is-fullwidth is-narrow is-striped\">\n <thead>\n <tr class=\"has-text-weight-bold\">\n <th class=\"width-auto\"></th>\n <th [class.is-hidden]=\"isTransformation\"></th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th [class.has-border-right]=\"!lastGroup\" [attr.colspan]=\"item.value.emissions.length\">\n {{ item.key | keyToLabel }}\n </th>\n </ng-container>\n </tr>\n <tr class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\"></th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\"\n [attr.title]=\"emission.value.term.name\">\n <he-node-link [node]=\"emission.value.term\">\n <span [innerHtml]=\"emission.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </ng-container>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <th\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\"\n [attr.title]=\"emission.value.term.units\">\n <span [innerHtml]=\"emission.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"emission.value.term\"></he-terms-units-description>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <ng-container *ngFor=\"let item of emissions; let lastGroup = last\">\n <td\n class=\"is-nowrap\"\n *ngFor=\"let emission of item.value.emissions; let lastEmission = last\"\n [class.has-border-right]=\"lastEmission && !lastGroup\">\n <span\n *ngIf=\"emission.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: emission.value.values[cycle['@id']], cycle: cycle, key: 'emissions' })\n \">\n <span pointer>\n {{\n propertyValue(emission.value.values[cycle['@id']].value, emission.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"emission.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-emissions-chart\n *ngIf=\"selectedView === View.chart && cycles.length > 1\"\n [cycles]=\"cycles\"></he-cycles-emissions-chart>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-emissions-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.emissions\"\n [recalculatedValues]=\"cycles[selectedIndex]?.emissions\"></he-cycles-emissions-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"emissions.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"] }]
|
|
7272
7311
|
}], propDecorators: { originalValues: [{
|
|
7273
7312
|
type: Input
|
|
7274
7313
|
}], cycles: [{
|
|
@@ -7426,6 +7465,9 @@ class CyclesPracticesComponent {
|
|
|
7426
7465
|
return this.update();
|
|
7427
7466
|
}
|
|
7428
7467
|
// Recalculation logs
|
|
7468
|
+
showSwitchToRecalculated() {
|
|
7469
|
+
return this.isOriginal && this.cycles.some(cycle => !cycle.aggregated);
|
|
7470
|
+
}
|
|
7429
7471
|
updateSelectedIndex(index) {
|
|
7430
7472
|
this.selectedIndex = -1;
|
|
7431
7473
|
// force a refresh of the logs
|
|
@@ -7435,11 +7477,11 @@ class CyclesPracticesComponent {
|
|
|
7435
7477
|
return this.updateSelectedIndex(+value);
|
|
7436
7478
|
}
|
|
7437
7479
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CyclesPracticesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7438
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: CyclesPracticesComponent, selector: "he-cycles-practices", inputs: { originalValues: "originalValues", cycles: "cycles", dataState: "dataState" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && practices.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter practices by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"showTimeline || !isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"showTimeline\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.timeline\"\n (click)=\"selectedView = View.timeline\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list-alt\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Operations timeline</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"practices.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let practice of practices\" [attr.title]=\"practice.value.term.name\">\n <he-node-link [node]=\"practice.value.term\">\n <span [innerHtml]=\"practice.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\" [attr.title]=\"practice.value.term.units\">\n <span [innerHtml]=\"practice.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"practice.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let practice of practices\">\n <span\n *ngIf=\"practice.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: practice.value.values[cycle['@id']], cycle: cycle, key: 'practices' })\n \">\n <span pointer>\n {{\n propertyValue(practice.value.values[cycle['@id']].value, practice.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"practice.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<div class=\"px-3 pb-3\" *ngIf=\"selectedView === View.timeline\">\n <he-cycles-practices-timeline\n [dataState]=\"dataState\"\n [cycle]=\"cycles[0]\"\n [filterTermTypes]=\"timelineTermType\"></he-cycles-practices-timeline>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-practices-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.practices\"\n [recalculatedValues]=\"cycles[selectedIndex]?.practices\"></he-cycles-practices-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"practices.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span [class.is-hidden]=\"!isOriginal\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { kind: "component", type: CyclesPracticesLogsComponent, selector: "he-cycles-practices-logs", inputs: ["cycle", "originalValues", "recalculatedValues"] }, { kind: "component", type: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: ["filterTermTypes", "dataState", "cycle"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
7480
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: CyclesPracticesComponent, selector: "he-cycles-practices", inputs: { originalValues: "originalValues", cycles: "cycles", dataState: "dataState" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && practices.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter practices by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"showTimeline || !isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"showTimeline\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.timeline\"\n (click)=\"selectedView = View.timeline\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list-alt\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Operations timeline</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"practices.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let practice of practices\" [attr.title]=\"practice.value.term.name\">\n <he-node-link [node]=\"practice.value.term\">\n <span [innerHtml]=\"practice.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\" [attr.title]=\"practice.value.term.units\">\n <span [innerHtml]=\"practice.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"practice.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let practice of practices\">\n <span\n *ngIf=\"practice.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: practice.value.values[cycle['@id']], cycle: cycle, key: 'practices' })\n \">\n <span pointer>\n {{\n propertyValue(practice.value.values[cycle['@id']].value, practice.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"practice.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<div class=\"px-3 pb-3\" *ngIf=\"selectedView === View.timeline\">\n <he-cycles-practices-timeline\n [dataState]=\"dataState\"\n [cycle]=\"cycles[0]\"\n [filterTermTypes]=\"timelineTermType\"></he-cycles-practices-timeline>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-practices-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.practices\"\n [recalculatedValues]=\"cycles[selectedIndex]?.practices\"></he-cycles-practices-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"practices.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { kind: "component", type: CyclesPracticesLogsComponent, selector: "he-cycles-practices-logs", inputs: ["cycle", "originalValues", "recalculatedValues"] }, { kind: "component", type: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: ["filterTermTypes", "dataState", "cycle"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
7439
7481
|
}
|
|
7440
7482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: CyclesPracticesComponent, decorators: [{
|
|
7441
7483
|
type: Component$1,
|
|
7442
|
-
args: [{ selector: 'he-cycles-practices', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && practices.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter practices by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"showTimeline || !isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"showTimeline\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.timeline\"\n (click)=\"selectedView = View.timeline\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list-alt\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Operations timeline</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"practices.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let practice of practices\" [attr.title]=\"practice.value.term.name\">\n <he-node-link [node]=\"practice.value.term\">\n <span [innerHtml]=\"practice.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\" [attr.title]=\"practice.value.term.units\">\n <span [innerHtml]=\"practice.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"practice.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let practice of practices\">\n <span\n *ngIf=\"practice.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: practice.value.values[cycle['@id']], cycle: cycle, key: 'practices' })\n \">\n <span pointer>\n {{\n propertyValue(practice.value.values[cycle['@id']].value, practice.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"practice.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<div class=\"px-3 pb-3\" *ngIf=\"selectedView === View.timeline\">\n <he-cycles-practices-timeline\n [dataState]=\"dataState\"\n [cycle]=\"cycles[0]\"\n [filterTermTypes]=\"timelineTermType\"></he-cycles-practices-timeline>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-practices-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.practices\"\n [recalculatedValues]=\"cycles[selectedIndex]?.practices\"></he-cycles-practices-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"practices.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span
|
|
7484
|
+
args: [{ selector: 'he-cycles-practices', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && practices.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter practices by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"showTimeline || !isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"showTimeline\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.timeline\"\n (click)=\"selectedView = View.timeline\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list-alt\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Operations timeline</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"practices.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let practice of practices\" [attr.title]=\"practice.value.term.name\">\n <he-node-link [node]=\"practice.value.term\">\n <span [innerHtml]=\"practice.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\" [attr.title]=\"practice.value.term.units\">\n <span [innerHtml]=\"practice.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"practice.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span>{{ i + 1 }}. {{ defaultLabel(cycle) }}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let practice of practices\">\n <span\n *ngIf=\"practice.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: practice.value.values[cycle['@id']], cycle: cycle, key: 'practices' })\n \">\n <span pointer>\n {{\n propertyValue(practice.value.values[cycle['@id']].value, practice.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"practice.value.values[cycle['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<div class=\"px-3 pb-3\" *ngIf=\"selectedView === View.timeline\">\n <he-cycles-practices-timeline\n [dataState]=\"dataState\"\n [cycle]=\"cycles[0]\"\n [filterTermTypes]=\"timelineTermType\"></he-cycles-practices-timeline>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">\n {{ i + 1 }}. {{ defaultLabel(value) }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-practices-logs\n *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.practices\"\n [recalculatedValues]=\"cycles[selectedIndex]?.practices\"></he-cycles-practices-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"cycles\"\n filename=\"practices.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"headerKeys\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ defaultLabel(node) }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"] }]
|
|
7443
7485
|
}], propDecorators: { originalValues: [{
|
|
7444
7486
|
type: Input
|
|
7445
7487
|
}], cycles: [{
|
|
@@ -7823,7 +7865,9 @@ const customErrorMessage = {
|
|
|
7823
7865
|
? `If the term units is already in ${code('% area')}, just use ${code('value')}. Dont use ${code('areaPercent')}.`
|
|
7824
7866
|
: schema?.required?.includes('transformation')
|
|
7825
7867
|
? 'A transformation can not be added here.'
|
|
7826
|
-
: '
|
|
7868
|
+
: schema?.required?.includes('fromCycle')
|
|
7869
|
+
? `This field can only be added to the ${schemaLink('Transformation#inputs', 'inputs of a Transformation')}.`
|
|
7870
|
+
: 'Should not be used in this case.',
|
|
7827
7871
|
'should match pattern "^\\d{13}$"': () => `should be composed of 13 numbers`,
|
|
7828
7872
|
'should match pattern "^[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?$"': () => dateFormatMessage,
|
|
7829
7873
|
'should match pattern "^([0-9]{4}|-)(-[0-9]{2})?(-[0-9]{2})?$"': () => dateFormatMessage,
|
|
@@ -7972,9 +8016,9 @@ const customErrorMessage = {
|
|
|
7972
8016
|
If you are able to use a more specific region or smaller boundary, please do.`,
|
|
7973
8017
|
'an excreta input is required when using an excretaManagement practice': ({ dataPath }) => {
|
|
7974
8018
|
const paths = parseDataPath(dataPath);
|
|
7975
|
-
return `Excreta management is the conversion of excreta to another type of excreta.
|
|
7976
|
-
You have added an excretaManagement Practice to this ${paths[0].label} but there is no excreta Input.
|
|
7977
|
-
To represent excreta management, use a ${paths[0].label} with excreta as an Input and excretaManagement as a Practice.`;
|
|
8019
|
+
return `Excreta management is the conversion of excreta to any type of product (e.g., another type of excreta or organic fertiliser).
|
|
8020
|
+
You have added an ${code('excretaManagement')} Practice to this ${paths[0].label} but there is no excreta Input.
|
|
8021
|
+
To represent excreta management, use a ${paths[0].label} with excreta as an Input and ${code('excretaManagement')} as a Practice.`;
|
|
7978
8022
|
},
|
|
7979
8023
|
'only 1 primary product allowed': () => 'There can only be one primary product in each Cycle.',
|
|
7980
8024
|
'is not allowed in combination with noTillage': () => `This operation involves tillage, yet you have specified the Practice ${termLink(noTillage)}.
|
|
@@ -8057,9 +8101,11 @@ const customErrorMessage = {
|
|
|
8057
8101
|
Please see the ${schemaLink('Emission#methodTier', 'schema')} for the options available and definitions of the options.`,
|
|
8058
8102
|
'should not use not relevant methodTier': () => `All emissions should generally have a method tier, which states how the data were modelled or how the data were collected.
|
|
8059
8103
|
Please see the ${schemaLink('Emission#methodTier', 'schema')} for the options available and definitions of the options.`,
|
|
8060
|
-
'
|
|
8104
|
+
'ingredients should be complete': ({ params }) => `Data completeness for ${code('ingredient')} must be true for site of type ${params.siteType}`,
|
|
8105
|
+
'must have inputs to represent ingredients': () => `Data completeness for ${code('ingredient')} cannot be true if there are no Inputs.`,
|
|
8106
|
+
'must have inputs representing the forage when set to true': ({ params }) => `This Cycle includes animals ${params?.siteType ? `on ${params.siteType}` : ''} and completeness is set to ${code(true)} for ${code('grazedForage')}.
|
|
8061
8107
|
However, there are no Inputs representing the forage intake by animals in the Cycle (Inputs with terms which contain the words "fresh forage" and a ${code('value')}).
|
|
8062
|
-
Either, set completeness to ${code(false)} for ${code('
|
|
8108
|
+
Either, set completeness to ${code(false)} for ${code('grazedForage')}, make sure all "fresh forage" Inputs have a ${code('value')}, or add one or more Inputs representing the forage intake.`,
|
|
8063
8109
|
'must specify is it an animal feed': () => `This Cycle is an animal production Cycle and this Input could be an animal feed or could be for another use.
|
|
8064
8110
|
Please specify the ${schemaLink('Input#isAnimalFeed', 'isAnimalFeed')} field on this Input.
|
|
8065
8111
|
Knowing the fate is essential to distinguish Inputs between those which are fed to animals and those which are used for other purposes.`,
|
|
@@ -8107,7 +8153,7 @@ const customErrorMessage = {
|
|
|
8107
8153
|
'should specify the herd composition': () => `We recommend adding information on the herd composition using the Animal node.
|
|
8108
8154
|
Without this, we cannot re-model many animal related Inputs, Products, and Emissions.`
|
|
8109
8155
|
};
|
|
8110
|
-
const parseDefaultMessage = (message) => `<span class="is-capitalized-first-letter">${message
|
|
8156
|
+
const parseDefaultMessage = (message) => `<span class="is-capitalized-first-letter">${message?.startsWith('should have required property')
|
|
8111
8157
|
? message.replace("'", '<code>').replace("'", '</code>')
|
|
8112
8158
|
: message}</span>`;
|
|
8113
8159
|
const formatCustomErrorMessage = (message, error, allErrors = []) => {
|
|
@@ -9020,6 +9066,9 @@ class SitesMeasurementsComponent {
|
|
|
9020
9066
|
return this.update();
|
|
9021
9067
|
}
|
|
9022
9068
|
// Recalculation logs
|
|
9069
|
+
showSwitchToRecalculated() {
|
|
9070
|
+
return this.isOriginal && this.sites.some(site => !site.aggregated);
|
|
9071
|
+
}
|
|
9023
9072
|
updateSelectedIndex(index) {
|
|
9024
9073
|
this.selectedIndex = -1;
|
|
9025
9074
|
// force a refresh of the logs
|
|
@@ -9029,11 +9078,11 @@ class SitesMeasurementsComponent {
|
|
|
9029
9078
|
return this.updateSelectedIndex(+value);
|
|
9030
9079
|
}
|
|
9031
9080
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: SitesMeasurementsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9032
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: SitesMeasurementsComponent, selector: "he-sites-measurements", inputs: { originalValues: "originalValues", sites: "sites", dataState: "dataState" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && measurements.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter measurements by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"!isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"measurements.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th *ngFor=\"let measurement of measurements\" [attr.title]=\"measurement.value.term.name\">\n <he-node-link [node]=\"measurement.value.term\">\n <span [innerHtml]=\"measurement.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th *ngFor=\"let measurement of measurements\" [attr.title]=\"measurement.value.term.units\">\n <span [innerHtml]=\"measurement.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"measurement.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let site of sites; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(site)\">\n <he-node-link [node]=\"site\">\n <span>{{ i + 1 }}. {{ defaultLabel(site) }}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let measurement of measurements\">\n <span\n *ngIf=\"measurement.value.values[site['@id']]\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: measurement.value.values[site['@id']], site: site, key: 'measurements' })\n \">\n <span pointer>\n {{\n measurementValue(measurement.value.values[site['@id']], measurement.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"measurement.value.values[site['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n <span *ngIf=\"!measurement.value.values[site['@id']]\">\n <span>-</span>\n <sup class=\"pl-1\" *ngIf=\"siteTooBig(site)\">(1)</sup>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n\n <p class=\"is-size-7 is-italic\" *ngIf=\"showAreaTooBig\">\n (1) This region is >{{ maxAreaSize }}km2 and is too large to reliably gap fill Measurements.\n </p>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"sites.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Site</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of sites; let i = index\" [value]=\"i\">{{ i + 1 }}. {{ defaultLabel(value) }}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-sites-measurements-logs\n *ngIf=\"selectedIndex >= 0\"\n [site]=\"sites[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.measurements\"\n [recalculatedValues]=\"sites[selectedIndex]?.measurements\"></he-sites-measurements-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"sites\"\n filename=\"site-measurements.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"['site.id', 'site.@id', 'site.measurements.']\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span [class.is-hidden]=\"!isOriginal\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"site\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ node.name }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: ["site", "originalValues", "recalculatedValues"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
9081
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", type: SitesMeasurementsComponent, selector: "he-sites-measurements", inputs: { originalValues: "originalValues", sites: "sites", dataState: "dataState" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && measurements.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter measurements by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"!isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"measurements.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th *ngFor=\"let measurement of measurements\" [attr.title]=\"measurement.value.term.name\">\n <he-node-link [node]=\"measurement.value.term\">\n <span [innerHtml]=\"measurement.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th *ngFor=\"let measurement of measurements\" [attr.title]=\"measurement.value.term.units\">\n <span [innerHtml]=\"measurement.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"measurement.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let site of sites; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(site)\">\n <he-node-link [node]=\"site\">\n <span>{{ i + 1 }}. {{ defaultLabel(site) }}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let measurement of measurements\">\n <span\n *ngIf=\"measurement.value.values[site['@id']]\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: measurement.value.values[site['@id']], site: site, key: 'measurements' })\n \">\n <span pointer>\n {{\n measurementValue(measurement.value.values[site['@id']], measurement.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"measurement.value.values[site['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n <span *ngIf=\"!measurement.value.values[site['@id']]\">\n <span>-</span>\n <sup class=\"pl-1\" *ngIf=\"siteTooBig(site)\">(1)</sup>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n\n <p class=\"is-size-7 is-italic\" *ngIf=\"showAreaTooBig\">\n (1) This region is >{{ maxAreaSize }}km2 and is too large to reliably gap fill Measurements.\n </p>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"sites.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Site</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of sites; let i = index\" [value]=\"i\">{{ i + 1 }}. {{ defaultLabel(value) }}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-sites-measurements-logs\n *ngIf=\"selectedIndex >= 0\"\n [site]=\"sites[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.measurements\"\n [recalculatedValues]=\"sites[selectedIndex]?.measurements\"></he-sites-measurements-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"sites\"\n filename=\"site-measurements.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"['site.id', 'site.@id', 'site.measurements.']\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"site\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ node.name }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i3$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state", "linkClass"] }, { kind: "component", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { kind: "component", type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "small"] }, { kind: "component", type: SearchExtendComponent, selector: "he-search-extend", inputs: ["value", "disabled", "placeholder", "class"], outputs: ["search"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink", "linkClass"] }, { kind: "component", type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { kind: "component", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey", "dataState"] }, { kind: "component", type: TermsUnitsDescriptionComponent, selector: "he-terms-units-description", inputs: ["term", "iconTemplate"] }, { kind: "component", type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: ["site", "originalValues", "recalculatedValues"] }, { kind: "pipe", type: CompoundPipe, name: "compound" }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: EllipsisPipe, name: "ellipsis" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }] }); }
|
|
9033
9082
|
}
|
|
9034
9083
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: SitesMeasurementsComponent, decorators: [{
|
|
9035
9084
|
type: Component$1,
|
|
9036
|
-
args: [{ selector: 'he-sites-measurements', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && measurements.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter measurements by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"!isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"measurements.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th *ngFor=\"let measurement of measurements\" [attr.title]=\"measurement.value.term.name\">\n <he-node-link [node]=\"measurement.value.term\">\n <span [innerHtml]=\"measurement.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th *ngFor=\"let measurement of measurements\" [attr.title]=\"measurement.value.term.units\">\n <span [innerHtml]=\"measurement.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"measurement.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let site of sites; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(site)\">\n <he-node-link [node]=\"site\">\n <span>{{ i + 1 }}. {{ defaultLabel(site) }}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let measurement of measurements\">\n <span\n *ngIf=\"measurement.value.values[site['@id']]\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: measurement.value.values[site['@id']], site: site, key: 'measurements' })\n \">\n <span pointer>\n {{\n measurementValue(measurement.value.values[site['@id']], measurement.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"measurement.value.values[site['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n <span *ngIf=\"!measurement.value.values[site['@id']]\">\n <span>-</span>\n <sup class=\"pl-1\" *ngIf=\"siteTooBig(site)\">(1)</sup>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n\n <p class=\"is-size-7 is-italic\" *ngIf=\"showAreaTooBig\">\n (1) This region is >{{ maxAreaSize }}km2 and is too large to reliably gap fill Measurements.\n </p>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"sites.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Site</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of sites; let i = index\" [value]=\"i\">{{ i + 1 }}. {{ defaultLabel(value) }}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-sites-measurements-logs\n *ngIf=\"selectedIndex >= 0\"\n [site]=\"sites[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.measurements\"\n [recalculatedValues]=\"sites[selectedIndex]?.measurements\"></he-sites-measurements-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"sites\"\n filename=\"site-measurements.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"['site.id', 'site.@id', 'site.measurements.']\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span
|
|
9085
|
+
args: [{ selector: 'he-sites-measurements', template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column\">\n <ng-container *ngIf=\"selectedView === View.table && measurements.length\">\n <button\n class=\"button is-small is-ghost\"\n (click)=\"showDownload = true\"\n ngbTooltip=\"Download as CSV\"\n placement=\"bottom\">\n <fa-icon icon=\"download\" size=\"lg\"></fa-icon>\n </button>\n </ng-container>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"selectedView === View.table\">\n <he-search-extend\n class=\"is-secondary is-small\"\n placeholder=\"Filter measurements by name\"\n (search)=\"filter($event)\"></he-search-extend>\n </div>\n <div class=\"column is-narrow\" *ngIf=\"!isOriginal\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.table\"\n (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Table view</span>\n </button>\n </div>\n <div class=\"control\">\n <button\n class=\"button is-small\"\n [class.is-selected]=\"selectedView === View.logs\"\n (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"is-hidden-mobile\">Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <ng-container *ngIf=\"measurements.length; else emptyTable\">\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 class=\"has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th *ngFor=\"let measurement of measurements\" [attr.title]=\"measurement.value.term.name\">\n <he-node-link [node]=\"measurement.value.term\">\n <span [innerHtml]=\"measurement.value.term.name | ellipsis: 30 | compound\"></span>\n </he-node-link>\n </th>\n </tr>\n <tr class=\"is-italic has-text-weight-semibold\">\n <th class=\"width-auto has-border-right\"></th>\n <th *ngFor=\"let measurement of measurements\" [attr.title]=\"measurement.value.term.units\">\n <span [innerHtml]=\"measurement.value.term.units | compound\"></span>\n <he-terms-units-description\n class=\"is-inline-block is-ml-2\"\n [term]=\"measurement.value.term\"></he-terms-units-description>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let site of sites; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto has-border-right\" [attr.title]=\"defaultLabel(site)\">\n <he-node-link [node]=\"site\">\n <span>{{ i + 1 }}. {{ defaultLabel(site) }}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let measurement of measurements\">\n <span\n *ngIf=\"measurement.value.values[site['@id']]\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\"\n [autoClose]=\"'outside'\"\n popoverClass=\"is-narrow\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n placement=\"left\"\n container=\"body\"\n (click)=\"\n togglePopover(p, { data: measurement.value.values[site['@id']], site: site, key: 'measurements' })\n \">\n <span pointer>\n {{\n measurementValue(measurement.value.values[site['@id']], measurement.value.term['@id'])\n | precision: 3\n | default: '-'\n }}\n </span>\n <he-blank-node-state\n class=\"ml-1\"\n [dataState]=\"dataState\"\n [node]=\"measurement.value.values[site['@id']].node\"\n key=\"value\"></he-blank-node-state>\n </span>\n <span *ngIf=\"!measurement.value.values[site['@id']]\">\n <span>-</span>\n <sup class=\"pl-1\" *ngIf=\"siteTooBig(site)\">(1)</sup>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n\n <p class=\"is-size-7 is-italic\" *ngIf=\"showAreaTooBig\">\n (1) This region is >{{ maxAreaSize }}km2 and is too large to reliably gap fill Measurements.\n </p>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"sites.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static is-secondary\">Select a Site</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth is-secondary\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of sites; let i = index\" [value]=\"i\">{{ i + 1 }}. {{ defaultLabel(value) }}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-sites-measurements-logs\n *ngIf=\"selectedIndex >= 0\"\n [site]=\"sites[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.measurements\"\n [recalculatedValues]=\"sites[selectedIndex]?.measurements\"></he-sites-measurements-logs>\n</ng-container>\n\n<he-node-csv-export-confirm\n *ngIf=\"showDownload\"\n [nodes]=\"sites\"\n filename=\"site-measurements.csv\"\n [isUpload]=\"false\"\n [headerKeys]=\"['site.id', 'site.@id', 'site.measurements.']\"\n (closed)=\"showDownload = false\"></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data available</span>\n <span class=\"is-pl-1\" [class.is-hidden]=\"!filterTerm\">matching your search criteria</span>\n <span>.</span>\n <span *ngIf=\"showSwitchToRecalculated\">\n Switch to\n <code>recalculated</code>\n version.\n </span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"site\" let-data=\"data\" let-key=\"key\">\n <p>\n <b>{{ node.name }}</b>\n </p>\n <he-node-value-details\n [data]=\"data\"\n [dataState]=\"dataState\"\n [nodeType]=\"node['@type']\"\n [dataKey]=\"key\"></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"] }]
|
|
9037
9086
|
}], propDecorators: { originalValues: [{
|
|
9038
9087
|
type: Input
|
|
9039
9088
|
}], sites: [{
|