@hestia-earth/ui-components 0.41.34 → 0.41.35

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.
@@ -14186,7 +14186,6 @@ class ImpactAssessmentsIndicatorsChartComponent {
14186
14186
  }, {}))
14187
14187
  });
14188
14188
  this.contributionsPerImpactAssessment = computed(() => this.contributionsResource.value() ?? {}, ...(ngDevMode ? [{ debugName: "contributionsPerImpactAssessment" }] : []));
14189
- this.enableContributions = computed(() => Object.values(this.contributionsPerImpactAssessment())?.length === this.impactAssessments()?.length, ...(ngDevMode ? [{ debugName: "enableContributions" }] : []));
14190
14189
  this.contributionKey = computed(() => this.key() === 'impacts'
14191
14190
  ? 'emissionsResourceUse'
14192
14191
  : this.key() === 'endpoints'
@@ -14197,6 +14196,8 @@ class ImpactAssessmentsIndicatorsChartComponent {
14197
14196
  .flatMap(impact => impact[this.contributionKey()].map(v => v.term))
14198
14197
  .filter(Boolean)
14199
14198
  : []), ...(ngDevMode ? [{ debugName: "contributionTerms" }] : []));
14199
+ this.enableContributions = computed(() => this.contributionKey() &&
14200
+ Object.values(this.contributionsPerImpactAssessment())?.length === this.impactAssessments()?.length, ...(ngDevMode ? [{ debugName: "enableContributions" }] : []));
14200
14201
  this.indicatorPerImpactAssessment = computed(() => groupNodesByTerm(this.impactAssessments(), this.key()), ...(ngDevMode ? [{ debugName: "indicatorPerImpactAssessment" }] : []));
14201
14202
  this.terms = computed(() => Object.values(this.indicatorPerImpactAssessment() ?? {})
14202
14203
  .filter(({ term, values }) => termAllowed$1(this.filterTermTypes(), term) &&
@@ -14214,7 +14215,7 @@ class ImpactAssessmentsIndicatorsChartComponent {
14214
14215
  }, {});
14215
14216
  return Object.assign(prev, methodsPerTerm);
14216
14217
  }, {}), ...(ngDevMode ? [{ debugName: "termToMethods" }] : []));
14217
- this.methods = computed(() => this.termToMethods()[this.selectedTerm()?.['@id']], ...(ngDevMode ? [{ debugName: "methods" }] : []));
14218
+ this.methods = computed(() => unique(this.termToMethods()[this.selectedTerm()?.['@id']]), ...(ngDevMode ? [{ debugName: "methods" }] : []));
14218
14219
  this.selectedMethod = computed(() => this.methods().find(term => term['@id'] == this.selectedMethodId()), ...(ngDevMode ? [{ debugName: "selectedMethod" }] : []));
14219
14220
  this.groupedValues = computed(() => this.indicatorPerImpactAssessment()?.[this.selectedTerm()?.name]?.values || {}, ...(ngDevMode ? [{ debugName: "groupedValues" }] : []));
14220
14221
  this.contributionData = computed(() => {