@hestia-earth/ui-components 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/hestia-earth-ui-components.umd.js +173 -76
- package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
- package/common/common.module.d.ts +8 -7
- package/common/index.d.ts +1 -0
- package/common/maps-utils.d.ts +2 -2
- package/common/sort-by.pipe.d.ts +7 -0
- package/common/utils.d.ts +1 -1
- package/cycles/cycles-practices/cycles-practices.component.d.ts +1 -0
- package/cycles/cycles-practices-timeline/cycles-practices-timeline.component.d.ts +15 -0
- package/cycles/cycles.module.d.ts +7 -6
- package/cycles/index.d.ts +1 -0
- package/esm2015/common/blank-node-state-notice/blank-node-state-notice.component.js +2 -2
- package/esm2015/common/common.module.js +8 -4
- package/esm2015/common/index.js +2 -1
- package/esm2015/common/link-key-value/link-key-value.component.js +2 -2
- package/esm2015/common/maps-utils.js +17 -13
- package/esm2015/common/sort-by.pipe.js +17 -0
- package/esm2015/common/utils.js +2 -7
- package/esm2015/cycles/cycles-emissions-logs/cycles-emissions-logs.component.js +2 -2
- package/esm2015/cycles/cycles-practices/cycles-practices.component.js +12 -10
- package/esm2015/cycles/cycles-practices-timeline/cycles-practices-timeline.component.js +38 -0
- package/esm2015/cycles/cycles.module.js +5 -1
- package/esm2015/cycles/index.js +2 -1
- package/esm2015/files/files-error.model.js +25 -3
- package/esm2015/fontawesome/fontawesome.module.js +3 -3
- package/esm2015/impact-assessments/impact-assessments-indicator-breakdown-chart/impact-assessments-indicator-breakdown-chart.component.js +38 -21
- package/esm2015/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.js +13 -16
- package/esm2015/node/node-logs-models/node-logs-models.component.js +7 -5
- package/esm2015/node/node-value-details/node-value-details.component.js +2 -2
- package/esm2015/sites/sites-maps/sites-maps.component.js +7 -6
- package/esm2015/sites/sites-measurements-logs/sites-measurements-logs.component.js +2 -2
- package/fesm2015/hestia-earth-ui-components.js +168 -76
- package/fesm2015/hestia-earth-ui-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -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.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.faTimes, freeSolidSvgIcons.faUser);
|
|
396
396
|
}
|
|
397
397
|
return HeFontawesomeModule;
|
|
398
398
|
}());
|
|
@@ -457,12 +457,7 @@
|
|
|
457
457
|
});
|
|
458
458
|
return res;
|
|
459
459
|
};
|
|
460
|
-
var waitFor = function (variable, callback) {
|
|
461
|
-
if (variable in window) {
|
|
462
|
-
return callback();
|
|
463
|
-
}
|
|
464
|
-
setTimeout(function () { return waitFor(variable, callback); }, 100);
|
|
465
|
-
};
|
|
460
|
+
var waitFor = function (variable, callback) { return get$6(window, variable, false) ? callback() : setTimeout(function () { return waitFor(variable, callback); }, 100); };
|
|
466
461
|
var bottom = function (element) { return element.offsetTop + element.getBoundingClientRect().height; };
|
|
467
462
|
var isScrolledBelow = function (element) { return element ? window.scrollY > bottom(element) : false; };
|
|
468
463
|
var scrollToEl = function (id, retries) {
|
|
@@ -1690,7 +1685,7 @@
|
|
|
1690
1685
|
}
|
|
1691
1686
|
Object.defineProperty(BlankNodeStateNoticeComponent.prototype, "show", {
|
|
1692
1687
|
get: function () {
|
|
1693
|
-
return
|
|
1688
|
+
return this.dataState !== api.DataState.original;
|
|
1694
1689
|
},
|
|
1695
1690
|
enumerable: false,
|
|
1696
1691
|
configurable: true
|
|
@@ -1990,7 +1985,7 @@
|
|
|
1990
1985
|
return LinkKeyValueComponent;
|
|
1991
1986
|
}());
|
|
1992
1987
|
LinkKeyValueComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkKeyValueComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1993
|
-
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" }, 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 <a class=\"pr-1\" [href]=\"valueLink\" *ngIf=\"valueLink; else showString\">{{valueString}}</a>\n <he-blank-node-state\n [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"\n ></he-blank-node-state>\n </ng-container>\n</ng-container>\n\n<ng-template #showString>\n <ng-container *ngIf=\"isArray\">\n <p *ngFor=\"let v of value\">{{toString(v) | precision:3}}</p>\n </ng-container>\n <ng-container *ngIf=\"!isArray\">\n <span class=\"pr-1\">{{valueString | precision:3}}</span>\n </ng-container>\n</ng-template>\n", styles: [":host{display:block}\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 });
|
|
1988
|
+
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" }, 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 <a class=\"pr-1\" [href]=\"valueLink\" *ngIf=\"valueLink; else showString\">{{valueString}}</a>\n <he-blank-node-state\n [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"\n ></he-blank-node-state>\n </ng-container>\n</ng-container>\n\n<ng-template #showString>\n <ng-container *ngIf=\"isArray\">\n <div class=\"array-container\">\n <p *ngFor=\"let v of value\">{{toString(v) | precision:3}}</p>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!isArray\">\n <span class=\"pr-1\">{{valueString | precision:3}}</span>\n </ng-container>\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 });
|
|
1994
1989
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkKeyValueComponent, decorators: [{
|
|
1995
1990
|
type: i0.Component,
|
|
1996
1991
|
args: [{
|
|
@@ -2097,20 +2092,24 @@
|
|
|
2097
2092
|
]);
|
|
2098
2093
|
})[0]; };
|
|
2099
2094
|
var coordinatesToPolygon = function (coordinates) { return new google.maps.Polygon(Object.assign({ paths: coordinates.map(coordinatesToPoint).filter(Boolean) }, strokeStyle)); };
|
|
2100
|
-
var
|
|
2101
|
-
var _a;
|
|
2102
|
-
return feat.type === 'FeatureCollection' ?
|
|
2103
|
-
feat.features.push(addPolygonToFeature(defaultFeature(), polygon)) : (feat.type === 'GeometryCollection' ?
|
|
2104
|
-
feat.geometries.map(function (geometry) { return (geometry.coordinates || []).push(polygonToCoordinates(polygon)); }) :
|
|
2105
|
-
(((_a = feat.geometry) === null || _a === void 0 ? void 0 : _a.coordinates) || []).push(polygonToCoordinates(polygon)));
|
|
2106
|
-
};
|
|
2107
|
-
var polygonsFromFeature = function (feat) {
|
|
2095
|
+
var getCoordinates = function (feat) {
|
|
2108
2096
|
var _a;
|
|
2109
|
-
return feat.type === '
|
|
2110
|
-
|
|
2111
|
-
feat.
|
|
2112
|
-
|
|
2113
|
-
|
|
2097
|
+
return feat.type === 'Polygon' || feat.type === 'MultiPolygon'
|
|
2098
|
+
? feat.coordinates
|
|
2099
|
+
: feat.type === 'Feature'
|
|
2100
|
+
? (_a = feat.geometry) === null || _a === void 0 ? void 0 : _a.coordinates
|
|
2101
|
+
: [];
|
|
2102
|
+
};
|
|
2103
|
+
var addPolygonToFeature = function (feat, polygon) { return feat.type === 'FeatureCollection'
|
|
2104
|
+
? feat.features.push(addPolygonToFeature(defaultFeature(), polygon))
|
|
2105
|
+
: feat.type === 'GeometryCollection'
|
|
2106
|
+
? feat.geometries.map(function (geometry) { return ((geometry === null || geometry === void 0 ? void 0 : geometry.coordinates) || []).push(polygonToCoordinates(polygon)); })
|
|
2107
|
+
: (getCoordinates(feat) || []).push(polygonToCoordinates(polygon)); };
|
|
2108
|
+
var polygonsFromFeature = function (feat) { return feat.type === 'FeatureCollection'
|
|
2109
|
+
? feat.features.flatMap(polygonsFromFeature)
|
|
2110
|
+
: feat.type === 'GeometryCollection'
|
|
2111
|
+
? feat.geometries.flatMap(function (geometry) { return (geometry.coordinates || []).map(coordinatesToPolygon); })
|
|
2112
|
+
: (getCoordinates(feat) || []).map(coordinatesToPolygon); };
|
|
2114
2113
|
var polygonBounds = function (polygon) {
|
|
2115
2114
|
var _a;
|
|
2116
2115
|
return polygon ?
|
|
@@ -4122,6 +4121,25 @@
|
|
|
4122
4121
|
}]
|
|
4123
4122
|
}] });
|
|
4124
4123
|
|
|
4124
|
+
var orderBy$6 = require('lodash.orderby');
|
|
4125
|
+
var SortByPipe = /** @class */ (function () {
|
|
4126
|
+
function SortByPipe() {
|
|
4127
|
+
}
|
|
4128
|
+
SortByPipe.prototype.transform = function (value, keys, orders) {
|
|
4129
|
+
if (orders === void 0) { orders = ['asc']; }
|
|
4130
|
+
return orderBy$6(value, keys, orders);
|
|
4131
|
+
};
|
|
4132
|
+
return SortByPipe;
|
|
4133
|
+
}());
|
|
4134
|
+
SortByPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SortByPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
4135
|
+
SortByPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SortByPipe, name: "sortBy" });
|
|
4136
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SortByPipe, decorators: [{
|
|
4137
|
+
type: i0.Pipe,
|
|
4138
|
+
args: [{
|
|
4139
|
+
name: 'sortBy'
|
|
4140
|
+
}]
|
|
4141
|
+
}] });
|
|
4142
|
+
|
|
4125
4143
|
var components$7 = [
|
|
4126
4144
|
BlankNodeStateComponent,
|
|
4127
4145
|
BlankNodeStateNoticeComponent,
|
|
@@ -4139,7 +4157,8 @@
|
|
|
4139
4157
|
TimesPipe,
|
|
4140
4158
|
ClickOutsideDirective,
|
|
4141
4159
|
GetPipe,
|
|
4142
|
-
IsArrayPipe
|
|
4160
|
+
IsArrayPipe,
|
|
4161
|
+
SortByPipe
|
|
4143
4162
|
];
|
|
4144
4163
|
var HeCommonModule = /** @class */ (function () {
|
|
4145
4164
|
function HeCommonModule() {
|
|
@@ -4163,7 +4182,8 @@
|
|
|
4163
4182
|
TimesPipe,
|
|
4164
4183
|
ClickOutsideDirective,
|
|
4165
4184
|
GetPipe,
|
|
4166
|
-
IsArrayPipe
|
|
4185
|
+
IsArrayPipe,
|
|
4186
|
+
SortByPipe], imports: [i2.CommonModule, i1$1.FormsModule, i5.RouterModule,
|
|
4167
4187
|
i11.NgbTypeaheadModule, i11.NgbTooltipModule, i11.NgbPopoverModule,
|
|
4168
4188
|
i1$4.GoogleMapsModule,
|
|
4169
4189
|
HeCommonLightModule], exports: [i11.NgbTypeaheadModule, i11.NgbTooltipModule, i11.NgbPopoverModule,
|
|
@@ -4184,7 +4204,8 @@
|
|
|
4184
4204
|
TimesPipe,
|
|
4185
4205
|
ClickOutsideDirective,
|
|
4186
4206
|
GetPipe,
|
|
4187
|
-
IsArrayPipe
|
|
4207
|
+
IsArrayPipe,
|
|
4208
|
+
SortByPipe] });
|
|
4188
4209
|
HeCommonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCommonModule, imports: [[
|
|
4189
4210
|
i2.CommonModule, i1$1.FormsModule, i5.RouterModule,
|
|
4190
4211
|
i11.NgbTypeaheadModule, i11.NgbTooltipModule, i11.NgbPopoverModule,
|
|
@@ -5830,9 +5851,11 @@
|
|
|
5830
5851
|
? (this.isRunOrchestrator(log)
|
|
5831
5852
|
? (!node.isRequired
|
|
5832
5853
|
? LogStatus.notRequired
|
|
5833
|
-
: log
|
|
5834
|
-
?
|
|
5835
|
-
|
|
5854
|
+
: 'shouldRun' in log
|
|
5855
|
+
? log.shouldRun
|
|
5856
|
+
? LogStatus.success
|
|
5857
|
+
: LogStatus.error
|
|
5858
|
+
: LogStatus.dataProvided) : (node.isRecalculated
|
|
5836
5859
|
? LogStatus.skipHierarchy
|
|
5837
5860
|
: LogStatus.dataProvided))
|
|
5838
5861
|
: LogStatus.skipHierarchy);
|
|
@@ -5846,7 +5869,7 @@
|
|
|
5846
5869
|
return NodeLogsModelsComponent;
|
|
5847
5870
|
}());
|
|
5848
5871
|
NodeLogsModelsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeLogsModelsComponent, deps: [{ token: HeSearchService }, { token: HeEngineService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5849
|
-
NodeLogsModelsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: { nodeType: "nodeType", nodeKey: "nodeKey", includeAllModels: "includeAllModels", logsUrl: "logsUrl", originalValues: "originalValues", recalculatedValues: "recalculatedValues", terms: "terms", logs: "logs", filteredType: "filteredType" }, ngImport: i0__namespace, template: "<div class=\"px-3 pb-3\">\n <div class=\"has-text-right mb-2\" *ngIf=\"!isExternal\">\n <a class=\"is-size-7\" *ngIf=\"logsUrl\" [href]=\"logsUrl\" target=\"_blank\">\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n <span class=\"pl-2\">Open Full Logs</span>\n </a>\n </div>\n\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"rowsCount\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\">\n <div class=\"field\">\n <div class=\"control is-expanded has-icons-right\">\n <input class=\"input search-input is-small\"\n [(ngModel)]=\"term\" name=\"term\"\n placeholder=\"Filter by name\"\n [editable]=\"false\"\n [ngbTypeahead]=\"suggestTerm\"\n (selectItem)=\"filterResults()\"\n >\n <a class=\"icon is-small is-right\"\n [class.is-hidden]=\"!term\"\n (click)=\"term = ''; filterResults();\"\n >\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </th>\n <th>Original</th>\n <th>Recalculated</th>\n <th>Difference</th>\n <th *ngFor=\"let c of methodModelsCount | times; let i = index\">({{i + 1}})</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngIf=\"loading\">\n <td colspan=\"5\">\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"!loading && blankNodes.length === 0\">\n <td class=\"has-text-centered\" colspan=\"5\">\n <span>No data</span>\n </td>\n </tr>\n <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\">\n <td class=\"width-auto\" [attr.title]=\"blankNode.term.name\">\n <a class=\"is-inline-block is-align-top pr-2 open-node\"\n (click)=\"blankNode.isOpen = !blankNode.isOpen\"\n *ngIf=\"blankNode.canOpen\"\n >\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!blankNode.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"blankNode.isOpen\"></fa-icon>\n </a>\n <he-node-link class=\"is-inline-block\" [node]=\"blankNode.term\">\n <span class=\"is-nowrap has-text-ellipsis\">{{blankNode.term.name}}</span>\n </he-node-link>\n </td>\n <td>\n <span>{{blankNode.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notRecalculated\">\n {{blankNode.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td class=\"is-nowrap\">\n <he-blank-node-value-delta *ngIf=\"blankNode.original.length && blankNode.isRecalculated; else noValue\"\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"blankNode.originalValue\"\n ></he-blank-node-value-delta>\n </td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: {blankNode: blankNode}\"></ng-container>\n </tr>\n\n <ng-container *ngIf=\"blankNode.keys?.length\">\n <tr\n *ngFor=\"let subValue of blankNode.keys\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"blankNode.subValues?.length\"\n >\n <td class=\"width-auto has-text-left\">\n <span class=\"is-inline-block is-align-top pl-3 pr-1 field-node\">Field:</span>\n\n <a class=\"is-inline-block\" *ngIf=\"blankNode.type\"\n [href]=\"baseUrl + '/schema/' + blankNode.type + '#' + subValue.key\" target=\"_blank\" [title]=\"subValue.key\"\n >\n <span class=\"is-nowrap has-text-ellipsis\">{{subValue.key}}</span>\n </a>\n <span class=\"is-inline-block is-align-top\" *ngIf=\"!blankNode.type\">{{subValue.key}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\n {{subValue.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td>-</td>\n <td class=\"blank-node-index-key\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:subValue.key, logs:getLogs(blankNode, subValue.key)}\"></ng-container>\n </td>\n <td *ngIf=\"methodModelsCount > 1\" [attr.colspan]=\"methodModelsCount - 1\"></td>\n </tr>\n </ng-container>\n\n <tr\n *ngFor=\"let subValue of blankNode.subValues\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n >\n <td class=\"width-auto has-text-left\">\n <span class=\"is-inline-block is-align-top pl-3\">{{subValue.key | keyToLabel}}</span>\n\n <ng-container *ngIf=\"subValue.id\">\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n\n <ng-container [ngSwitch]=\"subValue.key\">\n <span class=\"is-inline-block\" *ngSwitchCase=\"'backgroundData'\">{{subValue.id | keyToLabel}}</span>\n <he-node-link *ngSwitchDefault class=\"is-block pl-4\" [node]=\"{'@type':'Term','@id':subValue.id}\" [attr.title]=\"subValue.id | keyToLabel\">\n <span class=\"is-nowrap has-text-ellipsis\">{{subValue.id | keyToLabel}}</span>\n </he-node-link>\n </ng-container>\n </ng-container>\n </td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\n {{subValue.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td>-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: {blankNode: blankNode, subValue: subValue}\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <div class=\"is-size-7 is-italic\">\n <div class=\"columns is-variable is-1 my-0\">\n <div class=\"column is-narrow\">\n <p>\n <a class=\"is-inline-block pr-2\"\n (click)=\"showLegend = !showLegend\"\n >\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!showLegend\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"showLegend\"></fa-icon>\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n <ul class=\"content pl-2\" [class.is-hidden]=\"!showLegend\">\n <li\n class=\"has-text-{{logColor[status.value]}}\"\n *ngFor=\"let status of LogStatus | keys\"\n >\n <fa-icon [icon]=\"logIcon[status.value]\"></fa-icon>\n <span class=\"pl-1\">{{status.value}}</span>\n </li>\n </ul>\n </div>\n <div class=\"column has-text-right\" *ngIf=\"filteredType\">\n <label class=\"is-inline-block checkbox\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"onlyWithData\"\n (change)=\"filterResults()\"\n >\n <span class=\"ml-2\">Show only relevant {{filteredType | pluralize}}</span>\n </label>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #blankNodeModels let-blankNode=\"blankNode\" let-subValue=\"subValue\">\n <td class=\"blank-node-index-{{i}}\" *ngFor=\"let c of methodModelsCount | times; let i = index\">\n <ng-container *ngIf=\"validSubValue(blankNode, i, subValue); else noValue\">\n <ng-container *ngIf=\"getMethodIdAt(blankNode, i, subValue); let methodId; else noValue\">\n <ng-template #modelSerie>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:methodId, subValue:subValue, logs:getLogs(blankNode, methodId, subValue)}\"></ng-container>\n </ng-template>\n <div *ngIf=\"methodId | isArray; else modelSerie\">\n <p *ngFor=\"let value of methodId\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:value, subValue:subValue, logs:getLogs(blankNode, methodId, subValue)}\"></ng-container>\n </p>\n </div>\n </ng-container>\n </ng-container>\n </td>\n</ng-template>\n\n<ng-template #blankNodeModel let-blankNode=\"blankNode\" let-methodId=\"methodId\" let-subValue=\"subValue\" let-logs=\"logs\">\n <span\n [class.trigger-popover]=\"hasLogDetails(blankNode, methodId, subValue)\"\n [ngbPopover]=\"logDetails\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"hasLogDetails(blankNode, methodId, subValue) ? togglePopover(p, { logs }) : null\"\n >\n <span class=\"is-capitalized\">{{methodName(blankNode, methodId, subValue)}}</span>\n <span class=\"pl-1\" *ngIf=\"hasLog(logs) && logs?.methodTier\">[{{logs.methodTier}}]</span>\n <span class=\"pl-1 has-text-{{logColor[logStatus(blankNode, methodId, subValue)]}}\">\n <fa-icon [icon]=\"logIcon[logStatus(blankNode, methodId, subValue)]\"></fa-icon>\n </span>\n </span>\n</ng-template>\n\n<ng-template #noValue>-</ng-template>\n\n<ng-template #notRecalculated>not recalculated</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <ng-container *ngIf=\"logs.requirements\">\n <p class=\"is-requirement\" *ngFor=\"let key of requirementKeys(logs.requirements)\" class=\"has-text-{{requirementColor(logs.requirements[key])}}\">\n {{key}}: {{logs.requirements[key]}}\n </p>\n </ng-container>\n <ng-container *ngIf=\"logs.logs\">\n <p class=\"is-log\" *ngFor=\"let key of logs.logs | keys\">\n {{key.key}}: {{key.value}}\n </p>\n </ng-container>\n <ng-container *ngIf=\"logs.missingLookups?.length\">\n <p class=\"mt-2\">Missing lookups:</p>\n\n <div class=\"table-container data-table-container\">\n <table class=\"table is-fullwidth mb-0\">\n <thead class=\"has-background-black\">\n <tr>\n <th>\n <span class=\"has-text-white\">Filename</span>\n </th>\n <th>\n <span class=\"has-text-white\">Column Title</span>\n </th>\n <th>\n <span class=\"has-text-white\">Row (term.id)</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"has-background-black has-text-white\">\n <tr *ngFor=\"let data of logs.missingLookups\">\n <td>{{data.filename}}</td>\n <td>{{data.column}}</td>\n <td>{{data.termId}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </ng-container>\n</ng-template>\n", styles: [":host{display:block}::ng-deep tr.has-sub-rows td{border-bottom-style:dotted}::ng-deep td he-node-link{width:190px}::ng-deep td .open-node+he-node-link{width:170px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i11__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i11__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "times": TimesPipe, "default": DefaultPipe, "precision": PrecisionPipe, "keyToLabel": KeyToLabelPipe, "keys": KeysPipe, "pluralize": PluralizePipe, "isArray": IsArrayPipe } });
|
|
5872
|
+
NodeLogsModelsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: { nodeType: "nodeType", nodeKey: "nodeKey", includeAllModels: "includeAllModels", logsUrl: "logsUrl", originalValues: "originalValues", recalculatedValues: "recalculatedValues", terms: "terms", logs: "logs", filteredType: "filteredType" }, ngImport: i0__namespace, template: "<div class=\"px-3 pb-3\">\n <div class=\"has-text-right mb-2\" *ngIf=\"!isExternal\">\n <a class=\"is-size-7\" *ngIf=\"logsUrl\" [href]=\"logsUrl\" target=\"_blank\">\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n <span class=\"pl-2\">Open Full Logs</span>\n </a>\n </div>\n\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"rowsCount\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\">\n <div class=\"field\">\n <div class=\"control is-expanded has-icons-right\">\n <input class=\"input search-input is-small\"\n [(ngModel)]=\"term\" name=\"term\"\n placeholder=\"Filter by name\"\n [editable]=\"false\"\n [ngbTypeahead]=\"suggestTerm\"\n (selectItem)=\"filterResults()\"\n >\n <a class=\"icon is-small is-right\"\n [class.is-hidden]=\"!term\"\n (click)=\"term = ''; filterResults();\"\n >\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n </div>\n </th>\n <th class=\"has-border-right\">Units</th>\n <th>Original</th>\n <th>Recalculated</th>\n <th>Difference</th>\n <th *ngFor=\"let c of methodModelsCount | times; let i = index\">({{i + 1}})</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngIf=\"loading\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n </td>\n </tr>\n <tr *ngIf=\"!loading && blankNodes.length === 0\">\n <td class=\"has-text-centered\" colspan=\"6\">\n <span>No data</span>\n </td>\n </tr>\n <ng-container *ngFor=\"let blankNode of blankNodes; trackBy: trackByBlankNode\">\n <tr [class.has-sub-rows]=\"blankNode.canOpen\">\n <td class=\"width-auto\" [attr.title]=\"blankNode.term.name\">\n <a class=\"is-inline-block is-align-top pr-2 open-node\"\n (click)=\"blankNode.isOpen = !blankNode.isOpen\"\n *ngIf=\"blankNode.canOpen\"\n >\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!blankNode.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"blankNode.isOpen\"></fa-icon>\n </a>\n <he-node-link class=\"is-inline-block\" [node]=\"blankNode.term\">\n <span class=\"is-nowrap has-text-ellipsis\">{{blankNode.term.name}}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <span>{{blankNode.term?.units}}</span>\n </td>\n <td>\n <span>{{blankNode.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"!blankNode.isOriginal || blankNode.isRecalculated; else notRecalculated\">\n {{blankNode.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td class=\"is-nowrap\">\n <he-blank-node-value-delta *ngIf=\"blankNode.original.length && blankNode.isRecalculated; else noValue\"\n [value]=\"blankNode.recalculatedValue\"\n [originalValue]=\"blankNode.originalValue\"\n ></he-blank-node-value-delta>\n </td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: {blankNode: blankNode}\"></ng-container>\n </tr>\n\n <ng-container *ngIf=\"blankNode.keys?.length\">\n <tr\n *ngFor=\"let subValue of blankNode.keys\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n [class.has-sub-rows]=\"blankNode.subValues?.length\"\n >\n <td class=\"width-auto has-text-left\">\n <span class=\"is-inline-block is-align-top pl-3 pr-1 field-node\">Field:</span>\n\n <a class=\"is-inline-block\" *ngIf=\"blankNode.type\"\n [href]=\"baseUrl + '/schema/' + blankNode.type + '#' + subValue.key\" target=\"_blank\" [title]=\"subValue.key\"\n >\n <span class=\"is-nowrap has-text-ellipsis\">{{subValue.key}}</span>\n </a>\n <span class=\"is-inline-block is-align-top\" *ngIf=\"!blankNode.type\">{{subValue.key}}</span>\n </td>\n <td class=\"has-border-right\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\n {{subValue.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td>-</td>\n <td class=\"blank-node-index-key\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:subValue.key, logs:getLogs(blankNode, subValue.key)}\"></ng-container>\n </td>\n <td *ngIf=\"methodModelsCount > 1\" [attr.colspan]=\"methodModelsCount - 1\"></td>\n </tr>\n </ng-container>\n\n <tr\n *ngFor=\"let subValue of blankNode.subValues\"\n [class.is-hidden]=\"!blankNode.isOpen\"\n >\n <td class=\"width-auto has-text-left\">\n <span class=\"is-inline-block is-align-top pl-3\">{{subValue.key | keyToLabel}}</span>\n\n <ng-container *ngIf=\"subValue.id\">\n <span class=\"is-inline-block\" class=\"is-inline-block is-align-top pr-1\">:</span>\n\n <ng-container [ngSwitch]=\"subValue.key\">\n <span class=\"is-inline-block\" *ngSwitchCase=\"'backgroundData'\">{{subValue.id | keyToLabel}}</span>\n <he-node-link *ngSwitchDefault class=\"is-block pl-4\" [node]=\"{'@type':'Term','@id':subValue.id}\" [attr.title]=\"subValue.id | keyToLabel\">\n <span class=\"is-nowrap has-text-ellipsis\">{{subValue.id | keyToLabel}}</span>\n </he-node-link>\n </ng-container>\n </ng-container>\n </td>\n <td class=\"has-border-right\"></td>\n <td>\n <span *ngIf=\"subValue.originalValue !== null; else noValue\">{{subValue.originalValue | precision:3 | default:'-'}}</span>\n </td>\n <td>\n <span *ngIf=\"subValue.isRecalculated; else notRecalculated\">\n {{subValue.recalculatedValue | precision:3 | default:'-'}}\n </span>\n </td>\n <td>-</td>\n <ng-container *ngTemplateOutlet=\"blankNodeModels; context: {blankNode: blankNode, subValue: subValue}\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <div class=\"is-size-7 is-italic\">\n <div class=\"columns is-variable is-1 my-0\">\n <div class=\"column is-narrow\">\n <p>\n <a class=\"is-inline-block pr-2\"\n (click)=\"showLegend = !showLegend\"\n >\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!showLegend\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"showLegend\"></fa-icon>\n </a>\n <span class=\"is-inline-block\">Legend:</span>\n </p>\n <ul class=\"content pl-2\" [class.is-hidden]=\"!showLegend\">\n <li\n class=\"has-text-{{logColor[status.value]}}\"\n *ngFor=\"let status of LogStatus | keys\"\n >\n <fa-icon [icon]=\"logIcon[status.value]\"></fa-icon>\n <span class=\"pl-1\">{{status.value}}</span>\n </li>\n </ul>\n </div>\n <div class=\"column has-text-right\" *ngIf=\"filteredType\">\n <label class=\"is-inline-block checkbox\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"onlyWithData\"\n (change)=\"filterResults()\"\n >\n <span class=\"ml-2\">Show only relevant {{filteredType | pluralize}}</span>\n </label>\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #blankNodeModels let-blankNode=\"blankNode\" let-subValue=\"subValue\">\n <td class=\"blank-node-index-{{i}}\" *ngFor=\"let c of methodModelsCount | times; let i = index\">\n <ng-container *ngIf=\"validSubValue(blankNode, i, subValue); else noValue\">\n <ng-container *ngIf=\"getMethodIdAt(blankNode, i, subValue); let methodId; else noValue\">\n <ng-template #modelSerie>\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:methodId, subValue:subValue, logs:getLogs(blankNode, methodId, subValue)}\"></ng-container>\n </ng-template>\n <div *ngIf=\"methodId | isArray; else modelSerie\">\n <p *ngFor=\"let value of methodId\">\n <ng-container *ngTemplateOutlet=\"blankNodeModel; context: {blankNode:blankNode, methodId:value, subValue:subValue, logs:getLogs(blankNode, methodId, subValue)}\"></ng-container>\n </p>\n </div>\n </ng-container>\n </ng-container>\n </td>\n</ng-template>\n\n<ng-template #blankNodeModel let-blankNode=\"blankNode\" let-methodId=\"methodId\" let-subValue=\"subValue\" let-logs=\"logs\">\n <span\n [class.trigger-popover]=\"hasLogDetails(blankNode, methodId, subValue)\"\n [ngbPopover]=\"logDetails\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"hasLogDetails(blankNode, methodId, subValue) ? togglePopover(p, { logs }) : null\"\n >\n <span class=\"is-capitalized\">{{methodName(blankNode, methodId, subValue)}}</span>\n <span class=\"pl-1\" *ngIf=\"hasLog(logs) && logs?.methodTier\">[{{logs.methodTier}}]</span>\n <span class=\"pl-1 has-text-{{logColor[logStatus(blankNode, methodId, subValue)]}}\">\n <fa-icon [icon]=\"logIcon[logStatus(blankNode, methodId, subValue)]\"></fa-icon>\n </span>\n </span>\n</ng-template>\n\n<ng-template #noValue>-</ng-template>\n\n<ng-template #notRecalculated>not recalculated</ng-template>\n\n<ng-template #logDetails let-logs=\"logs\">\n <ng-container *ngIf=\"logs.requirements\">\n <p class=\"is-requirement\" *ngFor=\"let key of requirementKeys(logs.requirements)\">\n {{key}}: {{logs.requirements[key]}}\n </p>\n </ng-container>\n <ng-container *ngIf=\"logs.logs\">\n <p class=\"is-log\" *ngFor=\"let key of logs.logs | keys\">\n {{key.key}}: {{key.value}}\n </p>\n </ng-container>\n <ng-container *ngIf=\"logs.missingLookups?.length\">\n <p class=\"mt-2\">Missing lookups:</p>\n\n <div class=\"table-container data-table-container\">\n <table class=\"table is-fullwidth mb-0\">\n <thead class=\"has-background-black\">\n <tr>\n <th>\n <span class=\"has-text-white\">Filename</span>\n </th>\n <th>\n <span class=\"has-text-white\">Column Title</span>\n </th>\n <th>\n <span class=\"has-text-white\">Row (term.id)</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"has-background-black has-text-white\">\n <tr *ngFor=\"let data of logs.missingLookups\">\n <td>{{data.filename}}</td>\n <td>{{data.column}}</td>\n <td>{{data.termId}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </ng-container>\n</ng-template>\n", styles: [":host{display:block}::ng-deep tr.has-sub-rows td{border-bottom-style:dotted}::ng-deep td he-node-link{width:190px}::ng-deep td .open-node+he-node-link{width:170px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeValueDeltaComponent, selector: "he-blank-node-value-delta", inputs: ["value", "originalValue", "displayType"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i11__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i11__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "times": TimesPipe, "default": DefaultPipe, "precision": PrecisionPipe, "keyToLabel": KeyToLabelPipe, "keys": KeysPipe, "pluralize": PluralizePipe, "isArray": IsArrayPipe } });
|
|
5850
5873
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeLogsModelsComponent, decorators: [{
|
|
5851
5874
|
type: i0.Component,
|
|
5852
5875
|
args: [{
|
|
@@ -5920,7 +5943,7 @@
|
|
|
5920
5943
|
'impactAssessment'
|
|
5921
5944
|
];
|
|
5922
5945
|
var tableKeys = [
|
|
5923
|
-
'inputs', 'value', 'dates', 'methodModel', 'methodTier', 'statsDefinition'
|
|
5946
|
+
'inputs', 'transformation', 'value', 'dates', 'methodModel', 'methodTier', 'statsDefinition'
|
|
5924
5947
|
];
|
|
5925
5948
|
var NodeValueDetailsComponent = /** @class */ (function () {
|
|
5926
5949
|
function NodeValueDetailsComponent() {
|
|
@@ -6453,7 +6476,7 @@
|
|
|
6453
6476
|
logs = _a.sent();
|
|
6454
6477
|
this.logs = parseLogs(this.cycle, logs);
|
|
6455
6478
|
return [4 /*yield*/, this.searchService.search({
|
|
6456
|
-
fields: ['@type', '@id', 'name'],
|
|
6479
|
+
fields: ['@type', '@id', 'name', 'units'],
|
|
6457
6480
|
limit: 1000,
|
|
6458
6481
|
query: {
|
|
6459
6482
|
bool: {
|
|
@@ -6577,6 +6600,48 @@
|
|
|
6577
6600
|
type: i0.Input
|
|
6578
6601
|
}] } });
|
|
6579
6602
|
|
|
6603
|
+
var CyclesPracticesTimelineComponent = /** @class */ (function () {
|
|
6604
|
+
function CyclesPracticesTimelineComponent(el) {
|
|
6605
|
+
this.el = el;
|
|
6606
|
+
this.now = new Date();
|
|
6607
|
+
this.TermTermType = schema.TermTermType;
|
|
6608
|
+
}
|
|
6609
|
+
Object.defineProperty(CyclesPracticesTimelineComponent.prototype, "practices", {
|
|
6610
|
+
get: function () {
|
|
6611
|
+
return (this.cycle.practices || []).map(function (p) {
|
|
6612
|
+
var _a;
|
|
6613
|
+
return !p.startDate && ((_a = p.dates) === null || _a === void 0 ? void 0 : _a.length) ? Object.assign(Object.assign({}, p), { startDate: p.dates[0] }) : p;
|
|
6614
|
+
});
|
|
6615
|
+
},
|
|
6616
|
+
enumerable: false,
|
|
6617
|
+
configurable: true
|
|
6618
|
+
});
|
|
6619
|
+
CyclesPracticesTimelineComponent.prototype.trackByPractice = function (_index, _b) {
|
|
6620
|
+
var term = _b.term;
|
|
6621
|
+
return term['@id'];
|
|
6622
|
+
};
|
|
6623
|
+
Object.defineProperty(CyclesPracticesTimelineComponent.prototype, "lineWidth", {
|
|
6624
|
+
get: function () {
|
|
6625
|
+
return this.el.nativeElement.offsetWidth - 60;
|
|
6626
|
+
},
|
|
6627
|
+
enumerable: false,
|
|
6628
|
+
configurable: true
|
|
6629
|
+
});
|
|
6630
|
+
return CyclesPracticesTimelineComponent;
|
|
6631
|
+
}());
|
|
6632
|
+
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 });
|
|
6633
|
+
CyclesPracticesTimelineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: { 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 } });
|
|
6634
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesTimelineComponent, decorators: [{
|
|
6635
|
+
type: i0.Component,
|
|
6636
|
+
args: [{
|
|
6637
|
+
selector: 'he-cycles-practices-timeline',
|
|
6638
|
+
templateUrl: './cycles-practices-timeline.component.html',
|
|
6639
|
+
styleUrls: ['./cycles-practices-timeline.component.scss']
|
|
6640
|
+
}]
|
|
6641
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { cycle: [{
|
|
6642
|
+
type: i0.Input
|
|
6643
|
+
}] } });
|
|
6644
|
+
|
|
6580
6645
|
var CyclesPracticesLogsComponent = /** @class */ (function () {
|
|
6581
6646
|
function CyclesPracticesLogsComponent(nodeService) {
|
|
6582
6647
|
this.nodeService = nodeService;
|
|
@@ -6633,6 +6698,7 @@
|
|
|
6633
6698
|
var View$2;
|
|
6634
6699
|
(function (View) {
|
|
6635
6700
|
View["table"] = "table";
|
|
6701
|
+
View["timeline"] = "timeline";
|
|
6636
6702
|
View["logs"] = "logs";
|
|
6637
6703
|
})(View$2 || (View$2 = {}));
|
|
6638
6704
|
var CyclesPracticesComponent = /** @class */ (function () {
|
|
@@ -6679,7 +6745,7 @@
|
|
|
6679
6745
|
return CyclesPracticesComponent;
|
|
6680
6746
|
}());
|
|
6681
6747
|
CyclesPracticesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6682
|
-
CyclesPracticesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesComponent, selector: "he-cycles-practices", inputs: { originalValues: "originalValues", cycles: "cycles", selected: "selected", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container
|
|
6748
|
+
CyclesPracticesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CyclesPracticesComponent, selector: "he-cycles-practices", inputs: { originalValues: "originalValues", cycles: "cycles", selected: "selected", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"columns is-variable is-align-items-center is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <ng-container *ngIf=\"selectedView === View.table && practices.length\">\n <div class=\"column is-narrow\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n <div class=\"column is-narrow col-sep\"></div>\n </ng-container>\n <div class=\"column is-narrow\" *ngIf=\"cycles.length === 1\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\">\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>Timeline 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=\"practices.length; else emptyTable\">\n <he-data-table class=\"mb-1 is-small\" [small]=\"true\" [nbRows]=\"cycles.length\" maxHeight=\"320\">\n <table class=\"table is-narrow is-striped\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\"></th>\n <th *ngFor=\"let practice of practices\"\n [attr.title]=\"practice.value.term.name\"\n >\n <he-node-link [node]=\"practice.value.term\">\n <span>{{practice.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th class=\"has-border-right\">\n <a [href]=\"baseUrl + '/schema/Cycle#functionalUnit'\" target=\"_blank\">Functional unit</a>\n </th>\n <th *ngFor=\"let practice of practices\"\n [attr.title]=\"practice.value.term.units\"\n >{{practice.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let cycle of cycles; trackBy: trackById; let i = index\">\n <tr *ngIf=\"isSelected(cycle)\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(cycle)\">\n <he-node-link [node]=\"cycle.term || cycle\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(cycle)}}</span>\n </he-node-link>\n </td>\n <td class=\"has-border-right\">\n <he-cycles-functional-unit-measure [cycle]=\"cycles[0]\"></he-cycles-functional-unit-measure>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let practice of practices\">\n <span *ngIf=\"practice.value.values[cycle['@id']]; else emptyValue\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: practice.value.values[cycle['@id']], cycle: cycle, key: 'practices' })\"\n >\n <span pointer>{{propertyValue(practice.value.values[cycle['@id']].value, practice.value.term['@id']) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"practice.value.values[cycle['@id']].node\"\n key=\"value\"\n ></he-blank-node-state>\n </span>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </he-data-table>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n </ng-container>\n</div>\n\n<div class=\"px-3 pb-3\" *ngIf=\"selectedView === View.timeline\">\n <he-cycles-practices-timeline\n [cycle]=\"cycles[0]\"\n ></he-cycles-practices-timeline>\n\n <he-blank-node-state-notice [dataState]=\"dataState\" [showDeleted]=\"true\"></he-blank-node-state-notice>\n</div>\n\n<he-cycles-practices-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [cycle]=\"cycles[0]\"\n [originalValues]=\"originalValues[0]?.practices\"\n [recalculatedValues]=\"cycles[0]?.practices\"\n></he-cycles-practices-logs>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"cycles\" filename=\"cycle-practices.csv\" [isUpload]=\"false\"\n [headerKeys]=\"['cycle.id', 'cycle.@id', 'cycle.practices.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"has-text-centered\">\n <span>No data</span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"cycle\" let-data=\"data\" let-key=\"key\">\n <p><b>{{defaultLabel(node)}}</b></p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}he-data-table ::ng-deep .table thead tr th:nth-child(2),he-data-table ::ng-deep .table tbody tr td:nth-child(2){max-width:102px;width:102px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: DataTableComponent, selector: "he-data-table", inputs: ["minHeight", "maxHeight", "nbRows", "small", "height", "width"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: CyclesFunctionalUnitMeasureComponent, selector: "he-cycles-functional-unit-measure", inputs: ["cycle"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showAggregated", "showDeleted", "showUnchanged"] }, { type: CyclesPracticesTimelineComponent, selector: "he-cycles-practices-timeline", inputs: ["cycle"] }, { type: CyclesPracticesLogsComponent, selector: "he-cycles-practices-logs", inputs: ["cycle", "originalValues", "recalculatedValues"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
6683
6749
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, decorators: [{
|
|
6684
6750
|
type: i0.Component,
|
|
6685
6751
|
args: [{
|
|
@@ -6824,6 +6890,7 @@
|
|
|
6824
6890
|
CyclesFunctionalUnitMeasureComponent,
|
|
6825
6891
|
CyclesPracticesComponent,
|
|
6826
6892
|
CyclesPracticesLogsComponent,
|
|
6893
|
+
CyclesPracticesTimelineComponent,
|
|
6827
6894
|
CyclesResultComponent
|
|
6828
6895
|
];
|
|
6829
6896
|
var HeCyclesModule = /** @class */ (function () {
|
|
@@ -6841,6 +6908,7 @@
|
|
|
6841
6908
|
CyclesFunctionalUnitMeasureComponent,
|
|
6842
6909
|
CyclesPracticesComponent,
|
|
6843
6910
|
CyclesPracticesLogsComponent,
|
|
6911
|
+
CyclesPracticesTimelineComponent,
|
|
6844
6912
|
CyclesResultComponent], imports: [i2.CommonModule, i1$1.FormsModule,
|
|
6845
6913
|
HeCommonModule,
|
|
6846
6914
|
HeNodeModule], exports: [CyclesActivityComponent,
|
|
@@ -6852,6 +6920,7 @@
|
|
|
6852
6920
|
CyclesFunctionalUnitMeasureComponent,
|
|
6853
6921
|
CyclesPracticesComponent,
|
|
6854
6922
|
CyclesPracticesLogsComponent,
|
|
6923
|
+
CyclesPracticesTimelineComponent,
|
|
6855
6924
|
CyclesResultComponent] });
|
|
6856
6925
|
HeCyclesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCyclesModule, imports: [[
|
|
6857
6926
|
i2.CommonModule, i1$1.FormsModule,
|
|
@@ -7089,7 +7158,7 @@
|
|
|
7089
7158
|
'should NOT have additional properties': function (_g, errorCount) {
|
|
7090
7159
|
var params = _g.params;
|
|
7091
7160
|
return errorCount === 1 ?
|
|
7092
|
-
"The following field does not exist: " + (params === null || params === void 0 ? void 0 : params.additionalProperty) :
|
|
7161
|
+
"The following field does not exist: " + (params === null || params === void 0 ? void 0 : params.additionalProperty) + " or is not allowed in this case." :
|
|
7093
7162
|
"should not have additional properties";
|
|
7094
7163
|
},
|
|
7095
7164
|
'should match pattern "^\\d{13}$"': function () { return "should be composed of 13 numbers"; },
|
|
@@ -7169,6 +7238,22 @@
|
|
|
7169
7238
|
_g['must be equal to previous product multiplied by the share'] = function () { return "Products from a transformation which are an Input in to the next transformation must follow the following rule:\n " + code('previous.product.value * current.previousTransformationShare / 100 == current.input.value'); },
|
|
7170
7239
|
_g['at least one Input must be a Product of the Cycle'] = function () { return "A Transformation converts a Product from a Cycle into another Product.\n Therefore, at least one Input into the Transformation must be a Product of the Cycle."; },
|
|
7171
7240
|
_g['must have only one entry with the same term.termType = excretaManagement'] = function () { return "There can only be one Practice of type excretaManagement in a Cycle.\n To represent multiple excreta management systems either use multiple Cycles and link them together,\n or use Transformations within a Cycle and link those together."; },
|
|
7241
|
+
_g['must add the linked inputs to the cycle'] = function (_g, errorCount) {
|
|
7242
|
+
var params = _g.params;
|
|
7243
|
+
var _a, _b;
|
|
7244
|
+
return (errorCount === 1 ?
|
|
7245
|
+
'You have stated some Emissions were created by some Inputs.' :
|
|
7246
|
+
"You have stated that " + code((_a = params === null || params === void 0 ? void 0 : params.term) === null || _a === void 0 ? void 0 : _a.name) + " was created by the following Inputs " + ((_b = params === null || params === void 0 ? void 0 : params.expected) === null || _b === void 0 ? void 0 : _b.map(function (e) { return code(e.name); }).join(' , '))) + ".\n However, these Inputs do not exist in the Cycle.\n Please add these Inputs, even if you do not have a value for them.";
|
|
7247
|
+
},
|
|
7248
|
+
_g['must add the linked transformations to the cycle'] = function (_g, errorCount) {
|
|
7249
|
+
var level = _g.level, params = _g.params;
|
|
7250
|
+
var _a, _b;
|
|
7251
|
+
return (errorCount === 1 ?
|
|
7252
|
+
'You have stated some Emissions were created by some Transformations.' :
|
|
7253
|
+
"You have specified that" + code((_a = params === null || params === void 0 ? void 0 : params.term) === null || _a === void 0 ? void 0 : _a.name) + " was created during a Transformation with the Term name " + code((_b = params === null || params === void 0 ? void 0 : params.expected) === null || _b === void 0 ? void 0 : _b.name) + ".") + ".\n However, we cannot find a Transformation within the Cycle with this Term name.\n " + (level === 'error' ?
|
|
7254
|
+
'Please check the Terms used in the Emissions and/or the Transformations.' :
|
|
7255
|
+
'You may want to add this Transformation.');
|
|
7256
|
+
},
|
|
7172
7257
|
_g['every item in the list should be unique'] = function (_g) {
|
|
7173
7258
|
var params = _g.params;
|
|
7174
7259
|
return "This Blank Node is duplicated. Every Blank Node should be unique.\n Uniqueness is determined by the following fields: " + ((params === null || params === void 0 ? void 0 : params.keys) || []).map(code).join(', ');
|
|
@@ -7223,6 +7308,7 @@
|
|
|
7223
7308
|
var params = _g.params;
|
|
7224
7309
|
return "We recommend adding a Source to all data items.\n This can be done by adding the " + code(params === null || params === void 0 ? void 0 : params.current) + " field.\n Sources can also be specified for each data item (i.e., each Input, Emission, Product, Practice, Measurement, or Infrastructure).";
|
|
7225
7310
|
},
|
|
7311
|
+
_g['cover crop cycle contains non cover crop product'] = function () { return "You have specified that this crop is a cover crop using a Practice.\n A cover crop is defined as \"a crop which is left in the field without any fraction harvested by the end of the Cycle\".\n The Products of this Cycle are incompatible with this crop being a cover crop.\n Please check the Products or the Practices."; },
|
|
7226
7312
|
_g);
|
|
7227
7313
|
var formatCustomErrorMessage = function (message, error, errorCount) {
|
|
7228
7314
|
if (errorCount === void 0) { errorCount = 1; }
|
|
@@ -7969,7 +8055,7 @@
|
|
|
7969
8055
|
}
|
|
7970
8056
|
SitesMapsComponent.prototype.ngOnInit = function () {
|
|
7971
8057
|
var _this = this;
|
|
7972
|
-
waitFor('google', function () {
|
|
8058
|
+
waitFor('google.maps', function () {
|
|
7973
8059
|
_this.googleLoaded = true;
|
|
7974
8060
|
setTimeout(function () { return !_this.loaded && _this.map && _this.loadData(); });
|
|
7975
8061
|
});
|
|
@@ -8034,17 +8120,19 @@
|
|
|
8034
8120
|
});
|
|
8035
8121
|
};
|
|
8036
8122
|
SitesMapsComponent.prototype.centerMarker = function (marker) {
|
|
8123
|
+
var _this = this;
|
|
8037
8124
|
var center = marker.getPosition();
|
|
8038
8125
|
this.center = center ? { lat: center.lat(), lng: center.lng() } : defaultCenter;
|
|
8126
|
+
setTimeout(function () {
|
|
8127
|
+
_this.map.googleMap.setCenter(_this.center);
|
|
8128
|
+
});
|
|
8039
8129
|
};
|
|
8040
8130
|
SitesMapsComponent.prototype.centerPolygons = function (polygons) {
|
|
8041
8131
|
try {
|
|
8042
|
-
return polygons.length ? this.map.googleMap.fitBounds(polygonBounds(polygons)) : null;
|
|
8132
|
+
return (polygons === null || polygons === void 0 ? void 0 : polygons.length) ? this.map.googleMap.fitBounds(polygonBounds(polygons)) : null;
|
|
8043
8133
|
}
|
|
8044
8134
|
catch (err) {
|
|
8045
|
-
|
|
8046
|
-
this.map.googleMap.fitBounds(polygonBounds(polygons[0]));
|
|
8047
|
-
}
|
|
8135
|
+
return (polygons === null || polygons === void 0 ? void 0 : polygons.length) ? this.map.googleMap.fitBounds(polygonBounds(polygons[0])) : null;
|
|
8048
8136
|
}
|
|
8049
8137
|
};
|
|
8050
8138
|
SitesMapsComponent.prototype.addSiteMarkers = function (sites) {
|
|
@@ -8211,7 +8299,7 @@
|
|
|
8211
8299
|
case 1:
|
|
8212
8300
|
_a.logs = _b.sent();
|
|
8213
8301
|
return [4 /*yield*/, this.searchService.search({
|
|
8214
|
-
fields: ['@type', '@id', 'name'],
|
|
8302
|
+
fields: ['@type', '@id', 'name', 'units'],
|
|
8215
8303
|
limit: 1000,
|
|
8216
8304
|
query: {
|
|
8217
8305
|
bool: {
|
|
@@ -8943,8 +9031,9 @@
|
|
|
8943
9031
|
}] });
|
|
8944
9032
|
|
|
8945
9033
|
var parseLog = function (data) { return ({
|
|
8946
|
-
|
|
8947
|
-
|
|
9034
|
+
modelId: data.model,
|
|
9035
|
+
impactTermId: data['key/term'] || data.term || data.indicator,
|
|
9036
|
+
emissionsResourceUseTermId: data.node,
|
|
8948
9037
|
coefficient: +data.coefficient,
|
|
8949
9038
|
value: +data.value * +data.coefficient
|
|
8950
9039
|
}); };
|
|
@@ -8952,23 +9041,31 @@
|
|
|
8952
9041
|
schema.TermTermType.emission,
|
|
8953
9042
|
schema.TermTermType.characterisedIndicator
|
|
8954
9043
|
];
|
|
8955
|
-
var toCsv = function (logs) { return __spreadArray([
|
|
9044
|
+
var toCsv = function (logs, impact) { return __spreadArray([
|
|
8956
9045
|
[
|
|
8957
|
-
'Model',
|
|
8958
9046
|
'Impact',
|
|
9047
|
+
'Impact Unit',
|
|
9048
|
+
'Method',
|
|
9049
|
+
'Emission',
|
|
8959
9050
|
'Value',
|
|
8960
9051
|
'Inputs',
|
|
8961
|
-
'Inputs value'
|
|
9052
|
+
'Inputs value',
|
|
9053
|
+
'Functional Unit'
|
|
8962
9054
|
].join(',')
|
|
8963
9055
|
], __read(logs
|
|
8964
|
-
.sort(function (a, b) { return a.
|
|
9056
|
+
.sort(function (a, b) { return a.impactTermId.localeCompare(b.impactTermId); })
|
|
8965
9057
|
.flatMap(function (_d) {
|
|
8966
|
-
var
|
|
9058
|
+
var impactTermId = _d.impactTermId, impactTermUnits = _d.impactTermUnits, modelId = _d.modelId, emissionsResourceUseTermId = _d.emissionsResourceUseTermId, value = _d.value, inputs = _d.inputs;
|
|
8967
9059
|
return __spreadArray([
|
|
8968
|
-
[
|
|
8969
|
-
], __read((inputs.map(function (v) { return [
|
|
9060
|
+
[impactTermId, impactTermUnits, modelId, emissionsResourceUseTermId, value, '', '']
|
|
9061
|
+
], __read((inputs.map(function (v) { return [impactTermId, impactTermUnits, modelId, emissionsResourceUseTermId, '', v.name, v.value]; }))));
|
|
8970
9062
|
})
|
|
8971
|
-
.map(function (v) {
|
|
9063
|
+
.map(function (v) {
|
|
9064
|
+
var _a;
|
|
9065
|
+
return __spreadArray(__spreadArray([], __read(v)), [
|
|
9066
|
+
(_a = impact.product) === null || _a === void 0 ? void 0 : _a.units
|
|
9067
|
+
]).join(',');
|
|
9068
|
+
}))).join('\n'); };
|
|
8972
9069
|
var ImpactAssessmentsIndicatorBreakdownChartComponent = /** @class */ (function () {
|
|
8973
9070
|
function ImpactAssessmentsIndicatorBreakdownChartComponent(ngZone, domSanitizer, searchService, nodeService) {
|
|
8974
9071
|
this.ngZone = ngZone;
|
|
@@ -8984,7 +9081,7 @@
|
|
|
8984
9081
|
}
|
|
8985
9082
|
ImpactAssessmentsIndicatorBreakdownChartComponent.prototype.ngOnInit = function () {
|
|
8986
9083
|
return __awaiter(this, void 0, void 0, function () {
|
|
8987
|
-
var _d,
|
|
9084
|
+
var _d, results;
|
|
8988
9085
|
var _this = this;
|
|
8989
9086
|
return __generator(this, function (_e) {
|
|
8990
9087
|
switch (_e.label) {
|
|
@@ -9000,18 +9097,24 @@
|
|
|
9000
9097
|
}), operators.map(function (_d) {
|
|
9001
9098
|
var data = _d.data;
|
|
9002
9099
|
return parseMessage(data.message);
|
|
9003
|
-
}), operators.filter(function (message) { return 'node' in message; }), operators.map(parseLog), operators.filter(function (log) { return !!log.
|
|
9100
|
+
}), operators.filter(function (message) { return 'node' in message; }), operators.map(parseLog), operators.filter(function (log) { return !!log.impactTermId && !!log.emissionsResourceUseTermId && !isNaN(log.value) && log.value > 0; }), operators.groupBy(function (log) { return [log.impactTermId, log.emissionsResourceUseTermId].join('/'); }), operators.mergeMap(function (group) { return group.pipe(operators.toArray()); }), operators.map(function (values) {
|
|
9101
|
+
var _a, _b;
|
|
9004
9102
|
var log = values[0];
|
|
9005
9103
|
var total = values.reduce(function (prev, curr) { return prev + curr.value; }, 0);
|
|
9006
|
-
var
|
|
9007
|
-
.filter(function (v) {
|
|
9104
|
+
var emissions = (_this.impactAssessment.emissionsResourceUse || [])
|
|
9105
|
+
.filter(function (v) { return v.term['@id'] === log.emissionsResourceUseTermId; });
|
|
9106
|
+
var inputs = emissions
|
|
9107
|
+
.filter(function (v) { var _a; return (_a = v.inputs) === null || _a === void 0 ? void 0 : _a.length; })
|
|
9008
9108
|
.map(function (v) { return ({ name: v.inputs.map(function (i) { return i['@id']; }).join(';'), value: v.value * log.coefficient }); });
|
|
9009
9109
|
var inputsValue = inputs.reduce(function (prev, curr) { return prev + curr.value; }, 0);
|
|
9010
|
-
|
|
9011
|
-
|
|
9110
|
+
var impacts = (_this.impactAssessment.impacts || [])
|
|
9111
|
+
.filter(function (v) { return v.term['@id'] === log.impactTermId; });
|
|
9112
|
+
// logs might exist but impact was not added => skip logs
|
|
9113
|
+
return impacts.length ? Object.assign(Object.assign({}, log), { impactTermUnits: (_b = (_a = impacts === null || impacts === void 0 ? void 0 : impacts[0]) === null || _a === void 0 ? void 0 : _a.term) === null || _b === void 0 ? void 0 : _b.units, value: total, inputs: inputs, inputsValue: inputsValue }) : null;
|
|
9114
|
+
}), operators.filter(function (log) { return !!log; }), operators.toArray()).toPromise()];
|
|
9012
9115
|
case 1:
|
|
9013
9116
|
_d.logs = (_e.sent());
|
|
9014
|
-
this.csvContent = this.domSanitizer.bypassSecurityTrustResourceUrl("data:text/html;charset=utf-8," + encodeURIComponent(toCsv(this.logs)));
|
|
9117
|
+
this.csvContent = this.domSanitizer.bypassSecurityTrustResourceUrl("data:text/html;charset=utf-8," + encodeURIComponent(toCsv(this.logs, this.impactAssessment)));
|
|
9015
9118
|
return [4 /*yield*/, this.searchService.search({
|
|
9016
9119
|
fields: ['@type', '@id', 'name'],
|
|
9017
9120
|
limit: 1000,
|
|
@@ -9026,8 +9129,8 @@
|
|
|
9026
9129
|
}
|
|
9027
9130
|
})];
|
|
9028
9131
|
case 2:
|
|
9029
|
-
|
|
9030
|
-
this.emissions =
|
|
9132
|
+
results = (_e.sent()).results;
|
|
9133
|
+
this.emissions = results;
|
|
9031
9134
|
this.loading = false;
|
|
9032
9135
|
this.selectedTerm = this.terms[0];
|
|
9033
9136
|
this.updateChart();
|
|
@@ -9048,16 +9151,16 @@
|
|
|
9048
9151
|
var _a, _b, _c;
|
|
9049
9152
|
var logs = this.logs
|
|
9050
9153
|
.filter(function (_d) {
|
|
9051
|
-
var
|
|
9052
|
-
return
|
|
9154
|
+
var impactTermId = _d.impactTermId;
|
|
9155
|
+
return impactTermId === _this.selectedTerm['@id'];
|
|
9053
9156
|
})
|
|
9054
9157
|
.sort(function (a, b) { return b.value - a.value; });
|
|
9055
9158
|
this.noData = logs.length === 0;
|
|
9056
9159
|
var total = logs.reduce(function (prev, curr) { return prev + curr.value; }, 0);
|
|
9057
9160
|
var labels = logs.map(function (_d) {
|
|
9058
|
-
var
|
|
9161
|
+
var emissionsResourceUseTermId = _d.emissionsResourceUseTermId;
|
|
9059
9162
|
var _a;
|
|
9060
|
-
return ((_a = _this.emissions.find(function (v) { return v['@id'] ===
|
|
9163
|
+
return ((_a = _this.emissions.find(function (v) { return v['@id'] === emissionsResourceUseTermId; })) === null || _a === void 0 ? void 0 : _a.name) || emissionsResourceUseTermId;
|
|
9061
9164
|
});
|
|
9062
9165
|
// display the breakdown by input
|
|
9063
9166
|
// const inputs = logs.flatMap(v => v.inputs.map(i => i.name));
|
|
@@ -9293,18 +9396,17 @@
|
|
|
9293
9396
|
}
|
|
9294
9397
|
ImpactAssessmentsProductsLogsComponent.prototype.ngOnInit = function () {
|
|
9295
9398
|
return __awaiter(this, void 0, void 0, function () {
|
|
9296
|
-
var _a, emissions
|
|
9297
|
-
return __generator(this, function (
|
|
9298
|
-
switch (
|
|
9399
|
+
var _a, emissions;
|
|
9400
|
+
return __generator(this, function (_b) {
|
|
9401
|
+
switch (_b.label) {
|
|
9299
9402
|
case 0:
|
|
9300
9403
|
this.logsUrl = this.nodeService.nodeLogsUrl(this.node);
|
|
9301
9404
|
_a = this;
|
|
9302
9405
|
return [4 /*yield*/, this.nodeService.getModelsLog(this.node)];
|
|
9303
9406
|
case 1:
|
|
9304
|
-
_a.logs =
|
|
9305
|
-
if (!this.includeAllModels) return [3 /*break*/, 3];
|
|
9407
|
+
_a.logs = _b.sent();
|
|
9306
9408
|
return [4 /*yield*/, this.searchService.search({
|
|
9307
|
-
fields: ['@type', '@id', 'name'],
|
|
9409
|
+
fields: ['@type', '@id', 'name', 'units'],
|
|
9308
9410
|
limit: 1000,
|
|
9309
9411
|
query: {
|
|
9310
9412
|
bool: {
|
|
@@ -9317,14 +9419,7 @@
|
|
|
9317
9419
|
}
|
|
9318
9420
|
})];
|
|
9319
9421
|
case 2:
|
|
9320
|
-
|
|
9321
|
-
return [3 /*break*/, 4];
|
|
9322
|
-
case 3:
|
|
9323
|
-
// Emissions are added from Cycle not from models, only show the ones included
|
|
9324
|
-
_b = { results: [] };
|
|
9325
|
-
_c.label = 4;
|
|
9326
|
-
case 4:
|
|
9327
|
-
emissions = (_b).results;
|
|
9422
|
+
emissions = (_b.sent()).results;
|
|
9328
9423
|
this.emissions = emissions;
|
|
9329
9424
|
this.loading = false;
|
|
9330
9425
|
return [2 /*return*/];
|
|
@@ -9662,6 +9757,7 @@
|
|
|
9662
9757
|
exports.CyclesFunctionalUnitMeasureComponent = CyclesFunctionalUnitMeasureComponent;
|
|
9663
9758
|
exports.CyclesPracticesComponent = CyclesPracticesComponent;
|
|
9664
9759
|
exports.CyclesPracticesLogsComponent = CyclesPracticesLogsComponent;
|
|
9760
|
+
exports.CyclesPracticesTimelineComponent = CyclesPracticesTimelineComponent;
|
|
9665
9761
|
exports.CyclesResultComponent = CyclesResultComponent;
|
|
9666
9762
|
exports.DataTableComponent = DataTableComponent;
|
|
9667
9763
|
exports.DefaultPipe = DefaultPipe;
|
|
@@ -9727,6 +9823,7 @@
|
|
|
9727
9823
|
exports.SitesMeasurementsLogsComponent = SitesMeasurementsLogsComponent;
|
|
9728
9824
|
exports.SkeletonTextComponent = SkeletonTextComponent;
|
|
9729
9825
|
exports.SocialTagsComponent = SocialTagsComponent;
|
|
9826
|
+
exports.SortByPipe = SortByPipe;
|
|
9730
9827
|
exports.TagsInputDirective = TagsInputDirective;
|
|
9731
9828
|
exports.TimesPipe = TimesPipe;
|
|
9732
9829
|
exports.ToastComponent = ToastComponent;
|