@hestia-earth/ui-components 0.3.5 → 0.4.0

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 (35) hide show
  1. package/bundles/hestia-earth-ui-components.umd.js +142 -53
  2. package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
  3. package/common/blank-node-state/blank-node-state.component.d.ts +3 -1
  4. package/common/blank-node-state-notice/blank-node-state-notice.component.d.ts +1 -2
  5. package/cycles/cycles-activity-logs/cycles-activity-logs.component.d.ts +1 -0
  6. package/cycles/cycles-emissions-logs/cycles-emissions-logs.component.d.ts +1 -0
  7. package/cycles/cycles-practices-logs/cycles-practices-logs.component.d.ts +1 -0
  8. package/cycles/cycles-practices-timeline/cycles-practices-timeline.component.d.ts +3 -1
  9. package/engine/aggregation-engine.service.d.ts +1 -1
  10. package/engine/engine-orchestrator-edit/engine-orchestrator-edit.component.d.ts +21 -6
  11. package/engine/engine.module.d.ts +1 -1
  12. package/engine/engine.service.d.ts +10 -2
  13. package/esm2015/common/blank-node-state/blank-node-state.component.js +11 -5
  14. package/esm2015/common/blank-node-state-notice/blank-node-state-notice.component.js +2 -5
  15. package/esm2015/common/data-table/data-table.component.js +10 -6
  16. package/esm2015/common/link-key-value/link-key-value.component.js +1 -1
  17. package/esm2015/cycles/cycles-activity/cycles-activity.component.js +2 -2
  18. package/esm2015/cycles/cycles-completeness/cycles-completeness.component.js +2 -2
  19. package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +2 -2
  20. package/esm2015/cycles/cycles-functional-unit-measure/cycles-functional-unit-measure.component.js +2 -2
  21. package/esm2015/cycles/cycles-practices/cycles-practices.component.js +2 -2
  22. package/esm2015/cycles/cycles-practices-timeline/cycles-practices-timeline.component.js +4 -2
  23. package/esm2015/engine/aggregation-engine.service.js +1 -1
  24. package/esm2015/engine/engine-orchestrator-edit/engine-orchestrator-edit.component.js +73 -11
  25. package/esm2015/engine/engine.module.js +5 -5
  26. package/esm2015/engine/engine.service.js +13 -9
  27. package/esm2015/fontawesome/fontawesome.module.js +3 -3
  28. package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +2 -2
  29. package/esm2015/node/node-link/node-link.component.js +2 -6
  30. package/esm2015/node/node-logs-models/node-logs-models.model.js +3 -3
  31. package/esm2015/sites/sites-measurements/sites-measurements.component.js +2 -2
  32. package/fesm2015/hestia-earth-ui-components.js +109 -46
  33. package/fesm2015/hestia-earth-ui-components.js.map +1 -1
  34. package/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.d.ts +1 -0
  35. package/package.json +5 -5
@@ -392,7 +392,7 @@
392
392
  // free-regular
393
393
  freeRegularSvgIcons.faClone, freeRegularSvgIcons.faCircle, freeRegularSvgIcons.faIdBadge,
394
394
  // free-solid
395
- freeSolidSvgIcons.faAngleDoubleLeft, freeSolidSvgIcons.faAngleDoubleRight, freeSolidSvgIcons.faAngleDown, freeSolidSvgIcons.faAngleLeft, freeSolidSvgIcons.faAngleRight, freeSolidSvgIcons.faBookOpen, freeSolidSvgIcons.faBuilding, freeSolidSvgIcons.faCalculator, freeSolidSvgIcons.faChartBar, freeSolidSvgIcons.faCheck, freeSolidSvgIcons.faCircle, freeSolidSvgIcons.faClipboard, freeSolidSvgIcons.faClipboardList, freeSolidSvgIcons.faClone, freeSolidSvgIcons.faComments, freeSolidSvgIcons.faDownload, freeSolidSvgIcons.faDotCircle, freeSolidSvgIcons.faDrawPolygon, freeSolidSvgIcons.faEdit, freeSolidSvgIcons.faEllipsisV, freeSolidSvgIcons.faExclamationTriangle, freeSolidSvgIcons.faExternalLinkAlt, freeSolidSvgIcons.faFilter, freeSolidSvgIcons.faList, freeSolidSvgIcons.faListAlt, freeSolidSvgIcons.faLongArrowAltDown, freeSolidSvgIcons.faLongArrowAltUp, freeSolidSvgIcons.faLongArrowAltLeft, freeSolidSvgIcons.faLongArrowAltRight, freeSolidSvgIcons.faMap, freeSolidSvgIcons.faMapMarked, freeSolidSvgIcons.faMapMarkedAlt, freeSolidSvgIcons.faPlus, freeSolidSvgIcons.faPlusCircle, freeSolidSvgIcons.faSearch, freeSolidSvgIcons.faSeedling, freeSolidSvgIcons.faSpellCheck, freeSolidSvgIcons.faSpinner, freeSolidSvgIcons.faTimes, freeSolidSvgIcons.faUser);
395
+ freeSolidSvgIcons.faAngleDoubleLeft, freeSolidSvgIcons.faAngleDoubleRight, freeSolidSvgIcons.faAngleDown, freeSolidSvgIcons.faAngleLeft, freeSolidSvgIcons.faAngleRight, freeSolidSvgIcons.faBookOpen, freeSolidSvgIcons.faBuilding, freeSolidSvgIcons.faCalculator, freeSolidSvgIcons.faChartBar, freeSolidSvgIcons.faCheck, freeSolidSvgIcons.faCircle, freeSolidSvgIcons.faClipboard, freeSolidSvgIcons.faClipboardList, freeSolidSvgIcons.faClone, freeSolidSvgIcons.faComments, freeSolidSvgIcons.faDownload, freeSolidSvgIcons.faDotCircle, freeSolidSvgIcons.faDrawPolygon, freeSolidSvgIcons.faEdit, freeSolidSvgIcons.faEllipsisV, freeSolidSvgIcons.faExclamationTriangle, freeSolidSvgIcons.faExternalLinkAlt, freeSolidSvgIcons.faFilter, freeSolidSvgIcons.faList, freeSolidSvgIcons.faListAlt, freeSolidSvgIcons.faLongArrowAltDown, freeSolidSvgIcons.faLongArrowAltUp, freeSolidSvgIcons.faLongArrowAltLeft, freeSolidSvgIcons.faLongArrowAltRight, freeSolidSvgIcons.faMap, freeSolidSvgIcons.faMapMarked, freeSolidSvgIcons.faMapMarkedAlt, freeSolidSvgIcons.faPlus, freeSolidSvgIcons.faPlusCircle, freeSolidSvgIcons.faSearch, freeSolidSvgIcons.faSeedling, freeSolidSvgIcons.faSpellCheck, freeSolidSvgIcons.faSpinner, freeSolidSvgIcons.faTable, freeSolidSvgIcons.faTimes, freeSolidSvgIcons.faUser);
396
396
  }
397
397
  return HeFontawesomeModule;
398
398
  }());
@@ -1483,6 +1483,13 @@
1483
1483
  utils.toDashCase(term)
1484
1484
  ].filter(Boolean).join('-')
1485
1485
  ].join('/'); };
1486
+ var mapModelLink = function (ecoinvent) {
1487
+ if (ecoinvent === void 0) { ecoinvent = false; }
1488
+ return function (_a) {
1489
+ var path = _a.path, docPath = _a.docPath, link = __rest(_a, ["path", "docPath"]);
1490
+ return (Object.assign(Object.assign({}, link), { ecoinvent: ecoinvent, path: engineGitUrl() + "/" + path, docPath: engineGitUrl() + "/" + docPath, apiDocsPath: pathToApiDocsPath(link.model, link.term || link.modelKey) }));
1491
+ };
1492
+ };
1486
1493
  var HeEngineService = /** @class */ (function () {
1487
1494
  function HeEngineService(_calculationsBaseUrl, _orchestratorBaseUrl, http) {
1488
1495
  this._calculationsBaseUrl = _calculationsBaseUrl;
@@ -1509,11 +1516,8 @@
1509
1516
  var _this = this;
1510
1517
  this.modelsLoading = true;
1511
1518
  return this.http.get(engineRawUrl() + "/model-links.json").pipe(operators.catchError(function () { return rxjs.of({ links: [] }); }), operators.map(function (_b) {
1512
- var links = _b.links;
1513
- _this._models.next(links.map(function (_a) {
1514
- var path = _a.path, docPath = _a.docPath, link = __rest(_a, ["path", "docPath"]);
1515
- return (Object.assign(Object.assign({}, link), { path: engineGitUrl() + "/" + path, docPath: engineGitUrl() + "/" + docPath, apiDocsPath: pathToApiDocsPath(link.model, link.term || link.modelKey) }));
1516
- }));
1519
+ var links = _b.links, ecoinventLinks = _b.ecoinventLinks;
1520
+ _this._models.next(__spreadArray(__spreadArray([], __read(links.map(mapModelLink(false)))), __read((ecoinventLinks || []).map(mapModelLink(true)))));
1517
1521
  _this.modelsLoading = false;
1518
1522
  _this.modelsLoaded = true;
1519
1523
  return links;
@@ -1526,8 +1530,9 @@
1526
1530
  enumerable: false,
1527
1531
  configurable: true
1528
1532
  });
1529
- HeEngineService.prototype.models = function () {
1530
- return this.models$.pipe(operators.take(1)).toPromise();
1533
+ HeEngineService.prototype.models = function (includeEcoinvent) {
1534
+ if (includeEcoinvent === void 0) { includeEcoinvent = false; }
1535
+ return this.models$.pipe(operators.take(1), operators.mergeAll(), operators.filter(function (v) { return includeEcoinvent || v.ecoinvent; }), operators.toArray()).toPromise();
1531
1536
  };
1532
1537
  HeEngineService.prototype.model$ = function (model) {
1533
1538
  return this.models$.pipe(operators.map(function (models) { return findMatchingModel(models, model); }));
@@ -1590,6 +1595,13 @@
1590
1595
  this.engineService = engineService;
1591
1596
  this.NodeKeyState = NodeKeyState;
1592
1597
  }
1598
+ Object.defineProperty(BlankNodeStateComponent.prototype, "show", {
1599
+ get: function () {
1600
+ return this.dataState !== api.DataState.original;
1601
+ },
1602
+ enumerable: false,
1603
+ configurable: true
1604
+ });
1593
1605
  BlankNodeStateComponent.prototype.is = function (state) {
1594
1606
  return (
1595
1607
  // forcing state
@@ -1644,7 +1656,7 @@
1644
1656
  return BlankNodeStateComponent;
1645
1657
  }());
1646
1658
  BlankNodeStateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BlankNodeStateComponent, deps: [{ token: HeAggregationEngineService }, { token: HeEngineService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1647
- BlankNodeStateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: { nodeType: "nodeType", dataKey: "dataKey", key: "key", node: "node", state: "state" }, ngImport: i0__namespace, template: "<ng-container *bindOnce=\"node\">\n <span *ngFor=\"let star of stars\">*</span>\n <span *ngIf=\"is(NodeKeyState.unchanged)\">\u2020</span>\n\n <ng-container *ngIf=\"showLink\">\n <!-- <span class=\"ml-2\" *ngIf=\"is(NodeKeyState.aggregated)\">\n <ng-container *ngIf=\"aggregatedModel$ | async as model\">\n <ng-container *ngTemplateOutlet=\"docsLink; context: {$implicit: model}\"></ng-container>\n </ng-container>\n </span> -->\n\n <span class=\"ml-2\" *ngIf=\"is(NodeKeyState.added); else showUpdated\">\n <ng-container *ngIf=\"engineModel$ | async as model\">\n <ng-container *ngTemplateOutlet=\"docsLink; context: {$implicit: model}\"></ng-container>\n </ng-container>\n </span>\n </ng-container>\n</ng-container>\n\n<ng-template #showUpdated>\n <span class=\"ml-2\" *ngIf=\"is(NodeKeyState.updated)\">\n <ng-container *ngIf=\"engineModel$ | async as model\">\n <ng-container *ngTemplateOutlet=\"docsLink; context: {$implicit: model}\"></ng-container>\n </ng-container>\n </span>\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-2\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\n </a>\n</ng-template>\n", styles: [":host{display:inline-block}\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"] }], directives: [{ type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1659
+ BlankNodeStateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: { dataState: "dataState", nodeType: "nodeType", dataKey: "dataKey", key: "key", node: "node", state: "state" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"show\">\n <ng-container *bindOnce=\"node\">\n <span *ngFor=\"let star of stars\">*</span>\n <span *ngIf=\"stars.length === 0 || is(NodeKeyState.unchanged)\">\u2020</span>\n\n <ng-container *ngIf=\"showLink\">\n <!-- <span class=\"ml-2\" *ngIf=\"is(NodeKeyState.aggregated)\">\n <ng-container *ngIf=\"aggregatedModel$ | async as model\">\n <ng-container *ngTemplateOutlet=\"docsLink; context: {$implicit: model}\"></ng-container>\n </ng-container>\n </span> -->\n\n <span class=\"ml-2\" *ngIf=\"is(NodeKeyState.added); else showUpdated\">\n <ng-container *ngIf=\"engineModel$ | async as model\">\n <ng-container *ngTemplateOutlet=\"docsLink; context: {$implicit: model}\"></ng-container>\n </ng-container>\n </span>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #showUpdated>\n <span class=\"ml-2\" *ngIf=\"is(NodeKeyState.updated)\">\n <ng-container *ngIf=\"engineModel$ | async as model\">\n <ng-container *ngTemplateOutlet=\"docsLink; context: {$implicit: model}\"></ng-container>\n </ng-container>\n </span>\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-2\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\n </a>\n</ng-template>\n", styles: [":host{display:inline-block}\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"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1648
1660
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BlankNodeStateComponent, decorators: [{
1649
1661
  type: i0.Component,
1650
1662
  args: [{
@@ -1653,7 +1665,9 @@
1653
1665
  styleUrls: ['./blank-node-state.component.scss'],
1654
1666
  changeDetection: i0.ChangeDetectionStrategy.OnPush
1655
1667
  }]
1656
- }], ctorParameters: function () { return [{ type: HeAggregationEngineService }, { type: HeEngineService }]; }, propDecorators: { nodeType: [{
1668
+ }], ctorParameters: function () { return [{ type: HeAggregationEngineService }, { type: HeEngineService }]; }, propDecorators: { dataState: [{
1669
+ type: i0.Input
1670
+ }], nodeType: [{
1657
1671
  type: i0.Input
1658
1672
  }], dataKey: [{
1659
1673
  type: i0.Input
@@ -1669,7 +1683,6 @@
1669
1683
  function BlankNodeStateNoticeComponent() {
1670
1684
  this.showAggregated = true;
1671
1685
  this.showDeleted = false;
1672
- this.showUnchanged = false;
1673
1686
  }
1674
1687
  Object.defineProperty(BlankNodeStateNoticeComponent.prototype, "show", {
1675
1688
  get: function () {
@@ -1681,7 +1694,7 @@
1681
1694
  return BlankNodeStateNoticeComponent;
1682
1695
  }());
1683
1696
  BlankNodeStateNoticeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BlankNodeStateNoticeComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1684
- BlankNodeStateNoticeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: { dataState: "dataState", showAggregated: "showAggregated", showDeleted: "showDeleted", showUnchanged: "showUnchanged" }, ngImport: i0__namespace, template: "<p class=\"is-size-7 is-italic\" *ngIf=\"show\">\n <span>Recalculations:</span>\n <span class=\"pl-1 notice-data-added\">* Data Added</span>\n <span class=\"pl-1 notice-data-updated\">** Data Updated</span>\n <span *ngIf=\"showAggregated\" class=\"pl-1 notice-data-aggregated\">*** Data Aggregated</span>\n <span *ngIf=\"showDeleted\" class=\"pl-1 notice-data-deleted\">**** Data Deleted</span>\n <span *ngIf=\"showUnchanged\" class=\"pl-1 notice-data-unchaged\">\u2020 Data Unchanged</span>\n</p>\n", styles: [""], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1697
+ BlankNodeStateNoticeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: { dataState: "dataState", showAggregated: "showAggregated", showDeleted: "showDeleted" }, ngImport: i0__namespace, template: "<p class=\"is-size-7 is-italic\" *ngIf=\"show\">\n <span class=\"pl-1 notice-data-unchaged\">\u2020 Data uploaded by the user</span>\n <span class=\"pl-1 notice-data-added\">* Data added by Hestia</span>\n <span class=\"pl-1 notice-data-updated\">** Data updated by Hestia</span>\n <span *ngIf=\"showAggregated\" class=\"pl-1 notice-data-aggregated\">*** Data aggregated by Hestia</span>\n <span *ngIf=\"showDeleted\" class=\"pl-1 notice-data-deleted\">**** Data deleted by Hestia</span>\n</p>\n", styles: [""], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1685
1698
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BlankNodeStateNoticeComponent, decorators: [{
1686
1699
  type: i0.Component,
1687
1700
  args: [{
@@ -1696,8 +1709,6 @@
1696
1709
  type: i0.Input
1697
1710
  }], showDeleted: [{
1698
1711
  type: i0.Input
1699
- }], showUnchanged: [{
1700
- type: i0.Input
1701
1712
  }] } });
1702
1713
 
1703
1714
  var SUCCESS_CRITERION_MAX_DELTA_PERCENT = 5;
@@ -1837,14 +1848,15 @@
1837
1848
  }] } });
1838
1849
 
1839
1850
  var scrollbarHeight = 20; // account for scrollbar on non-touch devices
1851
+ var defaultSize = '100%';
1840
1852
  var DataTableComponent = /** @class */ (function () {
1841
1853
  function DataTableComponent(el) {
1842
1854
  this.el = el;
1843
1855
  this.minHeight = 100;
1844
1856
  this.nbRows = 20;
1845
1857
  this.small = false;
1846
- this.height = '100%';
1847
- this.width = '100%';
1858
+ this.height = defaultSize;
1859
+ this.width = defaultSize;
1848
1860
  }
1849
1861
  Object.defineProperty(DataTableComponent.prototype, "isSmall", {
1850
1862
  get: function () {
@@ -1866,7 +1878,8 @@
1866
1878
  };
1867
1879
  Object.defineProperty(DataTableComponent.prototype, "nbHeaders", {
1868
1880
  get: function () {
1869
- return this.el.nativeElement.querySelectorAll('.table thead tr').length;
1881
+ var _a, _b, _c;
1882
+ return ((_c = (_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.querySelectorAll('.table thead tr')) === null || _c === void 0 ? void 0 : _c.length) || 1;
1870
1883
  },
1871
1884
  enumerable: false,
1872
1885
  configurable: true
@@ -1879,13 +1892,15 @@
1879
1892
  configurable: true
1880
1893
  });
1881
1894
  DataTableComponent.prototype.updateTableSize = function () {
1895
+ var _a, _b, _c, _d;
1882
1896
  var height = this.nbRows
1883
1897
  ? this.rowHeight * (this.nbHeaders + this.nbRows) + scrollbarHeight
1884
- : this.el.nativeElement.offsetHeight;
1898
+ : (_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.offsetHeight;
1885
1899
  height = this.maxHeight ? Math.min(height, this.maxHeight) : height;
1886
1900
  height = this.minHeight ? Math.max(height, this.minHeight) : height;
1887
1901
  this.height = height + "px";
1888
- this.width = this.el.nativeElement.offsetWidth + "px";
1902
+ var width = (_d = (_c = this.el) === null || _c === void 0 ? void 0 : _c.nativeElement) === null || _d === void 0 ? void 0 : _d.offsetWidth;
1903
+ this.width = width ? width + "px" : defaultSize;
1889
1904
  };
1890
1905
  return DataTableComponent;
1891
1906
  }());
@@ -1991,7 +2006,7 @@
1991
2006
  return LinkKeyValueComponent;
1992
2007
  }());
1993
2008
  LinkKeyValueComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkKeyValueComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1994
- LinkKeyValueComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: { node: "node", nodeType: "nodeType", dataKey: "dataKey", key: "key" }, host: { properties: { "class.is-inline-block": "this.isInlineBlock" } }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!isUndefined\">\n <ng-container *bindOnce=\"node\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n <span class=\"pr-2\">:</span>\n\n <ng-container *ngIf=\"isArray; else singleValue\">\n <div class=\"array-container pl-2\">\n <p *ngFor=\"let v of value\" [innerHtml]=\"toString(v) | precision:3\"></p>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #singleValue>\n <div class=\"is-inline-block pr-1\" [innerHtml]=\"valueString | precision:3\"></div>\n\n <he-blank-node-state\n [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"\n ></he-blank-node-state>\n</ng-template>\n", styles: [":host{display:block}.array-container{max-height:100px;overflow-y:auto}\n"], components: [{ type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "precision": PrecisionPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2009
+ LinkKeyValueComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: { node: "node", nodeType: "nodeType", dataKey: "dataKey", key: "key" }, host: { properties: { "class.is-inline-block": "this.isInlineBlock" } }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!isUndefined\">\n <ng-container *bindOnce=\"node\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n <span class=\"pr-2\">:</span>\n\n <ng-container *ngIf=\"isArray; else singleValue\">\n <div class=\"array-container pl-2\">\n <p *ngFor=\"let v of value\" [innerHtml]=\"toString(v) | precision:3\"></p>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #singleValue>\n <div class=\"is-inline-block pr-1\" [innerHtml]=\"valueString | precision:3\"></div>\n\n <he-blank-node-state\n [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"\n ></he-blank-node-state>\n</ng-template>\n", styles: [":host{display:block}.array-container{max-height:100px;overflow-y:auto}\n"], components: [{ type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "precision": PrecisionPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1995
2010
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkKeyValueComponent, decorators: [{
1996
2011
  type: i0.Component,
1997
2012
  args: [{
@@ -5380,9 +5395,6 @@
5380
5395
  type: i0.Input
5381
5396
  }] } });
5382
5397
 
5383
- var skipState = [
5384
- schema.NodeType.Term
5385
- ];
5386
5398
  var NodeLinkComponent = /** @class */ (function () {
5387
5399
  function NodeLinkComponent() {
5388
5400
  this.showExternalLink = false;
@@ -5401,7 +5413,7 @@
5401
5413
  this.node['@type'].toLowerCase(),
5402
5414
  this.id
5403
5415
  ].filter(Boolean).join('/');
5404
- return "" + url + (skipState.includes(this.node['@type']) ? '' : "?dataState=" + api.DataState.recalculated);
5416
+ return "" + url + (this.node.aggregated ? "?dataState=" + api.DataState.recalculated : '');
5405
5417
  },
5406
5418
  enumerable: false,
5407
5419
  configurable: true
@@ -5707,7 +5719,7 @@
5707
5719
  'runRequired' in log ||
5708
5720
  (withOrchestrator && 'shouldRunOrchestrator' in log));
5709
5721
  };
5710
- var isRecalculated = function (values, key) {
5722
+ var isRecalculated$1 = function (values, key) {
5711
5723
  if (key === void 0) { key = 'value'; }
5712
5724
  return values.some(function (v) { return (__spreadArray(__spreadArray([], __read((v.added || []))), __read((v.updated || [])))).includes(key); });
5713
5725
  };
@@ -5792,7 +5804,7 @@
5792
5804
  .filter(function (v) { return !!v.model; }),
5793
5805
  originalValue: blankNodeValue(original, key),
5794
5806
  recalculatedValue: blankNodeValue(recalculated, key),
5795
- isRecalculated: isRecalculated(recalculated, key),
5807
+ isRecalculated: isRecalculated$1(recalculated, key),
5796
5808
  isRequired: true
5797
5809
  }); })
5798
5810
  .filter(function (v) { return v.configModels.length > 0; })
@@ -5837,9 +5849,9 @@
5837
5849
  (termType && findMatchingModel(models, modelKeyParams(node, termType))) ||
5838
5850
  findMatchingModel(models, modelKeyParams(node, (subValue === null || subValue === void 0 ? void 0 : subValue.key) + "." + methodId)) ||
5839
5851
  // handle "input.price"
5840
- findMatchingModel(models, modelKeyParams(node, type.toLowerCase() + "." + (subValue === null || subValue === void 0 ? void 0 : subValue.key))) ||
5852
+ findMatchingModel(models, modelKeyParams(node, (type === null || type === void 0 ? void 0 : type.toLowerCase()) + "." + (subValue === null || subValue === void 0 ? void 0 : subValue.key))) ||
5841
5853
  // handle "input.hestiaAggregatedData"
5842
- findMatchingModel(models, modelKeyParams(node, type.toLowerCase() + "." + methodId))
5854
+ findMatchingModel(models, modelKeyParams(node, (type === null || type === void 0 ? void 0 : type.toLowerCase()) + "." + methodId))
5843
5855
  };
5844
5856
  };
5845
5857
  };
@@ -5916,7 +5928,7 @@
5916
5928
  recalculated: recalculated,
5917
5929
  recalculatedValue: reduceValues(recalculated, termId),
5918
5930
  isOriginal: !!original.length,
5919
- isRecalculated: isRecalculated(recalculated),
5931
+ isRecalculated: isRecalculated$1(recalculated),
5920
5932
  hasData: hasData,
5921
5933
  isRequired: isRequired,
5922
5934
  logs: termLogs,
@@ -6380,7 +6392,7 @@
6380
6392
  return CyclesFunctionalUnitMeasureComponent;
6381
6393
  }());
6382
6394
  CyclesFunctionalUnitMeasureComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesFunctionalUnitMeasureComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6383
- CyclesFunctionalUnitMeasureComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: { cycle: "cycle" }, ngImport: i0__namespace, template: "<span class=\"pl-1\" [ngSwitch]=\"cycle?.functionalUnit\">\n <ng-container *ngSwitchCase=\"CycleFunctionalUnit['1 ha']\">1 hectare</ng-container>\n <ng-container *ngSwitchDefault>relative</ng-container>\n</span>\n", styles: [""], directives: [{ type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6395
+ CyclesFunctionalUnitMeasureComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: { cycle: "cycle" }, ngImport: i0__namespace, template: "<span class=\"is-nowrap has-text-ellipsis\" [ngSwitch]=\"cycle?.functionalUnit\" [attr.title]=\"cycle?.functionalUnit\">\n <ng-container *ngSwitchCase=\"CycleFunctionalUnit['1 ha']\">1 hectare</ng-container>\n <ng-container *ngSwitchDefault>relative</ng-container>\n</span>\n", styles: [":host{display:inline-block}\n"], directives: [{ type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6384
6396
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesFunctionalUnitMeasureComponent, decorators: [{
6385
6397
  type: i0.Component,
6386
6398
  args: [{
@@ -6496,7 +6508,7 @@
6496
6508
  return CyclesActivityComponent;
6497
6509
  }());
6498
6510
  CyclesActivityComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesActivityComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6499
- CyclesActivityComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesActivityComponent, selector: "he-cycles-activity", inputs: { originalValues: "originalValues", cycles: "cycles", 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>\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 } });
6511
+ CyclesActivityComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesActivityComponent, selector: "he-cycles-activity", inputs: { originalValues: "originalValues", cycles: "cycles", 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>\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\" [dataState]=\"dataState\"\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\" [dataState]=\"dataState\"\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: ["dataState", "nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { 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 } });
6500
6512
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesActivityComponent, decorators: [{
6501
6513
  type: i0.Component,
6502
6514
  args: [{
@@ -6538,7 +6550,7 @@
6538
6550
  return CyclesCompletenessComponent;
6539
6551
  }());
6540
6552
  CyclesCompletenessComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesCompletenessComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6541
- CyclesCompletenessComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesCompletenessComponent, selector: "he-cycles-completeness", inputs: { cycles: "cycles", dataState: "dataState" }, ngImport: i0__namespace, template: "<div class=\"p-3\" *ngIf=\"cycles.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 *ngFor=\"let completeness of completenessKeys\"\n [attr.title]=\"completeness\"\n ><a [href]=\"baseUrl + '/schema/Completeness#' + completeness\" target=\"_blank\">{{keyToLabel(completeness)}}</a></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let completeness of completenessKeys\">\n <span>{{cycle.dataCompleteness[completeness] ? 'Complete' : 'Incomplete'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"cycle.dataCompleteness\"\n [key]=\"completeness\"\n ></he-blank-node-state>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showAggregated]=\"false\"></he-blank-node-state-notice>\n</div>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No completeness data</span>\n </div>\n</ng-template>\n", styles: [""], components: [{ 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"] }], directives: [{ 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 });
6553
+ CyclesCompletenessComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesCompletenessComponent, selector: "he-cycles-completeness", inputs: { cycles: "cycles", dataState: "dataState" }, ngImport: i0__namespace, template: "<div class=\"p-3\" *ngIf=\"cycles.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 *ngFor=\"let completeness of completenessKeys\"\n [attr.title]=\"completeness\"\n ><a [href]=\"baseUrl + '/schema/Completeness#' + completeness\" target=\"_blank\">{{keyToLabel(completeness)}}</a></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr>\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let completeness of completenessKeys\">\n <span>{{cycle.dataCompleteness[completeness] ? 'Complete' : 'Incomplete'}}</span>\n <he-blank-node-state class=\"ml-1\" [dataState]=\"dataState\"\n [node]=\"cycle.dataCompleteness\"\n [key]=\"completeness\"\n ></he-blank-node-state>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showAggregated]=\"false\"></he-blank-node-state-notice>\n</div>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No completeness data</span>\n </div>\n</ng-template>\n", styles: [""], components: [{ 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: ["dataState", "nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }], directives: [{ 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 });
6542
6554
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesCompletenessComponent, decorators: [{
6543
6555
  type: i0.Component,
6544
6556
  args: [{
@@ -6795,7 +6807,7 @@
6795
6807
  return CyclesEmissionsComponent;
6796
6808
  }());
6797
6809
  CyclesEmissionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesEmissionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6798
- CyclesEmissionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesEmissionsComponent, selector: "he-cycles-emissions", inputs: { originalValues: "originalValues", cycles: "cycles", 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>\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\"\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"] }, { 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 } });
6810
+ CyclesEmissionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesEmissionsComponent, selector: "he-cycles-emissions", inputs: { originalValues: "originalValues", cycles: "cycles", 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>\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\" [dataState]=\"dataState\"\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\"\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: ["dataState", "nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { type: CyclesEmissionsChartComponent, selector: "he-cycles-emissions-chart", inputs: ["cycles"] }, { 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 } });
6799
6811
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesEmissionsComponent, decorators: [{
6800
6812
  type: i0.Component,
6801
6813
  args: [{
@@ -6843,7 +6855,7 @@
6843
6855
  return CyclesPracticesTimelineComponent;
6844
6856
  }());
6845
6857
  CyclesPracticesTimelineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesTimelineComponent, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
6846
- CyclesPracticesTimelineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: { filterTermTypes: "filterTermTypes", cycle: "cycle" }, ngImport: i0__namespace, template: "<ul class=\"content pl-4 ml-4 pb-4\">\n <li class=\"is-relative m-0\"\n *ngFor=\"let practice of practices | sortBy:['startDate','endDate']:['asc','asc']; trackBy: trackByPractice\"\n >\n <div class=\"is-relative\"\n [style.width]=\"lineWidth + 'px'\"\n >\n <span *ngIf=\"practice.startDate\">{{practice.startDate | date:'YYYY-MM-dd'}}</span>\n <span *ngIf=\"!practice.startDate\">\n <ng-container *ngIf=\"practice.term?.termType === TermTermType.operation\">No date</ng-container>\n </span>\n <span class=\"px-1\"\n [class.is-invisible]=\"!practice.startDate || !practice.endDate\"\n >-</span>\n <span\n [class.is-invisible]=\"!practice.endDate\"\n >{{(practice.endDate || now) | date:'YYYY-MM-dd'}}</span>\n <span class=\"pl-4\">{{practice.term.name}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"practice\"\n key=\"value\"\n ></he-blank-node-state>\n </div>\n </li>\n</ul>\n", styles: ["ul{max-height:400px;overflow-y:auto}ul li{width:4px;padding-top:20px;background:#485fc7}ul li:after{content:\"\";position:absolute;left:50%;bottom:2px;transform:translate(-50%);width:20px;height:20px;border-radius:50%;background:inherit}ul li>div{width:600px;margin-left:24px}ul li>div>span{display:inline-block}ul li>div>span:nth-child(1),ul li>div>span:nth-child(3){width:94px}\n"], components: [{ type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "sortBy": SortByPipe, "date": i2__namespace.DatePipe } });
6858
+ CyclesPracticesTimelineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: { filterTermTypes: "filterTermTypes", dataState: "dataState", cycle: "cycle" }, ngImport: i0__namespace, template: "<ul class=\"content pl-4 ml-4 pb-4\">\n <li class=\"is-relative m-0\"\n *ngFor=\"let practice of practices | sortBy:['startDate','endDate']:['asc','asc']; trackBy: trackByPractice\"\n >\n <div class=\"is-relative\"\n [style.width]=\"lineWidth + 'px'\"\n >\n <span *ngIf=\"practice.startDate\">{{practice.startDate | date:'YYYY-MM-dd'}}</span>\n <span *ngIf=\"!practice.startDate\">\n <ng-container *ngIf=\"practice.term?.termType === TermTermType.operation\">No date</ng-container>\n </span>\n <span class=\"px-1\"\n [class.is-invisible]=\"!practice.startDate || !practice.endDate\"\n >-</span>\n <span\n [class.is-invisible]=\"!practice.endDate\"\n >{{(practice.endDate || now) | date:'YYYY-MM-dd'}}</span>\n <span class=\"pl-4\">{{practice.term.name}}</span>\n <he-blank-node-state class=\"ml-1\" [dataState]=\"dataState\"\n [node]=\"practice\"\n key=\"value\"\n ></he-blank-node-state>\n </div>\n </li>\n</ul>\n", styles: ["ul{max-height:400px;overflow-y:auto}ul li{width:4px;padding-top:20px;background:#485fc7}ul li:after{content:\"\";position:absolute;left:50%;bottom:2px;transform:translate(-50%);width:20px;height:20px;border-radius:50%;background:inherit}ul li>div{width:600px;margin-left:24px}ul li>div>span{display:inline-block}ul li>div>span:nth-child(1),ul li>div>span:nth-child(3){width:94px}\n"], components: [{ type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["dataState", "nodeType", "dataKey", "key", "node", "state"] }], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "sortBy": SortByPipe, "date": i2__namespace.DatePipe } });
6847
6859
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesTimelineComponent, decorators: [{
6848
6860
  type: i0.Component,
6849
6861
  args: [{
@@ -6853,6 +6865,8 @@
6853
6865
  }]
6854
6866
  }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { filterTermTypes: [{
6855
6867
  type: i0.Input
6868
+ }], dataState: [{
6869
+ type: i0.Input
6856
6870
  }], cycle: [{
6857
6871
  type: i0.Input
6858
6872
  }] } });
@@ -6963,7 +6977,7 @@
6963
6977
  return CyclesPracticesComponent;
6964
6978
  }());
6965
6979
  CyclesPracticesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6966
- CyclesPracticesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesComponent, selector: "he-cycles-practices", inputs: { originalValues: "originalValues", cycles: "cycles", 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>\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 } });
6980
+ CyclesPracticesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesComponent, selector: "he-cycles-practices", inputs: { originalValues: "originalValues", cycles: "cycles", 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>\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\" [dataState]=\"dataState\"\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\"></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 [dataState]=\"dataState\"\n [cycle]=\"cycles[0]\" [filterTermTypes]=\"timelineTermType\"\n ></he-cycles-practices-timeline>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n</div>\n\n<ng-container *ngIf=\"selectedView === View.logs && !isOriginal\">\n <div class=\"field has-addons pt-2 px-3\" *ngIf=\"cycles.length > 1\">\n <div class=\"control\">\n <span class=\"button is-small is-static\">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: ["dataState", "nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { type: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: ["filterTermTypes", "dataState", "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 } });
6967
6981
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, decorators: [{
6968
6982
  type: i0.Component,
6969
6983
  args: [{
@@ -7148,41 +7162,87 @@
7148
7162
  var gitUrl = gitHome + "/hestia-engine-orchestrator/-/blob/" + gitBranch();
7149
7163
  var generalDocsUrl = gitUrl + "/hestia_earth/orchestrator/config/README.md";
7150
7164
  var strategiesDocs = gitUrl + "/hestia_earth/orchestrator/strategies";
7165
+ var schemaTypeKeys = Object.keys(schema.SchemaType);
7166
+ var toSchemaType = function (value) { return utils.keyToLabel(value).replace(/\s/g, ''); };
7167
+ var isSchemaType = function (value) { return [
7168
+ schemaTypeKeys.includes(value),
7169
+ schemaTypeKeys.includes(pluralize__namespace(value, 1)),
7170
+ schemaTypeKeys.includes(pluralize__namespace(toSchemaType(value), 1))
7171
+ ].some(Boolean); };
7172
+ var isGapFilled = function (_b) {
7173
+ var runStrategy = _b.runStrategy, mergeStrategy = _b.mergeStrategy, mergeArgs = _b.mergeArgs;
7174
+ return [
7175
+ 'add_blank_node_if_missing',
7176
+ 'add_key_if_missing'
7177
+ ].includes(runStrategy) && (mergeStrategy !== 'list' || !(mergeArgs === null || mergeArgs === void 0 ? void 0 : mergeArgs.replaceThreshold));
7178
+ };
7179
+ var isRecalculated = function (_b) {
7180
+ var runStrategy = _b.runStrategy, mergeStrategy = _b.mergeStrategy, mergeArgs = _b.mergeArgs;
7181
+ return [
7182
+ 'add_blank_node_if_missing',
7183
+ 'add_key_if_missing'
7184
+ ].includes(runStrategy) && (mergeStrategy === 'list' && (mergeArgs === null || mergeArgs === void 0 ? void 0 : mergeArgs.replaceThreshold));
7185
+ };
7186
+ var filterGapFilled = function (configs, onlyGapFilled) { return configs.map(function (model) { return Array.isArray(model) ? model.filter(isGapFilled) : model; })
7187
+ .filter(function (model) { return !onlyGapFilled || (Array.isArray(model) ? model.length > 0 : isGapFilled(model)); }); };
7188
+ var modelKeyName = function (modelKey) { return modelKey.includes('.') ? modelKey.split('.')[1] : modelKey; };
7189
+ var groupConfig = function (configs) { return rxjs.from(configs.flat()).pipe(operators.filter(function (_b) {
7190
+ var key = _b.key;
7191
+ return isSchemaType(key);
7192
+ }), operators.groupBy(function (_b) {
7193
+ var key = _b.key;
7194
+ return key;
7195
+ }), operators.mergeMap(function (group) { return group.pipe(operators.toArray()); }), operators.reduce(function (prev, curr) {
7196
+ var key = curr[0].key;
7197
+ prev[toSchemaType(key)] = curr;
7198
+ return prev;
7199
+ }, {}))
7200
+ .toPromise(); };
7151
7201
  var EngineOrchestratorEditComponent = /** @class */ (function () {
7152
7202
  function EngineOrchestratorEditComponent(hestiaEngineService) {
7153
7203
  this.hestiaEngineService = hestiaEngineService;
7204
+ this.modelKeyName = modelKeyName;
7205
+ this.isArray = Array.isArray;
7154
7206
  this.generalDocsUrl = generalDocsUrl;
7155
7207
  this.strategiesDocs = strategiesDocs;
7208
+ this.onlyGapFilled = false;
7209
+ this.displayBy = 'list';
7210
+ this.showDisplayBy = false;
7156
7211
  }
7157
7212
  EngineOrchestratorEditComponent.prototype.ngOnChanges = function (changes) {
7213
+ var _a;
7214
+ if ((_a = changes.config) === null || _a === void 0 ? void 0 : _a.currentValue) {
7215
+ this.allModels = this.config.models;
7216
+ return this.filterModels();
7217
+ }
7158
7218
  if ('nodeType' in changes) {
7159
7219
  return this.loadDefaultConfig();
7160
7220
  }
7161
7221
  };
7162
7222
  EngineOrchestratorEditComponent.prototype.loadDefaultConfig = function () {
7163
7223
  return __awaiter(this, void 0, void 0, function () {
7164
- var _a;
7224
+ var models;
7165
7225
  return __generator(this, function (_b) {
7166
7226
  switch (_b.label) {
7167
- case 0:
7168
- _a = this;
7169
- return [4 /*yield*/, this.hestiaEngineService.ochestratorConfig(this.nodeType)];
7227
+ case 0: return [4 /*yield*/, this.hestiaEngineService.ochestratorConfig(this.nodeType)];
7170
7228
  case 1:
7171
- _a.config = _b.sent();
7172
- return [2 /*return*/];
7229
+ models = (_b.sent()).models;
7230
+ this.allModels = models;
7231
+ return [2 /*return*/, this.filterModels()];
7173
7232
  }
7174
7233
  });
7175
7234
  });
7176
7235
  };
7177
- EngineOrchestratorEditComponent.prototype.isArray = function (config) {
7178
- return Array.isArray(config);
7236
+ EngineOrchestratorEditComponent.prototype.trackByKey = function (_index, _b) {
7237
+ var key = _b.key;
7238
+ return key;
7179
7239
  };
7180
- EngineOrchestratorEditComponent.prototype.modelLink$ = function (_a) {
7181
- var model = _a.model, value = _a.value;
7240
+ EngineOrchestratorEditComponent.prototype.modelLink$ = function (_b) {
7241
+ var model = _b.model, value = _b.value;
7182
7242
  return this.hestiaEngineService.model$({ model: model, term: value });
7183
7243
  };
7184
- EngineOrchestratorEditComponent.prototype.modelPathLink$ = function (_a) {
7185
- var model = _a.model, value = _a.value;
7244
+ EngineOrchestratorEditComponent.prototype.modelPathLink$ = function (_b) {
7245
+ var model = _b.model, value = _b.value;
7186
7246
  return this.hestiaEngineService.model$({
7187
7247
  path: engineGitUrl() + "/hestia_earth/models/" + model + "/" + (value || '').replace('.', '/') + ".py"
7188
7248
  });
@@ -7194,10 +7254,39 @@
7194
7254
  enumerable: false,
7195
7255
  configurable: true
7196
7256
  });
7257
+ EngineOrchestratorEditComponent.prototype.modelKeyUrl = function (_b, model) {
7258
+ var modelKey = _b.modelKey;
7259
+ var parts = modelKey.split('.');
7260
+ var schemaType = parts.length === 2 ? parts[0] : model;
7261
+ var url = [
7262
+ baseUrl(),
7263
+ 'schema',
7264
+ toSchemaType(schemaType)
7265
+ ].filter(Boolean).join('/');
7266
+ return isSchemaType(schemaType) ? url + "#" + parts.pop() : null;
7267
+ };
7268
+ EngineOrchestratorEditComponent.prototype.filterModels = function () {
7269
+ var _this = this;
7270
+ setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
7271
+ var _a, _b;
7272
+ return __generator(this, function (_c) {
7273
+ switch (_c.label) {
7274
+ case 0:
7275
+ this.models = filterGapFilled(this.allModels, this.onlyGapFilled);
7276
+ _b = this;
7277
+ return [4 /*yield*/, groupConfig(this.models)];
7278
+ case 1:
7279
+ _b.groupedModels = _c.sent();
7280
+ this.selectedGroupedKey = (_a = Object.keys(this.groupedModels)) === null || _a === void 0 ? void 0 : _a[0];
7281
+ return [2 /*return*/];
7282
+ }
7283
+ });
7284
+ }); });
7285
+ };
7197
7286
  return EngineOrchestratorEditComponent;
7198
7287
  }());
7199
7288
  EngineOrchestratorEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EngineOrchestratorEditComponent, deps: [{ token: HeEngineService }], target: i0__namespace.ɵɵFactoryTarget.Component });
7200
- EngineOrchestratorEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EngineOrchestratorEditComponent, selector: "he-engine-orchestrator-edit", inputs: { config: "config", nodeType: "nodeType" }, usesOnChanges: true, ngImport: i0__namespace, template: "<p>\n <i>The configuration below is a preview of the <a [href]=\"configUrl\" target=\"_blank\">JSON configuration file</a> used for the orchestration of the Hestia's calculations.</i>\n</p>\n<p>\n <i>Note: not all models might be represented accurately.</i>\n</p>\n\n<div class=\"pl-3 model-parallel my-3\">\n <p class=\"is-size-7\"><i>Models running in parallel</i></p>\n</div>\n\n<div *ngIf=\"config\">\n <div class=\"pl-3\">\n <ng-container *ngTemplateOutlet=\"models;context:{$implicit:config.models}\"></ng-container>\n </div>\n</div>\n\n<ng-template #models let-data>\n <div *ngFor=\"let v of data\">\n <ng-container *ngTemplateOutlet=\"model;context:{$implicit:v}\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #model let-data>\n <ng-container *ngIf=\"isArray(data)\">\n <div class=\"pl-3 model-parallel\">\n <ng-container *ngTemplateOutlet=\"models;context:{$implicit:data}\"></ng-container>\n </div>\n\n <hr>\n </ng-container>\n <ng-container *ngIf=\"!isArray(data)\">\n <div class=\"card mb-2 model-serie is-size-6\">\n <div class=\"card-content p-3\">\n <span class=\"is-capitalized\">{{data.key | keyToLabel}}</span>:\n <ng-template #defaultView>\n <span>{{data.value}}</span>\n\n <p>\n <span class=\"pr-1\">Model:</span>\n <span>{{data.model | keyToLabel}}</span>\n </p>\n </ng-template>\n\n <ng-template #modelFromPathLink>\n <ng-container *ngIf=\"modelPathLink$(data) | async as link; else defaultView\">\n <ng-container *ngTemplateOutlet=\"modelPathLink;context:{model:data.model, link:link}\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"modelLink$(data) | async as link; else modelFromPathLink\">\n <ng-container *ngTemplateOutlet=\"modelLink;context:{model:data.model, link:link}\"></ng-container>\n </ng-container>\n\n <div *ngIf=\"data.runStrategy\">\n <span class=\"pr-1\">Run strategy:</span>\n <ng-container *ngTemplateOutlet=\"strategiesLink;context:{strategy:data.runStrategy,type:'run'}\"></ng-container>\n\n <div class=\"pl-3 is-size-7\" *ngIf=\"data.runArgs\">\n <p><b>Run arguments:</b></p>\n <ng-container *ngTemplateOutlet=\"strategiesArgs;context:{$implicit:data.runArgs}\"></ng-container>\n </div>\n </div>\n <div *ngIf=\"data.mergeStrategy\">\n <span class=\"pr-1\">Merge strategy:</span>\n <ng-container *ngTemplateOutlet=\"strategiesLink;context:{strategy:data.mergeStrategy,type:'merge'}\"></ng-container>\n\n <div class=\"pl-3 is-size-7\" *ngIf=\"data.mergeArgs\">\n <p><b>Merge arguments:</b></p>\n <ng-container *ngTemplateOutlet=\"strategiesArgs;context:{$implicit:data.mergeArgs}\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #modelLink let-model=\"model\" let-link=\"link\">\n <he-node-link *ngIf=\"link.term\" [node]=\"{'@type':'Term','@id':link.term}\" [showExternalLink]=\"true\">\n <span>{{link.term | keyToLabel}}</span>\n </he-node-link>\n\n <span *ngIf=\"link.modelKey\">{{link.modelKey}}</span>\n\n <p>\n <span class=\"pr-1\">Model:</span>\n <span class=\"pr-2\">{{model | keyToLabel}}</span>\n\n <a class=\"is-size-7\" [href]=\"link.docPath\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n </p>\n</ng-template>\n\n<ng-template #modelPathLink let-model=\"model\" let-link=\"link\">\n <span *ngIf=\"link.modelKey\">{{link.modelKey}}</span>\n\n <p>\n <span class=\"pr-1\">Model:</span>\n <span class=\"pr-2\">{{model | keyToLabel}}</span>\n\n <a class=\"is-size-7\" [href]=\"link.docPath\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n </p>\n</ng-template>\n\n<ng-template #strategiesLink let-strategy=\"strategy\" let-type=\"type\">\n <span class=\"pr-2\"><code>{{strategy}}</code></span>\n\n <a class=\"is-size-7\" [href]=\"strategiesDocs + '/' + type + '/' + (type === 'merge' ? 'merge_' : '') + strategy + '.md'\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n</ng-template>\n\n<ng-template #strategiesArgs let-args>\n <div class=\"pl-2\">\n <p *ngFor=\"let arg of args | keys\">\n <span class=\"has-text-underline\">{{arg.key}}</span>: <code>{{arg.value | json}}</code>\n </p>\n </div>\n</ng-template>\n", styles: [":host{display:block}.model-parallel{border-left:3px solid #7a7a7a}\n"], components: [{ type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { 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"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "keyToLabel": KeyToLabelPipe, "async": i2__namespace.AsyncPipe, "keys": KeysPipe, "json": i2__namespace.JsonPipe } });
7289
+ EngineOrchestratorEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EngineOrchestratorEditComponent, selector: "he-engine-orchestrator-edit", inputs: { config: "config", nodeType: "nodeType" }, usesOnChanges: true, ngImport: i0__namespace, template: "<p>\n <i>The configuration below is a preview of the <a [href]=\"configUrl\" target=\"_blank\">JSON configuration file</a> used for the orchestration of the Hestia's calculations.</i>\n</p>\n<p>\n <i>Note: not all models might be represented accurately.</i>\n</p>\n\n<div class=\"is-size-7 is-italic\">\n <div class=\"columns is-vcentered is-variable is-1 my-0\">\n <div class=\"column\">\n <div class=\"pl-3 model-parallel my-3\">\n <span>Models running in parallel</span>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <div class=\"field\">\n <input type=\"checkbox\" class=\"switch\"\n [(ngModel)]=\"onlyGapFilled\" id=\"onlyGapFilled\"\n (change)=\"filterModels()\"\n >\n <label class=\"is-size-7\" for=\"onlyGapFilled\">\n <span>Show only gap-filled data</span>\n </label>\n </div>\n </div>\n <div class=\"column is-narrow has-text-right\">\n <div class=\"dropdown is-right has-text-left\"\n [class.is-active]=\"showDisplayBy\"\n (clickOutside)=\"showDisplayBy = false\"\n >\n <div class=\"dropdown-trigger\" (click)=\"showDisplayBy = !showDisplayBy\">\n <button class=\"button is-light\"\n aria-haspopup=\"true\" aria-controls=\"display-menu\"\n ngbTooltip=\"Display options\" placement=\"bottom\" container=\"body\" [disableTooltip]=\"showDisplayBy\"\n >\n <ng-container [ngSwitch]=\"displayBy\">\n <ng-container *ngSwitchCase=\"'list'\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"pl-2\">Display by Prority</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'type'\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"table\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span class=\"pl-2\">Display by Type</span>\n </ng-container>\n </ng-container>\n </button>\n </div>\n <div class=\"dropdown-menu\" id=\"display-menu\" role=\"menu\">\n <div class=\"dropdown-content\" (click)=\"showDisplayBy = false\">\n <a class=\"dropdown-item\"\n [class.is-active]=\"displayBy === 'list'\"\n (click)=\"displayBy = 'list'\"\n >\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n <span class=\"pl-2\">Display by Prority</span>\n </a>\n <a class=\"dropdown-item\"\n [class.is-active]=\"displayBy === 'type'\"\n (click)=\"displayBy = 'type'\"\n >\n <fa-icon icon=\"table\" aria-hidden=\"true\"></fa-icon>\n <span class=\"pl-2\">Display by Type</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"displayBy === 'list' && models\">\n <div class=\"pl-3\">\n <ng-container *ngTemplateOutlet=\"modelList;context:{$implicit:models}\"></ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"displayBy === 'type' && groupedModels\">\n <div class=\"tabs\">\n <ul>\n <li\n *ngFor=\"let group of groupedModels | keys; trackBy: trackByKey\"\n [class.is-active]=\"selectedGroupedKey === group.key\"\n >\n <a (click)=\"selectedGroupedKey = group.key\">\n <span class=\"pl-2\">{{group.key}} ({{group.value.length}})</span>\n </a>\n </li>\n </ul>\n </div>\n\n <div class=\"pl-3\">\n <ng-container *ngTemplateOutlet=\"modelList;context:{$implicit:groupedModels[selectedGroupedKey]}\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #modelList let-data>\n <div *ngFor=\"let v of data\">\n <ng-container *ngTemplateOutlet=\"model;context:{$implicit:v}\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #model let-data>\n <ng-container *ngIf=\"isArray(data)\">\n <div class=\"pl-3 model-parallel\">\n <ng-container *ngTemplateOutlet=\"modelList;context:{$implicit:data}\"></ng-container>\n </div>\n\n <hr>\n </ng-container>\n <ng-container *ngIf=\"!isArray(data)\">\n <div class=\"card mb-2 model-serie is-size-6\">\n <div class=\"card-content p-3\">\n <span class=\"is-capitalized\">{{data.key | keyToLabel}}</span>:\n <ng-template #defaultView>\n <span class=\"default-value\">{{data.value}}</span>\n\n <p>\n <span class=\"pr-1\">Model:</span>\n <span>{{data.model | keyToLabel}}</span>\n </p>\n </ng-template>\n\n <ng-template #modelFromPathLink>\n <ng-container *ngIf=\"modelPathLink$(data) | async as link; else defaultView\">\n <ng-container *ngTemplateOutlet=\"modelPathLink;context:{model:data.model, value: data.value, link}\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"modelLink$(data) | async as link; else modelFromPathLink\">\n <ng-container *ngTemplateOutlet=\"modelLink;context:{model:data.model, value: data.value, link}\"></ng-container>\n </ng-container>\n\n <div *ngIf=\"data.runStrategy\">\n <span class=\"pr-1\">Run strategy:</span>\n <ng-container *ngTemplateOutlet=\"strategiesLink;context:{strategy:data.runStrategy,type:'run'}\"></ng-container>\n\n <div class=\"pl-3 is-size-7\" *ngIf=\"data.runArgs\">\n <p><b>Run arguments:</b></p>\n <ng-container *ngTemplateOutlet=\"strategiesArgs;context:{$implicit:data.runArgs}\"></ng-container>\n </div>\n </div>\n <div *ngIf=\"data.mergeStrategy\">\n <span class=\"pr-1\">Merge strategy:</span>\n <ng-container *ngTemplateOutlet=\"strategiesLink;context:{strategy:data.mergeStrategy,type:'merge'}\"></ng-container>\n\n <div class=\"pl-3 is-size-7\" *ngIf=\"data.mergeArgs\">\n <p><b>Merge arguments:</b></p>\n <ng-container *ngTemplateOutlet=\"strategiesArgs;context:{$implicit:data.mergeArgs}\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #modelLinkKey let-model=\"model\" let-link=\"link\">\n <a [href]=\"modelKeyUrl(link, model)\" target=\"_blank\">{{modelKeyName(link.modelKey)}}</a>\n</ng-template>\n\n<ng-template #modelLink let-model=\"model\" let-link=\"link\" let-value=\"value\">\n <he-node-link *ngIf=\"link.term\" [node]=\"{'@type':'Term','@id':link.term}\" [showExternalLink]=\"true\">\n <span>{{link.term | keyToLabel}}</span>\n </he-node-link>\n\n <span *ngIf=\"!link.term && !link?.modelKey\" class=\"default-value\">{{value}}</span>\n\n <ng-container *ngIf=\"!link.term && link?.modelKey\">\n <ng-container *ngTemplateOutlet=\"modelLinkKey;context:{link, model}\"></ng-container>\n </ng-container>\n\n <p class=\"model-link\">\n <span class=\"pr-1\">Model:</span>\n <span class=\"pr-2\">{{model | keyToLabel}}</span>\n\n <a class=\"is-size-7\" [href]=\"link.docPath\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n </p>\n</ng-template>\n\n<ng-template #modelPathLink let-model=\"model\" let-link=\"link\" let-value=\"value\">\n <span *ngIf=\"!link?.modelKey\" class=\"default-value\">{{value}}</span>\n\n <ng-container *ngIf=\"link?.modelKey\">\n <ng-container *ngTemplateOutlet=\"modelLinkKey;context:{link, model}\"></ng-container>\n </ng-container>\n\n <p class=\"model-path-link\">\n <span class=\"pr-1\">Model:</span>\n <span class=\"pr-2\">{{model | keyToLabel}}</span>\n\n <a class=\"is-size-7\" [href]=\"link.docPath\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n </p>\n</ng-template>\n\n<ng-template #strategiesLink let-strategy=\"strategy\" let-type=\"type\">\n <span class=\"pr-2\"><code>{{strategy}}</code></span>\n\n <a class=\"is-size-7\" [href]=\"strategiesDocs + '/' + type + '/' + (type === 'merge' ? 'merge_' : '') + strategy + '.md'\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n</ng-template>\n\n<ng-template #strategiesArgs let-args>\n <div class=\"pl-2\">\n <p *ngFor=\"let arg of args | keys\">\n <span class=\"has-text-underline\">{{arg.key}}</span>: <code>{{arg.value | json}}</code>\n </p>\n </div>\n</ng-template>\n", styles: [":host{display:block}.model-parallel{border-left:3px solid #7a7a7a}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }], directives: [{ type: i1__namespace$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { type: i11__namespace.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "keys": KeysPipe, "keyToLabel": KeyToLabelPipe, "async": i2__namespace.AsyncPipe, "json": i2__namespace.JsonPipe } });
7201
7290
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EngineOrchestratorEditComponent, decorators: [{
7202
7291
  type: i0.Component,
7203
7292
  args: [{
@@ -7293,12 +7382,12 @@
7293
7382
  }());
7294
7383
  HeEngineModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
7295
7384
  HeEngineModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, declarations: [EngineOrchestratorEditComponent,
7296
- EngineRequirementsFormComponent], imports: [i2.CommonModule, i1$1.ReactiveFormsModule,
7385
+ EngineRequirementsFormComponent], imports: [i2.CommonModule, i1$1.ReactiveFormsModule, i1$1.FormsModule,
7297
7386
  HeCommonModule,
7298
7387
  HeNodeModule], exports: [EngineOrchestratorEditComponent,
7299
7388
  EngineRequirementsFormComponent] });
7300
7389
  HeEngineModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, imports: [[
7301
- i2.CommonModule, i1$1.ReactiveFormsModule,
7390
+ i2.CommonModule, i1$1.ReactiveFormsModule, i1$1.FormsModule,
7302
7391
  HeCommonModule,
7303
7392
  HeNodeModule
7304
7393
  ]] });
@@ -7308,7 +7397,7 @@
7308
7397
  declarations: components$3,
7309
7398
  exports: components$3,
7310
7399
  imports: [
7311
- i2.CommonModule, i1$1.ReactiveFormsModule,
7400
+ i2.CommonModule, i1$1.ReactiveFormsModule, i1$1.FormsModule,
7312
7401
  HeCommonModule,
7313
7402
  HeNodeModule
7314
7403
  ]
@@ -8620,7 +8709,7 @@
8620
8709
  return SitesMeasurementsComponent;
8621
8710
  }());
8622
8711
  SitesMeasurementsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
8623
- SitesMeasurementsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsComponent, selector: "he-sites-measurements", inputs: { originalValues: "originalValues", sites: "sites", 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>\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 } });
8712
+ SitesMeasurementsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsComponent, selector: "he-sites-measurements", inputs: { originalValues: "originalValues", sites: "sites", 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>\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\" [dataState]=\"dataState\"\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: ["dataState", "nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { 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 } });
8624
8713
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, decorators: [{
8625
8714
  type: i0.Component,
8626
8715
  args: [{
@@ -9832,7 +9921,7 @@
9832
9921
  return ImpactAssessmentsProductsComponent;
9833
9922
  }());
9834
9923
  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 });
9835
- 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", 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>\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\"\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", "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 } });
9924
+ 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", 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>\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\" [attr.title]=\"impactAssessment.product?.units\">\n <span class=\"is-nowrap has-text-ellipsis\">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\" [dataState]=\"dataState\"\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\"\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: ["dataState", "nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted"] }, { type: ImpactAssessmentsIndicatorBreakdownChartComponent, selector: "he-impact-assessments-indicator-breakdown-chart", inputs: ["impactAssessment", "indicators"] }, { type: ImpactAssessmentsIndicatorsChartComponent, selector: "he-impact-assessments-indicators-chart", inputs: ["impactAssessments", "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 } });
9836
9925
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ImpactAssessmentsProductsComponent, decorators: [{
9837
9926
  type: i0.Component,
9838
9927
  args: [{