@hestia-earth/ui-components 0.5.2 → 0.6.0-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.
- package/bundles/hestia-earth-ui-components.umd.js +120 -31
- package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
- package/engine/engine-models-version-link/engine-models-version-link.component.d.ts +11 -0
- package/engine/engine-models-version-link/engine-models-version-link.model.d.ts +1 -0
- package/engine/engine.module.d.ts +8 -7
- package/engine/engine.service.d.ts +6 -2
- package/engine/index.d.ts +1 -0
- package/esm2015/common/link-key-value/link-key-value.component.js +4 -3
- package/esm2015/common/skeleton-text/skeleton-text.component.js +1 -1
- package/esm2015/engine/engine-models-version-link/engine-models-version-link.component.js +38 -0
- package/esm2015/engine/engine-models-version-link/engine-models-version-link.model.js +16 -0
- package/esm2015/engine/engine.module.js +7 -3
- package/esm2015/engine/engine.service.js +9 -6
- package/esm2015/engine/index.js +2 -1
- package/esm2015/node/node-csv-select-headers/node-csv-select-headers.component.js +1 -1
- package/esm2015/node/node-logs-models/node-logs-models.model.js +28 -15
- package/esm2015/node/node-value-details/node-value-details.component.js +2 -2
- package/esm2015/search/search.model.js +11 -2
- package/fesm2015/hestia-earth-ui-components.js +101 -26
- package/fesm2015/hestia-earth-ui-components.js.map +1 -1
- package/package.json +2 -2
- package/search/search.model.d.ts +15 -0
|
@@ -1437,7 +1437,8 @@
|
|
|
1437
1437
|
|
|
1438
1438
|
var HE_CALCULATIONS_BASE_URL = new i0.InjectionToken('HE_CALCULATIONS_BASE_URL');
|
|
1439
1439
|
var HE_ORCHESTRATOR_BASE_URL = new i0.InjectionToken('HE_ORCHESTRATOR_BASE_URL');
|
|
1440
|
-
var
|
|
1440
|
+
var engineGitBaseUrl = function () { return gitHome + "/hestia-engine-models"; };
|
|
1441
|
+
var engineGitUrl = function () { return engineGitBaseUrl() + "/-/blob/" + gitBranch(); };
|
|
1441
1442
|
var engineRawUrl = function () { return gitRawBaseUrl + "/hestia-engine-models/-/raw/" + gitBranch(); };
|
|
1442
1443
|
var findModels = function (models, termId) { return models.filter(function (_b) {
|
|
1443
1444
|
var term = _b.term;
|
|
@@ -1502,16 +1503,11 @@
|
|
|
1502
1503
|
this.init();
|
|
1503
1504
|
}
|
|
1504
1505
|
HeEngineService.prototype.init = function () {
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
_b.sent();
|
|
1511
|
-
return [2 /*return*/];
|
|
1512
|
-
}
|
|
1513
|
-
});
|
|
1514
|
-
});
|
|
1506
|
+
this.latestVersion$ = this.http.get(engineRawUrl() + "/package.json").pipe(operators.map(function (_b) {
|
|
1507
|
+
var version = _b.version;
|
|
1508
|
+
return version;
|
|
1509
|
+
}));
|
|
1510
|
+
return this.loadModels().toPromise();
|
|
1515
1511
|
};
|
|
1516
1512
|
HeEngineService.prototype.loadModels = function () {
|
|
1517
1513
|
var _this = this;
|
|
@@ -1550,6 +1546,9 @@
|
|
|
1550
1546
|
HeEngineService.prototype.model = function (model) {
|
|
1551
1547
|
return this.model$(model).pipe(operators.take(1)).toPromise();
|
|
1552
1548
|
};
|
|
1549
|
+
HeEngineService.prototype.latestVersion = function () {
|
|
1550
|
+
return this.latestVersion$.pipe(operators.take(1)).toPromise();
|
|
1551
|
+
};
|
|
1553
1552
|
HeEngineService.prototype.listModels = function (params) {
|
|
1554
1553
|
return this.http.get(this._calculationsBaseUrl + "/models", {
|
|
1555
1554
|
params: filterParams(params)
|
|
@@ -1939,10 +1938,11 @@
|
|
|
1939
1938
|
|
|
1940
1939
|
var valueLink = function (value) { return schema.isExpandable(value) && value['@id'] ? [baseUrl(), value['@type'].toLowerCase(), value['@id']].join('/') : null; };
|
|
1941
1940
|
var valueLinkRef = function (value, href) { return href ? "<a href=\"" + href + "\">" + (value.name || value['@id']) + "</a>" : null; };
|
|
1941
|
+
var valueValue = function (value) { return Array.isArray(value) ? value.map(valueValue).join(', ') : utils.toPrecision(value); };
|
|
1942
1942
|
var stringMapper = {
|
|
1943
1943
|
undefined: function () { return ''; },
|
|
1944
1944
|
blankNode: function (value) { return 'term' in value
|
|
1945
|
-
? "" + valueLinkRef(value.term, valueLink(value.term)) + ('value' in value ? ": " + value.value : '')
|
|
1945
|
+
? "" + valueLinkRef(value.term, valueLink(value.term)) + ('value' in value ? ": " + valueValue(value.value) : '')
|
|
1946
1946
|
: valueLinkRef(value, valueLink(value)) || value.name || value['@id']; },
|
|
1947
1947
|
object: function (value) { return Array.isArray(value)
|
|
1948
1948
|
? value.map(toString).join(', ')
|
|
@@ -2376,7 +2376,7 @@
|
|
|
2376
2376
|
return SkeletonTextComponent;
|
|
2377
2377
|
}());
|
|
2378
2378
|
SkeletonTextComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkeletonTextComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2379
|
-
SkeletonTextComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkeletonTextComponent, selector: "he-skeleton-text", inputs: { animated: "animated", width: "width", height: "height" }, host: { properties: { "class.is-animated": "this.isAnimated", "style.width": "this.hasWidth", "style.height": "this.hasHeight" } }, ngImport: i0__namespace, template: "<span> </span>\n", styles: [":host{border-radius:
|
|
2379
|
+
SkeletonTextComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkeletonTextComponent, selector: "he-skeleton-text", inputs: { animated: "animated", width: "width", height: "height" }, host: { properties: { "class.is-animated": "this.isAnimated", "style.width": "this.hasWidth", "style.height": "this.hasHeight" } }, ngImport: i0__namespace, template: "<span> </span>\n", styles: [":host{border-radius:3px;display:block;width:100%;height:inherit;margin-top:4px;margin-bottom:4px;background:rgba(0,0,0,.065);line-height:10px;-webkit-user-select:none;user-select:none;pointer-events:none}span{display:inline-block}:host(.is-animated){position:relative;background:linear-gradient(to right,rgba(0,0,0,.065) 8%,rgba(0,0,0,.135) 18%,rgba(0,0,0,.065) 33%);background-size:800px 104px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear}@keyframes shimmer{0%{background-position:-468px 0}to{background-position:468px 0}}\n"] });
|
|
2380
2380
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkeletonTextComponent, decorators: [{
|
|
2381
2381
|
type: i0.Component,
|
|
2382
2382
|
args: [{
|
|
@@ -4481,6 +4481,15 @@
|
|
|
4481
4481
|
]
|
|
4482
4482
|
}
|
|
4483
4483
|
});
|
|
4484
|
+
var productsQuery = Object.freeze({
|
|
4485
|
+
bool: {
|
|
4486
|
+
must: [
|
|
4487
|
+
matchType(schema.NodeType.Term)
|
|
4488
|
+
],
|
|
4489
|
+
should: schema.productTermTermType.term.map(matchTermType),
|
|
4490
|
+
minimum_should_match: 1
|
|
4491
|
+
}
|
|
4492
|
+
});
|
|
4484
4493
|
var matchAggregatedQuery = matchQuery('aggregated', true);
|
|
4485
4494
|
var isNestedKey = function (key) { return schema.nestedSearchableKeys.includes(key.split('.')[0]); };
|
|
4486
4495
|
var matchNestedKey = function (key, query) { return isNestedKey(key) ? {
|
|
@@ -5220,7 +5229,7 @@
|
|
|
5220
5229
|
return NodeCsvSelectHeadersComponent;
|
|
5221
5230
|
}());
|
|
5222
5231
|
NodeCsvSelectHeadersComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeCsvSelectHeadersComponent, deps: [{ token: HeSchemaService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5223
|
-
NodeCsvSelectHeadersComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeCsvSelectHeadersComponent, selector: "he-node-csv-select-headers", inputs: { csv: "csv", keys: "keys", includeDefaultCSV: "includeDefaultCSV" }, outputs: { headersChanged: "headersChanged" }, ngImport: i0__namespace, template: "<p class=\"mb-2\">Please select which columns you would like to include:</p>\n\n<p class=\"my-2 is-size-7\"><i>You can drag and drop the headers to sort them as they would appear in the CSV file.</i></p>\n\n<div class=\"columns toggle-all mx-4 pb-1 mb-0\">\n <div class=\"column\">\n <label class=\"checkbox ml-1\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"allSelected\"\n (change)=\"toggleAll(); refresh()\"\n >\n <span class=\"ml-2\">Toggle All</span>\n </label>\n </div>\n\n <div class=\"column is-narrow has-text-right\">\n <div class=\"dropdown is-right has-text-left\"\n [class.is-active]=\"showSelectTermFields\"\n (clickOutside)=\"showSelectTermFields = false\"\n >\n <div class=\"dropdown-trigger\" (click)=\"showSelectTermFields = !showSelectTermFields\">\n <button class=\"button is-small\"\n aria-haspopup=\"true\" aria-controls=\"select-menu\"\n >\n <span>Advanced Filters</span>\n <span class=\"icon is-small\">\n <fa-icon icon=\"filter\" aria-hidden=\"true\"></fa-icon>\n </span>\n </button>\n </div>\n <div class=\"dropdown-menu\" id=\"select-menu\" role=\"menu\">\n <div class=\"dropdown-content\">\n <a class=\"dropdown-item\">\n <label class=\"checkbox ml-1\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"showNonIncluded\"\n (change)=\"refresh()\"\n >\n <span class=\"ml-2\">Include <code>internal</code> fields</span>\n </label>\n </a>\n <div class=\"dropdown-item\">\n <p>Toggle Term Fields</p>\n </div>\n <a class=\"dropdown-item\"\n *ngFor=\"let field of termFields\"\n >\n <label class=\"checkbox ml-1\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"termFieldSelected[field]\"\n (change)=\"toggleTermField(field)\"\n >\n <span class=\"ml-2\">{{field}}</span>\n </label>\n </a>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"drag-container\" *ngIf=\"!loading; else loader\">\n <div class=\"card\" *ngFor=\"let group of headers | keys\">\n <header class=\"card-header\" *ngIf=\"group.key\">\n <div class=\"card-header-title\">\n <label class=\"checkbox ml-1\">\n <input type=\"checkbox\" class=\"selector\"\n [indeterminate]=\"group.value.partialSelected\"\n [(ngModel)]=\"group.value.selected\"\n (change)=\"updateGroup(group.key); refresh()\"\n >\n <span class=\"ml-2\">{{group.key}}</span>\n </label>\n </div>\n <span class=\"card-header-icon has-text-link\" aria-label=\"open / close\"\n (click)=\"group.value.open = !group.value.open\" pointer\n >\n <span class=\"icon\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!group.value.open\"></fa-icon>\n <fa-icon icon=\"angle-left\" [class.is-hidden]=\"group.value.open\"></fa-icon>\n </span>\n </span>\n </header>\n\n <div class=\"card-content p-3\" [class.is-hidden]=\"!group.value.open\">\n <ul cdkDropList (cdkDropListDropped)=\"dropHeader($event, group.key)\">\n <ng-container *ngFor=\"let header of group.value.headers\">\n <ng-container *ngIf=\"header.included || showNonIncluded\">\n <li cdkDrag>\n <label class=\"checkbox ml-2\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"header.selected\"\n (change)=\"updateGroupHeader(group.key); refresh()\"\n >\n <span class=\"ml-2\">{{header.header}}</span>\n </label>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </div>\n </div>\n</div>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [".toggle-all{border-bottom:1px solid #7a7a7a}.drag-container,.table-container{max-height:45vh;overflow-y:auto}.cdk-drag-preview{border-radius:
|
|
5232
|
+
NodeCsvSelectHeadersComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeCsvSelectHeadersComponent, selector: "he-node-csv-select-headers", inputs: { csv: "csv", keys: "keys", includeDefaultCSV: "includeDefaultCSV" }, outputs: { headersChanged: "headersChanged" }, ngImport: i0__namespace, template: "<p class=\"mb-2\">Please select which columns you would like to include:</p>\n\n<p class=\"my-2 is-size-7\"><i>You can drag and drop the headers to sort them as they would appear in the CSV file.</i></p>\n\n<div class=\"columns toggle-all mx-4 pb-1 mb-0\">\n <div class=\"column\">\n <label class=\"checkbox ml-1\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"allSelected\"\n (change)=\"toggleAll(); refresh()\"\n >\n <span class=\"ml-2\">Toggle All</span>\n </label>\n </div>\n\n <div class=\"column is-narrow has-text-right\">\n <div class=\"dropdown is-right has-text-left\"\n [class.is-active]=\"showSelectTermFields\"\n (clickOutside)=\"showSelectTermFields = false\"\n >\n <div class=\"dropdown-trigger\" (click)=\"showSelectTermFields = !showSelectTermFields\">\n <button class=\"button is-small\"\n aria-haspopup=\"true\" aria-controls=\"select-menu\"\n >\n <span>Advanced Filters</span>\n <span class=\"icon is-small\">\n <fa-icon icon=\"filter\" aria-hidden=\"true\"></fa-icon>\n </span>\n </button>\n </div>\n <div class=\"dropdown-menu\" id=\"select-menu\" role=\"menu\">\n <div class=\"dropdown-content\">\n <a class=\"dropdown-item\">\n <label class=\"checkbox ml-1\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"showNonIncluded\"\n (change)=\"refresh()\"\n >\n <span class=\"ml-2\">Include <code>internal</code> fields</span>\n </label>\n </a>\n <div class=\"dropdown-item\">\n <p>Toggle Term Fields</p>\n </div>\n <a class=\"dropdown-item\"\n *ngFor=\"let field of termFields\"\n >\n <label class=\"checkbox ml-1\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"termFieldSelected[field]\"\n (change)=\"toggleTermField(field)\"\n >\n <span class=\"ml-2\">{{field}}</span>\n </label>\n </a>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"drag-container\" *ngIf=\"!loading; else loader\">\n <div class=\"card\" *ngFor=\"let group of headers | keys\">\n <header class=\"card-header\" *ngIf=\"group.key\">\n <div class=\"card-header-title\">\n <label class=\"checkbox ml-1\">\n <input type=\"checkbox\" class=\"selector\"\n [indeterminate]=\"group.value.partialSelected\"\n [(ngModel)]=\"group.value.selected\"\n (change)=\"updateGroup(group.key); refresh()\"\n >\n <span class=\"ml-2\">{{group.key}}</span>\n </label>\n </div>\n <span class=\"card-header-icon has-text-link\" aria-label=\"open / close\"\n (click)=\"group.value.open = !group.value.open\" pointer\n >\n <span class=\"icon\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!group.value.open\"></fa-icon>\n <fa-icon icon=\"angle-left\" [class.is-hidden]=\"group.value.open\"></fa-icon>\n </span>\n </span>\n </header>\n\n <div class=\"card-content p-3\" [class.is-hidden]=\"!group.value.open\">\n <ul cdkDropList (cdkDropListDropped)=\"dropHeader($event, group.key)\">\n <ng-container *ngFor=\"let header of group.value.headers\">\n <ng-container *ngIf=\"header.included || showNonIncluded\">\n <li cdkDrag>\n <label class=\"checkbox ml-2\">\n <input type=\"checkbox\" class=\"selector\"\n [(ngModel)]=\"header.selected\"\n (change)=\"updateGroupHeader(group.key); refresh()\"\n >\n <span class=\"ml-2\">{{header.header}}</span>\n </label>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </div>\n </div>\n</div>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [".toggle-all{border-bottom:1px solid #7a7a7a}.drag-container,.table-container{max-height:45vh;overflow-y:auto}.cdk-drag-preview{border-radius:3px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;list-style:none}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\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: 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: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i6__namespace.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }], pipes: { "keys": KeysPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
5224
5233
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeCsvSelectHeadersComponent, decorators: [{
|
|
5225
5234
|
type: i0.Component,
|
|
5226
5235
|
args: [{
|
|
@@ -5734,7 +5743,7 @@
|
|
|
5734
5743
|
prev[uniqueKey] = {
|
|
5735
5744
|
id: id,
|
|
5736
5745
|
key: key,
|
|
5737
|
-
configModels: __spreadArray(__spreadArray([], __read(((prev[uniqueKey] || {}).configModels || []))), __read((configModels || [])))
|
|
5746
|
+
configModels: utils.unique(__spreadArray(__spreadArray([], __read(((prev[uniqueKey] || {}).configModels || []))), __read((configModels || []))))
|
|
5738
5747
|
};
|
|
5739
5748
|
return prev;
|
|
5740
5749
|
}, {})); };
|
|
@@ -5890,17 +5899,27 @@
|
|
|
5890
5899
|
.filter(function (v) { return v.configModels.length > 0; })
|
|
5891
5900
|
.map(dataWithConfigModelLogs(logs));
|
|
5892
5901
|
};
|
|
5902
|
+
var isModelForInputProduct = function (type, key) { return [
|
|
5903
|
+
key !== 'hestiaAggregatedData',
|
|
5904
|
+
!key.includes('/input/') || type === schema.SchemaType.Input,
|
|
5905
|
+
!key.includes('/product/') || type === schema.SchemaType.Product,
|
|
5906
|
+
].every(Boolean); };
|
|
5893
5907
|
var isBackgroundNoInput = function (logs) { return logs.methodTier === schema.EmissionMethodTier.background && !logs.input; };
|
|
5894
|
-
var isModelLog = function (logs) { return
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5908
|
+
var isModelLog = function (logs, type) { return function (key) {
|
|
5909
|
+
var log = logs[key];
|
|
5910
|
+
return [
|
|
5911
|
+
// handle Product same as Input
|
|
5912
|
+
isModelForInputProduct(type, key),
|
|
5913
|
+
!isBackgroundNoInput(log),
|
|
5914
|
+
!log.isKey,
|
|
5915
|
+
!log.input,
|
|
5916
|
+
!log.property
|
|
5917
|
+
].every(Boolean) && [
|
|
5918
|
+
'shouldRun' in log,
|
|
5919
|
+
'shouldRunOrchestrator' in log,
|
|
5920
|
+
'runRequired' in log
|
|
5921
|
+
].some(Boolean);
|
|
5922
|
+
}; };
|
|
5904
5923
|
var modelConfigOrder = function (models, termId, modelKey, model) {
|
|
5905
5924
|
var indexes = models.map(function (m, index) {
|
|
5906
5925
|
var arrayIndex = Array.isArray(m) ? modelConfigOrder(m, termId, modelKey, model) : '';
|
|
@@ -5934,8 +5953,11 @@
|
|
|
5934
5953
|
findMatchingModel(models, modelKeyParams(node, (type === null || type === void 0 ? void 0 : type.toLowerCase()) + "." + methodId)) ||
|
|
5935
5954
|
// handle "transformation"
|
|
5936
5955
|
((subValue === null || subValue === void 0 ? void 0 : subValue.key) ? findMatchingModel(models, modelKeyParams(node, subValue === null || subValue === void 0 ? void 0 : subValue.key)) : undefined) ||
|
|
5937
|
-
// handle "transformation/excreta" and other models with "/"
|
|
5938
|
-
(methodId.includes('/') ? findMatchingModel(models, {
|
|
5956
|
+
// handle "transformation/input/excreta" and other models with "/"
|
|
5957
|
+
(methodId.includes('/') ? findMatchingModel(models, {
|
|
5958
|
+
model: methodId.split('/')[0],
|
|
5959
|
+
modelKey: methodId.split('/').slice(1).join('.')
|
|
5960
|
+
}) : undefined)
|
|
5939
5961
|
};
|
|
5940
5962
|
};
|
|
5941
5963
|
};
|
|
@@ -5992,7 +6014,7 @@
|
|
|
5992
6014
|
var recalculated = recalculatedValues.filter(function (v) { return termId === v.term['@id']; });
|
|
5993
6015
|
var hasData = !!original.length || !!recalculated.length || Object.keys(termLogs).length > 0;
|
|
5994
6016
|
var configModelsData = { nodeType: nodeType, type: type, termId: termId, termType: termType };
|
|
5995
|
-
var configModels = groupParallelModels(config, termId, nodeKey, utils.unique(__spreadArray([], __read((termLogs.models || []).filter(
|
|
6017
|
+
var configModels = groupParallelModels(config, termId, nodeKey, utils.unique(__spreadArray([], __read((termLogs.models || []).filter(isModelLog(termLogs, type))))).map(configModelWithDocs(models, configModelsData)));
|
|
5996
6018
|
var keys = logKeys(termLogs, original, recalculated, models, configModelsData);
|
|
5997
6019
|
var subValues = logSubValues(logs, termLogs, original, recalculated, models, configModelsData);
|
|
5998
6020
|
var isRequired = !Object.values(termLogs)
|
|
@@ -6297,7 +6319,7 @@
|
|
|
6297
6319
|
return NodeValueDetailsComponent;
|
|
6298
6320
|
}());
|
|
6299
6321
|
NodeValueDetailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeValueDetailsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6300
|
-
NodeValueDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: { data: "data", nodeType: "nodeType", dataKey: "dataKey" }, ngImport: i0__namespace, template: "<ng-container *bindOnce=\"data\">\n <ng-container *ngIf=\"showInline; else asTable\">\n <ng-container *ngFor=\"let key of keys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"
|
|
6322
|
+
NodeValueDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: { data: "data", nodeType: "nodeType", dataKey: "dataKey" }, ngImport: i0__namespace, template: "<ng-container *bindOnce=\"data\">\n <ng-container *ngIf=\"showInline; else asTable\">\n <ng-container *ngFor=\"let key of keys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n <ng-container *ngFor=\"let key of additionalKeys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #asTable>\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" key=\"term\"></he-link-key-value>\n\n <div class=\"table-container mt-2\">\n <table class=\"table is-narrow\">\n <thead>\n <th *ngFor=\"let key of tableKeys\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n </th>\n </thead>\n <tbody>\n <tr *ngFor=\"let node of data!.nodes\">\n <td *ngFor=\"let key of tableKeys\">\n <he-link-key-value [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\" [defaultValue]=\"defaultValue(key)\"></he-link-key-value>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n", styles: ["table{background-color:transparent;color:#fff}table::ng-deep he-link-key-value>a:first-child,table::ng-deep he-link-key-value>a:first-child+span{display:none}\n"], components: [{ type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: ["node", "nodeType", "dataKey", "key", "defaultValue"] }], directives: [{ type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
6301
6323
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeValueDetailsComponent, decorators: [{
|
|
6302
6324
|
type: i0.Component,
|
|
6303
6325
|
args: [{
|
|
@@ -7261,6 +7283,67 @@
|
|
|
7261
7283
|
}]
|
|
7262
7284
|
}] });
|
|
7263
7285
|
|
|
7286
|
+
var isVersionKey = function (key) { return ['addedVersion', 'updatedVersion'].includes(key); };
|
|
7287
|
+
var version = function (node) {
|
|
7288
|
+
var versions = Object.entries(node)
|
|
7289
|
+
.filter(function (_a) {
|
|
7290
|
+
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
7291
|
+
return isVersionKey(key) ||
|
|
7292
|
+
typeof value === 'object' && (Array.isArray(value) || value.addedVersion || value.updatedVersion);
|
|
7293
|
+
})
|
|
7294
|
+
.flatMap(function (_a) {
|
|
7295
|
+
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
7296
|
+
return isVersionKey(key)
|
|
7297
|
+
? value
|
|
7298
|
+
: typeof value === 'object'
|
|
7299
|
+
? Array.isArray(value)
|
|
7300
|
+
? value.map(version)
|
|
7301
|
+
: (value.addedVersion || value.updatedVersion)
|
|
7302
|
+
: value;
|
|
7303
|
+
})
|
|
7304
|
+
.filter(Boolean);
|
|
7305
|
+
return (versions === null || versions === void 0 ? void 0 : versions.length) ? versions[0] : null;
|
|
7306
|
+
};
|
|
7307
|
+
|
|
7308
|
+
var EngineModelsVersionLinkComponent = /** @class */ (function () {
|
|
7309
|
+
function EngineModelsVersionLinkComponent(service) {
|
|
7310
|
+
this.service = service;
|
|
7311
|
+
}
|
|
7312
|
+
Object.defineProperty(EngineModelsVersionLinkComponent.prototype, "version", {
|
|
7313
|
+
get: function () {
|
|
7314
|
+
return version(this.node);
|
|
7315
|
+
},
|
|
7316
|
+
enumerable: false,
|
|
7317
|
+
configurable: true
|
|
7318
|
+
});
|
|
7319
|
+
Object.defineProperty(EngineModelsVersionLinkComponent.prototype, "url", {
|
|
7320
|
+
get: function () {
|
|
7321
|
+
return [
|
|
7322
|
+
engineGitBaseUrl(),
|
|
7323
|
+
'-',
|
|
7324
|
+
'tree',
|
|
7325
|
+
"v" + this.version
|
|
7326
|
+
].filter(Boolean).join('/');
|
|
7327
|
+
},
|
|
7328
|
+
enumerable: false,
|
|
7329
|
+
configurable: true
|
|
7330
|
+
});
|
|
7331
|
+
return EngineModelsVersionLinkComponent;
|
|
7332
|
+
}());
|
|
7333
|
+
EngineModelsVersionLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EngineModelsVersionLinkComponent, deps: [{ token: HeEngineService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7334
|
+
EngineModelsVersionLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EngineModelsVersionLinkComponent, selector: "he-engine-models-version-link", inputs: { node: "node" }, ngImport: i0__namespace, template: "<div class=\"tags has-addons\" *ngIf=\"service.latestVersion$ | async as latestVersion\">\n <ng-container *bindOnce=\"url\">\n <a class=\"tag is-info\" [href]=\"url\" target=\"_blank\" (click)=\"$event.stopPropagation()\">\n {{version}}\n <fa-icon class=\"ml-2\" icon=\"external-link-alt\" size=\"sm\"></fa-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"latestVersion === version; else outdated\">\n <ng-container *ngTemplateOutlet=\"latest\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #latest>\n <span class=\"tag is-success\">latest recalculations</span>\n</ng-template>\n\n<ng-template #outdated>\n <span class=\"tag is-warning\">outdated recalculations</span>\n</ng-template>\n", styles: ["a{color:inherit}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
7335
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EngineModelsVersionLinkComponent, decorators: [{
|
|
7336
|
+
type: i0.Component,
|
|
7337
|
+
args: [{
|
|
7338
|
+
selector: 'he-engine-models-version-link',
|
|
7339
|
+
templateUrl: './engine-models-version-link.component.html',
|
|
7340
|
+
styleUrls: ['./engine-models-version-link.component.scss'],
|
|
7341
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
7342
|
+
}]
|
|
7343
|
+
}], ctorParameters: function () { return [{ type: HeEngineService }]; }, propDecorators: { node: [{
|
|
7344
|
+
type: i0.Input
|
|
7345
|
+
}] } });
|
|
7346
|
+
|
|
7264
7347
|
var gitUrl = gitHome + "/hestia-engine-orchestrator/-/blob/" + gitBranch();
|
|
7265
7348
|
var generalDocsUrl = gitUrl + "/hestia_earth/orchestrator/config/README.md";
|
|
7266
7349
|
var strategiesDocs = gitUrl + "/hestia_earth/orchestrator/strategies";
|
|
@@ -7474,6 +7557,7 @@
|
|
|
7474
7557
|
}], ctorParameters: function () { return [{ type: i1__namespace$1.FormBuilder }, { type: HeSearchService }]; } });
|
|
7475
7558
|
|
|
7476
7559
|
var components$3 = [
|
|
7560
|
+
EngineModelsVersionLinkComponent,
|
|
7477
7561
|
EngineOrchestratorEditComponent,
|
|
7478
7562
|
EngineRequirementsFormComponent
|
|
7479
7563
|
];
|
|
@@ -7483,10 +7567,12 @@
|
|
|
7483
7567
|
return HeEngineModule;
|
|
7484
7568
|
}());
|
|
7485
7569
|
HeEngineModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
7486
|
-
HeEngineModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, declarations: [
|
|
7570
|
+
HeEngineModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, declarations: [EngineModelsVersionLinkComponent,
|
|
7571
|
+
EngineOrchestratorEditComponent,
|
|
7487
7572
|
EngineRequirementsFormComponent], imports: [i2.CommonModule, i1$1.ReactiveFormsModule, i1$1.FormsModule,
|
|
7488
7573
|
HeCommonModule,
|
|
7489
|
-
HeNodeModule], exports: [
|
|
7574
|
+
HeNodeModule], exports: [EngineModelsVersionLinkComponent,
|
|
7575
|
+
EngineOrchestratorEditComponent,
|
|
7490
7576
|
EngineRequirementsFormComponent] });
|
|
7491
7577
|
HeEngineModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, imports: [[
|
|
7492
7578
|
i2.CommonModule, i1$1.ReactiveFormsModule, i1$1.FormsModule,
|
|
@@ -10157,6 +10243,7 @@
|
|
|
10157
10243
|
exports.DataTableComponent = DataTableComponent;
|
|
10158
10244
|
exports.DefaultPipe = DefaultPipe;
|
|
10159
10245
|
exports.EllipsisPipe = EllipsisPipe;
|
|
10246
|
+
exports.EngineModelsVersionLinkComponent = EngineModelsVersionLinkComponent;
|
|
10160
10247
|
exports.EngineOrchestratorEditComponent = EngineOrchestratorEditComponent;
|
|
10161
10248
|
exports.EngineRequirementsFormComponent = EngineRequirementsFormComponent;
|
|
10162
10249
|
exports.FilesFormComponent = FilesFormComponent;
|
|
@@ -10250,6 +10337,7 @@
|
|
|
10250
10337
|
exports.definitionToSchemaType = definitionToSchemaType;
|
|
10251
10338
|
exports.deserializeSearchFilters = deserializeSearchFilters;
|
|
10252
10339
|
exports.ellipsis = ellipsis;
|
|
10340
|
+
exports.engineGitBaseUrl = engineGitBaseUrl;
|
|
10253
10341
|
exports.engineGitUrl = engineGitUrl;
|
|
10254
10342
|
exports.errorHasError = errorHasError;
|
|
10255
10343
|
exports.errorHasWarning = errorHasWarning;
|
|
@@ -10342,6 +10430,7 @@
|
|
|
10342
10430
|
exports.polygonToCoordinates = polygonToCoordinates;
|
|
10343
10431
|
exports.polygonsFromFeature = polygonsFromFeature;
|
|
10344
10432
|
exports.primaryProduct = primaryProduct;
|
|
10433
|
+
exports.productsQuery = productsQuery;
|
|
10345
10434
|
exports.propertyError = propertyError;
|
|
10346
10435
|
exports.propertyId = propertyId;
|
|
10347
10436
|
exports.recursiveProperties = recursiveProperties;
|