@hestia-earth/ui-components 0.43.15 → 0.43.17

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.
@@ -515,6 +515,11 @@ const distributionSourceMessage = {
515
515
  posterior: 'This was flagged against HESTIA Cycle data for this product in this country.'
516
516
  };
517
517
  const isMigrationError = ({ params }) => params?.current && 'expected' in params;
518
+ /**
519
+ * "Check the Emission value you provided" — the term's own type names what to look at, and it is
520
+ * dropped entirely when the error carries no term, so the sentence never reads "the N/A value".
521
+ */
522
+ const termTypeValueLabel = (term) => [term?.termType ? termTypeLabel(term.termType) : '', 'value'].filter(Boolean).join(' ');
518
523
  /**
519
524
  * Builds the error formatting functions for a given presentation (`renderer`) and link
520
525
  * configuration (`urls`). The error catalog below is the single source of truth; the
@@ -805,7 +810,7 @@ const createErrorFormatter = ({ renderer: r, urls }) => {
805
810
  ${params?.threshold ? `Our threshold is ±${threshold(params?.threshold)}.` : ''}
806
811
  Please either:
807
812
  ${formatList([
808
- 'Check the ${params?.term.termType} value you provided;',
813
+ `Check the ${termTypeValueLabel(params?.term)} you provided;`,
809
814
  'Check the data you provided which is the input into this model;',
810
815
  'Carefully read the documentation to understand if we used a default property as part of the calculations.'
811
816
  ], 'decimal')}`