@hestia-earth/ui-components 0.43.32 → 0.43.33
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.
|
@@ -10,7 +10,7 @@ import { ReplaySubject, of, mergeMap, shareReplay, delay, map, catchError, disti
|
|
|
10
10
|
import { HttpClient } from '@angular/common/http';
|
|
11
11
|
import get from 'lodash.get';
|
|
12
12
|
import { SCHEMA_VERSION, SchemaType, NodeType, TermTermType, productTermTermType, nestedSearchableKeys, SiteSiteType, EmissionMethodTier, isExpandable, isTypeNode, sortKeysByType, uniquenessFields, BlankNodesKey, impactAssessmentTermTermType, measurementTermTermType, emissionTermTermType, inputTermTermType, CycleFunctionalUnit, NonBlankNodesKey, jsonldPath, isTypeValid, typeToSchemaType, infrastructureTermTermType, managementTermTermType } from '@hestia-earth/schema';
|
|
13
|
-
import { formatPrecision, axisLabelCursor, defaultChartSettings, exportAsSVG, downloadFile, hasNegativeContributions, withOthers, barDataset, defaultBarDatasets, defaultBarSettings, categoryLabel, emissionCategories, categoryValues, emissionCategoriesOf, emissionCategoryValue, contributionItemColor, contributionChartHeight, groupDataByCategory, contributionChartConfig, hasNegativeValues, contributionData, defaultContributionSettings, contributionCsv, dataAtIndex, datasetCenter, distributionChart, defaultLineSettings, defaultHorizontalTooltip, horizontalBarHeight, lollipopChartPlugin, backgroundHoverPlugin, afterBarDrawPlugin, axisHoverPlugin, defaultHorizontalBarConfig, chartLabelMaxLength, listColor, getColor, nodeBorderColours, nodeColours as nodeColours$1, hierarchyLegend, downloadSvg, downloadPng, hierarchyCsv, drawHierarchyChart, hierarchyTermTypes, hierarchyContributions, missingTermIds, hierarchyWarnings, hierarchyModels, hierarchyData, defaultIndicatorsModelId, parseContributions, indicatorLogs, nonZeroContributors, logsTotalValue, namedContributors, breakdownBars, breakdownTooltip, breakdownBarText, breakdownScale, logToCsv as logToCsv$1 } from '@hestia-earth/ui-components-charts';
|
|
13
|
+
import { formatPrecision, axisLabelCursor, defaultChartSettings, exportAsSVG, downloadFile, hasNegativeContributions, withOthers, barDataset, defaultBarDatasets, defaultBarSettings, bivariateChart, categoryLabel, emissionCategories, categoryValues, emissionCategoriesOf, emissionCategoryValue, contributionItemColor, contributionChartHeight, groupDataByCategory, contributionChartConfig, hasNegativeValues, contributionData, defaultContributionSettings, contributionCsv, dataAtIndex, datasetCenter, distributionChart, defaultLineSettings, defaultHorizontalTooltip, horizontalBarHeight, lollipopChartPlugin, backgroundHoverPlugin, afterBarDrawPlugin, axisHoverPlugin, defaultHorizontalBarConfig, chartLabelMaxLength, listColor, getColor, nodeBorderColours, nodeColours as nodeColours$1, hierarchyLegend, downloadSvg, downloadPng, hierarchyCsv, drawHierarchyChart, hierarchyTermTypes, hierarchyContributions, missingTermIds, hierarchyWarnings, hierarchyModels, hierarchyData, defaultIndicatorsModelId, parseContributions, indicatorLogs, nonZeroContributors, logsTotalValue, namedContributors, breakdownBars, breakdownTooltip, breakdownBarText, breakdownScale, logToCsv as logToCsv$1 } from '@hestia-earth/ui-components-charts';
|
|
14
14
|
export { ColorPalette, afterBarDrawPlugin, axisHoverPlugin, axisLabelCursor, backgroundHoverPlugin, chartLabelMaxLength, colorToRgba, convertToSvg, d3ellipse, d3wrap, defaultTicksFont, downloadFile, downloadPng, downloadSvg, exportAsSVG, getColor, groupDataByCategory, hexToRgba, increaseScaleLimits, listColor, listColorContinuous, listColorWithAlpha, lollipopChartPlugin, parseColor, registerChart, sumValues } from '@hestia-earth/ui-components-charts';
|
|
15
15
|
import { isEmpty, unique, monthsBefore, toPrecision, isNumber, isUndefined, keyToLabel, duration, sum, min, max, mean, median, isEqual as isEqual$2, diffInDays } from '@hestia-earth/utils';
|
|
16
16
|
import { json2csv } from 'json-2-csv';
|
|
@@ -1858,17 +1858,21 @@ class ClipboardComponent {
|
|
|
1858
1858
|
this.clipboard();
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
|
+
execCopy(value) {
|
|
1862
|
+
this.data = value;
|
|
1863
|
+
return document.execCommand('copy');
|
|
1864
|
+
}
|
|
1861
1865
|
copy(value) {
|
|
1862
1866
|
if (navigator?.clipboard?.writeText) {
|
|
1863
|
-
|
|
1867
|
+
// Safari rejects writeText when it no longer sees a user gesture
|
|
1868
|
+
return navigator.clipboard.writeText(value).catch(() => this.execCopy(value));
|
|
1864
1869
|
}
|
|
1865
1870
|
else if (window['clipboardData']) {
|
|
1866
1871
|
window['clipboardData'].setData('Text', value);
|
|
1867
1872
|
return true;
|
|
1868
1873
|
}
|
|
1869
1874
|
else {
|
|
1870
|
-
this.
|
|
1871
|
-
return document.execCommand('copy');
|
|
1875
|
+
return this.execCopy(value);
|
|
1872
1876
|
}
|
|
1873
1877
|
}
|
|
1874
1878
|
async clipboard() {
|
|
@@ -5859,6 +5863,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
5859
5863
|
args: [{ selector: 'he-bar-chart', exportAs: 'barChart', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ChartComponent, BarChartLegendComponent], template: "<he-chart [data]=\"dataConfig()\" [config]=\"configuration()\" [showExportButton]=\"showExportButton()\">\n <ng-content />\n</he-chart>\n\n@if (!showNegativeValues() && hasNegativeContributions()) {\n <p class=\"is-mt-2 is-italic is-size-7 has-text-center\">\n <span class=\"is-pr-1\">This chart includes negative contributions that will appear as</span>\n <b>0</b>\n <span>.</span>\n </p>\n}\n\n<he-bar-chart-legend [data]=\"maximumData()\" />\n", styles: [":host{display:block}\n"] }]
|
|
5860
5864
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], datasets: [{ type: i0.Input, args: [{ isSignal: true, alias: "datasets", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], datasetLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "datasetLabel", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], showExportButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExportButton", required: false }] }], showNegativeValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNegativeValues", required: false }] }], maximumValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximumValues", required: false }] }], chart: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ChartComponent), { isSignal: true }] }] } });
|
|
5861
5865
|
|
|
5866
|
+
/** Reference `[x, y]` pairs as dots, with the reported pair marked; drawn from `@hestia-earth/ui-components-charts`. */
|
|
5867
|
+
class BivariateChartComponent {
|
|
5868
|
+
constructor() {
|
|
5869
|
+
this.points = input([], ...(ngDevMode ? [{ debugName: "points" }] : []));
|
|
5870
|
+
/**
|
|
5871
|
+
* The reported `[x, y]` pair.
|
|
5872
|
+
*/
|
|
5873
|
+
this.value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
5874
|
+
this.xLabel = input(...(ngDevMode ? [undefined, { debugName: "xLabel" }] : []));
|
|
5875
|
+
this.yLabel = input(...(ngDevMode ? [undefined, { debugName: "yLabel" }] : []));
|
|
5876
|
+
this.config = input({}, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
5877
|
+
this.chart = computed(() => bivariateChart({
|
|
5878
|
+
points: this.points(),
|
|
5879
|
+
value: this.value(),
|
|
5880
|
+
xLabel: this.xLabel(),
|
|
5881
|
+
yLabel: this.yLabel()
|
|
5882
|
+
}), ...(ngDevMode ? [{ debugName: "chart" }] : []));
|
|
5883
|
+
this.dataConfig = computed(() => this.chart().data, ...(ngDevMode ? [{ debugName: "dataConfig" }] : []));
|
|
5884
|
+
this.configuration = computed(() => merge$1({}, this.chart().config, this.config()), ...(ngDevMode ? [{ debugName: "configuration" }] : []));
|
|
5885
|
+
}
|
|
5886
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BivariateChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5887
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: BivariateChartComponent, isStandalone: true, selector: "he-bivariate-chart", inputs: { points: { classPropertyName: "points", publicName: "points", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["bivariateChart"], ngImport: i0, template: "<he-chart [data]=\"dataConfig()\" [config]=\"configuration()\" />\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: ChartComponent, selector: "he-chart", inputs: ["data", "config", "showExportButton"], exportAs: ["chart"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5888
|
+
}
|
|
5889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BivariateChartComponent, decorators: [{
|
|
5890
|
+
type: Component$1,
|
|
5891
|
+
args: [{ selector: 'he-bivariate-chart', exportAs: 'bivariateChart', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ChartComponent], template: "<he-chart [data]=\"dataConfig()\" [config]=\"configuration()\" />\n", styles: [":host{display:block}\n"] }]
|
|
5892
|
+
}], propDecorators: { points: [{ type: i0.Input, args: [{ isSignal: true, alias: "points", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], xLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "xLabel", required: false }] }], yLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yLabel", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
|
|
5893
|
+
|
|
5862
5894
|
class ChartTooltipComponent {
|
|
5863
5895
|
constructor() {
|
|
5864
5896
|
this.domSanitizer = inject(DomSanitizer);
|
|
@@ -13993,12 +14025,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
13993
14025
|
}], ctorParameters: () => [], propDecorators: { map: [{ type: i0.ViewChild, args: [i0.forwardRef(() => GoogleMap), { isSignal: true }] }], loadPolygons: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadPolygons", required: false }] }], sites: [{ type: i0.Input, args: [{ isSignal: true, alias: "sites", required: false }] }], zoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoom", required: false }] }], showNotice: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNotice", required: false }] }] } });
|
|
13994
14026
|
|
|
13995
14027
|
/**
|
|
13996
|
-
* The distribution behind an `is outside confidence interval` warning, shown on demand
|
|
14028
|
+
* The distribution behind an `is outside confidence interval` warning, shown on demand: the normal
|
|
14029
|
+
* curve, or for `is outside confidence interval combined with inputs` the Cycles it was compared with.
|
|
13997
14030
|
*
|
|
13998
14031
|
* The chart cannot be part of the error message itself: the catalog is framework-agnostic and its
|
|
13999
14032
|
* output is injected with `[innerHTML]`, which Angular sanitizes — canvas and inline SVG are
|
|
14000
14033
|
* stripped. So the message stays text and this sits beside it.
|
|
14001
14034
|
*/
|
|
14035
|
+
const bivariateMessage = 'is outside confidence interval combined with inputs';
|
|
14036
|
+
const lightAxis = {
|
|
14037
|
+
ticks: { color: '#fff' },
|
|
14038
|
+
title: { color: '#fff' },
|
|
14039
|
+
grid: { color: 'rgba(255, 255, 255, 0.15)' },
|
|
14040
|
+
border: { color: 'rgba(255, 255, 255, 0.3)' }
|
|
14041
|
+
};
|
|
14002
14042
|
class FilesErrorDistributionComponent {
|
|
14003
14043
|
constructor() {
|
|
14004
14044
|
this.error = input(...(ngDevMode ? [undefined, { debugName: "error" }] : []));
|
|
@@ -14008,7 +14048,11 @@ class FilesErrorDistributionComponent {
|
|
|
14008
14048
|
* on. Older warnings carry `min`/`max` alone, which cannot reconstruct the curve — `min` is
|
|
14009
14049
|
* clamped at 0 — so the button is hidden rather than opening onto a wrong distribution.
|
|
14010
14050
|
*/
|
|
14011
|
-
this.
|
|
14051
|
+
this.isParametric = computed(() => Number.isFinite(this.params()?.mu) && Number.isFinite(this.params()?.sd) && this.params()?.sd > 0, ...(ngDevMode ? [{ debugName: "isParametric" }] : []));
|
|
14052
|
+
/** `points` are the complete Cycles the yield and input total were compared with, as `[input, yield]`. */
|
|
14053
|
+
this.isBivariate = computed(() => this.error()?.message === bivariateMessage && this.params()?.points?.length > 0, ...(ngDevMode ? [{ debugName: "isBivariate" }] : []));
|
|
14054
|
+
this.available = computed(() => this.isBivariate() || this.isParametric(), ...(ngDevMode ? [{ debugName: "available" }] : []));
|
|
14055
|
+
this.bivariateValue = computed(() => [this.params()?.inputValue, this.params()?.value], ...(ngDevMode ? [{ debugName: "bivariateValue" }] : []));
|
|
14012
14056
|
/** What was checked: the grouped input key where there is one, else the term itself. */
|
|
14013
14057
|
this.label = computed(() => this.params()?.group || this.params()?.term?.name, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
14014
14058
|
this.country = computed(() => this.params()?.country?.name, ...(ngDevMode ? [{ debugName: "country" }] : []));
|
|
@@ -14033,12 +14077,15 @@ class FilesErrorDistributionComponent {
|
|
|
14033
14077
|
this.chartConfig = {
|
|
14034
14078
|
options: {
|
|
14035
14079
|
scales: {
|
|
14036
|
-
x:
|
|
14037
|
-
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
|
|
14080
|
+
x: lightAxis
|
|
14081
|
+
}
|
|
14082
|
+
}
|
|
14083
|
+
};
|
|
14084
|
+
this.bivariateChartConfig = {
|
|
14085
|
+
options: {
|
|
14086
|
+
scales: {
|
|
14087
|
+
x: lightAxis,
|
|
14088
|
+
y: lightAxis
|
|
14042
14089
|
}
|
|
14043
14090
|
}
|
|
14044
14091
|
};
|
|
@@ -14047,11 +14094,11 @@ class FilesErrorDistributionComponent {
|
|
|
14047
14094
|
return !this.available();
|
|
14048
14095
|
}
|
|
14049
14096
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FilesErrorDistributionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14050
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FilesErrorDistributionComponent, isStandalone: true, selector: "he-files-error-distribution", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-none": "this.hidden" } }, ngImport: i0, template: "@if (available()) {\n <a\n class=\"is-nowrap\"\n [ngbPopover]=\"distributionPopover\"\n triggers=\"click\"\n autoClose=\"outside\"\n placement=\"bottom auto\"\n popoverClass=\"he-distribution-popover\"\n container=\"body\">\n <he-svg-icon name=\"chart\" size=\"24\" />\n <span class=\"is-pl-2\">Show distribution</span>\n </a>\n}\n\n<ng-template #distributionPopover>\n <div>\n <he-
|
|
14097
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FilesErrorDistributionComponent, isStandalone: true, selector: "he-files-error-distribution", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-none": "this.hidden" } }, ngImport: i0, template: "@if (available()) {\n <a\n class=\"is-nowrap\"\n [ngbPopover]=\"distributionPopover\"\n triggers=\"click\"\n autoClose=\"outside\"\n placement=\"bottom auto\"\n popoverClass=\"he-distribution-popover\"\n container=\"body\">\n <he-svg-icon name=\"chart\" size=\"24\" />\n <span class=\"is-pl-2\">Show distribution</span>\n </a>\n}\n\n<ng-template #distributionPopover>\n <div>\n @if (isBivariate()) {\n <he-bivariate-chart\n [points]=\"params().points\"\n [value]=\"bivariateValue()\"\n [xLabel]=\"label()\"\n yLabel=\"Yield\"\n [config]=\"bivariateChartConfig\" />\n\n <p class=\"is-size-7\">\n Each blue dot is a complete Cycle of\n <b>{{ params().term?.name || params().term?.['@id'] }}</b>\n @if (country()) {\n in\n <b>{{ country() }}</b>\n }\n on the HESTIA platform, placed by its total of\n <b>{{ label() }}</b>\n and its yield\n @if (params().points.length < params().sampleSize) {\n <span>({{ params().points.length }} of the {{ params().sampleSize }} it was compared with)</span>\n }\n <span>.</span>\n </p>\n\n <p class=\"is-size-7 is-mt-2\">\n The orange dot is your Cycle:\n <b>{{ params().inputValue | precision }}</b>\n of {{ label() }} for a yield of\n <b>{{ params().value | precision }}</b>\n <span>.</span>\n @if (thresholdPercent()) {\n The combination is less likely than {{ thresholdPercent() }}% of these Cycles.\n }\n </p>\n } @else {\n <he-distribution-chart\n [mu]=\"params().mu\"\n [sd]=\"params().sd\"\n [intervalMin]=\"params().min\"\n [intervalMax]=\"params().max\"\n [value]=\"value()\"\n [label]=\"label()\"\n [minX]=\"minX\"\n [config]=\"chartConfig\" />\n\n <p class=\"is-size-7\">\n How common each value of\n <b>{{ label() }}</b>\n is\n @if (country()) {\n in\n <b>{{ country() }}</b>\n }\n on the HESTIA platform: the taller the curve, the more common the value. It peaks at the average,\n <b>{{ params().mu | precision }}</b>\n <span>.</span>\n </p>\n\n <p class=\"is-size-7 is-mt-2\">\n The shaded band is the\n @if (thresholdPercent()) {\n {{ thresholdPercent() }}%\n }\n confidence interval, from\n <b>{{ params().min | precision }}</b>\n to\n <b>{{ params().max | precision }}</b>\n <span>. The orange line marks your value.</span>\n </p>\n\n @if (isPrior()) {\n <p class=\"is-size-7 is-mt-2\">\n This is the FAOSTAT prior (national average), not HESTIA Cycle data for this product, so it is weak evidence.\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex-grow:0}::ng-deep .he-distribution-popover .popover-body{width:320px;max-width:100%}::ng-deep .he-distribution-popover he-distribution-chart,::ng-deep .he-distribution-popover he-bivariate-chart{display:block;height:200px}\n"], dependencies: [{ kind: "ngmodule", type: NgbPopoverModule }, { kind: "directive", type: i1$1.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "component", type: HESvgIconComponent, selector: "he-svg-icon", inputs: ["name", "size", "animation"] }, { kind: "component", type: DistributionChartComponent, selector: "he-distribution-chart", inputs: ["distribution", "value", "label", "nbBins", "maxPercentile", "config", "mu", "sd", "intervalMin", "intervalMax", "minX"], exportAs: ["distributionChart"] }, { kind: "component", type: BivariateChartComponent, selector: "he-bivariate-chart", inputs: ["points", "value", "xLabel", "yLabel", "config"], exportAs: ["bivariateChart"] }, { kind: "pipe", type: PrecisionPipe, name: "precision" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14051
14098
|
}
|
|
14052
14099
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FilesErrorDistributionComponent, decorators: [{
|
|
14053
14100
|
type: Component$1,
|
|
14054
|
-
args: [{ selector: 'he-files-error-distribution', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgbPopoverModule, HESvgIconComponent, DistributionChartComponent, PrecisionPipe], template: "@if (available()) {\n <a\n class=\"is-nowrap\"\n [ngbPopover]=\"distributionPopover\"\n triggers=\"click\"\n autoClose=\"outside\"\n placement=\"bottom auto\"\n popoverClass=\"he-distribution-popover\"\n container=\"body\">\n <he-svg-icon name=\"chart\" size=\"24\" />\n <span class=\"is-pl-2\">Show distribution</span>\n </a>\n}\n\n<ng-template #distributionPopover>\n <div>\n <he-
|
|
14101
|
+
args: [{ selector: 'he-files-error-distribution', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgbPopoverModule, HESvgIconComponent, DistributionChartComponent, BivariateChartComponent, PrecisionPipe], template: "@if (available()) {\n <a\n class=\"is-nowrap\"\n [ngbPopover]=\"distributionPopover\"\n triggers=\"click\"\n autoClose=\"outside\"\n placement=\"bottom auto\"\n popoverClass=\"he-distribution-popover\"\n container=\"body\">\n <he-svg-icon name=\"chart\" size=\"24\" />\n <span class=\"is-pl-2\">Show distribution</span>\n </a>\n}\n\n<ng-template #distributionPopover>\n <div>\n @if (isBivariate()) {\n <he-bivariate-chart\n [points]=\"params().points\"\n [value]=\"bivariateValue()\"\n [xLabel]=\"label()\"\n yLabel=\"Yield\"\n [config]=\"bivariateChartConfig\" />\n\n <p class=\"is-size-7\">\n Each blue dot is a complete Cycle of\n <b>{{ params().term?.name || params().term?.['@id'] }}</b>\n @if (country()) {\n in\n <b>{{ country() }}</b>\n }\n on the HESTIA platform, placed by its total of\n <b>{{ label() }}</b>\n and its yield\n @if (params().points.length < params().sampleSize) {\n <span>({{ params().points.length }} of the {{ params().sampleSize }} it was compared with)</span>\n }\n <span>.</span>\n </p>\n\n <p class=\"is-size-7 is-mt-2\">\n The orange dot is your Cycle:\n <b>{{ params().inputValue | precision }}</b>\n of {{ label() }} for a yield of\n <b>{{ params().value | precision }}</b>\n <span>.</span>\n @if (thresholdPercent()) {\n The combination is less likely than {{ thresholdPercent() }}% of these Cycles.\n }\n </p>\n } @else {\n <he-distribution-chart\n [mu]=\"params().mu\"\n [sd]=\"params().sd\"\n [intervalMin]=\"params().min\"\n [intervalMax]=\"params().max\"\n [value]=\"value()\"\n [label]=\"label()\"\n [minX]=\"minX\"\n [config]=\"chartConfig\" />\n\n <p class=\"is-size-7\">\n How common each value of\n <b>{{ label() }}</b>\n is\n @if (country()) {\n in\n <b>{{ country() }}</b>\n }\n on the HESTIA platform: the taller the curve, the more common the value. It peaks at the average,\n <b>{{ params().mu | precision }}</b>\n <span>.</span>\n </p>\n\n <p class=\"is-size-7 is-mt-2\">\n The shaded band is the\n @if (thresholdPercent()) {\n {{ thresholdPercent() }}%\n }\n confidence interval, from\n <b>{{ params().min | precision }}</b>\n to\n <b>{{ params().max | precision }}</b>\n <span>. The orange line marks your value.</span>\n </p>\n\n @if (isPrior()) {\n <p class=\"is-size-7 is-mt-2\">\n This is the FAOSTAT prior (national average), not HESTIA Cycle data for this product, so it is weak evidence.\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex-grow:0}::ng-deep .he-distribution-popover .popover-body{width:320px;max-width:100%}::ng-deep .he-distribution-popover he-distribution-chart,::ng-deep .he-distribution-popover he-bivariate-chart{display:block;height:200px}\n"] }]
|
|
14055
14102
|
}], propDecorators: { error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], hidden: [{
|
|
14056
14103
|
type: HostBinding,
|
|
14057
14104
|
args: ['class.is-none']
|
|
@@ -16176,5 +16223,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
16176
16223
|
* Generated bundle index. Do not edit.
|
|
16177
16224
|
*/
|
|
16178
16225
|
|
|
16179
|
-
export { ARRAY_DELIMITER, ApplyPurePipe, BarChartComponent, BibliographiesSearchConfirmComponent, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, CapitalizePipe, ChartComponent, ChartConfigurationDirective, ChartExportButtonComponent, ChartTooltipComponent, ClickOutsideDirective, ClipboardComponent, CollapsibleBlockComponent, CollapsibleBoxComponent, CollapsibleBoxStyle, CompoundDirective, CompoundPipe, ContributionChartComponent, ControlValueAccessor, CycleNodesKeyGroup, CyclesCompletenessComponent, CyclesEmissionsCategoryService, CyclesEmissionsChartComponent, CyclesFunctionalUnitMeasureComponent, CyclesMetadataComponent, CyclesNodesComponent, CyclesNodesTimelineComponent, CyclesResultComponent, DataTableComponent, DefaultPipe, DeltaColour, DistributionChartComponent, DrawerContainerComponent, DurationPipe, EllipsisPipe, EngineModelsLinkComponent, EngineModelsLookupInfoComponent, EngineModelsStageComponent, EngineModelsStageDeepComponent, EngineModelsStageDeepService, EngineModelsVersionInfoComponent, EngineModelsVersionLinkComponent, EngineOrchestratorEditComponent, EngineRequiredDataFormComponent, EngineRequirementsFormComponent, FileSizePipe, FileUploadErrorKeys, FilesDragDropDirective, FilesDropZoneComponent, FilesErrorSummaryComponent, FilesFormComponent, FilesFormEditableComponent, FilesUploadErrorsComponent, FilterAccordionComponent, FormulaBlockComponent, GUIDE_ENABLED, GetPipe, GlossaryMigrationFormat, GuideOverlayComponent, HE_API_BASE_URL, HE_CALCULATIONS_BASE_URL, HE_MAP_LOADED, HE_NODE_LINK_TYPES, HE_REGION_GEOJSON_BASE_URL, HeAuthService, HeCommonService, HeEngineService, HeGlossaryService, HeMendeleyService, HeNodeCsvService, HeNodeService, HeNodeStoreService, HeSchemaService, HeSearchService, HeToastService, HorizontalBarChartComponent, HorizontalButtonsGroupComponent, ImpactAssessmentsGraphComponent, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, IsArrayPipe, IsObjectPipe, IssueConfirmComponent, KeyToLabelPipe, Level, LineChartComponent, LinkKeyValueComponent, LogStatus, LongPressDirective, MAX_RESULTS, MapsDrawingComponent, MapsDrawingConfirmComponent, MaxPipe, MeanPipe, MedianPipe, MendeleySearchResult, MinPipe, MobileShellComponent, NavigationMenuComponent, NoExtPipe, NodeAggregatedComponent, NodeAggregatedFormulasComponent, NodeAggregatedInfoComponent, NodeAggregatedQualityScoreComponent, NodeAggregationLogsComponent, NodeCsvExportConfirmComponent, NodeCsvPreviewComponent, NodeCsvSelectHeadersComponent, NodeIconComponent, NodeJLogModelsComponent, NodeJsonldComponent, NodeJsonldSchemaComponent, NodeKeyState, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeLogsTimeComponent, NodeMissingLookupFactorsComponent, NodeQualityScore, NodeRecommendationsComponent, NodeSelectComponent, NodeValueDetailsComponent, PipelineStagesProgressComponent, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, RelatedNodeResult, RemoveMarkdownPipe, RepeatPipe, Repository, ResizedDirective, ResizedEvent, ResponsiveService, SchemaInfoComponent, SchemaVersionLinkComponent, SearchExtendComponent, ShelfDialogComponent, ShellComponent, SiteNodesKeyGroup, SitesManagementChartComponent, SitesMapsComponent, SitesNodesComponent, SkeletonTextComponent, SocialTagsComponent, SortByPipe, SortSelectComponent, SumPipe, TagsInputDirective, Template, TermsPropertyContentComponent, TermsSubClassOfContentComponent, TermsUnitsDescriptionComponent, ThousandSuffixesPipe, ThousandsPipe, TimesPipe, ToastComponent, UncapitalizePipe, addPolygonToFeature, aggregatedSitePrimaryProduct, allCountriesQuery, allGroups, allOptions, availableProperties, axisLabelSettings, backgroundModelParams, baseApiUrl, baseUrl, blankNodesTermTypes, bottom, buildSummary, bytesSize, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, capitalize, changelogUrl, clustererImage, code, compoundToHtml, computeKeys, computeTerms, contactUsEmail, contactUsLink, coordinatesToPoint, copyObject, countGroupVisibleNodes, countriesQuery, createMarker, cropsQuery, dataPathLabel, dataPathToKey, dataVersionHeader, dataVersionHeaderKey, defaultFeature, defaultLabel, defaultNodeLinkTypes, defaultRequiredDataIndicators, defaultRequiredDataSiteType, defaultSuggestionType, definitionToSchemaType, distinctUntilChangedDeep, ellipsis, engineGitBaseUrl, engineGitUrl, errorText, errorsLabel, evaluateSuccess, exportFormats, externalLink, externalNodeLink, fillColor, fillStyle, filterBlankNode$1 as filterBlankNode, filterParams, findBackgroundModel, findConfigModels, findMatchingModel, findModels, findNodeModel, findOrchestratorModel, findProperty, findPropertyById, findTermModels, flatFilterData, flatFilterNode, formatCustomErrorMessage, formatDate, formatError, formatPropertyError, formatter$1 as formatter, getDatesBetween, gitBranch, gitHome, glossaryBaseUrl, glossaryLink, groupBlankNodesByTermIdentity, groupChanged, groupJLogByField, groupJLogByTerm, groupLogsByTerm, groupNodesByTerm, groupdLogsByKey, grouppedKeys, grouppedValueKeys, groupsLogsByFields, guideModelUrl, guideNamespace, handleAPIError, handleGuideEvent, hasError, hasValidationError, hasWarning, highestMethodTier, ignoreKeys$2 as ignoreKeys, impactAssessmentProduct, initialFilterState, injectResizeEvent$, inputGroupsTermTypes, isAddPropertyEnabled, isChrome, isDateBetween, isEqual, isExternal, isIdenticalNodeValue, isKeyClosedVisible, isKeyHidden, isMaxStage, isMethodModelAllowed, isNonNodeModelKey, isSchemaIri, isScrolledBelow, isState, isTermTypeAllowed, isValidKey, jLogModelCount, keyToDataPath, levels, loadMapApi, locationQuery, logToCsv, logValueArray, logsKey, lookupUrl, mapFilterData, mapsUrl, markerIcon, markerPie, matchAggregatedQuery, matchAggregatedValidatedQuery, matchBoolPrefixQuery, matchCountry, matchExactQuery, matchGlobalRegion, matchId, matchNameNormalized, matchNestedKey, matchPhrasePrefixQuery, matchPhraseQuery, matchPrimaryProductQuery, matchQuery, matchRegex, matchRegion, matchTermType, matchType, matchesSearchTerm, maxAreaSize, measurementValue, mergeDataWithHeaders, methodTierOrder, migrationErrorMessage, migrationsUrl, modelCount, modelKeyParams, modelParams, models, multiMatchQuery, nestedProperty, nestingEnabled, nestingTypeEnabled, noValue, nodeAvailableProperties, nodeById, nodeChartLabels, nodeColours, nodeDataState, nodeDataStates, nodeDataVersion, nodeId, nodeIdWithoutDataVersion, nodeIds, nodeLink, nodeLinkEnabled, nodeLinkTypeEnabled, nodeLogsUrl, nodeQualityScoreColor, nodeQualityScoreLevel, nodeQualityScoreMaxDefault, nodeQualityScoreOrder, nodeRequestId, nodeSecondaryColours, nodeToAggregationFilename, nodeType, nodeTypeDataState, nodeTypeIcon, nodeTypeIconSchema, nodeUrl, nodeUrlParams, nodeVersion, nodeVersionKey, nodesByState, nodesByType, numberGte, openNodeUrl, openUrl, optionsFromGroup, parentKey, parentProperty, parseData, parseDataPath, parseLines, parseMessage, parseNewValue, pluralize, pointToCoordinates, polygonBounds, polygonToCoordinates, polygonToMap, polygonsFromFeature, populateWithTrackIdsFilterData, postGuideEvent, primaryProduct, productsQuery, propertyError, propertyErrors, propertyId, recursiveProperties, refToSchemaType, refreshPropertyKeys, regionsQuery, repeat, reportIssueLink, reportIssueUrl, requiredDataParams, safeJSONParse, safeJSONStringify, schemaBaseUrl, schemaDataBaseUrl, schemaLink, schemaRequiredProperties, schemaTypeToDefaultValue, scrollToEl, scrollTop, searchFilterData, searchableTypes, siblingProperty, simplifyContributions, singleProperty, siteTooBig, siteTypeToColor, siteTypeToIcon, sortProperties, sortedDates, strokeColor, strokeStyle, subValueKeys, suggestMatchQuery, suggestQuery, suggestTerms, takeAfterViewInit, termLocation, termLocationName, termProperties, termSearch, termTypeLabel, toSnakeCase, toTextParts, toThousands, typeToNewProperty, typeaheadFocus, uncapitalize, uniqueDatesBetween, updateProperties, valueLink, valueToString, valueTypeToDefault, valueValue, versionGitRef, waitFor, wildcardQuery };
|
|
16226
|
+
export { ARRAY_DELIMITER, ApplyPurePipe, BarChartComponent, BibliographiesSearchConfirmComponent, BivariateChartComponent, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, CapitalizePipe, ChartComponent, ChartConfigurationDirective, ChartExportButtonComponent, ChartTooltipComponent, ClickOutsideDirective, ClipboardComponent, CollapsibleBlockComponent, CollapsibleBoxComponent, CollapsibleBoxStyle, CompoundDirective, CompoundPipe, ContributionChartComponent, ControlValueAccessor, CycleNodesKeyGroup, CyclesCompletenessComponent, CyclesEmissionsCategoryService, CyclesEmissionsChartComponent, CyclesFunctionalUnitMeasureComponent, CyclesMetadataComponent, CyclesNodesComponent, CyclesNodesTimelineComponent, CyclesResultComponent, DataTableComponent, DefaultPipe, DeltaColour, DistributionChartComponent, DrawerContainerComponent, DurationPipe, EllipsisPipe, EngineModelsLinkComponent, EngineModelsLookupInfoComponent, EngineModelsStageComponent, EngineModelsStageDeepComponent, EngineModelsStageDeepService, EngineModelsVersionInfoComponent, EngineModelsVersionLinkComponent, EngineOrchestratorEditComponent, EngineRequiredDataFormComponent, EngineRequirementsFormComponent, FileSizePipe, FileUploadErrorKeys, FilesDragDropDirective, FilesDropZoneComponent, FilesErrorSummaryComponent, FilesFormComponent, FilesFormEditableComponent, FilesUploadErrorsComponent, FilterAccordionComponent, FormulaBlockComponent, GUIDE_ENABLED, GetPipe, GlossaryMigrationFormat, GuideOverlayComponent, HE_API_BASE_URL, HE_CALCULATIONS_BASE_URL, HE_MAP_LOADED, HE_NODE_LINK_TYPES, HE_REGION_GEOJSON_BASE_URL, HeAuthService, HeCommonService, HeEngineService, HeGlossaryService, HeMendeleyService, HeNodeCsvService, HeNodeService, HeNodeStoreService, HeSchemaService, HeSearchService, HeToastService, HorizontalBarChartComponent, HorizontalButtonsGroupComponent, ImpactAssessmentsGraphComponent, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, IsArrayPipe, IsObjectPipe, IssueConfirmComponent, KeyToLabelPipe, Level, LineChartComponent, LinkKeyValueComponent, LogStatus, LongPressDirective, MAX_RESULTS, MapsDrawingComponent, MapsDrawingConfirmComponent, MaxPipe, MeanPipe, MedianPipe, MendeleySearchResult, MinPipe, MobileShellComponent, NavigationMenuComponent, NoExtPipe, NodeAggregatedComponent, NodeAggregatedFormulasComponent, NodeAggregatedInfoComponent, NodeAggregatedQualityScoreComponent, NodeAggregationLogsComponent, NodeCsvExportConfirmComponent, NodeCsvPreviewComponent, NodeCsvSelectHeadersComponent, NodeIconComponent, NodeJLogModelsComponent, NodeJsonldComponent, NodeJsonldSchemaComponent, NodeKeyState, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeLogsTimeComponent, NodeMissingLookupFactorsComponent, NodeQualityScore, NodeRecommendationsComponent, NodeSelectComponent, NodeValueDetailsComponent, PipelineStagesProgressComponent, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, RelatedNodeResult, RemoveMarkdownPipe, RepeatPipe, Repository, ResizedDirective, ResizedEvent, ResponsiveService, SchemaInfoComponent, SchemaVersionLinkComponent, SearchExtendComponent, ShelfDialogComponent, ShellComponent, SiteNodesKeyGroup, SitesManagementChartComponent, SitesMapsComponent, SitesNodesComponent, SkeletonTextComponent, SocialTagsComponent, SortByPipe, SortSelectComponent, SumPipe, TagsInputDirective, Template, TermsPropertyContentComponent, TermsSubClassOfContentComponent, TermsUnitsDescriptionComponent, ThousandSuffixesPipe, ThousandsPipe, TimesPipe, ToastComponent, UncapitalizePipe, addPolygonToFeature, aggregatedSitePrimaryProduct, allCountriesQuery, allGroups, allOptions, availableProperties, axisLabelSettings, backgroundModelParams, baseApiUrl, baseUrl, blankNodesTermTypes, bottom, buildSummary, bytesSize, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, capitalize, changelogUrl, clustererImage, code, compoundToHtml, computeKeys, computeTerms, contactUsEmail, contactUsLink, coordinatesToPoint, copyObject, countGroupVisibleNodes, countriesQuery, createMarker, cropsQuery, dataPathLabel, dataPathToKey, dataVersionHeader, dataVersionHeaderKey, defaultFeature, defaultLabel, defaultNodeLinkTypes, defaultRequiredDataIndicators, defaultRequiredDataSiteType, defaultSuggestionType, definitionToSchemaType, distinctUntilChangedDeep, ellipsis, engineGitBaseUrl, engineGitUrl, errorText, errorsLabel, evaluateSuccess, exportFormats, externalLink, externalNodeLink, fillColor, fillStyle, filterBlankNode$1 as filterBlankNode, filterParams, findBackgroundModel, findConfigModels, findMatchingModel, findModels, findNodeModel, findOrchestratorModel, findProperty, findPropertyById, findTermModels, flatFilterData, flatFilterNode, formatCustomErrorMessage, formatDate, formatError, formatPropertyError, formatter$1 as formatter, getDatesBetween, gitBranch, gitHome, glossaryBaseUrl, glossaryLink, groupBlankNodesByTermIdentity, groupChanged, groupJLogByField, groupJLogByTerm, groupLogsByTerm, groupNodesByTerm, groupdLogsByKey, grouppedKeys, grouppedValueKeys, groupsLogsByFields, guideModelUrl, guideNamespace, handleAPIError, handleGuideEvent, hasError, hasValidationError, hasWarning, highestMethodTier, ignoreKeys$2 as ignoreKeys, impactAssessmentProduct, initialFilterState, injectResizeEvent$, inputGroupsTermTypes, isAddPropertyEnabled, isChrome, isDateBetween, isEqual, isExternal, isIdenticalNodeValue, isKeyClosedVisible, isKeyHidden, isMaxStage, isMethodModelAllowed, isNonNodeModelKey, isSchemaIri, isScrolledBelow, isState, isTermTypeAllowed, isValidKey, jLogModelCount, keyToDataPath, levels, loadMapApi, locationQuery, logToCsv, logValueArray, logsKey, lookupUrl, mapFilterData, mapsUrl, markerIcon, markerPie, matchAggregatedQuery, matchAggregatedValidatedQuery, matchBoolPrefixQuery, matchCountry, matchExactQuery, matchGlobalRegion, matchId, matchNameNormalized, matchNestedKey, matchPhrasePrefixQuery, matchPhraseQuery, matchPrimaryProductQuery, matchQuery, matchRegex, matchRegion, matchTermType, matchType, matchesSearchTerm, maxAreaSize, measurementValue, mergeDataWithHeaders, methodTierOrder, migrationErrorMessage, migrationsUrl, modelCount, modelKeyParams, modelParams, models, multiMatchQuery, nestedProperty, nestingEnabled, nestingTypeEnabled, noValue, nodeAvailableProperties, nodeById, nodeChartLabels, nodeColours, nodeDataState, nodeDataStates, nodeDataVersion, nodeId, nodeIdWithoutDataVersion, nodeIds, nodeLink, nodeLinkEnabled, nodeLinkTypeEnabled, nodeLogsUrl, nodeQualityScoreColor, nodeQualityScoreLevel, nodeQualityScoreMaxDefault, nodeQualityScoreOrder, nodeRequestId, nodeSecondaryColours, nodeToAggregationFilename, nodeType, nodeTypeDataState, nodeTypeIcon, nodeTypeIconSchema, nodeUrl, nodeUrlParams, nodeVersion, nodeVersionKey, nodesByState, nodesByType, numberGte, openNodeUrl, openUrl, optionsFromGroup, parentKey, parentProperty, parseData, parseDataPath, parseLines, parseMessage, parseNewValue, pluralize, pointToCoordinates, polygonBounds, polygonToCoordinates, polygonToMap, polygonsFromFeature, populateWithTrackIdsFilterData, postGuideEvent, primaryProduct, productsQuery, propertyError, propertyErrors, propertyId, recursiveProperties, refToSchemaType, refreshPropertyKeys, regionsQuery, repeat, reportIssueLink, reportIssueUrl, requiredDataParams, safeJSONParse, safeJSONStringify, schemaBaseUrl, schemaDataBaseUrl, schemaLink, schemaRequiredProperties, schemaTypeToDefaultValue, scrollToEl, scrollTop, searchFilterData, searchableTypes, siblingProperty, simplifyContributions, singleProperty, siteTooBig, siteTypeToColor, siteTypeToIcon, sortProperties, sortedDates, strokeColor, strokeStyle, subValueKeys, suggestMatchQuery, suggestQuery, suggestTerms, takeAfterViewInit, termLocation, termLocationName, termProperties, termSearch, termTypeLabel, toSnakeCase, toTextParts, toThousands, typeToNewProperty, typeaheadFocus, uncapitalize, uniqueDatesBetween, updateProperties, valueLink, valueToString, valueTypeToDefault, valueValue, versionGitRef, waitFor, wildcardQuery };
|
|
16180
16227
|
//# sourceMappingURL=hestia-earth-ui-components.mjs.map
|