@hestia-earth/ui-components 0.43.24 → 0.43.25
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.
|
@@ -10197,7 +10197,8 @@ const isWeightedMean = (formula) => formula.bindings.some(({ column }) => column
|
|
|
10197
10197
|
const REPORTING_TABLE = 'reporting';
|
|
10198
10198
|
const isCompletenessMean = (formula) => formula.bindings.some(({ key }) => key === REPORTING_TABLE);
|
|
10199
10199
|
const isMeanThatRan = (formula, weighted) => weighted ? !isSimpleMean(formula) : !isWeightedMean(formula);
|
|
10200
|
-
// dividing a phase weight between the Cycles that share it
|
|
10200
|
+
// dividing a phase weight between the Cycles that share it: a step of how the mean is computed
|
|
10201
|
+
// rather than of the calculation, and already written in the guide, so it is never shown
|
|
10201
10202
|
const isWeightNormalisation = (formula) => formula.bindings.some(({ symbol }) => WEIGHT_SYMBOLS.includes(symbol ?? ''));
|
|
10202
10203
|
/**
|
|
10203
10204
|
* A symbol that should carry a value: the result and the inputs, but never a fixed constant or a
|
|
@@ -10456,8 +10457,7 @@ const ranForAggregation = (rules) => (formula) => {
|
|
|
10456
10457
|
applies: isSubSystemWeight,
|
|
10457
10458
|
ran: () => rules.termType === TermTermType.crop && !rules.subAggregation && !rules.worldAggregation
|
|
10458
10459
|
},
|
|
10459
|
-
{ applies: isPlantationWeight, ran: () => ranPlantationWeight(rules) }
|
|
10460
|
-
{ applies: isWeightNormalisation, ran: () => ranPlantationWeight(rules) }
|
|
10460
|
+
{ applies: isPlantationWeight, ran: () => ranPlantationWeight(rules) }
|
|
10461
10461
|
];
|
|
10462
10462
|
return stages.find(({ applies }) => applies(formula))?.ran() ?? true;
|
|
10463
10463
|
};
|
|
@@ -10467,6 +10467,7 @@ const ranForAggregation = (rules) => (formula) => {
|
|
|
10467
10467
|
*/
|
|
10468
10468
|
const appliesToNodeKey = (nodeKey) => (formula) => !nodeKey || !isEconomicValueShare(formula) || nodeKey === PRODUCTS_KEY;
|
|
10469
10469
|
const appliesToAggregation = (rules) => (formula) => !isCompletenessMean(formula) &&
|
|
10470
|
+
!isWeightNormalisation(formula) &&
|
|
10470
10471
|
ranForAggregation(rules)(formula) &&
|
|
10471
10472
|
appliesToNodeKey(rules.nodeKey)(formula) &&
|
|
10472
10473
|
isMeanThatRan(formula, isWeightedAggregation(rules));
|
|
@@ -10957,6 +10958,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
10957
10958
|
|
|
10958
10959
|
// TODO: compute from the list of unique properties
|
|
10959
10960
|
const additionalKeys = [
|
|
10961
|
+
'referencePeriod',
|
|
10960
10962
|
'key',
|
|
10961
10963
|
'methodModelDescription',
|
|
10962
10964
|
'methodDescription',
|
|
@@ -10988,6 +10990,7 @@ const defaultTableKeys = [
|
|
|
10988
10990
|
'operation',
|
|
10989
10991
|
'impactAssessment',
|
|
10990
10992
|
'value',
|
|
10993
|
+
'referencePeriod',
|
|
10991
10994
|
'dates',
|
|
10992
10995
|
'startDate',
|
|
10993
10996
|
'endDate',
|
|
@@ -13147,7 +13150,8 @@ const propertyTypeValue = {
|
|
|
13147
13150
|
? val.map(value => propertyValue(items, value)).join(ARRAY_DELIMITER)
|
|
13148
13151
|
: val;
|
|
13149
13152
|
},
|
|
13150
|
-
|
|
13153
|
+
// a GeoJSON object is shown as its JSON: the input formatter has no name to show for it
|
|
13154
|
+
json: val => (val ? safeJSONStringify(val) : ''),
|
|
13151
13155
|
string: val => (`${val}` || '').trim(),
|
|
13152
13156
|
number: val => +(`${val}` || '0'),
|
|
13153
13157
|
integer: val => +(`${val}` || '0'),
|
|
@@ -13183,7 +13187,8 @@ const propertyTypeParseValue = {
|
|
|
13183
13187
|
? val
|
|
13184
13188
|
: val.split(ARRAY_DELIMITER).map(value => parseNewValue(items, value));
|
|
13185
13189
|
},
|
|
13186
|
-
|
|
13190
|
+
// stored as the object the schema asks for; text that is not JSON is kept for the validation to report
|
|
13191
|
+
json: val => safeJSONParse(val, val) || '',
|
|
13187
13192
|
string: val => (`${val}` || '').trim(),
|
|
13188
13193
|
number: val => +(`${val}` || '0'),
|
|
13189
13194
|
integer: val => +(`${val}` || '0'),
|
|
@@ -14931,7 +14936,7 @@ class ImpactAssessmentsIndicatorBreakdownChartComponent {
|
|
|
14931
14936
|
this.chartData = computed(() => breakdownBars(this.values(), this.selectedCategory()), ...(ngDevMode ? [{ debugName: "chartData" }] : []));
|
|
14932
14937
|
this.chartTooltipFn = ({ includedItems, index }) => breakdownTooltip(this.chartData()[index], includedItems, this.nonZeroLogs(), this.total(), this.maximumValues());
|
|
14933
14938
|
this.afterBarDrawSettings = computed(() => breakdownBarText(this.displayValue(), this.total(), this.maximumValues()), ...(ngDevMode ? [{ debugName: "afterBarDrawSettings" }] : []));
|
|
14934
|
-
this.configuration = computed(() => breakdownScale(this.values()), ...(ngDevMode ? [{ debugName: "configuration" }] : []));
|
|
14939
|
+
this.configuration = computed(() => breakdownScale(this.values(), this.selectedCategory()), ...(ngDevMode ? [{ debugName: "configuration" }] : []));
|
|
14935
14940
|
this.exportFormats = [
|
|
14936
14941
|
...exportFormats,
|
|
14937
14942
|
{
|