@hestia-earth/ui-components 0.2.0 → 0.2.1
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 +95 -9
- 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/sort-by.pipe.d.ts +7 -0
- package/cycles/cycles-practices/cycles-practices.component.d.ts +1 -0
- package/cycles/cycles-practices-timeline/cycles-practices-timeline.component.d.ts +14 -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/sort-by.pipe.js +17 -0
- package/esm2015/cycles/cycles-practices/cycles-practices.component.js +12 -10
- package/esm2015/cycles/cycles-practices-timeline/cycles-practices-timeline.component.js +36 -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/node/node-logs-models/node-logs-models.component.js +2 -2
- package/esm2015/node/node-value-details/node-value-details.component.js +2 -2
- package/fesm2015/hestia-earth-ui-components.js +87 -12
- 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
|
}());
|
|
@@ -1690,7 +1690,7 @@
|
|
|
1690
1690
|
}
|
|
1691
1691
|
Object.defineProperty(BlankNodeStateNoticeComponent.prototype, "show", {
|
|
1692
1692
|
get: function () {
|
|
1693
|
-
return
|
|
1693
|
+
return this.dataState !== api.DataState.original;
|
|
1694
1694
|
},
|
|
1695
1695
|
enumerable: false,
|
|
1696
1696
|
configurable: true
|
|
@@ -4122,6 +4122,25 @@
|
|
|
4122
4122
|
}]
|
|
4123
4123
|
}] });
|
|
4124
4124
|
|
|
4125
|
+
var orderBy$6 = require('lodash.orderby');
|
|
4126
|
+
var SortByPipe = /** @class */ (function () {
|
|
4127
|
+
function SortByPipe() {
|
|
4128
|
+
}
|
|
4129
|
+
SortByPipe.prototype.transform = function (value, keys, orders) {
|
|
4130
|
+
if (orders === void 0) { orders = ['asc']; }
|
|
4131
|
+
return orderBy$6(value, keys, orders);
|
|
4132
|
+
};
|
|
4133
|
+
return SortByPipe;
|
|
4134
|
+
}());
|
|
4135
|
+
SortByPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SortByPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
4136
|
+
SortByPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SortByPipe, name: "sortBy" });
|
|
4137
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SortByPipe, decorators: [{
|
|
4138
|
+
type: i0.Pipe,
|
|
4139
|
+
args: [{
|
|
4140
|
+
name: 'sortBy'
|
|
4141
|
+
}]
|
|
4142
|
+
}] });
|
|
4143
|
+
|
|
4125
4144
|
var components$7 = [
|
|
4126
4145
|
BlankNodeStateComponent,
|
|
4127
4146
|
BlankNodeStateNoticeComponent,
|
|
@@ -4139,7 +4158,8 @@
|
|
|
4139
4158
|
TimesPipe,
|
|
4140
4159
|
ClickOutsideDirective,
|
|
4141
4160
|
GetPipe,
|
|
4142
|
-
IsArrayPipe
|
|
4161
|
+
IsArrayPipe,
|
|
4162
|
+
SortByPipe
|
|
4143
4163
|
];
|
|
4144
4164
|
var HeCommonModule = /** @class */ (function () {
|
|
4145
4165
|
function HeCommonModule() {
|
|
@@ -4163,7 +4183,8 @@
|
|
|
4163
4183
|
TimesPipe,
|
|
4164
4184
|
ClickOutsideDirective,
|
|
4165
4185
|
GetPipe,
|
|
4166
|
-
IsArrayPipe
|
|
4186
|
+
IsArrayPipe,
|
|
4187
|
+
SortByPipe], imports: [i2.CommonModule, i1$1.FormsModule, i5.RouterModule,
|
|
4167
4188
|
i11.NgbTypeaheadModule, i11.NgbTooltipModule, i11.NgbPopoverModule,
|
|
4168
4189
|
i1$4.GoogleMapsModule,
|
|
4169
4190
|
HeCommonLightModule], exports: [i11.NgbTypeaheadModule, i11.NgbTooltipModule, i11.NgbPopoverModule,
|
|
@@ -4184,7 +4205,8 @@
|
|
|
4184
4205
|
TimesPipe,
|
|
4185
4206
|
ClickOutsideDirective,
|
|
4186
4207
|
GetPipe,
|
|
4187
|
-
IsArrayPipe
|
|
4208
|
+
IsArrayPipe,
|
|
4209
|
+
SortByPipe] });
|
|
4188
4210
|
HeCommonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCommonModule, imports: [[
|
|
4189
4211
|
i2.CommonModule, i1$1.FormsModule, i5.RouterModule,
|
|
4190
4212
|
i11.NgbTypeaheadModule, i11.NgbTooltipModule, i11.NgbPopoverModule,
|
|
@@ -5846,7 +5868,7 @@
|
|
|
5846
5868
|
return NodeLogsModelsComponent;
|
|
5847
5869
|
}());
|
|
5848
5870
|
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 } });
|
|
5871
|
+
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)\">\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
5872
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeLogsModelsComponent, decorators: [{
|
|
5851
5873
|
type: i0.Component,
|
|
5852
5874
|
args: [{
|
|
@@ -5920,7 +5942,7 @@
|
|
|
5920
5942
|
'impactAssessment'
|
|
5921
5943
|
];
|
|
5922
5944
|
var tableKeys = [
|
|
5923
|
-
'inputs', 'value', 'dates', 'methodModel', 'methodTier', 'statsDefinition'
|
|
5945
|
+
'inputs', 'transformation', 'value', 'dates', 'methodModel', 'methodTier', 'statsDefinition'
|
|
5924
5946
|
];
|
|
5925
5947
|
var NodeValueDetailsComponent = /** @class */ (function () {
|
|
5926
5948
|
function NodeValueDetailsComponent() {
|
|
@@ -6577,6 +6599,47 @@
|
|
|
6577
6599
|
type: i0.Input
|
|
6578
6600
|
}] } });
|
|
6579
6601
|
|
|
6602
|
+
var CyclesPracticesTimelineComponent = /** @class */ (function () {
|
|
6603
|
+
function CyclesPracticesTimelineComponent(el) {
|
|
6604
|
+
this.el = el;
|
|
6605
|
+
this.now = new Date();
|
|
6606
|
+
}
|
|
6607
|
+
Object.defineProperty(CyclesPracticesTimelineComponent.prototype, "practices", {
|
|
6608
|
+
get: function () {
|
|
6609
|
+
return (this.cycle.practices || []).map(function (p) {
|
|
6610
|
+
var _a;
|
|
6611
|
+
return !p.startDate && ((_a = p.dates) === null || _a === void 0 ? void 0 : _a.length) ? Object.assign(Object.assign({}, p), { startDate: p.dates[0] }) : p;
|
|
6612
|
+
});
|
|
6613
|
+
},
|
|
6614
|
+
enumerable: false,
|
|
6615
|
+
configurable: true
|
|
6616
|
+
});
|
|
6617
|
+
CyclesPracticesTimelineComponent.prototype.trackByPractice = function (_index, _b) {
|
|
6618
|
+
var term = _b.term;
|
|
6619
|
+
return term['@id'];
|
|
6620
|
+
};
|
|
6621
|
+
Object.defineProperty(CyclesPracticesTimelineComponent.prototype, "lineWidth", {
|
|
6622
|
+
get: function () {
|
|
6623
|
+
return this.el.nativeElement.offsetWidth - 60;
|
|
6624
|
+
},
|
|
6625
|
+
enumerable: false,
|
|
6626
|
+
configurable: true
|
|
6627
|
+
});
|
|
6628
|
+
return CyclesPracticesTimelineComponent;
|
|
6629
|
+
}());
|
|
6630
|
+
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 });
|
|
6631
|
+
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; else noDate\">{{practice.startDate | date:'YYYY-MM-dd'}}</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\n<ng-template #noDate>\n <span>No date</span>\n</ng-template>\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 } });
|
|
6632
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesTimelineComponent, decorators: [{
|
|
6633
|
+
type: i0.Component,
|
|
6634
|
+
args: [{
|
|
6635
|
+
selector: 'he-cycles-practices-timeline',
|
|
6636
|
+
templateUrl: './cycles-practices-timeline.component.html',
|
|
6637
|
+
styleUrls: ['./cycles-practices-timeline.component.scss']
|
|
6638
|
+
}]
|
|
6639
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { cycle: [{
|
|
6640
|
+
type: i0.Input
|
|
6641
|
+
}] } });
|
|
6642
|
+
|
|
6580
6643
|
var CyclesPracticesLogsComponent = /** @class */ (function () {
|
|
6581
6644
|
function CyclesPracticesLogsComponent(nodeService) {
|
|
6582
6645
|
this.nodeService = nodeService;
|
|
@@ -6633,6 +6696,7 @@
|
|
|
6633
6696
|
var View$2;
|
|
6634
6697
|
(function (View) {
|
|
6635
6698
|
View["table"] = "table";
|
|
6699
|
+
View["timeline"] = "timeline";
|
|
6636
6700
|
View["logs"] = "logs";
|
|
6637
6701
|
})(View$2 || (View$2 = {}));
|
|
6638
6702
|
var CyclesPracticesComponent = /** @class */ (function () {
|
|
@@ -6679,7 +6743,7 @@
|
|
|
6679
6743
|
return CyclesPracticesComponent;
|
|
6680
6744
|
}());
|
|
6681
6745
|
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
|
|
6746
|
+
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
6747
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CyclesPracticesComponent, decorators: [{
|
|
6684
6748
|
type: i0.Component,
|
|
6685
6749
|
args: [{
|
|
@@ -6824,6 +6888,7 @@
|
|
|
6824
6888
|
CyclesFunctionalUnitMeasureComponent,
|
|
6825
6889
|
CyclesPracticesComponent,
|
|
6826
6890
|
CyclesPracticesLogsComponent,
|
|
6891
|
+
CyclesPracticesTimelineComponent,
|
|
6827
6892
|
CyclesResultComponent
|
|
6828
6893
|
];
|
|
6829
6894
|
var HeCyclesModule = /** @class */ (function () {
|
|
@@ -6841,6 +6906,7 @@
|
|
|
6841
6906
|
CyclesFunctionalUnitMeasureComponent,
|
|
6842
6907
|
CyclesPracticesComponent,
|
|
6843
6908
|
CyclesPracticesLogsComponent,
|
|
6909
|
+
CyclesPracticesTimelineComponent,
|
|
6844
6910
|
CyclesResultComponent], imports: [i2.CommonModule, i1$1.FormsModule,
|
|
6845
6911
|
HeCommonModule,
|
|
6846
6912
|
HeNodeModule], exports: [CyclesActivityComponent,
|
|
@@ -6852,6 +6918,7 @@
|
|
|
6852
6918
|
CyclesFunctionalUnitMeasureComponent,
|
|
6853
6919
|
CyclesPracticesComponent,
|
|
6854
6920
|
CyclesPracticesLogsComponent,
|
|
6921
|
+
CyclesPracticesTimelineComponent,
|
|
6855
6922
|
CyclesResultComponent] });
|
|
6856
6923
|
HeCyclesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCyclesModule, imports: [[
|
|
6857
6924
|
i2.CommonModule, i1$1.FormsModule,
|
|
@@ -7089,7 +7156,7 @@
|
|
|
7089
7156
|
'should NOT have additional properties': function (_g, errorCount) {
|
|
7090
7157
|
var params = _g.params;
|
|
7091
7158
|
return errorCount === 1 ?
|
|
7092
|
-
"The following field does not exist: " + (params === null || params === void 0 ? void 0 : params.additionalProperty) :
|
|
7159
|
+
"The following field does not exist: " + (params === null || params === void 0 ? void 0 : params.additionalProperty) + " or is not allowed in this case." :
|
|
7093
7160
|
"should not have additional properties";
|
|
7094
7161
|
},
|
|
7095
7162
|
'should match pattern "^\\d{13}$"': function () { return "should be composed of 13 numbers"; },
|
|
@@ -7169,6 +7236,22 @@
|
|
|
7169
7236
|
_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
7237
|
_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
7238
|
_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."; },
|
|
7239
|
+
_g['must add the linked inputs to the cycle'] = function (_g, errorCount) {
|
|
7240
|
+
var params = _g.params;
|
|
7241
|
+
var _a, _b;
|
|
7242
|
+
return (errorCount === 1 ?
|
|
7243
|
+
'You have stated some Emissions were created by some Inputs.' :
|
|
7244
|
+
"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.";
|
|
7245
|
+
},
|
|
7246
|
+
_g['must add the linked transformations to the cycle'] = function (_g, errorCount) {
|
|
7247
|
+
var level = _g.level, params = _g.params;
|
|
7248
|
+
var _a, _b;
|
|
7249
|
+
return (errorCount === 1 ?
|
|
7250
|
+
'You have stated some Emissions were created by some Transformations.' :
|
|
7251
|
+
"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' ?
|
|
7252
|
+
'Please check the Terms used in the Emissions and/or the Transformations.' :
|
|
7253
|
+
'You may want to add this Transformation.');
|
|
7254
|
+
},
|
|
7172
7255
|
_g['every item in the list should be unique'] = function (_g) {
|
|
7173
7256
|
var params = _g.params;
|
|
7174
7257
|
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 +7306,7 @@
|
|
|
7223
7306
|
var params = _g.params;
|
|
7224
7307
|
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
7308
|
},
|
|
7309
|
+
_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
7310
|
_g);
|
|
7227
7311
|
var formatCustomErrorMessage = function (message, error, errorCount) {
|
|
7228
7312
|
if (errorCount === void 0) { errorCount = 1; }
|
|
@@ -9662,6 +9746,7 @@
|
|
|
9662
9746
|
exports.CyclesFunctionalUnitMeasureComponent = CyclesFunctionalUnitMeasureComponent;
|
|
9663
9747
|
exports.CyclesPracticesComponent = CyclesPracticesComponent;
|
|
9664
9748
|
exports.CyclesPracticesLogsComponent = CyclesPracticesLogsComponent;
|
|
9749
|
+
exports.CyclesPracticesTimelineComponent = CyclesPracticesTimelineComponent;
|
|
9665
9750
|
exports.CyclesResultComponent = CyclesResultComponent;
|
|
9666
9751
|
exports.DataTableComponent = DataTableComponent;
|
|
9667
9752
|
exports.DefaultPipe = DefaultPipe;
|
|
@@ -9727,6 +9812,7 @@
|
|
|
9727
9812
|
exports.SitesMeasurementsLogsComponent = SitesMeasurementsLogsComponent;
|
|
9728
9813
|
exports.SkeletonTextComponent = SkeletonTextComponent;
|
|
9729
9814
|
exports.SocialTagsComponent = SocialTagsComponent;
|
|
9815
|
+
exports.SortByPipe = SortByPipe;
|
|
9730
9816
|
exports.TagsInputDirective = TagsInputDirective;
|
|
9731
9817
|
exports.TimesPipe = TimesPipe;
|
|
9732
9818
|
exports.ToastComponent = ToastComponent;
|