@hestia-earth/ui-components 0.0.26 → 0.0.27
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/bundles/hestia-earth-ui-components.umd.js +344 -221
- package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
- package/common/blank-node-state/blank-node-state.component.d.ts +1 -10
- package/common/common.module.d.ts +8 -7
- package/common/index.d.ts +1 -0
- package/common/is-array.pipe.d.ts +7 -0
- package/common/node-utils.d.ts +51 -0
- package/common/utils.d.ts +0 -41
- package/cycles/cycles-activity/cycles-activity.component.d.ts +1 -1
- package/cycles/cycles-emissions/cycles-emissions.component.d.ts +1 -1
- package/cycles/cycles-emissions-chart/cycles-emissions-chart.component.d.ts +1 -1
- package/cycles/cycles-practices/cycles-practices.component.d.ts +1 -1
- package/engine/engine.service.d.ts +3 -3
- package/esm2015/common/blank-node-state/blank-node-state.component.js +12 -14
- package/esm2015/common/common.module.js +8 -4
- package/esm2015/common/index.js +2 -1
- package/esm2015/common/is-array.pipe.js +16 -0
- package/esm2015/common/node-utils.js +80 -0
- package/esm2015/common/utils.js +2 -62
- package/esm2015/cycles/cycles-activity/cycles-activity.component.js +4 -3
- package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +4 -3
- package/esm2015/cycles/cycles-emissions-chart/cycles-emissions-chart.component.js +3 -2
- package/esm2015/cycles/cycles-practices/cycles-practices.component.js +4 -3
- package/esm2015/cycles/cycles-result/cycles-result.component.js +3 -2
- package/esm2015/engine/engine.service.js +4 -4
- package/esm2015/impact-assessments/impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component.js +14 -7
- package/esm2015/impact-assessments/impact-assessments-indicators-chart/impact-assessments-indicators-chart.component.js +3 -2
- package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +4 -3
- package/esm2015/node/node-logs-models/node-logs-models.component.js +138 -58
- package/esm2015/node/node-value-details/node-value-details.component.js +3 -2
- package/esm2015/node/node.service.js +1 -1
- package/esm2015/sites/sites-measurements/sites-measurements.component.js +4 -3
- package/esm2015/sites/sites.model.js +1 -1
- package/fesm2015/hestia-earth-ui-components.js +270 -151
- package/fesm2015/hestia-earth-ui-components.js.map +1 -1
- package/impact-assessments/impact-assessments-indicators-chart/impact-assessments-indicators-chart.component.d.ts +1 -1
- package/impact-assessments/impact-assessments-products/impact-assessments-products.component.d.ts +1 -1
- package/node/node-logs-models/node-logs-models.component.d.ts +28 -16
- package/node/node-value-details/node-value-details.component.d.ts +1 -1
- package/node/node.service.d.ts +16 -15
- package/package.json +1 -1
- package/sites/sites-measurements/sites-measurements.component.d.ts +2 -2
- package/sites/sites.model.d.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/router'), require('@ng-bootstrap/ng-bootstrap'), require('@angular/google-maps'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-regular-svg-icons'), require('@fortawesome/free-solid-svg-icons'), require('@angular/platform-browser'), require('rxjs'), require('random-material-color'), require('@hestia-earth/schema'), require('@hestia-earth/api'), require('@hestia-earth/utils
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@hestia-earth/ui-components', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/router', '@ng-bootstrap/ng-bootstrap', '@angular/google-maps', '@fortawesome/angular-fontawesome', '@fortawesome/free-regular-svg-icons', '@fortawesome/free-solid-svg-icons', '@angular/platform-browser', 'rxjs', 'random-material-color', '@hestia-earth/schema', '@hestia-earth/api', '@hestia-earth/utils
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["hestia-earth"] = global["hestia-earth"] || {}, global["hestia-earth"]["ui-components"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.router, global.i10, global.ng.googleMaps, global.i1, global.freeRegularSvgIcons, global.freeSolidSvgIcons, global.ng.platformBrowser, global.rxjs, global.randomMaterialColor, global.schema, global.api, global.
|
|
5
|
-
})(this, (function (exports, i0, i6, i1$2, i5, i10, i1$4, i1, freeRegularSvgIcons, freeSolidSvgIcons, i1$1, rxjs, randomMaterialColor, schema, api,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/router'), require('@ng-bootstrap/ng-bootstrap'), require('@angular/google-maps'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-regular-svg-icons'), require('@fortawesome/free-solid-svg-icons'), require('@angular/platform-browser'), require('rxjs'), require('random-material-color'), require('@hestia-earth/schema'), require('@hestia-earth/api'), require('@hestia-earth/utils'), require('pluralize'), require('rxjs/operators'), require('@hestia-earth/utils/dist/term'), require('csvtojson'), require('@angular/common/http'), require('@hestia-earth/utils/dist/delta'), require('json-2-csv'), require('@angular/cdk/drag-drop'), require('@hestia-earth/schema-convert'), require('@hestia-earth/json-schema/schema-utils'), require('jsondiffpatch'), require('chart.js'), require('moment'), require('moment/locale/en-gb'), require('uuid'), require('@google/markerclustererplus'), require('chartjs-plugin-datalabels')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@hestia-earth/ui-components', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/router', '@ng-bootstrap/ng-bootstrap', '@angular/google-maps', '@fortawesome/angular-fontawesome', '@fortawesome/free-regular-svg-icons', '@fortawesome/free-solid-svg-icons', '@angular/platform-browser', 'rxjs', 'random-material-color', '@hestia-earth/schema', '@hestia-earth/api', '@hestia-earth/utils', 'pluralize', 'rxjs/operators', '@hestia-earth/utils/dist/term', 'csvtojson', '@angular/common/http', '@hestia-earth/utils/dist/delta', 'json-2-csv', '@angular/cdk/drag-drop', '@hestia-earth/schema-convert', '@hestia-earth/json-schema/schema-utils', 'jsondiffpatch', 'chart.js', 'moment', 'moment/locale/en-gb', 'uuid', '@google/markerclustererplus', 'chartjs-plugin-datalabels'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["hestia-earth"] = global["hestia-earth"] || {}, global["hestia-earth"]["ui-components"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.router, global.i10, global.ng.googleMaps, global.i1, global.freeRegularSvgIcons, global.freeSolidSvgIcons, global.ng.platformBrowser, global.rxjs, global.randomMaterialColor, global.schema, global.api, global.utils, global.pluralize, global.rxjs.operators, global.term, global.csvtojson, global.ng.common.http, global.delta, global.json2Csv, global.ng.cdk.dragDrop, global.schemaConvert, global.schemaUtils, global.jsondiffpatch, global.chart_js, global.moment, null, global.uuid$1, global.MarkerClusterer, global.ChartDataLabels));
|
|
5
|
+
})(this, (function (exports, i0, i6, i1$2, i5, i10, i1$4, i1, freeRegularSvgIcons, freeSolidSvgIcons, i1$1, rxjs, randomMaterialColor, schema, api, utils, pluralize, operators, term, csvtojson, i1$3, delta, json2Csv, i6$1, schemaConvert, schemaUtils, jsondiffpatch, chart_js, moment, enGb, uuid$1, MarkerClusterer, ChartDataLabels) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -571,8 +571,8 @@
|
|
|
571
571
|
}]
|
|
572
572
|
}] });
|
|
573
573
|
|
|
574
|
-
var _c$
|
|
575
|
-
var get$
|
|
574
|
+
var _c$3;
|
|
575
|
+
var get$6 = require('lodash.get');
|
|
576
576
|
var gitHome = 'https://gitlab.com/hestia-earth';
|
|
577
577
|
var gitRawBaseUrl = 'https://glcdn.githack.com/hestia-earth';
|
|
578
578
|
var gitBranch = function () { return ['dev', 'staging'].some(function (env) { return baseUrl().includes(env); }) ? 'develop' : 'master'; };
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
};
|
|
588
588
|
var isExternal = function () { return baseUrl() !== window.location.origin; };
|
|
589
589
|
var parseErrorStatus = function (error) { return ((error === null || error === void 0 ? void 0 : error.statusText) || '').toLowerCase().replace(/\s/g, '-'); };
|
|
590
|
-
var parseErrorMessage = function (error) { return get$
|
|
590
|
+
var parseErrorMessage = function (error) { return get$6(error, 'error.error', get$6(error, 'error.message', get$6(error, 'error', get$6(error, 'message', error)))); };
|
|
591
591
|
var handleAPIError = function (error) {
|
|
592
592
|
try {
|
|
593
593
|
error = parseErrorMessage(error);
|
|
@@ -636,67 +636,6 @@
|
|
|
636
636
|
};
|
|
637
637
|
var safeJSONStringify = function (value) { return typeof value === 'string' ? value : JSON.stringify(value); };
|
|
638
638
|
var arrayValue = function (values, isAverage) { return (values || []).reduce(function (prev, curr) { return prev + parseFloat("" + curr); }, 0) / (isAverage ? values.length : 1); };
|
|
639
|
-
;
|
|
640
|
-
;
|
|
641
|
-
var grouppedKeys = function (values) { return Object.entries(values).map(function (_c) {
|
|
642
|
-
var _d = __read(_c, 2), key = _d[0], value = _d[1];
|
|
643
|
-
return ({ key: key, value: value });
|
|
644
|
-
}); };
|
|
645
|
-
var concatBlankNodeValue = function (value, newValue) {
|
|
646
|
-
var valueArray = Array.isArray(value) ? value : [value];
|
|
647
|
-
var newValueArray = Array.isArray(newValue) ? newValue : [newValue];
|
|
648
|
-
return __spreadArray(__spreadArray([], __read(valueArray)), __read(newValueArray));
|
|
649
|
-
};
|
|
650
|
-
var methodTierOrder = function (methodTier) { return [
|
|
651
|
-
schema.EmissionMethodTier.measured,
|
|
652
|
-
schema.EmissionMethodTier['tier 3'],
|
|
653
|
-
schema.EmissionMethodTier['tier 2'],
|
|
654
|
-
schema.EmissionMethodTier['tier 1'],
|
|
655
|
-
schema.EmissionMethodTier.background
|
|
656
|
-
].indexOf(methodTier); };
|
|
657
|
-
var isMethodModelAllowed = function (node, filterMethod) { return !filterMethod || !node['methodModel'] || node['methodModel']['@id'] === filterMethod['@id']; };
|
|
658
|
-
var grouppedValueKeys = [
|
|
659
|
-
'dates', 'sd', 'min', 'max', 'inputs', 'depthUpper', 'depthLower', 'startDate', 'endDate',
|
|
660
|
-
'methodTier', 'methodModel'
|
|
661
|
-
];
|
|
662
|
-
var groupNodesByTerm = function (nodes, key, originalValues, filterMethod) {
|
|
663
|
-
if (nodes === void 0) { nodes = []; }
|
|
664
|
-
if (originalValues === void 0) { originalValues = []; }
|
|
665
|
-
var groups = nodes.reduce(function (prev, node, index) { return (node[key] || []).reduce(function (group, blankNode) {
|
|
666
|
-
if (!isMethodModelAllowed(blankNode, filterMethod)) {
|
|
667
|
-
return group;
|
|
668
|
-
}
|
|
669
|
-
var nodeId = node['@id'];
|
|
670
|
-
var termId = blankNode.term['@id'];
|
|
671
|
-
group[termId] = group[termId] || {
|
|
672
|
-
term: blankNode.term,
|
|
673
|
-
methodTierOrder: methodTierOrder(blankNode.methodTier),
|
|
674
|
-
values: {},
|
|
675
|
-
originalValues: {}
|
|
676
|
-
};
|
|
677
|
-
group[termId].values[nodeId] = group[termId].values[nodeId] || { index: index, nodes: [], value: [] };
|
|
678
|
-
group[termId].values[nodeId].nodes.push(blankNode);
|
|
679
|
-
group[termId].values[nodeId].value = concatBlankNodeValue(group[termId].values[nodeId].value, blankNode.value);
|
|
680
|
-
grouppedValueKeys.forEach(function (arrayKey) {
|
|
681
|
-
var newValue = get$5(blankNode, arrayKey, []);
|
|
682
|
-
group[termId].values[nodeId][arrayKey] = __spreadArray(__spreadArray([], __read((group[termId].values[nodeId][arrayKey] || []))), __read((Array.isArray(newValue) ? newValue : [newValue])));
|
|
683
|
-
});
|
|
684
|
-
return group;
|
|
685
|
-
}, prev); }, {});
|
|
686
|
-
// compile original values
|
|
687
|
-
Object.values(groups).map(function (group) {
|
|
688
|
-
Object.keys(group.values).map(function (nodeId) {
|
|
689
|
-
var index = group.values[nodeId].index;
|
|
690
|
-
var termId = group.term['@id'];
|
|
691
|
-
var originalValue = get$5(originalValues, "[" + index + "]." + key, []).filter(function (val) { return val.term['@id'] === termId; });
|
|
692
|
-
if (originalValue.length > 0) {
|
|
693
|
-
var value = originalValue.reduce(function (array, curr) { return concatBlankNodeValue(array, curr.value); }, []);
|
|
694
|
-
group.originalValues[nodeId] = { value: term.propertyValue(value, termId) };
|
|
695
|
-
}
|
|
696
|
-
});
|
|
697
|
-
});
|
|
698
|
-
return groups;
|
|
699
|
-
};
|
|
700
639
|
var ellipsis = function (text, maxlength) {
|
|
701
640
|
if (text === void 0) { text = ''; }
|
|
702
641
|
if (maxlength === void 0) { maxlength = 20; }
|
|
@@ -706,8 +645,8 @@
|
|
|
706
645
|
var mapsUrl = function (location) { return location ? (location.lat && location.lng ?
|
|
707
646
|
"" + mapsQuery + location.lat + "," + location.lng :
|
|
708
647
|
(location.name ? "" + mapsQuery + encodeURI(location.name) : undefined)) : undefined; };
|
|
709
|
-
var nodeDefaultLabel = (_c$
|
|
710
|
-
_c$
|
|
648
|
+
var nodeDefaultLabel = (_c$3 = {},
|
|
649
|
+
_c$3[schema.NodeType.ImpactAssessment] = function (_c) {
|
|
711
650
|
var name = _c.name, country = _c.country, endDate = _c.endDate, product = _c.product;
|
|
712
651
|
return name ? name.replace((product === null || product === void 0 ? void 0 : product.name) + ", ", '') : [
|
|
713
652
|
product === null || product === void 0 ? void 0 : product.name,
|
|
@@ -715,11 +654,11 @@
|
|
|
715
654
|
endDate
|
|
716
655
|
].filter(Boolean).join(', ');
|
|
717
656
|
},
|
|
718
|
-
_c$
|
|
657
|
+
_c$3[schema.NodeType.Site] = function (_c) {
|
|
719
658
|
var name = _c.name, description = _c.description;
|
|
720
659
|
return name || description;
|
|
721
660
|
},
|
|
722
|
-
_c$
|
|
661
|
+
_c$3);
|
|
723
662
|
var defaultLabel = function (node) { return node ? (node['@type'] in nodeDefaultLabel ? nodeDefaultLabel[node['@type']](node) : node.name) || node['@id'] || node.id : ''; };
|
|
724
663
|
var itemColor = function (index) { return randomMaterialColor.getColor({ text: "" + index }); };
|
|
725
664
|
var listColor = function (_v, index) { return itemColor(index); };
|
|
@@ -751,7 +690,7 @@
|
|
|
751
690
|
}]
|
|
752
691
|
}] });
|
|
753
692
|
|
|
754
|
-
var _a$4, _b$1, _c$
|
|
693
|
+
var _a$4, _b$1, _c$2;
|
|
755
694
|
var termProperties = function (term) { return Object.keys(term).filter(function (key) { return !schema.isExpandable(term[key]) && ![
|
|
756
695
|
'pinned', 'expanded', 'extended', 'selected', 'loading',
|
|
757
696
|
'_score', '@type', '@id', '@context', 'createdAt',
|
|
@@ -894,10 +833,10 @@
|
|
|
894
833
|
groups.measurement,
|
|
895
834
|
groups.infrastructure
|
|
896
835
|
];
|
|
897
|
-
var termToParent = (_c$
|
|
898
|
-
_c$
|
|
899
|
-
_c$
|
|
900
|
-
_c$
|
|
836
|
+
var termToParent = (_c$2 = {},
|
|
837
|
+
_c$2[schema.TermTermType.property] = 'Properties',
|
|
838
|
+
_c$2[schema.TermTermType.region] = 'Geographies',
|
|
839
|
+
_c$2);
|
|
901
840
|
var termChildToParent = function (termType) { return termTypeGroups.find(function (_a) {
|
|
902
841
|
var children = _a.children;
|
|
903
842
|
return (children || []).some(function (child) { return child.termType === termType; });
|
|
@@ -1086,6 +1025,86 @@
|
|
|
1086
1025
|
}]
|
|
1087
1026
|
}] });
|
|
1088
1027
|
|
|
1028
|
+
var get$5 = require('lodash.get');
|
|
1029
|
+
var NodeKeyState;
|
|
1030
|
+
(function (NodeKeyState) {
|
|
1031
|
+
NodeKeyState["added"] = "added";
|
|
1032
|
+
NodeKeyState["updated"] = "updated";
|
|
1033
|
+
NodeKeyState["aggregated"] = "aggregated";
|
|
1034
|
+
NodeKeyState["deleted"] = "deleted";
|
|
1035
|
+
NodeKeyState["unchanged"] = "unchanged";
|
|
1036
|
+
})(NodeKeyState || (NodeKeyState = {}));
|
|
1037
|
+
var isState = function (node, key, state) { return (state in node && (typeof node[state] === 'boolean' ?
|
|
1038
|
+
node[state] :
|
|
1039
|
+
node[state].includes(key))); };
|
|
1040
|
+
;
|
|
1041
|
+
;
|
|
1042
|
+
var grouppedKeys = function (values) { return Object.entries(values).map(function (_a) {
|
|
1043
|
+
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
1044
|
+
return ({ key: key, value: value });
|
|
1045
|
+
}); };
|
|
1046
|
+
var concatBlankNodeValue = function (value, newValue) {
|
|
1047
|
+
var valueArray = Array.isArray(value) ? value : [value];
|
|
1048
|
+
var newValueArray = Array.isArray(newValue) ? newValue : [newValue];
|
|
1049
|
+
return __spreadArray(__spreadArray([], __read(valueArray)), __read(newValueArray));
|
|
1050
|
+
};
|
|
1051
|
+
var methodTierOrder = function (methodTier) { return [
|
|
1052
|
+
schema.EmissionMethodTier.measured,
|
|
1053
|
+
schema.EmissionMethodTier['tier 3'],
|
|
1054
|
+
schema.EmissionMethodTier['tier 2'],
|
|
1055
|
+
schema.EmissionMethodTier['tier 1'],
|
|
1056
|
+
schema.EmissionMethodTier.background
|
|
1057
|
+
].indexOf(methodTier); };
|
|
1058
|
+
var isMethodModelAllowed = function (node, filterMethod) { return !filterMethod || !node['methodModel'] || node['methodModel']['@id'] === filterMethod['@id']; };
|
|
1059
|
+
var grouppedValueKeys = [
|
|
1060
|
+
'dates', 'sd', 'min', 'max', 'inputs', 'depthUpper', 'depthLower', 'startDate', 'endDate',
|
|
1061
|
+
'methodTier', 'methodModel'
|
|
1062
|
+
];
|
|
1063
|
+
var isHigherState = function (sourceNode, newNode) { return !sourceNode ||
|
|
1064
|
+
isState(newNode, 'value', NodeKeyState.updated) ||
|
|
1065
|
+
(!isState(sourceNode, 'value', NodeKeyState.updated) && isState(newNode, 'value', NodeKeyState.added)); };
|
|
1066
|
+
var groupNodesByTerm = function (nodes, key, originalValues, filterMethod) {
|
|
1067
|
+
if (nodes === void 0) { nodes = []; }
|
|
1068
|
+
if (originalValues === void 0) { originalValues = []; }
|
|
1069
|
+
var groups = nodes.reduce(function (prev, node, index) { return (node[key] || []).reduce(function (group, blankNode) {
|
|
1070
|
+
if (!isMethodModelAllowed(blankNode, filterMethod)) {
|
|
1071
|
+
return group;
|
|
1072
|
+
}
|
|
1073
|
+
var nodeId = node['@id'];
|
|
1074
|
+
var termId = blankNode.term['@id'];
|
|
1075
|
+
group[termId] = group[termId] || {
|
|
1076
|
+
term: blankNode.term,
|
|
1077
|
+
methodTierOrder: methodTierOrder(blankNode.methodTier),
|
|
1078
|
+
values: {},
|
|
1079
|
+
originalValues: {}
|
|
1080
|
+
};
|
|
1081
|
+
group[termId].values[nodeId] = group[termId].values[nodeId] || { index: index, nodes: [], value: [] };
|
|
1082
|
+
group[termId].values[nodeId].node = isHigherState(group[termId].values[nodeId].node, blankNode)
|
|
1083
|
+
? blankNode
|
|
1084
|
+
: group[termId].values[nodeId].node;
|
|
1085
|
+
group[termId].values[nodeId].nodes.push(blankNode);
|
|
1086
|
+
group[termId].values[nodeId].value = concatBlankNodeValue(group[termId].values[nodeId].value, blankNode.value);
|
|
1087
|
+
grouppedValueKeys.forEach(function (arrayKey) {
|
|
1088
|
+
var newValue = get$5(blankNode, arrayKey, []);
|
|
1089
|
+
group[termId].values[nodeId][arrayKey] = __spreadArray(__spreadArray([], __read((group[termId].values[nodeId][arrayKey] || []))), __read((Array.isArray(newValue) ? newValue : [newValue])));
|
|
1090
|
+
});
|
|
1091
|
+
return group;
|
|
1092
|
+
}, prev); }, {});
|
|
1093
|
+
// compile original values
|
|
1094
|
+
Object.values(groups).map(function (group) {
|
|
1095
|
+
Object.keys(group.values).map(function (nodeId) {
|
|
1096
|
+
var index = group.values[nodeId].index;
|
|
1097
|
+
var termId = group.term['@id'];
|
|
1098
|
+
var originalValue = get$5(originalValues, "[" + index + "]." + key, []).filter(function (val) { return val.term['@id'] === termId; });
|
|
1099
|
+
if (originalValue.length > 0) {
|
|
1100
|
+
var value = originalValue.reduce(function (array, curr) { return concatBlankNodeValue(array, curr.value); }, []);
|
|
1101
|
+
group.originalValues[nodeId] = { value: term.propertyValue(value, termId) };
|
|
1102
|
+
}
|
|
1103
|
+
});
|
|
1104
|
+
});
|
|
1105
|
+
return groups;
|
|
1106
|
+
};
|
|
1107
|
+
|
|
1089
1108
|
var HE_API_BASE_URL = new i0.InjectionToken('HE_API_BASE_URL');
|
|
1090
1109
|
var HeCommonService = /** @class */ (function () {
|
|
1091
1110
|
function HeCommonService(_apiBaseUrl) {
|
|
@@ -1360,16 +1379,16 @@
|
|
|
1360
1379
|
*
|
|
1361
1380
|
* @param config The orchestrator configuration content.
|
|
1362
1381
|
* @param termId The `@id` of the Term.
|
|
1363
|
-
* @param
|
|
1382
|
+
* @param modelKey The key of the configuration (e.g. "products", "inputs")
|
|
1364
1383
|
* @param models Optional - list of models from `model-links.json` to default when orchestrator does not contain config.
|
|
1365
1384
|
* @returns List of models from orchestrator or models if set.
|
|
1366
1385
|
*/
|
|
1367
|
-
var findConfigModels = function (config, termId,
|
|
1386
|
+
var findConfigModels = function (config, termId, modelKey, models) {
|
|
1368
1387
|
if (models === void 0) { models = []; }
|
|
1369
1388
|
var configModels = config.models.flat()
|
|
1370
1389
|
.filter(function (_b) {
|
|
1371
1390
|
var value = _b.value, key = _b.key;
|
|
1372
|
-
return termId === value && (!
|
|
1391
|
+
return termId === value && (!modelKey || key === modelKey);
|
|
1373
1392
|
});
|
|
1374
1393
|
return configModels.length ? configModels : findModels(models, termId);
|
|
1375
1394
|
};
|
|
@@ -1461,14 +1480,6 @@
|
|
|
1461
1480
|
}] }, { type: i1__namespace$2.HttpClient }];
|
|
1462
1481
|
} });
|
|
1463
1482
|
|
|
1464
|
-
var NodeKeyState;
|
|
1465
|
-
(function (NodeKeyState) {
|
|
1466
|
-
NodeKeyState["added"] = "added";
|
|
1467
|
-
NodeKeyState["updated"] = "updated";
|
|
1468
|
-
NodeKeyState["aggregated"] = "aggregated";
|
|
1469
|
-
NodeKeyState["deleted"] = "deleted";
|
|
1470
|
-
NodeKeyState["unchanged"] = "unchanged";
|
|
1471
|
-
})(NodeKeyState || (NodeKeyState = {}));
|
|
1472
1483
|
var BlankNodeStateComponent = /** @class */ (function () {
|
|
1473
1484
|
function BlankNodeStateComponent(aggregationEngineService, engineService) {
|
|
1474
1485
|
this.aggregationEngineService = aggregationEngineService;
|
|
@@ -1478,14 +1489,19 @@
|
|
|
1478
1489
|
BlankNodeStateComponent.prototype.is = function (state) {
|
|
1479
1490
|
return (
|
|
1480
1491
|
// forcing state
|
|
1481
|
-
!!this.state && this.state === state) || (
|
|
1482
|
-
this.node[state] :
|
|
1483
|
-
this.node[state].includes(this.key)));
|
|
1492
|
+
!!this.state && this.state === state) || isState(this.node, this.key, state);
|
|
1484
1493
|
};
|
|
1485
1494
|
Object.defineProperty(BlankNodeStateComponent.prototype, "stars", {
|
|
1486
1495
|
get: function () {
|
|
1487
|
-
return this.is(NodeKeyState.deleted)
|
|
1488
|
-
|
|
1496
|
+
return this.is(NodeKeyState.deleted)
|
|
1497
|
+
? [0, 1, 2, 3]
|
|
1498
|
+
: this.is(NodeKeyState.updated)
|
|
1499
|
+
? [0, 1]
|
|
1500
|
+
: this.is(NodeKeyState.aggregated) // handle here because aggregated can be updated
|
|
1501
|
+
? [0, 1, 2]
|
|
1502
|
+
: this.is(NodeKeyState.added)
|
|
1503
|
+
? [0]
|
|
1504
|
+
: [];
|
|
1489
1505
|
},
|
|
1490
1506
|
enumerable: false,
|
|
1491
1507
|
configurable: true
|
|
@@ -3910,6 +3926,23 @@
|
|
|
3910
3926
|
}]
|
|
3911
3927
|
}] });
|
|
3912
3928
|
|
|
3929
|
+
var IsArrayPipe = /** @class */ (function () {
|
|
3930
|
+
function IsArrayPipe() {
|
|
3931
|
+
}
|
|
3932
|
+
IsArrayPipe.prototype.transform = function (value) {
|
|
3933
|
+
return Array.isArray(value);
|
|
3934
|
+
};
|
|
3935
|
+
return IsArrayPipe;
|
|
3936
|
+
}());
|
|
3937
|
+
IsArrayPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IsArrayPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
3938
|
+
IsArrayPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IsArrayPipe, name: "isArray" });
|
|
3939
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IsArrayPipe, decorators: [{
|
|
3940
|
+
type: i0.Pipe,
|
|
3941
|
+
args: [{
|
|
3942
|
+
name: 'isArray'
|
|
3943
|
+
}]
|
|
3944
|
+
}] });
|
|
3945
|
+
|
|
3913
3946
|
var components$7 = [
|
|
3914
3947
|
ClipboardComponent,
|
|
3915
3948
|
PopoverComponent,
|
|
@@ -3925,7 +3958,8 @@
|
|
|
3925
3958
|
TimesPipe,
|
|
3926
3959
|
ClickOutsideDirective,
|
|
3927
3960
|
SkeletonTextComponent,
|
|
3928
|
-
GetPipe
|
|
3961
|
+
GetPipe,
|
|
3962
|
+
IsArrayPipe
|
|
3929
3963
|
];
|
|
3930
3964
|
var HeCommonModule = /** @class */ (function () {
|
|
3931
3965
|
function HeCommonModule() {
|
|
@@ -3947,7 +3981,8 @@
|
|
|
3947
3981
|
TimesPipe,
|
|
3948
3982
|
ClickOutsideDirective,
|
|
3949
3983
|
SkeletonTextComponent,
|
|
3950
|
-
GetPipe
|
|
3984
|
+
GetPipe,
|
|
3985
|
+
IsArrayPipe], imports: [i6.CommonModule, i1$2.FormsModule, i5.RouterModule,
|
|
3951
3986
|
i10.NgbTypeaheadModule, i10.NgbTooltipModule, i10.NgbPopoverModule,
|
|
3952
3987
|
i1$4.GoogleMapsModule,
|
|
3953
3988
|
HeCommonLightModule], exports: [i10.NgbTypeaheadModule, i10.NgbTooltipModule, i10.NgbPopoverModule,
|
|
@@ -3966,7 +4001,8 @@
|
|
|
3966
4001
|
TimesPipe,
|
|
3967
4002
|
ClickOutsideDirective,
|
|
3968
4003
|
SkeletonTextComponent,
|
|
3969
|
-
GetPipe
|
|
4004
|
+
GetPipe,
|
|
4005
|
+
IsArrayPipe] });
|
|
3970
4006
|
HeCommonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCommonModule, imports: [[
|
|
3971
4007
|
i6.CommonModule, i1$2.FormsModule, i5.RouterModule,
|
|
3972
4008
|
i10.NgbTypeaheadModule, i10.NgbTooltipModule, i10.NgbPopoverModule,
|
|
@@ -4029,7 +4065,7 @@
|
|
|
4029
4065
|
}]
|
|
4030
4066
|
}], ctorParameters: function () { return [{ type: i1__namespace$2.HttpClient }, { type: HeCommonService }]; } });
|
|
4031
4067
|
|
|
4032
|
-
var _a$3, _b, _c, _d$2, _e
|
|
4068
|
+
var _a$3, _b, _c$1, _d$2, _e;
|
|
4033
4069
|
var searchableTypes = [
|
|
4034
4070
|
schema.NodeType.Cycle,
|
|
4035
4071
|
schema.NodeType.Source
|
|
@@ -4217,18 +4253,18 @@
|
|
|
4217
4253
|
_b[schema.NodeType.Source] = ['name', 'bibliography.title'],
|
|
4218
4254
|
_b[schema.NodeType.ImpactAssessment] = ['name', 'product.name', 'country.name'],
|
|
4219
4255
|
_b));
|
|
4220
|
-
var searchFieldsNested = Object.freeze((_c = {},
|
|
4221
|
-
_c[schema.NodeType.Cycle] = [
|
|
4256
|
+
var searchFieldsNested = Object.freeze((_c$1 = {},
|
|
4257
|
+
_c$1[schema.NodeType.Cycle] = [
|
|
4222
4258
|
'inputs.term.name',
|
|
4223
4259
|
'emissions.term.name',
|
|
4224
4260
|
'practices.term.name'
|
|
4225
4261
|
],
|
|
4226
|
-
_c[schema.NodeType.Source] = [],
|
|
4227
|
-
_c[schema.NodeType.ImpactAssessment] = [
|
|
4262
|
+
_c$1[schema.NodeType.Source] = [],
|
|
4263
|
+
_c$1[schema.NodeType.ImpactAssessment] = [
|
|
4228
4264
|
'emissionsResourceUse.term.name',
|
|
4229
4265
|
'impacts.term.name'
|
|
4230
4266
|
],
|
|
4231
|
-
_c));
|
|
4267
|
+
_c$1));
|
|
4232
4268
|
/**
|
|
4233
4269
|
* Specific strict queries per type.
|
|
4234
4270
|
*/
|
|
@@ -4236,10 +4272,10 @@
|
|
|
4236
4272
|
_d$2[schema.NodeType.Cycle] = { must: [], must_not: [matchAggregatedQuery] },
|
|
4237
4273
|
_d$2[schema.NodeType.Source] = { must: [], must_not: [matchAggregatedQuery] },
|
|
4238
4274
|
_d$2);
|
|
4239
|
-
var searchFiltersKeys = (_e
|
|
4240
|
-
_e
|
|
4241
|
-
_e
|
|
4242
|
-
_e
|
|
4275
|
+
var searchFiltersKeys = (_e = {},
|
|
4276
|
+
_e[schema.NodeType.Cycle] = function (key) { return key; },
|
|
4277
|
+
_e[schema.NodeType.Source] = function (key) { return key; },
|
|
4278
|
+
_e);
|
|
4243
4279
|
/* eslint-disable complexity */
|
|
4244
4280
|
var searchQuery = function (type, query, filters, aggregated) {
|
|
4245
4281
|
var boolQuery = (Object.assign(Object.assign({ must: [
|
|
@@ -5226,33 +5262,96 @@
|
|
|
5226
5262
|
type: i0.Input
|
|
5227
5263
|
}] } });
|
|
5228
5264
|
|
|
5229
|
-
var _d$1
|
|
5265
|
+
var _c, _d$1;
|
|
5230
5266
|
var get$3 = require('lodash.get');
|
|
5231
5267
|
var orderBy$5 = require('lodash.orderby');
|
|
5268
|
+
var nodeTypesLowerCase = Object.values(schema.NodeType).map(function (v) { return v.toLowerCase(); });
|
|
5232
5269
|
var reduceValues = function (values, termId) {
|
|
5233
5270
|
var propertyValues = values
|
|
5234
|
-
.map(function (
|
|
5235
|
-
var value =
|
|
5271
|
+
.map(function (_c) {
|
|
5272
|
+
var value = _c.value;
|
|
5236
5273
|
return term.propertyValue(value, termId);
|
|
5237
5274
|
})
|
|
5238
5275
|
// propertyValue may return null if the value is null or undefined, therefore remove them from total
|
|
5239
5276
|
.filter(function (v) { return v !== null; });
|
|
5240
5277
|
return propertyValues.length ? propertyValues.reduce(function (p, v) { return p + v; }, 0) : undefined;
|
|
5241
5278
|
};
|
|
5279
|
+
var isRecalculated = function (values, key) {
|
|
5280
|
+
if (key === void 0) { key = 'value'; }
|
|
5281
|
+
return values.some(function (v) { return (__spreadArray(__spreadArray([], __read((v.added || []))), __read((v.updated || [])))).includes(key); });
|
|
5282
|
+
};
|
|
5283
|
+
var blankNodeValueByKey = {
|
|
5284
|
+
property: function (values, _k, id) {
|
|
5285
|
+
var _a;
|
|
5286
|
+
return !!id && values.length
|
|
5287
|
+
? ((_a = (values[0].properties || []).find(function (p) { return p.term['@id'] === id; })) === null || _a === void 0 ? void 0 : _a.value) || ''
|
|
5288
|
+
: '';
|
|
5289
|
+
},
|
|
5290
|
+
transformation: function () { return null; },
|
|
5291
|
+
default: function (blankNodes, key) {
|
|
5292
|
+
var value = (blankNodes === null || blankNodes === void 0 ? void 0 : blankNodes.length) ? blankNodes[0][key] : null;
|
|
5293
|
+
return ['string', 'number', 'boolean', 'undefined'].includes(typeof value) ? (value || '') : null;
|
|
5294
|
+
}
|
|
5295
|
+
};
|
|
5296
|
+
var blankNodeValue = function (blankNodes, key, id) { return blankNodeValueByKey[key in blankNodeValueByKey ? key : 'default'](blankNodes, key, id); };
|
|
5242
5297
|
var logSubValue = function (logs, key, prop) { return logs[key][prop] ? (Array.isArray(logs[key][prop]) ?
|
|
5243
|
-
logs[key][prop].map(function (
|
|
5244
|
-
{ key: prop,
|
|
5298
|
+
logs[key][prop].map(function (id) { return ({ key: prop, id: id }); }) :
|
|
5299
|
+
{ key: prop, id: logs[key][prop] }) : undefined; };
|
|
5245
5300
|
var isBackgroundNoInput = function (logs, key) { return logs[key].methodTier === schema.EmissionMethodTier.background && !logs[key].input; };
|
|
5246
|
-
var logSubValues = function (logs) { return Object.keys(logs)
|
|
5301
|
+
var logSubValues = function (logs, original, recalculated) { return Object.keys(logs)
|
|
5247
5302
|
.flatMap(function (key) { return [
|
|
5248
5303
|
logSubValue(logs, key, 'input'),
|
|
5249
5304
|
logSubValue(logs, key, 'property'),
|
|
5305
|
+
logSubValue(logs, key, 'transformation'),
|
|
5250
5306
|
// for background data without input, convert term to input so it is displayed below the term
|
|
5251
5307
|
isBackgroundNoInput(logs, key) ? { key: 'backgroundData' } : undefined
|
|
5252
|
-
]
|
|
5308
|
+
]
|
|
5309
|
+
.flat()
|
|
5253
5310
|
.filter(Boolean)
|
|
5254
|
-
.map(function (v) { return (Object.assign(Object.assign({}, v), { configModels: [key] })); }); }); };
|
|
5255
|
-
var logKeys = function (logs) { return Object.keys(logs)
|
|
5311
|
+
.map(function (v) { return (Object.assign(Object.assign({}, v), { configModels: [key], originalValue: blankNodeValue(original, v.key, v.id), recalculatedValue: blankNodeValue(recalculated, v.key, v.id), isRecalculated: isRecalculated(recalculated, v.key) })); }); }); };
|
|
5312
|
+
var logKeys = function (logs, original, recalculated) { return Object.keys(logs)
|
|
5313
|
+
.filter(function (key) { return logs[key].isKey; })
|
|
5314
|
+
.map(function (key) { return ({
|
|
5315
|
+
key: key,
|
|
5316
|
+
originalValue: blankNodeValue(original, key),
|
|
5317
|
+
recalculatedValue: blankNodeValue(recalculated, key),
|
|
5318
|
+
isRecalculated: isRecalculated(recalculated, key)
|
|
5319
|
+
}); }); };
|
|
5320
|
+
var modelConfigOrder = function (models, termId, modelKey, model) {
|
|
5321
|
+
var indexes = models.map(function (m, index) {
|
|
5322
|
+
var arrayIndex = Array.isArray(m) ? modelConfigOrder(m, termId, modelKey, model) : '';
|
|
5323
|
+
return Array.isArray(m)
|
|
5324
|
+
? arrayIndex
|
|
5325
|
+
? [index, arrayIndex].join('.')
|
|
5326
|
+
: ''
|
|
5327
|
+
: [termId === m.value, modelKey === m.key, model === m.model].every(Boolean)
|
|
5328
|
+
? "" + index
|
|
5329
|
+
: '';
|
|
5330
|
+
}).filter(Boolean);
|
|
5331
|
+
return indexes.length ? indexes[0] : '';
|
|
5332
|
+
};
|
|
5333
|
+
/**
|
|
5334
|
+
* Group models running in parallel under the same array, as they should appear vertically.
|
|
5335
|
+
*
|
|
5336
|
+
* @param config The configuration.
|
|
5337
|
+
* @param models The list of models
|
|
5338
|
+
*/
|
|
5339
|
+
var groupParallelModels = function (config, termId, modelKey, models) {
|
|
5340
|
+
var modelsWithOrder = models.map(function (model) { return ({
|
|
5341
|
+
model: model,
|
|
5342
|
+
order: modelConfigOrder(config.models, termId, modelKey, model)
|
|
5343
|
+
}); });
|
|
5344
|
+
return modelsWithOrder
|
|
5345
|
+
.reduce(function (prev, _c) {
|
|
5346
|
+
var model = _c.model, order = _c.order;
|
|
5347
|
+
var isArray = order.includes('.');
|
|
5348
|
+
var arrayIndex = isArray ? order.split('.')[0] : prev.length;
|
|
5349
|
+
prev[arrayIndex] = isArray ? __spreadArray(__spreadArray([], __read((prev[arrayIndex] || []))), [model]) : model;
|
|
5350
|
+
return prev;
|
|
5351
|
+
}, [])
|
|
5352
|
+
.filter(Boolean)
|
|
5353
|
+
.map(function (v) { return v.length === 1 ? v[0] : v; });
|
|
5354
|
+
};
|
|
5256
5355
|
var LogStatus;
|
|
5257
5356
|
(function (LogStatus) {
|
|
5258
5357
|
LogStatus["success"] = "successful";
|
|
@@ -5261,20 +5360,20 @@
|
|
|
5261
5360
|
LogStatus["dataProvided"] = "not run (user provided data retained)";
|
|
5262
5361
|
LogStatus["notRequired"] = "not run (not required to run)";
|
|
5263
5362
|
})(LogStatus || (LogStatus = {}));
|
|
5264
|
-
var logIcon = (
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5363
|
+
var logIcon = (_c = {},
|
|
5364
|
+
_c[LogStatus.success] = 'check',
|
|
5365
|
+
_c[LogStatus.error] = 'times',
|
|
5366
|
+
_c[LogStatus.skipHierarchy] = ['far', 'circle'],
|
|
5367
|
+
_c[LogStatus.dataProvided] = 'circle',
|
|
5368
|
+
_c[LogStatus.notRequired] = 'minus-circle',
|
|
5369
|
+
_c);
|
|
5370
|
+
var logColor = (_d$1 = {},
|
|
5371
|
+
_d$1[LogStatus.success] = 'success',
|
|
5372
|
+
_d$1[LogStatus.error] = 'danger',
|
|
5373
|
+
_d$1[LogStatus.skipHierarchy] = 'dark',
|
|
5374
|
+
_d$1[LogStatus.dataProvided] = 'dark',
|
|
5375
|
+
_d$1[LogStatus.notRequired] = 'grey',
|
|
5270
5376
|
_d$1);
|
|
5271
|
-
var logColor = (_e = {},
|
|
5272
|
-
_e[LogStatus.success] = 'success',
|
|
5273
|
-
_e[LogStatus.error] = 'danger',
|
|
5274
|
-
_e[LogStatus.skipHierarchy] = 'dark',
|
|
5275
|
-
_e[LogStatus.dataProvided] = 'dark',
|
|
5276
|
-
_e[LogStatus.notRequired] = 'grey',
|
|
5277
|
-
_e);
|
|
5278
5377
|
var NodeLogsModelsComponent = /** @class */ (function () {
|
|
5279
5378
|
function NodeLogsModelsComponent(searchService, hestiaEngineService) {
|
|
5280
5379
|
var _this = this;
|
|
@@ -5300,15 +5399,15 @@
|
|
|
5300
5399
|
}
|
|
5301
5400
|
NodeLogsModelsComponent.prototype.ngOnInit = function () {
|
|
5302
5401
|
return __awaiter(this, void 0, void 0, function () {
|
|
5303
|
-
var
|
|
5402
|
+
var _c, models, _d, allModels, originalValues, recalculatedValues, type, _e;
|
|
5304
5403
|
var _this = this;
|
|
5305
|
-
return __generator(this, function (
|
|
5306
|
-
switch (
|
|
5404
|
+
return __generator(this, function (_f) {
|
|
5405
|
+
switch (_f.label) {
|
|
5307
5406
|
case 0:
|
|
5308
|
-
|
|
5407
|
+
_c = this;
|
|
5309
5408
|
return [4 /*yield*/, this.hestiaEngineService.ochestratorConfig(this.nodeType)];
|
|
5310
5409
|
case 1:
|
|
5311
|
-
|
|
5410
|
+
_c.config = _f.sent();
|
|
5312
5411
|
return [4 /*yield*/, this.searchService.search({
|
|
5313
5412
|
fields: ['@type', '@id', 'name'],
|
|
5314
5413
|
limit: 1000,
|
|
@@ -5322,18 +5421,18 @@
|
|
|
5322
5421
|
}
|
|
5323
5422
|
})];
|
|
5324
5423
|
case 2:
|
|
5325
|
-
models = (
|
|
5424
|
+
models = (_f.sent()).results;
|
|
5326
5425
|
this.models = models;
|
|
5327
|
-
|
|
5426
|
+
_d = this;
|
|
5328
5427
|
return [4 /*yield*/, rxjs.from(this.models).pipe(operators.filter(function (v) { return !!v; }), operators.distinct(function (v) { return v['@id']; }), operators.reduce(function (prev, curr) {
|
|
5329
|
-
var
|
|
5330
|
-
return (Object.assign(Object.assign({}, prev), (
|
|
5428
|
+
var _c;
|
|
5429
|
+
return (Object.assign(Object.assign({}, prev), (_c = {}, _c[curr['@id']] = curr, _c)));
|
|
5331
5430
|
}, {})).toPromise()];
|
|
5332
5431
|
case 3:
|
|
5333
|
-
|
|
5432
|
+
_d.methodsById = _f.sent();
|
|
5334
5433
|
return [4 /*yield*/, this.hestiaEngineService.models()];
|
|
5335
5434
|
case 4:
|
|
5336
|
-
allModels =
|
|
5435
|
+
allModels = _f.sent();
|
|
5337
5436
|
originalValues = (this.originalValues || []).filter(function (value) { return !value.deleted; });
|
|
5338
5437
|
recalculatedValues = (this.recalculatedValues || []).filter(function (value) { return !value.deleted; });
|
|
5339
5438
|
type = originalValues.length ?
|
|
@@ -5341,31 +5440,35 @@
|
|
|
5341
5440
|
recalculatedValues.length ?
|
|
5342
5441
|
recalculatedValues[0]['@type'] || recalculatedValues[0].type :
|
|
5343
5442
|
undefined;
|
|
5344
|
-
|
|
5443
|
+
_e = this;
|
|
5345
5444
|
return [4 /*yield*/, this.fetchAllTerms()];
|
|
5346
5445
|
case 5:
|
|
5347
|
-
|
|
5446
|
+
_e.allTerms = _f.sent();
|
|
5348
5447
|
this.allBlankNodes = this.allTerms.flatMap(function (term) {
|
|
5349
|
-
var
|
|
5350
|
-
var
|
|
5351
|
-
var
|
|
5448
|
+
var termId = term['@id'];
|
|
5449
|
+
var termLogs = get$3(_this.logs, termId, {});
|
|
5450
|
+
var original = originalValues.filter(function (v) { return termId === v.term['@id']; });
|
|
5451
|
+
var recalculated = recalculatedValues.filter(function (v) { return termId === v.term['@id']; });
|
|
5352
5452
|
var hasData = !!original.length || !!recalculated.length || Object.keys(termLogs).length > 0;
|
|
5353
|
-
var configModels = utils.unique(__spreadArray(__spreadArray([], __read(findConfigModels(_this.config,
|
|
5354
|
-
var model =
|
|
5453
|
+
var configModels = utils.unique(__spreadArray(__spreadArray([], __read(findConfigModels(_this.config, termId, _this.nodeKey, allModels).map(function (_c) {
|
|
5454
|
+
var model = _c.model;
|
|
5355
5455
|
return model;
|
|
5356
5456
|
}))), __read(Object.keys(termLogs).filter(function (key) { return !isBackgroundNoInput(termLogs, key); })))).filter(function (key) { return !(key in termLogs) || (!termLogs[key].isKey && !termLogs[key].input && !termLogs[key].property); });
|
|
5357
|
-
var keys = logKeys(termLogs);
|
|
5358
|
-
var subValues = logSubValues(termLogs);
|
|
5457
|
+
var keys = logKeys(termLogs, original, recalculated);
|
|
5458
|
+
var subValues = logSubValues(termLogs, original, recalculated);
|
|
5359
5459
|
return {
|
|
5360
5460
|
isOpen: true,
|
|
5361
5461
|
canOpen: keys.length > 0 || subValues.length > 0,
|
|
5462
|
+
termId: termId,
|
|
5362
5463
|
term: term,
|
|
5363
5464
|
type: type,
|
|
5364
|
-
configModels: configModels,
|
|
5365
|
-
original:
|
|
5366
|
-
|
|
5465
|
+
configModels: groupParallelModels(_this.config, termId, _this.nodeKey, configModels),
|
|
5466
|
+
original: original,
|
|
5467
|
+
originalValue: reduceValues(original, termId),
|
|
5468
|
+
recalculated: recalculated,
|
|
5469
|
+
recalculatedValue: reduceValues(recalculated, termId),
|
|
5367
5470
|
isOriginal: !!original.length,
|
|
5368
|
-
isRecalculated: recalculated
|
|
5471
|
+
isRecalculated: isRecalculated(recalculated),
|
|
5369
5472
|
hasData: hasData,
|
|
5370
5473
|
logs: termLogs,
|
|
5371
5474
|
keys: keys,
|
|
@@ -5384,13 +5487,13 @@
|
|
|
5384
5487
|
};
|
|
5385
5488
|
NodeLogsModelsComponent.prototype.fetchAllTerms = function () {
|
|
5386
5489
|
return __awaiter(this, void 0, void 0, function () {
|
|
5387
|
-
return __generator(this, function (
|
|
5490
|
+
return __generator(this, function (_c) {
|
|
5388
5491
|
return [2 /*return*/, rxjs.from(this.terms.length ?
|
|
5389
|
-
this.terms : __spreadArray(__spreadArray([], __read((this.originalValues || []).map(function (
|
|
5390
|
-
var term =
|
|
5492
|
+
this.terms : __spreadArray(__spreadArray([], __read((this.originalValues || []).map(function (_c) {
|
|
5493
|
+
var term = _c.term;
|
|
5391
5494
|
return term;
|
|
5392
|
-
}))), __read((this.recalculatedValues || []).map(function (
|
|
5393
|
-
var term =
|
|
5495
|
+
}))), __read((this.recalculatedValues || []).map(function (_c) {
|
|
5496
|
+
var term = _c.term;
|
|
5394
5497
|
return term;
|
|
5395
5498
|
})))).pipe(operators.distinct(function (v) { return v['@id']; }), operators.toArray(), operators.map(function (v) { return orderBy$5(v, ['name'], ['asc']); })).toPromise()];
|
|
5396
5499
|
});
|
|
@@ -5400,75 +5503,98 @@
|
|
|
5400
5503
|
return rxjs.from(this.allTerms).pipe(operators.map(function (v) { return v.name; }), operators.filter(function (v) { return v.toLowerCase().includes(term.toLowerCase()); }), operators.toArray());
|
|
5401
5504
|
};
|
|
5402
5505
|
NodeLogsModelsComponent.prototype.trackByBlankNode = function (_index, node) {
|
|
5403
|
-
return node.
|
|
5506
|
+
return node.termId;
|
|
5507
|
+
};
|
|
5508
|
+
Object.defineProperty(NodeLogsModelsComponent.prototype, "showOriginalValue", {
|
|
5509
|
+
get: function () {
|
|
5510
|
+
var _a;
|
|
5511
|
+
return (_a = this.originalValues) === null || _a === void 0 ? void 0 : _a.length;
|
|
5512
|
+
},
|
|
5513
|
+
enumerable: false,
|
|
5514
|
+
configurable: true
|
|
5515
|
+
});
|
|
5516
|
+
NodeLogsModelsComponent.prototype.keyValue = function (blankNodes, key) {
|
|
5517
|
+
var value = (blankNodes === null || blankNodes === void 0 ? void 0 : blankNodes.length) ? blankNodes[0][key] : null;
|
|
5518
|
+
return ['string', 'number', 'boolean'].includes(typeof value) ? (value || '') : null;
|
|
5404
5519
|
};
|
|
5405
5520
|
NodeLogsModelsComponent.prototype.togglePopover = function (popover, context) {
|
|
5406
5521
|
return popover.isOpen() ? popover.close() : popover.open(context);
|
|
5407
5522
|
};
|
|
5408
|
-
NodeLogsModelsComponent.prototype.
|
|
5409
|
-
var
|
|
5410
|
-
|
|
5523
|
+
NodeLogsModelsComponent.prototype.filterResults = function () {
|
|
5524
|
+
var _this = this;
|
|
5525
|
+
setTimeout(function () {
|
|
5526
|
+
_this.blankNodes = _this.allBlankNodes.filter(function (_c) {
|
|
5527
|
+
var hasData = _c.hasData, name = _c.term.name;
|
|
5528
|
+
return (!_this.onlyWithData || hasData) &&
|
|
5529
|
+
(!_this.term || name === _this.term);
|
|
5530
|
+
});
|
|
5531
|
+
});
|
|
5532
|
+
};
|
|
5533
|
+
/** Logs **/
|
|
5534
|
+
NodeLogsModelsComponent.prototype.getTransformationLogs = function (node, methodId, _c) {
|
|
5535
|
+
var id = _c.id;
|
|
5536
|
+
return get$3(this.logs, [id, node.termId, methodId].join('.'), {});
|
|
5537
|
+
};
|
|
5538
|
+
NodeLogsModelsComponent.prototype.getLogs = function (node, methodId, subValue) {
|
|
5539
|
+
return (subValue === null || subValue === void 0 ? void 0 : subValue.key) === 'transformation'
|
|
5540
|
+
? this.getTransformationLogs(node, methodId, subValue)
|
|
5541
|
+
: node.logs[methodId];
|
|
5542
|
+
};
|
|
5543
|
+
NodeLogsModelsComponent.prototype.isBackground = function (log) {
|
|
5411
5544
|
return (log === null || log === void 0 ? void 0 : log.methodTier) === schema.EmissionMethodTier.background;
|
|
5412
5545
|
};
|
|
5413
|
-
NodeLogsModelsComponent.prototype.isRequired = function (
|
|
5414
|
-
var logs = _d.logs;
|
|
5415
|
-
var log = logs[methodId];
|
|
5546
|
+
NodeLogsModelsComponent.prototype.isRequired = function (log) {
|
|
5416
5547
|
return !('shouldRunOrchestrator' in log) || log.shouldRunOrchestrator;
|
|
5417
5548
|
};
|
|
5418
|
-
NodeLogsModelsComponent.prototype.
|
|
5419
|
-
var
|
|
5420
|
-
var log = logs[methodId];
|
|
5421
|
-
return log.shouldRun;
|
|
5422
|
-
};
|
|
5423
|
-
NodeLogsModelsComponent.prototype.isUserProvided = function (node, methodId) {
|
|
5424
|
-
var log = node.logs[methodId];
|
|
5549
|
+
NodeLogsModelsComponent.prototype.isUserProvided = function (node, methodId, subValue) {
|
|
5550
|
+
var log = this.getLogs(node, methodId, subValue);
|
|
5425
5551
|
return [
|
|
5426
|
-
typeof node.
|
|
5552
|
+
typeof node.originalValue === 'undefined',
|
|
5427
5553
|
node.isRecalculated,
|
|
5428
|
-
this.isBackground(
|
|
5554
|
+
this.isBackground(log),
|
|
5429
5555
|
log === null || log === void 0 ? void 0 : log.isKey,
|
|
5430
|
-
this.hasLog(
|
|
5556
|
+
this.hasLog(log, false) // skip if contains logs other than orchestrator
|
|
5431
5557
|
].every(function (v) { return !v; });
|
|
5432
5558
|
};
|
|
5433
5559
|
NodeLogsModelsComponent.prototype.validSubValue = function (node, index, subValue) {
|
|
5434
5560
|
var methodId = this.getMethodIdAt(node, index, subValue);
|
|
5435
5561
|
var log = get$3(node.logs[methodId], subValue === null || subValue === void 0 ? void 0 : subValue.key, null);
|
|
5436
|
-
return !(subValue === null || subValue === void 0 ? void 0 : subValue.
|
|
5437
|
-
//
|
|
5438
|
-
Array.isArray(log) ? log.includes(subValue === null || subValue === void 0 ? void 0 : subValue.
|
|
5562
|
+
return !(subValue === null || subValue === void 0 ? void 0 : subValue.id) || (
|
|
5563
|
+
// subValue can be an array
|
|
5564
|
+
Array.isArray(log) ? log.includes(subValue === null || subValue === void 0 ? void 0 : subValue.id) : log === (subValue === null || subValue === void 0 ? void 0 : subValue.id));
|
|
5439
5565
|
};
|
|
5440
5566
|
NodeLogsModelsComponent.prototype.getMethodIdAt = function (node, index, subValue) {
|
|
5441
5567
|
var configModels = (subValue || node).configModels;
|
|
5442
5568
|
return configModels[index];
|
|
5443
5569
|
};
|
|
5444
|
-
NodeLogsModelsComponent.prototype.methodName = function (
|
|
5445
|
-
var
|
|
5446
|
-
var
|
|
5570
|
+
NodeLogsModelsComponent.prototype.methodName = function (node, methodId, subValue) {
|
|
5571
|
+
var _a;
|
|
5572
|
+
var log = this.getLogs(node, methodId, subValue);
|
|
5447
5573
|
return ((_a = this.methodsById[methodId]) === null || _a === void 0 ? void 0 : _a.name) ||
|
|
5448
|
-
(
|
|
5449
|
-
(
|
|
5574
|
+
(log === null || log === void 0 ? void 0 : log.key) ||
|
|
5575
|
+
(log === null || log === void 0 ? void 0 : log.model) ||
|
|
5450
5576
|
(methodId ? utils.keyToLabel(methodId) : '');
|
|
5451
5577
|
};
|
|
5452
|
-
NodeLogsModelsComponent.prototype.hasLog = function (
|
|
5453
|
-
var logs = _d.logs;
|
|
5578
|
+
NodeLogsModelsComponent.prototype.hasLog = function (log, withOrchestrator) {
|
|
5454
5579
|
if (withOrchestrator === void 0) { withOrchestrator = true; }
|
|
5455
|
-
return
|
|
5456
|
-
(withOrchestrator && 'shouldRunOrchestrator' in
|
|
5580
|
+
return !!log && ('shouldRun' in log ||
|
|
5581
|
+
(withOrchestrator && 'shouldRunOrchestrator' in log));
|
|
5457
5582
|
};
|
|
5458
|
-
NodeLogsModelsComponent.prototype.hasLogDetails = function (node, methodId) {
|
|
5583
|
+
NodeLogsModelsComponent.prototype.hasLogDetails = function (node, methodId, subValue) {
|
|
5459
5584
|
var _a;
|
|
5460
|
-
var log = node
|
|
5585
|
+
var log = this.getLogs(node, methodId, subValue);
|
|
5461
5586
|
return [
|
|
5462
5587
|
LogStatus.success,
|
|
5463
5588
|
LogStatus.error
|
|
5464
5589
|
].includes(this.logStatus(node, methodId)) && ((log === null || log === void 0 ? void 0 : log.requirements) || (log === null || log === void 0 ? void 0 : log.logs) || ((_a = log === null || log === void 0 ? void 0 : log.missingLookups) === null || _a === void 0 ? void 0 : _a.length));
|
|
5465
5590
|
};
|
|
5466
|
-
NodeLogsModelsComponent.prototype.logStatus = function (node, methodId) {
|
|
5467
|
-
|
|
5591
|
+
NodeLogsModelsComponent.prototype.logStatus = function (node, methodId, subValue) {
|
|
5592
|
+
var log = this.getLogs(node, methodId, subValue);
|
|
5593
|
+
return this.isUserProvided(node, methodId, subValue) ?
|
|
5468
5594
|
LogStatus.dataProvided :
|
|
5469
|
-
(this.hasLog(
|
|
5470
|
-
(this.isRequired(
|
|
5471
|
-
(
|
|
5595
|
+
(this.hasLog(log) ?
|
|
5596
|
+
(this.isRequired(log) ?
|
|
5597
|
+
(log.shouldRun ?
|
|
5472
5598
|
LogStatus.success :
|
|
5473
5599
|
LogStatus.error) :
|
|
5474
5600
|
(node.isRecalculated ?
|
|
@@ -5476,23 +5602,16 @@
|
|
|
5476
5602
|
LogStatus.notRequired)) :
|
|
5477
5603
|
LogStatus.skipHierarchy);
|
|
5478
5604
|
};
|
|
5605
|
+
NodeLogsModelsComponent.prototype.requirementKeys = function (requirements) {
|
|
5606
|
+
return Object.keys(requirements).filter(function (k) { return !nodeTypesLowerCase.includes(k) && k !== 'transformation'; });
|
|
5607
|
+
};
|
|
5479
5608
|
NodeLogsModelsComponent.prototype.requirementColor = function (value) {
|
|
5480
5609
|
return !value || ['None', 'False', '0', '0.0'].includes(value) ? 'danger' : 'white';
|
|
5481
5610
|
};
|
|
5482
|
-
NodeLogsModelsComponent.prototype.filterResults = function () {
|
|
5483
|
-
var _this = this;
|
|
5484
|
-
setTimeout(function () {
|
|
5485
|
-
_this.blankNodes = _this.allBlankNodes.filter(function (_d) {
|
|
5486
|
-
var hasData = _d.hasData, name = _d.term.name;
|
|
5487
|
-
return (!_this.onlyWithData || hasData) &&
|
|
5488
|
-
(!_this.term || name === _this.term);
|
|
5489
|
-
});
|
|
5490
|
-
});
|
|
5491
|
-
};
|
|
5492
5611
|
return NodeLogsModelsComponent;
|
|
5493
5612
|
}());
|
|
5494
5613
|
NodeLogsModelsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeLogsModelsComponent, deps: [{ token: HeSearchService }, { token: HeEngineService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5495
|
-
NodeLogsModelsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: { nodeType: "nodeType", nodeKey: "nodeKey", logsUrl: "logsUrl", originalValues: "originalValues", recalculatedValues: "recalculatedValues", terms: "terms", logs: "logs", filteredType: "filteredType" }, ngImport: i0__namespace, 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 <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table\">\n <thead>\n <tr>\n <th class=\"width-auto\">\n <div class=\"field\">\n <div class=\"control is-expanded has-icons-right\">\n <input class=\"input search-input is-small\"\n [(ngModel)]=\"term\" name=\"term\"\n placeholder=\"Filter by name\"\n [editable]=\"false\"\n [ngbTypeahead]=\"suggestTerm\"\n (selectItem)=\"filterResults()\"\n >\n <a class=\"icon is-small is-right\"\n [class.is-hidden]=\"!term\"\n (click)=\"term = ''; filterResults();\"\n >\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </th>\n <th>Original</th>\n <th>Recalculated</th>\n <th *ngIf=\"originalValues?.length\">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 colspan=\"5\">\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 <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\">\n <td class=\"width-auto\" [attr.title]=\"blankNode.term.name\">\n <a class=\"is-inline-block is-align-top pr-2 open-node\"\n (click)=\"blankNode.isOpen = !blankNode.isOpen\"\n *ngIf=\"blankNode.canOpen\"\n >\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\" [node]=\"blankNode.term\">\n <span class=\"is-nowrap has-text-ellipsis\">{{blankNode.term.name}}</span>\n </he-node-link>\n </td>\n <td>\n <span>{{blankNode.original | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notUpdated\">\n {{blankNode.recalculated | precision:3 | default:'-'}}\n </span>\n </td>\n <td *ngIf=\"originalValues?.length\" class=\"is-nowrap\">\n <he-blank-node-value-delta *ngIf=\"blankNode.isRecalculated\"\n [value]=\"blankNode.recalculated\"\n [originalValue]=\"blankNode.original\"\n ></he-blank-node-value-delta>\n </td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: {blankNode: blankNode}\"></ng-container>\n </tr>\n\n <ng-container *ngIf=\"blankNode.keys?.length\">\n <tr\n *ngFor=\"let key of blankNode.keys\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"blankNode.subValues?.length\"\n >\n <td class=\"width-auto\">\n <div class=\"pl-3 has-text-left\">\n <span class=\"pr-1 is-align-top\">Field:</span>\n <a class=\"is-inline-block\" *ngIf=\"blankNode.type\"\n [href]=\"baseUrl + '/schema/' + blankNode.type + '#' + key\" target=\"_blank\" [title]=\"key\"\n >\n <span class=\"is-nowrap has-text-ellipsis\">{{key}}</span>\n </a>\n <span class=\"is-inline-block is-align-top\" *ngIf=\"!blankNode.type\">{{key}}</span>\n </div>\n </td>\n <td [attr.colspan]=\"originalValues?.length ? 3 : 2\"></td>\n <td class=\"blank-node-index-key\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode: blankNode, methodId: key}\"></ng-container>\n </td>\n <td *ngIf=\"methodModelsCount > 1\" [attr.colspan]=\"methodModelsCount - 1\"></td>\n </tr>\n </ng-container>\n\n <tr\n *ngFor=\"let subValue of blankNode.subValues\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n >\n <td>\n <div class=\"pl-3 has-text-left\">\n <div class=\"is-inline-block is-nowrap has-text-ellipsis\">\n <span class=\"is-align-top\">{{subValue.key | keyToLabel}}</span>\n <ng-container *ngIf=\"subValue.value\">\n <span class=\"pr-1 is-align-top\">:</span>\n <ng-container [ngSwitch]=\"subValue.key\">\n <span *ngSwitchCase=\"'backgroundData'\">{{subValue.value | keyToLabel}}</span>\n <ng-container *ngSwitchDefault>\n <he-node-link class=\"is-inline-block\" [node]=\"{'@type':'Term','@id':subValue.value}\">\n <span class=\"is-nowrap has-text-ellipsis\">{{subValue.value | keyToLabel}}</span>\n </he-node-link>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </td>\n <td [attr.colspan]=\"originalValues?.length ? 3 : 2\"></td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: {blankNode: blankNode, subValue: subValue}\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\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\"\n (click)=\"showLegend = !showLegend\"\n >\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 <li\n class=\"has-text-{{logColor[status.value]}}\"\n *ngFor=\"let status of LogStatus | keys\"\n >\n <fa-icon [icon]=\"logIcon[status.value]\"></fa-icon>\n <span class=\"pl-1\">{{status.value}}</span>\n </li>\n </ul>\n </div>\n <div class=\"column has-text-right\" *ngIf=\"filteredType\">\n <label class=\"is-inline-block checkbox\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"onlyWithData\"\n (change)=\"filterResults()\"\n >\n <span class=\"ml-2\">Show only recalculated {{filteredType | pluralize}}</span>\n </label>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #blankNodeModels let-blankNode=\"blankNode\" let-subValue=\"subValue\">\n <td class=\"blank-node-index-{{i}}\" *ngFor=\"let c of methodModelsCount | times; let i = index\">\n <ng-container *ngIf=\"validSubValue(blankNode, i, subValue)\">\n <ng-container *ngIf=\"getMethodIdAt(blankNode, i, subValue); let methodId\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode: blankNode, methodId: methodId}\"></ng-container>\n </ng-container>\n </ng-container>\n </td>\n</ng-template>\n\n<ng-template #blankNodeModel let-blankNode=\"blankNode\" let-methodId=\"methodId\">\n <span\n [class.trigger-popover]=\"hasLogDetails(blankNode, methodId)\"\n [ngbPopover]=\"logDetails\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"hasLogDetails(blankNode, methodId) ? togglePopover(p, { log: blankNode.logs[methodId] }) : null\"\n >\n <span class=\"is-capitalized\">{{methodName(blankNode, methodId)}}</span>\n <span class=\"pl-1\" *ngIf=\"hasLog(blankNode, methodId) && blankNode.logs[methodId].methodTier\">[{{blankNode.logs[methodId].methodTier}}]</span>\n <span class=\"pl-1 has-text-{{logColor[logStatus(blankNode, methodId)]}}\">\n <fa-icon [icon]=\"logIcon[logStatus(blankNode, methodId)]\"></fa-icon>\n </span>\n </span>\n</ng-template>\n\n<ng-template #notUpdated>\n <span>not updated</span>\n</ng-template>\n\n<ng-template #logDetails let-log=\"log\">\n <ng-container *ngIf=\"log.requirements\">\n <p *ngFor=\"let key of log.requirements | keys\" class=\"has-text-{{requirementColor(key.value)}}\">\n {{key.key}}: {{key.value}}\n </p>\n </ng-container>\n <ng-container *ngIf=\"log.logs\">\n <p *ngFor=\"let key of log.logs | keys\">\n {{key.key}}: {{key.value}}\n </p>\n </ng-container>\n <ng-container *ngIf=\"log.missingLookups?.length\">\n <p class=\"mt-2\">Missing lookups:</p>\n\n <div class=\"table-container data-table-container\">\n <table class=\"table is-fullwidth mb-0\">\n <thead class=\"has-background-black\">\n <tr>\n <th>\n <span class=\"has-text-white\">Filename</span>\n </th>\n <th>\n <span class=\"has-text-white\">Column Title</span>\n </th>\n <th>\n <span class=\"has-text-white\">Row (term.id)</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"has-background-black has-text-white\">\n <tr *ngFor=\"let data of log.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 </ng-container>\n</ng-template>\n", styles: [":host{display:block}table.data-table th:nth-child(2),table.data-table td:nth-child(2){min-width:60px}table.data-table th:nth-child(3),table.data-table td:nth-child(3){min-width:100px}table.data-table tr.has-sub-rows td{border-bottom-style:dotted}table.data-table td he-node-link{width:190px}table.data-table td .open-node+he-node-link{width:170px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "times": TimesPipe, "default": DefaultPipe, "precision": PrecisionPipe, "keyToLabel": KeyToLabelPipe, "keys": KeysPipe, "pluralize": PluralizePipe } });
|
|
5614
|
+
NodeLogsModelsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: { nodeType: "nodeType", nodeKey: "nodeKey", logsUrl: "logsUrl", originalValues: "originalValues", recalculatedValues: "recalculatedValues", terms: "terms", logs: "logs", filteredType: "filteredType" }, ngImport: i0__namespace, 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 <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table\">\n <thead>\n <tr>\n <th class=\"width-auto\">\n <div class=\"field\">\n <div class=\"control is-expanded has-icons-right\">\n <input class=\"input search-input is-small\"\n [(ngModel)]=\"term\" name=\"term\"\n placeholder=\"Filter by name\"\n [editable]=\"false\"\n [ngbTypeahead]=\"suggestTerm\"\n (selectItem)=\"filterResults()\"\n >\n <a class=\"icon is-small is-right\"\n [class.is-hidden]=\"!term\"\n (click)=\"term = ''; filterResults();\"\n >\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </th>\n <th>Original</th>\n <th>Recalculated</th>\n <th *ngIf=\"showOriginalValue\">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 colspan=\"5\">\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 <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\">\n <td class=\"width-auto\" [attr.title]=\"blankNode.term.name\">\n <a class=\"is-inline-block is-align-top pr-2 open-node\"\n (click)=\"blankNode.isOpen = !blankNode.isOpen\"\n *ngIf=\"blankNode.canOpen\"\n >\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\" [node]=\"blankNode.term\">\n <span class=\"is-nowrap has-text-ellipsis\">{{blankNode.term.name}}</span>\n </he-node-link>\n </td>\n <td>\n <span>{{blankNode.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notUpdated\">\n {{blankNode.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td *ngIf=\"showOriginalValue\" class=\"is-nowrap\">\n <he-blank-node-value-delta *ngIf=\"blankNode.isRecalculated\"\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"blankNode.originalValue\"\n ></he-blank-node-value-delta>\n </td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: {blankNode: blankNode}\"></ng-container>\n </tr>\n\n <ng-container *ngIf=\"blankNode.keys?.length\">\n <tr\n *ngFor=\"let subValue of blankNode.keys\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"blankNode.subValues?.length\"\n >\n <td class=\"width-auto has-text-left\">\n <span class=\"is-inline-block is-align-top pl-3 pr-1 field-node\">Field:</span>\n\n <a class=\"is-inline-block\" *ngIf=\"blankNode.type\"\n [href]=\"baseUrl + '/schema/' + blankNode.type + '#' + subValue.key\" target=\"_blank\" [title]=\"subValue.key\"\n >\n <span class=\"is-nowrap has-text-ellipsis\">{{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=\"showOriginalValue\">\n <span *ngIf=\"subValue.originalValue !== null\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.recalculatedValue !== null\">\n {{subValue.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td></td>\n <td class=\"blank-node-index-key\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:subValue.key, logs:getLogs(blankNode, subValue.key)}\"></ng-container>\n </td>\n <td *ngIf=\"methodModelsCount > 1\" [attr.colspan]=\"methodModelsCount - 1\"></td>\n </tr>\n </ng-container>\n\n <tr\n *ngFor=\"let subValue of blankNode.subValues\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n >\n <td class=\"width-auto has-text-left\">\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 *ngSwitchDefault class=\"is-block pl-4\" [node]=\"{'@type':'Term','@id':subValue.id}\" [attr.title]=\"subValue.id | keyToLabel\">\n <span class=\"is-nowrap has-text-ellipsis\">{{subValue.id | keyToLabel}}</span>\n </he-node-link>\n </ng-container>\n </ng-container>\n </td>\n <td *ngIf=\"showOriginalValue\">\n <span *ngIf=\"subValue.originalValue !== null\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.recalculatedValue !== null\">\n {{subValue.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td></td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: {blankNode: blankNode, subValue: subValue}\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\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\"\n (click)=\"showLegend = !showLegend\"\n >\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 <li\n class=\"has-text-{{logColor[status.value]}}\"\n *ngFor=\"let status of LogStatus | keys\"\n >\n <fa-icon [icon]=\"logIcon[status.value]\"></fa-icon>\n <span class=\"pl-1\">{{status.value}}</span>\n </li>\n </ul>\n </div>\n <div class=\"column has-text-right\" *ngIf=\"filteredType\">\n <label class=\"is-inline-block checkbox\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"onlyWithData\"\n (change)=\"filterResults()\"\n >\n <span class=\"ml-2\">Show only recalculated {{filteredType | pluralize}}</span>\n </label>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #blankNodeModels let-blankNode=\"blankNode\" let-subValue=\"subValue\">\n <td class=\"blank-node-index-{{i}}\" *ngFor=\"let c of methodModelsCount | times; let i = index\">\n <ng-container *ngIf=\"validSubValue(blankNode, i, subValue)\">\n <ng-container *ngIf=\"getMethodIdAt(blankNode, i, subValue); let methodId\">\n <ng-template #modelSerie>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:methodId, subValue:subValue, logs:getLogs(blankNode, methodId, subValue)}\"></ng-container>\n </ng-template>\n <div *ngIf=\"methodId | isArray; else modelSerie\">\n <p *ngFor=\"let value of methodId\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:value, subValue:subValue, logs:getLogs(blankNode, methodId, subValue)}\"></ng-container>\n </p>\n </div>\n </ng-container>\n </ng-container>\n </td>\n</ng-template>\n\n<ng-template #blankNodeModel let-blankNode=\"blankNode\" let-methodId=\"methodId\" let-subValue=\"subValue\" let-logs=\"logs\">\n <span\n [class.trigger-popover]=\"hasLogDetails(blankNode, methodId, subValue)\"\n [ngbPopover]=\"logDetails\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"hasLogDetails(blankNode, methodId, subValue) ? togglePopover(p, { logs }) : null\"\n >\n <span class=\"is-capitalized\">{{methodName(blankNode, methodId, subValue)}}</span>\n <span class=\"pl-1\" *ngIf=\"hasLog(logs) && logs?.methodTier\">[{{logs.methodTier}}]</span>\n <span class=\"pl-1 has-text-{{logColor[logStatus(blankNode, methodId, subValue)]}}\">\n <fa-icon [icon]=\"logIcon[logStatus(blankNode, methodId, subValue)]\"></fa-icon>\n </span>\n </span>\n</ng-template>\n\n<ng-template #notUpdated>\n <span>not updated</span>\n</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <ng-container *ngIf=\"logs.requirements\">\n <p class=\"is-requirement\" *ngFor=\"let key of requirementKeys(logs.requirements)\" class=\"has-text-{{requirementColor(logs.requirements[key])}}\">\n {{key}}: {{logs.requirements[key]}}\n </p>\n </ng-container>\n <ng-container *ngIf=\"logs.logs\">\n <p class=\"is-log\" *ngFor=\"let key of logs.logs | keys\">\n {{key.key}}: {{key.value}}\n </p>\n </ng-container>\n <ng-container *ngIf=\"logs.missingLookups?.length\">\n <p class=\"mt-2\">Missing lookups:</p>\n\n <div class=\"table-container data-table-container\">\n <table class=\"table is-fullwidth mb-0\">\n <thead class=\"has-background-black\">\n <tr>\n <th>\n <span class=\"has-text-white\">Filename</span>\n </th>\n <th>\n <span class=\"has-text-white\">Column Title</span>\n </th>\n <th>\n <span class=\"has-text-white\">Row (term.id)</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"has-background-black 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 </ng-container>\n</ng-template>\n", styles: [":host{display:block}table.data-table th:nth-child(2),table.data-table td:nth-child(2){min-width:60px}table.data-table th:nth-child(3),table.data-table td:nth-child(3){min-width:100px}table.data-table tr.has-sub-rows td{border-bottom-style:dotted}table.data-table td he-node-link{width:190px}table.data-table td .open-node+he-node-link{width:170px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "times": TimesPipe, "default": DefaultPipe, "precision": PrecisionPipe, "keyToLabel": KeyToLabelPipe, "keys": KeysPipe, "pluralize": PluralizePipe, "isArray": IsArrayPipe } });
|
|
5496
5615
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeLogsModelsComponent, decorators: [{
|
|
5497
5616
|
type: i0.Component,
|
|
5498
5617
|
args: [{
|
|
@@ -5784,7 +5903,7 @@
|
|
|
5784
5903
|
return CyclesActivityComponent;
|
|
5785
5904
|
}());
|
|
5786
5905
|
CyclesActivityComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesActivityComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5787
|
-
CyclesActivityComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesActivityComponent, selector: "he-cycles-activity", inputs: { originalValues: "originalValues", cycles: "cycles", selected: "selected", dataState: "dataState", enableCompare: "enableCompare" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"inputs.length || products.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && cycles.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{inputs.length + products.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngFor=\"let product of products\"\n [attr.title]=\"product.value.term.name\"\n >\n <he-node-link [node]=\"product.value.term\">\n <span>{{product.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n <th *ngFor=\"let input of inputs\"\n [attr.title]=\"input.value.term.name\"\n >\n <he-node-link [node]=\"input.value.term\">\n <span>{{input.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th>\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let product of products\"\n [attr.title]=\"product.value.term.units\"\n >{{product.value.term.units}}</th>\n <th *ngFor=\"let input of inputs\"\n [attr.title]=\"input.value.term.units\"\n >{{input.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(cycle)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td>\n <he-cycles-functional-unit-measure [cycle]=\"cycle\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let product of products\">\n <span *ngIf=\"product.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: product.value.values[cycle['@id']], cycle: cycle, key: 'products' })\"\n >\n <span pointer>{{propertyValue(product.value.values[cycle['@id']].value, product.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"product.value.values[cycle['@id']].
|
|
5906
|
+
CyclesActivityComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesActivityComponent, selector: "he-cycles-activity", inputs: { originalValues: "originalValues", cycles: "cycles", selected: "selected", dataState: "dataState", enableCompare: "enableCompare" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"inputs.length || products.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && cycles.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{inputs.length + products.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngFor=\"let product of products\"\n [attr.title]=\"product.value.term.name\"\n >\n <he-node-link [node]=\"product.value.term\">\n <span>{{product.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n <th *ngFor=\"let input of inputs\"\n [attr.title]=\"input.value.term.name\"\n >\n <he-node-link [node]=\"input.value.term\">\n <span>{{input.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th>\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let product of products\"\n [attr.title]=\"product.value.term.units\"\n >{{product.value.term.units}}</th>\n <th *ngFor=\"let input of inputs\"\n [attr.title]=\"input.value.term.units\"\n >{{input.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(cycle)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td>\n <he-cycles-functional-unit-measure [cycle]=\"cycle\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let product of products\">\n <span *ngIf=\"product.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: product.value.values[cycle['@id']], cycle: cycle, key: 'products' })\"\n >\n <span pointer>{{propertyValue(product.value.values[cycle['@id']].value, product.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"product.value.values[cycle['@id']].node\"\n key=\"value\"\n ></he-blank-node-state>\n </span>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let input of inputs\">\n <span *ngIf=\"input.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: input.value.values[cycle['@id']], cycle: cycle, key: 'inputs' })\"\n >\n <span pointer>{{propertyValue(input.value.values[cycle['@id']].value, input.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"input.value.values[cycle['@id']].node\"\n key=\"value\"\n ></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </div>\n\n <he-cycles-activity-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [original]=\"originalValues[0]\"\n [recalculated]=\"cycles[0]\"\n ></he-cycles-activity-logs>\n</ng-container>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"cycles\" filename=\"cycle-inputs-products.csv\" [isUpload]=\"false\"\n [headerKeys]=\"['cycle.id', 'cycle.@id', 'cycle.inputs.', 'cycle.products.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No activity data</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><b>{{node.name}}</b></p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted", "showUnchanged"] }, { type: CyclesActivityLogsComponent, selector: "he-cycles-activity-logs", inputs: ["original", "recalculated"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
5788
5907
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesActivityComponent, decorators: [{
|
|
5789
5908
|
type: i0.Component,
|
|
5790
5909
|
args: [{
|
|
@@ -6077,7 +6196,7 @@
|
|
|
6077
6196
|
return CyclesEmissionsComponent;
|
|
6078
6197
|
}());
|
|
6079
6198
|
CyclesEmissionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesEmissionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6080
|
-
CyclesEmissionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesEmissionsComponent, selector: "he-cycles-emissions", inputs: { originalValues: "originalValues", cycles: "cycles", selected: "selected", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"emissions.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"cycles.length > 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.chart\" (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>Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && cycles.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{emissions.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngFor=\"let emission of emissions\"\n [attr.title]=\"emission.value.term.name\"\n >\n <he-node-link [node]=\"emission.value.term\">\n <span>{{emission.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th>\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let emission of emissions\"\n [attr.title]=\"emission.value.term.units\"\n >{{emission.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(cycle)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td>\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let emission of emissions\">\n <span *ngIf=\"emission.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: emission.value.values[cycle['@id']], cycle: cycle, key: 'emissions' })\"\n >\n <span pointer>{{propertyValue(emission.value.values[cycle['@id']].value, emission.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"emission.value.values[cycle['@id']].
|
|
6199
|
+
CyclesEmissionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesEmissionsComponent, selector: "he-cycles-emissions", inputs: { originalValues: "originalValues", cycles: "cycles", selected: "selected", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"emissions.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"cycles.length > 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.chart\" (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>Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && cycles.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{emissions.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngFor=\"let emission of emissions\"\n [attr.title]=\"emission.value.term.name\"\n >\n <he-node-link [node]=\"emission.value.term\">\n <span>{{emission.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th>\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let emission of emissions\"\n [attr.title]=\"emission.value.term.units\"\n >{{emission.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(cycle)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td>\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let emission of emissions\">\n <span *ngIf=\"emission.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: emission.value.values[cycle['@id']], cycle: cycle, key: 'emissions' })\"\n >\n <span pointer>{{propertyValue(emission.value.values[cycle['@id']].value, emission.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"emission.value.values[cycle['@id']].node\"\n key=\"value\"\n ></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </div>\n\n <he-cycles-emissions-chart *ngIf=\"cycles.length > 1\" [class.is-hidden]=\"selectedView !== View.chart\"\n [cycles]=\"cycles\" [selected]=\"selected\"\n ></he-cycles-emissions-chart>\n\n <he-cycles-emissions-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [cycle]=\"cycles[0]\"\n [originalValues]=\"originalValues[0]?.emissions\"\n [recalculatedValues]=\"cycles[0]?.emissions\"\n ></he-cycles-emissions-logs>\n</ng-container>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"cycles\" filename=\"cycle-emissions.csv\" [isUpload]=\"false\"\n [headerKeys]=\"['cycle.id', 'cycle.@id', 'cycle.emissions.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No data</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><b>{{node.name}}</b></p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted", "showUnchanged"] }, { type: CyclesEmissionsChartComponent, selector: "he-cycles-emissions-chart", inputs: ["cycles", "selected"] }, { type: CyclesEmissionsLogsComponent, selector: "he-cycles-emissions-logs", inputs: ["cycle", "originalValues", "recalculatedValues"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
6081
6200
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesEmissionsComponent, decorators: [{
|
|
6082
6201
|
type: i0.Component,
|
|
6083
6202
|
args: [{
|
|
@@ -6197,7 +6316,7 @@
|
|
|
6197
6316
|
return CyclesPracticesComponent;
|
|
6198
6317
|
}());
|
|
6199
6318
|
CyclesPracticesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6200
|
-
CyclesPracticesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesComponent, selector: "he-cycles-practices", inputs: { originalValues: "originalValues", cycles: "cycles", selected: "selected", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"practices.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && cycles.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{practices.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngFor=\"let practice of practices\"\n [attr.title]=\"practice.value.term.name\"\n >\n <he-node-link [node]=\"practice.value.term\">\n <span>{{practice.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th>\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\"\n [attr.title]=\"practice.value.term.units\"\n >{{practice.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(cycle)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td>\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 *ngIf=\"practice.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: practice.value.values[cycle['@id']], cycle: cycle, key: 'practices' })\"\n >\n <span pointer>{{propertyValue(practice.value.values[cycle['@id']].value, practice.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"practice.value.values[cycle['@id']].
|
|
6319
|
+
CyclesPracticesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesComponent, selector: "he-cycles-practices", inputs: { originalValues: "originalValues", cycles: "cycles", selected: "selected", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"practices.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && cycles.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{practices.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th></th>\n <th *ngFor=\"let practice of practices\"\n [attr.title]=\"practice.value.term.name\"\n >\n <he-node-link [node]=\"practice.value.term\">\n <span>{{practice.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th>\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\"\n [attr.title]=\"practice.value.term.units\"\n >{{practice.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(cycle)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td>\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 *ngIf=\"practice.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: practice.value.values[cycle['@id']], cycle: cycle, key: 'practices' })\"\n >\n <span pointer>{{propertyValue(practice.value.values[cycle['@id']].value, practice.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"practice.value.values[cycle['@id']].node\"\n key=\"value\"\n ></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </div>\n\n <he-cycles-practices-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [cycle]=\"cycles[0]\"\n [originalValues]=\"originalValues[0]?.practices\"\n [recalculatedValues]=\"cycles[0]?.practices\"\n ></he-cycles-practices-logs>\n</ng-container>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"cycles\" filename=\"cycle-practices.csv\" [isUpload]=\"false\"\n [headerKeys]=\"['cycle.id', 'cycle.@id', 'cycle.practices.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No data</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><b>{{node.name}}</b></p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted", "showUnchanged"] }, { type: CyclesPracticesLogsComponent, selector: "he-cycles-practices-logs", inputs: ["cycle", "originalValues", "recalculatedValues"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
6201
6320
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, decorators: [{
|
|
6202
6321
|
type: i0.Component,
|
|
6203
6322
|
args: [{
|
|
@@ -7751,7 +7870,7 @@
|
|
|
7751
7870
|
return SitesMeasurementsComponent;
|
|
7752
7871
|
}());
|
|
7753
7872
|
SitesMeasurementsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7754
|
-
SitesMeasurementsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsComponent, selector: "he-sites-measurements", inputs: { originalValues: "originalValues", sites: "sites", selected: "selected", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"measurements.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && sites.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{measurements.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th *ngFor=\"let measurement of measurements\"\n [attr.title]=\"measurement.value.term.name\"\n >\n <he-node-link [node]=\"measurement.value.term\">\n <span>{{measurement.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th *ngFor=\"let measurement of measurements\"\n [attr.title]=\"measurement.value.term.units\"\n >{{measurement.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let site of sites; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(site)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(site)\">\n <he-node-link [node]=\"site\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(site)}}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let measurement of measurements\">\n <span *ngIf=\"measurement.value.values[site['@id']]\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: measurement.value.values[site['@id']], site: site, key: 'measurements' })\"\n >\n <span pointer>{{measurementValue(measurement.value.values[site['@id']], measurement.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"measurement.value.values[site['@id']].
|
|
7873
|
+
SitesMeasurementsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsComponent, selector: "he-sites-measurements", inputs: { originalValues: "originalValues", sites: "sites", selected: "selected", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"measurements.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && sites.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{measurements.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th *ngFor=\"let measurement of measurements\"\n [attr.title]=\"measurement.value.term.name\"\n >\n <he-node-link [node]=\"measurement.value.term\">\n <span>{{measurement.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th *ngFor=\"let measurement of measurements\"\n [attr.title]=\"measurement.value.term.units\"\n >{{measurement.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let site of sites; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(site)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(site)\">\n <he-node-link [node]=\"site\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(site)}}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let measurement of measurements\">\n <span *ngIf=\"measurement.value.values[site['@id']]\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: measurement.value.values[site['@id']], site: site, key: 'measurements' })\"\n >\n <span pointer>{{measurementValue(measurement.value.values[site['@id']], measurement.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"measurement.value.values[site['@id']].node\"\n key=\"value\"\n ></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 </div>\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 </div>\n\n <he-sites-measurements-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [site]=\"sites[0]\"\n [originalValues]=\"originalValues[0].measurements\"\n [recalculatedValues]=\"sites[0].measurements\"\n ></he-sites-measurements-logs>\n</ng-container>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"sites\" filename=\"site-measurements.csv\" [isUpload]=\"false\"\n [headerKeys]=\"['site.id', 'site.@id', 'site.measurements.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No data</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><b>{{node.name}}</b></p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted", "showUnchanged"] }, { type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: ["site", "originalValues", "recalculatedValues"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
7755
7874
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, decorators: [{
|
|
7756
7875
|
type: i0.Component,
|
|
7757
7876
|
args: [{
|
|
@@ -8340,24 +8459,30 @@
|
|
|
8340
8459
|
var parseLog = function (data) { return ({
|
|
8341
8460
|
indicator: data['key/term'],
|
|
8342
8461
|
emission: data.node,
|
|
8462
|
+
coefficient: data.coefficient,
|
|
8343
8463
|
value: +data.value * +data.coefficient
|
|
8344
8464
|
}); };
|
|
8345
8465
|
var filterTermTypes = [
|
|
8346
8466
|
schema.TermTermType.emission,
|
|
8347
8467
|
schema.TermTermType.characterisedIndicator
|
|
8348
8468
|
];
|
|
8349
|
-
var toCsv = function (logs) { return __spreadArray([
|
|
8469
|
+
var toCsv = function (logs, emissions) { return __spreadArray([
|
|
8350
8470
|
[
|
|
8351
|
-
'
|
|
8352
|
-
'
|
|
8353
|
-
'Value'
|
|
8471
|
+
'Model',
|
|
8472
|
+
'Impact',
|
|
8473
|
+
'Value',
|
|
8474
|
+
'Inputs',
|
|
8475
|
+
'Inputs value'
|
|
8354
8476
|
].join(',')
|
|
8355
8477
|
], __read(logs
|
|
8356
8478
|
.sort(function (a, b) { return a.indicator.localeCompare(b.indicator); })
|
|
8357
|
-
.
|
|
8358
|
-
var indicator = _d.indicator, emission = _d.emission, value = _d.value;
|
|
8359
|
-
return [
|
|
8360
|
-
|
|
8479
|
+
.flatMap(function (_d) {
|
|
8480
|
+
var indicator = _d.indicator, emission = _d.emission, value = _d.value, coefficient = _d.coefficient;
|
|
8481
|
+
return __spreadArray([
|
|
8482
|
+
[indicator, emission, value, '', '']
|
|
8483
|
+
], __read((emissions.filter(function (v) { var _a; return v.term['@id'] === emission && ((_a = v.inputs) === null || _a === void 0 ? void 0 : _a.length); }).map(function (v) { return [indicator, emission, '', v.inputs.map(function (i) { return i['@id']; }).join(';'), v.value * coefficient]; }))));
|
|
8484
|
+
})
|
|
8485
|
+
.map(function (v) { return v.join(','); }))).join('\n'); };
|
|
8361
8486
|
var ImpactAssessmentsIndicatorBreakdownChartComponent = /** @class */ (function () {
|
|
8362
8487
|
function ImpactAssessmentsIndicatorBreakdownChartComponent(domSanitizer, searchService, nodeService) {
|
|
8363
8488
|
this.domSanitizer = domSanitizer;
|
|
@@ -8394,7 +8519,7 @@
|
|
|
8394
8519
|
}), operators.toArray()).toPromise()];
|
|
8395
8520
|
case 1:
|
|
8396
8521
|
_d.logs = (_e.sent());
|
|
8397
|
-
this.csvContent = this.domSanitizer.bypassSecurityTrustResourceUrl("data:text/html;charset=utf-8," + encodeURIComponent(toCsv(this.logs)));
|
|
8522
|
+
this.csvContent = this.domSanitizer.bypassSecurityTrustResourceUrl("data:text/html;charset=utf-8," + encodeURIComponent(toCsv(this.logs, this.impactAssessment.emissionsResourceUse)));
|
|
8398
8523
|
return [4 /*yield*/, this.searchService.search({
|
|
8399
8524
|
fields: ['@type', '@id', 'name'],
|
|
8400
8525
|
limit: 1000,
|
|
@@ -8872,7 +8997,7 @@
|
|
|
8872
8997
|
return ImpactAssessmentsProductsComponent;
|
|
8873
8998
|
}());
|
|
8874
8999
|
ImpactAssessmentsProductsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ImpactAssessmentsProductsComponent, deps: [{ token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
8875
|
-
ImpactAssessmentsProductsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ImpactAssessmentsProductsComponent, selector: "he-impact-assessments-products", inputs: { cycles: "cycles", impactAssessments: "impactAssessments", selected: "selected", key: "key", dataState: "dataState", filterTermTypes: "filterTermTypes", enableFilterMethodModel: "enableFilterMethodModel" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"indicators.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"impactAssessments.length > 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.chart\" (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>Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"enableBreakdown\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.breakdown\" (click)=\"selectedView = View.breakdown\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Breakdown view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && impactAssessments.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"showRecalculationLogs()\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{indicators.length + 1}}\">\n <thead>\n <tr>\n <th class=\"width-auto\">\n <div class=\"select is-small\" *ngIf=\"enableFilterMethodModel\">\n <select name=\"selectedMethodModel\"\n (change)=\"updateImpacts()\" [(ngModel)]=\"selectedMethodModel\"\n >\n <option [ngValue]=\"undefined\">Filter Model</option>\n <option *ngFor=\"let term of methodModels\" [ngValue]=\"term\">{{term.name}}</option>\n </select>\n </div>\n </th>\n <th></th>\n <th *ngFor=\"let indicator of indicators\"\n [attr.title]=\"indicator.value.term.name\"\n >\n <he-node-link [node]=\"indicator.value.term\">\n <span>{{indicator.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\">\n <a [href]=\"baseUrl + '/schema/ImpactAssessment#functionalUnit'\" target=\"_blank\">Functional unit:</a>\n <span class=\"pl-1\">1 kg</span>\n </th>\n <th>Product</th>\n <th *ngFor=\"let indicator of indicators\"\n [attr.title]=\"indicator.value.term.units\"\n >{{indicator.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let impactAssessment of impactAssessments; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(impactAssessment)\">\n <td class=\"width-auto\" [attr.title]=\"impactName(impactAssessment)\">\n <he-node-link [node]=\"impactAssessment\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{impactName(impactAssessment)}}</span>\n </he-node-link>\n </td>\n <td [attr.title]=\"impactAssessment.product?.name\">\n <he-node-link *ngIf=\"impactAssessment.product\" [node]=\"impactAssessment.product\">\n <span>{{impactAssessment.product.name | ellipsis:30}}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let indicator of indicators\">\n <span *ngIf=\"indicator.value.values[impactAssessment['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: indicator.value.values[impactAssessment['@id']], impactAssessment: impactAssessment, key: key })\"\n >\n <span pointer>{{propertyValue(indicator.value.values[impactAssessment['@id']].value, indicator.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"indicator.value.values[impactAssessment['@id']].nodes[0]\"\n key=\"value\"\n [state]=\"impactAssessment.aggregated ? 'aggregated' : undefined\"\n ></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </div>\n\n <he-impact-assessments-indicator-breakdown-chart *ngIf=\"selectedView === View.breakdown\"\n [impactAssessment]=\"impactAssessments[0]\"\n [indicators]=\"impactAssessments[0][key]\"\n ></he-impact-assessments-indicator-breakdown-chart>\n\n <he-impact-assessments-indicators-chart *ngIf=\"impactAssessments.length > 1\" [class.is-hidden]=\"selectedView !== View.chart\"\n [key]=\"key\"\n [impactAssessments]=\"impactAssessments\" [selected]=\"selected\"\n [filterTermTypes]=\"filterTermTypes\"\n ></he-impact-assessments-indicators-chart>\n\n <he-impact-assessments-products-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [key]=\"key\"\n [impactAssessment]=\"impactAssessments[0]\"\n [filterTermTypes]=\"filterTermTypes\"\n [originalValues]=\"originalValues[0][key]\"\n [recalculatedValues]=\"impactAssessments[0][key]\"\n ></he-impact-assessments-products-logs>\n</ng-container>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"impactAssessments\" [filename]=\"'impact-' + key + '.csv'\" [isUpload]=\"false\"\n [headerKeys]=\"['impactAssessment.id', 'impactAssessment.@id', 'impactAssessment.' + key + '.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No data</span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"impactAssessment\" let-data=\"data\" let-key=\"key\">\n <p *bindOnce=\"node\">\n <b>\n <span *ngIf=\"data.cycle\">{{cycleLabel(node.cycle)}}</span>\n <span *ngIf=\"!data.cycle\">{{data.name}}</span>\n </b>\n </p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n\n<ng-template #suggestion let-impact=\"result\" let-t=\"term\">\n <div class=\"is-block\">\n <ngb-highlight [result]=\"impact.name || impact.cycle.name\" [term]=\"t\"></ngb-highlight>\n </div>\n <div class=\"columns is-flex\">\n <div class=\"column\" *ngIf=\"impact.country\">\n <span class=\"pr-1 has-text-underline\">Country:</span>\n <span class=\"is-inline-flex\"><ngb-highlight [result]=\"impact.country.name\" [term]=\"t\"></ngb-highlight></span>\n </div>\n <div class=\"column\" *ngIf=\"impact.product\">\n <span class=\"pr-1 has-text-underline\">Product:</span>\n <span class=\"is-inline-flex\"><ngb-highlight [result]=\"impact.product.name\" [term]=\"t\"></ngb-highlight></span>\n </div>\n <div class=\"column\" *ngIf=\"impact.endDate\">\n <span class=\"pr-1 has-text-underline\">Date:</span>\n <span class=\"is-inline-flex\"><ngb-highlight [result]=\"impact.endDate\" [term]=\"t\"></ngb-highlight></span>\n </div>\n </div>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted", "showUnchanged"] }, { type: ImpactAssessmentsIndicatorBreakdownChartComponent, selector: "he-impact-assessments-indicator-breakdown-chart", inputs: ["impactAssessment", "indicators"] }, { type: ImpactAssessmentsIndicatorsChartComponent, selector: "he-impact-assessments-indicators-chart", inputs: ["impactAssessments", "selected", "key", "filterTermTypes"] }, { type: ImpactAssessmentsProductsLogsComponent, selector: "he-impact-assessments-products-logs", inputs: ["impactAssessment", "key", "filterTermTypes", "originalValues", "recalculatedValues"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }, { type: i10__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
9000
|
+
ImpactAssessmentsProductsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ImpactAssessmentsProductsComponent, selector: "he-impact-assessments-products", inputs: { cycles: "cycles", impactAssessments: "impactAssessments", selected: "selected", key: "key", dataState: "dataState", filterTermTypes: "filterTermTypes", enableFilterMethodModel: "enableFilterMethodModel" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"indicators.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"impactAssessments.length > 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.chart\" (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>Chart view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"enableBreakdown\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.breakdown\" (click)=\"selectedView = View.breakdown\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"chart-bar\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Breakdown view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && impactAssessments.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"showRecalculationLogs()\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>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 <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{indicators.length + 1}}\">\n <thead>\n <tr>\n <th class=\"width-auto\">\n <div class=\"select is-small\" *ngIf=\"enableFilterMethodModel\">\n <select name=\"selectedMethodModel\"\n (change)=\"updateImpacts()\" [(ngModel)]=\"selectedMethodModel\"\n >\n <option [ngValue]=\"undefined\">Filter Model</option>\n <option *ngFor=\"let term of methodModels\" [ngValue]=\"term\">{{term.name}}</option>\n </select>\n </div>\n </th>\n <th></th>\n <th></th>\n <th *ngFor=\"let indicator of indicators\"\n [attr.title]=\"indicator.value.term.name\"\n >\n <he-node-link [node]=\"indicator.value.term\">\n <span>{{indicator.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th>\n <a [href]=\"baseUrl + '/schema/ImpactAssessment#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th>\n <a [href]=\"baseUrl + '/schema/ImpactAssessment#product'\" target=\"_blank\">Product</a>\n </th>\n <th *ngFor=\"let indicator of indicators\"\n [attr.title]=\"indicator.value.term.units\"\n >{{indicator.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let impactAssessment of impactAssessments; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(impactAssessment)\">\n <td class=\"width-auto\" [attr.title]=\"impactName(impactAssessment)\">\n <he-node-link [node]=\"impactAssessment\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{impactName(impactAssessment)}}</span>\n </he-node-link>\n </td>\n <td>\n <span>1 {{impactAssessment.product.units}}</span>\n </td>\n <td [attr.title]=\"impactAssessment.product?.name\">\n <he-node-link *ngIf=\"impactAssessment.product\" [node]=\"impactAssessment.product\">\n <span>{{impactAssessment.product.name | ellipsis:30}}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let indicator of indicators\">\n <span *ngIf=\"indicator.value.values[impactAssessment['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: indicator.value.values[impactAssessment['@id']], impactAssessment: impactAssessment, key: key })\"\n >\n <span pointer>{{propertyValue(indicator.value.values[impactAssessment['@id']].value, indicator.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"indicator.value.values[impactAssessment['@id']].node\"\n key=\"value\"\n [state]=\"impactAssessment.aggregated ? 'aggregated' : undefined\"\n ></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </div>\n\n <he-impact-assessments-indicator-breakdown-chart *ngIf=\"selectedView === View.breakdown\"\n [impactAssessment]=\"impactAssessments[0]\"\n [indicators]=\"impactAssessments[0][key]\"\n ></he-impact-assessments-indicator-breakdown-chart>\n\n <he-impact-assessments-indicators-chart *ngIf=\"impactAssessments.length > 1\" [class.is-hidden]=\"selectedView !== View.chart\"\n [key]=\"key\"\n [impactAssessments]=\"impactAssessments\" [selected]=\"selected\"\n [filterTermTypes]=\"filterTermTypes\"\n ></he-impact-assessments-indicators-chart>\n\n <he-impact-assessments-products-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [key]=\"key\"\n [impactAssessment]=\"impactAssessments[0]\"\n [filterTermTypes]=\"filterTermTypes\"\n [originalValues]=\"originalValues[0][key]\"\n [recalculatedValues]=\"impactAssessments[0][key]\"\n ></he-impact-assessments-products-logs>\n</ng-container>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"impactAssessments\" [filename]=\"'impact-' + key + '.csv'\" [isUpload]=\"false\"\n [headerKeys]=\"['impactAssessment.id', 'impactAssessment.@id', 'impactAssessment.' + key + '.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No data</span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"impactAssessment\" let-data=\"data\" let-key=\"key\">\n <p *bindOnce=\"node\">\n <b>\n <span *ngIf=\"data.cycle\">{{cycleLabel(node.cycle)}}</span>\n <span *ngIf=\"!data.cycle\">{{data.name}}</span>\n </b>\n </p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n\n<ng-template #suggestion let-impact=\"result\" let-t=\"term\">\n <div class=\"is-block\">\n <ngb-highlight [result]=\"impact.name || impact.cycle.name\" [term]=\"t\"></ngb-highlight>\n </div>\n <div class=\"columns is-flex\">\n <div class=\"column\" *ngIf=\"impact.country\">\n <span class=\"pr-1 has-text-underline\">Country:</span>\n <span class=\"is-inline-flex\"><ngb-highlight [result]=\"impact.country.name\" [term]=\"t\"></ngb-highlight></span>\n </div>\n <div class=\"column\" *ngIf=\"impact.product\">\n <span class=\"pr-1 has-text-underline\">Product:</span>\n <span class=\"is-inline-flex\"><ngb-highlight [result]=\"impact.product.name\" [term]=\"t\"></ngb-highlight></span>\n </div>\n <div class=\"column\" *ngIf=\"impact.endDate\">\n <span class=\"pr-1 has-text-underline\">Date:</span>\n <span class=\"is-inline-flex\"><ngb-highlight [result]=\"impact.endDate\" [term]=\"t\"></ngb-highlight></span>\n </div>\n </div>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted", "showUnchanged"] }, { type: ImpactAssessmentsIndicatorBreakdownChartComponent, selector: "he-impact-assessments-indicator-breakdown-chart", inputs: ["impactAssessment", "indicators"] }, { type: ImpactAssessmentsIndicatorsChartComponent, selector: "he-impact-assessments-indicators-chart", inputs: ["impactAssessments", "selected", "key", "filterTermTypes"] }, { type: ImpactAssessmentsProductsLogsComponent, selector: "he-impact-assessments-products-logs", inputs: ["impactAssessment", "key", "filterTermTypes", "originalValues", "recalculatedValues"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }, { type: i10__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
8876
9001
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ImpactAssessmentsProductsComponent, decorators: [{
|
|
8877
9002
|
type: i0.Component,
|
|
8878
9003
|
args: [{
|
|
@@ -9031,6 +9156,7 @@
|
|
|
9031
9156
|
exports.ImpactAssessmentsIndicatorsChartComponent = ImpactAssessmentsIndicatorsChartComponent;
|
|
9032
9157
|
exports.ImpactAssessmentsProductsComponent = ImpactAssessmentsProductsComponent;
|
|
9033
9158
|
exports.ImpactAssessmentsProductsLogsComponent = ImpactAssessmentsProductsLogsComponent;
|
|
9159
|
+
exports.IsArrayPipe = IsArrayPipe;
|
|
9034
9160
|
exports.KeyToLabelPipe = KeyToLabelPipe;
|
|
9035
9161
|
exports.KeysPipe = KeysPipe;
|
|
9036
9162
|
exports.LinkKeyValueComponent = LinkKeyValueComponent;
|
|
@@ -9104,9 +9230,6 @@
|
|
|
9104
9230
|
exports.gitHome = gitHome;
|
|
9105
9231
|
exports.gitRawBaseUrl = gitRawBaseUrl;
|
|
9106
9232
|
exports.groupChanged = groupChanged;
|
|
9107
|
-
exports.groupNodesByTerm = groupNodesByTerm;
|
|
9108
|
-
exports.grouppedKeys = grouppedKeys;
|
|
9109
|
-
exports.grouppedValueKeys = grouppedValueKeys;
|
|
9110
9233
|
exports.handleAPIError = handleAPIError;
|
|
9111
9234
|
exports.hasError = hasError;
|
|
9112
9235
|
exports.hasWarning = hasWarning;
|