@hestia-earth/ui-components 0.2.8 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/bundles/hestia-earth-ui-components.umd.js +260 -156
  2. package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
  3. package/common/blank-node-state/blank-node-state.component.d.ts +1 -3
  4. package/common/maps-utils.d.ts +1 -1
  5. package/common/node-utils.d.ts +2 -1
  6. package/cycles/cycles-activity/cycles-activity.component.d.ts +6 -0
  7. package/cycles/cycles-emissions/cycles-emissions.component.d.ts +6 -0
  8. package/cycles/cycles-emissions-logs/cycles-emissions-logs.component.d.ts +2 -1
  9. package/cycles/cycles-practices/cycles-practices.component.d.ts +6 -0
  10. package/engine/engine.service.d.ts +9 -0
  11. package/esm2015/common/blank-node-state/blank-node-state.component.js +2 -25
  12. package/esm2015/common/maps-utils.js +12 -9
  13. package/esm2015/common/node-utils.js +3 -1
  14. package/esm2015/cycles/cycles-activity/cycles-activity.component.js +13 -5
  15. package/esm2015/cycles/cycles-activity-logs/cycles-activity-logs.component.js +1 -1
  16. package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +13 -5
  17. package/esm2015/cycles/cycles-emissions-logs/cycles-emissions-logs.component.js +3 -2
  18. package/esm2015/cycles/cycles-practices/cycles-practices.component.js +13 -5
  19. package/esm2015/cycles/cycles-practices-logs/cycles-practices-logs.component.js +1 -1
  20. package/esm2015/engine/engine.service.js +16 -3
  21. package/esm2015/files/files-error.model.js +6 -2
  22. package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +14 -13
  23. package/esm2015/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.js +2 -6
  24. package/esm2015/node/node-link/node-link.component.js +14 -3
  25. package/esm2015/node/node-logs-models/node-logs-models.component.js +62 -25
  26. package/esm2015/node/node-value-details/node-value-details.component.js +1 -1
  27. package/esm2015/sites/sites-maps/sites-maps.component.js +2 -7
  28. package/esm2015/sites/sites-measurements/sites-measurements.component.js +13 -5
  29. package/esm2015/sites/sites-measurements-logs/sites-measurements-logs.component.js +3 -2
  30. package/esm2015/sites/sites.model.js +13 -6
  31. package/fesm2015/hestia-earth-ui-components.js +171 -94
  32. package/fesm2015/hestia-earth-ui-components.js.map +1 -1
  33. package/impact-assessments/impact-assessments-products/impact-assessments-products.component.d.ts +6 -0
  34. package/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.d.ts +2 -3
  35. package/node/node-link/node-link.component.d.ts +3 -3
  36. package/node/node-logs-models/node-logs-models.component.d.ts +29 -11
  37. package/package.json +3 -3
  38. package/sites/sites-measurements/sites-measurements.component.d.ts +7 -1
  39. package/sites/sites-measurements-logs/sites-measurements-logs.component.d.ts +2 -1
  40. 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('random-material-color'), require('@hestia-earth/schema'), require('@hestia-earth/api'), require('@angular/platform-browser'), require('rxjs'), 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('@hestia-earth/glossary'), 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', 'random-material-color', '@hestia-earth/schema', '@hestia-earth/api', '@angular/platform-browser', 'rxjs', '@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', '@hestia-earth/glossary', '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.i11, global.ng.googleMaps, global.i1, global.freeRegularSvgIcons, global.freeSolidSvgIcons, global.randomMaterialColor, global.schema, global.api, global.ng.platformBrowser, global.rxjs, 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.glossary, global.ChartDataLabels));
5
- })(this, (function (exports, i0, i2, i1$1, i5, i11, i1$4, i1, freeRegularSvgIcons, freeSolidSvgIcons, randomMaterialColor, schema, api, i1$2, rxjs, utils, pluralize, operators, term, csvtojson, i1$3, delta, json2Csv, i6, schemaConvert, schemaUtils, jsondiffpatch, chart_js, moment, enGb, uuid$1, MarkerClusterer, glossary, ChartDataLabels) { 'use strict';
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('random-material-color'), require('@hestia-earth/schema'), require('@hestia-earth/api'), require('@angular/platform-browser'), require('rxjs'), require('@hestia-earth/utils'), require('pluralize'), require('@hestia-earth/utils/dist/term'), require('@hestia-earth/glossary'), require('rxjs/operators'), 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', 'random-material-color', '@hestia-earth/schema', '@hestia-earth/api', '@angular/platform-browser', 'rxjs', '@hestia-earth/utils', 'pluralize', '@hestia-earth/utils/dist/term', '@hestia-earth/glossary', 'rxjs/operators', '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.i11, global.ng.googleMaps, global.i1, global.freeRegularSvgIcons, global.freeSolidSvgIcons, global.randomMaterialColor, global.schema, global.api, global.ng.platformBrowser, global.rxjs, global.utils, global.pluralize, global.term, global.glossary, global.rxjs.operators, 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, i2, i1$1, i5, i11, i1$4, i1, freeRegularSvgIcons, freeSolidSvgIcons, randomMaterialColor, schema, api, i1$2, rxjs, utils, pluralize, term, glossary, operators, csvtojson, i1$3, delta, json2Csv, i6, 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
 
@@ -1091,6 +1091,7 @@
1091
1091
  }] });
1092
1092
 
1093
1093
  var get$5 = require('lodash.get');
1094
+ var isMethodModelAllowed = function (filterMethod) { return function (node) { var _a, _b; return ((_a = node.methodModel) === null || _a === void 0 ? void 0 : _a['@id']) === (filterMethod ? filterMethod['@id'] : glossary.getDefaultModeId((_b = node.term) === null || _b === void 0 ? void 0 : _b['@id'])); }; };
1094
1095
  var NodeKeyState;
1095
1096
  (function (NodeKeyState) {
1096
1097
  NodeKeyState["added"] = "added";
@@ -1104,8 +1105,8 @@
1104
1105
  node[state].includes(key))); };
1105
1106
  ;
1106
1107
  ;
1107
- var grouppedKeys = function (values) { return Object.entries(values).map(function (_a) {
1108
- var _b = __read(_a, 2), key = _b[0], value = _b[1];
1108
+ var grouppedKeys = function (values) { return Object.entries(values).map(function (_c) {
1109
+ var _d = __read(_c, 2), key = _d[0], value = _d[1];
1109
1110
  return ({ key: key, value: value });
1110
1111
  }); };
1111
1112
  var concatBlankNodeValue = function (value, newValue) {
@@ -1441,6 +1442,20 @@
1441
1442
  var term = _b.term;
1442
1443
  return term === termId;
1443
1444
  }); };
1445
+ var findMatchingModel = function (models, model) { return Object.keys(model).length > 0
1446
+ ? models.find(function (m) { return Object.entries(model).every(function (_b) {
1447
+ var _c = __read(_b, 2), key = _c[0], value = _c[1];
1448
+ return value === m[key];
1449
+ }); })
1450
+ : null; };
1451
+ var modelParams = function (node, includeTerm) {
1452
+ if (includeTerm === void 0) { includeTerm = true; }
1453
+ return filterParams(Object.assign({ model: 'methodModel' in node ? node === null || node === void 0 ? void 0 : node.methodModel['@id'] : undefined }, (includeTerm ? { term: 'term' in node ? node === null || node === void 0 ? void 0 : node.term['@id'] : undefined } : {})));
1454
+ };
1455
+ var modelKeyParams = function (node, key) { return filterParams({
1456
+ model: ((node === null || node === void 0 ? void 0 : node['@type']) || (node === null || node === void 0 ? void 0 : node.type) || '').toLowerCase(),
1457
+ modelKey: key
1458
+ }); };
1444
1459
  /**
1445
1460
  * Find models from the orchestrator configuration.
1446
1461
  *
@@ -1515,10 +1530,13 @@
1515
1530
  return this.models$.pipe(operators.take(1)).toPromise();
1516
1531
  };
1517
1532
  HeEngineService.prototype.model$ = function (model) {
1518
- return this.models$.pipe(operators.map(function (models) { return models.find(function (m) { return Object.entries(model).every(function (_b) {
1519
- var _c = __read(_b, 2), key = _c[0], value = _c[1];
1520
- return value === m[key];
1521
- }); }); }));
1533
+ return this.models$.pipe(operators.map(function (models) { return findMatchingModel(models, model); }));
1534
+ };
1535
+ HeEngineService.prototype.nodeModel$ = function (node, key) {
1536
+ var _this = this;
1537
+ return this.model$(modelParams(node)).pipe(
1538
+ // fallback to modelKey
1539
+ operators.mergeMap(function (value) { return !key || value ? rxjs.of(value) : _this.model$(modelKeyParams(node, key)); }));
1522
1540
  };
1523
1541
  HeEngineService.prototype.model = function (model) {
1524
1542
  return this.model$(model).pipe(operators.take(1)).toPromise();
@@ -1616,39 +1634,9 @@
1616
1634
  enumerable: false,
1617
1635
  configurable: true
1618
1636
  });
1619
- Object.defineProperty(BlankNodeStateComponent.prototype, "modelParams", {
1620
- get: function () {
1621
- var _a, _b;
1622
- return filterParams({
1623
- model: 'methodModel' in this.node ? (_a = this.node) === null || _a === void 0 ? void 0 : _a.methodModel['@id'] : undefined,
1624
- term: 'term' in this.node ? (_b = this.node) === null || _b === void 0 ? void 0 : _b.term['@id'] : undefined
1625
- });
1626
- },
1627
- enumerable: false,
1628
- configurable: true
1629
- });
1630
- Object.defineProperty(BlankNodeStateComponent.prototype, "modelKeyParams", {
1631
- get: function () {
1632
- var _a;
1633
- return filterParams({
1634
- model: (this.node['@type'] || ((_a = this.node) === null || _a === void 0 ? void 0 : _a.type)).toLowerCase(),
1635
- modelKey: this.key
1636
- });
1637
- },
1638
- enumerable: false,
1639
- configurable: true
1640
- });
1641
1637
  Object.defineProperty(BlankNodeStateComponent.prototype, "engineModel$", {
1642
1638
  get: function () {
1643
- var _this = this;
1644
- return this.engineService.model$(this.modelParams).pipe(
1645
- // fallback to modelKey
1646
- operators.mergeMap(function (value) { return value ? rxjs.of(value) : _this.engineService.model$(_this.modelKeyParams); }),
1647
- // defaults to methodModel
1648
- operators.mergeMap(function (value) {
1649
- var _a;
1650
- return value ? rxjs.of(value) : ('methodModel' in _this.node ? _this.engineService.model$({ model: (_a = _this.node) === null || _a === void 0 ? void 0 : _a.methodModel['@id'] }) : rxjs.of(null));
1651
- }));
1639
+ return this.engineService.nodeModel$(this.node, this.key);
1652
1640
  },
1653
1641
  enumerable: false,
1654
1642
  configurable: true
@@ -2091,9 +2079,11 @@
2091
2079
  });
2092
2080
  var defaultFeature = function () { return (Object.assign({}, feature)); };
2093
2081
  var pointToCoordinates = function (point) { return [point.lng(), point.lat()]; };
2094
- var coordinatesToPoint = function (values) { return Array.isArray(values[0]) ?
2095
- values.map(function (v) { return coordinatesToPoint(v); }) :
2096
- new google.maps.LatLng(values[1], values[0]); };
2082
+ var coordinatesToPoint = function (values) { return Array.isArray(values[0])
2083
+ ? values.map(function (v) { return coordinatesToPoint(v); })
2084
+ : values.some(isNaN)
2085
+ ? null
2086
+ : new google.maps.LatLng(values[1], values[0]); };
2097
2087
  var polygonToCoordinates = function (polygon) { return polygon.getPaths().getArray().map(function (path) {
2098
2088
  var points = path.getArray();
2099
2089
  return __spreadArray(__spreadArray([], __read(points.map(pointToCoordinates))), [
@@ -2121,11 +2111,12 @@
2121
2111
  : (getCoordinates(feat) || []).map(coordinatesToPolygon); };
2122
2112
  var polygonBounds = function (polygon) {
2123
2113
  var _a;
2124
- return polygon ?
2125
- Array.isArray(polygon) ?
2126
- polygon.reduce(function (prev, curr) { return prev.extend(polygonBounds(curr)); }, new google.maps.LatLngBounds()) :
2127
- (((_a = polygon.getPath()) === null || _a === void 0 ? void 0 : _a.getArray()) || []).reduce(function (prev, curr) { return prev.extend(curr); }, new google.maps.LatLngBounds()) :
2128
- undefined;
2114
+ var paths = polygon
2115
+ ? Array.isArray(polygon)
2116
+ ? polygon.flatMap(function (p) { var _a; return ((_a = p.getPath()) === null || _a === void 0 ? void 0 : _a.getArray()) || []; })
2117
+ : ((_a = polygon.getPath()) === null || _a === void 0 ? void 0 : _a.getArray()) || []
2118
+ : [];
2119
+ return paths.reduce(function (prev, curr) { return prev.extend(curr); }, new google.maps.LatLngBounds());
2129
2120
  };
2130
2121
 
2131
2122
  var MapsDrawingConfirmComponent = /** @class */ (function () {
@@ -5381,8 +5372,26 @@
5381
5372
  var NodeLinkComponent = /** @class */ (function () {
5382
5373
  function NodeLinkComponent() {
5383
5374
  this.showExternalLink = false;
5384
- this.baseUrl = baseUrl();
5385
5375
  }
5376
+ Object.defineProperty(NodeLinkComponent.prototype, "id", {
5377
+ get: function () {
5378
+ return this.node['@id'];
5379
+ },
5380
+ enumerable: false,
5381
+ configurable: true
5382
+ });
5383
+ Object.defineProperty(NodeLinkComponent.prototype, "url", {
5384
+ get: function () {
5385
+ return [
5386
+ baseUrl(),
5387
+ this.node['@type'].toLowerCase(),
5388
+ this.id,
5389
+ this.node.aggregated ? "dataState=" + api.DataState.recalculated : null
5390
+ ].filter(Boolean).join('/');
5391
+ },
5392
+ enumerable: false,
5393
+ configurable: true
5394
+ });
5386
5395
  Object.defineProperty(NodeLinkComponent.prototype, "showLink", {
5387
5396
  get: function () {
5388
5397
  return this.node && linkTypeEnabled(this.node['@type']);
@@ -5400,7 +5409,7 @@
5400
5409
  return NodeLinkComponent;
5401
5410
  }());
5402
5411
  NodeLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeLinkComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
5403
- NodeLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeLinkComponent, selector: "he-node-link", inputs: { node: "node", showExternalLink: "showExternalLink" }, ngImport: i0__namespace, template: "<a *ngIf=\"showLink; else content\"\n [href]=\"baseUrl + '/' + node!['@type'].toLowerCase() + '/' + node!['@id']\"\n [target]=\"target\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <fa-icon class=\"no-print ml-2\" icon=\"external-link-alt\" size=\"sm\" *ngIf=\"showExternalLink\"></fa-icon>\n</a>\n\n<ng-template #content>\n <span #placeholder><ng-content></ng-content></span>\n <span *ngIf=\"placeholder.children.length === 0\">{{node!['@id']}}</span>\n</ng-template>\n", styles: [""], 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
5412
+ NodeLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeLinkComponent, selector: "he-node-link", inputs: { node: "node", showExternalLink: "showExternalLink" }, ngImport: i0__namespace, template: "<a *ngIf=\"showLink; else content\" [href]=\"url\" [target]=\"target\" (click)=\"$event.stopPropagation()\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n <fa-icon class=\"no-print ml-2\" icon=\"external-link-alt\" size=\"sm\" *ngIf=\"showExternalLink\"></fa-icon>\n</a>\n\n<ng-template #content>\n <span #placeholder><ng-content></ng-content></span>\n <span *ngIf=\"placeholder.children.length === 0\">{{id}}</span>\n</ng-template>\n", styles: [""], 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
5404
5413
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeLinkComponent, decorators: [{
5405
5414
  type: i0.Component,
5406
5415
  args: [{
@@ -5550,27 +5559,34 @@
5550
5559
  var model = _c.model;
5551
5560
  return model;
5552
5561
  }) }); }); };
5553
- var logSubValues = function (logs, original, recalculated, models) { return utils.unique(__spreadArray(__spreadArray(__spreadArray([], __read(Object.keys(logs).flatMap(function (key) { return [
5554
- logSubValue(logs, key, 'input'),
5555
- logSubValue(logs, key, 'property')
5556
- ]
5557
- .flat()
5558
- .filter(Boolean)
5559
- .map(function (v) { return (Object.assign(Object.assign({}, v), { configModels: [key] })); }); }))), __read(logProperties(original, models))), __read(logProperties(recalculated, models))))
5560
- .map(function (v) {
5561
- var originalValue = blankNodeValue(original, v.key, v.id);
5562
- var recalculatedValue = blankNodeValue(recalculated, v.key, v.id);
5563
- return Object.assign(Object.assign({}, v), { configModels: v.configModels, originalValue: originalValue, recalculatedValue: recalculatedValue, isRecalculated: !utils.isUndefined(recalculatedValue) && recalculatedValue !== originalValue });
5564
- })
5565
- .filter(function (v) { return v.configModels.length > 0; }); };
5566
- var logKeys = function (logs, original, recalculated) { return Object.keys(logs)
5567
- .filter(function (key) { return logs[key].isKey; })
5568
- .map(function (key) { return ({
5569
- key: key,
5570
- originalValue: blankNodeValue(original, key),
5571
- recalculatedValue: blankNodeValue(recalculated, key),
5572
- isRecalculated: isRecalculated(recalculated, key)
5573
- }); }); };
5562
+ var logSubValues = function (logs, original, recalculated, models, _c) {
5563
+ var nodeType = _c.nodeType, type = _c.type, termId = _c.termId;
5564
+ return utils.unique(__spreadArray(__spreadArray(__spreadArray([], __read(Object.keys(logs).flatMap(function (key) { return [
5565
+ logSubValue(logs, key, 'input'),
5566
+ logSubValue(logs, key, 'property')
5567
+ ]
5568
+ .flat()
5569
+ .filter(Boolean)
5570
+ .map(function (v) { return (Object.assign(Object.assign({}, v), { configModels: [key] })); }); }))), __read(logProperties(original, models))), __read(logProperties(recalculated, models))))
5571
+ .map(function (v) {
5572
+ var originalValue = blankNodeValue(original, v.key, v.id);
5573
+ var recalculatedValue = blankNodeValue(recalculated, v.key, v.id);
5574
+ return Object.assign(Object.assign({}, v), { configModels: v.configModels.map(configWithDocs(models, { nodeType: nodeType, type: type, termId: termId }, v)), originalValue: originalValue, recalculatedValue: recalculatedValue, isRecalculated: !utils.isUndefined(recalculatedValue) && recalculatedValue !== originalValue });
5575
+ })
5576
+ .filter(function (v) { return v.configModels.length > 0; });
5577
+ };
5578
+ var logKeys = function (logs, original, recalculated, models, _c) {
5579
+ var nodeType = _c.nodeType, type = _c.type, termId = _c.termId;
5580
+ return Object.keys(logs)
5581
+ .filter(function (key) { return logs[key].isKey; })
5582
+ .map(function (key) { return ({
5583
+ key: key,
5584
+ configModels: [configWithDocs(models, { nodeType: nodeType, type: type, termId: termId }, { key: key }, true)(key)],
5585
+ originalValue: blankNodeValue(original, key),
5586
+ recalculatedValue: blankNodeValue(recalculated, key),
5587
+ isRecalculated: isRecalculated(recalculated, key)
5588
+ }); });
5589
+ };
5574
5590
  var isBackgroundNoInput = function (logs) { return logs.methodTier === schema.EmissionMethodTier.background && !logs.input; };
5575
5591
  var isModelLog = function (logs) { return [
5576
5592
  !isBackgroundNoInput(logs),
@@ -5595,6 +5611,28 @@
5595
5611
  }).filter(Boolean);
5596
5612
  return indexes.length ? indexes[0] : '';
5597
5613
  };
5614
+ var configWithDocs = function (models, _c, subValue, isKey) {
5615
+ var nodeType = _c.nodeType, type = _c.type, termId = _c.termId;
5616
+ if (isKey === void 0) { isKey = false; }
5617
+ return function (methodId) {
5618
+ var key = (subValue === null || subValue === void 0 ? void 0 : subValue.key)
5619
+ ? subValue.id
5620
+ // handle "input.hestiaAggregatedData" for example
5621
+ ? (subValue === null || subValue === void 0 ? void 0 : subValue.key) + "." + methodId
5622
+ // handle "input.price"
5623
+ : type.toLowerCase() + "." + (isKey ? methodId : subValue === null || subValue === void 0 ? void 0 : subValue.key)
5624
+ : null;
5625
+ var node = {
5626
+ '@type': nodeType,
5627
+ term: { '@id': (subValue === null || subValue === void 0 ? void 0 : subValue.id) || termId },
5628
+ methodModel: { '@id': methodId }
5629
+ };
5630
+ return {
5631
+ methodId: methodId,
5632
+ model: findMatchingModel(models, modelParams(node)) || findMatchingModel(models, modelKeyParams(node, key))
5633
+ };
5634
+ };
5635
+ };
5598
5636
  /**
5599
5637
  * Group models running in parallel under the same array, as they should appear vertically.
5600
5638
  *
@@ -5604,7 +5642,7 @@
5604
5642
  var groupParallelModels = function (config, termId, modelKey, models) {
5605
5643
  var modelsWithOrder = models.map(function (model) { return ({
5606
5644
  model: model,
5607
- order: modelConfigOrder(config.models, termId, modelKey, model)
5645
+ order: modelConfigOrder(config.models, termId, modelKey, model.methodId)
5608
5646
  }); });
5609
5647
  return modelsWithOrder
5610
5648
  .reduce(function (prev, _c) {
@@ -5617,6 +5655,11 @@
5617
5655
  .filter(Boolean)
5618
5656
  .map(function (v) { return v.length === 1 ? v[0] : v; });
5619
5657
  };
5658
+ var allParallel = function (models) { return models.length === 1 && Array.isArray(models[0]) && models[0].length > 1; };
5659
+ var valueByMethodId = function (values, methodId, termId) { var _a; return term.propertyValue((_a = values.find(function (v) { var _a; return ((_a = v.methodModel) === null || _a === void 0 ? void 0 : _a['@id']) === methodId; })) === null || _a === void 0 ? void 0 : _a.value, termId); };
5660
+ var groupParallelValues = function (values, models, termId) { return Array.isArray(models)
5661
+ ? Object.fromEntries(models.map(function (model) { return [model.methodId, valueByMethodId(values, model.methodId, termId)]; }))
5662
+ : {}; };
5620
5663
  var methodIdLabel = function (methodId) { return ({
5621
5664
  transformation: 'Data From Transformation',
5622
5665
  impact_assessment: 'Data From Cycle'
@@ -5644,10 +5687,10 @@
5644
5687
  _d$2[LogStatus.notRequired] = 'grey',
5645
5688
  _d$2);
5646
5689
  var NodeLogsModelsComponent = /** @class */ (function () {
5647
- function NodeLogsModelsComponent(searchService, hestiaEngineService) {
5690
+ function NodeLogsModelsComponent(searchService, engineService) {
5648
5691
  var _this = this;
5649
5692
  this.searchService = searchService;
5650
- this.hestiaEngineService = hestiaEngineService;
5693
+ this.engineService = engineService;
5651
5694
  this.models = [];
5652
5695
  this.allTerms = [];
5653
5696
  this.allBlankNodes = [];
@@ -5658,6 +5701,7 @@
5658
5701
  this.baseUrl = baseUrl();
5659
5702
  this.isExternal = isExternal();
5660
5703
  this.hasLog = hasLog;
5704
+ this.propertyValue = term.propertyValue;
5661
5705
  this.loading = true;
5662
5706
  this.blankNodes = [];
5663
5707
  this.methodModelsCount = 0;
@@ -5677,7 +5721,7 @@
5677
5721
  switch (_g.label) {
5678
5722
  case 0:
5679
5723
  _c = this;
5680
- return [4 /*yield*/, this.hestiaEngineService.ochestratorConfig(this.nodeType)];
5724
+ return [4 /*yield*/, this.engineService.ochestratorConfig(this.nodeType)];
5681
5725
  case 1:
5682
5726
  _c.config = _g.sent();
5683
5727
  return [4 /*yield*/, this.searchService.search({
@@ -5703,7 +5747,7 @@
5703
5747
  case 3:
5704
5748
  _d.methodsById = _g.sent();
5705
5749
  if (!this.includeAllModels) return [3 /*break*/, 5];
5706
- return [4 /*yield*/, this.hestiaEngineService.models()];
5750
+ return [4 /*yield*/, this.engineService.models()];
5707
5751
  case 4:
5708
5752
  _e = _g.sent();
5709
5753
  return [3 /*break*/, 6];
@@ -5729,12 +5773,13 @@
5729
5773
  var original = originalValues.filter(function (v) { return termId === v.term['@id']; });
5730
5774
  var recalculated = recalculatedValues.filter(function (v) { return termId === v.term['@id']; });
5731
5775
  var hasData = !!original.length || !!recalculated.length || Object.keys(termLogs).length > 0;
5732
- var configModels = utils.unique(__spreadArray(__spreadArray([], __read(Object.keys(termLogs).filter(function (key) { return isModelLog(termLogs[key]); }))), __read(findConfigModels(_this.config, termId, _this.nodeKey, allModels).map(function (_c) {
5776
+ var configModelsData = { nodeType: _this.nodeType, type: type, termId: termId };
5777
+ var configModels = groupParallelModels(_this.config, termId, _this.nodeKey, utils.unique(__spreadArray(__spreadArray([], __read(Object.keys(termLogs).filter(function (key) { return isModelLog(termLogs[key]); }))), __read(findConfigModels(_this.config, termId, _this.nodeKey, allModels).map(function (_c) {
5733
5778
  var model = _c.model;
5734
5779
  return model;
5735
- }))));
5736
- var keys = logKeys(termLogs, original, recalculated);
5737
- var subValues = logSubValues(termLogs, original, recalculated, allModels);
5780
+ })))).map(configWithDocs(allModels, configModelsData)));
5781
+ var keys = logKeys(termLogs, original, recalculated, allModels, configModelsData);
5782
+ var subValues = logSubValues(termLogs, original, recalculated, allModels, configModelsData);
5738
5783
  var isRequired = !Object.values(termLogs)
5739
5784
  // ignore models that were never going to run
5740
5785
  .filter(isRunOrchestrator)
@@ -5745,7 +5790,7 @@
5745
5790
  termId: termId,
5746
5791
  term: term,
5747
5792
  type: type,
5748
- configModels: groupParallelModels(_this.config, termId, _this.nodeKey, configModels),
5793
+ configModels: configModels,
5749
5794
  original: original,
5750
5795
  originalValue: reduceValues(original, termId),
5751
5796
  recalculated: recalculated,
@@ -5756,7 +5801,10 @@
5756
5801
  isRequired: isRequired,
5757
5802
  logs: termLogs,
5758
5803
  keys: keys,
5759
- subValues: subValues
5804
+ subValues: subValues,
5805
+ allParallel: allParallel(configModels),
5806
+ originalValueByMethodId: groupParallelValues(original, configModels[0], termId),
5807
+ recalculatedValueByMethodId: groupParallelValues(recalculated, configModels[0], termId)
5760
5808
  };
5761
5809
  });
5762
5810
  this.methodModelsCount = Math.max.apply(Math.max, __spreadArray([
@@ -5777,15 +5825,17 @@
5777
5825
  NodeLogsModelsComponent.prototype.fetchAllTerms = function () {
5778
5826
  var _a;
5779
5827
  return __awaiter(this, void 0, void 0, function () {
5828
+ var _this = this;
5780
5829
  return __generator(this, function (_c) {
5781
5830
  return [2 /*return*/, rxjs.from(((_a = this.terms) === null || _a === void 0 ? void 0 : _a.length) ?
5782
- this.terms : __spreadArray(__spreadArray([], __read((this.originalValues || []).map(function (_c) {
5783
- var term = _c.term;
5784
- return term;
5785
- }))), __read((this.recalculatedValues || []).map(function (_c) {
5786
- var term = _c.term;
5787
- return term;
5788
- })))).pipe(operators.distinct(function (v) { return v['@id']; }), operators.toArray(), operators.map(function (v) { return orderBy$5(v, ['name'], ['asc']); })).toPromise()];
5831
+ this.terms :
5832
+ __spreadArray(__spreadArray([], __read((this.originalValues || []).map(function (_c) {
5833
+ var term = _c.term;
5834
+ return term;
5835
+ }))), __read((this.recalculatedValues || []).map(function (_c) {
5836
+ var term = _c.term;
5837
+ return term;
5838
+ }))).filter(function (node) { var _a; return !((_a = _this.filterTermTypes) === null || _a === void 0 ? void 0 : _a.length) || _this.filterTermTypes.includes(node.termType); })).pipe(operators.distinct(function (v) { return v['@id']; }), operators.toArray(), operators.map(function (v) { return orderBy$5(v, ['name'], ['asc']); })).toPromise()];
5789
5839
  });
5790
5840
  });
5791
5841
  };
@@ -5799,17 +5849,27 @@
5799
5849
  var value = (blankNodes === null || blankNodes === void 0 ? void 0 : blankNodes.length) ? blankNodes[0][key] : null;
5800
5850
  return ['string', 'number', 'boolean'].includes(typeof value) ? (value || '') : null;
5801
5851
  };
5802
- NodeLogsModelsComponent.prototype.togglePopover = function (popover, context) {
5803
- return popover.isOpen() ? popover.close() : popover.open(context);
5852
+ NodeLogsModelsComponent.prototype.openPopover = function (popover, _c) {
5853
+ var blankNode = _c.blankNode, methodId = _c.methodId, subValue = _c.subValue, logs = _c.logs;
5854
+ return this.hasLogDetails(blankNode, methodId, subValue) ? popover.open({ logs: logs }) : null;
5804
5855
  };
5856
+ Object.defineProperty(NodeLogsModelsComponent.prototype, "filteredType", {
5857
+ get: function () {
5858
+ var _a;
5859
+ return (_a = this.filterTermTypes) === null || _a === void 0 ? void 0 : _a.map(termTypeLabel).join(' & ');
5860
+ },
5861
+ enumerable: false,
5862
+ configurable: true
5863
+ });
5805
5864
  NodeLogsModelsComponent.prototype.filterResults = function () {
5806
5865
  var _this = this;
5807
5866
  setTimeout(function () {
5808
5867
  _this.blankNodes = _this.allBlankNodes.filter(function (_c) {
5809
5868
  var isRequired = _c.isRequired, name = _c.term.name;
5869
+ var _a;
5810
5870
  return _this.term
5811
5871
  ? name.toLowerCase().includes(_this.term.toLowerCase())
5812
- : !_this.onlyRequired || !_this.filteredType || isRequired;
5872
+ : !_this.onlyRequired || !((_a = _this.filterTermTypes) === null || _a === void 0 ? void 0 : _a.length) || isRequired;
5813
5873
  });
5814
5874
  });
5815
5875
  };
@@ -5837,7 +5897,7 @@
5837
5897
  this.hasLog(log, false) // skip if contains logs other than orchestrator
5838
5898
  ].every(function (v) { return !v; });
5839
5899
  };
5840
- NodeLogsModelsComponent.prototype.getMethodIdAt = function (node, index, subValue) {
5900
+ NodeLogsModelsComponent.prototype.getModelsAt = function (node, index, subValue) {
5841
5901
  var configModels = (subValue || node).configModels;
5842
5902
  return configModels[index];
5843
5903
  };
@@ -5882,7 +5942,7 @@
5882
5942
  return NodeLogsModelsComponent;
5883
5943
  }());
5884
5944
  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 });
5885
- 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", includeAllModels: "includeAllModels", 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 <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"rowsCount\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\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 [ngbTypeahead]=\"suggestTerm\"\n [focusFirst]=\"false\"\n (change)=\"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 class=\"has-border-right\">Units</th>\n <th>Original</th>\n <th>Recalculated</th>\n <th>Difference</th>\n <th *ngFor=\"let c of methodModelsCount | times; let i = index\">({{i + 1}})</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngIf=\"loading\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"!loading && blankNodes.length === 0\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>No data</span>\n </td>\n </tr>\n <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\">\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 class=\"has-border-right\">\n <span>{{blankNode.term?.units}}</span>\n </td>\n <td>\n <span>{{blankNode.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notRecalculated\">\n {{blankNode.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td class=\"is-nowrap\">\n <he-blank-node-value-delta *ngIf=\"blankNode.original.length && blankNode.isRecalculated; else noValue\"\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 class=\"has-border-right\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\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 class=\"has-border-right\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\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 </he-data-table>\n\n <div class=\"is-size-7 is-italic\">\n <div class=\"columns is-variable is-1 my-0\">\n <div class=\"column is-narrow\">\n <p>\n <a class=\"is-inline-block pr-2\"\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)]=\"onlyRequired\"\n (change)=\"filterResults()\"\n [disabled]=\"!!term\"\n >\n <span class=\"ml-2\">Show only relevant {{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=\"getMethodIdAt(blankNode, i, subValue); let methodId; else noValue\">\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 </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 #noValue>-</ng-template>\n\n<ng-template #notRecalculated>not recalculated</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)\">\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}::ng-deep tr.has-sub-rows td{border-bottom-style:dotted}::ng-deep td he-node-link{width:190px}::ng-deep 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.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: i11__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i11__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 } });
5945
+ 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", includeAllModels: "includeAllModels", logsUrl: "logsUrl", originalValues: "originalValues", recalculatedValues: "recalculatedValues", terms: "terms", logs: "logs", filterTermTypes: "filterTermTypes" }, 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 <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"rowsCount\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\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 [ngbTypeahead]=\"suggestTerm\"\n [focusFirst]=\"false\"\n (change)=\"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 class=\"has-border-right\">Units</th>\n <th>Original</th>\n <th>Recalculated</th>\n <th>Difference</th>\n <th *ngFor=\"let c of methodModelsCount | times; let i = index\">({{i + 1}})</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngIf=\"loading\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"!loading && blankNodes.length === 0\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>No data</span>\n </td>\n </tr>\n <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\">\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 class=\"has-border-right\">\n <span>{{blankNode.term?.units}}</span>\n </td>\n <td>\n <ng-template #defaultOriginalValue>\n <span>{{blankNode.originalValue | precision:3 | default:'-'}}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultOriginalValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">{{blankNode.originalValueByMethodId[model.methodId] | precision:3 | default:'-'}}</div>\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notRecalculated\">\n <ng-template #defaultRecalculatedValue>\n <span>{{blankNode.recalculatedValue | precision:3 | default:'-'}}</span>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultRecalculatedValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">{{blankNode.recalculatedValueByMethodId[model.methodId] | precision:3 | default:'-'}}</div>\n </ng-container>\n </ng-container>\n </td>\n <td class=\"is-nowrap\">\n <ng-template #defaultDeltaValue>\n <he-blank-node-value-delta *ngIf=\"blankNode.original.length && blankNode.isRecalculated; else noValue\"\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"blankNode.originalValue\"\n ></he-blank-node-value-delta>\n </ng-template>\n <ng-container *ngIf=\"blankNode.allParallel; else defaultDeltaValue\">\n <div *ngFor=\"let model of blankNode.configModels[0]\">\n <he-blank-node-value-delta *ngIf=\"blankNode.originalValueByMethodId[model.methodId] !== null && blankNode.recalculatedValueByMethodId[model.methodId] !== null; else noValue\"\n [value]=\"blankNode.recalculatedValueByMethodId[model.methodId]\"\n [originalValue]=\"blankNode.originalValueByMethodId[model.methodId]\"\n ></he-blank-node-value-delta>\n </div>\n </ng-container>\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 class=\"has-border-right\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\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, model:subValue.configModels[0], isKey:true, 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 class=\"has-border-right\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\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 </he-data-table>\n\n <div class=\"is-size-7 is-italic\">\n <div class=\"columns is-variable is-1 my-0\">\n <div class=\"column is-narrow\">\n <p>\n <a class=\"is-inline-block pr-2\"\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)]=\"onlyRequired\"\n (change)=\"filterResults()\"\n [disabled]=\"!!term\"\n >\n <span class=\"ml-2\">Show only relevant {{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=\"getModelsAt(blankNode, i, subValue); let models; else noValue\">\n <ng-template #modelSerie>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, model:models, subValue:subValue, logs:getLogs(blankNode, models.methodId, subValue)}\"></ng-container>\n </ng-template>\n <div *ngIf=\"models | isArray; else modelSerie\">\n <p *ngFor=\"let model of models\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, model:model, subValue:subValue, logs:getLogs(blankNode, model.methodId, subValue)}\"></ng-container>\n </p>\n </div>\n </ng-container>\n </td>\n</ng-template>\n\n<ng-template #blankNodeModel let-blankNode=\"blankNode\" let-model=\"model\" let-subValue=\"subValue\" let-logs=\"logs\" let-isKey=\"isKey\">\n <span\n [class.trigger-popover]=\"hasLogDetails(blankNode, model.methodId, subValue)\"\n [ngbPopover]=\"logDetails\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"p.isOpen() ? p.close() : openPopover(p, { blankNode, methodId:model.methodId, subValue, logs })\"\n >\n <span class=\"is-capitalized\">{{methodName(blankNode, model.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, model.methodId, subValue)]}}\">\n <fa-icon [icon]=\"logIcon[logStatus(blankNode, model.methodId, subValue)]\"></fa-icon>\n </span>\n <span class=\"pl-2\" *ngIf=\"model.model\">\n (<ng-container *ngTemplateOutlet=\"docsLink; context: {$implicit: model.model}\"></ng-container>)\n </span>\n </span>\n</ng-template>\n\n<ng-template #noValue>-</ng-template>\n\n<ng-template #notRecalculated>not recalculated</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <ng-container *ngIf=\"logs?.requirements\">\n <p class=\"is-requirement\" *ngFor=\"let key of requirementKeys(logs.requirements)\">\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\n<ng-template #docsLink let-model>\n <a [href]=\"model.apiDocsPath || model.docPath || model.path\" target=\"_blank\"\n (click)=\"$event.stopPropagation()\"\n >\n <span>Docs</span>\n <fa-icon class=\"ml-1\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\n </a>\n</ng-template>\n", styles: [":host{display:block}::ng-deep tr.has-sub-rows td{border-bottom-style:dotted}::ng-deep td he-node-link{width:190px}::ng-deep 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.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: i11__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i11__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 } });
5886
5946
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeLogsModelsComponent, decorators: [{
5887
5947
  type: i0.Component,
5888
5948
  args: [{
@@ -5906,7 +5966,7 @@
5906
5966
  type: i0.Input
5907
5967
  }], logs: [{
5908
5968
  type: i0.Input
5909
- }], filteredType: [{
5969
+ }], filterTermTypes: [{
5910
5970
  type: i0.Input
5911
5971
  }] } });
5912
5972
 
@@ -5980,7 +6040,7 @@
5980
6040
  return NodeValueDetailsComponent;
5981
6041
  }());
5982
6042
  NodeValueDetailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeValueDetailsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
5983
- NodeValueDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: { data: "data", nodeType: "nodeType", dataKey: "dataKey" }, ngImport: i0__namespace, template: "<ng-container *bindOnce=\"data\">\n <ng-container *ngIf=\"data?.nodes?.length === 1; else showTable\">\n <ng-container *ngFor=\"let key of keys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n <ng-container *ngFor=\"let key of additionalKeys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #showTable>\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" key=\"term\"></he-link-key-value>\n\n <div class=\"table-container mt-2\">\n <table class=\"table is-narrow\">\n <thead>\n <th *ngFor=\"let key of tableKeys\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n </th>\n </thead>\n <tbody>\n <tr *ngFor=\"let node of data!.nodes\">\n <td *ngFor=\"let key of tableKeys\">\n <he-link-key-value [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n", styles: ["table{background-color:transparent;color:#fff}table::ng-deep he-link-key-value a:first-child,table::ng-deep he-link-key-value a:first-child+span{display:none}\n"], components: [{ type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: ["node", "nodeType", "dataKey", "key"] }], directives: [{ type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6043
+ NodeValueDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: { data: "data", nodeType: "nodeType", dataKey: "dataKey" }, ngImport: i0__namespace, template: "<ng-container *bindOnce=\"data\">\n <ng-container *ngIf=\"data?.nodes?.length === 1; else showTable\">\n <ng-container *ngFor=\"let key of keys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n <ng-container *ngFor=\"let key of additionalKeys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #showTable>\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" key=\"term\"></he-link-key-value>\n\n <div class=\"table-container mt-2\">\n <table class=\"table is-narrow\">\n <thead>\n <th *ngFor=\"let key of tableKeys\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n </th>\n </thead>\n <tbody>\n <tr *ngFor=\"let node of data!.nodes\">\n <td *ngFor=\"let key of tableKeys\">\n <he-link-key-value [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n", styles: ["table{background-color:transparent;color:#fff}table::ng-deep he-link-key-value>a:first-child,table::ng-deep he-link-key-value>a:first-child+span{display:none}\n"], components: [{ type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: ["node", "nodeType", "dataKey", "key"] }], directives: [{ type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
5984
6044
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeValueDetailsComponent, decorators: [{
5985
6045
  type: i0.Component,
5986
6046
  args: [{
@@ -6217,7 +6277,7 @@
6217
6277
  return CyclesActivityLogsComponent;
6218
6278
  }());
6219
6279
  CyclesActivityLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesActivityLogsComponent, deps: [{ token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
6220
- CyclesActivityLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesActivityLogsComponent, selector: "he-cycles-activity-logs", inputs: { cycle: "cycle", original: "original", recalculated: "recalculated" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!loading; else loader\">\n <div class=\"tabs mb-1\">\n <ul>\n <li [class.is-active]=\"selectedTab === Tab.products\">\n <a (click)=\"selectedTab = Tab.products\">Products</a>\n </li>\n <li [class.is-active]=\"selectedTab === Tab.inputs\">\n <a (click)=\"selectedTab = Tab.inputs\">Inputs</a>\n </li>\n </ul>\n </div>\n\n <he-node-logs-models *ngIf=\"selectedTab === Tab.products\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Cycle\"\n [originalValues]=\"original?.products\"\n [recalculatedValues]=\"recalculated?.products\"\n [logs]=\"logs\"\n ></he-node-logs-models>\n\n <he-node-logs-models *ngIf=\"selectedTab === Tab.inputs\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Cycle\"\n [originalValues]=\"original?.inputs\"\n [recalculatedValues]=\"recalculated?.inputs\"\n [logs]=\"logs\"\n ></he-node-logs-models>\n</ng-container>\n\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [":host{display:block}\n"], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filteredType"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6280
+ CyclesActivityLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesActivityLogsComponent, selector: "he-cycles-activity-logs", inputs: { cycle: "cycle", original: "original", recalculated: "recalculated" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!loading; else loader\">\n <div class=\"tabs mb-1\">\n <ul>\n <li [class.is-active]=\"selectedTab === Tab.products\">\n <a (click)=\"selectedTab = Tab.products\">Products</a>\n </li>\n <li [class.is-active]=\"selectedTab === Tab.inputs\">\n <a (click)=\"selectedTab = Tab.inputs\">Inputs</a>\n </li>\n </ul>\n </div>\n\n <he-node-logs-models *ngIf=\"selectedTab === Tab.products\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Cycle\"\n [originalValues]=\"original?.products\"\n [recalculatedValues]=\"recalculated?.products\"\n [logs]=\"logs\"\n ></he-node-logs-models>\n\n <he-node-logs-models *ngIf=\"selectedTab === Tab.inputs\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Cycle\"\n [originalValues]=\"original?.inputs\"\n [recalculatedValues]=\"recalculated?.inputs\"\n [logs]=\"logs\"\n ></he-node-logs-models>\n</ng-container>\n\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [":host{display:block}\n"], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filterTermTypes"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6221
6281
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesActivityLogsComponent, decorators: [{
6222
6282
  type: i0.Component,
6223
6283
  args: [{
@@ -6251,6 +6311,7 @@
6251
6311
  this.showDownload = false;
6252
6312
  this.View = View$4;
6253
6313
  this.selectedView = View$4.table;
6314
+ this.selectedIndex = 0;
6254
6315
  this.inputs = [];
6255
6316
  this.products = [];
6256
6317
  }
@@ -6284,10 +6345,18 @@
6284
6345
  CyclesActivityComponent.prototype.isSelected = function (cycle) {
6285
6346
  return this.selected.length === 0 || this.selected.includes(cycle['@id']);
6286
6347
  };
6348
+ // Recalculation logs
6349
+ CyclesActivityComponent.prototype.selectIndex = function (_a) {
6350
+ var _this = this;
6351
+ var value = _a.target.value;
6352
+ this.selectedIndex = -1;
6353
+ // force a refresh of the logs
6354
+ setTimeout(function () { return (_this.selectedIndex = +value); });
6355
+ };
6287
6356
  return CyclesActivityComponent;
6288
6357
  }());
6289
6358
  CyclesActivityComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesActivityComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6290
- 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && (inputs.length || products.length)\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"!isOriginal && cycles.length === 1\">\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\">\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 <ng-container *ngIf=\"inputs.length || products.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"cycles.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngIf=\"products.length\" [attr.colspan]=\"products.length\"\n [class.has-border-right]=\"inputs.length\"\n >Products</th>\n <th *ngIf=\"inputs.length\" [attr.colspan]=\"inputs.length\">Inputs</th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let product of products; let pl = last\"\n [attr.title]=\"product.value.term.name\"\n [class.has-border-right]=\"inputs.length && pl\"\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 class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let product of products; let pl = last\"\n [attr.title]=\"product.value.term.units\"\n [class.has-border-right]=\"inputs.length && pl\"\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.term || cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycle\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\"\n *ngFor=\"let product of products; let pl = last\"\n [class.has-border-right]=\"inputs.length && pl\"\n >\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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-activity-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [cycle]=\"cycles[0]\"\n [original]=\"originalValues[0]\"\n [recalculated]=\"cycles[0]\"\n></he-cycles-activity-logs>\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=\"has-text-centered\">\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>{{defaultLabel(node)}}</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}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: ["cycle", "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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__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 } });
6359
+ 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && (inputs.length || products.length)\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"!isOriginal\">\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\">\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 <ng-container *ngIf=\"inputs.length || products.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"cycles.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngIf=\"products.length\" [attr.colspan]=\"products.length\"\n [class.has-border-right]=\"inputs.length\"\n >Products</th>\n <th *ngIf=\"inputs.length\" [attr.colspan]=\"inputs.length\">Inputs</th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let product of products; let pl = last\"\n [attr.title]=\"product.value.term.name\"\n [class.has-border-right]=\"inputs.length && pl\"\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 class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let product of products; let pl = last\"\n [attr.title]=\"product.value.term.units\"\n [class.has-border-right]=\"inputs.length && pl\"\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.term || cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycle\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\"\n *ngFor=\"let product of products; let pl = last\"\n [class.has-border-right]=\"inputs.length && pl\"\n >\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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">{{i + 1}}. {{defaultLabel(value)}}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-activity-logs *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [original]=\"originalValues[selectedIndex]\"\n [recalculated]=\"cycles[selectedIndex]\"\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=\"has-text-centered\">\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>{{defaultLabel(node)}}</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}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: ["cycle", "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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: i1__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
6291
6360
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesActivityComponent, decorators: [{
6292
6361
  type: i0.Component,
6293
6362
  args: [{
@@ -6474,6 +6543,7 @@
6474
6543
  this.originalValues = [];
6475
6544
  this.recalculatedValues = [];
6476
6545
  this.loading = true;
6546
+ this.TermTermType = schema.TermTermType;
6477
6547
  this.NodeType = schema.NodeType;
6478
6548
  this.emissions = [];
6479
6549
  }
@@ -6519,7 +6589,7 @@
6519
6589
  return CyclesEmissionsLogsComponent;
6520
6590
  }());
6521
6591
  CyclesEmissionsLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesEmissionsLogsComponent, deps: [{ token: HeSearchService }, { token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
6522
- CyclesEmissionsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesEmissionsLogsComponent, selector: "he-cycles-emissions-logs", inputs: { cycle: "cycle", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Cycle\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"emissions\"\n [logs]=\"logs\"\n filteredType=\"Emission\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [":host{display:block}\n"], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filteredType"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6592
+ CyclesEmissionsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesEmissionsLogsComponent, selector: "he-cycles-emissions-logs", inputs: { cycle: "cycle", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Cycle\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"emissions\"\n [logs]=\"logs\"\n [filterTermTypes]=\"[TermTermType.emission]\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [":host{display:block}\n"], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filterTermTypes"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6523
6593
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesEmissionsLogsComponent, decorators: [{
6524
6594
  type: i0.Component,
6525
6595
  args: [{
@@ -6553,6 +6623,7 @@
6553
6623
  this.showDownload = false;
6554
6624
  this.View = View$3;
6555
6625
  this.selectedView = View$3.table;
6626
+ this.selectedIndex = 0;
6556
6627
  this.emissions = [];
6557
6628
  }
6558
6629
  CyclesEmissionsComponent.prototype.ngOnChanges = function (changes) {
@@ -6592,10 +6663,18 @@
6592
6663
  enumerable: false,
6593
6664
  configurable: true
6594
6665
  });
6666
+ // Recalculation logs
6667
+ CyclesEmissionsComponent.prototype.selectIndex = function (_a) {
6668
+ var _this = this;
6669
+ var value = _a.target.value;
6670
+ this.selectedIndex = -1;
6671
+ // force a refresh of the logs
6672
+ setTimeout(function () { return (_this.selectedIndex = +value); });
6673
+ };
6595
6674
  return CyclesEmissionsComponent;
6596
6675
  }());
6597
6676
  CyclesEmissionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesEmissionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6598
- 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && emissions.length\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"cycles.length > 1 || (!isOriginal && cycles.length === 1)\">\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 <ng-container *ngIf=\"emissions.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"cycles.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\"></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 class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\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.term || cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-emissions-chart *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\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=\"has-text-centered\">\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>{{defaultLabel(node)}}</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}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__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 } });
6677
+ 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && emissions.length\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"cycles.length > 1 || !isOriginal\">\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\">\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 <ng-container *ngIf=\"emissions.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"cycles.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\" [class.is-hidden]=\"isTransformation\"></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 class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\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.term || cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\" [class.is-hidden]=\"isTransformation\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-cycles-emissions-chart *ngIf=\"cycles.length > 1\" [class.is-hidden]=\"selectedView !== View.chart\"\n [cycles]=\"cycles\" [selected]=\"selected\"\n></he-cycles-emissions-chart>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">{{i + 1}}. {{defaultLabel(value)}}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-emissions-logs *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.emissions\"\n [recalculatedValues]=\"cycles[selectedIndex]?.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=\"has-text-centered\">\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>{{defaultLabel(node)}}</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}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: i1__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
6599
6678
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesEmissionsComponent, decorators: [{
6600
6679
  type: i0.Component,
6601
6680
  args: [{
@@ -6695,7 +6774,7 @@
6695
6774
  return CyclesPracticesLogsComponent;
6696
6775
  }());
6697
6776
  CyclesPracticesLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesLogsComponent, deps: [{ token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
6698
- CyclesPracticesLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesLogsComponent, selector: "he-cycles-practices-logs", inputs: { cycle: "cycle", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Cycle\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [logs]=\"logs\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [""], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filteredType"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6777
+ CyclesPracticesLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesLogsComponent, selector: "he-cycles-practices-logs", inputs: { cycle: "cycle", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Cycle\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [logs]=\"logs\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [""], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filterTermTypes"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6699
6778
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesLogsComponent, decorators: [{
6700
6779
  type: i0.Component,
6701
6780
  args: [{
@@ -6731,6 +6810,7 @@
6731
6810
  this.showDownload = false;
6732
6811
  this.View = View$2;
6733
6812
  this.selectedView = View$2.table;
6813
+ this.selectedIndex = 0;
6734
6814
  this.practices = [];
6735
6815
  }
6736
6816
  CyclesPracticesComponent.prototype.ngOnChanges = function (changes) {
@@ -6768,10 +6848,18 @@
6768
6848
  enumerable: false,
6769
6849
  configurable: true
6770
6850
  });
6851
+ // Recalculation logs
6852
+ CyclesPracticesComponent.prototype.selectIndex = function (_b) {
6853
+ var _this = this;
6854
+ var value = _b.target.value;
6855
+ this.selectedIndex = -1;
6856
+ // force a refresh of the logs
6857
+ setTimeout(function () { return (_this.selectedIndex = +value); });
6858
+ };
6771
6859
  return CyclesPracticesComponent;
6772
6860
  }());
6773
6861
  CyclesPracticesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6774
- 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && practices.length\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"cycles.length === 1\">\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=\"showTimeline\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.timeline\" (click)=\"selectedView = View.timeline\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list-alt\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Operations timeline</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\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 <ng-container *ngIf=\"practices.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"cycles.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\"></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 class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\"\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.term || cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let practice of practices\">\n <span *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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<div class=\"px-3 pb-3\" *ngIf=\"selectedView === View.timeline\">\n <he-cycles-practices-timeline\n [cycle]=\"cycles[0]\" [filterTermTypes]=\"timelineTermType\"\n ></he-cycles-practices-timeline>\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\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=\"has-text-centered\">\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>{{defaultLabel(node)}}</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}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: ["filterTermTypes", "cycle"] }, { 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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__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 } });
6862
+ 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && practices.length\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"showTimeline || !isOriginal\">\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=\"showTimeline\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.timeline\" (click)=\"selectedView = View.timeline\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list-alt\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Operations timeline</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal\">\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 <ng-container *ngIf=\"practices.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"cycles.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\"></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 class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\"\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.term || cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let practice of practices\">\n <span *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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<div class=\"px-3 pb-3\" *ngIf=\"selectedView === View.timeline\">\n <he-cycles-practices-timeline\n [cycle]=\"cycles[0]\" [filterTermTypes]=\"timelineTermType\"\n ></he-cycles-practices-timeline>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static\">Select a Cycle</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of cycles; let i = index\" [value]=\"i\">{{i + 1}}. {{defaultLabel(value)}}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-cycles-practices-logs *ngIf=\"selectedIndex >= 0\"\n [cycle]=\"cycles[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.practices\"\n [recalculatedValues]=\"cycles[selectedIndex]?.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=\"has-text-centered\">\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>{{defaultLabel(node)}}</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}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: ["filterTermTypes", "cycle"] }, { 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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: i1__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
6775
6863
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, decorators: [{
6776
6864
  type: i0.Component,
6777
6865
  args: [{
@@ -7342,6 +7430,11 @@
7342
7430
  "The Product " + code(params.product.name) + " does not exist in the Cycle with id " + code(params.node.id) :
7343
7431
  'The ImpactAssessment Product does not exist in the linked Cycle') + ".\n Please add the Product in the Cycle or remove the link with the Cycle.";
7344
7432
  },
7433
+ _g['must be less than or equal to land occupation'] = function () { return "Land transformation should be less than or equal to land occupation\n (land transformation is the amount of land converted between some date in the past and the current year,\n divided by an amortization period, so it should always be less than land occupation by definition)."; },
7434
+ _g['should be linked to an emission in the Cycle'] = function (_g, errorCount) {
7435
+ var params = _g.params;
7436
+ return (errorCount === 1 ? code(params === null || params === void 0 ? void 0 : params.term.name) + " exists" : 'Some Emissions exist') + " in both the Cycle and the Transformation but " + (errorCount === 1 ? 'it is' : 'they are') + " not linked using " + code('cycle.emissions.X.transformation.term') + ". This may be an error.";
7437
+ },
7345
7438
  _g);
7346
7439
  var formatCustomErrorMessage = function (message, error, errorCount) {
7347
7440
  if (errorCount === void 0) { errorCount = 1; }
@@ -8162,12 +8255,7 @@
8162
8255
  });
8163
8256
  };
8164
8257
  SitesMapsComponent.prototype.centerPolygons = function (polygons) {
8165
- try {
8166
- return (polygons === null || polygons === void 0 ? void 0 : polygons.length) ? this.map.googleMap.fitBounds(polygonBounds(polygons)) : null;
8167
- }
8168
- catch (err) {
8169
- return (polygons === null || polygons === void 0 ? void 0 : polygons.length) ? this.map.googleMap.fitBounds(polygonBounds(polygons[0])) : null;
8170
- }
8258
+ return (polygons === null || polygons === void 0 ? void 0 : polygons.length) ? this.map.googleMap.fitBounds(polygonBounds(polygons)) : null;
8171
8259
  };
8172
8260
  SitesMapsComponent.prototype.addSiteMarkers = function (sites) {
8173
8261
  var siteMarkers = sites.map(siteMarker).filter(Boolean);
@@ -8300,14 +8388,21 @@
8300
8388
  var hasMultipleValues = function (values) { return (values || []).length > 1; };
8301
8389
  var weighedAverage = function (_a) {
8302
8390
  var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper;
8303
- return value.reduce(function (prev, curr, index) { return prev + (curr * (depthLower[index] - depthUpper[index])); }, 0) /
8304
- value.reduce(function (prev, _curr, index) { return prev + (depthLower[index] - depthUpper[index]); }, 0);
8391
+ return value.reduce(function (prev, curr, index) { return prev + (curr * (depthLower[index] || 0 - depthUpper[index] || 0)); }, 0) /
8392
+ value.reduce(function (prev, _curr, index) { return prev + (depthLower[index] || 0 - depthUpper[index] || 0); }, 0);
8305
8393
  };
8306
8394
  var measurementValue = function (_a, termId) {
8307
- var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper;
8308
- return hasMultipleValues(value) && hasMultipleValues(depthLower) && hasMultipleValues(depthUpper) ?
8309
- weighedAverage({ value: value, depthLower: depthLower, depthUpper: depthUpper }) :
8310
- term.propertyValue(value, termId);
8395
+ var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper, nodes = _a.nodes;
8396
+ return (nodes === null || nodes === void 0 ? void 0 : nodes.length) > 1
8397
+ // when dealing with multiple nodes, we start by computing the value for each then do weighted average
8398
+ ? measurementValue({
8399
+ value: nodes.map(function (node) { return term.propertyValue(node.value, termId); }).filter(Boolean),
8400
+ depthLower: nodes.map(function (node) { return node.depthLower; }).filter(Boolean),
8401
+ depthUpper: nodes.map(function (node) { return node.depthUpper; }).filter(Boolean)
8402
+ }, termId)
8403
+ : hasMultipleValues(value) && hasMultipleValues(depthLower) && hasMultipleValues(depthUpper) ?
8404
+ weighedAverage({ value: value, depthLower: depthLower, depthUpper: depthUpper }) :
8405
+ term.propertyValue(value, termId);
8311
8406
  };
8312
8407
 
8313
8408
  var SitesMeasurementsLogsComponent = /** @class */ (function () {
@@ -8317,6 +8412,7 @@
8317
8412
  this.originalValues = [];
8318
8413
  this.recalculatedValues = [];
8319
8414
  this.loading = true;
8415
+ this.TermTermType = schema.TermTermType;
8320
8416
  this.NodeType = schema.NodeType;
8321
8417
  this.models = [];
8322
8418
  this.measurements = [];
@@ -8363,7 +8459,7 @@
8363
8459
  return SitesMeasurementsLogsComponent;
8364
8460
  }());
8365
8461
  SitesMeasurementsLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsLogsComponent, deps: [{ token: HeSearchService }, { token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
8366
- SitesMeasurementsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: { site: "site", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Site\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"measurements\"\n [logs]=\"logs\"\n filteredType=\"Measurement\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [""], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filteredType"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
8462
+ SitesMeasurementsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: { site: "site", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Site\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"measurements\"\n [logs]=\"logs\"\n [filterTermTypes]=\"[TermTermType.measurement]\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [""], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filterTermTypes"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
8367
8463
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsLogsComponent, decorators: [{
8368
8464
  type: i0.Component,
8369
8465
  args: [{
@@ -8393,6 +8489,7 @@
8393
8489
  this.showDownload = false;
8394
8490
  this.View = View$1;
8395
8491
  this.selectedView = View$1.table;
8492
+ this.selectedIndex = 0;
8396
8493
  this.maxAreaSize = maxAreaSize;
8397
8494
  this.siteTooBig = siteTooBig;
8398
8495
  this.defaultLabel = defaultLabel;
@@ -8434,10 +8531,18 @@
8434
8531
  SitesMeasurementsComponent.prototype.isSelected = function (site) {
8435
8532
  return this.selected.length === 0 || this.selected.includes(site['@id']);
8436
8533
  };
8534
+ // Recalculation logs
8535
+ SitesMeasurementsComponent.prototype.selectIndex = function (_a) {
8536
+ var _this = this;
8537
+ var value = _a.target.value;
8538
+ this.selectedIndex = -1;
8539
+ // force a refresh of the logs
8540
+ setTimeout(function () { return (_this.selectedIndex = +value); });
8541
+ };
8437
8542
  return SitesMeasurementsComponent;
8438
8543
  }());
8439
8544
  SitesMeasurementsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
8440
- 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && measurements.length\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"!isOriginal && sites.length === 1\">\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\">\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 <ng-container *ngIf=\"measurements.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"sites.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n\n <p class=\"is-size-7 is-italic\" *ngIf=\"showAreaTooBig\">\n (1) This region is >{{maxAreaSize}}km2 and is too large to reliably gap fill Measurements.\n </p>\n </ng-container>\n</div>\n\n<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\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=\"has-text-centered\">\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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__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 } });
8545
+ 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && measurements.length\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"!isOriginal\">\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\">\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 <ng-container *ngIf=\"measurements.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"sites.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n\n <p class=\"is-size-7 is-italic\" *ngIf=\"showAreaTooBig\">\n (1) This region is >{{maxAreaSize}}km2 and is too large to reliably gap fill Measurements.\n </p>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"sites.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static\">Select a Site</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of sites; let i = index\" [value]=\"i\">{{i + 1}}. {{defaultLabel(value)}}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-sites-measurements-logs *ngIf=\"selectedIndex >= 0\"\n [site]=\"sites[selectedIndex]\"\n [originalValues]=\"originalValues[selectedIndex]?.measurements\"\n [recalculatedValues]=\"sites[selectedIndex]?.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=\"has-text-centered\">\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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: i1__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
8441
8546
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, decorators: [{
8442
8547
  type: i0.Component,
8443
8548
  args: [{
@@ -9474,13 +9579,6 @@
9474
9579
  enumerable: false,
9475
9580
  configurable: true
9476
9581
  });
9477
- Object.defineProperty(ImpactAssessmentsProductsLogsComponent.prototype, "filteredType", {
9478
- get: function () {
9479
- return this.filterTermTypes.map(termTypeLabel).join(' & ');
9480
- },
9481
- enumerable: false,
9482
- configurable: true
9483
- });
9484
9582
  Object.defineProperty(ImpactAssessmentsProductsLogsComponent.prototype, "includeAllModels", {
9485
9583
  get: function () {
9486
9584
  return !(this.filterTermTypes || []).includes(schema.TermTermType.emission);
@@ -9491,7 +9589,7 @@
9491
9589
  return ImpactAssessmentsProductsLogsComponent;
9492
9590
  }());
9493
9591
  ImpactAssessmentsProductsLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ImpactAssessmentsProductsLogsComponent, deps: [{ token: HeSearchService }, { token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
9494
- ImpactAssessmentsProductsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ImpactAssessmentsProductsLogsComponent, selector: "he-impact-assessments-products-logs", inputs: { impactAssessment: "impactAssessment", key: "key", filterTermTypes: "filterTermTypes", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.ImpactAssessment\"\n [nodeKey]=\"key\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"terms\"\n [logs]=\"logs\"\n [filteredType]=\"filteredType\"\n [includeAllModels]=\"includeAllModels\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [""], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filteredType"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
9592
+ ImpactAssessmentsProductsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ImpactAssessmentsProductsLogsComponent, selector: "he-impact-assessments-products-logs", inputs: { impactAssessment: "impactAssessment", key: "key", filterTermTypes: "filterTermTypes", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.ImpactAssessment\"\n [nodeKey]=\"key\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"terms\"\n [logs]=\"logs\"\n [filterTermTypes]=\"filterTermTypes\"\n [includeAllModels]=\"includeAllModels\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [""], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "includeAllModels", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filterTermTypes"] }, { 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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
9495
9593
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ImpactAssessmentsProductsLogsComponent, decorators: [{
9496
9594
  type: i0.Component,
9497
9595
  args: [{
@@ -9519,13 +9617,6 @@
9519
9617
  View["breakdown"] = "breakdown";
9520
9618
  View["logs"] = "logs";
9521
9619
  })(View || (View = {}));
9522
- var isMethodModelAllowed = function (filterMethod) { return function (node) {
9523
- var _a, _b, _c, _d;
9524
- return filterMethod
9525
- ? ((_a = node.methodModel) === null || _a === void 0 ? void 0 : _a['@id']) === filterMethod['@id']
9526
- : (typeof glossary.getDefaultModeId((_b = node.term) === null || _b === void 0 ? void 0 : _b['@id']) === 'undefined' ||
9527
- ((_c = node.methodModel) === null || _c === void 0 ? void 0 : _c['@id']) === glossary.getDefaultModeId((_d = node.term) === null || _d === void 0 ? void 0 : _d['@id']));
9528
- }; };
9529
9620
  var ImpactAssessmentsProductsComponent = /** @class */ (function () {
9530
9621
  function ImpactAssessmentsProductsComponent(nodeService) {
9531
9622
  this.nodeService = nodeService;
@@ -9541,6 +9632,7 @@
9541
9632
  this.View = View;
9542
9633
  this.selectedView = View.table;
9543
9634
  this.methodModels = [];
9635
+ this.selectedIndex = 0;
9544
9636
  this.indicators = [];
9545
9637
  }
9546
9638
  ImpactAssessmentsProductsComponent.prototype.ngOnChanges = function (changes) {
@@ -9587,30 +9679,32 @@
9587
9679
  };
9588
9680
  ImpactAssessmentsProductsComponent.prototype.updateImpacts = function () {
9589
9681
  var _this = this;
9590
- var indicatorPerImpactAssessment = groupNodesByTerm(this.impactAssessments, this.key, this.originalValues, isMethodModelAllowed(this.selectedMethodModel));
9682
+ var indicatorPerImpactAssessment = groupNodesByTerm(this.impactAssessments, this.key, this.originalValues, this.enableFilterMethodModel ? isMethodModelAllowed(this.selectedMethodModel) : undefined);
9591
9683
  this.indicators = orderBy(grouppedKeys(indicatorPerImpactAssessment), ['value.methodTierOrder', 'key'], ['asc', 'asc'])
9592
- .filter(function (_e) {
9593
- var value = _e.value;
9684
+ .filter(function (_c) {
9685
+ var value = _c.value;
9594
9686
  return _this.termAllowed(value === null || value === void 0 ? void 0 : value.term);
9595
9687
  });
9596
9688
  };
9597
9689
  ImpactAssessmentsProductsComponent.prototype.loadDataState = function (dataState) {
9690
+ var _a, _b;
9598
9691
  return __awaiter(this, void 0, void 0, function () {
9599
- var _e, _f, _g;
9692
+ var _c, _d, _e;
9600
9693
  var _this = this;
9601
- return __generator(this, function (_h) {
9602
- switch (_h.label) {
9694
+ return __generator(this, function (_f) {
9695
+ switch (_f.label) {
9603
9696
  case 0:
9604
- _e = this.dataStateValues;
9605
- _f = dataState;
9606
- _g = this.dataStateValues[dataState];
9607
- if (_g) return [3 /*break*/, 2];
9608
- return [4 /*yield*/, Promise.all(this.impactAssessments.map(function (node) { return _this.nodeService.get(Object.assign(Object.assign({}, node), { dataState: dataState })); }))];
9609
- case 1:
9610
- _g = (_h.sent());
9611
- _h.label = 2;
9697
+ _c = this.dataStateValues;
9698
+ _d = dataState;
9699
+ if (!(((_a = this.dataStateValues[dataState]) === null || _a === void 0 ? void 0 : _a.length) === ((_b = this.impactAssessments) === null || _b === void 0 ? void 0 : _b.length))) return [3 /*break*/, 1];
9700
+ _e = this.dataStateValues[dataState];
9701
+ return [3 /*break*/, 3];
9702
+ case 1: return [4 /*yield*/, Promise.all(this.impactAssessments.map(function (node) { return _this.nodeService.get(Object.assign(Object.assign({}, node), { dataState: dataState })); }))];
9612
9703
  case 2:
9613
- _e[_f] = _g;
9704
+ _e = _f.sent();
9705
+ _f.label = 3;
9706
+ case 3:
9707
+ _c[_d] = _e;
9614
9708
  return [2 /*return*/];
9615
9709
  }
9616
9710
  });
@@ -9618,11 +9712,11 @@
9618
9712
  };
9619
9713
  ImpactAssessmentsProductsComponent.prototype.updateDataState = function () {
9620
9714
  return __awaiter(this, void 0, void 0, function () {
9621
- return __generator(this, function (_e) {
9622
- switch (_e.label) {
9715
+ return __generator(this, function (_c) {
9716
+ switch (_c.label) {
9623
9717
  case 0: return [4 /*yield*/, this.loadDataState(this.dataState)];
9624
9718
  case 1:
9625
- _e.sent();
9719
+ _c.sent();
9626
9720
  this.impactAssessments = this.dataStateValues[this.dataState].slice();
9627
9721
  return [2 /*return*/, this.update()];
9628
9722
  }
@@ -9635,8 +9729,8 @@
9635
9729
  ImpactAssessmentsProductsComponent.prototype.impactName = function (impact) {
9636
9730
  return impact.name || (impact.cycle ? this.cycleLabel(impact.cycle) : impact['@id']) || impact.id;
9637
9731
  };
9638
- ImpactAssessmentsProductsComponent.prototype.cycleLabel = function (_e) {
9639
- var id = _e["@id"], name = _e.name;
9732
+ ImpactAssessmentsProductsComponent.prototype.cycleLabel = function (_c) {
9733
+ var id = _c["@id"], name = _c.name;
9640
9734
  var _a;
9641
9735
  return name || ((_a = (this.cycles || []).find(function (v) { return v['@id'] === id; })) === null || _a === void 0 ? void 0 : _a.name);
9642
9736
  };
@@ -9651,17 +9745,24 @@
9651
9745
  return this.selected.length === 0 || this.selected.includes(impact['@id']);
9652
9746
  };
9653
9747
  // Recalculation logs
9748
+ ImpactAssessmentsProductsComponent.prototype.selectIndex = function (_c) {
9749
+ var _this = this;
9750
+ var value = _c.target.value;
9751
+ this.selectedIndex = -1;
9752
+ // force a refresh of the logs
9753
+ setTimeout(function () { return (_this.selectedIndex = +value); });
9754
+ };
9654
9755
  ImpactAssessmentsProductsComponent.prototype.showRecalculationLogs = function () {
9655
9756
  return __awaiter(this, void 0, void 0, function () {
9656
- return __generator(this, function (_e) {
9657
- switch (_e.label) {
9757
+ return __generator(this, function (_c) {
9758
+ switch (_c.label) {
9658
9759
  case 0:
9659
9760
  this.loading = true;
9660
9761
  // make sure original data is also loaded
9661
9762
  return [4 /*yield*/, this.loadDataState(api.DataState.original)];
9662
9763
  case 1:
9663
9764
  // make sure original data is also loaded
9664
- _e.sent();
9765
+ _c.sent();
9665
9766
  this.loading = false;
9666
9767
  this.selectedView = View.logs;
9667
9768
  return [2 /*return*/];
@@ -9672,7 +9773,7 @@
9672
9773
  return ImpactAssessmentsProductsComponent;
9673
9774
  }());
9674
9775
  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 });
9675
- 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && indicators.length\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"impactAssessments.length > 1 || enableBreakdown || (!isOriginal && impactAssessments.length === 1)\">\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 <ng-container *ngIf=\"indicators.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"impactAssessments.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto py-0\">\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 class=\"has-border-right\"></th>\n <th class=\"has-border-right\"></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 class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/ImpactAssessment#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th class=\"has-border-right\">\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 class=\"has-border-right\">\n <span>1 {{impactAssessment.product.units}}</span>\n </td>\n <td class=\"has-border-right\" [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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-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\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=\"has-text-centered\">\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}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: i11__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__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 } });
9776
+ 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: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && indicators.length\">\n <div class=\"column is-narrow\">\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 <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"impactAssessments.length > 1 || enableBreakdown || !isOriginal\">\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\">\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 <ng-container *ngIf=\"indicators.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"impactAssessments.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto py-0\">\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 class=\"has-border-right\"></th>\n <th class=\"has-border-right\"></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 class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/ImpactAssessment#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th class=\"has-border-right\">\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 class=\"has-border-right\">\n <span>1 {{impactAssessment.product.units}}</span>\n </td>\n <td class=\"has-border-right\" [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 </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<he-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<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"impactAssessments.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static\">Select an Impact Assessment</span>\n </div>\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\">\n <select (change)=\"selectIndex($event)\">\n <option *ngFor=\"let value of impactAssessments; let i = index\" [value]=\"i\">{{i + 1}}. {{impactName(value)}}</option>\n </select>\n </div>\n </div>\n </div>\n\n <he-impact-assessments-products-logs *ngIf=\"selectedIndex >= 0\"\n [key]=\"key\"\n [impactAssessment]=\"impactAssessments[selectedIndex]\"\n [filterTermTypes]=\"filterTermTypes\"\n [originalValues]=\"originalValues[selectedIndex][key]\"\n [recalculatedValues]=\"impactAssessments[selectedIndex][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=\"has-text-centered\">\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}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], 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: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { 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: i11__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__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 } });
9676
9777
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ImpactAssessmentsProductsComponent, decorators: [{
9677
9778
  type: i0.Component,
9678
9779
  args: [{
@@ -9904,6 +10005,7 @@
9904
10005
  exports.filterError = filterError;
9905
10006
  exports.filterParams = filterParams;
9906
10007
  exports.findConfigModels = findConfigModels;
10008
+ exports.findMatchingModel = findMatchingModel;
9907
10009
  exports.findModels = findModels;
9908
10010
  exports.findProperty = findProperty;
9909
10011
  exports.findPropertyById = findPropertyById;
@@ -9954,6 +10056,8 @@
9954
10056
  exports.measurementValue = measurementValue;
9955
10057
  exports.missingNodeErrorMessage = missingNodeErrorMessage;
9956
10058
  exports.missingNodeErrors = missingNodeErrors;
10059
+ exports.modelKeyParams = modelKeyParams;
10060
+ exports.modelParams = modelParams;
9957
10061
  exports.multiMatchQuery = multiMatchQuery;
9958
10062
  exports.nestedProperty = nestedProperty;
9959
10063
  exports.nestingEnabled = nestingEnabled;